very-happy-cli 0.2.121 → 0.2.122
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-Cdj56ZfU.cjs → AcpBackend-YPVwACkW.cjs} +1 -1
- package/dist/{AcpBackend-BxvQ6O4k.mjs → AcpBackend-pgDnK76l.mjs} +1 -1
- package/dist/{AcpSessionManager-DahCU78z.cjs → AcpSessionManager-6rypahwH.cjs} +1 -1
- package/dist/{AcpSessionManager-DlWlQVhw.mjs → AcpSessionManager-Bq5Tiky1.mjs} +1 -1
- package/dist/{config-osO37dR1.mjs → config-BTEW041n.mjs} +2 -2
- package/dist/{config-DxOhdFEx.cjs → config-rQdv_Yr0.cjs} +2 -2
- package/dist/{index-Vjo1jIJH.cjs → index-BHg0P9cY.cjs} +2 -2
- package/dist/{index-Iz-M3qbz.mjs → index-BTnlYGaP.mjs} +15 -15
- package/dist/{index-BcwAnM9k.mjs → index-BeHr5uMY.mjs} +5 -5
- package/dist/{index-DtZFY8aS.mjs → index-CaIsj1q7.mjs} +2 -2
- package/dist/{index-DObePs_K.cjs → index-DKRU6E-x.cjs} +19 -19
- package/dist/{index-Bv53Zygv.cjs → index-uPpFZhhr.cjs} +4 -4
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{installTerminalHooks-DehsXLmV.cjs → installTerminalHooks-CGqopr1A.cjs} +2 -2
- package/dist/{installTerminalHooks-Bq11vOqF.mjs → installTerminalHooks-DFmKhCto.mjs} +2 -2
- package/dist/lib.cjs +1 -1
- package/dist/lib.mjs +1 -1
- package/dist/{mcp-Bx1B3uny.mjs → mcp-DnKBKXYa.mjs} +2 -2
- package/dist/{mcp-Cpx9Qlch.cjs → mcp-FlbfMw6_.cjs} +2 -2
- package/dist/{runGemini-CMgudbJs.mjs → runGemini-BsfadDSa.mjs} +4 -4
- package/dist/{runGemini-DI8DipUx.cjs → runGemini-DYawZQTu.cjs} +4 -4
- package/dist/{runOpenClaw-CetdjTl-.cjs → runOpenClaw-C2XjFP2m.cjs} +3 -3
- package/dist/{runOpenClaw-DR3fLtVf.mjs → runOpenClaw-xGtbJ7f8.mjs} +3 -3
- package/dist/{send-Cq0NZCn8.cjs → send-B0Wojz18.cjs} +2 -2
- package/dist/{send-M4b_hD7t.mjs → send-DRZppEr2.mjs} +2 -2
- package/dist/{sessions-CelkWhqX.mjs → sessions-BuMgxuxd.mjs} +2 -2
- package/dist/{sessions-DW4lrLOp.cjs → sessions-CTuUV0TW.cjs} +2 -2
- package/dist/{spawn-D3cwBlWI.cjs → spawn-7U_4QTHw.cjs} +2 -2
- package/dist/{spawn-C4fF0q3Z.mjs → spawn-BRdfNDsu.mjs} +2 -2
- package/dist/{types-COOYpI8_.cjs → types-Jag0GwhO.cjs} +82 -39
- package/dist/{types-P2cJWD0E.mjs → types-q7wtjfxb.mjs} +81 -38
- package/package.json +7 -7
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var node_child_process = require('node:child_process');
|
|
4
4
|
var sdk = require('@agentclientprotocol/sdk');
|
|
5
5
|
var node_crypto = require('node:crypto');
|
|
6
|
-
var persistence = require('./types-
|
|
6
|
+
var persistence = require('./types-Jag0GwhO.cjs');
|
|
7
7
|
|
|
8
8
|
const DEFAULT_TIMEOUTS = {
|
|
9
9
|
/** Default initialization timeout: 60 seconds */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { spawn } from 'node:child_process';
|
|
2
2
|
import { ndJsonStream, ClientSideConnection } from '@agentclientprotocol/sdk';
|
|
3
3
|
import { randomUUID } from 'node:crypto';
|
|
4
|
-
import { l as logger, 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-q7wtjfxb.mjs';
|
|
5
5
|
|
|
6
6
|
const DEFAULT_TIMEOUTS = {
|
|
7
7
|
/** Default initialization timeout: 60 seconds */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createId } from '@paralleldrive/cuid2';
|
|
2
|
-
import { s as streamKeyOf, b as createEnvelope } from './types-
|
|
2
|
+
import { s as streamKeyOf, b as createEnvelope } from './types-q7wtjfxb.mjs';
|
|
3
3
|
|
|
4
4
|
function turnOptions(turnId, time) {
|
|
5
5
|
return turnId ? { turn: turnId, time } : { time };
|
|
@@ -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-q7wtjfxb.mjs';
|
|
6
|
+
import { j as DEFAULT_GEMINI_MODEL, G as GEMINI_MODEL_ENV } from './index-BTnlYGaP.mjs';
|
|
7
7
|
import 'axios';
|
|
8
8
|
import 'chalk';
|
|
9
9
|
import 'node:util';
|
|
@@ -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-Jag0GwhO.cjs');
|
|
8
|
+
var index = require('./index-DKRU6E-x.cjs');
|
|
9
9
|
require('axios');
|
|
10
10
|
require('chalk');
|
|
11
11
|
require('node:util');
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-DKRU6E-x.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-Jag0GwhO.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, 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, t as getProjectPath, p as projectPath, u as initializeSandbox, v as wrapCommand, g as contentLogMetadata, I as InvalidateSync, R as RawJSONLinesSchema, k as delay, x as AsyncLock, S as STREAM_DELTA_MAX_CHARS, y as ensurePrivateDirectory, M as MAX_CHAT_ATTACHMENT_SOURCE_BYTES, z as hardenPrivateFile, j as packageJson, B as commandOnPath, e as readSettings, C as readCredentials, D as credentialRelayProblem, E as deriveLocalCliUpdateSummary, f as encodeBase64, F as readSettingsOutcome, G as updateSettings, H as encodeBase64Url, J as decodeBase64, K as writeCredentialsLegacy, L as writeCredentialsDataKey, N as readCredentialsForConfiguredRelay, O as encrypt, r as readPersistedSessions, P as isClaudeSessionId, w as writePrivateFileSync, Q as getLocalHappyAgentCredentialPath, T as readLocalHappyAgentCredentials, U as decryptWithDataKey, V as decryptLegacy, W as compareExactVersions, X as extractCompleteLines, Y as decideBackfill, Z as parseTerminalHookPayload, _ as tmuxArgs, $ as scrubTmuxClientEnv, a0 as decideMirrorBinding, a1 as MIRROR_BACKFILL_LINES_DEFAULT, a2 as persistSession, a3 as mirrorLineKey, a4 as mirrorLocalId, a5 as detectCLIAvailability, a6 as detectResumeSupport, a7 as acquireDaemonLock, a8 as summarizeSpawnSessionForLog, a9 as deletePersistedSessions, aa as shellescape, ab as decrypt, ac as writeDaemonState, A as ApiClient, ad as writeSettings, ae as fetchCliUpdateState, af as resolveCliUpdateCheckInterval, ag as DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS, ah as releaseDaemonLock, i as isValidSessionId, ai as listVhTerminals, aj as isValidTerminalId, ak as readVhTerminal, al as sendToVhTerminal, am as TITLE_PROMPT_PREFIX, an as BOARD_ANALYZER_PROMPT_PREFIX, d as connectionState, ao as startOfflineReconnection, ap as clearCredentials, aq as clearMachineId, m as ensurePrivateDirectorySync, ar as SandboxConfigSchema, b as createEnvelope, as as CodexAppServerClient, at as getLatestDaemonLog } from './types-
|
|
4
|
+
import { o as readDaemonState, l as logger, c as configuration, q as clearDaemonState, t as getProjectPath, p as projectPath, u as initializeSandbox, v as wrapCommand, g as contentLogMetadata, I as InvalidateSync, R as RawJSONLinesSchema, k as delay, x as AsyncLock, S as STREAM_DELTA_MAX_CHARS, y as ensurePrivateDirectory, M as MAX_CHAT_ATTACHMENT_SOURCE_BYTES, z as hardenPrivateFile, j as packageJson, B as commandOnPath, e as readSettings, C as readCredentials, D as credentialRelayProblem, E as deriveLocalCliUpdateSummary, f as encodeBase64, F as readSettingsOutcome, G as updateSettings, H as encodeBase64Url, J as decodeBase64, K as writeCredentialsLegacy, L as writeCredentialsDataKey, N as readCredentialsForConfiguredRelay, O as encrypt, r as readPersistedSessions, P as isClaudeSessionId, w as writePrivateFileSync, Q as getLocalHappyAgentCredentialPath, T as readLocalHappyAgentCredentials, U as decryptWithDataKey, V as decryptLegacy, W as compareExactVersions, X as extractCompleteLines, Y as decideBackfill, Z as parseTerminalHookPayload, _ as tmuxArgs, $ as scrubTmuxClientEnv, a0 as decideMirrorBinding, a1 as MIRROR_BACKFILL_LINES_DEFAULT, a2 as persistSession, a3 as mirrorLineKey, a4 as mirrorLocalId, a5 as detectCLIAvailability, a6 as detectResumeSupport, a7 as acquireDaemonLock, a8 as summarizeSpawnSessionForLog, a9 as deletePersistedSessions, aa as shellescape, ab as decrypt, ac as writeDaemonState, A as ApiClient, ad as writeSettings, ae as fetchCliUpdateState, af as resolveCliUpdateCheckInterval, ag as DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS, ah as releaseDaemonLock, i as isValidSessionId, ai as listVhTerminals, aj as isValidTerminalId, ak as readVhTerminal, al as sendToVhTerminal, am as TITLE_PROMPT_PREFIX, an as BOARD_ANALYZER_PROMPT_PREFIX, d as connectionState, ao as startOfflineReconnection, ap as clearCredentials, aq as clearMachineId, m as ensurePrivateDirectorySync, ar as SandboxConfigSchema, b as createEnvelope, as as CodexAppServerClient, at as getLatestDaemonLog } from './types-q7wtjfxb.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';
|
|
@@ -11296,7 +11296,7 @@ function registerSideQuestionHandler(rpc, deps) {
|
|
|
11296
11296
|
const retainMs = deps.retainMs ?? SIDE_QUESTION_RETAIN_MS;
|
|
11297
11297
|
const maxRunMs = deps.maxRunMs ?? SIDE_QUESTION_MAX_RUN_MS;
|
|
11298
11298
|
const run = deps.run ?? (async (input) => {
|
|
11299
|
-
const { query } = await import('./index-
|
|
11299
|
+
const { query } = await import('./index-CaIsj1q7.mjs');
|
|
11300
11300
|
return runSideQuestion(query, input);
|
|
11301
11301
|
});
|
|
11302
11302
|
const slots = /* @__PURE__ */ new Map();
|
|
@@ -16247,7 +16247,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16247
16247
|
process.exit(0);
|
|
16248
16248
|
} else if (subcommand === "install-terminal-hooks") {
|
|
16249
16249
|
try {
|
|
16250
|
-
const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await import('./installTerminalHooks-
|
|
16250
|
+
const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await import('./installTerminalHooks-DFmKhCto.mjs');
|
|
16251
16251
|
const command = parseTerminalHooksArgs(args.slice(1));
|
|
16252
16252
|
if (command.action === "help") {
|
|
16253
16253
|
console.log(TERMINAL_HOOKS_HELP);
|
|
@@ -16264,7 +16264,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16264
16264
|
}
|
|
16265
16265
|
} else if (subcommand === "spawn") {
|
|
16266
16266
|
try {
|
|
16267
|
-
const { handleSpawnCommand } = await import('./spawn-
|
|
16267
|
+
const { handleSpawnCommand } = await import('./spawn-BRdfNDsu.mjs');
|
|
16268
16268
|
await handleSpawnCommand(args.slice(1));
|
|
16269
16269
|
} catch (error) {
|
|
16270
16270
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -16276,7 +16276,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16276
16276
|
return;
|
|
16277
16277
|
} else if (subcommand === "sessions") {
|
|
16278
16278
|
try {
|
|
16279
|
-
const { handleSessionsCommand } = await import('./sessions-
|
|
16279
|
+
const { handleSessionsCommand } = await import('./sessions-BuMgxuxd.mjs');
|
|
16280
16280
|
await handleSessionsCommand(args.slice(1));
|
|
16281
16281
|
} catch (error) {
|
|
16282
16282
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -16288,7 +16288,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16288
16288
|
return;
|
|
16289
16289
|
} else if (subcommand === "send") {
|
|
16290
16290
|
try {
|
|
16291
|
-
const { handleSendCommand } = await import('./send-
|
|
16291
|
+
const { handleSendCommand } = await import('./send-DRZppEr2.mjs');
|
|
16292
16292
|
await handleSendCommand(args.slice(1));
|
|
16293
16293
|
} catch (error) {
|
|
16294
16294
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -16394,9 +16394,9 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16394
16394
|
if (geminiSubcommand === "project" && args[2] === "set" && args[3]) {
|
|
16395
16395
|
const projectId = args[3];
|
|
16396
16396
|
try {
|
|
16397
|
-
const { saveGoogleCloudProjectToConfig } = await import('./config-
|
|
16398
|
-
const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await import('./types-
|
|
16399
|
-
const { ApiClient: ApiClient2 } = await import('./types-
|
|
16397
|
+
const { saveGoogleCloudProjectToConfig } = await import('./config-BTEW041n.mjs');
|
|
16398
|
+
const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await import('./types-q7wtjfxb.mjs').then(function (n) { return n.au; });
|
|
16399
|
+
const { ApiClient: ApiClient2 } = await import('./types-q7wtjfxb.mjs').then(function (n) { return n.av; });
|
|
16400
16400
|
let userEmail = void 0;
|
|
16401
16401
|
try {
|
|
16402
16402
|
const credentials = await readCredentialsForConfiguredRelay2();
|
|
@@ -16427,7 +16427,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16427
16427
|
}
|
|
16428
16428
|
if (geminiSubcommand === "project" && args[2] === "get") {
|
|
16429
16429
|
try {
|
|
16430
|
-
const { readGeminiLocalConfig } = await import('./config-
|
|
16430
|
+
const { readGeminiLocalConfig } = await import('./config-BTEW041n.mjs');
|
|
16431
16431
|
const config = readGeminiLocalConfig();
|
|
16432
16432
|
if (config.googleCloudProject) {
|
|
16433
16433
|
console.log(`Current Google Cloud Project: ${config.googleCloudProject}`);
|
|
@@ -16467,7 +16467,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16467
16467
|
process.exit(0);
|
|
16468
16468
|
}
|
|
16469
16469
|
try {
|
|
16470
|
-
const { runGemini } = await import('./runGemini-
|
|
16470
|
+
const { runGemini } = await import('./runGemini-BsfadDSa.mjs');
|
|
16471
16471
|
let startedBy = void 0;
|
|
16472
16472
|
for (let i = 1; i < args.length; i++) {
|
|
16473
16473
|
if (args[i] === "--started-by") {
|
|
@@ -16497,7 +16497,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16497
16497
|
}
|
|
16498
16498
|
};
|
|
16499
16499
|
try {
|
|
16500
|
-
const { runAcp, resolveAcpAgentConfig } = await import('./index-
|
|
16500
|
+
const { runAcp, resolveAcpAgentConfig } = await import('./index-BeHr5uMY.mjs');
|
|
16501
16501
|
const parsed = parsePiRunnerArgs(args.slice(1));
|
|
16502
16502
|
const resolved = resolveAcpAgentConfig(["pi", ...parsed.passthrough]);
|
|
16503
16503
|
const { credentials } = await authAndSetupMachineIfNeeded();
|
|
@@ -16524,7 +16524,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16524
16524
|
return;
|
|
16525
16525
|
} else if (subcommand === "acp") {
|
|
16526
16526
|
try {
|
|
16527
|
-
const { runAcp, resolveAcpAgentConfig } = await import('./index-
|
|
16527
|
+
const { runAcp, resolveAcpAgentConfig } = await import('./index-BeHr5uMY.mjs');
|
|
16528
16528
|
let startedBy = void 0;
|
|
16529
16529
|
let verbose = false;
|
|
16530
16530
|
const acpArgs = [];
|
|
@@ -16564,7 +16564,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16564
16564
|
return;
|
|
16565
16565
|
} else if (subcommand === "openclaw") {
|
|
16566
16566
|
try {
|
|
16567
|
-
const { runOpenClaw } = await import('./runOpenClaw-
|
|
16567
|
+
const { runOpenClaw } = await import('./runOpenClaw-xGtbJ7f8.mjs');
|
|
16568
16568
|
let startedBy = void 0;
|
|
16569
16569
|
let verbose = false;
|
|
16570
16570
|
let gatewayUrl;
|
|
@@ -16615,7 +16615,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16615
16615
|
return;
|
|
16616
16616
|
} else if (subcommand === "mcp" && args.length === 1) {
|
|
16617
16617
|
try {
|
|
16618
|
-
const { handleMcpCommand } = await import('./mcp-
|
|
16618
|
+
const { handleMcpCommand } = await import('./mcp-DnKBKXYa.mjs');
|
|
16619
16619
|
await handleMcpCommand();
|
|
16620
16620
|
} catch (error) {
|
|
16621
16621
|
process.stderr.write(`[very-happy mcp] Fatal: ${error instanceof Error ? error.message : String(error)}
|
|
@@ -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-pgDnK76l.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-pgDnK76l.mjs';
|
|
3
|
+
import { d as connectionState, A as ApiClient, e as readSettings, f as encodeBase64, l as logger, p as projectPath } from './types-q7wtjfxb.mjs';
|
|
4
|
+
import { A as AcpSessionManager } from './AcpSessionManager-Bq5Tiky1.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 StreamRelay, y as MessageQueue2, z as hashObject, B as startHappyServer, T as TitleGenerator, C as registerKillSessionHandler, E as BasePermissionHandler, F as writeSessionModeFile, H as normalizeAcpPermissionMode, I as removeSessionModeFile } from './index-
|
|
7
|
+
import { n as initialMachineMetadata, o as createSessionMetadata, u as setupOfflineReconnection, v as notifyDaemonSessionStarted, x as StreamRelay, y as MessageQueue2, z as hashObject, B as startHappyServer, T as TitleGenerator, C as registerKillSessionHandler, E as BasePermissionHandler, F as writeSessionModeFile, H as normalizeAcpPermissionMode, I as removeSessionModeFile } from './index-BTnlYGaP.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-BTnlYGaP.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-q7wtjfxb.mjs';
|
|
7
7
|
import 'axios';
|
|
8
8
|
import 'node:util';
|
|
9
9
|
import 'node:fs';
|
|
@@ -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-Jag0GwhO.cjs');
|
|
7
7
|
var spawn = require('cross-spawn');
|
|
8
8
|
var path = require('node:path');
|
|
9
9
|
var node_readline = require('node:readline');
|
|
@@ -7401,7 +7401,7 @@ function parseJsonObject(text) {
|
|
|
7401
7401
|
return null;
|
|
7402
7402
|
}
|
|
7403
7403
|
}
|
|
7404
|
-
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-
|
|
7404
|
+
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-DKRU6E-x.cjs', document.baseURI).href))).resolve(s)) {
|
|
7405
7405
|
const platformArch = `${platform}-${arch}`;
|
|
7406
7406
|
const candidates = [
|
|
7407
7407
|
`@anthropic-ai/claude-agent-sdk-${platformArch}/claude`,
|
|
@@ -11318,7 +11318,7 @@ function registerSideQuestionHandler(rpc, deps) {
|
|
|
11318
11318
|
const retainMs = deps.retainMs ?? SIDE_QUESTION_RETAIN_MS;
|
|
11319
11319
|
const maxRunMs = deps.maxRunMs ?? SIDE_QUESTION_MAX_RUN_MS;
|
|
11320
11320
|
const run = deps.run ?? (async (input) => {
|
|
11321
|
-
const { query } = await Promise.resolve().then(function () { return require('./index-
|
|
11321
|
+
const { query } = await Promise.resolve().then(function () { return require('./index-BHg0P9cY.cjs'); });
|
|
11322
11322
|
return runSideQuestion(query, input);
|
|
11323
11323
|
});
|
|
11324
11324
|
const slots = /* @__PURE__ */ new Map();
|
|
@@ -11420,7 +11420,7 @@ const MAX_TITLE_CHARS = 60;
|
|
|
11420
11420
|
const GENERATION_TIMEOUT_MS = 3e4;
|
|
11421
11421
|
function resolveClaudeBinary() {
|
|
11422
11422
|
try {
|
|
11423
|
-
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-
|
|
11423
|
+
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-DKRU6E-x.cjs', document.baseURI).href)));
|
|
11424
11424
|
const utilsPath = path.resolve(path.join(persistence.projectPath(), "scripts", "claude_version_utils.cjs"));
|
|
11425
11425
|
const { getClaudeCliPath } = require$1(utilsPath);
|
|
11426
11426
|
const path$1 = getClaudeCliPath();
|
|
@@ -13637,9 +13637,9 @@ function resolveLocalSignupBootstrap(configuredMode, configuredInviteCodes, gene
|
|
|
13637
13637
|
};
|
|
13638
13638
|
}
|
|
13639
13639
|
|
|
13640
|
-
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-
|
|
13640
|
+
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-DKRU6E-x.cjs', document.baseURI).href)));
|
|
13641
13641
|
const __dirname$1 = path.dirname(__filename$1);
|
|
13642
|
-
const require_ = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-
|
|
13642
|
+
const require_ = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-DKRU6E-x.cjs', document.baseURI).href)));
|
|
13643
13643
|
const PRISMA_QUERY_ENGINE_FILES = {
|
|
13644
13644
|
"arm64-darwin": "libquery_engine-darwin-arm64.dylib.node",
|
|
13645
13645
|
"x64-darwin": "libquery_engine-darwin.dylib.node",
|
|
@@ -16269,7 +16269,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16269
16269
|
process.exit(0);
|
|
16270
16270
|
} else if (subcommand === "install-terminal-hooks") {
|
|
16271
16271
|
try {
|
|
16272
|
-
const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await Promise.resolve().then(function () { return require('./installTerminalHooks-
|
|
16272
|
+
const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await Promise.resolve().then(function () { return require('./installTerminalHooks-CGqopr1A.cjs'); });
|
|
16273
16273
|
const command = parseTerminalHooksArgs(args.slice(1));
|
|
16274
16274
|
if (command.action === "help") {
|
|
16275
16275
|
console.log(TERMINAL_HOOKS_HELP);
|
|
@@ -16286,7 +16286,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16286
16286
|
}
|
|
16287
16287
|
} else if (subcommand === "spawn") {
|
|
16288
16288
|
try {
|
|
16289
|
-
const { handleSpawnCommand } = await Promise.resolve().then(function () { return require('./spawn-
|
|
16289
|
+
const { handleSpawnCommand } = await Promise.resolve().then(function () { return require('./spawn-7U_4QTHw.cjs'); });
|
|
16290
16290
|
await handleSpawnCommand(args.slice(1));
|
|
16291
16291
|
} catch (error) {
|
|
16292
16292
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -16298,7 +16298,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16298
16298
|
return;
|
|
16299
16299
|
} else if (subcommand === "sessions") {
|
|
16300
16300
|
try {
|
|
16301
|
-
const { handleSessionsCommand } = await Promise.resolve().then(function () { return require('./sessions-
|
|
16301
|
+
const { handleSessionsCommand } = await Promise.resolve().then(function () { return require('./sessions-CTuUV0TW.cjs'); });
|
|
16302
16302
|
await handleSessionsCommand(args.slice(1));
|
|
16303
16303
|
} catch (error) {
|
|
16304
16304
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -16310,7 +16310,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16310
16310
|
return;
|
|
16311
16311
|
} else if (subcommand === "send") {
|
|
16312
16312
|
try {
|
|
16313
|
-
const { handleSendCommand } = await Promise.resolve().then(function () { return require('./send-
|
|
16313
|
+
const { handleSendCommand } = await Promise.resolve().then(function () { return require('./send-B0Wojz18.cjs'); });
|
|
16314
16314
|
await handleSendCommand(args.slice(1));
|
|
16315
16315
|
} catch (error) {
|
|
16316
16316
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -16416,9 +16416,9 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16416
16416
|
if (geminiSubcommand === "project" && args[2] === "set" && args[3]) {
|
|
16417
16417
|
const projectId = args[3];
|
|
16418
16418
|
try {
|
|
16419
|
-
const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return require('./config-
|
|
16420
|
-
const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await Promise.resolve().then(function () { return require('./types-
|
|
16421
|
-
const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./types-
|
|
16419
|
+
const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return require('./config-rQdv_Yr0.cjs'); });
|
|
16420
|
+
const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await Promise.resolve().then(function () { return require('./types-Jag0GwhO.cjs'); }).then(function (n) { return n.persistence; });
|
|
16421
|
+
const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./types-Jag0GwhO.cjs'); }).then(function (n) { return n.api; });
|
|
16422
16422
|
let userEmail = void 0;
|
|
16423
16423
|
try {
|
|
16424
16424
|
const credentials = await readCredentialsForConfiguredRelay2();
|
|
@@ -16449,7 +16449,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16449
16449
|
}
|
|
16450
16450
|
if (geminiSubcommand === "project" && args[2] === "get") {
|
|
16451
16451
|
try {
|
|
16452
|
-
const { readGeminiLocalConfig } = await Promise.resolve().then(function () { return require('./config-
|
|
16452
|
+
const { readGeminiLocalConfig } = await Promise.resolve().then(function () { return require('./config-rQdv_Yr0.cjs'); });
|
|
16453
16453
|
const config = readGeminiLocalConfig();
|
|
16454
16454
|
if (config.googleCloudProject) {
|
|
16455
16455
|
console.log(`Current Google Cloud Project: ${config.googleCloudProject}`);
|
|
@@ -16489,7 +16489,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16489
16489
|
process.exit(0);
|
|
16490
16490
|
}
|
|
16491
16491
|
try {
|
|
16492
|
-
const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-
|
|
16492
|
+
const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-DYawZQTu.cjs'); });
|
|
16493
16493
|
let startedBy = void 0;
|
|
16494
16494
|
for (let i = 1; i < args.length; i++) {
|
|
16495
16495
|
if (args[i] === "--started-by") {
|
|
@@ -16519,7 +16519,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16519
16519
|
}
|
|
16520
16520
|
};
|
|
16521
16521
|
try {
|
|
16522
|
-
const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-
|
|
16522
|
+
const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-uPpFZhhr.cjs'); });
|
|
16523
16523
|
const parsed = parsePiRunnerArgs(args.slice(1));
|
|
16524
16524
|
const resolved = resolveAcpAgentConfig(["pi", ...parsed.passthrough]);
|
|
16525
16525
|
const { credentials } = await authAndSetupMachineIfNeeded();
|
|
@@ -16546,7 +16546,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16546
16546
|
return;
|
|
16547
16547
|
} else if (subcommand === "acp") {
|
|
16548
16548
|
try {
|
|
16549
|
-
const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-
|
|
16549
|
+
const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-uPpFZhhr.cjs'); });
|
|
16550
16550
|
let startedBy = void 0;
|
|
16551
16551
|
let verbose = false;
|
|
16552
16552
|
const acpArgs = [];
|
|
@@ -16586,7 +16586,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16586
16586
|
return;
|
|
16587
16587
|
} else if (subcommand === "openclaw") {
|
|
16588
16588
|
try {
|
|
16589
|
-
const { runOpenClaw } = await Promise.resolve().then(function () { return require('./runOpenClaw-
|
|
16589
|
+
const { runOpenClaw } = await Promise.resolve().then(function () { return require('./runOpenClaw-C2XjFP2m.cjs'); });
|
|
16590
16590
|
let startedBy = void 0;
|
|
16591
16591
|
let verbose = false;
|
|
16592
16592
|
let gatewayUrl;
|
|
@@ -16637,7 +16637,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16637
16637
|
return;
|
|
16638
16638
|
} else if (subcommand === "mcp" && args.length === 1) {
|
|
16639
16639
|
try {
|
|
16640
|
-
const { handleMcpCommand } = await Promise.resolve().then(function () { return require('./mcp-
|
|
16640
|
+
const { handleMcpCommand } = await Promise.resolve().then(function () { return require('./mcp-FlbfMw6_.cjs'); });
|
|
16641
16641
|
await handleMcpCommand();
|
|
16642
16642
|
} catch (error) {
|
|
16643
16643
|
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 AcpBackend = require('./AcpBackend-
|
|
4
|
-
var persistence = require('./types-
|
|
5
|
-
var AcpSessionManager = require('./AcpSessionManager-
|
|
3
|
+
var AcpBackend = require('./AcpBackend-YPVwACkW.cjs');
|
|
4
|
+
var persistence = require('./types-Jag0GwhO.cjs');
|
|
5
|
+
var AcpSessionManager = require('./AcpSessionManager-6rypahwH.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-DKRU6E-x.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
|
@@ -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-Jag0GwhO.cjs');
|
|
9
|
+
var index = require('./index-DKRU6E-x.cjs');
|
|
10
10
|
require('axios');
|
|
11
11
|
require('node:util');
|
|
12
12
|
require('node:fs/promises');
|
|
@@ -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-q7wtjfxb.mjs';
|
|
7
|
+
import { t as tmuxSupportsSessionEnv } from './index-BTnlYGaP.mjs';
|
|
8
8
|
import 'axios';
|
|
9
9
|
import 'node:util';
|
|
10
10
|
import '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-q7wtjfxb.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-BTnlYGaP.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-q7wtjfxb.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-DKRU6E-x.cjs');
|
|
7
7
|
var limits = require('./limits-KdWKmwtH.cjs');
|
|
8
|
-
var persistence = require('./types-
|
|
8
|
+
var persistence = require('./types-Jag0GwhO.cjs');
|
|
9
9
|
require('node:fs/promises');
|
|
10
10
|
require('node:os');
|
|
11
11
|
require('node:crypto');
|
|
@@ -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 { J as GEMINI_API_KEY_ENV, K as GOOGLE_API_KEY_ENV, G as GEMINI_MODEL_ENV, E as BasePermissionHandler, L as BaseReasoningProcessor, n as initialMachineMetadata, o as createSessionMetadata, u as setupOfflineReconnection, v as notifyDaemonSessionStarted, y as MessageQueue2, z as hashObject, N as MessageBuffer, O as CHANGE_TITLE_INSTRUCTION, C as registerKillSessionHandler, B 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-q7wtjfxb.mjs';
|
|
6
|
+
import { J as GEMINI_API_KEY_ENV, K as GOOGLE_API_KEY_ENV, G as GEMINI_MODEL_ENV, E as BasePermissionHandler, L as BaseReasoningProcessor, n as initialMachineMetadata, o as createSessionMetadata, u as setupOfflineReconnection, v as notifyDaemonSessionStarted, y as MessageQueue2, z as hashObject, N as MessageBuffer, O as CHANGE_TITLE_INSTRUCTION, C as registerKillSessionHandler, B as startHappyServer } from './index-BTnlYGaP.mjs';
|
|
7
|
+
import { A as AcpBackend } from './AcpBackend-pgDnK76l.mjs';
|
|
8
|
+
import { readGeminiLocalConfig, determineGeminiModel, getGeminiModelSource, getInitialGeminiModel, saveGeminiModelToConfig } from './config-BTEW041n.mjs';
|
|
9
9
|
import 'axios';
|
|
10
10
|
import 'chalk';
|
|
11
11
|
import 'node:util';
|
|
@@ -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-Jag0GwhO.cjs');
|
|
8
|
+
var index = require('./index-DKRU6E-x.cjs');
|
|
9
|
+
var AcpBackend = require('./AcpBackend-YPVwACkW.cjs');
|
|
10
|
+
var config = require('./config-rQdv_Yr0.cjs');
|
|
11
11
|
require('axios');
|
|
12
12
|
require('chalk');
|
|
13
13
|
require('node:util');
|
|
@@ -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-Jag0GwhO.cjs');
|
|
9
|
+
var AcpSessionManager = require('./AcpSessionManager-6rypahwH.cjs');
|
|
10
|
+
var index = require('./index-DKRU6E-x.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,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, y as MessageQueue2, C 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-q7wtjfxb.mjs';
|
|
7
|
+
import { A as AcpSessionManager } from './AcpSessionManager-Bq5Tiky1.mjs';
|
|
8
|
+
import { n as initialMachineMetadata, o as createSessionMetadata, u as setupOfflineReconnection, v as notifyDaemonSessionStarted, y as MessageQueue2, C as registerKillSessionHandler } from './index-BTnlYGaP.mjs';
|
|
9
9
|
import WebSocket from 'ws';
|
|
10
10
|
import * as ed from '@noble/ed25519';
|
|
11
11
|
import { sha512 } from '@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-Jag0GwhO.cjs');
|
|
7
|
+
var index = require('./index-DKRU6E-x.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-q7wtjfxb.mjs';
|
|
5
|
+
import { d as sendUserMessage, a as sessionWebUrl } from './index-BTnlYGaP.mjs';
|
|
6
6
|
import 'axios';
|
|
7
7
|
import 'node:util';
|
|
8
8
|
import '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 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-BTnlYGaP.mjs';
|
|
3
|
+
import { i as isValidSessionId } from './types-q7wtjfxb.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-DKRU6E-x.cjs');
|
|
5
|
+
var persistence = require('./types-Jag0GwhO.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-DKRU6E-x.cjs');
|
|
7
|
+
var persistence = require('./types-Jag0GwhO.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, 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-BTnlYGaP.mjs';
|
|
5
|
+
import { l as logger } from './types-q7wtjfxb.mjs';
|
|
6
6
|
import 'node:os';
|
|
7
7
|
import 'node:crypto';
|
|
8
8
|
import '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.122";
|
|
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.122",
|
|
168
|
+
"very-happy-tools-x64-darwin": "0.2.122",
|
|
169
|
+
"very-happy-tools-arm64-linux": "0.2.122",
|
|
170
|
+
"very-happy-tools-x64-linux": "0.2.122",
|
|
171
|
+
"very-happy-tools-arm64-win32": "0.2.122",
|
|
172
|
+
"very-happy-tools-x64-win32": "0.2.122"
|
|
173
173
|
};
|
|
174
174
|
var devDependencies = {
|
|
175
175
|
"@slopus/happy-wire": "workspace:*",
|
|
@@ -1032,6 +1032,20 @@ const ReleaseDrainNoticeSchema = z.z.object({
|
|
|
1032
1032
|
deadline: z.z.number().int().positive(),
|
|
1033
1033
|
mode: z.z.literal("make-before-break")
|
|
1034
1034
|
});
|
|
1035
|
+
const ConnectionDiagnosticEventSchema = z.z.object({
|
|
1036
|
+
attemptId: z.z.string().uuid(),
|
|
1037
|
+
machineId: z.z.string().min(1).max(256).regex(/^[A-Za-z0-9_-]+$/).optional(),
|
|
1038
|
+
at: z.z.number().int().min(0).max(Number.MAX_SAFE_INTEGER),
|
|
1039
|
+
stage: z.z.enum(["control", "relay_discovery", "relay_connect", "relay_probe", "machine_rpc", "terminal_open"]),
|
|
1040
|
+
outcome: z.z.enum(["started", "success", "timeout", "error", "offline", "cancelled", "fallback"]),
|
|
1041
|
+
durationMs: z.z.number().int().min(0).max(3e5),
|
|
1042
|
+
deviceClass: z.z.enum(["mobile", "desktop", "unknown"]),
|
|
1043
|
+
visibility: z.z.enum(["visible", "hidden"]),
|
|
1044
|
+
client: z.z.string().regex(/^web\/(?:[a-f0-9]{7,40}|unknown)$/)
|
|
1045
|
+
}).strict();
|
|
1046
|
+
z.z.object({
|
|
1047
|
+
events: z.z.array(ConnectionDiagnosticEventSchema).min(1).max(32)
|
|
1048
|
+
}).strict();
|
|
1035
1049
|
|
|
1036
1050
|
z.z.object({
|
|
1037
1051
|
host: z.z.string(),
|
|
@@ -1691,7 +1705,7 @@ class RpcHandlerManager {
|
|
|
1691
1705
|
}
|
|
1692
1706
|
}
|
|
1693
1707
|
|
|
1694
|
-
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-
|
|
1708
|
+
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-Jag0GwhO.cjs', document.baseURI).href))));
|
|
1695
1709
|
function projectPath() {
|
|
1696
1710
|
const path = path$1.resolve(__dirname$1, "..");
|
|
1697
1711
|
return path;
|
|
@@ -14506,28 +14520,50 @@ function selectStableRelay(candidates, probes, connectedRelayId, tracker = null)
|
|
|
14506
14520
|
tracker: { challengerRelayId: fastest.id, consecutiveWins }
|
|
14507
14521
|
};
|
|
14508
14522
|
}
|
|
14523
|
+
const RELAY_REFRESH_TIMEOUT_MS = 8e3;
|
|
14524
|
+
async function withinDeadline(timeoutMs, operation, parent) {
|
|
14525
|
+
const controller = new AbortController();
|
|
14526
|
+
let timer;
|
|
14527
|
+
let cancel;
|
|
14528
|
+
const deadline = new Promise((_, reject) => {
|
|
14529
|
+
cancel = () => {
|
|
14530
|
+
reject(new Error("relay request deadline exceeded"));
|
|
14531
|
+
controller.abort();
|
|
14532
|
+
};
|
|
14533
|
+
timer = setTimeout(cancel, timeoutMs);
|
|
14534
|
+
parent?.addEventListener("abort", cancel, { once: true });
|
|
14535
|
+
if (parent?.aborted) cancel();
|
|
14536
|
+
});
|
|
14537
|
+
try {
|
|
14538
|
+
return await Promise.race([Promise.resolve().then(() => {
|
|
14539
|
+
controller.signal.throwIfAborted();
|
|
14540
|
+
return operation(controller.signal);
|
|
14541
|
+
}), deadline]);
|
|
14542
|
+
} finally {
|
|
14543
|
+
clearTimeout(timer);
|
|
14544
|
+
parent?.removeEventListener("abort", cancel);
|
|
14545
|
+
}
|
|
14546
|
+
}
|
|
14509
14547
|
async function probeRelayCandidates(candidates, options = {}) {
|
|
14510
14548
|
const timeoutMs = options.timeoutMs ?? 2e3;
|
|
14511
14549
|
const fetchImpl = options.fetchImpl ?? fetch;
|
|
14512
14550
|
const now = options.now ?? (() => performance.now());
|
|
14513
14551
|
const measured = await Promise.all(candidates.map(async (candidate) => {
|
|
14514
|
-
const controller = new AbortController();
|
|
14515
|
-
const timeout = setTimeout(() => controller.abort(), timeoutMs);
|
|
14516
14552
|
const startedAt = now();
|
|
14517
14553
|
try {
|
|
14518
|
-
|
|
14519
|
-
|
|
14520
|
-
|
|
14521
|
-
|
|
14522
|
-
|
|
14523
|
-
|
|
14524
|
-
|
|
14525
|
-
|
|
14526
|
-
|
|
14554
|
+
return await withinDeadline(timeoutMs, async (signal) => {
|
|
14555
|
+
const response = await fetchImpl(`${candidate.url}/health`, {
|
|
14556
|
+
method: "GET",
|
|
14557
|
+
cache: "no-store",
|
|
14558
|
+
signal
|
|
14559
|
+
});
|
|
14560
|
+
if (!response.ok) return null;
|
|
14561
|
+
const body = await response.json();
|
|
14562
|
+
if (body.ok !== true || body.relayId !== candidate.id) return null;
|
|
14563
|
+
return { relayId: candidate.id, rttMs: Math.max(0, now() - startedAt) };
|
|
14564
|
+
}, options.signal);
|
|
14527
14565
|
} catch {
|
|
14528
14566
|
return null;
|
|
14529
|
-
} finally {
|
|
14530
|
-
clearTimeout(timeout);
|
|
14531
14567
|
}
|
|
14532
14568
|
}));
|
|
14533
14569
|
return measured.filter((probe) => probe !== null);
|
|
@@ -14535,25 +14571,32 @@ async function probeRelayCandidates(candidates, options = {}) {
|
|
|
14535
14571
|
async function discoverAndClaimRelay(input) {
|
|
14536
14572
|
const fetchImpl = input.fetchImpl ?? fetch;
|
|
14537
14573
|
try {
|
|
14538
|
-
|
|
14539
|
-
|
|
14540
|
-
|
|
14541
|
-
|
|
14542
|
-
|
|
14543
|
-
|
|
14544
|
-
|
|
14545
|
-
|
|
14546
|
-
|
|
14547
|
-
|
|
14548
|
-
|
|
14549
|
-
|
|
14550
|
-
|
|
14551
|
-
|
|
14552
|
-
|
|
14574
|
+
return await withinDeadline(RELAY_REFRESH_TIMEOUT_MS, async (signal) => {
|
|
14575
|
+
const discoveryResponse = await fetchImpl(`${input.controlUrl}/v1/relays`, {
|
|
14576
|
+
headers: { Authorization: `Bearer ${input.token}` },
|
|
14577
|
+
cache: "no-store",
|
|
14578
|
+
signal
|
|
14579
|
+
});
|
|
14580
|
+
if (!discoveryResponse.ok) return null;
|
|
14581
|
+
const discovery = RelayCandidatesResponseSchema.parse(await discoveryResponse.json());
|
|
14582
|
+
signal.throwIfAborted();
|
|
14583
|
+
if (!discovery.enabled || discovery.candidates.length === 0) return null;
|
|
14584
|
+
const probes = await probeRelayCandidates(discovery.candidates, { fetchImpl, signal });
|
|
14585
|
+
signal.throwIfAborted();
|
|
14586
|
+
const decision = selectStableRelay(discovery.candidates, probes, input.connectedRelayId, input.switchTracker);
|
|
14587
|
+
const selected = decision.candidate;
|
|
14588
|
+
if (!selected) return null;
|
|
14589
|
+
const claimResponse = await fetchImpl(`${input.controlUrl}/v1/relays/machines/${encodeURIComponent(input.machineId)}/claim`, {
|
|
14590
|
+
method: "POST",
|
|
14591
|
+
signal,
|
|
14592
|
+
headers: { Authorization: `Bearer ${input.token}`, "Content-Type": "application/json" },
|
|
14593
|
+
body: JSON.stringify({ relayId: selected.id, probes })
|
|
14594
|
+
});
|
|
14595
|
+
if (!claimResponse.ok) return null;
|
|
14596
|
+
const claimed = RelayAssignmentResponseSchema.parse(await claimResponse.json());
|
|
14597
|
+
signal.throwIfAborted();
|
|
14598
|
+
return claimed.assignment ? { assignment: claimed.assignment, probes, switchTracker: decision.tracker } : null;
|
|
14553
14599
|
});
|
|
14554
|
-
if (!claimResponse.ok) return null;
|
|
14555
|
-
const claimed = RelayAssignmentResponseSchema.parse(await claimResponse.json());
|
|
14556
|
-
return claimed.assignment ? { assignment: claimed.assignment, probes, switchTracker: decision.tracker } : null;
|
|
14557
14600
|
} catch {
|
|
14558
14601
|
return null;
|
|
14559
14602
|
}
|
|
@@ -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.122";
|
|
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.122",
|
|
146
|
+
"very-happy-tools-x64-darwin": "0.2.122",
|
|
147
|
+
"very-happy-tools-arm64-linux": "0.2.122",
|
|
148
|
+
"very-happy-tools-x64-linux": "0.2.122",
|
|
149
|
+
"very-happy-tools-arm64-win32": "0.2.122",
|
|
150
|
+
"very-happy-tools-x64-win32": "0.2.122"
|
|
151
151
|
};
|
|
152
152
|
var devDependencies = {
|
|
153
153
|
"@slopus/happy-wire": "workspace:*",
|
|
@@ -1010,6 +1010,20 @@ const ReleaseDrainNoticeSchema = z$1.object({
|
|
|
1010
1010
|
deadline: z$1.number().int().positive(),
|
|
1011
1011
|
mode: z$1.literal("make-before-break")
|
|
1012
1012
|
});
|
|
1013
|
+
const ConnectionDiagnosticEventSchema = z$1.object({
|
|
1014
|
+
attemptId: z$1.string().uuid(),
|
|
1015
|
+
machineId: z$1.string().min(1).max(256).regex(/^[A-Za-z0-9_-]+$/).optional(),
|
|
1016
|
+
at: z$1.number().int().min(0).max(Number.MAX_SAFE_INTEGER),
|
|
1017
|
+
stage: z$1.enum(["control", "relay_discovery", "relay_connect", "relay_probe", "machine_rpc", "terminal_open"]),
|
|
1018
|
+
outcome: z$1.enum(["started", "success", "timeout", "error", "offline", "cancelled", "fallback"]),
|
|
1019
|
+
durationMs: z$1.number().int().min(0).max(3e5),
|
|
1020
|
+
deviceClass: z$1.enum(["mobile", "desktop", "unknown"]),
|
|
1021
|
+
visibility: z$1.enum(["visible", "hidden"]),
|
|
1022
|
+
client: z$1.string().regex(/^web\/(?:[a-f0-9]{7,40}|unknown)$/)
|
|
1023
|
+
}).strict();
|
|
1024
|
+
z$1.object({
|
|
1025
|
+
events: z$1.array(ConnectionDiagnosticEventSchema).min(1).max(32)
|
|
1026
|
+
}).strict();
|
|
1013
1027
|
|
|
1014
1028
|
z$1.object({
|
|
1015
1029
|
host: z$1.string(),
|
|
@@ -14484,28 +14498,50 @@ function selectStableRelay(candidates, probes, connectedRelayId, tracker = null)
|
|
|
14484
14498
|
tracker: { challengerRelayId: fastest.id, consecutiveWins }
|
|
14485
14499
|
};
|
|
14486
14500
|
}
|
|
14501
|
+
const RELAY_REFRESH_TIMEOUT_MS = 8e3;
|
|
14502
|
+
async function withinDeadline(timeoutMs, operation, parent) {
|
|
14503
|
+
const controller = new AbortController();
|
|
14504
|
+
let timer;
|
|
14505
|
+
let cancel;
|
|
14506
|
+
const deadline = new Promise((_, reject) => {
|
|
14507
|
+
cancel = () => {
|
|
14508
|
+
reject(new Error("relay request deadline exceeded"));
|
|
14509
|
+
controller.abort();
|
|
14510
|
+
};
|
|
14511
|
+
timer = setTimeout(cancel, timeoutMs);
|
|
14512
|
+
parent?.addEventListener("abort", cancel, { once: true });
|
|
14513
|
+
if (parent?.aborted) cancel();
|
|
14514
|
+
});
|
|
14515
|
+
try {
|
|
14516
|
+
return await Promise.race([Promise.resolve().then(() => {
|
|
14517
|
+
controller.signal.throwIfAborted();
|
|
14518
|
+
return operation(controller.signal);
|
|
14519
|
+
}), deadline]);
|
|
14520
|
+
} finally {
|
|
14521
|
+
clearTimeout(timer);
|
|
14522
|
+
parent?.removeEventListener("abort", cancel);
|
|
14523
|
+
}
|
|
14524
|
+
}
|
|
14487
14525
|
async function probeRelayCandidates(candidates, options = {}) {
|
|
14488
14526
|
const timeoutMs = options.timeoutMs ?? 2e3;
|
|
14489
14527
|
const fetchImpl = options.fetchImpl ?? fetch;
|
|
14490
14528
|
const now = options.now ?? (() => performance.now());
|
|
14491
14529
|
const measured = await Promise.all(candidates.map(async (candidate) => {
|
|
14492
|
-
const controller = new AbortController();
|
|
14493
|
-
const timeout = setTimeout(() => controller.abort(), timeoutMs);
|
|
14494
14530
|
const startedAt = now();
|
|
14495
14531
|
try {
|
|
14496
|
-
|
|
14497
|
-
|
|
14498
|
-
|
|
14499
|
-
|
|
14500
|
-
|
|
14501
|
-
|
|
14502
|
-
|
|
14503
|
-
|
|
14504
|
-
|
|
14532
|
+
return await withinDeadline(timeoutMs, async (signal) => {
|
|
14533
|
+
const response = await fetchImpl(`${candidate.url}/health`, {
|
|
14534
|
+
method: "GET",
|
|
14535
|
+
cache: "no-store",
|
|
14536
|
+
signal
|
|
14537
|
+
});
|
|
14538
|
+
if (!response.ok) return null;
|
|
14539
|
+
const body = await response.json();
|
|
14540
|
+
if (body.ok !== true || body.relayId !== candidate.id) return null;
|
|
14541
|
+
return { relayId: candidate.id, rttMs: Math.max(0, now() - startedAt) };
|
|
14542
|
+
}, options.signal);
|
|
14505
14543
|
} catch {
|
|
14506
14544
|
return null;
|
|
14507
|
-
} finally {
|
|
14508
|
-
clearTimeout(timeout);
|
|
14509
14545
|
}
|
|
14510
14546
|
}));
|
|
14511
14547
|
return measured.filter((probe) => probe !== null);
|
|
@@ -14513,25 +14549,32 @@ async function probeRelayCandidates(candidates, options = {}) {
|
|
|
14513
14549
|
async function discoverAndClaimRelay(input) {
|
|
14514
14550
|
const fetchImpl = input.fetchImpl ?? fetch;
|
|
14515
14551
|
try {
|
|
14516
|
-
|
|
14517
|
-
|
|
14518
|
-
|
|
14519
|
-
|
|
14520
|
-
|
|
14521
|
-
|
|
14522
|
-
|
|
14523
|
-
|
|
14524
|
-
|
|
14525
|
-
|
|
14526
|
-
|
|
14527
|
-
|
|
14528
|
-
|
|
14529
|
-
|
|
14530
|
-
|
|
14552
|
+
return await withinDeadline(RELAY_REFRESH_TIMEOUT_MS, async (signal) => {
|
|
14553
|
+
const discoveryResponse = await fetchImpl(`${input.controlUrl}/v1/relays`, {
|
|
14554
|
+
headers: { Authorization: `Bearer ${input.token}` },
|
|
14555
|
+
cache: "no-store",
|
|
14556
|
+
signal
|
|
14557
|
+
});
|
|
14558
|
+
if (!discoveryResponse.ok) return null;
|
|
14559
|
+
const discovery = RelayCandidatesResponseSchema.parse(await discoveryResponse.json());
|
|
14560
|
+
signal.throwIfAborted();
|
|
14561
|
+
if (!discovery.enabled || discovery.candidates.length === 0) return null;
|
|
14562
|
+
const probes = await probeRelayCandidates(discovery.candidates, { fetchImpl, signal });
|
|
14563
|
+
signal.throwIfAborted();
|
|
14564
|
+
const decision = selectStableRelay(discovery.candidates, probes, input.connectedRelayId, input.switchTracker);
|
|
14565
|
+
const selected = decision.candidate;
|
|
14566
|
+
if (!selected) return null;
|
|
14567
|
+
const claimResponse = await fetchImpl(`${input.controlUrl}/v1/relays/machines/${encodeURIComponent(input.machineId)}/claim`, {
|
|
14568
|
+
method: "POST",
|
|
14569
|
+
signal,
|
|
14570
|
+
headers: { Authorization: `Bearer ${input.token}`, "Content-Type": "application/json" },
|
|
14571
|
+
body: JSON.stringify({ relayId: selected.id, probes })
|
|
14572
|
+
});
|
|
14573
|
+
if (!claimResponse.ok) return null;
|
|
14574
|
+
const claimed = RelayAssignmentResponseSchema.parse(await claimResponse.json());
|
|
14575
|
+
signal.throwIfAborted();
|
|
14576
|
+
return claimed.assignment ? { assignment: claimed.assignment, probes, switchTracker: decision.tracker } : null;
|
|
14531
14577
|
});
|
|
14532
|
-
if (!claimResponse.ok) return null;
|
|
14533
|
-
const claimed = RelayAssignmentResponseSchema.parse(await claimResponse.json());
|
|
14534
|
-
return claimed.assignment ? { assignment: claimed.assignment, probes, switchTracker: decision.tracker } : null;
|
|
14535
14578
|
} catch {
|
|
14536
14579
|
return null;
|
|
14537
14580
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "very-happy-cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.122",
|
|
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.122",
|
|
117
|
+
"very-happy-tools-x64-darwin": "0.2.122",
|
|
118
|
+
"very-happy-tools-arm64-linux": "0.2.122",
|
|
119
|
+
"very-happy-tools-x64-linux": "0.2.122",
|
|
120
|
+
"very-happy-tools-arm64-win32": "0.2.122",
|
|
121
|
+
"very-happy-tools-x64-win32": "0.2.122"
|
|
122
122
|
},
|
|
123
123
|
"devDependencies": {
|
|
124
124
|
"@slopus/happy-wire": "workspace:*",
|