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

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 (260) hide show
  1. package/README.md +4 -3
  2. package/dist/abort-signals-2GUraIGq.js +34 -0
  3. package/dist/agent-DTjnYFAN.js +6850 -0
  4. package/dist/anthropic-messages-5ODquUB-.js +14317 -0
  5. package/dist/{apiContracts-CHOiCbS_.js → apiContracts-DepyzMNr.js} +94 -81
  6. package/dist/{approval-BMXqnTYd.js → approval-Biq3NCWj.js} +19 -3
  7. package/dist/{approvalPrompt-Bg1JrEEY.js → approvalPrompt-DoHlIPkU.js} +2 -2
  8. package/dist/assets/assets/{CodeEditorView-BnyZHaYM.js → CodeEditorView-BU8DeV_G.js} +2 -2
  9. package/dist/assets/assets/{abnfDiagram-WEYOIA3C-muME0eCj.js → abnfDiagram-WEYOIA3C-BkzARjqu.js} +2 -2
  10. package/dist/assets/assets/{architecture-WOLXFQ4H-DMnhK1WH.js → architecture-WOLXFQ4H-B_dgnlXa.js} +1 -1
  11. package/dist/assets/assets/{architectureDiagram-ZHVYKT53-DKn7XGP7.js → architectureDiagram-ZHVYKT53-DMGAifk0.js} +2 -2
  12. package/dist/assets/assets/{blockDiagram-RJAE7QA3-DtDctXZg.js → blockDiagram-RJAE7QA3-DwTSK4lj.js} +2 -2
  13. package/dist/assets/assets/{c4Diagram-XDPPPE54-23pGLJeP.js → c4Diagram-XDPPPE54-IRaOcC_u.js} +2 -2
  14. package/dist/assets/assets/channel-BXwM62E-.js +2 -0
  15. package/dist/assets/assets/{chunk-2E7WHVMD-BZ2nGNPa.js → chunk-2E7WHVMD-BvS46crW.js} +2 -2
  16. package/dist/assets/assets/{chunk-4EMNKR2T-Dui1SYFi.js → chunk-4EMNKR2T--n96Xbj0.js} +2 -2
  17. package/dist/assets/assets/{chunk-55XCU76K-CUB92Evl.js → chunk-55XCU76K-D3h_hFRi.js} +2 -2
  18. package/dist/assets/assets/{chunk-7S6XSTFO-CVayPHfE.js → chunk-7S6XSTFO-Cj18feJl.js} +2 -2
  19. package/dist/assets/assets/{chunk-AQDTSKZB---wakYqY.js → chunk-AQDTSKZB-DXsT43bg.js} +2 -2
  20. package/dist/assets/assets/{chunk-DSNLSHJZ-DfbdohUR.js → chunk-DSNLSHJZ-Br7dX7yf.js} +2 -2
  21. package/dist/assets/assets/{chunk-HAGFOTED-Dr4KRh-b.js → chunk-HAGFOTED-BcozAtPo.js} +2 -2
  22. package/dist/assets/assets/{chunk-HNE4Q36P-D06cR91Z.js → chunk-HNE4Q36P-B8kgXgRq.js} +2 -2
  23. package/dist/assets/assets/{chunk-NQOKRVIF-Ca4gLeDb.js → chunk-NQOKRVIF-Dn7UnsqE.js} +2 -2
  24. package/dist/assets/assets/{chunk-UHW7PFBP-DmL638jN.js → chunk-UHW7PFBP-BSJot0vi.js} +2 -2
  25. package/dist/assets/assets/{chunk-VQ5W62QI-pkxSW5Zj.js → chunk-VQ5W62QI-Cpf1EfZK.js} +2 -2
  26. package/dist/assets/assets/{chunk-WQQL4CDK-Dcc8hV4U.js → chunk-WQQL4CDK-Dnc36uZR.js} +2 -2
  27. package/dist/assets/assets/chunk-XXDRQBXY-C9Ka5KSI.js +2 -0
  28. package/dist/assets/assets/{chunk-YZO67HFG-B_HKcFrw.js → chunk-YZO67HFG-BV8_A7x3.js} +2 -2
  29. package/dist/assets/assets/{chunk-ZAUX2LTX-DAzZUysS.js → chunk-ZAUX2LTX-C4Ne_31B.js} +2 -2
  30. package/dist/assets/assets/{chunk-ZCHMQSOR-DAVgjymL.js → chunk-ZCHMQSOR-Dq9ModsA.js} +2 -2
  31. package/dist/assets/assets/{classDiagram-v2-4MYWR3UA-Fsw8TGPu.js → classDiagram-v2-4MYWR3UA-1BWEjXP9.js} +2 -2
  32. package/dist/assets/assets/{cose-bilkent-JH36ORCC-CgUbISYV.js → cose-bilkent-JH36ORCC-DREkvC_x.js} +2 -2
  33. package/dist/assets/assets/{cynefin-EF2NZ3EQ-D1LxAU2x.js → cynefin-EF2NZ3EQ-CWziP8nx.js} +1 -1
  34. package/dist/assets/assets/{cynefinDiagram-WF24UDRP-D54I1jil.js → cynefinDiagram-WF24UDRP-DOoYmcvz.js} +2 -2
  35. package/dist/assets/assets/{dagre-NK4GIZVX-DC7zL16U.js → dagre-NK4GIZVX-OoAtEico.js} +2 -2
  36. package/dist/assets/assets/{diagram-CBK3MWTC-DB0ptUdz.js → diagram-CBK3MWTC-B-pl2-iR.js} +2 -2
  37. package/dist/assets/assets/{diagram-I5XIIV2D-CozSftPJ.js → diagram-I5XIIV2D-uKzNJSZ2.js} +2 -2
  38. package/dist/assets/assets/{diagram-ODIL2UCW-g3WOEWDS.js → diagram-ODIL2UCW-CEXY_Tzu.js} +2 -2
  39. package/dist/assets/assets/{diagram-PFBEJUXE-CFxGeOYi.js → diagram-PFBEJUXE-MKlRQo-g.js} +2 -2
  40. package/dist/assets/assets/{diagram-RJA3I4VV-BQBsLche.js → diagram-RJA3I4VV-c2qlCEVs.js} +2 -2
  41. package/dist/assets/assets/{diagram-TYUNFSNR-DrjpW2yq.js → diagram-TYUNFSNR-DTdqLA6J.js} +2 -2
  42. package/dist/assets/assets/{dist-B3JXhDWV.js → dist-4TUOlkyl.js} +2 -2
  43. package/dist/assets/assets/{dist-1-mhYUBH.js → dist-BzTxJnSR.js} +2 -2
  44. package/dist/assets/assets/{dist-XIZum9n5.js → dist-D9lacOpq.js} +2 -2
  45. package/dist/assets/assets/{dist-gfbb4ygy.js → dist-DCKskbBE.js} +2 -2
  46. package/dist/assets/assets/{dist-h6SOnP8-.js → dist-DCc8tQ7G.js} +2 -2
  47. package/dist/assets/assets/{dist-Izr2SB3q.js → dist-DXlts_H5.js} +2 -2
  48. package/dist/assets/assets/{dist-DvgCCshF.js → dist-DvZCwSZ8.js} +2 -2
  49. package/dist/assets/assets/{dist-BabjcJ3j.js → dist-mQUN8X3n.js} +2 -2
  50. package/dist/assets/assets/{dist-DjL8d1jZ.js → dist-qZHwVT1x.js} +2 -2
  51. package/dist/assets/assets/{ebnfDiagram-V4P3TTPT-BZS_aAve.js → ebnfDiagram-V4P3TTPT-C89wxfCd.js} +2 -2
  52. package/dist/assets/assets/{elk-QONTBCTQ-B2ksVmMA.js → elk-QONTBCTQ-BMBgLOae.js} +2 -2
  53. package/dist/assets/assets/{erDiagram-KYQIGQAA-7P6zF-Z-.js → erDiagram-KYQIGQAA-Bb04CRa4.js} +2 -2
  54. package/dist/assets/assets/{eventmodeling-K75KTNOO-RoGQoRq-.js → eventmodeling-K75KTNOO-DSyNf2MV.js} +1 -1
  55. package/dist/assets/assets/flowDiagram-IUGLLWBU-DXuTqLUd.js +1 -0
  56. package/dist/assets/assets/{ganttDiagram-R7GPNTJY-CTOlRy7M.js → ganttDiagram-R7GPNTJY-sB7-pF_t.js} +2 -2
  57. package/dist/assets/assets/{gitGraph-VSP46ZUC-CPqytIt0.js → gitGraph-VSP46ZUC-pWPBCmdT.js} +1 -1
  58. package/dist/assets/assets/{gitGraphDiagram-PDYL7XHY-BffLxuxg.js → gitGraphDiagram-PDYL7XHY-DronDRed.js} +2 -2
  59. package/dist/assets/assets/index-CBNQEGK3.css +1 -0
  60. package/dist/assets/assets/index-DdAdCxGc.js +155 -0
  61. package/dist/assets/assets/{info-OHQRW6UA-BI8RK0Ow.js → info-OHQRW6UA-B375mT1i.js} +1 -1
  62. package/dist/assets/assets/{infoDiagram-MVDRKAX5-DUIst1FB.js → infoDiagram-MVDRKAX5-9Hw3wWP7.js} +2 -2
  63. package/dist/assets/assets/{ishikawaDiagram-HPEHV2GE-CA17Eho5.js → ishikawaDiagram-HPEHV2GE-CdPAuupk.js} +2 -2
  64. package/dist/assets/assets/{journeyDiagram-BOSHW7O7-CNri5Ap9.js → journeyDiagram-BOSHW7O7-hqmaHM9u.js} +2 -2
  65. package/dist/assets/assets/{kanban-definition-FNSA4HC5-DnXna7jO.js → kanban-definition-FNSA4HC5-BdOHplX4.js} +2 -2
  66. package/dist/assets/assets/{line-BsXJZn93.js → line-BCSC3Bu2.js} +2 -2
  67. package/dist/assets/assets/{linear-BHYaD5T0.js → linear-D5ddQU3r.js} +2 -2
  68. package/dist/assets/assets/{mermaid-parser.core-B64Eo-8a.js → mermaid-parser.core-BaSUi_Ph.js} +4 -4
  69. package/dist/assets/assets/{mermaid.core-Zw9qmTzg.js → mermaid.core-CUUsU9Ou.js} +5 -5
  70. package/dist/assets/assets/{mindmap-definition-6OY57UG3-E5qz4KNc.js → mindmap-definition-6OY57UG3-BtVkhvIZ.js} +2 -2
  71. package/dist/assets/assets/{packet-JDAUHWVQ-DgfizTr3.js → packet-JDAUHWVQ-CQ3OUDwI.js} +1 -1
  72. package/dist/assets/assets/{pegDiagram-ECIUJNBX-D0WK_agM.js → pegDiagram-ECIUJNBX-DDnq-Kn3.js} +2 -2
  73. package/dist/assets/assets/{pie-XZMESJXO-PJR1sXD4.js → pie-XZMESJXO-BvOFTkQB.js} +1 -1
  74. package/dist/assets/assets/{pieDiagram-GNMPY74T-CPuU-NTs.js → pieDiagram-GNMPY74T-Bdwhl9jD.js} +2 -2
  75. package/dist/assets/assets/{quadrantDiagram-D57K4MC3-5C9yjM1b.js → quadrantDiagram-D57K4MC3-GHKoDEeT.js} +2 -2
  76. package/dist/assets/assets/{radar-ABXABTNO-BspdXgl0.js → radar-ABXABTNO-Yk9rKkKW.js} +1 -1
  77. package/dist/assets/assets/{railroad-I3PHUGI6-Ct0a6hLD.js → railroad-I3PHUGI6-Crr2QEwm.js} +1 -1
  78. package/dist/assets/assets/{railroad-abnf-LNEFI6M7-fduYB4SA.js → railroad-abnf-LNEFI6M7-CLrgwBog.js} +1 -1
  79. package/dist/assets/assets/{railroad-ebnf-DWYD2UWJ-CTQa8Sww.js → railroad-ebnf-DWYD2UWJ-zWReI6MC.js} +1 -1
  80. package/dist/assets/assets/{railroad-peg-JR7BVNR7-DatoH3GJ.js → railroad-peg-JR7BVNR7-CnVnlaHi.js} +1 -1
  81. package/dist/assets/assets/{railroadDiagram-Y72NRBL7-C8sWN8l2.js → railroadDiagram-Y72NRBL7-MJ68mMla.js} +2 -2
  82. package/dist/assets/assets/{requirementDiagram-EQYSW5RA-CqRz4RcT.js → requirementDiagram-EQYSW5RA-BYb-mTCH.js} +2 -2
  83. package/dist/assets/assets/{sankeyDiagram-SY24JHO5-bdiuKKlX.js → sankeyDiagram-SY24JHO5-DzONJsqQ.js} +2 -2
  84. package/dist/assets/assets/{sequenceDiagram-BLEHNHQU-Zy-8I0Hy.js → sequenceDiagram-BLEHNHQU-0vav9YWV.js} +2 -2
  85. package/dist/assets/assets/{src-gihY33R9.js → src-DZJUnjaM.js} +2 -2
  86. package/dist/assets/assets/{stateDiagram-v2-A6IESKWZ-DXQERPvz.js → stateDiagram-v2-A6IESKWZ-B0M8THPh.js} +2 -2
  87. package/dist/assets/assets/{swimlanes-B3ENRKFQ-1gjZQElg.js → swimlanes-B3ENRKFQ-5YJZCHIB.js} +2 -2
  88. package/dist/assets/assets/swimlanesDiagram-AYQRV4AK-aJTRXiIU.js +9 -0
  89. package/dist/assets/assets/{timeline-definition-JXYKGLGB-CTeYEw-9.js → timeline-definition-JXYKGLGB-us1LwUHo.js} +2 -2
  90. package/dist/assets/assets/{treeView-D4JQ5SDB-DD-EsLLT.js → treeView-D4JQ5SDB-BSLlcDre.js} +1 -1
  91. package/dist/assets/assets/{treemap-SAJKECNS-BLdFeS5J.js → treemap-SAJKECNS-DZ2SwLmk.js} +1 -1
  92. package/dist/assets/assets/{usecaseDiagram-WPOLBNNX-C1GikSSP.js → usecaseDiagram-WPOLBNNX-BrmvO_6k.js} +2 -2
  93. package/dist/assets/assets/{vennDiagram-Q3Y3IDCW-B1FoA3g8.js → vennDiagram-Q3Y3IDCW-FKXSeKp5.js} +2 -2
  94. package/dist/assets/assets/{wardley-7MLQ67FV-BrHb5Bjf.js → wardley-7MLQ67FV-DZ_vIMp2.js} +1 -1
  95. package/dist/assets/assets/{wardleyDiagram-IVAIDKWA-CmPLD1X4.js → wardleyDiagram-IVAIDKWA-CfLYNckm.js} +2 -2
  96. package/dist/assets/assets/{webpack-BYWDFj_R.js → webpack-CiS_BB3R.js} +2 -2
  97. package/dist/assets/assets/{xychartDiagram-4URNHDU4-DR5pfEjl.js → xychartDiagram-4URNHDU4-DBucwhQh.js} +2 -2
  98. package/dist/assets/bundle-asset-policy.json +1 -1
  99. package/dist/assets/index.html +2 -2
  100. package/dist/assets/plugins/assets/base-C3j1WCCq.css +2 -0
  101. package/dist/assets/plugins/assets/ibm-plex-sans-cyrillic-ext-wght-normal-d45eAU9y.woff2 +0 -0
  102. package/dist/assets/plugins/assets/ibm-plex-sans-cyrillic-wght-normal-BAAhND-U.woff2 +0 -0
  103. package/dist/assets/plugins/assets/ibm-plex-sans-greek-wght-normal-CmyJS8uq.woff2 +0 -0
  104. package/dist/assets/plugins/assets/ibm-plex-sans-latin-ext-wght-normal-CIII54If.woff2 +0 -0
  105. package/dist/assets/plugins/assets/ibm-plex-sans-latin-wght-normal-IvpUvPa2.woff2 +0 -0
  106. package/dist/assets/plugins/assets/ibm-plex-sans-vietnamese-wght-normal-Dg1JeJN0.woff2 +0 -0
  107. package/dist/assets/plugins/assets/jetbrains-mono-cyrillic-ext-wght-normal-EocZY2iu.woff2 +0 -0
  108. package/dist/assets/plugins/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
  109. package/dist/assets/plugins/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
  110. package/dist/assets/plugins/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
  111. package/dist/assets/plugins/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
  112. package/dist/assets/plugins/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
  113. package/dist/assets/plugins/chunks/po-web-runtime-Czm_C4SJ.js +1 -0
  114. package/dist/assets/plugins/compositions.json +1 -0
  115. package/dist/assets/plugins/slots/approval.3e4ea6e4-CqQk6XG_.js +2 -0
  116. package/dist/assets/plugins/slots/artifacts.84980c32-DQlO5IFk.js +1 -0
  117. package/dist/assets/plugins/slots/autocompact.ec8f713f-B3KTYwW1.js +1 -0
  118. package/dist/assets/plugins/slots/builtin-tools.16ef5e25-CZRYQVIP.js +7 -0
  119. package/dist/assets/plugins/slots/codemode.5f359b9c-Bzl_K_vt.js +10 -0
  120. package/dist/assets/plugins/slots/domain.832848c8-CvnpuKCY.js +1 -0
  121. package/dist/assets/plugins/slots/edit.7c802139-kaxIknZ-.js +7 -0
  122. package/dist/assets/plugins/slots/files.364f16c9-wuB8gcQA.js +2 -0
  123. package/dist/assets/plugins/slots/grep.d8bf9f57-3FnU8p-d.js +1 -0
  124. package/dist/assets/plugins/slots/log.07fd59a4-C0PXQ0O1.js +4 -0
  125. package/dist/assets/plugins/slots/mcp.ea8b6aa2-D0CkHnIw.js +109 -0
  126. package/dist/assets/plugins/slots/profile.63bc3ae6-BSY3iYfJ.js +1 -0
  127. package/dist/assets/plugins/slots/prompts.9d9b47cc-xdCkNkoA.js +3 -0
  128. package/dist/assets/plugins/slots/read.926c024f-qqaxVlEX.js +1 -0
  129. package/dist/assets/plugins/slots/runner.5393fa6c-DfO2Z9HG.js +8 -0
  130. package/dist/assets/plugins/slots/skill.56c1cc07-CL_n-l4h.js +4 -0
  131. package/dist/assets/plugins/slots/vault.587549ba-DbG3F_on.js +1 -0
  132. package/dist/assets/pwa/pwa.js +12 -12
  133. package/dist/assets/pwa/sw.js +4 -4
  134. package/dist/{atomicJson-BJfPFSYF.js → atomicJson-DCIsEywH.js} +3 -3
  135. package/dist/azure-openai-config-COZUaRzM.js +55 -0
  136. package/dist/azure-openai-responses-Cs4k2HOd.js +183 -0
  137. package/dist/{backgroundWork-CeFrbRnj.js → backgroundWork-Bswjs1av.js} +1 -1
  138. package/dist/browser-BWf8OMfl.js +3 -0
  139. package/dist/childSession-Cf2-kH4O.js +22 -0
  140. package/dist/classifier-shared-IhSH9hhh.js +106 -0
  141. package/dist/cloudflare-workers-ai-system-one-BNnc8MuH.js +52 -0
  142. package/dist/{codemode-DbPu0yJN.js → codemode-CgVosRtU.js} +5 -2
  143. package/dist/contracts-CylyLZC8.js +19 -0
  144. package/dist/diagnostics-1lYFeSJe.js +131 -0
  145. package/dist/{server-D3PQk1Gt.js → dist-B-vqs6tA.js} +1 -546
  146. package/dist/dist-Dvx5mlIR.js +50 -0
  147. package/dist/{domains-BNjGTOPj.js → domains-BqChtBLN.js} +90 -16
  148. package/dist/env-api-keys-Bow6MJe2.js +32 -0
  149. package/dist/error-body-CJk7jMUh.js +102 -0
  150. package/dist/esm-BKJy3O9-.js +1553 -0
  151. package/dist/{exports-BNZz2DNU.js → exports-C_dclnKs.js} +24 -9
  152. package/dist/{remoteMcp-CMqZldeA.js → exports-DERO0cQf.js} +1154 -175
  153. package/dist/{extensionFile-CXOa5G4C.js → extensionFile-Ds7RCpnb.js} +12 -2
  154. package/dist/github-copilot-headers-D1RedfLn.js +22 -0
  155. package/dist/google-generative-ai-DXTILNT0.js +328 -0
  156. package/dist/google-shared-e4JDCTVP.js +19588 -0
  157. package/dist/google-vertex-a1lzvJfq.js +374 -0
  158. package/dist/{harnessStore-BT706Ly6.js → harnessStore-BectazJQ.js} +4 -4
  159. package/dist/harnessStore-C0Zwvny8.js +1 -0
  160. package/dist/hash-Dt6RIbkn.js +16 -0
  161. package/dist/headers-CwtEVQvr.js +17 -0
  162. package/dist/help-Dpm82qDr.js +91 -0
  163. package/dist/{hubChannel-BHQyzcOo.js → hubChannel-COvmdWGO.js} +11 -28
  164. package/dist/hubRevisions-58pU2dW5.js +363 -0
  165. package/dist/identity-BgfHobJH.js +165 -0
  166. package/dist/index.edge-B0D_Lgbx.js +56 -0
  167. package/dist/index.edge-BLmsRNW8.js +57 -0
  168. package/dist/index.edge-COJJ_Dv2.js +937 -0
  169. package/dist/index.edge-ChYa2LU4.js +14 -0
  170. package/dist/index.edge-ClLTmPFz.js +191 -0
  171. package/dist/{index.edge-BgSx_gRO.js → index.edge-b0z7PQ6b.js} +10 -5
  172. package/dist/iso-BPQViXM8.js +10 -0
  173. package/dist/{layeredConfig-DPQAnlXD.js → layeredConfig-pQGjhAks.js} +124 -15
  174. package/dist/{majorModes-DbCfLZH3.js → majorModes-BrL4EtzH.js} +5 -14
  175. package/dist/majorModes-WXt22_km.js +1 -0
  176. package/dist/{mcpProjection-BsP0IEnb.js → mcpProjection-pbPBBuvs.js} +2 -2
  177. package/dist/migrations-5gbLIQIc.js +32 -0
  178. package/dist/mistral-conversations-CLwhVDjA.js +689 -0
  179. package/dist/models-Chzm15vC.js +1511 -0
  180. package/dist/node-BT4GsJQp.js +2479 -0
  181. package/dist/node-DytJOfYf.js +23 -0
  182. package/dist/notification-CINsJWDL.js +102 -0
  183. package/dist/openai-codex-responses-DRMONxDE.js +1210 -0
  184. package/dist/openai-completions-CcNhAv8l.js +984 -0
  185. package/dist/openai-decisions-BsFjaAGw.js +142 -0
  186. package/dist/openai-kPrtlgjl.js +17357 -0
  187. package/dist/openai-prompt-cache-Bc6qNWt0.js +8 -0
  188. package/dist/openai-responses-C5Gp2UOV.js +281 -0
  189. package/dist/openai-responses-shared-BbSi-wBR.js +661 -0
  190. package/dist/openrouter-cost-CvC52g3b.js +30 -0
  191. package/dist/openrouter-images-BoHl8g8p.js +124 -0
  192. package/dist/photon_rs_bg.wasm +0 -0
  193. package/dist/pi-messages-BXfrZLC7.js +312 -0
  194. package/dist/piConfig-BDUpA6w0.js +127 -0
  195. package/dist/piSettings-tdui0CZI.js +1 -0
  196. package/dist/{platform-B4AAgwJ0.js → platform-yhQXrrM_.js} +1 -1
  197. package/dist/{platformFiles-C_bXo4Ig.js → platformFiles-DB3Cw1l_.js} +27 -2
  198. package/dist/pluginContributions-Be9EnCAW.js +16 -0
  199. package/dist/{protocol-Xpm_mCNN.js → protocol-B6LbEIe6.js} +2 -2
  200. package/dist/provider-env-CxhHUFiF.js +38 -0
  201. package/dist/provider-retry-BUoezuw8.js +79 -0
  202. package/dist/sanitize-unicode-C3Ec8oL6.js +26 -0
  203. package/dist/sealedChannel-BeWNTWys.js +27 -0
  204. package/dist/{server-BZh1ZXz_.js → server-1O3JEYO0.js} +8 -19
  205. package/dist/server-B2G-c0hg.js +639 -0
  206. package/dist/{server-Dpgh8PDh.js → server-B8P-UkxF.js} +14 -5
  207. package/dist/server-BR9yl54i.js +2658 -0
  208. package/dist/{server-tvgQ99rv.js → server-BXFDsLgm.js} +371 -120
  209. package/dist/{server-BAAL9-NA.js → server-Bt6Zsqo8.js} +3 -10
  210. package/dist/server-CCwwnpH0.js +148 -0
  211. package/dist/{server-D4W7EdJY.js → server-Cgym-G0a.js} +16 -16
  212. package/dist/{server-DJAanjoI.js → server-Ci3ls6LL.js} +492 -103
  213. package/dist/{server-36iuA3MI.js → server-Ci_BGVwd.js} +3 -3
  214. package/dist/{server-A-_GFpPr.js → server-CyYesT-G.js} +10 -9
  215. package/dist/server-CzJjYgVk.js +295 -0
  216. package/dist/server-DFCXmDed.js +1806 -0
  217. package/dist/{server-BE6VqEiA.js → server-DL6UyXfJ.js} +19 -12
  218. package/dist/{server-D8ndq0wL.js → server-DPTp6GXS.js} +11 -9
  219. package/dist/server-DRcCuj6P.js +217 -0
  220. package/dist/server-Dgn4el5K.js +190 -0
  221. package/dist/server-DhkR6ugd.js +577 -0
  222. package/dist/server-GIQIpf33.js +489 -0
  223. package/dist/server-OerXqXJT.js +680 -0
  224. package/dist/server-Re1VNk9s.js +1517 -0
  225. package/dist/{server-Dt4y1rZD.js → server-V8W5mcGu.js} +6 -6
  226. package/dist/server-_0288DYR.js +935 -0
  227. package/dist/server-cStfn1Yv.js +505 -0
  228. package/dist/server-pY027myK.js +1057 -0
  229. package/dist/{build-2gFaVEfG.js → serverPlugin-OOfjB8tm.js} +3937 -3
  230. package/dist/{sessionConfig-rBQgzXlT.js → sessionConfig-DfwcUKO2.js} +551 -760
  231. package/dist/simple-options-CFzI5Pd_.js +156 -0
  232. package/dist/streaming-json-BWTHTwz-.js +858 -0
  233. package/dist/system-one-shared-CiIrx29d.js +132 -0
  234. package/dist/{notification-D76PSL7r.js → telemetry-Csv1ZxAn.js} +1 -92
  235. package/dist/transform-messages-D77af7Bx.js +356 -0
  236. package/dist/truncate-M3KbFyVj.js +89 -0
  237. package/dist/typesafe-system-one-DGxeggJh.js +37 -0
  238. package/dist/uuid-B0QJx6Kr.js +31 -0
  239. package/dist/{validation-D77NZBrx.js → validation-DuOGOKEi.js} +2 -2
  240. package/dist/{value-Djvc2foV.js → value-DyVsxCwZ.js} +1 -1
  241. package/dist/vaultSettings-BFCRCBM3.js +328 -0
  242. package/dist/web-cN41ySs9.js +3 -0
  243. package/dist/worker.js +95189 -49865
  244. package/dist/workflow-BgwWq0nq.js +79 -0
  245. package/package.json +32 -22
  246. package/wrangler.jsonc +2 -2
  247. package/dist/assets/assets/channel-CMrEzemr.js +0 -2
  248. package/dist/assets/assets/chunk-XXDRQBXY-CFf0S6bN.js +0 -2
  249. package/dist/assets/assets/flowDiagram-IUGLLWBU-BhGbWVf0.js +0 -1
  250. package/dist/assets/assets/index-Bx_K4Joy.js +0 -155
  251. package/dist/assets/assets/index-DZM68mTk.css +0 -1
  252. package/dist/assets/assets/swimlanesDiagram-AYQRV4AK-q91tR8ri.js +0 -9
  253. package/dist/contextProjection-DVP2Vc5j.js +0 -188
  254. package/dist/harnessStore-BiH9vSuD.js +0 -1
  255. package/dist/majorModes-BvWNqoHt.js +0 -1
  256. package/dist/piSettings-B6fsgIBA.js +0 -1
  257. package/dist/server-BZaPPoQp.js +0 -592
  258. package/dist/server-D75MWDhB.js +0 -118
  259. package/dist/server-r358hzQg.js +0 -280
  260. package/dist/serverPlugin-BOI6c6s5.js +0 -3393
@@ -0,0 +1,363 @@
1
+ //#region ../../core/po-core/src/web/services/apiClient/index.ts
2
+ /** Names the type a route answers with. Returns nothing; only its type is read. */
3
+ function apiResponse() {}
4
+ /** Identity with inference, so a route table keeps its literal types. */
5
+ function defineApiRoutes(routes) {
6
+ return routes;
7
+ }
8
+ //#endregion
9
+ //#region ../../../node_modules/.pnpm/@tanstack+store@0.11.2/node_modules/@tanstack/store/dist/alien.js
10
+ /* @__NO_SIDE_EFFECTS__ */
11
+ function createReactiveSystem({ update, notify, unwatched }) {
12
+ return {
13
+ link,
14
+ unlink,
15
+ propagate,
16
+ checkDirty,
17
+ shallowPropagate
18
+ };
19
+ function link(dep, sub, version) {
20
+ const prevDep = sub.depsTail;
21
+ if (prevDep !== void 0 && prevDep.dep === dep) return;
22
+ const nextDep = prevDep !== void 0 ? prevDep.nextDep : sub.deps;
23
+ if (nextDep !== void 0 && nextDep.dep === dep) {
24
+ nextDep.version = version;
25
+ sub.depsTail = nextDep;
26
+ return;
27
+ }
28
+ const prevSub = dep.subsTail;
29
+ if (prevSub !== void 0 && prevSub.version === version && prevSub.sub === sub) return;
30
+ const newLink = sub.depsTail = dep.subsTail = {
31
+ version,
32
+ dep,
33
+ sub,
34
+ prevDep,
35
+ nextDep,
36
+ prevSub,
37
+ nextSub: void 0
38
+ };
39
+ if (nextDep !== void 0) nextDep.prevDep = newLink;
40
+ if (prevDep !== void 0) prevDep.nextDep = newLink;
41
+ else sub.deps = newLink;
42
+ if (prevSub !== void 0) prevSub.nextSub = newLink;
43
+ else dep.subs = newLink;
44
+ }
45
+ function unlink(link, sub = link.sub) {
46
+ const dep = link.dep;
47
+ const prevDep = link.prevDep;
48
+ const nextDep = link.nextDep;
49
+ const nextSub = link.nextSub;
50
+ const prevSub = link.prevSub;
51
+ if (nextDep !== void 0) nextDep.prevDep = prevDep;
52
+ else sub.depsTail = prevDep;
53
+ if (prevDep !== void 0) prevDep.nextDep = nextDep;
54
+ else sub.deps = nextDep;
55
+ if (nextSub !== void 0) nextSub.prevSub = prevSub;
56
+ else dep.subsTail = prevSub;
57
+ if (prevSub !== void 0) prevSub.nextSub = nextSub;
58
+ else if ((dep.subs = nextSub) === void 0) unwatched(dep);
59
+ return nextDep;
60
+ }
61
+ function propagate(link) {
62
+ let next = link.nextSub;
63
+ let stack;
64
+ top: do {
65
+ const sub = link.sub;
66
+ let flags = sub.flags;
67
+ if (!(flags & 60)) sub.flags = flags | 32;
68
+ else if (!(flags & 12)) flags = 0;
69
+ else if (!(flags & 4)) sub.flags = flags & -9 | 32;
70
+ else if (!(flags & 48) && isValidLink(link, sub)) {
71
+ sub.flags = flags | 40;
72
+ flags &= 1;
73
+ } else flags = 0;
74
+ if (flags & 2) notify(sub);
75
+ if (flags & 1) {
76
+ const subSubs = sub.subs;
77
+ if (subSubs !== void 0) {
78
+ const nextSub = (link = subSubs).nextSub;
79
+ if (nextSub !== void 0) {
80
+ stack = {
81
+ value: next,
82
+ prev: stack
83
+ };
84
+ next = nextSub;
85
+ }
86
+ continue;
87
+ }
88
+ }
89
+ if ((link = next) !== void 0) {
90
+ next = link.nextSub;
91
+ continue;
92
+ }
93
+ while (stack !== void 0) {
94
+ link = stack.value;
95
+ stack = stack.prev;
96
+ if (link !== void 0) {
97
+ next = link.nextSub;
98
+ continue top;
99
+ }
100
+ }
101
+ break;
102
+ } while (true);
103
+ }
104
+ function checkDirty(link, sub) {
105
+ let stack;
106
+ let checkDepth = 0;
107
+ let dirty = false;
108
+ top: do {
109
+ const dep = link.dep;
110
+ const flags = dep.flags;
111
+ if (sub.flags & 16) dirty = true;
112
+ else if ((flags & 17) === 17) {
113
+ if (update(dep)) {
114
+ const subs = dep.subs;
115
+ if (subs.nextSub !== void 0) shallowPropagate(subs);
116
+ dirty = true;
117
+ }
118
+ } else if ((flags & 33) === 33) {
119
+ if (link.nextSub !== void 0 || link.prevSub !== void 0) stack = {
120
+ value: link,
121
+ prev: stack
122
+ };
123
+ link = dep.deps;
124
+ sub = dep;
125
+ ++checkDepth;
126
+ continue;
127
+ }
128
+ if (!dirty) {
129
+ const nextDep = link.nextDep;
130
+ if (nextDep !== void 0) {
131
+ link = nextDep;
132
+ continue;
133
+ }
134
+ }
135
+ while (checkDepth--) {
136
+ const firstSub = sub.subs;
137
+ const hasMultipleSubs = firstSub.nextSub !== void 0;
138
+ if (hasMultipleSubs) {
139
+ link = stack.value;
140
+ stack = stack.prev;
141
+ } else link = firstSub;
142
+ if (dirty) {
143
+ if (update(sub)) {
144
+ if (hasMultipleSubs) shallowPropagate(firstSub);
145
+ sub = link.sub;
146
+ continue;
147
+ }
148
+ dirty = false;
149
+ } else sub.flags &= -33;
150
+ sub = link.sub;
151
+ const nextDep = link.nextDep;
152
+ if (nextDep !== void 0) {
153
+ link = nextDep;
154
+ continue top;
155
+ }
156
+ }
157
+ return dirty;
158
+ } while (true);
159
+ }
160
+ function shallowPropagate(link) {
161
+ do {
162
+ const sub = link.sub;
163
+ const flags = sub.flags;
164
+ if ((flags & 48) === 32) {
165
+ sub.flags = flags | 16;
166
+ if ((flags & 6) === 2) notify(sub);
167
+ }
168
+ } while ((link = link.nextSub) !== void 0);
169
+ }
170
+ function isValidLink(checkLink, sub) {
171
+ let link = sub.depsTail;
172
+ while (link !== void 0) {
173
+ if (link === checkLink) return true;
174
+ link = link.prevDep;
175
+ }
176
+ return false;
177
+ }
178
+ }
179
+ //#endregion
180
+ //#region ../../../node_modules/.pnpm/@tanstack+store@0.11.2/node_modules/@tanstack/store/dist/atom.js
181
+ function toObserver(nextHandler, errorHandler, completionHandler) {
182
+ const isObserver = typeof nextHandler === "object";
183
+ const self = isObserver ? nextHandler : void 0;
184
+ return {
185
+ next: (isObserver ? nextHandler.next : nextHandler)?.bind(self),
186
+ error: (isObserver ? nextHandler.error : errorHandler)?.bind(self),
187
+ complete: (isObserver ? nextHandler.complete : completionHandler)?.bind(self)
188
+ };
189
+ }
190
+ const queuedEffects = [];
191
+ let cycle = 0;
192
+ const { link, unlink, propagate, checkDirty, shallowPropagate } = /* @__PURE__ */ createReactiveSystem({
193
+ update(atom) {
194
+ return atom._update();
195
+ },
196
+ notify(effect) {
197
+ queuedEffects[queuedEffectsLength++] = effect;
198
+ effect.flags &= -3;
199
+ },
200
+ unwatched(atom) {
201
+ if (atom.depsTail !== void 0) {
202
+ atom.depsTail = void 0;
203
+ atom.flags = 17;
204
+ purgeDeps(atom);
205
+ }
206
+ }
207
+ });
208
+ let notifyIndex = 0;
209
+ let queuedEffectsLength = 0;
210
+ let activeSub;
211
+ function purgeDeps(sub) {
212
+ const depsTail = sub.depsTail;
213
+ let dep = depsTail !== void 0 ? depsTail.nextDep : sub.deps;
214
+ while (dep !== void 0) dep = unlink(dep, sub);
215
+ }
216
+ function flush() {
217
+ while (notifyIndex < queuedEffectsLength) {
218
+ const effect = queuedEffects[notifyIndex];
219
+ queuedEffects[notifyIndex++] = void 0;
220
+ effect.notify();
221
+ }
222
+ notifyIndex = 0;
223
+ queuedEffectsLength = 0;
224
+ }
225
+ function createAtom(valueOrFn, options) {
226
+ const isComputed = typeof valueOrFn === "function";
227
+ const getter = valueOrFn;
228
+ const atom = {
229
+ _snapshot: isComputed ? void 0 : valueOrFn,
230
+ subs: void 0,
231
+ subsTail: void 0,
232
+ deps: void 0,
233
+ depsTail: void 0,
234
+ flags: isComputed ? 0 : 1,
235
+ get() {
236
+ if (activeSub !== void 0) link(atom, activeSub, cycle);
237
+ return atom._snapshot;
238
+ },
239
+ subscribe(observerOrFn) {
240
+ const obs = toObserver(observerOrFn);
241
+ const observed = { current: false };
242
+ const e = effect(() => {
243
+ atom.get();
244
+ if (!observed.current) observed.current = true;
245
+ else {
246
+ activeSub = void 0;
247
+ obs.next?.(atom._snapshot);
248
+ }
249
+ });
250
+ return { unsubscribe: () => {
251
+ e.stop();
252
+ } };
253
+ },
254
+ _update(getValue) {
255
+ const prevSub = activeSub;
256
+ const compare = options?.compare ?? Object.is;
257
+ if (isComputed) {
258
+ activeSub = atom;
259
+ ++cycle;
260
+ atom.depsTail = void 0;
261
+ } else if (getValue === void 0) return false;
262
+ if (isComputed) atom.flags = 5;
263
+ try {
264
+ const oldValue = atom._snapshot;
265
+ const newValue = typeof getValue === "function" ? getValue(oldValue) : getValue === void 0 && isComputed ? getter(oldValue) : getValue;
266
+ if (oldValue === void 0 || !compare(oldValue, newValue)) {
267
+ atom._snapshot = newValue;
268
+ return true;
269
+ }
270
+ return false;
271
+ } finally {
272
+ activeSub = prevSub;
273
+ if (isComputed) atom.flags &= -5;
274
+ purgeDeps(atom);
275
+ }
276
+ }
277
+ };
278
+ if (isComputed) {
279
+ atom.flags = 17;
280
+ atom.get = function() {
281
+ const flags = atom.flags;
282
+ if (flags & 16 || flags & 32 && checkDirty(atom.deps, atom)) {
283
+ if (atom._update()) {
284
+ const subs = atom.subs;
285
+ if (subs !== void 0) shallowPropagate(subs);
286
+ }
287
+ } else if (flags & 32) atom.flags = flags & -33;
288
+ if (activeSub !== void 0) link(atom, activeSub, cycle);
289
+ return atom._snapshot;
290
+ };
291
+ } else atom.set = function(valueOrFn) {
292
+ if (atom._update(valueOrFn)) {
293
+ const subs = atom.subs;
294
+ if (subs !== void 0) {
295
+ propagate(subs);
296
+ shallowPropagate(subs);
297
+ flush();
298
+ }
299
+ }
300
+ };
301
+ return atom;
302
+ }
303
+ function effect(fn) {
304
+ const run = () => {
305
+ const prevSub = activeSub;
306
+ activeSub = effectObj;
307
+ ++cycle;
308
+ effectObj.depsTail = void 0;
309
+ effectObj.flags = 6;
310
+ try {
311
+ return fn();
312
+ } finally {
313
+ activeSub = prevSub;
314
+ effectObj.flags &= -5;
315
+ purgeDeps(effectObj);
316
+ }
317
+ };
318
+ const effectObj = {
319
+ deps: void 0,
320
+ depsTail: void 0,
321
+ subs: void 0,
322
+ subsTail: void 0,
323
+ flags: 6,
324
+ notify() {
325
+ const flags = this.flags;
326
+ if (flags & 16 || flags & 32 && checkDirty(this.deps, this)) run();
327
+ else this.flags = 2;
328
+ },
329
+ stop() {
330
+ this.flags = 0;
331
+ this.depsTail = void 0;
332
+ purgeDeps(this);
333
+ }
334
+ };
335
+ run();
336
+ return effectObj;
337
+ }
338
+ //#endregion
339
+ //#region ../../../node_modules/.pnpm/@tanstack+store@0.11.2/node_modules/@tanstack/store/dist/store.js
340
+ var Store = class {
341
+ constructor(valueOrFn, actionsFactory) {
342
+ this.atom = createAtom(valueOrFn);
343
+ this.get = this.get.bind(this);
344
+ this.setState = this.setState.bind(this);
345
+ this.subscribe = this.subscribe.bind(this);
346
+ if (actionsFactory) this.actions = actionsFactory(this);
347
+ }
348
+ setState(updater) {
349
+ this.atom.set(updater);
350
+ }
351
+ get state() {
352
+ return this.atom.get();
353
+ }
354
+ get() {
355
+ return this.state;
356
+ }
357
+ subscribe(observerOrFn) {
358
+ return this.atom.subscribe(toObserver(observerOrFn));
359
+ }
360
+ };
361
+ new Store({});
362
+ //#endregion
363
+ export { defineApiRoutes as n, apiResponse as t };
@@ -0,0 +1,165 @@
1
+ //#region ../../../node_modules/.pnpm/@earendil-works+pi-ai@1.5.0_@aws-sdk+credential-provider-node@3.972.86_@modelcontextpro_018b33d3c6d4455b3921fdf11f2d0b63/node_modules/@earendil-works/pi-ai/dist/utils/text.js
2
+ /** Extract and join text from message content. */
3
+ function contentText(content, separator = "\n") {
4
+ if (typeof content === "string") return content;
5
+ return content.filter((block) => block.type === "text").map((block) => block.text).join(separator);
6
+ }
7
+ /** Render a system message as a complete prompt: its content followed by its sections. */
8
+ function getSystemMessageText(message) {
9
+ const parts = [contentText(message.content)];
10
+ for (const text of Object.values(message.sections ?? {})) if (text !== null) parts.push(text);
11
+ return parts.filter((part) => part.length > 0).join("\n\n");
12
+ }
13
+ /**
14
+ * Render a later system message for APIs that accept system messages mid-conversation.
15
+ * Section changes are framed by name so the model can relate them to the leading prompt.
16
+ * This framing is request-time only and may change between versions.
17
+ */
18
+ function renderSystemMessageUpdate(message) {
19
+ const parts = [];
20
+ const text = contentText(message.content);
21
+ if (text.length > 0) parts.push(text);
22
+ for (const [name, value] of Object.entries(message.sections ?? {})) parts.push(value === null ? `Removed system prompt section "${name}".` : `Updated system prompt section "${name}":\n\n${value}`);
23
+ return parts.join("\n\n");
24
+ }
25
+ /**
26
+ * `text.slice(start, end)` as a string of its own. V8 represents a slice of 13 or more characters as a view that keeps
27
+ * all of `text` alive, so a short excerpt kept from a large text (a 500-character error message cut from a megabyte
28
+ * response body) would keep the whole text alive as long as the excerpt lives. Appending a character and slicing it off
29
+ * again makes V8 copy just the slice.
30
+ */
31
+ function ownedSlice(text, start, end = text.length) {
32
+ return `${text.slice(start, end)} `.slice(0, -1);
33
+ }
34
+ //#endregion
35
+ //#region ../../../node_modules/.pnpm/@earendil-works+pi-ai@1.5.0_@aws-sdk+credential-provider-node@3.972.86_@modelcontextpro_018b33d3c6d4455b3921fdf11f2d0b63/node_modules/@earendil-works/pi-ai/dist/utils/identity.js
36
+ /** pi's attribution, used by pi-agent-core, pi-durable, and the coding agent. */
37
+ const PI_ATTRIBUTION = {
38
+ name: "pi",
39
+ url: "https://pi.dev",
40
+ categories: ["cli-agent"]
41
+ };
42
+ const NVIDIA_NIM_HOST = "integrate.api.nvidia.com";
43
+ const OPENCODE_HOST = "opencode.ai";
44
+ /** Merge identities field by field; later sources win and undefined fields are skipped. */
45
+ function mergeClientIdentity(...sources) {
46
+ let merged;
47
+ for (const source of sources) {
48
+ if (!source) continue;
49
+ merged = { ...merged };
50
+ if (source.userAgent !== void 0) merged.userAgent = source.userAgent;
51
+ if (source.attribution !== void 0) merged.attribution = source.attribution;
52
+ if (source.version !== void 0) merged.version = source.version;
53
+ }
54
+ return merged;
55
+ }
56
+ /** The version in the detailed `User-Agent`. */
57
+ function getClientVersion(identity) {
58
+ return identity?.version ?? "1.5.0";
59
+ }
60
+ function runtimeDescription() {
61
+ if (typeof process === "undefined") return void 0;
62
+ const versions = process.versions;
63
+ if (versions?.bun) return `bun/${versions.bun}`;
64
+ if (versions?.node) return `node/${process.version}`;
65
+ }
66
+ /** The `User-Agent` value of an identity. */
67
+ function formatUserAgent(identity) {
68
+ const mode = identity?.userAgent ?? "detailed";
69
+ if (typeof mode === "object") return mode.custom;
70
+ if (mode === "short") return "pi";
71
+ const product = `pi/${getClientVersion(identity)}`;
72
+ const runtime = runtimeDescription();
73
+ return runtime ? `${product} (${process.platform}; ${runtime}; ${process.arch})` : `${product} (browser)`;
74
+ }
75
+ function matchesHost(baseUrl, expectedHost) {
76
+ try {
77
+ return new URL(baseUrl).hostname === expectedHost;
78
+ } catch {
79
+ return false;
80
+ }
81
+ }
82
+ function isOpenRouter(target) {
83
+ return target.provider === "openrouter" || target.baseUrl.includes("openrouter.ai");
84
+ }
85
+ function isNvidiaNim(target) {
86
+ return target.provider === "nvidia" || matchesHost(target.baseUrl, NVIDIA_NIM_HOST);
87
+ }
88
+ function isOpenCode(target) {
89
+ return target.provider === "opencode" || target.provider === "opencode-go" || matchesHost(target.baseUrl, OPENCODE_HOST);
90
+ }
91
+ /** Provider attribution headers of an identity for a request target. Empty when attribution is off. */
92
+ function getAttributionHeaders(target, identity) {
93
+ const attribution = identity?.attribution;
94
+ if (!attribution) return {};
95
+ const { name, url, categories } = attribution;
96
+ if (isOpenRouter(target)) return {
97
+ "HTTP-Referer": url,
98
+ "X-OpenRouter-Title": name,
99
+ ...categories === void 0 || categories.length === 0 ? {} : { "X-OpenRouter-Categories": categories.join(",") }
100
+ };
101
+ if (isNvidiaNim(target)) return { "X-BILLING-INVOKE-ORIGIN": name.charAt(0).toUpperCase() + name.slice(1) };
102
+ if (isOpenCode(target)) return { "x-opencode-client": name };
103
+ return {};
104
+ }
105
+ /**
106
+ * OpenCode's per-conversation routing header for requests to OpenCode, including custom providers pointing at it.
107
+ * Undefined without a session or for other targets.
108
+ */
109
+ function getOpenCodeSessionHeaders(target, sessionId) {
110
+ return sessionId && isOpenCode(target) ? { "x-opencode-session": sessionId } : void 0;
111
+ }
112
+ /**
113
+ * Default headers an identity adds to a request: `User-Agent` and provider attribution. APIs apply them below model,
114
+ * provider, and request headers, so configured headers override them and `null` request headers remove them.
115
+ */
116
+ function getIdentityHeaders(target, identity) {
117
+ return {
118
+ "User-Agent": formatUserAgent(identity),
119
+ ...getAttributionHeaders(target, identity)
120
+ };
121
+ }
122
+ function isMutableModels(models) {
123
+ return "setProvider" in models && "deleteProvider" in models && "clearProviders" in models;
124
+ }
125
+ function withClientIdentity(models, identity) {
126
+ const withIdentity = (options) => ({
127
+ ...options,
128
+ identity: mergeClientIdentity(identity, options?.identity)
129
+ });
130
+ const wrapped = {
131
+ getProviders: () => models.getProviders(),
132
+ getProvider: (id) => models.getProvider(id),
133
+ getModels: (provider) => models.getModels(provider),
134
+ getModel: (provider, id) => models.getModel(provider, id),
135
+ getModelsOfType: (type, provider) => models.getModelsOfType(type, provider),
136
+ getModelOfType: (type, provider, id) => models.getModelOfType(type, provider, id),
137
+ getAllModels: (provider) => models.getAllModels(provider),
138
+ refresh: (options) => models.refresh(options),
139
+ checkAuth: (providerId, options) => models.checkAuth(providerId, options),
140
+ getAvailable: (providerId, options) => models.getAvailable(providerId, options),
141
+ getAvailableOfType: (type, providerId, options) => models.getAvailableOfType(type, providerId, options),
142
+ getAllAvailable: (providerId, options) => models.getAllAvailable(providerId, options),
143
+ getAuth: models.getAuth.bind(models),
144
+ login: (providerId, type, interaction, options) => models.login(providerId, type, interaction, options),
145
+ logout: (providerId, options) => models.logout(providerId, options),
146
+ stream: (model, context, options) => models.stream(model, context, withIdentity(options)),
147
+ complete: (model, context, options) => models.complete(model, context, withIdentity(options)),
148
+ streamSimple: (model, context, options) => models.streamSimple(model, context, withIdentity(options)),
149
+ completeSimple: (model, context, options) => models.completeSimple(model, context, withIdentity(options)),
150
+ streamDeferred: (model, handle, options) => models.streamDeferred(model, handle, withIdentity(options)),
151
+ fetchDeferred: (model, handle, options) => models.fetchDeferred(model, handle, withIdentity(options)),
152
+ cancelDeferred: (model, handle, options) => models.cancelDeferred(model, handle, withIdentity(options)),
153
+ generateImages: (model, context, options) => models.generateImages(model, context, withIdentity(options)),
154
+ classify: (model, context, options) => models.classify(model, context, withIdentity(options))
155
+ };
156
+ if (!isMutableModels(models)) return wrapped;
157
+ return {
158
+ ...wrapped,
159
+ setProvider: (provider) => models.setProvider(provider),
160
+ deleteProvider: (id) => models.deleteProvider(id),
161
+ clearProviders: () => models.clearProviders()
162
+ };
163
+ }
164
+ //#endregion
165
+ export { withClientIdentity as a, ownedSlice as c, mergeClientIdentity as i, renderSystemMessageUpdate as l, getIdentityHeaders as n, contentText as o, getOpenCodeSessionHeaders as r, getSystemMessageText as s, PI_ATTRIBUTION as t };
@@ -0,0 +1,56 @@
1
+ import { g as parse } from "./layeredConfig-pQGjhAks.js";
2
+ import { s as isRemotePluginSource } from "./domains-BqChtBLN.js";
3
+ //#region ../../foundations/po-domain/src/services/pluginMaterializer/index.edge.ts
4
+ /**
5
+ * Local plugin entries pass through unchanged. Remote entries need git or upm
6
+ * on the host plus an exclusive-create install marker, so they fail clearly.
7
+ */
8
+ async function materializePluginEntries(entries, _options = {}) {
9
+ return entries.map((entry) => {
10
+ 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.`);
11
+ return entry;
12
+ });
13
+ }
14
+ //#endregion
15
+ //#region ../../foundations/po-domain/src/services/resourceCollector/skillParse.ts
16
+ /** Splits a resource file into its parsed YAML frontmatter and the body after it. */
17
+ function splitFrontmatter(content) {
18
+ const match = content.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?([\s\S]*)$/);
19
+ if (!match) throw new Error("Resource is missing YAML frontmatter");
20
+ return {
21
+ attributes: parse(match[1]),
22
+ body: match[2] ?? ""
23
+ };
24
+ }
25
+ /** The last segment of the directory holding `filePath`, split on either separator so no host path module is needed. */
26
+ function parentDirectoryName(filePath) {
27
+ const segments = filePath.split(/[\\/]+/).filter(Boolean);
28
+ return segments.length >= 2 ? segments[segments.length - 2] : "";
29
+ }
30
+ /**
31
+ * The skill's declared name, or the name of the directory holding it.
32
+ *
33
+ * Pi falls back to the containing directory rather than rejecting the file
34
+ * (dist/core/skills.js:245). Rejecting is worse than one missing skill here:
35
+ * this walk feeds the whole resource collection, so a single unnamed SKILL.md
36
+ * from a third-party plugin would fail session launch outright rather than
37
+ * degrade.
38
+ */
39
+ function skillName(filePath, attributes) {
40
+ const declared = typeof attributes.name === "string" ? attributes.name.trim() : "";
41
+ if (declared) return declared;
42
+ const fallback = parentDirectoryName(filePath);
43
+ if (!fallback) throw new Error(`Resource requires a name: ${filePath}`);
44
+ return fallback;
45
+ }
46
+ //#endregion
47
+ //#region ../../foundations/po-domain/src/services/resourceCollector/index.edge.ts
48
+ /** Resource staging copies plugin trees under POSIX modes and a home-scoped manifest cache; M1 keeps it on Node. */
49
+ function nodeOnly(name) {
50
+ throw new Error(`${name} is not available on the edge: plugin resource staging needs the Node host.`);
51
+ }
52
+ async function stageMcpResources(_repoRoot, _plugins, _options) {
53
+ return nodeOnly("stageMcpResources");
54
+ }
55
+ //#endregion
56
+ export { materializePluginEntries as i, skillName as n, splitFrontmatter as r, stageMcpResources as t };
@@ -0,0 +1,57 @@
1
+ import { fn as piAgentDirectory } from "./serverPlugin-OOfjB8tm.js";
2
+ import "./piSettings-tdui0CZI.js";
3
+ import path from "node:path";
4
+ //#region ../../foundations/po-artifact/src/constants/artifacts.ts
5
+ const ARTIFACT_DIRECTORY = "po-artifacts";
6
+ const ARTIFACTS_SERVICE = "po/artifacts";
7
+ /** Autocompact mirrors compaction history here; the recent-artifacts card leaves it out. */
8
+ const COMPACTION_ARTIFACT_DIRECTORY = "compaction";
9
+ const MAX_PREVIEW_BYTES = 1048576;
10
+ const MAX_CONTENT_BYTES = 26214400;
11
+ /** Videos up to this size are served, but only through range requests of at most MAX_CONTENT_BYTES. */
12
+ const MAX_RANGED_VIDEO_BYTES = 134217728;
13
+ const ARTIFACT_REFRESH_MS = 2e3;
14
+ //#endregion
15
+ //#region ../../foundations/po-artifact/src/services/artifactFiles/artifactPaths.ts
16
+ var ArtifactAccessError = class extends Error {
17
+ status;
18
+ constructor(message, status) {
19
+ super(message);
20
+ this.status = status;
21
+ }
22
+ };
23
+ function artifactRoot(sessionId, environment) {
24
+ if (!/^[a-zA-Z0-9_-]+$/u.test(sessionId)) throw new ArtifactAccessError("Invalid artifact session identity.", 400);
25
+ return path.join(piAgentDirectory(environment, environment.HOME), ARTIFACT_DIRECTORY, sessionId);
26
+ }
27
+ //#endregion
28
+ //#region ../../foundations/po-artifact/src/services/artifactFiles/index.edge.ts
29
+ const UNAVAILABLE = "Session artifacts are not available on the edge in M1.";
30
+ /** The edge has no artifact folder in M1; callers that create it skip artifact work on this 404. */
31
+ async function ensureArtifactRoot(_root) {
32
+ throw new ArtifactAccessError(UNAVAILABLE, 404);
33
+ }
34
+ async function openArtifact(_root, _requested, _workflowVisible) {
35
+ throw new ArtifactAccessError(UNAVAILABLE, 404);
36
+ }
37
+ async function readArtifactBytes(_handle, _size, _offset = 0) {
38
+ throw new ArtifactAccessError(UNAVAILABLE, 404);
39
+ }
40
+ async function writeArtifactText(_root, _requested, _text) {
41
+ throw new ArtifactAccessError(UNAVAILABLE, 404);
42
+ }
43
+ async function removeArtifact(_root, _requested) {
44
+ throw new ArtifactAccessError(UNAVAILABLE, 404);
45
+ }
46
+ async function listArtifactSessions(_environment) {
47
+ return [];
48
+ }
49
+ async function listArtifacts(_root, _workflowVisible, signal) {
50
+ signal?.throwIfAborted();
51
+ return {
52
+ items: [],
53
+ error: UNAVAILABLE
54
+ };
55
+ }
56
+ //#endregion
57
+ export { readArtifactBytes as a, ArtifactAccessError as c, ARTIFACT_REFRESH_MS as d, COMPACTION_ARTIFACT_DIRECTORY as f, MAX_RANGED_VIDEO_BYTES as h, openArtifact as i, artifactRoot as l, MAX_PREVIEW_BYTES as m, listArtifactSessions as n, removeArtifact as o, MAX_CONTENT_BYTES as p, listArtifacts as r, writeArtifactText as s, ensureArtifactRoot as t, ARTIFACTS_SERVICE as u };