@agimon-ai/po-cloudflare 0.0.2-alpha.2 → 0.0.2-alpha.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/dist/abort-signals-2GUraIGq.js +34 -0
- package/dist/agent-DZ-OKOHn.js +6850 -0
- package/dist/anthropic-messages-5ODquUB-.js +14317 -0
- package/dist/{apiContracts-CHOiCbS_.js → apiContracts-b33nSAAI.js} +18 -81
- package/dist/{approval-BMXqnTYd.js → approval-r3NnI1VC.js} +19 -3
- package/dist/{approvalPrompt-Bg1JrEEY.js → approvalPrompt-DWoXxu3S.js} +2 -2
- package/dist/artifactFiles-DLCReI0-.js +1 -0
- package/dist/assets/assets/{CodeEditorView-BnyZHaYM.js → CodeEditorView-XeNS0L9M.js} +2 -2
- package/dist/assets/assets/{abnfDiagram-WEYOIA3C-muME0eCj.js → abnfDiagram-WEYOIA3C-B6ZW0nkR.js} +2 -2
- package/dist/assets/assets/{architecture-WOLXFQ4H-DMnhK1WH.js → architecture-WOLXFQ4H-bVR64sHO.js} +1 -1
- package/dist/assets/assets/{architectureDiagram-ZHVYKT53-DKn7XGP7.js → architectureDiagram-ZHVYKT53-D7tZz3io.js} +2 -2
- package/dist/assets/assets/{blockDiagram-RJAE7QA3-DtDctXZg.js → blockDiagram-RJAE7QA3-DdwScfiX.js} +2 -2
- package/dist/assets/assets/{c4Diagram-XDPPPE54-23pGLJeP.js → c4Diagram-XDPPPE54-DgSxZJCV.js} +2 -2
- package/dist/assets/assets/channel-TPcVvp_3.js +2 -0
- package/dist/assets/assets/{chunk-2E7WHVMD-BZ2nGNPa.js → chunk-2E7WHVMD-D5TXC2SM.js} +2 -2
- package/dist/assets/assets/{chunk-4EMNKR2T-Dui1SYFi.js → chunk-4EMNKR2T-BWhOSvo1.js} +2 -2
- package/dist/assets/assets/{chunk-55XCU76K-CUB92Evl.js → chunk-55XCU76K-HkkBzLtZ.js} +2 -2
- package/dist/assets/assets/{chunk-7S6XSTFO-CVayPHfE.js → chunk-7S6XSTFO-CBnjycLU.js} +2 -2
- package/dist/assets/assets/{chunk-AQDTSKZB---wakYqY.js → chunk-AQDTSKZB-75lIIq8T.js} +2 -2
- package/dist/assets/assets/{chunk-DSNLSHJZ-DfbdohUR.js → chunk-DSNLSHJZ-D8PpnXMk.js} +2 -2
- package/dist/assets/assets/{chunk-HAGFOTED-Dr4KRh-b.js → chunk-HAGFOTED-CXRS2NIN.js} +2 -2
- package/dist/assets/assets/{chunk-HNE4Q36P-D06cR91Z.js → chunk-HNE4Q36P-BocUqS94.js} +2 -2
- package/dist/assets/assets/{chunk-NQOKRVIF-Ca4gLeDb.js → chunk-NQOKRVIF-CHf_ogYT.js} +2 -2
- package/dist/assets/assets/{chunk-UHW7PFBP-DmL638jN.js → chunk-UHW7PFBP-DrW1PaIv.js} +2 -2
- package/dist/assets/assets/{chunk-VQ5W62QI-pkxSW5Zj.js → chunk-VQ5W62QI-CLoA7bFm.js} +2 -2
- package/dist/assets/assets/{chunk-WQQL4CDK-Dcc8hV4U.js → chunk-WQQL4CDK-BmBsrj9I.js} +2 -2
- package/dist/assets/assets/chunk-XXDRQBXY-iFE4Tl8c.js +2 -0
- package/dist/assets/assets/{chunk-YZO67HFG-B_HKcFrw.js → chunk-YZO67HFG-DShE_cgv.js} +2 -2
- package/dist/assets/assets/{chunk-ZAUX2LTX-DAzZUysS.js → chunk-ZAUX2LTX-B3oLvSXy.js} +2 -2
- package/dist/assets/assets/{chunk-ZCHMQSOR-DAVgjymL.js → chunk-ZCHMQSOR-B14vKK7C.js} +2 -2
- package/dist/assets/assets/{classDiagram-v2-4MYWR3UA-Fsw8TGPu.js → classDiagram-v2-4MYWR3UA-Da8elIW2.js} +2 -2
- package/dist/assets/assets/{cose-bilkent-JH36ORCC-CgUbISYV.js → cose-bilkent-JH36ORCC-Du4tGtiJ.js} +2 -2
- package/dist/assets/assets/{cynefin-EF2NZ3EQ-D1LxAU2x.js → cynefin-EF2NZ3EQ-Cyj6i_WI.js} +1 -1
- package/dist/assets/assets/{cynefinDiagram-WF24UDRP-D54I1jil.js → cynefinDiagram-WF24UDRP-DFWXwO7A.js} +2 -2
- package/dist/assets/assets/{dagre-NK4GIZVX-DC7zL16U.js → dagre-NK4GIZVX-C1wB_cf-.js} +2 -2
- package/dist/assets/assets/{diagram-CBK3MWTC-DB0ptUdz.js → diagram-CBK3MWTC-MYCOBYl6.js} +2 -2
- package/dist/assets/assets/{diagram-I5XIIV2D-CozSftPJ.js → diagram-I5XIIV2D-BFYbKUFf.js} +2 -2
- package/dist/assets/assets/{diagram-ODIL2UCW-g3WOEWDS.js → diagram-ODIL2UCW-6siqTpv_.js} +2 -2
- package/dist/assets/assets/{diagram-PFBEJUXE-CFxGeOYi.js → diagram-PFBEJUXE-CaBr9CoB.js} +2 -2
- package/dist/assets/assets/{diagram-RJA3I4VV-BQBsLche.js → diagram-RJA3I4VV-DAvmuDpc.js} +2 -2
- package/dist/assets/assets/{diagram-TYUNFSNR-DrjpW2yq.js → diagram-TYUNFSNR-CJnhgCpo.js} +2 -2
- package/dist/assets/assets/{dist-DjL8d1jZ.js → dist-BQ4W1R18.js} +2 -2
- package/dist/assets/assets/{dist-DvgCCshF.js → dist-BnzFckPF.js} +2 -2
- package/dist/assets/assets/{dist-gfbb4ygy.js → dist-CFtBpcYL.js} +2 -2
- package/dist/assets/assets/{dist-BabjcJ3j.js → dist-CIQX1z4W.js} +2 -2
- package/dist/assets/assets/{dist-XIZum9n5.js → dist-ChHYoe9_.js} +2 -2
- package/dist/assets/assets/{dist-1-mhYUBH.js → dist-DKxZO8d9.js} +2 -2
- package/dist/assets/assets/{dist-h6SOnP8-.js → dist-DL6z28wl.js} +2 -2
- package/dist/assets/assets/{dist-B3JXhDWV.js → dist-DNyn1p9Z.js} +2 -2
- package/dist/assets/assets/{dist-Izr2SB3q.js → dist-qYlLXIa8.js} +2 -2
- package/dist/assets/assets/{ebnfDiagram-V4P3TTPT-BZS_aAve.js → ebnfDiagram-V4P3TTPT-AUcqDTM3.js} +2 -2
- package/dist/assets/assets/{elk-QONTBCTQ-B2ksVmMA.js → elk-QONTBCTQ-aA10PEHJ.js} +2 -2
- package/dist/assets/assets/{erDiagram-KYQIGQAA-7P6zF-Z-.js → erDiagram-KYQIGQAA-hhYiqA-x.js} +2 -2
- package/dist/assets/assets/{eventmodeling-K75KTNOO-RoGQoRq-.js → eventmodeling-K75KTNOO-BQZqbRo5.js} +1 -1
- package/dist/assets/assets/flowDiagram-IUGLLWBU-BuyysPYC.js +1 -0
- package/dist/assets/assets/{ganttDiagram-R7GPNTJY-CTOlRy7M.js → ganttDiagram-R7GPNTJY-CLON1GpW.js} +2 -2
- package/dist/assets/assets/{gitGraph-VSP46ZUC-CPqytIt0.js → gitGraph-VSP46ZUC-DbmvNwR2.js} +1 -1
- package/dist/assets/assets/{gitGraphDiagram-PDYL7XHY-BffLxuxg.js → gitGraphDiagram-PDYL7XHY-DJVO0WlL.js} +2 -2
- package/dist/assets/assets/index-BiTVAj5E.js +155 -0
- package/dist/assets/assets/index-CBNQEGK3.css +1 -0
- package/dist/assets/assets/{info-OHQRW6UA-BI8RK0Ow.js → info-OHQRW6UA-CAt3Nt3g.js} +1 -1
- package/dist/assets/assets/{infoDiagram-MVDRKAX5-DUIst1FB.js → infoDiagram-MVDRKAX5-DTuqH-Zb.js} +2 -2
- package/dist/assets/assets/{ishikawaDiagram-HPEHV2GE-CA17Eho5.js → ishikawaDiagram-HPEHV2GE-BnWvdonT.js} +2 -2
- package/dist/assets/assets/{journeyDiagram-BOSHW7O7-CNri5Ap9.js → journeyDiagram-BOSHW7O7-Btxtcgvl.js} +2 -2
- package/dist/assets/assets/{kanban-definition-FNSA4HC5-DnXna7jO.js → kanban-definition-FNSA4HC5-q7ek9o_H.js} +2 -2
- package/dist/assets/assets/{line-BsXJZn93.js → line-B7yLilmC.js} +2 -2
- package/dist/assets/assets/{linear-BHYaD5T0.js → linear-y8aSKEli.js} +2 -2
- package/dist/assets/assets/{mermaid-parser.core-B64Eo-8a.js → mermaid-parser.core-B4rH50nD.js} +4 -4
- package/dist/assets/assets/{mermaid.core-Zw9qmTzg.js → mermaid.core-DnRVHTjE.js} +5 -5
- package/dist/assets/assets/{mindmap-definition-6OY57UG3-E5qz4KNc.js → mindmap-definition-6OY57UG3-DT9Afs2v.js} +2 -2
- package/dist/assets/assets/{packet-JDAUHWVQ-DgfizTr3.js → packet-JDAUHWVQ-CnqNbu4p.js} +1 -1
- package/dist/assets/assets/{pegDiagram-ECIUJNBX-D0WK_agM.js → pegDiagram-ECIUJNBX-cvxdBBFq.js} +2 -2
- package/dist/assets/assets/{pie-XZMESJXO-PJR1sXD4.js → pie-XZMESJXO-etXMNsaL.js} +1 -1
- package/dist/assets/assets/{pieDiagram-GNMPY74T-CPuU-NTs.js → pieDiagram-GNMPY74T-CBN-R3_j.js} +2 -2
- package/dist/assets/assets/{quadrantDiagram-D57K4MC3-5C9yjM1b.js → quadrantDiagram-D57K4MC3-C5jjVPIH.js} +2 -2
- package/dist/assets/assets/{radar-ABXABTNO-BspdXgl0.js → radar-ABXABTNO-CAMd_mrV.js} +1 -1
- package/dist/assets/assets/{railroad-I3PHUGI6-Ct0a6hLD.js → railroad-I3PHUGI6-DIs3auoe.js} +1 -1
- package/dist/assets/assets/{railroad-abnf-LNEFI6M7-fduYB4SA.js → railroad-abnf-LNEFI6M7-CJXr1qWy.js} +1 -1
- package/dist/assets/assets/{railroad-ebnf-DWYD2UWJ-CTQa8Sww.js → railroad-ebnf-DWYD2UWJ-DfwtykqI.js} +1 -1
- package/dist/assets/assets/{railroad-peg-JR7BVNR7-DatoH3GJ.js → railroad-peg-JR7BVNR7-B8beAhTs.js} +1 -1
- package/dist/assets/assets/{railroadDiagram-Y72NRBL7-C8sWN8l2.js → railroadDiagram-Y72NRBL7-BDcQE-EL.js} +2 -2
- package/dist/assets/assets/{requirementDiagram-EQYSW5RA-CqRz4RcT.js → requirementDiagram-EQYSW5RA-KJ4-QjZM.js} +2 -2
- package/dist/assets/assets/{sankeyDiagram-SY24JHO5-bdiuKKlX.js → sankeyDiagram-SY24JHO5-VjIB-Ybr.js} +2 -2
- package/dist/assets/assets/{sequenceDiagram-BLEHNHQU-Zy-8I0Hy.js → sequenceDiagram-BLEHNHQU-MfMuWq1M.js} +2 -2
- package/dist/assets/assets/{src-gihY33R9.js → src-BAxIj8GJ.js} +2 -2
- package/dist/assets/assets/{stateDiagram-v2-A6IESKWZ-DXQERPvz.js → stateDiagram-v2-A6IESKWZ-mHwLRRCY.js} +2 -2
- package/dist/assets/assets/{swimlanes-B3ENRKFQ-1gjZQElg.js → swimlanes-B3ENRKFQ-PArlYoqV.js} +2 -2
- package/dist/assets/assets/swimlanesDiagram-AYQRV4AK-The09-5S.js +9 -0
- package/dist/assets/assets/{timeline-definition-JXYKGLGB-CTeYEw-9.js → timeline-definition-JXYKGLGB-B2nKiNFU.js} +2 -2
- package/dist/assets/assets/{treeView-D4JQ5SDB-DD-EsLLT.js → treeView-D4JQ5SDB-gU23_RuI.js} +1 -1
- package/dist/assets/assets/{treemap-SAJKECNS-BLdFeS5J.js → treemap-SAJKECNS-CiqoMvZa.js} +1 -1
- package/dist/assets/assets/{usecaseDiagram-WPOLBNNX-C1GikSSP.js → usecaseDiagram-WPOLBNNX-DpeoWpMK.js} +2 -2
- package/dist/assets/assets/{vennDiagram-Q3Y3IDCW-B1FoA3g8.js → vennDiagram-Q3Y3IDCW-C31iGKvM.js} +2 -2
- package/dist/assets/assets/{wardley-7MLQ67FV-BrHb5Bjf.js → wardley-7MLQ67FV-CIzHhzNw.js} +1 -1
- package/dist/assets/assets/{wardleyDiagram-IVAIDKWA-CmPLD1X4.js → wardleyDiagram-IVAIDKWA-DIIkoezc.js} +2 -2
- package/dist/assets/assets/{webpack-BYWDFj_R.js → webpack-RFseiMZW.js} +2 -2
- package/dist/assets/assets/{xychartDiagram-4URNHDU4-DR5pfEjl.js → xychartDiagram-4URNHDU4-QiHL91kC.js} +2 -2
- package/dist/assets/bundle-asset-policy.json +1 -1
- package/dist/assets/index.html +2 -2
- package/dist/assets/plugins/assets/base-CKKRZ7-h.css +2 -0
- package/dist/assets/plugins/assets/browserCaptureWorklet-Droj0fW0-Droj0fW0.js +13 -0
- package/dist/assets/plugins/assets/ibm-plex-sans-cyrillic-ext-wght-normal-d45eAU9y.woff2 +0 -0
- package/dist/assets/plugins/assets/ibm-plex-sans-cyrillic-wght-normal-BAAhND-U.woff2 +0 -0
- package/dist/assets/plugins/assets/ibm-plex-sans-greek-wght-normal-CmyJS8uq.woff2 +0 -0
- package/dist/assets/plugins/assets/ibm-plex-sans-latin-ext-wght-normal-CIII54If.woff2 +0 -0
- package/dist/assets/plugins/assets/ibm-plex-sans-latin-wght-normal-IvpUvPa2.woff2 +0 -0
- package/dist/assets/plugins/assets/ibm-plex-sans-vietnamese-wght-normal-Dg1JeJN0.woff2 +0 -0
- package/dist/assets/plugins/assets/jetbrains-mono-cyrillic-ext-wght-normal-EocZY2iu.woff2 +0 -0
- package/dist/assets/plugins/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
- package/dist/assets/plugins/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
- package/dist/assets/plugins/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
- package/dist/assets/plugins/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
- package/dist/assets/plugins/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -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-BJDT6Lbw.js +1 -0
- package/dist/assets/plugins/compositions.json +1 -0
- package/dist/assets/plugins/slots/approval.293d9a00-BXIhaPlQ.js +2 -0
- package/dist/assets/plugins/slots/artifacts.24567664-ZzR0gbvy.js +1 -0
- package/dist/assets/plugins/slots/author.0998a880-DAbA-7rb.js +93 -0
- package/dist/assets/plugins/slots/autocompact.dd97d013-IVq4Z6qm.js +1 -0
- package/dist/assets/plugins/slots/builtin-tools.36d7400b-CpCLjRRN.js +7 -0
- package/dist/assets/plugins/slots/codemode.8eaee717-VWt9PqsU.js +10 -0
- package/dist/assets/plugins/slots/domain.5e95fc37-5PIUBqDe.js +1 -0
- package/dist/assets/plugins/slots/edit.385c9aa9-DNAjPNG5.js +7 -0
- package/dist/assets/plugins/slots/files.daf34ed8-CQaTz0i1.js +2 -0
- package/dist/assets/plugins/slots/goal.77ec9930-B8EkarBq.js +1 -0
- package/dist/assets/plugins/slots/grep.02052cdc-CIRhO2gY.js +1 -0
- package/dist/assets/plugins/slots/help.ecd4c0f9-naMF9NN1.js +3 -0
- package/dist/assets/plugins/slots/log.a86eb6d0-D5__rAZJ.js +4 -0
- package/dist/assets/plugins/slots/mcp.974af249-DPNHn9XH.js +109 -0
- package/dist/assets/plugins/slots/plan.bafb8f68-C5GEpybF.js +3 -0
- package/dist/assets/plugins/slots/profile.48851a1d-yX6tzV3x.js +1 -0
- package/dist/assets/plugins/slots/prompts.723d7748-B7zpPeoF.js +3 -0
- package/dist/assets/plugins/slots/read.46bf6536-Cw5Z5z5T.js +1 -0
- package/dist/assets/plugins/slots/runner.53e9bd76-CiQR_FPX.js +8 -0
- package/dist/assets/plugins/slots/skill.086701a4-CL6h_F-x.js +4 -0
- package/dist/assets/plugins/slots/vault.ac9935c8-DKERQYg4.js +1 -0
- package/dist/assets/plugins/slots/voice.e85ca7f9-DEgb-U9m.js +1 -0
- package/dist/assets/pwa/pwa.js +12 -12
- package/dist/assets/pwa/sw.js +4 -4
- package/dist/{atomicJson-BJfPFSYF.js → atomicJson-C_7F2zD1.js} +2 -3
- package/dist/azure-openai-config-COZUaRzM.js +55 -0
- package/dist/azure-openai-responses-Cs4k2HOd.js +183 -0
- package/dist/{backgroundWork-CeFrbRnj.js → backgroundWork-B1mPDYlf.js} +1 -1
- package/dist/browser-BWf8OMfl.js +3 -0
- package/dist/childSession-Cf2-kH4O.js +22 -0
- package/dist/classifier-shared-IhSH9hhh.js +106 -0
- package/dist/cloudflare-workers-ai-system-one-BNnc8MuH.js +52 -0
- package/dist/{codemode-DbPu0yJN.js → codemode-DQFmrosw.js} +5 -2
- package/dist/contracts-DD3f1Lpn.js +19 -0
- package/dist/diagnostics-1lYFeSJe.js +131 -0
- package/dist/{server-D3PQk1Gt.js → dist-B-vqs6tA.js} +1 -546
- package/dist/dist-Dvx5mlIR.js +50 -0
- package/dist/env-api-keys-Bow6MJe2.js +32 -0
- package/dist/error-body-CJk7jMUh.js +102 -0
- package/dist/esm-BKJy3O9-.js +1553 -0
- package/dist/exports-B0WMEXCP.js +34 -0
- package/dist/{remoteMcp-CMqZldeA.js → exports-D09VsUk-.js} +1153 -175
- package/dist/{exports-BNZz2DNU.js → exports-nV43ShA7.js} +25 -9
- package/dist/{extensionFile-CXOa5G4C.js → extensionFile-DNM4xsje.js} +26 -2
- package/dist/github-copilot-headers-D1RedfLn.js +22 -0
- package/dist/google-generative-ai-DXTILNT0.js +328 -0
- package/dist/google-shared-e4JDCTVP.js +19588 -0
- package/dist/google-vertex-a1lzvJfq.js +374 -0
- package/dist/{domains-BNjGTOPj.js → harnessState-Dwrk3lfv.js} +175 -16
- package/dist/{harnessStore-BT706Ly6.js → harnessStore-Z7yDLO45.js} +4 -5
- package/dist/hash-Dt6RIbkn.js +16 -0
- package/dist/headers-CwtEVQvr.js +17 -0
- package/dist/help-w6vVEZGL.js +101 -0
- package/dist/hubChannel-Cm-sxOvU.js +21 -0
- package/dist/hubRevisions-58pU2dW5.js +363 -0
- package/dist/identity-BgfHobJH.js +165 -0
- package/dist/index.edge-COJJ_Dv2.js +937 -0
- package/dist/index.edge-ChYa2LU4.js +14 -0
- package/dist/index.edge-ClLTmPFz.js +191 -0
- package/dist/index.edge-DyYmurS7.js +62 -0
- package/dist/index.edge-K0w5auwG.js +56 -0
- package/dist/index.edge-Xa5LLtxz.js +67 -0
- package/dist/iso-BPQViXM8.js +10 -0
- package/dist/{layeredConfig-DPQAnlXD.js → layeredConfig-CUkYUs1f.js} +193 -15
- package/dist/{majorModes-DbCfLZH3.js → majorModes-BB0PXgFn.js} +4 -14
- package/dist/majorModes-C7vtBs4D.js +1 -0
- package/dist/{mcpProjection-BsP0IEnb.js → mcpProjection-BtKzB6oK.js} +2 -2
- package/dist/migrations-5gbLIQIc.js +32 -0
- package/dist/mistral-conversations-CLwhVDjA.js +689 -0
- package/dist/modeDefinition-C3Zbrw48.js +44 -0
- package/dist/models-Chzm15vC.js +1511 -0
- package/dist/narration-CpRurWLO.js +127 -0
- package/dist/node-BT4GsJQp.js +2479 -0
- package/dist/node-DytJOfYf.js +23 -0
- package/dist/notification-kckG3leF.js +102 -0
- package/dist/openai-codex-responses-DRMONxDE.js +1210 -0
- package/dist/openai-completions-CcNhAv8l.js +984 -0
- package/dist/openai-decisions-BsFjaAGw.js +142 -0
- package/dist/openai-kPrtlgjl.js +17357 -0
- package/dist/openai-prompt-cache-Bc6qNWt0.js +8 -0
- package/dist/openai-responses-C5Gp2UOV.js +281 -0
- package/dist/openai-responses-shared-BbSi-wBR.js +661 -0
- package/dist/openrouter-cost-CvC52g3b.js +30 -0
- package/dist/openrouter-images-BoHl8g8p.js +124 -0
- package/dist/{hubChannel-BHQyzcOo.js → packageApi-t1oCjNDU.js} +4 -41
- package/dist/photon_rs_bg.wasm +0 -0
- package/dist/pi-messages-BXfrZLC7.js +312 -0
- package/dist/piConfig-DQzlbPY4.js +126 -0
- package/dist/piSettings-Cf1QofNe.js +1 -0
- package/dist/platform-BIEiM4TG.js +113 -0
- package/dist/pluginContributions-Be9EnCAW.js +16 -0
- package/dist/pluginProtocol-BqXXyI4z.js +80 -0
- package/dist/{protocol-Xpm_mCNN.js → protocol-DDL8geoS.js} +2 -2
- package/dist/provider-env-CxhHUFiF.js +38 -0
- package/dist/provider-retry-BUoezuw8.js +79 -0
- package/dist/sanitize-unicode-C3Ec8oL6.js +26 -0
- package/dist/sealedChannel-BeWNTWys.js +27 -0
- package/dist/server-AbXyhXlY.js +217 -0
- package/dist/server-B6dqQoh2.js +1518 -0
- package/dist/server-BIHo9TFu.js +505 -0
- package/dist/{server-BZh1ZXz_.js → server-BJ7DNzCp.js} +8 -19
- package/dist/server-BO-j_GbD.js +15106 -0
- package/dist/{server-D4W7EdJY.js → server-BQzAiMns.js} +16 -16
- package/dist/server-BR7SZtj7.js +3125 -0
- package/dist/{server-BE6VqEiA.js → server-BT2ORK83.js} +20 -12
- package/dist/server-BbSHYRnY.js +295 -0
- package/dist/server-BqoKlEGk.js +1806 -0
- package/dist/{server-tvgQ99rv.js → server-Busl0pQI.js} +370 -120
- package/dist/server-CIHM4jqu.js +1116 -0
- package/dist/server-CgWSSdvd.js +576 -0
- package/dist/{server-Dpgh8PDh.js → server-Co_UWKrR.js} +14 -5
- package/dist/{server-BAAL9-NA.js → server-CuEPb7u-.js} +3 -10
- package/dist/{server-Dt4y1rZD.js → server-D40q2Jpx.js} +47 -27
- package/dist/server-DCyf2Asb.js +679 -0
- package/dist/server-DH7PfLln.js +148 -0
- package/dist/server-DJ8bc89M.js +934 -0
- package/dist/server-DYdp0W9v.js +489 -0
- package/dist/server-DsdPEYGu.js +639 -0
- package/dist/server-DymH4Ucq.js +189 -0
- package/dist/server-IqECnUrb.js +834 -0
- package/dist/{server-36iuA3MI.js → server-KBgW77zh.js} +3 -3
- package/dist/server-RW_9R3R3.js +1522 -0
- package/dist/server-aUit8j6r.js +1028 -0
- package/dist/{server-DJAanjoI.js → server-gifRriZK.js} +491 -103
- package/dist/server-nkUlqnAL.js +2658 -0
- package/dist/server-oxyEbv1a.js +1256 -0
- package/dist/{server-D8ndq0wL.js → server-ub3s16Mc.js} +11 -9
- package/dist/{build-2gFaVEfG.js → serverPlugin-CELT6P0Q.js} +3946 -3
- package/dist/{sessionConfig-rBQgzXlT.js → sessionConfig-RQGvfm6E.js} +550 -760
- package/dist/simple-options-CFzI5Pd_.js +156 -0
- package/dist/streaming-json-BWTHTwz-.js +858 -0
- package/dist/system-one-shared-CiIrx29d.js +132 -0
- package/dist/{notification-D76PSL7r.js → telemetry-Csv1ZxAn.js} +1 -92
- package/dist/transform-messages-D77af7Bx.js +356 -0
- package/dist/truncate-M3KbFyVj.js +89 -0
- package/dist/{server-A-_GFpPr.js → type-ASYnCGVW.js} +10 -1031
- package/dist/typesafe-system-one-DGxeggJh.js +37 -0
- package/dist/uuid-B0QJx6Kr.js +31 -0
- package/dist/{validation-D77NZBrx.js → validation-BJxVSAwx.js} +8 -3
- package/dist/{value-Djvc2foV.js → value-_W31So3B.js} +1 -1
- package/dist/vaultSettings-Di3n5YIg.js +328 -0
- package/dist/voiceTools-RMn4HvWo.js +246 -0
- package/dist/web-DCP7ELJj.js +3 -0
- package/dist/worker.js +95288 -49863
- package/dist/workflow-B7qx0Vv9.js +79 -0
- package/package.json +37 -22
- package/wrangler.jsonc +4 -2
- package/dist/assets/assets/channel-CMrEzemr.js +0 -2
- package/dist/assets/assets/chunk-XXDRQBXY-CFf0S6bN.js +0 -2
- package/dist/assets/assets/flowDiagram-IUGLLWBU-BhGbWVf0.js +0 -1
- package/dist/assets/assets/index-Bx_K4Joy.js +0 -155
- package/dist/assets/assets/index-DZM68mTk.css +0 -1
- package/dist/assets/assets/swimlanesDiagram-AYQRV4AK-q91tR8ri.js +0 -9
- package/dist/contextProjection-DVP2Vc5j.js +0 -188
- package/dist/harnessState-gmzJcPGt.js +0 -88
- package/dist/harnessStore-BiH9vSuD.js +0 -1
- package/dist/index.edge-BgSx_gRO.js +0 -45
- package/dist/majorModes-BvWNqoHt.js +0 -1
- package/dist/piSettings-B6fsgIBA.js +0 -1
- package/dist/platform-B4AAgwJ0.js +0 -16
- package/dist/platformFiles-C_bXo4Ig.js +0 -39
- package/dist/server-BZaPPoQp.js +0 -592
- package/dist/server-D75MWDhB.js +0 -118
- package/dist/server-r358hzQg.js +0 -280
- package/dist/serverPlugin-BOI6c6s5.js +0 -3393
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { t as isRecord } from "./classifier-shared-IhSH9hhh.js";
|
|
2
|
+
import { t as classifySystemOne } from "./system-one-shared-CiIrx29d.js";
|
|
3
|
+
//#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/api/typesafe-system-one.js
|
|
4
|
+
/**
|
|
5
|
+
* TypeSafe's native System One protocol. OpenRouter serves the same protocol,
|
|
6
|
+
* so both providers use this API with different base URLs.
|
|
7
|
+
*
|
|
8
|
+
* TypeSafe takes images as `assets`. They are experimental and need the
|
|
9
|
+
* `TypeSafe-Danger-Zone-Images` opt-in header; without it the API answers 400.
|
|
10
|
+
* OpenRouter drops `assets` silently and takes images as `image_url` parts in the state instead.
|
|
11
|
+
* Models behind a proxy that hides both the provider ID and the OpenRouter host must set
|
|
12
|
+
* `compat.imageInput`.
|
|
13
|
+
*/
|
|
14
|
+
const transport = {
|
|
15
|
+
api: "typesafe-system-one",
|
|
16
|
+
label: "System One API",
|
|
17
|
+
detectCompat: (model) => model.provider === "openrouter" || model.baseUrl.includes("openrouter.ai") ? {
|
|
18
|
+
imageInput: "state-image-urls",
|
|
19
|
+
sendImageOptInHeader: false
|
|
20
|
+
} : {
|
|
21
|
+
imageInput: "assets",
|
|
22
|
+
sendImageOptInHeader: true
|
|
23
|
+
},
|
|
24
|
+
url: (model) => new URL("systemone", `${model.baseUrl.replace(/\/+$/u, "")}/`),
|
|
25
|
+
payload: (model, request) => ({
|
|
26
|
+
model: model.id,
|
|
27
|
+
...request
|
|
28
|
+
}),
|
|
29
|
+
output: (body) => {
|
|
30
|
+
if (!isRecord(body)) throw new Error("System One API returned an unexpected response");
|
|
31
|
+
return body;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
/** TypeSafe System One classification with public `bool` values mapped to wire-level `noul`. */
|
|
35
|
+
const classify = (model, context, options) => classifySystemOne(transport, model, context, options);
|
|
36
|
+
//#endregion
|
|
37
|
+
export { classify };
|
|
@@ -0,0 +1,31 @@
|
|
|
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/uuid.js
|
|
2
|
+
const MAX_UUID_V7_TIMESTAMP = 0xffffffffffff;
|
|
3
|
+
const MAX_SEQUENCE = (1n << 41n) - 1n;
|
|
4
|
+
let lastOrdinaryTimestamp = -1;
|
|
5
|
+
let sequence;
|
|
6
|
+
/** Generate a time-ordered UUIDv7. A supplied timestamp is preserved for follower ids. */
|
|
7
|
+
function uuidv7(timestampMs) {
|
|
8
|
+
const requestedTimestamp = timestampMs ?? Date.now();
|
|
9
|
+
if (!Number.isInteger(requestedTimestamp) || requestedTimestamp < 0 || requestedTimestamp > MAX_UUID_V7_TIMESTAMP) throw new RangeError(`UUIDv7 timestamp must be an integer between 0 and ${MAX_UUID_V7_TIMESTAMP}`);
|
|
10
|
+
const effectiveTimestamp = timestampMs === void 0 ? Math.max(requestedTimestamp, lastOrdinaryTimestamp) : timestampMs;
|
|
11
|
+
if (timestampMs === void 0) lastOrdinaryTimestamp = effectiveTimestamp;
|
|
12
|
+
const bytes = /* @__PURE__ */ new Uint8Array(16);
|
|
13
|
+
globalThis.crypto.getRandomValues(bytes);
|
|
14
|
+
if (sequence === void 0) sequence = BigInt(bytes[1]) << 32n | BigInt(bytes[2]) << 24n | BigInt(bytes[3]) << 16n | BigInt(bytes[4]) << 8n | BigInt(bytes[5]);
|
|
15
|
+
else {
|
|
16
|
+
if (sequence === MAX_SEQUENCE) throw new RangeError("UUIDv7 generator sequence exhausted");
|
|
17
|
+
sequence++;
|
|
18
|
+
}
|
|
19
|
+
const timestamp = BigInt(effectiveTimestamp);
|
|
20
|
+
for (let index = 5; index >= 0; index--) bytes[index] = Number(timestamp >> BigInt((5 - index) * 8)) & 255;
|
|
21
|
+
bytes[6] = 112 | Number(sequence >> 37n & 15n);
|
|
22
|
+
bytes[7] = Number(sequence >> 29n & 255n);
|
|
23
|
+
bytes[8] = 128 | Number(sequence >> 23n & 63n);
|
|
24
|
+
bytes[9] = Number(sequence >> 15n & 255n);
|
|
25
|
+
bytes[10] = Number(sequence >> 7n & 255n);
|
|
26
|
+
bytes[11] = Number((sequence & 127n) << 1n) | bytes[11] & 1;
|
|
27
|
+
const hex = Array.from(bytes, (byte) => byte.toString(16).padStart(2, "0"));
|
|
28
|
+
return `${hex.slice(0, 4).join("")}-${hex.slice(4, 6).join("")}-${hex.slice(6, 8).join("")}-${hex.slice(8, 10).join("")}-${hex.slice(10).join("")}`;
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
export { uuidv7 as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as PoProtocolError } from "./protocol-
|
|
1
|
+
import { N as Record, Q as Integer, U as Number$1, V as String, Z as Literal, bt as _Array_, dt as Unknown, et as Boolean, ht as Optional, pt as _Object_, z as Union } from "./serverPlugin-CELT6P0Q.js";
|
|
2
|
+
import { t as PoProtocolError } from "./protocol-DDL8geoS.js";
|
|
3
3
|
//#region ../../foundations/po-minor-mode/src/schemas/mode.ts
|
|
4
4
|
const MINOR_MODE_CATALOG_SOURCE = "@agimon-ai/po/mode-catalog";
|
|
5
5
|
const PO_MINOR_MODE_CATALOG_SERVICE = "po/minor-mode-catalog";
|
|
@@ -226,6 +226,11 @@ const PO_MINOR_MODE_ENTRY_TYPE = "po-minor-modes";
|
|
|
226
226
|
function readMinorModeCatalog(context) {
|
|
227
227
|
return context.get(PO_MINOR_MODE_CATALOG_SERVICE);
|
|
228
228
|
}
|
|
229
|
+
function requireMinorModeCatalog(context) {
|
|
230
|
+
const catalog = readMinorModeCatalog(context);
|
|
231
|
+
if (!catalog) throw new Error("Po minor-mode catalog is unavailable.");
|
|
232
|
+
return catalog;
|
|
233
|
+
}
|
|
229
234
|
//#endregion
|
|
230
235
|
//#region ../../foundations/po-minor-mode/src/services/validation/index.ts
|
|
231
236
|
function minorModeKey(identity) {
|
|
@@ -295,4 +300,4 @@ function validateMinorModeActionArguments(action, argumentsValue) {
|
|
|
295
300
|
}
|
|
296
301
|
}
|
|
297
302
|
//#endregion
|
|
298
|
-
export { MINOR_MODE_CATALOG_SOURCE as a, PO_MINOR_MODE_ENTRY_TYPE as c, MINOR_MODE_ACTION_TIMEOUT_MS as i, readMinorModeCatalog as l, validateMinorModeActionArguments as n, MINOR_MODE_ERROR_CODE as o, validateMinorModeDefinition as r, PO_MINOR_MODE_CATALOG_SERVICE as s, minorModeKey as t };
|
|
303
|
+
export { MINOR_MODE_CATALOG_SOURCE as a, PO_MINOR_MODE_ENTRY_TYPE as c, MINOR_MODE_ACTION_TIMEOUT_MS as i, readMinorModeCatalog as l, validateMinorModeActionArguments as n, MINOR_MODE_ERROR_CODE as o, validateMinorModeDefinition as r, PO_MINOR_MODE_CATALOG_SERVICE as s, minorModeKey as t, requireMinorModeCatalog as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $t as IsObjectNotArray, Bt as IsEqual, Ct as Get$2, Ft as IsBigInt, Gt as IsLessEqualThan, Ht as IsGreaterEqualThan, It as IsBoolean, Jt as IsMinLength$1, Kt as IsLessThan, Mt as EveryAll, Nt as HasPropertyKey, Ot as Counted, Pt as IsArray, Qt as IsObject, Rt as IsConstructor, Ut as IsGreaterThan, V as String$1, Vt as IsFunction, Wt as IsInteger, Xt as IsNull, Yt as IsMultipleOf$1, Z as Literal, Zt as IsNumber, an as Keys, dt as Unknown, en as IsString, in as IsValueLike, it as Hash, jt as Every, kt as Entries, nn as IsUndefined, on as Some, pt as _Object_, qt as IsMaxLength$1, rn as IsUnsafePropertyKey, sn as SomeAll, tn as IsSymbol, z as Union, zt as IsDeepEqual } from "./serverPlugin-CELT6P0Q.js";
|
|
2
2
|
//#endregion
|
|
3
3
|
//#region ../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/system/arguments/arguments.mjs
|
|
4
4
|
/**
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
import { ar as defineServiceContract } from "./serverPlugin-CELT6P0Q.js";
|
|
2
|
+
//#region ../../foundations/po-vault/src/constants/vault.ts
|
|
3
|
+
const PO_VAULT_SERVICE = "po/vault";
|
|
4
|
+
/** The signed-in account's shared vault, bound by a host that can reach it; absent otherwise. */
|
|
5
|
+
const PO_VAULT_ACCOUNT_SERVICE = "po/vault-account";
|
|
6
|
+
/** The keyring account prefix; the account is `dek:<vault id in hex>`. */
|
|
7
|
+
const VAULT_KEYRING_ACCOUNT_PREFIX = "dek:";
|
|
8
|
+
/** The po-db table prefix the vault owns. */
|
|
9
|
+
const VAULT_DB_PREFIX = "vault";
|
|
10
|
+
/** The folder under the Po home that holds `key.bin` on hosts with no keyring. */
|
|
11
|
+
const VAULT_DIRECTORY = "vault";
|
|
12
|
+
const VAULT_CHECK_PLAINTEXT = "po-vault-v1";
|
|
13
|
+
const VAULT_CHECK_AAD = "po-vault:check";
|
|
14
|
+
const VAULT_META_ID = "vault_id";
|
|
15
|
+
const VAULT_META_CHECK = "dek_check";
|
|
16
|
+
/** The lease that serializes first-time key creation across processes. */
|
|
17
|
+
const VAULT_INIT_LEASE = "vault:init";
|
|
18
|
+
const VAULT_NAMESPACE_PATTERN = /^[a-z][a-z0-9.-]{0,63}$/u;
|
|
19
|
+
const VAULT_LEASE_TTL_MS = 3e4;
|
|
20
|
+
const VAULT_LEASE_RENEW_MS = 1e4;
|
|
21
|
+
const VAULT_LEASE_WAIT_MS = 35e3;
|
|
22
|
+
const VAULT_KEY_LOST_NOTICE = "Vault key was lost. Saved sign-ins were cleared; sign in again.";
|
|
23
|
+
/** The Vault settings page's route, relative to the global `vault` mount. */
|
|
24
|
+
const VAULT_SETTINGS_PATH = "/entries";
|
|
25
|
+
/** The account vault's network operations, sent to the account's cloud host. */
|
|
26
|
+
const VAULT_ACCOUNT_OPERATIONS = [
|
|
27
|
+
"vault.list",
|
|
28
|
+
"vault.get",
|
|
29
|
+
"vault.put",
|
|
30
|
+
"vault.delete"
|
|
31
|
+
];
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region ../../foundations/po-vault/src/schemas/contracts.ts
|
|
34
|
+
/** Bound once at the global level; every workspace and session resolves the same vault. */
|
|
35
|
+
const PO_VAULT_CONTRACT = defineServiceContract(PO_VAULT_SERVICE, { scope: "global" });
|
|
36
|
+
defineServiceContract(PO_VAULT_ACCOUNT_SERVICE, { scope: "global" });
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region ../../foundations/po-vault/src/services/vaultRules/index.ts
|
|
39
|
+
const MESSAGES$1 = {
|
|
40
|
+
unavailable: "The vault is unavailable.",
|
|
41
|
+
invalid: "The vault request is invalid.",
|
|
42
|
+
conflict: "The vault entry changed."
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Every vault failure. The message is fixed per code, so no key, value or upstream cause can
|
|
46
|
+
* reach a log or a response through it. Consumers match on `code`.
|
|
47
|
+
*/
|
|
48
|
+
var VaultError = class extends Error {
|
|
49
|
+
code;
|
|
50
|
+
constructor(code) {
|
|
51
|
+
super(MESSAGES$1[code]);
|
|
52
|
+
this.name = "VaultError";
|
|
53
|
+
this.code = code;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
/** Wraps any non-vault failure, typically sqlite, as `unavailable`, dropping its message. */
|
|
57
|
+
function asVaultError(error) {
|
|
58
|
+
return error instanceof VaultError ? error : new VaultError("unavailable");
|
|
59
|
+
}
|
|
60
|
+
const CONTROL_CHARACTERS$1 = /[\u0000-\u001f\u007f]/u;
|
|
61
|
+
function assertEntryName(namespace, key) {
|
|
62
|
+
if (typeof namespace !== "string" || !VAULT_NAMESPACE_PATTERN.test(namespace)) throw new VaultError("invalid");
|
|
63
|
+
if (typeof key !== "string" || key.length === 0 || key.length > 512 || CONTROL_CHARACTERS$1.test(key)) throw new VaultError("invalid");
|
|
64
|
+
}
|
|
65
|
+
function assertRevision(revision) {
|
|
66
|
+
if (typeof revision !== "number" || !Number.isSafeInteger(revision) || revision < 1) throw new VaultError("invalid");
|
|
67
|
+
}
|
|
68
|
+
function isPlainObject(value) {
|
|
69
|
+
const prototype = Object.getPrototypeOf(value);
|
|
70
|
+
return prototype === Object.prototype || prototype === null;
|
|
71
|
+
}
|
|
72
|
+
function assertJsonValue(value, seen) {
|
|
73
|
+
if (value === null || typeof value === "string" || typeof value === "boolean") return;
|
|
74
|
+
if (typeof value === "number") {
|
|
75
|
+
if (!Number.isFinite(value)) throw new VaultError("invalid");
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
if (typeof value !== "object" || seen.has(value)) throw new VaultError("invalid");
|
|
79
|
+
seen.add(value);
|
|
80
|
+
if (Array.isArray(value)) for (const item of value) assertJsonValue(item, seen);
|
|
81
|
+
else {
|
|
82
|
+
if (!isPlainObject(value)) throw new VaultError("invalid");
|
|
83
|
+
for (const item of Object.values(value)) assertJsonValue(item, seen);
|
|
84
|
+
}
|
|
85
|
+
seen.delete(value);
|
|
86
|
+
}
|
|
87
|
+
/** The stored plaintext of a value: JSON, at most 64 KiB of UTF-8. */
|
|
88
|
+
function serializeValue(value) {
|
|
89
|
+
assertJsonValue(value, /* @__PURE__ */ new Set());
|
|
90
|
+
const text = JSON.stringify(value);
|
|
91
|
+
if (new TextEncoder().encode(text).length > 65536) throw new VaultError("invalid");
|
|
92
|
+
return text;
|
|
93
|
+
}
|
|
94
|
+
//#endregion
|
|
95
|
+
//#region ../../foundations/po-vault/src/services/vaultSettings/index.ts
|
|
96
|
+
/** A JSON body larger than any valid value plus its names is refused before parsing. */
|
|
97
|
+
const MAX_BODY_BYTES = 262144;
|
|
98
|
+
const MOVE_PATH = `${VAULT_SETTINGS_PATH}/move`;
|
|
99
|
+
const CONTROL_CHARACTERS = /[\u0000-\u001f\u007f]/u;
|
|
100
|
+
const MESSAGES = {
|
|
101
|
+
unavailable: "Po could not open the vault. Try again in a moment.",
|
|
102
|
+
noAccount: "Sign in to your Po account to share secrets.",
|
|
103
|
+
noDevice: "This host keeps secrets in your account only.",
|
|
104
|
+
namespace: "Use lowercase letters, numbers, dots and dashes, starting with a letter.",
|
|
105
|
+
key: "Use 1 to 512 characters, with no line breaks.",
|
|
106
|
+
empty: "Enter a value to save.",
|
|
107
|
+
json: "That JSON does not parse. Fix it, or remove the opening bracket to save it as text.",
|
|
108
|
+
tooLarge: "Values can be up to 64 KiB.",
|
|
109
|
+
exists: "A secret with this name already exists. Replace it from its menu instead.",
|
|
110
|
+
existsThere: "A secret with this name is already on the other side. Remove one of them first.",
|
|
111
|
+
changed: "This secret changed since you opened it. Close and try again to use the newest version.",
|
|
112
|
+
body: "Po could not read that request."
|
|
113
|
+
};
|
|
114
|
+
function refuse(status, failure) {
|
|
115
|
+
return Response.json(failure, { status });
|
|
116
|
+
}
|
|
117
|
+
function nameFailure(namespace, key) {
|
|
118
|
+
if (typeof namespace !== "string" || !VAULT_NAMESPACE_PATTERN.test(namespace)) return {
|
|
119
|
+
error: MESSAGES.namespace,
|
|
120
|
+
field: "namespace"
|
|
121
|
+
};
|
|
122
|
+
if (typeof key !== "string" || key.length < 1 || key.length > 512 || CONTROL_CHARACTERS.test(key)) return {
|
|
123
|
+
error: MESSAGES.key,
|
|
124
|
+
field: "key"
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
const isRevision = (value) => typeof value === "number" && Number.isSafeInteger(value) && value >= 1;
|
|
128
|
+
/** Text stays text; only a value that opens like JSON structure is parsed, so `123` is saved as typed. */
|
|
129
|
+
function valueOf(text) {
|
|
130
|
+
const trimmed = text.trim();
|
|
131
|
+
if (!trimmed) return { failure: {
|
|
132
|
+
error: MESSAGES.empty,
|
|
133
|
+
field: "value"
|
|
134
|
+
} };
|
|
135
|
+
if (!trimmed.startsWith("{") && !trimmed.startsWith("[")) return { value: text };
|
|
136
|
+
try {
|
|
137
|
+
return { value: JSON.parse(trimmed) };
|
|
138
|
+
} catch {
|
|
139
|
+
return { failure: {
|
|
140
|
+
error: MESSAGES.json,
|
|
141
|
+
field: "value"
|
|
142
|
+
} };
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
async function bodyOf(request) {
|
|
146
|
+
const text = await request.text();
|
|
147
|
+
if (text.length > MAX_BODY_BYTES) return void 0;
|
|
148
|
+
try {
|
|
149
|
+
const body = JSON.parse(text);
|
|
150
|
+
return typeof body === "object" && body !== null && !Array.isArray(body) ? body : void 0;
|
|
151
|
+
} catch {
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
function vaultFailure(error, conflict) {
|
|
156
|
+
if (error instanceof VaultError && error.code === "conflict") return refuse(409, conflict);
|
|
157
|
+
if (error instanceof VaultError && error.code === "invalid") return refuse(400, {
|
|
158
|
+
error: MESSAGES.tooLarge,
|
|
159
|
+
field: "value"
|
|
160
|
+
});
|
|
161
|
+
return refuse(503, { error: MESSAGES.unavailable });
|
|
162
|
+
}
|
|
163
|
+
/** The account, when one is bound and signed in. */
|
|
164
|
+
const connectedAccount = (sources) => sources.account?.status().backend === "account" ? sources.account : void 0;
|
|
165
|
+
/** The side a request names, or the refusal when this host has no such side. */
|
|
166
|
+
function side(sources, shared) {
|
|
167
|
+
if (typeof shared !== "boolean") return refuse(400, {
|
|
168
|
+
error: MESSAGES.body,
|
|
169
|
+
field: "form"
|
|
170
|
+
});
|
|
171
|
+
return (shared ? connectedAccount(sources) : sources.device) ?? refuse(409, {
|
|
172
|
+
error: shared ? MESSAGES.noAccount : MESSAGES.noDevice,
|
|
173
|
+
field: "form"
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
async function snapshot(sources) {
|
|
177
|
+
try {
|
|
178
|
+
const shared = connectedAccount(sources);
|
|
179
|
+
const [device, account] = await Promise.all([sources.device?.list() ?? [], shared?.list() ?? []]);
|
|
180
|
+
const entries = [...device.map((entry) => ({
|
|
181
|
+
...entry,
|
|
182
|
+
shared: false
|
|
183
|
+
})), ...account.map((entry) => ({
|
|
184
|
+
...entry,
|
|
185
|
+
shared: true
|
|
186
|
+
}))];
|
|
187
|
+
const body = {
|
|
188
|
+
protection: sources.device ? sources.device.status().backend ?? "closed" : "account",
|
|
189
|
+
account: shared !== void 0,
|
|
190
|
+
entries
|
|
191
|
+
};
|
|
192
|
+
return Response.json(body);
|
|
193
|
+
} catch {
|
|
194
|
+
return refuse(503, { error: MESSAGES.unavailable });
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
async function put(sources, request) {
|
|
198
|
+
const body = await bodyOf(request);
|
|
199
|
+
if (!body || typeof body.text !== "string") return refuse(400, {
|
|
200
|
+
error: MESSAGES.body,
|
|
201
|
+
field: "form"
|
|
202
|
+
});
|
|
203
|
+
const badName = nameFailure(body.namespace, body.key);
|
|
204
|
+
if (badName) return refuse(400, badName);
|
|
205
|
+
const expectRevision = body.expectRevision;
|
|
206
|
+
if (expectRevision !== null && !isRevision(expectRevision)) return refuse(400, {
|
|
207
|
+
error: MESSAGES.body,
|
|
208
|
+
field: "form"
|
|
209
|
+
});
|
|
210
|
+
const vault = side(sources, body.shared);
|
|
211
|
+
if (vault instanceof Response) return vault;
|
|
212
|
+
const parsed = valueOf(body.text);
|
|
213
|
+
if ("failure" in parsed) return refuse(400, parsed.failure);
|
|
214
|
+
try {
|
|
215
|
+
const saved = await vault.put(body.namespace, body.key, parsed.value, { expectRevision });
|
|
216
|
+
return Response.json({
|
|
217
|
+
revision: saved.revision,
|
|
218
|
+
updatedAt: saved.updatedAt
|
|
219
|
+
});
|
|
220
|
+
} catch (error) {
|
|
221
|
+
return vaultFailure(error, expectRevision === null ? {
|
|
222
|
+
error: MESSAGES.exists,
|
|
223
|
+
field: "key"
|
|
224
|
+
} : {
|
|
225
|
+
error: MESSAGES.changed,
|
|
226
|
+
field: "form"
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
async function remove(sources, url) {
|
|
231
|
+
const namespace = url.searchParams.get("namespace");
|
|
232
|
+
const key = url.searchParams.get("key");
|
|
233
|
+
const revision = Number(url.searchParams.get("revision"));
|
|
234
|
+
const shared = url.searchParams.get("shared");
|
|
235
|
+
if (nameFailure(namespace, key) || !isRevision(revision) || shared !== "true" && shared !== "false") return refuse(400, {
|
|
236
|
+
error: MESSAGES.body,
|
|
237
|
+
field: "form"
|
|
238
|
+
});
|
|
239
|
+
const vault = side(sources, shared === "true");
|
|
240
|
+
if (vault instanceof Response) return vault;
|
|
241
|
+
try {
|
|
242
|
+
await vault.delete(namespace, key, { expectRevision: revision });
|
|
243
|
+
return Response.json({ ok: true });
|
|
244
|
+
} catch (error) {
|
|
245
|
+
return vaultFailure(error, {
|
|
246
|
+
error: MESSAGES.changed,
|
|
247
|
+
field: "form"
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Copies the entry to the other side create-only, then removes it here at the revision the page
|
|
253
|
+
* saw. A removal that loses the race takes the copy back out, so a move never leaves two values.
|
|
254
|
+
*/
|
|
255
|
+
async function move(sources, request) {
|
|
256
|
+
const body = await bodyOf(request);
|
|
257
|
+
if (!body || nameFailure(body.namespace, body.key) || !isRevision(body.revision)) return refuse(400, {
|
|
258
|
+
error: MESSAGES.body,
|
|
259
|
+
field: "form"
|
|
260
|
+
});
|
|
261
|
+
const target = side(sources, body.shared);
|
|
262
|
+
if (target instanceof Response) return target;
|
|
263
|
+
const origin = side(sources, !body.shared);
|
|
264
|
+
if (origin instanceof Response) return origin;
|
|
265
|
+
const namespace = body.namespace;
|
|
266
|
+
const key = body.key;
|
|
267
|
+
try {
|
|
268
|
+
const record = await origin.get(namespace, key);
|
|
269
|
+
if (record?.revision !== body.revision) return refuse(409, {
|
|
270
|
+
error: MESSAGES.changed,
|
|
271
|
+
field: "form"
|
|
272
|
+
});
|
|
273
|
+
let copied;
|
|
274
|
+
try {
|
|
275
|
+
copied = await target.put(namespace, key, record.value, { expectRevision: null });
|
|
276
|
+
} catch (error) {
|
|
277
|
+
return vaultFailure(error, {
|
|
278
|
+
error: MESSAGES.existsThere,
|
|
279
|
+
field: "form"
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
try {
|
|
283
|
+
await origin.delete(namespace, key, { expectRevision: body.revision });
|
|
284
|
+
} catch (error) {
|
|
285
|
+
await target.delete(namespace, key, { expectRevision: copied.revision }).catch(() => void 0);
|
|
286
|
+
return vaultFailure(error, {
|
|
287
|
+
error: MESSAGES.changed,
|
|
288
|
+
field: "form"
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
return Response.json({
|
|
292
|
+
revision: copied.revision,
|
|
293
|
+
updatedAt: copied.updatedAt
|
|
294
|
+
});
|
|
295
|
+
} catch (error) {
|
|
296
|
+
return vaultFailure(error, {
|
|
297
|
+
error: MESSAGES.changed,
|
|
298
|
+
field: "form"
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* The Vault settings page's routes, relative to the mount: `GET /entries` lists names, where each
|
|
304
|
+
* lives and how the device key is kept; `PUT /entries` adds or replaces one value on the named side;
|
|
305
|
+
* `DELETE /entries?namespace&key&revision&shared` removes one; `POST /entries/move` moves one to
|
|
306
|
+
* the other side. No route ever answers with a value. Other paths answer undefined.
|
|
307
|
+
*/
|
|
308
|
+
async function serveVaultSettings(sources, request) {
|
|
309
|
+
const url = new URL(request.url);
|
|
310
|
+
if (url.pathname === MOVE_PATH) {
|
|
311
|
+
if (request.method !== "POST") return new Response(null, {
|
|
312
|
+
status: 405,
|
|
313
|
+
headers: { allow: "POST" }
|
|
314
|
+
});
|
|
315
|
+
return move(sources, request);
|
|
316
|
+
}
|
|
317
|
+
if (url.pathname !== "/entries") return void 0;
|
|
318
|
+
if (!sources.device && !sources.account) return refuse(503, { error: MESSAGES.unavailable });
|
|
319
|
+
if (request.method === "GET") return snapshot(sources);
|
|
320
|
+
if (request.method === "PUT") return put(sources, request);
|
|
321
|
+
if (request.method === "DELETE") return remove(sources, url);
|
|
322
|
+
return new Response(null, {
|
|
323
|
+
status: 405,
|
|
324
|
+
headers: { allow: "GET, PUT, DELETE" }
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
//#endregion
|
|
328
|
+
export { VAULT_LEASE_RENEW_MS as _, assertRevision as a, VAULT_META_CHECK as b, PO_VAULT_ACCOUNT_SERVICE as c, VAULT_CHECK_PLAINTEXT as d, VAULT_DB_PREFIX as f, VAULT_KEY_LOST_NOTICE as g, VAULT_KEYRING_ACCOUNT_PREFIX as h, assertEntryName as i, VAULT_ACCOUNT_OPERATIONS as l, VAULT_INIT_LEASE as m, VaultError as n, serializeValue as o, VAULT_DIRECTORY as p, asVaultError as r, PO_VAULT_CONTRACT as s, serveVaultSettings as t, VAULT_CHECK_AAD as u, VAULT_LEASE_TTL_MS as v, VAULT_META_ID as x, VAULT_LEASE_WAIT_MS as y };
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import { Q as Integer, V as String, Z as Literal, bt as _Array_, dt as Unknown, et as Boolean, ht as Optional, pt as _Object_, z as Union } from "./serverPlugin-CELT6P0Q.js";
|
|
2
|
+
//#region ../../core/po-core/src/constants/voiceTools.ts
|
|
3
|
+
const PO_VOICE_TOOLS_SERVICE = "po/voice-tools";
|
|
4
|
+
const VOICE_TOOL_DEFAULT_TIMEOUT_MS = 1e4;
|
|
5
|
+
const VOICE_TOOL_MAX_TIMEOUT_MS = 3e4;
|
|
6
|
+
const VOICE_TOOL_MAX_INPUT_BYTES = 65536;
|
|
7
|
+
const VOICE_TOOL_MAX_BATCH_BYTES = 262144;
|
|
8
|
+
const VOICE_TOOL_MAX_SCHEMA_BYTES = 32768;
|
|
9
|
+
const SAFE_IDENTIFIER = /^[A-Za-z0-9@][A-Za-z0-9@/._:-]*$/u;
|
|
10
|
+
const SAFE_NAME = /^[a-z][a-z0-9_:-]*$/u;
|
|
11
|
+
const MAX_ORDER = 1e3;
|
|
12
|
+
const VOICE_TOOL_ERROR_CODE = {
|
|
13
|
+
hostUnavailable: "VOICE_TOOL_HOST_UNAVAILABLE",
|
|
14
|
+
inactive: "VOICE_TOOL_INACTIVE",
|
|
15
|
+
staleSession: "VOICE_TOOL_STALE_SESSION",
|
|
16
|
+
staleCatalog: "VOICE_TOOL_STALE_CATALOG",
|
|
17
|
+
notFound: "VOICE_TOOL_NOT_FOUND",
|
|
18
|
+
nameConflict: "VOICE_TOOL_NAME_CONFLICT",
|
|
19
|
+
invalidInput: "VOICE_TOOL_INVALID_INPUT",
|
|
20
|
+
invalidResult: "VOICE_TOOL_INVALID_RESULT",
|
|
21
|
+
executionFailed: "VOICE_TOOL_EXECUTION_FAILED",
|
|
22
|
+
timeout: "VOICE_TOOL_TIMEOUT",
|
|
23
|
+
aborted: "VOICE_TOOL_ABORTED",
|
|
24
|
+
cancelled: "VOICE_TOOL_CANCELLED",
|
|
25
|
+
registrationDisposed: "VOICE_TOOL_REGISTRATION_DISPOSED",
|
|
26
|
+
sessionShutdown: "VOICE_TOOL_SESSION_SHUTDOWN",
|
|
27
|
+
batchStopped: "VOICE_TOOL_BATCH_STOPPED",
|
|
28
|
+
reloadQueued: "VOICE_TOOL_RELOAD_QUEUED",
|
|
29
|
+
invalidRequest: "VOICE_TOOL_INVALID_REQUEST"
|
|
30
|
+
};
|
|
31
|
+
VOICE_TOOL_ERROR_CODE.hostUnavailable;
|
|
32
|
+
VOICE_TOOL_ERROR_CODE.inactive;
|
|
33
|
+
VOICE_TOOL_ERROR_CODE.staleSession;
|
|
34
|
+
VOICE_TOOL_ERROR_CODE.staleCatalog;
|
|
35
|
+
VOICE_TOOL_ERROR_CODE.notFound;
|
|
36
|
+
VOICE_TOOL_ERROR_CODE.nameConflict;
|
|
37
|
+
VOICE_TOOL_ERROR_CODE.invalidInput;
|
|
38
|
+
VOICE_TOOL_ERROR_CODE.invalidResult;
|
|
39
|
+
VOICE_TOOL_ERROR_CODE.timeout;
|
|
40
|
+
VOICE_TOOL_ERROR_CODE.aborted;
|
|
41
|
+
VOICE_TOOL_ERROR_CODE.executionFailed;
|
|
42
|
+
VOICE_TOOL_ERROR_CODE.batchStopped;
|
|
43
|
+
const PO_VOICE_AUTO_MODE_ID = "voice-auto";
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region ../../core/po-core/src/schemas/voiceTools.ts
|
|
46
|
+
const VoiceToolDescriptorSchema = _Object_({
|
|
47
|
+
source: String({
|
|
48
|
+
minLength: 1,
|
|
49
|
+
maxLength: 128,
|
|
50
|
+
pattern: SAFE_IDENTIFIER.source
|
|
51
|
+
}),
|
|
52
|
+
id: String({
|
|
53
|
+
minLength: 1,
|
|
54
|
+
maxLength: 128,
|
|
55
|
+
pattern: SAFE_IDENTIFIER.source
|
|
56
|
+
}),
|
|
57
|
+
name: String({
|
|
58
|
+
minLength: 1,
|
|
59
|
+
maxLength: 128,
|
|
60
|
+
pattern: SAFE_NAME.source
|
|
61
|
+
}),
|
|
62
|
+
label: String({
|
|
63
|
+
minLength: 1,
|
|
64
|
+
maxLength: 96
|
|
65
|
+
}),
|
|
66
|
+
description: String({
|
|
67
|
+
minLength: 1,
|
|
68
|
+
maxLength: 240
|
|
69
|
+
}),
|
|
70
|
+
order: Integer({
|
|
71
|
+
minimum: 0,
|
|
72
|
+
maximum: MAX_ORDER
|
|
73
|
+
}),
|
|
74
|
+
inputSchema: Unknown(),
|
|
75
|
+
resultSchema: Unknown(),
|
|
76
|
+
timeoutMs: Optional(Integer({
|
|
77
|
+
minimum: 1,
|
|
78
|
+
maximum: VOICE_TOOL_MAX_TIMEOUT_MS
|
|
79
|
+
}))
|
|
80
|
+
}, { additionalProperties: false });
|
|
81
|
+
const VoiceToolBatchCallSchema = _Object_({
|
|
82
|
+
name: String({
|
|
83
|
+
minLength: 1,
|
|
84
|
+
maxLength: 128,
|
|
85
|
+
pattern: SAFE_NAME.source,
|
|
86
|
+
description: "Capability name exactly as describe_voice_tools reported it."
|
|
87
|
+
}),
|
|
88
|
+
input: Unknown({ description: "Arguments for this capability, shaped by the input_schema that describe_voice_tools returns when called with names. Pass an empty object for a capability that takes none." })
|
|
89
|
+
}, { additionalProperties: false });
|
|
90
|
+
const VoiceToolDescribeInputSchema = _Object_({ names: Optional(_Array_(String({
|
|
91
|
+
minLength: 1,
|
|
92
|
+
maxLength: 128,
|
|
93
|
+
pattern: SAFE_NAME.source
|
|
94
|
+
}), {
|
|
95
|
+
maxItems: 16,
|
|
96
|
+
description: "Capabilities to describe in full, including their input schemas. Omit to list every registered capability by name and description only."
|
|
97
|
+
})) }, { additionalProperties: false });
|
|
98
|
+
const VoiceToolCatalogTokenSchema = String({
|
|
99
|
+
minLength: 1,
|
|
100
|
+
maxLength: 512,
|
|
101
|
+
description: "Opaque catalog token from the most recent describe_voice_tools result, copied verbatim. It is invalidated whenever a capability registers or deregisters and whenever autonomous voice is activated or deactivated."
|
|
102
|
+
});
|
|
103
|
+
const VoiceToolUseInputSchema = _Object_({
|
|
104
|
+
catalogToken: VoiceToolCatalogTokenSchema,
|
|
105
|
+
calls: _Array_(VoiceToolBatchCallSchema, {
|
|
106
|
+
minItems: 1,
|
|
107
|
+
maxItems: 16,
|
|
108
|
+
description: "Capability calls to run in this order. All of them are validated before any of them run, so a single invalid call rejects the whole batch."
|
|
109
|
+
})
|
|
110
|
+
}, { additionalProperties: false });
|
|
111
|
+
const VoiceToolErrorCodeSchema = Union([
|
|
112
|
+
Literal("VOICE_TOOL_HOST_UNAVAILABLE"),
|
|
113
|
+
Literal("VOICE_TOOL_INACTIVE"),
|
|
114
|
+
Literal("VOICE_TOOL_STALE_SESSION"),
|
|
115
|
+
Literal("VOICE_TOOL_STALE_CATALOG"),
|
|
116
|
+
Literal("VOICE_TOOL_NOT_FOUND"),
|
|
117
|
+
Literal("VOICE_TOOL_NAME_CONFLICT"),
|
|
118
|
+
Literal("VOICE_TOOL_INVALID_INPUT"),
|
|
119
|
+
Literal("VOICE_TOOL_INVALID_RESULT"),
|
|
120
|
+
Literal("VOICE_TOOL_EXECUTION_FAILED"),
|
|
121
|
+
Literal("VOICE_TOOL_TIMEOUT"),
|
|
122
|
+
Literal("VOICE_TOOL_ABORTED"),
|
|
123
|
+
Literal("VOICE_TOOL_CANCELLED"),
|
|
124
|
+
Literal("VOICE_TOOL_REGISTRATION_DISPOSED"),
|
|
125
|
+
Literal("VOICE_TOOL_SESSION_SHUTDOWN"),
|
|
126
|
+
Literal("VOICE_TOOL_BATCH_STOPPED"),
|
|
127
|
+
Literal("VOICE_TOOL_RELOAD_QUEUED"),
|
|
128
|
+
Literal("VOICE_TOOL_INVALID_REQUEST")
|
|
129
|
+
]);
|
|
130
|
+
const VoiceToolErrorSchema = _Object_({
|
|
131
|
+
code: VoiceToolErrorCodeSchema,
|
|
132
|
+
message: String({
|
|
133
|
+
minLength: 1,
|
|
134
|
+
maxLength: 240
|
|
135
|
+
}),
|
|
136
|
+
retryable: Optional(Boolean())
|
|
137
|
+
}, { additionalProperties: false });
|
|
138
|
+
const VoiceToolConflictDiagnosticSchema = _Object_({
|
|
139
|
+
name: String({
|
|
140
|
+
minLength: 1,
|
|
141
|
+
maxLength: 128
|
|
142
|
+
}),
|
|
143
|
+
message: String({
|
|
144
|
+
minLength: 1,
|
|
145
|
+
maxLength: 240
|
|
146
|
+
}),
|
|
147
|
+
claims: _Array_(_Object_({
|
|
148
|
+
source: String({
|
|
149
|
+
minLength: 1,
|
|
150
|
+
maxLength: 128
|
|
151
|
+
}),
|
|
152
|
+
id: String({
|
|
153
|
+
minLength: 1,
|
|
154
|
+
maxLength: 128
|
|
155
|
+
})
|
|
156
|
+
}, { additionalProperties: false }), {
|
|
157
|
+
minItems: 2,
|
|
158
|
+
maxItems: 16
|
|
159
|
+
})
|
|
160
|
+
}, { additionalProperties: false });
|
|
161
|
+
const VoiceToolCatalogEntrySchema = _Object_({
|
|
162
|
+
source: String({
|
|
163
|
+
minLength: 1,
|
|
164
|
+
maxLength: 128
|
|
165
|
+
}),
|
|
166
|
+
id: String({
|
|
167
|
+
minLength: 1,
|
|
168
|
+
maxLength: 128
|
|
169
|
+
}),
|
|
170
|
+
name: String({
|
|
171
|
+
minLength: 1,
|
|
172
|
+
maxLength: 128
|
|
173
|
+
}),
|
|
174
|
+
label: String({
|
|
175
|
+
minLength: 1,
|
|
176
|
+
maxLength: 96
|
|
177
|
+
}),
|
|
178
|
+
description: String({
|
|
179
|
+
minLength: 1,
|
|
180
|
+
maxLength: 240
|
|
181
|
+
}),
|
|
182
|
+
order: Integer({
|
|
183
|
+
minimum: 0,
|
|
184
|
+
maximum: MAX_ORDER
|
|
185
|
+
}),
|
|
186
|
+
inputSchema: Unknown(),
|
|
187
|
+
enabled: Boolean()
|
|
188
|
+
}, { additionalProperties: false });
|
|
189
|
+
_Object_({
|
|
190
|
+
hostGeneration: String({
|
|
191
|
+
minLength: 1,
|
|
192
|
+
maxLength: 256
|
|
193
|
+
}),
|
|
194
|
+
catalogRevision: Integer({ minimum: 0 }),
|
|
195
|
+
catalogToken: VoiceToolCatalogTokenSchema,
|
|
196
|
+
tools: _Array_(VoiceToolCatalogEntrySchema, { maxItems: 128 }),
|
|
197
|
+
conflicts: _Array_(VoiceToolConflictDiagnosticSchema, { maxItems: 128 }),
|
|
198
|
+
unknownNames: _Array_(String({
|
|
199
|
+
minLength: 1,
|
|
200
|
+
maxLength: 128
|
|
201
|
+
}), { maxItems: 16 })
|
|
202
|
+
}, { additionalProperties: false });
|
|
203
|
+
const VoiceToolBatchItemResultSchema = _Object_({
|
|
204
|
+
index: Integer({
|
|
205
|
+
minimum: 0,
|
|
206
|
+
maximum: 16
|
|
207
|
+
}),
|
|
208
|
+
name: String({
|
|
209
|
+
minLength: 1,
|
|
210
|
+
maxLength: 128
|
|
211
|
+
}),
|
|
212
|
+
status: Union([
|
|
213
|
+
Literal("completed"),
|
|
214
|
+
Literal("failed"),
|
|
215
|
+
Literal("cancelled"),
|
|
216
|
+
Literal("not_executed"),
|
|
217
|
+
Literal("preflight_failed")
|
|
218
|
+
]),
|
|
219
|
+
result: Optional(Unknown()),
|
|
220
|
+
error: Optional(VoiceToolErrorSchema)
|
|
221
|
+
}, { additionalProperties: false });
|
|
222
|
+
_Object_({
|
|
223
|
+
status: Union([
|
|
224
|
+
Literal("completed"),
|
|
225
|
+
Literal("rejected"),
|
|
226
|
+
Literal("cancelled"),
|
|
227
|
+
Literal("stopped")
|
|
228
|
+
]),
|
|
229
|
+
catalogToken: VoiceToolCatalogTokenSchema,
|
|
230
|
+
results: _Array_(VoiceToolBatchItemResultSchema, { maxItems: 16 }),
|
|
231
|
+
errors: Optional(_Array_(VoiceToolErrorSchema, { maxItems: 16 }))
|
|
232
|
+
}, { additionalProperties: false });
|
|
233
|
+
//#endregion
|
|
234
|
+
//#region ../../core/po-core/src/services/voiceToolsContract/index.ts
|
|
235
|
+
var VoiceToolError = class extends Error {
|
|
236
|
+
code;
|
|
237
|
+
retryable;
|
|
238
|
+
constructor(code, message, retryable = false) {
|
|
239
|
+
super(message);
|
|
240
|
+
this.name = "VoiceToolError";
|
|
241
|
+
this.code = code;
|
|
242
|
+
this.retryable = retryable;
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
//#endregion
|
|
246
|
+
export { PO_VOICE_AUTO_MODE_ID as a, SAFE_NAME as c, VOICE_TOOL_MAX_BATCH_BYTES as d, VOICE_TOOL_MAX_INPUT_BYTES as f, VoiceToolUseInputSchema as i, VOICE_TOOL_DEFAULT_TIMEOUT_MS as l, VOICE_TOOL_MAX_TIMEOUT_MS as m, VoiceToolDescribeInputSchema as n, PO_VOICE_TOOLS_SERVICE as o, VOICE_TOOL_MAX_SCHEMA_BYTES as p, VoiceToolDescriptorSchema as r, SAFE_IDENTIFIER as s, VoiceToolError as t, VOICE_TOOL_ERROR_CODE as u };
|