@zonease/happy 0.6.55 → 0.6.57
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/{api-BH3mam5i.mjs → api-CKGCwsUf.mjs} +115 -68
- package/dist/{api-DvnXQWOp.cjs → api-jNSgtz8Y.cjs} +112 -61
- package/dist/{auth-bwfaLx_V.cjs → auth-BUQLBefw.cjs} +2 -2
- package/dist/{auth-CpHjpbeh.mjs → auth-CFcrX0sP.mjs} +2 -2
- package/dist/{auth-ByKWFjMR.cjs → auth-CsU0d6gM.cjs} +4 -4
- package/dist/{auth-Pnzzbn_J.mjs → auth-ZUnqSqKY.mjs} +4 -4
- package/dist/{browser-DFeQQh1Z.cjs → browser-BA-Yc9JO.cjs} +1 -1
- package/dist/{browser-cQ-qyFyK.mjs → browser-eziH4OAA.mjs} +1 -1
- package/dist/{claudeLocal-janZsvba.mjs → claudeLocal-CBalcsEQ.mjs} +1 -1
- package/dist/{claudeLocal-BbxgreMw.cjs → claudeLocal-FQ_thOHX.cjs} +1 -1
- package/dist/{config-t5BrZndM.cjs → config-CECX_zGu.cjs} +1 -1
- package/dist/{config-DtmZpgs-.mjs → config-DaQJWbRZ.mjs} +1 -1
- package/dist/{connect-UD5a4ksC.cjs → connect-Bs0ChOpi.cjs} +5 -5
- package/dist/{connect-BLdoTnbu.mjs → connect-DDKq78R-.mjs} +5 -5
- package/dist/{controlClient-DnZ5KouD.cjs → controlClient-B70-61t0.cjs} +1 -1
- package/dist/{controlClient-G7DPgAo_.mjs → controlClient-jullf1ow.mjs} +1 -1
- package/dist/{cursorApprovalHook-PYPX20zh.cjs → cursorApprovalHook-Czq1DjVU.cjs} +2 -2
- package/dist/{cursorApprovalHook-CTMySu-X.mjs → cursorApprovalHook-O8j9S8An.mjs} +2 -2
- package/dist/{cursorApprovalServer-GS3zs6kT.cjs → cursorApprovalServer-Cqsy8ohH.cjs} +1 -1
- package/dist/{cursorApprovalServer-D4A8D345.mjs → cursorApprovalServer-nbHwu4ru.mjs} +1 -1
- package/dist/{deviceKeys-U6p6bcVn.cjs → deviceKeys-YeZD2zQo.cjs} +2 -2
- package/dist/{deviceKeys-Cm1y7_pz.mjs → deviceKeys-su95gdc-.mjs} +2 -2
- package/dist/{doctor-B95V4_1U.mjs → doctor-Brqp2e3O.mjs} +2 -2
- package/dist/{doctor-CkqjpUrt.cjs → doctor-DbfxSKDV.cjs} +2 -2
- package/dist/{downloadImage-Bii91OZ_.cjs → downloadImage-CyrKKnfC.cjs} +1 -1
- package/dist/{downloadImage-B3U4jFKu.mjs → downloadImage-K-xFB9jG.mjs} +1 -1
- package/dist/{enroll-Cm8yPrRX.cjs → enroll-CMH2pLy0.cjs} +3 -3
- package/dist/{enroll-CLUgsuwD.mjs → enroll-Ck7f6V22.mjs} +3 -3
- package/dist/{evidence-CVl2OOtE.mjs → evidence-CMz-atyb.mjs} +1 -1
- package/dist/{evidence-BaGuA4HW.cjs → evidence-yOULEvRk.cjs} +1 -1
- package/dist/{formatImageMessage-Bv1f9KNc.cjs → formatImageMessage-DSsQTvO3.cjs} +1 -1
- package/dist/{formatImageMessage-Bel4ENzm.mjs → formatImageMessage-tdlJeRPD.mjs} +1 -1
- package/dist/index.cjs +46 -46
- package/dist/index.mjs +46 -46
- package/dist/{install-ClBwOf9d.mjs → install-BL0173KN.mjs} +1 -1
- package/dist/{install-D7tsFl0K.cjs → install-BNR9inWv.cjs} +2 -2
- package/dist/{install-cTiFm69E.mjs → install-CpTmSd4l.mjs} +2 -2
- package/dist/{install-B9pgfnme.cjs → install-DKZjMcR2.cjs} +1 -1
- package/dist/lib.cjs +6 -6
- package/dist/lib.d.cts +10 -0
- package/dist/lib.d.mts +10 -0
- package/dist/lib.mjs +6 -6
- package/dist/{loadableToolOutput-Dht_jeLW.mjs → loadableToolOutput-BRRL6yS-.mjs} +2 -2
- package/dist/{loadableToolOutput-BhhbJ2eK.cjs → loadableToolOutput-BxFrugLw.cjs} +2 -2
- package/dist/{persistence-P3x0-3CX.mjs → persistence-BirvtFep.mjs} +2 -2
- package/dist/{persistence-uOLA4_LW.cjs → persistence-DoY9jKDN.cjs} +1 -1
- package/dist/{push-xSbf2VWB.mjs → push-B325YQUT.mjs} +6 -6
- package/dist/{push-avfOm7WX.cjs → push-teAS18QK.cjs} +6 -6
- package/dist/{registerKillSessionHandler-CPr_DB4J.cjs → registerKillSessionHandler-CEvWEzOm.cjs} +3 -3
- package/dist/{registerKillSessionHandler-CH06n_hZ.mjs → registerKillSessionHandler-CTSkaRVu.mjs} +3 -3
- package/dist/{run-DCo-Pmdx.cjs → run-D38D-G8z.cjs} +167 -8
- package/dist/{run-B8aBVINE.mjs → run-DNfj0j_h.mjs} +167 -8
- package/dist/{runClaude-BJVGCnIq.mjs → runClaude-C54Y-vby.mjs} +19 -18
- package/dist/{runClaude-CCb9FHWd.cjs → runClaude-ChIbxtFs.cjs} +20 -19
- package/dist/{runCodex-LNIgWEiI.mjs → runCodex-Bt6DgaY6.mjs} +18 -17
- package/dist/{runCodex-BhMBu81A.cjs → runCodex-DKL7LL-d.cjs} +18 -17
- package/dist/{runCursor-C-FiInj_.cjs → runCursor-CzBFzit8.cjs} +20 -19
- package/dist/{runCursor-CSpoYRGe.mjs → runCursor-_ZZmpyjD.mjs} +20 -19
- package/dist/{runGemini-0H1Ug_k9.cjs → runGemini-B2IY0bg7.cjs} +22 -21
- package/dist/{runGemini-DIPkJiUE.mjs → runGemini-COkJ59pz.mjs} +22 -21
- package/dist/{runOneShot-WB4vGRvF.mjs → runOneShot-Bt5mWMh4.mjs} +2 -2
- package/dist/{runOneShot-BOkwPhAq.cjs → runOneShot-DApUG4Jw.cjs} +2 -2
- package/dist/{serve-BTYQTNwH.mjs → serve-CzQSwmyU.mjs} +7 -6
- package/dist/{serve-C-lQRc8J.cjs → serve-rMs5fvxH.cjs} +7 -6
- package/dist/{session-CklyM25y.cjs → session-C9z-9F__.cjs} +6 -5
- package/dist/{session-BicrgWsg.mjs → session-CJu83tzU.mjs} +6 -5
- package/dist/sessionDecrypt-DlajL7Fn.cjs +66 -0
- package/dist/sessionDecrypt-R6Ee4mFr.mjs +64 -0
- package/dist/{sessionKeyCache-CCvSFqv3.cjs → sessionKeyCache-CRINEKrH.cjs} +1 -1
- package/dist/{sessionKeyCache-B_rg3Wj3.mjs → sessionKeyCache-Ci9NA8Nn.mjs} +1 -1
- package/dist/{sessionList-D3G9cpfU.mjs → sessionList-Bh8eF10P.mjs} +2 -2
- package/dist/{sessionList-BByWxuNb.cjs → sessionList-DXPTa2ix.cjs} +3 -3
- package/dist/{sessionSummary-B6L3dSgX.mjs → sessionSummary-CcdMMHfv.mjs} +3 -63
- package/dist/{sessionSummary-CvrWLmYX.cjs → sessionSummary-Cs-_4S3j.cjs} +3 -64
- package/dist/{setupOfflineReconnection-wVhiCoQD.cjs → setupOfflineReconnection-BmbFrBPc.cjs} +3 -3
- package/dist/{setupOfflineReconnection-Cw5gqUuo.mjs → setupOfflineReconnection-DV3FASIY.mjs} +3 -3
- package/dist/{spawnHappyCLI-Cf5Ox5XH.mjs → spawnHappyCLI-CSkTkB4n.mjs} +1 -1
- package/dist/{spawnHappyCLI-BjJuWvpg.cjs → spawnHappyCLI-CilqRN5U.cjs} +1 -1
- package/dist/{ssh-O7AfLDRX.mjs → ssh-CgYdGAzd.mjs} +5 -5
- package/dist/{ssh-KFiFQj5X.cjs → ssh-CrxTSwPb.cjs} +5 -5
- package/dist/{task-CgYFAvIQ.mjs → task-BJro3dR3.mjs} +7 -6
- package/dist/{task-DKmGE82d.cjs → task-GLv6BSQA.cjs} +7 -6
- package/dist/{uninstall-DLXRIcDr.mjs → uninstall-CKmjUaMr.mjs} +2 -2
- package/dist/{uninstall-24vmR3hW.cjs → uninstall-CyoWDMHw.cjs} +2 -2
- package/dist/{update-CIbNnkrB.cjs → update-AqCJSfVL.cjs} +3 -3
- package/dist/{update-Dv5yhg2A.mjs → update-BxE93-s7.mjs} +3 -3
- package/package.json +1 -1
|
@@ -3,15 +3,17 @@
|
|
|
3
3
|
var fs$1 = require('fs/promises');
|
|
4
4
|
var os = require('os');
|
|
5
5
|
var tmp = require('tmp');
|
|
6
|
-
var api = require('./api-
|
|
7
|
-
var logger = require('./persistence-
|
|
8
|
-
var
|
|
6
|
+
var api = require('./api-jNSgtz8Y.cjs');
|
|
7
|
+
var logger = require('./persistence-DoY9jKDN.cjs');
|
|
8
|
+
var doctor$1 = require('./doctor-C08m5Z9f.cjs');
|
|
9
|
+
var sessionDecrypt = require('./sessionDecrypt-DlajL7Fn.cjs');
|
|
10
|
+
var auth = require('./auth-BUQLBefw.cjs');
|
|
9
11
|
var child_process = require('child_process');
|
|
10
|
-
var doctor = require('./doctor-
|
|
11
|
-
var spawnHappyCLI = require('./spawnHappyCLI-
|
|
12
|
-
var controlClient = require('./controlClient-
|
|
13
|
-
var deviceKeys = require('./deviceKeys-
|
|
14
|
-
var install = require('./install-
|
|
12
|
+
var doctor = require('./doctor-DbfxSKDV.cjs');
|
|
13
|
+
var spawnHappyCLI = require('./spawnHappyCLI-CilqRN5U.cjs');
|
|
14
|
+
var controlClient = require('./controlClient-B70-61t0.cjs');
|
|
15
|
+
var deviceKeys = require('./deviceKeys-YeZD2zQo.cjs');
|
|
16
|
+
var install = require('./install-DKZjMcR2.cjs');
|
|
15
17
|
var fastify = require('fastify');
|
|
16
18
|
var fs = require('node:fs');
|
|
17
19
|
var promises = require('node:fs/promises');
|
|
@@ -42,6 +44,104 @@ function _interopNamespaceDefault(e) {
|
|
|
42
44
|
|
|
43
45
|
var tmp__namespace = /*#__PURE__*/_interopNamespaceDefault(tmp);
|
|
44
46
|
|
|
47
|
+
function pickAgent(metadata) {
|
|
48
|
+
switch (metadata.flavor) {
|
|
49
|
+
case "codex":
|
|
50
|
+
case "gemini":
|
|
51
|
+
case "cursor":
|
|
52
|
+
return metadata.flavor;
|
|
53
|
+
default:
|
|
54
|
+
return "claude";
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function pickForkSource(id, agent, metadata) {
|
|
58
|
+
switch (agent) {
|
|
59
|
+
case "claude":
|
|
60
|
+
return typeof metadata.claudeSessionId === "string" ? metadata.claudeSessionId : null;
|
|
61
|
+
case "codex":
|
|
62
|
+
return typeof metadata.codexSessionId === "string" ? metadata.codexSessionId : null;
|
|
63
|
+
case "cursor":
|
|
64
|
+
return typeof metadata.cursorSessionId === "string" ? metadata.cursorSessionId : null;
|
|
65
|
+
case "gemini":
|
|
66
|
+
return id;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
function planSessionAdoption(opts) {
|
|
70
|
+
const plan = { track: [], resume: [], skipped: [] };
|
|
71
|
+
const mine = opts.sessions.filter((s) => s.active && s.metadata && s.metadata.machineId === opts.machineId).sort((a, b) => b.activeAt - a.activeAt);
|
|
72
|
+
for (const session of mine) {
|
|
73
|
+
const metadata = session.metadata;
|
|
74
|
+
const pid = typeof metadata.hostPid === "number" ? metadata.hostPid : null;
|
|
75
|
+
if (pid !== null && opts.alivePids.has(pid)) {
|
|
76
|
+
plan.track.push({ id: session.id, pid, metadata });
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
const directory = typeof metadata.path === "string" ? metadata.path : null;
|
|
80
|
+
if (!directory) {
|
|
81
|
+
plan.skipped.push({ id: session.id, reason: "no path in metadata" });
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
const agent = pickAgent(metadata);
|
|
85
|
+
const forkSource = pickForkSource(session.id, agent, metadata);
|
|
86
|
+
if (!forkSource) {
|
|
87
|
+
plan.skipped.push({ id: session.id, reason: `no ${agent} session id to resume from` });
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
plan.resume.push({
|
|
91
|
+
id: session.id,
|
|
92
|
+
agent,
|
|
93
|
+
directory,
|
|
94
|
+
forkSource,
|
|
95
|
+
title: typeof metadata.summary?.text === "string" ? metadata.summary.text : typeof metadata.name === "string" ? metadata.name : void 0,
|
|
96
|
+
metadata
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
return plan;
|
|
100
|
+
}
|
|
101
|
+
async function adoptSessionsFromPreviousRun(deps) {
|
|
102
|
+
const report = { tracked: 0, resumed: [], failed: [], skipped: [] };
|
|
103
|
+
const [sessions, alivePids] = await Promise.all([deps.listActiveSessions(), deps.listAliveSessionPids()]);
|
|
104
|
+
const plan = planSessionAdoption({ sessions, alivePids, machineId: deps.machineId });
|
|
105
|
+
report.skipped = plan.skipped;
|
|
106
|
+
for (const session of plan.track) {
|
|
107
|
+
deps.track(session);
|
|
108
|
+
report.tracked++;
|
|
109
|
+
}
|
|
110
|
+
for (const session of plan.resume) {
|
|
111
|
+
try {
|
|
112
|
+
const forked = await deps.fork(session.agent, session.forkSource);
|
|
113
|
+
if (!forked.success || !forked.resumeSessionId) {
|
|
114
|
+
report.failed.push({ id: session.id, reason: forked.errorMessage || `${session.agent} fork failed` });
|
|
115
|
+
continue;
|
|
116
|
+
}
|
|
117
|
+
const spawned = await deps.spawnSession({
|
|
118
|
+
machineId: deps.machineId,
|
|
119
|
+
directory: session.directory,
|
|
120
|
+
agent: session.agent,
|
|
121
|
+
resumeSessionId: forked.resumeSessionId,
|
|
122
|
+
intent: "resume",
|
|
123
|
+
sessionTitle: session.title,
|
|
124
|
+
skipForkSession: true,
|
|
125
|
+
approvedNewDirectoryCreation: false
|
|
126
|
+
});
|
|
127
|
+
if (spawned.type !== "success") {
|
|
128
|
+
report.failed.push({
|
|
129
|
+
id: session.id,
|
|
130
|
+
reason: spawned.type === "error" ? spawned.errorMessage : `directory missing: ${spawned.directory}`
|
|
131
|
+
});
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
134
|
+
if (!await deps.archiveSession(session.id)) {
|
|
135
|
+
logger.logger.warn(`[DAEMON ADOPT] Resumed ${session.id} as ${spawned.sessionId} but could not mark the old session inactive`);
|
|
136
|
+
}
|
|
137
|
+
report.resumed.push({ from: session.id, to: spawned.sessionId });
|
|
138
|
+
} catch (error) {
|
|
139
|
+
report.failed.push({ id: session.id, reason: error instanceof Error ? error.message : String(error) });
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return report;
|
|
143
|
+
}
|
|
144
|
+
|
|
45
145
|
let caffeinateProcess = null;
|
|
46
146
|
function startCaffeinate() {
|
|
47
147
|
if (logger.configuration.disableCaffeinate) {
|
|
@@ -2082,6 +2182,65 @@ ${error.message}
|
|
|
2082
2182
|
});
|
|
2083
2183
|
apiMachine.connect();
|
|
2084
2184
|
connectedMachine = apiMachine;
|
|
2185
|
+
const adoptionTimer = setTimeout(() => {
|
|
2186
|
+
adoptSessionsFromPreviousRun({
|
|
2187
|
+
machineId,
|
|
2188
|
+
listActiveSessions: async () => {
|
|
2189
|
+
const rows = await api$1.listSessionsUpdatedSince(Date.now() - 4 * 60 * 60 * 1e3);
|
|
2190
|
+
return rows.map((row) => ({
|
|
2191
|
+
id: row.id,
|
|
2192
|
+
active: !!row.active,
|
|
2193
|
+
activeAt: typeof row.activeAt === "number" ? row.activeAt : 0,
|
|
2194
|
+
metadata: sessionDecrypt.decryptSessionRow(credentials, row)?.metadata ?? null
|
|
2195
|
+
}));
|
|
2196
|
+
},
|
|
2197
|
+
listAliveSessionPids: async () => {
|
|
2198
|
+
const processes = await doctor$1.findAllHappyProcesses();
|
|
2199
|
+
return new Set(processes.filter((p) => p.type === "daemon-spawned-session" || p.type === "user-session" || p.type === "dev-daemon-spawned" || p.type === "dev-session").map((p) => p.pid));
|
|
2200
|
+
},
|
|
2201
|
+
fork: async (agent, source) => {
|
|
2202
|
+
switch (agent) {
|
|
2203
|
+
case "claude": {
|
|
2204
|
+
const projectId = await api.findClaudeProjectId(source);
|
|
2205
|
+
if (!projectId) return { success: false, errorMessage: `Claude session ${source} not found on disk` };
|
|
2206
|
+
const r = await api.forkSession(projectId, source);
|
|
2207
|
+
return { success: r.success, resumeSessionId: r.newSessionId, errorMessage: r.errorMessage };
|
|
2208
|
+
}
|
|
2209
|
+
case "codex": {
|
|
2210
|
+
const r = await api.forkCodexSession(source);
|
|
2211
|
+
return { success: r.success, resumeSessionId: r.newFilePath, errorMessage: r.errorMessage };
|
|
2212
|
+
}
|
|
2213
|
+
case "gemini": {
|
|
2214
|
+
const r = await api.forkGeminiSession(source);
|
|
2215
|
+
return { success: r.success, resumeSessionId: r.newSessionId, errorMessage: r.errorMessage };
|
|
2216
|
+
}
|
|
2217
|
+
case "cursor": {
|
|
2218
|
+
const r = await api.forkCursorSession(source);
|
|
2219
|
+
return { success: r.success, resumeSessionId: r.newChatId, errorMessage: r.errorMessage };
|
|
2220
|
+
}
|
|
2221
|
+
}
|
|
2222
|
+
},
|
|
2223
|
+
spawnSession,
|
|
2224
|
+
archiveSession: (sessionId) => api$1.archiveSession(sessionId),
|
|
2225
|
+
track: ({ id, pid, metadata }) => {
|
|
2226
|
+
if (pidToTrackedSession.has(pid)) return;
|
|
2227
|
+
pidToTrackedSession.set(pid, {
|
|
2228
|
+
startedBy: "adopted after daemon restart",
|
|
2229
|
+
happySessionId: id,
|
|
2230
|
+
happySessionMetadataFromLocalWebhook: metadata,
|
|
2231
|
+
pid
|
|
2232
|
+
});
|
|
2233
|
+
}
|
|
2234
|
+
}).then((report) => {
|
|
2235
|
+
logger.logger.info(`[DAEMON ADOPT] tracked ${report.tracked} running session(s), resumed ${report.resumed.length}, failed ${report.failed.length}, skipped ${report.skipped.length}`);
|
|
2236
|
+
for (const r of report.resumed) logger.logger.info(`[DAEMON ADOPT] resumed ${r.from} as ${r.to}`);
|
|
2237
|
+
for (const f of report.failed) logger.logger.warn(`[DAEMON ADOPT] could not resume ${f.id}: ${f.reason}`);
|
|
2238
|
+
for (const s of report.skipped) logger.logger.debug(`[DAEMON ADOPT] skipped ${s.id}: ${s.reason}`);
|
|
2239
|
+
}).catch((error) => {
|
|
2240
|
+
logger.logger.warn("[DAEMON ADOPT] failed to adopt previous sessions", error);
|
|
2241
|
+
});
|
|
2242
|
+
}, 5e3);
|
|
2243
|
+
adoptionTimer.unref();
|
|
2085
2244
|
apiMachine.updateMachineMetadata((current) => ({ ...current, ...machineMetadata })).catch((error) => {
|
|
2086
2245
|
logger.logger.debug("[DAEMON RUN] Failed to update machine metadata", error);
|
|
2087
2246
|
});
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import fs from 'fs/promises';
|
|
2
2
|
import os from 'os';
|
|
3
3
|
import * as tmp from 'tmp';
|
|
4
|
-
import { A as ApiClient } from './api-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { A as ApiClient, f as forkCursorSession, c as forkGeminiSession, d as forkCodexSession, e as findClaudeProjectId, g as forkSession } from './api-CKGCwsUf.mjs';
|
|
5
|
+
import { l as logger, c as configuration, p as packageJson, v as acquireDaemonLock, a as readSettings, i as isDebug, e as encodeBase64, x as writeDaemonState, m as readDaemonState, y as releaseDaemonLock, z as validateProfileForAgent, A as getProfileEnvironmentVariables } from './persistence-BirvtFep.mjs';
|
|
6
|
+
import { findAllHappyProcesses } from './doctor-ON7pN5G5.mjs';
|
|
7
|
+
import { d as decryptSessionRow } from './sessionDecrypt-R6Ee4mFr.mjs';
|
|
8
|
+
import { authAndSetupMachineIfNeeded } from './auth-CFcrX0sP.mjs';
|
|
7
9
|
import { spawn, execSync, exec } from 'child_process';
|
|
8
|
-
import { getEnvironmentInfo } from './doctor-
|
|
9
|
-
import { s as spawnHappyCLI } from './spawnHappyCLI-
|
|
10
|
-
import { isDaemonRunningCurrentlyInstalledHappyVersion, stopDaemon, cleanupDaemonState } from './controlClient-
|
|
11
|
-
import { a as readCachedDeviceKey, d as deviceExec } from './deviceKeys-
|
|
12
|
-
import { P as PLIST_LABEL } from './install-
|
|
10
|
+
import { getEnvironmentInfo } from './doctor-Brqp2e3O.mjs';
|
|
11
|
+
import { s as spawnHappyCLI } from './spawnHappyCLI-CSkTkB4n.mjs';
|
|
12
|
+
import { isDaemonRunningCurrentlyInstalledHappyVersion, stopDaemon, cleanupDaemonState } from './controlClient-jullf1ow.mjs';
|
|
13
|
+
import { a as readCachedDeviceKey, d as deviceExec } from './deviceKeys-su95gdc-.mjs';
|
|
14
|
+
import { P as PLIST_LABEL } from './install-BL0173KN.mjs';
|
|
13
15
|
import fastify from 'fastify';
|
|
14
16
|
import { createReadStream } from 'node:fs';
|
|
15
17
|
import { stat } from 'node:fs/promises';
|
|
@@ -21,6 +23,104 @@ import { join } from 'path';
|
|
|
21
23
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
22
24
|
import { b as buildOutputSummary, m as mapFinishStatus, a as buildOrchestratorEnv, c as appendOutputChunk } from './common-BdNgghUJ.mjs';
|
|
23
25
|
|
|
26
|
+
function pickAgent(metadata) {
|
|
27
|
+
switch (metadata.flavor) {
|
|
28
|
+
case "codex":
|
|
29
|
+
case "gemini":
|
|
30
|
+
case "cursor":
|
|
31
|
+
return metadata.flavor;
|
|
32
|
+
default:
|
|
33
|
+
return "claude";
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function pickForkSource(id, agent, metadata) {
|
|
37
|
+
switch (agent) {
|
|
38
|
+
case "claude":
|
|
39
|
+
return typeof metadata.claudeSessionId === "string" ? metadata.claudeSessionId : null;
|
|
40
|
+
case "codex":
|
|
41
|
+
return typeof metadata.codexSessionId === "string" ? metadata.codexSessionId : null;
|
|
42
|
+
case "cursor":
|
|
43
|
+
return typeof metadata.cursorSessionId === "string" ? metadata.cursorSessionId : null;
|
|
44
|
+
case "gemini":
|
|
45
|
+
return id;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function planSessionAdoption(opts) {
|
|
49
|
+
const plan = { track: [], resume: [], skipped: [] };
|
|
50
|
+
const mine = opts.sessions.filter((s) => s.active && s.metadata && s.metadata.machineId === opts.machineId).sort((a, b) => b.activeAt - a.activeAt);
|
|
51
|
+
for (const session of mine) {
|
|
52
|
+
const metadata = session.metadata;
|
|
53
|
+
const pid = typeof metadata.hostPid === "number" ? metadata.hostPid : null;
|
|
54
|
+
if (pid !== null && opts.alivePids.has(pid)) {
|
|
55
|
+
plan.track.push({ id: session.id, pid, metadata });
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
const directory = typeof metadata.path === "string" ? metadata.path : null;
|
|
59
|
+
if (!directory) {
|
|
60
|
+
plan.skipped.push({ id: session.id, reason: "no path in metadata" });
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
const agent = pickAgent(metadata);
|
|
64
|
+
const forkSource = pickForkSource(session.id, agent, metadata);
|
|
65
|
+
if (!forkSource) {
|
|
66
|
+
plan.skipped.push({ id: session.id, reason: `no ${agent} session id to resume from` });
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
plan.resume.push({
|
|
70
|
+
id: session.id,
|
|
71
|
+
agent,
|
|
72
|
+
directory,
|
|
73
|
+
forkSource,
|
|
74
|
+
title: typeof metadata.summary?.text === "string" ? metadata.summary.text : typeof metadata.name === "string" ? metadata.name : void 0,
|
|
75
|
+
metadata
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
return plan;
|
|
79
|
+
}
|
|
80
|
+
async function adoptSessionsFromPreviousRun(deps) {
|
|
81
|
+
const report = { tracked: 0, resumed: [], failed: [], skipped: [] };
|
|
82
|
+
const [sessions, alivePids] = await Promise.all([deps.listActiveSessions(), deps.listAliveSessionPids()]);
|
|
83
|
+
const plan = planSessionAdoption({ sessions, alivePids, machineId: deps.machineId });
|
|
84
|
+
report.skipped = plan.skipped;
|
|
85
|
+
for (const session of plan.track) {
|
|
86
|
+
deps.track(session);
|
|
87
|
+
report.tracked++;
|
|
88
|
+
}
|
|
89
|
+
for (const session of plan.resume) {
|
|
90
|
+
try {
|
|
91
|
+
const forked = await deps.fork(session.agent, session.forkSource);
|
|
92
|
+
if (!forked.success || !forked.resumeSessionId) {
|
|
93
|
+
report.failed.push({ id: session.id, reason: forked.errorMessage || `${session.agent} fork failed` });
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
const spawned = await deps.spawnSession({
|
|
97
|
+
machineId: deps.machineId,
|
|
98
|
+
directory: session.directory,
|
|
99
|
+
agent: session.agent,
|
|
100
|
+
resumeSessionId: forked.resumeSessionId,
|
|
101
|
+
intent: "resume",
|
|
102
|
+
sessionTitle: session.title,
|
|
103
|
+
skipForkSession: true,
|
|
104
|
+
approvedNewDirectoryCreation: false
|
|
105
|
+
});
|
|
106
|
+
if (spawned.type !== "success") {
|
|
107
|
+
report.failed.push({
|
|
108
|
+
id: session.id,
|
|
109
|
+
reason: spawned.type === "error" ? spawned.errorMessage : `directory missing: ${spawned.directory}`
|
|
110
|
+
});
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
if (!await deps.archiveSession(session.id)) {
|
|
114
|
+
logger.warn(`[DAEMON ADOPT] Resumed ${session.id} as ${spawned.sessionId} but could not mark the old session inactive`);
|
|
115
|
+
}
|
|
116
|
+
report.resumed.push({ from: session.id, to: spawned.sessionId });
|
|
117
|
+
} catch (error) {
|
|
118
|
+
report.failed.push({ id: session.id, reason: error instanceof Error ? error.message : String(error) });
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return report;
|
|
122
|
+
}
|
|
123
|
+
|
|
24
124
|
let caffeinateProcess = null;
|
|
25
125
|
function startCaffeinate() {
|
|
26
126
|
if (configuration.disableCaffeinate) {
|
|
@@ -2061,6 +2161,65 @@ ${error.message}
|
|
|
2061
2161
|
});
|
|
2062
2162
|
apiMachine.connect();
|
|
2063
2163
|
connectedMachine = apiMachine;
|
|
2164
|
+
const adoptionTimer = setTimeout(() => {
|
|
2165
|
+
adoptSessionsFromPreviousRun({
|
|
2166
|
+
machineId,
|
|
2167
|
+
listActiveSessions: async () => {
|
|
2168
|
+
const rows = await api.listSessionsUpdatedSince(Date.now() - 4 * 60 * 60 * 1e3);
|
|
2169
|
+
return rows.map((row) => ({
|
|
2170
|
+
id: row.id,
|
|
2171
|
+
active: !!row.active,
|
|
2172
|
+
activeAt: typeof row.activeAt === "number" ? row.activeAt : 0,
|
|
2173
|
+
metadata: decryptSessionRow(credentials, row)?.metadata ?? null
|
|
2174
|
+
}));
|
|
2175
|
+
},
|
|
2176
|
+
listAliveSessionPids: async () => {
|
|
2177
|
+
const processes = await findAllHappyProcesses();
|
|
2178
|
+
return new Set(processes.filter((p) => p.type === "daemon-spawned-session" || p.type === "user-session" || p.type === "dev-daemon-spawned" || p.type === "dev-session").map((p) => p.pid));
|
|
2179
|
+
},
|
|
2180
|
+
fork: async (agent, source) => {
|
|
2181
|
+
switch (agent) {
|
|
2182
|
+
case "claude": {
|
|
2183
|
+
const projectId = await findClaudeProjectId(source);
|
|
2184
|
+
if (!projectId) return { success: false, errorMessage: `Claude session ${source} not found on disk` };
|
|
2185
|
+
const r = await forkSession(projectId, source);
|
|
2186
|
+
return { success: r.success, resumeSessionId: r.newSessionId, errorMessage: r.errorMessage };
|
|
2187
|
+
}
|
|
2188
|
+
case "codex": {
|
|
2189
|
+
const r = await forkCodexSession(source);
|
|
2190
|
+
return { success: r.success, resumeSessionId: r.newFilePath, errorMessage: r.errorMessage };
|
|
2191
|
+
}
|
|
2192
|
+
case "gemini": {
|
|
2193
|
+
const r = await forkGeminiSession(source);
|
|
2194
|
+
return { success: r.success, resumeSessionId: r.newSessionId, errorMessage: r.errorMessage };
|
|
2195
|
+
}
|
|
2196
|
+
case "cursor": {
|
|
2197
|
+
const r = await forkCursorSession(source);
|
|
2198
|
+
return { success: r.success, resumeSessionId: r.newChatId, errorMessage: r.errorMessage };
|
|
2199
|
+
}
|
|
2200
|
+
}
|
|
2201
|
+
},
|
|
2202
|
+
spawnSession,
|
|
2203
|
+
archiveSession: (sessionId) => api.archiveSession(sessionId),
|
|
2204
|
+
track: ({ id, pid, metadata }) => {
|
|
2205
|
+
if (pidToTrackedSession.has(pid)) return;
|
|
2206
|
+
pidToTrackedSession.set(pid, {
|
|
2207
|
+
startedBy: "adopted after daemon restart",
|
|
2208
|
+
happySessionId: id,
|
|
2209
|
+
happySessionMetadataFromLocalWebhook: metadata,
|
|
2210
|
+
pid
|
|
2211
|
+
});
|
|
2212
|
+
}
|
|
2213
|
+
}).then((report) => {
|
|
2214
|
+
logger.info(`[DAEMON ADOPT] tracked ${report.tracked} running session(s), resumed ${report.resumed.length}, failed ${report.failed.length}, skipped ${report.skipped.length}`);
|
|
2215
|
+
for (const r of report.resumed) logger.info(`[DAEMON ADOPT] resumed ${r.from} as ${r.to}`);
|
|
2216
|
+
for (const f of report.failed) logger.warn(`[DAEMON ADOPT] could not resume ${f.id}: ${f.reason}`);
|
|
2217
|
+
for (const s of report.skipped) logger.debug(`[DAEMON ADOPT] skipped ${s.id}: ${s.reason}`);
|
|
2218
|
+
}).catch((error) => {
|
|
2219
|
+
logger.warn("[DAEMON ADOPT] failed to adopt previous sessions", error);
|
|
2220
|
+
});
|
|
2221
|
+
}, 5e3);
|
|
2222
|
+
adoptionTimer.unref();
|
|
2064
2223
|
apiMachine.updateMachineMetadata((current) => ({ ...current, ...machineMetadata })).catch((error) => {
|
|
2065
2224
|
logger.debug("[DAEMON RUN] Failed to update machine metadata", error);
|
|
2066
2225
|
});
|
|
@@ -2,20 +2,20 @@ import os, { homedir } from 'node:os';
|
|
|
2
2
|
import { randomUUID } from 'node:crypto';
|
|
3
3
|
import { existsSync, mkdirSync, writeFileSync, unlinkSync, readdirSync } from 'node:fs';
|
|
4
4
|
import { readFile, mkdir, writeFile, stat, copyFile } from 'node:fs/promises';
|
|
5
|
-
import { I as InvalidateSync,
|
|
6
|
-
import { l as logger, i as isDebug, c as configuration, a as readSettings, p as packageJson } from './persistence-
|
|
7
|
-
import { g as getProjectPath, a as claudeLocal, E as ExitCodeError, b as claudeCheckSession, s as systemPrompt } from './claudeLocal-
|
|
5
|
+
import { I as InvalidateSync, p as AsyncLock, m as connectionState, A as ApiClient, r as resolveToolsDir, b as startOfflineReconnection, e as findClaudeProjectId } from './api-CKGCwsUf.mjs';
|
|
6
|
+
import { l as logger, i as isDebug, c as configuration, a as readSettings, p as packageJson } from './persistence-BirvtFep.mjs';
|
|
7
|
+
import { g as getProjectPath, a as claudeLocal, E as ExitCodeError, b as claudeCheckSession, s as systemPrompt } from './claudeLocal-CBalcsEQ.mjs';
|
|
8
8
|
import { R as RawJSONLinesSchema } from './types-BoJh4Qfv.mjs';
|
|
9
9
|
import { join, resolve } from 'node:path';
|
|
10
10
|
import { d as delay } from './time-DgsBLJA_.mjs';
|
|
11
11
|
import { watch, access } from 'fs/promises';
|
|
12
12
|
import { useStdout, useInput, Box, Text, render } from 'ink';
|
|
13
|
-
import { b as parseSpecialCommand, a as MessageBuffer, M as MessageQueue2, h as hashObject } from './downloadImage-
|
|
13
|
+
import { b as parseSpecialCommand, a as MessageBuffer, M as MessageQueue2, h as hashObject } from './downloadImage-K-xFB9jG.mjs';
|
|
14
14
|
import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
15
15
|
import { execSync, spawn } from 'node:child_process';
|
|
16
16
|
import { createInterface } from 'node:readline';
|
|
17
17
|
import { fileURLToPath } from 'node:url';
|
|
18
|
-
import { i as isBun } from './spawnHappyCLI-
|
|
18
|
+
import { i as isBun } from './spawnHappyCLI-CSkTkB4n.mjs';
|
|
19
19
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
20
20
|
import 'axios';
|
|
21
21
|
import 'node:events';
|
|
@@ -26,12 +26,12 @@ import 'crypto';
|
|
|
26
26
|
import '@stablelib/base64';
|
|
27
27
|
import 'expo-server-sdk';
|
|
28
28
|
import 'chalk';
|
|
29
|
-
import { a as formatMessageForClaude } from './formatImageMessage-
|
|
29
|
+
import { a as formatMessageForClaude } from './formatImageMessage-tdlJeRPD.mjs';
|
|
30
30
|
import { isDeepStrictEqual } from 'node:util';
|
|
31
|
-
import { i as initialMachineMetadata, s as stopCaffeinate, a as startCaffeinate } from './run-
|
|
32
|
-
import { getEnvironmentInfo } from './doctor-
|
|
33
|
-
import { notifyDaemonSessionStarted } from './controlClient-
|
|
34
|
-
import { c as createMcpContext, r as registerKillSessionHandler, d as detectGitWorktree } from './registerKillSessionHandler-
|
|
31
|
+
import { i as initialMachineMetadata, s as stopCaffeinate, a as startCaffeinate } from './run-DNfj0j_h.mjs';
|
|
32
|
+
import { getEnvironmentInfo } from './doctor-Brqp2e3O.mjs';
|
|
33
|
+
import { notifyDaemonSessionStarted } from './controlClient-jullf1ow.mjs';
|
|
34
|
+
import { c as createMcpContext, r as registerKillSessionHandler, d as detectGitWorktree } from './registerKillSessionHandler-CTSkaRVu.mjs';
|
|
35
35
|
import { createServer } from 'node:http';
|
|
36
36
|
import 'zod';
|
|
37
37
|
import './index-7P6T8CE4.mjs';
|
|
@@ -40,7 +40,7 @@ import 'child_process';
|
|
|
40
40
|
import 'util';
|
|
41
41
|
import 'path';
|
|
42
42
|
import 'node:module';
|
|
43
|
-
import './sessionKeyCache-
|
|
43
|
+
import './sessionKeyCache-Ci9NA8Nn.mjs';
|
|
44
44
|
import 'fs';
|
|
45
45
|
import './prompt-BsAZsPbo.mjs';
|
|
46
46
|
import './trimIdent-BAjmv_TG.mjs';
|
|
@@ -48,17 +48,18 @@ import './common-BdNgghUJ.mjs';
|
|
|
48
48
|
import 'url';
|
|
49
49
|
import 'os';
|
|
50
50
|
import 'tmp';
|
|
51
|
-
import './
|
|
51
|
+
import './doctor-ON7pN5G5.mjs';
|
|
52
|
+
import 'ps-list';
|
|
53
|
+
import 'cross-spawn';
|
|
54
|
+
import './sessionDecrypt-R6Ee4mFr.mjs';
|
|
55
|
+
import './auth-CFcrX0sP.mjs';
|
|
52
56
|
import 'qrcode-terminal';
|
|
53
|
-
import './browser-
|
|
57
|
+
import './browser-eziH4OAA.mjs';
|
|
54
58
|
import 'open';
|
|
55
|
-
import './deviceKeys-
|
|
56
|
-
import './install-
|
|
59
|
+
import './deviceKeys-su95gdc-.mjs';
|
|
60
|
+
import './install-BL0173KN.mjs';
|
|
57
61
|
import 'fastify';
|
|
58
62
|
import 'fastify-type-provider-zod';
|
|
59
|
-
import './doctor-ON7pN5G5.mjs';
|
|
60
|
-
import 'ps-list';
|
|
61
|
-
import 'cross-spawn';
|
|
62
63
|
import '@modelcontextprotocol/sdk/server/mcp.js';
|
|
63
64
|
import '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
64
65
|
import '@modelcontextprotocol/sdk/types.js';
|
|
@@ -4,20 +4,20 @@ var os = require('node:os');
|
|
|
4
4
|
var node_crypto = require('node:crypto');
|
|
5
5
|
var fs$1 = require('node:fs');
|
|
6
6
|
var promises = require('node:fs/promises');
|
|
7
|
-
var api = require('./api-
|
|
8
|
-
var logger = require('./persistence-
|
|
9
|
-
var claudeLocal = require('./claudeLocal-
|
|
7
|
+
var api = require('./api-jNSgtz8Y.cjs');
|
|
8
|
+
var logger = require('./persistence-DoY9jKDN.cjs');
|
|
9
|
+
var claudeLocal = require('./claudeLocal-FQ_thOHX.cjs');
|
|
10
10
|
var types = require('./types-DWeB7aqh.cjs');
|
|
11
11
|
var path = require('node:path');
|
|
12
12
|
var time = require('./time-Bj2HRkKH.cjs');
|
|
13
13
|
var fs = require('fs/promises');
|
|
14
14
|
var ink = require('ink');
|
|
15
|
-
var downloadImage = require('./downloadImage-
|
|
15
|
+
var downloadImage = require('./downloadImage-CyrKKnfC.cjs');
|
|
16
16
|
var React = require('react');
|
|
17
17
|
var node_child_process = require('node:child_process');
|
|
18
18
|
var node_readline = require('node:readline');
|
|
19
19
|
var node_url = require('node:url');
|
|
20
|
-
var spawnHappyCLI = require('./spawnHappyCLI-
|
|
20
|
+
var spawnHappyCLI = require('./spawnHappyCLI-CilqRN5U.cjs');
|
|
21
21
|
var projectPath = require('./projectPath-ChLhdOyt.cjs');
|
|
22
22
|
require('axios');
|
|
23
23
|
require('node:events');
|
|
@@ -28,12 +28,12 @@ require('crypto');
|
|
|
28
28
|
require('@stablelib/base64');
|
|
29
29
|
require('expo-server-sdk');
|
|
30
30
|
require('chalk');
|
|
31
|
-
var formatImageMessage = require('./formatImageMessage-
|
|
31
|
+
var formatImageMessage = require('./formatImageMessage-DSsQTvO3.cjs');
|
|
32
32
|
var node_util = require('node:util');
|
|
33
|
-
var run = require('./run-
|
|
34
|
-
var doctor = require('./doctor-
|
|
35
|
-
var controlClient = require('./controlClient-
|
|
36
|
-
var registerKillSessionHandler = require('./registerKillSessionHandler-
|
|
33
|
+
var run = require('./run-D38D-G8z.cjs');
|
|
34
|
+
var doctor = require('./doctor-DbfxSKDV.cjs');
|
|
35
|
+
var controlClient = require('./controlClient-B70-61t0.cjs');
|
|
36
|
+
var registerKillSessionHandler = require('./registerKillSessionHandler-CEvWEzOm.cjs');
|
|
37
37
|
var node_http = require('node:http');
|
|
38
38
|
require('zod');
|
|
39
39
|
require('./index-DBev4hhV.cjs');
|
|
@@ -42,7 +42,7 @@ require('child_process');
|
|
|
42
42
|
require('util');
|
|
43
43
|
require('path');
|
|
44
44
|
require('node:module');
|
|
45
|
-
require('./sessionKeyCache-
|
|
45
|
+
require('./sessionKeyCache-CRINEKrH.cjs');
|
|
46
46
|
require('fs');
|
|
47
47
|
require('./prompt-BTWDZZO0.cjs');
|
|
48
48
|
require('./trimIdent-4gvk9Wk6.cjs');
|
|
@@ -50,17 +50,18 @@ require('./common-CZvSRU4p.cjs');
|
|
|
50
50
|
require('url');
|
|
51
51
|
require('os');
|
|
52
52
|
require('tmp');
|
|
53
|
-
require('./
|
|
53
|
+
require('./doctor-C08m5Z9f.cjs');
|
|
54
|
+
require('ps-list');
|
|
55
|
+
require('cross-spawn');
|
|
56
|
+
require('./sessionDecrypt-DlajL7Fn.cjs');
|
|
57
|
+
require('./auth-BUQLBefw.cjs');
|
|
54
58
|
require('qrcode-terminal');
|
|
55
|
-
require('./browser-
|
|
59
|
+
require('./browser-BA-Yc9JO.cjs');
|
|
56
60
|
require('open');
|
|
57
|
-
require('./deviceKeys-
|
|
58
|
-
require('./install-
|
|
61
|
+
require('./deviceKeys-YeZD2zQo.cjs');
|
|
62
|
+
require('./install-DKZjMcR2.cjs');
|
|
59
63
|
require('fastify');
|
|
60
64
|
require('fastify-type-provider-zod');
|
|
61
|
-
require('./doctor-C08m5Z9f.cjs');
|
|
62
|
-
require('ps-list');
|
|
63
|
-
require('cross-spawn');
|
|
64
65
|
require('@modelcontextprotocol/sdk/server/mcp.js');
|
|
65
66
|
require('@modelcontextprotocol/sdk/server/streamableHttp.js');
|
|
66
67
|
require('@modelcontextprotocol/sdk/types.js');
|
|
@@ -732,7 +733,7 @@ class AbortError extends Error {
|
|
|
732
733
|
}
|
|
733
734
|
}
|
|
734
735
|
|
|
735
|
-
const __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('runClaude-
|
|
736
|
+
const __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('runClaude-ChIbxtFs.cjs', document.baseURI).href)));
|
|
736
737
|
const __dirname$1 = path.join(__filename$1, "..");
|
|
737
738
|
function getGlobalClaudeVersion() {
|
|
738
739
|
try {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { useStdout, useInput, Box, Text, render } from 'ink';
|
|
2
2
|
import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { h as saveDiffRecords, i as extractUserText, j as isSystemMessage, k as generateStableUuid, l as findCodexSessionFile, m as connectionState, A as ApiClient } from './api-CKGCwsUf.mjs';
|
|
4
4
|
import { spawn, execSync } from 'node:child_process';
|
|
5
5
|
import { createInterface } from 'node:readline';
|
|
6
|
-
import { l as logger, i as isDebug, a as readSettings } from './persistence-
|
|
7
|
-
import { B as BasePermissionHandler, c as createSessionMetadata, s as setupOfflineReconnection } from './setupOfflineReconnection-
|
|
8
|
-
import { B as BaseReasoningProcessor, h as handleConfigMetadataEvent, s as summarizeBashToolOutput } from './loadableToolOutput-
|
|
6
|
+
import { l as logger, i as isDebug, a as readSettings } from './persistence-BirvtFep.mjs';
|
|
7
|
+
import { B as BasePermissionHandler, c as createSessionMetadata, s as setupOfflineReconnection } from './setupOfflineReconnection-DV3FASIY.mjs';
|
|
8
|
+
import { B as BaseReasoningProcessor, h as handleConfigMetadataEvent, s as summarizeBashToolOutput } from './loadableToolOutput-BRRL6yS-.mjs';
|
|
9
9
|
import { randomUUID } from 'node:crypto';
|
|
10
|
-
import { M as MessageQueue2, h as hashObject, a as MessageBuffer, p as parseClear, d as downloadImage } from './downloadImage-
|
|
11
|
-
import { i as initialMachineMetadata, s as stopCaffeinate } from './run-
|
|
12
|
-
import { c as createMcpContext, r as registerKillSessionHandler } from './registerKillSessionHandler-
|
|
10
|
+
import { M as MessageQueue2, h as hashObject, a as MessageBuffer, p as parseClear, d as downloadImage } from './downloadImage-K-xFB9jG.mjs';
|
|
11
|
+
import { i as initialMachineMetadata, s as stopCaffeinate } from './run-DNfj0j_h.mjs';
|
|
12
|
+
import { c as createMcpContext, r as registerKillSessionHandler } from './registerKillSessionHandler-CTSkaRVu.mjs';
|
|
13
13
|
import { g as getFirstTurnInstruction } from './constants-pmXZGibX.mjs';
|
|
14
|
-
import { notifyDaemonSessionStarted } from './controlClient-
|
|
14
|
+
import { notifyDaemonSessionStarted } from './controlClient-jullf1ow.mjs';
|
|
15
15
|
import { inspect } from 'node:util';
|
|
16
16
|
import { readFile } from 'node:fs/promises';
|
|
17
17
|
import { basename, isAbsolute } from 'node:path';
|
|
@@ -36,22 +36,23 @@ import 'crypto';
|
|
|
36
36
|
import 'tweetnacl';
|
|
37
37
|
import '@stablelib/base64';
|
|
38
38
|
import 'expo-server-sdk';
|
|
39
|
-
import './sessionKeyCache-
|
|
39
|
+
import './sessionKeyCache-Ci9NA8Nn.mjs';
|
|
40
40
|
import 'chalk';
|
|
41
41
|
import 'fs';
|
|
42
42
|
import 'os';
|
|
43
43
|
import 'tmp';
|
|
44
|
-
import './auth-CpHjpbeh.mjs';
|
|
45
|
-
import 'qrcode-terminal';
|
|
46
|
-
import './browser-cQ-qyFyK.mjs';
|
|
47
|
-
import 'open';
|
|
48
|
-
import './doctor-B95V4_1U.mjs';
|
|
49
44
|
import './doctor-ON7pN5G5.mjs';
|
|
50
45
|
import 'ps-list';
|
|
51
46
|
import 'cross-spawn';
|
|
52
|
-
import './
|
|
53
|
-
import './
|
|
54
|
-
import '
|
|
47
|
+
import './sessionDecrypt-R6Ee4mFr.mjs';
|
|
48
|
+
import './auth-CFcrX0sP.mjs';
|
|
49
|
+
import 'qrcode-terminal';
|
|
50
|
+
import './browser-eziH4OAA.mjs';
|
|
51
|
+
import 'open';
|
|
52
|
+
import './doctor-Brqp2e3O.mjs';
|
|
53
|
+
import './spawnHappyCLI-CSkTkB4n.mjs';
|
|
54
|
+
import './deviceKeys-su95gdc-.mjs';
|
|
55
|
+
import './install-BL0173KN.mjs';
|
|
55
56
|
import './trimIdent-BAjmv_TG.mjs';
|
|
56
57
|
import 'fastify';
|
|
57
58
|
import 'fastify-type-provider-zod';
|