@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
|
@@ -0,0 +1,1603 @@
|
|
|
1
|
+
import { B as Null, F as Record, G as Unsafe, H as Integer, I as Tuple, J as Optional$3, K as Unknown, L as Union, N as Partial, P as Omit, R as String, U as Boolean, V as Literal, W as Intersect, Y as _Array_, q as _Object_, s as definePoContract, z as Number$1 } from "./serverPlugin-Cx6a5RT0.js";
|
|
2
|
+
import { n as PoPluginWireCallSchema, t as PO_WIRE_HOST_SCOPE } from "./pluginProtocol-ZOY2-HIL.js";
|
|
3
|
+
//#region ../../core/po-core/src/schemas/protocolChannelsContract.ts
|
|
4
|
+
const Json$4 = Unsafe({});
|
|
5
|
+
const ChannelFrameSchema = _Object_({
|
|
6
|
+
type: String({ minLength: 1 }),
|
|
7
|
+
payload: Json$4
|
|
8
|
+
});
|
|
9
|
+
/** Latest payload per extension channel frame type. */
|
|
10
|
+
const PoChannelsStateSchema = Record(String(), Json$4);
|
|
11
|
+
/** A session's extension channels as seen by one connection. */
|
|
12
|
+
const PoChannelsContract = definePoContract("po.channels", {
|
|
13
|
+
version: 1,
|
|
14
|
+
params: { sessionId: String({ minLength: 1 }) },
|
|
15
|
+
state: { latest: PoChannelsStateSchema },
|
|
16
|
+
methods: { receive: { args: ChannelFrameSchema } }
|
|
17
|
+
});
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region ../../core/po-core/src/constants/contextApi.ts
|
|
20
|
+
/**
|
|
21
|
+
* What one entry in the composition actually is, for a reader who clicked it.
|
|
22
|
+
*
|
|
23
|
+
* The projection prices the composition and stops there: names, owners, and
|
|
24
|
+
* integer counts, small enough to republish whenever the composition changes.
|
|
25
|
+
* The prose and the schema behind a figure are an order of magnitude larger and
|
|
26
|
+
* are wanted one row at a time, so they travel on request instead. This module
|
|
27
|
+
* is the contract both ends of that request share, and it is deliberately free
|
|
28
|
+
* of Node imports so a browser can hold it too.
|
|
29
|
+
*/
|
|
30
|
+
/** Where a host mounts this package's API; the segment after /api/plugins/. */
|
|
31
|
+
const API_BASE_PATH = "context";
|
|
32
|
+
const ITEM_ROUTE = "/item";
|
|
33
|
+
const CURRENT_ROUTE = "/current";
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region ../../core/po-core/src/schemas/httpApiContracts.ts
|
|
36
|
+
const Text$3 = String();
|
|
37
|
+
const Optional$2 = Optional$3;
|
|
38
|
+
const Strings$1 = _Array_(Text$3);
|
|
39
|
+
const Flag$2 = Boolean();
|
|
40
|
+
const NumberValue$2 = Number$1();
|
|
41
|
+
const ApiErrorSchema = _Object_({
|
|
42
|
+
error: Text$3,
|
|
43
|
+
hash: Optional$2(Text$3)
|
|
44
|
+
});
|
|
45
|
+
const ApiOkSchema = _Object_({ ok: Literal(true) });
|
|
46
|
+
const Json$3 = Unknown({ description: "Value whose schema is supplied by the selected runtime contribution." });
|
|
47
|
+
/** Common JSON response construction; status and payload remain explicit at the declaration. */
|
|
48
|
+
function jsonApiResponses(schema, status = 200) {
|
|
49
|
+
return {
|
|
50
|
+
[status]: {
|
|
51
|
+
description: "Successful response",
|
|
52
|
+
contentType: "application/json",
|
|
53
|
+
schema
|
|
54
|
+
},
|
|
55
|
+
"400": {
|
|
56
|
+
description: "Invalid request",
|
|
57
|
+
schema: ApiErrorSchema
|
|
58
|
+
},
|
|
59
|
+
"401": {
|
|
60
|
+
description: "Authentication required",
|
|
61
|
+
schema: ApiErrorSchema
|
|
62
|
+
},
|
|
63
|
+
"403": {
|
|
64
|
+
description: "Request is not authorized",
|
|
65
|
+
schema: ApiErrorSchema
|
|
66
|
+
},
|
|
67
|
+
"404": {
|
|
68
|
+
description: "Resource or capability unavailable",
|
|
69
|
+
schema: ApiErrorSchema
|
|
70
|
+
},
|
|
71
|
+
"409": {
|
|
72
|
+
description: "Conflicting state",
|
|
73
|
+
schema: ApiErrorSchema
|
|
74
|
+
},
|
|
75
|
+
"422": {
|
|
76
|
+
description: "Invalid operation",
|
|
77
|
+
schema: ApiErrorSchema
|
|
78
|
+
},
|
|
79
|
+
"500": {
|
|
80
|
+
description: "Host operation failed",
|
|
81
|
+
schema: ApiErrorSchema
|
|
82
|
+
},
|
|
83
|
+
"502": {
|
|
84
|
+
description: "Provider failed",
|
|
85
|
+
schema: ApiErrorSchema
|
|
86
|
+
},
|
|
87
|
+
"503": {
|
|
88
|
+
description: "Service unavailable",
|
|
89
|
+
schema: ApiErrorSchema
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
const WebCompositionSchema = _Object_({
|
|
94
|
+
id: Text$3,
|
|
95
|
+
scope: Union([
|
|
96
|
+
Literal(PO_WIRE_HOST_SCOPE),
|
|
97
|
+
Literal("workspace"),
|
|
98
|
+
Literal("session")
|
|
99
|
+
]),
|
|
100
|
+
revision: NumberValue$2,
|
|
101
|
+
manifestUrl: Text$3,
|
|
102
|
+
rawAssetBaseUrl: Text$3,
|
|
103
|
+
verifiedAssetBaseUrl: Text$3,
|
|
104
|
+
pluginEntries: _Array_(Tuple([Text$3, Text$3])),
|
|
105
|
+
assetPaths: Strings$1,
|
|
106
|
+
stylePaths: Strings$1,
|
|
107
|
+
channels: Strings$1
|
|
108
|
+
});
|
|
109
|
+
const NativeCompositionSchema = _Object_({
|
|
110
|
+
id: Text$3,
|
|
111
|
+
scope: Union([
|
|
112
|
+
Literal(PO_WIRE_HOST_SCOPE),
|
|
113
|
+
Literal("workspace"),
|
|
114
|
+
Literal("session")
|
|
115
|
+
]),
|
|
116
|
+
revision: NumberValue$2,
|
|
117
|
+
manifestUrl: Text$3,
|
|
118
|
+
rawAssetBaseUrl: Text$3,
|
|
119
|
+
pluginEntries: _Array_(Tuple([Text$3, Text$3])),
|
|
120
|
+
uiEntry: Optional$2(Text$3),
|
|
121
|
+
channels: Strings$1,
|
|
122
|
+
plugins: Strings$1
|
|
123
|
+
});
|
|
124
|
+
/** A configured template id and the mount whose compositions offer it. */
|
|
125
|
+
const TemplateDecisionSchema = _Object_({
|
|
126
|
+
id: Optional$2(Text$3),
|
|
127
|
+
mount: Union([_Object_({ scope: Literal(PO_WIRE_HOST_SCOPE) }), _Object_({
|
|
128
|
+
scope: Literal("workspace"),
|
|
129
|
+
workspaceId: Text$3
|
|
130
|
+
})])
|
|
131
|
+
});
|
|
132
|
+
const SessionSummarySchema = _Object_({
|
|
133
|
+
id: Text$3,
|
|
134
|
+
workspaceId: Optional$2(Text$3),
|
|
135
|
+
webComposition: Optional$2(WebCompositionSchema),
|
|
136
|
+
nativeComposition: Optional$2(NativeCompositionSchema),
|
|
137
|
+
name: Text$3,
|
|
138
|
+
cwd: Text$3,
|
|
139
|
+
createdAt: Text$3,
|
|
140
|
+
updatedAt: Text$3,
|
|
141
|
+
phase: Union([
|
|
142
|
+
Literal("idle"),
|
|
143
|
+
Literal("turn"),
|
|
144
|
+
Literal("compaction"),
|
|
145
|
+
Literal("retry")
|
|
146
|
+
]),
|
|
147
|
+
phaseSince: Text$3,
|
|
148
|
+
attach: Literal("attached"),
|
|
149
|
+
pendingMessageCount: NumberValue$2,
|
|
150
|
+
everPrompted: Flag$2,
|
|
151
|
+
awaitingInput: Flag$2,
|
|
152
|
+
lastSettledAt: Optional$2(Text$3),
|
|
153
|
+
git: Optional$2(_Object_({
|
|
154
|
+
branch: Text$3,
|
|
155
|
+
dirty: Flag$2
|
|
156
|
+
})),
|
|
157
|
+
profile: Optional$2(_Object_({
|
|
158
|
+
name: Text$3,
|
|
159
|
+
displayName: Optional$2(Text$3),
|
|
160
|
+
iconVersion: Optional$2(Text$3)
|
|
161
|
+
})),
|
|
162
|
+
parentSessionId: Optional$2(Text$3),
|
|
163
|
+
sessionProvenance: Optional$2(Text$3),
|
|
164
|
+
interaction: Optional$2(Union([Literal("interactive"), Literal("unattended")])),
|
|
165
|
+
/** The line the session's extension published about background work it runs. */
|
|
166
|
+
activity: Optional$2(_Object_({
|
|
167
|
+
label: Text$3,
|
|
168
|
+
attention: Optional$2(Flag$2),
|
|
169
|
+
since: Optional$2(Text$3)
|
|
170
|
+
})),
|
|
171
|
+
/** Tool calls waiting for the person's approval. */
|
|
172
|
+
pendingApprovalCount: Optional$2(Integer({ minimum: 1 })),
|
|
173
|
+
pendingSetups: Optional$2(_Array_(_Object_({
|
|
174
|
+
id: Text$3,
|
|
175
|
+
name: Text$3,
|
|
176
|
+
createdAt: Text$3,
|
|
177
|
+
cwd: Optional$2(Text$3),
|
|
178
|
+
setupKind: Optional$2(Union([Literal("managed-worktree"), Literal("existing-directory")])),
|
|
179
|
+
status: Optional$2(Union([
|
|
180
|
+
Literal("provisioning"),
|
|
181
|
+
Literal("failed"),
|
|
182
|
+
Literal("interrupted")
|
|
183
|
+
])),
|
|
184
|
+
errorCode: Optional$2(Union([Literal("SESSION_WORKTREE_PROVISION_FAILED"), Literal("SESSION_UNAVAILABLE")]))
|
|
185
|
+
}))),
|
|
186
|
+
groups: Optional$2(Strings$1),
|
|
187
|
+
backgroundWorkActive: Optional$2(Flag$2),
|
|
188
|
+
/** Present and true for a recorded session the server has not reopened yet. */
|
|
189
|
+
dormant: Optional$2(Flag$2)
|
|
190
|
+
});
|
|
191
|
+
const WorkspaceSchema = _Object_({
|
|
192
|
+
kind: Optional$2(Literal("session")),
|
|
193
|
+
instructions: Optional$2(Text$3),
|
|
194
|
+
id: Text$3,
|
|
195
|
+
root: Text$3,
|
|
196
|
+
name: Optional$2(Text$3),
|
|
197
|
+
available: Optional$2(Flag$2),
|
|
198
|
+
sandbox: Optional$2(Text$3),
|
|
199
|
+
/**
|
|
200
|
+
* The sandbox's state, live: `starting` while it starts or sessions move in, `running` once the host is linked,
|
|
201
|
+
* `stopping` while it is switched off, `failed` when a start or a switch failed, `unavailable` when its provider
|
|
202
|
+
* cannot run it. On a workspace without `sandbox`, `unavailable` means the sandbox provider cannot run it now, so
|
|
203
|
+
* it cannot be switched on; absent means nothing stands in the way.
|
|
204
|
+
*/
|
|
205
|
+
sandboxState: Optional$2(Union([
|
|
206
|
+
Literal("starting"),
|
|
207
|
+
Literal("running"),
|
|
208
|
+
Literal("stopping"),
|
|
209
|
+
Literal("unavailable"),
|
|
210
|
+
Literal("failed")
|
|
211
|
+
])),
|
|
212
|
+
/** A plain sentence for `failed` or `unavailable`, such as 'Docker is not running.'. */
|
|
213
|
+
sandboxReason: Optional$2(Text$3)
|
|
214
|
+
});
|
|
215
|
+
const SavedSession = _Object_({
|
|
216
|
+
id: Text$3,
|
|
217
|
+
name: Optional$2(Text$3),
|
|
218
|
+
firstMessage: Text$3,
|
|
219
|
+
createdAt: Text$3,
|
|
220
|
+
updatedAt: Text$3
|
|
221
|
+
});
|
|
222
|
+
const query = (name, schema = Text$3, required = false) => ({
|
|
223
|
+
name,
|
|
224
|
+
in: "query",
|
|
225
|
+
required,
|
|
226
|
+
schema
|
|
227
|
+
});
|
|
228
|
+
const body = (schema) => ({
|
|
229
|
+
contentType: "application/json",
|
|
230
|
+
required: true,
|
|
231
|
+
schema
|
|
232
|
+
});
|
|
233
|
+
const host = (id, path, method, result, extra = {}) => ({
|
|
234
|
+
id,
|
|
235
|
+
path,
|
|
236
|
+
method,
|
|
237
|
+
scope: "host",
|
|
238
|
+
authentication: "owner",
|
|
239
|
+
description: id,
|
|
240
|
+
responses: jsonApiResponses(result),
|
|
241
|
+
...extra
|
|
242
|
+
});
|
|
243
|
+
const Principal = _Object_({
|
|
244
|
+
issuer: Text$3,
|
|
245
|
+
subject: Text$3
|
|
246
|
+
});
|
|
247
|
+
const ProviderGrant = _Object_({
|
|
248
|
+
tag: Literal("po/grant/v1"),
|
|
249
|
+
signature: Text$3,
|
|
250
|
+
payload: _Object_({
|
|
251
|
+
issuer: Text$3,
|
|
252
|
+
subject: Text$3,
|
|
253
|
+
grantId: Text$3,
|
|
254
|
+
deviceKeyId: Text$3,
|
|
255
|
+
networkId: Text$3,
|
|
256
|
+
workspaceId: Text$3,
|
|
257
|
+
callingHostId: Text$3,
|
|
258
|
+
targetHostId: Text$3,
|
|
259
|
+
operations: Strings$1,
|
|
260
|
+
constraints: Record(Text$3, Union([
|
|
261
|
+
Text$3,
|
|
262
|
+
NumberValue$2,
|
|
263
|
+
Flag$2,
|
|
264
|
+
Null()
|
|
265
|
+
])),
|
|
266
|
+
issuedAt: NumberValue$2,
|
|
267
|
+
notBefore: NumberValue$2,
|
|
268
|
+
expiresAt: NumberValue$2,
|
|
269
|
+
redelegable: Literal(false),
|
|
270
|
+
revocationEpoch: Optional$2(NumberValue$2)
|
|
271
|
+
})
|
|
272
|
+
});
|
|
273
|
+
const ProviderConsent = _Object_({
|
|
274
|
+
workspaceId: Text$3,
|
|
275
|
+
providerHostId: Text$3,
|
|
276
|
+
packageName: Text$3,
|
|
277
|
+
owner: Principal,
|
|
278
|
+
grants: _Array_(ProviderGrant, {
|
|
279
|
+
minItems: 2,
|
|
280
|
+
maxItems: 2
|
|
281
|
+
}),
|
|
282
|
+
createdAt: NumberValue$2,
|
|
283
|
+
expiresAt: NumberValue$2
|
|
284
|
+
});
|
|
285
|
+
const ConsentCandidate = _Object_({
|
|
286
|
+
hostId: Text$3,
|
|
287
|
+
packageName: Text$3,
|
|
288
|
+
version: Text$3,
|
|
289
|
+
operations: Strings$1,
|
|
290
|
+
manifestExpiresAt: NumberValue$2
|
|
291
|
+
});
|
|
292
|
+
const ConsentWorkspaceParameter = {
|
|
293
|
+
name: "workspaceId",
|
|
294
|
+
in: "path",
|
|
295
|
+
required: true,
|
|
296
|
+
schema: Text$3
|
|
297
|
+
};
|
|
298
|
+
const Binary = String({ contentEncoding: "binary" });
|
|
299
|
+
const headlessHttpContracts = [
|
|
300
|
+
host("health", "/api/health", "GET", _Object_({
|
|
301
|
+
ok: Literal(true),
|
|
302
|
+
role: Literal("hub"),
|
|
303
|
+
protocol: Literal(1),
|
|
304
|
+
sessions: NumberValue$2
|
|
305
|
+
}), { authentication: "none" }),
|
|
306
|
+
host("telemetry.browser", "/api/telemetry/browser", "POST", ApiOkSchema, { body: body(_Object_({
|
|
307
|
+
v: Literal(1),
|
|
308
|
+
events: _Array_(_Object_({
|
|
309
|
+
name: String({ pattern: "^web\\.browser\\.[a-z_]{1,40}$" }),
|
|
310
|
+
duration_ms: Optional$2(NumberValue$2),
|
|
311
|
+
count: Optional$2(NumberValue$2),
|
|
312
|
+
level: Optional$2(Literal("warn")),
|
|
313
|
+
attributes: Optional$2(Record(String({ pattern: "^[a-z_]{1,32}$" }), Union([String({ maxLength: 256 }), NumberValue$2]), { maxProperties: 12 }))
|
|
314
|
+
}), { maxItems: 10 })
|
|
315
|
+
})) }),
|
|
316
|
+
host("compositions", "/api/compositions", "GET", _Object_({
|
|
317
|
+
network: Optional$2(_Object_({
|
|
318
|
+
hostId: Text$3,
|
|
319
|
+
networkId: Text$3,
|
|
320
|
+
enrollmentGeneration: Optional$2(NumberValue$2)
|
|
321
|
+
})),
|
|
322
|
+
/** The computer's own name, which phones show instead of a tunnel address. */
|
|
323
|
+
displayName: Optional$2(Text$3),
|
|
324
|
+
global: Optional$2(WebCompositionSchema),
|
|
325
|
+
nativeGlobal: Optional$2(NativeCompositionSchema),
|
|
326
|
+
publicKey: Optional$2(Text$3),
|
|
327
|
+
shell: Optional$2(_Object_({
|
|
328
|
+
publicKey: Text$3,
|
|
329
|
+
revision: NumberValue$2
|
|
330
|
+
})),
|
|
331
|
+
template: Optional$2(TemplateDecisionSchema),
|
|
332
|
+
/** The phone app's `native.template` choice, resolved the same way. */
|
|
333
|
+
nativeTemplate: Optional$2(TemplateDecisionSchema),
|
|
334
|
+
workspaces: _Array_(_Object_({
|
|
335
|
+
id: Text$3,
|
|
336
|
+
root: Text$3,
|
|
337
|
+
/** `null` for a sandboxed workspace: its plugins run in its sandbox, the host has none for it. */
|
|
338
|
+
webComposition: Optional$2(Union([WebCompositionSchema, Null()])),
|
|
339
|
+
nativeComposition: Optional$2(Union([NativeCompositionSchema, Null()])),
|
|
340
|
+
providers: Optional$2(_Array_(_Object_({
|
|
341
|
+
hostId: Text$3,
|
|
342
|
+
packageName: Text$3,
|
|
343
|
+
version: Text$3,
|
|
344
|
+
operations: _Array_(_Object_({
|
|
345
|
+
scope: Union([
|
|
346
|
+
Literal(PO_WIRE_HOST_SCOPE),
|
|
347
|
+
Literal("workspace"),
|
|
348
|
+
Literal("session")
|
|
349
|
+
]),
|
|
350
|
+
names: Strings$1
|
|
351
|
+
})),
|
|
352
|
+
provenance: Union([
|
|
353
|
+
Literal("local"),
|
|
354
|
+
Literal("own"),
|
|
355
|
+
Literal("consented")
|
|
356
|
+
]),
|
|
357
|
+
status: Union([Literal("available"), Literal("unavailable")]),
|
|
358
|
+
reason: Optional$2(Union([
|
|
359
|
+
Literal("manifest-missing"),
|
|
360
|
+
Literal("manifest-expired"),
|
|
361
|
+
Literal("roster-stale"),
|
|
362
|
+
Literal("host-removed"),
|
|
363
|
+
Literal("consent-expired")
|
|
364
|
+
])),
|
|
365
|
+
expiresAt: Optional$2(NumberValue$2)
|
|
366
|
+
})))
|
|
367
|
+
}))
|
|
368
|
+
})),
|
|
369
|
+
host("network.voters.propose", "/api/network/voters", "POST", Json$3, { body: body(_Object_({
|
|
370
|
+
change: Union([_Object_({
|
|
371
|
+
network: Text$3,
|
|
372
|
+
epoch: NumberValue$2,
|
|
373
|
+
kind: Literal("add"),
|
|
374
|
+
added: Text$3,
|
|
375
|
+
addedKey: Text$3
|
|
376
|
+
}), _Object_({
|
|
377
|
+
network: Text$3,
|
|
378
|
+
epoch: NumberValue$2,
|
|
379
|
+
kind: Literal("evict"),
|
|
380
|
+
removed: Text$3
|
|
381
|
+
})]),
|
|
382
|
+
authorization: Text$3
|
|
383
|
+
})) }),
|
|
384
|
+
host("network.consents.list", "/api/network/workspaces/{workspaceId}/consents", "GET", _Object_({
|
|
385
|
+
consents: _Array_(ProviderConsent),
|
|
386
|
+
candidates: _Array_(ConsentCandidate)
|
|
387
|
+
}), { parameters: [ConsentWorkspaceParameter] }),
|
|
388
|
+
host("network.consents.approve", "/api/network/workspaces/{workspaceId}/consents", "POST", ProviderConsent, {
|
|
389
|
+
parameters: [ConsentWorkspaceParameter],
|
|
390
|
+
body: body(_Object_({
|
|
391
|
+
providerHostId: Text$3,
|
|
392
|
+
packageName: Text$3,
|
|
393
|
+
grants: _Array_(ProviderGrant, {
|
|
394
|
+
minItems: 2,
|
|
395
|
+
maxItems: 2
|
|
396
|
+
})
|
|
397
|
+
})),
|
|
398
|
+
responses: jsonApiResponses(ProviderConsent, 201)
|
|
399
|
+
}),
|
|
400
|
+
host("network.consents.revoke", "/api/network/workspaces/{workspaceId}/consents/{providerHostId}/{packageName}", "DELETE", Null(), {
|
|
401
|
+
parameters: [
|
|
402
|
+
ConsentWorkspaceParameter,
|
|
403
|
+
{
|
|
404
|
+
name: "providerHostId",
|
|
405
|
+
in: "path",
|
|
406
|
+
required: true,
|
|
407
|
+
schema: Text$3
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
name: "packageName",
|
|
411
|
+
in: "path",
|
|
412
|
+
required: true,
|
|
413
|
+
schema: Text$3
|
|
414
|
+
}
|
|
415
|
+
],
|
|
416
|
+
responses: { "204": { description: "Provider consent revoked" } }
|
|
417
|
+
}),
|
|
418
|
+
host("directories", "/api/directories", "GET", _Object_({ directories: Strings$1 }), { parameters: [query("q")] }),
|
|
419
|
+
host("directories.children", "/api/directories/children", "GET", _Object_({
|
|
420
|
+
path: Text$3,
|
|
421
|
+
parent: Optional$2(Text$3),
|
|
422
|
+
directories: Strings$1
|
|
423
|
+
}), { parameters: [query("path")] }),
|
|
424
|
+
host("directories.workspaces", "/api/directories/workspaces", "GET", _Object_({
|
|
425
|
+
root: Text$3,
|
|
426
|
+
declarations: _Array_(_Object_({
|
|
427
|
+
name: Text$3,
|
|
428
|
+
instructions: Optional$2(Text$3),
|
|
429
|
+
workspaceId: Optional$2(Text$3)
|
|
430
|
+
}))
|
|
431
|
+
}), {
|
|
432
|
+
parameters: [query("path")],
|
|
433
|
+
availability: "Host provides declaredWorkspaces"
|
|
434
|
+
}),
|
|
435
|
+
host("directories.po", "/api/directories/po", "GET", _Object_({ directories: Strings$1 })),
|
|
436
|
+
host("sessions.list", "/api/workspaces/{workspaceId}/sessions", "GET", _Object_({ sessions: _Array_(SessionSummarySchema) })),
|
|
437
|
+
host("sessions.create", "/api/workspaces/{workspaceId}/sessions", "POST", _Object_({ sessionId: Text$3 }), {
|
|
438
|
+
body: body(_Object_({ name: Optional$2(Text$3) })),
|
|
439
|
+
responses: jsonApiResponses(_Object_({ sessionId: Text$3 }), 201)
|
|
440
|
+
}),
|
|
441
|
+
host("sessions.createGeneral", "/api/sessions", "POST", _Object_({
|
|
442
|
+
sessionId: Text$3,
|
|
443
|
+
workspace: Optional$2(WorkspaceSchema),
|
|
444
|
+
session: Optional$2(SessionSummarySchema)
|
|
445
|
+
}), {
|
|
446
|
+
body: body(_Object_({
|
|
447
|
+
name: Optional$2(Text$3),
|
|
448
|
+
cwd: Optional$2(String({ minLength: 1 }))
|
|
449
|
+
})),
|
|
450
|
+
availability: "Host provides createGeneralSession when cwd is omitted; explicit cwd remains supported for compatibility",
|
|
451
|
+
responses: jsonApiResponses(_Object_({
|
|
452
|
+
sessionId: Text$3,
|
|
453
|
+
workspace: Optional$2(WorkspaceSchema),
|
|
454
|
+
session: Optional$2(SessionSummarySchema)
|
|
455
|
+
}), 201)
|
|
456
|
+
}),
|
|
457
|
+
host("coordinators.home", "/api/coordinators/home", "POST", _Object_({
|
|
458
|
+
sessionId: Text$3,
|
|
459
|
+
created: Boolean()
|
|
460
|
+
}), {
|
|
461
|
+
body: body(_Object_({
|
|
462
|
+
profile: String({ minLength: 1 }),
|
|
463
|
+
model: Optional$2(String({ minLength: 1 })),
|
|
464
|
+
name: String({ minLength: 1 })
|
|
465
|
+
}, { additionalProperties: false })),
|
|
466
|
+
availability: "Host provides ensureHomeCoordinator; otherwise 501"
|
|
467
|
+
}),
|
|
468
|
+
host("coordinators.add", "/api/coordinators", "POST", _Object_({
|
|
469
|
+
sessionId: Text$3,
|
|
470
|
+
created: Boolean()
|
|
471
|
+
}), {
|
|
472
|
+
body: body(_Object_({
|
|
473
|
+
workspaceId: Optional$2(String({ minLength: 1 })),
|
|
474
|
+
profile: Optional$2(String({
|
|
475
|
+
minLength: 1,
|
|
476
|
+
pattern: "\\S"
|
|
477
|
+
}))
|
|
478
|
+
}, { additionalProperties: false })),
|
|
479
|
+
responses: {
|
|
480
|
+
...jsonApiResponses(_Object_({
|
|
481
|
+
sessionId: Text$3,
|
|
482
|
+
created: Boolean()
|
|
483
|
+
})),
|
|
484
|
+
"422": {
|
|
485
|
+
description: "Profile required or invalid operation",
|
|
486
|
+
schema: Union([_Object_({
|
|
487
|
+
profileRequired: Literal(true),
|
|
488
|
+
error: Text$3
|
|
489
|
+
}), ApiErrorSchema])
|
|
490
|
+
}
|
|
491
|
+
},
|
|
492
|
+
availability: "Host provides addCoordinator; otherwise 501"
|
|
493
|
+
}),
|
|
494
|
+
host("sessions.get", "/api/workspaces/{workspaceId}/sessions/{sessionId}", "GET", SessionSummarySchema),
|
|
495
|
+
host("sessions.delete", "/api/workspaces/{workspaceId}/sessions/{sessionId}", "DELETE", ApiOkSchema),
|
|
496
|
+
host("sessions.history", "/api/workspaces/{workspaceId}/sessions/{sessionId}/history", "GET", _Object_({ sessions: _Array_(SavedSession) }), { availability: "Host provides sessionHistory" }),
|
|
497
|
+
host("sessions.restart", "/api/workspaces/{workspaceId}/sessions/{sessionId}/restart", "POST", ApiOkSchema, { availability: "Host provides restartSession" }),
|
|
498
|
+
host("sessions.move", "/api/workspaces/{workspaceId}/sessions/{sessionId}/move", "POST", ApiOkSchema, {
|
|
499
|
+
body: body(_Object_({ workspaceId: String({
|
|
500
|
+
minLength: 1,
|
|
501
|
+
pattern: "\\S"
|
|
502
|
+
}) }, { additionalProperties: false })),
|
|
503
|
+
availability: "Host provides moveSession; otherwise 501",
|
|
504
|
+
responses: {
|
|
505
|
+
...jsonApiResponses(ApiOkSchema),
|
|
506
|
+
"501": {
|
|
507
|
+
description: "Host does not support session moves",
|
|
508
|
+
schema: ApiErrorSchema
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
}),
|
|
512
|
+
host("sessions.role", "/api/workspaces/{workspaceId}/sessions/{sessionId}/role", "POST", ApiOkSchema, {
|
|
513
|
+
body: body(_Object_({ coordinator: Boolean() }, { additionalProperties: false })),
|
|
514
|
+
availability: "Host provides setSessionRole"
|
|
515
|
+
}),
|
|
516
|
+
host("sessions.revive", "/api/workspaces/{workspaceId}/sessions/{sessionId}/revive", "POST", ApiOkSchema, { availability: "Host provides reviveSession" }),
|
|
517
|
+
host("sessions.resume", "/api/workspaces/{workspaceId}/sessions/{sessionId}/resume", "POST", _Object_({ sessionId: Text$3 }), {
|
|
518
|
+
availability: "Host provides resumeSession",
|
|
519
|
+
body: body(_Object_({ targetSessionId: String({ pattern: "^[A-Za-z0-9_-]+$" }) }))
|
|
520
|
+
}),
|
|
521
|
+
host("sessions.file", "/api/workspaces/{workspaceId}/sessions/{sessionId}/file", "GET", Binary, {
|
|
522
|
+
parameters: [query("path", Text$3, true)],
|
|
523
|
+
responses: {
|
|
524
|
+
...jsonApiResponses(Binary),
|
|
525
|
+
"200": {
|
|
526
|
+
description: "File bytes, MIME type follows the file extension",
|
|
527
|
+
contentType: "*/*",
|
|
528
|
+
schema: Binary
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
}),
|
|
532
|
+
host("workspaces.list", "/api/workspaces", "GET", _Object_({ workspaces: _Array_(WorkspaceSchema) })),
|
|
533
|
+
host("workspaces.admit", "/api/workspaces", "POST", _Object_({ workspace: WorkspaceSchema }), {
|
|
534
|
+
body: body(_Object_({
|
|
535
|
+
root: Optional$2(Text$3),
|
|
536
|
+
name: Optional$2(Text$3),
|
|
537
|
+
declaration: Optional$2(Text$3),
|
|
538
|
+
instructions: Optional$2(Text$3)
|
|
539
|
+
})),
|
|
540
|
+
responses: jsonApiResponses(_Object_({ workspace: WorkspaceSchema }), 201)
|
|
541
|
+
}),
|
|
542
|
+
host("workspaces.get", "/api/workspaces/{workspaceId}", "GET", _Object_({ workspace: WorkspaceSchema })),
|
|
543
|
+
host("workspaces.history", "/api/workspaces/{workspaceId}/history", "GET", _Object_({ sessions: _Array_(SavedSession) }), { availability: "Host provides workspaceHistory" }),
|
|
544
|
+
host("workspaces.resume", "/api/workspaces/{workspaceId}/resume", "POST", _Object_({ sessionId: Text$3 }), {
|
|
545
|
+
availability: "Host provides resumeWorkspaceSession",
|
|
546
|
+
body: body(_Object_({ targetSessionId: String({ pattern: "^[A-Za-z0-9_-]+$" }) }))
|
|
547
|
+
}),
|
|
548
|
+
host("workspaces.removed", "/api/workspaces/{workspaceId}/removed", "GET", _Object_({ sessions: _Array_(Intersect([SavedSession, _Object_({
|
|
549
|
+
removedAt: Text$3,
|
|
550
|
+
purgeAt: Text$3
|
|
551
|
+
})])) }), { availability: "Host provides removedSessions" }),
|
|
552
|
+
host("workspaces.restoreRemoved", "/api/workspaces/{workspaceId}/removed/{sessionId}/restore", "POST", ApiOkSchema, { availability: "Host provides restoreRemovedSession" }),
|
|
553
|
+
host("workspaces.setSandbox", "/api/workspaces/{workspaceId}", "PATCH", _Object_({ workspace: WorkspaceSchema }), {
|
|
554
|
+
availability: "Host provides setWorkspaceSandbox or setWorkspaceInstructions",
|
|
555
|
+
body: body(Union([_Object_({ sandbox: Union([Text$3, Null()]) }, { additionalProperties: false }), _Object_({ instructions: Text$3 }, { additionalProperties: false })]))
|
|
556
|
+
}),
|
|
557
|
+
host("workspaces.remove", "/api/workspaces/{workspaceId}", "DELETE", ApiOkSchema)
|
|
558
|
+
];
|
|
559
|
+
const AuthType = Union([Literal("api_key"), Literal("oauth")]);
|
|
560
|
+
const Provider = _Object_({
|
|
561
|
+
id: Text$3,
|
|
562
|
+
name: Text$3,
|
|
563
|
+
methods: _Array_(_Object_({
|
|
564
|
+
type: AuthType,
|
|
565
|
+
label: Text$3
|
|
566
|
+
})),
|
|
567
|
+
authenticated: Optional$2(_Object_({
|
|
568
|
+
type: AuthType,
|
|
569
|
+
source: Optional$2(Text$3)
|
|
570
|
+
}))
|
|
571
|
+
});
|
|
572
|
+
const LoginEvent = Union([
|
|
573
|
+
_Object_({
|
|
574
|
+
type: Literal("info"),
|
|
575
|
+
message: Text$3,
|
|
576
|
+
links: Optional$2(_Array_(_Object_({
|
|
577
|
+
url: Text$3,
|
|
578
|
+
label: Optional$2(Text$3)
|
|
579
|
+
})))
|
|
580
|
+
}),
|
|
581
|
+
_Object_({
|
|
582
|
+
type: Literal("auth_url"),
|
|
583
|
+
url: Text$3,
|
|
584
|
+
instructions: Optional$2(Text$3)
|
|
585
|
+
}),
|
|
586
|
+
_Object_({
|
|
587
|
+
type: Literal("device_code"),
|
|
588
|
+
userCode: Text$3,
|
|
589
|
+
verificationUri: Text$3,
|
|
590
|
+
intervalSeconds: Optional$2(NumberValue$2),
|
|
591
|
+
expiresInSeconds: Optional$2(NumberValue$2)
|
|
592
|
+
}),
|
|
593
|
+
_Object_({
|
|
594
|
+
type: Literal("progress"),
|
|
595
|
+
message: Text$3
|
|
596
|
+
})
|
|
597
|
+
]);
|
|
598
|
+
const LoginFlowSchema = _Object_({
|
|
599
|
+
id: Text$3,
|
|
600
|
+
providerId: Text$3,
|
|
601
|
+
providerName: Text$3,
|
|
602
|
+
type: AuthType,
|
|
603
|
+
status: Union([
|
|
604
|
+
Literal("running"),
|
|
605
|
+
Literal("succeeded"),
|
|
606
|
+
Literal("failed"),
|
|
607
|
+
Literal("cancelled")
|
|
608
|
+
]),
|
|
609
|
+
events: _Array_(LoginEvent),
|
|
610
|
+
prompt: Optional$2(_Object_({
|
|
611
|
+
id: Text$3,
|
|
612
|
+
type: Union([
|
|
613
|
+
Literal("text"),
|
|
614
|
+
Literal("secret"),
|
|
615
|
+
Literal("select"),
|
|
616
|
+
Literal("manual_code")
|
|
617
|
+
]),
|
|
618
|
+
message: Text$3,
|
|
619
|
+
placeholder: Optional$2(Text$3),
|
|
620
|
+
options: Optional$2(_Array_(_Object_({
|
|
621
|
+
id: Text$3,
|
|
622
|
+
label: Text$3,
|
|
623
|
+
description: Optional$2(Text$3)
|
|
624
|
+
})))
|
|
625
|
+
})),
|
|
626
|
+
remote: Optional$2(Flag$2),
|
|
627
|
+
error: Optional$2(Text$3)
|
|
628
|
+
});
|
|
629
|
+
const Flow = _Object_({ flow: LoginFlowSchema });
|
|
630
|
+
const machineHttpContracts = [
|
|
631
|
+
host("providers.list", "/providers", "GET", _Object_({ providers: _Array_(Provider) })),
|
|
632
|
+
host("models.list", "/models", "GET", _Object_({ models: _Array_(_Object_({
|
|
633
|
+
value: Text$3,
|
|
634
|
+
label: Text$3,
|
|
635
|
+
group: Text$3
|
|
636
|
+
})) })),
|
|
637
|
+
host("providers.logout", "/providers/{providerId}", "DELETE", ApiOkSchema),
|
|
638
|
+
host("logins.create", "/logins", "POST", Flow, {
|
|
639
|
+
body: body(_Object_({
|
|
640
|
+
providerId: Text$3,
|
|
641
|
+
type: AuthType
|
|
642
|
+
})),
|
|
643
|
+
responses: jsonApiResponses(Flow, 201)
|
|
644
|
+
}),
|
|
645
|
+
host("logins.get", "/logins/{flowId}", "GET", Flow),
|
|
646
|
+
host("logins.cancel", "/logins/{flowId}", "DELETE", Flow),
|
|
647
|
+
host("logins.answer", "/logins/{flowId}/answer", "POST", Flow, { body: body(_Object_({
|
|
648
|
+
promptId: Text$3,
|
|
649
|
+
value: Text$3
|
|
650
|
+
})) })
|
|
651
|
+
].map((route) => ({
|
|
652
|
+
...route,
|
|
653
|
+
basePath: "po"
|
|
654
|
+
}));
|
|
655
|
+
const Source = Union([
|
|
656
|
+
Literal("extension"),
|
|
657
|
+
Literal("mcp"),
|
|
658
|
+
Literal("plugin"),
|
|
659
|
+
Literal("core")
|
|
660
|
+
]);
|
|
661
|
+
const Detail = Union([
|
|
662
|
+
_Object_({
|
|
663
|
+
itemKind: Literal("tool"),
|
|
664
|
+
name: Text$3,
|
|
665
|
+
owner: Text$3,
|
|
666
|
+
source: Source,
|
|
667
|
+
active: Flag$2,
|
|
668
|
+
tokens: _Object_({
|
|
669
|
+
schemaTokens: NumberValue$2,
|
|
670
|
+
promptTokens: NumberValue$2,
|
|
671
|
+
totalTokens: NumberValue$2
|
|
672
|
+
}),
|
|
673
|
+
description: Optional$2(Text$3),
|
|
674
|
+
promptSnippet: Optional$2(Text$3),
|
|
675
|
+
promptGuidelines: Optional$2(Strings$1),
|
|
676
|
+
parameters: Optional$2(Json$3)
|
|
677
|
+
}),
|
|
678
|
+
_Object_({
|
|
679
|
+
itemKind: Literal("skill"),
|
|
680
|
+
name: Text$3,
|
|
681
|
+
owner: Text$3,
|
|
682
|
+
source: Source,
|
|
683
|
+
active: Literal(true),
|
|
684
|
+
tokens: NumberValue$2,
|
|
685
|
+
description: Text$3,
|
|
686
|
+
filePath: Optional$2(Text$3),
|
|
687
|
+
modelInvocable: Flag$2
|
|
688
|
+
}),
|
|
689
|
+
_Object_({
|
|
690
|
+
itemKind: Literal("prompt"),
|
|
691
|
+
name: Literal("system"),
|
|
692
|
+
tokens: NumberValue$2,
|
|
693
|
+
stage: Union([Literal("base"), Literal("effective")]),
|
|
694
|
+
text: Text$3
|
|
695
|
+
})
|
|
696
|
+
]);
|
|
697
|
+
const sessionHttpContracts = [
|
|
698
|
+
{
|
|
699
|
+
...host("context.current", CURRENT_ROUTE, "GET", _Object_({
|
|
700
|
+
version: Literal(1),
|
|
701
|
+
revision: NumberValue$2,
|
|
702
|
+
selection: _Object_({
|
|
703
|
+
majorMode: Text$3,
|
|
704
|
+
domains: Strings$1,
|
|
705
|
+
profile: Optional$2(Text$3)
|
|
706
|
+
}),
|
|
707
|
+
groups: _Array_(_Object_({
|
|
708
|
+
id: Text$3,
|
|
709
|
+
label: Text$3,
|
|
710
|
+
kind: Union([
|
|
711
|
+
Literal("major"),
|
|
712
|
+
Literal("minor"),
|
|
713
|
+
Literal("domain"),
|
|
714
|
+
Literal("shared"),
|
|
715
|
+
Literal("core")
|
|
716
|
+
]),
|
|
717
|
+
items: _Array_(_Object_({
|
|
718
|
+
name: Text$3,
|
|
719
|
+
itemKind: Union([Literal("tool"), Literal("skill")]),
|
|
720
|
+
source: Source,
|
|
721
|
+
owner: Text$3,
|
|
722
|
+
tokens: NumberValue$2,
|
|
723
|
+
active: Flag$2
|
|
724
|
+
})),
|
|
725
|
+
tokens: NumberValue$2,
|
|
726
|
+
inactiveTokens: NumberValue$2
|
|
727
|
+
})),
|
|
728
|
+
totalTokens: NumberValue$2,
|
|
729
|
+
inactiveTokens: NumberValue$2,
|
|
730
|
+
systemPrompt: Optional$2(_Object_({
|
|
731
|
+
tokens: NumberValue$2,
|
|
732
|
+
stage: Union([Literal("base"), Literal("effective")])
|
|
733
|
+
})),
|
|
734
|
+
estimator: Literal("gpt-tokenizer")
|
|
735
|
+
})),
|
|
736
|
+
scope: "session",
|
|
737
|
+
basePath: API_BASE_PATH
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
...host("context.item", ITEM_ROUTE, "GET", _Object_({
|
|
741
|
+
revision: NumberValue$2,
|
|
742
|
+
item: Detail
|
|
743
|
+
}), { parameters: [query("kind", Union([
|
|
744
|
+
Literal("tool"),
|
|
745
|
+
Literal("skill"),
|
|
746
|
+
Literal("prompt")
|
|
747
|
+
]), true), query("name", Text$3, true)] }),
|
|
748
|
+
scope: "session",
|
|
749
|
+
basePath: API_BASE_PATH
|
|
750
|
+
},
|
|
751
|
+
{
|
|
752
|
+
...host("files.complete", "/", "GET", _Object_({ files: Strings$1 }), { parameters: [query("q", String({ maxLength: 256 }))] }),
|
|
753
|
+
scope: "session",
|
|
754
|
+
basePath: "files"
|
|
755
|
+
}
|
|
756
|
+
];
|
|
757
|
+
//#endregion
|
|
758
|
+
//#region ../../core/po-core/src/schemas/protocolHubContract.ts
|
|
759
|
+
const Text$2 = String();
|
|
760
|
+
const Json$2 = Unsafe({});
|
|
761
|
+
/** A live session frame every hub client needs (notification entries and agent dialogs) until it is acknowledged. */
|
|
762
|
+
const HubNoticeSchema = _Object_({
|
|
763
|
+
id: Text$2,
|
|
764
|
+
sessionId: Text$2,
|
|
765
|
+
frame: Record(Text$2, Json$2)
|
|
766
|
+
});
|
|
767
|
+
/** Native UI delivery metadata is HTTP-only; adding it must not refuse existing po.hub@1 clients. */
|
|
768
|
+
const HubSessionSchema = _Object_({
|
|
769
|
+
...SessionSummarySchema.properties,
|
|
770
|
+
nativeComposition: Optional$3(Omit(NativeCompositionSchema, ["uiEntry"]))
|
|
771
|
+
});
|
|
772
|
+
/** Instructions are HTTP-only so existing po.hub@1 clients keep the same wire contract. */
|
|
773
|
+
const HubWorkspaceSchema = Omit(WorkspaceSchema, ["instructions"]);
|
|
774
|
+
/** Per shared mount (`global`, `workspace:<id>`), a counter that rises when its plugin composition changes. */
|
|
775
|
+
const HubCompositionsSchema = Record(Text$2, Integer({ minimum: 0 }));
|
|
776
|
+
const HubState = {
|
|
777
|
+
sessions: Record(Text$2, HubSessionSchema),
|
|
778
|
+
workspaces: Record(Text$2, HubWorkspaceSchema),
|
|
779
|
+
pending: _Array_(HubNoticeSchema),
|
|
780
|
+
compositions: HubCompositionsSchema
|
|
781
|
+
};
|
|
782
|
+
const PoHubStateSchema = _Object_(HubState);
|
|
783
|
+
/** What one connection may see: its sessions, its workspaces, and the notices it has not acknowledged. */
|
|
784
|
+
const PoHubContract = definePoContract("po.hub", {
|
|
785
|
+
version: 1,
|
|
786
|
+
params: {},
|
|
787
|
+
state: HubState,
|
|
788
|
+
methods: {
|
|
789
|
+
readHome: {
|
|
790
|
+
args: _Object_({
|
|
791
|
+
offset: Optional$3(Integer({ minimum: 0 })),
|
|
792
|
+
limit: Optional$3(Integer({ minimum: 1 })),
|
|
793
|
+
source: Optional$3(Text$2),
|
|
794
|
+
workspaceId: Optional$3(Text$2)
|
|
795
|
+
}),
|
|
796
|
+
result: Unsafe({})
|
|
797
|
+
},
|
|
798
|
+
invoke: {
|
|
799
|
+
args: PoPluginWireCallSchema,
|
|
800
|
+
result: Json$2
|
|
801
|
+
},
|
|
802
|
+
ackNotice: { args: _Object_({ id: Text$2 }) }
|
|
803
|
+
}
|
|
804
|
+
});
|
|
805
|
+
/**
|
|
806
|
+
* Per topic (`global:<name>` on the wire for the host, `workspace:<id>:<name>`), a counter the host raises when that data changes, so a
|
|
807
|
+
* client fetches it again instead of polling. A separate contract: a host without it leaves clients on
|
|
808
|
+
* fetch-on-open rather than refusing the whole hub as out of date.
|
|
809
|
+
*/
|
|
810
|
+
const HubRevisionsSchema = Record(Text$2, Integer({ minimum: 0 }));
|
|
811
|
+
const PoHubRevisionsContract = definePoContract("po.hub.revisions", {
|
|
812
|
+
version: 1,
|
|
813
|
+
params: {},
|
|
814
|
+
state: { revisions: HubRevisionsSchema },
|
|
815
|
+
methods: {}
|
|
816
|
+
});
|
|
817
|
+
//#endregion
|
|
818
|
+
//#region ../../core/po-core/src/schemas/protocolThreadContract.ts
|
|
819
|
+
/** The thread's latest frame: `transcript_state` while its child runs, `transcript_ready` once it has finished. */
|
|
820
|
+
const PoThreadFrameSchema = Union([Null(), Intersect([_Object_({ type: String() }), Record(String(), Unsafe({}))])]);
|
|
821
|
+
/** One child thread of a session, followed only while someone holds it. */
|
|
822
|
+
const PoThreadContract = definePoContract("po.thread", {
|
|
823
|
+
version: 1,
|
|
824
|
+
params: {
|
|
825
|
+
sessionId: String({ minLength: 1 }),
|
|
826
|
+
threadId: String({ minLength: 1 })
|
|
827
|
+
},
|
|
828
|
+
state: { frame: PoThreadFrameSchema },
|
|
829
|
+
methods: {}
|
|
830
|
+
});
|
|
831
|
+
//#endregion
|
|
832
|
+
//#region ../../core/po-core/src/schemas/sessionApiContracts.ts
|
|
833
|
+
const Text$1 = String();
|
|
834
|
+
const NumberValue$1 = Number$1();
|
|
835
|
+
const Flag$1 = Boolean();
|
|
836
|
+
const Json$1 = Unsafe(Unknown({ description: "Strict JSON application value supplied by the active tool, journal entry, or extension; validated by the Pi codec." }));
|
|
837
|
+
const Optional$1 = Optional$3;
|
|
838
|
+
const Strings = _Array_(Text$1);
|
|
839
|
+
const Model = _Object_({
|
|
840
|
+
provider: Text$1,
|
|
841
|
+
id: Text$1
|
|
842
|
+
});
|
|
843
|
+
const Thinking = Union([
|
|
844
|
+
Literal("off"),
|
|
845
|
+
Literal("minimal"),
|
|
846
|
+
Literal("low"),
|
|
847
|
+
Literal("medium"),
|
|
848
|
+
Literal("high"),
|
|
849
|
+
Literal("max"),
|
|
850
|
+
Literal("xhigh")
|
|
851
|
+
]);
|
|
852
|
+
const Phase = Union([
|
|
853
|
+
Literal("idle"),
|
|
854
|
+
Literal("turn"),
|
|
855
|
+
Literal("compaction"),
|
|
856
|
+
Literal("retry")
|
|
857
|
+
]);
|
|
858
|
+
const Image = _Object_({
|
|
859
|
+
type: Literal("image"),
|
|
860
|
+
data: Text$1,
|
|
861
|
+
mimeType: Text$1
|
|
862
|
+
});
|
|
863
|
+
const TextPart = _Object_({
|
|
864
|
+
type: Literal("text"),
|
|
865
|
+
text: Text$1
|
|
866
|
+
});
|
|
867
|
+
const ThinkingPart = _Object_({
|
|
868
|
+
type: Literal("thinking"),
|
|
869
|
+
thinking: Text$1,
|
|
870
|
+
redacted: Optional$1(Literal(true))
|
|
871
|
+
});
|
|
872
|
+
const Content = Union([Image, TextPart]);
|
|
873
|
+
const Usage = _Object_({
|
|
874
|
+
input: NumberValue$1,
|
|
875
|
+
output: NumberValue$1,
|
|
876
|
+
cacheRead: NumberValue$1,
|
|
877
|
+
cacheWrite: NumberValue$1,
|
|
878
|
+
total: NumberValue$1
|
|
879
|
+
});
|
|
880
|
+
/** `timeZone` is the sender's device IANA zone; additive and optional so older clients and hosts still agree. */
|
|
881
|
+
const Message = _Object_({
|
|
882
|
+
text: Text$1,
|
|
883
|
+
images: Optional$1(_Array_(Image)),
|
|
884
|
+
timeZone: Optional$1(Text$1)
|
|
885
|
+
});
|
|
886
|
+
const Lifecycle = _Object_({
|
|
887
|
+
revision: NumberValue$1,
|
|
888
|
+
operation: Union([Null(), _Object_({
|
|
889
|
+
id: Text$1,
|
|
890
|
+
kind: Union([
|
|
891
|
+
Literal("run"),
|
|
892
|
+
Literal("compaction"),
|
|
893
|
+
Literal("navigation")
|
|
894
|
+
]),
|
|
895
|
+
status: Union([Literal("open"), Literal("aborting")])
|
|
896
|
+
})]),
|
|
897
|
+
paused: Flag$1,
|
|
898
|
+
queue: _Array_(_Object_({
|
|
899
|
+
id: Text$1,
|
|
900
|
+
text: Text$1,
|
|
901
|
+
images: Optional$1(_Array_(Image)),
|
|
902
|
+
delivery: Union([
|
|
903
|
+
Literal("steer"),
|
|
904
|
+
Literal("followUp"),
|
|
905
|
+
Literal("nextRun")
|
|
906
|
+
]),
|
|
907
|
+
scheduling: Union([Literal("automatic"), Literal("held")]),
|
|
908
|
+
disposition: Union([Literal("pending"), Literal("handoff")])
|
|
909
|
+
}))
|
|
910
|
+
});
|
|
911
|
+
const Frame = Intersect([_Object_({ type: Text$1 }), Record(Text$1, Json$1)], { description: "Discriminated extension presentation frame; selected channel schemas describe package payloads." });
|
|
912
|
+
const ProtocolEvent = _Object_({
|
|
913
|
+
sequence: NumberValue$1,
|
|
914
|
+
frame: Frame
|
|
915
|
+
});
|
|
916
|
+
const SessionServiceStateSchema = _Object_({
|
|
917
|
+
snapshot: _Object_({
|
|
918
|
+
fastMode: Flag$1,
|
|
919
|
+
locked: Flag$1,
|
|
920
|
+
lifecycle: Optional$1(Lifecycle)
|
|
921
|
+
}),
|
|
922
|
+
presentation: Optional$1(_Object_({
|
|
923
|
+
revision: NumberValue$1,
|
|
924
|
+
dropped: NumberValue$1,
|
|
925
|
+
resetRevision: Optional$1(NumberValue$1),
|
|
926
|
+
events: _Array_(ProtocolEvent),
|
|
927
|
+
projections: _Array_(ProtocolEvent)
|
|
928
|
+
})),
|
|
929
|
+
live: Optional$1(_Object_({
|
|
930
|
+
phase: Phase,
|
|
931
|
+
message: Optional$1(_Object_({
|
|
932
|
+
role: Literal("assistant"),
|
|
933
|
+
content: _Array_(Union([TextPart, ThinkingPart])),
|
|
934
|
+
model: Text$1,
|
|
935
|
+
timestamp: NumberValue$1
|
|
936
|
+
})),
|
|
937
|
+
tools: Record(Text$1, _Object_({
|
|
938
|
+
toolCallId: Text$1,
|
|
939
|
+
toolName: Text$1,
|
|
940
|
+
args: Json$1,
|
|
941
|
+
partialResult: Optional$1(_Object_({
|
|
942
|
+
content: _Array_(Content),
|
|
943
|
+
details: Optional$1(Json$1)
|
|
944
|
+
}))
|
|
945
|
+
}))
|
|
946
|
+
}))
|
|
947
|
+
});
|
|
948
|
+
/** Argument and result schemas of the `po.session` methods; the protocol contract and the API docs both read them. */
|
|
949
|
+
const SessionMethodSchemas = {
|
|
950
|
+
readTranscriptPage: {
|
|
951
|
+
args: _Object_({
|
|
952
|
+
cursor: Optional$1(Text$1),
|
|
953
|
+
direction: Optional$1(Union([Literal("older"), Literal("newer")])),
|
|
954
|
+
limit: Optional$1(NumberValue$1),
|
|
955
|
+
threadId: Optional$1(Text$1),
|
|
956
|
+
entryId: Optional$1(Text$1)
|
|
957
|
+
}),
|
|
958
|
+
result: _Object_({
|
|
959
|
+
entries: _Array_(Json$1),
|
|
960
|
+
startCursor: Union([Text$1, Null()]),
|
|
961
|
+
endCursor: Union([Text$1, Null()]),
|
|
962
|
+
olderCursor: Union([Text$1, Null()]),
|
|
963
|
+
newerCursor: Union([Text$1, Null()]),
|
|
964
|
+
generation: NumberValue$1,
|
|
965
|
+
revision: NumberValue$1,
|
|
966
|
+
context: _Array_(Json$1)
|
|
967
|
+
})
|
|
968
|
+
},
|
|
969
|
+
prompt: { args: Union([Text$1, _Object_({
|
|
970
|
+
...Message.properties,
|
|
971
|
+
waitFor: Optional$1(Union([Literal("accepted"), Literal("settled")]))
|
|
972
|
+
})]) },
|
|
973
|
+
steer: { args: Union([Text$1, Message]) },
|
|
974
|
+
abort: {},
|
|
975
|
+
abortOperation: { args: _Object_({ operationId: Text$1 }) },
|
|
976
|
+
setModel: { args: Model },
|
|
977
|
+
setThinking: { args: Thinking },
|
|
978
|
+
setFastMode: { args: Flag$1 },
|
|
979
|
+
setAgentLock: { args: Flag$1 },
|
|
980
|
+
followUp: { args: Message },
|
|
981
|
+
enqueueAutomatic: {
|
|
982
|
+
args: Message,
|
|
983
|
+
result: _Object_({ id: Text$1 })
|
|
984
|
+
},
|
|
985
|
+
removeQueued: {
|
|
986
|
+
args: _Object_({ id: Text$1 }),
|
|
987
|
+
result: Union([
|
|
988
|
+
Literal("removed"),
|
|
989
|
+
Literal("in_flight"),
|
|
990
|
+
Literal("already_consumed"),
|
|
991
|
+
Literal("not_found")
|
|
992
|
+
])
|
|
993
|
+
},
|
|
994
|
+
promoteQueued: {
|
|
995
|
+
args: _Object_({
|
|
996
|
+
id: Text$1,
|
|
997
|
+
operationId: Optional$1(Text$1)
|
|
998
|
+
}),
|
|
999
|
+
result: Union([
|
|
1000
|
+
Literal("promoted"),
|
|
1001
|
+
Literal("in_flight"),
|
|
1002
|
+
Literal("target_changed"),
|
|
1003
|
+
Literal("not_found")
|
|
1004
|
+
])
|
|
1005
|
+
},
|
|
1006
|
+
resumeQueue: {},
|
|
1007
|
+
clearQueue: { result: _Object_({
|
|
1008
|
+
steering: Strings,
|
|
1009
|
+
followUp: Strings
|
|
1010
|
+
}) },
|
|
1011
|
+
rewind: {
|
|
1012
|
+
args: _Object_({
|
|
1013
|
+
itemId: Text$1,
|
|
1014
|
+
summarize: Optional$1(Flag$1),
|
|
1015
|
+
customInstructions: Optional$1(Text$1),
|
|
1016
|
+
replaceInstructions: Optional$1(Flag$1),
|
|
1017
|
+
label: Optional$1(Text$1)
|
|
1018
|
+
}),
|
|
1019
|
+
result: _Object_({
|
|
1020
|
+
editorText: Optional$1(Text$1),
|
|
1021
|
+
cancelled: Flag$1,
|
|
1022
|
+
aborted: Optional$1(Flag$1),
|
|
1023
|
+
summaryEntry: Optional$1(_Object_({
|
|
1024
|
+
id: Text$1,
|
|
1025
|
+
parentId: Union([Text$1, Null()]),
|
|
1026
|
+
timestamp: Text$1,
|
|
1027
|
+
fromId: Text$1,
|
|
1028
|
+
summary: Text$1,
|
|
1029
|
+
details: Optional$1(Json$1),
|
|
1030
|
+
usage: Optional$1(Usage),
|
|
1031
|
+
fromHook: Optional$1(Flag$1)
|
|
1032
|
+
}))
|
|
1033
|
+
})
|
|
1034
|
+
},
|
|
1035
|
+
extensionUiResponse: { args: Union([
|
|
1036
|
+
_Object_({
|
|
1037
|
+
id: Text$1,
|
|
1038
|
+
value: Text$1
|
|
1039
|
+
}),
|
|
1040
|
+
_Object_({
|
|
1041
|
+
id: Text$1,
|
|
1042
|
+
confirmed: Flag$1
|
|
1043
|
+
}),
|
|
1044
|
+
_Object_({
|
|
1045
|
+
id: Text$1,
|
|
1046
|
+
cancelled: Literal(true)
|
|
1047
|
+
})
|
|
1048
|
+
]) },
|
|
1049
|
+
getState: { result: _Object_({
|
|
1050
|
+
model: Optional$1(Model),
|
|
1051
|
+
thinkingLevel: Thinking,
|
|
1052
|
+
fastMode: Flag$1,
|
|
1053
|
+
agentLocked: Optional$1(Flag$1),
|
|
1054
|
+
isStreaming: Flag$1,
|
|
1055
|
+
isCompacting: Flag$1,
|
|
1056
|
+
steeringMode: Union([Literal("all"), Literal("one-at-a-time")]),
|
|
1057
|
+
followUpMode: Union([Literal("all"), Literal("one-at-a-time")]),
|
|
1058
|
+
sessionId: Text$1,
|
|
1059
|
+
sessionName: Optional$1(Text$1),
|
|
1060
|
+
autoCompactionEnabled: Flag$1,
|
|
1061
|
+
messageCount: NumberValue$1,
|
|
1062
|
+
pendingMessageCount: NumberValue$1,
|
|
1063
|
+
operationId: Optional$1(Text$1),
|
|
1064
|
+
executionStatus: Optional$1(Union([Literal("open"), Literal("aborting")])),
|
|
1065
|
+
queuePaused: Optional$1(Flag$1),
|
|
1066
|
+
queueRevision: Optional$1(NumberValue$1)
|
|
1067
|
+
}) },
|
|
1068
|
+
getSessionStats: { result: _Object_({
|
|
1069
|
+
sessionId: Text$1,
|
|
1070
|
+
totalMessages: NumberValue$1,
|
|
1071
|
+
tokens: Usage,
|
|
1072
|
+
cost: NumberValue$1,
|
|
1073
|
+
contextUsage: Optional$1(_Object_({
|
|
1074
|
+
tokens: Union([NumberValue$1, Null()]),
|
|
1075
|
+
contextWindow: NumberValue$1,
|
|
1076
|
+
percent: Union([NumberValue$1, Null()])
|
|
1077
|
+
}))
|
|
1078
|
+
}) },
|
|
1079
|
+
getCommands: { result: _Array_(_Object_({
|
|
1080
|
+
name: Text$1,
|
|
1081
|
+
description: Optional$1(Text$1),
|
|
1082
|
+
source: Union([
|
|
1083
|
+
Literal("extension"),
|
|
1084
|
+
Literal("prompt"),
|
|
1085
|
+
Literal("skill")
|
|
1086
|
+
]),
|
|
1087
|
+
sourceInfo: Optional$1(_Object_({
|
|
1088
|
+
path: Text$1,
|
|
1089
|
+
source: Text$1,
|
|
1090
|
+
scope: Union([
|
|
1091
|
+
Literal("user"),
|
|
1092
|
+
Literal("project"),
|
|
1093
|
+
Literal("temporary")
|
|
1094
|
+
]),
|
|
1095
|
+
origin: Union([Literal("package"), Literal("top-level")]),
|
|
1096
|
+
baseDir: Optional$1(Text$1)
|
|
1097
|
+
}))
|
|
1098
|
+
})) },
|
|
1099
|
+
getAvailableModels: { result: _Array_(Model) },
|
|
1100
|
+
getAvailableThinkingLevels: { result: _Array_(Thinking) },
|
|
1101
|
+
compact: {
|
|
1102
|
+
args: _Object_({ customInstructions: Optional$1(Text$1) }),
|
|
1103
|
+
result: Json$1
|
|
1104
|
+
},
|
|
1105
|
+
setName: { args: Text$1 },
|
|
1106
|
+
setGroups: { args: _Array_(Text$1) }
|
|
1107
|
+
};
|
|
1108
|
+
const ErrorSchema = _Object_({
|
|
1109
|
+
code: Text$1,
|
|
1110
|
+
message: Text$1
|
|
1111
|
+
});
|
|
1112
|
+
const documented = (id, service, member, direction, input, description) => ({
|
|
1113
|
+
id,
|
|
1114
|
+
scope: service === "po.hub" ? "host" : "session",
|
|
1115
|
+
service,
|
|
1116
|
+
member,
|
|
1117
|
+
direction,
|
|
1118
|
+
kind: direction === "server-to-client" ? "state" : "method",
|
|
1119
|
+
input,
|
|
1120
|
+
...direction === "server-to-client" ? {} : { errors: ErrorSchema },
|
|
1121
|
+
description
|
|
1122
|
+
});
|
|
1123
|
+
const sessionSocketContracts = [
|
|
1124
|
+
...Object.entries(SessionMethodSchemas).map(([member, { args, result }]) => ({
|
|
1125
|
+
id: `session.${member}`,
|
|
1126
|
+
scope: "session",
|
|
1127
|
+
service: "po.session",
|
|
1128
|
+
member,
|
|
1129
|
+
direction: "client-to-server",
|
|
1130
|
+
kind: "method",
|
|
1131
|
+
description: `Session ${member}. The protocol call carries the argument; a void result is null.`,
|
|
1132
|
+
input: Tuple(args === void 0 ? [] : [args]),
|
|
1133
|
+
...result === void 0 ? {} : { output: result },
|
|
1134
|
+
errors: ErrorSchema
|
|
1135
|
+
})),
|
|
1136
|
+
documented("session.state", "po.session", "state", "server-to-client", SessionServiceStateSchema, "The `state` member of `po.session`, as the Po protocol client follows it."),
|
|
1137
|
+
documented("hub.state", "po.hub", "state", "server-to-client", PoHubStateSchema, "Sessions and workspaces this connection may see, and notices it has not acknowledged."),
|
|
1138
|
+
documented("thread.frame", "po.thread", "frame", "server-to-client", PoThreadFrameSchema, "The latest frame of one child thread: transcript_state while it runs, transcript_ready once finished."),
|
|
1139
|
+
documented("channels.latest", "po.channels", "latest", "server-to-client", PoChannelsStateSchema, "The latest payload of each extension channel frame type for one session."),
|
|
1140
|
+
documented("channels.receive", "po.channels", "receive", "client-to-server", Tuple([ChannelFrameSchema]), "Send one extension channel frame to the session.")
|
|
1141
|
+
];
|
|
1142
|
+
const Schema = Unsafe(Union([Boolean(), Record(String(), Unknown())]));
|
|
1143
|
+
const Scope = Union([
|
|
1144
|
+
Literal("host"),
|
|
1145
|
+
Literal("workspace"),
|
|
1146
|
+
Literal("session")
|
|
1147
|
+
]);
|
|
1148
|
+
const Named = String({ minLength: 1 });
|
|
1149
|
+
const ResponseSchema = _Object_({
|
|
1150
|
+
description: Named,
|
|
1151
|
+
contentType: Optional$3(Named),
|
|
1152
|
+
schema: Optional$3(Schema),
|
|
1153
|
+
events: Optional$3(Record(Named, Schema))
|
|
1154
|
+
});
|
|
1155
|
+
_Object_({
|
|
1156
|
+
version: Literal(1),
|
|
1157
|
+
protocols: Optional$3(Record(Named, Named)),
|
|
1158
|
+
schemas: Optional$3(Record(Named, Schema)),
|
|
1159
|
+
http: _Array_(_Object_({
|
|
1160
|
+
id: Named,
|
|
1161
|
+
scope: Scope,
|
|
1162
|
+
/** Omit for host-owned absolute routes. */
|
|
1163
|
+
basePath: Optional$3(String({ pattern: "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$" })),
|
|
1164
|
+
path: String({ pattern: "^/" }),
|
|
1165
|
+
method: Union([
|
|
1166
|
+
Literal("GET"),
|
|
1167
|
+
Literal("POST"),
|
|
1168
|
+
Literal("PUT"),
|
|
1169
|
+
Literal("PATCH"),
|
|
1170
|
+
Literal("DELETE"),
|
|
1171
|
+
Literal("HEAD"),
|
|
1172
|
+
Literal("OPTIONS")
|
|
1173
|
+
]),
|
|
1174
|
+
description: Named,
|
|
1175
|
+
availability: Optional$3(Named),
|
|
1176
|
+
authentication: Union([
|
|
1177
|
+
Literal("none"),
|
|
1178
|
+
Literal("owner"),
|
|
1179
|
+
Literal("device")
|
|
1180
|
+
]),
|
|
1181
|
+
parameters: Optional$3(_Array_(_Object_({
|
|
1182
|
+
name: Named,
|
|
1183
|
+
in: Union([
|
|
1184
|
+
Literal("path"),
|
|
1185
|
+
Literal("query"),
|
|
1186
|
+
Literal("header")
|
|
1187
|
+
]),
|
|
1188
|
+
required: Boolean(),
|
|
1189
|
+
schema: Schema
|
|
1190
|
+
}))),
|
|
1191
|
+
body: Optional$3(_Object_({
|
|
1192
|
+
contentType: Named,
|
|
1193
|
+
contentTypes: Optional$3(_Array_(Named, { minItems: 1 })),
|
|
1194
|
+
required: Boolean(),
|
|
1195
|
+
schema: Schema
|
|
1196
|
+
})),
|
|
1197
|
+
responses: Record(String({ pattern: "^(?:[1-5][0-9]{2}|default)$" }), ResponseSchema, { minProperties: 1 })
|
|
1198
|
+
})),
|
|
1199
|
+
sockets: _Array_(_Object_({
|
|
1200
|
+
id: Named,
|
|
1201
|
+
scope: Scope,
|
|
1202
|
+
description: Named,
|
|
1203
|
+
availability: Optional$3(Named),
|
|
1204
|
+
service: Named,
|
|
1205
|
+
member: Named,
|
|
1206
|
+
direction: Union([Literal("client-to-server"), Literal("server-to-client")]),
|
|
1207
|
+
kind: Union([
|
|
1208
|
+
Literal("method"),
|
|
1209
|
+
Literal("state"),
|
|
1210
|
+
Literal("channel")
|
|
1211
|
+
]),
|
|
1212
|
+
input: Schema,
|
|
1213
|
+
output: Optional$3(Schema),
|
|
1214
|
+
errors: Optional$3(Schema)
|
|
1215
|
+
})),
|
|
1216
|
+
/** Explicitly enumerate dynamic values whose shape is supplied at runtime. */
|
|
1217
|
+
dynamic: _Array_(String({ minLength: 1 })),
|
|
1218
|
+
gaps: Optional$3(_Array_(Named))
|
|
1219
|
+
});
|
|
1220
|
+
function defineApiContract(contract) {
|
|
1221
|
+
return contract;
|
|
1222
|
+
}
|
|
1223
|
+
//#endregion
|
|
1224
|
+
//#region ../../core/po-core/src/schemas/remoteApiContracts.ts
|
|
1225
|
+
const Text = String();
|
|
1226
|
+
const NumberValue = Number$1();
|
|
1227
|
+
const Optional = Optional$3;
|
|
1228
|
+
const Flag = Boolean();
|
|
1229
|
+
const JsonObject = Record(Text, Unknown({ description: "WebAuthn ceremony fields supplied and verified by the installed WebAuthn implementation." }));
|
|
1230
|
+
const Tunnel = Union([_Object_({ kind: Literal("quick") }), _Object_({
|
|
1231
|
+
kind: Literal("named"),
|
|
1232
|
+
hostname: Text,
|
|
1233
|
+
name: Optional(Text),
|
|
1234
|
+
tokenFile: Optional(Text),
|
|
1235
|
+
configFile: Optional(Text)
|
|
1236
|
+
})]);
|
|
1237
|
+
const Settings = _Object_({
|
|
1238
|
+
autoCloseEnabled: Flag,
|
|
1239
|
+
autoCloseMinutes: NumberValue,
|
|
1240
|
+
sessionExpiryEnabled: Flag,
|
|
1241
|
+
idleMinutes: NumberValue,
|
|
1242
|
+
absoluteHours: NumberValue,
|
|
1243
|
+
tunnel: Tunnel
|
|
1244
|
+
});
|
|
1245
|
+
const State = _Object_({
|
|
1246
|
+
status: Union([
|
|
1247
|
+
Literal("off"),
|
|
1248
|
+
Literal("starting"),
|
|
1249
|
+
Literal("on"),
|
|
1250
|
+
Literal("failed")
|
|
1251
|
+
]),
|
|
1252
|
+
publicUrl: Optional(Text),
|
|
1253
|
+
startedAt: Optional(Text),
|
|
1254
|
+
closesAt: Optional(Text),
|
|
1255
|
+
error: Optional(Text),
|
|
1256
|
+
devices: _Array_(_Object_({
|
|
1257
|
+
id: Text,
|
|
1258
|
+
label: Text,
|
|
1259
|
+
userAgent: Text,
|
|
1260
|
+
createdAt: Text,
|
|
1261
|
+
lastSeenAt: Text,
|
|
1262
|
+
self: Flag
|
|
1263
|
+
})),
|
|
1264
|
+
pending: _Array_(_Object_({
|
|
1265
|
+
id: Text,
|
|
1266
|
+
userAgent: Text,
|
|
1267
|
+
edgeIp: Text,
|
|
1268
|
+
createdAt: Text,
|
|
1269
|
+
expiresAt: Text
|
|
1270
|
+
})),
|
|
1271
|
+
trustedDevices: _Array_(_Object_({
|
|
1272
|
+
id: Text,
|
|
1273
|
+
label: Text,
|
|
1274
|
+
platform: Union([Literal("ios"), Literal("android")]),
|
|
1275
|
+
createdAt: Text,
|
|
1276
|
+
lastSeenAt: Text,
|
|
1277
|
+
self: Flag
|
|
1278
|
+
})),
|
|
1279
|
+
settings: Settings
|
|
1280
|
+
});
|
|
1281
|
+
const StateResponse = _Object_({ state: State });
|
|
1282
|
+
const Trust = _Object_({
|
|
1283
|
+
publicKey: Text,
|
|
1284
|
+
fingerprint: Text,
|
|
1285
|
+
revision: NumberValue
|
|
1286
|
+
});
|
|
1287
|
+
const Begun = _Object_({
|
|
1288
|
+
ceremonyId: Text,
|
|
1289
|
+
options: JsonObject
|
|
1290
|
+
});
|
|
1291
|
+
const DeviceKeyBegun = _Object_({
|
|
1292
|
+
ceremonyId: Text,
|
|
1293
|
+
challenge: Text,
|
|
1294
|
+
kind: Literal("device-key")
|
|
1295
|
+
});
|
|
1296
|
+
const ChannelKeys = _Object_({
|
|
1297
|
+
session: Text,
|
|
1298
|
+
protocol: Text,
|
|
1299
|
+
http: Text
|
|
1300
|
+
});
|
|
1301
|
+
const Finish = _Object_({
|
|
1302
|
+
ceremonyId: Text,
|
|
1303
|
+
response: JsonObject
|
|
1304
|
+
});
|
|
1305
|
+
const SealedEnvelopeSchema = _Object_({
|
|
1306
|
+
v: Literal(1),
|
|
1307
|
+
n: Text,
|
|
1308
|
+
c: Text
|
|
1309
|
+
});
|
|
1310
|
+
_Object_({
|
|
1311
|
+
v: Literal(1),
|
|
1312
|
+
method: Text,
|
|
1313
|
+
target: Text,
|
|
1314
|
+
headers: _Array_(Tuple([Text, Text])),
|
|
1315
|
+
body: Optional(Text)
|
|
1316
|
+
});
|
|
1317
|
+
_Object_({
|
|
1318
|
+
v: Literal(1),
|
|
1319
|
+
status: NumberValue,
|
|
1320
|
+
headers: _Array_(Tuple([Text, Text])),
|
|
1321
|
+
body: Text
|
|
1322
|
+
});
|
|
1323
|
+
const route = (id, path, method, result, input, extra = {}) => ({
|
|
1324
|
+
id: `remote.${id}`,
|
|
1325
|
+
path: `/api/remote${path}`,
|
|
1326
|
+
method,
|
|
1327
|
+
scope: "host",
|
|
1328
|
+
authentication: "owner",
|
|
1329
|
+
description: `Remote Control ${id}.`,
|
|
1330
|
+
availability: "Global host provides Remote Control. Tunnel routes additionally enforce device, origin and step-up policy.",
|
|
1331
|
+
responses: {
|
|
1332
|
+
...jsonApiResponses(result),
|
|
1333
|
+
"429": {
|
|
1334
|
+
description: "Rate limit exceeded",
|
|
1335
|
+
schema: ApiErrorSchema
|
|
1336
|
+
}
|
|
1337
|
+
},
|
|
1338
|
+
...input ? { body: {
|
|
1339
|
+
contentType: "application/json",
|
|
1340
|
+
required: true,
|
|
1341
|
+
schema: input
|
|
1342
|
+
} } : {},
|
|
1343
|
+
...extra
|
|
1344
|
+
});
|
|
1345
|
+
const direct = [
|
|
1346
|
+
route("state", "", "GET", StateResponse),
|
|
1347
|
+
route("enable", "/enable", "POST", StateResponse),
|
|
1348
|
+
route("disable", "/disable", "POST", StateResponse, void 0, { responses: {
|
|
1349
|
+
...jsonApiResponses(StateResponse),
|
|
1350
|
+
"202": {
|
|
1351
|
+
description: "Tunnel closing",
|
|
1352
|
+
schema: _Object_({ status: Literal("closing") })
|
|
1353
|
+
}
|
|
1354
|
+
} }),
|
|
1355
|
+
route("codes", "/codes", "POST", _Object_({
|
|
1356
|
+
...Trust.properties,
|
|
1357
|
+
code: Text,
|
|
1358
|
+
manualCode: Text,
|
|
1359
|
+
pairUrl: Text,
|
|
1360
|
+
expiresAt: Text
|
|
1361
|
+
}), void 0, { responses: jsonApiResponses(_Object_({
|
|
1362
|
+
...Trust.properties,
|
|
1363
|
+
code: Text,
|
|
1364
|
+
manualCode: Text,
|
|
1365
|
+
pairUrl: Text,
|
|
1366
|
+
expiresAt: Text
|
|
1367
|
+
}), 201) }),
|
|
1368
|
+
route("approve", "/pairing/{id}/approve", "POST", StateResponse),
|
|
1369
|
+
route("deny", "/pairing/{id}/deny", "POST", StateResponse),
|
|
1370
|
+
route("revoke", "/devices/{id}", "DELETE", StateResponse),
|
|
1371
|
+
route("settings", "/settings", "PUT", _Object_({ settings: Settings }), Partial(Settings)),
|
|
1372
|
+
route("passkeys", "/passkeys", "GET", _Object_({
|
|
1373
|
+
support: Union([_Object_({
|
|
1374
|
+
supported: Literal(true),
|
|
1375
|
+
rpId: Text
|
|
1376
|
+
}), _Object_({
|
|
1377
|
+
supported: Literal(false),
|
|
1378
|
+
reason: Text
|
|
1379
|
+
})]),
|
|
1380
|
+
credentials: _Array_(_Object_({
|
|
1381
|
+
id: Text,
|
|
1382
|
+
label: Text,
|
|
1383
|
+
createdAt: Text,
|
|
1384
|
+
lastUsedAt: Text
|
|
1385
|
+
}))
|
|
1386
|
+
})),
|
|
1387
|
+
route("passkeys.remove", "/passkeys/{id}", "DELETE", ApiOkSchema),
|
|
1388
|
+
route("register.begin", "/passkeys/register/begin", "POST", Begun, void 0, { authentication: "device" }),
|
|
1389
|
+
route("register.finish", "/passkeys/register/finish", "POST", _Object_({ id: Text }), Finish, { authentication: "device" }),
|
|
1390
|
+
route("authenticate.begin", "/passkeys/authenticate/begin", "POST", Begun, void 0, { authentication: "none" }),
|
|
1391
|
+
route("authenticate.finish", "/passkeys/authenticate/finish", "POST", _Object_({
|
|
1392
|
+
ok: Literal(true),
|
|
1393
|
+
hostPublicKey: Text
|
|
1394
|
+
}), Finish, { authentication: "none" }),
|
|
1395
|
+
route("challenge", "/challenge", "POST", Union([Begun, DeviceKeyBegun]), _Object_({ action: Text }), { authentication: "device" }),
|
|
1396
|
+
route("trusted-devices.register", "/trusted-devices", "POST", _Object_({ trustedDeviceId: Text }), _Object_({
|
|
1397
|
+
identityPublicKey: Text,
|
|
1398
|
+
stepUpPublicKey: Text,
|
|
1399
|
+
label: Text,
|
|
1400
|
+
platform: Union([Literal("ios"), Literal("android")]),
|
|
1401
|
+
identityProof: Text,
|
|
1402
|
+
stepUpProof: Text
|
|
1403
|
+
}), {
|
|
1404
|
+
authentication: "device",
|
|
1405
|
+
description: "Registers a native device from a sealed, QR-approved pairing session.",
|
|
1406
|
+
responses: jsonApiResponses(_Object_({ trustedDeviceId: Text }), 201)
|
|
1407
|
+
}),
|
|
1408
|
+
route("trusted-devices.revoke", "/trusted-devices/{id}", "DELETE", StateResponse, void 0, { description: "Revokes a trusted native device. Local callers, or sealed callers with verified step-up." }),
|
|
1409
|
+
route("device-auth.challenge", "/device-auth/challenge", "POST", _Object_({
|
|
1410
|
+
challengeId: Text,
|
|
1411
|
+
challenge: Text,
|
|
1412
|
+
hostPublicKey: Text,
|
|
1413
|
+
attestation: Text
|
|
1414
|
+
}), _Object_({
|
|
1415
|
+
trustedDeviceId: Text,
|
|
1416
|
+
nonce: Text
|
|
1417
|
+
}), { authentication: "none" }),
|
|
1418
|
+
route("device-auth.authenticate", "/device-auth/authenticate", "POST", _Object_({ ok: Literal(true) }), _Object_({
|
|
1419
|
+
challengeId: Text,
|
|
1420
|
+
trustedDeviceId: Text,
|
|
1421
|
+
signature: Text,
|
|
1422
|
+
channels: ChannelKeys
|
|
1423
|
+
}), { authentication: "none" }),
|
|
1424
|
+
route("channel", "/channel", "POST", ApiOkSchema, _Object_({
|
|
1425
|
+
clientPublicKey: Text,
|
|
1426
|
+
scope: Union([
|
|
1427
|
+
Literal("session"),
|
|
1428
|
+
Literal("protocol"),
|
|
1429
|
+
Literal("http")
|
|
1430
|
+
])
|
|
1431
|
+
}), { authentication: "device" }),
|
|
1432
|
+
route("request", "/request", "POST", SealedEnvelopeSchema, SealedEnvelopeSchema, {
|
|
1433
|
+
authentication: "device",
|
|
1434
|
+
description: "Sealed HTTP gateway. Decrypted requests/responses use the SealedHttpRequest and SealedHttpResponse envelopes."
|
|
1435
|
+
}),
|
|
1436
|
+
route("pair", "/pair", "POST", _Object_({
|
|
1437
|
+
requestId: Text,
|
|
1438
|
+
status: Literal("pending")
|
|
1439
|
+
}), _Object_({ code: String({ minLength: 1 }) }), {
|
|
1440
|
+
authentication: "none",
|
|
1441
|
+
responses: {
|
|
1442
|
+
...jsonApiResponses(_Object_({
|
|
1443
|
+
requestId: Text,
|
|
1444
|
+
status: Literal("pending")
|
|
1445
|
+
}), 202),
|
|
1446
|
+
"410": {
|
|
1447
|
+
description: "Pairing code is no longer valid",
|
|
1448
|
+
schema: ApiErrorSchema
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
}),
|
|
1452
|
+
route("pair.status", "/pair/status", "GET", _Object_({
|
|
1453
|
+
status: Union([
|
|
1454
|
+
Literal("pending"),
|
|
1455
|
+
Literal("approved"),
|
|
1456
|
+
Literal("denied"),
|
|
1457
|
+
Literal("expired"),
|
|
1458
|
+
Literal("consumed")
|
|
1459
|
+
]),
|
|
1460
|
+
bundleTrust: Optional(Trust),
|
|
1461
|
+
hostPublicKey: Optional(Text)
|
|
1462
|
+
}), void 0, {
|
|
1463
|
+
authentication: "none",
|
|
1464
|
+
parameters: [{
|
|
1465
|
+
name: "request",
|
|
1466
|
+
in: "query",
|
|
1467
|
+
required: true,
|
|
1468
|
+
schema: Text
|
|
1469
|
+
}]
|
|
1470
|
+
})
|
|
1471
|
+
];
|
|
1472
|
+
const remoteHttpContracts = [
|
|
1473
|
+
route("frontend", "/frontend", "POST", ApiOkSchema, _Object_({ origin: Text }), {
|
|
1474
|
+
authentication: "owner",
|
|
1475
|
+
availability: "Internal loopback frontend registration; blocked by the browser proxy.",
|
|
1476
|
+
parameters: [{
|
|
1477
|
+
name: "x-po-web-registration",
|
|
1478
|
+
in: "header",
|
|
1479
|
+
required: true,
|
|
1480
|
+
schema: Text
|
|
1481
|
+
}]
|
|
1482
|
+
}),
|
|
1483
|
+
...direct,
|
|
1484
|
+
...direct.map((operation) => ({
|
|
1485
|
+
...operation,
|
|
1486
|
+
id: `${operation.id}.plugin`,
|
|
1487
|
+
basePath: "remote",
|
|
1488
|
+
path: operation.path.slice(11) || "/",
|
|
1489
|
+
authentication: "owner",
|
|
1490
|
+
availability: "Global Remote Control plugin mount, reached through the authenticated headless listener."
|
|
1491
|
+
})),
|
|
1492
|
+
{
|
|
1493
|
+
id: "remote.pair.page",
|
|
1494
|
+
scope: "host",
|
|
1495
|
+
path: "/pair",
|
|
1496
|
+
method: "GET",
|
|
1497
|
+
authentication: "none",
|
|
1498
|
+
availability: "Remote listener only",
|
|
1499
|
+
description: "Pairing and passkey bootstrap page.",
|
|
1500
|
+
responses: { "200": {
|
|
1501
|
+
description: "Pairing page",
|
|
1502
|
+
contentType: "text/html",
|
|
1503
|
+
schema: Text
|
|
1504
|
+
} }
|
|
1505
|
+
}
|
|
1506
|
+
];
|
|
1507
|
+
const Asset = _Object_({
|
|
1508
|
+
path: Text,
|
|
1509
|
+
sha256: String({ pattern: "^[a-f0-9]{64}$" }),
|
|
1510
|
+
byteLength: Integer({ minimum: 0 }),
|
|
1511
|
+
contentType: Text
|
|
1512
|
+
});
|
|
1513
|
+
const Signed = _Object_({
|
|
1514
|
+
manifest: _Object_({
|
|
1515
|
+
version: Literal(2),
|
|
1516
|
+
revision: Integer({ minimum: 1 }),
|
|
1517
|
+
builtAt: NumberValue,
|
|
1518
|
+
assets: _Array_(Asset)
|
|
1519
|
+
}),
|
|
1520
|
+
signature: Text,
|
|
1521
|
+
publicKey: Text
|
|
1522
|
+
});
|
|
1523
|
+
const bundleHttpContracts = [...["/bundle-manifest.json", "/api/web-plugins/{id}/{revision}/manifest"].flatMap((path) => ["GET", "HEAD"].map((method) => ({
|
|
1524
|
+
id: `bundle.${path}.${method}`,
|
|
1525
|
+
scope: "host",
|
|
1526
|
+
path,
|
|
1527
|
+
method,
|
|
1528
|
+
authentication: "owner",
|
|
1529
|
+
availability: "Host publishes a web bundle",
|
|
1530
|
+
description: "Read an immutable signed browser bundle manifest.",
|
|
1531
|
+
responses: method === "HEAD" ? {
|
|
1532
|
+
"200": { description: "Manifest response headers" },
|
|
1533
|
+
"404": { description: "Bundle not published" }
|
|
1534
|
+
} : jsonApiResponses(Signed)
|
|
1535
|
+
}))), ...["/bundle-assets/{revision}/{assetPath}", "/api/web-plugins/{id}/{revision}/assets/{assetPath}"].flatMap((path) => ["GET", "HEAD"].map((method) => ({
|
|
1536
|
+
id: `asset.${path}.${method}`,
|
|
1537
|
+
scope: "host",
|
|
1538
|
+
path,
|
|
1539
|
+
method,
|
|
1540
|
+
authentication: "owner",
|
|
1541
|
+
availability: "Host publishes a web bundle",
|
|
1542
|
+
description: "Read an asset from the signed manifest. assetPath may contain multiple path segments.",
|
|
1543
|
+
responses: {
|
|
1544
|
+
"200": {
|
|
1545
|
+
description: "Manifest-listed asset, original MIME type",
|
|
1546
|
+
...method === "GET" ? {
|
|
1547
|
+
contentType: "*/*",
|
|
1548
|
+
schema: String({ contentEncoding: "binary" })
|
|
1549
|
+
} : {}
|
|
1550
|
+
},
|
|
1551
|
+
"404": { description: "Asset not published" }
|
|
1552
|
+
}
|
|
1553
|
+
})))];
|
|
1554
|
+
const Json = Unknown({ description: "JSON value; its application shape is defined by the addressed contract member." });
|
|
1555
|
+
const WireError = _Object_({
|
|
1556
|
+
code: String(),
|
|
1557
|
+
message: String(),
|
|
1558
|
+
reason: Optional$3(String())
|
|
1559
|
+
});
|
|
1560
|
+
const ProtocolMessage = _Array_(Unknown(), { description: `A Chord 1.5 link message: one JSON array per text message. Its format is Chord's.` });
|
|
1561
|
+
const transportSocketContracts = [
|
|
1562
|
+
{
|
|
1563
|
+
id: "chord.client",
|
|
1564
|
+
scope: "host",
|
|
1565
|
+
service: "$chord",
|
|
1566
|
+
member: "client",
|
|
1567
|
+
direction: "client-to-server",
|
|
1568
|
+
kind: "channel",
|
|
1569
|
+
input: ProtocolMessage,
|
|
1570
|
+
description: "Protocol message from a client, sealed for remote delivery. Hold `po.hub` ({}) and `po.session` ({ sessionId }) through the Po protocol client."
|
|
1571
|
+
},
|
|
1572
|
+
{
|
|
1573
|
+
id: "chord.server",
|
|
1574
|
+
scope: "host",
|
|
1575
|
+
service: "$chord",
|
|
1576
|
+
member: "server",
|
|
1577
|
+
direction: "server-to-client",
|
|
1578
|
+
kind: "channel",
|
|
1579
|
+
input: ProtocolMessage,
|
|
1580
|
+
description: "Protocol message from the server."
|
|
1581
|
+
},
|
|
1582
|
+
{
|
|
1583
|
+
id: "plugin.invoke",
|
|
1584
|
+
scope: "host",
|
|
1585
|
+
service: "po.hub",
|
|
1586
|
+
member: "invoke",
|
|
1587
|
+
direction: "client-to-server",
|
|
1588
|
+
kind: "method",
|
|
1589
|
+
input: PoPluginWireCallSchema,
|
|
1590
|
+
output: Json,
|
|
1591
|
+
errors: WireError,
|
|
1592
|
+
description: "Invoke the selected scoped plugin method. Its declaration supplies input and output shapes."
|
|
1593
|
+
}
|
|
1594
|
+
];
|
|
1595
|
+
[
|
|
1596
|
+
...headlessHttpContracts,
|
|
1597
|
+
...machineHttpContracts,
|
|
1598
|
+
...sessionHttpContracts,
|
|
1599
|
+
...remoteHttpContracts,
|
|
1600
|
+
...bundleHttpContracts
|
|
1601
|
+
], [...sessionSocketContracts, ...transportSocketContracts];
|
|
1602
|
+
//#endregion
|
|
1603
|
+
export { PoHubContract as a, PoChannelsContract as c, PoThreadContract as i, SessionMethodSchemas as n, PoHubRevisionsContract as o, SessionServiceStateSchema as r, jsonApiResponses as s, defineApiContract as t };
|