very-happy-cli 0.2.162 → 0.2.164
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--TmFHgRH.mjs → AcpBackend-B8l1ZePt.mjs} +3 -3
- package/dist/{AcpBackend-9asD_DL7.cjs → AcpBackend-CHDqSii9.cjs} +3 -3
- package/dist/{AcpSessionManager-BvIuBzoO.cjs → AcpSessionManager-9yN2iH4b.cjs} +1 -1
- package/dist/{AcpSessionManager-BSIBnWUb.mjs → AcpSessionManager-BQnDJvct.mjs} +1 -1
- package/dist/{BasePermissionHandler-D4B-NNu2.cjs → BasePermissionHandler-DGQYvBPg.cjs} +1 -1
- package/dist/{BasePermissionHandler-DUBySe0f.mjs → BasePermissionHandler-DgtAtJTV.mjs} +1 -1
- package/dist/{BaseReasoningProcessor-CqLl-ikP.cjs → BaseReasoningProcessor-BqalZhQO.cjs} +1 -1
- package/dist/{BaseReasoningProcessor-9TybUGTq.mjs → BaseReasoningProcessor-Dfacnfhj.mjs} +1 -1
- package/dist/{agentHome-DQrq_FG1.mjs → agentHome-DM0urHEI.mjs} +4 -4
- package/dist/{agentHome-BohNUYnE.cjs → agentHome-DtsPKfTS.cjs} +4 -4
- package/dist/{api-CQnLOqRS.cjs → api-EKlS0r1w.cjs} +57 -15
- package/dist/{api-D57dsd6_.mjs → api-Yoh_zKdR.mjs} +57 -15
- package/dist/{apiMachine-fFFaWxYy.cjs → apiMachine-q71suojS.cjs} +20 -17
- package/dist/{apiMachine-78Aqzg--.mjs → apiMachine-s3HiV-SL.mjs} +20 -17
- package/dist/{assistantTools-mEz6uNqL.mjs → assistantTools-BWfAV349.mjs} +6 -6
- package/dist/{assistantTools-CwESq24n.cjs → assistantTools-D3cZvgUX.cjs} +6 -6
- package/dist/{attachmentContent-s1xPha4Q.mjs → attachmentContent-BLyyo1al.mjs} +2 -2
- package/dist/{attachmentContent-GHOk6Muq.cjs → attachmentContent-Bakb0XV3.cjs} +2 -2
- package/dist/{attachmentLimits-D5pgmASK.mjs → attachmentLimits-B8nzhw-i.mjs} +1 -1
- package/dist/{attachmentLimits-DzlBPyJP.cjs → attachmentLimits-eJZ4ZBjF.cjs} +1 -1
- package/dist/{auth-BOaHWquu.mjs → auth-BTfv8yW0.mjs} +8 -8
- package/dist/{auth-BbSdXMQ_.cjs → auth-Cn3dQInF.cjs} +5 -5
- package/dist/{auth-C8V7-oUT.mjs → auth-Cxhx5evk.mjs} +5 -5
- package/dist/{auth-B8EagV6G.cjs → auth-Hpg4Yxfa.cjs} +8 -8
- package/dist/{auto-CWDOX35m.mjs → auto-BAAEVGZa.mjs} +15 -14
- package/dist/{auto-Bw_h0yVc.cjs → auto-CK8irHum.cjs} +15 -14
- package/dist/{bootstrap-BKmsYSwh.mjs → bootstrap-CTNjn_aj.mjs} +2 -2
- package/dist/{bootstrap-DvZjEa9_.cjs → bootstrap-D9SUykG_.cjs} +2 -2
- package/dist/{browser-CBZj-1Wx.cjs → browser-C8ztaIkm.cjs} +1 -1
- package/dist/{browser-CrMAr5fI.mjs → browser-DydXWySF.mjs} +1 -1
- package/dist/{claudeLocal-dhdlcQ6F.mjs → claudeLocal-CdJJovWq.mjs} +5 -5
- package/dist/{claudeLocal-Bpw-u9et.cjs → claudeLocal-CsLFMvFU.cjs} +5 -5
- package/dist/{claudeLocalLauncher-BFfGT4eY.mjs → claudeLocalLauncher-CKazNnl0.mjs} +10 -10
- package/dist/{claudeLocalLauncher-DWFWuLhY.cjs → claudeLocalLauncher-DRc-tET5.cjs} +10 -10
- package/dist/{claudeSessionFork-D9-mANmu.cjs → claudeSessionFork-BWdhyy9B.cjs} +1 -1
- package/dist/{claudeSessionFork-_DUrXaqd.mjs → claudeSessionFork-BfPW9D2S.mjs} +1 -1
- package/dist/{client-CVQJWqjx.cjs → client-BZtKFCJr.cjs} +2 -2
- package/dist/{client-DiBTHWNU.cjs → client-C1GAIJ04.cjs} +3 -3
- package/dist/{client-DwqHDsLb.mjs → client-DkoV3VWl.mjs} +2 -2
- package/dist/{client-Dk7x-s-O.mjs → client-Do5CHQnZ.mjs} +3 -3
- package/dist/codex/happyMcpStdioBridge.cjs +15 -15
- package/dist/codex/happyMcpStdioBridge.mjs +15 -15
- package/dist/{codexAppServerClient-C2ybs2mZ.mjs → codexAppServerClient-CfF33X-8.mjs} +2 -2
- package/dist/{codexAppServerClient-DlKv5TjG.cjs → codexAppServerClient-JddkV_aP.cjs} +2 -2
- package/dist/{codexCommand-4vLE31fj.cjs → codexCommand-Bdj3XZbi.cjs} +43 -40
- package/dist/{codexCommand-DnmFr9Qx.mjs → codexCommand-btJso8yC.mjs} +43 -40
- package/dist/{config-Btd4B05_.cjs → config-DpCNivmg.cjs} +3 -3
- package/dist/{config-CSOG_ZcP.mjs → config-nziuMb7g.mjs} +3 -3
- package/dist/{configuration-A5gW_0GE.mjs → configuration-CiBUH72C.mjs} +1 -1
- package/dist/{configuration-UsI0sxEv.cjs → configuration-PXAE4-FP.cjs} +1 -1
- package/dist/{connect-C9yxp8Om.cjs → connect-D7ehaW2C.cjs} +13 -13
- package/dist/{connect-DWYj8LP_.mjs → connect-XHdi6Vtc.mjs} +13 -13
- package/dist/{context-BXnxalWW.mjs → context-BpEYcuLv.mjs} +1 -1
- package/dist/{context-0FjjA4vJ.cjs → context-DhvXl1oC.cjs} +1 -1
- package/dist/{controlClient-BXktrQ4z.cjs → controlClient-DI-Er-Ww.cjs} +3 -3
- package/dist/{controlClient-CYzHrh3e.mjs → controlClient-DzmCQrY_.mjs} +3 -3
- package/dist/{createSessionMetadata-Dyg33ZlU.mjs → createSessionMetadata-B47GrTX6.mjs} +2 -2
- package/dist/{createSessionMetadata-EX1eAlHx.cjs → createSessionMetadata-D04x6OMW.cjs} +2 -2
- package/dist/{deterministicJson-eha_oMZ2.cjs → deterministicJson-BM8e8QwP.cjs} +9 -9
- package/dist/{deterministicJson-DiR7EOMO.mjs → deterministicJson-CKqT3awl.mjs} +9 -9
- package/dist/{doctor-FuCvKdRa.mjs → doctor-CSgzbG5L.mjs} +6 -6
- package/dist/{doctor-DunLBgVi.cjs → doctor-Cl6cqvok.cjs} +6 -6
- package/dist/{ensureDaemonRunning-B4dZFmUy.cjs → ensureDaemonRunning-CJ4-U32n.cjs} +5 -5
- package/dist/{ensureDaemonRunning-EZkb-CAF.mjs → ensureDaemonRunning-fPVSsjIm.mjs} +5 -5
- package/dist/forkBackfill-8eLDeS73.cjs +66 -0
- package/dist/forkBackfill-DYIjlN1Z.mjs +62 -0
- package/dist/{handleResumeCommand-CsXendKb.mjs → handleResumeCommand-B84dt2aH.mjs} +5 -5
- package/dist/{handleResumeCommand-CKMIw4pE.cjs → handleResumeCommand-bX-aNF_z.cjs} +5 -5
- package/dist/{index-DRhWHEuW.cjs → index-B2UvSWo_.cjs} +3 -3
- package/dist/{index-BOhgL3rh.cjs → index-CP2fh7JX.cjs} +38 -38
- package/dist/{index-9L39wqYR.mjs → index-CRJtZCK-.mjs} +39 -39
- package/dist/{index-CvXcVQ06.mjs → index-CbF87SeZ.mjs} +3 -3
- package/dist/{index-CZWAiydF.cjs → index-DaTxsAC3.cjs} +4 -4
- package/dist/{index-DJ-oV52i.cjs → index-DqlyNgt4.cjs} +6 -1
- package/dist/{index-DK2JpTJf.mjs → index-OEGj3BxE.mjs} +4 -4
- package/dist/{index-BBg9j0XK.mjs → index-vVWpCoTr.mjs} +6 -1
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-B2duVo9a.mjs → install-CurvoW2u.mjs} +3 -3
- package/dist/{install-C8WyZI9K.cjs → install-__Mni4NU.cjs} +3 -3
- package/dist/lib.cjs +17 -17
- package/dist/lib.d.cts +47 -0
- package/dist/lib.d.mts +47 -0
- package/dist/lib.mjs +17 -17
- package/dist/{lidState-CigXWxhe.mjs → lidState-BbR6y9rq.mjs} +66 -2
- package/dist/{lidState-Ds-6ytZV.cjs → lidState-De2HP6nu.cjs} +67 -1
- package/dist/{localHappyAgentAuth-CaCyKzYp.mjs → localHappyAgentAuth-C7rDePjF.mjs} +1 -1
- package/dist/{localHappyAgentAuth-l0Na-5Ys.cjs → localHappyAgentAuth-CboZb3_a.cjs} +1 -1
- package/dist/{logger-CGE4C8ho.mjs → logger-8dtZPn3n.mjs} +2 -2
- package/dist/{logger-7ucWm9wp.cjs → logger-B1k7eZnq.cjs} +2 -2
- package/dist/{machineMetadata-ue1nkowa.mjs → machineMetadata-Bhp_w3-_.mjs} +3 -3
- package/dist/{machineMetadata-lMPtpF16.cjs → machineMetadata-C4OfKn6I.cjs} +3 -3
- package/dist/{main-3fIFXD-t.mjs → main-BQTaUrz0.mjs} +44 -44
- package/dist/{main-CFI0datL.cjs → main-eAiLspBM.cjs} +44 -44
- package/dist/{mcp-DARQBZ7l.mjs → mcp-DXCdbQHM.mjs} +14 -14
- package/dist/{mcp-DfxLAc1G.cjs → mcp-fapbM7Q4.cjs} +14 -14
- package/dist/{package-D1A-8ZJy.cjs → package-CC_txQ31.cjs} +8 -8
- package/dist/{package-DQsvY1XN.mjs → package-tVYgFJoK.mjs} +8 -8
- package/dist/{peerTools-D19hhSQF.mjs → peerTools-C1cduHh1.mjs} +4 -4
- package/dist/{peerTools-DLwNaEEV.cjs → peerTools-CqIcCEIg.cjs} +4 -4
- package/dist/{persistence-Cw8aLoyL.mjs → persistence-C_xFQLsD.mjs} +3 -3
- package/dist/{persistence-i0nQMLlk.cjs → persistence-d3ZyER6o.cjs} +3 -3
- package/dist/{piRunnerArgs-BUyxPxjZ.cjs → piRunnerArgs-DSxolPlV.cjs} +1 -1
- package/dist/{piRunnerArgs-58t454gw.mjs → piRunnerArgs-aq0zJX1Q.mjs} +1 -1
- package/dist/{piRuntime-DVPixFjl.mjs → piRuntime-BnNl5Lmb.mjs} +1 -1
- package/dist/{piRuntime-Dff73XCb.cjs → piRuntime-Dne1LPu-.cjs} +1 -1
- package/dist/{piTerminal-gHWFAyzq.mjs → piTerminal-CKWxWtW-.mjs} +16 -16
- package/dist/{piTerminal-Dz1RrO70.cjs → piTerminal-fjado4cR.cjs} +16 -16
- package/dist/{registerCommonHandlers-CMROPdJz.cjs → registerCommonHandlers-Dausbdsb.cjs} +2 -2
- package/dist/{registerCommonHandlers-Ckv5boQI.mjs → registerCommonHandlers-bSskMveZ.mjs} +2 -2
- package/dist/{registerKillSessionHandler-Cll4-o8Y.mjs → registerKillSessionHandler-Ben5lAsN.mjs} +6 -6
- package/dist/{registerKillSessionHandler-CA9-oelM.cjs → registerKillSessionHandler-CgKyzwqw.cjs} +6 -6
- package/dist/{remoteSessionClient-DX9jHLeW.cjs → remoteSessionClient-BkJt8SHa.cjs} +5 -5
- package/dist/{remoteSessionClient-BMjsbuBh.mjs → remoteSessionClient-DnCIuZpQ.mjs} +5 -5
- package/dist/{run-CjbGo2wb.cjs → run-B8dxbDsg.cjs} +33 -33
- package/dist/{run-CrunzDlt.mjs → run-BEYMVE4J.mjs} +32 -32
- package/dist/{runClaude-KN-4Y4LH.cjs → runClaude-Cy_HzLyO.cjs} +26 -23
- package/dist/{runClaude-WDBWRtnF.mjs → runClaude-Dd_P1c0f.mjs} +26 -23
- package/dist/{runClaudeDeps-QaEx8y5r.mjs → runClaudeDeps-JG7EUH7B.mjs} +441 -49
- package/dist/{runClaudeDeps-DW-8lnHv.cjs → runClaudeDeps-dxv910DR.cjs} +436 -44
- package/dist/{runGemini-Nf6SKBpw.mjs → runGemini-CpaBuvoW.mjs} +34 -34
- package/dist/{runGemini-Djmwjdv1.cjs → runGemini-DY1IDW_f.cjs} +34 -34
- package/dist/{runOpenClaw-CAqP5KFH.cjs → runOpenClaw-C0VARcYj.cjs} +20 -20
- package/dist/{runOpenClaw-9nHtmYbN.mjs → runOpenClaw-C7vrDQbq.mjs} +20 -20
- package/dist/{sandbox-C8Dd8GPM.cjs → sandbox-Bx9-M9rN.cjs} +4 -4
- package/dist/{sandbox-SP0THMt0.mjs → sandbox-DRUJZuaM.mjs} +4 -4
- package/dist/{selfCheck-D9ZXrK7h.cjs → selfCheck-Ba1sECTO.cjs} +34 -34
- package/dist/selfCheck-DdT8r263.mjs +84 -0
- package/dist/{send-DOx9aQsx.mjs → send-BrzkbMy2.mjs} +8 -8
- package/dist/{send-LPk6Q5HI.cjs → send-Dqdpx-w5.cjs} +8 -8
- package/dist/{server-BZNi8Hq_.mjs → server-CPMPoEAA.mjs} +4 -4
- package/dist/{server-CxT8jNyn.cjs → server-CfB8EWCg.cjs} +6 -6
- package/dist/{sessionLock-y9rnA4LK.cjs → sessionLock-BsP3Y_nG.cjs} +2 -2
- package/dist/{sessionLock-CfLqJfeI.mjs → sessionLock-DukLVzAQ.mjs} +2 -2
- package/dist/{sessionModeFile-BKxgNH3P.mjs → sessionModeFile-CSvi4H_t.mjs} +1 -1
- package/dist/{sessionModeFile-B5YeoQJh.cjs → sessionModeFile-JWWF6Nn7.cjs} +1 -1
- package/dist/{sessionOps-CdwVPSZz.mjs → sessionOps-BlMg1uAa.mjs} +5 -5
- package/dist/{sessionOps-GsELm2PZ.cjs → sessionOps-HuoMXcIZ.cjs} +4 -4
- package/dist/{sessionScanner-aLEv7mD3.cjs → sessionScanner-BWU6KvZw.cjs} +3 -3
- package/dist/{sessionScanner-Cdukzo70.mjs → sessionScanner-Ct-JoNHP.mjs} +3 -3
- package/dist/{sessions-Dne-OiRL.mjs → sessions-3Hw1xXMV.mjs} +9 -9
- package/dist/{sessions-CfG4WGN0.cjs → sessions-AjflCj5y.cjs} +9 -9
- package/dist/{setupOfflineReconnection-DiQma2Cc.mjs → setupOfflineReconnection-B_9xp36H.mjs} +2 -2
- package/dist/{setupOfflineReconnection-CFwltTcP.cjs → setupOfflineReconnection-Cxh9Sz9M.cjs} +2 -2
- package/dist/{spawn-DkgP2BGF.mjs → spawn-BXEVKCQK.mjs} +38 -18
- package/dist/{spawn-BI_sdgWs.cjs → spawn-CN8PH11G.cjs} +38 -17
- package/dist/{spawnAgents-Y1LjnCt9.mjs → spawnAgents-Czi2VDzj.mjs} +1 -1
- package/dist/{spawnAgents-iSu1Xzs5.cjs → spawnAgents-McixdtV1.cjs} +1 -1
- package/dist/{spawnHappyCLI-9mx4lPxh.mjs → spawnHappyCLI-BFN0h2fK.mjs} +1 -1
- package/dist/{spawnHappyCLI-BRdx0sAX.cjs → spawnHappyCLI-Cj-9-d_7.cjs} +1 -1
- package/dist/{startFileWatcher-C2HC2_Dg.cjs → startFileWatcher-BfMu444W.cjs} +1 -1
- package/dist/{startFileWatcher-COD5UKNs.mjs → startFileWatcher-Csql7gdv.mjs} +1 -1
- package/dist/{streamRelay-BLgU9X3R.mjs → streamRelay-BzMEEvJU.mjs} +1 -1
- package/dist/{streamRelay-DnObXZZj.cjs → streamRelay-C0AffuX6.cjs} +1 -1
- package/dist/{sync-Dj92ZJ8Y.cjs → sync--uxtLWbo.cjs} +5 -1
- package/dist/{sync-BpLasLu2.mjs → sync-SCvDzRy6.mjs} +5 -1
- package/dist/{systemPrompt-CyEz_IfR.cjs → systemPrompt-C1tRiZ-u.cjs} +2 -2
- package/dist/{systemPrompt-DsQoUgQw.mjs → systemPrompt-D0KMySrK.mjs} +2 -2
- package/dist/{teams-BETNMjpZ.mjs → teams-By-hcvMF.mjs} +6 -6
- package/dist/{teams-Ctx9zXn4.cjs → teams-CYDIFXEC.cjs} +6 -6
- package/dist/{time-CLwVAz6s.cjs → time-C7BplxuS.cjs} +1 -1
- package/dist/{time-CVvxdEDh.mjs → time-CRvAaC5H.mjs} +1 -1
- package/dist/{titleGenerator-B4AW3dLr.mjs → titleGenerator-CUG-n2r3.mjs} +1 -1
- package/dist/{titleGenerator-FDpdizn7.cjs → titleGenerator-Kw3sTnNQ.cjs} +2 -2
- package/dist/{todo-C3tyFeq1.cjs → todo-B7a7J5Ng.cjs} +6 -6
- package/dist/{todo-Jk4Vs7hP.mjs → todo-yuIsUvU8.mjs} +6 -6
- package/dist/{tools-CGxq3I52.cjs → tools-BTBgpiRc.cjs} +2 -2
- package/dist/{tools-O5beDK-s.cjs → tools-D7UeLMZ7.cjs} +1 -1
- package/dist/{tools-_kFe4m_l.mjs → tools-RvMKw7yx.mjs} +1 -1
- package/dist/{tools-BA1qkiV1.mjs → tools-gUjkPpCw.mjs} +2 -2
- package/dist/{uninstall-DHKF90lo.cjs → uninstall-D5D16-KM.cjs} +3 -3
- package/dist/{uninstall-C_mdAZlm.mjs → uninstall-Dx9FmLXs.mjs} +3 -3
- package/package.json +8 -8
- package/dist/selfCheck-7FaZtVu2.mjs +0 -84
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { spawn } from 'node:child_process';
|
|
2
2
|
import { ndJsonStream, ClientSideConnection } from '@agentclientprotocol/sdk';
|
|
3
3
|
import { randomUUID } from 'node:crypto';
|
|
4
|
-
import { l as logger } from './logger-
|
|
5
|
-
import { d as delay } from './time-
|
|
4
|
+
import { l as logger } from './logger-8dtZPn3n.mjs';
|
|
5
|
+
import { d as delay } from './time-CRvAaC5H.mjs';
|
|
6
6
|
import { c as contentLogMetadata, e as errorLogMetadata } from './contentLogMetadata-BlWI0egu.mjs';
|
|
7
|
-
import { p as packageJson } from './package-
|
|
7
|
+
import { p as packageJson } from './package-tVYgFJoK.mjs';
|
|
8
8
|
|
|
9
9
|
function acpImageBlocks(attachments, supportsImages) {
|
|
10
10
|
return attachments.filter((file) => ["image/jpeg", "image/png", "image/gif", "image/webp"].includes(file.mimeType)).map((file) => {
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
var node_child_process = require('node:child_process');
|
|
4
4
|
var sdk = require('@agentclientprotocol/sdk');
|
|
5
5
|
var node_crypto = require('node:crypto');
|
|
6
|
-
var logger = require('./logger-
|
|
7
|
-
var time = require('./time-
|
|
6
|
+
var logger = require('./logger-B1k7eZnq.cjs');
|
|
7
|
+
var time = require('./time-C7BplxuS.cjs');
|
|
8
8
|
var contentLogMetadata = require('./contentLogMetadata-ZSFk_NjQ.cjs');
|
|
9
|
-
var _package = require('./package-
|
|
9
|
+
var _package = require('./package-CC_txQ31.cjs');
|
|
10
10
|
|
|
11
11
|
function acpImageBlocks(attachments, supportsImages) {
|
|
12
12
|
return attachments.filter((file) => ["image/jpeg", "image/png", "image/gif", "image/webp"].includes(file.mimeType)).map((file) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createId } from '@paralleldrive/cuid2';
|
|
2
|
-
import { s as streamKeyOf, e as createEnvelope } from './index-
|
|
2
|
+
import { s as streamKeyOf, e as createEnvelope } from './index-vVWpCoTr.mjs';
|
|
3
3
|
|
|
4
4
|
function turnOptions(turnId, time) {
|
|
5
5
|
return turnId ? { turn: turnId, time } : { time };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
import { homedir } from 'node:os';
|
|
3
|
-
import { readSettings, updateSettings } from './persistence-
|
|
3
|
+
import { readSettings, updateSettings } from './persistence-C_xFQLsD.mjs';
|
|
4
4
|
import 'node:fs';
|
|
5
|
-
import './logger-
|
|
5
|
+
import './logger-8dtZPn3n.mjs';
|
|
6
6
|
import { d as describeAgentHome, p as probeLoginShellEnv, r as resolveAgentHomes, e as expandHomePath, A as AGENT_HOME_ENV_NAMES } from './loginShellEnv-Dw8M7tkI.mjs';
|
|
7
7
|
import 'node:fs/promises';
|
|
8
|
-
import './configuration-
|
|
8
|
+
import './configuration-CiBUH72C.mjs';
|
|
9
9
|
import 'node:path';
|
|
10
|
-
import './package-
|
|
10
|
+
import './package-tVYgFJoK.mjs';
|
|
11
11
|
import 'zod';
|
|
12
12
|
import './authRelay-DSAvg1uv.mjs';
|
|
13
13
|
import 'node:crypto';
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
var chalk = require('chalk');
|
|
4
4
|
var os = require('node:os');
|
|
5
|
-
var persistence = require('./persistence-
|
|
5
|
+
var persistence = require('./persistence-d3ZyER6o.cjs');
|
|
6
6
|
require('node:fs');
|
|
7
|
-
require('./logger-
|
|
7
|
+
require('./logger-B1k7eZnq.cjs');
|
|
8
8
|
var loginShellEnv = require('./loginShellEnv-BkuYtExZ.cjs');
|
|
9
9
|
require('node:fs/promises');
|
|
10
|
-
require('./configuration-
|
|
10
|
+
require('./configuration-PXAE4-FP.cjs');
|
|
11
11
|
require('node:path');
|
|
12
|
-
require('./package-
|
|
12
|
+
require('./package-CC_txQ31.cjs');
|
|
13
13
|
require('zod');
|
|
14
14
|
require('./authRelay-BdYkC1Po.cjs');
|
|
15
15
|
require('node:crypto');
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var axios = require('axios');
|
|
4
|
-
var logger = require('./logger-
|
|
4
|
+
var logger = require('./logger-B1k7eZnq.cjs');
|
|
5
|
+
var lidState = require('./lidState-De2HP6nu.cjs');
|
|
5
6
|
var node_events = require('node:events');
|
|
6
7
|
var socket_ioClient = require('socket.io-client');
|
|
7
|
-
var attachmentLimits = require('./attachmentLimits-
|
|
8
|
+
var attachmentLimits = require('./attachmentLimits-eJZ4ZBjF.cjs');
|
|
8
9
|
var authRelay = require('./authRelay-BdYkC1Po.cjs');
|
|
9
10
|
var limits = require('./limits-C-a7gr04.cjs');
|
|
10
|
-
var time = require('./time-
|
|
11
|
-
var
|
|
12
|
-
var configuration = require('./configuration-UsI0sxEv.cjs');
|
|
11
|
+
var time = require('./time-C7BplxuS.cjs');
|
|
12
|
+
var configuration = require('./configuration-PXAE4-FP.cjs');
|
|
13
13
|
var node_crypto = require('node:crypto');
|
|
14
|
-
var index = require('./index-
|
|
15
|
-
var registerCommonHandlers = require('./registerCommonHandlers-
|
|
14
|
+
var index = require('./index-DqlyNgt4.cjs');
|
|
15
|
+
var registerCommonHandlers = require('./registerCommonHandlers-Dausbdsb.cjs');
|
|
16
16
|
var cuid2 = require('@paralleldrive/cuid2');
|
|
17
|
-
var sync = require('./sync
|
|
17
|
+
var sync = require('./sync--uxtLWbo.cjs');
|
|
18
18
|
var backgroundTaskActivity = require('./backgroundTaskActivity-CBvUdj39.cjs');
|
|
19
|
-
var controlClient = require('./controlClient-
|
|
19
|
+
var controlClient = require('./controlClient-DI-Er-Ww.cjs');
|
|
20
20
|
var contentLogMetadata = require('./contentLogMetadata-ZSFk_NjQ.cjs');
|
|
21
21
|
var chalk = require('chalk');
|
|
22
22
|
|
|
@@ -1137,6 +1137,7 @@ class PromptQueueDrain {
|
|
|
1137
1137
|
}
|
|
1138
1138
|
}
|
|
1139
1139
|
|
|
1140
|
+
const guardOptions = { log: (message) => logger.logger.debug(message) };
|
|
1140
1141
|
class ApiSessionClient extends node_events.EventEmitter {
|
|
1141
1142
|
/**
|
|
1142
1143
|
* B-512: the session socket now connects before the runner has attached its
|
|
@@ -1353,10 +1354,10 @@ class ApiSessionClient extends node_events.EventEmitter {
|
|
|
1353
1354
|
if (!parsed.success || parsed.data.deadline <= Date.now()) return;
|
|
1354
1355
|
void this.startReleaseHandover(parsed.data);
|
|
1355
1356
|
});
|
|
1356
|
-
this.socket
|
|
1357
|
+
lidState.connectGuarded(this.socket, "initial", guardOptions);
|
|
1357
1358
|
}
|
|
1358
1359
|
createControlSocket(handover) {
|
|
1359
|
-
|
|
1360
|
+
const socket = socket_ioClient.io(configuration.configuration.serverUrl, {
|
|
1360
1361
|
auth: {
|
|
1361
1362
|
token: this.token,
|
|
1362
1363
|
clientType: "session-scoped",
|
|
@@ -1371,6 +1372,8 @@ class ApiSessionClient extends node_events.EventEmitter {
|
|
|
1371
1372
|
withCredentials: true,
|
|
1372
1373
|
autoConnect: false
|
|
1373
1374
|
});
|
|
1375
|
+
lidState.socketConnectGuard(socket, guardOptions);
|
|
1376
|
+
return socket;
|
|
1374
1377
|
}
|
|
1375
1378
|
startReleaseHandover(notice) {
|
|
1376
1379
|
if (this.handoverInFlight) return this.handoverInFlight;
|
|
@@ -1397,7 +1400,7 @@ class ApiSessionClient extends node_events.EventEmitter {
|
|
|
1397
1400
|
clearTimeout(timer);
|
|
1398
1401
|
reject(error);
|
|
1399
1402
|
});
|
|
1400
|
-
|
|
1403
|
+
lidState.connectGuarded(candidate, "release-handover", guardOptions);
|
|
1401
1404
|
});
|
|
1402
1405
|
await this.rpcHandlerManager.onSocketConnectAndWait(candidate, timeoutMs);
|
|
1403
1406
|
if (this.socket !== previous) {
|
|
@@ -1703,6 +1706,22 @@ class ApiSessionClient extends node_events.EventEmitter {
|
|
|
1703
1706
|
this.pendingOutbox.splice(0, batch.length);
|
|
1704
1707
|
}
|
|
1705
1708
|
}
|
|
1709
|
+
/**
|
|
1710
|
+
* B-531: resolve once the server has accepted (POST answered, seq assigned)
|
|
1711
|
+
* every message that was in the outbox when this was called. Messages
|
|
1712
|
+
* enqueued later do not extend the wait. Returns false when the client was
|
|
1713
|
+
* closed first — the caller must not treat that as "committed". Retries are
|
|
1714
|
+
* the outbox's own (InvalidateSync backoff), so a server that keeps failing
|
|
1715
|
+
* keeps this pending rather than resolving early.
|
|
1716
|
+
*/
|
|
1717
|
+
async drainOutbox() {
|
|
1718
|
+
const target = new Set(this.pendingOutbox);
|
|
1719
|
+
while (this.pendingOutbox.some((item) => target.has(item))) {
|
|
1720
|
+
if (this.sendSync.stopped) return false;
|
|
1721
|
+
await this.sendSync.invalidateAndAwait();
|
|
1722
|
+
}
|
|
1723
|
+
return true;
|
|
1724
|
+
}
|
|
1706
1725
|
rememberRoutedInbound(localId) {
|
|
1707
1726
|
this.routedInboundLocalIds.add(localId);
|
|
1708
1727
|
if (this.routedInboundLocalIds.size > 2e3) {
|
|
@@ -2181,6 +2200,29 @@ class ApiSessionClient extends node_events.EventEmitter {
|
|
|
2181
2200
|
skipExistingMessages() {
|
|
2182
2201
|
this.skipInitialMessages = true;
|
|
2183
2202
|
}
|
|
2203
|
+
/**
|
|
2204
|
+
* B-544: the newest `limit` session records, decrypted, ascending seq.
|
|
2205
|
+
* Read-only (no routing, no lastSeq change) — rewind reconcile reads the
|
|
2206
|
+
* durable log with it. Undecryptable records come back with `body: null`.
|
|
2207
|
+
*/
|
|
2208
|
+
async readLogTail(limit) {
|
|
2209
|
+
const response = await axios.get(
|
|
2210
|
+
`${configuration.configuration.serverUrl}/v3/sessions/${encodeURIComponent(this.sessionId)}/messages`,
|
|
2211
|
+
{ params: { before_seq: 2147483647, limit }, headers: this.authHeaders(), timeout: 3e4 }
|
|
2212
|
+
);
|
|
2213
|
+
const messages = Array.isArray(response.data.messages) ? [...response.data.messages].reverse() : [];
|
|
2214
|
+
return messages.map((message) => {
|
|
2215
|
+
let body = null;
|
|
2216
|
+
if (message.content?.t === "encrypted") {
|
|
2217
|
+
try {
|
|
2218
|
+
body = authRelay.decrypt(this.encryptionKey, this.encryptionVariant, authRelay.decodeBase64(message.content.c));
|
|
2219
|
+
} catch {
|
|
2220
|
+
body = null;
|
|
2221
|
+
}
|
|
2222
|
+
}
|
|
2223
|
+
return { seq: message.seq, localId: message.localId ?? null, body };
|
|
2224
|
+
});
|
|
2225
|
+
}
|
|
2184
2226
|
updateMetadata(handler) {
|
|
2185
2227
|
this.metadataLock.inLock(async () => {
|
|
2186
2228
|
let rateRefusals = 0;
|
|
@@ -2297,12 +2339,12 @@ class ApiSessionClient extends node_events.EventEmitter {
|
|
|
2297
2339
|
return;
|
|
2298
2340
|
}
|
|
2299
2341
|
logger.logger.debug("[API] Attempting reconnect");
|
|
2300
|
-
this.socket
|
|
2342
|
+
lidState.connectGuarded(this.socket, "reconnect-interval", guardOptions);
|
|
2301
2343
|
}, 3e3);
|
|
2302
2344
|
if (lidState.shouldReconnect()) {
|
|
2303
2345
|
logger.logger.debug("[API] Network up + lid open \u2014 reconnecting in 1s");
|
|
2304
2346
|
setTimeout(() => {
|
|
2305
|
-
|
|
2347
|
+
lidState.connectGuarded(this.socket, "reconnect-soon", guardOptions);
|
|
2306
2348
|
}, 1e3);
|
|
2307
2349
|
}
|
|
2308
2350
|
}
|
|
@@ -3044,7 +3086,7 @@ class ApiClient {
|
|
|
3044
3086
|
return new ApiSessionClient(this.credential.token, session, opts);
|
|
3045
3087
|
}
|
|
3046
3088
|
async machineSyncClient(machine) {
|
|
3047
|
-
const { ApiMachineClient } = await Promise.resolve().then(function () { return require('./apiMachine-
|
|
3089
|
+
const { ApiMachineClient } = await Promise.resolve().then(function () { return require('./apiMachine-q71suojS.cjs'); });
|
|
3048
3090
|
return new ApiMachineClient(this.credential.token, machine);
|
|
3049
3091
|
}
|
|
3050
3092
|
push() {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
|
-
import { l as logger, r as redactLogValue } from './logger-
|
|
2
|
+
import { l as logger, r as redactLogValue } from './logger-8dtZPn3n.mjs';
|
|
3
|
+
import { R as RpcHandlerManager, a as answerSocketRequest, c as connectGuarded, s as socketConnectGuard, d as describeSocketAckDrop, b as safeAck, i as isRateQuotaCode, p as pauseForRateQuota, e as shouldReconnect } from './lidState-BbR6y9rq.mjs';
|
|
3
4
|
import { EventEmitter } from 'node:events';
|
|
4
5
|
import { io } from 'socket.io-client';
|
|
5
|
-
import { A as AsyncLock, a as MAX_CHAT_ATTACHMENT_ENCRYPTED_BYTES, U as UserMessageSchema, F as FileEventMessageSchema } from './attachmentLimits-
|
|
6
|
+
import { A as AsyncLock, a as MAX_CHAT_ATTACHMENT_ENCRYPTED_BYTES, U as UserMessageSchema, F as FileEventMessageSchema } from './attachmentLimits-B8nzhw-i.mjs';
|
|
6
7
|
import { h as decrypt, d as decodeBase64, i as decryptBlob, e as encodeBase64, g as encrypt, l as libsodiumEncryptForPublicKey, j as libsodiumPublicKeyFromSecretKey, k as getRandomBytes } from './authRelay-DSAvg1uv.mjs';
|
|
7
8
|
import { p as prepareClipboardText, d as prepareClipboardHistoryText } from './limits-DIo7rEBR.mjs';
|
|
8
|
-
import { b as backoff, d as delay, e as exponentialBackoffDelay } from './time-
|
|
9
|
-
import {
|
|
10
|
-
import { c as configuration } from './configuration-A5gW_0GE.mjs';
|
|
9
|
+
import { b as backoff, d as delay, e as exponentialBackoffDelay } from './time-CRvAaC5H.mjs';
|
|
10
|
+
import { c as configuration } from './configuration-CiBUH72C.mjs';
|
|
11
11
|
import { createHmac, randomUUID } from 'node:crypto';
|
|
12
|
-
import { e as createEnvelope, s as streamKeyOf, R as ReleaseDrainNoticeSchema, m as RelayAssignmentResponseSchema } from './index-
|
|
13
|
-
import { r as registerCommonHandlers } from './registerCommonHandlers-
|
|
12
|
+
import { e as createEnvelope, s as streamKeyOf, R as ReleaseDrainNoticeSchema, m as RelayAssignmentResponseSchema } from './index-vVWpCoTr.mjs';
|
|
13
|
+
import { r as registerCommonHandlers } from './registerCommonHandlers-bSskMveZ.mjs';
|
|
14
14
|
import { createId } from '@paralleldrive/cuid2';
|
|
15
|
-
import { I as InvalidateSync } from './sync-
|
|
15
|
+
import { I as InvalidateSync } from './sync-SCvDzRy6.mjs';
|
|
16
16
|
import { B as BackgroundTaskReporter } from './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
17
|
-
import { h as notifyDaemonTurnEvent, j as notifyDaemonBackgroundTasks } from './controlClient-
|
|
17
|
+
import { h as notifyDaemonTurnEvent, j as notifyDaemonBackgroundTasks } from './controlClient-DzmCQrY_.mjs';
|
|
18
18
|
import { c as contentLogMetadata } from './contentLogMetadata-BlWI0egu.mjs';
|
|
19
19
|
import chalk from 'chalk';
|
|
20
20
|
|
|
@@ -1135,6 +1135,7 @@ class PromptQueueDrain {
|
|
|
1135
1135
|
}
|
|
1136
1136
|
}
|
|
1137
1137
|
|
|
1138
|
+
const guardOptions = { log: (message) => logger.debug(message) };
|
|
1138
1139
|
class ApiSessionClient extends EventEmitter {
|
|
1139
1140
|
/**
|
|
1140
1141
|
* B-512: the session socket now connects before the runner has attached its
|
|
@@ -1351,10 +1352,10 @@ class ApiSessionClient extends EventEmitter {
|
|
|
1351
1352
|
if (!parsed.success || parsed.data.deadline <= Date.now()) return;
|
|
1352
1353
|
void this.startReleaseHandover(parsed.data);
|
|
1353
1354
|
});
|
|
1354
|
-
this.socket
|
|
1355
|
+
connectGuarded(this.socket, "initial", guardOptions);
|
|
1355
1356
|
}
|
|
1356
1357
|
createControlSocket(handover) {
|
|
1357
|
-
|
|
1358
|
+
const socket = io(configuration.serverUrl, {
|
|
1358
1359
|
auth: {
|
|
1359
1360
|
token: this.token,
|
|
1360
1361
|
clientType: "session-scoped",
|
|
@@ -1369,6 +1370,8 @@ class ApiSessionClient extends EventEmitter {
|
|
|
1369
1370
|
withCredentials: true,
|
|
1370
1371
|
autoConnect: false
|
|
1371
1372
|
});
|
|
1373
|
+
socketConnectGuard(socket, guardOptions);
|
|
1374
|
+
return socket;
|
|
1372
1375
|
}
|
|
1373
1376
|
startReleaseHandover(notice) {
|
|
1374
1377
|
if (this.handoverInFlight) return this.handoverInFlight;
|
|
@@ -1395,7 +1398,7 @@ class ApiSessionClient extends EventEmitter {
|
|
|
1395
1398
|
clearTimeout(timer);
|
|
1396
1399
|
reject(error);
|
|
1397
1400
|
});
|
|
1398
|
-
candidate
|
|
1401
|
+
connectGuarded(candidate, "release-handover", guardOptions);
|
|
1399
1402
|
});
|
|
1400
1403
|
await this.rpcHandlerManager.onSocketConnectAndWait(candidate, timeoutMs);
|
|
1401
1404
|
if (this.socket !== previous) {
|
|
@@ -1701,6 +1704,22 @@ class ApiSessionClient extends EventEmitter {
|
|
|
1701
1704
|
this.pendingOutbox.splice(0, batch.length);
|
|
1702
1705
|
}
|
|
1703
1706
|
}
|
|
1707
|
+
/**
|
|
1708
|
+
* B-531: resolve once the server has accepted (POST answered, seq assigned)
|
|
1709
|
+
* every message that was in the outbox when this was called. Messages
|
|
1710
|
+
* enqueued later do not extend the wait. Returns false when the client was
|
|
1711
|
+
* closed first — the caller must not treat that as "committed". Retries are
|
|
1712
|
+
* the outbox's own (InvalidateSync backoff), so a server that keeps failing
|
|
1713
|
+
* keeps this pending rather than resolving early.
|
|
1714
|
+
*/
|
|
1715
|
+
async drainOutbox() {
|
|
1716
|
+
const target = new Set(this.pendingOutbox);
|
|
1717
|
+
while (this.pendingOutbox.some((item) => target.has(item))) {
|
|
1718
|
+
if (this.sendSync.stopped) return false;
|
|
1719
|
+
await this.sendSync.invalidateAndAwait();
|
|
1720
|
+
}
|
|
1721
|
+
return true;
|
|
1722
|
+
}
|
|
1704
1723
|
rememberRoutedInbound(localId) {
|
|
1705
1724
|
this.routedInboundLocalIds.add(localId);
|
|
1706
1725
|
if (this.routedInboundLocalIds.size > 2e3) {
|
|
@@ -2179,6 +2198,29 @@ class ApiSessionClient extends EventEmitter {
|
|
|
2179
2198
|
skipExistingMessages() {
|
|
2180
2199
|
this.skipInitialMessages = true;
|
|
2181
2200
|
}
|
|
2201
|
+
/**
|
|
2202
|
+
* B-544: the newest `limit` session records, decrypted, ascending seq.
|
|
2203
|
+
* Read-only (no routing, no lastSeq change) — rewind reconcile reads the
|
|
2204
|
+
* durable log with it. Undecryptable records come back with `body: null`.
|
|
2205
|
+
*/
|
|
2206
|
+
async readLogTail(limit) {
|
|
2207
|
+
const response = await axios.get(
|
|
2208
|
+
`${configuration.serverUrl}/v3/sessions/${encodeURIComponent(this.sessionId)}/messages`,
|
|
2209
|
+
{ params: { before_seq: 2147483647, limit }, headers: this.authHeaders(), timeout: 3e4 }
|
|
2210
|
+
);
|
|
2211
|
+
const messages = Array.isArray(response.data.messages) ? [...response.data.messages].reverse() : [];
|
|
2212
|
+
return messages.map((message) => {
|
|
2213
|
+
let body = null;
|
|
2214
|
+
if (message.content?.t === "encrypted") {
|
|
2215
|
+
try {
|
|
2216
|
+
body = decrypt(this.encryptionKey, this.encryptionVariant, decodeBase64(message.content.c));
|
|
2217
|
+
} catch {
|
|
2218
|
+
body = null;
|
|
2219
|
+
}
|
|
2220
|
+
}
|
|
2221
|
+
return { seq: message.seq, localId: message.localId ?? null, body };
|
|
2222
|
+
});
|
|
2223
|
+
}
|
|
2182
2224
|
updateMetadata(handler) {
|
|
2183
2225
|
this.metadataLock.inLock(async () => {
|
|
2184
2226
|
let rateRefusals = 0;
|
|
@@ -2295,12 +2337,12 @@ class ApiSessionClient extends EventEmitter {
|
|
|
2295
2337
|
return;
|
|
2296
2338
|
}
|
|
2297
2339
|
logger.debug("[API] Attempting reconnect");
|
|
2298
|
-
this.socket
|
|
2340
|
+
connectGuarded(this.socket, "reconnect-interval", guardOptions);
|
|
2299
2341
|
}, 3e3);
|
|
2300
2342
|
if (shouldReconnect()) {
|
|
2301
2343
|
logger.debug("[API] Network up + lid open \u2014 reconnecting in 1s");
|
|
2302
2344
|
setTimeout(() => {
|
|
2303
|
-
|
|
2345
|
+
connectGuarded(this.socket, "reconnect-soon", guardOptions);
|
|
2304
2346
|
}, 1e3);
|
|
2305
2347
|
}
|
|
2306
2348
|
}
|
|
@@ -3042,7 +3084,7 @@ class ApiClient {
|
|
|
3042
3084
|
return new ApiSessionClient(this.credential.token, session, opts);
|
|
3043
3085
|
}
|
|
3044
3086
|
async machineSyncClient(machine) {
|
|
3045
|
-
const { ApiMachineClient } = await import('./apiMachine-
|
|
3087
|
+
const { ApiMachineClient } = await import('./apiMachine-s3HiV-SL.mjs');
|
|
3046
3088
|
return new ApiMachineClient(this.credential.token, machine);
|
|
3047
3089
|
}
|
|
3048
3090
|
push() {
|
|
@@ -1,40 +1,41 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var socket_ioClient = require('socket.io-client');
|
|
4
|
-
var logger = require('./logger-
|
|
4
|
+
var logger = require('./logger-B1k7eZnq.cjs');
|
|
5
|
+
var lidState = require('./lidState-De2HP6nu.cjs');
|
|
5
6
|
var mirrorProtocol = require('./mirrorProtocol-BUtmg1ws.cjs');
|
|
6
|
-
var configuration = require('./configuration-
|
|
7
|
+
var configuration = require('./configuration-PXAE4-FP.cjs');
|
|
7
8
|
var cliUpdate = require('./cliUpdate-DsKXPFYp.cjs');
|
|
8
|
-
var registerCommonHandlers = require('./registerCommonHandlers-
|
|
9
|
+
var registerCommonHandlers = require('./registerCommonHandlers-Dausbdsb.cjs');
|
|
9
10
|
var promises = require('node:fs/promises');
|
|
10
11
|
var path = require('node:path');
|
|
11
12
|
var os = require('node:os');
|
|
12
13
|
var node_child_process = require('node:child_process');
|
|
13
|
-
var persistence = require('./persistence-
|
|
14
|
+
var persistence = require('./persistence-d3ZyER6o.cjs');
|
|
14
15
|
var authRelay = require('./authRelay-BdYkC1Po.cjs');
|
|
15
16
|
var limits = require('./limits-C-a7gr04.cjs');
|
|
16
|
-
var time = require('./time-
|
|
17
|
-
var lidState = require('./lidState-Ds-6ytZV.cjs');
|
|
17
|
+
var time = require('./time-C7BplxuS.cjs');
|
|
18
18
|
var pty = require('node-pty');
|
|
19
19
|
var terminals = require('./terminals-B_bfC9c2.cjs');
|
|
20
20
|
var tmuxSocket = require('./tmuxSocket-D-Xt6Vn-.cjs');
|
|
21
|
-
var index = require('./index-
|
|
21
|
+
var index = require('./index-DaTxsAC3.cjs');
|
|
22
22
|
var node_crypto = require('node:crypto');
|
|
23
23
|
var node_fs = require('node:fs');
|
|
24
24
|
var axios = require('axios');
|
|
25
25
|
var ids = require('./ids-B6ZC0HGt.cjs');
|
|
26
26
|
var detectCLI = require('./detectCLI-DR9ZaN6B.cjs');
|
|
27
|
-
var localHappyAgentAuth = require('./localHappyAgentAuth-
|
|
27
|
+
var localHappyAgentAuth = require('./localHappyAgentAuth-CboZb3_a.cjs');
|
|
28
28
|
var path$1 = require('./path-B7zW-WwE.cjs');
|
|
29
29
|
var oneShotPrompts = require('./oneShotPrompts-CL0dip9C.cjs');
|
|
30
|
-
var claudeSessionFork = require('./claudeSessionFork-
|
|
31
|
-
var codexAppServerClient = require('./codexAppServerClient-
|
|
32
|
-
var index$1 = require('./index-
|
|
30
|
+
var claudeSessionFork = require('./claudeSessionFork-BWdhyy9B.cjs');
|
|
31
|
+
var codexAppServerClient = require('./codexAppServerClient-JddkV_aP.cjs');
|
|
32
|
+
var index$1 = require('./index-DqlyNgt4.cjs');
|
|
33
33
|
var codexThreadFork = require('./codexThreadFork-DNekT4nQ.cjs');
|
|
34
34
|
require('chalk');
|
|
35
35
|
require('node:util');
|
|
36
|
-
require('
|
|
36
|
+
require('os');
|
|
37
37
|
require('child_process');
|
|
38
|
+
require('./package-CC_txQ31.cjs');
|
|
38
39
|
require('util');
|
|
39
40
|
require('fs/promises');
|
|
40
41
|
require('crypto');
|
|
@@ -42,7 +43,6 @@ require('path');
|
|
|
42
43
|
require('cross-spawn');
|
|
43
44
|
require('./projectPath-ChLhdOyt.cjs');
|
|
44
45
|
require('url');
|
|
45
|
-
require('os');
|
|
46
46
|
require('zod');
|
|
47
47
|
require('tweetnacl');
|
|
48
48
|
require('./terminalTitleSuggest-DhvRFX3H.cjs');
|
|
@@ -8403,6 +8403,7 @@ async function discoverAndClaimRelay(input) {
|
|
|
8403
8403
|
}
|
|
8404
8404
|
}
|
|
8405
8405
|
|
|
8406
|
+
const guardOptions = { log: (message) => logger.logger.debug(message) };
|
|
8406
8407
|
const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
8407
8408
|
function requireNonEmptyString(value, name) {
|
|
8408
8409
|
if (typeof value !== "string" || value.length === 0) {
|
|
@@ -9245,7 +9246,7 @@ class ApiMachineClient {
|
|
|
9245
9246
|
}
|
|
9246
9247
|
createControlSocket(handover) {
|
|
9247
9248
|
const serverUrl = configuration.configuration.serverUrl.replace(/^http/, "ws");
|
|
9248
|
-
|
|
9249
|
+
const socket = socket_ioClient.io(serverUrl, {
|
|
9249
9250
|
transports: ["websocket"],
|
|
9250
9251
|
auth: {
|
|
9251
9252
|
token: this.token,
|
|
@@ -9259,6 +9260,8 @@ class ApiMachineClient {
|
|
|
9259
9260
|
reconnection: false,
|
|
9260
9261
|
...handover ? { autoConnect: false } : {}
|
|
9261
9262
|
});
|
|
9263
|
+
lidState.socketConnectGuard(socket, guardOptions);
|
|
9264
|
+
return socket;
|
|
9262
9265
|
}
|
|
9263
9266
|
activateControlSocket(socket, rpcAlreadyRegistered = false) {
|
|
9264
9267
|
logger.logger.debug("[API MACHINE] Connected to server");
|
|
@@ -9364,7 +9367,7 @@ class ApiMachineClient {
|
|
|
9364
9367
|
clearTimeout(timer);
|
|
9365
9368
|
reject(error);
|
|
9366
9369
|
});
|
|
9367
|
-
|
|
9370
|
+
lidState.connectGuarded(candidate, "release-handover", guardOptions);
|
|
9368
9371
|
});
|
|
9369
9372
|
await this.rpcHandlerManager.onSocketConnectAndWait(candidate, timeoutMs);
|
|
9370
9373
|
if (this.socket !== previous) {
|
|
@@ -9576,12 +9579,12 @@ class ApiMachineClient {
|
|
|
9576
9579
|
return;
|
|
9577
9580
|
}
|
|
9578
9581
|
logger.logger.debug("[API MACHINE] Attempting reconnect");
|
|
9579
|
-
this.socket
|
|
9582
|
+
lidState.connectGuarded(this.socket, "reconnect-interval", guardOptions);
|
|
9580
9583
|
}, 3e3);
|
|
9581
9584
|
if (lidState.shouldReconnect()) {
|
|
9582
9585
|
logger.logger.debug("[API MACHINE] Network up + lid open \u2014 reconnecting in 1s");
|
|
9583
9586
|
setTimeout(() => {
|
|
9584
|
-
|
|
9587
|
+
lidState.connectGuarded(this.socket, "reconnect-soon", guardOptions);
|
|
9585
9588
|
}, 1e3);
|
|
9586
9589
|
}
|
|
9587
9590
|
}
|
|
@@ -1,38 +1,39 @@
|
|
|
1
1
|
import { io } from 'socket.io-client';
|
|
2
|
-
import { l as logger } from './logger-
|
|
2
|
+
import { l as logger } from './logger-8dtZPn3n.mjs';
|
|
3
|
+
import { R as RpcHandlerManager, i as isRateQuotaCode, p as pauseForRateQuota, s as socketConnectGuard, c as connectGuarded, a as answerSocketRequest, e as shouldReconnect, d as describeSocketAckDrop } from './lidState-BbR6y9rq.mjs';
|
|
3
4
|
import { i as isClaudeSessionId, s as sanitizeTagList, p as pickMirrorForTerminal, l as liveSnapshotChanged, a as sanitizeLiveSnapshot, b as serializeLiveSnapshot, c as summarizeSpawnSessionForLog, d as parseMirrorSendParams } from './mirrorProtocol-BNLtoWjO.mjs';
|
|
4
|
-
import { c as configuration } from './configuration-
|
|
5
|
+
import { c as configuration } from './configuration-CiBUH72C.mjs';
|
|
5
6
|
import { w as withCurrentCliUpdateState } from './cliUpdate-Y34VGe9Y.mjs';
|
|
6
|
-
import { r as registerCommonHandlers } from './registerCommonHandlers-
|
|
7
|
+
import { r as registerCommonHandlers } from './registerCommonHandlers-bSskMveZ.mjs';
|
|
7
8
|
import { stat, readdir, lstat, open, readFile } from 'node:fs/promises';
|
|
8
9
|
import { join, isAbsolute, resolve } from 'node:path';
|
|
9
10
|
import os, { homedir } from 'node:os';
|
|
10
11
|
import { spawn, spawnSync } from 'node:child_process';
|
|
11
|
-
import { readSettings, readPersistedSessions, readTrackedClaudeSessionIds, readTrackedCodexThreadIds } from './persistence-
|
|
12
|
+
import { readSettings, readPersistedSessions, readTrackedClaudeSessionIds, readTrackedCodexThreadIds } from './persistence-C_xFQLsD.mjs';
|
|
12
13
|
import { e as encodeBase64, g as encrypt, h as decrypt, d as decodeBase64 } from './authRelay-DSAvg1uv.mjs';
|
|
13
14
|
import { p as prepareClipboardText, d as prepareClipboardHistoryText } from './limits-DIo7rEBR.mjs';
|
|
14
|
-
import { b as backoff, d as delay } from './time-
|
|
15
|
-
import { R as RpcHandlerManager, i as isRateQuotaCode, p as pauseForRateQuota, a as answerSocketRequest, b as shouldReconnect, d as describeSocketAckDrop } from './lidState-CigXWxhe.mjs';
|
|
15
|
+
import { b as backoff, d as delay } from './time-CRvAaC5H.mjs';
|
|
16
16
|
import * as pty from 'node-pty';
|
|
17
17
|
import { a as attachStartupCommand, v as validateTerminalTags, d as deriveAutoTitle, T as TMUX_SESSION_ID_RE, i as isSafeTmuxSessionName, b as isVhSessionName, U as USER_SESSIONS_FORMAT, p as parseUserSessions, L as LIST_SESSIONS_FORMAT, c as parseSessionListLine, e as LIST_FIELD_SEP, s as sendToVhTerminal } from './terminals-Dlg0x3nY.mjs';
|
|
18
18
|
import { t as tmuxArgs, V as VH_TMUX_SOCKET_ENV, a as scrubTmuxClientEnv } from './tmuxSocket-B8Yx20sT.mjs';
|
|
19
|
-
import { locateClaudeConversation } from './index-
|
|
19
|
+
import { locateClaudeConversation } from './index-OEGj3BxE.mjs';
|
|
20
20
|
import { randomBytes } from 'node:crypto';
|
|
21
21
|
import { existsSync, statSync, writeFileSync, unlinkSync, readFileSync, mkdirSync, accessSync, constants } from 'node:fs';
|
|
22
22
|
import axios from 'axios';
|
|
23
23
|
import { a as isValidTerminalId } from './ids-DU6sLx4C.mjs';
|
|
24
24
|
import { d as detectCLIAvailability } from './detectCLI-CSGMlV51.mjs';
|
|
25
|
-
import { d as detectResumeSupport } from './localHappyAgentAuth-
|
|
25
|
+
import { d as detectResumeSupport } from './localHappyAgentAuth-C7rDePjF.mjs';
|
|
26
26
|
import { g as getProjectPath, a as getClaudeProjectsRoot } from './path-D2wdaNSk.mjs';
|
|
27
27
|
import { i as isVeryHappyOneShotPrompt } from './oneShotPrompts-DT4p6RNd.mjs';
|
|
28
|
-
import { f as forkSession, F as ForkSourceMissingError, d as discardForkedSession, l as listClaudeRewindPoints, a as forkAndTruncateSession, b as ForkTruncateUuidNotFoundError, c as forkBeforeUserMessage } from './claudeSessionFork-
|
|
29
|
-
import { C as CodexAppServerClient } from './codexAppServerClient-
|
|
30
|
-
import { o as RelayCandidatesResponseSchema, m as RelayAssignmentResponseSchema, R as ReleaseDrainNoticeSchema } from './index-
|
|
28
|
+
import { f as forkSession, F as ForkSourceMissingError, d as discardForkedSession, l as listClaudeRewindPoints, a as forkAndTruncateSession, b as ForkTruncateUuidNotFoundError, c as forkBeforeUserMessage } from './claudeSessionFork-BfPW9D2S.mjs';
|
|
29
|
+
import { C as CodexAppServerClient } from './codexAppServerClient-CfF33X-8.mjs';
|
|
30
|
+
import { o as RelayCandidatesResponseSchema, m as RelayAssignmentResponseSchema, R as ReleaseDrainNoticeSchema } from './index-vVWpCoTr.mjs';
|
|
31
31
|
import { f as forkCodexThread, C as CodexForkRewindPointNotFoundError, l as listCodexRewindPoints, a as forkCodexBeforeUserMessage } from './codexThreadFork-R76RU5H0.mjs';
|
|
32
32
|
import 'chalk';
|
|
33
33
|
import 'node:util';
|
|
34
|
-
import '
|
|
34
|
+
import 'os';
|
|
35
35
|
import 'child_process';
|
|
36
|
+
import './package-tVYgFJoK.mjs';
|
|
36
37
|
import 'util';
|
|
37
38
|
import 'fs/promises';
|
|
38
39
|
import 'crypto';
|
|
@@ -40,7 +41,6 @@ import 'path';
|
|
|
40
41
|
import 'cross-spawn';
|
|
41
42
|
import './projectPath-BTBIMB57.mjs';
|
|
42
43
|
import 'url';
|
|
43
|
-
import 'os';
|
|
44
44
|
import 'zod';
|
|
45
45
|
import 'tweetnacl';
|
|
46
46
|
import './terminalTitleSuggest-CeKsX_V6.mjs';
|
|
@@ -8382,6 +8382,7 @@ async function discoverAndClaimRelay(input) {
|
|
|
8382
8382
|
}
|
|
8383
8383
|
}
|
|
8384
8384
|
|
|
8385
|
+
const guardOptions = { log: (message) => logger.debug(message) };
|
|
8385
8386
|
const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
8386
8387
|
function requireNonEmptyString(value, name) {
|
|
8387
8388
|
if (typeof value !== "string" || value.length === 0) {
|
|
@@ -9224,7 +9225,7 @@ class ApiMachineClient {
|
|
|
9224
9225
|
}
|
|
9225
9226
|
createControlSocket(handover) {
|
|
9226
9227
|
const serverUrl = configuration.serverUrl.replace(/^http/, "ws");
|
|
9227
|
-
|
|
9228
|
+
const socket = io(serverUrl, {
|
|
9228
9229
|
transports: ["websocket"],
|
|
9229
9230
|
auth: {
|
|
9230
9231
|
token: this.token,
|
|
@@ -9238,6 +9239,8 @@ class ApiMachineClient {
|
|
|
9238
9239
|
reconnection: false,
|
|
9239
9240
|
...handover ? { autoConnect: false } : {}
|
|
9240
9241
|
});
|
|
9242
|
+
socketConnectGuard(socket, guardOptions);
|
|
9243
|
+
return socket;
|
|
9241
9244
|
}
|
|
9242
9245
|
activateControlSocket(socket, rpcAlreadyRegistered = false) {
|
|
9243
9246
|
logger.debug("[API MACHINE] Connected to server");
|
|
@@ -9343,7 +9346,7 @@ class ApiMachineClient {
|
|
|
9343
9346
|
clearTimeout(timer);
|
|
9344
9347
|
reject(error);
|
|
9345
9348
|
});
|
|
9346
|
-
candidate
|
|
9349
|
+
connectGuarded(candidate, "release-handover", guardOptions);
|
|
9347
9350
|
});
|
|
9348
9351
|
await this.rpcHandlerManager.onSocketConnectAndWait(candidate, timeoutMs);
|
|
9349
9352
|
if (this.socket !== previous) {
|
|
@@ -9555,12 +9558,12 @@ class ApiMachineClient {
|
|
|
9555
9558
|
return;
|
|
9556
9559
|
}
|
|
9557
9560
|
logger.debug("[API MACHINE] Attempting reconnect");
|
|
9558
|
-
this.socket
|
|
9561
|
+
connectGuarded(this.socket, "reconnect-interval", guardOptions);
|
|
9559
9562
|
}, 3e3);
|
|
9560
9563
|
if (shouldReconnect()) {
|
|
9561
9564
|
logger.debug("[API MACHINE] Network up + lid open \u2014 reconnecting in 1s");
|
|
9562
9565
|
setTimeout(() => {
|
|
9563
|
-
|
|
9566
|
+
connectGuarded(this.socket, "reconnect-soon", guardOptions);
|
|
9564
9567
|
}, 1e3);
|
|
9565
9568
|
}
|
|
9566
9569
|
}
|