very-happy-cli 0.2.119 → 0.2.120
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-DpsLyp2y.mjs → AcpBackend-DiIJaJWG.mjs} +1 -1
- package/dist/{AcpBackend-BpwOAcgu.cjs → AcpBackend-tou8FQXI.cjs} +1 -1
- package/dist/{AcpSessionManager-CM0PcgwO.mjs → AcpSessionManager-CZ0Az0GG.mjs} +1 -1
- package/dist/{AcpSessionManager-Ck6heffK.cjs → AcpSessionManager-fF_HFB98.cjs} +1 -1
- package/dist/{config-CtQJKe8h.cjs → config-CEbOao_0.cjs} +2 -2
- package/dist/{config-DpE-aSHW.mjs → config-CGDxsTZg.mjs} +2 -2
- package/dist/{index-CRhOD3CQ.cjs → index-BlkIz9BQ.cjs} +52 -29
- package/dist/{index-DNXCQz_A.mjs → index-CUJ6faw1.mjs} +48 -25
- package/dist/{index-DY7g3UWq.cjs → index-CYizH-JC.cjs} +2 -2
- package/dist/{index-BITXLEZo.mjs → index-D4_LW69g.mjs} +5 -5
- package/dist/{index-CGpkGfDj.mjs → index-DKj_0dqB.mjs} +2 -2
- package/dist/{index-CK-yge8m.cjs → index-HKcuQ_fQ.cjs} +4 -4
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{installTerminalHooks-Dmr3JUJR.mjs → installTerminalHooks-B3EGNaJr.mjs} +2 -2
- package/dist/{installTerminalHooks-BOOg7NNs.cjs → installTerminalHooks-MWVPJDxV.cjs} +2 -2
- package/dist/lib.cjs +1 -1
- package/dist/lib.mjs +1 -1
- package/dist/{mcp-D4N7yn98.mjs → mcp-CZ1Z6AI5.mjs} +2 -2
- package/dist/{mcp-CxIk4Mes.cjs → mcp-DBKk5L6_.cjs} +2 -2
- package/dist/{runGemini-TbGYRy0V.cjs → runGemini-BRUmjZgV.cjs} +4 -4
- package/dist/{runGemini-Bexbg8pA.mjs → runGemini-C3BCKTMp.mjs} +4 -4
- package/dist/{runOpenClaw-BpoIQWbe.mjs → runOpenClaw-DEYzcGSV.mjs} +3 -3
- package/dist/{runOpenClaw-B-TV4EkO.cjs → runOpenClaw-o1ImBlcJ.cjs} +3 -3
- package/dist/{send-U9UJvqNA.cjs → send-B9fh96vR.cjs} +2 -2
- package/dist/{send-z5SeDtKA.mjs → send-DFGH_-s_.mjs} +2 -2
- package/dist/{sessions-BAZGALtl.cjs → sessions-BNyEJ2_6.cjs} +2 -2
- package/dist/{sessions-DNALvNe8.mjs → sessions-CKVfXHyi.mjs} +2 -2
- package/dist/{spawn-CsV0SKkw.mjs → spawn-B6kP4YjA.mjs} +2 -2
- package/dist/{spawn-dBxu-RAv.cjs → spawn-xPV7-s4S.cjs} +2 -2
- package/dist/{types-Bw_6p8NP.cjs → types-7ZSxm6Pi.cjs} +49 -31
- package/dist/{types-DdyNuB7D.mjs → types-Di0o0BdV.mjs} +48 -31
- package/package.json +7 -7
|
@@ -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, g as contentLogMetadata, h as errorLogMetadata, j as packageJson, k as delay } from './types-
|
|
4
|
+
import { l as logger, g as contentLogMetadata, h as errorLogMetadata, j as packageJson, k as delay } from './types-Di0o0BdV.mjs';
|
|
5
5
|
|
|
6
6
|
const DEFAULT_TIMEOUTS = {
|
|
7
7
|
/** Default initialization timeout: 60 seconds */
|
|
@@ -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-7ZSxm6Pi.cjs');
|
|
7
7
|
|
|
8
8
|
const DEFAULT_TIMEOUTS = {
|
|
9
9
|
/** 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-7ZSxm6Pi.cjs');
|
|
8
|
+
var index = require('./index-BlkIz9BQ.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 { j as DEFAULT_GEMINI_MODEL, G as GEMINI_MODEL_ENV } from './index-
|
|
5
|
+
import { l as logger } from './types-Di0o0BdV.mjs';
|
|
6
|
+
import { j as DEFAULT_GEMINI_MODEL, G as GEMINI_MODEL_ENV } from './index-CUJ6faw1.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-7ZSxm6Pi.cjs');
|
|
7
7
|
var spawn = require('cross-spawn');
|
|
8
8
|
var path = require('node:path');
|
|
9
9
|
var node_readline = require('node:readline');
|
|
@@ -5313,6 +5313,23 @@ async function openBrowser(url) {
|
|
|
5313
5313
|
}
|
|
5314
5314
|
}
|
|
5315
5315
|
|
|
5316
|
+
function decideMachineId(input) {
|
|
5317
|
+
const { read, newAuth } = input;
|
|
5318
|
+
if (read.kind === "unreadable") {
|
|
5319
|
+
return {
|
|
5320
|
+
action: "refuse",
|
|
5321
|
+
reason: `settings exist but could not be read (${read.error}); refusing to mint a new machine id \u2014 fix or remove the settings file, or run \`very-happy auth login --force\` to deliberately re-register this machine`
|
|
5322
|
+
};
|
|
5323
|
+
}
|
|
5324
|
+
if (newAuth) return { action: "mint", reason: "new-auth" };
|
|
5325
|
+
if (read.kind === "absent") return { action: "mint", reason: "no-settings-file" };
|
|
5326
|
+
const existing = read.settings.machineId;
|
|
5327
|
+
if (typeof existing === "string" && existing.length > 0) {
|
|
5328
|
+
return { action: "reuse", machineId: existing };
|
|
5329
|
+
}
|
|
5330
|
+
return { action: "mint", reason: "no-machine-id" };
|
|
5331
|
+
}
|
|
5332
|
+
|
|
5316
5333
|
async function doAuth() {
|
|
5317
5334
|
console.clear();
|
|
5318
5335
|
const secret = new Uint8Array(node_crypto.randomBytes(32));
|
|
@@ -5486,17 +5503,23 @@ async function authAndSetupMachineIfNeeded() {
|
|
|
5486
5503
|
} else {
|
|
5487
5504
|
persistence.logger.debug("[AUTH] Using existing credentials");
|
|
5488
5505
|
}
|
|
5489
|
-
const
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
...s,
|
|
5493
|
-
machineId: node_crypto.randomUUID()
|
|
5494
|
-
};
|
|
5495
|
-
}
|
|
5496
|
-
return s;
|
|
5506
|
+
const decision = decideMachineId({
|
|
5507
|
+
read: await persistence.readSettingsOutcome(),
|
|
5508
|
+
newAuth
|
|
5497
5509
|
});
|
|
5498
|
-
|
|
5499
|
-
|
|
5510
|
+
if (decision.action === "refuse") {
|
|
5511
|
+
throw new Error(`Cannot establish this machine's identity: ${decision.reason}`);
|
|
5512
|
+
}
|
|
5513
|
+
let machineId;
|
|
5514
|
+
if (decision.action === "reuse") {
|
|
5515
|
+
machineId = decision.machineId;
|
|
5516
|
+
} else {
|
|
5517
|
+
machineId = node_crypto.randomUUID();
|
|
5518
|
+
persistence.logger.warn(`[AUTH] Registering a NEW machine id (${decision.reason})`);
|
|
5519
|
+
await persistence.updateSettings(async (s) => ({ ...s, machineId }));
|
|
5520
|
+
}
|
|
5521
|
+
persistence.logger.debug(`[AUTH] Machine ID: ${machineId}`);
|
|
5522
|
+
return { credentials, machineId };
|
|
5500
5523
|
}
|
|
5501
5524
|
|
|
5502
5525
|
let caffeinateProcess = null;
|
|
@@ -7329,7 +7352,7 @@ function parseJsonObject(text) {
|
|
|
7329
7352
|
return null;
|
|
7330
7353
|
}
|
|
7331
7354
|
}
|
|
7332
|
-
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-
|
|
7355
|
+
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-BlkIz9BQ.cjs', document.baseURI).href))).resolve(s)) {
|
|
7333
7356
|
const platformArch = `${platform}-${arch}`;
|
|
7334
7357
|
const candidates = [
|
|
7335
7358
|
`@anthropic-ai/claude-agent-sdk-${platformArch}/claude`,
|
|
@@ -11214,7 +11237,7 @@ function registerSideQuestionHandler(rpc, deps) {
|
|
|
11214
11237
|
const retainMs = deps.retainMs ?? SIDE_QUESTION_RETAIN_MS;
|
|
11215
11238
|
const maxRunMs = deps.maxRunMs ?? SIDE_QUESTION_MAX_RUN_MS;
|
|
11216
11239
|
const run = deps.run ?? (async (input) => {
|
|
11217
|
-
const { query } = await Promise.resolve().then(function () { return require('./index-
|
|
11240
|
+
const { query } = await Promise.resolve().then(function () { return require('./index-CYizH-JC.cjs'); });
|
|
11218
11241
|
return runSideQuestion(query, input);
|
|
11219
11242
|
});
|
|
11220
11243
|
const slots = /* @__PURE__ */ new Map();
|
|
@@ -11316,7 +11339,7 @@ const MAX_TITLE_CHARS = 60;
|
|
|
11316
11339
|
const GENERATION_TIMEOUT_MS = 3e4;
|
|
11317
11340
|
function resolveClaudeBinary() {
|
|
11318
11341
|
try {
|
|
11319
|
-
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-
|
|
11342
|
+
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-BlkIz9BQ.cjs', document.baseURI).href)));
|
|
11320
11343
|
const utilsPath = path.resolve(path.join(persistence.projectPath(), "scripts", "claude_version_utils.cjs"));
|
|
11321
11344
|
const { getClaudeCliPath } = require$1(utilsPath);
|
|
11322
11345
|
const path$1 = getClaudeCliPath();
|
|
@@ -13522,9 +13545,9 @@ function resolveLocalSignupBootstrap(configuredMode, configuredInviteCodes, gene
|
|
|
13522
13545
|
};
|
|
13523
13546
|
}
|
|
13524
13547
|
|
|
13525
|
-
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-
|
|
13548
|
+
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-BlkIz9BQ.cjs', document.baseURI).href)));
|
|
13526
13549
|
const __dirname$1 = path.dirname(__filename$1);
|
|
13527
|
-
const require_ = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-
|
|
13550
|
+
const require_ = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-BlkIz9BQ.cjs', document.baseURI).href)));
|
|
13528
13551
|
const PRISMA_QUERY_ENGINE_FILES = {
|
|
13529
13552
|
"arm64-darwin": "libquery_engine-darwin-arm64.dylib.node",
|
|
13530
13553
|
"x64-darwin": "libquery_engine-darwin.dylib.node",
|
|
@@ -16148,7 +16171,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16148
16171
|
process.exit(0);
|
|
16149
16172
|
} else if (subcommand === "install-terminal-hooks") {
|
|
16150
16173
|
try {
|
|
16151
|
-
const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await Promise.resolve().then(function () { return require('./installTerminalHooks-
|
|
16174
|
+
const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await Promise.resolve().then(function () { return require('./installTerminalHooks-MWVPJDxV.cjs'); });
|
|
16152
16175
|
const command = parseTerminalHooksArgs(args.slice(1));
|
|
16153
16176
|
if (command.action === "help") {
|
|
16154
16177
|
console.log(TERMINAL_HOOKS_HELP);
|
|
@@ -16165,7 +16188,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16165
16188
|
}
|
|
16166
16189
|
} else if (subcommand === "spawn") {
|
|
16167
16190
|
try {
|
|
16168
|
-
const { handleSpawnCommand } = await Promise.resolve().then(function () { return require('./spawn-
|
|
16191
|
+
const { handleSpawnCommand } = await Promise.resolve().then(function () { return require('./spawn-xPV7-s4S.cjs'); });
|
|
16169
16192
|
await handleSpawnCommand(args.slice(1));
|
|
16170
16193
|
} catch (error) {
|
|
16171
16194
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -16177,7 +16200,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16177
16200
|
return;
|
|
16178
16201
|
} else if (subcommand === "sessions") {
|
|
16179
16202
|
try {
|
|
16180
|
-
const { handleSessionsCommand } = await Promise.resolve().then(function () { return require('./sessions-
|
|
16203
|
+
const { handleSessionsCommand } = await Promise.resolve().then(function () { return require('./sessions-BNyEJ2_6.cjs'); });
|
|
16181
16204
|
await handleSessionsCommand(args.slice(1));
|
|
16182
16205
|
} catch (error) {
|
|
16183
16206
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -16189,7 +16212,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16189
16212
|
return;
|
|
16190
16213
|
} else if (subcommand === "send") {
|
|
16191
16214
|
try {
|
|
16192
|
-
const { handleSendCommand } = await Promise.resolve().then(function () { return require('./send-
|
|
16215
|
+
const { handleSendCommand } = await Promise.resolve().then(function () { return require('./send-B9fh96vR.cjs'); });
|
|
16193
16216
|
await handleSendCommand(args.slice(1));
|
|
16194
16217
|
} catch (error) {
|
|
16195
16218
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -16295,9 +16318,9 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16295
16318
|
if (geminiSubcommand === "project" && args[2] === "set" && args[3]) {
|
|
16296
16319
|
const projectId = args[3];
|
|
16297
16320
|
try {
|
|
16298
|
-
const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return require('./config-
|
|
16299
|
-
const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await Promise.resolve().then(function () { return require('./types-
|
|
16300
|
-
const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./types-
|
|
16321
|
+
const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return require('./config-CEbOao_0.cjs'); });
|
|
16322
|
+
const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await Promise.resolve().then(function () { return require('./types-7ZSxm6Pi.cjs'); }).then(function (n) { return n.persistence; });
|
|
16323
|
+
const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./types-7ZSxm6Pi.cjs'); }).then(function (n) { return n.api; });
|
|
16301
16324
|
let userEmail = void 0;
|
|
16302
16325
|
try {
|
|
16303
16326
|
const credentials = await readCredentialsForConfiguredRelay2();
|
|
@@ -16328,7 +16351,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16328
16351
|
}
|
|
16329
16352
|
if (geminiSubcommand === "project" && args[2] === "get") {
|
|
16330
16353
|
try {
|
|
16331
|
-
const { readGeminiLocalConfig } = await Promise.resolve().then(function () { return require('./config-
|
|
16354
|
+
const { readGeminiLocalConfig } = await Promise.resolve().then(function () { return require('./config-CEbOao_0.cjs'); });
|
|
16332
16355
|
const config = readGeminiLocalConfig();
|
|
16333
16356
|
if (config.googleCloudProject) {
|
|
16334
16357
|
console.log(`Current Google Cloud Project: ${config.googleCloudProject}`);
|
|
@@ -16368,7 +16391,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16368
16391
|
process.exit(0);
|
|
16369
16392
|
}
|
|
16370
16393
|
try {
|
|
16371
|
-
const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-
|
|
16394
|
+
const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-BRUmjZgV.cjs'); });
|
|
16372
16395
|
let startedBy = void 0;
|
|
16373
16396
|
for (let i = 1; i < args.length; i++) {
|
|
16374
16397
|
if (args[i] === "--started-by") {
|
|
@@ -16398,7 +16421,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16398
16421
|
}
|
|
16399
16422
|
};
|
|
16400
16423
|
try {
|
|
16401
|
-
const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-
|
|
16424
|
+
const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-HKcuQ_fQ.cjs'); });
|
|
16402
16425
|
const parsed = parsePiRunnerArgs(args.slice(1));
|
|
16403
16426
|
const resolved = resolveAcpAgentConfig(["pi", ...parsed.passthrough]);
|
|
16404
16427
|
const { credentials } = await authAndSetupMachineIfNeeded();
|
|
@@ -16425,7 +16448,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16425
16448
|
return;
|
|
16426
16449
|
} else if (subcommand === "acp") {
|
|
16427
16450
|
try {
|
|
16428
|
-
const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-
|
|
16451
|
+
const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-HKcuQ_fQ.cjs'); });
|
|
16429
16452
|
let startedBy = void 0;
|
|
16430
16453
|
let verbose = false;
|
|
16431
16454
|
const acpArgs = [];
|
|
@@ -16465,7 +16488,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16465
16488
|
return;
|
|
16466
16489
|
} else if (subcommand === "openclaw") {
|
|
16467
16490
|
try {
|
|
16468
|
-
const { runOpenClaw } = await Promise.resolve().then(function () { return require('./runOpenClaw-
|
|
16491
|
+
const { runOpenClaw } = await Promise.resolve().then(function () { return require('./runOpenClaw-o1ImBlcJ.cjs'); });
|
|
16469
16492
|
let startedBy = void 0;
|
|
16470
16493
|
let verbose = false;
|
|
16471
16494
|
let gatewayUrl;
|
|
@@ -16516,7 +16539,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16516
16539
|
return;
|
|
16517
16540
|
} else if (subcommand === "mcp" && args.length === 1) {
|
|
16518
16541
|
try {
|
|
16519
|
-
const { handleMcpCommand } = await Promise.resolve().then(function () { return require('./mcp-
|
|
16542
|
+
const { handleMcpCommand } = await Promise.resolve().then(function () { return require('./mcp-DBKk5L6_.cjs'); });
|
|
16520
16543
|
await handleMcpCommand();
|
|
16521
16544
|
} catch (error) {
|
|
16522
16545
|
process.stderr.write(`[very-happy mcp] Fatal: ${error instanceof Error ? error.message : String(error)}
|
|
@@ -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, tmpdir } 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, g as contentLogMetadata, I as InvalidateSync, R as RawJSONLinesSchema, k as delay, v as AsyncLock, S as STREAM_DELTA_MAX_CHARS, x as ensurePrivateDirectory, M as MAX_CHAT_ATTACHMENT_SOURCE_BYTES, y as hardenPrivateFile, j as packageJson, z as commandOnPath, e as readSettings, B as readCredentials, C as credentialRelayProblem, D as deriveLocalCliUpdateSummary, f as encodeBase64, E as
|
|
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, g as contentLogMetadata, I as InvalidateSync, R as RawJSONLinesSchema, k as delay, v as AsyncLock, S as STREAM_DELTA_MAX_CHARS, x as ensurePrivateDirectory, M as MAX_CHAT_ATTACHMENT_SOURCE_BYTES, y as hardenPrivateFile, j as packageJson, z as commandOnPath, e as readSettings, B as readCredentials, C as credentialRelayProblem, D as deriveLocalCliUpdateSummary, f as encodeBase64, E as readSettingsOutcome, F as updateSettings, G as encodeBase64Url, H as decodeBase64, J as writeCredentialsLegacy, K as writeCredentialsDataKey, L as readCredentialsForConfiguredRelay, N as encrypt, r as readPersistedSessions, O as isClaudeSessionId, w as writePrivateFileSync, P as getLocalHappyAgentCredentialPath, Q as readLocalHappyAgentCredentials, T as decryptWithDataKey, U as decryptLegacy, V as compareExactVersions, W as extractCompleteLines, X as decideBackfill, Y as parseTerminalHookPayload, Z as tmuxArgs, _ as scrubTmuxClientEnv, $ as decideMirrorBinding, a0 as MIRROR_BACKFILL_LINES_DEFAULT, a1 as persistSession, a2 as mirrorLineKey, a3 as mirrorLocalId, a4 as detectCLIAvailability, a5 as detectResumeSupport, a6 as acquireDaemonLock, a7 as summarizeSpawnSessionForLog, a8 as deletePersistedSessions, a9 as shellescape, aa as decrypt, ab as writeDaemonState, A as ApiClient, ac as writeSettings, ad as fetchCliUpdateState, ae as resolveCliUpdateCheckInterval, af as DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS, ag as releaseDaemonLock, i as isValidSessionId, ah as listVhTerminals, ai as isValidTerminalId, aj as readVhTerminal, ak as sendToVhTerminal, al as TITLE_PROMPT_PREFIX, am as BOARD_ANALYZER_PROMPT_PREFIX, d as connectionState, an as startOfflineReconnection, ao as clearCredentials, ap as clearMachineId, m as ensurePrivateDirectorySync, aq as SandboxConfigSchema, b as createEnvelope, ar as CodexAppServerClient, as as getLatestDaemonLog } from './types-Di0o0BdV.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';
|
|
@@ -5291,6 +5291,23 @@ async function openBrowser(url) {
|
|
|
5291
5291
|
}
|
|
5292
5292
|
}
|
|
5293
5293
|
|
|
5294
|
+
function decideMachineId(input) {
|
|
5295
|
+
const { read, newAuth } = input;
|
|
5296
|
+
if (read.kind === "unreadable") {
|
|
5297
|
+
return {
|
|
5298
|
+
action: "refuse",
|
|
5299
|
+
reason: `settings exist but could not be read (${read.error}); refusing to mint a new machine id \u2014 fix or remove the settings file, or run \`very-happy auth login --force\` to deliberately re-register this machine`
|
|
5300
|
+
};
|
|
5301
|
+
}
|
|
5302
|
+
if (newAuth) return { action: "mint", reason: "new-auth" };
|
|
5303
|
+
if (read.kind === "absent") return { action: "mint", reason: "no-settings-file" };
|
|
5304
|
+
const existing = read.settings.machineId;
|
|
5305
|
+
if (typeof existing === "string" && existing.length > 0) {
|
|
5306
|
+
return { action: "reuse", machineId: existing };
|
|
5307
|
+
}
|
|
5308
|
+
return { action: "mint", reason: "no-machine-id" };
|
|
5309
|
+
}
|
|
5310
|
+
|
|
5294
5311
|
async function doAuth() {
|
|
5295
5312
|
console.clear();
|
|
5296
5313
|
const secret = new Uint8Array(randomBytes(32));
|
|
@@ -5464,17 +5481,23 @@ async function authAndSetupMachineIfNeeded() {
|
|
|
5464
5481
|
} else {
|
|
5465
5482
|
logger.debug("[AUTH] Using existing credentials");
|
|
5466
5483
|
}
|
|
5467
|
-
const
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
...s,
|
|
5471
|
-
machineId: randomUUID()
|
|
5472
|
-
};
|
|
5473
|
-
}
|
|
5474
|
-
return s;
|
|
5484
|
+
const decision = decideMachineId({
|
|
5485
|
+
read: await readSettingsOutcome(),
|
|
5486
|
+
newAuth
|
|
5475
5487
|
});
|
|
5476
|
-
|
|
5477
|
-
|
|
5488
|
+
if (decision.action === "refuse") {
|
|
5489
|
+
throw new Error(`Cannot establish this machine's identity: ${decision.reason}`);
|
|
5490
|
+
}
|
|
5491
|
+
let machineId;
|
|
5492
|
+
if (decision.action === "reuse") {
|
|
5493
|
+
machineId = decision.machineId;
|
|
5494
|
+
} else {
|
|
5495
|
+
machineId = randomUUID();
|
|
5496
|
+
logger.warn(`[AUTH] Registering a NEW machine id (${decision.reason})`);
|
|
5497
|
+
await updateSettings(async (s) => ({ ...s, machineId }));
|
|
5498
|
+
}
|
|
5499
|
+
logger.debug(`[AUTH] Machine ID: ${machineId}`);
|
|
5500
|
+
return { credentials, machineId };
|
|
5478
5501
|
}
|
|
5479
5502
|
|
|
5480
5503
|
let caffeinateProcess = null;
|
|
@@ -11192,7 +11215,7 @@ function registerSideQuestionHandler(rpc, deps) {
|
|
|
11192
11215
|
const retainMs = deps.retainMs ?? SIDE_QUESTION_RETAIN_MS;
|
|
11193
11216
|
const maxRunMs = deps.maxRunMs ?? SIDE_QUESTION_MAX_RUN_MS;
|
|
11194
11217
|
const run = deps.run ?? (async (input) => {
|
|
11195
|
-
const { query } = await import('./index-
|
|
11218
|
+
const { query } = await import('./index-DKj_0dqB.mjs');
|
|
11196
11219
|
return runSideQuestion(query, input);
|
|
11197
11220
|
});
|
|
11198
11221
|
const slots = /* @__PURE__ */ new Map();
|
|
@@ -16126,7 +16149,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16126
16149
|
process.exit(0);
|
|
16127
16150
|
} else if (subcommand === "install-terminal-hooks") {
|
|
16128
16151
|
try {
|
|
16129
|
-
const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await import('./installTerminalHooks-
|
|
16152
|
+
const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await import('./installTerminalHooks-B3EGNaJr.mjs');
|
|
16130
16153
|
const command = parseTerminalHooksArgs(args.slice(1));
|
|
16131
16154
|
if (command.action === "help") {
|
|
16132
16155
|
console.log(TERMINAL_HOOKS_HELP);
|
|
@@ -16143,7 +16166,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16143
16166
|
}
|
|
16144
16167
|
} else if (subcommand === "spawn") {
|
|
16145
16168
|
try {
|
|
16146
|
-
const { handleSpawnCommand } = await import('./spawn-
|
|
16169
|
+
const { handleSpawnCommand } = await import('./spawn-B6kP4YjA.mjs');
|
|
16147
16170
|
await handleSpawnCommand(args.slice(1));
|
|
16148
16171
|
} catch (error) {
|
|
16149
16172
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -16155,7 +16178,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16155
16178
|
return;
|
|
16156
16179
|
} else if (subcommand === "sessions") {
|
|
16157
16180
|
try {
|
|
16158
|
-
const { handleSessionsCommand } = await import('./sessions-
|
|
16181
|
+
const { handleSessionsCommand } = await import('./sessions-CKVfXHyi.mjs');
|
|
16159
16182
|
await handleSessionsCommand(args.slice(1));
|
|
16160
16183
|
} catch (error) {
|
|
16161
16184
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -16167,7 +16190,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16167
16190
|
return;
|
|
16168
16191
|
} else if (subcommand === "send") {
|
|
16169
16192
|
try {
|
|
16170
|
-
const { handleSendCommand } = await import('./send-
|
|
16193
|
+
const { handleSendCommand } = await import('./send-DFGH_-s_.mjs');
|
|
16171
16194
|
await handleSendCommand(args.slice(1));
|
|
16172
16195
|
} catch (error) {
|
|
16173
16196
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -16273,9 +16296,9 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16273
16296
|
if (geminiSubcommand === "project" && args[2] === "set" && args[3]) {
|
|
16274
16297
|
const projectId = args[3];
|
|
16275
16298
|
try {
|
|
16276
|
-
const { saveGoogleCloudProjectToConfig } = await import('./config-
|
|
16277
|
-
const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await import('./types-
|
|
16278
|
-
const { ApiClient: ApiClient2 } = await import('./types-
|
|
16299
|
+
const { saveGoogleCloudProjectToConfig } = await import('./config-CGDxsTZg.mjs');
|
|
16300
|
+
const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await import('./types-Di0o0BdV.mjs').then(function (n) { return n.at; });
|
|
16301
|
+
const { ApiClient: ApiClient2 } = await import('./types-Di0o0BdV.mjs').then(function (n) { return n.au; });
|
|
16279
16302
|
let userEmail = void 0;
|
|
16280
16303
|
try {
|
|
16281
16304
|
const credentials = await readCredentialsForConfiguredRelay2();
|
|
@@ -16306,7 +16329,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16306
16329
|
}
|
|
16307
16330
|
if (geminiSubcommand === "project" && args[2] === "get") {
|
|
16308
16331
|
try {
|
|
16309
|
-
const { readGeminiLocalConfig } = await import('./config-
|
|
16332
|
+
const { readGeminiLocalConfig } = await import('./config-CGDxsTZg.mjs');
|
|
16310
16333
|
const config = readGeminiLocalConfig();
|
|
16311
16334
|
if (config.googleCloudProject) {
|
|
16312
16335
|
console.log(`Current Google Cloud Project: ${config.googleCloudProject}`);
|
|
@@ -16346,7 +16369,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16346
16369
|
process.exit(0);
|
|
16347
16370
|
}
|
|
16348
16371
|
try {
|
|
16349
|
-
const { runGemini } = await import('./runGemini-
|
|
16372
|
+
const { runGemini } = await import('./runGemini-C3BCKTMp.mjs');
|
|
16350
16373
|
let startedBy = void 0;
|
|
16351
16374
|
for (let i = 1; i < args.length; i++) {
|
|
16352
16375
|
if (args[i] === "--started-by") {
|
|
@@ -16376,7 +16399,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16376
16399
|
}
|
|
16377
16400
|
};
|
|
16378
16401
|
try {
|
|
16379
|
-
const { runAcp, resolveAcpAgentConfig } = await import('./index-
|
|
16402
|
+
const { runAcp, resolveAcpAgentConfig } = await import('./index-D4_LW69g.mjs');
|
|
16380
16403
|
const parsed = parsePiRunnerArgs(args.slice(1));
|
|
16381
16404
|
const resolved = resolveAcpAgentConfig(["pi", ...parsed.passthrough]);
|
|
16382
16405
|
const { credentials } = await authAndSetupMachineIfNeeded();
|
|
@@ -16403,7 +16426,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16403
16426
|
return;
|
|
16404
16427
|
} else if (subcommand === "acp") {
|
|
16405
16428
|
try {
|
|
16406
|
-
const { runAcp, resolveAcpAgentConfig } = await import('./index-
|
|
16429
|
+
const { runAcp, resolveAcpAgentConfig } = await import('./index-D4_LW69g.mjs');
|
|
16407
16430
|
let startedBy = void 0;
|
|
16408
16431
|
let verbose = false;
|
|
16409
16432
|
const acpArgs = [];
|
|
@@ -16443,7 +16466,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16443
16466
|
return;
|
|
16444
16467
|
} else if (subcommand === "openclaw") {
|
|
16445
16468
|
try {
|
|
16446
|
-
const { runOpenClaw } = await import('./runOpenClaw-
|
|
16469
|
+
const { runOpenClaw } = await import('./runOpenClaw-DEYzcGSV.mjs');
|
|
16447
16470
|
let startedBy = void 0;
|
|
16448
16471
|
let verbose = false;
|
|
16449
16472
|
let gatewayUrl;
|
|
@@ -16494,7 +16517,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16494
16517
|
return;
|
|
16495
16518
|
} else if (subcommand === "mcp" && args.length === 1) {
|
|
16496
16519
|
try {
|
|
16497
|
-
const { handleMcpCommand } = await import('./mcp-
|
|
16520
|
+
const { handleMcpCommand } = await import('./mcp-CZ1Z6AI5.mjs');
|
|
16498
16521
|
await handleMcpCommand();
|
|
16499
16522
|
} catch (error) {
|
|
16500
16523
|
process.stderr.write(`[very-happy mcp] Fatal: ${error instanceof Error ? error.message : String(error)}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BlkIz9BQ.cjs');
|
|
4
4
|
var claudeAgentSdk = require('@anthropic-ai/claude-agent-sdk');
|
|
5
5
|
require('chalk');
|
|
6
6
|
require('node:os');
|
|
7
7
|
require('node:crypto');
|
|
8
|
-
require('./types-
|
|
8
|
+
require('./types-7ZSxm6Pi.cjs');
|
|
9
9
|
require('axios');
|
|
10
10
|
require('node:util');
|
|
11
11
|
require('node:fs');
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { D as DefaultTransport, A as AcpBackend } from './AcpBackend-
|
|
2
|
-
export { a as DEFAULT_IDLE_TIMEOUT_MS, b as DEFAULT_TOOL_CALL_TIMEOUT_MS, e as extractErrorDetail, f as formatDuration, c as formatDurationMinutes, h as handleAgentMessageChunk, d as handleAgentThoughtChunk, g as handleLegacyMessageChunk, i as handlePlanUpdate, j as handleThinkingUpdate, k as handleToolCall, l as handleToolCallUpdate, p as parseArgsFromContent } from './AcpBackend-
|
|
3
|
-
import { d as connectionState, A as ApiClient, e as readSettings, f as encodeBase64, l as logger, p as projectPath } from './types-
|
|
4
|
-
import { A as AcpSessionManager } from './AcpSessionManager-
|
|
1
|
+
import { D as DefaultTransport, A as AcpBackend } from './AcpBackend-DiIJaJWG.mjs';
|
|
2
|
+
export { a as DEFAULT_IDLE_TIMEOUT_MS, b as DEFAULT_TOOL_CALL_TIMEOUT_MS, e as extractErrorDetail, f as formatDuration, c as formatDurationMinutes, h as handleAgentMessageChunk, d as handleAgentThoughtChunk, g as handleLegacyMessageChunk, i as handlePlanUpdate, j as handleThinkingUpdate, k as handleToolCall, l as handleToolCallUpdate, p as parseArgsFromContent } from './AcpBackend-DiIJaJWG.mjs';
|
|
3
|
+
import { d as connectionState, A as ApiClient, e as readSettings, f as encodeBase64, l as logger, p as projectPath } from './types-Di0o0BdV.mjs';
|
|
4
|
+
import { A as AcpSessionManager } from './AcpSessionManager-CZ0Az0GG.mjs';
|
|
5
5
|
import { randomUUID } from 'node:crypto';
|
|
6
6
|
import { join } from 'node:path';
|
|
7
|
-
import { n as initialMachineMetadata, o as createSessionMetadata, u as setupOfflineReconnection, v as notifyDaemonSessionStarted, x as MessageQueue2, y as hashObject, z as startHappyServer, T as TitleGenerator, B as registerKillSessionHandler, C as BasePermissionHandler, E as writeSessionModeFile, F as normalizeAcpPermissionMode, H as removeSessionModeFile } from './index-
|
|
7
|
+
import { n as initialMachineMetadata, o as createSessionMetadata, u as setupOfflineReconnection, v as notifyDaemonSessionStarted, x as MessageQueue2, y as hashObject, z as startHappyServer, T as TitleGenerator, B as registerKillSessionHandler, C as BasePermissionHandler, E as writeSessionModeFile, F as normalizeAcpPermissionMode, H as removeSessionModeFile } from './index-CUJ6faw1.mjs';
|
|
8
8
|
import 'node:child_process';
|
|
9
9
|
import '@agentclientprotocol/sdk';
|
|
10
10
|
import 'axios';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { q as query } from './index-
|
|
1
|
+
import { q as query } from './index-CUJ6faw1.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-Di0o0BdV.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-tou8FQXI.cjs');
|
|
4
|
+
var persistence = require('./types-7ZSxm6Pi.cjs');
|
|
5
|
+
var AcpSessionManager = require('./AcpSessionManager-fF_HFB98.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-BlkIz9BQ.cjs');
|
|
9
9
|
require('node:child_process');
|
|
10
10
|
require('@agentclientprotocol/sdk');
|
|
11
11
|
require('axios');
|
package/dist/index.cjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -3,8 +3,8 @@ import { join, resolve } from 'node:path';
|
|
|
3
3
|
import { homedir } from 'node:os';
|
|
4
4
|
import { spawnSync } from 'node:child_process';
|
|
5
5
|
import chalk from 'chalk';
|
|
6
|
-
import { p as projectPath } from './types-
|
|
7
|
-
import { t as tmuxSupportsSessionEnv } from './index-
|
|
6
|
+
import { p as projectPath } from './types-Di0o0BdV.mjs';
|
|
7
|
+
import { t as tmuxSupportsSessionEnv } from './index-CUJ6faw1.mjs';
|
|
8
8
|
import 'axios';
|
|
9
9
|
import 'node:util';
|
|
10
10
|
import 'node:fs/promises';
|
|
@@ -5,8 +5,8 @@ var path = require('node:path');
|
|
|
5
5
|
var os = require('node:os');
|
|
6
6
|
var node_child_process = require('node:child_process');
|
|
7
7
|
var chalk = require('chalk');
|
|
8
|
-
var persistence = require('./types-
|
|
9
|
-
var index = require('./index-
|
|
8
|
+
var persistence = require('./types-7ZSxm6Pi.cjs');
|
|
9
|
+
var index = require('./index-BlkIz9BQ.cjs');
|
|
10
10
|
require('axios');
|
|
11
11
|
require('node:util');
|
|
12
12
|
require('node:fs/promises');
|
package/dist/lib.cjs
CHANGED
package/dist/lib.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as ApiClient, a as ApiSessionClient, R as RawJSONLinesSchema, c as configuration, l as logger } from './types-
|
|
1
|
+
export { A as ApiClient, a as ApiSessionClient, R as RawJSONLinesSchema, c as configuration, l as logger } from './types-Di0o0BdV.mjs';
|
|
2
2
|
import 'axios';
|
|
3
3
|
import 'chalk';
|
|
4
4
|
import 'node:util';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
2
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import { p as pushClipboardViaDaemon, k as setTerminalTitleViaDaemon, m as registerAssistantSessionTools } from './index-
|
|
4
|
+
import { p as pushClipboardViaDaemon, k as setTerminalTitleViaDaemon, m as registerAssistantSessionTools } from './index-CUJ6faw1.mjs';
|
|
5
5
|
import { C as CLIPBOARD_TOOL_NAME, a as CLIPBOARD_TOOL_TITLE, b as CLIPBOARD_TOOL_DESCRIPTION, c as CLIPBOARD_MAX_BYTES } from './limits-CwFb5S2b.mjs';
|
|
6
|
-
import { l as logger } from './types-
|
|
6
|
+
import { l as logger } from './types-Di0o0BdV.mjs';
|
|
7
7
|
import 'node:fs/promises';
|
|
8
8
|
import 'node:os';
|
|
9
9
|
import 'node:crypto';
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
var mcp_js = require('@modelcontextprotocol/sdk/server/mcp.js');
|
|
4
4
|
var stdio_js = require('@modelcontextprotocol/sdk/server/stdio.js');
|
|
5
5
|
var z = require('zod');
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-BlkIz9BQ.cjs');
|
|
7
7
|
var limits = require('./limits-KdWKmwtH.cjs');
|
|
8
|
-
var persistence = require('./types-
|
|
8
|
+
var persistence = require('./types-7ZSxm6Pi.cjs');
|
|
9
9
|
require('node:fs/promises');
|
|
10
10
|
require('node:os');
|
|
11
11
|
require('node:crypto');
|
|
@@ -4,10 +4,10 @@ var ink = require('ink');
|
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var node_crypto = require('node:crypto');
|
|
6
6
|
var path = require('node:path');
|
|
7
|
-
var persistence = require('./types-
|
|
8
|
-
var index = require('./index-
|
|
9
|
-
var AcpBackend = require('./AcpBackend-
|
|
10
|
-
var config = require('./config-
|
|
7
|
+
var persistence = require('./types-7ZSxm6Pi.cjs');
|
|
8
|
+
var index = require('./index-BlkIz9BQ.cjs');
|
|
9
|
+
var AcpBackend = require('./AcpBackend-tou8FQXI.cjs');
|
|
10
|
+
var config = require('./config-CEbOao_0.cjs');
|
|
11
11
|
require('axios');
|
|
12
12
|
require('chalk');
|
|
13
13
|
require('node:util');
|
|
@@ -2,10 +2,10 @@ import { useStdout, useInput, Box, Text, render } from 'ink';
|
|
|
2
2
|
import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
3
3
|
import { randomUUID } from 'node:crypto';
|
|
4
4
|
import { join } from 'node:path';
|
|
5
|
-
import { l as logger, d as connectionState, A as ApiClient, e as readSettings, h as errorLogMetadata, f as encodeBase64, p as projectPath, g as contentLogMetadata } from './types-
|
|
6
|
-
import { I as GEMINI_API_KEY_ENV, J as GOOGLE_API_KEY_ENV, G as GEMINI_MODEL_ENV, C as BasePermissionHandler, K as BaseReasoningProcessor, n as initialMachineMetadata, o as createSessionMetadata, u as setupOfflineReconnection, v as notifyDaemonSessionStarted, x as MessageQueue2, y as hashObject, L as MessageBuffer, N as CHANGE_TITLE_INSTRUCTION, B as registerKillSessionHandler, z as startHappyServer } from './index-
|
|
7
|
-
import { A as AcpBackend } from './AcpBackend-
|
|
8
|
-
import { readGeminiLocalConfig, determineGeminiModel, getGeminiModelSource, getInitialGeminiModel, saveGeminiModelToConfig } from './config-
|
|
5
|
+
import { l as logger, d as connectionState, A as ApiClient, e as readSettings, h as errorLogMetadata, f as encodeBase64, p as projectPath, g as contentLogMetadata } from './types-Di0o0BdV.mjs';
|
|
6
|
+
import { I as GEMINI_API_KEY_ENV, J as GOOGLE_API_KEY_ENV, G as GEMINI_MODEL_ENV, C as BasePermissionHandler, K as BaseReasoningProcessor, n as initialMachineMetadata, o as createSessionMetadata, u as setupOfflineReconnection, v as notifyDaemonSessionStarted, x as MessageQueue2, y as hashObject, L as MessageBuffer, N as CHANGE_TITLE_INSTRUCTION, B as registerKillSessionHandler, z as startHappyServer } from './index-CUJ6faw1.mjs';
|
|
7
|
+
import { A as AcpBackend } from './AcpBackend-DiIJaJWG.mjs';
|
|
8
|
+
import { readGeminiLocalConfig, determineGeminiModel, getGeminiModelSource, getInitialGeminiModel, saveGeminiModelToConfig } from './config-CGDxsTZg.mjs';
|
|
9
9
|
import 'axios';
|
|
10
10
|
import 'chalk';
|
|
11
11
|
import 'node:util';
|
|
@@ -3,9 +3,9 @@ import { execFileSync } from 'node:child_process';
|
|
|
3
3
|
import os from 'node:os';
|
|
4
4
|
import { existsSync, readFileSync } from 'node:fs';
|
|
5
5
|
import { join } from 'node:path';
|
|
6
|
-
import { m as ensurePrivateDirectorySync, n as hardenPrivateFileSync, w as writePrivateFileSync, h as errorLogMetadata, g as contentLogMetadata, d as connectionState, A as ApiClient, e as readSettings, f as encodeBase64, l as logger, c as configuration } from './types-
|
|
7
|
-
import { A as AcpSessionManager } from './AcpSessionManager-
|
|
8
|
-
import { n as initialMachineMetadata, o as createSessionMetadata, u as setupOfflineReconnection, v as notifyDaemonSessionStarted, x as MessageQueue2, B as registerKillSessionHandler } from './index-
|
|
6
|
+
import { m as ensurePrivateDirectorySync, n as hardenPrivateFileSync, w as writePrivateFileSync, h as errorLogMetadata, g as contentLogMetadata, d as connectionState, A as ApiClient, e as readSettings, f as encodeBase64, l as logger, c as configuration } from './types-Di0o0BdV.mjs';
|
|
7
|
+
import { A as AcpSessionManager } from './AcpSessionManager-CZ0Az0GG.mjs';
|
|
8
|
+
import { n as initialMachineMetadata, o as createSessionMetadata, u as setupOfflineReconnection, v as notifyDaemonSessionStarted, x as MessageQueue2, B as registerKillSessionHandler } from './index-CUJ6faw1.mjs';
|
|
9
9
|
import WebSocket from 'ws';
|
|
10
10
|
import * as ed from '@noble/ed25519';
|
|
11
11
|
import { sha512 } from '@noble/hashes/sha2.js';
|
|
@@ -5,9 +5,9 @@ var node_child_process = require('node:child_process');
|
|
|
5
5
|
var os = require('node:os');
|
|
6
6
|
var node_fs = require('node:fs');
|
|
7
7
|
var path = require('node:path');
|
|
8
|
-
var persistence = require('./types-
|
|
9
|
-
var AcpSessionManager = require('./AcpSessionManager-
|
|
10
|
-
var index = require('./index-
|
|
8
|
+
var persistence = require('./types-7ZSxm6Pi.cjs');
|
|
9
|
+
var AcpSessionManager = require('./AcpSessionManager-fF_HFB98.cjs');
|
|
10
|
+
var index = require('./index-BlkIz9BQ.cjs');
|
|
11
11
|
var WebSocket = require('ws');
|
|
12
12
|
var ed = require('@noble/ed25519');
|
|
13
13
|
var sha2_js = require('@noble/hashes/sha2.js');
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
var chalk = require('chalk');
|
|
4
4
|
var node_fs = require('node:fs');
|
|
5
5
|
var path = require('node:path');
|
|
6
|
-
var persistence = require('./types-
|
|
7
|
-
var index = require('./index-
|
|
6
|
+
var persistence = require('./types-7ZSxm6Pi.cjs');
|
|
7
|
+
var index = require('./index-BlkIz9BQ.cjs');
|
|
8
8
|
require('axios');
|
|
9
9
|
require('node:util');
|
|
10
10
|
require('node:os');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
import { readFileSync } from 'node:fs';
|
|
3
3
|
import { resolve } from 'node:path';
|
|
4
|
-
import { r as readPersistedSessions, c as configuration } from './types-
|
|
5
|
-
import { d as sendUserMessage, a as sessionWebUrl } from './index-
|
|
4
|
+
import { r as readPersistedSessions, c as configuration } from './types-Di0o0BdV.mjs';
|
|
5
|
+
import { d as sendUserMessage, a as sessionWebUrl } from './index-CUJ6faw1.mjs';
|
|
6
6
|
import 'axios';
|
|
7
7
|
import 'node:util';
|
|
8
8
|
import 'node:os';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chalk = require('chalk');
|
|
4
|
-
var index = require('./index-
|
|
5
|
-
var persistence = require('./types-
|
|
4
|
+
var index = require('./index-BlkIz9BQ.cjs');
|
|
5
|
+
var persistence = require('./types-7ZSxm6Pi.cjs');
|
|
6
6
|
require('node:os');
|
|
7
7
|
require('node:crypto');
|
|
8
8
|
require('cross-spawn');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
|
-
import { D as DEFAULT_RECENT_LIMIT, M as MAX_READ_LIMIT, l as listAccountSessions, e as listSessions, r as readSessionTranscript, f as stopSession, g as resolvePermissionRequest, h as archiveSession } from './index-
|
|
3
|
-
import { i as isValidSessionId } from './types-
|
|
2
|
+
import { D as DEFAULT_RECENT_LIMIT, M as MAX_READ_LIMIT, l as listAccountSessions, e as listSessions, r as readSessionTranscript, f as stopSession, g as resolvePermissionRequest, h as archiveSession } from './index-CUJ6faw1.mjs';
|
|
3
|
+
import { i as isValidSessionId } from './types-Di0o0BdV.mjs';
|
|
4
4
|
import 'node:os';
|
|
5
5
|
import 'node:crypto';
|
|
6
6
|
import 'cross-spawn';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
import { readFileSync, statSync } from 'node:fs';
|
|
3
3
|
import { resolve } from 'node:path';
|
|
4
|
-
import { c as checkIfDaemonRunningAndCleanupStaleState, s as spawnDaemonSession, a as sessionWebUrl, i as isValidSpawnOrigin, b as sanitizeSpawnPermissionMode, A as ALLOWED_SPAWN_PERMISSION_MODES, S as SPAWN_AGENTS, w as waitForSessionKey, d as sendUserMessage } from './index-
|
|
5
|
-
import { l as logger } from './types-
|
|
4
|
+
import { c as checkIfDaemonRunningAndCleanupStaleState, s as spawnDaemonSession, a as sessionWebUrl, i as isValidSpawnOrigin, b as sanitizeSpawnPermissionMode, A as ALLOWED_SPAWN_PERMISSION_MODES, S as SPAWN_AGENTS, w as waitForSessionKey, d as sendUserMessage } from './index-CUJ6faw1.mjs';
|
|
5
|
+
import { l as logger } from './types-Di0o0BdV.mjs';
|
|
6
6
|
import 'node:os';
|
|
7
7
|
import 'node:crypto';
|
|
8
8
|
import 'cross-spawn';
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
var chalk = require('chalk');
|
|
4
4
|
var node_fs = require('node:fs');
|
|
5
5
|
var path = require('node:path');
|
|
6
|
-
var index = require('./index-
|
|
7
|
-
var persistence = require('./types-
|
|
6
|
+
var index = require('./index-BlkIz9BQ.cjs');
|
|
7
|
+
var persistence = require('./types-7ZSxm6Pi.cjs');
|
|
8
8
|
require('node:os');
|
|
9
9
|
require('node:crypto');
|
|
10
10
|
require('cross-spawn');
|
|
@@ -51,7 +51,7 @@ var z__namespace = /*#__PURE__*/_interopNamespaceDefault(z);
|
|
|
51
51
|
var pty__namespace = /*#__PURE__*/_interopNamespaceDefault(pty);
|
|
52
52
|
|
|
53
53
|
var name = "very-happy-cli";
|
|
54
|
-
var version = "0.2.
|
|
54
|
+
var version = "0.2.120";
|
|
55
55
|
var description = "Remote multi-agent workspace CLI with deep Claude integration, native terminal streaming, and self-hosting.";
|
|
56
56
|
var author = "Kirill Dubovitskiy";
|
|
57
57
|
var contributors = [
|
|
@@ -164,12 +164,12 @@ var dependencies = {
|
|
|
164
164
|
zod: "^4.0.0"
|
|
165
165
|
};
|
|
166
166
|
var optionalDependencies = {
|
|
167
|
-
"very-happy-tools-arm64-darwin": "0.2.
|
|
168
|
-
"very-happy-tools-x64-darwin": "0.2.
|
|
169
|
-
"very-happy-tools-arm64-linux": "0.2.
|
|
170
|
-
"very-happy-tools-x64-linux": "0.2.
|
|
171
|
-
"very-happy-tools-arm64-win32": "0.2.
|
|
172
|
-
"very-happy-tools-x64-win32": "0.2.
|
|
167
|
+
"very-happy-tools-arm64-darwin": "0.2.120",
|
|
168
|
+
"very-happy-tools-x64-darwin": "0.2.120",
|
|
169
|
+
"very-happy-tools-arm64-linux": "0.2.120",
|
|
170
|
+
"very-happy-tools-x64-linux": "0.2.120",
|
|
171
|
+
"very-happy-tools-arm64-win32": "0.2.120",
|
|
172
|
+
"very-happy-tools-x64-win32": "0.2.120"
|
|
173
173
|
};
|
|
174
174
|
var devDependencies = {
|
|
175
175
|
"@slopus/happy-wire": "workspace:*",
|
|
@@ -1685,7 +1685,7 @@ class RpcHandlerManager {
|
|
|
1685
1685
|
}
|
|
1686
1686
|
}
|
|
1687
1687
|
|
|
1688
|
-
const __dirname$1 = path$1.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('types-
|
|
1688
|
+
const __dirname$1 = path$1.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('types-7ZSxm6Pi.cjs', document.baseURI).href))));
|
|
1689
1689
|
function projectPath() {
|
|
1690
1690
|
const path = path$1.resolve(__dirname$1, "..");
|
|
1691
1691
|
return path;
|
|
@@ -4472,33 +4472,43 @@ function migrateSettings(raw, fromVersion) {
|
|
|
4472
4472
|
let migrated = { ...raw };
|
|
4473
4473
|
return migrated;
|
|
4474
4474
|
}
|
|
4475
|
-
async function
|
|
4475
|
+
async function readSettingsOutcome() {
|
|
4476
4476
|
if (!node_fs.existsSync(configuration.settingsFile)) {
|
|
4477
|
-
return {
|
|
4477
|
+
return { kind: "absent" };
|
|
4478
4478
|
}
|
|
4479
4479
|
try {
|
|
4480
|
-
|
|
4481
|
-
const raw = JSON.parse(content);
|
|
4482
|
-
const schemaVersion = raw.schemaVersion ?? 1;
|
|
4483
|
-
if (schemaVersion > SUPPORTED_SCHEMA_VERSION) {
|
|
4484
|
-
logger.warn(
|
|
4485
|
-
`\u26A0\uFE0F Settings schema v${schemaVersion} > supported v${SUPPORTED_SCHEMA_VERSION}. Update happy-cli for full functionality.`
|
|
4486
|
-
);
|
|
4487
|
-
}
|
|
4488
|
-
const migrated = migrateSettings(raw, schemaVersion);
|
|
4489
|
-
if (migrated.sandboxConfig !== void 0) {
|
|
4490
|
-
try {
|
|
4491
|
-
migrated.sandboxConfig = SandboxConfigSchema.parse(migrated.sandboxConfig);
|
|
4492
|
-
} catch (error) {
|
|
4493
|
-
logger.warn(`\u26A0\uFE0F Invalid sandbox config - skipping. Error: ${error.message}`);
|
|
4494
|
-
migrated.sandboxConfig = void 0;
|
|
4495
|
-
}
|
|
4496
|
-
}
|
|
4497
|
-
return { ...defaultSettings, ...migrated };
|
|
4480
|
+
return { kind: "ok", settings: await parseSettingsFile() };
|
|
4498
4481
|
} catch (error) {
|
|
4499
|
-
|
|
4500
|
-
|
|
4482
|
+
return { kind: "unreadable", error: error?.message ?? String(error) };
|
|
4483
|
+
}
|
|
4484
|
+
}
|
|
4485
|
+
async function readSettings() {
|
|
4486
|
+
const outcome = await readSettingsOutcome();
|
|
4487
|
+
if (outcome.kind === "ok") return outcome.settings;
|
|
4488
|
+
if (outcome.kind === "unreadable") {
|
|
4489
|
+
logger.warn(`Failed to read settings: ${outcome.error}`);
|
|
4490
|
+
}
|
|
4491
|
+
return { ...defaultSettings };
|
|
4492
|
+
}
|
|
4493
|
+
async function parseSettingsFile() {
|
|
4494
|
+
const content = await promises.readFile(configuration.settingsFile, "utf8");
|
|
4495
|
+
const raw = JSON.parse(content);
|
|
4496
|
+
const schemaVersion = raw.schemaVersion ?? 1;
|
|
4497
|
+
if (schemaVersion > SUPPORTED_SCHEMA_VERSION) {
|
|
4498
|
+
logger.warn(
|
|
4499
|
+
`\u26A0\uFE0F Settings schema v${schemaVersion} > supported v${SUPPORTED_SCHEMA_VERSION}. Update happy-cli for full functionality.`
|
|
4500
|
+
);
|
|
4501
4501
|
}
|
|
4502
|
+
const migrated = migrateSettings(raw);
|
|
4503
|
+
if (migrated.sandboxConfig !== void 0) {
|
|
4504
|
+
try {
|
|
4505
|
+
migrated.sandboxConfig = SandboxConfigSchema.parse(migrated.sandboxConfig);
|
|
4506
|
+
} catch (error) {
|
|
4507
|
+
logger.warn(`\u26A0\uFE0F Invalid sandbox config - skipping. Error: ${error.message}`);
|
|
4508
|
+
migrated.sandboxConfig = void 0;
|
|
4509
|
+
}
|
|
4510
|
+
}
|
|
4511
|
+
return { ...defaultSettings, ...migrated };
|
|
4502
4512
|
}
|
|
4503
4513
|
async function writeSettings(settings) {
|
|
4504
4514
|
await ensurePrivateDirectory(configuration.happyHomeDir);
|
|
@@ -4541,7 +4551,13 @@ async function updateSettings(updater) {
|
|
|
4541
4551
|
throw new Error(`Failed to acquire settings lock after ${MAX_LOCK_ATTEMPTS * LOCK_RETRY_INTERVAL_MS / 1e3} seconds`);
|
|
4542
4552
|
}
|
|
4543
4553
|
try {
|
|
4544
|
-
const
|
|
4554
|
+
const outcome = await readSettingsOutcome();
|
|
4555
|
+
if (outcome.kind === "unreadable") {
|
|
4556
|
+
throw new Error(
|
|
4557
|
+
`Settings file ${configuration.settingsFile} exists but could not be read (${outcome.error}). Refusing to overwrite it \u2014 fix or remove the file (a removed file is recreated with defaults).`
|
|
4558
|
+
);
|
|
4559
|
+
}
|
|
4560
|
+
const current = outcome.kind === "ok" ? outcome.settings : { ...defaultSettings };
|
|
4545
4561
|
const updated = await updater(current);
|
|
4546
4562
|
await ensurePrivateDirectory(configuration.happyHomeDir);
|
|
4547
4563
|
await writePrivateFile(tmpFile, JSON.stringify(updated, null, 2));
|
|
@@ -4788,6 +4804,7 @@ var persistence = /*#__PURE__*/Object.freeze({
|
|
|
4788
4804
|
readDaemonState: readDaemonState,
|
|
4789
4805
|
readPersistedSessions: readPersistedSessions,
|
|
4790
4806
|
readSettings: readSettings,
|
|
4807
|
+
readSettingsOutcome: readSettingsOutcome,
|
|
4791
4808
|
readTrackedClaudeSessionIds: readTrackedClaudeSessionIds,
|
|
4792
4809
|
releaseDaemonLock: releaseDaemonLock,
|
|
4793
4810
|
updateSettings: updateSettings,
|
|
@@ -16720,6 +16737,7 @@ exports.readDaemonState = readDaemonState;
|
|
|
16720
16737
|
exports.readLocalHappyAgentCredentials = readLocalHappyAgentCredentials;
|
|
16721
16738
|
exports.readPersistedSessions = readPersistedSessions;
|
|
16722
16739
|
exports.readSettings = readSettings;
|
|
16740
|
+
exports.readSettingsOutcome = readSettingsOutcome;
|
|
16723
16741
|
exports.readVhTerminal = readVhTerminal;
|
|
16724
16742
|
exports.releaseDaemonLock = releaseDaemonLock;
|
|
16725
16743
|
exports.resolveCliUpdateCheckInterval = resolveCliUpdateCheckInterval;
|
|
@@ -29,7 +29,7 @@ import { SandboxManager } from '@anthropic-ai/sandbox-runtime';
|
|
|
29
29
|
import { Expo } from 'expo-server-sdk';
|
|
30
30
|
|
|
31
31
|
var name = "very-happy-cli";
|
|
32
|
-
var version = "0.2.
|
|
32
|
+
var version = "0.2.120";
|
|
33
33
|
var description = "Remote multi-agent workspace CLI with deep Claude integration, native terminal streaming, and self-hosting.";
|
|
34
34
|
var author = "Kirill Dubovitskiy";
|
|
35
35
|
var contributors = [
|
|
@@ -142,12 +142,12 @@ var dependencies = {
|
|
|
142
142
|
zod: "^4.0.0"
|
|
143
143
|
};
|
|
144
144
|
var optionalDependencies = {
|
|
145
|
-
"very-happy-tools-arm64-darwin": "0.2.
|
|
146
|
-
"very-happy-tools-x64-darwin": "0.2.
|
|
147
|
-
"very-happy-tools-arm64-linux": "0.2.
|
|
148
|
-
"very-happy-tools-x64-linux": "0.2.
|
|
149
|
-
"very-happy-tools-arm64-win32": "0.2.
|
|
150
|
-
"very-happy-tools-x64-win32": "0.2.
|
|
145
|
+
"very-happy-tools-arm64-darwin": "0.2.120",
|
|
146
|
+
"very-happy-tools-x64-darwin": "0.2.120",
|
|
147
|
+
"very-happy-tools-arm64-linux": "0.2.120",
|
|
148
|
+
"very-happy-tools-x64-linux": "0.2.120",
|
|
149
|
+
"very-happy-tools-arm64-win32": "0.2.120",
|
|
150
|
+
"very-happy-tools-x64-win32": "0.2.120"
|
|
151
151
|
};
|
|
152
152
|
var devDependencies = {
|
|
153
153
|
"@slopus/happy-wire": "workspace:*",
|
|
@@ -4450,33 +4450,43 @@ function migrateSettings(raw, fromVersion) {
|
|
|
4450
4450
|
let migrated = { ...raw };
|
|
4451
4451
|
return migrated;
|
|
4452
4452
|
}
|
|
4453
|
-
async function
|
|
4453
|
+
async function readSettingsOutcome() {
|
|
4454
4454
|
if (!existsSync(configuration.settingsFile)) {
|
|
4455
|
-
return {
|
|
4455
|
+
return { kind: "absent" };
|
|
4456
4456
|
}
|
|
4457
4457
|
try {
|
|
4458
|
-
|
|
4459
|
-
const raw = JSON.parse(content);
|
|
4460
|
-
const schemaVersion = raw.schemaVersion ?? 1;
|
|
4461
|
-
if (schemaVersion > SUPPORTED_SCHEMA_VERSION) {
|
|
4462
|
-
logger.warn(
|
|
4463
|
-
`\u26A0\uFE0F Settings schema v${schemaVersion} > supported v${SUPPORTED_SCHEMA_VERSION}. Update happy-cli for full functionality.`
|
|
4464
|
-
);
|
|
4465
|
-
}
|
|
4466
|
-
const migrated = migrateSettings(raw, schemaVersion);
|
|
4467
|
-
if (migrated.sandboxConfig !== void 0) {
|
|
4468
|
-
try {
|
|
4469
|
-
migrated.sandboxConfig = SandboxConfigSchema.parse(migrated.sandboxConfig);
|
|
4470
|
-
} catch (error) {
|
|
4471
|
-
logger.warn(`\u26A0\uFE0F Invalid sandbox config - skipping. Error: ${error.message}`);
|
|
4472
|
-
migrated.sandboxConfig = void 0;
|
|
4473
|
-
}
|
|
4474
|
-
}
|
|
4475
|
-
return { ...defaultSettings, ...migrated };
|
|
4458
|
+
return { kind: "ok", settings: await parseSettingsFile() };
|
|
4476
4459
|
} catch (error) {
|
|
4477
|
-
|
|
4478
|
-
|
|
4460
|
+
return { kind: "unreadable", error: error?.message ?? String(error) };
|
|
4461
|
+
}
|
|
4462
|
+
}
|
|
4463
|
+
async function readSettings() {
|
|
4464
|
+
const outcome = await readSettingsOutcome();
|
|
4465
|
+
if (outcome.kind === "ok") return outcome.settings;
|
|
4466
|
+
if (outcome.kind === "unreadable") {
|
|
4467
|
+
logger.warn(`Failed to read settings: ${outcome.error}`);
|
|
4468
|
+
}
|
|
4469
|
+
return { ...defaultSettings };
|
|
4470
|
+
}
|
|
4471
|
+
async function parseSettingsFile() {
|
|
4472
|
+
const content = await readFile$1(configuration.settingsFile, "utf8");
|
|
4473
|
+
const raw = JSON.parse(content);
|
|
4474
|
+
const schemaVersion = raw.schemaVersion ?? 1;
|
|
4475
|
+
if (schemaVersion > SUPPORTED_SCHEMA_VERSION) {
|
|
4476
|
+
logger.warn(
|
|
4477
|
+
`\u26A0\uFE0F Settings schema v${schemaVersion} > supported v${SUPPORTED_SCHEMA_VERSION}. Update happy-cli for full functionality.`
|
|
4478
|
+
);
|
|
4479
4479
|
}
|
|
4480
|
+
const migrated = migrateSettings(raw);
|
|
4481
|
+
if (migrated.sandboxConfig !== void 0) {
|
|
4482
|
+
try {
|
|
4483
|
+
migrated.sandboxConfig = SandboxConfigSchema.parse(migrated.sandboxConfig);
|
|
4484
|
+
} catch (error) {
|
|
4485
|
+
logger.warn(`\u26A0\uFE0F Invalid sandbox config - skipping. Error: ${error.message}`);
|
|
4486
|
+
migrated.sandboxConfig = void 0;
|
|
4487
|
+
}
|
|
4488
|
+
}
|
|
4489
|
+
return { ...defaultSettings, ...migrated };
|
|
4480
4490
|
}
|
|
4481
4491
|
async function writeSettings(settings) {
|
|
4482
4492
|
await ensurePrivateDirectory(configuration.happyHomeDir);
|
|
@@ -4519,7 +4529,13 @@ async function updateSettings(updater) {
|
|
|
4519
4529
|
throw new Error(`Failed to acquire settings lock after ${MAX_LOCK_ATTEMPTS * LOCK_RETRY_INTERVAL_MS / 1e3} seconds`);
|
|
4520
4530
|
}
|
|
4521
4531
|
try {
|
|
4522
|
-
const
|
|
4532
|
+
const outcome = await readSettingsOutcome();
|
|
4533
|
+
if (outcome.kind === "unreadable") {
|
|
4534
|
+
throw new Error(
|
|
4535
|
+
`Settings file ${configuration.settingsFile} exists but could not be read (${outcome.error}). Refusing to overwrite it \u2014 fix or remove the file (a removed file is recreated with defaults).`
|
|
4536
|
+
);
|
|
4537
|
+
}
|
|
4538
|
+
const current = outcome.kind === "ok" ? outcome.settings : { ...defaultSettings };
|
|
4523
4539
|
const updated = await updater(current);
|
|
4524
4540
|
await ensurePrivateDirectory(configuration.happyHomeDir);
|
|
4525
4541
|
await writePrivateFile(tmpFile, JSON.stringify(updated, null, 2));
|
|
@@ -4766,6 +4782,7 @@ var persistence = /*#__PURE__*/Object.freeze({
|
|
|
4766
4782
|
readDaemonState: readDaemonState,
|
|
4767
4783
|
readPersistedSessions: readPersistedSessions,
|
|
4768
4784
|
readSettings: readSettings,
|
|
4785
|
+
readSettingsOutcome: readSettingsOutcome,
|
|
4769
4786
|
readTrackedClaudeSessionIds: readTrackedClaudeSessionIds,
|
|
4770
4787
|
releaseDaemonLock: releaseDaemonLock,
|
|
4771
4788
|
updateSettings: updateSettings,
|
|
@@ -16630,4 +16647,4 @@ const RawJSONLinesSchema = z$1.discriminatedUnion("type", [
|
|
|
16630
16647
|
}).passthrough()
|
|
16631
16648
|
]);
|
|
16632
16649
|
|
|
16633
|
-
export {
|
|
16650
|
+
export { decideMirrorBinding as $, ApiClient as A, readCredentials as B, credentialRelayProblem as C, deriveLocalCliUpdateSummary as D, readSettingsOutcome as E, updateSettings as F, encodeBase64Url as G, decodeBase64 as H, InvalidateSync as I, writeCredentialsLegacy as J, writeCredentialsDataKey as K, readCredentialsForConfiguredRelay as L, MAX_CHAT_ATTACHMENT_SOURCE_BYTES as M, encrypt as N, isClaudeSessionId as O, getLocalHappyAgentCredentialPath as P, readLocalHappyAgentCredentials as Q, RawJSONLinesSchema as R, STREAM_DELTA_MAX_CHARS as S, decryptWithDataKey as T, decryptLegacy as U, compareExactVersions as V, extractCompleteLines as W, decideBackfill as X, parseTerminalHookPayload as Y, tmuxArgs as Z, scrubTmuxClientEnv as _, ApiSessionClient as a, MIRROR_BACKFILL_LINES_DEFAULT as a0, persistSession as a1, mirrorLineKey as a2, mirrorLocalId as a3, detectCLIAvailability as a4, detectResumeSupport as a5, acquireDaemonLock as a6, summarizeSpawnSessionForLog as a7, deletePersistedSessions as a8, shellescape as a9, decrypt as aa, writeDaemonState as ab, writeSettings as ac, fetchCliUpdateState as ad, resolveCliUpdateCheckInterval as ae, DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS as af, releaseDaemonLock as ag, listVhTerminals as ah, isValidTerminalId as ai, readVhTerminal as aj, sendToVhTerminal as ak, TITLE_PROMPT_PREFIX as al, BOARD_ANALYZER_PROMPT_PREFIX as am, startOfflineReconnection as an, clearCredentials as ao, clearMachineId as ap, SandboxConfigSchema as aq, CodexAppServerClient as ar, getLatestDaemonLog as as, persistence as at, api as au, createEnvelope as b, configuration as c, connectionState as d, readSettings as e, encodeBase64 as f, contentLogMetadata as g, errorLogMetadata as h, isValidSessionId as i, packageJson as j, delay as k, logger as l, ensurePrivateDirectorySync as m, hardenPrivateFileSync as n, readDaemonState as o, projectPath as p, clearDaemonState as q, readPersistedSessions as r, getProjectPath as s, initializeSandbox as t, wrapCommand as u, AsyncLock as v, writePrivateFileSync as w, ensurePrivateDirectory as x, hardenPrivateFile as y, commandOnPath as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "very-happy-cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.120",
|
|
4
4
|
"description": "Remote multi-agent workspace CLI with deep Claude integration, native terminal streaming, and self-hosting.",
|
|
5
5
|
"author": "Kirill Dubovitskiy",
|
|
6
6
|
"contributors": [
|
|
@@ -113,12 +113,12 @@
|
|
|
113
113
|
"zod": "^4.0.0"
|
|
114
114
|
},
|
|
115
115
|
"optionalDependencies": {
|
|
116
|
-
"very-happy-tools-arm64-darwin": "0.2.
|
|
117
|
-
"very-happy-tools-x64-darwin": "0.2.
|
|
118
|
-
"very-happy-tools-arm64-linux": "0.2.
|
|
119
|
-
"very-happy-tools-x64-linux": "0.2.
|
|
120
|
-
"very-happy-tools-arm64-win32": "0.2.
|
|
121
|
-
"very-happy-tools-x64-win32": "0.2.
|
|
116
|
+
"very-happy-tools-arm64-darwin": "0.2.120",
|
|
117
|
+
"very-happy-tools-x64-darwin": "0.2.120",
|
|
118
|
+
"very-happy-tools-arm64-linux": "0.2.120",
|
|
119
|
+
"very-happy-tools-x64-linux": "0.2.120",
|
|
120
|
+
"very-happy-tools-arm64-win32": "0.2.120",
|
|
121
|
+
"very-happy-tools-x64-win32": "0.2.120"
|
|
122
122
|
},
|
|
123
123
|
"devDependencies": {
|
|
124
124
|
"@slopus/happy-wire": "workspace:*",
|