very-happy-cli 0.2.80 → 0.2.81

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 (31) hide show
  1. package/dist/{AcpBackend-_662AILI.cjs → AcpBackend-B7Z1Gk_l.cjs} +1 -1
  2. package/dist/{AcpBackend-DBJGqMwR.mjs → AcpBackend-cBt4R6ce.mjs} +1 -1
  3. package/dist/{AcpSessionManager-DcWebwii.mjs → AcpSessionManager-AyrINTu7.mjs} +1 -1
  4. package/dist/{AcpSessionManager-ENIrbDWT.cjs → AcpSessionManager-D3-rBUxk.cjs} +1 -1
  5. package/dist/{config-Dn4CC1I_.cjs → config-B2TBK1UZ.cjs} +2 -2
  6. package/dist/{config-DHUFJkEr.mjs → config-CZdNxl3d.mjs} +2 -2
  7. package/dist/{index-C9JZ3wyP.cjs → index-C9UnJZEo.cjs} +4 -4
  8. package/dist/{index-D9OFwx0T.mjs → index-DuvoxKEM.mjs} +5 -5
  9. package/dist/{index-CdmSlaUU.cjs → index-SjWW0gIt.cjs} +74 -24
  10. package/dist/{index-DoLyKWEW.mjs → index-W3oj-d6C.mjs} +71 -21
  11. package/dist/index.cjs +2 -2
  12. package/dist/index.mjs +2 -2
  13. package/dist/{installTerminalHooks-D48YflmS.mjs → installTerminalHooks-BqpxXB8n.mjs} +2 -2
  14. package/dist/{installTerminalHooks-RgJOM2ds.cjs → installTerminalHooks-Xtl0pMWH.cjs} +2 -2
  15. package/dist/lib.cjs +1 -1
  16. package/dist/lib.d.cts +2 -0
  17. package/dist/lib.d.mts +2 -0
  18. package/dist/lib.mjs +1 -1
  19. package/dist/{mcp-CIJ6lM8-.cjs → mcp-BxO80DMH.cjs} +2 -2
  20. package/dist/{mcp-DnO0vHep.mjs → mcp-DqaW6nz5.mjs} +2 -2
  21. package/dist/{runGemini-Cnvz6a6J.mjs → runGemini-Ctc5nKHC.mjs} +4 -4
  22. package/dist/{runGemini-CDko3vdP.cjs → runGemini-DZay2CN7.cjs} +4 -4
  23. package/dist/{runOpenClaw-Cpxdqf9Z.mjs → runOpenClaw-CF0133Vk.mjs} +3 -3
  24. package/dist/{runOpenClaw-Dk_FfroQ.cjs → runOpenClaw-W3Ogud1U.cjs} +3 -3
  25. package/dist/{send-DJWwqdS_.mjs → send-By1xNQ6E.mjs} +2 -2
  26. package/dist/{send-BavRmzTl.cjs → send-D0U0T_bK.cjs} +2 -2
  27. package/dist/{spawn-DWf78N7k.mjs → spawn-BLbFNopc.mjs} +2 -2
  28. package/dist/{spawn-Bqrneceh.cjs → spawn-BnvqaVCf.cjs} +2 -2
  29. package/dist/{types-B2DG32ua.mjs → types-DFKdwxE-.mjs} +23 -9
  30. package/dist/{types-DL98ZceN.cjs → types-DJC5rGtd.cjs} +24 -10
  31. package/package.json +7 -7
@@ -3,7 +3,7 @@
3
3
  var node_child_process = require('node:child_process');
4
4
  var sdk = require('@agentclientprotocol/sdk');
5
5
  var node_crypto = require('node:crypto');
6
- var persistence = require('./types-DL98ZceN.cjs');
6
+ var persistence = require('./types-DJC5rGtd.cjs');
7
7
 
8
8
  const DEFAULT_TIMEOUTS = {
9
9
  /** Default initialization timeout: 60 seconds */
@@ -1,7 +1,7 @@
1
1
  import { spawn } from 'node:child_process';
2
2
  import { ndJsonStream, ClientSideConnection } from '@agentclientprotocol/sdk';
3
3
  import { randomUUID } from 'node:crypto';
4
- import { l as logger, d as contentLogMetadata, e as errorLogMetadata, f as packageJson, g as delay } from './types-B2DG32ua.mjs';
4
+ import { l as logger, d as contentLogMetadata, e as errorLogMetadata, f as packageJson, g as delay } from './types-DFKdwxE-.mjs';
5
5
 
6
6
  const DEFAULT_TIMEOUTS = {
7
7
  /** Default initialization timeout: 60 seconds */
@@ -1,5 +1,5 @@
1
1
  import { createId } from '@paralleldrive/cuid2';
2
- import { b as createEnvelope } from './types-B2DG32ua.mjs';
2
+ import { b as createEnvelope } from './types-DFKdwxE-.mjs';
3
3
 
4
4
  function turnOptions(turnId, time) {
5
5
  return turnId ? { turn: turnId, time } : { time };
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var cuid2 = require('@paralleldrive/cuid2');
4
- var persistence = require('./types-DL98ZceN.cjs');
4
+ var persistence = require('./types-DJC5rGtd.cjs');
5
5
 
6
6
  function turnOptions(turnId, time) {
7
7
  return turnId ? { turn: turnId, time } : { time };
@@ -4,8 +4,8 @@ var fs = require('fs');
4
4
  var path = require('path');
5
5
  var os = require('os');
6
6
  var child_process = require('child_process');
7
- var persistence = require('./types-DL98ZceN.cjs');
8
- var index = require('./index-CdmSlaUU.cjs');
7
+ var persistence = require('./types-DJC5rGtd.cjs');
8
+ var index = require('./index-SjWW0gIt.cjs');
9
9
  require('axios');
10
10
  require('chalk');
11
11
  require('node:util');
@@ -2,8 +2,8 @@ import { existsSync, readFileSync, mkdirSync, writeFileSync } from 'fs';
2
2
  import { join } from 'path';
3
3
  import { homedir } from 'os';
4
4
  import { execSync } from 'child_process';
5
- import { l as logger } from './types-B2DG32ua.mjs';
6
- import { D as DEFAULT_GEMINI_MODEL, G as GEMINI_MODEL_ENV } from './index-DoLyKWEW.mjs';
5
+ import { l as logger } from './types-DFKdwxE-.mjs';
6
+ import { D as DEFAULT_GEMINI_MODEL, G as GEMINI_MODEL_ENV } from './index-W3oj-d6C.mjs';
7
7
  import 'axios';
8
8
  import 'chalk';
9
9
  import 'node:util';
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var AcpBackend = require('./AcpBackend-_662AILI.cjs');
4
- var persistence = require('./types-DL98ZceN.cjs');
5
- var AcpSessionManager = require('./AcpSessionManager-ENIrbDWT.cjs');
3
+ var AcpBackend = require('./AcpBackend-B7Z1Gk_l.cjs');
4
+ var persistence = require('./types-DJC5rGtd.cjs');
5
+ var AcpSessionManager = require('./AcpSessionManager-D3-rBUxk.cjs');
6
6
  var node_crypto = require('node:crypto');
7
7
  var path = require('node:path');
8
- var index = require('./index-CdmSlaUU.cjs');
8
+ var index = require('./index-SjWW0gIt.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-DBJGqMwR.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-DBJGqMwR.mjs';
3
- import { h as connectionState, A as ApiClient, i as readSettings, j as encodeBase64, l as logger, p as projectPath } from './types-B2DG32ua.mjs';
4
- import { A as AcpSessionManager } from './AcpSessionManager-DcWebwii.mjs';
1
+ import { D as DefaultTransport, A as AcpBackend } from './AcpBackend-cBt4R6ce.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-cBt4R6ce.mjs';
3
+ import { h as connectionState, A as ApiClient, i as readSettings, j as encodeBase64, l as logger, p as projectPath } from './types-DFKdwxE-.mjs';
4
+ import { A as AcpSessionManager } from './AcpSessionManager-AyrINTu7.mjs';
5
5
  import { randomUUID } from 'node:crypto';
6
6
  import { join } from 'node:path';
7
- import { i as initialMachineMetadata, d as createSessionMetadata, e as setupOfflineReconnection, n as notifyDaemonSessionStarted, M as MessageQueue2, h as hashObject, f as startHappyServer, r as registerKillSessionHandler, B as BasePermissionHandler } from './index-DoLyKWEW.mjs';
7
+ import { i as initialMachineMetadata, d as createSessionMetadata, e as setupOfflineReconnection, n as notifyDaemonSessionStarted, M as MessageQueue2, h as hashObject, f as startHappyServer, r as registerKillSessionHandler, B as BasePermissionHandler } from './index-W3oj-d6C.mjs';
8
8
  import 'node:child_process';
9
9
  import '@agentclientprotocol/sdk';
10
10
  import 'axios';
@@ -3,7 +3,7 @@
3
3
  var chalk = require('chalk');
4
4
  var os = require('node:os');
5
5
  var node_crypto = require('node:crypto');
6
- var persistence = require('./types-DL98ZceN.cjs');
6
+ var persistence = require('./types-DJC5rGtd.cjs');
7
7
  var spawn = require('cross-spawn');
8
8
  var path = require('node:path');
9
9
  var node_readline = require('node:readline');
@@ -1925,7 +1925,10 @@ async function claudeRemote(opts) {
1925
1925
  });
1926
1926
  if (opts.onQueryReady) {
1927
1927
  opts.onQueryReady({
1928
- setPermissionMode: (mode2) => response.setPermissionMode(mode2)
1928
+ setPermissionMode: (mode2) => response.setPermissionMode(mode2),
1929
+ interrupt: async () => {
1930
+ await response.interrupt();
1931
+ }
1929
1932
  });
1930
1933
  }
1931
1934
  updateThinking(true);
@@ -1943,7 +1946,9 @@ async function claudeRemote(opts) {
1943
1946
  tools: systemInit.tools,
1944
1947
  slashCommands: systemInit.slash_commands,
1945
1948
  mcpServers: systemInit.mcp_servers?.map((s) => ({ name: s.name, status: s.status })),
1946
- skills: systemInit.skills
1949
+ skills: systemInit.skills,
1950
+ model: systemInit.model,
1951
+ modelIsDefault: initial.mode.model == null
1947
1952
  });
1948
1953
  }
1949
1954
  if (systemInit.session_id) {
@@ -2999,6 +3004,47 @@ function applyClaudeResultLifecycle(result, callbacks) {
2999
3004
  callbacks.onCompleted();
3000
3005
  }
3001
3006
 
3007
+ function applyClaudeSdkMetadata(current, update) {
3008
+ return {
3009
+ ...current,
3010
+ tools: update.tools,
3011
+ slashCommands: update.slashCommands,
3012
+ mcpServers: update.mcpServers,
3013
+ skills: update.skills,
3014
+ ...update.modelIsDefault && update.model ? { defaultModelCode: update.model } : {}
3015
+ };
3016
+ }
3017
+
3018
+ function createTurnSteeringController() {
3019
+ let interrupt = null;
3020
+ let steering = false;
3021
+ return {
3022
+ setInterrupt(next) {
3023
+ interrupt = next;
3024
+ },
3025
+ async steer() {
3026
+ if (!interrupt) return false;
3027
+ steering = true;
3028
+ try {
3029
+ await interrupt();
3030
+ return true;
3031
+ } catch (error) {
3032
+ steering = false;
3033
+ throw error;
3034
+ }
3035
+ },
3036
+ consumeReady() {
3037
+ if (!steering) return false;
3038
+ steering = false;
3039
+ return true;
3040
+ },
3041
+ reset() {
3042
+ interrupt = null;
3043
+ steering = false;
3044
+ }
3045
+ };
3046
+ }
3047
+
3002
3048
  async function claudeRemoteLauncher(session) {
3003
3049
  persistence.logger.debug("[claudeRemoteLauncher] Starting remote launcher");
3004
3050
  const hasTTY = process.stdout.isTTY && process.stdin.isTTY;
@@ -3036,6 +3082,7 @@ async function claudeRemoteLauncher(session) {
3036
3082
  let exitReason = null;
3037
3083
  let abortController = null;
3038
3084
  let abortFuture = null;
3085
+ const turnSteering = createTurnSteeringController();
3039
3086
  async function abort() {
3040
3087
  if (abortController && !abortController.signal.aborted) {
3041
3088
  abortController.abort();
@@ -3055,6 +3102,9 @@ async function claudeRemoteLauncher(session) {
3055
3102
  await abort();
3056
3103
  }
3057
3104
  session.client.rpcHandlerManager.registerHandler("abort", doAbort);
3105
+ session.client.rpcHandlerManager.registerHandler("steer", async () => {
3106
+ await turnSteering.steer();
3107
+ });
3058
3108
  session.client.rpcHandlerManager.registerHandler("switch", doSwitch);
3059
3109
  const permissionHandler = new PermissionHandler(session);
3060
3110
  permissionHandler.reset("Previous CLI process exited before responding");
@@ -3276,15 +3326,10 @@ async function claudeRemoteLauncher(session) {
3276
3326
  mcpServerCount: metadata.mcpServers?.length ?? 0,
3277
3327
  skillCount: metadata.skills?.length ?? 0
3278
3328
  });
3279
- session.client.updateMetadata((currentMetadata) => ({
3280
- ...currentMetadata,
3281
- tools: metadata.tools,
3282
- slashCommands: metadata.slashCommands,
3283
- mcpServers: metadata.mcpServers,
3284
- skills: metadata.skills
3285
- }));
3329
+ session.client.updateMetadata((currentMetadata) => applyClaudeSdkMetadata(currentMetadata, metadata));
3286
3330
  },
3287
3331
  onQueryReady: (q) => {
3332
+ turnSteering.setInterrupt(q.interrupt);
3288
3333
  permissionHandler.setPermissionModeUpdater(async (mode2) => {
3289
3334
  await q.setPermissionMode(mode2);
3290
3335
  });
@@ -3302,6 +3347,10 @@ async function claudeRemoteLauncher(session) {
3302
3347
  session.clearSessionId();
3303
3348
  },
3304
3349
  onReady: (result) => {
3350
+ if (turnSteering.consumeReady()) {
3351
+ session.client.closeClaudeSessionTurn("cancelled");
3352
+ return;
3353
+ }
3305
3354
  applyClaudeResultLifecycle(result, {
3306
3355
  closeCompleted: () => session.client.closeClaudeSessionTurn("completed"),
3307
3356
  closeFailed: (error) => session.client.closeClaudeSessionTurn("failed", { error }),
@@ -3339,6 +3388,7 @@ async function claudeRemoteLauncher(session) {
3339
3388
  continue;
3340
3389
  }
3341
3390
  } finally {
3391
+ turnSteering.reset();
3342
3392
  persistence.logger.debug("[remote]: launch finally");
3343
3393
  for (let [toolCallId, { parentToolCallId }] of ongoingToolCalls) {
3344
3394
  const converted = sdkToLogConverter.generateInterruptedToolResult(toolCallId, parentToolCallId);
@@ -8453,7 +8503,7 @@ const MAX_TITLE_CHARS = 60;
8453
8503
  const GENERATION_TIMEOUT_MS = 3e4;
8454
8504
  function resolveClaudeBinary() {
8455
8505
  try {
8456
- 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-CdmSlaUU.cjs', document.baseURI).href)));
8506
+ 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-SjWW0gIt.cjs', document.baseURI).href)));
8457
8507
  const utilsPath = path.resolve(path.join(persistence.projectPath(), "scripts", "claude_version_utils.cjs"));
8458
8508
  const { getClaudeCliPath } = require$1(utilsPath);
8459
8509
  const path$1 = getClaudeCliPath();
@@ -10570,9 +10620,9 @@ function resolveLocalSignupBootstrap(configuredMode, configuredInviteCodes, gene
10570
10620
  };
10571
10621
  }
10572
10622
 
10573
- 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-CdmSlaUU.cjs', document.baseURI).href)));
10623
+ 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-SjWW0gIt.cjs', document.baseURI).href)));
10574
10624
  const __dirname$1 = path.dirname(__filename$1);
10575
- const require_ = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-CdmSlaUU.cjs', document.baseURI).href)));
10625
+ const require_ = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-SjWW0gIt.cjs', document.baseURI).href)));
10576
10626
  const PRISMA_QUERY_ENGINE_FILES = {
10577
10627
  "arm64-darwin": "libquery_engine-darwin-arm64.dylib.node",
10578
10628
  "x64-darwin": "libquery_engine-darwin.dylib.node",
@@ -13184,7 +13234,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
13184
13234
  process.exit(0);
13185
13235
  } else if (subcommand === "install-terminal-hooks") {
13186
13236
  try {
13187
- const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await Promise.resolve().then(function () { return require('./installTerminalHooks-RgJOM2ds.cjs'); });
13237
+ const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await Promise.resolve().then(function () { return require('./installTerminalHooks-Xtl0pMWH.cjs'); });
13188
13238
  const command = parseTerminalHooksArgs(args.slice(1));
13189
13239
  if (command.action === "help") {
13190
13240
  console.log(TERMINAL_HOOKS_HELP);
@@ -13201,7 +13251,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
13201
13251
  }
13202
13252
  } else if (subcommand === "spawn") {
13203
13253
  try {
13204
- const { handleSpawnCommand } = await Promise.resolve().then(function () { return require('./spawn-Bqrneceh.cjs'); });
13254
+ const { handleSpawnCommand } = await Promise.resolve().then(function () { return require('./spawn-BnvqaVCf.cjs'); });
13205
13255
  await handleSpawnCommand(args.slice(1));
13206
13256
  } catch (error) {
13207
13257
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -13213,7 +13263,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
13213
13263
  return;
13214
13264
  } else if (subcommand === "send") {
13215
13265
  try {
13216
- const { handleSendCommand } = await Promise.resolve().then(function () { return require('./send-BavRmzTl.cjs'); });
13266
+ const { handleSendCommand } = await Promise.resolve().then(function () { return require('./send-D0U0T_bK.cjs'); });
13217
13267
  await handleSendCommand(args.slice(1));
13218
13268
  } catch (error) {
13219
13269
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -13319,9 +13369,9 @@ Conversation history is preserved on the server, but in-flight tool calls are in
13319
13369
  if (geminiSubcommand === "project" && args[2] === "set" && args[3]) {
13320
13370
  const projectId = args[3];
13321
13371
  try {
13322
- const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return require('./config-Dn4CC1I_.cjs'); });
13323
- const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await Promise.resolve().then(function () { return require('./types-DL98ZceN.cjs'); }).then(function (n) { return n.persistence; });
13324
- const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./types-DL98ZceN.cjs'); }).then(function (n) { return n.api; });
13372
+ const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return require('./config-B2TBK1UZ.cjs'); });
13373
+ const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await Promise.resolve().then(function () { return require('./types-DJC5rGtd.cjs'); }).then(function (n) { return n.persistence; });
13374
+ const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./types-DJC5rGtd.cjs'); }).then(function (n) { return n.api; });
13325
13375
  let userEmail = void 0;
13326
13376
  try {
13327
13377
  const credentials = await readCredentialsForConfiguredRelay2();
@@ -13352,7 +13402,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
13352
13402
  }
13353
13403
  if (geminiSubcommand === "project" && args[2] === "get") {
13354
13404
  try {
13355
- const { readGeminiLocalConfig } = await Promise.resolve().then(function () { return require('./config-Dn4CC1I_.cjs'); });
13405
+ const { readGeminiLocalConfig } = await Promise.resolve().then(function () { return require('./config-B2TBK1UZ.cjs'); });
13356
13406
  const config = readGeminiLocalConfig();
13357
13407
  if (config.googleCloudProject) {
13358
13408
  console.log(`Current Google Cloud Project: ${config.googleCloudProject}`);
@@ -13392,7 +13442,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
13392
13442
  process.exit(0);
13393
13443
  }
13394
13444
  try {
13395
- const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-CDko3vdP.cjs'); });
13445
+ const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-DZay2CN7.cjs'); });
13396
13446
  let startedBy = void 0;
13397
13447
  for (let i = 1; i < args.length; i++) {
13398
13448
  if (args[i] === "--started-by") {
@@ -13414,7 +13464,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
13414
13464
  return;
13415
13465
  } else if (subcommand === "acp") {
13416
13466
  try {
13417
- const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-C9JZ3wyP.cjs'); });
13467
+ const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-C9UnJZEo.cjs'); });
13418
13468
  let startedBy = void 0;
13419
13469
  let verbose = false;
13420
13470
  const acpArgs = [];
@@ -13454,7 +13504,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
13454
13504
  return;
13455
13505
  } else if (subcommand === "openclaw") {
13456
13506
  try {
13457
- const { runOpenClaw } = await Promise.resolve().then(function () { return require('./runOpenClaw-Dk_FfroQ.cjs'); });
13507
+ const { runOpenClaw } = await Promise.resolve().then(function () { return require('./runOpenClaw-W3Ogud1U.cjs'); });
13458
13508
  let startedBy = void 0;
13459
13509
  let verbose = false;
13460
13510
  let gatewayUrl;
@@ -13505,7 +13555,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
13505
13555
  return;
13506
13556
  } else if (subcommand === "mcp" && args.length === 1) {
13507
13557
  try {
13508
- const { handleMcpCommand } = await Promise.resolve().then(function () { return require('./mcp-CIJ6lM8-.cjs'); });
13558
+ const { handleMcpCommand } = await Promise.resolve().then(function () { return require('./mcp-BxO80DMH.cjs'); });
13509
13559
  await handleMcpCommand();
13510
13560
  } catch (error) {
13511
13561
  process.stderr.write(`[very-happy mcp] Fatal: ${error instanceof Error ? error.message : String(error)}
@@ -1,7 +1,7 @@
1
1
  import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import chalk from 'chalk';
2
2
  import os, { homedir } from 'node:os';
3
3
  import { randomUUID, randomBytes, createHash as createHash$1, timingSafeEqual } from 'node:crypto';
4
- import { n as readDaemonState, l as logger, c as configuration, o as clearDaemonState, q as getProjectPath, p as projectPath, s as initializeSandbox, t as wrapCommand, d as contentLogMetadata, I as InvalidateSync, R as RawJSONLinesSchema, g as delay, u as AsyncLock, f as packageJson, i as readSettings, v as readCredentials, x as credentialRelayProblem, y as deriveLocalCliUpdateSummary, j as encodeBase64, z as updateSettings, B as encodeBase64Url, C as decodeBase64, D as writeCredentialsLegacy, E as writeCredentialsDataKey, F as readCredentialsForConfiguredRelay, G as encrypt, r as readPersistedSessions, H as getLocalHappyAgentCredentialPath, J as readLocalHappyAgentCredentials, K as decryptWithDataKey, L as decryptLegacy, M as extractCompleteLines, N as decideBackfill, O as parseTerminalHookPayload, P as decideMirrorBinding, Q as persistSession, S as MIRROR_BACKFILL_LINES_DEFAULT, T as mirrorLineKey, U as mirrorLocalId, V as detectResumeSupport, W as detectCLIAvailability, X as acquireDaemonLock, Y as summarizeSpawnSessionForLog, Z as deletePersistedSessions, _ as decrypt, $ as writeDaemonState, A as ApiClient, a0 as fetchCliUpdateState, a1 as resolveCliUpdateCheckInterval, a2 as DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS, a3 as releaseDaemonLock, a4 as isValidSessionId, a5 as listVhTerminals, a6 as isValidTerminalId, a7 as readVhTerminal, a8 as sendToVhTerminal, h as connectionState, a9 as startOfflineReconnection, aa as clearCredentials, ab as clearMachineId, k as ensurePrivateDirectorySync, w as writePrivateFileSync, ac as SandboxConfigSchema, b as createEnvelope, ad as CodexAppServerClient, ae as getLatestDaemonLog } from './types-B2DG32ua.mjs';
4
+ import { n as readDaemonState, l as logger, c as configuration, o as clearDaemonState, q as getProjectPath, p as projectPath, s as initializeSandbox, t as wrapCommand, d as contentLogMetadata, I as InvalidateSync, R as RawJSONLinesSchema, g as delay, u as AsyncLock, f as packageJson, i as readSettings, v as readCredentials, x as credentialRelayProblem, y as deriveLocalCliUpdateSummary, j as encodeBase64, z as updateSettings, B as encodeBase64Url, C as decodeBase64, D as writeCredentialsLegacy, E as writeCredentialsDataKey, F as readCredentialsForConfiguredRelay, G as encrypt, r as readPersistedSessions, H as getLocalHappyAgentCredentialPath, J as readLocalHappyAgentCredentials, K as decryptWithDataKey, L as decryptLegacy, M as extractCompleteLines, N as decideBackfill, O as parseTerminalHookPayload, P as decideMirrorBinding, Q as persistSession, S as MIRROR_BACKFILL_LINES_DEFAULT, T as mirrorLineKey, U as mirrorLocalId, V as detectResumeSupport, W as detectCLIAvailability, X as acquireDaemonLock, Y as summarizeSpawnSessionForLog, Z as deletePersistedSessions, _ as decrypt, $ as writeDaemonState, A as ApiClient, a0 as fetchCliUpdateState, a1 as resolveCliUpdateCheckInterval, a2 as DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS, a3 as releaseDaemonLock, a4 as isValidSessionId, a5 as listVhTerminals, a6 as isValidTerminalId, a7 as readVhTerminal, a8 as sendToVhTerminal, h as connectionState, a9 as startOfflineReconnection, aa as clearCredentials, ab as clearMachineId, k as ensurePrivateDirectorySync, w as writePrivateFileSync, ac as SandboxConfigSchema, b as createEnvelope, ad as CodexAppServerClient, ae as getLatestDaemonLog } from './types-DFKdwxE-.mjs';
5
5
  import spawn$1, { spawn } from 'cross-spawn';
6
6
  import path, { join, resolve, isAbsolute, normalize, sep, dirname } from 'node:path';
7
7
  import { createInterface } from 'node:readline';
@@ -1903,7 +1903,10 @@ async function claudeRemote(opts) {
1903
1903
  });
1904
1904
  if (opts.onQueryReady) {
1905
1905
  opts.onQueryReady({
1906
- setPermissionMode: (mode2) => response.setPermissionMode(mode2)
1906
+ setPermissionMode: (mode2) => response.setPermissionMode(mode2),
1907
+ interrupt: async () => {
1908
+ await response.interrupt();
1909
+ }
1907
1910
  });
1908
1911
  }
1909
1912
  updateThinking(true);
@@ -1921,7 +1924,9 @@ async function claudeRemote(opts) {
1921
1924
  tools: systemInit.tools,
1922
1925
  slashCommands: systemInit.slash_commands,
1923
1926
  mcpServers: systemInit.mcp_servers?.map((s) => ({ name: s.name, status: s.status })),
1924
- skills: systemInit.skills
1927
+ skills: systemInit.skills,
1928
+ model: systemInit.model,
1929
+ modelIsDefault: initial.mode.model == null
1925
1930
  });
1926
1931
  }
1927
1932
  if (systemInit.session_id) {
@@ -2977,6 +2982,47 @@ function applyClaudeResultLifecycle(result, callbacks) {
2977
2982
  callbacks.onCompleted();
2978
2983
  }
2979
2984
 
2985
+ function applyClaudeSdkMetadata(current, update) {
2986
+ return {
2987
+ ...current,
2988
+ tools: update.tools,
2989
+ slashCommands: update.slashCommands,
2990
+ mcpServers: update.mcpServers,
2991
+ skills: update.skills,
2992
+ ...update.modelIsDefault && update.model ? { defaultModelCode: update.model } : {}
2993
+ };
2994
+ }
2995
+
2996
+ function createTurnSteeringController() {
2997
+ let interrupt = null;
2998
+ let steering = false;
2999
+ return {
3000
+ setInterrupt(next) {
3001
+ interrupt = next;
3002
+ },
3003
+ async steer() {
3004
+ if (!interrupt) return false;
3005
+ steering = true;
3006
+ try {
3007
+ await interrupt();
3008
+ return true;
3009
+ } catch (error) {
3010
+ steering = false;
3011
+ throw error;
3012
+ }
3013
+ },
3014
+ consumeReady() {
3015
+ if (!steering) return false;
3016
+ steering = false;
3017
+ return true;
3018
+ },
3019
+ reset() {
3020
+ interrupt = null;
3021
+ steering = false;
3022
+ }
3023
+ };
3024
+ }
3025
+
2980
3026
  async function claudeRemoteLauncher(session) {
2981
3027
  logger.debug("[claudeRemoteLauncher] Starting remote launcher");
2982
3028
  const hasTTY = process.stdout.isTTY && process.stdin.isTTY;
@@ -3014,6 +3060,7 @@ async function claudeRemoteLauncher(session) {
3014
3060
  let exitReason = null;
3015
3061
  let abortController = null;
3016
3062
  let abortFuture = null;
3063
+ const turnSteering = createTurnSteeringController();
3017
3064
  async function abort() {
3018
3065
  if (abortController && !abortController.signal.aborted) {
3019
3066
  abortController.abort();
@@ -3033,6 +3080,9 @@ async function claudeRemoteLauncher(session) {
3033
3080
  await abort();
3034
3081
  }
3035
3082
  session.client.rpcHandlerManager.registerHandler("abort", doAbort);
3083
+ session.client.rpcHandlerManager.registerHandler("steer", async () => {
3084
+ await turnSteering.steer();
3085
+ });
3036
3086
  session.client.rpcHandlerManager.registerHandler("switch", doSwitch);
3037
3087
  const permissionHandler = new PermissionHandler(session);
3038
3088
  permissionHandler.reset("Previous CLI process exited before responding");
@@ -3254,15 +3304,10 @@ async function claudeRemoteLauncher(session) {
3254
3304
  mcpServerCount: metadata.mcpServers?.length ?? 0,
3255
3305
  skillCount: metadata.skills?.length ?? 0
3256
3306
  });
3257
- session.client.updateMetadata((currentMetadata) => ({
3258
- ...currentMetadata,
3259
- tools: metadata.tools,
3260
- slashCommands: metadata.slashCommands,
3261
- mcpServers: metadata.mcpServers,
3262
- skills: metadata.skills
3263
- }));
3307
+ session.client.updateMetadata((currentMetadata) => applyClaudeSdkMetadata(currentMetadata, metadata));
3264
3308
  },
3265
3309
  onQueryReady: (q) => {
3310
+ turnSteering.setInterrupt(q.interrupt);
3266
3311
  permissionHandler.setPermissionModeUpdater(async (mode2) => {
3267
3312
  await q.setPermissionMode(mode2);
3268
3313
  });
@@ -3280,6 +3325,10 @@ async function claudeRemoteLauncher(session) {
3280
3325
  session.clearSessionId();
3281
3326
  },
3282
3327
  onReady: (result) => {
3328
+ if (turnSteering.consumeReady()) {
3329
+ session.client.closeClaudeSessionTurn("cancelled");
3330
+ return;
3331
+ }
3283
3332
  applyClaudeResultLifecycle(result, {
3284
3333
  closeCompleted: () => session.client.closeClaudeSessionTurn("completed"),
3285
3334
  closeFailed: (error) => session.client.closeClaudeSessionTurn("failed", { error }),
@@ -3317,6 +3366,7 @@ async function claudeRemoteLauncher(session) {
3317
3366
  continue;
3318
3367
  }
3319
3368
  } finally {
3369
+ turnSteering.reset();
3320
3370
  logger.debug("[remote]: launch finally");
3321
3371
  for (let [toolCallId, { parentToolCallId }] of ongoingToolCalls) {
3322
3372
  const converted = sdkToLogConverter.generateInterruptedToolResult(toolCallId, parentToolCallId);
@@ -13162,7 +13212,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
13162
13212
  process.exit(0);
13163
13213
  } else if (subcommand === "install-terminal-hooks") {
13164
13214
  try {
13165
- const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await import('./installTerminalHooks-D48YflmS.mjs');
13215
+ const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await import('./installTerminalHooks-BqpxXB8n.mjs');
13166
13216
  const command = parseTerminalHooksArgs(args.slice(1));
13167
13217
  if (command.action === "help") {
13168
13218
  console.log(TERMINAL_HOOKS_HELP);
@@ -13179,7 +13229,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
13179
13229
  }
13180
13230
  } else if (subcommand === "spawn") {
13181
13231
  try {
13182
- const { handleSpawnCommand } = await import('./spawn-DWf78N7k.mjs');
13232
+ const { handleSpawnCommand } = await import('./spawn-BLbFNopc.mjs');
13183
13233
  await handleSpawnCommand(args.slice(1));
13184
13234
  } catch (error) {
13185
13235
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -13191,7 +13241,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
13191
13241
  return;
13192
13242
  } else if (subcommand === "send") {
13193
13243
  try {
13194
- const { handleSendCommand } = await import('./send-DJWwqdS_.mjs');
13244
+ const { handleSendCommand } = await import('./send-By1xNQ6E.mjs');
13195
13245
  await handleSendCommand(args.slice(1));
13196
13246
  } catch (error) {
13197
13247
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -13297,9 +13347,9 @@ Conversation history is preserved on the server, but in-flight tool calls are in
13297
13347
  if (geminiSubcommand === "project" && args[2] === "set" && args[3]) {
13298
13348
  const projectId = args[3];
13299
13349
  try {
13300
- const { saveGoogleCloudProjectToConfig } = await import('./config-DHUFJkEr.mjs');
13301
- const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await import('./types-B2DG32ua.mjs').then(function (n) { return n.af; });
13302
- const { ApiClient: ApiClient2 } = await import('./types-B2DG32ua.mjs').then(function (n) { return n.ag; });
13350
+ const { saveGoogleCloudProjectToConfig } = await import('./config-CZdNxl3d.mjs');
13351
+ const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await import('./types-DFKdwxE-.mjs').then(function (n) { return n.af; });
13352
+ const { ApiClient: ApiClient2 } = await import('./types-DFKdwxE-.mjs').then(function (n) { return n.ag; });
13303
13353
  let userEmail = void 0;
13304
13354
  try {
13305
13355
  const credentials = await readCredentialsForConfiguredRelay2();
@@ -13330,7 +13380,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
13330
13380
  }
13331
13381
  if (geminiSubcommand === "project" && args[2] === "get") {
13332
13382
  try {
13333
- const { readGeminiLocalConfig } = await import('./config-DHUFJkEr.mjs');
13383
+ const { readGeminiLocalConfig } = await import('./config-CZdNxl3d.mjs');
13334
13384
  const config = readGeminiLocalConfig();
13335
13385
  if (config.googleCloudProject) {
13336
13386
  console.log(`Current Google Cloud Project: ${config.googleCloudProject}`);
@@ -13370,7 +13420,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
13370
13420
  process.exit(0);
13371
13421
  }
13372
13422
  try {
13373
- const { runGemini } = await import('./runGemini-Cnvz6a6J.mjs');
13423
+ const { runGemini } = await import('./runGemini-Ctc5nKHC.mjs');
13374
13424
  let startedBy = void 0;
13375
13425
  for (let i = 1; i < args.length; i++) {
13376
13426
  if (args[i] === "--started-by") {
@@ -13392,7 +13442,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
13392
13442
  return;
13393
13443
  } else if (subcommand === "acp") {
13394
13444
  try {
13395
- const { runAcp, resolveAcpAgentConfig } = await import('./index-D9OFwx0T.mjs');
13445
+ const { runAcp, resolveAcpAgentConfig } = await import('./index-DuvoxKEM.mjs');
13396
13446
  let startedBy = void 0;
13397
13447
  let verbose = false;
13398
13448
  const acpArgs = [];
@@ -13432,7 +13482,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
13432
13482
  return;
13433
13483
  } else if (subcommand === "openclaw") {
13434
13484
  try {
13435
- const { runOpenClaw } = await import('./runOpenClaw-Cpxdqf9Z.mjs');
13485
+ const { runOpenClaw } = await import('./runOpenClaw-CF0133Vk.mjs');
13436
13486
  let startedBy = void 0;
13437
13487
  let verbose = false;
13438
13488
  let gatewayUrl;
@@ -13483,7 +13533,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
13483
13533
  return;
13484
13534
  } else if (subcommand === "mcp" && args.length === 1) {
13485
13535
  try {
13486
- const { handleMcpCommand } = await import('./mcp-DnO0vHep.mjs');
13536
+ const { handleMcpCommand } = await import('./mcp-DqaW6nz5.mjs');
13487
13537
  await handleMcpCommand();
13488
13538
  } catch (error) {
13489
13539
  process.stderr.write(`[very-happy mcp] Fatal: ${error instanceof Error ? error.message : String(error)}
package/dist/index.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  require('chalk');
4
- require('./index-CdmSlaUU.cjs');
5
- require('./types-DL98ZceN.cjs');
4
+ require('./index-SjWW0gIt.cjs');
5
+ require('./types-DJC5rGtd.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-DoLyKWEW.mjs';
3
- import './types-B2DG32ua.mjs';
2
+ import './index-W3oj-d6C.mjs';
3
+ import './types-DFKdwxE-.mjs';
4
4
  import 'zod';
5
5
  import 'node:child_process';
6
6
  import 'node:os';
@@ -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-B2DG32ua.mjs';
7
- import { t as tmuxSupportsSessionEnv } from './index-DoLyKWEW.mjs';
6
+ import { p as projectPath } from './types-DFKdwxE-.mjs';
7
+ import { t as tmuxSupportsSessionEnv } from './index-W3oj-d6C.mjs';
8
8
  import 'axios';
9
9
  import 'node:util';
10
10
  import 'node:fs/promises';
@@ -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-DL98ZceN.cjs');
9
- var index = require('./index-CdmSlaUU.cjs');
8
+ var persistence = require('./types-DJC5rGtd.cjs');
9
+ var index = require('./index-SjWW0gIt.cjs');
10
10
  require('axios');
11
11
  require('node:util');
12
12
  require('node:fs/promises');
package/dist/lib.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var persistence = require('./types-DL98ZceN.cjs');
3
+ var persistence = require('./types-DJC5rGtd.cjs');
4
4
  require('axios');
5
5
  require('chalk');
6
6
  require('node:util');
package/dist/lib.d.cts CHANGED
@@ -388,6 +388,8 @@ type Metadata = {
388
388
  description?: string | null;
389
389
  }>;
390
390
  currentModelCode?: string;
391
+ /** Resolved SDK model when no per-message model override was supplied. */
392
+ defaultModelCode?: string;
391
393
  operatingModes?: Array<{
392
394
  code: string;
393
395
  value: string;
package/dist/lib.d.mts CHANGED
@@ -388,6 +388,8 @@ type Metadata = {
388
388
  description?: string | null;
389
389
  }>;
390
390
  currentModelCode?: string;
391
+ /** Resolved SDK model when no per-message model override was supplied. */
392
+ defaultModelCode?: string;
391
393
  operatingModes?: Array<{
392
394
  code: string;
393
395
  value: string;
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-B2DG32ua.mjs';
1
+ export { A as ApiClient, a as ApiSessionClient, R as RawJSONLinesSchema, c as configuration, l as logger } from './types-DFKdwxE-.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-CdmSlaUU.cjs');
6
+ var index = require('./index-SjWW0gIt.cjs');
7
7
  var limits = require('./limits-KdWKmwtH.cjs');
8
- var persistence = require('./types-DL98ZceN.cjs');
8
+ var persistence = require('./types-DJC5rGtd.cjs');
9
9
  require('chalk');
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 } from './index-DoLyKWEW.mjs';
4
+ import { p as pushClipboardViaDaemon } from './index-W3oj-d6C.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-B2DG32ua.mjs';
6
+ import { l as logger } from './types-DFKdwxE-.mjs';
7
7
  import 'chalk';
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, h as connectionState, A as ApiClient, i as readSettings, e as errorLogMetadata, j as encodeBase64, p as projectPath, d as contentLogMetadata } from './types-B2DG32ua.mjs';
6
- import { g as GEMINI_API_KEY_ENV, j as GOOGLE_API_KEY_ENV, G as GEMINI_MODEL_ENV, B as BasePermissionHandler, k as BaseReasoningProcessor, i as initialMachineMetadata, d as createSessionMetadata, e as setupOfflineReconnection, n as notifyDaemonSessionStarted, M as MessageQueue2, h as hashObject, l as MessageBuffer, C as CHANGE_TITLE_INSTRUCTION, r as registerKillSessionHandler, f as startHappyServer } from './index-DoLyKWEW.mjs';
7
- import { A as AcpBackend } from './AcpBackend-DBJGqMwR.mjs';
8
- import { readGeminiLocalConfig, determineGeminiModel, getGeminiModelSource, getInitialGeminiModel, saveGeminiModelToConfig } from './config-DHUFJkEr.mjs';
5
+ import { l as logger, h as connectionState, A as ApiClient, i as readSettings, e as errorLogMetadata, j as encodeBase64, p as projectPath, d as contentLogMetadata } from './types-DFKdwxE-.mjs';
6
+ import { g as GEMINI_API_KEY_ENV, j as GOOGLE_API_KEY_ENV, G as GEMINI_MODEL_ENV, B as BasePermissionHandler, k as BaseReasoningProcessor, i as initialMachineMetadata, d as createSessionMetadata, e as setupOfflineReconnection, n as notifyDaemonSessionStarted, M as MessageQueue2, h as hashObject, l as MessageBuffer, C as CHANGE_TITLE_INSTRUCTION, r as registerKillSessionHandler, f as startHappyServer } from './index-W3oj-d6C.mjs';
7
+ import { A as AcpBackend } from './AcpBackend-cBt4R6ce.mjs';
8
+ import { readGeminiLocalConfig, determineGeminiModel, getGeminiModelSource, getInitialGeminiModel, saveGeminiModelToConfig } from './config-CZdNxl3d.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-DL98ZceN.cjs');
8
- var index = require('./index-CdmSlaUU.cjs');
9
- var AcpBackend = require('./AcpBackend-_662AILI.cjs');
10
- var config = require('./config-Dn4CC1I_.cjs');
7
+ var persistence = require('./types-DJC5rGtd.cjs');
8
+ var index = require('./index-SjWW0gIt.cjs');
9
+ var AcpBackend = require('./AcpBackend-B7Z1Gk_l.cjs');
10
+ var config = require('./config-B2TBK1UZ.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 { k as ensurePrivateDirectorySync, m as hardenPrivateFileSync, w as writePrivateFileSync, e as errorLogMetadata, d as contentLogMetadata, h as connectionState, A as ApiClient, i as readSettings, j as encodeBase64, l as logger, c as configuration } from './types-B2DG32ua.mjs';
7
- import { A as AcpSessionManager } from './AcpSessionManager-DcWebwii.mjs';
8
- import { i as initialMachineMetadata, d as createSessionMetadata, e as setupOfflineReconnection, n as notifyDaemonSessionStarted, M as MessageQueue2, r as registerKillSessionHandler } from './index-DoLyKWEW.mjs';
6
+ import { k as ensurePrivateDirectorySync, m as hardenPrivateFileSync, w as writePrivateFileSync, e as errorLogMetadata, d as contentLogMetadata, h as connectionState, A as ApiClient, i as readSettings, j as encodeBase64, l as logger, c as configuration } from './types-DFKdwxE-.mjs';
7
+ import { A as AcpSessionManager } from './AcpSessionManager-AyrINTu7.mjs';
8
+ import { i as initialMachineMetadata, d as createSessionMetadata, e as setupOfflineReconnection, n as notifyDaemonSessionStarted, M as MessageQueue2, r as registerKillSessionHandler } from './index-W3oj-d6C.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-DL98ZceN.cjs');
9
- var AcpSessionManager = require('./AcpSessionManager-ENIrbDWT.cjs');
10
- var index = require('./index-CdmSlaUU.cjs');
8
+ var persistence = require('./types-DJC5rGtd.cjs');
9
+ var AcpSessionManager = require('./AcpSessionManager-D3-rBUxk.cjs');
10
+ var index = require('./index-SjWW0gIt.cjs');
11
11
  var WebSocket = require('ws');
12
12
  var ed = require('@noble/ed25519');
13
13
  var sha2_js = require('@noble/hashes/sha2.js');
@@ -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-B2DG32ua.mjs';
5
- import { b as sendUserMessage, a as sessionWebUrl } from './index-DoLyKWEW.mjs';
4
+ import { r as readPersistedSessions, c as configuration } from './types-DFKdwxE-.mjs';
5
+ import { b as sendUserMessage, a as sessionWebUrl } from './index-W3oj-d6C.mjs';
6
6
  import 'axios';
7
7
  import 'node:util';
8
8
  import 'node:os';
@@ -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-DL98ZceN.cjs');
7
- var index = require('./index-CdmSlaUU.cjs');
6
+ var persistence = require('./types-DJC5rGtd.cjs');
7
+ var index = require('./index-SjWW0gIt.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, statSync } from 'node:fs';
3
3
  import { resolve } from 'node:path';
4
- import { c as checkIfDaemonRunningAndCleanupStaleState, s as spawnDaemonSession, a as sessionWebUrl, w as waitForSessionKey, b as sendUserMessage } from './index-DoLyKWEW.mjs';
5
- import { l as logger } from './types-B2DG32ua.mjs';
4
+ import { c as checkIfDaemonRunningAndCleanupStaleState, s as spawnDaemonSession, a as sessionWebUrl, w as waitForSessionKey, b as sendUserMessage } from './index-W3oj-d6C.mjs';
5
+ import { l as logger } from './types-DFKdwxE-.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-CdmSlaUU.cjs');
7
- var persistence = require('./types-DL98ZceN.cjs');
6
+ var index = require('./index-SjWW0gIt.cjs');
7
+ var persistence = require('./types-DJC5rGtd.cjs');
8
8
  require('node:os');
9
9
  require('node:crypto');
10
10
  require('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.80";
32
+ var version = "0.2.81";
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.80",
146
- "very-happy-tools-x64-darwin": "0.2.80",
147
- "very-happy-tools-arm64-linux": "0.2.80",
148
- "very-happy-tools-x64-linux": "0.2.80",
149
- "very-happy-tools-arm64-win32": "0.2.80",
150
- "very-happy-tools-x64-win32": "0.2.80"
145
+ "very-happy-tools-arm64-darwin": "0.2.81",
146
+ "very-happy-tools-x64-darwin": "0.2.81",
147
+ "very-happy-tools-arm64-linux": "0.2.81",
148
+ "very-happy-tools-x64-linux": "0.2.81",
149
+ "very-happy-tools-arm64-win32": "0.2.81",
150
+ "very-happy-tools-x64-win32": "0.2.81"
151
151
  };
152
152
  var devDependencies = {
153
153
  "@slopus/happy-wire": "workspace:*",
@@ -10001,6 +10001,9 @@ function defaultShell() {
10001
10001
  function tmuxNewSessionArgs(session, cols, rows, cwd, envFlags, shell) {
10002
10002
  return ["new-session", "-d", ...envFlags, "-s", session, "-x", String(cols), "-y", String(rows), "-c", cwd, shell];
10003
10003
  }
10004
+ function shouldUseDirectPtyFallback(attachOnly, createdNew, sessionAlive) {
10005
+ return !attachOnly && !createdNew && !sessionAlive;
10006
+ }
10004
10007
  function ptyEnv() {
10005
10008
  const env = {};
10006
10009
  for (const [k, v] of Object.entries(process.env)) {
@@ -10675,7 +10678,7 @@ class WebTerminalManager {
10675
10678
  ] : [];
10676
10679
  const created = spawnSync(
10677
10680
  "tmux",
10678
- ["new-session", "-d", ...envFlags, "-s", name, "-x", "120", "-y", "30", "-c", plan.cwd],
10681
+ tmuxNewSessionArgs(name, 120, 30, plan.cwd, envFlags, defaultShell()),
10679
10682
  { stdio: "ignore", timeout: TMUX_CREATE_TIMEOUT_MS, env }
10680
10683
  );
10681
10684
  const live = created.status === 0 && spawnSync(
@@ -10917,7 +10920,7 @@ class WebTerminalManager {
10917
10920
  ["has-session", "-t", `=${tmuxSession}:`],
10918
10921
  { stdio: "ignore", timeout: TMUX_PROBE_TIMEOUT_MS, env }
10919
10922
  ).status === 0;
10920
- if (!alive) {
10923
+ if (shouldUseDirectPtyFallback(attachOnly, createdNew, alive)) {
10921
10924
  const retry = spawnSync(
10922
10925
  "tmux",
10923
10926
  tmuxNewSessionArgs(tmuxSession, cols, rows, cwd, envFlags, defaultShell()),
@@ -10937,6 +10940,17 @@ class WebTerminalManager {
10937
10940
  }
10938
10941
  }
10939
10942
  }
10943
+ if (!attachOnly && !createdNew) {
10944
+ const alive = spawnSync(
10945
+ "tmux",
10946
+ ["has-session", "-t", `=${tmuxSession}:`],
10947
+ { stdio: "ignore", timeout: TMUX_PROBE_TIMEOUT_MS, env }
10948
+ ).status === 0;
10949
+ if (!alive) {
10950
+ logger.info(`[WEB TERMINAL] tmux session creation unavailable; using direct PTY for ${id}`);
10951
+ tmuxSession = void 0;
10952
+ }
10953
+ }
10940
10954
  } else {
10941
10955
  file = defaultShell();
10942
10956
  args = [];
@@ -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.80";
54
+ var version = "0.2.81";
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.80",
168
- "very-happy-tools-x64-darwin": "0.2.80",
169
- "very-happy-tools-arm64-linux": "0.2.80",
170
- "very-happy-tools-x64-linux": "0.2.80",
171
- "very-happy-tools-arm64-win32": "0.2.80",
172
- "very-happy-tools-x64-win32": "0.2.80"
167
+ "very-happy-tools-arm64-darwin": "0.2.81",
168
+ "very-happy-tools-x64-darwin": "0.2.81",
169
+ "very-happy-tools-arm64-linux": "0.2.81",
170
+ "very-happy-tools-x64-linux": "0.2.81",
171
+ "very-happy-tools-arm64-win32": "0.2.81",
172
+ "very-happy-tools-x64-win32": "0.2.81"
173
173
  };
174
174
  var devDependencies = {
175
175
  "@slopus/happy-wire": "workspace:*",
@@ -1480,7 +1480,7 @@ class RpcHandlerManager {
1480
1480
  }
1481
1481
  }
1482
1482
 
1483
- 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-DL98ZceN.cjs', document.baseURI).href))));
1483
+ 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-DJC5rGtd.cjs', document.baseURI).href))));
1484
1484
  function projectPath() {
1485
1485
  const path = path$1.resolve(__dirname$1, "..");
1486
1486
  return path;
@@ -10023,6 +10023,9 @@ function defaultShell() {
10023
10023
  function tmuxNewSessionArgs(session, cols, rows, cwd, envFlags, shell) {
10024
10024
  return ["new-session", "-d", ...envFlags, "-s", session, "-x", String(cols), "-y", String(rows), "-c", cwd, shell];
10025
10025
  }
10026
+ function shouldUseDirectPtyFallback(attachOnly, createdNew, sessionAlive) {
10027
+ return !attachOnly && !createdNew && !sessionAlive;
10028
+ }
10026
10029
  function ptyEnv() {
10027
10030
  const env = {};
10028
10031
  for (const [k, v] of Object.entries(process.env)) {
@@ -10697,7 +10700,7 @@ class WebTerminalManager {
10697
10700
  ] : [];
10698
10701
  const created = node_child_process.spawnSync(
10699
10702
  "tmux",
10700
- ["new-session", "-d", ...envFlags, "-s", name, "-x", "120", "-y", "30", "-c", plan.cwd],
10703
+ tmuxNewSessionArgs(name, 120, 30, plan.cwd, envFlags, defaultShell()),
10701
10704
  { stdio: "ignore", timeout: TMUX_CREATE_TIMEOUT_MS, env }
10702
10705
  );
10703
10706
  const live = created.status === 0 && node_child_process.spawnSync(
@@ -10939,7 +10942,7 @@ class WebTerminalManager {
10939
10942
  ["has-session", "-t", `=${tmuxSession}:`],
10940
10943
  { stdio: "ignore", timeout: TMUX_PROBE_TIMEOUT_MS, env }
10941
10944
  ).status === 0;
10942
- if (!alive) {
10945
+ if (shouldUseDirectPtyFallback(attachOnly, createdNew, alive)) {
10943
10946
  const retry = node_child_process.spawnSync(
10944
10947
  "tmux",
10945
10948
  tmuxNewSessionArgs(tmuxSession, cols, rows, cwd, envFlags, defaultShell()),
@@ -10959,6 +10962,17 @@ class WebTerminalManager {
10959
10962
  }
10960
10963
  }
10961
10964
  }
10965
+ if (!attachOnly && !createdNew) {
10966
+ const alive = node_child_process.spawnSync(
10967
+ "tmux",
10968
+ ["has-session", "-t", `=${tmuxSession}:`],
10969
+ { stdio: "ignore", timeout: TMUX_PROBE_TIMEOUT_MS, env }
10970
+ ).status === 0;
10971
+ if (!alive) {
10972
+ logger.info(`[WEB TERMINAL] tmux session creation unavailable; using direct PTY for ${id}`);
10973
+ tmuxSession = void 0;
10974
+ }
10975
+ }
10962
10976
  } else {
10963
10977
  file = defaultShell();
10964
10978
  args = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "very-happy-cli",
3
- "version": "0.2.80",
3
+ "version": "0.2.81",
4
4
  "description": "Remote multi-agent workspace CLI with deep Claude integration, native terminal streaming, and self-hosting.",
5
5
  "author": "Kirill Dubovitskiy",
6
6
  "contributors": [
@@ -113,12 +113,12 @@
113
113
  "zod": "^4.0.0"
114
114
  },
115
115
  "optionalDependencies": {
116
- "very-happy-tools-arm64-darwin": "0.2.80",
117
- "very-happy-tools-x64-darwin": "0.2.80",
118
- "very-happy-tools-arm64-linux": "0.2.80",
119
- "very-happy-tools-x64-linux": "0.2.80",
120
- "very-happy-tools-arm64-win32": "0.2.80",
121
- "very-happy-tools-x64-win32": "0.2.80"
116
+ "very-happy-tools-arm64-darwin": "0.2.81",
117
+ "very-happy-tools-x64-darwin": "0.2.81",
118
+ "very-happy-tools-arm64-linux": "0.2.81",
119
+ "very-happy-tools-x64-linux": "0.2.81",
120
+ "very-happy-tools-arm64-win32": "0.2.81",
121
+ "very-happy-tools-x64-win32": "0.2.81"
122
122
  },
123
123
  "devDependencies": {
124
124
  "@slopus/happy-wire": "workspace:*",