very-happy-cli 0.2.161 → 0.2.162
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-6U6pQgx1.mjs → AcpBackend--TmFHgRH.mjs} +3 -3
- package/dist/{AcpBackend-Ba98QDif.cjs → AcpBackend-9asD_DL7.cjs} +3 -3
- package/dist/{AcpSessionManager-CoMWFVw3.mjs → AcpSessionManager-BSIBnWUb.mjs} +1 -1
- package/dist/{AcpSessionManager-BAY1Pggx.cjs → AcpSessionManager-BvIuBzoO.cjs} +1 -1
- package/dist/{BasePermissionHandler-2R0uH2CI.cjs → BasePermissionHandler-D4B-NNu2.cjs} +1 -1
- package/dist/{BasePermissionHandler-BvvhBTja.mjs → BasePermissionHandler-DUBySe0f.mjs} +1 -1
- package/dist/{BaseReasoningProcessor-DyhO1uoU.mjs → BaseReasoningProcessor-9TybUGTq.mjs} +1 -1
- package/dist/{BaseReasoningProcessor-fsVNmCEF.cjs → BaseReasoningProcessor-CqLl-ikP.cjs} +1 -1
- package/dist/{agentHome-DvNnGphb.cjs → agentHome-BohNUYnE.cjs} +4 -4
- package/dist/{agentHome-Ck1i1TQB.mjs → agentHome-DQrq_FG1.mjs} +4 -4
- package/dist/{api-B2vLMS-z.cjs → api-CQnLOqRS.cjs} +10 -10
- package/dist/{api-SffjRQ1b.mjs → api-D57dsd6_.mjs} +10 -10
- package/dist/{apiMachine-BpW9t8MO.mjs → apiMachine-78Aqzg--.mjs} +21 -14
- package/dist/{apiMachine-gFA54X7y.cjs → apiMachine-fFFaWxYy.cjs} +33 -26
- package/dist/{assistantTools-BfA0R3_m.cjs → assistantTools-CwESq24n.cjs} +6 -6
- package/dist/{assistantTools-CgiTbnWb.mjs → assistantTools-mEz6uNqL.mjs} +6 -6
- package/dist/{attachmentContent-DMMZzevR.cjs → attachmentContent-GHOk6Muq.cjs} +2 -2
- package/dist/{attachmentContent-CSGxr71v.mjs → attachmentContent-s1xPha4Q.mjs} +2 -2
- package/dist/{attachmentLimits-yba1uHFO.mjs → attachmentLimits-D5pgmASK.mjs} +1 -1
- package/dist/{attachmentLimits-CzVrqgLR.cjs → attachmentLimits-DzlBPyJP.cjs} +1 -1
- package/dist/{auth-x4CEoysH.cjs → auth-B8EagV6G.cjs} +8 -8
- package/dist/{auth-DdyVZSo6.mjs → auth-BOaHWquu.mjs} +8 -8
- package/dist/{auth-Bt4ceBBy.cjs → auth-BbSdXMQ_.cjs} +5 -5
- package/dist/{auth-CYHjQ8oQ.mjs → auth-C8V7-oUT.mjs} +5 -5
- package/dist/{auto-BDXDUnjB.cjs → auto-Bw_h0yVc.cjs} +15 -14
- package/dist/{auto-CXLlRi3a.mjs → auto-CWDOX35m.mjs} +15 -14
- package/dist/{bootstrap-BNQq05jR.mjs → bootstrap-BKmsYSwh.mjs} +2 -2
- package/dist/{bootstrap-CkgIq8N3.cjs → bootstrap-DvZjEa9_.cjs} +2 -2
- package/dist/{browser-BDOlKWYe.cjs → browser-CBZj-1Wx.cjs} +1 -1
- package/dist/{browser-9pyhQr1R.mjs → browser-CrMAr5fI.mjs} +1 -1
- package/dist/{claudeLocal-BDuGFnjJ.cjs → claudeLocal-Bpw-u9et.cjs} +5 -5
- package/dist/{claudeLocal-CQa8qnwq.mjs → claudeLocal-dhdlcQ6F.mjs} +5 -5
- package/dist/{claudeLocalLauncher-CDqQI9ak.mjs → claudeLocalLauncher-BFfGT4eY.mjs} +10 -10
- package/dist/{claudeLocalLauncher-Bd5I2-j6.cjs → claudeLocalLauncher-DWFWuLhY.cjs} +10 -10
- package/dist/{codexThreadFork-BZqF-9bX.cjs → claudeSessionFork-D9-mANmu.cjs} +1 -137
- package/dist/{codexThreadFork-BCaEMBiM.mjs → claudeSessionFork-_DUrXaqd.mjs} +2 -134
- package/dist/{client-DOBWJL3u.cjs → client-CVQJWqjx.cjs} +2 -2
- package/dist/{client-C_axwRry.cjs → client-DiBTHWNU.cjs} +3 -3
- package/dist/{client-Brn-UwVk.mjs → client-Dk7x-s-O.mjs} +3 -3
- package/dist/{client-CXb1VJui.mjs → client-DwqHDsLb.mjs} +2 -2
- package/dist/codex/happyMcpStdioBridge.cjs +15 -15
- package/dist/codex/happyMcpStdioBridge.mjs +15 -15
- package/dist/{codexAppServerClient-oeQKD6Qf.mjs → codexAppServerClient-C2ybs2mZ.mjs} +2 -2
- package/dist/{codexAppServerClient-ZzhUTWPo.cjs → codexAppServerClient-DlKv5TjG.cjs} +2 -2
- package/dist/{codexCommand-C7H0NpBe.cjs → codexCommand-4vLE31fj.cjs} +45 -40
- package/dist/{codexCommand-CJ82bl3l.mjs → codexCommand-DnmFr9Qx.mjs} +45 -40
- package/dist/codexThreadFork-DNekT4nQ.cjs +138 -0
- package/dist/codexThreadFork-R76RU5H0.mjs +133 -0
- package/dist/{config-CYpL1Ahd.cjs → config-Btd4B05_.cjs} +3 -3
- package/dist/{config-BglnktIo.mjs → config-CSOG_ZcP.mjs} +3 -3
- package/dist/{configuration-DoWFJUPm.mjs → configuration-A5gW_0GE.mjs} +1 -1
- package/dist/{configuration-v9f8LM9T.cjs → configuration-UsI0sxEv.cjs} +1 -1
- package/dist/{connect-yEvjdRvx.cjs → connect-C9yxp8Om.cjs} +13 -13
- package/dist/{connect-hgcNjyAB.mjs → connect-DWYj8LP_.mjs} +13 -13
- package/dist/{context-B45vMtSZ.cjs → context-0FjjA4vJ.cjs} +1 -1
- package/dist/{context-C9GHPLEm.mjs → context-BXnxalWW.mjs} +1 -1
- package/dist/{controlClient-fEHE85bH.cjs → controlClient-BXktrQ4z.cjs} +3 -3
- package/dist/{controlClient-DjoKTtgK.mjs → controlClient-CYzHrh3e.mjs} +3 -3
- package/dist/{createSessionMetadata-mIeehclp.mjs → createSessionMetadata-Dyg33ZlU.mjs} +2 -2
- package/dist/{createSessionMetadata-BRLB9CNO.cjs → createSessionMetadata-EX1eAlHx.cjs} +2 -2
- package/dist/{deterministicJson-p835AdAU.mjs → deterministicJson-DiR7EOMO.mjs} +9 -9
- package/dist/{deterministicJson-DKDP_mM-.cjs → deterministicJson-eha_oMZ2.cjs} +9 -9
- package/dist/{doctor-hVNnSZJn.cjs → doctor-DunLBgVi.cjs} +6 -6
- package/dist/{doctor-BeUuQXFs.mjs → doctor-FuCvKdRa.mjs} +6 -6
- package/dist/{ensureDaemonRunning-Dg9aZfjs.cjs → ensureDaemonRunning-B4dZFmUy.cjs} +5 -5
- package/dist/{ensureDaemonRunning-CO7d1gOC.mjs → ensureDaemonRunning-EZkb-CAF.mjs} +5 -5
- package/dist/{handleResumeCommand-DnVmy7a3.cjs → handleResumeCommand-CKMIw4pE.cjs} +5 -5
- package/dist/{handleResumeCommand-BiTPK0qd.mjs → handleResumeCommand-CsXendKb.mjs} +5 -5
- package/dist/{index-CAFwetLk.mjs → index-9L39wqYR.mjs} +37 -37
- package/dist/{index-qdS1friN.mjs → index-BBg9j0XK.mjs} +8 -1
- package/dist/{index-LIn6nCcq.cjs → index-BOhgL3rh.cjs} +36 -36
- package/dist/{index-Pf2cV9cn.cjs → index-CZWAiydF.cjs} +4 -4
- package/dist/{index-Cqx-Raq6.mjs → index-CvXcVQ06.mjs} +3 -3
- package/dist/{index-DA7yINuk.cjs → index-DJ-oV52i.cjs} +8 -1
- package/dist/{index-SPGPenK5.mjs → index-DK2JpTJf.mjs} +4 -4
- package/dist/{index-gNTWtSKN.cjs → index-DRhWHEuW.cjs} +3 -3
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-ClUUl3yp.mjs → install-B2duVo9a.mjs} +3 -3
- package/dist/{install-Bu85vlHD.cjs → install-C8WyZI9K.cjs} +3 -3
- package/dist/lib.cjs +12 -12
- package/dist/lib.d.cts +5 -0
- package/dist/lib.d.mts +5 -0
- package/dist/lib.mjs +12 -12
- package/dist/{lidState-C2dI0FAN.mjs → lidState-CigXWxhe.mjs} +1 -1
- package/dist/{lidState-KHHu1015.cjs → lidState-Ds-6ytZV.cjs} +1 -1
- package/dist/{localHappyAgentAuth-DCsetiyG.mjs → localHappyAgentAuth-CaCyKzYp.mjs} +1 -1
- package/dist/{localHappyAgentAuth-BXiHPXdC.cjs → localHappyAgentAuth-l0Na-5Ys.cjs} +1 -1
- package/dist/{logger-Bc8-u1w0.cjs → logger-7ucWm9wp.cjs} +2 -2
- package/dist/{logger-fXoNzNuB.mjs → logger-CGE4C8ho.mjs} +2 -2
- package/dist/{machineMetadata-BibDMFVx.cjs → machineMetadata-lMPtpF16.cjs} +3 -3
- package/dist/{machineMetadata-BHjehxJY.mjs → machineMetadata-ue1nkowa.mjs} +3 -3
- package/dist/{main-BktM4A1K.mjs → main-3fIFXD-t.mjs} +44 -44
- package/dist/{main-CLaX-t-b.cjs → main-CFI0datL.cjs} +44 -44
- package/dist/{mcp-CeUd9KDr.mjs → mcp-DARQBZ7l.mjs} +14 -14
- package/dist/{mcp-GBfE70nk.cjs → mcp-DfxLAc1G.cjs} +14 -14
- package/dist/{package-Cl5BEP5x.cjs → package-D1A-8ZJy.cjs} +7 -7
- package/dist/{package-uOg9SCKi.mjs → package-DQsvY1XN.mjs} +7 -7
- package/dist/{peerTools-Dz3_7Bkk.mjs → peerTools-D19hhSQF.mjs} +4 -4
- package/dist/{peerTools-CIeiy9wn.cjs → peerTools-DLwNaEEV.cjs} +4 -4
- package/dist/{persistence-oET5n61f.mjs → persistence-Cw8aLoyL.mjs} +3 -3
- package/dist/{persistence-CBNMzSa8.cjs → persistence-i0nQMLlk.cjs} +3 -3
- package/dist/{piRunnerArgs-Dk1ncwHF.mjs → piRunnerArgs-58t454gw.mjs} +1 -1
- package/dist/{piRunnerArgs-Bf7RUF__.cjs → piRunnerArgs-BUyxPxjZ.cjs} +1 -1
- package/dist/{piRuntime-BwRdhK_N.mjs → piRuntime-DVPixFjl.mjs} +1 -1
- package/dist/{piRuntime-B_6TE9Eb.cjs → piRuntime-Dff73XCb.cjs} +1 -1
- package/dist/{piTerminal-CagmEoez.cjs → piTerminal-Dz1RrO70.cjs} +16 -16
- package/dist/{piTerminal-Bap3R8Re.mjs → piTerminal-gHWFAyzq.mjs} +16 -16
- package/dist/{registerCommonHandlers-BjSV2Skz.cjs → registerCommonHandlers-CMROPdJz.cjs} +2 -2
- package/dist/{registerCommonHandlers-CrgvJsOy.mjs → registerCommonHandlers-Ckv5boQI.mjs} +2 -2
- package/dist/{registerKillSessionHandler-6TC2S3lf.cjs → registerKillSessionHandler-CA9-oelM.cjs} +11 -7
- package/dist/{registerKillSessionHandler-Cbc8Rgtd.mjs → registerKillSessionHandler-Cll4-o8Y.mjs} +11 -7
- package/dist/{remoteSessionClient-CO7qOjR0.mjs → remoteSessionClient-BMjsbuBh.mjs} +5 -5
- package/dist/{remoteSessionClient-BNx78NLb.cjs → remoteSessionClient-DX9jHLeW.cjs} +5 -5
- package/dist/{run-D5xAEWSB.cjs → run-CjbGo2wb.cjs} +32 -32
- package/dist/{run-2l5vSt2h.mjs → run-CrunzDlt.mjs} +31 -31
- package/dist/{runClaude-BX6ixjtW.cjs → runClaude-KN-4Y4LH.cjs} +20 -20
- package/dist/{runClaude-BgN6xo05.mjs → runClaude-WDBWRtnF.mjs} +20 -20
- package/dist/{runClaudeDeps-Bp20MScE.cjs → runClaudeDeps-DW-8lnHv.cjs} +212 -35
- package/dist/{runClaudeDeps-COBBhD9o.mjs → runClaudeDeps-QaEx8y5r.mjs} +216 -39
- package/dist/{runGemini-CSMPkt0p.cjs → runGemini-Djmwjdv1.cjs} +32 -32
- package/dist/{runGemini-Cc2jq-uh.mjs → runGemini-Nf6SKBpw.mjs} +32 -32
- package/dist/{runOpenClaw-CIlCwdW2.mjs → runOpenClaw-9nHtmYbN.mjs} +18 -18
- package/dist/{runOpenClaw-YBwua4Rf.cjs → runOpenClaw-CAqP5KFH.cjs} +18 -18
- package/dist/{sandbox-C4gXLP1p.cjs → sandbox-C8Dd8GPM.cjs} +4 -4
- package/dist/{sandbox-CNkwOtHI.mjs → sandbox-SP0THMt0.mjs} +4 -4
- package/dist/selfCheck-7FaZtVu2.mjs +84 -0
- package/dist/{selfCheck-CU8xSDsl.cjs → selfCheck-D9ZXrK7h.cjs} +34 -34
- package/dist/{send-CGHcKZ-w.mjs → send-DOx9aQsx.mjs} +8 -8
- package/dist/{send-DY9Nr-x4.cjs → send-LPk6Q5HI.cjs} +8 -8
- package/dist/{server-m2b5pamZ.mjs → server-BZNi8Hq_.mjs} +4 -4
- package/dist/{server-II51Mimf.cjs → server-CxT8jNyn.cjs} +6 -6
- package/dist/{sessionLock-Cw6FmbMv.mjs → sessionLock-CfLqJfeI.mjs} +2 -2
- package/dist/{sessionLock-7ePAYDOg.cjs → sessionLock-y9rnA4LK.cjs} +2 -2
- package/dist/{sessionModeFile-BVCV5f7E.cjs → sessionModeFile-B5YeoQJh.cjs} +1 -1
- package/dist/{sessionModeFile-CDmDyRkD.mjs → sessionModeFile-BKxgNH3P.mjs} +1 -1
- package/dist/{sessionOps-C_f1wKOr.mjs → sessionOps-CdwVPSZz.mjs} +4 -4
- package/dist/{sessionOps-DJdExmBy.cjs → sessionOps-GsELm2PZ.cjs} +4 -4
- package/dist/{sessionScanner-CaAHLyNV.mjs → sessionScanner-Cdukzo70.mjs} +3 -3
- package/dist/{sessionScanner-D1goKdd3.cjs → sessionScanner-aLEv7mD3.cjs} +3 -3
- package/dist/{sessions-DGs6ALNo.cjs → sessions-CfG4WGN0.cjs} +9 -9
- package/dist/{sessions-DnvmWUel.mjs → sessions-Dne-OiRL.mjs} +9 -9
- package/dist/{setupOfflineReconnection-R7XuR_sj.cjs → setupOfflineReconnection-CFwltTcP.cjs} +2 -2
- package/dist/{setupOfflineReconnection-CVViqZft.mjs → setupOfflineReconnection-DiQma2Cc.mjs} +2 -2
- package/dist/{spawn-CXTH7qg1.cjs → spawn-BI_sdgWs.cjs} +15 -14
- package/dist/{spawn-DNYSvFtC.mjs → spawn-DkgP2BGF.mjs} +13 -12
- package/dist/{spawnAgents-DZzZ9jMI.mjs → spawnAgents-Y1LjnCt9.mjs} +1 -1
- package/dist/{spawnAgents-BGQiEF-w.cjs → spawnAgents-iSu1Xzs5.cjs} +1 -1
- package/dist/{spawnHappyCLI-cqWQbwsb.mjs → spawnHappyCLI-9mx4lPxh.mjs} +1 -1
- package/dist/{spawnHappyCLI-BhYj84rv.cjs → spawnHappyCLI-BRdx0sAX.cjs} +1 -1
- package/dist/{startFileWatcher-CKKx-8ZO.cjs → startFileWatcher-C2HC2_Dg.cjs} +1 -1
- package/dist/{startFileWatcher-CdegMbJj.mjs → startFileWatcher-COD5UKNs.mjs} +1 -1
- package/dist/{streamRelay-FPVbHpbM.mjs → streamRelay-BLgU9X3R.mjs} +1 -1
- package/dist/{streamRelay-BiKw59Cc.cjs → streamRelay-DnObXZZj.cjs} +1 -1
- package/dist/{sync-CxD-w_40.mjs → sync-BpLasLu2.mjs} +1 -1
- package/dist/{sync-CVk4QERO.cjs → sync-Dj92ZJ8Y.cjs} +1 -1
- package/dist/{systemPrompt-BygJcmbi.cjs → systemPrompt-CyEz_IfR.cjs} +2 -2
- package/dist/{systemPrompt-DmtypUc7.mjs → systemPrompt-DsQoUgQw.mjs} +2 -2
- package/dist/{teams-BOC6nIPL.mjs → teams-BETNMjpZ.mjs} +6 -6
- package/dist/{teams-BsvpOBfn.cjs → teams-Ctx9zXn4.cjs} +6 -6
- package/dist/{time-CNRE4ChD.cjs → time-CLwVAz6s.cjs} +1 -1
- package/dist/{time-BZNdNiIV.mjs → time-CVvxdEDh.mjs} +1 -1
- package/dist/{titleGenerator-ox6ptCsp.mjs → titleGenerator-B4AW3dLr.mjs} +12 -2
- package/dist/{titleGenerator-CFRhU-xq.cjs → titleGenerator-FDpdizn7.cjs} +13 -3
- package/dist/{todo-B-KB7oAB.cjs → todo-C3tyFeq1.cjs} +6 -6
- package/dist/{todo-C5KBVbUw.mjs → todo-Jk4Vs7hP.mjs} +6 -6
- package/dist/{tools-BZabNIid.mjs → tools-BA1qkiV1.mjs} +2 -2
- package/dist/{tools-CsSovyNp.cjs → tools-CGxq3I52.cjs} +2 -2
- package/dist/{tools-lMDra4Pv.cjs → tools-O5beDK-s.cjs} +1 -1
- package/dist/{tools-BmQQUATY.mjs → tools-_kFe4m_l.mjs} +1 -1
- package/dist/{uninstall-B1WLtC1d.mjs → uninstall-C_mdAZlm.mjs} +3 -3
- package/dist/{uninstall-fvA5aWpU.cjs → uninstall-DHKF90lo.cjs} +3 -3
- package/package.json +7 -7
- package/dist/selfCheck-hJ6PCh7v.mjs +0 -84
|
@@ -1,46 +1,48 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var logger = require('./logger-
|
|
4
|
-
var controlClient = require('./controlClient-
|
|
3
|
+
var logger = require('./logger-7ucWm9wp.cjs');
|
|
4
|
+
var controlClient = require('./controlClient-BXktrQ4z.cjs');
|
|
5
5
|
var backgroundTaskActivity = require('./backgroundTaskActivity-CBvUdj39.cjs');
|
|
6
6
|
var node_crypto = require('node:crypto');
|
|
7
7
|
var messageBuffer = require('./messageBuffer-fJMH6uY8.cjs');
|
|
8
8
|
var index = require('./index-D3kI0hDR.cjs');
|
|
9
9
|
var claudeAgentSdk = require('@anthropic-ai/claude-agent-sdk');
|
|
10
10
|
var permissionMode = require('./permissionMode-CrV-XuMs.cjs');
|
|
11
|
-
var systemPrompt = require('./systemPrompt-
|
|
11
|
+
var systemPrompt = require('./systemPrompt-CyEz_IfR.cjs');
|
|
12
12
|
var path$1 = require('node:path');
|
|
13
13
|
var specialCommands = require('./specialCommands-DSsTeRej.cjs');
|
|
14
14
|
require('axios');
|
|
15
15
|
require('node:events');
|
|
16
16
|
require('socket.io-client');
|
|
17
|
-
var attachmentLimits = require('./attachmentLimits-
|
|
17
|
+
var attachmentLimits = require('./attachmentLimits-DzlBPyJP.cjs');
|
|
18
18
|
require('tweetnacl');
|
|
19
|
-
var configuration = require('./configuration-
|
|
20
|
-
require('./index-
|
|
21
|
-
require('./registerCommonHandlers-
|
|
19
|
+
var configuration = require('./configuration-UsI0sxEv.cjs');
|
|
20
|
+
require('./index-DJ-oV52i.cjs');
|
|
21
|
+
require('./registerCommonHandlers-CMROPdJz.cjs');
|
|
22
22
|
require('os');
|
|
23
23
|
require('child_process');
|
|
24
24
|
require('@paralleldrive/cuid2');
|
|
25
|
-
require('./persistence-
|
|
25
|
+
require('./persistence-i0nQMLlk.cjs');
|
|
26
26
|
var contentLogMetadata = require('./contentLogMetadata-ZSFk_NjQ.cjs');
|
|
27
27
|
require('chalk');
|
|
28
28
|
var types = require('./types-CRS-srZK.cjs');
|
|
29
29
|
var path = require('./path-B7zW-WwE.cjs');
|
|
30
30
|
var fs = require('fs/promises');
|
|
31
|
-
var time = require('./time-
|
|
31
|
+
var time = require('./time-CLwVAz6s.cjs');
|
|
32
32
|
var node_fs = require('node:fs');
|
|
33
|
-
var deterministicJson = require('./deterministicJson-
|
|
34
|
-
var sessionScanner = require('./sessionScanner-
|
|
33
|
+
var deterministicJson = require('./deterministicJson-eha_oMZ2.cjs');
|
|
34
|
+
var sessionScanner = require('./sessionScanner-aLEv7mD3.cjs');
|
|
35
35
|
var node_child_process = require('node:child_process');
|
|
36
|
-
var streamRelay = require('./streamRelay-
|
|
37
|
-
var attachmentContent = require('./attachmentContent-
|
|
38
|
-
var
|
|
39
|
-
var
|
|
36
|
+
var streamRelay = require('./streamRelay-DnObXZZj.cjs');
|
|
37
|
+
var attachmentContent = require('./attachmentContent-GHOk6Muq.cjs');
|
|
38
|
+
var promises = require('node:fs/promises');
|
|
39
|
+
var claudeSessionFork = require('./claudeSessionFork-D9-mANmu.cjs');
|
|
40
|
+
var registerKillSessionHandler = require('./registerKillSessionHandler-CA9-oelM.cjs');
|
|
41
|
+
var doctor = require('./doctor-DunLBgVi.cjs');
|
|
40
42
|
var node_http = require('node:http');
|
|
41
43
|
var editPaths = require('./editPaths-Bqp4OFPw.cjs');
|
|
42
44
|
var projectPath = require('./projectPath-ChLhdOyt.cjs');
|
|
43
|
-
var titleGenerator = require('./titleGenerator-
|
|
45
|
+
var titleGenerator = require('./titleGenerator-FDpdizn7.cjs');
|
|
44
46
|
var oneShotPrompts = require('./oneShotPrompts-CL0dip9C.cjs');
|
|
45
47
|
require('node:util');
|
|
46
48
|
require('./smallFastModel-D_uxGMo3.cjs');
|
|
@@ -48,34 +50,34 @@ require('./trimIdent-4gvk9Wk6.cjs');
|
|
|
48
50
|
require('node:os');
|
|
49
51
|
require('./agentGuidance-B5NATuFa.cjs');
|
|
50
52
|
require('zod');
|
|
51
|
-
require('./package-
|
|
52
|
-
require('node:fs/promises');
|
|
53
|
+
require('./package-D1A-8ZJy.cjs');
|
|
53
54
|
require('util');
|
|
54
55
|
require('crypto');
|
|
55
56
|
require('path');
|
|
56
57
|
require('cross-spawn');
|
|
57
58
|
require('./authRelay-BdYkC1Po.cjs');
|
|
58
|
-
require('./client-
|
|
59
|
-
require('./context-
|
|
60
|
-
require('./sessionOps-
|
|
59
|
+
require('./client-DiBTHWNU.cjs');
|
|
60
|
+
require('./context-0FjjA4vJ.cjs');
|
|
61
|
+
require('./sessionOps-GsELm2PZ.cjs');
|
|
61
62
|
require('./resources-JDPugcDq.cjs');
|
|
62
|
-
require('./tools-
|
|
63
|
-
require('./tools-
|
|
64
|
-
require('./client-
|
|
65
|
-
require('./peerTools-
|
|
63
|
+
require('./tools-O5beDK-s.cjs');
|
|
64
|
+
require('./tools-CGxq3I52.cjs');
|
|
65
|
+
require('./client-CVQJWqjx.cjs');
|
|
66
|
+
require('./peerTools-DLwNaEEV.cjs');
|
|
66
67
|
require('./ids-B6ZC0HGt.cjs');
|
|
67
|
-
require('./remoteSessionClient-
|
|
68
|
+
require('./remoteSessionClient-DX9jHLeW.cjs');
|
|
68
69
|
require('@modelcontextprotocol/sdk/server/mcp.js');
|
|
69
70
|
require('@modelcontextprotocol/sdk/server/streamableHttp.js');
|
|
70
71
|
require('./limits-C-a7gr04.cjs');
|
|
71
|
-
require('./assistantTools-
|
|
72
|
+
require('./assistantTools-CwESq24n.cjs');
|
|
72
73
|
require('./terminals-B_bfC9c2.cjs');
|
|
73
74
|
require('./terminalTitleSuggest-DhvRFX3H.cjs');
|
|
74
75
|
require('./tmuxSocket-D-Xt6Vn-.cjs');
|
|
75
|
-
require('./bootstrap-
|
|
76
|
+
require('./bootstrap-DvZjEa9_.cjs');
|
|
76
77
|
require('./previewPath-B0rBdhy1.cjs');
|
|
77
|
-
require('./sync-
|
|
78
|
-
require('./startFileWatcher-
|
|
78
|
+
require('./sync-Dj92ZJ8Y.cjs');
|
|
79
|
+
require('./startFileWatcher-C2HC2_Dg.cjs');
|
|
80
|
+
require('node:readline');
|
|
79
81
|
require('./doctor-u46qYYKX.cjs');
|
|
80
82
|
require('ps-list');
|
|
81
83
|
require('./doctorReadiness-BCZGcN0a.cjs');
|
|
@@ -987,6 +989,10 @@ function withTimeout(promise, ms) {
|
|
|
987
989
|
if (timer) clearTimeout(timer);
|
|
988
990
|
});
|
|
989
991
|
}
|
|
992
|
+
const PROMPT_UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
993
|
+
function promptUuid(uuid) {
|
|
994
|
+
return uuid && PROMPT_UUID_RE.test(uuid) ? { uuid } : {};
|
|
995
|
+
}
|
|
990
996
|
async function claudeRemote(opts) {
|
|
991
997
|
let startFrom = opts.sessionId;
|
|
992
998
|
if (opts.sessionId && !systemPrompt.claudeCheckSession(opts.sessionId, opts.path)) {
|
|
@@ -1239,6 +1245,7 @@ async function claudeRemote(opts) {
|
|
|
1239
1245
|
type: "user",
|
|
1240
1246
|
parent_tool_use_id: null,
|
|
1241
1247
|
origin: { kind: "human" },
|
|
1248
|
+
...promptUuid(initial.uuid),
|
|
1242
1249
|
message: {
|
|
1243
1250
|
role: "user",
|
|
1244
1251
|
content: initial.message
|
|
@@ -1427,6 +1434,7 @@ async function claudeRemote(opts) {
|
|
|
1427
1434
|
type: "user",
|
|
1428
1435
|
parent_tool_use_id: null,
|
|
1429
1436
|
origin: { kind: "human" },
|
|
1437
|
+
...promptUuid(next.uuid),
|
|
1430
1438
|
message: { role: "user", content: next.message }
|
|
1431
1439
|
});
|
|
1432
1440
|
}).catch(() => {
|
|
@@ -2804,6 +2812,146 @@ class LaunchModeGate {
|
|
|
2804
2812
|
}
|
|
2805
2813
|
}
|
|
2806
2814
|
|
|
2815
|
+
class ConversationRewindError extends Error {
|
|
2816
|
+
constructor(code, message) {
|
|
2817
|
+
super(message);
|
|
2818
|
+
this.code = code;
|
|
2819
|
+
this.name = "ConversationRewindError";
|
|
2820
|
+
}
|
|
2821
|
+
}
|
|
2822
|
+
function transcriptPromptText(parsed) {
|
|
2823
|
+
if (parsed?.type !== "user" || parsed.isSidechain || parsed.isMeta || parsed.isSynthetic) return null;
|
|
2824
|
+
const content = parsed.message?.content;
|
|
2825
|
+
if (typeof content === "string") return content.trim() ? content : null;
|
|
2826
|
+
if (!Array.isArray(content) || content.some((block) => block?.type === "tool_result")) return null;
|
|
2827
|
+
const text = content.filter((block) => block?.type === "text" && typeof block.text === "string").map((block) => block.text).join("\n");
|
|
2828
|
+
if (!text.trim()) return content.length > 0 ? "" : null;
|
|
2829
|
+
return text;
|
|
2830
|
+
}
|
|
2831
|
+
function isConversationEntry(parsed) {
|
|
2832
|
+
return !parsed?.isSidechain && !parsed?.isMeta && !parsed?.isSynthetic && (parsed?.type === "user" || parsed?.type === "assistant");
|
|
2833
|
+
}
|
|
2834
|
+
function resolveRewindTarget(entries, target) {
|
|
2835
|
+
for (const uuid of target.uuids) {
|
|
2836
|
+
const index = entries.findIndex((entry) => entry.parsed?.uuid === uuid && transcriptPromptText(entry.parsed) !== null);
|
|
2837
|
+
if (index >= 0) return index;
|
|
2838
|
+
}
|
|
2839
|
+
const wanted = target.text?.trim();
|
|
2840
|
+
if (!wanted) throw new ConversationRewindError("not-found", "This message is not in the agent conversation");
|
|
2841
|
+
const matches = [];
|
|
2842
|
+
entries.forEach((entry, index) => {
|
|
2843
|
+
if (transcriptPromptText(entry.parsed)?.trim() === wanted) matches.push(index);
|
|
2844
|
+
});
|
|
2845
|
+
if (matches.length === 1) return matches[0];
|
|
2846
|
+
if (matches.length === 0) throw new ConversationRewindError("not-found", "This message is not in the agent conversation");
|
|
2847
|
+
throw new ConversationRewindError("ambiguous", "Several earlier messages have the same text; cannot tell which one to change");
|
|
2848
|
+
}
|
|
2849
|
+
function rewindTranscriptLines(lines, action, target) {
|
|
2850
|
+
const entries = [];
|
|
2851
|
+
for (const line of lines) {
|
|
2852
|
+
if (!line) continue;
|
|
2853
|
+
let parsed = null;
|
|
2854
|
+
try {
|
|
2855
|
+
parsed = JSON.parse(line);
|
|
2856
|
+
} catch {
|
|
2857
|
+
}
|
|
2858
|
+
entries.push({ line, parsed });
|
|
2859
|
+
}
|
|
2860
|
+
const cut = resolveRewindTarget(entries, target);
|
|
2861
|
+
let end = entries.length;
|
|
2862
|
+
for (let i = cut + 1; i < entries.length; i++) {
|
|
2863
|
+
if (transcriptPromptText(entries[i].parsed) !== null) {
|
|
2864
|
+
end = i;
|
|
2865
|
+
break;
|
|
2866
|
+
}
|
|
2867
|
+
}
|
|
2868
|
+
const before = entries.slice(0, cut);
|
|
2869
|
+
const after = action === "delete" ? entries.slice(end) : [];
|
|
2870
|
+
if (![...before, ...after].some((entry) => isConversationEntry(entry.parsed))) return null;
|
|
2871
|
+
if (before.some((entry) => isConversationEntry(entry.parsed)) && !before.some((entry) => transcriptPromptText(entry.parsed) !== null)) {
|
|
2872
|
+
throw new ConversationRewindError("unsafe", "Cannot safely rewind: earlier history has no user prompt");
|
|
2873
|
+
}
|
|
2874
|
+
if (after.length === 0) return before.map((entry) => entry.line);
|
|
2875
|
+
const dropped = /* @__PURE__ */ new Set();
|
|
2876
|
+
for (const entry of entries.slice(cut, end)) {
|
|
2877
|
+
if (typeof entry.parsed?.uuid === "string") dropped.add(entry.parsed.uuid);
|
|
2878
|
+
}
|
|
2879
|
+
const reparentTo = typeof entries[cut].parsed?.parentUuid === "string" ? entries[cut].parsed.parentUuid : null;
|
|
2880
|
+
const relinked = after.map((entry) => {
|
|
2881
|
+
const parsed = entry.parsed;
|
|
2882
|
+
if (!parsed || typeof parsed !== "object") return entry.line;
|
|
2883
|
+
let next = parsed;
|
|
2884
|
+
for (const key of ["parentUuid", "logicalParentUuid"]) {
|
|
2885
|
+
if (typeof parsed[key] === "string" && dropped.has(parsed[key])) {
|
|
2886
|
+
next = next === parsed ? { ...parsed } : next;
|
|
2887
|
+
next[key] = reparentTo;
|
|
2888
|
+
}
|
|
2889
|
+
}
|
|
2890
|
+
return next === parsed ? entry.line : JSON.stringify(next);
|
|
2891
|
+
});
|
|
2892
|
+
return [...before.map((entry) => entry.line), ...relinked];
|
|
2893
|
+
}
|
|
2894
|
+
async function rewindClaudeTranscript(projectDir, claudeSessionId, action, target) {
|
|
2895
|
+
const source = path$1.join(projectDir, `${claudeSessionId}.jsonl`);
|
|
2896
|
+
let raw;
|
|
2897
|
+
try {
|
|
2898
|
+
raw = await promises.readFile(source, "utf-8");
|
|
2899
|
+
} catch (error) {
|
|
2900
|
+
if (error.code === "ENOENT") throw new claudeSessionFork.ForkSourceMissingError(source);
|
|
2901
|
+
throw error;
|
|
2902
|
+
}
|
|
2903
|
+
const kept = rewindTranscriptLines(raw.split("\n"), action, target);
|
|
2904
|
+
if (kept === null) return null;
|
|
2905
|
+
const newId = node_crypto.randomUUID();
|
|
2906
|
+
const destination = path$1.join(projectDir, `${newId}.jsonl`);
|
|
2907
|
+
const temporary = `${destination}.tmp-${process.pid}`;
|
|
2908
|
+
try {
|
|
2909
|
+
await promises.writeFile(temporary, kept.join("\n") + "\n", { encoding: "utf-8", flag: "wx" });
|
|
2910
|
+
await promises.rename(temporary, destination);
|
|
2911
|
+
} catch (error) {
|
|
2912
|
+
await promises.unlink(temporary).catch(() => void 0);
|
|
2913
|
+
throw error;
|
|
2914
|
+
}
|
|
2915
|
+
return newId;
|
|
2916
|
+
}
|
|
2917
|
+
|
|
2918
|
+
const STOP_WAIT_MS = 8e3;
|
|
2919
|
+
function createConversationRewind(deps) {
|
|
2920
|
+
let inFlight = false;
|
|
2921
|
+
const rewrite = deps.rewrite ?? rewindClaudeTranscript;
|
|
2922
|
+
return async (input) => {
|
|
2923
|
+
const request = input && typeof input === "object" ? input : {};
|
|
2924
|
+
const action = request.action;
|
|
2925
|
+
const sourceId = typeof request.sourceId === "string" && request.sourceId.length > 0 && request.sourceId.length <= 200 ? request.sourceId : void 0;
|
|
2926
|
+
const text = typeof request.text === "string" && request.text.length <= 2e5 ? request.text : void 0;
|
|
2927
|
+
if (action !== "edit" && action !== "delete" || !sourceId && !text?.trim()) {
|
|
2928
|
+
return { ok: false, code: "invalid", error: "Invalid rewind request" };
|
|
2929
|
+
}
|
|
2930
|
+
if (inFlight) return { ok: false, code: "busy", error: "Another edit is still being applied" };
|
|
2931
|
+
inFlight = true;
|
|
2932
|
+
try {
|
|
2933
|
+
if (deps.isThinking()) {
|
|
2934
|
+
await deps.stopTurn();
|
|
2935
|
+
if (!await deps.waitIdle(STOP_WAIT_MS)) {
|
|
2936
|
+
return { ok: false, code: "running", error: "The agent did not stop; try again after it finishes" };
|
|
2937
|
+
}
|
|
2938
|
+
}
|
|
2939
|
+
const current = deps.claudeSessionId();
|
|
2940
|
+
if (!current) return { ok: false, code: "no-conversation", error: "The agent has no conversation to change yet" };
|
|
2941
|
+
const uuids = sourceId ? [sourceId, ...deps.aliases(sourceId)] : [];
|
|
2942
|
+
const next = await rewrite(deps.projectDir(), current, action, { uuids, text });
|
|
2943
|
+
await deps.switchConversation(next);
|
|
2944
|
+
return { ok: true, action, freshConversation: next === null };
|
|
2945
|
+
} catch (error) {
|
|
2946
|
+
if (error instanceof ConversationRewindError) return { ok: false, code: error.code, error: error.message };
|
|
2947
|
+
if (error instanceof claudeSessionFork.ForkSourceMissingError) return { ok: false, code: "no-conversation", error: "The agent conversation file is missing on this machine" };
|
|
2948
|
+
throw error;
|
|
2949
|
+
} finally {
|
|
2950
|
+
inFlight = false;
|
|
2951
|
+
}
|
|
2952
|
+
};
|
|
2953
|
+
}
|
|
2954
|
+
|
|
2807
2955
|
const ABORT_INTERRUPT_GRACE_MS = 4e3;
|
|
2808
2956
|
async function claudeRemoteLauncher(session, onPermissionModeChange, onEffectivePermissionMode, onPromptFinalized) {
|
|
2809
2957
|
logger.logger.debug("[claudeRemoteLauncher] Starting remote launcher");
|
|
@@ -2898,6 +3046,31 @@ async function claudeRemoteLauncher(session, onPermissionModeChange, onEffective
|
|
|
2898
3046
|
await turnSteering.steer();
|
|
2899
3047
|
});
|
|
2900
3048
|
session.client.rpcHandlerManager.registerHandler("switch", doSwitch);
|
|
3049
|
+
const promptAliases = /* @__PURE__ */ new Map();
|
|
3050
|
+
const promptUuidFor = (sourceIds) => {
|
|
3051
|
+
const [first, ...rest] = sourceIds ?? [];
|
|
3052
|
+
if (first) for (const id of rest) promptAliases.set(id, first);
|
|
3053
|
+
if (promptAliases.size > 2e3) promptAliases.delete(promptAliases.keys().next().value);
|
|
3054
|
+
return first;
|
|
3055
|
+
};
|
|
3056
|
+
let silentRelaunch = false;
|
|
3057
|
+
session.client.rpcHandlerManager.registerHandler("conversation-rewind", createConversationRewind({
|
|
3058
|
+
claudeSessionId: () => session.sessionId,
|
|
3059
|
+
projectDir: () => path.getProjectPath(session.path),
|
|
3060
|
+
isThinking: () => session.thinking,
|
|
3061
|
+
stopTurn: doAbort,
|
|
3062
|
+
waitIdle: waitForThinkingToStop,
|
|
3063
|
+
aliases: (sourceId) => {
|
|
3064
|
+
const alias = promptAliases.get(sourceId);
|
|
3065
|
+
return alias ? [alias] : [];
|
|
3066
|
+
},
|
|
3067
|
+
switchConversation: async (claudeSessionId) => {
|
|
3068
|
+
if (claudeSessionId) session.onSessionFound(claudeSessionId);
|
|
3069
|
+
else session.clearSessionId();
|
|
3070
|
+
silentRelaunch = true;
|
|
3071
|
+
await abort();
|
|
3072
|
+
}
|
|
3073
|
+
}));
|
|
2901
3074
|
let livePermissionModeHandler = null;
|
|
2902
3075
|
let idlePermissionModeHandler = null;
|
|
2903
3076
|
session.client.rpcHandlerManager.registerHandler(
|
|
@@ -3121,7 +3294,8 @@ async function claudeRemoteLauncher(session, onPermissionModeChange, onEffective
|
|
|
3121
3294
|
}) : [];
|
|
3122
3295
|
modeGate.park({
|
|
3123
3296
|
message: parkedStaged.length > 0 ? attachmentContent.appendStagedAttachmentsToPrompt(msg.message, parkedStaged) : msg.message,
|
|
3124
|
-
mode: msg.mode
|
|
3297
|
+
mode: msg.mode,
|
|
3298
|
+
uuid: promptUuidFor(msg.sourceIds)
|
|
3125
3299
|
});
|
|
3126
3300
|
return null;
|
|
3127
3301
|
}
|
|
@@ -3139,14 +3313,16 @@ async function claudeRemoteLauncher(session, onPermissionModeChange, onEffective
|
|
|
3139
3313
|
return {
|
|
3140
3314
|
message: withAttachments,
|
|
3141
3315
|
mode: msg.mode,
|
|
3142
|
-
enqueuedAt: msg.enqueuedAt
|
|
3316
|
+
enqueuedAt: msg.enqueuedAt,
|
|
3317
|
+
uuid: promptUuidFor(msg.sourceIds)
|
|
3143
3318
|
};
|
|
3144
3319
|
}
|
|
3145
3320
|
onPromptFinalized?.(msg.message);
|
|
3146
3321
|
return {
|
|
3147
3322
|
message: msg.message,
|
|
3148
3323
|
mode: msg.mode,
|
|
3149
|
-
enqueuedAt: msg.enqueuedAt
|
|
3324
|
+
enqueuedAt: msg.enqueuedAt,
|
|
3325
|
+
uuid: promptUuidFor(msg.sourceIds)
|
|
3150
3326
|
};
|
|
3151
3327
|
}
|
|
3152
3328
|
return null;
|
|
@@ -3247,7 +3423,7 @@ async function claudeRemoteLauncher(session, onPermissionModeChange, onEffective
|
|
|
3247
3423
|
signal: abortController.signal
|
|
3248
3424
|
});
|
|
3249
3425
|
session.consumeOneTimeFlags();
|
|
3250
|
-
if (!exitReason && abortController.signal.aborted) {
|
|
3426
|
+
if (!exitReason && abortController.signal.aborted && !silentRelaunch) {
|
|
3251
3427
|
session.client.closeClaudeSessionTurn("cancelled");
|
|
3252
3428
|
session.client.sendSessionEvent({ type: "message", message: "Aborted by user" });
|
|
3253
3429
|
}
|
|
@@ -3290,6 +3466,7 @@ async function claudeRemoteLauncher(session, onPermissionModeChange, onEffective
|
|
|
3290
3466
|
streamRelay$1.endTurn();
|
|
3291
3467
|
streamRelay$1.dispose();
|
|
3292
3468
|
abortController = null;
|
|
3469
|
+
silentRelaunch = false;
|
|
3293
3470
|
abortFuture?.resolve(void 0);
|
|
3294
3471
|
abortFuture = null;
|
|
3295
3472
|
logger.logger.debug("[remote]: launch done");
|
|
@@ -3347,7 +3524,7 @@ async function loop(opts) {
|
|
|
3347
3524
|
logger.logger.debug(`[loop] Iteration with mode: ${mode}`);
|
|
3348
3525
|
switch (mode) {
|
|
3349
3526
|
case "local": {
|
|
3350
|
-
const { claudeLocalLauncher } = await Promise.resolve().then(function () { return require('./claudeLocalLauncher-
|
|
3527
|
+
const { claudeLocalLauncher } = await Promise.resolve().then(function () { return require('./claudeLocalLauncher-DWFWuLhY.cjs'); });
|
|
3351
3528
|
const result = await claudeLocalLauncher(session);
|
|
3352
3529
|
switch (result.type) {
|
|
3353
3530
|
case "switch":
|