@agimon-ai/po-cloudflare 0.0.2-alpha.80 → 0.0.2-alpha.82
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/dist/{agent-CEqvgRl6.js → agent-DS0i8PXh.js} +1 -1
- package/dist/{calendarSetup-Do-hM0Li.js → agentSettled-x-o79BQN.js} +290 -44
- package/dist/{apiContracts-DaOpUHnu.js → apiContracts-E-JjWqhB.js} +16 -5
- package/dist/{approval-DRipNxVh.js → approval-R0GK965c.js} +33 -9
- package/dist/{approvalPrompt-w2k884MA.js → approvalPrompt-Dzcca937.js} +8 -1
- package/dist/{approvalSession-DPQQRkG4.js → approvalSession-BurJIcni.js} +5 -3
- package/dist/{index.edge-CzoLWbyl.js → artifactAdmin-Cg84GFlr.js} +69 -6
- package/dist/artifactFiles-Ckv0_GBz.js +1 -0
- package/dist/{artifactsApi-bg2wMYWg.js → artifactsApi-nSekqLgD.js} +11 -9
- package/dist/assets/assets/{CodeEditorView-CwDhkcuX.js → CodeEditorView-CQ3u7vBO.js} +2 -2
- package/dist/assets/assets/{abnfDiagram-WEYOIA3C-x7ICShZ-.js → abnfDiagram-WEYOIA3C-F2q7cMG7.js} +2 -2
- package/dist/assets/assets/{architecture-WOLXFQ4H-BbNcuwIa.js → architecture-WOLXFQ4H-Dtvqq3Hz.js} +1 -1
- package/dist/assets/assets/{architectureDiagram-ZHVYKT53-BaKFNXDN.js → architectureDiagram-ZHVYKT53-CFoFlRTz.js} +2 -2
- package/dist/assets/assets/{blockDiagram-RJAE7QA3-BpBDuUhc.js → blockDiagram-RJAE7QA3-HDY24oWv.js} +2 -2
- package/dist/assets/assets/{c4Diagram-XDPPPE54-CH1AYBxk.js → c4Diagram-XDPPPE54-Dv9teFOJ.js} +2 -2
- package/dist/assets/assets/channel-CDQwyg-b.js +2 -0
- package/dist/assets/assets/{chunk-2E7WHVMD-zuvalEA0.js → chunk-2E7WHVMD-Djbigpg2.js} +2 -2
- package/dist/assets/assets/{chunk-4EMNKR2T-Y1aujIa_.js → chunk-4EMNKR2T-D9OT4Gh9.js} +2 -2
- package/dist/assets/assets/{chunk-55XCU76K-Cj_usw4a.js → chunk-55XCU76K-SN5amfVP.js} +2 -2
- package/dist/assets/assets/{chunk-7S6XSTFO-CNv4j2oa.js → chunk-7S6XSTFO-CSB7_HJO.js} +2 -2
- package/dist/assets/assets/{chunk-AQDTSKZB-BgiafkbC.js → chunk-AQDTSKZB-BJ_Tmuk0.js} +2 -2
- package/dist/assets/assets/{chunk-DSNLSHJZ-CEqk3yOv.js → chunk-DSNLSHJZ-DbuZHBNJ.js} +2 -2
- package/dist/assets/assets/{chunk-HAGFOTED-w6XwPptZ.js → chunk-HAGFOTED-ClN8chEY.js} +2 -2
- package/dist/assets/assets/{chunk-HNE4Q36P-Du2F5NKF.js → chunk-HNE4Q36P-CWxkZxFi.js} +2 -2
- package/dist/assets/assets/{chunk-NQOKRVIF-e7LK2NBD.js → chunk-NQOKRVIF-DmiN8SUM.js} +2 -2
- package/dist/assets/assets/{chunk-UHW7PFBP-CV1yEqMO.js → chunk-UHW7PFBP-BxqeD9WW.js} +2 -2
- package/dist/assets/assets/{chunk-VQ5W62QI-Dz5nQ93K.js → chunk-VQ5W62QI-B-m-wWy2.js} +2 -2
- package/dist/assets/assets/{chunk-WQQL4CDK-CR_tliyN.js → chunk-WQQL4CDK-CBahXHA1.js} +2 -2
- package/dist/assets/assets/chunk-XXDRQBXY-By6IF_XB.js +2 -0
- package/dist/assets/assets/{chunk-YZO67HFG-DFykz1uM.js → chunk-YZO67HFG-C63Io2zO.js} +2 -2
- package/dist/assets/assets/{chunk-ZAUX2LTX-C-HZEj8t.js → chunk-ZAUX2LTX-BTlOTizy.js} +2 -2
- package/dist/assets/assets/{chunk-ZCHMQSOR-DhOusRJf.js → chunk-ZCHMQSOR-CrcSonot.js} +2 -2
- package/dist/assets/assets/{classDiagram-v2-4MYWR3UA-CODBKWcv.js → classDiagram-v2-4MYWR3UA-BBFMpndV.js} +2 -2
- package/dist/assets/assets/{cose-bilkent-JH36ORCC-CQBDxRkG.js → cose-bilkent-JH36ORCC-SLyD0CmZ.js} +2 -2
- package/dist/assets/assets/{cynefin-EF2NZ3EQ-BqEZr_DI.js → cynefin-EF2NZ3EQ-CwQTDn0O.js} +1 -1
- package/dist/assets/assets/{cynefinDiagram-WF24UDRP-CAFtVFnZ.js → cynefinDiagram-WF24UDRP-Cw6Z17bo.js} +2 -2
- package/dist/assets/assets/{dagre-NK4GIZVX-6EbIcHjw.js → dagre-NK4GIZVX-Bu85_eeE.js} +2 -2
- package/dist/assets/assets/{diagram-CBK3MWTC-DxOPl4wX.js → diagram-CBK3MWTC-BG9L4Dge.js} +2 -2
- package/dist/assets/assets/{diagram-I5XIIV2D-Dn-nrQn0.js → diagram-I5XIIV2D-DActSHXO.js} +2 -2
- package/dist/assets/assets/{diagram-ODIL2UCW-Df9GeJiZ.js → diagram-ODIL2UCW-BlJrXr4g.js} +2 -2
- package/dist/assets/assets/{diagram-PFBEJUXE-CzsqYRcB.js → diagram-PFBEJUXE-B6g871_a.js} +2 -2
- package/dist/assets/assets/{diagram-RJA3I4VV-Chxf9kLz.js → diagram-RJA3I4VV-BZrDzE-J.js} +2 -2
- package/dist/assets/assets/{diagram-TYUNFSNR-DsSL0naA.js → diagram-TYUNFSNR-Dfp9seoG.js} +2 -2
- package/dist/assets/assets/{dist-CNPkFbM6.js → dist-BFyYG14u.js} +2 -2
- package/dist/assets/assets/{dist-DHBIyPPx.js → dist-Bq4cAvXz.js} +2 -2
- package/dist/assets/assets/{dist-1eIdTf5S.js → dist-BuVQ0aTU.js} +2 -2
- package/dist/assets/assets/{dist-Dul31jTx.js → dist-CmB96MGF.js} +2 -2
- package/dist/assets/assets/{dist-zUhlfRuY.js → dist-D6g0m6gf.js} +2 -2
- package/dist/assets/assets/{dist-dedZfm22.js → dist-DU1IDN1T.js} +2 -2
- package/dist/assets/assets/{dist-DR6uuD7b.js → dist-DYRWsGDE.js} +2 -2
- package/dist/assets/assets/{dist-C-zBeZYG.js → dist-DbHLmzPV.js} +2 -2
- package/dist/assets/assets/{dist-B7Fq62ue.js → dist-cZXmi2fY.js} +2 -2
- package/dist/assets/assets/{ebnfDiagram-V4P3TTPT-fUIcNhqL.js → ebnfDiagram-V4P3TTPT-B4zBncic.js} +2 -2
- package/dist/assets/assets/{elk-QONTBCTQ-BtFtt9dx.js → elk-QONTBCTQ-DlJD_acW.js} +2 -2
- package/dist/assets/assets/{erDiagram-KYQIGQAA-8nTQgw_u.js → erDiagram-KYQIGQAA-DIMl_K97.js} +2 -2
- package/dist/assets/assets/{eventmodeling-K75KTNOO-u--ksfW0.js → eventmodeling-K75KTNOO-C6HGWsLk.js} +1 -1
- package/dist/assets/assets/flowDiagram-IUGLLWBU-BgHUmctO.js +1 -0
- package/dist/assets/assets/{ganttDiagram-R7GPNTJY-CWqNS4bm.js → ganttDiagram-R7GPNTJY-glY2FbAv.js} +2 -2
- package/dist/assets/assets/{gitGraph-VSP46ZUC-Dy9xUPnQ.js → gitGraph-VSP46ZUC-DycozZvO.js} +1 -1
- package/dist/assets/assets/{gitGraphDiagram-PDYL7XHY-D9OwLXxL.js → gitGraphDiagram-PDYL7XHY-DtjAxwqf.js} +2 -2
- package/dist/assets/assets/index-C3VX1g4Q.css +1 -0
- package/dist/assets/assets/{index-Blt5rLZT.js → index-m7WV8mWL.js} +97 -97
- package/dist/assets/assets/{info-OHQRW6UA-ByFo5VxO.js → info-OHQRW6UA-KbleHR6s.js} +1 -1
- package/dist/assets/assets/{infoDiagram-MVDRKAX5-DkV7tUak.js → infoDiagram-MVDRKAX5-MwftGQEw.js} +2 -2
- package/dist/assets/assets/{ishikawaDiagram-HPEHV2GE-D62xVlJr.js → ishikawaDiagram-HPEHV2GE-YWl2g3iO.js} +2 -2
- package/dist/assets/assets/{journeyDiagram-BOSHW7O7-CmGrCQyD.js → journeyDiagram-BOSHW7O7-Ph3vr4yk.js} +2 -2
- package/dist/assets/assets/{kanban-definition-FNSA4HC5-CQ-96zcl.js → kanban-definition-FNSA4HC5-D8LoRgmD.js} +2 -2
- package/dist/assets/assets/{line-LyW2S8xe.js → line-sp3YMa7M.js} +2 -2
- package/dist/assets/assets/{linear-Df5iFoGG.js → linear-BsDq19qa.js} +2 -2
- package/dist/assets/assets/{mermaid-parser.core-DwGEOVKN.js → mermaid-parser.core-DhaHqZqo.js} +4 -4
- package/dist/assets/assets/{mermaid.core-UZa2JDq1.js → mermaid.core-k465ii4v.js} +5 -5
- package/dist/assets/assets/{mindmap-definition-6OY57UG3-DXZpBkD7.js → mindmap-definition-6OY57UG3-CQYv2SKh.js} +2 -2
- package/dist/assets/assets/{packet-JDAUHWVQ-DVu5opyp.js → packet-JDAUHWVQ-DcE81wUL.js} +1 -1
- package/dist/assets/assets/{pegDiagram-ECIUJNBX-D2PGrJQR.js → pegDiagram-ECIUJNBX-ByQIbBVa.js} +2 -2
- package/dist/assets/assets/{pie-XZMESJXO-CoJXcSM1.js → pie-XZMESJXO-2QYN4ea7.js} +1 -1
- package/dist/assets/assets/{pieDiagram-GNMPY74T-DlPni3lE.js → pieDiagram-GNMPY74T-BuKvXxYn.js} +2 -2
- package/dist/assets/assets/{quadrantDiagram-D57K4MC3-tDWbeX9Y.js → quadrantDiagram-D57K4MC3-D6Lzu4kr.js} +2 -2
- package/dist/assets/assets/{radar-ABXABTNO-CiE-yXqS.js → radar-ABXABTNO-CKkT8Ndr.js} +1 -1
- package/dist/assets/assets/{railroad-I3PHUGI6-Bt5352hi.js → railroad-I3PHUGI6-De44wOlG.js} +1 -1
- package/dist/assets/assets/{railroad-abnf-LNEFI6M7-BJH5rnqj.js → railroad-abnf-LNEFI6M7-BEnW5esF.js} +1 -1
- package/dist/assets/assets/{railroad-ebnf-DWYD2UWJ-C0KftBWL.js → railroad-ebnf-DWYD2UWJ-DItRvWjl.js} +1 -1
- package/dist/assets/assets/{railroad-peg-JR7BVNR7-CRa7U91X.js → railroad-peg-JR7BVNR7-CPAG91sb.js} +1 -1
- package/dist/assets/assets/{railroadDiagram-Y72NRBL7-fOs3RTR8.js → railroadDiagram-Y72NRBL7-9GisgZq6.js} +2 -2
- package/dist/assets/assets/{requirementDiagram-EQYSW5RA-SvE7rYXk.js → requirementDiagram-EQYSW5RA-DnWzG5ga.js} +2 -2
- package/dist/assets/assets/{sankeyDiagram-SY24JHO5-nqR9ZUs4.js → sankeyDiagram-SY24JHO5-CFd_qawE.js} +2 -2
- package/dist/assets/assets/{sequenceDiagram-BLEHNHQU-CgEFMQSq.js → sequenceDiagram-BLEHNHQU-DQywVpdE.js} +2 -2
- package/dist/assets/assets/{src-B4g3Iold.js → src-BUv6JK5h.js} +2 -2
- package/dist/assets/assets/{stateDiagram-v2-A6IESKWZ-C2jH_xDT.js → stateDiagram-v2-A6IESKWZ-B5wye6p1.js} +2 -2
- package/dist/assets/assets/{swimlanes-B3ENRKFQ-Dbf1mXvK.js → swimlanes-B3ENRKFQ-BGeARVfu.js} +2 -2
- package/dist/assets/assets/swimlanesDiagram-AYQRV4AK-B1hD_kbj.js +9 -0
- package/dist/assets/assets/{timeline-definition-JXYKGLGB-4u-pC3xz.js → timeline-definition-JXYKGLGB-BkMlI9Lb.js} +2 -2
- package/dist/assets/assets/{treeView-D4JQ5SDB-CZmVi5-J.js → treeView-D4JQ5SDB-DerCyWuj.js} +1 -1
- package/dist/assets/assets/{treemap-SAJKECNS-BajhrENS.js → treemap-SAJKECNS-BLZMrXJJ.js} +1 -1
- package/dist/assets/assets/{usecaseDiagram-WPOLBNNX-J1gh4d5h.js → usecaseDiagram-WPOLBNNX-CJUAnSv3.js} +2 -2
- package/dist/assets/assets/{vennDiagram-Q3Y3IDCW-CIRtS6C5.js → vennDiagram-Q3Y3IDCW-De_yvSc7.js} +2 -2
- package/dist/assets/assets/{wardley-7MLQ67FV-DjBwbtAb.js → wardley-7MLQ67FV-DGIkCm2d.js} +1 -1
- package/dist/assets/assets/{wardleyDiagram-IVAIDKWA-Cui7ZUN1.js → wardleyDiagram-IVAIDKWA-BYhA7C3P.js} +2 -2
- package/dist/assets/assets/{webpack-FJjN4adW.js → webpack-BGPuCdEi.js} +2 -2
- package/dist/assets/assets/{xychartDiagram-4URNHDU4-I-UzMoDZ.js → xychartDiagram-4URNHDU4-TyRTs3WK.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-B7r0keY3.css +2 -0
- package/dist/assets/plugins/chunks/po-web-runtime-C-6-Rprr.js +1 -0
- package/dist/assets/plugins/compositions.json +1 -1
- package/dist/assets/plugins/slots/approval.3e4ea6e4-DVnx43-k.js +3 -0
- package/dist/assets/plugins/slots/artifacts.84980c32-Dsj1OtVT.js +1 -0
- package/dist/assets/plugins/slots/author.8eca1a3d-Cr8yccCT.js +93 -0
- package/dist/assets/plugins/slots/{autocompact.9a92993d-DxTuE9o-.js → autocompact.ec8f713f-BrCbK4Kx.js} +1 -1
- package/dist/assets/plugins/slots/{backdrop-bamboo.efdd4d7c-BfruoASs.js → backdrop-bamboo.1a4d85e9-DLm0Q3vw.js} +1 -1
- package/dist/assets/plugins/slots/browse.61a8907a-BRfvw2p6.js +1 -0
- package/dist/assets/plugins/slots/builtin-tools.16ef5e25-DrI7xiqJ.js +7 -0
- package/dist/assets/plugins/slots/calendar.d337fc49-utcYs8bS.js +2 -0
- package/dist/assets/plugins/slots/codemode.5f359b9c-0oBfWJnw.js +11 -0
- package/dist/assets/plugins/slots/domain.832848c8-DJyv7MCr.js +1 -0
- package/dist/assets/plugins/slots/edit.7c802139-D8UcbK41.js +7 -0
- package/dist/assets/plugins/slots/files.364f16c9-D3XLkVWH.js +2 -0
- package/dist/assets/plugins/slots/goal.a97b169d-DlmoFhc5.js +1 -0
- package/dist/assets/plugins/slots/grep.d8bf9f57-BwX6MyWZ.js +1 -0
- package/dist/assets/plugins/slots/help.5c78c071-ByXu3edO.js +3 -0
- package/dist/assets/plugins/slots/log.07fd59a4-BoK7Agu-.js +4 -0
- package/dist/assets/plugins/slots/mcp.ea8b6aa2-BmAcosBX.js +55 -0
- package/dist/assets/plugins/slots/plan.7b30f8d8-Dj3B4EP3.js +3 -0
- package/dist/assets/plugins/slots/profile.63bc3ae6-Ddem7X8p.js +17 -0
- package/dist/assets/plugins/slots/prompts.9d9b47cc-Du_RKitn.js +38 -0
- package/dist/assets/plugins/slots/read.926c024f-Dtn8BnHZ.js +1 -0
- package/dist/assets/plugins/slots/runner.5393fa6c-Bo18TpTv.js +9 -0
- package/dist/assets/plugins/slots/scaffold.686222eb-CsZM392r.js +1 -0
- package/dist/assets/plugins/slots/session-mcp.8eb68fc9-Q3kt8mfN.js +2 -0
- package/dist/assets/plugins/slots/sessions.8e378a3b-CvfpOhKv.js +1 -0
- package/dist/assets/plugins/slots/skill.56c1cc07-xpM93FVb.js +4 -0
- package/dist/assets/plugins/slots/space.056e8bbc-C9fElry9.js +1 -0
- package/dist/assets/plugins/slots/subagents.31fc045b-DFX-yRuh.js +7 -0
- package/dist/assets/plugins/slots/template-advanced.9e8350fe-CBtnuZFl.js +1 -0
- package/dist/assets/plugins/slots/template-desktop.69a46f62-BnCY2bMo.js +7 -0
- package/dist/assets/plugins/slots/template-elegant.381f6acb-Do-6RsF_.js +1 -0
- package/dist/assets/plugins/slots/vault.587549ba-CkM08O8Q.js +1 -0
- package/dist/assets/plugins/slots/voice.9c687181-D-rAfc09.js +1 -0
- package/dist/assets/plugins/slots/web-search.f6292793-Cfmby7gg.js +1 -0
- package/dist/assets/plugins/slots/workflows.8a13baad-YR_QeyYe.js +17 -0
- package/dist/assets/pwa/sw.js +1 -1
- package/dist/{atomicJson-XYtxz032.js → atomicJson-DD5U5tjQ.js} +2 -2
- package/dist/{backgroundWork-Bv0ib_lY.js → backgroundWork-BBHkedFE.js} +1 -1
- package/dist/{childProcess-Cv8rJuUf.js → childProcess-_K0eEVap.js} +1 -1
- package/dist/{codemode-LpcMFMYM.js → codemode-D0N0nnAW.js} +1 -1
- package/dist/{contracts-WRa9e98H.js → contracts-CDZL6Oxi.js} +1 -1
- package/dist/{contracts-CW8o6Xyi.js → contracts-Dug1eXOZ.js} +1 -1
- package/dist/{cordisHost-_-jtkneB.js → cordisHost-BuVg1RmQ.js} +1 -1
- package/dist/{delegation-B2rBgv8A.js → delegation-Cx9cFQWQ.js} +1 -1
- package/dist/{exports-CRjRvvX0.js → exports-BAOR4mxs.js} +2 -2
- package/dist/exports-BgVdXxEv.js +1 -0
- package/dist/{exports-BnHiOfC6.js → exports-DFvm018C.js} +2 -2
- package/dist/{exports-t_BpzyPr.js → exports-_jolwyKx.js} +9 -9
- package/dist/{exports-BEEgtkya.js → exports-mbRsjI7B.js} +21 -29
- package/dist/{extensionFile-B940JOEn.js → extensionFile-CYT5OGC3.js} +1 -1
- package/dist/{harnessState-Df--jB5z.js → harnessState-BDVwwP_X.js} +3 -3
- package/dist/{harnessStore-DInwiLYb.js → harnessStore-CuH4R3lM.js} +4 -4
- package/dist/{help-C9UGKetC.js → help-DeJ6qHec.js} +1 -1
- package/dist/{http-BekstF5S.js → http-C_eQIrFr.js} +1 -1
- package/dist/hubChannel-DCtuNjLW.js +59 -0
- package/dist/{hubRevisions-BPoC6quI.js → hubRevisions-D34aServ.js} +1 -1
- package/dist/{index.edge-Czo_i2Mz.js → index.edge-Bgstsmj4.js} +6 -3
- package/dist/{index.edge-CSGx6QOL.js → index.edge-q9_rsJ__.js} +1 -1
- package/dist/{config-DeWkdjj7.js → layeredConfig-D0LKjKAB.js} +68 -52
- package/dist/{mcpProjection-D2U50Pel.js → mcpProjection-D4hUK9Ip.js} +1 -1
- package/dist/{notification-DjxbNoMR.js → notification-70P3QXp_.js} +1 -1
- package/dist/{packageApi-DYkaxP59.js → packageApi-C0ZZekoc.js} +1 -1
- package/dist/{piConfig-5tRPD0ov.js → piConfig-ByJz4nz4.js} +4 -4
- package/dist/piSettings-9GtxPU4u.js +1 -0
- package/dist/{platform-CQahdzpG.js → platform-D-bT8M_0.js} +1 -1
- package/dist/{pluginProtocol-DVIfJnav.js → pluginProtocol-CzYwk73s.js} +1 -1
- package/dist/pluginProtocol-bqyjtLgJ.js +1 -0
- package/dist/{presetConfig-n-oiNd3h.js → presetConfig-CmSIhJqZ.js} +3 -3
- package/dist/{profileSources-DIlA86Qk.js → profileSources-C7MOMfYl.js} +258 -9
- package/dist/{protocol-Cri0GpZR.js → protocol-CKiJ5fEX.js} +1 -1
- package/dist/{scaffoldRegistry-CeFe3Pf0.js → scaffoldRegistry-9cs3prfq.js} +31 -16
- package/dist/{server-w1aKMZOs.js → server-8za7Nb_p.js} +2 -2
- package/dist/{server-CKqkuTSm.js → server-9hiMtawJ.js} +9 -9
- package/dist/{server-CiM-dyLH.js → server-B5on6oMh.js} +7 -7
- package/dist/{server-B2msL78V.js → server-B7hEH6Bn.js} +5 -5
- package/dist/{server-C8SNy7A6.js → server-BMrkJLaC.js} +13 -13
- package/dist/{server-DvRXHi7q.js → server-BOIzgsA2.js} +4 -4
- package/dist/{server-DeFqeFTs.js → server-BQNOdN4z.js} +6 -6
- package/dist/{server-CdHXMn8M.js → server-Bcm3eZxE.js} +9 -9
- package/dist/{server-CjEcEzje.js → server-Bgd2oVb6.js} +9 -9
- package/dist/{server-DNpneoqA.js → server-BwD8o-EO.js} +9 -9
- package/dist/{server-BvPsFac8.js → server-C8aDsNTj.js} +862 -67
- package/dist/{server-lgV6liTt.js → server-C9S9if7K.js} +8 -8
- package/dist/{server-CZiAy2v5.js → server-CEXhVRwt.js} +7 -7
- package/dist/{server-CQPI6jIa.js → server-CGyF3Y2t.js} +3 -3
- package/dist/{server-DOPoxdoF.js → server-CI6X_2wz.js} +4 -4
- package/dist/{server-CUaCaV-5.js → server-CJGDHHB_.js} +10 -10
- package/dist/{server-CKkaxOc0.js → server-CMH-axK1.js} +3 -3
- package/dist/{server-DLZgrjI9.js → server-CNADKStl.js} +30 -11
- package/dist/{server-ZfDBIxDP.js → server-C_G6DiLi.js} +1598 -1460
- package/dist/{server-C8l2XDc-.js → server-CaKd7KI4.js} +6 -6
- package/dist/{server-Ymxeujb2.js → server-CcRQ07uK.js} +6 -6
- package/dist/{server-CmQ4EDYS.js → server-Cfv9E3kP.js} +235 -90
- package/dist/{server-BZ-ANwb3.js → server-CkiIuLJT.js} +84 -29
- package/dist/{server-DgZd_TuT.js → server-CmW0--Nv.js} +4 -4
- package/dist/{server-ClQQGtsI.js → server-Cpgz_PWe.js} +3 -3
- package/dist/{server-Df1defzp.js → server-CsScoQcp.js} +4 -4
- package/dist/{server-Db5yBIIm.js → server-Cya1oX8g.js} +8 -8
- package/dist/{server-C8NPfG1H.js → server-DGxxn0_W.js} +5 -5
- package/dist/{server-D53RoZqs.js → server-DNnOGiWu.js} +13 -13
- package/dist/{server-W4WyT1G3.js → server-DOg9HktT.js} +57 -19
- package/dist/{server-BgtHCRuW.js → server-DnpDnKeN.js} +9 -9
- package/dist/{server-DlRePYOB.js → server-DqtE9UlZ.js} +3 -3
- package/dist/{server-2xgrdxY_.js → server-Dt6jd3eW.js} +7 -7
- package/dist/{server-CQFk8yQ9.js → server-DzFfQW9J.js} +7 -7
- package/dist/{server-Da6OzFOK.js → server-EUBGjr2o.js} +12 -12
- package/dist/server-W5GnSLDX.js +2678 -0
- package/dist/{server-DvrIMeQM.js → server-ZuvMcTZv.js} +62 -31
- package/dist/{server-6eF0lcbz.js → server-ygy20-5J.js} +4 -4
- package/dist/{serverPlugin-4nI5J6Zt.js → serverPlugin-CJtFKP76.js} +18 -2
- package/dist/{sessionConfig-BYow7MOB.js → sessionConfig-BHoE7hiv.js} +552 -278
- package/dist/{space-C3Wnli1l.js → space-WVNdNN7e.js} +5 -5
- package/dist/{type-1FxIJmfz.js → type-LEm-Przh.js} +7 -7
- package/dist/{validation-QWuk6kwJ.js → validation-Dk6zmByY.js} +2 -2
- package/dist/{vaultSettings-Bq8wkbDv.js → vaultSettings-BbdfJtLT.js} +1 -1
- package/dist/{voiceTools-BdJyfzwB.js → voiceTools-Ck1vJ-qp.js} +1 -1
- package/dist/web-Dpk-XW_b.js +4 -0
- package/dist/worker.js +1361 -742
- package/dist/{workflow-DTCt4n6k.js → workflow-BQHVtsyG.js} +3 -2
- package/dist/{workflowServices-RlswfHWp.js → workflowServices-Ce6xW4RP.js} +2 -2
- package/package.json +49 -49
- package/dist/artifactFiles-5KwXIxYf.js +0 -1
- package/dist/assets/assets/channel-DUu4-rZu.js +0 -2
- package/dist/assets/assets/chunk-XXDRQBXY-KxRgluI2.js +0 -2
- package/dist/assets/assets/flowDiagram-IUGLLWBU-U-4ltU4o.js +0 -1
- package/dist/assets/assets/index-CNDyKUDF.css +0 -1
- package/dist/assets/assets/swimlanesDiagram-AYQRV4AK-Bc5KGsMc.js +0 -9
- package/dist/assets/plugins/assets/base-GzIOAd-t.css +0 -2
- package/dist/assets/plugins/chunks/po-web-runtime-C0B3uAoC.js +0 -1
- package/dist/assets/plugins/slots/approval.8b3f37d9-gfcirIrD.js +0 -2
- package/dist/assets/plugins/slots/artifacts.47d00f81-B5YmdqFC.js +0 -1
- package/dist/assets/plugins/slots/author.1a07727d-C7QUSti1.js +0 -93
- package/dist/assets/plugins/slots/browse.131d479c-LwBuFuNb.js +0 -1
- package/dist/assets/plugins/slots/builtin-tools.939bbfff-Cy2eN76-.js +0 -7
- package/dist/assets/plugins/slots/calendar.a920088e-CihobxD6.js +0 -2
- package/dist/assets/plugins/slots/codemode.782e5bb1-Dbjm7Efq.js +0 -11
- package/dist/assets/plugins/slots/domain.21790b66-CJa-EzBA.js +0 -1
- package/dist/assets/plugins/slots/edit.c7c85129-Bp0bQ3N2.js +0 -7
- package/dist/assets/plugins/slots/files.bbcef824-re8nr2oz.js +0 -2
- package/dist/assets/plugins/slots/goal.95aff482-C5mGe79a.js +0 -1
- package/dist/assets/plugins/slots/grep.3dfd3214-ClgsMgtm.js +0 -1
- package/dist/assets/plugins/slots/help.c7b368c8-BGywkUKZ.js +0 -3
- package/dist/assets/plugins/slots/log.33bc7d38-6jMYUtlN.js +0 -4
- package/dist/assets/plugins/slots/mcp.59c68bcb-BnDP_LDU.js +0 -55
- package/dist/assets/plugins/slots/plan.905fb054-BXxVUfMI.js +0 -3
- package/dist/assets/plugins/slots/profile.ea55f5e1-Bc4Rwfhz.js +0 -1
- package/dist/assets/plugins/slots/prompts.9957cc84-CIBsOkp9.js +0 -38
- package/dist/assets/plugins/slots/read.30a617e7-D-NY0ZCv.js +0 -1
- package/dist/assets/plugins/slots/runner.9f3559b0-CCUVliK7.js +0 -9
- package/dist/assets/plugins/slots/scaffold.6ee623c2-DW44NU9X.js +0 -1
- package/dist/assets/plugins/slots/session-mcp.d2f3e9eb-Im-iuHcn.js +0 -2
- package/dist/assets/plugins/slots/sessions.d6812dc8-CL0PHuD4.js +0 -1
- package/dist/assets/plugins/slots/skill.f506a5ea-DHDfhNXW.js +0 -4
- package/dist/assets/plugins/slots/space.1260a175-DFHblvL5.js +0 -1
- package/dist/assets/plugins/slots/subagents.d796413d-Db6YnHJd.js +0 -7
- package/dist/assets/plugins/slots/template-advanced.50a12814-DyvcGxNV.js +0 -1
- package/dist/assets/plugins/slots/template-desktop.323fb323-5EQH-r7P.js +0 -7
- package/dist/assets/plugins/slots/template-elegant.2d9ffb73-CrmEUE6V.js +0 -1
- package/dist/assets/plugins/slots/vault.01657352-9cm8PfeP.js +0 -1
- package/dist/assets/plugins/slots/voice.31d76794-BSC2gHHY.js +0 -1
- package/dist/assets/plugins/slots/web-search.6f84bd6e-BMe5RM8K.js +0 -1
- package/dist/assets/plugins/slots/workflows.1350c068-CzFPuLnU.js +0 -16
- package/dist/exports-Cg0wxflf.js +0 -1
- package/dist/hubChannel-Dldv3EEb.js +0 -32
- package/dist/piSettings-ekBG5OeF.js +0 -1
- package/dist/pluginProtocol-7_gVUeM9.js +0 -1
- package/dist/server-oQcAzLYj.js +0 -1379
- package/dist/web-CLiZJpHK.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as track, A as materializeDocument, D as defineDoc, E as checkRecordVersion, K as Watch, M as resolveAddress, N as idFromNumber, St as withoutAbortSignal, T as checkRecordScope, Z as PendingOps, et as copyJson, j as materializeDocumentValue, k as documentCreate, vt as BACKGROUND_CONTEXT, w as addressId, yt as awaitWithContext } from "./serverPlugin-CJtFKP76.js";
|
|
2
2
|
//#region ../../../node_modules/.pnpm/@earendil-works+pi-durable@1.5.2_patch_hash=0f5e595daa4c370af407284d99d6dba48a9e21f56aa_abe77735ae11ff0752ddae934766aeb6/node_modules/@earendil-works/pi-durable/dist/errors.js
|
|
3
3
|
/**
|
|
4
4
|
* The message of a thrown value, without throwing itself: `String()` throws for values such as `Object.create(null)`,
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { $t as
|
|
2
|
-
import { u as poApiCallerFrom } from "./packageApi-
|
|
3
|
-
import {
|
|
4
|
-
import "./profileSources-
|
|
1
|
+
import { $t as Literal, Gt as Partial, H as Check, Kt as Omit, Qt as Null, Xt as String$1, Yt as Union, Zt as Number$1, an as _Object_, en as Integer, in as Unknown, ln as defineServiceContract, on as Optional, qt as Record, sn as _Array_, tn as Boolean$1 } from "./serverPlugin-CJtFKP76.js";
|
|
2
|
+
import { u as poApiCallerFrom } from "./packageApi-C0ZZekoc.js";
|
|
3
|
+
import { f as PoWorkflowRunRefSchema, l as PoWorkflowDefinitionRefSchema } from "./workflow-BQHVtsyG.js";
|
|
4
|
+
import "./profileSources-C7MOMfYl.js";
|
|
5
5
|
//#region ../../../layers/automation/po-calendar/src/constants/calendar.ts
|
|
6
6
|
/** Pending start deadline, not a running-job timeout. */
|
|
7
7
|
const DEFAULT_CALENDAR_PENDING_EXPIRY_MS = 36e5;
|
|
8
8
|
const MAX_INTERVAL_SECONDS = 3600;
|
|
9
|
+
const MAX_RANDOM_DELAY_SECONDS = 3600;
|
|
9
10
|
const MAX_CALENDAR_PROMPT_LENGTH = 32768;
|
|
10
11
|
/** Longest action summary Calendar keeps on an occurrence. */
|
|
11
12
|
const MAX_CALENDAR_SUMMARY_LENGTH = 2048;
|
|
12
13
|
/** Wall-clock time an agent may give for a one-off event, read in the schedule's zone: `2026-05-01T09:00`. */
|
|
13
14
|
const CALENDAR_LOCAL_TIME_PATTERN = "^(\\d{4}-\\d{2}-\\d{2})T(\\d{2}:\\d{2})(?::(\\d{2}))?$";
|
|
15
|
+
const CALENDAR_NOTICES_SCHEMA_SQL = "CREATE TABLE IF NOT EXISTS calendar_notices (occurrence_id TEXT PRIMARY KEY, data TEXT NOT NULL);";
|
|
14
16
|
/**
|
|
15
17
|
* Calendar's tables, created idempotently on every database it runs on: the shared Po
|
|
16
18
|
* database on Node and the workspace Durable Object on the edge. `calendar_import` holds
|
|
@@ -22,6 +24,7 @@ const CALENDAR_SCHEMA_SQL = `
|
|
|
22
24
|
CREATE TABLE IF NOT EXISTS calendar_queue_reservations (occurrence_id TEXT PRIMARY KEY, data TEXT NOT NULL);
|
|
23
25
|
CREATE TABLE IF NOT EXISTS calendar_queue_requests (id TEXT PRIMARY KEY, data TEXT NOT NULL);
|
|
24
26
|
CREATE TABLE IF NOT EXISTS calendar_outbox (occurrence_id TEXT PRIMARY KEY, data TEXT NOT NULL);
|
|
27
|
+
${CALENDAR_NOTICES_SCHEMA_SQL}
|
|
25
28
|
CREATE TABLE IF NOT EXISTS calendar_events (id TEXT PRIMARY KEY, data TEXT NOT NULL);
|
|
26
29
|
CREATE TABLE IF NOT EXISTS calendar_occurrences (
|
|
27
30
|
id TEXT PRIMARY KEY, event_id TEXT NOT NULL, revision INTEGER NOT NULL,
|
|
@@ -61,6 +64,13 @@ const CalendarOwnerSchema = Union([
|
|
|
61
64
|
hostId: Optional(id)
|
|
62
65
|
}, { additionalProperties: false })
|
|
63
66
|
]);
|
|
67
|
+
const CalendarCreatorSchema = _Object_({
|
|
68
|
+
hostId: id,
|
|
69
|
+
workspaceId: Optional(id),
|
|
70
|
+
sessionId: id,
|
|
71
|
+
profile: Optional(name),
|
|
72
|
+
personKey: Optional(String$1({ pattern: "^[0-9a-f]{64}$" }))
|
|
73
|
+
}, { additionalProperties: false });
|
|
64
74
|
const epochMs = Integer({
|
|
65
75
|
minimum: 0,
|
|
66
76
|
maximum: 864e13
|
|
@@ -69,25 +79,32 @@ const cronExpr = String$1({
|
|
|
69
79
|
minLength: 1,
|
|
70
80
|
maxLength: 256
|
|
71
81
|
});
|
|
82
|
+
const randomDelaySeconds = Optional(Integer({
|
|
83
|
+
minimum: 0,
|
|
84
|
+
maximum: MAX_RANDOM_DELAY_SECONDS
|
|
85
|
+
}));
|
|
72
86
|
const IntervalScheduleSchema = _Object_({
|
|
73
87
|
kind: Literal("interval"),
|
|
74
88
|
seconds: Integer({
|
|
75
89
|
minimum: 30,
|
|
76
90
|
maximum: MAX_INTERVAL_SECONDS
|
|
77
|
-
})
|
|
91
|
+
}),
|
|
92
|
+
randomDelaySeconds
|
|
78
93
|
}, { additionalProperties: false });
|
|
79
94
|
/** The stored form: an instant and the zone it was meant in. */
|
|
80
95
|
const CalendarScheduleSchema = Union([
|
|
81
96
|
_Object_({
|
|
82
97
|
kind: Literal("once"),
|
|
83
98
|
at: epochMs,
|
|
84
|
-
tz: id
|
|
99
|
+
tz: id,
|
|
100
|
+
randomDelaySeconds
|
|
85
101
|
}, { additionalProperties: false }),
|
|
86
102
|
IntervalScheduleSchema,
|
|
87
103
|
_Object_({
|
|
88
104
|
kind: Literal("cron"),
|
|
89
105
|
expr: cronExpr,
|
|
90
|
-
tz: id
|
|
106
|
+
tz: id,
|
|
107
|
+
randomDelaySeconds
|
|
91
108
|
}, { additionalProperties: false })
|
|
92
109
|
]);
|
|
93
110
|
/**
|
|
@@ -98,13 +115,15 @@ const CalendarScheduleInputSchema = Union([
|
|
|
98
115
|
_Object_({
|
|
99
116
|
kind: Literal("once"),
|
|
100
117
|
at: Union([epochMs, String$1({ pattern: CALENDAR_LOCAL_TIME_PATTERN })]),
|
|
101
|
-
tz: Optional(id)
|
|
118
|
+
tz: Optional(id),
|
|
119
|
+
randomDelaySeconds
|
|
102
120
|
}, { additionalProperties: false }),
|
|
103
121
|
IntervalScheduleSchema,
|
|
104
122
|
_Object_({
|
|
105
123
|
kind: Literal("cron"),
|
|
106
124
|
expr: cronExpr,
|
|
107
|
-
tz: Optional(id)
|
|
125
|
+
tz: Optional(id),
|
|
126
|
+
randomDelaySeconds
|
|
108
127
|
}, { additionalProperties: false })
|
|
109
128
|
]);
|
|
110
129
|
const CalendarTargetSchema = Union([_Object_({
|
|
@@ -190,7 +209,8 @@ const editable = {
|
|
|
190
209
|
};
|
|
191
210
|
const CalendarEventInputSchema = _Object_({
|
|
192
211
|
...editable,
|
|
193
|
-
owner: CalendarOwnerSchema
|
|
212
|
+
owner: CalendarOwnerSchema,
|
|
213
|
+
createdBy: Optional(CalendarCreatorSchema)
|
|
194
214
|
}, { additionalProperties: false });
|
|
195
215
|
const nullable = (schema) => Optional(Union([schema, Null()]));
|
|
196
216
|
const CalendarEventPatchSchema = _Object_({
|
|
@@ -213,6 +233,7 @@ const CalendarEventPatchSchema = _Object_({
|
|
|
213
233
|
const CalendarEventSchema = _Object_({
|
|
214
234
|
...editable,
|
|
215
235
|
owner: CalendarOwnerSchema,
|
|
236
|
+
createdBy: Optional(CalendarCreatorSchema),
|
|
216
237
|
homeHostId: id,
|
|
217
238
|
id,
|
|
218
239
|
revision: Integer({ minimum: 1 }),
|
|
@@ -224,7 +245,9 @@ const CalendarEventSchema = _Object_({
|
|
|
224
245
|
].map((value) => Literal(value))),
|
|
225
246
|
pauseReason: Optional(String$1()),
|
|
226
247
|
source: Optional(CalendarEventSourceSchema),
|
|
248
|
+
peerTitleSafe: Optional(Literal(true)),
|
|
227
249
|
nextDueAt: Union([Number$1(), Null()]),
|
|
250
|
+
nominalDueAt: Optional(epochMs),
|
|
228
251
|
createdAt: Number$1(),
|
|
229
252
|
updatedAt: Number$1()
|
|
230
253
|
}, { additionalProperties: false });
|
|
@@ -269,6 +292,7 @@ const CalendarOccurrenceSchema = _Object_({
|
|
|
269
292
|
].map((value) => Literal(value))),
|
|
270
293
|
skippedCount: Integer({ minimum: 0 }),
|
|
271
294
|
skipUntil: Optional(Number$1()),
|
|
295
|
+
nominalAt: Optional(epochMs),
|
|
272
296
|
sessionId: Optional(id),
|
|
273
297
|
error: Optional(String$1()),
|
|
274
298
|
workflowRun: Optional(PoWorkflowRunRefSchema),
|
|
@@ -382,7 +406,11 @@ const CalendarWorkerRequestSchema = Union([
|
|
|
382
406
|
//#endregion
|
|
383
407
|
//#region ../../../layers/automation/po-calendar/src/schemas/calendarApi.ts
|
|
384
408
|
const CalendarDraftSchema = _Object_({
|
|
385
|
-
...Omit(CalendarEventInputSchema, [
|
|
409
|
+
...Omit(CalendarEventInputSchema, [
|
|
410
|
+
"owner",
|
|
411
|
+
"centralJob",
|
|
412
|
+
"createdBy"
|
|
413
|
+
]).properties,
|
|
386
414
|
centralJob: Optional(Partial(CalendarCentralJobSchema))
|
|
387
415
|
}, { additionalProperties: false });
|
|
388
416
|
/** The draft an agent writes: its schedule may omit `tz` and give a one-off time as local wall-clock time. */
|
|
@@ -398,11 +426,50 @@ const CalendarCreateRequestSchema = _Object_({
|
|
|
398
426
|
})),
|
|
399
427
|
grant: Optional(Unknown())
|
|
400
428
|
}, { additionalProperties: false });
|
|
401
|
-
const CalendarListInputSchema = _Object_({
|
|
429
|
+
const CalendarListInputSchema = _Object_({
|
|
430
|
+
cursor: Optional(String$1({
|
|
431
|
+
minLength: 1,
|
|
432
|
+
maxLength: 512
|
|
433
|
+
})),
|
|
434
|
+
limit: Optional(Integer({
|
|
435
|
+
minimum: 1,
|
|
436
|
+
maximum: 200
|
|
437
|
+
})),
|
|
438
|
+
status: Optional(Union([
|
|
439
|
+
"open",
|
|
440
|
+
"active",
|
|
441
|
+
"paused",
|
|
442
|
+
"done",
|
|
443
|
+
"cancelled"
|
|
444
|
+
].map((status) => Literal(status)))),
|
|
445
|
+
workspaceId: Optional(String$1({
|
|
446
|
+
minLength: 1,
|
|
447
|
+
maxLength: 256
|
|
448
|
+
})),
|
|
449
|
+
sessionId: Optional(String$1({
|
|
450
|
+
minLength: 1,
|
|
451
|
+
maxLength: 256
|
|
452
|
+
}))
|
|
453
|
+
}, { additionalProperties: false });
|
|
454
|
+
function parseCalendarListInput(value = {}) {
|
|
455
|
+
if (!Check(CalendarListInputSchema, value)) throw new Error("List with cursor, limit from 1 to 200, status (open, active, paused, done or cancelled), workspaceId and sessionId only.");
|
|
456
|
+
return {
|
|
457
|
+
...value,
|
|
458
|
+
limit: value.limit ?? 50
|
|
459
|
+
};
|
|
460
|
+
}
|
|
402
461
|
const CalendarCancelInputSchema = _Object_({ id: String$1({
|
|
403
462
|
minLength: 1,
|
|
404
463
|
maxLength: 256
|
|
405
464
|
}) }, { additionalProperties: false });
|
|
465
|
+
/** `patch` is checked against the event patch schema when the call is reviewed and again when it runs. */
|
|
466
|
+
const CalendarUpdateInputSchema = _Object_({
|
|
467
|
+
id: String$1({
|
|
468
|
+
minLength: 1,
|
|
469
|
+
maxLength: 256
|
|
470
|
+
}),
|
|
471
|
+
patch: Record(String$1(), Unknown())
|
|
472
|
+
}, { additionalProperties: false });
|
|
406
473
|
function parseCalendarDraft(value) {
|
|
407
474
|
if (!Check(CalendarDraftSchema, value) || !value.title.trim()) throw new Error("Provide title, schedule, target and one of prompt, workflow or action. Ownership comes from this route.");
|
|
408
475
|
validateCalendarExecution(value);
|
|
@@ -3140,6 +3207,65 @@ function validateSchedule(schedule) {
|
|
|
3140
3207
|
paused: true
|
|
3141
3208
|
});
|
|
3142
3209
|
}
|
|
3210
|
+
if (schedule.kind === "interval" && (schedule.randomDelaySeconds ?? 0) >= schedule.seconds) throw new Error("The random delay must be shorter than the interval.");
|
|
3211
|
+
}
|
|
3212
|
+
const maxDelayMs = (schedule) => (schedule.randomDelaySeconds ?? 0) * 1e3;
|
|
3213
|
+
/** Whether the schedule adds a random delay to its nominal ticks. */
|
|
3214
|
+
const hasDelay = (schedule) => maxDelayMs(schedule) > 0;
|
|
3215
|
+
/**
|
|
3216
|
+
* The delay of one nominal tick: 0 up to `randomDelaySeconds`, clipped to end before the next tick. A pure function
|
|
3217
|
+
* of the schedule, the tick and the salt (the event id), so every recomputation agrees and nothing drifts.
|
|
3218
|
+
*/
|
|
3219
|
+
function delayMs(schedule, nominal, salt) {
|
|
3220
|
+
const max = maxDelayMs(schedule);
|
|
3221
|
+
if (max === 0) return 0;
|
|
3222
|
+
const gap = schedule.kind === "once" ? Infinity : schedule.kind === "interval" ? schedule.seconds * 1e3 : (new E(schedule.expr, {
|
|
3223
|
+
timezone: schedule.tz,
|
|
3224
|
+
paused: true
|
|
3225
|
+
}).nextRun(new Date(nominal))?.getTime() ?? Infinity) - nominal;
|
|
3226
|
+
const cap = Math.min(max, gap - 1);
|
|
3227
|
+
let hash = 2166136261;
|
|
3228
|
+
for (const char of `${salt}:${nominal}`) hash = Math.imul(hash ^ char.charCodeAt(0), 16777619) >>> 0;
|
|
3229
|
+
return hash % (cap + 1);
|
|
3230
|
+
}
|
|
3231
|
+
/** Where a nominal tick lands: the stored fire time and, for a delayed schedule, the tick it came from. */
|
|
3232
|
+
function placeDue(schedule, nominal, salt) {
|
|
3233
|
+
if (nominal === null) return { nextDueAt: null };
|
|
3234
|
+
return hasDelay(schedule) ? {
|
|
3235
|
+
nextDueAt: nominal + delayMs(schedule, nominal, salt),
|
|
3236
|
+
nominalDueAt: nominal
|
|
3237
|
+
} : { nextDueAt: nominal };
|
|
3238
|
+
}
|
|
3239
|
+
const WEEKDAYS = [
|
|
3240
|
+
"Sunday",
|
|
3241
|
+
"Monday",
|
|
3242
|
+
"Tuesday",
|
|
3243
|
+
"Wednesday",
|
|
3244
|
+
"Thursday",
|
|
3245
|
+
"Friday",
|
|
3246
|
+
"Saturday"
|
|
3247
|
+
];
|
|
3248
|
+
/** Plain language for fixed daily/weekly times. Preserve the exact rule for any other recurrence. */
|
|
3249
|
+
function describeCron(expr, tz) {
|
|
3250
|
+
const fields = /^(\d{1,2})\s+(\d{1,2})\s+\*\s+\*\s+(\*|[0-7]|sun|mon|tue|wed|thu|fri|sat)$/iu.exec(expr.trim());
|
|
3251
|
+
const location = (tz.split("/").at(-1) ?? tz).replaceAll("_", " ");
|
|
3252
|
+
if (fields) {
|
|
3253
|
+
const [, minutes, hours, day] = fields;
|
|
3254
|
+
const minute = Number(minutes);
|
|
3255
|
+
const hour = Number(hours);
|
|
3256
|
+
if (minute <= 59 && hour <= 23) {
|
|
3257
|
+
const time = `${hour % 12 || 12}:${String(minute).padStart(2, "0")} ${hour < 12 ? "am" : "pm"}`;
|
|
3258
|
+
const weekday = /^\d$/u.test(day) ? WEEKDAYS[Number(day) % WEEKDAYS.length] : WEEKDAYS.find((name) => name.slice(0, 3).toLowerCase() === day?.toLowerCase());
|
|
3259
|
+
return {
|
|
3260
|
+
full: `Every ${weekday ?? "day"} at ${time} (${tz})`,
|
|
3261
|
+
compact: `${weekday ? `${weekday}s` : "Daily"} at ${time} · ${location}`
|
|
3262
|
+
};
|
|
3263
|
+
}
|
|
3264
|
+
}
|
|
3265
|
+
return {
|
|
3266
|
+
full: `Cron ${expr} (${tz})`,
|
|
3267
|
+
compact: `Custom recurrence · ${location}`
|
|
3268
|
+
};
|
|
3143
3269
|
}
|
|
3144
3270
|
/** Strictly after `after`, except a once schedule returned only if still in the future. */
|
|
3145
3271
|
function nextDue(schedule, after) {
|
|
@@ -3178,7 +3304,23 @@ function nextLocalDay(at, tz) {
|
|
|
3178
3304
|
return guess + midnight - wall(guess);
|
|
3179
3305
|
}
|
|
3180
3306
|
/** Compress a downtime range without losing its first, last or count. `now` itself is not missed. */
|
|
3181
|
-
function missedRange(schedule, first, now) {
|
|
3307
|
+
function missedRange(schedule, first, now, salt = "") {
|
|
3308
|
+
if (!hasDelay(schedule)) return missedNominal(schedule, first, now);
|
|
3309
|
+
const early = missedNominal(schedule, first, now - maxDelayMs(schedule));
|
|
3310
|
+
let { count, last } = early;
|
|
3311
|
+
let cursor = early.next;
|
|
3312
|
+
while (cursor !== null && cursor + delayMs(schedule, cursor, salt) < now) {
|
|
3313
|
+
count++;
|
|
3314
|
+
last = cursor;
|
|
3315
|
+
cursor = nextDue(schedule, cursor);
|
|
3316
|
+
}
|
|
3317
|
+
return {
|
|
3318
|
+
count,
|
|
3319
|
+
last,
|
|
3320
|
+
next: cursor
|
|
3321
|
+
};
|
|
3322
|
+
}
|
|
3323
|
+
function missedNominal(schedule, first, now) {
|
|
3182
3324
|
if (first >= now) return {
|
|
3183
3325
|
count: 0,
|
|
3184
3326
|
last: first,
|
|
@@ -3231,14 +3373,16 @@ var CalendarRequestError = class extends Error {
|
|
|
3231
3373
|
function sameCalendarOwner(left, right) {
|
|
3232
3374
|
return left.level === right.level && (left.level === "global" && right.level === "global" && canonicalCalendarJson(left.principal) === canonicalCalendarJson(right.principal) || left.level !== "global" && right.level !== "global" && left.workspaceId === right.workspaceId && left.hostId === right.hostId && (left.level !== "session" || right.level === "session" && left.sessionId === right.sessionId));
|
|
3233
3375
|
}
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3376
|
+
/** The one visibility rule: what an owner's scope may read. Catalogue pages and coordinator reach both use it. */
|
|
3377
|
+
function calendarVisible(owner, event) {
|
|
3378
|
+
if (owner.level === "global" && event.centralJob) {
|
|
3379
|
+
const principal = event.centralJob.origin.principal ?? (event.owner.level === "global" ? event.owner.principal : void 0);
|
|
3380
|
+
return event.centralJob.visibility === "shared" || !!principal && !!owner.principal && canonicalCalendarJson(principal) === canonicalCalendarJson(owner.principal);
|
|
3381
|
+
}
|
|
3382
|
+
return owner.level === "global" && (event.owner.level !== "global" || !owner.principal || sameCalendarOwner(owner, event.owner)) || sameCalendarOwner(owner, event.owner) || owner.level === "workspace" && event.owner.level === "session" && owner.workspaceId === event.owner.workspaceId && owner.hostId === event.owner.hostId;
|
|
3383
|
+
}
|
|
3384
|
+
function createCalendarScope({ owner, store, scheduler, directory, validateAction, validateAssignment, abort, startChange, creator, client, central, now = Date.now }) {
|
|
3385
|
+
const visible = (event) => calendarVisible(owner, event);
|
|
3242
3386
|
const owned = async (id) => {
|
|
3243
3387
|
const event = await store.get(id);
|
|
3244
3388
|
if (!event || !visible(event)) throw new CalendarRequestError("Calendar event was not found.", 404);
|
|
@@ -3246,6 +3390,13 @@ function createCalendarScope({ owner, store, scheduler, directory, validateActio
|
|
|
3246
3390
|
if (event.status === "cancelled" || event.status === "done") throw new CalendarRequestError(`This event is ${event.status} and can no longer change.`, 409);
|
|
3247
3391
|
return event;
|
|
3248
3392
|
};
|
|
3393
|
+
const createdByOf = async () => {
|
|
3394
|
+
const made = await creator?.();
|
|
3395
|
+
return made ? { createdBy: {
|
|
3396
|
+
hostId: store.hostId,
|
|
3397
|
+
...made
|
|
3398
|
+
} } : {};
|
|
3399
|
+
};
|
|
3249
3400
|
const remote = (target) => !!target.hostId && target.hostId !== store.hostId;
|
|
3250
3401
|
const validateTarget = async (target) => {
|
|
3251
3402
|
if (remote(target)) {
|
|
@@ -3271,6 +3422,14 @@ function createCalendarScope({ owner, store, scheduler, directory, validateActio
|
|
|
3271
3422
|
throw new CalendarRequestError(error instanceof Error ? error.message : String(error));
|
|
3272
3423
|
}
|
|
3273
3424
|
};
|
|
3425
|
+
const guarded = async (write) => {
|
|
3426
|
+
try {
|
|
3427
|
+
return await write();
|
|
3428
|
+
} catch (error) {
|
|
3429
|
+
if (error instanceof Error && /changed after it was reviewed|now belongs to someone else/.test(error.message)) throw new CalendarRequestError(error.message, 409);
|
|
3430
|
+
throw error;
|
|
3431
|
+
}
|
|
3432
|
+
};
|
|
3274
3433
|
const validateFuture = (schedule) => parse(() => {
|
|
3275
3434
|
validateSchedule(schedule);
|
|
3276
3435
|
if (schedule.kind === "once" && schedule.at <= now() || firstDue(schedule, now()) === null) throw new Error("Choose a schedule with a future run.");
|
|
@@ -3314,14 +3473,21 @@ function createCalendarScope({ owner, store, scheduler, directory, validateActio
|
|
|
3314
3473
|
if (after === null) throw new CalendarRequestError("Use the cursor a previous page returned.");
|
|
3315
3474
|
const inRange = (await store.list()).filter(visible).map((event) => {
|
|
3316
3475
|
const schedule = event.schedule;
|
|
3476
|
+
const lag = (schedule.randomDelaySeconds ?? 0) * 1e3;
|
|
3477
|
+
const fireOf = (nominal) => nominal + delayMs(schedule, nominal, event.id);
|
|
3317
3478
|
const project = (at) => {
|
|
3318
|
-
if (schedule.kind === "once") return schedule.at >= at ? schedule.at : null;
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3479
|
+
if (schedule.kind === "once") return fireOf(schedule.at) >= at ? fireOf(schedule.at) : null;
|
|
3480
|
+
let nominal;
|
|
3481
|
+
if (schedule.kind === "cron") nominal = nextDue(schedule, at - lag - 1);
|
|
3482
|
+
else {
|
|
3483
|
+
const step = schedule.seconds * 1e3;
|
|
3484
|
+
const anchor = event.nominalDueAt ?? event.nextDueAt ?? event.updatedAt;
|
|
3485
|
+
nominal = anchor + Math.ceil((at - lag - anchor) / step) * step;
|
|
3486
|
+
}
|
|
3487
|
+
while (nominal !== null && fireOf(nominal) < at) nominal = schedule.kind === "cron" ? nextDue(schedule, nominal) : nominal + schedule.seconds * 1e3;
|
|
3488
|
+
return nominal === null ? null : fireOf(nominal);
|
|
3323
3489
|
};
|
|
3324
|
-
const projectedDueAt = schedule.kind === "once" ? schedule.at : project(Math.max(from, event.createdAt));
|
|
3490
|
+
const projectedDueAt = schedule.kind === "once" ? fireOf(schedule.at) : project(Math.max(from, event.createdAt));
|
|
3325
3491
|
if (projectedDueAt === null) return event;
|
|
3326
3492
|
if (tz === void 0 || event.status !== "active" || projectedDueAt < from || projectedDueAt >= to) return {
|
|
3327
3493
|
...event,
|
|
@@ -3363,6 +3529,55 @@ function createCalendarScope({ owner, store, scheduler, directory, validateActio
|
|
|
3363
3529
|
matched: matched.length
|
|
3364
3530
|
};
|
|
3365
3531
|
},
|
|
3532
|
+
async page(input, includePeers = false) {
|
|
3533
|
+
const { cursor, limit, status, workspaceId, sessionId } = parse(() => parseCalendarListInput(input));
|
|
3534
|
+
const peers = includePeers && owner.level === "session";
|
|
3535
|
+
if (owner.level !== "global" && workspaceId !== void 0 && workspaceId !== owner.workspaceId) throw new CalendarRequestError("This filter is outside your scope.", 403);
|
|
3536
|
+
if (owner.level === "session" && sessionId !== void 0 && sessionId !== owner.sessionId && !peers) throw new CalendarRequestError("This filter is outside your scope.", 403);
|
|
3537
|
+
const after = cursor?.slice(6);
|
|
3538
|
+
if (cursor !== void 0 && (!cursor.startsWith("event:") || !after)) throw new CalendarRequestError("Use the cursor a previous page returned.");
|
|
3539
|
+
const workspaceOf = eventWorkspaces();
|
|
3540
|
+
const peer = (event) => peers && owner.level === "session" && event.owner.level === "session" && owner.workspaceId === event.owner.workspaceId && owner.hostId === event.owner.hostId;
|
|
3541
|
+
const sessionName = (id) => directory.sessions().find((entry) => entry.sessionId === id)?.name?.trim() || directory.dormant().find((entry) => entry.sessionId === id)?.name?.trim() || "Workspace session";
|
|
3542
|
+
const readable = (schedule) => {
|
|
3543
|
+
if (schedule.kind === "interval") return `Every ${schedule.seconds}s`;
|
|
3544
|
+
if (schedule.kind === "once") return `Once at ${new Date(schedule.at).toISOString()} (${schedule.tz})`;
|
|
3545
|
+
try {
|
|
3546
|
+
return describeCron(schedule.expr, schedule.tz).full;
|
|
3547
|
+
} catch {
|
|
3548
|
+
return `Cron ${schedule.expr} (${schedule.tz})`;
|
|
3549
|
+
}
|
|
3550
|
+
};
|
|
3551
|
+
const matched = (await store.list()).map((event) => ({
|
|
3552
|
+
event,
|
|
3553
|
+
full: visible(event)
|
|
3554
|
+
})).filter(({ event, full }) => {
|
|
3555
|
+
if (!full && !peer(event)) return false;
|
|
3556
|
+
if (status === "open" ? event.status !== "active" && event.status !== "paused" : status !== void 0 && event.status !== status) return false;
|
|
3557
|
+
if (workspaceId !== void 0 && workspaceOf(event) !== workspaceId) return false;
|
|
3558
|
+
if (sessionId !== void 0 && !(event.owner.level === "session" && event.owner.sessionId === sessionId)) return false;
|
|
3559
|
+
return after === void 0 || event.id > after;
|
|
3560
|
+
}).sort((a, b) => a.event.id < b.event.id ? -1 : 1);
|
|
3561
|
+
const slice = matched.slice(0, limit);
|
|
3562
|
+
return {
|
|
3563
|
+
events: slice.map(({ event, full }) => full ? {
|
|
3564
|
+
...event,
|
|
3565
|
+
view: "full"
|
|
3566
|
+
} : {
|
|
3567
|
+
view: "busy",
|
|
3568
|
+
id: event.id,
|
|
3569
|
+
title: event.peerTitleSafe ? event.title : "Scheduled event",
|
|
3570
|
+
nextDueAt: event.nextDueAt,
|
|
3571
|
+
status: event.status,
|
|
3572
|
+
schedule: readable(event.schedule),
|
|
3573
|
+
owner: {
|
|
3574
|
+
sessionId: event.owner.sessionId,
|
|
3575
|
+
name: sessionName(event.owner.sessionId)
|
|
3576
|
+
}
|
|
3577
|
+
}),
|
|
3578
|
+
...matched.length > limit ? { cursor: `event:${slice.at(-1).event.id}` } : {}
|
|
3579
|
+
};
|
|
3580
|
+
},
|
|
3366
3581
|
async listOwned() {
|
|
3367
3582
|
return (await store.list()).filter((event) => sameCalendarOwner(owner, event.owner));
|
|
3368
3583
|
},
|
|
@@ -3388,6 +3603,7 @@ function createCalendarScope({ owner, store, scheduler, directory, validateActio
|
|
|
3388
3603
|
}, grant);
|
|
3389
3604
|
return await central.call("create", [{
|
|
3390
3605
|
...draft,
|
|
3606
|
+
...await createdByOf(),
|
|
3391
3607
|
assignment: prepared.assignment,
|
|
3392
3608
|
centralJob: prepared.centralJob
|
|
3393
3609
|
}]);
|
|
@@ -3399,6 +3615,7 @@ function createCalendarScope({ owner, store, scheduler, directory, validateActio
|
|
|
3399
3615
|
try {
|
|
3400
3616
|
event = await store.create(parseCalendarEventInput({
|
|
3401
3617
|
...draft,
|
|
3618
|
+
...await createdByOf(),
|
|
3402
3619
|
owner
|
|
3403
3620
|
}), requestedId, consent ? (created) => client.saveGrant(`${created.homeHostId}/${created.id}`, consent) : void 0);
|
|
3404
3621
|
} catch (error) {
|
|
@@ -3407,8 +3624,11 @@ function createCalendarScope({ owner, store, scheduler, directory, validateActio
|
|
|
3407
3624
|
await scheduler.changed();
|
|
3408
3625
|
return event;
|
|
3409
3626
|
},
|
|
3410
|
-
async update(id, input) {
|
|
3411
|
-
if (central?.enabled() && !await store.get(id))
|
|
3627
|
+
async update(id, input, expectedRevision) {
|
|
3628
|
+
if (central?.enabled() && !await store.get(id)) {
|
|
3629
|
+
if (expectedRevision !== void 0) throw new CalendarRequestError("A reviewed update cannot change a central event. Nothing ran.", 409);
|
|
3630
|
+
return await central.call("update", [id, input]);
|
|
3631
|
+
}
|
|
3412
3632
|
const current = await owned(id);
|
|
3413
3633
|
if (current.source) throw new CalendarRequestError(`${current.source.packageName} manages this event. Pause, resume, run or cancel it instead.`, 403);
|
|
3414
3634
|
if (!input || typeof input !== "object" || Array.isArray(input)) throw new CalendarRequestError("Invalid calendar event patch");
|
|
@@ -3425,23 +3645,28 @@ function createCalendarScope({ owner, store, scheduler, directory, validateActio
|
|
|
3425
3645
|
}
|
|
3426
3646
|
await checkAssignment(candidate);
|
|
3427
3647
|
if (patch.action && canonicalCalendarJson(patch.action) !== canonicalCalendarJson(current.action)) await checkAction(patch.action);
|
|
3428
|
-
const event = await store.update(id, patch);
|
|
3648
|
+
const event = await guarded(() => store.update(id, patch, expectedRevision, current.owner));
|
|
3429
3649
|
await scheduler.changed();
|
|
3430
3650
|
return event;
|
|
3431
3651
|
},
|
|
3432
|
-
async action(id, action) {
|
|
3433
|
-
if (central?.enabled() && !await store.get(id))
|
|
3652
|
+
async action(id, action, expectedRevision) {
|
|
3653
|
+
if (central?.enabled() && !await store.get(id)) {
|
|
3654
|
+
if (expectedRevision !== void 0) throw new CalendarRequestError("A reviewed action cannot change a central event. Nothing ran.", 409);
|
|
3655
|
+
return await central.call("action", [id, action]);
|
|
3656
|
+
}
|
|
3434
3657
|
const event = await owned(id);
|
|
3658
|
+
if (expectedRevision !== void 0 && event.revision !== expectedRevision) throw new CalendarRequestError("Calendar event changed after it was reviewed. Nothing ran.", 409);
|
|
3435
3659
|
if (action === "run-now") {
|
|
3660
|
+
if (expectedRevision !== void 0) throw new CalendarRequestError("Run now cannot be reviewed against a revision. Nothing ran.", 409);
|
|
3436
3661
|
await validateTarget(event.target);
|
|
3437
3662
|
if ((await scheduler.runNow(id)).state === "skipped") throw new CalendarRequestError("An earlier run of this event is still going, so this one was skipped.", 409);
|
|
3438
3663
|
return await store.get(id);
|
|
3439
3664
|
}
|
|
3440
3665
|
if (action === "resume") await validateTarget(event.target);
|
|
3441
|
-
const updated = await store.update(id, {
|
|
3666
|
+
const updated = await guarded(() => store.update(id, {
|
|
3442
3667
|
status: action === "pause" ? "paused" : action === "resume" ? "active" : "cancelled",
|
|
3443
3668
|
pauseReason: action === "pause" ? "manual" : ""
|
|
3444
|
-
});
|
|
3669
|
+
}, expectedRevision, event.owner));
|
|
3445
3670
|
if (action === "cancel") abort?.(id);
|
|
3446
3671
|
await scheduler.changed();
|
|
3447
3672
|
return updated;
|
|
@@ -3509,6 +3734,7 @@ function createCalendarScope({ owner, store, scheduler, directory, validateActio
|
|
|
3509
3734
|
source,
|
|
3510
3735
|
{
|
|
3511
3736
|
...draft,
|
|
3737
|
+
...await createdByOf(),
|
|
3512
3738
|
assignment: prepared.assignment,
|
|
3513
3739
|
centralJob: prepared.centralJob
|
|
3514
3740
|
},
|
|
@@ -3519,6 +3745,7 @@ function createCalendarScope({ owner, store, scheduler, directory, validateActio
|
|
|
3519
3745
|
try {
|
|
3520
3746
|
written = await store.writeSourced(parseCalendarEventInput({
|
|
3521
3747
|
...draft,
|
|
3748
|
+
...await createdByOf(),
|
|
3522
3749
|
owner
|
|
3523
3750
|
}), source, mode);
|
|
3524
3751
|
} catch (error) {
|
|
@@ -3550,7 +3777,7 @@ function createCalendarScope({ owner, store, scheduler, directory, validateActio
|
|
|
3550
3777
|
workspaces,
|
|
3551
3778
|
sessions: [...live.map((entry) => ({
|
|
3552
3779
|
...entry,
|
|
3553
|
-
name: entry.sessionId,
|
|
3780
|
+
name: entry.name?.trim() || entry.sessionId,
|
|
3554
3781
|
asleep: false
|
|
3555
3782
|
})), ...directory.dormant().filter((entry) => !liveIds.has(entry.sessionId)).map((entry) => ({
|
|
3556
3783
|
...entry,
|
|
@@ -3618,7 +3845,9 @@ function createCalendarFederation({ store, forOwner, member = false }) {
|
|
|
3618
3845
|
await eventScope.history(id);
|
|
3619
3846
|
if (operation === "get") return event;
|
|
3620
3847
|
if (operation === "history") return eventScope.history(id, body.cursor);
|
|
3621
|
-
|
|
3848
|
+
const expectedRevision = body.expectedRevision;
|
|
3849
|
+
if (expectedRevision !== void 0 && (!Number.isSafeInteger(expectedRevision) || expectedRevision < 1)) throw new CalendarRequestError("expectedRevision must be a positive integer.");
|
|
3850
|
+
if (operation === "update") return eventScope.update(id, body.patch, expectedRevision);
|
|
3622
3851
|
if (operation === "ask" && member) return eventScope.ask(id, body);
|
|
3623
3852
|
if (operation === "action") {
|
|
3624
3853
|
if (![
|
|
@@ -3627,7 +3856,7 @@ function createCalendarFederation({ store, forOwner, member = false }) {
|
|
|
3627
3856
|
"cancel",
|
|
3628
3857
|
"run-now"
|
|
3629
3858
|
].includes(String(body.action))) throw new CalendarRequestError("Invalid calendar action.");
|
|
3630
|
-
return eventScope.action(id, body.action);
|
|
3859
|
+
return eventScope.action(id, body.action, expectedRevision);
|
|
3631
3860
|
}
|
|
3632
3861
|
throw new CalendarRequestError("Calendar fire is handled by the destination host.");
|
|
3633
3862
|
} };
|
|
@@ -3635,7 +3864,7 @@ function createCalendarFederation({ store, forOwner, member = false }) {
|
|
|
3635
3864
|
//#endregion
|
|
3636
3865
|
//#region ../../../layers/automation/po-calendar/src/services/calendarApi/index.ts
|
|
3637
3866
|
const MAX_BODY_BYTES = 65536;
|
|
3638
|
-
function createCalendarApi(scope, onError, scopeForEvent = () => scope, store, federationScope, member) {
|
|
3867
|
+
function createCalendarApi(scope, onError, scopeForEvent = () => scope, store, federationScope, member, hostPair) {
|
|
3639
3868
|
return {
|
|
3640
3869
|
basePath: "calendar",
|
|
3641
3870
|
start() {
|
|
@@ -3666,6 +3895,15 @@ function createCalendarApi(scope, onError, scopeForEvent = () => scope, store, f
|
|
|
3666
3895
|
}
|
|
3667
3896
|
if (!caller?.principal || !caller.org || !caller.device) throw new CalendarRequestError("A verified federation caller is required.", 403);
|
|
3668
3897
|
if (!store) throw new CalendarRequestError("Calendar federation is unavailable on this mount.", 409);
|
|
3898
|
+
const pair = /^\/host-pair\/(list|get|update|action)$/.exec(context.req.path);
|
|
3899
|
+
if (pair) {
|
|
3900
|
+
if (!hostPair || context.req.method !== "POST" || !caller.via) throw new CalendarRequestError("Calendar host pair is unavailable.", 403);
|
|
3901
|
+
return context.body(JSON.stringify(await hostPair.handle({
|
|
3902
|
+
principal: caller.principal,
|
|
3903
|
+
hostId: caller.via.callingHostId,
|
|
3904
|
+
grantId: caller.via.grantId
|
|
3905
|
+
}, pair[1], await json(context.req.raw))), 200, { "Content-Type": "application/json" });
|
|
3906
|
+
}
|
|
3669
3907
|
const verifiedMember = member ? await member(caller) : false;
|
|
3670
3908
|
if (member && !verifiedMember) throw new CalendarRequestError("Current organization membership is required.", 403);
|
|
3671
3909
|
const path = context.req.path;
|
|
@@ -3705,11 +3943,15 @@ function createCalendarApi(scope, onError, scopeForEvent = () => scope, store, f
|
|
|
3705
3943
|
const input = operation === "list" ? {
|
|
3706
3944
|
...query,
|
|
3707
3945
|
filters
|
|
3708
|
-
} : operation === "update" ? {
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3946
|
+
} : operation === "update" ? (() => {
|
|
3947
|
+
const { expectedRevision, ...patch } = record;
|
|
3948
|
+
return {
|
|
3949
|
+
id,
|
|
3950
|
+
patch,
|
|
3951
|
+
destinationHostId: record.destinationHostId,
|
|
3952
|
+
expectedRevision
|
|
3953
|
+
};
|
|
3954
|
+
})() : operation === "history" || operation === "get" ? {
|
|
3713
3955
|
id,
|
|
3714
3956
|
cursor: query.cursor
|
|
3715
3957
|
} : {
|
|
@@ -3889,4 +4131,8 @@ async function calendarSetup({ runtime, profile, settings }) {
|
|
|
3889
4131
|
};
|
|
3890
4132
|
}
|
|
3891
4133
|
//#endregion
|
|
3892
|
-
|
|
4134
|
+
//#region ../../core/po-core/src/constants/agentSettled.ts
|
|
4135
|
+
/** Journal entry the direct harness appends when an agent run settles; the hub reads it back. */
|
|
4136
|
+
const AGENT_SETTLED_ENTRY_TYPE = "po.agent-settled";
|
|
4137
|
+
//#endregion
|
|
4138
|
+
export { CalendarOccurrenceSchema as A, CALENDAR_SCHEMA_SQL as B, CalendarListInputSchema as C, CalendarEventPatchSchema as D, CalendarCreatorSchema as E, mergeCalendarEvent as F, MAX_CALENDAR_SUMMARY_LENGTH as H, parseCalendarEventInput as I, parseCalendarEventPatch as L, CalendarWorkerRequestSchema as M, canonicalCalendarJson as N, CalendarEventSchema as O, isCalendarJson as P, validateCalendarExecution as R, CalendarCreateRequestSchema as S, CalendarAssignmentSchema as T, DEFAULT_CALENDAR_PENDING_EXPIRY_MS as V, resolveScheduleInput as _, createCalendarSessionExecutor as a, CalendarAskSchema as b, createCalendarScope as c, describeCron as d, firstDue as f, placeDue as g, nextDue as h, createCalendarExecutors as i, CalendarOwnerSchema as j, CalendarEventSourceSchema as k, sameCalendarOwner as l, missedRange as m, calendarSetup as n, createCalendarApi as o, hasDelay as p, CALENDAR_CLOUD_ROOT_SERVICE as r, CalendarRequestError as s, AGENT_SETTLED_ENTRY_TYPE as t, delayMs as u, validateSchedule as v, CalendarUpdateInputSchema as w, CalendarCancelInputSchema as x, CalendarAgentDraftSchema as y, CALENDAR_NOTICES_SCHEMA_SQL as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $t as
|
|
2
|
-
import { n as PoPluginWireCallSchema, t as PO_WIRE_HOST_SCOPE } from "./pluginProtocol-
|
|
1
|
+
import { $t as Literal, Gt as Partial, Jt as Tuple, Kt as Omit, Qt as Null, R as definePoContract, Wt as Pick, Xt as String, Yt as Union, Zt as Number$1, an as _Object_, en as Integer, in as Unknown, nn as Intersect, on as Optional$3, qt as Record, rn as Unsafe, sn as _Array_, tn as Boolean } from "./serverPlugin-CJtFKP76.js";
|
|
2
|
+
import { n as PoPluginWireCallSchema, t as PO_WIRE_HOST_SCOPE } from "./pluginProtocol-CzYwk73s.js";
|
|
3
3
|
import "./pluginCatalog-BAALyedS.js";
|
|
4
4
|
const Schema = Unsafe(Union([Boolean(), Record(String(), Unknown())]));
|
|
5
5
|
const Scope = Union([
|
|
@@ -251,6 +251,9 @@ const SessionSummarySchema = _Object_({
|
|
|
251
251
|
errorCode: Optional$2(Union([Literal("SESSION_WORKTREE_PROVISION_FAILED"), Literal("SESSION_UNAVAILABLE")]))
|
|
252
252
|
}))),
|
|
253
253
|
groups: Optional$2(Strings$1),
|
|
254
|
+
/** Host-owned bot marker and its revision; absent for an ordinary session. */
|
|
255
|
+
bot: Optional$2(_Object_({ wakePeriodMs: Optional$2(Number$1()) })),
|
|
256
|
+
botRevision: Optional$2(Integer({ minimum: 0 })),
|
|
254
257
|
backgroundWorkActive: Optional$2(Flag$2),
|
|
255
258
|
/** Present and true for a recorded session the server has not reopened yet. */
|
|
256
259
|
dormant: Optional$2(Flag$2)
|
|
@@ -957,6 +960,7 @@ const State = _Object_({
|
|
|
957
960
|
startedAt: Optional$1(Text$2),
|
|
958
961
|
closesAt: Optional$1(Text$2),
|
|
959
962
|
error: Optional$1(Text$2),
|
|
963
|
+
closedAtLimit: Optional$1(Text$2),
|
|
960
964
|
devices: _Array_(_Object_({
|
|
961
965
|
id: Text$2,
|
|
962
966
|
label: Text$2,
|
|
@@ -1281,9 +1285,9 @@ const HubNoticeSchema = _Object_({
|
|
|
1281
1285
|
sessionId: Text$1,
|
|
1282
1286
|
frame: Record(Text$1, Json$2)
|
|
1283
1287
|
});
|
|
1284
|
-
/** Native UI delivery
|
|
1288
|
+
/** Native UI delivery and bot settings are not part of the pinned po.hub@1 wire shape. */
|
|
1285
1289
|
const HubSessionSchema = _Object_({
|
|
1286
|
-
...SessionSummarySchema.properties,
|
|
1290
|
+
...Omit(SessionSummarySchema, ["bot", "botRevision"]).properties,
|
|
1287
1291
|
nativeComposition: Optional$3(Omit(NativeCompositionSchema, ["uiEntry"]))
|
|
1288
1292
|
});
|
|
1289
1293
|
/** Instructions are HTTP-only so existing po.hub@1 clients keep the same wire contract. */
|
|
@@ -1338,6 +1342,13 @@ const PoHubAccessContract = definePoContract("po.hub.access", {
|
|
|
1338
1342
|
state: { interact: Record(Text$1, Boolean()) },
|
|
1339
1343
|
methods: {}
|
|
1340
1344
|
});
|
|
1345
|
+
/** Optional host-to-sandbox bot metadata. The fixed hub feed connects without this contract. */
|
|
1346
|
+
const PoHubBotSettingsContract = definePoContract("po.hub.bot-settings", {
|
|
1347
|
+
version: 1,
|
|
1348
|
+
params: {},
|
|
1349
|
+
state: { settings: Record(Text$1, Pick(SessionSummarySchema, ["bot", "botRevision"])) },
|
|
1350
|
+
methods: {}
|
|
1351
|
+
});
|
|
1341
1352
|
//#endregion
|
|
1342
1353
|
//#region ../../core/po-core/src/schemas/protocolThreadContract.ts
|
|
1343
1354
|
/** The thread's latest frame: `transcript_state` while its child runs, `transcript_ready` once it has finished. */
|
|
@@ -1716,4 +1727,4 @@ const transportSocketContracts = [
|
|
|
1716
1727
|
...bundleHttpContracts
|
|
1717
1728
|
], [...sessionSocketContracts, ...transportSocketContracts];
|
|
1718
1729
|
//#endregion
|
|
1719
|
-
export {
|
|
1730
|
+
export { PoHubBotSettingsContract as a, PoChannelsContract as c, defineApiContract as d, PoHubAccessContract as i, PluginInstallRequestSchema as l, SessionServiceStateSchema as n, PoHubContract as o, PoThreadContract as r, PoHubRevisionsContract as s, SessionMethodSchemas as t, jsonApiResponses as u };
|