(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.
(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 |