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
|
@@ -5,7 +5,7 @@ var promises = require('node:fs/promises');
|
|
|
5
5
|
var node_fs = require('node:fs');
|
|
6
6
|
var path = require('node:path');
|
|
7
7
|
var node_readline = require('node:readline');
|
|
8
|
-
var logger = require('./logger-
|
|
8
|
+
var logger = require('./logger-Ca5eRZ2j.cjs');
|
|
9
9
|
|
|
10
10
|
class ForkTruncateUuidNotFoundError extends Error {
|
|
11
11
|
constructor(cutAfterUuid, sourcePath) {
|
|
@@ -205,146 +205,10 @@ async function forkBeforeUserMessage(projectDir, sourceClaudeSessionId, cutBefor
|
|
|
205
205
|
return newId;
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
class CodexForkRewindPointNotFoundError extends Error {
|
|
209
|
-
constructor(itemId, threadId) {
|
|
210
|
-
super(`Codex rewind point ${itemId} not found in thread ${threadId}`);
|
|
211
|
-
this.itemId = itemId;
|
|
212
|
-
this.threadId = threadId;
|
|
213
|
-
this.name = "CodexForkRewindPointNotFoundError";
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
function hasUserAttachments(item) {
|
|
217
|
-
const content = item.content;
|
|
218
|
-
return Array.isArray(content) && content.some((part) => !part || typeof part !== "object" || part.type !== "text" || typeof part.text === "string" && part.text.includes("<attached_files>"));
|
|
219
|
-
}
|
|
220
|
-
function rejectAttachedTarget(thread, itemId) {
|
|
221
|
-
const item = thread.turns?.flatMap((turn) => turn.items ?? []).find((item2) => item2.id === itemId);
|
|
222
|
-
if (item && hasUserAttachments(item)) throw new Error("Cannot edit and rerun a message with attachments");
|
|
223
|
-
}
|
|
224
|
-
function textFromUserItem(item) {
|
|
225
|
-
if (item.type !== "userMessage") {
|
|
226
|
-
return null;
|
|
227
|
-
}
|
|
228
|
-
const content = item.content;
|
|
229
|
-
if (!Array.isArray(content)) {
|
|
230
|
-
return null;
|
|
231
|
-
}
|
|
232
|
-
const textParts = content.filter((part) => Boolean(part) && typeof part === "object" && part.type === "text" && typeof part.text === "string").map((part) => part.text).join("\n").trim();
|
|
233
|
-
return textParts.length > 0 ? textParts : null;
|
|
234
|
-
}
|
|
235
|
-
function timestampFromTurn(turn) {
|
|
236
|
-
const seconds = turn.startedAt ?? turn.completedAt;
|
|
237
|
-
return typeof seconds === "number" && Number.isFinite(seconds) ? seconds * 1e3 : Date.now();
|
|
238
|
-
}
|
|
239
|
-
function listCodexRewindPoints(thread) {
|
|
240
|
-
const points = [];
|
|
241
|
-
for (const turn of thread.turns ?? []) {
|
|
242
|
-
for (const item of turn.items ?? []) {
|
|
243
|
-
const text = textFromUserItem(item);
|
|
244
|
-
if (!text) {
|
|
245
|
-
continue;
|
|
246
|
-
}
|
|
247
|
-
points.push({
|
|
248
|
-
itemId: item.id,
|
|
249
|
-
text,
|
|
250
|
-
...hasUserAttachments(item) ? { hasAttachments: true } : {},
|
|
251
|
-
timestamp: timestampFromTurn(turn)
|
|
252
|
-
});
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
return points;
|
|
256
|
-
}
|
|
257
|
-
function findCutTurn(thread, itemId) {
|
|
258
|
-
const turns = thread.turns ?? [];
|
|
259
|
-
for (let index = 0; index < turns.length; index++) {
|
|
260
|
-
const turn = turns[index];
|
|
261
|
-
const item = (turn.items ?? []).find((candidate) => candidate.id === itemId);
|
|
262
|
-
if (!item) {
|
|
263
|
-
continue;
|
|
264
|
-
}
|
|
265
|
-
const text = textFromUserItem(item);
|
|
266
|
-
if (text) {
|
|
267
|
-
return { index, text };
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
return null;
|
|
271
|
-
}
|
|
272
|
-
async function forkCodexThread(client, opts) {
|
|
273
|
-
const forked = await client.forkThread({
|
|
274
|
-
threadId: opts.threadId,
|
|
275
|
-
...opts.cwd ? { cwd: opts.cwd } : {},
|
|
276
|
-
...opts.model ? { model: opts.model } : {},
|
|
277
|
-
...opts.approvalPolicy ? { approvalPolicy: opts.approvalPolicy } : {},
|
|
278
|
-
...opts.sandbox ? { sandbox: opts.sandbox } : {},
|
|
279
|
-
...opts.mcpServers ? { mcpServers: opts.mcpServers } : {}
|
|
280
|
-
});
|
|
281
|
-
if (opts.cutAfterItemId) {
|
|
282
|
-
const cutTurn = findCutTurn(forked.thread, opts.cutAfterItemId);
|
|
283
|
-
if (!cutTurn) {
|
|
284
|
-
throw new CodexForkRewindPointNotFoundError(opts.cutAfterItemId, opts.threadId);
|
|
285
|
-
}
|
|
286
|
-
const turns = forked.thread.turns ?? [];
|
|
287
|
-
const turnsToDrop = turns.length - cutTurn.index;
|
|
288
|
-
if (turnsToDrop > 0) {
|
|
289
|
-
await client.rollbackThread({
|
|
290
|
-
threadId: forked.threadId,
|
|
291
|
-
numTurns: turnsToDrop
|
|
292
|
-
});
|
|
293
|
-
}
|
|
294
|
-
await client.injectItems({
|
|
295
|
-
threadId: forked.threadId,
|
|
296
|
-
items: [{
|
|
297
|
-
type: "message",
|
|
298
|
-
role: "user",
|
|
299
|
-
content: [{ type: "input_text", text: cutTurn.text }]
|
|
300
|
-
}]
|
|
301
|
-
});
|
|
302
|
-
}
|
|
303
|
-
return {
|
|
304
|
-
type: "success",
|
|
305
|
-
newCodexThreadId: forked.threadId
|
|
306
|
-
};
|
|
307
|
-
}
|
|
308
|
-
async function forkCodexBeforeUserMessage(client, opts) {
|
|
309
|
-
const { thread: source } = await client.readThread({ threadId: opts.threadId, includeTurns: true });
|
|
310
|
-
rejectAttachedTarget(source, opts.cutBeforeItemId);
|
|
311
|
-
const sourceCut = findCutTurn(source, opts.cutBeforeItemId);
|
|
312
|
-
if (!sourceCut) throw new CodexForkRewindPointNotFoundError(opts.cutBeforeItemId, opts.threadId);
|
|
313
|
-
if ((source.turns?.[sourceCut.index].items ?? []).findIndex((item) => item.id === opts.cutBeforeItemId) !== 0) {
|
|
314
|
-
throw new Error("Cannot safely rewind a user message inside an existing turn");
|
|
315
|
-
}
|
|
316
|
-
if (sourceCut.index === 0) return { type: "success", startFresh: true };
|
|
317
|
-
const forked = await client.forkThread({ threadId: opts.threadId, cwd: opts.cwd });
|
|
318
|
-
if (forked.threadId === opts.threadId) throw new Error("Codex did not create an independent fork");
|
|
319
|
-
rejectAttachedTarget(forked.thread, opts.cutBeforeItemId);
|
|
320
|
-
const cut = findCutTurn(forked.thread, opts.cutBeforeItemId);
|
|
321
|
-
if (!cut) throw new CodexForkRewindPointNotFoundError(opts.cutBeforeItemId, opts.threadId);
|
|
322
|
-
const turns = forked.thread.turns ?? [];
|
|
323
|
-
const items = turns[cut.index].items ?? [];
|
|
324
|
-
if (items.findIndex((item) => item.id === opts.cutBeforeItemId) !== 0) {
|
|
325
|
-
throw new Error("Cannot safely rewind a user message inside an existing turn");
|
|
326
|
-
}
|
|
327
|
-
if (cut.index === 0) return { type: "success", startFresh: true };
|
|
328
|
-
const expectedTurnIds = turns.slice(0, cut.index).map((turn) => turn.id);
|
|
329
|
-
const { thread } = await client.rollbackThread({
|
|
330
|
-
threadId: forked.threadId,
|
|
331
|
-
numTurns: turns.length - cut.index
|
|
332
|
-
});
|
|
333
|
-
const remaining = thread.turns ?? [];
|
|
334
|
-
if (remaining.length !== cut.index || remaining.some((turn, index) => turn.id !== expectedTurnIds[index])) {
|
|
335
|
-
throw new Error("Codex rollback did not preserve the expected history");
|
|
336
|
-
}
|
|
337
|
-
return { type: "success", newCodexThreadId: forked.threadId };
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
exports.CodexForkRewindPointNotFoundError = CodexForkRewindPointNotFoundError;
|
|
341
208
|
exports.ForkSourceMissingError = ForkSourceMissingError;
|
|
342
209
|
exports.ForkTruncateUuidNotFoundError = ForkTruncateUuidNotFoundError;
|
|
343
210
|
exports.discardForkedSession = discardForkedSession;
|
|
344
211
|
exports.forkAndTruncateSession = forkAndTruncateSession;
|
|
345
212
|
exports.forkBeforeUserMessage = forkBeforeUserMessage;
|
|
346
|
-
exports.forkCodexBeforeUserMessage = forkCodexBeforeUserMessage;
|
|
347
|
-
exports.forkCodexThread = forkCodexThread;
|
|
348
213
|
exports.forkSession = forkSession;
|
|
349
214
|
exports.listClaudeRewindPoints = listClaudeRewindPoints;
|
|
350
|
-
exports.listCodexRewindPoints = listCodexRewindPoints;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
|
-
import { c as configuration } from './configuration-
|
|
3
|
-
import { readSettings, readPersistedSessions, readCredentialsForConfiguredRelay } from './persistence-
|
|
4
|
-
import { r as readTeamScope, t as teamScopePath, w as writeTeamScope } from './context-
|
|
2
|
+
import { c as configuration } from './configuration-B0c-OP_h.mjs';
|
|
3
|
+
import { readSettings, readPersistedSessions, readCredentialsForConfiguredRelay } from './persistence-DgBhXxu7.mjs';
|
|
4
|
+
import { r as readTeamScope, t as teamScopePath, w as writeTeamScope } from './context-mMg17HJv.mjs';
|
|
5
5
|
|
|
6
6
|
async function teamRequest(path, method, token, scoped, body) {
|
|
7
7
|
const response = await fetch(`${configuration.serverUrl}${path}`, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var configuration = require('./configuration-
|
|
4
|
-
var persistence = require('./persistence-
|
|
3
|
+
var configuration = require('./configuration-CepfrPZ_.cjs');
|
|
4
|
+
var persistence = require('./persistence-Ceb-BPk6.cjs');
|
|
5
5
|
|
|
6
6
|
class AutomationsRequestError extends Error {
|
|
7
7
|
constructor(status, code, runStatus) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var node_crypto = require('node:crypto');
|
|
4
|
-
var configuration = require('./configuration-
|
|
5
|
-
var persistence = require('./persistence-
|
|
6
|
-
var context = require('./context-
|
|
4
|
+
var configuration = require('./configuration-CepfrPZ_.cjs');
|
|
5
|
+
var persistence = require('./persistence-Ceb-BPk6.cjs');
|
|
6
|
+
var context = require('./context-BhZMRQho.cjs');
|
|
7
7
|
|
|
8
8
|
async function teamRequest(path, method, token, scoped, body) {
|
|
9
9
|
const response = await fetch(`${configuration.configuration.serverUrl}${path}`, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as configuration } from './configuration-
|
|
2
|
-
import { readCredentialsForConfiguredRelay, readSettings } from './persistence-
|
|
1
|
+
import { c as configuration } from './configuration-B0c-OP_h.mjs';
|
|
2
|
+
import { readCredentialsForConfiguredRelay, readSettings } from './persistence-DgBhXxu7.mjs';
|
|
3
3
|
|
|
4
4
|
class AutomationsRequestError extends Error {
|
|
5
5
|
constructor(status, code, runStatus) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var tools = require('../tools-
|
|
4
|
-
var tools$1 = require('../tools-
|
|
5
|
-
var peerTools = require('../peerTools-
|
|
3
|
+
var tools = require('../tools-xQ38ufgo.cjs');
|
|
4
|
+
var tools$1 = require('../tools-GnqHEZHb.cjs');
|
|
5
|
+
var peerTools = require('../peerTools-CADjnFDx.cjs');
|
|
6
6
|
var mcp_js = require('@modelcontextprotocol/sdk/server/mcp.js');
|
|
7
7
|
var stdio_js = require('@modelcontextprotocol/sdk/server/stdio.js');
|
|
8
8
|
var index_js = require('@modelcontextprotocol/sdk/client/index.js');
|
|
@@ -10,32 +10,32 @@ var streamableHttp_js = require('@modelcontextprotocol/sdk/client/streamableHttp
|
|
|
10
10
|
var z = require('zod');
|
|
11
11
|
var limits = require('../limits-C-a7gr04.cjs');
|
|
12
12
|
var agentGuidance = require('../agentGuidance-B5NATuFa.cjs');
|
|
13
|
-
require('../client-
|
|
13
|
+
require('../client-CXvsRLAz.cjs');
|
|
14
14
|
require('node:crypto');
|
|
15
|
-
require('../configuration-
|
|
15
|
+
require('../configuration-CepfrPZ_.cjs');
|
|
16
16
|
require('node:fs');
|
|
17
17
|
require('node:os');
|
|
18
18
|
require('node:path');
|
|
19
|
-
require('../package-
|
|
19
|
+
require('../package-BfnmIH4b.cjs');
|
|
20
20
|
require('node:fs/promises');
|
|
21
|
-
require('../persistence-
|
|
21
|
+
require('../persistence-Ceb-BPk6.cjs');
|
|
22
22
|
require('../authRelay-BdYkC1Po.cjs');
|
|
23
23
|
require('tweetnacl');
|
|
24
|
-
require('../logger-
|
|
24
|
+
require('../logger-Ca5eRZ2j.cjs');
|
|
25
25
|
require('chalk');
|
|
26
26
|
require('node:util');
|
|
27
|
-
require('../context-
|
|
28
|
-
require('../index-
|
|
27
|
+
require('../context-BhZMRQho.cjs');
|
|
28
|
+
require('../index-DJ-oV52i.cjs');
|
|
29
29
|
require('@paralleldrive/cuid2');
|
|
30
|
-
require('../client-
|
|
30
|
+
require('../client-CQzHoynf.cjs');
|
|
31
31
|
require('../ids-B6ZC0HGt.cjs');
|
|
32
|
-
require('../controlClient-
|
|
33
|
-
require('../sessionOps-
|
|
32
|
+
require('../controlClient-HPMsyxLb.cjs');
|
|
33
|
+
require('../sessionOps-DWsGWwfZ.cjs');
|
|
34
34
|
require('axios');
|
|
35
|
-
require('../time-
|
|
35
|
+
require('../time-xNkWLTSj.cjs');
|
|
36
36
|
require('socket.io-client');
|
|
37
37
|
require('../backgroundTaskActivity-CBvUdj39.cjs');
|
|
38
|
-
require('../remoteSessionClient-
|
|
38
|
+
require('../remoteSessionClient-DbnVs1Tv.cjs');
|
|
39
39
|
require('../trimIdent-4gvk9Wk6.cjs');
|
|
40
40
|
|
|
41
41
|
function parseArgs(argv) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerTeamsTools } from '../tools-
|
|
2
|
-
import { r as registerAutomationTools } from '../tools-
|
|
3
|
-
import { r as registerSessionPeerTools } from '../peerTools-
|
|
1
|
+
import { r as registerTeamsTools } from '../tools-sPgOmLr_.mjs';
|
|
2
|
+
import { r as registerAutomationTools } from '../tools-BSzD246o.mjs';
|
|
3
|
+
import { r as registerSessionPeerTools } from '../peerTools-C1cELmtZ.mjs';
|
|
4
4
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
5
5
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
6
6
|
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
@@ -8,32 +8,32 @@ import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/
|
|
|
8
8
|
import { z } from 'zod';
|
|
9
9
|
import { C as CLIPBOARD_TOOL_NAME, a as CLIPBOARD_TOOL_TITLE, b as CLIPBOARD_TOOL_DESCRIPTION } from '../limits-DIo7rEBR.mjs';
|
|
10
10
|
import { P as PREVIEW_TOOL_NAME, a as PREVIEW_TOOL_TITLE, b as PREVIEW_TOOL_DESCRIPTION } from '../agentGuidance-CQuNlNx8.mjs';
|
|
11
|
-
import '../client-
|
|
11
|
+
import '../client-BbNFS1WW.mjs';
|
|
12
12
|
import 'node:crypto';
|
|
13
|
-
import '../configuration-
|
|
13
|
+
import '../configuration-B0c-OP_h.mjs';
|
|
14
14
|
import 'node:fs';
|
|
15
15
|
import 'node:os';
|
|
16
16
|
import 'node:path';
|
|
17
|
-
import '../package-
|
|
17
|
+
import '../package-D-W_r_pd.mjs';
|
|
18
18
|
import 'node:fs/promises';
|
|
19
|
-
import '../persistence-
|
|
19
|
+
import '../persistence-DgBhXxu7.mjs';
|
|
20
20
|
import '../authRelay-DSAvg1uv.mjs';
|
|
21
21
|
import 'tweetnacl';
|
|
22
|
-
import '../logger-
|
|
22
|
+
import '../logger-BIzr7JN0.mjs';
|
|
23
23
|
import 'chalk';
|
|
24
24
|
import 'node:util';
|
|
25
|
-
import '../context-
|
|
26
|
-
import '../index-
|
|
25
|
+
import '../context-mMg17HJv.mjs';
|
|
26
|
+
import '../index-BBg9j0XK.mjs';
|
|
27
27
|
import '@paralleldrive/cuid2';
|
|
28
|
-
import '../client-
|
|
28
|
+
import '../client-CyUhxs-0.mjs';
|
|
29
29
|
import '../ids-DU6sLx4C.mjs';
|
|
30
|
-
import '../controlClient-
|
|
31
|
-
import '../sessionOps-
|
|
30
|
+
import '../controlClient-BKmjlbGs.mjs';
|
|
31
|
+
import '../sessionOps-DJSwzwP-.mjs';
|
|
32
32
|
import 'axios';
|
|
33
|
-
import '../time-
|
|
33
|
+
import '../time-TxDyvAKk.mjs';
|
|
34
34
|
import 'socket.io-client';
|
|
35
35
|
import '../backgroundTaskActivity-8PdPxrvy.mjs';
|
|
36
|
-
import '../remoteSessionClient-
|
|
36
|
+
import '../remoteSessionClient-N7JsQ0XS.mjs';
|
|
37
37
|
import '../trimIdent-BAjmv_TG.mjs';
|
|
38
38
|
|
|
39
39
|
function parseArgs(argv) {
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
var node_child_process = require('node:child_process');
|
|
4
4
|
var spawn = require('cross-spawn');
|
|
5
5
|
var node_readline = require('node:readline');
|
|
6
|
-
var logger = require('./logger-
|
|
6
|
+
var logger = require('./logger-Ca5eRZ2j.cjs');
|
|
7
7
|
var contentLogMetadata = require('./contentLogMetadata-ZSFk_NjQ.cjs');
|
|
8
8
|
var manager = require('./manager-Cly8xVIR.cjs');
|
|
9
|
-
var _package = require('./package-
|
|
9
|
+
var _package = require('./package-BfnmIH4b.cjs');
|
|
10
10
|
|
|
11
11
|
function isAppServerAvailable() {
|
|
12
12
|
try {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { execSync } from 'node:child_process';
|
|
2
2
|
import { spawn } from 'cross-spawn';
|
|
3
3
|
import { createInterface } from 'node:readline';
|
|
4
|
-
import { l as logger } from './logger-
|
|
4
|
+
import { l as logger } from './logger-BIzr7JN0.mjs';
|
|
5
5
|
import { c as contentLogMetadata, e as errorLogMetadata } from './contentLogMetadata-BlWI0egu.mjs';
|
|
6
6
|
import { i as initializeSandbox, w as wrapForMcpTransport } from './manager-BQ4flvQZ.mjs';
|
|
7
|
-
import { p as packageJson } from './package-
|
|
7
|
+
import { p as packageJson } from './package-D-W_r_pd.mjs';
|
|
8
8
|
|
|
9
9
|
function isAppServerAvailable() {
|
|
10
10
|
try {
|
|
@@ -1,58 +1,59 @@
|
|
|
1
|
-
import { a as authAndSetupMachineIfNeeded } from './auth-
|
|
2
|
-
import { e as createEnvelope, l as BUILTIN_TODO_DISCOVERY, P as PROMPT_QUEUE_CAPABILITY } from './index-
|
|
1
|
+
import { a as authAndSetupMachineIfNeeded } from './auth-CRm8yNv6.mjs';
|
|
2
|
+
import { e as createEnvelope, l as BUILTIN_TODO_DISCOVERY, P as PROMPT_QUEUE_CAPABILITY } from './index-BBg9j0XK.mjs';
|
|
3
|
+
import { p as publishForkBackfillWhenCommitted, F as FORK_BACKFILL_CAPABILITY } from './forkBackfill-DYIjlN1Z.mjs';
|
|
3
4
|
import { randomUUID } from 'node:crypto';
|
|
4
5
|
import { createId } from '@paralleldrive/cuid2';
|
|
5
6
|
import { r as registerAgentAttachmentDownloads } from './agentAttachments-M_B5qEF2.mjs';
|
|
6
|
-
import { C as CLAUDE_ATTACHMENT_KINDS, a as stageClaudeAttachments, b as appendStagedAttachmentsToPrompt } from './attachmentContent-
|
|
7
|
+
import { C as CLAUDE_ATTACHMENT_KINDS, a as stageClaudeAttachments, b as appendStagedAttachmentsToPrompt } from './attachmentContent-CCE0Y3gR.mjs';
|
|
7
8
|
import { useStdout, useInput, Box, Text, render } from 'ink';
|
|
8
|
-
import { c as claimSessionOrExit, a as applyServerSnapshot, w as withoutServerSnapshot, m as mergeReconnectMetadata } from './sessionLock-
|
|
9
|
+
import { c as claimSessionOrExit, a as applyServerSnapshot, w as withoutServerSnapshot, m as mergeReconnectMetadata } from './sessionLock-Dab6_dCd.mjs';
|
|
9
10
|
import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
10
|
-
import { c as connectionState, A as ApiClient } from './api-
|
|
11
|
-
import { C as CodexAppServerClient } from './codexAppServerClient-
|
|
12
|
-
import { l as logger } from './logger-
|
|
13
|
-
import { B as BasePermissionHandler } from './BasePermissionHandler-
|
|
14
|
-
import { B as BaseReasoningProcessor } from './BaseReasoningProcessor-
|
|
11
|
+
import { c as connectionState, A as ApiClient } from './api-D5kfP3JF.mjs';
|
|
12
|
+
import { C as CodexAppServerClient } from './codexAppServerClient-Dto99RVH.mjs';
|
|
13
|
+
import { l as logger } from './logger-BIzr7JN0.mjs';
|
|
14
|
+
import { B as BasePermissionHandler } from './BasePermissionHandler-Ng5h8JpY.mjs';
|
|
15
|
+
import { B as BaseReasoningProcessor } from './BaseReasoningProcessor-CM-ijU4F.mjs';
|
|
15
16
|
import { execSync } from 'node:child_process';
|
|
16
|
-
import { readSettings } from './persistence-
|
|
17
|
-
import { g as getInitialMachineMetadata } from './machineMetadata-
|
|
18
|
-
import { c as configuration } from './configuration-
|
|
19
|
-
import { M as MessageQueue2, r as registerKillSessionHandler } from './registerKillSessionHandler-
|
|
17
|
+
import { readSettings } from './persistence-DgBhXxu7.mjs';
|
|
18
|
+
import { g as getInitialMachineMetadata } from './machineMetadata-DakW9c61.mjs';
|
|
19
|
+
import { c as configuration } from './configuration-B0c-OP_h.mjs';
|
|
20
|
+
import { M as MessageQueue2, r as registerKillSessionHandler } from './registerKillSessionHandler-BS5afGeA.mjs';
|
|
20
21
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
21
22
|
import { join } from 'node:path';
|
|
22
|
-
import { c as createSessionMetadata } from './createSessionMetadata-
|
|
23
|
-
import { h as hashObject, s as startHappyServer } from './deterministicJson-
|
|
23
|
+
import { c as createSessionMetadata } from './createSessionMetadata-KOL67aSN.mjs';
|
|
24
|
+
import { h as hashObject, s as startHappyServer } from './deterministicJson-CaWami7M.mjs';
|
|
24
25
|
import { M as MessageBuffer } from './messageBuffer-BWlGgR3A.mjs';
|
|
25
|
-
import { n as notifyDaemonSessionStarted, g as reportSessionEditToDaemon } from './controlClient-
|
|
26
|
+
import { n as notifyDaemonSessionStarted, g as reportSessionEditToDaemon } from './controlClient-BKmjlbGs.mjs';
|
|
26
27
|
import { d as decodeBase64, e as encodeBase64 } from './authRelay-DSAvg1uv.mjs';
|
|
27
|
-
import { s as setupOfflineReconnection } from './setupOfflineReconnection-
|
|
28
|
+
import { s as setupOfflineReconnection } from './setupOfflineReconnection-rd1PCWiN.mjs';
|
|
28
29
|
import { t as trimIdent } from './trimIdent-BAjmv_TG.mjs';
|
|
29
30
|
import { p as parseSpecialCommand } from './specialCommands-BSqhYg5X.mjs';
|
|
30
31
|
import { C as CHANGE_TITLE_INSTRUCTION } from './constants-BC4St0xd.mjs';
|
|
31
32
|
import { a as DEFAULT_CODEX_PERMISSION_MODE } from './defaultPermissionMode-BnxJPVHT.mjs';
|
|
32
33
|
import { E as EditReportThrottle, a as extractCodexPatchPaths } from './editPaths-BVfS_FFL.mjs';
|
|
33
|
-
import { a as extractNoSandboxFlag, e as ensureDaemonRunning } from './ensureDaemonRunning-
|
|
34
|
+
import { a as extractNoSandboxFlag, e as ensureDaemonRunning } from './ensureDaemonRunning-CnWMrL5b.mjs';
|
|
34
35
|
import 'tweetnacl';
|
|
35
36
|
import 'axios';
|
|
36
|
-
import './time-
|
|
37
|
-
import './browser-
|
|
37
|
+
import './time-TxDyvAKk.mjs';
|
|
38
|
+
import './browser-DU9kI-Q-.mjs';
|
|
38
39
|
import 'open';
|
|
39
40
|
import 'zod';
|
|
40
41
|
import 'node:fs/promises';
|
|
41
|
-
import './attachmentLimits-
|
|
42
|
+
import './attachmentLimits-D5pgmASK.mjs';
|
|
42
43
|
import 'node:fs';
|
|
43
44
|
import 'node:events';
|
|
44
45
|
import 'socket.io-client';
|
|
45
46
|
import './limits-DIo7rEBR.mjs';
|
|
46
|
-
import './lidState-
|
|
47
|
+
import './lidState-X7iQg4y5.mjs';
|
|
47
48
|
import 'os';
|
|
48
49
|
import 'child_process';
|
|
49
|
-
import './registerCommonHandlers-
|
|
50
|
+
import './registerCommonHandlers-t15dS7xt.mjs';
|
|
50
51
|
import 'util';
|
|
51
52
|
import 'fs/promises';
|
|
52
53
|
import 'crypto';
|
|
53
54
|
import 'path';
|
|
54
55
|
import 'cross-spawn';
|
|
55
|
-
import './sync-
|
|
56
|
+
import './sync-DnmsgL3w.mjs';
|
|
56
57
|
import './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
57
58
|
import './contentLogMetadata-BlWI0egu.mjs';
|
|
58
59
|
import 'chalk';
|
|
@@ -60,34 +61,34 @@ import 'node:readline';
|
|
|
60
61
|
import './manager-BQ4flvQZ.mjs';
|
|
61
62
|
import '@anthropic-ai/sandbox-runtime';
|
|
62
63
|
import 'node:os';
|
|
63
|
-
import './package-
|
|
64
|
+
import './package-D-W_r_pd.mjs';
|
|
64
65
|
import 'node:util';
|
|
65
66
|
import './detectCLI-CSGMlV51.mjs';
|
|
66
67
|
import 'fs';
|
|
67
|
-
import './localHappyAgentAuth-
|
|
68
|
+
import './localHappyAgentAuth-r83bTscW.mjs';
|
|
68
69
|
import './types-CkqAACXx.mjs';
|
|
69
70
|
import 'url';
|
|
70
|
-
import './client-
|
|
71
|
-
import './context-
|
|
72
|
-
import './sessionOps-
|
|
71
|
+
import './client-BbNFS1WW.mjs';
|
|
72
|
+
import './context-mMg17HJv.mjs';
|
|
73
|
+
import './sessionOps-DJSwzwP-.mjs';
|
|
73
74
|
import './resources-BdFBQi8r.mjs';
|
|
74
|
-
import './tools-
|
|
75
|
-
import './tools-
|
|
76
|
-
import './client-
|
|
77
|
-
import './peerTools-
|
|
75
|
+
import './tools-sPgOmLr_.mjs';
|
|
76
|
+
import './tools-BSzD246o.mjs';
|
|
77
|
+
import './client-CyUhxs-0.mjs';
|
|
78
|
+
import './peerTools-C1cELmtZ.mjs';
|
|
78
79
|
import './ids-DU6sLx4C.mjs';
|
|
79
|
-
import './remoteSessionClient-
|
|
80
|
+
import './remoteSessionClient-N7JsQ0XS.mjs';
|
|
80
81
|
import '@modelcontextprotocol/sdk/server/mcp.js';
|
|
81
82
|
import 'node:http';
|
|
82
83
|
import '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
83
|
-
import './assistantTools-
|
|
84
|
+
import './assistantTools-BvKH9eRc.mjs';
|
|
84
85
|
import './terminals-Dlg0x3nY.mjs';
|
|
85
86
|
import './terminalTitleSuggest-CeKsX_V6.mjs';
|
|
86
87
|
import './tmuxSocket-B8Yx20sT.mjs';
|
|
87
|
-
import './bootstrap-
|
|
88
|
+
import './bootstrap-DSWZAtGy.mjs';
|
|
88
89
|
import './agentGuidance-CQuNlNx8.mjs';
|
|
89
90
|
import './previewPath-CXN4Vag0.mjs';
|
|
90
|
-
import './spawnHappyCLI-
|
|
91
|
+
import './spawnHappyCLI-wowHF2IL.mjs';
|
|
91
92
|
import './doctorReadiness-C208SMN9.mjs';
|
|
92
93
|
|
|
93
94
|
function getStartedSubagents(state) {
|
|
@@ -1051,10 +1052,10 @@ async function importCodexThread(opts) {
|
|
|
1051
1052
|
});
|
|
1052
1053
|
} catch (error) {
|
|
1053
1054
|
const reason = error instanceof Error ? error.message : String(error);
|
|
1054
|
-
throw
|
|
1055
|
+
throw failVisibly(opts.session, `Failed to import Codex thread ${opts.threadId}: ${reason}`);
|
|
1055
1056
|
}
|
|
1056
1057
|
if (!forked.threadId || forked.threadId === opts.threadId) {
|
|
1057
|
-
throw
|
|
1058
|
+
throw failVisibly(opts.session, `Failed to import Codex thread ${opts.threadId}: Codex did not create an independent copy`);
|
|
1058
1059
|
}
|
|
1059
1060
|
opts.session.updateMetadata((currentMetadata) => ({
|
|
1060
1061
|
...currentMetadata,
|
|
@@ -1072,10 +1073,15 @@ async function importCodexThread(opts) {
|
|
|
1072
1073
|
opts.messageBuffer.addMessage(`Imported thread ${trimIdent(opts.threadId)} as ${trimIdent(forked.threadId)}`, "status");
|
|
1073
1074
|
opts.session.sendSessionEvent({
|
|
1074
1075
|
type: "message",
|
|
1075
|
-
|
|
1076
|
+
// B-529: an empty fork used to look like "the content never loaded".
|
|
1077
|
+
message: envelopes.length > 0 ? `Imported Codex thread ${opts.threadId} (continuing as ${forked.threadId})` : `Imported Codex thread ${opts.threadId} (continuing as ${forked.threadId}), but Codex returned no history for it`
|
|
1076
1078
|
});
|
|
1077
1079
|
return { threadId: forked.threadId, model: forked.model, replayed: envelopes.length };
|
|
1078
1080
|
}
|
|
1081
|
+
function failVisibly(session, message) {
|
|
1082
|
+
session.sendSessionEvent({ type: "message", message });
|
|
1083
|
+
return new Error(message);
|
|
1084
|
+
}
|
|
1079
1085
|
|
|
1080
1086
|
function emitReadyIfIdle({ pending, queueSize, shouldExit, sendReady, notify }) {
|
|
1081
1087
|
if (shouldExit) {
|
|
@@ -1271,7 +1277,7 @@ async function runCodex(opts) {
|
|
|
1271
1277
|
dangerouslySkipPermissions: initialPermissionMode === "yolo" || initialPermissionMode === "bypassPermissions",
|
|
1272
1278
|
...forkedFromSessionId ? { parentSessionId: forkedFromSessionId } : {},
|
|
1273
1279
|
...forkedFromMessageId ? { forkedFromMessageId } : {},
|
|
1274
|
-
capabilities: [PROMPT_QUEUE_CAPABILITY]
|
|
1280
|
+
capabilities: [PROMPT_QUEUE_CAPABILITY, FORK_BACKFILL_CAPABILITY]
|
|
1275
1281
|
});
|
|
1276
1282
|
metadata.attachmentKinds = [...CLAUDE_ATTACHMENT_KINDS];
|
|
1277
1283
|
const importCodexThreadId = process.env[IMPORT_CODEX_THREAD_ENV];
|
|
@@ -1830,8 +1836,10 @@ async function runCodex(opts) {
|
|
|
1830
1836
|
codexThreadId: forkCodexThreadId
|
|
1831
1837
|
}));
|
|
1832
1838
|
logger.debug(`[CODEX FORK BACKFILL] Replayed ${envelopes.length} historical envelopes from thread ${forkCodexThreadId}`);
|
|
1839
|
+
void publishForkBackfillWhenCommitted(session, { count: envelopes.length });
|
|
1833
1840
|
} catch (error) {
|
|
1834
1841
|
logger.debug(`[CODEX FORK BACKFILL] Failed to read thread ${forkCodexThreadId}`, safeCodexErrorMetadata(error));
|
|
1842
|
+
void publishForkBackfillWhenCommitted(session, { count: 0, failed: true });
|
|
1835
1843
|
}
|
|
1836
1844
|
}
|
|
1837
1845
|
let pending = null;
|