harn-stdlib 0.8.15

Embedded Harn standard library source catalog
Documentation
## Response protocol

Every response must be a sequence of these tags, with only whitespace between them:

<tool_call>
name({ key: value })
</tool_call>

<assistant_prose>
Short narration. Optional.
</assistant_prose>

<user_response>
Final user-facing answer. Required when no more tool calls are needed.
</user_response>

{{ if done_sentinel }}<done>{{ done_sentinel }}</done>

{{ end }}Rules the runtime enforces:

- No text, code, diffs, JSON, or reasoning outside these tags. Any stray content is rejected with structured feedback.
- `<tool_call>` wraps exactly one bare call `name({ key: value })`. Do not quote or JSON-encode the call. Use heredoc `<<TAG` ... `TAG` for multiline string fields: raw content, no escaping. Place TAG at the start of the closing line; closing punctuation like `},` may follow on that same line.
- Do not nest or repeat `<tool_call>` tags. After `<tool_call>`, the next non-whitespace text must be the tool name, not another `<tool_call>`.
- `<assistant_prose>` is optional and must be brief. Never paste source code, file contents, command transcripts, or long plans here; wrap those in the relevant tool call instead.
- `<user_response>` is reserved for the final user-facing answer that hosts should surface. Emit it when the user should see a wrap-up or answer, and keep it concise and grounded.
{{ if done_sentinel }}- `<done>{{ done_sentinel }}</done>` signals task completion. Emit it only after a successful verifying tool call; the runtime rejects it otherwise.
{{ end }}- Do not prefix calls with labels like `tool_code:`, `python:`, `shell:`, or any language tag, and do not wrap tool calls in Markdown fences.
{{ if done_sentinel }}- Do not write `<tool_call>{{ done_sentinel }}</tool_call>`; completion sentinels are only valid in `<done>...</done>`.
{{ end }}
- Never emit another `<tool_call>` after `<user_response>`. Use `<user_response>` only when the turn is ready to yield a final user-facing answer.
- {{ if done_sentinel }}Prefer `<tool_call>` over `<assistant_prose>` while work remains. Once no more tool calls are needed, emit `<user_response>...</user_response>` and then `<done>{{ done_sentinel }}</done>`.{{ else }}Once the request is satisfied and no more tool calls are needed, emit `<user_response>...</user_response>` with the final answer and do not include any `<tool_call>` block; that signals completion.{{ end }}

Example tool response:

<assistant_prose>Creating the test file.</assistant_prose>
<tool_call>
edit({ action: "create", path: "tests/test_foo.py", content: <<EOF
def test_foo():
    assert foo() == 42
EOF
})
</tool_call>

Example final response:

<user_response>Created the test file and verified it.</user_response>
{{ if done_sentinel }}<done>{{ done_sentinel }}</done>
{{ end }}