@agimon-ai/po-cloudflare 0.0.2-alpha.2 → 0.0.2-alpha.21

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 (283) hide show
  1. package/README.md +4 -3
  2. package/dist/abort-signals-2GUraIGq.js +34 -0
  3. package/dist/agent-DZ-OKOHn.js +6850 -0
  4. package/dist/anthropic-messages-5ODquUB-.js +14317 -0
  5. package/dist/{apiContracts-CHOiCbS_.js → apiContracts-b33nSAAI.js} +18 -81
  6. package/dist/{approval-BMXqnTYd.js → approval-r3NnI1VC.js} +19 -3
  7. package/dist/{approvalPrompt-Bg1JrEEY.js → approvalPrompt-DWoXxu3S.js} +2 -2
  8. package/dist/artifactFiles-DLCReI0-.js +1 -0
  9. package/dist/assets/assets/{CodeEditorView-BnyZHaYM.js → CodeEditorView-XeNS0L9M.js} +2 -2
  10. package/dist/assets/assets/{abnfDiagram-WEYOIA3C-muME0eCj.js → abnfDiagram-WEYOIA3C-B6ZW0nkR.js} +2 -2
  11. package/dist/assets/assets/{architecture-WOLXFQ4H-DMnhK1WH.js → architecture-WOLXFQ4H-bVR64sHO.js} +1 -1
  12. package/dist/assets/assets/{architectureDiagram-ZHVYKT53-DKn7XGP7.js → architectureDiagram-ZHVYKT53-D7tZz3io.js} +2 -2
  13. package/dist/assets/assets/{blockDiagram-RJAE7QA3-DtDctXZg.js → blockDiagram-RJAE7QA3-DdwScfiX.js} +2 -2
  14. package/dist/assets/assets/{c4Diagram-XDPPPE54-23pGLJeP.js → c4Diagram-XDPPPE54-DgSxZJCV.js} +2 -2
  15. package/dist/assets/assets/channel-TPcVvp_3.js +2 -0
  16. package/dist/assets/assets/{chunk-2E7WHVMD-BZ2nGNPa.js → chunk-2E7WHVMD-D5TXC2SM.js} +2 -2
  17. package/dist/assets/assets/{chunk-4EMNKR2T-Dui1SYFi.js → chunk-4EMNKR2T-BWhOSvo1.js} +2 -2
  18. package/dist/assets/assets/{chunk-55XCU76K-CUB92Evl.js → chunk-55XCU76K-HkkBzLtZ.js} +2 -2
  19. package/dist/assets/assets/{chunk-7S6XSTFO-CVayPHfE.js → chunk-7S6XSTFO-CBnjycLU.js} +2 -2
  20. package/dist/assets/assets/{chunk-AQDTSKZB---wakYqY.js → chunk-AQDTSKZB-75lIIq8T.js} +2 -2
  21. package/dist/assets/assets/{chunk-DSNLSHJZ-DfbdohUR.js → chunk-DSNLSHJZ-D8PpnXMk.js} +2 -2
  22. package/dist/assets/assets/{chunk-HAGFOTED-Dr4KRh-b.js → chunk-HAGFOTED-CXRS2NIN.js} +2 -2
  23. package/dist/assets/assets/{chunk-HNE4Q36P-D06cR91Z.js → chunk-HNE4Q36P-BocUqS94.js} +2 -2
  24. package/dist/assets/assets/{chunk-NQOKRVIF-Ca4gLeDb.js → chunk-NQOKRVIF-CHf_ogYT.js} +2 -2
  25. package/dist/assets/assets/{chunk-UHW7PFBP-DmL638jN.js → chunk-UHW7PFBP-DrW1PaIv.js} +2 -2
  26. package/dist/assets/assets/{chunk-VQ5W62QI-pkxSW5Zj.js → chunk-VQ5W62QI-CLoA7bFm.js} +2 -2
  27. package/dist/assets/assets/{chunk-WQQL4CDK-Dcc8hV4U.js → chunk-WQQL4CDK-BmBsrj9I.js} +2 -2
  28. package/dist/assets/assets/chunk-XXDRQBXY-iFE4Tl8c.js +2 -0
  29. package/dist/assets/assets/{chunk-YZO67HFG-B_HKcFrw.js → chunk-YZO67HFG-DShE_cgv.js} +2 -2
  30. package/dist/assets/assets/{chunk-ZAUX2LTX-DAzZUysS.js → chunk-ZAUX2LTX-B3oLvSXy.js} +2 -2
  31. package/dist/assets/assets/{chunk-ZCHMQSOR-DAVgjymL.js → chunk-ZCHMQSOR-B14vKK7C.js} +2 -2
  32. package/dist/assets/assets/{classDiagram-v2-4MYWR3UA-Fsw8TGPu.js → classDiagram-v2-4MYWR3UA-Da8elIW2.js} +2 -2
  33. package/dist/assets/assets/{cose-bilkent-JH36ORCC-CgUbISYV.js → cose-bilkent-JH36ORCC-Du4tGtiJ.js} +2 -2
  34. package/dist/assets/assets/{cynefin-EF2NZ3EQ-D1LxAU2x.js → cynefin-EF2NZ3EQ-Cyj6i_WI.js} +1 -1
  35. package/dist/assets/assets/{cynefinDiagram-WF24UDRP-D54I1jil.js → cynefinDiagram-WF24UDRP-DFWXwO7A.js} +2 -2
  36. package/dist/assets/assets/{dagre-NK4GIZVX-DC7zL16U.js → dagre-NK4GIZVX-C1wB_cf-.js} +2 -2
  37. package/dist/assets/assets/{diagram-CBK3MWTC-DB0ptUdz.js → diagram-CBK3MWTC-MYCOBYl6.js} +2 -2
  38. package/dist/assets/assets/{diagram-I5XIIV2D-CozSftPJ.js → diagram-I5XIIV2D-BFYbKUFf.js} +2 -2
  39. package/dist/assets/assets/{diagram-ODIL2UCW-g3WOEWDS.js → diagram-ODIL2UCW-6siqTpv_.js} +2 -2
  40. package/dist/assets/assets/{diagram-PFBEJUXE-CFxGeOYi.js → diagram-PFBEJUXE-CaBr9CoB.js} +2 -2
  41. package/dist/assets/assets/{diagram-RJA3I4VV-BQBsLche.js → diagram-RJA3I4VV-DAvmuDpc.js} +2 -2
  42. package/dist/assets/assets/{diagram-TYUNFSNR-DrjpW2yq.js → diagram-TYUNFSNR-CJnhgCpo.js} +2 -2
  43. package/dist/assets/assets/{dist-DjL8d1jZ.js → dist-BQ4W1R18.js} +2 -2
  44. package/dist/assets/assets/{dist-DvgCCshF.js → dist-BnzFckPF.js} +2 -2
  45. package/dist/assets/assets/{dist-gfbb4ygy.js → dist-CFtBpcYL.js} +2 -2
  46. package/dist/assets/assets/{dist-BabjcJ3j.js → dist-CIQX1z4W.js} +2 -2
  47. package/dist/assets/assets/{dist-XIZum9n5.js → dist-ChHYoe9_.js} +2 -2
  48. package/dist/assets/assets/{dist-1-mhYUBH.js → dist-DKxZO8d9.js} +2 -2
  49. package/dist/assets/assets/{dist-h6SOnP8-.js → dist-DL6z28wl.js} +2 -2
  50. package/dist/assets/assets/{dist-B3JXhDWV.js → dist-DNyn1p9Z.js} +2 -2
  51. package/dist/assets/assets/{dist-Izr2SB3q.js → dist-qYlLXIa8.js} +2 -2
  52. package/dist/assets/assets/{ebnfDiagram-V4P3TTPT-BZS_aAve.js → ebnfDiagram-V4P3TTPT-AUcqDTM3.js} +2 -2
  53. package/dist/assets/assets/{elk-QONTBCTQ-B2ksVmMA.js → elk-QONTBCTQ-aA10PEHJ.js} +2 -2
  54. package/dist/assets/assets/{erDiagram-KYQIGQAA-7P6zF-Z-.js → erDiagram-KYQIGQAA-hhYiqA-x.js} +2 -2
  55. package/dist/assets/assets/{eventmodeling-K75KTNOO-RoGQoRq-.js → eventmodeling-K75KTNOO-BQZqbRo5.js} +1 -1
  56. package/dist/assets/assets/flowDiagram-IUGLLWBU-BuyysPYC.js +1 -0
  57. package/dist/assets/assets/{ganttDiagram-R7GPNTJY-CTOlRy7M.js → ganttDiagram-R7GPNTJY-CLON1GpW.js} +2 -2
  58. package/dist/assets/assets/{gitGraph-VSP46ZUC-CPqytIt0.js → gitGraph-VSP46ZUC-DbmvNwR2.js} +1 -1
  59. package/dist/assets/assets/{gitGraphDiagram-PDYL7XHY-BffLxuxg.js → gitGraphDiagram-PDYL7XHY-DJVO0WlL.js} +2 -2
  60. package/dist/assets/assets/index-BiTVAj5E.js +155 -0
  61. package/dist/assets/assets/index-CBNQEGK3.css +1 -0
  62. package/dist/assets/assets/{info-OHQRW6UA-BI8RK0Ow.js → info-OHQRW6UA-CAt3Nt3g.js} +1 -1
  63. package/dist/assets/assets/{infoDiagram-MVDRKAX5-DUIst1FB.js → infoDiagram-MVDRKAX5-DTuqH-Zb.js} +2 -2
  64. package/dist/assets/assets/{ishikawaDiagram-HPEHV2GE-CA17Eho5.js → ishikawaDiagram-HPEHV2GE-BnWvdonT.js} +2 -2
  65. package/dist/assets/assets/{journeyDiagram-BOSHW7O7-CNri5Ap9.js → journeyDiagram-BOSHW7O7-Btxtcgvl.js} +2 -2
  66. package/dist/assets/assets/{kanban-definition-FNSA4HC5-DnXna7jO.js → kanban-definition-FNSA4HC5-q7ek9o_H.js} +2 -2
  67. package/dist/assets/assets/{line-BsXJZn93.js → line-B7yLilmC.js} +2 -2
  68. package/dist/assets/assets/{linear-BHYaD5T0.js → linear-y8aSKEli.js} +2 -2
  69. package/dist/assets/assets/{mermaid-parser.core-B64Eo-8a.js → mermaid-parser.core-B4rH50nD.js} +4 -4
  70. package/dist/assets/assets/{mermaid.core-Zw9qmTzg.js → mermaid.core-DnRVHTjE.js} +5 -5
  71. package/dist/assets/assets/{mindmap-definition-6OY57UG3-E5qz4KNc.js → mindmap-definition-6OY57UG3-DT9Afs2v.js} +2 -2
  72. package/dist/assets/assets/{packet-JDAUHWVQ-DgfizTr3.js → packet-JDAUHWVQ-CnqNbu4p.js} +1 -1
  73. package/dist/assets/assets/{pegDiagram-ECIUJNBX-D0WK_agM.js → pegDiagram-ECIUJNBX-cvxdBBFq.js} +2 -2
  74. package/dist/assets/assets/{pie-XZMESJXO-PJR1sXD4.js → pie-XZMESJXO-etXMNsaL.js} +1 -1
  75. package/dist/assets/assets/{pieDiagram-GNMPY74T-CPuU-NTs.js → pieDiagram-GNMPY74T-CBN-R3_j.js} +2 -2
  76. package/dist/assets/assets/{quadrantDiagram-D57K4MC3-5C9yjM1b.js → quadrantDiagram-D57K4MC3-C5jjVPIH.js} +2 -2
  77. package/dist/assets/assets/{radar-ABXABTNO-BspdXgl0.js → radar-ABXABTNO-CAMd_mrV.js} +1 -1
  78. package/dist/assets/assets/{railroad-I3PHUGI6-Ct0a6hLD.js → railroad-I3PHUGI6-DIs3auoe.js} +1 -1
  79. package/dist/assets/assets/{railroad-abnf-LNEFI6M7-fduYB4SA.js → railroad-abnf-LNEFI6M7-CJXr1qWy.js} +1 -1
  80. package/dist/assets/assets/{railroad-ebnf-DWYD2UWJ-CTQa8Sww.js → railroad-ebnf-DWYD2UWJ-DfwtykqI.js} +1 -1
  81. package/dist/assets/assets/{railroad-peg-JR7BVNR7-DatoH3GJ.js → railroad-peg-JR7BVNR7-B8beAhTs.js} +1 -1
  82. package/dist/assets/assets/{railroadDiagram-Y72NRBL7-C8sWN8l2.js → railroadDiagram-Y72NRBL7-BDcQE-EL.js} +2 -2
  83. package/dist/assets/assets/{requirementDiagram-EQYSW5RA-CqRz4RcT.js → requirementDiagram-EQYSW5RA-KJ4-QjZM.js} +2 -2
  84. package/dist/assets/assets/{sankeyDiagram-SY24JHO5-bdiuKKlX.js → sankeyDiagram-SY24JHO5-VjIB-Ybr.js} +2 -2
  85. package/dist/assets/assets/{sequenceDiagram-BLEHNHQU-Zy-8I0Hy.js → sequenceDiagram-BLEHNHQU-MfMuWq1M.js} +2 -2
  86. package/dist/assets/assets/{src-gihY33R9.js → src-BAxIj8GJ.js} +2 -2
  87. package/dist/assets/assets/{stateDiagram-v2-A6IESKWZ-DXQERPvz.js → stateDiagram-v2-A6IESKWZ-mHwLRRCY.js} +2 -2
  88. package/dist/assets/assets/{swimlanes-B3ENRKFQ-1gjZQElg.js → swimlanes-B3ENRKFQ-PArlYoqV.js} +2 -2
  89. package/dist/assets/assets/swimlanesDiagram-AYQRV4AK-The09-5S.js +9 -0
  90. package/dist/assets/assets/{timeline-definition-JXYKGLGB-CTeYEw-9.js → timeline-definition-JXYKGLGB-B2nKiNFU.js} +2 -2
  91. package/dist/assets/assets/{treeView-D4JQ5SDB-DD-EsLLT.js → treeView-D4JQ5SDB-gU23_RuI.js} +1 -1
  92. package/dist/assets/assets/{treemap-SAJKECNS-BLdFeS5J.js → treemap-SAJKECNS-CiqoMvZa.js} +1 -1
  93. package/dist/assets/assets/{usecaseDiagram-WPOLBNNX-C1GikSSP.js → usecaseDiagram-WPOLBNNX-DpeoWpMK.js} +2 -2
  94. package/dist/assets/assets/{vennDiagram-Q3Y3IDCW-B1FoA3g8.js → vennDiagram-Q3Y3IDCW-C31iGKvM.js} +2 -2
  95. package/dist/assets/assets/{wardley-7MLQ67FV-BrHb5Bjf.js → wardley-7MLQ67FV-CIzHhzNw.js} +1 -1
  96. package/dist/assets/assets/{wardleyDiagram-IVAIDKWA-CmPLD1X4.js → wardleyDiagram-IVAIDKWA-DIIkoezc.js} +2 -2
  97. package/dist/assets/assets/{webpack-BYWDFj_R.js → webpack-RFseiMZW.js} +2 -2
  98. package/dist/assets/assets/{xychartDiagram-4URNHDU4-DR5pfEjl.js → xychartDiagram-4URNHDU4-QiHL91kC.js} +2 -2
  99. package/dist/assets/bundle-asset-policy.json +1 -1
  100. package/dist/assets/index.html +2 -2
  101. package/dist/assets/plugins/assets/base-CKKRZ7-h.css +2 -0
  102. package/dist/assets/plugins/assets/browserCaptureWorklet-Droj0fW0-Droj0fW0.js +13 -0
  103. package/dist/assets/plugins/assets/ibm-plex-sans-cyrillic-ext-wght-normal-d45eAU9y.woff2 +0 -0
  104. package/dist/assets/plugins/assets/ibm-plex-sans-cyrillic-wght-normal-BAAhND-U.woff2 +0 -0
  105. package/dist/assets/plugins/assets/ibm-plex-sans-greek-wght-normal-CmyJS8uq.woff2 +0 -0
  106. package/dist/assets/plugins/assets/ibm-plex-sans-latin-ext-wght-normal-CIII54If.woff2 +0 -0
  107. package/dist/assets/plugins/assets/ibm-plex-sans-latin-wght-normal-IvpUvPa2.woff2 +0 -0
  108. package/dist/assets/plugins/assets/ibm-plex-sans-vietnamese-wght-normal-Dg1JeJN0.woff2 +0 -0
  109. package/dist/assets/plugins/assets/jetbrains-mono-cyrillic-ext-wght-normal-EocZY2iu.woff2 +0 -0
  110. package/dist/assets/plugins/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
  111. package/dist/assets/plugins/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
  112. package/dist/assets/plugins/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
  113. package/dist/assets/plugins/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
  114. package/dist/assets/plugins/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
  115. package/dist/assets/plugins/assets/sileroVadWorker-D894njUe-DjN_BMWf.mjs +110 -0
  116. package/dist/assets/plugins/assets/silero_vad_v6.2.1-SjbCxFXk-SjbCxFXk.onnx +0 -0
  117. package/dist/assets/plugins/chunks/po-web-runtime-BJDT6Lbw.js +1 -0
  118. package/dist/assets/plugins/compositions.json +1 -0
  119. package/dist/assets/plugins/slots/approval.293d9a00-BXIhaPlQ.js +2 -0
  120. package/dist/assets/plugins/slots/artifacts.24567664-ZzR0gbvy.js +1 -0
  121. package/dist/assets/plugins/slots/author.0998a880-DAbA-7rb.js +93 -0
  122. package/dist/assets/plugins/slots/autocompact.dd97d013-IVq4Z6qm.js +1 -0
  123. package/dist/assets/plugins/slots/builtin-tools.36d7400b-CpCLjRRN.js +7 -0
  124. package/dist/assets/plugins/slots/codemode.8eaee717-VWt9PqsU.js +10 -0
  125. package/dist/assets/plugins/slots/domain.5e95fc37-5PIUBqDe.js +1 -0
  126. package/dist/assets/plugins/slots/edit.385c9aa9-DNAjPNG5.js +7 -0
  127. package/dist/assets/plugins/slots/files.daf34ed8-CQaTz0i1.js +2 -0
  128. package/dist/assets/plugins/slots/goal.77ec9930-B8EkarBq.js +1 -0
  129. package/dist/assets/plugins/slots/grep.02052cdc-CIRhO2gY.js +1 -0
  130. package/dist/assets/plugins/slots/help.ecd4c0f9-naMF9NN1.js +3 -0
  131. package/dist/assets/plugins/slots/log.a86eb6d0-D5__rAZJ.js +4 -0
  132. package/dist/assets/plugins/slots/mcp.974af249-DPNHn9XH.js +109 -0
  133. package/dist/assets/plugins/slots/plan.bafb8f68-C5GEpybF.js +3 -0
  134. package/dist/assets/plugins/slots/profile.48851a1d-yX6tzV3x.js +1 -0
  135. package/dist/assets/plugins/slots/prompts.723d7748-B7zpPeoF.js +3 -0
  136. package/dist/assets/plugins/slots/read.46bf6536-Cw5Z5z5T.js +1 -0
  137. package/dist/assets/plugins/slots/runner.53e9bd76-CiQR_FPX.js +8 -0
  138. package/dist/assets/plugins/slots/skill.086701a4-CL6h_F-x.js +4 -0
  139. package/dist/assets/plugins/slots/vault.ac9935c8-DKERQYg4.js +1 -0
  140. package/dist/assets/plugins/slots/voice.e85ca7f9-DEgb-U9m.js +1 -0
  141. package/dist/assets/pwa/pwa.js +12 -12
  142. package/dist/assets/pwa/sw.js +4 -4
  143. package/dist/{atomicJson-BJfPFSYF.js → atomicJson-C_7F2zD1.js} +2 -3
  144. package/dist/azure-openai-config-COZUaRzM.js +55 -0
  145. package/dist/azure-openai-responses-Cs4k2HOd.js +183 -0
  146. package/dist/{backgroundWork-CeFrbRnj.js → backgroundWork-B1mPDYlf.js} +1 -1
  147. package/dist/browser-BWf8OMfl.js +3 -0
  148. package/dist/childSession-Cf2-kH4O.js +22 -0
  149. package/dist/classifier-shared-IhSH9hhh.js +106 -0
  150. package/dist/cloudflare-workers-ai-system-one-BNnc8MuH.js +52 -0
  151. package/dist/{codemode-DbPu0yJN.js → codemode-DQFmrosw.js} +5 -2
  152. package/dist/contracts-DD3f1Lpn.js +19 -0
  153. package/dist/diagnostics-1lYFeSJe.js +131 -0
  154. package/dist/{server-D3PQk1Gt.js → dist-B-vqs6tA.js} +1 -546
  155. package/dist/dist-Dvx5mlIR.js +50 -0
  156. package/dist/env-api-keys-Bow6MJe2.js +32 -0
  157. package/dist/error-body-CJk7jMUh.js +102 -0
  158. package/dist/esm-BKJy3O9-.js +1553 -0
  159. package/dist/exports-B0WMEXCP.js +34 -0
  160. package/dist/{remoteMcp-CMqZldeA.js → exports-D09VsUk-.js} +1153 -175
  161. package/dist/{exports-BNZz2DNU.js → exports-nV43ShA7.js} +25 -9
  162. package/dist/{extensionFile-CXOa5G4C.js → extensionFile-DNM4xsje.js} +26 -2
  163. package/dist/github-copilot-headers-D1RedfLn.js +22 -0
  164. package/dist/google-generative-ai-DXTILNT0.js +328 -0
  165. package/dist/google-shared-e4JDCTVP.js +19588 -0
  166. package/dist/google-vertex-a1lzvJfq.js +374 -0
  167. package/dist/{domains-BNjGTOPj.js → harnessState-Dwrk3lfv.js} +175 -16
  168. package/dist/{harnessStore-BT706Ly6.js → harnessStore-Z7yDLO45.js} +4 -5
  169. package/dist/hash-Dt6RIbkn.js +16 -0
  170. package/dist/headers-CwtEVQvr.js +17 -0
  171. package/dist/help-w6vVEZGL.js +101 -0
  172. package/dist/hubChannel-Cm-sxOvU.js +21 -0
  173. package/dist/hubRevisions-58pU2dW5.js +363 -0
  174. package/dist/identity-BgfHobJH.js +165 -0
  175. package/dist/index.edge-COJJ_Dv2.js +937 -0
  176. package/dist/index.edge-ChYa2LU4.js +14 -0
  177. package/dist/index.edge-ClLTmPFz.js +191 -0
  178. package/dist/index.edge-DyYmurS7.js +62 -0
  179. package/dist/index.edge-K0w5auwG.js +56 -0
  180. package/dist/index.edge-Xa5LLtxz.js +67 -0
  181. package/dist/iso-BPQViXM8.js +10 -0
  182. package/dist/{layeredConfig-DPQAnlXD.js → layeredConfig-CUkYUs1f.js} +193 -15
  183. package/dist/{majorModes-DbCfLZH3.js → majorModes-BB0PXgFn.js} +4 -14
  184. package/dist/majorModes-C7vtBs4D.js +1 -0
  185. package/dist/{mcpProjection-BsP0IEnb.js → mcpProjection-BtKzB6oK.js} +2 -2
  186. package/dist/migrations-5gbLIQIc.js +32 -0
  187. package/dist/mistral-conversations-CLwhVDjA.js +689 -0
  188. package/dist/modeDefinition-C3Zbrw48.js +44 -0
  189. package/dist/models-Chzm15vC.js +1511 -0
  190. package/dist/narration-CpRurWLO.js +127 -0
  191. package/dist/node-BT4GsJQp.js +2479 -0
  192. package/dist/node-DytJOfYf.js +23 -0
  193. package/dist/notification-kckG3leF.js +102 -0
  194. package/dist/openai-codex-responses-DRMONxDE.js +1210 -0
  195. package/dist/openai-completions-CcNhAv8l.js +984 -0
  196. package/dist/openai-decisions-BsFjaAGw.js +142 -0
  197. package/dist/openai-kPrtlgjl.js +17357 -0
  198. package/dist/openai-prompt-cache-Bc6qNWt0.js +8 -0
  199. package/dist/openai-responses-C5Gp2UOV.js +281 -0
  200. package/dist/openai-responses-shared-BbSi-wBR.js +661 -0
  201. package/dist/openrouter-cost-CvC52g3b.js +30 -0
  202. package/dist/openrouter-images-BoHl8g8p.js +124 -0
  203. package/dist/{hubChannel-BHQyzcOo.js → packageApi-t1oCjNDU.js} +4 -41
  204. package/dist/photon_rs_bg.wasm +0 -0
  205. package/dist/pi-messages-BXfrZLC7.js +312 -0
  206. package/dist/piConfig-DQzlbPY4.js +126 -0
  207. package/dist/piSettings-Cf1QofNe.js +1 -0
  208. package/dist/platform-BIEiM4TG.js +113 -0
  209. package/dist/pluginContributions-Be9EnCAW.js +16 -0
  210. package/dist/pluginProtocol-BqXXyI4z.js +80 -0
  211. package/dist/{protocol-Xpm_mCNN.js → protocol-DDL8geoS.js} +2 -2
  212. package/dist/provider-env-CxhHUFiF.js +38 -0
  213. package/dist/provider-retry-BUoezuw8.js +79 -0
  214. package/dist/sanitize-unicode-C3Ec8oL6.js +26 -0
  215. package/dist/sealedChannel-BeWNTWys.js +27 -0
  216. package/dist/server-AbXyhXlY.js +217 -0
  217. package/dist/server-B6dqQoh2.js +1518 -0
  218. package/dist/server-BIHo9TFu.js +505 -0
  219. package/dist/{server-BZh1ZXz_.js → server-BJ7DNzCp.js} +8 -19
  220. package/dist/server-BO-j_GbD.js +15106 -0
  221. package/dist/{server-D4W7EdJY.js → server-BQzAiMns.js} +16 -16
  222. package/dist/server-BR7SZtj7.js +3125 -0
  223. package/dist/{server-BE6VqEiA.js → server-BT2ORK83.js} +20 -12
  224. package/dist/server-BbSHYRnY.js +295 -0
  225. package/dist/server-BqoKlEGk.js +1806 -0
  226. package/dist/{server-tvgQ99rv.js → server-Busl0pQI.js} +370 -120
  227. package/dist/server-CIHM4jqu.js +1116 -0
  228. package/dist/server-CgWSSdvd.js +576 -0
  229. package/dist/{server-Dpgh8PDh.js → server-Co_UWKrR.js} +14 -5
  230. package/dist/{server-BAAL9-NA.js → server-CuEPb7u-.js} +3 -10
  231. package/dist/{server-Dt4y1rZD.js → server-D40q2Jpx.js} +47 -27
  232. package/dist/server-DCyf2Asb.js +679 -0
  233. package/dist/server-DH7PfLln.js +148 -0
  234. package/dist/server-DJ8bc89M.js +934 -0
  235. package/dist/server-DYdp0W9v.js +489 -0
  236. package/dist/server-DsdPEYGu.js +639 -0
  237. package/dist/server-DymH4Ucq.js +189 -0
  238. package/dist/server-IqECnUrb.js +834 -0
  239. package/dist/{server-36iuA3MI.js → server-KBgW77zh.js} +3 -3
  240. package/dist/server-RW_9R3R3.js +1522 -0
  241. package/dist/server-aUit8j6r.js +1028 -0
  242. package/dist/{server-DJAanjoI.js → server-gifRriZK.js} +491 -103
  243. package/dist/server-nkUlqnAL.js +2658 -0
  244. package/dist/server-oxyEbv1a.js +1256 -0
  245. package/dist/{server-D8ndq0wL.js → server-ub3s16Mc.js} +11 -9
  246. package/dist/{build-2gFaVEfG.js → serverPlugin-CELT6P0Q.js} +3946 -3
  247. package/dist/{sessionConfig-rBQgzXlT.js → sessionConfig-RQGvfm6E.js} +550 -760
  248. package/dist/simple-options-CFzI5Pd_.js +156 -0
  249. package/dist/streaming-json-BWTHTwz-.js +858 -0
  250. package/dist/system-one-shared-CiIrx29d.js +132 -0
  251. package/dist/{notification-D76PSL7r.js → telemetry-Csv1ZxAn.js} +1 -92
  252. package/dist/transform-messages-D77af7Bx.js +356 -0
  253. package/dist/truncate-M3KbFyVj.js +89 -0
  254. package/dist/{server-A-_GFpPr.js → type-ASYnCGVW.js} +10 -1031
  255. package/dist/typesafe-system-one-DGxeggJh.js +37 -0
  256. package/dist/uuid-B0QJx6Kr.js +31 -0
  257. package/dist/{validation-D77NZBrx.js → validation-BJxVSAwx.js} +8 -3
  258. package/dist/{value-Djvc2foV.js → value-_W31So3B.js} +1 -1
  259. package/dist/vaultSettings-Di3n5YIg.js +328 -0
  260. package/dist/voiceTools-RMn4HvWo.js +246 -0
  261. package/dist/web-DCP7ELJj.js +3 -0
  262. package/dist/worker.js +95288 -49863
  263. package/dist/workflow-B7qx0Vv9.js +79 -0
  264. package/package.json +37 -22
  265. package/wrangler.jsonc +4 -2
  266. package/dist/assets/assets/channel-CMrEzemr.js +0 -2
  267. package/dist/assets/assets/chunk-XXDRQBXY-CFf0S6bN.js +0 -2
  268. package/dist/assets/assets/flowDiagram-IUGLLWBU-BhGbWVf0.js +0 -1
  269. package/dist/assets/assets/index-Bx_K4Joy.js +0 -155
  270. package/dist/assets/assets/index-DZM68mTk.css +0 -1
  271. package/dist/assets/assets/swimlanesDiagram-AYQRV4AK-q91tR8ri.js +0 -9
  272. package/dist/contextProjection-DVP2Vc5j.js +0 -188
  273. package/dist/harnessState-gmzJcPGt.js +0 -88
  274. package/dist/harnessStore-BiH9vSuD.js +0 -1
  275. package/dist/index.edge-BgSx_gRO.js +0 -45
  276. package/dist/majorModes-BvWNqoHt.js +0 -1
  277. package/dist/piSettings-B6fsgIBA.js +0 -1
  278. package/dist/platform-B4AAgwJ0.js +0 -16
  279. package/dist/platformFiles-C_bXo4Ig.js +0 -39
  280. package/dist/server-BZaPPoQp.js +0 -592
  281. package/dist/server-D75MWDhB.js +0 -118
  282. package/dist/server-r358hzQg.js +0 -280
  283. package/dist/serverPlugin-BOI6c6s5.js +0 -3393
@@ -1,592 +0,0 @@
1
- import { B as requirePoFs, c as nodeHost, ct as withAbortSignal, f as getOrThrow, o as poHomeDirectory, ot as BACKGROUND_CONTEXT, rt as composeServerProviderOverrides } from "./serverPlugin-BOI6c6s5.js";
2
- import { A as Integer, G as _Object_, M as Boolean$1, Q as _Array_, U as Unknown, _ as Union, k as Literal, q as Optional, y as String$1 } from "./build-2gFaVEfG.js";
3
- import "./value-Djvc2foV.js";
4
- import { r as removePath } from "./platformFiles-C_bXo4Ig.js";
5
- import { c as defineRoute, f as defineServerPlugin, l as defineRoutedContribution, n as composeRootInjects, o as defineResource, s as defineRoot, t as composeRootHooks } from "./extensionFile-CXOa5G4C.js";
6
- import { n as readPackageResource, t as packageResourcePath } from "./index.edge-BgSx_gRO.js";
7
- import "./platform-B4AAgwJ0.js";
8
- import "./layeredConfig-DPQAnlXD.js";
9
- import "./piSettings-B6fsgIBA.js";
10
- import { a as expandDomainNames, n as loadDomainsAsync, o as isRemotePluginSource, r as resolvePluginEntriesAsync, t as listDomainNamesAsync } from "./domains-BNjGTOPj.js";
11
- import { t as loadHarnessStateAsync } from "./harnessStore-BT706Ly6.js";
12
- import { i as readPoCodemode, n as PO_CODEMODE_SERVICE } from "./codemode-DbPu0yJN.js";
13
- import "./harnessStore-BiH9vSuD.js";
14
- import { r as PO_USER_MCP_CONFIG_FILE, t as PO_MCP_PROJECTION_RESOLVER_SERVICE } from "./mcpProjection-BsP0IEnb.js";
15
- //#region ../../foundations/po-domain/src/services/mcpFilter/core.ts
16
- /**
17
- * Unions the mcp allowlists of the selected domains in a loaded manifest.
18
- *
19
- * Returns undefined when any selected domain omits `mcp`, which means "give me
20
- * everything". Filtering only kicks in once every selected domain has opted in,
21
- * so a domain that has not been migrated yet cannot silently lose its tools.
22
- */
23
- function mcpAllowlistOf(manifest, domainNames) {
24
- const expanded = expandDomainNames(manifest, domainNames);
25
- if (expanded.length === 0) return void 0;
26
- const servers = /* @__PURE__ */ new Set();
27
- const proxy = /* @__PURE__ */ new Set();
28
- for (const name of expanded) {
29
- const allowlist = manifest.domains[name]?.mcp;
30
- if (!allowlist) return void 0;
31
- for (const server of allowlist.servers ?? []) servers.add(server);
32
- for (const upstream of allowlist.proxy ?? []) proxy.add(upstream);
33
- }
34
- return {
35
- servers: [...servers],
36
- proxy: [...proxy]
37
- };
38
- }
39
- /** `resolveMcpAllowlist` over an injected FileSystem. */
40
- async function resolveMcpAllowlistAsync(fs, repoRoot, domainNames, context, homeDirectory) {
41
- return mcpAllowlistOf(await loadDomainsAsync(fs, repoRoot, context, homeDirectory), domainNames);
42
- }
43
- //#endregion
44
- //#region ../../foundations/po-domain/src/services/pluginMaterializer/index.edge.ts
45
- /**
46
- * Local plugin entries pass through unchanged. Remote entries need git or upm
47
- * on the host plus an exclusive-create install marker, so they fail clearly.
48
- */
49
- async function materializePluginEntries(entries, _options = {}) {
50
- return entries.map((entry) => {
51
- if (entry.source && isRemotePluginSource(entry.source)) throw new Error(`Remote plugin ${entry.name ?? entry.directory} cannot be installed on the edge: installing git or npm plugins needs the Node host.`);
52
- return entry;
53
- });
54
- }
55
- //#endregion
56
- //#region ../../foundations/po-domain/src/services/resourceCollector/index.edge.ts
57
- /** Resource staging copies plugin trees under POSIX modes and a home-scoped manifest cache; M1 keeps it on Node. */
58
- function nodeOnly(name) {
59
- throw new Error(`${name} is not available on the edge: plugin resource staging needs the Node host.`);
60
- }
61
- async function stageMcpResources(_repoRoot, _plugins, _options) {
62
- return nodeOnly("stageMcpResources");
63
- }
64
- //#endregion
65
- //#region ../../foundations/po-domain/src/extensions/workspaces/sessions/(backend)/_lib/domainServerResources.ts
66
- /** The optional plugin folder of reusable code-mode scripts. */
67
- const CODEMODE_FOLDER = "codemode";
68
- /**
69
- * Retain valid domains behind selection conditions; a broken neighbor must not prevent startup.
70
- * Also finds each plugin's `codemode/` folder; code mode shows only the session's active domains.
71
- */
72
- async function domainServerResources(context, fs, io) {
73
- const scripts = [];
74
- const home = context.environment.HOME ?? nodeHost.homeDirectory();
75
- for (const domain of await listDomainNamesAsync(fs, context.repoRoot, io, home)) try {
76
- const plugins = await materializePluginEntries(await resolvePluginEntriesAsync(fs, context.repoRoot, [domain], [], io, home));
77
- for (const plugin of plugins) {
78
- const directory = `${plugin.directory}/${CODEMODE_FOLDER}`;
79
- if ((await fs.listDir(directory, io)).ok) scripts.push({
80
- domain,
81
- directory
82
- });
83
- }
84
- } catch (error) {
85
- await context.client.notify({
86
- title: `Po domain ${domain} unavailable`,
87
- body: error instanceof Error ? error.message : String(error),
88
- level: "warning"
89
- });
90
- }
91
- return { scripts };
92
- }
93
- //#endregion
94
- //#region ../../foundations/po-domain/src/extensions/workspaces/sessions/(backend)/root.server.ts
95
- var root_server_default = defineRoot(async ({ agent, context: root, signal }) => {
96
- const services = [];
97
- if (!agent) return {
98
- value: { resources: [] },
99
- services
100
- };
101
- const fs = requirePoFs(root);
102
- const io = withAbortSignal(signal, BACKGROUND_CONTEXT);
103
- const execution = agent.context;
104
- const home = execution.environment.HOME ?? nodeHost.homeDirectory();
105
- const resolver = { async resolve(domains) {
106
- const { state } = await loadHarnessStateAsync(fs, { ...execution.environment }, io);
107
- const directory = getOrThrow(await fs.createTempDir("po-domain-mcp-", io));
108
- try {
109
- const plugins = await materializePluginEntries(await resolvePluginEntriesAsync(fs, execution.repoRoot, [...domains], [...state.pluginDirectories], io, home));
110
- return {
111
- projection: (await stageMcpResources(execution.repoRoot, plugins, {
112
- enabled: true,
113
- temporaryDirectory: directory,
114
- mcpAllowlist: await resolveMcpAllowlistAsync(fs, execution.repoRoot, [...domains], io),
115
- userMcpConfigPath: `${poHomeDirectory(home, execution.environment)}/${PO_USER_MCP_CONFIG_FILE}`
116
- })).mcpProjection,
117
- cleanup: () => removePath(fs, directory, BACKGROUND_CONTEXT)
118
- };
119
- } catch (error) {
120
- await removePath(fs, directory, BACKGROUND_CONTEXT);
121
- throw error;
122
- }
123
- } };
124
- services.push((cordis) => {
125
- cordis.plugin((provider) => {
126
- provider.provide(PO_MCP_PROJECTION_RESOLVER_SERVICE, resolver);
127
- });
128
- });
129
- const { scripts } = await domainServerResources(agent.context, fs, io);
130
- if (scripts.length > 0) root.inject([PO_CODEMODE_SERVICE], (scoped) => {
131
- const codemode = readPoCodemode(scoped);
132
- const registrations = scripts.map((entry) => codemode?.registerScripts("@agimon-ai/po-domain", entry));
133
- return () => {
134
- for (const registration of registrations) registration?.dispose();
135
- };
136
- });
137
- return {
138
- value: { resources: [] },
139
- services
140
- };
141
- });
142
- //#endregion
143
- //#region ../../foundations/po-domain/src/extensions/workspaces/sessions/(backend)/api/domains/route.server.ts
144
- var route_server_default = defineRoute(({ agent }) => ({
145
- basePath: "domains",
146
- start: () => ({
147
- fetch(request) {
148
- if (new URL(request.url).pathname !== "/current") return Response.json({ error: "Not found" }, { status: 404 });
149
- if (request.method !== "GET") return Response.json({ error: "Method not allowed" }, {
150
- status: 405,
151
- headers: { Allow: "GET" }
152
- });
153
- if (!agent) return Response.json({ error: "Session agent unavailable" }, { status: 404 });
154
- const selection = agent.context.selection;
155
- return Response.json({ domains: selection.domains });
156
- },
157
- close() {}
158
- })
159
- }));
160
- //#endregion
161
- //#region ../../core/po-core/src/schemas/skills.ts
162
- /**
163
- * The custom session entry journaled once Pi has rebuilt its resource catalog
164
- * for a reload.
165
- *
166
- * A reload is the only thing that changes which skills exist, and Pi publishes
167
- * nothing for it: the whole wire record of a `/domains` switch is the single
168
- * `response:prompt` for the command that triggered it. An RPC client therefore
169
- * has no way to learn that the `get_commands` answer it cached, which is what
170
- * the web cockpit completes `$` from, now describes the previous domains.
171
- *
172
- * This entry is that missing signal. It rides Pi's `entry_appended` frames the
173
- * way the minor-mode catalog projection does, so it needs no new protocol, and
174
- * a custom entry with no registered renderer is invisible in the TUI.
175
- */
176
- const PO_RESOURCE_CATALOG_ENTRY_TYPE = "po-resource-catalog";
177
- const SkillSourceNameSchema = String$1({
178
- minLength: 1,
179
- maxLength: 128,
180
- pattern: "^[A-Za-z0-9@][A-Za-z0-9@/._:-]*$"
181
- });
182
- _Object_({
183
- source: SkillSourceNameSchema,
184
- /** Absolute directories, the same ones the source hands `resources_discover`. */
185
- directories: _Array_(String$1({ minLength: 1 }))
186
- }, { additionalProperties: false });
187
- const VOICE_TOOL_MAX_TIMEOUT_MS = 3e4;
188
- const SAFE_IDENTIFIER = /^[A-Za-z0-9@][A-Za-z0-9@/._:-]*$/u;
189
- const SAFE_NAME = /^[a-z][a-z0-9_:-]*$/u;
190
- const MAX_ORDER = 1e3;
191
- const VOICE_TOOL_ERROR_CODE = {
192
- hostUnavailable: "VOICE_TOOL_HOST_UNAVAILABLE",
193
- inactive: "VOICE_TOOL_INACTIVE",
194
- staleSession: "VOICE_TOOL_STALE_SESSION",
195
- staleCatalog: "VOICE_TOOL_STALE_CATALOG",
196
- notFound: "VOICE_TOOL_NOT_FOUND",
197
- nameConflict: "VOICE_TOOL_NAME_CONFLICT",
198
- invalidInput: "VOICE_TOOL_INVALID_INPUT",
199
- invalidResult: "VOICE_TOOL_INVALID_RESULT",
200
- executionFailed: "VOICE_TOOL_EXECUTION_FAILED",
201
- timeout: "VOICE_TOOL_TIMEOUT",
202
- aborted: "VOICE_TOOL_ABORTED",
203
- cancelled: "VOICE_TOOL_CANCELLED",
204
- registrationDisposed: "VOICE_TOOL_REGISTRATION_DISPOSED",
205
- sessionShutdown: "VOICE_TOOL_SESSION_SHUTDOWN",
206
- batchStopped: "VOICE_TOOL_BATCH_STOPPED",
207
- reloadQueued: "VOICE_TOOL_RELOAD_QUEUED",
208
- invalidRequest: "VOICE_TOOL_INVALID_REQUEST"
209
- };
210
- VOICE_TOOL_ERROR_CODE.hostUnavailable;
211
- VOICE_TOOL_ERROR_CODE.inactive;
212
- VOICE_TOOL_ERROR_CODE.staleSession;
213
- VOICE_TOOL_ERROR_CODE.staleCatalog;
214
- VOICE_TOOL_ERROR_CODE.notFound;
215
- VOICE_TOOL_ERROR_CODE.nameConflict;
216
- VOICE_TOOL_ERROR_CODE.invalidInput;
217
- VOICE_TOOL_ERROR_CODE.invalidResult;
218
- VOICE_TOOL_ERROR_CODE.timeout;
219
- VOICE_TOOL_ERROR_CODE.aborted;
220
- VOICE_TOOL_ERROR_CODE.executionFailed;
221
- VOICE_TOOL_ERROR_CODE.batchStopped;
222
- _Object_({
223
- source: String$1({
224
- minLength: 1,
225
- maxLength: 128,
226
- pattern: SAFE_IDENTIFIER.source
227
- }),
228
- id: String$1({
229
- minLength: 1,
230
- maxLength: 128,
231
- pattern: SAFE_IDENTIFIER.source
232
- }),
233
- name: String$1({
234
- minLength: 1,
235
- maxLength: 128,
236
- pattern: SAFE_NAME.source
237
- }),
238
- label: String$1({
239
- minLength: 1,
240
- maxLength: 96
241
- }),
242
- description: String$1({
243
- minLength: 1,
244
- maxLength: 240
245
- }),
246
- order: Integer({
247
- minimum: 0,
248
- maximum: MAX_ORDER
249
- }),
250
- inputSchema: Unknown(),
251
- resultSchema: Unknown(),
252
- timeoutMs: Optional(Integer({
253
- minimum: 1,
254
- maximum: VOICE_TOOL_MAX_TIMEOUT_MS
255
- }))
256
- }, { additionalProperties: false });
257
- const VoiceToolBatchCallSchema = _Object_({
258
- name: String$1({
259
- minLength: 1,
260
- maxLength: 128,
261
- pattern: SAFE_NAME.source,
262
- description: "Capability name exactly as describe_voice_tools reported it."
263
- }),
264
- input: Unknown({ description: "Arguments for this capability, shaped by the input_schema that describe_voice_tools returns when called with names. Pass an empty object for a capability that takes none." })
265
- }, { additionalProperties: false });
266
- _Object_({ names: Optional(_Array_(String$1({
267
- minLength: 1,
268
- maxLength: 128,
269
- pattern: SAFE_NAME.source
270
- }), {
271
- maxItems: 16,
272
- description: "Capabilities to describe in full, including their input schemas. Omit to list every registered capability by name and description only."
273
- })) }, { additionalProperties: false });
274
- const VoiceToolCatalogTokenSchema = String$1({
275
- minLength: 1,
276
- maxLength: 512,
277
- description: "Opaque catalog token from the most recent describe_voice_tools result, copied verbatim. It is invalidated whenever a capability registers or deregisters and whenever autonomous voice is activated or deactivated."
278
- });
279
- _Object_({
280
- catalogToken: VoiceToolCatalogTokenSchema,
281
- calls: _Array_(VoiceToolBatchCallSchema, {
282
- minItems: 1,
283
- maxItems: 16,
284
- description: "Capability calls to run in this order. All of them are validated before any of them run, so a single invalid call rejects the whole batch."
285
- })
286
- }, { additionalProperties: false });
287
- const VoiceToolErrorCodeSchema = Union([
288
- Literal("VOICE_TOOL_HOST_UNAVAILABLE"),
289
- Literal("VOICE_TOOL_INACTIVE"),
290
- Literal("VOICE_TOOL_STALE_SESSION"),
291
- Literal("VOICE_TOOL_STALE_CATALOG"),
292
- Literal("VOICE_TOOL_NOT_FOUND"),
293
- Literal("VOICE_TOOL_NAME_CONFLICT"),
294
- Literal("VOICE_TOOL_INVALID_INPUT"),
295
- Literal("VOICE_TOOL_INVALID_RESULT"),
296
- Literal("VOICE_TOOL_EXECUTION_FAILED"),
297
- Literal("VOICE_TOOL_TIMEOUT"),
298
- Literal("VOICE_TOOL_ABORTED"),
299
- Literal("VOICE_TOOL_CANCELLED"),
300
- Literal("VOICE_TOOL_REGISTRATION_DISPOSED"),
301
- Literal("VOICE_TOOL_SESSION_SHUTDOWN"),
302
- Literal("VOICE_TOOL_BATCH_STOPPED"),
303
- Literal("VOICE_TOOL_RELOAD_QUEUED"),
304
- Literal("VOICE_TOOL_INVALID_REQUEST")
305
- ]);
306
- const VoiceToolErrorSchema = _Object_({
307
- code: VoiceToolErrorCodeSchema,
308
- message: String$1({
309
- minLength: 1,
310
- maxLength: 240
311
- }),
312
- retryable: Optional(Boolean$1())
313
- }, { additionalProperties: false });
314
- const VoiceToolConflictDiagnosticSchema = _Object_({
315
- name: String$1({
316
- minLength: 1,
317
- maxLength: 128
318
- }),
319
- message: String$1({
320
- minLength: 1,
321
- maxLength: 240
322
- }),
323
- claims: _Array_(_Object_({
324
- source: String$1({
325
- minLength: 1,
326
- maxLength: 128
327
- }),
328
- id: String$1({
329
- minLength: 1,
330
- maxLength: 128
331
- })
332
- }, { additionalProperties: false }), {
333
- minItems: 2,
334
- maxItems: 16
335
- })
336
- }, { additionalProperties: false });
337
- const VoiceToolCatalogEntrySchema = _Object_({
338
- source: String$1({
339
- minLength: 1,
340
- maxLength: 128
341
- }),
342
- id: String$1({
343
- minLength: 1,
344
- maxLength: 128
345
- }),
346
- name: String$1({
347
- minLength: 1,
348
- maxLength: 128
349
- }),
350
- label: String$1({
351
- minLength: 1,
352
- maxLength: 96
353
- }),
354
- description: String$1({
355
- minLength: 1,
356
- maxLength: 240
357
- }),
358
- order: Integer({
359
- minimum: 0,
360
- maximum: MAX_ORDER
361
- }),
362
- inputSchema: Unknown(),
363
- enabled: Boolean$1()
364
- }, { additionalProperties: false });
365
- _Object_({
366
- hostGeneration: String$1({
367
- minLength: 1,
368
- maxLength: 256
369
- }),
370
- catalogRevision: Integer({ minimum: 0 }),
371
- catalogToken: VoiceToolCatalogTokenSchema,
372
- tools: _Array_(VoiceToolCatalogEntrySchema, { maxItems: 128 }),
373
- conflicts: _Array_(VoiceToolConflictDiagnosticSchema, { maxItems: 128 }),
374
- unknownNames: _Array_(String$1({
375
- minLength: 1,
376
- maxLength: 128
377
- }), { maxItems: 16 })
378
- }, { additionalProperties: false });
379
- const VoiceToolBatchItemResultSchema = _Object_({
380
- index: Integer({
381
- minimum: 0,
382
- maximum: 16
383
- }),
384
- name: String$1({
385
- minLength: 1,
386
- maxLength: 128
387
- }),
388
- status: Union([
389
- Literal("completed"),
390
- Literal("failed"),
391
- Literal("cancelled"),
392
- Literal("not_executed"),
393
- Literal("preflight_failed")
394
- ]),
395
- result: Optional(Unknown()),
396
- error: Optional(VoiceToolErrorSchema)
397
- }, { additionalProperties: false });
398
- _Object_({
399
- status: Union([
400
- Literal("completed"),
401
- Literal("rejected"),
402
- Literal("cancelled"),
403
- Literal("stopped")
404
- ]),
405
- catalogToken: VoiceToolCatalogTokenSchema,
406
- results: _Array_(VoiceToolBatchItemResultSchema, { maxItems: 16 }),
407
- errors: Optional(_Array_(VoiceToolErrorSchema, { maxItems: 16 }))
408
- }, { additionalProperties: false });
409
- //#endregion
410
- //#region ../../foundations/po-domain/src/types/domains.ts
411
- /**
412
- * The only names a domain, an operation or a handoff token may carry.
413
- *
414
- * Selections arrive from the model and from the command line, and every one of
415
- * them ends up in a filesystem path or a process environment variable, so the
416
- * shape is constrained once here and reused by the schema and the validator.
417
- */
418
- const SAFE_DOMAIN_NAME = /^[A-Za-z0-9@][A-Za-z0-9@/._:-]*$/u;
419
- //#endregion
420
- //#region ../../foundations/po-domain/src/services/domainText/index.ts
421
- const DOMAIN_SEPARATOR = ",";
422
- const DOMAIN_COMMAND = "domains";
423
- /** Splits the comma-separated argument the command and the autocomplete share. */
424
- function splitDomains(value) {
425
- return value.split(DOMAIN_SEPARATOR).map((item) => item.trim()).filter(Boolean);
426
- }
427
- function pickerTitle(listing) {
428
- return `Domains (active: ${listing.effective.join(", ") || "(none)"})`;
429
- }
430
- const MARK_ON = "[x]";
431
- const MARK_OFF = "[ ]";
432
- const OPTION_PREFIX = /^\[[ x]\] /;
433
- /**
434
- * Rows for a single-pick select where domains compose: each row shows the
435
- * membership it would flip, so a client without a multi-select still reaches
436
- * every set one toggle at a time.
437
- */
438
- function domainToggleOptions(listing) {
439
- const active = new Set(listing.effective);
440
- return listing.available.map((name) => `${active.has(name) ? MARK_ON : MARK_OFF} ${name}`);
441
- }
442
- /** The domain a toggle row names. */
443
- function toggleOptionDomain(option) {
444
- return option.replace(OPTION_PREFIX, "").trim();
445
- }
446
- /** The effective set with one domain flipped, order preserved for the rest. */
447
- function toggledDomains(effective, name) {
448
- return effective.includes(name) ? effective.filter((domain) => domain !== name) : [...effective, name];
449
- }
450
- /**
451
- * Deduplicates a requested selection and rejects anything unsafe.
452
- *
453
- * Bounded before the manifest is read, because a selection large enough to
454
- * matter comes from the model rather than from a person typing the command.
455
- */
456
- function normalizeDomainNames(values) {
457
- if (values.length > 32) throw new Error(`A maximum of 32 domains may be selected.`);
458
- const result = [];
459
- const seen = /* @__PURE__ */ new Set();
460
- for (const value of values) {
461
- const name = value.trim();
462
- if (!name || name.length > 128 || !SAFE_DOMAIN_NAME.test(name)) throw new Error(`Invalid domain name: ${value}`);
463
- if (seen.has(name)) continue;
464
- seen.add(name);
465
- result.push(name);
466
- }
467
- return result;
468
- }
469
- //#endregion
470
- //#region ../../foundations/po-domain/src/extensions/workspaces/sessions/(backend)/_lib/domainServerCommand.ts
471
- const DOMAIN_SELECTION_KIND = "po-domains-selection";
472
- const DOMAIN_SELECTION_VERSION = 1;
473
- /** Full-set web replies share the string transport with legacy single-toggle labels. */
474
- function domainSelectionReply(answer) {
475
- if (!answer.trimStart().startsWith("{")) return null;
476
- const reply = JSON.parse(answer);
477
- if (typeof reply !== "object" || reply === null || !("kind" in reply) || reply.kind !== DOMAIN_SELECTION_KIND || !("version" in reply) || reply.version !== DOMAIN_SELECTION_VERSION || !("domains" in reply) || !Array.isArray(reply.domains) || !reply.domains.every((name) => typeof name === "string")) throw new Error("Invalid domains selection reply");
478
- return reply.domains;
479
- }
480
- function createDomainServerCommand(host, fs) {
481
- return {
482
- name: DOMAIN_COMMAND,
483
- description: "Show or change the active Po domains.",
484
- async execute(args, execution) {
485
- const available = await listDomainNamesAsync(fs, execution.repoRoot, BACKGROUND_CONTEXT);
486
- let requested = splitDomains(args);
487
- let fullSet = false;
488
- if (requested.length === 0) {
489
- const listing = {
490
- active: [...execution.selection.domains],
491
- effective: [...execution.selection.domains],
492
- available
493
- };
494
- const selected = await execution.client.request({
495
- kind: "select",
496
- title: pickerTitle(listing),
497
- options: domainToggleOptions(listing).map((label) => ({
498
- label,
499
- value: label
500
- }))
501
- });
502
- if (typeof selected !== "string" || !selected) return;
503
- const domains = domainSelectionReply(selected);
504
- fullSet = domains !== null;
505
- requested = domains ?? toggledDomains(listing.effective, toggleOptionDomain(selected));
506
- }
507
- requested = normalizeDomainNames(requested);
508
- const unknown = requested.filter((name) => !available.includes(name));
509
- if (unknown.length > 0) throw new Error(`Unknown domain: ${unknown.join(", ")}`);
510
- if (fullSet) {
511
- const wanted = new Set(requested);
512
- const current = new Set(execution.selection.domains);
513
- requested = [...execution.selection.domains.filter((name) => wanted.has(name)), ...available.filter((name) => wanted.has(name) && !current.has(name))];
514
- }
515
- if (requested.length === execution.selection.domains.length && requested.every((name, index) => name === execution.selection.domains[index])) return;
516
- await host.changeSelection({
517
- axis: "domains",
518
- domains: requested
519
- });
520
- const projection = {
521
- version: 1,
522
- revision: Date.now()
523
- };
524
- await execution.session.appendCustomEntry(PO_RESOURCE_CATALOG_ENTRY_TYPE, projection);
525
- }
526
- };
527
- }
528
- //#endregion
529
- //#region ../../foundations/po-domain/src/extensions/workspaces/sessions/(backend)/command/domains.server.ts
530
- var domains_server_default$1 = defineRoutedContribution(({ agent, context }) => agent ? createDomainServerCommand(agent, requirePoFs(context)) : void 0, { cardinality: "optional" });
531
- //#endregion
532
- //#region ../../foundations/po-domain/src/extensions/workspaces/sessions/(backend)/resource/domains.server.ts
533
- var domains_server_default = defineRoutedContribution((context) => context.root.resources, { cardinality: "many" });
534
- //#endregion
535
- //#region ../../foundations/po-domain/src/extensions/workspaces/sessions/(backend)/resource/help-how-to-domain.server.ts
536
- var help_how_to_domain_server_default = defineResource({
537
- name: "help-how-to-domain",
538
- description: "Configure Po plugin catalogs and domain resource selections in domains.yaml. Use when creating or editing .po/domains.yaml or ~/.po/domains.yaml, choosing local, Git, or npm plugins, filtering plugin resources, setting aliases or defaults, or verifying resolved domain composition.",
539
- when: {
540
- state: { "minor-mode": "help" },
541
- attribution: {
542
- kind: "minor",
543
- mode: "help"
544
- }
545
- },
546
- kind: "skill",
547
- path: packageResourcePath("bundle:///po-domain/src/extensions/workspaces/sessions/(backend)/resource/help-how-to-domain.server.ts", "src/prompts/help-how-to-domain/SKILL.md"),
548
- read: () => readPackageResource("bundle:///po-domain/src/extensions/workspaces/sessions/(backend)/resource/help-how-to-domain.server.ts", "src/prompts/help-how-to-domain/SKILL.md")
549
- });
550
- //#endregion
551
- //#region ../../foundations/po-domain/generated/server.ts
552
- const at = (value, context) => typeof value === "function" ? value(context) : value;
553
- const many = (value, context) => {
554
- const resolved = typeof value === "function" ? value(context) : value;
555
- return Array.isArray(resolved) ? resolved : [resolved];
556
- };
557
- /* v8 ignore next -- generated normalization branch */
558
- const defined = (values) => values.filter((value) => value !== void 0);
559
- const via = (identity, value) => value === void 0 ? void 0 : {
560
- ...identity,
561
- ...value
562
- };
563
- const serverPlugin = defineServerPlugin({
564
- name: "@agimon-ai/po-domain",
565
- providerOverrides: composeServerProviderOverrides(root_server_default),
566
- injects: composeRootInjects({ session: [root_server_default] }),
567
- session: async (context) => {
568
- const scopeSession = await context.scopeRoot("session", root_server_default, context);
569
- const contextSession = {
570
- ...context,
571
- root: scopeSession.value
572
- };
573
- return {
574
- ...composeRootHooks(scopeSession),
575
- get api() {
576
- return [at(route_server_default, contextSession)];
577
- },
578
- get commands() {
579
- return defined([via({ name: "domains" }, at(domains_server_default$1, contextSession))]);
580
- },
581
- get resources() {
582
- return [...many(domains_server_default, contextSession), at(help_how_to_domain_server_default, contextSession)];
583
- },
584
- services: [...scopeSession.services ?? []],
585
- get activities() {
586
- return [...scopeSession.activities ?? []];
587
- }
588
- };
589
- }
590
- });
591
- //#endregion
592
- export { serverPlugin as default, serverPlugin };