very-happy-cli 0.2.143 → 0.2.144

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 (49) hide show
  1. package/dist/{AcpBackend-LEgn9vol.mjs → AcpBackend-DLsPpWnc.mjs} +2 -2
  2. package/dist/{AcpBackend-B8oehrfU.cjs → AcpBackend-DssrjZDS.cjs} +30 -30
  3. package/dist/{AcpSessionManager-Yfbs5bi2.mjs → AcpSessionManager-1pAH8SdV.mjs} +1 -1
  4. package/dist/{AcpSessionManager-BomdfyhZ.cjs → AcpSessionManager-DkBV80Rr.cjs} +9 -9
  5. package/dist/{agentGuidance-BU4hxm8M.mjs → agentGuidance-CupQ9Lve.mjs} +1 -1
  6. package/dist/{agentGuidance-CJSl54ua.cjs → agentGuidance-D1PDVswF.cjs} +1 -1
  7. package/dist/agentHome-BaSxP7lQ.mjs +107 -0
  8. package/dist/agentHome-uf1zs2Fi.cjs +113 -0
  9. package/dist/codex/happyMcpStdioBridge.cjs +2 -2
  10. package/dist/codex/happyMcpStdioBridge.mjs +2 -2
  11. package/dist/{config-euZ_K5Lo.mjs → config-CxHoQo52.mjs} +4 -4
  12. package/dist/{config-CfqWoHmO.cjs → config-kx4y9oAI.cjs} +4 -4
  13. package/dist/{index-BREtikhm.cjs → index-DIoSNgtt.cjs} +4 -4
  14. package/dist/{index-DoiG88oX.mjs → index-Diu81aSC.mjs} +69 -24
  15. package/dist/{index-C510dSUn.cjs → index-Dn0JMM8l.cjs} +242 -197
  16. package/dist/{index-Bj68y6ee.cjs → index-Dox9iD5R.cjs} +31 -31
  17. package/dist/{index-PM_SsRpw.mjs → index-DxEaiVzX.mjs} +4 -4
  18. package/dist/{index-ZOMC8Gzn.mjs → index-J6a8OHS6.mjs} +8 -8
  19. package/dist/index.cjs +4 -4
  20. package/dist/index.mjs +4 -4
  21. package/dist/{installTerminalHooks-BGVQqbgq.mjs → installTerminalHooks-BBMGk3q5.mjs} +4 -4
  22. package/dist/{installTerminalHooks-C_jraM1j.cjs → installTerminalHooks-De7_iOOC.cjs} +4 -4
  23. package/dist/lib.cjs +5 -5
  24. package/dist/lib.mjs +2 -2
  25. package/dist/{limits-B3oVgqBJ.cjs → limits-C_Sklt--.cjs} +7 -7
  26. package/dist/{limits-uABU-yq3.mjs → limits-DxArdmkZ.mjs} +8 -8
  27. package/dist/{mcp-CfbTQXyh.mjs → mcp-C1oNnlw5.mjs} +4 -4
  28. package/dist/{mcp-G-3lL_KH.cjs → mcp-xyb8dYIQ.cjs} +9 -9
  29. package/dist/{piRuntime-CWE-1W-y.cjs → piRuntime-3Vbdgv6X.cjs} +2 -2
  30. package/dist/{piRuntime-BE6iYQwU.mjs → piRuntime-CzJdE4z4.mjs} +2 -2
  31. package/dist/{piTerminal-Dyc_9pGP.cjs → piTerminal-BFpwVGWr.cjs} +6 -6
  32. package/dist/{piTerminal-rqKn1_Zy.mjs → piTerminal-Do2GiKMN.mjs} +6 -6
  33. package/dist/{runGemini-C6qMFzcn.cjs → runGemini-CCdGxTF2.cjs} +24 -24
  34. package/dist/{runGemini-BMlXIaTL.mjs → runGemini-De5NRMT9.mjs} +6 -6
  35. package/dist/{runOpenClaw-CoO5Vp3S.mjs → runOpenClaw-C2t4DRyi.mjs} +5 -5
  36. package/dist/{runOpenClaw-C2_aCP7v.cjs → runOpenClaw-CRMUfrWk.cjs} +26 -26
  37. package/dist/{send-DGVwmB-p.cjs → send-BA1Dgpgn.cjs} +4 -4
  38. package/dist/{send-CBrJylJc.mjs → send-l6Rj09c0.mjs} +4 -4
  39. package/dist/{sessions-DyQXMN-8.cjs → sessions-CtVcoXvG.cjs} +5 -5
  40. package/dist/{sessions-DbLubh2N.mjs → sessions-MWLDqQk-.mjs} +4 -4
  41. package/dist/{spawn-DIyFOn3W.cjs → spawn-Be4nsNuQ.cjs} +6 -6
  42. package/dist/{spawn-wkkxEGdF.mjs → spawn-DKWR-6Qc.mjs} +4 -4
  43. package/dist/{teams-QOkGFjkJ.cjs → teams-CcjjNLi8.cjs} +4 -4
  44. package/dist/{teams-BTyVFK3P.mjs → teams-DMf9GNGE.mjs} +4 -4
  45. package/dist/{todo-DoLkqdBe.mjs → todo-BEXZRm1A.mjs} +3 -3
  46. package/dist/{todo-Du6pjwx_.cjs → todo-EffYAnre.cjs} +5 -5
  47. package/dist/{types-BG4gFjLL.mjs → types-D6YKR7wo.mjs} +321 -11
  48. package/dist/{types-6__wqmmP.cjs → types-DZ5c-9f3.cjs} +328 -9
  49. package/package.json +7 -7
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-C510dSUn.cjs');
3
+ var index = require('./index-Dn0JMM8l.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-6__wqmmP.cjs');
8
+ require('./types-DZ5c-9f3.cjs');
9
9
  require('axios');
10
- require('./limits-B3oVgqBJ.cjs');
10
+ require('./limits-C_Sklt--.cjs');
11
11
  require('node:fs/promises');
12
12
  require('node:fs');
13
13
  require('node:path');
@@ -32,7 +32,7 @@ require('fs');
32
32
  require('node:readline');
33
33
  require('@anthropic-ai/sandbox-runtime');
34
34
  require('expo-server-sdk');
35
- require('./agentGuidance-CJSl54ua.cjs');
35
+ require('./agentGuidance-D1PDVswF.cjs');
36
36
  require('ink');
37
37
  require('react');
38
38
  require('ps-list');
@@ -1,14 +1,14 @@
1
1
  import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import chalk from 'chalk';
2
2
  import os, { homedir, userInfo, tmpdir } from 'node:os';
3
3
  import { randomUUID, randomInt, randomBytes, createHash as createHash$1, timingSafeEqual } from 'node:crypto';
4
- import { o as notifyDaemonSessionEvent, q as getProjectPath, j as BUILTIN_TODO_DISCOVERY, r as initializeSandbox, w as wrapCommand, l as contentLogMetadata, I as InvalidateSync, R as RawJSONLinesSchema, m as delay, t as AsyncLock, S as STREAM_DELTA_MAX_CHARS, M as MAX_CHAT_ATTACHMENT_SOURCE_BYTES, u as notifyDaemonClaudeAuthFailed, v as commandOnPath, c as checkIfDaemonRunningAndCleanupStaleState, x as deriveLocalCliUpdateSummary, y as AGENT_VERSION_SOURCES, z as isClaudeSessionId, C as getLocalHappyAgentCredentialPath, D as readLocalHappyAgentCredentials, E as parseExactVersion, F as compareExactVersions, G as extractCompleteLines, H as decideBackfill, J as parseTerminalHookPayload, K as tmuxArgs, L as scrubTmuxClientEnv, N as decideMirrorBinding, O as MIRROR_BACKFILL_LINES_DEFAULT, P as mirrorLineKey, Q as mirrorLocalId, T as listDaemonSessions, U as stopDaemonSession, V as detectCLIAvailability, W as detectResumeSupport, X as isDaemonRunningCurrentlyInstalledHappyVersion, Y as stopDaemon, Z as TurnActivityTracker, _ as summarizeSpawnSessionForLog, $ as shellescape, A as ApiClient, a0 as fetchCliUpdateState, a1 as resolveCliUpdateCheckInterval, a2 as DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS, a3 as cleanupDaemonState, i as isValidSessionId, s as spawnDaemonSession, a4 as listVhTerminals, a5 as isValidTerminalId, a6 as readVhTerminal, a7 as sendToVhTerminal, a8 as ContextUsageSchema, a9 as TITLE_PROMPT_PREFIX, aa as BOARD_ANALYZER_PROMPT_PREFIX, h as connectionState, ab as startOfflineReconnection, n as notifyDaemonSessionStarted, d as createEnvelope, ac as CodexAppServerClient } from './types-BG4gFjLL.mjs';
5
- import { l as logger, E as ensurePrivateDirectory, F as hardenPrivateFile, c as configuration, p as packageJson, f as readSettings, G as readCredentials, v as credentialRelayProblem, o as readDaemonState, g as encodeBase64, H as readSettingsOutcome, I as updateSettings, J as encodeBase64Url, m as decodeBase64, K as writeCredentialsLegacy, L as writeCredentialsDataKey, d as readCredentialsForConfiguredRelay, j as encrypt, r as readPersistedSessions, w as writePrivateFileSync, M as decryptWithDataKey, N as decryptLegacy, O as persistSession, k as decrypt, h as ensurePrivateDirectorySync, P as acquireDaemonLock, Q as deletePersistedSessions, R as writeDaemonState, S as writeSettings, T as releaseDaemonLock, C as CLIPBOARD_TOOL_NAME, a as CLIPBOARD_TOOL_TITLE, b as CLIPBOARD_TOOL_DESCRIPTION, e as CLIPBOARD_MAX_BYTES, U as clearCredentials, V as clearMachineId, W as SandboxConfigSchema, X as getLatestDaemonLog } from './limits-uABU-yq3.mjs';
4
+ import { v as notifyDaemonSessionEvent, w as getProjectPath, o as BUILTIN_TODO_DISCOVERY, x as initializeSandbox, y as wrapCommand, t as contentLogMetadata, I as InvalidateSync, R as RawJSONLinesSchema, u as delay, z as AsyncLock, S as STREAM_DELTA_MAX_CHARS, M as MAX_CHAT_ATTACHMENT_SOURCE_BYTES, C as notifyDaemonClaudeAuthFailed, D as commandOnPath, c as checkIfDaemonRunningAndCleanupStaleState, E as deriveLocalCliUpdateSummary, F as AGENT_VERSION_SOURCES, G as isClaudeSessionId, H as getLocalHappyAgentCredentialPath, J as readLocalHappyAgentCredentials, K as parseExactVersion, L as compareExactVersions, N as extractCompleteLines, O as decideBackfill, P as parseTerminalHookPayload, Q as tmuxArgs, T as scrubTmuxClientEnv, U as decideMirrorBinding, V as MIRROR_BACKFILL_LINES_DEFAULT, W as mirrorLineKey, X as mirrorLocalId, Y as listDaemonSessions, Z as stopDaemonSession, _ as detectCLIAvailability, $ as detectResumeSupport, a0 as refreshAgentHomes, d as describeAgentHome, a1 as isDaemonRunningCurrentlyInstalledHappyVersion, a2 as stopDaemon, a3 as TurnActivityTracker, a4 as summarizeSpawnSessionForLog, a5 as locateClaudeConversation, a6 as agentHomeSpawnEnv, a7 as shellescape, A as ApiClient, a8 as fetchCliUpdateState, a9 as resolveCliUpdateCheckInterval, aa as DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS, ab as cleanupDaemonState, i as isValidSessionId, s as spawnDaemonSession, ac as listVhTerminals, ad as isValidTerminalId, ae as readVhTerminal, af as sendToVhTerminal, ag as ContextUsageSchema, ah as TITLE_PROMPT_PREFIX, ai as BOARD_ANALYZER_PROMPT_PREFIX, m as connectionState, aj as startOfflineReconnection, n as notifyDaemonSessionStarted, g as createEnvelope, ak as CodexAppServerClient } from './types-D6YKR7wo.mjs';
5
+ import { l as logger, F as ensurePrivateDirectory, G as hardenPrivateFile, c as configuration, p as packageJson, r as readSettings, H as readCredentials, x as credentialRelayProblem, o as readDaemonState, g as encodeBase64, I as readSettingsOutcome, u as updateSettings, J as encodeBase64Url, m as decodeBase64, K as writeCredentialsLegacy, L as writeCredentialsDataKey, e as readCredentialsForConfiguredRelay, j as encrypt, d as readPersistedSessions, w as writePrivateFileSync, M as decryptWithDataKey, N as decryptLegacy, O as persistSession, k as decrypt, h as ensurePrivateDirectorySync, P as acquireDaemonLock, Q as deletePersistedSessions, R as writeDaemonState, S as writeSettings, T as releaseDaemonLock, C as CLIPBOARD_TOOL_NAME, a as CLIPBOARD_TOOL_TITLE, b as CLIPBOARD_TOOL_DESCRIPTION, f as CLIPBOARD_MAX_BYTES, U as clearCredentials, V as clearMachineId, W as SandboxConfigSchema, X as getLatestDaemonLog } from './limits-DxArdmkZ.mjs';
6
6
  import spawn$1, { spawn } from 'cross-spawn';
7
7
  import path, { join, resolve, basename, isAbsolute, sep, dirname, delimiter, normalize } from 'node:path';
8
8
  import { createInterface } from 'node:readline';
9
9
  import { existsSync, readFileSync, readdirSync, statSync, mkdirSync, unlinkSync, renameSync, writeFileSync, accessSync, constants, openSync, fsyncSync, closeSync, rmSync as rmSync$1, chmodSync as chmodSync$1 } from 'node:fs';
10
10
  import { p as projectPath } from './projectPath-CSpqWdxp.mjs';
11
- import { f as trimIdent, A as AGENT_GUIDANCE, t as teamScopePath, T as TeamConnectionPreflightError, e as createTeamsClient, P as PREVIEW_TOOL_NAME, R as REPORT_PROGRESS_TOOL_NAME, g as TEAM_TOOL_NAMES, r as registerTeamsTools, a as PREVIEW_TOOL_TITLE, b as PREVIEW_TOOL_DESCRIPTION, h as REPORT_PROGRESS_TOOL_TITLE, i as REPORT_PROGRESS_TOOL_DESCRIPTION } from './agentGuidance-BU4hxm8M.mjs';
11
+ import { f as trimIdent, A as AGENT_GUIDANCE, t as teamScopePath, T as TeamConnectionPreflightError, e as createTeamsClient, P as PREVIEW_TOOL_NAME, R as REPORT_PROGRESS_TOOL_NAME, g as TEAM_TOOL_NAMES, r as registerTeamsTools, a as PREVIEW_TOOL_TITLE, b as PREVIEW_TOOL_DESCRIPTION, h as REPORT_PROGRESS_TOOL_TITLE, i as REPORT_PROGRESS_TOOL_DESCRIPTION } from './agentGuidance-CupQ9Lve.mjs';
12
12
  import { readFile, writeFile, rename, unlink, mkdir, symlink, rm, readlink, lstat, stat, open as open$1, appendFile } from 'node:fs/promises';
13
13
  import fs, { watch, access } from 'fs/promises';
14
14
  import { useStdout, useInput, Box, Text, render } from 'ink';
@@ -5294,6 +5294,16 @@ ${typeLabels[type] || type}:`));
5294
5294
  console.log(chalk.gray(" OS-keychain credentials cannot be verified here; see /docs/configuration#claude-credentials."));
5295
5295
  }
5296
5296
  console.log(chalk.gray(" An external claude command is only needed for native terminal/mirror use."));
5297
+ try {
5298
+ const { resolveAgentHomesForCli } = await import('./agentHome-BaSxP7lQ.mjs');
5299
+ const { describeAgentHome } = await import('./types-D6YKR7wo.mjs').then(function (n) { return n.al; });
5300
+ const homes = await resolveAgentHomesForCli();
5301
+ console.log(chalk.green(`\u2713 Claude config dir: ${describeAgentHome(homes.claudeConfigDir)}`));
5302
+ console.log(chalk.green(`\u2713 Codex home: ${describeAgentHome(homes.codexHome)}`));
5303
+ console.log(chalk.gray(" Resolved from settings.json, then your login shell, then the daemon environment; pin with `very-happy agent-home`."));
5304
+ } catch {
5305
+ console.log(chalk.yellow("\u25CB Could not resolve the Claude/Codex home directories"));
5306
+ }
5297
5307
  if (availableAgents.length === 0) {
5298
5308
  console.log(chalk.yellow("\u25CB No external agent command found on this daemon PATH"));
5299
5309
  console.log(chalk.gray(" Codex, Gemini, OpenCode, OpenClaw, and native Claude terminal paths need their local command or gateway."));
@@ -10094,6 +10104,12 @@ async function startDaemon() {
10094
10104
  let cliUpdateStateRef = null;
10095
10105
  let lastHandoverHold = null;
10096
10106
  let claudeCredentialStoreSetting = (await readSettings()).claudeCredentialStore === "file" ? "file" : "auto";
10107
+ try {
10108
+ const homes = await refreshAgentHomes();
10109
+ logger.debug(`[DAEMON RUN] Claude config dir: ${describeAgentHome(homes.claudeConfigDir)}; Codex home: ${describeAgentHome(homes.codexHome)}`);
10110
+ } catch (error) {
10111
+ logger.debug("[DAEMON RUN] agent home resolution failed; using the daemon environment as-is", error);
10112
+ }
10097
10113
  let requestShutdown;
10098
10114
  let resolvesWhenShutdownRequested = new Promise((resolve) => {
10099
10115
  requestShutdown = (source, errorMessage) => {
@@ -10259,7 +10275,8 @@ async function startDaemon() {
10259
10275
  }
10260
10276
  };
10261
10277
  const assistantSpawnGate = createSpawnGate();
10262
- const spawnSession = (options) => {
10278
+ const spawnSession = async (options) => {
10279
+ await refreshAgentHomes();
10263
10280
  if (assistantSpawnMode(options) !== "claude-singleton") {
10264
10281
  return spawnSessionImpl(options);
10265
10282
  }
@@ -10332,7 +10349,7 @@ async function startDaemon() {
10332
10349
  s.encryptionVariant
10333
10350
  );
10334
10351
  const claudeSessionId = resolveAssistantClaudeSessionId(s.metadata, serverMetadata);
10335
- const canResumeClaude = !!claudeSessionId && existsSync$1(join$1(getProjectPath(assistantHome()), `${claudeSessionId}.jsonl`));
10352
+ const canResumeClaude = !!claudeSessionId && locateClaudeConversation(assistantHome(), claudeSessionId) !== null;
10336
10353
  return spawnTrackedHappyProcess({
10337
10354
  args: [
10338
10355
  "claude",
@@ -10351,6 +10368,8 @@ async function startDaemon() {
10351
10368
  // B-297: see the resume/restart paths — every spawn carries the
10352
10369
  // credentialStore=file shim, not just fresh sessions (B-276 D8).
10353
10370
  ...claudeAuthServiceRef?.claudeProcessEnvOverrides() ?? {},
10371
+ // B-478: point Claude at the directory the transcript was found in.
10372
+ ...canResumeClaude ? agentHomeSpawnEnv({ workingDirectory: assistantHome(), claudeSessionId }) : {},
10354
10373
  HAPPY_SESSION_VARIANT: "assistant",
10355
10374
  HAPPY_RECONNECT_SESSION_ID: assistantSessionId,
10356
10375
  HAPPY_RECONNECT_ENCRYPTION_KEY: s.encryptionKey,
@@ -10505,6 +10524,7 @@ async function startDaemon() {
10505
10524
  tmuxEnv[key] = value;
10506
10525
  }
10507
10526
  }
10527
+ Object.assign(tmuxEnv, agentHomeSpawnEnv({ workingDirectory: directory, claudeSessionId: options.resumeClaudeSessionId, codexThreadId: options.resumeCodexThreadId }));
10508
10528
  Object.assign(tmuxEnv, extraEnv);
10509
10529
  const tmuxResult = await tmux.spawnInTmux([fullCommand], {
10510
10530
  sessionName: tmuxSessionName,
@@ -10599,6 +10619,9 @@ async function startDaemon() {
10599
10619
  cwd: directory,
10600
10620
  env: {
10601
10621
  ...process.env,
10622
+ // B-478: a fork/duplicate resumes a transcript that may live in
10623
+ // a moved config dir. Explicit environmentVariables still win.
10624
+ ...agentHomeSpawnEnv({ workingDirectory: directory, claudeSessionId: options.resumeClaudeSessionId, codexThreadId: options.resumeCodexThreadId }),
10602
10625
  ...extraEnv
10603
10626
  },
10604
10627
  directoryCreated,
@@ -10749,6 +10772,7 @@ async function startDaemon() {
10749
10772
  gate = createSpawnGate();
10750
10773
  resumeGates.set(happySessionId, gate);
10751
10774
  }
10775
+ await refreshAgentHomes();
10752
10776
  try {
10753
10777
  return await gate.join(() => resumeSessionImpl(happySessionId, options));
10754
10778
  } finally {
@@ -10795,7 +10819,9 @@ async function startDaemon() {
10795
10819
  }
10796
10820
  const precheck = resumePrecheck(metadata, {
10797
10821
  cwdExists: (p) => existsSync$1(p),
10798
- conversationExists: (cwd, claudeSessionId) => existsSync$1(join$1(getProjectPath(cwd), `${claudeSessionId}.jsonl`))
10822
+ // B-478: also looks in every other Claude config dir the user's shell
10823
+ // or settings point at, not just the one the daemon was started with.
10824
+ conversationExists: (cwd, claudeSessionId) => locateClaudeConversation(cwd, claudeSessionId) !== null
10799
10825
  });
10800
10826
  let freshConversation = false;
10801
10827
  if (!precheck.ok) {
@@ -10826,6 +10852,9 @@ async function startDaemon() {
10826
10852
  // fell back to `auto` reads a different credential store than the
10827
10853
  // fresh one next to it (B-276 D8).
10828
10854
  ...claudeAuthServiceRef?.claudeProcessEnvOverrides() ?? {},
10855
+ // B-478: if the transcript lives in a Claude/Codex home other than
10856
+ // the resolved one, this spawn is pointed there.
10857
+ ...freshConversation ? {} : agentHomeSpawnEnv({ workingDirectory: launch.cwd, claudeSessionId: metadata.claudeSessionId, codexThreadId: metadata.codexThreadId }),
10829
10858
  HAPPY_RECONNECT_SESSION_ID: happySessionId,
10830
10859
  HAPPY_RECONNECT_ENCRYPTION_KEY: encodeBase64(tracked.encryption.encryptionKey),
10831
10860
  HAPPY_RECONNECT_ENCRYPTION_VARIANT: tracked.encryption.encryptionVariant,
@@ -10887,6 +10916,7 @@ async function startDaemon() {
10887
10916
  gate = createSpawnGate();
10888
10917
  resumeGates.set(happySessionId, gate);
10889
10918
  }
10919
+ await refreshAgentHomes();
10890
10920
  try {
10891
10921
  return await gate.replace(() => restartSessionImpl(happySessionId, options));
10892
10922
  } finally {
@@ -10922,7 +10952,9 @@ async function startDaemon() {
10922
10952
  }
10923
10953
  const precheck = resumePrecheck(metadata, {
10924
10954
  cwdExists: (p) => existsSync$1(p),
10925
- conversationExists: (cwd2, claudeSessionId) => existsSync$1(join$1(getProjectPath(cwd2), `${claudeSessionId}.jsonl`))
10955
+ // B-478: also looks in every other Claude config dir the user's shell
10956
+ // or settings point at, not just the one the daemon was started with.
10957
+ conversationExists: (cwd2, claudeSessionId) => locateClaudeConversation(cwd2, claudeSessionId) !== null
10926
10958
  });
10927
10959
  let args;
10928
10960
  let cwd;
@@ -10957,6 +10989,8 @@ async function startDaemon() {
10957
10989
  // fell back to `auto` reads a different credential store than the
10958
10990
  // fresh one next to it (B-276 D8).
10959
10991
  ...claudeAuthServiceRef?.claudeProcessEnvOverrides() ?? {},
10992
+ // B-478: see resumeSession.
10993
+ ...precheck.ok ? agentHomeSpawnEnv({ workingDirectory: cwd, claudeSessionId: metadata.claudeSessionId, codexThreadId: metadata.codexThreadId }) : {},
10960
10994
  HAPPY_RECONNECT_SESSION_ID: happySessionId,
10961
10995
  HAPPY_RECONNECT_ENCRYPTION_KEY: encodeBase64(tracked.encryption.encryptionKey),
10962
10996
  HAPPY_RECONNECT_ENCRYPTION_VARIANT: tracked.encryption.encryptionVariant,
@@ -12354,7 +12388,7 @@ function registerSideQuestionHandler(rpc, deps) {
12354
12388
  const retainMs = deps.retainMs ?? SIDE_QUESTION_RETAIN_MS;
12355
12389
  const maxRunMs = deps.maxRunMs ?? SIDE_QUESTION_MAX_RUN_MS;
12356
12390
  const run = deps.run ?? (async (input) => {
12357
- const { query } = await import('./index-PM_SsRpw.mjs');
12391
+ const { query } = await import('./index-DxEaiVzX.mjs');
12358
12392
  return runSideQuestion(query, input);
12359
12393
  });
12360
12394
  const slots = /* @__PURE__ */ new Map();
@@ -17599,7 +17633,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17599
17633
  return;
17600
17634
  } else if (subcommand === "install-terminal-hooks") {
17601
17635
  try {
17602
- const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await import('./installTerminalHooks-BGVQqbgq.mjs');
17636
+ const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await import('./installTerminalHooks-BBMGk3q5.mjs');
17603
17637
  const command = parseTerminalHooksArgs(args.slice(1));
17604
17638
  if (command.action === "help") {
17605
17639
  console.log(TERMINAL_HOOKS_HELP);
@@ -17614,9 +17648,18 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17614
17648
  }
17615
17649
  process.exit(1);
17616
17650
  }
17651
+ } else if (subcommand === "agent-home") {
17652
+ try {
17653
+ const { parseAgentHomeArgs, runAgentHomeCommand } = await import('./agentHome-BaSxP7lQ.mjs');
17654
+ await runAgentHomeCommand(parseAgentHomeArgs(args.slice(1)));
17655
+ process.exit(0);
17656
+ } catch (error) {
17657
+ console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
17658
+ process.exit(1);
17659
+ }
17617
17660
  } else if (subcommand === "spawn") {
17618
17661
  try {
17619
- const { handleSpawnCommand } = await import('./spawn-wkkxEGdF.mjs');
17662
+ const { handleSpawnCommand } = await import('./spawn-DKWR-6Qc.mjs');
17620
17663
  await handleSpawnCommand(args.slice(1));
17621
17664
  } catch (error) {
17622
17665
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -17628,7 +17671,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17628
17671
  return;
17629
17672
  } else if (subcommand === "sessions") {
17630
17673
  try {
17631
- const { handleSessionsCommand } = await import('./sessions-DbLubh2N.mjs');
17674
+ const { handleSessionsCommand } = await import('./sessions-MWLDqQk-.mjs');
17632
17675
  await handleSessionsCommand(args.slice(1));
17633
17676
  } catch (error) {
17634
17677
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -17640,7 +17683,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17640
17683
  return;
17641
17684
  } else if (subcommand === "send") {
17642
17685
  try {
17643
- const { handleSendCommand } = await import('./send-CBrJylJc.mjs');
17686
+ const { handleSendCommand } = await import('./send-l6Rj09c0.mjs');
17644
17687
  await handleSendCommand(args.slice(1));
17645
17688
  } catch (error) {
17646
17689
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -17746,9 +17789,9 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17746
17789
  if (geminiSubcommand === "project" && args[2] === "set" && args[3]) {
17747
17790
  const projectId = args[3];
17748
17791
  try {
17749
- const { saveGoogleCloudProjectToConfig } = await import('./config-euZ_K5Lo.mjs');
17750
- const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await import('./limits-uABU-yq3.mjs').then(function (n) { return n.Y; });
17751
- const { ApiClient: ApiClient2 } = await import('./types-BG4gFjLL.mjs').then(function (n) { return n.ad; });
17792
+ const { saveGoogleCloudProjectToConfig } = await import('./config-CxHoQo52.mjs');
17793
+ const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await import('./limits-DxArdmkZ.mjs').then(function (n) { return n.Y; });
17794
+ const { ApiClient: ApiClient2 } = await import('./types-D6YKR7wo.mjs').then(function (n) { return n.am; });
17752
17795
  let userEmail = void 0;
17753
17796
  try {
17754
17797
  const credentials = await readCredentialsForConfiguredRelay2();
@@ -17779,7 +17822,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17779
17822
  }
17780
17823
  if (geminiSubcommand === "project" && args[2] === "get") {
17781
17824
  try {
17782
- const { readGeminiLocalConfig } = await import('./config-euZ_K5Lo.mjs');
17825
+ const { readGeminiLocalConfig } = await import('./config-CxHoQo52.mjs');
17783
17826
  const config = readGeminiLocalConfig();
17784
17827
  if (config.googleCloudProject) {
17785
17828
  console.log(`Current Google Cloud Project: ${config.googleCloudProject}`);
@@ -17819,7 +17862,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17819
17862
  process.exit(0);
17820
17863
  }
17821
17864
  try {
17822
- const { runGemini } = await import('./runGemini-BMlXIaTL.mjs');
17865
+ const { runGemini } = await import('./runGemini-De5NRMT9.mjs');
17823
17866
  let startedBy = void 0;
17824
17867
  for (let i = 1; i < args.length; i++) {
17825
17868
  if (args[i] === "--started-by") {
@@ -17842,7 +17885,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17842
17885
  } else if (subcommand === "pi") {
17843
17886
  if (args[1] === "--terminal") {
17844
17887
  try {
17845
- const { runPiTerminal } = await import('./piTerminal-rqKn1_Zy.mjs');
17888
+ const { runPiTerminal } = await import('./piTerminal-Do2GiKMN.mjs');
17846
17889
  process.exitCode = await runPiTerminal(args.slice(2));
17847
17890
  } catch (error) {
17848
17891
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -17859,7 +17902,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17859
17902
  }
17860
17903
  };
17861
17904
  try {
17862
- const { runAcp, resolveAcpAgentConfig } = await import('./index-ZOMC8Gzn.mjs');
17905
+ const { runAcp, resolveAcpAgentConfig } = await import('./index-J6a8OHS6.mjs');
17863
17906
  const parsed = parsePiRunnerArgs(args.slice(1));
17864
17907
  const resolved = resolveAcpAgentConfig(["pi", ...parsed.passthrough]);
17865
17908
  const { credentials } = await authAndSetupMachineIfNeeded();
@@ -17887,7 +17930,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17887
17930
  return;
17888
17931
  } else if (subcommand === "acp") {
17889
17932
  try {
17890
- const { runAcp, resolveAcpAgentConfig } = await import('./index-ZOMC8Gzn.mjs');
17933
+ const { runAcp, resolveAcpAgentConfig } = await import('./index-J6a8OHS6.mjs');
17891
17934
  let startedBy = void 0;
17892
17935
  let verbose = false;
17893
17936
  const acpArgs = [];
@@ -17927,7 +17970,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17927
17970
  return;
17928
17971
  } else if (subcommand === "openclaw") {
17929
17972
  try {
17930
- const { runOpenClaw } = await import('./runOpenClaw-CoO5Vp3S.mjs');
17973
+ const { runOpenClaw } = await import('./runOpenClaw-C2t4DRyi.mjs');
17931
17974
  let startedBy = void 0;
17932
17975
  let verbose = false;
17933
17976
  let gatewayUrl;
@@ -17978,7 +18021,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17978
18021
  return;
17979
18022
  } else if (subcommand === "todo") {
17980
18023
  try {
17981
- const { handleTodoCommand } = await import('./todo-DoLkqdBe.mjs');
18024
+ const { handleTodoCommand } = await import('./todo-BEXZRm1A.mjs');
17982
18025
  await handleTodoCommand(args.slice(1));
17983
18026
  } catch (error) {
17984
18027
  console.error(JSON.stringify({ error: error instanceof Error ? error.message : "Todo command failed" }));
@@ -17987,7 +18030,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17987
18030
  return;
17988
18031
  } else if (subcommand === "teams") {
17989
18032
  try {
17990
- const { handleTeamsCommand } = await import('./teams-BTyVFK3P.mjs');
18033
+ const { handleTeamsCommand } = await import('./teams-DMf9GNGE.mjs');
17991
18034
  await handleTeamsCommand(args.slice(1));
17992
18035
  } catch (error) {
17993
18036
  console.error(error instanceof Error ? error.message : "Teams command failed");
@@ -17996,7 +18039,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17996
18039
  return;
17997
18040
  } else if (subcommand === "mcp" && (args.length === 1 || args.length === 2 && args[1] === "--terminal-tools")) {
17998
18041
  try {
17999
- const { handleMcpCommand } = await import('./mcp-CfbTQXyh.mjs');
18042
+ const { handleMcpCommand } = await import('./mcp-C1oNnlw5.mjs');
18000
18043
  await handleMcpCommand(args[1] === "--terminal-tools");
18001
18044
  } catch (error) {
18002
18045
  process.stderr.write(`[very-happy mcp] Fatal: ${error instanceof Error ? error.message : String(error)}
@@ -18226,6 +18269,8 @@ ${chalk.bold("Usage:")}
18226
18269
  very-happy install-terminal-hooks
18227
18270
  Install optional Claude terminal mirror hooks
18228
18271
  (add --remove to uninstall them)
18272
+ very-happy agent-home Show or pin where Claude Code / Codex keep their
18273
+ conversations on this machine (agent-home --help)
18229
18274
  very-happy connect Connect AI vendor API keys
18230
18275
  very-happy todo Built-in Todos and official agent skill (todo --help)
18231
18276
  very-happy sandbox Configure and manage OS-level sandboxing