@namzu/cli 34.1.1 → 36.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +800 -0
- package/README.md +160 -394
- package/assets/pal-blender-mcp.py +123 -0
- package/assets/pal-godot-mcp-pin.json +135 -0
- package/assets/pal-godot-mcp.cjs +418 -0
- package/dist/bin-main.d.ts +3 -0
- package/dist/bin-main.d.ts.map +1 -0
- package/dist/bin.d.ts +2 -1
- package/dist/bin.d.ts.map +1 -1
- package/dist/bin.js +85 -23
- package/dist/bin.js.map +6 -1
- package/dist/boot-narrative.d.ts +16 -0
- package/dist/boot-narrative.d.ts.map +1 -0
- package/dist/checkpoints/manifest.d.ts +107 -0
- package/dist/checkpoints/manifest.d.ts.map +1 -0
- package/dist/checkpoints/store.d.ts +280 -40
- package/dist/checkpoints/store.d.ts.map +1 -1
- package/dist/checkpoints/undo-plan.d.ts +83 -0
- package/dist/checkpoints/undo-plan.d.ts.map +1 -0
- package/dist/checkpoints/wrap.d.ts +4 -0
- package/dist/checkpoints/wrap.d.ts.map +1 -1
- package/dist/chunks/acp-BOSEA4R3.js +13448 -0
- package/dist/chunks/acp-BOSEA4R3.js.map +6 -0
- package/dist/chunks/activity-command-ACS7KL3C.js +262 -0
- package/dist/chunks/activity-command-ACS7KL3C.js.map +6 -0
- package/dist/chunks/add-DLS54YKS.js +712 -0
- package/dist/chunks/add-DLS54YKS.js.map +6 -0
- package/dist/chunks/agent-GV3DWYQC.js +87 -0
- package/dist/chunks/agent-GV3DWYQC.js.map +6 -0
- package/dist/chunks/agent-session-7VE6GJJH.js +46 -0
- package/dist/chunks/agent-session-7VE6GJJH.js.map +6 -0
- package/dist/chunks/archive-6ZENIEBP.js +84 -0
- package/dist/chunks/archive-6ZENIEBP.js.map +6 -0
- package/dist/chunks/bin-main-NFFT5ZIU.js +126 -0
- package/dist/chunks/bin-main-NFFT5ZIU.js.map +6 -0
- package/dist/chunks/browser-VT2U6NG2.js +31 -0
- package/dist/chunks/browser-VT2U6NG2.js.map +6 -0
- package/dist/chunks/chat-UNYVLDFL.js +101 -0
- package/dist/chunks/chat-UNYVLDFL.js.map +6 -0
- package/dist/chunks/chunk-2IL6OG3X.js +311 -0
- package/dist/chunks/chunk-2IL6OG3X.js.map +6 -0
- package/dist/chunks/chunk-2RBYHHLM.js +319 -0
- package/dist/chunks/chunk-2RBYHHLM.js.map +6 -0
- package/dist/chunks/chunk-42ZK2AH4.js +71 -0
- package/dist/chunks/chunk-42ZK2AH4.js.map +6 -0
- package/dist/chunks/chunk-5PQVJBIO.js +168 -0
- package/dist/chunks/chunk-5PQVJBIO.js.map +6 -0
- package/dist/chunks/chunk-6CPT2ZBS.js +75 -0
- package/dist/chunks/chunk-6CPT2ZBS.js.map +6 -0
- package/dist/chunks/chunk-6LLJQ3KY.js +225 -0
- package/dist/chunks/chunk-6LLJQ3KY.js.map +6 -0
- package/dist/chunks/chunk-6YFJDVGA.js +161 -0
- package/dist/chunks/chunk-6YFJDVGA.js.map +6 -0
- package/dist/chunks/chunk-6YG7D7U4.js +159 -0
- package/dist/chunks/chunk-6YG7D7U4.js.map +6 -0
- package/dist/chunks/chunk-6ZPODOJN.js +828 -0
- package/dist/chunks/chunk-6ZPODOJN.js.map +6 -0
- package/dist/chunks/chunk-76FLAFCG.js +51 -0
- package/dist/chunks/chunk-76FLAFCG.js.map +6 -0
- package/dist/chunks/chunk-7HCPD673.js +25326 -0
- package/dist/chunks/chunk-7HCPD673.js.map +6 -0
- package/dist/chunks/chunk-7KWGR2YA.js +257 -0
- package/dist/chunks/chunk-7KWGR2YA.js.map +6 -0
- package/dist/chunks/chunk-A22MBIYU.js +42 -0
- package/dist/chunks/chunk-A22MBIYU.js.map +6 -0
- package/dist/chunks/chunk-AHIDYIRB.js +329 -0
- package/dist/chunks/chunk-AHIDYIRB.js.map +6 -0
- package/dist/chunks/chunk-AK2U3N2A.js +31 -0
- package/dist/chunks/chunk-AK2U3N2A.js.map +6 -0
- package/dist/chunks/chunk-AKKRZTPB.js +283 -0
- package/dist/chunks/chunk-AKKRZTPB.js.map +6 -0
- package/dist/chunks/chunk-BCZR2B3Y.js +97 -0
- package/dist/chunks/chunk-BCZR2B3Y.js.map +6 -0
- package/dist/chunks/chunk-CHIEVVQ2.js +32 -0
- package/dist/chunks/chunk-CHIEVVQ2.js.map +6 -0
- package/dist/chunks/chunk-D67YBUO3.js +110 -0
- package/dist/chunks/chunk-D67YBUO3.js.map +6 -0
- package/dist/chunks/chunk-DIHEHK7K.js +765 -0
- package/dist/chunks/chunk-DIHEHK7K.js.map +6 -0
- package/dist/chunks/chunk-E5VLANCO.js +101 -0
- package/dist/chunks/chunk-E5VLANCO.js.map +6 -0
- package/dist/chunks/chunk-EEDZOGV4.js +47 -0
- package/dist/chunks/chunk-EEDZOGV4.js.map +6 -0
- package/dist/chunks/chunk-ENGNEELC.js +271 -0
- package/dist/chunks/chunk-ENGNEELC.js.map +6 -0
- package/dist/chunks/chunk-EVY4MVRE.js +74 -0
- package/dist/chunks/chunk-EVY4MVRE.js.map +6 -0
- package/dist/chunks/chunk-FJNDNNNQ.js +115 -0
- package/dist/chunks/chunk-FJNDNNNQ.js.map +6 -0
- package/dist/chunks/chunk-FOFGMP7O.js +20 -0
- package/dist/chunks/chunk-FOFGMP7O.js.map +6 -0
- package/dist/chunks/chunk-FTMTO72X.js +95 -0
- package/dist/chunks/chunk-FTMTO72X.js.map +6 -0
- package/dist/chunks/chunk-GIXSS6KW.js +2228 -0
- package/dist/chunks/chunk-GIXSS6KW.js.map +6 -0
- package/dist/chunks/chunk-GNBMKISG.js +19 -0
- package/dist/chunks/chunk-GNBMKISG.js.map +6 -0
- package/dist/chunks/chunk-GWQEMJFS.js +28 -0
- package/dist/chunks/chunk-GWQEMJFS.js.map +6 -0
- package/dist/chunks/chunk-H6B6AROX.js +151 -0
- package/dist/chunks/chunk-H6B6AROX.js.map +6 -0
- package/dist/chunks/chunk-HE7WUOX2.js +26 -0
- package/dist/chunks/chunk-HE7WUOX2.js.map +6 -0
- package/dist/chunks/chunk-HZBKWL42.js +303 -0
- package/dist/chunks/chunk-HZBKWL42.js.map +6 -0
- package/dist/chunks/chunk-I7HQR6ET.js +75 -0
- package/dist/chunks/chunk-I7HQR6ET.js.map +6 -0
- package/dist/chunks/chunk-IJEB77SH.js +648 -0
- package/dist/chunks/chunk-IJEB77SH.js.map +6 -0
- package/dist/chunks/chunk-JNPDWME5.js +675 -0
- package/dist/chunks/chunk-JNPDWME5.js.map +6 -0
- package/dist/chunks/chunk-JORONMD3.js +18 -0
- package/dist/chunks/chunk-JORONMD3.js.map +6 -0
- package/dist/chunks/chunk-JV3LONAU.js +76 -0
- package/dist/chunks/chunk-JV3LONAU.js.map +6 -0
- package/dist/chunks/chunk-K5HARZ7G.js +82516 -0
- package/dist/chunks/chunk-K5HARZ7G.js.map +6 -0
- package/dist/chunks/chunk-KONYGNG6.js +7661 -0
- package/dist/chunks/chunk-KONYGNG6.js.map +6 -0
- package/dist/chunks/chunk-LXB3S4IC.js +19 -0
- package/dist/chunks/chunk-LXB3S4IC.js.map +6 -0
- package/dist/chunks/chunk-M3IAMIBJ.js +661 -0
- package/dist/chunks/chunk-M3IAMIBJ.js.map +6 -0
- package/dist/chunks/chunk-MH6KUKVV.js +1142 -0
- package/dist/chunks/chunk-MH6KUKVV.js.map +6 -0
- package/dist/chunks/chunk-MS3IYQ72.js +1479 -0
- package/dist/chunks/chunk-MS3IYQ72.js.map +6 -0
- package/dist/chunks/chunk-MZP6SH3M.js +3497 -0
- package/dist/chunks/chunk-MZP6SH3M.js.map +6 -0
- package/dist/chunks/chunk-N3ZEXVSS.js +76 -0
- package/dist/chunks/chunk-N3ZEXVSS.js.map +6 -0
- package/dist/chunks/chunk-N6SR54VC.js +207 -0
- package/dist/chunks/chunk-N6SR54VC.js.map +6 -0
- package/dist/chunks/chunk-NADQQMMG.js +46 -0
- package/dist/chunks/chunk-NADQQMMG.js.map +6 -0
- package/dist/chunks/chunk-NBH52WHS.js +247 -0
- package/dist/chunks/chunk-NBH52WHS.js.map +6 -0
- package/dist/chunks/chunk-NICLKFBG.js +109 -0
- package/dist/chunks/chunk-NICLKFBG.js.map +6 -0
- package/dist/chunks/chunk-NIPHHZ5G.js +283 -0
- package/dist/chunks/chunk-NIPHHZ5G.js.map +6 -0
- package/dist/chunks/chunk-NQT244I2.js +517 -0
- package/dist/chunks/chunk-NQT244I2.js.map +6 -0
- package/dist/chunks/chunk-NUGPLXVK.js +228 -0
- package/dist/chunks/chunk-NUGPLXVK.js.map +6 -0
- package/dist/chunks/chunk-OEW7CJKK.js +140 -0
- package/dist/chunks/chunk-OEW7CJKK.js.map +6 -0
- package/dist/chunks/chunk-OH6TB27S.js +111 -0
- package/dist/chunks/chunk-OH6TB27S.js.map +6 -0
- package/dist/chunks/chunk-OWH6QQY2.js +1858 -0
- package/dist/chunks/chunk-OWH6QQY2.js.map +6 -0
- package/dist/chunks/chunk-OWXJOD4H.js +773 -0
- package/dist/chunks/chunk-OWXJOD4H.js.map +6 -0
- package/dist/chunks/chunk-PT537V7B.js +787 -0
- package/dist/chunks/chunk-PT537V7B.js.map +6 -0
- package/dist/chunks/chunk-QEQZFG2X.js +106 -0
- package/dist/chunks/chunk-QEQZFG2X.js.map +6 -0
- package/dist/chunks/chunk-QL4O4UGZ.js +245 -0
- package/dist/chunks/chunk-QL4O4UGZ.js.map +6 -0
- package/dist/chunks/chunk-QL54XCF4.js +73 -0
- package/dist/chunks/chunk-QL54XCF4.js.map +6 -0
- package/dist/chunks/chunk-SB6UD3ED.js +1355 -0
- package/dist/chunks/chunk-SB6UD3ED.js.map +6 -0
- package/dist/chunks/chunk-SGGRGKGV.js +34 -0
- package/dist/chunks/chunk-SGGRGKGV.js.map +6 -0
- package/dist/chunks/chunk-SKKWMMFP.js +474 -0
- package/dist/chunks/chunk-SKKWMMFP.js.map +6 -0
- package/dist/chunks/chunk-SMIDV4KH.js +171 -0
- package/dist/chunks/chunk-SMIDV4KH.js.map +6 -0
- package/dist/chunks/chunk-T2VUTAHB.js +46 -0
- package/dist/chunks/chunk-T2VUTAHB.js.map +6 -0
- package/dist/chunks/chunk-T4SB6AAF.js +134 -0
- package/dist/chunks/chunk-T4SB6AAF.js.map +6 -0
- package/dist/chunks/chunk-TBIX6JRE.js +24 -0
- package/dist/chunks/chunk-TBIX6JRE.js.map +6 -0
- package/dist/chunks/chunk-THNCQJ33.js +11265 -0
- package/dist/chunks/chunk-THNCQJ33.js.map +6 -0
- package/dist/chunks/chunk-U56QFYGA.js +818 -0
- package/dist/chunks/chunk-U56QFYGA.js.map +6 -0
- package/dist/chunks/chunk-U6GZ7EW4.js +106 -0
- package/dist/chunks/chunk-U6GZ7EW4.js.map +6 -0
- package/dist/chunks/chunk-UDDSFIMB.js +1373 -0
- package/dist/chunks/chunk-UDDSFIMB.js.map +6 -0
- package/dist/chunks/chunk-UFHNXZL2.js +399 -0
- package/dist/chunks/chunk-UFHNXZL2.js.map +6 -0
- package/dist/chunks/chunk-US5ZFPAU.js +400 -0
- package/dist/chunks/chunk-US5ZFPAU.js.map +6 -0
- package/dist/chunks/chunk-VRL2WNQN.js +7534 -0
- package/dist/chunks/chunk-VRL2WNQN.js.map +6 -0
- package/dist/chunks/chunk-W3UQMRYA.js +380 -0
- package/dist/chunks/chunk-W3UQMRYA.js.map +6 -0
- package/dist/chunks/chunk-W5KGCUP3.js +11111 -0
- package/dist/chunks/chunk-W5KGCUP3.js.map +6 -0
- package/dist/chunks/chunk-WHODOMXA.js +132 -0
- package/dist/chunks/chunk-WHODOMXA.js.map +6 -0
- package/dist/chunks/chunk-WT6TFCPV.js +154 -0
- package/dist/chunks/chunk-WT6TFCPV.js.map +6 -0
- package/dist/chunks/chunk-WY2WUTFR.js +164 -0
- package/dist/chunks/chunk-WY2WUTFR.js.map +6 -0
- package/dist/chunks/chunk-XEUQN4JC.js +54 -0
- package/dist/chunks/chunk-XEUQN4JC.js.map +6 -0
- package/dist/chunks/chunk-Y7B67G22.js +26 -0
- package/dist/chunks/chunk-Y7B67G22.js.map +6 -0
- package/dist/chunks/chunk-YEMJX2DS.js +69 -0
- package/dist/chunks/chunk-YEMJX2DS.js.map +6 -0
- package/dist/chunks/chunk-YKLKHDZU.js +2953 -0
- package/dist/chunks/chunk-YKLKHDZU.js.map +6 -0
- package/dist/chunks/chunk-YQEWD2EN.js +127 -0
- package/dist/chunks/chunk-YQEWD2EN.js.map +6 -0
- package/dist/chunks/chunk-YYQJIECC.js +1439 -0
- package/dist/chunks/chunk-YYQJIECC.js.map +6 -0
- package/dist/chunks/chunk-ZKVZNOUS.js +106 -0
- package/dist/chunks/chunk-ZKVZNOUS.js.map +6 -0
- package/dist/chunks/chunk-ZPR4IMRT.js +36 -0
- package/dist/chunks/chunk-ZPR4IMRT.js.map +6 -0
- package/dist/chunks/chunk-ZWA2JRJV.js +45 -0
- package/dist/chunks/chunk-ZWA2JRJV.js.map +6 -0
- package/dist/chunks/cli-runtime-F4MBZ2UQ.js +129 -0
- package/dist/chunks/cli-runtime-F4MBZ2UQ.js.map +6 -0
- package/dist/chunks/commands-GMQGFTIY.js +21 -0
- package/dist/chunks/commands-GMQGFTIY.js.map +6 -0
- package/dist/chunks/computer-GXDY4H35.js +493 -0
- package/dist/chunks/computer-GXDY4H35.js.map +6 -0
- package/dist/chunks/crash-report-STOHSORG.js +21 -0
- package/dist/chunks/crash-report-STOHSORG.js.map +6 -0
- package/dist/chunks/devtools-LBE4PAQN.js +3851 -0
- package/dist/chunks/devtools-LBE4PAQN.js.map +6 -0
- package/dist/chunks/dist-3AF2X4S5.js +1339 -0
- package/dist/chunks/dist-3AF2X4S5.js.map +6 -0
- package/dist/chunks/dist-AZIMHV2B.js +514 -0
- package/dist/chunks/dist-AZIMHV2B.js.map +6 -0
- package/dist/chunks/dist-BGYRQ5BC.js +555 -0
- package/dist/chunks/dist-BGYRQ5BC.js.map +6 -0
- package/dist/chunks/dist-OTTZ7WVD.js +1415 -0
- package/dist/chunks/dist-OTTZ7WVD.js.map +6 -0
- package/dist/chunks/dist-R3I3ATSG.js +1018 -0
- package/dist/chunks/dist-R3I3ATSG.js.map +6 -0
- package/dist/chunks/dist-TXEKDBQO.js +40642 -0
- package/dist/chunks/dist-TXEKDBQO.js.map +6 -0
- package/dist/chunks/dist-XTWYQHHN.js +520 -0
- package/dist/chunks/dist-XTWYQHHN.js.map +6 -0
- package/dist/chunks/doctor-VXSB4Y4P.js +28 -0
- package/dist/chunks/doctor-VXSB4Y4P.js.map +6 -0
- package/dist/chunks/drain-DXVICQBR.js +471 -0
- package/dist/chunks/drain-DXVICQBR.js.map +6 -0
- package/dist/chunks/endpoint-M2DDENPP.js +15 -0
- package/dist/chunks/endpoint-M2DDENPP.js.map +6 -0
- package/dist/chunks/eval-BMJQXDKA.js +187 -0
- package/dist/chunks/eval-BMJQXDKA.js.map +6 -0
- package/dist/chunks/exec-3T5ESZPH.js +1284 -0
- package/dist/chunks/exec-3T5ESZPH.js.map +6 -0
- package/dist/chunks/home-ILHA7B6Z.js +16 -0
- package/dist/chunks/home-ILHA7B6Z.js.map +6 -0
- package/dist/chunks/host-queries-QCMWDZGS.js +152 -0
- package/dist/chunks/host-queries-QCMWDZGS.js.map +6 -0
- package/dist/chunks/lib-KXZZJJG2.js +2657 -0
- package/dist/chunks/lib-KXZZJJG2.js.map +6 -0
- package/dist/chunks/lifecycle-CB23VJI7.js +63 -0
- package/dist/chunks/lifecycle-CB23VJI7.js.map +6 -0
- package/dist/chunks/list-N6WXZBMD.js +293 -0
- package/dist/chunks/list-N6WXZBMD.js.map +6 -0
- package/dist/chunks/login-26NCG6EQ.js +29 -0
- package/dist/chunks/login-26NCG6EQ.js.map +6 -0
- package/dist/chunks/logs-V7SNM7LA.js +116 -0
- package/dist/chunks/logs-V7SNM7LA.js.map +6 -0
- package/dist/chunks/mcp-BTHCU5ZC.js +763 -0
- package/dist/chunks/mcp-BTHCU5ZC.js.map +6 -0
- package/dist/chunks/message-command-HMIOR52C.js +170 -0
- package/dist/chunks/message-command-HMIOR52C.js.map +6 -0
- package/dist/chunks/node-QB2FA2ZB.js +916 -0
- package/dist/chunks/node-QB2FA2ZB.js.map +6 -0
- package/dist/chunks/operator-tools-7LMWOHSN.js +115 -0
- package/dist/chunks/operator-tools-7LMWOHSN.js.map +6 -0
- package/dist/chunks/output-schema-XCONYVZ7.js +11 -0
- package/dist/chunks/output-schema-XCONYVZ7.js.map +6 -0
- package/dist/chunks/pal-YEUKHA6F.js +200 -0
- package/dist/chunks/pal-YEUKHA6F.js.map +6 -0
- package/dist/chunks/paths-DXYFKIJU.js +10 -0
- package/dist/chunks/paths-DXYFKIJU.js.map +6 -0
- package/dist/chunks/pica-WNHDDIFX.js +1736 -0
- package/dist/chunks/pica-WNHDDIFX.js.map +6 -0
- package/dist/chunks/providers-EI3FAKYB.js +160 -0
- package/dist/chunks/providers-EI3FAKYB.js.map +6 -0
- package/dist/chunks/resident-5ZY6OG6B.js +1314 -0
- package/dist/chunks/resident-5ZY6OG6B.js.map +6 -0
- package/dist/chunks/resume-command-ONYRZIIA.js +22 -0
- package/dist/chunks/resume-command-ONYRZIIA.js.map +6 -0
- package/dist/chunks/schedule-6JPEO4NR.js +143 -0
- package/dist/chunks/schedule-6JPEO4NR.js.map +6 -0
- package/dist/chunks/serve-S7UWNIR3.js +21 -0
- package/dist/chunks/serve-S7UWNIR3.js.map +6 -0
- package/dist/chunks/service-WSW3M6K5.js +1633 -0
- package/dist/chunks/service-WSW3M6K5.js.map +6 -0
- package/dist/chunks/session-step-2VZM3CCA.js +26 -0
- package/dist/chunks/session-step-2VZM3CCA.js.map +6 -0
- package/dist/chunks/skills-KAZJYGX5.js +282 -0
- package/dist/chunks/skills-KAZJYGX5.js.map +6 -0
- package/dist/chunks/state-263OUKQA.js +717 -0
- package/dist/chunks/state-263OUKQA.js.map +6 -0
- package/dist/chunks/store-3XLCJ7EL.js +42 -0
- package/dist/chunks/store-3XLCJ7EL.js.map +6 -0
- package/dist/chunks/store-KN65QI2M.js +82 -0
- package/dist/chunks/store-KN65QI2M.js.map +6 -0
- package/dist/chunks/store-X3TESBIN.js +34 -0
- package/dist/chunks/store-X3TESBIN.js.map +6 -0
- package/dist/chunks/tui-5MU7JBXX.js +56703 -0
- package/dist/chunks/tui-5MU7JBXX.js.map +6 -0
- package/dist/chunks/upgrade-BYM4MWBC.js +315 -0
- package/dist/chunks/upgrade-BYM4MWBC.js.map +6 -0
- package/dist/chunks/webapi-6HUHZUAH.js +2715 -0
- package/dist/chunks/webapi-6HUHZUAH.js.map +6 -0
- package/dist/chunks/worktree-K3ZIPXRM.js +116 -0
- package/dist/chunks/worktree-K3ZIPXRM.js.map +6 -0
- package/dist/cli-runtime.d.ts +19 -0
- package/dist/cli-runtime.d.ts.map +1 -0
- package/dist/cli.d.ts +0 -15
- package/dist/cli.d.ts.map +1 -1
- package/dist/commands/acp-harness.d.ts +64 -0
- package/dist/commands/acp-harness.d.ts.map +1 -0
- package/dist/commands/acp-provider-retry.d.ts +27 -0
- package/dist/commands/acp-provider-retry.d.ts.map +1 -0
- package/dist/commands/acp.d.ts +134 -3
- package/dist/commands/acp.d.ts.map +1 -1
- package/dist/commands/computer.d.ts +3 -0
- package/dist/commands/computer.d.ts.map +1 -0
- package/dist/commands/desktop-host-changes.d.ts +65 -0
- package/dist/commands/desktop-host-changes.d.ts.map +1 -0
- package/dist/commands/desktop-host-header.d.ts +30 -0
- package/dist/commands/desktop-host-header.d.ts.map +1 -0
- package/dist/commands/desktop-host.d.ts +354 -0
- package/dist/commands/desktop-host.d.ts.map +1 -0
- package/dist/commands/desktop-model-catalogue.d.ts +25 -0
- package/dist/commands/desktop-model-catalogue.d.ts.map +1 -0
- package/dist/commands/effort-levels.d.ts +3 -0
- package/dist/commands/effort-levels.d.ts.map +1 -0
- package/dist/commands/exec-flags.d.ts +4 -0
- package/dist/commands/exec-flags.d.ts.map +1 -1
- package/dist/commands/exec.d.ts.map +1 -1
- package/dist/commands/lazy.d.ts +20 -0
- package/dist/commands/lazy.d.ts.map +1 -0
- package/dist/commands/manifest.d.ts +33 -0
- package/dist/commands/manifest.d.ts.map +1 -0
- package/dist/commands/mcp.d.ts +3 -0
- package/dist/commands/mcp.d.ts.map +1 -1
- package/dist/commands/pal.d.ts +5 -0
- package/dist/commands/pal.d.ts.map +1 -0
- package/dist/commands/permission-preview.d.ts +38 -0
- package/dist/commands/permission-preview.d.ts.map +1 -0
- package/dist/commands/registry.d.ts +10 -0
- package/dist/commands/registry.d.ts.map +1 -1
- package/dist/commands/serve.d.ts +1 -12
- package/dist/commands/serve.d.ts.map +1 -1
- package/dist/commands/stdin.d.ts.map +1 -1
- package/dist/commands/upgrade.d.ts +14 -0
- package/dist/commands/upgrade.d.ts.map +1 -1
- package/dist/compile-cache-enable.d.ts +2 -0
- package/dist/compile-cache-enable.d.ts.map +1 -0
- package/dist/compile-cache.d.ts +53 -0
- package/dist/compile-cache.d.ts.map +1 -0
- package/dist/computer/bundle.d.ts +18 -0
- package/dist/computer/bundle.d.ts.map +1 -0
- package/dist/computer/run.d.ts +26 -0
- package/dist/computer/run.d.ts.map +1 -0
- package/dist/computer/sentences.d.ts +30 -0
- package/dist/computer/sentences.d.ts.map +1 -0
- package/dist/config/load.d.ts +10 -1
- package/dist/config/load.d.ts.map +1 -1
- package/dist/context/capabilities.d.ts +25 -2
- package/dist/context/capabilities.d.ts.map +1 -1
- package/dist/context/runtime-message.d.ts.map +1 -1
- package/dist/crash-report.d.ts +22 -0
- package/dist/crash-report.d.ts.map +1 -0
- package/dist/debug-requested.d.ts +7 -0
- package/dist/debug-requested.d.ts.map +1 -0
- package/dist/doctor/checks/credentials.d.ts.map +1 -1
- package/dist/exit-codes.d.ts +9 -1
- package/dist/exit-codes.d.ts.map +1 -1
- package/dist/index.js +105 -17
- package/dist/index.js.map +6 -1
- package/dist/integrations/harness/claude-adapter.d.ts +20 -0
- package/dist/integrations/harness/claude-adapter.d.ts.map +1 -0
- package/dist/integrations/harness/claude-protocol.d.ts +67 -0
- package/dist/integrations/harness/claude-protocol.d.ts.map +1 -0
- package/dist/integrations/harness/codex-adapter.d.ts +80 -0
- package/dist/integrations/harness/codex-adapter.d.ts.map +1 -0
- package/dist/integrations/harness/codex-protocol.d.ts +22 -0
- package/dist/integrations/harness/codex-protocol.d.ts.map +1 -0
- package/dist/integrations/harness/model-cache.d.ts +16 -0
- package/dist/integrations/harness/model-cache.d.ts.map +1 -0
- package/dist/integrations/harness/native-executable.d.ts +8 -0
- package/dist/integrations/harness/native-executable.d.ts.map +1 -0
- package/dist/integrations/harness/process.d.ts +25 -0
- package/dist/integrations/harness/process.d.ts.map +1 -0
- package/dist/integrations/mcp/servers.d.ts.map +1 -1
- package/dist/integrations/peers/runtime.d.ts +64 -0
- package/dist/integrations/peers/runtime.d.ts.map +1 -0
- package/dist/integrations/plugins/inventory.d.ts +27 -0
- package/dist/integrations/plugins/inventory.d.ts.map +1 -0
- package/dist/integrations/providers/composer-settings.d.ts +33 -0
- package/dist/integrations/providers/composer-settings.d.ts.map +1 -0
- package/dist/integrations/providers/connections.d.ts +37 -0
- package/dist/integrations/providers/connections.d.ts.map +1 -0
- package/dist/integrations/providers/credential-store.d.ts +35 -0
- package/dist/integrations/providers/credential-store.d.ts.map +1 -1
- package/dist/integrations/providers/discover.d.ts +27 -1
- package/dist/integrations/providers/discover.d.ts.map +1 -1
- package/dist/integrations/providers/index.d.ts +2 -2
- package/dist/integrations/providers/index.d.ts.map +1 -1
- package/dist/integrations/providers/picker-operation.d.ts +6 -0
- package/dist/integrations/providers/picker-operation.d.ts.map +1 -0
- package/dist/integrations/providers/setup.d.ts +16 -1
- package/dist/integrations/providers/setup.d.ts.map +1 -1
- package/dist/integrations/resident/runner-worker.js +190 -161
- package/dist/integrations/resident/runner-worker.js.map +6 -1
- package/dist/integrations/resident/session-step.d.ts.map +1 -1
- package/dist/integrations/sessions/display-title.d.ts +8 -0
- package/dist/integrations/sessions/display-title.d.ts.map +1 -1
- package/dist/integrations/sessions/store.d.ts +23 -9
- package/dist/integrations/sessions/store.d.ts.map +1 -1
- package/dist/integrations/sessions/task-context.d.ts +1 -1
- package/dist/integrations/sessions/task-context.d.ts.map +1 -1
- package/dist/integrations/sessions/transcript-export.d.ts.map +1 -1
- package/dist/integrations/subagents/activity.d.ts +9 -6
- package/dist/integrations/subagents/activity.d.ts.map +1 -1
- package/dist/integrations/subagents/operator-journal.d.ts +20 -0
- package/dist/integrations/subagents/operator-journal.d.ts.map +1 -0
- package/dist/integrations/subagents/runtime.d.ts +11 -0
- package/dist/integrations/subagents/runtime.d.ts.map +1 -1
- package/dist/integrations/trust/store.d.ts +14 -0
- package/dist/integrations/trust/store.d.ts.map +1 -1
- package/dist/integrations/web/search.d.ts +1 -1
- package/dist/pals/actions.d.ts +57 -0
- package/dist/pals/actions.d.ts.map +1 -0
- package/dist/pals/activity-command.d.ts +3 -0
- package/dist/pals/activity-command.d.ts.map +1 -0
- package/dist/pals/activity.d.ts +18 -0
- package/dist/pals/activity.d.ts.map +1 -0
- package/dist/pals/agent-session.d.ts +19 -0
- package/dist/pals/agent-session.d.ts.map +1 -0
- package/dist/pals/channel-actions.d.ts +5 -0
- package/dist/pals/channel-actions.d.ts.map +1 -0
- package/dist/pals/channel-local.d.ts +7 -0
- package/dist/pals/channel-local.d.ts.map +1 -0
- package/dist/pals/channel.d.ts +20 -0
- package/dist/pals/channel.d.ts.map +1 -0
- package/dist/pals/chat.d.ts +6 -0
- package/dist/pals/chat.d.ts.map +1 -0
- package/dist/pals/communication.d.ts +47 -0
- package/dist/pals/communication.d.ts.map +1 -0
- package/dist/pals/conversations.d.ts +26 -0
- package/dist/pals/conversations.d.ts.map +1 -0
- package/dist/pals/desktop-communication.d.ts +111 -0
- package/dist/pals/desktop-communication.d.ts.map +1 -0
- package/dist/pals/dispatch.d.ts +13 -0
- package/dist/pals/dispatch.d.ts.map +1 -0
- package/dist/pals/environment.d.ts +103 -0
- package/dist/pals/environment.d.ts.map +1 -0
- package/dist/pals/guest-mcp-transport.d.ts +28 -0
- package/dist/pals/guest-mcp-transport.d.ts.map +1 -0
- package/dist/pals/guest-mcp.d.ts +22 -0
- package/dist/pals/guest-mcp.d.ts.map +1 -0
- package/dist/pals/inbox-start.d.ts +35 -0
- package/dist/pals/inbox-start.d.ts.map +1 -0
- package/dist/pals/message-command.d.ts +3 -0
- package/dist/pals/message-command.d.ts.map +1 -0
- package/dist/pals/operator-tools.d.ts +23 -0
- package/dist/pals/operator-tools.d.ts.map +1 -0
- package/dist/pals/public-transcript.d.ts +4 -0
- package/dist/pals/public-transcript.d.ts.map +1 -0
- package/dist/pals/review.d.ts +16 -0
- package/dist/pals/review.d.ts.map +1 -0
- package/dist/pals/store.d.ts +16 -0
- package/dist/pals/store.d.ts.map +1 -0
- package/dist/pals/tui-session.d.ts +11 -0
- package/dist/pals/tui-session.d.ts.map +1 -0
- package/dist/permissions/mode-names.d.ts +2 -0
- package/dist/permissions/mode-names.d.ts.map +1 -0
- package/dist/resume-invocation.d.ts +1 -1
- package/dist/resume-invocation.d.ts.map +1 -1
- package/dist/resume-shell.d.ts +8 -0
- package/dist/resume-shell.d.ts.map +1 -0
- package/dist/schedule/build.d.ts +12 -3
- package/dist/schedule/build.d.ts.map +1 -1
- package/dist/schedule/commands/add.d.ts +1 -1
- package/dist/schedule/commands/add.d.ts.map +1 -1
- package/dist/schedule/commands/lifecycle.d.ts.map +1 -1
- package/dist/schedule/commands/list.d.ts +3 -1
- package/dist/schedule/commands/list.d.ts.map +1 -1
- package/dist/schedule/daemon/daemon.d.ts +2 -0
- package/dist/schedule/daemon/daemon.d.ts.map +1 -1
- package/dist/schedule/delivery.d.ts +66 -0
- package/dist/schedule/delivery.d.ts.map +1 -0
- package/dist/schedule/fire/fire.d.ts +1 -1
- package/dist/schedule/fire/fire.d.ts.map +1 -1
- package/dist/schedule/fire/run-script.d.ts +2 -2
- package/dist/schedule/fire/run-script.d.ts.map +1 -1
- package/dist/schedule/fire/script-report.d.ts +31 -0
- package/dist/schedule/fire/script-report.d.ts.map +1 -0
- package/dist/schedule/floor.d.ts +1 -1
- package/dist/schedule/floor.d.ts.map +1 -1
- package/dist/schedule/folder.d.ts +6 -0
- package/dist/schedule/folder.d.ts.map +1 -1
- package/dist/schedule/resume-command.d.ts +3 -3
- package/dist/schedule/resume-command.d.ts.map +1 -1
- package/dist/schedule/store/history.d.ts.map +1 -1
- package/dist/schedule/store/jobs.d.ts +6 -6
- package/dist/schedule/store/jobs.d.ts.map +1 -1
- package/dist/schedule/store/script-state.d.ts +31 -0
- package/dist/schedule/store/script-state.d.ts.map +1 -0
- package/dist/schedule/store/state.d.ts +4 -2
- package/dist/schedule/store/state.d.ts.map +1 -1
- package/dist/schedule/types.d.ts +61 -16
- package/dist/schedule/types.d.ts.map +1 -1
- package/dist/skills/store.d.ts.map +1 -1
- package/dist/terminal/host.d.ts +22 -0
- package/dist/terminal/host.d.ts.map +1 -0
- package/dist/terminal/manager.d.ts +124 -0
- package/dist/terminal/manager.d.ts.map +1 -0
- package/dist/terminal/protocol.d.ts +162 -0
- package/dist/terminal/protocol.d.ts.map +1 -0
- package/dist/terminal/pty.d.ts +85 -0
- package/dist/terminal/pty.d.ts.map +1 -0
- package/dist/terminal/ring.d.ts +23 -0
- package/dist/terminal/ring.d.ts.map +1 -0
- package/dist/terminal/screen.d.ts +31 -0
- package/dist/terminal/screen.d.ts.map +1 -0
- package/dist/termination-state.d.ts +19 -0
- package/dist/termination-state.d.ts.map +1 -0
- package/dist/termination.d.ts +2 -9
- package/dist/termination.d.ts.map +1 -1
- package/dist/tui/AgentExplorer.d.ts +4 -1
- package/dist/tui/AgentExplorer.d.ts.map +1 -1
- package/dist/tui/App.d.ts.map +1 -1
- package/dist/tui/BackgroundJobsPanel.d.ts +26 -0
- package/dist/tui/BackgroundJobsPanel.d.ts.map +1 -0
- package/dist/tui/BrandHeader.d.ts.map +1 -1
- package/dist/tui/ChildComposer.d.ts +22 -0
- package/dist/tui/ChildComposer.d.ts.map +1 -0
- package/dist/tui/ChoicePicker.d.ts.map +1 -1
- package/dist/tui/Composer.d.ts +25 -4
- package/dist/tui/Composer.d.ts.map +1 -1
- package/dist/tui/ComposerFrame.d.ts.map +1 -1
- package/dist/tui/CopyPicker.d.ts.map +1 -1
- package/dist/tui/EditPromptPicker.d.ts.map +1 -1
- package/dist/tui/EffortSlider.d.ts.map +1 -1
- package/dist/tui/LiveActivity.d.ts +7 -1
- package/dist/tui/LiveActivity.d.ts.map +1 -1
- package/dist/tui/Markdown.d.ts.map +1 -1
- package/dist/tui/PendingInputPanel.d.ts +34 -0
- package/dist/tui/PendingInputPanel.d.ts.map +1 -0
- package/dist/tui/PermissionOverlay.d.ts.map +1 -1
- package/dist/tui/Picker.d.ts.map +1 -1
- package/dist/tui/ProviderSetup.d.ts.map +1 -1
- package/dist/tui/ResumePicker.d.ts.map +1 -1
- package/dist/tui/SaveSkillOverlay.d.ts.map +1 -1
- package/dist/tui/ScheduleReviewOverlay.d.ts +1 -1
- package/dist/tui/ScheduleReviewOverlay.d.ts.map +1 -1
- package/dist/tui/StatusBar.d.ts +7 -1
- package/dist/tui/StatusBar.d.ts.map +1 -1
- package/dist/tui/StatusPanel.d.ts.map +1 -1
- package/dist/tui/TextPrompt.d.ts.map +1 -1
- package/dist/tui/ToolOutputViewer.d.ts.map +1 -1
- package/dist/tui/Transcript.d.ts.map +1 -1
- package/dist/tui/TrustPrompt.d.ts +8 -0
- package/dist/tui/TrustPrompt.d.ts.map +1 -1
- package/dist/tui/agent.d.ts +135 -6
- package/dist/tui/agent.d.ts.map +1 -1
- package/dist/tui/browser-notices.d.ts.map +1 -1
- package/dist/tui/capability-notice.d.ts +38 -0
- package/dist/tui/capability-notice.d.ts.map +1 -0
- package/dist/tui/console-input.d.ts +31 -0
- package/dist/tui/console-input.d.ts.map +1 -0
- package/dist/tui/conversation-evidence-view.d.ts.map +1 -1
- package/dist/tui/credential-entry.d.ts.map +1 -1
- package/dist/tui/exit-summary.d.ts +9 -1
- package/dist/tui/exit-summary.d.ts.map +1 -1
- package/dist/tui/external-editor.d.ts.map +1 -1
- package/dist/tui/index.d.ts.map +1 -1
- package/dist/tui/key-hints.d.ts +51 -0
- package/dist/tui/key-hints.d.ts.map +1 -0
- package/dist/tui/launch-settings.d.ts +34 -0
- package/dist/tui/launch-settings.d.ts.map +1 -0
- package/dist/tui/log-pane.d.ts.map +1 -1
- package/dist/tui/model-choices.d.ts +39 -1
- package/dist/tui/model-choices.d.ts.map +1 -1
- package/dist/tui/model-search.d.ts +4 -1
- package/dist/tui/model-search.d.ts.map +1 -1
- package/dist/tui/output-size-watch.d.ts +32 -0
- package/dist/tui/output-size-watch.d.ts.map +1 -0
- package/dist/tui/permission-review.d.ts.map +1 -1
- package/dist/tui/person-terms.d.ts +58 -0
- package/dist/tui/person-terms.d.ts.map +1 -0
- package/dist/tui/plain-failure.d.ts +27 -0
- package/dist/tui/plain-failure.d.ts.map +1 -0
- package/dist/tui/plain-interruption.d.ts +46 -0
- package/dist/tui/plain-interruption.d.ts.map +1 -0
- package/dist/tui/provider-list.d.ts.map +1 -1
- package/dist/tui/render-mode.d.ts +19 -0
- package/dist/tui/render-mode.d.ts.map +1 -0
- package/dist/tui/schedule/host-commands.d.ts +2 -9
- package/dist/tui/schedule/host-commands.d.ts.map +1 -1
- package/dist/tui/schedule/integration.d.ts +8 -0
- package/dist/tui/schedule/integration.d.ts.map +1 -1
- package/dist/tui/schedule/source-deliveries.d.ts +37 -0
- package/dist/tui/schedule/source-deliveries.d.ts.map +1 -0
- package/dist/tui/schedule/startup.d.ts.map +1 -1
- package/dist/tui/schedule/tool-host.d.ts +3 -1
- package/dist/tui/schedule/tool-host.d.ts.map +1 -1
- package/dist/tui/setup-text.d.ts +14 -0
- package/dist/tui/setup-text.d.ts.map +1 -0
- package/dist/tui/shell-escape.d.ts.map +1 -1
- package/dist/tui/skills/suggest-setting.d.ts.map +1 -1
- package/dist/tui/slashCommands.d.ts +9 -2
- package/dist/tui/slashCommands.d.ts.map +1 -1
- package/dist/tui/terminal-choice-text.d.ts +7 -0
- package/dist/tui/terminal-choice-text.d.ts.map +1 -1
- package/dist/tui/tidy-tool-output.d.ts +83 -0
- package/dist/tui/tidy-tool-output.d.ts.map +1 -0
- package/dist/tui/tool-presentation.d.ts +6 -0
- package/dist/tui/tool-presentation.d.ts.map +1 -0
- package/dist/tui/triggers/copy.d.ts.map +1 -1
- package/dist/tui/triggers/setting.d.ts.map +1 -1
- package/dist/tui/turn-interruption.d.ts +1 -1
- package/dist/tui/turn-interruption.d.ts.map +1 -1
- package/dist/tui/turn-limits-settings.d.ts +4 -4
- package/dist/tui/turn-limits-settings.d.ts.map +1 -1
- package/dist/tui/types.d.ts +10 -0
- package/dist/tui/types.d.ts.map +1 -1
- package/dist/tui/web-activity.d.ts +3 -2
- package/dist/tui/web-activity.d.ts.map +1 -1
- package/dist/tui/zen-free-refusal.d.ts +17 -0
- package/dist/tui/zen-free-refusal.d.ts.map +1 -0
- package/dist/usage-error.d.ts +15 -0
- package/dist/usage-error.d.ts.map +1 -0
- package/dist/warning-filter.d.ts +30 -0
- package/dist/warning-filter.d.ts.map +1 -0
- package/package.json +22 -11
- package/skills/schedule-task/SKILL.md +74 -20
- package/dist/browser/commands.js +0 -365
- package/dist/browser/commands.js.map +0 -1
- package/dist/browser/control.js +0 -140
- package/dist/browser/control.js.map +0 -1
- package/dist/browser/describe.js +0 -27
- package/dist/browser/describe.js.map +0 -1
- package/dist/checkpoints/store.js +0 -192
- package/dist/checkpoints/store.js.map +0 -1
- package/dist/checkpoints/wrap.js +0 -37
- package/dist/checkpoints/wrap.js.map +0 -1
- package/dist/cli.js +0 -602
- package/dist/cli.js.map +0 -1
- package/dist/commands/acp.js +0 -388
- package/dist/commands/acp.js.map +0 -1
- package/dist/commands/archive.js +0 -65
- package/dist/commands/archive.js.map +0 -1
- package/dist/commands/browser.js +0 -16
- package/dist/commands/browser.js.map +0 -1
- package/dist/commands/doctor.js +0 -267
- package/dist/commands/doctor.js.map +0 -1
- package/dist/commands/drain.js +0 -498
- package/dist/commands/drain.js.map +0 -1
- package/dist/commands/eval.js +0 -237
- package/dist/commands/eval.js.map +0 -1
- package/dist/commands/exec-flags.js +0 -334
- package/dist/commands/exec-flags.js.map +0 -1
- package/dist/commands/exec-json.js +0 -497
- package/dist/commands/exec-json.js.map +0 -1
- package/dist/commands/exec.js +0 -688
- package/dist/commands/exec.js.map +0 -1
- package/dist/commands/host-queries.js +0 -156
- package/dist/commands/host-queries.js.map +0 -1
- package/dist/commands/login.js +0 -315
- package/dist/commands/login.js.map +0 -1
- package/dist/commands/mcp-oauth-login.js +0 -213
- package/dist/commands/mcp-oauth-login.js.map +0 -1
- package/dist/commands/mcp.js +0 -288
- package/dist/commands/mcp.js.map +0 -1
- package/dist/commands/prior-messages.js +0 -329
- package/dist/commands/prior-messages.js.map +0 -1
- package/dist/commands/provider-wait.js +0 -65
- package/dist/commands/provider-wait.js.map +0 -1
- package/dist/commands/registry.js +0 -40
- package/dist/commands/registry.js.map +0 -1
- package/dist/commands/resident-flags.js +0 -193
- package/dist/commands/resident-flags.js.map +0 -1
- package/dist/commands/resident-learning.js +0 -293
- package/dist/commands/resident-learning.js.map +0 -1
- package/dist/commands/resident.js +0 -419
- package/dist/commands/resident.js.map +0 -1
- package/dist/commands/resume.js +0 -109
- package/dist/commands/resume.js.map +0 -1
- package/dist/commands/schedule.js +0 -131
- package/dist/commands/schedule.js.map +0 -1
- package/dist/commands/serve.js +0 -21
- package/dist/commands/serve.js.map +0 -1
- package/dist/commands/skills.js +0 -178
- package/dist/commands/skills.js.map +0 -1
- package/dist/commands/state.js +0 -110
- package/dist/commands/state.js.map +0 -1
- package/dist/commands/stdin.js +0 -69
- package/dist/commands/stdin.js.map +0 -1
- package/dist/commands/types.js +0 -2
- package/dist/commands/types.js.map +0 -1
- package/dist/commands/upgrade-progress.js +0 -54
- package/dist/commands/upgrade-progress.js.map +0 -1
- package/dist/commands/upgrade.js +0 -232
- package/dist/commands/upgrade.js.map +0 -1
- package/dist/commands/worktree.js +0 -86
- package/dist/commands/worktree.js.map +0 -1
- package/dist/config/composer-triggers.js +0 -80
- package/dist/config/composer-triggers.js.map +0 -1
- package/dist/config/debug.js +0 -126
- package/dist/config/debug.js.map +0 -1
- package/dist/config/load.js +0 -1208
- package/dist/config/load.js.map +0 -1
- package/dist/config/schema.js +0 -13
- package/dist/config/schema.js.map +0 -1
- package/dist/config/tool-result-screens.js +0 -104
- package/dist/config/tool-result-screens.js.map +0 -1
- package/dist/config/trusted-project-context.js +0 -28
- package/dist/config/trusted-project-context.js.map +0 -1
- package/dist/config/turn-guards.js +0 -46
- package/dist/config/turn-guards.js.map +0 -1
- package/dist/config/user-config.js +0 -118
- package/dist/config/user-config.js.map +0 -1
- package/dist/context/capabilities.js +0 -164
- package/dist/context/capabilities.js.map +0 -1
- package/dist/context/directories.js +0 -69
- package/dist/context/directories.js.map +0 -1
- package/dist/context/doctrine.js +0 -24
- package/dist/context/doctrine.js.map +0 -1
- package/dist/context/environment.js +0 -255
- package/dist/context/environment.js.map +0 -1
- package/dist/context/project-path.js +0 -16
- package/dist/context/project-path.js.map +0 -1
- package/dist/context/project-tracker.js +0 -217
- package/dist/context/project-tracker.js.map +0 -1
- package/dist/context/project.js +0 -256
- package/dist/context/project.js.map +0 -1
- package/dist/context/runtime-message.js +0 -30
- package/dist/context/runtime-message.js.map +0 -1
- package/dist/context/sandbox.js +0 -114
- package/dist/context/sandbox.js.map +0 -1
- package/dist/context/turn-snapshot.js +0 -122
- package/dist/context/turn-snapshot.js.map +0 -1
- package/dist/doctor/checks/browser.js +0 -63
- package/dist/doctor/checks/browser.js.map +0 -1
- package/dist/doctor/checks/chain.js +0 -211
- package/dist/doctor/checks/chain.js.map +0 -1
- package/dist/doctor/checks/credentials.js +0 -98
- package/dist/doctor/checks/credentials.js.map +0 -1
- package/dist/doctor/checks/index.js +0 -72
- package/dist/doctor/checks/index.js.map +0 -1
- package/dist/doctor/checks/invariants.js +0 -79
- package/dist/doctor/checks/invariants.js.map +0 -1
- package/dist/doctor/checks/logging.js +0 -69
- package/dist/doctor/checks/logging.js.map +0 -1
- package/dist/doctor/checks/providers.js +0 -30
- package/dist/doctor/checks/providers.js.map +0 -1
- package/dist/doctor/checks/runtime.js +0 -40
- package/dist/doctor/checks/runtime.js.map +0 -1
- package/dist/doctor/checks/sandbox.js +0 -76
- package/dist/doctor/checks/sandbox.js.map +0 -1
- package/dist/doctor/checks/scheduler.js +0 -74
- package/dist/doctor/checks/scheduler.js.map +0 -1
- package/dist/doctor/checks/session-export.js +0 -62
- package/dist/doctor/checks/session-export.js.map +0 -1
- package/dist/doctor/checks/telemetry.js +0 -58
- package/dist/doctor/checks/telemetry.js.map +0 -1
- package/dist/doctor/checks/vault.js +0 -67
- package/dist/doctor/checks/vault.js.map +0 -1
- package/dist/doctor/index.js +0 -3
- package/dist/doctor/index.js.map +0 -1
- package/dist/doctor/registry.js +0 -230
- package/dist/doctor/registry.js.map +0 -1
- package/dist/exit-codes.js +0 -62
- package/dist/exit-codes.js.map +0 -1
- package/dist/installation.js +0 -48
- package/dist/installation.js.map +0 -1
- package/dist/integrations/clipboard/image.js +0 -119
- package/dist/integrations/clipboard/image.js.map +0 -1
- package/dist/integrations/clipboard/text.js +0 -43
- package/dist/integrations/clipboard/text.js.map +0 -1
- package/dist/integrations/files/attachment-store.js +0 -86
- package/dist/integrations/files/attachment-store.js.map +0 -1
- package/dist/integrations/mcp/oauth-store.js +0 -549
- package/dist/integrations/mcp/oauth-store.js.map +0 -1
- package/dist/integrations/mcp/servers.js +0 -519
- package/dist/integrations/mcp/servers.js.map +0 -1
- package/dist/integrations/mcp/user-config.js +0 -92
- package/dist/integrations/mcp/user-config.js.map +0 -1
- package/dist/integrations/notifications/desktop/freedesktop.js +0 -33
- package/dist/integrations/notifications/desktop/freedesktop.js.map +0 -1
- package/dist/integrations/notifications/desktop/macos.js +0 -17
- package/dist/integrations/notifications/desktop/macos.js.map +0 -1
- package/dist/integrations/notifications/desktop/sanitize.js +0 -49
- package/dist/integrations/notifications/desktop/sanitize.js.map +0 -1
- package/dist/integrations/notifications/desktop/throttle.js +0 -39
- package/dist/integrations/notifications/desktop/throttle.js.map +0 -1
- package/dist/integrations/notifications/desktop/windows-toast.js +0 -56
- package/dist/integrations/notifications/desktop/windows-toast.js.map +0 -1
- package/dist/integrations/notifications/desktop.js +0 -199
- package/dist/integrations/notifications/desktop.js.map +0 -1
- package/dist/integrations/notifications/terminal.js +0 -46
- package/dist/integrations/notifications/terminal.js.map +0 -1
- package/dist/integrations/npm-invocation.js +0 -23
- package/dist/integrations/npm-invocation.js.map +0 -1
- package/dist/integrations/plugins/runtime.js +0 -189
- package/dist/integrations/plugins/runtime.js.map +0 -1
- package/dist/integrations/plugins/settings.js +0 -106
- package/dist/integrations/plugins/settings.js.map +0 -1
- package/dist/integrations/providers/access.js +0 -23
- package/dist/integrations/providers/access.js.map +0 -1
- package/dist/integrations/providers/chain-capabilities.js +0 -211
- package/dist/integrations/providers/chain-capabilities.js.map +0 -1
- package/dist/integrations/providers/codex-device-login.js +0 -195
- package/dist/integrations/providers/codex-device-login.js.map +0 -1
- package/dist/integrations/providers/codex-oauth.js +0 -95
- package/dist/integrations/providers/codex-oauth.js.map +0 -1
- package/dist/integrations/providers/credential-provider.js +0 -74
- package/dist/integrations/providers/credential-provider.js.map +0 -1
- package/dist/integrations/providers/credential-store.js +0 -657
- package/dist/integrations/providers/credential-store.js.map +0 -1
- package/dist/integrations/providers/current-credential.js +0 -45
- package/dist/integrations/providers/current-credential.js.map +0 -1
- package/dist/integrations/providers/discover.js +0 -313
- package/dist/integrations/providers/discover.js.map +0 -1
- package/dist/integrations/providers/gemini-credentials.js +0 -148
- package/dist/integrations/providers/gemini-credentials.js.map +0 -1
- package/dist/integrations/providers/harness-credentials.js +0 -344
- package/dist/integrations/providers/harness-credentials.js.map +0 -1
- package/dist/integrations/providers/identity.js +0 -64
- package/dist/integrations/providers/identity.js.map +0 -1
- package/dist/integrations/providers/index.js +0 -14
- package/dist/integrations/providers/index.js.map +0 -1
- package/dist/integrations/providers/keychain.js +0 -78
- package/dist/integrations/providers/keychain.js.map +0 -1
- package/dist/integrations/providers/model-reasoning.js +0 -51
- package/dist/integrations/providers/model-reasoning.js.map +0 -1
- package/dist/integrations/providers/oauth.js +0 -302
- package/dist/integrations/providers/oauth.js.map +0 -1
- package/dist/integrations/providers/preferences.js +0 -287
- package/dist/integrations/providers/preferences.js.map +0 -1
- package/dist/integrations/providers/register.js +0 -154
- package/dist/integrations/providers/register.js.map +0 -1
- package/dist/integrations/providers/registry.js +0 -289
- package/dist/integrations/providers/registry.js.map +0 -1
- package/dist/integrations/providers/setup.js +0 -158
- package/dist/integrations/providers/setup.js.map +0 -1
- package/dist/integrations/providers/subscription-login.js +0 -328
- package/dist/integrations/providers/subscription-login.js.map +0 -1
- package/dist/integrations/providers/zen-catalogue.js +0 -196
- package/dist/integrations/providers/zen-catalogue.js.map +0 -1
- package/dist/integrations/resident/foreground.js +0 -95
- package/dist/integrations/resident/foreground.js.map +0 -1
- package/dist/integrations/resident/inspection.js +0 -282
- package/dist/integrations/resident/inspection.js.map +0 -1
- package/dist/integrations/resident/learning-sources.js +0 -79
- package/dist/integrations/resident/learning-sources.js.map +0 -1
- package/dist/integrations/resident/learning-storage.js +0 -55
- package/dist/integrations/resident/learning-storage.js.map +0 -1
- package/dist/integrations/resident/lifecycle-errors.js +0 -15
- package/dist/integrations/resident/lifecycle-errors.js.map +0 -1
- package/dist/integrations/resident/owned-runner.js +0 -91
- package/dist/integrations/resident/owned-runner.js.map +0 -1
- package/dist/integrations/resident/runner-control.js +0 -238
- package/dist/integrations/resident/runner-control.js.map +0 -1
- package/dist/integrations/resident/runner-launch.js +0 -142
- package/dist/integrations/resident/runner-launch.js.map +0 -1
- package/dist/integrations/resident/runner-store.js +0 -284
- package/dist/integrations/resident/runner-store.js.map +0 -1
- package/dist/integrations/resident/session-log-reads.js +0 -125
- package/dist/integrations/resident/session-log-reads.js.map +0 -1
- package/dist/integrations/resident/session-step.js +0 -471
- package/dist/integrations/resident/session-step.js.map +0 -1
- package/dist/integrations/resident/storage.js +0 -183
- package/dist/integrations/resident/storage.js.map +0 -1
- package/dist/integrations/resident/tool-evidence.js +0 -123
- package/dist/integrations/resident/tool-evidence.js.map +0 -1
- package/dist/integrations/resident/verification.js +0 -109
- package/dist/integrations/resident/verification.js.map +0 -1
- package/dist/integrations/sessions/checkpoint-view.js +0 -48
- package/dist/integrations/sessions/checkpoint-view.js.map +0 -1
- package/dist/integrations/sessions/context-inventory.js +0 -44
- package/dist/integrations/sessions/context-inventory.js.map +0 -1
- package/dist/integrations/sessions/conversation-search.js +0 -572
- package/dist/integrations/sessions/conversation-search.js.map +0 -1
- package/dist/integrations/sessions/display-title.js +0 -5
- package/dist/integrations/sessions/display-title.js.map +0 -1
- package/dist/integrations/sessions/evidence-page-validation.js +0 -74
- package/dist/integrations/sessions/evidence-page-validation.js.map +0 -1
- package/dist/integrations/sessions/evidence-recall.js +0 -117
- package/dist/integrations/sessions/evidence-recall.js.map +0 -1
- package/dist/integrations/sessions/store.js +0 -780
- package/dist/integrations/sessions/store.js.map +0 -1
- package/dist/integrations/sessions/task-context.js +0 -96
- package/dist/integrations/sessions/task-context.js.map +0 -1
- package/dist/integrations/sessions/transcript-export.js +0 -342
- package/dist/integrations/sessions/transcript-export.js.map +0 -1
- package/dist/integrations/state/home.js +0 -17
- package/dist/integrations/state/home.js.map +0 -1
- package/dist/integrations/state/identity.js +0 -49
- package/dist/integrations/state/identity.js.map +0 -1
- package/dist/integrations/state/immutable-json.js +0 -38
- package/dist/integrations/state/immutable-json.js.map +0 -1
- package/dist/integrations/state/private-directory.js +0 -43
- package/dist/integrations/state/private-directory.js.map +0 -1
- package/dist/integrations/state/project.js +0 -13
- package/dist/integrations/state/project.js.map +0 -1
- package/dist/integrations/state/report.js +0 -626
- package/dist/integrations/state/report.js.map +0 -1
- package/dist/integrations/state/retention.js +0 -18
- package/dist/integrations/state/retention.js.map +0 -1
- package/dist/integrations/subagents/NamzuCliAgent.js +0 -9
- package/dist/integrations/subagents/NamzuCliAgent.js.map +0 -1
- package/dist/integrations/subagents/activity.js +0 -759
- package/dist/integrations/subagents/activity.js.map +0 -1
- package/dist/integrations/subagents/batches.js +0 -172
- package/dist/integrations/subagents/batches.js.map +0 -1
- package/dist/integrations/subagents/definitions.js +0 -26
- package/dist/integrations/subagents/definitions.js.map +0 -1
- package/dist/integrations/subagents/model-effort.js +0 -12
- package/dist/integrations/subagents/model-effort.js.map +0 -1
- package/dist/integrations/subagents/parent.js +0 -47
- package/dist/integrations/subagents/parent.js.map +0 -1
- package/dist/integrations/subagents/policy.js +0 -3
- package/dist/integrations/subagents/policy.js.map +0 -1
- package/dist/integrations/subagents/replay.js +0 -295
- package/dist/integrations/subagents/replay.js.map +0 -1
- package/dist/integrations/subagents/runtime.js +0 -1317
- package/dist/integrations/subagents/runtime.js.map +0 -1
- package/dist/integrations/subagents/saved-agents.js +0 -102
- package/dist/integrations/subagents/saved-agents.js.map +0 -1
- package/dist/integrations/subagents/slash.js +0 -45
- package/dist/integrations/subagents/slash.js.map +0 -1
- package/dist/integrations/subagents/worktree-driver.js +0 -72
- package/dist/integrations/subagents/worktree-driver.js.map +0 -1
- package/dist/integrations/telemetry/session-export.js +0 -119
- package/dist/integrations/telemetry/session-export.js.map +0 -1
- package/dist/integrations/trust/store.js +0 -73
- package/dist/integrations/trust/store.js.map +0 -1
- package/dist/integrations/updates.js +0 -115
- package/dist/integrations/updates.js.map +0 -1
- package/dist/integrations/web/exa-search.js +0 -154
- package/dist/integrations/web/exa-search.js.map +0 -1
- package/dist/integrations/web/open-url.js +0 -73
- package/dist/integrations/web/open-url.js.map +0 -1
- package/dist/integrations/web/search.js +0 -68
- package/dist/integrations/web/search.js.map +0 -1
- package/dist/integrations/worktrees/managed.js +0 -231
- package/dist/integrations/worktrees/managed.js.map +0 -1
- package/dist/logging.js +0 -115
- package/dist/logging.js.map +0 -1
- package/dist/memory/io.js +0 -177
- package/dist/memory/io.js.map +0 -1
- package/dist/memory/presentation.js +0 -76
- package/dist/memory/presentation.js.map +0 -1
- package/dist/memory/store.js +0 -180
- package/dist/memory/store.js.map +0 -1
- package/dist/memory/typed.js +0 -336
- package/dist/memory/typed.js.map +0 -1
- package/dist/output/formatter.js +0 -16
- package/dist/output/formatter.js.map +0 -1
- package/dist/output/index.js +0 -22
- package/dist/output/index.js.map +0 -1
- package/dist/output/json.js +0 -51
- package/dist/output/json.js.map +0 -1
- package/dist/output/text.js +0 -50
- package/dist/output/text.js.map +0 -1
- package/dist/output/yaml.js +0 -26
- package/dist/output/yaml.js.map +0 -1
- package/dist/output-schema.js +0 -18
- package/dist/output-schema.js.map +0 -1
- package/dist/permissions/browser-sites.js +0 -270
- package/dist/permissions/browser-sites.js.map +0 -1
- package/dist/permissions/canonical-project.js +0 -13
- package/dist/permissions/canonical-project.js.map +0 -1
- package/dist/permissions/checks.js +0 -128
- package/dist/permissions/checks.js.map +0 -1
- package/dist/permissions/headless-trust.js +0 -86
- package/dist/permissions/headless-trust.js.map +0 -1
- package/dist/permissions/live-mode.js +0 -62
- package/dist/permissions/live-mode.js.map +0 -1
- package/dist/permissions/mode.js +0 -65
- package/dist/permissions/mode.js.map +0 -1
- package/dist/permissions/rules.js +0 -358
- package/dist/permissions/rules.js.map +0 -1
- package/dist/release-notes.js +0 -64
- package/dist/release-notes.js.map +0 -1
- package/dist/resume-invocation.js +0 -24
- package/dist/resume-invocation.js.map +0 -1
- package/dist/schedule/build.js +0 -374
- package/dist/schedule/build.js.map +0 -1
- package/dist/schedule/changes.js +0 -78
- package/dist/schedule/changes.js.map +0 -1
- package/dist/schedule/commands/add.js +0 -603
- package/dist/schedule/commands/add.js.map +0 -1
- package/dist/schedule/commands/args.js +0 -80
- package/dist/schedule/commands/args.js.map +0 -1
- package/dist/schedule/commands/confirm-prompt.js +0 -21
- package/dist/schedule/commands/confirm-prompt.js.map +0 -1
- package/dist/schedule/commands/lifecycle.js +0 -586
- package/dist/schedule/commands/lifecycle.js.map +0 -1
- package/dist/schedule/commands/list.js +0 -260
- package/dist/schedule/commands/list.js.map +0 -1
- package/dist/schedule/commands/logs.js +0 -106
- package/dist/schedule/commands/logs.js.map +0 -1
- package/dist/schedule/commands/service.js +0 -458
- package/dist/schedule/commands/service.js.map +0 -1
- package/dist/schedule/daemon/daemon.js +0 -1265
- package/dist/schedule/daemon/daemon.js.map +0 -1
- package/dist/schedule/daemon/endpoint.js +0 -158
- package/dist/schedule/daemon/endpoint.js.map +0 -1
- package/dist/schedule/daemon/exit.js +0 -8
- package/dist/schedule/daemon/exit.js.map +0 -1
- package/dist/schedule/daemon/log.js +0 -53
- package/dist/schedule/daemon/log.js.map +0 -1
- package/dist/schedule/daemon/notify.js +0 -158
- package/dist/schedule/daemon/notify.js.map +0 -1
- package/dist/schedule/daemon/retention.js +0 -46
- package/dist/schedule/daemon/retention.js.map +0 -1
- package/dist/schedule/daemon/sessions.js +0 -52
- package/dist/schedule/daemon/sessions.js.map +0 -1
- package/dist/schedule/env.js +0 -106
- package/dist/schedule/env.js.map +0 -1
- package/dist/schedule/fire/browser-preflight.js +0 -73
- package/dist/schedule/fire/browser-preflight.js.map +0 -1
- package/dist/schedule/fire/calls.js +0 -114
- package/dist/schedule/fire/calls.js.map +0 -1
- package/dist/schedule/fire/fire.js +0 -681
- package/dist/schedule/fire/fire.js.map +0 -1
- package/dist/schedule/fire/result.js +0 -19
- package/dist/schedule/fire/result.js.map +0 -1
- package/dist/schedule/fire/run-script.js +0 -81
- package/dist/schedule/fire/run-script.js.map +0 -1
- package/dist/schedule/fire/unattended-note.js +0 -51
- package/dist/schedule/fire/unattended-note.js.map +0 -1
- package/dist/schedule/fire/wake-gate.js +0 -90
- package/dist/schedule/fire/wake-gate.js.map +0 -1
- package/dist/schedule/floor.js +0 -1561
- package/dist/schedule/floor.js.map +0 -1
- package/dist/schedule/folder.js +0 -84
- package/dist/schedule/folder.js.map +0 -1
- package/dist/schedule/paths.js +0 -53
- package/dist/schedule/paths.js.map +0 -1
- package/dist/schedule/policy.js +0 -414
- package/dist/schedule/policy.js.map +0 -1
- package/dist/schedule/resume-command.js +0 -72
- package/dist/schedule/resume-command.js.map +0 -1
- package/dist/schedule/script-check.js +0 -146
- package/dist/schedule/script-check.js.map +0 -1
- package/dist/schedule/script-shell.js +0 -5
- package/dist/schedule/script-shell.js.map +0 -1
- package/dist/schedule/service/detect.js +0 -29
- package/dist/schedule/service/detect.js.map +0 -1
- package/dist/schedule/service/index.js +0 -361
- package/dist/schedule/service/index.js.map +0 -1
- package/dist/schedule/service/launchd.js +0 -84
- package/dist/schedule/service/launchd.js.map +0 -1
- package/dist/schedule/service/manifest.js +0 -16
- package/dist/schedule/service/manifest.js.map +0 -1
- package/dist/schedule/service/names.js +0 -22
- package/dist/schedule/service/names.js.map +0 -1
- package/dist/schedule/service/quote.js +0 -64
- package/dist/schedule/service/quote.js.map +0 -1
- package/dist/schedule/service/runner.js +0 -31
- package/dist/schedule/service/runner.js.map +0 -1
- package/dist/schedule/service/systemd.js +0 -96
- package/dist/schedule/service/systemd.js.map +0 -1
- package/dist/schedule/service/windows-task.js +0 -199
- package/dist/schedule/service/windows-task.js.map +0 -1
- package/dist/schedule/service/wsl.js +0 -121
- package/dist/schedule/service/wsl.js.map +0 -1
- package/dist/schedule/store/atomic.js +0 -138
- package/dist/schedule/store/atomic.js.map +0 -1
- package/dist/schedule/store/claims.js +0 -57
- package/dist/schedule/store/claims.js.map +0 -1
- package/dist/schedule/store/digest.js +0 -139
- package/dist/schedule/store/digest.js.map +0 -1
- package/dist/schedule/store/history.js +0 -117
- package/dist/schedule/store/history.js.map +0 -1
- package/dist/schedule/store/jobs.js +0 -277
- package/dist/schedule/store/jobs.js.map +0 -1
- package/dist/schedule/store/state.js +0 -38
- package/dist/schedule/store/state.js.map +0 -1
- package/dist/schedule/types.js +0 -33
- package/dist/schedule/types.js.map +0 -1
- package/dist/schedule/visible-source.js +0 -59
- package/dist/schedule/visible-source.js.map +0 -1
- package/dist/skills/audit.js +0 -75
- package/dist/skills/audit.js.map +0 -1
- package/dist/skills/catalog.js +0 -226
- package/dist/skills/catalog.js.map +0 -1
- package/dist/skills/directory.js +0 -51
- package/dist/skills/directory.js.map +0 -1
- package/dist/skills/save.js +0 -344
- package/dist/skills/save.js.map +0 -1
- package/dist/skills/store.js +0 -351
- package/dist/skills/store.js.map +0 -1
- package/dist/termination.js +0 -143
- package/dist/termination.js.map +0 -1
- package/dist/test-support/toolset.js +0 -27
- package/dist/test-support/toolset.js.map +0 -1
- package/dist/tui/AgentExplorer.js +0 -789
- package/dist/tui/AgentExplorer.js.map +0 -1
- package/dist/tui/App.js +0 -8209
- package/dist/tui/App.js.map +0 -1
- package/dist/tui/BrandHeader.js +0 -14
- package/dist/tui/BrandHeader.js.map +0 -1
- package/dist/tui/Checklist.js +0 -90
- package/dist/tui/Checklist.js.map +0 -1
- package/dist/tui/ChoicePicker.js +0 -64
- package/dist/tui/ChoicePicker.js.map +0 -1
- package/dist/tui/Composer.js +0 -908
- package/dist/tui/Composer.js.map +0 -1
- package/dist/tui/ComposerFrame.js +0 -79
- package/dist/tui/ComposerFrame.js.map +0 -1
- package/dist/tui/CopyPicker.js +0 -19
- package/dist/tui/CopyPicker.js.map +0 -1
- package/dist/tui/EditPromptPicker.js +0 -17
- package/dist/tui/EditPromptPicker.js.map +0 -1
- package/dist/tui/EffortSlider.js +0 -134
- package/dist/tui/EffortSlider.js.map +0 -1
- package/dist/tui/LiveActivity.js +0 -89
- package/dist/tui/LiveActivity.js.map +0 -1
- package/dist/tui/Markdown.js +0 -137
- package/dist/tui/Markdown.js.map +0 -1
- package/dist/tui/PermissionOverlay.js +0 -278
- package/dist/tui/PermissionOverlay.js.map +0 -1
- package/dist/tui/Picker.js +0 -1310
- package/dist/tui/Picker.js.map +0 -1
- package/dist/tui/ProviderSetup.js +0 -125
- package/dist/tui/ProviderSetup.js.map +0 -1
- package/dist/tui/ResumePicker.js +0 -34
- package/dist/tui/ResumePicker.js.map +0 -1
- package/dist/tui/SaveSkillOverlay.js +0 -118
- package/dist/tui/SaveSkillOverlay.js.map +0 -1
- package/dist/tui/ScheduleReviewOverlay.js +0 -166
- package/dist/tui/ScheduleReviewOverlay.js.map +0 -1
- package/dist/tui/StatusBar.js +0 -182
- package/dist/tui/StatusBar.js.map +0 -1
- package/dist/tui/StatusPanel.js +0 -11
- package/dist/tui/StatusPanel.js.map +0 -1
- package/dist/tui/TaskList.js +0 -43
- package/dist/tui/TaskList.js.map +0 -1
- package/dist/tui/TextPrompt.js +0 -185
- package/dist/tui/TextPrompt.js.map +0 -1
- package/dist/tui/ToolOutputViewer.js +0 -39
- package/dist/tui/ToolOutputViewer.js.map +0 -1
- package/dist/tui/Transcript.js +0 -235
- package/dist/tui/Transcript.js.map +0 -1
- package/dist/tui/TrustPrompt.js +0 -13
- package/dist/tui/TrustPrompt.js.map +0 -1
- package/dist/tui/ViewportBound.js +0 -55
- package/dist/tui/ViewportBound.js.map +0 -1
- package/dist/tui/agent-transcript-rows.js +0 -115
- package/dist/tui/agent-transcript-rows.js.map +0 -1
- package/dist/tui/agent.js +0 -4235
- package/dist/tui/agent.js.map +0 -1
- package/dist/tui/browser-notices.js +0 -107
- package/dist/tui/browser-notices.js.map +0 -1
- package/dist/tui/choice-selection.js +0 -38
- package/dist/tui/choice-selection.js.map +0 -1
- package/dist/tui/compact-transcript.js +0 -46
- package/dist/tui/compact-transcript.js.map +0 -1
- package/dist/tui/consent-timing.js +0 -48
- package/dist/tui/consent-timing.js.map +0 -1
- package/dist/tui/conversation-evidence-view.js +0 -96
- package/dist/tui/conversation-evidence-view.js.map +0 -1
- package/dist/tui/conversation-history.js +0 -33
- package/dist/tui/conversation-history.js.map +0 -1
- package/dist/tui/copy-targets.js +0 -189
- package/dist/tui/copy-targets.js.map +0 -1
- package/dist/tui/credential-entry.js +0 -134
- package/dist/tui/credential-entry.js.map +0 -1
- package/dist/tui/edit-prompts.js +0 -35
- package/dist/tui/edit-prompts.js.map +0 -1
- package/dist/tui/exit-summary.js +0 -30
- package/dist/tui/exit-summary.js.map +0 -1
- package/dist/tui/external-editor.js +0 -169
- package/dist/tui/external-editor.js.map +0 -1
- package/dist/tui/hypermode.js +0 -58
- package/dist/tui/hypermode.js.map +0 -1
- package/dist/tui/index.js +0 -81
- package/dist/tui/index.js.map +0 -1
- package/dist/tui/live-window.js +0 -281
- package/dist/tui/live-window.js.map +0 -1
- package/dist/tui/log-pane.js +0 -100
- package/dist/tui/log-pane.js.map +0 -1
- package/dist/tui/login-prompt.js +0 -105
- package/dist/tui/login-prompt.js.map +0 -1
- package/dist/tui/logo.js +0 -9
- package/dist/tui/logo.js.map +0 -1
- package/dist/tui/markdown-block-cache.js +0 -76
- package/dist/tui/markdown-block-cache.js.map +0 -1
- package/dist/tui/markdown-table.js +0 -175
- package/dist/tui/markdown-table.js.map +0 -1
- package/dist/tui/markdown-wrap.js +0 -189
- package/dist/tui/markdown-wrap.js.map +0 -1
- package/dist/tui/markdownParser.js +0 -237
- package/dist/tui/markdownParser.js.map +0 -1
- package/dist/tui/mentions.js +0 -150
- package/dist/tui/mentions.js.map +0 -1
- package/dist/tui/model-catalogue-view.js +0 -75
- package/dist/tui/model-catalogue-view.js.map +0 -1
- package/dist/tui/model-choices.js +0 -157
- package/dist/tui/model-choices.js.map +0 -1
- package/dist/tui/model-search.js +0 -28
- package/dist/tui/model-search.js.map +0 -1
- package/dist/tui/model-selection-intent.js +0 -96
- package/dist/tui/model-selection-intent.js.map +0 -1
- package/dist/tui/model-switch-tool.js +0 -74
- package/dist/tui/model-switch-tool.js.map +0 -1
- package/dist/tui/model-switch.js +0 -106
- package/dist/tui/model-switch.js.map +0 -1
- package/dist/tui/notices.js +0 -27
- package/dist/tui/notices.js.map +0 -1
- package/dist/tui/open-browser.js +0 -147
- package/dist/tui/open-browser.js.map +0 -1
- package/dist/tui/permission-review.js +0 -858
- package/dist/tui/permission-review.js.map +0 -1
- package/dist/tui/plugin-view.js +0 -59
- package/dist/tui/plugin-view.js.map +0 -1
- package/dist/tui/provider-list.js +0 -327
- package/dist/tui/provider-list.js.map +0 -1
- package/dist/tui/provider-selection.js +0 -16
- package/dist/tui/provider-selection.js.map +0 -1
- package/dist/tui/schedule/host-commands.js +0 -428
- package/dist/tui/schedule/host-commands.js.map +0 -1
- package/dist/tui/schedule/integration.js +0 -150
- package/dist/tui/schedule/integration.js.map +0 -1
- package/dist/tui/schedule/loop-host.js +0 -153
- package/dist/tui/schedule/loop-host.js.map +0 -1
- package/dist/tui/schedule/resume.js +0 -333
- package/dist/tui/schedule/resume.js.map +0 -1
- package/dist/tui/schedule/startup.js +0 -121
- package/dist/tui/schedule/startup.js.map +0 -1
- package/dist/tui/schedule/tool-host.js +0 -619
- package/dist/tui/schedule/tool-host.js.map +0 -1
- package/dist/tui/selection-window.js +0 -37
- package/dist/tui/selection-window.js.map +0 -1
- package/dist/tui/shell-escape.js +0 -110
- package/dist/tui/shell-escape.js.map +0 -1
- package/dist/tui/skills/learning.js +0 -131
- package/dist/tui/skills/learning.js.map +0 -1
- package/dist/tui/skills/suggest-setting.js +0 -55
- package/dist/tui/skills/suggest-setting.js.map +0 -1
- package/dist/tui/skills/suggestion-ledger.js +0 -52
- package/dist/tui/skills/suggestion-ledger.js.map +0 -1
- package/dist/tui/slashCommands.js +0 -1587
- package/dist/tui/slashCommands.js.map +0 -1
- package/dist/tui/status-card.js +0 -30
- package/dist/tui/status-card.js.map +0 -1
- package/dist/tui/status-panel-layout.js +0 -42
- package/dist/tui/status-panel-layout.js.map +0 -1
- package/dist/tui/stream-blocks.js +0 -187
- package/dist/tui/stream-blocks.js.map +0 -1
- package/dist/tui/task-activity.js +0 -157
- package/dist/tui/task-activity.js.map +0 -1
- package/dist/tui/terminal-choice-text.js +0 -118
- package/dist/tui/terminal-choice-text.js.map +0 -1
- package/dist/tui/terminal-display.js +0 -65
- package/dist/tui/terminal-display.js.map +0 -1
- package/dist/tui/terminal-hyperlinks.js +0 -70
- package/dist/tui/terminal-hyperlinks.js.map +0 -1
- package/dist/tui/theme.js +0 -34
- package/dist/tui/theme.js.map +0 -1
- package/dist/tui/triggers/analyze.js +0 -221
- package/dist/tui/triggers/analyze.js.map +0 -1
- package/dist/tui/triggers/context-text.js +0 -44
- package/dist/tui/triggers/context-text.js.map +0 -1
- package/dist/tui/triggers/copy.js +0 -163
- package/dist/tui/triggers/copy.js.map +0 -1
- package/dist/tui/triggers/detect.js +0 -295
- package/dist/tui/triggers/detect.js.map +0 -1
- package/dist/tui/triggers/fold.js +0 -44
- package/dist/tui/triggers/fold.js.map +0 -1
- package/dist/tui/triggers/pattern.js +0 -243
- package/dist/tui/triggers/pattern.js.map +0 -1
- package/dist/tui/triggers/provenance.js +0 -98
- package/dist/tui/triggers/provenance.js.map +0 -1
- package/dist/tui/triggers/registry.js +0 -164
- package/dist/tui/triggers/registry.js.map +0 -1
- package/dist/tui/triggers/setting.js +0 -61
- package/dist/tui/triggers/setting.js.map +0 -1
- package/dist/tui/triggers/verbs.js +0 -140
- package/dist/tui/triggers/verbs.js.map +0 -1
- package/dist/tui/turn-interruption.js +0 -160
- package/dist/tui/turn-interruption.js.map +0 -1
- package/dist/tui/turn-limits-settings.js +0 -88
- package/dist/tui/turn-limits-settings.js.map +0 -1
- package/dist/tui/types.js +0 -7
- package/dist/tui/types.js.map +0 -1
- package/dist/tui/units.js +0 -20
- package/dist/tui/units.js.map +0 -1
- package/dist/tui/use-selection-index.js +0 -13
- package/dist/tui/use-selection-index.js.map +0 -1
- package/dist/tui/web-activity.js +0 -105
- package/dist/tui/web-activity.js.map +0 -1
- package/dist/tui/workspace-diff.js +0 -101
- package/dist/tui/workspace-diff.js.map +0 -1
- package/dist/tui/workspace-review.js +0 -67
- package/dist/tui/workspace-review.js.map +0 -1
- package/dist/user-commands/store.js +0 -235
- package/dist/user-commands/store.js.map +0 -1
- package/dist/version.js +0 -23
- package/dist/version.js.map +0 -1
|
@@ -1,780 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Conversation persistence for the CLI, built on the SDK's session log.
|
|
3
|
-
*
|
|
4
|
-
* Every conversation is one session: an append-only, hash-chained JSONL file
|
|
5
|
-
* at `$NAMZU_HOME/projects/<slug>/<session-id>.jsonl`. The log is the source
|
|
6
|
-
* of truth. The rebuildable index at `$NAMZU_HOME/index.sqlite` answers the
|
|
7
|
-
* questions a list needs (which sessions this project has, which one a
|
|
8
|
-
* desktop key names) and is refreshed from the log after every write here.
|
|
9
|
-
*
|
|
10
|
-
* The CLI writes only the records that happen outside a turn: the
|
|
11
|
-
* `session_started` that creates a conversation, `session_updated` for its
|
|
12
|
-
* title, archive flag and caller-side names, and the `compaction` record that
|
|
13
|
-
* seeds a fork with the history it copied. Messages and turns are appended by
|
|
14
|
-
* the kernel's turn recorder while `query()` runs, under the session lease.
|
|
15
|
-
*
|
|
16
|
-
* This is what powers `/resume`: list recent sessions, fold a chosen
|
|
17
|
-
* session's messages, and keep chatting in it. The project is the canonical
|
|
18
|
-
* checkout root, so every directory of one checkout shares its history.
|
|
19
|
-
*/
|
|
20
|
-
import { createHash, randomUUID } from 'node:crypto';
|
|
21
|
-
import { mkdirSync } from 'node:fs';
|
|
22
|
-
import { readdir, realpath } from 'node:fs/promises';
|
|
23
|
-
import { basename, resolve } from 'node:path';
|
|
24
|
-
import { join } from 'node:path';
|
|
25
|
-
import { isDeepStrictEqual } from 'node:util';
|
|
26
|
-
import { DiskSessionGoalStore, DiskSessionLog, SessionPaths, asSessionId, asTopicId, ensureProject, foldSessionMessages, generateSessionId, isEntityId, openSessionIndex, readSessionLog, } from '@namzu/sdk';
|
|
27
|
-
import { resolveNamzuHome } from '../state/home.js';
|
|
28
|
-
import { loadIdentity } from '../state/identity.js';
|
|
29
|
-
import { ensurePrivateStateDirectory } from '../state/private-directory.js';
|
|
30
|
-
import { cliProjectRoot } from '../state/project.js';
|
|
31
|
-
/** Who created a conversation, as its `session_started.agent` records it. */
|
|
32
|
-
const CLI_AGENT = { id: 'namzu-cli', name: 'Namzu' };
|
|
33
|
-
/** How long a write outside a turn waits for a lease another writer holds. */
|
|
34
|
-
const LEASE_WAIT_MS = 5_000;
|
|
35
|
-
const LEASE_POLL_MS = 25;
|
|
36
|
-
const LEASE_TTL_MS = 30_000;
|
|
37
|
-
/**
|
|
38
|
-
* Open (or initialize) the working directory's project: `projects/<slug>/`
|
|
39
|
-
* with its `project.json`, the installation's tenant, and the index.
|
|
40
|
-
*
|
|
41
|
-
* The project is the nearest checkout root (a `.git` file or directory), so
|
|
42
|
-
* worktrees and nested repositories keep distinct history while every
|
|
43
|
-
* directory of one checkout shares it. Tool cwd is unchanged.
|
|
44
|
-
*/
|
|
45
|
-
export async function openSessions(cwd, options = {}) {
|
|
46
|
-
const workingDirectory = await realpath(resolve(cwd));
|
|
47
|
-
const root = resolve(options.stateRoot ??
|
|
48
|
-
resolveNamzuHome({
|
|
49
|
-
...(options.home !== undefined ? { home: options.home } : {}),
|
|
50
|
-
...(options.env !== undefined ? { env: options.env } : {}),
|
|
51
|
-
}));
|
|
52
|
-
mkdirSync(root, { recursive: true });
|
|
53
|
-
// The installation owns the tenant; the canonical checkout owns the Project.
|
|
54
|
-
const tenantId = loadIdentity(root).tenantId;
|
|
55
|
-
const projectsDir = ensurePrivateStateDirectory(root, 'projects');
|
|
56
|
-
const project = await ensureProject({ home: root, cwd: cliProjectRoot(workingDirectory) });
|
|
57
|
-
ensurePrivateStateDirectory(projectsDir, project.slug);
|
|
58
|
-
const paths = new SessionPaths({ home: root, slug: project.slug });
|
|
59
|
-
const index = await openSessionIndex({
|
|
60
|
-
home: root,
|
|
61
|
-
...(options.indexBackend ? { backend: options.indexBackend } : {}),
|
|
62
|
-
});
|
|
63
|
-
const partial = {
|
|
64
|
-
root,
|
|
65
|
-
paths,
|
|
66
|
-
slug: project.slug,
|
|
67
|
-
projectRoot: project.cwd,
|
|
68
|
-
projectId: project.projectId,
|
|
69
|
-
topicId: topicIdFor(project.projectId),
|
|
70
|
-
tenantId,
|
|
71
|
-
index,
|
|
72
|
-
};
|
|
73
|
-
const store = {
|
|
74
|
-
getSession: (sessionId, tenant) => readSessionEntity(partial, sessionId, tenant),
|
|
75
|
-
};
|
|
76
|
-
return {
|
|
77
|
-
...partial,
|
|
78
|
-
store,
|
|
79
|
-
goals: new DiskSessionGoalStore({ rootDir: paths.projectDir(), sessions: store }),
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
/** Release the index's database handle. Idempotent. */
|
|
83
|
-
export function closeSessions(s) {
|
|
84
|
-
try {
|
|
85
|
-
s.index.close();
|
|
86
|
-
}
|
|
87
|
-
catch {
|
|
88
|
-
// Already closed.
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
/** One stable CLI topic per logical workspace, without an extra binding file. */
|
|
92
|
-
function topicIdFor(projectId) {
|
|
93
|
-
const digest = createHash('sha256').update(`namzu:cli-topic:${projectId}`).digest('hex');
|
|
94
|
-
return asTopicId(`${digest.slice(0, 8)}-${digest.slice(8, 12)}-8${digest.slice(13, 16)}-a${digest.slice(17, 20)}-${digest.slice(20, 32)}`);
|
|
95
|
-
}
|
|
96
|
-
// ─── the log ──────────────────────────────────────────────────────────────
|
|
97
|
-
/** The file a root conversation's log lives in. */
|
|
98
|
-
export function conversationLogPath(s, sessionId) {
|
|
99
|
-
return s.paths.sessionLog({ sessionId });
|
|
100
|
-
}
|
|
101
|
-
/** A writer handle on one conversation's log. */
|
|
102
|
-
export function openConversationLog(s, sessionId) {
|
|
103
|
-
return DiskSessionLog.at(s.paths, { sessionId });
|
|
104
|
-
}
|
|
105
|
-
function holderName() {
|
|
106
|
-
return `namzu-cli:${process.pid}:${randomUUID()}`;
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Take a conversation's writer lease, waiting briefly for another writer.
|
|
110
|
-
*
|
|
111
|
-
* A turn holds the lease while it runs, so a write between turns only ever
|
|
112
|
-
* waits for a turn that is settling. One that is still running when the wait
|
|
113
|
-
* ends is refused by name rather than waited on indefinitely.
|
|
114
|
-
*/
|
|
115
|
-
async function claimLease(log, op) {
|
|
116
|
-
const deadline = Date.now() + LEASE_WAIT_MS;
|
|
117
|
-
const holder = holderName();
|
|
118
|
-
for (;;) {
|
|
119
|
-
const lease = await log.claim({ holder, ttlMs: LEASE_TTL_MS });
|
|
120
|
-
if (lease)
|
|
121
|
-
return lease;
|
|
122
|
-
if (Date.now() >= deadline) {
|
|
123
|
-
throw new Error(`Conversation ${log.sessionId} is busy: another writer holds it — ${op} rejected. Wait for its turn to finish and try again.`);
|
|
124
|
-
}
|
|
125
|
-
await new Promise((resolveWait) => setTimeout(resolveWait, LEASE_POLL_MS));
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
/** Append records outside any turn, under a lease taken for just these records. */
|
|
129
|
-
async function appendOutsideTurn(s, sessionId, drafts, op) {
|
|
130
|
-
const log = openConversationLog(s, sessionId);
|
|
131
|
-
const lease = await claimLease(log, op);
|
|
132
|
-
try {
|
|
133
|
-
for (const draft of drafts)
|
|
134
|
-
await log.append(lease, draft);
|
|
135
|
-
}
|
|
136
|
-
finally {
|
|
137
|
-
await log.release(lease);
|
|
138
|
-
}
|
|
139
|
-
await refreshIndex(s, sessionId);
|
|
140
|
-
}
|
|
141
|
-
/** Bring the index's row for one conversation up to date with its log. */
|
|
142
|
-
export async function refreshIndex(s, sessionId) {
|
|
143
|
-
await s.index.refresh({ slug: s.slug, logPath: conversationLogPath(s, sessionId), sessionId });
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* Read one conversation's log, or `null` when there is none.
|
|
147
|
-
*
|
|
148
|
-
* Strict by default: a log whose chain is broken is not something to resume
|
|
149
|
-
* or fork. A list passes `tolerant` and reads what precedes the break.
|
|
150
|
-
*/
|
|
151
|
-
export async function readConversationFacts(s, sessionId, mode = 'strict') {
|
|
152
|
-
const read = await readSessionLog(conversationLogPath(s, sessionId), { mode, sessionId });
|
|
153
|
-
const records = read.entries.map((entry) => entry.record);
|
|
154
|
-
const first = records[0];
|
|
155
|
-
if (first === undefined || first.type !== 'session_started')
|
|
156
|
-
return null;
|
|
157
|
-
let title;
|
|
158
|
-
let named = false;
|
|
159
|
-
let archived = false;
|
|
160
|
-
let active;
|
|
161
|
-
for (const record of records) {
|
|
162
|
-
switch (record.type) {
|
|
163
|
-
case 'session_updated':
|
|
164
|
-
if (record.title !== undefined) {
|
|
165
|
-
title = record.title;
|
|
166
|
-
named = record.titleSource === 'named' && record.title.length > 0;
|
|
167
|
-
}
|
|
168
|
-
if (record.archived !== undefined)
|
|
169
|
-
archived = record.archived;
|
|
170
|
-
break;
|
|
171
|
-
case 'turn_started':
|
|
172
|
-
active = { turnId: record.turnId, paused: false };
|
|
173
|
-
break;
|
|
174
|
-
case 'turn_paused':
|
|
175
|
-
if (active?.turnId === record.turnId)
|
|
176
|
-
active = { ...active, paused: true };
|
|
177
|
-
break;
|
|
178
|
-
case 'turn_resuming':
|
|
179
|
-
if (active?.turnId === record.turnId)
|
|
180
|
-
active = { ...active, paused: false };
|
|
181
|
-
break;
|
|
182
|
-
case 'turn_completed':
|
|
183
|
-
case 'turn_failed':
|
|
184
|
-
if (active?.turnId === record.turnId)
|
|
185
|
-
active = undefined;
|
|
186
|
-
break;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
return {
|
|
190
|
-
sessionId,
|
|
191
|
-
started: first,
|
|
192
|
-
...(title !== undefined ? { title } : {}),
|
|
193
|
-
named,
|
|
194
|
-
archived,
|
|
195
|
-
createdAt: first.ts,
|
|
196
|
-
updatedAt: records.at(-1)?.ts ?? first.ts,
|
|
197
|
-
...(active ? { activeTurn: active } : {}),
|
|
198
|
-
records,
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
/** The folded conversation a log's records describe, spills read back. */
|
|
202
|
-
async function foldConversation(s, sessionId, records) {
|
|
203
|
-
const log = openConversationLog(s, sessionId);
|
|
204
|
-
return await foldSessionMessages(records, { readSpill: (ref) => log.readSpill(ref) });
|
|
205
|
-
}
|
|
206
|
-
async function readSessionEntity(s, sessionId, tenantId) {
|
|
207
|
-
if (!isEntityId(sessionId, 'session'))
|
|
208
|
-
return null;
|
|
209
|
-
const facts = await readConversationFacts(s, sessionId, 'tolerant');
|
|
210
|
-
if (!facts)
|
|
211
|
-
return null;
|
|
212
|
-
const recordedTenant = facts.started.tenantId;
|
|
213
|
-
if (recordedTenant !== undefined && recordedTenant !== tenantId)
|
|
214
|
-
return null;
|
|
215
|
-
return {
|
|
216
|
-
id: sessionId,
|
|
217
|
-
topicId: facts.started.topicId ?? topicIdFor(facts.started.projectId),
|
|
218
|
-
projectId: facts.started.projectId,
|
|
219
|
-
tenantId,
|
|
220
|
-
status: facts.archived ? 'archived' : 'idle',
|
|
221
|
-
currentActor: null,
|
|
222
|
-
previousActors: [],
|
|
223
|
-
workspaceId: null,
|
|
224
|
-
ownerVersion: 0,
|
|
225
|
-
createdAt: new Date(facts.createdAt),
|
|
226
|
-
updatedAt: new Date(facts.updatedAt),
|
|
227
|
-
};
|
|
228
|
-
}
|
|
229
|
-
/**
|
|
230
|
-
* Start a fresh conversation; returns its session id.
|
|
231
|
-
*
|
|
232
|
-
* Writes the log's first record, `session_started`, naming the project, the
|
|
233
|
-
* tenant and the CLI topic. An id that already has a log is refused: two
|
|
234
|
-
* conversations never share one.
|
|
235
|
-
*/
|
|
236
|
-
export async function startConversation(s, idOrOptions) {
|
|
237
|
-
const options = typeof idOrOptions === 'string' ? { id: idOrOptions } : (idOrOptions ?? {});
|
|
238
|
-
const id = options.id ?? generateSessionId();
|
|
239
|
-
const log = openConversationLog(s, id);
|
|
240
|
-
const lease = await claimLease(log, 'start conversation');
|
|
241
|
-
try {
|
|
242
|
-
if ((await log.head()) !== null) {
|
|
243
|
-
throw new Error(`Conversation ${id} already exists — start conversation rejected.`);
|
|
244
|
-
}
|
|
245
|
-
await log.append(lease, {
|
|
246
|
-
type: 'session_started',
|
|
247
|
-
projectId: s.projectId,
|
|
248
|
-
tenantId: s.tenantId,
|
|
249
|
-
topicId: s.topicId,
|
|
250
|
-
cwd: s.projectRoot,
|
|
251
|
-
agent: { ...CLI_AGENT },
|
|
252
|
-
origin: options.origin ?? { protocol: 'cli' },
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
finally {
|
|
256
|
-
await log.release(lease);
|
|
257
|
-
}
|
|
258
|
-
await refreshIndex(s, id);
|
|
259
|
-
return id;
|
|
260
|
-
}
|
|
261
|
-
/**
|
|
262
|
-
* Give a session log its `session_started` if it has none yet, so a turn can
|
|
263
|
-
* begin in it. A log that already starts is left alone. Used where a session
|
|
264
|
-
* is brought into existence by its first turn rather than by
|
|
265
|
-
* {@link startConversation}: a headless scope, an in-memory log.
|
|
266
|
-
*/
|
|
267
|
-
export async function ensureSessionStarted(log, session) {
|
|
268
|
-
if ((await log.head()) !== null)
|
|
269
|
-
return;
|
|
270
|
-
const lease = await claimLease(log, 'start session');
|
|
271
|
-
try {
|
|
272
|
-
if ((await log.head()) !== null)
|
|
273
|
-
return;
|
|
274
|
-
await log.append(lease, {
|
|
275
|
-
type: 'session_started',
|
|
276
|
-
projectId: session.projectId,
|
|
277
|
-
tenantId: session.tenantId,
|
|
278
|
-
topicId: session.topicId,
|
|
279
|
-
cwd: session.cwd,
|
|
280
|
-
agent: { ...session.agent },
|
|
281
|
-
origin: session.origin ?? { protocol: 'cli' },
|
|
282
|
-
});
|
|
283
|
-
}
|
|
284
|
-
finally {
|
|
285
|
-
await log.release(lease);
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
/** The external id a desktop key is filed under: scoped to the project, like the map it replaces. */
|
|
289
|
-
function desktopExternalId(projectId, key) {
|
|
290
|
-
return JSON.stringify([projectId, key]);
|
|
291
|
-
}
|
|
292
|
-
/**
|
|
293
|
-
* Resolve (creating if needed) the conversation bound to an embedder's
|
|
294
|
-
* session key. The binding is the conversation's own `session_started.origin`,
|
|
295
|
-
* so a later turn or history load with the same key reuses it, and an index
|
|
296
|
-
* rebuild finds it again.
|
|
297
|
-
*/
|
|
298
|
-
export async function resolveConversation(s, key) {
|
|
299
|
-
const existing = await findMappedConversation(s, key);
|
|
300
|
-
if (existing) {
|
|
301
|
-
await requireWritableConversation(s, existing, 'continue keyed conversation');
|
|
302
|
-
return existing;
|
|
303
|
-
}
|
|
304
|
-
const id = await startConversation(s, {
|
|
305
|
-
origin: { protocol: 'desktop', externalSessionId: desktopExternalId(s.projectId, key) },
|
|
306
|
-
});
|
|
307
|
-
// Another process may have claimed the key while this one was creating. The
|
|
308
|
-
// earliest claim wins the name; a loser archives its empty conversation so it
|
|
309
|
-
// never shows up in `/resume` as a second, indistinguishable row.
|
|
310
|
-
const winner = await findMappedConversation(s, key);
|
|
311
|
-
if (winner && winner !== id) {
|
|
312
|
-
await archiveConversation(s, id).catch(() => undefined);
|
|
313
|
-
await requireWritableConversation(s, winner, 'continue keyed conversation');
|
|
314
|
-
return winner;
|
|
315
|
-
}
|
|
316
|
-
return id;
|
|
317
|
-
}
|
|
318
|
-
/** Read an external-session binding without creating or widening its scope. */
|
|
319
|
-
export async function findMappedConversation(s, key) {
|
|
320
|
-
const target = await s.index.resolveExternal('desktop', 'session', desktopExternalId(s.projectId, key));
|
|
321
|
-
if (!target)
|
|
322
|
-
return null;
|
|
323
|
-
const facts = await readConversationFacts(s, target.sessionId, 'tolerant');
|
|
324
|
-
return facts?.started.projectId === s.projectId ? target.sessionId : null;
|
|
325
|
-
}
|
|
326
|
-
/**
|
|
327
|
-
* Resolve a conversation through this project.
|
|
328
|
-
*
|
|
329
|
-
* A session id names a file under this project's directory, so a log that
|
|
330
|
-
* exists proves the conversation is this project's; the project id it
|
|
331
|
-
* recorded must also agree, and so must the tenant.
|
|
332
|
-
*/
|
|
333
|
-
async function requireConversationInScope(s, sessionId, op) {
|
|
334
|
-
const facts = await readConversationFacts(s, sessionId);
|
|
335
|
-
if (!facts) {
|
|
336
|
-
throw new Error(`Conversation ${sessionId} was not found — ${op} rejected`);
|
|
337
|
-
}
|
|
338
|
-
if (facts.started.projectId !== s.projectId ||
|
|
339
|
-
(facts.started.tenantId !== undefined && facts.started.tenantId !== s.tenantId)) {
|
|
340
|
-
throw new Error(`Conversation ${sessionId} does not belong to this workspace — ${op} rejected`);
|
|
341
|
-
}
|
|
342
|
-
return facts;
|
|
343
|
-
}
|
|
344
|
-
/**
|
|
345
|
-
* Sequential admission gate for a turn or conversation mutation: the target
|
|
346
|
-
* exists in this project and is not archived. It is not a cross-process
|
|
347
|
-
* transaction; the session lease is what serialises writers.
|
|
348
|
-
*/
|
|
349
|
-
export async function requireWritableConversation(s, sessionId, op = 'continue conversation') {
|
|
350
|
-
const facts = await requireConversationInScope(s, sessionId, op);
|
|
351
|
-
if (facts.archived) {
|
|
352
|
-
throw new Error(`Conversation ${sessionId} is archived and read-only — ${op} rejected. Its history remains available for inspection.`);
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
/**
|
|
356
|
-
* Change the archive flag while holding the session's writer lease. The
|
|
357
|
-
* earlier scope check prevents a missing log from being created by a lease
|
|
358
|
-
* claim; the second check is the authoritative one after competing writers
|
|
359
|
-
* have settled. An open turn, including one parked for a human, is not a
|
|
360
|
-
* stable boundary to archive. Older versions could archive such a turn; a
|
|
361
|
-
* restore must be allowed so the owner can resume or abandon it explicitly.
|
|
362
|
-
*/
|
|
363
|
-
async function setConversationArchived(s, sessionId, archived) {
|
|
364
|
-
const op = archived ? 'archive conversation' : 'restore conversation';
|
|
365
|
-
await requireConversationInScope(s, sessionId, op);
|
|
366
|
-
const log = openConversationLog(s, sessionId);
|
|
367
|
-
const lease = await claimLease(log, op);
|
|
368
|
-
let changed = false;
|
|
369
|
-
try {
|
|
370
|
-
const facts = await requireConversationInScope(s, sessionId, op);
|
|
371
|
-
if (facts.archived === archived) {
|
|
372
|
-
throw new Error(`Conversation ${sessionId} is already ${archived ? 'archived' : 'active'}.`);
|
|
373
|
-
}
|
|
374
|
-
if (archived && facts.activeTurn) {
|
|
375
|
-
throw new Error(`Conversation ${sessionId} has an open turn — ${op} rejected. Resume or abandon that turn first.`);
|
|
376
|
-
}
|
|
377
|
-
await log.append(lease, { type: 'session_updated', archived });
|
|
378
|
-
changed = true;
|
|
379
|
-
}
|
|
380
|
-
finally {
|
|
381
|
-
await log.release(lease);
|
|
382
|
-
}
|
|
383
|
-
if (changed) {
|
|
384
|
-
try {
|
|
385
|
-
await refreshIndex(s, sessionId);
|
|
386
|
-
}
|
|
387
|
-
catch (refreshCause) {
|
|
388
|
-
// The append is already durable. A full sync can repair a failed
|
|
389
|
-
// incremental refresh without telling the operator the transition did
|
|
390
|
-
// not happen. If even that fails, name the actual durable state.
|
|
391
|
-
try {
|
|
392
|
-
await s.index.sync(s.root);
|
|
393
|
-
}
|
|
394
|
-
catch (syncCause) {
|
|
395
|
-
throw new ConversationIndexRefreshError(sessionId, archived, refreshCause, syncCause);
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
/** The log changed durably, but the rebuildable listing index could not catch up. */
|
|
401
|
-
export class ConversationIndexRefreshError extends Error {
|
|
402
|
-
sessionId;
|
|
403
|
-
archived;
|
|
404
|
-
refreshCause;
|
|
405
|
-
syncCause;
|
|
406
|
-
constructor(sessionId, archived, refreshCause, syncCause) {
|
|
407
|
-
super(`Conversation ${sessionId} was ${archived ? 'archived' : 'restored'} in its durable log, but the list index could not refresh. Restart Namzu to rebuild the list, then inspect its state.`);
|
|
408
|
-
this.sessionId = sessionId;
|
|
409
|
-
this.archived = archived;
|
|
410
|
-
this.refreshCause = refreshCause;
|
|
411
|
-
this.syncCause = syncCause;
|
|
412
|
-
this.name = 'ConversationIndexRefreshError';
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
/** Make a settled conversation read-only while preserving its log. */
|
|
416
|
-
export async function archiveConversation(s, sessionId) {
|
|
417
|
-
await setConversationArchived(s, sessionId, true);
|
|
418
|
-
}
|
|
419
|
-
/** Restore one archived conversation so the ordinary resume gate admits it. */
|
|
420
|
-
export async function unarchiveConversation(s, sessionId) {
|
|
421
|
-
await setConversationArchived(s, sessionId, false);
|
|
422
|
-
}
|
|
423
|
-
/** Load a conversation's folded message history. */
|
|
424
|
-
export async function loadConversation(s, sessionId) {
|
|
425
|
-
const facts = await requireConversationInScope(s, sessionId, 'load conversation history');
|
|
426
|
-
return await foldConversation(s, sessionId, facts.records);
|
|
427
|
-
}
|
|
428
|
-
/**
|
|
429
|
-
* Load one conversation for a new model turn.
|
|
430
|
-
*
|
|
431
|
-
* Reading an archived conversation remains legitimate — `history` and export
|
|
432
|
-
* are inspection surfaces — but resuming it would turn a tombstone back into a
|
|
433
|
-
* live writer without a restore operation.
|
|
434
|
-
*/
|
|
435
|
-
export async function loadResumableConversation(s, sessionId) {
|
|
436
|
-
const checked = asSessionId(sessionId);
|
|
437
|
-
await requireWritableConversation(s, checked, 'resume conversation');
|
|
438
|
-
return await loadConversation(s, checked);
|
|
439
|
-
}
|
|
440
|
-
/** The open turn of a conversation, if it has one: `paused` when it is parked. */
|
|
441
|
-
export async function activeConversationTurn(s, sessionId) {
|
|
442
|
-
return (await requireConversationInScope(s, sessionId, 'inspect conversation')).activeTurn;
|
|
443
|
-
}
|
|
444
|
-
/** Recent non-empty conversations, newest first — for the `/resume` list. */
|
|
445
|
-
export async function listRecent(s, limit = 20) {
|
|
446
|
-
return listConversations(s, false, limit);
|
|
447
|
-
}
|
|
448
|
-
/** Archived root conversations in this project, newest first. Empty ones remain discoverable. */
|
|
449
|
-
export async function listArchived(s, limit = 100, offset = 0) {
|
|
450
|
-
await refreshProjectArchiveIndex(s);
|
|
451
|
-
return listConversations(s, true, limit, offset);
|
|
452
|
-
}
|
|
453
|
-
/**
|
|
454
|
-
* The scan backend is a per-process snapshot. Another CLI process may have
|
|
455
|
-
* archived a conversation after this handle opened; querying its old rows
|
|
456
|
-
* alone would claim there are no archives. Refresh only root logs in the
|
|
457
|
-
* selected project, and coalesce overlapping picker/list requests against
|
|
458
|
-
* this index. Unchanged logs cost a head check, not another full fold.
|
|
459
|
-
*/
|
|
460
|
-
const archiveListingRefreshes = new WeakMap();
|
|
461
|
-
async function refreshProjectArchiveIndex(s) {
|
|
462
|
-
if (s.index.backend !== 'scan')
|
|
463
|
-
return;
|
|
464
|
-
let pending = archiveListingRefreshes.get(s.index);
|
|
465
|
-
if (!pending) {
|
|
466
|
-
pending = (async () => {
|
|
467
|
-
const entries = await readdir(s.paths.projectDir(), { withFileTypes: true });
|
|
468
|
-
for (const entry of entries) {
|
|
469
|
-
if (!entry.isFile() || !entry.name.endsWith('.jsonl'))
|
|
470
|
-
continue;
|
|
471
|
-
const rawId = entry.name.slice(0, -'.jsonl'.length);
|
|
472
|
-
if (!isEntityId(rawId, 'session'))
|
|
473
|
-
continue;
|
|
474
|
-
const sessionId = asSessionId(rawId);
|
|
475
|
-
await s.index.refresh({
|
|
476
|
-
slug: s.slug,
|
|
477
|
-
logPath: conversationLogPath(s, sessionId),
|
|
478
|
-
sessionId,
|
|
479
|
-
});
|
|
480
|
-
}
|
|
481
|
-
})().finally(() => {
|
|
482
|
-
archiveListingRefreshes.delete(s.index);
|
|
483
|
-
});
|
|
484
|
-
archiveListingRefreshes.set(s.index, pending);
|
|
485
|
-
}
|
|
486
|
-
await pending;
|
|
487
|
-
}
|
|
488
|
-
async function listConversations(s, archived, limit, offset = 0) {
|
|
489
|
-
const boundedLimit = Number.isFinite(limit) ? Math.max(0, Math.min(Math.floor(limit), 100)) : 100;
|
|
490
|
-
const boundedOffset = Number.isSafeInteger(offset) && offset > 0 ? offset : 0;
|
|
491
|
-
if (boundedLimit === 0)
|
|
492
|
-
return [];
|
|
493
|
-
// The index is rebuilt from logs on open and refreshed on every transition.
|
|
494
|
-
// Filter there before reading a full log: an installation with thousands of
|
|
495
|
-
// archived conversations must not fold them all to draw /resume. Recheck
|
|
496
|
-
// each candidate's actual log and owner before exposing it.
|
|
497
|
-
const rows = (await s.index.listSessions({
|
|
498
|
-
slug: s.slug,
|
|
499
|
-
rootsOnly: true,
|
|
500
|
-
includeArchived: archived,
|
|
501
|
-
}))
|
|
502
|
-
.filter((row) => row.projectId === s.projectId && row.archived === archived)
|
|
503
|
-
.sort((a, b) => b.updatedAt.localeCompare(a.updatedAt))
|
|
504
|
-
.slice(boundedOffset, boundedOffset + Math.max(100, boundedLimit * 5));
|
|
505
|
-
const out = [];
|
|
506
|
-
for (const row of rows) {
|
|
507
|
-
let facts;
|
|
508
|
-
let messages;
|
|
509
|
-
try {
|
|
510
|
-
facts = await readConversationFacts(s, row.id, 'tolerant');
|
|
511
|
-
if (!facts ||
|
|
512
|
-
facts.archived !== archived ||
|
|
513
|
-
facts.started.projectId !== s.projectId ||
|
|
514
|
-
(facts.started.tenantId !== undefined && facts.started.tenantId !== s.tenantId))
|
|
515
|
-
continue;
|
|
516
|
-
messages = await foldConversation(s, row.id, facts.records);
|
|
517
|
-
}
|
|
518
|
-
catch {
|
|
519
|
-
// A log this process cannot read is not a row a person can resume.
|
|
520
|
-
continue;
|
|
521
|
-
}
|
|
522
|
-
if (!archived && messages.length === 0)
|
|
523
|
-
continue;
|
|
524
|
-
const everything = recordedMessages(facts.records);
|
|
525
|
-
out.push({
|
|
526
|
-
id: row.id,
|
|
527
|
-
title: facts.title !== undefined &&
|
|
528
|
-
facts.title.length > 0 &&
|
|
529
|
-
(facts.named || facts.title !== 'Conversation')
|
|
530
|
-
? facts.title
|
|
531
|
-
: conversationTitle(everything),
|
|
532
|
-
preview: [...everything]
|
|
533
|
-
.reverse()
|
|
534
|
-
.find((message) => message.role === 'user' && message.source === undefined)
|
|
535
|
-
?.content.replace(/\s+/g, ' ')
|
|
536
|
-
.trim()
|
|
537
|
-
.slice(0, 240),
|
|
538
|
-
named: facts.named,
|
|
539
|
-
updatedAt: facts.updatedAt,
|
|
540
|
-
count: messages.length,
|
|
541
|
-
});
|
|
542
|
-
if (out.length >= boundedLimit)
|
|
543
|
-
break;
|
|
544
|
-
}
|
|
545
|
-
return out.sort((a, b) => b.updatedAt.localeCompare(a.updatedAt));
|
|
546
|
-
}
|
|
547
|
-
/** The name a person gave this conversation, or `undefined`. */
|
|
548
|
-
export async function titleOf(s, sessionId) {
|
|
549
|
-
const facts = await readConversationFacts(s, sessionId, 'tolerant');
|
|
550
|
-
return facts?.named ? facts.title : undefined;
|
|
551
|
-
}
|
|
552
|
-
/**
|
|
553
|
-
* Name a conversation, or with an empty name, take the name away.
|
|
554
|
-
*
|
|
555
|
-
* Recorded as `session_updated{title, titleSource: 'named'}`; clearing records
|
|
556
|
-
* an empty derived title, so the list derives one from the first message
|
|
557
|
-
* again rather than showing a blank row.
|
|
558
|
-
*/
|
|
559
|
-
export async function setTitle(s, sessionId, title) {
|
|
560
|
-
await requireConversationInScope(s, sessionId, 'name conversation');
|
|
561
|
-
const trimmed = title.trim();
|
|
562
|
-
await appendOutsideTurn(s, sessionId, [
|
|
563
|
-
trimmed === ''
|
|
564
|
-
? { type: 'session_updated', title: '', titleSource: 'derived' }
|
|
565
|
-
: { type: 'session_updated', title: trimmed, titleSource: 'named' },
|
|
566
|
-
], 'name conversation');
|
|
567
|
-
}
|
|
568
|
-
/**
|
|
569
|
-
* Seed a conversation that has no turns yet with a history, as one
|
|
570
|
-
* `compaction` record outside any turn: the fold starts from its summary, so
|
|
571
|
-
* the new conversation's context is exactly `messages`. Used by forks.
|
|
572
|
-
*/
|
|
573
|
-
export async function seedConversationHistory(s, sessionId, messages, strategy = 'fork') {
|
|
574
|
-
if (messages.length === 0)
|
|
575
|
-
return;
|
|
576
|
-
await appendOutsideTurn(s, sessionId, [
|
|
577
|
-
{
|
|
578
|
-
type: 'compaction',
|
|
579
|
-
compactionId: randomUUID(),
|
|
580
|
-
strategy,
|
|
581
|
-
trigger: 'manual',
|
|
582
|
-
replacesSeqRange: [1, 1],
|
|
583
|
-
summary: [...messages],
|
|
584
|
-
keptMessageIds: [],
|
|
585
|
-
tokensBefore: 0,
|
|
586
|
-
tokensAfter: 0,
|
|
587
|
-
},
|
|
588
|
-
], 'seed conversation history');
|
|
589
|
-
}
|
|
590
|
-
/**
|
|
591
|
-
* Continue in a copy, leaving the original where it is.
|
|
592
|
-
*
|
|
593
|
-
* The copy is a real Session with the transcript written into it, not a
|
|
594
|
-
* pointer: the two diverge from here, and a pointer would make the original's
|
|
595
|
-
* later turns appear in the fork.
|
|
596
|
-
*
|
|
597
|
-
* **The fork is always named, and that is the load-bearing part.** Both
|
|
598
|
-
* conversations start with the same first message, so both DERIVE the same
|
|
599
|
-
* title — and `/resume` would show two rows a person cannot tell apart. The
|
|
600
|
-
* name is taken from the source's own, so a fork of a fork stays readable, and
|
|
601
|
-
* it is numbered against the names already in use.
|
|
602
|
-
*/
|
|
603
|
-
export async function forkConversation(s, sourceId) {
|
|
604
|
-
await requireWritableConversation(s, sourceId, 'fork conversation');
|
|
605
|
-
const messages = await loadConversation(s, sourceId);
|
|
606
|
-
if (messages.length === 0) {
|
|
607
|
-
// Refused rather than served. A fork of nothing is an empty session
|
|
608
|
-
// that shows up in `/resume` forever and answers no question.
|
|
609
|
-
throw new Error('There is nothing to fork yet — this conversation has no messages.');
|
|
610
|
-
}
|
|
611
|
-
const { id, title } = await writeFork(s, s, sourceId, messages, messages);
|
|
612
|
-
return { id, title, copied: messages.length };
|
|
613
|
-
}
|
|
614
|
-
/**
|
|
615
|
-
* Copy a settled conversation into another checkout's Project under the same
|
|
616
|
-
* Namzu installation. A managed worktree is a distinct Project, so a normal
|
|
617
|
-
* same-Project fork cannot be resumed there.
|
|
618
|
-
*/
|
|
619
|
-
export async function forkConversationInto(source, target, sourceId) {
|
|
620
|
-
if (source.root !== target.root || source.tenantId !== target.tenantId) {
|
|
621
|
-
throw new Error('A conversation can only be forked within the same Namzu installation.');
|
|
622
|
-
}
|
|
623
|
-
const facts = await requireConversationInScope(source, sourceId, 'fork conversation to worktree');
|
|
624
|
-
if (facts.archived) {
|
|
625
|
-
throw new Error(`Conversation ${sourceId} is archived and cannot be forked.`);
|
|
626
|
-
}
|
|
627
|
-
if (facts.activeTurn) {
|
|
628
|
-
throw new Error('Wait for the current turn to finish before forking to a worktree.');
|
|
629
|
-
}
|
|
630
|
-
const messages = await loadConversation(source, sourceId);
|
|
631
|
-
if (messages.length === 0) {
|
|
632
|
-
throw new Error('There is nothing to fork yet — this conversation has no messages.');
|
|
633
|
-
}
|
|
634
|
-
const { id, title } = await writeFork(source, target, sourceId, messages, messages);
|
|
635
|
-
return { id, title, copied: messages.length };
|
|
636
|
-
}
|
|
637
|
-
/**
|
|
638
|
-
* Content equality ignoring the durable id a message's own record carries.
|
|
639
|
-
*
|
|
640
|
-
* A message read twice from the SAME conversation names the same id both
|
|
641
|
-
* times, so this only matters where it stops being the same conversation:
|
|
642
|
-
* a fork's copy is a brand new record for the same content, under a new
|
|
643
|
-
* id, in the new conversation's own log — the kernel names it, and that
|
|
644
|
-
* name being new is the point, not a sign the content itself changed.
|
|
645
|
-
*/
|
|
646
|
-
function sameMessageContent(a, b) {
|
|
647
|
-
const { id: _a, ...restA } = a;
|
|
648
|
-
const { id: _b, ...restB } = b;
|
|
649
|
-
return isDeepStrictEqual(JSON.parse(JSON.stringify(restA)), JSON.parse(JSON.stringify(restB)));
|
|
650
|
-
}
|
|
651
|
-
function sameMessageSequence(a, b) {
|
|
652
|
-
return (a.length === b.length &&
|
|
653
|
-
a.every((message, index) => sameMessageContent(message, b[index])));
|
|
654
|
-
}
|
|
655
|
-
/**
|
|
656
|
-
* Fork immediately before one durable user message.
|
|
657
|
-
*
|
|
658
|
-
* `userOrdinal` is zero-based among user messages, not among every message.
|
|
659
|
-
* The expected message is a compare-and-swap guard: a picker selects from an
|
|
660
|
-
* in-memory history, then this helper reloads disk. If another write changed
|
|
661
|
-
* that position, it refuses BEFORE creating a session instead of branching at
|
|
662
|
-
* a boundary the operator did not select.
|
|
663
|
-
*
|
|
664
|
-
* An empty prefix is valid. Editing the first prompt creates an empty branch
|
|
665
|
-
* and restores that prompt to the composer.
|
|
666
|
-
*/
|
|
667
|
-
export async function forkConversationBeforeUser(s, sourceId, userOrdinal, expected) {
|
|
668
|
-
if (!Number.isInteger(userOrdinal) || userOrdinal < 0) {
|
|
669
|
-
throw new Error('The selected user-message position is invalid.');
|
|
670
|
-
}
|
|
671
|
-
await requireWritableConversation(s, sourceId, 'fork conversation before a prompt');
|
|
672
|
-
const messages = await loadConversation(s, sourceId);
|
|
673
|
-
let seen = -1;
|
|
674
|
-
const messageIndex = messages.findIndex((message) => {
|
|
675
|
-
if (message.role !== 'user')
|
|
676
|
-
return false;
|
|
677
|
-
seen += 1;
|
|
678
|
-
return seen === userOrdinal;
|
|
679
|
-
});
|
|
680
|
-
const selected = messages[messageIndex];
|
|
681
|
-
if (messageIndex < 0 || selected?.role !== 'user') {
|
|
682
|
-
throw new Error('The selected user message no longer exists in this conversation.');
|
|
683
|
-
}
|
|
684
|
-
if (!sameMessageContent(selected, expected)) {
|
|
685
|
-
throw new Error('The conversation changed after the prompt was selected. Nothing was forked; open the editor again from the current history.');
|
|
686
|
-
}
|
|
687
|
-
const prefix = messages.slice(0, messageIndex);
|
|
688
|
-
const { id, title } = await writeFork(s, s, sourceId, messages, prefix);
|
|
689
|
-
return { id, title, messages: prefix, selected };
|
|
690
|
-
}
|
|
691
|
-
/** Create, seed and name one fork after every boundary decision has been validated. */
|
|
692
|
-
async function writeFork(sourceStore, targetStore, sourceId, sourceMessages, copiedMessages) {
|
|
693
|
-
const sourceFacts = await readConversationFacts(sourceStore, sourceId, 'tolerant');
|
|
694
|
-
const source = sourceFacts?.title !== undefined && sourceFacts.title.length > 0
|
|
695
|
-
? sourceFacts.title
|
|
696
|
-
: conversationTitle(sourceFacts ? recordedMessages(sourceFacts.records) : sourceMessages);
|
|
697
|
-
const id = await startConversation(targetStore);
|
|
698
|
-
await seedConversationHistory(targetStore, id, copiedMessages);
|
|
699
|
-
const copiedBack = await loadConversation(targetStore, id);
|
|
700
|
-
if (!sameMessageSequence(copiedBack, copiedMessages)) {
|
|
701
|
-
throw new Error(`The forked conversation did not preserve its exact copied history (${id}).`);
|
|
702
|
-
}
|
|
703
|
-
const title = nextForkName(await takenTitles(targetStore), source);
|
|
704
|
-
await setTitle(targetStore, id, title);
|
|
705
|
-
return { id, title };
|
|
706
|
-
}
|
|
707
|
-
/** Every title in use among this project's conversations, keyed by session id. */
|
|
708
|
-
async function takenTitles(s) {
|
|
709
|
-
const taken = {};
|
|
710
|
-
for (const row of await s.index.listSessions({ slug: s.slug, rootsOnly: true })) {
|
|
711
|
-
if (row.title !== undefined && row.title.length > 0)
|
|
712
|
-
taken[row.id] = row.title;
|
|
713
|
-
}
|
|
714
|
-
return taken;
|
|
715
|
-
}
|
|
716
|
-
/**
|
|
717
|
-
* Every message the log ever recorded, in order: a fork's seeded history and
|
|
718
|
-
* each `message` record, before any compaction or replacement folds them.
|
|
719
|
-
*
|
|
720
|
-
* A derived title and the list preview are read from this rather than from
|
|
721
|
-
* the fold, so compacting a conversation away from its opening question does
|
|
722
|
-
* not rename it: the opening message is still in the log.
|
|
723
|
-
*/
|
|
724
|
-
function recordedMessages(records) {
|
|
725
|
-
const out = [];
|
|
726
|
-
for (const record of records) {
|
|
727
|
-
if (record.type === 'message')
|
|
728
|
-
out.push(record.content);
|
|
729
|
-
else if (record.type === 'compaction' && Array.isArray(record.summary)) {
|
|
730
|
-
if (record.strategy === 'fork')
|
|
731
|
-
out.push(...record.summary);
|
|
732
|
-
}
|
|
733
|
-
}
|
|
734
|
-
return out;
|
|
735
|
-
}
|
|
736
|
-
/**
|
|
737
|
-
* `X (fork)`, then `X (fork 2)`, `X (fork 3)`.
|
|
738
|
-
*
|
|
739
|
-
* Numbered against the names in use rather than against a count of forks,
|
|
740
|
-
* because a name that was removed frees its number and a fork that was renamed
|
|
741
|
-
* never held one.
|
|
742
|
-
*/
|
|
743
|
-
export function nextForkName(taken, source) {
|
|
744
|
-
const used = new Set(Object.values(taken));
|
|
745
|
-
const first = `${source} (fork)`;
|
|
746
|
-
if (!used.has(first))
|
|
747
|
-
return first;
|
|
748
|
-
for (let n = 2; n < 1000; n += 1) {
|
|
749
|
-
const candidate = `${source} (fork ${n})`;
|
|
750
|
-
if (!used.has(candidate))
|
|
751
|
-
return candidate;
|
|
752
|
-
}
|
|
753
|
-
// A thousand forks of one conversation is not a case worth a cleverer
|
|
754
|
-
// answer, and a name that repeats is better than a refusal here.
|
|
755
|
-
return `${source} (fork)`;
|
|
756
|
-
}
|
|
757
|
-
export function conversationTitle(messages) {
|
|
758
|
-
const firstHuman = messages.find((message) => message.role === 'user' && message.source === undefined);
|
|
759
|
-
const firstGoal = messages.find((message) => message.role === 'user' && message.source?.type === 'goal-round');
|
|
760
|
-
const raw = firstHuman?.role === 'user'
|
|
761
|
-
? firstHuman.content
|
|
762
|
-
: firstGoal?.role === 'user' && firstGoal.source?.type === 'goal-round'
|
|
763
|
-
? firstGoal.source.objective
|
|
764
|
-
: 'Conversation';
|
|
765
|
-
const text = raw.replace(/\s+/g, ' ').trim();
|
|
766
|
-
return text.length > 60 ? `${text.slice(0, 59)}…` : text || 'Conversation';
|
|
767
|
-
}
|
|
768
|
-
/** The project directory name, for messages that point a person at it. */
|
|
769
|
-
export function projectLabel(s) {
|
|
770
|
-
return basename(s.projectRoot) || s.projectRoot;
|
|
771
|
-
}
|
|
772
|
-
/** Where a conversation's per-session files live (`<session-id>/`). */
|
|
773
|
-
export function conversationDir(s, sessionId) {
|
|
774
|
-
return s.paths.sessionDir({ sessionId });
|
|
775
|
-
}
|
|
776
|
-
/** The project's directory under `NAMZU_HOME` (`projects/<slug>/`). */
|
|
777
|
-
export function projectDir(s) {
|
|
778
|
-
return join(s.root, 'projects', s.slug);
|
|
779
|
-
}
|
|
780
|
-
//# sourceMappingURL=store.js.map
|