very-happy-cli 0.2.111 → 0.2.112

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/{AcpBackend-B_olk79F.cjs → AcpBackend-B3x-gQWP.cjs} +1 -1
  2. package/dist/{AcpBackend-CeXVb_s_.mjs → AcpBackend-DDEdYVW2.mjs} +1 -1
  3. package/dist/{AcpSessionManager-vqdqfD1l.mjs → AcpSessionManager-BORAhQ1r.mjs} +1 -1
  4. package/dist/{AcpSessionManager-uXwWO2Tn.cjs → AcpSessionManager-DGPLD-go.cjs} +1 -1
  5. package/dist/{config-vGkcq9nM.mjs → config-B_L5vXXu.mjs} +2 -2
  6. package/dist/{config-BR3tkFL_.cjs → config-KX6e7GEu.cjs} +2 -2
  7. package/dist/{index-CtBP0Qvc.cjs → index-B7-t5Kwz.cjs} +4 -4
  8. package/dist/{index-BOoGJGQc.cjs → index-BnRQP3PL.cjs} +240 -19
  9. package/dist/{index-SjthsMid.cjs → index-CTd0skWH.cjs} +2 -2
  10. package/dist/{index-JAhGeW4_.mjs → index-Cu5FdgTq.mjs} +5 -5
  11. package/dist/{index-Bn-xsguz.mjs → index-inkhalP5.mjs} +236 -15
  12. package/dist/{index-C-RLk8-e.mjs → index-lQzCAx9I.mjs} +2 -2
  13. package/dist/index.cjs +2 -2
  14. package/dist/index.mjs +2 -2
  15. package/dist/{installTerminalHooks-FbKaK149.cjs → installTerminalHooks-BVk-r0yD.cjs} +2 -2
  16. package/dist/{installTerminalHooks-ADNcNdnB.mjs → installTerminalHooks-CQiW7Jn9.mjs} +2 -2
  17. package/dist/lib.cjs +1 -1
  18. package/dist/lib.d.cts +44 -0
  19. package/dist/lib.d.mts +44 -0
  20. package/dist/lib.mjs +1 -1
  21. package/dist/{mcp-DPp-bYNE.cjs → mcp-D0DIU8Q2.cjs} +2 -2
  22. package/dist/{mcp-DHPm_gvL.mjs → mcp-DD-0VkiA.mjs} +2 -2
  23. package/dist/{runGemini-CWWyjQMz.mjs → runGemini-DHyBDo5P.mjs} +4 -4
  24. package/dist/{runGemini-D5ySpYIZ.cjs → runGemini-Dq1d8Ccb.cjs} +4 -4
  25. package/dist/{runOpenClaw-Bwrb1LXP.cjs → runOpenClaw-BHXnUF_m.cjs} +3 -3
  26. package/dist/{runOpenClaw-Bv4rUTyJ.mjs → runOpenClaw-DX-tgQ2V.mjs} +3 -3
  27. package/dist/{send-BlkxFZu4.mjs → send-0TYDXiGx.mjs} +2 -2
  28. package/dist/{send-DBfSNILO.cjs → send-By6zEUWo.cjs} +2 -2
  29. package/dist/{sessions-CVuEsdRl.cjs → sessions-DTBRcBRk.cjs} +2 -2
  30. package/dist/{sessions-1fW8soBM.mjs → sessions-TM8VaCMY.mjs} +2 -2
  31. package/dist/{spawn-D_ZexrY9.cjs → spawn-CweTEYze.cjs} +2 -2
  32. package/dist/{spawn-BorKN3W2.mjs → spawn-D0oTo5BT.mjs} +2 -2
  33. package/dist/{types-k_ipDb0c.mjs → types-C5ewhu1Q.mjs} +96 -11
  34. package/dist/{types-BG_5QKX5.cjs → types-R11tMGyX.cjs} +97 -11
  35. 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-BG_5QKX5.cjs');
6
+ var persistence = require('./types-R11tMGyX.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-k_ipDb0c.mjs';
4
+ import { l as logger, d as contentLogMetadata, e as errorLogMetadata, f as packageJson, g as delay } from './types-C5ewhu1Q.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-k_ipDb0c.mjs';
2
+ import { b as createEnvelope } from './types-C5ewhu1Q.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-BG_5QKX5.cjs');
4
+ var persistence = require('./types-R11tMGyX.cjs');
5
5
 
6
6
  function turnOptions(turnId, time) {
7
7
  return turnId ? { turn: turnId, time } : { time };
@@ -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-k_ipDb0c.mjs';
6
- import { g as DEFAULT_GEMINI_MODEL, G as GEMINI_MODEL_ENV } from './index-Bn-xsguz.mjs';
5
+ import { l as logger } from './types-C5ewhu1Q.mjs';
6
+ import { g as DEFAULT_GEMINI_MODEL, G as GEMINI_MODEL_ENV } from './index-inkhalP5.mjs';
7
7
  import 'axios';
8
8
  import 'chalk';
9
9
  import 'node:util';
@@ -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-BG_5QKX5.cjs');
8
- var index = require('./index-BOoGJGQc.cjs');
7
+ var persistence = require('./types-R11tMGyX.cjs');
8
+ var index = require('./index-BnRQP3PL.cjs');
9
9
  require('axios');
10
10
  require('chalk');
11
11
  require('node:util');
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var AcpBackend = require('./AcpBackend-B_olk79F.cjs');
4
- var persistence = require('./types-BG_5QKX5.cjs');
5
- var AcpSessionManager = require('./AcpSessionManager-uXwWO2Tn.cjs');
3
+ var AcpBackend = require('./AcpBackend-B3x-gQWP.cjs');
4
+ var persistence = require('./types-R11tMGyX.cjs');
5
+ var AcpSessionManager = require('./AcpSessionManager-DGPLD-go.cjs');
6
6
  var node_crypto = require('node:crypto');
7
7
  var path = require('node:path');
8
- var index = require('./index-BOoGJGQc.cjs');
8
+ var index = require('./index-BnRQP3PL.cjs');
9
9
  require('node:child_process');
10
10
  require('@agentclientprotocol/sdk');
11
11
  require('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-BG_5QKX5.cjs');
6
+ var persistence = require('./types-R11tMGyX.cjs');
7
7
  var spawn = require('cross-spawn');
8
8
  var path = require('node:path');
9
9
  var node_readline = require('node:readline');
@@ -2025,7 +2025,14 @@ async function claudeRemote(opts) {
2025
2025
  onUserDialog: opts.onUserDialog,
2026
2026
  supportedDialogKinds: opts.onUserDialog ? ["refusal_fallback_prompt"] : void 0,
2027
2027
  abort: opts.signal,
2028
- settingsPath: opts.hookSettingsPath
2028
+ settingsPath: opts.hookSettingsPath,
2029
+ // B-309: token-level partials. Without this the SDK emits nothing
2030
+ // between "turn started" and "entire assistant message", which is
2031
+ // exactly why the web used to show a spinner where the terminal shows
2032
+ // the model thinking out loud. The partials do NOT enter the
2033
+ // transcript; they are split off below and relayed on a side channel.
2034
+ // Only pay for them when someone is listening.
2035
+ includePartialMessages: opts.onStreamFrame ? true : void 0
2029
2036
  };
2030
2037
  let thinking = false;
2031
2038
  const updateThinking = (newThinking) => {
@@ -2075,10 +2082,26 @@ async function claudeRemote(opts) {
2075
2082
  try {
2076
2083
  persistence.logger.debug(`[claudeRemote] Starting to iterate over response`);
2077
2084
  for await (const message of response) {
2085
+ if (message.type === "stream_event") {
2086
+ if (opts.onStreamFrame && !message.parent_tool_use_id) {
2087
+ opts.onStreamFrame({ type: "stream_event", event: message.event });
2088
+ }
2089
+ continue;
2090
+ }
2078
2091
  persistence.logger.debug(`[claudeRemote] Message ${message.type}`, persistence.contentLogMetadata(message));
2079
2092
  if (message.type === "assistant" && message.error) {
2080
2093
  lastAssistantError = message.error;
2081
2094
  }
2095
+ if (opts.onStreamFrame && message.type === "system") {
2096
+ const subtype = message.subtype;
2097
+ if (subtype === "thinking_tokens") {
2098
+ const tokens = message;
2099
+ opts.onStreamFrame({ type: "system", subtype: "thinking_tokens", estimated_tokens: tokens.estimated_tokens });
2100
+ } else if (subtype === "status") {
2101
+ const status = message;
2102
+ opts.onStreamFrame({ type: "system", subtype: "status", status: status.status });
2103
+ }
2104
+ }
2082
2105
  const outboundMessage = isCompactCommand && message.type === "assistant" ? { ...message, isCompactSummary: true } : message;
2083
2106
  opts.onMessage(outboundMessage);
2084
2107
  if (message.type === "system" && message.subtype === "init") {
@@ -3278,6 +3301,197 @@ class OutgoingMessageQueue {
3278
3301
  }
3279
3302
  }
3280
3303
 
3304
+ const STREAM_FLUSH_MS = 80;
3305
+ const PROGRESS_FLUSH_MS = 250;
3306
+ const STREAM_FLUSH_MAX_BYTES = 16 * 1024;
3307
+ class StreamRelay {
3308
+ send;
3309
+ setTimer;
3310
+ clearTimer;
3311
+ now;
3312
+ /** The block currently accumulating deltas. At most one is open at a time
3313
+ * in practice; a switch flushes the previous one first, so out-of-order
3314
+ * SDK frames degrade to "slightly chunkier", never to interleaved text. */
3315
+ pending = null;
3316
+ flushHandle = null;
3317
+ progress = {};
3318
+ progressDirty = false;
3319
+ progressHandle = null;
3320
+ /** Message id of the block currently open, so `content_block_delta` (which
3321
+ * carries only an index) can be attributed. Reset per assistant message. */
3322
+ currentMid = null;
3323
+ openBlocks = /* @__PURE__ */ new Set();
3324
+ /** True while nothing has been ingested since the last sweep. Both the SDK
3325
+ * `result` frame and the launcher's `finally` call endTurn (the second is
3326
+ * the safety net for turns that die before producing a result), so
3327
+ * without this a normal turn would emit two sweeps. */
3328
+ idleSinceTurnEnd = true;
3329
+ constructor(options) {
3330
+ this.send = options.send;
3331
+ this.setTimer = options.setTimer ?? ((fn, ms) => setTimeout(fn, ms));
3332
+ this.clearTimer = options.clearTimer ?? ((handle) => clearTimeout(handle));
3333
+ this.now = options.now ?? (() => Date.now());
3334
+ }
3335
+ /** Feed one SDK frame. Unknown shapes are ignored, never thrown on: this
3336
+ * channel must not be able to take a turn down. */
3337
+ ingest(message) {
3338
+ this.idleSinceTurnEnd = false;
3339
+ try {
3340
+ if (message.type === "stream_event") {
3341
+ this.ingestStreamEvent(message.event);
3342
+ return;
3343
+ }
3344
+ if (message.type === "system" && message.subtype === "thinking_tokens") {
3345
+ if (typeof message.estimated_tokens === "number") {
3346
+ this.setProgress({ thinkingTokens: message.estimated_tokens });
3347
+ }
3348
+ return;
3349
+ }
3350
+ if (message.type === "system" && message.subtype === "status") {
3351
+ const status = message.status === "requesting" || message.status === "compacting" ? message.status : void 0;
3352
+ this.progress.status = status;
3353
+ this.progressDirty = true;
3354
+ this.scheduleProgress();
3355
+ return;
3356
+ }
3357
+ } catch {
3358
+ }
3359
+ }
3360
+ /** The turn produced its result. Flushes everything and tells the web to
3361
+ * sweep drafts that no persisted message ever claimed. */
3362
+ endTurn() {
3363
+ if (this.idleSinceTurnEnd) {
3364
+ this.clearTimers();
3365
+ return;
3366
+ }
3367
+ this.idleSinceTurnEnd = true;
3368
+ this.flushPending();
3369
+ this.closeOpenBlocks();
3370
+ this.flushProgress();
3371
+ this.progress = {};
3372
+ this.currentMid = null;
3373
+ this.send({ t: "turn-end" });
3374
+ }
3375
+ /** Release timers without emitting anything (session teardown). */
3376
+ dispose() {
3377
+ this.clearTimers();
3378
+ this.pending = null;
3379
+ this.openBlocks.clear();
3380
+ }
3381
+ clearTimers() {
3382
+ if (this.flushHandle !== null) this.clearTimer(this.flushHandle);
3383
+ if (this.progressHandle !== null) this.clearTimer(this.progressHandle);
3384
+ this.flushHandle = null;
3385
+ this.progressHandle = null;
3386
+ }
3387
+ ingestStreamEvent(event) {
3388
+ const e = event;
3389
+ if (!e || typeof e.type !== "string") return;
3390
+ if (e.type === "message_start") {
3391
+ const mid = e.message?.id;
3392
+ this.flushPending();
3393
+ this.closeOpenBlocks();
3394
+ this.currentMid = typeof mid === "string" && mid.length > 0 ? mid : null;
3395
+ return;
3396
+ }
3397
+ if (e.type === "content_block_start") {
3398
+ const kind = e.content_block?.type === "thinking" ? "thinking" : e.content_block?.type === "text" ? "text" : null;
3399
+ if (!kind || !this.currentMid || typeof e.index !== "number") return;
3400
+ this.flushPending();
3401
+ this.openBlocks.add(e.index);
3402
+ this.send({ t: "block-start", mid: this.currentMid, idx: e.index, kind });
3403
+ return;
3404
+ }
3405
+ if (e.type === "content_block_delta") {
3406
+ const delta = e.delta;
3407
+ const text = delta?.type === "text_delta" ? delta.text : delta?.type === "thinking_delta" ? delta.thinking : null;
3408
+ if (typeof text !== "string" || text.length === 0) return;
3409
+ if (!this.currentMid || typeof e.index !== "number") return;
3410
+ if (!this.openBlocks.has(e.index)) return;
3411
+ this.appendDelta(this.currentMid, e.index, text);
3412
+ return;
3413
+ }
3414
+ if (e.type === "content_block_stop") {
3415
+ if (!this.currentMid || typeof e.index !== "number") return;
3416
+ if (!this.openBlocks.has(e.index)) return;
3417
+ this.flushPending();
3418
+ this.openBlocks.delete(e.index);
3419
+ this.send({ t: "block-end", mid: this.currentMid, idx: e.index });
3420
+ return;
3421
+ }
3422
+ if (e.type === "message_delta") {
3423
+ const outputTokens = e.usage?.output_tokens;
3424
+ if (typeof outputTokens === "number") {
3425
+ this.setProgress({ outputTokens });
3426
+ }
3427
+ return;
3428
+ }
3429
+ }
3430
+ appendDelta(mid, idx, text) {
3431
+ if (this.pending && (this.pending.mid !== mid || this.pending.idx !== idx)) {
3432
+ this.flushPending();
3433
+ }
3434
+ if (!this.pending) {
3435
+ this.pending = { mid, idx, text: "", bytes: 0 };
3436
+ }
3437
+ this.pending.text += text;
3438
+ this.pending.bytes += Buffer.byteLength(text, "utf8");
3439
+ if (this.pending.bytes >= STREAM_FLUSH_MAX_BYTES || this.pending.text.length >= persistence.STREAM_DELTA_MAX_CHARS) {
3440
+ this.flushPending();
3441
+ return;
3442
+ }
3443
+ if (this.flushHandle === null) {
3444
+ this.flushHandle = this.setTimer(() => {
3445
+ this.flushHandle = null;
3446
+ this.flushPending();
3447
+ }, STREAM_FLUSH_MS);
3448
+ }
3449
+ }
3450
+ flushPending() {
3451
+ if (this.flushHandle !== null) {
3452
+ this.clearTimer(this.flushHandle);
3453
+ this.flushHandle = null;
3454
+ }
3455
+ const pending = this.pending;
3456
+ this.pending = null;
3457
+ if (!pending || pending.text.length === 0) return;
3458
+ this.send({ t: "block-delta", mid: pending.mid, idx: pending.idx, text: pending.text });
3459
+ }
3460
+ /** Close blocks the SDK never stopped (interrupt, error, message switch) so
3461
+ * the web's draft does not keep a blinking cursor forever. */
3462
+ closeOpenBlocks() {
3463
+ if (!this.currentMid || this.openBlocks.size === 0) {
3464
+ this.openBlocks.clear();
3465
+ return;
3466
+ }
3467
+ for (const idx of [...this.openBlocks].sort((a, b) => a - b)) {
3468
+ this.send({ t: "block-end", mid: this.currentMid, idx });
3469
+ }
3470
+ this.openBlocks.clear();
3471
+ }
3472
+ setProgress(patch) {
3473
+ this.progress = { ...this.progress, ...patch };
3474
+ this.progressDirty = true;
3475
+ this.scheduleProgress();
3476
+ }
3477
+ scheduleProgress() {
3478
+ if (this.progressHandle !== null) return;
3479
+ this.progressHandle = this.setTimer(() => {
3480
+ this.progressHandle = null;
3481
+ this.flushProgress();
3482
+ }, PROGRESS_FLUSH_MS);
3483
+ }
3484
+ flushProgress() {
3485
+ if (this.progressHandle !== null) {
3486
+ this.clearTimer(this.progressHandle);
3487
+ this.progressHandle = null;
3488
+ }
3489
+ if (!this.progressDirty) return;
3490
+ this.progressDirty = false;
3491
+ this.send({ t: "progress", ...this.progress });
3492
+ }
3493
+ }
3494
+
3281
3495
  function getAskUserQuestionToolCallIds(message) {
3282
3496
  if (message.type !== "assistant") {
3283
3497
  return [];
@@ -3658,6 +3872,10 @@ async function claudeRemoteLauncher(session, onPermissionModeChange, onEffective
3658
3872
  return nextMode;
3659
3873
  };
3660
3874
  permissionHandler.reset("Previous CLI process exited before responding");
3875
+ const streamingEnabled = process.env.HAPPY_SESSION_STREAM_DISABLED !== "1";
3876
+ const streamRelay = new StreamRelay({
3877
+ send: (frame) => session.client.sendStreamFrame(frame)
3878
+ });
3661
3879
  const messageQueue = new OutgoingMessageQueue(
3662
3880
  (logMessage) => session.client.sendClaudeSessionMessage(logMessage)
3663
3881
  );
@@ -3916,6 +4134,7 @@ async function claudeRemoteLauncher(session, onPermissionModeChange, onEffective
3916
4134
  };
3917
4135
  },
3918
4136
  onThinkingChange: session.onThinkingChange,
4137
+ onStreamFrame: streamingEnabled ? (frame) => streamRelay.ingest(frame) : void 0,
3919
4138
  claudeEnvVars: session.claudeEnvVars,
3920
4139
  claudeArgs: session.claudeArgs,
3921
4140
  onMessage,
@@ -3995,6 +4214,8 @@ async function claudeRemoteLauncher(session, onPermissionModeChange, onEffective
3995
4214
  await messageQueue.flush();
3996
4215
  messageQueue.destroy();
3997
4216
  persistence.logger.debug("[remote]: message queue flushed");
4217
+ streamRelay.endTurn();
4218
+ streamRelay.dispose();
3998
4219
  abortController = null;
3999
4220
  abortFuture?.resolve(void 0);
4000
4221
  abortFuture = null;
@@ -6950,7 +7171,7 @@ function parseJsonObject(text) {
6950
7171
  return null;
6951
7172
  }
6952
7173
  }
6953
- function resolveSdkClaudeBinary(platform = process.platform, arch = process.arch, resolver = (s) => node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-BOoGJGQc.cjs', document.baseURI).href))).resolve(s)) {
7174
+ function resolveSdkClaudeBinary(platform = process.platform, arch = process.arch, resolver = (s) => node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-BnRQP3PL.cjs', document.baseURI).href))).resolve(s)) {
6954
7175
  const platformArch = `${platform}-${arch}`;
6955
7176
  const candidates = [
6956
7177
  `@anthropic-ai/claude-agent-sdk-${platformArch}/claude`,
@@ -10397,7 +10618,7 @@ function registerSideQuestionHandler(rpc, deps) {
10397
10618
  const retainMs = deps.retainMs ?? SIDE_QUESTION_RETAIN_MS;
10398
10619
  const maxRunMs = deps.maxRunMs ?? SIDE_QUESTION_MAX_RUN_MS;
10399
10620
  const run = deps.run ?? (async (input) => {
10400
- const { query } = await Promise.resolve().then(function () { return require('./index-SjthsMid.cjs'); });
10621
+ const { query } = await Promise.resolve().then(function () { return require('./index-CTd0skWH.cjs'); });
10401
10622
  return runSideQuestion(query, input);
10402
10623
  });
10403
10624
  const slots = /* @__PURE__ */ new Map();
@@ -10499,7 +10720,7 @@ const MAX_TITLE_CHARS = 60;
10499
10720
  const GENERATION_TIMEOUT_MS = 3e4;
10500
10721
  function resolveClaudeBinary() {
10501
10722
  try {
10502
- 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-BOoGJGQc.cjs', document.baseURI).href)));
10723
+ 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-BnRQP3PL.cjs', document.baseURI).href)));
10503
10724
  const utilsPath = path.resolve(path.join(persistence.projectPath(), "scripts", "claude_version_utils.cjs"));
10504
10725
  const { getClaudeCliPath } = require$1(utilsPath);
10505
10726
  const path$1 = getClaudeCliPath();
@@ -12701,9 +12922,9 @@ function resolveLocalSignupBootstrap(configuredMode, configuredInviteCodes, gene
12701
12922
  };
12702
12923
  }
12703
12924
 
12704
- 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-BOoGJGQc.cjs', document.baseURI).href)));
12925
+ 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-BnRQP3PL.cjs', document.baseURI).href)));
12705
12926
  const __dirname$1 = path.dirname(__filename$1);
12706
- const require_ = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-BOoGJGQc.cjs', document.baseURI).href)));
12927
+ const require_ = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-BnRQP3PL.cjs', document.baseURI).href)));
12707
12928
  const PRISMA_QUERY_ENGINE_FILES = {
12708
12929
  "arm64-darwin": "libquery_engine-darwin-arm64.dylib.node",
12709
12930
  "x64-darwin": "libquery_engine-darwin.dylib.node",
@@ -15327,7 +15548,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15327
15548
  process.exit(0);
15328
15549
  } else if (subcommand === "install-terminal-hooks") {
15329
15550
  try {
15330
- const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await Promise.resolve().then(function () { return require('./installTerminalHooks-FbKaK149.cjs'); });
15551
+ const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await Promise.resolve().then(function () { return require('./installTerminalHooks-BVk-r0yD.cjs'); });
15331
15552
  const command = parseTerminalHooksArgs(args.slice(1));
15332
15553
  if (command.action === "help") {
15333
15554
  console.log(TERMINAL_HOOKS_HELP);
@@ -15344,7 +15565,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15344
15565
  }
15345
15566
  } else if (subcommand === "spawn") {
15346
15567
  try {
15347
- const { handleSpawnCommand } = await Promise.resolve().then(function () { return require('./spawn-D_ZexrY9.cjs'); });
15568
+ const { handleSpawnCommand } = await Promise.resolve().then(function () { return require('./spawn-CweTEYze.cjs'); });
15348
15569
  await handleSpawnCommand(args.slice(1));
15349
15570
  } catch (error) {
15350
15571
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -15356,7 +15577,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15356
15577
  return;
15357
15578
  } else if (subcommand === "sessions") {
15358
15579
  try {
15359
- const { handleSessionsCommand } = await Promise.resolve().then(function () { return require('./sessions-CVuEsdRl.cjs'); });
15580
+ const { handleSessionsCommand } = await Promise.resolve().then(function () { return require('./sessions-DTBRcBRk.cjs'); });
15360
15581
  await handleSessionsCommand(args.slice(1));
15361
15582
  } catch (error) {
15362
15583
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -15368,7 +15589,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15368
15589
  return;
15369
15590
  } else if (subcommand === "send") {
15370
15591
  try {
15371
- const { handleSendCommand } = await Promise.resolve().then(function () { return require('./send-DBfSNILO.cjs'); });
15592
+ const { handleSendCommand } = await Promise.resolve().then(function () { return require('./send-By6zEUWo.cjs'); });
15372
15593
  await handleSendCommand(args.slice(1));
15373
15594
  } catch (error) {
15374
15595
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -15474,9 +15695,9 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15474
15695
  if (geminiSubcommand === "project" && args[2] === "set" && args[3]) {
15475
15696
  const projectId = args[3];
15476
15697
  try {
15477
- const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return require('./config-BR3tkFL_.cjs'); });
15478
- const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await Promise.resolve().then(function () { return require('./types-BG_5QKX5.cjs'); }).then(function (n) { return n.persistence; });
15479
- const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./types-BG_5QKX5.cjs'); }).then(function (n) { return n.api; });
15698
+ const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return require('./config-KX6e7GEu.cjs'); });
15699
+ const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await Promise.resolve().then(function () { return require('./types-R11tMGyX.cjs'); }).then(function (n) { return n.persistence; });
15700
+ const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./types-R11tMGyX.cjs'); }).then(function (n) { return n.api; });
15480
15701
  let userEmail = void 0;
15481
15702
  try {
15482
15703
  const credentials = await readCredentialsForConfiguredRelay2();
@@ -15507,7 +15728,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15507
15728
  }
15508
15729
  if (geminiSubcommand === "project" && args[2] === "get") {
15509
15730
  try {
15510
- const { readGeminiLocalConfig } = await Promise.resolve().then(function () { return require('./config-BR3tkFL_.cjs'); });
15731
+ const { readGeminiLocalConfig } = await Promise.resolve().then(function () { return require('./config-KX6e7GEu.cjs'); });
15511
15732
  const config = readGeminiLocalConfig();
15512
15733
  if (config.googleCloudProject) {
15513
15734
  console.log(`Current Google Cloud Project: ${config.googleCloudProject}`);
@@ -15547,7 +15768,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15547
15768
  process.exit(0);
15548
15769
  }
15549
15770
  try {
15550
- const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-D5ySpYIZ.cjs'); });
15771
+ const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-Dq1d8Ccb.cjs'); });
15551
15772
  let startedBy = void 0;
15552
15773
  for (let i = 1; i < args.length; i++) {
15553
15774
  if (args[i] === "--started-by") {
@@ -15569,7 +15790,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15569
15790
  return;
15570
15791
  } else if (subcommand === "acp") {
15571
15792
  try {
15572
- const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-CtBP0Qvc.cjs'); });
15793
+ const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-B7-t5Kwz.cjs'); });
15573
15794
  let startedBy = void 0;
15574
15795
  let verbose = false;
15575
15796
  const acpArgs = [];
@@ -15609,7 +15830,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15609
15830
  return;
15610
15831
  } else if (subcommand === "openclaw") {
15611
15832
  try {
15612
- const { runOpenClaw } = await Promise.resolve().then(function () { return require('./runOpenClaw-Bwrb1LXP.cjs'); });
15833
+ const { runOpenClaw } = await Promise.resolve().then(function () { return require('./runOpenClaw-BHXnUF_m.cjs'); });
15613
15834
  let startedBy = void 0;
15614
15835
  let verbose = false;
15615
15836
  let gatewayUrl;
@@ -15660,7 +15881,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15660
15881
  return;
15661
15882
  } else if (subcommand === "mcp" && args.length === 1) {
15662
15883
  try {
15663
- const { handleMcpCommand } = await Promise.resolve().then(function () { return require('./mcp-DPp-bYNE.cjs'); });
15884
+ const { handleMcpCommand } = await Promise.resolve().then(function () { return require('./mcp-D0DIU8Q2.cjs'); });
15664
15885
  await handleMcpCommand();
15665
15886
  } catch (error) {
15666
15887
  process.stderr.write(`[very-happy mcp] Fatal: ${error instanceof Error ? error.message : String(error)}
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-BOoGJGQc.cjs');
3
+ var index = require('./index-BnRQP3PL.cjs');
4
4
  var claudeAgentSdk = require('@anthropic-ai/claude-agent-sdk');
5
5
  require('chalk');
6
6
  require('node:os');
7
7
  require('node:crypto');
8
- require('./types-BG_5QKX5.cjs');
8
+ require('./types-R11tMGyX.cjs');
9
9
  require('axios');
10
10
  require('node:util');
11
11
  require('node:fs');
@@ -1,10 +1,10 @@
1
- import { D as DefaultTransport, A as AcpBackend } from './AcpBackend-CeXVb_s_.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-CeXVb_s_.mjs';
3
- import { h as connectionState, A as ApiClient, j as readSettings, k as encodeBase64, l as logger, p as projectPath } from './types-k_ipDb0c.mjs';
4
- import { A as AcpSessionManager } from './AcpSessionManager-vqdqfD1l.mjs';
1
+ import { D as DefaultTransport, A as AcpBackend } from './AcpBackend-DDEdYVW2.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-DDEdYVW2.mjs';
3
+ import { h as connectionState, A as ApiClient, j as readSettings, k as encodeBase64, l as logger, p as projectPath } from './types-C5ewhu1Q.mjs';
4
+ import { A as AcpSessionManager } from './AcpSessionManager-BORAhQ1r.mjs';
5
5
  import { randomUUID } from 'node:crypto';
6
6
  import { join } from 'node:path';
7
- import { h as initialMachineMetadata, j as createSessionMetadata, k as setupOfflineReconnection, n as notifyDaemonSessionStarted, m as MessageQueue2, o as hashObject, u as startHappyServer, v as registerKillSessionHandler, B as BasePermissionHandler } from './index-Bn-xsguz.mjs';
7
+ import { h as initialMachineMetadata, j as createSessionMetadata, k as setupOfflineReconnection, n as notifyDaemonSessionStarted, m as MessageQueue2, o as hashObject, u as startHappyServer, v as registerKillSessionHandler, B as BasePermissionHandler } from './index-inkhalP5.mjs';
8
8
  import 'node:child_process';
9
9
  import '@agentclientprotocol/sdk';
10
10
  import 'axios';