@archmax-ai/harness 1.1.0 → 2.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.
Files changed (71) hide show
  1. package/README.md +167 -170
  2. package/dist/agent.d.ts +2 -2
  3. package/dist/agent.js +2 -2
  4. package/dist/assembly/compose.js +2 -2
  5. package/dist/assembly/compose.js.map +1 -1
  6. package/dist/authoring-skill/archmax-harness/README.md +13 -15
  7. package/dist/authoring-skill/archmax-harness/SKILL.md +174 -264
  8. package/dist/authoring-skill/archmax-harness/references/backend-integration.md +244 -776
  9. package/dist/authoring-skill/archmax-harness/references/cases.md +178 -53
  10. package/dist/authoring-skill/archmax-harness/references/code-states-and-scripts.md +211 -100
  11. package/dist/authoring-skill/archmax-harness/references/diagnostics.md +57 -78
  12. package/dist/authoring-skill/archmax-harness/references/workflow-schema.md +613 -2006
  13. package/dist/core/deepagents.d.ts +1 -2
  14. package/dist/core/deepagents.js +1 -2
  15. package/dist/core/deepagents.js.map +1 -1
  16. package/dist/kernel/kernel.d.ts +3 -2
  17. package/dist/kernel/kernel.js +8 -4
  18. package/dist/kernel/kernel.js.map +1 -1
  19. package/dist/machine/lint-spec.js +6 -16
  20. package/dist/machine/lint-spec.js.map +1 -1
  21. package/dist/machine/machine.d.ts +8 -10
  22. package/dist/machine/machine.js +19 -13
  23. package/dist/machine/machine.js.map +1 -1
  24. package/dist/machine/spec-schema.d.ts +1 -4
  25. package/dist/machine/spec-schema.js +84 -47
  26. package/dist/machine/spec-schema.js.map +1 -1
  27. package/dist/machine/tool-names.d.ts +24 -34
  28. package/dist/machine/tool-names.js +43 -63
  29. package/dist/machine/tool-names.js.map +1 -1
  30. package/dist/machine/types.d.ts +11 -10
  31. package/dist/machine/types.js.map +1 -1
  32. package/dist/public/spec.d.ts +5 -5
  33. package/dist/public/spec.js +5 -5
  34. package/dist/public/spec.js.map +1 -1
  35. package/dist/validate/validate.js +3 -3
  36. package/dist/validate/validate.js.map +1 -1
  37. package/dist/workflow/automated.js +6 -1
  38. package/dist/workflow/automated.js.map +1 -1
  39. package/dist/workflow/control-tools.js +0 -2
  40. package/dist/workflow/control-tools.js.map +1 -1
  41. package/dist/workflow/grader-state.d.ts +2 -2
  42. package/dist/workflow/grader-state.js +5 -15
  43. package/dist/workflow/grader-state.js.map +1 -1
  44. package/dist/workflow/middleware.js +2 -26
  45. package/dist/workflow/middleware.js.map +1 -1
  46. package/dist/workflow/on-error.js +0 -1
  47. package/dist/workflow/on-error.js.map +1 -1
  48. package/dist/workflow/parks.js +0 -1
  49. package/dist/workflow/parks.js.map +1 -1
  50. package/dist/workflow/render-prompt.d.ts +4 -5
  51. package/dist/workflow/render-prompt.js +24 -27
  52. package/dist/workflow/render-prompt.js.map +1 -1
  53. package/dist/workflow/state.d.ts +0 -9
  54. package/dist/workflow/state.js +0 -3
  55. package/dist/workflow/state.js.map +1 -1
  56. package/dist/workflow/turn-boundary.js +0 -1
  57. package/dist/workflow/turn-boundary.js.map +1 -1
  58. package/package.json +1 -2
  59. package/skills/archmax-harness/README.md +13 -15
  60. package/skills/archmax-harness/SKILL.md +174 -264
  61. package/skills/archmax-harness/references/backend-integration.md +244 -776
  62. package/skills/archmax-harness/references/cases.md +178 -53
  63. package/skills/archmax-harness/references/code-states-and-scripts.md +211 -100
  64. package/skills/archmax-harness/references/diagnostics.md +57 -78
  65. package/skills/archmax-harness/references/workflow-schema.md +613 -2006
  66. package/dist/authoring-skill/archmax-harness/references/code-state-and-test-scripts.md +0 -1424
  67. package/dist/authoring-skill/archmax-harness/references/wiring.md +0 -119
  68. package/dist/authoring-skill/archmax-harness/references/workflow-yaml.md +0 -402
  69. package/skills/archmax-harness/references/code-state-and-test-scripts.md +0 -1424
  70. package/skills/archmax-harness/references/wiring.md +0 -119
  71. package/skills/archmax-harness/references/workflow-yaml.md +0 -402
package/README.md CHANGED
@@ -56,209 +56,206 @@ npx skills add archmax-ai/harness
56
56
 
57
57
  ## Quickstart
58
58
 
59
- ### A workspace
59
+ A refund desk in four states. The agent decides the refund and drafts the email, a script checks
60
+ the decision against the policy, a grader checks the email, and the agent sends it. The complete
61
+ example is in [`examples/refund/`](examples/refund/).
60
62
 
61
63
  ```
62
- my-workspace/
63
- ├── AGENTS.md # persona
64
- ├── workflows/order-lookup/
65
- │ ├── workflow.yaml # the enforced state machine
66
- │ ├── WORKFLOW.md # optional prose addendum
67
- │ ├── scripts/screen-request.js # code-state scripts, run by the runtime
68
- │ └── tests/*.test.yaml # cases for `archmax test`
69
- ├── skills/<slug>/ # skill bundles: SKILL.md, assets/, scripts/
70
- └── sessions/ # default session store (gitignored)
64
+ refund/
65
+ ├── index.js # your program: the host tools and the agent
66
+ ├── tools.js
67
+ └── workflows/refund/
68
+ ├── workflow.yaml # the process, enforced
69
+ └── scripts/check-decision.js # the deterministic check
71
70
  ```
72
71
 
72
+ ### The workflow
73
+
73
74
  ```yaml
74
- # workflows/order-lookup/workflow.yaml (excerpt)
75
- title: Order lookup
76
- instructions: Only ever disclose the requester's own company's orders.
77
- runtime: { engine: archmax-harness, version: "3" }
78
- tools:
79
- allow_always: [ls, read_file, write_file, edit_file, glob, grep, copy_file,
80
- move_file, remove_file, write_todos, archmax_eval, archmax_run]
81
- # granted in every state. Without this key a
82
- # workflow gets these default tools; declared,
83
- # it gets exactly what it lists
84
- forbid_always: [archmax_reset] # denied in every state; deny beats allow
85
- skills: { allow_always: [order-data] } # enabled in every state; a state's own
86
- # `skills.allow` adds, `skills.forbid` subtracts
87
- mounts: { allow_always: [reference] } # which STATES reach a host-governed mount;
88
- # a grant may say `access: read` or `read_write`,
89
- # and only `read_write` lets this workflow write it
75
+ # workflows/refund/workflow.yaml
76
+ title: Refund request
77
+ instructions: Decide only from what lookup_customer returns; never guess an order.
90
78
 
91
79
  states:
92
- screen-request: # a code state: the runtime runs its script on
93
- type: code # entry, with no model call, and the script moves
94
- script: scripts/screen-request.js # the session with tools.archmax_advance
80
+ decide:
95
81
  triggers:
96
82
  manual:
97
- transitions: # its script routes, so a code state's own edges
98
- # may go undescribed
99
- - to: identify-case
100
- description: The requester is known and asks about their own company's orders.
101
- - to: decline
102
- description: The request names no known requester.
103
- identify-case:
104
- instructions: Classify the request and archmax_advance to the matching path.
105
- transitions: # the agent is shown this state's edges and nothing
106
- # else of the graph: it routes on each description,
107
- # or, where an edge has none, on the target's
108
- # instructions
109
- - to: orders-question
110
- description: The user is asking about orders, status, shipping, or tracking.
111
- orders-question: # no transitions: terminal, so a live answer
112
- # ends where it is given
113
- instructions: Answer from skills/order-data/assets/orders.json.
114
- # no skills block: the workflow's grant reaches
115
- # here, and enabling a bundle is the whole grant
116
- enrich-order:
117
- triggers:
118
- enrichment_requested: # a host event: no person is waiting on this path
119
- skills: { allow: [order-enrichment] } # the fan-out script's bundle
120
- tools: { allow: [archmax_workflow_enrich-order] } # delegation is granted by name
83
+ requires: [email]
84
+ tools:
85
+ allow: [lookup_customer]
121
86
  instructions: >-
122
- Run skills/order-enrichment/scripts/enrich-orders.js with archmax_run, record
123
- its result as `enrichments`, then archmax_advance to review-enrichment. If a
124
- note sends it back, fix what it names.
87
+ Look the customer up with lookup_customer, using the `email` variable. A
88
+ refund is approved only when their order is delivered; otherwise it is
89
+ denied. Record the decision with archmax_set_variables as `decision`
90
+ (approved or denied), write the email to the customer in
91
+ scratchpad/email.md, then advance to check-decision. If you are sent
92
+ back, fix what the note says and advance again.
125
93
  transitions:
126
- - to: review-enrichment
127
- description: Every order has been enriched and `enrichments` is recorded.
128
- review-enrichment: # a grader state: an isolated grader judges the work
129
- type: grader # against these criteria and decides the edge
94
+ - to: check-decision
95
+ description: The decision is recorded and the email is drafted.
96
+
97
+ check-decision:
98
+ type: code
99
+ script: scripts/check-decision.js
100
+ tools:
101
+ allow: [lookup_customer]
102
+ transitions:
103
+ - to: review-email
104
+ description: The decision matches the refund policy.
105
+ - to: decide
106
+ description: The decision contradicts the refund policy.
107
+
108
+ review-email:
109
+ type: grader
130
110
  instructions: >-
131
- Check `enrichments` against `orders_to_enrich` and each returned file.
132
- Correct: advance to enrichment-reported. Wrong: send them back naming what
133
- to fix. After two send-backs, raise enrichment-incorrect.
111
+ Read scratchpad/email.md and the `decision` variable. Approve the email
112
+ when it is polite, states the decision plainly and names the order.
113
+ Otherwise send it back, saying exactly what to change.
134
114
  transitions:
135
- - to: enrichment-reported
136
- description: Every requested order has exactly one enrichment, and each matches its file.
137
- - to: enrich-order
138
- description: The enrichments are incomplete or do not match their files; send them back.
139
- # decline, enrichment-reported: terminal states that tell the person why, and
140
- # summarize the approved enrichments
115
+ - to: send
116
+ description: The email is ready to send.
117
+ - to: decide
118
+ description: The email needs changes.
119
+
120
+ send:
121
+ tools:
122
+ allow: [send_email]
123
+ instructions: >-
124
+ Send scratchpad/email.md to the customer at `email` with send_email, then
125
+ say in one sentence that it was sent.
141
126
  ```
142
127
 
143
- Grader and code states are **automated states**: the runtime runs them on entry, with no model
144
- call of the session's agent, so a chain of code states costs nothing. A code state's script
145
- (`workflows/<slug>/scripts/`) runs in the sandbox; a grader is an isolated subagent whose system
146
- prompt is the state's `instructions`. Both read the session with `archmax_get_history`: its whole
147
- transcript, tool results included, and its trail. Each is offered exactly its own state's tools,
148
- and each leaves the way every state does: `archmax_advance` along one of its transitions, whose
149
- reason reaches the next state as a note (a send-back is the correction the agent reads), or
150
- `archmax_raise` to end the session as failed. A check is a state on the graph, in front of the
151
- work or behind it, and an edge into one always carries a description: a grader's instructions are
152
- its criteria, and a code state has none. A grader suits work the agent hands on, such as the
153
- enrichments above, rather than a live answer: everything the agent says in a turn reaches the person,
154
- a draft sent back included. Both live on the authoring plane, so the agent they check can neither
155
- read nor call them. See
156
- [grader and code states](https://harness.archmax.ai/guides/automated-states/).
157
-
158
- A trigger may also declare the contract a caller relies on: what a firing must supply and what the
159
- session guarantees when it completes. A delegating workflow, a host's MCP tool and a start form all
160
- read the same declaration, and the runtime holds it at the boundary:
161
-
162
- ```yaml
163
- states:
164
- intake:
165
- triggers:
166
- manual:
167
- description: Refund one order and report what was refunded. # for callers, not the agent
168
- requires:
169
- - order_id # a bare name is untyped
170
- - { name: due, type: date, minimum: today, description: The day the refund is due. }
171
- - { name: contact, type: string, format: email } # a rule beside the type
172
- returns:
173
- - { name: total, type: number, minimum: 0, description: Refunded amount in EUR. }
128
+ Each state is one step of the process, and the agent only ever sees the step it is in: that
129
+ state's instructions, its tools and the transitions out of it, each described so it can choose
130
+ between them. It moves on by calling `archmax_advance`, and the runtime refuses any edge the state does not
131
+ declare. A state with no transitions, like `send`, is where the session ends.
132
+
133
+ Two of the states run without the agent. **`check-decision` is a code state**: the runtime runs
134
+ its script on entry, with no model call. **`review-email` is a grader state**: an isolated
135
+ subagent judges the email against the state's instructions. Both reach only their own state's
136
+ tools, and both decide the same way the agent does, with `archmax_advance`. A send-back reaches the
137
+ agent as a note it reads before trying again.
138
+
139
+ ### The check
140
+
141
+ ```js
142
+ // workflows/refund/scripts/check-decision.js
143
+ /** A refund is due only for a delivered order: any other decision goes back to the agent. */
144
+ export default async function ({ variables, tools }) {
145
+ const customer = JSON.parse(await tools.lookup_customer({ email: variables.email }));
146
+ const order = customer?.order;
147
+ const due = order?.status === "delivered" ? "approved" : "denied";
148
+
149
+ if (variables.decision === due) {
150
+ await tools.archmax_advance({
151
+ to: "review-email",
152
+ reason: `The refund is ${due}, as the policy requires.`,
153
+ });
154
+ } else {
155
+ await tools.archmax_advance({
156
+ to: "decide",
157
+ reason: `Order ${order?.id ?? "(none)"} is ${order?.status ?? "unknown"}, so the refund must be ${due}.`,
158
+ });
159
+ }
160
+ }
174
161
  ```
175
162
 
176
- A start whose `due` is not a real `YYYY-MM-DD` day, or is in the past, or whose `contact` is not an
177
- email address, is refused before any model call, and a session that finishes with `total` not a
178
- non-negative number is rejected. Rules (`format`, `pattern`, `minLength`/`maxLength`, `enum`,
179
- `minimum`/`maximum`, `minItems`/`maxItems`, `accept`, `maxSize`) are held wherever the type is, and a
180
- `pattern` runs in a linear-time RE2 engine, never a backtracking `RegExp`. One that finishes with `total` unset is
181
- rejected too, unless it runs as a sub-workflow: then its caller gets `total` empty (`null`), plus a
182
- `note` naming it. A return is owed only when the session finishes, and a seed of one lands unlocked. `signatureJsonSchema` on
183
- `@archmax-ai/harness/spec` turns the same signature, rules included, into a JSON Schema. See
184
- [triggers](https://harness.archmax.ai/guides/triggers/#typing-a-signature) and
185
- [rules](https://harness.archmax.ai/reference/machine-spec/#rules).
186
-
187
- An entry typed `file` takes a path from the workspace root. A host hands one in with
188
- `send(sessionId, { message, files: { invoice: { name, content } } })`, or the CLI with
189
- `--file invoice=./invoice.pdf`, and the file lands in the session's `scratchpad/attachments/`. A
190
- sub-workflow is its own session with its own files, so a `file` argument is copied into the child,
191
- and a `file` return is copied back under a name that never overwrites the caller's files. See
192
- [passing files](https://harness.archmax.ai/guides/sub-workflows/#passing-files). The child's
193
- session id is `<parent>~<n>`, `n` the dispatch's number in its caller, and a host tool called in
194
- the child is handed that id as `ToolContext.sessionId`, so a host that stores session files itself
195
- keys them under the child's `<sessionId>/`, not its caller's.
196
-
197
- `examples/customer-support/` in this repository is a complete reference workspace.
163
+ The policy lives in code, so it holds whatever the model says. When the agent records the wrong
164
+ decision, the script sends it back with the reason, before anyone grades the email.
198
165
 
199
- ### The CLI
166
+ ### Running it
200
167
 
201
168
  ```bash
202
- npx archmax run order-lookup "Which orders are delayed for Acme?" --root ./my-workspace
203
- npx archmax run reconcile "Reconcile this" --file invoice=./invoice.pdf # hand the session a file
204
- npx archmax test order-lookup --root ./my-workspace # run the workflow's cases
205
- npx archmax validate order-lookup --root ./my-workspace # static checks, no model calls
206
- npx archmax sessions --root ./my-workspace # list durable sessions
207
- npx archmax decide <session> --to approved # resume a session parked at a human state
208
- npx archmax reply <session> "Any update?" # answer a parked session; it stays parked
209
- npx archmax deliver <session> --trigger email_reply # resume a session parked with archmax_wait
169
+ npm install @archmax-ai/harness langchain zod
210
170
  ```
211
171
 
212
- Results go to stdout and the state flow to stderr. Exit 0 means done or parked, 1 a failure
213
- (including a session the agent ended with `archmax_raise`), 2 a usage error. See the
214
- [CLI reference](https://harness.archmax.ai/reference/cli/).
172
+ `lookup_customer` and `send_email` are your systems, passed in as ordinary LangChain tools:
215
173
 
216
- ### The library
174
+ ```js
175
+ // tools.js
176
+ import { tool } from "langchain";
177
+ import { z } from "zod";
178
+
179
+ const customers = {
180
+ "ann@example.com": { name: "Ann", order: { id: "ORD-1001", status: "delivered" } },
181
+ "bob@example.com": { name: "Bob", order: { id: "ORD-1002", status: "shipped" } },
182
+ };
183
+
184
+ export const lookupCustomer = tool(async ({ email }) => JSON.stringify(customers[email] ?? null), {
185
+ name: "lookup_customer",
186
+ description: "Look up a customer and their latest order by email address.",
187
+ schema: z.object({ email: z.string() }),
188
+ });
217
189
 
218
- ```ts
190
+ export const sendEmail = tool(
191
+ async ({ to, body }) => {
192
+ console.log(`To ${to}:\n${body}`);
193
+ return "sent";
194
+ },
195
+ {
196
+ name: "send_email",
197
+ description: "Send an email to the customer.",
198
+ schema: z.object({ to: z.string(), body: z.string() }),
199
+ },
200
+ );
201
+ ```
202
+
203
+ ```js
204
+ // index.js
219
205
  import { createAgent } from "@archmax-ai/harness";
206
+ import { lookupCustomer, sendEmail } from "./tools.js";
220
207
 
221
208
  const agent = await createAgent({
222
- workflow: "order-lookup",
223
- workspace: { rootDir: "./my-workspace" },
209
+ workflow: "refund",
210
+ tools: [lookupCustomer, sendEmail],
211
+ workspace: { rootDir: import.meta.dirname },
224
212
  });
225
213
 
226
- // A turn, a decision, a reply or a delivery: one call, one Outcome.
227
- const outcome = await agent.workflow!.send("session-42", {
228
- message: "Which orders are delayed for Acme?",
214
+ const outcome = await agent.workflow.send("ticket-1001", {
215
+ message: "Hi, I'd like a refund for my last order.",
216
+ variables: { email: "ann@example.com" },
229
217
  });
230
- console.log(outcome.kind, outcome.state, outcome.reply); // "parked" "refund-review" "..."
231
218
 
232
- if (outcome.kind === "parked" && outcome.parkedChannel === "decision") {
233
- await agent.workflow!.decide("session-42", { target: "approved", comment: "Within policy." });
234
- }
219
+ console.log(outcome.kind); // "completed"
220
+ console.log(outcome.auditTrail.map((step) => `${step.kind} → ${step.to}`).join("\n"));
221
+ ```
222
+
223
+ ```text
224
+ completed
225
+ trigger → decide
226
+ agent → check-decision
227
+ code → review-email
228
+ grader → send
229
+ ```
230
+
231
+ One call is one turn, and `outcome` says how it ended: `completed`, `parked` (waiting on a person
232
+ or an event), or `failed` (the agent called `archmax_raise` because the work cannot be done). The
233
+ trail records every move and who made it. Sessions are durable, under `sessions/` by default, so
234
+ `send` with the same id continues the conversation.
235
+
236
+ ### The CLI
237
+
238
+ A workflow that needs only the harness's own tools runs from the command line too. The reference
239
+ workspace [`examples/customer-support/`](examples/customer-support/) is one, and it is the suite
240
+ the end-to-end tests run against a real model:
241
+
242
+ ```bash
243
+ npx archmax run order-lookup "Which orders are delayed for Acme?" --root examples/customer-support
244
+ npx archmax test order-lookup --root examples/customer-support # run the workflow's cases
245
+ npx archmax validate order-lookup --root examples/customer-support # static checks, no model calls
235
246
  ```
236
247
 
237
- A session is a success unless the agent says otherwise. When the work cannot be completed, the
238
- agent calls `archmax_raise({ code, reason })`, which is offered in every state and only for
239
- failure. The session then ends `failed`, with no further model call and no `on_error` route, and
240
- `outcome.kind === "failed"` carries `outcome.exit: { success: false, code, reason }`, so a host
241
- branches on the agent's own code. A completed turn carries `exit: { success: true }`; a rejection
242
- by governance carries `outcome.rejected` instead. See
243
- [how a session ended](https://harness.archmax.ai/guides/sessions/#how-a-session-ended).
244
-
245
- Omit `workflow` for a plain Deep Agent with the same parameters, or pass `workflow: false` to
246
- declare an agent ungoverned. `onEvent` receives the typed event stream and
247
- `workspace.sessionStore` puts sessions elsewhere. `workspace.mounts` composes what the agent can
248
- see, and marking a mount `governed: true` hands the spec's `mounts` block the decision of which
249
- states reach it. Marking one `searchable: false` keeps root-wide searches away from a backend
250
- that must refuse them.
251
-
252
- Five subpaths keep production imports small:
253
-
254
- - `@archmax-ai/harness/sandbox`: code-state script types (`defineCodeState`, `CodeStateInput`)
255
- - `@archmax-ai/harness/testing`: the case engine
256
- - `@archmax-ai/harness/cli`: the state-flow renderer
257
- - `@archmax-ai/harness/spec`: the `workflow.yaml` schema, the pure validator and the grammars
258
- - `@archmax-ai/harness/messages`: transcript readers
259
-
260
- The last two are browser-safe, with no runtime behind them. See the
261
- [public API reference](https://harness.archmax.ai/reference/public-api/).
248
+ The refund example needs your two tools, so it runs from your code. See the
249
+ [CLI reference](https://harness.archmax.ai/reference/cli/) for `sessions`, `decide`, `reply` and
250
+ `deliver`.
251
+
252
+ ### Next
253
+
254
+ - [Grader and code states](https://harness.archmax.ai/guides/automated-states/): checks on the graph
255
+ - [Human states](https://harness.archmax.ai/guides/workflow-machine/#human-in-the-loop-states): a person picks the edge
256
+ - [Triggers](https://harness.archmax.ai/guides/triggers/): typed inputs and returns, rules on their values, files
257
+ - [Testing](https://harness.archmax.ai/guides/testing/): cases for `archmax test`
258
+ - [Public API](https://harness.archmax.ai/reference/public-api/): `createAgent`, outcomes, events
262
259
 
263
260
  ### Authoring with a coding agent
264
261
 
package/dist/agent.d.ts CHANGED
@@ -15,8 +15,8 @@ import type { TurnRunner } from "./workflow/turn-runner.js";
15
15
  * tracing backends key off, and the recursion limit a turn runs under when the
16
16
  * caller names none. One invoke is one whole turn across states — every model
17
17
  * call, tool batch and automated state is a super-step — so the limit is generous by
18
- * design: a state's `maxTurns` and `maxParks` bound the states that declare
19
- * them, and this bounds the whole turn.
18
+ * design: this bounds the whole turn, and a state's `timeoutMs` and
19
+ * `maxParks` bound the states that declare them.
20
20
  */
21
21
  export declare const AGENT_DEFAULT_CONFIG: RunnableConfig;
22
22
  /**
package/dist/agent.js CHANGED
@@ -5,8 +5,8 @@ import { asCompiledAgentGraph, DEFAULT_RECURSION_LIMIT, } from "./core/deepagent
5
5
  * tracing backends key off, and the recursion limit a turn runs under when the
6
6
  * caller names none. One invoke is one whole turn across states — every model
7
7
  * call, tool batch and automated state is a super-step — so the limit is generous by
8
- * design: a state's `maxTurns` and `maxParks` bound the states that declare
9
- * them, and this bounds the whole turn.
8
+ * design: this bounds the whole turn, and a state's `timeoutMs` and
9
+ * `maxParks` bound the states that declare them.
10
10
  */
11
11
  export const AGENT_DEFAULT_CONFIG = {
12
12
  metadata: { ls_integration: "archmax-harness" },
@@ -16,7 +16,7 @@ import { TOOL_MOCK_MIDDLEWARE_NAME } from "../core/tool-mocks.js";
16
16
  import { withoutDeletion } from "../core/workspace-router.js";
17
17
  import { loadPromptCacheEnv } from "../env.js";
18
18
  import { workflowDenials } from "../kernel/kernel.js";
19
- import { UNGRANTABLE_TOOLS } from "../machine/machine.js";
19
+ import { TASK_TOOL } from "../machine/machine.js";
20
20
  import { WorkflowLoadError } from "../machine/load-spec.js";
21
21
  import { TODO_TOOL, workflowToolName } from "../machine/tool-names.js";
22
22
  import { resolveTrigger } from "../machine/triggers.js";
@@ -319,7 +319,7 @@ export async function composeGoverned(ctx, input) {
319
319
  // Built-ins no state of this workflow discloses, reported so a host sees what
320
320
  // the model is never shown: `task`, in every state of every assembly.
321
321
  const disclosedAnywhere = new Set(Object.keys(target.spec.states).flatMap((slug) => [...target.disclosedTools(slug)]));
322
- const withheld = [...UNGRANTABLE_TOOLS].filter((tool) => !disclosedAnywhere.has(tool));
322
+ const withheld = [TASK_TOOL].filter((tool) => !disclosedAnywhere.has(tool));
323
323
  emit({ type: "prompt-shaping", cache: cacheStrategy, withheld });
324
324
  // One dispatcher per composition, so the depth, cycle and concurrency bounds
325
325
  // are enforced in one place and every dispatch is reported the same way. A
@@ -1 +1 @@
1
- {"version":3,"file":"compose.js","sourceRoot":"","sources":["../../src/assembly/compose.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAwB,MAAM,WAAW,CAAC;AACvF,OAAO,EAAE,eAAe,EAAsD,MAAM,YAAY,CAAC;AACjG,OAAO,EAAE,oBAAoB,EAAE,MA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,CAAC,UAAU,MAAM,EAAE,CACvD,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;;;GAIG;AACH,SAAS,mBAAmB,CAAC,UAAgC;IAC3D,MAAM,QAAQ,GAA8B,EAAE,CAAC;IAC/C,KAAK,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,UAAU,EAAE,CAAC;QAC3C,MAAM,KAAK,GAAG,CAAC,SAAS,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC;QAClF,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;YAAE,QAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IAC1H,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,0FAA0F;AAC1F,MAAM,UAAU,gBAAgB,CAAC,GAAoB,EAAE,IAAqB;IAC1E,OAAO,eAAe,CAAC,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC;AACjD,CAAC"}
@@ -33,11 +33,8 @@ npx skills add ./node_modules/@archmax-ai/harness
33
33
  (for installers) and as `dist/authoring-skill/archmax-harness/` (for
34
34
  `BUNDLED_AUTHORING_SKILL_DIR`).
35
35
 
36
- ```ts
37
- import { BUNDLED_AUTHORING_SKILL_DIR } from "@archmax-ai/harness";
38
- // <BUNDLED_AUTHORING_SKILL_DIR>/archmax-harness/SKILL.md (+ references/) — the
39
- // constant is the dist/authoring-skill directory, for skills middleware.
40
- ```
36
+ For skills middleware, the package exports `BUNDLED_AUTHORING_SKILL_DIR`: the
37
+ `dist/authoring-skill` directory, with the skill at `archmax-harness/SKILL.md` beneath it.
41
38
 
42
39
  **From a checkout of this repository**: `npx skills add ./skills/archmax-harness`.
43
40
 
@@ -48,15 +45,16 @@ separate submission step.
48
45
 
49
46
  | File | Purpose |
50
47
  | --- | --- |
51
- | `SKILL.md` | The entry point, loaded when the skill triggers: procedure, workspace layout, CLI, and a table saying which short reference to load for which task |
52
- | `references/workflow-yaml.md` | Short: every `workflow.yaml` key as an annotated skeleton, machine rules, governance |
53
- | `references/code-states-and-scripts.md` | Short: the code-state script and `archmax_run` contracts |
54
- | `references/cases.md` | Short: the case grammar (keys, actions, assertions, mocking rule) |
55
- | `references/diagnostics.md` | Short: every `validate` diagnostic → its fix; removed keys |
56
- | `references/wiring.md` | Short: `createAgent`, human states, events, artifacts |
57
- | `references/workflow-schema.md` | Exhaustive `workflow.yaml` field reference + annotated example |
58
- | `references/code-state-and-test-scripts.md` | Full code-state script, grader + cases contracts with worked examples |
59
- | `references/backend-integration.md` | Full `createAgent` / events / run-artifact integration reference |
48
+ | `SKILL.md` | The entry point, loaded when the skill triggers: the procedure, the workspace layout, the CLI, and which reference to load for which task |
49
+ | `references/workflow-schema.md` | Every `workflow.yaml` key as a skeleton that validates, the machine's rules, and governance |
50
+ | `references/code-states-and-scripts.md` | Grader and code states at run time, the code-state script contract, and `archmax_run` scripts |
51
+ | `references/cases.md` | The case grammar: keys, actions, assertions, mocks, and seeding from a real session |
52
+ | `references/diagnostics.md` | Each `validate` diagnostic and failed-session reason, with its fix |
53
+ | `references/backend-integration.md` | `createAgent`, outcomes and parked sessions, events, storage, artifacts, and `runTests` |
54
+
55
+ Each reference owns one topic, so none repeats another. Two workspaces in the repository
56
+ show the result: `examples/refund/` (the minimal SDK example) and
57
+ `examples/customer-support/` (the full CLI reference workspace).
60
58
 
61
59
  The skill is **self-contained** — no external docs are required to use it. It
62
60
  targets **runtime contract version `"3"`**.
@@ -64,7 +62,7 @@ targets **runtime contract version `"3"`**.
64
62
  ## Naming note
65
63
 
66
64
  This **authoring skill** is distinct from a workspace's **skill bundles** —
67
- `skills/<slug>/` directories holding a `SKILL.md`, the capability's `assets/`
65
+ `skills/<slug>/` directories holding a `SKILL.md`, the bundle's `assets/`
68
66
  and its `archmax_run` `scripts/`, enabled per workflow and per state by slug.
69
67
  They share the Agent Skills file format and nothing else: this skill is a
70
68
  playbook for *building* such workspaces and wiring the runtime, which is why