@agimon-ai/po-cloudflare 0.0.2-alpha.4 → 0.0.2-alpha.41
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.
- package/README.md +30 -6
- package/container/Dockerfile +27 -0
- package/dist/{BrowserWebSocketTransport-C2SC2VeJ.js → BrowserWebSocketTransport-B4heNdrp.js} +1 -1
- package/dist/{NodeWebSocketTransport-CKilJesa.js → NodeWebSocketTransport-BCiOXUEz.js} +2 -2
- package/dist/{abort-signals-Bkmp_euQ.js → abort-signals-BPGaXWA5.js} +1 -1
- package/dist/agent-COvApaVM.js +3878 -0
- package/dist/{anthropic-messages-CkYm8M3V.js → anthropic-messages-BxS7qXqx.js} +291 -63
- package/dist/apiContracts-BCr_ULWJ.js +1603 -0
- package/dist/{approval-Eu7UgGL-.js → approval-Cg-PCa5M.js} +19 -3
- package/dist/{approvalPrompt-Bg1JrEEY.js → approvalPrompt-D7peArNh.js} +1 -2
- package/dist/artifactFiles-CbGIbj93.js +1 -0
- package/dist/assets/assets/{CodeEditorView-rEfljuRK.js → CodeEditorView-J2_5q1WT.js} +2 -2
- package/dist/assets/assets/{abnfDiagram-WEYOIA3C-J6Iu5p17.js → abnfDiagram-WEYOIA3C-_gWnN1r-.js} +2 -2
- package/dist/assets/assets/{architecture-WOLXFQ4H-DKj_xMR1.js → architecture-WOLXFQ4H-DOEVRwUT.js} +1 -1
- package/dist/assets/assets/{architectureDiagram-ZHVYKT53--D1MzuBo.js → architectureDiagram-ZHVYKT53-BI3jFrO0.js} +2 -2
- package/dist/assets/assets/{blockDiagram-RJAE7QA3-CrWO0t-Q.js → blockDiagram-RJAE7QA3-B_PkpROK.js} +2 -2
- package/dist/assets/assets/{c4Diagram-XDPPPE54-CBMOJREz.js → c4Diagram-XDPPPE54-DhSjpw5T.js} +2 -2
- package/dist/assets/assets/channel-CVgc46nD.js +2 -0
- package/dist/assets/assets/{chunk-2E7WHVMD-CR9NMk46.js → chunk-2E7WHVMD-BrDo2biY.js} +2 -2
- package/dist/assets/assets/{chunk-4EMNKR2T-B4D0falO.js → chunk-4EMNKR2T-CdlJ35FL.js} +2 -2
- package/dist/assets/assets/{chunk-55XCU76K-CKrttFen.js → chunk-55XCU76K-D9eb1FTZ.js} +2 -2
- package/dist/assets/assets/{chunk-7S6XSTFO-BPNrdjSb.js → chunk-7S6XSTFO-VVyUsBaV.js} +2 -2
- package/dist/assets/assets/{chunk-AQDTSKZB-Ddx2gPU_.js → chunk-AQDTSKZB-DJmW9j7o.js} +2 -2
- package/dist/assets/assets/{chunk-DSNLSHJZ-iQg3RbZ_.js → chunk-DSNLSHJZ-bQ4kpxiE.js} +2 -2
- package/dist/assets/assets/{chunk-HAGFOTED-CGlDRwnk.js → chunk-HAGFOTED-CXTtS6oc.js} +2 -2
- package/dist/assets/assets/{chunk-HNE4Q36P-CN7VMEsn.js → chunk-HNE4Q36P-CjJ9StOJ.js} +2 -2
- package/dist/assets/assets/{chunk-NQOKRVIF-DQKmIS4j.js → chunk-NQOKRVIF-CEttWQFT.js} +2 -2
- package/dist/assets/assets/{chunk-UHW7PFBP-BKSG_d1a.js → chunk-UHW7PFBP-CJZzmAtC.js} +2 -2
- package/dist/assets/assets/{chunk-VQ5W62QI-AbFHiDOg.js → chunk-VQ5W62QI-Bp76YSjS.js} +2 -2
- package/dist/assets/assets/{chunk-WQQL4CDK-C5a4DmCb.js → chunk-WQQL4CDK-wm0yUUcN.js} +2 -2
- package/dist/assets/assets/chunk-XXDRQBXY-BkEG_5cB.js +2 -0
- package/dist/assets/assets/{chunk-YZO67HFG-UbKezTdY.js → chunk-YZO67HFG-BmXRKyV5.js} +2 -2
- package/dist/assets/assets/{chunk-ZAUX2LTX-BShGGpRc.js → chunk-ZAUX2LTX-DJCmQeWP.js} +2 -2
- package/dist/assets/assets/{chunk-ZCHMQSOR-BmV-PDP0.js → chunk-ZCHMQSOR-D3pxm97L.js} +2 -2
- package/dist/assets/assets/{classDiagram-v2-4MYWR3UA-DB-cfBNq.js → classDiagram-v2-4MYWR3UA-DxMxFm6d.js} +2 -2
- package/dist/assets/assets/{cose-bilkent-JH36ORCC-Dprqh48h.js → cose-bilkent-JH36ORCC-Ck_lCjTR.js} +2 -2
- package/dist/assets/assets/{cynefin-EF2NZ3EQ-Bz4CND4n.js → cynefin-EF2NZ3EQ-CgjU58bC.js} +1 -1
- package/dist/assets/assets/{cynefinDiagram-WF24UDRP-Cv0Tq-0q.js → cynefinDiagram-WF24UDRP-CUP0NVKn.js} +2 -2
- package/dist/assets/assets/{dagre-NK4GIZVX-H4d8oeNm.js → dagre-NK4GIZVX-DkvcOoGp.js} +2 -2
- package/dist/assets/assets/{diagram-CBK3MWTC-D75OthTM.js → diagram-CBK3MWTC-CFl4wUVN.js} +2 -2
- package/dist/assets/assets/{diagram-I5XIIV2D-CB_W2jXU.js → diagram-I5XIIV2D-CldqmFr0.js} +2 -2
- package/dist/assets/assets/{diagram-ODIL2UCW-DPO0lYZ-.js → diagram-ODIL2UCW-CPieOVfl.js} +2 -2
- package/dist/assets/assets/{diagram-PFBEJUXE-DJ9olXAC.js → diagram-PFBEJUXE-DgTWsRKS.js} +2 -2
- package/dist/assets/assets/{diagram-RJA3I4VV-DL3974PI.js → diagram-RJA3I4VV-DmxD5RVL.js} +2 -2
- package/dist/assets/assets/{diagram-TYUNFSNR-ZuYESp4p.js → diagram-TYUNFSNR-DC_QoE9Q.js} +2 -2
- package/dist/assets/assets/{dist-CeotBqYt.js → dist-BoXKbh_9.js} +2 -2
- package/dist/assets/assets/{dist-CdrEbsAL.js → dist-C-aQ-0ab.js} +2 -2
- package/dist/assets/assets/{dist-CXqaT1wB.js → dist-CHKWIm0j.js} +2 -2
- package/dist/assets/assets/{dist-BnkGKHOV.js → dist-CeZ4Dyeb.js} +2 -2
- package/dist/assets/assets/{dist-C8iSs-hT.js → dist-DtfkqVX-.js} +2 -2
- package/dist/assets/assets/{dist-G3vL_xw7.js → dist-JVpnlOn0.js} +2 -2
- package/dist/assets/assets/{dist-DvCNYjgK.js → dist-L_xVrjFQ.js} +2 -2
- package/dist/assets/assets/{dist-zXhaMKmO.js → dist-_Q_eXWhh.js} +2 -2
- package/dist/assets/assets/{dist-D2iSi_lg.js → dist-m3yHSyxW.js} +2 -2
- package/dist/assets/assets/{ebnfDiagram-V4P3TTPT-DNfHKEsm.js → ebnfDiagram-V4P3TTPT-BdrqTmnC.js} +2 -2
- package/dist/assets/assets/{elk-QONTBCTQ-C0FX9D60.js → elk-QONTBCTQ-BBnxKz3T.js} +2 -2
- package/dist/assets/assets/{erDiagram-KYQIGQAA-BI1O9lW0.js → erDiagram-KYQIGQAA-DX45_hK2.js} +2 -2
- package/dist/assets/assets/{eventmodeling-K75KTNOO-BmWt-aOv.js → eventmodeling-K75KTNOO-EIuQjWpD.js} +1 -1
- package/dist/assets/assets/flowDiagram-IUGLLWBU-Bdol35Vj.js +1 -0
- package/dist/assets/assets/{ganttDiagram-R7GPNTJY-pM7PmQ6B.js → ganttDiagram-R7GPNTJY-CveiRngd.js} +2 -2
- package/dist/assets/assets/{gitGraph-VSP46ZUC-D0QXMQxv.js → gitGraph-VSP46ZUC-D4yRXN3j.js} +1 -1
- package/dist/assets/assets/{gitGraphDiagram-PDYL7XHY-BsMltgt3.js → gitGraphDiagram-PDYL7XHY-D5DsbgCK.js} +2 -2
- package/dist/assets/assets/index-BDUEIar6.css +1 -0
- package/dist/assets/assets/index-BfW-zJ-Y.js +200 -0
- package/dist/assets/assets/{info-OHQRW6UA-Dp5Eu5PX.js → info-OHQRW6UA-C0PnFIek.js} +1 -1
- package/dist/assets/assets/{infoDiagram-MVDRKAX5-TgXRfZiq.js → infoDiagram-MVDRKAX5-DpwE-14N.js} +2 -2
- package/dist/assets/assets/{ishikawaDiagram-HPEHV2GE-Qzrmih4p.js → ishikawaDiagram-HPEHV2GE-X1GxSc7S.js} +2 -2
- package/dist/assets/assets/{journeyDiagram-BOSHW7O7-BksI3QOT.js → journeyDiagram-BOSHW7O7-0cwzSgYT.js} +2 -2
- package/dist/assets/assets/{kanban-definition-FNSA4HC5-l_IuN5_k.js → kanban-definition-FNSA4HC5-C-U-zp3B.js} +2 -2
- package/dist/assets/assets/{line-BDKssGoM.js → line-CxMWkCyB.js} +2 -2
- package/dist/assets/assets/{linear-C9vmtzBC.js → linear-BpB8rX3C.js} +2 -2
- package/dist/assets/assets/{mermaid-parser.core-O1yFX7K_.js → mermaid-parser.core-CmAfQFuk.js} +4 -4
- package/dist/assets/assets/{mermaid.core-CIq57361.js → mermaid.core-BTk7Bw6z.js} +5 -5
- package/dist/assets/assets/{mindmap-definition-6OY57UG3-BkVuZ010.js → mindmap-definition-6OY57UG3-B2sMo2jC.js} +2 -2
- package/dist/assets/assets/{packet-JDAUHWVQ-PPNcSWeV.js → packet-JDAUHWVQ-BzzVSUon.js} +1 -1
- package/dist/assets/assets/{pegDiagram-ECIUJNBX-ClwrHXhM.js → pegDiagram-ECIUJNBX-VIiN2lIU.js} +2 -2
- package/dist/assets/assets/{pie-XZMESJXO-BAE4Cy9j.js → pie-XZMESJXO-B-jSi7x9.js} +1 -1
- package/dist/assets/assets/{pieDiagram-GNMPY74T-CvQ62Knb.js → pieDiagram-GNMPY74T-190bpqyE.js} +2 -2
- package/dist/assets/assets/{quadrantDiagram-D57K4MC3-CzAyT5ZB.js → quadrantDiagram-D57K4MC3-CHsQo88q.js} +2 -2
- package/dist/assets/assets/{radar-ABXABTNO-CoEe8B7b.js → radar-ABXABTNO-CW2EglFo.js} +1 -1
- package/dist/assets/assets/{railroad-I3PHUGI6-BbK5J8H5.js → railroad-I3PHUGI6-C1b0ftsy.js} +1 -1
- package/dist/assets/assets/{railroad-abnf-LNEFI6M7-DlGngfop.js → railroad-abnf-LNEFI6M7-DTT_CP-y.js} +1 -1
- package/dist/assets/assets/{railroad-ebnf-DWYD2UWJ-BRk4ifMx.js → railroad-ebnf-DWYD2UWJ-RCPkVVI9.js} +1 -1
- package/dist/assets/assets/{railroad-peg-JR7BVNR7-Rz-3vbj2.js → railroad-peg-JR7BVNR7-DixVu6c8.js} +1 -1
- package/dist/assets/assets/{railroadDiagram-Y72NRBL7-DQISBRHH.js → railroadDiagram-Y72NRBL7-DbdG32pF.js} +2 -2
- package/dist/assets/assets/{requirementDiagram-EQYSW5RA-DcK4FnTB.js → requirementDiagram-EQYSW5RA-U_x9QFHY.js} +2 -2
- package/dist/assets/assets/{sankeyDiagram-SY24JHO5-N2EXBOYb.js → sankeyDiagram-SY24JHO5-qfiLv1KI.js} +2 -2
- package/dist/assets/assets/{sequenceDiagram-BLEHNHQU-CMJ2EqC_.js → sequenceDiagram-BLEHNHQU-DMBomC37.js} +2 -2
- package/dist/assets/assets/{src-Df9VBjd7.js → src-DaNTNLrJ.js} +2 -2
- package/dist/assets/assets/{stateDiagram-v2-A6IESKWZ-D6Cxm8wj.js → stateDiagram-v2-A6IESKWZ-BgAnpbx_.js} +2 -2
- package/dist/assets/assets/{swimlanes-B3ENRKFQ-BybuzSPd.js → swimlanes-B3ENRKFQ-Dihe5c6o.js} +2 -2
- package/dist/assets/assets/swimlanesDiagram-AYQRV4AK-Cgg-RsbC.js +9 -0
- package/dist/assets/assets/{timeline-definition-JXYKGLGB-BzjkWUdz.js → timeline-definition-JXYKGLGB-BISDYTXW.js} +2 -2
- package/dist/assets/assets/{treeView-D4JQ5SDB-DIDWwDtU.js → treeView-D4JQ5SDB-DMSWtiHi.js} +1 -1
- package/dist/assets/assets/{treemap-SAJKECNS-SWP4JszI.js → treemap-SAJKECNS-0SsdPE-3.js} +1 -1
- package/dist/assets/assets/{usecaseDiagram-WPOLBNNX-ZfCxSJdE.js → usecaseDiagram-WPOLBNNX-CY0WaaL_.js} +2 -2
- package/dist/assets/assets/{vennDiagram-Q3Y3IDCW-o44wkgGH.js → vennDiagram-Q3Y3IDCW-DXXcHfKI.js} +2 -2
- package/dist/assets/assets/{wardley-7MLQ67FV-0zKRsI4Z.js → wardley-7MLQ67FV-BzVdmZfO.js} +1 -1
- package/dist/assets/assets/{wardleyDiagram-IVAIDKWA-CyBVyB40.js → wardleyDiagram-IVAIDKWA-BiDG6ka7.js} +2 -2
- package/dist/assets/assets/{webpack-C4nkEwJD.js → webpack-CUCfmjk-.js} +2 -2
- package/dist/assets/assets/{xychartDiagram-4URNHDU4-BMvRihYC.js → xychartDiagram-4URNHDU4-DTR1zwTC.js} +2 -2
- package/dist/assets/bundle-asset-policy.json +1 -1
- package/dist/assets/index.html +8 -2
- package/dist/assets/plugins/assets/base-LmdY6uBA.css +2 -0
- package/dist/assets/plugins/assets/browserCaptureWorklet-Droj0fW0-Droj0fW0.js +13 -0
- package/dist/assets/plugins/assets/sileroVadWorker-D894njUe-DjN_BMWf.mjs +110 -0
- package/dist/assets/plugins/assets/silero_vad_v6.2.1-SjbCxFXk-SjbCxFXk.onnx +0 -0
- package/dist/assets/plugins/chunks/po-web-runtime-Ka6K4y6i.js +1 -0
- package/dist/assets/plugins/compositions.json +1 -1
- package/dist/assets/plugins/slots/approval.dd60ec90-D_Iw2VJn.js +2 -0
- package/dist/assets/plugins/slots/artifacts.a078f1a5-CS9a_zNA.js +1 -0
- package/dist/assets/plugins/slots/author.497633d0-BFa_H5ZE.js +93 -0
- package/dist/assets/plugins/slots/autocompact.86aeccf4-B0hGnck7.js +1 -0
- package/dist/assets/plugins/slots/browse.5fcf164c-CVRtiGzR.js +1 -0
- package/dist/assets/plugins/slots/builtin-tools.0a7f0b8e-CJTf-98P.js +7 -0
- package/dist/assets/plugins/slots/codemode.ff16ac06-BRYQKsyR.js +11 -0
- package/dist/assets/plugins/slots/domain.3ddea842-02QPrhJk.js +1 -0
- package/dist/assets/plugins/slots/edit.c5b0b072-CETRuGf0.js +7 -0
- package/dist/assets/plugins/slots/files.8ffcdcc0-DgGX5poR.js +2 -0
- package/dist/assets/plugins/slots/goal.423c7a26-D67j7FqW.js +1 -0
- package/dist/assets/plugins/slots/grep.95f470b3-CmhMD_DW.js +1 -0
- package/dist/assets/plugins/slots/help.03b9ba99-os14i52k.js +3 -0
- package/dist/assets/plugins/slots/log.19bda339-DvprmzHk.js +4 -0
- package/dist/assets/plugins/slots/mcp.ffbe405a-CcCIF5cJ.js +109 -0
- package/dist/assets/plugins/slots/plan.5eac6563-CqYx6E9R.js +3 -0
- package/dist/assets/plugins/slots/{profile.ab16dcec-Cu6ev2uW.js → profile.176710dd-BDgBh-Su.js} +1 -1
- package/dist/assets/plugins/slots/prompts.2c187969-Bls5s3m1.js +3 -0
- package/dist/assets/plugins/slots/read.1629d556-Bg9NIMAZ.js +1 -0
- package/dist/assets/plugins/slots/runner.962030e5-_04Fb699.js +8 -0
- package/dist/assets/plugins/slots/sessions.fc763f42-BaHBIWGm.js +1 -0
- package/dist/assets/plugins/slots/skill.f5396fde-MNxJbIRc.js +4 -0
- package/dist/assets/plugins/slots/subagents.d815a296-DNYKN2_3.js +7 -0
- package/dist/assets/plugins/slots/vault.57fd9047-C3YDx6j4.js +1 -0
- package/dist/assets/plugins/slots/voice.b709d05c-BT788wX1.js +1 -0
- package/dist/assets/pwa/pwa.js +12 -12
- package/dist/assets/pwa/sw.js +4 -4
- package/dist/{atomicJson-DwSqByUJ.js → atomicJson-CU27fWtF.js} +2 -3
- package/dist/{azure-openai-config-DHMgdIa-.js → azure-openai-config-DkmTos8T.js} +2 -2
- package/dist/{azure-openai-responses-CTgRdQ4m.js → azure-openai-responses-sm_U3omr.js} +13 -13
- package/dist/backgroundWork-C3TYOD5X.js +49 -0
- package/dist/browser-BWf8OMfl.js +3 -0
- package/dist/{browser-EJ5_ffnN.js → browser-IsHIcvFg.js} +1 -1
- package/dist/childSession-Cf2-kH4O.js +22 -0
- package/dist/{classifier-shared-jXm-plIK.js → classifier-shared-B7BdEyPa.js} +5 -5
- package/dist/{cloudflare-workers-ai-system-one-B0wH6HU5.js → cloudflare-workers-ai-system-one-DpnCKwVj.js} +3 -3
- package/dist/{codemode-yHAHBZO-.js → codemode-CU_gontV.js} +5 -2
- package/dist/contracts-B_eb2dl9.js +19 -0
- package/dist/contracts-mVtrvUmY.js +40 -0
- package/dist/{diagnostics-DPTP-yrt.js → diagnostics-C43OHsIc.js} +2 -2
- package/dist/{server-y9pjeHJM.js → dist-B-vqs6tA.js} +1 -546
- package/dist/{dist-Dvx5mlIR.js → dist-CLdzaXdw.js} +16 -3
- package/dist/{dist-BVBi6VMV.js → dist-CfOWb6f7.js} +1 -1
- package/dist/{dist-PDDFdqDX.js → dist-Dd6zUvjw.js} +1 -1
- package/dist/edge-accj222e.js +266 -0
- package/dist/{emscripten-module.cloudflare-D4Bc9Ykz.js → emscripten-module.cloudflare-B4fhfquU.js} +1 -1
- package/dist/{env-api-keys-CAnjjnsR.js → env-api-keys-CSPKWgJn.js} +1 -1
- package/dist/{error-body-DQZRsyL5.js → error-body-BvLDKbXN.js} +26 -4
- package/dist/esm-BKJy3O9-.js +1553 -0
- package/dist/{exports-CrJqsTU6.js → exports-BlsXYnB_.js} +27 -9
- package/dist/{remoteMcp-Ci8crSU9.js → exports-CHx8bsjQ.js} +1062 -176
- package/dist/exports-CUM-AowA.js +34 -0
- package/dist/extensionFile-Bf1PbYVu.js +121 -0
- package/dist/{factory-Cs8iaUtc.js → factory-DwoANAyi.js} +1 -1
- package/dist/{github-copilot-headers-DpQQAh-s.js → github-copilot-headers-CZIImZmD.js} +1 -1
- package/dist/{google-generative-ai-BTTOo5RQ.js → google-generative-ai-P4ubvgcU.js} +9 -9
- package/dist/{google-shared-S7bqOccz.js → google-shared-C8Kez75I.js} +6 -6
- package/dist/{google-vertex-BcMU_DMb.js → google-vertex-T1trcCEz.js} +10 -10
- package/dist/{domains-dHfk2U8X.js → harnessState-DMini_AN.js} +175 -16
- package/dist/{harnessStore-CRtlTdbI.js → harnessStore-CTomNyVl.js} +4 -5
- package/dist/{hash-B3RRpLS2.js → hash-CMLRVP3c.js} +1 -1
- package/dist/{headers-BEuxFxDI.js → headers-CX-ZuPIi.js} +1 -1
- package/dist/help-BxTDP41H.js +1 -0
- package/dist/help-C4aC-kWh.js +100 -0
- package/dist/http-4lVtjwa7.js +59 -0
- package/dist/{hubChannel-Cj1iF847.js → hubChannel-Bq4zyVgX.js} +12 -29
- package/dist/hubRevisions-BknPawK7.js +364 -0
- package/dist/{identity-BIeAyilV.js → identity-DEwhWpjw.js} +3 -3
- package/dist/index.edge-ClLTmPFz.js +191 -0
- package/dist/index.edge-CwcYQLj9.js +70 -0
- package/dist/index.edge-D2RirEwK.js +14 -0
- package/dist/index.edge-Dw11TL5F.js +56 -0
- package/dist/index.edge-DyUqSroq.js +67 -0
- package/dist/index.edge-Ts1NG9b4.js +937 -0
- package/dist/iso-BCXA5x1w.js +10 -0
- package/dist/{kysely-adapter-D51abb3q.js → kysely-adapter-D3TQ9BKb.js} +1 -1
- package/dist/{layeredConfig-BqIwPJ-I.js → layeredConfig-DVe-JMGQ.js} +217 -24
- package/dist/{majorModes-C-OD4PBc.js → majorModes-BBT0wftm.js} +4 -14
- package/dist/majorModes-BcA8pk7t.js +1 -0
- package/dist/{mcpProjection-BsP0IEnb.js → mcpProjection-BZoy_uKa.js} +1 -2
- package/dist/{mistral-conversations-DN8VSERk.js → mistral-conversations-jEBsA1Xz.js} +12 -12
- package/dist/modeDefinition-C3Zbrw48.js +44 -0
- package/dist/{models-D6d73jcW.js → models-BoBYu6VI.js} +41 -46
- package/dist/narration-BtGsZwE7.js +127 -0
- package/dist/{node-UuMT2C3q.js → node-CdIUdDAa.js} +2 -2
- package/dist/{node-DytJOfYf.js → node-CjBe953N.js} +2 -2
- package/dist/notification-BHaYyLJJ.js +101 -0
- package/dist/{openai-bt3ZRBZv.js → openai-69NOv-G_.js} +187 -187
- package/dist/{openai-codex-responses-cL36x0ml.js → openai-codex-responses-x01Vnd68.js} +21 -25
- package/dist/{openai-completions-BWsTNYyT.js → openai-completions-B81ryS-E.js} +26 -19
- package/dist/{openai-decisions-Dfn_KgQd.js → openai-decisions-Kybq6lsr.js} +3 -3
- package/dist/{openai-responses-aa0LoyCJ.js → openai-responses-BK5Zz1Ib.js} +17 -15
- package/dist/{openai-responses-shared-H-jH5SlM.js → openai-responses-shared-b4nN_ZS7.js} +7 -7
- package/dist/{openrouter-cost-D99Qqcs6.js → openrouter-cost-C4M4CjUF.js} +1 -1
- package/dist/{openrouter-images-BpwVpALC.js → openrouter-images-DMMiksXo.js} +7 -7
- package/dist/photon_rs_bg.wasm +0 -0
- package/dist/{pi-messages-BHAIkYBj.js → pi-messages-D3F6NGQb.js} +6 -6
- package/dist/piConfig-BeRtzEWI.js +126 -0
- package/dist/piSettings-CDcdxob2.js +1 -0
- package/dist/platform-CAhzdBhg.js +113 -0
- package/dist/pluginContributions-Be9EnCAW.js +16 -0
- package/dist/pluginProtocol-ZOY2-HIL.js +136 -0
- package/dist/{protocol-Xpm_mCNN.js → protocol-Db1l1xpe.js} +1 -2
- package/dist/{provider-env-DgfpjgTa.js → provider-env-C6KlbHmf.js} +2 -2
- package/dist/{provider-retry-ChD-K2Gv.js → provider-retry-C8AvzuUi.js} +1 -1
- package/dist/{puppeteer-cloudflare-B-GHrPGO.js → puppeteer-cloudflare-D4l8smMS.js} +3 -3
- package/dist/{rolldown-runtime-B-lAHAz2.js → rolldown-runtime-DbVrKiKs.js} +1 -1
- package/dist/{sanitize-unicode-Dl4ROF7y.js → sanitize-unicode-Di-31Zpn.js} +1 -1
- package/dist/{schemas-Vj8-rCR4.js → schemas-BMBR99Q5.js} +3 -2
- package/dist/server-4R5ZprW5.js +978 -0
- package/dist/server-B0PFs3Yl.js +288 -0
- package/dist/server-B4f5d7ka.js +1811 -0
- package/dist/server-BQ0I9oeZ.js +1359 -0
- package/dist/server-BZ_bk5i9.js +295 -0
- package/dist/{server-CUvohcAm.js → server-Ba7pnDkx.js} +54 -47
- package/dist/server-BayLsR7Z.js +343 -0
- package/dist/{server-BccTx_r6.js → server-BbNo0APc.js} +121 -19
- package/dist/server-Bi9VOAOP.js +833 -0
- package/dist/{server-De_PIOty.js → server-BkmcRLIT.js} +47 -27
- package/dist/{server-DwWTQg1J.js → server-BwtSRROE.js} +14 -5
- package/dist/server-BxzzL3_G.js +1883 -0
- package/dist/{server-CYQHzqaQ.js → server-By1ctEvA.js} +11 -9
- package/dist/server-CA5TuWDo.js +3125 -0
- package/dist/{server-C1ijZQp4.js → server-CBHlRlm4.js} +3 -10
- package/dist/server-CDypk2xJ.js +1296 -0
- package/dist/server-ChlBgWIn.js +1116 -0
- package/dist/server-CkMqSsYi.js +15105 -0
- package/dist/server-CnsLcuj-.js +1518 -0
- package/dist/server-CrqcdtBx.js +178 -0
- package/dist/server-CwlDZ2N-.js +491 -0
- package/dist/server-D3j7dywQ.js +576 -0
- package/dist/server-DXD7cbH0.js +679 -0
- package/dist/server-DesEguVZ.js +640 -0
- package/dist/server-Dqjcc8p0.js +2656 -0
- package/dist/{server-BPvd3Ya5.js → server-DrmY-Chg.js} +570 -127
- package/dist/{server-B2xd7WTP.js → server-DtCOCPGp.js} +9 -20
- package/dist/server-DuAckacI.js +1522 -0
- package/dist/server-EgPpwMaj.js +505 -0
- package/dist/server-h0TSZCjm.js +189 -0
- package/dist/serverPlugin-Cx6a5RT0.js +36624 -0
- package/dist/session-resources-DLg07yAP.js +10 -0
- package/dist/{sessionConfig-2a4LWInR.js → sessionConfig-6NVRcVwL.js} +615 -766
- package/dist/{simple-options-DWrW31_K.js → simple-options-DM-a_ljY.js} +13 -6
- package/dist/{streaming-json-t4rzNHEp.js → streaming-json-Bs_lERVE.js} +6 -6
- package/dist/{system-one-shared-DLVLdzYL.js → system-one-shared-B63vQ3Om.js} +3 -3
- package/dist/{notification-D76PSL7r.js → telemetry-CrTcxeA5.js} +2 -93
- package/dist/{transform-messages-CjTSwW9q.js → transform-messages-Bbr4sgbB.js} +3 -16
- package/dist/truncate-M3KbFyVj.js +89 -0
- package/dist/{server-DrZBZ17y.js → type-CuAiPMD4.js} +569 -1409
- package/dist/type-yokaDI_F.js +7 -0
- package/dist/{typesafe-system-one-DBVcjcUQ.js → typesafe-system-one-7g930h9C.js} +3 -3
- package/dist/{uuid-mkNGilLv.js → uuid-D5Z4Ivdo.js} +1 -1
- package/dist/{validation-D77NZBrx.js → validation-DesEfRe-.js} +8 -3
- package/dist/vaultSettings-BdkqnmJf.js +292 -0
- package/dist/voiceTools-Chad-LEE.js +246 -0
- package/dist/web-QeFwt_Vl.js +3 -0
- package/dist/worker.js +56560 -35339
- package/dist/workflow-BLBCriNp.js +113 -0
- package/package.json +44 -25
- package/wrangler.jsonc +13 -3
- package/dist/apiContracts-CHOiCbS_.js +0 -4451
- package/dist/assets/assets/channel-CNegK3Rr.js +0 -2
- package/dist/assets/assets/chunk-XXDRQBXY-BbVKQGnw.js +0 -2
- package/dist/assets/assets/flowDiagram-IUGLLWBU-DQj3H5a6.js +0 -1
- package/dist/assets/assets/index-BTHzc8EN.js +0 -155
- package/dist/assets/assets/index-DZM68mTk.css +0 -1
- package/dist/assets/assets/swimlanesDiagram-AYQRV4AK-CXJkO6sc.js +0 -9
- package/dist/assets/plugins/assets/base-B5jpmLBl.css +0 -2
- package/dist/assets/plugins/chunks/po-web-runtime-D4qQFtJO.js +0 -1
- package/dist/assets/plugins/slots/approval.09e72f36-Cck_K9ex.js +0 -2
- package/dist/assets/plugins/slots/artifacts.50b639bb-BZM7uEbe.js +0 -1
- package/dist/assets/plugins/slots/builtin-tools.75108f21-EWWGTveL.js +0 -7
- package/dist/assets/plugins/slots/codemode.c58fb583-CgfTL6kt.js +0 -9
- package/dist/assets/plugins/slots/domain.753f9f92-BU0ilfwM.js +0 -1
- package/dist/assets/plugins/slots/mcp.82cc1ff5-BaCD2xZB.js +0 -109
- package/dist/assets/plugins/slots/skill.62a0a1b3-Bz20F1eA.js +0 -4
- package/dist/backgroundWork-bE3pc-R9.js +0 -25
- package/dist/build-2gFaVEfG.js +0 -3355
- package/dist/contextProjection-DVP2Vc5j.js +0 -188
- package/dist/extensionFile-CY4EFNHQ.js +0 -409
- package/dist/harnessState-gmzJcPGt.js +0 -88
- package/dist/harnessStore-DZ4lDIq6.js +0 -1
- package/dist/index.edge-BgSx_gRO.js +0 -45
- package/dist/majorModes-AYZvnOpU.js +0 -1
- package/dist/piSettings-B6fsgIBA.js +0 -1
- package/dist/platform-CNhm9zLi.js +0 -16
- package/dist/platformFiles-3rzOh9cg.js +0 -39
- package/dist/server-Bf3_VTkt.js +0 -592
- package/dist/server-BmAziQml.js +0 -657
- package/dist/server-BvV-GqDO.js +0 -280
- package/dist/server-xiuzwJ1C.js +0 -118
- package/dist/serverPlugin-H4T49sac.js +0 -3347
- package/dist/value-Djvc2foV.js +0 -2247
|
@@ -1,19 +1,7 @@
|
|
|
1
|
-
import { i as NOOP_TELEMETRY_METRICS, n as defineTelemetrySchema, r as NOOP_TELEMETRY_CONTEXT, t as createTypedSpanStarter } from "./dist-
|
|
2
|
-
import { c as ownedSlice, i as mergeClientIdentity, o as contentText, r as getOpenCodeSessionHeaders, s as getSystemMessageText } from "./identity-
|
|
3
|
-
import { i as AssistantMessageEventStream, r as formatThrownValue } from "./diagnostics-
|
|
4
|
-
//#region ../../../node_modules/.pnpm/@earendil-works+pi-
|
|
5
|
-
/** Bind instrument names, kinds, metadata, and exact measurement attributes to one or more schemas. */
|
|
6
|
-
function createTypedMetrics(metrics, schemas) {
|
|
7
|
-
const definitions = /* @__PURE__ */ new Map();
|
|
8
|
-
for (const schema of schemas) for (const [name, definition] of Object.entries(schema.metrics ?? {})) definitions.set(name, definition);
|
|
9
|
-
return {
|
|
10
|
-
counter: (name) => metrics.counter(name, definitions.get(name)),
|
|
11
|
-
upDownCounter: (name) => metrics.upDownCounter(name, definitions.get(name)),
|
|
12
|
-
histogram: (name) => metrics.histogram(name, definitions.get(name))
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
//#endregion
|
|
16
|
-
//#region ../../../node_modules/.pnpm/@earendil-works+pi-ai@1.5.0_@aws-sdk+credential-provider-node@3.972.86_@modelcontextpro_cbd356c737d8e30c7d704b4728fb9233/node_modules/@earendil-works/pi-ai/dist/utils/transcript.js
|
|
1
|
+
import { a as createTypedMetrics, i as NOOP_TELEMETRY_METRICS, n as defineTelemetrySchema, r as NOOP_TELEMETRY_CONTEXT, t as createTypedSpanStarter } from "./dist-CLdzaXdw.js";
|
|
2
|
+
import { c as ownedSlice, i as mergeClientIdentity, o as contentText, r as getOpenCodeSessionHeaders, s as getSystemMessageText } from "./identity-DEwhWpjw.js";
|
|
3
|
+
import { i as AssistantMessageEventStream, r as formatThrownValue } from "./diagnostics-C43OHsIc.js";
|
|
4
|
+
//#region ../../../node_modules/.pnpm/@earendil-works+pi-ai@1.5.1_@aws-sdk+credential-provider-node@3.972.86_@modelcontextpro_0dceae40f01aa62256473b6c7092d65b/node_modules/@earendil-works/pi-ai/dist/utils/transcript.js
|
|
17
5
|
/**
|
|
18
6
|
* Build the leading system message for a prompt and tool set. Returns undefined when
|
|
19
7
|
* both are empty, so an empty transcript stays empty.
|
|
@@ -175,8 +163,8 @@ function resolveTranscriptTools(messages, support) {
|
|
|
175
163
|
};
|
|
176
164
|
}
|
|
177
165
|
//#endregion
|
|
178
|
-
//#region ../../../node_modules/.pnpm/@earendil-works+pi-ai@1.5.
|
|
179
|
-
function createSetupErrorMessage(model, error, timestamp) {
|
|
166
|
+
//#region ../../../node_modules/.pnpm/@earendil-works+pi-ai@1.5.1_@aws-sdk+credential-provider-node@3.972.86_@modelcontextpro_0dceae40f01aa62256473b6c7092d65b/node_modules/@earendil-works/pi-ai/dist/api/lazy.js
|
|
167
|
+
function createSetupErrorMessage(model, error, timestamp, stopReason) {
|
|
180
168
|
return {
|
|
181
169
|
role: "assistant",
|
|
182
170
|
content: [],
|
|
@@ -197,7 +185,7 @@ function createSetupErrorMessage(model, error, timestamp) {
|
|
|
197
185
|
total: 0
|
|
198
186
|
}
|
|
199
187
|
},
|
|
200
|
-
stopReason
|
|
188
|
+
stopReason,
|
|
201
189
|
errorMessage: error instanceof Error ? error.message : String(error),
|
|
202
190
|
timestamp
|
|
203
191
|
};
|
|
@@ -222,7 +210,7 @@ async function forwardStream(target, source, observer, observeResult) {
|
|
|
222
210
|
* lazy module loading) behind it. Setup failures terminate the stream with an
|
|
223
211
|
* error event.
|
|
224
212
|
*/
|
|
225
|
-
function lazyStream(model, setup, observer) {
|
|
213
|
+
function lazyStream(model, setup, observer, signal) {
|
|
226
214
|
const startedAt = Date.now();
|
|
227
215
|
const outer = new AssistantMessageEventStream();
|
|
228
216
|
let observedResult = false;
|
|
@@ -232,10 +220,11 @@ function lazyStream(model, setup, observer) {
|
|
|
232
220
|
observer?.onResult?.(result);
|
|
233
221
|
};
|
|
234
222
|
setup().then((inner) => forwardStream(outer, inner, observer, observeResult)).catch((error) => {
|
|
235
|
-
const
|
|
223
|
+
const reason = signal?.aborted ? "aborted" : "error";
|
|
224
|
+
const message = createSetupErrorMessage(model, error, startedAt, reason);
|
|
236
225
|
const event = {
|
|
237
226
|
type: "error",
|
|
238
|
-
reason
|
|
227
|
+
reason,
|
|
239
228
|
error: message
|
|
240
229
|
};
|
|
241
230
|
outer.push(event);
|
|
@@ -247,14 +236,14 @@ function lazyStream(model, setup, observer) {
|
|
|
247
236
|
}
|
|
248
237
|
function lazyApi(load, capabilities) {
|
|
249
238
|
const api = {
|
|
250
|
-
stream: (model, context, options) => lazyStream(model, async () => (await load()).stream(model, context, options)),
|
|
251
|
-
streamSimple: (model, context, options) => lazyStream(model, async () => (await load()).streamSimple(model, context, options))
|
|
239
|
+
stream: (model, context, options) => lazyStream(model, async () => (await load()).stream(model, context, options), void 0, options?.signal),
|
|
240
|
+
streamSimple: (model, context, options) => lazyStream(model, async () => (await load()).streamSimple(model, context, options), void 0, options?.signal)
|
|
252
241
|
};
|
|
253
242
|
if (capabilities?.fetchDeferred) api.fetchDeferred = (model, handle, options) => lazyStream(model, async () => {
|
|
254
243
|
const implementation = await load();
|
|
255
244
|
if (!implementation.fetchDeferred) throw new Error("API does not support deferred responses");
|
|
256
245
|
return implementation.fetchDeferred(model, handle, options);
|
|
257
|
-
});
|
|
246
|
+
}, void 0, options?.signal);
|
|
258
247
|
if (capabilities?.cancelDeferred) api.cancelDeferred = async (model, handle, options) => {
|
|
259
248
|
const implementation = await load();
|
|
260
249
|
if (!implementation.cancelDeferred) throw new Error("API cannot cancel deferred responses");
|
|
@@ -263,7 +252,7 @@ function lazyApi(load, capabilities) {
|
|
|
263
252
|
return api;
|
|
264
253
|
}
|
|
265
254
|
//#endregion
|
|
266
|
-
//#region ../../../node_modules/.pnpm/@earendil-works+pi-ai@1.5.
|
|
255
|
+
//#region ../../../node_modules/.pnpm/@earendil-works+pi-ai@1.5.1_@aws-sdk+credential-provider-node@3.972.86_@modelcontextpro_0dceae40f01aa62256473b6c7092d65b/node_modules/@earendil-works/pi-ai/dist/auth/context.js
|
|
267
256
|
var __rewriteRelativeImportExtension = function(path, preserveJsx) {
|
|
268
257
|
if (typeof path === "string" && /^\.\.?\//.test(path)) return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) {
|
|
269
258
|
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js";
|
|
@@ -298,7 +287,7 @@ function defaultProviderAuthContext() {
|
|
|
298
287
|
};
|
|
299
288
|
}
|
|
300
289
|
//#endregion
|
|
301
|
-
//#region ../../../node_modules/.pnpm/@earendil-works+pi-ai@1.5.
|
|
290
|
+
//#region ../../../node_modules/.pnpm/@earendil-works+pi-ai@1.5.1_@aws-sdk+credential-provider-node@3.972.86_@modelcontextpro_0dceae40f01aa62256473b6c7092d65b/node_modules/@earendil-works/pi-ai/dist/utils/abort.js
|
|
302
291
|
function abortReason(signal) {
|
|
303
292
|
if (signal.reason !== void 0) return signal.reason;
|
|
304
293
|
const error = /* @__PURE__ */ new Error("The operation was aborted");
|
|
@@ -343,7 +332,7 @@ function raceWithAbortSignal(operation, signal) {
|
|
|
343
332
|
});
|
|
344
333
|
}
|
|
345
334
|
//#endregion
|
|
346
|
-
//#region ../../../node_modules/.pnpm/@earendil-works+pi-ai@1.5.
|
|
335
|
+
//#region ../../../node_modules/.pnpm/@earendil-works+pi-ai@1.5.1_@aws-sdk+credential-provider-node@3.972.86_@modelcontextpro_0dceae40f01aa62256473b6c7092d65b/node_modules/@earendil-works/pi-ai/dist/auth/credential-store.js
|
|
347
336
|
/**
|
|
348
337
|
* Default in-memory credential store. Apps inject persistent stores.
|
|
349
338
|
* Keyed by `Provider.id`, one credential per provider; see `CredentialStore`.
|
|
@@ -395,7 +384,7 @@ var InMemoryCredentialStore = class {
|
|
|
395
384
|
}
|
|
396
385
|
};
|
|
397
386
|
//#endregion
|
|
398
|
-
//#region ../../../node_modules/.pnpm/@earendil-works+pi-ai@1.5.
|
|
387
|
+
//#region ../../../node_modules/.pnpm/@earendil-works+pi-ai@1.5.1_@aws-sdk+credential-provider-node@3.972.86_@modelcontextpro_0dceae40f01aa62256473b6c7092d65b/node_modules/@earendil-works/pi-ai/dist/utils/models-error.js
|
|
399
388
|
var ModelsError = class extends Error {
|
|
400
389
|
code;
|
|
401
390
|
constructor(code, message, options) {
|
|
@@ -412,7 +401,7 @@ function withCauseDetail(message, cause) {
|
|
|
412
401
|
return `${message}: ${detail}`;
|
|
413
402
|
}
|
|
414
403
|
//#endregion
|
|
415
|
-
//#region ../../../node_modules/.pnpm/@earendil-works+pi-ai@1.5.
|
|
404
|
+
//#region ../../../node_modules/.pnpm/@earendil-works+pi-ai@1.5.1_@aws-sdk+credential-provider-node@3.972.86_@modelcontextpro_0dceae40f01aa62256473b6c7092d65b/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js
|
|
416
405
|
/**
|
|
417
406
|
* Auth resolution shared by all operations in a `Models` collection.
|
|
418
407
|
* A stored credential owns the provider: ambient/env is consulted only when
|
|
@@ -539,7 +528,7 @@ async function readCredential(credentials, providerId, signal) {
|
|
|
539
528
|
}
|
|
540
529
|
}
|
|
541
530
|
//#endregion
|
|
542
|
-
//#region ../../../node_modules/.pnpm/@earendil-works+pi-ai@1.5.
|
|
531
|
+
//#region ../../../node_modules/.pnpm/@earendil-works+pi-ai@1.5.1_@aws-sdk+credential-provider-node@3.972.86_@modelcontextpro_0dceae40f01aa62256473b6c7092d65b/node_modules/@earendil-works/pi-ai/dist/models-store.js
|
|
543
532
|
var InMemoryModelsStore = class {
|
|
544
533
|
entries = /* @__PURE__ */ new Map();
|
|
545
534
|
async read(providerId, options) {
|
|
@@ -557,7 +546,7 @@ var InMemoryModelsStore = class {
|
|
|
557
546
|
}
|
|
558
547
|
};
|
|
559
548
|
//#endregion
|
|
560
|
-
//#region ../../../node_modules/.pnpm/@earendil-works+pi-ai@1.5.
|
|
549
|
+
//#region ../../../node_modules/.pnpm/@earendil-works+pi-ai@1.5.1_@aws-sdk+credential-provider-node@3.972.86_@modelcontextpro_0dceae40f01aa62256473b6c7092d65b/node_modules/@earendil-works/pi-ai/dist/telemetry.js
|
|
561
550
|
const provider = {
|
|
562
551
|
type: "string",
|
|
563
552
|
description: "Provider identifier.",
|
|
@@ -844,7 +833,7 @@ function observeModelRequest(requestedModel, options, poll) {
|
|
|
844
833
|
};
|
|
845
834
|
}
|
|
846
835
|
//#endregion
|
|
847
|
-
//#region ../../../node_modules/.pnpm/@earendil-works+pi-ai@1.5.
|
|
836
|
+
//#region ../../../node_modules/.pnpm/@earendil-works+pi-ai@1.5.1_@aws-sdk+credential-provider-node@3.972.86_@modelcontextpro_0dceae40f01aa62256473b6c7092d65b/node_modules/@earendil-works/pi-ai/dist/utils/model-operations.js
|
|
848
837
|
/** The type of a model. Models without `type` are chat models. */
|
|
849
838
|
function getModelType(model) {
|
|
850
839
|
return model.type ?? "chat";
|
|
@@ -889,7 +878,7 @@ function classifierErrorResult(model, error, aborted = false) {
|
|
|
889
878
|
};
|
|
890
879
|
}
|
|
891
880
|
//#endregion
|
|
892
|
-
//#region ../../../node_modules/.pnpm/@earendil-works+pi-ai@1.5.
|
|
881
|
+
//#region ../../../node_modules/.pnpm/@earendil-works+pi-ai@1.5.1_@aws-sdk+credential-provider-node@3.972.86_@modelcontextpro_0dceae40f01aa62256473b6c7092d65b/node_modules/@earendil-works/pi-ai/dist/models.js
|
|
893
882
|
const KNOWN_MODEL_TYPES = {
|
|
894
883
|
chat: true,
|
|
895
884
|
image: true,
|
|
@@ -1063,9 +1052,9 @@ var ModelsImpl = class {
|
|
|
1063
1052
|
await this.runProviderRefreshPhase(provider, storedCredential, false, void 0, generation, signal);
|
|
1064
1053
|
if (credentialError !== void 0) throw credentialError;
|
|
1065
1054
|
if (!allowNetwork || signal.aborted) return;
|
|
1066
|
-
const
|
|
1067
|
-
if (!
|
|
1068
|
-
await this.runProviderRefreshPhase(provider, credential, true, options.force, generation, signal);
|
|
1055
|
+
const network = await this.resolveNetworkRefresh(provider, storedCredential, signal);
|
|
1056
|
+
if (!network) return;
|
|
1057
|
+
await this.runProviderRefreshPhase(provider, network.credential, true, options.force, generation, signal);
|
|
1069
1058
|
})();
|
|
1070
1059
|
try {
|
|
1071
1060
|
await raceWithAbortSignal(operation, signal);
|
|
@@ -1085,6 +1074,12 @@ var ModelsImpl = class {
|
|
|
1085
1074
|
errors: new Map(errors)
|
|
1086
1075
|
};
|
|
1087
1076
|
}
|
|
1077
|
+
/** The credential for the network refresh phase, or undefined when the provider is not configured. */
|
|
1078
|
+
async resolveNetworkRefresh(provider, stored, signal) {
|
|
1079
|
+
if (provider.refreshModelsAuth === "configured") return await this.checkProviderAuth(provider, stored, signal) ? {} : void 0;
|
|
1080
|
+
const credential = await this.resolveRefreshCredential(provider, stored, signal);
|
|
1081
|
+
return credential ? { credential } : void 0;
|
|
1082
|
+
}
|
|
1088
1083
|
async resolveRefreshCredential(provider, stored, signal) {
|
|
1089
1084
|
if (stored?.type === "oauth") {
|
|
1090
1085
|
const oauth = provider.auth.oauth;
|
|
@@ -1303,7 +1298,7 @@ var ModelsImpl = class {
|
|
|
1303
1298
|
const provider = this.requireChatProvider(model);
|
|
1304
1299
|
const { requestModel, requestOptions } = await this.applyAuth(model, options);
|
|
1305
1300
|
return provider.stream(requestModel, transcript, requestOptions);
|
|
1306
|
-
}, observeModelRequest(model, options, false));
|
|
1301
|
+
}, observeModelRequest(model, options, false), options?.signal);
|
|
1307
1302
|
}
|
|
1308
1303
|
async complete(model, context, options) {
|
|
1309
1304
|
return this.stream(model, context, options).result();
|
|
@@ -1314,7 +1309,7 @@ var ModelsImpl = class {
|
|
|
1314
1309
|
const provider = this.requireChatProvider(model);
|
|
1315
1310
|
const { requestModel, requestOptions } = await this.applyAuth(model, options);
|
|
1316
1311
|
return provider.streamSimple(requestModel, transcript, requestOptions);
|
|
1317
|
-
}, observeModelRequest(model, options, false));
|
|
1312
|
+
}, observeModelRequest(model, options, false), options?.signal);
|
|
1318
1313
|
}
|
|
1319
1314
|
async completeSimple(model, context, options) {
|
|
1320
1315
|
return this.streamSimple(model, context, options).result();
|
|
@@ -1325,7 +1320,7 @@ var ModelsImpl = class {
|
|
|
1325
1320
|
if (!provider.fetchDeferred) throw new ModelsError("provider", `Provider ${model.provider} does not support deferred responses`);
|
|
1326
1321
|
const { requestModel, requestOptions } = await this.applyAuth(model, options);
|
|
1327
1322
|
return provider.fetchDeferred(requestModel, handle, requestOptions);
|
|
1328
|
-
}, observeModelRequest(model, options, true));
|
|
1323
|
+
}, observeModelRequest(model, options, true), options?.signal);
|
|
1329
1324
|
}
|
|
1330
1325
|
async fetchDeferred(model, handle, options) {
|
|
1331
1326
|
return this.streamDeferred(model, handle, options).result();
|
|
@@ -1393,11 +1388,11 @@ function createProvider(input) {
|
|
|
1393
1388
|
return merged;
|
|
1394
1389
|
};
|
|
1395
1390
|
const apiFor = (model) => single ?? byApi?.[model.api];
|
|
1396
|
-
const dispatch = (model, run) => {
|
|
1391
|
+
const dispatch = (model, run, signal) => {
|
|
1397
1392
|
const streams = apiFor(model);
|
|
1398
1393
|
if (!streams) return lazyStream(model, async () => {
|
|
1399
1394
|
throw new ModelsError("stream", `Provider ${input.id} has no API implementation for "${model.api}"`);
|
|
1400
|
-
});
|
|
1395
|
+
}, void 0, signal);
|
|
1401
1396
|
return run(streams);
|
|
1402
1397
|
};
|
|
1403
1398
|
const provider = {
|
|
@@ -1431,14 +1426,14 @@ function createProvider(input) {
|
|
|
1431
1426
|
} : void 0,
|
|
1432
1427
|
filterModels: input.filterModels,
|
|
1433
1428
|
filterAllModels: input.filterAllModels,
|
|
1434
|
-
stream: (model, context, options) => dispatch(model, (streams) => streams.stream(model, context, options)),
|
|
1435
|
-
streamSimple: (model, context, options) => dispatch(model, (streams) => streams.streamSimple(model, context, options))
|
|
1429
|
+
stream: (model, context, options) => dispatch(model, (streams) => streams.stream(model, context, options), options?.signal),
|
|
1430
|
+
streamSimple: (model, context, options) => dispatch(model, (streams) => streams.streamSimple(model, context, options), options?.signal)
|
|
1436
1431
|
};
|
|
1437
1432
|
if (streams.some((entry) => entry.fetchDeferred !== void 0)) provider.fetchDeferred = (model, handle, options) => lazyStream(model, async () => {
|
|
1438
1433
|
const implementation = apiFor(model);
|
|
1439
1434
|
if (!implementation?.fetchDeferred) throw new ModelsError("provider", `Provider ${input.id} does not support deferred responses for "${model.api}"`);
|
|
1440
1435
|
return implementation.fetchDeferred(model, handle, options);
|
|
1441
|
-
});
|
|
1436
|
+
}, void 0, options?.signal);
|
|
1442
1437
|
if (streams.some((entry) => entry.cancelDeferred !== void 0)) provider.cancelDeferred = async (model, handle, options) => {
|
|
1443
1438
|
const implementation = apiFor(model);
|
|
1444
1439
|
if (!implementation?.cancelDeferred) throw new ModelsError("provider", `Provider ${input.id} cannot cancel deferred responses for "${model.api}"`);
|
|
@@ -1508,4 +1503,4 @@ function clampThinkingLevel(model, level) {
|
|
|
1508
1503
|
return availableLevels[0] ?? "off";
|
|
1509
1504
|
}
|
|
1510
1505
|
//#endregion
|
|
1511
|
-
export {
|
|
1506
|
+
export { normalizeContext as _, getSupportedThinkingLevels as a, toToolDeclaration as b, ModelsError as c, collapseSystemMessages as d, declarationsEqual as f, getInitialSystemMessage as g, getDeclaredTools as h, createProvider as i, lazyApi as l, getCurrentTools as m, clampThinkingLevel as n, getModelType as o, getCurrentSystemPrompt as p, createModels as r, isModelType as s, calculateCost as t, lazyStream as u, resolveTranscript as v, withoutInitialSystemMessage as x, resolveTranscriptTools as y };
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { R as String$1, q as _Object_ } from "./serverPlugin-Cx6a5RT0.js";
|
|
2
|
+
import "./type-CuAiPMD4.js";
|
|
3
|
+
//#region ../../core/po-core/src/services/clientMetadata/_lib/codec.ts
|
|
4
|
+
const PO_CLIENT_METADATA_HEADER = "x-po-client-metadata";
|
|
5
|
+
const PO_CLIENT_METADATA_QUERY = "poClient";
|
|
6
|
+
const MAX_TEXT_LENGTH = 64;
|
|
7
|
+
function isPoClientToken(value) {
|
|
8
|
+
return typeof value === "string" && /^[A-Za-z0-9_-]{1,64}$/u.test(value);
|
|
9
|
+
}
|
|
10
|
+
function normalizeClientDeviceName(value) {
|
|
11
|
+
if (typeof value !== "string") return void 0;
|
|
12
|
+
const name = value.replaceAll(/[\p{Cc}\p{Cf}]/gu, "").trim();
|
|
13
|
+
const length = Array.from(name).length;
|
|
14
|
+
return length >= 1 && length <= MAX_TEXT_LENGTH ? name : void 0;
|
|
15
|
+
}
|
|
16
|
+
function record(value) {
|
|
17
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
18
|
+
}
|
|
19
|
+
function validate(value) {
|
|
20
|
+
if (!record(value)) return { status: "invalid" };
|
|
21
|
+
if (Number.isSafeInteger(value.version) && value.version !== 1) return { status: "unsupported" };
|
|
22
|
+
const deviceName = normalizeClientDeviceName(value.deviceName);
|
|
23
|
+
if (value.version !== 1 || !isPoClientToken(value.deviceId) || value.instanceId !== void 0 && !isPoClientToken(value.instanceId) || typeof value.clientKind !== "string" || ![
|
|
24
|
+
"web",
|
|
25
|
+
"desktop",
|
|
26
|
+
"ios",
|
|
27
|
+
"android"
|
|
28
|
+
].includes(value.clientKind) || deviceName === void 0 || !Number.isSafeInteger(value.nameUpdatedAt) || typeof value.nameUpdatedAt !== "number" || value.nameUpdatedAt < 0) return { status: "invalid" };
|
|
29
|
+
for (const key of ["browser", "platform"]) if (value[key] !== void 0 && (normalizeClientDeviceName(value[key]) === void 0 || normalizeClientDeviceName(value[key]) !== value[key])) return { status: "invalid" };
|
|
30
|
+
return {
|
|
31
|
+
status: "ok",
|
|
32
|
+
metadata: {
|
|
33
|
+
version: 1,
|
|
34
|
+
deviceId: value.deviceId,
|
|
35
|
+
...value.instanceId === void 0 ? {} : { instanceId: value.instanceId },
|
|
36
|
+
clientKind: value.clientKind,
|
|
37
|
+
deviceName,
|
|
38
|
+
nameUpdatedAt: value.nameUpdatedAt,
|
|
39
|
+
...value.browser === void 0 ? {} : { browser: value.browser },
|
|
40
|
+
...value.platform === void 0 ? {} : { platform: value.platform }
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function encode(value) {
|
|
45
|
+
const bytes = new TextEncoder().encode(JSON.stringify(value));
|
|
46
|
+
return btoa(String.fromCharCode(...bytes)).replaceAll("+", "-").replaceAll("/", "_").replace(/=+$/u, "");
|
|
47
|
+
}
|
|
48
|
+
/** Outbound misuse throws; inbound parsing always returns a verdict. */
|
|
49
|
+
function encodePoClientMetadata(metadata) {
|
|
50
|
+
const result = validate(metadata);
|
|
51
|
+
if (result.status !== "ok") throw new Error("Invalid Po client metadata");
|
|
52
|
+
const encoded = encode(result.metadata);
|
|
53
|
+
if (encoded.length > 2048) throw new Error("Po client metadata exceeds encoded limit");
|
|
54
|
+
return encoded;
|
|
55
|
+
}
|
|
56
|
+
/** Header and query contain base64url UTF-8 JSON; the decrypted preface contains an object. */
|
|
57
|
+
function poClientMetadataFrom(source) {
|
|
58
|
+
try {
|
|
59
|
+
if ("preface" in source) {
|
|
60
|
+
if (!record(source.preface) || !Object.hasOwn(source.preface, "poClient")) return { status: "absent" };
|
|
61
|
+
if (Object.keys(source.preface).length !== 1) return { status: "invalid" };
|
|
62
|
+
if (encode(source.preface.poClient).length > 2048) return { status: "invalid" };
|
|
63
|
+
return validate(source.preface.poClient);
|
|
64
|
+
}
|
|
65
|
+
let encoded;
|
|
66
|
+
if ("query" in source) {
|
|
67
|
+
const values = source.query.getAll(PO_CLIENT_METADATA_QUERY);
|
|
68
|
+
if (values.length > 1) return { status: "invalid" };
|
|
69
|
+
encoded = values[0];
|
|
70
|
+
} else encoded = source.header;
|
|
71
|
+
if (encoded === null || encoded === void 0) return { status: "absent" };
|
|
72
|
+
if (encoded.length > 2048 || !/^[A-Za-z0-9_-]+$/u.test(encoded)) return { status: "invalid" };
|
|
73
|
+
const binary = atob(encoded.replaceAll("-", "+").replaceAll("_", "/"));
|
|
74
|
+
const bytes = Uint8Array.from(binary, (character) => character.charCodeAt(0));
|
|
75
|
+
const text = new TextDecoder("utf-8", { fatal: true }).decode(bytes);
|
|
76
|
+
if (btoa(binary).replaceAll("+", "-").replaceAll("/", "_").replace(/=+$/u, "") !== encoded) return { status: "invalid" };
|
|
77
|
+
return validate(JSON.parse(text));
|
|
78
|
+
} catch {
|
|
79
|
+
return { status: "invalid" };
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
//#endregion
|
|
83
|
+
//#region ../../minor/po-voice/src/types/manualTranscription.ts
|
|
84
|
+
const MANUAL_TRANSCRIPTION_ROUTE = "/manual/transcribe";
|
|
85
|
+
const MANUAL_TRANSCRIPTION_DURATION_HEADER = "x-po-audio-duration-ms";
|
|
86
|
+
const MANUAL_TRANSCRIPTION_MAX_AUDIO_BYTES = 4194304;
|
|
87
|
+
const MANUAL_TRANSCRIPTION_MAX_DURATION_MS = 3e5;
|
|
88
|
+
const MANUAL_TRANSCRIPTION_MAX_TRANSCRIPT_BYTES = 16384;
|
|
89
|
+
var ManualTranscriptionError = class extends Error {
|
|
90
|
+
kind;
|
|
91
|
+
constructor(kind, message) {
|
|
92
|
+
super(message);
|
|
93
|
+
this.kind = kind;
|
|
94
|
+
this.name = "ManualTranscriptionError";
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region ../../core/po-core/src/schemas/narration.ts
|
|
99
|
+
const MAX_NARRATION_TEXT_CHARACTERS = 4096;
|
|
100
|
+
_Object_({ text: String$1({
|
|
101
|
+
minLength: 1,
|
|
102
|
+
maxLength: MAX_NARRATION_TEXT_CHARACTERS
|
|
103
|
+
}) }, { additionalProperties: false });
|
|
104
|
+
function replaceControlCharacters(text) {
|
|
105
|
+
return Array.from(text, (character) => {
|
|
106
|
+
const codePoint = character.codePointAt(0);
|
|
107
|
+
return codePoint !== void 0 && (codePoint < 32 || codePoint === 127) ? " " : character;
|
|
108
|
+
}).join("");
|
|
109
|
+
}
|
|
110
|
+
/** Normalize caller-owned speech while preserving Unicode-safe truncation. */
|
|
111
|
+
function normalizeNarrationText(text) {
|
|
112
|
+
const normalized = replaceControlCharacters(text).replace(/\s+/gu, " ").trim();
|
|
113
|
+
if (!normalized) return void 0;
|
|
114
|
+
let truncated = "";
|
|
115
|
+
for (const character of normalized) {
|
|
116
|
+
if (truncated.length + character.length > 4096) break;
|
|
117
|
+
truncated += character;
|
|
118
|
+
}
|
|
119
|
+
return truncated;
|
|
120
|
+
}
|
|
121
|
+
/** Builds the validated request value consumers pass to the injected service. */
|
|
122
|
+
function createNarrationRequest(text) {
|
|
123
|
+
const normalized = normalizeNarrationText(text);
|
|
124
|
+
return normalized === void 0 ? void 0 : Object.freeze({ text: normalized });
|
|
125
|
+
}
|
|
126
|
+
//#endregion
|
|
127
|
+
export { MANUAL_TRANSCRIPTION_MAX_AUDIO_BYTES as a, MANUAL_TRANSCRIPTION_ROUTE as c, encodePoClientMetadata as d, isPoClientToken as f, MANUAL_TRANSCRIPTION_DURATION_HEADER as i, ManualTranscriptionError as l, poClientMetadataFrom as m, createNarrationRequest as n, MANUAL_TRANSCRIPTION_MAX_DURATION_MS as o, normalizeClientDeviceName as p, normalizeNarrationText as r, MANUAL_TRANSCRIPTION_MAX_TRANSCRIPT_BYTES as s, MAX_NARRATION_TEXT_CHARACTERS as t, PO_CLIENT_METADATA_HEADER as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as path$2, n as crypto$2, o as stream, r as fs$3, s as util, t as child_process } from "./node-
|
|
2
|
-
import { a as checkMemorySyncInterval, c as decodeUTF8, d as AnthropicError, f as __classPrivateFieldGet, l as encodeUTF8, n as promiseWithResolvers, o as isStatus, p as __classPrivateFieldSet, s as loggerFor, u as ToolError } from "./anthropic-messages-
|
|
1
|
+
import { a as path$2, n as crypto$2, o as stream, r as fs$3, s as util, t as child_process } from "./node-CjBe953N.js";
|
|
2
|
+
import { a as checkMemorySyncInterval, c as decodeUTF8, d as AnthropicError, f as __classPrivateFieldGet, l as encodeUTF8, n as promiseWithResolvers, o as isStatus, p as __classPrivateFieldSet, s as loggerFor, u as ToolError } from "./anthropic-messages-BxS7qXqx.js";
|
|
3
3
|
import * as crypto$1 from "node:crypto";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
5
5
|
import * as fssync from "node:fs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
import { n as __exportAll } from "./rolldown-runtime-DbVrKiKs.js";
|
|
2
2
|
import * as crypto$1 from "node:crypto";
|
|
3
3
|
import * as path$1 from "node:path";
|
|
4
|
-
import * as util from "node:util";
|
|
5
4
|
import * as fs from "node:fs";
|
|
5
|
+
import * as util from "node:util";
|
|
6
6
|
import * as stream from "node:stream";
|
|
7
7
|
import * as child_process from "node:child_process";
|
|
8
8
|
//#region ../../../node_modules/.pnpm/@anthropic-ai+sdk@0.129.0_zod@4.6.7/node_modules/@anthropic-ai/sdk/internal/node.mjs
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { A as Check, J as Optional, L as Union, R as String, V as Literal, q as _Object_ } from "./serverPlugin-Cx6a5RT0.js";
|
|
2
|
+
//#region ../../core/po-core/src/schemas/notification.ts
|
|
3
|
+
/** Provider-owned Cordis service for caller-authored notification requests. */
|
|
4
|
+
const PO_NOTIFICATION_SERVICE = "po/notification";
|
|
5
|
+
/** Custom session entry type used to publish normalized notification data. */
|
|
6
|
+
const PO_NOTIFICATION_ENTRY_TYPE = "po-notification";
|
|
7
|
+
const MAX_PO_NOTIFICATION_BODY_CHARACTERS = 4096;
|
|
8
|
+
const PoNotificationLevelSchema = Union([
|
|
9
|
+
Literal("info"),
|
|
10
|
+
Literal("warning"),
|
|
11
|
+
Literal("error")
|
|
12
|
+
]);
|
|
13
|
+
/** The person must act on this notice; the host may push it to paired devices. Other notices stay in-app. */
|
|
14
|
+
const PoNotificationAttentionSchema = Optional(Literal(true));
|
|
15
|
+
_Object_({
|
|
16
|
+
title: Optional(String({
|
|
17
|
+
minLength: 1,
|
|
18
|
+
maxLength: 128
|
|
19
|
+
})),
|
|
20
|
+
subtitle: Optional(String({
|
|
21
|
+
minLength: 1,
|
|
22
|
+
maxLength: 256
|
|
23
|
+
})),
|
|
24
|
+
body: String({
|
|
25
|
+
minLength: 1,
|
|
26
|
+
maxLength: MAX_PO_NOTIFICATION_BODY_CHARACTERS
|
|
27
|
+
}),
|
|
28
|
+
level: Optional(PoNotificationLevelSchema),
|
|
29
|
+
attention: PoNotificationAttentionSchema
|
|
30
|
+
}, { additionalProperties: false });
|
|
31
|
+
const NormalizablePoNotificationRequestSchema = _Object_({
|
|
32
|
+
title: Optional(String()),
|
|
33
|
+
subtitle: Optional(String()),
|
|
34
|
+
body: String(),
|
|
35
|
+
level: Optional(PoNotificationLevelSchema),
|
|
36
|
+
attention: PoNotificationAttentionSchema
|
|
37
|
+
}, { additionalProperties: false });
|
|
38
|
+
const PoNotificationEntryDataSchema = _Object_({
|
|
39
|
+
version: Literal(1),
|
|
40
|
+
title: String({ maxLength: 128 }),
|
|
41
|
+
subtitle: String({ maxLength: 256 }),
|
|
42
|
+
body: String({
|
|
43
|
+
minLength: 1,
|
|
44
|
+
maxLength: MAX_PO_NOTIFICATION_BODY_CHARACTERS
|
|
45
|
+
}),
|
|
46
|
+
level: PoNotificationLevelSchema,
|
|
47
|
+
attention: PoNotificationAttentionSchema
|
|
48
|
+
}, { additionalProperties: false });
|
|
49
|
+
function replaceControlCharacters(text) {
|
|
50
|
+
return Array.from(text, (character) => {
|
|
51
|
+
const codePoint = character.codePointAt(0);
|
|
52
|
+
return codePoint !== void 0 && (codePoint < 32 || codePoint === 127) ? " " : character;
|
|
53
|
+
}).join("");
|
|
54
|
+
}
|
|
55
|
+
function normalizeText(text, maximum) {
|
|
56
|
+
const normalized = replaceControlCharacters(text).replace(/\s+/gu, " ").trim();
|
|
57
|
+
if (!normalized) return void 0;
|
|
58
|
+
let truncated = "";
|
|
59
|
+
for (const character of normalized) {
|
|
60
|
+
if (truncated.length + character.length > maximum) break;
|
|
61
|
+
truncated += character;
|
|
62
|
+
}
|
|
63
|
+
return truncated;
|
|
64
|
+
}
|
|
65
|
+
/** Normalize caller-owned notification text into a validated request. */
|
|
66
|
+
function normalizePoNotificationRequest(request) {
|
|
67
|
+
if (!Check(NormalizablePoNotificationRequestSchema, request)) return void 0;
|
|
68
|
+
const body = normalizeText(request.body, MAX_PO_NOTIFICATION_BODY_CHARACTERS);
|
|
69
|
+
if (!body) return void 0;
|
|
70
|
+
const title = request.title && normalizeText(request.title, 128);
|
|
71
|
+
const subtitle = request.subtitle && normalizeText(request.subtitle, 256);
|
|
72
|
+
const normalized = {
|
|
73
|
+
body,
|
|
74
|
+
...title ? { title } : {},
|
|
75
|
+
...subtitle ? { subtitle } : {},
|
|
76
|
+
...request.level ? { level: request.level } : {},
|
|
77
|
+
...request.attention ? { attention: true } : {}
|
|
78
|
+
};
|
|
79
|
+
return Object.freeze(normalized);
|
|
80
|
+
}
|
|
81
|
+
/** Builds normalized, versioned data for a Po notification session entry. */
|
|
82
|
+
function createPoNotificationEntryData(request) {
|
|
83
|
+
const normalized = normalizePoNotificationRequest(request);
|
|
84
|
+
if (!normalized) return void 0;
|
|
85
|
+
return Object.freeze({
|
|
86
|
+
version: 1,
|
|
87
|
+
title: normalized.title ?? "",
|
|
88
|
+
subtitle: normalized.subtitle ?? "",
|
|
89
|
+
body: normalized.body,
|
|
90
|
+
level: normalized.level ?? "info",
|
|
91
|
+
...normalized.attention ? { attention: true } : {}
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
function isPoNotificationEntryData(value) {
|
|
95
|
+
return Check(PoNotificationEntryDataSchema, value);
|
|
96
|
+
}
|
|
97
|
+
function readPoNotificationService(context) {
|
|
98
|
+
return context.get(PO_NOTIFICATION_SERVICE);
|
|
99
|
+
}
|
|
100
|
+
//#endregion
|
|
101
|
+
export { readPoNotificationService as i, createPoNotificationEntryData as n, isPoNotificationEntryData as r, PO_NOTIFICATION_ENTRY_TYPE as t };
|