@datalayer/agent-runtimes 1.5.70 → 1.5.71
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-embed/chunks/{DeckComponent-DAnUabRV.js → DeckComponent-Cd1sbs9L.js} +1 -1
- package/dist-embed/chunks/{DocumentView-BKFitqiB.js → DocumentView-ssQ835Wa.js} +1 -1
- package/dist-embed/chunks/{EphemeralDocument-BRzYMd8Z.js → EphemeralDocument-DNziilOG.js} +1 -1
- package/dist-embed/chunks/{ExcalidrawComponent-VnKcai35.js → ExcalidrawComponent-CQ4BeoQt.js} +1 -1
- package/dist-embed/chunks/{ExcalidrawModal-DrntFjbe.js → ExcalidrawModal-8W-b1OmA.js} +1 -1
- package/dist-embed/chunks/{JupyterLexicalExtension-BBivQZvX.js → JupyterLexicalExtension-BLYM-DTn.js} +4 -4
- package/dist-embed/chunks/{YouTubePlugin-C209681s.js → YouTubePlugin-BgZG6fCA.js} +1 -1
- package/dist-embed/chunks/abnfDiagram-VCTEODGH-BdOOK2nG.js +1 -0
- package/dist-embed/chunks/abnfDiagram-VCTEODGH-CHerLzZ0.js +1 -0
- package/dist-embed/chunks/{ar-SA-G6X2FPQ2-Dypu3IcK.js → ar-SA-G6X2FPQ2-Bcy9b6jn.js} +1 -1
- package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-C22xzf-o.js → architectureDiagram-5GKGNRK7-C8jjE2mY.js} +2 -2
- package/dist-embed/chunks/architectureDiagram-5GKGNRK7-GukKr_g1.js +36 -0
- package/dist-embed/chunks/{az-AZ-76LH7QW2-D8CzfKb1.js → az-AZ-76LH7QW2-Bzy5rt95.js} +1 -1
- package/dist-embed/chunks/{bg-BG-XCXSNQG7-_NVFEM1_.js → bg-BG-XCXSNQG7-C3mQkAoD.js} +1 -1
- package/dist-embed/chunks/{blockDiagram-I7D4REHJ-CHicgYkf.js → blockDiagram-I7D4REHJ-DH6ta7S_.js} +2 -2
- package/dist-embed/chunks/blockDiagram-I7D4REHJ-edfypROz.js +129 -0
- package/dist-embed/chunks/{bn-BD-2XOGV67Q-DMgdNi-k.js → bn-BD-2XOGV67Q-DHwDUFeg.js} +1 -1
- package/dist-embed/chunks/{c4Diagram-7LVT6UL2-auJZQjpw.js → c4Diagram-7LVT6UL2-B6NHHf7w.js} +2 -2
- package/dist-embed/chunks/c4Diagram-7LVT6UL2-BD3Ld97M.js +38 -0
- package/dist-embed/chunks/{ca-ES-6MX7JW3Y-DpOQhzr4.js → ca-ES-6MX7JW3Y-CWMZCfjI.js} +1 -1
- package/dist-embed/chunks/{chunk-2Q5K7J3B-DpFWUcsT.js → chunk-2Q5K7J3B-9xCosPaH.js} +1 -1
- package/dist-embed/chunks/chunk-2Q5K7J3B-ZWnuQ6M2.js +1 -0
- package/dist-embed/chunks/{chunk-5VM5RSS4-CaowF8Al.js → chunk-5VM5RSS4-7q2jPq-I.js} +1 -1
- package/dist-embed/chunks/chunk-5VM5RSS4-C2EZUNrH.js +15 -0
- package/dist-embed/chunks/{chunk-F27PBJKO-D7PuEggc.js → chunk-F27PBJKO-hasZYXJc.js} +1 -1
- package/dist-embed/chunks/chunk-F27PBJKO-iAw_9Xtd.js +1 -0
- package/dist-embed/chunks/{chunk-IMKFNOWR-jZNuNkCa.js → chunk-IMKFNOWR-CR2LIHPi.js} +1 -1
- package/dist-embed/chunks/chunk-IMKFNOWR-CU661Hle.js +231 -0
- package/dist-embed/chunks/{chunk-JWPE2WC7-BIShIUcJ.js → chunk-JWPE2WC7-B40RAhYQ.js} +1 -1
- package/dist-embed/chunks/chunk-JWPE2WC7-D4pNFsZF.js +1 -0
- package/dist-embed/chunks/{chunk-POPQ4Y6H-DG5Q2OKT.js → chunk-POPQ4Y6H-CNc-_UkX.js} +1 -1
- package/dist-embed/chunks/chunk-POPQ4Y6H-PC7NS4ab.js +1 -0
- package/dist-embed/chunks/{chunk-SVP7TREG-ERRaAh-x.js → chunk-SVP7TREG-B-LR0OEY.js} +1 -1
- package/dist-embed/chunks/chunk-SVP7TREG-BgVpHjUA.js +88 -0
- package/dist-embed/chunks/{chunk-TICWLB2K-B91fA6Jd.js → chunk-TICWLB2K-BKUWUi4x.js} +1 -1
- package/dist-embed/chunks/chunk-TICWLB2K-D0mlrZUj.js +206 -0
- package/dist-embed/chunks/{chunk-XXDRQBXY-BAy0lBJk.js → chunk-XXDRQBXY-CFD4Agg8.js} +1 -1
- package/dist-embed/chunks/chunk-XXDRQBXY-DF8wFPCi.js +1 -0
- package/dist-embed/chunks/classDiagram-ZZMXUADV-B2RPE1Bl.js +1 -0
- package/dist-embed/chunks/classDiagram-ZZMXUADV-BSdRgwsr.js +1 -0
- package/dist-embed/chunks/classDiagram-v2-VYDZK3BY-B2RPE1Bl.js +1 -0
- package/dist-embed/chunks/classDiagram-v2-VYDZK3BY-BSdRgwsr.js +1 -0
- package/dist-embed/chunks/cose-bilkent-JH36ORCC-CGF9N16A.js +1 -0
- package/dist-embed/chunks/cose-bilkent-JH36ORCC-D976z1sp.js +1 -0
- package/dist-embed/chunks/{cs-CZ-2BRQDIVT-Fr-SpqHD.js → cs-CZ-2BRQDIVT-B_pe2qj9.js} +1 -1
- package/dist-embed/chunks/cynefin-OW5HDTMX-BBLugbYz.js +166 -0
- package/dist-embed/chunks/cynefinDiagram-5FMLGOSQ-Cil4cm66.js +62 -0
- package/dist-embed/chunks/cynefinDiagram-5FMLGOSQ-D7ioXav_.js +62 -0
- package/dist-embed/chunks/{da-DK-5WZEPLOC-DO_sAXvt.js → da-DK-5WZEPLOC-CGWCNcJj.js} +1 -1
- package/dist-embed/chunks/{dagre-GXQ25YYZ-BgrGEY09.js → dagre-GXQ25YYZ-Cp78_L9l.js} +2 -2
- package/dist-embed/chunks/dagre-GXQ25YYZ-DauBFK-x.js +4 -0
- package/dist-embed/chunks/{de-DE-XR44H4JA-4JnXB_iM.js → de-DE-XR44H4JA-DTdq2h_G.js} +1 -1
- package/dist-embed/chunks/{diagram-S7CK7UJ4-hQvZziAN.js → diagram-S7CK7UJ4-LsSU5PzE.js} +2 -2
- package/dist-embed/chunks/diagram-S7CK7UJ4-cLOCifii.js +30 -0
- package/dist-embed/chunks/diagram-UQ7AKVKN-BK4qe_eB.js +41 -0
- package/dist-embed/chunks/diagram-UQ7AKVKN-CoIPlGw-.js +41 -0
- package/dist-embed/chunks/diagram-VSXAHHWV-CIhWkrRX.js +3 -0
- package/dist-embed/chunks/{diagram-VSXAHHWV-WVuzjdxU.js → diagram-VSXAHHWV-DWWQ-Ga9.js} +2 -2
- package/dist-embed/chunks/diagram-VX7I27RA-43SwkivD.js +24 -0
- package/dist-embed/chunks/diagram-VX7I27RA-CQM8aGRO.js +24 -0
- package/dist-embed/chunks/diagram-Z3DM3KII-Da75Rc5Q.js +24 -0
- package/dist-embed/chunks/diagram-Z3DM3KII-DrILxydN.js +24 -0
- package/dist-embed/chunks/ebnfDiagram-PWID7BFC-CwBVaHP2.js +1 -0
- package/dist-embed/chunks/ebnfDiagram-PWID7BFC-Klx1dPe6.js +1 -0
- package/dist-embed/chunks/{el-GR-BZB4AONW-MydAlwHl.js → el-GR-BZB4AONW-qdInZt55.js} +1 -1
- package/dist-embed/chunks/{erDiagram-RLTQ6QDP-zwXEFcAp.js → erDiagram-RLTQ6QDP-6YXMuidI.js} +2 -2
- package/dist-embed/chunks/erDiagram-RLTQ6QDP-DmlOR1VA.js +99 -0
- package/dist-embed/chunks/{es-ES-U4NZUMDT-rQmnr_uu.js → es-ES-U4NZUMDT-CbVgghD5.js} +1 -1
- package/dist-embed/chunks/{eu-ES-A7QVB2H4-j5Hf8ngk.js → eu-ES-A7QVB2H4-Cfyi4-QV.js} +1 -1
- package/dist-embed/chunks/{fa-IR-HGAKTJCU-DMJRRSBp.js → fa-IR-HGAKTJCU-Bpz9Yk2c.js} +1 -1
- package/dist-embed/chunks/{fi-FI-Z5N7JZ37-BFLC0BFd.js → fi-FI-Z5N7JZ37-CnNP_ASI.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-HODETNUW-BrbR1EkW.js → flowDiagram-HODETNUW-DpJLPDJS.js} +1 -1
- package/dist-embed/chunks/flowDiagram-HODETNUW-_PPo6xx4.js +168 -0
- package/dist-embed/chunks/{fr-FR-RHASNOE6-CxjhSJC1.js → fr-FR-RHASNOE6-CXIU81zC.js} +1 -1
- package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-DfJDZVnm.js → ganttDiagram-EL5Y4UJY-B3ddBLm-.js} +2 -2
- package/dist-embed/chunks/ganttDiagram-EL5Y4UJY-DnJUq63S.js +292 -0
- package/dist-embed/chunks/gitGraphDiagram-WWUBYQGX-CKVR9Ajq.js +106 -0
- package/dist-embed/chunks/gitGraphDiagram-WWUBYQGX-u7eHxrMk.js +106 -0
- package/dist-embed/chunks/{gl-ES-HMX3MZ6V-BuuMpTaX.js → gl-ES-HMX3MZ6V-Do1RdVfG.js} +1 -1
- package/dist-embed/chunks/{he-IL-6SHJWFNN-Cv3Nrcgu.js → he-IL-6SHJWFNN-NcTscmv6.js} +1 -1
- package/dist-embed/chunks/{hi-IN-IWLTKZ5I-Sddst60F.js → hi-IN-IWLTKZ5I-CyNpoQ12.js} +1 -1
- package/dist-embed/chunks/{hu-HU-A5ZG7DT2-ehrXVpD0.js → hu-HU-A5ZG7DT2-Bzge2Fdz.js} +1 -1
- package/dist-embed/chunks/{id-ID-SAP4L64H-Gfb1UYxZ.js → id-ID-SAP4L64H-DaNcoDhl.js} +1 -1
- package/dist-embed/chunks/{index-BaBNw6X5.js → index-BQdtKMKk.js} +56 -61
- package/dist-embed/chunks/index-CJys1M3A.js +6 -0
- package/dist-embed/chunks/{index-hxIHgkzg.js → index-CLdL3h_Z.js} +1 -1
- package/dist-embed/chunks/{index-DmpLE1d4.js → index-Cx_cIRez.js} +1 -1
- package/dist-embed/chunks/index-lOJZWhTu.js +337 -0
- package/dist-embed/chunks/infoDiagram-27XIBGKW-C3YByzAX.js +2 -0
- package/dist-embed/chunks/infoDiagram-27XIBGKW-CrHEoNfn.js +2 -0
- package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-DrEzfSK9.js → ishikawaDiagram-5VMMS53U-B87JmQRn.js} +6 -6
- package/dist-embed/chunks/ishikawaDiagram-5VMMS53U-DkW3YLz9.js +70 -0
- package/dist-embed/chunks/{it-IT-JPQ66NNP-BehLHkar.js → it-IT-JPQ66NNP-6fWP-4Pk.js} +1 -1
- package/dist-embed/chunks/{ja-JP-DBVTYXUO-BZvqIigI.js → ja-JP-DBVTYXUO-TOPcUfq8.js} +1 -1
- package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-DpWKIFIN.js → journeyDiagram-3NMN7TZE-BcfZXfHF.js} +2 -2
- package/dist-embed/chunks/journeyDiagram-3NMN7TZE-BjO5pIr-.js +139 -0
- package/dist-embed/chunks/{kaa-6HZHGXH3-DgAIF6rN.js → kaa-6HZHGXH3-WPmptgZr.js} +1 -1
- package/dist-embed/chunks/{kab-KAB-ZGHBKWFO-DW4thPSJ.js → kab-KAB-ZGHBKWFO-CMOAXrZA.js} +1 -1
- package/dist-embed/chunks/{kanban-definition-UXKFOSKX-DxbTprYr.js → kanban-definition-UXKFOSKX-D9d45rsU.js} +2 -2
- package/dist-embed/chunks/kanban-definition-UXKFOSKX-DKCJ8_n0.js +89 -0
- package/dist-embed/chunks/{kk-KZ-P5N5QNE5-CCy_nSJ7.js → kk-KZ-P5N5QNE5-B6ezOPzr.js} +1 -1
- package/dist-embed/chunks/{km-KH-HSX4SM5Z-kpXyoxjS.js → km-KH-HSX4SM5Z-C84QUPbc.js} +1 -1
- package/dist-embed/chunks/{ko-KR-MTYHY66A-CFm6WtQG.js → ko-KR-MTYHY66A-cuBEuTL_.js} +1 -1
- package/dist-embed/chunks/{ku-TR-6OUDTVRD-CKF85mOv.js → ku-TR-6OUDTVRD-B9KdlCAR.js} +1 -1
- package/dist-embed/chunks/{layout-DYytgC9r.js → layout-C6Twj1mW.js} +1 -1
- package/dist-embed/chunks/layout-Do3wJC1j.js +1 -0
- package/dist-embed/chunks/{lt-LT-XHIRWOB4-CO9Bo5qJ.js → lt-LT-XHIRWOB4-B39JwBGi.js} +1 -1
- package/dist-embed/chunks/{lv-LV-5QDEKY6T-CvZszc5p.js → lv-LV-5QDEKY6T-8WReOaa7.js} +1 -1
- package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-_1SBIPav.js → mindmap-definition-YA3MSWOX-5wZuXgB8.js} +2 -2
- package/dist-embed/chunks/mindmap-definition-YA3MSWOX-BURkGTKI.js +96 -0
- package/dist-embed/chunks/{mr-IN-CRQNXWMA-Cio_dB9M.js → mr-IN-CRQNXWMA-DUaS8VWx.js} +1 -1
- package/dist-embed/chunks/{my-MM-5M5IBNSE-Z0RQ5Vbz.js → my-MM-5M5IBNSE-BdJYwQXg.js} +1 -1
- package/dist-embed/chunks/{nb-NO-T6EIAALU-BEQ0YP9J.js → nb-NO-T6EIAALU-C_p5yu1z.js} +1 -1
- package/dist-embed/chunks/{nl-NL-IS3SIHDZ-YtkJnS_J.js → nl-NL-IS3SIHDZ-DM5qgcCp.js} +1 -1
- package/dist-embed/chunks/{nn-NO-6E72VCQL-C1j2s3qO.js → nn-NO-6E72VCQL-BuX1DqI5.js} +1 -1
- package/dist-embed/chunks/{oc-FR-POXYY2M6-CinnjccW.js → oc-FR-POXYY2M6-BAWljcaf.js} +1 -1
- package/dist-embed/chunks/{pa-IN-N4M65BXN-c_6OtC6L.js → pa-IN-N4M65BXN-2iyq8qxX.js} +1 -1
- package/dist-embed/chunks/pegDiagram-XKGWAZYB-BjrOX_Ki.js +1 -0
- package/dist-embed/chunks/pegDiagram-XKGWAZYB-CyuSADYr.js +1 -0
- package/dist-embed/chunks/{percentages-BXMCSKIN-VqMxh8LK.js → percentages-BXMCSKIN-C9b5dzpq.js} +5 -5
- package/dist-embed/chunks/{pieDiagram-E7YTZNPT-EvMxJb2S.js → pieDiagram-E7YTZNPT-GvxNnk0x.js} +2 -2
- package/dist-embed/chunks/pieDiagram-E7YTZNPT-ni9UMEzV.js +39 -0
- package/dist-embed/chunks/{pl-PL-T2D74RX3-Cn_9xZgM.js → pl-PL-T2D74RX3-C6nLJHhB.js} +1 -1
- package/dist-embed/chunks/{pt-BR-5N22H2LF-Da6r-Pp1.js → pt-BR-5N22H2LF-B1adz-DU.js} +1 -1
- package/dist-embed/chunks/{pt-PT-UZXXM6DQ-D6lhcuX9.js → pt-PT-UZXXM6DQ-BCZpI4LV.js} +1 -1
- package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-rFaTvNlk.js → quadrantDiagram-AXDQQJYC-CufBEqrC.js} +4 -4
- package/dist-embed/chunks/quadrantDiagram-AXDQQJYC-Yg2WGHWh.js +7 -0
- package/dist-embed/chunks/railroadDiagram-O6MQD6OU-6tStysfX.js +1 -0
- package/dist-embed/chunks/railroadDiagram-O6MQD6OU-Df7m1mT4.js +1 -0
- package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-DHLQ_9Lw.js → requirementDiagram-BXWQKSXE-0AqPqv7a.js} +2 -2
- package/dist-embed/chunks/requirementDiagram-BXWQKSXE-CmXBYo40.js +84 -0
- package/dist-embed/chunks/{ro-RO-JPDTUUEW-BFss9e8X.js → ro-RO-JPDTUUEW-BPM7y_F2.js} +1 -1
- package/dist-embed/chunks/{ru-RU-B4JR7IUQ-DIruW2gS.js → ru-RU-B4JR7IUQ-UViKo8dy.js} +1 -1
- package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-Nk71fRsK.js → sankeyDiagram-P5KCCOFB-CqcWOAyy.js} +2 -2
- package/dist-embed/chunks/sankeyDiagram-P5KCCOFB-rQsp_j9w.js +40 -0
- package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-Dm3QM01Z.js → sequenceDiagram-WJ2MYXX4-Br4F1sd7.js} +2 -2
- package/dist-embed/chunks/sequenceDiagram-WJ2MYXX4-GMFparx1.js +162 -0
- package/dist-embed/chunks/{si-LK-N5RQ5JYF-Dom-aTTE.js → si-LK-N5RQ5JYF-D7TIYEDr.js} +1 -1
- package/dist-embed/chunks/sizeCapture-INFHLROL-8qFOiWrK.js +1 -0
- package/dist-embed/chunks/sizeCapture-INFHLROL-C_M5Nl06.js +1 -0
- package/dist-embed/chunks/{sk-SK-C5VTKIMK-CLRU9TNq.js → sk-SK-C5VTKIMK-CQedcNlJ.js} +1 -1
- package/dist-embed/chunks/{sl-SI-NN7IZMDC-BKLCNVXA.js → sl-SI-NN7IZMDC-BX1W51zJ.js} +1 -1
- package/dist-embed/chunks/stateDiagram-D77RDMKH-CWrs6KzY.js +1 -0
- package/dist-embed/chunks/stateDiagram-D77RDMKH-XK76naDS.js +1 -0
- package/dist-embed/chunks/stateDiagram-v2-MP3YSRHH-D3ZN_IoS.js +1 -0
- package/dist-embed/chunks/stateDiagram-v2-MP3YSRHH-lpluVNfO.js +1 -0
- package/dist-embed/chunks/{subset-shared.chunk-zIH7OLsP.js → subset-shared.chunk-PVguOYyR.js} +1 -1
- package/dist-embed/chunks/{subset-worker.chunk-b9j7PKPe.js → subset-worker.chunk-iWGyr_E5.js} +1 -1
- package/dist-embed/chunks/{sv-SE-XGPEYMSR-D0UV0HV7.js → sv-SE-XGPEYMSR-DI7YcqUR.js} +1 -1
- package/dist-embed/chunks/swimlanes-42K2YHIH-B9qJ99nD.js +1 -0
- package/dist-embed/chunks/swimlanes-42K2YHIH-Ca0PhRmf.js +1 -0
- package/dist-embed/chunks/swimlanesDiagram-VR7AAH4N-BEQKTD21.js +8 -0
- package/dist-embed/chunks/swimlanesDiagram-VR7AAH4N-D-2e4UFJ.js +8 -0
- package/dist-embed/chunks/{ta-IN-2NMHFXQM-C-EJ3jDE.js → ta-IN-2NMHFXQM-OZH5xroe.js} +1 -1
- package/dist-embed/chunks/{th-TH-HPSO5L25-CfQh62Qa.js → th-TH-HPSO5L25-gAuWhBpT.js} +1 -1
- package/dist-embed/chunks/{timeline-definition-24CTP7MA-CKtubk73.js → timeline-definition-24CTP7MA-B8lxEouP.js} +2 -2
- package/dist-embed/chunks/timeline-definition-24CTP7MA-CtZZro9U.js +120 -0
- package/dist-embed/chunks/{tr-TR-DEFEU3FU-Lz7Ka2Zr.js → tr-TR-DEFEU3FU-DQ0SDuS6.js} +1 -1
- package/dist-embed/chunks/{uk-UA-QMV73CPH-DU0hsGUJ.js → uk-UA-QMV73CPH-7J4e2jng.js} +1 -1
- package/dist-embed/chunks/{vennDiagram-4TSXK5OY-Bq0xMhnH.js → vennDiagram-4TSXK5OY-Ca7szyFH.js} +2 -2
- package/dist-embed/chunks/vennDiagram-4TSXK5OY-zaNGkt8b.js +28 -0
- package/dist-embed/chunks/{vi-VN-M7AON7JQ-CDvS0SiL.js → vi-VN-M7AON7JQ-dNpZ5DZ5.js} +1 -1
- package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-DL5LgQWr.js → wardleyDiagram-VM6X3IG4-D_Q6gtp2.js} +2 -2
- package/dist-embed/chunks/wardleyDiagram-VM6X3IG4-Dh0UOrRp.js +78 -0
- package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-BXkM4beH.js → xychartDiagram-S5SC5T6Z-4OhI4XQl.js} +2 -2
- package/dist-embed/chunks/xychartDiagram-S5SC5T6Z-D_TaZM0k.js +7 -0
- package/dist-embed/chunks/{zh-CN-LNUGB5OW-CWE-bF0d.js → zh-CN-LNUGB5OW-CZSp2g8b.js} +1 -1
- package/dist-embed/chunks/{zh-HK-E62DVLB3-pEfL2bds.js → zh-HK-E62DVLB3-DUqVOyB_.js} +1 -1
- package/dist-embed/chunks/{zh-TW-RAJ6MFWO-Cp6UFUuD.js → zh-TW-RAJ6MFWO-U-TalxxN.js} +1 -1
- package/dist-embed/datalayer-app-main.js +3 -3
- package/lib/portable/attention.d.ts +204 -0
- package/lib/portable/attention.js +352 -0
- package/lib/portable/localApprovals.d.ts +72 -0
- package/lib/portable/localApprovals.js +125 -0
- package/lib/portable/localRuntime.d.ts +365 -0
- package/lib/portable/localRuntime.js +555 -0
- package/lib/portable/sessionList.d.ts +426 -0
- package/lib/portable/sessionList.js +618 -0
- package/package.json +1 -1
- package/dist-embed/chunks/abnfDiagram-VCTEODGH-m7LJLYga.js +0 -1
- package/dist-embed/chunks/classDiagram-ZZMXUADV-CGdcKCOI.js +0 -1
- package/dist-embed/chunks/classDiagram-v2-VYDZK3BY-CGdcKCOI.js +0 -1
- package/dist-embed/chunks/cose-bilkent-JH36ORCC-BsK2pWDL.js +0 -1
- package/dist-embed/chunks/cynefinDiagram-5FMLGOSQ-vmheD_S2.js +0 -62
- package/dist-embed/chunks/diagram-UQ7AKVKN-BFkOO3Wu.js +0 -41
- package/dist-embed/chunks/diagram-VX7I27RA-_LUOsaBb.js +0 -24
- package/dist-embed/chunks/diagram-Z3DM3KII-CY856Sry.js +0 -24
- package/dist-embed/chunks/ebnfDiagram-PWID7BFC-kqD9RLAA.js +0 -1
- package/dist-embed/chunks/gitGraphDiagram-WWUBYQGX-BujqTwbf.js +0 -106
- package/dist-embed/chunks/infoDiagram-27XIBGKW-C18Zz25F.js +0 -2
- package/dist-embed/chunks/pegDiagram-XKGWAZYB-BBVcHZ8T.js +0 -1
- package/dist-embed/chunks/railroadDiagram-O6MQD6OU-bR7xXZGS.js +0 -1
- package/dist-embed/chunks/sizeCapture-INFHLROL-BW7unDBA.js +0 -1
- package/dist-embed/chunks/stateDiagram-D77RDMKH-mLSMGpPQ.js +0 -1
- package/dist-embed/chunks/stateDiagram-v2-MP3YSRHH-C6TftAzE.js +0 -1
- package/dist-embed/chunks/swimlanes-42K2YHIH-BQTDK2Ta.js +0 -1
- package/dist-embed/chunks/swimlanesDiagram-VR7AAH4N-BV8Vb5g2.js +0 -8
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import type { SessionAttention } from './sessionList';
|
|
2
|
+
export type { SessionAttention } from './sessionList';
|
|
3
|
+
/** The Rules' classes of an action, as the Shield names them. */
|
|
4
|
+
export type ActionClass = 'read' | 'write' | 'send' | 'buy' | 'delete' | 'execute' | 'publish';
|
|
5
|
+
/** Every class, for a strict read of what an approval says. */
|
|
6
|
+
export declare const ACTION_CLASSES: readonly ActionClass[];
|
|
7
|
+
/**
|
|
8
|
+
* A coding agent's ACP `kind`, as a class: `read`, `search`, `fetch` read;
|
|
9
|
+
* `edit`, `move` write; `delete` deletes; `execute` executes; `other` is a
|
|
10
|
+
* write (fail closed), as the Shield maps them.
|
|
11
|
+
*/
|
|
12
|
+
export declare const ACP_KIND_CLASSES: Readonly<Record<string, ActionClass>>;
|
|
13
|
+
/** An approval, as the chat's banner holds it. */
|
|
14
|
+
export interface ApprovalRaised {
|
|
15
|
+
/** Its id where it is decided (ai-agents, or the local runtime). */
|
|
16
|
+
id: string;
|
|
17
|
+
/** The tool waiting on it. */
|
|
18
|
+
toolName: string;
|
|
19
|
+
/** Its arguments: read for the class only, never said in a notification. */
|
|
20
|
+
args: Record<string, unknown>;
|
|
21
|
+
/** The agent waiting on it. */
|
|
22
|
+
agentId: string;
|
|
23
|
+
/** When it was asked. */
|
|
24
|
+
requestedAt: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The class of what an approval asks: `_class` when it names one of the
|
|
28
|
+
* seven, else its ACP `_kind` mapped, else the verb its tool's name starts
|
|
29
|
+
* with; `write` when nothing says (fail closed, as `other` is).
|
|
30
|
+
*
|
|
31
|
+
* @param approval - Its tool and arguments.
|
|
32
|
+
*
|
|
33
|
+
* @returns One of the seven classes.
|
|
34
|
+
*/
|
|
35
|
+
export declare function actionClassOf(approval: Pick<ApprovalRaised, 'toolName' | 'args'>): ActionClass;
|
|
36
|
+
/** The notification's three answers, in their order. */
|
|
37
|
+
export declare const APPROVAL_ACTIONS: readonly ["Approve", "Decline", "Show"];
|
|
38
|
+
/** One of the notification's answers. */
|
|
39
|
+
export type ApprovalAction = (typeof APPROVAL_ACTIONS)[number];
|
|
40
|
+
/** What a host says of approvals and decisions. */
|
|
41
|
+
export declare const ATTENTION_WORDS: {
|
|
42
|
+
/**
|
|
43
|
+
* The sentence of a notification: *Support Desk asks to Run git push (execute)*.
|
|
44
|
+
*
|
|
45
|
+
* @param app - The application asking.
|
|
46
|
+
* @param action - What it asks to do, in words.
|
|
47
|
+
* @param cls - The action's class.
|
|
48
|
+
*
|
|
49
|
+
* @returns The sentence.
|
|
50
|
+
*/
|
|
51
|
+
readonly asks: (app: string, action: string, cls: ActionClass) => string;
|
|
52
|
+
readonly notShown: "Open the chat to read the whole request before deciding it: Show.";
|
|
53
|
+
readonly answeredElsewhere: "This approval was answered elsewhere.";
|
|
54
|
+
readonly gone: "This approval is no longer waiting.";
|
|
55
|
+
readonly approved: (action: string) => string;
|
|
56
|
+
readonly declined: (action: string) => string;
|
|
57
|
+
readonly refused: (status: number) => string;
|
|
58
|
+
readonly working: "Datalayer: working…";
|
|
59
|
+
readonly waiting: (count: number) => string;
|
|
60
|
+
readonly finished: (title: string) => string;
|
|
61
|
+
readonly asksYou: (title: string) => string;
|
|
62
|
+
readonly runtimeGone: (title: string) => string;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* The notification an approval is said as: the application, the action in
|
|
66
|
+
* words (`send_email` → *Send email*) and its class — never its arguments.
|
|
67
|
+
*
|
|
68
|
+
* @param app - The application asking.
|
|
69
|
+
* @param approval - What it asks: its tool and arguments.
|
|
70
|
+
*
|
|
71
|
+
* @returns The message and its answers.
|
|
72
|
+
*/
|
|
73
|
+
export declare function approvalNotification(app: string, approval: Pick<ApprovalRaised, 'toolName' | 'args'>): {
|
|
74
|
+
message: string;
|
|
75
|
+
actions: readonly ApprovalAction[];
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* The approvals to notify: those pending now that were not seen before —
|
|
79
|
+
* each is notified once, however often the banner is read again.
|
|
80
|
+
*
|
|
81
|
+
* @param seen - The ids notified already.
|
|
82
|
+
* @param pending - What is pending now.
|
|
83
|
+
*
|
|
84
|
+
* @returns The approvals not seen before, in the order asked.
|
|
85
|
+
*/
|
|
86
|
+
export declare function newlyRaised<T extends {
|
|
87
|
+
id: string;
|
|
88
|
+
}>(seen: ReadonlySet<string>, pending: readonly T[]): T[];
|
|
89
|
+
/**
|
|
90
|
+
* Whether a decision may be taken from the notification: only once the chat
|
|
91
|
+
* has shown the request whole at least once.
|
|
92
|
+
*
|
|
93
|
+
* @param shown - The ids the chat has shown.
|
|
94
|
+
* @param id - The approval to decide.
|
|
95
|
+
*
|
|
96
|
+
* @returns Whether deciding is allowed.
|
|
97
|
+
*/
|
|
98
|
+
export declare function decisionAllowed(shown: ReadonlySet<string>, id: string): boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Whether an approval read again still waits: decided only then.
|
|
101
|
+
*
|
|
102
|
+
* @param readAgain - The approval as read again, or null when the read failed.
|
|
103
|
+
*
|
|
104
|
+
* @returns Whether it is still pending.
|
|
105
|
+
*/
|
|
106
|
+
export declare function stillPending(readAgain: {
|
|
107
|
+
status?: unknown;
|
|
108
|
+
} | null | undefined): boolean;
|
|
109
|
+
/**
|
|
110
|
+
* What a decision came to, in a sentence: done; answered elsewhere (409);
|
|
111
|
+
* gone (404, which reveals nothing of it); refused with its status.
|
|
112
|
+
*
|
|
113
|
+
* @param status - The route's status.
|
|
114
|
+
* @param approved - Whether approval was asked.
|
|
115
|
+
* @param action - The action in words.
|
|
116
|
+
*
|
|
117
|
+
* @returns The sentence.
|
|
118
|
+
*/
|
|
119
|
+
export declare function decisionOutcome(status: number, approved: boolean, action: string): string;
|
|
120
|
+
/**
|
|
121
|
+
* One session in a sentence: *Open · answering — shield-mvp-claude-code*.
|
|
122
|
+
*
|
|
123
|
+
* @param session - Its state, turn and agent.
|
|
124
|
+
*
|
|
125
|
+
* @returns The sentence.
|
|
126
|
+
*/
|
|
127
|
+
export declare function sessionSaid(session: SessionAttention): string;
|
|
128
|
+
/**
|
|
129
|
+
* The sessions waiting for the person: open, their turn waiting.
|
|
130
|
+
*
|
|
131
|
+
* @param sessions - The sessions watched.
|
|
132
|
+
*
|
|
133
|
+
* @returns The waiting ones, in order.
|
|
134
|
+
*/
|
|
135
|
+
export declare function waitingSessions(sessions: readonly SessionAttention[]): SessionAttention[];
|
|
136
|
+
/**
|
|
137
|
+
* What a dock badge counts (DK-14): the sessions waiting for the person.
|
|
138
|
+
*
|
|
139
|
+
* @param sessions - The sessions watched.
|
|
140
|
+
*
|
|
141
|
+
* @returns The count; zero clears the badge.
|
|
142
|
+
*/
|
|
143
|
+
export declare function badgeCount(sessions: readonly SessionAttention[]): number;
|
|
144
|
+
/**
|
|
145
|
+
* The status bar's item (VS-10): *Datalayer: 2 waiting for you* when sessions
|
|
146
|
+
* wait (the first waiting one is what a click opens), *Datalayer: working…*
|
|
147
|
+
* while a turn of any runs, nothing otherwise. The tooltip says the
|
|
148
|
+
* session in front.
|
|
149
|
+
*
|
|
150
|
+
* @param sessions - The sessions watched.
|
|
151
|
+
*
|
|
152
|
+
* @returns The item, or null when it is hidden.
|
|
153
|
+
*/
|
|
154
|
+
export declare function statusBarItem(sessions: readonly SessionAttention[]): {
|
|
155
|
+
text: string;
|
|
156
|
+
tooltip: string;
|
|
157
|
+
first: string | null;
|
|
158
|
+
} | null;
|
|
159
|
+
/** One entry of a tray's menu (DK-14). */
|
|
160
|
+
export interface TrayEntry {
|
|
161
|
+
/** The session's key, or empty for the heading. */
|
|
162
|
+
key: string;
|
|
163
|
+
label: string;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* The tray's menu: a heading with the count, then one *Open* entry per
|
|
167
|
+
* session waiting for the person; *Nothing waits for you* when none does.
|
|
168
|
+
*
|
|
169
|
+
* @param sessions - The sessions watched.
|
|
170
|
+
*
|
|
171
|
+
* @returns The entries, the heading first.
|
|
172
|
+
*/
|
|
173
|
+
export declare function trayMenuOf(sessions: readonly SessionAttention[]): TrayEntry[];
|
|
174
|
+
/** A notification about a session's turn. */
|
|
175
|
+
export interface TurnNotice {
|
|
176
|
+
key: string;
|
|
177
|
+
title: string;
|
|
178
|
+
said: string;
|
|
179
|
+
/** What fired it. */
|
|
180
|
+
kind: 'finished' | 'asks' | 'gone';
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* The turns to notify between two readings: a session **not in front**
|
|
184
|
+
* whose turn was running and is not any more (the first line of its answer,
|
|
185
|
+
* else that it finished), whose turn came to wait for the person (a
|
|
186
|
+
* question, `loop.ask`), or whose runtime went away. The session in front
|
|
187
|
+
* is never notified; a session first seen is not.
|
|
188
|
+
*
|
|
189
|
+
* @param before - The sessions as last read.
|
|
190
|
+
* @param after - The sessions as read now.
|
|
191
|
+
*
|
|
192
|
+
* @returns The notices, in the order of `after`.
|
|
193
|
+
*/
|
|
194
|
+
export declare function finishedTurns(before: readonly SessionAttention[], after: readonly SessionAttention[]): TurnNotice[];
|
|
195
|
+
/**
|
|
196
|
+
* How the OS cues the person (DK-14, Omnigent's rule): a banner when the
|
|
197
|
+
* host is not in front; a dock bounce or a taskbar flash when it is, so
|
|
198
|
+
* nothing covers what they look at.
|
|
199
|
+
*
|
|
200
|
+
* @param frontmost - Whether the host's window is focused.
|
|
201
|
+
*
|
|
202
|
+
* @returns `banner` or `cue`.
|
|
203
|
+
*/
|
|
204
|
+
export declare function cueOf(frontmost: boolean): 'banner' | 'cue';
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* What a host says outside the chat about a session, and when (VSCODE
|
|
7
|
+
* VS-07, VS-10; DESKTOP DK-14, DK-25): the approvals, the questions, the
|
|
8
|
+
* finished turns, a runtime gone — pure, no host API, no React.
|
|
9
|
+
*
|
|
10
|
+
* - **An approval raised** — an *ask me first* decision — is said as a
|
|
11
|
+
* notification that names the application, the action and its class
|
|
12
|
+
* (*read*, *write*, *send*, *buy*, *delete*, *execute*, *publish*) and
|
|
13
|
+
* never its arguments (DESKTOP decision D-8: a notification is read on a
|
|
14
|
+
* lock screen): the request is read whole in the chat, and a decision
|
|
15
|
+
* from the notification is allowed only once the chat has shown it. The
|
|
16
|
+
* decision goes through the place's one way after the approval is read
|
|
17
|
+
* again: one answered elsewhere (409, or no longer pending) is said so;
|
|
18
|
+
* one that is gone (404) reveals nothing.
|
|
19
|
+
* - **The count** of sessions waiting for the person: the editor's status
|
|
20
|
+
* bar, the desktop's dock badge and tray.
|
|
21
|
+
* - **A finished turn**, a question asked or a runtime gone, of a session
|
|
22
|
+
* the chat does not show, is said as a notification with the first line
|
|
23
|
+
* of its answer; the session in front is never notified (what the person
|
|
24
|
+
* is looking at needs no toast).
|
|
25
|
+
*
|
|
26
|
+
* @module portable/attention
|
|
27
|
+
*/
|
|
28
|
+
import { actionOf } from './approvalCard';
|
|
29
|
+
/** Every class, for a strict read of what an approval says. */
|
|
30
|
+
export const ACTION_CLASSES = [
|
|
31
|
+
'read',
|
|
32
|
+
'write',
|
|
33
|
+
'send',
|
|
34
|
+
'buy',
|
|
35
|
+
'delete',
|
|
36
|
+
'execute',
|
|
37
|
+
'publish',
|
|
38
|
+
];
|
|
39
|
+
/**
|
|
40
|
+
* A coding agent's ACP `kind`, as a class: `read`, `search`, `fetch` read;
|
|
41
|
+
* `edit`, `move` write; `delete` deletes; `execute` executes; `other` is a
|
|
42
|
+
* write (fail closed), as the Shield maps them.
|
|
43
|
+
*/
|
|
44
|
+
export const ACP_KIND_CLASSES = {
|
|
45
|
+
read: 'read',
|
|
46
|
+
search: 'read',
|
|
47
|
+
fetch: 'read',
|
|
48
|
+
edit: 'write',
|
|
49
|
+
move: 'write',
|
|
50
|
+
delete: 'delete',
|
|
51
|
+
execute: 'execute',
|
|
52
|
+
other: 'write',
|
|
53
|
+
};
|
|
54
|
+
/** The verbs a tool's name starts with, when the approval names no class. */
|
|
55
|
+
const NAMED_CLASSES = [
|
|
56
|
+
[/^(run|exec|execute|shell|bash|terminal|command)\b/i, 'execute'],
|
|
57
|
+
[/^(delete|remove|rm|drop|unlink)\b/i, 'delete'],
|
|
58
|
+
[/^(send|mail|email|reply|message|post)\b/i, 'send'],
|
|
59
|
+
[/^(publish|deploy|release|push)\b/i, 'publish'],
|
|
60
|
+
[/^(buy|pay|purchase|order|charge)\b/i, 'buy'],
|
|
61
|
+
[/^(read|search|fetch|grep|glob|list|find|get|view|open|cat)\b/i, 'read'],
|
|
62
|
+
];
|
|
63
|
+
const text = (value) => typeof value === 'string' ? value : '';
|
|
64
|
+
/**
|
|
65
|
+
* The class of what an approval asks: `_class` when it names one of the
|
|
66
|
+
* seven, else its ACP `_kind` mapped, else the verb its tool's name starts
|
|
67
|
+
* with; `write` when nothing says (fail closed, as `other` is).
|
|
68
|
+
*
|
|
69
|
+
* @param approval - Its tool and arguments.
|
|
70
|
+
*
|
|
71
|
+
* @returns One of the seven classes.
|
|
72
|
+
*/
|
|
73
|
+
export function actionClassOf(approval) {
|
|
74
|
+
const named = text(approval.args._class).toLowerCase();
|
|
75
|
+
if (ACTION_CLASSES.includes(named)) {
|
|
76
|
+
return named;
|
|
77
|
+
}
|
|
78
|
+
const kind = ACP_KIND_CLASSES[text(approval.args._kind).toLowerCase()];
|
|
79
|
+
if (kind) {
|
|
80
|
+
return kind;
|
|
81
|
+
}
|
|
82
|
+
const words = approval.toolName.replace(/[_\-.:/]+/g, ' ').trim();
|
|
83
|
+
for (const [verb, cls] of NAMED_CLASSES) {
|
|
84
|
+
if (verb.test(words)) {
|
|
85
|
+
return cls;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return 'write';
|
|
89
|
+
}
|
|
90
|
+
/** The notification's three answers, in their order. */
|
|
91
|
+
export const APPROVAL_ACTIONS = ['Approve', 'Decline', 'Show'];
|
|
92
|
+
/** What a host says of approvals and decisions. */
|
|
93
|
+
export const ATTENTION_WORDS = {
|
|
94
|
+
/**
|
|
95
|
+
* The sentence of a notification: *Support Desk asks to Run git push (execute)*.
|
|
96
|
+
*
|
|
97
|
+
* @param app - The application asking.
|
|
98
|
+
* @param action - What it asks to do, in words.
|
|
99
|
+
* @param cls - The action's class.
|
|
100
|
+
*
|
|
101
|
+
* @returns The sentence.
|
|
102
|
+
*/
|
|
103
|
+
asks: (app, action, cls) => `${app} asks to ${action} (${cls})`,
|
|
104
|
+
notShown: 'Open the chat to read the whole request before deciding it: Show.',
|
|
105
|
+
answeredElsewhere: 'This approval was answered elsewhere.',
|
|
106
|
+
gone: 'This approval is no longer waiting.',
|
|
107
|
+
approved: (action) => `Approved: ${action}.`,
|
|
108
|
+
declined: (action) => `Declined: ${action}.`,
|
|
109
|
+
refused: (status) => `The decision was refused (${status}).`,
|
|
110
|
+
working: 'Datalayer: working…',
|
|
111
|
+
waiting: (count) => `Datalayer: ${count} waiting for you`,
|
|
112
|
+
finished: (title) => `${title} finished its turn.`,
|
|
113
|
+
asksYou: (title) => `${title} is waiting for you.`,
|
|
114
|
+
runtimeGone: (title) => `${title}: its runtime went away.`,
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* The notification an approval is said as: the application, the action in
|
|
118
|
+
* words (`send_email` → *Send email*) and its class — never its arguments.
|
|
119
|
+
*
|
|
120
|
+
* @param app - The application asking.
|
|
121
|
+
* @param approval - What it asks: its tool and arguments.
|
|
122
|
+
*
|
|
123
|
+
* @returns The message and its answers.
|
|
124
|
+
*/
|
|
125
|
+
export function approvalNotification(app, approval) {
|
|
126
|
+
return {
|
|
127
|
+
message: ATTENTION_WORDS.asks(app, actionOf(approval.toolName), actionClassOf(approval)),
|
|
128
|
+
actions: APPROVAL_ACTIONS,
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* The approvals to notify: those pending now that were not seen before —
|
|
133
|
+
* each is notified once, however often the banner is read again.
|
|
134
|
+
*
|
|
135
|
+
* @param seen - The ids notified already.
|
|
136
|
+
* @param pending - What is pending now.
|
|
137
|
+
*
|
|
138
|
+
* @returns The approvals not seen before, in the order asked.
|
|
139
|
+
*/
|
|
140
|
+
export function newlyRaised(seen, pending) {
|
|
141
|
+
return pending.filter(approval => !seen.has(approval.id));
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Whether a decision may be taken from the notification: only once the chat
|
|
145
|
+
* has shown the request whole at least once.
|
|
146
|
+
*
|
|
147
|
+
* @param shown - The ids the chat has shown.
|
|
148
|
+
* @param id - The approval to decide.
|
|
149
|
+
*
|
|
150
|
+
* @returns Whether deciding is allowed.
|
|
151
|
+
*/
|
|
152
|
+
export function decisionAllowed(shown, id) {
|
|
153
|
+
return shown.has(id);
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Whether an approval read again still waits: decided only then.
|
|
157
|
+
*
|
|
158
|
+
* @param readAgain - The approval as read again, or null when the read failed.
|
|
159
|
+
*
|
|
160
|
+
* @returns Whether it is still pending.
|
|
161
|
+
*/
|
|
162
|
+
export function stillPending(readAgain) {
|
|
163
|
+
return Boolean(readAgain) && text(readAgain?.status) === 'pending';
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* What a decision came to, in a sentence: done; answered elsewhere (409);
|
|
167
|
+
* gone (404, which reveals nothing of it); refused with its status.
|
|
168
|
+
*
|
|
169
|
+
* @param status - The route's status.
|
|
170
|
+
* @param approved - Whether approval was asked.
|
|
171
|
+
* @param action - The action in words.
|
|
172
|
+
*
|
|
173
|
+
* @returns The sentence.
|
|
174
|
+
*/
|
|
175
|
+
export function decisionOutcome(status, approved, action) {
|
|
176
|
+
if (status >= 200 && status < 300) {
|
|
177
|
+
return approved
|
|
178
|
+
? ATTENTION_WORDS.approved(action)
|
|
179
|
+
: ATTENTION_WORDS.declined(action);
|
|
180
|
+
}
|
|
181
|
+
if (status === 409) {
|
|
182
|
+
return ATTENTION_WORDS.answeredElsewhere;
|
|
183
|
+
}
|
|
184
|
+
if (status === 404) {
|
|
185
|
+
return ATTENTION_WORDS.gone;
|
|
186
|
+
}
|
|
187
|
+
return ATTENTION_WORDS.refused(status);
|
|
188
|
+
}
|
|
189
|
+
/** The turn's phase in words, after the state. */
|
|
190
|
+
const phaseWords = {
|
|
191
|
+
idle: '',
|
|
192
|
+
running: 'answering',
|
|
193
|
+
waiting: 'waiting for you',
|
|
194
|
+
'': '',
|
|
195
|
+
};
|
|
196
|
+
/**
|
|
197
|
+
* One session in a sentence: *Open · answering — shield-mvp-claude-code*.
|
|
198
|
+
*
|
|
199
|
+
* @param session - Its state, turn and agent.
|
|
200
|
+
*
|
|
201
|
+
* @returns The sentence.
|
|
202
|
+
*/
|
|
203
|
+
export function sessionSaid(session) {
|
|
204
|
+
const state = session.state.charAt(0).toUpperCase() + session.state.slice(1);
|
|
205
|
+
const phase = session.state === 'open' ? phaseWords[session.turn] : '';
|
|
206
|
+
const stated = phase ? `${state} · ${phase}` : state;
|
|
207
|
+
return session.agent ? `${stated} — ${session.agent}` : stated;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* The sessions waiting for the person: open, their turn waiting.
|
|
211
|
+
*
|
|
212
|
+
* @param sessions - The sessions watched.
|
|
213
|
+
*
|
|
214
|
+
* @returns The waiting ones, in order.
|
|
215
|
+
*/
|
|
216
|
+
export function waitingSessions(sessions) {
|
|
217
|
+
return sessions.filter(session => session.state === 'open' && session.turn === 'waiting');
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* What a dock badge counts (DK-14): the sessions waiting for the person.
|
|
221
|
+
*
|
|
222
|
+
* @param sessions - The sessions watched.
|
|
223
|
+
*
|
|
224
|
+
* @returns The count; zero clears the badge.
|
|
225
|
+
*/
|
|
226
|
+
export function badgeCount(sessions) {
|
|
227
|
+
return waitingSessions(sessions).length;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* The status bar's item (VS-10): *Datalayer: 2 waiting for you* when sessions
|
|
231
|
+
* wait (the first waiting one is what a click opens), *Datalayer: working…*
|
|
232
|
+
* while a turn of any runs, nothing otherwise. The tooltip says the
|
|
233
|
+
* session in front.
|
|
234
|
+
*
|
|
235
|
+
* @param sessions - The sessions watched.
|
|
236
|
+
*
|
|
237
|
+
* @returns The item, or null when it is hidden.
|
|
238
|
+
*/
|
|
239
|
+
export function statusBarItem(sessions) {
|
|
240
|
+
const open = sessions.filter(session => session.state === 'open');
|
|
241
|
+
const waiting = open.filter(session => session.turn === 'waiting');
|
|
242
|
+
const running = open.filter(session => session.turn === 'running');
|
|
243
|
+
const front = sessions.find(session => session.inFront);
|
|
244
|
+
const tooltip = front ? `${front.title}: ${sessionSaid(front)}` : '';
|
|
245
|
+
const [firstWaiting] = waiting;
|
|
246
|
+
if (firstWaiting) {
|
|
247
|
+
return {
|
|
248
|
+
text: ATTENTION_WORDS.waiting(waiting.length),
|
|
249
|
+
tooltip: tooltip || `${firstWaiting.title}: ${sessionSaid(firstWaiting)}`,
|
|
250
|
+
first: firstWaiting.key,
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
const [firstRunning] = running;
|
|
254
|
+
if (firstRunning) {
|
|
255
|
+
return {
|
|
256
|
+
text: ATTENTION_WORDS.working,
|
|
257
|
+
tooltip: tooltip || `${firstRunning.title}: ${sessionSaid(firstRunning)}`,
|
|
258
|
+
first: firstRunning.key,
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
return null;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* The tray's menu: a heading with the count, then one *Open* entry per
|
|
265
|
+
* session waiting for the person; *Nothing waits for you* when none does.
|
|
266
|
+
*
|
|
267
|
+
* @param sessions - The sessions watched.
|
|
268
|
+
*
|
|
269
|
+
* @returns The entries, the heading first.
|
|
270
|
+
*/
|
|
271
|
+
export function trayMenuOf(sessions) {
|
|
272
|
+
const waiting = waitingSessions(sessions);
|
|
273
|
+
if (waiting.length === 0) {
|
|
274
|
+
return [{ key: '', label: 'Nothing waits for you' }];
|
|
275
|
+
}
|
|
276
|
+
return [
|
|
277
|
+
{ key: '', label: ATTENTION_WORDS.waiting(waiting.length) },
|
|
278
|
+
...waiting.map(session => ({
|
|
279
|
+
key: session.key,
|
|
280
|
+
label: `Open ${session.title || session.key}`,
|
|
281
|
+
})),
|
|
282
|
+
];
|
|
283
|
+
}
|
|
284
|
+
const firstLine = (value) => (value ?? '').split('\n').find(line => line.trim()) ?? '';
|
|
285
|
+
/**
|
|
286
|
+
* The turns to notify between two readings: a session **not in front**
|
|
287
|
+
* whose turn was running and is not any more (the first line of its answer,
|
|
288
|
+
* else that it finished), whose turn came to wait for the person (a
|
|
289
|
+
* question, `loop.ask`), or whose runtime went away. The session in front
|
|
290
|
+
* is never notified; a session first seen is not.
|
|
291
|
+
*
|
|
292
|
+
* @param before - The sessions as last read.
|
|
293
|
+
* @param after - The sessions as read now.
|
|
294
|
+
*
|
|
295
|
+
* @returns The notices, in the order of `after`.
|
|
296
|
+
*/
|
|
297
|
+
export function finishedTurns(before, after) {
|
|
298
|
+
const was = new Map(before.map(session => [session.key, session]));
|
|
299
|
+
const notices = [];
|
|
300
|
+
for (const session of after) {
|
|
301
|
+
if (session.inFront) {
|
|
302
|
+
continue;
|
|
303
|
+
}
|
|
304
|
+
const earlier = was.get(session.key);
|
|
305
|
+
if (!earlier) {
|
|
306
|
+
continue;
|
|
307
|
+
}
|
|
308
|
+
const title = session.title || session.key;
|
|
309
|
+
if (earlier.held !== false && session.held === false) {
|
|
310
|
+
notices.push({
|
|
311
|
+
key: session.key,
|
|
312
|
+
title,
|
|
313
|
+
said: ATTENTION_WORDS.runtimeGone(title),
|
|
314
|
+
kind: 'gone',
|
|
315
|
+
});
|
|
316
|
+
continue;
|
|
317
|
+
}
|
|
318
|
+
if (session.state !== 'open') {
|
|
319
|
+
continue;
|
|
320
|
+
}
|
|
321
|
+
if (earlier.turn !== 'waiting' && session.turn === 'waiting') {
|
|
322
|
+
notices.push({
|
|
323
|
+
key: session.key,
|
|
324
|
+
title,
|
|
325
|
+
said: ATTENTION_WORDS.asksYou(title),
|
|
326
|
+
kind: 'asks',
|
|
327
|
+
});
|
|
328
|
+
continue;
|
|
329
|
+
}
|
|
330
|
+
if (earlier.turn === 'running' && session.turn !== 'running') {
|
|
331
|
+
notices.push({
|
|
332
|
+
key: session.key,
|
|
333
|
+
title,
|
|
334
|
+
said: firstLine(session.lastAnswer) || ATTENTION_WORDS.finished(title),
|
|
335
|
+
kind: 'finished',
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
return notices;
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* How the OS cues the person (DK-14, Omnigent's rule): a banner when the
|
|
343
|
+
* host is not in front; a dock bounce or a taskbar flash when it is, so
|
|
344
|
+
* nothing covers what they look at.
|
|
345
|
+
*
|
|
346
|
+
* @param frontmost - Whether the host's window is focused.
|
|
347
|
+
*
|
|
348
|
+
* @returns `banner` or `cue`.
|
|
349
|
+
*/
|
|
350
|
+
export function cueOf(frontmost) {
|
|
351
|
+
return frontmost ? 'cue' : 'banner';
|
|
352
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A local session's approvals (VSCODE VS-07, DESKTOP DK-13, the local
|
|
3
|
+
* place): a local runtime decides an *ask me first* request over its
|
|
4
|
+
* websocket (`/api/v1/tool-approvals/ws`) — it sends `agent.snapshot`
|
|
5
|
+
* messages listing the approvals as they stand, and takes
|
|
6
|
+
* `tool_approval_decision` messages — not over an HTTP route
|
|
7
|
+
* (`routes/tool_approvals.py` has no other). What is read from a snapshot,
|
|
8
|
+
* what a decision is sent as, and what a decision came to once the next
|
|
9
|
+
* snapshot no longer lists the approval. Pure: no host API, no socket.
|
|
10
|
+
*
|
|
11
|
+
* @module portable/localApprovals
|
|
12
|
+
*/
|
|
13
|
+
import { type ApprovalRaised } from './attention';
|
|
14
|
+
/** The agent of a local runtime's sessions: the runtime names it `default`. */
|
|
15
|
+
export declare const LOCAL_AGENT_ID = "default";
|
|
16
|
+
/** What the local approval source says. */
|
|
17
|
+
export declare const LOCAL_APPROVAL_WORDS: {
|
|
18
|
+
readonly notConfirmed: "The local runtime did not confirm the decision in time: decide it in the chat.";
|
|
19
|
+
readonly socketGone: (folderName: string) => string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Where the local runtime's approvals are decided: its websocket, for one agent.
|
|
23
|
+
*
|
|
24
|
+
* @param runtimeUrl - The local runtime's address (`http://127.0.0.1:<port>`).
|
|
25
|
+
* @param agentId - The agent whose approvals are read.
|
|
26
|
+
*
|
|
27
|
+
* @returns The websocket URL.
|
|
28
|
+
*/
|
|
29
|
+
export declare function localApprovalsSocketUrl(runtimeUrl: string, agentId?: string): string;
|
|
30
|
+
/**
|
|
31
|
+
* Whether a websocket message is a snapshot of the agent (`agent.snapshot`).
|
|
32
|
+
*
|
|
33
|
+
* @param message - The message, parsed.
|
|
34
|
+
*
|
|
35
|
+
* @returns Whether it is one.
|
|
36
|
+
*/
|
|
37
|
+
export declare function isSnapshot(message: unknown): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* The approvals still pending in a snapshot, for one agent: read strictly,
|
|
40
|
+
* a row without an id or a tool left out.
|
|
41
|
+
*
|
|
42
|
+
* @param message - The `agent.snapshot` message, parsed.
|
|
43
|
+
* @param agentId - The agent whose approvals are kept.
|
|
44
|
+
*
|
|
45
|
+
* @returns The pending approvals, in the snapshot's order.
|
|
46
|
+
*/
|
|
47
|
+
export declare function approvalsOfSnapshot(message: unknown, agentId?: string): ApprovalRaised[];
|
|
48
|
+
/**
|
|
49
|
+
* The decision as the runtime's websocket takes it.
|
|
50
|
+
*
|
|
51
|
+
* @param approvalId - The approval decided.
|
|
52
|
+
* @param approved - Whether it is approved.
|
|
53
|
+
* @param note - A note, when the person left one.
|
|
54
|
+
*
|
|
55
|
+
* @returns The message to send, serialized.
|
|
56
|
+
*/
|
|
57
|
+
export declare function decisionMessage(approvalId: string, approved: boolean, note?: string): string;
|
|
58
|
+
/**
|
|
59
|
+
* What a decision came to, read from the snapshots: nothing while the
|
|
60
|
+
* approval is still listed pending; the sentence (done, as the route's 200
|
|
61
|
+
* would say it) once it is no longer; *answered elsewhere* when it was not
|
|
62
|
+
* pending when the decision was asked.
|
|
63
|
+
*
|
|
64
|
+
* @param pendingWhenAsked - Whether the approval was pending when asked.
|
|
65
|
+
* @param pendingNow - The approvals pending in the latest snapshot.
|
|
66
|
+
* @param approvalId - The approval decided.
|
|
67
|
+
* @param approved - Whether approval was asked.
|
|
68
|
+
* @param action - The action in words, for the sentence.
|
|
69
|
+
*
|
|
70
|
+
* @returns The sentence, or null while nothing says yet.
|
|
71
|
+
*/
|
|
72
|
+
export declare function decisionSettled(pendingWhenAsked: boolean, pendingNow: readonly Pick<ApprovalRaised, 'id'>[], approvalId: string, approved: boolean, action: string): string | null;
|