@archmax-ai/harness 0.2.0 → 0.3.0

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.
Files changed (89) hide show
  1. package/README.md +11 -2
  2. package/dist/authoring-skill/archmax-harness/SKILL.md +12 -4
  3. package/dist/authoring-skill/archmax-harness/references/backend-integration.md +6 -2
  4. package/dist/authoring-skill/archmax-harness/references/cases.md +2 -1
  5. package/dist/authoring-skill/archmax-harness/references/hook-and-test-scripts.md +5 -4
  6. package/dist/authoring-skill/archmax-harness/references/hooks-and-scripts.md +5 -2
  7. package/dist/authoring-skill/archmax-harness/references/wiring.md +10 -1
  8. package/dist/authoring-skill/archmax-harness/references/workflow-schema.md +38 -4
  9. package/dist/authoring-skill/archmax-harness/references/workflow-yaml.md +12 -2
  10. package/dist/cli/state-flow.js +15 -3
  11. package/dist/cli/state-flow.js.map +1 -1
  12. package/dist/cli/turn.d.ts +4 -4
  13. package/dist/cli/turn.js +27 -4
  14. package/dist/cli/turn.js.map +1 -1
  15. package/dist/cli.js +6 -2
  16. package/dist/cli.js.map +1 -1
  17. package/dist/core/events.d.ts +10 -0
  18. package/dist/core/events.js +3 -0
  19. package/dist/core/events.js.map +1 -1
  20. package/dist/core/platform-prompt.generated.js +1 -1
  21. package/dist/core/platform-prompt.generated.js.map +1 -1
  22. package/dist/index.d.ts +3 -1
  23. package/dist/index.js.map +1 -1
  24. package/dist/kernel/kernel.d.ts +2 -2
  25. package/dist/kernel/kernel.js +3 -2
  26. package/dist/kernel/kernel.js.map +1 -1
  27. package/dist/machine/machine.js +5 -4
  28. package/dist/machine/machine.js.map +1 -1
  29. package/dist/machine/tool-names.d.ts +4 -1
  30. package/dist/machine/tool-names.js +6 -1
  31. package/dist/machine/tool-names.js.map +1 -1
  32. package/dist/public/spec.d.ts +2 -2
  33. package/dist/public/spec.js +2 -2
  34. package/dist/public/spec.js.map +1 -1
  35. package/dist/sandbox/executor.d.ts +7 -0
  36. package/dist/sandbox/executor.js +11 -4
  37. package/dist/sandbox/executor.js.map +1 -1
  38. package/dist/sandbox/prelude.js +35 -5
  39. package/dist/sandbox/prelude.js.map +1 -1
  40. package/dist/sandbox/ptc-gateway.d.ts +7 -0
  41. package/dist/sandbox/ptc-gateway.js +12 -1
  42. package/dist/sandbox/ptc-gateway.js.map +1 -1
  43. package/dist/sandbox/tools.js +10 -2
  44. package/dist/sandbox/tools.js.map +1 -1
  45. package/dist/sessions/resume.d.ts +29 -2
  46. package/dist/sessions/resume.js +16 -2
  47. package/dist/sessions/resume.js.map +1 -1
  48. package/dist/sessions/summary.d.ts +8 -0
  49. package/dist/sessions/summary.js +3 -1
  50. package/dist/sessions/summary.js.map +1 -1
  51. package/dist/testing/assertions.js +18 -1
  52. package/dist/testing/assertions.js.map +1 -1
  53. package/dist/testing/case-document.d.ts +6 -0
  54. package/dist/testing/case-document.js.map +1 -1
  55. package/dist/testing/case-schema.js +42 -0
  56. package/dist/testing/case-schema.js.map +1 -1
  57. package/dist/testing/driver.js +3 -0
  58. package/dist/testing/driver.js.map +1 -1
  59. package/dist/workflow/control-tools.d.ts +30 -4
  60. package/dist/workflow/control-tools.js +84 -3
  61. package/dist/workflow/control-tools.js.map +1 -1
  62. package/dist/workflow/governance.js +7 -8
  63. package/dist/workflow/governance.js.map +1 -1
  64. package/dist/workflow/middleware.js +7 -1
  65. package/dist/workflow/middleware.js.map +1 -1
  66. package/dist/workflow/parks.js +8 -6
  67. package/dist/workflow/parks.js.map +1 -1
  68. package/dist/workflow/session-view.d.ts +5 -0
  69. package/dist/workflow/session-view.js.map +1 -1
  70. package/dist/workflow/state.d.ts +22 -2
  71. package/dist/workflow/state.js +21 -2
  72. package/dist/workflow/state.js.map +1 -1
  73. package/dist/workflow/sub-workflow.d.ts +4 -2
  74. package/dist/workflow/sub-workflow.js +9 -3
  75. package/dist/workflow/sub-workflow.js.map +1 -1
  76. package/dist/workflow/tool-service.js +11 -1
  77. package/dist/workflow/tool-service.js.map +1 -1
  78. package/dist/workflow/turn-boundary.d.ts +1 -1
  79. package/dist/workflow/turn-boundary.js +4 -1
  80. package/dist/workflow/turn-boundary.js.map +1 -1
  81. package/package.json +1 -1
  82. package/skills/archmax-harness/SKILL.md +12 -4
  83. package/skills/archmax-harness/references/backend-integration.md +6 -2
  84. package/skills/archmax-harness/references/cases.md +2 -1
  85. package/skills/archmax-harness/references/hook-and-test-scripts.md +5 -4
  86. package/skills/archmax-harness/references/hooks-and-scripts.md +5 -2
  87. package/skills/archmax-harness/references/wiring.md +10 -1
  88. package/skills/archmax-harness/references/workflow-schema.md +38 -4
  89. package/skills/archmax-harness/references/workflow-yaml.md +12 -2
@@ -1 +1 @@
1
- {"version":3,"file":"tool-service.js","sourceRoot":"","sources":["../../src/workflow/tool-service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAK/C,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACb,kBAAkB,EAClB,WAAW,EACX,kBAAkB,EAClB,UAAU,EACV,OAAO,EACP,UAAU,EACV,kBAAkB,EAClB,mBAAmB,EACnB,SAAS,GACV,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAwC,MAAM,YAAY,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAA8B,MAAM,mBAAmB,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAsB1D;;;;;;;;;GASG;AACH,SAAS,QAAQ,CAAC,KA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,mBAAmB,CAAC,OAAO,CAAC,EAAE,CAAC;gBACnD,CAAC,CAAC,CAAC;gBACH,OAAO,OAAO,CAAC,OAAO,CAAC;YACzB,CAAC;YACD;gBACE,OAAO,SAAS,CAAC;QACrB,CAAC;IACH,CAAC;IAED,OAAO;QACL,cAAc;QACd,aAAa;QACb,iBAAiB;QACjB,UAAU;QACV,iBAAiB;QACjB,kBAAkB;QAClB,cAAc,CAAC,SAAiB;YAC9B,WAAW,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAChC,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * The turn boundary: what happens once per invoke, before any model call.
3
3
  *
4
- * A turn boundary resets the turn's mechanics (rejected, iterations,
4
+ * A turn boundary resets the turn's mechanics (rejected, raised, iterations,
5
5
  * beforeDone, parkCounts, park records and phase, replyOnly, the turn budget)
6
6
  * and retains the conversation (position, entryState, variables, transcript,
7
7
  * trail, files). Every ingress that begins a turn arrives here; a park
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * The turn boundary: what happens once per invoke, before any model call.
3
3
  *
4
- * A turn boundary resets the turn's mechanics (rejected, iterations,
4
+ * A turn boundary resets the turn's mechanics (rejected, raised, iterations,
5
5
  * beforeDone, parkCounts, park records and phase, replyOnly, the turn budget)
6
6
  * and retains the conversation (position, entryState, variables, transcript,
7
7
  * trail, files). Every ingress that begins a turn arrives here; a park
@@ -45,6 +45,8 @@ export async function openTurn(ctx, state, runtime) {
45
45
  specHash: machine.specHash,
46
46
  status: WORKFLOW_STATUSES.rejected,
47
47
  rejected: reason,
48
+ // A failure an earlier turn raised does not describe this refusal.
49
+ raised: null,
48
50
  trigger,
49
51
  ...extra,
50
52
  jumpTo: "end",
@@ -102,6 +104,7 @@ export async function openTurn(ctx, state, runtime) {
102
104
  return {
103
105
  workflowState: position,
104
106
  rejected: null,
107
+ raised: null,
105
108
  iterations: {},
106
109
  beforeDone: {},
107
110
  parkCounts: {},
@@ -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,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archmax-ai/harness",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "description": "Agents can't reliably follow a process. archmax harness makes them: a governed layer over LangChain Deep Agents that enforces a declarative workflow state machine on every step.",
6
6
  "keywords": [
@@ -63,10 +63,17 @@ then verify. Do not write a file, validate, and discover the next file.
63
63
  `date` `date-time` `object` `array`) where the caller must build or read the
64
64
  value. The runtime holds typed entries at start, at `archmax_set_variables`
65
65
  and at completion ([`references/workflow-schema.md`](references/workflow-schema.md)).
66
+ Decide how the work can **fail**, too: the agent ends a session it cannot
67
+ complete with `archmax_raise({ code, reason })`, always on and only for
68
+ failure (a session that never raises is a success). Where a host branches
69
+ on why, name the codes in the `instructions` of the states that can hit
70
+ them; where a person must always be reached instead, forbid the tool in
71
+ that state.
66
72
  2. **Decide the file set** from the sketch: `workflow.yaml` always; one
67
73
  `hooks/<check>.js` per *deterministic* gate; one inline `rubric:` per
68
74
  *judgment* gate (tone, completeness); cases — one happy path per branch,
69
- one per hook veto path, one `decide:` per human state; a
75
+ one per hook veto path, one `decide:` per human state, one `raised:` per
76
+ failure a host branches on; a
70
77
  `skills/<capability>/` bundle only for data, an `archmax_run` script, or
71
78
  guidance two or more states share identically; `AGENTS.md` only for a
72
79
  workspace-wide persona.
@@ -98,8 +105,8 @@ then verify. Do not write a file, validate, and discover the next file.
98
105
  [`references/diagnostics.md`](references/diagnostics.md).
99
106
  2. Read **only** the files the diagnostics name. Edit once. Re-validate.
100
107
  3. When clean, `archmax test <slug> [filter]`. Read the failing case's verdict
101
- line: a **structural** miss (`reachedState`, `parked`, `succeeded`,
102
- `trail`) is a routing or governance defect — fix the routing state's
108
+ line: a **structural** miss (`reachedState`, `parked`, `raised`,
109
+ `succeeded`, `trail`) is a routing or governance defect — fix the routing state's
103
110
  `instructions`, the transition `description`s, or the `tools`/`skills`
104
111
  grants; a **content** miss (`reply`, `calledTool`, `grade`) is an
105
112
  `instructions` defect in the state that answered; a veto reason quoted in
@@ -232,7 +239,8 @@ archmax deliver <session> --trigger <id> [--variables '<json>'] # resume an ar
232
239
 
233
240
  `<workflow>` may be omitted when the workspace has one. Global `--root <dir>`
234
241
  (cwd default; `.env` loads from it), `--verbose` for raw events. Results on
235
- stdout, narration on stderr. Exit 0 done/parked, 1 failure, 2 usage. Dev from
242
+ stdout, narration on stderr. Exit 0 done/parked, 1 failure (a raise included:
243
+ `✖ failed` with the agent's code), 2 usage. Dev from
236
244
  the SDK checkout: `npm run dev -- <command…>`.
237
245
 
238
246
  ---
@@ -71,7 +71,8 @@ From `@archmax-ai/harness` (`src/index.ts`):
71
71
  | `WorkflowLoadError` | class | Thrown when the workflow spec (`workflow.yaml`) is missing/invalid (fails closed) |
72
72
  | `DEFAULT_WORKFLOW` | const | `"order-lookup"` |
73
73
  | `BUNDLED_AUTHORING_SKILL_DIR` | const | The packaged `dist/authoring-skill` directory holding `archmax-harness/` (`<dir>/archmax-harness/SKILL.md`). The example workspace is not shipped in `dist/`; clone the repo to use it. |
74
- | `WORKFLOW_STATUSES` | const | `running` \| `completed` \| `rejected` \| `awaiting_decision` (`awaitingDecision`) \| `awaiting_input` (`awaitingInput`) |
74
+ | `WORKFLOW_STATUSES` | const | `running` \| `completed` \| `failed` (the agent called `archmax_raise`) \| `rejected` \| `awaiting_decision` (`awaitingDecision`) \| `awaiting_input` (`awaitingInput`) |
75
+ | `SessionExit` | type | `Outcome.exit` / `DecideOutcome.exit` / `SessionSummary.exit`: `{ success: true }` on a completed turn, `{ success: false, code, reason }` on a failed one |
75
76
  | `isFinished`, `classifyStatus` | fn | The open/finished partition — a parked session is **open** |
76
77
  | `WorkflowLifecycleEvent`, `WorkflowEventHandler` | type | Event stream types |
77
78
  | `createWorkflowEventEmitter`, `renderEventLine` | fn | Event emitter + console formatter |
@@ -248,8 +249,10 @@ if (result.status === WORKFLOW_STATUSES.awaitingDecision && result.pendingDecisi
248
249
  // host-side assembly, and no need to re-read the spec.
249
250
  // When they pick:
250
251
  const outcome = await agent.workflow.decide(sessionId, { target: chosenTo, comment });
251
- // DecideOutcome: { status?, workflowState?, reparked, state?, reply, rejected?, messages }
252
+ // DecideOutcome: { status?, workflowState?, reparked, state?, reply, rejected?, exit?, messages }
252
253
  // `rejected` says why when status is "rejected"; Outcome from send() carries it too.
254
+ // `exit` is { success: false, code, reason } when the agent ended the run with
255
+ // archmax_raise (status "failed"), { success: true } when it completed.
253
256
  if (outcome.reparked) { /* parked again at another human state */ }
254
257
  }
255
258
  ```
@@ -396,6 +399,7 @@ Pass `onEvent`; every `WorkflowLifecycleEvent` carries a `level`
396
399
  | `hook-start` / `hook-output` / `hook-passed` / `hook-verdict` / `hook-rejected` | lifecycle hook activity + verdict (`ok`/`correct`/`veto`) |
397
400
  | `parked` / `decided` | human state parked / resolved (`{ state, sessionId, awaiting, to? }` — a human park carries no `callId`, since no call asked for it) |
398
401
  | `parked` (`awaiting: "input"`) / `delivered` | the agent parked the run (`{ state, sessionId, reason, resumeAt?, callId }` — the `archmax_wait` call) / an event resumed it (`{ state, trigger, to }`, where `to` is the same state) |
402
+ | `raised` | the agent ended the session as a failure (`{ state, sessionId, code, reason, callId }` — the `archmax_raise` call); a `state-leave` follows, and the outcome is `failed` |
399
403
  | `agent-text` | complete assistant message in a state (`{ state, text, messageId }` — always the id the message is stored under; absent only on a `partial: true` event from a failed turn) |
400
404
  | `agent-text-delta` | streaming text chunk (`{ state, text, messageId? }`) — flows for every run, even when the graph is driven with `invoke` |
401
405
  | `tool-called` / `tool-result` / `tool-blocked` | tool passed governance (`callId`, `args`) / settled (`callId`, `status`, `durationMs`, `output` preview) / denied. **Every** governed call, `archmax_advance` included — so a UI drawing a row per call draws one per transition; filter it if you already draw transitions from `advance`/`state-leave`. A tool that **throws** settles `status: "error"` with the error's message as `output` while the turn **continues**: the model reads the same message as the call's answer, and nothing is thrown out of `send` — read tool failures here |
@@ -26,7 +26,8 @@ message that leaves it parked), `decide: { to, comment? }`,
26
26
  `deliver: { trigger, variables? }`.
27
27
 
28
28
  Assertions (**structural** ones halt the case when they miss; later steps are
29
- reported `not-executed`): `succeeded: true`ˢ · `parked: true | decision | input | { channel?, state? }`ˢ ·
29
+ reported `not-executed`): `succeeded: true`ˢ (fails on a raise too) · `parked: true | decision | input | { channel?, state? }`ˢ ·
30
+ `raised: true | <code> | { code?, reason? }`ˢ (the agent ended the turn with `archmax_raise`; code exact, reason exact or `"/regex/flags"`) ·
30
31
  `reachedState: <slug>`ˢ (a committed non-trigger trail step) ·
31
32
  `trail: { to?, kind?, reason?, count }`ˢ (`kind`: trigger/agent/human/on_error) ·
32
33
  `noTraversal: true`ˢ · `triggerArrival: <id>`ˢ ·
@@ -578,7 +578,7 @@ error. The two actions:
578
578
 
579
579
  | Action | Shape | Meaning |
580
580
  | -------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
581
- | `send` | `send: "<message>"` | One user message — a plain string, nothing else (no transport fields; start conditions live at case scope). Runs the agent until it stops (final answer, park, or failure), under the case's declared trigger. Against a run **parked at a human state** it is a message instead: answered on a tool-free turn, leaving the run parked at the same state. |
581
+ | `send` | `send: "<message>"` | One user message — a plain string, nothing else (no transport fields; start conditions live at case scope). Runs the agent until it stops (final answer, park, or failure), under the case's declared trigger. Against a run **parked at a human state** it is a message instead: answered on a reply-only turn (every tool call refused), leaving the run parked at the same state. |
582
582
  | `decide` | `decide: { to, comment? }` | Resume a **parked** run: the simulated human picks the outgoing transition `to` (a state slug), optionally with a review comment (delivered to the agent as correction on `refine` edges). |
583
583
 
584
584
  ```yaml
@@ -612,8 +612,9 @@ failure in one of them **halts the case** — see
612
612
 
613
613
  | Assertion | Meaning |
614
614
  | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
615
- | `succeeded: true` | **Structural.** The run finished: not failed **and not parked**. |
615
+ | `succeeded: true` | **Structural.** The run finished: not failed **and not parked**, and the agent did not end it with `archmax_raise` (a raise fails here, naming its code). |
616
616
  | `parked: true` | **Structural.** The run is parked at a human state awaiting a decision. |
617
+ | `raised: true` / `raised: <code>` / `raised: { code?, reason? }` | **Structural.** The agent ended the turn with `archmax_raise({ code, reason })`. A string pins the code exactly; the mapping pins the code and matches the reason — exactly, or as a regex when written `"/pattern/flags"`. A miss names the code that was raised, or says the run did not raise. |
617
618
  | `variables: { expect, path?, locked? }` | Every named variable is set to the expected value — deep equality, so a structured expectation compares by value. `path` addresses into a value per name (`items.-1.sku` is the last element); `locked` asserts the lock state. |
618
619
  | `reachedState: <slug>` | **Structural.** A **committed** (non-trigger) audit-trail step entered the state — agent `archmax_advance`, human decision, `archmax_reset`, or `on_error` route. The trigger-arrival step never counts (it is recorded before the entry state's `before` gate runs, so a vetoed-entry run never "reaches" its start state). |
619
620
  | `reply: { includes?, excludes? }` | `includes`: substrings or `/pattern/flags` regex strings that must **all** match; `excludes`: none may match (leak checks — a refusal that quotes the data it refuses still leaks it). Each accepts a **single token or a list** (`includes: "ORD-1003"` works). Matched against the turn's **whole assistant transcript**, not just the final message (a parked run often closes with a short "moving on" message while the substantive answer came earlier). |
@@ -638,8 +639,8 @@ engine or in a lifecycle hook.
638
639
 
639
640
  ### Structural assertions halt the case
640
641
 
641
- A failed **structural** assertion (`succeeded`, `parked`, `reachedState`,
642
- `trail`, `noTraversal`, `triggerArrival`) stops the case where it stands: no
642
+ A failed **structural** assertion (`succeeded`, `parked`, `raised`,
643
+ `reachedState`, `trail`, `noTraversal`, `triggerArrival`) stops the case where it stands: no
643
644
  further `send`/`decide` is driven and no further assertion is evaluated. Once
644
645
  the run took a path the case did not describe, every later step would drive or
645
646
  grade the wrong run — a `decide` after a failed `parked` cannot succeed, and a
@@ -40,7 +40,7 @@ export default async function hook({ state, phase, trigger, variables, messages,
40
40
  | `variables` | read-only `name → value` map incl. `trigger`; structured values whole |
41
41
  | `messages` | last 24 messages, newest last, `{ role, text, toolCalls? }`; roles `user`/`assistant`/`tool`/`system`/`runtime` (a runtime note; match `role === "runtime"`, never a `[bracket]`) |
42
42
  | `from`, `to`, `reason` | `after` only: the attempted transition and the agent's reason |
43
- | `tools` | async camelCased bridge: `tools.readFile`, `tools.writeFile`, `tools.archmaxWorkflowEnrichOrder(...)`; no variable tools, no `task` |
43
+ | `tools` | async camelCased bridge: `tools.readFile`, `tools.writeFile`, `tools.archmaxWorkflowEnrichOrder(...)`; no control tools; a hook's lists every tool on the bridge, not only the state's |
44
44
 
45
45
  | Return | Effect |
46
46
  | --- | --- |
@@ -71,7 +71,10 @@ await Promise.all(orders.map(async (o) => {
71
71
  ```
72
72
 
73
73
  The calling state must allow every tool the script calls (here
74
- `archmax_workflow_enrich-order`).
74
+ `archmax_workflow_enrich-order`). A script's `tools` lists exactly the calling
75
+ state's tools, re-scoped at every evaluation (so after an advance the same REPL
76
+ lists the next state's); a tool the state does not offer is unlisted, and
77
+ calling it by name is refused with governance's reason.
75
78
 
76
79
  **Return into a variable.** A script's result reaches the model as one tool
77
80
  message and no further — it is not written to the variable store, and a script
@@ -74,8 +74,17 @@ agent.dispose(sessionId);
74
74
  `awaiting_input` → `deliver(sessionId, { trigger, variables, message? })` — the
75
75
  person's message travels with the firing; a park with `resumeAt` is the host
76
76
  scheduler's cue. A delegated child's park is named on `Outcome.delegation`.
77
+ - **How a session ended**: `Outcome.kind` is `completed`, `parked`, `failed` or
78
+ `rejected`. `failed` means the agent called `archmax_raise({ code, reason })`
79
+ because the work could not be done: `Outcome.exit` is
80
+ `{ success: false, code, reason }` (a completed turn: `{ success: true }`),
81
+ `SessionSummary.exit` carries the same while the session is `failed`, and a
82
+ later message is an ordinary new turn. `rejected` is governance ending it
83
+ (`Outcome.rejected`, no `exit`). A host that read "not rejected" as success
84
+ must check `failed` too.
77
85
  - **Events**: `onEvent` receives the one typed stream — `state-enter/leave`,
78
- `advance`, `hook-verdict`, `parked/decided`, `tool-called/result/blocked`
86
+ `advance`, `hook-verdict`, `parked/decided`, `raised` (the agent ended the
87
+ session failed: `state`, `code`, `reason`, `callId`), `tool-called/result/blocked`
79
88
  (every governed call, `archmax_advance` included, grouped by `callId`),
80
89
  `agent-text-delta`/`agent-text` (streaming by default, `messageId` groups
81
90
  chunks), `model-usage` (provider counts per turn), `title-set`, warnings.
@@ -9,6 +9,7 @@ optional `WORKFLOW.md` prose addendum) plus the surrounding workspace. Targets
9
9
  - [File shape](#file-shape)
10
10
  - [Root fields](#root-fields)
11
11
  - [States (`MachineState`)](#states-machinestate)
12
+ - [Ending a run as a failure: `archmax_raise`](#ending-a-run-as-a-failure-archmax_raise)
12
13
  - [Transitions](#transitions)
13
14
  - [Tool governance](#tool-governance)
14
15
  - [Skill governance](#skill-governance)
@@ -620,8 +621,8 @@ in the resolution channel and in where the run continues — a decision advances
620
621
  along the chosen edge, a delivery resumes the parked state.
621
622
 
622
623
  **Runtime control tools** carry the `archmax_` prefix — `archmax_advance`,
623
- `archmax_reset`, `archmax_wait`, `archmax_run`, `archmax_get_variables`,
624
- `archmax_set_variables` — and are the names to write in `tools.allow`,
624
+ `archmax_reset`, `archmax_wait`, `archmax_raise`, `archmax_run`,
625
+ `archmax_get_variables`, `archmax_set_variables` — and are the names to write in `tools.allow`,
625
626
  `tools.allow_always`, and the `forbid`/`forbid_always` lists. These are the only spellings:
626
627
  an entry naming an unprefixed variant governs a tool that does not exist,
627
628
  silently granting nothing. A host tool may never claim the prefix. Deep Agents' built-ins
@@ -638,6 +639,36 @@ silently granting nothing. A host tool may never claim the prefix. Deep Agents'
638
639
  - A state with **no transitions** is **terminal**: the run ends when the agent
639
640
  finishes its turn there; it cannot call `archmax_advance`.
640
641
 
642
+ ## Ending a run as a failure: `archmax_raise`
643
+
644
+ When the work **cannot be completed** — a system it depends on keeps failing, the
645
+ thing asked about does not exist — the agent calls
646
+ `archmax_raise({ code, reason })`. It is in every state (terminal ones included),
647
+ never declared, and only for failure: a session that ends without it is a
648
+ success.
649
+
650
+ - The call must be the **only** tool call in its message; one sent beside other
651
+ calls is refused, and the model may raise again on its own.
652
+ - The session ends **at once** with status `failed` (classified **finished**): no
653
+ further model call, no `on_error` route, no `before`/`after` hook (a terminal
654
+ state's included), no check of the trigger's `returns`. A rejection still
655
+ pending from earlier in the turn is replaced. The position stays where the
656
+ agent raised; the trail records no step.
657
+ - The host reads `Outcome.kind === "failed"` and `Outcome.exit`
658
+ (`{ success: false, code, reason }`); a completed turn carries
659
+ `exit: { success: true }`. `code` is the agent's own free-form token (≤ 64
660
+ characters, one line), so if hosts branch on particular codes, name them in
661
+ the state's `instructions` ("if the order does not exist, raise
662
+ `order-not-found`").
663
+ - A **child** session that raises fails its caller's delegation call with kind
664
+ `raised`, naming the code and reason; the caller may recover, route through
665
+ its own `on_error`, or raise in turn.
666
+ - Ban it with `tools: { forbid_always: [archmax_raise] }` (or one state's
667
+ `tools.forbid`) where the agent must not end the run itself — say, a state that
668
+ must always reach a person instead. Scripts and hooks cannot call it.
669
+ - Test it with the structural `raised` assertion; `succeeded: true` fails on a
670
+ raise.
671
+
641
672
  ## Transitions
642
673
 
643
674
  ```yaml
@@ -1357,7 +1388,9 @@ entries' keys are not knowable statically.
1357
1388
  ### A parked run may speak, never act
1358
1389
 
1359
1390
  A park does not end the conversation. Two moments get a **reply-only turn** — one
1360
- model call with *no tools bound at all*:
1391
+ model call whose only product is text. It is handed the parked state's tool list
1392
+ like any other call there (a transcript's tool calls and runtime notes need their
1393
+ definitions on some providers), and every call it makes is refused:
1361
1394
 
1362
1395
  - **The handoff.** Advancing into a human state always spends one, so the park
1363
1396
  carries a message saying what was done and that a person now holds it. It runs
@@ -1376,7 +1409,8 @@ always composed on a fresh turn from the transcript, under the workspace persona
1376
1409
  The kernel refuses every tool call made during one (rule `tool.reply-only`,
1377
1410
  ordered ahead of `tools.allow`, `allow_always`, the `archmax_*` controls and the
1378
1411
  scratchpad), so a customer writing "just approve it" gets an answer and the
1379
- reviewer still owns the edge.
1412
+ reviewer still owns the edge. A model that calls a tool instead of writing its
1413
+ message gets the refusal, and the run parks without a second model call.
1380
1414
 
1381
1415
  **What this means for authoring:** do not write state `instructions` that tell the
1382
1416
  agent to announce the handoff itself — the runtime turn does that, and having both
@@ -147,11 +147,20 @@ states:
147
147
  Bound a polling loop with `budget.maxParks` + `on_error`. `archmax_wait` is
148
148
  in every state, terminal ones included. Use a **human state** when a person
149
149
  picks the edge, `archmax_wait` when an event or time resumes the work.
150
+ - **Failing.** When the work cannot be completed, the agent calls
151
+ `archmax_raise({ code, reason })` (alone in its message; any state): the
152
+ session ends at once `failed`, with the agent's free-form `code` and
153
+ `reason` as the outcome's `exit` — no `on_error` route, no hook, no
154
+ `returns` check. A session that never raises is a success, so it is for
155
+ failure only. Forbid it (`forbid_always`, or a state's `forbid`) where the
156
+ agent must not end the run itself; a child that raises fails its caller's
157
+ call with kind `raised`.
150
158
  - **Human states** park with a record built from `instructions`, `evidence`
151
159
  and transition `type`s. The handoff spends one reply-only model call so the
152
160
  park carries a message — do **not** instruct the agent to announce the
153
161
  handoff (two messages). While parked, `archmax reply` is answered on a
154
- tool-free turn and re-parks unchanged; only `decide` moves the run. A
162
+ reply-only turn (every tool call refused) and re-parks unchanged; only
163
+ `decide` moves the run. A
155
164
  `refine` edge delivers the reviewer's comment as correction.
156
165
  - **Hooks.** `before`: ok/veto (veto rejects entry; on a start state, the
157
166
  run; routed through `on_error` if declared). `after`: ok/correct/veto on
@@ -232,7 +241,8 @@ Closed by default; **deny beats allow, and no narrower level widens a denial.**
232
241
  - **Always on, never declared**: `ls`, `read_file`, `write_file`,
233
242
  `edit_file`, `glob`, `grep`, `write_todos`, `archmax_eval`, `archmax_run`,
234
243
  and the controls `archmax_advance`, `archmax_reset`, `archmax_wait`,
235
- `archmax_get_variables`, `archmax_set_variables`. Any other tool needs an
244
+ `archmax_raise`, `archmax_get_variables`, `archmax_set_variables`. Any other
245
+ tool needs an
236
246
  `allow`/`allow_always` entry. An entry naming an always-on tool **narrows**
237
247
  it. `task` is ungrantable (error).
238
248
  - **Entries**: bare name; `{ tool, args: { <arg>: ["glob", …] } }` (matches