@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
@@ -0,0 +1,576 @@
1
+ import { Hn as BACKGROUND_CONTEXT, Sn as getOrThrow, V as String$1, Wn as withAbortSignal, ht as Optional, pt as _Object_, tr as requirePoFs, v as composeServerProviderOverrides, vn as nodeHost } from "./serverPlugin-CELT6P0Q.js";
2
+ import "./platform-BIEiM4TG.js";
3
+ import { a as resolveSharedSkillsAsync, i as resolvePluginEntriesAsync, n as listDomainNamesAsync, t as readHarnessState } from "./harnessState-Dwrk3lfv.js";
4
+ import { c as defineRoot, h as defineServerPlugin, n as composeRootInjects, t as composeRootHooks, u as defineRoutedContribution } from "./extensionFile-DNM4xsje.js";
5
+ import { n as readPackageResource, t as packageResourcePath } from "./index.edge-DyYmurS7.js";
6
+ import { i as materializePluginEntries, n as skillName, r as splitFrontmatter } from "./index.edge-K0w5auwG.js";
7
+ import path from "node:path";
8
+ //#region ../../foundations/po-skill/src/constants/skillInventory.ts
9
+ /**
10
+ * How long sessions with the same inputs share one skill inventory instead of each reading the disk.
11
+ * ponytail: a skill added on disk reaches new sessions within this window, not at once; watch the
12
+ * skill roots if that lag matters.
13
+ */
14
+ const SKILL_INVENTORY_FRESH_MS = 6e4;
15
+ //#endregion
16
+ //#region ../../foundations/po-skill/src/services/mcpSkills/index.ts
17
+ const MCP_SKILLS_SERVICE = "po/discovered-mcp-skills";
18
+ /** Explicit remote provider, never a projection of the local resource registry. */
19
+ function mountMcpSkills(groups, fs, signal) {
20
+ return (context) => {
21
+ context.provide(MCP_SKILLS_SERVICE, { list(remote) {
22
+ signal.throwIfAborted();
23
+ remote.signal.throwIfAborted();
24
+ const domains = remote.selection.read().domains;
25
+ const skills = /* @__PURE__ */ new Map();
26
+ for (const group of groups) {
27
+ if (group.domains !== void 0 && !group.domains.some((domain) => domains.includes(domain))) continue;
28
+ for (const skill of group.skills) {
29
+ if (skills.has(skill.name)) continue;
30
+ skills.set(skill.name, {
31
+ name: skill.name,
32
+ description: skill.description,
33
+ async read() {
34
+ const readSignal = AbortSignal.any([signal, remote.signal]);
35
+ readSignal.throwIfAborted();
36
+ const text = getOrThrow(await fs.readTextFile(skill.filePath, withAbortSignal(readSignal, BACKGROUND_CONTEXT)));
37
+ readSignal.throwIfAborted();
38
+ return text;
39
+ }
40
+ });
41
+ }
42
+ }
43
+ return [...skills.values()];
44
+ } });
45
+ };
46
+ }
47
+ //#endregion
48
+ //#region ../../foundations/po-skill/src/schemas/mcpSkillTools.ts
49
+ const searchSkillsParameters = _Object_({ query: Optional(String$1()) });
50
+ const loadSkillParameters = _Object_({ name: String$1() });
51
+ //#endregion
52
+ //#region ../../foundations/po-skill/src/services/mcpSkillTools/index.ts
53
+ function text(text) {
54
+ return { content: [{
55
+ type: "text",
56
+ text
57
+ }] };
58
+ }
59
+ function createSessionSearchSkillsTool(host) {
60
+ return {
61
+ name: "search_skills",
62
+ label: "Search skills",
63
+ description: "Search available session skills by name or description.",
64
+ parameters: searchSkillsParameters,
65
+ annotations: {
66
+ readOnlyHint: true,
67
+ destructiveHint: false,
68
+ openWorldHint: false
69
+ },
70
+ executionMode: "parallel",
71
+ async execute(_toolCallId, { query }) {
72
+ const needle = query?.trim().toLocaleLowerCase();
73
+ const available = host.listSkills().map(({ name, description }) => ({
74
+ name,
75
+ description
76
+ }));
77
+ const matches = needle === void 0 || needle === "" ? available : available.filter(({ name, description }) => `${name}\n${description}`.toLocaleLowerCase().includes(needle));
78
+ return {
79
+ ...text(JSON.stringify(matches)),
80
+ structuredContent: { skills: matches }
81
+ };
82
+ }
83
+ };
84
+ }
85
+ function createSessionLoadSkillTool(host) {
86
+ return {
87
+ name: "load_skill",
88
+ label: "Load skill",
89
+ description: "Load the full instructions of an available session skill by exact name.",
90
+ parameters: loadSkillParameters,
91
+ executionMode: "parallel",
92
+ async execute(_toolCallId, { name }) {
93
+ const body = host.readSkill(name);
94
+ if (body === void 0) return {
95
+ ...text(`No skill named ${name} is available in this session.`),
96
+ isError: true
97
+ };
98
+ return text(body);
99
+ }
100
+ };
101
+ }
102
+ //#endregion
103
+ //#region ../../foundations/po-skill/src/services/serverInventory/catalog.ts
104
+ /**
105
+ * Pi's skill list for the system prompt, copied so the edge build matches the Node catalog without
106
+ * importing Pi's Node-only runtime. Source: @earendil-works/pi-coding-agent 1.5.0,
107
+ * dist/core/skills.js `formatSkillsForPrompt` and `escapeXml`. Keep it byte-identical to Pi's
108
+ * output; serverInventory tests compare the two.
109
+ */
110
+ function formatSkillsForPrompt(skills, fileReadTool = "read") {
111
+ const visibleSkills = skills.filter((skill) => !skill.disableModelInvocation);
112
+ if (visibleSkills.length === 0) return "";
113
+ const lines = [
114
+ "\n\nThe following skills provide specialized instructions for specific tasks.",
115
+ fileReadTool === "read" ? "Use the read tool to load a skill's file when the task matches its description." : fileReadTool === "bash" ? "Use bash to load a skill's file when the task matches its description." : "Load a skill's file when the task matches its description.",
116
+ "Resolve relative paths against the skill's directory (parent of SKILL.md). Use absolute paths in tool calls.",
117
+ "",
118
+ "<available_skills>"
119
+ ];
120
+ for (const skill of visibleSkills) {
121
+ lines.push(" <skill>");
122
+ lines.push(` <name>${escapeXml(skill.name)}</name>`);
123
+ lines.push(` <description>${escapeXml(skill.description)}</description>`);
124
+ lines.push(` <location>${escapeXml(skill.filePath)}</location>`);
125
+ lines.push(" </skill>");
126
+ }
127
+ lines.push("</available_skills>");
128
+ return lines.join("\n");
129
+ }
130
+ function escapeXml(text) {
131
+ return text.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
132
+ }
133
+ //#endregion
134
+ //#region ../../foundations/po-skill/src/services/serverInventory/grouping.ts
135
+ const LOCAL_ONLY_MCP_PACKAGES = /* @__PURE__ */ new Set([
136
+ "@agimon-ai/po-author",
137
+ "@agimon-ai/po-git",
138
+ "@agimon-ai/po-goal",
139
+ "@agimon-ai/po-help",
140
+ "@agimon-ai/po-calendar",
141
+ "@agimon-ai/po-user-feedback",
142
+ "@agimon-ai/po-voice",
143
+ "@agimon-ai/po-workflow"
144
+ ]);
145
+ async function isMcpSkillPlugin(fs, entry, context) {
146
+ if (entry.source?.type === "npm") return !LOCAL_ONLY_MCP_PACKAGES.has(entry.source.package);
147
+ const source = await fs.readTextFile(path.join(entry.directory, "package.json"), context);
148
+ if (!source.ok) return source.error.code === "not_found";
149
+ try {
150
+ const manifest = JSON.parse(source.value);
151
+ if (typeof manifest !== "object" || manifest === null || Array.isArray(manifest)) return false;
152
+ const name = manifest.name;
153
+ return typeof name === "string" && name.length > 0 && name.trim() === name && !LOCAL_ONLY_MCP_PACKAGES.has(name);
154
+ } catch {
155
+ return false;
156
+ }
157
+ }
158
+ /**
159
+ * Whether a discovered skill came from one of these paths.
160
+ *
161
+ * A source holds exact SKILL.md files for plugin and shared skills, but a bare
162
+ * directory for `.po/skills`, so membership is containment rather than
163
+ * equality.
164
+ */
165
+ function within(filePath, roots) {
166
+ const resolved = path.resolve(filePath);
167
+ return roots.some((root) => {
168
+ const base = path.resolve(root);
169
+ return resolved === base || resolved.startsWith(`${base}${path.sep}`);
170
+ });
171
+ }
172
+ /**
173
+ * One group per loaded skill, merging every source admitting that exact path.
174
+ * MCP admission is merged separately so local-only sources cannot broaden it.
175
+ */
176
+ function groupSkills(skills, sources, key) {
177
+ return skills.flatMap((skill) => {
178
+ const admitting = sources.filter((source) => within(skill.filePath, source[key]));
179
+ if (admitting.length === 0) return [];
180
+ const domains = [...new Set(admitting.flatMap((source) => source.domain === void 0 ? [] : [source.domain]))];
181
+ return [{
182
+ ...admitting.some((source) => source.domain === void 0) ? {} : { domains },
183
+ skills: [skill]
184
+ }];
185
+ });
186
+ }
187
+ //#endregion
188
+ //#region ../../foundations/po-skill/src/services/serverInventory/index.edge.ts
189
+ /** Pi's Agent Skills limits (dist/core/skills.js MAX_NAME_LENGTH and MAX_DESCRIPTION_LENGTH). */
190
+ const MAX_NAME_LENGTH = 64;
191
+ const MAX_DESCRIPTION_LENGTH = 1024;
192
+ const SKILL_FILE = "SKILL.md";
193
+ function message(error) {
194
+ return error instanceof Error ? error.message : String(error);
195
+ }
196
+ function escapeRegExp(value) {
197
+ return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
198
+ }
199
+ /** A plugin's skill subset filter, as po-domain's collectResources applies it. Undefined keeps everything. */
200
+ function keepsName(allowed, name) {
201
+ if (!allowed) return true;
202
+ return allowed.some((pattern) => pattern.includes("*") ? new RegExp(`^${pattern.split("*").map(escapeRegExp).join(".*")}$`).test(name) : pattern === name);
203
+ }
204
+ /**
205
+ * Every SKILL.md under `root`, read through the session file system.
206
+ *
207
+ * Mirrors po-domain's skill scan: `recursive` takes SKILL.md at any depth, `direct-children` only
208
+ * one level down. Symbolic links are followed, real directories are visited once so a cycle ends,
209
+ * and dot entries and node_modules are skipped as Pi's loader skips them. A file whose frontmatter
210
+ * does not parse becomes a diagnostic instead of failing the walk.
211
+ * ponytail: `.po/skills` uses the same walk, so Pi's root-level `*.md` skills and its stop at a
212
+ * directory holding SKILL.md are not reproduced; nor is `.gitignore`.
213
+ */
214
+ async function walkSkills(fs, root, discovery, context, signal, diagnostics) {
215
+ const found = [];
216
+ const visited = /* @__PURE__ */ new Set();
217
+ const walk = async (directory, depth) => {
218
+ signal.throwIfAborted();
219
+ const canonical = await fs.canonicalPath(directory, context);
220
+ if (!canonical.ok) {
221
+ if (canonical.error.code === "not_found") return;
222
+ throw canonical.error;
223
+ }
224
+ if (visited.has(canonical.value)) return;
225
+ visited.add(canonical.value);
226
+ const listed = await fs.listDir(directory, context);
227
+ if (!listed.ok) {
228
+ if (listed.error.code === "not_found" || listed.error.code === "not_directory") return;
229
+ throw listed.error;
230
+ }
231
+ const entries = [...listed.value].sort((left, right) => left.name.localeCompare(right.name));
232
+ for (const entry of entries) {
233
+ if (entry.name.startsWith(".") || entry.name === "node_modules") continue;
234
+ const candidate = path.join(directory, entry.name);
235
+ let kind = entry.kind;
236
+ let target = path.join(canonical.value, entry.name);
237
+ if (kind === "symlink") {
238
+ const resolved = await fs.canonicalPath(candidate, context);
239
+ if (!resolved.ok) continue;
240
+ const info = await fs.fileInfo(resolved.value, context);
241
+ if (!info.ok) continue;
242
+ kind = info.value.kind;
243
+ target = resolved.value;
244
+ }
245
+ if (kind === "directory") {
246
+ if (discovery === "recursive" || depth === 0) await walk(candidate, depth + 1);
247
+ continue;
248
+ }
249
+ if (kind !== "file" || entry.name !== SKILL_FILE || discovery === "direct-children" && depth !== 1) continue;
250
+ const content = await fs.readTextFile(candidate, context);
251
+ if (!content.ok) {
252
+ diagnostics.push(`${candidate}: ${content.error.message}`);
253
+ continue;
254
+ }
255
+ try {
256
+ const { attributes } = splitFrontmatter(content.value);
257
+ found.push({
258
+ path: candidate,
259
+ canonical: target,
260
+ name: skillName(candidate, attributes),
261
+ attributes
262
+ });
263
+ } catch (error) {
264
+ diagnostics.push(`${candidate}: ${message(error)}`);
265
+ }
266
+ }
267
+ };
268
+ await walk(root, 0);
269
+ return found;
270
+ }
271
+ /** Pi's Agent Skills name rules (dist/core/skills.js validateName). */
272
+ function nameErrors(name) {
273
+ const errors = [];
274
+ if (name.length > MAX_NAME_LENGTH) errors.push(`name exceeds ${MAX_NAME_LENGTH} characters (${name.length})`);
275
+ if (!/^[a-z0-9-]+$/.test(name)) errors.push("name contains invalid characters (must be lowercase a-z, 0-9, hyphens only)");
276
+ if (name.startsWith("-") || name.endsWith("-")) errors.push("name must not start or end with a hyphen");
277
+ if (name.includes("--")) errors.push("name must not contain consecutive hyphens");
278
+ return errors;
279
+ }
280
+ /**
281
+ * Pi's admission rules over the found files, in source order (dist/core/skills.js loadSkills and
282
+ * loadSkillFromFile): a missing description drops the skill, an invalid name or an overlong
283
+ * description is reported but still loads, a file reached twice loads once, and the first skill of
284
+ * a name wins with a collision diagnostic.
285
+ */
286
+ function loadSkills(found) {
287
+ const skills = /* @__PURE__ */ new Map();
288
+ const loadedFiles = /* @__PURE__ */ new Set();
289
+ const diagnostics = [];
290
+ const collisions = [];
291
+ for (const file of found) {
292
+ const description = file.attributes.description;
293
+ const hasDescription = typeof description === "string" && description.trim() !== "";
294
+ if (!hasDescription) diagnostics.push(`${file.path}: description is required`);
295
+ else if (description.length > MAX_DESCRIPTION_LENGTH) diagnostics.push(`${file.path}: description exceeds ${MAX_DESCRIPTION_LENGTH} characters (${description.length})`);
296
+ diagnostics.push(...nameErrors(file.name).map((error) => `${file.path}: ${error}`));
297
+ if (!hasDescription || loadedFiles.has(file.canonical)) continue;
298
+ if (skills.get(file.name)) {
299
+ collisions.push(`${file.path}: name "${file.name}" collision`);
300
+ continue;
301
+ }
302
+ const baseDir = path.dirname(file.path);
303
+ skills.set(file.name, {
304
+ name: file.name,
305
+ description,
306
+ filePath: file.path,
307
+ baseDir,
308
+ sourceInfo: {
309
+ path: file.path,
310
+ source: "local",
311
+ scope: "temporary",
312
+ origin: "top-level",
313
+ baseDir
314
+ },
315
+ disableModelInvocation: file.attributes["disable-model-invocation"] === true
316
+ });
317
+ loadedFiles.add(file.canonical);
318
+ }
319
+ return {
320
+ skills: [...skills.values()],
321
+ diagnostics: [...diagnostics, ...collisions]
322
+ };
323
+ }
324
+ /**
325
+ * The edge build of skill discovery, mirroring the Node build over the session file system.
326
+ *
327
+ * Every domain's local plugin skills, the shared `.claude/skills` for domains that keep them, then
328
+ * the repository's `.po/skills`. Plugins are local folders only: a remote plugin source fails its
329
+ * domain with a diagnostic and leaves every other domain's skills in place. The home directory is
330
+ * the platform's, never the session environment's HOME.
331
+ */
332
+ async function discoverServerSkills(execution, fs, signal) {
333
+ signal.throwIfAborted();
334
+ const context = withAbortSignal(signal, BACKGROUND_CONTEXT);
335
+ const home = nodeHost.homeDirectory();
336
+ const repoSkills = path.join(execution.repoRoot, ".po", "skills");
337
+ const sources = [];
338
+ const diagnostics = [];
339
+ const found = [];
340
+ const domains = [];
341
+ try {
342
+ domains.push(...await listDomainNamesAsync(fs, execution.repoRoot, context, home));
343
+ } catch (error) {
344
+ diagnostics.push(`Domain skills are unavailable: ${message(error)}`);
345
+ }
346
+ for (const domain of domains) {
347
+ signal.throwIfAborted();
348
+ try {
349
+ const plugins = await materializePluginEntries(await resolvePluginEntriesAsync(fs, execution.repoRoot, [domain], [], context, home));
350
+ const domainSkills = [];
351
+ const mcpPaths = [];
352
+ for (const plugin of plugins) {
353
+ const skills = (await walkSkills(fs, path.join(plugin.directory, "skills"), plugin.skillDiscovery ?? "recursive", context, signal, diagnostics)).filter((skill) => keepsName(plugin.skills, skill.name));
354
+ domainSkills.push(...skills);
355
+ if (await isMcpSkillPlugin(fs, plugin, context)) mcpPaths.push(...skills.map((skill) => skill.path));
356
+ }
357
+ found.push(...domainSkills);
358
+ if (domainSkills.length > 0) sources.push({
359
+ domain,
360
+ paths: domainSkills.map((skill) => skill.path),
361
+ mcpPaths
362
+ });
363
+ } catch (error) {
364
+ diagnostics.push(`Domain '${domain}': ${message(error)}`);
365
+ }
366
+ }
367
+ signal.throwIfAborted();
368
+ const shared = await walkSkills(fs, path.join(execution.repoRoot, ".claude", "skills"), "recursive", context, signal, diagnostics);
369
+ if (shared.length > 0) {
370
+ found.push(...shared);
371
+ const sharedPaths = shared.map((skill) => skill.path);
372
+ for (const domain of domains) if (await resolveSharedSkillsAsync(fs, execution.repoRoot, [domain], context, home)) sources.push({
373
+ domain,
374
+ paths: sharedPaths,
375
+ mcpPaths: sharedPaths
376
+ });
377
+ }
378
+ found.push(...await walkSkills(fs, repoSkills, "recursive", context, signal, diagnostics));
379
+ sources.push({
380
+ paths: [repoSkills],
381
+ mcpPaths: [repoSkills]
382
+ });
383
+ signal.throwIfAborted();
384
+ const inventory = loadSkills(found);
385
+ const activeSkills = inventory.skills.filter((skill) => within(skill.filePath, [repoSkills]));
386
+ return {
387
+ inventory: {
388
+ skills: inventory.skills,
389
+ diagnostics: [...inventory.diagnostics, ...diagnostics]
390
+ },
391
+ groups: groupSkills(inventory.skills, sources, "paths"),
392
+ mcpGroups: groupSkills(inventory.skills, sources, "mcpPaths"),
393
+ catalog: formatSkillsForPrompt(activeSkills) || "(no discovered skills)"
394
+ };
395
+ }
396
+ //#endregion
397
+ //#region ../../foundations/po-skill/src/types/skills.ts
398
+ const SKILLS_COMMAND = "skills";
399
+ const SKILL_INVOCATION_PREFIX = "/skill:";
400
+ const SKILL_COMMAND_PREFIX = "skill:";
401
+ //#endregion
402
+ //#region ../../foundations/po-skill/src/services/deferredSkills/index.edge.ts
403
+ /**
404
+ * Expands a deferred `/skill:name` the way the Node build does, reading the skill through the
405
+ * session file system. Without one, or when the file is gone, the command stays literal text.
406
+ */
407
+ async function expandDeferredSkillCommand(text, skills, fs) {
408
+ if (!fs || !text.startsWith("/skill:")) return text;
409
+ const spaceIndex = text.indexOf(" ");
410
+ const prefix = 7;
411
+ const skillName = spaceIndex === -1 ? text.slice(prefix) : text.slice(prefix, spaceIndex);
412
+ const skill = skills.find((candidate) => candidate.name === skillName);
413
+ if (!skill) return text;
414
+ const source = await fs.readTextFile(skill.filePath, BACKGROUND_CONTEXT);
415
+ if (!source.ok) return text;
416
+ let body;
417
+ try {
418
+ body = splitFrontmatter(source.value.replace(/^\uFEFF/, "").replace(/\r\n?/g, "\n")).body.trim();
419
+ } catch {
420
+ return text;
421
+ }
422
+ const args = spaceIndex === -1 ? "" : text.slice(spaceIndex + 1).trim();
423
+ const skillBlock = `<skill name="${skill.name}" location="${skill.filePath}">\nReferences are relative to ${skill.baseDir}.\n\n${body}\n</skill>`;
424
+ return args ? `${skillBlock}\n\n${args}` : skillBlock;
425
+ }
426
+ //#endregion
427
+ //#region ../../foundations/po-skill/src/extensions/workspaces/sessions/(backend)/_lib/skillCommands.ts
428
+ /**
429
+ * One command per skill, gated by whatever activates that skill.
430
+ *
431
+ * Expansion always reads the full inventory, not the group: a command is only
432
+ * dispatchable while its condition holds, so by the time one runs its skill is
433
+ * active, and looking it up in the union keeps one lookup table instead of one
434
+ * per domain.
435
+ */
436
+ function skillCommand(skill, domains, inventory, fs) {
437
+ return {
438
+ ...domains === void 0 ? {} : { when: { domains } },
439
+ name: `${SKILL_COMMAND_PREFIX}${skill.name}`,
440
+ description: skill.description,
441
+ execute: async (args, execution) => {
442
+ const text = `${SKILL_INVOCATION_PREFIX}${skill.name}${args ? ` ${args}` : ""}`;
443
+ const expanded = await expandDeferredSkillCommand(text, inventory.skills, fs);
444
+ if (expanded === text) throw new Error(`Skill '${skill.name}' is no longer readable.`);
445
+ await admit(execution.session, expanded);
446
+ }
447
+ };
448
+ }
449
+ /**
450
+ * The dispatching prompt acks when this command returns, so awaiting the whole
451
+ * turn (session.prompt) kept the composer draft until the run ended.
452
+ */
453
+ function admit(session, text) {
454
+ return session.admitPrompt ? session.admitPrompt(text, "prompt", "operator") : session.prompt(text);
455
+ }
456
+ function createSkillCommands(inventory, catalog, groups, fs) {
457
+ return [{
458
+ name: SKILLS_COMMAND,
459
+ description: "List discovered skills or invoke one by name.",
460
+ async execute(args, execution) {
461
+ const requested = args.trim();
462
+ if (requested) {
463
+ await admit(execution.session, await expandDeferredSkillCommand(`${SKILL_INVOCATION_PREFIX}${requested}`, inventory.skills, fs));
464
+ return;
465
+ }
466
+ await execution.client.notify({
467
+ title: "Po skills",
468
+ body: catalog,
469
+ level: "info"
470
+ });
471
+ }
472
+ }, ...groups.flatMap((group) => group.skills.map((skill) => skillCommand(skill, group.domains, inventory, fs)))];
473
+ }
474
+ //#endregion
475
+ //#region ../../foundations/po-skill/src/extensions/workspaces/sessions/(backend)/_lib/skillServer.ts
476
+ async function createSkillServer(agent, fs, signal, resources) {
477
+ const execution = agent.context;
478
+ const key = [
479
+ "inventory",
480
+ execution.repoRoot,
481
+ execution.cwd,
482
+ execution.environment.HOME ?? nodeHost.homeDirectory(),
483
+ ...readHarnessState(execution.environment).skillDirectories ?? [],
484
+ Math.floor(Date.now() / SKILL_INVENTORY_FRESH_MS)
485
+ ];
486
+ const { inventory, catalog, groups, mcpGroups } = await resources.acquire(key, () => discoverServerSkills(execution, fs, new AbortController().signal));
487
+ return {
488
+ commands: createSkillCommands(inventory, catalog, groups, fs),
489
+ tools: [createSessionLoadSkillTool(agent), createSessionSearchSkillsTool(agent)],
490
+ services: [mountMcpSkills(mcpGroups, fs, signal)],
491
+ resources: [...groups.flatMap((group) => group.skills.map((skill) => ({
492
+ name: skill.name,
493
+ description: skill.description,
494
+ path: skill.filePath,
495
+ kind: "skill",
496
+ ...group.domains === void 0 ? {} : { when: { domains: group.domains } },
497
+ read: async () => getOrThrow(await fs.readTextFile(skill.filePath, BACKGROUND_CONTEXT))
498
+ }))), ...[{
499
+ name: "help-how-to-author-skill",
500
+ description: "Author and distribute Po agent skills. Use when creating a SKILL.md, contributing a runtime skill directory, or publishing activation-gated Help prompts and diagnostic tools."
501
+ }, {
502
+ name: "help-how-to-skill",
503
+ description: "Use Po's skill catalog and deferred discovery. Diagnose missing or shadowed skills and invoke the narrowest available guidance."
504
+ }].map((skill) => ({
505
+ ...skill,
506
+ when: {
507
+ state: { "minor-mode": "help" },
508
+ attribution: {
509
+ kind: "minor",
510
+ mode: "help"
511
+ }
512
+ },
513
+ kind: "skill",
514
+ path: packageResourcePath("bundle:///po-skill/src/extensions/workspaces/sessions/(backend)/_lib/skillServer.ts", `src/prompts/${skill.name}/SKILL.md`),
515
+ read: () => readPackageResource("bundle:///po-skill/src/extensions/workspaces/sessions/(backend)/_lib/skillServer.ts", `src/prompts/${skill.name}/SKILL.md`)
516
+ }))]
517
+ };
518
+ }
519
+ //#endregion
520
+ //#region ../../foundations/po-skill/src/extensions/workspaces/sessions/(backend)/root.server.ts
521
+ var root_server_default = defineRoot(async ({ agent, context: root, signal, resources }) => {
522
+ const runtime = agent ? await createSkillServer(agent, requirePoFs(root), signal, resources) : {
523
+ commands: [],
524
+ resources: []
525
+ };
526
+ return {
527
+ value: runtime,
528
+ services: runtime.services
529
+ };
530
+ });
531
+ //#endregion
532
+ //#region ../../foundations/po-skill/src/extensions/workspaces/sessions/(backend)/command/skills.server.ts
533
+ var skills_server_default$1 = defineRoutedContribution((context) => context.root.commands, { cardinality: "many" });
534
+ //#endregion
535
+ //#region ../../foundations/po-skill/src/extensions/workspaces/sessions/(backend)/resource/skills.server.ts
536
+ var skills_server_default = defineRoutedContribution((context) => context.root.resources, { cardinality: "many" });
537
+ //#endregion
538
+ //#region ../../foundations/po-skill/src/extensions/workspaces/sessions/(backend)/tool/load_skill.server.ts
539
+ /** The session agent's skill tools; the Pi CLI keeps Pi's own skill handling. */
540
+ var load_skill_server_default = defineRoutedContribution((context) => context.root.tools ?? [], { cardinality: "many" });
541
+ //#endregion
542
+ //#region ../../foundations/po-skill/generated/server.ts
543
+ const many = (value, context) => {
544
+ const resolved = typeof value === "function" ? value(context) : value;
545
+ return Array.isArray(resolved) ? resolved : [resolved];
546
+ };
547
+ const serverPlugin = defineServerPlugin({
548
+ name: "@agimon-ai/po-skill",
549
+ providerOverrides: composeServerProviderOverrides(root_server_default),
550
+ injects: composeRootInjects({ session: [root_server_default] }),
551
+ session: async (context) => {
552
+ const scopeSession = await context.scopeRoot("session", root_server_default, context);
553
+ const contextSession = {
554
+ ...context,
555
+ root: scopeSession.value
556
+ };
557
+ return {
558
+ ...composeRootHooks(scopeSession),
559
+ get commands() {
560
+ return [...many(skills_server_default$1, contextSession)];
561
+ },
562
+ get resources() {
563
+ return [...many(skills_server_default, contextSession)];
564
+ },
565
+ get tools() {
566
+ return [...many(load_skill_server_default, contextSession)];
567
+ },
568
+ services: [...scopeSession.services ?? []],
569
+ get activities() {
570
+ return [...scopeSession.activities ?? []];
571
+ }
572
+ };
573
+ }
574
+ });
575
+ //#endregion
576
+ export { serverPlugin as default, serverPlugin };
@@ -1,8 +1,17 @@
1
- import "./serverPlugin-BOI6c6s5.js";
2
- import { c as defineRoute, f as defineServerPlugin, l as defineRoutedContribution, o as defineResource } from "./extensionFile-CXOa5G4C.js";
3
- import { n as readPackageResource, t as packageResourcePath } from "./index.edge-BgSx_gRO.js";
4
- import { i as resolveLayers, r as loadMajorModesConfig } from "./majorModes-DbCfLZH3.js";
5
- import "./majorModes-BvWNqoHt.js";
1
+ import "./serverPlugin-CELT6P0Q.js";
2
+ import { i as resolveLayers } from "./majorModes-BB0PXgFn.js";
3
+ import { h as defineServerPlugin, l as defineRoute, s as defineResource, u as defineRoutedContribution } from "./extensionFile-DNM4xsje.js";
4
+ import { n as readPackageResource, t as packageResourcePath } from "./index.edge-DyYmurS7.js";
5
+ import "./majorModes-C7vtBs4D.js";
6
+ //#region ../../foundations/po-config/src/services/majorModes/sync.edge.ts
7
+ function nodeOnly(name, asyncName) {
8
+ throw new Error(`${name} is Node-only; use ${asyncName} with a PoPlatform on the edge.`);
9
+ }
10
+ /** @deprecated Node-only sync shim; use readMajorModesConfig. Removed in M2. */
11
+ function loadMajorModesConfig(_repoRoot, _homeDirectory, _environment) {
12
+ return nodeOnly("loadMajorModesConfig", "readMajorModesConfig");
13
+ }
14
+ //#endregion
6
15
  //#region ../../foundations/po-major-mode/src/extensions/workspaces/sessions/(backend)/api/major-mode/route.server.ts
7
16
  var route_server_default = defineRoute(({ agent }) => ({
8
17
  basePath: "major-mode",
@@ -1,13 +1,6 @@
1
- import "./serverPlugin-BOI6c6s5.js";
2
- import { f as defineServerPlugin, u as defineServerCommand } from "./extensionFile-CXOa5G4C.js";
3
- //#region ../../core/po-core/src/schemas/pluginContributions.ts
4
- function defineCommand(command) {
5
- return {
6
- ...command,
7
- kind: "command"
8
- };
9
- }
10
- //#endregion
1
+ import "./serverPlugin-CELT6P0Q.js";
2
+ import { t as defineCommand } from "./pluginContributions-Be9EnCAW.js";
3
+ import { d as defineServerCommand, h as defineServerPlugin } from "./extensionFile-DNM4xsje.js";
11
4
  //#region ../../foundations/po-notification/src/extensions/workspaces/sessions/(backend)/_lib/notificationCommand.ts
12
5
  const notificationCommand = defineCommand({
13
6
  name: "notify",