very-happy-cli 0.2.133 → 0.2.134
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-BQm7dNza.mjs → AcpBackend-B8KEjDwF.mjs} +3 -3
- package/dist/{AcpBackend-DgG8o4jd.cjs → AcpBackend-CeNp7tgD.cjs} +3 -3
- package/dist/{AcpSessionManager-DDFEmhQp.cjs → AcpSessionManager-Bu1d05bx.cjs} +1 -1
- package/dist/{AcpSessionManager-C7unPEZO.mjs → AcpSessionManager-KlDZbEmZ.mjs} +1 -1
- package/dist/{agentGuidance-BaplwDcV.mjs → agentGuidance-CPG5Cr5T.mjs} +1 -1
- package/dist/{agentGuidance-BItqIZTf.cjs → agentGuidance-Cg8Lha39.cjs} +1 -1
- package/dist/codex/happyMcpStdioBridge.cjs +2 -2
- package/dist/codex/happyMcpStdioBridge.mjs +2 -2
- package/dist/{config-uLywzv5t.cjs → config-C3e90AIH.cjs} +4 -4
- package/dist/{config-BZ8xEnOv.mjs → config-C4gWfnJX.mjs} +4 -4
- package/dist/{index-6Xm0CgN_.cjs → index-B1plzL9M.cjs} +37 -25
- package/dist/{index-ClCeQ1FW.mjs → index-B6UvB88K.mjs} +16 -10
- package/dist/{index-EsR8ayIg.mjs → index-BqUOj1zK.mjs} +33 -21
- package/dist/{index-D8i2EViA.mjs → index-CEDPokKf.mjs} +4 -4
- package/dist/{index-CdH3ecC5.cjs → index-CX-zp3FH.cjs} +4 -4
- package/dist/{index-Daga0ztv.cjs → index-jqG8CV0c.cjs} +15 -9
- package/dist/index.cjs +4 -4
- package/dist/index.mjs +4 -4
- package/dist/{installTerminalHooks-NH4kiB2E.mjs → installTerminalHooks-BT4Dq28Y.mjs} +4 -4
- package/dist/{installTerminalHooks-CKG0MYVK.cjs → installTerminalHooks-DPmEaHg2.cjs} +4 -4
- package/dist/lib.cjs +2 -2
- package/dist/lib.d.cts +6 -60
- package/dist/lib.d.mts +6 -60
- package/dist/lib.mjs +2 -2
- package/dist/{limits-Du7S6jqA.mjs → limits-BGeIBBE3.mjs} +7 -7
- package/dist/{limits-XRNzIlVm.cjs → limits-D6kiAfXJ.cjs} +7 -7
- package/dist/{mcp-D8zhjyZa.mjs → mcp-BGu_dUaJ.mjs} +4 -4
- package/dist/{mcp-CAMCuudA.cjs → mcp-DGZmUpuZ.cjs} +4 -4
- package/dist/{runGemini-BIVHp0ST.cjs → runGemini-BPPnulIk.cjs} +6 -6
- package/dist/{runGemini-Db4rX54F.mjs → runGemini-DGTNwiLo.mjs} +6 -6
- package/dist/{runOpenClaw-a0f2pZZp.cjs → runOpenClaw-BB3Ivt1S.cjs} +5 -5
- package/dist/{runOpenClaw-D2MceXPO.mjs → runOpenClaw-CxgTFOSM.mjs} +5 -5
- package/dist/{send-DKbumEcg.cjs → send-Bo6iKuXr.cjs} +4 -4
- package/dist/{send-1Wjb0lIh.mjs → send-DHShoBeq.mjs} +4 -4
- package/dist/{sessions-DXCCRDb5.mjs → sessions-CJuwvEr0.mjs} +4 -4
- package/dist/{sessions-SIFOOlGp.cjs → sessions-DyC5Attg.cjs} +4 -4
- package/dist/{spawn-Bj3W6HR4.mjs → spawn-QtKlr8Ig.mjs} +4 -4
- package/dist/{spawn-C-XpSPLX.cjs → spawn-gha6nGx-.cjs} +4 -4
- package/dist/{teams-CqhFQLVC.mjs → teams-BF-GxUZc.mjs} +4 -4
- package/dist/{teams-ChFzXAqr.cjs → teams-BbzWNV9e.cjs} +4 -4
- package/dist/{todo-o0clp-_I.cjs → todo-BaNaNZ8c.cjs} +3 -3
- package/dist/{todo-B0gbQHH8.mjs → todo-CkJ5UjWs.mjs} +3 -3
- package/dist/{types-6DrEgHVx.mjs → types-Cq-tvv9t.mjs} +84 -27
- package/dist/{types-CcjVmS2i.cjs → types-Dabm17Ln.cjs} +85 -28
- package/package.json +7 -7
|
@@ -1,8 +1,8 @@
|
|
|
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, p as packageJson } from './limits-
|
|
5
|
-
import { d as contentLogMetadata, e as errorLogMetadata, h as delay } from './types-
|
|
4
|
+
import { l as logger, p as packageJson } from './limits-BGeIBBE3.mjs';
|
|
5
|
+
import { d as contentLogMetadata, e as errorLogMetadata, h as delay } from './types-Cq-tvv9t.mjs';
|
|
6
6
|
|
|
7
7
|
function acpImageBlocks(attachments, supportsImages) {
|
|
8
8
|
return attachments.filter((file) => ["image/jpeg", "image/png", "image/gif", "image/webp"].includes(file.mimeType)).map((file) => {
|
|
@@ -1357,7 +1357,7 @@ class AcpBackend {
|
|
|
1357
1357
|
}
|
|
1358
1358
|
try {
|
|
1359
1359
|
await this.connection.cancel({ sessionId: this.acpSessionId });
|
|
1360
|
-
this.emit({ type: "status", status: "
|
|
1360
|
+
this.emit({ type: "status", status: "idle", detail: "Cancelled by user" });
|
|
1361
1361
|
} catch (error) {
|
|
1362
1362
|
logger.debug("[AcpBackend] Error cancelling:", errorLogMetadata(error));
|
|
1363
1363
|
}
|
|
@@ -3,8 +3,8 @@
|
|
|
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('./limits-
|
|
7
|
-
var api = require('./types-
|
|
6
|
+
var persistence = require('./limits-D6kiAfXJ.cjs');
|
|
7
|
+
var api = require('./types-Dabm17Ln.cjs');
|
|
8
8
|
|
|
9
9
|
function acpImageBlocks(attachments, supportsImages) {
|
|
10
10
|
return attachments.filter((file) => ["image/jpeg", "image/png", "image/gif", "image/webp"].includes(file.mimeType)).map((file) => {
|
|
@@ -1359,7 +1359,7 @@ class AcpBackend {
|
|
|
1359
1359
|
}
|
|
1360
1360
|
try {
|
|
1361
1361
|
await this.connection.cancel({ sessionId: this.acpSessionId });
|
|
1362
|
-
this.emit({ type: "status", status: "
|
|
1362
|
+
this.emit({ type: "status", status: "idle", detail: "Cancelled by user" });
|
|
1363
1363
|
} catch (error) {
|
|
1364
1364
|
persistence.logger.debug("[AcpBackend] Error cancelling:", api.errorLogMetadata(error));
|
|
1365
1365
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createId } from '@paralleldrive/cuid2';
|
|
2
|
-
import { s as streamKeyOf, c as createEnvelope } from './types-
|
|
2
|
+
import { s as streamKeyOf, c as createEnvelope } from './types-Cq-tvv9t.mjs';
|
|
3
3
|
|
|
4
4
|
function turnOptions(turnId, time) {
|
|
5
5
|
return turnId ? { turn: turnId, time } : { time };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { randomUUID } from 'node:crypto';
|
|
3
|
-
import { n as normalizeHttpEndpoint, c as configuration, g as readSettings, r as readPersistedSessions, d as readCredentialsForConfiguredRelay } from './limits-
|
|
3
|
+
import { n as normalizeHttpEndpoint, c as configuration, g as readSettings, r as readPersistedSessions, d as readCredentialsForConfiguredRelay } from './limits-BGeIBBE3.mjs';
|
|
4
4
|
import { open, mkdir, rename, unlink } from 'node:fs/promises';
|
|
5
5
|
import { constants } from 'node:fs';
|
|
6
6
|
import { isAbsolute, join, dirname } from 'node:path';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var z = require('zod');
|
|
4
4
|
var node_crypto = require('node:crypto');
|
|
5
|
-
var persistence = require('./limits-
|
|
5
|
+
var persistence = require('./limits-D6kiAfXJ.cjs');
|
|
6
6
|
var promises = require('node:fs/promises');
|
|
7
7
|
var node_fs = require('node:fs');
|
|
8
8
|
var path = require('node:path');
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var agentGuidance = require('../agentGuidance-
|
|
3
|
+
var agentGuidance = require('../agentGuidance-Cg8Lha39.cjs');
|
|
4
4
|
var mcp_js = require('@modelcontextprotocol/sdk/server/mcp.js');
|
|
5
5
|
var stdio_js = require('@modelcontextprotocol/sdk/server/stdio.js');
|
|
6
6
|
var index_js = require('@modelcontextprotocol/sdk/client/index.js');
|
|
7
7
|
var streamableHttp_js = require('@modelcontextprotocol/sdk/client/streamableHttp.js');
|
|
8
8
|
var z = require('zod');
|
|
9
|
-
var persistence = require('../limits-
|
|
9
|
+
var persistence = require('../limits-D6kiAfXJ.cjs');
|
|
10
10
|
require('node:crypto');
|
|
11
11
|
require('node:fs/promises');
|
|
12
12
|
require('node:fs');
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { P as PREVIEW_TOOL_NAME, a as PREVIEW_TOOL_TITLE, b as PREVIEW_TOOL_DESCRIPTION, r as registerTeamsTools } from '../agentGuidance-
|
|
1
|
+
import { P as PREVIEW_TOOL_NAME, a as PREVIEW_TOOL_TITLE, b as PREVIEW_TOOL_DESCRIPTION, r as registerTeamsTools } from '../agentGuidance-CPG5Cr5T.mjs';
|
|
2
2
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
3
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
4
4
|
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
5
5
|
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
6
6
|
import { z } from 'zod';
|
|
7
|
-
import { C as CLIPBOARD_TOOL_NAME, a as CLIPBOARD_TOOL_TITLE, b as CLIPBOARD_TOOL_DESCRIPTION } from '../limits-
|
|
7
|
+
import { C as CLIPBOARD_TOOL_NAME, a as CLIPBOARD_TOOL_TITLE, b as CLIPBOARD_TOOL_DESCRIPTION } from '../limits-BGeIBBE3.mjs';
|
|
8
8
|
import 'node:crypto';
|
|
9
9
|
import 'node:fs/promises';
|
|
10
10
|
import 'node:fs';
|
|
@@ -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('./limits-
|
|
8
|
-
var index = require('./index-
|
|
7
|
+
var persistence = require('./limits-D6kiAfXJ.cjs');
|
|
8
|
+
var index = require('./index-B1plzL9M.cjs');
|
|
9
9
|
require('node:fs/promises');
|
|
10
10
|
require('node:fs');
|
|
11
11
|
require('node:os');
|
|
@@ -15,7 +15,7 @@ require('node:crypto');
|
|
|
15
15
|
require('tweetnacl');
|
|
16
16
|
require('chalk');
|
|
17
17
|
require('node:util');
|
|
18
|
-
require('./types-
|
|
18
|
+
require('./types-Dabm17Ln.cjs');
|
|
19
19
|
require('axios');
|
|
20
20
|
require('node:events');
|
|
21
21
|
require('socket.io-client');
|
|
@@ -30,7 +30,7 @@ require('node-pty');
|
|
|
30
30
|
require('node:readline');
|
|
31
31
|
require('@anthropic-ai/sandbox-runtime');
|
|
32
32
|
require('expo-server-sdk');
|
|
33
|
-
require('./agentGuidance-
|
|
33
|
+
require('./agentGuidance-Cg8Lha39.cjs');
|
|
34
34
|
require('ink');
|
|
35
35
|
require('react');
|
|
36
36
|
require('@anthropic-ai/claude-agent-sdk');
|
|
@@ -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 './limits-
|
|
6
|
-
import { j as DEFAULT_GEMINI_MODEL, G as GEMINI_MODEL_ENV } from './index-
|
|
5
|
+
import { l as logger } from './limits-BGeIBBE3.mjs';
|
|
6
|
+
import { j as DEFAULT_GEMINI_MODEL, G as GEMINI_MODEL_ENV } from './index-BqUOj1zK.mjs';
|
|
7
7
|
import 'node:fs/promises';
|
|
8
8
|
import 'node:fs';
|
|
9
9
|
import 'node:os';
|
|
@@ -13,7 +13,7 @@ import 'node:crypto';
|
|
|
13
13
|
import 'tweetnacl';
|
|
14
14
|
import 'chalk';
|
|
15
15
|
import 'node:util';
|
|
16
|
-
import './types-
|
|
16
|
+
import './types-Cq-tvv9t.mjs';
|
|
17
17
|
import 'axios';
|
|
18
18
|
import 'node:events';
|
|
19
19
|
import 'socket.io-client';
|
|
@@ -28,7 +28,7 @@ import 'node-pty';
|
|
|
28
28
|
import 'node:readline';
|
|
29
29
|
import '@anthropic-ai/sandbox-runtime';
|
|
30
30
|
import 'expo-server-sdk';
|
|
31
|
-
import './agentGuidance-
|
|
31
|
+
import './agentGuidance-CPG5Cr5T.mjs';
|
|
32
32
|
import 'ink';
|
|
33
33
|
import 'react';
|
|
34
34
|
import '@anthropic-ai/claude-agent-sdk';
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
var chalk = require('chalk');
|
|
4
4
|
var os = require('node:os');
|
|
5
5
|
var node_crypto = require('node:crypto');
|
|
6
|
-
var api = require('./types-
|
|
7
|
-
var persistence = require('./limits-
|
|
6
|
+
var api = require('./types-Dabm17Ln.cjs');
|
|
7
|
+
var persistence = require('./limits-D6kiAfXJ.cjs');
|
|
8
8
|
var spawn = require('cross-spawn');
|
|
9
9
|
var path = require('node:path');
|
|
10
10
|
var node_readline = require('node:readline');
|
|
11
11
|
var node_fs = require('node:fs');
|
|
12
|
-
var agentGuidance = require('./agentGuidance-
|
|
12
|
+
var agentGuidance = require('./agentGuidance-Cg8Lha39.cjs');
|
|
13
13
|
var promises = require('node:fs/promises');
|
|
14
14
|
var fs = require('fs/promises');
|
|
15
15
|
var ink = require('ink');
|
|
@@ -7750,7 +7750,7 @@ function parseJsonObject(text) {
|
|
|
7750
7750
|
return null;
|
|
7751
7751
|
}
|
|
7752
7752
|
}
|
|
7753
|
-
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-
|
|
7753
|
+
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-B1plzL9M.cjs', document.baseURI).href))).resolve(s)) {
|
|
7754
7754
|
const platformArch = `${platform}-${arch}`;
|
|
7755
7755
|
const candidates = [
|
|
7756
7756
|
`@anthropic-ai/claude-agent-sdk-${platformArch}/claude`,
|
|
@@ -12040,7 +12040,7 @@ function cleanupHookSettingsFile(filepath) {
|
|
|
12040
12040
|
}
|
|
12041
12041
|
}
|
|
12042
12042
|
|
|
12043
|
-
function registerKillSessionHandler(rpcHandlerManager, killThisHappy, archiveEvents) {
|
|
12043
|
+
function registerKillSessionHandler(rpcHandlerManager, killThisHappy, archiveEvents, options) {
|
|
12044
12044
|
let terminationStarted = false;
|
|
12045
12045
|
const terminateOnce = () => {
|
|
12046
12046
|
if (terminationStarted) return;
|
|
@@ -12048,6 +12048,10 @@ function registerKillSessionHandler(rpcHandlerManager, killThisHappy, archiveEve
|
|
|
12048
12048
|
void killThisHappy();
|
|
12049
12049
|
};
|
|
12050
12050
|
archiveEvents.on("archived", terminateOnce);
|
|
12051
|
+
if (options?.processSignals) {
|
|
12052
|
+
process.on("SIGTERM", terminateOnce);
|
|
12053
|
+
process.on("SIGINT", terminateOnce);
|
|
12054
|
+
}
|
|
12051
12055
|
rpcHandlerManager.registerHandler("killSession", async () => {
|
|
12052
12056
|
persistence.logger.debug("Kill session request received");
|
|
12053
12057
|
terminateOnce();
|
|
@@ -12056,6 +12060,13 @@ function registerKillSessionHandler(rpcHandlerManager, killThisHappy, archiveEve
|
|
|
12056
12060
|
message: "Killing happy-cli process"
|
|
12057
12061
|
};
|
|
12058
12062
|
});
|
|
12063
|
+
return () => {
|
|
12064
|
+
archiveEvents.off?.("archived", terminateOnce);
|
|
12065
|
+
if (options?.processSignals) {
|
|
12066
|
+
process.off("SIGTERM", terminateOnce);
|
|
12067
|
+
process.off("SIGINT", terminateOnce);
|
|
12068
|
+
}
|
|
12069
|
+
};
|
|
12059
12070
|
}
|
|
12060
12071
|
|
|
12061
12072
|
const SIDE_QUESTION_SYSTEM_PROMPT = [
|
|
@@ -12170,7 +12181,7 @@ function registerSideQuestionHandler(rpc, deps) {
|
|
|
12170
12181
|
const retainMs = deps.retainMs ?? SIDE_QUESTION_RETAIN_MS;
|
|
12171
12182
|
const maxRunMs = deps.maxRunMs ?? SIDE_QUESTION_MAX_RUN_MS;
|
|
12172
12183
|
const run = deps.run ?? (async (input) => {
|
|
12173
|
-
const { query } = await Promise.resolve().then(function () { return require('./index-
|
|
12184
|
+
const { query } = await Promise.resolve().then(function () { return require('./index-CX-zp3FH.cjs'); });
|
|
12174
12185
|
return runSideQuestion(query, input);
|
|
12175
12186
|
});
|
|
12176
12187
|
const slots = /* @__PURE__ */ new Map();
|
|
@@ -12272,7 +12283,7 @@ const MAX_TITLE_CHARS = 60;
|
|
|
12272
12283
|
const GENERATION_TIMEOUT_MS = 3e4;
|
|
12273
12284
|
function resolveClaudeBinary() {
|
|
12274
12285
|
try {
|
|
12275
|
-
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-
|
|
12286
|
+
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-B1plzL9M.cjs', document.baseURI).href)));
|
|
12276
12287
|
const utilsPath = path.resolve(path.join(api.projectPath(), "scripts", "claude_version_utils.cjs"));
|
|
12277
12288
|
const { getClaudeCliPath } = require$1(utilsPath);
|
|
12278
12289
|
const path$1 = getClaudeCliPath();
|
|
@@ -14490,9 +14501,9 @@ function resolveLocalSignupBootstrap(configuredMode, configuredInviteCodes, gene
|
|
|
14490
14501
|
};
|
|
14491
14502
|
}
|
|
14492
14503
|
|
|
14493
|
-
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-
|
|
14504
|
+
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-B1plzL9M.cjs', document.baseURI).href)));
|
|
14494
14505
|
const __dirname$1 = path.dirname(__filename$1);
|
|
14495
|
-
const require_ = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-
|
|
14506
|
+
const require_ = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-B1plzL9M.cjs', document.baseURI).href)));
|
|
14496
14507
|
const PRISMA_QUERY_ENGINE_FILES = {
|
|
14497
14508
|
"arm64-darwin": "libquery_engine-darwin-arm64.dylib.node",
|
|
14498
14509
|
"x64-darwin": "libquery_engine-darwin.dylib.node",
|
|
@@ -16649,7 +16660,7 @@ async function runCodex(opts) {
|
|
|
16649
16660
|
}
|
|
16650
16661
|
};
|
|
16651
16662
|
session.rpcHandlerManager.registerHandler("abort", handleAbort);
|
|
16652
|
-
registerKillSessionHandler(session.rpcHandlerManager, handleKillSession, session);
|
|
16663
|
+
const disposeTermination = registerKillSessionHandler(session.rpcHandlerManager, handleKillSession, session, { processSignals: true });
|
|
16653
16664
|
const messageBuffer = new MessageBuffer();
|
|
16654
16665
|
const hasTTY = process.stdout.isTTY && process.stdin.isTTY;
|
|
16655
16666
|
let inkInstance = null;
|
|
@@ -16985,6 +16996,7 @@ async function runCodex(opts) {
|
|
|
16985
16996
|
}
|
|
16986
16997
|
}
|
|
16987
16998
|
} finally {
|
|
16999
|
+
disposeTermination?.();
|
|
16988
17000
|
persistence.logger.debug("[codex]: Final cleanup start");
|
|
16989
17001
|
logActiveHandles("cleanup-start");
|
|
16990
17002
|
if (reconnectionHandle) {
|
|
@@ -17187,7 +17199,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
17187
17199
|
process.exit(0);
|
|
17188
17200
|
} else if (subcommand === "install-terminal-hooks") {
|
|
17189
17201
|
try {
|
|
17190
|
-
const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await Promise.resolve().then(function () { return require('./installTerminalHooks-
|
|
17202
|
+
const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await Promise.resolve().then(function () { return require('./installTerminalHooks-DPmEaHg2.cjs'); });
|
|
17191
17203
|
const command = parseTerminalHooksArgs(args.slice(1));
|
|
17192
17204
|
if (command.action === "help") {
|
|
17193
17205
|
console.log(TERMINAL_HOOKS_HELP);
|
|
@@ -17204,7 +17216,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
17204
17216
|
}
|
|
17205
17217
|
} else if (subcommand === "spawn") {
|
|
17206
17218
|
try {
|
|
17207
|
-
const { handleSpawnCommand } = await Promise.resolve().then(function () { return require('./spawn-
|
|
17219
|
+
const { handleSpawnCommand } = await Promise.resolve().then(function () { return require('./spawn-gha6nGx-.cjs'); });
|
|
17208
17220
|
await handleSpawnCommand(args.slice(1));
|
|
17209
17221
|
} catch (error) {
|
|
17210
17222
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -17216,7 +17228,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
17216
17228
|
return;
|
|
17217
17229
|
} else if (subcommand === "sessions") {
|
|
17218
17230
|
try {
|
|
17219
|
-
const { handleSessionsCommand } = await Promise.resolve().then(function () { return require('./sessions-
|
|
17231
|
+
const { handleSessionsCommand } = await Promise.resolve().then(function () { return require('./sessions-DyC5Attg.cjs'); });
|
|
17220
17232
|
await handleSessionsCommand(args.slice(1));
|
|
17221
17233
|
} catch (error) {
|
|
17222
17234
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -17228,7 +17240,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
17228
17240
|
return;
|
|
17229
17241
|
} else if (subcommand === "send") {
|
|
17230
17242
|
try {
|
|
17231
|
-
const { handleSendCommand } = await Promise.resolve().then(function () { return require('./send-
|
|
17243
|
+
const { handleSendCommand } = await Promise.resolve().then(function () { return require('./send-Bo6iKuXr.cjs'); });
|
|
17232
17244
|
await handleSendCommand(args.slice(1));
|
|
17233
17245
|
} catch (error) {
|
|
17234
17246
|
console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
|
|
@@ -17334,9 +17346,9 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
17334
17346
|
if (geminiSubcommand === "project" && args[2] === "set" && args[3]) {
|
|
17335
17347
|
const projectId = args[3];
|
|
17336
17348
|
try {
|
|
17337
|
-
const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return require('./config-
|
|
17338
|
-
const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await Promise.resolve().then(function () { return require('./limits-
|
|
17339
|
-
const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./types-
|
|
17349
|
+
const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return require('./config-C3e90AIH.cjs'); });
|
|
17350
|
+
const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await Promise.resolve().then(function () { return require('./limits-D6kiAfXJ.cjs'); }).then(function (n) { return n.persistence; });
|
|
17351
|
+
const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./types-Dabm17Ln.cjs'); }).then(function (n) { return n.api; });
|
|
17340
17352
|
let userEmail = void 0;
|
|
17341
17353
|
try {
|
|
17342
17354
|
const credentials = await readCredentialsForConfiguredRelay2();
|
|
@@ -17367,7 +17379,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
17367
17379
|
}
|
|
17368
17380
|
if (geminiSubcommand === "project" && args[2] === "get") {
|
|
17369
17381
|
try {
|
|
17370
|
-
const { readGeminiLocalConfig } = await Promise.resolve().then(function () { return require('./config-
|
|
17382
|
+
const { readGeminiLocalConfig } = await Promise.resolve().then(function () { return require('./config-C3e90AIH.cjs'); });
|
|
17371
17383
|
const config = readGeminiLocalConfig();
|
|
17372
17384
|
if (config.googleCloudProject) {
|
|
17373
17385
|
console.log(`Current Google Cloud Project: ${config.googleCloudProject}`);
|
|
@@ -17407,7 +17419,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
17407
17419
|
process.exit(0);
|
|
17408
17420
|
}
|
|
17409
17421
|
try {
|
|
17410
|
-
const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-
|
|
17422
|
+
const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-BPPnulIk.cjs'); });
|
|
17411
17423
|
let startedBy = void 0;
|
|
17412
17424
|
for (let i = 1; i < args.length; i++) {
|
|
17413
17425
|
if (args[i] === "--started-by") {
|
|
@@ -17437,7 +17449,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
17437
17449
|
}
|
|
17438
17450
|
};
|
|
17439
17451
|
try {
|
|
17440
|
-
const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-
|
|
17452
|
+
const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-jqG8CV0c.cjs'); });
|
|
17441
17453
|
const parsed = parsePiRunnerArgs(args.slice(1));
|
|
17442
17454
|
const resolved = resolveAcpAgentConfig(["pi", ...parsed.passthrough]);
|
|
17443
17455
|
const { credentials } = await authAndSetupMachineIfNeeded();
|
|
@@ -17465,7 +17477,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
17465
17477
|
return;
|
|
17466
17478
|
} else if (subcommand === "acp") {
|
|
17467
17479
|
try {
|
|
17468
|
-
const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-
|
|
17480
|
+
const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-jqG8CV0c.cjs'); });
|
|
17469
17481
|
let startedBy = void 0;
|
|
17470
17482
|
let verbose = false;
|
|
17471
17483
|
const acpArgs = [];
|
|
@@ -17505,7 +17517,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
17505
17517
|
return;
|
|
17506
17518
|
} else if (subcommand === "openclaw") {
|
|
17507
17519
|
try {
|
|
17508
|
-
const { runOpenClaw } = await Promise.resolve().then(function () { return require('./runOpenClaw-
|
|
17520
|
+
const { runOpenClaw } = await Promise.resolve().then(function () { return require('./runOpenClaw-BB3Ivt1S.cjs'); });
|
|
17509
17521
|
let startedBy = void 0;
|
|
17510
17522
|
let verbose = false;
|
|
17511
17523
|
let gatewayUrl;
|
|
@@ -17556,7 +17568,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
17556
17568
|
return;
|
|
17557
17569
|
} else if (subcommand === "todo") {
|
|
17558
17570
|
try {
|
|
17559
|
-
const { handleTodoCommand } = await Promise.resolve().then(function () { return require('./todo-
|
|
17571
|
+
const { handleTodoCommand } = await Promise.resolve().then(function () { return require('./todo-BaNaNZ8c.cjs'); });
|
|
17560
17572
|
await handleTodoCommand(args.slice(1));
|
|
17561
17573
|
} catch (error) {
|
|
17562
17574
|
console.error(JSON.stringify({ error: error instanceof Error ? error.message : "Todo command failed" }));
|
|
@@ -17565,7 +17577,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
17565
17577
|
return;
|
|
17566
17578
|
} else if (subcommand === "teams") {
|
|
17567
17579
|
try {
|
|
17568
|
-
const { handleTeamsCommand } = await Promise.resolve().then(function () { return require('./teams-
|
|
17580
|
+
const { handleTeamsCommand } = await Promise.resolve().then(function () { return require('./teams-BbzWNV9e.cjs'); });
|
|
17569
17581
|
await handleTeamsCommand(args.slice(1));
|
|
17570
17582
|
} catch (error) {
|
|
17571
17583
|
console.error(error instanceof Error ? error.message : "Teams command failed");
|
|
@@ -17574,7 +17586,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
|
|
|
17574
17586
|
return;
|
|
17575
17587
|
} else if (subcommand === "mcp" && args.length === 1) {
|
|
17576
17588
|
try {
|
|
17577
|
-
const { handleMcpCommand } = await Promise.resolve().then(function () { return require('./mcp-
|
|
17589
|
+
const { handleMcpCommand } = await Promise.resolve().then(function () { return require('./mcp-DGZmUpuZ.cjs'); });
|
|
17578
17590
|
await handleMcpCommand();
|
|
17579
17591
|
} catch (error) {
|
|
17580
17592
|
process.stderr.write(`[very-happy mcp] Fatal: ${error instanceof Error ? error.message : String(error)}
|
|
@@ -1,9 +1,9 @@
|
|
|
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 { c as configuration, g as readSettings, i as encodeBase64, l as logger } from './limits-
|
|
4
|
-
import { A as AcpSessionManager } from './AcpSessionManager-
|
|
5
|
-
import { f as connectionState, A as ApiClient, p as projectPath, g as BUILTIN_TODO_DISCOVERY } from './types-
|
|
6
|
-
import { P as PI_TEAMS_EXTENSION, n as initialMachineMetadata, o as createSessionMetadata, u as setupOfflineReconnection, v as notifyDaemonSessionStarted, z as StreamRelay, x as MessageQueue2, B as hashObject, C as startHappyServer, E as registerAgentAttachmentDownloads, F as TitleGenerator, y as registerKillSessionHandler, H as CLAUDE_ATTACHMENT_KINDS, I as stageClaudeAttachments, J as appendStagedAttachmentsToPrompt, K as BasePermissionHandler, L as writeSessionModeFile, N as normalizeAcpPermissionMode, O as removeSessionModeFile } from './index-
|
|
1
|
+
import { D as DefaultTransport, A as AcpBackend } from './AcpBackend-B8KEjDwF.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-B8KEjDwF.mjs';
|
|
3
|
+
import { c as configuration, g as readSettings, i as encodeBase64, l as logger } from './limits-BGeIBBE3.mjs';
|
|
4
|
+
import { A as AcpSessionManager } from './AcpSessionManager-KlDZbEmZ.mjs';
|
|
5
|
+
import { f as connectionState, A as ApiClient, p as projectPath, g as BUILTIN_TODO_DISCOVERY } from './types-Cq-tvv9t.mjs';
|
|
6
|
+
import { P as PI_TEAMS_EXTENSION, n as initialMachineMetadata, o as createSessionMetadata, u as setupOfflineReconnection, v as notifyDaemonSessionStarted, z as StreamRelay, x as MessageQueue2, B as hashObject, C as startHappyServer, E as registerAgentAttachmentDownloads, F as TitleGenerator, y as registerKillSessionHandler, H as CLAUDE_ATTACHMENT_KINDS, I as stageClaudeAttachments, J as appendStagedAttachmentsToPrompt, K as BasePermissionHandler, L as writeSessionModeFile, N as normalizeAcpPermissionMode, O as removeSessionModeFile } from './index-BqUOj1zK.mjs';
|
|
7
7
|
import { mkdir, chmod, writeFile, rename } from 'node:fs/promises';
|
|
8
8
|
import { randomUUID } from 'node:crypto';
|
|
9
9
|
import { join } from 'node:path';
|
|
@@ -32,7 +32,7 @@ import 'fs';
|
|
|
32
32
|
import 'node:readline';
|
|
33
33
|
import '@anthropic-ai/sandbox-runtime';
|
|
34
34
|
import 'expo-server-sdk';
|
|
35
|
-
import './agentGuidance-
|
|
35
|
+
import './agentGuidance-CPG5Cr5T.mjs';
|
|
36
36
|
import 'ink';
|
|
37
37
|
import 'react';
|
|
38
38
|
import '@anthropic-ai/claude-agent-sdk';
|
|
@@ -749,6 +749,7 @@ async function runAcp(opts) {
|
|
|
749
749
|
let shouldExit = false;
|
|
750
750
|
let abortController = new AbortController();
|
|
751
751
|
let pendingTurn = null;
|
|
752
|
+
let turnCancelled = false;
|
|
752
753
|
const clearPendingTurn = (error) => {
|
|
753
754
|
if (!pendingTurn) {
|
|
754
755
|
return;
|
|
@@ -1094,6 +1095,7 @@ async function runAcp(opts) {
|
|
|
1094
1095
|
session.keepAlive(thinking, "remote");
|
|
1095
1096
|
}, 2e3);
|
|
1096
1097
|
async function handleAbort() {
|
|
1098
|
+
turnCancelled = thinking;
|
|
1097
1099
|
try {
|
|
1098
1100
|
if (acpSessionId) {
|
|
1099
1101
|
await backend.cancel(acpSessionId);
|
|
@@ -1123,12 +1125,12 @@ async function runAcp(opts) {
|
|
|
1123
1125
|
return { mode };
|
|
1124
1126
|
}
|
|
1125
1127
|
);
|
|
1126
|
-
registerKillSessionHandler(session.rpcHandlerManager, async () => {
|
|
1128
|
+
const disposeTermination = registerKillSessionHandler(session.rpcHandlerManager, async () => {
|
|
1127
1129
|
shouldExit = true;
|
|
1128
1130
|
messageQueue.close();
|
|
1129
1131
|
clearPendingTurn(new Error("Session terminated"));
|
|
1130
1132
|
await handleAbort();
|
|
1131
|
-
}, session);
|
|
1133
|
+
}, session, { processSignals: true });
|
|
1132
1134
|
try {
|
|
1133
1135
|
const started = await backend.startSession();
|
|
1134
1136
|
acpSessionId = started.sessionId;
|
|
@@ -1174,8 +1176,11 @@ async function runAcp(opts) {
|
|
|
1174
1176
|
}
|
|
1175
1177
|
logAcp("incoming", `Incoming prompt: ${formatUnknownForConsole(batch.message, ACP_EVENT_PREVIEW_CHARS)}`);
|
|
1176
1178
|
sendEnvelopes(sessionManager.startTurn());
|
|
1179
|
+
turnCancelled = false;
|
|
1177
1180
|
setThinking(true);
|
|
1178
1181
|
const turnEnded = waitForTurnEnd();
|
|
1182
|
+
void turnEnded.catch(() => {
|
|
1183
|
+
});
|
|
1179
1184
|
try {
|
|
1180
1185
|
if (typeof batch.mode.permissionMode === "string" && batch.mode.permissionMode.length > 0) {
|
|
1181
1186
|
await switchPermissionModeIfRequested(batch.mode.permissionMode);
|
|
@@ -1195,7 +1200,7 @@ ${BUILTIN_TODO_DISCOVERY}`;
|
|
|
1195
1200
|
await backend.sendPrompt(acpSessionId, appendStagedAttachmentsToPrompt(prompt, staged), attachments);
|
|
1196
1201
|
todoDiscoverySent = true;
|
|
1197
1202
|
await turnEnded;
|
|
1198
|
-
sendEnvelopes(sessionManager.endTurn("completed"));
|
|
1203
|
+
sendEnvelopes(sessionManager.endTurn(turnCancelled ? "cancelled" : "completed"));
|
|
1199
1204
|
streamRelay.endTurn();
|
|
1200
1205
|
setThinking(false);
|
|
1201
1206
|
session.sendSessionEvent({ type: "ready" });
|
|
@@ -1214,6 +1219,7 @@ ${BUILTIN_TODO_DISCOVERY}`;
|
|
|
1214
1219
|
}
|
|
1215
1220
|
}
|
|
1216
1221
|
} finally {
|
|
1222
|
+
disposeTermination?.();
|
|
1217
1223
|
setThinking(false);
|
|
1218
1224
|
clearInterval(keepAliveInterval);
|
|
1219
1225
|
streamRelay.endTurn();
|