@iowarp/clio-coder 0.3.6 → 0.3.8

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 (323) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/README.md +22 -6
  3. package/dist/{acp-2BEHC4DL.js → acp-U67UHUK2.js} +14 -14
  4. package/dist/{agents-LNNFTM53.js → agents-YU6SGALZ.js} +42 -35
  5. package/dist/assets/codewiki.json +1 -1
  6. package/dist/{auth-KXXFI2VS.js → auth-5ZPJOIVG.js} +32 -24
  7. package/dist/builtins-C6JMZVV6.js +17 -0
  8. package/dist/{chunk-E25LMLRW.js → chunk-26LEYJZH.js} +2 -2
  9. package/dist/{chunk-TSHXZTOQ.js → chunk-2HEJ2F35.js} +5 -5
  10. package/dist/{chunk-PBTHKCPN.js → chunk-2HFZQUHL.js} +7 -7
  11. package/dist/{chunk-FO5ZOVUY.js → chunk-3BINW3FP.js} +5 -5
  12. package/dist/{chunk-4OC57DA6.js → chunk-4DGYLA73.js} +53 -2
  13. package/dist/{chunk-CKXWIANG.js → chunk-4SPRNWDE.js} +18 -16
  14. package/dist/{chunk-E2ER4LJF.js → chunk-5C3AQNDW.js} +25 -1
  15. package/dist/{chunk-XF5N4U5A.js → chunk-5DHKRSMQ.js} +9 -8
  16. package/dist/{chunk-43AOLP7E.js → chunk-5FR74PWO.js} +2 -1
  17. package/dist/{chunk-EKY57CSP.js → chunk-5H3GB5BO.js} +68 -772
  18. package/dist/{chunk-6XXKFVSN.js → chunk-5Q2VVUKB.js} +4 -4
  19. package/dist/{chunk-DJVECN66.js → chunk-7RFXX52T.js} +295 -3705
  20. package/dist/{chunk-ZXF4XRKW.js → chunk-7RGZWPB6.js} +158 -8
  21. package/dist/{chunk-FYYLNIL5.js → chunk-A2NJGIB3.js} +2 -2
  22. package/dist/{chunk-XXQNGV4M.js → chunk-A3WNZD3P.js} +548 -72
  23. package/dist/{chunk-VEZEGCGW.js → chunk-B5CSFE7B.js} +23 -21
  24. package/dist/{chunk-2SFS6XQE.js → chunk-DGSYXYMX.js} +3 -2
  25. package/dist/chunk-DR52UMZW.js +21 -0
  26. package/dist/{chunk-ZWLZP4ZT.js → chunk-DYIM5TJT.js} +98 -12
  27. package/dist/{chunk-QKMUKYO7.js → chunk-E77JEWSD.js} +270 -125
  28. package/dist/{chunk-LYF7OHWH.js → chunk-EMYUUSFG.js} +12 -467
  29. package/dist/{chunk-4VP4KH3K.js → chunk-EQ63NRB7.js} +8 -8
  30. package/dist/chunk-FBVTI2TJ.js +518 -0
  31. package/dist/{chunk-R46L2BIR.js → chunk-FHJEP5SW.js} +19 -25
  32. package/dist/{chunk-WR67VIZY.js → chunk-GN57SG4G.js} +66 -8
  33. package/dist/{chunk-RD5U66HV.js → chunk-GPIEI3LY.js} +9 -9
  34. package/dist/{chunk-PCZJO5TI.js → chunk-GU2UIAFZ.js} +13 -178
  35. package/dist/chunk-GWS3VEIW.js +195 -0
  36. package/dist/chunk-H7IXIC72.js +103 -0
  37. package/dist/{chunk-3BPUFZDL.js → chunk-HLE42MG7.js} +3 -3
  38. package/dist/{chunk-24I7BN55.js → chunk-IFBNV6H6.js} +3 -3
  39. package/dist/{chunk-QNQHSOLF.js → chunk-IGWKHNIQ.js} +114 -55
  40. package/dist/chunk-IIZWH4XA.js +172 -0
  41. package/dist/{chunk-AD2SYQYC.js → chunk-IJ7RPIYJ.js} +124 -6
  42. package/dist/chunk-J3YUBZWY.js +382 -0
  43. package/dist/{chunk-5JGRAMKL.js → chunk-JOZYP4GM.js} +8 -6
  44. package/dist/{chunk-OH3TOQTB.js → chunk-K4XHGFR5.js} +751 -15
  45. package/dist/{chunk-EYPA3EGJ.js → chunk-KTYTFRMB.js} +178 -14
  46. package/dist/chunk-LU7P4LHA.js +33 -0
  47. package/dist/chunk-ME6CCNFO.js +108 -0
  48. package/dist/chunk-MXKJU4JB.js +1100 -0
  49. package/dist/{chunk-RY3LY4J5.js → chunk-N22QMJKY.js} +21 -18
  50. package/dist/chunk-NMPKI6XL.js +3006 -0
  51. package/dist/chunk-NUGM5KR6.js +165 -0
  52. package/dist/{chunk-22NAGB7X.js → chunk-P43ETTHK.js} +5 -94
  53. package/dist/{chunk-NILBFAPG.js → chunk-PMDBGQSJ.js} +2 -2
  54. package/dist/chunk-PT7HYKEM.js +165 -0
  55. package/dist/chunk-RVG5JXAL.js +41 -0
  56. package/dist/{chunk-GEYXPTRF.js → chunk-RWSI4YD7.js} +2 -2
  57. package/dist/{chunk-4BPJXDWC.js → chunk-TANS5ZJS.js} +35 -19
  58. package/dist/{verifiers-NCBTHHN2.js → chunk-TB5666IT.js} +67 -324
  59. package/dist/{chunk-QM3F2GKX.js → chunk-TLQJPP24.js} +7927 -8088
  60. package/dist/{chunk-G7MUEIGA.js → chunk-TT36MB5S.js} +2 -1
  61. package/dist/chunk-TTHACPOM.js +961 -0
  62. package/dist/{chunk-6US73PDB.js → chunk-TYPGUK6W.js} +7 -7
  63. package/dist/{chunk-MFFY33HR.js → chunk-U6MBIEMB.js} +554 -209
  64. package/dist/chunk-VAWNZU7Z.js +242 -0
  65. package/dist/{chunk-IR4CFBFN.js → chunk-VCBR6CU7.js} +12 -12
  66. package/dist/{chunk-WHJYKASB.js → chunk-VHN4MY6O.js} +2 -2
  67. package/dist/{chunk-XYDYPRZI.js → chunk-VWZOAB7K.js} +10 -10
  68. package/dist/{chunk-ZRGEBJ4T.js → chunk-WLFILSD5.js} +48 -48
  69. package/dist/{chunk-K7T3E2SR.js → chunk-WNIJTQQK.js} +12 -11
  70. package/dist/{chunk-CYQKWTG3.js → chunk-WSB3FPX7.js} +68 -20
  71. package/dist/{chunk-KHSFENX2.js → chunk-WWCZ5F23.js} +116 -14
  72. package/dist/{chunk-XE2VEJHX.js → chunk-WXY7KU3G.js} +2 -2
  73. package/dist/{chunk-PPAMZ32Z.js → chunk-XK56QHLX.js} +6 -1
  74. package/dist/{chunk-KOHPCX4K.js → chunk-XWSF374K.js} +5 -5
  75. package/dist/{chunk-CJUB2JJ2.js → chunk-YS5VLNH5.js} +10 -10
  76. package/dist/{chunk-ZZMN5OM4.js → chunk-ZNLWCMVZ.js} +2 -2
  77. package/dist/{chunk-WHGPSPT5.js → chunk-ZVJ5BLO2.js} +2 -2
  78. package/dist/cli/index.js +33 -31
  79. package/dist/{clio-M2KGYUFZ.js → clio-QVTYJ57A.js} +10 -10
  80. package/dist/{code-nav-GQNL7XA6.js → code-nav-FGGFIE7L.js} +5 -5
  81. package/dist/codewiki/build-worker.js +4 -4
  82. package/dist/{components-5TTYYX6G.js → components-ZFA3SAER.js} +9 -9
  83. package/dist/{config-XUUYQIWO.js → config-LW5IJFQN.js} +65 -55
  84. package/dist/{configure-IHJ7YOMV.js → configure-7XIZCOU4.js} +29 -24
  85. package/dist/{context-75MIWW3U.js → context-L3WL3X7K.js} +54 -43
  86. package/dist/{context-ZQ7SIFJV.js → context-N52ZA626.js} +30 -14
  87. package/dist/{context-74JLXAWD.js → context-Y6Y7QPR6.js} +12 -12
  88. package/dist/{context-clear-GYKWNUML.js → context-clear-MBQRLSDQ.js} +54 -43
  89. package/dist/{context-index-SSR5ECNE.js → context-index-HVMFQHK3.js} +5 -5
  90. package/dist/{context-working-set-UX5KEP4J.js → context-working-set-GS6DSO7F.js} +18 -18
  91. package/dist/{dispatch-runner-GIJBHNFL.js → dispatch-runner-22ZCNOM3.js} +367 -79
  92. package/dist/{docs-6FZSCG5B.js → docs-7LQ23DLM.js} +9 -9
  93. package/dist/{doctor-SVJ5BZCW.js → doctor-M7YEDGAE.js} +27 -23
  94. package/dist/{eval-CG6LLBLD.js → eval-BEC2WHDA.js} +73 -20
  95. package/dist/{evidence-ZYFIEN42.js → evidence-REJUMSKM.js} +70 -59
  96. package/dist/{evolve-QGEXEMDW.js → evolve-PY5ZBA5K.js} +50 -39
  97. package/dist/{extensions-ADGNCJJD.js → extensions-HVKU65YU.js} +7 -7
  98. package/dist/{fleet-S5R4ZOQY.js → fleet-7WZEWRFA.js} +236 -377
  99. package/dist/fleet-commands-UVHWM76J.js +70 -0
  100. package/dist/fleet-graph-6ULH7PES.js +125 -0
  101. package/dist/fleet-new-RDVJLHHH.js +48 -0
  102. package/dist/{fleet-preflight-BHSNPBMH.js → fleet-preflight-J53T6CCE.js} +5 -5
  103. package/dist/fleet-validate-72PC4SLA.js +79 -0
  104. package/dist/{init-5DRU55YR.js → init-OG3TPGQG.js} +69 -57
  105. package/dist/library-CNTMPLRF.js +217 -0
  106. package/dist/{memory-7YKKR6UC.js → memory-6IS7F275.js} +52 -41
  107. package/dist/{models-ZPOLRU2C.js → models-ENRJDA5W.js} +37 -31
  108. package/dist/{monitor-US5F5YGZ.js → monitor-XLDVO7TN.js} +79 -42
  109. package/dist/{orchestrator-E2AL4T5N.js → orchestrator-6KSPYRHA.js} +4126 -762
  110. package/dist/{paths-E7KYAQWE.js → paths-DBXMZMDU.js} +6 -6
  111. package/dist/registry-LG64LTF4.js +11 -0
  112. package/dist/{reset-KZ652EK6.js → reset-RZ4ER727.js} +12 -12
  113. package/dist/{run-SRNBKDWD.js → run-Y2CNK5RU.js} +89 -76
  114. package/dist/{share-CGZE33UP.js → share-A55GYP6Z.js} +37 -13
  115. package/dist/{skills-S2X4DLY5.js → skills-ALC5J6AT.js} +29 -13
  116. package/dist/{skills-eval-W2GGIC4R.js → skills-eval-JPBEBYQU.js} +60 -48
  117. package/dist/support-MIETYA5E.js +38 -0
  118. package/dist/{targets-54SWINWB.js → targets-VGNXIR3S.js} +46 -36
  119. package/dist/{terminal-lease-SAIF2OGY.js → terminal-lease-WOBR64YA.js} +4 -4
  120. package/dist/{uninstall-BVLWXKBT.js → uninstall-ZJF5H5ZN.js} +9 -9
  121. package/dist/{upgrade-JKAR27XC.js → upgrade-FUSUAGHR.js} +31 -28
  122. package/dist/{usage-MSAWCLX4.js → usage-N4MKVHKD.js} +140 -68
  123. package/dist/verifiers-YAWOJ3H2.js +336 -0
  124. package/dist/{verify-X5HDROLA.js → verify-LTDHYBGY.js} +10 -9
  125. package/dist/{wiki-generate-GUSOQ6ZP.js → wiki-generate-6M7GHTBJ.js} +75 -62
  126. package/dist/worker/entry.js +67 -57
  127. package/docs/README.md +3 -2
  128. package/docs/acp.md +1 -1
  129. package/docs/alcf-provider.md +1 -1
  130. package/docs/architecture.md +2 -2
  131. package/docs/artifact-versions.md +11 -6
  132. package/docs/built-in-agents.md +26 -2
  133. package/docs/capacity-and-scheduling.md +1 -1
  134. package/docs/commands-and-modes.md +83 -3
  135. package/docs/configuration-and-targets.md +86 -4
  136. package/docs/context-engine.md +1 -1
  137. package/docs/development-pipeline.md +1 -1
  138. package/docs/dispatch-architecture-rationale.md +1 -1
  139. package/docs/documentation-coverage.md +3 -3
  140. package/docs/documentation-guide.md +3 -3
  141. package/docs/eval-runner.md +1 -1
  142. package/docs/evals-internal.md +1 -1
  143. package/docs/evidence-and-memory.md +74 -10
  144. package/docs/evolution.md +1 -1
  145. package/docs/exit-codes-and-output.md +4 -1
  146. package/docs/extensions-and-sharing.md +6 -2
  147. package/docs/fleet-demo-runbook.md +2 -2
  148. package/docs/fleet-dispatch.md +228 -16
  149. package/docs/git-commit-provenance.md +2 -2
  150. package/docs/glossary.md +22 -2
  151. package/docs/installation-and-lifecycle.md +2 -2
  152. package/docs/middleware-and-components.md +2 -1
  153. package/docs/model-catalog.md +1 -1
  154. package/docs/observability.md +56 -9
  155. package/docs/proactive-memory.md +1 -1
  156. package/docs/prompt-envelope-and-tools.md +4 -2
  157. package/docs/provider-adapter-cookbook.md +1 -1
  158. package/docs/release-cut-checklist.md +83 -65
  159. package/docs/resource-library.md +59 -0
  160. package/docs/safety-model.md +2 -2
  161. package/docs/scientific-validation.md +3 -3
  162. package/docs/session-lifecycle.md +37 -1
  163. package/docs/skills-marketplace.md +16 -3
  164. package/docs/tool-usage.md +14 -7
  165. package/docs/trace-store.md +1 -1
  166. package/docs/troubleshooting.md +1 -1
  167. package/docs/tui-design.md +1 -1
  168. package/docs/worker-dispatch-mechanics.md +3 -3
  169. package/package.json +1 -2
  170. package/src/cli/argv.ts +5 -0
  171. package/src/cli/configure.ts +107 -23
  172. package/src/cli/doctor.ts +5 -1
  173. package/src/cli/evidence.ts +30 -25
  174. package/src/cli/fleet-commands.ts +37 -0
  175. package/src/cli/fleet-graph.ts +102 -0
  176. package/src/cli/fleet-new.ts +36 -0
  177. package/src/cli/fleet-preflight.ts +111 -0
  178. package/src/cli/fleet-validate.ts +30 -0
  179. package/src/cli/fleet.ts +173 -335
  180. package/src/cli/index.ts +3 -1
  181. package/src/cli/library.ts +190 -0
  182. package/src/cli/share.ts +13 -1
  183. package/src/cli/shared.ts +1 -0
  184. package/src/cli/targets.ts +4 -1
  185. package/src/cli/usage.ts +111 -19
  186. package/src/cli/validate-model.ts +60 -5
  187. package/src/core/bus-events.ts +29 -0
  188. package/src/core/commit-attribution.ts +4 -4
  189. package/src/core/config.ts +130 -0
  190. package/src/core/defaults.ts +81 -0
  191. package/src/core/path-boundary.ts +100 -0
  192. package/src/domains/agents/builtins/architect.md +1 -0
  193. package/src/domains/agents/builtins/oracle.md +33 -0
  194. package/src/domains/agents/catalog.ts +13 -1
  195. package/src/domains/agents/extension.ts +2 -11
  196. package/src/domains/agents/fleet-contract.ts +304 -24
  197. package/src/domains/agents/index.ts +14 -0
  198. package/src/domains/agents/recipe.ts +7 -1
  199. package/src/domains/agents/registry.ts +73 -5
  200. package/src/domains/agents/result-contract.ts +360 -15
  201. package/src/domains/agents/write-boundary.ts +15 -50
  202. package/src/domains/config/classify.ts +4 -0
  203. package/src/domains/context/project-rules.ts +51 -1
  204. package/src/domains/dispatch/active-route-planner.ts +14 -0
  205. package/src/domains/dispatch/assignment-reconcile.ts +22 -5
  206. package/src/domains/dispatch/assignment-store.ts +151 -14
  207. package/src/domains/dispatch/backoff.ts +2 -1
  208. package/src/domains/dispatch/capability-match.ts +1 -0
  209. package/src/domains/dispatch/checkout-writer-lease.ts +175 -0
  210. package/src/domains/dispatch/contract.ts +48 -0
  211. package/src/domains/dispatch/delegation-plan.ts +164 -0
  212. package/src/domains/dispatch/execution-plan.ts +76 -5
  213. package/src/domains/dispatch/execution-role.ts +12 -2
  214. package/src/domains/dispatch/execution-scheduler.ts +183 -67
  215. package/src/domains/dispatch/extension.ts +412 -74
  216. package/src/domains/dispatch/fleet-gate.ts +14 -0
  217. package/src/domains/dispatch/fleet-plan.ts +63 -3
  218. package/src/domains/dispatch/fleet-run.ts +791 -0
  219. package/src/domains/dispatch/gate-role-prompts.ts +47 -0
  220. package/src/domains/dispatch/host-verification.ts +178 -0
  221. package/src/domains/dispatch/index.ts +41 -1
  222. package/src/domains/dispatch/intent-requirements.ts +40 -0
  223. package/src/domains/dispatch/intent.ts +235 -0
  224. package/src/domains/dispatch/path-scope.ts +370 -0
  225. package/src/domains/dispatch/receipt-integrity.ts +9 -4
  226. package/src/domains/dispatch/state.ts +36 -3
  227. package/src/domains/dispatch/types.ts +64 -12
  228. package/src/domains/dispatch/validation.ts +69 -6
  229. package/src/domains/dispatch/write-boundary-enforcer.ts +45 -0
  230. package/src/domains/dispatch/write-boundary.ts +201 -22
  231. package/src/domains/eval/metrics/evidence.ts +79 -2
  232. package/src/domains/eval/runners/clio-run.ts +12 -2
  233. package/src/domains/evidence/build.ts +69 -11
  234. package/src/domains/evidence/index.ts +21 -0
  235. package/src/domains/evidence/provenance.ts +46 -11
  236. package/src/domains/evidence/trust-projection.ts +274 -0
  237. package/src/domains/evidence/trust-status.ts +155 -18
  238. package/src/domains/evidence/types.ts +4 -0
  239. package/src/domains/extensions/discovery.ts +88 -1
  240. package/src/domains/extensions/resources.ts +20 -8
  241. package/src/domains/extensions/state.ts +6 -2
  242. package/src/domains/extensions/types.ts +4 -1
  243. package/src/domains/lifecycle/doctor.ts +140 -1
  244. package/src/domains/middleware/index.ts +15 -0
  245. package/src/domains/middleware/watchdog.ts +281 -0
  246. package/src/domains/observability/contract.ts +3 -1
  247. package/src/domains/observability/cost.ts +12 -1
  248. package/src/domains/observability/extension.ts +2 -2
  249. package/src/domains/observability/index.ts +10 -0
  250. package/src/domains/observability/out-of-turn-usage.ts +223 -0
  251. package/src/domains/prompts/contract.ts +3 -5
  252. package/src/domains/providers/extension.ts +30 -2
  253. package/src/domains/resources/common-loader.ts +3 -0
  254. package/src/domains/resources/index.ts +20 -0
  255. package/src/domains/resources/library.ts +326 -0
  256. package/src/domains/resources/prompts/loader.ts +119 -14
  257. package/src/domains/resources/skills/marketplace.ts +37 -12
  258. package/src/domains/safety/policy-engine.ts +5 -5
  259. package/src/domains/safety/run-effects.ts +64 -1
  260. package/src/domains/safety/scope.ts +7 -12
  261. package/src/domains/session/handoff.ts +629 -0
  262. package/src/domains/share/archive.ts +67 -2
  263. package/src/engine/acp/server.ts +4 -1
  264. package/src/engine/prompt-templates.ts +18 -1
  265. package/src/engine/worker-runtime.ts +6 -3
  266. package/src/entry/orchestrator.ts +37 -0
  267. package/src/interactive/bus-notices.ts +26 -0
  268. package/src/interactive/chat-loop.ts +235 -1
  269. package/src/interactive/chat-renderer.ts +22 -0
  270. package/src/interactive/cost-overlay.ts +31 -3
  271. package/src/interactive/council-dispatch.ts +30 -0
  272. package/src/interactive/council-grid.ts +213 -0
  273. package/src/interactive/council.ts +99 -0
  274. package/src/interactive/dispatch-board.ts +311 -17
  275. package/src/interactive/fleet-run-preview.ts +307 -0
  276. package/src/interactive/footer/notifications.ts +219 -0
  277. package/src/interactive/handoff-round.ts +56 -0
  278. package/src/interactive/interactive-application.ts +43 -1
  279. package/src/interactive/interactive-event-projection.ts +23 -1
  280. package/src/interactive/interactive-slash-runtime.ts +52 -2
  281. package/src/interactive/interactive-subscriptions.ts +14 -2
  282. package/src/interactive/oracle.ts +179 -0
  283. package/src/interactive/overlay-ask-user-lifecycle.ts +6 -0
  284. package/src/interactive/overlay-general-openers.ts +190 -1
  285. package/src/interactive/overlay-key-routing.ts +17 -1
  286. package/src/interactive/overlay-lifecycle.ts +41 -1
  287. package/src/interactive/overlay-permission-lifecycle.ts +10 -0
  288. package/src/interactive/overlay-resource-openers.ts +11 -3
  289. package/src/interactive/overlay-session-lifecycle.ts +234 -2
  290. package/src/interactive/overlays/fleet-run-approval.ts +208 -0
  291. package/src/interactive/overlays/handoff-review.ts +185 -0
  292. package/src/interactive/overlays/library-install-confirm.ts +151 -0
  293. package/src/interactive/overlays/list-overlay.ts +168 -2
  294. package/src/interactive/overlays/settings.ts +221 -30
  295. package/src/interactive/overlays/side-question.ts +139 -0
  296. package/src/interactive/overlays/skills-hub.ts +401 -15
  297. package/src/interactive/side-question.ts +171 -0
  298. package/src/interactive/slash-commands.ts +439 -7
  299. package/src/interactive/slash-spec.ts +19 -6
  300. package/src/interactive/theme/tokens.ts +30 -0
  301. package/src/interactive/turn-middleware.ts +15 -1
  302. package/src/interactive/view/artifacts.ts +42 -9
  303. package/src/interactive/view/view-overlay.ts +15 -3
  304. package/src/interactive/watchdog-run.ts +75 -0
  305. package/src/interactive/worker-receipts.ts +14 -2
  306. package/src/interactive/worker-share.ts +56 -1
  307. package/src/interactive/worker-stream.ts +15 -0
  308. package/src/tools/bootstrap.ts +3 -0
  309. package/src/tools/compete-worktrees.ts +13 -79
  310. package/src/tools/dispatch-admission.ts +251 -18
  311. package/src/tools/dispatch-arguments.ts +84 -1
  312. package/src/tools/dispatch-plan.ts +165 -6
  313. package/src/tools/dispatch-runner.ts +364 -23
  314. package/src/tools/dispatch-types.ts +20 -1
  315. package/src/tools/dispatch.ts +72 -2
  316. package/src/tools/monitor.ts +29 -0
  317. package/src/tools/profiles.ts +18 -4
  318. package/src/tools/task-worktree.ts +238 -0
  319. package/src/tools/verify/authoring.ts +61 -1
  320. package/src/tools/verify/scripts.ts +62 -0
  321. package/src/tools/worker-evidence.ts +21 -14
  322. package/src/worker/spec-contract.ts +3 -1
  323. package/dist/chunk-HC4CLZ2Y.js +0 -68
@@ -0,0 +1,961 @@
1
+ import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
2
+ import {
3
+ AGENT_AUTOMATION_AUTHORITIES
4
+ } from "./chunk-AOCYTWAV.js";
5
+ import {
6
+ init_esm_shims
7
+ } from "./chunk-3R73A4XB.js";
8
+
9
+ // src/core/json-payload.ts
10
+ init_esm_shims();
11
+ function jsonPayloadCandidates(text) {
12
+ const trimmed = text.trim();
13
+ const candidates = [trimmed];
14
+ const fenced = /```[A-Za-z0-9_-]*\s*\n?([\s\S]*?)```/.exec(trimmed)?.[1]?.trim();
15
+ if (fenced !== void 0 && fenced.length > 0) candidates.push(fenced);
16
+ const start = trimmed.indexOf("{");
17
+ const end = trimmed.lastIndexOf("}");
18
+ if (start >= 0 && end > start) candidates.push(trimmed.slice(start, end + 1));
19
+ return candidates;
20
+ }
21
+ function parseJsonObjectPayload(text) {
22
+ let parsedSomething = false;
23
+ for (const candidate of jsonPayloadCandidates(text)) {
24
+ let value;
25
+ try {
26
+ value = JSON.parse(candidate);
27
+ } catch {
28
+ continue;
29
+ }
30
+ parsedSomething = true;
31
+ if (value === null || typeof value !== "object" || Array.isArray(value)) continue;
32
+ return { ok: true, value };
33
+ }
34
+ return { ok: false, reason: parsedSomething ? "not-object" : "not-json" };
35
+ }
36
+
37
+ // src/domains/agents/result-contract.ts
38
+ init_esm_shims();
39
+ import { createHash } from "node:crypto";
40
+ import path from "node:path";
41
+ function parseDelegationPlanResult(output) {
42
+ const parsed = parseJson(output);
43
+ if (!parsed.ok || !hasOnlyKeys(parsed.value, ["tasks"]) || !Array.isArray(parsed.value.tasks) || parsed.value.tasks.length === 0)
44
+ return null;
45
+ const tasks = [];
46
+ for (const raw of parsed.value.tasks) {
47
+ if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return null;
48
+ const task = raw;
49
+ if (!hasOnlyKeys(task, ["id", "agent", "description", "depends_on", "writes", "mode"]) || !string(task.id) || !string(task.agent) || !string(task.description) || !Array.isArray(task.depends_on) || task.depends_on.some((entry) => !string(entry)) || !Array.isArray(task.writes) || task.writes.some((entry) => !string(entry)) || task.mode !== void 0 && task.mode !== "sequential" && task.mode !== "parallel")
50
+ return null;
51
+ tasks.push({
52
+ id: task.id,
53
+ agent: task.agent,
54
+ description: task.description,
55
+ depends_on: [...task.depends_on],
56
+ writes: [...task.writes],
57
+ ...task.mode !== void 0 ? { mode: task.mode } : {}
58
+ });
59
+ }
60
+ return { tasks };
61
+ }
62
+ var COUNCIL_BALLOT_VERDICT_MAX_BYTES = 64;
63
+ var COUNCIL_BALLOT_SHAPE = '{"verdict":"yes","text":"the answer and the evidence behind it"}';
64
+ function parseCouncilBallot(output) {
65
+ const parsed = parseJson(output);
66
+ if (!parsed.ok) return null;
67
+ const value = parsed.value;
68
+ if (!hasOnlyKeys(value, ["verdict", "text"]) || !string(value.verdict) || !string(value.text)) return null;
69
+ const verdict = value.verdict.trim();
70
+ if (verdict.includes("\n") || Buffer.byteLength(verdict, "utf8") > COUNCIL_BALLOT_VERDICT_MAX_BYTES) return null;
71
+ return { verdict, text: value.text.trim() };
72
+ }
73
+ function validateCouncilBallot(contract, output) {
74
+ const parsed = parseJson(output);
75
+ if (!parsed.ok) return failure(contract, "unmeasured", parsed.reason);
76
+ const ballot = parseCouncilBallot(output);
77
+ if (ballot === null) {
78
+ return failure(
79
+ contract,
80
+ "unmeasured",
81
+ `A council ballot must carry only verdict and text, both non-empty strings, with verdict a single line of at most ${COUNCIL_BALLOT_VERDICT_MAX_BYTES} bytes so the tally can match it against the other members`
82
+ );
83
+ }
84
+ return success(contract, "unmeasured", ballot);
85
+ }
86
+ function parseCouncilReport(output) {
87
+ if (output === null) return null;
88
+ const parsed = parseJsonObjectPayload(output);
89
+ if (!parsed.ok) return null;
90
+ const value = parsed.value;
91
+ if (!hasOnlyKeys(value, ["members", "synthesis"]) || !Array.isArray(value.members) || value.members.length === 0) {
92
+ return null;
93
+ }
94
+ const members = [];
95
+ for (const raw of value.members) {
96
+ if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return null;
97
+ const member = raw;
98
+ if (!hasOnlyKeys(member, ["label", "runId", "round", "answer", "verdict", "failed"]) || !string(member.label) || !string(member.runId) || !Number.isInteger(member.round) || Number(member.round) < 1 || typeof member.answer !== "string" || member.verdict !== void 0 && !string(member.verdict))
99
+ return null;
100
+ let failed;
101
+ if (member.failed !== void 0) {
102
+ if (member.failed === null || typeof member.failed !== "object" || Array.isArray(member.failed) || !hasOnlyKeys(member.failed, ["reason"]) || !string(member.failed.reason))
103
+ return null;
104
+ failed = { reason: member.failed.reason };
105
+ }
106
+ members.push({
107
+ label: member.label,
108
+ runId: member.runId,
109
+ round: Number(member.round),
110
+ answer: member.answer,
111
+ ...member.verdict !== void 0 ? { verdict: member.verdict } : {},
112
+ ...failed !== void 0 ? { failed } : {}
113
+ });
114
+ }
115
+ if (value.synthesis === null || typeof value.synthesis !== "object" || Array.isArray(value.synthesis)) return null;
116
+ const rawSynthesis = value.synthesis;
117
+ if (!hasOnlyKeys(rawSynthesis, ["kind", "text", "verdict", "tally", "judgeRunId"])) return null;
118
+ if (rawSynthesis.kind !== "none" && rawSynthesis.kind !== "judge" && rawSynthesis.kind !== "vote") return null;
119
+ for (const key of ["text", "verdict", "judgeRunId"]) {
120
+ if (rawSynthesis[key] !== void 0 && !string(rawSynthesis[key])) return null;
121
+ }
122
+ let tally;
123
+ if (rawSynthesis.tally !== void 0) {
124
+ if (rawSynthesis.tally === null || typeof rawSynthesis.tally !== "object" || Array.isArray(rawSynthesis.tally))
125
+ return null;
126
+ tally = {};
127
+ for (const [key, count] of Object.entries(rawSynthesis.tally)) {
128
+ if (!key || !Number.isInteger(count) || Number(count) < 0) return null;
129
+ tally[key] = Number(count);
130
+ }
131
+ }
132
+ return {
133
+ members,
134
+ synthesis: {
135
+ kind: rawSynthesis.kind,
136
+ ...rawSynthesis.text !== void 0 ? { text: rawSynthesis.text } : {},
137
+ ...rawSynthesis.verdict !== void 0 ? { verdict: rawSynthesis.verdict } : {},
138
+ ...tally !== void 0 ? { tally } : {},
139
+ ...rawSynthesis.judgeRunId !== void 0 ? { judgeRunId: rawSynthesis.judgeRunId } : {}
140
+ }
141
+ };
142
+ }
143
+ function canonical(value) {
144
+ if (value === null) return "null";
145
+ if (typeof value === "string" || typeof value === "boolean") return JSON.stringify(value);
146
+ if (typeof value === "number") {
147
+ if (!Number.isFinite(value)) throw new Error("result contract cannot digest non-finite numbers");
148
+ return JSON.stringify(value);
149
+ }
150
+ if (Array.isArray(value)) return `[${value.map(canonical).join(",")}]`;
151
+ if (typeof value === "object") {
152
+ const record = value;
153
+ return `{${Object.keys(record).sort().map((key) => `${JSON.stringify(key)}:${canonical(record[key])}`).join(",")}}`;
154
+ }
155
+ throw new Error(`result contract cannot digest ${typeof value}`);
156
+ }
157
+ function digest(value) {
158
+ return createHash("sha256").update(canonical(value), "utf8").digest("hex");
159
+ }
160
+ function resultContractDigest(contract) {
161
+ return digest(contract);
162
+ }
163
+ function resultContractSourceId(contract) {
164
+ return `agent-result-contract:${contract.kind}:${resultContractDigest(contract)}`;
165
+ }
166
+ function failure(contract, quality, reason) {
167
+ return {
168
+ conformance: "fail",
169
+ quality,
170
+ sourceId: resultContractSourceId(contract),
171
+ validatorDigest: digest({ contract, reason }),
172
+ reason
173
+ };
174
+ }
175
+ function success(contract, quality, value, extra = {}) {
176
+ return {
177
+ conformance: "pass",
178
+ quality,
179
+ sourceId: resultContractSourceId(contract),
180
+ validatorDigest: digest({ contract, value }),
181
+ ...extra
182
+ };
183
+ }
184
+ function parseJson(output) {
185
+ if (output === null || output.trim().length === 0) return { ok: false, reason: "missing final result" };
186
+ const parsed = parseJsonObjectPayload(output);
187
+ if (parsed.ok) return parsed;
188
+ return {
189
+ ok: false,
190
+ reason: parsed.reason === "not-object" ? "result must be a JSON object" : "result must be valid JSON"
191
+ };
192
+ }
193
+ function hasOnlyKeys(value, keys) {
194
+ const allowed = new Set(keys);
195
+ return Object.keys(value).every((key) => allowed.has(key));
196
+ }
197
+ function string(value) {
198
+ return typeof value === "string" && value.trim().length > 0;
199
+ }
200
+ function parseFindings(value) {
201
+ if (!Array.isArray(value)) return null;
202
+ const findings = [];
203
+ for (const entry of value) {
204
+ if (entry === null || typeof entry !== "object" || Array.isArray(entry)) return null;
205
+ const finding = entry;
206
+ const line = finding.line;
207
+ if (!hasOnlyKeys(finding, ["claim", "path", "line"]) || !string(finding.claim) || !string(finding.path) || typeof line !== "number" || !Number.isSafeInteger(line) || line < 1) {
208
+ return null;
209
+ }
210
+ findings.push({ claim: finding.claim, path: finding.path, line });
211
+ }
212
+ return findings;
213
+ }
214
+ var RESULT_CONTRACT_KINDS = [
215
+ "architect-plan",
216
+ "scout-report",
217
+ "verifier-report",
218
+ "council-report",
219
+ "debugger-report",
220
+ "research-report",
221
+ "mutation-report",
222
+ "provenance-report",
223
+ "external-delegation"
224
+ ];
225
+ function parseSubtasks(value) {
226
+ if (!Array.isArray(value) || value.length > 4) return null;
227
+ const subtasks = [];
228
+ const ids = /* @__PURE__ */ new Set();
229
+ for (const entry of value) {
230
+ if (entry === null || typeof entry !== "object" || Array.isArray(entry)) return null;
231
+ const subtask = entry;
232
+ if (!hasOnlyKeys(subtask, ["id", "task", "dependencies", "expectedResultContract", "requestedAuthority"]) || !string(subtask.id) || !/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/u.test(subtask.id) || ids.has(subtask.id) || !string(subtask.task) || Buffer.byteLength(subtask.task, "utf8") > 4096 || !Array.isArray(subtask.dependencies) || subtask.dependencies.length > 4 || subtask.dependencies.some((dependency) => !string(dependency)) || new Set(subtask.dependencies).size !== subtask.dependencies.length || !RESULT_CONTRACT_KINDS.includes(subtask.expectedResultContract) || !AGENT_AUTOMATION_AUTHORITIES.includes(subtask.requestedAuthority)) {
233
+ return null;
234
+ }
235
+ ids.add(subtask.id);
236
+ subtasks.push({
237
+ id: subtask.id,
238
+ task: subtask.task,
239
+ dependencies: [...subtask.dependencies],
240
+ expectedResultContract: subtask.expectedResultContract,
241
+ requestedAuthority: subtask.requestedAuthority
242
+ });
243
+ }
244
+ for (const subtask of subtasks) {
245
+ if (subtask.dependencies.some((dependency) => dependency === subtask.id || !ids.has(dependency))) return null;
246
+ }
247
+ const remaining = new Set(ids);
248
+ const completed = /* @__PURE__ */ new Set();
249
+ while (remaining.size > 0) {
250
+ const ready = subtasks.filter(
251
+ (subtask) => remaining.has(subtask.id) && subtask.dependencies.every((dependency) => completed.has(dependency))
252
+ );
253
+ if (ready.length === 0) return null;
254
+ for (const subtask of ready) {
255
+ remaining.delete(subtask.id);
256
+ completed.add(subtask.id);
257
+ }
258
+ }
259
+ return subtasks;
260
+ }
261
+ function isContextHandbookResult(value) {
262
+ if (!hasOnlyKeys(value, ["projectName", "identity", "conventions", "invariants", "sections"])) return false;
263
+ if (!string(value.projectName) || !string(value.identity)) return false;
264
+ if (!Array.isArray(value.conventions) || value.conventions.some((entry) => !string(entry))) return false;
265
+ if (!Array.isArray(value.invariants) || value.invariants.some((entry) => !string(entry))) return false;
266
+ if (!Array.isArray(value.sections)) return false;
267
+ return value.sections.every((entry) => {
268
+ if (entry === null || typeof entry !== "object" || Array.isArray(entry)) return false;
269
+ const section = entry;
270
+ return hasOnlyKeys(section, ["title", "body"]) && string(section.title) && string(section.body);
271
+ });
272
+ }
273
+ function validateContextHandbook(contract, output) {
274
+ const parsed = parseJson(output);
275
+ if (!parsed.ok) return failure(contract, "fail", parsed.reason);
276
+ if (!isContextHandbookResult(parsed.value)) {
277
+ return failure(
278
+ contract,
279
+ "fail",
280
+ "context handbook result must carry projectName, identity, conventions[], invariants[], and sections[{title, body}] and nothing else"
281
+ );
282
+ }
283
+ return success(contract, "unmeasured", parsed.value);
284
+ }
285
+ function salvageScoutClaims(value) {
286
+ const grounded = [];
287
+ const ungrounded = [];
288
+ if (!Array.isArray(value)) return { grounded, ungrounded };
289
+ for (const entry of value) {
290
+ if (entry === null || typeof entry !== "object" || Array.isArray(entry)) continue;
291
+ const finding = entry;
292
+ if (!string(finding.claim)) continue;
293
+ const line = finding.line;
294
+ if (string(finding.path) && typeof line === "number" && Number.isSafeInteger(line) && line >= 1) {
295
+ grounded.push({ claim: finding.claim, path: finding.path, line });
296
+ continue;
297
+ }
298
+ ungrounded.push(finding.claim);
299
+ }
300
+ return { grounded, ungrounded };
301
+ }
302
+ function degradedScout(contract, value, reason) {
303
+ const salvaged = salvageScoutClaims(value.findings);
304
+ if (salvaged.grounded.length === 0 && salvaged.ungrounded.length === 0) return null;
305
+ const degradedReason = `${reason} (accepted as a degraded reconnaissance result; findings are leads, not validation evidence)`;
306
+ const scout = {
307
+ findings: salvaged.grounded,
308
+ citations: salvaged.grounded.map(({ path: citedPath, line }) => ({ path: citedPath, line })),
309
+ needsSplit: false,
310
+ proposedSubtasks: [],
311
+ ungroundedClaims: salvaged.ungrounded,
312
+ degradedReason
313
+ };
314
+ return success(contract, "unmeasured", scout, { scout, reason: degradedReason });
315
+ }
316
+ function validateScout(contract, output) {
317
+ const parsed = parseJson(output);
318
+ if (!parsed.ok) return failure(contract, "fail", parsed.reason);
319
+ const value = parsed.value;
320
+ const degrade = (reason) => degradedScout(contract, value, reason) ?? failure(contract, "fail", reason);
321
+ if (!hasOnlyKeys(value, ["findings", "needsSplit", "proposedSubtasks"])) {
322
+ return degrade("Scout result has unknown fields");
323
+ }
324
+ const findings = parseFindings(value.findings);
325
+ const proposedSubtasks = parseSubtasks(value.proposedSubtasks);
326
+ if (findings === null || typeof value.needsSplit !== "boolean" || proposedSubtasks === null) {
327
+ return degrade(
328
+ "Scout result must carry findings as {claim, path, line} objects, needsSplit, and 0..4 typed proposed subtasks"
329
+ );
330
+ }
331
+ if (value.needsSplit !== proposedSubtasks.length > 0) {
332
+ return degrade("Scout needsSplit must agree with proposedSubtasks");
333
+ }
334
+ if (findings.length === 0 && !value.needsSplit) {
335
+ return degrade("Scout result must carry at least one cited finding, or set needsSplit");
336
+ }
337
+ if (value.needsSplit && findings.length > 0) {
338
+ return degrade("Scout split recommendations carry typed subtasks instead of findings");
339
+ }
340
+ const scout = {
341
+ findings,
342
+ citations: findings.map(({ path: citedPath, line }) => ({ path: citedPath, line })),
343
+ needsSplit: value.needsSplit,
344
+ proposedSubtasks
345
+ };
346
+ return success(contract, "pass", scout, { scout });
347
+ }
348
+ function parseChecks(value) {
349
+ if (!Array.isArray(value) || value.length === 0) return null;
350
+ const checks = [];
351
+ for (const entry of value) {
352
+ if (entry === null || typeof entry !== "object" || Array.isArray(entry)) return null;
353
+ const check = entry;
354
+ if (!hasOnlyKeys(check, ["name", "passed", "evidence"]) || !string(check.name) || typeof check.passed !== "boolean" || !string(check.evidence)) {
355
+ return null;
356
+ }
357
+ checks.push({ name: check.name, passed: check.passed, evidence: check.evidence });
358
+ }
359
+ return checks;
360
+ }
361
+ function validateScoutCitation(input, citation) {
362
+ const cwd = path.resolve(input.cwd);
363
+ const citedPath = path.resolve(cwd, citation.path);
364
+ const relative = path.relative(cwd, citedPath);
365
+ if (relative === "" || relative.startsWith(`..${path.sep}`) || relative === ".." || path.isAbsolute(relative)) {
366
+ return { ok: false, reason: `Scout citation path escapes the workspace: ${citation.path}` };
367
+ }
368
+ const content = input.filesystem.readFile(citedPath);
369
+ if (content === null) return { ok: false, reason: `Scout citation cannot be read: ${citation.path}` };
370
+ const lineCount = content.split(/\r\n|\r|\n/u).length;
371
+ if (citation.line > lineCount) {
372
+ return { ok: false, reason: `Scout citation is past end of file: ${citation.path}:${citation.line}` };
373
+ }
374
+ if (input.observedReadRanges !== void 0) {
375
+ const spans = input.observedReadRanges.get(citedPath) ?? [];
376
+ if (!spans.some(([start, end]) => citation.line >= start && citation.line <= end)) {
377
+ const observed = spans.length === 0 ? "this run never read that file" : `this run read only ${spans.map(([start, end]) => `${start}-${end}`).join(", ")}`;
378
+ return {
379
+ ok: false,
380
+ reason: `Scout citation is not grounded in a live read: ${citation.path}:${citation.line} (${observed})`
381
+ };
382
+ }
383
+ }
384
+ return {
385
+ ok: true,
386
+ evidence: { ...citation, contentDigest: createHash("sha256").update(content, "utf8").digest("hex") }
387
+ };
388
+ }
389
+ function validateScoutCitations(input, citations) {
390
+ const evidence = [];
391
+ for (const citation of citations) {
392
+ const checked = validateScoutCitation(input, citation);
393
+ if (!checked.ok) return checked;
394
+ evidence.push(checked.evidence);
395
+ }
396
+ return { ok: true, evidence };
397
+ }
398
+ function groundDegradedScout(contract, input, scout, degradedReason) {
399
+ const grounded = [];
400
+ const evidence = [];
401
+ const demoted = [];
402
+ for (const finding of scout.findings) {
403
+ const checked = validateScoutCitation(input, { path: finding.path, line: finding.line });
404
+ if (checked.ok) {
405
+ grounded.push(finding);
406
+ evidence.push(checked.evidence);
407
+ continue;
408
+ }
409
+ demoted.push(finding.claim);
410
+ }
411
+ const degraded = {
412
+ findings: grounded,
413
+ citations: grounded.map(({ path: citedPath, line }) => ({ path: citedPath, line })),
414
+ needsSplit: false,
415
+ proposedSubtasks: [],
416
+ ungroundedClaims: [...scout.ungroundedClaims ?? [], ...demoted],
417
+ degradedReason
418
+ };
419
+ return success(contract, "unmeasured", { scout: degraded, evidence }, { scout: degraded, reason: degradedReason });
420
+ }
421
+ function validateVerifier(contract, output) {
422
+ const parsed = parseJson(output);
423
+ if (!parsed.ok) return failure(contract, "fail", parsed.reason);
424
+ const value = parsed.value;
425
+ if (!hasOnlyKeys(value, ["verdict", "checks"]) || value.verdict !== "pass" && value.verdict !== "fail") {
426
+ return failure(contract, "fail", "Verifier result must carry pass or fail verdict and checks");
427
+ }
428
+ const checks = parseChecks(value.checks);
429
+ if (checks === null || value.verdict === "pass" !== checks.every((check) => check.passed)) {
430
+ return failure(contract, "fail", "Verifier verdict must agree with every typed check");
431
+ }
432
+ const verifier = { verdict: value.verdict, checks };
433
+ return success(contract, value.verdict, verifier, { verifier });
434
+ }
435
+ function parseVerifierResult(output) {
436
+ const validation = validateVerifier({ kind: "verifier-report" }, output);
437
+ return validation.verifier ?? null;
438
+ }
439
+ function validateOracle(contract, output) {
440
+ const parsed = parseJson(output);
441
+ if (!parsed.ok) return failure(contract, "unmeasured", parsed.reason);
442
+ const value = parsed.value;
443
+ if (!hasOnlyKeys(value, ["verdict", "challenge", "changesMyMind", "citedDecisions"]) || !string(value.verdict) || !string(value.challenge) || !string(value.changesMyMind) || !Array.isArray(value.citedDecisions) || value.citedDecisions.some((entry) => !string(entry))) {
444
+ return failure(
445
+ contract,
446
+ "unmeasured",
447
+ 'Oracle result must carry verdict, challenge, changesMyMind, and a citedDecisions array of strings, for example {"verdict":"consistent with decision routing.target","challenge":"...","changesMyMind":"...","citedDecisions":["routing.target"]}'
448
+ );
449
+ }
450
+ return success(contract, "unmeasured", value);
451
+ }
452
+ function parseOracleResult(output) {
453
+ const validation = validateOracle({ kind: "oracle-report" }, output);
454
+ if (validation.conformance !== "pass") return null;
455
+ const parsed = parseJson(output);
456
+ if (!parsed.ok) return null;
457
+ return {
458
+ verdict: String(parsed.value.verdict),
459
+ challenge: String(parsed.value.challenge),
460
+ changesMyMind: String(parsed.value.changesMyMind),
461
+ citedDecisions: parsed.value.citedDecisions.map((entry) => String(entry))
462
+ };
463
+ }
464
+ function validateCodeReport(contract, output) {
465
+ const parsed = parseJson(output);
466
+ if (!parsed.ok) return failure(contract, "unmeasured", parsed.reason);
467
+ const value = parsed.value;
468
+ if (!hasOnlyKeys(value, ["passed", "exitCode", "checks", "artifactPaths", "outputExcerpt"]) || typeof value.passed !== "boolean" || typeof value.exitCode !== "number" || !Number.isSafeInteger(value.exitCode) || typeof value.outputExcerpt !== "string" || !Array.isArray(value.artifactPaths) || value.artifactPaths.some((entry) => !string(entry))) {
469
+ return failure(
470
+ contract,
471
+ "unmeasured",
472
+ "Code result must carry passed, integer exitCode, checks, artifactPaths, and outputExcerpt"
473
+ );
474
+ }
475
+ const checks = parseChecks(value.checks);
476
+ if (checks === null) return failure(contract, "unmeasured", "Code result must carry typed checks");
477
+ if (value.passed !== (value.exitCode === 0) || value.passed !== checks.every((check) => check.passed)) {
478
+ return failure(contract, "unmeasured", "Code result passed must agree with its exit code and every check");
479
+ }
480
+ return success(contract, "unmeasured", value);
481
+ }
482
+ var RESULT_COMMIT_MESSAGE_MAX_BYTES = 1e3;
483
+ var AUTHORSHIP_FIELDS = ["commitMessage", "summary"];
484
+ function hasControlCharacters(value) {
485
+ for (const character of value) {
486
+ const code = character.codePointAt(0) ?? 0;
487
+ if (code === 127) return true;
488
+ if (code < 32 && character !== "\n" && character !== "\r" && character !== " ") return true;
489
+ }
490
+ return false;
491
+ }
492
+ function normalizeAuthored(value) {
493
+ return value.replace(/\r\n/gu, "\n").replace(/\r/gu, "\n").trim();
494
+ }
495
+ function validateAuthorship(value) {
496
+ for (const field of AUTHORSHIP_FIELDS) {
497
+ const raw = value[field];
498
+ if (raw === void 0 || raw === null) continue;
499
+ if (typeof raw !== "string") return `${field} must be a string when present`;
500
+ if (raw.trim().length === 0) continue;
501
+ if (Buffer.byteLength(raw, "utf8") > RESULT_COMMIT_MESSAGE_MAX_BYTES) {
502
+ return `${field} must be at most ${RESULT_COMMIT_MESSAGE_MAX_BYTES} bytes`;
503
+ }
504
+ if (hasControlCharacters(raw)) return `${field} must not contain control characters`;
505
+ }
506
+ return null;
507
+ }
508
+ function resultContractAuthorship(contract, output) {
509
+ const empty = { commitMessage: null, summary: null };
510
+ if (contract.kind !== "mutation-report" && contract.kind !== "architect-plan") return empty;
511
+ const parsed = parseJson(output);
512
+ if (!parsed.ok || validateAuthorship(parsed.value) !== null) return empty;
513
+ const read = (field) => {
514
+ const raw = parsed.value[field];
515
+ if (typeof raw !== "string") return null;
516
+ const normalized = normalizeAuthored(raw);
517
+ return normalized.length === 0 ? null : normalized;
518
+ };
519
+ return { commitMessage: read("commitMessage"), summary: read("summary") };
520
+ }
521
+ function validateDebugger(contract, output) {
522
+ const parsed = parseJson(output);
523
+ if (!parsed.ok) return failure(contract, "unmeasured", parsed.reason);
524
+ const value = parsed.value;
525
+ if (!hasOnlyKeys(value, ["diagnosis", "reproduction", "evidence"]) || !string(value.diagnosis) || value.reproduction !== "reproduced" && value.reproduction !== "not-reproduced" && value.reproduction !== "unknown" || !Array.isArray(value.evidence) || value.evidence.some((entry) => !string(entry))) {
526
+ return failure(
527
+ contract,
528
+ "unmeasured",
529
+ "Debugger result must carry diagnosis, reproduction status, and evidence without a verdict"
530
+ );
531
+ }
532
+ return success(contract, "unmeasured", value);
533
+ }
534
+ function validateResearch(contract, output, networkAllowed) {
535
+ const parsed = parseJson(output);
536
+ if (!parsed.ok) return failure(contract, "unmeasured", parsed.reason);
537
+ const value = parsed.value;
538
+ if (!hasOnlyKeys(value, ["source", "findings"]) || value.source !== "local" && value.source !== "external" || !Array.isArray(value.findings)) {
539
+ return failure(
540
+ contract,
541
+ "unmeasured",
542
+ "Research result must distinguish local or external sources and carry findings"
543
+ );
544
+ }
545
+ if (value.source === "external" && !networkAllowed) {
546
+ return failure(contract, "unmeasured", "external research requires an allowed network posture");
547
+ }
548
+ for (const finding of value.findings) {
549
+ if (finding === null || typeof finding !== "object" || Array.isArray(finding)) {
550
+ return failure(contract, "unmeasured", "Research findings must be objects");
551
+ }
552
+ const record = finding;
553
+ if (!hasOnlyKeys(record, ["claim", "evidence"]) || !string(record.claim) || !string(record.evidence)) {
554
+ return failure(contract, "unmeasured", "Research findings must carry claim and evidence");
555
+ }
556
+ }
557
+ return success(contract, "unmeasured", value);
558
+ }
559
+ function describeWriteSet(effects, cwd) {
560
+ if (effects.mutatedPaths.size === 0) return "this run wrote nothing";
561
+ const written = [...effects.mutatedPaths].map((target) => path.relative(cwd, target) || target).sort().slice(0, MUTATION_WRITE_SET_REASON_LIMIT);
562
+ const more = effects.mutatedPaths.size - written.length;
563
+ return `this run wrote ${written.join(", ")}${more > 0 ? ` (+${more} more)` : ""}`;
564
+ }
565
+ var MUTATION_WRITE_SET_REASON_LIMIT = 8;
566
+ function pathIsPresent(filesystem, target) {
567
+ if (filesystem.pathExists === void 0) return true;
568
+ return filesystem.pathExists(target);
569
+ }
570
+ var MUTATION_VALIDATION_EXAMPLE = '{"name":"npm test","passed":true,"evidence":"exit 0"}';
571
+ function mutationValidationsReason(value) {
572
+ const empty = Array.isArray(value) && value.length === 0;
573
+ if (empty) {
574
+ return `Mutation result must carry typed validation results: validations was empty. Emit one entry per check this run actually made, each shaped like ${MUTATION_VALIDATION_EXAMPLE}. A run that only read files still names the read and cites what it saw.`;
575
+ }
576
+ return `Mutation result must carry typed validation results: every validations entry is shaped like ${MUTATION_VALIDATION_EXAMPLE}, with a string name, a boolean passed, a string evidence, and no other keys.`;
577
+ }
578
+ function validateMutation(contract, input) {
579
+ const parsed = parseJson(input.output);
580
+ if (!parsed.ok) return failure(contract, "unmeasured", parsed.reason);
581
+ const value = parsed.value;
582
+ if (!hasOnlyKeys(value, ["mutatedPaths", "validations", "commitMessage", "summary"]) || !Array.isArray(value.mutatedPaths) || value.mutatedPaths.some((entry) => !string(entry))) {
583
+ return failure(contract, "unmeasured", "Mutation result must carry mutatedPaths and validations");
584
+ }
585
+ const authorship = validateAuthorship(value);
586
+ if (authorship !== null) return failure(contract, "unmeasured", authorship);
587
+ const validations = parseChecks(value.validations);
588
+ if (validations === null) return failure(contract, "unmeasured", mutationValidationsReason(value.validations));
589
+ const reportedFailure = !validations.every((check) => check.passed);
590
+ const effects = input.observedRunEffects;
591
+ if (effects === void 0) return success(contract, reportedFailure ? "fail" : "pass", value);
592
+ const cwd = path.resolve(input.cwd);
593
+ let unverifiedMutation = false;
594
+ for (const reported of value.mutatedPaths) {
595
+ const target = path.resolve(cwd, reported);
596
+ if (effects.mutatedPaths.has(target)) continue;
597
+ if (effects.failedMutationPaths.has(target)) {
598
+ return failure(
599
+ contract,
600
+ "unmeasured",
601
+ `Mutation result names a path whose only write this run attempted was refused: ${reported} (${describeWriteSet(effects, cwd)})`
602
+ );
603
+ }
604
+ if (pathIsPresent(input.filesystem, target)) {
605
+ unverifiedMutation = true;
606
+ continue;
607
+ }
608
+ return failure(
609
+ contract,
610
+ "unmeasured",
611
+ `Mutation result names a path this run never wrote and that does not exist: ${reported} (${describeWriteSet(effects, cwd)})`
612
+ );
613
+ }
614
+ if (reportedFailure) return success(contract, "fail", value);
615
+ const measured = !unverifiedMutation && effects.validationCommands.size > 0;
616
+ return success(contract, measured ? "pass" : "unmeasured", value);
617
+ }
618
+ function validateProvenance(contract, output) {
619
+ const parsed = parseJson(output);
620
+ if (!parsed.ok) return failure(contract, "unmeasured", parsed.reason);
621
+ const value = parsed.value;
622
+ if (!hasOnlyKeys(value, ["confirmedFacts", "missingEvidence", "nextInspections"]) || ![value.confirmedFacts, value.missingEvidence, value.nextInspections].every(
623
+ (entry) => Array.isArray(entry) && entry.every((item) => string(item))
624
+ )) {
625
+ return failure(
626
+ contract,
627
+ "unmeasured",
628
+ "Provenance result must carry confirmedFacts, missingEvidence, and nextInspections"
629
+ );
630
+ }
631
+ return success(contract, "unmeasured", value);
632
+ }
633
+ function validateArchitect(contract, input) {
634
+ const artifactPath = path.resolve(input.cwd, contract.path);
635
+ const content = input.filesystem.readFile(artifactPath);
636
+ if (content === null || content.trim().length === 0) {
637
+ return failure(contract, "unmeasured", `required plan artifact is missing or empty: ${contract.path}`);
638
+ }
639
+ return success(contract, "unmeasured", {
640
+ path: contract.path,
641
+ artifactDigest: createHash("sha256").update(content, "utf8").digest("hex")
642
+ });
643
+ }
644
+ function parseScoutResult(output) {
645
+ const validation = validateScout({ kind: "scout-report" }, output);
646
+ if (validation.conformance !== "pass" || validation.scout === void 0) return null;
647
+ return validation.scout.degradedReason === void 0 ? validation.scout : null;
648
+ }
649
+ function validateResultContract(input) {
650
+ switch (input.contract.kind) {
651
+ case "architect-plan":
652
+ return validateArchitect(input.contract, input);
653
+ case "scout-report": {
654
+ const validation = validateScout(input.contract, input.output);
655
+ if (validation.scout === void 0) return validation;
656
+ const degradedReason = validation.scout.degradedReason;
657
+ if (degradedReason !== void 0) {
658
+ return groundDegradedScout(input.contract, input, validation.scout, degradedReason);
659
+ }
660
+ const citations = validateScoutCitations(input, validation.scout.citations);
661
+ return citations.ok ? success(
662
+ input.contract,
663
+ "pass",
664
+ { scout: validation.scout, evidence: citations.evidence },
665
+ { scout: validation.scout }
666
+ ) : failure(input.contract, "fail", citations.reason);
667
+ }
668
+ case "verifier-report":
669
+ return validateVerifier(input.contract, input.output);
670
+ case "council-report": {
671
+ const report = parseCouncilReport(input.output);
672
+ return report === null ? failure(input.contract, "fail", "council-report is malformed") : success(input.contract, "unmeasured", { council: report });
673
+ }
674
+ case "council-ballot":
675
+ return validateCouncilBallot(input.contract, input.output);
676
+ case "debugger-report":
677
+ return validateDebugger(input.contract, input.output);
678
+ case "research-report":
679
+ return validateResearch(input.contract, input.output, input.networkAllowed);
680
+ case "mutation-report":
681
+ return validateMutation(input.contract, input);
682
+ case "provenance-report":
683
+ return validateProvenance(input.contract, input.output);
684
+ case "delegation-plan": {
685
+ const plan = parseDelegationPlanResult(input.output);
686
+ return plan === null ? failure(
687
+ input.contract,
688
+ "fail",
689
+ "delegation-plan must carry tasks with id, agent, description, depends_on, writes, and optional mode"
690
+ ) : success(input.contract, "unmeasured", plan, { delegationPlan: plan });
691
+ }
692
+ case "oracle-report":
693
+ return validateOracle(input.contract, input.output);
694
+ case "external-delegation":
695
+ return success(input.contract, "unmeasured", { external: true });
696
+ case "artifact-report":
697
+ return success(input.contract, "unmeasured", { artifact: true });
698
+ case "context-handbook":
699
+ return validateContextHandbook(input.contract, input.output);
700
+ case "code-report":
701
+ return validateCodeReport(input.contract, input.output);
702
+ }
703
+ }
704
+ function validateRecipeResult(input) {
705
+ if (input.contract === null) return null;
706
+ if (!input.reachedTerminalResult) {
707
+ return {
708
+ applicable: false,
709
+ fact: {
710
+ sourceId: resultContractSourceId(input.contract),
711
+ validatorDigest: digest({ contract: input.contract, reached: false }),
712
+ conformance: "not-reached",
713
+ quality: "unmeasured"
714
+ }
715
+ };
716
+ }
717
+ const validation = validateResultContract({
718
+ contract: input.contract,
719
+ output: input.output,
720
+ cwd: input.cwd,
721
+ networkAllowed: input.networkAllowed,
722
+ filesystem: input.filesystem,
723
+ ...input.observedRunEffects !== void 0 ? { observedRunEffects: input.observedRunEffects } : {}
724
+ });
725
+ return {
726
+ applicable: true,
727
+ validation,
728
+ fact: {
729
+ sourceId: validation.sourceId,
730
+ validatorDigest: validation.validatorDigest,
731
+ conformance: validation.conformance,
732
+ quality: validation.quality
733
+ }
734
+ };
735
+ }
736
+ var RESULT_CONTRACT_REPAIR_LIMIT = 2;
737
+ var RESULT_CONTRACT_ANCHOR_LIMIT = 12;
738
+ function resultContractShape(contract) {
739
+ switch (contract.kind) {
740
+ case "architect-plan":
741
+ return `a plan artifact written to ${contract.path}, then optionally {"commitMessage":"...","summary":"..."} describing it`;
742
+ case "scout-report":
743
+ return '{"findings":[{"claim":"what you observed","path":"src/file.ts","line":1}],"needsSplit":false,"proposedSubtasks":[]} or {"findings":[],"needsSplit":true,"proposedSubtasks":[{"id":"inspect","task":"Inspect the boundary","dependencies":[],"expectedResultContract":"scout-report","requestedAuthority":"read-only"}]} or, if you cannot produce a citation you are sure of, at least {"findings":[{"claim":"what you observed"}]}, which is accepted as an ungrounded lead rather than losing the run';
744
+ case "verifier-report":
745
+ return '{"verdict":"pass","checks":[{"name":"npm run typecheck","passed":true,"evidence":"exit 0"}]}';
746
+ case "council-report":
747
+ return '{"members":[{"label":"alpha","runId":"run-1","round":1,"answer":"..."}],"synthesis":{"kind":"none"}}';
748
+ case "council-ballot":
749
+ return COUNCIL_BALLOT_SHAPE;
750
+ case "debugger-report":
751
+ return '{"diagnosis":"...","reproduction":"reproduced","evidence":["..."]}';
752
+ case "research-report":
753
+ return '{"source":"local","findings":[{"claim":"...","evidence":"..."}]}';
754
+ case "mutation-report":
755
+ return '{"mutatedPaths":["src/file.ts"],"validations":[{"name":"npm test","passed":true,"evidence":"exit 0"}],"commitMessage":"optional: the commit message for this change","summary":"optional: one line"}';
756
+ case "provenance-report":
757
+ return '{"confirmedFacts":["..."],"missingEvidence":["..."],"nextInspections":["..."]}';
758
+ case "delegation-plan":
759
+ return '{"tasks":[{"id":"build","agent":"coder","description":"Implement the change","depends_on":[],"writes":["src"],"mode":"parallel"}]}';
760
+ case "oracle-report":
761
+ return '{"verdict":"one line","challenge":"the strongest objection you can mount","changesMyMind":"the evidence that would reverse the verdict","citedDecisions":["decision key or task id you relied on"]}';
762
+ case "external-delegation":
763
+ return "any final text";
764
+ case "artifact-report":
765
+ return "any final text; the artifact you wrote at the location the task named is the result";
766
+ case "context-handbook":
767
+ return '{"projectName":"string","identity":"one sentence","conventions":[],"invariants":[],"sections":[{"title":"Architecture","body":"markdown that cites `real/path.ts` tokens"}]}';
768
+ case "code-report":
769
+ return '{"passed":false,"exitCode":1,"checks":[{"name":"test","passed":false,"evidence":"exit 1"}],"artifactPaths":["/path/command.log"],"outputExcerpt":"..."}';
770
+ }
771
+ }
772
+ function resultContractRepairMessage(input) {
773
+ const last = input.attempt >= RESULT_CONTRACT_REPAIR_LIMIT;
774
+ const lines = [
775
+ last ? "FINAL RESULT REQUIRED IN THIS RESPONSE. Your previous response still did not satisfy this run's result contract." : "Your previous response did not satisfy this run's result contract.",
776
+ `Validator reason: ${input.reason}`,
777
+ input.toolsAvailable === true ? "You may use the admitted tools to repair this validator failure, then emit the required terminal result." : "Tool use is over. Answer from the evidence you already gathered.",
778
+ `Emit exactly this shape and nothing else: ${resultContractShape(input.contract)}`,
779
+ "Do not add prose, code fences, or commentary around it. Do not describe work you intend to do next."
780
+ ];
781
+ if (input.anchors.length > 0) {
782
+ lines.push(
783
+ "",
784
+ "Locations you read successfully in this run (use these exact path:line values):",
785
+ ...input.anchors.slice(-RESULT_CONTRACT_ANCHOR_LIMIT).map((anchor) => `- ${anchor}`)
786
+ );
787
+ }
788
+ return lines.join("\n");
789
+ }
790
+ var RESULT_CONTRACT_REPAIR_TOOL = "result_contract";
791
+ function resultContractRepairMessages(input, origin) {
792
+ const id = `clio-result-contract-repair-${input.attempt}`;
793
+ const timestamp = Date.now();
794
+ return [
795
+ {
796
+ role: "assistant",
797
+ content: [{ type: "toolCall", id, name: RESULT_CONTRACT_REPAIR_TOOL, arguments: {} }],
798
+ stopReason: "toolUse",
799
+ usage: {
800
+ input: 0,
801
+ output: 0,
802
+ cacheRead: 0,
803
+ cacheWrite: 0,
804
+ totalTokens: 0,
805
+ cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total: 0 }
806
+ },
807
+ ...origin,
808
+ timestamp
809
+ },
810
+ {
811
+ role: "toolResult",
812
+ toolCallId: id,
813
+ toolName: RESULT_CONTRACT_REPAIR_TOOL,
814
+ content: [{ type: "text", text: resultContractRepairMessage(input) }],
815
+ isError: true,
816
+ timestamp
817
+ }
818
+ ];
819
+ }
820
+ var RECIPE_DECLARABLE_KINDS = [
821
+ "scout-report",
822
+ "verifier-report",
823
+ "council-report",
824
+ "debugger-report",
825
+ "research-report",
826
+ "mutation-report",
827
+ "provenance-report",
828
+ "oracle-report",
829
+ "external-delegation",
830
+ "artifact-report",
831
+ "context-handbook",
832
+ "delegation-plan"
833
+ ];
834
+ var COORDINATOR_AUTHORED_KINDS = ["council-ballot"];
835
+ function parseContract(value, sourcePath, kinds) {
836
+ if (value === null || typeof value !== "object" || Array.isArray(value)) {
837
+ throw new Error(`agent recipe: ${sourcePath}: resultContract must be an object`);
838
+ }
839
+ const record = value;
840
+ if (typeof record.kind !== "string") throw new Error(`agent recipe: ${sourcePath}: resultContract.kind is required`);
841
+ const keys = Object.keys(record);
842
+ const only = (...allowed) => keys.every((key) => allowed.includes(key));
843
+ if (record.kind === "architect-plan") {
844
+ if (!only("kind", "path") || !string(record.path)) {
845
+ throw new Error(`agent recipe: ${sourcePath}: architect-plan requires only non-empty path`);
846
+ }
847
+ if (path.isAbsolute(record.path) || record.path.split(/[\\/]/u).includes("..")) {
848
+ throw new Error(`agent recipe: ${sourcePath}: architect-plan path must be workspace-relative`);
849
+ }
850
+ return { kind: "architect-plan", path: record.path };
851
+ }
852
+ if (!kinds.includes(record.kind) || !only("kind")) {
853
+ throw new Error(`agent recipe: ${sourcePath}: resultContract.kind is unsupported or has unknown keys`);
854
+ }
855
+ return { kind: record.kind };
856
+ }
857
+ function parseResultContract(value, sourcePath) {
858
+ return parseContract(value, sourcePath, RECIPE_DECLARABLE_KINDS);
859
+ }
860
+ function parseWorkerResultContract(value, sourcePath) {
861
+ return parseContract(value, sourcePath, [...RECIPE_DECLARABLE_KINDS, ...COORDINATOR_AUTHORED_KINDS]);
862
+ }
863
+
864
+ // src/core/path-boundary.ts
865
+ init_esm_shims();
866
+ import path2 from "node:path";
867
+ var PATH_BOUNDARY_MAX_ENTRIES = 32;
868
+ var PathBoundaryError = class extends Error {
869
+ code;
870
+ constructor(code, message) {
871
+ super(message);
872
+ this.name = "PathBoundaryError";
873
+ this.code = code;
874
+ }
875
+ };
876
+ var GLOB_CHARACTERS = /[*?[\]{}]/u;
877
+ function normalizePathBoundaryEntry(entry) {
878
+ const raw = entry.trim();
879
+ if (raw.length === 0) throw new PathBoundaryError("empty", "write boundary: entry must be a non-empty path");
880
+ if (raw.includes("\\")) {
881
+ throw new PathBoundaryError("separator", `write boundary: entry '${entry}' must use '/' separators`);
882
+ }
883
+ if (GLOB_CHARACTERS.test(raw)) {
884
+ throw new PathBoundaryError("glob", `write boundary: entry '${entry}' looks like a glob, which v1 does not support`);
885
+ }
886
+ if (raw.startsWith("/") || /^[A-Za-z]:/u.test(raw)) {
887
+ throw new PathBoundaryError("absolute", `write boundary: entry '${entry}' must be repository-relative, not absolute`);
888
+ }
889
+ const subtree = raw.endsWith("/");
890
+ const segments = raw.split("/").filter((segment) => segment.length > 0);
891
+ if (segments.length === 0) {
892
+ throw new PathBoundaryError("empty", `write boundary: entry '${entry}' must name a path inside the repository`);
893
+ }
894
+ for (const segment of segments) {
895
+ if (segment === "..") {
896
+ throw new PathBoundaryError("parent", `write boundary: entry '${entry}' must not contain '..'`);
897
+ }
898
+ if (segment === ".") {
899
+ throw new PathBoundaryError("dot", `write boundary: entry '${entry}' must not contain '.' segments`);
900
+ }
901
+ }
902
+ const joined = segments.join("/");
903
+ return subtree ? `${joined}/` : joined;
904
+ }
905
+ function normalizePathBoundary(entries) {
906
+ if (entries.length > PATH_BOUNDARY_MAX_ENTRIES) {
907
+ throw new Error(`write boundary: at most ${PATH_BOUNDARY_MAX_ENTRIES} entries may be declared`);
908
+ }
909
+ return [...new Set(entries.map(normalizePathBoundaryEntry))].sort();
910
+ }
911
+ function toPosixBoundaryPath(value) {
912
+ return value.split("\\").join("/");
913
+ }
914
+ function isDirectoryPathBoundary(entry) {
915
+ return toPosixBoundaryPath(entry).endsWith("/");
916
+ }
917
+ function asDirectoryPathBoundary(entry) {
918
+ const normalized = toPosixBoundaryPath(entry);
919
+ return normalized.endsWith("/") ? normalized : `${normalized}/`;
920
+ }
921
+ function resolvePathBoundary(cwd, entry) {
922
+ const directory = isDirectoryPathBoundary(entry);
923
+ const withoutMarker = directory ? entry.slice(0, -1) : entry;
924
+ const resolved = toPosixBoundaryPath(path2.resolve(cwd, withoutMarker));
925
+ return directory ? asDirectoryPathBoundary(resolved) : resolved;
926
+ }
927
+ function pathBoundaryEntryCovers(outer, inner) {
928
+ const normalizedOuter = toPosixBoundaryPath(outer);
929
+ const normalizedInner = toPosixBoundaryPath(inner);
930
+ return normalizedOuter.endsWith("/") ? normalizedInner.startsWith(normalizedOuter) : !normalizedInner.endsWith("/") && normalizedInner === normalizedOuter;
931
+ }
932
+ function pathBoundaryCovers(boundary, candidate) {
933
+ return boundary.some((entry) => pathBoundaryEntryCovers(entry, candidate));
934
+ }
935
+
936
+ export {
937
+ parseJsonObjectPayload,
938
+ COUNCIL_BALLOT_VERDICT_MAX_BYTES,
939
+ COUNCIL_BALLOT_SHAPE,
940
+ parseCouncilReport,
941
+ resultContractSourceId,
942
+ parseVerifierResult,
943
+ parseOracleResult,
944
+ resultContractAuthorship,
945
+ parseScoutResult,
946
+ validateResultContract,
947
+ validateRecipeResult,
948
+ RESULT_CONTRACT_REPAIR_LIMIT,
949
+ resultContractRepairMessages,
950
+ parseResultContract,
951
+ parseWorkerResultContract,
952
+ PATH_BOUNDARY_MAX_ENTRIES,
953
+ PathBoundaryError,
954
+ normalizePathBoundaryEntry,
955
+ normalizePathBoundary,
956
+ asDirectoryPathBoundary,
957
+ resolvePathBoundary,
958
+ pathBoundaryEntryCovers,
959
+ pathBoundaryCovers
960
+ };
961
+ //# sourceMappingURL=chunk-TTHACPOM.js.map