very-happy-cli 0.2.161 → 0.2.163
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-Ba98QDif.cjs → AcpBackend-C2rzKnvT.cjs} +3 -3
- package/dist/{AcpBackend-6U6pQgx1.mjs → AcpBackend-CuOUXVRX.mjs} +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-D6PdH-OU.cjs} +1 -1
- package/dist/{BasePermissionHandler-BvvhBTja.mjs → BasePermissionHandler-Ng5h8JpY.mjs} +1 -1
- package/dist/{BaseReasoningProcessor-fsVNmCEF.cjs → BaseReasoningProcessor-C0cXz1mg.cjs} +1 -1
- package/dist/{BaseReasoningProcessor-DyhO1uoU.mjs → BaseReasoningProcessor-CM-ijU4F.mjs} +1 -1
- package/dist/{agentHome-Ck1i1TQB.mjs → agentHome-Bt4lOwFE.mjs} +4 -4
- package/dist/{agentHome-DvNnGphb.cjs → agentHome-CAMEVRZZ.cjs} +4 -4
- package/dist/{api-SffjRQ1b.mjs → api-D5kfP3JF.mjs} +26 -10
- package/dist/{api-B2vLMS-z.cjs → api-DGFBAPr7.cjs} +26 -10
- package/dist/{apiMachine-gFA54X7y.cjs → apiMachine-BxCy5_No.cjs} +33 -26
- package/dist/{apiMachine-BpW9t8MO.mjs → apiMachine-C58eizxs.mjs} +21 -14
- package/dist/{assistantTools-CgiTbnWb.mjs → assistantTools-BvKH9eRc.mjs} +6 -6
- package/dist/{assistantTools-BfA0R3_m.cjs → assistantTools-NC7DMNvV.cjs} +6 -6
- package/dist/{attachmentContent-CSGxr71v.mjs → attachmentContent-CCE0Y3gR.mjs} +2 -2
- package/dist/{attachmentContent-DMMZzevR.cjs → attachmentContent-CUKdzh4v.cjs} +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-CILb5DeW.cjs} +8 -8
- package/dist/{auth-CYHjQ8oQ.mjs → auth-CRm8yNv6.mjs} +5 -5
- package/dist/{auth-Bt4ceBBy.cjs → auth-Ddz597Rw.cjs} +5 -5
- package/dist/{auth-DdyVZSo6.mjs → auth-gdc8gI9D.mjs} +8 -8
- package/dist/{auto-BDXDUnjB.cjs → auto-CXtt6MfS.cjs} +16 -14
- package/dist/{auto-CXLlRi3a.mjs → auto-lLjHfAOO.mjs} +16 -14
- package/dist/{bootstrap-CkgIq8N3.cjs → bootstrap-CccIDvh4.cjs} +2 -2
- package/dist/{bootstrap-BNQq05jR.mjs → bootstrap-DSWZAtGy.mjs} +2 -2
- package/dist/{browser-9pyhQr1R.mjs → browser-DU9kI-Q-.mjs} +1 -1
- package/dist/{browser-BDOlKWYe.cjs → browser-lizgdXYj.cjs} +1 -1
- package/dist/{claudeLocal-BDuGFnjJ.cjs → claudeLocal-Bp-lf6yb.cjs} +5 -5
- package/dist/{claudeLocal-CQa8qnwq.mjs → claudeLocal-CTR2xlPT.mjs} +5 -5
- package/dist/{claudeLocalLauncher-CDqQI9ak.mjs → claudeLocalLauncher-DFkwLMqU.mjs} +10 -10
- package/dist/{claudeLocalLauncher-Bd5I2-j6.cjs → claudeLocalLauncher-aQyL3g7I.cjs} +10 -10
- package/dist/{codexThreadFork-BCaEMBiM.mjs → claudeSessionFork-DABSCbkf.mjs} +2 -134
- package/dist/{codexThreadFork-BZqF-9bX.cjs → claudeSessionFork-DdJFvxwf.cjs} +1 -137
- package/dist/{client-Brn-UwVk.mjs → client-BbNFS1WW.mjs} +3 -3
- package/dist/{client-DOBWJL3u.cjs → client-CQzHoynf.cjs} +2 -2
- package/dist/{client-C_axwRry.cjs → client-CXvsRLAz.cjs} +3 -3
- package/dist/{client-CXb1VJui.mjs → client-CyUhxs-0.mjs} +2 -2
- package/dist/codex/happyMcpStdioBridge.cjs +15 -15
- package/dist/codex/happyMcpStdioBridge.mjs +15 -15
- package/dist/{codexAppServerClient-ZzhUTWPo.cjs → codexAppServerClient-5jNbTlE5.cjs} +2 -2
- package/dist/{codexAppServerClient-oeQKD6Qf.mjs → codexAppServerClient-Dto99RVH.mjs} +2 -2
- package/dist/{codexCommand-CJ82bl3l.mjs → codexCommand-BHfrAyds.mjs} +49 -41
- package/dist/{codexCommand-C7H0NpBe.cjs → codexCommand-LUp0vkNi.cjs} +49 -41
- package/dist/codexThreadFork-DNekT4nQ.cjs +138 -0
- package/dist/codexThreadFork-R76RU5H0.mjs +133 -0
- package/dist/{config-BglnktIo.mjs → config-BEvt_OYR.mjs} +3 -3
- package/dist/{config-CYpL1Ahd.cjs → config-CAD5NR1h.cjs} +3 -3
- package/dist/{configuration-DoWFJUPm.mjs → configuration-B0c-OP_h.mjs} +1 -1
- package/dist/{configuration-v9f8LM9T.cjs → configuration-CepfrPZ_.cjs} +1 -1
- package/dist/{connect-yEvjdRvx.cjs → connect-BPMzMoiQ.cjs} +13 -13
- package/dist/{connect-hgcNjyAB.mjs → connect-BeK0dMYB.mjs} +13 -13
- package/dist/{context-B45vMtSZ.cjs → context-BhZMRQho.cjs} +1 -1
- package/dist/{context-C9GHPLEm.mjs → context-mMg17HJv.mjs} +1 -1
- package/dist/{controlClient-DjoKTtgK.mjs → controlClient-BKmjlbGs.mjs} +3 -3
- package/dist/{controlClient-fEHE85bH.cjs → controlClient-HPMsyxLb.cjs} +3 -3
- package/dist/{createSessionMetadata-BRLB9CNO.cjs → createSessionMetadata-CGuyVxsM.cjs} +2 -2
- package/dist/{createSessionMetadata-mIeehclp.mjs → createSessionMetadata-KOL67aSN.mjs} +2 -2
- package/dist/{deterministicJson-DKDP_mM-.cjs → deterministicJson-BFzPcsCh.cjs} +9 -9
- package/dist/{deterministicJson-p835AdAU.mjs → deterministicJson-CaWami7M.mjs} +9 -9
- package/dist/{doctor-hVNnSZJn.cjs → doctor-BHNVY9DE.cjs} +6 -6
- package/dist/{doctor-BeUuQXFs.mjs → doctor-DX2P7IlL.mjs} +6 -6
- package/dist/{ensureDaemonRunning-Dg9aZfjs.cjs → ensureDaemonRunning-BahhZpQ1.cjs} +5 -5
- package/dist/{ensureDaemonRunning-CO7d1gOC.mjs → ensureDaemonRunning-CnWMrL5b.mjs} +5 -5
- package/dist/forkBackfill-8eLDeS73.cjs +66 -0
- package/dist/forkBackfill-DYIjlN1Z.mjs +62 -0
- package/dist/{handleResumeCommand-DnVmy7a3.cjs → handleResumeCommand-Ca334R4t.cjs} +5 -5
- package/dist/{handleResumeCommand-BiTPK0qd.mjs → handleResumeCommand-bToC6FDH.mjs} +5 -5
- package/dist/{index-CAFwetLk.mjs → index-B5v5fZi6.mjs} +37 -37
- package/dist/{index-gNTWtSKN.cjs → index-B6MVw_Xb.cjs} +3 -3
- package/dist/{index-qdS1friN.mjs → index-BBg9j0XK.mjs} +8 -1
- package/dist/{index-SPGPenK5.mjs → index-CpFreRx8.mjs} +4 -4
- package/dist/{index-Cqx-Raq6.mjs → index-D3AsOj4j.mjs} +3 -3
- package/dist/{index-DA7yINuk.cjs → index-DJ-oV52i.cjs} +8 -1
- package/dist/{index-Pf2cV9cn.cjs → index-DoMsO8_G.cjs} +4 -4
- package/dist/{index-LIn6nCcq.cjs → index-vFMUVtSL.cjs} +36 -36
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-Bu85vlHD.cjs → install-BnTP73AE.cjs} +3 -3
- package/dist/{install-ClUUl3yp.mjs → install-Dixfzmb_.mjs} +3 -3
- package/dist/lib.cjs +12 -12
- package/dist/lib.d.cts +26 -0
- package/dist/lib.d.mts +26 -0
- package/dist/lib.mjs +12 -12
- package/dist/{lidState-KHHu1015.cjs → lidState-BGWXfx1e.cjs} +1 -1
- package/dist/{lidState-C2dI0FAN.mjs → lidState-X7iQg4y5.mjs} +1 -1
- package/dist/{localHappyAgentAuth-BXiHPXdC.cjs → localHappyAgentAuth-D_Gc4K7h.cjs} +1 -1
- package/dist/{localHappyAgentAuth-DCsetiyG.mjs → localHappyAgentAuth-r83bTscW.mjs} +1 -1
- package/dist/{logger-fXoNzNuB.mjs → logger-BIzr7JN0.mjs} +2 -2
- package/dist/{logger-Bc8-u1w0.cjs → logger-Ca5eRZ2j.cjs} +2 -2
- package/dist/{machineMetadata-BHjehxJY.mjs → machineMetadata-DakW9c61.mjs} +3 -3
- package/dist/{machineMetadata-BibDMFVx.cjs → machineMetadata-GlObivJ-.cjs} +3 -3
- package/dist/{main-BktM4A1K.mjs → main-BJlGidfv.mjs} +44 -44
- package/dist/{main-CLaX-t-b.cjs → main-BfA1Vtqq.cjs} +44 -44
- package/dist/{mcp-GBfE70nk.cjs → mcp-BVzt1llv.cjs} +14 -14
- package/dist/{mcp-CeUd9KDr.mjs → mcp-Bb7AD1SD.mjs} +14 -14
- package/dist/{package-Cl5BEP5x.cjs → package-BfnmIH4b.cjs} +7 -7
- package/dist/{package-uOg9SCKi.mjs → package-D-W_r_pd.mjs} +7 -7
- package/dist/{peerTools-Dz3_7Bkk.mjs → peerTools-C1cELmtZ.mjs} +4 -4
- package/dist/{peerTools-CIeiy9wn.cjs → peerTools-CADjnFDx.cjs} +4 -4
- package/dist/{persistence-CBNMzSa8.cjs → persistence-Ceb-BPk6.cjs} +3 -3
- package/dist/{persistence-oET5n61f.mjs → persistence-DgBhXxu7.mjs} +3 -3
- package/dist/{piRunnerArgs-Bf7RUF__.cjs → piRunnerArgs-Bem-saSg.cjs} +1 -1
- package/dist/{piRunnerArgs-Dk1ncwHF.mjs → piRunnerArgs-CH6oh6w0.mjs} +1 -1
- package/dist/{piRuntime-BwRdhK_N.mjs → piRuntime-BRKG6Yoz.mjs} +1 -1
- package/dist/{piRuntime-B_6TE9Eb.cjs → piRuntime-Be0UP44z.cjs} +1 -1
- package/dist/{piTerminal-Bap3R8Re.mjs → piTerminal-DVOAWiZx.mjs} +16 -16
- package/dist/{piTerminal-CagmEoez.cjs → piTerminal-ibKBMmuK.cjs} +16 -16
- package/dist/{registerCommonHandlers-BjSV2Skz.cjs → registerCommonHandlers-DPOHFlxp.cjs} +2 -2
- package/dist/{registerCommonHandlers-CrgvJsOy.mjs → registerCommonHandlers-t15dS7xt.mjs} +2 -2
- package/dist/{registerKillSessionHandler-Cbc8Rgtd.mjs → registerKillSessionHandler-BS5afGeA.mjs} +11 -7
- package/dist/{registerKillSessionHandler-6TC2S3lf.cjs → registerKillSessionHandler-DGDubZLv.cjs} +11 -7
- package/dist/{remoteSessionClient-BNx78NLb.cjs → remoteSessionClient-DbnVs1Tv.cjs} +5 -5
- package/dist/{remoteSessionClient-CO7qOjR0.mjs → remoteSessionClient-N7JsQ0XS.mjs} +5 -5
- package/dist/{run-D5xAEWSB.cjs → run-CptLbkQ4.cjs} +32 -32
- package/dist/{run-2l5vSt2h.mjs → run-FZRugy70.mjs} +31 -31
- package/dist/{runClaude-BX6ixjtW.cjs → runClaude-Cnv0SnA4.cjs} +24 -21
- package/dist/{runClaude-BgN6xo05.mjs → runClaude-DNW3i-k4.mjs} +24 -21
- package/dist/{runClaudeDeps-COBBhD9o.mjs → runClaudeDeps-CpAiml84.mjs} +216 -39
- package/dist/{runClaudeDeps-Bp20MScE.cjs → runClaudeDeps-lb6LlVPa.cjs} +212 -35
- package/dist/{runGemini-CSMPkt0p.cjs → runGemini-BzS_Yw3F.cjs} +32 -32
- package/dist/{runGemini-Cc2jq-uh.mjs → runGemini-CRn8exeY.mjs} +32 -32
- package/dist/{runOpenClaw-CIlCwdW2.mjs → runOpenClaw-DuS_zRVT.mjs} +18 -18
- package/dist/{runOpenClaw-YBwua4Rf.cjs → runOpenClaw-QoDQpR9a.cjs} +18 -18
- package/dist/{sandbox-C4gXLP1p.cjs → sandbox-CT9CGjEI.cjs} +4 -4
- package/dist/{sandbox-CNkwOtHI.mjs → sandbox-DysMM_pn.mjs} +4 -4
- package/dist/selfCheck-BTltA-ZZ.mjs +84 -0
- package/dist/{selfCheck-CU8xSDsl.cjs → selfCheck-DIn7j8MD.cjs} +34 -34
- package/dist/{send-DY9Nr-x4.cjs → send-97xYN_Yw.cjs} +8 -8
- package/dist/{send-CGHcKZ-w.mjs → send-CA6fSF3S.mjs} +8 -8
- package/dist/{server-II51Mimf.cjs → server-C67NGJoX.cjs} +6 -6
- package/dist/{server-m2b5pamZ.mjs → server-r50NNW9e.mjs} +4 -4
- package/dist/{sessionLock-7ePAYDOg.cjs → sessionLock-CS4fdsmu.cjs} +2 -2
- package/dist/{sessionLock-Cw6FmbMv.mjs → sessionLock-Dab6_dCd.mjs} +2 -2
- package/dist/{sessionModeFile-CDmDyRkD.mjs → sessionModeFile-3yV7P9R-.mjs} +1 -1
- package/dist/{sessionModeFile-BVCV5f7E.cjs → sessionModeFile-BhqlFlHZ.cjs} +1 -1
- package/dist/{sessionOps-C_f1wKOr.mjs → sessionOps-DJSwzwP-.mjs} +5 -5
- package/dist/{sessionOps-DJdExmBy.cjs → sessionOps-DWsGWwfZ.cjs} +4 -4
- package/dist/{sessionScanner-D1goKdd3.cjs → sessionScanner-D6WqRtJQ.cjs} +3 -3
- package/dist/{sessionScanner-CaAHLyNV.mjs → sessionScanner-jilpq2aE.mjs} +3 -3
- package/dist/{sessions-DGs6ALNo.cjs → sessions-C22q-Z_s.cjs} +9 -9
- package/dist/{sessions-DnvmWUel.mjs → sessions-RXTp4x0o.mjs} +9 -9
- package/dist/{setupOfflineReconnection-R7XuR_sj.cjs → setupOfflineReconnection-BrnWBRUP.cjs} +2 -2
- package/dist/{setupOfflineReconnection-CVViqZft.mjs → setupOfflineReconnection-rd1PCWiN.mjs} +2 -2
- package/dist/{spawn-CXTH7qg1.cjs → spawn-Ccy5qAtp.cjs} +41 -19
- package/dist/{spawn-DNYSvFtC.mjs → spawn-D8CEQPbN.mjs} +39 -18
- package/dist/{spawnAgents-DZzZ9jMI.mjs → spawnAgents-Y1LjnCt9.mjs} +1 -1
- package/dist/{spawnAgents-BGQiEF-w.cjs → spawnAgents-iSu1Xzs5.cjs} +1 -1
- package/dist/{spawnHappyCLI-BhYj84rv.cjs → spawnHappyCLI-Dz2ZHrsN.cjs} +1 -1
- package/dist/{spawnHappyCLI-cqWQbwsb.mjs → spawnHappyCLI-wowHF2IL.mjs} +1 -1
- package/dist/{startFileWatcher-CdegMbJj.mjs → startFileWatcher-C1wjDI_o.mjs} +1 -1
- package/dist/{startFileWatcher-CKKx-8ZO.cjs → startFileWatcher-Ce17H9pG.cjs} +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-DnmsgL3w.mjs} +5 -1
- package/dist/{sync-CVk4QERO.cjs → sync-fDRF_nO1.cjs} +5 -1
- package/dist/{systemPrompt-BygJcmbi.cjs → systemPrompt-9PWg4OU6.cjs} +2 -2
- package/dist/{systemPrompt-DmtypUc7.mjs → systemPrompt-Db9O7KGe.mjs} +2 -2
- package/dist/{teams-BOC6nIPL.mjs → teams-C5PwKr4K.mjs} +6 -6
- package/dist/{teams-BsvpOBfn.cjs → teams-DkHPUc6j.cjs} +6 -6
- package/dist/{time-BZNdNiIV.mjs → time-TxDyvAKk.mjs} +1 -1
- package/dist/{time-CNRE4ChD.cjs → time-xNkWLTSj.cjs} +1 -1
- package/dist/{titleGenerator-CFRhU-xq.cjs → titleGenerator-C8arvXNG.cjs} +13 -3
- package/dist/{titleGenerator-ox6ptCsp.mjs → titleGenerator-oK414IZc.mjs} +12 -2
- package/dist/{todo-C5KBVbUw.mjs → todo-CLHIGRUf.mjs} +6 -6
- package/dist/{todo-B-KB7oAB.cjs → todo-VqQuYyFq.cjs} +6 -6
- package/dist/{tools-BZabNIid.mjs → tools-BSzD246o.mjs} +2 -2
- package/dist/{tools-CsSovyNp.cjs → tools-GnqHEZHb.cjs} +2 -2
- package/dist/{tools-BmQQUATY.mjs → tools-sPgOmLr_.mjs} +1 -1
- package/dist/{tools-lMDra4Pv.cjs → tools-xQ38ufgo.cjs} +1 -1
- package/dist/{uninstall-fvA5aWpU.cjs → uninstall-DKM0j1qI.cjs} +3 -3
- package/dist/{uninstall-B1WLtC1d.mjs → uninstall-DyoXxpgI.mjs} +3 -3
- package/package.json +7 -7
- package/dist/selfCheck-hJ6PCh7v.mjs +0 -84
|
@@ -1,48 +1,50 @@
|
|
|
1
|
-
import { l as logger } from './logger-
|
|
2
|
-
import { k as notifyDaemonSessionEvent, m as notifyDaemonClaudeAuthFailed } from './controlClient-
|
|
3
|
-
export { g as reportSessionEditToDaemon } from './controlClient-
|
|
1
|
+
import { l as logger } from './logger-BIzr7JN0.mjs';
|
|
2
|
+
import { k as notifyDaemonSessionEvent, m as notifyDaemonClaudeAuthFailed } from './controlClient-BKmjlbGs.mjs';
|
|
3
|
+
export { g as reportSessionEditToDaemon } from './controlClient-BKmjlbGs.mjs';
|
|
4
4
|
import { s as sameBackgroundTasks, c as createBackgroundTaskTracker } from './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
5
5
|
import { randomInt, randomUUID, createHash } from 'node:crypto';
|
|
6
6
|
import { M as MessageBuffer } from './messageBuffer-BWlGgR3A.mjs';
|
|
7
7
|
import { query } from './index-B6UGRQ7h.mjs';
|
|
8
8
|
import { AbortError } from '@anthropic-ai/claude-agent-sdk';
|
|
9
9
|
import { m as mapToClaudeMode, p as parseClaudePermissionMode, c as resolveRemoteClaudePermissionMode } from './permissionMode-CH4FoZfU.mjs';
|
|
10
|
-
import { c as claudeCheckSession, s as systemPrompt } from './systemPrompt-
|
|
10
|
+
import { c as claudeCheckSession, s as systemPrompt } from './systemPrompt-Db9O7KGe.mjs';
|
|
11
11
|
import { join, resolve, dirname } from 'node:path';
|
|
12
12
|
import { p as parseSpecialCommand } from './specialCommands-BSqhYg5X.mjs';
|
|
13
13
|
import 'axios';
|
|
14
14
|
import 'node:events';
|
|
15
15
|
import 'socket.io-client';
|
|
16
|
-
import { A as AsyncLock } from './attachmentLimits-
|
|
16
|
+
import { A as AsyncLock } from './attachmentLimits-D5pgmASK.mjs';
|
|
17
17
|
import 'tweetnacl';
|
|
18
|
-
import { c as configuration, e as ensurePrivateDirectory } from './configuration-
|
|
19
|
-
import './index-
|
|
20
|
-
import './registerCommonHandlers-
|
|
18
|
+
import { c as configuration, e as ensurePrivateDirectory } from './configuration-B0c-OP_h.mjs';
|
|
19
|
+
import './index-BBg9j0XK.mjs';
|
|
20
|
+
import './registerCommonHandlers-t15dS7xt.mjs';
|
|
21
21
|
import 'os';
|
|
22
22
|
import 'child_process';
|
|
23
23
|
import '@paralleldrive/cuid2';
|
|
24
|
-
import './persistence-
|
|
24
|
+
import './persistence-DgBhXxu7.mjs';
|
|
25
25
|
import { c as contentLogMetadata } from './contentLogMetadata-BlWI0egu.mjs';
|
|
26
26
|
import 'chalk';
|
|
27
27
|
export { R as RawJSONLinesSchema } from './types-CkqAACXx.mjs';
|
|
28
28
|
import { g as getProjectPath } from './path-D2wdaNSk.mjs';
|
|
29
29
|
import { access } from 'fs/promises';
|
|
30
|
-
import { d as delay } from './time-
|
|
30
|
+
import { d as delay } from './time-TxDyvAKk.mjs';
|
|
31
31
|
import { mkdirSync, writeFileSync, readFileSync, unlinkSync, renameSync, statSync, existsSync } from 'node:fs';
|
|
32
|
-
import { h as hashObject, i as isSelfReportFresh } from './deterministicJson-
|
|
33
|
-
export { c as createSelfReportState, s as startHappyServer } from './deterministicJson-
|
|
34
|
-
import { F as Future } from './sessionScanner-
|
|
35
|
-
export { c as createSessionScanner } from './sessionScanner-
|
|
32
|
+
import { h as hashObject, i as isSelfReportFresh } from './deterministicJson-CaWami7M.mjs';
|
|
33
|
+
export { c as createSelfReportState, s as startHappyServer } from './deterministicJson-CaWami7M.mjs';
|
|
34
|
+
import { F as Future } from './sessionScanner-jilpq2aE.mjs';
|
|
35
|
+
export { c as createSessionScanner } from './sessionScanner-jilpq2aE.mjs';
|
|
36
36
|
import { execSync } from 'node:child_process';
|
|
37
|
-
import { S as StreamRelay } from './streamRelay-
|
|
38
|
-
import { C as CLAUDE_ATTACHMENT_KINDS, c as chatAttachmentDirectory, a as stageClaudeAttachments, b as appendStagedAttachmentsToPrompt } from './attachmentContent-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
import { S as StreamRelay } from './streamRelay-BLgU9X3R.mjs';
|
|
38
|
+
import { C as CLAUDE_ATTACHMENT_KINDS, c as chatAttachmentDirectory, a as stageClaudeAttachments, b as appendStagedAttachmentsToPrompt } from './attachmentContent-CCE0Y3gR.mjs';
|
|
39
|
+
import { readFile, writeFile, rename, unlink } from 'node:fs/promises';
|
|
40
|
+
import { F as ForkSourceMissingError } from './claudeSessionFork-DABSCbkf.mjs';
|
|
41
|
+
export { M as MessageQueue2, r as registerKillSessionHandler } from './registerKillSessionHandler-BS5afGeA.mjs';
|
|
42
|
+
export { g as getEnvironmentInfo } from './doctor-DX2P7IlL.mjs';
|
|
41
43
|
import { createServer } from 'node:http';
|
|
42
44
|
export { E as EditReportThrottle, b as extractClaudeEditPaths } from './editPaths-BVfS_FFL.mjs';
|
|
43
45
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
44
|
-
import { r as resolveClaudeBinary, a as runClaudeOneShot } from './titleGenerator-
|
|
45
|
-
export { T as TitleGenerator } from './titleGenerator-
|
|
46
|
+
import { r as resolveClaudeBinary, a as runClaudeOneShot } from './titleGenerator-oK414IZc.mjs';
|
|
47
|
+
export { T as TitleGenerator } from './titleGenerator-oK414IZc.mjs';
|
|
46
48
|
import { B as BOARD_ANALYZER_PROMPT_PREFIX } from './oneShotPrompts-DT4p6RNd.mjs';
|
|
47
49
|
import 'node:util';
|
|
48
50
|
import './smallFastModel-BLNgMrwR.mjs';
|
|
@@ -50,34 +52,34 @@ import './trimIdent-BAjmv_TG.mjs';
|
|
|
50
52
|
import 'node:os';
|
|
51
53
|
import './agentGuidance-CQuNlNx8.mjs';
|
|
52
54
|
import 'zod';
|
|
53
|
-
import './package-
|
|
54
|
-
import 'node:fs/promises';
|
|
55
|
+
import './package-D-W_r_pd.mjs';
|
|
55
56
|
import 'util';
|
|
56
57
|
import 'crypto';
|
|
57
58
|
import 'path';
|
|
58
59
|
import 'cross-spawn';
|
|
59
60
|
import './authRelay-DSAvg1uv.mjs';
|
|
60
|
-
import './client-
|
|
61
|
-
import './context-
|
|
62
|
-
import './sessionOps-
|
|
61
|
+
import './client-BbNFS1WW.mjs';
|
|
62
|
+
import './context-mMg17HJv.mjs';
|
|
63
|
+
import './sessionOps-DJSwzwP-.mjs';
|
|
63
64
|
import './resources-BdFBQi8r.mjs';
|
|
64
|
-
import './tools-
|
|
65
|
-
import './tools-
|
|
66
|
-
import './client-
|
|
67
|
-
import './peerTools-
|
|
65
|
+
import './tools-sPgOmLr_.mjs';
|
|
66
|
+
import './tools-BSzD246o.mjs';
|
|
67
|
+
import './client-CyUhxs-0.mjs';
|
|
68
|
+
import './peerTools-C1cELmtZ.mjs';
|
|
68
69
|
import './ids-DU6sLx4C.mjs';
|
|
69
|
-
import './remoteSessionClient-
|
|
70
|
+
import './remoteSessionClient-N7JsQ0XS.mjs';
|
|
70
71
|
import '@modelcontextprotocol/sdk/server/mcp.js';
|
|
71
72
|
import '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
72
73
|
import './limits-DIo7rEBR.mjs';
|
|
73
|
-
import './assistantTools-
|
|
74
|
+
import './assistantTools-BvKH9eRc.mjs';
|
|
74
75
|
import './terminals-Dlg0x3nY.mjs';
|
|
75
76
|
import './terminalTitleSuggest-CeKsX_V6.mjs';
|
|
76
77
|
import './tmuxSocket-B8Yx20sT.mjs';
|
|
77
|
-
import './bootstrap-
|
|
78
|
+
import './bootstrap-DSWZAtGy.mjs';
|
|
78
79
|
import './previewPath-CXN4Vag0.mjs';
|
|
79
|
-
import './sync-
|
|
80
|
-
import './startFileWatcher-
|
|
80
|
+
import './sync-DnmsgL3w.mjs';
|
|
81
|
+
import './startFileWatcher-C1wjDI_o.mjs';
|
|
82
|
+
import 'node:readline';
|
|
81
83
|
import './doctor-BPkYWSuq.mjs';
|
|
82
84
|
import 'ps-list';
|
|
83
85
|
import './doctorReadiness-C208SMN9.mjs';
|
|
@@ -989,6 +991,10 @@ function withTimeout(promise, ms) {
|
|
|
989
991
|
if (timer) clearTimeout(timer);
|
|
990
992
|
});
|
|
991
993
|
}
|
|
994
|
+
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;
|
|
995
|
+
function promptUuid(uuid) {
|
|
996
|
+
return uuid && PROMPT_UUID_RE.test(uuid) ? { uuid } : {};
|
|
997
|
+
}
|
|
992
998
|
async function claudeRemote(opts) {
|
|
993
999
|
let startFrom = opts.sessionId;
|
|
994
1000
|
if (opts.sessionId && !claudeCheckSession(opts.sessionId, opts.path)) {
|
|
@@ -1241,6 +1247,7 @@ async function claudeRemote(opts) {
|
|
|
1241
1247
|
type: "user",
|
|
1242
1248
|
parent_tool_use_id: null,
|
|
1243
1249
|
origin: { kind: "human" },
|
|
1250
|
+
...promptUuid(initial.uuid),
|
|
1244
1251
|
message: {
|
|
1245
1252
|
role: "user",
|
|
1246
1253
|
content: initial.message
|
|
@@ -1429,6 +1436,7 @@ async function claudeRemote(opts) {
|
|
|
1429
1436
|
type: "user",
|
|
1430
1437
|
parent_tool_use_id: null,
|
|
1431
1438
|
origin: { kind: "human" },
|
|
1439
|
+
...promptUuid(next.uuid),
|
|
1432
1440
|
message: { role: "user", content: next.message }
|
|
1433
1441
|
});
|
|
1434
1442
|
}).catch(() => {
|
|
@@ -2806,6 +2814,146 @@ class LaunchModeGate {
|
|
|
2806
2814
|
}
|
|
2807
2815
|
}
|
|
2808
2816
|
|
|
2817
|
+
class ConversationRewindError extends Error {
|
|
2818
|
+
constructor(code, message) {
|
|
2819
|
+
super(message);
|
|
2820
|
+
this.code = code;
|
|
2821
|
+
this.name = "ConversationRewindError";
|
|
2822
|
+
}
|
|
2823
|
+
}
|
|
2824
|
+
function transcriptPromptText(parsed) {
|
|
2825
|
+
if (parsed?.type !== "user" || parsed.isSidechain || parsed.isMeta || parsed.isSynthetic) return null;
|
|
2826
|
+
const content = parsed.message?.content;
|
|
2827
|
+
if (typeof content === "string") return content.trim() ? content : null;
|
|
2828
|
+
if (!Array.isArray(content) || content.some((block) => block?.type === "tool_result")) return null;
|
|
2829
|
+
const text = content.filter((block) => block?.type === "text" && typeof block.text === "string").map((block) => block.text).join("\n");
|
|
2830
|
+
if (!text.trim()) return content.length > 0 ? "" : null;
|
|
2831
|
+
return text;
|
|
2832
|
+
}
|
|
2833
|
+
function isConversationEntry(parsed) {
|
|
2834
|
+
return !parsed?.isSidechain && !parsed?.isMeta && !parsed?.isSynthetic && (parsed?.type === "user" || parsed?.type === "assistant");
|
|
2835
|
+
}
|
|
2836
|
+
function resolveRewindTarget(entries, target) {
|
|
2837
|
+
for (const uuid of target.uuids) {
|
|
2838
|
+
const index = entries.findIndex((entry) => entry.parsed?.uuid === uuid && transcriptPromptText(entry.parsed) !== null);
|
|
2839
|
+
if (index >= 0) return index;
|
|
2840
|
+
}
|
|
2841
|
+
const wanted = target.text?.trim();
|
|
2842
|
+
if (!wanted) throw new ConversationRewindError("not-found", "This message is not in the agent conversation");
|
|
2843
|
+
const matches = [];
|
|
2844
|
+
entries.forEach((entry, index) => {
|
|
2845
|
+
if (transcriptPromptText(entry.parsed)?.trim() === wanted) matches.push(index);
|
|
2846
|
+
});
|
|
2847
|
+
if (matches.length === 1) return matches[0];
|
|
2848
|
+
if (matches.length === 0) throw new ConversationRewindError("not-found", "This message is not in the agent conversation");
|
|
2849
|
+
throw new ConversationRewindError("ambiguous", "Several earlier messages have the same text; cannot tell which one to change");
|
|
2850
|
+
}
|
|
2851
|
+
function rewindTranscriptLines(lines, action, target) {
|
|
2852
|
+
const entries = [];
|
|
2853
|
+
for (const line of lines) {
|
|
2854
|
+
if (!line) continue;
|
|
2855
|
+
let parsed = null;
|
|
2856
|
+
try {
|
|
2857
|
+
parsed = JSON.parse(line);
|
|
2858
|
+
} catch {
|
|
2859
|
+
}
|
|
2860
|
+
entries.push({ line, parsed });
|
|
2861
|
+
}
|
|
2862
|
+
const cut = resolveRewindTarget(entries, target);
|
|
2863
|
+
let end = entries.length;
|
|
2864
|
+
for (let i = cut + 1; i < entries.length; i++) {
|
|
2865
|
+
if (transcriptPromptText(entries[i].parsed) !== null) {
|
|
2866
|
+
end = i;
|
|
2867
|
+
break;
|
|
2868
|
+
}
|
|
2869
|
+
}
|
|
2870
|
+
const before = entries.slice(0, cut);
|
|
2871
|
+
const after = action === "delete" ? entries.slice(end) : [];
|
|
2872
|
+
if (![...before, ...after].some((entry) => isConversationEntry(entry.parsed))) return null;
|
|
2873
|
+
if (before.some((entry) => isConversationEntry(entry.parsed)) && !before.some((entry) => transcriptPromptText(entry.parsed) !== null)) {
|
|
2874
|
+
throw new ConversationRewindError("unsafe", "Cannot safely rewind: earlier history has no user prompt");
|
|
2875
|
+
}
|
|
2876
|
+
if (after.length === 0) return before.map((entry) => entry.line);
|
|
2877
|
+
const dropped = /* @__PURE__ */ new Set();
|
|
2878
|
+
for (const entry of entries.slice(cut, end)) {
|
|
2879
|
+
if (typeof entry.parsed?.uuid === "string") dropped.add(entry.parsed.uuid);
|
|
2880
|
+
}
|
|
2881
|
+
const reparentTo = typeof entries[cut].parsed?.parentUuid === "string" ? entries[cut].parsed.parentUuid : null;
|
|
2882
|
+
const relinked = after.map((entry) => {
|
|
2883
|
+
const parsed = entry.parsed;
|
|
2884
|
+
if (!parsed || typeof parsed !== "object") return entry.line;
|
|
2885
|
+
let next = parsed;
|
|
2886
|
+
for (const key of ["parentUuid", "logicalParentUuid"]) {
|
|
2887
|
+
if (typeof parsed[key] === "string" && dropped.has(parsed[key])) {
|
|
2888
|
+
next = next === parsed ? { ...parsed } : next;
|
|
2889
|
+
next[key] = reparentTo;
|
|
2890
|
+
}
|
|
2891
|
+
}
|
|
2892
|
+
return next === parsed ? entry.line : JSON.stringify(next);
|
|
2893
|
+
});
|
|
2894
|
+
return [...before.map((entry) => entry.line), ...relinked];
|
|
2895
|
+
}
|
|
2896
|
+
async function rewindClaudeTranscript(projectDir, claudeSessionId, action, target) {
|
|
2897
|
+
const source = join(projectDir, `${claudeSessionId}.jsonl`);
|
|
2898
|
+
let raw;
|
|
2899
|
+
try {
|
|
2900
|
+
raw = await readFile(source, "utf-8");
|
|
2901
|
+
} catch (error) {
|
|
2902
|
+
if (error.code === "ENOENT") throw new ForkSourceMissingError(source);
|
|
2903
|
+
throw error;
|
|
2904
|
+
}
|
|
2905
|
+
const kept = rewindTranscriptLines(raw.split("\n"), action, target);
|
|
2906
|
+
if (kept === null) return null;
|
|
2907
|
+
const newId = randomUUID();
|
|
2908
|
+
const destination = join(projectDir, `${newId}.jsonl`);
|
|
2909
|
+
const temporary = `${destination}.tmp-${process.pid}`;
|
|
2910
|
+
try {
|
|
2911
|
+
await writeFile(temporary, kept.join("\n") + "\n", { encoding: "utf-8", flag: "wx" });
|
|
2912
|
+
await rename(temporary, destination);
|
|
2913
|
+
} catch (error) {
|
|
2914
|
+
await unlink(temporary).catch(() => void 0);
|
|
2915
|
+
throw error;
|
|
2916
|
+
}
|
|
2917
|
+
return newId;
|
|
2918
|
+
}
|
|
2919
|
+
|
|
2920
|
+
const STOP_WAIT_MS = 8e3;
|
|
2921
|
+
function createConversationRewind(deps) {
|
|
2922
|
+
let inFlight = false;
|
|
2923
|
+
const rewrite = deps.rewrite ?? rewindClaudeTranscript;
|
|
2924
|
+
return async (input) => {
|
|
2925
|
+
const request = input && typeof input === "object" ? input : {};
|
|
2926
|
+
const action = request.action;
|
|
2927
|
+
const sourceId = typeof request.sourceId === "string" && request.sourceId.length > 0 && request.sourceId.length <= 200 ? request.sourceId : void 0;
|
|
2928
|
+
const text = typeof request.text === "string" && request.text.length <= 2e5 ? request.text : void 0;
|
|
2929
|
+
if (action !== "edit" && action !== "delete" || !sourceId && !text?.trim()) {
|
|
2930
|
+
return { ok: false, code: "invalid", error: "Invalid rewind request" };
|
|
2931
|
+
}
|
|
2932
|
+
if (inFlight) return { ok: false, code: "busy", error: "Another edit is still being applied" };
|
|
2933
|
+
inFlight = true;
|
|
2934
|
+
try {
|
|
2935
|
+
if (deps.isThinking()) {
|
|
2936
|
+
await deps.stopTurn();
|
|
2937
|
+
if (!await deps.waitIdle(STOP_WAIT_MS)) {
|
|
2938
|
+
return { ok: false, code: "running", error: "The agent did not stop; try again after it finishes" };
|
|
2939
|
+
}
|
|
2940
|
+
}
|
|
2941
|
+
const current = deps.claudeSessionId();
|
|
2942
|
+
if (!current) return { ok: false, code: "no-conversation", error: "The agent has no conversation to change yet" };
|
|
2943
|
+
const uuids = sourceId ? [sourceId, ...deps.aliases(sourceId)] : [];
|
|
2944
|
+
const next = await rewrite(deps.projectDir(), current, action, { uuids, text });
|
|
2945
|
+
await deps.switchConversation(next);
|
|
2946
|
+
return { ok: true, action, freshConversation: next === null };
|
|
2947
|
+
} catch (error) {
|
|
2948
|
+
if (error instanceof ConversationRewindError) return { ok: false, code: error.code, error: error.message };
|
|
2949
|
+
if (error instanceof ForkSourceMissingError) return { ok: false, code: "no-conversation", error: "The agent conversation file is missing on this machine" };
|
|
2950
|
+
throw error;
|
|
2951
|
+
} finally {
|
|
2952
|
+
inFlight = false;
|
|
2953
|
+
}
|
|
2954
|
+
};
|
|
2955
|
+
}
|
|
2956
|
+
|
|
2809
2957
|
const ABORT_INTERRUPT_GRACE_MS = 4e3;
|
|
2810
2958
|
async function claudeRemoteLauncher(session, onPermissionModeChange, onEffectivePermissionMode, onPromptFinalized) {
|
|
2811
2959
|
logger.debug("[claudeRemoteLauncher] Starting remote launcher");
|
|
@@ -2900,6 +3048,31 @@ async function claudeRemoteLauncher(session, onPermissionModeChange, onEffective
|
|
|
2900
3048
|
await turnSteering.steer();
|
|
2901
3049
|
});
|
|
2902
3050
|
session.client.rpcHandlerManager.registerHandler("switch", doSwitch);
|
|
3051
|
+
const promptAliases = /* @__PURE__ */ new Map();
|
|
3052
|
+
const promptUuidFor = (sourceIds) => {
|
|
3053
|
+
const [first, ...rest] = sourceIds ?? [];
|
|
3054
|
+
if (first) for (const id of rest) promptAliases.set(id, first);
|
|
3055
|
+
if (promptAliases.size > 2e3) promptAliases.delete(promptAliases.keys().next().value);
|
|
3056
|
+
return first;
|
|
3057
|
+
};
|
|
3058
|
+
let silentRelaunch = false;
|
|
3059
|
+
session.client.rpcHandlerManager.registerHandler("conversation-rewind", createConversationRewind({
|
|
3060
|
+
claudeSessionId: () => session.sessionId,
|
|
3061
|
+
projectDir: () => getProjectPath(session.path),
|
|
3062
|
+
isThinking: () => session.thinking,
|
|
3063
|
+
stopTurn: doAbort,
|
|
3064
|
+
waitIdle: waitForThinkingToStop,
|
|
3065
|
+
aliases: (sourceId) => {
|
|
3066
|
+
const alias = promptAliases.get(sourceId);
|
|
3067
|
+
return alias ? [alias] : [];
|
|
3068
|
+
},
|
|
3069
|
+
switchConversation: async (claudeSessionId) => {
|
|
3070
|
+
if (claudeSessionId) session.onSessionFound(claudeSessionId);
|
|
3071
|
+
else session.clearSessionId();
|
|
3072
|
+
silentRelaunch = true;
|
|
3073
|
+
await abort();
|
|
3074
|
+
}
|
|
3075
|
+
}));
|
|
2903
3076
|
let livePermissionModeHandler = null;
|
|
2904
3077
|
let idlePermissionModeHandler = null;
|
|
2905
3078
|
session.client.rpcHandlerManager.registerHandler(
|
|
@@ -3123,7 +3296,8 @@ async function claudeRemoteLauncher(session, onPermissionModeChange, onEffective
|
|
|
3123
3296
|
}) : [];
|
|
3124
3297
|
modeGate.park({
|
|
3125
3298
|
message: parkedStaged.length > 0 ? appendStagedAttachmentsToPrompt(msg.message, parkedStaged) : msg.message,
|
|
3126
|
-
mode: msg.mode
|
|
3299
|
+
mode: msg.mode,
|
|
3300
|
+
uuid: promptUuidFor(msg.sourceIds)
|
|
3127
3301
|
});
|
|
3128
3302
|
return null;
|
|
3129
3303
|
}
|
|
@@ -3141,14 +3315,16 @@ async function claudeRemoteLauncher(session, onPermissionModeChange, onEffective
|
|
|
3141
3315
|
return {
|
|
3142
3316
|
message: withAttachments,
|
|
3143
3317
|
mode: msg.mode,
|
|
3144
|
-
enqueuedAt: msg.enqueuedAt
|
|
3318
|
+
enqueuedAt: msg.enqueuedAt,
|
|
3319
|
+
uuid: promptUuidFor(msg.sourceIds)
|
|
3145
3320
|
};
|
|
3146
3321
|
}
|
|
3147
3322
|
onPromptFinalized?.(msg.message);
|
|
3148
3323
|
return {
|
|
3149
3324
|
message: msg.message,
|
|
3150
3325
|
mode: msg.mode,
|
|
3151
|
-
enqueuedAt: msg.enqueuedAt
|
|
3326
|
+
enqueuedAt: msg.enqueuedAt,
|
|
3327
|
+
uuid: promptUuidFor(msg.sourceIds)
|
|
3152
3328
|
};
|
|
3153
3329
|
}
|
|
3154
3330
|
return null;
|
|
@@ -3249,7 +3425,7 @@ async function claudeRemoteLauncher(session, onPermissionModeChange, onEffective
|
|
|
3249
3425
|
signal: abortController.signal
|
|
3250
3426
|
});
|
|
3251
3427
|
session.consumeOneTimeFlags();
|
|
3252
|
-
if (!exitReason && abortController.signal.aborted) {
|
|
3428
|
+
if (!exitReason && abortController.signal.aborted && !silentRelaunch) {
|
|
3253
3429
|
session.client.closeClaudeSessionTurn("cancelled");
|
|
3254
3430
|
session.client.sendSessionEvent({ type: "message", message: "Aborted by user" });
|
|
3255
3431
|
}
|
|
@@ -3292,6 +3468,7 @@ async function claudeRemoteLauncher(session, onPermissionModeChange, onEffective
|
|
|
3292
3468
|
streamRelay.endTurn();
|
|
3293
3469
|
streamRelay.dispose();
|
|
3294
3470
|
abortController = null;
|
|
3471
|
+
silentRelaunch = false;
|
|
3295
3472
|
abortFuture?.resolve(void 0);
|
|
3296
3473
|
abortFuture = null;
|
|
3297
3474
|
logger.debug("[remote]: launch done");
|
|
@@ -3349,7 +3526,7 @@ async function loop(opts) {
|
|
|
3349
3526
|
logger.debug(`[loop] Iteration with mode: ${mode}`);
|
|
3350
3527
|
switch (mode) {
|
|
3351
3528
|
case "local": {
|
|
3352
|
-
const { claudeLocalLauncher } = await import('./claudeLocalLauncher-
|
|
3529
|
+
const { claudeLocalLauncher } = await import('./claudeLocalLauncher-DFkwLMqU.mjs');
|
|
3353
3530
|
const result = await claudeLocalLauncher(session);
|
|
3354
3531
|
switch (result.type) {
|
|
3355
3532
|
case "switch":
|