owenloop 0.5.0 → 0.5.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 (211) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/README.md +137 -35
  3. package/bin/owenloop.mjs +49 -1
  4. package/dist/packages/work/src/agent/brief.d.ts +8 -4
  5. package/dist/packages/work/src/agent/brief.js +7 -3
  6. package/dist/packages/work/src/agent/loop.d.ts +13 -7
  7. package/dist/packages/work/src/agent/loop.js +136 -9
  8. package/dist/packages/work/src/agent/model-policy.d.ts +49 -0
  9. package/dist/packages/work/src/agent/model-policy.js +138 -0
  10. package/dist/packages/work/src/bundle/cache.d.ts +7 -5
  11. package/dist/packages/work/src/bundle/cache.js +20 -6
  12. package/dist/packages/work/src/bundle/fetch.d.ts +7 -5
  13. package/dist/packages/work/src/bundle/fetch.js +27 -7
  14. package/dist/packages/work/src/bundle/types.d.ts +8 -4
  15. package/dist/packages/work/src/consumed-verifier.d.ts +45 -0
  16. package/dist/packages/work/src/consumed-verifier.js +205 -0
  17. package/dist/packages/work/src/exec/instructions.d.ts +99 -0
  18. package/dist/packages/work/src/exec/instructions.js +323 -0
  19. package/dist/packages/work/src/exec/loop.d.ts +12 -1
  20. package/dist/packages/work/src/exec/loop.js +137 -20
  21. package/dist/packages/work/src/exec/payload.d.ts +29 -0
  22. package/dist/packages/work/src/exec/payload.js +54 -0
  23. package/dist/packages/work/src/exec/receipt.d.ts +9 -6
  24. package/dist/packages/work/src/exec/receipt.js +12 -1
  25. package/dist/packages/work/src/exec/runner.d.ts +7 -1
  26. package/dist/packages/work/src/exec/runner.js +74 -3
  27. package/dist/packages/work/src/harness/child-env.js +7 -0
  28. package/dist/packages/work/src/harness/claude.d.ts +20 -8
  29. package/dist/packages/work/src/harness/claude.js +260 -58
  30. package/dist/packages/work/src/harness/codex.d.ts +5 -4
  31. package/dist/packages/work/src/harness/codex.js +169 -41
  32. package/dist/packages/work/src/harness/contract.d.ts +36 -11
  33. package/dist/packages/work/src/harness/fake.js +1 -0
  34. package/dist/packages/work/src/harness/jsonrpc-stdio.js +7 -0
  35. package/dist/packages/work/src/harness/permissions.d.ts +16 -3
  36. package/dist/packages/work/src/harness/permissions.js +102 -13
  37. package/dist/packages/work/src/harness/session-store.d.ts +27 -9
  38. package/dist/packages/work/src/harness/session-store.js +271 -67
  39. package/dist/packages/work/src/hold/mcp.d.ts +25 -5
  40. package/dist/packages/work/src/hold/mcp.js +126 -11
  41. package/dist/packages/work/src/hub/client.d.ts +2 -1
  42. package/dist/packages/work/src/hub/client.js +14 -1
  43. package/dist/packages/work/src/hub/types.d.ts +69 -33
  44. package/dist/packages/work/src/hub/types.js +8 -10
  45. package/dist/packages/work/src/mcp/server.js +1 -1
  46. package/dist/packages/work/src/owenloop-bin.d.ts +1 -0
  47. package/dist/packages/work/src/owenloop-bin.js +18 -0
  48. package/dist/packages/work/src/roles/agent-run.d.ts +12 -6
  49. package/dist/packages/work/src/roles/agent-run.js +116 -34
  50. package/dist/packages/work/src/roles/exec.d.ts +8 -0
  51. package/dist/packages/work/src/roles/exec.js +27 -2
  52. package/dist/packages/work/src/roles/hold.d.ts +4 -0
  53. package/dist/packages/work/src/roles/hold.js +44 -5
  54. package/dist/packages/work/src/roles/lint.d.ts +3 -4
  55. package/dist/packages/work/src/roles/lint.js +41 -7
  56. package/dist/packages/work/src/roles/settings.js +5 -0
  57. package/dist/packages/work/src/roles/shift.d.ts +1 -0
  58. package/dist/packages/work/src/roles/shift.js +23 -1
  59. package/dist/packages/work/src/settings/settings.d.ts +17 -1
  60. package/dist/packages/work/src/settings/settings.js +39 -0
  61. package/dist/packages/work/src/shift/loop.d.ts +14 -3
  62. package/dist/packages/work/src/shift/loop.js +447 -164
  63. package/dist/packages/work/src/shift/protocol.d.ts +4 -0
  64. package/dist/packages/work/src/shift/runtime.d.ts +2 -0
  65. package/dist/packages/work/src/shift/runtime.js +66 -3
  66. package/dist/packages/work/src/shift/spawn.d.ts +41 -18
  67. package/dist/packages/work/src/shift/spawn.js +89 -31
  68. package/dist/packages/work/src/shift/state.d.ts +53 -51
  69. package/dist/packages/work/src/shift/state.js +325 -102
  70. package/dist/packages/work/src/submit-proof.d.ts +36 -0
  71. package/dist/packages/work/src/submit-proof.js +93 -0
  72. package/dist/src/add.d.ts +64 -259
  73. package/dist/src/add.js +81 -615
  74. package/dist/src/archive.d.ts +97 -0
  75. package/dist/src/archive.js +591 -0
  76. package/dist/src/bundle/index.d.ts +64 -0
  77. package/dist/src/bundle/index.js +508 -0
  78. package/dist/src/bundle/manifest.d.ts +50 -0
  79. package/dist/src/bundle/manifest.js +435 -0
  80. package/dist/src/bundle/runtime.d.ts +26 -0
  81. package/dist/src/bundle/runtime.js +64 -0
  82. package/dist/src/bundle/tar.d.ts +62 -0
  83. package/dist/src/bundle/tar.js +238 -0
  84. package/dist/src/bundle/types.d.ts +105 -0
  85. package/dist/src/bundle/types.js +21 -0
  86. package/dist/src/cli.d.ts +90 -20
  87. package/dist/src/cli.js +2407 -365
  88. package/dist/src/credentials.d.ts +4 -3
  89. package/dist/src/credentials.js +21 -19
  90. package/dist/src/crypto/allowed-signers.d.ts +68 -0
  91. package/dist/src/crypto/allowed-signers.js +307 -0
  92. package/dist/src/crypto/canonical.d.ts +8 -0
  93. package/dist/src/crypto/canonical.js +92 -0
  94. package/dist/src/crypto/chain.d.ts +65 -0
  95. package/dist/src/crypto/chain.js +377 -0
  96. package/dist/src/crypto/dsse.d.ts +209 -0
  97. package/dist/src/crypto/dsse.js +282 -0
  98. package/dist/src/crypto/enrollment.d.ts +78 -0
  99. package/dist/src/crypto/enrollment.js +186 -0
  100. package/dist/src/crypto/index.d.ts +48 -0
  101. package/dist/src/crypto/index.js +44 -0
  102. package/dist/src/crypto/keys.d.ts +258 -0
  103. package/dist/src/crypto/keys.js +908 -0
  104. package/dist/src/crypto/org-root.d.ts +33 -0
  105. package/dist/src/crypto/org-root.js +78 -0
  106. package/dist/src/crypto/origin-rules.d.ts +56 -0
  107. package/dist/src/crypto/origin-rules.js +143 -0
  108. package/dist/src/crypto/policy-floor.d.ts +98 -0
  109. package/dist/src/crypto/policy-floor.js +353 -0
  110. package/dist/src/crypto/records.d.ts +316 -0
  111. package/dist/src/crypto/records.js +157 -0
  112. package/dist/src/crypto/scope.d.ts +49 -0
  113. package/dist/src/crypto/scope.js +83 -0
  114. package/dist/src/crypto/ssh.d.ts +171 -0
  115. package/dist/src/crypto/ssh.js +396 -0
  116. package/dist/src/crypto/submission.d.ts +33 -0
  117. package/dist/src/crypto/submission.js +47 -0
  118. package/dist/src/crypto/trust-roots.d.ts +29 -0
  119. package/dist/src/crypto/trust-roots.js +39 -0
  120. package/dist/src/crypto/verify-consumed.d.ts +67 -0
  121. package/dist/src/crypto/verify-consumed.js +259 -0
  122. package/dist/src/crypto/verify-origin.d.ts +50 -0
  123. package/dist/src/crypto/verify-origin.js +151 -0
  124. package/dist/src/crypto/verify-publication.d.ts +60 -0
  125. package/dist/src/crypto/verify-publication.js +150 -0
  126. package/dist/src/defs.d.ts +24 -1
  127. package/dist/src/defs.js +145 -25
  128. package/dist/src/engine.d.ts +99 -3
  129. package/dist/src/engine.js +238 -34
  130. package/dist/src/factory.d.ts +16 -0
  131. package/dist/src/factory.js +16 -4
  132. package/dist/src/global-config.d.ts +59 -0
  133. package/dist/src/global-config.js +84 -0
  134. package/dist/src/hub.d.ts +75 -21
  135. package/dist/src/hub.js +123 -40
  136. package/dist/src/index.d.ts +17 -2
  137. package/dist/src/index.js +20 -2
  138. package/dist/src/install.d.ts +538 -0
  139. package/dist/src/install.js +1981 -0
  140. package/dist/src/lock.d.ts +15 -57
  141. package/dist/src/lock.js +251 -143
  142. package/dist/src/mcp/serve.d.ts +46 -22
  143. package/dist/src/mcp/serve.js +167 -44
  144. package/dist/src/mcp/server.js +12 -1
  145. package/dist/src/model.d.ts +15 -0
  146. package/dist/src/model.js +111 -1
  147. package/dist/src/order-resolver.d.ts +184 -0
  148. package/dist/src/order-resolver.js +252 -0
  149. package/dist/src/package-version.d.ts +10 -0
  150. package/dist/src/package-version.js +42 -0
  151. package/dist/src/paths.d.ts +14 -1
  152. package/dist/src/paths.js +18 -0
  153. package/dist/src/schemas/enrollment-grant.v1.schema.json +90 -0
  154. package/dist/src/schemas/index.d.ts +1416 -0
  155. package/dist/src/schemas/index.js +31 -0
  156. package/dist/src/schemas/order.v1.schema.json +106 -0
  157. package/dist/src/schemas/origin.v1.schema.json +68 -0
  158. package/dist/src/schemas/policy-floor.v1.schema.json +29 -0
  159. package/dist/src/schemas/publication.v1.schema.json +31 -0
  160. package/dist/src/schemas/revocation.v1.schema.json +39 -0
  161. package/dist/src/schemas/submission.v1.schema.json +61 -0
  162. package/dist/src/store/def-source.d.ts +52 -0
  163. package/dist/src/store/def-source.js +335 -0
  164. package/dist/src/store/index-file.d.ts +69 -0
  165. package/dist/src/store/index-file.js +151 -0
  166. package/dist/src/store/index.d.ts +27 -0
  167. package/dist/src/store/index.js +22 -0
  168. package/dist/src/store/ingestor.d.ts +43 -0
  169. package/dist/src/store/ingestor.js +211 -0
  170. package/dist/src/store/install.d.ts +228 -0
  171. package/dist/src/store/install.js +555 -0
  172. package/dist/src/store/instruction-source.d.ts +49 -0
  173. package/dist/src/store/instruction-source.js +298 -0
  174. package/dist/src/store/origin-evidence.d.ts +21 -0
  175. package/dist/src/store/origin-evidence.js +66 -0
  176. package/dist/src/store/pre-commit-verifier.d.ts +68 -0
  177. package/dist/src/store/pre-commit-verifier.js +418 -0
  178. package/dist/src/store/resolve.d.ts +138 -0
  179. package/dist/src/store/resolve.js +363 -0
  180. package/dist/src/store/types.d.ts +288 -0
  181. package/dist/src/store/types.js +356 -0
  182. package/dist/src/types.d.ts +45 -11
  183. package/dist/src/untar.d.ts +8 -23
  184. package/dist/src/untar.js +10 -136
  185. package/docs/agent-runner.md +86 -0
  186. package/docs/authoring.md +57 -6
  187. package/docs/bundles.md +250 -0
  188. package/docs/cli.md +1171 -97
  189. package/docs/crypto.md +816 -0
  190. package/docs/design.md +342 -20
  191. package/docs/embedding.md +132 -25
  192. package/docs/wire-contracts.md +380 -0
  193. package/package.json +6 -1
  194. package/plugins/claude-code/.claude-plugin/marketplace.json +14 -0
  195. package/plugins/claude-code/plugin/.claude-plugin/plugin.json +8 -0
  196. package/plugins/claude-code/plugin/.mcp.json +14 -0
  197. package/plugins/claude-code/plugin/hooks/hooks.json +26 -0
  198. package/plugins/claude-code/plugin/hooks/session-end.sh +40 -0
  199. package/plugins/claude-code/plugin/hooks/session-start.sh +52 -0
  200. package/plugins/claude-code/plugin/skills/author/SKILL.md +181 -0
  201. package/plugins/claude-code/plugin/skills/conduct/SKILL.md +106 -0
  202. package/plugins/claude-code/plugin/skills/shift/SKILL.md +105 -0
  203. package/plugins/codex/.agents/plugins/marketplace.json +21 -0
  204. package/plugins/codex/plugins/owenloop/.codex-plugin/plugin.json +7 -0
  205. package/plugins/codex/plugins/owenloop/.mcp.json +20 -0
  206. package/plugins/codex/plugins/owenloop/hooks/hooks.json +26 -0
  207. package/plugins/codex/plugins/owenloop/hooks/session-end.sh +40 -0
  208. package/plugins/codex/plugins/owenloop/hooks/session-start.sh +52 -0
  209. package/plugins/codex/plugins/owenloop/skills/author/SKILL.md +181 -0
  210. package/plugins/codex/plugins/owenloop/skills/conduct/SKILL.md +106 -0
  211. package/plugins/codex/plugins/owenloop/skills/shift/SKILL.md +105 -0
package/CHANGELOG.md CHANGED
@@ -4,6 +4,51 @@ All notable changes to this project are documented here. The format is based on
4
4
  [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project
5
5
  adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [0.5.1](https://github.com/typicalday/owenloop/compare/v0.5.0...v0.5.1) (2026-08-12)
8
+
9
+
10
+ ### Features
11
+
12
+ * add bundle runtime compatibility requirements ([#137](https://github.com/typicalday/owenloop/issues/137)) ([6a241a3](https://github.com/typicalday/owenloop/commit/6a241a34f516da820e1dda5fd6953c28993ea1f5))
13
+ * add CLI/plugin compatibility checks ([#109](https://github.com/typicalday/owenloop/issues/109)) ([8f0b0b9](https://github.com/typicalday/owenloop/commit/8f0b0b9c2f8179ac316772fcbf61d5efe4fa9019))
14
+ * add command payload and judge reject transport ([#126](https://github.com/typicalday/owenloop/issues/126)) ([847a1fa](https://github.com/typicalday/owenloop/commit/847a1fabdd41ba7a021b967ba0c55e5f25526bb5))
15
+ * add deterministic workflow bundles ([#106](https://github.com/typicalday/owenloop/issues/106)) ([dfc598b](https://github.com/typicalday/owenloop/commit/dfc598b1ecf040d4c635cdb52443bdb0191f398b))
16
+ * add enrollment chain validation, attenuation, and revocation ([#117](https://github.com/typicalday/owenloop/issues/117)) ([2bc10c8](https://github.com/typicalday/owenloop/commit/2bc10c8226fe4960e9655e3672ebd0a17a7ed512))
17
+ * add signed origin records for published bundles ([#119](https://github.com/typicalday/owenloop/issues/119)) ([a5fbd8f](https://github.com/typicalday/owenloop/commit/a5fbd8fd5b5cec199e3028e8784a13662dcae58e))
18
+ * add signed submission records ([#121](https://github.com/typicalday/owenloop/issues/121)) ([f171227](https://github.com/typicalday/owenloop/commit/f171227a8ca1bf4f4f0c84edecf482c245ab203e))
19
+ * add signed workflow bundle publication ([#112](https://github.com/typicalday/owenloop/issues/112)) ([224f7a8](https://github.com/typicalday/owenloop/commit/224f7a834c747d954d1cf77316f0066e5252f09e))
20
+ * add SSHSIG signing, DSSE envelopes, and principal keys ([#102](https://github.com/typicalday/owenloop/issues/102)) ([5125545](https://github.com/typicalday/owenloop/commit/51255459ac21012365b6984d444efc0ae51dfa15))
21
+ * add v2 multi-workflow delivery bundles ([#127](https://github.com/typicalday/owenloop/issues/127)) ([26a59d7](https://github.com/typicalday/owenloop/commit/26a59d7bb9728fd4936d8d4eb2b2bb158983ff89))
22
+ * converge Claude Code and Codex plugins ([#113](https://github.com/typicalday/owenloop/issues/113)) ([1c6623d](https://github.com/typicalday/owenloop/commit/1c6623dff9649a4311382fa34c4bc6ac489a4f9f))
23
+ * enforce harness policy ([4f8796f](https://github.com/typicalday/owenloop/commit/4f8796f6415a486aad92725eec842d8a22e504f8))
24
+ * enforce local workflow instruction resolution ([#111](https://github.com/typicalday/owenloop/issues/111)) ([c5827d7](https://github.com/typicalday/owenloop/commit/c5827d7dd248ebc49a3a199dd8f1231249f280b5))
25
+ * enforce workflow origin policy at install and execution ([#122](https://github.com/typicalday/owenloop/issues/122)) ([d91e881](https://github.com/typicalday/owenloop/commit/d91e881583efabbe1efe3427d3fc69fd20f1d6fc))
26
+ * enforce workflow publication trust at install and execution ([#114](https://github.com/typicalday/owenloop/issues/114)) ([3b0d931](https://github.com/typicalday/owenloop/commit/3b0d931f6b37ca48b6c50a5b33a8b461e3410b8b))
27
+ * expose installed bundle assets to workers ([#125](https://github.com/typicalday/owenloop/issues/125)) ([2c8b498](https://github.com/typicalday/owenloop/commit/2c8b4981c1a395b78205c8b076893ac3efa4416f))
28
+ * expose run identity to command children ([#131](https://github.com/typicalday/owenloop/issues/131)) ([e7e18c1](https://github.com/typicalday/owenloop/commit/e7e18c1a84ce772fac80dfb493f267d7fbd8cde2))
29
+ * freeze launch wire contracts ([#110](https://github.com/typicalday/owenloop/issues/110)) ([571a8f9](https://github.com/typicalday/owenloop/commit/571a8f90532d90e3db786890885d31d3446edf21))
30
+ * reference-mode orders — instructions resolve by defDigest (WP-B1) ([#101](https://github.com/typicalday/owenloop/issues/101)) ([5e4071e](https://github.com/typicalday/owenloop/commit/5e4071ee5e56753cbcc330ac3c0b749518355ffc))
31
+ * register signed machine enrollments ([#116](https://github.com/typicalday/owenloop/issues/116)) ([25ef244](https://github.com/typicalday/owenloop/commit/25ef2442de6277001c24b9e375513bfcb20a0ef1))
32
+ * resolve agent model tiers and retry escalation ([#128](https://github.com/typicalday/owenloop/issues/128)) ([3098494](https://github.com/typicalday/owenloop/commit/3098494f2d34c3abdbe7ae2adee0deb73156f9b8))
33
+ * resolve CAS bundle workflows through calls: ([#130](https://github.com/typicalday/owenloop/issues/130)) ([444b868](https://github.com/typicalday/owenloop/commit/444b868f50b37e2e377976a935bf17ea60fe6190))
34
+ * ship Claude Code plugin pack ([#104](https://github.com/typicalday/owenloop/issues/104)) ([a76bea7](https://github.com/typicalday/owenloop/commit/a76bea789eaa78599b8ed23f590f5f559b907279))
35
+ * ship the Codex plugin tree and launch the plugin MCP server from PATH ([#107](https://github.com/typicalday/owenloop/issues/107)) ([d165d28](https://github.com/typicalday/owenloop/commit/d165d284d125304321b3c5d10a304cc3d606e0e3))
36
+ * support dynamic workdirs from consumed artifacts ([#129](https://github.com/typicalday/owenloop/issues/129)) ([6c4ada1](https://github.com/typicalday/owenloop/commit/6c4ada1478e4a2c1468c1565a6542ae3936ac383))
37
+ * two-level content-addressed workflow store with .wnlp bundle installs ([#103](https://github.com/typicalday/owenloop/issues/103)) ([029d06c](https://github.com/typicalday/owenloop/commit/029d06cfebcad2aeff20350a0f9c83402ede1b3a))
38
+ * verify admin-signed org policy floors and merge them as a strictness floor ([#120](https://github.com/typicalday/owenloop/issues/120)) ([da381b3](https://github.com/typicalday/owenloop/commit/da381b36d160de02a967926da71a6da6c19b21b8))
39
+ * verify consumed artifact values and producer enrollment at the driver boundary ([#123](https://github.com/typicalday/owenloop/issues/123)) ([9629d14](https://github.com/typicalday/owenloop/commit/9629d1444e5576629336dfbc31dcc3d1b0297a4c))
40
+
41
+
42
+ ### Bug Fixes
43
+
44
+ * allow packaged plugins through npm publish gate ([#139](https://github.com/typicalday/owenloop/issues/139)) ([ef83b67](https://github.com/typicalday/owenloop/commit/ef83b67c5f491783c9d88b2f3fa0fa0c4ef2c582))
45
+ * inherit producer policy in native judges ([152eee1](https://github.com/typicalday/owenloop/commit/152eee148b1d269b45f5bb2ef4fae92efe830007))
46
+ * lock plugin manifest versions to package ([#108](https://github.com/typicalday/owenloop/issues/108)) ([8c2a93e](https://github.com/typicalday/owenloop/commit/8c2a93ea9f92293ac06c578d54384c381dd52f42))
47
+ * make hosted Shift delivery reliable ([#132](https://github.com/typicalday/owenloop/issues/132)) ([a8e3fc3](https://github.com/typicalday/owenloop/commit/a8e3fc318d581cb858b81d627d6b237ae8c9c757))
48
+ * resolve publishing hubs without project bindings ([#133](https://github.com/typicalday/owenloop/issues/133)) ([15795fd](https://github.com/typicalday/owenloop/commit/15795fda0f3c4835aacaeb0e905bfb1495ac2783))
49
+ * resolve the MCP hub origin from config instead of enumerating the credential store ([#118](https://github.com/typicalday/owenloop/issues/118)) ([07c140d](https://github.com/typicalday/owenloop/commit/07c140db6ba7169cba68eb09034dc23c70fdba28))
50
+ * select workflow versions deterministically ([#138](https://github.com/typicalday/owenloop/issues/138)) ([85e17c1](https://github.com/typicalday/owenloop/commit/85e17c149a1181ba745fd701d6a46be9dfcf5d05))
51
+
7
52
  ## [0.5.0](https://github.com/typicalday/owenloop/compare/v0.4.1...v0.5.0) (2026-08-04)
8
53
 
9
54
 
package/README.md CHANGED
@@ -159,9 +159,10 @@ Two things make this more than running steps in dependency order:
159
159
  itself (which steps exist, what each consumes and produces) is fixed when
160
160
  the definition loads, not mutable while an instance runs.
161
161
  - **Not a command runner.** `executor:`/`command:` declare which kind of
162
- executor an order is for and carry a command string through untouched —
163
- the engine never shells out, executes, or interprets it. Actually running
164
- anything is always the dispatcher's job, on the other side of `tick`.
162
+ worker an order is for (`Order.worker`) and what command text a worker
163
+ resolves for it — the engine never shells out, executes, or interprets
164
+ it. Actually running anything is always the dispatcher's job, on the other
165
+ side of `tick`.
165
166
 
166
167
  ---
167
168
 
@@ -256,15 +257,20 @@ will do. See
256
257
 
257
258
  ### Worker dispatch
258
259
 
259
- `executor: agent | command | …` declares which kind of executor a step's order
260
- is for — the default (`agent`, silent when omitted) is unaffected; every
261
- def written before this feature stays byte for byte the same. Opt a step
262
- into `executor: command` and give it a `command:` string to switch it to a
263
- deterministic executor instead of an LLM — the engine never runs it, only
264
- carries it through on the order for your dispatcher to branch on. An
265
- optional `spec:` map carries further opaque config (a timeout, a working
266
- directory), and a judge entry accepts the same fields, so a quality gate can
267
- be a script's exit code instead of a verdict. See
260
+ `executor: agent | command | …` declares which kind of worker a step's order
261
+ is for — the authored value lands on the order as `Order.worker`, and the
262
+ default (`agent`, silent when omitted) is unaffected; every def written
263
+ before this feature stays byte for byte the same. Opt a step into
264
+ `executor: command` and give it a `command:` string to switch it to a
265
+ deterministic worker instead of an LLM — the engine never runs it; your
266
+ dispatcher branches on `order.worker` and resolves the authored command text
267
+ from the local workflow store through the order's `defDigest` at the
268
+ `(defDigest, step, key)` boundary. The packet itself carries no command text:
269
+ a command worker must refuse when the digest or command cannot be resolved and
270
+ must never spawn from transport-supplied text. An optional `spec:` map carries
271
+ further opaque config (a timeout, a working directory), and a judge entry
272
+ accepts the same fields, so a quality gate can be a script's exit code instead
273
+ of a verdict. See
268
274
  [`docs/authoring.md`](docs/authoring.md#executor--declaring-the-executor) and
269
275
  [`command-executor.yaml`](examples/workflows/command-executor.yaml).
270
276
 
@@ -275,6 +281,51 @@ pushes a typed event the instant a mutation commits, so a host can react
275
281
  instead of ticking on a timer. See [Embedding it](#embedding-it) and
276
282
  [`docs/embedding.md`](docs/embedding.md).
277
283
 
284
+ ### Shared workflows — the content-addressed store
285
+
286
+ Workflow definitions are shared, not hand-copied. Two install routes land
287
+ them in the tree, both all-or-nothing with crash recovery:
288
+
289
+ - **GitHub repos** — `owenloop add <owner>/<repo>[@ref]` fetches a public
290
+ repo's `workflows/**`, validates every def with the engine's strict pass,
291
+ and installs it under `<defsDir>/<owner>-<repo>-<hash>/`, recording
292
+ provenance (resolved commit sha) in `.owenloop/installed.json`.
293
+ - **Workflow bundles** — `owenloop add widget.wnlp [--global]` (a local
294
+ `.wnlp` file or an `https://` URL) installs into a **content-addressed
295
+ store**: the project store lives under the defs dir, `--global` installs
296
+ into `<home>/.owenloop/workflows`. Each store holds an `index.json` mapping
297
+ `namespace/name@version` coordinates to content digests, plus immutable
298
+ objects at `objects/sha256/<digest>/` — identical content deduplicates to
299
+ one object, and an object's identity is its digest alone (never its name
300
+ or source). Objects are hardened read-only in place, and every resolution
301
+ re-verifies the bytes before returning a path. Execution workers resolve
302
+ static prompt and command text from those verified local objects by the
303
+ order's `defDigest`; a remote packet cannot substitute instruction text.
304
+
305
+ The bundle route derives `<home>` from the first non-blank caller-injected
306
+ `HOME` or `USERPROFILE` value (`HOME` wins), and uses that home for the default
307
+ recovery-marker directory. A bundle install refuses when neither variable is
308
+ supplied rather than falling back to the process user's ambient home.
309
+
310
+ Bundle installs fail closed without their two required adapters (bundle
311
+ ingestion and pre-commit verification). The default CLI binds the real
312
+ bundle ingestor, so a `.wnlp` produced by `packBundle` reaches the normal
313
+ entrypoint-aware install validation; the pre-commit verifier remains unbound,
314
+ so the CLI still fails closed rather than accepting an unverified bundle. There
315
+ is no default accepting signature verifier; the `add` route does not consume
316
+ publication sidecars or verify a bundle's signature. Use `owenloop publish` to
317
+ create the `.wnlp` bundle plus a signed publication sidecar and optional signed
318
+ origin sidecar, or an explicitly unsigned marker.
319
+ `--global` applies only to `.wnlp` bundle sources; a GitHub source with `--global`
320
+ is refused before any network request. Resolution is
321
+ deliberately split: execution resolves by **digest only** (project first,
322
+ fall-through to global only when the project object is absent — a corrupt
323
+ project object is a hard error, never masked by a global copy), while
324
+ human-facing lookups resolve by **coordinate** and surface a structured
325
+ ambiguity error when the two levels disagree — never a silent project-first
326
+ pick. Full semantics:
327
+ [`docs/cli.md`](docs/cli.md#add-with-bundles--the-content-addressed-workflow-store).
328
+
278
329
  ---
279
330
 
280
331
  ## Driving it with a loop
@@ -338,12 +389,42 @@ The skill interviews you for anything missing, writes and validates the YAML
338
389
  definition, then conducts the instance to done — dispatching each order to a
339
390
  fresh subagent, relaying knock-backs, and escalating stalls to you. Already
340
391
  have a def? *"Conduct the report workflow"* hands it to
341
- [`owenloop-conduct`](skills/owenloop-conduct/SKILL.md). The engine itself
342
- arrives via `npx owenloop` (Node ≥ 22.13 required) — no clone, no build, no
343
- environment variables, no CLI verbs to memorize. The same package also includes
344
- the execution-side companion; use `owenloop work <subcommand>` for lower-level
392
+ [`owenloop-conduct`](skills/owenloop-conduct/SKILL.md). The engine itself is the
393
+ `owenloop` CLI (Node ≥ 22.13 required). Install the package so `owenloop` is on
394
+ `PATH`; the shipped Claude Code and Codex plugins launch that same command as
395
+ `owenloop mcp`, rather than using a separate npx-pinned server. The plugins
396
+ check the installed CLI/plugin version pair at session start when their hooks
397
+ are enabled, and the MCP server reports a readable mismatch error on tool calls; run `owenloop setup` when the versions differ. For one-off shell
398
+ use, `npx owenloop` still works — no clone, no build, no environment
399
+ variables, no CLI verbs to memorize. The same package also includes the
400
+ execution-side companion; use `owenloop work <subcommand>` for lower-level
345
401
  execution tasks. There is no separate `owenwork` package or binary.
346
402
 
403
+ ### Deterministic workflow bundles
404
+
405
+ A workflow and its referenced regular files can be packaged as one deterministic
406
+ `.wnlp` file. The package format uses a canonical POSIX/PAX tar stream wrapped
407
+ in gzip; the package digest is SHA-256 over the exact uncompressed canonical
408
+ tar, not over the gzip bytes. `bundle.yaml` carries package identity, platform
409
+ selectors, requested capabilities, generated per-file SHA-256 values, and
410
+ namespace-qualified, digest-pinned `calls:` references. `workflow.yaml` remains
411
+ the only execution definition.
412
+
413
+ ```sh
414
+ owenloop bundle pack ./report --output ./report-1.2.0.wnlp
415
+ owenloop bundle inspect ./report-1.2.0.wnlp
416
+ owenloop bundle digest ./report-1.2.0.wnlp
417
+ owenloop bundle unpack ./report-1.2.0.wnlp ./unpacked-report
418
+ ```
419
+
420
+ Bundle commands are filesystem-only: they do not open or create the local
421
+ `.owenloop/state.db` and do not contact a remote service. Packing never edits
422
+ the source manifest. Inspection and unpacking reject unsafe paths, symlinks,
423
+ unsupported archive entry types, malformed canonical headers, duplicate files,
424
+ invalid manifests, workflow/manifest name mismatches, missing lock entries, and
425
+ integrity mismatches before files are written. See the [bundle format
426
+ reference](docs/bundles.md) and the [CLI bundle commands](docs/cli.md#bundles).
427
+
347
428
  For a foreground local shift, start the daemon in one terminal. Run the client
348
429
  commands from another terminal:
349
430
 
@@ -390,8 +471,10 @@ Publishing your defs to a hosted hub instead? `owenloop login` authenticates
390
471
  the CLI (loopback OAuth, or a pasted token via `--with-token`; the credential
391
472
  goes into the macOS Keychain or a `0600` file, never the repo, and is verified
392
473
  against the hub before it's ever stored), `owenloop connect` binds the project
393
- to a hub, and `owenloop push` publishes your defs — idempotent against the
394
- hub's own def hashes, so an unchanged re-push is a no-op. `owenloop agent new
474
+ to a hub, and `owenloop push` publishes your defs. Use `owenloop push --bundle
475
+ <bundle.wnlp>` after `owenloop publish` when execution must be pinned to the
476
+ exact signed bundle digest; plain YAML pushes remain idempotent against the
477
+ hub's own def hashes. `owenloop agent new
395
478
  <name>` mints a Scoped Identity on the hub and stores its token in slot
396
479
  `agent:<name>` without ever printing it. See the
397
480
  [Hub](docs/cli.md#hub-login--connect--push--logout) section in `docs/cli.md`.
@@ -402,13 +485,15 @@ and, when needed, mint or rekey and store a Scoped Identity. Setup writes only
402
485
  file is `$XDG_CONFIG_HOME/owenloop/settings.json` when `XDG_CONFIG_HOME` is
403
486
  set to a non-blank value; otherwise `$HOME/.config/owenloop/settings.json`. For
404
487
  a non-default account,
405
- setup only prints the `OWENLOOP_ACCOUNT=<name>` instruction. Setup probes the
406
- Claude Code plugin and, when it is missing, prints the manual commands
407
- `claude plugin marketplace add owenloop` and
408
- `claude plugin install owenloop@owenloop`; setup does not install the plugin.
409
- `owenloop doctor` is the read-only counterpart: it checks each piece and prints a
410
- `✓`/`✗` line with the remedy. See [`setup`](docs/cli.md#setup--onboard-a-machine)
411
- and [`doctor`](docs/cli.md#doctor--check-a-machines-install) in `docs/cli.md`.
488
+ setup only prints the `OWENLOOP_ACCOUNT=<name>` instruction. Setup probes and,
489
+ when needed, converges the bundled `owenloop` plugins for Claude Code and Codex.
490
+ Plugin convergence is non-fatal; a missing harness or failed plugin command does
491
+ not fail setup. A second run with the expected plugin version already installed
492
+ performs no plugin writes. `owenloop doctor` is the read-only counterpart: it
493
+ checks both harness plugin states, reports version skew, and prints a `✓`/`✗`
494
+ line with the remedy. See
495
+ [`setup`](docs/cli.md#setup--onboard-a-machine) and
496
+ [`doctor`](docs/cli.md#doctor--check-a-machines-install) in `docs/cli.md`.
412
497
 
413
498
  Driving the hub from an MCP host instead? `owenloop mcp` serves the hub control
414
499
  plane to a local MCP host (Claude Code) over stdio — MCP hosts spawn it, you
@@ -427,6 +512,13 @@ never surfacing a token to the model. See the
427
512
  - **No native dependencies.** `node:sqlite` is built in, so there's nothing to
428
513
  compile. The only runtime deps are `yaml` (parsing defs) and
429
514
  `@cfworker/json-schema` (optional per-artifact schema validation).
515
+ - **OpenSSH `ssh-keygen` with `-Y` support** (OpenSSH 8.1+) for the signing
516
+ features. `owenloop setup` automatically ensures an Ed25519 signing key for
517
+ each of the three local principals — human, machine, agent — and signs /
518
+ verifies records with stock SSHSIG (`ssh-keygen -Y`). Keys land in the macOS
519
+ Keychain, Linux libsecret (`secret-tool`), or a `0700`/`0600` file store
520
+ under `$HOME/.owenloop/keys/`; one backend is chosen once and never
521
+ error-fallback. See [Signing and key storage](docs/crypto.md).
430
522
 
431
523
  ```sh
432
524
  npm install owenloop
@@ -500,7 +592,7 @@ is an ordinary class, so you can drive it **in-process** and get typed objects b
500
592
  ```ts
501
593
  import { createEngine } from 'owenloop';
502
594
 
503
- const { engine, store } = createEngine({
595
+ const { engine, store, resolver } = createEngine({
504
596
  db: '.owenloop/state.db', // or ':memory:' for an ephemeral instance
505
597
  defsDir: 'workflows', // load YAML defs from a dir … or pass `defs: [myDef]`
506
598
  });
@@ -510,12 +602,16 @@ const wf = engine.createInstance('delivery', {
510
602
  provide: { proposal: { text: 'add dark mode' } },
511
603
  });
512
604
 
513
- // the Step Agent loop: tick → run → report
605
+ // the Step Agent loop: tick → resolve → run → report
514
606
  const { orders } = engine.tick(wf);
515
607
  for (const order of orders) {
516
- const result = await runYourAgent(order); // ← your domain
517
- engine.green(wf, order.run, order.outputs[0], result); // typed CommitResult back
518
- engine.close(wf, order.run);
608
+ // orders are reference packets: routing + dynamic data + a defDigest, never
609
+ // authored prompt/command text. Resolve before dispatch — same boundary the
610
+ // CLI uses; an unknown digest throws UnknownDefDigestError here.
611
+ const instructions = resolver.resolveOrder(order); // { prompt?, command? }
612
+ const result = await runYourAgent(order, instructions); // ← your domain
613
+ engine.green(order.workflow, order.run, order.outputs[0], result); // typed CommitResult back
614
+ engine.close(order.workflow, order.run);
519
615
  }
520
616
 
521
617
  engine.status(wf); // typed WorkflowStatus: done / debts / eligible / blocked
@@ -546,7 +642,9 @@ owenloop is small and split along a pure-core / imperative-shell line:
546
642
  | [`src/defs.ts`](src/defs.ts) | load YAML → validated `WorkflowDef` (the static wiring checks) |
547
643
  | [`src/schema.ts`](src/schema.ts) | JSON Schema validation of artifact values, via `@cfworker/json-schema` |
548
644
  | [`src/model.ts`](src/model.ts) | the pure core: what's eligible, the cascade, status, stall detection |
549
- | [`src/store.ts`](src/store.ts) | `node:sqlite` persistence; transactions; the commit check |
645
+ | [`src/store.ts`](src/store.ts) | the SQLite **runtime** store — `node:sqlite` persistence; transactions; the commit check (instance/artifact state) |
646
+ | [`src/install.ts`](src/install.ts) | the host-neutral install transaction: safe staging, atomic swap with a retained backup, two-phase journal, lock, recovery |
647
+ | [`src/store/`](src/store/) | the content-addressed **workflow** store — digest-addressed definition objects, the two-level coordinate index, `.wnlp` bundle install, fail-closed resolution (immutable defs; distinct from the runtime store) |
550
648
  | [`src/engine.ts`](src/engine.ts) | the imperative shell: `tick`/`green`/`reject`/… → mutate → `settle()` |
551
649
  | [`src/cli.ts`](src/cli.ts) | argv → engine calls, JSON on stdout |
552
650
 
@@ -566,9 +664,12 @@ carries a monotonic version, so the engine can always ask "is this green output
566
664
  resting on the inputs it was built from?".
567
665
 
568
666
  **Retention and disposal.** That file is the system of record and it keeps
569
- everything: every artifact version's value and every run's issued order packet —
667
+ everything: every artifact version's value and every run's issued order
668
+ packet — the dynamic input values it consumed and its rejection reasons,
570
669
  including any sensitive values that flowed through an input — persist after a
571
- workflow finishes. The default location is `.owenloop/state.db` (plus its WAL
670
+ workflow finishes. Authored prompt and command text are not in the packet
671
+ (orders are reference packets that carry a `defDigest` instead), so
672
+ instruction text is retained once, in the definition, not per firing. The default location is `.owenloop/state.db` (plus its WAL
572
673
  `-wal`/`-shm` sidecar files), or wherever `--db` / `OWENLOOP_DB` / the `db:`
573
674
  embed option points. Rotating or scrubbing that data is the operator's job:
574
675
  `owenloop delete <wf>` removes an instance's rows, but SQLite frees those pages
@@ -634,8 +735,9 @@ owenloop is a faithful, decoupled implementation of a dataflow-engine spec.
634
735
  [`docs/design.md`](docs/design.md) is a self-contained walkthrough — the lifecycle,
635
736
  firing rule, forward cascade, the reject kinds, the liveness rules, and the concurrency
636
737
  model — cross-referenced from the source. [`docs/cli.md`](docs/cli.md) has the full
637
- command reference, and [`docs/authoring.md`](docs/authoring.md) has the full YAML
638
- grammar.
738
+ command reference, [`docs/authoring.md`](docs/authoring.md) has the full YAML
739
+ grammar, and [`docs/wire-contracts.md`](docs/wire-contracts.md) defines the
740
+ versioned trust-boundary records.
639
741
 
640
742
  ---
641
743
 
package/bin/owenloop.mjs CHANGED
@@ -2,6 +2,54 @@
2
2
  // Thin shim: all real logic lives in src/cli.ts (so it stays testable) and is
3
3
  // shipped compiled to dist/src/cli.js. Node cannot type-strip files under
4
4
  // node_modules, so the published package runs plain JS, not TypeScript source.
5
- import { mainAsync } from '../dist/src/cli.js';
5
+ import { readFile, rm } from 'node:fs/promises';
6
+ import { performance } from 'node:perf_hooks';
7
+ import { setTimeout as sleep } from 'node:timers/promises';
6
8
 
9
+ const START_GATE_TIMEOUT_MS = 2 * 60_000;
10
+
11
+ /**
12
+ * A Shift-spawned worker cannot import or execute the CLI until the parent has
13
+ * durably replaced its reservation with a PID-bearing record. Missing,
14
+ * cancelled, or expired gates fail closed before any role can contact the hub.
15
+ */
16
+ async function waitForStartGate(path) {
17
+ const deadline = performance.now() + START_GATE_TIMEOUT_MS;
18
+ for (;;) {
19
+ let signal;
20
+ try {
21
+ signal = (await readFile(path, 'utf8')).trim();
22
+ } catch (error) {
23
+ if (error?.code === 'ENOENT') return false;
24
+ throw error;
25
+ }
26
+ if (signal === 'start') {
27
+ await rm(path, { force: true });
28
+ return true;
29
+ }
30
+ if (signal === 'cancel') {
31
+ await rm(path, { force: true });
32
+ return false;
33
+ }
34
+ if (performance.now() >= deadline) {
35
+ await rm(path, { force: true });
36
+ return false;
37
+ }
38
+ await sleep(25);
39
+ }
40
+ }
41
+
42
+ const gatePath = process.env.OWENLOOP_START_GATE;
43
+ if (gatePath !== undefined && gatePath !== '') {
44
+ let allowed = false;
45
+ try {
46
+ allowed = await waitForStartGate(gatePath);
47
+ } catch (error) {
48
+ process.stderr.write(`owenloop: start gate failed: ${error instanceof Error ? error.message : String(error)}\n`);
49
+ }
50
+ if (!allowed) process.exit(75);
51
+ delete process.env.OWENLOOP_START_GATE;
52
+ }
53
+
54
+ const { mainAsync } = await import('../dist/src/cli.js');
7
55
  mainAsync(process.argv.slice(2)).then((code) => process.exit(code));
@@ -9,8 +9,10 @@
9
9
  * minus the file. The worker hands the result straight to
10
10
  * `HarnessAdapter.start` as `StartArgs.brief`.
11
11
  * - `buildOwenloopMcp(spec)` — the `{command, args}` stdio mount for owenloop's
12
- * own work-holder MCP surface, byte-identical to the `mcpServers.owenloop`
13
- * literal the legacy host adapter injects into stamped frontmatter today.
12
+ * own full work-holder MCP surface, byte-identical to the
13
+ * `mcpServers.owenloop` literal the legacy host adapter injects into stamped
14
+ * frontmatter today. A restricted adapter may append the hold role's positive
15
+ * tool selector without changing the born-bound identity arguments.
14
16
  *
15
17
  * WHY THE TOKENS ARE DECLARED HERE AND NOT IMPORTED (plan D4): the legacy
16
18
  * host-adapter module under `src/adapters/` is what Phase 5 deletes, and it is
@@ -66,7 +68,9 @@ export interface BriefSpec {
66
68
  export declare function renderBrief(templateContent: string, spec: BriefSpec): string;
67
69
  /**
68
70
  * The born-bound work-holder mount handed to `HarnessAdapter.start` as
69
- * `StartArgs.owenloopMcp`. The adapter mounts it verbatim and never builds it.
71
+ * `StartArgs.owenloopMcp`. The adapter never constructs or changes the bound
72
+ * identity. A restricted adapter may append the hold role's positive MCP tool
73
+ * selector before mounting the command.
70
74
  *
71
75
  * `--shift=<cid>` is ONE argv element, not two. An absent cid then degrades
72
76
  * to the single well-formed string `"--shift="` instead of a dangling flag
@@ -74,7 +78,7 @@ export declare function renderBrief(templateContent: string, spec: BriefSpec): s
74
78
  * (The shape originated with the deleted stamp path, which had to survive a YAML
75
79
  * args array; it is kept because it is still the correct, unambiguous form.)
76
80
  */
77
- export declare function buildOwenloopMcp(spec: BriefSpec): {
81
+ export declare function buildOwenloopMcp(spec: BriefSpec, binPath?: string, execPath?: string): {
78
82
  command: string;
79
83
  args: string[];
80
84
  };
@@ -1,3 +1,4 @@
1
+ import { resolveOwenloopBin } from "../owenloop-bin.js";
1
2
  /** The composite `<workflow>/<run>` order id token. */
2
3
  export const ORDER_TOKEN = '__OWENLOOP_ORDER__';
3
4
  /** The hub origin token. */
@@ -30,7 +31,9 @@ export function renderBrief(templateContent, spec) {
30
31
  }
31
32
  /**
32
33
  * The born-bound work-holder mount handed to `HarnessAdapter.start` as
33
- * `StartArgs.owenloopMcp`. The adapter mounts it verbatim and never builds it.
34
+ * `StartArgs.owenloopMcp`. The adapter never constructs or changes the bound
35
+ * identity. A restricted adapter may append the hold role's positive MCP tool
36
+ * selector before mounting the command.
34
37
  *
35
38
  * `--shift=<cid>` is ONE argv element, not two. An absent cid then degrades
36
39
  * to the single well-formed string `"--shift="` instead of a dangling flag
@@ -38,10 +41,11 @@ export function renderBrief(templateContent, spec) {
38
41
  * (The shape originated with the deleted stamp path, which had to survive a YAML
39
42
  * args array; it is kept because it is still the correct, unambiguous form.)
40
43
  */
41
- export function buildOwenloopMcp(spec) {
44
+ export function buildOwenloopMcp(spec, binPath = resolveOwenloopBin(), execPath = process.execPath) {
42
45
  return {
43
- command: 'owenloop',
46
+ command: execPath,
44
47
  args: [
48
+ binPath,
45
49
  'work',
46
50
  'hold',
47
51
  '--order',
@@ -1,19 +1,21 @@
1
1
  import type { HubClient } from '../hub/client.ts';
2
2
  import type { ContactHolder, OrderPacket } from '../hub/types.ts';
3
+ import type { ConsumedVerifier } from '../consumed-verifier.ts';
3
4
  import type { NormalizedStepSpec } from '../bundle/types.ts';
4
5
  import type { HarnessAdapter } from '../harness/contract.ts';
5
6
  import { type SessionRecord } from '../harness/session-store.ts';
7
+ import { type ModelPolicy } from './model-policy.ts';
6
8
  /** Discriminated result of one worker life; the role maps these to exit codes. */
7
- export type AgentRunOutcome = 'submitted' | 'completed' | 'misroute' | 'no-template' | 'no-harness' | 'no-submit' | 'killed' | 'lease-lost' | 'ownership-error' | 'hub-unreachable' | 'stopped';
9
+ export type AgentRunOutcome = 'submitted' | 'completed' | 'misroute' | 'no-template' | 'no-harness' | 'incompatible-harness-policy' | 'unverified-consumed' | 'session-store-failed' | 'no-submit' | 'killed' | 'lease-lost' | 'ownership-error' | 'hub-unreachable' | 'stopped';
8
10
  /**
9
11
  * Locate the normalized step spec for an order. Injected because the lookup is
10
- * I/O (the bundle cache) and because resolving WHICH cached def serves this
11
- * instance is the role's business, not the loop's. `null` ⇒ no spec, which is
12
- * the `'no-template'` outcome (release, leave it for the pickup window).
12
+ * I/O (the verified workflow store) and because resolving the local definition
13
+ * is the role's business, not the loop's. `null` means instruction resolution
14
+ * refused; the loop releases and leaves the order for the pickup window.
13
15
  *
14
- * The spec arrives ALREADY NORMALIZED from `prepare` — brief, harness id, and
15
- * `StepPermissions`. That is what lets this loop stay vendor-neutral: it never
16
- * reaches into a step def's extension bag, so there is no key to name.
16
+ * The spec arrives already normalized from the verified `StepDef` — brief,
17
+ * harness id, and `StepPermissions`. The loop stays vendor-neutral: it never
18
+ * reaches into a step definition's extension bag, so there is no key to name.
17
19
  */
18
20
  export type StepLoader = (order: OrderPacket) => Promise<NormalizedStepSpec | null>;
19
21
  /**
@@ -52,6 +54,10 @@ export interface AgentRunLoopOptions {
52
54
  cwd: string;
53
55
  loadStep: StepLoader;
54
56
  resolveAdapter: AdapterResolver;
57
+ /** Resolve authored model tiers and retry escalation before dispatch. */
58
+ modelPolicy?: ModelPolicy;
59
+ /** Gate dynamic values and rejection reasons before any prompt rendering. */
60
+ consumedVerifier?: ConsumedVerifier;
55
61
  /** Append one session record. Wired to `appendSession` by the role. */
56
62
  appendSession: (rec: SessionRecord) => void;
57
63
  /** The attempt number for this `(workflow, run, step)`. Wired to `latestFor`. */