@agimon-ai/po-cloudflare 0.0.2-alpha.7 → 0.0.2-alpha.71

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 (355) hide show
  1. package/README.md +64 -241
  2. package/container/Dockerfile +27 -0
  3. package/dist/{BrowserWebSocketTransport-C2SC2VeJ.js → BrowserWebSocketTransport-B4heNdrp.js} +1 -1
  4. package/dist/{NodeWebSocketTransport-CKilJesa.js → NodeWebSocketTransport-BCiOXUEz.js} +2 -2
  5. package/dist/{abort-signals-Bkmp_euQ.js → abort-signals-C8CttjsR.js} +1 -1
  6. package/dist/agent-CEqvgRl6.js +3878 -0
  7. package/dist/{anthropic-messages-CkYm8M3V.js → anthropic-messages-DCLLLNuM.js} +292 -64
  8. package/dist/apiContracts-DaOpUHnu.js +1719 -0
  9. package/dist/{approval-CQ3ZuoTy.js → approval-DXPV7Vm5.js} +15 -2
  10. package/dist/{approvalPrompt-CylV3C84.js → approvalPrompt-CBaxjb_g.js} +1 -2
  11. package/dist/approvalSession-C9bg7tPo.js +132 -0
  12. package/dist/artifactFiles-5KwXIxYf.js +1 -0
  13. package/dist/artifactsApi-bg2wMYWg.js +200 -0
  14. package/dist/assets/assets/{CodeEditorView-D4q94XH-.js → CodeEditorView-CfrVwzvL.js} +2 -2
  15. package/dist/assets/assets/{abnfDiagram-WEYOIA3C-C85p4OYZ.js → abnfDiagram-WEYOIA3C-B80H4Cm4.js} +2 -2
  16. package/dist/assets/assets/{architecture-WOLXFQ4H-Bt_NOdwE.js → architecture-WOLXFQ4H-Dr4hXaql.js} +1 -1
  17. package/dist/assets/assets/{architectureDiagram-ZHVYKT53-DzH1GKMm.js → architectureDiagram-ZHVYKT53-DWyt7oXu.js} +2 -2
  18. package/dist/assets/assets/{blockDiagram-RJAE7QA3-BmWU34j3.js → blockDiagram-RJAE7QA3-OxNTLdmi.js} +2 -2
  19. package/dist/assets/assets/{c4Diagram-XDPPPE54-BpGOdOuo.js → c4Diagram-XDPPPE54-B4YtcH0s.js} +2 -2
  20. package/dist/assets/assets/channel-bXj00dGj.js +2 -0
  21. package/dist/assets/assets/{chunk-2E7WHVMD-AycP1cXU.js → chunk-2E7WHVMD-CD6FFMOX.js} +2 -2
  22. package/dist/assets/assets/{chunk-4EMNKR2T-DX-DrZzc.js → chunk-4EMNKR2T-CEIoX5oo.js} +2 -2
  23. package/dist/assets/assets/{chunk-55XCU76K-BdwnLWzI.js → chunk-55XCU76K-CD3t0IJi.js} +2 -2
  24. package/dist/assets/assets/{chunk-7S6XSTFO-D-RBAwAn.js → chunk-7S6XSTFO-Cyt75UCF.js} +2 -2
  25. package/dist/assets/assets/{chunk-AQDTSKZB-CCxNNhKs.js → chunk-AQDTSKZB-DRtqYBj9.js} +2 -2
  26. package/dist/assets/assets/{chunk-DSNLSHJZ-D2hGwWm1.js → chunk-DSNLSHJZ-C8Fx2F8s.js} +2 -2
  27. package/dist/assets/assets/{chunk-HAGFOTED-BPi-cqGh.js → chunk-HAGFOTED-wOLWRRnd.js} +2 -2
  28. package/dist/assets/assets/{chunk-HNE4Q36P-D-r1ChHT.js → chunk-HNE4Q36P-CurJg4Hf.js} +2 -2
  29. package/dist/assets/assets/{chunk-NQOKRVIF-RgmZCAdn.js → chunk-NQOKRVIF-Dzcc5nOG.js} +2 -2
  30. package/dist/assets/assets/{chunk-UHW7PFBP-B-Hul-rZ.js → chunk-UHW7PFBP-B_ULFf2h.js} +2 -2
  31. package/dist/assets/assets/{chunk-VQ5W62QI-D1zlXCt8.js → chunk-VQ5W62QI-DH0VY4_p.js} +2 -2
  32. package/dist/assets/assets/{chunk-WQQL4CDK-CtjIbVJn.js → chunk-WQQL4CDK-DNxfLyXM.js} +2 -2
  33. package/dist/assets/assets/chunk-XXDRQBXY-B2bMWgN9.js +2 -0
  34. package/dist/assets/assets/{chunk-YZO67HFG-BQOgXG99.js → chunk-YZO67HFG-COuMUh9U.js} +2 -2
  35. package/dist/assets/assets/{chunk-ZAUX2LTX-CsDDxmqv.js → chunk-ZAUX2LTX-BJrCnubF.js} +2 -2
  36. package/dist/assets/assets/{chunk-ZCHMQSOR-deyEYMjx.js → chunk-ZCHMQSOR-D1lFKPtk.js} +2 -2
  37. package/dist/assets/assets/{classDiagram-v2-4MYWR3UA-DVJHeFlq.js → classDiagram-v2-4MYWR3UA-DfZIbyVL.js} +2 -2
  38. package/dist/assets/assets/{cose-bilkent-JH36ORCC-ipcN28Fw.js → cose-bilkent-JH36ORCC-CpGhv9_S.js} +2 -2
  39. package/dist/assets/assets/{cynefin-EF2NZ3EQ-s9ZkPF55.js → cynefin-EF2NZ3EQ-Cxdc6nQl.js} +1 -1
  40. package/dist/assets/assets/{cynefinDiagram-WF24UDRP-Ksr2qjsS.js → cynefinDiagram-WF24UDRP-qoj0w3lp.js} +2 -2
  41. package/dist/assets/assets/{dagre-NK4GIZVX-2_Wl-XEW.js → dagre-NK4GIZVX-DL6QbNDS.js} +2 -2
  42. package/dist/assets/assets/{diagram-CBK3MWTC-C7PeyT7l.js → diagram-CBK3MWTC-CJB3jq1_.js} +2 -2
  43. package/dist/assets/assets/{diagram-I5XIIV2D-DPYzeKdj.js → diagram-I5XIIV2D-4cPOxCxF.js} +2 -2
  44. package/dist/assets/assets/{diagram-ODIL2UCW-DHw1cAmn.js → diagram-ODIL2UCW-BG3-jAxE.js} +2 -2
  45. package/dist/assets/assets/{diagram-PFBEJUXE-C2wA8i-1.js → diagram-PFBEJUXE-Bx8dFaXj.js} +2 -2
  46. package/dist/assets/assets/{diagram-RJA3I4VV-tM3moCIs.js → diagram-RJA3I4VV-CUUHND91.js} +2 -2
  47. package/dist/assets/assets/{diagram-TYUNFSNR-CInyJxF7.js → diagram-TYUNFSNR-BDMoN-kr.js} +2 -2
  48. package/dist/assets/assets/{dist-BDqjNLTC.js → dist-5AxNm-uy.js} +2 -2
  49. package/dist/assets/assets/{dist-hpZIQBl4.js → dist-9_Rmyj2I.js} +2 -2
  50. package/dist/assets/assets/{dist-DSLprmec.js → dist-BE3CLKv4.js} +2 -2
  51. package/dist/assets/assets/{dist-BASEd5LC.js → dist-BfNCu-7x.js} +2 -2
  52. package/dist/assets/assets/{dist-BuYBvf4F.js → dist-BjI0b36Z.js} +2 -2
  53. package/dist/assets/assets/{dist-DUS0U_ge.js → dist-CM7b5P9a.js} +2 -2
  54. package/dist/assets/assets/{dist-CeOy6PjJ.js → dist-Ccxb9U1G.js} +2 -2
  55. package/dist/assets/assets/{dist-ChXoRSS6.js → dist-CjCWP21A.js} +2 -2
  56. package/dist/assets/assets/{dist-07dRlnp1.js → dist-DSTAktnR.js} +2 -2
  57. package/dist/assets/assets/{ebnfDiagram-V4P3TTPT-4nZgqaSt.js → ebnfDiagram-V4P3TTPT-BivOMXZb.js} +2 -2
  58. package/dist/assets/assets/{elk-QONTBCTQ-nFh54c1Q.js → elk-QONTBCTQ-CrJ1Qpy_.js} +2 -2
  59. package/dist/assets/assets/{erDiagram-KYQIGQAA-CIQ0_IgZ.js → erDiagram-KYQIGQAA-w9Bqp4sV.js} +2 -2
  60. package/dist/assets/assets/{eventmodeling-K75KTNOO-Cw4BlbYP.js → eventmodeling-K75KTNOO-CBjFM3kV.js} +1 -1
  61. package/dist/assets/assets/flowDiagram-IUGLLWBU-C6Fnfgm0.js +1 -0
  62. package/dist/assets/assets/{ganttDiagram-R7GPNTJY-C97qoUpX.js → ganttDiagram-R7GPNTJY-CsWtGaqD.js} +2 -2
  63. package/dist/assets/assets/{gitGraph-VSP46ZUC-B8HWVkEX.js → gitGraph-VSP46ZUC-DsBSV9_h.js} +1 -1
  64. package/dist/assets/assets/{gitGraphDiagram-PDYL7XHY-B4Js56_8.js → gitGraphDiagram-PDYL7XHY-D5GxuYHW.js} +2 -2
  65. package/dist/assets/assets/index-CNDyKUDF.css +1 -0
  66. package/dist/assets/assets/index-DWDYnZsq.js +256 -0
  67. package/dist/assets/assets/{info-OHQRW6UA-A4qythhA.js → info-OHQRW6UA-C7x5dSJu.js} +1 -1
  68. package/dist/assets/assets/{infoDiagram-MVDRKAX5-BSNwG9yI.js → infoDiagram-MVDRKAX5-CwpI-uAa.js} +2 -2
  69. package/dist/assets/assets/{ishikawaDiagram-HPEHV2GE-D4gU-3RA.js → ishikawaDiagram-HPEHV2GE-DAa7J5G6.js} +2 -2
  70. package/dist/assets/assets/{journeyDiagram-BOSHW7O7-CxxDrw7o.js → journeyDiagram-BOSHW7O7-BmiZnxE_.js} +2 -2
  71. package/dist/assets/assets/{kanban-definition-FNSA4HC5-DUxQv3v0.js → kanban-definition-FNSA4HC5-DUR_mA3L.js} +2 -2
  72. package/dist/assets/assets/{line-BKODXUmk.js → line-DHY49wSg.js} +2 -2
  73. package/dist/assets/assets/{linear-Cm5uyUun.js → linear-pTo-a9xT.js} +2 -2
  74. package/dist/assets/assets/{mermaid-parser.core-CYst2kCg.js → mermaid-parser.core-DMg3hN3T.js} +4 -4
  75. package/dist/assets/assets/{mermaid.core-B4Qq8SMa.js → mermaid.core-DKtPCltA.js} +5 -5
  76. package/dist/assets/assets/{mindmap-definition-6OY57UG3-CZFvUTIM.js → mindmap-definition-6OY57UG3-DwTkFbnV.js} +2 -2
  77. package/dist/assets/assets/{packet-JDAUHWVQ-DZMlaiuy.js → packet-JDAUHWVQ-Tu9TrQ1x.js} +1 -1
  78. package/dist/assets/assets/{pegDiagram-ECIUJNBX-BjM668dT.js → pegDiagram-ECIUJNBX-B7My4tsz.js} +2 -2
  79. package/dist/assets/assets/{pie-XZMESJXO-CmpJ6vb8.js → pie-XZMESJXO-QPQm5Gdx.js} +1 -1
  80. package/dist/assets/assets/{pieDiagram-GNMPY74T-BCA9DCDe.js → pieDiagram-GNMPY74T-Bv-zAD_z.js} +2 -2
  81. package/dist/assets/assets/{quadrantDiagram-D57K4MC3-CUnpC-Rl.js → quadrantDiagram-D57K4MC3-HTjoGQPd.js} +2 -2
  82. package/dist/assets/assets/{radar-ABXABTNO-C9x42-KP.js → radar-ABXABTNO-LDBlEoFo.js} +1 -1
  83. package/dist/assets/assets/{railroad-I3PHUGI6-CLvHKrsC.js → railroad-I3PHUGI6-Dy3_ymgZ.js} +1 -1
  84. package/dist/assets/assets/{railroad-abnf-LNEFI6M7-B0LGF3gx.js → railroad-abnf-LNEFI6M7-QLVvYs6e.js} +1 -1
  85. package/dist/assets/assets/{railroad-ebnf-DWYD2UWJ-SKnYapAj.js → railroad-ebnf-DWYD2UWJ-CFRlv9a8.js} +1 -1
  86. package/dist/assets/assets/{railroad-peg-JR7BVNR7-wsUpPloN.js → railroad-peg-JR7BVNR7-BOlq3d9c.js} +1 -1
  87. package/dist/assets/assets/{railroadDiagram-Y72NRBL7-BYJtosKO.js → railroadDiagram-Y72NRBL7-Chg32HoU.js} +2 -2
  88. package/dist/assets/assets/{requirementDiagram-EQYSW5RA-YYdoWMnl.js → requirementDiagram-EQYSW5RA-VenIs_eg.js} +2 -2
  89. package/dist/assets/assets/{sankeyDiagram-SY24JHO5-DtZyCTdM.js → sankeyDiagram-SY24JHO5-BdByqMKF.js} +2 -2
  90. package/dist/assets/assets/{sequenceDiagram-BLEHNHQU-BPE8f413.js → sequenceDiagram-BLEHNHQU-D3Do4GJE.js} +2 -2
  91. package/dist/assets/assets/{src-BNTOLq2G.js → src-DmfN-DA-.js} +2 -2
  92. package/dist/assets/assets/{stateDiagram-v2-A6IESKWZ-9f8Ow4Fl.js → stateDiagram-v2-A6IESKWZ-CZkRbPlf.js} +2 -2
  93. package/dist/assets/assets/{swimlanes-B3ENRKFQ-DdAEbxGp.js → swimlanes-B3ENRKFQ-DRTdF9AF.js} +2 -2
  94. package/dist/assets/assets/swimlanesDiagram-AYQRV4AK-BYr_4JUb.js +9 -0
  95. package/dist/assets/assets/{timeline-definition-JXYKGLGB-DJNGd2mU.js → timeline-definition-JXYKGLGB-BVcuws_M.js} +2 -2
  96. package/dist/assets/assets/{treeView-D4JQ5SDB-BHONoCCw.js → treeView-D4JQ5SDB-BLtOJGqO.js} +1 -1
  97. package/dist/assets/assets/{treemap-SAJKECNS-pOaYkxq7.js → treemap-SAJKECNS-Dn3BWJ4v.js} +1 -1
  98. package/dist/assets/assets/{usecaseDiagram-WPOLBNNX-C3eDYL9v.js → usecaseDiagram-WPOLBNNX-CBExIKDY.js} +2 -2
  99. package/dist/assets/assets/{vennDiagram-Q3Y3IDCW-CJi1xfsR.js → vennDiagram-Q3Y3IDCW-C6FIx2L4.js} +2 -2
  100. package/dist/assets/assets/{wardley-7MLQ67FV-CEy4w7Ir.js → wardley-7MLQ67FV-Cjj2xSBp.js} +1 -1
  101. package/dist/assets/assets/{wardleyDiagram-IVAIDKWA-DfdLMMpN.js → wardleyDiagram-IVAIDKWA-sQPCBCFK.js} +2 -2
  102. package/dist/assets/assets/{webpack-v8XGbQTa.js → webpack-DDCA0aDL.js} +2 -2
  103. package/dist/assets/assets/{xychartDiagram-4URNHDU4-Aw-Ix4uC.js → xychartDiagram-4URNHDU4-bZ4rifSw.js} +2 -2
  104. package/dist/assets/bundle-asset-policy.json +1 -1
  105. package/dist/assets/index.html +8 -2
  106. package/dist/assets/mascot/cta-provider.png +0 -0
  107. package/dist/assets/mascot/cta-sign-in.png +0 -0
  108. package/dist/assets/plugins/assets/base-GzIOAd-t.css +2 -0
  109. package/dist/assets/plugins/assets/browserCaptureWorklet-Droj0fW0-Droj0fW0.js +13 -0
  110. package/dist/assets/plugins/assets/day-bottom-left-5um-x02r-5um-x02r.webp +0 -0
  111. package/dist/assets/plugins/assets/day-grain-CvEuNhlI-CvEuNhlI.webp +0 -0
  112. package/dist/assets/plugins/assets/day-right-C9W-XtjV-C9W-XtjV.webp +0 -0
  113. package/dist/assets/plugins/assets/day-top-left-B544Eq9J-B544Eq9J.webp +0 -0
  114. package/dist/assets/plugins/assets/night-bottom-left-N03ST5Uz-N03ST5Uz.webp +0 -0
  115. package/dist/assets/plugins/assets/night-grain-BY9q-tNN-BY9q-tNN.webp +0 -0
  116. package/dist/assets/plugins/assets/night-right-C6Denrqj-C6Denrqj.webp +0 -0
  117. package/dist/assets/plugins/assets/night-top-left-KOou6UxY-KOou6UxY.webp +0 -0
  118. package/dist/assets/plugins/assets/sileroVadWorker-D894njUe-DjN_BMWf.mjs +110 -0
  119. package/dist/assets/plugins/assets/silero_vad_v6.2.1-SjbCxFXk-SjbCxFXk.onnx +0 -0
  120. package/dist/assets/plugins/chunks/po-web-runtime-D8FIos2q.js +1 -0
  121. package/dist/assets/plugins/chunks/schemas-DVQ8BvvP.js +55 -0
  122. package/dist/assets/plugins/compositions.json +1 -1
  123. package/dist/assets/plugins/slots/approval.09e72f36-DxS_uibk.js +2 -0
  124. package/dist/assets/plugins/slots/artifacts.50b639bb-Cp37TAkd.js +1 -0
  125. package/dist/assets/plugins/slots/author.ea449ace-Ds9Y-tjN.js +93 -0
  126. package/dist/assets/plugins/slots/autocompact.6f428144-CDZpN7I7.js +1 -0
  127. package/dist/assets/plugins/slots/backdrop-bamboo.6e4c928d-qbifuMc6.js +1 -0
  128. package/dist/assets/plugins/slots/browse.fa1f1a50-CVYvo1M5.js +1 -0
  129. package/dist/assets/plugins/slots/builtin-tools.75108f21-Cq1ljoL-.js +7 -0
  130. package/dist/assets/plugins/slots/calendar.d8b70190-BBjpOs1v.js +2 -0
  131. package/dist/assets/plugins/slots/codemode.c58fb583-DOR6OR7R.js +11 -0
  132. package/dist/assets/plugins/slots/domain.753f9f92-CJrXxig9.js +1 -0
  133. package/dist/assets/plugins/slots/edit.804fec90-BFF7_xN9.js +7 -0
  134. package/dist/assets/plugins/slots/files.66ffc636-CzOlZrRm.js +2 -0
  135. package/dist/assets/plugins/slots/goal.45dffa01-BtQBp3sw.js +1 -0
  136. package/dist/assets/plugins/slots/grep.98262cff-9bUDfjyT.js +1 -0
  137. package/dist/assets/plugins/slots/help.5fbd20f7-B4-y6gYK.js +3 -0
  138. package/dist/assets/plugins/slots/log.cb964209-BRPa3cVs.js +4 -0
  139. package/dist/assets/plugins/slots/mcp.82cc1ff5-CFtzPkPC.js +55 -0
  140. package/dist/assets/plugins/slots/plan.3852ba52-CH59Ff49.js +3 -0
  141. package/dist/assets/plugins/slots/profile.ab16dcec-0e9fWWyE.js +1 -0
  142. package/dist/assets/plugins/slots/prompts.ae48c07a-BTqYnBX5.js +38 -0
  143. package/dist/assets/plugins/slots/read.4560591a-C7fMXDEH.js +1 -0
  144. package/dist/assets/plugins/slots/runner.6e494d59-CqrpqhW9.js +9 -0
  145. package/dist/assets/plugins/slots/scaffold.d87a6ee0-9qY5gkYW.js +1 -0
  146. package/dist/assets/plugins/slots/session-mcp.2be84084-Cf0cqopp.js +2 -0
  147. package/dist/assets/plugins/slots/sessions.6f47cb4c-B1_eqPJQ.js +1 -0
  148. package/dist/assets/plugins/slots/skill.62a0a1b3-D-SKX8iw.js +4 -0
  149. package/dist/assets/plugins/slots/space.65a27e5a-fbLHc-DX.js +1 -0
  150. package/dist/assets/plugins/slots/subagents.8bb9992c-Cm_YMEnn.js +7 -0
  151. package/dist/assets/plugins/slots/template-advanced.59f3f98a-L0WOM4JT.js +1 -0
  152. package/dist/assets/plugins/slots/template-desktop.0f0b8491-By9BZlaL.js +7 -0
  153. package/dist/assets/plugins/slots/template-elegant.0e3b0acf-El05x7HK.js +1 -0
  154. package/dist/assets/plugins/slots/vault.3cbfcdc3-DpU_65Wy.js +1 -0
  155. package/dist/assets/plugins/slots/voice.a952113d-CvcuL__m.js +1 -0
  156. package/dist/assets/plugins/slots/web-search.65013836-NVh9fdvE.js +1 -0
  157. package/dist/assets/plugins/slots/workflows.cbc5c5c0-OLKSY9PE.js +16 -0
  158. package/dist/assets/pwa/pwa.js +12 -12
  159. package/dist/assets/pwa/sw.js +58 -4
  160. package/dist/{atomicJson-wczZBXQP.js → atomicJson-XYtxz032.js} +2 -3
  161. package/dist/{azure-openai-config-DHMgdIa-.js → azure-openai-config-S-quxzTC.js} +2 -2
  162. package/dist/{azure-openai-responses-CTgRdQ4m.js → azure-openai-responses-DdpV5zh7.js} +13 -13
  163. package/dist/backgroundWork-Bv0ib_lY.js +49 -0
  164. package/dist/{layeredConfig-xmTHGrw8.js → browser-DwY5dXHX.js} +21 -983
  165. package/dist/{browser-EJ5_ffnN.js → browser-IsHIcvFg.js} +1 -1
  166. package/dist/browser-ks_k-6KA.js +36 -0
  167. package/dist/calendarSetup-CI3AACVo.js +3892 -0
  168. package/dist/childProcess-Cv8rJuUf.js +32 -0
  169. package/dist/childSession-BrDCrNtL.js +25 -0
  170. package/dist/{classifier-shared-jXm-plIK.js → classifier-shared-DFprgrML.js} +5 -5
  171. package/dist/{cloudflare-workers-ai-system-one-B0wH6HU5.js → cloudflare-workers-ai-system-one-B0MD19yZ.js} +3 -3
  172. package/dist/{codemode-CFVDmyGm.js → codemode-LpcMFMYM.js} +1 -1
  173. package/dist/coerce-DM9YrILC.js +13 -0
  174. package/dist/config-DeWkdjj7.js +1372 -0
  175. package/dist/contextContributions-C1bsEJef.js +13 -0
  176. package/dist/contracts-CW8o6Xyi.js +19 -0
  177. package/dist/contracts-WRa9e98H.js +40 -0
  178. package/dist/cordisHost-_-jtkneB.js +25 -0
  179. package/dist/delegation-B2rBgv8A.js +100 -0
  180. package/dist/{diagnostics-DPTP-yrt.js → diagnostics-BY5LXbHJ.js} +2 -2
  181. package/dist/{dist-BVBi6VMV.js → dist-B2ArMqge.js} +1 -1
  182. package/dist/{server-Cg07O2W6.js → dist-C6IqjC-m.js} +1 -546
  183. package/dist/{dist-PDDFdqDX.js → dist-CDz5dYMj.js} +1 -1
  184. package/dist/{dist-Dvx5mlIR.js → dist-kgi2Ix1y.js} +16 -3
  185. package/dist/{emscripten-module.cloudflare-D4Bc9Ykz.js → emscripten-module.cloudflare-B4fhfquU.js} +1 -1
  186. package/dist/{env-api-keys-CAnjjnsR.js → env-api-keys-BgCPpU9t.js} +1 -1
  187. package/dist/{error-body-DQZRsyL5.js → error-body-CeumezyR.js} +26 -4
  188. package/dist/esm-BKJy3O9-.js +1553 -0
  189. package/dist/{remoteMcp-DqE2xFWS.js → exports-BEEgtkya.js} +1588 -714
  190. package/dist/{exports-LjvSY7Y6.js → exports-CBp_9dVk.js} +47 -28
  191. package/dist/exports-CRjRvvX0.js +34 -0
  192. package/dist/exports-Cg0wxflf.js +1 -0
  193. package/dist/exports-Ct56PRB9.js +46 -0
  194. package/dist/extensionFile-B940JOEn.js +121 -0
  195. package/dist/{factory-Cs8iaUtc.js → factory-BU0cZY0I.js} +1 -1
  196. package/dist/{github-copilot-headers-DpQQAh-s.js → github-copilot-headers-Cq9pnpl2.js} +1 -1
  197. package/dist/{google-generative-ai-BTTOo5RQ.js → google-generative-ai-DmbUlCGv.js} +9 -9
  198. package/dist/{google-shared-S7bqOccz.js → google-shared-Diz2uk39.js} +6 -6
  199. package/dist/{google-vertex-BcMU_DMb.js → google-vertex-CGCpI9Po.js} +10 -10
  200. package/dist/{domains-B6Ae4swm.js → harnessState-Df--jB5z.js} +162 -42
  201. package/dist/{harnessStore-Ccbia9_u.js → harnessStore-DInwiLYb.js} +4 -5
  202. package/dist/{hash-B3RRpLS2.js → hash-IQBoLxOB.js} +1 -1
  203. package/dist/{headers-BEuxFxDI.js → headers-Dkgiqogr.js} +1 -1
  204. package/dist/help-C9UGKetC.js +100 -0
  205. package/dist/home-kwZFHqOx.js +60 -0
  206. package/dist/http-BekstF5S.js +64 -0
  207. package/dist/hubChannel-Dldv3EEb.js +32 -0
  208. package/dist/hubRevisions-BPoC6quI.js +364 -0
  209. package/dist/{identity-BIeAyilV.js → identity-BzB1N-Sn.js} +3 -3
  210. package/dist/index.edge-BiVQ9LoZ.js +198 -0
  211. package/dist/index.edge-CSGx6QOL.js +56 -0
  212. package/dist/index.edge-ClLTmPFz.js +191 -0
  213. package/dist/index.edge-CzoLWbyl.js +238 -0
  214. package/dist/index.edge-D1biKw71.js +946 -0
  215. package/dist/index.edge-D2RirEwK.js +14 -0
  216. package/dist/iso-BGFmgtky.js +27 -0
  217. package/dist/{kysely-adapter-D51abb3q.js → kysely-adapter-D8KUrWxm.js} +1 -1
  218. package/dist/liquid.browser-1BcykmIN.js +4596 -0
  219. package/dist/manualTranscription-DN56fzgj.js +96 -0
  220. package/dist/{mcpProjection-BXiECnW0.js → mcpProjection-D2U50Pel.js} +1 -2
  221. package/dist/meta-CVgfTHQP.js +1030 -0
  222. package/dist/migrations-DJBPDwSR.js +32 -0
  223. package/dist/{mistral-conversations-DN8VSERk.js → mistral-conversations-Bv_m1MRF.js} +12 -12
  224. package/dist/modeDefinition-Di95_IiU.js +44 -0
  225. package/dist/{models-D6d73jcW.js → models-D50yN8Ag.js} +41 -46
  226. package/dist/{node-UuMT2C3q.js → node-B4kSjHeD.js} +2 -2
  227. package/dist/{node-DytJOfYf.js → node-CBLSc-YH.js} +1 -1
  228. package/dist/notification-DjxbNoMR.js +143 -0
  229. package/dist/{openai-bt3ZRBZv.js → openai-D6Q-l6hT.js} +187 -187
  230. package/dist/{openai-codex-responses-cL36x0ml.js → openai-codex-responses-BnoiTqYV.js} +21 -25
  231. package/dist/{openai-completions-BWsTNYyT.js → openai-completions-C68qs5rI.js} +26 -19
  232. package/dist/{openai-decisions-Dfn_KgQd.js → openai-decisions-BSxU_aoV.js} +3 -3
  233. package/dist/{openai-responses-aa0LoyCJ.js → openai-responses-D6hXen-k.js} +17 -15
  234. package/dist/{openai-responses-shared-H-jH5SlM.js → openai-responses-shared-BD8K7FAC.js} +7 -7
  235. package/dist/{openrouter-cost-D99Qqcs6.js → openrouter-cost-BPam8wyW.js} +1 -1
  236. package/dist/{openrouter-images-BpwVpALC.js → openrouter-images-DylXiHy7.js} +7 -7
  237. package/dist/{hubChannel-Dn5NMpvu.js → packageApi-DYkaxP59.js} +33 -42
  238. package/dist/photon_rs_bg.wasm +0 -0
  239. package/dist/{pi-messages-BHAIkYBj.js → pi-messages-DaIlYYlO.js} +6 -6
  240. package/dist/piConfig-5tRPD0ov.js +126 -0
  241. package/dist/piSettings-ekBG5OeF.js +1 -0
  242. package/dist/platform-CQahdzpG.js +138 -0
  243. package/dist/pluginCatalog-BAALyedS.js +30 -0
  244. package/dist/pluginContributions-Be9EnCAW.js +16 -0
  245. package/dist/pluginProtocol-7_gVUeM9.js +1 -0
  246. package/dist/pluginProtocol-DVIfJnav.js +135 -0
  247. package/dist/portableConfig-0tnk9anb.js +49 -0
  248. package/dist/presetConfig-n-oiNd3h.js +541 -0
  249. package/dist/profileSources-D1rymC97.js +537 -0
  250. package/dist/{protocol-DUeE0Q8z.js → protocol-Cri0GpZR.js} +1 -2
  251. package/dist/{provider-env-DgfpjgTa.js → provider-env-DJb40UF7.js} +2 -2
  252. package/dist/{provider-retry-ChD-K2Gv.js → provider-retry-jpvs7ixx.js} +1 -1
  253. package/dist/{puppeteer-cloudflare-B-GHrPGO.js → puppeteer-cloudflare-D4l8smMS.js} +3 -3
  254. package/dist/{server-BWJmxCrm.js → readiness-Ydw5zrKy.js} +4 -169
  255. package/dist/{rolldown-runtime-B-lAHAz2.js → rolldown-runtime-DbVrKiKs.js} +1 -1
  256. package/dist/{sanitize-unicode-Dl4ROF7y.js → sanitize-unicode-B1ZFaEtf.js} +1 -1
  257. package/dist/scaffoldRegistry-CeFe3Pf0.js +1240 -0
  258. package/dist/{schemas-Vj8-rCR4.js → schemas-D2dRon18.js} +1901 -53
  259. package/dist/server-AKM07WcM.js +466 -0
  260. package/dist/server-B0tM5Ygf.js +1300 -0
  261. package/dist/server-B8-vStCx.js +1116 -0
  262. package/dist/server-BAbdiL38.js +15108 -0
  263. package/dist/server-BCZ_R3kX.js +3326 -0
  264. package/dist/server-BGKAeB3M.js +492 -0
  265. package/dist/server-BIQhg1jS.js +26985 -0
  266. package/dist/server-BcPD_6a2.js +1533 -0
  267. package/dist/server-BeoA0QB-.js +580 -0
  268. package/dist/server-BsgvOpBF.js +24 -0
  269. package/dist/server-BtnOqSB5.js +156 -0
  270. package/dist/server-C-HBjWRo.js +2800 -0
  271. package/dist/{server-CWg0m_wq.js → server-C0Lt6nTt.js} +269 -1062
  272. package/dist/server-C8NPfG1H.js +148 -0
  273. package/dist/server-CKkaxOc0.js +978 -0
  274. package/dist/server-CMaWF5UA.js +1379 -0
  275. package/dist/server-CQPI6jIa.js +295 -0
  276. package/dist/{server-BhYE7Vqk.js → server-CQmb0lYL.js} +114 -176
  277. package/dist/server-CWR34Vx6.js +1884 -0
  278. package/dist/server-CZiAy2v5.js +641 -0
  279. package/dist/server-Cjtr0oVJ.js +584 -0
  280. package/dist/server-CkJQJ3Oo.js +571 -0
  281. package/dist/server-ClQQGtsI.js +679 -0
  282. package/dist/server-Cy2FhGBm.js +1744 -0
  283. package/dist/server-D8yEblCB.js +24 -0
  284. package/dist/server-DF0YIUeI.js +9603 -0
  285. package/dist/server-DRFESCq1.js +1527 -0
  286. package/dist/{server-zkcrP99W.js → server-Df1defzp.js} +89 -87
  287. package/dist/server-DgZd_TuT.js +189 -0
  288. package/dist/server-Dkc9Kth2.js +1830 -0
  289. package/dist/server-DlRePYOB.js +343 -0
  290. package/dist/{server-BpPEzRes.js → server-_HZm8wEC.js} +654 -745
  291. package/dist/{server-yABhJa2K.js → server-_jWkMESg.js} +60 -39
  292. package/dist/server-lgV6liTt.js +140 -0
  293. package/dist/server-nHPXbRDA.js +742 -0
  294. package/dist/server-p7qANgrf.js +877 -0
  295. package/dist/server-vhmQi3co.js +112 -0
  296. package/dist/{server-SA0dsIJ2.js → server-w1aKMZOs.js} +3 -10
  297. package/dist/serverPlugin-4nI5J6Zt.js +39622 -0
  298. package/dist/session-resources-BvR3cwiH.js +10 -0
  299. package/dist/{sessionConfig-DgnPcGBu.js → sessionConfig-UMlgu98q.js} +926 -844
  300. package/dist/{simple-options-DWrW31_K.js → simple-options-Cp5p46f9.js} +13 -6
  301. package/dist/space-C3Wnli1l.js +92 -0
  302. package/dist/sse-XlzXs1es.js +151 -0
  303. package/dist/{streaming-json-t4rzNHEp.js → streaming-json-CZyrX_Ux.js} +6 -6
  304. package/dist/{system-one-shared-DLVLdzYL.js → system-one-shared-Du6bka0h.js} +3 -3
  305. package/dist/{notification-valMY1zH.js → telemetry-CrTcxeA5.js} +2 -93
  306. package/dist/{transform-messages-CjTSwW9q.js → transform-messages-CBj9g2mx.js} +3 -16
  307. package/dist/truncate-M3KbFyVj.js +89 -0
  308. package/dist/{server-BXjfQYeU.js → type-DppaYz6F.js} +955 -1187
  309. package/dist/type-yokaDI_F.js +7 -0
  310. package/dist/{typesafe-system-one-DBVcjcUQ.js → typesafe-system-one-C7YFgvrX.js} +3 -3
  311. package/dist/{uuid-mkNGilLv.js → uuid-BVI0BZsx.js} +1 -1
  312. package/dist/{validation-BLnxgJU_.js → validation-QWuk6kwJ.js} +79 -74
  313. package/dist/vaultSettings-Bq8wkbDv.js +292 -0
  314. package/dist/voiceTools-BdJyfzwB.js +246 -0
  315. package/dist/web-B2sdV-F2.js +4 -0
  316. package/dist/worker.js +97821 -72579
  317. package/dist/workflow-DTCt4n6k.js +171 -0
  318. package/dist/workflowServices-RlswfHWp.js +300 -0
  319. package/package.json +55 -25
  320. package/wrangler.jsonc +16 -3
  321. package/dist/apiContracts-sG5b90Qa.js +0 -4451
  322. package/dist/assets/assets/channel-BOT7In0s.js +0 -2
  323. package/dist/assets/assets/chunk-XXDRQBXY-Dp9-QbR6.js +0 -2
  324. package/dist/assets/assets/flowDiagram-IUGLLWBU-B9D9uWwn.js +0 -1
  325. package/dist/assets/assets/index-BlPEYpuN.css +0 -1
  326. package/dist/assets/assets/index-DS9w_Q1B.js +0 -155
  327. package/dist/assets/assets/swimlanesDiagram-AYQRV4AK-CyUKtW7v.js +0 -9
  328. package/dist/assets/plugins/assets/base-DyDpY0zD.css +0 -2
  329. package/dist/assets/plugins/chunks/po-web-runtime-4JiBsb_c.js +0 -1
  330. package/dist/assets/plugins/slots/approval.09e72f36-DwFz-UMh.js +0 -2
  331. package/dist/assets/plugins/slots/artifacts.50b639bb-CUtFC806.js +0 -1
  332. package/dist/assets/plugins/slots/builtin-tools.75108f21-B69GLfY_.js +0 -7
  333. package/dist/assets/plugins/slots/codemode.c58fb583-C0Gmb7_s.js +0 -9
  334. package/dist/assets/plugins/slots/domain.753f9f92-BTBYRLkE.js +0 -1
  335. package/dist/assets/plugins/slots/mcp.82cc1ff5-Ecacjn0a.js +0 -109
  336. package/dist/assets/plugins/slots/profile.ab16dcec-DIVXNHmh.js +0 -1
  337. package/dist/assets/plugins/slots/skill.62a0a1b3-BNr7DmPH.js +0 -4
  338. package/dist/backgroundWork-CSpsJ-Rg.js +0 -25
  339. package/dist/contextProjection-DDIQRgN4.js +0 -188
  340. package/dist/extensionFile-CacKVegY.js +0 -409
  341. package/dist/harnessState-gmzJcPGt.js +0 -88
  342. package/dist/harnessStore-Ch6hdYYe.js +0 -1
  343. package/dist/index.edge-BgSx_gRO.js +0 -45
  344. package/dist/majorModes-CCnwAjfF.js +0 -333
  345. package/dist/majorModes-DNQbxkpt.js +0 -1
  346. package/dist/piSettings-B6fsgIBA.js +0 -1
  347. package/dist/platform-Bs2_X_dK.js +0 -16
  348. package/dist/platformFiles-CCGujP9o.js +0 -39
  349. package/dist/server-5hLs7M43.js +0 -656
  350. package/dist/server-B3iqBHOP.js +0 -118
  351. package/dist/server-Dv0EKLwc.js +0 -108
  352. package/dist/server-Y5A21sJf.js +0 -591
  353. package/dist/server-a1K226XK.js +0 -279
  354. package/dist/serverPlugin-DUc4gGep.js +0 -7279
  355. package/dist/value-Bd477RDX.js +0 -2247
@@ -1,1048 +1,27 @@
1
- import { $t as Optional, H as readPoHeadlessHost, It as Integer, Jn as BACKGROUND_CONTEXT, Q as PO_SHELL_SERVICE, Tt as String$1, X as PO_BROWSER_SERVICE, Xn as withAbortSignal, Zt as _Object_, er as PO_SERVER_SCOPE_SERVICE, et as readPoBrowser, f as getOrThrow, n as PO_SESSION_FILES_SERVICE, nr as requirePoServerScope, nt as readPoIsolate, ot as PO_CONFIG_SERVICE, q as composeServerProviderOverrides, rt as readPoNpm, tr as defineServiceContract, tt as readPoFs, z as invalidImageReason } from "./serverPlugin-DUc4gGep.js";
2
- import { i as Errors, n as Check, r as Check$1 } from "./value-Bd477RDX.js";
3
- import { d as defineServerTool, f as defineServerPlugin, n as composeRootInjects, o as defineResource, s as defineRoot, t as composeRootHooks } from "./extensionFile-CacKVegY.js";
4
- import { n as readPackageResource, t as packageResourcePath } from "./index.edge-BgSx_gRO.js";
5
- import { i as isUnattended, n as gateApproval, o as PO_APPROVAL_SERVICE, s as readPoApproval, t as ApprovalPendingError } from "./approval-CQ3ZuoTy.js";
6
- import { i as readPoBackgroundWorkService, r as PO_BACKGROUND_WORK_SERVICE } from "./backgroundWork-CSpsJ-Rg.js";
7
- import "./platform-Bs2_X_dK.js";
8
- import { n as readPackageConfigurations, t as readMajorModesConfig } from "./majorModes-CCnwAjfF.js";
9
- import "./exports-LjvSY7Y6.js";
10
- import { r as assertCodemodeNamespaceName, t as PO_CODEMODE_CONTRACT } from "./codemode-CFVDmyGm.js";
11
- import "./majorModes-DNQbxkpt.js";
12
- //#endregion
13
- //#region ../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/meta/meta.mjs
14
- /** A collection of all meta schemas. */
15
- const Meta = {
16
- "http://json-schema.org/draft-03/schema#": {
17
- "$schema": "http://json-schema.org/draft-03/schema#",
18
- "id": "http://json-schema.org/draft-03/schema#",
19
- "type": "object",
20
- "properties": {
21
- "type": {
22
- "type": ["string", "array"],
23
- "items": { "type": ["string", { "$ref": "#" }] },
24
- "uniqueItems": true,
25
- "default": "any"
26
- },
27
- "properties": {
28
- "type": "object",
29
- "additionalProperties": { "$ref": "#" },
30
- "default": {}
31
- },
32
- "patternProperties": {
33
- "type": "object",
34
- "additionalProperties": { "$ref": "#" },
35
- "default": {}
36
- },
37
- "additionalProperties": {
38
- "type": [{ "$ref": "#" }, "boolean"],
39
- "default": {}
40
- },
41
- "items": {
42
- "type": [{ "$ref": "#" }, "array"],
43
- "items": { "$ref": "#" },
44
- "default": {}
45
- },
46
- "additionalItems": {
47
- "type": [{ "$ref": "#" }, "boolean"],
48
- "default": {}
49
- },
50
- "required": {
51
- "type": "boolean",
52
- "default": false
53
- },
54
- "dependencies": {
55
- "type": "object",
56
- "additionalProperties": {
57
- "type": [
58
- "string",
59
- "array",
60
- { "$ref": "#" }
61
- ],
62
- "items": { "type": "string" }
63
- },
64
- "default": {}
65
- },
66
- "minimum": { "type": "number" },
67
- "maximum": { "type": "number" },
68
- "exclusiveMinimum": {
69
- "type": "boolean",
70
- "default": false
71
- },
72
- "exclusiveMaximum": {
73
- "type": "boolean",
74
- "default": false
75
- },
76
- "minItems": {
77
- "type": "integer",
78
- "minimum": 0,
79
- "default": 0
80
- },
81
- "maxItems": {
82
- "type": "integer",
83
- "minimum": 0
84
- },
85
- "uniqueItems": {
86
- "type": "boolean",
87
- "default": false
88
- },
89
- "pattern": {
90
- "type": "string",
91
- "format": "regex"
92
- },
93
- "minLength": {
94
- "type": "integer",
95
- "minimum": 0,
96
- "default": 0
97
- },
98
- "maxLength": { "type": "integer" },
99
- "enum": {
100
- "type": "array",
101
- "minItems": 1,
102
- "uniqueItems": true
103
- },
104
- "default": { "type": "any" },
105
- "title": { "type": "string" },
106
- "description": { "type": "string" },
107
- "format": { "type": "string" },
108
- "divisibleBy": {
109
- "type": "number",
110
- "minimum": 0,
111
- "exclusiveMinimum": true,
112
- "default": 1
113
- },
114
- "disallow": {
115
- "type": ["string", "array"],
116
- "items": { "type": ["string", { "$ref": "#" }] },
117
- "uniqueItems": true
118
- },
119
- "extends": {
120
- "type": [{ "$ref": "#" }, "array"],
121
- "items": { "$ref": "#" },
122
- "default": {}
123
- },
124
- "id": {
125
- "type": "string",
126
- "format": "uri"
127
- },
128
- "$ref": {
129
- "type": "string",
130
- "format": "uri"
131
- },
132
- "$schema": {
133
- "type": "string",
134
- "format": "uri"
135
- }
136
- },
137
- "dependencies": {
138
- "exclusiveMinimum": "minimum",
139
- "exclusiveMaximum": "maximum"
140
- },
141
- "default": {}
142
- },
143
- "http://json-schema.org/draft-04/schema#": {
144
- "id": "http://json-schema.org/draft-04/schema#",
145
- "$schema": "http://json-schema.org/draft-04/schema#",
146
- "description": "Core schema meta-schema",
147
- "definitions": {
148
- "schemaArray": {
149
- "type": "array",
150
- "minItems": 1,
151
- "items": { "$ref": "#" }
152
- },
153
- "positiveInteger": {
154
- "type": "integer",
155
- "minimum": 0
156
- },
157
- "positiveIntegerDefault0": { "allOf": [{ "$ref": "#/definitions/positiveInteger" }, { "default": 0 }] },
158
- "simpleTypes": { "enum": [
159
- "array",
160
- "boolean",
161
- "integer",
162
- "null",
163
- "number",
164
- "object",
165
- "string"
166
- ] },
167
- "stringArray": {
168
- "type": "array",
169
- "items": { "type": "string" },
170
- "minItems": 1,
171
- "uniqueItems": true
172
- }
173
- },
174
- "type": "object",
175
- "properties": {
176
- "id": { "type": "string" },
177
- "$schema": { "type": "string" },
178
- "title": { "type": "string" },
179
- "description": { "type": "string" },
180
- "default": {},
181
- "multipleOf": {
182
- "type": "number",
183
- "minimum": 0,
184
- "exclusiveMinimum": true
185
- },
186
- "maximum": { "type": "number" },
187
- "exclusiveMaximum": {
188
- "type": "boolean",
189
- "default": false
190
- },
191
- "minimum": { "type": "number" },
192
- "exclusiveMinimum": {
193
- "type": "boolean",
194
- "default": false
195
- },
196
- "maxLength": { "$ref": "#/definitions/positiveInteger" },
197
- "minLength": { "$ref": "#/definitions/positiveIntegerDefault0" },
198
- "pattern": {
199
- "type": "string",
200
- "format": "regex"
201
- },
202
- "additionalItems": {
203
- "anyOf": [{ "type": "boolean" }, { "$ref": "#" }],
204
- "default": {}
205
- },
206
- "items": {
207
- "anyOf": [{ "$ref": "#" }, { "$ref": "#/definitions/schemaArray" }],
208
- "default": {}
209
- },
210
- "maxItems": { "$ref": "#/definitions/positiveInteger" },
211
- "minItems": { "$ref": "#/definitions/positiveIntegerDefault0" },
212
- "uniqueItems": {
213
- "type": "boolean",
214
- "default": false
215
- },
216
- "maxProperties": { "$ref": "#/definitions/positiveInteger" },
217
- "minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" },
218
- "required": { "$ref": "#/definitions/stringArray" },
219
- "additionalProperties": {
220
- "anyOf": [{ "type": "boolean" }, { "$ref": "#" }],
221
- "default": {}
222
- },
223
- "definitions": {
224
- "type": "object",
225
- "additionalProperties": { "$ref": "#" },
226
- "default": {}
227
- },
228
- "properties": {
229
- "type": "object",
230
- "additionalProperties": { "$ref": "#" },
231
- "default": {}
232
- },
233
- "patternProperties": {
234
- "type": "object",
235
- "additionalProperties": { "$ref": "#" },
236
- "default": {}
237
- },
238
- "dependencies": {
239
- "type": "object",
240
- "additionalProperties": { "anyOf": [{ "$ref": "#" }, { "$ref": "#/definitions/stringArray" }] }
241
- },
242
- "enum": {
243
- "type": "array",
244
- "minItems": 1,
245
- "uniqueItems": true
246
- },
247
- "type": { "anyOf": [{ "$ref": "#/definitions/simpleTypes" }, {
248
- "type": "array",
249
- "items": { "$ref": "#/definitions/simpleTypes" },
250
- "minItems": 1,
251
- "uniqueItems": true
252
- }] },
253
- "format": { "type": "string" },
254
- "allOf": { "$ref": "#/definitions/schemaArray" },
255
- "anyOf": { "$ref": "#/definitions/schemaArray" },
256
- "oneOf": { "$ref": "#/definitions/schemaArray" },
257
- "not": { "$ref": "#" }
258
- },
259
- "dependencies": {
260
- "exclusiveMaximum": ["maximum"],
261
- "exclusiveMinimum": ["minimum"]
262
- },
263
- "default": {}
264
- },
265
- "http://json-schema.org/draft-06/schema#": {
266
- "$schema": "http://json-schema.org/draft-06/schema#",
267
- "$id": "http://json-schema.org/draft-06/schema#",
268
- "title": "Core schema meta-schema",
269
- "definitions": {
270
- "schemaArray": {
271
- "type": "array",
272
- "minItems": 1,
273
- "items": { "$ref": "#" }
274
- },
275
- "nonNegativeInteger": {
276
- "type": "integer",
277
- "minimum": 0
278
- },
279
- "nonNegativeIntegerDefault0": { "allOf": [{ "$ref": "#/definitions/nonNegativeInteger" }, { "default": 0 }] },
280
- "simpleTypes": { "enum": [
281
- "array",
282
- "boolean",
283
- "integer",
284
- "null",
285
- "number",
286
- "object",
287
- "string"
288
- ] },
289
- "stringArray": {
290
- "type": "array",
291
- "items": { "type": "string" },
292
- "uniqueItems": true,
293
- "default": []
294
- }
295
- },
296
- "type": ["object", "boolean"],
297
- "properties": {
298
- "$id": {
299
- "type": "string",
300
- "format": "uri-reference"
301
- },
302
- "$schema": {
303
- "type": "string",
304
- "format": "uri"
305
- },
306
- "$ref": {
307
- "type": "string",
308
- "format": "uri-reference"
309
- },
310
- "title": { "type": "string" },
311
- "description": { "type": "string" },
312
- "default": {},
313
- "examples": {
314
- "type": "array",
315
- "items": {}
316
- },
317
- "multipleOf": {
318
- "type": "number",
319
- "exclusiveMinimum": 0
320
- },
321
- "maximum": { "type": "number" },
322
- "exclusiveMaximum": { "type": "number" },
323
- "minimum": { "type": "number" },
324
- "exclusiveMinimum": { "type": "number" },
325
- "maxLength": { "$ref": "#/definitions/nonNegativeInteger" },
326
- "minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
327
- "pattern": {
328
- "type": "string",
329
- "format": "regex"
330
- },
331
- "additionalItems": { "$ref": "#" },
332
- "items": {
333
- "anyOf": [{ "$ref": "#" }, { "$ref": "#/definitions/schemaArray" }],
334
- "default": {}
335
- },
336
- "maxItems": { "$ref": "#/definitions/nonNegativeInteger" },
337
- "minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
338
- "uniqueItems": {
339
- "type": "boolean",
340
- "default": false
341
- },
342
- "contains": { "$ref": "#" },
343
- "maxProperties": { "$ref": "#/definitions/nonNegativeInteger" },
344
- "minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
345
- "required": { "$ref": "#/definitions/stringArray" },
346
- "additionalProperties": { "$ref": "#" },
347
- "definitions": {
348
- "type": "object",
349
- "additionalProperties": { "$ref": "#" },
350
- "default": {}
351
- },
352
- "properties": {
353
- "type": "object",
354
- "additionalProperties": { "$ref": "#" },
355
- "default": {}
356
- },
357
- "patternProperties": {
358
- "type": "object",
359
- "additionalProperties": { "$ref": "#" },
360
- "propertyNames": { "format": "regex" },
361
- "default": {}
362
- },
363
- "dependencies": {
364
- "type": "object",
365
- "additionalProperties": { "anyOf": [{ "$ref": "#" }, { "$ref": "#/definitions/stringArray" }] }
366
- },
367
- "propertyNames": { "$ref": "#" },
368
- "const": {},
369
- "enum": {
370
- "type": "array",
371
- "minItems": 1,
372
- "uniqueItems": true
373
- },
374
- "type": { "anyOf": [{ "$ref": "#/definitions/simpleTypes" }, {
375
- "type": "array",
376
- "items": { "$ref": "#/definitions/simpleTypes" },
377
- "minItems": 1,
378
- "uniqueItems": true
379
- }] },
380
- "format": { "type": "string" },
381
- "allOf": { "$ref": "#/definitions/schemaArray" },
382
- "anyOf": { "$ref": "#/definitions/schemaArray" },
383
- "oneOf": { "$ref": "#/definitions/schemaArray" },
384
- "not": { "$ref": "#" }
385
- },
386
- "default": {}
387
- },
388
- "http://json-schema.org/draft-07/schema#": {
389
- "$schema": "http://json-schema.org/draft-07/schema#",
390
- "$id": "http://json-schema.org/draft-07/schema#",
391
- "title": "Core schema meta-schema",
392
- "definitions": {
393
- "schemaArray": {
394
- "type": "array",
395
- "minItems": 1,
396
- "items": { "$ref": "#" }
397
- },
398
- "nonNegativeInteger": {
399
- "type": "integer",
400
- "minimum": 0
401
- },
402
- "nonNegativeIntegerDefault0": { "allOf": [{ "$ref": "#/definitions/nonNegativeInteger" }, { "default": 0 }] },
403
- "simpleTypes": { "enum": [
404
- "array",
405
- "boolean",
406
- "integer",
407
- "null",
408
- "number",
409
- "object",
410
- "string"
411
- ] },
412
- "stringArray": {
413
- "type": "array",
414
- "items": { "type": "string" },
415
- "uniqueItems": true,
416
- "default": []
417
- }
418
- },
419
- "type": ["object", "boolean"],
420
- "properties": {
421
- "$id": {
422
- "type": "string",
423
- "format": "uri-reference"
424
- },
425
- "$schema": {
426
- "type": "string",
427
- "format": "uri"
428
- },
429
- "$ref": {
430
- "type": "string",
431
- "format": "uri-reference"
432
- },
433
- "$comment": { "type": "string" },
434
- "title": { "type": "string" },
435
- "description": { "type": "string" },
436
- "default": true,
437
- "readOnly": {
438
- "type": "boolean",
439
- "default": false
440
- },
441
- "writeOnly": {
442
- "type": "boolean",
443
- "default": false
444
- },
445
- "examples": {
446
- "type": "array",
447
- "items": true
448
- },
449
- "multipleOf": {
450
- "type": "number",
451
- "exclusiveMinimum": 0
452
- },
453
- "maximum": { "type": "number" },
454
- "exclusiveMaximum": { "type": "number" },
455
- "minimum": { "type": "number" },
456
- "exclusiveMinimum": { "type": "number" },
457
- "maxLength": { "$ref": "#/definitions/nonNegativeInteger" },
458
- "minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
459
- "pattern": {
460
- "type": "string",
461
- "format": "regex"
462
- },
463
- "additionalItems": { "$ref": "#" },
464
- "items": {
465
- "anyOf": [{ "$ref": "#" }, { "$ref": "#/definitions/schemaArray" }],
466
- "default": true
467
- },
468
- "maxItems": { "$ref": "#/definitions/nonNegativeInteger" },
469
- "minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
470
- "uniqueItems": {
471
- "type": "boolean",
472
- "default": false
473
- },
474
- "contains": { "$ref": "#" },
475
- "maxProperties": { "$ref": "#/definitions/nonNegativeInteger" },
476
- "minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
477
- "required": { "$ref": "#/definitions/stringArray" },
478
- "additionalProperties": { "$ref": "#" },
479
- "definitions": {
480
- "type": "object",
481
- "additionalProperties": { "$ref": "#" },
482
- "default": {}
483
- },
484
- "properties": {
485
- "type": "object",
486
- "additionalProperties": { "$ref": "#" },
487
- "default": {}
488
- },
489
- "patternProperties": {
490
- "type": "object",
491
- "additionalProperties": { "$ref": "#" },
492
- "propertyNames": { "format": "regex" },
493
- "default": {}
494
- },
495
- "dependencies": {
496
- "type": "object",
497
- "additionalProperties": { "anyOf": [{ "$ref": "#" }, { "$ref": "#/definitions/stringArray" }] }
498
- },
499
- "propertyNames": { "$ref": "#" },
500
- "const": true,
501
- "enum": {
502
- "type": "array",
503
- "items": true,
504
- "minItems": 1,
505
- "uniqueItems": true
506
- },
507
- "type": { "anyOf": [{ "$ref": "#/definitions/simpleTypes" }, {
508
- "type": "array",
509
- "items": { "$ref": "#/definitions/simpleTypes" },
510
- "minItems": 1,
511
- "uniqueItems": true
512
- }] },
513
- "format": { "type": "string" },
514
- "contentMediaType": { "type": "string" },
515
- "contentEncoding": { "type": "string" },
516
- "if": { "$ref": "#" },
517
- "then": { "$ref": "#" },
518
- "else": { "$ref": "#" },
519
- "allOf": { "$ref": "#/definitions/schemaArray" },
520
- "anyOf": { "$ref": "#/definitions/schemaArray" },
521
- "oneOf": { "$ref": "#/definitions/schemaArray" },
522
- "not": { "$ref": "#" }
523
- },
524
- "default": true
525
- },
526
- "https://json-schema.org/draft/2019-09/schema": {
527
- "$schema": "https://json-schema.org/draft/2019-09/schema",
528
- "$id": "https://json-schema.org/draft/2019-09/schema",
529
- "$vocabulary": {
530
- "https://json-schema.org/draft/2019-09/vocab/core": true,
531
- "https://json-schema.org/draft/2019-09/vocab/applicator": true,
532
- "https://json-schema.org/draft/2019-09/vocab/validation": true,
533
- "https://json-schema.org/draft/2019-09/vocab/meta-data": true,
534
- "https://json-schema.org/draft/2019-09/vocab/format": false,
535
- "https://json-schema.org/draft/2019-09/vocab/content": true
536
- },
537
- "$recursiveAnchor": true,
538
- "title": "Core and Validation specifications meta-schema",
539
- "allOf": [
540
- {
541
- "$schema": "https://json-schema.org/draft/2019-09/schema",
542
- "$id": "https://json-schema.org/draft/2019-09/meta/core",
543
- "$recursiveAnchor": true,
544
- "title": "Core vocabulary meta-schema",
545
- "type": ["object", "boolean"],
546
- "properties": {
547
- "$id": {
548
- "type": "string",
549
- "format": "uri-reference",
550
- "$comment": "Non-empty fragments not allowed.",
551
- "pattern": "^[^#]*#?$"
552
- },
553
- "$schema": {
554
- "type": "string",
555
- "format": "uri"
556
- },
557
- "$anchor": {
558
- "type": "string",
559
- "pattern": "^[A-Za-z][-A-Za-z0-9.:_]*$"
560
- },
561
- "$ref": {
562
- "type": "string",
563
- "format": "uri-reference"
564
- },
565
- "$recursiveRef": {
566
- "type": "string",
567
- "format": "uri-reference"
568
- },
569
- "$recursiveAnchor": {
570
- "type": "boolean",
571
- "default": false
572
- },
573
- "$vocabulary": {
574
- "type": "object",
575
- "propertyNames": {
576
- "type": "string",
577
- "format": "uri"
578
- },
579
- "additionalProperties": { "type": "boolean" }
580
- },
581
- "$comment": { "type": "string" },
582
- "$defs": {
583
- "type": "object",
584
- "additionalProperties": { "$recursiveRef": "#" },
585
- "default": {}
586
- }
587
- }
588
- },
589
- {
590
- "$schema": "https://json-schema.org/draft/2019-09/schema",
591
- "$id": "https://json-schema.org/draft/2019-09/meta/applicator",
592
- "$recursiveAnchor": true,
593
- "title": "Applicator vocabulary meta-schema",
594
- "type": ["object", "boolean"],
595
- "properties": {
596
- "additionalItems": { "$recursiveRef": "#" },
597
- "unevaluatedItems": { "$recursiveRef": "#" },
598
- "items": { "anyOf": [{ "$recursiveRef": "#" }, { "$ref": "#/$defs/schemaArray" }] },
599
- "contains": { "$recursiveRef": "#" },
600
- "additionalProperties": { "$recursiveRef": "#" },
601
- "unevaluatedProperties": { "$recursiveRef": "#" },
602
- "properties": {
603
- "type": "object",
604
- "additionalProperties": { "$recursiveRef": "#" },
605
- "default": {}
606
- },
607
- "patternProperties": {
608
- "type": "object",
609
- "additionalProperties": { "$recursiveRef": "#" },
610
- "propertyNames": { "format": "regex" },
611
- "default": {}
612
- },
613
- "dependentSchemas": {
614
- "type": "object",
615
- "additionalProperties": { "$recursiveRef": "#" }
616
- },
617
- "propertyNames": { "$recursiveRef": "#" },
618
- "if": { "$recursiveRef": "#" },
619
- "then": { "$recursiveRef": "#" },
620
- "else": { "$recursiveRef": "#" },
621
- "allOf": { "$ref": "#/$defs/schemaArray" },
622
- "anyOf": { "$ref": "#/$defs/schemaArray" },
623
- "oneOf": { "$ref": "#/$defs/schemaArray" },
624
- "not": { "$recursiveRef": "#" }
625
- },
626
- "$defs": { "schemaArray": {
627
- "type": "array",
628
- "minItems": 1,
629
- "items": { "$recursiveRef": "#" }
630
- } }
631
- },
632
- {
633
- "$schema": "https://json-schema.org/draft/2019-09/schema",
634
- "$id": "https://json-schema.org/draft/2019-09/meta/validation",
635
- "$recursiveAnchor": true,
636
- "title": "Validation vocabulary meta-schema",
637
- "type": ["object", "boolean"],
638
- "properties": {
639
- "multipleOf": {
640
- "type": "number",
641
- "exclusiveMinimum": 0
642
- },
643
- "maximum": { "type": "number" },
644
- "exclusiveMaximum": { "type": "number" },
645
- "minimum": { "type": "number" },
646
- "exclusiveMinimum": { "type": "number" },
647
- "maxLength": { "$ref": "#/$defs/nonNegativeInteger" },
648
- "minLength": { "$ref": "#/$defs/nonNegativeIntegerDefault0" },
649
- "pattern": {
650
- "type": "string",
651
- "format": "regex"
652
- },
653
- "maxItems": { "$ref": "#/$defs/nonNegativeInteger" },
654
- "minItems": { "$ref": "#/$defs/nonNegativeIntegerDefault0" },
655
- "uniqueItems": {
656
- "type": "boolean",
657
- "default": false
658
- },
659
- "maxContains": { "$ref": "#/$defs/nonNegativeInteger" },
660
- "minContains": {
661
- "$ref": "#/$defs/nonNegativeInteger",
662
- "default": 1
663
- },
664
- "maxProperties": { "$ref": "#/$defs/nonNegativeInteger" },
665
- "minProperties": { "$ref": "#/$defs/nonNegativeIntegerDefault0" },
666
- "required": { "$ref": "#/$defs/stringArray" },
667
- "dependentRequired": {
668
- "type": "object",
669
- "additionalProperties": { "$ref": "#/$defs/stringArray" }
670
- },
671
- "const": true,
672
- "enum": {
673
- "type": "array",
674
- "items": true
675
- },
676
- "type": { "anyOf": [{ "$ref": "#/$defs/simpleTypes" }, {
677
- "type": "array",
678
- "items": { "$ref": "#/$defs/simpleTypes" },
679
- "minItems": 1,
680
- "uniqueItems": true
681
- }] }
682
- },
683
- "$defs": {
684
- "nonNegativeInteger": {
685
- "type": "integer",
686
- "minimum": 0
687
- },
688
- "nonNegativeIntegerDefault0": {
689
- "$ref": "#/$defs/nonNegativeInteger",
690
- "default": 0
691
- },
692
- "simpleTypes": { "enum": [
693
- "array",
694
- "boolean",
695
- "integer",
696
- "null",
697
- "number",
698
- "object",
699
- "string"
700
- ] },
701
- "stringArray": {
702
- "type": "array",
703
- "items": { "type": "string" },
704
- "uniqueItems": true,
705
- "default": []
706
- }
707
- }
708
- },
709
- {
710
- "$schema": "https://json-schema.org/draft/2019-09/schema",
711
- "$id": "https://json-schema.org/draft/2019-09/meta/meta-data",
712
- "$recursiveAnchor": true,
713
- "title": "Meta-data vocabulary meta-schema",
714
- "type": ["object", "boolean"],
715
- "properties": {
716
- "title": { "type": "string" },
717
- "description": { "type": "string" },
718
- "default": true,
719
- "deprecated": {
720
- "type": "boolean",
721
- "default": false
722
- },
723
- "readOnly": {
724
- "type": "boolean",
725
- "default": false
726
- },
727
- "writeOnly": {
728
- "type": "boolean",
729
- "default": false
730
- },
731
- "examples": {
732
- "type": "array",
733
- "items": true
734
- }
735
- }
736
- },
737
- {
738
- "$schema": "https://json-schema.org/draft/2019-09/schema",
739
- "$id": "https://json-schema.org/draft/2019-09/meta/format",
740
- "$recursiveAnchor": true,
741
- "title": "Format vocabulary meta-schema",
742
- "type": ["object", "boolean"],
743
- "properties": { "format": { "type": "string" } }
744
- },
745
- {
746
- "$schema": "https://json-schema.org/draft/2019-09/schema",
747
- "$id": "https://json-schema.org/draft/2019-09/meta/content",
748
- "$recursiveAnchor": true,
749
- "title": "Content vocabulary meta-schema",
750
- "type": ["object", "boolean"],
751
- "properties": {
752
- "contentMediaType": { "type": "string" },
753
- "contentEncoding": { "type": "string" },
754
- "contentSchema": { "$recursiveRef": "#" }
755
- }
756
- }
757
- ],
758
- "type": ["object", "boolean"],
759
- "properties": {
760
- "definitions": {
761
- "$comment": "While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",
762
- "type": "object",
763
- "additionalProperties": { "$recursiveRef": "#" },
764
- "default": {}
765
- },
766
- "dependencies": {
767
- "$comment": "\"dependencies\" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to \"dependentSchemas\" and \"dependentRequired\"",
768
- "type": "object",
769
- "additionalProperties": { "anyOf": [{ "$recursiveRef": "#" }, { "$ref": "meta/validation#/$defs/stringArray" }] }
770
- }
771
- }
772
- },
773
- "https://json-schema.org/draft/2020-12/schema": {
774
- "$schema": "https://json-schema.org/draft/2020-12/schema",
775
- "$id": "https://json-schema.org/draft/2020-12/schema",
776
- "$vocabulary": {
777
- "https://json-schema.org/draft/2020-12/vocab/core": true,
778
- "https://json-schema.org/draft/2020-12/vocab/applicator": true,
779
- "https://json-schema.org/draft/2020-12/vocab/unevaluated": true,
780
- "https://json-schema.org/draft/2020-12/vocab/validation": true,
781
- "https://json-schema.org/draft/2020-12/vocab/meta-data": true,
782
- "https://json-schema.org/draft/2020-12/vocab/format-annotation": true,
783
- "https://json-schema.org/draft/2020-12/vocab/content": true
784
- },
785
- "$dynamicAnchor": "meta",
786
- "title": "Core and Validation specifications meta-schema",
787
- "allOf": [
788
- {
789
- "$schema": "https://json-schema.org/draft/2020-12/schema",
790
- "$id": "https://json-schema.org/draft/2020-12/meta/core",
791
- "$dynamicAnchor": "meta",
792
- "title": "Core vocabulary meta-schema",
793
- "type": ["object", "boolean"],
794
- "properties": {
795
- "$id": {
796
- "$ref": "#/$defs/uriReferenceString",
797
- "$comment": "Non-empty fragments not allowed.",
798
- "pattern": "^[^#]*#?$"
799
- },
800
- "$schema": { "$ref": "#/$defs/uriString" },
801
- "$ref": { "$ref": "#/$defs/uriReferenceString" },
802
- "$anchor": { "$ref": "#/$defs/anchorString" },
803
- "$dynamicRef": { "$ref": "#/$defs/uriReferenceString" },
804
- "$dynamicAnchor": { "$ref": "#/$defs/anchorString" },
805
- "$vocabulary": {
806
- "type": "object",
807
- "propertyNames": { "$ref": "#/$defs/uriString" },
808
- "additionalProperties": { "type": "boolean" }
809
- },
810
- "$comment": { "type": "string" },
811
- "$defs": {
812
- "type": "object",
813
- "additionalProperties": { "$dynamicRef": "#meta" }
814
- }
815
- },
816
- "$defs": {
817
- "anchorString": {
818
- "type": "string",
819
- "pattern": "^[A-Za-z_][-A-Za-z0-9._]*$"
820
- },
821
- "uriString": {
822
- "type": "string",
823
- "format": "uri"
824
- },
825
- "uriReferenceString": {
826
- "type": "string",
827
- "format": "uri-reference"
828
- }
829
- }
830
- },
831
- {
832
- "$schema": "https://json-schema.org/draft/2020-12/schema",
833
- "$id": "https://json-schema.org/draft/2020-12/meta/applicator",
834
- "$dynamicAnchor": "meta",
835
- "title": "Applicator vocabulary meta-schema",
836
- "type": ["object", "boolean"],
837
- "properties": {
838
- "prefixItems": { "$ref": "#/$defs/schemaArray" },
839
- "items": { "$dynamicRef": "#meta" },
840
- "contains": { "$dynamicRef": "#meta" },
841
- "additionalProperties": { "$dynamicRef": "#meta" },
842
- "properties": {
843
- "type": "object",
844
- "additionalProperties": { "$dynamicRef": "#meta" },
845
- "default": {}
846
- },
847
- "patternProperties": {
848
- "type": "object",
849
- "additionalProperties": { "$dynamicRef": "#meta" },
850
- "propertyNames": { "format": "regex" },
851
- "default": {}
852
- },
853
- "dependentSchemas": {
854
- "type": "object",
855
- "additionalProperties": { "$dynamicRef": "#meta" },
856
- "default": {}
857
- },
858
- "propertyNames": { "$dynamicRef": "#meta" },
859
- "if": { "$dynamicRef": "#meta" },
860
- "then": { "$dynamicRef": "#meta" },
861
- "else": { "$dynamicRef": "#meta" },
862
- "allOf": { "$ref": "#/$defs/schemaArray" },
863
- "anyOf": { "$ref": "#/$defs/schemaArray" },
864
- "oneOf": { "$ref": "#/$defs/schemaArray" },
865
- "not": { "$dynamicRef": "#meta" }
866
- },
867
- "$defs": { "schemaArray": {
868
- "type": "array",
869
- "minItems": 1,
870
- "items": { "$dynamicRef": "#meta" }
871
- } }
872
- },
873
- {
874
- "$schema": "https://json-schema.org/draft/2020-12/schema",
875
- "$id": "https://json-schema.org/draft/2020-12/meta/unevaluated",
876
- "$dynamicAnchor": "meta",
877
- "title": "Unevaluated applicator vocabulary meta-schema",
878
- "type": ["object", "boolean"],
879
- "properties": {
880
- "unevaluatedItems": { "$dynamicRef": "#meta" },
881
- "unevaluatedProperties": { "$dynamicRef": "#meta" }
882
- }
883
- },
884
- {
885
- "$schema": "https://json-schema.org/draft/2020-12/schema",
886
- "$id": "https://json-schema.org/draft/2020-12/meta/validation",
887
- "$dynamicAnchor": "meta",
888
- "title": "Validation vocabulary meta-schema",
889
- "type": ["object", "boolean"],
890
- "properties": {
891
- "type": { "anyOf": [{ "$ref": "#/$defs/simpleTypes" }, {
892
- "type": "array",
893
- "items": { "$ref": "#/$defs/simpleTypes" },
894
- "minItems": 1,
895
- "uniqueItems": true
896
- }] },
897
- "const": true,
898
- "enum": {
899
- "type": "array",
900
- "items": true
901
- },
902
- "multipleOf": {
903
- "type": "number",
904
- "exclusiveMinimum": 0
905
- },
906
- "maximum": { "type": "number" },
907
- "exclusiveMaximum": { "type": "number" },
908
- "minimum": { "type": "number" },
909
- "exclusiveMinimum": { "type": "number" },
910
- "maxLength": { "$ref": "#/$defs/nonNegativeInteger" },
911
- "minLength": { "$ref": "#/$defs/nonNegativeIntegerDefault0" },
912
- "pattern": {
913
- "type": "string",
914
- "format": "regex"
915
- },
916
- "maxItems": { "$ref": "#/$defs/nonNegativeInteger" },
917
- "minItems": { "$ref": "#/$defs/nonNegativeIntegerDefault0" },
918
- "uniqueItems": {
919
- "type": "boolean",
920
- "default": false
921
- },
922
- "maxContains": { "$ref": "#/$defs/nonNegativeInteger" },
923
- "minContains": {
924
- "$ref": "#/$defs/nonNegativeInteger",
925
- "default": 1
926
- },
927
- "maxProperties": { "$ref": "#/$defs/nonNegativeInteger" },
928
- "minProperties": { "$ref": "#/$defs/nonNegativeIntegerDefault0" },
929
- "required": { "$ref": "#/$defs/stringArray" },
930
- "dependentRequired": {
931
- "type": "object",
932
- "additionalProperties": { "$ref": "#/$defs/stringArray" }
933
- }
934
- },
935
- "$defs": {
936
- "nonNegativeInteger": {
937
- "type": "integer",
938
- "minimum": 0
939
- },
940
- "nonNegativeIntegerDefault0": {
941
- "$ref": "#/$defs/nonNegativeInteger",
942
- "default": 0
943
- },
944
- "simpleTypes": { "enum": [
945
- "array",
946
- "boolean",
947
- "integer",
948
- "null",
949
- "number",
950
- "object",
951
- "string"
952
- ] },
953
- "stringArray": {
954
- "type": "array",
955
- "items": { "type": "string" },
956
- "uniqueItems": true,
957
- "default": []
958
- }
959
- }
960
- },
961
- {
962
- "$schema": "https://json-schema.org/draft/2020-12/schema",
963
- "$id": "https://json-schema.org/draft/2020-12/meta/meta-data",
964
- "$dynamicAnchor": "meta",
965
- "title": "Meta-data vocabulary meta-schema",
966
- "type": ["object", "boolean"],
967
- "properties": {
968
- "title": { "type": "string" },
969
- "description": { "type": "string" },
970
- "default": true,
971
- "deprecated": {
972
- "type": "boolean",
973
- "default": false
974
- },
975
- "readOnly": {
976
- "type": "boolean",
977
- "default": false
978
- },
979
- "writeOnly": {
980
- "type": "boolean",
981
- "default": false
982
- },
983
- "examples": {
984
- "type": "array",
985
- "items": true
986
- }
987
- }
988
- },
989
- {
990
- "$schema": "https://json-schema.org/draft/2020-12/schema",
991
- "$id": "https://json-schema.org/draft/2020-12/meta/format-annotation",
992
- "$dynamicAnchor": "meta",
993
- "title": "Format vocabulary meta-schema for annotation results",
994
- "type": ["object", "boolean"],
995
- "properties": { "format": { "type": "string" } }
996
- },
997
- {
998
- "$schema": "https://json-schema.org/draft/2020-12/schema",
999
- "$id": "https://json-schema.org/draft/2020-12/meta/content",
1000
- "$dynamicAnchor": "meta",
1001
- "title": "Content vocabulary meta-schema",
1002
- "type": ["object", "boolean"],
1003
- "properties": {
1004
- "contentEncoding": { "type": "string" },
1005
- "contentMediaType": { "type": "string" },
1006
- "contentSchema": { "$dynamicRef": "#meta" }
1007
- }
1008
- }
1009
- ],
1010
- "type": ["object", "boolean"],
1011
- "$comment": "This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",
1012
- "properties": {
1013
- "definitions": {
1014
- "$comment": "\"definitions\" has been replaced by \"$defs\".",
1015
- "type": "object",
1016
- "additionalProperties": { "$dynamicRef": "#meta" },
1017
- "deprecated": true,
1018
- "default": {}
1019
- },
1020
- "dependencies": {
1021
- "$comment": "\"dependencies\" has been split and replaced by \"dependentSchemas\" and \"dependentRequired\" in order to serve their differing semantics.",
1022
- "type": "object",
1023
- "additionalProperties": { "anyOf": [{ "$dynamicRef": "#meta" }, { "$ref": "meta/validation#/$defs/stringArray" }] },
1024
- "deprecated": true,
1025
- "default": {}
1026
- },
1027
- "$recursiveAnchor": {
1028
- "$comment": "\"$recursiveAnchor\" has been replaced by \"$dynamicAnchor\".",
1029
- "$ref": "meta/core#/$defs/anchorString",
1030
- "deprecated": true
1031
- },
1032
- "$recursiveRef": {
1033
- "$comment": "\"$recursiveRef\" has been replaced by \"$dynamicRef\".",
1034
- "$ref": "meta/core#/$defs/uriReferenceString",
1035
- "deprecated": true
1036
- }
1037
- }
1038
- }
1039
- };
1
+ import { Et as composeServerProviderOverrides, Ht as PO_CONFIG_SERVICE, It as readPoFs, Jt as String$1, Lt as readPoIsolate, Mt as PO_SHELL_SERVICE, Pt as readPoBrowser, Qt as Integer, Rt as readPoNpm, U as Check$1, V as Check, W as Errors, _t as BACKGROUND_CONTEXT, h as getOrThrow, i as PO_SESSION_FILES_SERVICE, in as Optional, kt as PO_BROWSER_SERVICE, ln as requirePoServerScope, lt as invalidImageReason, on as PO_SERVER_SCOPE_SERVICE, pt as readPoHeadlessHost, rn as _Object_, sn as defineServiceContract, t as defineServerPlugin, yt as withAbortSignal } from "./serverPlugin-4nI5J6Zt.js";
2
+ import { t as Meta } from "./meta-CVgfTHQP.js";
3
+ import "./platform-CQahdzpG.js";
4
+ import { n as readPackageResource, t as packageResourcePath } from "./index.edge-BiVQ9LoZ.js";
5
+ import { c as defineRoot, d as defineServerCommand, f as defineServerTool, n as composeRootInjects, r as defineChannel, s as defineResource, t as composeRootHooks } from "./extensionFile-B940JOEn.js";
6
+ import { n as readPresetsConfig, t as readPackageConfigurations } from "./presetConfig-n-oiNd3h.js";
7
+ import "./exports-CBp_9dVk.js";
8
+ import { i as isUnattended, n as gateApproval, o as PO_APPROVAL_SERVICE, s as readPoApproval, t as ApprovalPendingError } from "./approval-DXPV7Vm5.js";
9
+ import { a as PO_BACKGROUND_WORK_SERVICE, l as readPoBackgroundWorkService } from "./backgroundWork-Bv0ib_lY.js";
10
+ import { r as assertCodemodeNamespaceName, t as PO_CODEMODE_CONTRACT } from "./codemode-LpcMFMYM.js";
11
+ import "./worker.js";
12
+ import path from "node:path";
13
+ //#region ../../default/po-codemode/src/constants/backgroundScripts.ts
14
+ /** The hub channel frame carrying one session's running background scripts. */
15
+ const CODEMODE_BACKGROUND_TYPE = "codemode_background";
16
+ /** The slash command the page sends to stop one background script. */
17
+ const CODEMODE_STOP_COMMAND = "background-scripts-stop";
1040
18
  //#endregion
1041
19
  //#region ../../default/po-codemode/src/services/codemodeRegistry/index.ts
1042
- const MEMBER_PATH = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)*$/u;
20
+ /** Dot-separated segments without whitespace, so names such as `my-server.create-issue` can be gated. */
21
+ const MEMBER_PATH = /^[^.\s]+(?:\.[^.\s]+)*$/u;
1043
22
  /** A gated member that cannot be gated must fail at registration, not run ungated. */
1044
23
  function assertApproval(source, namespace) {
1045
- for (const [path, policy] of Object.entries(namespace.approval ?? {})) if (!(MEMBER_PATH.test(path) && (policy?.requirement === "ask" || policy?.requirement === "human") && typeof policy.describe === "function")) throw new Error(`Code-mode namespace "${namespace.name}" from ${source} declares an invalid approval for "${path}": use a dotted member path with requirement "ask" or "human" and a describe function.`);
24
+ for (const [path, policy] of Object.entries(namespace.approval ?? {})) if (!(MEMBER_PATH.test(path) && (policy?.requirement === "ask" || policy?.requirement === "human") && typeof policy.describe === "function" && (policy.applies === void 0 || typeof policy.applies === "function"))) throw new Error(`Code-mode namespace "${namespace.name}" from ${source} declares an invalid approval for "${path}": use a dotted member path with requirement "ask" or "human" and a describe function.`);
1046
25
  }
1047
26
  /** The session's namespaces and script folders, in registration order. One name per session. */
1048
27
  function createCodemodeRegistry(options) {
@@ -1229,6 +208,83 @@ const ExecCancelToolSchema = _Object_({
1229
208
  reason: Optional(String$1({ maxLength: 256 }))
1230
209
  });
1231
210
  //#endregion
211
+ //#region ../../default/po-codemode/src/services/fsModule/index.ts
212
+ /** Node error codes for po/fs failures, so `catch (e) { if (e.code === 'ENOENT') }` keeps working in scripts. */
213
+ const NODE_CODES = {
214
+ not_found: "ENOENT",
215
+ permission_denied: "EACCES",
216
+ not_directory: "ENOTDIR",
217
+ is_directory: "EISDIR",
218
+ aborted: "ABORT_ERR"
219
+ };
220
+ function stats(info) {
221
+ return {
222
+ name: info.name,
223
+ size: info.size,
224
+ mtimeMs: info.mtimeMs,
225
+ mtime: new Date(info.mtimeMs),
226
+ isFile: () => info.kind === "file",
227
+ isDirectory: () => info.kind === "directory",
228
+ isSymbolicLink: () => info.kind === "symlink"
229
+ };
230
+ }
231
+ function encodingOf(options) {
232
+ if (typeof options === "string") return options;
233
+ if (options && typeof options === "object" && "encoding" in options && typeof options.encoding === "string") return options.encoding;
234
+ }
235
+ /**
236
+ * A `node:fs`-shaped module for exec scripts, backed by the session's po/fs. Every method is async; the
237
+ * `*Sync` names are the same functions, which the script compiler awaits at each call site.
238
+ */
239
+ function createFsModule(fs, cwd, signal) {
240
+ const context = withAbortSignal(signal, BACKGROUND_CONTEXT);
241
+ const unwrap = async (pending) => {
242
+ const result = await pending;
243
+ if (result.ok) return result.value;
244
+ const { message, code } = result.error;
245
+ throw Object.assign(new Error(message), { code: NODE_CODES[code ?? ""] ?? code ?? "EIO" });
246
+ };
247
+ /** Relative paths resolve against the session's working directory, not the server's. */
248
+ const at = async (path$1) => {
249
+ if (typeof path$1 !== "string" || path$1 === "") throw new TypeError("A path must be a non-empty string.");
250
+ return path.resolve(cwd, path$1);
251
+ };
252
+ const promises = {
253
+ readFile: async (path, options) => encodingOf(options) === void 0 ? unwrap(fs.readBinaryFile(await at(path), context)) : unwrap(fs.readTextFile(await at(path), context)),
254
+ writeFile: async (path, data) => unwrap(fs.writeFile(await at(path), data, context)),
255
+ appendFile: async (path, data) => unwrap(fs.appendFile(await at(path), data, context)),
256
+ readdir: async (path, options) => {
257
+ const entries = await unwrap(fs.listDir(await at(path), context));
258
+ return options?.withFileTypes ? entries.map(stats) : entries.map((entry) => entry.name);
259
+ },
260
+ stat: async (path) => stats(await unwrap(fs.fileInfo(await at(path), context))),
261
+ lstat: async (path) => stats(await unwrap(fs.fileInfo(await at(path), context))),
262
+ mkdir: async (path, options) => unwrap(fs.createDir(await at(path), { recursive: options?.recursive === true }, context)),
263
+ rm: async (path, options) => unwrap(fs.remove(await at(path), {
264
+ recursive: options?.recursive === true,
265
+ force: options?.force === true
266
+ }, context)),
267
+ unlink: async (path) => unwrap(fs.remove(await at(path), void 0, context)),
268
+ rename: async (from, to) => unwrap(fs.renameFile(await at(from), await at(to), context)),
269
+ copyFile: async (from, to) => unwrap(fs.writeFile(await at(to), await unwrap(fs.readBinaryFile(await at(from), context)), context)),
270
+ realpath: async (path) => unwrap(fs.canonicalPath(await at(path), context)),
271
+ access: async (path) => {
272
+ if (!await unwrap(fs.exists(await at(path), context))) throw Object.assign(/* @__PURE__ */ new Error(`No such file or directory: ${String(path)}`), { code: "ENOENT" });
273
+ },
274
+ exists: async (path) => unwrap(fs.exists(await at(path), context))
275
+ };
276
+ const sync = Object.fromEntries(Object.entries(promises).map(([name, method]) => [`${name}Sync`, method]));
277
+ const module = {
278
+ ...promises,
279
+ ...sync,
280
+ promises
281
+ };
282
+ return {
283
+ ...module,
284
+ default: module
285
+ };
286
+ }
287
+ //#endregion
1232
288
  //#region ../../default/po-codemode/src/services/codemodeTools/index.ts
1233
289
  const DEFAULT_TIMEOUT_MS$1 = 3e4;
1234
290
  const MAX_TIMEOUT_MS$1 = 12e4;
@@ -1241,15 +297,21 @@ const MAX_DECLARATION_CHARS = 24e3;
1241
297
  const MAX_QUERY_LINES = 40;
1242
298
  const MAX_CONCURRENT_RUNS = 8;
1243
299
  const MAX_RECORDED_CALLS = 50;
300
+ const UPDATE_INTERVAL_MS = 500;
1244
301
  const MAX_RECORDED_TEXT = 8e3;
1245
302
  const MAX_RECORDED_JSON = 16e3;
1246
303
  const MAX_LISTED_SCRIPTS = 20;
1247
304
  const MAX_IMAGES = 4;
1248
305
  const MAX_IMAGE_BYTES = 5242880;
1249
306
  const DEFAULT_IMAGE_MIME = "image/png";
307
+ const MAX_SCRIPT_LABEL = 200;
1250
308
  const MEMBER_LINE = /^\s{2}(?:readonly\s+)?(\w+)\s*[(?:<]/u;
1251
309
  const GLOBALS_HELP = "Globals: console.log/info/warn/error, image(data, mimeType?) to return a screenshot, sleep(ms). Return a value with `return`.";
1252
310
  const SCRIPTS_HELP = "Every exec run is saved. Call a saved script with `await (await import(specifier))(args)`; inside it, `args` is the argument and its `return` is the result.";
311
+ /** The script's first non-empty line, so two scripts can be told apart. */
312
+ function scriptLabel(code) {
313
+ return (code.split("\n").find((candidate) => candidate.trim() !== "") ?? "").trim().slice(0, MAX_SCRIPT_LABEL);
314
+ }
1253
315
  function text(value, isError = false) {
1254
316
  return {
1255
317
  content: [{
@@ -1427,11 +489,12 @@ function toResult(result, output, saved, calls, approvals = []) {
1427
489
  text: truncate(format(result.value), MAX_VALUE_CHARS)
1428
490
  });
1429
491
  } else if (!pending) {
1430
- const { kind, name, message } = result.error;
1431
- const hint = kind === "timeout" ? " Raise timeoutMs or split the work into smaller exec calls." : "";
492
+ const { kind, name, message, line } = result.error;
493
+ const location = line === void 0 ? "" : ` (line ${line})`;
494
+ const hint = kind === "timeout" ? " Split the work into smaller exec calls, or use exec_background for long asynchronous work before raising timeoutMs." : "";
1432
495
  content.push({
1433
496
  type: "text",
1434
- text: `${name}: ${message}${hint}`
497
+ text: `${name}: ${message}${location}${hint}`
1435
498
  });
1436
499
  }
1437
500
  if (approvals.length > 0) content.push({
@@ -1452,7 +515,10 @@ function toResult(result, output, saved, calls, approvals = []) {
1452
515
  mimeType: image.mimeType
1453
516
  });
1454
517
  const details = {
1455
- ...!result.ok && !pending ? { failure: { kind: result.error.kind === "compile" ? "validation" : result.error.kind === "error" ? "unknown" : result.error.kind } } : {},
518
+ ...!result.ok && !pending ? { failure: {
519
+ kind: result.error.kind === "compile" ? "validation" : result.error.kind === "error" ? "unknown" : result.error.kind,
520
+ reason: result.error.name
521
+ } } : {},
1456
522
  ...calls.length > 0 ? { calls } : {},
1457
523
  ...approvals.length > 0 ? { approvals } : {}
1458
524
  };
@@ -1528,7 +594,7 @@ function gatedLabel(namespace, member) {
1528
594
  return policies.some(([, policy]) => policy.requirement === "human") ? `${member} (needs the person)` : `${member} (asks first)`;
1529
595
  }
1530
596
  /** `discover` and `exec` for one session, over the namespaces its packages contributed. */
1531
- function createCodemodeTools({ registry, isolate, scripts, npm, signal: lifecycleSignal, onBackgroundChange, approval }) {
597
+ function createCodemodeTools({ registry, isolate, scripts, npm, fs, signal: lifecycleSignal, onBackgroundChange, approval }) {
1532
598
  let running = 0;
1533
599
  let closing = false;
1534
600
  const lifecycle = new AbortController();
@@ -1560,7 +626,7 @@ function createCodemodeTools({ registry, isolate, scripts, npm, signal: lifecycl
1560
626
  if (domainScripts.length === 0) return [];
1561
627
  return [`Domain scripts: ${domainScripts.slice(0, MAX_LISTED_SCRIPTS).join(", ")}${domainScripts.length > MAX_LISTED_SCRIPTS ? ` and ${domainScripts.length - MAX_LISTED_SCRIPTS} more` : ""}. Use discover({ query }) to see what one does before importing it.`];
1562
628
  };
1563
- const executeCode = async (parameters, signal, execution, deadlineMs, toolCallId, background = false) => {
629
+ const executeCode = async (parameters, signal, execution, deadlineMs, toolCallId, background = false, onUpdate) => {
1564
630
  const service = isolate();
1565
631
  if (!service) return text("Code mode is not available on this host.", true);
1566
632
  if (closing || ownerSignal.aborted) return text("Code mode session is disposing.", true);
@@ -1579,6 +645,17 @@ function createCodemodeTools({ registry, isolate, scripts, npm, signal: lifecycl
1579
645
  bytes: 0
1580
646
  };
1581
647
  const output = createOutput();
648
+ let updateTimer;
649
+ const scheduleUpdate = () => {
650
+ if (onUpdate === void 0 || updateTimer !== void 0) return;
651
+ updateTimer = setTimeout(() => {
652
+ updateTimer = void 0;
653
+ if (!runSignal.aborted) onUpdate({
654
+ content: [],
655
+ details: { calls: [...calls] }
656
+ });
657
+ }, UPDATE_INTERVAL_MS);
658
+ };
1582
659
  const presence = execution.interaction === "unattended" ? "unattended" : execution.sessionContext?.interaction;
1583
660
  const interaction = isUnattended({
1584
661
  ...execution.caller === void 0 ? {} : { caller: execution.caller },
@@ -1596,6 +673,7 @@ function createCodemodeTools({ registry, isolate, scripts, npm, signal: lifecycl
1596
673
  onDispose: (cleanup) => void cleanups.push(cleanup),
1597
674
  record: (call) => {
1598
675
  if (calls.length < MAX_RECORDED_CALLS) calls.push(recordedCall(call, imageBudget));
676
+ scheduleUpdate();
1599
677
  },
1600
678
  emitImage: (image) => runSignal.aborted ? {
1601
679
  emitted: false,
@@ -1652,6 +730,7 @@ function createCodemodeTools({ registry, isolate, scripts, npm, signal: lifecycl
1652
730
  image: output.addImage,
1653
731
  sleep: (ms) => sleep(ms, runSignal)
1654
732
  };
733
+ const guestSources = {};
1655
734
  const deny = /* @__PURE__ */ new Set();
1656
735
  for (const namespace of visible(service)) {
1657
736
  const bound = namespace.bind(run);
@@ -1662,17 +741,41 @@ function createCodemodeTools({ registry, isolate, scripts, npm, signal: lifecycl
1662
741
  output.note(`${namespace.name} is unavailable: ${error instanceof Error ? error.message : String(error)}`);
1663
742
  continue;
1664
743
  }
744
+ if (!service.liveObjects && namespace.guestSource !== void 0) guestSources[namespace.name] = namespace.guestSource;
1665
745
  for (const member of namespace.deny ?? []) deny.add(member);
1666
746
  }
1667
747
  result = await service.run({
1668
748
  source: parameters.code,
1669
749
  globals,
750
+ guestSources,
1670
751
  deadlineMs,
1671
752
  signal: runSignal,
1672
753
  deny: [...deny],
1673
754
  onDiagnostic: output.note,
1674
755
  resolveImport: async (specifier) => {
1675
- if (specifier.startsWith("node:")) throw new Error(`Code mode is sandboxed, so "${specifier}" cannot be imported. Use the shell namespace or an npm: import.`);
756
+ const builtin = /^(?:node:)?(fs|fs\/promises|path)$/u.exec(specifier)?.[1];
757
+ if (builtin === "path") return {
758
+ kind: "module",
759
+ id: "node:path",
760
+ exports: {
761
+ ...path,
762
+ default: path
763
+ }
764
+ };
765
+ const files = builtin === void 0 ? void 0 : fs?.();
766
+ if (files && service.liveObjects) {
767
+ const module = createFsModule(files, execution.cwd, runSignal);
768
+ const exports = builtin === "fs" ? module : {
769
+ ...module.promises,
770
+ default: module.promises
771
+ };
772
+ return {
773
+ kind: "module",
774
+ id: `node:${builtin}`,
775
+ exports
776
+ };
777
+ }
778
+ if (specifier.startsWith("node:") || builtin !== void 0) throw new Error(`Code mode is sandboxed, so "${specifier}" cannot be imported. Only node:fs, node:fs/promises and node:path are available here; use the shell namespace or an npm: import for the rest.`);
1676
779
  if (!specifier.startsWith("npm:")) {
1677
780
  if (!scripts) throw new Error("Script imports are not available on this host.");
1678
781
  return scripts.resolve(specifier, activeDomains(execution));
@@ -1716,17 +819,18 @@ function createCodemodeTools({ registry, isolate, scripts, npm, signal: lifecycl
1716
819
  result = {
1717
820
  ok: false,
1718
821
  error: {
1719
- kind: "error",
1720
- name: "Error",
822
+ kind: runSignal.aborted ? "aborted" : "error",
823
+ name: error instanceof Error ? error.name : "Error",
1721
824
  message: `Code mode could not run the script: ${error instanceof Error ? error.message : String(error)}`
1722
825
  }
1723
826
  };
1724
827
  } finally {
1725
828
  controller.abort();
829
+ clearTimeout(updateTimer);
1726
830
  for (const cleanup of cleanups.reverse()) await Promise.resolve().then(cleanup).catch((error) => {
1727
- const message = `Code mode cleanup failed: ${String(error)}`;
831
+ const message = truncate(`Code mode cleanup failed: ${String(error)}`, MAX_LOG_CHARS);
1728
832
  output.note(message);
1729
- result = {
833
+ if (result.ok || result.error.kind === "error" && result.error.name === "ApprovalPendingError" && approvals.length > 0) result = {
1730
834
  ok: false,
1731
835
  error: {
1732
836
  kind: "error",
@@ -1810,21 +914,21 @@ function createCodemodeTools({ registry, isolate, scripts, npm, signal: lifecycl
1810
914
  parameters: ExecToolSchema,
1811
915
  promptSnippet: "Run a TypeScript script against live Po objects (browser and other namespaces)",
1812
916
  executionMode: "serial",
1813
- async execute(toolCallId, parameters, signal, _onUpdate, execution) {
1814
- return executeCode(parameters, signal, execution, Math.min(MAX_TIMEOUT_MS$1, Math.max(MIN_TIMEOUT_MS, parameters.timeoutMs ?? DEFAULT_TIMEOUT_MS$1)), toolCallId);
917
+ async execute(toolCallId, parameters, signal, onUpdate, execution) {
918
+ return executeCode(parameters, signal, execution, Math.min(MAX_TIMEOUT_MS$1, Math.max(MIN_TIMEOUT_MS, parameters.timeoutMs ?? DEFAULT_TIMEOUT_MS$1)), toolCallId, false, onUpdate);
1815
919
  }
1816
920
  };
1817
921
  const execBackground = {
1818
922
  name: "exec_background",
1819
923
  label: "Background Exec",
1820
- description: "Run a long-lived Node code-mode script. Returns its ID immediately; one completion message arrives after execution and cleanup. End the turn rather than polling. Full server trust, like exec.",
924
+ description: "Run a long-lived code-mode script. Returns its ID immediately; one completion message arrives after execution and cleanup. End the turn rather than polling. Full server trust, like exec.",
1821
925
  parameters: ExecBackgroundToolSchema,
1822
926
  mainAgentOnly: true,
1823
927
  executionMode: "serial",
1824
928
  async execute(toolCallId, parameters, signal, _onUpdate, execution) {
1825
929
  if (signal?.aborted) return text("Background exec launch was aborted.", true);
1826
930
  if (closing || ownerSignal.aborted) return text("Code mode session is disposing.", true);
1827
- if (!isolate()?.liveObjects) return text("Background exec requires a Node host with live objects.", true);
931
+ if (!isolate()) return text("Background exec requires a code-mode script runner.", true);
1828
932
  if (!execution.session?.admitMessage) return text("This session cannot admit background exec completion messages.", true);
1829
933
  if (running >= MAX_CONCURRENT_RUNS) return text(`This session already has ${MAX_CONCURRENT_RUNS} exec runs active. Wait for one to finish.`, true);
1830
934
  const deadlineMs = Math.min(BACKGROUND_MAX_TIMEOUT_MS, Math.max(MIN_TIMEOUT_MS, parameters.timeoutMs ?? BACKGROUND_DEFAULT_TIMEOUT_MS));
@@ -1833,6 +937,8 @@ function createCodemodeTools({ registry, isolate, scripts, npm, signal: lifecycl
1833
937
  const job = {
1834
938
  id,
1835
939
  sessionId: execution.sessionId,
940
+ label: scriptLabel(parameters.code),
941
+ startedAt: (/* @__PURE__ */ new Date()).toISOString(),
1836
942
  controller,
1837
943
  status: "running",
1838
944
  done: Promise.resolve()
@@ -1898,6 +1004,14 @@ function createCodemodeTools({ registry, isolate, scripts, npm, signal: lifecycl
1898
1004
  };
1899
1005
  }
1900
1006
  };
1007
+ /** One cancel for the agent's `exec_cancel` and the page's stop control; only the owning session may stop a job. */
1008
+ const cancel = (sessionId, id, reason) => {
1009
+ const job = jobs.get(id);
1010
+ if (job && job.sessionId !== sessionId) return "foreign";
1011
+ if (job?.status !== "running") return "finished";
1012
+ job.controller.abort(reason ? new Error(reason) : void 0);
1013
+ return "stopping";
1014
+ };
1901
1015
  const execCancel = {
1902
1016
  name: "exec_cancel",
1903
1017
  label: "Cancel Exec",
@@ -1906,15 +1020,36 @@ function createCodemodeTools({ registry, isolate, scripts, npm, signal: lifecycl
1906
1020
  mainAgentOnly: true,
1907
1021
  executionMode: "serial",
1908
1022
  async execute(_toolCallId, parameters, _signal, _onUpdate, execution) {
1909
- const job = jobs.get(parameters.id);
1910
- if (job && job.sessionId !== execution.sessionId) return text("Background exec belongs to another session.", true);
1911
- if (job?.status === "running") job.controller.abort(parameters.reason ? new Error(parameters.reason) : void 0);
1023
+ const status = cancel(execution.sessionId, parameters.id, parameters.reason);
1024
+ if (status === "foreign") return text("Background exec belongs to another session.", true);
1912
1025
  return text(JSON.stringify({
1913
1026
  id: parameters.id,
1914
- status: job?.status === "running" ? "stopping" : "finished"
1027
+ status
1915
1028
  }));
1916
1029
  }
1917
1030
  };
1031
+ const stopCommand = {
1032
+ name: CODEMODE_STOP_COMMAND,
1033
+ description: "Stop one background code-mode script in this session by its id.",
1034
+ async execute(args, context) {
1035
+ const id = args.trim();
1036
+ if (!id) throw new Error(`Usage: /${CODEMODE_STOP_COMMAND} <script-id>`);
1037
+ const status = cancel(context.sessionId, id, "Stopped by the person.");
1038
+ await context.client.notify(status === "stopping" ? {
1039
+ body: "Stopping the background script; it reports its own end.",
1040
+ level: "info"
1041
+ } : {
1042
+ body: `No running background script ${id} in this session.`,
1043
+ level: "warning"
1044
+ });
1045
+ }
1046
+ };
1047
+ const backgroundScripts = (sessionId) => [...jobs.values()].filter((job) => job.sessionId === sessionId).map(({ id, label, startedAt, status }) => ({
1048
+ id,
1049
+ label,
1050
+ startedAt,
1051
+ status
1052
+ }));
1918
1053
  const runApproved = async (call, signal, sessionId) => {
1919
1054
  const name = call.operation.name;
1920
1055
  const [namespaceName, ...path] = name.split(".");
@@ -1958,6 +1093,8 @@ function createCodemodeTools({ registry, isolate, scripts, npm, signal: lifecycl
1958
1093
  execBackground,
1959
1094
  execCancel,
1960
1095
  backgroundWork,
1096
+ stopCommand,
1097
+ backgroundScripts,
1961
1098
  runApproved,
1962
1099
  async dispose() {
1963
1100
  closing = true;
@@ -2006,7 +1143,7 @@ var LlmConfigService = class {
2006
1143
  const { environment, homeDirectory } = this.io;
2007
1144
  const fs = this.io.fs();
2008
1145
  if (!fs || !homeDirectory) throw new Error("Code mode LLM configuration requires host filesystem and home.");
2009
- const modes = await readMajorModesConfig(fs, snapshot.harness.root, BACKGROUND_CONTEXT, {
1146
+ const modes = await readPresetsConfig(fs, snapshot.harness.root, BACKGROUND_CONTEXT, {
2010
1147
  environment,
2011
1148
  homeDirectory
2012
1149
  });
@@ -2467,13 +1604,21 @@ function createCodemodeSession({ context, agent, host, signal }) {
2467
1604
  });
2468
1605
  }
2469
1606
  let background;
1607
+ const publishScripts = () => {
1608
+ if (!execution) return;
1609
+ host.context.directEvents?.publish(CODEMODE_BACKGROUND_TYPE, execution.sessionId, { scripts: tools.backgroundScripts(execution.sessionId) });
1610
+ };
2470
1611
  const tools = createCodemodeTools({
2471
1612
  registry,
2472
1613
  isolate: () => readPoIsolate(context),
2473
1614
  npm: () => readPoNpm(context),
1615
+ fs: () => readPoFs(context),
2474
1616
  scripts,
2475
1617
  signal,
2476
- onBackgroundChange: () => background?.update(),
1618
+ onBackgroundChange: () => {
1619
+ background?.update();
1620
+ publishScripts();
1621
+ },
2477
1622
  approval: () => readPoApproval(context)
2478
1623
  });
2479
1624
  if (execution) context.inject([PO_APPROVAL_SERVICE], (scoped) => readPoApproval(scoped)?.registerExecutor("codemode", (call, signal) => tools.runApproved(call, signal, execution.sessionId)));
@@ -2507,6 +1652,54 @@ var root_server_default = defineRoot(root);
2507
1652
  //#region ../../default/po-codemode/src/extensions/workspaces/sessions/(backend)/contract/codemode.server.ts
2508
1653
  var codemode_server_default = defineServiceContract(PO_CODEMODE_CONTRACT.name, PO_CODEMODE_CONTRACT);
2509
1654
  //#endregion
1655
+ //#region ../../default/po-codemode/src/services/backgroundScriptsChannel/index.ts
1656
+ function scriptsPayload(value) {
1657
+ return typeof value === "object" && value !== null && Array.isArray(value.scripts);
1658
+ }
1659
+ /** Relays each session's background-script snapshots, published on the direct event bus, to the page. */
1660
+ function createBackgroundScriptsChannel() {
1661
+ return {
1662
+ frameType: CODEMODE_BACKGROUND_TYPE,
1663
+ start(host) {
1664
+ const latest = /* @__PURE__ */ new Map();
1665
+ const subscriptions = /* @__PURE__ */ new Map();
1666
+ return {
1667
+ payloadFor(scope) {
1668
+ return latest.get(scope.sessionId);
1669
+ },
1670
+ sessionAdded(scope) {
1671
+ subscriptions.get(scope.sessionId)?.();
1672
+ latest.delete(scope.sessionId);
1673
+ const unsubscribe = host.directEvents.subscribe(CODEMODE_BACKGROUND_TYPE, scope.sessionId, (payload) => {
1674
+ if (!scriptsPayload(payload)) return;
1675
+ latest.set(scope.sessionId, payload);
1676
+ host.publish(scope.sessionId, payload);
1677
+ }, { replayLatest: true });
1678
+ subscriptions.set(scope.sessionId, unsubscribe);
1679
+ },
1680
+ sessionRemoved(sessionId) {
1681
+ subscriptions.get(sessionId)?.();
1682
+ subscriptions.delete(sessionId);
1683
+ latest.delete(sessionId);
1684
+ },
1685
+ close() {
1686
+ for (const unsubscribe of subscriptions.values()) unsubscribe();
1687
+ subscriptions.clear();
1688
+ latest.clear();
1689
+ }
1690
+ };
1691
+ }
1692
+ };
1693
+ }
1694
+ //#endregion
1695
+ //#region ../../default/po-codemode/src/extensions/(backend)/channel/codemodeBackground.server.ts
1696
+ var codemodeBackground_server_default = defineChannel(function codemodeBackgroundChannel() {
1697
+ return createBackgroundScriptsChannel();
1698
+ });
1699
+ //#endregion
1700
+ //#region ../../default/po-codemode/src/extensions/workspaces/sessions/(backend)/command/background-scripts-stop.server.ts
1701
+ var background_scripts_stop_server_default = defineServerCommand((context) => context.root.stopCommand);
1702
+ //#endregion
2510
1703
  //#region ../../default/po-codemode/src/extensions/workspaces/sessions/(backend)/resource/codemode-how-to-llm.server.ts
2511
1704
  var codemode_how_to_llm_server_default = defineResource({
2512
1705
  name: "codemode-how-to-llm",
@@ -2561,6 +1754,8 @@ var exec_server_default = defineServerTool((context) => context.root.exec);
2561
1754
  //#endregion
2562
1755
  //#region ../../default/po-codemode/generated/server.ts
2563
1756
  const at = (value, context) => typeof value === "function" ? value(context) : value;
1757
+ /* v8 ignore next -- generated normalization branch */
1758
+ const defined = (values) => values.filter((value) => value !== void 0);
2564
1759
  const via = (identity, value) => value === void 0 ? void 0 : {
2565
1760
  ...identity,
2566
1761
  ...value
@@ -2570,6 +1765,12 @@ const serverPlugin = defineServerPlugin({
2570
1765
  providerOverrides: composeServerProviderOverrides(root_server_default),
2571
1766
  provides: { session: [codemode_server_default] },
2572
1767
  injects: composeRootInjects({ session: [root_server_default] }),
1768
+ host: (context) => ({ get channels() {
1769
+ return [() => via({ frameType: "codemode_background" }, at(codemodeBackground_server_default, context))];
1770
+ } }),
1771
+ workspace: (context) => ({ get channels() {
1772
+ return defined([context.hosted("host") ? void 0 : () => via({ frameType: "codemode_background" }, at(codemodeBackground_server_default, context))]);
1773
+ } }),
2573
1774
  session: async (context) => {
2574
1775
  const scopeSession = await context.scopeRoot("session", root_server_default, context);
2575
1776
  const contextSession = {
@@ -2578,6 +1779,12 @@ const serverPlugin = defineServerPlugin({
2578
1779
  };
2579
1780
  return {
2580
1781
  ...composeRootHooks(scopeSession),
1782
+ get channels() {
1783
+ return defined([context.hosted("host") ? void 0 : () => via({ frameType: "codemode_background" }, at(codemodeBackground_server_default, context))]);
1784
+ },
1785
+ get commands() {
1786
+ return [via({ name: "background-scripts-stop" }, at(background_scripts_stop_server_default, contextSession))];
1787
+ },
2581
1788
  get resources() {
2582
1789
  return [
2583
1790
  at(codemode_how_to_llm_server_default, contextSession),