@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
|
@@ -1,1587 +0,0 @@
|
|
|
1
|
-
import { installationRows } from '../installation.js';
|
|
2
|
-
import { statusCard } from './status-card.js';
|
|
3
|
-
import { terminalDisplayText } from './terminal-display.js';
|
|
4
|
-
import { turnLimitsAction } from './turn-limits-settings.js';
|
|
5
|
-
/**
|
|
6
|
-
* Slash command registry + parser. Pure logic — no React. Unit-tested.
|
|
7
|
-
*
|
|
8
|
-
* A command's `action` returns a `SlashAction` — see the union below, which has
|
|
9
|
-
* grown well past the "message, exit, or nothing" this line used to claim. The
|
|
10
|
-
* caller (App) maps every kind onto state, and its switch is exhaustive: a kind
|
|
11
|
-
* added here and not handled there falls out of the switch into the send path
|
|
12
|
-
* and dispatches the operator's `/command` to the model as prose.
|
|
13
|
-
*
|
|
14
|
-
* `/cost`, argumentless `/permissions` and `/agents` are RENDERERS. Every number and rule
|
|
15
|
-
* they print was already computed — the kernel emits usage on its own event,
|
|
16
|
-
* the permission rules were compiled before the session opened, and the
|
|
17
|
-
* delegate roster is decided when the subagent runtime is built. None of them
|
|
18
|
-
* asks the model, recomputes anything, or reaches past what the session
|
|
19
|
-
* already carries. A command that had to compute its own answer would be a
|
|
20
|
-
* second source for a fact the kernel already owns, and the two would drift.
|
|
21
|
-
*
|
|
22
|
-
* Ctrl+O's reprint is the same discipline with the split drawn one step earlier. The
|
|
23
|
-
* lines it prints were captured when the tool ran and are held on the transcript
|
|
24
|
-
* row, which this module cannot see and must not: App — the only thing that knows
|
|
25
|
-
* what rows exist — resolves it. Giving this module the transcript to search
|
|
26
|
-
* would put the answer
|
|
27
|
-
* to "does block 4 exist" in two places at once.
|
|
28
|
-
*/
|
|
29
|
-
import { RegistryCollisionError, isMemoryType, kernelHostCommands, } from '@namzu/sdk';
|
|
30
|
-
import { renderConfigDebug } from '../config/debug.js';
|
|
31
|
-
import { effectivePermissionMode, isPermissionMode, permissionModeDescription, permissionModeLabel, } from '../permissions/mode.js';
|
|
32
|
-
import { readChangelog, renderReleaseNotes } from '../release-notes.js';
|
|
33
|
-
import { SKILL_NAME_MAX_CHARS, SKILL_NAME_PATTERN } from '../skills/save.js';
|
|
34
|
-
import { ARGUMENTS_TOKEN, expandCommand } from '../user-commands/store.js';
|
|
35
|
-
import { isCompletionArgument } from './login-prompt.js';
|
|
36
|
-
function renameConversationAction(_ctx, args) {
|
|
37
|
-
const text = args.join(' ').trim();
|
|
38
|
-
if (text.toLowerCase() === 'clear')
|
|
39
|
-
return { kind: 'title', title: '', clear: true };
|
|
40
|
-
return { kind: 'title', title: text, clear: false };
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Autocomplete matches for a composer value that is a command-in-progress
|
|
44
|
-
* (`/`, `/me`, `/mo…` — slash + a partial name, no space yet). Returns []
|
|
45
|
-
* once a space is typed (the user has moved on to arguments) or the value
|
|
46
|
-
* isn't a slash command, so the dropdown only shows while picking a name.
|
|
47
|
-
*/
|
|
48
|
-
export function matchSlashCommands(value, userCommands = [],
|
|
49
|
-
/**
|
|
50
|
-
* What this session actually offers.
|
|
51
|
-
*
|
|
52
|
-
* Passed rather than read from a module constant, because the kernel's
|
|
53
|
-
* registry decides part of it at runtime — a command a capability adds
|
|
54
|
-
* has to reach the dropdown without an edit here, which is the whole
|
|
55
|
-
* point. Defaults to the CLI's own for callers with no registry.
|
|
56
|
-
*/
|
|
57
|
-
builtins = CLI_LOCAL_COMMANDS) {
|
|
58
|
-
const m = /^\/([\w-]*)$/.exec(value);
|
|
59
|
-
if (!m)
|
|
60
|
-
return [];
|
|
61
|
-
const prefix = (m[1] ?? '').toLowerCase();
|
|
62
|
-
// A command the dropdown does not offer is one nobody discovers. Refused
|
|
63
|
-
// ones are offered too, carrying their reason as the description — running
|
|
64
|
-
// it prints the problem, which is how its author finds out.
|
|
65
|
-
const own = userCommands.map((c) => ({
|
|
66
|
-
name: c.name,
|
|
67
|
-
description: c.problem ? `Unavailable: ${c.problem}` : c.description,
|
|
68
|
-
action: () => ({ kind: 'none' }),
|
|
69
|
-
}));
|
|
70
|
-
const matches = [...builtins.filter((command) => command.discoverable !== false), ...own].filter((command) => command.name.startsWith(prefix));
|
|
71
|
-
if (prefix.length === 0)
|
|
72
|
-
return matches;
|
|
73
|
-
const exact = matches.findIndex((command) => command.name === prefix);
|
|
74
|
-
if (exact <= 0)
|
|
75
|
-
return matches;
|
|
76
|
-
const exactMatch = matches[exact];
|
|
77
|
-
if (!exactMatch)
|
|
78
|
-
return matches;
|
|
79
|
-
return [exactMatch, ...matches.slice(0, exact), ...matches.slice(exact + 1)];
|
|
80
|
-
}
|
|
81
|
-
/** A registry command whose name a CLI-local one already answers to. */
|
|
82
|
-
export class CommandNameCollisionError extends RegistryCollisionError {
|
|
83
|
-
constructor(name) {
|
|
84
|
-
super('SlashCommands', name, `/${name} is registered by the kernel AND by this host. One of them would silently never run, and which depends on merge order — rename one.`);
|
|
85
|
-
this.name = 'CommandNameCollisionError';
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* The CLI's own commands plus whatever the kernel's registry reports.
|
|
90
|
-
*
|
|
91
|
-
* This file used to BE the vocabulary: a hardcoded array, with two headless
|
|
92
|
-
* commands importing it for a name list, so nothing a capability added could
|
|
93
|
-
* reach the operator without editing here.
|
|
94
|
-
*
|
|
95
|
-
* A collision THROWS rather than letting local win quietly. One of the two
|
|
96
|
-
* would never run, which one depends on merge order, and neither the kernel
|
|
97
|
-
* nor the host author would ever see it — the same reasoning the registry
|
|
98
|
-
* itself uses for its own duplicate names.
|
|
99
|
-
*/
|
|
100
|
-
/**
|
|
101
|
-
* Names this host implements itself, and knowingly does not take from the
|
|
102
|
-
* kernel.
|
|
103
|
-
*
|
|
104
|
-
* `/skills` is the case that made this list necessary. The kernel's version
|
|
105
|
-
* lists what a registry holds; this host's DISCOVERS skills from disk, marks
|
|
106
|
-
* which are active, and shows a refused one with its reason rather than
|
|
107
|
-
* hiding it. Both are correct for their audience, and a host with no skills
|
|
108
|
-
* UI should get the kernel's — so the kernel keeps offering it and this one
|
|
109
|
-
* declines, in writing.
|
|
110
|
-
*
|
|
111
|
-
* Deliberately not a general precedence rule. First-wins or last-wins would
|
|
112
|
-
* make an ACCIDENTAL collision silent, which is what
|
|
113
|
-
* {@link CommandNameCollisionError} exists to prevent; naming each one here
|
|
114
|
-
* keeps the refusal for every collision nobody decided about.
|
|
115
|
-
*/
|
|
116
|
-
export const HOST_OWNED_COMMAND_NAMES = ['skills', 'agents', 'goal'];
|
|
117
|
-
export function mergeHostCommands(descriptors, locals = CLI_LOCAL_COMMANDS) {
|
|
118
|
-
const localNames = new Set(locals.map((c) => c.name));
|
|
119
|
-
const owned = new Set(HOST_OWNED_COMMAND_NAMES);
|
|
120
|
-
const fromKernel = descriptors.filter((descriptor) => !owned.has(descriptor.name));
|
|
121
|
-
for (const descriptor of fromKernel) {
|
|
122
|
-
if (localNames.has(descriptor.name))
|
|
123
|
-
throw new CommandNameCollisionError(descriptor.name);
|
|
124
|
-
}
|
|
125
|
-
return [
|
|
126
|
-
...locals,
|
|
127
|
-
...fromKernel.map((descriptor) => ({
|
|
128
|
-
name: descriptor.name,
|
|
129
|
-
description: descriptor.description,
|
|
130
|
-
help: {
|
|
131
|
-
// An arbitrary JSON Schema does not declare positional CLI syntax.
|
|
132
|
-
usage: [`/${descriptor.name}${descriptor.args ? ' [arguments]' : ''}`],
|
|
133
|
-
...(descriptor.hint ? { details: [descriptor.hint] } : {}),
|
|
134
|
-
},
|
|
135
|
-
action: (_ctx, args) => ({
|
|
136
|
-
kind: 'host-command',
|
|
137
|
-
name: descriptor.name,
|
|
138
|
-
args,
|
|
139
|
-
}),
|
|
140
|
-
})),
|
|
141
|
-
];
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* A kernel outcome, drawn the way this surface draws things.
|
|
145
|
-
*
|
|
146
|
-
* The SDK returns fields and formats nothing, which is the whole reason a
|
|
147
|
-
* TUI and a JSON command can both consume it. This is the TUI's half.
|
|
148
|
-
*/
|
|
149
|
-
export function renderOutcome(outcome) {
|
|
150
|
-
switch (outcome.kind) {
|
|
151
|
-
case 'ack':
|
|
152
|
-
return outcome.message;
|
|
153
|
-
case 'prompt':
|
|
154
|
-
return outcome.text;
|
|
155
|
-
case 'refused':
|
|
156
|
-
return outcome.reason;
|
|
157
|
-
case 'report': {
|
|
158
|
-
if (outcome.rows.length === 0)
|
|
159
|
-
return `${outcome.title}: none.`;
|
|
160
|
-
const columns = [...new Set(outcome.rows.flatMap((r) => Object.keys(r)))];
|
|
161
|
-
return [
|
|
162
|
-
`${outcome.title} (${outcome.rows.length}):`,
|
|
163
|
-
...outcome.rows.map((row) => ` ${columns
|
|
164
|
-
.map((c) => (row[c] === null || row[c] === undefined ? '-' : String(row[c])))
|
|
165
|
-
.join(' ')}`),
|
|
166
|
-
].join('\n');
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* Every name this build answers to, kernel commands included.
|
|
172
|
-
*
|
|
173
|
-
* The headless commands used to map the raw array, so a registry command
|
|
174
|
-
* was invisible to them — and a name they do not know is sent to the MODEL
|
|
175
|
-
* as prose, silently, which is both a wrong answer and a tool call nobody
|
|
176
|
-
* asked for.
|
|
177
|
-
*/
|
|
178
|
-
export function hostCommandNames(descriptors = kernelCommandDescriptors(), locals = CLI_LOCAL_COMMANDS) {
|
|
179
|
-
return mergeHostCommands(descriptors, locals).map((c) => c.name);
|
|
180
|
-
}
|
|
181
|
-
/**
|
|
182
|
-
* The kernel's own commands, as descriptors.
|
|
183
|
-
*
|
|
184
|
-
* Built with empty options because only the NAMES are wanted here — a
|
|
185
|
-
* headless path deciding whether `/tasks` is a command it knows does not
|
|
186
|
-
* need a task store to answer that.
|
|
187
|
-
*/
|
|
188
|
-
export function kernelCommandDescriptors() {
|
|
189
|
-
return kernelHostCommands({}).map(({ handler: _handler, ...rest }) => rest);
|
|
190
|
-
}
|
|
191
|
-
/** Returns null when the line is not a slash command. */
|
|
192
|
-
export function parseSlash(line) {
|
|
193
|
-
const trimmed = line.trim();
|
|
194
|
-
if (!trimmed.startsWith('/'))
|
|
195
|
-
return null;
|
|
196
|
-
const [name, ...args] = trimmed.slice(1).split(/\s+/);
|
|
197
|
-
if (!name)
|
|
198
|
-
return null;
|
|
199
|
-
return { name, args };
|
|
200
|
-
}
|
|
201
|
-
/** Help reads metadata only: even a mutating or unavailable command is safe to inspect. */
|
|
202
|
-
function commandHelp(ctx, args) {
|
|
203
|
-
const name = args[0]?.replace(/^\//, '');
|
|
204
|
-
if (args.length !== 1 || !name) {
|
|
205
|
-
return {
|
|
206
|
-
kind: 'message',
|
|
207
|
-
role: 'system',
|
|
208
|
-
content: 'Usage: /help [command]. For example: /help permissions.',
|
|
209
|
-
};
|
|
210
|
-
}
|
|
211
|
-
const command = (ctx.builtins ?? CLI_LOCAL_COMMANDS).find((entry) => entry.name === name);
|
|
212
|
-
if (command) {
|
|
213
|
-
const reason = command.unavailable?.(ctx);
|
|
214
|
-
return {
|
|
215
|
-
kind: 'message',
|
|
216
|
-
role: 'system',
|
|
217
|
-
content: [
|
|
218
|
-
`/${command.name}`,
|
|
219
|
-
command.description,
|
|
220
|
-
'',
|
|
221
|
-
'Usage:',
|
|
222
|
-
...(command.help?.usage ?? [`/${command.name}`]).map((usage) => ` ${usage}`),
|
|
223
|
-
...(command.help?.details?.length ? ['', ...command.help.details] : []),
|
|
224
|
-
...(reason ? ['', `Unavailable: ${reason}`] : []),
|
|
225
|
-
].join('\n'),
|
|
226
|
-
};
|
|
227
|
-
}
|
|
228
|
-
const user = ctx.userCommands.find((entry) => entry.name === name);
|
|
229
|
-
if (user) {
|
|
230
|
-
const acceptsArguments = user.template.includes(ARGUMENTS_TOKEN);
|
|
231
|
-
return {
|
|
232
|
-
kind: 'message',
|
|
233
|
-
role: 'system',
|
|
234
|
-
content: [
|
|
235
|
-
`/${user.name}`,
|
|
236
|
-
user.description,
|
|
237
|
-
'',
|
|
238
|
-
...(user.problem
|
|
239
|
-
? []
|
|
240
|
-
: [
|
|
241
|
-
'Usage:',
|
|
242
|
-
` /${user.name}${acceptsArguments ? ' [arguments]' : ''}`,
|
|
243
|
-
'',
|
|
244
|
-
'Running this command sends its saved prompt to the model.',
|
|
245
|
-
]),
|
|
246
|
-
`${user.source === 'project' ? 'Project command' : 'User command (all projects)'}: ${user.path}`,
|
|
247
|
-
...(user.problem ? [`Unavailable: ${user.problem}`] : []),
|
|
248
|
-
].join('\n'),
|
|
249
|
-
};
|
|
250
|
-
}
|
|
251
|
-
return {
|
|
252
|
-
kind: 'message',
|
|
253
|
-
role: 'system',
|
|
254
|
-
content: `Unknown command: /${name}. Use /help to browse available commands.`,
|
|
255
|
-
};
|
|
256
|
-
}
|
|
257
|
-
/**
|
|
258
|
-
* The commands that are genuinely this host's.
|
|
259
|
-
*
|
|
260
|
-
* A transcript, a picker, a login, an expand — every one is about something
|
|
261
|
-
* the TUI owns and the kernel has no view of. What is NOT here is anything
|
|
262
|
-
* the kernel can answer, which now arrives through the registry instead of
|
|
263
|
-
* being restated in this file.
|
|
264
|
-
*/
|
|
265
|
-
export const CLI_LOCAL_COMMANDS = [
|
|
266
|
-
{
|
|
267
|
-
name: 'setup',
|
|
268
|
-
description: 'Check provider installation and access; install optional CLIs or connect.',
|
|
269
|
-
action: () => ({ kind: 'provider-setup' }),
|
|
270
|
-
},
|
|
271
|
-
{
|
|
272
|
-
name: 'config',
|
|
273
|
-
description: 'View configuration and change model, reasoning, permissions and turn limits.',
|
|
274
|
-
help: {
|
|
275
|
-
usage: [
|
|
276
|
-
'/config',
|
|
277
|
-
'/config sources',
|
|
278
|
-
'/config limits [tokens|iterations|time] [value]',
|
|
279
|
-
'/config limits unlimited',
|
|
280
|
-
'/config triggers [on|off|list]',
|
|
281
|
-
],
|
|
282
|
-
details: [
|
|
283
|
-
'/config triggers off stops words in a message (hypermode, "save this as a skill") from acting for that message, in your user config; /config triggers on turns them back on; /config triggers lists what is in force.',
|
|
284
|
-
],
|
|
285
|
-
},
|
|
286
|
-
action: (ctx, args) => {
|
|
287
|
-
if (args.length === 0)
|
|
288
|
-
return { kind: 'settings-picker' };
|
|
289
|
-
if (args[0] === 'limits')
|
|
290
|
-
return turnLimitsAction(args.slice(1));
|
|
291
|
-
if (args[0] === 'triggers') {
|
|
292
|
-
const setting = (args[1] ?? 'list').toLowerCase();
|
|
293
|
-
if (args.length <= 2 && (setting === 'on' || setting === 'off' || setting === 'list'))
|
|
294
|
-
return { kind: 'composer-triggers', setting };
|
|
295
|
-
return { kind: 'message', role: 'system', content: 'Usage: /config triggers [on|off|list]' };
|
|
296
|
-
}
|
|
297
|
-
return {
|
|
298
|
-
kind: 'message',
|
|
299
|
-
role: 'system',
|
|
300
|
-
content: args.join(' ') === 'sources'
|
|
301
|
-
? renderConfigDebug(ctx.configDebug)
|
|
302
|
-
: 'Usage: /config [sources|limits|triggers]',
|
|
303
|
-
};
|
|
304
|
-
},
|
|
305
|
-
},
|
|
306
|
-
{
|
|
307
|
-
name: 'settings',
|
|
308
|
-
description: 'View current settings and change model, reasoning or permissions.',
|
|
309
|
-
action: () => ({ kind: 'settings-picker' }),
|
|
310
|
-
},
|
|
311
|
-
{
|
|
312
|
-
name: 'agents',
|
|
313
|
-
description: 'Inspect delegated agents; /agents available lists configured agents, /agents batches lists past and running batches of delegated work.',
|
|
314
|
-
help: { usage: ['/agents [running|available|batches]'] },
|
|
315
|
-
// The subcommands are the delegation UI's (`agentsSlashCommand`): App hands
|
|
316
|
-
// it the arguments and renders what it answers, usage line included.
|
|
317
|
-
action: (_ctx, args) => ({ kind: 'agents', args }),
|
|
318
|
-
},
|
|
319
|
-
{
|
|
320
|
-
name: 'goal',
|
|
321
|
-
description: 'Manage this conversation’s goal and automatic continuation.',
|
|
322
|
-
help: {
|
|
323
|
-
usage: [
|
|
324
|
-
'/goal',
|
|
325
|
-
'/goal status',
|
|
326
|
-
'/goal set [objective]',
|
|
327
|
-
'/goal edit [objective]',
|
|
328
|
-
'/goal pause|resume|clear',
|
|
329
|
-
],
|
|
330
|
-
details: [
|
|
331
|
-
'Set and edit open an editor when no objective is supplied. Direct /goal <objective> also creates a goal.',
|
|
332
|
-
'Creating or resuming a goal enables automatic work. Pausing or clearing stops future automatic turns.',
|
|
333
|
-
],
|
|
334
|
-
},
|
|
335
|
-
action: (_ctx, args) => {
|
|
336
|
-
if (args.length === 0)
|
|
337
|
-
return { kind: 'goal-picker' };
|
|
338
|
-
if (args.length === 1 && args[0] === 'status') {
|
|
339
|
-
return { kind: 'host-command', name: 'goal', args: [] };
|
|
340
|
-
}
|
|
341
|
-
if (args.length === 1 && (args[0] === 'set' || args[0] === 'edit')) {
|
|
342
|
-
return { kind: 'goal-editor', edit: args[0] === 'edit' };
|
|
343
|
-
}
|
|
344
|
-
return { kind: 'host-command', name: 'goal', args };
|
|
345
|
-
},
|
|
346
|
-
},
|
|
347
|
-
{
|
|
348
|
-
name: 'schedule',
|
|
349
|
-
description: 'Scheduled jobs that run while namzu is closed: list, confirm, pause, run, add.',
|
|
350
|
-
help: {
|
|
351
|
-
usage: [
|
|
352
|
-
'/schedule',
|
|
353
|
-
'/schedule confirm|pause|resume|run|remove <job>',
|
|
354
|
-
'/schedule add <name> "<when>" <read-only|edit-in-folder> <prompt…>',
|
|
355
|
-
],
|
|
356
|
-
details: [
|
|
357
|
-
'A run waiting for your approval is answered with /resume of its conversation in its folder.',
|
|
358
|
-
'The scheduler itself is installed with `namzu schedule install`.',
|
|
359
|
-
],
|
|
360
|
-
},
|
|
361
|
-
action: (_ctx, args) => ({ kind: 'host-command', name: 'schedule', args }),
|
|
362
|
-
},
|
|
363
|
-
{
|
|
364
|
-
name: 'browser',
|
|
365
|
-
description: 'The browser this session drives: engine, profile, site rules; switch profile.',
|
|
366
|
-
help: {
|
|
367
|
-
usage: ['/browser', '/browser profile <name>'],
|
|
368
|
-
details: [
|
|
369
|
-
'A profile holds your sign-ins; sign in once with `namzu browser login <profile> <url>`.',
|
|
370
|
-
'Site rules come from `browser.sites` in your config.',
|
|
371
|
-
],
|
|
372
|
-
},
|
|
373
|
-
action: (_ctx, args) => ({ kind: 'browser', args }),
|
|
374
|
-
},
|
|
375
|
-
{
|
|
376
|
-
name: 'loop',
|
|
377
|
-
description: 'Re-send a prompt to this conversation on an interval, between turns.',
|
|
378
|
-
help: {
|
|
379
|
-
usage: ['/loop <interval> <prompt or /command>', '/loop list', '/loop stop <id>|all'],
|
|
380
|
-
details: [
|
|
381
|
-
'5m, 1h, or a five-field cron expression. Fires once when idle, never once per missed interval; expires after 7 days.',
|
|
382
|
-
],
|
|
383
|
-
},
|
|
384
|
-
action: (_ctx, args) => ({ kind: 'host-command', name: 'loop', args }),
|
|
385
|
-
},
|
|
386
|
-
{
|
|
387
|
-
name: 'help',
|
|
388
|
-
description: 'Browse commands, or show usage with /help <command>.',
|
|
389
|
-
help: {
|
|
390
|
-
usage: ['/help', '/help <command>'],
|
|
391
|
-
details: [
|
|
392
|
-
'Without a name, opens the command menu. With a name, shows help without running the command.',
|
|
393
|
-
],
|
|
394
|
-
},
|
|
395
|
-
action: (ctx, args) => {
|
|
396
|
-
if (args.length > 0)
|
|
397
|
-
return commandHelp(ctx, args);
|
|
398
|
-
// Reads what this session OFFERS, not a module constant. A command the
|
|
399
|
-
// kernel registered and `/help` did not list is a command nobody
|
|
400
|
-
// discovers. Refused command files remain rows with their reason; App
|
|
401
|
-
// refuses those rows instead of silently invoking a same-named builtin.
|
|
402
|
-
return {
|
|
403
|
-
kind: 'command-picker',
|
|
404
|
-
commands: [
|
|
405
|
-
...(ctx.builtins ?? CLI_LOCAL_COMMANDS)
|
|
406
|
-
.filter((command) => command.discoverable !== false)
|
|
407
|
-
.map((command) => ({
|
|
408
|
-
name: command.name,
|
|
409
|
-
description: command.description,
|
|
410
|
-
...(command.unavailable?.(ctx) ? { problem: command.unavailable(ctx) } : {}),
|
|
411
|
-
})),
|
|
412
|
-
...ctx.userCommands.map((command) => ({
|
|
413
|
-
name: command.name,
|
|
414
|
-
description: command.description,
|
|
415
|
-
...(command.problem ? { problem: command.problem } : {}),
|
|
416
|
-
})),
|
|
417
|
-
],
|
|
418
|
-
};
|
|
419
|
-
},
|
|
420
|
-
},
|
|
421
|
-
{
|
|
422
|
-
name: 'feedback',
|
|
423
|
-
help: { usage: ['/feedback', '/feedback good|bad [note]'] },
|
|
424
|
-
unavailable: (ctx) => ctx.lastAssistantMessageId()
|
|
425
|
-
? undefined
|
|
426
|
-
: 'Nothing to rate yet. Wait for an assistant answer.',
|
|
427
|
-
description: 'Rate the last answer; choose good/bad or add an optional note.',
|
|
428
|
-
action: (ctx, args) => {
|
|
429
|
-
if (args.length === 0) {
|
|
430
|
-
const messageId = ctx.lastAssistantMessageId();
|
|
431
|
-
return messageId
|
|
432
|
-
? { kind: 'feedback-picker', messageId }
|
|
433
|
-
: {
|
|
434
|
-
kind: 'message',
|
|
435
|
-
role: 'system',
|
|
436
|
-
content: 'Nothing to rate yet — /feedback applies to the last answer in this turn.',
|
|
437
|
-
};
|
|
438
|
-
}
|
|
439
|
-
const [rating, ...rest] = args;
|
|
440
|
-
if (rating !== 'good' && rating !== 'bad') {
|
|
441
|
-
return {
|
|
442
|
-
kind: 'message',
|
|
443
|
-
role: 'system',
|
|
444
|
-
content: 'Usage: /feedback good|bad [note]',
|
|
445
|
-
};
|
|
446
|
-
}
|
|
447
|
-
// Refused rather than recorded against something invented. A
|
|
448
|
-
// feedback row is read later to answer "which answers were bad";
|
|
449
|
-
// one pointing at a message that does not exist cannot be traced
|
|
450
|
-
// back to what was said, and is indistinguishable from a real one.
|
|
451
|
-
const messageId = ctx.lastAssistantMessageId();
|
|
452
|
-
if (!messageId) {
|
|
453
|
-
return {
|
|
454
|
-
kind: 'message',
|
|
455
|
-
role: 'system',
|
|
456
|
-
content: 'Nothing to rate yet — /feedback applies to the last answer in this turn.',
|
|
457
|
-
};
|
|
458
|
-
}
|
|
459
|
-
const note = rest.join(' ').trim();
|
|
460
|
-
return { kind: 'feedback', rating, messageId, ...(note ? { note } : {}) };
|
|
461
|
-
},
|
|
462
|
-
},
|
|
463
|
-
{
|
|
464
|
-
name: 'clear',
|
|
465
|
-
description: 'Clear the terminal and start a fresh conversation.',
|
|
466
|
-
action: () => ({ kind: 'new-conversation', clearScreen: true }),
|
|
467
|
-
},
|
|
468
|
-
{
|
|
469
|
-
name: 'new',
|
|
470
|
-
description: 'Start a fresh conversation without clearing the terminal.',
|
|
471
|
-
action: () => ({ kind: 'new-conversation', clearScreen: false }),
|
|
472
|
-
},
|
|
473
|
-
{
|
|
474
|
-
name: 'archive',
|
|
475
|
-
description: 'Archive this conversation and exit after confirmation.',
|
|
476
|
-
action: () => ({ kind: 'archive-picker' }),
|
|
477
|
-
},
|
|
478
|
-
{
|
|
479
|
-
name: 'unarchive',
|
|
480
|
-
description: 'Restore an archived conversation in this project.',
|
|
481
|
-
action: () => ({ kind: 'unarchive' }),
|
|
482
|
-
},
|
|
483
|
-
{
|
|
484
|
-
name: 'exit',
|
|
485
|
-
description: 'Exit namzu.',
|
|
486
|
-
action: () => ({ kind: 'exit' }),
|
|
487
|
-
},
|
|
488
|
-
{
|
|
489
|
-
name: 'rename',
|
|
490
|
-
help: { usage: ['/rename [name]', '/rename clear'] },
|
|
491
|
-
description: 'Rename this conversation; opens an editor when no name is supplied. /rename clear removes the saved name.',
|
|
492
|
-
action: renameConversationAction,
|
|
493
|
-
},
|
|
494
|
-
{
|
|
495
|
-
name: 'fork',
|
|
496
|
-
description: 'Continue in a copy of this conversation, leaving the original where it is.',
|
|
497
|
-
action: () => ({ kind: 'fork' }),
|
|
498
|
-
},
|
|
499
|
-
{
|
|
500
|
-
name: 'worktree',
|
|
501
|
-
help: { usage: ['/worktree [list|create [name]|fork [name]|resume <name>]'] },
|
|
502
|
-
description: 'List or create separate Git checkouts; fork this conversation into one.',
|
|
503
|
-
action: (_ctx, args) => ({ kind: 'worktree', args }),
|
|
504
|
-
},
|
|
505
|
-
{
|
|
506
|
-
name: 'add-dir',
|
|
507
|
-
help: {
|
|
508
|
-
usage: ['/add-dir [path]'],
|
|
509
|
-
details: ['Without a path, lists added directories. Paths may contain spaces.'],
|
|
510
|
-
},
|
|
511
|
-
description: 'Let the file tools reach another directory this session: /add-dir <path>. Alone, list them.',
|
|
512
|
-
action: (ctx, args) => {
|
|
513
|
-
const path = args.join(' ').trim();
|
|
514
|
-
if (path.length === 0) {
|
|
515
|
-
const dirs = ctx.directories?.() ?? [];
|
|
516
|
-
return {
|
|
517
|
-
kind: 'message',
|
|
518
|
-
role: 'system',
|
|
519
|
-
content: dirs.length === 0
|
|
520
|
-
? 'No added directories. The file tools reach the working directory without asking; a path elsewhere is asked about call by call (refused inside the sandbox). /add-dir <path> adds one for this session, after asking when it is outside the working directory; `additionalDirectories` in the config file adds one for every session.'
|
|
521
|
-
: `Added directories (reachable by absolute path, bound into the sandbox):\n${dirs.map((d) => ` ${d}`).join('\n')}`,
|
|
522
|
-
};
|
|
523
|
-
}
|
|
524
|
-
return { kind: 'add-dir', path };
|
|
525
|
-
},
|
|
526
|
-
},
|
|
527
|
-
{
|
|
528
|
-
name: 'restore',
|
|
529
|
-
help: {
|
|
530
|
-
usage: ['/restore [turn]'],
|
|
531
|
-
details: ['Run /restore to list checkpoints before choosing a turn to restore.'],
|
|
532
|
-
},
|
|
533
|
-
description: 'Put files back to before a turn: /restore lists the checkpoints, /restore N restores.',
|
|
534
|
-
action: (_ctx, args) => {
|
|
535
|
-
const raw = args[0]?.trim();
|
|
536
|
-
if (!raw)
|
|
537
|
-
return { kind: 'restore' };
|
|
538
|
-
const turn = Number.parseInt(raw, 10);
|
|
539
|
-
if (!Number.isInteger(turn) || turn < 1 || String(turn) !== raw) {
|
|
540
|
-
return {
|
|
541
|
-
kind: 'message',
|
|
542
|
-
role: 'system',
|
|
543
|
-
content: `/restore takes a turn number from the list: /restore 3. Not: ${raw}`,
|
|
544
|
-
};
|
|
545
|
-
}
|
|
546
|
-
return { kind: 'restore', turn };
|
|
547
|
-
},
|
|
548
|
-
},
|
|
549
|
-
{
|
|
550
|
-
name: 'memory',
|
|
551
|
-
help: {
|
|
552
|
-
usage: [
|
|
553
|
-
'/memory [show|list]',
|
|
554
|
-
'/memory add [--type user|feedback|project|reference] <text>',
|
|
555
|
-
'/memory --user add <text>',
|
|
556
|
-
'/memory import-notes',
|
|
557
|
-
],
|
|
558
|
-
details: [
|
|
559
|
-
'Show and list read stored and curated memory, with what turns recorded on their own in a section of its own. Add saves a typed memory file for this project (type project unless --type says otherwise); --user appends a note to the curated file for all projects.',
|
|
560
|
-
'Direct /memory <text> also saves a project note. To save a reserved word as a note, use /memory add show.',
|
|
561
|
-
"import-notes copies every top-level bullet of the project's curated MEMORY.md, where #note used to append, into typed memory files, skipping any already stored. The curated file is never changed; delete bullets from it yourself.",
|
|
562
|
-
],
|
|
563
|
-
},
|
|
564
|
-
description: 'Show memory, or save a typed project memory with /memory add <text>. Use /memory --user add <text> for every project.',
|
|
565
|
-
action: (_ctx, args) => {
|
|
566
|
-
const user = args[0] === '--user';
|
|
567
|
-
const memoryArgs = user ? args.slice(1) : args;
|
|
568
|
-
const text = memoryArgs.join(' ').trim();
|
|
569
|
-
// Reserve standalone inspection words while retaining multiword facts.
|
|
570
|
-
if (text.length === 0 || ['show', 'list'].includes(text.toLowerCase())) {
|
|
571
|
-
return { kind: 'show-memory' };
|
|
572
|
-
}
|
|
573
|
-
if (text.toLowerCase() === 'import-notes') {
|
|
574
|
-
if (user) {
|
|
575
|
-
return {
|
|
576
|
-
kind: 'message',
|
|
577
|
-
role: 'system',
|
|
578
|
-
content: 'import-notes copies project notes; the curated file for all projects stays as it is.',
|
|
579
|
-
};
|
|
580
|
-
}
|
|
581
|
-
return { kind: 'import-notes' };
|
|
582
|
-
}
|
|
583
|
-
if (memoryArgs[0]?.toLowerCase() === 'add') {
|
|
584
|
-
let rest = memoryArgs.slice(1);
|
|
585
|
-
let memoryType;
|
|
586
|
-
if (rest[0] === '--type') {
|
|
587
|
-
const requested = rest[1]?.toLowerCase();
|
|
588
|
-
if (!isMemoryType(requested) || user) {
|
|
589
|
-
return {
|
|
590
|
-
kind: 'message',
|
|
591
|
-
role: 'system',
|
|
592
|
-
content: user
|
|
593
|
-
? '--type applies to project memories; /memory --user add appends to the curated file for all projects.'
|
|
594
|
-
: 'Usage: /memory add --type user|feedback|project|reference <text>.',
|
|
595
|
-
};
|
|
596
|
-
}
|
|
597
|
-
memoryType = requested;
|
|
598
|
-
rest = rest.slice(2);
|
|
599
|
-
}
|
|
600
|
-
const fact = rest.join(' ').trim();
|
|
601
|
-
if (fact.length === 0) {
|
|
602
|
-
return {
|
|
603
|
-
kind: 'message',
|
|
604
|
-
role: 'system',
|
|
605
|
-
content: 'Usage: /memory add <text> or /memory --user add <text>. /memory show displays saved memory.',
|
|
606
|
-
};
|
|
607
|
-
}
|
|
608
|
-
return {
|
|
609
|
-
kind: 'remember',
|
|
610
|
-
text: fact,
|
|
611
|
-
scope: user ? 'user' : 'project',
|
|
612
|
-
...(memoryType ? { memoryType } : {}),
|
|
613
|
-
};
|
|
614
|
-
}
|
|
615
|
-
return { kind: 'remember', text, scope: user ? 'user' : 'project' };
|
|
616
|
-
},
|
|
617
|
-
},
|
|
618
|
-
{
|
|
619
|
-
name: 'skills',
|
|
620
|
-
help: {
|
|
621
|
-
usage: [
|
|
622
|
-
'/skills',
|
|
623
|
-
'/skills list',
|
|
624
|
-
'/skills new [what it should do]',
|
|
625
|
-
'/skills save [name]',
|
|
626
|
-
'/skills save off|on',
|
|
627
|
-
'/skills <name>',
|
|
628
|
-
],
|
|
629
|
-
details: [
|
|
630
|
-
'/skills new starts the skill-creator interview; the model drafts a SKILL.md and nothing is saved until you choose where on its confirmation screen.',
|
|
631
|
-
'/skills save turns what this conversation just did into a skill, generalised and without secrets or tool output, ending on the same confirmation screen.',
|
|
632
|
-
'/skills save off stops the proposal printed after a multi-step task, in your user config; /skills save on turns it back on.',
|
|
633
|
-
],
|
|
634
|
-
},
|
|
635
|
-
description: 'Choose an available skill; /skills list shows them all, /skills new makes one.',
|
|
636
|
-
action: (_ctx, args) => {
|
|
637
|
-
const choice = args.join(' ').trim();
|
|
638
|
-
if (choice.length === 0)
|
|
639
|
-
return { kind: 'skill-picker' };
|
|
640
|
-
if (choice.toLowerCase() === 'list')
|
|
641
|
-
return { kind: 'list-skills' };
|
|
642
|
-
if (args[0]?.toLowerCase() === 'new')
|
|
643
|
-
return { kind: 'new-skill', idea: args.slice(1).join(' ').trim() };
|
|
644
|
-
if (args[0]?.toLowerCase() === 'save') {
|
|
645
|
-
const rest = args.slice(1).join(' ').trim();
|
|
646
|
-
const word = rest.toLowerCase();
|
|
647
|
-
if (word === 'off' || word === 'on')
|
|
648
|
-
return { kind: 'skill-suggestions', on: word === 'on' };
|
|
649
|
-
if (rest.length === 0)
|
|
650
|
-
return { kind: 'save-skill' };
|
|
651
|
-
if (!SKILL_NAME_PATTERN.test(rest) || rest.length > SKILL_NAME_MAX_CHARS) {
|
|
652
|
-
return {
|
|
653
|
-
kind: 'message',
|
|
654
|
-
role: 'system',
|
|
655
|
-
content: `"${rest}" is not a skill name: use lowercase letters, digits and single hyphens, at most ${SKILL_NAME_MAX_CHARS} characters (/skills save release-notes).`,
|
|
656
|
-
};
|
|
657
|
-
}
|
|
658
|
-
return { kind: 'save-skill', name: rest };
|
|
659
|
-
}
|
|
660
|
-
return { kind: 'load-skill', name: choice };
|
|
661
|
-
},
|
|
662
|
-
},
|
|
663
|
-
{
|
|
664
|
-
name: 'plugins',
|
|
665
|
-
description: 'Inspect plugins, change their session state, or remember it after restart.',
|
|
666
|
-
help: {
|
|
667
|
-
usage: ['/plugins', '/plugins list', '/plugins <name>'],
|
|
668
|
-
details: [
|
|
669
|
-
'Choose a plugin to inspect its contributions or change its session state. Changes require an idle session. Use Keep enabled/disabled after restart to remember its state for future sessions and model switches. Plugin loading must first be enabled in configuration.',
|
|
670
|
-
],
|
|
671
|
-
},
|
|
672
|
-
action: (_ctx, args) => args.length > 1
|
|
673
|
-
? {
|
|
674
|
-
kind: 'message',
|
|
675
|
-
role: 'system',
|
|
676
|
-
content: 'Usage: /plugins [list|name]',
|
|
677
|
-
}
|
|
678
|
-
: {
|
|
679
|
-
kind: 'plugins',
|
|
680
|
-
list: args[0] === 'list',
|
|
681
|
-
...(args[0] && args[0] !== 'list' ? { name: args[0] } : {}),
|
|
682
|
-
},
|
|
683
|
-
},
|
|
684
|
-
{
|
|
685
|
-
name: 'resume',
|
|
686
|
-
description: 'Continue this conversation’s paused turn, or, when it has none, resume a past conversation in this folder.',
|
|
687
|
-
action: () => ({ kind: 'resume' }),
|
|
688
|
-
},
|
|
689
|
-
{
|
|
690
|
-
name: 'abandon',
|
|
691
|
-
description: 'Close this conversation’s paused or interrupted turn without resuming it, so the next prompt starts a new one.',
|
|
692
|
-
help: { usage: ['/abandon [reason]'] },
|
|
693
|
-
action: (_ctx, args) => ({
|
|
694
|
-
kind: 'abandon',
|
|
695
|
-
reason: args.join(' ').trim() || 'Abandoned by the operator with /abandon.',
|
|
696
|
-
}),
|
|
697
|
-
},
|
|
698
|
-
{
|
|
699
|
-
name: 'model',
|
|
700
|
-
description: 'Choose a model for the current provider, or change providers.',
|
|
701
|
-
help: {
|
|
702
|
-
usage: ['/model', '/model <model-or-provider/model>'],
|
|
703
|
-
details: [
|
|
704
|
-
'Pass a model ID to change only this conversation, without a model request. Without an ID, open the searchable picker; press / to search names starting with a reserved shortcut.',
|
|
705
|
-
'Press p in the model picker to change providers. Normal selections are saved for future launches; temporary credentials keep the selection in this session.',
|
|
706
|
-
],
|
|
707
|
-
},
|
|
708
|
-
action: () => ({ kind: 'repick' }),
|
|
709
|
-
},
|
|
710
|
-
{
|
|
711
|
-
name: 'login',
|
|
712
|
-
description: 'Sign in with a Claude or Codex subscription.',
|
|
713
|
-
help: {
|
|
714
|
-
usage: ['/login', '/login <callback-address-or-code>'],
|
|
715
|
-
details: [
|
|
716
|
-
'Start sign-in with /login, then paste the callback address or code when requested.',
|
|
717
|
-
],
|
|
718
|
-
},
|
|
719
|
-
action: (_ctx, args) => isCompletionArgument(args)
|
|
720
|
-
? { kind: 'login', pasted: args.join(' ').trim() }
|
|
721
|
-
: { kind: 'login' },
|
|
722
|
-
},
|
|
723
|
-
{
|
|
724
|
-
name: 'logout',
|
|
725
|
-
help: { usage: ['/logout [claude|codex|gemini|all]'] },
|
|
726
|
-
description: 'Remove a Namzu-owned credential: /logout [claude|codex|gemini|all].',
|
|
727
|
-
action: (_ctx, args) => {
|
|
728
|
-
const target = args.join(' ').trim().toLowerCase();
|
|
729
|
-
if (target.length === 0)
|
|
730
|
-
return { kind: 'logout' };
|
|
731
|
-
if (target === 'claude' || target === 'anthropic') {
|
|
732
|
-
return { kind: 'logout', target: 'anthropic' };
|
|
733
|
-
}
|
|
734
|
-
if (target === 'codex' || target === 'chatgpt')
|
|
735
|
-
return { kind: 'logout', target: 'codex' };
|
|
736
|
-
if (target === 'gemini' || target === 'google')
|
|
737
|
-
return { kind: 'logout', target: 'google' };
|
|
738
|
-
if (target === 'all')
|
|
739
|
-
return { kind: 'logout', target: 'all' };
|
|
740
|
-
return {
|
|
741
|
-
kind: 'message',
|
|
742
|
-
role: 'system',
|
|
743
|
-
content: 'Usage: /logout [claude|codex|gemini|all]',
|
|
744
|
-
};
|
|
745
|
-
},
|
|
746
|
-
},
|
|
747
|
-
{
|
|
748
|
-
name: 'cost',
|
|
749
|
-
help: { usage: ['/cost [details]'] },
|
|
750
|
-
description: 'Show usage and cost for the current or latest turn.',
|
|
751
|
-
action: (ctx, args) => reportCommand('cost', args, (details) => renderCost(ctx.usage, ctx.compaction, details)),
|
|
752
|
-
},
|
|
753
|
-
{
|
|
754
|
-
name: 'jobs',
|
|
755
|
-
description: 'List background jobs started this session, running and ended.',
|
|
756
|
-
action: (ctx) => ({
|
|
757
|
-
kind: 'message',
|
|
758
|
-
role: 'system',
|
|
759
|
-
content: renderJobs(ctx.jobs()),
|
|
760
|
-
}),
|
|
761
|
-
},
|
|
762
|
-
{
|
|
763
|
-
name: 'release-notes',
|
|
764
|
-
help: { usage: ['/release-notes [version]'] },
|
|
765
|
-
description: 'Show what changed in the version that is running: /release-notes [version].',
|
|
766
|
-
action: (_ctx, args) => ({
|
|
767
|
-
kind: 'message',
|
|
768
|
-
role: 'system',
|
|
769
|
-
content: renderReleaseNotes(readChangelog(), args[0]?.trim() || undefined),
|
|
770
|
-
}),
|
|
771
|
-
},
|
|
772
|
-
{
|
|
773
|
-
name: 'hooks',
|
|
774
|
-
description: 'List the shell hooks this session runs, by event.',
|
|
775
|
-
action: (ctx) => ({
|
|
776
|
-
kind: 'message',
|
|
777
|
-
role: 'system',
|
|
778
|
-
content: renderHooks(ctx.hooks?.()),
|
|
779
|
-
}),
|
|
780
|
-
},
|
|
781
|
-
{
|
|
782
|
-
name: 'context',
|
|
783
|
-
help: { usage: ['/context [details]'] },
|
|
784
|
-
description: 'Show context usage and automatic cleanup.',
|
|
785
|
-
action: (ctx, args) => reportCommand('context', args, (details) => renderContext(ctx.usage, ctx.compaction, details)),
|
|
786
|
-
},
|
|
787
|
-
{
|
|
788
|
-
name: 'review',
|
|
789
|
-
help: {
|
|
790
|
-
usage: ['/review [instructions]'],
|
|
791
|
-
details: [
|
|
792
|
-
'Without instructions, opens the review target menu. Starting a review uses the selected model.',
|
|
793
|
-
],
|
|
794
|
-
},
|
|
795
|
-
description: 'Choose a review target, or provide custom instructions: /review [instructions].',
|
|
796
|
-
action: (_ctx, args) => {
|
|
797
|
-
const instructions = args.join(' ').trim();
|
|
798
|
-
return instructions ? { kind: 'review', instructions } : { kind: 'review' };
|
|
799
|
-
},
|
|
800
|
-
},
|
|
801
|
-
{
|
|
802
|
-
name: 'mcp',
|
|
803
|
-
help: { usage: ['/mcp [tools|details]'] },
|
|
804
|
-
description: 'Show connected tool servers and connection problems.',
|
|
805
|
-
action: (ctx, args) => reportCommand('mcp', args, (details) => renderMcp(ctx.mcp(), details), 'tools'),
|
|
806
|
-
},
|
|
807
|
-
{
|
|
808
|
-
name: 'diff',
|
|
809
|
-
description: 'Show what is uncommitted in this working tree.',
|
|
810
|
-
action: () => ({ kind: 'diff' }),
|
|
811
|
-
},
|
|
812
|
-
{
|
|
813
|
-
name: 'compact',
|
|
814
|
-
description: 'Summarise the older half of this conversation to free up context.',
|
|
815
|
-
help: {
|
|
816
|
-
usage: ['/compact'],
|
|
817
|
-
details: ['Compaction uses a model call to summarise older context.'],
|
|
818
|
-
},
|
|
819
|
-
action: () => ({ kind: 'compact' }),
|
|
820
|
-
},
|
|
821
|
-
{
|
|
822
|
-
name: 'copy',
|
|
823
|
-
description: 'Choose the whole latest answer, a code block, or a quote to copy.',
|
|
824
|
-
action: () => ({ kind: 'copy' }),
|
|
825
|
-
},
|
|
826
|
-
{
|
|
827
|
-
name: 'raw',
|
|
828
|
-
help: { usage: ['/raw [on|off]'] },
|
|
829
|
-
description: 'Toggle copy-friendly plain transcript rendering: /raw [on|off].',
|
|
830
|
-
action: (_ctx, args) => {
|
|
831
|
-
const choice = args.join(' ').trim().toLowerCase();
|
|
832
|
-
if (choice.length === 0)
|
|
833
|
-
return { kind: 'raw', enabled: 'toggle' };
|
|
834
|
-
if (choice === 'on')
|
|
835
|
-
return { kind: 'raw', enabled: true };
|
|
836
|
-
if (choice === 'off')
|
|
837
|
-
return { kind: 'raw', enabled: false };
|
|
838
|
-
return {
|
|
839
|
-
kind: 'message',
|
|
840
|
-
role: 'system',
|
|
841
|
-
content: 'Usage: /raw [on|off]',
|
|
842
|
-
};
|
|
843
|
-
},
|
|
844
|
-
},
|
|
845
|
-
{
|
|
846
|
-
name: 'export',
|
|
847
|
-
help: {
|
|
848
|
-
usage: ['/export [path]'],
|
|
849
|
-
details: [
|
|
850
|
-
'Without a path, choose the clipboard or a Markdown file. Existing files are not overwritten. Paths may contain spaces.',
|
|
851
|
-
],
|
|
852
|
-
},
|
|
853
|
-
description: 'Export this verified conversation to the clipboard or a Markdown file.',
|
|
854
|
-
action: (_ctx, args) => {
|
|
855
|
-
const path = args.join(' ').trim();
|
|
856
|
-
return path.length > 0 ? { kind: 'export', path } : { kind: 'export-picker' };
|
|
857
|
-
},
|
|
858
|
-
},
|
|
859
|
-
{
|
|
860
|
-
name: 'status',
|
|
861
|
-
help: { usage: ['/status [details|config|tools]'] },
|
|
862
|
-
description: 'Show the model, permissions, workspace and latest cost.',
|
|
863
|
-
action: (ctx, args) => {
|
|
864
|
-
const which = args.join(' ').trim().toLowerCase();
|
|
865
|
-
if (which === 'config') {
|
|
866
|
-
return {
|
|
867
|
-
kind: 'message',
|
|
868
|
-
role: 'system',
|
|
869
|
-
content: renderConfigDebug(ctx.configDebug),
|
|
870
|
-
};
|
|
871
|
-
}
|
|
872
|
-
if (which === 'tools') {
|
|
873
|
-
const tools = ctx.availableTools();
|
|
874
|
-
return {
|
|
875
|
-
kind: 'message',
|
|
876
|
-
role: 'system',
|
|
877
|
-
content: tools.length === 0
|
|
878
|
-
? 'No tools registered yet — the agent session may still be connecting.'
|
|
879
|
-
: `Registered tools (${tools.length}):\n ${tools.join('\n ')}`,
|
|
880
|
-
};
|
|
881
|
-
}
|
|
882
|
-
if (which.length > 0 && which !== 'details') {
|
|
883
|
-
return {
|
|
884
|
-
kind: 'message',
|
|
885
|
-
role: 'system',
|
|
886
|
-
content: 'Usage: /status [details|config|tools]',
|
|
887
|
-
};
|
|
888
|
-
}
|
|
889
|
-
return {
|
|
890
|
-
kind: 'message',
|
|
891
|
-
role: 'system',
|
|
892
|
-
content: renderStatus(ctx, which === 'details'),
|
|
893
|
-
...(which === '' ? { statusRows: statusRows(ctx) } : {}),
|
|
894
|
-
};
|
|
895
|
-
},
|
|
896
|
-
},
|
|
897
|
-
{
|
|
898
|
-
name: 'permissions',
|
|
899
|
-
description: 'Choose which actions need your approval.',
|
|
900
|
-
help: {
|
|
901
|
-
usage: ['/permissions', '/permissions details', '/permissions <mode>'],
|
|
902
|
-
details: [
|
|
903
|
-
'Choose a preset in the menu, or use a typed mode:',
|
|
904
|
-
...['prompt', 'accept-edits', 'plan', 'auto', 'strict'].map((mode) => ` ${mode}: ${permissionModeLabel(mode)}`),
|
|
905
|
-
'Changes apply to this session. Explicit deny rules and sandbox restrictions still apply.',
|
|
906
|
-
],
|
|
907
|
-
},
|
|
908
|
-
action: (ctx, args) => {
|
|
909
|
-
if (args.length === 0)
|
|
910
|
-
return { kind: 'permission-mode-picker' };
|
|
911
|
-
const mode = args.length === 1 ? args[0]?.toLowerCase() : undefined;
|
|
912
|
-
if (mode === 'details') {
|
|
913
|
-
return {
|
|
914
|
-
kind: 'message',
|
|
915
|
-
role: 'system',
|
|
916
|
-
content: renderPermissions(ctx.permissions, true),
|
|
917
|
-
};
|
|
918
|
-
}
|
|
919
|
-
if (isPermissionMode(mode))
|
|
920
|
-
return { kind: 'permission-mode', mode };
|
|
921
|
-
return {
|
|
922
|
-
kind: 'message',
|
|
923
|
-
role: 'system',
|
|
924
|
-
content: 'Usage: /permissions opens the permission menu. Choose a preset there, or use /permissions details to view rules.',
|
|
925
|
-
};
|
|
926
|
-
},
|
|
927
|
-
},
|
|
928
|
-
{
|
|
929
|
-
name: 'effort',
|
|
930
|
-
help: {
|
|
931
|
-
usage: ['/effort [level|default]'],
|
|
932
|
-
details: [
|
|
933
|
-
'Run /effort to see the levels supported by the selected model and usable fallbacks. Changes affect future main-query turns in this session.',
|
|
934
|
-
],
|
|
935
|
-
},
|
|
936
|
-
description: 'Choose reasoning effort for future turns: /effort [level|default].',
|
|
937
|
-
action: (ctx, args) => {
|
|
938
|
-
if (args.length === 0) {
|
|
939
|
-
if (!ctx.providerSummary) {
|
|
940
|
-
return {
|
|
941
|
-
kind: 'message',
|
|
942
|
-
role: 'system',
|
|
943
|
-
content: 'No active session — pick a provider with /model before changing effort.',
|
|
944
|
-
};
|
|
945
|
-
}
|
|
946
|
-
if (ctx.reasoningEffort.levels === undefined) {
|
|
947
|
-
return {
|
|
948
|
-
kind: 'message',
|
|
949
|
-
role: 'system',
|
|
950
|
-
content: `Reasoning effort cannot be selected here: ${ctx.modelSummary ?? 'the current model'} or one of its usable fallback models does not publish an exact effort menu.`,
|
|
951
|
-
};
|
|
952
|
-
}
|
|
953
|
-
return { kind: 'reasoning-effort-picker' };
|
|
954
|
-
}
|
|
955
|
-
if (!ctx.providerSummary) {
|
|
956
|
-
return {
|
|
957
|
-
kind: 'message',
|
|
958
|
-
role: 'system',
|
|
959
|
-
content: 'No active session — pick a provider with /model before changing effort.',
|
|
960
|
-
};
|
|
961
|
-
}
|
|
962
|
-
const token = args.length === 1 ? args[0]?.toLowerCase() : undefined;
|
|
963
|
-
if (token === 'default')
|
|
964
|
-
return { kind: 'reasoning-effort', effort: null };
|
|
965
|
-
const offered = ctx.reasoningEffort.levels;
|
|
966
|
-
if (offered === undefined) {
|
|
967
|
-
return {
|
|
968
|
-
kind: 'message',
|
|
969
|
-
role: 'system',
|
|
970
|
-
content: `Reasoning effort was not changed: ${ctx.modelSummary ?? 'the current model'} or one of its usable fallback models does not publish an exact effort menu. Leave the provider default in force or choose a model/chain that can enumerate its levels.`,
|
|
971
|
-
};
|
|
972
|
-
}
|
|
973
|
-
const effort = offered.find((level) => level === token);
|
|
974
|
-
if (effort)
|
|
975
|
-
return { kind: 'reasoning-effort', effort };
|
|
976
|
-
const levels = offered.length > 0 ? offered.join('|') : '<none>';
|
|
977
|
-
return {
|
|
978
|
-
kind: 'message',
|
|
979
|
-
role: 'system',
|
|
980
|
-
content: `Usage: /effort [${levels}|default]`,
|
|
981
|
-
};
|
|
982
|
-
},
|
|
983
|
-
},
|
|
984
|
-
{
|
|
985
|
-
name: 'hypermode',
|
|
986
|
-
help: {
|
|
987
|
-
usage: ['/hypermode [on|off]'],
|
|
988
|
-
details: [
|
|
989
|
-
'A session setting, not a reasoning-effort level — see /effort, where it is the last stop. On, effort pins to xhigh (the highest level below it when this model or usable fallback publishes no xhigh) and delegation guidance strengthens toward delegating by default, so independent work goes to parallel agents; off, both revert. With no argument, toggles the current state. When no exact effort menu is published, effort is left as is and the session is told so.',
|
|
990
|
-
'For one message only, start or end that message with the word hypermode: effort pinned the same way for that turn, then back.',
|
|
991
|
-
],
|
|
992
|
-
},
|
|
993
|
-
description: 'Toggle hypermode for this session: /hypermode [on|off].',
|
|
994
|
-
action: (_ctx, args) => hypermodeAction(args),
|
|
995
|
-
},
|
|
996
|
-
{
|
|
997
|
-
name: 'orchestrate',
|
|
998
|
-
help: {
|
|
999
|
-
usage: ['/orchestrate [on|off]'],
|
|
1000
|
-
details: [
|
|
1001
|
-
'Deprecated: the mode is now called hypermode. Does what /hypermode does, after saying so.',
|
|
1002
|
-
],
|
|
1003
|
-
},
|
|
1004
|
-
description: 'Deprecated: use /hypermode.',
|
|
1005
|
-
action: (_ctx, args) => hypermodeAction(args, 'orchestrate'),
|
|
1006
|
-
},
|
|
1007
|
-
{
|
|
1008
|
-
name: 'init',
|
|
1009
|
-
description: 'Write an AGENTS.md describing this project to future agents.',
|
|
1010
|
-
help: {
|
|
1011
|
-
usage: ['/init'],
|
|
1012
|
-
details: [
|
|
1013
|
-
'Asks the selected model to read the project and write instructions. Existing instructions are read before changes are proposed.',
|
|
1014
|
-
],
|
|
1015
|
-
},
|
|
1016
|
-
action: (ctx) => {
|
|
1017
|
-
if (!ctx.providerSummary) {
|
|
1018
|
-
return {
|
|
1019
|
-
kind: 'message',
|
|
1020
|
-
role: 'system',
|
|
1021
|
-
content: '/init asks the agent to read this repository and write the file, so it needs a provider. Run /model to pick one.',
|
|
1022
|
-
};
|
|
1023
|
-
}
|
|
1024
|
-
return { kind: 'prompt', text: initPrompt(ctx.instructionFiles) };
|
|
1025
|
-
},
|
|
1026
|
-
},
|
|
1027
|
-
];
|
|
1028
|
-
/**
|
|
1029
|
-
* The instruction `/init` sends as a turn.
|
|
1030
|
-
*
|
|
1031
|
-
* Written as a prompt rather than a template the CLI fills in, because the
|
|
1032
|
-
* useful half of this file is what a reader could not guess from the tree —
|
|
1033
|
-
* the commands that actually work here, the layout that is deliberate — and
|
|
1034
|
-
* only something that has read the repository can say that. A CLI-side
|
|
1035
|
-
* generator would produce a directory listing with headings on it.
|
|
1036
|
-
*
|
|
1037
|
-
* The instruction it opens with is the one that matters: an `AGENTS.md` full of
|
|
1038
|
-
* invented conventions is worse than none, because the next agent obeys it. So
|
|
1039
|
-
* the prompt asks for verification against the tree and for omission over
|
|
1040
|
-
* invention, in those words.
|
|
1041
|
-
*/
|
|
1042
|
-
export function initPrompt(instructionFiles) {
|
|
1043
|
-
const existing = instructionFiles.length > 0
|
|
1044
|
-
? [
|
|
1045
|
-
'',
|
|
1046
|
-
'This project ALREADY has project instructions, loaded from:',
|
|
1047
|
-
...instructionFiles.map((f) => ` ${f}`),
|
|
1048
|
-
'',
|
|
1049
|
-
'Do not overwrite them. Read them first, then propose specific edits —',
|
|
1050
|
-
'what is now wrong, what is missing — and make only the changes I agree to.',
|
|
1051
|
-
].join('\n')
|
|
1052
|
-
: ['', 'This project has no AGENTS.md yet. Create one at the repository root.'].join('\n');
|
|
1053
|
-
return [
|
|
1054
|
-
'Write the project instructions that a coding agent joining this repository would need.',
|
|
1055
|
-
'',
|
|
1056
|
-
'Verify every claim against the tree before you write it. Do not describe a',
|
|
1057
|
-
'command you have not found, a layout you have not opened, or a convention you',
|
|
1058
|
-
'have inferred from one file. If you cannot establish something, leave it out —',
|
|
1059
|
-
'an AGENTS.md full of plausible inventions is worse than a short true one,',
|
|
1060
|
-
'because the next agent will follow it.',
|
|
1061
|
-
existing,
|
|
1062
|
-
'',
|
|
1063
|
-
'Cover what a newcomer cannot get from the file listing:',
|
|
1064
|
-
' - what this project is, in a sentence or two',
|
|
1065
|
-
' - the build, test and lint commands that actually work here (check the',
|
|
1066
|
-
' package manifest or task runner rather than assuming the usual ones)',
|
|
1067
|
-
' - the layout, and any part of it that is deliberate rather than incidental',
|
|
1068
|
-
' - conventions the code visibly holds to, with the evidence that shows it',
|
|
1069
|
-
' - anything that would let someone break the project without noticing',
|
|
1070
|
-
'',
|
|
1071
|
-
'Keep it short enough to be read in full. Every line costs context on every',
|
|
1072
|
-
'future turn, so a sentence that says nothing is not free.',
|
|
1073
|
-
].join('\n');
|
|
1074
|
-
}
|
|
1075
|
-
/** The session's shell hooks, by event, in the order the config file gave them. */
|
|
1076
|
-
/** `/hypermode [on|off]`, and its deprecated `/orchestrate` alias. */
|
|
1077
|
-
function hypermodeAction(args, via) {
|
|
1078
|
-
const choice = args.join(' ').trim().toLowerCase();
|
|
1079
|
-
const alias = via ? { via } : {};
|
|
1080
|
-
if (choice.length === 0)
|
|
1081
|
-
return { kind: 'hypermode', enabled: 'toggle', ...alias };
|
|
1082
|
-
if (choice === 'on')
|
|
1083
|
-
return { kind: 'hypermode', enabled: true, ...alias };
|
|
1084
|
-
if (choice === 'off')
|
|
1085
|
-
return { kind: 'hypermode', enabled: false, ...alias };
|
|
1086
|
-
return {
|
|
1087
|
-
kind: 'message',
|
|
1088
|
-
role: 'system',
|
|
1089
|
-
content: `Usage: /${via ?? 'hypermode'} [on|off]`,
|
|
1090
|
-
};
|
|
1091
|
-
}
|
|
1092
|
-
export function renderHooks(hooks) {
|
|
1093
|
-
const events = Object.entries(hooks ?? {}).filter(([, entries]) => (entries?.length ?? 0) > 0);
|
|
1094
|
-
if (events.length === 0) {
|
|
1095
|
-
return 'No hooks. Add a `hooks` key to namzu.config.json or ~/.namzu/config.yaml: event → list of { command, matcher?, timeoutMs? }.';
|
|
1096
|
-
}
|
|
1097
|
-
const lines = [];
|
|
1098
|
-
for (const [event, entries] of events) {
|
|
1099
|
-
lines.push(`${event}`);
|
|
1100
|
-
for (const entry of entries ?? []) {
|
|
1101
|
-
const when = entry.matcher ? ` · matches ${entry.matcher}` : '';
|
|
1102
|
-
const deadline = entry.timeoutMs !== undefined ? ` · ${Math.round(entry.timeoutMs / 1000)}s` : '';
|
|
1103
|
-
lines.push(` ${entry.command}${when}${deadline}`);
|
|
1104
|
-
}
|
|
1105
|
-
}
|
|
1106
|
-
return lines.join('\n');
|
|
1107
|
-
}
|
|
1108
|
-
/** The session's background jobs, as an operator would ask about them. */
|
|
1109
|
-
export function renderJobs(jobs) {
|
|
1110
|
-
if (jobs.length === 0) {
|
|
1111
|
-
return 'No background jobs this session. The agent starts one with `run_in_background` on bash; under a sandbox none can be started.';
|
|
1112
|
-
}
|
|
1113
|
-
const lines = jobs.map((job) => {
|
|
1114
|
-
const state = job.status === 'running'
|
|
1115
|
-
? `running for ${Math.max(1, Math.round((Date.now() - job.startedAt) / 1000))}s`
|
|
1116
|
-
: job.status === 'killed'
|
|
1117
|
-
? 'stopped'
|
|
1118
|
-
: `exited ${job.exitCode ?? '?'}`;
|
|
1119
|
-
return `${job.id} ${state.padEnd(16)} ${job.command}`;
|
|
1120
|
-
});
|
|
1121
|
-
return [
|
|
1122
|
-
`${jobs.length} background job${jobs.length === 1 ? '' : 's'} this session:`,
|
|
1123
|
-
...lines,
|
|
1124
|
-
'',
|
|
1125
|
-
'The agent reads one with the job tool; ask it to stop one, or /exit stops them all.',
|
|
1126
|
-
].join('\n');
|
|
1127
|
-
}
|
|
1128
|
-
/** Reports validate their subcommand instead of silently ignoring mistyped arguments. */
|
|
1129
|
-
function reportCommand(name, args, render, detailName = 'details') {
|
|
1130
|
-
const option = args.join(' ').trim().toLowerCase();
|
|
1131
|
-
const details = option === detailName || option === 'details';
|
|
1132
|
-
return {
|
|
1133
|
-
kind: 'message',
|
|
1134
|
-
role: 'system',
|
|
1135
|
-
content: option.length === 0 || details ? render(details) : `Usage: /${name} [${detailName}]`,
|
|
1136
|
-
};
|
|
1137
|
-
}
|
|
1138
|
-
function contextMeasurement(usage) {
|
|
1139
|
-
const context = usage?.context;
|
|
1140
|
-
if (!context || context.windowTokens <= 0)
|
|
1141
|
-
return ['No context measurement yet.'];
|
|
1142
|
-
const percent = Math.min(999, Math.round((context.tokens / context.windowTokens) * 100));
|
|
1143
|
-
const approx = context.measured && !context.windowAssumed ? '' : '~';
|
|
1144
|
-
return [
|
|
1145
|
-
`Context: ${context.tokens.toLocaleString('en-US')} / ${context.windowTokens.toLocaleString('en-US')} tokens (${approx}${percent}%)`,
|
|
1146
|
-
`${context.measured ? 'Counted by the provider' : 'Estimated by Namzu'}; window ${context.windowAssumed ? 'assumed from a table or default' : 'declared by the provider or config'}.`,
|
|
1147
|
-
];
|
|
1148
|
-
}
|
|
1149
|
-
export function renderContext(usage, compaction, details = false) {
|
|
1150
|
-
const lines = contextMeasurement(usage);
|
|
1151
|
-
if (usage?.context)
|
|
1152
|
-
lines.push('Latest reported context size; not cumulative token usage.');
|
|
1153
|
-
if (!compaction) {
|
|
1154
|
-
lines.push('Automatic cleanup: unavailable before a session starts.');
|
|
1155
|
-
}
|
|
1156
|
-
else {
|
|
1157
|
-
lines.push(`Cleanup this session: ${compaction.passes} passes, ~${compaction.reclaimedTokens.toLocaleString('en-US')} tokens freed.`);
|
|
1158
|
-
if (details) {
|
|
1159
|
-
const pct = (fraction) => `${Math.round(fraction * 100)}%`;
|
|
1160
|
-
lines.push(`Strategy: ${compaction.strategy}`);
|
|
1161
|
-
if (compaction.strategy === 'salience') {
|
|
1162
|
-
lines.push(`Older, less useful content is shortened from ${pct(compaction.softTarget)} of the window; older history is summarised at ${pct(compaction.triggerThreshold)}.`);
|
|
1163
|
-
}
|
|
1164
|
-
else {
|
|
1165
|
-
lines.push(`Older tool results are cleared at ${pct(compaction.triggerThreshold)} of the window; history is summarised if needed.`);
|
|
1166
|
-
}
|
|
1167
|
-
lines.push(`Tool results cleared: ${compaction.clearedResults.toLocaleString('en-US')}`, `Messages shortened: ${compaction.stubbedNarrations.toLocaleString('en-US')}`, `Summaries written: ${compaction.summaries.toLocaleString('en-US')}`);
|
|
1168
|
-
}
|
|
1169
|
-
}
|
|
1170
|
-
if (!details)
|
|
1171
|
-
lines.push('/context details for cleanup history.');
|
|
1172
|
-
return lines.join('\n');
|
|
1173
|
-
}
|
|
1174
|
-
/** Keep unknown prices distinct from measured zero, in status and cost alike. */
|
|
1175
|
-
function costAmount(cost) {
|
|
1176
|
-
if (cost.unpricedTokens > 0) {
|
|
1177
|
-
return cost.totalCost > 0 ? `at least $${cost.totalCost.toFixed(4)}` : 'not known';
|
|
1178
|
-
}
|
|
1179
|
-
return `$${cost.totalCost.toFixed(4)}${cost.totalCost === 0 ? ' (measured zero)' : ''}`;
|
|
1180
|
-
}
|
|
1181
|
-
export function renderCost(usage, compaction = null, details = false) {
|
|
1182
|
-
if (usage === null)
|
|
1183
|
-
return 'No usage reported yet. Send a message to begin.';
|
|
1184
|
-
const lines = [
|
|
1185
|
-
'Current or latest turn',
|
|
1186
|
-
`Tokens: ${usage.totalTokens.toLocaleString('en-US')} (own model calls)`,
|
|
1187
|
-
`Cost: ${costAmount(usage.cost)}`,
|
|
1188
|
-
];
|
|
1189
|
-
if (usage.cost.unpricedTokens > 0) {
|
|
1190
|
-
lines.push(`${usage.cost.unpricedTokens.toLocaleString('en-US')} tokens have no known price and are excluded from the cost.`);
|
|
1191
|
-
}
|
|
1192
|
-
if (usage.budget) {
|
|
1193
|
-
lines.push(`Including delegated agents: ${usage.budget.treeTokens.toLocaleString('en-US')} tokens; limit ${usage.budget.limit === 0 ? 'unlimited' : usage.budget.limit.toLocaleString('en-US')}.`);
|
|
1194
|
-
if ((usage.budget.unresolvedRequests ?? 0) > 0)
|
|
1195
|
-
lines.push(`${usage.budget.unresolvedRequests} provider receipt(s) unresolved; token totals are measured usage, not a complete spend total.`);
|
|
1196
|
-
if (usage.budget.poisoned)
|
|
1197
|
-
lines.push('Further spending is blocked until unresolved request usage is reconciled.');
|
|
1198
|
-
}
|
|
1199
|
-
if (details) {
|
|
1200
|
-
lines.push('Cost covers this turn’s own model calls, excluding delegated calls and earlier turns. These are not conversation totals.');
|
|
1201
|
-
if (usage.cost.unpricedTokens > 0) {
|
|
1202
|
-
lines.push('Missing prices do not mean those tokens were free.');
|
|
1203
|
-
}
|
|
1204
|
-
else {
|
|
1205
|
-
lines.push('All reported tokens have a known rate.');
|
|
1206
|
-
}
|
|
1207
|
-
if (usage.cost.cacheDiscount > 0)
|
|
1208
|
-
lines.push(`Cache discount: $${usage.cost.cacheDiscount.toFixed(4)}`);
|
|
1209
|
-
if (usage.context && usage.context.windowTokens > 0) {
|
|
1210
|
-
lines.push('', ...contextMeasurement(usage), '/context details for automatic cleanup.');
|
|
1211
|
-
}
|
|
1212
|
-
if (compaction)
|
|
1213
|
-
lines.push(`Cleanup passes this session: ${compaction.passes}.`);
|
|
1214
|
-
}
|
|
1215
|
-
else {
|
|
1216
|
-
lines.push('/cost details for scope and pricing; /context for context size.');
|
|
1217
|
-
}
|
|
1218
|
-
return lines.join('\n');
|
|
1219
|
-
}
|
|
1220
|
-
/** What decides a tool call, in the order it actually decides it. */
|
|
1221
|
-
/**
|
|
1222
|
-
* One page holding both halves of what a turn may do.
|
|
1223
|
-
*
|
|
1224
|
-
* They are separate mechanisms and they answer separate questions — where a
|
|
1225
|
-
* write may land, and whether anyone is asked first — and neither implies the
|
|
1226
|
-
* other. An operator who turns approvals off has not widened the sandbox, and
|
|
1227
|
-
* one who confines the filesystem has not stopped the prompts. Read apart, each
|
|
1228
|
-
* looks like the whole answer; the failure is believing you configured
|
|
1229
|
-
* something you did not.
|
|
1230
|
-
*
|
|
1231
|
-
* So they are printed adjacently and each is labelled with the question it
|
|
1232
|
-
* answers, rather than with its mechanism's name.
|
|
1233
|
-
*/
|
|
1234
|
-
/**
|
|
1235
|
-
* Which tool servers answered, and what they brought.
|
|
1236
|
-
*
|
|
1237
|
-
* A failure is listed as prominently as a success and never omitted. The
|
|
1238
|
-
* transcript said so once at connect time and scrolled it away, and a server
|
|
1239
|
-
* that failed silently is indistinguishable from one nobody configured — which
|
|
1240
|
-
* is the state an operator is in when a tool they expect is simply not there.
|
|
1241
|
-
*/
|
|
1242
|
-
/**
|
|
1243
|
-
* The turn `/review` sends.
|
|
1244
|
-
*
|
|
1245
|
-
* Two failures shape it, and they pull in opposite directions.
|
|
1246
|
-
*
|
|
1247
|
-
* A review that INVENTS problems is worse than no review, because someone acts
|
|
1248
|
-
* on it — the same reasoning `initPrompt` uses about invented conventions. So
|
|
1249
|
-
* the instruction asks for findings tied to a specific line and for silence
|
|
1250
|
-
* over speculation.
|
|
1251
|
-
*
|
|
1252
|
-
* A review that only reassures is worse than useless, because it buys
|
|
1253
|
-
* confidence nobody earned. So it also refuses the summary-of-the-diff answer:
|
|
1254
|
-
* restating what changed is not review, and it is the shape a model falls into
|
|
1255
|
-
* when it has nothing to say.
|
|
1256
|
-
*
|
|
1257
|
-
* The FILE LIST goes in, not the patch. The agent has tools and a shell; handing
|
|
1258
|
-
* it a truncated 24 kB patch would spend the context that reading the
|
|
1259
|
-
* interesting parts properly requires, and a review of a truncated diff is a
|
|
1260
|
-
* review of whatever fitted.
|
|
1261
|
-
*/
|
|
1262
|
-
export function reviewPrompt(stat, untracked) {
|
|
1263
|
-
const lines = [
|
|
1264
|
-
'Review the uncommitted work in this repository.',
|
|
1265
|
-
'',
|
|
1266
|
-
'`git diff HEAD` reports:',
|
|
1267
|
-
'',
|
|
1268
|
-
stat.length > 0 ? stat : '(no tracked file changed)',
|
|
1269
|
-
];
|
|
1270
|
-
if (untracked.length > 0) {
|
|
1271
|
-
lines.push('', 'Untracked, which no diff shows:', ...untracked.map((p) => ` ${p}`));
|
|
1272
|
-
}
|
|
1273
|
-
lines.push('', 'Read what you need — the diff, the files around it, the tests. Then report:', '', '- Correctness problems, each tied to a file and line, with the input or', ' state that produces the wrong behaviour. If you cannot name one, do not', ' raise the finding.', '- Anything the change claims in a comment or a message that the code does', ' not do.', '- Tests that would pass whether or not the change is correct.', '', 'Do not summarise the diff back to me — I can read it, and a summary is what', 'a review turns into when it has nothing to say. If the work looks right,', 'say so in one line and stop. Say plainly what you did not examine.');
|
|
1274
|
-
return lines.join('\n');
|
|
1275
|
-
}
|
|
1276
|
-
/** Review a branch comparison already resolved by the host to an immutable commit. */
|
|
1277
|
-
export function baseBranchReviewPrompt(mergeBaseSha) {
|
|
1278
|
-
return reviewTargetPrompt([
|
|
1279
|
-
'Review the changes between the current working tree and its selected base branch.',
|
|
1280
|
-
`The host resolved the merge base to ${mergeBaseSha}.`,
|
|
1281
|
-
`Use \`git diff ${mergeBaseSha}\` as the comparison boundary.`,
|
|
1282
|
-
]);
|
|
1283
|
-
}
|
|
1284
|
-
/** Review one immutable commit without asking the model to resolve a mutable ref. */
|
|
1285
|
-
export function commitReviewPrompt(sha) {
|
|
1286
|
-
return reviewTargetPrompt([
|
|
1287
|
-
`Review the code changes introduced by commit ${sha}.`,
|
|
1288
|
-
`Use \`git show --stat --oneline ${sha}\` and \`git diff ${sha}^ ${sha}\` as the boundary.`,
|
|
1289
|
-
]);
|
|
1290
|
-
}
|
|
1291
|
-
function reviewTargetPrompt(target) {
|
|
1292
|
-
return [
|
|
1293
|
-
...target,
|
|
1294
|
-
'',
|
|
1295
|
-
'Read the changed files and surrounding code, then report prioritized, actionable findings.',
|
|
1296
|
-
'Every finding must name the file, line and concrete state that produces the wrong behavior.',
|
|
1297
|
-
'Do not summarize the change back to me. If there are no findings, say so in one line.',
|
|
1298
|
-
'Say plainly what you did not examine.',
|
|
1299
|
-
].join('\n');
|
|
1300
|
-
}
|
|
1301
|
-
export function renderMcp(mcp, details = false) {
|
|
1302
|
-
if (mcp === null)
|
|
1303
|
-
return 'No session yet. Tool servers have not been checked.';
|
|
1304
|
-
if (mcp.connected.length === 0 && mcp.failed.length === 0) {
|
|
1305
|
-
return 'No tool servers configured. Add mcpServers to namzu.config.json.';
|
|
1306
|
-
}
|
|
1307
|
-
const lines = [
|
|
1308
|
-
`Tool servers: ${mcp.connected.length} connected, ${mcp.failed.length} unavailable.`,
|
|
1309
|
-
];
|
|
1310
|
-
for (const server of mcp.connected) {
|
|
1311
|
-
lines.push(`${server.name}: connected, ${server.tools.length} tools`);
|
|
1312
|
-
const drift = server.drift;
|
|
1313
|
-
if (drift) {
|
|
1314
|
-
for (const name of drift.added)
|
|
1315
|
-
lines.push(` added: ${terminalDisplayText(name)}`);
|
|
1316
|
-
for (const name of drift.removed)
|
|
1317
|
-
lines.push(` removed: ${terminalDisplayText(name)}`);
|
|
1318
|
-
for (const name of drift.changed)
|
|
1319
|
-
lines.push(` changed, earlier definition held: ${terminalDisplayText(name)}`);
|
|
1320
|
-
}
|
|
1321
|
-
for (const item of server.refused ?? []) {
|
|
1322
|
-
lines.push(` refused ${item.kind}: ${terminalDisplayText(item.name)} (${item.reason})`);
|
|
1323
|
-
}
|
|
1324
|
-
if (details) {
|
|
1325
|
-
if (server.instructions) {
|
|
1326
|
-
const safe = terminalDisplayText(server.instructions).replace(/\s+/g, ' ').trim();
|
|
1327
|
-
lines.push(` instructions: ${safe.length > 300 ? `${safe.slice(0, 300)}…` : safe}`);
|
|
1328
|
-
}
|
|
1329
|
-
for (const tool of server.tools)
|
|
1330
|
-
lines.push(` ${tool}`);
|
|
1331
|
-
}
|
|
1332
|
-
}
|
|
1333
|
-
for (const server of mcp.failed)
|
|
1334
|
-
lines.push(`${server.name}: unavailable — ${server.reason}`);
|
|
1335
|
-
if (!details && mcp.connected.length > 0)
|
|
1336
|
-
lines.push('/mcp tools to list available tools.');
|
|
1337
|
-
return lines.join('\n');
|
|
1338
|
-
}
|
|
1339
|
-
export function statusRows(ctx) {
|
|
1340
|
-
const current = ctx.permissions.currentMode();
|
|
1341
|
-
const permissions = effectivePermissionMode(current.mode, ctx.permissions.approvalLatched());
|
|
1342
|
-
const rows = [
|
|
1343
|
-
...installationRows().map(([key, value]) => [key, value]),
|
|
1344
|
-
['Model', ctx.modelSummary ?? 'Not selected'],
|
|
1345
|
-
['Reasoning', ctx.reasoningEffort.current() ?? 'Model default'],
|
|
1346
|
-
['Provider', ctx.providerSummary ?? 'none — run /model to choose one'],
|
|
1347
|
-
['Directory', ctx.cwd],
|
|
1348
|
-
['Permissions', permissionModeLabel(permissions)],
|
|
1349
|
-
[
|
|
1350
|
-
'Sandbox',
|
|
1351
|
-
!ctx.sandbox
|
|
1352
|
-
? 'not resolved yet'
|
|
1353
|
-
: ctx.sandbox.unconfined
|
|
1354
|
-
? 'not confined; host access'
|
|
1355
|
-
: `${ctx.sandbox.environment ?? 'Active'} · ${ctx.sandbox.enforced.join(', ')}`,
|
|
1356
|
-
],
|
|
1357
|
-
['Web search', ctx.webSearchSummary ?? 'not resolved yet'],
|
|
1358
|
-
['Tools', String(ctx.availableTools().length)],
|
|
1359
|
-
['Instructions', ctx.instructionFiles.join(', ') || 'None'],
|
|
1360
|
-
];
|
|
1361
|
-
if (ctx.sandbox?.workspace)
|
|
1362
|
-
rows.push([
|
|
1363
|
-
'Workspace',
|
|
1364
|
-
ctx.sandbox.workspace === 'ephemeral'
|
|
1365
|
-
? 'temporary files; removed when the turn ends'
|
|
1366
|
-
: 'real project files; edits persist',
|
|
1367
|
-
]);
|
|
1368
|
-
if (ctx.sessionId)
|
|
1369
|
-
rows.push(['Session', ctx.sessionId]);
|
|
1370
|
-
if (ctx.usage) {
|
|
1371
|
-
rows.push(['Tokens', `${ctx.usage.totalTokens.toLocaleString('en-US')} · current/latest turn`]);
|
|
1372
|
-
rows.push(['Spend (current or latest turn, own calls)', costAmount(ctx.usage.cost)]);
|
|
1373
|
-
if (ctx.usage.context) {
|
|
1374
|
-
const context = ctx.usage.context;
|
|
1375
|
-
rows.push([
|
|
1376
|
-
'Context',
|
|
1377
|
-
`${context.tokens.toLocaleString('en-US')} / ${context.windowTokens.toLocaleString('en-US')}${context.measured && !context.windowAssumed ? '' : ' · estimated'}`,
|
|
1378
|
-
]);
|
|
1379
|
-
}
|
|
1380
|
-
}
|
|
1381
|
-
return rows;
|
|
1382
|
-
}
|
|
1383
|
-
export function renderStatus(ctx, details = false) {
|
|
1384
|
-
if (!details)
|
|
1385
|
-
return `${statusCard(statusRows(ctx), ctx.columns)}\n/config to change settings · /status details for full rules`;
|
|
1386
|
-
const lines = [
|
|
1387
|
-
`Provider: ${ctx.providerSummary ?? 'none — run /model to choose one'}`,
|
|
1388
|
-
`Model: ${ctx.modelSummary ?? 'not selected'}`,
|
|
1389
|
-
`Working directory: ${ctx.cwd}`,
|
|
1390
|
-
...renderPermissions(ctx.permissions, details).split('\n'),
|
|
1391
|
-
];
|
|
1392
|
-
const sandbox = ctx.sandbox;
|
|
1393
|
-
if (!sandbox) {
|
|
1394
|
-
lines.push('Sandbox: not resolved yet.');
|
|
1395
|
-
}
|
|
1396
|
-
else if (sandbox.unconfined) {
|
|
1397
|
-
lines.push('Sandbox: commands are not confined; they have this shell’s access.');
|
|
1398
|
-
}
|
|
1399
|
-
else {
|
|
1400
|
-
lines.push(`Sandbox: ${sandbox.environment ?? 'active'}; enforces ${sandbox.enforced.join(', ') || 'no reported restrictions'}.`);
|
|
1401
|
-
}
|
|
1402
|
-
if (sandbox?.workspace === 'ephemeral') {
|
|
1403
|
-
lines.push('Workspace: temporary files; removed when the turn ends.');
|
|
1404
|
-
}
|
|
1405
|
-
else if (sandbox?.workspace === 'working-directory' || sandbox?.workspace === 'host') {
|
|
1406
|
-
lines.push('Workspace: real project files; edits persist.');
|
|
1407
|
-
}
|
|
1408
|
-
if (details) {
|
|
1409
|
-
for (const dir of ctx.directories?.() ?? [])
|
|
1410
|
-
lines.push(`Additional directory: ${dir}`);
|
|
1411
|
-
if (sandbox) {
|
|
1412
|
-
lines.push(`Required isolation: ${sandbox.required.length > 0 ? sandbox.required.join(', ') : 'none'}.`);
|
|
1413
|
-
if (sandbox.required.length > 0)
|
|
1414
|
-
lines.push('A host missing required isolation cannot start the session.');
|
|
1415
|
-
}
|
|
1416
|
-
lines.push('/status config for setting sources; /status tools for available tools.');
|
|
1417
|
-
}
|
|
1418
|
-
if (ctx.usage)
|
|
1419
|
-
lines.push(`Spend (current or latest turn, own calls): ${costAmount(ctx.usage.cost)}`);
|
|
1420
|
-
if (!details)
|
|
1421
|
-
lines.push('/status details for rules and workspace details.');
|
|
1422
|
-
return lines.join('\n');
|
|
1423
|
-
}
|
|
1424
|
-
export function renderPermissions(permissions, details = false) {
|
|
1425
|
-
const current = permissions.currentMode();
|
|
1426
|
-
const effective = effectivePermissionMode(current.mode, permissions.approvalLatched());
|
|
1427
|
-
const approvedAll = effective !== current.mode;
|
|
1428
|
-
const lines = [
|
|
1429
|
-
`Permissions: ${permissionModeLabel(effective)}. ${approvedAll ? 'Tools are approved automatically for this session.' : permissionModeDescription(effective)}`,
|
|
1430
|
-
];
|
|
1431
|
-
if (approvedAll)
|
|
1432
|
-
lines.push('Choose a preset in /permissions to change this.');
|
|
1433
|
-
if (!details)
|
|
1434
|
-
return lines.join('\n');
|
|
1435
|
-
if (current.source === 'launch-bypass')
|
|
1436
|
-
lines.push('Selected at launch with --dangerously-skip-permissions.');
|
|
1437
|
-
lines.push('Explicit deny rules and the built-in safety gate apply in every mode.');
|
|
1438
|
-
if (current.mode === 'plan')
|
|
1439
|
-
lines.push('Plan mode also blocks writes that an allow rule would otherwise permit.');
|
|
1440
|
-
const exempt = permissions.neverPrompted();
|
|
1441
|
-
if (exempt.length > 0) {
|
|
1442
|
-
lines.push(`Tools exempt from ordinary prompts: ${exempt.join(', ')}.`);
|
|
1443
|
-
lines.push('Destructive calls still require review; the selected mode decides whether to allow, ask or refuse. Plan mode still requires read-only tools.');
|
|
1444
|
-
}
|
|
1445
|
-
if (effective === 'prompt' || effective === 'accept-edits' || effective === 'plan') {
|
|
1446
|
-
lines.push('Read-only agents (explore, or an agent file with readOnly: true) on the session model start without asking; each call they make is still reviewed. A permissions rule Agent: "ask" asks about every launch.');
|
|
1447
|
-
}
|
|
1448
|
-
if (permissions.rules.length > 0) {
|
|
1449
|
-
lines.push(`Rules (${permissions.rules.length}):`, ...permissions.rules.map((rule) => ` ${describeRule(rule)}`));
|
|
1450
|
-
}
|
|
1451
|
-
else {
|
|
1452
|
-
lines.push('No custom rules. Configure permissions in namzu.config.json.');
|
|
1453
|
-
}
|
|
1454
|
-
return lines.join('\n');
|
|
1455
|
-
}
|
|
1456
|
-
/** Render the exact session control without inventing a global effort menu. */
|
|
1457
|
-
export function renderReasoningEffort(ctx) {
|
|
1458
|
-
if (!ctx.providerSummary) {
|
|
1459
|
-
return 'No active session — pick a provider with /model before selecting reasoning effort.';
|
|
1460
|
-
}
|
|
1461
|
-
const current = ctx.reasoningEffort.current();
|
|
1462
|
-
const lines = [
|
|
1463
|
-
`Current reasoning effort: ${current ?? 'provider default'}.`,
|
|
1464
|
-
`Model: ${ctx.modelSummary ?? 'provider default'}.`,
|
|
1465
|
-
];
|
|
1466
|
-
const offered = ctx.reasoningEffort.levels;
|
|
1467
|
-
if (offered === undefined) {
|
|
1468
|
-
lines.push('Selectable levels: unavailable — this model or one usable fallback cannot enumerate an exact menu.');
|
|
1469
|
-
}
|
|
1470
|
-
else if (offered.length === 0) {
|
|
1471
|
-
lines.push('Selectable levels: none — the usable provider chain has no common effort level.');
|
|
1472
|
-
}
|
|
1473
|
-
else {
|
|
1474
|
-
lines.push(`Selectable for every usable provider-chain member: ${offered.join(', ')}.`);
|
|
1475
|
-
lines.push(`Use /effort <${offered.join('|')}> or /effort default.`);
|
|
1476
|
-
}
|
|
1477
|
-
lines.push('Applies to future main-query turns in this TUI session; /model resets it. Subagents and manual compaction keep their own provider defaults.');
|
|
1478
|
-
return lines.join('\n');
|
|
1479
|
-
}
|
|
1480
|
-
/**
|
|
1481
|
-
* One rule, as a line an operator can check against what they wrote.
|
|
1482
|
-
*
|
|
1483
|
-
* Every arm is spelled out and the default is a `never`, so a ninth rule type
|
|
1484
|
-
* fails the build here instead of printing its own name. The previous version
|
|
1485
|
-
* handled two of the eight and returned `rule.type` for the rest — and the
|
|
1486
|
-
* most common config in existence compiles to `custom_pattern`, so a
|
|
1487
|
-
* per-argument rule someone wrote as `"git push*" = "deny"` was reported to
|
|
1488
|
-
* them as the single word `custom_pattern`.
|
|
1489
|
-
*
|
|
1490
|
-
* The kernel exports a `describeRule` of its own, deliberately not reused: it
|
|
1491
|
-
* is phrased to tell a MODEL why one call was refused ("denied by name … so a
|
|
1492
|
-
* different input will not change it"). This one is a table of standing policy
|
|
1493
|
-
* for a person. Same facts, different question.
|
|
1494
|
-
*/
|
|
1495
|
-
function describeRule(rule) {
|
|
1496
|
-
switch (rule.type) {
|
|
1497
|
-
case 'deny_by_name':
|
|
1498
|
-
return `deny ${rule.toolNames.join(', ')}`;
|
|
1499
|
-
case 'allow_by_name':
|
|
1500
|
-
return `allow ${rule.toolNames.join(', ')}`;
|
|
1501
|
-
case 'by_source': {
|
|
1502
|
-
const verb = rule.decision === 'review' ? 'review' : rule.decision;
|
|
1503
|
-
return `${verb} tools from source ${rule.sources.join(', ')}`;
|
|
1504
|
-
}
|
|
1505
|
-
case 'allow_by_category':
|
|
1506
|
-
return `allow any tool in category: ${rule.categories.join(', ')}`;
|
|
1507
|
-
case 'allow_by_tier':
|
|
1508
|
-
return `allow any tool in tier: ${rule.tiers.join(', ')}`;
|
|
1509
|
-
case 'allow_read_only':
|
|
1510
|
-
return 'allow any tool that only observes';
|
|
1511
|
-
case 'deny_dangerous_patterns':
|
|
1512
|
-
return 'deny the built-in catastrophic-command patterns';
|
|
1513
|
-
case 'argument_pattern': {
|
|
1514
|
-
const verb = rule.decision === 'deny' ? 'deny ' : 'allow ';
|
|
1515
|
-
return `${verb} ${rule.toolNames.join(', ')} when ${rule.argument} matches ${rule.pattern}`;
|
|
1516
|
-
}
|
|
1517
|
-
case 'custom_pattern': {
|
|
1518
|
-
// The pattern is shown as the regex it compiled to, which is not
|
|
1519
|
-
// what the operator typed — a `permissions` table turns
|
|
1520
|
-
// `"git push*"` into `^bash .*git push.*$`. Shown anyway: the
|
|
1521
|
-
// compiled form is what actually decides, and inventing a
|
|
1522
|
-
// prettier one would be reporting a rule that is not in force.
|
|
1523
|
-
const verb = rule.decision === 'deny' ? 'deny ' : 'allow ';
|
|
1524
|
-
const where = rule.target === 'both' ? 'name+args' : rule.target;
|
|
1525
|
-
return `${verb} ${where} matching ${rule.pattern}`;
|
|
1526
|
-
}
|
|
1527
|
-
case 'predicate':
|
|
1528
|
-
return `decide ${rule.description}`;
|
|
1529
|
-
default: {
|
|
1530
|
-
const exhaustive = rule;
|
|
1531
|
-
return `unrecognised rule: ${JSON.stringify(exhaustive)}`;
|
|
1532
|
-
}
|
|
1533
|
-
}
|
|
1534
|
-
}
|
|
1535
|
-
/** The delegate roster, and an honest answer when there is none. */
|
|
1536
|
-
/**
|
|
1537
|
-
* The roster, drawn.
|
|
1538
|
-
*
|
|
1539
|
-
* Kept as a formatter and moved off `SlashContext.agentIds`: the roster is
|
|
1540
|
-
* the KERNEL's fact — the delegation tools already hold it — and having the
|
|
1541
|
-
* CLI carry a second copy meant two answers to one question that could
|
|
1542
|
-
* disagree. The command is answered by the registry now; this draws what it
|
|
1543
|
-
* reports.
|
|
1544
|
-
*/
|
|
1545
|
-
export function renderAgents(ids) {
|
|
1546
|
-
if (ids.length === 0) {
|
|
1547
|
-
return 'No delegates. This session has no delegation tool mounted, so it does the work itself.';
|
|
1548
|
-
}
|
|
1549
|
-
return [
|
|
1550
|
-
`Delegates (${ids.length}):`,
|
|
1551
|
-
...ids.map((id) => ` ${id}`),
|
|
1552
|
-
'',
|
|
1553
|
-
'The agent dispatches to these itself when a task suits one. It may also',
|
|
1554
|
-
'define a specialist for a single task, which is not listed here because',
|
|
1555
|
-
'it does not exist until the agent asks for it.',
|
|
1556
|
-
].join('\n');
|
|
1557
|
-
}
|
|
1558
|
-
export function runSlash(line, ctx, builtins = CLI_LOCAL_COMMANDS) {
|
|
1559
|
-
const parsed = parseSlash(line);
|
|
1560
|
-
if (!parsed)
|
|
1561
|
-
return null;
|
|
1562
|
-
// Builtins first, always. A file appearing on disk must not take over a name
|
|
1563
|
-
// the TUI already answers to — `discoverUserCommands` marks those files with
|
|
1564
|
-
// a `problem` so their author is told, rather than leaving them to wonder
|
|
1565
|
-
// why the file never ran.
|
|
1566
|
-
const cmd = builtins.find((c) => c.name === parsed.name);
|
|
1567
|
-
if (cmd) {
|
|
1568
|
-
const commandContext = { ...ctx, builtins };
|
|
1569
|
-
const reason = cmd.unavailable?.(commandContext);
|
|
1570
|
-
return reason
|
|
1571
|
-
? { kind: 'message', role: 'system', content: reason }
|
|
1572
|
-
: cmd.action(commandContext, parsed.args);
|
|
1573
|
-
}
|
|
1574
|
-
const user = ctx.userCommands.find((c) => c.name === parsed.name);
|
|
1575
|
-
if (user) {
|
|
1576
|
-
const expanded = expandCommand(user, parsed.args.join(' '));
|
|
1577
|
-
return expanded.ok
|
|
1578
|
-
? { kind: 'prompt', text: expanded.prompt }
|
|
1579
|
-
: { kind: 'message', role: 'system', content: expanded.reason };
|
|
1580
|
-
}
|
|
1581
|
-
return {
|
|
1582
|
-
kind: 'message',
|
|
1583
|
-
role: 'system',
|
|
1584
|
-
content: `Unknown command: /${parsed.name}. Try /help.`,
|
|
1585
|
-
};
|
|
1586
|
-
}
|
|
1587
|
-
//# sourceMappingURL=slashCommands.js.map
|