pi-daddy 0.22.0 → 0.23.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 (362) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/contracts/daily-view/v1/README.md +114 -0
  3. package/contracts/daily-view/v1/fixtures/view.json +525 -0
  4. package/contracts/daily-view/v1/fixtures/view.txt +75 -0
  5. package/contracts/daily-view/v1/fixtures/work.jsonl +17 -0
  6. package/contracts/daily-view/v1/p03/README.md +26 -0
  7. package/contracts/daily-view/v1/p03/fixtures/retained-executions.json +241 -0
  8. package/contracts/daily-view/v1/p03/projection.schema.json +194 -0
  9. package/contracts/daily-view/v1/p03/provenance.json +21 -0
  10. package/contracts/dashboard-host/v1/README.md +176 -0
  11. package/contracts/debrief/v1/README.md +146 -0
  12. package/contracts/debrief/v1/intervention/README.md +32 -0
  13. package/contracts/debrief/v1/intervention/fixtures/artifact-3ee11136beb864f518252e5024dae9197421fbf97b6e981d3243c782b5c44bd0.txt +1 -0
  14. package/contracts/debrief/v1/intervention/fixtures/artifact-58905d872dd3c54a9705f67b05fa82edbad7af6476ae8993faf1a7b9fadfb905.txt +1 -0
  15. package/contracts/debrief/v1/intervention/fixtures/assessment.json +29 -0
  16. package/contracts/debrief/v1/intervention/fixtures/blind-view.json +20 -0
  17. package/contracts/debrief/v1/intervention/fixtures/choice.json +7 -0
  18. package/contracts/debrief/v1/intervention/fixtures/manifest.json +57 -0
  19. package/contracts/debrief/v1/intervention/fixtures/reveal.json +39 -0
  20. package/contracts/debrief/v1/provenance.json +89 -0
  21. package/contracts/debrief/v1/work-capture/README.md +38 -0
  22. package/contracts/debrief/v1/work-capture/fixtures/batch.json +17 -0
  23. package/contracts/debrief/v1/work-capture/fixtures/cases.json +184 -0
  24. package/contracts/debrief/v1/work-capture/fixtures/review.json +184 -0
  25. package/contracts/debrief/v1/work-capture/review-request.schema.json +41 -0
  26. package/contracts/debrief/v1/work-capture/work-case.schema.json +190 -0
  27. package/contracts/debrief/v2/README.md +71 -0
  28. package/contracts/debrief/v2/input-pin.json +66 -0
  29. package/contracts/debrief/v2/intervention-upstream.md +40 -0
  30. package/contracts/debrief/v2/work-signals-upstream.md +22 -0
  31. package/contracts/dispatch-control/v1/README.md +109 -0
  32. package/contracts/dispatch-control/v1/request.schema.json +19 -0
  33. package/contracts/effect-profile/v1/README.md +124 -0
  34. package/contracts/execution-retention/v1/README.md +109 -0
  35. package/contracts/execution-retention/v2/README.md +148 -0
  36. package/contracts/execution-retention/v2/fixtures/interrupted-native-bytes.json +91 -0
  37. package/contracts/execution-retention/v2/fixtures/missing-native-session.json +91 -0
  38. package/contracts/execution-retention/v2/fixtures/native-file-unknown-branch.json +91 -0
  39. package/contracts/execution-retention/v2/fixtures/native-id-without-bytes.json +91 -0
  40. package/contracts/execution-retention/v2/fixtures/native-live-branch.json +90 -0
  41. package/contracts/execution-retention/v2/fixtures/replaced-native-session.json +92 -0
  42. package/contracts/execution-retention/v2/fixtures/result-82c620cdfeb8ca6b858cf653d7f5e2eedca5315d6244216d60e8b36f03223d6a.bin +1 -0
  43. package/contracts/execution-retention/v2/fixtures/session-2ec1f134bc739984434f7fca689e1c3d1c39fce2dcadae709e9b6faedfcc4ac7.bin +3 -0
  44. package/contracts/execution-retention/v2/fixtures/session-9bdb4bd16a901da31580acf056bda525225259e15ec409e0410480109011772f.bin +3 -0
  45. package/contracts/execution-retention/v2/manifest.schema.json +858 -0
  46. package/contracts/experiment/v1/README.md +164 -0
  47. package/contracts/factory-order/v1/README.md +151 -0
  48. package/contracts/factory-order/v1/adoption-pin.json +8 -0
  49. package/contracts/intent-control/v1/README.md +135 -0
  50. package/contracts/intent-control/v1/request.schema.json +1096 -0
  51. package/contracts/intent-control/v2/README.md +34 -0
  52. package/contracts/intent-control/v2/request.schema.json +1070 -0
  53. package/contracts/ledger/v4/README.md +241 -0
  54. package/contracts/ledger/v4/fixtures/layout-options.json +428 -0
  55. package/contracts/ledger/v4/fixtures/work-acceptance.json +57 -0
  56. package/contracts/ledger/v4/fixtures/work-occurrence.json +44 -0
  57. package/contracts/ledger/v4/fixtures/work-revision.json +26 -0
  58. package/contracts/ledger/v4/fixtures/work-snapshot.json +73 -0
  59. package/contracts/ledger/v4/ledger-event.schema.json +162 -0
  60. package/contracts/ordinary-control/v1/README.md +59 -0
  61. package/contracts/producer-ipc/v1/README.md +137 -0
  62. package/dist/check-runner.d.ts +5 -0
  63. package/dist/check-runner.d.ts.map +1 -1
  64. package/dist/check-runner.js +16 -2
  65. package/dist/check-runner.js.map +1 -1
  66. package/dist/control-journal.d.ts +20 -0
  67. package/dist/control-journal.d.ts.map +1 -0
  68. package/dist/control-journal.js +73 -0
  69. package/dist/control-journal.js.map +1 -0
  70. package/dist/daily-view-input.d.ts +44 -0
  71. package/dist/daily-view-input.d.ts.map +1 -0
  72. package/dist/daily-view-input.js +68 -0
  73. package/dist/daily-view-input.js.map +1 -0
  74. package/dist/daily-view-render.d.ts +4 -0
  75. package/dist/daily-view-render.d.ts.map +1 -0
  76. package/dist/daily-view-render.js +41 -0
  77. package/dist/daily-view-render.js.map +1 -0
  78. package/dist/daily-view.d.ts +74 -0
  79. package/dist/daily-view.d.ts.map +1 -0
  80. package/dist/daily-view.js +170 -0
  81. package/dist/daily-view.js.map +1 -0
  82. package/dist/dashboard-cli.d.ts +26 -1
  83. package/dist/dashboard-cli.d.ts.map +1 -1
  84. package/dist/dashboard-cli.js +121 -3
  85. package/dist/dashboard-cli.js.map +1 -1
  86. package/dist/dashboard-harness.d.ts +19 -0
  87. package/dist/dashboard-harness.d.ts.map +1 -0
  88. package/dist/dashboard-harness.js +75 -0
  89. package/dist/dashboard-harness.js.map +1 -0
  90. package/dist/dashboard-herdr.d.ts.map +1 -1
  91. package/dist/dashboard-herdr.js +7 -2
  92. package/dist/dashboard-herdr.js.map +1 -1
  93. package/dist/dashboard-host-contract.d.ts +111 -0
  94. package/dist/dashboard-host-contract.d.ts.map +1 -0
  95. package/dist/dashboard-host-contract.js +14 -0
  96. package/dist/dashboard-host-contract.js.map +1 -0
  97. package/dist/dashboard-host-transport.d.ts +15 -0
  98. package/dist/dashboard-host-transport.d.ts.map +1 -0
  99. package/dist/dashboard-host-transport.js +122 -0
  100. package/dist/dashboard-host-transport.js.map +1 -0
  101. package/dist/dashboard-host.d.ts +149 -0
  102. package/dist/dashboard-host.d.ts.map +1 -0
  103. package/dist/dashboard-host.js +329 -0
  104. package/dist/dashboard-host.js.map +1 -0
  105. package/dist/dashboard-observation.d.ts +28 -0
  106. package/dist/dashboard-observation.d.ts.map +1 -0
  107. package/dist/dashboard-observation.js +86 -0
  108. package/dist/dashboard-observation.js.map +1 -0
  109. package/dist/debrief-contract.d.ts +65 -0
  110. package/dist/debrief-contract.d.ts.map +1 -0
  111. package/dist/debrief-contract.js +151 -0
  112. package/dist/debrief-contract.js.map +1 -0
  113. package/dist/debrief-fixture.d.ts +16 -0
  114. package/dist/debrief-fixture.d.ts.map +1 -0
  115. package/dist/debrief-fixture.js +41 -0
  116. package/dist/debrief-fixture.js.map +1 -0
  117. package/dist/debrief-host.d.ts +59 -0
  118. package/dist/debrief-host.d.ts.map +1 -0
  119. package/dist/debrief-host.js +49 -0
  120. package/dist/debrief-host.js.map +1 -0
  121. package/dist/debrief-render.d.ts +5 -0
  122. package/dist/debrief-render.d.ts.map +1 -0
  123. package/dist/debrief-render.js +65 -0
  124. package/dist/debrief-render.js.map +1 -0
  125. package/dist/debrief.d.ts +90 -0
  126. package/dist/debrief.d.ts.map +1 -0
  127. package/dist/debrief.js +263 -0
  128. package/dist/debrief.js.map +1 -0
  129. package/dist/delegate-types.d.ts +2 -0
  130. package/dist/delegate-types.d.ts.map +1 -1
  131. package/dist/delegate-types.js.map +1 -1
  132. package/dist/delegate.d.ts.map +1 -1
  133. package/dist/delegate.js +1 -0
  134. package/dist/delegate.js.map +1 -1
  135. package/dist/dispatch-control.d.ts +45 -0
  136. package/dist/dispatch-control.d.ts.map +1 -0
  137. package/dist/dispatch-control.js +76 -0
  138. package/dist/dispatch-control.js.map +1 -0
  139. package/dist/effect-profile-runtime.d.ts +40 -0
  140. package/dist/effect-profile-runtime.d.ts.map +1 -0
  141. package/dist/effect-profile-runtime.js +51 -0
  142. package/dist/effect-profile-runtime.js.map +1 -0
  143. package/dist/effect-profile.d.ts +40 -0
  144. package/dist/effect-profile.d.ts.map +1 -0
  145. package/dist/effect-profile.js +152 -0
  146. package/dist/effect-profile.js.map +1 -0
  147. package/dist/execution-retention.d.ts +90 -0
  148. package/dist/execution-retention.d.ts.map +1 -0
  149. package/dist/execution-retention.js +247 -0
  150. package/dist/execution-retention.js.map +1 -0
  151. package/dist/experiment-contract.d.ts +56 -0
  152. package/dist/experiment-contract.d.ts.map +1 -0
  153. package/dist/experiment-contract.js +80 -0
  154. package/dist/experiment-contract.js.map +1 -0
  155. package/dist/experiment-state.d.ts +22 -0
  156. package/dist/experiment-state.d.ts.map +1 -0
  157. package/dist/experiment-state.js +79 -0
  158. package/dist/experiment-state.js.map +1 -0
  159. package/dist/experiment-store.d.ts +28 -0
  160. package/dist/experiment-store.d.ts.map +1 -0
  161. package/dist/experiment-store.js +130 -0
  162. package/dist/experiment-store.js.map +1 -0
  163. package/dist/experiment.d.ts +65 -0
  164. package/dist/experiment.d.ts.map +1 -0
  165. package/dist/experiment.js +357 -0
  166. package/dist/experiment.js.map +1 -0
  167. package/dist/factory-contract.d.ts +79 -0
  168. package/dist/factory-contract.d.ts.map +1 -0
  169. package/dist/factory-contract.js +89 -0
  170. package/dist/factory-contract.js.map +1 -0
  171. package/dist/factory-migration.d.ts +20 -0
  172. package/dist/factory-migration.d.ts.map +1 -0
  173. package/dist/factory-migration.js +55 -0
  174. package/dist/factory-migration.js.map +1 -0
  175. package/dist/factory-order.d.ts +848 -0
  176. package/dist/factory-order.d.ts.map +1 -0
  177. package/dist/factory-order.js +83 -0
  178. package/dist/factory-order.js.map +1 -0
  179. package/dist/factory-registry.d.ts +121 -0
  180. package/dist/factory-registry.d.ts.map +1 -0
  181. package/dist/factory-registry.js +133 -0
  182. package/dist/factory-registry.js.map +1 -0
  183. package/dist/file-lock.d.ts +8 -2
  184. package/dist/file-lock.d.ts.map +1 -1
  185. package/dist/file-lock.js +78 -19
  186. package/dist/file-lock.js.map +1 -1
  187. package/dist/herdr-poll.d.ts +8 -0
  188. package/dist/herdr-poll.d.ts.map +1 -1
  189. package/dist/herdr-poll.js +23 -0
  190. package/dist/herdr-poll.js.map +1 -1
  191. package/dist/index.d.ts +20 -0
  192. package/dist/index.d.ts.map +1 -1
  193. package/dist/index.js +20 -0
  194. package/dist/index.js.map +1 -1
  195. package/dist/intent-application.d.ts +17 -0
  196. package/dist/intent-application.d.ts.map +1 -0
  197. package/dist/intent-application.js +113 -0
  198. package/dist/intent-application.js.map +1 -0
  199. package/dist/intent-control.d.ts +201 -0
  200. package/dist/intent-control.d.ts.map +1 -0
  201. package/dist/intent-control.js +110 -0
  202. package/dist/intent-control.js.map +1 -0
  203. package/dist/intent-scheduling.d.ts +9 -0
  204. package/dist/intent-scheduling.d.ts.map +1 -0
  205. package/dist/intent-scheduling.js +15 -0
  206. package/dist/intent-scheduling.js.map +1 -0
  207. package/dist/ledger-append.d.ts +15 -0
  208. package/dist/ledger-append.d.ts.map +1 -0
  209. package/dist/ledger-append.js +94 -0
  210. package/dist/ledger-append.js.map +1 -0
  211. package/dist/ledger.d.ts +11 -0
  212. package/dist/ledger.d.ts.map +1 -1
  213. package/dist/ledger.js +3 -7
  214. package/dist/ledger.js.map +1 -1
  215. package/dist/native-session-target.d.ts +9 -0
  216. package/dist/native-session-target.d.ts.map +1 -0
  217. package/dist/native-session-target.js +29 -0
  218. package/dist/native-session-target.js.map +1 -0
  219. package/dist/native-session.d.ts +59 -0
  220. package/dist/native-session.d.ts.map +1 -0
  221. package/dist/native-session.js +154 -0
  222. package/dist/native-session.js.map +1 -0
  223. package/dist/order-schedule.d.ts +37 -0
  224. package/dist/order-schedule.d.ts.map +1 -0
  225. package/dist/order-schedule.js +81 -0
  226. package/dist/order-schedule.js.map +1 -0
  227. package/dist/ordinary-children.d.ts +52 -0
  228. package/dist/ordinary-children.d.ts.map +1 -0
  229. package/dist/ordinary-children.js +93 -0
  230. package/dist/ordinary-children.js.map +1 -0
  231. package/dist/producer-ipc-contract.d.ts +29 -0
  232. package/dist/producer-ipc-contract.d.ts.map +1 -0
  233. package/dist/producer-ipc-contract.js +29 -0
  234. package/dist/producer-ipc-contract.js.map +1 -0
  235. package/dist/producer-ipc.d.ts +55 -0
  236. package/dist/producer-ipc.d.ts.map +1 -0
  237. package/dist/producer-ipc.js +143 -0
  238. package/dist/producer-ipc.js.map +1 -0
  239. package/dist/resource-budget.d.ts +334 -0
  240. package/dist/resource-budget.d.ts.map +1 -0
  241. package/dist/resource-budget.js +415 -0
  242. package/dist/resource-budget.js.map +1 -0
  243. package/dist/retention-contract.d.ts +73 -0
  244. package/dist/retention-contract.d.ts.map +1 -0
  245. package/dist/retention-contract.js +104 -0
  246. package/dist/retention-contract.js.map +1 -0
  247. package/dist/retention-json.d.ts +3 -0
  248. package/dist/retention-json.d.ts.map +1 -0
  249. package/dist/retention-json.js +32 -0
  250. package/dist/retention-json.js.map +1 -0
  251. package/dist/run-child.d.ts +4 -0
  252. package/dist/run-child.d.ts.map +1 -1
  253. package/dist/run-child.js +16 -2
  254. package/dist/run-child.js.map +1 -1
  255. package/dist/run-herdr.d.ts +6 -0
  256. package/dist/run-herdr.d.ts.map +1 -1
  257. package/dist/run-herdr.js +19 -6
  258. package/dist/run-herdr.js.map +1 -1
  259. package/dist/vendor/adoption.d.ts +129 -0
  260. package/dist/vendor/adoption.d.ts.map +1 -0
  261. package/dist/vendor/adoption.js +102 -0
  262. package/dist/vendor/adoption.js.map +1 -0
  263. package/dist/work-ledger-destination.d.ts +20 -0
  264. package/dist/work-ledger-destination.d.ts.map +1 -0
  265. package/dist/work-ledger-destination.js +131 -0
  266. package/dist/work-ledger-destination.js.map +1 -0
  267. package/dist/work-ledger-json.d.ts +25 -0
  268. package/dist/work-ledger-json.d.ts.map +1 -0
  269. package/dist/work-ledger-json.js +267 -0
  270. package/dist/work-ledger-json.js.map +1 -0
  271. package/dist/work-ledger-occurrences.d.ts +227 -0
  272. package/dist/work-ledger-occurrences.d.ts.map +1 -0
  273. package/dist/work-ledger-occurrences.js +115 -0
  274. package/dist/work-ledger-occurrences.js.map +1 -0
  275. package/dist/work-ledger-projection.d.ts +295 -0
  276. package/dist/work-ledger-projection.d.ts.map +1 -0
  277. package/dist/work-ledger-projection.js +237 -0
  278. package/dist/work-ledger-projection.js.map +1 -0
  279. package/dist/work-ledger-snapshot.d.ts +29 -0
  280. package/dist/work-ledger-snapshot.d.ts.map +1 -0
  281. package/dist/work-ledger-snapshot.js +267 -0
  282. package/dist/work-ledger-snapshot.js.map +1 -0
  283. package/dist/work-ledger-types.d.ts +261 -0
  284. package/dist/work-ledger-types.d.ts.map +1 -0
  285. package/dist/work-ledger-types.js +13 -0
  286. package/dist/work-ledger-types.js.map +1 -0
  287. package/dist/work-ledger-validation.d.ts +14 -0
  288. package/dist/work-ledger-validation.d.ts.map +1 -0
  289. package/dist/work-ledger-validation.js +226 -0
  290. package/dist/work-ledger-validation.js.map +1 -0
  291. package/dist/work-ledger.d.ts +43 -0
  292. package/dist/work-ledger.d.ts.map +1 -0
  293. package/dist/work-ledger.js +225 -0
  294. package/dist/work-ledger.js.map +1 -0
  295. package/extensions/delegate-chain.ts +1 -0
  296. package/extensions/delegation-native.ts +12 -0
  297. package/extensions/delegation.ts +4 -3
  298. package/extensions/execute-child.ts +34 -4
  299. package/extensions/grants.ts +2 -0
  300. package/extensions/ordinary-runtime.ts +14 -0
  301. package/extensions/run-delegation.ts +7 -7
  302. package/extensions/session.ts +3 -1
  303. package/package.json +78 -4
  304. package/src/check-runner.ts +20 -2
  305. package/src/control-journal.ts +26 -0
  306. package/src/daily-view-input.ts +59 -0
  307. package/src/daily-view-render.ts +44 -0
  308. package/src/daily-view.ts +152 -0
  309. package/src/dashboard-cli.ts +103 -4
  310. package/src/dashboard-harness.ts +28 -0
  311. package/src/dashboard-herdr.ts +7 -2
  312. package/src/dashboard-host-contract.ts +42 -0
  313. package/src/dashboard-host-transport.ts +38 -0
  314. package/src/dashboard-host.ts +168 -0
  315. package/src/dashboard-observation.ts +44 -0
  316. package/src/debrief-contract.ts +127 -0
  317. package/src/debrief-fixture.ts +29 -0
  318. package/src/debrief-host.ts +53 -0
  319. package/src/debrief-render.ts +49 -0
  320. package/src/debrief.ts +198 -0
  321. package/src/delegate-types.ts +2 -0
  322. package/src/delegate.ts +1 -0
  323. package/src/dispatch-control.ts +81 -0
  324. package/src/effect-profile-runtime.ts +46 -0
  325. package/src/effect-profile.ts +129 -0
  326. package/src/execution-retention.ts +230 -0
  327. package/src/experiment-contract.ts +66 -0
  328. package/src/experiment-state.ts +44 -0
  329. package/src/experiment-store.ts +90 -0
  330. package/src/experiment.ts +231 -0
  331. package/src/factory-contract.ts +47 -0
  332. package/src/factory-migration.ts +29 -0
  333. package/src/factory-order.ts +56 -0
  334. package/src/factory-registry.ts +60 -0
  335. package/src/file-lock.ts +47 -11
  336. package/src/herdr-poll.ts +18 -0
  337. package/src/index.ts +32 -0
  338. package/src/intent-application.ts +90 -0
  339. package/src/intent-control.ts +107 -0
  340. package/src/intent-scheduling.ts +14 -0
  341. package/src/ledger-append.ts +72 -0
  342. package/src/ledger.ts +3 -9
  343. package/src/native-session-target.ts +23 -0
  344. package/src/native-session.ts +139 -0
  345. package/src/order-schedule.ts +42 -0
  346. package/src/ordinary-children.ts +59 -0
  347. package/src/producer-ipc-contract.ts +26 -0
  348. package/src/producer-ipc.ts +107 -0
  349. package/src/resource-budget.ts +349 -0
  350. package/src/retention-contract.ts +84 -0
  351. package/src/retention-json.ts +20 -0
  352. package/src/run-child.ts +13 -2
  353. package/src/run-herdr.ts +11 -7
  354. package/src/vendor/adoption.ts +109 -0
  355. package/src/work-ledger-destination.ts +113 -0
  356. package/src/work-ledger-json.ts +228 -0
  357. package/src/work-ledger-occurrences.ts +99 -0
  358. package/src/work-ledger-projection.ts +262 -0
  359. package/src/work-ledger-snapshot.ts +246 -0
  360. package/src/work-ledger-types.ts +229 -0
  361. package/src/work-ledger-validation.ts +174 -0
  362. package/src/work-ledger.ts +186 -0
@@ -0,0 +1,57 @@
1
+ {
2
+ "ledgerVersion": 4,
3
+ "event": "work_acceptance",
4
+ "eventId": "acceptance",
5
+ "ts": "2026-09-06T12:00:00.000Z",
6
+ "payload": {
7
+ "authorityId": "authority",
8
+ "binding": {
9
+ "intent": {
10
+ "kind": "goal",
11
+ "id": "goal",
12
+ "revision": 1,
13
+ "digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
14
+ },
15
+ "obligation": {
16
+ "kind": "obligation",
17
+ "id": "obligation",
18
+ "revision": 1,
19
+ "digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
20
+ },
21
+ "artifact": {
22
+ "kind": "artifact",
23
+ "id": "artifact",
24
+ "revision": 1,
25
+ "digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
26
+ },
27
+ "policy": {
28
+ "kind": "policy",
29
+ "id": "policy",
30
+ "revision": 1,
31
+ "digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
32
+ },
33
+ "scope": {
34
+ "kind": "scope",
35
+ "id": "scope",
36
+ "revision": 1,
37
+ "digest": "191d991431d5dcbd940304f916579e57540e0d555e263f6d22a0e8aa4e416233"
38
+ },
39
+ "snapshot": {
40
+ "id": "snapshot",
41
+ "digest": "6fe1623dda96511e95e862b1f2714f9f909e2bf2b585dbd10af1ff52f3f7b5f8"
42
+ },
43
+ "artifactDigest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
44
+ "evidence": [
45
+ {
46
+ "id": "evidence",
47
+ "digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
48
+ "event": {
49
+ "eventId": "occurrence",
50
+ "digest": "36935a3a42473122ebfb359371131311270253b0959101e047f8f5d75dbf639d"
51
+ }
52
+ }
53
+ ]
54
+ }
55
+ },
56
+ "digest": "219fc728cd50368d7679f3d0db9bdb217c1fac06db6bde07373750a3671a0877"
57
+ }
@@ -0,0 +1,44 @@
1
+ {
2
+ "ledgerVersion": 4,
3
+ "event": "work_occurrence",
4
+ "eventId": "occurrence",
5
+ "ts": "2026-09-06T12:00:00.000Z",
6
+ "payload": {
7
+ "scope": {
8
+ "kind": "scope",
9
+ "id": "scope",
10
+ "revision": 1,
11
+ "digest": "191d991431d5dcbd940304f916579e57540e0d555e263f6d22a0e8aa4e416233"
12
+ },
13
+ "obligation": {
14
+ "kind": "obligation",
15
+ "id": "obligation",
16
+ "revision": 1,
17
+ "digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
18
+ },
19
+ "executionId": "exec:00000000-0000-4000-8000-000000000001",
20
+ "parentExecutionId": null,
21
+ "childId": null,
22
+ "variantId": null,
23
+ "artifact": {
24
+ "kind": "artifact",
25
+ "id": "artifact",
26
+ "revision": 1,
27
+ "digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
28
+ },
29
+ "provenance": "observed",
30
+ "state": "completed",
31
+ "labels": {
32
+ "sessionId": null,
33
+ "branchLeafId": null,
34
+ "toolCallId": null,
35
+ "taskId": null,
36
+ "workspaceId": null,
37
+ "definitionDigest": null,
38
+ "configurationDigest": null,
39
+ "modelId": null,
40
+ "effortId": null
41
+ }
42
+ },
43
+ "digest": "36935a3a42473122ebfb359371131311270253b0959101e047f8f5d75dbf639d"
44
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "ledgerVersion": 4,
3
+ "event": "work_revision",
4
+ "eventId": "revision",
5
+ "ts": "2026-09-06T12:00:00.000Z",
6
+ "payload": {
7
+ "revision": {
8
+ "kind": "scope",
9
+ "id": "scope",
10
+ "scopeId": "scope",
11
+ "revision": 1,
12
+ "predecessor": null,
13
+ "contentDigest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
14
+ "parent": null,
15
+ "dependencies": [],
16
+ "ownerId": "owner",
17
+ "permittedEffects": [
18
+ "read",
19
+ "write"
20
+ ],
21
+ "policy": null,
22
+ "digest": "191d991431d5dcbd940304f916579e57540e0d555e263f6d22a0e8aa4e416233"
23
+ }
24
+ },
25
+ "digest": "166a77a5c489dd37a350c6f0faa1058ea8ca4e764f35d8d21a19a083c6291c0a"
26
+ }
@@ -0,0 +1,73 @@
1
+ {
2
+ "ledgerVersion": 4,
3
+ "event": "work_snapshot",
4
+ "eventId": "snapshot",
5
+ "ts": "2026-09-06T12:00:00.000Z",
6
+ "payload": {
7
+ "snapshot": {
8
+ "snapshotId": "snapshot",
9
+ "scope": {
10
+ "kind": "scope",
11
+ "id": "scope",
12
+ "revision": 1,
13
+ "digest": "191d991431d5dcbd940304f916579e57540e0d555e263f6d22a0e8aa4e416233"
14
+ },
15
+ "revisions": [
16
+ {
17
+ "kind": "artifact",
18
+ "id": "artifact",
19
+ "revision": 1,
20
+ "digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
21
+ },
22
+ {
23
+ "kind": "goal",
24
+ "id": "goal",
25
+ "revision": 1,
26
+ "digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
27
+ },
28
+ {
29
+ "kind": "obligation",
30
+ "id": "obligation",
31
+ "revision": 1,
32
+ "digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
33
+ },
34
+ {
35
+ "kind": "policy",
36
+ "id": "policy",
37
+ "revision": 1,
38
+ "digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
39
+ }
40
+ ],
41
+ "bindings": [
42
+ {
43
+ "intent": {
44
+ "kind": "goal",
45
+ "id": "goal",
46
+ "revision": 1,
47
+ "digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
48
+ },
49
+ "obligation": {
50
+ "kind": "obligation",
51
+ "id": "obligation",
52
+ "revision": 1,
53
+ "digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
54
+ },
55
+ "artifact": {
56
+ "kind": "artifact",
57
+ "id": "artifact",
58
+ "revision": 1,
59
+ "digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
60
+ },
61
+ "policy": {
62
+ "kind": "policy",
63
+ "id": "policy",
64
+ "revision": 1,
65
+ "digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
66
+ }
67
+ }
68
+ ],
69
+ "digest": "6fe1623dda96511e95e862b1f2714f9f909e2bf2b585dbd10af1ff52f3f7b5f8"
70
+ }
71
+ },
72
+ "digest": "28dcb24ddd9d81bee400fd94dc07850794faabdf62419178f3dd64269ab013d8"
73
+ }
@@ -0,0 +1,162 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mojomanyana/pi-daddy/contracts/ledger/v4/ledger-event.schema.json",
4
+ "title": "pi-daddy candidate ledgerVersion 4 work event",
5
+ "description": "One closed work-v4 event, not a grant or authority receipt. Strict text ingestion additionally verifies duplicate members, exact numeric tokens, canonical sets, digests and byte/depth limits. Projection separately resolves graphs and explicit host authority; schema conformance never proves acceptance.",
6
+ "oneOf": [
7
+ { "$ref": "#/$defs/workRevisionEvent" },
8
+ { "$ref": "#/$defs/workSnapshotEvent" },
9
+ { "$ref": "#/$defs/workOccurrenceEvent" },
10
+ { "$ref": "#/$defs/workAcceptanceEvent" }
11
+ ],
12
+ "$defs": {
13
+ "id": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/@+\\-]{0,127}$" },
14
+ "digest": { "type": "string", "minLength": 64, "maxLength": 64, "pattern": "^[0-9a-f]{64}$" },
15
+ "revisionNumber": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 },
16
+ "timestamp": {
17
+ "type": "string", "format": "date-time", "minLength": 24, "maxLength": 24,
18
+ "pattern": "^(?!0000)[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]\\.[0-9]{3}Z$",
19
+ "$comment": "The runtime always verifies the calendar date, independently of a schema validator's format support."
20
+ },
21
+ "executionId": {
22
+ "type": "string", "minLength": 41, "maxLength": 41,
23
+ "pattern": "^[eE][xX][eE][cC]:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89aAbB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
24
+ },
25
+ "revisionKind": { "enum": ["scope", "goal", "node", "obligation", "artifact", "policy"] },
26
+ "occurrenceProvenance": { "enum": ["declared", "observed"] },
27
+ "occurrenceState": { "enum": ["unknown", "starting", "running", "completed", "failed"] },
28
+ "identity": {
29
+ "type": "object", "additionalProperties": false, "required": ["id", "digest"],
30
+ "properties": { "id": { "$ref": "#/$defs/id" }, "digest": { "$ref": "#/$defs/digest" } }
31
+ },
32
+ "eventRef": {
33
+ "type": "object", "additionalProperties": false, "required": ["eventId", "digest"],
34
+ "properties": { "eventId": { "$ref": "#/$defs/id" }, "digest": { "$ref": "#/$defs/digest" } }
35
+ },
36
+ "revisionRef": {
37
+ "type": "object", "additionalProperties": false, "required": ["kind", "id", "revision", "digest"],
38
+ "properties": {
39
+ "kind": { "$ref": "#/$defs/revisionKind" }, "id": { "$ref": "#/$defs/id" },
40
+ "revision": { "$ref": "#/$defs/revisionNumber" }, "digest": { "$ref": "#/$defs/digest" }
41
+ }
42
+ },
43
+ "scopeRef": { "allOf": [{ "$ref": "#/$defs/revisionRef" }, { "type": "object", "properties": { "kind": { "const": "scope" } } }] },
44
+ "intentRef": { "allOf": [{ "$ref": "#/$defs/revisionRef" }, { "type": "object", "properties": { "kind": { "enum": ["goal", "node"] } } }] },
45
+ "goalParentRef": { "allOf": [{ "$ref": "#/$defs/revisionRef" }, { "type": "object", "properties": { "kind": { "enum": ["scope", "goal"] } } }] },
46
+ "obligationRef": { "allOf": [{ "$ref": "#/$defs/revisionRef" }, { "type": "object", "properties": { "kind": { "const": "obligation" } } }] },
47
+ "artifactRef": { "allOf": [{ "$ref": "#/$defs/revisionRef" }, { "type": "object", "properties": { "kind": { "const": "artifact" } } }] },
48
+ "policyRef": { "allOf": [{ "$ref": "#/$defs/revisionRef" }, { "type": "object", "properties": { "kind": { "const": "policy" } } }] },
49
+ "inventoryRef": { "allOf": [{ "$ref": "#/$defs/revisionRef" }, { "type": "object", "properties": { "kind": { "enum": ["goal", "node", "obligation", "artifact", "policy"] } } }] },
50
+ "workRevision": {
51
+ "type": "object", "additionalProperties": false,
52
+ "required": ["kind", "id", "revision", "scopeId", "predecessor", "contentDigest", "parent", "dependencies", "ownerId", "permittedEffects", "policy", "digest"],
53
+ "properties": {
54
+ "kind": { "$ref": "#/$defs/revisionKind" }, "id": { "$ref": "#/$defs/id" }, "revision": { "$ref": "#/$defs/revisionNumber" },
55
+ "scopeId": { "$ref": "#/$defs/id" }, "predecessor": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/revisionRef" }] },
56
+ "contentDigest": { "$ref": "#/$defs/digest" }, "parent": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/revisionRef" }] },
57
+ "dependencies": { "type": "array", "maxItems": 256, "uniqueItems": true, "items": { "$ref": "#/$defs/obligationRef" } },
58
+ "ownerId": { "$ref": "#/$defs/id" },
59
+ "permittedEffects": { "type": "array", "maxItems": 256, "uniqueItems": true, "items": { "$ref": "#/$defs/id" } },
60
+ "policy": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/policyRef" }] }, "digest": { "$ref": "#/$defs/digest" }
61
+ },
62
+ "allOf": [
63
+ {
64
+ "if": { "type": "object", "properties": { "revision": { "const": 1 } } },
65
+ "then": { "type": "object", "properties": { "predecessor": { "type": "null" } } },
66
+ "else": { "type": "object", "properties": { "predecessor": { "$ref": "#/$defs/revisionRef" } } }
67
+ },
68
+ { "oneOf": [
69
+ { "type": "object", "properties": { "kind": { "const": "scope" }, "parent": { "type": "null" }, "dependencies": { "type": "array", "maxItems": 0 }, "policy": { "type": "null" } } },
70
+ { "type": "object", "properties": { "kind": { "const": "goal" }, "parent": { "$ref": "#/$defs/goalParentRef" }, "dependencies": { "type": "array", "maxItems": 0 }, "policy": { "type": "null" } } },
71
+ { "type": "object", "properties": { "kind": { "const": "node" }, "parent": { "$ref": "#/$defs/intentRef" }, "dependencies": { "type": "array", "maxItems": 0 }, "policy": { "type": "null" } } },
72
+ { "type": "object", "properties": { "kind": { "const": "obligation" }, "parent": { "$ref": "#/$defs/intentRef" }, "policy": { "$ref": "#/$defs/policyRef" } } },
73
+ { "type": "object", "properties": { "kind": { "enum": ["artifact", "policy"] }, "parent": { "type": "null" }, "dependencies": { "type": "array", "maxItems": 0 }, "permittedEffects": { "type": "array", "maxItems": 0 }, "policy": { "type": "null" } } }
74
+ ] }
75
+ ],
76
+ "$comment": "Runtime also requires scopeId=id for scope, same kind/id and exact predecessor revision+1, canonical list ordering, and own digest equality. Graph scope/history checks require the complete event snapshot."
77
+ },
78
+ "obligationBinding": {
79
+ "type": "object", "additionalProperties": false, "required": ["intent", "obligation", "artifact", "policy"],
80
+ "properties": {
81
+ "intent": { "$ref": "#/$defs/intentRef" }, "obligation": { "$ref": "#/$defs/obligationRef" },
82
+ "artifact": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/artifactRef" }] }, "policy": { "$ref": "#/$defs/policyRef" }
83
+ }
84
+ },
85
+ "workSnapshot": {
86
+ "type": "object", "additionalProperties": false, "required": ["snapshotId", "scope", "revisions", "bindings", "digest"],
87
+ "properties": {
88
+ "snapshotId": { "$ref": "#/$defs/id" }, "scope": { "$ref": "#/$defs/scopeRef" },
89
+ "revisions": { "type": "array", "maxItems": 256, "uniqueItems": true, "items": { "$ref": "#/$defs/inventoryRef" } },
90
+ "bindings": { "type": "array", "maxItems": 256, "uniqueItems": true, "items": { "$ref": "#/$defs/obligationBinding" } },
91
+ "digest": { "$ref": "#/$defs/digest" }
92
+ },
93
+ "$comment": "Runtime orders bindings by obligation ref, rejects duplicate obligation keys, and checks digests. Projection validates unique selected entities, exact bindings, same-scope ancestors, predecessors and dependencies."
94
+ },
95
+ "occurrenceLabels": {
96
+ "type": "object", "additionalProperties": false,
97
+ "required": ["sessionId", "branchLeafId", "toolCallId", "taskId", "workspaceId", "definitionDigest", "configurationDigest", "modelId", "effortId"],
98
+ "properties": {
99
+ "sessionId": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/id" }] },
100
+ "branchLeafId": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/id" }] },
101
+ "toolCallId": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/id" }] },
102
+ "taskId": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/id" }] },
103
+ "workspaceId": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/id" }] },
104
+ "definitionDigest": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/digest" }] },
105
+ "configurationDigest": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/digest" }] },
106
+ "modelId": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/id" }] },
107
+ "effortId": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/id" }] }
108
+ }
109
+ },
110
+ "occurrencePayload": {
111
+ "type": "object", "additionalProperties": false,
112
+ "required": ["scope", "obligation", "executionId", "parentExecutionId", "childId", "variantId", "artifact", "provenance", "state", "labels"],
113
+ "properties": {
114
+ "scope": { "$ref": "#/$defs/scopeRef" }, "obligation": { "$ref": "#/$defs/obligationRef" }, "executionId": { "$ref": "#/$defs/executionId" },
115
+ "parentExecutionId": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/executionId" }] },
116
+ "childId": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/id" }] }, "variantId": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/id" }] },
117
+ "artifact": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/artifactRef" }] },
118
+ "provenance": { "$ref": "#/$defs/occurrenceProvenance" }, "state": { "$ref": "#/$defs/occurrenceState" }, "labels": { "$ref": "#/$defs/occurrenceLabels" }
119
+ },
120
+ "$comment": "Runtime rejects self-parent execution identity. Provenance is wire evidence, never acceptance authority."
121
+ },
122
+ "evidenceRef": {
123
+ "type": "object", "additionalProperties": false, "required": ["id", "digest", "event"],
124
+ "properties": { "id": { "$ref": "#/$defs/id" }, "digest": { "$ref": "#/$defs/digest" }, "event": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/eventRef" }] } }
125
+ },
126
+ "acceptanceBinding": {
127
+ "type": "object", "additionalProperties": false,
128
+ "required": ["snapshot", "scope", "intent", "obligation", "artifact", "artifactDigest", "policy", "evidence"],
129
+ "properties": {
130
+ "snapshot": { "$ref": "#/$defs/identity" }, "scope": { "$ref": "#/$defs/scopeRef" }, "intent": { "$ref": "#/$defs/intentRef" },
131
+ "obligation": { "$ref": "#/$defs/obligationRef" }, "artifact": { "$ref": "#/$defs/artifactRef" }, "artifactDigest": { "$ref": "#/$defs/digest" },
132
+ "policy": { "$ref": "#/$defs/policyRef" }, "evidence": { "type": "array", "minItems": 1, "maxItems": 256, "uniqueItems": true, "items": { "$ref": "#/$defs/evidenceRef" } }
133
+ }
134
+ },
135
+ "acceptancePayload": {
136
+ "type": "object", "additionalProperties": false, "required": ["authorityId", "binding"],
137
+ "properties": { "authorityId": { "$ref": "#/$defs/id" }, "binding": { "$ref": "#/$defs/acceptanceBinding" } }
138
+ },
139
+ "revisionPayload": {
140
+ "type": "object", "additionalProperties": false, "required": ["revision"], "properties": { "revision": { "$ref": "#/$defs/workRevision" } }
141
+ },
142
+ "snapshotPayload": {
143
+ "type": "object", "additionalProperties": false, "required": ["snapshot"], "properties": { "snapshot": { "$ref": "#/$defs/workSnapshot" } }
144
+ },
145
+ "workRevisionEvent": {
146
+ "type": "object", "additionalProperties": false, "required": ["ledgerVersion", "event", "eventId", "ts", "payload", "digest"],
147
+ "properties": { "ledgerVersion": { "const": 4 }, "event": { "const": "work_revision" }, "eventId": { "$ref": "#/$defs/id" }, "ts": { "$ref": "#/$defs/timestamp" }, "payload": { "$ref": "#/$defs/revisionPayload" }, "digest": { "$ref": "#/$defs/digest" } }
148
+ },
149
+ "workSnapshotEvent": {
150
+ "type": "object", "additionalProperties": false, "required": ["ledgerVersion", "event", "eventId", "ts", "payload", "digest"],
151
+ "properties": { "ledgerVersion": { "const": 4 }, "event": { "const": "work_snapshot" }, "eventId": { "$ref": "#/$defs/id" }, "ts": { "$ref": "#/$defs/timestamp" }, "payload": { "$ref": "#/$defs/snapshotPayload" }, "digest": { "$ref": "#/$defs/digest" } }
152
+ },
153
+ "workOccurrenceEvent": {
154
+ "type": "object", "additionalProperties": false, "required": ["ledgerVersion", "event", "eventId", "ts", "payload", "digest"],
155
+ "properties": { "ledgerVersion": { "const": 4 }, "event": { "const": "work_occurrence" }, "eventId": { "$ref": "#/$defs/id" }, "ts": { "$ref": "#/$defs/timestamp" }, "payload": { "$ref": "#/$defs/occurrencePayload" }, "digest": { "$ref": "#/$defs/digest" } }
156
+ },
157
+ "workAcceptanceEvent": {
158
+ "type": "object", "additionalProperties": false, "required": ["ledgerVersion", "event", "eventId", "ts", "payload", "digest"],
159
+ "properties": { "ledgerVersion": { "const": 4 }, "event": { "const": "work_acceptance" }, "eventId": { "$ref": "#/$defs/id" }, "ts": { "$ref": "#/$defs/timestamp" }, "payload": { "$ref": "#/$defs/acceptancePayload" }, "digest": { "$ref": "#/$defs/digest" } }
160
+ }
161
+ }
162
+ }
@@ -0,0 +1,59 @@
1
+ # Ordinary original-child control v1 — explicit local host integration
2
+
3
+ Package-root `ordinaryChildrenFor(originalExtensionAPI)` returns the port associated during actual grants
4
+ extension factory registration. The original owning bootstrap must retain that object; a copy/name/path
5
+ cannot look it up. Call BEFORE ordinary children run. Late opt-in is allowed but permanently labels missed
6
+ original lifetimes; empty rows then cannot certify quiescence. Defaults stay untracked/ephemeral unless
7
+ separately enabled (native file retention and cancellation capture are distinct opt-ins).
8
+
9
+ The actual shared execute-child wrapper retains an original AbortController per execution and composes
10
+ it with caller and lease signals. It never replaces the caller promise, primary result or existing process/
11
+ Herdr timer/close path. No model tool schema exposes this port. No peer process or PID/pane is recovered.
12
+ `inspect()` is process-local read-only status, NOT persisted authority or a clean durability acknowledgement.
13
+ `quiescent()` additionally refuses unknown ownership, required control failure or unretained history. A
14
+ best-effort terminal lifecycle/lease observation failure remains visible as `control:failed` beside the
15
+ worker outcome, but does not turn a known-settled child into a permanent execution boundary. A boundary
16
+ already known to be unavailable refuses an intent hold before installing it; it never blocks unrelated
17
+ ordinary admission while claiming reconciliation could make progress.
18
+
19
+ Cancellation shape:
20
+
21
+ ```
22
+ { version: "ordinary-cancel-v1", requestId, bindingDigest, expectedRevision,
23
+ target: { executionId, parentExecutionId, toolCallId } }
24
+ ```
25
+
26
+ Use actual execution UUIDs and nullable original parent UUID / actual tool-call ID (bounded256 characters),
27
+ never logical child position. `ordinaryCancellation` validates/detaches; `ordinaryCancellationDigest` hashes
28
+ the closed request. Independently supply `{bindingDigest, requestDigests}`. Approved digest is not inferred
29
+ from request shape, worker output or the port's existence. Synchronous CAS precedes original abort; result
30
+ `abort-requested` means completion is still owned by the original caller, not certified terminated.
31
+ Exact duplicate reads original result without effect or needing new authority. Different bytes under the
32
+ same request ID, stale revision, changed target, missing original handle and copied ports refuse.
33
+
34
+ Opted-in controllers retain up to1024 occurrence records and1024 requests. Capacity is non-refunding;
35
+ failed admission uses original workspace finalization. Ordinary successful worker output survives terminal
36
+ observation failure, which is separately marked failed. An executor exception remains unknown. Neither
37
+ unknown nor full bytes grants retry/recovery permission. Large transport frames may refuse their existing
38
+ byte bound rather than truncate a purported complete registry.
39
+
40
+ Existing dashboard config may ADD `ordinaryDigest: port.bindingDigest`; old configs/hashes remain unchanged.
41
+ Pass that original port as `open/createDashboardHost({ordinary:port,...})`. Approval additionally needs
42
+ `authority.ordinary`; operation `ordinary-cancel` carries the exact request above through the existing
43
+ manual `dashboardHostAction`/socket. The existing host claim/result journal binds request ID/tip/selection
44
+ and blocks failed-ack replay. No new persistent cancellation/decision database. Reconnect without the
45
+ original port can inspect other retained state but cannot cancel; process restart never restores handles.
46
+
47
+ For approved intent changes, the existing host additionally takes an original admission hold (at most32,
48
+ revision-changing). Busy direction waits in the existing host journal; original children continue. New
49
+ ordinary execution refuses at its original admission seam. The hold spans native asynchronous application
50
+ and any native resource pending state, and releases only after explicit successful native/host readback.
51
+ Unknown/failed host acknowledgement never releases it. This is not an expiry/unlock/recovery API; do not
52
+ run an older host writer against a new pending ordinary operation. Guide reconciliation does not mandate
53
+ generic entity/topology/opaque-policy editing; those unsupported extensions need concrete scope/semantics.
54
+
55
+ A failed final host sync can coexist with actual abort, charged effects and a later readable result. The
56
+ host stays failed/unknown and duplicate request is readback only. Caller cancellation still works and a
57
+ completed fanout sibling remains in the original result. Manual presentation refuses known nonquiescence,
58
+ but this does not establish an atomic deployed TUI pause, source completeness, human/module authentication,
59
+ P01 acceptance or hostile same-UID confinement. Wider live host association requires separate B/C evidence.
@@ -0,0 +1,137 @@
1
+ # Producer IPC v1 — local, explicit host integration
2
+
3
+ This is a **separate opt-in fixed model-free emitter**, not an operation on `linux-bwrap-digest-v1`,
4
+ not a new P11 experiment opcode, and not permission to run a model. Digest/hold operations and their
5
+ null model/effort/skills contract are unchanged. Ordinary pi extensions, tools and runtime-injection
6
+ restrictions are unchanged. No SDK, credentials, provider configuration or networking client is imported.
7
+ Historical `dist` is not this candidate: compile the exact pinned source into a fresh private output.
8
+
9
+ ## Callable API
10
+
11
+ Exports are available from `pi-daddy` and `pi-daddy/producer-ipc`:
12
+
13
+ - `producerIpcBinding(value)` validates and detaches/freezes the closed binding below.
14
+ - `producerIpcBindingDigest(binding)` hashes its canonical UTF-8 JSON bytes.
15
+ - `producerIpcDemand(binding)` produces an existing v4 `AttemptDemand`: primary, no parent;
16
+ attempt ID = execution ID, input digest = binding digest, input bytes = **whole parent binding**.
17
+ - `createProducerIpcHost({ owner, binding, exchange })` creates a single-use original host capability.
18
+ - `startProducerIpc({ owner, permit, binding, host, signal, timeoutMs })` consumes an **already reserved**
19
+ original permit and returns a `Promise<ProducerIpcRun>`. It never reserves a replacement itself.
20
+
21
+ ```ts
22
+ import {
23
+ openResourceBudget, resourceBindingDigest, newExecutionId,
24
+ producerIpcBinding, producerIpcDemand, createProducerIpcHost, startProducerIpc,
25
+ } from 'pi-daddy';
26
+
27
+ // Existing independently retained v4 budget. Use ONE original module graph and owner object.
28
+ const owner = openResourceBudget(existingExperimentBudget);
29
+ const binding = producerIpcBinding({
30
+ version: 'producer-ipc-v1', budgetDigest: resourceBindingDigest(existingExperimentBudget),
31
+ orderId: existingOrderId, experimentId: existingExperimentId, executionId: newExecutionId(),
32
+ charterSha256: independentlyFrozenHostCharterHash, invocationId: allowedHostInvocationId,
33
+ });
34
+ const [permit] = await owner.reserveBatch([producerIpcDemand(binding)]);
35
+ const port = createProducerIpcHost({ owner, binding,
36
+ async exchange(frames, context) {
37
+ // Actual one-use Readable replay of original child stdout, validated after EOF AND child exit.
38
+ // No parent identity, charter hash, credentials, URL, model payload or host socket in frames.
39
+ const observation = await trustedHost.exchangeSubscriptionSdk(
40
+ frames, hostOnlySdkBinding, hostOnlyTransport, context.binding.charterSha256, context.signal,
41
+ );
42
+ // Host-owned journal references ONLY, not votes/output/acceptance or transport authentication.
43
+ return { claimRef: originalClaimReference(observation), responseRef: originalResponseReference(observation) };
44
+ },
45
+ });
46
+ const run = await startProducerIpc({ owner, permit, binding, host: port,
47
+ signal: originalCallerAbortController.signal, timeoutMs: 30_000 });
48
+ const observed = await run.result; // Bounded observation; NEVER release a hold from this.
49
+ const final = await run.completion; // Waits for original child, invoked host, required accounting.
50
+ const mechanicallyComplete = final.outcome === 'completed' && final.settlement === 'acknowledged';
51
+ // Even mechanicallyComplete is NOT live qualification, model correctness, a grant or P01 acceptance.
52
+ ```
53
+
54
+ `trustedHost`, SDK binding, transport, expiring approval and reference selection are **host-owned**.
55
+ The example's `exchangeSubscriptionSdk(..., sourceSignal?)` is the coordinator-supplied local29a API;
56
+ this producer does not import, ship, execute or authenticate it. The host must independently validate
57
+ its charter/approval and enforce its own journal, invocation uniqueness, request/response/call budgets,
58
+ subscription-only route and source cancellation. Reading this document supplies none of that authority.
59
+ All coding/evaluated model execution remains on the user's existing Codex subscription only; no live call
60
+ was made in these tests. The producer's inert callback fixtures are not a substitute for that host.
61
+
62
+ ## Frame, identity and evidence contracts
63
+
64
+ `ProducerIpcBinding` has exactly `version, budgetDigest, orderId, experimentId, executionId,
65
+ charterSha256, invocationId`. Hashes are lowercase SHA-256; execution ID is an existing-format `exec:UUID`;
66
+ other IDs are 1..128 ASCII alphanumeric/colon/underscore/hyphen characters. Reordered input properties
67
+ canonicalize to that listed order. Whole binding bytes are charged, **not** provider request/token bytes.
68
+ The independently retained binding plus its persisted reservation digest supplies correlation, not a new
69
+ journal or a recovered permit. Old digest-input reservations cannot be relabelled as IPC reservations.
70
+
71
+ Child capability/output is exactly UTF-8 `JSON.stringify({id: binding.invocationId, sequence: 1})+'\n'`.
72
+ Sequence 1 is **per invocation**, not the host journal's global claim ordinal. The child gets only that
73
+ base64-encoded frame in argv; this is not secret transport. The parent captures at most 1024 raw bytes,
74
+ requires original stdout EOF and successful original child completion, then checks byte equality, not a
75
+ permissive JSON parse. Wrong identity/sequence, extra/duplicate fields, whitespace, malformed UTF-8, missing
76
+ LF, repeated or oversized output cannot dispatch. There is no prefix dispatch or response channel to child.
77
+ The host receives a **buffered replay**, not a live bidirectional child pipe. It must consume that original
78
+ stream before acknowledgement; the producer never reconstructs a frame from host identity metadata.
79
+
80
+ `exchange(frames: Readable, context: { binding, signal }): Promise<{ claimRef, responseRef }>` is called
81
+ at most once per original host port. Both references are 1..128 characters from the same ASCII ID alphabet;
82
+ extra payload/decision fields refuse. They are unverified evidence references, never policy or votes.
83
+ The child has already exited before host exchange starts; the resource hold spans both serial lifetimes.
84
+ This does **not** place the host, SDK or model execution inside the child namespace.
85
+
86
+ ## Lifetime and failures
87
+
88
+ `run.started` resolves `spawned | not-spawned`; spawn is not readiness. `run.readiness` resolves
89
+ `frame-ready | not-ready` only after original child evidence is available. Both can remain pending during
90
+ unknown underlying I/O. `run.child` is the frozen original `ChildRunResult | null`; null means no executor
91
+ result was obtained, not a successful child. An actual spawn error is `not-spawned`; an exception after
92
+ spawn without an executor result is `unknown` and returns failed/unknown completion **without settlement**.
93
+ Actual code, signal, text, abort/timeout/truncation are retained.
94
+ `run.inspect()` only returns a frozen process-local snapshot; no reopen/retry/reconcile/settlement occurs.
95
+
96
+ `result` is the first terminal **effect observation**, with `outcome`, closed `reason`, current child/host
97
+ state, frame hash, references and settlement state. It is immutable; it may say child/host/settlement are
98
+ pending. `completion` returns later evidence without upgrading cancelled/timed-out/failed outcome.
99
+ Late valid host references can appear there while the earlier result remains unchanged.
100
+ A completed effect plus `settlement: failed-or-unknown` is **not successful completion**, even if a later
101
+ budget read sees complete settlement bytes or zero active slots. No read repairs this receipt.
102
+
103
+ Original caller cancellation is composed with a bridge-owned deadline and forwarded to both existing
104
+ `runChild` and host I/O. `timeoutMs` is an integer 50..30000, includes admission/runtime preparation after
105
+ claim, and is checked again at asynchronous control boundaries. It bounds an observation, not blocked
106
+ kernel I/O or synchronous host JavaScript. The fixed child retains its 3000ms/50ms grace/3500ms hard cap,
107
+ 1024-byte combined output cap and unchanged binary/namespace/per-process CPU/FD/heap guards.
108
+ There is no security-policy modification, alternate command, fixture mount, environment or fallback API.
109
+
110
+ Original v4 permits are branded to their creating owner object. Copies, separately reopened owners,
111
+ different bindings, already settled/in-progress settlement and consumed permits refuse. A valid exclusive
112
+ handoff blocks early calls to the old public `permit.settle`; the original private settlement closure is
113
+ held until child and invoked host acknowledge. The original locked admission check rejects a pending/paused
114
+ barrier before launch; a failed admission still settles a charged failure. Claims are process-local and
115
+ single-use even after failure. There is no crash/receipt/PID/path/module-copy recovery.
116
+
117
+ Cancellation/timeout does not free an unknown lifetime: an uncooperative host or unacknowledged child keeps
118
+ `completion` pending and the active reservation held. When both acknowledge, original accounting releases
119
+ only the active slot. Attempts and whole-binding bytes stay charged on success, failure and cancellation.
120
+ Pending dispatch reconciliation still needs explicit original authority after quiescence. A host port must
121
+ return/reject only after its owned I/O acknowledges termination; the bridge cannot prove remote server
122
+ termination from promise rejection, authenticate journal references, or enforce provider-money/cgroup caps.
123
+
124
+ ## Behavioral evidence / exclusions
125
+
126
+ `test/producer-ipc.test.ts` uses the actual unchanged namespace launcher for positive stream/correlation
127
+ and real forwarded Node children for malformed/oversized/identity/EOF negatives. Test-only forwarding never
128
+ adds a production alternate launcher. `test/producer-ipc-lifetime.test.ts` forces real process liveness
129
+ under delayed signal delivery, no-readiness cancellation/timeout, host cancellation/late acknowledgement,
130
+ existing admission barriers, persisted-binding mismatch, reuse, spawn/setup errors and mandatory sync/close
131
+ failures after complete bytes. Signal/EOF and
132
+ filesystem fault injection is labelled; it is not evidence that the local kernel naturally lost them.
133
+
134
+ These are local mechanical tests, not live SDK/Herdr/model operation, human/role authentication, Ubuntu24
135
+ support, the cause of historical namespace denials, or overall/native-P01 acceptance. Original review,
136
+ seq226 and retained/inconclusive P17D remain unchanged. No ordinary model-driven controller choice, full
137
+ factory scheduling, generic mutation, rescue/retry/refund or publication is introduced.
@@ -1,3 +1,4 @@
1
+ import { type RetentionStatus } from "./execution-retention.ts";
1
2
  import { type CorrelationMetadata } from "./correlation.ts";
2
3
  import { type ValidatedWorkspace, type WorkspaceAccess } from "./workspace.ts";
3
4
  export interface CheckDefinition {
@@ -52,10 +53,14 @@ export declare function runNamedCheck(input: {
52
53
  signal?: AbortSignal;
53
54
  leaseDir?: string;
54
55
  ledgerPath?: string;
56
+ /** Explicit host archive boundary; defaults to PI_GRANTS_EXECUTION_ARCHIVE, never correlation. */
57
+ retentionDirectory?: string;
58
+ toolCallId?: string;
55
59
  }): Promise<{
56
60
  output: string;
57
61
  exitCode: number | null;
58
62
  signal: NodeJS.Signals | null;
59
63
  receipt: CheckReceipt;
64
+ retention: RetentionStatus;
60
65
  }>;
61
66
  //# sourceMappingURL=check-runner.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"check-runner.d.ts","sourceRoot":"","sources":["../src/check-runner.ts"],"names":[],"mappings":"AAIA,OAAO,EAAwB,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAUlF,OAAO,EAGL,KAAK,kBAAkB,EACvB,KAAK,eAAe,EAGrB,MAAM,gBAAgB,CAAC;AAIxB,MAAM,WAAW,eAAe;IAC9B,gGAAgG;IAChG,UAAU,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,8CAA8C;IAC9C,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,CAAC,EA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