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
@@ -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, v as ensurePrivateDirectory, M as MAX_CHAT_ATTACHMENT_SOURCE_BYTES, x as hardenPrivateFile, f as packageJson, i as readSettings, y as readCredentials, z as credentialRelayProblem, B as deriveLocalCliUpdateSummary, j as encodeBase64, C as updateSettings, D as encodeBase64Url, E as decodeBase64, F as writeCredentialsLegacy, G as writeCredentialsDataKey, H as readCredentialsForConfiguredRelay, J as encrypt, r as readPersistedSessions, K as getLocalHappyAgentCredentialPath, L as readLocalHappyAgentCredentials, N as decryptWithDataKey, O as decryptLegacy, P as extractCompleteLines, Q as decideBackfill, S as parseTerminalHookPayload, T as decideMirrorBinding, U as persistSession, V as MIRROR_BACKFILL_LINES_DEFAULT, W as mirrorLineKey, X as mirrorLocalId, Y as detectResumeSupport, Z as detectCLIAvailability, _ as acquireDaemonLock, $ as summarizeSpawnSessionForLog, a0 as deletePersistedSessions, a1 as decrypt, a2 as writeDaemonState, A as ApiClient, a3 as fetchCliUpdateState, a4 as resolveCliUpdateCheckInterval, a5 as DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS, a6 as releaseDaemonLock, a7 as isValidSessionId, a8 as listVhTerminals, a9 as isValidTerminalId, aa as readVhTerminal, ab as sendToVhTerminal, h as connectionState, ac as startOfflineReconnection, ad as clearCredentials, ae as clearMachineId, k as ensurePrivateDirectorySync, w as writePrivateFileSync, af as SandboxConfigSchema, b as createEnvelope, ag as CodexAppServerClient, ah as getLatestDaemonLog } from './types-Bv1nc9M1.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, v as ensurePrivateDirectory, M as MAX_CHAT_ATTACHMENT_SOURCE_BYTES, x as hardenPrivateFile, f as packageJson, i as readSettings, y as readCredentials, z as credentialRelayProblem, B as deriveLocalCliUpdateSummary, j as encodeBase64, C as updateSettings, D as encodeBase64Url, E as decodeBase64, F as writeCredentialsLegacy, G as writeCredentialsDataKey, H as readCredentialsForConfiguredRelay, J as encrypt, r as readPersistedSessions, K as getLocalHappyAgentCredentialPath, L as readLocalHappyAgentCredentials, N as decryptWithDataKey, O as decryptLegacy, P as extractCompleteLines, Q as decideBackfill, S as parseTerminalHookPayload, T as decideMirrorBinding, U as persistSession, V as MIRROR_BACKFILL_LINES_DEFAULT, W as mirrorLineKey, X as mirrorLocalId, Y as detectResumeSupport, Z as detectCLIAvailability, _ as acquireDaemonLock, $ as summarizeSpawnSessionForLog, a0 as deletePersistedSessions, a1 as decrypt, a2 as writeDaemonState, A as ApiClient, a3 as fetchCliUpdateState, a4 as resolveCliUpdateCheckInterval, a5 as DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS, a6 as releaseDaemonLock, a7 as isValidSessionId, a8 as listVhTerminals, a9 as isValidTerminalId, aa as readVhTerminal, ab as sendToVhTerminal, h as connectionState, ac as startOfflineReconnection, ad as clearCredentials, ae as clearMachineId, k as ensurePrivateDirectorySync, w as writePrivateFileSync, af as SandboxConfigSchema, b as createEnvelope, ag as CodexAppServerClient, ah as getLatestDaemonLog } from './types-cfTs9Xpw.mjs';
5
5
  import spawn$1, { spawn } from 'cross-spawn';
6
6
  import path, { join, resolve, basename, isAbsolute, normalize, sep, dirname } from 'node:path';
7
7
  import { createInterface } from 'node:readline';
@@ -264,6 +264,8 @@ class Session {
264
264
  hadAssistantOutputThisTurn = false;
265
265
  /** Last assistant text snippet seen this turn, used as the reply_done body. */
266
266
  lastAssistantSnippet;
267
+ /** Live remote-query input sink. Absent in local mode and between SDK queries. */
268
+ steerHandler = null;
267
269
  /** Callbacks to be notified when session ID is found/changed */
268
270
  sessionFoundCallbacks = [];
269
271
  /** Keep alive interval reference for cleanup */
@@ -304,8 +306,22 @@ class Session {
304
306
  cleanup = () => {
305
307
  clearInterval(this.keepAliveInterval);
306
308
  this.sessionFoundCallbacks = [];
309
+ this.steerHandler = null;
307
310
  logger.debug("[Session] Cleaned up resources");
308
311
  };
312
+ /** Register the current remote query's Steer sink; null removes it. */
313
+ setSteerHandler = (handler) => {
314
+ this.steerHandler = handler;
315
+ };
316
+ /**
317
+ * Attempt same-turn delivery. A stale Web "working" snapshot must never
318
+ * lose a message: once the turn is no longer thinking, return false and
319
+ * let runClaude fall back to the ordinary next-turn queue.
320
+ */
321
+ trySteer = async (input) => {
322
+ if (!this.thinking || !this.steerHandler) return false;
323
+ return this.steerHandler(input);
324
+ };
309
325
  onThinkingChange = (thinking) => {
310
326
  if (thinking && !this.thinking) {
311
327
  this.hadAssistantOutputThisTurn = false;
@@ -1894,6 +1910,7 @@ async function claudeRemote(opts) {
1894
1910
  messages.push({
1895
1911
  type: "user",
1896
1912
  parent_tool_use_id: null,
1913
+ origin: { kind: "human" },
1897
1914
  message: {
1898
1915
  role: "user",
1899
1916
  content: initial.message
@@ -1908,6 +1925,16 @@ async function claudeRemote(opts) {
1908
1925
  setPermissionMode: (mode2) => response.setPermissionMode(mode2),
1909
1926
  interrupt: async () => {
1910
1927
  await response.interrupt();
1928
+ },
1929
+ steer: (message, nextMode) => {
1930
+ mode = nextMode;
1931
+ messages.push({
1932
+ type: "user",
1933
+ parent_tool_use_id: null,
1934
+ priority: "now",
1935
+ origin: { kind: "human" },
1936
+ message: { role: "user", content: message }
1937
+ });
1911
1938
  }
1912
1939
  });
1913
1940
  }
@@ -1960,7 +1987,13 @@ async function claudeRemote(opts) {
1960
1987
  messages.end();
1961
1988
  } else {
1962
1989
  mode = next.mode;
1963
- messages.push({ type: "user", parent_tool_use_id: null, message: { role: "user", content: next.message } });
1990
+ updateThinking(true);
1991
+ messages.push({
1992
+ type: "user",
1993
+ parent_tool_use_id: null,
1994
+ origin: { kind: "human" },
1995
+ message: { role: "user", content: next.message }
1996
+ });
1964
1997
  }
1965
1998
  }).catch(() => {
1966
1999
  messages.end();
@@ -2057,16 +2090,7 @@ class PermissionHandler {
2057
2090
  });
2058
2091
  if (response.approved) {
2059
2092
  const newMode = response.mode && ["default", "acceptEdits", "bypassPermissions"].includes(response.mode) ? response.mode : "default";
2060
- logger.debug(`Plan approved - switching to ${newMode} mode and allowing ExitPlanMode`);
2061
- try {
2062
- if (!this.setPermissionModeCallback) throw new Error("permission mode updater unavailable");
2063
- await this.setPermissionModeCallback(newMode);
2064
- } catch (err) {
2065
- const reason = `Failed to switch permission mode: ${err instanceof Error ? err.message : String(err)}`;
2066
- logger.debug(reason);
2067
- pending.resolve({ behavior: "deny", message: reason });
2068
- return { ...response, approved: false, reason };
2069
- }
2093
+ logger.debug(`Plan approved - allowing ExitPlanMode with ${newMode} as the local follow-up mode`);
2070
2094
  this.permissionMode = newMode;
2071
2095
  pending.resolve({ behavior: "allow", updatedInput: pending.input || {} });
2072
2096
  } else {
@@ -2526,6 +2550,50 @@ function formatClaudeMessageForInk(message, messageBuffer, onAssistantResult) {
2526
2550
  }
2527
2551
  }
2528
2552
 
2553
+ const INTERRUPT_SENTINEL = /^\[Request interrupted by user(?: for tool use)?\]$/i;
2554
+ const EDE_DIAGNOSTIC_PREFIX = "[ede_diagnostic]";
2555
+ const SDK_ERROR_PREFIX = "Claude Code returned an error result:";
2556
+ function textBlocks(content) {
2557
+ if (!Array.isArray(content) || content.length === 0) return null;
2558
+ const texts = [];
2559
+ for (const block of content) {
2560
+ if (!block || typeof block !== "object" || block.type !== "text") {
2561
+ return null;
2562
+ }
2563
+ const text = block.text;
2564
+ if (typeof text !== "string") return null;
2565
+ texts.push(text.trim());
2566
+ }
2567
+ return texts;
2568
+ }
2569
+ function isClaudeInterruptSentinelContent(content) {
2570
+ if (typeof content === "string") {
2571
+ return INTERRUPT_SENTINEL.test(content.trim());
2572
+ }
2573
+ const texts = textBlocks(content);
2574
+ return texts !== null && texts.length > 0 && texts.every((text) => INTERRUPT_SENTINEL.test(text));
2575
+ }
2576
+ function resultErrors(value) {
2577
+ if (!value || typeof value !== "object") return [];
2578
+ const errors = value.errors;
2579
+ if (!Array.isArray(errors) || errors.length === 0 || errors.some((error) => typeof error !== "string")) {
2580
+ return [];
2581
+ }
2582
+ return errors.map((error) => error.trim()).filter(Boolean);
2583
+ }
2584
+ function isClaudeEdeOnlyResult(value) {
2585
+ const errors = resultErrors(value);
2586
+ return errors.length > 0 && errors.every((error) => error.startsWith(EDE_DIAGNOSTIC_PREFIX));
2587
+ }
2588
+ function isClaudeEdeOnlySdkError(error) {
2589
+ if (!(error instanceof Error)) return false;
2590
+ const message = error.message.trim();
2591
+ if (!message.startsWith(SDK_ERROR_PREFIX)) return false;
2592
+ const payload = message.slice(SDK_ERROR_PREFIX.length).trim();
2593
+ const entries = payload.split(/[;\n]+/).map((entry) => entry.trim()).filter(Boolean);
2594
+ return entries.length > 0 && entries.every((entry) => entry.startsWith(EDE_DIAGNOSTIC_PREFIX));
2595
+ }
2596
+
2529
2597
  function getGitBranch(cwd) {
2530
2598
  try {
2531
2599
  const branch = execSync("git rev-parse --abbrev-ref HEAD", {
@@ -2544,6 +2612,7 @@ class SDKToLogConverter {
2544
2612
  context;
2545
2613
  responses;
2546
2614
  sidechainLastUUID = /* @__PURE__ */ new Map();
2615
+ sawInterruptSentinel = false;
2547
2616
  constructor(context, responses) {
2548
2617
  this.context = {
2549
2618
  ...context,
@@ -2566,6 +2635,10 @@ class SDKToLogConverter {
2566
2635
  this.lastUuid = null;
2567
2636
  this.context.parentUuid = null;
2568
2637
  }
2638
+ /** Drop per-query markers that must never leak into the next SDK query. */
2639
+ resetTransientState() {
2640
+ this.sawInterruptSentinel = false;
2641
+ }
2569
2642
  /**
2570
2643
  * Convert SDK message to log format
2571
2644
  */
@@ -2595,6 +2668,10 @@ class SDKToLogConverter {
2595
2668
  switch (sdkMessage.type) {
2596
2669
  case "user": {
2597
2670
  const userMsg = sdkMessage;
2671
+ if (isClaudeInterruptSentinelContent(userMsg.message.content)) {
2672
+ this.sawInterruptSentinel = true;
2673
+ return null;
2674
+ }
2598
2675
  const meta = userMsg.isSynthetic === true || userMsg.isMeta === true;
2599
2676
  logMessage = {
2600
2677
  ...baseFields,
@@ -2647,6 +2724,8 @@ class SDKToLogConverter {
2647
2724
  }
2648
2725
  case "result": {
2649
2726
  const resultMsg = sdkMessage;
2727
+ const interrupted = this.sawInterruptSentinel || isClaudeEdeOnlyResult(resultMsg);
2728
+ this.sawInterruptSentinel = false;
2650
2729
  logMessage = {
2651
2730
  ...baseFields,
2652
2731
  type: "result",
@@ -2658,7 +2737,8 @@ class SDKToLogConverter {
2658
2737
  num_turns: resultMsg.num_turns,
2659
2738
  usage: resultMsg.usage,
2660
2739
  ..."errors" in resultMsg ? { errors: resultMsg.errors } : {},
2661
- ..."terminal_reason" in resultMsg && resultMsg.terminal_reason ? { terminal_reason: resultMsg.terminal_reason } : {}
2740
+ ..."terminal_reason" in resultMsg && resultMsg.terminal_reason ? { terminal_reason: resultMsg.terminal_reason } : {},
2741
+ ...interrupted ? { interrupted: true } : {}
2662
2742
  };
2663
2743
  break;
2664
2744
  }
@@ -3174,6 +3254,10 @@ async function claudeRemoteLauncher(session) {
3174
3254
  let ongoingToolCalls = /* @__PURE__ */ new Map();
3175
3255
  let notifiedQuestionToolCalls = /* @__PURE__ */ new Set();
3176
3256
  function onMessage(message) {
3257
+ if (message.type === "user" && isClaudeInterruptSentinelContent(message.message.content)) {
3258
+ sdkToLogConverter.convert(message);
3259
+ return;
3260
+ }
3177
3261
  formatClaudeMessageForInk(message, messageBuffer);
3178
3262
  if (message.type === "assistant") {
3179
3263
  let umessage = message;
@@ -3372,6 +3456,21 @@ async function claudeRemoteLauncher(session) {
3372
3456
  },
3373
3457
  onQueryReady: (q) => {
3374
3458
  turnSteering.setInterrupt(q.interrupt);
3459
+ session.setSteerHandler(async (input) => {
3460
+ const expectedHash = session.queue.modeHasher(input.mode);
3461
+ if (!modeHash || expectedHash !== modeHash) return false;
3462
+ let message = input.message;
3463
+ if (input.attachments?.length) {
3464
+ const staged = await stageClaudeAttachments(input.attachments, {
3465
+ happyHomeDir: configuration.happyHomeDir,
3466
+ sessionId: session.client.sessionId
3467
+ });
3468
+ message = appendStagedAttachmentsToPrompt(input.message, staged);
3469
+ }
3470
+ if (!session.thinking || modeHash !== expectedHash) return false;
3471
+ q.steer(message, input.mode);
3472
+ return true;
3473
+ });
3375
3474
  permissionHandler.setPermissionModeUpdater(async (mode2) => {
3376
3475
  await q.setPermissionMode(mode2);
3377
3476
  });
@@ -3424,6 +3523,10 @@ async function claudeRemoteLauncher(session) {
3424
3523
  } catch (e) {
3425
3524
  logger.debug("[remote]: launch error", e);
3426
3525
  if (!exitReason) {
3526
+ if (isClaudeEdeOnlySdkError(e)) {
3527
+ session.client.closeClaudeSessionTurn("cancelled");
3528
+ continue;
3529
+ }
3427
3530
  session.client.closeClaudeSessionTurn("failed");
3428
3531
  session.client.sendSessionEvent({ type: "message", message: "Process exited unexpectedly" });
3429
3532
  session.onSessionError(e instanceof Error ? e.message : "Process exited unexpectedly");
@@ -3431,6 +3534,8 @@ async function claudeRemoteLauncher(session) {
3431
3534
  }
3432
3535
  } finally {
3433
3536
  turnSteering.reset();
3537
+ session.setSteerHandler(null);
3538
+ sdkToLogConverter.resetTransientState();
3434
3539
  logger.debug("[remote]: launch finally");
3435
3540
  for (let [toolCallId, { parentToolCallId }] of ongoingToolCalls) {
3436
3541
  const converted = sdkToLogConverter.generateInterruptedToolResult(toolCallId, parentToolCallId);
@@ -9004,6 +9109,7 @@ async function runClaude(credentials, options = {}) {
9004
9109
  // a brand-new session cannot pick a PDF until after sending once.
9005
9110
  attachmentKinds: [...CLAUDE_ATTACHMENT_KINDS],
9006
9111
  queueCancellation: true,
9112
+ capabilities: ["claude-steer-v1"],
9007
9113
  sandbox: sandboxConfig?.enabled ? sandboxConfig : null,
9008
9114
  dangerouslySkipPermissions,
9009
9115
  ...forkedFromSessionId ? { parentSessionId: forkedFromSessionId } : {},
@@ -9457,6 +9563,21 @@ async function runClaude(credentials, options = {}) {
9457
9563
  disallowedTools: messageDisallowedTools,
9458
9564
  effort: messageEffort
9459
9565
  };
9566
+ if (message.meta?.delivery === "steer" && currentRunMode === "remote") {
9567
+ const accepted = await currentSession?.trySteer({
9568
+ message: message.content.text,
9569
+ mode: enhancedMode,
9570
+ attachments: attachmentsForThisMessage
9571
+ }) === true;
9572
+ if (accepted) {
9573
+ logger.debug("User message steered into current turn:", {
9574
+ ...contentLogMetadata(message.content.text),
9575
+ attachmentCount: attachmentsForThisMessage?.length ?? 0
9576
+ });
9577
+ return;
9578
+ }
9579
+ logger.debug("[start] Steer arrived without a compatible live turn; falling back to queue");
9580
+ }
9460
9581
  messageQueue.push(message.content.text, enhancedMode, attachmentsForThisMessage, message.localKey);
9461
9582
  logger.debug("User message pushed to queue:", {
9462
9583
  ...contentLogMetadata(message.content.text),
@@ -13289,7 +13410,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
13289
13410
  process.exit(0);
13290
13411
  } else if (subcommand === "install-terminal-hooks") {
13291
13412
  try {
13292
- const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await import('./installTerminalHooks-C-8Vuwlu.mjs');
13413
+ const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await import('./installTerminalHooks-BxELtnAg.mjs');
13293
13414
  const command = parseTerminalHooksArgs(args.slice(1));
13294
13415
  if (command.action === "help") {
13295
13416
  console.log(TERMINAL_HOOKS_HELP);
@@ -13306,7 +13427,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
13306
13427
  }
13307
13428
  } else if (subcommand === "spawn") {
13308
13429
  try {
13309
- const { handleSpawnCommand } = await import('./spawn-hjPuTkvH.mjs');
13430
+ const { handleSpawnCommand } = await import('./spawn-BX0cmn9s.mjs');
13310
13431
  await handleSpawnCommand(args.slice(1));
13311
13432
  } catch (error) {
13312
13433
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -13318,7 +13439,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
13318
13439
  return;
13319
13440
  } else if (subcommand === "send") {
13320
13441
  try {
13321
- const { handleSendCommand } = await import('./send-C6-E03t-.mjs');
13442
+ const { handleSendCommand } = await import('./send-DIvt2Nop.mjs');
13322
13443
  await handleSendCommand(args.slice(1));
13323
13444
  } catch (error) {
13324
13445
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -13424,9 +13545,9 @@ Conversation history is preserved on the server, but in-flight tool calls are in
13424
13545
  if (geminiSubcommand === "project" && args[2] === "set" && args[3]) {
13425
13546
  const projectId = args[3];
13426
13547
  try {
13427
- const { saveGoogleCloudProjectToConfig } = await import('./config-CQjk8rce.mjs');
13428
- const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await import('./types-Bv1nc9M1.mjs').then(function (n) { return n.ai; });
13429
- const { ApiClient: ApiClient2 } = await import('./types-Bv1nc9M1.mjs').then(function (n) { return n.aj; });
13548
+ const { saveGoogleCloudProjectToConfig } = await import('./config-b8y6YTtW.mjs');
13549
+ const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await import('./types-cfTs9Xpw.mjs').then(function (n) { return n.ai; });
13550
+ const { ApiClient: ApiClient2 } = await import('./types-cfTs9Xpw.mjs').then(function (n) { return n.aj; });
13430
13551
  let userEmail = void 0;
13431
13552
  try {
13432
13553
  const credentials = await readCredentialsForConfiguredRelay2();
@@ -13457,7 +13578,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
13457
13578
  }
13458
13579
  if (geminiSubcommand === "project" && args[2] === "get") {
13459
13580
  try {
13460
- const { readGeminiLocalConfig } = await import('./config-CQjk8rce.mjs');
13581
+ const { readGeminiLocalConfig } = await import('./config-b8y6YTtW.mjs');
13461
13582
  const config = readGeminiLocalConfig();
13462
13583
  if (config.googleCloudProject) {
13463
13584
  console.log(`Current Google Cloud Project: ${config.googleCloudProject}`);
@@ -13497,7 +13618,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
13497
13618
  process.exit(0);
13498
13619
  }
13499
13620
  try {
13500
- const { runGemini } = await import('./runGemini-Nig1hb70.mjs');
13621
+ const { runGemini } = await import('./runGemini-BBhQGbGW.mjs');
13501
13622
  let startedBy = void 0;
13502
13623
  for (let i = 1; i < args.length; i++) {
13503
13624
  if (args[i] === "--started-by") {
@@ -13519,7 +13640,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
13519
13640
  return;
13520
13641
  } else if (subcommand === "acp") {
13521
13642
  try {
13522
- const { runAcp, resolveAcpAgentConfig } = await import('./index-Cc2VYKqa.mjs');
13643
+ const { runAcp, resolveAcpAgentConfig } = await import('./index-BsVwUyNS.mjs');
13523
13644
  let startedBy = void 0;
13524
13645
  let verbose = false;
13525
13646
  const acpArgs = [];
@@ -13559,7 +13680,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
13559
13680
  return;
13560
13681
  } else if (subcommand === "openclaw") {
13561
13682
  try {
13562
- const { runOpenClaw } = await import('./runOpenClaw-DllszOSy.mjs');
13683
+ const { runOpenClaw } = await import('./runOpenClaw-CtmTc9vT.mjs');
13563
13684
  let startedBy = void 0;
13564
13685
  let verbose = false;
13565
13686
  let gatewayUrl;
@@ -13610,7 +13731,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
13610
13731
  return;
13611
13732
  } else if (subcommand === "mcp" && args.length === 1) {
13612
13733
  try {
13613
- const { handleMcpCommand } = await import('./mcp-BZba259A.mjs');
13734
+ const { handleMcpCommand } = await import('./mcp-DELG3yID.mjs');
13614
13735
  await handleMcpCommand();
13615
13736
  } catch (error) {
13616
13737
  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-B8UoTir2.cjs');
5
- require('./types-Dudpkl_i.cjs');
4
+ require('./index-CzSk11Ko.cjs');
5
+ require('./types-CsnC0xzi.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-Cnb_eI7Q.mjs';
3
- import './types-Bv1nc9M1.mjs';
2
+ import './index-HVcBQWc_.mjs';
3
+ import './types-cfTs9Xpw.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-Bv1nc9M1.mjs';
7
- import { t as tmuxSupportsSessionEnv } from './index-Cnb_eI7Q.mjs';
6
+ import { p as projectPath } from './types-cfTs9Xpw.mjs';
7
+ import { t as tmuxSupportsSessionEnv } from './index-HVcBQWc_.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-Dudpkl_i.cjs');
9
- var index = require('./index-B8UoTir2.cjs');
8
+ var persistence = require('./types-CsnC0xzi.cjs');
9
+ var index = require('./index-CzSk11Ko.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-Dudpkl_i.cjs');
3
+ var persistence = require('./types-CsnC0xzi.cjs');
4
4
  require('axios');
5
5
  require('chalk');
6
6
  require('node:util');
package/dist/lib.d.cts CHANGED
@@ -347,6 +347,10 @@ declare const UserMessageSchema: z$1.ZodObject<{
347
347
  appendSystemPrompt: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
348
348
  allowedTools: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>>;
349
349
  disallowedTools: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>>;
350
+ delivery: z$1.ZodOptional<z$1.ZodEnum<{
351
+ queue: "queue";
352
+ steer: "steer";
353
+ }>>;
350
354
  }, z$1.core.$strip>>;
351
355
  }, z$1.core.$strip>;
352
356
  type UserMessage = z$1.infer<typeof UserMessageSchema>;
@@ -431,6 +435,8 @@ type Metadata = {
431
435
  attachmentKinds?: string[];
432
436
  /** Pending user messages can be canceled by stable transport id. */
433
437
  queueCancellation?: boolean;
438
+ /** Explicit feature negotiation; old CLIs omit this field. */
439
+ capabilities?: string[];
434
440
  homeDir: string;
435
441
  happyHomeDir: string;
436
442
  happyLibDir: string;
package/dist/lib.d.mts CHANGED
@@ -347,6 +347,10 @@ declare const UserMessageSchema: z$1.ZodObject<{
347
347
  appendSystemPrompt: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
348
348
  allowedTools: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>>;
349
349
  disallowedTools: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>>;
350
+ delivery: z$1.ZodOptional<z$1.ZodEnum<{
351
+ queue: "queue";
352
+ steer: "steer";
353
+ }>>;
350
354
  }, z$1.core.$strip>>;
351
355
  }, z$1.core.$strip>;
352
356
  type UserMessage = z$1.infer<typeof UserMessageSchema>;
@@ -431,6 +435,8 @@ type Metadata = {
431
435
  attachmentKinds?: string[];
432
436
  /** Pending user messages can be canceled by stable transport id. */
433
437
  queueCancellation?: boolean;
438
+ /** Explicit feature negotiation; old CLIs omit this field. */
439
+ capabilities?: string[];
434
440
  homeDir: string;
435
441
  happyHomeDir: string;
436
442
  happyLibDir: 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-Bv1nc9M1.mjs';
1
+ export { A as ApiClient, a as ApiSessionClient, R as RawJSONLinesSchema, c as configuration, l as logger } from './types-cfTs9Xpw.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-B8UoTir2.cjs');
6
+ var index = require('./index-CzSk11Ko.cjs');
7
7
  var limits = require('./limits-KdWKmwtH.cjs');
8
- var persistence = require('./types-Dudpkl_i.cjs');
8
+ var persistence = require('./types-CsnC0xzi.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-Cnb_eI7Q.mjs';
4
+ import { p as pushClipboardViaDaemon } from './index-HVcBQWc_.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-Bv1nc9M1.mjs';
6
+ import { l as logger } from './types-cfTs9Xpw.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-Bv1nc9M1.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-Cnb_eI7Q.mjs';
7
- import { A as AcpBackend } from './AcpBackend-BgOEcqMG.mjs';
8
- import { readGeminiLocalConfig, determineGeminiModel, getGeminiModelSource, getInitialGeminiModel, saveGeminiModelToConfig } from './config-CQjk8rce.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-cfTs9Xpw.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-HVcBQWc_.mjs';
7
+ import { A as AcpBackend } from './AcpBackend-DyJXz2cV.mjs';
8
+ import { readGeminiLocalConfig, determineGeminiModel, getGeminiModelSource, getInitialGeminiModel, saveGeminiModelToConfig } from './config-b8y6YTtW.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-Dudpkl_i.cjs');
8
- var index = require('./index-B8UoTir2.cjs');
9
- var AcpBackend = require('./AcpBackend-DxoxNKOM.cjs');
10
- var config = require('./config-Dv2kzos6.cjs');
7
+ var persistence = require('./types-CsnC0xzi.cjs');
8
+ var index = require('./index-CzSk11Ko.cjs');
9
+ var AcpBackend = require('./AcpBackend-CnDmOAKz.cjs');
10
+ var config = require('./config-Cw_3dY3i.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-Bv1nc9M1.mjs';
7
- import { A as AcpSessionManager } from './AcpSessionManager-Ba9ON7eK.mjs';
8
- import { i as initialMachineMetadata, d as createSessionMetadata, e as setupOfflineReconnection, n as notifyDaemonSessionStarted, M as MessageQueue2, r as registerKillSessionHandler } from './index-Cnb_eI7Q.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-cfTs9Xpw.mjs';
7
+ import { A as AcpSessionManager } from './AcpSessionManager-CzZ_5XwN.mjs';
8
+ import { i as initialMachineMetadata, d as createSessionMetadata, e as setupOfflineReconnection, n as notifyDaemonSessionStarted, M as MessageQueue2, r as registerKillSessionHandler } from './index-HVcBQWc_.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-Dudpkl_i.cjs');
9
- var AcpSessionManager = require('./AcpSessionManager-_bG1kjZz.cjs');
10
- var index = require('./index-B8UoTir2.cjs');
8
+ var persistence = require('./types-CsnC0xzi.cjs');
9
+ var AcpSessionManager = require('./AcpSessionManager-CDS2s3H8.cjs');
10
+ var index = require('./index-CzSk11Ko.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-Bv1nc9M1.mjs';
5
- import { b as sendUserMessage, a as sessionWebUrl } from './index-Cnb_eI7Q.mjs';
4
+ import { r as readPersistedSessions, c as configuration } from './types-cfTs9Xpw.mjs';
5
+ import { b as sendUserMessage, a as sessionWebUrl } from './index-HVcBQWc_.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-Dudpkl_i.cjs');
7
- var index = require('./index-B8UoTir2.cjs');
6
+ var persistence = require('./types-CsnC0xzi.cjs');
7
+ var index = require('./index-CzSk11Ko.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-Cnb_eI7Q.mjs';
5
- import { l as logger } from './types-Bv1nc9M1.mjs';
4
+ import { c as checkIfDaemonRunningAndCleanupStaleState, s as spawnDaemonSession, a as sessionWebUrl, w as waitForSessionKey, b as sendUserMessage } from './index-HVcBQWc_.mjs';
5
+ import { l as logger } from './types-cfTs9Xpw.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-B8UoTir2.cjs');
7
- var persistence = require('./types-Dudpkl_i.cjs');
6
+ var index = require('./index-CzSk11Ko.cjs');
7
+ var persistence = require('./types-CsnC0xzi.cjs');
8
8
  require('node:os');
9
9
  require('node:crypto');
10
10
  require('cross-spawn');