very-happy-cli 0.2.109 → 0.2.111
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-Cc4Ilypg.cjs → AcpBackend-B_olk79F.cjs} +1 -1
- package/dist/{AcpBackend-DOzPxcth.mjs → AcpBackend-CeXVb_s_.mjs} +1 -1
- package/dist/{AcpSessionManager-CLfzatC_.cjs → AcpSessionManager-uXwWO2Tn.cjs} +1 -1
- package/dist/{AcpSessionManager-DDN-Yir4.mjs → AcpSessionManager-vqdqfD1l.mjs} +1 -1
- package/dist/{config-DiVKfYr0.cjs → config-BR3tkFL_.cjs} +2 -2
- package/dist/{config-DnvzvFHR.mjs → config-vGkcq9nM.mjs} +2 -2
- package/dist/{index-dd2R8uSE.cjs → index-BOoGJGQc.cjs} +90 -21
- package/dist/{index-DO-9Ep72.mjs → index-Bn-xsguz.mjs} +85 -18
- package/dist/{index-CGKxZKlo.mjs → index-C-RLk8-e.mjs} +2 -2
- package/dist/{index-D2qU5HP4.cjs → index-CtBP0Qvc.cjs} +4 -4
- package/dist/{index-DaQIcHvY.mjs → index-JAhGeW4_.mjs} +5 -5
- package/dist/{index-B2U15moC.cjs → index-SjthsMid.cjs} +2 -2
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{installTerminalHooks-BDagPTQW.mjs → installTerminalHooks-ADNcNdnB.mjs} +2 -2
- package/dist/{installTerminalHooks-BoUmuYdq.cjs → installTerminalHooks-FbKaK149.cjs} +2 -2
- package/dist/lib.cjs +1 -1
- package/dist/lib.mjs +1 -1
- package/dist/{mcp-Ck_y0mCB.mjs → mcp-DHPm_gvL.mjs} +2 -2
- package/dist/{mcp-Du1QEnIf.cjs → mcp-DPp-bYNE.cjs} +2 -2
- package/dist/{runGemini-D20S6Lc3.mjs → runGemini-CWWyjQMz.mjs} +4 -4
- package/dist/{runGemini-DV2M0A_k.cjs → runGemini-D5ySpYIZ.cjs} +4 -4
- package/dist/{runOpenClaw-CuuXkfDE.mjs → runOpenClaw-Bv4rUTyJ.mjs} +3 -3
- package/dist/{runOpenClaw-C1Q2zl--.cjs → runOpenClaw-Bwrb1LXP.cjs} +3 -3
- package/dist/{send-yUiBqHHL.mjs → send-BlkxFZu4.mjs} +2 -2
- package/dist/{send-CtgnnJic.cjs → send-DBfSNILO.cjs} +2 -2
- package/dist/{sessions-BsaCq0Do.mjs → sessions-1fW8soBM.mjs} +2 -2
- package/dist/{sessions-CbbZhOTy.cjs → sessions-CVuEsdRl.cjs} +2 -2
- package/dist/{spawn-BKBY9P3J.mjs → spawn-BorKN3W2.mjs} +56 -5
- package/dist/{spawn-CTO_hR8v.cjs → spawn-D_ZexrY9.cjs} +57 -4
- package/dist/{types-Cg8zzX_f.cjs → types-BG_5QKX5.cjs} +18 -10
- package/dist/{types-BKCvo4Cv.mjs → types-k_ipDb0c.mjs} +17 -9
- package/package.json +7 -7
|
@@ -3,7 +3,7 @@
|
|
|
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 persistence = require('./types-
|
|
6
|
+
var persistence = require('./types-BG_5QKX5.cjs');
|
|
7
7
|
|
|
8
8
|
const DEFAULT_TIMEOUTS = {
|
|
9
9
|
/** Default initialization timeout: 60 seconds */
|
|
@@ -1,7 +1,7 @@
|
|
|
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, d as contentLogMetadata, e as errorLogMetadata, f as packageJson, g as delay } from './types-
|
|
4
|
+
import { l as logger, d as contentLogMetadata, e as errorLogMetadata, f as packageJson, g as delay } from './types-k_ipDb0c.mjs';
|
|
5
5
|
|
|
6
6
|
const DEFAULT_TIMEOUTS = {
|
|
7
7
|
/** Default initialization timeout: 60 seconds */
|
|
@@ -4,8 +4,8 @@ var fs = require('fs');
|
|
|
4
4
|
var path = require('path');
|
|
5
5
|
var os = require('os');
|
|
6
6
|
var child_process = require('child_process');
|
|
7
|
-
var persistence = require('./types-
|
|
8
|
-
var index = require('./index-
|
|
7
|
+
var persistence = require('./types-BG_5QKX5.cjs');
|
|
8
|
+
var index = require('./index-BOoGJGQc.cjs');
|
|
9
9
|
require('axios');
|
|
10
10
|
require('chalk');
|
|
11
11
|
require('node:util');
|
|
@@ -2,8 +2,8 @@ import { existsSync, readFileSync, mkdirSync, writeFileSync } from 'fs';
|
|
|
2
2
|
import { join } from 'path';
|
|
3
3
|
import { homedir } from 'os';
|
|
4
4
|
import { execSync } from 'child_process';
|
|
5
|
-
import { l as logger } from './types-
|
|
6
|
-
import {
|
|
5
|
+
import { l as logger } from './types-k_ipDb0c.mjs';
|
|
6
|
+
import { g as DEFAULT_GEMINI_MODEL, G as GEMINI_MODEL_ENV } from './index-Bn-xsguz.mjs';
|
|
7
7
|
import 'axios';
|
|
8
8
|
import 'chalk';
|
|
9
9
|
import 'node:util';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var chalk = require('chalk');
|
|
4
4
|
var os = require('node:os');
|
|
5
5
|
var node_crypto = require('node:crypto');
|
|
6
|
-
var persistence = require('./types-
|
|
6
|
+
var persistence = require('./types-BG_5QKX5.cjs');
|
|
7
7
|
var spawn = require('cross-spawn');
|
|
8
8
|
var path = require('node:path');
|
|
9
9
|
var node_readline = require('node:readline');
|
|
@@ -191,7 +191,14 @@ async function stopDaemonSession(sessionId) {
|
|
|
191
191
|
return result.success || false;
|
|
192
192
|
}
|
|
193
193
|
async function spawnDaemonSession(directory, sessionId, opts) {
|
|
194
|
-
const result = await daemonPost("/spawn-session", {
|
|
194
|
+
const result = await daemonPost("/spawn-session", {
|
|
195
|
+
directory,
|
|
196
|
+
sessionId,
|
|
197
|
+
spawnedBy: opts?.spawnedBy,
|
|
198
|
+
permissionMode: opts?.permissionMode,
|
|
199
|
+
agent: opts?.agent,
|
|
200
|
+
environmentVariables: opts?.environmentVariables
|
|
201
|
+
});
|
|
195
202
|
return result;
|
|
196
203
|
}
|
|
197
204
|
async function notifyDaemonSessionEvent(sessionId, event, spawnedBy) {
|
|
@@ -6943,7 +6950,7 @@ function parseJsonObject(text) {
|
|
|
6943
6950
|
return null;
|
|
6944
6951
|
}
|
|
6945
6952
|
}
|
|
6946
|
-
function resolveSdkClaudeBinary(platform = process.platform, arch = process.arch, resolver = (s) => node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-
|
|
6953
|
+
function resolveSdkClaudeBinary(platform = process.platform, arch = process.arch, resolver = (s) => node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-BOoGJGQc.cjs', document.baseURI).href))).resolve(s)) {
|
|
6947
6954
|
const platformArch = `${platform}-${arch}`;
|
|
6948
6955
|
const candidates = [
|
|
6949
6956
|
`@anthropic-ai/claude-agent-sdk-${platformArch}/claude`,
|
|
@@ -7445,12 +7452,38 @@ function createMirrorScanner(opts) {
|
|
|
7445
7452
|
};
|
|
7446
7453
|
}
|
|
7447
7454
|
|
|
7455
|
+
const PENDING_CREATE_BACKOFF_MS = [1e4, 3e4, 6e4, 12e4, 3e5];
|
|
7456
|
+
const PENDING_CREATE_MAX_AGE_MS = 30 * 6e4;
|
|
7457
|
+
function backoffForAttempt(attempts) {
|
|
7458
|
+
const index = Math.min(Math.max(attempts, 1), PENDING_CREATE_BACKOFF_MS.length) - 1;
|
|
7459
|
+
return PENDING_CREATE_BACKOFF_MS[index];
|
|
7460
|
+
}
|
|
7461
|
+
function pendingCreateAfterFailure(previous, event, now) {
|
|
7462
|
+
const sameConversation = previous?.event.claudeSessionId === event.claudeSessionId;
|
|
7463
|
+
const attempts = sameConversation ? previous.attempts + 1 : 1;
|
|
7464
|
+
return {
|
|
7465
|
+
event,
|
|
7466
|
+
attempts,
|
|
7467
|
+
firstFailedAt: sameConversation ? previous.firstFailedAt : now,
|
|
7468
|
+
nextAttemptAt: now + backoffForAttempt(attempts)
|
|
7469
|
+
};
|
|
7470
|
+
}
|
|
7471
|
+
function planPendingCreate(pending, now) {
|
|
7472
|
+
if (now - pending.firstFailedAt >= PENDING_CREATE_MAX_AGE_MS) return "drop";
|
|
7473
|
+
return now >= pending.nextAttemptAt ? "retry" : "wait";
|
|
7474
|
+
}
|
|
7475
|
+
function pendingCreateSupersededBy(pending, event) {
|
|
7476
|
+
if (event.event === "SessionStart") return true;
|
|
7477
|
+
return pending.event.claudeSessionId === event.claudeSessionId;
|
|
7478
|
+
}
|
|
7479
|
+
|
|
7448
7480
|
const TERMINAL_MIRROR_FLAVOR = "terminal-mirror";
|
|
7449
7481
|
const RECONCILE_HYSTERESIS_MS = 2e4;
|
|
7450
7482
|
function createMirrorManager(deps) {
|
|
7451
7483
|
const backfillLines = deps.backfillLines ?? persistence.MIRROR_BACKFILL_LINES_DEFAULT;
|
|
7452
7484
|
const bindings = /* @__PURE__ */ new Map();
|
|
7453
7485
|
const lastEndedAt = /* @__PURE__ */ new Map();
|
|
7486
|
+
const pendingCreates = /* @__PURE__ */ new Map();
|
|
7454
7487
|
let chain = Promise.resolve();
|
|
7455
7488
|
const reactivate = async (binding) => {
|
|
7456
7489
|
try {
|
|
@@ -7610,6 +7643,14 @@ function createMirrorManager(deps) {
|
|
|
7610
7643
|
persistence.logger.debug(`[MIRROR] reconcile reactivated (in place) terminal ${binding.terminalId}`);
|
|
7611
7644
|
deps.onBindingsChanged?.();
|
|
7612
7645
|
};
|
|
7646
|
+
const parkFailedCreate = (event, reason) => {
|
|
7647
|
+
const pending = pendingCreateAfterFailure(pendingCreates.get(event.terminalId), event, Date.now());
|
|
7648
|
+
pendingCreates.set(event.terminalId, pending);
|
|
7649
|
+
persistence.logger.debug(
|
|
7650
|
+
`[MIRROR] mirror bind failed for terminal ${event.terminalId} (attempt ${pending.attempts}, retrying):`,
|
|
7651
|
+
reason
|
|
7652
|
+
);
|
|
7653
|
+
};
|
|
7613
7654
|
const createBinding = async (event, replaces) => {
|
|
7614
7655
|
if (replaces) {
|
|
7615
7656
|
await teardownBinding(replaces, "superseded by a fresh conversation");
|
|
@@ -7631,11 +7672,18 @@ function createMirrorManager(deps) {
|
|
|
7631
7672
|
terminalId: event.terminalId,
|
|
7632
7673
|
claudeSessionId: event.claudeSessionId
|
|
7633
7674
|
};
|
|
7634
|
-
|
|
7675
|
+
let response = null;
|
|
7676
|
+
try {
|
|
7677
|
+
response = await deps.api.getOrCreateSession({ tag: node_crypto.randomUUID(), metadata, state: {} });
|
|
7678
|
+
} catch (error) {
|
|
7679
|
+
parkFailedCreate(event, error);
|
|
7680
|
+
return;
|
|
7681
|
+
}
|
|
7635
7682
|
if (!response) {
|
|
7636
|
-
|
|
7683
|
+
parkFailedCreate(event, "server unreachable");
|
|
7637
7684
|
return;
|
|
7638
7685
|
}
|
|
7686
|
+
pendingCreates.delete(event.terminalId);
|
|
7639
7687
|
const client = deps.api.sessionSyncClient(response);
|
|
7640
7688
|
client.skipExistingMessages();
|
|
7641
7689
|
const binding = {
|
|
@@ -7691,6 +7739,8 @@ function createMirrorManager(deps) {
|
|
|
7691
7739
|
persistence.logger.debug(`[MIRROR] terminal ${binding.terminalId} mirror continues as claude ${event.claudeSessionId}`);
|
|
7692
7740
|
};
|
|
7693
7741
|
const handleEvent = async (event) => {
|
|
7742
|
+
const parked = pendingCreates.get(event.terminalId);
|
|
7743
|
+
if (parked && pendingCreateSupersededBy(parked, event)) pendingCreates.delete(event.terminalId);
|
|
7694
7744
|
const binding = bindings.get(event.terminalId) ?? null;
|
|
7695
7745
|
const decision = persistence.decideMirrorBinding(
|
|
7696
7746
|
event,
|
|
@@ -7723,6 +7773,7 @@ function createMirrorManager(deps) {
|
|
|
7723
7773
|
});
|
|
7724
7774
|
},
|
|
7725
7775
|
onTerminalClosed(terminalId) {
|
|
7776
|
+
pendingCreates.delete(terminalId);
|
|
7726
7777
|
const binding = bindings.get(terminalId);
|
|
7727
7778
|
if (!binding) return;
|
|
7728
7779
|
chain = chain.then(() => teardownBinding(binding, "terminal closed")).catch((error) => {
|
|
@@ -7746,6 +7797,7 @@ function createMirrorManager(deps) {
|
|
|
7746
7797
|
for (const item of list) {
|
|
7747
7798
|
const binding = bindings.get(item.id) ?? null;
|
|
7748
7799
|
if (item.agentState === "shell") {
|
|
7800
|
+
pendingCreates.delete(item.id);
|
|
7749
7801
|
if (binding && binding.status === "active") {
|
|
7750
7802
|
chain = chain.then(() => {
|
|
7751
7803
|
const b = bindings.get(item.id);
|
|
@@ -7769,6 +7821,21 @@ function createMirrorManager(deps) {
|
|
|
7769
7821
|
return b && b.status === "ended" ? reactivateInPlace(b) : void 0;
|
|
7770
7822
|
}).catch((e) => persistence.logger.debug(`[MIRROR] reconcile in-place reactivate failed for ${item.id}:`, e));
|
|
7771
7823
|
} else if (!binding) {
|
|
7824
|
+
const pending = pendingCreates.get(item.id);
|
|
7825
|
+
if (pending) {
|
|
7826
|
+
const decision = planPendingCreate(pending, now);
|
|
7827
|
+
if (decision === "drop") {
|
|
7828
|
+
pendingCreates.delete(item.id);
|
|
7829
|
+
persistence.logger.debug(`[MIRROR] giving up on the parked mirror bind for terminal ${item.id}`);
|
|
7830
|
+
} else if (decision === "retry") {
|
|
7831
|
+
chain = chain.then(() => {
|
|
7832
|
+
const still = pendingCreates.get(item.id);
|
|
7833
|
+
if (!still || still !== pending || bindings.has(item.id)) return void 0;
|
|
7834
|
+
return createBinding(still.event);
|
|
7835
|
+
}).catch((e) => persistence.logger.debug(`[MIRROR] reconcile create retry failed for ${item.id}:`, e));
|
|
7836
|
+
}
|
|
7837
|
+
continue;
|
|
7838
|
+
}
|
|
7772
7839
|
persisted ??= persistence.readPersistedSessions();
|
|
7773
7840
|
const p = persisted;
|
|
7774
7841
|
chain = chain.then(() => {
|
|
@@ -10330,7 +10397,7 @@ function registerSideQuestionHandler(rpc, deps) {
|
|
|
10330
10397
|
const retainMs = deps.retainMs ?? SIDE_QUESTION_RETAIN_MS;
|
|
10331
10398
|
const maxRunMs = deps.maxRunMs ?? SIDE_QUESTION_MAX_RUN_MS;
|
|
10332
10399
|
const run = deps.run ?? (async (input) => {
|
|
10333
|
-
const { query } = await Promise.resolve().then(function () { return require('./index-
|
|
10400
|
+
const { query } = await Promise.resolve().then(function () { return require('./index-SjthsMid.cjs'); });
|
|
10334
10401
|
return runSideQuestion(query, input);
|
|
10335
10402
|
});
|
|
10336
10403
|
const slots = /* @__PURE__ */ new Map();
|
|
@@ -10432,7 +10499,7 @@ const MAX_TITLE_CHARS = 60;
|
|
|
10432
10499
|
const GENERATION_TIMEOUT_MS = 3e4;
|
|
10433
10500
|
function resolveClaudeBinary() {
|
|
10434
10501
|
try {
|
|
10435
|
-
const require$1 = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-
|
|
10502
|
+
const require$1 = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-BOoGJGQc.cjs', document.baseURI).href)));
|
|
10436
10503
|
const utilsPath = path.resolve(path.join(persistence.projectPath(), "scripts", "claude_version_utils.cjs"));
|
|
10437
10504
|
const { getClaudeCliPath } = require$1(utilsPath);
|
|
10438
10505
|
const path$1 = getClaudeCliPath();
|
|
@@ -12634,9 +12701,9 @@ function resolveLocalSignupBootstrap(configuredMode, configuredInviteCodes, gene
|
|
|
12634
12701
|
};
|
|
12635
12702
|
}
|
|
12636
12703
|
|
|
12637
|
-
const __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-
|
|
12704
|
+
const __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-BOoGJGQc.cjs', document.baseURI).href)));
|
|
12638
12705
|
const __dirname$1 = path.dirname(__filename$1);
|
|
12639
|
-
const require_ = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-
|
|
12706
|
+
const require_ = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-BOoGJGQc.cjs', document.baseURI).href)));
|
|
12640
12707
|
const PRISMA_QUERY_ENGINE_FILES = {
|
|
12641
12708
|
"arm64-darwin": "libquery_engine-darwin-arm64.dylib.node",
|
|
12642
12709
|
"x64-darwin": "libquery_engine-darwin.dylib.node",
|
|
@@ -15260,7 +15327,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15260
15327
|
process.exit(0);
|
|
15261
15328
|
} else if (subcommand === "install-terminal-hooks") {
|
|
15262
15329
|
try {
|
|
15263
|
-
const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await Promise.resolve().then(function () { return require('./installTerminalHooks-
|
|
15330
|
+
const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await Promise.resolve().then(function () { return require('./installTerminalHooks-FbKaK149.cjs'); });
|
|
15264
15331
|
const command = parseTerminalHooksArgs(args.slice(1));
|
|
15265
15332
|
if (command.action === "help") {
|
|
15266
15333
|
console.log(TERMINAL_HOOKS_HELP);
|
|
@@ -15277,7 +15344,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15277
15344
|
}
|
|
15278
15345
|
} else if (subcommand === "spawn") {
|
|
15279
15346
|
try {
|
|
15280
|
-
const { handleSpawnCommand } = await Promise.resolve().then(function () { return require('./spawn-
|
|
15347
|
+
const { handleSpawnCommand } = await Promise.resolve().then(function () { return require('./spawn-D_ZexrY9.cjs'); });
|
|
15281
15348
|
await handleSpawnCommand(args.slice(1));
|
|
15282
15349
|
} catch (error) {
|
|
15283
15350
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -15289,7 +15356,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15289
15356
|
return;
|
|
15290
15357
|
} else if (subcommand === "sessions") {
|
|
15291
15358
|
try {
|
|
15292
|
-
const { handleSessionsCommand } = await Promise.resolve().then(function () { return require('./sessions-
|
|
15359
|
+
const { handleSessionsCommand } = await Promise.resolve().then(function () { return require('./sessions-CVuEsdRl.cjs'); });
|
|
15293
15360
|
await handleSessionsCommand(args.slice(1));
|
|
15294
15361
|
} catch (error) {
|
|
15295
15362
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -15301,7 +15368,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15301
15368
|
return;
|
|
15302
15369
|
} else if (subcommand === "send") {
|
|
15303
15370
|
try {
|
|
15304
|
-
const { handleSendCommand } = await Promise.resolve().then(function () { return require('./send-
|
|
15371
|
+
const { handleSendCommand } = await Promise.resolve().then(function () { return require('./send-DBfSNILO.cjs'); });
|
|
15305
15372
|
await handleSendCommand(args.slice(1));
|
|
15306
15373
|
} catch (error) {
|
|
15307
15374
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -15407,9 +15474,9 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15407
15474
|
if (geminiSubcommand === "project" && args[2] === "set" && args[3]) {
|
|
15408
15475
|
const projectId = args[3];
|
|
15409
15476
|
try {
|
|
15410
|
-
const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return require('./config-
|
|
15411
|
-
const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await Promise.resolve().then(function () { return require('./types-
|
|
15412
|
-
const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./types-
|
|
15477
|
+
const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return require('./config-BR3tkFL_.cjs'); });
|
|
15478
|
+
const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await Promise.resolve().then(function () { return require('./types-BG_5QKX5.cjs'); }).then(function (n) { return n.persistence; });
|
|
15479
|
+
const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./types-BG_5QKX5.cjs'); }).then(function (n) { return n.api; });
|
|
15413
15480
|
let userEmail = void 0;
|
|
15414
15481
|
try {
|
|
15415
15482
|
const credentials = await readCredentialsForConfiguredRelay2();
|
|
@@ -15440,7 +15507,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15440
15507
|
}
|
|
15441
15508
|
if (geminiSubcommand === "project" && args[2] === "get") {
|
|
15442
15509
|
try {
|
|
15443
|
-
const { readGeminiLocalConfig } = await Promise.resolve().then(function () { return require('./config-
|
|
15510
|
+
const { readGeminiLocalConfig } = await Promise.resolve().then(function () { return require('./config-BR3tkFL_.cjs'); });
|
|
15444
15511
|
const config = readGeminiLocalConfig();
|
|
15445
15512
|
if (config.googleCloudProject) {
|
|
15446
15513
|
console.log(`Current Google Cloud Project: ${config.googleCloudProject}`);
|
|
@@ -15480,7 +15547,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15480
15547
|
process.exit(0);
|
|
15481
15548
|
}
|
|
15482
15549
|
try {
|
|
15483
|
-
const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-
|
|
15550
|
+
const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-D5ySpYIZ.cjs'); });
|
|
15484
15551
|
let startedBy = void 0;
|
|
15485
15552
|
for (let i = 1; i < args.length; i++) {
|
|
15486
15553
|
if (args[i] === "--started-by") {
|
|
@@ -15502,7 +15569,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15502
15569
|
return;
|
|
15503
15570
|
} else if (subcommand === "acp") {
|
|
15504
15571
|
try {
|
|
15505
|
-
const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-
|
|
15572
|
+
const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-CtBP0Qvc.cjs'); });
|
|
15506
15573
|
let startedBy = void 0;
|
|
15507
15574
|
let verbose = false;
|
|
15508
15575
|
const acpArgs = [];
|
|
@@ -15542,7 +15609,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15542
15609
|
return;
|
|
15543
15610
|
} else if (subcommand === "openclaw") {
|
|
15544
15611
|
try {
|
|
15545
|
-
const { runOpenClaw } = await Promise.resolve().then(function () { return require('./runOpenClaw-
|
|
15612
|
+
const { runOpenClaw } = await Promise.resolve().then(function () { return require('./runOpenClaw-Bwrb1LXP.cjs'); });
|
|
15546
15613
|
let startedBy = void 0;
|
|
15547
15614
|
let verbose = false;
|
|
15548
15615
|
let gatewayUrl;
|
|
@@ -15593,7 +15660,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15593
15660
|
return;
|
|
15594
15661
|
} else if (subcommand === "mcp" && args.length === 1) {
|
|
15595
15662
|
try {
|
|
15596
|
-
const { handleMcpCommand } = await Promise.resolve().then(function () { return require('./mcp-
|
|
15663
|
+
const { handleMcpCommand } = await Promise.resolve().then(function () { return require('./mcp-DPp-bYNE.cjs'); });
|
|
15597
15664
|
await handleMcpCommand();
|
|
15598
15665
|
} catch (error) {
|
|
15599
15666
|
process.stderr.write(`[very-happy mcp] Fatal: ${error instanceof Error ? error.message : String(error)}
|
|
@@ -15951,6 +16018,7 @@ ${chalk.bold("Examples:")}
|
|
|
15951
16018
|
}
|
|
15952
16019
|
}
|
|
15953
16020
|
|
|
16021
|
+
exports.ALLOWED_SPAWN_PERMISSION_MODES = ALLOWED_SPAWN_PERMISSION_MODES;
|
|
15954
16022
|
exports.BasePermissionHandler = BasePermissionHandler;
|
|
15955
16023
|
exports.BaseReasoningProcessor = BaseReasoningProcessor;
|
|
15956
16024
|
exports.CHANGE_TITLE_INSTRUCTION = CHANGE_TITLE_INSTRUCTION;
|
|
@@ -15974,6 +16042,7 @@ exports.pushClipboardViaDaemon = pushClipboardViaDaemon;
|
|
|
15974
16042
|
exports.query = query;
|
|
15975
16043
|
exports.readSessionTranscript = readSessionTranscript;
|
|
15976
16044
|
exports.registerKillSessionHandler = registerKillSessionHandler;
|
|
16045
|
+
exports.sanitizeSpawnPermissionMode = sanitizeSpawnPermissionMode;
|
|
15977
16046
|
exports.sendUserMessage = sendUserMessage;
|
|
15978
16047
|
exports.sessionWebUrl = sessionWebUrl;
|
|
15979
16048
|
exports.setupOfflineReconnection = setupOfflineReconnection;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import chalk from 'chalk';
|
|
2
2
|
import os, { homedir, userInfo } from 'node:os';
|
|
3
3
|
import { randomUUID, randomBytes, createHash as createHash$1, timingSafeEqual } from 'node:crypto';
|
|
4
|
-
import { o as readDaemonState, l as logger, c as configuration, q as clearDaemonState, s as getProjectPath, p as projectPath, t as initializeSandbox, u as wrapCommand, d as contentLogMetadata, I as InvalidateSync, R as RawJSONLinesSchema, g as delay, v as AsyncLock, x as ensurePrivateDirectory, M as MAX_CHAT_ATTACHMENT_SOURCE_BYTES, y as hardenPrivateFile, f as packageJson, j as readSettings, z as readCredentials, B as credentialRelayProblem, C as deriveLocalCliUpdateSummary, k as encodeBase64, D as updateSettings, E as encodeBase64Url, F as decodeBase64, G as writeCredentialsLegacy, H as writeCredentialsDataKey, J as readCredentialsForConfiguredRelay, K as encrypt, r as readPersistedSessions, L as isClaudeSessionId, N as getLocalHappyAgentCredentialPath, O as readLocalHappyAgentCredentials, P as decryptWithDataKey, Q as decryptLegacy, S as extractCompleteLines, T as decideBackfill, U as parseTerminalHookPayload, V as tmuxArgs, W as scrubTmuxClientEnv, X as decideMirrorBinding, Y as MIRROR_BACKFILL_LINES_DEFAULT, Z as persistSession, _ as mirrorLineKey, $ as mirrorLocalId, w as writePrivateFileSync, a0 as detectResumeSupport, a1 as detectCLIAvailability, a2 as acquireDaemonLock, a3 as summarizeSpawnSessionForLog, a4 as deletePersistedSessions, a5 as shellescape, a6 as decrypt, a7 as writeDaemonState, A as ApiClient, a8 as writeSettings, a9 as fetchCliUpdateState, aa as resolveCliUpdateCheckInterval, ab as DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS, ac as releaseDaemonLock, i as isValidSessionId, ad as listVhTerminals, ae as isValidTerminalId, af as readVhTerminal, ag as sendToVhTerminal, ah as TITLE_PROMPT_PREFIX, ai as BOARD_ANALYZER_PROMPT_PREFIX, h as connectionState, aj as startOfflineReconnection, ak as clearCredentials, al as clearMachineId, m as ensurePrivateDirectorySync, am as SandboxConfigSchema, b as createEnvelope, an as CodexAppServerClient, ao as getLatestDaemonLog } from './types-
|
|
4
|
+
import { o as readDaemonState, l as logger, c as configuration, q as clearDaemonState, s as getProjectPath, p as projectPath, t as initializeSandbox, u as wrapCommand, d as contentLogMetadata, I as InvalidateSync, R as RawJSONLinesSchema, g as delay, v as AsyncLock, x as ensurePrivateDirectory, M as MAX_CHAT_ATTACHMENT_SOURCE_BYTES, y as hardenPrivateFile, f as packageJson, j as readSettings, z as readCredentials, B as credentialRelayProblem, C as deriveLocalCliUpdateSummary, k as encodeBase64, D as updateSettings, E as encodeBase64Url, F as decodeBase64, G as writeCredentialsLegacy, H as writeCredentialsDataKey, J as readCredentialsForConfiguredRelay, K as encrypt, r as readPersistedSessions, L as isClaudeSessionId, N as getLocalHappyAgentCredentialPath, O as readLocalHappyAgentCredentials, P as decryptWithDataKey, Q as decryptLegacy, S as extractCompleteLines, T as decideBackfill, U as parseTerminalHookPayload, V as tmuxArgs, W as scrubTmuxClientEnv, X as decideMirrorBinding, Y as MIRROR_BACKFILL_LINES_DEFAULT, Z as persistSession, _ as mirrorLineKey, $ as mirrorLocalId, w as writePrivateFileSync, a0 as detectResumeSupport, a1 as detectCLIAvailability, a2 as acquireDaemonLock, a3 as summarizeSpawnSessionForLog, a4 as deletePersistedSessions, a5 as shellescape, a6 as decrypt, a7 as writeDaemonState, A as ApiClient, a8 as writeSettings, a9 as fetchCliUpdateState, aa as resolveCliUpdateCheckInterval, ab as DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS, ac as releaseDaemonLock, i as isValidSessionId, ad as listVhTerminals, ae as isValidTerminalId, af as readVhTerminal, ag as sendToVhTerminal, ah as TITLE_PROMPT_PREFIX, ai as BOARD_ANALYZER_PROMPT_PREFIX, h as connectionState, aj as startOfflineReconnection, ak as clearCredentials, al as clearMachineId, m as ensurePrivateDirectorySync, am as SandboxConfigSchema, b as createEnvelope, an as CodexAppServerClient, ao as getLatestDaemonLog } from './types-k_ipDb0c.mjs';
|
|
5
5
|
import spawn$1, { spawn } from 'cross-spawn';
|
|
6
6
|
import path, { join, resolve, basename, delimiter, isAbsolute, normalize, sep, dirname } from 'node:path';
|
|
7
7
|
import { createInterface } from 'node:readline';
|
|
@@ -169,7 +169,14 @@ async function stopDaemonSession(sessionId) {
|
|
|
169
169
|
return result.success || false;
|
|
170
170
|
}
|
|
171
171
|
async function spawnDaemonSession(directory, sessionId, opts) {
|
|
172
|
-
const result = await daemonPost("/spawn-session", {
|
|
172
|
+
const result = await daemonPost("/spawn-session", {
|
|
173
|
+
directory,
|
|
174
|
+
sessionId,
|
|
175
|
+
spawnedBy: opts?.spawnedBy,
|
|
176
|
+
permissionMode: opts?.permissionMode,
|
|
177
|
+
agent: opts?.agent,
|
|
178
|
+
environmentVariables: opts?.environmentVariables
|
|
179
|
+
});
|
|
173
180
|
return result;
|
|
174
181
|
}
|
|
175
182
|
async function notifyDaemonSessionEvent(sessionId, event, spawnedBy) {
|
|
@@ -7423,12 +7430,38 @@ function createMirrorScanner(opts) {
|
|
|
7423
7430
|
};
|
|
7424
7431
|
}
|
|
7425
7432
|
|
|
7433
|
+
const PENDING_CREATE_BACKOFF_MS = [1e4, 3e4, 6e4, 12e4, 3e5];
|
|
7434
|
+
const PENDING_CREATE_MAX_AGE_MS = 30 * 6e4;
|
|
7435
|
+
function backoffForAttempt(attempts) {
|
|
7436
|
+
const index = Math.min(Math.max(attempts, 1), PENDING_CREATE_BACKOFF_MS.length) - 1;
|
|
7437
|
+
return PENDING_CREATE_BACKOFF_MS[index];
|
|
7438
|
+
}
|
|
7439
|
+
function pendingCreateAfterFailure(previous, event, now) {
|
|
7440
|
+
const sameConversation = previous?.event.claudeSessionId === event.claudeSessionId;
|
|
7441
|
+
const attempts = sameConversation ? previous.attempts + 1 : 1;
|
|
7442
|
+
return {
|
|
7443
|
+
event,
|
|
7444
|
+
attempts,
|
|
7445
|
+
firstFailedAt: sameConversation ? previous.firstFailedAt : now,
|
|
7446
|
+
nextAttemptAt: now + backoffForAttempt(attempts)
|
|
7447
|
+
};
|
|
7448
|
+
}
|
|
7449
|
+
function planPendingCreate(pending, now) {
|
|
7450
|
+
if (now - pending.firstFailedAt >= PENDING_CREATE_MAX_AGE_MS) return "drop";
|
|
7451
|
+
return now >= pending.nextAttemptAt ? "retry" : "wait";
|
|
7452
|
+
}
|
|
7453
|
+
function pendingCreateSupersededBy(pending, event) {
|
|
7454
|
+
if (event.event === "SessionStart") return true;
|
|
7455
|
+
return pending.event.claudeSessionId === event.claudeSessionId;
|
|
7456
|
+
}
|
|
7457
|
+
|
|
7426
7458
|
const TERMINAL_MIRROR_FLAVOR = "terminal-mirror";
|
|
7427
7459
|
const RECONCILE_HYSTERESIS_MS = 2e4;
|
|
7428
7460
|
function createMirrorManager(deps) {
|
|
7429
7461
|
const backfillLines = deps.backfillLines ?? MIRROR_BACKFILL_LINES_DEFAULT;
|
|
7430
7462
|
const bindings = /* @__PURE__ */ new Map();
|
|
7431
7463
|
const lastEndedAt = /* @__PURE__ */ new Map();
|
|
7464
|
+
const pendingCreates = /* @__PURE__ */ new Map();
|
|
7432
7465
|
let chain = Promise.resolve();
|
|
7433
7466
|
const reactivate = async (binding) => {
|
|
7434
7467
|
try {
|
|
@@ -7588,6 +7621,14 @@ function createMirrorManager(deps) {
|
|
|
7588
7621
|
logger.debug(`[MIRROR] reconcile reactivated (in place) terminal ${binding.terminalId}`);
|
|
7589
7622
|
deps.onBindingsChanged?.();
|
|
7590
7623
|
};
|
|
7624
|
+
const parkFailedCreate = (event, reason) => {
|
|
7625
|
+
const pending = pendingCreateAfterFailure(pendingCreates.get(event.terminalId), event, Date.now());
|
|
7626
|
+
pendingCreates.set(event.terminalId, pending);
|
|
7627
|
+
logger.debug(
|
|
7628
|
+
`[MIRROR] mirror bind failed for terminal ${event.terminalId} (attempt ${pending.attempts}, retrying):`,
|
|
7629
|
+
reason
|
|
7630
|
+
);
|
|
7631
|
+
};
|
|
7591
7632
|
const createBinding = async (event, replaces) => {
|
|
7592
7633
|
if (replaces) {
|
|
7593
7634
|
await teardownBinding(replaces, "superseded by a fresh conversation");
|
|
@@ -7609,11 +7650,18 @@ function createMirrorManager(deps) {
|
|
|
7609
7650
|
terminalId: event.terminalId,
|
|
7610
7651
|
claudeSessionId: event.claudeSessionId
|
|
7611
7652
|
};
|
|
7612
|
-
|
|
7653
|
+
let response = null;
|
|
7654
|
+
try {
|
|
7655
|
+
response = await deps.api.getOrCreateSession({ tag: randomUUID(), metadata, state: {} });
|
|
7656
|
+
} catch (error) {
|
|
7657
|
+
parkFailedCreate(event, error);
|
|
7658
|
+
return;
|
|
7659
|
+
}
|
|
7613
7660
|
if (!response) {
|
|
7614
|
-
|
|
7661
|
+
parkFailedCreate(event, "server unreachable");
|
|
7615
7662
|
return;
|
|
7616
7663
|
}
|
|
7664
|
+
pendingCreates.delete(event.terminalId);
|
|
7617
7665
|
const client = deps.api.sessionSyncClient(response);
|
|
7618
7666
|
client.skipExistingMessages();
|
|
7619
7667
|
const binding = {
|
|
@@ -7669,6 +7717,8 @@ function createMirrorManager(deps) {
|
|
|
7669
7717
|
logger.debug(`[MIRROR] terminal ${binding.terminalId} mirror continues as claude ${event.claudeSessionId}`);
|
|
7670
7718
|
};
|
|
7671
7719
|
const handleEvent = async (event) => {
|
|
7720
|
+
const parked = pendingCreates.get(event.terminalId);
|
|
7721
|
+
if (parked && pendingCreateSupersededBy(parked, event)) pendingCreates.delete(event.terminalId);
|
|
7672
7722
|
const binding = bindings.get(event.terminalId) ?? null;
|
|
7673
7723
|
const decision = decideMirrorBinding(
|
|
7674
7724
|
event,
|
|
@@ -7701,6 +7751,7 @@ function createMirrorManager(deps) {
|
|
|
7701
7751
|
});
|
|
7702
7752
|
},
|
|
7703
7753
|
onTerminalClosed(terminalId) {
|
|
7754
|
+
pendingCreates.delete(terminalId);
|
|
7704
7755
|
const binding = bindings.get(terminalId);
|
|
7705
7756
|
if (!binding) return;
|
|
7706
7757
|
chain = chain.then(() => teardownBinding(binding, "terminal closed")).catch((error) => {
|
|
@@ -7724,6 +7775,7 @@ function createMirrorManager(deps) {
|
|
|
7724
7775
|
for (const item of list) {
|
|
7725
7776
|
const binding = bindings.get(item.id) ?? null;
|
|
7726
7777
|
if (item.agentState === "shell") {
|
|
7778
|
+
pendingCreates.delete(item.id);
|
|
7727
7779
|
if (binding && binding.status === "active") {
|
|
7728
7780
|
chain = chain.then(() => {
|
|
7729
7781
|
const b = bindings.get(item.id);
|
|
@@ -7747,6 +7799,21 @@ function createMirrorManager(deps) {
|
|
|
7747
7799
|
return b && b.status === "ended" ? reactivateInPlace(b) : void 0;
|
|
7748
7800
|
}).catch((e) => logger.debug(`[MIRROR] reconcile in-place reactivate failed for ${item.id}:`, e));
|
|
7749
7801
|
} else if (!binding) {
|
|
7802
|
+
const pending = pendingCreates.get(item.id);
|
|
7803
|
+
if (pending) {
|
|
7804
|
+
const decision = planPendingCreate(pending, now);
|
|
7805
|
+
if (decision === "drop") {
|
|
7806
|
+
pendingCreates.delete(item.id);
|
|
7807
|
+
logger.debug(`[MIRROR] giving up on the parked mirror bind for terminal ${item.id}`);
|
|
7808
|
+
} else if (decision === "retry") {
|
|
7809
|
+
chain = chain.then(() => {
|
|
7810
|
+
const still = pendingCreates.get(item.id);
|
|
7811
|
+
if (!still || still !== pending || bindings.has(item.id)) return void 0;
|
|
7812
|
+
return createBinding(still.event);
|
|
7813
|
+
}).catch((e) => logger.debug(`[MIRROR] reconcile create retry failed for ${item.id}:`, e));
|
|
7814
|
+
}
|
|
7815
|
+
continue;
|
|
7816
|
+
}
|
|
7750
7817
|
persisted ??= readPersistedSessions();
|
|
7751
7818
|
const p = persisted;
|
|
7752
7819
|
chain = chain.then(() => {
|
|
@@ -10308,7 +10375,7 @@ function registerSideQuestionHandler(rpc, deps) {
|
|
|
10308
10375
|
const retainMs = deps.retainMs ?? SIDE_QUESTION_RETAIN_MS;
|
|
10309
10376
|
const maxRunMs = deps.maxRunMs ?? SIDE_QUESTION_MAX_RUN_MS;
|
|
10310
10377
|
const run = deps.run ?? (async (input) => {
|
|
10311
|
-
const { query } = await import('./index-
|
|
10378
|
+
const { query } = await import('./index-C-RLk8-e.mjs');
|
|
10312
10379
|
return runSideQuestion(query, input);
|
|
10313
10380
|
});
|
|
10314
10381
|
const slots = /* @__PURE__ */ new Map();
|
|
@@ -15238,7 +15305,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15238
15305
|
process.exit(0);
|
|
15239
15306
|
} else if (subcommand === "install-terminal-hooks") {
|
|
15240
15307
|
try {
|
|
15241
|
-
const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await import('./installTerminalHooks-
|
|
15308
|
+
const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await import('./installTerminalHooks-ADNcNdnB.mjs');
|
|
15242
15309
|
const command = parseTerminalHooksArgs(args.slice(1));
|
|
15243
15310
|
if (command.action === "help") {
|
|
15244
15311
|
console.log(TERMINAL_HOOKS_HELP);
|
|
@@ -15255,7 +15322,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15255
15322
|
}
|
|
15256
15323
|
} else if (subcommand === "spawn") {
|
|
15257
15324
|
try {
|
|
15258
|
-
const { handleSpawnCommand } = await import('./spawn-
|
|
15325
|
+
const { handleSpawnCommand } = await import('./spawn-BorKN3W2.mjs');
|
|
15259
15326
|
await handleSpawnCommand(args.slice(1));
|
|
15260
15327
|
} catch (error) {
|
|
15261
15328
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -15267,7 +15334,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15267
15334
|
return;
|
|
15268
15335
|
} else if (subcommand === "sessions") {
|
|
15269
15336
|
try {
|
|
15270
|
-
const { handleSessionsCommand } = await import('./sessions-
|
|
15337
|
+
const { handleSessionsCommand } = await import('./sessions-1fW8soBM.mjs');
|
|
15271
15338
|
await handleSessionsCommand(args.slice(1));
|
|
15272
15339
|
} catch (error) {
|
|
15273
15340
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -15279,7 +15346,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15279
15346
|
return;
|
|
15280
15347
|
} else if (subcommand === "send") {
|
|
15281
15348
|
try {
|
|
15282
|
-
const { handleSendCommand } = await import('./send-
|
|
15349
|
+
const { handleSendCommand } = await import('./send-BlkxFZu4.mjs');
|
|
15283
15350
|
await handleSendCommand(args.slice(1));
|
|
15284
15351
|
} catch (error) {
|
|
15285
15352
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -15385,9 +15452,9 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15385
15452
|
if (geminiSubcommand === "project" && args[2] === "set" && args[3]) {
|
|
15386
15453
|
const projectId = args[3];
|
|
15387
15454
|
try {
|
|
15388
|
-
const { saveGoogleCloudProjectToConfig } = await import('./config-
|
|
15389
|
-
const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await import('./types-
|
|
15390
|
-
const { ApiClient: ApiClient2 } = await import('./types-
|
|
15455
|
+
const { saveGoogleCloudProjectToConfig } = await import('./config-vGkcq9nM.mjs');
|
|
15456
|
+
const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await import('./types-k_ipDb0c.mjs').then(function (n) { return n.ap; });
|
|
15457
|
+
const { ApiClient: ApiClient2 } = await import('./types-k_ipDb0c.mjs').then(function (n) { return n.aq; });
|
|
15391
15458
|
let userEmail = void 0;
|
|
15392
15459
|
try {
|
|
15393
15460
|
const credentials = await readCredentialsForConfiguredRelay2();
|
|
@@ -15418,7 +15485,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15418
15485
|
}
|
|
15419
15486
|
if (geminiSubcommand === "project" && args[2] === "get") {
|
|
15420
15487
|
try {
|
|
15421
|
-
const { readGeminiLocalConfig } = await import('./config-
|
|
15488
|
+
const { readGeminiLocalConfig } = await import('./config-vGkcq9nM.mjs');
|
|
15422
15489
|
const config = readGeminiLocalConfig();
|
|
15423
15490
|
if (config.googleCloudProject) {
|
|
15424
15491
|
console.log(`Current Google Cloud Project: ${config.googleCloudProject}`);
|
|
@@ -15458,7 +15525,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15458
15525
|
process.exit(0);
|
|
15459
15526
|
}
|
|
15460
15527
|
try {
|
|
15461
|
-
const { runGemini } = await import('./runGemini-
|
|
15528
|
+
const { runGemini } = await import('./runGemini-CWWyjQMz.mjs');
|
|
15462
15529
|
let startedBy = void 0;
|
|
15463
15530
|
for (let i = 1; i < args.length; i++) {
|
|
15464
15531
|
if (args[i] === "--started-by") {
|
|
@@ -15480,7 +15547,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15480
15547
|
return;
|
|
15481
15548
|
} else if (subcommand === "acp") {
|
|
15482
15549
|
try {
|
|
15483
|
-
const { runAcp, resolveAcpAgentConfig } = await import('./index-
|
|
15550
|
+
const { runAcp, resolveAcpAgentConfig } = await import('./index-JAhGeW4_.mjs');
|
|
15484
15551
|
let startedBy = void 0;
|
|
15485
15552
|
let verbose = false;
|
|
15486
15553
|
const acpArgs = [];
|
|
@@ -15520,7 +15587,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15520
15587
|
return;
|
|
15521
15588
|
} else if (subcommand === "openclaw") {
|
|
15522
15589
|
try {
|
|
15523
|
-
const { runOpenClaw } = await import('./runOpenClaw-
|
|
15590
|
+
const { runOpenClaw } = await import('./runOpenClaw-Bv4rUTyJ.mjs');
|
|
15524
15591
|
let startedBy = void 0;
|
|
15525
15592
|
let verbose = false;
|
|
15526
15593
|
let gatewayUrl;
|
|
@@ -15571,7 +15638,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15571
15638
|
return;
|
|
15572
15639
|
} else if (subcommand === "mcp" && args.length === 1) {
|
|
15573
15640
|
try {
|
|
15574
|
-
const { handleMcpCommand } = await import('./mcp-
|
|
15641
|
+
const { handleMcpCommand } = await import('./mcp-DHPm_gvL.mjs');
|
|
15575
15642
|
await handleMcpCommand();
|
|
15576
15643
|
} catch (error) {
|
|
15577
15644
|
process.stderr.write(`[very-happy mcp] Fatal: ${error instanceof Error ? error.message : String(error)}
|
|
@@ -15929,4 +15996,4 @@ ${chalk.bold("Examples:")}
|
|
|
15929
15996
|
}
|
|
15930
15997
|
}
|
|
15931
15998
|
|
|
15932
|
-
export { BasePermissionHandler as B,
|
|
15999
|
+
export { ALLOWED_SPAWN_PERMISSION_MODES as A, BasePermissionHandler as B, MessageBuffer as C, DEFAULT_RECENT_LIMIT as D, CHANGE_TITLE_INSTRUCTION as E, GEMINI_MODEL_ENV as G, MAX_READ_LIMIT as M, sessionWebUrl as a, sanitizeSpawnPermissionMode as b, checkIfDaemonRunningAndCleanupStaleState as c, sendUserMessage as d, stopSession as e, archiveSession as f, DEFAULT_GEMINI_MODEL as g, initialMachineMetadata as h, isValidSpawnOrigin as i, createSessionMetadata as j, setupOfflineReconnection as k, listSessions as l, MessageQueue2 as m, notifyDaemonSessionStarted as n, hashObject as o, pushClipboardViaDaemon as p, query as q, readSessionTranscript as r, spawnDaemonSession as s, tmuxSupportsSessionEnv as t, startHappyServer as u, registerKillSessionHandler as v, waitForSessionKey as w, GEMINI_API_KEY_ENV as x, GOOGLE_API_KEY_ENV as y, BaseReasoningProcessor as z };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { q as query } from './index-
|
|
1
|
+
import { q as query } from './index-Bn-xsguz.mjs';
|
|
2
2
|
export { AbortError } from '@anthropic-ai/claude-agent-sdk';
|
|
3
3
|
import 'chalk';
|
|
4
4
|
import 'node:os';
|
|
5
5
|
import 'node:crypto';
|
|
6
|
-
import './types-
|
|
6
|
+
import './types-k_ipDb0c.mjs';
|
|
7
7
|
import 'axios';
|
|
8
8
|
import 'node:util';
|
|
9
9
|
import 'node:fs';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var AcpBackend = require('./AcpBackend-
|
|
4
|
-
var persistence = require('./types-
|
|
5
|
-
var AcpSessionManager = require('./AcpSessionManager-
|
|
3
|
+
var AcpBackend = require('./AcpBackend-B_olk79F.cjs');
|
|
4
|
+
var persistence = require('./types-BG_5QKX5.cjs');
|
|
5
|
+
var AcpSessionManager = require('./AcpSessionManager-uXwWO2Tn.cjs');
|
|
6
6
|
var node_crypto = require('node:crypto');
|
|
7
7
|
var path = require('node:path');
|
|
8
|
-
var index = require('./index-
|
|
8
|
+
var index = require('./index-BOoGJGQc.cjs');
|
|
9
9
|
require('node:child_process');
|
|
10
10
|
require('@agentclientprotocol/sdk');
|
|
11
11
|
require('axios');
|