very-happy-cli 0.2.84 → 0.2.86

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-DxoxNKOM.cjs → AcpBackend-CnDmOAKz.cjs} +1 -1
  2. package/dist/{AcpBackend-BgOEcqMG.mjs → AcpBackend-DyJXz2cV.mjs} +1 -1
  3. package/dist/{AcpSessionManager-_bG1kjZz.cjs → AcpSessionManager-CDS2s3H8.cjs} +1 -1
  4. package/dist/{AcpSessionManager-Ba9ON7eK.mjs → AcpSessionManager-CzZ_5XwN.mjs} +1 -1
  5. package/dist/{config-Dv2kzos6.cjs → config-Cw_3dY3i.cjs} +2 -2
  6. package/dist/{config-CQjk8rce.mjs → config-b8y6YTtW.mjs} +2 -2
  7. package/dist/{index-CULwez6o.cjs → index-BeCsCfgr.cjs} +4 -4
  8. package/dist/{index-Cc2VYKqa.mjs → index-BsVwUyNS.mjs} +5 -5
  9. package/dist/{index-B8UoTir2.cjs → index-CzSk11Ko.cjs} +148 -27
  10. package/dist/{index-Cnb_eI7Q.mjs → index-HVcBQWc_.mjs} +145 -24
  11. package/dist/index.cjs +2 -2
  12. package/dist/index.mjs +2 -2
  13. package/dist/{installTerminalHooks-C-8Vuwlu.mjs → installTerminalHooks-BxELtnAg.mjs} +2 -2
  14. package/dist/{installTerminalHooks-mk1QIEvp.cjs → installTerminalHooks-CyGiM6kp.cjs} +2 -2
  15. package/dist/lib.cjs +1 -1
  16. package/dist/lib.d.cts +6 -0
  17. package/dist/lib.d.mts +6 -0
  18. package/dist/lib.mjs +1 -1
  19. package/dist/{mcp-X7yyQ2d_.cjs → mcp-BjK-A9P8.cjs} +2 -2
  20. package/dist/{mcp-BZba259A.mjs → mcp-DELG3yID.mjs} +2 -2
  21. package/dist/{runGemini-Nig1hb70.mjs → runGemini-BBhQGbGW.mjs} +4 -4
  22. package/dist/{runGemini-Cf_FQOrg.cjs → runGemini-SNeOUgOy.cjs} +4 -4
  23. package/dist/{runOpenClaw-DllszOSy.mjs → runOpenClaw-CtmTc9vT.mjs} +3 -3
  24. package/dist/{runOpenClaw-BlZkYWEQ.cjs → runOpenClaw-DKVWdqEe.cjs} +3 -3
  25. package/dist/{send-C6-E03t-.mjs → send-DIvt2Nop.mjs} +2 -2
  26. package/dist/{send-DZIY545W.cjs → send-DefYtEsA.cjs} +2 -2
  27. package/dist/{spawn-hjPuTkvH.mjs → spawn-BX0cmn9s.mjs} +2 -2
  28. package/dist/{spawn-Cm52jfN6.cjs → spawn-rykblFJB.cjs} +2 -2
  29. package/dist/{types-Dudpkl_i.cjs → types-CsnC0xzi.cjs} +20 -12
  30. package/dist/{types-Bv1nc9M1.mjs → types-cfTs9Xpw.mjs} +19 -11
  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-Dudpkl_i.cjs');
6
+ var persistence = require('./types-CsnC0xzi.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-Bv1nc9M1.mjs';
4
+ import { l as logger, d as contentLogMetadata, e as errorLogMetadata, f as packageJson, g as delay } from './types-cfTs9Xpw.mjs';
5
5
 
6
6
  const DEFAULT_TIMEOUTS = {
7
7
  /** Default initialization timeout: 60 seconds */
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var cuid2 = require('@paralleldrive/cuid2');
4
- var persistence = require('./types-Dudpkl_i.cjs');
4
+ var persistence = require('./types-CsnC0xzi.cjs');
5
5
 
6
6
  function turnOptions(turnId, time) {
7
7
  return turnId ? { turn: turnId, time } : { time };
@@ -1,5 +1,5 @@
1
1
  import { createId } from '@paralleldrive/cuid2';
2
- import { b as createEnvelope } from './types-Bv1nc9M1.mjs';
2
+ import { b as createEnvelope } from './types-cfTs9Xpw.mjs';
3
3
 
4
4
  function turnOptions(turnId, time) {
5
5
  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-Dudpkl_i.cjs');
8
- var index = require('./index-B8UoTir2.cjs');
7
+ var persistence = require('./types-CsnC0xzi.cjs');
8
+ var index = require('./index-CzSk11Ko.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-Bv1nc9M1.mjs';
6
- import { D as DEFAULT_GEMINI_MODEL, G as GEMINI_MODEL_ENV } from './index-Cnb_eI7Q.mjs';
5
+ import { l as logger } from './types-cfTs9Xpw.mjs';
6
+ import { D as DEFAULT_GEMINI_MODEL, G as GEMINI_MODEL_ENV } from './index-HVcBQWc_.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-DxoxNKOM.cjs');
4
- var persistence = require('./types-Dudpkl_i.cjs');
5
- var AcpSessionManager = require('./AcpSessionManager-_bG1kjZz.cjs');
3
+ var AcpBackend = require('./AcpBackend-CnDmOAKz.cjs');
4
+ var persistence = require('./types-CsnC0xzi.cjs');
5
+ var AcpSessionManager = require('./AcpSessionManager-CDS2s3H8.cjs');
6
6
  var node_crypto = require('node:crypto');
7
7
  var path = require('node:path');
8
- var index = require('./index-B8UoTir2.cjs');
8
+ var index = require('./index-CzSk11Ko.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-BgOEcqMG.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-BgOEcqMG.mjs';
3
- import { h as connectionState, A as ApiClient, i as readSettings, j as encodeBase64, l as logger, p as projectPath } from './types-Bv1nc9M1.mjs';
4
- import { A as AcpSessionManager } from './AcpSessionManager-Ba9ON7eK.mjs';
1
+ import { D as DefaultTransport, A as AcpBackend } from './AcpBackend-DyJXz2cV.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-DyJXz2cV.mjs';
3
+ import { h as connectionState, A as ApiClient, i as readSettings, j as encodeBase64, l as logger, p as projectPath } from './types-cfTs9Xpw.mjs';
4
+ import { A as AcpSessionManager } from './AcpSessionManager-CzZ_5XwN.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-Cnb_eI7Q.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-HVcBQWc_.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-Dudpkl_i.cjs');
6
+ var persistence = require('./types-CsnC0xzi.cjs');
7
7
  var spawn = require('cross-spawn');
8
8
  var path = require('node:path');
9
9
  var node_readline = require('node:readline');
@@ -286,6 +286,8 @@ class Session {
286
286
  hadAssistantOutputThisTurn = false;
287
287
  /** Last assistant text snippet seen this turn, used as the reply_done body. */
288
288
  lastAssistantSnippet;
289
+ /** Live remote-query input sink. Absent in local mode and between SDK queries. */
290
+ steerHandler = null;
289
291
  /** Callbacks to be notified when session ID is found/changed */
290
292
  sessionFoundCallbacks = [];
291
293
  /** Keep alive interval reference for cleanup */
@@ -326,8 +328,22 @@ class Session {
326
328
  cleanup = () => {
327
329
  clearInterval(this.keepAliveInterval);
328
330
  this.sessionFoundCallbacks = [];
331
+ this.steerHandler = null;
329
332
  persistence.logger.debug("[Session] Cleaned up resources");
330
333
  };
334
+ /** Register the current remote query's Steer sink; null removes it. */
335
+ setSteerHandler = (handler) => {
336
+ this.steerHandler = handler;
337
+ };
338
+ /**
339
+ * Attempt same-turn delivery. A stale Web "working" snapshot must never
340
+ * lose a message: once the turn is no longer thinking, return false and
341
+ * let runClaude fall back to the ordinary next-turn queue.
342
+ */
343
+ trySteer = async (input) => {
344
+ if (!this.thinking || !this.steerHandler) return false;
345
+ return this.steerHandler(input);
346
+ };
331
347
  onThinkingChange = (thinking) => {
332
348
  if (thinking && !this.thinking) {
333
349
  this.hadAssistantOutputThisTurn = false;
@@ -1916,6 +1932,7 @@ async function claudeRemote(opts) {
1916
1932
  messages.push({
1917
1933
  type: "user",
1918
1934
  parent_tool_use_id: null,
1935
+ origin: { kind: "human" },
1919
1936
  message: {
1920
1937
  role: "user",
1921
1938
  content: initial.message
@@ -1930,6 +1947,16 @@ async function claudeRemote(opts) {
1930
1947
  setPermissionMode: (mode2) => response.setPermissionMode(mode2),
1931
1948
  interrupt: async () => {
1932
1949
  await response.interrupt();
1950
+ },
1951
+ steer: (message, nextMode) => {
1952
+ mode = nextMode;
1953
+ messages.push({
1954
+ type: "user",
1955
+ parent_tool_use_id: null,
1956
+ priority: "now",
1957
+ origin: { kind: "human" },
1958
+ message: { role: "user", content: message }
1959
+ });
1933
1960
  }
1934
1961
  });
1935
1962
  }
@@ -1982,7 +2009,13 @@ async function claudeRemote(opts) {
1982
2009
  messages.end();
1983
2010
  } else {
1984
2011
  mode = next.mode;
1985
- messages.push({ type: "user", parent_tool_use_id: null, message: { role: "user", content: next.message } });
2012
+ updateThinking(true);
2013
+ messages.push({
2014
+ type: "user",
2015
+ parent_tool_use_id: null,
2016
+ origin: { kind: "human" },
2017
+ message: { role: "user", content: next.message }
2018
+ });
1986
2019
  }
1987
2020
  }).catch(() => {
1988
2021
  messages.end();
@@ -2079,16 +2112,7 @@ class PermissionHandler {
2079
2112
  });
2080
2113
  if (response.approved) {
2081
2114
  const newMode = response.mode && ["default", "acceptEdits", "bypassPermissions"].includes(response.mode) ? response.mode : "default";
2082
- persistence.logger.debug(`Plan approved - switching to ${newMode} mode and allowing ExitPlanMode`);
2083
- try {
2084
- if (!this.setPermissionModeCallback) throw new Error("permission mode updater unavailable");
2085
- await this.setPermissionModeCallback(newMode);
2086
- } catch (err) {
2087
- const reason = `Failed to switch permission mode: ${err instanceof Error ? err.message : String(err)}`;
2088
- persistence.logger.debug(reason);
2089
- pending.resolve({ behavior: "deny", message: reason });
2090
- return { ...response, approved: false, reason };
2091
- }
2115
+ persistence.logger.debug(`Plan approved - allowing ExitPlanMode with ${newMode} as the local follow-up mode`);
2092
2116
  this.permissionMode = newMode;
2093
2117
  pending.resolve({ behavior: "allow", updatedInput: pending.input || {} });
2094
2118
  } else {
@@ -2548,6 +2572,50 @@ function formatClaudeMessageForInk(message, messageBuffer, onAssistantResult) {
2548
2572
  }
2549
2573
  }
2550
2574
 
2575
+ const INTERRUPT_SENTINEL = /^\[Request interrupted by user(?: for tool use)?\]$/i;
2576
+ const EDE_DIAGNOSTIC_PREFIX = "[ede_diagnostic]";
2577
+ const SDK_ERROR_PREFIX = "Claude Code returned an error result:";
2578
+ function textBlocks(content) {
2579
+ if (!Array.isArray(content) || content.length === 0) return null;
2580
+ const texts = [];
2581
+ for (const block of content) {
2582
+ if (!block || typeof block !== "object" || block.type !== "text") {
2583
+ return null;
2584
+ }
2585
+ const text = block.text;
2586
+ if (typeof text !== "string") return null;
2587
+ texts.push(text.trim());
2588
+ }
2589
+ return texts;
2590
+ }
2591
+ function isClaudeInterruptSentinelContent(content) {
2592
+ if (typeof content === "string") {
2593
+ return INTERRUPT_SENTINEL.test(content.trim());
2594
+ }
2595
+ const texts = textBlocks(content);
2596
+ return texts !== null && texts.length > 0 && texts.every((text) => INTERRUPT_SENTINEL.test(text));
2597
+ }
2598
+ function resultErrors(value) {
2599
+ if (!value || typeof value !== "object") return [];
2600
+ const errors = value.errors;
2601
+ if (!Array.isArray(errors) || errors.length === 0 || errors.some((error) => typeof error !== "string")) {
2602
+ return [];
2603
+ }
2604
+ return errors.map((error) => error.trim()).filter(Boolean);
2605
+ }
2606
+ function isClaudeEdeOnlyResult(value) {
2607
+ const errors = resultErrors(value);
2608
+ return errors.length > 0 && errors.every((error) => error.startsWith(EDE_DIAGNOSTIC_PREFIX));
2609
+ }
2610
+ function isClaudeEdeOnlySdkError(error) {
2611
+ if (!(error instanceof Error)) return false;
2612
+ const message = error.message.trim();
2613
+ if (!message.startsWith(SDK_ERROR_PREFIX)) return false;
2614
+ const payload = message.slice(SDK_ERROR_PREFIX.length).trim();
2615
+ const entries = payload.split(/[;\n]+/).map((entry) => entry.trim()).filter(Boolean);
2616
+ return entries.length > 0 && entries.every((entry) => entry.startsWith(EDE_DIAGNOSTIC_PREFIX));
2617
+ }
2618
+
2551
2619
  function getGitBranch(cwd) {
2552
2620
  try {
2553
2621
  const branch = node_child_process.execSync("git rev-parse --abbrev-ref HEAD", {
@@ -2566,6 +2634,7 @@ class SDKToLogConverter {
2566
2634
  context;
2567
2635
  responses;
2568
2636
  sidechainLastUUID = /* @__PURE__ */ new Map();
2637
+ sawInterruptSentinel = false;
2569
2638
  constructor(context, responses) {
2570
2639
  this.context = {
2571
2640
  ...context,
@@ -2588,6 +2657,10 @@ class SDKToLogConverter {
2588
2657
  this.lastUuid = null;
2589
2658
  this.context.parentUuid = null;
2590
2659
  }
2660
+ /** Drop per-query markers that must never leak into the next SDK query. */
2661
+ resetTransientState() {
2662
+ this.sawInterruptSentinel = false;
2663
+ }
2591
2664
  /**
2592
2665
  * Convert SDK message to log format
2593
2666
  */
@@ -2617,6 +2690,10 @@ class SDKToLogConverter {
2617
2690
  switch (sdkMessage.type) {
2618
2691
  case "user": {
2619
2692
  const userMsg = sdkMessage;
2693
+ if (isClaudeInterruptSentinelContent(userMsg.message.content)) {
2694
+ this.sawInterruptSentinel = true;
2695
+ return null;
2696
+ }
2620
2697
  const meta = userMsg.isSynthetic === true || userMsg.isMeta === true;
2621
2698
  logMessage = {
2622
2699
  ...baseFields,
@@ -2669,6 +2746,8 @@ class SDKToLogConverter {
2669
2746
  }
2670
2747
  case "result": {
2671
2748
  const resultMsg = sdkMessage;
2749
+ const interrupted = this.sawInterruptSentinel || isClaudeEdeOnlyResult(resultMsg);
2750
+ this.sawInterruptSentinel = false;
2672
2751
  logMessage = {
2673
2752
  ...baseFields,
2674
2753
  type: "result",
@@ -2680,7 +2759,8 @@ class SDKToLogConverter {
2680
2759
  num_turns: resultMsg.num_turns,
2681
2760
  usage: resultMsg.usage,
2682
2761
  ..."errors" in resultMsg ? { errors: resultMsg.errors } : {},
2683
- ..."terminal_reason" in resultMsg && resultMsg.terminal_reason ? { terminal_reason: resultMsg.terminal_reason } : {}
2762
+ ..."terminal_reason" in resultMsg && resultMsg.terminal_reason ? { terminal_reason: resultMsg.terminal_reason } : {},
2763
+ ...interrupted ? { interrupted: true } : {}
2684
2764
  };
2685
2765
  break;
2686
2766
  }
@@ -3196,6 +3276,10 @@ async function claudeRemoteLauncher(session) {
3196
3276
  let ongoingToolCalls = /* @__PURE__ */ new Map();
3197
3277
  let notifiedQuestionToolCalls = /* @__PURE__ */ new Set();
3198
3278
  function onMessage(message) {
3279
+ if (message.type === "user" && isClaudeInterruptSentinelContent(message.message.content)) {
3280
+ sdkToLogConverter.convert(message);
3281
+ return;
3282
+ }
3199
3283
  formatClaudeMessageForInk(message, messageBuffer);
3200
3284
  if (message.type === "assistant") {
3201
3285
  let umessage = message;
@@ -3394,6 +3478,21 @@ async function claudeRemoteLauncher(session) {
3394
3478
  },
3395
3479
  onQueryReady: (q) => {
3396
3480
  turnSteering.setInterrupt(q.interrupt);
3481
+ session.setSteerHandler(async (input) => {
3482
+ const expectedHash = session.queue.modeHasher(input.mode);
3483
+ if (!modeHash || expectedHash !== modeHash) return false;
3484
+ let message = input.message;
3485
+ if (input.attachments?.length) {
3486
+ const staged = await stageClaudeAttachments(input.attachments, {
3487
+ happyHomeDir: persistence.configuration.happyHomeDir,
3488
+ sessionId: session.client.sessionId
3489
+ });
3490
+ message = appendStagedAttachmentsToPrompt(input.message, staged);
3491
+ }
3492
+ if (!session.thinking || modeHash !== expectedHash) return false;
3493
+ q.steer(message, input.mode);
3494
+ return true;
3495
+ });
3397
3496
  permissionHandler.setPermissionModeUpdater(async (mode2) => {
3398
3497
  await q.setPermissionMode(mode2);
3399
3498
  });
@@ -3446,6 +3545,10 @@ async function claudeRemoteLauncher(session) {
3446
3545
  } catch (e) {
3447
3546
  persistence.logger.debug("[remote]: launch error", e);
3448
3547
  if (!exitReason) {
3548
+ if (isClaudeEdeOnlySdkError(e)) {
3549
+ session.client.closeClaudeSessionTurn("cancelled");
3550
+ continue;
3551
+ }
3449
3552
  session.client.closeClaudeSessionTurn("failed");
3450
3553
  session.client.sendSessionEvent({ type: "message", message: "Process exited unexpectedly" });
3451
3554
  session.onSessionError(e instanceof Error ? e.message : "Process exited unexpectedly");
@@ -3453,6 +3556,8 @@ async function claudeRemoteLauncher(session) {
3453
3556
  }
3454
3557
  } finally {
3455
3558
  turnSteering.reset();
3559
+ session.setSteerHandler(null);
3560
+ sdkToLogConverter.resetTransientState();
3456
3561
  persistence.logger.debug("[remote]: launch finally");
3457
3562
  for (let [toolCallId, { parentToolCallId }] of ongoingToolCalls) {
3458
3563
  const converted = sdkToLogConverter.generateInterruptedToolResult(toolCallId, parentToolCallId);
@@ -8569,7 +8674,7 @@ const MAX_TITLE_CHARS = 60;
8569
8674
  const GENERATION_TIMEOUT_MS = 3e4;
8570
8675
  function resolveClaudeBinary() {
8571
8676
  try {
8572
- 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-B8UoTir2.cjs', document.baseURI).href)));
8677
+ 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-CzSk11Ko.cjs', document.baseURI).href)));
8573
8678
  const utilsPath = path.resolve(path.join(persistence.projectPath(), "scripts", "claude_version_utils.cjs"));
8574
8679
  const { getClaudeCliPath } = require$1(utilsPath);
8575
8680
  const path$1 = getClaudeCliPath();
@@ -9026,6 +9131,7 @@ async function runClaude(credentials, options = {}) {
9026
9131
  // a brand-new session cannot pick a PDF until after sending once.
9027
9132
  attachmentKinds: [...CLAUDE_ATTACHMENT_KINDS],
9028
9133
  queueCancellation: true,
9134
+ capabilities: ["claude-steer-v1"],
9029
9135
  sandbox: sandboxConfig?.enabled ? sandboxConfig : null,
9030
9136
  dangerouslySkipPermissions,
9031
9137
  ...forkedFromSessionId ? { parentSessionId: forkedFromSessionId } : {},
@@ -9479,6 +9585,21 @@ async function runClaude(credentials, options = {}) {
9479
9585
  disallowedTools: messageDisallowedTools,
9480
9586
  effort: messageEffort
9481
9587
  };
9588
+ if (message.meta?.delivery === "steer" && currentRunMode === "remote") {
9589
+ const accepted = await currentSession?.trySteer({
9590
+ message: message.content.text,
9591
+ mode: enhancedMode,
9592
+ attachments: attachmentsForThisMessage
9593
+ }) === true;
9594
+ if (accepted) {
9595
+ persistence.logger.debug("User message steered into current turn:", {
9596
+ ...persistence.contentLogMetadata(message.content.text),
9597
+ attachmentCount: attachmentsForThisMessage?.length ?? 0
9598
+ });
9599
+ return;
9600
+ }
9601
+ persistence.logger.debug("[start] Steer arrived without a compatible live turn; falling back to queue");
9602
+ }
9482
9603
  messageQueue.push(message.content.text, enhancedMode, attachmentsForThisMessage, message.localKey);
9483
9604
  persistence.logger.debug("User message pushed to queue:", {
9484
9605
  ...persistence.contentLogMetadata(message.content.text),
@@ -10697,9 +10818,9 @@ function resolveLocalSignupBootstrap(configuredMode, configuredInviteCodes, gene
10697
10818
  };
10698
10819
  }
10699
10820
 
10700
- 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-B8UoTir2.cjs', document.baseURI).href)));
10821
+ 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-CzSk11Ko.cjs', document.baseURI).href)));
10701
10822
  const __dirname$1 = path.dirname(__filename$1);
10702
- const require_ = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-B8UoTir2.cjs', document.baseURI).href)));
10823
+ const require_ = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-CzSk11Ko.cjs', document.baseURI).href)));
10703
10824
  const PRISMA_QUERY_ENGINE_FILES = {
10704
10825
  "arm64-darwin": "libquery_engine-darwin-arm64.dylib.node",
10705
10826
  "x64-darwin": "libquery_engine-darwin.dylib.node",
@@ -13311,7 +13432,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
13311
13432
  process.exit(0);
13312
13433
  } else if (subcommand === "install-terminal-hooks") {
13313
13434
  try {
13314
- const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await Promise.resolve().then(function () { return require('./installTerminalHooks-mk1QIEvp.cjs'); });
13435
+ const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await Promise.resolve().then(function () { return require('./installTerminalHooks-CyGiM6kp.cjs'); });
13315
13436
  const command = parseTerminalHooksArgs(args.slice(1));
13316
13437
  if (command.action === "help") {
13317
13438
  console.log(TERMINAL_HOOKS_HELP);
@@ -13328,7 +13449,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
13328
13449
  }
13329
13450
  } else if (subcommand === "spawn") {
13330
13451
  try {
13331
- const { handleSpawnCommand } = await Promise.resolve().then(function () { return require('./spawn-Cm52jfN6.cjs'); });
13452
+ const { handleSpawnCommand } = await Promise.resolve().then(function () { return require('./spawn-rykblFJB.cjs'); });
13332
13453
  await handleSpawnCommand(args.slice(1));
13333
13454
  } catch (error) {
13334
13455
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -13340,7 +13461,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
13340
13461
  return;
13341
13462
  } else if (subcommand === "send") {
13342
13463
  try {
13343
- const { handleSendCommand } = await Promise.resolve().then(function () { return require('./send-DZIY545W.cjs'); });
13464
+ const { handleSendCommand } = await Promise.resolve().then(function () { return require('./send-DefYtEsA.cjs'); });
13344
13465
  await handleSendCommand(args.slice(1));
13345
13466
  } catch (error) {
13346
13467
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -13446,9 +13567,9 @@ Conversation history is preserved on the server, but in-flight tool calls are in
13446
13567
  if (geminiSubcommand === "project" && args[2] === "set" && args[3]) {
13447
13568
  const projectId = args[3];
13448
13569
  try {
13449
- const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return require('./config-Dv2kzos6.cjs'); });
13450
- const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await Promise.resolve().then(function () { return require('./types-Dudpkl_i.cjs'); }).then(function (n) { return n.persistence; });
13451
- const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./types-Dudpkl_i.cjs'); }).then(function (n) { return n.api; });
13570
+ const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return require('./config-Cw_3dY3i.cjs'); });
13571
+ const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await Promise.resolve().then(function () { return require('./types-CsnC0xzi.cjs'); }).then(function (n) { return n.persistence; });
13572
+ const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./types-CsnC0xzi.cjs'); }).then(function (n) { return n.api; });
13452
13573
  let userEmail = void 0;
13453
13574
  try {
13454
13575
  const credentials = await readCredentialsForConfiguredRelay2();
@@ -13479,7 +13600,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
13479
13600
  }
13480
13601
  if (geminiSubcommand === "project" && args[2] === "get") {
13481
13602
  try {
13482
- const { readGeminiLocalConfig } = await Promise.resolve().then(function () { return require('./config-Dv2kzos6.cjs'); });
13603
+ const { readGeminiLocalConfig } = await Promise.resolve().then(function () { return require('./config-Cw_3dY3i.cjs'); });
13483
13604
  const config = readGeminiLocalConfig();
13484
13605
  if (config.googleCloudProject) {
13485
13606
  console.log(`Current Google Cloud Project: ${config.googleCloudProject}`);
@@ -13519,7 +13640,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
13519
13640
  process.exit(0);
13520
13641
  }
13521
13642
  try {
13522
- const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-Cf_FQOrg.cjs'); });
13643
+ const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-SNeOUgOy.cjs'); });
13523
13644
  let startedBy = void 0;
13524
13645
  for (let i = 1; i < args.length; i++) {
13525
13646
  if (args[i] === "--started-by") {
@@ -13541,7 +13662,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
13541
13662
  return;
13542
13663
  } else if (subcommand === "acp") {
13543
13664
  try {
13544
- const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-CULwez6o.cjs'); });
13665
+ const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-BeCsCfgr.cjs'); });
13545
13666
  let startedBy = void 0;
13546
13667
  let verbose = false;
13547
13668
  const acpArgs = [];
@@ -13581,7 +13702,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
13581
13702
  return;
13582
13703
  } else if (subcommand === "openclaw") {
13583
13704
  try {
13584
- const { runOpenClaw } = await Promise.resolve().then(function () { return require('./runOpenClaw-BlZkYWEQ.cjs'); });
13705
+ const { runOpenClaw } = await Promise.resolve().then(function () { return require('./runOpenClaw-DKVWdqEe.cjs'); });
13585
13706
  let startedBy = void 0;
13586
13707
  let verbose = false;
13587
13708
  let gatewayUrl;
@@ -13632,7 +13753,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
13632
13753
  return;
13633
13754
  } else if (subcommand === "mcp" && args.length === 1) {
13634
13755
  try {
13635
- const { handleMcpCommand } = await Promise.resolve().then(function () { return require('./mcp-X7yyQ2d_.cjs'); });
13756
+ const { handleMcpCommand } = await Promise.resolve().then(function () { return require('./mcp-BjK-A9P8.cjs'); });
13636
13757
  await handleMcpCommand();
13637
13758
  } catch (error) {
13638
13759
  process.stderr.write(`[very-happy mcp] Fatal: ${error instanceof Error ? error.message : String(error)}