very-happy-cli 0.2.148 → 0.2.150

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-CrcdMnL6.mjs → AcpBackend-C-dhGJgd.mjs} +2 -2
  2. package/dist/{AcpBackend-BrM-mcjR.cjs → AcpBackend-CXawaWWx.cjs} +2 -2
  3. package/dist/{AcpSessionManager-DIafxIVU.mjs → AcpSessionManager-DKOtSqJc.mjs} +1 -1
  4. package/dist/{AcpSessionManager-CKhv-rBo.cjs → AcpSessionManager-TrwEZR7y.cjs} +1 -1
  5. package/dist/{agentGuidance-gzl2qRkG.cjs → agentGuidance-Dla-BXO8.cjs} +1 -1
  6. package/dist/{agentGuidance-CR7rOQUF.mjs → agentGuidance-DrfhtVP1.mjs} +1 -1
  7. package/dist/{agentHome-CQrd95jc.mjs → agentHome-Dm-Wjs38.mjs} +2 -2
  8. package/dist/{agentHome-Qh6SWyHx.cjs → agentHome-rylNIkix.cjs} +2 -2
  9. package/dist/codex/happyMcpStdioBridge.cjs +2 -2
  10. package/dist/codex/happyMcpStdioBridge.mjs +2 -2
  11. package/dist/{config-CFSD65_X.cjs → config-CgPu2wtS.cjs} +4 -4
  12. package/dist/{config-DkCS4663.mjs → config-Dhu6LU0h.mjs} +4 -4
  13. package/dist/{index-eLVXOce3.mjs → index-BsYH1sjV.mjs} +4 -4
  14. package/dist/{index-Cobfu9V_.mjs → index-CpNYvMTJ.mjs} +196 -66
  15. package/dist/{index-C4JoaSCO.mjs → index-CzpooENj.mjs} +8 -8
  16. package/dist/{index-x5-N7ElS.cjs → index-DEVkDRas.cjs} +7 -7
  17. package/dist/{index-C_hZVtR-.cjs → index-DvfCUuDK.cjs} +4 -4
  18. package/dist/{index-C1OeYxxj.cjs → index-K6mUS0jF.cjs} +194 -64
  19. package/dist/index.cjs +4 -4
  20. package/dist/index.mjs +4 -4
  21. package/dist/{installTerminalHooks-D9pIHXxU.mjs → installTerminalHooks-BF_tmw9V.mjs} +4 -4
  22. package/dist/{installTerminalHooks-CuqhiAo9.cjs → installTerminalHooks-NIbsQ1wi.cjs} +4 -4
  23. package/dist/lib.cjs +2 -2
  24. package/dist/lib.mjs +2 -2
  25. package/dist/{limits-D364Cpe3.cjs → limits-Dyma1REp.cjs} +8 -8
  26. package/dist/{limits-BfYfA7tt.mjs → limits-FThmm7WR.mjs} +8 -8
  27. package/dist/{mcp-DTXsdDwc.mjs → mcp-DzydgXpf.mjs} +4 -4
  28. package/dist/{mcp-B5ojE8_m.cjs → mcp-_TVUSg8W.cjs} +4 -4
  29. package/dist/{piRuntime-BWEgqBHm.mjs → piRuntime-ACOhil6t.mjs} +2 -2
  30. package/dist/{piRuntime-CbSaG74b.cjs → piRuntime-CSAiJk0X.cjs} +2 -2
  31. package/dist/{piTerminal-CnS3TF7M.mjs → piTerminal-BlE4vbvZ.mjs} +6 -6
  32. package/dist/{piTerminal-Bzremid-.cjs → piTerminal-DHxGB3Ic.cjs} +6 -6
  33. package/dist/{runGemini-Ci6ULPA7.cjs → runGemini-BMYCU16c.cjs} +6 -6
  34. package/dist/{runGemini-C13-aRss.mjs → runGemini-D5IV1MoF.mjs} +6 -6
  35. package/dist/{runOpenClaw-D4ABejEy.mjs → runOpenClaw-CWPXrKMJ.mjs} +5 -5
  36. package/dist/{runOpenClaw-D2DW9Umc.cjs → runOpenClaw-Qs4eFtcS.cjs} +5 -5
  37. package/dist/{send-D-9_jOIS.mjs → send-Dv0km8UI.mjs} +4 -4
  38. package/dist/{send-1hJXKzeP.cjs → send-qXWGilm8.cjs} +4 -4
  39. package/dist/{sessions-DOrymTYB.cjs → sessions-CpIdDhH7.cjs} +4 -4
  40. package/dist/{sessions-C9VwpMKY.mjs → sessions-DoULfKui.mjs} +4 -4
  41. package/dist/{spawn-C4uID9JX.mjs → spawn-DQuOmUP7.mjs} +4 -4
  42. package/dist/{spawn-B1IlltVe.cjs → spawn-DqzG1bTH.cjs} +4 -4
  43. package/dist/{teams-CCv46ebr.mjs → teams-4mhNh5cj.mjs} +4 -4
  44. package/dist/{teams-xIRGgxwJ.cjs → teams-ByEgUzsH.cjs} +4 -4
  45. package/dist/{todo-5QemH15n.mjs → todo-C9IAUf0K.mjs} +3 -3
  46. package/dist/{todo-DrsOEfYU.cjs → todo-D7SDXL0c.cjs} +3 -3
  47. package/dist/{types-CXF6tULJ.mjs → types-BD542hb1.mjs} +4 -3
  48. package/dist/{types-IU5nGuaQ.cjs → types-D2Gkpe0N.cjs} +4 -3
  49. package/package.json +8 -8
@@ -1,15 +1,15 @@
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 { 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-CXF6tULJ.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-BfYfA7tt.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-BD542hb1.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-FThmm7WR.mjs';
6
6
  import spawn$1, { spawn } from 'cross-spawn';
7
- import path, { join, resolve, basename, isAbsolute, sep, dirname, delimiter, normalize } from 'node:path';
7
+ import path, { join, resolve, basename, delimiter, isAbsolute, dirname, sep, normalize } from 'node:path';
8
8
  import { createInterface } from 'node:readline';
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';
9
+ import { existsSync, readFileSync, readdirSync, statSync, mkdirSync, realpathSync, unlinkSync, renameSync, writeFileSync, accessSync, constants as constants$1, 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-CR7rOQUF.mjs';
12
- import { readFile, writeFile, rename, unlink, mkdir, symlink, rm, readlink, lstat, stat, open as open$1, appendFile } from 'node:fs/promises';
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-DrfhtVP1.mjs';
12
+ import { readFile, writeFile, rename, unlink, mkdir, access as access$1, symlink, rm, readlink, lstat, constants, 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';
15
15
  import React, { useState, useRef, useEffect, useCallback } from 'react';
@@ -5104,6 +5104,61 @@ function shareSafeEnvironmentInfo(env = process.env, runtime = process) {
5104
5104
  };
5105
5105
  }
5106
5106
 
5107
+ const NPM_SAFE_ARG = /^[A-Za-z0-9@=.,+/_-]+$/;
5108
+ function globalPrefixForPackage(packageDir) {
5109
+ if (!isAbsolute(packageDir)) return null;
5110
+ const dir = resolve(packageDir);
5111
+ const nodeModules = dirname(dir);
5112
+ const lib = dirname(nodeModules);
5113
+ const prefix = dirname(lib);
5114
+ if (basename(dir) !== "very-happy-cli" || basename(nodeModules) !== "node_modules" || basename(lib) !== "lib") return null;
5115
+ if (prefix === lib || resolve(prefix) === "/" || !NPM_SAFE_ARG.test(prefix)) return null;
5116
+ return prefix;
5117
+ }
5118
+ function packageDirForBin(realBin) {
5119
+ const packageDir = dirname(dirname(realBin));
5120
+ return basename(dirname(realBin)) === "bin" && basename(packageDir) === "very-happy-cli" ? packageDir : null;
5121
+ }
5122
+ function installLocationWarnings(facts, version) {
5123
+ const warnings = [];
5124
+ const running = resolve(facts.runningPackageDir);
5125
+ const packages = [...new Set(facts.onPath.map(packageDirForBin).filter((dir) => Boolean(dir)).map((dir) => resolve(dir)))];
5126
+ if (packages.length > 1) {
5127
+ warnings.push(`Found ${packages.length} very-happy installs on PATH (first one wins): ${packages.join(", ")}. Updating one does not update the others; remove the ones you do not use.`);
5128
+ }
5129
+ if (packages[0] && packages[0] !== running) {
5130
+ warnings.push(`The very-happy command runs ${packages[0]}, but this CLI runs from ${running}.`);
5131
+ }
5132
+ const prefix = globalPrefixForPackage(running);
5133
+ if (prefix && facts.npmGlobalPrefix && resolve(facts.npmGlobalPrefix) !== resolve(prefix)) {
5134
+ const target = version ? `very-happy-cli@${version}` : "very-happy-cli@latest";
5135
+ warnings.push(`npm install -g writes to ${facts.npmGlobalPrefix}, but this CLI runs from ${prefix}; a plain update will not take effect. Update with: npm install -g --prefix ${prefix} --allow-scripts=very-happy-cli,node-pty ${target} && very-happy daemon start`);
5136
+ }
5137
+ return warnings;
5138
+ }
5139
+ function gatherInstallLocationFacts(runningPackageDir, env = process.env) {
5140
+ if (process.platform === "win32") return null;
5141
+ const onPath = [];
5142
+ for (const dir of (env.PATH ?? "").split(delimiter)) {
5143
+ if (!dir) continue;
5144
+ try {
5145
+ const candidate = join(dir, "very-happy");
5146
+ if (!statSync(candidate).isFile()) continue;
5147
+ const real = realpathSync(candidate);
5148
+ if (!onPath.includes(real)) onPath.push(real);
5149
+ } catch {
5150
+ }
5151
+ }
5152
+ let npmGlobalPrefix = null;
5153
+ try {
5154
+ const result = spawnSync("npm", ["prefix", "-g"], { encoding: "utf8", timeout: 5e3, env });
5155
+ const out = result.status === 0 ? result.stdout.trim() : "";
5156
+ npmGlobalPrefix = out && isAbsolute(out) && !out.includes("\n") ? out : null;
5157
+ } catch {
5158
+ }
5159
+ return { runningPackageDir, onPath, npmGlobalPrefix };
5160
+ }
5161
+
5107
5162
  function printCliUpdateStatus(state) {
5108
5163
  const installed = configuration.currentCliVersion;
5109
5164
  const running = state?.startedWithCliVersion ?? null;
@@ -5121,6 +5176,10 @@ function printCliUpdateStatus(state) {
5121
5176
  console.log(chalk.yellow(" \u25B3 A newer CLI is available."));
5122
5177
  }
5123
5178
  if (summary.installCommand) console.log(` Update: ${summary.installCommand}`);
5179
+ const facts = gatherInstallLocationFacts(projectPath());
5180
+ for (const warning of facts ? installLocationWarnings(facts, state?.cliUpdate?.recommendedVersion ?? void 0) : []) {
5181
+ console.log(chalk.yellow(` \u26A0 ${warning}`));
5182
+ }
5124
5183
  }
5125
5184
  function getEnvironmentInfo() {
5126
5185
  return shareSafeEnvironmentInfo();
@@ -5313,8 +5372,8 @@ ${typeLabels[type] || type}:`));
5313
5372
  }
5314
5373
  console.log(chalk.gray(" An external claude command is only needed for native terminal/mirror use."));
5315
5374
  try {
5316
- const { resolveAgentHomesForCli } = await import('./agentHome-CQrd95jc.mjs');
5317
- const { describeAgentHome } = await import('./types-CXF6tULJ.mjs').then(function (n) { return n.al; });
5375
+ const { resolveAgentHomesForCli } = await import('./agentHome-Dm-Wjs38.mjs');
5376
+ const { describeAgentHome } = await import('./types-BD542hb1.mjs').then(function (n) { return n.al; });
5318
5377
  const homes = await resolveAgentHomesForCli();
5319
5378
  console.log(chalk.green(`\u2713 Claude config dir: ${describeAgentHome(homes.claudeConfigDir)}`));
5320
5379
  console.log(chalk.green(`\u2713 Codex home: ${describeAgentHome(homes.codexHome)}`));
@@ -7617,8 +7676,8 @@ function serialTask(task) {
7617
7676
  };
7618
7677
  }
7619
7678
 
7620
- function autoUpdateInstallArgs(version) {
7621
- return ["i", "-g", "--allow-scripts=very-happy-cli,node-pty", `very-happy-cli@${version}`];
7679
+ function autoUpdateInstallArgs(version, prefix) {
7680
+ return ["i", "-g", ...prefix ? [`--prefix=${prefix}`] : [], "--allow-scripts=very-happy-cli,node-pty", `very-happy-cli@${version}`];
7622
7681
  }
7623
7682
 
7624
7683
  const processDefaults = {
@@ -7678,7 +7737,34 @@ const runNpmProcess = (args, deps = processDefaults) => new Promise((resolveResu
7678
7737
  child.on("close", (code) => done({ code: timedOut ? null : code, stdout, stderr, terminationConfirmed: !timedOut || treeKilled }));
7679
7738
  });
7680
7739
  const runNpm = (args) => runNpmProcess(args);
7681
- const defaults = { npm: runNpm, fs: { lstat, readlink, unlink, rm, readFile, symlink }, platform: process.platform };
7740
+ const defaults = {
7741
+ npm: runNpm,
7742
+ fs: { lstat, readlink, unlink, rm, readFile, symlink, access: access$1 },
7743
+ platform: process.platform,
7744
+ runningPackageDir: projectPath()
7745
+ };
7746
+ async function runningVersion(deps) {
7747
+ if (!deps.runningPackageDir) return null;
7748
+ try {
7749
+ const manifest = JSON.parse(await deps.fs.readFile(join(deps.runningPackageDir, "package.json"), "utf8"));
7750
+ return manifest?.name === "very-happy-cli" && typeof manifest.version === "string" ? manifest.version : null;
7751
+ } catch {
7752
+ return null;
7753
+ }
7754
+ }
7755
+ async function verifyRunningCopy(code, version, deps) {
7756
+ if (code !== 0 || !deps.runningPackageDir) return code;
7757
+ return await runningVersion(deps) === version ? 0 : { failed: "installed_elsewhere" };
7758
+ }
7759
+ async function writable(path, deps) {
7760
+ if (!deps.fs.access) return true;
7761
+ try {
7762
+ await deps.fs.access(path, constants.W_OK);
7763
+ return true;
7764
+ } catch (error) {
7765
+ return error.code === "ENOENT";
7766
+ }
7767
+ }
7682
7768
  function ownedCliLink(link, target, packageDir) {
7683
7769
  const resolved = resolve(dirname(link), target);
7684
7770
  return resolved.startsWith(join(packageDir, "bin") + sep);
@@ -7686,14 +7772,27 @@ function ownedCliLink(link, target, packageDir) {
7686
7772
  async function installCliSafely(version, deps = defaults) {
7687
7773
  const parsed = parseExactVersion(version);
7688
7774
  if (!parsed) throw new Error("Invalid exact CLI version");
7689
- const args = autoUpdateInstallArgs(parsed.exact);
7690
7775
  if (deps.platform === "win32") {
7691
- const result2 = await deps.npm(args);
7692
- return result2.terminationConfirmed === false ? "blocked" : result2.code;
7776
+ const result2 = await deps.npm(autoUpdateInstallArgs(parsed.exact));
7777
+ return result2.terminationConfirmed === false ? "blocked" : verifyRunningCopy(result2.code, parsed.exact, deps);
7778
+ }
7779
+ let pinnedPrefix;
7780
+ if (deps.runningPackageDir) {
7781
+ const running = globalPrefixForPackage(deps.runningPackageDir);
7782
+ const runningStat = running ? await deps.fs.lstat(deps.runningPackageDir).catch(() => null) : null;
7783
+ if (!running || !runningStat?.isDirectory() || runningStat.isSymbolicLink() || !await runningVersion(deps)) {
7784
+ return { manual: "install_location_unverified" };
7785
+ }
7786
+ for (const path of [dirname(deps.runningPackageDir), deps.runningPackageDir, join(running, "bin")]) {
7787
+ if (!await writable(path, deps)) return { manual: "install_location_not_writable" };
7788
+ }
7789
+ pinnedPrefix = running;
7693
7790
  }
7694
- const rootResult = await deps.npm(["root", "-g"]);
7791
+ const prefixArgs = pinnedPrefix ? [`--prefix=${pinnedPrefix}`] : [];
7792
+ const args = autoUpdateInstallArgs(parsed.exact, pinnedPrefix);
7793
+ const rootResult = await deps.npm(["root", "-g", ...prefixArgs]);
7695
7794
  if (rootResult.terminationConfirmed === false) return "blocked";
7696
- const prefixResult = await deps.npm(["prefix", "-g"]);
7795
+ const prefixResult = await deps.npm(["prefix", "-g", ...prefixArgs]);
7697
7796
  if (prefixResult.terminationConfirmed === false) return "blocked";
7698
7797
  const root = rootResult.stdout.trim();
7699
7798
  const prefix = prefixResult.stdout.trim();
@@ -7702,6 +7801,9 @@ async function installCliSafely(version, deps = defaults) {
7702
7801
  }
7703
7802
  if (resolve(root) !== resolve(prefix, "lib/node_modules")) throw new Error("Unexpected npm root/prefix relationship");
7704
7803
  const packageDir = join(root, "very-happy-cli");
7804
+ if (deps.runningPackageDir && resolve(packageDir) !== resolve(deps.runningPackageDir)) {
7805
+ return { manual: "install_location_unverified" };
7806
+ }
7705
7807
  const packageStat = await deps.fs.lstat(packageDir).catch((error) => {
7706
7808
  if (error.code === "ENOENT") return null;
7707
7809
  throw error;
@@ -7736,7 +7838,7 @@ async function installCliSafely(version, deps = defaults) {
7736
7838
  return "blocked";
7737
7839
  }
7738
7840
  result = first.code;
7739
- if (first.code === 0 || first.code === null) return first.code;
7841
+ if (first.code === 0 || first.code === null) return await verifyRunningCopy(first.code, parsed.exact, deps);
7740
7842
  if (!/\b(?:EEXIST|ENOTEMPTY)\b/.test(first.stderr ?? "")) return first.code;
7741
7843
  const failedStat = await deps.fs.lstat(packageDir).catch((error) => {
7742
7844
  if (error.code === "ENOENT") return null;
@@ -7752,7 +7854,7 @@ async function installCliSafely(version, deps = defaults) {
7752
7854
  safeToRestore = false;
7753
7855
  return "blocked";
7754
7856
  }
7755
- return result;
7857
+ return await verifyRunningCopy(result, parsed.exact, deps);
7756
7858
  } finally {
7757
7859
  if (result !== 0 && safeToRestore) {
7758
7860
  for (const { link, target } of ownLinks) {
@@ -7788,7 +7890,7 @@ function createUpdateController(deps) {
7788
7890
  async function evaluate() {
7789
7891
  if (!policy || running) return;
7790
7892
  const target = manualVersion ?? policy.autoUpdateVersion ?? null;
7791
- if (outcome?.version === target && ["failed", "installed"].includes(outcome.state)) {
7893
+ if (outcome?.version === target && ["failed", "installed", "manual_required"].includes(outcome.state)) {
7792
7894
  const fingerprint = JSON.stringify([policy.checkedAt, outcome.state, outcome.version, outcome.detail, manualVersion]);
7793
7895
  if (fingerprint !== lastPublished) {
7794
7896
  lastPublished = fingerprint;
@@ -7826,6 +7928,11 @@ function createUpdateController(deps) {
7826
7928
  publish("installing", target);
7827
7929
  try {
7828
7930
  const code = await deps.install(target);
7931
+ if (code && typeof code === "object") {
7932
+ if ("manual" in code) publish("manual_required", target, code.manual);
7933
+ else publish("failed", target, code.failed);
7934
+ return;
7935
+ }
7829
7936
  blocked = code === "blocked";
7830
7937
  publish(
7831
7938
  blocked ? "manual_required" : code === 0 ? "installed" : "failed",
@@ -8219,7 +8326,7 @@ class ClaudeAuthService {
8219
8326
  const bin = join(dir, "security");
8220
8327
  try {
8221
8328
  if (!statSync(bin).isFile()) return null;
8222
- accessSync(bin, constants.X_OK);
8329
+ accessSync(bin, constants$1.X_OK);
8223
8330
  return dir;
8224
8331
  } catch {
8225
8332
  return null;
@@ -11433,7 +11540,7 @@ async function retainIntent(path, input) {
11433
11540
  await mkdir(dirname(path), { recursive: true, mode: 448 });
11434
11541
  let file;
11435
11542
  try {
11436
- file = await open$1(path, constants.O_WRONLY | constants.O_CREAT | constants.O_EXCL, 384);
11543
+ file = await open$1(path, constants$1.O_WRONLY | constants$1.O_CREAT | constants$1.O_EXCL, 384);
11437
11544
  } catch (error) {
11438
11545
  if (error.code !== "EEXIST") throw new Error("Cannot retain team connection request");
11439
11546
  }
@@ -11446,7 +11553,7 @@ async function retainIntent(path, input) {
11446
11553
  }
11447
11554
  return { fresh: true };
11448
11555
  }
11449
- const existing = await open$1(path, constants.O_RDONLY | (constants.O_NOFOLLOW ?? 0));
11556
+ const existing = await open$1(path, constants$1.O_RDONLY | (constants$1.O_NOFOLLOW ?? 0));
11450
11557
  try {
11451
11558
  const stat = await existing.stat();
11452
11559
  if (!stat.isFile() || process.platform !== "win32" && (stat.mode & 63) !== 0 || typeof process.getuid === "function" && stat.uid !== process.getuid()) throw new Error("Unsafe team connection receipt");
@@ -12470,7 +12577,7 @@ function registerSideQuestionHandler(rpc, deps) {
12470
12577
  const retainMs = deps.retainMs ?? SIDE_QUESTION_RETAIN_MS;
12471
12578
  const maxRunMs = deps.maxRunMs ?? SIDE_QUESTION_MAX_RUN_MS;
12472
12579
  const fork = deps.run ?? (async (input) => {
12473
- const { query } = await import('./index-eLVXOce3.mjs');
12580
+ const { query } = await import('./index-BsYH1sjV.mjs');
12474
12581
  return runSideQuestion(query, input);
12475
12582
  });
12476
12583
  const run = async (input, live) => {
@@ -13050,7 +13157,7 @@ async function runClaude(credentials, options = {}) {
13050
13157
  // a brand-new session cannot pick a PDF until after sending once.
13051
13158
  attachmentKinds: [...CLAUDE_ATTACHMENT_KINDS],
13052
13159
  queueCancellation: true,
13053
- capabilities: ["claude-steer-v1", "claude-live-permission-v1", "claude-live-permission-v2", "claude-btw-v1", "claude-runtime-controls-v1"],
13160
+ capabilities: ["claude-steer-v1", "claude-live-permission-v1", "claude-live-permission-v2", "claude-btw-v1", "claude-runtime-controls-v1", "claude-opus-5-5-v1"],
13054
13161
  // Effective mode this process enforces. Kept current by
13055
13162
  // publishPermissionMode below; the web renders it instead of guessing.
13056
13163
  permissionMode: mapToClaudeMode(initialPermissionMode ?? "default"),
@@ -16563,6 +16670,43 @@ function resolveCodexExecutionPolicy(permissionMode, sandboxManagedByHappy) {
16563
16670
  return { approvalPolicy, sandbox };
16564
16671
  }
16565
16672
 
16673
+ function unsupportedEffortReason(catalog, model, effort) {
16674
+ if (!effort) return null;
16675
+ const selected = catalog.find((entry) => model ? entry.model === model : entry.isDefault);
16676
+ if (!selected) return null;
16677
+ if (selected.supportedReasoningEfforts.some((option) => option.reasoningEffort === effort)) return null;
16678
+ return `Reasoning effort "${effort}" is not supported by ${model ?? "the default model"}. Choose a supported level.`;
16679
+ }
16680
+
16681
+ function readableCodexErrorText(text) {
16682
+ const trimmed = text.trim();
16683
+ if (!trimmed.startsWith("{")) return trimmed;
16684
+ try {
16685
+ const body = JSON.parse(trimmed);
16686
+ const inner = typeof body.error === "object" && body.error ? body.error.message : void 0;
16687
+ const message = typeof inner === "string" && inner.trim() ? inner : typeof body.error === "string" && body.error.trim() ? body.error : typeof body.message === "string" && body.message.trim() ? body.message : null;
16688
+ return message ? message.trim() : trimmed;
16689
+ } catch {
16690
+ return trimmed;
16691
+ }
16692
+ }
16693
+ function describeCodexFailure(msg) {
16694
+ const hasFailure = msg?.status === "failed" || msg?.error !== void 0 && msg?.error !== null;
16695
+ if (!hasFailure) return null;
16696
+ const err = msg.error;
16697
+ if (typeof err === "string" && err.length > 0) return readableCodexErrorText(err);
16698
+ if (err && typeof err === "object" && typeof err.message === "string" && err.message.length > 0) {
16699
+ return readableCodexErrorText(err.message);
16700
+ }
16701
+ return "Unknown error";
16702
+ }
16703
+ const TRANSPORT_LOSS = /^Codex process (exited|disconnected)\b|stdin not writable| timed out after \d+ms/;
16704
+ function describeThrownTurnError(error) {
16705
+ const message = error instanceof Error ? error.message : typeof error === "string" ? error : "";
16706
+ if (!message.trim() || TRANSPORT_LOSS.test(message)) return null;
16707
+ return readableCodexErrorText(message);
16708
+ }
16709
+
16566
16710
  async function resumeExistingThread(opts) {
16567
16711
  try {
16568
16712
  const resumedThread = await opts.client.resumeThread({
@@ -16781,16 +16925,6 @@ function safeCodexErrorMetadata(value) {
16781
16925
  };
16782
16926
  }
16783
16927
 
16784
- function describeCodexFailure(msg) {
16785
- const hasFailure = msg?.status === "failed" || msg?.error !== void 0 && msg?.error !== null;
16786
- if (!hasFailure) return null;
16787
- const err = msg.error;
16788
- if (typeof err === "string" && err.length > 0) return err;
16789
- if (err && typeof err === "object" && typeof err.message === "string" && err.message.length > 0) {
16790
- return err.message;
16791
- }
16792
- return "Unknown error";
16793
- }
16794
16928
  const DEFAULT_CODEX_MODEL = "gpt-5.5";
16795
16929
  const DEFAULT_CODEX_EFFORT = "medium";
16796
16930
  async function runCodex(opts) {
@@ -16952,15 +17086,6 @@ async function runCodex(opts) {
16952
17086
  "yolo"
16953
17087
  ];
16954
17088
  let discoveredModels = [];
16955
- const VALID_REMOTE_EFFORTS = [
16956
- "none",
16957
- "minimal",
16958
- "low",
16959
- "medium",
16960
- "high",
16961
- "xhigh",
16962
- "max"
16963
- ];
16964
17089
  registerAgentAttachmentDownloads(session);
16965
17090
  let userMessageDelivery = Promise.resolve();
16966
17091
  session.onUserMessage((message) => {
@@ -17455,10 +17580,9 @@ async function runCodex(opts) {
17455
17580
  message.mode.permissionMode,
17456
17581
  sandboxManagedByHappy
17457
17582
  );
17458
- const selectedModel = discoveredModels.find((model) => message.mode.model ? model.model === message.mode.model : model.isDefault);
17459
- const supportedEfforts = selectedModel?.supportedReasoningEfforts.map((option) => option.reasoningEffort) ?? VALID_REMOTE_EFFORTS;
17460
- if (message.mode.effort && !supportedEfforts.includes(message.mode.effort)) {
17461
- throw new Error(`Reasoning effort "${message.mode.effort}" is not supported by ${message.mode.model ?? "the default model"}. Choose a supported level.`);
17583
+ const effortRefusal = unsupportedEffortReason(discoveredModels, message.mode.model, message.mode.effort);
17584
+ if (effortRefusal) {
17585
+ throw new Error(effortRefusal);
17462
17586
  }
17463
17587
  if (!client.hasActiveThread()) {
17464
17588
  const startedThread = await client.startThread({
@@ -17502,8 +17626,14 @@ async function runCodex(opts) {
17502
17626
  }
17503
17627
  } catch (error) {
17504
17628
  logger.warn("Error in codex session", safeCodexErrorMetadata(error));
17505
- messageBuffer.addMessage("Process exited unexpectedly", "status");
17506
- session.sendSessionEvent({ type: "message", message: "Process exited unexpectedly" });
17629
+ const reason = describeThrownTurnError(error);
17630
+ if (reason) {
17631
+ messageBuffer.addMessage(`Task failed: ${reason}`, "status");
17632
+ session.sendSessionEvent({ type: "message", message: `Codex error: ${reason}` });
17633
+ } else {
17634
+ messageBuffer.addMessage("Process exited unexpectedly", "status");
17635
+ session.sendSessionEvent({ type: "message", message: "Process exited unexpectedly" });
17636
+ }
17507
17637
  } finally {
17508
17638
  permissionHandler.reset();
17509
17639
  reasoningProcessor.abort();
@@ -17735,7 +17865,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17735
17865
  return;
17736
17866
  } else if (subcommand === "install-terminal-hooks") {
17737
17867
  try {
17738
- const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await import('./installTerminalHooks-D9pIHXxU.mjs');
17868
+ const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await import('./installTerminalHooks-BF_tmw9V.mjs');
17739
17869
  const command = parseTerminalHooksArgs(args.slice(1));
17740
17870
  if (command.action === "help") {
17741
17871
  console.log(TERMINAL_HOOKS_HELP);
@@ -17752,7 +17882,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17752
17882
  }
17753
17883
  } else if (subcommand === "agent-home") {
17754
17884
  try {
17755
- const { parseAgentHomeArgs, runAgentHomeCommand } = await import('./agentHome-CQrd95jc.mjs');
17885
+ const { parseAgentHomeArgs, runAgentHomeCommand } = await import('./agentHome-Dm-Wjs38.mjs');
17756
17886
  await runAgentHomeCommand(parseAgentHomeArgs(args.slice(1)));
17757
17887
  process.exit(0);
17758
17888
  } catch (error) {
@@ -17761,7 +17891,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17761
17891
  }
17762
17892
  } else if (subcommand === "spawn") {
17763
17893
  try {
17764
- const { handleSpawnCommand } = await import('./spawn-C4uID9JX.mjs');
17894
+ const { handleSpawnCommand } = await import('./spawn-DQuOmUP7.mjs');
17765
17895
  await handleSpawnCommand(args.slice(1));
17766
17896
  } catch (error) {
17767
17897
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -17773,7 +17903,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17773
17903
  return;
17774
17904
  } else if (subcommand === "sessions") {
17775
17905
  try {
17776
- const { handleSessionsCommand } = await import('./sessions-C9VwpMKY.mjs');
17906
+ const { handleSessionsCommand } = await import('./sessions-DoULfKui.mjs');
17777
17907
  await handleSessionsCommand(args.slice(1));
17778
17908
  } catch (error) {
17779
17909
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -17785,7 +17915,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17785
17915
  return;
17786
17916
  } else if (subcommand === "send") {
17787
17917
  try {
17788
- const { handleSendCommand } = await import('./send-D-9_jOIS.mjs');
17918
+ const { handleSendCommand } = await import('./send-Dv0km8UI.mjs');
17789
17919
  await handleSendCommand(args.slice(1));
17790
17920
  } catch (error) {
17791
17921
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -17891,9 +18021,9 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17891
18021
  if (geminiSubcommand === "project" && args[2] === "set" && args[3]) {
17892
18022
  const projectId = args[3];
17893
18023
  try {
17894
- const { saveGoogleCloudProjectToConfig } = await import('./config-DkCS4663.mjs');
17895
- const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await import('./limits-BfYfA7tt.mjs').then(function (n) { return n.Y; });
17896
- const { ApiClient: ApiClient2 } = await import('./types-CXF6tULJ.mjs').then(function (n) { return n.am; });
18024
+ const { saveGoogleCloudProjectToConfig } = await import('./config-Dhu6LU0h.mjs');
18025
+ const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await import('./limits-FThmm7WR.mjs').then(function (n) { return n.Y; });
18026
+ const { ApiClient: ApiClient2 } = await import('./types-BD542hb1.mjs').then(function (n) { return n.am; });
17897
18027
  let userEmail = void 0;
17898
18028
  try {
17899
18029
  const credentials = await readCredentialsForConfiguredRelay2();
@@ -17924,7 +18054,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17924
18054
  }
17925
18055
  if (geminiSubcommand === "project" && args[2] === "get") {
17926
18056
  try {
17927
- const { readGeminiLocalConfig } = await import('./config-DkCS4663.mjs');
18057
+ const { readGeminiLocalConfig } = await import('./config-Dhu6LU0h.mjs');
17928
18058
  const config = readGeminiLocalConfig();
17929
18059
  if (config.googleCloudProject) {
17930
18060
  console.log(`Current Google Cloud Project: ${config.googleCloudProject}`);
@@ -17964,7 +18094,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17964
18094
  process.exit(0);
17965
18095
  }
17966
18096
  try {
17967
- const { runGemini } = await import('./runGemini-C13-aRss.mjs');
18097
+ const { runGemini } = await import('./runGemini-D5IV1MoF.mjs');
17968
18098
  let startedBy = void 0;
17969
18099
  for (let i = 1; i < args.length; i++) {
17970
18100
  if (args[i] === "--started-by") {
@@ -17987,7 +18117,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
17987
18117
  } else if (subcommand === "pi") {
17988
18118
  if (args[1] === "--terminal") {
17989
18119
  try {
17990
- const { runPiTerminal } = await import('./piTerminal-CnS3TF7M.mjs');
18120
+ const { runPiTerminal } = await import('./piTerminal-BlE4vbvZ.mjs');
17991
18121
  process.exitCode = await runPiTerminal(args.slice(2));
17992
18122
  } catch (error) {
17993
18123
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -18004,7 +18134,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
18004
18134
  }
18005
18135
  };
18006
18136
  try {
18007
- const { runAcp, resolveAcpAgentConfig } = await import('./index-C4JoaSCO.mjs');
18137
+ const { runAcp, resolveAcpAgentConfig } = await import('./index-CzpooENj.mjs');
18008
18138
  const parsed = parsePiRunnerArgs(args.slice(1));
18009
18139
  const resolved = resolveAcpAgentConfig(["pi", ...parsed.passthrough]);
18010
18140
  const { credentials } = await authAndSetupMachineIfNeeded();
@@ -18032,7 +18162,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
18032
18162
  return;
18033
18163
  } else if (subcommand === "acp") {
18034
18164
  try {
18035
- const { runAcp, resolveAcpAgentConfig } = await import('./index-C4JoaSCO.mjs');
18165
+ const { runAcp, resolveAcpAgentConfig } = await import('./index-CzpooENj.mjs');
18036
18166
  let startedBy = void 0;
18037
18167
  let verbose = false;
18038
18168
  const acpArgs = [];
@@ -18072,7 +18202,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
18072
18202
  return;
18073
18203
  } else if (subcommand === "openclaw") {
18074
18204
  try {
18075
- const { runOpenClaw } = await import('./runOpenClaw-D4ABejEy.mjs');
18205
+ const { runOpenClaw } = await import('./runOpenClaw-CWPXrKMJ.mjs');
18076
18206
  let startedBy = void 0;
18077
18207
  let verbose = false;
18078
18208
  let gatewayUrl;
@@ -18123,7 +18253,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
18123
18253
  return;
18124
18254
  } else if (subcommand === "todo") {
18125
18255
  try {
18126
- const { handleTodoCommand } = await import('./todo-5QemH15n.mjs');
18256
+ const { handleTodoCommand } = await import('./todo-C9IAUf0K.mjs');
18127
18257
  await handleTodoCommand(args.slice(1));
18128
18258
  } catch (error) {
18129
18259
  console.error(JSON.stringify({ error: error instanceof Error ? error.message : "Todo command failed" }));
@@ -18132,7 +18262,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
18132
18262
  return;
18133
18263
  } else if (subcommand === "teams") {
18134
18264
  try {
18135
- const { handleTeamsCommand } = await import('./teams-CCv46ebr.mjs');
18265
+ const { handleTeamsCommand } = await import('./teams-4mhNh5cj.mjs');
18136
18266
  await handleTeamsCommand(args.slice(1));
18137
18267
  } catch (error) {
18138
18268
  console.error(error instanceof Error ? error.message : "Teams command failed");
@@ -18141,7 +18271,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
18141
18271
  return;
18142
18272
  } else if (subcommand === "mcp" && (args.length === 1 || args.length === 2 && args[1] === "--terminal-tools")) {
18143
18273
  try {
18144
- const { handleMcpCommand } = await import('./mcp-DTXsdDwc.mjs');
18274
+ const { handleMcpCommand } = await import('./mcp-DzydgXpf.mjs');
18145
18275
  await handleMcpCommand(args[1] === "--terminal-tools");
18146
18276
  } catch (error) {
18147
18277
  process.stderr.write(`[very-happy mcp] Fatal: ${error instanceof Error ? error.message : String(error)}
@@ -1,10 +1,10 @@
1
- import { D as DefaultTransport, A as AcpBackend } from './AcpBackend-CrcdMnL6.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-CrcdMnL6.mjs';
3
- import { r as readSettings, g as encodeBase64, l as logger, c as configuration } from './limits-BfYfA7tt.mjs';
4
- import { A as AcpSessionManager } from './AcpSessionManager-DIafxIVU.mjs';
5
- import { m as connectionState, A as ApiClient, n as notifyDaemonSessionStarted, o as BUILTIN_TODO_DISCOVERY } from './types-CXF6tULJ.mjs';
6
- import { k as initialMachineMetadata, m as createSessionMetadata, n as setupOfflineReconnection, o as StreamRelay, p as MessageQueue2, u as hashObject, v as startHappyServer, x as registerAgentAttachmentDownloads, T as TitleGenerator, y as registerKillSessionHandler, C as CLAUDE_ATTACHMENT_KINDS, z as stageClaudeAttachments, B as appendStagedAttachmentsToPrompt, E as BasePermissionHandler, F as writeSessionModeFile, H as normalizeAcpPermissionMode, I as removeSessionModeFile } from './index-Cobfu9V_.mjs';
7
- import { p as preparePiTeamsRuntime } from './piRuntime-BWEgqBHm.mjs';
1
+ import { D as DefaultTransport, A as AcpBackend } from './AcpBackend-C-dhGJgd.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-C-dhGJgd.mjs';
3
+ import { r as readSettings, g as encodeBase64, l as logger, c as configuration } from './limits-FThmm7WR.mjs';
4
+ import { A as AcpSessionManager } from './AcpSessionManager-DKOtSqJc.mjs';
5
+ import { m as connectionState, A as ApiClient, n as notifyDaemonSessionStarted, o as BUILTIN_TODO_DISCOVERY } from './types-BD542hb1.mjs';
6
+ import { k as initialMachineMetadata, m as createSessionMetadata, n as setupOfflineReconnection, o as StreamRelay, p as MessageQueue2, u as hashObject, v as startHappyServer, x as registerAgentAttachmentDownloads, T as TitleGenerator, y as registerKillSessionHandler, C as CLAUDE_ATTACHMENT_KINDS, z as stageClaudeAttachments, B as appendStagedAttachmentsToPrompt, E as BasePermissionHandler, F as writeSessionModeFile, H as normalizeAcpPermissionMode, I as removeSessionModeFile } from './index-CpNYvMTJ.mjs';
7
+ import { p as preparePiTeamsRuntime } from './piRuntime-ACOhil6t.mjs';
8
8
  import { randomUUID } from 'node:crypto';
9
9
  import { join } from 'node:path';
10
10
  import { p as projectPath } from './projectPath-CSpqWdxp.mjs';
@@ -33,7 +33,7 @@ import 'fs';
33
33
  import 'node:readline';
34
34
  import '@anthropic-ai/sandbox-runtime';
35
35
  import 'expo-server-sdk';
36
- import './agentGuidance-CR7rOQUF.mjs';
36
+ import './agentGuidance-DrfhtVP1.mjs';
37
37
  import 'ink';
38
38
  import 'react';
39
39
  import '@anthropic-ai/claude-agent-sdk';
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var AcpBackend = require('./AcpBackend-BrM-mcjR.cjs');
4
- var persistence = require('./limits-D364Cpe3.cjs');
5
- var AcpSessionManager = require('./AcpSessionManager-CKhv-rBo.cjs');
6
- var index = require('./types-IU5nGuaQ.cjs');
7
- var index$1 = require('./index-C1OeYxxj.cjs');
8
- var piRuntime = require('./piRuntime-CbSaG74b.cjs');
3
+ var AcpBackend = require('./AcpBackend-CXawaWWx.cjs');
4
+ var persistence = require('./limits-Dyma1REp.cjs');
5
+ var AcpSessionManager = require('./AcpSessionManager-TrwEZR7y.cjs');
6
+ var index = require('./types-D2Gkpe0N.cjs');
7
+ var index$1 = require('./index-K6mUS0jF.cjs');
8
+ var piRuntime = require('./piRuntime-CSAiJk0X.cjs');
9
9
  var node_crypto = require('node:crypto');
10
10
  var path = require('node:path');
11
11
  var projectPath = require('./projectPath-ChLhdOyt.cjs');
@@ -34,7 +34,7 @@ require('fs');
34
34
  require('node:readline');
35
35
  require('@anthropic-ai/sandbox-runtime');
36
36
  require('expo-server-sdk');
37
- require('./agentGuidance-gzl2qRkG.cjs');
37
+ require('./agentGuidance-Dla-BXO8.cjs');
38
38
  require('ink');
39
39
  require('react');
40
40
  require('@anthropic-ai/claude-agent-sdk');
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-C1OeYxxj.cjs');
3
+ var index = require('./index-K6mUS0jF.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-IU5nGuaQ.cjs');
8
+ require('./types-D2Gkpe0N.cjs');
9
9
  require('axios');
10
- require('./limits-D364Cpe3.cjs');
10
+ require('./limits-Dyma1REp.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-gzl2qRkG.cjs');
35
+ require('./agentGuidance-Dla-BXO8.cjs');
36
36
  require('ink');
37
37
  require('react');
38
38
  require('ps-list');