@archmax-ai/harness 0.9.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -14
- package/dist/agent.d.ts +4 -6
- package/dist/agent.js +4 -6
- package/dist/agent.js.map +1 -1
- package/dist/assembly/compose.d.ts +5 -24
- package/dist/assembly/compose.js +28 -42
- package/dist/assembly/compose.js.map +1 -1
- package/dist/assembly/delegation-registry.js +3 -14
- package/dist/assembly/delegation-registry.js.map +1 -1
- package/dist/assembly/index.d.ts +8 -15
- package/dist/assembly/index.js +21 -28
- package/dist/assembly/index.js.map +1 -1
- package/dist/assembly/plain.js +1 -2
- package/dist/assembly/plain.js.map +1 -1
- package/dist/authoring-skill/archmax-harness/README.md +5 -5
- package/dist/authoring-skill/archmax-harness/SKILL.md +72 -30
- package/dist/authoring-skill/archmax-harness/references/backend-integration.md +33 -24
- package/dist/authoring-skill/archmax-harness/references/cases.md +41 -8
- package/dist/authoring-skill/archmax-harness/references/{hook-and-test-scripts.md → code-state-and-test-scripts.md} +599 -339
- package/dist/authoring-skill/archmax-harness/references/code-states-and-scripts.md +115 -0
- package/dist/authoring-skill/archmax-harness/references/diagnostics.md +40 -7
- package/dist/authoring-skill/archmax-harness/references/wiring.md +19 -10
- package/dist/authoring-skill/archmax-harness/references/workflow-schema.md +404 -293
- package/dist/authoring-skill/archmax-harness/references/workflow-yaml.md +151 -62
- package/dist/cli/state-flow.d.ts +1 -1
- package/dist/cli/state-flow.js +18 -28
- package/dist/cli/state-flow.js.map +1 -1
- package/dist/cli/turn.d.ts +1 -1
- package/dist/cli/turn.js +1 -1
- package/dist/core/code-description.d.ts +3 -3
- package/dist/core/code-description.js +3 -3
- package/dist/core/deepagents.d.ts +5 -12
- package/dist/core/deepagents.js +4 -17
- package/dist/core/deepagents.js.map +1 -1
- package/dist/core/events.d.ts +23 -42
- package/dist/core/events.js +21 -24
- package/dist/core/events.js.map +1 -1
- package/dist/core/message-readers.d.ts +4 -5
- package/dist/core/message-readers.js +3 -8
- package/dist/core/message-readers.js.map +1 -1
- package/dist/core/messages.d.ts +0 -22
- package/dist/core/messages.js +1 -32
- package/dist/core/messages.js.map +1 -1
- package/dist/core/mounts.js +3 -3
- package/dist/core/platform-prompt.generated.js +1 -1
- package/dist/core/platform-prompt.generated.js.map +1 -1
- package/dist/core/session-zone.d.ts +1 -1
- package/dist/core/session-zone.js +1 -1
- package/dist/core/workspace-context.d.ts +1 -1
- package/dist/core/workspace.d.ts +1 -1
- package/dist/core/workspace.js +1 -1
- package/dist/core/zones.d.ts +4 -4
- package/dist/core/zones.js +5 -5
- package/dist/core/zones.js.map +1 -1
- package/dist/env.d.ts +9 -9
- package/dist/index.d.ts +3 -7
- package/dist/index.js +2 -4
- package/dist/index.js.map +1 -1
- package/dist/kernel/kernel.d.ts +31 -61
- package/dist/kernel/kernel.js +54 -112
- package/dist/kernel/kernel.js.map +1 -1
- package/dist/machine/lint-spec.js +53 -12
- package/dist/machine/lint-spec.js.map +1 -1
- package/dist/machine/machine.d.ts +36 -18
- package/dist/machine/machine.js +62 -51
- package/dist/machine/machine.js.map +1 -1
- package/dist/machine/spec-schema.d.ts +32 -180
- package/dist/machine/spec-schema.js +52 -113
- package/dist/machine/spec-schema.js.map +1 -1
- package/dist/machine/tool-names.d.ts +34 -16
- package/dist/machine/tool-names.js +41 -16
- package/dist/machine/tool-names.js.map +1 -1
- package/dist/machine/types.d.ts +14 -46
- package/dist/machine/types.js +0 -2
- package/dist/machine/types.js.map +1 -1
- package/dist/machine/validate-spec.d.ts +1 -1
- package/dist/public/sandbox.d.ts +59 -95
- package/dist/public/sandbox.js +22 -23
- package/dist/public/sandbox.js.map +1 -1
- package/dist/public/spec.d.ts +13 -20
- package/dist/public/spec.js +12 -20
- package/dist/public/spec.js.map +1 -1
- package/dist/runtime/contract.d.ts +11 -12
- package/dist/runtime/contract.js +16 -16
- package/dist/runtime/contract.js.map +1 -1
- package/dist/sandbox/assets/parts/code-state.js +17 -0
- package/dist/sandbox/executor.d.ts +25 -7
- package/dist/sandbox/executor.js +56 -57
- package/dist/sandbox/executor.js.map +1 -1
- package/dist/sandbox/imports.d.ts +10 -10
- package/dist/sandbox/imports.js +11 -11
- package/dist/sandbox/imports.js.map +1 -1
- package/dist/sandbox/prelude.d.ts +5 -6
- package/dist/sandbox/prelude.js +38 -35
- package/dist/sandbox/prelude.js.map +1 -1
- package/dist/sandbox/ptc-gateway.d.ts +19 -18
- package/dist/sandbox/ptc-gateway.js +26 -22
- package/dist/sandbox/ptc-gateway.js.map +1 -1
- package/dist/sessions/resume.d.ts +2 -2
- package/dist/sessions/resume.js +1 -1
- package/dist/sessions/resume.js.map +1 -1
- package/dist/sessions/scope.d.ts +0 -10
- package/dist/sessions/scope.js +0 -17
- package/dist/sessions/scope.js.map +1 -1
- package/dist/sessions/summary.d.ts +1 -1
- package/dist/testing/assertions.js +9 -4
- package/dist/testing/assertions.js.map +1 -1
- package/dist/testing/driver.js +3 -0
- package/dist/testing/driver.js.map +1 -1
- package/dist/testing/interpreter.d.ts +2 -2
- package/dist/testing/runner.d.ts +2 -2
- package/dist/validate/validate.d.ts +1 -1
- package/dist/validate/validate.js +39 -70
- package/dist/validate/validate.js.map +1 -1
- package/dist/workflow/automated-controls.d.ts +63 -0
- package/dist/workflow/automated-controls.js +158 -0
- package/dist/workflow/automated-controls.js.map +1 -0
- package/dist/workflow/automated.d.ts +112 -0
- package/dist/workflow/automated.js +163 -0
- package/dist/workflow/automated.js.map +1 -0
- package/dist/workflow/code-state.d.ts +46 -0
- package/dist/workflow/code-state.js +26 -0
- package/dist/workflow/code-state.js.map +1 -0
- package/dist/workflow/control-tools.d.ts +54 -23
- package/dist/workflow/control-tools.js +99 -79
- package/dist/workflow/control-tools.js.map +1 -1
- package/dist/workflow/file-values.d.ts +4 -4
- package/dist/workflow/file-values.js +1 -1
- package/dist/workflow/file-values.js.map +1 -1
- package/dist/workflow/governance.d.ts +11 -22
- package/dist/workflow/governance.js +47 -104
- package/dist/workflow/governance.js.map +1 -1
- package/dist/workflow/grader-state.d.ts +55 -0
- package/dist/workflow/grader-state.js +182 -0
- package/dist/workflow/grader-state.js.map +1 -0
- package/dist/workflow/history.d.ts +11 -0
- package/dist/{lifecycle/transcript.js → workflow/history.js} +24 -8
- package/dist/workflow/history.js.map +1 -0
- package/dist/workflow/middleware.d.ts +14 -17
- package/dist/workflow/middleware.js +109 -95
- package/dist/workflow/middleware.js.map +1 -1
- package/dist/workflow/move-events.d.ts +21 -0
- package/dist/workflow/move-events.js +20 -0
- package/dist/workflow/move-events.js.map +1 -0
- package/dist/workflow/on-error.js +0 -2
- package/dist/workflow/on-error.js.map +1 -1
- package/dist/workflow/parks.d.ts +9 -2
- package/dist/workflow/parks.js +16 -10
- package/dist/workflow/parks.js.map +1 -1
- package/dist/workflow/paths.d.ts +9 -9
- package/dist/workflow/paths.js +19 -19
- package/dist/workflow/paths.js.map +1 -1
- package/dist/workflow/render-prompt.d.ts +7 -5
- package/dist/workflow/render-prompt.js +22 -37
- package/dist/workflow/render-prompt.js.map +1 -1
- package/dist/workflow/signature-checks.d.ts +2 -2
- package/dist/workflow/snapshot.js +5 -29
- package/dist/workflow/snapshot.js.map +1 -1
- package/dist/workflow/state.d.ts +14 -42
- package/dist/workflow/state.js +20 -33
- package/dist/workflow/state.js.map +1 -1
- package/dist/workflow/sub-workflow.d.ts +3 -3
- package/dist/workflow/sub-workflow.js +3 -7
- package/dist/workflow/sub-workflow.js.map +1 -1
- package/dist/workflow/tool-service.d.ts +1 -9
- package/dist/workflow/tool-service.js +21 -24
- package/dist/workflow/tool-service.js.map +1 -1
- package/dist/workflow/turn-boundary.d.ts +2 -2
- package/dist/workflow/turn-boundary.js +10 -15
- package/dist/workflow/turn-boundary.js.map +1 -1
- package/dist/workflow/turn-runner.js +5 -6
- package/dist/workflow/turn-runner.js.map +1 -1
- package/package.json +2 -2
- package/skills/archmax-harness/README.md +5 -5
- package/skills/archmax-harness/SKILL.md +72 -30
- package/skills/archmax-harness/references/backend-integration.md +33 -24
- package/skills/archmax-harness/references/cases.md +41 -8
- package/skills/archmax-harness/references/{hook-and-test-scripts.md → code-state-and-test-scripts.md} +599 -339
- package/skills/archmax-harness/references/code-states-and-scripts.md +115 -0
- package/skills/archmax-harness/references/diagnostics.md +40 -7
- package/skills/archmax-harness/references/wiring.md +19 -10
- package/skills/archmax-harness/references/workflow-schema.md +404 -293
- package/skills/archmax-harness/references/workflow-yaml.md +151 -62
- package/dist/authoring-skill/archmax-harness/references/hooks-and-scripts.md +0 -89
- package/dist/lifecycle/hook-shape.d.ts +0 -44
- package/dist/lifecycle/hook-shape.js +0 -66
- package/dist/lifecycle/hook-shape.js.map +0 -1
- package/dist/lifecycle/runner.d.ts +0 -197
- package/dist/lifecycle/runner.js +0 -419
- package/dist/lifecycle/runner.js.map +0 -1
- package/dist/lifecycle/tool-calls.d.ts +0 -9
- package/dist/lifecycle/tool-calls.js +0 -57
- package/dist/lifecycle/tool-calls.js.map +0 -1
- package/dist/lifecycle/transcript.d.ts +0 -31
- package/dist/lifecycle/transcript.js.map +0 -1
- package/dist/rubrics/rubrics.d.ts +0 -135
- package/dist/rubrics/rubrics.js +0 -145
- package/dist/rubrics/rubrics.js.map +0 -1
- package/dist/sandbox/assets/parts/core.js +0 -22
- package/dist/sandbox/assets/parts/lifecycle-hook.js +0 -47
- package/dist/sandbox/bridge.d.ts +0 -16
- package/dist/sandbox/bridge.js +0 -95
- package/dist/sandbox/bridge.js.map +0 -1
- package/dist/workflow/visits.d.ts +0 -21
- package/dist/workflow/visits.js +0 -45
- package/dist/workflow/visits.js.map +0 -1
- package/skills/archmax-harness/references/hooks-and-scripts.md +0 -89
|
@@ -14,7 +14,7 @@ instructions: |- # standing direction for the whole run (warning
|
|
|
14
14
|
Records live in skills/order-data/assets/orders.json; write artifacts under scratchpad/.
|
|
15
15
|
|
|
16
16
|
Answer only from records you have read; never fabricate.
|
|
17
|
-
runtime: { engine: archmax-harness, version: "
|
|
17
|
+
runtime: { engine: archmax-harness, version: "3" } # 3 is the only contract; omitted = 3
|
|
18
18
|
disabled: false # true = out of service: no new turns; parked runs still drain
|
|
19
19
|
settings: # sandbox limits: timeoutMs, memoryLimitBytes, maxPtcCalls,
|
|
20
20
|
timeoutMs: 15000 # maxResultChars, prompt_cache: { enabled, ttl }
|
|
@@ -23,9 +23,7 @@ tests: # case suite config (no tests.config.js exists)
|
|
|
23
23
|
maxConcurrency: 1 # only 1 accepted
|
|
24
24
|
caseTimeoutMs: 120000 # per-case wall clock, distinct from settings.timeoutMs
|
|
25
25
|
judge: {} # required for grade:; {} = env default model, or { model, modelOptions }
|
|
26
|
-
|
|
27
|
-
metadata: { canvas: {} } # host data, never read; accepted at root, state, rubric — leave as found
|
|
28
|
-
extensions: { hooks: [] } # host-registered hook kinds; rarely authored
|
|
26
|
+
metadata: { canvas: {} } # host data, never read; accepted at root and on a state — leave as found
|
|
29
27
|
|
|
30
28
|
tools: # tool governance, workflow level
|
|
31
29
|
allow_always: # granted in EVERY state; a state's allow adds to or narrows it.
|
|
@@ -48,7 +46,7 @@ skills: # skill governance, workflow level — SLUGS, n
|
|
|
48
46
|
|
|
49
47
|
states:
|
|
50
48
|
triage: # key = slug = identity (^[a-z0-9]+(-[a-z0-9]+)*$)
|
|
51
|
-
type: agent # agent (default) | human
|
|
49
|
+
type: agent # agent (default) | human | grader | code (grader/code = automated)
|
|
52
50
|
title: Triage request # label for people/hosts; reaches no model call
|
|
53
51
|
summary: Record the refund decision for review. # ditto: an authoring/host label, NOT in the prompt
|
|
54
52
|
triggers: # a trigger is declared on the state it ENTERS; key = id
|
|
@@ -66,17 +64,8 @@ states:
|
|
|
66
64
|
# entry types: string integer number boolean date date-time object array file
|
|
67
65
|
instructions: >-
|
|
68
66
|
Record the decision in scratchpad/refund.json, then archmax_advance to
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
- script: hooks/check-requester.js
|
|
72
|
-
after: # gates the archmax_advance out (or completion, when terminal)
|
|
73
|
-
- script: hooks/check-policy.js
|
|
74
|
-
max_iterations: 2 # how many `correct`s before a hard veto (per hook; default 0)
|
|
75
|
-
- rubric: # LLM grader, inline; the agent never sees it
|
|
76
|
-
instructions: |- # the only required key: criteria + verdict (ok/correct/veto + reason)
|
|
77
|
-
Judge the tone of the last assistant message …
|
|
78
|
-
max_iterations: 1
|
|
79
|
-
model: gpt-4.1-mini # optional override
|
|
67
|
+
check-policy; never close the case yourself. If a note sends the case
|
|
68
|
+
back, fix what it names and advance again.
|
|
80
69
|
tools:
|
|
81
70
|
allow: # adds to allow_always; entry = name | { tool, args: {<arg>: [globs]} } | { tool, paths }
|
|
82
71
|
- lookup_customer
|
|
@@ -94,13 +83,27 @@ states:
|
|
|
94
83
|
on_error: closed # where a terminal failure of this segment routes
|
|
95
84
|
metadata: { x: 40, y: 180 }
|
|
96
85
|
transitions: # none => terminal state
|
|
97
|
-
- to:
|
|
98
|
-
description: The decision is recorded
|
|
86
|
+
- to: check-policy # slug; must exist
|
|
87
|
+
description: The decision is recorded in scratchpad/refund.json. # what the agent routes
|
|
99
88
|
# on. Say WHEN, never where. Omit it to route on the target's
|
|
100
89
|
# instructions instead (target must have some); REQUIRED on a
|
|
101
|
-
# human state's transitions
|
|
90
|
+
# human state's transitions (the button label) and on every edge
|
|
91
|
+
# INTO a grader or code state, like this one.
|
|
102
92
|
type: none # approve | reject | refine | none — semantic on human states
|
|
103
93
|
|
|
94
|
+
check-policy: # CODE state: the runtime runs its script on entry, NO model call
|
|
95
|
+
type: code
|
|
96
|
+
script: scripts/check-policy.js # REQUIRED on a code state, refused on any other type; resolves
|
|
97
|
+
# to workflows/<slug>/scripts/check-policy.js (.js|.mjs, no `..`)
|
|
98
|
+
summary: Re-derive the decision from the refund policy. # instructions/model/budget/evidence/
|
|
99
|
+
# approvers here are validate ERRORS: nothing reads them
|
|
100
|
+
skills: { allow: [order-data] } # the script's tools are THIS state's surface: grant here
|
|
101
|
+
# what it reads or calls (another state's grant never reaches it)
|
|
102
|
+
on_error: closed # a throw, a timeout, or finishing undecided routes here
|
|
103
|
+
transitions: # the script takes one: tools.archmax_advance({ to, reason })
|
|
104
|
+
- { to: review, description: The recorded decision matches the policy. }
|
|
105
|
+
- { to: triage, description: The decision contradicts the policy; send it back with the fix. }
|
|
106
|
+
|
|
104
107
|
review: # human state: parks with a decision record; a PERSON picks the edge
|
|
105
108
|
type: human
|
|
106
109
|
title: Review refund
|
|
@@ -110,27 +113,57 @@ states:
|
|
|
110
113
|
approvers: [finance@acme.com]
|
|
111
114
|
evidence: [scratchpad/refund.json] # plus whatever archmax_advance attached via `evidence:`
|
|
112
115
|
transitions: # required; no self-edge; one target per labeled type
|
|
113
|
-
- { to:
|
|
116
|
+
- { to: reply, type: approve, description: Approve; tell the customer. }
|
|
114
117
|
- { to: triage, type: refine, description: Send back with a comment. }
|
|
115
118
|
|
|
116
|
-
|
|
119
|
+
reply: # agent state (type omitted)
|
|
120
|
+
instructions: >-
|
|
121
|
+
Draft the customer's email in scratchpad/reply.md, then archmax_advance to
|
|
122
|
+
grade-reply; if a note sends it back, revise the draft as it says.
|
|
123
|
+
transitions:
|
|
124
|
+
- { to: grade-reply, description: The email is drafted in scratchpad/reply.md. }
|
|
125
|
+
|
|
126
|
+
grade-reply: # GRADER state: an isolated grader judges WORK HANDED ON (a draft,
|
|
127
|
+
type: grader # a report), never a live answer: a turn's reply is every text
|
|
128
|
+
# the agent said, a draft sent back included
|
|
129
|
+
instructions: |- # REQUIRED: its criteria, appended to a compiled-in grader preamble
|
|
130
|
+
Judge only the tone of scratchpad/reply.md.
|
|
131
|
+
- Friendly and professional: advance to `send-reply`.
|
|
132
|
+
- Curt or cold: advance back to `reply`, saying exactly what to change.
|
|
133
|
+
- If archmax_get_history's trail already holds two steps with kind
|
|
134
|
+
"grader" and to "reply", raise `reply-tone` instead of sending it back.
|
|
135
|
+
model: gpt-4.1-mini # optional; resolved under the `grader` model role
|
|
136
|
+
budget: { maxTurns: 4, timeoutMs: 60000 } # ITS OWN model calls / run time; no maxParks
|
|
137
|
+
on_error: closed # fails closed: an undecided grader routes here
|
|
138
|
+
transitions: # REQUIRED, at least one; no evidence/approvers on a grader
|
|
139
|
+
- { to: send-reply, description: The draft is friendly and professional. }
|
|
140
|
+
- { to: reply, description: The tone is off; send it back naming what to change. }
|
|
141
|
+
|
|
142
|
+
send-reply: # TERMINAL code state: the session completes when the script
|
|
143
|
+
type: code # returns — "approve, then end" with no further model call
|
|
144
|
+
script: scripts/send-reply.js
|
|
145
|
+
tools: { allow: [send_email] } # the host tool its script calls, granted HERE
|
|
146
|
+
|
|
147
|
+
closed: # bare key = terminal (agent) state with no declarations
|
|
117
148
|
```
|
|
118
149
|
|
|
119
150
|
## Machine rules
|
|
120
151
|
|
|
121
152
|
- **Movement.** The agent moves only by `archmax_advance({ to, reason, evidence? })`
|
|
122
|
-
— one per message, edge validated, then the
|
|
123
|
-
|
|
124
|
-
transitions is terminal; the run ends when the agent finishes there.
|
|
125
|
-
decisions
|
|
153
|
+
— one per message, edge and `requires` validated, then the target's tools
|
|
154
|
+
unlock (or, for a grader or code target, the target runs at once). A state
|
|
155
|
+
with no transitions is terminal; the run ends when the agent finishes there.
|
|
156
|
+
Human decisions, `on_error`, and grader and code states' own `archmax_advance`
|
|
157
|
+
are the other movers. `archmax_reset({ reason })`
|
|
126
158
|
returns to the entry state (forbid it via `forbid_always` when a run must
|
|
127
159
|
never restart). No fan-out: sequence states; concurrency lives in
|
|
128
160
|
sub-workflow calls.
|
|
129
161
|
- **Entry.** At least one state declares `triggers`; one state per trigger id;
|
|
130
162
|
`manual` is the entry the CLI, a host firing and a caller all use. A
|
|
131
163
|
re-invoked finished session is a **new turn in the state it ended in**, not
|
|
132
|
-
at the entry
|
|
133
|
-
|
|
164
|
+
at the entry (one that completed in a terminal code state opens at its
|
|
165
|
+
trigger's entry) — give a state re-entry transitions if a conversation must
|
|
166
|
+
move on, or park instead of finishing.
|
|
134
167
|
- **Variables.** One flat checkpointed `name → value` store, never declared.
|
|
135
168
|
Host seeds (`--variables`, `createAgent({ variables })`, a delivery) are
|
|
136
169
|
**locked**; the agent uses `archmax_get_variables`/`archmax_set_variables`
|
|
@@ -156,7 +189,8 @@ states:
|
|
|
156
189
|
judgement and any state with a big tool surface or several transitions on
|
|
157
190
|
the default, since a small model that routes badly costs more in retries
|
|
158
191
|
than it saves. Repeating the workflow's id on a state is a validate warning.
|
|
159
|
-
A
|
|
192
|
+
A grader state's `model` is resolved under the `grader` model role
|
|
193
|
+
(`modelFactory("grader", env, id)`), a sub-workflow uses its own spec's, and a
|
|
160
194
|
host that passes an explicit `model` instance to `createAgent` outranks
|
|
161
195
|
every declared id (it must pass `modelFactory` to honour them).
|
|
162
196
|
- **Parking.** A state that needs an event or a time calls
|
|
@@ -170,9 +204,9 @@ states:
|
|
|
170
204
|
- **Failing.** When the work cannot be completed, the agent calls
|
|
171
205
|
`archmax_raise({ code, reason })` (alone in its message; any state): the
|
|
172
206
|
session ends at once `failed`, with the agent's free-form `code` and
|
|
173
|
-
`reason` as the outcome's `exit` — no `on_error` route, no
|
|
174
|
-
|
|
175
|
-
|
|
207
|
+
`reason` as the outcome's `exit` — no `on_error` route, no `returns`
|
|
208
|
+
check. A session that never raises is a success, so it is for failure
|
|
209
|
+
only. Forbid it (`forbid_always`, or a state's `forbid`) where the
|
|
176
210
|
agent must not end the run itself; a child that raises fails its caller's
|
|
177
211
|
call with kind `raised`.
|
|
178
212
|
- **Human states** park with a record built from `instructions`, `evidence`
|
|
@@ -182,23 +216,54 @@ states:
|
|
|
182
216
|
reply-only turn (every tool call refused) and re-parks unchanged; only
|
|
183
217
|
`decide` moves the run. A
|
|
184
218
|
`refine` edge delivers the reviewer's comment as correction.
|
|
185
|
-
- **
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
219
|
+
- **Grader and code states** (automated states). A **code** state runs
|
|
220
|
+
`script: scripts/<x>.js` in the sandbox; a **grader** state runs an isolated
|
|
221
|
+
grader whose criteria are the state's `instructions`. Both read the session
|
|
222
|
+
with `archmax_get_history` (`{ messages, trail }`: the whole transcript, a
|
|
223
|
+
tool result inline in its tool message's `text`, and the trail; a script
|
|
224
|
+
calls `JSON.parse(await tools.archmax_get_history())`). Both run on
|
|
225
|
+
entry — however the session got there — with **no call of the agent's model**
|
|
226
|
+
(a chain of code states makes none at all), and leave like every state:
|
|
227
|
+
`archmax_advance` along one of their transitions, whose `reason` reaches the
|
|
228
|
+
next state as a `[code]`/`[grader]` runtime note and a `kind: code|grader`
|
|
229
|
+
trail step, or `archmax_raise`. A **terminal** code state completes the
|
|
230
|
+
session when its script returns. Throwing, timing out, a spent grader budget,
|
|
231
|
+
or a non-terminal state that finishes without either call **fails closed** →
|
|
232
|
+
`on_error`. Each is offered exactly its own state's surface (its grants and
|
|
233
|
+
one control set for both types: `archmax_advance`, `archmax_raise`, the
|
|
234
|
+
variable tools, `archmax_get_history`), governed like the agent's calls — never
|
|
235
|
+
`write_todos`, `archmax_eval`, `archmax_run`, `archmax_wait`,
|
|
236
|
+
`archmax_reset`, even when `allow_always` lists one (a state's own
|
|
237
|
+
`tools.allow` naming one is an error): an automated state cannot park.
|
|
238
|
+
There is no iteration budget: a state that gives up after N rounds counts
|
|
239
|
+
them in the trail. Per type, `validate` errors on: a code state's
|
|
240
|
+
`instructions`/`model`/`budget`/`evidence`/`approvers`; a grader without
|
|
241
|
+
`instructions` or without a transition, or with `evidence`/`approvers`/
|
|
242
|
+
`budget.maxParks`. There are **no `before:`/`after:` hooks and no root
|
|
243
|
+
`extensions:`** — a leftover key is a load error naming it. Script contract:
|
|
244
|
+
[`code-states-and-scripts.md`](code-states-and-scripts.md).
|
|
245
|
+
- **Automated-state patterns.** A deterministic check **in front of** a state:
|
|
246
|
+
make the trigger's entry (or the edge's target) a code state that advances
|
|
247
|
+
to the work or to a state that declines it. A check **behind** a state: point
|
|
248
|
+
the state's transition at a code state that advances onward, or back with
|
|
249
|
+
the fix as its `reason` — the agent reads it and advances again. **Approve,
|
|
250
|
+
then end**: approve into a terminal code state, which costs no model call.
|
|
251
|
+
Judgment (tone, completeness): a grader behind the graded state with an edge
|
|
252
|
+
back; its `instructions` say when to raise ("after two send-backs" = two
|
|
253
|
+
trail steps `{ kind: grader, to: <graded state> }`). Grade work the agent
|
|
254
|
+
hands on (a report, a draft), not a live answer: a turn's `reply` is every
|
|
255
|
+
text the agent said in it, so a draft sent back has reached the person.
|
|
194
256
|
- **Budgets and `on_error`.** `budget.maxTurns`/`timeoutMs`/`maxParks` bound
|
|
195
|
-
a state's segment
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
257
|
+
a state's segment (on a grader: its own model calls and run time; a code
|
|
258
|
+
state takes no `budget`, `settings.timeoutMs` bounds its script). There is
|
|
259
|
+
no root `budget` (declaring one is a load error): a whole turn is bounded by
|
|
260
|
+
LangGraph's `recursionLimit` (400 unless the host's invoke config sets one),
|
|
261
|
+
and a turn that hits it — a cycle between states, say — ends the session
|
|
262
|
+
`failed` (`recursion-limit`). A terminal failure (exhausted budget, exhausted parks, a
|
|
263
|
+
grader or code state that fails) routes to `on_error` instead of failing the
|
|
264
|
+
run; recoverable rejections (invalid edge, unmet `requires`) keep the agent
|
|
265
|
+
in place. Declare `on_error` on every automated state and on bounded loops.
|
|
266
|
+
A **tool that throws** is neither: the call is answered with an error-status tool message carrying
|
|
202
267
|
the error, the agent stays in the state and can retry or switch tools, and
|
|
203
268
|
`on_error` never sees it (a park or a cancelled run still propagates).
|
|
204
269
|
- **Sub-workflows are tools.** Allow `archmax_workflow_<slug>` (slug verbatim)
|
|
@@ -226,10 +291,12 @@ states:
|
|
|
226
291
|
sub-run; fan out with parallel tool calls or `Promise.all` in a script
|
|
227
292
|
(bounds: depth 3, 4 concurrent). A child's human state parks the child;
|
|
228
293
|
a script's delegation cannot park and fails closed.
|
|
229
|
-
- **Choosing a mechanism.** Deterministic work
|
|
230
|
-
script.
|
|
231
|
-
|
|
232
|
-
|
|
294
|
+
- **Choosing a mechanism.** Deterministic work the agent triggers → an
|
|
295
|
+
`archmax_run` script. Deterministic work the graph runs at a fixed point (a
|
|
296
|
+
screen, a policy check, a record) → a code state. Delegated work that is itself
|
|
297
|
+
a process or reused across workflows → a sub-workflow. Judging work already
|
|
298
|
+
done → a grader state. Neither automated kind is callable by the agent (`task`
|
|
299
|
+
is disclosed nowhere and not grantable).
|
|
233
300
|
- **Prompt economy.** The static prompt + tool schemas are re-sent every
|
|
234
301
|
model call. The static part carries the workflow's `title` + `instructions`
|
|
235
302
|
and **no state of the graph**; a state's `instructions` and its **own**
|
|
@@ -245,14 +312,19 @@ states:
|
|
|
245
312
|
|
|
246
313
|
Only the state it is in. Every model call is handed that state's outgoing edges
|
|
247
314
|
and nothing else of the machine — no other state's slug, `title`, `summary`,
|
|
248
|
-
|
|
315
|
+
script, criteria or transitions, and no count of the states:
|
|
249
316
|
|
|
250
317
|
```
|
|
251
318
|
Transitions — choose one with `archmax_advance` when this state's work is done:
|
|
319
|
+
- to `check-policy` (code) — The decision is recorded in scratchpad/refund.json.
|
|
252
320
|
- to `review` (human decision node) — The decision is recorded and needs a person's approval.
|
|
321
|
+
- to `grade-reply` (grader) — The email is drafted in scratchpad/reply.md.
|
|
253
322
|
- to `closed` (terminal) — Nothing to refund; the case is answered.
|
|
254
323
|
```
|
|
255
324
|
|
|
325
|
+
A `(grader)` or `(code)` target runs on its own and may send the run straight
|
|
326
|
+
back with a note saying what to change.
|
|
327
|
+
|
|
256
328
|
Two rules follow, and they are the ones authors get wrong:
|
|
257
329
|
|
|
258
330
|
1. **Write the `description` for the source state, not the target.** The agent
|
|
@@ -260,12 +332,19 @@ Two rules follow, and they are the ones authors get wrong:
|
|
|
260
332
|
`The refund is over $50, or the customer has asked twice.` Not `Go to
|
|
261
333
|
refund-review.` — that tells a reader who already knows the graph something
|
|
262
334
|
they cannot use, and tells this reader nothing.
|
|
263
|
-
2. **Routing conditions cannot live downstream.** A target's `summary`
|
|
264
|
-
|
|
265
|
-
condition is "when the order is over 30 days old", it
|
|
335
|
+
2. **Routing conditions cannot live downstream.** A target's `summary` is never
|
|
336
|
+
disclosed to the state routing into it, nor its `instructions` across a
|
|
337
|
+
described edge. If the condition is "when the order is over 30 days old", it
|
|
338
|
+
belongs on the edge.
|
|
266
339
|
|
|
267
|
-
|
|
268
|
-
|
|
340
|
+
An **undescribed** edge (no `description`, or a blank one) routes on its target's
|
|
341
|
+
`instructions` instead, quoted under the edge's line as what the agent will do
|
|
342
|
+
once there: leave one undescribed only when those instructions already say when
|
|
343
|
+
it applies. It is a **load error** where the target has no instructions, on a
|
|
344
|
+
human state's transitions (the description is the button label), and into a
|
|
345
|
+
grader or code state (a grader's instructions are criteria the work is never
|
|
346
|
+
shown; a code state has none). A code state's own edges may go undescribed: its
|
|
347
|
+
script routes. There is no other way to see more of the graph.
|
|
269
348
|
|
|
270
349
|
## Governance
|
|
271
350
|
|
|
@@ -282,6 +361,14 @@ Closed by default; **deny beats allow, and no narrower level widens a denial.**
|
|
|
282
361
|
`essentialTools`. Any other tool needs an `allow`/`allow_always` entry. A
|
|
283
362
|
state entry naming a granted tool **narrows** it there, and one naming a
|
|
284
363
|
default tool the list omits grants it there. `task` is ungrantable (error).
|
|
364
|
+
- **In a grader or code state** the surface is what the state is granted (the
|
|
365
|
+
workflow-wide grant included), minus `write_todos`, `archmax_eval`,
|
|
366
|
+
`archmax_run`, `archmax_wait` and `archmax_reset` even when `allow_always` lists
|
|
367
|
+
them (naming one in the state's
|
|
368
|
+
own `tools.allow` is an error), plus one control set for both types:
|
|
369
|
+
`archmax_advance`, `archmax_raise`, `archmax_get_variables`,
|
|
370
|
+
`archmax_set_variables` and `archmax_get_history` — never `archmax_wait` or
|
|
371
|
+
`archmax_reset`.
|
|
285
372
|
- **Entries**: bare name; `{ tool, args: { <arg>: ["glob", …] } }` (matches
|
|
286
373
|
if any glob matches; `${{var}}` allowed). An argument the tool declares as a
|
|
287
374
|
path (else `file_path`) is canonicalized first; any other argument (a URL, an
|
|
@@ -303,8 +390,10 @@ Closed by default; **deny beats allow, and no narrower level widens a denial.**
|
|
|
303
390
|
in the prompt). `allow` adds, `forbid` subtracts, `allow: []` denies
|
|
304
391
|
nothing. A `tools.allow` entry may still narrow *within* an enabled bundle.
|
|
305
392
|
A state enabling no skill can run no script at all.
|
|
306
|
-
- **Scripts' `tools.*` calls** are governed per call
|
|
307
|
-
is bound like the model (grant every tool it
|
|
308
|
-
the
|
|
309
|
-
|
|
310
|
-
|
|
393
|
+
- **Scripts' `tools.*` calls** are governed per call against the state they
|
|
394
|
+
run in: an `archmax_run` script is bound like the model (grant every tool it
|
|
395
|
+
calls in the agent's state); a code state's script is bound by **its own**
|
|
396
|
+
state's grants (`tools`, `skills`, `mounts`) — there is no runtime authority.
|
|
397
|
+
`tools` holds exactly that state's surface: anything else is `undefined`.
|
|
398
|
+
Neither may read `workflows/**` or write a read-only mount. A refused call
|
|
399
|
+
rejects inside the script.
|
package/dist/cli/state-flow.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export interface StateFlowRenderer {
|
|
|
11
11
|
/**
|
|
12
12
|
* Build a renderer that writes an append-only, hierarchical state flow to
|
|
13
13
|
* `stream`. Assembly-time events (`interpreter-enabled`,
|
|
14
|
-
* `
|
|
14
|
+
* `graph-topology`, `workflow-reset`) are ignored — the CLI
|
|
15
15
|
* prints its own session header. The `advance` event only renders the agent's
|
|
16
16
|
* one-sentence `reason` (the target itself is shown by the following `state-leave`).
|
|
17
17
|
*/
|
package/dist/cli/state-flow.js
CHANGED
|
@@ -10,17 +10,17 @@
|
|
|
10
10
|
*
|
|
11
11
|
* The trail uses two indentation tiers so a session reads as a hierarchy:
|
|
12
12
|
* state changes (`state-enter`, `state-leave`) sit at the outer margin, and
|
|
13
|
-
* what happened *inside* a state (
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* events are dropped to keep the trail readable.
|
|
13
|
+
* what happened *inside* a state (a code state's script and its output, a
|
|
14
|
+
* grader's run, tool calls, the agent's own text, quoted) is indented beneath
|
|
15
|
+
* it. Code states are colour-coded blue, graders magenta. Assembly-time and
|
|
16
|
+
* high-frequency telemetry events are dropped to keep the trail readable.
|
|
17
17
|
*/
|
|
18
18
|
import { isChildSessionOf } from "../sessions/scope.js";
|
|
19
19
|
import { originLabel } from "../core/events.js";
|
|
20
20
|
import { ADVANCE_TOOL, RAISE_TOOL } from "../machine/tool-names.js";
|
|
21
21
|
import { exitCodeForVerdict } from "../testing/runner.js";
|
|
22
22
|
import { createStyle, icons } from "./style.js";
|
|
23
|
-
/** Indentation for per-state action lines (
|
|
23
|
+
/** Indentation for per-state action lines (an automated run, agent text). */
|
|
24
24
|
const ACTION_INDENT = " ";
|
|
25
25
|
/** Deeper indentation for output nested under an action (e.g. script stdout). */
|
|
26
26
|
const OUTPUT_INDENT = " ";
|
|
@@ -31,13 +31,12 @@ const LIST_INDENT = " ";
|
|
|
31
31
|
/**
|
|
32
32
|
* Build a renderer that writes an append-only, hierarchical state flow to
|
|
33
33
|
* `stream`. Assembly-time events (`interpreter-enabled`,
|
|
34
|
-
* `
|
|
34
|
+
* `graph-topology`, `workflow-reset`) are ignored — the CLI
|
|
35
35
|
* prints its own session header. The `advance` event only renders the agent's
|
|
36
36
|
* one-sentence `reason` (the target itself is shown by the following `state-leave`).
|
|
37
37
|
*/
|
|
38
38
|
export function createStateFlowRenderer(stream, styleOverride) {
|
|
39
39
|
const s = styleOverride ?? createStyle();
|
|
40
|
-
const phaseColor = (phase) => (phase === "before" ? s.blue : s.magenta);
|
|
41
40
|
const write = (line) => stream.write(`${line}\n`);
|
|
42
41
|
const writeAgentText = (text) => {
|
|
43
42
|
for (const line of text.split("\n"))
|
|
@@ -76,28 +75,22 @@ export function createStateFlowRenderer(stream, styleOverride) {
|
|
|
76
75
|
write(`${s.yellow(icons.warn)} ${event.state} ${s.dim(icons.arrow)} ${s.yellow(event.to)} ` +
|
|
77
76
|
s.dim(`(on_error: ${event.reason})`));
|
|
78
77
|
break;
|
|
79
|
-
case "
|
|
80
|
-
write(`${ACTION_INDENT}${
|
|
78
|
+
case "code-start":
|
|
79
|
+
write(`${ACTION_INDENT}${s.blue(`${icons.bullet} code`)} ${s.dim(event.script)}`);
|
|
81
80
|
break;
|
|
82
|
-
case "
|
|
81
|
+
case "code-output":
|
|
83
82
|
write(`${OUTPUT_INDENT}${s.dim(event.line)}`);
|
|
84
83
|
break;
|
|
85
|
-
case "
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
: event.verdict === "veto"
|
|
93
|
-
? s.red(icons.cross)
|
|
94
|
-
: s.yellow(icons.inProgress);
|
|
95
|
-
write(`${ACTION_INDENT}${mark} ${phaseColor(event.phase)(event.phase)} ` +
|
|
96
|
-
`${s.dim(`${event.verdict} — ${event.reason}${missing}`)}`);
|
|
84
|
+
case "code-result":
|
|
85
|
+
case "grader-result":
|
|
86
|
+
// A run that settled says nothing more: its move or its raise is the
|
|
87
|
+
// next line. Only a failure needs saying here.
|
|
88
|
+
if (event.status === "error") {
|
|
89
|
+
write(`${ACTION_INDENT}${s.red(`${icons.cross} ${event.type === "code-result" ? "code" : "grader"} failed`)} ${s.dim(event.reason ?? "")}`);
|
|
90
|
+
}
|
|
97
91
|
break;
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
write(`${ACTION_INDENT}${s.red(icons.cross)} ${s.red(`${event.phase} rejected`)} ${s.dim(event.reason)}`);
|
|
92
|
+
case "grader-start":
|
|
93
|
+
write(`${ACTION_INDENT}${s.magenta(`${icons.bullet} grader`)} ${s.dim("grading")}`);
|
|
101
94
|
break;
|
|
102
95
|
case "tool-called":
|
|
103
96
|
// The transition tool is reported by the state lines and the advance
|
|
@@ -171,12 +164,9 @@ export function createStateFlowRenderer(stream, styleOverride) {
|
|
|
171
164
|
break;
|
|
172
165
|
case "workflow-reset":
|
|
173
166
|
case "interpreter-enabled":
|
|
174
|
-
case "hooks-summary":
|
|
175
167
|
case "graph-topology":
|
|
176
168
|
case "agent-text-delta":
|
|
177
169
|
case "tool-result":
|
|
178
|
-
case "rubric-start":
|
|
179
|
-
case "rubric-result":
|
|
180
170
|
case "model-usage":
|
|
181
171
|
case "prompt-shaping":
|
|
182
172
|
// Lifecycle summaries and high-frequency (GUI-oriented) telemetry.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state-flow.js","sourceRoot":"","sources":["../../src/cli/state-flow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,WAAW,EAA2B,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAmC,MAAM,sBAAsB,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAE,KAAK,EAAc,MAAM,YAAY,CAAC;AAW5D,kEAAkE;AAClE,MAAM,aAAa,GAAG,MAAM,CAAC;AAC7B,iFAAiF;AACjF,MAAM,aAAa,GAAG,QAAQ,CAAC;AAC/B,mEAAmE;AACnE,MAAM,aAAa,GAAG,QAAQ,CAAC;AAC/B,sDAAsD;AACtD,MAAM,WAAW,GAAG,IAAI,CAAC;AAEzB;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CACrC,MAAuB,EACvB,aAAqB;IAErB,MAAM,CAAC,GAAG,aAAa,IAAI,WAAW,EAAE,CAAC;IACzC,MAAM,UAAU,GAAG,CAAC,KAAyB,EAAE,EAAE,CAAC,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IAC5F,MAAM,KAAK,GAAG,CAAC,IAAY,EAAE,E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iBAAiB,CAAC,CAAC;gBACpF,OAAO;YACT,CAAC;YACD,MAAM,IAAI,GAAG,CAAC,CAAa,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YACtF,KAAK,MAAM,CAAC,IAAI,MAAM;gBAAE,KAAK,CAAC,GAAG,WAAW,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YAChF,KAAK,MAAM,CAAC,IAAI,MAAM;gBAAE,KAAK,CAAC,GAAG,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YAClF,KAAK,MAAM,CAAC,IAAI,OAAO;gBAAE,KAAK,CAAC,GAAG,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACxF,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/cli/turn.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ export interface RunTurnInput {
|
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
36
|
* Report a turn's {@link Outcome}: an answer, a park (with what resumes it), a
|
|
37
|
-
* rejection, a failure the
|
|
37
|
+
* rejection, a failure the session raised, or a resume's result. Returns the exit
|
|
38
38
|
* code: a park is a success, a rejection or a failure is not.
|
|
39
39
|
*/
|
|
40
40
|
export declare function printOutcome(style: Style, machine: WorkflowMachine, sessionId: string, outcome: Outcome): number;
|
package/dist/cli/turn.js
CHANGED
|
@@ -100,7 +100,7 @@ function printParkMessage(style, reply) {
|
|
|
100
100
|
}
|
|
101
101
|
/**
|
|
102
102
|
* Report a turn's {@link Outcome}: an answer, a park (with what resumes it), a
|
|
103
|
-
* rejection, a failure the
|
|
103
|
+
* rejection, a failure the session raised, or a resume's result. Returns the exit
|
|
104
104
|
* code: a park is a success, a rejection or a failure is not.
|
|
105
105
|
*/
|
|
106
106
|
export function printOutcome(style, machine, sessionId, outcome) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `archmax_run` scripts carry their human-facing contract as a leading JSDoc
|
|
3
3
|
* block comment — the code-file analogue of a case file's `description`. Admin
|
|
4
|
-
* UIs display only that description.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* UIs display only that description. A code state's script is NOT covered by this convention:
|
|
5
|
+
* it is a hand-authored file whose only validation is that the referenced file
|
|
6
|
+
* exists and imports nothing foreign. This module is the canonical extractor so consumers never
|
|
7
7
|
* scrape comments themselves. It operates on source strings only (callers read
|
|
8
8
|
* the file through their configured backend) and never touches the filesystem.
|
|
9
9
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `archmax_run` scripts carry their human-facing contract as a leading JSDoc
|
|
3
3
|
* block comment — the code-file analogue of a case file's `description`. Admin
|
|
4
|
-
* UIs display only that description.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* UIs display only that description. A code state's script is NOT covered by this convention:
|
|
5
|
+
* it is a hand-authored file whose only validation is that the referenced file
|
|
6
|
+
* exists and imports nothing foreign. This module is the canonical extractor so consumers never
|
|
7
7
|
* scrape comments themselves. It operates on source strings only (callers read
|
|
8
8
|
* the file through their configured backend) and never touches the filesystem.
|
|
9
9
|
*/
|
|
@@ -79,7 +79,7 @@ export type AnyModelCallRequest = ModelRequest;
|
|
|
79
79
|
export type AnyToolCallHandler = ToolCallHandler;
|
|
80
80
|
/** The handler that runs the model for a generic model-call request. */
|
|
81
81
|
export type AnyModelCallHandler = (request: AnyModelCallRequest) => ModelCallResult | Promise<ModelCallResult>;
|
|
82
|
-
/** The framework runtime handed to
|
|
82
|
+
/** The framework runtime handed to middleware hooks (context, configurable, signal, store). */
|
|
83
83
|
export type FrameworkRuntime = Runtime;
|
|
84
84
|
export type { ToolMessage };
|
|
85
85
|
/**
|
|
@@ -103,19 +103,12 @@ export declare function asStructuredTools(tools: ModelCallRequest["tools"] | und
|
|
|
103
103
|
export declare function asModelCallResult(result: unknown, origin: string): ModelCallHookResult;
|
|
104
104
|
/**
|
|
105
105
|
* The `recursionLimit` a turn runs under when the caller names none. One invoke
|
|
106
|
-
* is one whole turn across states — every
|
|
107
|
-
* super-step — so this is
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
* {@link turnStepLimit} of its workflow's turn budget, never below this.
|
|
106
|
+
* is one whole turn across states — every model call, tool batch and automated
|
|
107
|
+
* state is a super-step — so this is LangGraph's bound on a whole turn: a
|
|
108
|
+
* caller's own `recursionLimit` replaces it, and a state's `maxTurns` and
|
|
109
|
+
* `maxParks` bound the states that declare them.
|
|
111
110
|
*/
|
|
112
111
|
export declare const DEFAULT_RECURSION_LIMIT = 400;
|
|
113
|
-
/**
|
|
114
|
-
* The step limit an invocation runs under when the caller names none: enough that
|
|
115
|
-
* a workflow's turn budget, and the error handler it routes to, run out first, so
|
|
116
|
-
* the governed bound ends the turn and the step limit only stops what it missed.
|
|
117
|
-
*/
|
|
118
|
-
export declare function turnStepLimit(maxModelCalls: number): number;
|
|
119
112
|
/** The input a Deep Agent graph is invoked with: messages plus any state channel. */
|
|
120
113
|
export type AgentInput = Parameters<DeepAgent["invoke"]>[0];
|
|
121
114
|
/** The settled state a Deep Agent graph resolves to. */
|
package/dist/core/deepagents.js
CHANGED
|
@@ -99,25 +99,12 @@ function describeModelResult(result) {
|
|
|
99
99
|
// --- Defaults -----------------------------------------------------------------
|
|
100
100
|
/**
|
|
101
101
|
* The `recursionLimit` a turn runs under when the caller names none. One invoke
|
|
102
|
-
* is one whole turn across states — every
|
|
103
|
-
* super-step — so this is
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
* {@link turnStepLimit} of its workflow's turn budget, never below this.
|
|
102
|
+
* is one whole turn across states — every model call, tool batch and automated
|
|
103
|
+
* state is a super-step — so this is LangGraph's bound on a whole turn: a
|
|
104
|
+
* caller's own `recursionLimit` replaces it, and a state's `maxTurns` and
|
|
105
|
+
* `maxParks` bound the states that declare them.
|
|
107
106
|
*/
|
|
108
107
|
export const DEFAULT_RECURSION_LIMIT = 400;
|
|
109
|
-
/** Graph steps one model call takes, with a step to spare (an advance cycle measures about 7). */
|
|
110
|
-
const STEPS_PER_MODEL_CALL = 8;
|
|
111
|
-
/** Model calls past the turn budget an `on_error` handler may make before the step limit stops it. */
|
|
112
|
-
const HANDLER_CALLS = 10;
|
|
113
|
-
/**
|
|
114
|
-
* The step limit an invocation runs under when the caller names none: enough that
|
|
115
|
-
* a workflow's turn budget, and the error handler it routes to, run out first, so
|
|
116
|
-
* the governed bound ends the turn and the step limit only stops what it missed.
|
|
117
|
-
*/
|
|
118
|
-
export function turnStepLimit(maxModelCalls) {
|
|
119
|
-
return Math.max(DEFAULT_RECURSION_LIMIT, (maxModelCalls + HANDLER_CALLS) * STEPS_PER_MODEL_CALL);
|
|
120
|
-
}
|
|
121
108
|
/**
|
|
122
109
|
* Narrow a compiled graph to {@link CompiledAgentGraph}. The governed and plain
|
|
123
110
|
* graphs' declared state generics differ, so neither is assignable to a shared
|