@archmax-ai/harness 0.7.1 → 0.8.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 (47) hide show
  1. package/README.md +11 -4
  2. package/dist/assembly/compose.d.ts +5 -3
  3. package/dist/assembly/compose.js +8 -5
  4. package/dist/assembly/compose.js.map +1 -1
  5. package/dist/assembly/index.d.ts +3 -2
  6. package/dist/assembly/index.js.map +1 -1
  7. package/dist/authoring-skill/archmax-harness/SKILL.md +9 -5
  8. package/dist/authoring-skill/archmax-harness/references/backend-integration.md +3 -2
  9. package/dist/authoring-skill/archmax-harness/references/diagnostics.md +5 -3
  10. package/dist/authoring-skill/archmax-harness/references/hook-and-test-scripts.md +5 -4
  11. package/dist/authoring-skill/archmax-harness/references/workflow-schema.md +78 -46
  12. package/dist/authoring-skill/archmax-harness/references/workflow-yaml.md +30 -14
  13. package/dist/core/platform-prompt.generated.js +1 -1
  14. package/dist/core/platform-prompt.generated.js.map +1 -1
  15. package/dist/core/workspace-prompt.js +2 -1
  16. package/dist/core/workspace-prompt.js.map +1 -1
  17. package/dist/kernel/kernel.js +12 -8
  18. package/dist/kernel/kernel.js.map +1 -1
  19. package/dist/machine/lint-spec.js +62 -29
  20. package/dist/machine/lint-spec.js.map +1 -1
  21. package/dist/machine/machine.d.ts +33 -17
  22. package/dist/machine/machine.js +48 -28
  23. package/dist/machine/machine.js.map +1 -1
  24. package/dist/machine/spec-schema.d.ts +15 -7
  25. package/dist/machine/spec-schema.js +43 -15
  26. package/dist/machine/spec-schema.js.map +1 -1
  27. package/dist/machine/tool-names.d.ts +10 -7
  28. package/dist/machine/tool-names.js +11 -8
  29. package/dist/machine/tool-names.js.map +1 -1
  30. package/dist/machine/tool-paths.d.ts +4 -3
  31. package/dist/machine/tool-paths.js +4 -3
  32. package/dist/machine/tool-paths.js.map +1 -1
  33. package/dist/machine/types.d.ts +14 -8
  34. package/dist/machine/types.js.map +1 -1
  35. package/dist/public/spec.d.ts +3 -3
  36. package/dist/public/spec.js +3 -3
  37. package/dist/public/spec.js.map +1 -1
  38. package/dist/workflow/render-prompt.d.ts +2 -1
  39. package/dist/workflow/render-prompt.js +24 -5
  40. package/dist/workflow/render-prompt.js.map +1 -1
  41. package/package.json +1 -1
  42. package/skills/archmax-harness/SKILL.md +9 -5
  43. package/skills/archmax-harness/references/backend-integration.md +3 -2
  44. package/skills/archmax-harness/references/diagnostics.md +5 -3
  45. package/skills/archmax-harness/references/hook-and-test-scripts.md +5 -4
  46. package/skills/archmax-harness/references/workflow-schema.md +78 -46
  47. package/skills/archmax-harness/references/workflow-yaml.md +30 -14
@@ -27,7 +27,19 @@ metadata: { canvas: {} } # host data, never read; accepted at root, stat
27
27
  extensions: { hooks: [] } # host-registered hook kinds; rarely authored
28
28
 
29
29
  tools: # tool governance, workflow level
30
- allow_always: [] # granted in EVERY state; a state's allow adds to it
30
+ allow_always: # granted in EVERY state; a state's allow adds to or narrows it.
31
+ - ls # The DEFAULT TOOLS: declared, this list REPLACES them (absent,
32
+ - read_file # all twelve are granted), so a new workflow lists all twelve and
33
+ - write_file # removes only what it must not have. Workflow-wide host tools
34
+ - edit_file # go below them; state-specific ones under a state's tools.allow.
35
+ - glob
36
+ - grep
37
+ - copy_file
38
+ - move_file
39
+ - remove_file
40
+ - write_todos
41
+ - archmax_eval
42
+ - archmax_run
31
43
  forbid_always: [archmax_reset] # denied in EVERY state; beats every grant; "*" = every tool
32
44
  skills: # skill governance, workflow level — SLUGS, never paths
33
45
  allow_always: [order-data] # enabled in every state; [] = every capability is state-specific
@@ -67,10 +79,10 @@ states:
67
79
  tools:
68
80
  allow: # adds to allow_always; entry = name | { tool, args: {<arg>: [globs]} } | { tool, paths }
69
81
  - lookup_customer
70
- - { tool: archmax_run, paths: ["skills/refund-policy/scripts/**"] } # narrows an always-on tool, within an enabled skill
82
+ - { tool: archmax_run, paths: ["skills/refund-policy/scripts/**"] } # narrows the workflow-wide grant, within an enabled skill
71
83
  - { tool: write_file, args: { file_path: ["reports/${{case_id}}/*.json"] } } # variable-bound guard
72
84
  - archmax_workflow_enrich-order # runs a sibling workflow
73
- forbid: [archmax_wait] # denies here; beats every grant incl. the always-on surface
85
+ forbid: [archmax_wait] # denies here; beats every grant incl. allow_always
74
86
  skills:
75
87
  allow: [refund-policy] # adds to allow_always (bundle readable + scripts runnable, no path entries)
76
88
  forbid: [order-data] # subtracts, even from allow_always ([] never denies)
@@ -81,9 +93,10 @@ states:
81
93
  metadata: { x: 40, y: 180 }
82
94
  transitions: # none => terminal state
83
95
  - to: review # slug; must exist
84
- description: The decision is recorded and needs a person's approval. # REQUIRED, non-empty:
85
- # the ONLY thing the agent knows about this edge (on a human
86
- # state, also the button label). Say WHEN, never where.
96
+ description: The decision is recorded and needs a person's approval. # what the agent routes
97
+ # on. Say WHEN, never where. Omit it to route on the target's
98
+ # instructions instead (target must have some); REQUIRED on a
99
+ # human state's transitions, where it is the button label.
87
100
  type: none # approve | reject | refine | none — semantic on human states
88
101
 
89
102
  review: # human state: parks with a decision record; a PERSON picks the edge
@@ -252,14 +265,17 @@ no way to see more of the graph.
252
265
 
253
266
  Closed by default; **deny beats allow, and no narrower level widens a denial.**
254
267
 
255
- - **Always on, never declared**: `ls`, `read_file`, `write_file`,
256
- `edit_file`, `copy_file`, `move_file`, `remove_file`, `glob`, `grep`,
257
- `write_todos`, `archmax_eval`, `archmax_run`,
258
- and the controls `archmax_advance`, `archmax_reset`, `archmax_wait`,
259
- `archmax_raise`, `archmax_get_variables`, `archmax_set_variables`. Any other
260
- tool needs an
261
- `allow`/`allow_always` entry. An entry naming an always-on tool **narrows**
262
- it. `task` is ungrantable (error).
268
+ - **The workflow-wide grant**: `tools.allow_always`, in every state. Absent,
269
+ it is the **default tools**: `ls`, `read_file`, `write_file`, `edit_file`,
270
+ `copy_file`, `move_file`, `remove_file`, `glob`, `grep`, `write_todos`,
271
+ `archmax_eval`, `archmax_run`. Declared (`[]` included), it is exactly what it
272
+ lists and **replaces** the default tools, so a new workflow lists all twelve
273
+ (as in the skeleton) and removes only what it must not have. Never declared:
274
+ the controls `archmax_advance`, `archmax_reset`, `archmax_wait`,
275
+ `archmax_raise`, `archmax_get_variables`, `archmax_set_variables`, and a host's
276
+ `essentialTools`. Any other tool needs an `allow`/`allow_always` entry. A
277
+ state entry naming a granted tool **narrows** it there, and one naming a
278
+ default tool the list omits grants it there. `task` is ungrantable (error).
263
279
  - **Entries**: bare name; `{ tool, args: { <arg>: ["glob", …] } }` (matches
264
280
  if any glob matches; `${{var}}` allowed); `{ tool, paths: [...] }`
265
281
  (guards every path argument the tool declares — all must match to grant,