@namzu/cli 35.0.0 → 36.1.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 +764 -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-5CWS2GLJ.js +13448 -0
- package/dist/chunks/acp-5CWS2GLJ.js.map +6 -0
- package/dist/chunks/activity-command-HK7YJTXV.js +262 -0
- package/dist/chunks/activity-command-HK7YJTXV.js.map +6 -0
- package/dist/chunks/add-ULH5DUNX.js +712 -0
- package/dist/chunks/add-ULH5DUNX.js.map +6 -0
- package/dist/chunks/agent-UEK2U3RE.js +87 -0
- package/dist/chunks/agent-UEK2U3RE.js.map +6 -0
- package/dist/chunks/agent-session-V7JRTODS.js +46 -0
- package/dist/chunks/agent-session-V7JRTODS.js.map +6 -0
- package/dist/chunks/archive-C4A3HPLF.js +84 -0
- package/dist/chunks/archive-C4A3HPLF.js.map +6 -0
- package/dist/chunks/bin-main-EEJHRDIC.js +126 -0
- package/dist/chunks/bin-main-EEJHRDIC.js.map +6 -0
- package/dist/chunks/browser-CRX4HM4C.js +31 -0
- package/dist/chunks/browser-CRX4HM4C.js.map +6 -0
- package/dist/chunks/chat-FVBATC4E.js +101 -0
- package/dist/chunks/chat-FVBATC4E.js.map +6 -0
- package/dist/chunks/chunk-2A37JQKY.js +1355 -0
- package/dist/chunks/chunk-2A37JQKY.js.map +6 -0
- package/dist/chunks/chunk-2NJ2XUXJ.js +283 -0
- package/dist/chunks/chunk-2NJ2XUXJ.js.map +6 -0
- package/dist/chunks/chunk-4HAE7PYX.js +74 -0
- package/dist/chunks/chunk-4HAE7PYX.js.map +6 -0
- package/dist/chunks/chunk-5GRV6P5C.js +69 -0
- package/dist/chunks/chunk-5GRV6P5C.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-62I7HLAP.js +1142 -0
- package/dist/chunks/chunk-62I7HLAP.js.map +6 -0
- package/dist/chunks/chunk-63CGV3XY.js +161 -0
- package/dist/chunks/chunk-63CGV3XY.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-6YG7D7U4.js +159 -0
- package/dist/chunks/chunk-6YG7D7U4.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-7WJOQ6EA.js +106 -0
- package/dist/chunks/chunk-7WJOQ6EA.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-A5DWGNGR.js +73 -0
- package/dist/chunks/chunk-A5DWGNGR.js.map +6 -0
- package/dist/chunks/chunk-A5UXODFL.js +76 -0
- package/dist/chunks/chunk-A5UXODFL.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-AIY4PCDR.js +164 -0
- package/dist/chunks/chunk-AIY4PCDR.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-AN7FO7NS.js +247 -0
- package/dist/chunks/chunk-AN7FO7NS.js.map +6 -0
- package/dist/chunks/chunk-AXIGFKJF.js +34 -0
- package/dist/chunks/chunk-AXIGFKJF.js.map +6 -0
- package/dist/chunks/chunk-C5WBEO3X.js +46 -0
- package/dist/chunks/chunk-C5WBEO3X.js.map +6 -0
- package/dist/chunks/chunk-C5XYHYMX.js +675 -0
- package/dist/chunks/chunk-C5XYHYMX.js.map +6 -0
- package/dist/chunks/chunk-CG65NUSJ.js +115 -0
- package/dist/chunks/chunk-CG65NUSJ.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-E5VLANCO.js +101 -0
- package/dist/chunks/chunk-E5VLANCO.js.map +6 -0
- package/dist/chunks/chunk-EBOHVFOB.js +648 -0
- package/dist/chunks/chunk-EBOHVFOB.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-EIYM6TY7.js +1479 -0
- package/dist/chunks/chunk-EIYM6TY7.js.map +6 -0
- package/dist/chunks/chunk-EWKJGHRO.js +82559 -0
- package/dist/chunks/chunk-EWKJGHRO.js.map +6 -0
- package/dist/chunks/chunk-EY7UNVER.js +311 -0
- package/dist/chunks/chunk-EY7UNVER.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-FXS3AG6B.js +25326 -0
- package/dist/chunks/chunk-FXS3AG6B.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-GMCOZ3CU.js +245 -0
- package/dist/chunks/chunk-GMCOZ3CU.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-HBBB2CAC.js +75 -0
- package/dist/chunks/chunk-HBBB2CAC.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-HFJHHCTY.js +303 -0
- package/dist/chunks/chunk-HFJHHCTY.js.map +6 -0
- package/dist/chunks/chunk-HPMWYIBY.js +773 -0
- package/dist/chunks/chunk-HPMWYIBY.js.map +6 -0
- package/dist/chunks/chunk-HQM2WSQT.js +106 -0
- package/dist/chunks/chunk-HQM2WSQT.js.map +6 -0
- package/dist/chunks/chunk-ITZK4B66.js +787 -0
- package/dist/chunks/chunk-ITZK4B66.js.map +6 -0
- package/dist/chunks/chunk-J72CRUNX.js +154 -0
- package/dist/chunks/chunk-J72CRUNX.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-JPPC4LJF.js +271 -0
- package/dist/chunks/chunk-JPPC4LJF.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-K76WV7TN.js +71 -0
- package/dist/chunks/chunk-K76WV7TN.js.map +6 -0
- package/dist/chunks/chunk-KCWUQRZV.js +828 -0
- package/dist/chunks/chunk-KCWUQRZV.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-KU3W6IHV.js +109 -0
- package/dist/chunks/chunk-KU3W6IHV.js.map +6 -0
- package/dist/chunks/chunk-LQMHASKR.js +171 -0
- package/dist/chunks/chunk-LQMHASKR.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-MZP6SH3M.js +3497 -0
- package/dist/chunks/chunk-MZP6SH3M.js.map +6 -0
- package/dist/chunks/chunk-N5IF64K3.js +1858 -0
- package/dist/chunks/chunk-N5IF64K3.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-NQY5P2EB.js +20 -0
- package/dist/chunks/chunk-NQY5P2EB.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-O7DBCVNY.js +110 -0
- package/dist/chunks/chunk-O7DBCVNY.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-OLPOM3DR.js +127 -0
- package/dist/chunks/chunk-OLPOM3DR.js.map +6 -0
- package/dist/chunks/chunk-PYG7DZ2D.js +380 -0
- package/dist/chunks/chunk-PYG7DZ2D.js.map +6 -0
- package/dist/chunks/chunk-Q24K7536.js +661 -0
- package/dist/chunks/chunk-Q24K7536.js.map +6 -0
- package/dist/chunks/chunk-Q5YM2GCX.js +283 -0
- package/dist/chunks/chunk-Q5YM2GCX.js.map +6 -0
- package/dist/chunks/chunk-R7DCDBRN.js +106 -0
- package/dist/chunks/chunk-R7DCDBRN.js.map +6 -0
- package/dist/chunks/chunk-RC6X3ZY6.js +1439 -0
- package/dist/chunks/chunk-RC6X3ZY6.js.map +6 -0
- package/dist/chunks/chunk-SGS435PR.js +11111 -0
- package/dist/chunks/chunk-SGS435PR.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-SRU3MDHZ.js +75 -0
- package/dist/chunks/chunk-SRU3MDHZ.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-THZXXVHM.js +2953 -0
- package/dist/chunks/chunk-THZXXVHM.js.map +6 -0
- package/dist/chunks/chunk-TIGWWAJI.js +765 -0
- package/dist/chunks/chunk-TIGWWAJI.js.map +6 -0
- package/dist/chunks/chunk-UDBEU2FR.js +97 -0
- package/dist/chunks/chunk-UDBEU2FR.js.map +6 -0
- package/dist/chunks/chunk-UOOQPODR.js +257 -0
- package/dist/chunks/chunk-UOOQPODR.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-UWWGSDZ5.js +134 -0
- package/dist/chunks/chunk-UWWGSDZ5.js.map +6 -0
- package/dist/chunks/chunk-UXVYJWN5.js +1373 -0
- package/dist/chunks/chunk-UXVYJWN5.js.map +6 -0
- package/dist/chunks/chunk-V7TQR6AR.js +818 -0
- package/dist/chunks/chunk-V7TQR6AR.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-WATMFOHB.js +319 -0
- package/dist/chunks/chunk-WATMFOHB.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-WM2JEUGV.js +207 -0
- package/dist/chunks/chunk-WM2JEUGV.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-XHOD3RDN.js +517 -0
- package/dist/chunks/chunk-XHOD3RDN.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-ZKEWE6K4.js +399 -0
- package/dist/chunks/chunk-ZKEWE6K4.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-7YAOEJGS.js +129 -0
- package/dist/chunks/cli-runtime-7YAOEJGS.js.map +6 -0
- package/dist/chunks/commands-QPVRB3RK.js +21 -0
- package/dist/chunks/commands-QPVRB3RK.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-S3BTEPYR.js +21 -0
- package/dist/chunks/crash-report-S3BTEPYR.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-3GJFRS2X.js +520 -0
- package/dist/chunks/dist-3GJFRS2X.js.map +6 -0
- package/dist/chunks/dist-BFC7XUCT.js +555 -0
- package/dist/chunks/dist-BFC7XUCT.js.map +6 -0
- package/dist/chunks/dist-ERN5DRKK.js +1415 -0
- package/dist/chunks/dist-ERN5DRKK.js.map +6 -0
- package/dist/chunks/dist-EY3OJBQH.js +1339 -0
- package/dist/chunks/dist-EY3OJBQH.js.map +6 -0
- package/dist/chunks/dist-G42HPNIE.js +514 -0
- package/dist/chunks/dist-G42HPNIE.js.map +6 -0
- package/dist/chunks/dist-SKRHHPUR.js +1018 -0
- package/dist/chunks/dist-SKRHHPUR.js.map +6 -0
- package/dist/chunks/dist-Z47L7ZAJ.js +40654 -0
- package/dist/chunks/dist-Z47L7ZAJ.js.map +6 -0
- package/dist/chunks/doctor-IE3PLXZK.js +28 -0
- package/dist/chunks/doctor-IE3PLXZK.js.map +6 -0
- package/dist/chunks/drain-ESXUKOE6.js +471 -0
- package/dist/chunks/drain-ESXUKOE6.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-53UONRWR.js +187 -0
- package/dist/chunks/eval-53UONRWR.js.map +6 -0
- package/dist/chunks/exec-COV235L5.js +1284 -0
- package/dist/chunks/exec-COV235L5.js.map +6 -0
- package/dist/chunks/home-QS7RBP34.js +16 -0
- package/dist/chunks/home-QS7RBP34.js.map +6 -0
- package/dist/chunks/host-queries-LDEBHKBX.js +152 -0
- package/dist/chunks/host-queries-LDEBHKBX.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-6NF6NJNV.js +63 -0
- package/dist/chunks/lifecycle-6NF6NJNV.js.map +6 -0
- package/dist/chunks/list-DQZU7NEF.js +293 -0
- package/dist/chunks/list-DQZU7NEF.js.map +6 -0
- package/dist/chunks/login-IQGNP5XY.js +29 -0
- package/dist/chunks/login-IQGNP5XY.js.map +6 -0
- package/dist/chunks/logs-KSG7SFAB.js +116 -0
- package/dist/chunks/logs-KSG7SFAB.js.map +6 -0
- package/dist/chunks/mcp-WFXKXGNM.js +763 -0
- package/dist/chunks/mcp-WFXKXGNM.js.map +6 -0
- package/dist/chunks/message-command-O7ZH4I4C.js +170 -0
- package/dist/chunks/message-command-O7ZH4I4C.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-LTPV3CH5.js +115 -0
- package/dist/chunks/operator-tools-LTPV3CH5.js.map +6 -0
- package/dist/chunks/output-schema-UM3P5AOR.js +11 -0
- package/dist/chunks/output-schema-UM3P5AOR.js.map +6 -0
- package/dist/chunks/pal-GBYJHBP3.js +200 -0
- package/dist/chunks/pal-GBYJHBP3.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-J42J2PDA.js +160 -0
- package/dist/chunks/providers-J42J2PDA.js.map +6 -0
- package/dist/chunks/resident-7D6IM5LP.js +1314 -0
- package/dist/chunks/resident-7D6IM5LP.js.map +6 -0
- package/dist/chunks/resume-command-XZWGUXRK.js +22 -0
- package/dist/chunks/resume-command-XZWGUXRK.js.map +6 -0
- package/dist/chunks/schedule-JLIOF3MS.js +143 -0
- package/dist/chunks/schedule-JLIOF3MS.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-YBU5VTKQ.js +1633 -0
- package/dist/chunks/service-YBU5VTKQ.js.map +6 -0
- package/dist/chunks/session-step-2HJSIJNN.js +26 -0
- package/dist/chunks/session-step-2HJSIJNN.js.map +6 -0
- package/dist/chunks/skills-HV2MOBEW.js +282 -0
- package/dist/chunks/skills-HV2MOBEW.js.map +6 -0
- package/dist/chunks/state-6HV3D3O4.js +717 -0
- package/dist/chunks/state-6HV3D3O4.js.map +6 -0
- package/dist/chunks/store-6J2MUGON.js +82 -0
- package/dist/chunks/store-6J2MUGON.js.map +6 -0
- package/dist/chunks/store-GDP2EW27.js +34 -0
- package/dist/chunks/store-GDP2EW27.js.map +6 -0
- package/dist/chunks/store-VXNKMMNW.js +42 -0
- package/dist/chunks/store-VXNKMMNW.js.map +6 -0
- package/dist/chunks/tui-DDWX2WYH.js +56903 -0
- package/dist/chunks/tui-DDWX2WYH.js.map +6 -0
- package/dist/chunks/upgrade-MC5JB7DK.js +315 -0
- package/dist/chunks/upgrade-MC5JB7DK.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-6YPRX6SU.js +116 -0
- package/dist/chunks/worktree-6YPRX6SU.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/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/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/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.map +1 -1
- 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 +21 -3
- 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.map +1 -1
- 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 +3 -0
- package/dist/tui/Transcript.d.ts.map +1 -1
- package/dist/tui/TranscriptScrollView.d.ts +23 -0
- package/dist/tui/TranscriptScrollView.d.ts.map +1 -0
- package/dist/tui/TrustPrompt.d.ts +8 -0
- package/dist/tui/TrustPrompt.d.ts.map +1 -1
- package/dist/tui/agent.d.ts +125 -3
- 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 +4 -1
- 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/transcript-scroll.d.ts +73 -0
- package/dist/tui/transcript-scroll.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 +21 -10
- 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 -461
- 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 -611
- 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 -476
- 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 -8499
- package/dist/tui/App.js.map +0 -1
- package/dist/tui/BackgroundJobsPanel.js +0 -129
- package/dist/tui/BackgroundJobsPanel.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 -939
- 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/PendingInputPanel.js +0 -108
- package/dist/tui/PendingInputPanel.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 -4301
- 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 -1588
- package/dist/tui/slashCommands.js.map +0 -1
- package/dist/tui/status-card.js +0 -30
- package/dist/tui/status-card.js.map +0 -1
- package/dist/tui/status-panel-layout.js +0 -42
- package/dist/tui/status-panel-layout.js.map +0 -1
- package/dist/tui/stream-blocks.js +0 -187
- package/dist/tui/stream-blocks.js.map +0 -1
- package/dist/tui/task-activity.js +0 -157
- package/dist/tui/task-activity.js.map +0 -1
- package/dist/tui/terminal-choice-text.js +0 -118
- package/dist/tui/terminal-choice-text.js.map +0 -1
- package/dist/tui/terminal-display.js +0 -65
- package/dist/tui/terminal-display.js.map +0 -1
- package/dist/tui/terminal-hyperlinks.js +0 -70
- package/dist/tui/terminal-hyperlinks.js.map +0 -1
- package/dist/tui/theme.js +0 -34
- package/dist/tui/theme.js.map +0 -1
- package/dist/tui/triggers/analyze.js +0 -221
- package/dist/tui/triggers/analyze.js.map +0 -1
- package/dist/tui/triggers/context-text.js +0 -44
- package/dist/tui/triggers/context-text.js.map +0 -1
- package/dist/tui/triggers/copy.js +0 -163
- package/dist/tui/triggers/copy.js.map +0 -1
- package/dist/tui/triggers/detect.js +0 -295
- package/dist/tui/triggers/detect.js.map +0 -1
- package/dist/tui/triggers/fold.js +0 -44
- package/dist/tui/triggers/fold.js.map +0 -1
- package/dist/tui/triggers/pattern.js +0 -243
- package/dist/tui/triggers/pattern.js.map +0 -1
- package/dist/tui/triggers/provenance.js +0 -98
- package/dist/tui/triggers/provenance.js.map +0 -1
- package/dist/tui/triggers/registry.js +0 -164
- package/dist/tui/triggers/registry.js.map +0 -1
- package/dist/tui/triggers/setting.js +0 -61
- package/dist/tui/triggers/setting.js.map +0 -1
- package/dist/tui/triggers/verbs.js +0 -140
- package/dist/tui/triggers/verbs.js.map +0 -1
- package/dist/tui/turn-interruption.js +0 -160
- package/dist/tui/turn-interruption.js.map +0 -1
- package/dist/tui/turn-limits-settings.js +0 -88
- package/dist/tui/turn-limits-settings.js.map +0 -1
- package/dist/tui/types.js +0 -7
- package/dist/tui/types.js.map +0 -1
- package/dist/tui/units.js +0 -20
- package/dist/tui/units.js.map +0 -1
- package/dist/tui/use-selection-index.js +0 -13
- package/dist/tui/use-selection-index.js.map +0 -1
- package/dist/tui/web-activity.js +0 -105
- package/dist/tui/web-activity.js.map +0 -1
- package/dist/tui/workspace-diff.js +0 -101
- package/dist/tui/workspace-diff.js.map +0 -1
- package/dist/tui/workspace-review.js +0 -67
- package/dist/tui/workspace-review.js.map +0 -1
- package/dist/user-commands/store.js +0 -235
- package/dist/user-commands/store.js.map +0 -1
- package/dist/version.js +0 -23
- package/dist/version.js.map +0 -1
|
@@ -0,0 +1,1858 @@
|
|
|
1
|
+
import { createRequire as __namzuCreateRequire } from 'node:module';
|
|
2
|
+
const require = __namzuCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
isCompletionArgument
|
|
5
|
+
} from "./chunk-JV3LONAU.js";
|
|
6
|
+
import {
|
|
7
|
+
SKILL_NAME_MAX_CHARS,
|
|
8
|
+
SKILL_NAME_PATTERN,
|
|
9
|
+
resolveTurnGuards
|
|
10
|
+
} from "./chunk-PYG7DZ2D.js";
|
|
11
|
+
import {
|
|
12
|
+
renderConfigDebug
|
|
13
|
+
} from "./chunk-KU3W6IHV.js";
|
|
14
|
+
import {
|
|
15
|
+
CLI_VERSION
|
|
16
|
+
} from "./chunk-HE7WUOX2.js";
|
|
17
|
+
import {
|
|
18
|
+
homePath,
|
|
19
|
+
plural,
|
|
20
|
+
shortId,
|
|
21
|
+
stringWidth
|
|
22
|
+
} from "./chunk-US5ZFPAU.js";
|
|
23
|
+
import {
|
|
24
|
+
terminalDisplayText
|
|
25
|
+
} from "./chunk-EEDZOGV4.js";
|
|
26
|
+
import {
|
|
27
|
+
effectivePermissionMode,
|
|
28
|
+
isPermissionMode,
|
|
29
|
+
permissionModeDescription,
|
|
30
|
+
permissionModeLabel
|
|
31
|
+
} from "./chunk-5GRV6P5C.js";
|
|
32
|
+
import {
|
|
33
|
+
namzuHomePath
|
|
34
|
+
} from "./chunk-NQY5P2EB.js";
|
|
35
|
+
import {
|
|
36
|
+
RegistryCollisionError,
|
|
37
|
+
isMemoryType,
|
|
38
|
+
kernelHostCommands,
|
|
39
|
+
parseFrontmatter
|
|
40
|
+
} from "./chunk-EWKJGHRO.js";
|
|
41
|
+
import {
|
|
42
|
+
__name
|
|
43
|
+
} from "./chunk-76FLAFCG.js";
|
|
44
|
+
|
|
45
|
+
// src/user-commands/store.ts
|
|
46
|
+
import { readFileSync, readdirSync, realpathSync } from "node:fs";
|
|
47
|
+
import { platform } from "node:os";
|
|
48
|
+
import { join, resolve } from "node:path";
|
|
49
|
+
var ARGUMENTS_TOKEN = "$ARGUMENTS";
|
|
50
|
+
function userCommandsDir(home) {
|
|
51
|
+
return join(namzuHomePath(home), "commands");
|
|
52
|
+
}
|
|
53
|
+
__name(userCommandsDir, "userCommandsDir");
|
|
54
|
+
function projectCommandsDir(cwd = process.cwd()) {
|
|
55
|
+
return join(cwd, ".namzu", "commands");
|
|
56
|
+
}
|
|
57
|
+
__name(projectCommandsDir, "projectCommandsDir");
|
|
58
|
+
function readCommandsFrom(dir, source) {
|
|
59
|
+
let files;
|
|
60
|
+
try {
|
|
61
|
+
files = readdirSync(dir, { withFileTypes: true }).filter((e) => e.isFile() && e.name.endsWith(".md")).map((e) => e.name);
|
|
62
|
+
} catch {
|
|
63
|
+
return [];
|
|
64
|
+
}
|
|
65
|
+
const out = [];
|
|
66
|
+
for (const file of files) {
|
|
67
|
+
const path = join(dir, file);
|
|
68
|
+
const name = file.slice(0, -".md".length);
|
|
69
|
+
let raw;
|
|
70
|
+
try {
|
|
71
|
+
raw = readFileSync(path, "utf8");
|
|
72
|
+
} catch {
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
try {
|
|
76
|
+
if (!raw.trimStart().startsWith("---")) {
|
|
77
|
+
out.push({ name, description: "(no description)", template: raw.trim(), path, source });
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
const { values, body } = parseFrontmatter(raw, path);
|
|
81
|
+
const description = values.description?.kind === "scalar" ? values.description.value : "(no description)";
|
|
82
|
+
out.push({ name, description, template: body, path, source });
|
|
83
|
+
} catch (err) {
|
|
84
|
+
out.push({
|
|
85
|
+
name,
|
|
86
|
+
description: "(could not be read)",
|
|
87
|
+
template: "",
|
|
88
|
+
path,
|
|
89
|
+
source,
|
|
90
|
+
problem: err instanceof Error ? err.message : String(err)
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return out;
|
|
95
|
+
}
|
|
96
|
+
__name(readCommandsFrom, "readCommandsFrom");
|
|
97
|
+
function discoverUserCommands(opts = {}) {
|
|
98
|
+
const reserved = new Set(opts.reserved ?? []);
|
|
99
|
+
const userDir = userCommandsDir(opts.home);
|
|
100
|
+
const projectDir = projectCommandsDir(opts.cwd);
|
|
101
|
+
const user = readCommandsFrom(userDir, "user");
|
|
102
|
+
const project = samePhysicalDirectory(userDir, projectDir) ? [] : readCommandsFrom(projectDir, "project");
|
|
103
|
+
const byName = /* @__PURE__ */ new Map();
|
|
104
|
+
for (const c of user) byName.set(c.name, c);
|
|
105
|
+
for (const c of project) byName.set(c.name, c);
|
|
106
|
+
return [...byName.values()].map(
|
|
107
|
+
(c) => reserved.has(c.name) ? { ...c, problem: `"/${c.name}" is a built-in command, so this file is not used.` } : c
|
|
108
|
+
).sort((a, b) => a.name.localeCompare(b.name));
|
|
109
|
+
}
|
|
110
|
+
__name(discoverUserCommands, "discoverUserCommands");
|
|
111
|
+
function samePhysicalDirectory(left, right) {
|
|
112
|
+
const canonical = /* @__PURE__ */ __name((path) => {
|
|
113
|
+
let value;
|
|
114
|
+
try {
|
|
115
|
+
value = realpathSync(path);
|
|
116
|
+
} catch {
|
|
117
|
+
value = resolve(path);
|
|
118
|
+
}
|
|
119
|
+
return platform() === "win32" ? value.toLocaleLowerCase("en-US") : value;
|
|
120
|
+
}, "canonical");
|
|
121
|
+
return canonical(left) === canonical(right);
|
|
122
|
+
}
|
|
123
|
+
__name(samePhysicalDirectory, "samePhysicalDirectory");
|
|
124
|
+
function expandHeadlessCommand(prompt, opts = {}) {
|
|
125
|
+
const trimmed = prompt.trim();
|
|
126
|
+
if (!trimmed.startsWith("/")) return { kind: "unchanged", prompt };
|
|
127
|
+
const [token, ...rest] = trimmed.slice(1).split(/\s+/);
|
|
128
|
+
const name = token ?? "";
|
|
129
|
+
if (!name) return { kind: "unchanged", prompt };
|
|
130
|
+
const builtins = new Set(opts.builtins ?? []);
|
|
131
|
+
if (rest.length === 0 && builtins.has(name)) {
|
|
132
|
+
return {
|
|
133
|
+
kind: "refused",
|
|
134
|
+
reason: `/${name} is an interactive command and does nothing in \`namzu exec\`. Run \`namzu\` for the terminal agent, or pass a prompt instead.`,
|
|
135
|
+
fixable: true
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
const commands = discoverUserCommands({
|
|
139
|
+
...opts.home !== void 0 ? { home: opts.home } : {},
|
|
140
|
+
...opts.cwd !== void 0 ? { cwd: opts.cwd } : {},
|
|
141
|
+
reserved: [...builtins]
|
|
142
|
+
});
|
|
143
|
+
const found = commands.find((c) => c.name === name);
|
|
144
|
+
if (!found) return { kind: "unchanged", prompt };
|
|
145
|
+
const expanded = expandCommand(found, rest.join(" "));
|
|
146
|
+
return expanded.ok ? { kind: "expanded", prompt: expanded.prompt, name } : (
|
|
147
|
+
// A command whose FILE is the problem is not fixable by sending a
|
|
148
|
+
// different prompt. Taken from `found.problem` rather than from the
|
|
149
|
+
// refusal reason, because that is where the fact lives — reading it back
|
|
150
|
+
// out of the sentence would make the sentence unrewordable.
|
|
151
|
+
{ kind: "refused", reason: expanded.reason, fixable: found.problem === void 0 }
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
__name(expandHeadlessCommand, "expandHeadlessCommand");
|
|
155
|
+
function expandCommand(command, args) {
|
|
156
|
+
if (command.problem) return { ok: false, reason: command.problem };
|
|
157
|
+
const trimmed = args.trim();
|
|
158
|
+
if (command.template.includes(ARGUMENTS_TOKEN)) {
|
|
159
|
+
return { ok: true, prompt: command.template.split(ARGUMENTS_TOKEN).join(trimmed) };
|
|
160
|
+
}
|
|
161
|
+
if (trimmed.length === 0) return { ok: true, prompt: command.template };
|
|
162
|
+
return {
|
|
163
|
+
ok: false,
|
|
164
|
+
reason: [
|
|
165
|
+
`/${command.name} takes no arguments, but you gave: ${trimmed}`,
|
|
166
|
+
"",
|
|
167
|
+
`Add ${ARGUMENTS_TOKEN} where they belong in ${command.path}, and they will be`,
|
|
168
|
+
"substituted there. Running it now would silently discard them."
|
|
169
|
+
].join("\n")
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
__name(expandCommand, "expandCommand");
|
|
173
|
+
|
|
174
|
+
// src/installation.ts
|
|
175
|
+
import { createHash } from "node:crypto";
|
|
176
|
+
import { readFileSync as readFileSync2, readdirSync as readdirSync2 } from "node:fs";
|
|
177
|
+
import { dirname, join as join2, relative } from "node:path";
|
|
178
|
+
import { fileURLToPath } from "node:url";
|
|
179
|
+
function fingerprintCli(directory) {
|
|
180
|
+
const hash = createHash("sha256");
|
|
181
|
+
const visit = /* @__PURE__ */ __name((folder) => {
|
|
182
|
+
for (const entry of readdirSync2(folder, { withFileTypes: true }).sort(
|
|
183
|
+
(a, b) => a.name.localeCompare(b.name, "en")
|
|
184
|
+
)) {
|
|
185
|
+
const path = join2(folder, entry.name);
|
|
186
|
+
if (entry.isDirectory() && !["node_modules", "__tests__", "__fixtures__"].includes(entry.name))
|
|
187
|
+
visit(path);
|
|
188
|
+
else if (entry.isFile() && /\.(js|ts|tsx)$/.test(entry.name) && !/\.(d|test|proc-test)\.(js|ts|tsx)$/.test(entry.name)) {
|
|
189
|
+
hash.update(relative(directory, path).replaceAll("\\", "/"));
|
|
190
|
+
hash.update("\0");
|
|
191
|
+
hash.update(readFileSync2(path));
|
|
192
|
+
hash.update("\0");
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}, "visit");
|
|
196
|
+
visit(directory);
|
|
197
|
+
return hash.digest("hex").slice(0, 16);
|
|
198
|
+
}
|
|
199
|
+
__name(fingerprintCli, "fingerprintCli");
|
|
200
|
+
var cached;
|
|
201
|
+
function installationRows() {
|
|
202
|
+
if (cached) return cached;
|
|
203
|
+
const directory = dirname(fileURLToPath(new URL("../", import.meta.url).href + "installation.js"));
|
|
204
|
+
let fingerprint = "unavailable";
|
|
205
|
+
try {
|
|
206
|
+
fingerprint = fingerprintCli(directory);
|
|
207
|
+
} catch {
|
|
208
|
+
}
|
|
209
|
+
cached = [
|
|
210
|
+
["Version", CLI_VERSION],
|
|
211
|
+
["Build", fingerprint],
|
|
212
|
+
["Executable", join2(directory, (new URL("../", import.meta.url).href + "installation.js").endsWith(".ts") ? "bin.ts" : "bin.js")]
|
|
213
|
+
];
|
|
214
|
+
return cached;
|
|
215
|
+
}
|
|
216
|
+
__name(installationRows, "installationRows");
|
|
217
|
+
|
|
218
|
+
// src/tui/terminal-choice-text.ts
|
|
219
|
+
var graphemes = new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
220
|
+
function eraseLastChoiceGrapheme(source) {
|
|
221
|
+
let boundary = 0;
|
|
222
|
+
for (const { index } of graphemes.segment(source)) boundary = index;
|
|
223
|
+
return source.slice(0, boundary);
|
|
224
|
+
}
|
|
225
|
+
__name(eraseLastChoiceGrapheme, "eraseLastChoiceGrapheme");
|
|
226
|
+
function choiceDisplayText(source) {
|
|
227
|
+
return terminalDisplayText(source).replace(/[\n\t]/g, " ");
|
|
228
|
+
}
|
|
229
|
+
__name(choiceDisplayText, "choiceDisplayText");
|
|
230
|
+
function choiceDisplayWidth(source) {
|
|
231
|
+
return stringWidth(choiceDisplayText(source));
|
|
232
|
+
}
|
|
233
|
+
__name(choiceDisplayWidth, "choiceDisplayWidth");
|
|
234
|
+
function wrapChoiceText(source, columns) {
|
|
235
|
+
const width = Math.max(1, Math.floor(columns));
|
|
236
|
+
const lines = [];
|
|
237
|
+
for (const paragraph of terminalDisplayText(source).split("\n").map((line) => line.replace(/\t/g, " "))) {
|
|
238
|
+
let line = "";
|
|
239
|
+
for (const word of paragraph.split(" ")) {
|
|
240
|
+
if (word === "") continue;
|
|
241
|
+
if (line === "") {
|
|
242
|
+
line = word;
|
|
243
|
+
continue;
|
|
244
|
+
}
|
|
245
|
+
if (choiceDisplayWidth(`${line} ${word}`) <= width) {
|
|
246
|
+
line = `${line} ${word}`;
|
|
247
|
+
continue;
|
|
248
|
+
}
|
|
249
|
+
lines.push(line);
|
|
250
|
+
line = word;
|
|
251
|
+
}
|
|
252
|
+
lines.push(line);
|
|
253
|
+
}
|
|
254
|
+
return lines.flatMap((line) => breakOverlongWord(line, width));
|
|
255
|
+
}
|
|
256
|
+
__name(wrapChoiceText, "wrapChoiceText");
|
|
257
|
+
function wrapBalancedText(source, columns) {
|
|
258
|
+
const width = Math.max(1, Math.floor(columns));
|
|
259
|
+
const greedy = wrapChoiceText(source, width);
|
|
260
|
+
if (greedy.length < 2) return greedy;
|
|
261
|
+
let low = 1;
|
|
262
|
+
let high = width;
|
|
263
|
+
while (low < high) {
|
|
264
|
+
const middle = Math.floor((low + high) / 2);
|
|
265
|
+
if (wrapChoiceText(source, middle).length <= greedy.length) high = middle;
|
|
266
|
+
else low = middle + 1;
|
|
267
|
+
}
|
|
268
|
+
return wrapChoiceText(source, high);
|
|
269
|
+
}
|
|
270
|
+
__name(wrapBalancedText, "wrapBalancedText");
|
|
271
|
+
function breakOverlongWord(line, width) {
|
|
272
|
+
if (choiceDisplayWidth(line) <= width) return [line];
|
|
273
|
+
const pieces = [];
|
|
274
|
+
let piece = "";
|
|
275
|
+
let used = 0;
|
|
276
|
+
for (const { segment } of graphemes.segment(line)) {
|
|
277
|
+
const size = stringWidth(segment);
|
|
278
|
+
if (used + size > width && piece !== "") {
|
|
279
|
+
pieces.push(piece);
|
|
280
|
+
piece = "";
|
|
281
|
+
used = 0;
|
|
282
|
+
}
|
|
283
|
+
piece += segment;
|
|
284
|
+
used += size;
|
|
285
|
+
}
|
|
286
|
+
pieces.push(piece);
|
|
287
|
+
return pieces;
|
|
288
|
+
}
|
|
289
|
+
__name(breakOverlongWord, "breakOverlongWord");
|
|
290
|
+
function capChoiceLines(lines, max, columns) {
|
|
291
|
+
if (lines.length <= max || max < 1) return lines;
|
|
292
|
+
const kept = lines.slice(0, max);
|
|
293
|
+
const last = kept[max - 1] ?? "";
|
|
294
|
+
return [...kept.slice(0, max - 1), truncateChoiceText(`${last} \u2026`, columns)];
|
|
295
|
+
}
|
|
296
|
+
__name(capChoiceLines, "capChoiceLines");
|
|
297
|
+
function truncateChoiceText(source, columns) {
|
|
298
|
+
const text = choiceDisplayText(source);
|
|
299
|
+
const width = Math.max(0, Math.floor(columns));
|
|
300
|
+
if (width === 0) return "";
|
|
301
|
+
if (stringWidth(text) <= width) return text;
|
|
302
|
+
let result = "";
|
|
303
|
+
let used = 0;
|
|
304
|
+
for (const { segment } of graphemes.segment(text)) {
|
|
305
|
+
const size = stringWidth(segment);
|
|
306
|
+
if (used + size > width - 1) break;
|
|
307
|
+
result += segment;
|
|
308
|
+
used += size;
|
|
309
|
+
}
|
|
310
|
+
return `${result}\u2026`;
|
|
311
|
+
}
|
|
312
|
+
__name(truncateChoiceText, "truncateChoiceText");
|
|
313
|
+
|
|
314
|
+
// src/tui/status-card.ts
|
|
315
|
+
function statusCard(rows, columns = 80) {
|
|
316
|
+
const width = Math.min(96, Math.max(12, columns - 6));
|
|
317
|
+
const lines = rows.map(([label, value]) => `${label}: ${choiceDisplayText(value)}`);
|
|
318
|
+
if (width < 30) return ["NAMZU / STATUS", ...lines].join("\n");
|
|
319
|
+
const inside = width - 4;
|
|
320
|
+
const title = "\u250C\u2500 NAMZU / STATUS ";
|
|
321
|
+
const result = [`${title}${"\u2500".repeat(width - stringWidth(title) - 1)}\u2510`];
|
|
322
|
+
for (const line of lines) {
|
|
323
|
+
let text = "";
|
|
324
|
+
let cells = 0;
|
|
325
|
+
for (const { segment } of new Intl.Segmenter(void 0, { granularity: "grapheme" }).segment(
|
|
326
|
+
line
|
|
327
|
+
)) {
|
|
328
|
+
const size = stringWidth(segment);
|
|
329
|
+
if (cells + size > inside) {
|
|
330
|
+
result.push(`\u2502 ${text}${" ".repeat(inside - cells)} \u2502`);
|
|
331
|
+
text = " ";
|
|
332
|
+
cells = 2;
|
|
333
|
+
}
|
|
334
|
+
text += segment;
|
|
335
|
+
cells += size;
|
|
336
|
+
}
|
|
337
|
+
result.push(`\u2502 ${text}${" ".repeat(Math.max(0, inside - cells))} \u2502`);
|
|
338
|
+
}
|
|
339
|
+
result.push(`\u2514${"\u2500".repeat(width - 2)}\u2518`);
|
|
340
|
+
return result.join("\n");
|
|
341
|
+
}
|
|
342
|
+
__name(statusCard, "statusCard");
|
|
343
|
+
|
|
344
|
+
// src/tui/turn-limits-settings.ts
|
|
345
|
+
var TURN_LIMIT_FIELDS = [
|
|
346
|
+
{
|
|
347
|
+
name: "tokens",
|
|
348
|
+
key: "tokenBudget",
|
|
349
|
+
label: "Token budget",
|
|
350
|
+
hint: "Whole tokens across the reply and its agents; 0 or unlimited removes the cap."
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
name: "iterations",
|
|
354
|
+
key: "maxIterations",
|
|
355
|
+
label: "Model calls",
|
|
356
|
+
hint: "Whole model calls per reply; 0 or unlimited removes the cap."
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
name: "time",
|
|
360
|
+
key: "timeoutMs",
|
|
361
|
+
label: "Reply duration",
|
|
362
|
+
hint: "Duration such as 30m, 2h or 1500ms; a bare number is milliseconds. 0 or unlimited removes the cap."
|
|
363
|
+
}
|
|
364
|
+
];
|
|
365
|
+
function turnLimitsAction(args) {
|
|
366
|
+
if (args.length === 0) return { kind: "turn-limits-picker" };
|
|
367
|
+
if (args.length === 1 && args[0] === "unlimited")
|
|
368
|
+
return { kind: "turn-limits-set", limits: resolveTurnGuards() };
|
|
369
|
+
const field = TURN_LIMIT_FIELDS.find((field2) => field2.name === args[0]);
|
|
370
|
+
if (field && args.length === 1) return { kind: "turn-limit-editor", key: field.key };
|
|
371
|
+
if (field && args.length === 2) {
|
|
372
|
+
try {
|
|
373
|
+
const raw = (args[1] ?? "").toLowerCase();
|
|
374
|
+
const duration = field.key === "timeoutMs" ? /^(\d+(?:\.\d+)?)(ms|s|m|h)$/.exec(raw) : null;
|
|
375
|
+
const value = raw === "unlimited" ? 0 : duration ? Number(duration[1]) * ({ ms: 1, s: 1e3, m: 6e4, h: 36e5 }[duration[2] ?? "ms"] ?? 1) : /^\d+$/.test(raw) ? Number(raw) : Number.NaN;
|
|
376
|
+
resolveTurnGuards({ [field.key]: value });
|
|
377
|
+
return { kind: "turn-limits-set", limits: { [field.key]: value } };
|
|
378
|
+
} catch {
|
|
379
|
+
return {
|
|
380
|
+
kind: "message",
|
|
381
|
+
role: "system",
|
|
382
|
+
content: `${field.label} was not changed: ${field.key === "timeoutMs" ? "use a time such as 90s, 5m or 2h" : "use a whole number"}, or 0 or unlimited for no limit. ${field.hint}`
|
|
383
|
+
};
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
return {
|
|
387
|
+
kind: "message",
|
|
388
|
+
role: "system",
|
|
389
|
+
content: "Usage: /config limits [tokens|iterations|time] [value]; /config limits unlimited removes all three caps."
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
__name(turnLimitsAction, "turnLimitsAction");
|
|
393
|
+
function formatTurnLimit(key, value) {
|
|
394
|
+
if (value === 0) return "Unlimited";
|
|
395
|
+
if (key === "timeoutMs") {
|
|
396
|
+
for (const [unit, divisor] of [
|
|
397
|
+
["h", 36e5],
|
|
398
|
+
["m", 6e4],
|
|
399
|
+
["s", 1e3]
|
|
400
|
+
])
|
|
401
|
+
if (value % divisor === 0) return `${value / divisor}${unit}`;
|
|
402
|
+
return `${value}ms`;
|
|
403
|
+
}
|
|
404
|
+
return value.toLocaleString("en-US");
|
|
405
|
+
}
|
|
406
|
+
__name(formatTurnLimit, "formatTurnLimit");
|
|
407
|
+
function turnLimitCommands(limits) {
|
|
408
|
+
return [
|
|
409
|
+
...TURN_LIMIT_FIELDS.map((field) => ({
|
|
410
|
+
name: `config limits ${field.name}`,
|
|
411
|
+
label: field.label,
|
|
412
|
+
description: formatTurnLimit(field.key, limits[field.key])
|
|
413
|
+
})),
|
|
414
|
+
{
|
|
415
|
+
name: "config limits unlimited",
|
|
416
|
+
label: "Remove all reply limits",
|
|
417
|
+
description: "Unlimited tokens, model calls and duration. Usage is still measured."
|
|
418
|
+
}
|
|
419
|
+
];
|
|
420
|
+
}
|
|
421
|
+
__name(turnLimitCommands, "turnLimitCommands");
|
|
422
|
+
|
|
423
|
+
// src/release-notes.ts
|
|
424
|
+
import { readFileSync as readFileSync3 } from "node:fs";
|
|
425
|
+
import { dirname as dirname2, join as join3 } from "node:path";
|
|
426
|
+
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
427
|
+
function changelogSection(changelog, version) {
|
|
428
|
+
const lines = changelog.split("\n");
|
|
429
|
+
const start = lines.findIndex((line) => line.trim() === `## ${version}`);
|
|
430
|
+
if (start === -1) return null;
|
|
431
|
+
let end = lines.length;
|
|
432
|
+
for (let i = start + 1; i < lines.length; i++) {
|
|
433
|
+
if (lines[i]?.startsWith("## ")) {
|
|
434
|
+
end = i;
|
|
435
|
+
break;
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
const body = lines.slice(start + 1, end).join("\n").trim();
|
|
439
|
+
return { version, body };
|
|
440
|
+
}
|
|
441
|
+
__name(changelogSection, "changelogSection");
|
|
442
|
+
function changelogVersions(changelog) {
|
|
443
|
+
return changelog.split("\n").filter((line) => line.startsWith("## ")).map((line) => line.slice(3).trim());
|
|
444
|
+
}
|
|
445
|
+
__name(changelogVersions, "changelogVersions");
|
|
446
|
+
function readChangelog() {
|
|
447
|
+
try {
|
|
448
|
+
const here = dirname2(fileURLToPath2(new URL("../", import.meta.url).href + "release-notes.js"));
|
|
449
|
+
return readFileSync3(join3(here, "..", "CHANGELOG.md"), "utf8");
|
|
450
|
+
} catch {
|
|
451
|
+
return null;
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
__name(readChangelog, "readChangelog");
|
|
455
|
+
var RELEASE_NOTES_MAX_LINES = 80;
|
|
456
|
+
function renderReleaseNotes(changelog, version = CLI_VERSION) {
|
|
457
|
+
if (changelog === null) {
|
|
458
|
+
return "No release notes: this install has no CHANGELOG.md beside its package.json.";
|
|
459
|
+
}
|
|
460
|
+
const section = changelogSection(changelog, version);
|
|
461
|
+
if (!section) {
|
|
462
|
+
const known = changelogVersions(changelog).slice(0, 8);
|
|
463
|
+
return `No notes for ${version}. Versions with notes: ${known.join(", ")}${known.length < changelogVersions(changelog).length ? ", \u2026" : ""}.`;
|
|
464
|
+
}
|
|
465
|
+
const lines = section.body.split("\n");
|
|
466
|
+
const shown = lines.slice(0, RELEASE_NOTES_MAX_LINES);
|
|
467
|
+
const cut = lines.length > shown.length ? `
|
|
468
|
+
\u2026 ${lines.length - shown.length} more lines in CHANGELOG.md` : "";
|
|
469
|
+
return `@namzu/cli ${section.version}
|
|
470
|
+
|
|
471
|
+
${shown.join("\n")}${cut}`;
|
|
472
|
+
}
|
|
473
|
+
__name(renderReleaseNotes, "renderReleaseNotes");
|
|
474
|
+
|
|
475
|
+
// src/tui/slashCommands.ts
|
|
476
|
+
function renameConversationAction(_ctx, args) {
|
|
477
|
+
const text = args.join(" ").trim();
|
|
478
|
+
if (text.toLowerCase() === "clear") return { kind: "title", title: "", clear: true };
|
|
479
|
+
return { kind: "title", title: text, clear: false };
|
|
480
|
+
}
|
|
481
|
+
__name(renameConversationAction, "renameConversationAction");
|
|
482
|
+
function matchSlashCommands(value, userCommands = [], builtins = CLI_LOCAL_COMMANDS) {
|
|
483
|
+
const m = /^\/([\w-]*)$/.exec(value);
|
|
484
|
+
if (!m) return [];
|
|
485
|
+
const prefix = (m[1] ?? "").toLowerCase();
|
|
486
|
+
const own = userCommands.map((c) => ({
|
|
487
|
+
name: c.name,
|
|
488
|
+
description: c.problem ? `Unavailable: ${c.problem}` : c.description,
|
|
489
|
+
action: /* @__PURE__ */ __name(() => ({ kind: "none" }), "action")
|
|
490
|
+
}));
|
|
491
|
+
const matches = [...builtins.filter((command) => command.discoverable !== false), ...own].filter(
|
|
492
|
+
(command) => command.name.startsWith(prefix)
|
|
493
|
+
);
|
|
494
|
+
if (prefix.length === 0) return matches;
|
|
495
|
+
const exact = matches.findIndex((command) => command.name === prefix);
|
|
496
|
+
if (exact <= 0) return matches;
|
|
497
|
+
const exactMatch = matches[exact];
|
|
498
|
+
if (!exactMatch) return matches;
|
|
499
|
+
return [exactMatch, ...matches.slice(0, exact), ...matches.slice(exact + 1)];
|
|
500
|
+
}
|
|
501
|
+
__name(matchSlashCommands, "matchSlashCommands");
|
|
502
|
+
var CommandNameCollisionError = class extends RegistryCollisionError {
|
|
503
|
+
static {
|
|
504
|
+
__name(this, "CommandNameCollisionError");
|
|
505
|
+
}
|
|
506
|
+
constructor(name) {
|
|
507
|
+
super(
|
|
508
|
+
"SlashCommands",
|
|
509
|
+
name,
|
|
510
|
+
`/${name} is registered by the kernel AND by this host. One of them would silently never run, and which depends on merge order \u2014 rename one.`
|
|
511
|
+
);
|
|
512
|
+
this.name = "CommandNameCollisionError";
|
|
513
|
+
}
|
|
514
|
+
};
|
|
515
|
+
var HOST_OWNED_COMMAND_NAMES = ["skills", "agents", "goal"];
|
|
516
|
+
function mergeHostCommands(descriptors, locals = CLI_LOCAL_COMMANDS) {
|
|
517
|
+
const localNames = new Set(locals.map((c) => c.name));
|
|
518
|
+
const owned = new Set(HOST_OWNED_COMMAND_NAMES);
|
|
519
|
+
const fromKernel = descriptors.filter((descriptor) => !owned.has(descriptor.name));
|
|
520
|
+
for (const descriptor of fromKernel) {
|
|
521
|
+
if (localNames.has(descriptor.name)) throw new CommandNameCollisionError(descriptor.name);
|
|
522
|
+
}
|
|
523
|
+
return [
|
|
524
|
+
...locals,
|
|
525
|
+
...fromKernel.map(
|
|
526
|
+
(descriptor) => ({
|
|
527
|
+
name: descriptor.name,
|
|
528
|
+
description: descriptor.description,
|
|
529
|
+
help: {
|
|
530
|
+
// An arbitrary JSON Schema does not declare positional CLI syntax.
|
|
531
|
+
usage: [`/${descriptor.name}${descriptor.args ? " [arguments]" : ""}`],
|
|
532
|
+
...descriptor.hint ? { details: [descriptor.hint] } : {}
|
|
533
|
+
},
|
|
534
|
+
action: /* @__PURE__ */ __name((_ctx, args) => ({
|
|
535
|
+
kind: "host-command",
|
|
536
|
+
name: descriptor.name,
|
|
537
|
+
args
|
|
538
|
+
}), "action")
|
|
539
|
+
})
|
|
540
|
+
)
|
|
541
|
+
];
|
|
542
|
+
}
|
|
543
|
+
__name(mergeHostCommands, "mergeHostCommands");
|
|
544
|
+
function renderOutcome(outcome) {
|
|
545
|
+
switch (outcome.kind) {
|
|
546
|
+
case "ack":
|
|
547
|
+
return outcome.message;
|
|
548
|
+
case "prompt":
|
|
549
|
+
return outcome.text;
|
|
550
|
+
case "refused":
|
|
551
|
+
return outcome.reason;
|
|
552
|
+
case "report": {
|
|
553
|
+
if (outcome.rows.length === 0) return `${outcome.title}: none.`;
|
|
554
|
+
const columns = [...new Set(outcome.rows.flatMap((r) => Object.keys(r)))];
|
|
555
|
+
return [
|
|
556
|
+
`${outcome.title} (${outcome.rows.length}):`,
|
|
557
|
+
...outcome.rows.map(
|
|
558
|
+
(row) => ` ${columns.map((c) => row[c] === null || row[c] === void 0 ? "-" : String(row[c])).join(" ")}`
|
|
559
|
+
)
|
|
560
|
+
].join("\n");
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
__name(renderOutcome, "renderOutcome");
|
|
565
|
+
function hostCommandNames(descriptors = kernelCommandDescriptors(), locals = CLI_LOCAL_COMMANDS) {
|
|
566
|
+
return mergeHostCommands(descriptors, locals).map((c) => c.name);
|
|
567
|
+
}
|
|
568
|
+
__name(hostCommandNames, "hostCommandNames");
|
|
569
|
+
function kernelCommandDescriptors() {
|
|
570
|
+
return kernelHostCommands({}).map(({ handler: _handler, ...rest }) => rest);
|
|
571
|
+
}
|
|
572
|
+
__name(kernelCommandDescriptors, "kernelCommandDescriptors");
|
|
573
|
+
function parseSlash(line) {
|
|
574
|
+
const trimmed = line.trim();
|
|
575
|
+
if (!trimmed.startsWith("/")) return null;
|
|
576
|
+
const [name, ...args] = trimmed.slice(1).split(/\s+/);
|
|
577
|
+
if (!name) return null;
|
|
578
|
+
return { name, args };
|
|
579
|
+
}
|
|
580
|
+
__name(parseSlash, "parseSlash");
|
|
581
|
+
function commandHelp(ctx, args) {
|
|
582
|
+
const name = args[0]?.replace(/^\//, "");
|
|
583
|
+
if (args.length !== 1 || !name) {
|
|
584
|
+
return {
|
|
585
|
+
kind: "message",
|
|
586
|
+
role: "system",
|
|
587
|
+
content: "Usage: /help [command]. For example: /help permissions."
|
|
588
|
+
};
|
|
589
|
+
}
|
|
590
|
+
const command = (ctx.builtins ?? CLI_LOCAL_COMMANDS).find((entry) => entry.name === name);
|
|
591
|
+
if (command) {
|
|
592
|
+
const reason = command.unavailable?.(ctx);
|
|
593
|
+
return {
|
|
594
|
+
kind: "message",
|
|
595
|
+
role: "system",
|
|
596
|
+
content: [
|
|
597
|
+
`/${command.name}`,
|
|
598
|
+
command.description,
|
|
599
|
+
"",
|
|
600
|
+
"Usage:",
|
|
601
|
+
...(command.help?.usage ?? [`/${command.name}`]).map((usage) => ` ${usage}`),
|
|
602
|
+
...command.help?.details?.length ? ["", ...command.help.details] : [],
|
|
603
|
+
...reason ? ["", `Unavailable: ${reason}`] : []
|
|
604
|
+
].join("\n")
|
|
605
|
+
};
|
|
606
|
+
}
|
|
607
|
+
const user = ctx.userCommands.find((entry) => entry.name === name);
|
|
608
|
+
if (user) {
|
|
609
|
+
const acceptsArguments = user.template.includes(ARGUMENTS_TOKEN);
|
|
610
|
+
return {
|
|
611
|
+
kind: "message",
|
|
612
|
+
role: "system",
|
|
613
|
+
content: [
|
|
614
|
+
`/${user.name}`,
|
|
615
|
+
user.description,
|
|
616
|
+
"",
|
|
617
|
+
...user.problem ? [] : [
|
|
618
|
+
"Usage:",
|
|
619
|
+
` /${user.name}${acceptsArguments ? " [arguments]" : ""}`,
|
|
620
|
+
"",
|
|
621
|
+
"Running this command sends its saved prompt to the model."
|
|
622
|
+
],
|
|
623
|
+
`${user.source === "project" ? "Project command" : "User command (all projects)"}: ${user.path}`,
|
|
624
|
+
...user.problem ? [`Unavailable: ${user.problem}`] : []
|
|
625
|
+
].join("\n")
|
|
626
|
+
};
|
|
627
|
+
}
|
|
628
|
+
return {
|
|
629
|
+
kind: "message",
|
|
630
|
+
role: "system",
|
|
631
|
+
content: `Unknown command: /${name}. Use /help to browse available commands.`
|
|
632
|
+
};
|
|
633
|
+
}
|
|
634
|
+
__name(commandHelp, "commandHelp");
|
|
635
|
+
var CLI_LOCAL_COMMANDS = [
|
|
636
|
+
{
|
|
637
|
+
name: "setup",
|
|
638
|
+
description: "Check provider installation and access; install optional CLIs or connect.",
|
|
639
|
+
action: /* @__PURE__ */ __name(() => ({ kind: "provider-setup" }), "action")
|
|
640
|
+
},
|
|
641
|
+
{
|
|
642
|
+
name: "config",
|
|
643
|
+
description: "View configuration and change model, reasoning, permissions and reply limits.",
|
|
644
|
+
help: {
|
|
645
|
+
usage: [
|
|
646
|
+
"/config",
|
|
647
|
+
"/config sources",
|
|
648
|
+
"/config limits [tokens|iterations|time] [value]",
|
|
649
|
+
"/config limits unlimited",
|
|
650
|
+
"/config triggers [on|off|list]"
|
|
651
|
+
],
|
|
652
|
+
details: [
|
|
653
|
+
'/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.'
|
|
654
|
+
]
|
|
655
|
+
},
|
|
656
|
+
action: /* @__PURE__ */ __name((ctx, args) => {
|
|
657
|
+
if (args.length === 0) return { kind: "settings-picker" };
|
|
658
|
+
if (args[0] === "limits") return turnLimitsAction(args.slice(1));
|
|
659
|
+
if (args[0] === "triggers") {
|
|
660
|
+
const setting = (args[1] ?? "list").toLowerCase();
|
|
661
|
+
if (args.length <= 2 && (setting === "on" || setting === "off" || setting === "list"))
|
|
662
|
+
return { kind: "composer-triggers", setting };
|
|
663
|
+
return {
|
|
664
|
+
kind: "message",
|
|
665
|
+
role: "system",
|
|
666
|
+
content: "Usage: /config triggers [on|off|list]"
|
|
667
|
+
};
|
|
668
|
+
}
|
|
669
|
+
return {
|
|
670
|
+
kind: "message",
|
|
671
|
+
role: "system",
|
|
672
|
+
content: args.join(" ") === "sources" ? renderConfigDebug(ctx.configDebug) : "Usage: /config [sources|limits|triggers]"
|
|
673
|
+
};
|
|
674
|
+
}, "action")
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
name: "settings",
|
|
678
|
+
description: "View current settings and change model, reasoning or permissions.",
|
|
679
|
+
action: /* @__PURE__ */ __name(() => ({ kind: "settings-picker" }), "action")
|
|
680
|
+
},
|
|
681
|
+
{
|
|
682
|
+
name: "peers",
|
|
683
|
+
description: "Find and message other live terminals in this project.",
|
|
684
|
+
help: { usage: ["/peers [list|on|off]", "/peers send <ref> <message>"] },
|
|
685
|
+
action: /* @__PURE__ */ __name((_ctx, args) => ({ kind: "peers", args }), "action")
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
name: "agents",
|
|
689
|
+
description: "Inspect delegated agents; /agents available lists configured agents, /agents batches lists past and running batches of delegated work.",
|
|
690
|
+
help: { usage: ["/agents [running|available|batches]"] },
|
|
691
|
+
// The subcommands are the delegation UI's (`agentsSlashCommand`): App hands
|
|
692
|
+
// it the arguments and renders what it answers, usage line included.
|
|
693
|
+
action: /* @__PURE__ */ __name((_ctx, args) => ({ kind: "agents", args }), "action")
|
|
694
|
+
},
|
|
695
|
+
{
|
|
696
|
+
name: "goal",
|
|
697
|
+
description: "Manage this conversation\u2019s goal and automatic continuation.",
|
|
698
|
+
help: {
|
|
699
|
+
usage: [
|
|
700
|
+
"/goal",
|
|
701
|
+
"/goal status",
|
|
702
|
+
"/goal set [objective]",
|
|
703
|
+
"/goal edit [objective]",
|
|
704
|
+
"/goal pause|resume|clear"
|
|
705
|
+
],
|
|
706
|
+
details: [
|
|
707
|
+
"Set and edit open an editor when no objective is supplied. Direct /goal <objective> also creates a goal.",
|
|
708
|
+
"Creating or resuming a goal enables automatic work. Pausing or clearing stops future automatic replies."
|
|
709
|
+
]
|
|
710
|
+
},
|
|
711
|
+
action: /* @__PURE__ */ __name((_ctx, args) => {
|
|
712
|
+
if (args.length === 0) return { kind: "goal-picker" };
|
|
713
|
+
if (args.length === 1 && args[0] === "status") {
|
|
714
|
+
return { kind: "host-command", name: "goal", args: [] };
|
|
715
|
+
}
|
|
716
|
+
if (args.length === 1 && (args[0] === "set" || args[0] === "edit")) {
|
|
717
|
+
return { kind: "goal-editor", edit: args[0] === "edit" };
|
|
718
|
+
}
|
|
719
|
+
return { kind: "host-command", name: "goal", args };
|
|
720
|
+
}, "action")
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
name: "schedule",
|
|
724
|
+
description: "Scheduled jobs that run while namzu is closed: list, confirm, pause, run, add.",
|
|
725
|
+
help: {
|
|
726
|
+
usage: [
|
|
727
|
+
"/schedule",
|
|
728
|
+
"/schedule confirm|pause|resume|run|remove <job>",
|
|
729
|
+
'/schedule add <name> "<when>" <read-only|edit-in-folder> <prompt\u2026>'
|
|
730
|
+
],
|
|
731
|
+
details: [
|
|
732
|
+
"A run waiting for your approval is answered with /resume of its conversation in its folder.",
|
|
733
|
+
"The scheduler itself is installed with `namzu schedule install`."
|
|
734
|
+
]
|
|
735
|
+
},
|
|
736
|
+
action: /* @__PURE__ */ __name((_ctx, args) => ({ kind: "host-command", name: "schedule", args }), "action")
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
name: "browser",
|
|
740
|
+
description: "The browser this conversation drives: engine, profile, site rules; switch profile.",
|
|
741
|
+
help: {
|
|
742
|
+
usage: ["/browser", "/browser profile <name>"],
|
|
743
|
+
details: [
|
|
744
|
+
"A profile holds your sign-ins; sign in once with `namzu browser login <profile> <url>`.",
|
|
745
|
+
"Site rules come from `browser.sites` in your config."
|
|
746
|
+
]
|
|
747
|
+
},
|
|
748
|
+
action: /* @__PURE__ */ __name((_ctx, args) => ({ kind: "browser", args }), "action")
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
name: "loop",
|
|
752
|
+
description: "Re-send a prompt to this conversation on an interval, between replies.",
|
|
753
|
+
help: {
|
|
754
|
+
usage: ["/loop <interval> <prompt or /command>", "/loop list", "/loop stop <id>|all"],
|
|
755
|
+
details: [
|
|
756
|
+
"5m, 1h, or a five-field cron expression. Fires once when idle, never once per missed interval; expires after 7 days."
|
|
757
|
+
]
|
|
758
|
+
},
|
|
759
|
+
action: /* @__PURE__ */ __name((_ctx, args) => ({ kind: "host-command", name: "loop", args }), "action")
|
|
760
|
+
},
|
|
761
|
+
{
|
|
762
|
+
name: "help",
|
|
763
|
+
description: "Browse commands, or show usage with /help <command>.",
|
|
764
|
+
help: {
|
|
765
|
+
usage: ["/help", "/help <command>"],
|
|
766
|
+
details: [
|
|
767
|
+
"Without a name, opens the command menu. With a name, shows help without running the command."
|
|
768
|
+
]
|
|
769
|
+
},
|
|
770
|
+
action: /* @__PURE__ */ __name((ctx, args) => {
|
|
771
|
+
if (args.length > 0) return commandHelp(ctx, args);
|
|
772
|
+
return {
|
|
773
|
+
kind: "command-picker",
|
|
774
|
+
commands: [
|
|
775
|
+
...(ctx.builtins ?? CLI_LOCAL_COMMANDS).filter((command) => command.discoverable !== false).map((command) => ({
|
|
776
|
+
name: command.name,
|
|
777
|
+
description: command.description,
|
|
778
|
+
...command.unavailable?.(ctx) ? { problem: command.unavailable(ctx) } : {}
|
|
779
|
+
})),
|
|
780
|
+
...ctx.userCommands.map((command) => ({
|
|
781
|
+
name: command.name,
|
|
782
|
+
description: command.description,
|
|
783
|
+
...command.problem ? { problem: command.problem } : {}
|
|
784
|
+
}))
|
|
785
|
+
]
|
|
786
|
+
};
|
|
787
|
+
}, "action")
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
name: "feedback",
|
|
791
|
+
help: { usage: ["/feedback", "/feedback good|bad [note]"] },
|
|
792
|
+
unavailable: /* @__PURE__ */ __name((ctx) => ctx.lastAssistantMessageId() ? void 0 : "Nothing to rate yet. Wait for an assistant answer.", "unavailable"),
|
|
793
|
+
description: "Rate the last answer; choose good/bad or add an optional note.",
|
|
794
|
+
action: /* @__PURE__ */ __name((ctx, args) => {
|
|
795
|
+
if (args.length === 0) {
|
|
796
|
+
const messageId2 = ctx.lastAssistantMessageId();
|
|
797
|
+
return messageId2 ? { kind: "feedback-picker", messageId: messageId2 } : {
|
|
798
|
+
kind: "message",
|
|
799
|
+
role: "system",
|
|
800
|
+
content: "Nothing to rate yet \u2014 /feedback applies to the last answer in this reply."
|
|
801
|
+
};
|
|
802
|
+
}
|
|
803
|
+
const [rating, ...rest] = args;
|
|
804
|
+
if (rating !== "good" && rating !== "bad") {
|
|
805
|
+
return {
|
|
806
|
+
kind: "message",
|
|
807
|
+
role: "system",
|
|
808
|
+
content: "Usage: /feedback good|bad [note]"
|
|
809
|
+
};
|
|
810
|
+
}
|
|
811
|
+
const messageId = ctx.lastAssistantMessageId();
|
|
812
|
+
if (!messageId) {
|
|
813
|
+
return {
|
|
814
|
+
kind: "message",
|
|
815
|
+
role: "system",
|
|
816
|
+
content: "Nothing to rate yet \u2014 /feedback applies to the last answer in this reply."
|
|
817
|
+
};
|
|
818
|
+
}
|
|
819
|
+
const note = rest.join(" ").trim();
|
|
820
|
+
return { kind: "feedback", rating, messageId, ...note ? { note } : {} };
|
|
821
|
+
}, "action")
|
|
822
|
+
},
|
|
823
|
+
{
|
|
824
|
+
name: "clear",
|
|
825
|
+
description: "Clear the terminal and start a fresh conversation.",
|
|
826
|
+
action: /* @__PURE__ */ __name(() => ({ kind: "new-conversation", clearScreen: true }), "action")
|
|
827
|
+
},
|
|
828
|
+
{
|
|
829
|
+
name: "new",
|
|
830
|
+
description: "Start a fresh conversation without clearing the terminal.",
|
|
831
|
+
action: /* @__PURE__ */ __name(() => ({ kind: "new-conversation", clearScreen: false }), "action")
|
|
832
|
+
},
|
|
833
|
+
{
|
|
834
|
+
name: "archive",
|
|
835
|
+
description: "Archive this conversation and exit after confirmation.",
|
|
836
|
+
action: /* @__PURE__ */ __name(() => ({ kind: "archive-picker" }), "action")
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
name: "unarchive",
|
|
840
|
+
description: "Restore an archived conversation in this project.",
|
|
841
|
+
action: /* @__PURE__ */ __name(() => ({ kind: "unarchive" }), "action")
|
|
842
|
+
},
|
|
843
|
+
{
|
|
844
|
+
name: "exit",
|
|
845
|
+
description: "Exit namzu.",
|
|
846
|
+
action: /* @__PURE__ */ __name(() => ({ kind: "exit" }), "action")
|
|
847
|
+
},
|
|
848
|
+
{
|
|
849
|
+
name: "rename",
|
|
850
|
+
help: { usage: ["/rename [name]", "/rename clear"] },
|
|
851
|
+
description: "Rename this conversation; opens an editor when no name is supplied. /rename clear removes the saved name.",
|
|
852
|
+
action: renameConversationAction
|
|
853
|
+
},
|
|
854
|
+
{
|
|
855
|
+
name: "fork",
|
|
856
|
+
description: "Continue in a copy of this conversation, leaving the original where it is.",
|
|
857
|
+
action: /* @__PURE__ */ __name(() => ({ kind: "fork" }), "action")
|
|
858
|
+
},
|
|
859
|
+
{
|
|
860
|
+
name: "worktree",
|
|
861
|
+
help: {
|
|
862
|
+
usage: ["/worktree [list|create [name]|fork [name]|resume <name>]"]
|
|
863
|
+
},
|
|
864
|
+
description: "List or create separate Git checkouts; fork this conversation into one.",
|
|
865
|
+
action: /* @__PURE__ */ __name((_ctx, args) => ({ kind: "worktree", args }), "action")
|
|
866
|
+
},
|
|
867
|
+
{
|
|
868
|
+
name: "add-dir",
|
|
869
|
+
help: {
|
|
870
|
+
usage: ["/add-dir [path]"],
|
|
871
|
+
details: ["Without a path, lists added directories. Paths may contain spaces."]
|
|
872
|
+
},
|
|
873
|
+
description: "Let the file tools reach another directory in this conversation: /add-dir <path>. Alone, list them.",
|
|
874
|
+
action: /* @__PURE__ */ __name((ctx, args) => {
|
|
875
|
+
const path = args.join(" ").trim();
|
|
876
|
+
if (path.length === 0) {
|
|
877
|
+
const dirs = ctx.directories?.() ?? [];
|
|
878
|
+
return {
|
|
879
|
+
kind: "message",
|
|
880
|
+
role: "system",
|
|
881
|
+
content: dirs.length === 0 ? "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 conversation, after asking when it is outside the working directory; `additionalDirectories` in the config file adds one for every session." : `Added directories (reachable by absolute path, bound into the sandbox):
|
|
882
|
+
${dirs.map((d) => ` ${d}`).join("\n")}`
|
|
883
|
+
};
|
|
884
|
+
}
|
|
885
|
+
return { kind: "add-dir", path };
|
|
886
|
+
}, "action")
|
|
887
|
+
},
|
|
888
|
+
{
|
|
889
|
+
name: "restore",
|
|
890
|
+
help: {
|
|
891
|
+
usage: ["/restore [number]"],
|
|
892
|
+
details: ["Run /restore to list restore points before choosing one."]
|
|
893
|
+
},
|
|
894
|
+
description: "Put files back to how they were before a reply: /restore lists the restore points, /restore N restores.",
|
|
895
|
+
action: /* @__PURE__ */ __name((_ctx, args) => {
|
|
896
|
+
const raw = args[0]?.trim();
|
|
897
|
+
if (!raw) return { kind: "restore" };
|
|
898
|
+
const turn = Number.parseInt(raw, 10);
|
|
899
|
+
if (!Number.isInteger(turn) || turn < 1 || String(turn) !== raw) {
|
|
900
|
+
return {
|
|
901
|
+
kind: "message",
|
|
902
|
+
role: "system",
|
|
903
|
+
content: `/restore takes a number from the list: /restore 3. Not: ${raw}`
|
|
904
|
+
};
|
|
905
|
+
}
|
|
906
|
+
return { kind: "restore", turn };
|
|
907
|
+
}, "action")
|
|
908
|
+
},
|
|
909
|
+
{
|
|
910
|
+
name: "memory",
|
|
911
|
+
help: {
|
|
912
|
+
usage: [
|
|
913
|
+
"/memory [show|list]",
|
|
914
|
+
"/memory add [--type user|feedback|project|reference] <text>",
|
|
915
|
+
"/memory --user add <text>",
|
|
916
|
+
"/memory import-notes"
|
|
917
|
+
],
|
|
918
|
+
details: [
|
|
919
|
+
"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.",
|
|
920
|
+
"Direct /memory <text> also saves a project note. To save a reserved word as a note, use /memory add show.",
|
|
921
|
+
"import-notes copies every top-level bullet of the project\u2019s 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."
|
|
922
|
+
]
|
|
923
|
+
},
|
|
924
|
+
description: "Show memory, or save a typed project memory with /memory add <text>. Use /memory --user add <text> for every project.",
|
|
925
|
+
action: /* @__PURE__ */ __name((_ctx, args) => {
|
|
926
|
+
const user = args[0] === "--user";
|
|
927
|
+
const memoryArgs = user ? args.slice(1) : args;
|
|
928
|
+
const text = memoryArgs.join(" ").trim();
|
|
929
|
+
if (text.length === 0 || ["show", "list"].includes(text.toLowerCase())) {
|
|
930
|
+
return { kind: "show-memory" };
|
|
931
|
+
}
|
|
932
|
+
if (text.toLowerCase() === "import-notes") {
|
|
933
|
+
if (user) {
|
|
934
|
+
return {
|
|
935
|
+
kind: "message",
|
|
936
|
+
role: "system",
|
|
937
|
+
content: "import-notes copies project notes; the curated file for all projects stays as it is."
|
|
938
|
+
};
|
|
939
|
+
}
|
|
940
|
+
return { kind: "import-notes" };
|
|
941
|
+
}
|
|
942
|
+
if (memoryArgs[0]?.toLowerCase() === "add") {
|
|
943
|
+
let rest = memoryArgs.slice(1);
|
|
944
|
+
let memoryType;
|
|
945
|
+
if (rest[0] === "--type") {
|
|
946
|
+
const requested = rest[1]?.toLowerCase();
|
|
947
|
+
if (!isMemoryType(requested) || user) {
|
|
948
|
+
return {
|
|
949
|
+
kind: "message",
|
|
950
|
+
role: "system",
|
|
951
|
+
content: user ? "--type applies to project memories; /memory --user add appends to the curated file for all projects." : "Usage: /memory add --type user|feedback|project|reference <text>."
|
|
952
|
+
};
|
|
953
|
+
}
|
|
954
|
+
memoryType = requested;
|
|
955
|
+
rest = rest.slice(2);
|
|
956
|
+
}
|
|
957
|
+
const fact = rest.join(" ").trim();
|
|
958
|
+
if (fact.length === 0) {
|
|
959
|
+
return {
|
|
960
|
+
kind: "message",
|
|
961
|
+
role: "system",
|
|
962
|
+
content: "Usage: /memory add <text> or /memory --user add <text>. /memory show displays saved memory."
|
|
963
|
+
};
|
|
964
|
+
}
|
|
965
|
+
return {
|
|
966
|
+
kind: "remember",
|
|
967
|
+
text: fact,
|
|
968
|
+
scope: user ? "user" : "project",
|
|
969
|
+
...memoryType ? { memoryType } : {}
|
|
970
|
+
};
|
|
971
|
+
}
|
|
972
|
+
return { kind: "remember", text, scope: user ? "user" : "project" };
|
|
973
|
+
}, "action")
|
|
974
|
+
},
|
|
975
|
+
{
|
|
976
|
+
name: "skills",
|
|
977
|
+
help: {
|
|
978
|
+
usage: [
|
|
979
|
+
"/skills",
|
|
980
|
+
"/skills list",
|
|
981
|
+
"/skills new [what it should do]",
|
|
982
|
+
"/skills save [name]",
|
|
983
|
+
"/skills save off|on",
|
|
984
|
+
"/skills <name>"
|
|
985
|
+
],
|
|
986
|
+
details: [
|
|
987
|
+
"/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.",
|
|
988
|
+
"/skills save turns what this conversation just did into a skill, generalised and without secrets or tool output, ending on the same confirmation screen.",
|
|
989
|
+
"/skills save off stops the proposal printed after a multi-step task, in your user config; /skills save on turns it back on."
|
|
990
|
+
]
|
|
991
|
+
},
|
|
992
|
+
description: "Choose an available skill; /skills list shows them all, /skills new makes one.",
|
|
993
|
+
action: /* @__PURE__ */ __name((_ctx, args) => {
|
|
994
|
+
const choice = args.join(" ").trim();
|
|
995
|
+
if (choice.length === 0) return { kind: "skill-picker" };
|
|
996
|
+
if (choice.toLowerCase() === "list") return { kind: "list-skills" };
|
|
997
|
+
if (args[0]?.toLowerCase() === "new")
|
|
998
|
+
return { kind: "new-skill", idea: args.slice(1).join(" ").trim() };
|
|
999
|
+
if (args[0]?.toLowerCase() === "save") {
|
|
1000
|
+
const rest = args.slice(1).join(" ").trim();
|
|
1001
|
+
const word = rest.toLowerCase();
|
|
1002
|
+
if (word === "off" || word === "on") return { kind: "skill-suggestions", on: word === "on" };
|
|
1003
|
+
if (rest.length === 0) return { kind: "save-skill" };
|
|
1004
|
+
if (!SKILL_NAME_PATTERN.test(rest) || rest.length > SKILL_NAME_MAX_CHARS) {
|
|
1005
|
+
return {
|
|
1006
|
+
kind: "message",
|
|
1007
|
+
role: "system",
|
|
1008
|
+
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).`
|
|
1009
|
+
};
|
|
1010
|
+
}
|
|
1011
|
+
return { kind: "save-skill", name: rest };
|
|
1012
|
+
}
|
|
1013
|
+
return { kind: "load-skill", name: choice };
|
|
1014
|
+
}, "action")
|
|
1015
|
+
},
|
|
1016
|
+
{
|
|
1017
|
+
name: "plugins",
|
|
1018
|
+
description: "Inspect plugins, turn them on or off for this conversation, or remember it after restart.",
|
|
1019
|
+
help: {
|
|
1020
|
+
usage: ["/plugins", "/plugins list", "/plugins <name>"],
|
|
1021
|
+
details: [
|
|
1022
|
+
"Choose a plugin to inspect its contributions or turn it on or off for this conversation. Changes wait until the current reply has finished. Use Keep enabled/disabled after restart to remember its state for future conversations and model switches. Plugin loading must first be enabled in configuration."
|
|
1023
|
+
]
|
|
1024
|
+
},
|
|
1025
|
+
action: /* @__PURE__ */ __name((_ctx, args) => args.length > 1 ? {
|
|
1026
|
+
kind: "message",
|
|
1027
|
+
role: "system",
|
|
1028
|
+
content: "Usage: /plugins [list|name]"
|
|
1029
|
+
} : {
|
|
1030
|
+
kind: "plugins",
|
|
1031
|
+
list: args[0] === "list",
|
|
1032
|
+
...args[0] && args[0] !== "list" ? { name: args[0] } : {}
|
|
1033
|
+
}, "action")
|
|
1034
|
+
},
|
|
1035
|
+
{
|
|
1036
|
+
name: "resume",
|
|
1037
|
+
description: "Continue this conversation\u2019s paused reply, or, when it has none, resume a past conversation in this folder.",
|
|
1038
|
+
action: /* @__PURE__ */ __name(() => ({ kind: "resume" }), "action")
|
|
1039
|
+
},
|
|
1040
|
+
{
|
|
1041
|
+
name: "abandon",
|
|
1042
|
+
description: "Close this conversation\u2019s paused or stopped reply without resuming it, so the next prompt starts a new one.",
|
|
1043
|
+
help: { usage: ["/abandon [reason]"] },
|
|
1044
|
+
action: /* @__PURE__ */ __name((_ctx, args) => ({
|
|
1045
|
+
kind: "abandon",
|
|
1046
|
+
reason: args.join(" ").trim() || "Abandoned by the operator with /abandon."
|
|
1047
|
+
}), "action")
|
|
1048
|
+
},
|
|
1049
|
+
{
|
|
1050
|
+
name: "model",
|
|
1051
|
+
description: "Choose a model for the current provider, or change providers.",
|
|
1052
|
+
help: {
|
|
1053
|
+
usage: ["/model", "/model <model-or-provider/model>"],
|
|
1054
|
+
details: [
|
|
1055
|
+
"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.",
|
|
1056
|
+
"Press p in the model picker to change providers. Normal selections are saved for future launches; temporary credentials keep the selection in this conversation."
|
|
1057
|
+
]
|
|
1058
|
+
},
|
|
1059
|
+
action: /* @__PURE__ */ __name(() => ({ kind: "repick" }), "action")
|
|
1060
|
+
},
|
|
1061
|
+
{
|
|
1062
|
+
name: "login",
|
|
1063
|
+
description: "Sign in with a Claude or Codex subscription.",
|
|
1064
|
+
help: {
|
|
1065
|
+
usage: ["/login", "/login <callback-address-or-code>"],
|
|
1066
|
+
details: [
|
|
1067
|
+
"Start sign-in with /login, then paste the callback address or code when requested."
|
|
1068
|
+
]
|
|
1069
|
+
},
|
|
1070
|
+
action: /* @__PURE__ */ __name((_ctx, args) => isCompletionArgument(args) ? { kind: "login", pasted: args.join(" ").trim() } : { kind: "login" }, "action")
|
|
1071
|
+
},
|
|
1072
|
+
{
|
|
1073
|
+
name: "logout",
|
|
1074
|
+
help: { usage: ["/logout [claude|codex|gemini|all]"] },
|
|
1075
|
+
description: "Remove a Namzu-owned credential: /logout [claude|codex|gemini|all].",
|
|
1076
|
+
action: /* @__PURE__ */ __name((_ctx, args) => {
|
|
1077
|
+
const target = args.join(" ").trim().toLowerCase();
|
|
1078
|
+
if (target.length === 0) return { kind: "logout" };
|
|
1079
|
+
if (target === "claude" || target === "anthropic") {
|
|
1080
|
+
return { kind: "logout", target: "anthropic" };
|
|
1081
|
+
}
|
|
1082
|
+
if (target === "codex" || target === "chatgpt") return { kind: "logout", target: "codex" };
|
|
1083
|
+
if (target === "gemini" || target === "google") return { kind: "logout", target: "google" };
|
|
1084
|
+
if (target === "all") return { kind: "logout", target: "all" };
|
|
1085
|
+
return {
|
|
1086
|
+
kind: "message",
|
|
1087
|
+
role: "system",
|
|
1088
|
+
content: "Usage: /logout [claude|codex|gemini|all]"
|
|
1089
|
+
};
|
|
1090
|
+
}, "action")
|
|
1091
|
+
},
|
|
1092
|
+
{
|
|
1093
|
+
name: "cost",
|
|
1094
|
+
help: { usage: ["/cost [details]"] },
|
|
1095
|
+
description: "Show usage and cost for the current or latest reply.",
|
|
1096
|
+
action: /* @__PURE__ */ __name((ctx, args) => reportCommand("cost", args, (details) => renderCost(ctx.usage, ctx.compaction, details)), "action")
|
|
1097
|
+
},
|
|
1098
|
+
{
|
|
1099
|
+
name: "jobs",
|
|
1100
|
+
description: "Inspect background shells, read output, and stop a running shell.",
|
|
1101
|
+
help: { usage: ["/jobs", "/jobs list"] },
|
|
1102
|
+
action: /* @__PURE__ */ __name((ctx, args) => args.length === 0 ? { kind: "jobs" } : args.length === 1 && args[0] === "list" ? { kind: "message", role: "system", content: renderJobs(ctx.jobs()) } : { kind: "message", role: "system", content: "Usage: /jobs [list]" }, "action")
|
|
1103
|
+
},
|
|
1104
|
+
{
|
|
1105
|
+
name: "release-notes",
|
|
1106
|
+
help: { usage: ["/release-notes [version]"] },
|
|
1107
|
+
description: "Show what changed in the version that is running: /release-notes [version].",
|
|
1108
|
+
action: /* @__PURE__ */ __name((_ctx, args) => ({
|
|
1109
|
+
kind: "message",
|
|
1110
|
+
role: "system",
|
|
1111
|
+
content: renderReleaseNotes(readChangelog(), args[0]?.trim() || void 0)
|
|
1112
|
+
}), "action")
|
|
1113
|
+
},
|
|
1114
|
+
{
|
|
1115
|
+
name: "hooks",
|
|
1116
|
+
description: "List the shell hooks this conversation runs, by event.",
|
|
1117
|
+
action: /* @__PURE__ */ __name((ctx) => ({
|
|
1118
|
+
kind: "message",
|
|
1119
|
+
role: "system",
|
|
1120
|
+
content: renderHooks(ctx.hooks?.())
|
|
1121
|
+
}), "action")
|
|
1122
|
+
},
|
|
1123
|
+
{
|
|
1124
|
+
name: "context",
|
|
1125
|
+
help: { usage: ["/context [details]"] },
|
|
1126
|
+
description: "Show context usage and automatic cleanup.",
|
|
1127
|
+
action: /* @__PURE__ */ __name((ctx, args) => reportCommand(
|
|
1128
|
+
"context",
|
|
1129
|
+
args,
|
|
1130
|
+
(details) => renderContext(ctx.usage, ctx.compaction, details)
|
|
1131
|
+
), "action")
|
|
1132
|
+
},
|
|
1133
|
+
{
|
|
1134
|
+
name: "review",
|
|
1135
|
+
help: {
|
|
1136
|
+
usage: ["/review [instructions]"],
|
|
1137
|
+
details: [
|
|
1138
|
+
"Without instructions, opens the review target menu. Starting a review uses the selected model."
|
|
1139
|
+
]
|
|
1140
|
+
},
|
|
1141
|
+
description: "Choose a review target, or provide custom instructions: /review [instructions].",
|
|
1142
|
+
action: /* @__PURE__ */ __name((_ctx, args) => {
|
|
1143
|
+
const instructions = args.join(" ").trim();
|
|
1144
|
+
return instructions ? { kind: "review", instructions } : { kind: "review" };
|
|
1145
|
+
}, "action")
|
|
1146
|
+
},
|
|
1147
|
+
{
|
|
1148
|
+
name: "mcp",
|
|
1149
|
+
help: { usage: ["/mcp [tools|details]"] },
|
|
1150
|
+
description: "Show connected tool servers and connection problems.",
|
|
1151
|
+
action: /* @__PURE__ */ __name((ctx, args) => reportCommand("mcp", args, (details) => renderMcp(ctx.mcp(), details), "tools"), "action")
|
|
1152
|
+
},
|
|
1153
|
+
{
|
|
1154
|
+
name: "diff",
|
|
1155
|
+
description: "Show what is uncommitted in this working tree.",
|
|
1156
|
+
action: /* @__PURE__ */ __name(() => ({ kind: "diff" }), "action")
|
|
1157
|
+
},
|
|
1158
|
+
{
|
|
1159
|
+
name: "compact",
|
|
1160
|
+
description: "Summarise the older half of this conversation to free up context.",
|
|
1161
|
+
help: {
|
|
1162
|
+
usage: ["/compact"],
|
|
1163
|
+
details: ["Summarising uses a model call to condense older messages."]
|
|
1164
|
+
},
|
|
1165
|
+
action: /* @__PURE__ */ __name(() => ({ kind: "compact" }), "action")
|
|
1166
|
+
},
|
|
1167
|
+
{
|
|
1168
|
+
name: "copy",
|
|
1169
|
+
description: "Choose the whole latest answer, a code block, or a quote to copy.",
|
|
1170
|
+
action: /* @__PURE__ */ __name(() => ({ kind: "copy" }), "action")
|
|
1171
|
+
},
|
|
1172
|
+
{
|
|
1173
|
+
name: "raw",
|
|
1174
|
+
help: { usage: ["/raw [on|off]"] },
|
|
1175
|
+
description: "Toggle copy-friendly plain transcript rendering: /raw [on|off].",
|
|
1176
|
+
action: /* @__PURE__ */ __name((_ctx, args) => {
|
|
1177
|
+
const choice = args.join(" ").trim().toLowerCase();
|
|
1178
|
+
if (choice.length === 0) return { kind: "raw", enabled: "toggle" };
|
|
1179
|
+
if (choice === "on") return { kind: "raw", enabled: true };
|
|
1180
|
+
if (choice === "off") return { kind: "raw", enabled: false };
|
|
1181
|
+
return {
|
|
1182
|
+
kind: "message",
|
|
1183
|
+
role: "system",
|
|
1184
|
+
content: "Usage: /raw [on|off]"
|
|
1185
|
+
};
|
|
1186
|
+
}, "action")
|
|
1187
|
+
},
|
|
1188
|
+
{
|
|
1189
|
+
name: "export",
|
|
1190
|
+
help: {
|
|
1191
|
+
usage: ["/export [path]"],
|
|
1192
|
+
details: [
|
|
1193
|
+
"Without a path, choose the clipboard or a Markdown file. Existing files are not overwritten. Paths may contain spaces."
|
|
1194
|
+
]
|
|
1195
|
+
},
|
|
1196
|
+
description: "Export this verified conversation to the clipboard or a Markdown file.",
|
|
1197
|
+
action: /* @__PURE__ */ __name((_ctx, args) => {
|
|
1198
|
+
const path = args.join(" ").trim();
|
|
1199
|
+
return path.length > 0 ? { kind: "export", path } : { kind: "export-picker" };
|
|
1200
|
+
}, "action")
|
|
1201
|
+
},
|
|
1202
|
+
{
|
|
1203
|
+
name: "status",
|
|
1204
|
+
help: { usage: ["/status [details|config|tools]"] },
|
|
1205
|
+
description: "Show the model, permissions, workspace and latest cost.",
|
|
1206
|
+
action: /* @__PURE__ */ __name((ctx, args) => {
|
|
1207
|
+
const which = args.join(" ").trim().toLowerCase();
|
|
1208
|
+
if (which === "config") {
|
|
1209
|
+
return {
|
|
1210
|
+
kind: "message",
|
|
1211
|
+
role: "system",
|
|
1212
|
+
content: renderConfigDebug(ctx.configDebug)
|
|
1213
|
+
};
|
|
1214
|
+
}
|
|
1215
|
+
if (which === "tools") {
|
|
1216
|
+
const tools = ctx.availableTools();
|
|
1217
|
+
return {
|
|
1218
|
+
kind: "message",
|
|
1219
|
+
role: "system",
|
|
1220
|
+
content: tools.length === 0 ? "No tools registered yet \u2014 the model may still be connecting." : `Registered tools (${tools.length}):
|
|
1221
|
+
${tools.join("\n ")}`
|
|
1222
|
+
};
|
|
1223
|
+
}
|
|
1224
|
+
if (which.length > 0 && which !== "details") {
|
|
1225
|
+
return {
|
|
1226
|
+
kind: "message",
|
|
1227
|
+
role: "system",
|
|
1228
|
+
content: "Usage: /status [details|config|tools]"
|
|
1229
|
+
};
|
|
1230
|
+
}
|
|
1231
|
+
return {
|
|
1232
|
+
kind: "message",
|
|
1233
|
+
role: "system",
|
|
1234
|
+
content: renderStatus(ctx, which === "details"),
|
|
1235
|
+
...which === "" ? { statusRows: statusRows(ctx) } : {}
|
|
1236
|
+
};
|
|
1237
|
+
}, "action")
|
|
1238
|
+
},
|
|
1239
|
+
{
|
|
1240
|
+
name: "permissions",
|
|
1241
|
+
description: "Choose which actions need your approval.",
|
|
1242
|
+
help: {
|
|
1243
|
+
usage: ["/permissions", "/permissions details", "/permissions <mode>"],
|
|
1244
|
+
details: [
|
|
1245
|
+
"Choose a preset in the menu, or use a typed mode:",
|
|
1246
|
+
...["prompt", "accept-edits", "plan", "auto", "strict"].map(
|
|
1247
|
+
(mode) => ` ${mode}: ${permissionModeLabel(mode)}`
|
|
1248
|
+
),
|
|
1249
|
+
"Changes apply to this conversation. Explicit deny rules and sandbox restrictions still apply."
|
|
1250
|
+
]
|
|
1251
|
+
},
|
|
1252
|
+
action: /* @__PURE__ */ __name((ctx, args) => {
|
|
1253
|
+
if (args.length === 0) return { kind: "permission-mode-picker" };
|
|
1254
|
+
const mode = args.length === 1 ? args[0]?.toLowerCase() : void 0;
|
|
1255
|
+
if (mode === "details") {
|
|
1256
|
+
return {
|
|
1257
|
+
kind: "message",
|
|
1258
|
+
role: "system",
|
|
1259
|
+
content: renderPermissions(ctx.permissions, true)
|
|
1260
|
+
};
|
|
1261
|
+
}
|
|
1262
|
+
if (isPermissionMode(mode)) return { kind: "permission-mode", mode };
|
|
1263
|
+
return {
|
|
1264
|
+
kind: "message",
|
|
1265
|
+
role: "system",
|
|
1266
|
+
content: "Usage: /permissions opens the permission menu. Choose a preset there, or use /permissions details to view rules."
|
|
1267
|
+
};
|
|
1268
|
+
}, "action")
|
|
1269
|
+
},
|
|
1270
|
+
{
|
|
1271
|
+
name: "effort",
|
|
1272
|
+
help: {
|
|
1273
|
+
usage: ["/effort [level|default]"],
|
|
1274
|
+
details: [
|
|
1275
|
+
"Run /effort to see the levels supported by the selected model and usable fallbacks. Changes affect future replies in this conversation."
|
|
1276
|
+
]
|
|
1277
|
+
},
|
|
1278
|
+
description: "Choose reasoning effort for future replies: /effort [level|default].",
|
|
1279
|
+
action: /* @__PURE__ */ __name((ctx, args) => {
|
|
1280
|
+
if (args.length === 0) {
|
|
1281
|
+
if (!ctx.providerSummary) {
|
|
1282
|
+
return {
|
|
1283
|
+
kind: "message",
|
|
1284
|
+
role: "system",
|
|
1285
|
+
content: "No provider is active yet. Pick one with /model before changing reasoning."
|
|
1286
|
+
};
|
|
1287
|
+
}
|
|
1288
|
+
if (ctx.reasoningEffort.levels === void 0) {
|
|
1289
|
+
return {
|
|
1290
|
+
kind: "message",
|
|
1291
|
+
role: "system",
|
|
1292
|
+
content: `${ctx.modelSummary ?? "This model"} has no reasoning levels to choose from.`
|
|
1293
|
+
};
|
|
1294
|
+
}
|
|
1295
|
+
return { kind: "reasoning-effort-picker" };
|
|
1296
|
+
}
|
|
1297
|
+
if (!ctx.providerSummary) {
|
|
1298
|
+
return {
|
|
1299
|
+
kind: "message",
|
|
1300
|
+
role: "system",
|
|
1301
|
+
content: "No provider is active yet. Pick one with /model before changing reasoning."
|
|
1302
|
+
};
|
|
1303
|
+
}
|
|
1304
|
+
const token = args.length === 1 ? args[0]?.toLowerCase() : void 0;
|
|
1305
|
+
if (token === "default") return { kind: "reasoning-effort", effort: null };
|
|
1306
|
+
const offered = ctx.reasoningEffort.levels;
|
|
1307
|
+
if (offered === void 0) {
|
|
1308
|
+
return {
|
|
1309
|
+
kind: "message",
|
|
1310
|
+
role: "system",
|
|
1311
|
+
content: `Reasoning was not changed: ${ctx.modelSummary ?? "this model"} has no reasoning levels to choose from. It keeps the provider default.`
|
|
1312
|
+
};
|
|
1313
|
+
}
|
|
1314
|
+
const effort = offered.find((level) => level === token);
|
|
1315
|
+
if (effort) return { kind: "reasoning-effort", effort };
|
|
1316
|
+
const levels = offered.length > 0 ? offered.join("|") : "<none>";
|
|
1317
|
+
return {
|
|
1318
|
+
kind: "message",
|
|
1319
|
+
role: "system",
|
|
1320
|
+
content: `Usage: /effort [${levels}|default]`
|
|
1321
|
+
};
|
|
1322
|
+
}, "action")
|
|
1323
|
+
},
|
|
1324
|
+
{
|
|
1325
|
+
name: "hypermode",
|
|
1326
|
+
help: {
|
|
1327
|
+
usage: ["/hypermode [on|off]"],
|
|
1328
|
+
details: [
|
|
1329
|
+
"A setting for this conversation, not a reasoning-effort level \u2014 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 model is told so.",
|
|
1330
|
+
"For one message only, start or end that message with the word hypermode: effort pinned the same way for that reply, then back."
|
|
1331
|
+
]
|
|
1332
|
+
},
|
|
1333
|
+
description: "Toggle hypermode for this conversation: /hypermode [on|off].",
|
|
1334
|
+
action: /* @__PURE__ */ __name((_ctx, args) => hypermodeAction(args), "action")
|
|
1335
|
+
},
|
|
1336
|
+
{
|
|
1337
|
+
name: "orchestrate",
|
|
1338
|
+
help: {
|
|
1339
|
+
usage: ["/orchestrate [on|off]"],
|
|
1340
|
+
details: [
|
|
1341
|
+
"Deprecated: the mode is now called hypermode. Does what /hypermode does, after saying so."
|
|
1342
|
+
]
|
|
1343
|
+
},
|
|
1344
|
+
description: "Deprecated: use /hypermode.",
|
|
1345
|
+
action: /* @__PURE__ */ __name((_ctx, args) => hypermodeAction(args, "orchestrate"), "action")
|
|
1346
|
+
},
|
|
1347
|
+
{
|
|
1348
|
+
name: "init",
|
|
1349
|
+
description: "Write an AGENTS.md describing this project to future agents.",
|
|
1350
|
+
help: {
|
|
1351
|
+
usage: ["/init"],
|
|
1352
|
+
details: [
|
|
1353
|
+
"Asks the selected model to read the project and write instructions. Existing instructions are read before changes are proposed."
|
|
1354
|
+
]
|
|
1355
|
+
},
|
|
1356
|
+
action: /* @__PURE__ */ __name((ctx) => {
|
|
1357
|
+
if (!ctx.providerSummary) {
|
|
1358
|
+
return {
|
|
1359
|
+
kind: "message",
|
|
1360
|
+
role: "system",
|
|
1361
|
+
content: "/init asks the agent to read this repository and write the file, so it needs a provider. Run /model to pick one."
|
|
1362
|
+
};
|
|
1363
|
+
}
|
|
1364
|
+
return { kind: "prompt", text: initPrompt(ctx.instructionFiles) };
|
|
1365
|
+
}, "action")
|
|
1366
|
+
}
|
|
1367
|
+
];
|
|
1368
|
+
function initPrompt(instructionFiles) {
|
|
1369
|
+
const existing = instructionFiles.length > 0 ? [
|
|
1370
|
+
"",
|
|
1371
|
+
"This project ALREADY has project instructions, loaded from:",
|
|
1372
|
+
...instructionFiles.map((f) => ` ${f}`),
|
|
1373
|
+
"",
|
|
1374
|
+
"Do not overwrite them. Read them first, then propose specific edits \u2014",
|
|
1375
|
+
"what is now wrong, what is missing \u2014 and make only the changes I agree to."
|
|
1376
|
+
].join("\n") : ["", "This project has no AGENTS.md yet. Create one at the repository root."].join("\n");
|
|
1377
|
+
return [
|
|
1378
|
+
"Write the project instructions that a coding agent joining this repository would need.",
|
|
1379
|
+
"",
|
|
1380
|
+
"Verify every claim against the tree before you write it. Do not describe a",
|
|
1381
|
+
"command you have not found, a layout you have not opened, or a convention you",
|
|
1382
|
+
"have inferred from one file. If you cannot establish something, leave it out \u2014",
|
|
1383
|
+
"an AGENTS.md full of plausible inventions is worse than a short true one,",
|
|
1384
|
+
"because the next agent will follow it.",
|
|
1385
|
+
existing,
|
|
1386
|
+
"",
|
|
1387
|
+
"Cover what a newcomer cannot get from the file listing:",
|
|
1388
|
+
" - what this project is, in a sentence or two",
|
|
1389
|
+
" - the build, test and lint commands that actually work here (check the",
|
|
1390
|
+
" package manifest or task runner rather than assuming the usual ones)",
|
|
1391
|
+
" - the layout, and any part of it that is deliberate rather than incidental",
|
|
1392
|
+
" - conventions the code visibly holds to, with the evidence that shows it",
|
|
1393
|
+
" - anything that would let someone break the project without noticing",
|
|
1394
|
+
"",
|
|
1395
|
+
"Keep it short enough to be read in full. Every line costs context on every",
|
|
1396
|
+
"future turn, so a sentence that says nothing is not free."
|
|
1397
|
+
].join("\n");
|
|
1398
|
+
}
|
|
1399
|
+
__name(initPrompt, "initPrompt");
|
|
1400
|
+
function hypermodeAction(args, via) {
|
|
1401
|
+
const choice = args.join(" ").trim().toLowerCase();
|
|
1402
|
+
const alias = via ? { via } : {};
|
|
1403
|
+
if (choice.length === 0) return { kind: "hypermode", enabled: "toggle", ...alias };
|
|
1404
|
+
if (choice === "on") return { kind: "hypermode", enabled: true, ...alias };
|
|
1405
|
+
if (choice === "off") return { kind: "hypermode", enabled: false, ...alias };
|
|
1406
|
+
return {
|
|
1407
|
+
kind: "message",
|
|
1408
|
+
role: "system",
|
|
1409
|
+
content: `Usage: /${via ?? "hypermode"} [on|off]`
|
|
1410
|
+
};
|
|
1411
|
+
}
|
|
1412
|
+
__name(hypermodeAction, "hypermodeAction");
|
|
1413
|
+
function renderHooks(hooks) {
|
|
1414
|
+
const events = Object.entries(hooks ?? {}).filter(([, entries]) => (entries?.length ?? 0) > 0);
|
|
1415
|
+
if (events.length === 0) {
|
|
1416
|
+
return "No hooks. Add a `hooks` key to namzu.config.json or ~/.namzu/config.yaml: event \u2192 list of { command, matcher?, timeoutMs? }.";
|
|
1417
|
+
}
|
|
1418
|
+
const lines = [];
|
|
1419
|
+
for (const [event, entries] of events) {
|
|
1420
|
+
lines.push(`${event}`);
|
|
1421
|
+
for (const entry of entries ?? []) {
|
|
1422
|
+
const when = entry.matcher ? ` \xB7 matches ${entry.matcher}` : "";
|
|
1423
|
+
const deadline = entry.timeoutMs !== void 0 ? ` \xB7 ${Math.round(entry.timeoutMs / 1e3)}s` : "";
|
|
1424
|
+
lines.push(` ${entry.command}${when}${deadline}`);
|
|
1425
|
+
}
|
|
1426
|
+
}
|
|
1427
|
+
return lines.join("\n");
|
|
1428
|
+
}
|
|
1429
|
+
__name(renderHooks, "renderHooks");
|
|
1430
|
+
function renderJobs(jobs) {
|
|
1431
|
+
if (jobs.length === 0) {
|
|
1432
|
+
return "No background jobs in this conversation. The agent starts one with `run_in_background` on bash.";
|
|
1433
|
+
}
|
|
1434
|
+
const lines = jobs.map((job) => {
|
|
1435
|
+
const state = job.status === "running" ? `running for ${Math.max(1, Math.round((Date.now() - job.startedAt) / 1e3))}s` : job.status === "killed" ? "stopped" : `exited ${job.exitCode ?? "?"}`;
|
|
1436
|
+
return `${job.id} ${state.padEnd(16)} ${job.command}`;
|
|
1437
|
+
});
|
|
1438
|
+
return [
|
|
1439
|
+
`${jobs.length} background job${jobs.length === 1 ? "" : "s"} in this conversation:`,
|
|
1440
|
+
...lines,
|
|
1441
|
+
"",
|
|
1442
|
+
"Use /jobs to inspect output or stop a running shell; /exit stops them all."
|
|
1443
|
+
].join("\n");
|
|
1444
|
+
}
|
|
1445
|
+
__name(renderJobs, "renderJobs");
|
|
1446
|
+
function reportCommand(name, args, render, detailName = "details") {
|
|
1447
|
+
const option = args.join(" ").trim().toLowerCase();
|
|
1448
|
+
const details = option === detailName || option === "details";
|
|
1449
|
+
return {
|
|
1450
|
+
kind: "message",
|
|
1451
|
+
role: "system",
|
|
1452
|
+
content: option.length === 0 || details ? render(details) : `Usage: /${name} [${detailName}]`
|
|
1453
|
+
};
|
|
1454
|
+
}
|
|
1455
|
+
__name(reportCommand, "reportCommand");
|
|
1456
|
+
function contextMeasurement(usage) {
|
|
1457
|
+
const context = usage?.context;
|
|
1458
|
+
if (!context || context.windowTokens <= 0)
|
|
1459
|
+
return ["No context size yet. It appears after the first reply."];
|
|
1460
|
+
const percent = Math.min(999, Math.round(context.tokens / context.windowTokens * 100));
|
|
1461
|
+
const approx = context.measured && !context.windowAssumed ? "" : "~";
|
|
1462
|
+
return [
|
|
1463
|
+
`Context: ${context.tokens.toLocaleString("en-US")} / ${context.windowTokens.toLocaleString("en-US")} tokens (${approx}${percent}%)`,
|
|
1464
|
+
`${context.measured ? "Counted by the provider" : "Estimated by Namzu"}; window ${context.windowAssumed ? "assumed from a table or default" : "declared by the provider or config"}.`
|
|
1465
|
+
];
|
|
1466
|
+
}
|
|
1467
|
+
__name(contextMeasurement, "contextMeasurement");
|
|
1468
|
+
function renderContext(usage, compaction, details = false) {
|
|
1469
|
+
const lines = contextMeasurement(usage);
|
|
1470
|
+
if (usage?.context) lines.push("Latest reported context size; not cumulative token usage.");
|
|
1471
|
+
if (!compaction) {
|
|
1472
|
+
lines.push("Automatic summarising starts with the conversation.");
|
|
1473
|
+
} else {
|
|
1474
|
+
lines.push(
|
|
1475
|
+
compaction.passes === 0 ? "Nothing summarised yet in this conversation." : `Summarised ${plural(compaction.passes, "time")} in this conversation, freeing about ${compaction.reclaimedTokens.toLocaleString("en-US")} tokens.`
|
|
1476
|
+
);
|
|
1477
|
+
if (details) {
|
|
1478
|
+
const pct = /* @__PURE__ */ __name((fraction) => `${Math.round(fraction * 100)}%`, "pct");
|
|
1479
|
+
lines.push(`Strategy: ${compaction.strategy}`);
|
|
1480
|
+
if (compaction.strategy === "salience") {
|
|
1481
|
+
lines.push(
|
|
1482
|
+
`Older, less useful content is shortened from ${pct(compaction.softTarget)} of the window; older history is summarised at ${pct(compaction.triggerThreshold)}.`
|
|
1483
|
+
);
|
|
1484
|
+
} else {
|
|
1485
|
+
lines.push(
|
|
1486
|
+
`Older tool results are cleared at ${pct(compaction.triggerThreshold)} of the window; history is summarised if needed.`
|
|
1487
|
+
);
|
|
1488
|
+
}
|
|
1489
|
+
lines.push(
|
|
1490
|
+
`Tool results cleared: ${compaction.clearedResults.toLocaleString("en-US")}`,
|
|
1491
|
+
`Messages shortened: ${compaction.stubbedNarrations.toLocaleString("en-US")}`,
|
|
1492
|
+
`Summaries written: ${compaction.summaries.toLocaleString("en-US")}`
|
|
1493
|
+
);
|
|
1494
|
+
}
|
|
1495
|
+
}
|
|
1496
|
+
if (!details) lines.push("/context details for how the conversation was summarised.");
|
|
1497
|
+
return lines.join("\n");
|
|
1498
|
+
}
|
|
1499
|
+
__name(renderContext, "renderContext");
|
|
1500
|
+
function costAmount(cost) {
|
|
1501
|
+
if (cost.unpricedTokens > 0) {
|
|
1502
|
+
return cost.totalCost > 0 ? `at least $${cost.totalCost.toFixed(4)}` : "not known";
|
|
1503
|
+
}
|
|
1504
|
+
return `$${cost.totalCost.toFixed(4)}${cost.totalCost === 0 ? " (measured zero)" : ""}`;
|
|
1505
|
+
}
|
|
1506
|
+
__name(costAmount, "costAmount");
|
|
1507
|
+
function renderCost(usage, compaction = null, details = false) {
|
|
1508
|
+
if (usage === null) return "No usage reported yet. Send a message to begin.";
|
|
1509
|
+
const lines = [
|
|
1510
|
+
"Current or latest reply",
|
|
1511
|
+
`Tokens: ${usage.totalTokens.toLocaleString("en-US")} (own model calls)`,
|
|
1512
|
+
`Cost: ${costAmount(usage.cost)}`
|
|
1513
|
+
];
|
|
1514
|
+
if (usage.cost.unpricedTokens > 0) {
|
|
1515
|
+
lines.push(
|
|
1516
|
+
`${usage.cost.unpricedTokens.toLocaleString("en-US")} tokens have no known price and are excluded from the cost.`
|
|
1517
|
+
);
|
|
1518
|
+
}
|
|
1519
|
+
if (usage.budget) {
|
|
1520
|
+
lines.push(
|
|
1521
|
+
`Including delegated agents: ${usage.budget.treeTokens.toLocaleString("en-US")} tokens; limit ${usage.budget.limit === 0 ? "unlimited" : usage.budget.limit.toLocaleString("en-US")}.`
|
|
1522
|
+
);
|
|
1523
|
+
if ((usage.budget.unresolvedRequests ?? 0) > 0)
|
|
1524
|
+
lines.push(
|
|
1525
|
+
`${plural(usage.budget.unresolvedRequests ?? 0, "request")} without confirmed usage; token totals are measured usage, not a complete spend total.`
|
|
1526
|
+
);
|
|
1527
|
+
if (usage.budget.poisoned)
|
|
1528
|
+
lines.push("Further spending is blocked until usage for those requests is confirmed.");
|
|
1529
|
+
}
|
|
1530
|
+
if (details) {
|
|
1531
|
+
lines.push(
|
|
1532
|
+
"Cost covers the latest reply\u2019s own model calls, excluding delegated work and earlier replies. These are not conversation totals."
|
|
1533
|
+
);
|
|
1534
|
+
if (usage.cost.unpricedTokens > 0) {
|
|
1535
|
+
lines.push("Missing prices do not mean those tokens were free.");
|
|
1536
|
+
} else {
|
|
1537
|
+
lines.push("All reported tokens have a known rate.");
|
|
1538
|
+
}
|
|
1539
|
+
if (usage.cost.cacheDiscount > 0)
|
|
1540
|
+
lines.push(`Cache discount: $${usage.cost.cacheDiscount.toFixed(4)}`);
|
|
1541
|
+
if (usage.context && usage.context.windowTokens > 0) {
|
|
1542
|
+
lines.push("", ...contextMeasurement(usage), "/context details for automatic cleanup.");
|
|
1543
|
+
}
|
|
1544
|
+
if (compaction) lines.push(`Cleanup passes in this conversation: ${compaction.passes}.`);
|
|
1545
|
+
} else {
|
|
1546
|
+
lines.push("/cost details for scope and pricing; /context for context size.");
|
|
1547
|
+
}
|
|
1548
|
+
return lines.join("\n");
|
|
1549
|
+
}
|
|
1550
|
+
__name(renderCost, "renderCost");
|
|
1551
|
+
function reviewPrompt(stat, untracked) {
|
|
1552
|
+
const lines = [
|
|
1553
|
+
"Review the uncommitted work in this repository.",
|
|
1554
|
+
"",
|
|
1555
|
+
"`git diff HEAD` reports:",
|
|
1556
|
+
"",
|
|
1557
|
+
stat.length > 0 ? stat : "(no tracked file changed)"
|
|
1558
|
+
];
|
|
1559
|
+
if (untracked.length > 0) {
|
|
1560
|
+
lines.push("", "Untracked, which no diff shows:", ...untracked.map((p) => ` ${p}`));
|
|
1561
|
+
}
|
|
1562
|
+
lines.push(
|
|
1563
|
+
"",
|
|
1564
|
+
"Read what you need \u2014 the diff, the files around it, the tests. Then report:",
|
|
1565
|
+
"",
|
|
1566
|
+
"- Correctness problems, each tied to a file and line, with the input or",
|
|
1567
|
+
" state that produces the wrong behaviour. If you cannot name one, do not",
|
|
1568
|
+
" raise the finding.",
|
|
1569
|
+
"- Anything the change claims in a comment or a message that the code does",
|
|
1570
|
+
" not do.",
|
|
1571
|
+
"- Tests that would pass whether or not the change is correct.",
|
|
1572
|
+
"",
|
|
1573
|
+
"Do not summarise the diff back to me \u2014 I can read it, and a summary is what",
|
|
1574
|
+
"a review turns into when it has nothing to say. If the work looks right,",
|
|
1575
|
+
"say so in one line and stop. Say plainly what you did not examine."
|
|
1576
|
+
);
|
|
1577
|
+
return lines.join("\n");
|
|
1578
|
+
}
|
|
1579
|
+
__name(reviewPrompt, "reviewPrompt");
|
|
1580
|
+
function baseBranchReviewPrompt(mergeBaseSha) {
|
|
1581
|
+
return reviewTargetPrompt([
|
|
1582
|
+
"Review the changes between the current working tree and its selected base branch.",
|
|
1583
|
+
`The host resolved the merge base to ${mergeBaseSha}.`,
|
|
1584
|
+
`Use \`git diff ${mergeBaseSha}\` as the comparison boundary.`
|
|
1585
|
+
]);
|
|
1586
|
+
}
|
|
1587
|
+
__name(baseBranchReviewPrompt, "baseBranchReviewPrompt");
|
|
1588
|
+
function commitReviewPrompt(sha) {
|
|
1589
|
+
return reviewTargetPrompt([
|
|
1590
|
+
`Review the code changes introduced by commit ${sha}.`,
|
|
1591
|
+
`Use \`git show --stat --oneline ${sha}\` and \`git diff ${sha}^ ${sha}\` as the boundary.`
|
|
1592
|
+
]);
|
|
1593
|
+
}
|
|
1594
|
+
__name(commitReviewPrompt, "commitReviewPrompt");
|
|
1595
|
+
function reviewTargetPrompt(target) {
|
|
1596
|
+
return [
|
|
1597
|
+
...target,
|
|
1598
|
+
"",
|
|
1599
|
+
"Read the changed files and surrounding code, then report prioritized, actionable findings.",
|
|
1600
|
+
"Every finding must name the file, line and concrete state that produces the wrong behavior.",
|
|
1601
|
+
"Do not summarize the change back to me. If there are no findings, say so in one line.",
|
|
1602
|
+
"Say plainly what you did not examine."
|
|
1603
|
+
].join("\n");
|
|
1604
|
+
}
|
|
1605
|
+
__name(reviewTargetPrompt, "reviewTargetPrompt");
|
|
1606
|
+
function renderMcp(mcp, details = false) {
|
|
1607
|
+
if (mcp === null) return "Not connected yet. Tool servers have not been checked.";
|
|
1608
|
+
if (mcp.connected.length === 0 && mcp.failed.length === 0) {
|
|
1609
|
+
return "No tool servers configured. Add mcpServers to namzu.config.json.";
|
|
1610
|
+
}
|
|
1611
|
+
const lines = [
|
|
1612
|
+
`Tool servers: ${mcp.connected.length} connected, ${mcp.failed.length} unavailable.`
|
|
1613
|
+
];
|
|
1614
|
+
for (const server of mcp.connected) {
|
|
1615
|
+
lines.push(`${server.name}: connected, ${server.tools.length} tools`);
|
|
1616
|
+
const drift = server.drift;
|
|
1617
|
+
if (drift) {
|
|
1618
|
+
for (const name of drift.added) lines.push(` added: ${terminalDisplayText(name)}`);
|
|
1619
|
+
for (const name of drift.removed) lines.push(` removed: ${terminalDisplayText(name)}`);
|
|
1620
|
+
for (const name of drift.changed)
|
|
1621
|
+
lines.push(` changed, earlier definition held: ${terminalDisplayText(name)}`);
|
|
1622
|
+
}
|
|
1623
|
+
for (const item of server.refused ?? []) {
|
|
1624
|
+
lines.push(` refused ${item.kind}: ${terminalDisplayText(item.name)} (${item.reason})`);
|
|
1625
|
+
}
|
|
1626
|
+
if (details) {
|
|
1627
|
+
if (server.instructions) {
|
|
1628
|
+
const safe = terminalDisplayText(server.instructions).replace(/\s+/g, " ").trim();
|
|
1629
|
+
lines.push(` instructions: ${safe.length > 300 ? `${safe.slice(0, 300)}\u2026` : safe}`);
|
|
1630
|
+
}
|
|
1631
|
+
for (const tool of server.tools) lines.push(` ${tool}`);
|
|
1632
|
+
}
|
|
1633
|
+
}
|
|
1634
|
+
for (const server of mcp.failed) lines.push(`${server.name}: unavailable \u2014 ${server.reason}`);
|
|
1635
|
+
if (!details && mcp.connected.length > 0) lines.push("/mcp tools to list available tools.");
|
|
1636
|
+
return lines.join("\n");
|
|
1637
|
+
}
|
|
1638
|
+
__name(renderMcp, "renderMcp");
|
|
1639
|
+
function statusRows(ctx) {
|
|
1640
|
+
const current = ctx.permissions.currentMode();
|
|
1641
|
+
const permissions = effectivePermissionMode(current.mode, ctx.permissions.approvalLatched());
|
|
1642
|
+
const rows = [
|
|
1643
|
+
["Version", CLI_VERSION],
|
|
1644
|
+
["Model", ctx.modelSummary ?? "Not selected"],
|
|
1645
|
+
["Reasoning", ctx.reasoningEffort.current() ?? "Model default"],
|
|
1646
|
+
["Provider", ctx.providerSummary ?? "None. Run /model to choose one."],
|
|
1647
|
+
["Folder", homePath(ctx.cwd)],
|
|
1648
|
+
["Permissions", permissionModeLabel(permissions)],
|
|
1649
|
+
["Sandbox", sandboxInWords(ctx.sandbox)],
|
|
1650
|
+
["Web search", ctx.webSearchSummary ?? "Not set up yet"],
|
|
1651
|
+
["Tools", String(ctx.availableTools().length)],
|
|
1652
|
+
["Instructions", ctx.instructionFiles.map((file) => homePath(file)).join(", ") || "None"]
|
|
1653
|
+
];
|
|
1654
|
+
if (ctx.sandbox?.workspace)
|
|
1655
|
+
rows.push([
|
|
1656
|
+
"Workspace",
|
|
1657
|
+
ctx.sandbox.workspace === "ephemeral" ? "Temporary files, removed when the reply ends" : "Your real project files; edits are kept"
|
|
1658
|
+
]);
|
|
1659
|
+
if (ctx.sessionId) rows.push(["Conversation", shortId(ctx.sessionId)]);
|
|
1660
|
+
if (ctx.usage) {
|
|
1661
|
+
rows.push(["Tokens", `${ctx.usage.totalTokens.toLocaleString("en-US")} \xB7 latest reply`]);
|
|
1662
|
+
rows.push(["Spend", `${costAmount(ctx.usage.cost)} \xB7 latest reply`]);
|
|
1663
|
+
if (ctx.usage.context) {
|
|
1664
|
+
const context = ctx.usage.context;
|
|
1665
|
+
rows.push([
|
|
1666
|
+
"Context",
|
|
1667
|
+
`${context.tokens.toLocaleString("en-US")} / ${context.windowTokens.toLocaleString("en-US")}${context.measured && !context.windowAssumed ? "" : " \xB7 estimated"}`
|
|
1668
|
+
]);
|
|
1669
|
+
}
|
|
1670
|
+
}
|
|
1671
|
+
return rows;
|
|
1672
|
+
}
|
|
1673
|
+
__name(statusRows, "statusRows");
|
|
1674
|
+
function sandboxInWords(sandbox) {
|
|
1675
|
+
if (!sandbox) return "Not set up yet";
|
|
1676
|
+
if (sandbox.unconfined) return "Off. Commands run on this computer with your access.";
|
|
1677
|
+
return `${sandbox.environment ?? "On"}${sandbox.enforced.length > 0 ? ` \xB7 limits ${sandbox.enforced.join(", ")}` : ""}`;
|
|
1678
|
+
}
|
|
1679
|
+
__name(sandboxInWords, "sandboxInWords");
|
|
1680
|
+
function renderStatus(ctx, details = false) {
|
|
1681
|
+
if (!details)
|
|
1682
|
+
return `${statusCard(statusRows(ctx), ctx.columns)}
|
|
1683
|
+
/config changes settings \xB7 /status details for the full report`;
|
|
1684
|
+
const lines = [
|
|
1685
|
+
`Provider: ${ctx.providerSummary ?? "none \u2014 run /model to choose one"}`,
|
|
1686
|
+
`Model: ${ctx.modelSummary ?? "not selected"}`,
|
|
1687
|
+
`Working directory: ${homePath(ctx.cwd)}`,
|
|
1688
|
+
...installationRows().map(
|
|
1689
|
+
([key, value]) => `${key}: ${key === "Executable" ? homePath(value) : value}`
|
|
1690
|
+
),
|
|
1691
|
+
...ctx.sessionId ? [`Conversation: ${ctx.sessionId}`] : [],
|
|
1692
|
+
...renderPermissions(ctx.permissions, details).split("\n")
|
|
1693
|
+
];
|
|
1694
|
+
const sandbox = ctx.sandbox;
|
|
1695
|
+
if (!sandbox) {
|
|
1696
|
+
lines.push("Sandbox: not resolved yet.");
|
|
1697
|
+
} else if (sandbox.unconfined) {
|
|
1698
|
+
lines.push("Sandbox: commands are not confined; they have this shell\u2019s access.");
|
|
1699
|
+
} else {
|
|
1700
|
+
lines.push(
|
|
1701
|
+
`Sandbox: ${sandbox.environment ?? "active"}; enforces ${sandbox.enforced.join(", ") || "no reported restrictions"}.`
|
|
1702
|
+
);
|
|
1703
|
+
}
|
|
1704
|
+
if (sandbox?.workspace === "ephemeral") {
|
|
1705
|
+
lines.push("Workspace: temporary files; removed when the reply ends.");
|
|
1706
|
+
} else if (sandbox?.workspace === "working-directory" || sandbox?.workspace === "host") {
|
|
1707
|
+
lines.push("Workspace: real project files; edits persist.");
|
|
1708
|
+
}
|
|
1709
|
+
if (details) {
|
|
1710
|
+
for (const dir of ctx.directories?.() ?? []) lines.push(`Additional directory: ${dir}`);
|
|
1711
|
+
if (sandbox) {
|
|
1712
|
+
lines.push(
|
|
1713
|
+
`Required isolation: ${sandbox.required.length > 0 ? sandbox.required.join(", ") : "none"}.`
|
|
1714
|
+
);
|
|
1715
|
+
if (sandbox.required.length > 0)
|
|
1716
|
+
lines.push("Without the required isolation, Namzu will not start.");
|
|
1717
|
+
}
|
|
1718
|
+
lines.push("/status config for setting sources; /status tools for available tools.");
|
|
1719
|
+
}
|
|
1720
|
+
if (ctx.usage) lines.push(`Spend (latest reply): ${costAmount(ctx.usage.cost)}`);
|
|
1721
|
+
if (!details) lines.push("/status details for rules and workspace details.");
|
|
1722
|
+
return lines.join("\n");
|
|
1723
|
+
}
|
|
1724
|
+
__name(renderStatus, "renderStatus");
|
|
1725
|
+
function renderPermissions(permissions, details = false) {
|
|
1726
|
+
const current = permissions.currentMode();
|
|
1727
|
+
const effective = effectivePermissionMode(current.mode, permissions.approvalLatched());
|
|
1728
|
+
const approvedAll = effective !== current.mode;
|
|
1729
|
+
const lines = [
|
|
1730
|
+
`Permissions: ${permissionModeLabel(effective)}. ${approvedAll ? "Tools are approved automatically for this conversation." : permissionModeDescription(effective)}`
|
|
1731
|
+
];
|
|
1732
|
+
if (approvedAll) lines.push("Choose a preset in /permissions to change this.");
|
|
1733
|
+
if (!details) return lines.join("\n");
|
|
1734
|
+
if (current.source === "launch-bypass")
|
|
1735
|
+
lines.push("Selected at launch with --dangerously-skip-permissions.");
|
|
1736
|
+
if (current.source === "launch-flag") lines.push("Selected at launch with --permission-mode.");
|
|
1737
|
+
lines.push("Explicit deny rules and the built-in safety gate apply in every mode.");
|
|
1738
|
+
if (current.mode === "plan")
|
|
1739
|
+
lines.push("Plan mode also blocks writes that an allow rule would otherwise permit.");
|
|
1740
|
+
const exempt = permissions.neverPrompted();
|
|
1741
|
+
if (exempt.length > 0) {
|
|
1742
|
+
lines.push(`Tools exempt from ordinary prompts: ${exempt.join(", ")}.`);
|
|
1743
|
+
lines.push(
|
|
1744
|
+
"Destructive calls still require review; the selected mode decides whether to allow, ask or refuse. Plan mode still requires read-only tools."
|
|
1745
|
+
);
|
|
1746
|
+
}
|
|
1747
|
+
if (effective === "prompt" || effective === "accept-edits" || effective === "plan") {
|
|
1748
|
+
lines.push(
|
|
1749
|
+
'Read-only agents (explore, or an agent file with readOnly: true) on the conversation\u2019s model start without asking; each call they make is still reviewed. A permissions rule Agent: "ask" asks about every launch.'
|
|
1750
|
+
);
|
|
1751
|
+
}
|
|
1752
|
+
if (permissions.rules.length > 0) {
|
|
1753
|
+
lines.push(
|
|
1754
|
+
`Rules (${permissions.rules.length}):`,
|
|
1755
|
+
...permissions.rules.map((rule) => ` ${describeRule(rule)}`)
|
|
1756
|
+
);
|
|
1757
|
+
} else {
|
|
1758
|
+
lines.push("No custom rules. Configure permissions in namzu.config.json.");
|
|
1759
|
+
}
|
|
1760
|
+
return lines.join("\n");
|
|
1761
|
+
}
|
|
1762
|
+
__name(renderPermissions, "renderPermissions");
|
|
1763
|
+
function describeRule(rule) {
|
|
1764
|
+
switch (rule.type) {
|
|
1765
|
+
case "deny_by_name":
|
|
1766
|
+
return `deny ${rule.toolNames.join(", ")}`;
|
|
1767
|
+
case "allow_by_name":
|
|
1768
|
+
return `allow ${rule.toolNames.join(", ")}`;
|
|
1769
|
+
case "by_source": {
|
|
1770
|
+
const verb = rule.decision === "review" ? "review" : rule.decision;
|
|
1771
|
+
return `${verb} tools from source ${rule.sources.join(", ")}`;
|
|
1772
|
+
}
|
|
1773
|
+
case "allow_by_category":
|
|
1774
|
+
return `allow any tool in category: ${rule.categories.join(", ")}`;
|
|
1775
|
+
case "allow_by_tier":
|
|
1776
|
+
return `allow any tool in tier: ${rule.tiers.join(", ")}`;
|
|
1777
|
+
case "allow_read_only":
|
|
1778
|
+
return "allow any tool that only observes";
|
|
1779
|
+
case "deny_dangerous_patterns":
|
|
1780
|
+
return "deny the built-in catastrophic-command patterns";
|
|
1781
|
+
case "argument_pattern": {
|
|
1782
|
+
const verb = rule.decision === "deny" ? "deny " : "allow ";
|
|
1783
|
+
return `${verb} ${rule.toolNames.join(", ")} when ${rule.argument} matches ${rule.pattern}`;
|
|
1784
|
+
}
|
|
1785
|
+
case "custom_pattern": {
|
|
1786
|
+
const verb = rule.decision === "deny" ? "deny " : "allow ";
|
|
1787
|
+
const where = rule.target === "both" ? "name+args" : rule.target;
|
|
1788
|
+
return `${verb} ${where} matching ${rule.pattern}`;
|
|
1789
|
+
}
|
|
1790
|
+
case "predicate":
|
|
1791
|
+
return `decide ${rule.description}`;
|
|
1792
|
+
default: {
|
|
1793
|
+
const exhaustive = rule;
|
|
1794
|
+
return `unrecognised rule: ${JSON.stringify(exhaustive)}`;
|
|
1795
|
+
}
|
|
1796
|
+
}
|
|
1797
|
+
}
|
|
1798
|
+
__name(describeRule, "describeRule");
|
|
1799
|
+
function renderAgents(ids) {
|
|
1800
|
+
if (ids.length === 0) {
|
|
1801
|
+
return "No delegates. This conversation has no delegation tool, so it does the work itself.";
|
|
1802
|
+
}
|
|
1803
|
+
return [
|
|
1804
|
+
`Delegates (${ids.length}):`,
|
|
1805
|
+
...ids.map((id) => ` ${id}`),
|
|
1806
|
+
"",
|
|
1807
|
+
"The agent dispatches to these itself when a task suits one. It may also",
|
|
1808
|
+
"define a specialist for a single task, which is not listed here because",
|
|
1809
|
+
"it does not exist until the agent asks for it."
|
|
1810
|
+
].join("\n");
|
|
1811
|
+
}
|
|
1812
|
+
__name(renderAgents, "renderAgents");
|
|
1813
|
+
function runSlash(line, ctx, builtins = CLI_LOCAL_COMMANDS) {
|
|
1814
|
+
const parsed = parseSlash(line);
|
|
1815
|
+
if (!parsed) return null;
|
|
1816
|
+
const cmd = builtins.find((c) => c.name === parsed.name);
|
|
1817
|
+
if (cmd) {
|
|
1818
|
+
const commandContext = { ...ctx, builtins };
|
|
1819
|
+
const reason = cmd.unavailable?.(commandContext);
|
|
1820
|
+
return reason ? { kind: "message", role: "system", content: reason } : cmd.action(commandContext, parsed.args);
|
|
1821
|
+
}
|
|
1822
|
+
const user = ctx.userCommands.find((c) => c.name === parsed.name);
|
|
1823
|
+
if (user) {
|
|
1824
|
+
const expanded = expandCommand(user, parsed.args.join(" "));
|
|
1825
|
+
return expanded.ok ? { kind: "prompt", text: expanded.prompt } : { kind: "message", role: "system", content: expanded.reason };
|
|
1826
|
+
}
|
|
1827
|
+
return {
|
|
1828
|
+
kind: "message",
|
|
1829
|
+
role: "system",
|
|
1830
|
+
content: `Unknown command: /${parsed.name}. Try /help.`
|
|
1831
|
+
};
|
|
1832
|
+
}
|
|
1833
|
+
__name(runSlash, "runSlash");
|
|
1834
|
+
|
|
1835
|
+
export {
|
|
1836
|
+
eraseLastChoiceGrapheme,
|
|
1837
|
+
choiceDisplayText,
|
|
1838
|
+
choiceDisplayWidth,
|
|
1839
|
+
wrapChoiceText,
|
|
1840
|
+
wrapBalancedText,
|
|
1841
|
+
capChoiceLines,
|
|
1842
|
+
truncateChoiceText,
|
|
1843
|
+
TURN_LIMIT_FIELDS,
|
|
1844
|
+
turnLimitCommands,
|
|
1845
|
+
discoverUserCommands,
|
|
1846
|
+
expandHeadlessCommand,
|
|
1847
|
+
matchSlashCommands,
|
|
1848
|
+
mergeHostCommands,
|
|
1849
|
+
renderOutcome,
|
|
1850
|
+
hostCommandNames,
|
|
1851
|
+
kernelCommandDescriptors,
|
|
1852
|
+
reviewPrompt,
|
|
1853
|
+
baseBranchReviewPrompt,
|
|
1854
|
+
commitReviewPrompt,
|
|
1855
|
+
renderAgents,
|
|
1856
|
+
runSlash
|
|
1857
|
+
};
|
|
1858
|
+
//# sourceMappingURL=chunk-N5IF64K3.js.map
|