@namzu/cli 34.1.1 → 36.0.0
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/CHANGELOG.md +800 -0
- package/README.md +160 -394
- package/assets/pal-blender-mcp.py +123 -0
- package/assets/pal-godot-mcp-pin.json +135 -0
- package/assets/pal-godot-mcp.cjs +418 -0
- package/dist/bin-main.d.ts +3 -0
- package/dist/bin-main.d.ts.map +1 -0
- package/dist/bin.d.ts +2 -1
- package/dist/bin.d.ts.map +1 -1
- package/dist/bin.js +85 -23
- package/dist/bin.js.map +6 -1
- package/dist/boot-narrative.d.ts +16 -0
- package/dist/boot-narrative.d.ts.map +1 -0
- package/dist/checkpoints/manifest.d.ts +107 -0
- package/dist/checkpoints/manifest.d.ts.map +1 -0
- package/dist/checkpoints/store.d.ts +280 -40
- package/dist/checkpoints/store.d.ts.map +1 -1
- package/dist/checkpoints/undo-plan.d.ts +83 -0
- package/dist/checkpoints/undo-plan.d.ts.map +1 -0
- package/dist/checkpoints/wrap.d.ts +4 -0
- package/dist/checkpoints/wrap.d.ts.map +1 -1
- package/dist/chunks/acp-BOSEA4R3.js +13448 -0
- package/dist/chunks/acp-BOSEA4R3.js.map +6 -0
- package/dist/chunks/activity-command-ACS7KL3C.js +262 -0
- package/dist/chunks/activity-command-ACS7KL3C.js.map +6 -0
- package/dist/chunks/add-DLS54YKS.js +712 -0
- package/dist/chunks/add-DLS54YKS.js.map +6 -0
- package/dist/chunks/agent-GV3DWYQC.js +87 -0
- package/dist/chunks/agent-GV3DWYQC.js.map +6 -0
- package/dist/chunks/agent-session-7VE6GJJH.js +46 -0
- package/dist/chunks/agent-session-7VE6GJJH.js.map +6 -0
- package/dist/chunks/archive-6ZENIEBP.js +84 -0
- package/dist/chunks/archive-6ZENIEBP.js.map +6 -0
- package/dist/chunks/bin-main-NFFT5ZIU.js +126 -0
- package/dist/chunks/bin-main-NFFT5ZIU.js.map +6 -0
- package/dist/chunks/browser-VT2U6NG2.js +31 -0
- package/dist/chunks/browser-VT2U6NG2.js.map +6 -0
- package/dist/chunks/chat-UNYVLDFL.js +101 -0
- package/dist/chunks/chat-UNYVLDFL.js.map +6 -0
- package/dist/chunks/chunk-2IL6OG3X.js +311 -0
- package/dist/chunks/chunk-2IL6OG3X.js.map +6 -0
- package/dist/chunks/chunk-2RBYHHLM.js +319 -0
- package/dist/chunks/chunk-2RBYHHLM.js.map +6 -0
- package/dist/chunks/chunk-42ZK2AH4.js +71 -0
- package/dist/chunks/chunk-42ZK2AH4.js.map +6 -0
- package/dist/chunks/chunk-5PQVJBIO.js +168 -0
- package/dist/chunks/chunk-5PQVJBIO.js.map +6 -0
- package/dist/chunks/chunk-6CPT2ZBS.js +75 -0
- package/dist/chunks/chunk-6CPT2ZBS.js.map +6 -0
- package/dist/chunks/chunk-6LLJQ3KY.js +225 -0
- package/dist/chunks/chunk-6LLJQ3KY.js.map +6 -0
- package/dist/chunks/chunk-6YFJDVGA.js +161 -0
- package/dist/chunks/chunk-6YFJDVGA.js.map +6 -0
- package/dist/chunks/chunk-6YG7D7U4.js +159 -0
- package/dist/chunks/chunk-6YG7D7U4.js.map +6 -0
- package/dist/chunks/chunk-6ZPODOJN.js +828 -0
- package/dist/chunks/chunk-6ZPODOJN.js.map +6 -0
- package/dist/chunks/chunk-76FLAFCG.js +51 -0
- package/dist/chunks/chunk-76FLAFCG.js.map +6 -0
- package/dist/chunks/chunk-7HCPD673.js +25326 -0
- package/dist/chunks/chunk-7HCPD673.js.map +6 -0
- package/dist/chunks/chunk-7KWGR2YA.js +257 -0
- package/dist/chunks/chunk-7KWGR2YA.js.map +6 -0
- package/dist/chunks/chunk-A22MBIYU.js +42 -0
- package/dist/chunks/chunk-A22MBIYU.js.map +6 -0
- package/dist/chunks/chunk-AHIDYIRB.js +329 -0
- package/dist/chunks/chunk-AHIDYIRB.js.map +6 -0
- package/dist/chunks/chunk-AK2U3N2A.js +31 -0
- package/dist/chunks/chunk-AK2U3N2A.js.map +6 -0
- package/dist/chunks/chunk-AKKRZTPB.js +283 -0
- package/dist/chunks/chunk-AKKRZTPB.js.map +6 -0
- package/dist/chunks/chunk-BCZR2B3Y.js +97 -0
- package/dist/chunks/chunk-BCZR2B3Y.js.map +6 -0
- package/dist/chunks/chunk-CHIEVVQ2.js +32 -0
- package/dist/chunks/chunk-CHIEVVQ2.js.map +6 -0
- package/dist/chunks/chunk-D67YBUO3.js +110 -0
- package/dist/chunks/chunk-D67YBUO3.js.map +6 -0
- package/dist/chunks/chunk-DIHEHK7K.js +765 -0
- package/dist/chunks/chunk-DIHEHK7K.js.map +6 -0
- package/dist/chunks/chunk-E5VLANCO.js +101 -0
- package/dist/chunks/chunk-E5VLANCO.js.map +6 -0
- package/dist/chunks/chunk-EEDZOGV4.js +47 -0
- package/dist/chunks/chunk-EEDZOGV4.js.map +6 -0
- package/dist/chunks/chunk-ENGNEELC.js +271 -0
- package/dist/chunks/chunk-ENGNEELC.js.map +6 -0
- package/dist/chunks/chunk-EVY4MVRE.js +74 -0
- package/dist/chunks/chunk-EVY4MVRE.js.map +6 -0
- package/dist/chunks/chunk-FJNDNNNQ.js +115 -0
- package/dist/chunks/chunk-FJNDNNNQ.js.map +6 -0
- package/dist/chunks/chunk-FOFGMP7O.js +20 -0
- package/dist/chunks/chunk-FOFGMP7O.js.map +6 -0
- package/dist/chunks/chunk-FTMTO72X.js +95 -0
- package/dist/chunks/chunk-FTMTO72X.js.map +6 -0
- package/dist/chunks/chunk-GIXSS6KW.js +2228 -0
- package/dist/chunks/chunk-GIXSS6KW.js.map +6 -0
- package/dist/chunks/chunk-GNBMKISG.js +19 -0
- package/dist/chunks/chunk-GNBMKISG.js.map +6 -0
- package/dist/chunks/chunk-GWQEMJFS.js +28 -0
- package/dist/chunks/chunk-GWQEMJFS.js.map +6 -0
- package/dist/chunks/chunk-H6B6AROX.js +151 -0
- package/dist/chunks/chunk-H6B6AROX.js.map +6 -0
- package/dist/chunks/chunk-HE7WUOX2.js +26 -0
- package/dist/chunks/chunk-HE7WUOX2.js.map +6 -0
- package/dist/chunks/chunk-HZBKWL42.js +303 -0
- package/dist/chunks/chunk-HZBKWL42.js.map +6 -0
- package/dist/chunks/chunk-I7HQR6ET.js +75 -0
- package/dist/chunks/chunk-I7HQR6ET.js.map +6 -0
- package/dist/chunks/chunk-IJEB77SH.js +648 -0
- package/dist/chunks/chunk-IJEB77SH.js.map +6 -0
- package/dist/chunks/chunk-JNPDWME5.js +675 -0
- package/dist/chunks/chunk-JNPDWME5.js.map +6 -0
- package/dist/chunks/chunk-JORONMD3.js +18 -0
- package/dist/chunks/chunk-JORONMD3.js.map +6 -0
- package/dist/chunks/chunk-JV3LONAU.js +76 -0
- package/dist/chunks/chunk-JV3LONAU.js.map +6 -0
- package/dist/chunks/chunk-K5HARZ7G.js +82516 -0
- package/dist/chunks/chunk-K5HARZ7G.js.map +6 -0
- package/dist/chunks/chunk-KONYGNG6.js +7661 -0
- package/dist/chunks/chunk-KONYGNG6.js.map +6 -0
- package/dist/chunks/chunk-LXB3S4IC.js +19 -0
- package/dist/chunks/chunk-LXB3S4IC.js.map +6 -0
- package/dist/chunks/chunk-M3IAMIBJ.js +661 -0
- package/dist/chunks/chunk-M3IAMIBJ.js.map +6 -0
- package/dist/chunks/chunk-MH6KUKVV.js +1142 -0
- package/dist/chunks/chunk-MH6KUKVV.js.map +6 -0
- package/dist/chunks/chunk-MS3IYQ72.js +1479 -0
- package/dist/chunks/chunk-MS3IYQ72.js.map +6 -0
- package/dist/chunks/chunk-MZP6SH3M.js +3497 -0
- package/dist/chunks/chunk-MZP6SH3M.js.map +6 -0
- package/dist/chunks/chunk-N3ZEXVSS.js +76 -0
- package/dist/chunks/chunk-N3ZEXVSS.js.map +6 -0
- package/dist/chunks/chunk-N6SR54VC.js +207 -0
- package/dist/chunks/chunk-N6SR54VC.js.map +6 -0
- package/dist/chunks/chunk-NADQQMMG.js +46 -0
- package/dist/chunks/chunk-NADQQMMG.js.map +6 -0
- package/dist/chunks/chunk-NBH52WHS.js +247 -0
- package/dist/chunks/chunk-NBH52WHS.js.map +6 -0
- package/dist/chunks/chunk-NICLKFBG.js +109 -0
- package/dist/chunks/chunk-NICLKFBG.js.map +6 -0
- package/dist/chunks/chunk-NIPHHZ5G.js +283 -0
- package/dist/chunks/chunk-NIPHHZ5G.js.map +6 -0
- package/dist/chunks/chunk-NQT244I2.js +517 -0
- package/dist/chunks/chunk-NQT244I2.js.map +6 -0
- package/dist/chunks/chunk-NUGPLXVK.js +228 -0
- package/dist/chunks/chunk-NUGPLXVK.js.map +6 -0
- package/dist/chunks/chunk-OEW7CJKK.js +140 -0
- package/dist/chunks/chunk-OEW7CJKK.js.map +6 -0
- package/dist/chunks/chunk-OH6TB27S.js +111 -0
- package/dist/chunks/chunk-OH6TB27S.js.map +6 -0
- package/dist/chunks/chunk-OWH6QQY2.js +1858 -0
- package/dist/chunks/chunk-OWH6QQY2.js.map +6 -0
- package/dist/chunks/chunk-OWXJOD4H.js +773 -0
- package/dist/chunks/chunk-OWXJOD4H.js.map +6 -0
- package/dist/chunks/chunk-PT537V7B.js +787 -0
- package/dist/chunks/chunk-PT537V7B.js.map +6 -0
- package/dist/chunks/chunk-QEQZFG2X.js +106 -0
- package/dist/chunks/chunk-QEQZFG2X.js.map +6 -0
- package/dist/chunks/chunk-QL4O4UGZ.js +245 -0
- package/dist/chunks/chunk-QL4O4UGZ.js.map +6 -0
- package/dist/chunks/chunk-QL54XCF4.js +73 -0
- package/dist/chunks/chunk-QL54XCF4.js.map +6 -0
- package/dist/chunks/chunk-SB6UD3ED.js +1355 -0
- package/dist/chunks/chunk-SB6UD3ED.js.map +6 -0
- package/dist/chunks/chunk-SGGRGKGV.js +34 -0
- package/dist/chunks/chunk-SGGRGKGV.js.map +6 -0
- package/dist/chunks/chunk-SKKWMMFP.js +474 -0
- package/dist/chunks/chunk-SKKWMMFP.js.map +6 -0
- package/dist/chunks/chunk-SMIDV4KH.js +171 -0
- package/dist/chunks/chunk-SMIDV4KH.js.map +6 -0
- package/dist/chunks/chunk-T2VUTAHB.js +46 -0
- package/dist/chunks/chunk-T2VUTAHB.js.map +6 -0
- package/dist/chunks/chunk-T4SB6AAF.js +134 -0
- package/dist/chunks/chunk-T4SB6AAF.js.map +6 -0
- package/dist/chunks/chunk-TBIX6JRE.js +24 -0
- package/dist/chunks/chunk-TBIX6JRE.js.map +6 -0
- package/dist/chunks/chunk-THNCQJ33.js +11265 -0
- package/dist/chunks/chunk-THNCQJ33.js.map +6 -0
- package/dist/chunks/chunk-U56QFYGA.js +818 -0
- package/dist/chunks/chunk-U56QFYGA.js.map +6 -0
- package/dist/chunks/chunk-U6GZ7EW4.js +106 -0
- package/dist/chunks/chunk-U6GZ7EW4.js.map +6 -0
- package/dist/chunks/chunk-UDDSFIMB.js +1373 -0
- package/dist/chunks/chunk-UDDSFIMB.js.map +6 -0
- package/dist/chunks/chunk-UFHNXZL2.js +399 -0
- package/dist/chunks/chunk-UFHNXZL2.js.map +6 -0
- package/dist/chunks/chunk-US5ZFPAU.js +400 -0
- package/dist/chunks/chunk-US5ZFPAU.js.map +6 -0
- package/dist/chunks/chunk-VRL2WNQN.js +7534 -0
- package/dist/chunks/chunk-VRL2WNQN.js.map +6 -0
- package/dist/chunks/chunk-W3UQMRYA.js +380 -0
- package/dist/chunks/chunk-W3UQMRYA.js.map +6 -0
- package/dist/chunks/chunk-W5KGCUP3.js +11111 -0
- package/dist/chunks/chunk-W5KGCUP3.js.map +6 -0
- package/dist/chunks/chunk-WHODOMXA.js +132 -0
- package/dist/chunks/chunk-WHODOMXA.js.map +6 -0
- package/dist/chunks/chunk-WT6TFCPV.js +154 -0
- package/dist/chunks/chunk-WT6TFCPV.js.map +6 -0
- package/dist/chunks/chunk-WY2WUTFR.js +164 -0
- package/dist/chunks/chunk-WY2WUTFR.js.map +6 -0
- package/dist/chunks/chunk-XEUQN4JC.js +54 -0
- package/dist/chunks/chunk-XEUQN4JC.js.map +6 -0
- package/dist/chunks/chunk-Y7B67G22.js +26 -0
- package/dist/chunks/chunk-Y7B67G22.js.map +6 -0
- package/dist/chunks/chunk-YEMJX2DS.js +69 -0
- package/dist/chunks/chunk-YEMJX2DS.js.map +6 -0
- package/dist/chunks/chunk-YKLKHDZU.js +2953 -0
- package/dist/chunks/chunk-YKLKHDZU.js.map +6 -0
- package/dist/chunks/chunk-YQEWD2EN.js +127 -0
- package/dist/chunks/chunk-YQEWD2EN.js.map +6 -0
- package/dist/chunks/chunk-YYQJIECC.js +1439 -0
- package/dist/chunks/chunk-YYQJIECC.js.map +6 -0
- package/dist/chunks/chunk-ZKVZNOUS.js +106 -0
- package/dist/chunks/chunk-ZKVZNOUS.js.map +6 -0
- package/dist/chunks/chunk-ZPR4IMRT.js +36 -0
- package/dist/chunks/chunk-ZPR4IMRT.js.map +6 -0
- package/dist/chunks/chunk-ZWA2JRJV.js +45 -0
- package/dist/chunks/chunk-ZWA2JRJV.js.map +6 -0
- package/dist/chunks/cli-runtime-F4MBZ2UQ.js +129 -0
- package/dist/chunks/cli-runtime-F4MBZ2UQ.js.map +6 -0
- package/dist/chunks/commands-GMQGFTIY.js +21 -0
- package/dist/chunks/commands-GMQGFTIY.js.map +6 -0
- package/dist/chunks/computer-GXDY4H35.js +493 -0
- package/dist/chunks/computer-GXDY4H35.js.map +6 -0
- package/dist/chunks/crash-report-STOHSORG.js +21 -0
- package/dist/chunks/crash-report-STOHSORG.js.map +6 -0
- package/dist/chunks/devtools-LBE4PAQN.js +3851 -0
- package/dist/chunks/devtools-LBE4PAQN.js.map +6 -0
- package/dist/chunks/dist-3AF2X4S5.js +1339 -0
- package/dist/chunks/dist-3AF2X4S5.js.map +6 -0
- package/dist/chunks/dist-AZIMHV2B.js +514 -0
- package/dist/chunks/dist-AZIMHV2B.js.map +6 -0
- package/dist/chunks/dist-BGYRQ5BC.js +555 -0
- package/dist/chunks/dist-BGYRQ5BC.js.map +6 -0
- package/dist/chunks/dist-OTTZ7WVD.js +1415 -0
- package/dist/chunks/dist-OTTZ7WVD.js.map +6 -0
- package/dist/chunks/dist-R3I3ATSG.js +1018 -0
- package/dist/chunks/dist-R3I3ATSG.js.map +6 -0
- package/dist/chunks/dist-TXEKDBQO.js +40642 -0
- package/dist/chunks/dist-TXEKDBQO.js.map +6 -0
- package/dist/chunks/dist-XTWYQHHN.js +520 -0
- package/dist/chunks/dist-XTWYQHHN.js.map +6 -0
- package/dist/chunks/doctor-VXSB4Y4P.js +28 -0
- package/dist/chunks/doctor-VXSB4Y4P.js.map +6 -0
- package/dist/chunks/drain-DXVICQBR.js +471 -0
- package/dist/chunks/drain-DXVICQBR.js.map +6 -0
- package/dist/chunks/endpoint-M2DDENPP.js +15 -0
- package/dist/chunks/endpoint-M2DDENPP.js.map +6 -0
- package/dist/chunks/eval-BMJQXDKA.js +187 -0
- package/dist/chunks/eval-BMJQXDKA.js.map +6 -0
- package/dist/chunks/exec-3T5ESZPH.js +1284 -0
- package/dist/chunks/exec-3T5ESZPH.js.map +6 -0
- package/dist/chunks/home-ILHA7B6Z.js +16 -0
- package/dist/chunks/home-ILHA7B6Z.js.map +6 -0
- package/dist/chunks/host-queries-QCMWDZGS.js +152 -0
- package/dist/chunks/host-queries-QCMWDZGS.js.map +6 -0
- package/dist/chunks/lib-KXZZJJG2.js +2657 -0
- package/dist/chunks/lib-KXZZJJG2.js.map +6 -0
- package/dist/chunks/lifecycle-CB23VJI7.js +63 -0
- package/dist/chunks/lifecycle-CB23VJI7.js.map +6 -0
- package/dist/chunks/list-N6WXZBMD.js +293 -0
- package/dist/chunks/list-N6WXZBMD.js.map +6 -0
- package/dist/chunks/login-26NCG6EQ.js +29 -0
- package/dist/chunks/login-26NCG6EQ.js.map +6 -0
- package/dist/chunks/logs-V7SNM7LA.js +116 -0
- package/dist/chunks/logs-V7SNM7LA.js.map +6 -0
- package/dist/chunks/mcp-BTHCU5ZC.js +763 -0
- package/dist/chunks/mcp-BTHCU5ZC.js.map +6 -0
- package/dist/chunks/message-command-HMIOR52C.js +170 -0
- package/dist/chunks/message-command-HMIOR52C.js.map +6 -0
- package/dist/chunks/node-QB2FA2ZB.js +916 -0
- package/dist/chunks/node-QB2FA2ZB.js.map +6 -0
- package/dist/chunks/operator-tools-7LMWOHSN.js +115 -0
- package/dist/chunks/operator-tools-7LMWOHSN.js.map +6 -0
- package/dist/chunks/output-schema-XCONYVZ7.js +11 -0
- package/dist/chunks/output-schema-XCONYVZ7.js.map +6 -0
- package/dist/chunks/pal-YEUKHA6F.js +200 -0
- package/dist/chunks/pal-YEUKHA6F.js.map +6 -0
- package/dist/chunks/paths-DXYFKIJU.js +10 -0
- package/dist/chunks/paths-DXYFKIJU.js.map +6 -0
- package/dist/chunks/pica-WNHDDIFX.js +1736 -0
- package/dist/chunks/pica-WNHDDIFX.js.map +6 -0
- package/dist/chunks/providers-EI3FAKYB.js +160 -0
- package/dist/chunks/providers-EI3FAKYB.js.map +6 -0
- package/dist/chunks/resident-5ZY6OG6B.js +1314 -0
- package/dist/chunks/resident-5ZY6OG6B.js.map +6 -0
- package/dist/chunks/resume-command-ONYRZIIA.js +22 -0
- package/dist/chunks/resume-command-ONYRZIIA.js.map +6 -0
- package/dist/chunks/schedule-6JPEO4NR.js +143 -0
- package/dist/chunks/schedule-6JPEO4NR.js.map +6 -0
- package/dist/chunks/serve-S7UWNIR3.js +21 -0
- package/dist/chunks/serve-S7UWNIR3.js.map +6 -0
- package/dist/chunks/service-WSW3M6K5.js +1633 -0
- package/dist/chunks/service-WSW3M6K5.js.map +6 -0
- package/dist/chunks/session-step-2VZM3CCA.js +26 -0
- package/dist/chunks/session-step-2VZM3CCA.js.map +6 -0
- package/dist/chunks/skills-KAZJYGX5.js +282 -0
- package/dist/chunks/skills-KAZJYGX5.js.map +6 -0
- package/dist/chunks/state-263OUKQA.js +717 -0
- package/dist/chunks/state-263OUKQA.js.map +6 -0
- package/dist/chunks/store-3XLCJ7EL.js +42 -0
- package/dist/chunks/store-3XLCJ7EL.js.map +6 -0
- package/dist/chunks/store-KN65QI2M.js +82 -0
- package/dist/chunks/store-KN65QI2M.js.map +6 -0
- package/dist/chunks/store-X3TESBIN.js +34 -0
- package/dist/chunks/store-X3TESBIN.js.map +6 -0
- package/dist/chunks/tui-5MU7JBXX.js +56703 -0
- package/dist/chunks/tui-5MU7JBXX.js.map +6 -0
- package/dist/chunks/upgrade-BYM4MWBC.js +315 -0
- package/dist/chunks/upgrade-BYM4MWBC.js.map +6 -0
- package/dist/chunks/webapi-6HUHZUAH.js +2715 -0
- package/dist/chunks/webapi-6HUHZUAH.js.map +6 -0
- package/dist/chunks/worktree-K3ZIPXRM.js +116 -0
- package/dist/chunks/worktree-K3ZIPXRM.js.map +6 -0
- package/dist/cli-runtime.d.ts +19 -0
- package/dist/cli-runtime.d.ts.map +1 -0
- package/dist/cli.d.ts +0 -15
- package/dist/cli.d.ts.map +1 -1
- package/dist/commands/acp-harness.d.ts +64 -0
- package/dist/commands/acp-harness.d.ts.map +1 -0
- package/dist/commands/acp-provider-retry.d.ts +27 -0
- package/dist/commands/acp-provider-retry.d.ts.map +1 -0
- package/dist/commands/acp.d.ts +134 -3
- package/dist/commands/acp.d.ts.map +1 -1
- package/dist/commands/computer.d.ts +3 -0
- package/dist/commands/computer.d.ts.map +1 -0
- package/dist/commands/desktop-host-changes.d.ts +65 -0
- package/dist/commands/desktop-host-changes.d.ts.map +1 -0
- package/dist/commands/desktop-host-header.d.ts +30 -0
- package/dist/commands/desktop-host-header.d.ts.map +1 -0
- package/dist/commands/desktop-host.d.ts +354 -0
- package/dist/commands/desktop-host.d.ts.map +1 -0
- package/dist/commands/desktop-model-catalogue.d.ts +25 -0
- package/dist/commands/desktop-model-catalogue.d.ts.map +1 -0
- package/dist/commands/effort-levels.d.ts +3 -0
- package/dist/commands/effort-levels.d.ts.map +1 -0
- package/dist/commands/exec-flags.d.ts +4 -0
- package/dist/commands/exec-flags.d.ts.map +1 -1
- package/dist/commands/exec.d.ts.map +1 -1
- package/dist/commands/lazy.d.ts +20 -0
- package/dist/commands/lazy.d.ts.map +1 -0
- package/dist/commands/manifest.d.ts +33 -0
- package/dist/commands/manifest.d.ts.map +1 -0
- package/dist/commands/mcp.d.ts +3 -0
- package/dist/commands/mcp.d.ts.map +1 -1
- package/dist/commands/pal.d.ts +5 -0
- package/dist/commands/pal.d.ts.map +1 -0
- package/dist/commands/permission-preview.d.ts +38 -0
- package/dist/commands/permission-preview.d.ts.map +1 -0
- package/dist/commands/registry.d.ts +10 -0
- package/dist/commands/registry.d.ts.map +1 -1
- package/dist/commands/serve.d.ts +1 -12
- package/dist/commands/serve.d.ts.map +1 -1
- package/dist/commands/stdin.d.ts.map +1 -1
- package/dist/commands/upgrade.d.ts +14 -0
- package/dist/commands/upgrade.d.ts.map +1 -1
- package/dist/compile-cache-enable.d.ts +2 -0
- package/dist/compile-cache-enable.d.ts.map +1 -0
- package/dist/compile-cache.d.ts +53 -0
- package/dist/compile-cache.d.ts.map +1 -0
- package/dist/computer/bundle.d.ts +18 -0
- package/dist/computer/bundle.d.ts.map +1 -0
- package/dist/computer/run.d.ts +26 -0
- package/dist/computer/run.d.ts.map +1 -0
- package/dist/computer/sentences.d.ts +30 -0
- package/dist/computer/sentences.d.ts.map +1 -0
- package/dist/config/load.d.ts +10 -1
- package/dist/config/load.d.ts.map +1 -1
- package/dist/context/capabilities.d.ts +25 -2
- package/dist/context/capabilities.d.ts.map +1 -1
- package/dist/context/runtime-message.d.ts.map +1 -1
- package/dist/crash-report.d.ts +22 -0
- package/dist/crash-report.d.ts.map +1 -0
- package/dist/debug-requested.d.ts +7 -0
- package/dist/debug-requested.d.ts.map +1 -0
- package/dist/doctor/checks/credentials.d.ts.map +1 -1
- package/dist/exit-codes.d.ts +9 -1
- package/dist/exit-codes.d.ts.map +1 -1
- package/dist/index.js +105 -17
- package/dist/index.js.map +6 -1
- package/dist/integrations/harness/claude-adapter.d.ts +20 -0
- package/dist/integrations/harness/claude-adapter.d.ts.map +1 -0
- package/dist/integrations/harness/claude-protocol.d.ts +67 -0
- package/dist/integrations/harness/claude-protocol.d.ts.map +1 -0
- package/dist/integrations/harness/codex-adapter.d.ts +80 -0
- package/dist/integrations/harness/codex-adapter.d.ts.map +1 -0
- package/dist/integrations/harness/codex-protocol.d.ts +22 -0
- package/dist/integrations/harness/codex-protocol.d.ts.map +1 -0
- package/dist/integrations/harness/model-cache.d.ts +16 -0
- package/dist/integrations/harness/model-cache.d.ts.map +1 -0
- package/dist/integrations/harness/native-executable.d.ts +8 -0
- package/dist/integrations/harness/native-executable.d.ts.map +1 -0
- package/dist/integrations/harness/process.d.ts +25 -0
- package/dist/integrations/harness/process.d.ts.map +1 -0
- package/dist/integrations/mcp/servers.d.ts.map +1 -1
- package/dist/integrations/peers/runtime.d.ts +64 -0
- package/dist/integrations/peers/runtime.d.ts.map +1 -0
- package/dist/integrations/plugins/inventory.d.ts +27 -0
- package/dist/integrations/plugins/inventory.d.ts.map +1 -0
- package/dist/integrations/providers/composer-settings.d.ts +33 -0
- package/dist/integrations/providers/composer-settings.d.ts.map +1 -0
- package/dist/integrations/providers/connections.d.ts +37 -0
- package/dist/integrations/providers/connections.d.ts.map +1 -0
- package/dist/integrations/providers/credential-store.d.ts +35 -0
- package/dist/integrations/providers/credential-store.d.ts.map +1 -1
- package/dist/integrations/providers/discover.d.ts +27 -1
- package/dist/integrations/providers/discover.d.ts.map +1 -1
- package/dist/integrations/providers/index.d.ts +2 -2
- package/dist/integrations/providers/index.d.ts.map +1 -1
- package/dist/integrations/providers/picker-operation.d.ts +6 -0
- package/dist/integrations/providers/picker-operation.d.ts.map +1 -0
- package/dist/integrations/providers/setup.d.ts +16 -1
- package/dist/integrations/providers/setup.d.ts.map +1 -1
- package/dist/integrations/resident/runner-worker.js +190 -161
- package/dist/integrations/resident/runner-worker.js.map +6 -1
- package/dist/integrations/resident/session-step.d.ts.map +1 -1
- package/dist/integrations/sessions/display-title.d.ts +8 -0
- package/dist/integrations/sessions/display-title.d.ts.map +1 -1
- package/dist/integrations/sessions/store.d.ts +23 -9
- package/dist/integrations/sessions/store.d.ts.map +1 -1
- package/dist/integrations/sessions/task-context.d.ts +1 -1
- package/dist/integrations/sessions/task-context.d.ts.map +1 -1
- package/dist/integrations/sessions/transcript-export.d.ts.map +1 -1
- package/dist/integrations/subagents/activity.d.ts +9 -6
- package/dist/integrations/subagents/activity.d.ts.map +1 -1
- package/dist/integrations/subagents/operator-journal.d.ts +20 -0
- package/dist/integrations/subagents/operator-journal.d.ts.map +1 -0
- package/dist/integrations/subagents/runtime.d.ts +11 -0
- package/dist/integrations/subagents/runtime.d.ts.map +1 -1
- package/dist/integrations/trust/store.d.ts +14 -0
- package/dist/integrations/trust/store.d.ts.map +1 -1
- package/dist/integrations/web/search.d.ts +1 -1
- package/dist/pals/actions.d.ts +57 -0
- package/dist/pals/actions.d.ts.map +1 -0
- package/dist/pals/activity-command.d.ts +3 -0
- package/dist/pals/activity-command.d.ts.map +1 -0
- package/dist/pals/activity.d.ts +18 -0
- package/dist/pals/activity.d.ts.map +1 -0
- package/dist/pals/agent-session.d.ts +19 -0
- package/dist/pals/agent-session.d.ts.map +1 -0
- package/dist/pals/channel-actions.d.ts +5 -0
- package/dist/pals/channel-actions.d.ts.map +1 -0
- package/dist/pals/channel-local.d.ts +7 -0
- package/dist/pals/channel-local.d.ts.map +1 -0
- package/dist/pals/channel.d.ts +20 -0
- package/dist/pals/channel.d.ts.map +1 -0
- package/dist/pals/chat.d.ts +6 -0
- package/dist/pals/chat.d.ts.map +1 -0
- package/dist/pals/communication.d.ts +47 -0
- package/dist/pals/communication.d.ts.map +1 -0
- package/dist/pals/conversations.d.ts +26 -0
- package/dist/pals/conversations.d.ts.map +1 -0
- package/dist/pals/desktop-communication.d.ts +111 -0
- package/dist/pals/desktop-communication.d.ts.map +1 -0
- package/dist/pals/dispatch.d.ts +13 -0
- package/dist/pals/dispatch.d.ts.map +1 -0
- package/dist/pals/environment.d.ts +103 -0
- package/dist/pals/environment.d.ts.map +1 -0
- package/dist/pals/guest-mcp-transport.d.ts +28 -0
- package/dist/pals/guest-mcp-transport.d.ts.map +1 -0
- package/dist/pals/guest-mcp.d.ts +22 -0
- package/dist/pals/guest-mcp.d.ts.map +1 -0
- package/dist/pals/inbox-start.d.ts +35 -0
- package/dist/pals/inbox-start.d.ts.map +1 -0
- package/dist/pals/message-command.d.ts +3 -0
- package/dist/pals/message-command.d.ts.map +1 -0
- package/dist/pals/operator-tools.d.ts +23 -0
- package/dist/pals/operator-tools.d.ts.map +1 -0
- package/dist/pals/public-transcript.d.ts +4 -0
- package/dist/pals/public-transcript.d.ts.map +1 -0
- package/dist/pals/review.d.ts +16 -0
- package/dist/pals/review.d.ts.map +1 -0
- package/dist/pals/store.d.ts +16 -0
- package/dist/pals/store.d.ts.map +1 -0
- package/dist/pals/tui-session.d.ts +11 -0
- package/dist/pals/tui-session.d.ts.map +1 -0
- package/dist/permissions/mode-names.d.ts +2 -0
- package/dist/permissions/mode-names.d.ts.map +1 -0
- package/dist/resume-invocation.d.ts +1 -1
- package/dist/resume-invocation.d.ts.map +1 -1
- package/dist/resume-shell.d.ts +8 -0
- package/dist/resume-shell.d.ts.map +1 -0
- package/dist/schedule/build.d.ts +12 -3
- package/dist/schedule/build.d.ts.map +1 -1
- package/dist/schedule/commands/add.d.ts +1 -1
- package/dist/schedule/commands/add.d.ts.map +1 -1
- package/dist/schedule/commands/lifecycle.d.ts.map +1 -1
- package/dist/schedule/commands/list.d.ts +3 -1
- package/dist/schedule/commands/list.d.ts.map +1 -1
- package/dist/schedule/daemon/daemon.d.ts +2 -0
- package/dist/schedule/daemon/daemon.d.ts.map +1 -1
- package/dist/schedule/delivery.d.ts +66 -0
- package/dist/schedule/delivery.d.ts.map +1 -0
- package/dist/schedule/fire/fire.d.ts +1 -1
- package/dist/schedule/fire/fire.d.ts.map +1 -1
- package/dist/schedule/fire/run-script.d.ts +2 -2
- package/dist/schedule/fire/run-script.d.ts.map +1 -1
- package/dist/schedule/fire/script-report.d.ts +31 -0
- package/dist/schedule/fire/script-report.d.ts.map +1 -0
- package/dist/schedule/floor.d.ts +1 -1
- package/dist/schedule/floor.d.ts.map +1 -1
- package/dist/schedule/folder.d.ts +6 -0
- package/dist/schedule/folder.d.ts.map +1 -1
- package/dist/schedule/resume-command.d.ts +3 -3
- package/dist/schedule/resume-command.d.ts.map +1 -1
- package/dist/schedule/store/history.d.ts.map +1 -1
- package/dist/schedule/store/jobs.d.ts +6 -6
- package/dist/schedule/store/jobs.d.ts.map +1 -1
- package/dist/schedule/store/script-state.d.ts +31 -0
- package/dist/schedule/store/script-state.d.ts.map +1 -0
- package/dist/schedule/store/state.d.ts +4 -2
- package/dist/schedule/store/state.d.ts.map +1 -1
- package/dist/schedule/types.d.ts +61 -16
- package/dist/schedule/types.d.ts.map +1 -1
- package/dist/skills/store.d.ts.map +1 -1
- package/dist/terminal/host.d.ts +22 -0
- package/dist/terminal/host.d.ts.map +1 -0
- package/dist/terminal/manager.d.ts +124 -0
- package/dist/terminal/manager.d.ts.map +1 -0
- package/dist/terminal/protocol.d.ts +162 -0
- package/dist/terminal/protocol.d.ts.map +1 -0
- package/dist/terminal/pty.d.ts +85 -0
- package/dist/terminal/pty.d.ts.map +1 -0
- package/dist/terminal/ring.d.ts +23 -0
- package/dist/terminal/ring.d.ts.map +1 -0
- package/dist/terminal/screen.d.ts +31 -0
- package/dist/terminal/screen.d.ts.map +1 -0
- package/dist/termination-state.d.ts +19 -0
- package/dist/termination-state.d.ts.map +1 -0
- package/dist/termination.d.ts +2 -9
- package/dist/termination.d.ts.map +1 -1
- package/dist/tui/AgentExplorer.d.ts +4 -1
- package/dist/tui/AgentExplorer.d.ts.map +1 -1
- package/dist/tui/App.d.ts.map +1 -1
- package/dist/tui/BackgroundJobsPanel.d.ts +26 -0
- package/dist/tui/BackgroundJobsPanel.d.ts.map +1 -0
- package/dist/tui/BrandHeader.d.ts.map +1 -1
- package/dist/tui/ChildComposer.d.ts +22 -0
- package/dist/tui/ChildComposer.d.ts.map +1 -0
- package/dist/tui/ChoicePicker.d.ts.map +1 -1
- package/dist/tui/Composer.d.ts +25 -4
- package/dist/tui/Composer.d.ts.map +1 -1
- package/dist/tui/ComposerFrame.d.ts.map +1 -1
- package/dist/tui/CopyPicker.d.ts.map +1 -1
- package/dist/tui/EditPromptPicker.d.ts.map +1 -1
- package/dist/tui/EffortSlider.d.ts.map +1 -1
- package/dist/tui/LiveActivity.d.ts +7 -1
- package/dist/tui/LiveActivity.d.ts.map +1 -1
- package/dist/tui/Markdown.d.ts.map +1 -1
- package/dist/tui/PendingInputPanel.d.ts +34 -0
- package/dist/tui/PendingInputPanel.d.ts.map +1 -0
- package/dist/tui/PermissionOverlay.d.ts.map +1 -1
- package/dist/tui/Picker.d.ts.map +1 -1
- package/dist/tui/ProviderSetup.d.ts.map +1 -1
- package/dist/tui/ResumePicker.d.ts.map +1 -1
- package/dist/tui/SaveSkillOverlay.d.ts.map +1 -1
- package/dist/tui/ScheduleReviewOverlay.d.ts +1 -1
- package/dist/tui/ScheduleReviewOverlay.d.ts.map +1 -1
- package/dist/tui/StatusBar.d.ts +7 -1
- package/dist/tui/StatusBar.d.ts.map +1 -1
- package/dist/tui/StatusPanel.d.ts.map +1 -1
- package/dist/tui/TextPrompt.d.ts.map +1 -1
- package/dist/tui/ToolOutputViewer.d.ts.map +1 -1
- package/dist/tui/Transcript.d.ts.map +1 -1
- package/dist/tui/TrustPrompt.d.ts +8 -0
- package/dist/tui/TrustPrompt.d.ts.map +1 -1
- package/dist/tui/agent.d.ts +135 -6
- package/dist/tui/agent.d.ts.map +1 -1
- package/dist/tui/browser-notices.d.ts.map +1 -1
- package/dist/tui/capability-notice.d.ts +38 -0
- package/dist/tui/capability-notice.d.ts.map +1 -0
- package/dist/tui/console-input.d.ts +31 -0
- package/dist/tui/console-input.d.ts.map +1 -0
- package/dist/tui/conversation-evidence-view.d.ts.map +1 -1
- package/dist/tui/credential-entry.d.ts.map +1 -1
- package/dist/tui/exit-summary.d.ts +9 -1
- package/dist/tui/exit-summary.d.ts.map +1 -1
- package/dist/tui/external-editor.d.ts.map +1 -1
- package/dist/tui/index.d.ts.map +1 -1
- package/dist/tui/key-hints.d.ts +51 -0
- package/dist/tui/key-hints.d.ts.map +1 -0
- package/dist/tui/launch-settings.d.ts +34 -0
- package/dist/tui/launch-settings.d.ts.map +1 -0
- package/dist/tui/log-pane.d.ts.map +1 -1
- package/dist/tui/model-choices.d.ts +39 -1
- package/dist/tui/model-choices.d.ts.map +1 -1
- package/dist/tui/model-search.d.ts +4 -1
- package/dist/tui/model-search.d.ts.map +1 -1
- package/dist/tui/output-size-watch.d.ts +32 -0
- package/dist/tui/output-size-watch.d.ts.map +1 -0
- package/dist/tui/permission-review.d.ts.map +1 -1
- package/dist/tui/person-terms.d.ts +58 -0
- package/dist/tui/person-terms.d.ts.map +1 -0
- package/dist/tui/plain-failure.d.ts +27 -0
- package/dist/tui/plain-failure.d.ts.map +1 -0
- package/dist/tui/plain-interruption.d.ts +46 -0
- package/dist/tui/plain-interruption.d.ts.map +1 -0
- package/dist/tui/provider-list.d.ts.map +1 -1
- package/dist/tui/render-mode.d.ts +19 -0
- package/dist/tui/render-mode.d.ts.map +1 -0
- package/dist/tui/schedule/host-commands.d.ts +2 -9
- package/dist/tui/schedule/host-commands.d.ts.map +1 -1
- package/dist/tui/schedule/integration.d.ts +8 -0
- package/dist/tui/schedule/integration.d.ts.map +1 -1
- package/dist/tui/schedule/source-deliveries.d.ts +37 -0
- package/dist/tui/schedule/source-deliveries.d.ts.map +1 -0
- package/dist/tui/schedule/startup.d.ts.map +1 -1
- package/dist/tui/schedule/tool-host.d.ts +3 -1
- package/dist/tui/schedule/tool-host.d.ts.map +1 -1
- package/dist/tui/setup-text.d.ts +14 -0
- package/dist/tui/setup-text.d.ts.map +1 -0
- package/dist/tui/shell-escape.d.ts.map +1 -1
- package/dist/tui/skills/suggest-setting.d.ts.map +1 -1
- package/dist/tui/slashCommands.d.ts +9 -2
- package/dist/tui/slashCommands.d.ts.map +1 -1
- package/dist/tui/terminal-choice-text.d.ts +7 -0
- package/dist/tui/terminal-choice-text.d.ts.map +1 -1
- package/dist/tui/tidy-tool-output.d.ts +83 -0
- package/dist/tui/tidy-tool-output.d.ts.map +1 -0
- package/dist/tui/tool-presentation.d.ts +6 -0
- package/dist/tui/tool-presentation.d.ts.map +1 -0
- package/dist/tui/triggers/copy.d.ts.map +1 -1
- package/dist/tui/triggers/setting.d.ts.map +1 -1
- package/dist/tui/turn-interruption.d.ts +1 -1
- package/dist/tui/turn-interruption.d.ts.map +1 -1
- package/dist/tui/turn-limits-settings.d.ts +4 -4
- package/dist/tui/turn-limits-settings.d.ts.map +1 -1
- package/dist/tui/types.d.ts +10 -0
- package/dist/tui/types.d.ts.map +1 -1
- package/dist/tui/web-activity.d.ts +3 -2
- package/dist/tui/web-activity.d.ts.map +1 -1
- package/dist/tui/zen-free-refusal.d.ts +17 -0
- package/dist/tui/zen-free-refusal.d.ts.map +1 -0
- package/dist/usage-error.d.ts +15 -0
- package/dist/usage-error.d.ts.map +1 -0
- package/dist/warning-filter.d.ts +30 -0
- package/dist/warning-filter.d.ts.map +1 -0
- package/package.json +22 -11
- package/skills/schedule-task/SKILL.md +74 -20
- package/dist/browser/commands.js +0 -365
- package/dist/browser/commands.js.map +0 -1
- package/dist/browser/control.js +0 -140
- package/dist/browser/control.js.map +0 -1
- package/dist/browser/describe.js +0 -27
- package/dist/browser/describe.js.map +0 -1
- package/dist/checkpoints/store.js +0 -192
- package/dist/checkpoints/store.js.map +0 -1
- package/dist/checkpoints/wrap.js +0 -37
- package/dist/checkpoints/wrap.js.map +0 -1
- package/dist/cli.js +0 -602
- package/dist/cli.js.map +0 -1
- package/dist/commands/acp.js +0 -388
- package/dist/commands/acp.js.map +0 -1
- package/dist/commands/archive.js +0 -65
- package/dist/commands/archive.js.map +0 -1
- package/dist/commands/browser.js +0 -16
- package/dist/commands/browser.js.map +0 -1
- package/dist/commands/doctor.js +0 -267
- package/dist/commands/doctor.js.map +0 -1
- package/dist/commands/drain.js +0 -498
- package/dist/commands/drain.js.map +0 -1
- package/dist/commands/eval.js +0 -237
- package/dist/commands/eval.js.map +0 -1
- package/dist/commands/exec-flags.js +0 -334
- package/dist/commands/exec-flags.js.map +0 -1
- package/dist/commands/exec-json.js +0 -497
- package/dist/commands/exec-json.js.map +0 -1
- package/dist/commands/exec.js +0 -688
- package/dist/commands/exec.js.map +0 -1
- package/dist/commands/host-queries.js +0 -156
- package/dist/commands/host-queries.js.map +0 -1
- package/dist/commands/login.js +0 -315
- package/dist/commands/login.js.map +0 -1
- package/dist/commands/mcp-oauth-login.js +0 -213
- package/dist/commands/mcp-oauth-login.js.map +0 -1
- package/dist/commands/mcp.js +0 -288
- package/dist/commands/mcp.js.map +0 -1
- package/dist/commands/prior-messages.js +0 -329
- package/dist/commands/prior-messages.js.map +0 -1
- package/dist/commands/provider-wait.js +0 -65
- package/dist/commands/provider-wait.js.map +0 -1
- package/dist/commands/registry.js +0 -40
- package/dist/commands/registry.js.map +0 -1
- package/dist/commands/resident-flags.js +0 -193
- package/dist/commands/resident-flags.js.map +0 -1
- package/dist/commands/resident-learning.js +0 -293
- package/dist/commands/resident-learning.js.map +0 -1
- package/dist/commands/resident.js +0 -419
- package/dist/commands/resident.js.map +0 -1
- package/dist/commands/resume.js +0 -109
- package/dist/commands/resume.js.map +0 -1
- package/dist/commands/schedule.js +0 -131
- package/dist/commands/schedule.js.map +0 -1
- package/dist/commands/serve.js +0 -21
- package/dist/commands/serve.js.map +0 -1
- package/dist/commands/skills.js +0 -178
- package/dist/commands/skills.js.map +0 -1
- package/dist/commands/state.js +0 -110
- package/dist/commands/state.js.map +0 -1
- package/dist/commands/stdin.js +0 -69
- package/dist/commands/stdin.js.map +0 -1
- package/dist/commands/types.js +0 -2
- package/dist/commands/types.js.map +0 -1
- package/dist/commands/upgrade-progress.js +0 -54
- package/dist/commands/upgrade-progress.js.map +0 -1
- package/dist/commands/upgrade.js +0 -232
- package/dist/commands/upgrade.js.map +0 -1
- package/dist/commands/worktree.js +0 -86
- package/dist/commands/worktree.js.map +0 -1
- package/dist/config/composer-triggers.js +0 -80
- package/dist/config/composer-triggers.js.map +0 -1
- package/dist/config/debug.js +0 -126
- package/dist/config/debug.js.map +0 -1
- package/dist/config/load.js +0 -1208
- package/dist/config/load.js.map +0 -1
- package/dist/config/schema.js +0 -13
- package/dist/config/schema.js.map +0 -1
- package/dist/config/tool-result-screens.js +0 -104
- package/dist/config/tool-result-screens.js.map +0 -1
- package/dist/config/trusted-project-context.js +0 -28
- package/dist/config/trusted-project-context.js.map +0 -1
- package/dist/config/turn-guards.js +0 -46
- package/dist/config/turn-guards.js.map +0 -1
- package/dist/config/user-config.js +0 -118
- package/dist/config/user-config.js.map +0 -1
- package/dist/context/capabilities.js +0 -164
- package/dist/context/capabilities.js.map +0 -1
- package/dist/context/directories.js +0 -69
- package/dist/context/directories.js.map +0 -1
- package/dist/context/doctrine.js +0 -24
- package/dist/context/doctrine.js.map +0 -1
- package/dist/context/environment.js +0 -255
- package/dist/context/environment.js.map +0 -1
- package/dist/context/project-path.js +0 -16
- package/dist/context/project-path.js.map +0 -1
- package/dist/context/project-tracker.js +0 -217
- package/dist/context/project-tracker.js.map +0 -1
- package/dist/context/project.js +0 -256
- package/dist/context/project.js.map +0 -1
- package/dist/context/runtime-message.js +0 -30
- package/dist/context/runtime-message.js.map +0 -1
- package/dist/context/sandbox.js +0 -114
- package/dist/context/sandbox.js.map +0 -1
- package/dist/context/turn-snapshot.js +0 -122
- package/dist/context/turn-snapshot.js.map +0 -1
- package/dist/doctor/checks/browser.js +0 -63
- package/dist/doctor/checks/browser.js.map +0 -1
- package/dist/doctor/checks/chain.js +0 -211
- package/dist/doctor/checks/chain.js.map +0 -1
- package/dist/doctor/checks/credentials.js +0 -98
- package/dist/doctor/checks/credentials.js.map +0 -1
- package/dist/doctor/checks/index.js +0 -72
- package/dist/doctor/checks/index.js.map +0 -1
- package/dist/doctor/checks/invariants.js +0 -79
- package/dist/doctor/checks/invariants.js.map +0 -1
- package/dist/doctor/checks/logging.js +0 -69
- package/dist/doctor/checks/logging.js.map +0 -1
- package/dist/doctor/checks/providers.js +0 -30
- package/dist/doctor/checks/providers.js.map +0 -1
- package/dist/doctor/checks/runtime.js +0 -40
- package/dist/doctor/checks/runtime.js.map +0 -1
- package/dist/doctor/checks/sandbox.js +0 -76
- package/dist/doctor/checks/sandbox.js.map +0 -1
- package/dist/doctor/checks/scheduler.js +0 -74
- package/dist/doctor/checks/scheduler.js.map +0 -1
- package/dist/doctor/checks/session-export.js +0 -62
- package/dist/doctor/checks/session-export.js.map +0 -1
- package/dist/doctor/checks/telemetry.js +0 -58
- package/dist/doctor/checks/telemetry.js.map +0 -1
- package/dist/doctor/checks/vault.js +0 -67
- package/dist/doctor/checks/vault.js.map +0 -1
- package/dist/doctor/index.js +0 -3
- package/dist/doctor/index.js.map +0 -1
- package/dist/doctor/registry.js +0 -230
- package/dist/doctor/registry.js.map +0 -1
- package/dist/exit-codes.js +0 -62
- package/dist/exit-codes.js.map +0 -1
- package/dist/installation.js +0 -48
- package/dist/installation.js.map +0 -1
- package/dist/integrations/clipboard/image.js +0 -119
- package/dist/integrations/clipboard/image.js.map +0 -1
- package/dist/integrations/clipboard/text.js +0 -43
- package/dist/integrations/clipboard/text.js.map +0 -1
- package/dist/integrations/files/attachment-store.js +0 -86
- package/dist/integrations/files/attachment-store.js.map +0 -1
- package/dist/integrations/mcp/oauth-store.js +0 -549
- package/dist/integrations/mcp/oauth-store.js.map +0 -1
- package/dist/integrations/mcp/servers.js +0 -519
- package/dist/integrations/mcp/servers.js.map +0 -1
- package/dist/integrations/mcp/user-config.js +0 -92
- package/dist/integrations/mcp/user-config.js.map +0 -1
- package/dist/integrations/notifications/desktop/freedesktop.js +0 -33
- package/dist/integrations/notifications/desktop/freedesktop.js.map +0 -1
- package/dist/integrations/notifications/desktop/macos.js +0 -17
- package/dist/integrations/notifications/desktop/macos.js.map +0 -1
- package/dist/integrations/notifications/desktop/sanitize.js +0 -49
- package/dist/integrations/notifications/desktop/sanitize.js.map +0 -1
- package/dist/integrations/notifications/desktop/throttle.js +0 -39
- package/dist/integrations/notifications/desktop/throttle.js.map +0 -1
- package/dist/integrations/notifications/desktop/windows-toast.js +0 -56
- package/dist/integrations/notifications/desktop/windows-toast.js.map +0 -1
- package/dist/integrations/notifications/desktop.js +0 -199
- package/dist/integrations/notifications/desktop.js.map +0 -1
- package/dist/integrations/notifications/terminal.js +0 -46
- package/dist/integrations/notifications/terminal.js.map +0 -1
- package/dist/integrations/npm-invocation.js +0 -23
- package/dist/integrations/npm-invocation.js.map +0 -1
- package/dist/integrations/plugins/runtime.js +0 -189
- package/dist/integrations/plugins/runtime.js.map +0 -1
- package/dist/integrations/plugins/settings.js +0 -106
- package/dist/integrations/plugins/settings.js.map +0 -1
- package/dist/integrations/providers/access.js +0 -23
- package/dist/integrations/providers/access.js.map +0 -1
- package/dist/integrations/providers/chain-capabilities.js +0 -211
- package/dist/integrations/providers/chain-capabilities.js.map +0 -1
- package/dist/integrations/providers/codex-device-login.js +0 -195
- package/dist/integrations/providers/codex-device-login.js.map +0 -1
- package/dist/integrations/providers/codex-oauth.js +0 -95
- package/dist/integrations/providers/codex-oauth.js.map +0 -1
- package/dist/integrations/providers/credential-provider.js +0 -74
- package/dist/integrations/providers/credential-provider.js.map +0 -1
- package/dist/integrations/providers/credential-store.js +0 -657
- package/dist/integrations/providers/credential-store.js.map +0 -1
- package/dist/integrations/providers/current-credential.js +0 -45
- package/dist/integrations/providers/current-credential.js.map +0 -1
- package/dist/integrations/providers/discover.js +0 -313
- package/dist/integrations/providers/discover.js.map +0 -1
- package/dist/integrations/providers/gemini-credentials.js +0 -148
- package/dist/integrations/providers/gemini-credentials.js.map +0 -1
- package/dist/integrations/providers/harness-credentials.js +0 -344
- package/dist/integrations/providers/harness-credentials.js.map +0 -1
- package/dist/integrations/providers/identity.js +0 -64
- package/dist/integrations/providers/identity.js.map +0 -1
- package/dist/integrations/providers/index.js +0 -14
- package/dist/integrations/providers/index.js.map +0 -1
- package/dist/integrations/providers/keychain.js +0 -78
- package/dist/integrations/providers/keychain.js.map +0 -1
- package/dist/integrations/providers/model-reasoning.js +0 -51
- package/dist/integrations/providers/model-reasoning.js.map +0 -1
- package/dist/integrations/providers/oauth.js +0 -302
- package/dist/integrations/providers/oauth.js.map +0 -1
- package/dist/integrations/providers/preferences.js +0 -287
- package/dist/integrations/providers/preferences.js.map +0 -1
- package/dist/integrations/providers/register.js +0 -154
- package/dist/integrations/providers/register.js.map +0 -1
- package/dist/integrations/providers/registry.js +0 -289
- package/dist/integrations/providers/registry.js.map +0 -1
- package/dist/integrations/providers/setup.js +0 -158
- package/dist/integrations/providers/setup.js.map +0 -1
- package/dist/integrations/providers/subscription-login.js +0 -328
- package/dist/integrations/providers/subscription-login.js.map +0 -1
- package/dist/integrations/providers/zen-catalogue.js +0 -196
- package/dist/integrations/providers/zen-catalogue.js.map +0 -1
- package/dist/integrations/resident/foreground.js +0 -95
- package/dist/integrations/resident/foreground.js.map +0 -1
- package/dist/integrations/resident/inspection.js +0 -282
- package/dist/integrations/resident/inspection.js.map +0 -1
- package/dist/integrations/resident/learning-sources.js +0 -79
- package/dist/integrations/resident/learning-sources.js.map +0 -1
- package/dist/integrations/resident/learning-storage.js +0 -55
- package/dist/integrations/resident/learning-storage.js.map +0 -1
- package/dist/integrations/resident/lifecycle-errors.js +0 -15
- package/dist/integrations/resident/lifecycle-errors.js.map +0 -1
- package/dist/integrations/resident/owned-runner.js +0 -91
- package/dist/integrations/resident/owned-runner.js.map +0 -1
- package/dist/integrations/resident/runner-control.js +0 -238
- package/dist/integrations/resident/runner-control.js.map +0 -1
- package/dist/integrations/resident/runner-launch.js +0 -142
- package/dist/integrations/resident/runner-launch.js.map +0 -1
- package/dist/integrations/resident/runner-store.js +0 -284
- package/dist/integrations/resident/runner-store.js.map +0 -1
- package/dist/integrations/resident/session-log-reads.js +0 -125
- package/dist/integrations/resident/session-log-reads.js.map +0 -1
- package/dist/integrations/resident/session-step.js +0 -471
- package/dist/integrations/resident/session-step.js.map +0 -1
- package/dist/integrations/resident/storage.js +0 -183
- package/dist/integrations/resident/storage.js.map +0 -1
- package/dist/integrations/resident/tool-evidence.js +0 -123
- package/dist/integrations/resident/tool-evidence.js.map +0 -1
- package/dist/integrations/resident/verification.js +0 -109
- package/dist/integrations/resident/verification.js.map +0 -1
- package/dist/integrations/sessions/checkpoint-view.js +0 -48
- package/dist/integrations/sessions/checkpoint-view.js.map +0 -1
- package/dist/integrations/sessions/context-inventory.js +0 -44
- package/dist/integrations/sessions/context-inventory.js.map +0 -1
- package/dist/integrations/sessions/conversation-search.js +0 -572
- package/dist/integrations/sessions/conversation-search.js.map +0 -1
- package/dist/integrations/sessions/display-title.js +0 -5
- package/dist/integrations/sessions/display-title.js.map +0 -1
- package/dist/integrations/sessions/evidence-page-validation.js +0 -74
- package/dist/integrations/sessions/evidence-page-validation.js.map +0 -1
- package/dist/integrations/sessions/evidence-recall.js +0 -117
- package/dist/integrations/sessions/evidence-recall.js.map +0 -1
- package/dist/integrations/sessions/store.js +0 -780
- package/dist/integrations/sessions/store.js.map +0 -1
- package/dist/integrations/sessions/task-context.js +0 -96
- package/dist/integrations/sessions/task-context.js.map +0 -1
- package/dist/integrations/sessions/transcript-export.js +0 -342
- package/dist/integrations/sessions/transcript-export.js.map +0 -1
- package/dist/integrations/state/home.js +0 -17
- package/dist/integrations/state/home.js.map +0 -1
- package/dist/integrations/state/identity.js +0 -49
- package/dist/integrations/state/identity.js.map +0 -1
- package/dist/integrations/state/immutable-json.js +0 -38
- package/dist/integrations/state/immutable-json.js.map +0 -1
- package/dist/integrations/state/private-directory.js +0 -43
- package/dist/integrations/state/private-directory.js.map +0 -1
- package/dist/integrations/state/project.js +0 -13
- package/dist/integrations/state/project.js.map +0 -1
- package/dist/integrations/state/report.js +0 -626
- package/dist/integrations/state/report.js.map +0 -1
- package/dist/integrations/state/retention.js +0 -18
- package/dist/integrations/state/retention.js.map +0 -1
- package/dist/integrations/subagents/NamzuCliAgent.js +0 -9
- package/dist/integrations/subagents/NamzuCliAgent.js.map +0 -1
- package/dist/integrations/subagents/activity.js +0 -759
- package/dist/integrations/subagents/activity.js.map +0 -1
- package/dist/integrations/subagents/batches.js +0 -172
- package/dist/integrations/subagents/batches.js.map +0 -1
- package/dist/integrations/subagents/definitions.js +0 -26
- package/dist/integrations/subagents/definitions.js.map +0 -1
- package/dist/integrations/subagents/model-effort.js +0 -12
- package/dist/integrations/subagents/model-effort.js.map +0 -1
- package/dist/integrations/subagents/parent.js +0 -47
- package/dist/integrations/subagents/parent.js.map +0 -1
- package/dist/integrations/subagents/policy.js +0 -3
- package/dist/integrations/subagents/policy.js.map +0 -1
- package/dist/integrations/subagents/replay.js +0 -295
- package/dist/integrations/subagents/replay.js.map +0 -1
- package/dist/integrations/subagents/runtime.js +0 -1317
- package/dist/integrations/subagents/runtime.js.map +0 -1
- package/dist/integrations/subagents/saved-agents.js +0 -102
- package/dist/integrations/subagents/saved-agents.js.map +0 -1
- package/dist/integrations/subagents/slash.js +0 -45
- package/dist/integrations/subagents/slash.js.map +0 -1
- package/dist/integrations/subagents/worktree-driver.js +0 -72
- package/dist/integrations/subagents/worktree-driver.js.map +0 -1
- package/dist/integrations/telemetry/session-export.js +0 -119
- package/dist/integrations/telemetry/session-export.js.map +0 -1
- package/dist/integrations/trust/store.js +0 -73
- package/dist/integrations/trust/store.js.map +0 -1
- package/dist/integrations/updates.js +0 -115
- package/dist/integrations/updates.js.map +0 -1
- package/dist/integrations/web/exa-search.js +0 -154
- package/dist/integrations/web/exa-search.js.map +0 -1
- package/dist/integrations/web/open-url.js +0 -73
- package/dist/integrations/web/open-url.js.map +0 -1
- package/dist/integrations/web/search.js +0 -68
- package/dist/integrations/web/search.js.map +0 -1
- package/dist/integrations/worktrees/managed.js +0 -231
- package/dist/integrations/worktrees/managed.js.map +0 -1
- package/dist/logging.js +0 -115
- package/dist/logging.js.map +0 -1
- package/dist/memory/io.js +0 -177
- package/dist/memory/io.js.map +0 -1
- package/dist/memory/presentation.js +0 -76
- package/dist/memory/presentation.js.map +0 -1
- package/dist/memory/store.js +0 -180
- package/dist/memory/store.js.map +0 -1
- package/dist/memory/typed.js +0 -336
- package/dist/memory/typed.js.map +0 -1
- package/dist/output/formatter.js +0 -16
- package/dist/output/formatter.js.map +0 -1
- package/dist/output/index.js +0 -22
- package/dist/output/index.js.map +0 -1
- package/dist/output/json.js +0 -51
- package/dist/output/json.js.map +0 -1
- package/dist/output/text.js +0 -50
- package/dist/output/text.js.map +0 -1
- package/dist/output/yaml.js +0 -26
- package/dist/output/yaml.js.map +0 -1
- package/dist/output-schema.js +0 -18
- package/dist/output-schema.js.map +0 -1
- package/dist/permissions/browser-sites.js +0 -270
- package/dist/permissions/browser-sites.js.map +0 -1
- package/dist/permissions/canonical-project.js +0 -13
- package/dist/permissions/canonical-project.js.map +0 -1
- package/dist/permissions/checks.js +0 -128
- package/dist/permissions/checks.js.map +0 -1
- package/dist/permissions/headless-trust.js +0 -86
- package/dist/permissions/headless-trust.js.map +0 -1
- package/dist/permissions/live-mode.js +0 -62
- package/dist/permissions/live-mode.js.map +0 -1
- package/dist/permissions/mode.js +0 -65
- package/dist/permissions/mode.js.map +0 -1
- package/dist/permissions/rules.js +0 -358
- package/dist/permissions/rules.js.map +0 -1
- package/dist/release-notes.js +0 -64
- package/dist/release-notes.js.map +0 -1
- package/dist/resume-invocation.js +0 -24
- package/dist/resume-invocation.js.map +0 -1
- package/dist/schedule/build.js +0 -374
- package/dist/schedule/build.js.map +0 -1
- package/dist/schedule/changes.js +0 -78
- package/dist/schedule/changes.js.map +0 -1
- package/dist/schedule/commands/add.js +0 -603
- package/dist/schedule/commands/add.js.map +0 -1
- package/dist/schedule/commands/args.js +0 -80
- package/dist/schedule/commands/args.js.map +0 -1
- package/dist/schedule/commands/confirm-prompt.js +0 -21
- package/dist/schedule/commands/confirm-prompt.js.map +0 -1
- package/dist/schedule/commands/lifecycle.js +0 -586
- package/dist/schedule/commands/lifecycle.js.map +0 -1
- package/dist/schedule/commands/list.js +0 -260
- package/dist/schedule/commands/list.js.map +0 -1
- package/dist/schedule/commands/logs.js +0 -106
- package/dist/schedule/commands/logs.js.map +0 -1
- package/dist/schedule/commands/service.js +0 -458
- package/dist/schedule/commands/service.js.map +0 -1
- package/dist/schedule/daemon/daemon.js +0 -1265
- package/dist/schedule/daemon/daemon.js.map +0 -1
- package/dist/schedule/daemon/endpoint.js +0 -158
- package/dist/schedule/daemon/endpoint.js.map +0 -1
- package/dist/schedule/daemon/exit.js +0 -8
- package/dist/schedule/daemon/exit.js.map +0 -1
- package/dist/schedule/daemon/log.js +0 -53
- package/dist/schedule/daemon/log.js.map +0 -1
- package/dist/schedule/daemon/notify.js +0 -158
- package/dist/schedule/daemon/notify.js.map +0 -1
- package/dist/schedule/daemon/retention.js +0 -46
- package/dist/schedule/daemon/retention.js.map +0 -1
- package/dist/schedule/daemon/sessions.js +0 -52
- package/dist/schedule/daemon/sessions.js.map +0 -1
- package/dist/schedule/env.js +0 -106
- package/dist/schedule/env.js.map +0 -1
- package/dist/schedule/fire/browser-preflight.js +0 -73
- package/dist/schedule/fire/browser-preflight.js.map +0 -1
- package/dist/schedule/fire/calls.js +0 -114
- package/dist/schedule/fire/calls.js.map +0 -1
- package/dist/schedule/fire/fire.js +0 -681
- package/dist/schedule/fire/fire.js.map +0 -1
- package/dist/schedule/fire/result.js +0 -19
- package/dist/schedule/fire/result.js.map +0 -1
- package/dist/schedule/fire/run-script.js +0 -81
- package/dist/schedule/fire/run-script.js.map +0 -1
- package/dist/schedule/fire/unattended-note.js +0 -51
- package/dist/schedule/fire/unattended-note.js.map +0 -1
- package/dist/schedule/fire/wake-gate.js +0 -90
- package/dist/schedule/fire/wake-gate.js.map +0 -1
- package/dist/schedule/floor.js +0 -1561
- package/dist/schedule/floor.js.map +0 -1
- package/dist/schedule/folder.js +0 -84
- package/dist/schedule/folder.js.map +0 -1
- package/dist/schedule/paths.js +0 -53
- package/dist/schedule/paths.js.map +0 -1
- package/dist/schedule/policy.js +0 -414
- package/dist/schedule/policy.js.map +0 -1
- package/dist/schedule/resume-command.js +0 -72
- package/dist/schedule/resume-command.js.map +0 -1
- package/dist/schedule/script-check.js +0 -146
- package/dist/schedule/script-check.js.map +0 -1
- package/dist/schedule/script-shell.js +0 -5
- package/dist/schedule/script-shell.js.map +0 -1
- package/dist/schedule/service/detect.js +0 -29
- package/dist/schedule/service/detect.js.map +0 -1
- package/dist/schedule/service/index.js +0 -361
- package/dist/schedule/service/index.js.map +0 -1
- package/dist/schedule/service/launchd.js +0 -84
- package/dist/schedule/service/launchd.js.map +0 -1
- package/dist/schedule/service/manifest.js +0 -16
- package/dist/schedule/service/manifest.js.map +0 -1
- package/dist/schedule/service/names.js +0 -22
- package/dist/schedule/service/names.js.map +0 -1
- package/dist/schedule/service/quote.js +0 -64
- package/dist/schedule/service/quote.js.map +0 -1
- package/dist/schedule/service/runner.js +0 -31
- package/dist/schedule/service/runner.js.map +0 -1
- package/dist/schedule/service/systemd.js +0 -96
- package/dist/schedule/service/systemd.js.map +0 -1
- package/dist/schedule/service/windows-task.js +0 -199
- package/dist/schedule/service/windows-task.js.map +0 -1
- package/dist/schedule/service/wsl.js +0 -121
- package/dist/schedule/service/wsl.js.map +0 -1
- package/dist/schedule/store/atomic.js +0 -138
- package/dist/schedule/store/atomic.js.map +0 -1
- package/dist/schedule/store/claims.js +0 -57
- package/dist/schedule/store/claims.js.map +0 -1
- package/dist/schedule/store/digest.js +0 -139
- package/dist/schedule/store/digest.js.map +0 -1
- package/dist/schedule/store/history.js +0 -117
- package/dist/schedule/store/history.js.map +0 -1
- package/dist/schedule/store/jobs.js +0 -277
- package/dist/schedule/store/jobs.js.map +0 -1
- package/dist/schedule/store/state.js +0 -38
- package/dist/schedule/store/state.js.map +0 -1
- package/dist/schedule/types.js +0 -33
- package/dist/schedule/types.js.map +0 -1
- package/dist/schedule/visible-source.js +0 -59
- package/dist/schedule/visible-source.js.map +0 -1
- package/dist/skills/audit.js +0 -75
- package/dist/skills/audit.js.map +0 -1
- package/dist/skills/catalog.js +0 -226
- package/dist/skills/catalog.js.map +0 -1
- package/dist/skills/directory.js +0 -51
- package/dist/skills/directory.js.map +0 -1
- package/dist/skills/save.js +0 -344
- package/dist/skills/save.js.map +0 -1
- package/dist/skills/store.js +0 -351
- package/dist/skills/store.js.map +0 -1
- package/dist/termination.js +0 -143
- package/dist/termination.js.map +0 -1
- package/dist/test-support/toolset.js +0 -27
- package/dist/test-support/toolset.js.map +0 -1
- package/dist/tui/AgentExplorer.js +0 -789
- package/dist/tui/AgentExplorer.js.map +0 -1
- package/dist/tui/App.js +0 -8209
- package/dist/tui/App.js.map +0 -1
- package/dist/tui/BrandHeader.js +0 -14
- package/dist/tui/BrandHeader.js.map +0 -1
- package/dist/tui/Checklist.js +0 -90
- package/dist/tui/Checklist.js.map +0 -1
- package/dist/tui/ChoicePicker.js +0 -64
- package/dist/tui/ChoicePicker.js.map +0 -1
- package/dist/tui/Composer.js +0 -908
- package/dist/tui/Composer.js.map +0 -1
- package/dist/tui/ComposerFrame.js +0 -79
- package/dist/tui/ComposerFrame.js.map +0 -1
- package/dist/tui/CopyPicker.js +0 -19
- package/dist/tui/CopyPicker.js.map +0 -1
- package/dist/tui/EditPromptPicker.js +0 -17
- package/dist/tui/EditPromptPicker.js.map +0 -1
- package/dist/tui/EffortSlider.js +0 -134
- package/dist/tui/EffortSlider.js.map +0 -1
- package/dist/tui/LiveActivity.js +0 -89
- package/dist/tui/LiveActivity.js.map +0 -1
- package/dist/tui/Markdown.js +0 -137
- package/dist/tui/Markdown.js.map +0 -1
- package/dist/tui/PermissionOverlay.js +0 -278
- package/dist/tui/PermissionOverlay.js.map +0 -1
- package/dist/tui/Picker.js +0 -1310
- package/dist/tui/Picker.js.map +0 -1
- package/dist/tui/ProviderSetup.js +0 -125
- package/dist/tui/ProviderSetup.js.map +0 -1
- package/dist/tui/ResumePicker.js +0 -34
- package/dist/tui/ResumePicker.js.map +0 -1
- package/dist/tui/SaveSkillOverlay.js +0 -118
- package/dist/tui/SaveSkillOverlay.js.map +0 -1
- package/dist/tui/ScheduleReviewOverlay.js +0 -166
- package/dist/tui/ScheduleReviewOverlay.js.map +0 -1
- package/dist/tui/StatusBar.js +0 -182
- package/dist/tui/StatusBar.js.map +0 -1
- package/dist/tui/StatusPanel.js +0 -11
- package/dist/tui/StatusPanel.js.map +0 -1
- package/dist/tui/TaskList.js +0 -43
- package/dist/tui/TaskList.js.map +0 -1
- package/dist/tui/TextPrompt.js +0 -185
- package/dist/tui/TextPrompt.js.map +0 -1
- package/dist/tui/ToolOutputViewer.js +0 -39
- package/dist/tui/ToolOutputViewer.js.map +0 -1
- package/dist/tui/Transcript.js +0 -235
- package/dist/tui/Transcript.js.map +0 -1
- package/dist/tui/TrustPrompt.js +0 -13
- package/dist/tui/TrustPrompt.js.map +0 -1
- package/dist/tui/ViewportBound.js +0 -55
- package/dist/tui/ViewportBound.js.map +0 -1
- package/dist/tui/agent-transcript-rows.js +0 -115
- package/dist/tui/agent-transcript-rows.js.map +0 -1
- package/dist/tui/agent.js +0 -4235
- package/dist/tui/agent.js.map +0 -1
- package/dist/tui/browser-notices.js +0 -107
- package/dist/tui/browser-notices.js.map +0 -1
- package/dist/tui/choice-selection.js +0 -38
- package/dist/tui/choice-selection.js.map +0 -1
- package/dist/tui/compact-transcript.js +0 -46
- package/dist/tui/compact-transcript.js.map +0 -1
- package/dist/tui/consent-timing.js +0 -48
- package/dist/tui/consent-timing.js.map +0 -1
- package/dist/tui/conversation-evidence-view.js +0 -96
- package/dist/tui/conversation-evidence-view.js.map +0 -1
- package/dist/tui/conversation-history.js +0 -33
- package/dist/tui/conversation-history.js.map +0 -1
- package/dist/tui/copy-targets.js +0 -189
- package/dist/tui/copy-targets.js.map +0 -1
- package/dist/tui/credential-entry.js +0 -134
- package/dist/tui/credential-entry.js.map +0 -1
- package/dist/tui/edit-prompts.js +0 -35
- package/dist/tui/edit-prompts.js.map +0 -1
- package/dist/tui/exit-summary.js +0 -30
- package/dist/tui/exit-summary.js.map +0 -1
- package/dist/tui/external-editor.js +0 -169
- package/dist/tui/external-editor.js.map +0 -1
- package/dist/tui/hypermode.js +0 -58
- package/dist/tui/hypermode.js.map +0 -1
- package/dist/tui/index.js +0 -81
- package/dist/tui/index.js.map +0 -1
- package/dist/tui/live-window.js +0 -281
- package/dist/tui/live-window.js.map +0 -1
- package/dist/tui/log-pane.js +0 -100
- package/dist/tui/log-pane.js.map +0 -1
- package/dist/tui/login-prompt.js +0 -105
- package/dist/tui/login-prompt.js.map +0 -1
- package/dist/tui/logo.js +0 -9
- package/dist/tui/logo.js.map +0 -1
- package/dist/tui/markdown-block-cache.js +0 -76
- package/dist/tui/markdown-block-cache.js.map +0 -1
- package/dist/tui/markdown-table.js +0 -175
- package/dist/tui/markdown-table.js.map +0 -1
- package/dist/tui/markdown-wrap.js +0 -189
- package/dist/tui/markdown-wrap.js.map +0 -1
- package/dist/tui/markdownParser.js +0 -237
- package/dist/tui/markdownParser.js.map +0 -1
- package/dist/tui/mentions.js +0 -150
- package/dist/tui/mentions.js.map +0 -1
- package/dist/tui/model-catalogue-view.js +0 -75
- package/dist/tui/model-catalogue-view.js.map +0 -1
- package/dist/tui/model-choices.js +0 -157
- package/dist/tui/model-choices.js.map +0 -1
- package/dist/tui/model-search.js +0 -28
- package/dist/tui/model-search.js.map +0 -1
- package/dist/tui/model-selection-intent.js +0 -96
- package/dist/tui/model-selection-intent.js.map +0 -1
- package/dist/tui/model-switch-tool.js +0 -74
- package/dist/tui/model-switch-tool.js.map +0 -1
- package/dist/tui/model-switch.js +0 -106
- package/dist/tui/model-switch.js.map +0 -1
- package/dist/tui/notices.js +0 -27
- package/dist/tui/notices.js.map +0 -1
- package/dist/tui/open-browser.js +0 -147
- package/dist/tui/open-browser.js.map +0 -1
- package/dist/tui/permission-review.js +0 -858
- package/dist/tui/permission-review.js.map +0 -1
- package/dist/tui/plugin-view.js +0 -59
- package/dist/tui/plugin-view.js.map +0 -1
- package/dist/tui/provider-list.js +0 -327
- package/dist/tui/provider-list.js.map +0 -1
- package/dist/tui/provider-selection.js +0 -16
- package/dist/tui/provider-selection.js.map +0 -1
- package/dist/tui/schedule/host-commands.js +0 -428
- package/dist/tui/schedule/host-commands.js.map +0 -1
- package/dist/tui/schedule/integration.js +0 -150
- package/dist/tui/schedule/integration.js.map +0 -1
- package/dist/tui/schedule/loop-host.js +0 -153
- package/dist/tui/schedule/loop-host.js.map +0 -1
- package/dist/tui/schedule/resume.js +0 -333
- package/dist/tui/schedule/resume.js.map +0 -1
- package/dist/tui/schedule/startup.js +0 -121
- package/dist/tui/schedule/startup.js.map +0 -1
- package/dist/tui/schedule/tool-host.js +0 -619
- package/dist/tui/schedule/tool-host.js.map +0 -1
- package/dist/tui/selection-window.js +0 -37
- package/dist/tui/selection-window.js.map +0 -1
- package/dist/tui/shell-escape.js +0 -110
- package/dist/tui/shell-escape.js.map +0 -1
- package/dist/tui/skills/learning.js +0 -131
- package/dist/tui/skills/learning.js.map +0 -1
- package/dist/tui/skills/suggest-setting.js +0 -55
- package/dist/tui/skills/suggest-setting.js.map +0 -1
- package/dist/tui/skills/suggestion-ledger.js +0 -52
- package/dist/tui/skills/suggestion-ledger.js.map +0 -1
- package/dist/tui/slashCommands.js +0 -1587
- package/dist/tui/slashCommands.js.map +0 -1
- package/dist/tui/status-card.js +0 -30
- package/dist/tui/status-card.js.map +0 -1
- package/dist/tui/status-panel-layout.js +0 -42
- package/dist/tui/status-panel-layout.js.map +0 -1
- package/dist/tui/stream-blocks.js +0 -187
- package/dist/tui/stream-blocks.js.map +0 -1
- package/dist/tui/task-activity.js +0 -157
- package/dist/tui/task-activity.js.map +0 -1
- package/dist/tui/terminal-choice-text.js +0 -118
- package/dist/tui/terminal-choice-text.js.map +0 -1
- package/dist/tui/terminal-display.js +0 -65
- package/dist/tui/terminal-display.js.map +0 -1
- package/dist/tui/terminal-hyperlinks.js +0 -70
- package/dist/tui/terminal-hyperlinks.js.map +0 -1
- package/dist/tui/theme.js +0 -34
- package/dist/tui/theme.js.map +0 -1
- package/dist/tui/triggers/analyze.js +0 -221
- package/dist/tui/triggers/analyze.js.map +0 -1
- package/dist/tui/triggers/context-text.js +0 -44
- package/dist/tui/triggers/context-text.js.map +0 -1
- package/dist/tui/triggers/copy.js +0 -163
- package/dist/tui/triggers/copy.js.map +0 -1
- package/dist/tui/triggers/detect.js +0 -295
- package/dist/tui/triggers/detect.js.map +0 -1
- package/dist/tui/triggers/fold.js +0 -44
- package/dist/tui/triggers/fold.js.map +0 -1
- package/dist/tui/triggers/pattern.js +0 -243
- package/dist/tui/triggers/pattern.js.map +0 -1
- package/dist/tui/triggers/provenance.js +0 -98
- package/dist/tui/triggers/provenance.js.map +0 -1
- package/dist/tui/triggers/registry.js +0 -164
- package/dist/tui/triggers/registry.js.map +0 -1
- package/dist/tui/triggers/setting.js +0 -61
- package/dist/tui/triggers/setting.js.map +0 -1
- package/dist/tui/triggers/verbs.js +0 -140
- package/dist/tui/triggers/verbs.js.map +0 -1
- package/dist/tui/turn-interruption.js +0 -160
- package/dist/tui/turn-interruption.js.map +0 -1
- package/dist/tui/turn-limits-settings.js +0 -88
- package/dist/tui/turn-limits-settings.js.map +0 -1
- package/dist/tui/types.js +0 -7
- package/dist/tui/types.js.map +0 -1
- package/dist/tui/units.js +0 -20
- package/dist/tui/units.js.map +0 -1
- package/dist/tui/use-selection-index.js +0 -13
- package/dist/tui/use-selection-index.js.map +0 -1
- package/dist/tui/web-activity.js +0 -105
- package/dist/tui/web-activity.js.map +0 -1
- package/dist/tui/workspace-diff.js +0 -101
- package/dist/tui/workspace-diff.js.map +0 -1
- package/dist/tui/workspace-review.js +0 -67
- package/dist/tui/workspace-review.js.map +0 -1
- package/dist/user-commands/store.js +0 -235
- package/dist/user-commands/store.js.map +0 -1
- package/dist/version.js +0 -23
- package/dist/version.js.map +0 -1
|
@@ -0,0 +1,818 @@
|
|
|
1
|
+
import { createRequire as __namzuCreateRequire } from 'node:module';
|
|
2
|
+
const require = __namzuCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
ResidentCleanupUnconfirmedError
|
|
5
|
+
} from "./chunk-7KWGR2YA.js";
|
|
6
|
+
import {
|
|
7
|
+
readIdentity
|
|
8
|
+
} from "./chunk-DIHEHK7K.js";
|
|
9
|
+
import {
|
|
10
|
+
cliProjectRoot
|
|
11
|
+
} from "./chunk-H6B6AROX.js";
|
|
12
|
+
import {
|
|
13
|
+
ensurePrivateStateDirectory,
|
|
14
|
+
publishPrivateJsonIfAbsent
|
|
15
|
+
} from "./chunk-N3ZEXVSS.js";
|
|
16
|
+
import {
|
|
17
|
+
DiskResidentAgenda,
|
|
18
|
+
ProjectDocumentSchema,
|
|
19
|
+
ResidentConflictError,
|
|
20
|
+
ResidentHost,
|
|
21
|
+
SessionPaths,
|
|
22
|
+
hashedSlugForCwd,
|
|
23
|
+
isEntityId,
|
|
24
|
+
resolveNamzuHome,
|
|
25
|
+
slugForCwd
|
|
26
|
+
} from "./chunk-K5HARZ7G.js";
|
|
27
|
+
import {
|
|
28
|
+
__name
|
|
29
|
+
} from "./chunk-76FLAFCG.js";
|
|
30
|
+
|
|
31
|
+
// src/integrations/resident/runner-control.ts
|
|
32
|
+
import { timingSafeEqual } from "node:crypto";
|
|
33
|
+
import { createConnection, createServer } from "node:net";
|
|
34
|
+
var MAX_MESSAGE_BYTES = 4096;
|
|
35
|
+
var MAX_OPEN_SOCKETS = 16;
|
|
36
|
+
var DEFAULT_TIMEOUT_MS = 1500;
|
|
37
|
+
var PHASES = ["starting", "idle", "working", "stopping"];
|
|
38
|
+
function object(value) {
|
|
39
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
40
|
+
}
|
|
41
|
+
__name(object, "object");
|
|
42
|
+
function exactKeys(value, keys) {
|
|
43
|
+
const actual = Object.keys(value);
|
|
44
|
+
return actual.length === keys.length && actual.every((key) => keys.includes(key));
|
|
45
|
+
}
|
|
46
|
+
__name(exactKeys, "exactKeys");
|
|
47
|
+
function validIdentity(instanceId, token) {
|
|
48
|
+
return instanceId.length > 0 && instanceId.length <= 256 && token.length > 0 && token.length <= 512;
|
|
49
|
+
}
|
|
50
|
+
__name(validIdentity, "validIdentity");
|
|
51
|
+
function validStatus(value) {
|
|
52
|
+
return typeof value.pid === "number" && Number.isSafeInteger(value.pid) && value.pid > 0 && typeof value.phase === "string" && PHASES.includes(value.phase) && typeof value.stepsStarted === "number" && Number.isSafeInteger(value.stepsStarted) && value.stepsStarted >= 0;
|
|
53
|
+
}
|
|
54
|
+
__name(validStatus, "validStatus");
|
|
55
|
+
async function createRunnerControlServer(options) {
|
|
56
|
+
if (!validIdentity(options.instanceId, options.token))
|
|
57
|
+
throw new Error("Runner control requires a bounded instance identity and secret token.");
|
|
58
|
+
const expectedToken = Buffer.from(options.token);
|
|
59
|
+
const sockets = /* @__PURE__ */ new Set();
|
|
60
|
+
let stopRequested = false;
|
|
61
|
+
let stopFailed = false;
|
|
62
|
+
let closing = false;
|
|
63
|
+
let closePromise;
|
|
64
|
+
const requestStop = /* @__PURE__ */ __name(() => {
|
|
65
|
+
if (stopRequested) return;
|
|
66
|
+
stopRequested = true;
|
|
67
|
+
try {
|
|
68
|
+
options.onStop();
|
|
69
|
+
} catch (error) {
|
|
70
|
+
stopFailed = true;
|
|
71
|
+
throw error;
|
|
72
|
+
}
|
|
73
|
+
}, "requestStop");
|
|
74
|
+
const server = createServer((socket) => {
|
|
75
|
+
socket.on("error", () => {
|
|
76
|
+
});
|
|
77
|
+
if (closing || sockets.size >= MAX_OPEN_SOCKETS) {
|
|
78
|
+
socket.destroy();
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
sockets.add(socket);
|
|
82
|
+
socket.once("close", () => sockets.delete(socket));
|
|
83
|
+
const deadline = setTimeout(() => socket.destroy(), DEFAULT_TIMEOUT_MS);
|
|
84
|
+
socket.once("close", () => clearTimeout(deadline));
|
|
85
|
+
let buffered = Buffer.alloc(0);
|
|
86
|
+
let handled = false;
|
|
87
|
+
socket.on("data", (chunk) => {
|
|
88
|
+
if (handled || buffered.length + chunk.length > MAX_MESSAGE_BYTES) {
|
|
89
|
+
socket.destroy();
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
buffered = Buffer.concat([buffered, chunk]);
|
|
93
|
+
const newline = buffered.indexOf(10);
|
|
94
|
+
if (newline < 0) return;
|
|
95
|
+
handled = true;
|
|
96
|
+
if (newline !== buffered.length - 1) {
|
|
97
|
+
socket.destroy();
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
try {
|
|
101
|
+
const request = JSON.parse(buffered.subarray(0, newline).toString("utf8"));
|
|
102
|
+
if (!object(request) || !exactKeys(request, ["version", "instanceId", "token", "action"]) || request.version !== 1 || request.instanceId !== options.instanceId || typeof request.token !== "string" || request.action !== "status" && request.action !== "stop") {
|
|
103
|
+
socket.destroy();
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
const token = Buffer.from(request.token);
|
|
107
|
+
if (token.length !== expectedToken.length || !timingSafeEqual(token, expectedToken)) {
|
|
108
|
+
socket.destroy();
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
if (request.action === "stop") requestStop();
|
|
112
|
+
if (stopFailed) throw new Error("Runner stop callback failed.");
|
|
113
|
+
const state = options.getStatus();
|
|
114
|
+
if (!object(state) || !validStatus(state)) throw new Error("Invalid runner state.");
|
|
115
|
+
socket.end(
|
|
116
|
+
`${JSON.stringify({
|
|
117
|
+
version: 1,
|
|
118
|
+
instanceId: options.instanceId,
|
|
119
|
+
pid: state.pid,
|
|
120
|
+
phase: stopRequested ? "stopping" : state.phase,
|
|
121
|
+
stepsStarted: state.stepsStarted,
|
|
122
|
+
stopRequested
|
|
123
|
+
})}
|
|
124
|
+
`
|
|
125
|
+
);
|
|
126
|
+
} catch {
|
|
127
|
+
socket.destroy();
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
const close = /* @__PURE__ */ __name(() => {
|
|
132
|
+
if (closePromise) return closePromise;
|
|
133
|
+
closing = true;
|
|
134
|
+
closePromise = new Promise((resolve3, reject) => {
|
|
135
|
+
server.close((error) => {
|
|
136
|
+
if (error && error.code !== "ERR_SERVER_NOT_RUNNING")
|
|
137
|
+
reject(error);
|
|
138
|
+
else resolve3();
|
|
139
|
+
});
|
|
140
|
+
for (const socket of sockets) socket.destroy();
|
|
141
|
+
});
|
|
142
|
+
return closePromise;
|
|
143
|
+
}, "close");
|
|
144
|
+
await new Promise((resolve3, reject) => {
|
|
145
|
+
const failed = /* @__PURE__ */ __name((error) => reject(error), "failed");
|
|
146
|
+
server.once("error", failed);
|
|
147
|
+
server.listen({ host: "127.0.0.1", port: 0, exclusive: true }, () => {
|
|
148
|
+
server.removeListener("error", failed);
|
|
149
|
+
resolve3();
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
server.on("error", () => {
|
|
153
|
+
try {
|
|
154
|
+
requestStop();
|
|
155
|
+
} catch {
|
|
156
|
+
}
|
|
157
|
+
void close().catch(() => {
|
|
158
|
+
});
|
|
159
|
+
});
|
|
160
|
+
const address = server.address();
|
|
161
|
+
if (address === null || typeof address === "string") {
|
|
162
|
+
await close();
|
|
163
|
+
throw new Error("Runner control did not acquire a loopback port.");
|
|
164
|
+
}
|
|
165
|
+
return { port: address.port, close };
|
|
166
|
+
}
|
|
167
|
+
__name(createRunnerControlServer, "createRunnerControlServer");
|
|
168
|
+
function queryRunner(record, action, options = {}) {
|
|
169
|
+
const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
170
|
+
if (!Number.isSafeInteger(timeoutMs) || timeoutMs < 1 || timeoutMs > 6e4)
|
|
171
|
+
throw new Error("Runner control timeout must be a whole number from 1 to 60000 milliseconds.");
|
|
172
|
+
if (!validIdentity(record.instanceId, record.token) || !Number.isSafeInteger(record.port) || (record.port ?? 0) < 1 || (record.port ?? 0) > 65535 || !Number.isSafeInteger(record.pid) || (record.pid ?? 0) < 1 || action !== "status" && action !== "stop")
|
|
173
|
+
return Promise.resolve({
|
|
174
|
+
kind: "unresponsive",
|
|
175
|
+
reason: "Runner control endpoint is unavailable."
|
|
176
|
+
});
|
|
177
|
+
return new Promise((resolve3) => {
|
|
178
|
+
const socket = createConnection({ host: "127.0.0.1", port: record.port });
|
|
179
|
+
let settled = false;
|
|
180
|
+
let buffered = Buffer.alloc(0);
|
|
181
|
+
const finish = /* @__PURE__ */ __name((result) => {
|
|
182
|
+
if (settled) return;
|
|
183
|
+
settled = true;
|
|
184
|
+
clearTimeout(deadline);
|
|
185
|
+
socket.destroy();
|
|
186
|
+
resolve3(result);
|
|
187
|
+
}, "finish");
|
|
188
|
+
const unresponsive = /* @__PURE__ */ __name((reason) => finish({ kind: "unresponsive", reason }), "unresponsive");
|
|
189
|
+
const deadline = setTimeout(() => unresponsive("Runner control response timed out."), timeoutMs);
|
|
190
|
+
socket.once("error", () => unresponsive("Runner control connection failed."));
|
|
191
|
+
socket.once("close", () => unresponsive("Runner control closed without a valid response."));
|
|
192
|
+
socket.once("connect", () => {
|
|
193
|
+
socket.write(
|
|
194
|
+
`${JSON.stringify({ version: 1, instanceId: record.instanceId, token: record.token, action })}
|
|
195
|
+
`
|
|
196
|
+
);
|
|
197
|
+
});
|
|
198
|
+
socket.on("data", (chunk) => {
|
|
199
|
+
if (buffered.length + chunk.length > MAX_MESSAGE_BYTES) {
|
|
200
|
+
unresponsive("Runner control response exceeded its size limit.");
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
buffered = Buffer.concat([buffered, chunk]);
|
|
204
|
+
const newline = buffered.indexOf(10);
|
|
205
|
+
if (newline < 0) return;
|
|
206
|
+
try {
|
|
207
|
+
const response = JSON.parse(buffered.subarray(0, newline).toString("utf8"));
|
|
208
|
+
if (newline !== buffered.length - 1 || !object(response) || !exactKeys(response, [
|
|
209
|
+
"version",
|
|
210
|
+
"instanceId",
|
|
211
|
+
"pid",
|
|
212
|
+
"phase",
|
|
213
|
+
"stepsStarted",
|
|
214
|
+
"stopRequested"
|
|
215
|
+
]) || response.version !== 1 || response.instanceId !== record.instanceId || response.pid !== record.pid || !validStatus(response) || typeof response.stopRequested !== "boolean" || response.stopRequested && response.phase !== "stopping" || action === "stop" && !response.stopRequested)
|
|
216
|
+
throw new Error("Invalid response.");
|
|
217
|
+
finish({
|
|
218
|
+
kind: "responsive",
|
|
219
|
+
instanceId: record.instanceId,
|
|
220
|
+
pid: response.pid,
|
|
221
|
+
phase: response.phase,
|
|
222
|
+
stepsStarted: response.stepsStarted,
|
|
223
|
+
stopRequested: response.stopRequested
|
|
224
|
+
});
|
|
225
|
+
} catch {
|
|
226
|
+
unresponsive("Runner control returned an invalid response.");
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
__name(queryRunner, "queryRunner");
|
|
232
|
+
|
|
233
|
+
// src/integrations/resident/storage.ts
|
|
234
|
+
import { lstatSync, readFileSync } from "node:fs";
|
|
235
|
+
import { readFile, realpath } from "node:fs/promises";
|
|
236
|
+
import { isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
237
|
+
var MANDATE = "Pursue only objectives explicitly added by this project\u2019s operator. Respect project instructions and current tool permissions.";
|
|
238
|
+
function residentsRootFor(root, slug) {
|
|
239
|
+
return join(new SessionPaths({ home: root, slug }).projectDir(), "residents");
|
|
240
|
+
}
|
|
241
|
+
__name(residentsRootFor, "residentsRootFor");
|
|
242
|
+
function residentDirectoryFor(root, slug, agentKey) {
|
|
243
|
+
return new SessionPaths({ home: root, slug }).residentDir(agentKey);
|
|
244
|
+
}
|
|
245
|
+
__name(residentDirectoryFor, "residentDirectoryFor");
|
|
246
|
+
async function findResidentProject(root, projectRoot) {
|
|
247
|
+
for (const slug of [slugForCwd(projectRoot), hashedSlugForCwd(projectRoot)]) {
|
|
248
|
+
const file = new SessionPaths({ home: root, slug }).projectFile();
|
|
249
|
+
let raw;
|
|
250
|
+
try {
|
|
251
|
+
const entry = lstatSync(file);
|
|
252
|
+
if (!entry.isFile() || entry.isSymbolicLink())
|
|
253
|
+
throw new Error(`${file} must be a regular file, without a symbolic link.`);
|
|
254
|
+
raw = await readFile(file, "utf8");
|
|
255
|
+
} catch (error) {
|
|
256
|
+
if (error.code === "ENOENT") return null;
|
|
257
|
+
throw error;
|
|
258
|
+
}
|
|
259
|
+
const document = ProjectDocumentSchema.parse(JSON.parse(raw));
|
|
260
|
+
if (document.cwd === projectRoot) return { slug, projectId: document.projectId };
|
|
261
|
+
}
|
|
262
|
+
return null;
|
|
263
|
+
}
|
|
264
|
+
__name(findResidentProject, "findResidentProject");
|
|
265
|
+
function validateAgentKey(agentKey) {
|
|
266
|
+
if (!/^[a-z0-9][a-z0-9_-]{0,63}$/u.test(agentKey)) {
|
|
267
|
+
throw new Error(
|
|
268
|
+
"Resident agent key must contain 1\u201364 lowercase letters, digits, underscores or hyphens, starting with a letter or digit."
|
|
269
|
+
);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
__name(validateAgentKey, "validateAgentKey");
|
|
273
|
+
function existingDirectory(path) {
|
|
274
|
+
try {
|
|
275
|
+
const entry = lstatSync(path);
|
|
276
|
+
if (!entry.isDirectory() || entry.isSymbolicLink()) {
|
|
277
|
+
throw new Error(`Resident state must use a real directory: ${path}`);
|
|
278
|
+
}
|
|
279
|
+
return true;
|
|
280
|
+
} catch (error) {
|
|
281
|
+
if (error.code === "ENOENT") return false;
|
|
282
|
+
throw error;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
__name(existingDirectory, "existingDirectory");
|
|
286
|
+
function readBinding(residentsRoot, expected, projectRoot) {
|
|
287
|
+
const agentRoot = join(residentsRoot, expected.agentKey);
|
|
288
|
+
if (!existingDirectory(residentsRoot) || !existingDirectory(agentRoot)) return null;
|
|
289
|
+
const path = join(agentRoot, "binding.json");
|
|
290
|
+
try {
|
|
291
|
+
const entry = lstatSync(path);
|
|
292
|
+
if (!entry.isFile() || entry.isSymbolicLink()) {
|
|
293
|
+
throw new Error("expected a regular file, without a symbolic link");
|
|
294
|
+
}
|
|
295
|
+
const raw = JSON.parse(readFileSync(path, "utf8"));
|
|
296
|
+
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) {
|
|
297
|
+
throw new Error("expected an object");
|
|
298
|
+
}
|
|
299
|
+
const value = raw;
|
|
300
|
+
if (value.version !== 1 || value.tenantId !== expected.tenantId || value.projectId !== expected.projectId || value.agentKey !== expected.agentKey) {
|
|
301
|
+
throw new Error("version, tenant, project or agent key does not match this resident");
|
|
302
|
+
}
|
|
303
|
+
const cwd = value.cwd;
|
|
304
|
+
if (typeof cwd !== "string" || cwd.includes("\0") || !isAbsolute(cwd) || resolve(cwd) !== cwd) {
|
|
305
|
+
throw new Error("expected an absolute canonical execution directory");
|
|
306
|
+
}
|
|
307
|
+
const withinProject = relative(projectRoot, cwd);
|
|
308
|
+
if (withinProject === ".." || withinProject.startsWith(`..${sep}`) || isAbsolute(withinProject)) {
|
|
309
|
+
throw new Error("execution directory is outside the bound project");
|
|
310
|
+
}
|
|
311
|
+
return { version: 1, ...expected, cwd };
|
|
312
|
+
} catch (error) {
|
|
313
|
+
if (error.code === "ENOENT") return null;
|
|
314
|
+
throw new Error(
|
|
315
|
+
`${path} is not a valid resident binding: ${error instanceof Error ? error.message : String(error)}. Refusing to replace it.`
|
|
316
|
+
);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
__name(readBinding, "readBinding");
|
|
320
|
+
function residentHandle(root, slug, binding) {
|
|
321
|
+
return {
|
|
322
|
+
agenda: new DiskResidentAgenda(residentsRootFor(root, slug), binding),
|
|
323
|
+
cwd: binding.cwd,
|
|
324
|
+
agentKey: binding.agentKey,
|
|
325
|
+
artifactsRoot: join(residentDirectoryFor(root, slug, binding.agentKey), "attempts"),
|
|
326
|
+
projectId: binding.projectId,
|
|
327
|
+
tenantId: binding.tenantId,
|
|
328
|
+
root,
|
|
329
|
+
slug
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
__name(residentHandle, "residentHandle");
|
|
333
|
+
async function lookupResident(cwd, agentKey) {
|
|
334
|
+
validateAgentKey(agentKey);
|
|
335
|
+
const root = resolveNamzuHome();
|
|
336
|
+
const identity = readIdentity(root);
|
|
337
|
+
if (!identity) return null;
|
|
338
|
+
const workingDirectory = await realpath(resolve(cwd));
|
|
339
|
+
const projectRoot = cliProjectRoot(workingDirectory);
|
|
340
|
+
const project = await findResidentProject(root, projectRoot);
|
|
341
|
+
if (!project) return null;
|
|
342
|
+
const binding = readBinding(
|
|
343
|
+
residentsRootFor(root, project.slug),
|
|
344
|
+
{ tenantId: identity.tenantId, projectId: project.projectId, agentKey },
|
|
345
|
+
projectRoot
|
|
346
|
+
);
|
|
347
|
+
return binding ? residentHandle(root, project.slug, binding) : null;
|
|
348
|
+
}
|
|
349
|
+
__name(lookupResident, "lookupResident");
|
|
350
|
+
async function createResident(cwd, agentKey) {
|
|
351
|
+
validateAgentKey(agentKey);
|
|
352
|
+
const workingDirectory = await realpath(resolve(cwd));
|
|
353
|
+
const { openSessions } = await import("./store-KN65QI2M.js");
|
|
354
|
+
const sessions = await openSessions(workingDirectory);
|
|
355
|
+
const projectRoot = cliProjectRoot(workingDirectory);
|
|
356
|
+
const project = await findResidentProject(sessions.root, projectRoot);
|
|
357
|
+
if (!project || project.projectId !== sessions.projectId)
|
|
358
|
+
throw new Error(
|
|
359
|
+
`The project for ${projectRoot} is not filed under ${join(sessions.root, "projects")}; refusing to place resident state elsewhere.`
|
|
360
|
+
);
|
|
361
|
+
const residentsRoot = ensurePrivateStateDirectory(
|
|
362
|
+
new SessionPaths({ home: sessions.root, slug: project.slug }).projectDir(),
|
|
363
|
+
"residents"
|
|
364
|
+
);
|
|
365
|
+
const agentRoot = ensurePrivateStateDirectory(residentsRoot, agentKey);
|
|
366
|
+
const expected = { tenantId: sessions.tenantId, projectId: sessions.projectId, agentKey };
|
|
367
|
+
let binding = readBinding(residentsRoot, expected, projectRoot);
|
|
368
|
+
if (!binding) {
|
|
369
|
+
publishPrivateJsonIfAbsent(join(agentRoot, "binding.json"), {
|
|
370
|
+
version: 1,
|
|
371
|
+
...expected,
|
|
372
|
+
cwd: workingDirectory
|
|
373
|
+
});
|
|
374
|
+
binding = readBinding(residentsRoot, expected, projectRoot);
|
|
375
|
+
if (!binding) throw new Error("Resident binding disappeared while it was being initialized.");
|
|
376
|
+
}
|
|
377
|
+
const resident = residentHandle(sessions.root, project.slug, binding);
|
|
378
|
+
let agenda = await resident.agenda.read();
|
|
379
|
+
if (!agenda) {
|
|
380
|
+
try {
|
|
381
|
+
agenda = await resident.agenda.create(MANDATE);
|
|
382
|
+
} catch (error) {
|
|
383
|
+
if (!(error instanceof ResidentConflictError)) throw error;
|
|
384
|
+
agenda = await resident.agenda.read();
|
|
385
|
+
if (!agenda) throw error;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
if (agenda.identity !== MANDATE) {
|
|
389
|
+
throw new Error("Resident agenda mandate does not match the CLI operator mandate.");
|
|
390
|
+
}
|
|
391
|
+
ensurePrivateStateDirectory(agentRoot, "attempts");
|
|
392
|
+
return resident;
|
|
393
|
+
}
|
|
394
|
+
__name(createResident, "createResident");
|
|
395
|
+
|
|
396
|
+
// src/integrations/resident/runner-store.ts
|
|
397
|
+
import { randomBytes, randomUUID } from "node:crypto";
|
|
398
|
+
import { lstatSync as lstatSync2, readFileSync as readFileSync2, readdirSync } from "node:fs";
|
|
399
|
+
import { isAbsolute as isAbsolute2, join as join2, resolve as resolve2 } from "node:path";
|
|
400
|
+
import { isDeepStrictEqual } from "node:util";
|
|
401
|
+
var UUID = /^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/u;
|
|
402
|
+
var REVISION_NAME = /^([1-9][0-9]{0,15})\.json$/u;
|
|
403
|
+
var FIELDS = [
|
|
404
|
+
"version",
|
|
405
|
+
"revision",
|
|
406
|
+
"instanceId",
|
|
407
|
+
"tenantId",
|
|
408
|
+
"projectId",
|
|
409
|
+
"agentKey",
|
|
410
|
+
"cwd",
|
|
411
|
+
"mode",
|
|
412
|
+
"phase",
|
|
413
|
+
"reservedAt",
|
|
414
|
+
"maxSteps",
|
|
415
|
+
"pauseGeneration",
|
|
416
|
+
"pid",
|
|
417
|
+
"port",
|
|
418
|
+
"token",
|
|
419
|
+
"endedAt",
|
|
420
|
+
"outcome"
|
|
421
|
+
];
|
|
422
|
+
function integer(value, minimum) {
|
|
423
|
+
return typeof value === "number" && Number.isSafeInteger(value) && value >= minimum;
|
|
424
|
+
}
|
|
425
|
+
__name(integer, "integer");
|
|
426
|
+
function canonicalPath(value) {
|
|
427
|
+
return !value.includes("\0") && isAbsolute2(value) && resolve2(value) === value;
|
|
428
|
+
}
|
|
429
|
+
__name(canonicalPath, "canonicalPath");
|
|
430
|
+
function location(resident) {
|
|
431
|
+
if (!isEntityId(resident.tenantId, "tenant") || !isEntityId(resident.projectId, "project") || !/^[a-z0-9][a-z0-9_-]{0,63}$/u.test(resident.agentKey) || !/^[A-Za-z0-9-]+$/u.test(resident.slug) || !canonicalPath(resident.root) || !canonicalPath(resident.cwd)) {
|
|
432
|
+
throw new Error("Invalid resident scope for runner ownership.");
|
|
433
|
+
}
|
|
434
|
+
const base = residentDirectoryFor(resident.root, resident.slug, resident.agentKey);
|
|
435
|
+
if (resident.artifactsRoot !== join2(base, "attempts")) {
|
|
436
|
+
throw new Error("Resident runner path does not match its bound project and agent.");
|
|
437
|
+
}
|
|
438
|
+
return { base, runner: join2(base, "runner"), revisions: join2(base, "runner", "revisions") };
|
|
439
|
+
}
|
|
440
|
+
__name(location, "location");
|
|
441
|
+
function realDirectory(path) {
|
|
442
|
+
try {
|
|
443
|
+
const entry = lstatSync2(path);
|
|
444
|
+
if (!entry.isDirectory() || entry.isSymbolicLink()) {
|
|
445
|
+
throw new Error(`Resident runner state requires a real directory: ${path}`);
|
|
446
|
+
}
|
|
447
|
+
return true;
|
|
448
|
+
} catch (error) {
|
|
449
|
+
if (error.code === "ENOENT") return false;
|
|
450
|
+
throw error;
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
__name(realDirectory, "realDirectory");
|
|
454
|
+
function revisions(resident) {
|
|
455
|
+
const paths = location(resident);
|
|
456
|
+
let current = resident.root;
|
|
457
|
+
if (!realDirectory(current)) return [];
|
|
458
|
+
for (const segment of [
|
|
459
|
+
"projects",
|
|
460
|
+
resident.slug,
|
|
461
|
+
"residents",
|
|
462
|
+
resident.agentKey,
|
|
463
|
+
"runner",
|
|
464
|
+
"revisions"
|
|
465
|
+
]) {
|
|
466
|
+
current = join2(current, segment);
|
|
467
|
+
if (!realDirectory(current)) return [];
|
|
468
|
+
}
|
|
469
|
+
const numbers = [];
|
|
470
|
+
for (const entry of readdirSync(paths.revisions, { withFileTypes: true })) {
|
|
471
|
+
if (/^[1-9][0-9]{0,15}\.json\.candidate\.[0-9a-f-]+$/u.test(entry.name)) continue;
|
|
472
|
+
const match = REVISION_NAME.exec(entry.name);
|
|
473
|
+
const revision = match ? Number(match[1]) : Number.NaN;
|
|
474
|
+
if (!integer(revision, 1) || !entry.isFile() || entry.isSymbolicLink()) {
|
|
475
|
+
throw new Error(
|
|
476
|
+
`Invalid resident runner revision entry: ${join2(paths.revisions, entry.name)}`
|
|
477
|
+
);
|
|
478
|
+
}
|
|
479
|
+
numbers.push(revision);
|
|
480
|
+
}
|
|
481
|
+
return numbers.sort((left, right) => right - left);
|
|
482
|
+
}
|
|
483
|
+
__name(revisions, "revisions");
|
|
484
|
+
function checked(resident, raw, revision) {
|
|
485
|
+
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) {
|
|
486
|
+
throw new Error("Resident runner record must be an object.");
|
|
487
|
+
}
|
|
488
|
+
const value = raw;
|
|
489
|
+
if (Object.keys(value).length !== FIELDS.length || FIELDS.some((field) => !(field in value))) {
|
|
490
|
+
throw new Error("Resident runner record has missing or unsupported fields.");
|
|
491
|
+
}
|
|
492
|
+
if (value.version !== 1 || value.revision !== revision || !integer(value.revision, 1) || typeof value.instanceId !== "string" || !UUID.test(value.instanceId) || value.tenantId !== resident.tenantId || value.projectId !== resident.projectId || value.agentKey !== resident.agentKey || value.cwd !== resident.cwd || value.mode !== "foreground" && value.mode !== "background" || !["reserved", "running", "stopped", "released"].includes(String(value.phase)) || !integer(value.reservedAt, 0) || !integer(value.maxSteps, 1) || !integer(value.pauseGeneration, 0) || value.pid !== null && !integer(value.pid, 1) || value.port !== null && (!integer(value.port, 1) || value.port > 65535) || typeof value.token !== "string" || !/^[0-9a-f]{64}$/u.test(value.token)) {
|
|
493
|
+
throw new Error("Resident runner version, revision, scope or ownership metadata is invalid.");
|
|
494
|
+
}
|
|
495
|
+
const terminal = value.phase === "stopped" || value.phase === "released";
|
|
496
|
+
if ((terminal ? !integer(value.endedAt, 0) || typeof value.outcome !== "string" || !value.outcome.trim() || value.outcome.length > 8e3 : value.endedAt !== null || value.outcome !== null) || value.phase === "reserved" && (value.pid !== null || value.port !== null) || value.phase === "running" && value.pid === null || value.pid === null && value.port !== null || value.mode === "background" && value.pid !== null && value.port === null) {
|
|
497
|
+
throw new Error("Resident runner phase and process metadata disagree.");
|
|
498
|
+
}
|
|
499
|
+
return Object.freeze(value);
|
|
500
|
+
}
|
|
501
|
+
__name(checked, "checked");
|
|
502
|
+
function readRevision(resident, revision) {
|
|
503
|
+
const path = join2(location(resident).revisions, `${revision}.json`);
|
|
504
|
+
try {
|
|
505
|
+
const entry = lstatSync2(path);
|
|
506
|
+
if (!entry.isFile() || entry.isSymbolicLink() || entry.size > 64 * 1024) {
|
|
507
|
+
throw new Error("expected a bounded regular file without a symbolic link");
|
|
508
|
+
}
|
|
509
|
+
return checked(resident, JSON.parse(readFileSync2(path, "utf8")), revision);
|
|
510
|
+
} catch (error) {
|
|
511
|
+
const detail = error instanceof SyntaxError ? "invalid JSON" : error instanceof Error ? error.message : "unknown read failure";
|
|
512
|
+
throw new Error(
|
|
513
|
+
`Cannot read resident runner revision ${path}: ${detail}. Refusing ownership recovery from damaged state.`
|
|
514
|
+
);
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
__name(readRevision, "readRevision");
|
|
518
|
+
function readRunner(resident) {
|
|
519
|
+
const head = revisions(resident)[0];
|
|
520
|
+
return head === void 0 ? null : readRevision(resident, head);
|
|
521
|
+
}
|
|
522
|
+
__name(readRunner, "readRunner");
|
|
523
|
+
function readRunnerInstance(resident, instanceId) {
|
|
524
|
+
if (!UUID.test(instanceId)) throw new Error("Invalid resident runner instance ID.");
|
|
525
|
+
for (const revision of revisions(resident)) {
|
|
526
|
+
const record = readRevision(resident, revision);
|
|
527
|
+
if (record.instanceId === instanceId) return record;
|
|
528
|
+
}
|
|
529
|
+
return null;
|
|
530
|
+
}
|
|
531
|
+
__name(readRunnerInstance, "readRunnerInstance");
|
|
532
|
+
function publish(resident, expected, propose) {
|
|
533
|
+
const current = readRunner(resident);
|
|
534
|
+
if (!isDeepStrictEqual(current, expected)) throw new ResidentConflictError();
|
|
535
|
+
const next = (current?.revision ?? 0) + 1;
|
|
536
|
+
if (!integer(next, 1)) throw new Error("Resident runner revision overflow.");
|
|
537
|
+
const record = checked(resident, propose(next), next);
|
|
538
|
+
const paths = location(resident);
|
|
539
|
+
if (!realDirectory(paths.base)) throw new Error("Resident binding directory is missing.");
|
|
540
|
+
const runner = ensurePrivateStateDirectory(paths.base, "runner");
|
|
541
|
+
const directory = ensurePrivateStateDirectory(runner, "revisions");
|
|
542
|
+
publishPrivateJsonIfAbsent(join2(directory, `${next}.json`), record);
|
|
543
|
+
if (!isDeepStrictEqual(readRevision(resident, next), record)) throw new ResidentConflictError();
|
|
544
|
+
return record;
|
|
545
|
+
}
|
|
546
|
+
__name(publish, "publish");
|
|
547
|
+
function reserveRunner(resident, options) {
|
|
548
|
+
if (options.mode !== "foreground" && options.mode !== "background" || !integer(options.maxSteps, 1) || !integer(options.pauseGeneration, 0)) {
|
|
549
|
+
throw new Error("Invalid resident runner invocation limits or mode.");
|
|
550
|
+
}
|
|
551
|
+
const current = readRunner(resident);
|
|
552
|
+
if (current && current.phase !== "stopped" && current.phase !== "released") {
|
|
553
|
+
throw new ResidentConflictError();
|
|
554
|
+
}
|
|
555
|
+
return publish(resident, current, (revision) => ({
|
|
556
|
+
version: 1,
|
|
557
|
+
revision,
|
|
558
|
+
instanceId: randomUUID(),
|
|
559
|
+
tenantId: resident.tenantId,
|
|
560
|
+
projectId: resident.projectId,
|
|
561
|
+
agentKey: resident.agentKey,
|
|
562
|
+
cwd: resident.cwd,
|
|
563
|
+
mode: options.mode,
|
|
564
|
+
phase: "reserved",
|
|
565
|
+
reservedAt: Date.now(),
|
|
566
|
+
maxSteps: options.maxSteps,
|
|
567
|
+
pauseGeneration: options.pauseGeneration,
|
|
568
|
+
pid: null,
|
|
569
|
+
port: null,
|
|
570
|
+
token: randomBytes(32).toString("hex"),
|
|
571
|
+
endedAt: null,
|
|
572
|
+
outcome: null
|
|
573
|
+
}));
|
|
574
|
+
}
|
|
575
|
+
__name(reserveRunner, "reserveRunner");
|
|
576
|
+
function attachRunning(resident, expected, process2) {
|
|
577
|
+
if (expected.phase !== "reserved") throw new ResidentConflictError();
|
|
578
|
+
return publish(resident, expected, (revision) => ({
|
|
579
|
+
...expected,
|
|
580
|
+
revision,
|
|
581
|
+
phase: "running",
|
|
582
|
+
pid: process2.pid,
|
|
583
|
+
port: process2.port
|
|
584
|
+
}));
|
|
585
|
+
}
|
|
586
|
+
__name(attachRunning, "attachRunning");
|
|
587
|
+
function finishRunner(resident, expected, outcome) {
|
|
588
|
+
if (expected.phase !== "reserved" && expected.phase !== "running") {
|
|
589
|
+
throw new ResidentConflictError();
|
|
590
|
+
}
|
|
591
|
+
return publish(resident, expected, (revision) => ({
|
|
592
|
+
...expected,
|
|
593
|
+
revision,
|
|
594
|
+
phase: "stopped",
|
|
595
|
+
endedAt: Date.now(),
|
|
596
|
+
outcome
|
|
597
|
+
}));
|
|
598
|
+
}
|
|
599
|
+
__name(finishRunner, "finishRunner");
|
|
600
|
+
function releaseRunner(resident, expected) {
|
|
601
|
+
if (expected.phase !== "reserved" && expected.phase !== "running") {
|
|
602
|
+
throw new ResidentConflictError();
|
|
603
|
+
}
|
|
604
|
+
return publish(resident, expected, (revision) => ({
|
|
605
|
+
...expected,
|
|
606
|
+
revision,
|
|
607
|
+
phase: "released",
|
|
608
|
+
endedAt: Date.now(),
|
|
609
|
+
outcome: "Operator explicitly released this owner after inspecting stopped executors."
|
|
610
|
+
}));
|
|
611
|
+
}
|
|
612
|
+
__name(releaseRunner, "releaseRunner");
|
|
613
|
+
function publicRunner(record) {
|
|
614
|
+
return {
|
|
615
|
+
version: record.version,
|
|
616
|
+
revision: record.revision,
|
|
617
|
+
instanceId: record.instanceId,
|
|
618
|
+
tenantId: record.tenantId,
|
|
619
|
+
projectId: record.projectId,
|
|
620
|
+
agentKey: record.agentKey,
|
|
621
|
+
cwd: record.cwd,
|
|
622
|
+
mode: record.mode,
|
|
623
|
+
phase: record.phase,
|
|
624
|
+
reservedAt: record.reservedAt,
|
|
625
|
+
maxSteps: record.maxSteps,
|
|
626
|
+
pauseGeneration: record.pauseGeneration,
|
|
627
|
+
pid: record.pid,
|
|
628
|
+
port: record.port,
|
|
629
|
+
endedAt: record.endedAt,
|
|
630
|
+
outcome: record.outcome
|
|
631
|
+
};
|
|
632
|
+
}
|
|
633
|
+
__name(publicRunner, "publicRunner");
|
|
634
|
+
|
|
635
|
+
// src/integrations/resident/foreground.ts
|
|
636
|
+
import { setTimeout as sleep } from "node:timers/promises";
|
|
637
|
+
async function runResidentForeground(options) {
|
|
638
|
+
const { agenda } = options;
|
|
639
|
+
if (!agenda.executionAt) throw new Error("Resident execution requires atomic admission.");
|
|
640
|
+
const interval = options.pollIntervalMs ?? 250;
|
|
641
|
+
if (!Number.isSafeInteger(interval) || interval < 1 || interval > 6e4)
|
|
642
|
+
throw new Error("Invalid resident control polling interval.");
|
|
643
|
+
options.signal.throwIfAborted();
|
|
644
|
+
const initial = await agenda.read();
|
|
645
|
+
if (!initial) throw new Error("No resident agenda exists here.");
|
|
646
|
+
const generation = options.expectedPauseGeneration ?? initial.pauseGeneration ?? 0;
|
|
647
|
+
const controller = new AbortController();
|
|
648
|
+
const signal = AbortSignal.any([options.signal, controller.signal]);
|
|
649
|
+
const fence = /* @__PURE__ */ __name((state) => {
|
|
650
|
+
if (!state) throw new Error("Resident agenda disappeared during execution.");
|
|
651
|
+
if ((state.pauseGeneration ?? 0) !== generation)
|
|
652
|
+
controller.abort(new Error("A durable pause request ended this invocation."));
|
|
653
|
+
return state;
|
|
654
|
+
}, "fence");
|
|
655
|
+
const read = /* @__PURE__ */ __name(async () => {
|
|
656
|
+
await options.checkControl?.();
|
|
657
|
+
return fence(await agenda.read());
|
|
658
|
+
}, "read");
|
|
659
|
+
const guarded = {
|
|
660
|
+
read,
|
|
661
|
+
create: /* @__PURE__ */ __name((...args) => agenda.create(...args), "create"),
|
|
662
|
+
add: /* @__PURE__ */ __name((...args) => agenda.add(...args), "add"),
|
|
663
|
+
setPaused: /* @__PURE__ */ __name((...args) => agenda.setPaused(...args), "setPaused"),
|
|
664
|
+
wake: /* @__PURE__ */ __name((...args) => agenda.wake(...args), "wake"),
|
|
665
|
+
execution: /* @__PURE__ */ __name((id) => agenda.execution(id), "execution"),
|
|
666
|
+
executionAt: /* @__PURE__ */ __name((id, expected) => {
|
|
667
|
+
const execution = agenda.executionAt?.(id, expected);
|
|
668
|
+
if (!execution) throw new Error("Resident atomic admission was removed.");
|
|
669
|
+
return {
|
|
670
|
+
read: /* @__PURE__ */ __name(() => execution.read(), "read"),
|
|
671
|
+
claim: /* @__PURE__ */ __name(async (...args) => {
|
|
672
|
+
await read();
|
|
673
|
+
signal.throwIfAborted();
|
|
674
|
+
return execution.claim(...args);
|
|
675
|
+
}, "claim"),
|
|
676
|
+
settle: /* @__PURE__ */ __name((...args) => execution.settle(...args), "settle")
|
|
677
|
+
};
|
|
678
|
+
}, "executionAt")
|
|
679
|
+
};
|
|
680
|
+
const host = new ResidentHost(
|
|
681
|
+
guarded,
|
|
682
|
+
async (...args) => {
|
|
683
|
+
await read();
|
|
684
|
+
signal.throwIfAborted();
|
|
685
|
+
return options.step(...args);
|
|
686
|
+
},
|
|
687
|
+
{ learning: true }
|
|
688
|
+
);
|
|
689
|
+
const monitorStop = new AbortController();
|
|
690
|
+
let monitorFailure;
|
|
691
|
+
let lastRevision = initial.revision;
|
|
692
|
+
const monitor = (async () => {
|
|
693
|
+
try {
|
|
694
|
+
while (!monitorStop.signal.aborted) {
|
|
695
|
+
await sleep(interval, void 0, { signal: monitorStop.signal });
|
|
696
|
+
const state = await read();
|
|
697
|
+
if (state.revision !== lastRevision) {
|
|
698
|
+
lastRevision = state.revision;
|
|
699
|
+
host.notify();
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
} catch (error) {
|
|
703
|
+
if (!monitorStop.signal.aborted) {
|
|
704
|
+
monitorFailure = error;
|
|
705
|
+
controller.abort(error);
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
})();
|
|
709
|
+
try {
|
|
710
|
+
const result = await host.run({
|
|
711
|
+
signal,
|
|
712
|
+
maxSteps: options.maxSteps,
|
|
713
|
+
...options.keepAlive !== void 0 ? { keepAlive: options.keepAlive } : {},
|
|
714
|
+
...options.maxIdleMs !== void 0 ? { maxIdleMs: options.maxIdleMs } : {}
|
|
715
|
+
});
|
|
716
|
+
if (monitorFailure) throw monitorFailure;
|
|
717
|
+
return result;
|
|
718
|
+
} finally {
|
|
719
|
+
monitorStop.abort();
|
|
720
|
+
await monitor;
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
__name(runResidentForeground, "runResidentForeground");
|
|
724
|
+
|
|
725
|
+
// src/integrations/resident/owned-runner.ts
|
|
726
|
+
async function runOwnedResident(options) {
|
|
727
|
+
const { resident } = options;
|
|
728
|
+
let owner = options.owner;
|
|
729
|
+
let phase = "starting";
|
|
730
|
+
let stepsStarted = 0;
|
|
731
|
+
const controller = new AbortController();
|
|
732
|
+
const signal = AbortSignal.any([options.signal, controller.signal]);
|
|
733
|
+
const abort = /* @__PURE__ */ __name(() => {
|
|
734
|
+
phase = "stopping";
|
|
735
|
+
controller.abort(new Error("Resident runner stop requested."));
|
|
736
|
+
}, "abort");
|
|
737
|
+
const checkControl = /* @__PURE__ */ __name(async () => {
|
|
738
|
+
const current = readRunner(resident);
|
|
739
|
+
if (current?.instanceId !== owner.instanceId || current.phase !== "running")
|
|
740
|
+
throw new Error("Resident runner ownership changed; this invocation is fenced.");
|
|
741
|
+
}, "checkControl");
|
|
742
|
+
let server;
|
|
743
|
+
let outcome = "startup_failed";
|
|
744
|
+
let cleanupConfirmed = true;
|
|
745
|
+
try {
|
|
746
|
+
signal.throwIfAborted();
|
|
747
|
+
const state = await resident.agenda.read();
|
|
748
|
+
if (!state || state.paused || (state.pauseGeneration ?? 0) !== owner.pauseGeneration)
|
|
749
|
+
throw new Error(
|
|
750
|
+
"Resident admission changed before runner startup. Resume and start a new invocation."
|
|
751
|
+
);
|
|
752
|
+
if (state.pursuits.some((p) => p.state.phase === "running"))
|
|
753
|
+
throw new Error("Inspect and reconcile unresolved work before starting a runner.");
|
|
754
|
+
server = await createRunnerControlServer({
|
|
755
|
+
instanceId: owner.instanceId,
|
|
756
|
+
token: owner.token,
|
|
757
|
+
getStatus: /* @__PURE__ */ __name(() => ({
|
|
758
|
+
pid: process.pid,
|
|
759
|
+
phase: signal.aborted ? "stopping" : phase,
|
|
760
|
+
stepsStarted
|
|
761
|
+
}), "getStatus"),
|
|
762
|
+
onStop: abort
|
|
763
|
+
});
|
|
764
|
+
owner = attachRunning(resident, owner, { pid: process.pid, port: server.port });
|
|
765
|
+
await checkControl();
|
|
766
|
+
await options.ready?.(publicRunner(owner), signal);
|
|
767
|
+
signal.throwIfAborted();
|
|
768
|
+
phase = "idle";
|
|
769
|
+
const result = await runResidentForeground({
|
|
770
|
+
agenda: resident.agenda,
|
|
771
|
+
step: /* @__PURE__ */ __name(async (...args) => {
|
|
772
|
+
phase = "working";
|
|
773
|
+
stepsStarted++;
|
|
774
|
+
try {
|
|
775
|
+
return await options.step(...args);
|
|
776
|
+
} catch (error) {
|
|
777
|
+
if (error instanceof ResidentCleanupUnconfirmedError) cleanupConfirmed = false;
|
|
778
|
+
throw error;
|
|
779
|
+
} finally {
|
|
780
|
+
phase = signal.aborted ? "stopping" : "idle";
|
|
781
|
+
}
|
|
782
|
+
}, "step"),
|
|
783
|
+
signal,
|
|
784
|
+
maxSteps: owner.maxSteps,
|
|
785
|
+
maxIdleMs: options.maxIdleMs,
|
|
786
|
+
keepAlive: options.keepAlive,
|
|
787
|
+
expectedPauseGeneration: owner.pauseGeneration,
|
|
788
|
+
checkControl,
|
|
789
|
+
...options.pollIntervalMs ? { pollIntervalMs: options.pollIntervalMs } : {}
|
|
790
|
+
});
|
|
791
|
+
outcome = result.status;
|
|
792
|
+
return result;
|
|
793
|
+
} catch (error) {
|
|
794
|
+
if (error instanceof ResidentCleanupUnconfirmedError) cleanupConfirmed = false;
|
|
795
|
+
outcome = signal.aborted ? "cancelled" : "failed";
|
|
796
|
+
throw error;
|
|
797
|
+
} finally {
|
|
798
|
+
phase = "stopping";
|
|
799
|
+
await server?.close();
|
|
800
|
+
if (cleanupConfirmed) finishRunner(resident, owner, outcome);
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
__name(runOwnedResident, "runOwnedResident");
|
|
804
|
+
|
|
805
|
+
export {
|
|
806
|
+
queryRunner,
|
|
807
|
+
residentDirectoryFor,
|
|
808
|
+
lookupResident,
|
|
809
|
+
createResident,
|
|
810
|
+
readRunner,
|
|
811
|
+
readRunnerInstance,
|
|
812
|
+
reserveRunner,
|
|
813
|
+
finishRunner,
|
|
814
|
+
releaseRunner,
|
|
815
|
+
publicRunner,
|
|
816
|
+
runOwnedResident
|
|
817
|
+
};
|
|
818
|
+
//# sourceMappingURL=chunk-U56QFYGA.js.map
|