(all-todos-done result)The built-in completion verifier. Reads the SHIPPED todowrite builtin's result
metadata and requires every item to be checked.
Structural, not domain: it counts unchecked boxes and never learns what a todo means, so the loop stays domain-blind. No plan declared ⇒ nothing to verify ⇒ pass, so the gate never punishes an agent that does not use the builtin.
The built-in completion verifier. Reads the SHIPPED `todowrite` builtin's result metadata and requires every item to be checked. Structural, not domain: it counts unchecked boxes and never learns what a todo means, so the loop stays domain-blind. No plan declared ⇒ nothing to verify ⇒ pass, so the gate never punishes an agent that does not use the builtin.
(create agent-def options toolkit)Open a LIVE EXECUTION of an agent def, over client OPTIONS (not a built client)
— because a per-call :model override must be able to change the model, which is
fixed when a client is constructed.
Open a LIVE EXECUTION of an agent def, over client OPTIONS (not a built client) — because a per-call `:model` override must be able to change the model, which is fixed when a client is constructed.
(guarded-hooks guardrails hooks)Compile guardrails into one :before-tool with FIRST-DENY-WINS, composed ahead
of any hook already set. A guardrail returns "allow" (or nil) to permit; any
other string DENIES with that reason.
No guardrails ⇒ hooks is returned untouched, so absent is byte-identical.
Compile guardrails into one `:before-tool` with FIRST-DENY-WINS, composed ahead of any hook already set. A guardrail returns `"allow"` (or nil) to permit; any other string DENIES with that reason. No guardrails ⇒ `hooks` is returned untouched, so absent is byte-identical.
(harness spec)harness is a NAME, not a type.
An agent def already IS the harness — tools, soul, team, budget, model, policy,
ceilings — so this is the word landing in the API without a second concept to
learn. A def built through harness and one written inline are indistinguishable.
`harness` is a NAME, not a type. An agent def already IS the harness — tools, soul, team, budget, model, policy, ceilings — so this is the word landing in the API without a second concept to learn. A def built through `harness` and one written inline are indistinguishable.
(loop-unsupported agent-def)Which fields of agent-def a LOOP cannot honour, by name (ADR 0024 / D2).
A Loop is a driver over one client: it has no child agents to delegate to, no
suspension host to route a §10 Request to, and no metric sink of its own. Those
fields are not IGNORED QUIETLY any more — a host asks this and finds out, which
is additive and breaks nobody. Running an agent def whose :team matters
belongs on toolnexus.agents.runtime, which honours all four.
Returns only the fields actually PRESENT on the def, in the canonical order.
Which fields of `agent-def` a LOOP cannot honour, by name (ADR 0024 / D2). A Loop is a driver over one client: it has no child agents to delegate to, no suspension host to route a §10 Request to, and no metric sink of its own. Those fields are not IGNORED QUIETLY any more — a host asks this and finds out, which is additive and breaks nobody. Running an agent def whose `:team` matters belongs on `toolnexus.agents.runtime`, which honours all four. Returns only the fields actually PRESENT on the def, in the canonical order.
The CANONICAL vocabulary (addendum A6) — identical strings in all seven ports,
exactly as the limit strings are, and deliberately NOT this language's own
spelling of the fields (:wait-for, :on-metric).
The CANONICAL vocabulary (addendum A6) — identical strings in all seven ports, exactly as the `limit` strings are, and deliberately NOT this language's own spelling of the fields (`:wait-for`, `:on-metric`).
(run lp prompt)(run lp prompt opts)Run one request. Returns [outcome loop'] — the loop carries the turn count and
the transcript forward, so a caller may run again on the same conversation.
opts may carry :model, which applies to THIS CALL ONLY.
Run one request. Returns `[outcome loop']` — the loop carries the turn count and the transcript forward, so a caller may run again on the same conversation. `opts` may carry `:model`, which applies to THIS CALL ONLY.
(run-gated ask prompt completion state)Wrap a client run with the completion gate. SHARED by the standalone loop and the §7D runtime turn, so a delegated child gets exactly the same guarantee as a directly-driven one.
ask takes [prompt state] and returns [result state'], which is what lets one
implementation serve both the value-threading loop and the runtime's turn.
Rule 2 in force: a run that is pending (suspended on a human) or otherwise
non-done already carries its own reason, so the gate never re-judges it. That
keeps pending and incomplete distinct — the caller can always tell whether it
owes an Answer or a fix.
Wrap a client run with the completion gate. SHARED by the standalone loop and the §7D runtime turn, so a delegated child gets exactly the same guarantee as a directly-driven one. `ask` takes `[prompt state]` and returns `[result state']`, which is what lets one implementation serve both the value-threading loop and the runtime's turn. Rule 2 in force: a run that is `pending` (suspended on a human) or otherwise non-done already carries its own reason, so the gate never re-judges it. That keeps `pending` and `incomplete` distinct — the caller can always tell whether it owes an Answer or a fix.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |