very-happy-cli 0.2.153 → 0.2.154

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 (53) hide show
  1. package/dist/{AcpBackend-DSt8nTYm.cjs → AcpBackend-B14xNj5L.cjs} +2 -2
  2. package/dist/{AcpBackend-YDGv4E-g.mjs → AcpBackend-Ckyadhf4.mjs} +2 -2
  3. package/dist/{AcpSessionManager-uov6I9C8.cjs → AcpSessionManager-CCHmPdrR.cjs} +1 -1
  4. package/dist/{AcpSessionManager-Cxf5HQX1.mjs → AcpSessionManager-H8t4P-IW.mjs} +1 -1
  5. package/dist/{agentGuidance-BM4kMNyr.cjs → agentGuidance-DUBXppv-.cjs} +2 -1
  6. package/dist/{agentGuidance-C8unGWp7.mjs → agentGuidance-TLYQxsm2.mjs} +2 -1
  7. package/dist/{agentHome-D68Xh2ae.mjs → agentHome-B20RWdgE.mjs} +2 -2
  8. package/dist/{agentHome-BJ7bde35.cjs → agentHome-BUsLTZnz.cjs} +2 -2
  9. package/dist/{auto-CcXxfqkC.mjs → auto-BQnncDcs.mjs} +6 -6
  10. package/dist/{auto-C-90ojIH.cjs → auto-IeldARBS.cjs} +6 -6
  11. package/dist/codex/happyMcpStdioBridge.cjs +2 -2
  12. package/dist/codex/happyMcpStdioBridge.mjs +2 -2
  13. package/dist/{config-CHJ189UJ.mjs → config-B-ocQh5V.mjs} +4 -4
  14. package/dist/{config-D23kF0_u.cjs → config-DM_xI9M6.cjs} +4 -4
  15. package/dist/{index-BacwoXzs.mjs → index-BELV05ko.mjs} +248 -29
  16. package/dist/{index-DEOVn46R.cjs → index-BUxBxSxJ.cjs} +7 -7
  17. package/dist/{index-BXA9fxbK.mjs → index-CIx3248o.mjs} +4 -4
  18. package/dist/{index-BgYZGODP.mjs → index-ZKuBjvHi.mjs} +8 -8
  19. package/dist/{index-DHrwHxHf.cjs → index-eCjkm8Y2.cjs} +252 -32
  20. package/dist/{index-D49WvbDT.cjs → index-okLyUzeD.cjs} +4 -4
  21. package/dist/index.cjs +4 -4
  22. package/dist/index.mjs +4 -4
  23. package/dist/{install-BiOXBnnS.cjs → install-BZOdxfPd.cjs} +1 -1
  24. package/dist/{install-Ca7_Z3bV.mjs → install-CoLN3whR.mjs} +1 -1
  25. package/dist/{installTerminalHooks-BF0kL0ae.cjs → installTerminalHooks-CA4OcAS7.cjs} +4 -4
  26. package/dist/{installTerminalHooks-Bpl32K75.mjs → installTerminalHooks-Dde_8t36.mjs} +4 -4
  27. package/dist/lib.cjs +2 -2
  28. package/dist/lib.mjs +2 -2
  29. package/dist/{limits-DY_sFA3J.cjs → limits-CmzISka2.cjs} +7 -7
  30. package/dist/{limits-BtAuKRl2.mjs → limits-Dt7_unH4.mjs} +7 -7
  31. package/dist/{mcp-JpqI2POW.cjs → mcp-7iDHlyCI.cjs} +4 -4
  32. package/dist/{mcp-DQkmk4VV.mjs → mcp-9Ui4nQZL.mjs} +4 -4
  33. package/dist/{piRuntime-DRbbeQ72.cjs → piRuntime-BesGGPME.cjs} +2 -2
  34. package/dist/{piRuntime-DBpe12NN.mjs → piRuntime-C4E4pgye.mjs} +2 -2
  35. package/dist/{piTerminal-BoHvPEZ_.mjs → piTerminal-CCEGCQOY.mjs} +6 -6
  36. package/dist/{piTerminal-qdJ9KZVL.cjs → piTerminal-fUogwxYr.cjs} +6 -6
  37. package/dist/{runGemini-YqH7a-7O.mjs → runGemini-BW-pEklU.mjs} +6 -6
  38. package/dist/{runGemini-CtOEFvhf.cjs → runGemini-CNPGSsSK.cjs} +6 -6
  39. package/dist/{runOpenClaw-DoqZXBvL.cjs → runOpenClaw-Bsodkg_s.cjs} +5 -5
  40. package/dist/{runOpenClaw-DSSyFQBb.mjs → runOpenClaw-NRB6-_jU.mjs} +5 -5
  41. package/dist/{send-9075kHZP.cjs → send-Bd00QcHC.cjs} +55 -17
  42. package/dist/{send-Cs-RwqNf.mjs → send-DYeSFg8s.mjs} +55 -18
  43. package/dist/{sessions-iBnYzVUK.mjs → sessions-DlPOYKLU.mjs} +4 -4
  44. package/dist/{sessions-qULzUzlI.cjs → sessions-RIFUoy_g.cjs} +4 -4
  45. package/dist/{spawn-C6fRkedx.mjs → spawn-D1bhyHbH.mjs} +4 -4
  46. package/dist/{spawn-od9V23cc.cjs → spawn-DxrfHTF4.cjs} +4 -4
  47. package/dist/{teams-CrCzU-AV.cjs → teams-Cfy0VMCo.cjs} +5 -5
  48. package/dist/{teams-CkrWQ4uM.mjs → teams-pfKHpkgL.mjs} +5 -5
  49. package/dist/{todo-aCZmSt27.mjs → todo-B2CjDg_V.mjs} +2 -2
  50. package/dist/{todo-BCT_ZPuV.cjs → todo-B4cBFzHB.cjs} +2 -2
  51. package/dist/{types-CUCU7Vw8.cjs → types-Bd_TGr0F.cjs} +22 -3
  52. package/dist/{types-BvqOVUOW.mjs → types-D5RWyBE5.mjs} +22 -4
  53. package/package.json +7 -7
@@ -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 { v as notifyDaemonSessionEvent, g as getProjectPath, w as initializeSandbox, x as wrapCommand, u as contentLogMetadata, I as InvalidateSync, R as RawJSONLinesSchema, c as delay, y as AsyncLock, M as MAX_CHAT_ATTACHMENT_SOURCE_BYTES, z as notifyDaemonClaudeAuthFailed, B as commandOnPath, j as checkIfDaemonRunningAndCleanupStaleState, D as deriveLocalCliUpdateSummary, E as isClaudeSessionId, G as getLocalHappyAgentCredentialPath, H as readLocalHappyAgentCredentials, J as parseExactVersion, K as compareExactVersions, L as extractCompleteLines, N as decideBackfill, O as parseTerminalHookPayload, P as tmuxArgs, Q as scrubTmuxClientEnv, S as decideMirrorBinding, T as MIRROR_BACKFILL_LINES_DEFAULT, U as mirrorLineKey, V as mirrorLocalId, W as listDaemonSessions, k as stopDaemonSession, X as detectCLIAvailability, Y as detectResumeSupport, Z as refreshAgentHomes, d as describeAgentHome, _ as isDaemonRunningCurrentlyInstalledHappyVersion, $ as stopDaemon, a0 as TurnActivityTracker, a1 as summarizeSpawnSessionForLog, a2 as locateClaudeConversation, a3 as agentHomeSpawnEnv, a4 as shellescape, A as ApiClient, a5 as fetchCliUpdateState, a6 as resolveCliUpdateCheckInterval, a7 as DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS, a8 as cleanupDaemonState, i as isValidSessionId, s as spawnDaemonSession, a9 as listVhTerminals, aa as isValidTerminalId, ab as readVhTerminal, ac as sendToVhTerminal, ad as TITLE_PROMPT_PREFIX, ae as BOARD_ANALYZER_PROMPT_PREFIX, o as connectionState, af as startOfflineReconnection, q as notifyDaemonSessionStarted, C as CodexAppServerClient } from './types-BvqOVUOW.mjs';
5
- import { l as logger, k as BUILTIN_TODO_DISCOVERY, U as STREAM_DELTA_MAX_CHARS, V as ensurePrivateDirectory, W as hardenPrivateFile, c as configuration, p as packageJson, r as readSettings, X as readCredentials, L as credentialRelayProblem, F as readDaemonState, Y as AGENT_VERSION_SOURCES, j as encodeBase64, Z as readSettingsOutcome, u as updateSettings, _ as encodeBase64Url, E as decodeBase64, $ as writeCredentialsLegacy, a0 as writeCredentialsDataKey, f as readCredentialsForConfiguredRelay, z as encrypt, d as readPersistedSessions, w as writePrivateFileSync, a1 as decryptWithDataKey, a2 as decryptLegacy, a3 as persistSession, D as decrypt, m as ensurePrivateDirectorySync, a4 as getAgentCodeDefaults, a5 as normalizeAgentKey, a6 as isClaudeOpus55Model, a7 as supportsClaudeOpus55, a8 as AUTOMATION_SUMMARY_MAX_CHARS, a9 as AUTOMATION_CLAIM_MAX_RUNS, aa as AUTOMATION_DEFAULT_LEASE_MS, i as isAutomationRunTerminal, ab as acquireDaemonLock, ac as deletePersistedSessions, ad as writeDaemonState, ae as writeSettings, af as releaseDaemonLock, ag as ContextUsageSchema, C as CLIPBOARD_TOOL_NAME, a as CLIPBOARD_TOOL_TITLE, b as CLIPBOARD_TOOL_DESCRIPTION, h as CLIPBOARD_MAX_BYTES, ah as clearCredentials, ai as clearMachineId, aj as SandboxConfigSchema, e as createEnvelope, ak as getLatestDaemonLog } from './limits-BtAuKRl2.mjs';
4
+ import { v as notifyDaemonSessionEvent, g as getProjectPath, w as initializeSandbox, x as wrapCommand, u as contentLogMetadata, I as InvalidateSync, R as RawJSONLinesSchema, c as delay, y as AsyncLock, M as MAX_CHAT_ATTACHMENT_SOURCE_BYTES, z as notifyDaemonClaudeAuthFailed, B as commandOnPath, j as checkIfDaemonRunningAndCleanupStaleState, D as deriveLocalCliUpdateSummary, E as isClaudeSessionId, G as getLocalHappyAgentCredentialPath, H as readLocalHappyAgentCredentials, J as parseExactVersion, K as compareExactVersions, L as extractCompleteLines, N as decideBackfill, O as parseTerminalHookPayload, P as tmuxArgs, Q as scrubTmuxClientEnv, S as decideMirrorBinding, T as MIRROR_BACKFILL_LINES_DEFAULT, U as mirrorLineKey, V as mirrorLocalId, W as listDaemonSessions, k as stopDaemonSession, X as detectCLIAvailability, Y as detectResumeSupport, Z as refreshAgentHomes, d as describeAgentHome, _ as isDaemonRunningCurrentlyInstalledHappyVersion, $ as stopDaemon, a0 as TurnActivityTracker, a1 as summarizeSpawnSessionForLog, a2 as locateClaudeConversation, a3 as agentHomeSpawnEnv, a4 as shellescape, A as ApiClient, a5 as fetchCliUpdateState, a6 as resolveCliUpdateCheckInterval, a7 as DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS, a8 as cleanupDaemonState, a9 as resumeDaemonSession, i as isValidSessionId, s as spawnDaemonSession, aa as listVhTerminals, ab as isValidTerminalId, ac as readVhTerminal, ad as sendToVhTerminal, ae as TITLE_PROMPT_PREFIX, af as BOARD_ANALYZER_PROMPT_PREFIX, o as connectionState, ag as startOfflineReconnection, q as notifyDaemonSessionStarted, C as CodexAppServerClient } from './types-D5RWyBE5.mjs';
5
+ import { l as logger, k as BUILTIN_TODO_DISCOVERY, U as STREAM_DELTA_MAX_CHARS, V as ensurePrivateDirectory, W as hardenPrivateFile, c as configuration, p as packageJson, r as readSettings, X as readCredentials, L as credentialRelayProblem, F as readDaemonState, Y as AGENT_VERSION_SOURCES, j as encodeBase64, Z as readSettingsOutcome, u as updateSettings, _ as encodeBase64Url, E as decodeBase64, $ as writeCredentialsLegacy, a0 as writeCredentialsDataKey, f as readCredentialsForConfiguredRelay, z as encrypt, d as readPersistedSessions, w as writePrivateFileSync, a1 as decryptWithDataKey, a2 as decryptLegacy, a3 as persistSession, D as decrypt, m as ensurePrivateDirectorySync, a4 as getAgentCodeDefaults, a5 as normalizeAgentKey, a6 as isClaudeOpus55Model, a7 as supportsClaudeOpus55, a8 as AUTOMATION_SUMMARY_MAX_CHARS, a9 as AUTOMATION_CLAIM_MAX_RUNS, aa as AUTOMATION_DEFAULT_LEASE_MS, i as isAutomationRunTerminal, ab as acquireDaemonLock, ac as deletePersistedSessions, ad as writeDaemonState, ae as writeSettings, af as releaseDaemonLock, ag as ContextUsageSchema, C as CLIPBOARD_TOOL_NAME, a as CLIPBOARD_TOOL_TITLE, b as CLIPBOARD_TOOL_DESCRIPTION, h as CLIPBOARD_MAX_BYTES, ah as clearCredentials, ai as clearMachineId, aj as SandboxConfigSchema, e as createEnvelope, ak as getLatestDaemonLog } from './limits-Dt7_unH4.mjs';
6
6
  import spawn$1, { spawn } from 'cross-spawn';
7
7
  import path, { join, resolve, basename, delimiter, isAbsolute, dirname, sep, normalize } from 'node:path';
8
8
  import { createInterface } from 'node:readline';
9
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 './terminalTitleSuggest-DKgX3osW.mjs';
11
- import { j as trimIdent, k as AGENT_GUIDANCE, l as createAutomationsClient, i as isAutomationsUnavailable, m as AutomationsRequestError, t as teamScopePath, T as TeamConnectionPreflightError, h as createTeamsClient, P as PREVIEW_TOOL_NAME, R as REPORT_PROGRESS_TOOL_NAME, n as TEAM_TOOL_NAMES, o as AUTOMATION_TOOL_NAMES, r as registerTeamsTools, c as registerAutomationTools, a as PREVIEW_TOOL_TITLE, b as PREVIEW_TOOL_DESCRIPTION, p as REPORT_PROGRESS_TOOL_TITLE, q as REPORT_PROGRESS_TOOL_DESCRIPTION } from './agentGuidance-C8unGWp7.mjs';
11
+ import { j as trimIdent, k as AGENT_GUIDANCE, l as createAutomationsClient, i as isAutomationsUnavailable, m as AutomationsRequestError, t as teamScopePath, T as TeamConnectionPreflightError, h as createTeamsClient, P as PREVIEW_TOOL_NAME, R as REPORT_PROGRESS_TOOL_NAME, n as TEAM_TOOL_NAMES, o as AUTOMATION_TOOL_NAMES, r as registerTeamsTools, c as registerAutomationTools, a as PREVIEW_TOOL_TITLE, b as PREVIEW_TOOL_DESCRIPTION, p as REPORT_PROGRESS_TOOL_TITLE, q as REPORT_PROGRESS_TOOL_DESCRIPTION } from './agentGuidance-TLYQxsm2.mjs';
12
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';
@@ -5380,8 +5380,8 @@ ${typeLabels[type] || type}:`));
5380
5380
  }
5381
5381
  console.log(chalk.gray(" An external claude command is only needed for native terminal/mirror use."));
5382
5382
  try {
5383
- const { resolveAgentHomesForCli } = await import('./agentHome-D68Xh2ae.mjs');
5384
- const { describeAgentHome } = await import('./types-BvqOVUOW.mjs').then(function (n) { return n.ag; });
5383
+ const { resolveAgentHomesForCli } = await import('./agentHome-B20RWdgE.mjs');
5384
+ const { describeAgentHome } = await import('./types-D5RWyBE5.mjs').then(function (n) { return n.ah; });
5385
5385
  const homes = await resolveAgentHomesForCli();
5386
5386
  console.log(chalk.green(`\u2713 Claude config dir: ${describeAgentHome(homes.claudeConfigDir)}`));
5387
5387
  console.log(chalk.green(`\u2713 Codex home: ${describeAgentHome(homes.codexHome)}`));
@@ -6262,6 +6262,7 @@ function startDaemonControlServer({
6262
6262
  getChildren,
6263
6263
  stopSession,
6264
6264
  spawnSession,
6265
+ resumeSession,
6265
6266
  requestShutdown,
6266
6267
  onHappySessionWebhook,
6267
6268
  onSessionStateEvent,
@@ -6474,6 +6475,48 @@ function startDaemonControlServer({
6474
6475
  };
6475
6476
  }
6476
6477
  });
6478
+ typed.post("/resume-session", {
6479
+ schema: {
6480
+ body: z.object({
6481
+ sessionId: z.string().min(1).max(200),
6482
+ model: z.string().optional(),
6483
+ permissionMode: z.string().optional()
6484
+ }),
6485
+ response: {
6486
+ 200: z.object({
6487
+ success: z.boolean(),
6488
+ sessionId: z.string().optional(),
6489
+ error: z.string().optional()
6490
+ }),
6491
+ 500: z.object({
6492
+ success: z.boolean(),
6493
+ error: z.string().optional()
6494
+ }),
6495
+ 503: z.object({
6496
+ success: z.boolean(),
6497
+ error: z.string().optional()
6498
+ })
6499
+ }
6500
+ }
6501
+ }, async (request, reply) => {
6502
+ const { sessionId, model, permissionMode } = request.body;
6503
+ if (!resumeSession) {
6504
+ reply.code(503);
6505
+ return { success: false, error: "daemon is still starting up" };
6506
+ }
6507
+ logger.debug(`[CONTROL SERVER] Resume session request: ${sessionId} (model=${model ?? "unset"}, permissionMode=${permissionMode ?? "unset"})`);
6508
+ const result = await resumeSession(sessionId, { model, permissionMode });
6509
+ switch (result.type) {
6510
+ case "success":
6511
+ return { success: true, sessionId: result.sessionId };
6512
+ case "requestToApproveDirectoryCreation":
6513
+ reply.code(500);
6514
+ return { success: false, error: `Cannot resume: working directory ${result.directory} needs to be created first` };
6515
+ case "error":
6516
+ reply.code(500);
6517
+ return { success: false, error: result.errorMessage };
6518
+ }
6519
+ });
6477
6520
  typed.post("/terminal-hook", {
6478
6521
  schema: {
6479
6522
  body: z.any(),
@@ -9996,6 +10039,35 @@ async function readSessionMetadata(sessionId, persisted) {
9996
10039
  if (typeof ciphertext !== "string" || ciphertext.length === 0) return null;
9997
10040
  return decrypt(decodeBase64(persisted.encryptionKey), persisted.encryptionVariant, decodeBase64(ciphertext));
9998
10041
  }
10042
+ async function readSessionState(sessionId, persisted) {
10043
+ const token = await bearerToken();
10044
+ const response = await axios.get(`${configuration.serverUrl}/v1/sessions/${encodeURIComponent(sessionId)}`, {
10045
+ headers: {
10046
+ "Authorization": `Bearer ${token}`,
10047
+ "X-Happy-Client": `${SESSION_OPS_CLIENT}/${configuration.currentCliVersion}`
10048
+ },
10049
+ timeout: 15e3,
10050
+ validateStatus: (status) => status >= 200 && status < 300 || status === 404
10051
+ });
10052
+ if (response.status === 404) return { found: false, active: false };
10053
+ const row = response.data?.session;
10054
+ if (!row || typeof row.id !== "string") throw new Error(`Server returned no session row for ${sessionId}`);
10055
+ const state = {
10056
+ found: true,
10057
+ active: row.active === true,
10058
+ ...typeof row.activeAt === "number" ? { activeAt: row.activeAt } : {},
10059
+ archivedAt: typeof row.archivedAt === "number" ? row.archivedAt : null,
10060
+ ...typeof row.updatedAt === "number" ? { updatedAt: row.updatedAt } : {}
10061
+ };
10062
+ if (persisted && typeof row.metadata === "string" && row.metadata.length > 0) {
10063
+ try {
10064
+ const metadata = decrypt(decodeBase64(persisted.encryptionKey), persisted.encryptionVariant, decodeBase64(row.metadata));
10065
+ if (metadata?.machineId) state.machineId = metadata.machineId;
10066
+ } catch {
10067
+ }
10068
+ }
10069
+ return state;
10070
+ }
9999
10071
  class TurnWaitTimeoutError extends Error {
10000
10072
  constructor(sessionId, timeoutMs, turn) {
10001
10073
  super(`Session ${sessionId}: the latest turn did not end within ${Math.round(timeoutMs / 1e3)}s`);
@@ -10033,6 +10105,20 @@ async function archiveSession(sessionId) {
10033
10105
  }
10034
10106
  );
10035
10107
  }
10108
+ async function unarchiveSession(sessionId) {
10109
+ const token = await bearerToken();
10110
+ await axios.post(
10111
+ `${configuration.serverUrl}/v1/sessions/${encodeURIComponent(sessionId)}/unarchive`,
10112
+ {},
10113
+ {
10114
+ headers: {
10115
+ "Authorization": `Bearer ${token}`,
10116
+ "X-Happy-Client": `${SESSION_OPS_CLIENT}/${configuration.currentCliVersion}`
10117
+ },
10118
+ timeout: 1e4
10119
+ }
10120
+ );
10121
+ }
10036
10122
 
10037
10123
  function receiptPath(home, operationId) {
10038
10124
  if (!/^[a-zA-Z0-9_-]{1,128}$/.test(operationId)) throw new Error("Invalid team operation id");
@@ -12059,6 +12145,8 @@ async function startDaemon() {
12059
12145
  getChildren: getCurrentChildren,
12060
12146
  stopSession,
12061
12147
  spawnSession,
12148
+ resumeSession,
12149
+ // B-501: `very-happy send --resume`
12062
12150
  requestShutdown: () => requestShutdown("happy-cli"),
12063
12151
  onHappySessionWebhook,
12064
12152
  onSessionStateEvent,
@@ -12463,6 +12551,127 @@ This session is now connected as the team lead. Call team_inspect to read the au
12463
12551
  };
12464
12552
  }
12465
12553
 
12554
+ const ACTIVE_FRESH_WINDOW_MS = 15 * 60 * 1e3;
12555
+ const DEFAULT_RESUME_WAIT_MS = 3e4;
12556
+ const DEFAULT_RESUME_POLL_MS = 1e3;
12557
+ function classifySessionState(input) {
12558
+ const { liveHere, server, now } = input;
12559
+ if (!server.found) return "not_found";
12560
+ if (typeof server.archivedAt === "number") return "archived";
12561
+ if (liveHere) return "live";
12562
+ if (server.active && typeof server.activeAt === "number" && now - server.activeAt <= ACTIVE_FRESH_WINDOW_MS) return "live";
12563
+ return "offline";
12564
+ }
12565
+ function explainNotLive(sessionId, status, resumeHint) {
12566
+ switch (status) {
12567
+ case "archived":
12568
+ return `Session ${sessionId} is archived \u2014 no live wrapper will receive this message. ${resumeHint}`;
12569
+ case "offline":
12570
+ return `Session ${sessionId} is offline (its wrapper exited or timed out) \u2014 no live wrapper will receive this message. ${resumeHint}`;
12571
+ case "not_found":
12572
+ return `Session ${sessionId} was not found on this account \u2014 it cannot be messaged or resumed. Spawn a new session instead.`;
12573
+ }
12574
+ }
12575
+ const CLI_RESUME_HINT = "Use --resume to bring it back on this machine, or spawn a new session.";
12576
+ const defaultDeps = {
12577
+ listLive: () => listDaemonSessions(),
12578
+ readState: (sessionId, persisted) => readSessionState(sessionId, persisted),
12579
+ send: (sessionId, persisted, text, client, options) => sendUserMessage(sessionId, persisted, text, client, options),
12580
+ unarchive: unarchiveSession,
12581
+ archive: archiveSession,
12582
+ resume: resumeDaemonSession,
12583
+ sleep: (ms) => delay(ms).then(() => void 0),
12584
+ now: () => Date.now()
12585
+ };
12586
+ async function deliverToSession(sessionId, persisted, text, client, options = {}, deps = {}) {
12587
+ const d = { ...defaultDeps, ...deps };
12588
+ const resumeHint = options.resumeHint ?? CLI_RESUME_HINT;
12589
+ const classify = async () => {
12590
+ const [live, server] = await Promise.all([d.listLive(), d.readState(sessionId, persisted)]);
12591
+ return classifySessionState({ liveHere: sessionLiveness(live, sessionId).live, server, now: d.now() });
12592
+ };
12593
+ let status = await classify();
12594
+ let resumed = false;
12595
+ let resumeOutcome;
12596
+ if (status !== "live") {
12597
+ if (!options.resume || status === "not_found") {
12598
+ return { sessionId, status, delivered: false, resumed: false, stored: false, error: explainNotLive(sessionId, status, resumeHint) };
12599
+ }
12600
+ const wasArchived = status === "archived";
12601
+ if (wasArchived) {
12602
+ try {
12603
+ await d.unarchive(sessionId);
12604
+ } catch (error) {
12605
+ const message = `unarchive failed: ${error instanceof Error ? error.message : String(error)}`;
12606
+ return { sessionId, status, delivered: false, resumed: false, stored: false, error: message, resume: { ok: false, error: message } };
12607
+ }
12608
+ }
12609
+ const outcome = await d.resume(sessionId, {
12610
+ ...typeof options.model === "string" ? { model: options.model } : {},
12611
+ ...options.permissionMode !== void 0 ? { permissionMode: options.permissionMode } : {}
12612
+ });
12613
+ if (!outcome.success) {
12614
+ let message = outcome.error ?? "resume failed";
12615
+ if (wasArchived) {
12616
+ try {
12617
+ await d.archive(sessionId);
12618
+ } catch (error) {
12619
+ message += `; failed to restore archive state: ${error instanceof Error ? error.message : String(error)}`;
12620
+ }
12621
+ }
12622
+ return { sessionId, status, delivered: false, resumed: false, stored: false, error: message, resume: { ok: false, error: message } };
12623
+ }
12624
+ resumed = true;
12625
+ resumeOutcome = { ok: true };
12626
+ status = await waitUntilLive(classify, d, options);
12627
+ if (status !== "live") {
12628
+ const waited = Math.round((options.waitMs ?? DEFAULT_RESUME_WAIT_MS) / 1e3);
12629
+ return {
12630
+ sessionId,
12631
+ status,
12632
+ delivered: false,
12633
+ resumed,
12634
+ stored: false,
12635
+ resume: resumeOutcome,
12636
+ error: `Session ${sessionId} was resumed but no live wrapper showed up within ${waited}s (state: ${status}); message not sent`
12637
+ };
12638
+ }
12639
+ }
12640
+ await d.send(sessionId, persisted, text, client, {
12641
+ ...options.model !== void 0 ? { model: options.model } : {},
12642
+ ...options.sentFrom !== void 0 ? { sentFrom: options.sentFrom } : {}
12643
+ });
12644
+ let after = "live";
12645
+ try {
12646
+ after = await classify();
12647
+ } catch {
12648
+ after = "live";
12649
+ }
12650
+ if (after !== "live") {
12651
+ return {
12652
+ sessionId,
12653
+ status: after,
12654
+ delivered: false,
12655
+ resumed,
12656
+ stored: true,
12657
+ ...resumeOutcome ? { resume: resumeOutcome } : {},
12658
+ error: `Session ${sessionId} went ${after} while sending: the message is stored server-side but no wrapper is attached to read it. ${after === "not_found" ? "Spawn a new session." : resumeHint}`
12659
+ };
12660
+ }
12661
+ return { sessionId, status: "live", delivered: true, resumed, stored: true, ...resumeOutcome ? { resume: resumeOutcome } : {} };
12662
+ }
12663
+ async function waitUntilLive(classify, d, options) {
12664
+ const waitMs = options.waitMs ?? DEFAULT_RESUME_WAIT_MS;
12665
+ const pollMs = options.pollMs ?? DEFAULT_RESUME_POLL_MS;
12666
+ const deadline = d.now() + waitMs;
12667
+ let status = await classify();
12668
+ while (status !== "live" && d.now() < deadline) {
12669
+ await d.sleep(pollMs);
12670
+ status = await classify();
12671
+ }
12672
+ return status;
12673
+ }
12674
+
12466
12675
  const PERSONAL_MEMORY_SOFT_LIMIT_CHARS = 2e3;
12467
12676
  function headingTitle(line) {
12468
12677
  const m = /^##(?!#)\s*(.*?)\s*$/.exec(line);
@@ -12562,11 +12771,13 @@ function fail(text) {
12562
12771
  function describeSession(id, persisted, extra) {
12563
12772
  const meta = persisted?.metadata;
12564
12773
  const parts = [id];
12774
+ if (extra?.live !== void 0) parts.push(extra.live ? "[running]" : "[not running]");
12565
12775
  if (meta?.summary?.text) parts.push(`title="${meta.summary.text}"`);
12566
12776
  if (meta?.path) parts.push(`cwd=${meta.path}`);
12567
12777
  if (meta?.flavor) parts.push(`agent=${meta.flavor}`);
12568
12778
  if (meta?.tags?.length) parts.push(`tags=${meta.tags.join(",")}`);
12569
12779
  if (meta?.variant === "assistant") parts.push("(assistant)");
12780
+ if (extra?.pid) parts.push(`pid=${extra.pid}`);
12570
12781
  parts.push(sessionWebUrl(id));
12571
12782
  return parts.join(" ");
12572
12783
  }
@@ -12620,19 +12831,27 @@ ${body}`);
12620
12831
  }
12621
12832
  });
12622
12833
  mcp.registerTool("session_send", {
12623
- description: "Send a user message into an existing session on this machine. Returns immediately after delivery \u2014 it does NOT wait for the session to respond; use session_read later to check progress.",
12834
+ description: "Send a user message into an existing session on this machine. Only delivers when a live wrapper will read it: an archived / offline session is refused (the server would store the message unread) unless resume:true brings it back on this machine first. Returns immediately after delivery \u2014 it does NOT wait for the session to respond; use session_read later to check progress.",
12624
12835
  title: "Send Message to Session",
12625
12836
  inputSchema: {
12626
12837
  sessionId: z.string().describe("The Happy session id to message"),
12627
- text: z.string().describe("The message text to send")
12838
+ text: z.string().describe("The message text to send"),
12839
+ resume: z.boolean().optional().describe("If the session is archived or offline, resume it on this machine (like the web Restore button) and wait until it is live before sending")
12628
12840
  }
12629
12841
  }, async (args) => {
12630
12842
  if (!isValidSessionId(args.sessionId)) return fail("Invalid sessionId");
12631
12843
  if (typeof args.text !== "string" || args.text.trim().length === 0) return fail("text must be non-empty");
12632
12844
  try {
12633
12845
  const persisted = await waitForSessionKey(args.sessionId, 0);
12634
- await sendUserMessage(args.sessionId, persisted, args.text, MCP_CLIENT_TAG);
12635
- return ok(`Message delivered to ${describeSession(args.sessionId, persisted)}`);
12846
+ const result = await deliverToSession(args.sessionId, persisted, args.text, MCP_CLIENT_TAG, {
12847
+ resume: args.resume === true,
12848
+ resumeHint: "Pass resume:true to bring it back on this machine, or spawn a new session."
12849
+ });
12850
+ if (!result.delivered) {
12851
+ const detail = result.error ?? `session is ${result.status}`;
12852
+ return fail(result.stored ? `Not delivered: ${detail}` : `Session ${args.sessionId} is ${result.status}: ${detail}`);
12853
+ }
12854
+ return ok(`Message delivered${result.resumed ? " (session resumed on this machine)" : ""} to ${describeSession(args.sessionId, persisted, { live: true })}`);
12636
12855
  } catch (error) {
12637
12856
  return fail(`Failed to send: ${error instanceof Error ? error.message : String(error)}`);
12638
12857
  }
@@ -13405,7 +13624,7 @@ function registerSideQuestionHandler(rpc, deps) {
13405
13624
  const retainMs = deps.retainMs ?? SIDE_QUESTION_RETAIN_MS;
13406
13625
  const maxRunMs = deps.maxRunMs ?? SIDE_QUESTION_MAX_RUN_MS;
13407
13626
  const fork = deps.run ?? (async (input) => {
13408
- const { query } = await import('./index-BXA9fxbK.mjs');
13627
+ const { query } = await import('./index-CIx3248o.mjs');
13409
13628
  return runSideQuestion(query, input);
13410
13629
  });
13411
13630
  const run = async (input, live) => {
@@ -18699,7 +18918,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
18699
18918
  return;
18700
18919
  } else if (subcommand === "install-terminal-hooks") {
18701
18920
  try {
18702
- const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await import('./installTerminalHooks-Bpl32K75.mjs');
18921
+ const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await import('./installTerminalHooks-Dde_8t36.mjs');
18703
18922
  const command = parseTerminalHooksArgs(args.slice(1));
18704
18923
  if (command.action === "help") {
18705
18924
  console.log(TERMINAL_HOOKS_HELP);
@@ -18716,7 +18935,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
18716
18935
  }
18717
18936
  } else if (subcommand === "agent-home") {
18718
18937
  try {
18719
- const { parseAgentHomeArgs, runAgentHomeCommand } = await import('./agentHome-D68Xh2ae.mjs');
18938
+ const { parseAgentHomeArgs, runAgentHomeCommand } = await import('./agentHome-B20RWdgE.mjs');
18720
18939
  await runAgentHomeCommand(parseAgentHomeArgs(args.slice(1)));
18721
18940
  process.exit(0);
18722
18941
  } catch (error) {
@@ -18725,7 +18944,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
18725
18944
  }
18726
18945
  } else if (subcommand === "spawn") {
18727
18946
  try {
18728
- const { handleSpawnCommand } = await import('./spawn-C6fRkedx.mjs');
18947
+ const { handleSpawnCommand } = await import('./spawn-D1bhyHbH.mjs');
18729
18948
  await handleSpawnCommand(args.slice(1));
18730
18949
  } catch (error) {
18731
18950
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -18737,7 +18956,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
18737
18956
  return;
18738
18957
  } else if (subcommand === "sessions") {
18739
18958
  try {
18740
- const { handleSessionsCommand } = await import('./sessions-iBnYzVUK.mjs');
18959
+ const { handleSessionsCommand } = await import('./sessions-DlPOYKLU.mjs');
18741
18960
  await handleSessionsCommand(args.slice(1));
18742
18961
  } catch (error) {
18743
18962
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -18749,7 +18968,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
18749
18968
  return;
18750
18969
  } else if (subcommand === "send") {
18751
18970
  try {
18752
- const { handleSendCommand } = await import('./send-Cs-RwqNf.mjs');
18971
+ const { handleSendCommand } = await import('./send-DYeSFg8s.mjs');
18753
18972
  await handleSendCommand(args.slice(1));
18754
18973
  } catch (error) {
18755
18974
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -18855,9 +19074,9 @@ Conversation history is preserved on the server, but in-flight tool calls are in
18855
19074
  if (geminiSubcommand === "project" && args[2] === "set" && args[3]) {
18856
19075
  const projectId = args[3];
18857
19076
  try {
18858
- const { saveGoogleCloudProjectToConfig } = await import('./config-CHJ189UJ.mjs');
18859
- const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await import('./limits-BtAuKRl2.mjs').then(function (n) { return n.al; });
18860
- const { ApiClient: ApiClient2 } = await import('./types-BvqOVUOW.mjs').then(function (n) { return n.ah; });
19077
+ const { saveGoogleCloudProjectToConfig } = await import('./config-B-ocQh5V.mjs');
19078
+ const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await import('./limits-Dt7_unH4.mjs').then(function (n) { return n.al; });
19079
+ const { ApiClient: ApiClient2 } = await import('./types-D5RWyBE5.mjs').then(function (n) { return n.ai; });
18861
19080
  let userEmail = void 0;
18862
19081
  try {
18863
19082
  const credentials = await readCredentialsForConfiguredRelay2();
@@ -18888,7 +19107,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
18888
19107
  }
18889
19108
  if (geminiSubcommand === "project" && args[2] === "get") {
18890
19109
  try {
18891
- const { readGeminiLocalConfig } = await import('./config-CHJ189UJ.mjs');
19110
+ const { readGeminiLocalConfig } = await import('./config-B-ocQh5V.mjs');
18892
19111
  const config = readGeminiLocalConfig();
18893
19112
  if (config.googleCloudProject) {
18894
19113
  console.log(`Current Google Cloud Project: ${config.googleCloudProject}`);
@@ -18928,7 +19147,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
18928
19147
  process.exit(0);
18929
19148
  }
18930
19149
  try {
18931
- const { runGemini } = await import('./runGemini-YqH7a-7O.mjs');
19150
+ const { runGemini } = await import('./runGemini-BW-pEklU.mjs');
18932
19151
  let startedBy = void 0;
18933
19152
  for (let i = 1; i < args.length; i++) {
18934
19153
  if (args[i] === "--started-by") {
@@ -18951,7 +19170,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
18951
19170
  } else if (subcommand === "pi") {
18952
19171
  if (args[1] === "--terminal") {
18953
19172
  try {
18954
- const { runPiTerminal } = await import('./piTerminal-BoHvPEZ_.mjs');
19173
+ const { runPiTerminal } = await import('./piTerminal-CCEGCQOY.mjs');
18955
19174
  process.exitCode = await runPiTerminal(args.slice(2));
18956
19175
  } catch (error) {
18957
19176
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -18968,7 +19187,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
18968
19187
  }
18969
19188
  };
18970
19189
  try {
18971
- const { runAcp, resolveAcpAgentConfig } = await import('./index-BgYZGODP.mjs');
19190
+ const { runAcp, resolveAcpAgentConfig } = await import('./index-ZKuBjvHi.mjs');
18972
19191
  const parsed = parsePiRunnerArgs(args.slice(1));
18973
19192
  const resolved = resolveAcpAgentConfig(["pi", ...parsed.passthrough]);
18974
19193
  const { credentials } = await authAndSetupMachineIfNeeded();
@@ -18996,7 +19215,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
18996
19215
  return;
18997
19216
  } else if (subcommand === "acp") {
18998
19217
  try {
18999
- const { runAcp, resolveAcpAgentConfig } = await import('./index-BgYZGODP.mjs');
19218
+ const { runAcp, resolveAcpAgentConfig } = await import('./index-ZKuBjvHi.mjs');
19000
19219
  let startedBy = void 0;
19001
19220
  let verbose = false;
19002
19221
  const acpArgs = [];
@@ -19036,7 +19255,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
19036
19255
  return;
19037
19256
  } else if (subcommand === "openclaw") {
19038
19257
  try {
19039
- const { runOpenClaw } = await import('./runOpenClaw-DSSyFQBb.mjs');
19258
+ const { runOpenClaw } = await import('./runOpenClaw-NRB6-_jU.mjs');
19040
19259
  let startedBy = void 0;
19041
19260
  let verbose = false;
19042
19261
  let gatewayUrl;
@@ -19087,7 +19306,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
19087
19306
  return;
19088
19307
  } else if (subcommand === "todo") {
19089
19308
  try {
19090
- const { handleTodoCommand } = await import('./todo-aCZmSt27.mjs');
19309
+ const { handleTodoCommand } = await import('./todo-B2CjDg_V.mjs');
19091
19310
  await handleTodoCommand(args.slice(1));
19092
19311
  } catch (error) {
19093
19312
  console.error(JSON.stringify({ error: error instanceof Error ? error.message : "Todo command failed" }));
@@ -19096,7 +19315,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
19096
19315
  return;
19097
19316
  } else if (subcommand === "teams") {
19098
19317
  try {
19099
- const { handleTeamsCommand } = await import('./teams-CkrWQ4uM.mjs');
19318
+ const { handleTeamsCommand } = await import('./teams-pfKHpkgL.mjs');
19100
19319
  await handleTeamsCommand(args.slice(1));
19101
19320
  } catch (error) {
19102
19321
  console.error(error instanceof Error ? error.message : "Teams command failed");
@@ -19105,7 +19324,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
19105
19324
  return;
19106
19325
  } else if (subcommand === "auto") {
19107
19326
  try {
19108
- const { handleAutoCommand } = await import('./auto-CcXxfqkC.mjs');
19327
+ const { handleAutoCommand } = await import('./auto-BQnncDcs.mjs');
19109
19328
  await handleAutoCommand(args.slice(1));
19110
19329
  } catch (error) {
19111
19330
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Automation command failed");
@@ -19117,7 +19336,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
19117
19336
  return;
19118
19337
  } else if (subcommand === "mcp" && (args.length === 1 || args.length === 2 && args[1] === "--terminal-tools")) {
19119
19338
  try {
19120
- const { handleMcpCommand } = await import('./mcp-DQkmk4VV.mjs');
19339
+ const { handleMcpCommand } = await import('./mcp-9Ui4nQZL.mjs');
19121
19340
  await handleMcpCommand(args[1] === "--terminal-tools");
19122
19341
  } catch (error) {
19123
19342
  process.stderr.write(`[very-happy mcp] Fatal: ${error instanceof Error ? error.message : String(error)}
@@ -19487,4 +19706,4 @@ ${chalk.bold("Examples:")}
19487
19706
  }
19488
19707
  }
19489
19708
 
19490
- export { MessageBuffer as $, ALLOWED_SPAWN_PERMISSION_MODES as A, initialMachineMetadata as B, createSessionMetadata as C, DEFAULT_RECENT_LIMIT as D, setupOfflineReconnection as E, StreamRelay as F, GEMINI_MODEL_ENV as G, MessageQueue2 as H, hashObject as I, startHappyServer as J, registerAgentAttachmentDownloads as K, TitleGenerator as L, MAX_READ_LIMIT as M, registerKillSessionHandler as N, CLAUDE_ATTACHMENT_KINDS as O, PI_TEAMS_EXTENSION as P, stageClaudeAttachments as Q, appendStagedAttachmentsToPrompt as R, SPAWN_AGENTS as S, TurnWaitTimeoutError as T, BasePermissionHandler as U, writeSessionModeFile as V, normalizeAcpPermissionMode as W, removeSessionModeFile as X, GEMINI_API_KEY_ENV as Y, GOOGLE_API_KEY_ENV as Z, BaseReasoningProcessor as _, listSessions as a, CHANGE_TITLE_INSTRUCTION as a0, resolvePermissionRequest as b, archiveSession as c, sendUserMessage as d, sessionWebUrl as e, DEFAULT_GEMINI_MODEL as f, describeTrigger as g, describeAction as h, sanitizeSpawnPermissionMode as i, tmuxSupportsSessionEnv as j, readSessionMetadata as k, listAccountSessions as l, resolveSpawnPermissionMode as m, resolveFirstMessageMeta as n, isValidSpawnOrigin as o, parseDuration as p, query as q, readSessionTranscript as r, stopSession as s, triggerFromFlags as t, waitForSessionKey as u, checkPreviewPath as v, waitForTurnEnd as w, registerAssistantSessionTools as x, suggestTitleForPrompt as y, TEAM_SKILL as z };
19709
+ export { BaseReasoningProcessor as $, ALLOWED_SPAWN_PERMISSION_MODES as A, TEAM_SKILL as B, initialMachineMetadata as C, DEFAULT_RECENT_LIMIT as D, createSessionMetadata as E, setupOfflineReconnection as F, GEMINI_MODEL_ENV as G, StreamRelay as H, MessageQueue2 as I, hashObject as J, startHappyServer as K, registerAgentAttachmentDownloads as L, MAX_READ_LIMIT as M, TitleGenerator as N, registerKillSessionHandler as O, PI_TEAMS_EXTENSION as P, CLAUDE_ATTACHMENT_KINDS as Q, stageClaudeAttachments as R, SPAWN_AGENTS as S, TurnWaitTimeoutError as T, appendStagedAttachmentsToPrompt as U, BasePermissionHandler as V, writeSessionModeFile as W, normalizeAcpPermissionMode as X, removeSessionModeFile as Y, GEMINI_API_KEY_ENV as Z, GOOGLE_API_KEY_ENV as _, listSessions as a, MessageBuffer as a0, CHANGE_TITLE_INSTRUCTION as a1, resolvePermissionRequest as b, archiveSession as c, deliverToSession as d, sessionWebUrl as e, DEFAULT_GEMINI_MODEL as f, describeTrigger as g, describeAction as h, sanitizeSpawnPermissionMode as i, tmuxSupportsSessionEnv as j, readSessionMetadata as k, listAccountSessions as l, resolveSpawnPermissionMode as m, resolveFirstMessageMeta as n, isValidSpawnOrigin as o, parseDuration as p, query as q, readSessionTranscript as r, stopSession as s, triggerFromFlags as t, waitForSessionKey as u, sendUserMessage as v, waitForTurnEnd as w, checkPreviewPath as x, registerAssistantSessionTools as y, suggestTitleForPrompt as z };
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var AcpBackend = require('./AcpBackend-DSt8nTYm.cjs');
4
- var persistence = require('./limits-DY_sFA3J.cjs');
5
- var AcpSessionManager = require('./AcpSessionManager-uov6I9C8.cjs');
6
- var index$1 = require('./index-DHrwHxHf.cjs');
7
- var piRuntime = require('./piRuntime-DRbbeQ72.cjs');
3
+ var AcpBackend = require('./AcpBackend-B14xNj5L.cjs');
4
+ var persistence = require('./limits-CmzISka2.cjs');
5
+ var AcpSessionManager = require('./AcpSessionManager-CCHmPdrR.cjs');
6
+ var index$1 = require('./index-eCjkm8Y2.cjs');
7
+ var piRuntime = require('./piRuntime-BesGGPME.cjs');
8
8
  var node_crypto = require('node:crypto');
9
9
  var path = require('node:path');
10
- var index = require('./types-CUCU7Vw8.cjs');
10
+ var index = require('./types-Bd_TGr0F.cjs');
11
11
  var terminalTitleSuggest = require('./terminalTitleSuggest-Dji8I0Jy.cjs');
12
12
  require('node:child_process');
13
13
  require('@agentclientprotocol/sdk');
@@ -21,7 +21,7 @@ require('node:util');
21
21
  require('@paralleldrive/cuid2');
22
22
  require('cross-spawn');
23
23
  require('node:readline');
24
- require('./agentGuidance-BM4kMNyr.cjs');
24
+ require('./agentGuidance-DUBXppv-.cjs');
25
25
  require('fs/promises');
26
26
  require('ink');
27
27
  require('react');
@@ -1,11 +1,11 @@
1
- import { q as query } from './index-BacwoXzs.mjs';
1
+ import { q as query } from './index-BELV05ko.mjs';
2
2
  export { AbortError } from '@anthropic-ai/claude-agent-sdk';
3
3
  import 'chalk';
4
4
  import 'node:os';
5
5
  import 'node:crypto';
6
- import './types-BvqOVUOW.mjs';
6
+ import './types-D5RWyBE5.mjs';
7
7
  import 'axios';
8
- import './limits-BtAuKRl2.mjs';
8
+ import './limits-Dt7_unH4.mjs';
9
9
  import 'node:fs/promises';
10
10
  import 'node:fs';
11
11
  import 'node:path';
@@ -30,7 +30,7 @@ import 'fs';
30
30
  import 'node:readline';
31
31
  import '@anthropic-ai/sandbox-runtime';
32
32
  import 'expo-server-sdk';
33
- import './agentGuidance-C8unGWp7.mjs';
33
+ import './agentGuidance-TLYQxsm2.mjs';
34
34
  import 'ink';
35
35
  import 'react';
36
36
  import 'ps-list';
@@ -1,12 +1,12 @@
1
- import { D as DefaultTransport, A as AcpBackend } from './AcpBackend-YDGv4E-g.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-YDGv4E-g.mjs';
3
- import { r as readSettings, j as encodeBase64, l as logger, k as BUILTIN_TODO_DISCOVERY, c as configuration } from './limits-BtAuKRl2.mjs';
4
- import { A as AcpSessionManager } from './AcpSessionManager-Cxf5HQX1.mjs';
5
- import { B as initialMachineMetadata, C as createSessionMetadata, E as setupOfflineReconnection, F as StreamRelay, H as MessageQueue2, I as hashObject, J as startHappyServer, K as registerAgentAttachmentDownloads, L as TitleGenerator, N as registerKillSessionHandler, O as CLAUDE_ATTACHMENT_KINDS, Q as stageClaudeAttachments, R as appendStagedAttachmentsToPrompt, U as BasePermissionHandler, V as writeSessionModeFile, W as normalizeAcpPermissionMode, X as removeSessionModeFile } from './index-BacwoXzs.mjs';
6
- import { p as preparePiTeamsRuntime } from './piRuntime-DBpe12NN.mjs';
1
+ import { D as DefaultTransport, A as AcpBackend } from './AcpBackend-Ckyadhf4.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-Ckyadhf4.mjs';
3
+ import { r as readSettings, j as encodeBase64, l as logger, k as BUILTIN_TODO_DISCOVERY, c as configuration } from './limits-Dt7_unH4.mjs';
4
+ import { A as AcpSessionManager } from './AcpSessionManager-H8t4P-IW.mjs';
5
+ import { C as initialMachineMetadata, E as createSessionMetadata, F as setupOfflineReconnection, H as StreamRelay, I as MessageQueue2, J as hashObject, K as startHappyServer, L as registerAgentAttachmentDownloads, N as TitleGenerator, O as registerKillSessionHandler, Q as CLAUDE_ATTACHMENT_KINDS, R as stageClaudeAttachments, U as appendStagedAttachmentsToPrompt, V as BasePermissionHandler, W as writeSessionModeFile, X as normalizeAcpPermissionMode, Y as removeSessionModeFile } from './index-BELV05ko.mjs';
6
+ import { p as preparePiTeamsRuntime } from './piRuntime-C4E4pgye.mjs';
7
7
  import { randomUUID } from 'node:crypto';
8
8
  import { join } from 'node:path';
9
- import { o as connectionState, A as ApiClient, q as notifyDaemonSessionStarted } from './types-BvqOVUOW.mjs';
9
+ import { o as connectionState, A as ApiClient, q as notifyDaemonSessionStarted } from './types-D5RWyBE5.mjs';
10
10
  import { p as projectPath } from './terminalTitleSuggest-DKgX3osW.mjs';
11
11
  import 'node:child_process';
12
12
  import '@agentclientprotocol/sdk';
@@ -20,7 +20,7 @@ import 'node:util';
20
20
  import '@paralleldrive/cuid2';
21
21
  import 'cross-spawn';
22
22
  import 'node:readline';
23
- import './agentGuidance-C8unGWp7.mjs';
23
+ import './agentGuidance-TLYQxsm2.mjs';
24
24
  import 'fs/promises';
25
25
  import 'ink';
26
26
  import 'react';