pi-daddy 0.28.0 → 0.32.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 (1012) hide show
  1. package/CHANGELOG.md +108 -124
  2. package/README.md +18 -896
  3. package/THIRD_PARTY_NOTICES.md +1 -1
  4. package/contracts/ledger-record/v1/README.md +44 -0
  5. package/contracts/ledger-record/v1/fixtures/child-lifecycle.json +45 -0
  6. package/contracts/ledger-record/v1/fixtures/ledger-record.jsonl +3 -0
  7. package/contracts/ledger-record/v1/governance-event.schema.json +747 -0
  8. package/contracts/ledger-record/v1/record.schema.json +91 -0
  9. package/dist/cli.d.ts +10 -4
  10. package/dist/cli.d.ts.map +1 -1
  11. package/dist/cli.js +120 -106
  12. package/dist/cli.js.map +1 -1
  13. package/dist/executors/activity-session.d.ts +12 -0
  14. package/dist/executors/activity-session.d.ts.map +1 -0
  15. package/dist/executors/activity-session.js +43 -0
  16. package/dist/executors/activity-session.js.map +1 -0
  17. package/dist/executors/executor.d.ts +39 -0
  18. package/dist/executors/executor.d.ts.map +1 -0
  19. package/dist/executors/executor.js +95 -0
  20. package/dist/executors/executor.js.map +1 -0
  21. package/dist/executors/herdr-cli.d.ts +78 -0
  22. package/dist/executors/herdr-cli.d.ts.map +1 -0
  23. package/dist/executors/herdr-cli.js +114 -0
  24. package/dist/executors/herdr-cli.js.map +1 -0
  25. package/dist/executors/herdr-name.d.ts.map +1 -0
  26. package/dist/executors/herdr-name.js.map +1 -0
  27. package/dist/executors/herdr-pi-lifecycle.d.ts.map +1 -0
  28. package/dist/executors/herdr-pi-lifecycle.js +22 -0
  29. package/dist/executors/herdr-pi-lifecycle.js.map +1 -0
  30. package/dist/executors/herdr-poll.d.ts +140 -0
  31. package/dist/executors/herdr-poll.d.ts.map +1 -0
  32. package/dist/executors/herdr-poll.js +252 -0
  33. package/dist/executors/herdr-poll.js.map +1 -0
  34. package/dist/executors/herdr-stage.d.ts +40 -0
  35. package/dist/executors/herdr-stage.d.ts.map +1 -0
  36. package/dist/executors/herdr-stage.js +54 -0
  37. package/dist/executors/herdr-stage.js.map +1 -0
  38. package/dist/executors/herdr-start.d.ts.map +1 -0
  39. package/dist/executors/herdr-start.js.map +1 -0
  40. package/dist/executors/native-session-target.d.ts +9 -0
  41. package/dist/executors/native-session-target.d.ts.map +1 -0
  42. package/dist/executors/native-session-target.js +30 -0
  43. package/dist/executors/native-session-target.js.map +1 -0
  44. package/dist/executors/pane-reaper.d.ts +111 -0
  45. package/dist/executors/pane-reaper.d.ts.map +1 -0
  46. package/dist/executors/pane-reaper.js +242 -0
  47. package/dist/executors/pane-reaper.js.map +1 -0
  48. package/dist/executors/process-activity.d.ts +3 -0
  49. package/dist/executors/process-activity.d.ts.map +1 -0
  50. package/dist/executors/process-activity.js +59 -0
  51. package/dist/executors/process-activity.js.map +1 -0
  52. package/dist/executors/run-herdr.d.ts +122 -0
  53. package/dist/executors/run-herdr.d.ts.map +1 -0
  54. package/dist/executors/run-herdr.js +341 -0
  55. package/dist/executors/run-herdr.js.map +1 -0
  56. package/dist/executors/vendor/herdr-pi-lifecycle.d.ts.map +1 -0
  57. package/dist/executors/vendor/herdr-pi-lifecycle.js.map +1 -0
  58. package/dist/governance/approval-prompt.d.ts +119 -0
  59. package/dist/governance/approval-prompt.d.ts.map +1 -0
  60. package/dist/governance/approval-prompt.js +133 -0
  61. package/dist/governance/approval-prompt.js.map +1 -0
  62. package/dist/governance/approval-store.d.ts +149 -0
  63. package/dist/governance/approval-store.d.ts.map +1 -0
  64. package/dist/governance/approval-store.js +309 -0
  65. package/dist/governance/approval-store.js.map +1 -0
  66. package/dist/governance/execution-retention.d.ts +90 -0
  67. package/dist/governance/execution-retention.d.ts.map +1 -0
  68. package/dist/governance/execution-retention.js +317 -0
  69. package/dist/governance/execution-retention.js.map +1 -0
  70. package/dist/governance/file-lock.d.ts.map +1 -0
  71. package/dist/governance/file-lock.js +205 -0
  72. package/dist/governance/file-lock.js.map +1 -0
  73. package/dist/governance/finalization.d.ts.map +1 -0
  74. package/dist/governance/finalization.js.map +1 -0
  75. package/dist/governance/grant-store.d.ts +96 -0
  76. package/dist/governance/grant-store.d.ts.map +1 -0
  77. package/dist/governance/grant-store.js +186 -0
  78. package/dist/governance/grant-store.js.map +1 -0
  79. package/dist/governance/init.d.ts +129 -0
  80. package/dist/governance/init.d.ts.map +1 -0
  81. package/dist/governance/init.js +360 -0
  82. package/dist/governance/init.js.map +1 -0
  83. package/dist/governance/lease-helper.d.ts.map +1 -0
  84. package/dist/governance/lease-helper.js +121 -0
  85. package/dist/governance/lease-helper.js.map +1 -0
  86. package/dist/governance/lease-record.d.ts +90 -0
  87. package/dist/governance/lease-record.d.ts.map +1 -0
  88. package/dist/governance/lease-record.js.map +1 -0
  89. package/dist/governance/ledger-events.d.ts +111 -0
  90. package/dist/governance/ledger-events.d.ts.map +1 -0
  91. package/dist/governance/ledger-events.js +129 -0
  92. package/dist/governance/ledger-events.js.map +1 -0
  93. package/dist/governance/ledger-report.d.ts +134 -0
  94. package/dist/governance/ledger-report.d.ts.map +1 -0
  95. package/dist/governance/ledger-report.js +294 -0
  96. package/dist/governance/ledger-report.js.map +1 -0
  97. package/dist/governance/ledger-v3-validation.d.ts +21 -0
  98. package/dist/governance/ledger-v3-validation.d.ts.map +1 -0
  99. package/dist/governance/ledger-v3-validation.js +353 -0
  100. package/dist/governance/ledger-v3-validation.js.map +1 -0
  101. package/dist/governance/ledger.d.ts +258 -0
  102. package/dist/governance/ledger.d.ts.map +1 -0
  103. package/dist/governance/ledger.js +201 -0
  104. package/dist/governance/ledger.js.map +1 -0
  105. package/dist/governance/native-session.d.ts +59 -0
  106. package/dist/governance/native-session.d.ts.map +1 -0
  107. package/dist/governance/native-session.js +208 -0
  108. package/dist/governance/native-session.js.map +1 -0
  109. package/dist/governance/record.d.ts +65 -0
  110. package/dist/governance/record.d.ts.map +1 -0
  111. package/dist/governance/record.js +259 -0
  112. package/dist/governance/record.js.map +1 -0
  113. package/dist/governance/retention-contract.d.ts.map +1 -0
  114. package/dist/governance/retention-contract.js +187 -0
  115. package/dist/governance/retention-contract.js.map +1 -0
  116. package/dist/governance/retention-json.d.ts.map +1 -0
  117. package/dist/governance/retention-json.js.map +1 -0
  118. package/dist/governance/workspace-lease.d.ts +40 -0
  119. package/dist/governance/workspace-lease.d.ts.map +1 -0
  120. package/dist/governance/workspace-lease.js +357 -0
  121. package/dist/governance/workspace-lease.js.map +1 -0
  122. package/dist/index.d.ts +59 -42
  123. package/dist/index.d.ts.map +1 -1
  124. package/dist/index.js +61 -42
  125. package/dist/index.js.map +1 -1
  126. package/dist/kernel/approval.d.ts +241 -0
  127. package/dist/kernel/approval.d.ts.map +1 -0
  128. package/dist/kernel/approval.js +270 -0
  129. package/dist/kernel/approval.js.map +1 -0
  130. package/dist/kernel/capabilities.d.ts +136 -0
  131. package/dist/kernel/capabilities.d.ts.map +1 -0
  132. package/dist/kernel/capabilities.js +199 -0
  133. package/dist/kernel/capabilities.js.map +1 -0
  134. package/dist/kernel/catalog.d.ts +125 -0
  135. package/dist/kernel/catalog.d.ts.map +1 -0
  136. package/dist/kernel/catalog.js +338 -0
  137. package/dist/kernel/catalog.js.map +1 -0
  138. package/dist/kernel/chain.d.ts.map +1 -0
  139. package/dist/kernel/chain.js.map +1 -0
  140. package/dist/kernel/correlation.d.ts.map +1 -0
  141. package/dist/kernel/correlation.js +267 -0
  142. package/dist/kernel/correlation.js.map +1 -0
  143. package/dist/kernel/definitions.d.ts.map +1 -0
  144. package/dist/kernel/definitions.js +164 -0
  145. package/dist/kernel/definitions.js.map +1 -0
  146. package/dist/kernel/delegate-types.d.ts +160 -0
  147. package/dist/kernel/delegate-types.d.ts.map +1 -0
  148. package/dist/kernel/delegate-types.js +9 -0
  149. package/dist/kernel/delegate-types.js.map +1 -0
  150. package/dist/kernel/delegate.d.ts.map +1 -0
  151. package/dist/kernel/delegate.js +320 -0
  152. package/dist/kernel/delegate.js.map +1 -0
  153. package/dist/kernel/delegation-approval.d.ts.map +1 -0
  154. package/dist/kernel/delegation-approval.js +93 -0
  155. package/dist/kernel/delegation-approval.js.map +1 -0
  156. package/dist/kernel/env-names.d.ts +51 -0
  157. package/dist/kernel/env-names.d.ts.map +1 -0
  158. package/dist/kernel/env-names.js +112 -0
  159. package/dist/kernel/env-names.js.map +1 -0
  160. package/dist/kernel/execution-id.d.ts.map +1 -0
  161. package/dist/kernel/execution-id.js.map +1 -0
  162. package/dist/kernel/fanout.d.ts.map +1 -0
  163. package/dist/kernel/fanout.js +93 -0
  164. package/dist/kernel/fanout.js.map +1 -0
  165. package/dist/kernel/grant-env.d.ts +118 -0
  166. package/dist/kernel/grant-env.d.ts.map +1 -0
  167. package/dist/kernel/grant-env.js +104 -0
  168. package/dist/kernel/grant-env.js.map +1 -0
  169. package/dist/kernel/ledger-identifiers.d.ts.map +1 -0
  170. package/dist/kernel/ledger-identifiers.js.map +1 -0
  171. package/dist/kernel/model-preflight.d.ts +13 -0
  172. package/dist/kernel/model-preflight.d.ts.map +1 -0
  173. package/dist/kernel/model-preflight.js +30 -0
  174. package/dist/kernel/model-preflight.js.map +1 -0
  175. package/dist/kernel/pi-tools.d.ts.map +1 -0
  176. package/dist/kernel/pi-tools.js +29 -0
  177. package/dist/kernel/pi-tools.js.map +1 -0
  178. package/dist/kernel/progress.d.ts.map +1 -0
  179. package/dist/kernel/progress.js.map +1 -0
  180. package/dist/kernel/project-paths.d.ts +43 -0
  181. package/dist/kernel/project-paths.d.ts.map +1 -0
  182. package/dist/kernel/project-paths.js +81 -0
  183. package/dist/kernel/project-paths.js.map +1 -0
  184. package/dist/kernel/propagation.d.ts +195 -0
  185. package/dist/kernel/propagation.d.ts.map +1 -0
  186. package/dist/kernel/propagation.js +275 -0
  187. package/dist/kernel/propagation.js.map +1 -0
  188. package/dist/kernel/refusals.d.ts +16 -0
  189. package/dist/kernel/refusals.d.ts.map +1 -0
  190. package/dist/kernel/refusals.js +53 -0
  191. package/dist/kernel/refusals.js.map +1 -0
  192. package/dist/kernel/resolve.d.ts +120 -0
  193. package/dist/kernel/resolve.d.ts.map +1 -0
  194. package/dist/kernel/resolve.js +201 -0
  195. package/dist/kernel/resolve.js.map +1 -0
  196. package/dist/kernel/routing-authority.d.ts +71 -0
  197. package/dist/kernel/routing-authority.d.ts.map +1 -0
  198. package/dist/kernel/routing-authority.js +100 -0
  199. package/dist/kernel/routing-authority.js.map +1 -0
  200. package/dist/kernel/run-child.d.ts +111 -0
  201. package/dist/kernel/run-child.d.ts.map +1 -0
  202. package/dist/kernel/run-child.js +324 -0
  203. package/dist/kernel/run-child.js.map +1 -0
  204. package/dist/kernel/skill-packages.d.ts +116 -0
  205. package/dist/kernel/skill-packages.d.ts.map +1 -0
  206. package/dist/kernel/skill-packages.js +300 -0
  207. package/dist/kernel/skill-packages.js.map +1 -0
  208. package/dist/kernel/skill-resources.d.ts.map +1 -0
  209. package/dist/kernel/skill-resources.js +56 -0
  210. package/dist/kernel/skill-resources.js.map +1 -0
  211. package/dist/kernel/spawn.d.ts +60 -0
  212. package/dist/kernel/spawn.d.ts.map +1 -0
  213. package/dist/kernel/spawn.js +116 -0
  214. package/dist/kernel/spawn.js.map +1 -0
  215. package/dist/kernel/workspace.d.ts +51 -0
  216. package/dist/kernel/workspace.d.ts.map +1 -0
  217. package/dist/kernel/workspace.js +223 -0
  218. package/dist/kernel/workspace.js.map +1 -0
  219. package/dist/products/activity-timeline.d.ts +126 -0
  220. package/dist/products/activity-timeline.d.ts.map +1 -0
  221. package/dist/products/activity-timeline.js +542 -0
  222. package/dist/products/activity-timeline.js.map +1 -0
  223. package/dist/products/dashboard-cli.d.ts +26 -0
  224. package/dist/products/dashboard-cli.d.ts.map +1 -0
  225. package/dist/products/dashboard-cli.js +224 -0
  226. package/dist/products/dashboard-cli.js.map +1 -0
  227. package/dist/products/dashboard-display-controls.d.ts +17 -0
  228. package/dist/products/dashboard-display-controls.d.ts.map +1 -0
  229. package/dist/products/dashboard-display-controls.js +38 -0
  230. package/dist/products/dashboard-display-controls.js.map +1 -0
  231. package/dist/products/dashboard-handshake.d.ts +42 -0
  232. package/dist/products/dashboard-handshake.d.ts.map +1 -0
  233. package/dist/products/dashboard-handshake.js +158 -0
  234. package/dist/products/dashboard-handshake.js.map +1 -0
  235. package/dist/products/dashboard-herdr.d.ts +55 -0
  236. package/dist/products/dashboard-herdr.d.ts.map +1 -0
  237. package/dist/products/dashboard-herdr.js +324 -0
  238. package/dist/products/dashboard-herdr.js.map +1 -0
  239. package/dist/products/dashboard-projection.d.ts +62 -0
  240. package/dist/products/dashboard-projection.d.ts.map +1 -0
  241. package/dist/products/dashboard-projection.js +305 -0
  242. package/dist/products/dashboard-projection.js.map +1 -0
  243. package/dist/products/dashboard-render.d.ts.map +1 -0
  244. package/dist/products/dashboard-render.js +208 -0
  245. package/dist/products/dashboard-render.js.map +1 -0
  246. package/extensions/activity-timeline.ts +134 -28
  247. package/extensions/approval-banking.ts +3 -3
  248. package/extensions/approvals.ts +18 -12
  249. package/extensions/chain-approval-facts.ts +9 -6
  250. package/extensions/chain-ledger.ts +4 -4
  251. package/extensions/chain-plan.ts +6 -6
  252. package/extensions/correlation-shape.ts +42 -33
  253. package/extensions/delegate-chain.ts +93 -45
  254. package/extensions/delegation-authority.ts +7 -3
  255. package/extensions/delegation-ledger.ts +2 -2
  256. package/extensions/delegation-native.ts +24 -7
  257. package/extensions/delegation.ts +91 -80
  258. package/extensions/execute-child.ts +440 -293
  259. package/extensions/execution-occurrence.ts +2 -2
  260. package/extensions/executor-session.ts +5 -5
  261. package/extensions/fanout-outcome.ts +8 -6
  262. package/extensions/grant-store-refusal.ts +24 -12
  263. package/extensions/grants-command.ts +42 -34
  264. package/extensions/grants-connected-command.ts +29 -15
  265. package/extensions/grants.ts +73 -73
  266. package/extensions/init-command.ts +18 -12
  267. package/extensions/reload-environment.ts +12 -5
  268. package/extensions/run-delegation.ts +29 -19
  269. package/extensions/session-environment.ts +25 -11
  270. package/extensions/session-report.ts +61 -12
  271. package/extensions/session.ts +58 -34
  272. package/extensions/spawn-summary.ts +5 -5
  273. package/extensions/stored-grant-session.ts +5 -5
  274. package/extensions/tripwire.ts +1 -1
  275. package/extensions/workspace-runtime.ts +26 -24
  276. package/herdr-plugin/herdr-plugin.toml +1 -1
  277. package/package.json +4 -211
  278. package/src/cli.ts +149 -92
  279. package/src/executors/activity-session.ts +54 -0
  280. package/src/executors/executor.ts +123 -0
  281. package/src/executors/herdr-cli.ts +132 -0
  282. package/src/executors/herdr-pi-lifecycle.ts +21 -0
  283. package/src/executors/herdr-poll.ts +305 -0
  284. package/src/executors/herdr-stage.ts +55 -0
  285. package/src/executors/native-session-target.ts +31 -0
  286. package/src/executors/pane-reaper.ts +270 -0
  287. package/src/executors/process-activity.ts +54 -0
  288. package/src/executors/run-herdr.ts +426 -0
  289. package/src/governance/approval-prompt.ts +225 -0
  290. package/src/governance/approval-store.ts +385 -0
  291. package/src/governance/execution-retention.ts +372 -0
  292. package/src/governance/file-lock.ts +210 -0
  293. package/src/governance/finalization.ts +82 -0
  294. package/src/governance/grant-store.ts +235 -0
  295. package/src/governance/init.ts +447 -0
  296. package/src/governance/lease-helper.ts +124 -0
  297. package/src/governance/lease-record.ts +131 -0
  298. package/src/governance/ledger-events.ts +222 -0
  299. package/src/governance/ledger-report.ts +396 -0
  300. package/src/governance/ledger-v3-validation.ts +384 -0
  301. package/src/governance/ledger.ts +419 -0
  302. package/src/governance/native-session.ts +264 -0
  303. package/src/governance/record.ts +294 -0
  304. package/src/governance/retention-contract.ts +201 -0
  305. package/src/governance/retention-json.ts +24 -0
  306. package/src/governance/workspace-lease.ts +429 -0
  307. package/src/index.ts +82 -92
  308. package/src/kernel/approval.ts +406 -0
  309. package/src/kernel/capabilities.ts +216 -0
  310. package/src/kernel/catalog.ts +373 -0
  311. package/src/kernel/correlation.ts +351 -0
  312. package/src/kernel/definitions.ts +215 -0
  313. package/src/kernel/delegate-types.ts +162 -0
  314. package/src/kernel/delegate.ts +375 -0
  315. package/src/kernel/delegation-approval.ts +126 -0
  316. package/src/kernel/env-names.ts +119 -0
  317. package/src/kernel/fanout.ts +106 -0
  318. package/src/kernel/grant-env.ts +174 -0
  319. package/src/kernel/model-preflight.ts +44 -0
  320. package/src/kernel/pi-tools.ts +32 -0
  321. package/src/kernel/project-paths.ts +97 -0
  322. package/src/kernel/propagation.ts +341 -0
  323. package/src/kernel/refusals.ts +64 -0
  324. package/src/kernel/resolve.ts +258 -0
  325. package/src/kernel/routing-authority.ts +121 -0
  326. package/src/kernel/run-child.ts +418 -0
  327. package/src/kernel/skill-packages.ts +329 -0
  328. package/src/kernel/skill-resources.ts +64 -0
  329. package/src/kernel/spawn.ts +156 -0
  330. package/src/kernel/workspace.ts +336 -0
  331. package/src/products/activity-timeline.ts +679 -0
  332. package/src/products/dashboard-cli.ts +250 -0
  333. package/src/products/dashboard-display-controls.ts +44 -0
  334. package/src/products/dashboard-handshake.ts +222 -0
  335. package/src/products/dashboard-herdr.ts +427 -0
  336. package/src/products/dashboard-projection.ts +389 -0
  337. package/src/products/dashboard-render.ts +260 -0
  338. package/PRODUCT-GUIDE.md +0 -155
  339. package/REQUIREMENTS.md +0 -41
  340. package/contracts/daily-view/v1/README.md +0 -114
  341. package/contracts/daily-view/v1/fixtures/view.json +0 -525
  342. package/contracts/daily-view/v1/fixtures/view.txt +0 -75
  343. package/contracts/daily-view/v1/fixtures/work.jsonl +0 -17
  344. package/contracts/daily-view/v1/p03/README.md +0 -26
  345. package/contracts/daily-view/v1/p03/fixtures/retained-executions.json +0 -241
  346. package/contracts/daily-view/v1/p03/projection.schema.json +0 -194
  347. package/contracts/daily-view/v1/p03/provenance.json +0 -21
  348. package/contracts/dashboard-host/v1/README.md +0 -176
  349. package/contracts/debrief/v1/README.md +0 -146
  350. package/contracts/debrief/v1/intervention/README.md +0 -32
  351. package/contracts/debrief/v1/intervention/fixtures/artifact-3ee11136beb864f518252e5024dae9197421fbf97b6e981d3243c782b5c44bd0.txt +0 -1
  352. package/contracts/debrief/v1/intervention/fixtures/artifact-58905d872dd3c54a9705f67b05fa82edbad7af6476ae8993faf1a7b9fadfb905.txt +0 -1
  353. package/contracts/debrief/v1/intervention/fixtures/assessment.json +0 -29
  354. package/contracts/debrief/v1/intervention/fixtures/blind-view.json +0 -20
  355. package/contracts/debrief/v1/intervention/fixtures/choice.json +0 -7
  356. package/contracts/debrief/v1/intervention/fixtures/manifest.json +0 -57
  357. package/contracts/debrief/v1/intervention/fixtures/reveal.json +0 -39
  358. package/contracts/debrief/v1/provenance.json +0 -89
  359. package/contracts/debrief/v1/work-capture/README.md +0 -38
  360. package/contracts/debrief/v1/work-capture/fixtures/batch.json +0 -17
  361. package/contracts/debrief/v1/work-capture/fixtures/cases.json +0 -184
  362. package/contracts/debrief/v1/work-capture/fixtures/review.json +0 -184
  363. package/contracts/debrief/v1/work-capture/review-request.schema.json +0 -41
  364. package/contracts/debrief/v1/work-capture/work-case.schema.json +0 -190
  365. package/contracts/debrief/v2/README.md +0 -71
  366. package/contracts/debrief/v2/input-pin.json +0 -66
  367. package/contracts/debrief/v2/intervention-upstream.md +0 -40
  368. package/contracts/debrief/v2/work-signals-upstream.md +0 -22
  369. package/contracts/dispatch-control/v1/README.md +0 -109
  370. package/contracts/dispatch-control/v1/request.schema.json +0 -19
  371. package/contracts/effect-profile/v1/README.md +0 -124
  372. package/contracts/execution-retention/v1/README.md +0 -109
  373. package/contracts/execution-retention/v2/README.md +0 -148
  374. package/contracts/execution-retention/v2/fixtures/interrupted-native-bytes.json +0 -91
  375. package/contracts/execution-retention/v2/fixtures/missing-native-session.json +0 -91
  376. package/contracts/execution-retention/v2/fixtures/native-file-unknown-branch.json +0 -91
  377. package/contracts/execution-retention/v2/fixtures/native-id-without-bytes.json +0 -91
  378. package/contracts/execution-retention/v2/fixtures/native-live-branch.json +0 -90
  379. package/contracts/execution-retention/v2/fixtures/replaced-native-session.json +0 -92
  380. package/contracts/execution-retention/v2/fixtures/result-82c620cdfeb8ca6b858cf653d7f5e2eedca5315d6244216d60e8b36f03223d6a.bin +0 -1
  381. package/contracts/execution-retention/v2/fixtures/session-2ec1f134bc739984434f7fca689e1c3d1c39fce2dcadae709e9b6faedfcc4ac7.bin +0 -3
  382. package/contracts/execution-retention/v2/fixtures/session-9bdb4bd16a901da31580acf056bda525225259e15ec409e0410480109011772f.bin +0 -3
  383. package/contracts/execution-retention/v2/manifest.schema.json +0 -858
  384. package/contracts/experiment/v1/README.md +0 -164
  385. package/contracts/factory-order/v1/README.md +0 -151
  386. package/contracts/factory-order/v1/adoption-pin.json +0 -8
  387. package/contracts/intent-control/v1/README.md +0 -135
  388. package/contracts/intent-control/v1/request.schema.json +0 -1096
  389. package/contracts/intent-control/v2/README.md +0 -34
  390. package/contracts/intent-control/v2/request.schema.json +0 -1070
  391. package/contracts/ledger/v2/README.md +0 -59
  392. package/contracts/ledger/v2/fixtures/capability-decision.json +0 -95
  393. package/contracts/ledger/v2/fixtures/check-receipt.json +0 -40
  394. package/contracts/ledger/v2/fixtures/child-lifecycle.json +0 -42
  395. package/contracts/ledger/v2/fixtures/workspace-lease.json +0 -41
  396. package/contracts/ledger/v2/ledger-event.schema.json +0 -633
  397. package/contracts/ledger/v3/README.md +0 -36
  398. package/contracts/ledger/v3/fixtures/check-receipt.json +0 -41
  399. package/contracts/ledger/v3/fixtures/child-lifecycle.json +0 -44
  400. package/contracts/ledger/v3/fixtures/workflow-fact.json +0 -40
  401. package/contracts/ledger/v3/ledger-event.schema.json +0 -955
  402. package/contracts/ledger/v4/README.md +0 -241
  403. package/contracts/ledger/v4/fixtures/layout-options.json +0 -428
  404. package/contracts/ledger/v4/fixtures/work-acceptance.json +0 -57
  405. package/contracts/ledger/v4/fixtures/work-occurrence.json +0 -44
  406. package/contracts/ledger/v4/fixtures/work-revision.json +0 -26
  407. package/contracts/ledger/v4/fixtures/work-snapshot.json +0 -73
  408. package/contracts/ledger/v4/ledger-event.schema.json +0 -162
  409. package/contracts/ordinary-control/v1/README.md +0 -59
  410. package/contracts/producer-ipc/v1/README.md +0 -137
  411. package/dist/activity-timeline.d.ts +0 -109
  412. package/dist/activity-timeline.d.ts.map +0 -1
  413. package/dist/activity-timeline.js +0 -208
  414. package/dist/activity-timeline.js.map +0 -1
  415. package/dist/approval-prompt.d.ts +0 -119
  416. package/dist/approval-prompt.d.ts.map +0 -1
  417. package/dist/approval-prompt.js +0 -133
  418. package/dist/approval-prompt.js.map +0 -1
  419. package/dist/approval-store.d.ts +0 -149
  420. package/dist/approval-store.d.ts.map +0 -1
  421. package/dist/approval-store.js +0 -314
  422. package/dist/approval-store.js.map +0 -1
  423. package/dist/approval.d.ts +0 -241
  424. package/dist/approval.d.ts.map +0 -1
  425. package/dist/approval.js +0 -268
  426. package/dist/approval.js.map +0 -1
  427. package/dist/capabilities.d.ts +0 -136
  428. package/dist/capabilities.d.ts.map +0 -1
  429. package/dist/capabilities.js +0 -203
  430. package/dist/capabilities.js.map +0 -1
  431. package/dist/catalog.d.ts +0 -98
  432. package/dist/catalog.d.ts.map +0 -1
  433. package/dist/catalog.js +0 -273
  434. package/dist/catalog.js.map +0 -1
  435. package/dist/chain.d.ts.map +0 -1
  436. package/dist/chain.js.map +0 -1
  437. package/dist/check-runner.d.ts +0 -66
  438. package/dist/check-runner.d.ts.map +0 -1
  439. package/dist/check-runner.js +0 -275
  440. package/dist/check-runner.js.map +0 -1
  441. package/dist/control-journal.d.ts +0 -20
  442. package/dist/control-journal.d.ts.map +0 -1
  443. package/dist/control-journal.js +0 -73
  444. package/dist/control-journal.js.map +0 -1
  445. package/dist/correlation.d.ts.map +0 -1
  446. package/dist/correlation.js +0 -231
  447. package/dist/correlation.js.map +0 -1
  448. package/dist/daily-dashboard-host.d.ts +0 -136
  449. package/dist/daily-dashboard-host.d.ts.map +0 -1
  450. package/dist/daily-dashboard-host.js +0 -164
  451. package/dist/daily-dashboard-host.js.map +0 -1
  452. package/dist/daily-panel.d.ts +0 -36
  453. package/dist/daily-panel.d.ts.map +0 -1
  454. package/dist/daily-panel.js +0 -84
  455. package/dist/daily-panel.js.map +0 -1
  456. package/dist/daily-view-input.d.ts +0 -44
  457. package/dist/daily-view-input.d.ts.map +0 -1
  458. package/dist/daily-view-input.js +0 -68
  459. package/dist/daily-view-input.js.map +0 -1
  460. package/dist/daily-view-render.d.ts +0 -5
  461. package/dist/daily-view-render.d.ts.map +0 -1
  462. package/dist/daily-view-render.js +0 -42
  463. package/dist/daily-view-render.js.map +0 -1
  464. package/dist/daily-view.d.ts +0 -77
  465. package/dist/daily-view.d.ts.map +0 -1
  466. package/dist/daily-view.js +0 -176
  467. package/dist/daily-view.js.map +0 -1
  468. package/dist/dashboard-cli.d.ts +0 -54
  469. package/dist/dashboard-cli.d.ts.map +0 -1
  470. package/dist/dashboard-cli.js +0 -367
  471. package/dist/dashboard-cli.js.map +0 -1
  472. package/dist/dashboard-display-controls.d.ts +0 -15
  473. package/dist/dashboard-display-controls.d.ts.map +0 -1
  474. package/dist/dashboard-display-controls.js +0 -34
  475. package/dist/dashboard-display-controls.js.map +0 -1
  476. package/dist/dashboard-handshake.d.ts +0 -42
  477. package/dist/dashboard-handshake.d.ts.map +0 -1
  478. package/dist/dashboard-handshake.js +0 -147
  479. package/dist/dashboard-handshake.js.map +0 -1
  480. package/dist/dashboard-harness.d.ts +0 -22
  481. package/dist/dashboard-harness.d.ts.map +0 -1
  482. package/dist/dashboard-harness.js +0 -89
  483. package/dist/dashboard-harness.js.map +0 -1
  484. package/dist/dashboard-herdr.d.ts +0 -55
  485. package/dist/dashboard-herdr.d.ts.map +0 -1
  486. package/dist/dashboard-herdr.js +0 -293
  487. package/dist/dashboard-herdr.js.map +0 -1
  488. package/dist/dashboard-host-contract.d.ts +0 -127
  489. package/dist/dashboard-host-contract.d.ts.map +0 -1
  490. package/dist/dashboard-host-contract.js +0 -14
  491. package/dist/dashboard-host-contract.js.map +0 -1
  492. package/dist/dashboard-host-transport.d.ts +0 -16
  493. package/dist/dashboard-host-transport.d.ts.map +0 -1
  494. package/dist/dashboard-host-transport.js +0 -127
  495. package/dist/dashboard-host-transport.js.map +0 -1
  496. package/dist/dashboard-host.d.ts +0 -239
  497. package/dist/dashboard-host.d.ts.map +0 -1
  498. package/dist/dashboard-host.js +0 -474
  499. package/dist/dashboard-host.js.map +0 -1
  500. package/dist/dashboard-menu.d.ts +0 -16
  501. package/dist/dashboard-menu.d.ts.map +0 -1
  502. package/dist/dashboard-menu.js +0 -33
  503. package/dist/dashboard-menu.js.map +0 -1
  504. package/dist/dashboard-observation.d.ts +0 -28
  505. package/dist/dashboard-observation.d.ts.map +0 -1
  506. package/dist/dashboard-observation.js +0 -87
  507. package/dist/dashboard-observation.js.map +0 -1
  508. package/dist/dashboard-projection.d.ts +0 -73
  509. package/dist/dashboard-projection.d.ts.map +0 -1
  510. package/dist/dashboard-projection.js +0 -294
  511. package/dist/dashboard-projection.js.map +0 -1
  512. package/dist/dashboard-render.d.ts.map +0 -1
  513. package/dist/dashboard-render.js +0 -212
  514. package/dist/dashboard-render.js.map +0 -1
  515. package/dist/debrief-contract.d.ts +0 -65
  516. package/dist/debrief-contract.d.ts.map +0 -1
  517. package/dist/debrief-contract.js +0 -151
  518. package/dist/debrief-contract.js.map +0 -1
  519. package/dist/debrief-fixture.d.ts +0 -16
  520. package/dist/debrief-fixture.d.ts.map +0 -1
  521. package/dist/debrief-fixture.js +0 -41
  522. package/dist/debrief-fixture.js.map +0 -1
  523. package/dist/debrief-host.d.ts +0 -59
  524. package/dist/debrief-host.d.ts.map +0 -1
  525. package/dist/debrief-host.js +0 -49
  526. package/dist/debrief-host.js.map +0 -1
  527. package/dist/debrief-render.d.ts +0 -5
  528. package/dist/debrief-render.d.ts.map +0 -1
  529. package/dist/debrief-render.js +0 -65
  530. package/dist/debrief-render.js.map +0 -1
  531. package/dist/debrief.d.ts +0 -90
  532. package/dist/debrief.d.ts.map +0 -1
  533. package/dist/debrief.js +0 -263
  534. package/dist/debrief.js.map +0 -1
  535. package/dist/definitions.d.ts.map +0 -1
  536. package/dist/definitions.js +0 -164
  537. package/dist/definitions.js.map +0 -1
  538. package/dist/delegate-types.d.ts +0 -154
  539. package/dist/delegate-types.d.ts.map +0 -1
  540. package/dist/delegate-types.js +0 -8
  541. package/dist/delegate-types.js.map +0 -1
  542. package/dist/delegate.d.ts.map +0 -1
  543. package/dist/delegate.js +0 -313
  544. package/dist/delegate.js.map +0 -1
  545. package/dist/delegation-approval.d.ts.map +0 -1
  546. package/dist/delegation-approval.js +0 -94
  547. package/dist/delegation-approval.js.map +0 -1
  548. package/dist/dispatch-control.d.ts +0 -45
  549. package/dist/dispatch-control.d.ts.map +0 -1
  550. package/dist/dispatch-control.js +0 -76
  551. package/dist/dispatch-control.js.map +0 -1
  552. package/dist/effect-profile-runtime.d.ts +0 -40
  553. package/dist/effect-profile-runtime.d.ts.map +0 -1
  554. package/dist/effect-profile-runtime.js +0 -51
  555. package/dist/effect-profile-runtime.js.map +0 -1
  556. package/dist/effect-profile.d.ts +0 -40
  557. package/dist/effect-profile.d.ts.map +0 -1
  558. package/dist/effect-profile.js +0 -152
  559. package/dist/effect-profile.js.map +0 -1
  560. package/dist/execution-id.d.ts.map +0 -1
  561. package/dist/execution-id.js.map +0 -1
  562. package/dist/execution-retention.d.ts +0 -90
  563. package/dist/execution-retention.d.ts.map +0 -1
  564. package/dist/execution-retention.js +0 -247
  565. package/dist/execution-retention.js.map +0 -1
  566. package/dist/executor.d.ts +0 -39
  567. package/dist/executor.d.ts.map +0 -1
  568. package/dist/executor.js +0 -94
  569. package/dist/executor.js.map +0 -1
  570. package/dist/experiment-contract.d.ts +0 -56
  571. package/dist/experiment-contract.d.ts.map +0 -1
  572. package/dist/experiment-contract.js +0 -80
  573. package/dist/experiment-contract.js.map +0 -1
  574. package/dist/experiment-state.d.ts +0 -22
  575. package/dist/experiment-state.d.ts.map +0 -1
  576. package/dist/experiment-state.js +0 -79
  577. package/dist/experiment-state.js.map +0 -1
  578. package/dist/experiment-store.d.ts +0 -30
  579. package/dist/experiment-store.d.ts.map +0 -1
  580. package/dist/experiment-store.js +0 -147
  581. package/dist/experiment-store.js.map +0 -1
  582. package/dist/experiment.d.ts +0 -65
  583. package/dist/experiment.d.ts.map +0 -1
  584. package/dist/experiment.js +0 -362
  585. package/dist/experiment.js.map +0 -1
  586. package/dist/factory-contract.d.ts +0 -79
  587. package/dist/factory-contract.d.ts.map +0 -1
  588. package/dist/factory-contract.js +0 -89
  589. package/dist/factory-contract.js.map +0 -1
  590. package/dist/factory-migration.d.ts +0 -20
  591. package/dist/factory-migration.d.ts.map +0 -1
  592. package/dist/factory-migration.js +0 -55
  593. package/dist/factory-migration.js.map +0 -1
  594. package/dist/factory-order.d.ts +0 -848
  595. package/dist/factory-order.d.ts.map +0 -1
  596. package/dist/factory-order.js +0 -83
  597. package/dist/factory-order.js.map +0 -1
  598. package/dist/factory-registry.d.ts +0 -121
  599. package/dist/factory-registry.d.ts.map +0 -1
  600. package/dist/factory-registry.js +0 -133
  601. package/dist/factory-registry.js.map +0 -1
  602. package/dist/fanout.d.ts.map +0 -1
  603. package/dist/fanout.js +0 -93
  604. package/dist/fanout.js.map +0 -1
  605. package/dist/file-lock.d.ts.map +0 -1
  606. package/dist/file-lock.js +0 -201
  607. package/dist/file-lock.js.map +0 -1
  608. package/dist/finalization.d.ts.map +0 -1
  609. package/dist/finalization.js.map +0 -1
  610. package/dist/git-identity.d.ts +0 -13
  611. package/dist/git-identity.d.ts.map +0 -1
  612. package/dist/git-identity.js +0 -47
  613. package/dist/git-identity.js.map +0 -1
  614. package/dist/grant-env.d.ts +0 -75
  615. package/dist/grant-env.d.ts.map +0 -1
  616. package/dist/grant-env.js +0 -154
  617. package/dist/grant-env.js.map +0 -1
  618. package/dist/grant-store.d.ts +0 -96
  619. package/dist/grant-store.d.ts.map +0 -1
  620. package/dist/grant-store.js +0 -188
  621. package/dist/grant-store.js.map +0 -1
  622. package/dist/herdr-cli.d.ts +0 -78
  623. package/dist/herdr-cli.d.ts.map +0 -1
  624. package/dist/herdr-cli.js +0 -113
  625. package/dist/herdr-cli.js.map +0 -1
  626. package/dist/herdr-name.d.ts.map +0 -1
  627. package/dist/herdr-name.js.map +0 -1
  628. package/dist/herdr-pi-lifecycle.d.ts.map +0 -1
  629. package/dist/herdr-pi-lifecycle.js +0 -22
  630. package/dist/herdr-pi-lifecycle.js.map +0 -1
  631. package/dist/herdr-poll.d.ts +0 -133
  632. package/dist/herdr-poll.d.ts.map +0 -1
  633. package/dist/herdr-poll.js +0 -222
  634. package/dist/herdr-poll.js.map +0 -1
  635. package/dist/herdr-stage.d.ts +0 -40
  636. package/dist/herdr-stage.d.ts.map +0 -1
  637. package/dist/herdr-stage.js +0 -54
  638. package/dist/herdr-stage.js.map +0 -1
  639. package/dist/herdr-start.d.ts.map +0 -1
  640. package/dist/herdr-start.js.map +0 -1
  641. package/dist/init.d.ts +0 -117
  642. package/dist/init.d.ts.map +0 -1
  643. package/dist/init.js +0 -323
  644. package/dist/init.js.map +0 -1
  645. package/dist/intent-application.d.ts +0 -17
  646. package/dist/intent-application.d.ts.map +0 -1
  647. package/dist/intent-application.js +0 -114
  648. package/dist/intent-application.js.map +0 -1
  649. package/dist/intent-control.d.ts +0 -201
  650. package/dist/intent-control.d.ts.map +0 -1
  651. package/dist/intent-control.js +0 -110
  652. package/dist/intent-control.js.map +0 -1
  653. package/dist/intent-scheduling.d.ts +0 -9
  654. package/dist/intent-scheduling.d.ts.map +0 -1
  655. package/dist/intent-scheduling.js +0 -15
  656. package/dist/intent-scheduling.js.map +0 -1
  657. package/dist/learning-connection.d.ts +0 -127
  658. package/dist/learning-connection.d.ts.map +0 -1
  659. package/dist/learning-connection.js +0 -54
  660. package/dist/learning-connection.js.map +0 -1
  661. package/dist/lease-helper.d.ts.map +0 -1
  662. package/dist/lease-helper.js +0 -94
  663. package/dist/lease-helper.js.map +0 -1
  664. package/dist/lease-record.d.ts +0 -90
  665. package/dist/lease-record.d.ts.map +0 -1
  666. package/dist/lease-record.js.map +0 -1
  667. package/dist/ledger-append.d.ts +0 -15
  668. package/dist/ledger-append.d.ts.map +0 -1
  669. package/dist/ledger-append.js +0 -94
  670. package/dist/ledger-append.js.map +0 -1
  671. package/dist/ledger-events.d.ts +0 -131
  672. package/dist/ledger-events.d.ts.map +0 -1
  673. package/dist/ledger-events.js +0 -107
  674. package/dist/ledger-events.js.map +0 -1
  675. package/dist/ledger-identifiers.d.ts.map +0 -1
  676. package/dist/ledger-identifiers.js.map +0 -1
  677. package/dist/ledger-report.d.ts +0 -134
  678. package/dist/ledger-report.d.ts.map +0 -1
  679. package/dist/ledger-report.js +0 -271
  680. package/dist/ledger-report.js.map +0 -1
  681. package/dist/ledger-v3-validation.d.ts +0 -11
  682. package/dist/ledger-v3-validation.d.ts.map +0 -1
  683. package/dist/ledger-v3-validation.js +0 -265
  684. package/dist/ledger-v3-validation.js.map +0 -1
  685. package/dist/ledger.d.ts +0 -242
  686. package/dist/ledger.d.ts.map +0 -1
  687. package/dist/ledger.js +0 -142
  688. package/dist/ledger.js.map +0 -1
  689. package/dist/measured-order.d.ts +0 -249
  690. package/dist/measured-order.d.ts.map +0 -1
  691. package/dist/measured-order.js +0 -309
  692. package/dist/measured-order.js.map +0 -1
  693. package/dist/measured-session.d.ts +0 -97
  694. package/dist/measured-session.d.ts.map +0 -1
  695. package/dist/measured-session.js +0 -134
  696. package/dist/measured-session.js.map +0 -1
  697. package/dist/model-preflight.d.ts +0 -13
  698. package/dist/model-preflight.d.ts.map +0 -1
  699. package/dist/model-preflight.js +0 -29
  700. package/dist/model-preflight.js.map +0 -1
  701. package/dist/native-session-target.d.ts +0 -9
  702. package/dist/native-session-target.d.ts.map +0 -1
  703. package/dist/native-session-target.js +0 -29
  704. package/dist/native-session-target.js.map +0 -1
  705. package/dist/native-session.d.ts +0 -59
  706. package/dist/native-session.d.ts.map +0 -1
  707. package/dist/native-session.js +0 -154
  708. package/dist/native-session.js.map +0 -1
  709. package/dist/order-schedule.d.ts +0 -37
  710. package/dist/order-schedule.d.ts.map +0 -1
  711. package/dist/order-schedule.js +0 -81
  712. package/dist/order-schedule.js.map +0 -1
  713. package/dist/ordinary-children.d.ts +0 -52
  714. package/dist/ordinary-children.d.ts.map +0 -1
  715. package/dist/ordinary-children.js +0 -93
  716. package/dist/ordinary-children.js.map +0 -1
  717. package/dist/pane-reaper.d.ts +0 -111
  718. package/dist/pane-reaper.d.ts.map +0 -1
  719. package/dist/pane-reaper.js +0 -242
  720. package/dist/pane-reaper.js.map +0 -1
  721. package/dist/pi-tools.d.ts.map +0 -1
  722. package/dist/pi-tools.js +0 -21
  723. package/dist/pi-tools.js.map +0 -1
  724. package/dist/producer-ipc-contract.d.ts +0 -29
  725. package/dist/producer-ipc-contract.d.ts.map +0 -1
  726. package/dist/producer-ipc-contract.js +0 -29
  727. package/dist/producer-ipc-contract.js.map +0 -1
  728. package/dist/producer-ipc.d.ts +0 -55
  729. package/dist/producer-ipc.d.ts.map +0 -1
  730. package/dist/producer-ipc.js +0 -143
  731. package/dist/producer-ipc.js.map +0 -1
  732. package/dist/product-files.d.ts +0 -6
  733. package/dist/product-files.d.ts.map +0 -1
  734. package/dist/product-files.js +0 -55
  735. package/dist/product-files.js.map +0 -1
  736. package/dist/progress.d.ts.map +0 -1
  737. package/dist/progress.js.map +0 -1
  738. package/dist/propagation.d.ts +0 -203
  739. package/dist/propagation.d.ts.map +0 -1
  740. package/dist/propagation.js +0 -279
  741. package/dist/propagation.js.map +0 -1
  742. package/dist/refusals.d.ts +0 -16
  743. package/dist/refusals.d.ts.map +0 -1
  744. package/dist/refusals.js +0 -55
  745. package/dist/refusals.js.map +0 -1
  746. package/dist/resolve.d.ts +0 -120
  747. package/dist/resolve.d.ts.map +0 -1
  748. package/dist/resolve.js +0 -211
  749. package/dist/resolve.js.map +0 -1
  750. package/dist/resource-budget.d.ts +0 -334
  751. package/dist/resource-budget.d.ts.map +0 -1
  752. package/dist/resource-budget.js +0 -415
  753. package/dist/resource-budget.js.map +0 -1
  754. package/dist/retention-contract.d.ts.map +0 -1
  755. package/dist/retention-contract.js +0 -104
  756. package/dist/retention-contract.js.map +0 -1
  757. package/dist/retention-json.d.ts.map +0 -1
  758. package/dist/retention-json.js.map +0 -1
  759. package/dist/routing-authority.d.ts +0 -71
  760. package/dist/routing-authority.d.ts.map +0 -1
  761. package/dist/routing-authority.js +0 -100
  762. package/dist/routing-authority.js.map +0 -1
  763. package/dist/run-child.d.ts +0 -87
  764. package/dist/run-child.d.ts.map +0 -1
  765. package/dist/run-child.js +0 -248
  766. package/dist/run-child.js.map +0 -1
  767. package/dist/run-herdr.d.ts +0 -119
  768. package/dist/run-herdr.d.ts.map +0 -1
  769. package/dist/run-herdr.js +0 -335
  770. package/dist/run-herdr.js.map +0 -1
  771. package/dist/skill-packages.d.ts +0 -116
  772. package/dist/skill-packages.d.ts.map +0 -1
  773. package/dist/skill-packages.js +0 -295
  774. package/dist/skill-packages.js.map +0 -1
  775. package/dist/skill-resources.d.ts.map +0 -1
  776. package/dist/skill-resources.js +0 -52
  777. package/dist/skill-resources.js.map +0 -1
  778. package/dist/spawn.d.ts +0 -60
  779. package/dist/spawn.d.ts.map +0 -1
  780. package/dist/spawn.js +0 -116
  781. package/dist/spawn.js.map +0 -1
  782. package/dist/vendor/adoption.d.ts +0 -129
  783. package/dist/vendor/adoption.d.ts.map +0 -1
  784. package/dist/vendor/adoption.js +0 -102
  785. package/dist/vendor/adoption.js.map +0 -1
  786. package/dist/vendor/herdr-pi-lifecycle.d.ts.map +0 -1
  787. package/dist/vendor/herdr-pi-lifecycle.js.map +0 -1
  788. package/dist/work-command.d.ts +0 -32
  789. package/dist/work-command.d.ts.map +0 -1
  790. package/dist/work-command.js +0 -179
  791. package/dist/work-command.js.map +0 -1
  792. package/dist/work-ledger-destination.d.ts +0 -20
  793. package/dist/work-ledger-destination.d.ts.map +0 -1
  794. package/dist/work-ledger-destination.js +0 -131
  795. package/dist/work-ledger-destination.js.map +0 -1
  796. package/dist/work-ledger-json.d.ts +0 -25
  797. package/dist/work-ledger-json.d.ts.map +0 -1
  798. package/dist/work-ledger-json.js +0 -267
  799. package/dist/work-ledger-json.js.map +0 -1
  800. package/dist/work-ledger-occurrences.d.ts +0 -227
  801. package/dist/work-ledger-occurrences.d.ts.map +0 -1
  802. package/dist/work-ledger-occurrences.js +0 -115
  803. package/dist/work-ledger-occurrences.js.map +0 -1
  804. package/dist/work-ledger-projection.d.ts +0 -295
  805. package/dist/work-ledger-projection.d.ts.map +0 -1
  806. package/dist/work-ledger-projection.js +0 -237
  807. package/dist/work-ledger-projection.js.map +0 -1
  808. package/dist/work-ledger-snapshot.d.ts +0 -29
  809. package/dist/work-ledger-snapshot.d.ts.map +0 -1
  810. package/dist/work-ledger-snapshot.js +0 -267
  811. package/dist/work-ledger-snapshot.js.map +0 -1
  812. package/dist/work-ledger-types.d.ts +0 -261
  813. package/dist/work-ledger-types.d.ts.map +0 -1
  814. package/dist/work-ledger-types.js +0 -13
  815. package/dist/work-ledger-types.js.map +0 -1
  816. package/dist/work-ledger-validation.d.ts +0 -14
  817. package/dist/work-ledger-validation.d.ts.map +0 -1
  818. package/dist/work-ledger-validation.js +0 -226
  819. package/dist/work-ledger-validation.js.map +0 -1
  820. package/dist/work-ledger.d.ts +0 -43
  821. package/dist/work-ledger.d.ts.map +0 -1
  822. package/dist/work-ledger.js +0 -225
  823. package/dist/work-ledger.js.map +0 -1
  824. package/dist/work-policy-registry.d.ts +0 -133
  825. package/dist/work-policy-registry.d.ts.map +0 -1
  826. package/dist/work-policy-registry.js +0 -128
  827. package/dist/work-policy-registry.js.map +0 -1
  828. package/dist/work-run.d.ts +0 -56
  829. package/dist/work-run.d.ts.map +0 -1
  830. package/dist/work-run.js +0 -102
  831. package/dist/work-run.js.map +0 -1
  832. package/dist/work-setup.d.ts +0 -40
  833. package/dist/work-setup.d.ts.map +0 -1
  834. package/dist/work-setup.js +0 -174
  835. package/dist/work-setup.js.map +0 -1
  836. package/dist/workflow-fact-id.d.ts +0 -4
  837. package/dist/workflow-fact-id.d.ts.map +0 -1
  838. package/dist/workflow-fact-id.js +0 -14
  839. package/dist/workflow-fact-id.js.map +0 -1
  840. package/dist/workflow-facts.d.ts +0 -34
  841. package/dist/workflow-facts.d.ts.map +0 -1
  842. package/dist/workflow-facts.js +0 -43
  843. package/dist/workflow-facts.js.map +0 -1
  844. package/dist/workspace-lease.d.ts +0 -40
  845. package/dist/workspace-lease.d.ts.map +0 -1
  846. package/dist/workspace-lease.js +0 -333
  847. package/dist/workspace-lease.js.map +0 -1
  848. package/dist/workspace.d.ts +0 -57
  849. package/dist/workspace.d.ts.map +0 -1
  850. package/dist/workspace.js +0 -216
  851. package/dist/workspace.js.map +0 -1
  852. package/extensions/daily-dashboard-session.ts +0 -48
  853. package/extensions/daily-work-session.ts +0 -20
  854. package/extensions/learning-outcome-session.ts +0 -38
  855. package/extensions/learning-session.ts +0 -59
  856. package/extensions/ordinary-runtime.ts +0 -14
  857. package/extensions/primary-shadow.ts +0 -11
  858. package/extensions/work-policy-session.ts +0 -139
  859. package/extensions/work-run-session.ts +0 -75
  860. package/extensions/work-runtime.ts +0 -44
  861. package/extensions/work-session.ts +0 -132
  862. package/src/activity-timeline.ts +0 -133
  863. package/src/approval-prompt.ts +0 -225
  864. package/src/approval-store.ts +0 -386
  865. package/src/approval.ts +0 -399
  866. package/src/capabilities.ts +0 -220
  867. package/src/catalog.ts +0 -306
  868. package/src/check-runner.ts +0 -387
  869. package/src/control-journal.ts +0 -26
  870. package/src/correlation.ts +0 -320
  871. package/src/daily-dashboard-host.ts +0 -105
  872. package/src/daily-panel.ts +0 -80
  873. package/src/daily-view-input.ts +0 -59
  874. package/src/daily-view-render.ts +0 -45
  875. package/src/daily-view.ts +0 -160
  876. package/src/dashboard-cli.ts +0 -340
  877. package/src/dashboard-display-controls.ts +0 -21
  878. package/src/dashboard-handshake.ts +0 -199
  879. package/src/dashboard-harness.ts +0 -37
  880. package/src/dashboard-herdr.ts +0 -363
  881. package/src/dashboard-host-contract.ts +0 -50
  882. package/src/dashboard-host-transport.ts +0 -43
  883. package/src/dashboard-host.ts +0 -244
  884. package/src/dashboard-menu.ts +0 -28
  885. package/src/dashboard-observation.ts +0 -46
  886. package/src/dashboard-projection.ts +0 -390
  887. package/src/dashboard-render.ts +0 -259
  888. package/src/debrief-contract.ts +0 -127
  889. package/src/debrief-fixture.ts +0 -29
  890. package/src/debrief-host.ts +0 -53
  891. package/src/debrief-render.ts +0 -49
  892. package/src/debrief.ts +0 -198
  893. package/src/definitions.ts +0 -211
  894. package/src/delegate-types.ts +0 -154
  895. package/src/delegate.ts +0 -348
  896. package/src/delegation-approval.ts +0 -126
  897. package/src/dispatch-control.ts +0 -81
  898. package/src/effect-profile-runtime.ts +0 -46
  899. package/src/effect-profile.ts +0 -129
  900. package/src/execution-retention.ts +0 -230
  901. package/src/executor.ts +0 -123
  902. package/src/experiment-contract.ts +0 -66
  903. package/src/experiment-state.ts +0 -44
  904. package/src/experiment-store.ts +0 -98
  905. package/src/experiment.ts +0 -236
  906. package/src/factory-contract.ts +0 -47
  907. package/src/factory-migration.ts +0 -29
  908. package/src/factory-order.ts +0 -56
  909. package/src/factory-registry.ts +0 -60
  910. package/src/fanout.ts +0 -106
  911. package/src/file-lock.ts +0 -178
  912. package/src/finalization.ts +0 -79
  913. package/src/git-identity.ts +0 -56
  914. package/src/grant-env.ts +0 -221
  915. package/src/grant-store.ts +0 -235
  916. package/src/herdr-cli.ts +0 -125
  917. package/src/herdr-pi-lifecycle.ts +0 -21
  918. package/src/herdr-poll.ts +0 -253
  919. package/src/herdr-stage.ts +0 -55
  920. package/src/init.ts +0 -389
  921. package/src/intent-application.ts +0 -91
  922. package/src/intent-control.ts +0 -107
  923. package/src/intent-scheduling.ts +0 -14
  924. package/src/learning-connection.ts +0 -70
  925. package/src/lease-helper.ts +0 -97
  926. package/src/lease-record.ts +0 -131
  927. package/src/ledger-append.ts +0 -72
  928. package/src/ledger-events.ts +0 -226
  929. package/src/ledger-report.ts +0 -357
  930. package/src/ledger-v3-validation.ts +0 -266
  931. package/src/ledger.ts +0 -369
  932. package/src/measured-order.ts +0 -72
  933. package/src/measured-session.ts +0 -70
  934. package/src/model-preflight.ts +0 -41
  935. package/src/native-session-target.ts +0 -23
  936. package/src/native-session.ts +0 -139
  937. package/src/order-schedule.ts +0 -42
  938. package/src/ordinary-children.ts +0 -59
  939. package/src/pane-reaper.ts +0 -270
  940. package/src/pi-tools.ts +0 -25
  941. package/src/producer-ipc-contract.ts +0 -26
  942. package/src/producer-ipc.ts +0 -107
  943. package/src/product-files.ts +0 -34
  944. package/src/propagation.ts +0 -333
  945. package/src/refusals.ts +0 -70
  946. package/src/resolve.ts +0 -267
  947. package/src/resource-budget.ts +0 -349
  948. package/src/retention-contract.ts +0 -84
  949. package/src/retention-json.ts +0 -20
  950. package/src/routing-authority.ts +0 -121
  951. package/src/run-child.ts +0 -303
  952. package/src/run-herdr.ts +0 -386
  953. package/src/skill-packages.ts +0 -314
  954. package/src/skill-resources.ts +0 -48
  955. package/src/spawn.ts +0 -156
  956. package/src/vendor/adoption.ts +0 -109
  957. package/src/work-command.ts +0 -197
  958. package/src/work-ledger-destination.ts +0 -113
  959. package/src/work-ledger-json.ts +0 -228
  960. package/src/work-ledger-occurrences.ts +0 -99
  961. package/src/work-ledger-projection.ts +0 -262
  962. package/src/work-ledger-snapshot.ts +0 -246
  963. package/src/work-ledger-types.ts +0 -229
  964. package/src/work-ledger-validation.ts +0 -174
  965. package/src/work-ledger.ts +0 -186
  966. package/src/work-policy-registry.ts +0 -81
  967. package/src/work-run.ts +0 -79
  968. package/src/work-setup.ts +0 -141
  969. package/src/workflow-fact-id.ts +0 -16
  970. package/src/workflow-facts.ts +0 -65
  971. package/src/workspace-lease.ts +0 -363
  972. package/src/workspace.ts +0 -308
  973. /package/contracts/{ledger/v3 → ledger-record/v1}/fixtures/capability-decision.json +0 -0
  974. /package/contracts/{ledger/v3 → ledger-record/v1}/fixtures/workspace-lease.json +0 -0
  975. /package/dist/{herdr-name.d.ts → executors/herdr-name.d.ts} +0 -0
  976. /package/dist/{herdr-name.js → executors/herdr-name.js} +0 -0
  977. /package/dist/{herdr-pi-lifecycle.d.ts → executors/herdr-pi-lifecycle.d.ts} +0 -0
  978. /package/dist/{herdr-start.d.ts → executors/herdr-start.d.ts} +0 -0
  979. /package/dist/{herdr-start.js → executors/herdr-start.js} +0 -0
  980. /package/dist/{vendor → executors/vendor}/herdr-pi-lifecycle.d.ts +0 -0
  981. /package/dist/{vendor → executors/vendor}/herdr-pi-lifecycle.js +0 -0
  982. /package/dist/{file-lock.d.ts → governance/file-lock.d.ts} +0 -0
  983. /package/dist/{finalization.d.ts → governance/finalization.d.ts} +0 -0
  984. /package/dist/{finalization.js → governance/finalization.js} +0 -0
  985. /package/dist/{lease-helper.d.ts → governance/lease-helper.d.ts} +0 -0
  986. /package/dist/{lease-record.js → governance/lease-record.js} +0 -0
  987. /package/dist/{retention-contract.d.ts → governance/retention-contract.d.ts} +0 -0
  988. /package/dist/{retention-json.d.ts → governance/retention-json.d.ts} +0 -0
  989. /package/dist/{retention-json.js → governance/retention-json.js} +0 -0
  990. /package/dist/{chain.d.ts → kernel/chain.d.ts} +0 -0
  991. /package/dist/{chain.js → kernel/chain.js} +0 -0
  992. /package/dist/{correlation.d.ts → kernel/correlation.d.ts} +0 -0
  993. /package/dist/{definitions.d.ts → kernel/definitions.d.ts} +0 -0
  994. /package/dist/{delegate.d.ts → kernel/delegate.d.ts} +0 -0
  995. /package/dist/{delegation-approval.d.ts → kernel/delegation-approval.d.ts} +0 -0
  996. /package/dist/{execution-id.d.ts → kernel/execution-id.d.ts} +0 -0
  997. /package/dist/{execution-id.js → kernel/execution-id.js} +0 -0
  998. /package/dist/{fanout.d.ts → kernel/fanout.d.ts} +0 -0
  999. /package/dist/{ledger-identifiers.d.ts → kernel/ledger-identifiers.d.ts} +0 -0
  1000. /package/dist/{ledger-identifiers.js → kernel/ledger-identifiers.js} +0 -0
  1001. /package/dist/{pi-tools.d.ts → kernel/pi-tools.d.ts} +0 -0
  1002. /package/dist/{progress.d.ts → kernel/progress.d.ts} +0 -0
  1003. /package/dist/{progress.js → kernel/progress.js} +0 -0
  1004. /package/dist/{skill-resources.d.ts → kernel/skill-resources.d.ts} +0 -0
  1005. /package/dist/{dashboard-render.d.ts → products/dashboard-render.d.ts} +0 -0
  1006. /package/src/{herdr-name.ts → executors/herdr-name.ts} +0 -0
  1007. /package/src/{herdr-start.ts → executors/herdr-start.ts} +0 -0
  1008. /package/src/{vendor → executors/vendor}/herdr-pi-lifecycle.ts +0 -0
  1009. /package/src/{chain.ts → kernel/chain.ts} +0 -0
  1010. /package/src/{execution-id.ts → kernel/execution-id.ts} +0 -0
  1011. /package/src/{ledger-identifiers.ts → kernel/ledger-identifiers.ts} +0 -0
  1012. /package/src/{progress.ts → kernel/progress.ts} +0 -0
@@ -1,93 +0,0 @@
1
- import { randomUUID } from "node:crypto";
2
- import { isExecutionId } from "./execution-id.js";
3
- import { dataDigest, detached, freeze, sha } from "./debrief-contract.js";
4
- import { controlShape } from "./dispatch-control.js";
5
- const sessions = new WeakMap(), ports = new WeakMap();
6
- const id = (v) => typeof v === "string" && /^[a-zA-Z0-9:_-]{1,128}$/.test(v);
7
- function target(value) { const t = detached(value); controlShape(t, ["executionId", "parentExecutionId", "toolCallId"]); if (!isExecutionId(t.executionId) || !(t.parentExecutionId === null || isExecutionId(t.parentExecutionId)) || !(t.toolCallId === null || typeof t.toolCallId === "string" && t.toolCallId.length > 0 && t.toolCallId.length <= 256))
8
- throw Error("exact original occurrence identity required"); return t; }
9
- export function ordinaryCancellation(input) { const r = detached(input); controlShape(r, ["version", "requestId", "bindingDigest", "expectedRevision", "target"]); if (r.version !== "ordinary-cancel-v1" || !id(r.requestId) || !sha(r.bindingDigest) || !Number.isSafeInteger(r.expectedRevision) || r.expectedRevision < 0)
10
- throw Error("invalid ordinary cancellation"); return freeze({ ...r, target: target(r.target) }); }
11
- export const ordinaryCancellationDigest = (r) => dataDigest(ordinaryCancellation(r));
12
- export const isOrdinaryChildren = (p) => typeof p === "object" && p !== null && ports.has(p);
13
- /** Extension-internal constructor. No disk discovery/recovery and no identity inferred from labels. */
14
- function initializeOrdinaryChildren(session) {
15
- if (sessions.has(session))
16
- throw Error("original session already registered");
17
- const s = { holds: new Set(), enabled: false, coverageGap: false, bindingDigest: dataDigest({ occurrence: randomUUID() }), revision: 0, rows: new Map(), handles: new Map(), requests: new Map() };
18
- const port = Object.freeze({ bindingDigest: s.bindingDigest,
19
- quiescent: () => !s.coverageGap && [...s.rows.values()].every(r => r.state === "settled" && r.boundary === "not-assessed"),
20
- inspect: () => freeze(detached({ bindingDigest: s.bindingDigest, revision: s.revision, children: [...s.rows.values()], admission: s.holds.size ? "held-by-original-owner" : "open", coverage: s.coverageGap ? "unretained-before-opt-in" : "original-registered-lifetimes-only", freshness: "snapshot-unknown", recovery: "unavailable", acceptance: "not-assessed" })),
21
- cancel(input, authority) {
22
- const r = ordinaryCancellation(input), digest = ordinaryCancellationDigest(input), old = s.requests.get(r.requestId);
23
- if (old) {
24
- if (old.digest !== digest)
25
- throw Error("immutable ordinary cancellation ID");
26
- return freeze(detached(old.result));
27
- }
28
- if (r.bindingDigest !== s.bindingDigest || r.expectedRevision !== s.revision)
29
- throw Error("stale original ordinary controller CAS");
30
- if (!authority || authority.bindingDigest !== s.bindingDigest || !authority.requestDigests.includes(digest))
31
- throw Error("independent exact ordinary cancellation authority required");
32
- const row = s.rows.get(r.target.executionId), handle = s.handles.get(r.target.executionId);
33
- if (!row || dataDigest(row.target) !== dataDigest(r.target) || row.state !== "active" || !handle)
34
- throw Error("original live child handle unavailable; no recovery");
35
- if (s.requests.size >= 1024)
36
- throw Error("ordinary cancellation capacity exhausted");
37
- // Synchronous original-handle operation: CAS cannot yield between checking and requesting abort.
38
- const result = { state: "abort-requested", target: r.target, revision: ++s.revision, completion: "pending-original-caller", durability: "process-local" };
39
- s.requests.set(r.requestId, { digest, result });
40
- row.abortRequested = true;
41
- handle.abort();
42
- return freeze(detached(result));
43
- } });
44
- sessions.set(session, port);
45
- ports.set(port, s);
46
- }
47
- /** Only the original session object can retrieve its retained port; spreading/copying cannot. */
48
- export function ordinaryChildrenFor(session) { const p = sessions.get(session); if (!p)
49
- throw Error("original grants session required"); ports.get(p).enabled = true; return p; }
50
- /** Associate the actual extension API object at factory creation, never a label or path. */
51
- export function associateOrdinaryHost(host, session) { initializeOrdinaryChildren(session); const p = sessions.get(session); if (!p || sessions.has(host))
52
- throw Error("original unbound extension host required"); sessions.set(host, p); }
53
- export function retainSessionChild(session, input, caller) { const p = sessions.get(session); if (!p)
54
- return undefined; const s = ports.get(p); if (!s.enabled) {
55
- s.coverageGap = true;
56
- return undefined;
57
- } return retainOrdinaryChild(p, input, caller); }
58
- /** Internal host control seam, not a model tool or recovered capability. Reads never call it. */
59
- export function holdOrdinaryDispatch(port, key) {
60
- const s = ports.get(port);
61
- if (!s || !sha(key))
62
- throw Error("original ordinary boundary required");
63
- if (s.coverageGap || [...s.rows.values()].some(r => r.state !== "active" && r.boundary !== "not-assessed"))
64
- throw Error("ordinary boundary unavailable; no recovery");
65
- if (!s.holds.has(key)) {
66
- if (s.holds.size >= 32)
67
- throw Error("ordinary boundary capacity exhausted");
68
- s.holds.add(key);
69
- s.revision++;
70
- }
71
- return Object.freeze({ ready: () => port.quiescent(), release: () => { if (s.holds.delete(key))
72
- s.revision++; } });
73
- }
74
- /** Extension executor seam; never exported through the package root or model tools. */
75
- export function retainOrdinaryChild(port, input, caller) {
76
- const s = ports.get(port);
77
- if (!s)
78
- throw Error("original ordinary controller required");
79
- const t = target(input);
80
- if (s.holds.size)
81
- throw Error("ordinary dispatch held at original control boundary");
82
- if (s.rows.has(t.executionId) || s.rows.size >= 1024)
83
- throw Error("ordinary occurrence reused or capacity exhausted");
84
- const abort = new AbortController(), row = { target: t, state: "active", abortRequested: false, control: "not-assessed", boundary: "not-assessed", outcome: null };
85
- s.rows.set(t.executionId, row);
86
- s.handles.set(t.executionId, abort);
87
- s.revision++;
88
- let done = false;
89
- return { signal: caller ? AbortSignal.any([caller, abort.signal]) : abort.signal,
90
- settle(outcome, control, boundary = control) { if (done)
91
- throw Error("original child already settled"); done = true; row.outcome = detached(outcome); row.control = control; row.boundary = boundary; row.state = boundary === "unknown" ? "unknown" : "settled"; s.handles.delete(t.executionId); s.revision++; } };
92
- }
93
- //# sourceMappingURL=ordinary-children.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ordinary-children.js","sourceRoot":"","sources":["../src/ordinary-children.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAOrD,MAAM,QAAQ,GAAC,IAAI,OAAO,EAA2B,EAAC,KAAK,GAAC,IAAI,OAAO,EAAgB,CAAC;AACxF,MAAM,EAAE,GAAC,CAAC,CAAS,EAAC,EAAE,CAAA,OAAO,CAAC,KAAG,QAAQ,IAAE,yBAAyB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC7E,SAAS,MAAM,CAAC,KAAoB,IAAE,MAAM,CAAC,GAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAA,YAAY,CAAC,CAAC,EAAC,CAAC,aAAa,EAAC,mBAAmB,EAAC,YAAY,CAAC,CAAC,CAAC,CAAA,IAAG,CAAC,aAAa,CAAC,CAAC,CAAC,WAAW,CAAC,IAAE,CAAC,CAAC,CAAC,CAAC,iBAAiB,KAAG,IAAI,IAAE,aAAa,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,IAAE,CAAC,CAAC,CAAC,CAAC,UAAU,KAAG,IAAI,IAAE,OAAO,CAAC,CAAC,UAAU,KAAG,QAAQ,IAAE,CAAC,CAAC,UAAU,CAAC,MAAM,GAAC,CAAC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AAA,CAAC,CAAA,WAAW,CAAC,GAAG,CAAC,CAAC,MAAM,EAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAA,CAAC,CAAA,KAAK,CAAC,MAAM;QACtF,MAAM,CAAC,OAAe,EAAC,OAAoB,EAAC,WAAsB,OAAO,IAAE,IAAG,IAAI;YAAC,MAAM,KAAK,CAAC,gCAAgC,CAAC,CAAC,CAAA,IAAI,GAAC,IAAI,CAAC,CAAA,GAAG,CAAC,OAAO,GAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAA,GAAG,CAAC,OAAO,GAAC,OAAO,CAAC,CAAA,GAAG,CAAC,QAAQ,GAAC,QAAQ,CAAC,CAAA,GAAG,CAAC,KAAK,GAAC,QAAQ,KAAG,SAAS,CAAA,CAAC,CAAA,SAAS,CAAA,CAAC,CAAA,SAAS,CAAC,CAAA,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAA,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAA,CAAC,EAAC,CAAC;AAC1T,CAAC"}
@@ -1,111 +0,0 @@
1
- /**
2
- * Close herdr panes this process opened but never got to close.
3
- *
4
- * **As of ADR-0032 a pane belongs to the AGENT RUN, not to the tool call.** `runHerdrPane` closes a tab only for
5
- * a child that did *not* settle — closing the tab is the only kill herdr offers, so a child still working must
6
- * lose its pane. A child that answered keeps its pane so a human can read it, and this module reaps those: at
7
- * `agent_settled` (async) and at process `exit` (sync backstop).
8
- *
9
- * The gap that remains is the one this module was created for. A pi session **killed outright** runs no `exit`
10
- * handler, so it leaves one pane per tracked child, and `docs/probes/g16-herdr` records that an orphaned pane is
11
- * not trivially closable afterwards. R-62 was re-rated L×L → M×L when ADR-0031 made panes the default path.
12
- *
13
- * **Registered on `exit` only, deliberately — not on SIGINT or SIGTERM.** That is the part worth reading,
14
- * because the obvious fix is the dangerous one. Adding a signal listener *suppresses Node's default
15
- * termination*, so a library that adds one takes over an application-level decision it has no standing to
16
- * make: pi uses SIGINT to interrupt a turn, and a listener here that re-raised would turn "cancel this
17
- * delegation" into "exit pi". A governance package quietly changing the host's interrupt semantics is a
18
- * worse defect than the leak it fixes, and it would land on **every** session rather than the opt-in ones.
19
- *
20
- * So the coverage is exact and stated rather than implied:
21
- *
22
- * - **Covered:** normal exit, `process.exit()`, an uncaught exception that unwinds to the default handler.
23
- * - **NOT covered:** SIGKILL, and SIGTERM/SIGINT where nothing else in the process has installed a
24
- * listener. Node terminates without running `exit` handlers in those cases, by design. A pane can still
25
- * be orphaned there, and `herdr tab close <id>` is the manual remedy.
26
- *
27
- * Everything here is **synchronous**, because an `exit` handler is: a promise scheduled there never runs.
28
- */
29
- import { type HerdrExec } from "./herdr-cli.ts";
30
- /**
31
- * How many panes may be open at once — ADR-0032.
32
- *
33
- * **Derived from `MAX_CHILDREN_PER_CALL` rather than declared, so the two cannot drift.** The bound is not
34
- * decoration: `delegate_all` is capped per call and the fan-out budget bounds a subtree, but a plain blocking
35
- * `delegate` spends **nothing** from that budget by design — so thirty sequential `delegate` calls in one agent
36
- * run would otherwise hold thirty panes open until it settled.
37
- */
38
- export declare const MAX_OPEN_PANES = 8;
39
- export interface OpenPane {
40
- /** herdr tab id — what `tab close` takes. */
41
- tab: string;
42
- /** herdr agent name, for diagnostics. There is no `agent stop`, so nothing acts on it — see `closePane`. */
43
- name: string;
44
- /** Staged system-prompt directory, removed with the pane it belonged to. */
45
- promptDir?: string;
46
- /**
47
- * True once the child has answered and stopped working.
48
- *
49
- * **The trim may only close a pane with this set**, and that is a correctness rule rather than politeness. pi
50
- * executes tool calls in **parallel** by default, and a plain `delegate` spends nothing from the fan-out
51
- * budget — so one assistant message can hold `delegate_all(8)` *and* a `delegate`, and the ninth pane's trim
52
- * used to close the oldest **live sibling**. Measured: two `delegate_all(8)` in one message killed **8 of 16
53
- * children mid-work**, each reported as "could not be started" with its partial output discarded, while the
54
- * ledger recorded all sixteen as provisioned. ADR-0032 argued the cap from *sequential* delegates only.
55
- */
56
- settled?: boolean;
57
- /**
58
- * The operator asked to keep this tab (`PI_GRANTS_HERDR_KEEP_PANE=1`), so no sweep may close it.
59
- *
60
- * It is registered anyway, and only for its `promptDir`: that temp dir was otherwise unreachable by either
61
- * sweep and leaked one directory per kept pane, forever. So `exit` removes the staged prompt and leaves the
62
- * tab, which is exactly what the flag promises.
63
- */
64
- keepTab?: boolean;
65
- }
66
- /** A run has finished with its pane: the trim may now reclaim it. */
67
- export declare function markPaneSettled(tab: string): void;
68
- /** A run has opened a pane. Idempotent per tab, and installs the exit hook on first use only. */
69
- export declare function trackPane(pane: OpenPane): void;
70
- /** A run closed its own pane the normal way. */
71
- export declare function untrackPane(tab: string): void;
72
- /** How many panes are currently outstanding — for tests and for `/grants`. */
73
- export declare function openPaneCount(): number;
74
- /**
75
- * Close every outstanding pane and return the tab ids closed.
76
- *
77
- * Exported and parameterised so it can be tested without herdr installed: the exit hook is unreachable from
78
- * a test (registering a real `exit` handler would run during the test runner's own shutdown), so the hook is
79
- * one line and *this* is where the behaviour lives.
80
- *
81
- * Failures are swallowed per pane rather than per call — one pane herdr will not close must not strand the
82
- * other seven, and nothing at exit has anywhere to report to anyway.
83
- */
84
- export declare function reapOpenPanes(syncExec?: (args: string[]) => void, now?: () => number): string[];
85
- /**
86
- * Close every outstanding pane — the `agent_settled` path (ADR-0032).
87
- *
88
- * **A separate function from `reapOpenPanes` rather than a shared implementation**, and the reason is not
89
- * style. The sync one is `execFileSync` with a six-second total budget *by necessity*: an `exit` handler cannot
90
- * await. Running that at `agent_settled` would freeze pi for up to six seconds **every time the operator gets
91
- * their prompt back** — turning a feature that exists to make work visible into a stall.
92
- *
93
- * Both drain the same `Map`, keyed by tab id, so a double close is impossible and a pane herdr refused stays
94
- * registered for whichever sweep runs next.
95
- *
96
- * Sequential rather than concurrent: a fan-out's panes are at most `MAX_OPEN_PANES`, and eight `tab close`
97
- * calls in parallel against one herdr server buys nothing worth the burst.
98
- */
99
- export declare function reapOpenPanesAsync(exec?: HerdrExec): Promise<string[]>;
100
- /**
101
- * Keep at most `MAX_OPEN_PANES` open, closing the oldest first.
102
- *
103
- * The `Map`'s insertion order **is** the age order, so no timestamp is needed — and that is why `trackPane`
104
- * must never re-`set` an existing tab, which would move it to the back of the queue and make an old pane look
105
- * new.
106
- *
107
- * Whatever it closes is returned so the caller can **say so** rather than silently dropping a pane the operator
108
- * was reading (R-48's rule, applied to a display).
109
- */
110
- export declare function trimOpenPanes(exec?: HerdrExec): Promise<string[]>;
111
- //# sourceMappingURL=pane-reaper.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pane-reaper.d.ts","sourceRoot":"","sources":["../src/pane-reaper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAMH,OAAO,EAA2B,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEzE;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,IAAwB,CAAC;AAEpD,MAAM,WAAW,QAAQ;IACvB,6CAA6C;IAC7C,GAAG,EAAE,MAAM,CAAC;IACZ,4GAA4G;IAC5G,IAAI,EAAE,MAAM,CAAC;IACb,4EAA4E;IAC5E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,qEAAqE;AACrE,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAGjD;AAeD,iGAAiG;AACjG,wBAAgB,SAAS,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,CAO9C;AAED,gDAAgD;AAChD,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAE7C;AAED,8EAA8E;AAC9E,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAyBD;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,QAAQ,GAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAsB,EAAE,GAAG,eAAW,GAAG,MAAM,EAAE,CAgD5G;AAsBD;;;;;;;;;;;;;GAaG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,GAAE,SAAuB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CASzF;AAED;;;;;;;;;GASG;AACH,wBAAsB,aAAa,CAAC,IAAI,GAAE,SAAuB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAmBpF"}
@@ -1,242 +0,0 @@
1
- /**
2
- * Close herdr panes this process opened but never got to close.
3
- *
4
- * **As of ADR-0032 a pane belongs to the AGENT RUN, not to the tool call.** `runHerdrPane` closes a tab only for
5
- * a child that did *not* settle — closing the tab is the only kill herdr offers, so a child still working must
6
- * lose its pane. A child that answered keeps its pane so a human can read it, and this module reaps those: at
7
- * `agent_settled` (async) and at process `exit` (sync backstop).
8
- *
9
- * The gap that remains is the one this module was created for. A pi session **killed outright** runs no `exit`
10
- * handler, so it leaves one pane per tracked child, and `docs/probes/g16-herdr` records that an orphaned pane is
11
- * not trivially closable afterwards. R-62 was re-rated L×L → M×L when ADR-0031 made panes the default path.
12
- *
13
- * **Registered on `exit` only, deliberately — not on SIGINT or SIGTERM.** That is the part worth reading,
14
- * because the obvious fix is the dangerous one. Adding a signal listener *suppresses Node's default
15
- * termination*, so a library that adds one takes over an application-level decision it has no standing to
16
- * make: pi uses SIGINT to interrupt a turn, and a listener here that re-raised would turn "cancel this
17
- * delegation" into "exit pi". A governance package quietly changing the host's interrupt semantics is a
18
- * worse defect than the leak it fixes, and it would land on **every** session rather than the opt-in ones.
19
- *
20
- * So the coverage is exact and stated rather than implied:
21
- *
22
- * - **Covered:** normal exit, `process.exit()`, an uncaught exception that unwinds to the default handler.
23
- * - **NOT covered:** SIGKILL, and SIGTERM/SIGINT where nothing else in the process has installed a
24
- * listener. Node terminates without running `exit` handlers in those cases, by design. A pane can still
25
- * be orphaned there, and `herdr tab close <id>` is the manual remedy.
26
- *
27
- * Everything here is **synchronous**, because an `exit` handler is: a promise scheduled there never runs.
28
- */
29
- import { execFileSync } from "node:child_process";
30
- import { rmSync } from "node:fs";
31
- import { rm } from "node:fs/promises";
32
- import { MAX_CHILDREN_PER_CALL } from "./fanout.js";
33
- import { defaultExec, parseReply } from "./herdr-cli.js";
34
- /**
35
- * How many panes may be open at once — ADR-0032.
36
- *
37
- * **Derived from `MAX_CHILDREN_PER_CALL` rather than declared, so the two cannot drift.** The bound is not
38
- * decoration: `delegate_all` is capped per call and the fan-out budget bounds a subtree, but a plain blocking
39
- * `delegate` spends **nothing** from that budget by design — so thirty sequential `delegate` calls in one agent
40
- * run would otherwise hold thirty panes open until it settled.
41
- */
42
- export const MAX_OPEN_PANES = MAX_CHILDREN_PER_CALL;
43
- /** A run has finished with its pane: the trim may now reclaim it. */
44
- export function markPaneSettled(tab) {
45
- const pane = open.get(tab);
46
- if (pane)
47
- pane.settled = true;
48
- }
49
- /**
50
- * Panes opened by THIS process and not yet closed. Keyed by tab id, so a double close is impossible.
51
- *
52
- * **That keying rests on tab ids being unique, which was measured rather than assumed** (herdr 0.7.5): ids
53
- * are `w<workspace>:t<counter>`, allocated by the single server, and **not recycled** — creating a tab,
54
- * closing it, and creating again yields the next counter value, never the freed one. If that ever changed,
55
- * concurrent panes would collapse into one entry and an early finisher's `untrackPane` would drop a live
56
- * sibling. Recorded because the hazard is invisible in the code and the precondition lives in another
57
- * project.
58
- */
59
- const open = new Map();
60
- let hookInstalled = false;
61
- /** A run has opened a pane. Idempotent per tab, and installs the exit hook on first use only. */
62
- export function trackPane(pane) {
63
- open.set(pane.tab, pane);
64
- if (hookInstalled)
65
- return;
66
- hookInstalled = true;
67
- // `once`, and only ever one, so a fan-out of eight children does not install eight handlers and trip
68
- // Node's MaxListenersExceededWarning — which would be this package printing a warning about itself.
69
- process.once("exit", () => void reapOpenPanes());
70
- }
71
- /** A run closed its own pane the normal way. */
72
- export function untrackPane(tab) {
73
- open.delete(tab);
74
- }
75
- /** How many panes are currently outstanding — for tests and for `/grants`. */
76
- export function openPaneCount() {
77
- return open.size;
78
- }
79
- /** Per-command wall clock. `SIGKILL` because `timeout` alone is not a bound — see `TOTAL_BUDGET_MS`. */
80
- const PER_CALL_MS = 2000;
81
- /**
82
- * Total wall clock the whole sweep may add to process exit.
83
- *
84
- * **Measured, and the reason this exists.** With eight panes and a hung herdr, a per-call timeout of 5s
85
- * across two calls per pane is **80 seconds of silent hang at shutdown** — `stdio: "ignore"`, so the process
86
- * looks wedged with no output. Worse, `timeout` is not a hard bound at all: `spawnSync` sends `SIGTERM` and
87
- * then waits for the child to actually die, so a process ignoring `SIGTERM` runs to its own completion
88
- * (measured: a 3s timeout took 59.8s against `trap '' TERM; sleep 60`). Hence `killSignal: "SIGKILL"` **and**
89
- * a budget across the whole sweep rather than per call.
90
- *
91
- * A pane left open because the budget ran out is the failure this whole module downgrades to, and it is the
92
- * right one: `herdr tab close <id>` is a five-second manual fix, whereas a shell that will not exit is not.
93
- */
94
- const TOTAL_BUDGET_MS = 6000;
95
- /** Run one herdr command synchronously, swallowing everything: at exit there is nowhere to report. */
96
- const defaultSyncExec = (args) => {
97
- execFileSync("herdr", args, { stdio: "ignore", timeout: PER_CALL_MS, killSignal: "SIGKILL" });
98
- };
99
- /**
100
- * Close every outstanding pane and return the tab ids closed.
101
- *
102
- * Exported and parameterised so it can be tested without herdr installed: the exit hook is unreachable from
103
- * a test (registering a real `exit` handler would run during the test runner's own shutdown), so the hook is
104
- * one line and *this* is where the behaviour lives.
105
- *
106
- * Failures are swallowed per pane rather than per call — one pane herdr will not close must not strand the
107
- * other seven, and nothing at exit has anywhere to report to anyway.
108
- */
109
- export function reapOpenPanes(syncExec = defaultSyncExec, now = Date.now) {
110
- const closed = [];
111
- const deadline = now() + TOTAL_BUDGET_MS;
112
- for (const pane of [...open.values()]) {
113
- // Checked BEFORE each pane rather than after, so the budget bounds what we start, not what we finish.
114
- // Panes left behind stay in the map; there is no later sweep, and saying so is the honest position —
115
- // `openPaneCount()` is non-zero afterwards precisely so a caller could report it if it ever wanted to.
116
- if (now() >= deadline)
117
- break;
118
- // No `agent stop`: it is not a herdr command (see `closePane`). Closing the tab is the kill.
119
- //
120
- // A `keepTab` pane is registered only for its staged prompt: remove that and leave the tab alone, which is
121
- // the whole of what `PI_GRANTS_HERDR_KEEP_PANE=1` promises.
122
- let closedThisPane = pane.keepTab === true;
123
- if (pane.keepTab) {
124
- if (pane.promptDir) {
125
- try {
126
- rmSync(pane.promptDir, { recursive: true, force: true });
127
- }
128
- catch {
129
- /* /tmp litter, not correctness */
130
- }
131
- }
132
- open.delete(pane.tab);
133
- continue;
134
- }
135
- try {
136
- syncExec(["tab", "close", pane.tab]);
137
- closed.push(pane.tab);
138
- closedThisPane = true;
139
- }
140
- catch {
141
- /* an orphan we could not close: `herdr tab close` is the manual remedy, as documented above */
142
- }
143
- // **The staged prompt is deleted only when the tab is provably gone.** It used to be removed
144
- // unconditionally, so a pane herdr refused to close lost its `--append-system-prompt` file — and pi treats a
145
- // missing path there as **literal text, with no warning** (`resource-loader.js`: `existsSync` fails, the
146
- // input is returned). Re-running that pane's echoed argv would hand the child a pathname as its
147
- // instructions. Litter is cheaper than silently swapping a definition's body for its filename.
148
- if (closedThisPane && pane.promptDir) {
149
- try {
150
- rmSync(pane.promptDir, { recursive: true, force: true });
151
- }
152
- catch {
153
- /* /tmp litter, not correctness */
154
- }
155
- }
156
- // Untracked either way, and only here: at `exit` there is no later sweep, so keeping an unclosable pane
157
- // registered buys nothing. `closePane`'s async path deliberately differs — another sweep may still run.
158
- open.delete(pane.tab);
159
- }
160
- return closed;
161
- }
162
- /**
163
- * Close one tracked pane. Shared by the async sweep and the trim so they cannot disagree about what "closed"
164
- * means — which is the whole of R-62's lesson, one layer up.
165
- *
166
- * Returns whether the tab is **provably** gone. A close herdr refused leaves the pane tracked, so the `exit`
167
- * handler retries it; untracking on a failed close is what disabled the one control built for that failure.
168
- */
169
- async function closePane(exec, pane) {
170
- // **No `agent stop`.** It is not a herdr command — measured against 0.7.5, where it prints the usage banner
171
- // and exits 0, which `defaultExec` reports as success. Two call sites here and one in `run-herdr.ts` issued it
172
- // for nothing, and `docs/probes/g16-herdr` asserted it worked from a block that was never run. Closing the tab
173
- // is the only kill herdr offers, and it does kill the child.
174
- const reply = await exec(["tab", "close", pane.tab]).catch(() => undefined);
175
- const closed = reply !== undefined && !parseReply(reply).error;
176
- if (!closed)
177
- return false;
178
- if (pane.promptDir)
179
- await rm(pane.promptDir, { recursive: true, force: true }).catch(() => undefined);
180
- open.delete(pane.tab);
181
- return true;
182
- }
183
- /**
184
- * Close every outstanding pane — the `agent_settled` path (ADR-0032).
185
- *
186
- * **A separate function from `reapOpenPanes` rather than a shared implementation**, and the reason is not
187
- * style. The sync one is `execFileSync` with a six-second total budget *by necessity*: an `exit` handler cannot
188
- * await. Running that at `agent_settled` would freeze pi for up to six seconds **every time the operator gets
189
- * their prompt back** — turning a feature that exists to make work visible into a stall.
190
- *
191
- * Both drain the same `Map`, keyed by tab id, so a double close is impossible and a pane herdr refused stays
192
- * registered for whichever sweep runs next.
193
- *
194
- * Sequential rather than concurrent: a fan-out's panes are at most `MAX_OPEN_PANES`, and eight `tab close`
195
- * calls in parallel against one herdr server buys nothing worth the burst.
196
- */
197
- export async function reapOpenPanesAsync(exec = defaultExec) {
198
- const closed = [];
199
- for (const pane of [...open.values()]) {
200
- // `keepTab` panes are registered only so their staged prompt can be reaped at `exit`; the tab itself is the
201
- // operator's to close.
202
- if (pane.keepTab)
203
- continue;
204
- if (await closePane(exec, pane))
205
- closed.push(pane.tab);
206
- }
207
- return closed;
208
- }
209
- /**
210
- * Keep at most `MAX_OPEN_PANES` open, closing the oldest first.
211
- *
212
- * The `Map`'s insertion order **is** the age order, so no timestamp is needed — and that is why `trackPane`
213
- * must never re-`set` an existing tab, which would move it to the back of the queue and make an old pane look
214
- * new.
215
- *
216
- * Whatever it closes is returned so the caller can **say so** rather than silently dropping a pane the operator
217
- * was reading (R-48's rule, applied to a display).
218
- */
219
- export async function trimOpenPanes(exec = defaultExec) {
220
- if (open.size <= MAX_OPEN_PANES)
221
- return [];
222
- const closed = [];
223
- // **Only SETTLED panes are candidates, oldest first.** A live sibling's pane is its child's only terminal, and
224
- // closing a tab kills the child — see `OpenPane.settled`. If every open pane is live the cap is exceeded and
225
- // nothing is closed, which is the right failure: a pane too many costs an operator a keystroke, and a killed
226
- // child costs them the work.
227
- //
228
- // **Walks past what it cannot close**, rather than attempting `excess` panes from the front and calling it
229
- // done. A pane herdr refuses to close used to sit at the head forever, so the cap silently stopped holding
230
- // (measured: 30 panes for 30 delegates when every close was refused) and the same corpse was re-attacked on
231
- // every spawn — O(n²) round-trips.
232
- for (const pane of [...open.values()]) {
233
- if (open.size - closed.length <= MAX_OPEN_PANES)
234
- break;
235
- if (!pane.settled || pane.keepTab)
236
- continue;
237
- if (await closePane(exec, pane))
238
- closed.push(pane.tab);
239
- }
240
- return closed;
241
- }
242
- //# sourceMappingURL=pane-reaper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pane-reaper.js","sourceRoot":"","sources":["../src/pane-reaper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACtC,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,UAAU,EAAkB,MAAM,gBAAgB,CAAC;AAEzE;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,qBAAqB,CAAC;AA8BpD,qEAAqE;AACrE,MAAM,UAAU,eAAe,CAAC,GAAW;IACzC,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC3B,IAAI,IA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AAM,CAAC;AAChB,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,OAAkB,WAAW;IAC/D,IAAI,IAAI,CAAC,IAAI,IAAI,cAAc;QAAE,OAAO,EAAE,CAAC;IAC3C,MAAM,MAAM,GAAa,EAAE,CAAC;IAE5B,+GAA+G;IAC/G,6GAA6G;IAC7G,6GAA6G;IAC7G,6BAA6B;IAC7B,EAAE;IACF,2GAA2G;IAC3G,2GAA2G;IAC3G,4GAA4G;IAC5G,mCAAmC;IACnC,KAAK,MAAM,IAAI,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC;QACtC,IAAI,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,MAAM,IAAI,cAAc;YAAE,MAAM;QACvD,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO;YAAE,SAAS;QAC5C,IAAI,MAAM,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC;YAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACzD,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"pi-tools.d.ts","sourceRoot":"","sources":["../src/pi-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,6EAA6E;AAC7E,eAAO,MAAM,QAAQ,EAAE,UAAqB,CAAC;AAG7C,kGAAkG;AAClG,eAAO,MAAM,gBAAgB,2FAEnB,CAAC"}
package/dist/pi-tools.js DELETED
@@ -1,21 +0,0 @@
1
- /**
2
- * Facts about pi itself: its built-in tool names, and the capability that means "all of them".
3
- *
4
- * These lived in `agent-types.ts` until ADR-0016 deleted that module along with the rest of the
5
- * `@tintinweb/pi-subagents` port. They are not about agent types at all — `PI_BUILTIN_TOOLS` is how the
6
- * catalog tells a built-in from an extension tool, and `WILDCARD` is a capability id — so they outlive
7
- * the port and belong somewhere that does not name a package we no longer depend on.
8
- *
9
- * **`PI_BUILTIN_TOOLS` is a pinned observation, and it has already drifted once** (R-31): pi 0.84.1
10
- * exposes a `parallel` tool that the 0.83.0 list did not contain, which made it classify as an
11
- * *extension* capability. The list is used for classification only — never for enforcement, which is
12
- * `--tools`' job — so drift misfiles a capability rather than granting one. Keep it current anyway; a
13
- * misfiled capability is a confusing catalog.
14
- */
15
- /** Capability held only by a delegator authorised to hand out everything. */
16
- export const WILDCARD = "tool:*";
17
- /** pi's built-in tools, observed against 0.84.1. `parallel` was added since 0.83.0 — see R-31. */
18
- export const PI_BUILTIN_TOOLS = [
19
- "bash", "edit", "edit-diff", "find", "grep", "ls", "parallel", "read", "write",
20
- ];
21
- //# sourceMappingURL=pi-tools.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pi-tools.js","sourceRoot":"","sources":["../src/pi-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,6EAA6E;AAC7E,MAAM,CAAC,MAAM,QAAQ,GAAe,QAAQ,CAAC;AAG7C,kGAAkG;AAClG,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO;CACtE,CAAC"}
@@ -1,29 +0,0 @@
1
- import type { AttemptDemand } from "./resource-budget.ts";
2
- export declare const PRODUCER_IPC_LIMITS: Readonly<{
3
- frameBytes: 1024;
4
- referenceBytes: 128;
5
- childMs: 3000;
6
- graceMs: 50;
7
- maxElapsedMs: 30000;
8
- }>;
9
- export interface ProducerIpcBinding {
10
- version: "producer-ipc-v1";
11
- budgetDigest: string;
12
- orderId: string;
13
- experimentId: string;
14
- executionId: string;
15
- charterSha256: string;
16
- invocationId: string;
17
- }
18
- export interface ProducerIpcReferences {
19
- claimRef: string;
20
- responseRef: string;
21
- }
22
- export declare function ipcShape(value: unknown, keys: readonly string[]): asserts value is Record<string, unknown>;
23
- export declare function producerIpcBinding(value: ProducerIpcBinding): Readonly<ProducerIpcBinding>;
24
- export declare const producerIpcBindingDigest: (value: ProducerIpcBinding) => string;
25
- export declare const producerIpcFrame: (value: ProducerIpcBinding) => Buffer;
26
- /** Existing v4 reservation schema, not a new model/effort/skills experiment operation. */
27
- export declare function producerIpcDemand(value: ProducerIpcBinding): AttemptDemand;
28
- export declare function ipcReferences(value: ProducerIpcReferences): Readonly<ProducerIpcReferences>;
29
- //# sourceMappingURL=producer-ipc-contract.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"producer-ipc-contract.d.ts","sourceRoot":"","sources":["../src/producer-ipc-contract.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,eAAO,MAAM,mBAAmB;;;;;;EAAuG,CAAC;AACxI,MAAM,WAAW,kBAAkB;IAAG,OAAO,EAAC,iBAAiB,CAAC;IAAC,YAAY,EAAC,MAAM,CAAC;IAAC,OAAO,EAAC,MAAM,CAAC;IAAC,YAAY,EAAC,MAAM,CAAC;IAAC,WAAW,EAAC,MAAM,CAAC;IAAC,aAAa,EAAC,MAAM,CAAC;IAAC,YAAY,EAAC,MAAM,CAAA;CAAE;AAC1L,MAAM,WAAW,qBAAqB;IAAG,QAAQ,EAAC,MAAM,CAAC;IAAC,WAAW,EAAC,MAAM,CAAA;CAAE;AAG9E,wBAAgB,QAAQ,CAAC,KAAK,EAAC,OAAO,EAAE,IAAI,EAAC,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,IAAI,MAAM,CAAC,MAAM,EAAC,OAAO,CAAC,CAEvG;AACD,wBAAgB,kBAAkB,CAAC,KAAK,EAAC,kBAAkB,GAAE,QAAQ,CAAC,kBAAkB,CAAC,CAIxF;AACD,eAAO,MAAM,wBAAwB,GAAI,OAAM,kBAAkB,WAAyF,CAAC;AAC3J,eAAO,MAAM,gBAAgB,GAAI,OAAM,kBAAkB,KAAE,MAAkG,CAAC;AAC9J,0FAA0F;AAC1F,wBAAgB,iBAAiB,CAAC,KAAK,EAAC,kBAAkB,GAAE,aAAa,CAExE;AACD,wBAAgB,aAAa,CAAC,KAAK,EAAC,qBAAqB,GAAE,QAAQ,CAAC,qBAAqB,CAAC,CAGzF"}
@@ -1,29 +0,0 @@
1
- import { createHash } from "node:crypto";
2
- import { isExecutionId } from "./execution-id.js";
3
- export const PRODUCER_IPC_LIMITS = Object.freeze({ frameBytes: 1024, referenceBytes: 128, childMs: 3000, graceMs: 50, maxElapsedMs: 30000 });
4
- const id = (v) => typeof v === "string" && /^[a-zA-Z0-9:_-]{1,128}$/.test(v);
5
- const hash = (v) => typeof v === "string" && /^[a-f0-9]{64}$/.test(v);
6
- export function ipcShape(value, keys) {
7
- if (!value || typeof value !== "object" || ![Object.prototype, null].includes(Object.getPrototypeOf(value)) || Reflect.ownKeys(value).length !== keys.length || keys.some(k => { const d = Object.getOwnPropertyDescriptor(value, k); return !d || !d.enumerable || !Object.hasOwn(d, "value"); }))
8
- throw new TypeError("closed producer IPC data required");
9
- }
10
- export function producerIpcBinding(value) {
11
- ipcShape(value, ["version", "budgetDigest", "orderId", "experimentId", "executionId", "charterSha256", "invocationId"]);
12
- if (value.version !== "producer-ipc-v1" || !hash(value.budgetDigest) || !hash(value.charterSha256) || !isExecutionId(value.executionId) || ![value.orderId, value.experimentId, value.invocationId].every(id))
13
- throw new TypeError("exact producer IPC binding required");
14
- return Object.freeze({ version: value.version, budgetDigest: value.budgetDigest, orderId: value.orderId, experimentId: value.experimentId, executionId: value.executionId, charterSha256: value.charterSha256, invocationId: value.invocationId });
15
- }
16
- export const producerIpcBindingDigest = (value) => createHash("sha256").update(JSON.stringify(producerIpcBinding(value))).digest("hex");
17
- export const producerIpcFrame = (value) => Buffer.from(JSON.stringify({ id: producerIpcBinding(value).invocationId, sequence: 1 }) + "\n");
18
- /** Existing v4 reservation schema, not a new model/effort/skills experiment operation. */
19
- export function producerIpcDemand(value) {
20
- const b = producerIpcBinding(value);
21
- return { attemptId: b.executionId, orderId: b.orderId, experimentId: b.experimentId, kind: "primary", parentAttemptId: null, inputBytes: Buffer.byteLength(JSON.stringify(b)), inputDigest: producerIpcBindingDigest(b) };
22
- }
23
- export function ipcReferences(value) {
24
- ipcShape(value, ["claimRef", "responseRef"]);
25
- if (!id(value.claimRef) || !id(value.responseRef))
26
- throw new TypeError("bounded evidence references required");
27
- return Object.freeze({ claimRef: value.claimRef, responseRef: value.responseRef });
28
- }
29
- //# sourceMappingURL=producer-ipc-contract.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"producer-ipc-contract.js","sourceRoot":"","sources":["../src/producer-ipc-contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,UAAU,EAAC,IAAI,EAAE,cAAc,EAAC,GAAG,EAAE,OAAO,EAAC,IAAI,EAAE,OAAO,EAAC,EAAE,EAAE,YAAY,EAAC,KAAK,EAAE,CAAC,CAAC;AAGxI,MAAM,EAAE,GAAG,CAAC,CAAS,EAAc,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,IAAI,yBAAyB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACjG,MAAM,IAAI,GAAG,CAAC,CAAS,EAAc,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,IAAI,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC1F,MAAM,UAAU,QAAQ,CAAC,KAAa,EAAE,IAAsB;IAC5D,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,EAAC,IAAI,C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