very-happy-cli 0.2.121 → 0.2.123

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.
Files changed (35) hide show
  1. package/dist/{AcpBackend-Cdj56ZfU.cjs → AcpBackend-DzIvpTxZ.cjs} +1 -1
  2. package/dist/{AcpBackend-BxvQ6O4k.mjs → AcpBackend-hM-qHLN3.mjs} +1 -1
  3. package/dist/{AcpSessionManager-DlWlQVhw.mjs → AcpSessionManager-CRPZPHPa.mjs} +1 -1
  4. package/dist/{AcpSessionManager-DahCU78z.cjs → AcpSessionManager-DyU3Ikgj.cjs} +1 -1
  5. package/dist/{config-DxOhdFEx.cjs → config-4RaHrVSV.cjs} +2 -2
  6. package/dist/{config-osO37dR1.mjs → config-alG86PDN.mjs} +2 -2
  7. package/dist/{index-Iz-M3qbz.mjs → index-36AkXNF2.mjs} +388 -188
  8. package/dist/{index-DObePs_K.cjs → index-5b9YhV-1.cjs} +390 -190
  9. package/dist/{index-Bv53Zygv.cjs → index-Beh0UZf8.cjs} +4 -4
  10. package/dist/{index-BcwAnM9k.mjs → index-Cg3Vfc00.mjs} +5 -5
  11. package/dist/{index-Vjo1jIJH.cjs → index-DWBKJ5zy.cjs} +2 -2
  12. package/dist/{index-DtZFY8aS.mjs → index-vyYHKKk6.mjs} +2 -2
  13. package/dist/index.cjs +2 -2
  14. package/dist/index.mjs +2 -2
  15. package/dist/{installTerminalHooks-DehsXLmV.cjs → installTerminalHooks-DWCa5j7u.cjs} +2 -2
  16. package/dist/{installTerminalHooks-Bq11vOqF.mjs → installTerminalHooks-DqUPkh0l.mjs} +2 -2
  17. package/dist/lib.cjs +1 -1
  18. package/dist/lib.d.cts +7 -0
  19. package/dist/lib.d.mts +7 -0
  20. package/dist/lib.mjs +1 -1
  21. package/dist/{mcp-Cpx9Qlch.cjs → mcp-BBya5dsZ.cjs} +2 -2
  22. package/dist/{mcp-Bx1B3uny.mjs → mcp-DZIdcsJp.mjs} +2 -2
  23. package/dist/{runGemini-CMgudbJs.mjs → runGemini-BQa2eF3i.mjs} +4 -4
  24. package/dist/{runGemini-DI8DipUx.cjs → runGemini-DmWxHIwS.cjs} +4 -4
  25. package/dist/{runOpenClaw-DR3fLtVf.mjs → runOpenClaw-362eg04u.mjs} +3 -3
  26. package/dist/{runOpenClaw-CetdjTl-.cjs → runOpenClaw-boyJtPBq.cjs} +3 -3
  27. package/dist/{send-Cq0NZCn8.cjs → send-BINA__Ke.cjs} +2 -2
  28. package/dist/{send-M4b_hD7t.mjs → send-CT22-8Tp.mjs} +2 -2
  29. package/dist/{sessions-DW4lrLOp.cjs → sessions-DXYxV6Np.cjs} +2 -2
  30. package/dist/{sessions-CelkWhqX.mjs → sessions-DemgtCkr.mjs} +2 -2
  31. package/dist/{spawn-D3cwBlWI.cjs → spawn-BtV9dU1i.cjs} +2 -2
  32. package/dist/{spawn-C4fF0q3Z.mjs → spawn-D2egvPgO.mjs} +2 -2
  33. package/dist/{types-P2cJWD0E.mjs → types-BqW7nEN_.mjs} +88 -39
  34. package/dist/{types-COOYpI8_.cjs → types-Cd_tUN3U.cjs} +89 -39
  35. package/package.json +7 -7
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var AcpBackend = require('./AcpBackend-Cdj56ZfU.cjs');
4
- var persistence = require('./types-COOYpI8_.cjs');
5
- var AcpSessionManager = require('./AcpSessionManager-DahCU78z.cjs');
3
+ var AcpBackend = require('./AcpBackend-DzIvpTxZ.cjs');
4
+ var persistence = require('./types-Cd_tUN3U.cjs');
5
+ var AcpSessionManager = require('./AcpSessionManager-DyU3Ikgj.cjs');
6
6
  var node_crypto = require('node:crypto');
7
7
  var path = require('node:path');
8
- var index = require('./index-DObePs_K.cjs');
8
+ var index = require('./index-5b9YhV-1.cjs');
9
9
  require('node:child_process');
10
10
  require('@agentclientprotocol/sdk');
11
11
  require('axios');
@@ -1,10 +1,10 @@
1
- import { D as DefaultTransport, A as AcpBackend } from './AcpBackend-BxvQ6O4k.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-BxvQ6O4k.mjs';
3
- import { d as connectionState, A as ApiClient, e as readSettings, f as encodeBase64, l as logger, p as projectPath } from './types-P2cJWD0E.mjs';
4
- import { A as AcpSessionManager } from './AcpSessionManager-DlWlQVhw.mjs';
1
+ import { D as DefaultTransport, A as AcpBackend } from './AcpBackend-hM-qHLN3.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-hM-qHLN3.mjs';
3
+ import { d as connectionState, A as ApiClient, e as readSettings, f as encodeBase64, l as logger, p as projectPath } from './types-BqW7nEN_.mjs';
4
+ import { A as AcpSessionManager } from './AcpSessionManager-CRPZPHPa.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-Iz-M3qbz.mjs';
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-36AkXNF2.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-DObePs_K.cjs');
3
+ var index = require('./index-5b9YhV-1.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-COOYpI8_.cjs');
8
+ require('./types-Cd_tUN3U.cjs');
9
9
  require('axios');
10
10
  require('node:util');
11
11
  require('node:fs');
@@ -1,9 +1,9 @@
1
- import { q as query } from './index-Iz-M3qbz.mjs';
1
+ import { q as query } from './index-36AkXNF2.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-P2cJWD0E.mjs';
6
+ import './types-BqW7nEN_.mjs';
7
7
  import 'axios';
8
8
  import 'node:util';
9
9
  import 'node:fs';
package/dist/index.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  require('chalk');
4
- require('./index-DObePs_K.cjs');
5
- require('./types-COOYpI8_.cjs');
4
+ require('./index-5b9YhV-1.cjs');
5
+ require('./types-Cd_tUN3U.cjs');
6
6
  require('zod');
7
7
  require('node:child_process');
8
8
  require('node:os');
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import 'chalk';
2
- import './index-Iz-M3qbz.mjs';
3
- import './types-P2cJWD0E.mjs';
2
+ import './index-36AkXNF2.mjs';
3
+ import './types-BqW7nEN_.mjs';
4
4
  import 'zod';
5
5
  import 'node:child_process';
6
6
  import 'node:os';
@@ -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-COOYpI8_.cjs');
9
- var index = require('./index-DObePs_K.cjs');
8
+ var persistence = require('./types-Cd_tUN3U.cjs');
9
+ var index = require('./index-5b9YhV-1.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-P2cJWD0E.mjs';
7
- import { t as tmuxSupportsSessionEnv } from './index-Iz-M3qbz.mjs';
6
+ import { p as projectPath } from './types-BqW7nEN_.mjs';
7
+ import { t as tmuxSupportsSessionEnv } from './index-36AkXNF2.mjs';
8
8
  import 'axios';
9
9
  import 'node:util';
10
10
  import 'node:fs/promises';
package/dist/lib.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var persistence = require('./types-COOYpI8_.cjs');
3
+ var persistence = require('./types-Cd_tUN3U.cjs');
4
4
  require('axios');
5
5
  require('chalk');
6
6
  require('node:util');
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-P2cJWD0E.mjs';
1
+ export { A as ApiClient, a as ApiSessionClient, R as RawJSONLinesSchema, c as configuration, l as logger } from './types-BqW7nEN_.mjs';
2
2
  import 'axios';
3
3
  import 'chalk';
4
4
  import 'node:util';
@@ -3,9 +3,9 @@
3
3
  var mcp_js = require('@modelcontextprotocol/sdk/server/mcp.js');
4
4
  var stdio_js = require('@modelcontextprotocol/sdk/server/stdio.js');
5
5
  var z = require('zod');
6
- var index = require('./index-DObePs_K.cjs');
6
+ var index = require('./index-5b9YhV-1.cjs');
7
7
  var limits = require('./limits-KdWKmwtH.cjs');
8
- var persistence = require('./types-COOYpI8_.cjs');
8
+ var persistence = require('./types-Cd_tUN3U.cjs');
9
9
  require('node:fs/promises');
10
10
  require('node:os');
11
11
  require('node:crypto');
@@ -1,9 +1,9 @@
1
1
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
2
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
3
3
  import { z } from 'zod';
4
- import { p as pushClipboardViaDaemon, k as setTerminalTitleViaDaemon, m as registerAssistantSessionTools } from './index-Iz-M3qbz.mjs';
4
+ import { p as pushClipboardViaDaemon, k as setTerminalTitleViaDaemon, m as registerAssistantSessionTools } from './index-36AkXNF2.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-P2cJWD0E.mjs';
6
+ import { l as logger } from './types-BqW7nEN_.mjs';
7
7
  import 'node:fs/promises';
8
8
  import 'node:os';
9
9
  import 'node:crypto';
@@ -2,10 +2,10 @@ import { useStdout, useInput, Box, Text, render } from 'ink';
2
2
  import React, { useState, useRef, useEffect, useCallback } from 'react';
3
3
  import { randomUUID } from 'node:crypto';
4
4
  import { join } from 'node:path';
5
- import { l as logger, d as connectionState, A as ApiClient, e as readSettings, h as errorLogMetadata, f as encodeBase64, p as projectPath, g as contentLogMetadata } from './types-P2cJWD0E.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-Iz-M3qbz.mjs';
7
- import { A as AcpBackend } from './AcpBackend-BxvQ6O4k.mjs';
8
- import { readGeminiLocalConfig, determineGeminiModel, getGeminiModelSource, getInitialGeminiModel, saveGeminiModelToConfig } from './config-osO37dR1.mjs';
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-BqW7nEN_.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-36AkXNF2.mjs';
7
+ import { A as AcpBackend } from './AcpBackend-hM-qHLN3.mjs';
8
+ import { readGeminiLocalConfig, determineGeminiModel, getGeminiModelSource, getInitialGeminiModel, saveGeminiModelToConfig } from './config-alG86PDN.mjs';
9
9
  import 'axios';
10
10
  import 'chalk';
11
11
  import 'node:util';
@@ -4,10 +4,10 @@ var ink = require('ink');
4
4
  var React = require('react');
5
5
  var node_crypto = require('node:crypto');
6
6
  var path = require('node:path');
7
- var persistence = require('./types-COOYpI8_.cjs');
8
- var index = require('./index-DObePs_K.cjs');
9
- var AcpBackend = require('./AcpBackend-Cdj56ZfU.cjs');
10
- var config = require('./config-DxOhdFEx.cjs');
7
+ var persistence = require('./types-Cd_tUN3U.cjs');
8
+ var index = require('./index-5b9YhV-1.cjs');
9
+ var AcpBackend = require('./AcpBackend-DzIvpTxZ.cjs');
10
+ var config = require('./config-4RaHrVSV.cjs');
11
11
  require('axios');
12
12
  require('chalk');
13
13
  require('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-P2cJWD0E.mjs';
7
- import { A as AcpSessionManager } from './AcpSessionManager-DlWlQVhw.mjs';
8
- import { n as initialMachineMetadata, o as createSessionMetadata, u as setupOfflineReconnection, v as notifyDaemonSessionStarted, y as MessageQueue2, C as registerKillSessionHandler } from './index-Iz-M3qbz.mjs';
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-BqW7nEN_.mjs';
7
+ import { A as AcpSessionManager } from './AcpSessionManager-CRPZPHPa.mjs';
8
+ import { n as initialMachineMetadata, o as createSessionMetadata, u as setupOfflineReconnection, v as notifyDaemonSessionStarted, y as MessageQueue2, C as registerKillSessionHandler } from './index-36AkXNF2.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-COOYpI8_.cjs');
9
- var AcpSessionManager = require('./AcpSessionManager-DahCU78z.cjs');
10
- var index = require('./index-DObePs_K.cjs');
8
+ var persistence = require('./types-Cd_tUN3U.cjs');
9
+ var AcpSessionManager = require('./AcpSessionManager-DyU3Ikgj.cjs');
10
+ var index = require('./index-5b9YhV-1.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-COOYpI8_.cjs');
7
- var index = require('./index-DObePs_K.cjs');
6
+ var persistence = require('./types-Cd_tUN3U.cjs');
7
+ var index = require('./index-5b9YhV-1.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-P2cJWD0E.mjs';
5
- import { d as sendUserMessage, a as sessionWebUrl } from './index-Iz-M3qbz.mjs';
4
+ import { r as readPersistedSessions, c as configuration } from './types-BqW7nEN_.mjs';
5
+ import { d as sendUserMessage, a as sessionWebUrl } from './index-36AkXNF2.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-DObePs_K.cjs');
5
- var persistence = require('./types-COOYpI8_.cjs');
4
+ var index = require('./index-5b9YhV-1.cjs');
5
+ var persistence = require('./types-Cd_tUN3U.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-Iz-M3qbz.mjs';
3
- import { i as isValidSessionId } from './types-P2cJWD0E.mjs';
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-36AkXNF2.mjs';
3
+ import { i as isValidSessionId } from './types-BqW7nEN_.mjs';
4
4
  import 'node:os';
5
5
  import 'node:crypto';
6
6
  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-DObePs_K.cjs');
7
- var persistence = require('./types-COOYpI8_.cjs');
6
+ var index = require('./index-5b9YhV-1.cjs');
7
+ var persistence = require('./types-Cd_tUN3U.cjs');
8
8
  require('node:os');
9
9
  require('node:crypto');
10
10
  require('cross-spawn');
@@ -1,8 +1,8 @@
1
1
  import chalk from 'chalk';
2
2
  import { readFileSync, statSync } from 'node:fs';
3
3
  import { resolve } from 'node:path';
4
- import { c as checkIfDaemonRunningAndCleanupStaleState, s as spawnDaemonSession, a as sessionWebUrl, i as isValidSpawnOrigin, b as sanitizeSpawnPermissionMode, A as ALLOWED_SPAWN_PERMISSION_MODES, S as SPAWN_AGENTS, w as waitForSessionKey, d as sendUserMessage } from './index-Iz-M3qbz.mjs';
5
- import { l as logger } from './types-P2cJWD0E.mjs';
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-36AkXNF2.mjs';
5
+ import { l as logger } from './types-BqW7nEN_.mjs';
6
6
  import 'node:os';
7
7
  import 'node:crypto';
8
8
  import 'cross-spawn';
@@ -29,7 +29,7 @@ import { SandboxManager } from '@anthropic-ai/sandbox-runtime';
29
29
  import { Expo } from 'expo-server-sdk';
30
30
 
31
31
  var name = "very-happy-cli";
32
- var version = "0.2.121";
32
+ var version = "0.2.123";
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.121",
146
- "very-happy-tools-x64-darwin": "0.2.121",
147
- "very-happy-tools-arm64-linux": "0.2.121",
148
- "very-happy-tools-x64-linux": "0.2.121",
149
- "very-happy-tools-arm64-win32": "0.2.121",
150
- "very-happy-tools-x64-win32": "0.2.121"
145
+ "very-happy-tools-arm64-darwin": "0.2.123",
146
+ "very-happy-tools-x64-darwin": "0.2.123",
147
+ "very-happy-tools-arm64-linux": "0.2.123",
148
+ "very-happy-tools-x64-linux": "0.2.123",
149
+ "very-happy-tools-arm64-win32": "0.2.123",
150
+ "very-happy-tools-x64-win32": "0.2.123"
151
151
  };
152
152
  var devDependencies = {
153
153
  "@slopus/happy-wire": "workspace:*",
@@ -1010,6 +1010,22 @@ const ReleaseDrainNoticeSchema = z$1.object({
1010
1010
  deadline: z$1.number().int().positive(),
1011
1011
  mode: z$1.literal("make-before-break")
1012
1012
  });
1013
+ const ConnectionDiagnosticEventSchema = z$1.object({
1014
+ attemptId: z$1.string().uuid(),
1015
+ machineId: z$1.string().min(1).max(256).regex(/^[A-Za-z0-9_-]+$/).optional(),
1016
+ at: z$1.number().int().min(0).max(Number.MAX_SAFE_INTEGER),
1017
+ stage: z$1.enum(["control", "relay_discovery", "relay_connect", "relay_probe", "machine_rpc", "terminal_open"]),
1018
+ outcome: z$1.enum(["started", "success", "timeout", "error", "offline", "cancelled", "fallback"]),
1019
+ durationMs: z$1.number().int().min(0).max(3e5),
1020
+ deviceClass: z$1.enum(["mobile", "desktop", "unknown"]),
1021
+ visibility: z$1.enum(["visible", "hidden"]),
1022
+ relayRegion: z$1.enum(["central", "sg", "us", "other", "unknown"]).optional(),
1023
+ timing: z$1.enum(["active", "background", "censored", "unknown"]).optional(),
1024
+ client: z$1.string().regex(/^web\/(?:[a-f0-9]{7,40}|unknown)$/)
1025
+ }).strict();
1026
+ z$1.object({
1027
+ events: z$1.array(ConnectionDiagnosticEventSchema).min(1).max(32)
1028
+ }).strict();
1013
1029
 
1014
1030
  z$1.object({
1015
1031
  host: z$1.string(),
@@ -1059,6 +1075,7 @@ const CliUpdateStateSchema = z$1.object({
1059
1075
  /** B-351: the version this machine may install by itself. Pinned separately
1060
1076
  * from `recommendedVersion`; null means no unattended install. */
1061
1077
  autoUpdateVersion: z$1.string().nullable().optional(),
1078
+ retrySupported: z$1.boolean().optional(),
1062
1079
  checkedAt: z$1.number(),
1063
1080
  /**
1064
1081
  * B-321: a new bundle is on disk but refused to run, so the daemon is still
@@ -14484,28 +14501,50 @@ function selectStableRelay(candidates, probes, connectedRelayId, tracker = null)
14484
14501
  tracker: { challengerRelayId: fastest.id, consecutiveWins }
14485
14502
  };
14486
14503
  }
14504
+ const RELAY_REFRESH_TIMEOUT_MS = 8e3;
14505
+ async function withinDeadline(timeoutMs, operation, parent) {
14506
+ const controller = new AbortController();
14507
+ let timer;
14508
+ let cancel;
14509
+ const deadline = new Promise((_, reject) => {
14510
+ cancel = () => {
14511
+ reject(new Error("relay request deadline exceeded"));
14512
+ controller.abort();
14513
+ };
14514
+ timer = setTimeout(cancel, timeoutMs);
14515
+ parent?.addEventListener("abort", cancel, { once: true });
14516
+ if (parent?.aborted) cancel();
14517
+ });
14518
+ try {
14519
+ return await Promise.race([Promise.resolve().then(() => {
14520
+ controller.signal.throwIfAborted();
14521
+ return operation(controller.signal);
14522
+ }), deadline]);
14523
+ } finally {
14524
+ clearTimeout(timer);
14525
+ parent?.removeEventListener("abort", cancel);
14526
+ }
14527
+ }
14487
14528
  async function probeRelayCandidates(candidates, options = {}) {
14488
14529
  const timeoutMs = options.timeoutMs ?? 2e3;
14489
14530
  const fetchImpl = options.fetchImpl ?? fetch;
14490
14531
  const now = options.now ?? (() => performance.now());
14491
14532
  const measured = await Promise.all(candidates.map(async (candidate) => {
14492
- const controller = new AbortController();
14493
- const timeout = setTimeout(() => controller.abort(), timeoutMs);
14494
14533
  const startedAt = now();
14495
14534
  try {
14496
- const response = await fetchImpl(`${candidate.url}/health`, {
14497
- method: "GET",
14498
- cache: "no-store",
14499
- signal: controller.signal
14500
- });
14501
- if (!response.ok) return null;
14502
- const body = await response.json();
14503
- if (body.ok !== true || body.relayId !== candidate.id) return null;
14504
- return { relayId: candidate.id, rttMs: Math.max(0, now() - startedAt) };
14535
+ return await withinDeadline(timeoutMs, async (signal) => {
14536
+ const response = await fetchImpl(`${candidate.url}/health`, {
14537
+ method: "GET",
14538
+ cache: "no-store",
14539
+ signal
14540
+ });
14541
+ if (!response.ok) return null;
14542
+ const body = await response.json();
14543
+ if (body.ok !== true || body.relayId !== candidate.id) return null;
14544
+ return { relayId: candidate.id, rttMs: Math.max(0, now() - startedAt) };
14545
+ }, options.signal);
14505
14546
  } catch {
14506
14547
  return null;
14507
- } finally {
14508
- clearTimeout(timeout);
14509
14548
  }
14510
14549
  }));
14511
14550
  return measured.filter((probe) => probe !== null);
@@ -14513,25 +14552,32 @@ async function probeRelayCandidates(candidates, options = {}) {
14513
14552
  async function discoverAndClaimRelay(input) {
14514
14553
  const fetchImpl = input.fetchImpl ?? fetch;
14515
14554
  try {
14516
- const discoveryResponse = await fetchImpl(`${input.controlUrl}/v1/relays`, {
14517
- headers: { Authorization: `Bearer ${input.token}` },
14518
- cache: "no-store"
14519
- });
14520
- if (!discoveryResponse.ok) return null;
14521
- const discovery = RelayCandidatesResponseSchema.parse(await discoveryResponse.json());
14522
- if (!discovery.enabled || discovery.candidates.length === 0) return null;
14523
- const probes = await probeRelayCandidates(discovery.candidates, { fetchImpl });
14524
- const decision = selectStableRelay(discovery.candidates, probes, input.connectedRelayId, input.switchTracker);
14525
- const selected = decision.candidate;
14526
- if (!selected) return null;
14527
- const claimResponse = await fetchImpl(`${input.controlUrl}/v1/relays/machines/${encodeURIComponent(input.machineId)}/claim`, {
14528
- method: "POST",
14529
- headers: { Authorization: `Bearer ${input.token}`, "Content-Type": "application/json" },
14530
- body: JSON.stringify({ relayId: selected.id, probes })
14555
+ return await withinDeadline(RELAY_REFRESH_TIMEOUT_MS, async (signal) => {
14556
+ const discoveryResponse = await fetchImpl(`${input.controlUrl}/v1/relays`, {
14557
+ headers: { Authorization: `Bearer ${input.token}` },
14558
+ cache: "no-store",
14559
+ signal
14560
+ });
14561
+ if (!discoveryResponse.ok) return null;
14562
+ const discovery = RelayCandidatesResponseSchema.parse(await discoveryResponse.json());
14563
+ signal.throwIfAborted();
14564
+ if (!discovery.enabled || discovery.candidates.length === 0) return null;
14565
+ const probes = await probeRelayCandidates(discovery.candidates, { fetchImpl, signal });
14566
+ signal.throwIfAborted();
14567
+ const decision = selectStableRelay(discovery.candidates, probes, input.connectedRelayId, input.switchTracker);
14568
+ const selected = decision.candidate;
14569
+ if (!selected) return null;
14570
+ const claimResponse = await fetchImpl(`${input.controlUrl}/v1/relays/machines/${encodeURIComponent(input.machineId)}/claim`, {
14571
+ method: "POST",
14572
+ signal,
14573
+ headers: { Authorization: `Bearer ${input.token}`, "Content-Type": "application/json" },
14574
+ body: JSON.stringify({ relayId: selected.id, probes })
14575
+ });
14576
+ if (!claimResponse.ok) return null;
14577
+ const claimed = RelayAssignmentResponseSchema.parse(await claimResponse.json());
14578
+ signal.throwIfAborted();
14579
+ return claimed.assignment ? { assignment: claimed.assignment, probes, switchTracker: decision.tracker } : null;
14531
14580
  });
14532
- if (!claimResponse.ok) return null;
14533
- const claimed = RelayAssignmentResponseSchema.parse(await claimResponse.json());
14534
- return claimed.assignment ? { assignment: claimed.assignment, probes, switchTracker: decision.tracker } : null;
14535
14581
  } catch {
14536
14582
  return null;
14537
14583
  }
@@ -14760,6 +14806,9 @@ class ApiMachineClient {
14760
14806
  encTerminalData(dataBase64) {
14761
14807
  return encodeBase64(encrypt(this.machine.encryptionKey, this.machine.encryptionVariant, dataBase64));
14762
14808
  }
14809
+ setCliUpdateRetryHandler(handler) {
14810
+ this.rpcHandlerManager.registerHandler("cli-update-retry", (params) => handler(params && typeof params === "object" ? params.version : void 0));
14811
+ }
14763
14812
  /** Cache the latest relay policy locally and publish it now or on the next
14764
14813
  * socket connect. This makes startup/offline races harmless. */
14765
14814
  setCliUpdateState(state) {
@@ -16771,4 +16820,4 @@ const RawJSONLinesSchema = z$1.discriminatedUnion("type", [
16771
16820
  }).passthrough()
16772
16821
  ]);
16773
16822
 
16774
- export { scrubTmuxClientEnv as $, ApiClient as A, commandOnPath as B, readCredentials as C, credentialRelayProblem as D, deriveLocalCliUpdateSummary as E, readSettingsOutcome as F, updateSettings as G, encodeBase64Url as H, InvalidateSync as I, decodeBase64 as J, writeCredentialsLegacy as K, writeCredentialsDataKey as L, MAX_CHAT_ATTACHMENT_SOURCE_BYTES as M, readCredentialsForConfiguredRelay as N, encrypt as O, isClaudeSessionId as P, getLocalHappyAgentCredentialPath as Q, RawJSONLinesSchema as R, STREAM_DELTA_MAX_CHARS as S, readLocalHappyAgentCredentials as T, decryptWithDataKey as U, decryptLegacy as V, compareExactVersions as W, extractCompleteLines as X, decideBackfill as Y, parseTerminalHookPayload as Z, tmuxArgs as _, ApiSessionClient as a, decideMirrorBinding as a0, MIRROR_BACKFILL_LINES_DEFAULT as a1, persistSession as a2, mirrorLineKey as a3, mirrorLocalId as a4, detectCLIAvailability as a5, detectResumeSupport as a6, acquireDaemonLock as a7, summarizeSpawnSessionForLog as a8, deletePersistedSessions as a9, shellescape as aa, decrypt as ab, writeDaemonState as ac, writeSettings as ad, fetchCliUpdateState as ae, resolveCliUpdateCheckInterval as af, DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS as ag, releaseDaemonLock as ah, listVhTerminals as ai, isValidTerminalId as aj, readVhTerminal as ak, sendToVhTerminal as al, TITLE_PROMPT_PREFIX as am, BOARD_ANALYZER_PROMPT_PREFIX as an, startOfflineReconnection as ao, clearCredentials as ap, clearMachineId as aq, SandboxConfigSchema as ar, CodexAppServerClient as as, getLatestDaemonLog as at, persistence as au, api as av, createEnvelope as b, configuration as c, connectionState as d, readSettings as e, encodeBase64 as f, contentLogMetadata as g, errorLogMetadata as h, isValidSessionId as i, packageJson as j, delay as k, logger as l, ensurePrivateDirectorySync as m, hardenPrivateFileSync as n, readDaemonState as o, projectPath as p, clearDaemonState as q, readPersistedSessions as r, streamKeyOf as s, getProjectPath as t, initializeSandbox as u, wrapCommand as v, writePrivateFileSync as w, AsyncLock as x, ensurePrivateDirectory as y, hardenPrivateFile as z };
16823
+ export { tmuxArgs as $, ApiClient as A, commandOnPath as B, readCredentials as C, credentialRelayProblem as D, deriveLocalCliUpdateSummary as E, readSettingsOutcome as F, updateSettings as G, encodeBase64Url as H, InvalidateSync as I, decodeBase64 as J, writeCredentialsLegacy as K, writeCredentialsDataKey as L, MAX_CHAT_ATTACHMENT_SOURCE_BYTES as M, readCredentialsForConfiguredRelay as N, encrypt as O, isClaudeSessionId as P, getLocalHappyAgentCredentialPath as Q, RawJSONLinesSchema as R, STREAM_DELTA_MAX_CHARS as S, readLocalHappyAgentCredentials as T, decryptWithDataKey as U, decryptLegacy as V, parseExactVersion as W, compareExactVersions as X, extractCompleteLines as Y, decideBackfill as Z, parseTerminalHookPayload as _, ApiSessionClient as a, scrubTmuxClientEnv as a0, decideMirrorBinding as a1, MIRROR_BACKFILL_LINES_DEFAULT as a2, persistSession as a3, mirrorLineKey as a4, mirrorLocalId as a5, detectCLIAvailability as a6, detectResumeSupport as a7, acquireDaemonLock as a8, summarizeSpawnSessionForLog as a9, deletePersistedSessions as aa, shellescape as ab, decrypt as ac, writeDaemonState as ad, writeSettings as ae, fetchCliUpdateState as af, resolveCliUpdateCheckInterval as ag, DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS as ah, releaseDaemonLock as ai, listVhTerminals as aj, isValidTerminalId as ak, readVhTerminal as al, sendToVhTerminal as am, TITLE_PROMPT_PREFIX as an, BOARD_ANALYZER_PROMPT_PREFIX as ao, startOfflineReconnection as ap, clearCredentials as aq, clearMachineId as ar, SandboxConfigSchema as as, CodexAppServerClient as at, getLatestDaemonLog as au, persistence as av, api as aw, createEnvelope as b, configuration as c, connectionState as d, readSettings as e, encodeBase64 as f, contentLogMetadata as g, errorLogMetadata as h, isValidSessionId as i, packageJson as j, delay as k, logger as l, ensurePrivateDirectorySync as m, hardenPrivateFileSync as n, readDaemonState as o, projectPath as p, clearDaemonState as q, readPersistedSessions as r, streamKeyOf as s, getProjectPath as t, initializeSandbox as u, wrapCommand as v, writePrivateFileSync as w, AsyncLock as x, ensurePrivateDirectory as y, hardenPrivateFile as z };