very-happy-cli 0.2.122 → 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-pgDnK76l.mjs → AcpBackend-CT9TOBEM.mjs} +1 -1
- package/dist/{AcpBackend-YPVwACkW.cjs → AcpBackend-au0veuIF.cjs} +1 -1
- package/dist/{AcpSessionManager-6rypahwH.cjs → AcpSessionManager-BCWeBKDd.cjs} +1 -1
- package/dist/{AcpSessionManager-Bq5Tiky1.mjs → AcpSessionManager-p1tj7FxF.mjs} +1 -1
- package/dist/{config-BTEW041n.mjs → config-DwMic6AC.mjs} +2 -2
- package/dist/{config-rQdv_Yr0.cjs → config-GzzqE5Ev.cjs} +2 -2
- package/dist/{index-CaIsj1q7.mjs → index-B3-daYaX.mjs} +2 -2
- package/dist/{index-BeHr5uMY.mjs → index-Ba6Fu6MJ.mjs} +5 -5
- package/dist/{index-BHg0P9cY.cjs → index-C69uF6Up.cjs} +2 -2
- package/dist/{index-DKRU6E-x.cjs → index-DI_VC3vJ.cjs} +390 -190
- package/dist/{index-uPpFZhhr.cjs → index-DgN9P02i.cjs} +4 -4
- package/dist/{index-BTnlYGaP.mjs → index-SQKnWyz-.mjs} +388 -188
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{installTerminalHooks-CGqopr1A.cjs → installTerminalHooks-CvMt8cBI.cjs} +2 -2
- package/dist/{installTerminalHooks-DFmKhCto.mjs → installTerminalHooks-Df4hzzdM.mjs} +2 -2
- package/dist/lib.cjs +1 -1
- package/dist/lib.d.cts +7 -0
- package/dist/lib.d.mts +7 -0
- package/dist/lib.mjs +1 -1
- package/dist/{mcp-DnKBKXYa.mjs → mcp-C0oW5u-b.mjs} +2 -2
- package/dist/{mcp-FlbfMw6_.cjs → mcp-DnyLwSPq.cjs} +2 -2
- package/dist/{runGemini-DYawZQTu.cjs → runGemini-_FHrxuHN.cjs} +4 -4
- package/dist/{runGemini-BsfadDSa.mjs → runGemini-mqLjz-M7.mjs} +4 -4
- package/dist/{runOpenClaw-xGtbJ7f8.mjs → runOpenClaw-Bs03yQHe.mjs} +3 -3
- package/dist/{runOpenClaw-C2XjFP2m.cjs → runOpenClaw-C5VZQ6Na.cjs} +3 -3
- package/dist/{send-B0Wojz18.cjs → send-BD2gTVoP.cjs} +2 -2
- package/dist/{send-DRZppEr2.mjs → send-BaLjQPZQ.mjs} +2 -2
- package/dist/{sessions-CTuUV0TW.cjs → sessions-B108j_Xj.cjs} +2 -2
- package/dist/{sessions-BuMgxuxd.mjs → sessions-ggBePfSY.mjs} +2 -2
- package/dist/{spawn-BRdfNDsu.mjs → spawn-CORFRb9D.mjs} +2 -2
- package/dist/{spawn-7U_4QTHw.cjs → spawn-iI8w8sD7.cjs} +2 -2
- package/dist/{types-Jag0GwhO.cjs → types-CZIwVSN2.cjs} +138 -14
- package/dist/{types-q7wtjfxb.mjs → types-gDOmwOKw.mjs} +137 -14
- package/package.json +7 -7
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.d.cts
CHANGED
|
@@ -341,6 +341,7 @@ declare const CliUpdateStateSchema: z$1.ZodObject<{
|
|
|
341
341
|
required: "required";
|
|
342
342
|
}>;
|
|
343
343
|
autoUpdateVersion: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
344
|
+
retrySupported: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
344
345
|
checkedAt: z$1.ZodNumber;
|
|
345
346
|
handoverHold: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodObject<{
|
|
346
347
|
reason: z$1.ZodString;
|
|
@@ -436,6 +437,7 @@ declare const DaemonStateSchema: z$1.ZodObject<{
|
|
|
436
437
|
required: "required";
|
|
437
438
|
}>;
|
|
438
439
|
autoUpdateVersion: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
440
|
+
retrySupported: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
439
441
|
checkedAt: z$1.ZodNumber;
|
|
440
442
|
handoverHold: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodObject<{
|
|
441
443
|
reason: z$1.ZodString;
|
|
@@ -1363,6 +1365,11 @@ declare class ApiMachineClient {
|
|
|
1363
1365
|
* and the open-terminal snapshot/replay payloads. */
|
|
1364
1366
|
private encTerminalData;
|
|
1365
1367
|
constructor(token: string, machine: Machine);
|
|
1368
|
+
setCliUpdateRetryHandler(handler: (version: unknown) => Promise<{
|
|
1369
|
+
accepted: true;
|
|
1370
|
+
} | {
|
|
1371
|
+
error: string;
|
|
1372
|
+
}>): void;
|
|
1366
1373
|
/** Cache the latest relay policy locally and publish it now or on the next
|
|
1367
1374
|
* socket connect. This makes startup/offline races harmless. */
|
|
1368
1375
|
setCliUpdateState(state: CliUpdateState | null): void;
|
package/dist/lib.d.mts
CHANGED
|
@@ -341,6 +341,7 @@ declare const CliUpdateStateSchema: z$1.ZodObject<{
|
|
|
341
341
|
required: "required";
|
|
342
342
|
}>;
|
|
343
343
|
autoUpdateVersion: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
344
|
+
retrySupported: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
344
345
|
checkedAt: z$1.ZodNumber;
|
|
345
346
|
handoverHold: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodObject<{
|
|
346
347
|
reason: z$1.ZodString;
|
|
@@ -436,6 +437,7 @@ declare const DaemonStateSchema: z$1.ZodObject<{
|
|
|
436
437
|
required: "required";
|
|
437
438
|
}>;
|
|
438
439
|
autoUpdateVersion: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
440
|
+
retrySupported: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
439
441
|
checkedAt: z$1.ZodNumber;
|
|
440
442
|
handoverHold: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodObject<{
|
|
441
443
|
reason: z$1.ZodString;
|
|
@@ -1363,6 +1365,11 @@ declare class ApiMachineClient {
|
|
|
1363
1365
|
* and the open-terminal snapshot/replay payloads. */
|
|
1364
1366
|
private encTerminalData;
|
|
1365
1367
|
constructor(token: string, machine: Machine);
|
|
1368
|
+
setCliUpdateRetryHandler(handler: (version: unknown) => Promise<{
|
|
1369
|
+
accepted: true;
|
|
1370
|
+
} | {
|
|
1371
|
+
error: string;
|
|
1372
|
+
}>): void;
|
|
1366
1373
|
/** Cache the latest relay policy locally and publish it now or on the next
|
|
1367
1374
|
* socket connect. This makes startup/offline races harmless. */
|
|
1368
1375
|
setCliUpdateState(state: CliUpdateState | null): void;
|
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:*",
|
|
@@ -1041,6 +1041,8 @@ const ConnectionDiagnosticEventSchema = z.z.object({
|
|
|
1041
1041
|
durationMs: z.z.number().int().min(0).max(3e5),
|
|
1042
1042
|
deviceClass: z.z.enum(["mobile", "desktop", "unknown"]),
|
|
1043
1043
|
visibility: z.z.enum(["visible", "hidden"]),
|
|
1044
|
+
relayRegion: z.z.enum(["central", "sg", "us", "other", "unknown"]).optional(),
|
|
1045
|
+
timing: z.z.enum(["active", "background", "censored", "unknown"]).optional(),
|
|
1044
1046
|
client: z.z.string().regex(/^web\/(?:[a-f0-9]{7,40}|unknown)$/)
|
|
1045
1047
|
}).strict();
|
|
1046
1048
|
z.z.object({
|
|
@@ -1095,6 +1097,7 @@ const CliUpdateStateSchema = z.z.object({
|
|
|
1095
1097
|
/** B-351: the version this machine may install by itself. Pinned separately
|
|
1096
1098
|
* from `recommendedVersion`; null means no unattended install. */
|
|
1097
1099
|
autoUpdateVersion: z.z.string().nullable().optional(),
|
|
1100
|
+
retrySupported: z.z.boolean().optional(),
|
|
1098
1101
|
checkedAt: z.z.number(),
|
|
1099
1102
|
/**
|
|
1100
1103
|
* B-321: a new bundle is on disk but refused to run, so the daemon is still
|
|
@@ -1705,7 +1708,7 @@ class RpcHandlerManager {
|
|
|
1705
1708
|
}
|
|
1706
1709
|
}
|
|
1707
1710
|
|
|
1708
|
-
const __dirname$1 = path$1.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('types-
|
|
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))));
|
|
1709
1712
|
function projectPath() {
|
|
1710
1713
|
const path = path$1.resolve(__dirname$1, "..");
|
|
1711
1714
|
return path;
|
|
@@ -13218,6 +13221,18 @@ function isUserPrompt(parsed) {
|
|
|
13218
13221
|
const content = parsed.message?.content;
|
|
13219
13222
|
return typeof content === "string";
|
|
13220
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
|
+
}
|
|
13221
13236
|
async function discardForkedSession(projectDir, claudeSessionId) {
|
|
13222
13237
|
try {
|
|
13223
13238
|
await promises.unlink(jsonlPath(projectDir, claudeSessionId));
|
|
@@ -13317,23 +13332,68 @@ async function listClaudeRewindPoints(projectDir, claudeSessionId) {
|
|
|
13317
13332
|
} catch {
|
|
13318
13333
|
continue;
|
|
13319
13334
|
}
|
|
13320
|
-
|
|
13321
|
-
if (
|
|
13335
|
+
const content = userPromptText(parsed);
|
|
13336
|
+
if (content === null) continue;
|
|
13322
13337
|
if (typeof parsed.uuid !== "string" || parsed.uuid.length === 0) continue;
|
|
13323
|
-
const content = parsed.message?.content;
|
|
13324
|
-
if (typeof content !== "string") continue;
|
|
13325
|
-
const trimmed = content.trim();
|
|
13326
|
-
if (trimmed.length === 0) continue;
|
|
13327
13338
|
const timestampRaw = parsed.timestamp;
|
|
13328
13339
|
const timestamp = typeof timestampRaw === "string" ? Date.parse(timestampRaw) : typeof timestampRaw === "number" ? timestampRaw : Date.now();
|
|
13329
13340
|
points.push({
|
|
13330
13341
|
uuid: parsed.uuid,
|
|
13331
13342
|
text: content,
|
|
13343
|
+
...hasPromptAttachments(parsed) ? { hasAttachments: true } : {},
|
|
13332
13344
|
timestamp: Number.isFinite(timestamp) ? timestamp : Date.now()
|
|
13333
13345
|
});
|
|
13334
13346
|
}
|
|
13335
13347
|
return points;
|
|
13336
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
|
+
}
|
|
13337
13397
|
|
|
13338
13398
|
function serializedByteLength(value) {
|
|
13339
13399
|
try {
|
|
@@ -14610,6 +14670,14 @@ class CodexForkRewindPointNotFoundError extends Error {
|
|
|
14610
14670
|
this.name = "CodexForkRewindPointNotFoundError";
|
|
14611
14671
|
}
|
|
14612
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
|
+
}
|
|
14613
14681
|
function textFromUserItem(item) {
|
|
14614
14682
|
if (item.type !== "userMessage") {
|
|
14615
14683
|
return null;
|
|
@@ -14636,6 +14704,7 @@ function listCodexRewindPoints(thread) {
|
|
|
14636
14704
|
points.push({
|
|
14637
14705
|
itemId: item.id,
|
|
14638
14706
|
text,
|
|
14707
|
+
...hasUserAttachments(item) ? { hasAttachments: true } : {},
|
|
14639
14708
|
timestamp: timestampFromTurn(turn)
|
|
14640
14709
|
});
|
|
14641
14710
|
}
|
|
@@ -14693,6 +14762,37 @@ async function forkCodexThread(client, opts) {
|
|
|
14693
14762
|
newCodexThreadId: forked.threadId
|
|
14694
14763
|
};
|
|
14695
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
|
+
}
|
|
14696
14796
|
|
|
14697
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;
|
|
14698
14798
|
function requireNonEmptyString(value, name) {
|
|
@@ -14825,6 +14925,9 @@ class ApiMachineClient {
|
|
|
14825
14925
|
encTerminalData(dataBase64) {
|
|
14826
14926
|
return encodeBase64(encrypt(this.machine.encryptionKey, this.machine.encryptionVariant, dataBase64));
|
|
14827
14927
|
}
|
|
14928
|
+
setCliUpdateRetryHandler(handler) {
|
|
14929
|
+
this.rpcHandlerManager.registerHandler("cli-update-retry", (params) => handler(params && typeof params === "object" ? params.version : void 0));
|
|
14930
|
+
}
|
|
14828
14931
|
/** Cache the latest relay policy locally and publish it now or on the next
|
|
14829
14932
|
* socket connect. This makes startup/offline races harmless. */
|
|
14830
14933
|
setCliUpdateState(state) {
|
|
@@ -15194,6 +15297,26 @@ class ApiMachineClient {
|
|
|
15194
15297
|
throw error;
|
|
15195
15298
|
}
|
|
15196
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
|
+
});
|
|
15197
15320
|
this.rpcHandlerManager.registerHandler("stop-daemon", () => {
|
|
15198
15321
|
logger.debug("[API MACHINE] Received stop-daemon RPC request");
|
|
15199
15322
|
setTimeout(() => {
|
|
@@ -16894,6 +17017,7 @@ exports.logger = logger;
|
|
|
16894
17017
|
exports.mirrorLineKey = mirrorLineKey;
|
|
16895
17018
|
exports.mirrorLocalId = mirrorLocalId;
|
|
16896
17019
|
exports.packageJson = packageJson;
|
|
17020
|
+
exports.parseExactVersion = parseExactVersion;
|
|
16897
17021
|
exports.parseTerminalHookPayload = parseTerminalHookPayload;
|
|
16898
17022
|
exports.persistSession = persistSession;
|
|
16899
17023
|
exports.persistence = persistence;
|