pi-daddy 0.22.0 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (385) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/README.md +12 -6
  3. package/contracts/daily-view/v1/README.md +114 -0
  4. package/contracts/daily-view/v1/fixtures/view.json +525 -0
  5. package/contracts/daily-view/v1/fixtures/view.txt +75 -0
  6. package/contracts/daily-view/v1/fixtures/work.jsonl +17 -0
  7. package/contracts/daily-view/v1/p03/README.md +26 -0
  8. package/contracts/daily-view/v1/p03/fixtures/retained-executions.json +241 -0
  9. package/contracts/daily-view/v1/p03/projection.schema.json +194 -0
  10. package/contracts/daily-view/v1/p03/provenance.json +21 -0
  11. package/contracts/dashboard-host/v1/README.md +176 -0
  12. package/contracts/debrief/v1/README.md +146 -0
  13. package/contracts/debrief/v1/intervention/README.md +32 -0
  14. package/contracts/debrief/v1/intervention/fixtures/artifact-3ee11136beb864f518252e5024dae9197421fbf97b6e981d3243c782b5c44bd0.txt +1 -0
  15. package/contracts/debrief/v1/intervention/fixtures/artifact-58905d872dd3c54a9705f67b05fa82edbad7af6476ae8993faf1a7b9fadfb905.txt +1 -0
  16. package/contracts/debrief/v1/intervention/fixtures/assessment.json +29 -0
  17. package/contracts/debrief/v1/intervention/fixtures/blind-view.json +20 -0
  18. package/contracts/debrief/v1/intervention/fixtures/choice.json +7 -0
  19. package/contracts/debrief/v1/intervention/fixtures/manifest.json +57 -0
  20. package/contracts/debrief/v1/intervention/fixtures/reveal.json +39 -0
  21. package/contracts/debrief/v1/provenance.json +89 -0
  22. package/contracts/debrief/v1/work-capture/README.md +38 -0
  23. package/contracts/debrief/v1/work-capture/fixtures/batch.json +17 -0
  24. package/contracts/debrief/v1/work-capture/fixtures/cases.json +184 -0
  25. package/contracts/debrief/v1/work-capture/fixtures/review.json +184 -0
  26. package/contracts/debrief/v1/work-capture/review-request.schema.json +41 -0
  27. package/contracts/debrief/v1/work-capture/work-case.schema.json +190 -0
  28. package/contracts/debrief/v2/README.md +71 -0
  29. package/contracts/debrief/v2/input-pin.json +66 -0
  30. package/contracts/debrief/v2/intervention-upstream.md +40 -0
  31. package/contracts/debrief/v2/work-signals-upstream.md +22 -0
  32. package/contracts/dispatch-control/v1/README.md +109 -0
  33. package/contracts/dispatch-control/v1/request.schema.json +19 -0
  34. package/contracts/effect-profile/v1/README.md +124 -0
  35. package/contracts/execution-retention/v1/README.md +109 -0
  36. package/contracts/execution-retention/v2/README.md +148 -0
  37. package/contracts/execution-retention/v2/fixtures/interrupted-native-bytes.json +91 -0
  38. package/contracts/execution-retention/v2/fixtures/missing-native-session.json +91 -0
  39. package/contracts/execution-retention/v2/fixtures/native-file-unknown-branch.json +91 -0
  40. package/contracts/execution-retention/v2/fixtures/native-id-without-bytes.json +91 -0
  41. package/contracts/execution-retention/v2/fixtures/native-live-branch.json +90 -0
  42. package/contracts/execution-retention/v2/fixtures/replaced-native-session.json +92 -0
  43. package/contracts/execution-retention/v2/fixtures/result-82c620cdfeb8ca6b858cf653d7f5e2eedca5315d6244216d60e8b36f03223d6a.bin +1 -0
  44. package/contracts/execution-retention/v2/fixtures/session-2ec1f134bc739984434f7fca689e1c3d1c39fce2dcadae709e9b6faedfcc4ac7.bin +3 -0
  45. package/contracts/execution-retention/v2/fixtures/session-9bdb4bd16a901da31580acf056bda525225259e15ec409e0410480109011772f.bin +3 -0
  46. package/contracts/execution-retention/v2/manifest.schema.json +858 -0
  47. package/contracts/experiment/v1/README.md +164 -0
  48. package/contracts/factory-order/v1/README.md +151 -0
  49. package/contracts/factory-order/v1/adoption-pin.json +8 -0
  50. package/contracts/intent-control/v1/README.md +135 -0
  51. package/contracts/intent-control/v1/request.schema.json +1096 -0
  52. package/contracts/intent-control/v2/README.md +34 -0
  53. package/contracts/intent-control/v2/request.schema.json +1070 -0
  54. package/contracts/ledger/v4/README.md +241 -0
  55. package/contracts/ledger/v4/fixtures/layout-options.json +428 -0
  56. package/contracts/ledger/v4/fixtures/work-acceptance.json +57 -0
  57. package/contracts/ledger/v4/fixtures/work-occurrence.json +44 -0
  58. package/contracts/ledger/v4/fixtures/work-revision.json +26 -0
  59. package/contracts/ledger/v4/fixtures/work-snapshot.json +73 -0
  60. package/contracts/ledger/v4/ledger-event.schema.json +162 -0
  61. package/contracts/ordinary-control/v1/README.md +59 -0
  62. package/contracts/producer-ipc/v1/README.md +137 -0
  63. package/dist/check-runner.d.ts +5 -0
  64. package/dist/check-runner.d.ts.map +1 -1
  65. package/dist/check-runner.js +16 -2
  66. package/dist/check-runner.js.map +1 -1
  67. package/dist/cli.d.ts +3 -1
  68. package/dist/cli.d.ts.map +1 -1
  69. package/dist/cli.js +49 -3
  70. package/dist/cli.js.map +1 -1
  71. package/dist/control-journal.d.ts +20 -0
  72. package/dist/control-journal.d.ts.map +1 -0
  73. package/dist/control-journal.js +73 -0
  74. package/dist/control-journal.js.map +1 -0
  75. package/dist/daily-dashboard-host.d.ts +99 -0
  76. package/dist/daily-dashboard-host.d.ts.map +1 -0
  77. package/dist/daily-dashboard-host.js +71 -0
  78. package/dist/daily-dashboard-host.js.map +1 -0
  79. package/dist/daily-view-input.d.ts +44 -0
  80. package/dist/daily-view-input.d.ts.map +1 -0
  81. package/dist/daily-view-input.js +68 -0
  82. package/dist/daily-view-input.js.map +1 -0
  83. package/dist/daily-view-render.d.ts +4 -0
  84. package/dist/daily-view-render.d.ts.map +1 -0
  85. package/dist/daily-view-render.js +41 -0
  86. package/dist/daily-view-render.js.map +1 -0
  87. package/dist/daily-view.d.ts +74 -0
  88. package/dist/daily-view.d.ts.map +1 -0
  89. package/dist/daily-view.js +170 -0
  90. package/dist/daily-view.js.map +1 -0
  91. package/dist/dashboard-cli.d.ts +26 -1
  92. package/dist/dashboard-cli.d.ts.map +1 -1
  93. package/dist/dashboard-cli.js +128 -3
  94. package/dist/dashboard-cli.js.map +1 -1
  95. package/dist/dashboard-harness.d.ts +22 -0
  96. package/dist/dashboard-harness.d.ts.map +1 -0
  97. package/dist/dashboard-harness.js +89 -0
  98. package/dist/dashboard-harness.js.map +1 -0
  99. package/dist/dashboard-herdr.d.ts.map +1 -1
  100. package/dist/dashboard-herdr.js +7 -2
  101. package/dist/dashboard-herdr.js.map +1 -1
  102. package/dist/dashboard-host-contract.d.ts +116 -0
  103. package/dist/dashboard-host-contract.d.ts.map +1 -0
  104. package/dist/dashboard-host-contract.js +14 -0
  105. package/dist/dashboard-host-contract.js.map +1 -0
  106. package/dist/dashboard-host-transport.d.ts +16 -0
  107. package/dist/dashboard-host-transport.d.ts.map +1 -0
  108. package/dist/dashboard-host-transport.js +124 -0
  109. package/dist/dashboard-host-transport.js.map +1 -0
  110. package/dist/dashboard-host.d.ts +203 -0
  111. package/dist/dashboard-host.d.ts.map +1 -0
  112. package/dist/dashboard-host.js +376 -0
  113. package/dist/dashboard-host.js.map +1 -0
  114. package/dist/dashboard-observation.d.ts +28 -0
  115. package/dist/dashboard-observation.d.ts.map +1 -0
  116. package/dist/dashboard-observation.js +86 -0
  117. package/dist/dashboard-observation.js.map +1 -0
  118. package/dist/debrief-contract.d.ts +65 -0
  119. package/dist/debrief-contract.d.ts.map +1 -0
  120. package/dist/debrief-contract.js +151 -0
  121. package/dist/debrief-contract.js.map +1 -0
  122. package/dist/debrief-fixture.d.ts +16 -0
  123. package/dist/debrief-fixture.d.ts.map +1 -0
  124. package/dist/debrief-fixture.js +41 -0
  125. package/dist/debrief-fixture.js.map +1 -0
  126. package/dist/debrief-host.d.ts +59 -0
  127. package/dist/debrief-host.d.ts.map +1 -0
  128. package/dist/debrief-host.js +49 -0
  129. package/dist/debrief-host.js.map +1 -0
  130. package/dist/debrief-render.d.ts +5 -0
  131. package/dist/debrief-render.d.ts.map +1 -0
  132. package/dist/debrief-render.js +65 -0
  133. package/dist/debrief-render.js.map +1 -0
  134. package/dist/debrief.d.ts +90 -0
  135. package/dist/debrief.d.ts.map +1 -0
  136. package/dist/debrief.js +263 -0
  137. package/dist/debrief.js.map +1 -0
  138. package/dist/delegate-types.d.ts +2 -0
  139. package/dist/delegate-types.d.ts.map +1 -1
  140. package/dist/delegate-types.js.map +1 -1
  141. package/dist/delegate.d.ts.map +1 -1
  142. package/dist/delegate.js +1 -0
  143. package/dist/delegate.js.map +1 -1
  144. package/dist/dispatch-control.d.ts +45 -0
  145. package/dist/dispatch-control.d.ts.map +1 -0
  146. package/dist/dispatch-control.js +76 -0
  147. package/dist/dispatch-control.js.map +1 -0
  148. package/dist/effect-profile-runtime.d.ts +40 -0
  149. package/dist/effect-profile-runtime.d.ts.map +1 -0
  150. package/dist/effect-profile-runtime.js +51 -0
  151. package/dist/effect-profile-runtime.js.map +1 -0
  152. package/dist/effect-profile.d.ts +40 -0
  153. package/dist/effect-profile.d.ts.map +1 -0
  154. package/dist/effect-profile.js +152 -0
  155. package/dist/effect-profile.js.map +1 -0
  156. package/dist/execution-retention.d.ts +90 -0
  157. package/dist/execution-retention.d.ts.map +1 -0
  158. package/dist/execution-retention.js +247 -0
  159. package/dist/execution-retention.js.map +1 -0
  160. package/dist/experiment-contract.d.ts +56 -0
  161. package/dist/experiment-contract.d.ts.map +1 -0
  162. package/dist/experiment-contract.js +80 -0
  163. package/dist/experiment-contract.js.map +1 -0
  164. package/dist/experiment-state.d.ts +22 -0
  165. package/dist/experiment-state.d.ts.map +1 -0
  166. package/dist/experiment-state.js +79 -0
  167. package/dist/experiment-state.js.map +1 -0
  168. package/dist/experiment-store.d.ts +30 -0
  169. package/dist/experiment-store.d.ts.map +1 -0
  170. package/dist/experiment-store.js +147 -0
  171. package/dist/experiment-store.js.map +1 -0
  172. package/dist/experiment.d.ts +65 -0
  173. package/dist/experiment.d.ts.map +1 -0
  174. package/dist/experiment.js +357 -0
  175. package/dist/experiment.js.map +1 -0
  176. package/dist/factory-contract.d.ts +79 -0
  177. package/dist/factory-contract.d.ts.map +1 -0
  178. package/dist/factory-contract.js +89 -0
  179. package/dist/factory-contract.js.map +1 -0
  180. package/dist/factory-migration.d.ts +20 -0
  181. package/dist/factory-migration.d.ts.map +1 -0
  182. package/dist/factory-migration.js +55 -0
  183. package/dist/factory-migration.js.map +1 -0
  184. package/dist/factory-order.d.ts +848 -0
  185. package/dist/factory-order.d.ts.map +1 -0
  186. package/dist/factory-order.js +83 -0
  187. package/dist/factory-order.js.map +1 -0
  188. package/dist/factory-registry.d.ts +121 -0
  189. package/dist/factory-registry.d.ts.map +1 -0
  190. package/dist/factory-registry.js +133 -0
  191. package/dist/factory-registry.js.map +1 -0
  192. package/dist/file-lock.d.ts +8 -2
  193. package/dist/file-lock.d.ts.map +1 -1
  194. package/dist/file-lock.js +78 -19
  195. package/dist/file-lock.js.map +1 -1
  196. package/dist/herdr-poll.d.ts +8 -0
  197. package/dist/herdr-poll.d.ts.map +1 -1
  198. package/dist/herdr-poll.js +23 -0
  199. package/dist/herdr-poll.js.map +1 -1
  200. package/dist/index.d.ts +20 -0
  201. package/dist/index.d.ts.map +1 -1
  202. package/dist/index.js +20 -0
  203. package/dist/index.js.map +1 -1
  204. package/dist/intent-application.d.ts +17 -0
  205. package/dist/intent-application.d.ts.map +1 -0
  206. package/dist/intent-application.js +113 -0
  207. package/dist/intent-application.js.map +1 -0
  208. package/dist/intent-control.d.ts +201 -0
  209. package/dist/intent-control.d.ts.map +1 -0
  210. package/dist/intent-control.js +110 -0
  211. package/dist/intent-control.js.map +1 -0
  212. package/dist/intent-scheduling.d.ts +9 -0
  213. package/dist/intent-scheduling.d.ts.map +1 -0
  214. package/dist/intent-scheduling.js +15 -0
  215. package/dist/intent-scheduling.js.map +1 -0
  216. package/dist/ledger-append.d.ts +15 -0
  217. package/dist/ledger-append.d.ts.map +1 -0
  218. package/dist/ledger-append.js +94 -0
  219. package/dist/ledger-append.js.map +1 -0
  220. package/dist/ledger.d.ts +11 -0
  221. package/dist/ledger.d.ts.map +1 -1
  222. package/dist/ledger.js +3 -7
  223. package/dist/ledger.js.map +1 -1
  224. package/dist/native-session-target.d.ts +9 -0
  225. package/dist/native-session-target.d.ts.map +1 -0
  226. package/dist/native-session-target.js +29 -0
  227. package/dist/native-session-target.js.map +1 -0
  228. package/dist/native-session.d.ts +59 -0
  229. package/dist/native-session.d.ts.map +1 -0
  230. package/dist/native-session.js +154 -0
  231. package/dist/native-session.js.map +1 -0
  232. package/dist/order-schedule.d.ts +37 -0
  233. package/dist/order-schedule.d.ts.map +1 -0
  234. package/dist/order-schedule.js +81 -0
  235. package/dist/order-schedule.js.map +1 -0
  236. package/dist/ordinary-children.d.ts +52 -0
  237. package/dist/ordinary-children.d.ts.map +1 -0
  238. package/dist/ordinary-children.js +93 -0
  239. package/dist/ordinary-children.js.map +1 -0
  240. package/dist/producer-ipc-contract.d.ts +29 -0
  241. package/dist/producer-ipc-contract.d.ts.map +1 -0
  242. package/dist/producer-ipc-contract.js +29 -0
  243. package/dist/producer-ipc-contract.js.map +1 -0
  244. package/dist/producer-ipc.d.ts +55 -0
  245. package/dist/producer-ipc.d.ts.map +1 -0
  246. package/dist/producer-ipc.js +143 -0
  247. package/dist/producer-ipc.js.map +1 -0
  248. package/dist/resource-budget.d.ts +334 -0
  249. package/dist/resource-budget.d.ts.map +1 -0
  250. package/dist/resource-budget.js +415 -0
  251. package/dist/resource-budget.js.map +1 -0
  252. package/dist/retention-contract.d.ts +73 -0
  253. package/dist/retention-contract.d.ts.map +1 -0
  254. package/dist/retention-contract.js +104 -0
  255. package/dist/retention-contract.js.map +1 -0
  256. package/dist/retention-json.d.ts +3 -0
  257. package/dist/retention-json.d.ts.map +1 -0
  258. package/dist/retention-json.js +32 -0
  259. package/dist/retention-json.js.map +1 -0
  260. package/dist/run-child.d.ts +4 -0
  261. package/dist/run-child.d.ts.map +1 -1
  262. package/dist/run-child.js +16 -2
  263. package/dist/run-child.js.map +1 -1
  264. package/dist/run-herdr.d.ts +6 -0
  265. package/dist/run-herdr.d.ts.map +1 -1
  266. package/dist/run-herdr.js +19 -6
  267. package/dist/run-herdr.js.map +1 -1
  268. package/dist/vendor/adoption.d.ts +129 -0
  269. package/dist/vendor/adoption.d.ts.map +1 -0
  270. package/dist/vendor/adoption.js +102 -0
  271. package/dist/vendor/adoption.js.map +1 -0
  272. package/dist/work-command.d.ts +30 -0
  273. package/dist/work-command.d.ts.map +1 -0
  274. package/dist/work-command.js +148 -0
  275. package/dist/work-command.js.map +1 -0
  276. package/dist/work-ledger-destination.d.ts +20 -0
  277. package/dist/work-ledger-destination.d.ts.map +1 -0
  278. package/dist/work-ledger-destination.js +131 -0
  279. package/dist/work-ledger-destination.js.map +1 -0
  280. package/dist/work-ledger-json.d.ts +25 -0
  281. package/dist/work-ledger-json.d.ts.map +1 -0
  282. package/dist/work-ledger-json.js +267 -0
  283. package/dist/work-ledger-json.js.map +1 -0
  284. package/dist/work-ledger-occurrences.d.ts +227 -0
  285. package/dist/work-ledger-occurrences.d.ts.map +1 -0
  286. package/dist/work-ledger-occurrences.js +115 -0
  287. package/dist/work-ledger-occurrences.js.map +1 -0
  288. package/dist/work-ledger-projection.d.ts +295 -0
  289. package/dist/work-ledger-projection.d.ts.map +1 -0
  290. package/dist/work-ledger-projection.js +237 -0
  291. package/dist/work-ledger-projection.js.map +1 -0
  292. package/dist/work-ledger-snapshot.d.ts +29 -0
  293. package/dist/work-ledger-snapshot.d.ts.map +1 -0
  294. package/dist/work-ledger-snapshot.js +267 -0
  295. package/dist/work-ledger-snapshot.js.map +1 -0
  296. package/dist/work-ledger-types.d.ts +261 -0
  297. package/dist/work-ledger-types.d.ts.map +1 -0
  298. package/dist/work-ledger-types.js +13 -0
  299. package/dist/work-ledger-types.js.map +1 -0
  300. package/dist/work-ledger-validation.d.ts +14 -0
  301. package/dist/work-ledger-validation.d.ts.map +1 -0
  302. package/dist/work-ledger-validation.js +226 -0
  303. package/dist/work-ledger-validation.js.map +1 -0
  304. package/dist/work-ledger.d.ts +43 -0
  305. package/dist/work-ledger.d.ts.map +1 -0
  306. package/dist/work-ledger.js +225 -0
  307. package/dist/work-ledger.js.map +1 -0
  308. package/extensions/daily-dashboard-session.ts +30 -0
  309. package/extensions/daily-work-session.ts +20 -0
  310. package/extensions/delegate-chain.ts +1 -0
  311. package/extensions/delegation-native.ts +12 -0
  312. package/extensions/delegation.ts +25 -11
  313. package/extensions/execute-child.ts +44 -5
  314. package/extensions/executor-session.ts +9 -0
  315. package/extensions/grants-command.ts +14 -15
  316. package/extensions/grants-connected-command.ts +19 -0
  317. package/extensions/grants.ts +26 -2
  318. package/extensions/ordinary-runtime.ts +14 -0
  319. package/extensions/primary-shadow.ts +11 -0
  320. package/extensions/run-delegation.ts +9 -7
  321. package/extensions/session.ts +10 -20
  322. package/extensions/work-runtime.ts +44 -0
  323. package/package.json +78 -4
  324. package/src/check-runner.ts +20 -2
  325. package/src/cli.ts +41 -4
  326. package/src/control-journal.ts +26 -0
  327. package/src/daily-dashboard-host.ts +49 -0
  328. package/src/daily-view-input.ts +59 -0
  329. package/src/daily-view-render.ts +44 -0
  330. package/src/daily-view.ts +152 -0
  331. package/src/dashboard-cli.ts +108 -4
  332. package/src/dashboard-harness.ts +37 -0
  333. package/src/dashboard-herdr.ts +7 -2
  334. package/src/dashboard-host-contract.ts +45 -0
  335. package/src/dashboard-host-transport.ts +40 -0
  336. package/src/dashboard-host.ts +191 -0
  337. package/src/dashboard-observation.ts +45 -0
  338. package/src/debrief-contract.ts +127 -0
  339. package/src/debrief-fixture.ts +29 -0
  340. package/src/debrief-host.ts +53 -0
  341. package/src/debrief-render.ts +49 -0
  342. package/src/debrief.ts +198 -0
  343. package/src/delegate-types.ts +2 -0
  344. package/src/delegate.ts +1 -0
  345. package/src/dispatch-control.ts +81 -0
  346. package/src/effect-profile-runtime.ts +46 -0
  347. package/src/effect-profile.ts +129 -0
  348. package/src/execution-retention.ts +230 -0
  349. package/src/experiment-contract.ts +66 -0
  350. package/src/experiment-state.ts +44 -0
  351. package/src/experiment-store.ts +98 -0
  352. package/src/experiment.ts +231 -0
  353. package/src/factory-contract.ts +47 -0
  354. package/src/factory-migration.ts +29 -0
  355. package/src/factory-order.ts +56 -0
  356. package/src/factory-registry.ts +60 -0
  357. package/src/file-lock.ts +47 -11
  358. package/src/herdr-poll.ts +18 -0
  359. package/src/index.ts +32 -0
  360. package/src/intent-application.ts +90 -0
  361. package/src/intent-control.ts +107 -0
  362. package/src/intent-scheduling.ts +14 -0
  363. package/src/ledger-append.ts +72 -0
  364. package/src/ledger.ts +3 -9
  365. package/src/native-session-target.ts +23 -0
  366. package/src/native-session.ts +139 -0
  367. package/src/order-schedule.ts +42 -0
  368. package/src/ordinary-children.ts +59 -0
  369. package/src/producer-ipc-contract.ts +26 -0
  370. package/src/producer-ipc.ts +107 -0
  371. package/src/resource-budget.ts +349 -0
  372. package/src/retention-contract.ts +84 -0
  373. package/src/retention-json.ts +20 -0
  374. package/src/run-child.ts +13 -2
  375. package/src/run-herdr.ts +11 -7
  376. package/src/vendor/adoption.ts +109 -0
  377. package/src/work-command.ts +179 -0
  378. package/src/work-ledger-destination.ts +113 -0
  379. package/src/work-ledger-json.ts +228 -0
  380. package/src/work-ledger-occurrences.ts +99 -0
  381. package/src/work-ledger-projection.ts +262 -0
  382. package/src/work-ledger-snapshot.ts +246 -0
  383. package/src/work-ledger-types.ts +229 -0
  384. package/src/work-ledger-validation.ts +174 -0
  385. package/src/work-ledger.ts +186 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard-host-contract.js","sourceRoot":"","sources":["../src/dashboard-host-contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAMrD,MAAM,CAAC,MAAM,qBAAqB,GAAG,0CAA0C,CAAC;AA+BhF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAsB,EAAU,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AACrF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,SAA2C,EAAU,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;AACvH,MAAM,UAAU,oBAAoB,CAAC,KAA2B;IAC9D,MAAM,CAAC,GAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAAA,YAAY,CAAC,CAAC,EAAC,CAAC,SAAS,EAAC,WAAW,EAAC,YAAY,EAAC,aAAa,EAAC,iBAAiB,EAAC,WAAW,EAAC,SAAS,CAAC,CAAC,CAAC;IACnI,IAAG,CAAC,CAAC,OAAO,KAAG,KAAK,IAAE,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,IAAE,CAAC,CAAC,CAAC,CAAC,UAAU,EAAC,CAAC,CAAC,WAAW,EAAC,CAAC,CAAC,eAAe,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,IAAE,CAAC,CAAC,SAAS,EAAC,SAAS,EAAC,WAAW,EAAC,OAAO,EAAC,SAAS,EAAC,UAAU,EAAC,QAAQ,EAAC,QAAQ,EAAC,oBAAoB,EAAC,kBAAkB,EAAC,iBAAiB,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,IAAE,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,GAAC,KAAK;QAAC,MAAM,KAAK,CAAC,0CAA0C,CAAC,CAAC;IAAA,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC;AACzZ,CAAC;AACD,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAuB,EAAU,EAAE,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { type DashboardHost } from "./dashboard-host.ts";
2
+ export declare const ENV_DASHBOARD_HOST_SOCKET = "PI_DADDY_HOST_SOCKET";
3
+ export type DashboardConnection = {
4
+ frame: DashboardHost["frame"];
5
+ action: DashboardHost["action"];
6
+ humanAction: DashboardHost["humanAction"];
7
+ };
8
+ export declare const isDashboardConnection: (v: unknown) => v is DashboardConnection;
9
+ /** Same original host process. No worker socket, native TUI attach, PID lookup or authority transport. */
10
+ export declare function serveDashboardHost(path: string, host: DashboardHost): Promise<Readonly<{
11
+ path: string;
12
+ close: () => Promise<void>;
13
+ }>>;
14
+ /** Explicit operator-selected endpoint. Socket ownership is access policy, not module/human authentication. */
15
+ export declare function connectDashboardHost(path: string): DashboardConnection;
16
+ //# sourceMappingURL=dashboard-host-transport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard-host-transport.d.ts","sourceRoot":"","sources":["../src/dashboard-host-transport.ts"],"names":[],"mappings":"AAIA,OAAO,EAAyC,KAAK,aAAa,EAA6B,MAAM,qBAAqB,CAAC;AAC3H,eAAO,MAAM,yBAAyB,yBAAuB,CAAC;AAC9D,MAAM,MAAM,mBAAmB,GAAC;IAAC,KAAK,EAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAAA,MAAM,EAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IAAA,WAAW,EAAC,aAAa,CAAC,aAAa,CAAC,CAAA;CAAC,CAAC;AAEvI,eAAO,MAAM,qBAAqB,GAAE,GAAE,OAAO,KAAE,CAAC,IAAI,mBAA0F,CAAC;AAE/I,0GAA0G;AAC1G,wBAAsB,kBAAkB,CAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,aAAa;;;IAgBtE;AACD,+GAA+G;AAC/G,wBAAgB,oBAAoB,CAAC,IAAI,EAAC,MAAM,GAAE,mBAAmB,CAUpE"}
@@ -0,0 +1,124 @@
1
+ import { createServer, createConnection } from "node:net";
2
+ import { lstat, realpath, chmod } from "node:fs/promises";
3
+ import { dirname, isAbsolute } from "node:path";
4
+ import { parseRetentionJson } from "./retention-json.js";
5
+ import { isDashboardHost, dashboardHostRequest } from "./dashboard-host.js";
6
+ export const ENV_DASHBOARD_HOST_SOCKET = "PI_DADDY_HOST_SOCKET";
7
+ const connections = new WeakSet();
8
+ export const isDashboardConnection = (v) => isDashboardHost(v) || typeof v === "object" && v !== null && connections.has(v);
9
+ async function parent(path) { if (!isAbsolute(path) || Buffer.byteLength(path) > 100 || await realpath(dirname(path)) !== dirname(path))
10
+ throw Error("canonical bounded private dashboard socket required"); const s = await lstat(dirname(path)); if (!s.isDirectory() || s.mode & 0o077 || s.uid !== process.getuid?.())
11
+ throw Error("private owned dashboard socket parent required"); }
12
+ /** Same original host process. No worker socket, native TUI attach, PID lookup or authority transport. */
13
+ export async function serveDashboardHost(path, host) {
14
+ if (!isDashboardHost(host))
15
+ throw Error("original dashboard host required");
16
+ await parent(path);
17
+ const clients = new Set(), tasks = new Set();
18
+ const server = createServer(socket => {
19
+ if (clients.size >= 4) {
20
+ socket.destroy();
21
+ return;
22
+ }
23
+ clients.add(socket);
24
+ socket.on("close", () => clients.delete(socket));
25
+ socket.on("error", () => { });
26
+ socket.setTimeout(5000, () => socket.destroy());
27
+ let size = 0, used = false;
28
+ const chunks = [];
29
+ socket.on("data", bytes => {
30
+ if (used)
31
+ return;
32
+ size += bytes.length;
33
+ if (size > 65536) {
34
+ socket.destroy();
35
+ return;
36
+ }
37
+ chunks.push(bytes);
38
+ if (bytes.at(-1) !== 10)
39
+ return;
40
+ used = true;
41
+ const task = (async () => {
42
+ try {
43
+ const text = new TextDecoder("utf-8", { fatal: true }).decode(Buffer.concat(chunks));
44
+ const r = parseRetentionJson(text, 65536);
45
+ let result;
46
+ if (Object.keys(r).join() === "operation" && r.operation === "frame")
47
+ result = await host.frame();
48
+ else if (Object.keys(r).sort().join() === "operation,request" && r.operation === "action")
49
+ result = await host.action(dashboardHostRequest(r.request));
50
+ else if (Object.keys(r).sort().join() === "key,operation" && r.operation === "human-action" && typeof r.key === "string")
51
+ result = await host.humanAction(r.key);
52
+ else
53
+ throw Error("closed dashboard protocol required");
54
+ const output = JSON.stringify({ ok: true, result }) + "\n";
55
+ if (Buffer.byteLength(output) > 512 * 1024)
56
+ throw Error("dashboard frame bound exceeded");
57
+ socket.end(output);
58
+ }
59
+ catch {
60
+ socket.end(JSON.stringify({ ok: false, error: "refused or acknowledgement unknown; explicit readback only" }) + "\n");
61
+ }
62
+ })();
63
+ tasks.add(task);
64
+ void task.finally(() => tasks.delete(task));
65
+ });
66
+ });
67
+ await new Promise((resolve, reject) => { server.once("error", reject); server.listen(path, () => { server.off("error", reject); resolve(); }); });
68
+ try {
69
+ await chmod(path, 0o600);
70
+ }
71
+ catch (error) {
72
+ server.close();
73
+ throw error;
74
+ }
75
+ return Object.freeze({ path, close: () => new Promise((resolve, reject) => { for (const c of clients)
76
+ c.destroy(); server.close(e => e ? reject(e) : void Promise.allSettled([...tasks]).then(() => resolve())); }) });
77
+ }
78
+ /** Explicit operator-selected endpoint. Socket ownership is access policy, not module/human authentication. */
79
+ export function connectDashboardHost(path) {
80
+ const call = async (operation, payload = {}) => {
81
+ await parent(path);
82
+ const s = await lstat(path);
83
+ if (!s.isSocket() || s.mode & 0o077 || s.uid !== process.getuid?.())
84
+ throw Error("private original dashboard endpoint unavailable");
85
+ return new Promise((resolve, reject) => {
86
+ const socket = createConnection(path);
87
+ let size = 0, done = false;
88
+ const chunks = [];
89
+ const fail = (e) => { if (!done) {
90
+ done = true;
91
+ socket.destroy();
92
+ reject(e);
93
+ } };
94
+ socket.setTimeout(5000, () => fail(Error("dashboard acknowledgement timeout; do not repeat action")));
95
+ socket.on("error", fail);
96
+ socket.on("connect", () => socket.write(JSON.stringify({ operation, ...payload }) + "\n"));
97
+ socket.on("data", b => { size += b.length; if (size > 512 * 1024) {
98
+ fail(Error("dashboard frame limit"));
99
+ return;
100
+ } chunks.push(b); });
101
+ socket.on("end", () => { try {
102
+ const text = new TextDecoder("utf-8", { fatal: true }).decode(Buffer.concat(chunks));
103
+ const r = parseRetentionJson(text, 512 * 1024);
104
+ if (r.ok !== true)
105
+ throw Error("dashboard refused or acknowledgement unknown");
106
+ if (operation === "frame" && r.result?.version !== "producer-dashboard-frame-v1")
107
+ throw Error("incompatible dashboard host");
108
+ if (!done) {
109
+ done = true;
110
+ resolve(r.result);
111
+ }
112
+ }
113
+ catch (e) {
114
+ fail(e);
115
+ } });
116
+ socket.on("close", () => { if (!done)
117
+ fail(Error("dashboard disconnected; acknowledgement unknown")); });
118
+ });
119
+ };
120
+ const api = { frame: () => call("frame"), action: (r) => call("action", { request: dashboardHostRequest(r) }), humanAction: (key) => call("human-action", { key }) };
121
+ connections.add(api);
122
+ return Object.freeze(api);
123
+ }
124
+ //# sourceMappingURL=dashboard-host-transport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard-host-transport.js","sourceRoot":"","sources":["../src/dashboard-host-transport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAe,MAAM,UAAU,CAAC;AACvE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAiD,MAAM,qBAAqB,CAAC;AAC3H,MAAM,CAAC,MAAM,yBAAyB,GAAC,sBAAsB,CAAC;AAE9D,MAAM,WAAW,GAAC,IAAI,OAAO,EAAU,CAAC;AACxC,MAAM,CAAC,MAAM,qBAAqB,GAAC,CAAC,CAAS,EAA0B,EAAE,CAAA,eAAe,CAAC,CAAC,CAAC,IAAE,OAAO,CAAC,KAAG,QAAQ,IAAE,CAAC,KAAG,IAAI,IAAE,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAC/I,KAAK,UAAU,MAAM,CAAC,IAAW,IAAE,IAAG,CAAC,UAAU,CAAC,IAAI,CAAC,IAAE,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,GAAC,GAAG,IAAE,MAAM,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,KAAG,OA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"./resource-budget.ts";
3
+ import { type openExperiment } from "./experiment.ts";
4
+ import { type DashboardHarness, type DashboardHostConfig, type DashboardHostRequest, type DashboardHostAuthority } from "./dashboard-host-contract.ts";
5
+ export * from "./dashboard-host-contract.ts";
6
+ export declare const isDashboardHost: (value: unknown) => value is DashboardHost;
7
+ export type DashboardHost = ReturnType<typeof openDashboardHost>;
8
+ export interface DashboardHostOptions {
9
+ ordinary?: OrdinaryChildren;
10
+ harness: DashboardHarness;
11
+ config: DashboardHostConfig;
12
+ budget: GovernedBudgetBinding;
13
+ experiment?: ReturnType<typeof openExperiment>;
14
+ authority: () => DashboardHostAuthority | null;
15
+ /** Exact actions constructed and authorized by the owner; the dashboard exposes only human labels/keys. */
16
+ humanActions?: (context: {
17
+ hostDigest: string;
18
+ selectionDigest: string;
19
+ tip: string;
20
+ observations: readonly {
21
+ sourceId: string;
22
+ checkpointId: string;
23
+ }[];
24
+ }) => readonly {
25
+ key: string;
26
+ label: string;
27
+ request: DashboardHostRequest;
28
+ }[] | Promise<readonly {
29
+ key: string;
30
+ label: string;
31
+ request: DashboardHostRequest;
32
+ }[]>;
33
+ /** Explicit approved observation effect only; refresh/frame never invokes it. */
34
+ beforeObservation?: (sourceId: string) => Promise<void>;
35
+ /** Independently sourced current declaration. Never inferred from idle, a PID, title or request fields. */
36
+ presence?: () => {
37
+ present: boolean;
38
+ closing: boolean;
39
+ evidenceDigest: string;
40
+ expiresAt: number;
41
+ } | null;
42
+ }
43
+ /** Explicit creation, NEVER called by refresh/reconnect. One fixed host child per registered trust store. */
44
+ export declare function createDashboardHost(options: DashboardHostOptions): Readonly<{
45
+ hostDigest: string;
46
+ selectionDigest: string;
47
+ frame(): Promise<{
48
+ version: string;
49
+ hostDigest: string;
50
+ selectionDigest: string;
51
+ selectionState: string;
52
+ tip: string;
53
+ source: unknown;
54
+ controls: unknown;
55
+ debrief: unknown;
56
+ attention: {
57
+ policyId: string;
58
+ attentionUsed: number;
59
+ tip: string;
60
+ grantExpansion: false;
61
+ };
62
+ error: string | null;
63
+ actions: {
64
+ key: string;
65
+ label: string;
66
+ operation: string;
67
+ }[];
68
+ requests: Record<string, unknown>[];
69
+ control: string;
70
+ acknowledgement: string;
71
+ identity: string;
72
+ activeBranch: null;
73
+ acceptance: string;
74
+ freshness: string;
75
+ workerInteractions: number;
76
+ }>;
77
+ /** Explicit reconciliation is read-only. A retained claim is never replayed as an effect. */
78
+ reconcile: () => Promise<{
79
+ version: string;
80
+ hostDigest: string;
81
+ selectionDigest: string;
82
+ selectionState: string;
83
+ tip: string;
84
+ source: unknown;
85
+ controls: unknown;
86
+ debrief: unknown;
87
+ attention: {
88
+ policyId: string;
89
+ attentionUsed: number;
90
+ tip: string;
91
+ grantExpansion: false;
92
+ };
93
+ error: string | null;
94
+ actions: {
95
+ key: string;
96
+ label: string;
97
+ operation: string;
98
+ }[];
99
+ requests: Record<string, unknown>[];
100
+ control: string;
101
+ acknowledgement: string;
102
+ identity: string;
103
+ activeBranch: null;
104
+ acceptance: string;
105
+ freshness: string;
106
+ workerInteractions: number;
107
+ }>;
108
+ humanAction(key: string): Promise<{
109
+ state: string;
110
+ result?: undefined;
111
+ } | {
112
+ state: string;
113
+ result: unknown;
114
+ }>;
115
+ action(input: DashboardHostRequest): Promise<{
116
+ state: string;
117
+ result?: undefined;
118
+ } | {
119
+ state: string;
120
+ result: unknown;
121
+ }>;
122
+ }>;
123
+ /** Existing native writers + original controllers; no model, launch, authority-file loader or PID recovery. */
124
+ export declare function openDashboardHost(options: DashboardHostOptions): Readonly<{
125
+ hostDigest: string;
126
+ selectionDigest: string;
127
+ frame(): Promise<{
128
+ version: string;
129
+ hostDigest: string;
130
+ selectionDigest: string;
131
+ selectionState: string;
132
+ tip: string;
133
+ source: unknown;
134
+ controls: unknown;
135
+ debrief: unknown;
136
+ attention: {
137
+ policyId: string;
138
+ attentionUsed: number;
139
+ tip: string;
140
+ grantExpansion: false;
141
+ };
142
+ error: string | null;
143
+ actions: {
144
+ key: string;
145
+ label: string;
146
+ operation: string;
147
+ }[];
148
+ requests: Record<string, unknown>[];
149
+ control: string;
150
+ acknowledgement: string;
151
+ identity: string;
152
+ activeBranch: null;
153
+ acceptance: string;
154
+ freshness: string;
155
+ workerInteractions: number;
156
+ }>;
157
+ /** Explicit reconciliation is read-only. A retained claim is never replayed as an effect. */
158
+ reconcile: () => Promise<{
159
+ version: string;
160
+ hostDigest: string;
161
+ selectionDigest: string;
162
+ selectionState: string;
163
+ tip: string;
164
+ source: unknown;
165
+ controls: unknown;
166
+ debrief: unknown;
167
+ attention: {
168
+ policyId: string;
169
+ attentionUsed: number;
170
+ tip: string;
171
+ grantExpansion: false;
172
+ };
173
+ error: string | null;
174
+ actions: {
175
+ key: string;
176
+ label: string;
177
+ operation: string;
178
+ }[];
179
+ requests: Record<string, unknown>[];
180
+ control: string;
181
+ acknowledgement: string;
182
+ identity: string;
183
+ activeBranch: null;
184
+ acceptance: string;
185
+ freshness: string;
186
+ workerInteractions: number;
187
+ }>;
188
+ humanAction(key: string): Promise<{
189
+ state: string;
190
+ result?: undefined;
191
+ } | {
192
+ state: string;
193
+ result: unknown;
194
+ }>;
195
+ action(input: DashboardHostRequest): Promise<{
196
+ state: string;
197
+ result?: undefined;
198
+ } | {
199
+ state: string;
200
+ result: unknown;
201
+ }>;
202
+ }>;
203
+ //# sourceMappingURL=dashboard-host.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard-host.d.ts","sourceRoot":"","sources":["../src/dashboard-host.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4C,KAAK,gBAAgB,EAA6B,MAAM,wBAAwB,CAAC;AAOpI,OAAO,EAA6C,KAAK,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAG7G,OAAO,EAAgF,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEpI,OAAO,EACL,KAAK,gBAAgB,EAAE,KAAK,mBAAmB,EAAE,KAAK,oBAAoB,EAAE,KAAK,sBAAsB,EAAE,MAAM,8B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