very-happy-cli 0.2.112 → 0.2.114
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-DDEdYVW2.mjs → AcpBackend-4DC6CDpP.mjs} +1 -1
- package/dist/{AcpBackend-B3x-gQWP.cjs → AcpBackend-BYv1pHW6.cjs} +1 -1
- package/dist/{AcpSessionManager-DGPLD-go.cjs → AcpSessionManager-BBCEuz5G.cjs} +1 -1
- package/dist/{AcpSessionManager-BORAhQ1r.mjs → AcpSessionManager-CvDQWnwm.mjs} +1 -1
- package/dist/{config-KX6e7GEu.cjs → config-B1W5KTvn.cjs} +2 -2
- package/dist/{config-B_L5vXXu.mjs → config-BYEj8cnm.mjs} +2 -2
- package/dist/{index-Cu5FdgTq.mjs → index-B-PX710g.mjs} +5 -5
- package/dist/{index-B7-t5Kwz.cjs → index-BtFBYvj8.cjs} +4 -4
- package/dist/{index-BnRQP3PL.cjs → index-CQ9f70v9.cjs} +18 -18
- package/dist/{index-CTd0skWH.cjs → index-CiNMkjGe.cjs} +2 -2
- package/dist/{index-inkhalP5.mjs → index-DJcR5PQb.mjs} +14 -14
- package/dist/{index-lQzCAx9I.mjs → index-DXJ4FLp5.mjs} +2 -2
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{installTerminalHooks-CQiW7Jn9.mjs → installTerminalHooks-BKqlOoi4.mjs} +2 -2
- package/dist/{installTerminalHooks-BVk-r0yD.cjs → installTerminalHooks-CvWutFrA.cjs} +2 -2
- package/dist/lib.cjs +1 -1
- package/dist/lib.mjs +1 -1
- package/dist/{mcp-D0DIU8Q2.cjs → mcp-KhfiJ6OC.cjs} +2 -2
- package/dist/{mcp-DD-0VkiA.mjs → mcp-kyB44gVF.mjs} +2 -2
- package/dist/{runGemini-Dq1d8Ccb.cjs → runGemini-DYN1hVth.cjs} +4 -4
- package/dist/{runGemini-DHyBDo5P.mjs → runGemini-Jn7L2hqR.mjs} +4 -4
- package/dist/{runOpenClaw-DX-tgQ2V.mjs → runOpenClaw-BZL1CSvh.mjs} +3 -3
- package/dist/{runOpenClaw-BHXnUF_m.cjs → runOpenClaw-DHqzKgke.cjs} +3 -3
- package/dist/{send-0TYDXiGx.mjs → send-DlNrAHnH.mjs} +2 -2
- package/dist/{send-By6zEUWo.cjs → send-m-ZqzS6w.cjs} +2 -2
- package/dist/{sessions-TM8VaCMY.mjs → sessions-CpM_qzf7.mjs} +2 -2
- package/dist/{sessions-DTBRcBRk.cjs → sessions-Qbk_H0Av.cjs} +2 -2
- package/dist/{spawn-CweTEYze.cjs → spawn-D09KFk0I.cjs} +2 -2
- package/dist/{spawn-D0oTo5BT.mjs → spawn-Do8fUG8J.mjs} +2 -2
- package/dist/{types-C5ewhu1Q.mjs → types-C6vCFbPv.mjs} +77 -8
- package/dist/{types-R11tMGyX.cjs → types-D14vU6_q.cjs} +78 -9
- 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, 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-C6vCFbPv.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-D14vU6_q.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-D14vU6_q.cjs');
|
|
8
|
+
var index = require('./index-CQ9f70v9.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 { g as DEFAULT_GEMINI_MODEL, G as GEMINI_MODEL_ENV } from './index-
|
|
5
|
+
import { l as logger } from './types-C6vCFbPv.mjs';
|
|
6
|
+
import { g as DEFAULT_GEMINI_MODEL, G as GEMINI_MODEL_ENV } from './index-DJcR5PQb.mjs';
|
|
7
7
|
import 'axios';
|
|
8
8
|
import 'chalk';
|
|
9
9
|
import 'node:util';
|
|
@@ -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 { h as connectionState, A as ApiClient, j as readSettings, k 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-4DC6CDpP.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-4DC6CDpP.mjs';
|
|
3
|
+
import { h as connectionState, A as ApiClient, j as readSettings, k as encodeBase64, l as logger, p as projectPath } from './types-C6vCFbPv.mjs';
|
|
4
|
+
import { A as AcpSessionManager } from './AcpSessionManager-CvDQWnwm.mjs';
|
|
5
5
|
import { randomUUID } from 'node:crypto';
|
|
6
6
|
import { join } from 'node:path';
|
|
7
|
-
import { h as initialMachineMetadata, j as createSessionMetadata, k as setupOfflineReconnection, n as notifyDaemonSessionStarted, m as MessageQueue2, o as hashObject, u as startHappyServer, v as registerKillSessionHandler, B as BasePermissionHandler } from './index-
|
|
7
|
+
import { h as initialMachineMetadata, j as createSessionMetadata, k as setupOfflineReconnection, n as notifyDaemonSessionStarted, m as MessageQueue2, o as hashObject, u as startHappyServer, v as registerKillSessionHandler, B as BasePermissionHandler } from './index-DJcR5PQb.mjs';
|
|
8
8
|
import 'node:child_process';
|
|
9
9
|
import '@agentclientprotocol/sdk';
|
|
10
10
|
import 'axios';
|
|
@@ -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-BYv1pHW6.cjs');
|
|
4
|
+
var persistence = require('./types-D14vU6_q.cjs');
|
|
5
|
+
var AcpSessionManager = require('./AcpSessionManager-BBCEuz5G.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-CQ9f70v9.cjs');
|
|
9
9
|
require('node:child_process');
|
|
10
10
|
require('@agentclientprotocol/sdk');
|
|
11
11
|
require('axios');
|
|
@@ -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-D14vU6_q.cjs');
|
|
7
7
|
var spawn = require('cross-spawn');
|
|
8
8
|
var path = require('node:path');
|
|
9
9
|
var node_readline = require('node:readline');
|
|
@@ -7171,7 +7171,7 @@ function parseJsonObject(text) {
|
|
|
7171
7171
|
return null;
|
|
7172
7172
|
}
|
|
7173
7173
|
}
|
|
7174
|
-
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-
|
|
7174
|
+
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-CQ9f70v9.cjs', document.baseURI).href))).resolve(s)) {
|
|
7175
7175
|
const platformArch = `${platform}-${arch}`;
|
|
7176
7176
|
const candidates = [
|
|
7177
7177
|
`@anthropic-ai/claude-agent-sdk-${platformArch}/claude`,
|
|
@@ -10618,7 +10618,7 @@ function registerSideQuestionHandler(rpc, deps) {
|
|
|
10618
10618
|
const retainMs = deps.retainMs ?? SIDE_QUESTION_RETAIN_MS;
|
|
10619
10619
|
const maxRunMs = deps.maxRunMs ?? SIDE_QUESTION_MAX_RUN_MS;
|
|
10620
10620
|
const run = deps.run ?? (async (input) => {
|
|
10621
|
-
const { query } = await Promise.resolve().then(function () { return require('./index-
|
|
10621
|
+
const { query } = await Promise.resolve().then(function () { return require('./index-CiNMkjGe.cjs'); });
|
|
10622
10622
|
return runSideQuestion(query, input);
|
|
10623
10623
|
});
|
|
10624
10624
|
const slots = /* @__PURE__ */ new Map();
|
|
@@ -10720,7 +10720,7 @@ const MAX_TITLE_CHARS = 60;
|
|
|
10720
10720
|
const GENERATION_TIMEOUT_MS = 3e4;
|
|
10721
10721
|
function resolveClaudeBinary() {
|
|
10722
10722
|
try {
|
|
10723
|
-
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-
|
|
10723
|
+
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-CQ9f70v9.cjs', document.baseURI).href)));
|
|
10724
10724
|
const utilsPath = path.resolve(path.join(persistence.projectPath(), "scripts", "claude_version_utils.cjs"));
|
|
10725
10725
|
const { getClaudeCliPath } = require$1(utilsPath);
|
|
10726
10726
|
const path$1 = getClaudeCliPath();
|
|
@@ -12922,9 +12922,9 @@ function resolveLocalSignupBootstrap(configuredMode, configuredInviteCodes, gene
|
|
|
12922
12922
|
};
|
|
12923
12923
|
}
|
|
12924
12924
|
|
|
12925
|
-
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-
|
|
12925
|
+
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-CQ9f70v9.cjs', document.baseURI).href)));
|
|
12926
12926
|
const __dirname$1 = path.dirname(__filename$1);
|
|
12927
|
-
const require_ = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-
|
|
12927
|
+
const require_ = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-CQ9f70v9.cjs', document.baseURI).href)));
|
|
12928
12928
|
const PRISMA_QUERY_ENGINE_FILES = {
|
|
12929
12929
|
"arm64-darwin": "libquery_engine-darwin-arm64.dylib.node",
|
|
12930
12930
|
"x64-darwin": "libquery_engine-darwin.dylib.node",
|
|
@@ -15548,7 +15548,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15548
15548
|
process.exit(0);
|
|
15549
15549
|
} else if (subcommand === "install-terminal-hooks") {
|
|
15550
15550
|
try {
|
|
15551
|
-
const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await Promise.resolve().then(function () { return require('./installTerminalHooks-
|
|
15551
|
+
const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await Promise.resolve().then(function () { return require('./installTerminalHooks-CvWutFrA.cjs'); });
|
|
15552
15552
|
const command = parseTerminalHooksArgs(args.slice(1));
|
|
15553
15553
|
if (command.action === "help") {
|
|
15554
15554
|
console.log(TERMINAL_HOOKS_HELP);
|
|
@@ -15565,7 +15565,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15565
15565
|
}
|
|
15566
15566
|
} else if (subcommand === "spawn") {
|
|
15567
15567
|
try {
|
|
15568
|
-
const { handleSpawnCommand } = await Promise.resolve().then(function () { return require('./spawn-
|
|
15568
|
+
const { handleSpawnCommand } = await Promise.resolve().then(function () { return require('./spawn-D09KFk0I.cjs'); });
|
|
15569
15569
|
await handleSpawnCommand(args.slice(1));
|
|
15570
15570
|
} catch (error) {
|
|
15571
15571
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -15577,7 +15577,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15577
15577
|
return;
|
|
15578
15578
|
} else if (subcommand === "sessions") {
|
|
15579
15579
|
try {
|
|
15580
|
-
const { handleSessionsCommand } = await Promise.resolve().then(function () { return require('./sessions-
|
|
15580
|
+
const { handleSessionsCommand } = await Promise.resolve().then(function () { return require('./sessions-Qbk_H0Av.cjs'); });
|
|
15581
15581
|
await handleSessionsCommand(args.slice(1));
|
|
15582
15582
|
} catch (error) {
|
|
15583
15583
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -15589,7 +15589,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15589
15589
|
return;
|
|
15590
15590
|
} else if (subcommand === "send") {
|
|
15591
15591
|
try {
|
|
15592
|
-
const { handleSendCommand } = await Promise.resolve().then(function () { return require('./send-
|
|
15592
|
+
const { handleSendCommand } = await Promise.resolve().then(function () { return require('./send-m-ZqzS6w.cjs'); });
|
|
15593
15593
|
await handleSendCommand(args.slice(1));
|
|
15594
15594
|
} catch (error) {
|
|
15595
15595
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -15695,9 +15695,9 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15695
15695
|
if (geminiSubcommand === "project" && args[2] === "set" && args[3]) {
|
|
15696
15696
|
const projectId = args[3];
|
|
15697
15697
|
try {
|
|
15698
|
-
const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return require('./config-
|
|
15699
|
-
const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await Promise.resolve().then(function () { return require('./types-
|
|
15700
|
-
const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./types-
|
|
15698
|
+
const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return require('./config-B1W5KTvn.cjs'); });
|
|
15699
|
+
const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await Promise.resolve().then(function () { return require('./types-D14vU6_q.cjs'); }).then(function (n) { return n.persistence; });
|
|
15700
|
+
const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./types-D14vU6_q.cjs'); }).then(function (n) { return n.api; });
|
|
15701
15701
|
let userEmail = void 0;
|
|
15702
15702
|
try {
|
|
15703
15703
|
const credentials = await readCredentialsForConfiguredRelay2();
|
|
@@ -15728,7 +15728,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15728
15728
|
}
|
|
15729
15729
|
if (geminiSubcommand === "project" && args[2] === "get") {
|
|
15730
15730
|
try {
|
|
15731
|
-
const { readGeminiLocalConfig } = await Promise.resolve().then(function () { return require('./config-
|
|
15731
|
+
const { readGeminiLocalConfig } = await Promise.resolve().then(function () { return require('./config-B1W5KTvn.cjs'); });
|
|
15732
15732
|
const config = readGeminiLocalConfig();
|
|
15733
15733
|
if (config.googleCloudProject) {
|
|
15734
15734
|
console.log(`Current Google Cloud Project: ${config.googleCloudProject}`);
|
|
@@ -15768,7 +15768,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15768
15768
|
process.exit(0);
|
|
15769
15769
|
}
|
|
15770
15770
|
try {
|
|
15771
|
-
const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-
|
|
15771
|
+
const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-DYN1hVth.cjs'); });
|
|
15772
15772
|
let startedBy = void 0;
|
|
15773
15773
|
for (let i = 1; i < args.length; i++) {
|
|
15774
15774
|
if (args[i] === "--started-by") {
|
|
@@ -15790,7 +15790,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15790
15790
|
return;
|
|
15791
15791
|
} else if (subcommand === "acp") {
|
|
15792
15792
|
try {
|
|
15793
|
-
const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-
|
|
15793
|
+
const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-BtFBYvj8.cjs'); });
|
|
15794
15794
|
let startedBy = void 0;
|
|
15795
15795
|
let verbose = false;
|
|
15796
15796
|
const acpArgs = [];
|
|
@@ -15830,7 +15830,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15830
15830
|
return;
|
|
15831
15831
|
} else if (subcommand === "openclaw") {
|
|
15832
15832
|
try {
|
|
15833
|
-
const { runOpenClaw } = await Promise.resolve().then(function () { return require('./runOpenClaw-
|
|
15833
|
+
const { runOpenClaw } = await Promise.resolve().then(function () { return require('./runOpenClaw-DHqzKgke.cjs'); });
|
|
15834
15834
|
let startedBy = void 0;
|
|
15835
15835
|
let verbose = false;
|
|
15836
15836
|
let gatewayUrl;
|
|
@@ -15881,7 +15881,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15881
15881
|
return;
|
|
15882
15882
|
} else if (subcommand === "mcp" && args.length === 1) {
|
|
15883
15883
|
try {
|
|
15884
|
-
const { handleMcpCommand } = await Promise.resolve().then(function () { return require('./mcp-
|
|
15884
|
+
const { handleMcpCommand } = await Promise.resolve().then(function () { return require('./mcp-KhfiJ6OC.cjs'); });
|
|
15885
15885
|
await handleMcpCommand();
|
|
15886
15886
|
} catch (error) {
|
|
15887
15887
|
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-CQ9f70v9.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-D14vU6_q.cjs');
|
|
9
9
|
require('axios');
|
|
10
10
|
require('node:util');
|
|
11
11
|
require('node:fs');
|
|
@@ -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, S as STREAM_DELTA_MAX_CHARS, 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, T as extractCompleteLines, U as decideBackfill, V as parseTerminalHookPayload, W as tmuxArgs, X as scrubTmuxClientEnv, Y as decideMirrorBinding, Z as MIRROR_BACKFILL_LINES_DEFAULT, _ as persistSession, $ as mirrorLineKey, a0 as mirrorLocalId, w as writePrivateFileSync, a1 as detectResumeSupport, a2 as detectCLIAvailability, a3 as acquireDaemonLock, a4 as summarizeSpawnSessionForLog, a5 as deletePersistedSessions, a6 as shellescape, a7 as decrypt, a8 as writeDaemonState, A as ApiClient, a9 as writeSettings, aa as fetchCliUpdateState, ab as resolveCliUpdateCheckInterval, ac as DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS, ad as releaseDaemonLock, i as isValidSessionId, ae as listVhTerminals, af as isValidTerminalId, ag as readVhTerminal, ah as sendToVhTerminal, ai as TITLE_PROMPT_PREFIX, aj as BOARD_ANALYZER_PROMPT_PREFIX, h as connectionState, ak as startOfflineReconnection, al as clearCredentials, am as clearMachineId, m as ensurePrivateDirectorySync, an as SandboxConfigSchema, b as createEnvelope, ao as CodexAppServerClient, ap 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, S as STREAM_DELTA_MAX_CHARS, 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, T as extractCompleteLines, U as decideBackfill, V as parseTerminalHookPayload, W as tmuxArgs, X as scrubTmuxClientEnv, Y as decideMirrorBinding, Z as MIRROR_BACKFILL_LINES_DEFAULT, _ as persistSession, $ as mirrorLineKey, a0 as mirrorLocalId, w as writePrivateFileSync, a1 as detectResumeSupport, a2 as detectCLIAvailability, a3 as acquireDaemonLock, a4 as summarizeSpawnSessionForLog, a5 as deletePersistedSessions, a6 as shellescape, a7 as decrypt, a8 as writeDaemonState, A as ApiClient, a9 as writeSettings, aa as fetchCliUpdateState, ab as resolveCliUpdateCheckInterval, ac as DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS, ad as releaseDaemonLock, i as isValidSessionId, ae as listVhTerminals, af as isValidTerminalId, ag as readVhTerminal, ah as sendToVhTerminal, ai as TITLE_PROMPT_PREFIX, aj as BOARD_ANALYZER_PROMPT_PREFIX, h as connectionState, ak as startOfflineReconnection, al as clearCredentials, am as clearMachineId, m as ensurePrivateDirectorySync, an as SandboxConfigSchema, b as createEnvelope, ao as CodexAppServerClient, ap as getLatestDaemonLog } from './types-C6vCFbPv.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';
|
|
@@ -10596,7 +10596,7 @@ function registerSideQuestionHandler(rpc, deps) {
|
|
|
10596
10596
|
const retainMs = deps.retainMs ?? SIDE_QUESTION_RETAIN_MS;
|
|
10597
10597
|
const maxRunMs = deps.maxRunMs ?? SIDE_QUESTION_MAX_RUN_MS;
|
|
10598
10598
|
const run = deps.run ?? (async (input) => {
|
|
10599
|
-
const { query } = await import('./index-
|
|
10599
|
+
const { query } = await import('./index-DXJ4FLp5.mjs');
|
|
10600
10600
|
return runSideQuestion(query, input);
|
|
10601
10601
|
});
|
|
10602
10602
|
const slots = /* @__PURE__ */ new Map();
|
|
@@ -15526,7 +15526,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15526
15526
|
process.exit(0);
|
|
15527
15527
|
} else if (subcommand === "install-terminal-hooks") {
|
|
15528
15528
|
try {
|
|
15529
|
-
const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await import('./installTerminalHooks-
|
|
15529
|
+
const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await import('./installTerminalHooks-BKqlOoi4.mjs');
|
|
15530
15530
|
const command = parseTerminalHooksArgs(args.slice(1));
|
|
15531
15531
|
if (command.action === "help") {
|
|
15532
15532
|
console.log(TERMINAL_HOOKS_HELP);
|
|
@@ -15543,7 +15543,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15543
15543
|
}
|
|
15544
15544
|
} else if (subcommand === "spawn") {
|
|
15545
15545
|
try {
|
|
15546
|
-
const { handleSpawnCommand } = await import('./spawn-
|
|
15546
|
+
const { handleSpawnCommand } = await import('./spawn-Do8fUG8J.mjs');
|
|
15547
15547
|
await handleSpawnCommand(args.slice(1));
|
|
15548
15548
|
} catch (error) {
|
|
15549
15549
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -15555,7 +15555,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15555
15555
|
return;
|
|
15556
15556
|
} else if (subcommand === "sessions") {
|
|
15557
15557
|
try {
|
|
15558
|
-
const { handleSessionsCommand } = await import('./sessions-
|
|
15558
|
+
const { handleSessionsCommand } = await import('./sessions-CpM_qzf7.mjs');
|
|
15559
15559
|
await handleSessionsCommand(args.slice(1));
|
|
15560
15560
|
} catch (error) {
|
|
15561
15561
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -15567,7 +15567,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15567
15567
|
return;
|
|
15568
15568
|
} else if (subcommand === "send") {
|
|
15569
15569
|
try {
|
|
15570
|
-
const { handleSendCommand } = await import('./send-
|
|
15570
|
+
const { handleSendCommand } = await import('./send-DlNrAHnH.mjs');
|
|
15571
15571
|
await handleSendCommand(args.slice(1));
|
|
15572
15572
|
} catch (error) {
|
|
15573
15573
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -15673,9 +15673,9 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15673
15673
|
if (geminiSubcommand === "project" && args[2] === "set" && args[3]) {
|
|
15674
15674
|
const projectId = args[3];
|
|
15675
15675
|
try {
|
|
15676
|
-
const { saveGoogleCloudProjectToConfig } = await import('./config-
|
|
15677
|
-
const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await import('./types-
|
|
15678
|
-
const { ApiClient: ApiClient2 } = await import('./types-
|
|
15676
|
+
const { saveGoogleCloudProjectToConfig } = await import('./config-BYEj8cnm.mjs');
|
|
15677
|
+
const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await import('./types-C6vCFbPv.mjs').then(function (n) { return n.aq; });
|
|
15678
|
+
const { ApiClient: ApiClient2 } = await import('./types-C6vCFbPv.mjs').then(function (n) { return n.ar; });
|
|
15679
15679
|
let userEmail = void 0;
|
|
15680
15680
|
try {
|
|
15681
15681
|
const credentials = await readCredentialsForConfiguredRelay2();
|
|
@@ -15706,7 +15706,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15706
15706
|
}
|
|
15707
15707
|
if (geminiSubcommand === "project" && args[2] === "get") {
|
|
15708
15708
|
try {
|
|
15709
|
-
const { readGeminiLocalConfig } = await import('./config-
|
|
15709
|
+
const { readGeminiLocalConfig } = await import('./config-BYEj8cnm.mjs');
|
|
15710
15710
|
const config = readGeminiLocalConfig();
|
|
15711
15711
|
if (config.googleCloudProject) {
|
|
15712
15712
|
console.log(`Current Google Cloud Project: ${config.googleCloudProject}`);
|
|
@@ -15746,7 +15746,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15746
15746
|
process.exit(0);
|
|
15747
15747
|
}
|
|
15748
15748
|
try {
|
|
15749
|
-
const { runGemini } = await import('./runGemini-
|
|
15749
|
+
const { runGemini } = await import('./runGemini-Jn7L2hqR.mjs');
|
|
15750
15750
|
let startedBy = void 0;
|
|
15751
15751
|
for (let i = 1; i < args.length; i++) {
|
|
15752
15752
|
if (args[i] === "--started-by") {
|
|
@@ -15768,7 +15768,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15768
15768
|
return;
|
|
15769
15769
|
} else if (subcommand === "acp") {
|
|
15770
15770
|
try {
|
|
15771
|
-
const { runAcp, resolveAcpAgentConfig } = await import('./index-
|
|
15771
|
+
const { runAcp, resolveAcpAgentConfig } = await import('./index-B-PX710g.mjs');
|
|
15772
15772
|
let startedBy = void 0;
|
|
15773
15773
|
let verbose = false;
|
|
15774
15774
|
const acpArgs = [];
|
|
@@ -15808,7 +15808,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15808
15808
|
return;
|
|
15809
15809
|
} else if (subcommand === "openclaw") {
|
|
15810
15810
|
try {
|
|
15811
|
-
const { runOpenClaw } = await import('./runOpenClaw-
|
|
15811
|
+
const { runOpenClaw } = await import('./runOpenClaw-BZL1CSvh.mjs');
|
|
15812
15812
|
let startedBy = void 0;
|
|
15813
15813
|
let verbose = false;
|
|
15814
15814
|
let gatewayUrl;
|
|
@@ -15859,7 +15859,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
15859
15859
|
return;
|
|
15860
15860
|
} else if (subcommand === "mcp" && args.length === 1) {
|
|
15861
15861
|
try {
|
|
15862
|
-
const { handleMcpCommand } = await import('./mcp-
|
|
15862
|
+
const { handleMcpCommand } = await import('./mcp-kyB44gVF.mjs');
|
|
15863
15863
|
await handleMcpCommand();
|
|
15864
15864
|
} catch (error) {
|
|
15865
15865
|
process.stderr.write(`[very-happy mcp] Fatal: ${error instanceof Error ? error.message : String(error)}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { q as query } from './index-
|
|
1
|
+
import { q as query } from './index-DJcR5PQb.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-C6vCFbPv.mjs';
|
|
7
7
|
import 'axios';
|
|
8
8
|
import 'node:util';
|
|
9
9
|
import 'node:fs';
|
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-C6vCFbPv.mjs';
|
|
7
|
+
import { t as tmuxSupportsSessionEnv } from './index-DJcR5PQb.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-D14vU6_q.cjs');
|
|
9
|
+
var index = require('./index-CQ9f70v9.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-C6vCFbPv.mjs';
|
|
2
2
|
import 'axios';
|
|
3
3
|
import 'chalk';
|
|
4
4
|
import 'node:util';
|
|
@@ -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-CQ9f70v9.cjs');
|
|
7
7
|
var limits = require('./limits-KdWKmwtH.cjs');
|
|
8
|
-
var persistence = require('./types-
|
|
8
|
+
var persistence = require('./types-D14vU6_q.cjs');
|
|
9
9
|
require('chalk');
|
|
10
10
|
require('node:os');
|
|
11
11
|
require('node:crypto');
|
|
@@ -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 } from './index-
|
|
4
|
+
import { p as pushClipboardViaDaemon } from './index-DJcR5PQb.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-C6vCFbPv.mjs';
|
|
7
7
|
import 'chalk';
|
|
8
8
|
import 'node:os';
|
|
9
9
|
import '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-D14vU6_q.cjs');
|
|
8
|
+
var index = require('./index-CQ9f70v9.cjs');
|
|
9
|
+
var AcpBackend = require('./AcpBackend-BYv1pHW6.cjs');
|
|
10
|
+
var config = require('./config-B1W5KTvn.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, h as connectionState, A as ApiClient, j as readSettings, e as errorLogMetadata, k as encodeBase64, p as projectPath, d as contentLogMetadata } from './types-
|
|
6
|
-
import { x as GEMINI_API_KEY_ENV, y as GOOGLE_API_KEY_ENV, G as GEMINI_MODEL_ENV, B as BasePermissionHandler, z as BaseReasoningProcessor, h as initialMachineMetadata, j as createSessionMetadata, k as setupOfflineReconnection, n as notifyDaemonSessionStarted, m as MessageQueue2, o as hashObject, C as MessageBuffer, E as CHANGE_TITLE_INSTRUCTION, v as registerKillSessionHandler, u 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, h as connectionState, A as ApiClient, j as readSettings, e as errorLogMetadata, k as encodeBase64, p as projectPath, d as contentLogMetadata } from './types-C6vCFbPv.mjs';
|
|
6
|
+
import { x as GEMINI_API_KEY_ENV, y as GOOGLE_API_KEY_ENV, G as GEMINI_MODEL_ENV, B as BasePermissionHandler, z as BaseReasoningProcessor, h as initialMachineMetadata, j as createSessionMetadata, k as setupOfflineReconnection, n as notifyDaemonSessionStarted, m as MessageQueue2, o as hashObject, C as MessageBuffer, E as CHANGE_TITLE_INSTRUCTION, v as registerKillSessionHandler, u as startHappyServer } from './index-DJcR5PQb.mjs';
|
|
7
|
+
import { A as AcpBackend } from './AcpBackend-4DC6CDpP.mjs';
|
|
8
|
+
import { readGeminiLocalConfig, determineGeminiModel, getGeminiModelSource, getInitialGeminiModel, saveGeminiModelToConfig } from './config-BYEj8cnm.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, e as errorLogMetadata, d as contentLogMetadata, h as connectionState, A as ApiClient, j as readSettings, k as encodeBase64, l as logger, c as configuration } from './types-
|
|
7
|
-
import { A as AcpSessionManager } from './AcpSessionManager-
|
|
8
|
-
import { h as initialMachineMetadata, j as createSessionMetadata, k as setupOfflineReconnection, n as notifyDaemonSessionStarted, m as MessageQueue2, v as registerKillSessionHandler } from './index-
|
|
6
|
+
import { m as ensurePrivateDirectorySync, n as hardenPrivateFileSync, w as writePrivateFileSync, e as errorLogMetadata, d as contentLogMetadata, h as connectionState, A as ApiClient, j as readSettings, k as encodeBase64, l as logger, c as configuration } from './types-C6vCFbPv.mjs';
|
|
7
|
+
import { A as AcpSessionManager } from './AcpSessionManager-CvDQWnwm.mjs';
|
|
8
|
+
import { h as initialMachineMetadata, j as createSessionMetadata, k as setupOfflineReconnection, n as notifyDaemonSessionStarted, m as MessageQueue2, v as registerKillSessionHandler } from './index-DJcR5PQb.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-D14vU6_q.cjs');
|
|
9
|
+
var AcpSessionManager = require('./AcpSessionManager-BBCEuz5G.cjs');
|
|
10
|
+
var index = require('./index-CQ9f70v9.cjs');
|
|
11
11
|
var WebSocket = require('ws');
|
|
12
12
|
var ed = require('@noble/ed25519');
|
|
13
13
|
var sha2_js = require('@noble/hashes/sha2.js');
|
|
@@ -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-C6vCFbPv.mjs';
|
|
5
|
+
import { d as sendUserMessage, a as sessionWebUrl } from './index-DJcR5PQb.mjs';
|
|
6
6
|
import 'axios';
|
|
7
7
|
import 'node:util';
|
|
8
8
|
import 'node:os';
|
|
@@ -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-D14vU6_q.cjs');
|
|
7
|
+
var index = require('./index-CQ9f70v9.cjs');
|
|
8
8
|
require('axios');
|
|
9
9
|
require('node:util');
|
|
10
10
|
require('node:os');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
|
-
import { D as DEFAULT_RECENT_LIMIT, M as MAX_READ_LIMIT, l as listSessions, r as readSessionTranscript, e as stopSession, f 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 listSessions, r as readSessionTranscript, e as stopSession, f as archiveSession } from './index-DJcR5PQb.mjs';
|
|
3
|
+
import { i as isValidSessionId } from './types-C6vCFbPv.mjs';
|
|
4
4
|
import 'node:os';
|
|
5
5
|
import 'node:crypto';
|
|
6
6
|
import 'cross-spawn';
|
|
@@ -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-CQ9f70v9.cjs');
|
|
5
|
+
var persistence = require('./types-D14vU6_q.cjs');
|
|
6
6
|
require('node:os');
|
|
7
7
|
require('node:crypto');
|
|
8
8
|
require('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-CQ9f70v9.cjs');
|
|
7
|
+
var persistence = require('./types-D14vU6_q.cjs');
|
|
8
8
|
require('node:os');
|
|
9
9
|
require('node:crypto');
|
|
10
10
|
require('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, 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, w as waitForSessionKey, d as sendUserMessage } from './index-DJcR5PQb.mjs';
|
|
5
|
+
import { l as logger } from './types-C6vCFbPv.mjs';
|
|
6
6
|
import 'node:os';
|
|
7
7
|
import 'node:crypto';
|
|
8
8
|
import 'cross-spawn';
|
|
@@ -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.114";
|
|
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.114",
|
|
146
|
+
"very-happy-tools-x64-darwin": "0.2.114",
|
|
147
|
+
"very-happy-tools-arm64-linux": "0.2.114",
|
|
148
|
+
"very-happy-tools-x64-linux": "0.2.114",
|
|
149
|
+
"very-happy-tools-arm64-win32": "0.2.114",
|
|
150
|
+
"very-happy-tools-x64-win32": "0.2.114"
|
|
151
151
|
};
|
|
152
152
|
var devDependencies = {
|
|
153
153
|
"@slopus/happy-wire": "workspace:*",
|
|
@@ -1415,6 +1415,23 @@ let backoff = createBackoff({
|
|
|
1415
1415
|
}
|
|
1416
1416
|
});
|
|
1417
1417
|
|
|
1418
|
+
function isRateQuotaCode(code) {
|
|
1419
|
+
return typeof code === "string" && code.endsWith("_rate_quota_exceeded");
|
|
1420
|
+
}
|
|
1421
|
+
const RATE_RETRY_MIN_DELAY_MS = 2e3;
|
|
1422
|
+
const RATE_RETRY_MAX_DELAY_MS = 6e4;
|
|
1423
|
+
function rateRetryDelayMs(attempt, random = Math.random()) {
|
|
1424
|
+
const exponent = Math.max(0, Math.min(attempt, 32) - 1);
|
|
1425
|
+
const ceiling = Math.min(RATE_RETRY_MIN_DELAY_MS * 2 ** exponent, RATE_RETRY_MAX_DELAY_MS);
|
|
1426
|
+
return Math.round(RATE_RETRY_MIN_DELAY_MS + random * (ceiling - RATE_RETRY_MIN_DELAY_MS));
|
|
1427
|
+
}
|
|
1428
|
+
async function pauseForRateQuota(opts) {
|
|
1429
|
+
const ms = rateRetryDelayMs(opts.attempt);
|
|
1430
|
+
opts.log?.(`[RATE] ${opts.label} write refused (${opts.code}), attempt ${opts.attempt} \u2014 waiting ${ms}ms`);
|
|
1431
|
+
await opts.sleep(ms);
|
|
1432
|
+
return ms;
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1418
1435
|
class AsyncLock {
|
|
1419
1436
|
permits = 1;
|
|
1420
1437
|
promiseResolverQueue = [];
|
|
@@ -3989,12 +4006,14 @@ class ApiSessionClient extends EventEmitter {
|
|
|
3989
4006
|
}
|
|
3990
4007
|
updateMetadata(handler) {
|
|
3991
4008
|
this.metadataLock.inLock(async () => {
|
|
4009
|
+
let rateRefusals = 0;
|
|
3992
4010
|
await backoff(async () => {
|
|
3993
4011
|
let updated = handler(this.metadata);
|
|
3994
4012
|
const answer = await this.socket.emitWithAck("update-metadata", { sid: this.sessionId, expectedVersion: this.metadataVersion, metadata: encodeBase64(encrypt(this.encryptionKey, this.encryptionVariant, updated)) });
|
|
3995
4013
|
if (answer.result === "success") {
|
|
3996
4014
|
this.metadata = decrypt(this.encryptionKey, this.encryptionVariant, decodeBase64(answer.metadata));
|
|
3997
4015
|
this.metadataVersion = answer.version;
|
|
4016
|
+
rateRefusals = 0;
|
|
3998
4017
|
} else if (answer.result === "version-mismatch") {
|
|
3999
4018
|
if (answer.version > this.metadataVersion) {
|
|
4000
4019
|
this.metadataVersion = answer.version;
|
|
@@ -4002,6 +4021,16 @@ class ApiSessionClient extends EventEmitter {
|
|
|
4002
4021
|
}
|
|
4003
4022
|
throw new Error("Metadata version mismatch");
|
|
4004
4023
|
} else if (answer.result === "error") {
|
|
4024
|
+
if (isRateQuotaCode(answer.error)) {
|
|
4025
|
+
rateRefusals += 1;
|
|
4026
|
+
await pauseForRateQuota({
|
|
4027
|
+
label: "session metadata",
|
|
4028
|
+
code: answer.error,
|
|
4029
|
+
attempt: rateRefusals,
|
|
4030
|
+
sleep: delay,
|
|
4031
|
+
log: (message) => logger.debug(message)
|
|
4032
|
+
});
|
|
4033
|
+
}
|
|
4005
4034
|
throw new Error("Metadata update failed");
|
|
4006
4035
|
}
|
|
4007
4036
|
});
|
|
@@ -4014,12 +4043,14 @@ class ApiSessionClient extends EventEmitter {
|
|
|
4014
4043
|
updateAgentState(handler) {
|
|
4015
4044
|
logger.debugLargeJson("Updating agent state", this.agentState);
|
|
4016
4045
|
this.agentStateLock.inLock(async () => {
|
|
4046
|
+
let rateRefusals = 0;
|
|
4017
4047
|
await backoff(async () => {
|
|
4018
4048
|
let updated = handler(this.agentState || {});
|
|
4019
4049
|
const answer = await this.socket.emitWithAck("update-state", { sid: this.sessionId, expectedVersion: this.agentStateVersion, agentState: updated ? encodeBase64(encrypt(this.encryptionKey, this.encryptionVariant, updated)) : null });
|
|
4020
4050
|
if (answer.result === "success") {
|
|
4021
4051
|
this.agentState = answer.agentState ? decrypt(this.encryptionKey, this.encryptionVariant, decodeBase64(answer.agentState)) : null;
|
|
4022
4052
|
this.agentStateVersion = answer.version;
|
|
4053
|
+
rateRefusals = 0;
|
|
4023
4054
|
logger.debug("Agent state updated", this.agentState);
|
|
4024
4055
|
} else if (answer.result === "version-mismatch") {
|
|
4025
4056
|
if (answer.version > this.agentStateVersion) {
|
|
@@ -4028,6 +4059,16 @@ class ApiSessionClient extends EventEmitter {
|
|
|
4028
4059
|
}
|
|
4029
4060
|
throw new Error("Agent state version mismatch");
|
|
4030
4061
|
} else if (answer.result === "error") {
|
|
4062
|
+
if (isRateQuotaCode(answer.error)) {
|
|
4063
|
+
rateRefusals += 1;
|
|
4064
|
+
await pauseForRateQuota({
|
|
4065
|
+
label: "session agent state",
|
|
4066
|
+
code: answer.error,
|
|
4067
|
+
attempt: rateRefusals,
|
|
4068
|
+
sleep: delay,
|
|
4069
|
+
log: (message) => logger.debug(message)
|
|
4070
|
+
});
|
|
4071
|
+
}
|
|
4031
4072
|
throw new Error("Agent state update failed");
|
|
4032
4073
|
}
|
|
4033
4074
|
});
|
|
@@ -4107,7 +4148,7 @@ function summarizeSpawnSessionForLog(value) {
|
|
|
4107
4148
|
};
|
|
4108
4149
|
}
|
|
4109
4150
|
|
|
4110
|
-
const DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS =
|
|
4151
|
+
const DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS = 60 * 60 * 1e3;
|
|
4111
4152
|
const MIN_CLI_UPDATE_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
4112
4153
|
function withCurrentCliUpdateState(current, state) {
|
|
4113
4154
|
const { cliUpdate: _staleCliUpdate, ...rest } = current ?? {};
|
|
@@ -14929,6 +14970,7 @@ class ApiMachineClient {
|
|
|
14929
14970
|
* for example to set a custom name.
|
|
14930
14971
|
*/
|
|
14931
14972
|
async updateMachineMetadata(handler) {
|
|
14973
|
+
let rateRefusals = 0;
|
|
14932
14974
|
await backoff(async () => {
|
|
14933
14975
|
const updated = handler(this.machine.metadata);
|
|
14934
14976
|
const answer = await this.socket.emitWithAck("machine-update-metadata", {
|
|
@@ -14939,6 +14981,7 @@ class ApiMachineClient {
|
|
|
14939
14981
|
if (answer.result === "success") {
|
|
14940
14982
|
this.machine.metadata = decrypt(this.machine.encryptionKey, this.machine.encryptionVariant, decodeBase64(answer.metadata));
|
|
14941
14983
|
this.machine.metadataVersion = answer.version;
|
|
14984
|
+
rateRefusals = 0;
|
|
14942
14985
|
logger.debug("[API MACHINE] Metadata updated successfully");
|
|
14943
14986
|
} else if (answer.result === "version-mismatch") {
|
|
14944
14987
|
if (answer.version > this.machine.metadataVersion) {
|
|
@@ -14946,6 +14989,18 @@ class ApiMachineClient {
|
|
|
14946
14989
|
this.machine.metadata = decrypt(this.machine.encryptionKey, this.machine.encryptionVariant, decodeBase64(answer.metadata));
|
|
14947
14990
|
}
|
|
14948
14991
|
throw new Error("Metadata version mismatch");
|
|
14992
|
+
} else if (answer.result === "error") {
|
|
14993
|
+
if (isRateQuotaCode(answer.error)) {
|
|
14994
|
+
rateRefusals += 1;
|
|
14995
|
+
await pauseForRateQuota({
|
|
14996
|
+
label: "machine metadata",
|
|
14997
|
+
code: answer.error,
|
|
14998
|
+
attempt: rateRefusals,
|
|
14999
|
+
sleep: delay,
|
|
15000
|
+
log: (message) => logger.debug(message)
|
|
15001
|
+
});
|
|
15002
|
+
}
|
|
15003
|
+
throw new Error("Machine metadata update failed");
|
|
14949
15004
|
}
|
|
14950
15005
|
});
|
|
14951
15006
|
}
|
|
@@ -14954,6 +15009,7 @@ class ApiMachineClient {
|
|
|
14954
15009
|
* Simplified without lock - relies on backoff for retry
|
|
14955
15010
|
*/
|
|
14956
15011
|
async updateDaemonState(handler) {
|
|
15012
|
+
let rateRefusals = 0;
|
|
14957
15013
|
await backoff(async () => {
|
|
14958
15014
|
const updated = handler(this.machine.daemonState);
|
|
14959
15015
|
const answer = await this.socket.emitWithAck("machine-update-state", {
|
|
@@ -14964,6 +15020,7 @@ class ApiMachineClient {
|
|
|
14964
15020
|
if (answer.result === "success") {
|
|
14965
15021
|
this.machine.daemonState = decrypt(this.machine.encryptionKey, this.machine.encryptionVariant, decodeBase64(answer.daemonState));
|
|
14966
15022
|
this.machine.daemonStateVersion = answer.version;
|
|
15023
|
+
rateRefusals = 0;
|
|
14967
15024
|
logger.debug("[API MACHINE] Daemon state updated successfully");
|
|
14968
15025
|
} else if (answer.result === "version-mismatch") {
|
|
14969
15026
|
if (answer.version > this.machine.daemonStateVersion) {
|
|
@@ -14971,6 +15028,18 @@ class ApiMachineClient {
|
|
|
14971
15028
|
this.machine.daemonState = decrypt(this.machine.encryptionKey, this.machine.encryptionVariant, decodeBase64(answer.daemonState));
|
|
14972
15029
|
}
|
|
14973
15030
|
throw new Error("Daemon state version mismatch");
|
|
15031
|
+
} else if (answer.result === "error") {
|
|
15032
|
+
if (isRateQuotaCode(answer.error)) {
|
|
15033
|
+
rateRefusals += 1;
|
|
15034
|
+
await pauseForRateQuota({
|
|
15035
|
+
label: "daemon state",
|
|
15036
|
+
code: answer.error,
|
|
15037
|
+
attempt: rateRefusals,
|
|
15038
|
+
sleep: delay,
|
|
15039
|
+
log: (message) => logger.debug(message)
|
|
15040
|
+
});
|
|
15041
|
+
}
|
|
15042
|
+
throw new Error("Daemon state update failed");
|
|
14974
15043
|
}
|
|
14975
15044
|
});
|
|
14976
15045
|
}
|
|
@@ -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.114";
|
|
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.114",
|
|
168
|
+
"very-happy-tools-x64-darwin": "0.2.114",
|
|
169
|
+
"very-happy-tools-arm64-linux": "0.2.114",
|
|
170
|
+
"very-happy-tools-x64-linux": "0.2.114",
|
|
171
|
+
"very-happy-tools-arm64-win32": "0.2.114",
|
|
172
|
+
"very-happy-tools-x64-win32": "0.2.114"
|
|
173
173
|
};
|
|
174
174
|
var devDependencies = {
|
|
175
175
|
"@slopus/happy-wire": "workspace:*",
|
|
@@ -1437,6 +1437,23 @@ let backoff = createBackoff({
|
|
|
1437
1437
|
}
|
|
1438
1438
|
});
|
|
1439
1439
|
|
|
1440
|
+
function isRateQuotaCode(code) {
|
|
1441
|
+
return typeof code === "string" && code.endsWith("_rate_quota_exceeded");
|
|
1442
|
+
}
|
|
1443
|
+
const RATE_RETRY_MIN_DELAY_MS = 2e3;
|
|
1444
|
+
const RATE_RETRY_MAX_DELAY_MS = 6e4;
|
|
1445
|
+
function rateRetryDelayMs(attempt, random = Math.random()) {
|
|
1446
|
+
const exponent = Math.max(0, Math.min(attempt, 32) - 1);
|
|
1447
|
+
const ceiling = Math.min(RATE_RETRY_MIN_DELAY_MS * 2 ** exponent, RATE_RETRY_MAX_DELAY_MS);
|
|
1448
|
+
return Math.round(RATE_RETRY_MIN_DELAY_MS + random * (ceiling - RATE_RETRY_MIN_DELAY_MS));
|
|
1449
|
+
}
|
|
1450
|
+
async function pauseForRateQuota(opts) {
|
|
1451
|
+
const ms = rateRetryDelayMs(opts.attempt);
|
|
1452
|
+
opts.log?.(`[RATE] ${opts.label} write refused (${opts.code}), attempt ${opts.attempt} \u2014 waiting ${ms}ms`);
|
|
1453
|
+
await opts.sleep(ms);
|
|
1454
|
+
return ms;
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1440
1457
|
class AsyncLock {
|
|
1441
1458
|
permits = 1;
|
|
1442
1459
|
promiseResolverQueue = [];
|
|
@@ -1650,7 +1667,7 @@ class RpcHandlerManager {
|
|
|
1650
1667
|
}
|
|
1651
1668
|
}
|
|
1652
1669
|
|
|
1653
|
-
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-
|
|
1670
|
+
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-D14vU6_q.cjs', document.baseURI).href))));
|
|
1654
1671
|
function projectPath() {
|
|
1655
1672
|
const path = path$1.resolve(__dirname$1, "..");
|
|
1656
1673
|
return path;
|
|
@@ -4011,12 +4028,14 @@ class ApiSessionClient extends node_events.EventEmitter {
|
|
|
4011
4028
|
}
|
|
4012
4029
|
updateMetadata(handler) {
|
|
4013
4030
|
this.metadataLock.inLock(async () => {
|
|
4031
|
+
let rateRefusals = 0;
|
|
4014
4032
|
await backoff(async () => {
|
|
4015
4033
|
let updated = handler(this.metadata);
|
|
4016
4034
|
const answer = await this.socket.emitWithAck("update-metadata", { sid: this.sessionId, expectedVersion: this.metadataVersion, metadata: encodeBase64(encrypt(this.encryptionKey, this.encryptionVariant, updated)) });
|
|
4017
4035
|
if (answer.result === "success") {
|
|
4018
4036
|
this.metadata = decrypt(this.encryptionKey, this.encryptionVariant, decodeBase64(answer.metadata));
|
|
4019
4037
|
this.metadataVersion = answer.version;
|
|
4038
|
+
rateRefusals = 0;
|
|
4020
4039
|
} else if (answer.result === "version-mismatch") {
|
|
4021
4040
|
if (answer.version > this.metadataVersion) {
|
|
4022
4041
|
this.metadataVersion = answer.version;
|
|
@@ -4024,6 +4043,16 @@ class ApiSessionClient extends node_events.EventEmitter {
|
|
|
4024
4043
|
}
|
|
4025
4044
|
throw new Error("Metadata version mismatch");
|
|
4026
4045
|
} else if (answer.result === "error") {
|
|
4046
|
+
if (isRateQuotaCode(answer.error)) {
|
|
4047
|
+
rateRefusals += 1;
|
|
4048
|
+
await pauseForRateQuota({
|
|
4049
|
+
label: "session metadata",
|
|
4050
|
+
code: answer.error,
|
|
4051
|
+
attempt: rateRefusals,
|
|
4052
|
+
sleep: delay,
|
|
4053
|
+
log: (message) => logger.debug(message)
|
|
4054
|
+
});
|
|
4055
|
+
}
|
|
4027
4056
|
throw new Error("Metadata update failed");
|
|
4028
4057
|
}
|
|
4029
4058
|
});
|
|
@@ -4036,12 +4065,14 @@ class ApiSessionClient extends node_events.EventEmitter {
|
|
|
4036
4065
|
updateAgentState(handler) {
|
|
4037
4066
|
logger.debugLargeJson("Updating agent state", this.agentState);
|
|
4038
4067
|
this.agentStateLock.inLock(async () => {
|
|
4068
|
+
let rateRefusals = 0;
|
|
4039
4069
|
await backoff(async () => {
|
|
4040
4070
|
let updated = handler(this.agentState || {});
|
|
4041
4071
|
const answer = await this.socket.emitWithAck("update-state", { sid: this.sessionId, expectedVersion: this.agentStateVersion, agentState: updated ? encodeBase64(encrypt(this.encryptionKey, this.encryptionVariant, updated)) : null });
|
|
4042
4072
|
if (answer.result === "success") {
|
|
4043
4073
|
this.agentState = answer.agentState ? decrypt(this.encryptionKey, this.encryptionVariant, decodeBase64(answer.agentState)) : null;
|
|
4044
4074
|
this.agentStateVersion = answer.version;
|
|
4075
|
+
rateRefusals = 0;
|
|
4045
4076
|
logger.debug("Agent state updated", this.agentState);
|
|
4046
4077
|
} else if (answer.result === "version-mismatch") {
|
|
4047
4078
|
if (answer.version > this.agentStateVersion) {
|
|
@@ -4050,6 +4081,16 @@ class ApiSessionClient extends node_events.EventEmitter {
|
|
|
4050
4081
|
}
|
|
4051
4082
|
throw new Error("Agent state version mismatch");
|
|
4052
4083
|
} else if (answer.result === "error") {
|
|
4084
|
+
if (isRateQuotaCode(answer.error)) {
|
|
4085
|
+
rateRefusals += 1;
|
|
4086
|
+
await pauseForRateQuota({
|
|
4087
|
+
label: "session agent state",
|
|
4088
|
+
code: answer.error,
|
|
4089
|
+
attempt: rateRefusals,
|
|
4090
|
+
sleep: delay,
|
|
4091
|
+
log: (message) => logger.debug(message)
|
|
4092
|
+
});
|
|
4093
|
+
}
|
|
4053
4094
|
throw new Error("Agent state update failed");
|
|
4054
4095
|
}
|
|
4055
4096
|
});
|
|
@@ -4129,7 +4170,7 @@ function summarizeSpawnSessionForLog(value) {
|
|
|
4129
4170
|
};
|
|
4130
4171
|
}
|
|
4131
4172
|
|
|
4132
|
-
const DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS =
|
|
4173
|
+
const DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS = 60 * 60 * 1e3;
|
|
4133
4174
|
const MIN_CLI_UPDATE_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
4134
4175
|
function withCurrentCliUpdateState(current, state) {
|
|
4135
4176
|
const { cliUpdate: _staleCliUpdate, ...rest } = current ?? {};
|
|
@@ -14951,6 +14992,7 @@ class ApiMachineClient {
|
|
|
14951
14992
|
* for example to set a custom name.
|
|
14952
14993
|
*/
|
|
14953
14994
|
async updateMachineMetadata(handler) {
|
|
14995
|
+
let rateRefusals = 0;
|
|
14954
14996
|
await backoff(async () => {
|
|
14955
14997
|
const updated = handler(this.machine.metadata);
|
|
14956
14998
|
const answer = await this.socket.emitWithAck("machine-update-metadata", {
|
|
@@ -14961,6 +15003,7 @@ class ApiMachineClient {
|
|
|
14961
15003
|
if (answer.result === "success") {
|
|
14962
15004
|
this.machine.metadata = decrypt(this.machine.encryptionKey, this.machine.encryptionVariant, decodeBase64(answer.metadata));
|
|
14963
15005
|
this.machine.metadataVersion = answer.version;
|
|
15006
|
+
rateRefusals = 0;
|
|
14964
15007
|
logger.debug("[API MACHINE] Metadata updated successfully");
|
|
14965
15008
|
} else if (answer.result === "version-mismatch") {
|
|
14966
15009
|
if (answer.version > this.machine.metadataVersion) {
|
|
@@ -14968,6 +15011,18 @@ class ApiMachineClient {
|
|
|
14968
15011
|
this.machine.metadata = decrypt(this.machine.encryptionKey, this.machine.encryptionVariant, decodeBase64(answer.metadata));
|
|
14969
15012
|
}
|
|
14970
15013
|
throw new Error("Metadata version mismatch");
|
|
15014
|
+
} else if (answer.result === "error") {
|
|
15015
|
+
if (isRateQuotaCode(answer.error)) {
|
|
15016
|
+
rateRefusals += 1;
|
|
15017
|
+
await pauseForRateQuota({
|
|
15018
|
+
label: "machine metadata",
|
|
15019
|
+
code: answer.error,
|
|
15020
|
+
attempt: rateRefusals,
|
|
15021
|
+
sleep: delay,
|
|
15022
|
+
log: (message) => logger.debug(message)
|
|
15023
|
+
});
|
|
15024
|
+
}
|
|
15025
|
+
throw new Error("Machine metadata update failed");
|
|
14971
15026
|
}
|
|
14972
15027
|
});
|
|
14973
15028
|
}
|
|
@@ -14976,6 +15031,7 @@ class ApiMachineClient {
|
|
|
14976
15031
|
* Simplified without lock - relies on backoff for retry
|
|
14977
15032
|
*/
|
|
14978
15033
|
async updateDaemonState(handler) {
|
|
15034
|
+
let rateRefusals = 0;
|
|
14979
15035
|
await backoff(async () => {
|
|
14980
15036
|
const updated = handler(this.machine.daemonState);
|
|
14981
15037
|
const answer = await this.socket.emitWithAck("machine-update-state", {
|
|
@@ -14986,6 +15042,7 @@ class ApiMachineClient {
|
|
|
14986
15042
|
if (answer.result === "success") {
|
|
14987
15043
|
this.machine.daemonState = decrypt(this.machine.encryptionKey, this.machine.encryptionVariant, decodeBase64(answer.daemonState));
|
|
14988
15044
|
this.machine.daemonStateVersion = answer.version;
|
|
15045
|
+
rateRefusals = 0;
|
|
14989
15046
|
logger.debug("[API MACHINE] Daemon state updated successfully");
|
|
14990
15047
|
} else if (answer.result === "version-mismatch") {
|
|
14991
15048
|
if (answer.version > this.machine.daemonStateVersion) {
|
|
@@ -14993,6 +15050,18 @@ class ApiMachineClient {
|
|
|
14993
15050
|
this.machine.daemonState = decrypt(this.machine.encryptionKey, this.machine.encryptionVariant, decodeBase64(answer.daemonState));
|
|
14994
15051
|
}
|
|
14995
15052
|
throw new Error("Daemon state version mismatch");
|
|
15053
|
+
} else if (answer.result === "error") {
|
|
15054
|
+
if (isRateQuotaCode(answer.error)) {
|
|
15055
|
+
rateRefusals += 1;
|
|
15056
|
+
await pauseForRateQuota({
|
|
15057
|
+
label: "daemon state",
|
|
15058
|
+
code: answer.error,
|
|
15059
|
+
attempt: rateRefusals,
|
|
15060
|
+
sleep: delay,
|
|
15061
|
+
log: (message) => logger.debug(message)
|
|
15062
|
+
});
|
|
15063
|
+
}
|
|
15064
|
+
throw new Error("Daemon state update failed");
|
|
14996
15065
|
}
|
|
14997
15066
|
});
|
|
14998
15067
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "very-happy-cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.114",
|
|
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.114",
|
|
117
|
+
"very-happy-tools-x64-darwin": "0.2.114",
|
|
118
|
+
"very-happy-tools-arm64-linux": "0.2.114",
|
|
119
|
+
"very-happy-tools-x64-linux": "0.2.114",
|
|
120
|
+
"very-happy-tools-arm64-win32": "0.2.114",
|
|
121
|
+
"very-happy-tools-x64-win32": "0.2.114"
|
|
122
122
|
},
|
|
123
123
|
"devDependencies": {
|
|
124
124
|
"@slopus/happy-wire": "workspace:*",
|