very-happy-cli 0.2.123 → 0.2.124
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-hM-qHLN3.mjs → AcpBackend-CT9TOBEM.mjs} +1 -1
- package/dist/{AcpBackend-DzIvpTxZ.cjs → AcpBackend-au0veuIF.cjs} +1 -1
- package/dist/{AcpSessionManager-DyU3Ikgj.cjs → AcpSessionManager-BCWeBKDd.cjs} +1 -1
- package/dist/{AcpSessionManager-CRPZPHPa.mjs → AcpSessionManager-p1tj7FxF.mjs} +1 -1
- package/dist/{config-alG86PDN.mjs → config-DwMic6AC.mjs} +2 -2
- package/dist/{config-4RaHrVSV.cjs → config-GzzqE5Ev.cjs} +2 -2
- package/dist/{index-vyYHKKk6.mjs → index-B3-daYaX.mjs} +2 -2
- package/dist/{index-Cg3Vfc00.mjs → index-Ba6Fu6MJ.mjs} +5 -5
- package/dist/{index-DWBKJ5zy.cjs → index-C69uF6Up.cjs} +2 -2
- package/dist/{index-5b9YhV-1.cjs → index-DI_VC3vJ.cjs} +19 -19
- package/dist/{index-Beh0UZf8.cjs → index-DgN9P02i.cjs} +4 -4
- package/dist/{index-36AkXNF2.mjs → index-SQKnWyz-.mjs} +15 -15
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{installTerminalHooks-DWCa5j7u.cjs → installTerminalHooks-CvMt8cBI.cjs} +2 -2
- package/dist/{installTerminalHooks-DqUPkh0l.mjs → installTerminalHooks-Df4hzzdM.mjs} +2 -2
- package/dist/lib.cjs +1 -1
- package/dist/lib.mjs +1 -1
- package/dist/{mcp-DZIdcsJp.mjs → mcp-C0oW5u-b.mjs} +2 -2
- package/dist/{mcp-BBya5dsZ.cjs → mcp-DnyLwSPq.cjs} +2 -2
- package/dist/{runGemini-DmWxHIwS.cjs → runGemini-_FHrxuHN.cjs} +4 -4
- package/dist/{runGemini-BQa2eF3i.mjs → runGemini-mqLjz-M7.mjs} +4 -4
- package/dist/{runOpenClaw-362eg04u.mjs → runOpenClaw-Bs03yQHe.mjs} +3 -3
- package/dist/{runOpenClaw-boyJtPBq.cjs → runOpenClaw-C5VZQ6Na.cjs} +3 -3
- package/dist/{send-BINA__Ke.cjs → send-BD2gTVoP.cjs} +2 -2
- package/dist/{send-CT22-8Tp.mjs → send-BaLjQPZQ.mjs} +2 -2
- package/dist/{sessions-DXYxV6Np.cjs → sessions-B108j_Xj.cjs} +2 -2
- package/dist/{sessions-DemgtCkr.mjs → sessions-ggBePfSY.mjs} +2 -2
- package/dist/{spawn-D2egvPgO.mjs → spawn-CORFRb9D.mjs} +2 -2
- package/dist/{spawn-BtV9dU1i.cjs → spawn-iI8w8sD7.cjs} +2 -2
- package/dist/{types-Cd_tUN3U.cjs → types-CZIwVSN2.cjs} +131 -14
- package/dist/{types-BqW7nEN_.mjs → types-gDOmwOKw.mjs} +130 -13
- package/package.json +7 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { spawn } from 'node:child_process';
|
|
2
2
|
import { ndJsonStream, ClientSideConnection } from '@agentclientprotocol/sdk';
|
|
3
3
|
import { randomUUID } from 'node:crypto';
|
|
4
|
-
import { l as logger, g as contentLogMetadata, h as errorLogMetadata, j as packageJson, k as delay } from './types-
|
|
4
|
+
import { l as logger, g as contentLogMetadata, h as errorLogMetadata, j as packageJson, k as delay } from './types-gDOmwOKw.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-CZIwVSN2.cjs');
|
|
7
7
|
|
|
8
8
|
const DEFAULT_TIMEOUTS = {
|
|
9
9
|
/** 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-gDOmwOKw.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-gDOmwOKw.mjs';
|
|
6
|
+
import { j as DEFAULT_GEMINI_MODEL, G as GEMINI_MODEL_ENV } from './index-SQKnWyz-.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-CZIwVSN2.cjs');
|
|
8
|
+
var index = require('./index-DI_VC3vJ.cjs');
|
|
9
9
|
require('axios');
|
|
10
10
|
require('chalk');
|
|
11
11
|
require('node:util');
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { q as query } from './index-
|
|
1
|
+
import { q as query } from './index-SQKnWyz-.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-gDOmwOKw.mjs';
|
|
7
7
|
import 'axios';
|
|
8
8
|
import 'node:util';
|
|
9
9
|
import 'node:fs';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { D as DefaultTransport, A as AcpBackend } from './AcpBackend-
|
|
2
|
-
export { a as DEFAULT_IDLE_TIMEOUT_MS, b as DEFAULT_TOOL_CALL_TIMEOUT_MS, e as extractErrorDetail, f as formatDuration, c as formatDurationMinutes, h as handleAgentMessageChunk, d as handleAgentThoughtChunk, g as handleLegacyMessageChunk, i as handlePlanUpdate, j as handleThinkingUpdate, k as handleToolCall, l as handleToolCallUpdate, p as parseArgsFromContent } from './AcpBackend-
|
|
3
|
-
import { d as connectionState, A as ApiClient, e as readSettings, f as encodeBase64, l as logger, p as projectPath } from './types-
|
|
4
|
-
import { A as AcpSessionManager } from './AcpSessionManager-
|
|
1
|
+
import { D as DefaultTransport, A as AcpBackend } from './AcpBackend-CT9TOBEM.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-CT9TOBEM.mjs';
|
|
3
|
+
import { d as connectionState, A as ApiClient, e as readSettings, f as encodeBase64, l as logger, p as projectPath } from './types-gDOmwOKw.mjs';
|
|
4
|
+
import { A as AcpSessionManager } from './AcpSessionManager-p1tj7FxF.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-SQKnWyz-.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 index = require('./index-
|
|
3
|
+
var index = require('./index-DI_VC3vJ.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-CZIwVSN2.cjs');
|
|
9
9
|
require('axios');
|
|
10
10
|
require('node:util');
|
|
11
11
|
require('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-CZIwVSN2.cjs');
|
|
7
7
|
var spawn = require('cross-spawn');
|
|
8
8
|
var path = require('node:path');
|
|
9
9
|
var node_readline = require('node:readline');
|
|
@@ -7674,7 +7674,7 @@ function parseJsonObject(text) {
|
|
|
7674
7674
|
return null;
|
|
7675
7675
|
}
|
|
7676
7676
|
}
|
|
7677
|
-
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-
|
|
7677
|
+
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-DI_VC3vJ.cjs', document.baseURI).href))).resolve(s)) {
|
|
7678
7678
|
const platformArch = `${platform}-${arch}`;
|
|
7679
7679
|
const candidates = [
|
|
7680
7680
|
`@anthropic-ai/claude-agent-sdk-${platformArch}/claude`,
|
|
@@ -11518,7 +11518,7 @@ function registerSideQuestionHandler(rpc, deps) {
|
|
|
11518
11518
|
const retainMs = deps.retainMs ?? SIDE_QUESTION_RETAIN_MS;
|
|
11519
11519
|
const maxRunMs = deps.maxRunMs ?? SIDE_QUESTION_MAX_RUN_MS;
|
|
11520
11520
|
const run = deps.run ?? (async (input) => {
|
|
11521
|
-
const { query } = await Promise.resolve().then(function () { return require('./index-
|
|
11521
|
+
const { query } = await Promise.resolve().then(function () { return require('./index-C69uF6Up.cjs'); });
|
|
11522
11522
|
return runSideQuestion(query, input);
|
|
11523
11523
|
});
|
|
11524
11524
|
const slots = /* @__PURE__ */ new Map();
|
|
@@ -11620,7 +11620,7 @@ const MAX_TITLE_CHARS = 60;
|
|
|
11620
11620
|
const GENERATION_TIMEOUT_MS = 3e4;
|
|
11621
11621
|
function resolveClaudeBinary() {
|
|
11622
11622
|
try {
|
|
11623
|
-
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-
|
|
11623
|
+
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-DI_VC3vJ.cjs', document.baseURI).href)));
|
|
11624
11624
|
const utilsPath = path.resolve(path.join(persistence.projectPath(), "scripts", "claude_version_utils.cjs"));
|
|
11625
11625
|
const { getClaudeCliPath } = require$1(utilsPath);
|
|
11626
11626
|
const path$1 = getClaudeCliPath();
|
|
@@ -13837,9 +13837,9 @@ function resolveLocalSignupBootstrap(configuredMode, configuredInviteCodes, gene
|
|
|
13837
13837
|
};
|
|
13838
13838
|
}
|
|
13839
13839
|
|
|
13840
|
-
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-
|
|
13840
|
+
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-DI_VC3vJ.cjs', document.baseURI).href)));
|
|
13841
13841
|
const __dirname$1 = path.dirname(__filename$1);
|
|
13842
|
-
const require_ = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-
|
|
13842
|
+
const require_ = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-DI_VC3vJ.cjs', document.baseURI).href)));
|
|
13843
13843
|
const PRISMA_QUERY_ENGINE_FILES = {
|
|
13844
13844
|
"arm64-darwin": "libquery_engine-darwin-arm64.dylib.node",
|
|
13845
13845
|
"x64-darwin": "libquery_engine-darwin.dylib.node",
|
|
@@ -16469,7 +16469,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16469
16469
|
process.exit(0);
|
|
16470
16470
|
} else if (subcommand === "install-terminal-hooks") {
|
|
16471
16471
|
try {
|
|
16472
|
-
const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await Promise.resolve().then(function () { return require('./installTerminalHooks-
|
|
16472
|
+
const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await Promise.resolve().then(function () { return require('./installTerminalHooks-CvMt8cBI.cjs'); });
|
|
16473
16473
|
const command = parseTerminalHooksArgs(args.slice(1));
|
|
16474
16474
|
if (command.action === "help") {
|
|
16475
16475
|
console.log(TERMINAL_HOOKS_HELP);
|
|
@@ -16486,7 +16486,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16486
16486
|
}
|
|
16487
16487
|
} else if (subcommand === "spawn") {
|
|
16488
16488
|
try {
|
|
16489
|
-
const { handleSpawnCommand } = await Promise.resolve().then(function () { return require('./spawn-
|
|
16489
|
+
const { handleSpawnCommand } = await Promise.resolve().then(function () { return require('./spawn-iI8w8sD7.cjs'); });
|
|
16490
16490
|
await handleSpawnCommand(args.slice(1));
|
|
16491
16491
|
} catch (error) {
|
|
16492
16492
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -16498,7 +16498,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16498
16498
|
return;
|
|
16499
16499
|
} else if (subcommand === "sessions") {
|
|
16500
16500
|
try {
|
|
16501
|
-
const { handleSessionsCommand } = await Promise.resolve().then(function () { return require('./sessions-
|
|
16501
|
+
const { handleSessionsCommand } = await Promise.resolve().then(function () { return require('./sessions-B108j_Xj.cjs'); });
|
|
16502
16502
|
await handleSessionsCommand(args.slice(1));
|
|
16503
16503
|
} catch (error) {
|
|
16504
16504
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -16510,7 +16510,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16510
16510
|
return;
|
|
16511
16511
|
} else if (subcommand === "send") {
|
|
16512
16512
|
try {
|
|
16513
|
-
const { handleSendCommand } = await Promise.resolve().then(function () { return require('./send-
|
|
16513
|
+
const { handleSendCommand } = await Promise.resolve().then(function () { return require('./send-BD2gTVoP.cjs'); });
|
|
16514
16514
|
await handleSendCommand(args.slice(1));
|
|
16515
16515
|
} catch (error) {
|
|
16516
16516
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -16616,9 +16616,9 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16616
16616
|
if (geminiSubcommand === "project" && args[2] === "set" && args[3]) {
|
|
16617
16617
|
const projectId = args[3];
|
|
16618
16618
|
try {
|
|
16619
|
-
const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return require('./config-
|
|
16620
|
-
const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await Promise.resolve().then(function () { return require('./types-
|
|
16621
|
-
const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./types-
|
|
16619
|
+
const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return require('./config-GzzqE5Ev.cjs'); });
|
|
16620
|
+
const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await Promise.resolve().then(function () { return require('./types-CZIwVSN2.cjs'); }).then(function (n) { return n.persistence; });
|
|
16621
|
+
const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./types-CZIwVSN2.cjs'); }).then(function (n) { return n.api; });
|
|
16622
16622
|
let userEmail = void 0;
|
|
16623
16623
|
try {
|
|
16624
16624
|
const credentials = await readCredentialsForConfiguredRelay2();
|
|
@@ -16649,7 +16649,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16649
16649
|
}
|
|
16650
16650
|
if (geminiSubcommand === "project" && args[2] === "get") {
|
|
16651
16651
|
try {
|
|
16652
|
-
const { readGeminiLocalConfig } = await Promise.resolve().then(function () { return require('./config-
|
|
16652
|
+
const { readGeminiLocalConfig } = await Promise.resolve().then(function () { return require('./config-GzzqE5Ev.cjs'); });
|
|
16653
16653
|
const config = readGeminiLocalConfig();
|
|
16654
16654
|
if (config.googleCloudProject) {
|
|
16655
16655
|
console.log(`Current Google Cloud Project: ${config.googleCloudProject}`);
|
|
@@ -16689,7 +16689,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16689
16689
|
process.exit(0);
|
|
16690
16690
|
}
|
|
16691
16691
|
try {
|
|
16692
|
-
const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-
|
|
16692
|
+
const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-_FHrxuHN.cjs'); });
|
|
16693
16693
|
let startedBy = void 0;
|
|
16694
16694
|
for (let i = 1; i < args.length; i++) {
|
|
16695
16695
|
if (args[i] === "--started-by") {
|
|
@@ -16719,7 +16719,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16719
16719
|
}
|
|
16720
16720
|
};
|
|
16721
16721
|
try {
|
|
16722
|
-
const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-
|
|
16722
|
+
const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-DgN9P02i.cjs'); });
|
|
16723
16723
|
const parsed = parsePiRunnerArgs(args.slice(1));
|
|
16724
16724
|
const resolved = resolveAcpAgentConfig(["pi", ...parsed.passthrough]);
|
|
16725
16725
|
const { credentials } = await authAndSetupMachineIfNeeded();
|
|
@@ -16746,7 +16746,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16746
16746
|
return;
|
|
16747
16747
|
} else if (subcommand === "acp") {
|
|
16748
16748
|
try {
|
|
16749
|
-
const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-
|
|
16749
|
+
const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-DgN9P02i.cjs'); });
|
|
16750
16750
|
let startedBy = void 0;
|
|
16751
16751
|
let verbose = false;
|
|
16752
16752
|
const acpArgs = [];
|
|
@@ -16786,7 +16786,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16786
16786
|
return;
|
|
16787
16787
|
} else if (subcommand === "openclaw") {
|
|
16788
16788
|
try {
|
|
16789
|
-
const { runOpenClaw } = await Promise.resolve().then(function () { return require('./runOpenClaw-
|
|
16789
|
+
const { runOpenClaw } = await Promise.resolve().then(function () { return require('./runOpenClaw-C5VZQ6Na.cjs'); });
|
|
16790
16790
|
let startedBy = void 0;
|
|
16791
16791
|
let verbose = false;
|
|
16792
16792
|
let gatewayUrl;
|
|
@@ -16837,7 +16837,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16837
16837
|
return;
|
|
16838
16838
|
} else if (subcommand === "mcp" && args.length === 1) {
|
|
16839
16839
|
try {
|
|
16840
|
-
const { handleMcpCommand } = await Promise.resolve().then(function () { return require('./mcp-
|
|
16840
|
+
const { handleMcpCommand } = await Promise.resolve().then(function () { return require('./mcp-DnyLwSPq.cjs'); });
|
|
16841
16841
|
await handleMcpCommand();
|
|
16842
16842
|
} catch (error) {
|
|
16843
16843
|
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-au0veuIF.cjs');
|
|
4
|
+
var persistence = require('./types-CZIwVSN2.cjs');
|
|
5
|
+
var AcpSessionManager = require('./AcpSessionManager-BCWeBKDd.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-DI_VC3vJ.cjs');
|
|
9
9
|
require('node:child_process');
|
|
10
10
|
require('@agentclientprotocol/sdk');
|
|
11
11
|
require('axios');
|
|
@@ -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 parseExactVersion, X as compareExactVersions, Y as extractCompleteLines, Z as decideBackfill, _ as parseTerminalHookPayload, $ as tmuxArgs, a0 as scrubTmuxClientEnv, a1 as decideMirrorBinding, a2 as MIRROR_BACKFILL_LINES_DEFAULT, a3 as persistSession, a4 as mirrorLineKey, a5 as mirrorLocalId, a6 as detectCLIAvailability, a7 as detectResumeSupport, a8 as acquireDaemonLock, a9 as summarizeSpawnSessionForLog, aa as deletePersistedSessions, ab as shellescape, ac as decrypt, ad as writeDaemonState, A as ApiClient, ae as writeSettings, af as fetchCliUpdateState, ag as resolveCliUpdateCheckInterval, ah as DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS, ai as releaseDaemonLock, i as isValidSessionId, aj as listVhTerminals, ak as isValidTerminalId, al as readVhTerminal, am as sendToVhTerminal, an as TITLE_PROMPT_PREFIX, ao as BOARD_ANALYZER_PROMPT_PREFIX, d as connectionState, ap as startOfflineReconnection, aq as clearCredentials, ar as clearMachineId, m as ensurePrivateDirectorySync, as as SandboxConfigSchema, b as createEnvelope, at as CodexAppServerClient, au 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 parseExactVersion, X as compareExactVersions, Y as extractCompleteLines, Z as decideBackfill, _ as parseTerminalHookPayload, $ as tmuxArgs, a0 as scrubTmuxClientEnv, a1 as decideMirrorBinding, a2 as MIRROR_BACKFILL_LINES_DEFAULT, a3 as persistSession, a4 as mirrorLineKey, a5 as mirrorLocalId, a6 as detectCLIAvailability, a7 as detectResumeSupport, a8 as acquireDaemonLock, a9 as summarizeSpawnSessionForLog, aa as deletePersistedSessions, ab as shellescape, ac as decrypt, ad as writeDaemonState, A as ApiClient, ae as writeSettings, af as fetchCliUpdateState, ag as resolveCliUpdateCheckInterval, ah as DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS, ai as releaseDaemonLock, i as isValidSessionId, aj as listVhTerminals, ak as isValidTerminalId, al as readVhTerminal, am as sendToVhTerminal, an as TITLE_PROMPT_PREFIX, ao as BOARD_ANALYZER_PROMPT_PREFIX, d as connectionState, ap as startOfflineReconnection, aq as clearCredentials, ar as clearMachineId, m as ensurePrivateDirectorySync, as as SandboxConfigSchema, b as createEnvelope, at as CodexAppServerClient, au as getLatestDaemonLog } from './types-gDOmwOKw.mjs';
|
|
5
5
|
import spawn$1, { spawn } from 'cross-spawn';
|
|
6
6
|
import path, { join, resolve, basename, isAbsolute, dirname, sep, delimiter, normalize } from 'node:path';
|
|
7
7
|
import { createInterface } from 'node:readline';
|
|
@@ -11496,7 +11496,7 @@ function registerSideQuestionHandler(rpc, deps) {
|
|
|
11496
11496
|
const retainMs = deps.retainMs ?? SIDE_QUESTION_RETAIN_MS;
|
|
11497
11497
|
const maxRunMs = deps.maxRunMs ?? SIDE_QUESTION_MAX_RUN_MS;
|
|
11498
11498
|
const run = deps.run ?? (async (input) => {
|
|
11499
|
-
const { query } = await import('./index-
|
|
11499
|
+
const { query } = await import('./index-B3-daYaX.mjs');
|
|
11500
11500
|
return runSideQuestion(query, input);
|
|
11501
11501
|
});
|
|
11502
11502
|
const slots = /* @__PURE__ */ new Map();
|
|
@@ -16447,7 +16447,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16447
16447
|
process.exit(0);
|
|
16448
16448
|
} else if (subcommand === "install-terminal-hooks") {
|
|
16449
16449
|
try {
|
|
16450
|
-
const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await import('./installTerminalHooks-
|
|
16450
|
+
const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await import('./installTerminalHooks-Df4hzzdM.mjs');
|
|
16451
16451
|
const command = parseTerminalHooksArgs(args.slice(1));
|
|
16452
16452
|
if (command.action === "help") {
|
|
16453
16453
|
console.log(TERMINAL_HOOKS_HELP);
|
|
@@ -16464,7 +16464,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16464
16464
|
}
|
|
16465
16465
|
} else if (subcommand === "spawn") {
|
|
16466
16466
|
try {
|
|
16467
|
-
const { handleSpawnCommand } = await import('./spawn-
|
|
16467
|
+
const { handleSpawnCommand } = await import('./spawn-CORFRb9D.mjs');
|
|
16468
16468
|
await handleSpawnCommand(args.slice(1));
|
|
16469
16469
|
} catch (error) {
|
|
16470
16470
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -16476,7 +16476,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16476
16476
|
return;
|
|
16477
16477
|
} else if (subcommand === "sessions") {
|
|
16478
16478
|
try {
|
|
16479
|
-
const { handleSessionsCommand } = await import('./sessions-
|
|
16479
|
+
const { handleSessionsCommand } = await import('./sessions-ggBePfSY.mjs');
|
|
16480
16480
|
await handleSessionsCommand(args.slice(1));
|
|
16481
16481
|
} catch (error) {
|
|
16482
16482
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -16488,7 +16488,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16488
16488
|
return;
|
|
16489
16489
|
} else if (subcommand === "send") {
|
|
16490
16490
|
try {
|
|
16491
|
-
const { handleSendCommand } = await import('./send-
|
|
16491
|
+
const { handleSendCommand } = await import('./send-BaLjQPZQ.mjs');
|
|
16492
16492
|
await handleSendCommand(args.slice(1));
|
|
16493
16493
|
} catch (error) {
|
|
16494
16494
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -16594,9 +16594,9 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16594
16594
|
if (geminiSubcommand === "project" && args[2] === "set" && args[3]) {
|
|
16595
16595
|
const projectId = args[3];
|
|
16596
16596
|
try {
|
|
16597
|
-
const { saveGoogleCloudProjectToConfig } = await import('./config-
|
|
16598
|
-
const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await import('./types-
|
|
16599
|
-
const { ApiClient: ApiClient2 } = await import('./types-
|
|
16597
|
+
const { saveGoogleCloudProjectToConfig } = await import('./config-DwMic6AC.mjs');
|
|
16598
|
+
const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await import('./types-gDOmwOKw.mjs').then(function (n) { return n.av; });
|
|
16599
|
+
const { ApiClient: ApiClient2 } = await import('./types-gDOmwOKw.mjs').then(function (n) { return n.aw; });
|
|
16600
16600
|
let userEmail = void 0;
|
|
16601
16601
|
try {
|
|
16602
16602
|
const credentials = await readCredentialsForConfiguredRelay2();
|
|
@@ -16627,7 +16627,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16627
16627
|
}
|
|
16628
16628
|
if (geminiSubcommand === "project" && args[2] === "get") {
|
|
16629
16629
|
try {
|
|
16630
|
-
const { readGeminiLocalConfig } = await import('./config-
|
|
16630
|
+
const { readGeminiLocalConfig } = await import('./config-DwMic6AC.mjs');
|
|
16631
16631
|
const config = readGeminiLocalConfig();
|
|
16632
16632
|
if (config.googleCloudProject) {
|
|
16633
16633
|
console.log(`Current Google Cloud Project: ${config.googleCloudProject}`);
|
|
@@ -16667,7 +16667,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16667
16667
|
process.exit(0);
|
|
16668
16668
|
}
|
|
16669
16669
|
try {
|
|
16670
|
-
const { runGemini } = await import('./runGemini-
|
|
16670
|
+
const { runGemini } = await import('./runGemini-mqLjz-M7.mjs');
|
|
16671
16671
|
let startedBy = void 0;
|
|
16672
16672
|
for (let i = 1; i < args.length; i++) {
|
|
16673
16673
|
if (args[i] === "--started-by") {
|
|
@@ -16697,7 +16697,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16697
16697
|
}
|
|
16698
16698
|
};
|
|
16699
16699
|
try {
|
|
16700
|
-
const { runAcp, resolveAcpAgentConfig } = await import('./index-
|
|
16700
|
+
const { runAcp, resolveAcpAgentConfig } = await import('./index-Ba6Fu6MJ.mjs');
|
|
16701
16701
|
const parsed = parsePiRunnerArgs(args.slice(1));
|
|
16702
16702
|
const resolved = resolveAcpAgentConfig(["pi", ...parsed.passthrough]);
|
|
16703
16703
|
const { credentials } = await authAndSetupMachineIfNeeded();
|
|
@@ -16724,7 +16724,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16724
16724
|
return;
|
|
16725
16725
|
} else if (subcommand === "acp") {
|
|
16726
16726
|
try {
|
|
16727
|
-
const { runAcp, resolveAcpAgentConfig } = await import('./index-
|
|
16727
|
+
const { runAcp, resolveAcpAgentConfig } = await import('./index-Ba6Fu6MJ.mjs');
|
|
16728
16728
|
let startedBy = void 0;
|
|
16729
16729
|
let verbose = false;
|
|
16730
16730
|
const acpArgs = [];
|
|
@@ -16764,7 +16764,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16764
16764
|
return;
|
|
16765
16765
|
} else if (subcommand === "openclaw") {
|
|
16766
16766
|
try {
|
|
16767
|
-
const { runOpenClaw } = await import('./runOpenClaw-
|
|
16767
|
+
const { runOpenClaw } = await import('./runOpenClaw-Bs03yQHe.mjs');
|
|
16768
16768
|
let startedBy = void 0;
|
|
16769
16769
|
let verbose = false;
|
|
16770
16770
|
let gatewayUrl;
|
|
@@ -16815,7 +16815,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
16815
16815
|
return;
|
|
16816
16816
|
} else if (subcommand === "mcp" && args.length === 1) {
|
|
16817
16817
|
try {
|
|
16818
|
-
const { handleMcpCommand } = await import('./mcp-
|
|
16818
|
+
const { handleMcpCommand } = await import('./mcp-C0oW5u-b.mjs');
|
|
16819
16819
|
await handleMcpCommand();
|
|
16820
16820
|
} catch (error) {
|
|
16821
16821
|
process.stderr.write(`[very-happy mcp] Fatal: ${error instanceof Error ? error.message : String(error)}
|
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-CZIwVSN2.cjs');
|
|
9
|
+
var index = require('./index-DI_VC3vJ.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-gDOmwOKw.mjs';
|
|
7
|
+
import { t as tmuxSupportsSessionEnv } from './index-SQKnWyz-.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-gDOmwOKw.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-SQKnWyz-.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-gDOmwOKw.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-DI_VC3vJ.cjs');
|
|
7
7
|
var limits = require('./limits-KdWKmwtH.cjs');
|
|
8
|
-
var persistence = require('./types-
|
|
8
|
+
var persistence = require('./types-CZIwVSN2.cjs');
|
|
9
9
|
require('node:fs/promises');
|
|
10
10
|
require('node:os');
|
|
11
11
|
require('node:crypto');
|
|
@@ -4,10 +4,10 @@ var ink = require('ink');
|
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var node_crypto = require('node:crypto');
|
|
6
6
|
var path = require('node:path');
|
|
7
|
-
var persistence = require('./types-
|
|
8
|
-
var index = require('./index-
|
|
9
|
-
var AcpBackend = require('./AcpBackend-
|
|
10
|
-
var config = require('./config-
|
|
7
|
+
var persistence = require('./types-CZIwVSN2.cjs');
|
|
8
|
+
var index = require('./index-DI_VC3vJ.cjs');
|
|
9
|
+
var AcpBackend = require('./AcpBackend-au0veuIF.cjs');
|
|
10
|
+
var config = require('./config-GzzqE5Ev.cjs');
|
|
11
11
|
require('axios');
|
|
12
12
|
require('chalk');
|
|
13
13
|
require('node:util');
|
|
@@ -2,10 +2,10 @@ import { useStdout, useInput, Box, Text, render } from 'ink';
|
|
|
2
2
|
import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
3
3
|
import { randomUUID } from 'node:crypto';
|
|
4
4
|
import { join } from 'node:path';
|
|
5
|
-
import { l as logger, d as connectionState, A as ApiClient, e as readSettings, h as errorLogMetadata, f as encodeBase64, p as projectPath, g as contentLogMetadata } from './types-
|
|
6
|
-
import { 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-gDOmwOKw.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-SQKnWyz-.mjs';
|
|
7
|
+
import { A as AcpBackend } from './AcpBackend-CT9TOBEM.mjs';
|
|
8
|
+
import { readGeminiLocalConfig, determineGeminiModel, getGeminiModelSource, getInitialGeminiModel, saveGeminiModelToConfig } from './config-DwMic6AC.mjs';
|
|
9
9
|
import 'axios';
|
|
10
10
|
import 'chalk';
|
|
11
11
|
import 'node:util';
|
|
@@ -3,9 +3,9 @@ import { execFileSync } from 'node:child_process';
|
|
|
3
3
|
import os from 'node:os';
|
|
4
4
|
import { existsSync, readFileSync } from 'node:fs';
|
|
5
5
|
import { join } from 'node:path';
|
|
6
|
-
import { m as ensurePrivateDirectorySync, n as hardenPrivateFileSync, w as writePrivateFileSync, h as errorLogMetadata, g as contentLogMetadata, d as connectionState, A as ApiClient, e as readSettings, f as encodeBase64, l as logger, c as configuration } from './types-
|
|
7
|
-
import { A as AcpSessionManager } from './AcpSessionManager-
|
|
8
|
-
import { n as initialMachineMetadata, o as createSessionMetadata, u as setupOfflineReconnection, v as notifyDaemonSessionStarted, 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-gDOmwOKw.mjs';
|
|
7
|
+
import { A as AcpSessionManager } from './AcpSessionManager-p1tj7FxF.mjs';
|
|
8
|
+
import { n as initialMachineMetadata, o as createSessionMetadata, u as setupOfflineReconnection, v as notifyDaemonSessionStarted, y as MessageQueue2, C as registerKillSessionHandler } from './index-SQKnWyz-.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-CZIwVSN2.cjs');
|
|
9
|
+
var AcpSessionManager = require('./AcpSessionManager-BCWeBKDd.cjs');
|
|
10
|
+
var index = require('./index-DI_VC3vJ.cjs');
|
|
11
11
|
var WebSocket = require('ws');
|
|
12
12
|
var ed = require('@noble/ed25519');
|
|
13
13
|
var sha2_js = require('@noble/hashes/sha2.js');
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
var chalk = require('chalk');
|
|
4
4
|
var node_fs = require('node:fs');
|
|
5
5
|
var path = require('node:path');
|
|
6
|
-
var persistence = require('./types-
|
|
7
|
-
var index = require('./index-
|
|
6
|
+
var persistence = require('./types-CZIwVSN2.cjs');
|
|
7
|
+
var index = require('./index-DI_VC3vJ.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-gDOmwOKw.mjs';
|
|
5
|
+
import { d as sendUserMessage, a as sessionWebUrl } from './index-SQKnWyz-.mjs';
|
|
6
6
|
import 'axios';
|
|
7
7
|
import 'node:util';
|
|
8
8
|
import 'node:os';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chalk = require('chalk');
|
|
4
|
-
var index = require('./index-
|
|
5
|
-
var persistence = require('./types-
|
|
4
|
+
var index = require('./index-DI_VC3vJ.cjs');
|
|
5
|
+
var persistence = require('./types-CZIwVSN2.cjs');
|
|
6
6
|
require('node:os');
|
|
7
7
|
require('node:crypto');
|
|
8
8
|
require('cross-spawn');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
|
-
import { D as DEFAULT_RECENT_LIMIT, M as MAX_READ_LIMIT, l as listAccountSessions, e as listSessions, r as readSessionTranscript, f as stopSession, g as resolvePermissionRequest, h as archiveSession } from './index-
|
|
3
|
-
import { i as isValidSessionId } from './types-
|
|
2
|
+
import { D as DEFAULT_RECENT_LIMIT, M as MAX_READ_LIMIT, l as listAccountSessions, e as listSessions, r as readSessionTranscript, f as stopSession, g as resolvePermissionRequest, h as archiveSession } from './index-SQKnWyz-.mjs';
|
|
3
|
+
import { i as isValidSessionId } from './types-gDOmwOKw.mjs';
|
|
4
4
|
import 'node:os';
|
|
5
5
|
import 'node:crypto';
|
|
6
6
|
import 'cross-spawn';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
import { readFileSync, statSync } from 'node:fs';
|
|
3
3
|
import { resolve } from 'node:path';
|
|
4
|
-
import { c as checkIfDaemonRunningAndCleanupStaleState, s as spawnDaemonSession, a as sessionWebUrl, i as isValidSpawnOrigin, b as sanitizeSpawnPermissionMode, A as ALLOWED_SPAWN_PERMISSION_MODES, S as SPAWN_AGENTS, w as waitForSessionKey, d as sendUserMessage } from './index-
|
|
5
|
-
import { l as logger } from './types-
|
|
4
|
+
import { c as checkIfDaemonRunningAndCleanupStaleState, s as spawnDaemonSession, a as sessionWebUrl, i as isValidSpawnOrigin, b as sanitizeSpawnPermissionMode, A as ALLOWED_SPAWN_PERMISSION_MODES, S as SPAWN_AGENTS, w as waitForSessionKey, d as sendUserMessage } from './index-SQKnWyz-.mjs';
|
|
5
|
+
import { l as logger } from './types-gDOmwOKw.mjs';
|
|
6
6
|
import 'node:os';
|
|
7
7
|
import 'node:crypto';
|
|
8
8
|
import 'cross-spawn';
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
var chalk = require('chalk');
|
|
4
4
|
var node_fs = require('node:fs');
|
|
5
5
|
var path = require('node:path');
|
|
6
|
-
var index = require('./index-
|
|
7
|
-
var persistence = require('./types-
|
|
6
|
+
var index = require('./index-DI_VC3vJ.cjs');
|
|
7
|
+
var persistence = require('./types-CZIwVSN2.cjs');
|
|
8
8
|
require('node:os');
|
|
9
9
|
require('node:crypto');
|
|
10
10
|
require('cross-spawn');
|
|
@@ -51,7 +51,7 @@ var z__namespace = /*#__PURE__*/_interopNamespaceDefault(z);
|
|
|
51
51
|
var pty__namespace = /*#__PURE__*/_interopNamespaceDefault(pty);
|
|
52
52
|
|
|
53
53
|
var name = "very-happy-cli";
|
|
54
|
-
var version = "0.2.
|
|
54
|
+
var version = "0.2.124";
|
|
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.124",
|
|
168
|
+
"very-happy-tools-x64-darwin": "0.2.124",
|
|
169
|
+
"very-happy-tools-arm64-linux": "0.2.124",
|
|
170
|
+
"very-happy-tools-x64-linux": "0.2.124",
|
|
171
|
+
"very-happy-tools-arm64-win32": "0.2.124",
|
|
172
|
+
"very-happy-tools-x64-win32": "0.2.124"
|
|
173
173
|
};
|
|
174
174
|
var devDependencies = {
|
|
175
175
|
"@slopus/happy-wire": "workspace:*",
|
|
@@ -1708,7 +1708,7 @@ class RpcHandlerManager {
|
|
|
1708
1708
|
}
|
|
1709
1709
|
}
|
|
1710
1710
|
|
|
1711
|
-
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-
|
|
1711
|
+
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-CZIwVSN2.cjs', document.baseURI).href))));
|
|
1712
1712
|
function projectPath() {
|
|
1713
1713
|
const path = path$1.resolve(__dirname$1, "..");
|
|
1714
1714
|
return path;
|
|
@@ -13221,6 +13221,18 @@ function isUserPrompt(parsed) {
|
|
|
13221
13221
|
const content = parsed.message?.content;
|
|
13222
13222
|
return typeof content === "string";
|
|
13223
13223
|
}
|
|
13224
|
+
function hasPromptAttachments(parsed) {
|
|
13225
|
+
const content = parsed.message?.content;
|
|
13226
|
+
return typeof content === "string" && content.includes("<attached_files>") || Array.isArray(content) && content.some((block) => block?.type !== "text" || typeof block.text === "string" && block.text.includes("<attached_files>"));
|
|
13227
|
+
}
|
|
13228
|
+
function userPromptText(parsed) {
|
|
13229
|
+
if (parsed?.type !== "user" || parsed.isSidechain || parsed.isMeta || parsed.isSynthetic) return null;
|
|
13230
|
+
const content = parsed.message?.content;
|
|
13231
|
+
if (typeof content === "string") return content.trim() ? content : null;
|
|
13232
|
+
if (!Array.isArray(content) || content.some((block) => block?.type === "tool_result")) return null;
|
|
13233
|
+
const text = content.filter((block) => block?.type === "text" && typeof block.text === "string").map((block) => block.text).join("\n");
|
|
13234
|
+
return text.trim() ? text : null;
|
|
13235
|
+
}
|
|
13224
13236
|
async function discardForkedSession(projectDir, claudeSessionId) {
|
|
13225
13237
|
try {
|
|
13226
13238
|
await promises.unlink(jsonlPath(projectDir, claudeSessionId));
|
|
@@ -13320,23 +13332,68 @@ async function listClaudeRewindPoints(projectDir, claudeSessionId) {
|
|
|
13320
13332
|
} catch {
|
|
13321
13333
|
continue;
|
|
13322
13334
|
}
|
|
13323
|
-
|
|
13324
|
-
if (
|
|
13335
|
+
const content = userPromptText(parsed);
|
|
13336
|
+
if (content === null) continue;
|
|
13325
13337
|
if (typeof parsed.uuid !== "string" || parsed.uuid.length === 0) continue;
|
|
13326
|
-
const content = parsed.message?.content;
|
|
13327
|
-
if (typeof content !== "string") continue;
|
|
13328
|
-
const trimmed = content.trim();
|
|
13329
|
-
if (trimmed.length === 0) continue;
|
|
13330
13338
|
const timestampRaw = parsed.timestamp;
|
|
13331
13339
|
const timestamp = typeof timestampRaw === "string" ? Date.parse(timestampRaw) : typeof timestampRaw === "number" ? timestampRaw : Date.now();
|
|
13332
13340
|
points.push({
|
|
13333
13341
|
uuid: parsed.uuid,
|
|
13334
13342
|
text: content,
|
|
13343
|
+
...hasPromptAttachments(parsed) ? { hasAttachments: true } : {},
|
|
13335
13344
|
timestamp: Number.isFinite(timestamp) ? timestamp : Date.now()
|
|
13336
13345
|
});
|
|
13337
13346
|
}
|
|
13338
13347
|
return points;
|
|
13339
13348
|
}
|
|
13349
|
+
async function forkBeforeUserMessage(projectDir, sourceClaudeSessionId, cutBeforeUuid) {
|
|
13350
|
+
const src = jsonlPath(projectDir, sourceClaudeSessionId);
|
|
13351
|
+
let raw;
|
|
13352
|
+
try {
|
|
13353
|
+
raw = await promises.readFile(src, "utf-8");
|
|
13354
|
+
} catch (error) {
|
|
13355
|
+
if (error.code === "ENOENT") throw new ForkSourceMissingError(src);
|
|
13356
|
+
throw error;
|
|
13357
|
+
}
|
|
13358
|
+
const lines = raw.split("\n");
|
|
13359
|
+
let hasPreviousConversation = false;
|
|
13360
|
+
let hasPreviousPrompt = false;
|
|
13361
|
+
let cut = -1;
|
|
13362
|
+
for (let i = 0; i < lines.length; i++) {
|
|
13363
|
+
let entry;
|
|
13364
|
+
try {
|
|
13365
|
+
entry = JSON.parse(lines[i]);
|
|
13366
|
+
} catch {
|
|
13367
|
+
continue;
|
|
13368
|
+
}
|
|
13369
|
+
if (userPromptText(entry) !== null && entry.uuid === cutBeforeUuid) {
|
|
13370
|
+
if (hasPromptAttachments(entry)) throw new Error("Cannot edit and rerun a message with attachments");
|
|
13371
|
+
cut = i;
|
|
13372
|
+
break;
|
|
13373
|
+
}
|
|
13374
|
+
if (!entry?.isSidechain && !entry?.isMeta && !entry?.isSynthetic && (entry?.type === "user" || entry?.type === "assistant")) {
|
|
13375
|
+
hasPreviousConversation = true;
|
|
13376
|
+
const content = entry.message?.content;
|
|
13377
|
+
if (entry.type === "user" && (typeof content === "string" || Array.isArray(content) && content.length > 0 && !content.some((block) => block?.type === "tool_result"))) {
|
|
13378
|
+
hasPreviousPrompt = true;
|
|
13379
|
+
}
|
|
13380
|
+
}
|
|
13381
|
+
}
|
|
13382
|
+
if (cut < 0) throw new ForkTruncateUuidNotFoundError(cutBeforeUuid, src);
|
|
13383
|
+
if (!hasPreviousConversation) return null;
|
|
13384
|
+
if (!hasPreviousPrompt) throw new Error("Cannot safely rewind: earlier history has no user prompt");
|
|
13385
|
+
const newId = node_crypto.randomUUID();
|
|
13386
|
+
const destination = jsonlPath(projectDir, newId);
|
|
13387
|
+
const temporary = `${destination}.tmp-${process.pid}`;
|
|
13388
|
+
try {
|
|
13389
|
+
await promises.writeFile(temporary, lines.slice(0, cut).join("\n") + "\n", { encoding: "utf-8", flag: "wx" });
|
|
13390
|
+
await promises.rename(temporary, destination);
|
|
13391
|
+
} catch (error) {
|
|
13392
|
+
await promises.unlink(temporary).catch(() => void 0);
|
|
13393
|
+
throw error;
|
|
13394
|
+
}
|
|
13395
|
+
return newId;
|
|
13396
|
+
}
|
|
13340
13397
|
|
|
13341
13398
|
function serializedByteLength(value) {
|
|
13342
13399
|
try {
|
|
@@ -14613,6 +14670,14 @@ class CodexForkRewindPointNotFoundError extends Error {
|
|
|
14613
14670
|
this.name = "CodexForkRewindPointNotFoundError";
|
|
14614
14671
|
}
|
|
14615
14672
|
}
|
|
14673
|
+
function hasUserAttachments(item) {
|
|
14674
|
+
const content = item.content;
|
|
14675
|
+
return Array.isArray(content) && content.some((part) => !part || typeof part !== "object" || part.type !== "text" || typeof part.text === "string" && part.text.includes("<attached_files>"));
|
|
14676
|
+
}
|
|
14677
|
+
function rejectAttachedTarget(thread, itemId) {
|
|
14678
|
+
const item = thread.turns?.flatMap((turn) => turn.items ?? []).find((item2) => item2.id === itemId);
|
|
14679
|
+
if (item && hasUserAttachments(item)) throw new Error("Cannot edit and rerun a message with attachments");
|
|
14680
|
+
}
|
|
14616
14681
|
function textFromUserItem(item) {
|
|
14617
14682
|
if (item.type !== "userMessage") {
|
|
14618
14683
|
return null;
|
|
@@ -14639,6 +14704,7 @@ function listCodexRewindPoints(thread) {
|
|
|
14639
14704
|
points.push({
|
|
14640
14705
|
itemId: item.id,
|
|
14641
14706
|
text,
|
|
14707
|
+
...hasUserAttachments(item) ? { hasAttachments: true } : {},
|
|
14642
14708
|
timestamp: timestampFromTurn(turn)
|
|
14643
14709
|
});
|
|
14644
14710
|
}
|
|
@@ -14696,6 +14762,37 @@ async function forkCodexThread(client, opts) {
|
|
|
14696
14762
|
newCodexThreadId: forked.threadId
|
|
14697
14763
|
};
|
|
14698
14764
|
}
|
|
14765
|
+
async function forkCodexBeforeUserMessage(client, opts) {
|
|
14766
|
+
const { thread: source } = await client.readThread({ threadId: opts.threadId, includeTurns: true });
|
|
14767
|
+
rejectAttachedTarget(source, opts.cutBeforeItemId);
|
|
14768
|
+
const sourceCut = findCutTurn(source, opts.cutBeforeItemId);
|
|
14769
|
+
if (!sourceCut) throw new CodexForkRewindPointNotFoundError(opts.cutBeforeItemId, opts.threadId);
|
|
14770
|
+
if ((source.turns?.[sourceCut.index].items ?? []).findIndex((item) => item.id === opts.cutBeforeItemId) !== 0) {
|
|
14771
|
+
throw new Error("Cannot safely rewind a user message inside an existing turn");
|
|
14772
|
+
}
|
|
14773
|
+
if (sourceCut.index === 0) return { type: "success", startFresh: true };
|
|
14774
|
+
const forked = await client.forkThread({ threadId: opts.threadId, cwd: opts.cwd });
|
|
14775
|
+
if (forked.threadId === opts.threadId) throw new Error("Codex did not create an independent fork");
|
|
14776
|
+
rejectAttachedTarget(forked.thread, opts.cutBeforeItemId);
|
|
14777
|
+
const cut = findCutTurn(forked.thread, opts.cutBeforeItemId);
|
|
14778
|
+
if (!cut) throw new CodexForkRewindPointNotFoundError(opts.cutBeforeItemId, opts.threadId);
|
|
14779
|
+
const turns = forked.thread.turns ?? [];
|
|
14780
|
+
const items = turns[cut.index].items ?? [];
|
|
14781
|
+
if (items.findIndex((item) => item.id === opts.cutBeforeItemId) !== 0) {
|
|
14782
|
+
throw new Error("Cannot safely rewind a user message inside an existing turn");
|
|
14783
|
+
}
|
|
14784
|
+
if (cut.index === 0) return { type: "success", startFresh: true };
|
|
14785
|
+
const expectedTurnIds = turns.slice(0, cut.index).map((turn) => turn.id);
|
|
14786
|
+
const { thread } = await client.rollbackThread({
|
|
14787
|
+
threadId: forked.threadId,
|
|
14788
|
+
numTurns: turns.length - cut.index
|
|
14789
|
+
});
|
|
14790
|
+
const remaining = thread.turns ?? [];
|
|
14791
|
+
if (remaining.length !== cut.index || remaining.some((turn, index) => turn.id !== expectedTurnIds[index])) {
|
|
14792
|
+
throw new Error("Codex rollback did not preserve the expected history");
|
|
14793
|
+
}
|
|
14794
|
+
return { type: "success", newCodexThreadId: forked.threadId };
|
|
14795
|
+
}
|
|
14699
14796
|
|
|
14700
14797
|
const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
14701
14798
|
function requireNonEmptyString(value, name) {
|
|
@@ -15200,6 +15297,26 @@ class ApiMachineClient {
|
|
|
15200
15297
|
throw error;
|
|
15201
15298
|
}
|
|
15202
15299
|
});
|
|
15300
|
+
this.rpcHandlerManager.registerHandler("claude-rewind-before-message", async (params) => {
|
|
15301
|
+
const directory = requireNonEmptyString(params?.directory, "directory");
|
|
15302
|
+
const claudeSessionId = requireNonEmptyString(params?.claudeSessionId, "claudeSessionId");
|
|
15303
|
+
const cutBeforeUuid = requireNonEmptyString(params?.cutBeforeUuid, "cutBeforeUuid");
|
|
15304
|
+
if (!UUID_RE.test(claudeSessionId) || !UUID_RE.test(cutBeforeUuid)) {
|
|
15305
|
+
throw new Error("claudeSessionId and cutBeforeUuid must be valid UUIDs");
|
|
15306
|
+
}
|
|
15307
|
+
const newClaudeSessionId = await forkBeforeUserMessage(getProjectPath(directory), claudeSessionId, cutBeforeUuid);
|
|
15308
|
+
return newClaudeSessionId === null ? { type: "success", startFresh: true } : { type: "success", newClaudeSessionId };
|
|
15309
|
+
});
|
|
15310
|
+
this.rpcHandlerManager.registerHandler("codex-rewind-before-message", async (params) => {
|
|
15311
|
+
const directory = requireNonEmptyString(params?.directory, "directory");
|
|
15312
|
+
const codexThreadId = requireNonEmptyString(params?.codexThreadId, "codexThreadId");
|
|
15313
|
+
const cutBeforeItemId = requireNonEmptyString(params?.cutBeforeItemId, "cutBeforeItemId");
|
|
15314
|
+
return withCodexAppServerClient((client) => forkCodexBeforeUserMessage(client, {
|
|
15315
|
+
threadId: codexThreadId,
|
|
15316
|
+
cwd: directory,
|
|
15317
|
+
cutBeforeItemId
|
|
15318
|
+
}));
|
|
15319
|
+
});
|
|
15203
15320
|
this.rpcHandlerManager.registerHandler("stop-daemon", () => {
|
|
15204
15321
|
logger.debug("[API MACHINE] Received stop-daemon RPC request");
|
|
15205
15322
|
setTimeout(() => {
|
|
@@ -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.124";
|
|
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.124",
|
|
146
|
+
"very-happy-tools-x64-darwin": "0.2.124",
|
|
147
|
+
"very-happy-tools-arm64-linux": "0.2.124",
|
|
148
|
+
"very-happy-tools-x64-linux": "0.2.124",
|
|
149
|
+
"very-happy-tools-arm64-win32": "0.2.124",
|
|
150
|
+
"very-happy-tools-x64-win32": "0.2.124"
|
|
151
151
|
};
|
|
152
152
|
var devDependencies = {
|
|
153
153
|
"@slopus/happy-wire": "workspace:*",
|
|
@@ -13199,6 +13199,18 @@ function isUserPrompt(parsed) {
|
|
|
13199
13199
|
const content = parsed.message?.content;
|
|
13200
13200
|
return typeof content === "string";
|
|
13201
13201
|
}
|
|
13202
|
+
function hasPromptAttachments(parsed) {
|
|
13203
|
+
const content = parsed.message?.content;
|
|
13204
|
+
return typeof content === "string" && content.includes("<attached_files>") || Array.isArray(content) && content.some((block) => block?.type !== "text" || typeof block.text === "string" && block.text.includes("<attached_files>"));
|
|
13205
|
+
}
|
|
13206
|
+
function userPromptText(parsed) {
|
|
13207
|
+
if (parsed?.type !== "user" || parsed.isSidechain || parsed.isMeta || parsed.isSynthetic) return null;
|
|
13208
|
+
const content = parsed.message?.content;
|
|
13209
|
+
if (typeof content === "string") return content.trim() ? content : null;
|
|
13210
|
+
if (!Array.isArray(content) || content.some((block) => block?.type === "tool_result")) return null;
|
|
13211
|
+
const text = content.filter((block) => block?.type === "text" && typeof block.text === "string").map((block) => block.text).join("\n");
|
|
13212
|
+
return text.trim() ? text : null;
|
|
13213
|
+
}
|
|
13202
13214
|
async function discardForkedSession(projectDir, claudeSessionId) {
|
|
13203
13215
|
try {
|
|
13204
13216
|
await unlink$1(jsonlPath(projectDir, claudeSessionId));
|
|
@@ -13298,23 +13310,68 @@ async function listClaudeRewindPoints(projectDir, claudeSessionId) {
|
|
|
13298
13310
|
} catch {
|
|
13299
13311
|
continue;
|
|
13300
13312
|
}
|
|
13301
|
-
|
|
13302
|
-
if (
|
|
13313
|
+
const content = userPromptText(parsed);
|
|
13314
|
+
if (content === null) continue;
|
|
13303
13315
|
if (typeof parsed.uuid !== "string" || parsed.uuid.length === 0) continue;
|
|
13304
|
-
const content = parsed.message?.content;
|
|
13305
|
-
if (typeof content !== "string") continue;
|
|
13306
|
-
const trimmed = content.trim();
|
|
13307
|
-
if (trimmed.length === 0) continue;
|
|
13308
13316
|
const timestampRaw = parsed.timestamp;
|
|
13309
13317
|
const timestamp = typeof timestampRaw === "string" ? Date.parse(timestampRaw) : typeof timestampRaw === "number" ? timestampRaw : Date.now();
|
|
13310
13318
|
points.push({
|
|
13311
13319
|
uuid: parsed.uuid,
|
|
13312
13320
|
text: content,
|
|
13321
|
+
...hasPromptAttachments(parsed) ? { hasAttachments: true } : {},
|
|
13313
13322
|
timestamp: Number.isFinite(timestamp) ? timestamp : Date.now()
|
|
13314
13323
|
});
|
|
13315
13324
|
}
|
|
13316
13325
|
return points;
|
|
13317
13326
|
}
|
|
13327
|
+
async function forkBeforeUserMessage(projectDir, sourceClaudeSessionId, cutBeforeUuid) {
|
|
13328
|
+
const src = jsonlPath(projectDir, sourceClaudeSessionId);
|
|
13329
|
+
let raw;
|
|
13330
|
+
try {
|
|
13331
|
+
raw = await readFile$1(src, "utf-8");
|
|
13332
|
+
} catch (error) {
|
|
13333
|
+
if (error.code === "ENOENT") throw new ForkSourceMissingError(src);
|
|
13334
|
+
throw error;
|
|
13335
|
+
}
|
|
13336
|
+
const lines = raw.split("\n");
|
|
13337
|
+
let hasPreviousConversation = false;
|
|
13338
|
+
let hasPreviousPrompt = false;
|
|
13339
|
+
let cut = -1;
|
|
13340
|
+
for (let i = 0; i < lines.length; i++) {
|
|
13341
|
+
let entry;
|
|
13342
|
+
try {
|
|
13343
|
+
entry = JSON.parse(lines[i]);
|
|
13344
|
+
} catch {
|
|
13345
|
+
continue;
|
|
13346
|
+
}
|
|
13347
|
+
if (userPromptText(entry) !== null && entry.uuid === cutBeforeUuid) {
|
|
13348
|
+
if (hasPromptAttachments(entry)) throw new Error("Cannot edit and rerun a message with attachments");
|
|
13349
|
+
cut = i;
|
|
13350
|
+
break;
|
|
13351
|
+
}
|
|
13352
|
+
if (!entry?.isSidechain && !entry?.isMeta && !entry?.isSynthetic && (entry?.type === "user" || entry?.type === "assistant")) {
|
|
13353
|
+
hasPreviousConversation = true;
|
|
13354
|
+
const content = entry.message?.content;
|
|
13355
|
+
if (entry.type === "user" && (typeof content === "string" || Array.isArray(content) && content.length > 0 && !content.some((block) => block?.type === "tool_result"))) {
|
|
13356
|
+
hasPreviousPrompt = true;
|
|
13357
|
+
}
|
|
13358
|
+
}
|
|
13359
|
+
}
|
|
13360
|
+
if (cut < 0) throw new ForkTruncateUuidNotFoundError(cutBeforeUuid, src);
|
|
13361
|
+
if (!hasPreviousConversation) return null;
|
|
13362
|
+
if (!hasPreviousPrompt) throw new Error("Cannot safely rewind: earlier history has no user prompt");
|
|
13363
|
+
const newId = randomUUID$1();
|
|
13364
|
+
const destination = jsonlPath(projectDir, newId);
|
|
13365
|
+
const temporary = `${destination}.tmp-${process.pid}`;
|
|
13366
|
+
try {
|
|
13367
|
+
await writeFile(temporary, lines.slice(0, cut).join("\n") + "\n", { encoding: "utf-8", flag: "wx" });
|
|
13368
|
+
await rename$1(temporary, destination);
|
|
13369
|
+
} catch (error) {
|
|
13370
|
+
await unlink$1(temporary).catch(() => void 0);
|
|
13371
|
+
throw error;
|
|
13372
|
+
}
|
|
13373
|
+
return newId;
|
|
13374
|
+
}
|
|
13318
13375
|
|
|
13319
13376
|
function serializedByteLength(value) {
|
|
13320
13377
|
try {
|
|
@@ -14591,6 +14648,14 @@ class CodexForkRewindPointNotFoundError extends Error {
|
|
|
14591
14648
|
this.name = "CodexForkRewindPointNotFoundError";
|
|
14592
14649
|
}
|
|
14593
14650
|
}
|
|
14651
|
+
function hasUserAttachments(item) {
|
|
14652
|
+
const content = item.content;
|
|
14653
|
+
return Array.isArray(content) && content.some((part) => !part || typeof part !== "object" || part.type !== "text" || typeof part.text === "string" && part.text.includes("<attached_files>"));
|
|
14654
|
+
}
|
|
14655
|
+
function rejectAttachedTarget(thread, itemId) {
|
|
14656
|
+
const item = thread.turns?.flatMap((turn) => turn.items ?? []).find((item2) => item2.id === itemId);
|
|
14657
|
+
if (item && hasUserAttachments(item)) throw new Error("Cannot edit and rerun a message with attachments");
|
|
14658
|
+
}
|
|
14594
14659
|
function textFromUserItem(item) {
|
|
14595
14660
|
if (item.type !== "userMessage") {
|
|
14596
14661
|
return null;
|
|
@@ -14617,6 +14682,7 @@ function listCodexRewindPoints(thread) {
|
|
|
14617
14682
|
points.push({
|
|
14618
14683
|
itemId: item.id,
|
|
14619
14684
|
text,
|
|
14685
|
+
...hasUserAttachments(item) ? { hasAttachments: true } : {},
|
|
14620
14686
|
timestamp: timestampFromTurn(turn)
|
|
14621
14687
|
});
|
|
14622
14688
|
}
|
|
@@ -14674,6 +14740,37 @@ async function forkCodexThread(client, opts) {
|
|
|
14674
14740
|
newCodexThreadId: forked.threadId
|
|
14675
14741
|
};
|
|
14676
14742
|
}
|
|
14743
|
+
async function forkCodexBeforeUserMessage(client, opts) {
|
|
14744
|
+
const { thread: source } = await client.readThread({ threadId: opts.threadId, includeTurns: true });
|
|
14745
|
+
rejectAttachedTarget(source, opts.cutBeforeItemId);
|
|
14746
|
+
const sourceCut = findCutTurn(source, opts.cutBeforeItemId);
|
|
14747
|
+
if (!sourceCut) throw new CodexForkRewindPointNotFoundError(opts.cutBeforeItemId, opts.threadId);
|
|
14748
|
+
if ((source.turns?.[sourceCut.index].items ?? []).findIndex((item) => item.id === opts.cutBeforeItemId) !== 0) {
|
|
14749
|
+
throw new Error("Cannot safely rewind a user message inside an existing turn");
|
|
14750
|
+
}
|
|
14751
|
+
if (sourceCut.index === 0) return { type: "success", startFresh: true };
|
|
14752
|
+
const forked = await client.forkThread({ threadId: opts.threadId, cwd: opts.cwd });
|
|
14753
|
+
if (forked.threadId === opts.threadId) throw new Error("Codex did not create an independent fork");
|
|
14754
|
+
rejectAttachedTarget(forked.thread, opts.cutBeforeItemId);
|
|
14755
|
+
const cut = findCutTurn(forked.thread, opts.cutBeforeItemId);
|
|
14756
|
+
if (!cut) throw new CodexForkRewindPointNotFoundError(opts.cutBeforeItemId, opts.threadId);
|
|
14757
|
+
const turns = forked.thread.turns ?? [];
|
|
14758
|
+
const items = turns[cut.index].items ?? [];
|
|
14759
|
+
if (items.findIndex((item) => item.id === opts.cutBeforeItemId) !== 0) {
|
|
14760
|
+
throw new Error("Cannot safely rewind a user message inside an existing turn");
|
|
14761
|
+
}
|
|
14762
|
+
if (cut.index === 0) return { type: "success", startFresh: true };
|
|
14763
|
+
const expectedTurnIds = turns.slice(0, cut.index).map((turn) => turn.id);
|
|
14764
|
+
const { thread } = await client.rollbackThread({
|
|
14765
|
+
threadId: forked.threadId,
|
|
14766
|
+
numTurns: turns.length - cut.index
|
|
14767
|
+
});
|
|
14768
|
+
const remaining = thread.turns ?? [];
|
|
14769
|
+
if (remaining.length !== cut.index || remaining.some((turn, index) => turn.id !== expectedTurnIds[index])) {
|
|
14770
|
+
throw new Error("Codex rollback did not preserve the expected history");
|
|
14771
|
+
}
|
|
14772
|
+
return { type: "success", newCodexThreadId: forked.threadId };
|
|
14773
|
+
}
|
|
14677
14774
|
|
|
14678
14775
|
const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
14679
14776
|
function requireNonEmptyString(value, name) {
|
|
@@ -15178,6 +15275,26 @@ class ApiMachineClient {
|
|
|
15178
15275
|
throw error;
|
|
15179
15276
|
}
|
|
15180
15277
|
});
|
|
15278
|
+
this.rpcHandlerManager.registerHandler("claude-rewind-before-message", async (params) => {
|
|
15279
|
+
const directory = requireNonEmptyString(params?.directory, "directory");
|
|
15280
|
+
const claudeSessionId = requireNonEmptyString(params?.claudeSessionId, "claudeSessionId");
|
|
15281
|
+
const cutBeforeUuid = requireNonEmptyString(params?.cutBeforeUuid, "cutBeforeUuid");
|
|
15282
|
+
if (!UUID_RE.test(claudeSessionId) || !UUID_RE.test(cutBeforeUuid)) {
|
|
15283
|
+
throw new Error("claudeSessionId and cutBeforeUuid must be valid UUIDs");
|
|
15284
|
+
}
|
|
15285
|
+
const newClaudeSessionId = await forkBeforeUserMessage(getProjectPath(directory), claudeSessionId, cutBeforeUuid);
|
|
15286
|
+
return newClaudeSessionId === null ? { type: "success", startFresh: true } : { type: "success", newClaudeSessionId };
|
|
15287
|
+
});
|
|
15288
|
+
this.rpcHandlerManager.registerHandler("codex-rewind-before-message", async (params) => {
|
|
15289
|
+
const directory = requireNonEmptyString(params?.directory, "directory");
|
|
15290
|
+
const codexThreadId = requireNonEmptyString(params?.codexThreadId, "codexThreadId");
|
|
15291
|
+
const cutBeforeItemId = requireNonEmptyString(params?.cutBeforeItemId, "cutBeforeItemId");
|
|
15292
|
+
return withCodexAppServerClient((client) => forkCodexBeforeUserMessage(client, {
|
|
15293
|
+
threadId: codexThreadId,
|
|
15294
|
+
cwd: directory,
|
|
15295
|
+
cutBeforeItemId
|
|
15296
|
+
}));
|
|
15297
|
+
});
|
|
15181
15298
|
this.rpcHandlerManager.registerHandler("stop-daemon", () => {
|
|
15182
15299
|
logger.debug("[API MACHINE] Received stop-daemon RPC request");
|
|
15183
15300
|
setTimeout(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "very-happy-cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.124",
|
|
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.124",
|
|
117
|
+
"very-happy-tools-x64-darwin": "0.2.124",
|
|
118
|
+
"very-happy-tools-arm64-linux": "0.2.124",
|
|
119
|
+
"very-happy-tools-x64-linux": "0.2.124",
|
|
120
|
+
"very-happy-tools-arm64-win32": "0.2.124",
|
|
121
|
+
"very-happy-tools-x64-win32": "0.2.124"
|
|
122
122
|
},
|
|
123
123
|
"devDependencies": {
|
|
124
124
|
"@slopus/happy-wire": "workspace:*",
|