very-happy-cli 0.2.186 → 0.2.188
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AcpBackend-ConXUH67.mjs → AcpBackend-2loP7MpF.mjs} +3 -3
- package/dist/{AcpBackend-aVv-_nH_.cjs → AcpBackend-B8AYkp5n.cjs} +3 -3
- package/dist/{AcpSessionManager-BxD1AQ8L.mjs → AcpSessionManager-C17doAoR.mjs} +2 -2
- package/dist/{AcpSessionManager-aRdzf_6R.cjs → AcpSessionManager-CLqo9R9Y.cjs} +2 -2
- package/dist/{BasePermissionHandler-BsOLZCNB.cjs → BasePermissionHandler-C8UEcFz0.cjs} +1 -1
- package/dist/{BasePermissionHandler-Hj7Qregq.mjs → BasePermissionHandler-CrfyUmqO.mjs} +1 -1
- package/dist/{acpSessionResume-CKacrrHV.mjs → acpSessionResume-F705a1cF.mjs} +1 -1
- package/dist/{acpSessionResume-CpPNoxaW.cjs → acpSessionResume-OuYlLGxL.cjs} +1 -1
- package/dist/{agentHome-CawmLuWV.mjs → agentHome-Dc7LYF3d.mjs} +4 -4
- package/dist/{agentHome-VS7FrFQZ.cjs → agentHome-DsKHJ_Sf.cjs} +4 -4
- package/dist/{api-DjqQTT16.cjs → api-BOqjYd5r.cjs} +10 -10
- package/dist/{api-DUFy21Nf.mjs → api-DNKa7kVy.mjs} +10 -10
- package/dist/{apiMachine-D2BrVBYu.cjs → apiMachine--rcPpMmt.cjs} +14 -14
- package/dist/{apiMachine-B0sBCHNZ.mjs → apiMachine-Di1G9ECW.mjs} +14 -14
- package/dist/{attachmentContent-2kInPZrP.cjs → attachmentContent-BFRMLong.cjs} +2 -2
- package/dist/{attachmentContent-D01-pLOB.mjs → attachmentContent-C9S4ekAz.mjs} +2 -2
- package/dist/{auth-DP3eN2Fv.mjs → auth-BNhhk2Fr.mjs} +5 -5
- package/dist/{auth-B-CqTcVh.mjs → auth-Bzwo_vOM.mjs} +8 -8
- package/dist/{auth-CujfCIv-.cjs → auth-CQtfznF0.cjs} +8 -8
- package/dist/{auth-CImUXAjH.cjs → auth-CXmI92aj.cjs} +5 -5
- package/dist/{auto-D4KRQIBu.mjs → auto-DHYOLnXB.mjs} +19 -19
- package/dist/{auto-oWgZl7mM.cjs → auto-DXLdaX5O.cjs} +19 -19
- package/dist/{bootstrap-MFmMruyB.mjs → bootstrap-Di38SnpN.mjs} +2 -2
- package/dist/{bootstrap-B7YvJcVK.cjs → bootstrap-eJ1l7VYl.cjs} +2 -2
- package/dist/{browser-CfFbN1Us.mjs → browser-6Cg7G6bb.mjs} +1 -1
- package/dist/{browser-C19iD31j.cjs → browser-D3uBFRQu.cjs} +1 -1
- package/dist/{claudeLocal-C4A7-BmS.cjs → claudeLocal-BBaE4QF_.cjs} +9 -8
- package/dist/{claudeLocal-C6wNx9qH.mjs → claudeLocal-CqaEs-81.mjs} +7 -6
- package/dist/{claudeLocalLauncher-DdPfufcS.mjs → claudeLocalLauncher-BDUPxtsI.mjs} +11 -11
- package/dist/{claudeLocalLauncher-BfCKs7Le.cjs → claudeLocalLauncher-wPxKtH_P.cjs} +11 -11
- package/dist/{claudeSessionFork-B8NjdHYD.cjs → claudeSessionFork-CmY25Fl3.cjs} +1 -1
- package/dist/{claudeSessionFork-D8XT48Lf.mjs → claudeSessionFork-DzWFzj9m.mjs} +1 -1
- package/dist/{client-jAdkYZRf.cjs → client-C2HcMqRF.cjs} +14 -5
- package/dist/{client-DAnQqPmc.mjs → client-DWws_aQK.mjs} +2 -2
- package/dist/{client-BfGuTBMO.mjs → client-DcDE6Ifk.mjs} +2 -2
- package/dist/{client-CMIhQ32m.cjs → client-DmY03OZZ.cjs} +2 -2
- package/dist/{client-CTNxuHVc.cjs → client-agH03Irm.cjs} +2 -2
- package/dist/{client-CKM07bJH.mjs → client-qJ0y8fus.mjs} +14 -5
- package/dist/codex/happyMcpStdioBridge.cjs +18 -17
- package/dist/codex/happyMcpStdioBridge.mjs +18 -17
- package/dist/{codexAppServerClient-DhOC61k9.mjs → codexAppServerClient-DgE99i7X.mjs} +39 -5
- package/dist/{codexAppServerClient-Dv1Mh3MS.cjs → codexAppServerClient-DwzC8LR0.cjs} +39 -5
- package/dist/{codexCommand-CWrFt3Ne.cjs → codexCommand-1vFEA1KT.cjs} +118 -60
- package/dist/{codexCommand-D3_i93Rm.mjs → codexCommand-DUSVzbKh.mjs} +115 -57
- package/dist/{codexTermination-B08GgahL.mjs → codexTermination-Bybovr2z.mjs} +1 -1
- package/dist/{codexTermination-DErS0cGt.cjs → codexTermination-DuDPyBRR.cjs} +1 -1
- package/dist/{config-D3OBduhj.mjs → config-BrzZ0O-6.mjs} +3 -3
- package/dist/{config-D_aj3xgw.cjs → config-C4xOL5bH.cjs} +3 -3
- package/dist/{configuration-DbCHeEeP.mjs → configuration-BZHpFD7K.mjs} +1 -1
- package/dist/{configuration-CI0GWwaT.cjs → configuration-DyPW9mVa.cjs} +1 -1
- package/dist/{connect-BuwVpjkZ.mjs → connect-Cw_INlj8.mjs} +13 -13
- package/dist/{connect-839tEkPN.cjs → connect-DurKwMEo.cjs} +13 -13
- package/dist/{context-zhirgqSw.cjs → context-2xDvjkQp.cjs} +1 -1
- package/dist/{context-D2Y_qLs0.mjs → context-t7YV0aZc.mjs} +1 -1
- package/dist/{controlClient-Dv80mB_j.mjs → controlClient-Bw56NIrj.mjs} +4 -4
- package/dist/{controlClient-BIi1tzEo.cjs → controlClient-DvFaPsg6.cjs} +3 -3
- package/dist/{createSessionMetadata-Dqy_DfoF.mjs → createSessionMetadata-Dn5BkLfU.mjs} +2 -2
- package/dist/{createSessionMetadata-DT24NjY2.cjs → createSessionMetadata-Dpg6bV6f.cjs} +2 -2
- package/dist/{defaultPermissionMode-yR27mevc.mjs → defaultPermissionMode-DMTnlccv.mjs} +2 -2
- package/dist/{defaultPermissionMode-BYqJbPhc.cjs → defaultPermissionMode-Dlm0q1m0.cjs} +2 -2
- package/dist/{deterministicJson-COiJcmUR.mjs → deterministicJson-CsRckxVq.mjs} +14 -14
- package/dist/{deterministicJson-CoWlyn_X.cjs → deterministicJson-D0BrV1FD.cjs} +14 -14
- package/dist/{doctor-Ymj096qP.mjs → doctor-B4HQiW6j.mjs} +7 -7
- package/dist/{doctor-DI6aIOne.cjs → doctor-CYe4d9kU.cjs} +7 -7
- package/dist/{downloadTarget-BOXHrxbm.cjs → downloadTarget-CuhBVvuC.cjs} +6 -6
- package/dist/{downloadTarget-DRXCRDub.mjs → downloadTarget-tYMV_VHo.mjs} +6 -6
- package/dist/{ensureDaemonRunning-BqNjYnar.cjs → ensureDaemonRunning-Ce3BlWiR.cjs} +5 -5
- package/dist/{ensureDaemonRunning-DTrrXAdz.mjs → ensureDaemonRunning-DVtIG9z7.mjs} +5 -5
- package/dist/{handleResumeCommand-DW_MRgtz.mjs → handleResumeCommand-BU1uMNyv.mjs} +5 -5
- package/dist/{handleResumeCommand-BBKUGhCv.cjs → handleResumeCommand-CLxsmAW0.cjs} +5 -5
- package/dist/{index-Cyu_8WAd.mjs → index-B1OxWiNG.mjs} +3 -3
- package/dist/{index-BumVulwx.cjs → index-BOe6dKnL.cjs} +215 -18
- package/dist/{index-04pYyzsJ.mjs → index-CVHRt3SS.mjs} +4 -4
- package/dist/{index-WW17yjQO.mjs → index-ChX0eVXw.mjs} +92 -46
- package/dist/{index-CmlAXizv.mjs → index-DDz0Ftoy.mjs} +7 -7
- package/dist/{index-D9lJhXUk.cjs → index-DG1kGjkF.cjs} +93 -47
- package/dist/{index-W8wlfp57.cjs → index-DoXbGEAi.cjs} +3 -3
- package/dist/{index-Bq6VHNdk.cjs → index-KwuXqLwe.cjs} +4 -4
- package/dist/{index-B9f1vKcC.mjs → index-WKyN-bNy.mjs} +212 -17
- package/dist/{index-CY573fnz.cjs → index-wWJJAQRk.cjs} +7 -7
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-F3rP8tBU.mjs → install-B8O1JpJH.mjs} +1 -1
- package/dist/{install-BATFlr_l.cjs → install-BOHlqewf.cjs} +1 -1
- package/dist/{install-C5XCDwgD.mjs → install-CMa_FOWu.mjs} +3 -3
- package/dist/{install-C1y_g7kj.cjs → install-cAYvHxXR.cjs} +3 -3
- package/dist/lib.cjs +12 -12
- package/dist/lib.d.cts +6 -0
- package/dist/lib.d.mts +6 -0
- package/dist/lib.mjs +12 -12
- package/dist/{lidState-CZ1ggYiB.mjs → lidState-D-lsD1FS.mjs} +1 -1
- package/dist/{lidState-BxHu6dus.cjs → lidState-d1vgQ3n7.cjs} +1 -1
- package/dist/{localHappyAgentAuth-BHklNDKQ.cjs → localHappyAgentAuth-DucSnCg3.cjs} +1 -1
- package/dist/{localHappyAgentAuth-OJk4xDwg.mjs → localHappyAgentAuth-wvDp-nGj.mjs} +1 -1
- package/dist/{logger-L0pLBOLK.cjs → logger-C3vZG6Q0.cjs} +2 -2
- package/dist/{logger-CpaeM90D.mjs → logger-RpzJ4d8V.mjs} +2 -2
- package/dist/{machineMetadata-YeHF4gSY.cjs → machineMetadata-CAvFq1Jg.cjs} +3 -3
- package/dist/{machineMetadata-ukaYmmlK.mjs → machineMetadata-CiQ2_1Mq.mjs} +3 -3
- package/dist/{main-VyiAJXfb.cjs → main-ChpYcFZi.cjs} +46 -46
- package/dist/{main-pkH_VRP-.mjs → main-IPhaImjm.mjs} +46 -46
- package/dist/{mcp-Y8Xsr2Xh.cjs → mcp-2xF232hL.cjs} +15 -15
- package/dist/{mcp-BwoAhEnN.mjs → mcp-CWnMvju6.mjs} +15 -15
- package/dist/{mirrorProtocol-Did0-1jn.cjs → mirrorProtocol-CVzPObON.cjs} +3 -3
- package/dist/{mirrorProtocol-DukUp2Bj.mjs → mirrorProtocol-Dr7fNq8V.mjs} +3 -3
- package/dist/{package-DagIeOhi.mjs → package-CwB8rFJt.mjs} +10 -10
- package/dist/{package-BuATIMpK.cjs → package-Gnf_935w.cjs} +10 -10
- package/dist/{panels-CZ_CRUbM.cjs → panels-DTlTsndU.cjs} +5 -5
- package/dist/{panels-C3dUoUbA.mjs → panels-L1mSkC-y.mjs} +5 -5
- package/dist/{peerTools-CUCqJ83-.mjs → peerTools-2_8Bw9PU.mjs} +5 -5
- package/dist/{peerTools-Cs3Ln6d0.cjs → peerTools-C1E5cQ86.cjs} +5 -5
- package/dist/{persistence-FgtDuVAP.mjs → persistence-Bn4qEbDg.mjs} +2 -2
- package/dist/{persistence-CIzOAWK6.cjs → persistence-CqtjFiD1.cjs} +2 -2
- package/dist/{piRunnerArgs-CJhXFPM9.cjs → piRunnerArgs-BI8yQRBZ.cjs} +1 -1
- package/dist/{piRunnerArgs-YbYkfixz.mjs → piRunnerArgs-DWBb63W9.mjs} +1 -1
- package/dist/{piRuntime-CEzoAYHe.cjs → piRuntime--mQ43MSM.cjs} +2 -2
- package/dist/{piRuntime-CShuw-1A.mjs → piRuntime-Do8oqbm3.mjs} +2 -2
- package/dist/{piTerminal-DVr2W6bI.cjs → piTerminal-BzcvLFsP.cjs} +18 -18
- package/dist/{piTerminal-BvvcgVoW.mjs → piTerminal-GC1KHTYQ.mjs} +18 -18
- package/dist/promptCacheTtl-B8PCzE6k.cjs +76 -0
- package/dist/promptCacheTtl-Ce0TVbrx.mjs +72 -0
- package/dist/{pushNotifications-2CyhYAte.mjs → pushNotifications-BThg4nVd.mjs} +3 -3
- package/dist/{pushNotifications-OtQY-Mfa.cjs → pushNotifications-Bb-QSqXw.cjs} +3 -3
- package/dist/{query-DimRl61I.cjs → query-Bz3pocKH.cjs} +5 -4
- package/dist/{query-B7DvMlYM.mjs → query-CkgIJ_Dy.mjs} +3 -2
- package/dist/{specialCommands-ByrcSYSh.cjs → rateLimitReporter-BkHyvLru.cjs} +3 -55
- package/dist/{specialCommands-B-DAeFrU.mjs → rateLimitReporter-Iw4k3Bbr.mjs} +4 -55
- package/dist/{rateLimitWindows-DwhrA5wy.cjs → rateLimitWindows-Bm_dcQGW.cjs} +1 -1
- package/dist/{rateLimitWindows-C0zbGT7K.mjs → rateLimitWindows-CQ4tIQnx.mjs} +1 -1
- package/dist/{registerCommonHandlers-De54jKz8.cjs → registerCommonHandlers-CIs6H2DV.cjs} +2 -2
- package/dist/{registerCommonHandlers-X9lnO2TF.mjs → registerCommonHandlers-CaWl9ll1.mjs} +2 -2
- package/dist/{remoteSessionClient-9j3N_bzV.cjs → remoteSessionClient-DgUMfPW4.cjs} +5 -5
- package/dist/{remoteSessionClient-BApor-c2.mjs → remoteSessionClient-uPj7omsw.mjs} +5 -5
- package/dist/{reportProgressTool-RR5VkbDf.cjs → reportProgressTool-CaJ8EwLq.cjs} +3 -3
- package/dist/{reportProgressTool-6mDoxKuq.mjs → reportProgressTool-DUEq3xAL.mjs} +3 -3
- package/dist/{resources-CqwHPhdK.cjs → resources-BZ_Be0qM.cjs} +1 -1
- package/dist/{resources-CLdQfe3b.mjs → resources-CLP_MpK4.mjs} +1 -1
- package/dist/{run-CmA3cPD_.mjs → run-DTUJBD6p.mjs} +37 -37
- package/dist/{run-B2ZorDI7.cjs → run-DyyGMqND.cjs} +37 -37
- package/dist/{runClaude-Dk73bQ0n.cjs → runClaude-8JDaPoGQ.cjs} +22 -22
- package/dist/{runClaude-bxwea9mX.mjs → runClaude-DTNvIz2J.mjs} +22 -22
- package/dist/{runClaudeDeps-dVfReVd4.cjs → runClaudeDeps-BeLo5zss.cjs} +84 -55
- package/dist/{runClaudeDeps-DoaYM017.mjs → runClaudeDeps-CgGkgg7e.mjs} +86 -56
- package/dist/{runGemini-BD-wQe5q.cjs → runGemini-BSOdU563.cjs} +55 -51
- package/dist/{runGemini-Dq2iv4UF.mjs → runGemini-eU8UOzfc.mjs} +53 -49
- package/dist/{runOpenClaw-BXLv_bvU.cjs → runOpenClaw-CYyFoGRZ.cjs} +30 -26
- package/dist/{runOpenClaw-C1NB1aLx.mjs → runOpenClaw-D8RZiA1e.mjs} +28 -24
- package/dist/{sandbox-9MIBf8kS.cjs → sandbox-C8zfNX-4.cjs} +4 -4
- package/dist/{sandbox-Dqs_T8Jw.mjs → sandbox-DlPahdhl.mjs} +4 -4
- package/dist/selfCheck-4bcdHPFQ.mjs +86 -0
- package/dist/{selfCheck-CkUezhrg.cjs → selfCheck-D28nvuPJ.cjs} +37 -37
- package/dist/{send-rdhpycNB.cjs → send-C58kX4qz.cjs} +8 -8
- package/dist/{send-4q066vij.mjs → send-DBpv-1eh.mjs} +8 -8
- package/dist/{server-DxTjt1mK.cjs → server-I_CETZzn.cjs} +6 -6
- package/dist/{server-DN6TvjhP.mjs → server-J5K6pOox.mjs} +4 -4
- package/dist/{sessionLock-DOsE5UUf.mjs → sessionLock-C7Wg1RVd.mjs} +3 -3
- package/dist/{sessionLock-h4162Jrf.cjs → sessionLock-DjE7O0LS.cjs} +3 -3
- package/dist/{sessionOps--9p2IzVA.mjs → sessionOps-CYjMT7Ad.mjs} +4 -4
- package/dist/{sessionOps-tmBKG5qg.cjs → sessionOps-DGMpl9NB.cjs} +4 -4
- package/dist/{sessionProvider-B9w7rFDR.cjs → sessionProvider-DVtxrOuM.cjs} +5 -5
- package/dist/{sessionProvider-C6MHJZ9Z.mjs → sessionProvider-TLiFn9kD.mjs} +5 -5
- package/dist/{sessionScanner-Bgvz8Uiy.cjs → sessionScanner-BZ1ZSn6I.cjs} +3 -3
- package/dist/{sessionScanner-B6hzp5R9.mjs → sessionScanner-CknV1IlN.mjs} +3 -3
- package/dist/{sessions-DJMVXKRz.cjs → sessions-CTkBKs5U.cjs} +10 -10
- package/dist/{sessions-iItaUQAF.mjs → sessions-DU4bxkap.mjs} +10 -10
- package/dist/{setupOfflineReconnection-DL4HUMDJ.cjs → setupOfflineReconnection-CQHNuP_0.cjs} +2 -2
- package/dist/{setupOfflineReconnection-DF78nz1N.mjs → setupOfflineReconnection-DaOXnGuH.mjs} +2 -2
- package/dist/{spawn-CL9A8dBJ.cjs → spawn-C0wZc03S.cjs} +67 -25
- package/dist/{spawn-CoYfACsc.mjs → spawn-DdnYTtQe.mjs} +67 -26
- package/dist/{spawnAgents-DsJSyLDl.cjs → spawnAgents-BjyU78Ue.cjs} +21 -9
- package/dist/{spawnAgents-f2q31uUV.mjs → spawnAgents-D-7wMw-a.mjs} +21 -10
- package/dist/{spawnHappyCLI-BWOub_Uf.cjs → spawnHappyCLI-BJUd974I.cjs} +1 -1
- package/dist/{spawnHappyCLI-BcSO1rF6.mjs → spawnHappyCLI-CnyyJk74.mjs} +1 -1
- package/dist/{registerKillSessionHandler-CAif4Uz4.cjs → specialCommands-BsvSoDhC.cjs} +91 -6
- package/dist/{registerKillSessionHandler-CrLsN5m3.mjs → specialCommands-DHU7TNeK.mjs} +88 -7
- package/dist/{startFileWatcher-DVia64Vg.mjs → startFileWatcher-CpO5Mwbr.mjs} +1 -1
- package/dist/{startFileWatcher-BZrpUz7_.cjs → startFileWatcher-DBboREco.cjs} +1 -1
- package/dist/{startupSessionCreate-CY4tPjlZ.mjs → startupSessionCreate-BgaVuvQp.mjs} +1 -1
- package/dist/{startupSessionCreate-63ABDnfJ.cjs → startupSessionCreate-C1u2dtz8.cjs} +1 -1
- package/dist/{streamRelay-B3FloUTT.mjs → streamRelay-CqBynIon.mjs} +1 -1
- package/dist/{streamRelay-Cn_uGG6m.cjs → streamRelay-D9a4cBEa.cjs} +1 -1
- package/dist/{sync-CKSmwxec.cjs → sync-6HFRJP1h.cjs} +1 -1
- package/dist/{sync-CZjyTC4v.mjs → sync-I8NYmycF.mjs} +1 -1
- package/dist/{systemPrompt-BPzhf5d5.cjs → systemPrompt-BDWj5QSL.cjs} +2 -2
- package/dist/{systemPrompt-BKUVX-fd.mjs → systemPrompt-C1RSY_60.mjs} +2 -2
- package/dist/{teams-B2-KPjRg.mjs → teams-GpLFbXXE.mjs} +9 -9
- package/dist/{teams-CHBszdmc.cjs → teams-eUD7ymif.cjs} +9 -9
- package/dist/{template-DPsqlHJQ.cjs → template-17HATY_Y.cjs} +1 -1
- package/dist/{template-DuKZw-Sz.mjs → template-CEK8MEjo.mjs} +1 -1
- package/dist/{time-DcICfW0N.cjs → time-BAJRbB6U.cjs} +1 -1
- package/dist/{time-BsNUVcKH.mjs → time-umG7yHkb.mjs} +1 -1
- package/dist/{titleGenerator-B4b4ah--.mjs → titleGenerator-dmFlxkRs.mjs} +1 -1
- package/dist/{titleGenerator-Bvk1mx7G.cjs → titleGenerator-iqb2jOF1.cjs} +2 -2
- package/dist/{todo-C7--CBge.mjs → todo-CT4AJ3sH.mjs} +6 -6
- package/dist/{todo-BN4hhun6.cjs → todo-DsR7WnQS.cjs} +6 -6
- package/dist/tools-30E66QL_.cjs +140 -0
- package/dist/tools-BOWazSD6.mjs +137 -0
- package/dist/{uninstall-_qDbgdxh.cjs → uninstall-BtTc9hHa.cjs} +3 -3
- package/dist/{uninstall-Bjwl9bqK.mjs → uninstall-DImXs6VZ.mjs} +3 -3
- package/package.json +10 -10
- package/dist/selfCheck-Dz_Sm7w8.mjs +0 -86
- package/dist/smallFastModel-BLNgMrwR.mjs +0 -18
- package/dist/smallFastModel-D_uxGMo3.cjs +0 -21
- package/dist/tools-BILbS8Hh.mjs +0 -60
- package/dist/tools-Bl5Q_6Nr.cjs +0 -63
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { r as resolveSpawnPermissionMode, c as chooseProject, j as joinProject, a as resolveFirstMessageMeta, s as sanitizeSpawnPermissionMode, A as ALLOWED_SPAWN_PERMISSION_MODES, S as SPAWN_AGENTS } from './spawnAgents-
|
|
2
|
-
import { s as sharedProjectsClient } from './client-
|
|
1
|
+
import { r as resolveSpawnPermissionMode, c as chooseProject, j as joinProject, a as resolveFirstMessageMeta, w as waitsForModelCatalog, s as sanitizeSpawnPermissionMode, A as ALLOWED_SPAWN_PERMISSION_MODES, S as SPAWN_AGENTS } from './spawnAgents-D-7wMw-a.mjs';
|
|
2
|
+
import { s as sharedProjectsClient } from './client-DWws_aQK.mjs';
|
|
3
3
|
import chalk from 'chalk';
|
|
4
4
|
import { readFileSync, statSync } from 'node:fs';
|
|
5
5
|
import { resolve } from 'node:path';
|
|
6
|
-
import {
|
|
7
|
-
import { c as readPersistedSessions } from './persistence-
|
|
6
|
+
import { b as checkIfDaemonRunningAndCleanupStaleState, g as spawnDaemonSession, f as stopDaemonSession } from './controlClient-Bw56NIrj.mjs';
|
|
7
|
+
import { c as readPersistedSessions } from './persistence-Bn4qEbDg.mjs';
|
|
8
|
+
import { p as parseLatestModelTable } from './index-WKyN-bNy.mjs';
|
|
9
|
+
import { c as configuration } from './configuration-BZHpFD7K.mjs';
|
|
8
10
|
import { g as getProjectPath } from './path-D2wdaNSk.mjs';
|
|
9
|
-
import { f as forkSession, F as ForkSourceMissingError } from './claudeSessionFork-
|
|
10
|
-
import { C as CodexAppServerClient } from './codexAppServerClient-
|
|
11
|
+
import { f as forkSession, F as ForkSourceMissingError } from './claudeSessionFork-DzWFzj9m.mjs';
|
|
12
|
+
import { C as CodexAppServerClient } from './codexAppServerClient-DgE99i7X.mjs';
|
|
11
13
|
import { f as forkCodexThread } from './codexThreadFork-R76RU5H0.mjs';
|
|
12
|
-
import { e as sendUserMessage, f as readSessionMetadata, g as waitForSessionKey, s as sessionWebUrl } from './sessionOps
|
|
13
|
-
import { i as isValidSpawnOrigin } from './createSessionMetadata-
|
|
14
|
-
import { l as logger } from './logger-
|
|
14
|
+
import { e as sendUserMessage, f as readSessionMetadata, g as waitForSessionKey, s as sessionWebUrl } from './sessionOps-CYjMT7Ad.mjs';
|
|
15
|
+
import { i as isValidSpawnOrigin } from './createSessionMetadata-Dn5BkLfU.mjs';
|
|
16
|
+
import { l as logger } from './logger-RpzJ4d8V.mjs';
|
|
15
17
|
import { w as waitForForkBackfill } from './forkBackfill-DYIjlN1Z.mjs';
|
|
16
|
-
import './index-B9f1vKcC.mjs';
|
|
17
|
-
import 'zod';
|
|
18
|
-
import '@paralleldrive/cuid2';
|
|
19
|
-
import './configuration-DbCHeEeP.mjs';
|
|
20
|
-
import 'node:os';
|
|
21
|
-
import './package-DagIeOhi.mjs';
|
|
22
18
|
import 'node:fs/promises';
|
|
19
|
+
import 'zod';
|
|
23
20
|
import './authRelay-DhQhkBvX.mjs';
|
|
24
21
|
import 'node:crypto';
|
|
25
22
|
import 'tweetnacl';
|
|
23
|
+
import '@paralleldrive/cuid2';
|
|
24
|
+
import 'node:os';
|
|
25
|
+
import './package-CwB8rFJt.mjs';
|
|
26
26
|
import 'node:readline';
|
|
27
27
|
import 'node:child_process';
|
|
28
28
|
import 'cross-spawn';
|
|
29
29
|
import './contentLogMetadata-BlWI0egu.mjs';
|
|
30
30
|
import './manager-BEsI4qt3.mjs';
|
|
31
31
|
import '@anthropic-ai/sandbox-runtime';
|
|
32
|
-
import './rateLimitWindows-
|
|
32
|
+
import './rateLimitWindows-CQ4tIQnx.mjs';
|
|
33
33
|
import './processTree-CP5IvQ2Z.mjs';
|
|
34
34
|
import 'axios';
|
|
35
|
-
import './time-
|
|
35
|
+
import './time-umG7yHkb.mjs';
|
|
36
36
|
import 'socket.io-client';
|
|
37
37
|
import './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
38
38
|
import './projectPath-BTBIMB57.mjs';
|
|
@@ -40,6 +40,24 @@ import 'path';
|
|
|
40
40
|
import 'url';
|
|
41
41
|
import 'node:util';
|
|
42
42
|
|
|
43
|
+
async function fetchLatestModelTable(serverUrl, fetcher = fetch, timeoutMs = 2e3) {
|
|
44
|
+
const controller = new AbortController();
|
|
45
|
+
const timeout = setTimeout(() => controller.abort(), timeoutMs);
|
|
46
|
+
try {
|
|
47
|
+
const response = await fetcher(`${serverUrl}/v1/models/latest`, {
|
|
48
|
+
signal: controller.signal,
|
|
49
|
+
headers: { accept: "application/json" }
|
|
50
|
+
});
|
|
51
|
+
if (!response.ok) return null;
|
|
52
|
+
const body = await response.json();
|
|
53
|
+
return parseLatestModelTable(body?.table);
|
|
54
|
+
} catch {
|
|
55
|
+
return null;
|
|
56
|
+
} finally {
|
|
57
|
+
clearTimeout(timeout);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
43
61
|
function nonEmpty(value) {
|
|
44
62
|
return typeof value === "string" && value.trim().length > 0;
|
|
45
63
|
}
|
|
@@ -194,10 +212,11 @@ ${chalk.bold("Options:")}
|
|
|
194
212
|
--agent <name> Backend to run: claude (default), codex, gemini,
|
|
195
213
|
openclaw, pi (needs pi-acp on the daemon's PATH).
|
|
196
214
|
--model, -m <id> Model for the session, sent with the first message
|
|
197
|
-
(needs --prompt). Default = the web launcher's
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
215
|
+
(needs --prompt). Default = the web launcher's
|
|
216
|
+
'latest': the newest model of the agent's tier this
|
|
217
|
+
machine runs (claude: newest Opus; codex: newest
|
|
218
|
+
sol its Codex lists; gemini: newest pro), else the
|
|
219
|
+
machine default. 'default' = the machine default.
|
|
201
220
|
--fork <sessionId> Fork an existing session of THIS machine (same as the
|
|
202
221
|
web's fork): copies its conversation and continues
|
|
203
222
|
it in a new session, in the same directory and with
|
|
@@ -236,6 +255,23 @@ const defaultFirstMessageDeps = {
|
|
|
236
255
|
sendUserMessage,
|
|
237
256
|
warn: (message) => console.error(chalk.yellow("Warning:"), message)
|
|
238
257
|
};
|
|
258
|
+
async function waitForModelCatalog(readMetadata, initial, knobs = {}) {
|
|
259
|
+
const timeoutMs = knobs.timeoutMs ?? 8e3;
|
|
260
|
+
const pollMs = knobs.pollMs ?? 400;
|
|
261
|
+
const sleep = knobs.sleep ?? ((ms) => new Promise((r) => setTimeout(r, ms)));
|
|
262
|
+
const now = knobs.now ?? Date.now;
|
|
263
|
+
let current = initial;
|
|
264
|
+
const deadline = now() + timeoutMs;
|
|
265
|
+
while (!(current?.models && current.models.length > 0) && current?.configuredModel === void 0 && now() < deadline) {
|
|
266
|
+
await sleep(pollMs);
|
|
267
|
+
try {
|
|
268
|
+
const read = await readMetadata();
|
|
269
|
+
if (read) current = read;
|
|
270
|
+
} catch {
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
return current;
|
|
274
|
+
}
|
|
239
275
|
async function sendFirstMessage(sessionId, text, metaFor, opts, deps = defaultFirstMessageDeps) {
|
|
240
276
|
const persisted = await deps.waitForSessionKey(sessionId, 15e3);
|
|
241
277
|
if (opts.fork) {
|
|
@@ -248,7 +284,8 @@ async function sendFirstMessage(sessionId, text, metaFor, opts, deps = defaultFi
|
|
|
248
284
|
deps.warn?.("the forked session runs an older wrapper that cannot confirm its replayed history is uploaded; sending now, so the first message may appear inside that history. Restart the daemon on this CLI version to fix.");
|
|
249
285
|
}
|
|
250
286
|
}
|
|
251
|
-
const
|
|
287
|
+
const metadata = opts.waitForCatalog ? await waitForModelCatalog(() => deps.readSessionMetadata(sessionId, persisted), persisted.metadata, deps.catalogWait) : persisted.metadata;
|
|
288
|
+
const meta = metaFor(metadata);
|
|
252
289
|
await deps.sendUserMessage(sessionId, persisted, text, "cli-spawn", meta);
|
|
253
290
|
return meta;
|
|
254
291
|
}
|
|
@@ -369,12 +406,16 @@ async function handleSpawnCommand(args) {
|
|
|
369
406
|
let sentMeta = null;
|
|
370
407
|
if (prompt !== void 0) {
|
|
371
408
|
try {
|
|
372
|
-
|
|
409
|
+
const latestTable = await fetchLatestModelTable(configuration.serverUrl);
|
|
410
|
+
sentMeta = await sendFirstMessage(sessionId, prompt, (metadata) => resolveFirstMessageMeta({
|
|
373
411
|
agent,
|
|
374
412
|
permissionMode,
|
|
375
413
|
explicitModel: options.model,
|
|
376
|
-
capabilities
|
|
377
|
-
|
|
414
|
+
capabilities: metadata?.capabilities ?? null,
|
|
415
|
+
catalog: metadata?.models ?? null,
|
|
416
|
+
configuredModel: metadata?.configuredModel,
|
|
417
|
+
latestTable
|
|
418
|
+
}), { fork: forkSource !== null, waitForCatalog: waitsForModelCatalog(agent, options.model) });
|
|
378
419
|
} catch (error) {
|
|
379
420
|
promptError = error instanceof Error ? error.message : String(error);
|
|
380
421
|
}
|
|
@@ -418,4 +459,4 @@ async function handleSpawnCommand(args) {
|
|
|
418
459
|
process.exit(0);
|
|
419
460
|
}
|
|
420
461
|
|
|
421
|
-
export { SPAWN_AGENTS, handleSpawnCommand, parseEnvAssignment, parseSpawnArgs, sendFirstMessage, sessionWebUrl, spawnEnvironmentVariables };
|
|
462
|
+
export { SPAWN_AGENTS, handleSpawnCommand, parseEnvAssignment, parseSpawnArgs, sendFirstMessage, sessionWebUrl, spawnEnvironmentVariables, waitForModelCatalog };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BOe6dKnL.cjs');
|
|
4
4
|
|
|
5
5
|
function chooseProject(opts) {
|
|
6
6
|
if (opts.project) return { kind: "explicit", projectId: opts.project };
|
|
@@ -48,18 +48,29 @@ function resolveFirstMessageMeta(input) {
|
|
|
48
48
|
const meta = {
|
|
49
49
|
permissionMode: outboundPermissionMode(input.agent, input.permissionMode)
|
|
50
50
|
};
|
|
51
|
-
|
|
51
|
+
const key = index.normalizeAgentKey(input.agent ?? "claude");
|
|
52
|
+
const wanted = input.explicitModel ?? index.getAgentCodeDefaults(key).modelMode;
|
|
53
|
+
if (index.isLatestModelMode(wanted)) {
|
|
54
|
+
const resolved = index.resolveLatestModel(input.latestTable, key, {
|
|
55
|
+
capabilities: input.capabilities ?? null,
|
|
56
|
+
catalog: input.catalog ?? null,
|
|
57
|
+
configuredModel: input.configuredModel
|
|
58
|
+
}).model;
|
|
59
|
+
if (resolved) meta.model = resolved;
|
|
60
|
+
else if (key === "claude" || input.explicitModel !== void 0) meta.model = null;
|
|
61
|
+
} else if (input.explicitModel !== void 0) {
|
|
52
62
|
meta.model = input.explicitModel === "default" ? null : input.explicitModel;
|
|
63
|
+
} else if (key === "claude") {
|
|
64
|
+
meta.model = wanted === "default" ? null : wanted;
|
|
53
65
|
}
|
|
54
|
-
if (
|
|
55
|
-
if (meta.model === void 0) {
|
|
56
|
-
const model = index.getAgentCodeDefaults("claude").modelMode;
|
|
57
|
-
const runnable = !index.isClaudeOpus55Model(model) || index.supportsClaudeOpus55({ capabilities: input.capabilities ?? null });
|
|
58
|
-
meta.model = runnable && model !== "default" ? model : null;
|
|
59
|
-
}
|
|
60
|
-
meta.effort = null;
|
|
66
|
+
if (key === "claude") meta.effort = null;
|
|
61
67
|
return meta;
|
|
62
68
|
}
|
|
69
|
+
function waitsForModelCatalog(agent, explicitModel) {
|
|
70
|
+
const key = index.normalizeAgentKey(agent ?? "claude");
|
|
71
|
+
if (key !== "codex" && key !== "gemini") return false;
|
|
72
|
+
return index.isLatestModelMode(explicitModel ?? index.getAgentCodeDefaults(key).modelMode);
|
|
73
|
+
}
|
|
63
74
|
|
|
64
75
|
const ALLOWED_SPAWN_PERMISSION_MODES = [
|
|
65
76
|
"default",
|
|
@@ -86,3 +97,4 @@ exports.joinProject = joinProject;
|
|
|
86
97
|
exports.resolveFirstMessageMeta = resolveFirstMessageMeta;
|
|
87
98
|
exports.resolveSpawnPermissionMode = resolveSpawnPermissionMode;
|
|
88
99
|
exports.sanitizeSpawnPermissionMode = sanitizeSpawnPermissionMode;
|
|
100
|
+
exports.waitsForModelCatalog = waitsForModelCatalog;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { k as getAgentCodeDefaults,
|
|
1
|
+
import { k as getAgentCodeDefaults, l as isLatestModelMode, m as resolveLatestModel, n as normalizeAgentKey } from './index-WKyN-bNy.mjs';
|
|
2
2
|
|
|
3
3
|
function chooseProject(opts) {
|
|
4
4
|
if (opts.project) return { kind: "explicit", projectId: opts.project };
|
|
@@ -46,18 +46,29 @@ function resolveFirstMessageMeta(input) {
|
|
|
46
46
|
const meta = {
|
|
47
47
|
permissionMode: outboundPermissionMode(input.agent, input.permissionMode)
|
|
48
48
|
};
|
|
49
|
-
|
|
49
|
+
const key = normalizeAgentKey(input.agent ?? "claude");
|
|
50
|
+
const wanted = input.explicitModel ?? getAgentCodeDefaults(key).modelMode;
|
|
51
|
+
if (isLatestModelMode(wanted)) {
|
|
52
|
+
const resolved = resolveLatestModel(input.latestTable, key, {
|
|
53
|
+
capabilities: input.capabilities ?? null,
|
|
54
|
+
catalog: input.catalog ?? null,
|
|
55
|
+
configuredModel: input.configuredModel
|
|
56
|
+
}).model;
|
|
57
|
+
if (resolved) meta.model = resolved;
|
|
58
|
+
else if (key === "claude" || input.explicitModel !== void 0) meta.model = null;
|
|
59
|
+
} else if (input.explicitModel !== void 0) {
|
|
50
60
|
meta.model = input.explicitModel === "default" ? null : input.explicitModel;
|
|
61
|
+
} else if (key === "claude") {
|
|
62
|
+
meta.model = wanted === "default" ? null : wanted;
|
|
51
63
|
}
|
|
52
|
-
if (
|
|
53
|
-
if (meta.model === void 0) {
|
|
54
|
-
const model = getAgentCodeDefaults("claude").modelMode;
|
|
55
|
-
const runnable = !isClaudeOpus55Model(model) || supportsClaudeOpus55({ capabilities: input.capabilities ?? null });
|
|
56
|
-
meta.model = runnable && model !== "default" ? model : null;
|
|
57
|
-
}
|
|
58
|
-
meta.effort = null;
|
|
64
|
+
if (key === "claude") meta.effort = null;
|
|
59
65
|
return meta;
|
|
60
66
|
}
|
|
67
|
+
function waitsForModelCatalog(agent, explicitModel) {
|
|
68
|
+
const key = normalizeAgentKey(agent ?? "claude");
|
|
69
|
+
if (key !== "codex" && key !== "gemini") return false;
|
|
70
|
+
return isLatestModelMode(explicitModel ?? getAgentCodeDefaults(key).modelMode);
|
|
71
|
+
}
|
|
61
72
|
|
|
62
73
|
const ALLOWED_SPAWN_PERMISSION_MODES = [
|
|
63
74
|
"default",
|
|
@@ -76,4 +87,4 @@ function isSpawnAgent(value) {
|
|
|
76
87
|
return typeof value === "string" && SPAWN_AGENTS.includes(value);
|
|
77
88
|
}
|
|
78
89
|
|
|
79
|
-
export { ALLOWED_SPAWN_PERMISSION_MODES as A, SPAWN_AGENTS as S, resolveFirstMessageMeta as a, chooseProject as c, isSpawnAgent as i, joinProject as j, resolveSpawnPermissionMode as r, sanitizeSpawnPermissionMode as s };
|
|
90
|
+
export { ALLOWED_SPAWN_PERMISSION_MODES as A, SPAWN_AGENTS as S, resolveFirstMessageMeta as a, chooseProject as c, isSpawnAgent as i, joinProject as j, resolveSpawnPermissionMode as r, sanitizeSpawnPermissionMode as s, waitsForModelCatalog as w };
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var spawn = require('cross-spawn');
|
|
4
4
|
var path = require('node:path');
|
|
5
5
|
var projectPath = require('./projectPath-C3ioB4Bu.cjs');
|
|
6
|
-
var logger = require('./logger-
|
|
6
|
+
var logger = require('./logger-C3vZG6Q0.cjs');
|
|
7
7
|
var node_fs = require('node:fs');
|
|
8
8
|
|
|
9
9
|
let cachedRuntime = null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { spawn } from 'cross-spawn';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
4
|
-
import { l as logger } from './logger-
|
|
4
|
+
import { l as logger } from './logger-RpzJ4d8V.mjs';
|
|
5
5
|
import { existsSync } from 'node:fs';
|
|
6
6
|
|
|
7
7
|
let cachedRuntime = null;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var logger = require('./logger-
|
|
3
|
+
var logger = require('./logger-C3vZG6Q0.cjs');
|
|
4
4
|
require('axios');
|
|
5
5
|
require('node:events');
|
|
6
6
|
require('socket.io-client');
|
|
7
|
-
require('./pushNotifications-
|
|
7
|
+
require('./pushNotifications-Bb-QSqXw.cjs');
|
|
8
8
|
require('node:crypto');
|
|
9
9
|
require('tweetnacl');
|
|
10
|
-
require('./configuration-
|
|
11
|
-
require('./index-
|
|
12
|
-
require('./registerCommonHandlers-
|
|
10
|
+
require('./configuration-DyPW9mVa.cjs');
|
|
11
|
+
require('./index-BOe6dKnL.cjs');
|
|
12
|
+
require('./registerCommonHandlers-CIs6H2DV.cjs');
|
|
13
13
|
require('os');
|
|
14
14
|
require('child_process');
|
|
15
15
|
require('@paralleldrive/cuid2');
|
|
16
|
-
require('./persistence-
|
|
16
|
+
require('./persistence-CqtjFiD1.cjs');
|
|
17
17
|
require('chalk');
|
|
18
18
|
require('./types-CRS-srZK.cjs');
|
|
19
19
|
|
|
@@ -160,6 +160,34 @@ class MessageQueue2 {
|
|
|
160
160
|
}
|
|
161
161
|
logger.logger.debug(`[MessageQueue2] pushIsolateAndClear() completed. Queue size: ${this.queue.length}`);
|
|
162
162
|
}
|
|
163
|
+
/**
|
|
164
|
+
* Push a message that runs as a turn of its own — never joined with the
|
|
165
|
+
* messages around it — without dropping what is already queued. For agent
|
|
166
|
+
* commands (`/compact`) that only work when they are the whole prompt.
|
|
167
|
+
*/
|
|
168
|
+
pushIsolate(message, mode, attachments, sourceId) {
|
|
169
|
+
if (this.closed) {
|
|
170
|
+
throw new Error("Cannot push to closed queue");
|
|
171
|
+
}
|
|
172
|
+
this.queue.push({
|
|
173
|
+
message,
|
|
174
|
+
mode,
|
|
175
|
+
modeHash: this.modeHasher(mode),
|
|
176
|
+
isolate: true,
|
|
177
|
+
attachments,
|
|
178
|
+
sourceId,
|
|
179
|
+
enqueuedAt: Date.now()
|
|
180
|
+
});
|
|
181
|
+
if (this.onMessageHandler) {
|
|
182
|
+
this.onMessageHandler(message, mode);
|
|
183
|
+
}
|
|
184
|
+
if (this.waiter) {
|
|
185
|
+
const waiter = this.waiter;
|
|
186
|
+
this.waiter = null;
|
|
187
|
+
waiter(true);
|
|
188
|
+
}
|
|
189
|
+
logger.logger.debug(`[MessageQueue2] pushIsolate() completed. Queue size: ${this.queue.length}`);
|
|
190
|
+
}
|
|
163
191
|
/**
|
|
164
192
|
* Push a message to the beginning of the queue with a mode.
|
|
165
193
|
*/
|
|
@@ -371,5 +399,62 @@ function registerKillSessionHandler(rpcHandlerManager, killThisHappy, archiveEve
|
|
|
371
399
|
};
|
|
372
400
|
}
|
|
373
401
|
|
|
402
|
+
const COMPACT_RE = /^[/\uFF0F]compact(?![A-Za-z0-9_:-])([\s\S]*)$/i;
|
|
403
|
+
const LEADING_SPACE_RE = /^[\s\u3000\uFEFF\u200B]+/;
|
|
404
|
+
function parseCompact(message) {
|
|
405
|
+
const match = message.replace(LEADING_SPACE_RE, "").match(COMPACT_RE);
|
|
406
|
+
if (!match) {
|
|
407
|
+
return {
|
|
408
|
+
isCompact: false,
|
|
409
|
+
originalMessage: message
|
|
410
|
+
};
|
|
411
|
+
}
|
|
412
|
+
const instructions = match[1].replace(/\u3000/g, " ").trim();
|
|
413
|
+
return {
|
|
414
|
+
isCompact: true,
|
|
415
|
+
originalMessage: instructions ? `/compact ${instructions}` : "/compact"
|
|
416
|
+
};
|
|
417
|
+
}
|
|
418
|
+
function compactCommandText(message) {
|
|
419
|
+
const result = parseCompact(message);
|
|
420
|
+
return result.isCompact ? result.originalMessage : null;
|
|
421
|
+
}
|
|
422
|
+
function parseClear(message) {
|
|
423
|
+
const trimmed = message.trim();
|
|
424
|
+
return {
|
|
425
|
+
isClear: trimmed === "/clear"
|
|
426
|
+
};
|
|
427
|
+
}
|
|
428
|
+
function parseSpecialCommand(message) {
|
|
429
|
+
const compactResult = parseCompact(message);
|
|
430
|
+
if (compactResult.isCompact) {
|
|
431
|
+
return {
|
|
432
|
+
type: "compact",
|
|
433
|
+
originalMessage: compactResult.originalMessage
|
|
434
|
+
};
|
|
435
|
+
}
|
|
436
|
+
const clearResult = parseClear(message);
|
|
437
|
+
if (clearResult.isClear) {
|
|
438
|
+
return {
|
|
439
|
+
type: "clear"
|
|
440
|
+
};
|
|
441
|
+
}
|
|
442
|
+
const trimmed = message.trim().toLowerCase();
|
|
443
|
+
if (trimmed === "/mcp") {
|
|
444
|
+
return { type: "mcp" };
|
|
445
|
+
}
|
|
446
|
+
if (trimmed === "/skills") {
|
|
447
|
+
return { type: "skills" };
|
|
448
|
+
}
|
|
449
|
+
return {
|
|
450
|
+
type: null
|
|
451
|
+
};
|
|
452
|
+
}
|
|
453
|
+
const COMPACT_UNSUPPORTED_NOTICE = "This session type does not support /compact";
|
|
454
|
+
|
|
455
|
+
exports.COMPACT_UNSUPPORTED_NOTICE = COMPACT_UNSUPPORTED_NOTICE;
|
|
374
456
|
exports.MessageQueue2 = MessageQueue2;
|
|
457
|
+
exports.compactCommandText = compactCommandText;
|
|
458
|
+
exports.parseCompact = parseCompact;
|
|
459
|
+
exports.parseSpecialCommand = parseSpecialCommand;
|
|
375
460
|
exports.registerKillSessionHandler = registerKillSessionHandler;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { l as logger } from './logger-
|
|
1
|
+
import { l as logger } from './logger-RpzJ4d8V.mjs';
|
|
2
2
|
import 'axios';
|
|
3
3
|
import 'node:events';
|
|
4
4
|
import 'socket.io-client';
|
|
5
|
-
import './pushNotifications-
|
|
5
|
+
import './pushNotifications-BThg4nVd.mjs';
|
|
6
6
|
import 'node:crypto';
|
|
7
7
|
import 'tweetnacl';
|
|
8
|
-
import './configuration-
|
|
9
|
-
import './index-
|
|
10
|
-
import './registerCommonHandlers-
|
|
8
|
+
import './configuration-BZHpFD7K.mjs';
|
|
9
|
+
import './index-WKyN-bNy.mjs';
|
|
10
|
+
import './registerCommonHandlers-CaWl9ll1.mjs';
|
|
11
11
|
import 'os';
|
|
12
12
|
import 'child_process';
|
|
13
13
|
import '@paralleldrive/cuid2';
|
|
14
|
-
import './persistence-
|
|
14
|
+
import './persistence-Bn4qEbDg.mjs';
|
|
15
15
|
import 'chalk';
|
|
16
16
|
import './types-CkqAACXx.mjs';
|
|
17
17
|
|
|
@@ -158,6 +158,34 @@ class MessageQueue2 {
|
|
|
158
158
|
}
|
|
159
159
|
logger.debug(`[MessageQueue2] pushIsolateAndClear() completed. Queue size: ${this.queue.length}`);
|
|
160
160
|
}
|
|
161
|
+
/**
|
|
162
|
+
* Push a message that runs as a turn of its own — never joined with the
|
|
163
|
+
* messages around it — without dropping what is already queued. For agent
|
|
164
|
+
* commands (`/compact`) that only work when they are the whole prompt.
|
|
165
|
+
*/
|
|
166
|
+
pushIsolate(message, mode, attachments, sourceId) {
|
|
167
|
+
if (this.closed) {
|
|
168
|
+
throw new Error("Cannot push to closed queue");
|
|
169
|
+
}
|
|
170
|
+
this.queue.push({
|
|
171
|
+
message,
|
|
172
|
+
mode,
|
|
173
|
+
modeHash: this.modeHasher(mode),
|
|
174
|
+
isolate: true,
|
|
175
|
+
attachments,
|
|
176
|
+
sourceId,
|
|
177
|
+
enqueuedAt: Date.now()
|
|
178
|
+
});
|
|
179
|
+
if (this.onMessageHandler) {
|
|
180
|
+
this.onMessageHandler(message, mode);
|
|
181
|
+
}
|
|
182
|
+
if (this.waiter) {
|
|
183
|
+
const waiter = this.waiter;
|
|
184
|
+
this.waiter = null;
|
|
185
|
+
waiter(true);
|
|
186
|
+
}
|
|
187
|
+
logger.debug(`[MessageQueue2] pushIsolate() completed. Queue size: ${this.queue.length}`);
|
|
188
|
+
}
|
|
161
189
|
/**
|
|
162
190
|
* Push a message to the beginning of the queue with a mode.
|
|
163
191
|
*/
|
|
@@ -369,4 +397,57 @@ function registerKillSessionHandler(rpcHandlerManager, killThisHappy, archiveEve
|
|
|
369
397
|
};
|
|
370
398
|
}
|
|
371
399
|
|
|
372
|
-
|
|
400
|
+
const COMPACT_RE = /^[/\uFF0F]compact(?![A-Za-z0-9_:-])([\s\S]*)$/i;
|
|
401
|
+
const LEADING_SPACE_RE = /^[\s\u3000\uFEFF\u200B]+/;
|
|
402
|
+
function parseCompact(message) {
|
|
403
|
+
const match = message.replace(LEADING_SPACE_RE, "").match(COMPACT_RE);
|
|
404
|
+
if (!match) {
|
|
405
|
+
return {
|
|
406
|
+
isCompact: false,
|
|
407
|
+
originalMessage: message
|
|
408
|
+
};
|
|
409
|
+
}
|
|
410
|
+
const instructions = match[1].replace(/\u3000/g, " ").trim();
|
|
411
|
+
return {
|
|
412
|
+
isCompact: true,
|
|
413
|
+
originalMessage: instructions ? `/compact ${instructions}` : "/compact"
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
function compactCommandText(message) {
|
|
417
|
+
const result = parseCompact(message);
|
|
418
|
+
return result.isCompact ? result.originalMessage : null;
|
|
419
|
+
}
|
|
420
|
+
function parseClear(message) {
|
|
421
|
+
const trimmed = message.trim();
|
|
422
|
+
return {
|
|
423
|
+
isClear: trimmed === "/clear"
|
|
424
|
+
};
|
|
425
|
+
}
|
|
426
|
+
function parseSpecialCommand(message) {
|
|
427
|
+
const compactResult = parseCompact(message);
|
|
428
|
+
if (compactResult.isCompact) {
|
|
429
|
+
return {
|
|
430
|
+
type: "compact",
|
|
431
|
+
originalMessage: compactResult.originalMessage
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
const clearResult = parseClear(message);
|
|
435
|
+
if (clearResult.isClear) {
|
|
436
|
+
return {
|
|
437
|
+
type: "clear"
|
|
438
|
+
};
|
|
439
|
+
}
|
|
440
|
+
const trimmed = message.trim().toLowerCase();
|
|
441
|
+
if (trimmed === "/mcp") {
|
|
442
|
+
return { type: "mcp" };
|
|
443
|
+
}
|
|
444
|
+
if (trimmed === "/skills") {
|
|
445
|
+
return { type: "skills" };
|
|
446
|
+
}
|
|
447
|
+
return {
|
|
448
|
+
type: null
|
|
449
|
+
};
|
|
450
|
+
}
|
|
451
|
+
const COMPACT_UNSUPPORTED_NOTICE = "This session type does not support /compact";
|
|
452
|
+
|
|
453
|
+
export { COMPACT_UNSUPPORTED_NOTICE as C, MessageQueue2 as M, parseCompact as a, compactCommandText as c, parseSpecialCommand as p, registerKillSessionHandler as r };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var logger = require('./logger-
|
|
3
|
+
var logger = require('./logger-C3vZG6Q0.cjs');
|
|
4
4
|
var node_fs = require('node:fs');
|
|
5
5
|
var path$1 = require('node:path');
|
|
6
6
|
var path = require('./path-B7zW-WwE.cjs');
|
|
7
|
-
var index = require('./index-
|
|
7
|
+
var index = require('./index-BOe6dKnL.cjs');
|
|
8
8
|
var trimIdent = require('./trimIdent-4gvk9Wk6.cjs');
|
|
9
9
|
var os = require('node:os');
|
|
10
10
|
var agentGuidance = require('./agentGuidance-BtBx2xxE.cjs');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { l as logger } from './logger-
|
|
1
|
+
import { l as logger } from './logger-RpzJ4d8V.mjs';
|
|
2
2
|
import { existsSync, readFileSync } from 'node:fs';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
4
|
import { g as getProjectPath } from './path-D2wdaNSk.mjs';
|
|
5
|
-
import { j as BUILTIN_TODO_DISCOVERY } from './index-
|
|
5
|
+
import { j as BUILTIN_TODO_DISCOVERY } from './index-WKyN-bNy.mjs';
|
|
6
6
|
import { t as trimIdent } from './trimIdent-BAjmv_TG.mjs';
|
|
7
7
|
import { homedir } from 'node:os';
|
|
8
8
|
import { A as AGENT_GUIDANCE } from './agentGuidance-BDYt2Qy2.mjs';
|
|
@@ -2,23 +2,23 @@ import { homedir } from 'node:os';
|
|
|
2
2
|
import { readFile } from 'node:fs/promises';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { randomUUID } from 'node:crypto';
|
|
5
|
-
import { t as teamRequest, c as createTeamsClient } from './client-
|
|
6
|
-
import { b as readCredentialsForConfiguredRelay } from './persistence-
|
|
7
|
-
import { a as installTeamSkill, i as installAutomationSkill } from './install-
|
|
5
|
+
import { t as teamRequest, c as createTeamsClient } from './client-qJ0y8fus.mjs';
|
|
6
|
+
import { b as readCredentialsForConfiguredRelay } from './persistence-Bn4qEbDg.mjs';
|
|
7
|
+
import { a as installTeamSkill, i as installAutomationSkill } from './install-B8O1JpJH.mjs';
|
|
8
8
|
import 'node:child_process';
|
|
9
9
|
import 'node:util';
|
|
10
10
|
import 'node:path';
|
|
11
|
-
import './index-
|
|
11
|
+
import './index-WKyN-bNy.mjs';
|
|
12
12
|
import '@paralleldrive/cuid2';
|
|
13
|
-
import './configuration-
|
|
13
|
+
import './configuration-BZHpFD7K.mjs';
|
|
14
14
|
import 'node:fs';
|
|
15
|
-
import './package-
|
|
16
|
-
import './context-
|
|
15
|
+
import './package-CwB8rFJt.mjs';
|
|
16
|
+
import './context-t7YV0aZc.mjs';
|
|
17
17
|
import './authRelay-DhQhkBvX.mjs';
|
|
18
18
|
import 'tweetnacl';
|
|
19
|
-
import './logger-
|
|
19
|
+
import './logger-RpzJ4d8V.mjs';
|
|
20
20
|
import 'chalk';
|
|
21
|
-
import './resources-
|
|
21
|
+
import './resources-CLP_MpK4.mjs';
|
|
22
22
|
|
|
23
23
|
const legacyTask = z.object({
|
|
24
24
|
id: z.string().regex(/^T-\d{3,}$/),
|