very-happy-cli 0.2.102 → 0.2.104

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 (33) hide show
  1. package/dist/{AcpBackend-CpKkdwIL.cjs → AcpBackend-DDGfk3HJ.cjs} +1 -1
  2. package/dist/{AcpBackend-C1nF06ZR.mjs → AcpBackend-De4iQ_JG.mjs} +1 -1
  3. package/dist/{AcpSessionManager-DjWIwGTR.cjs → AcpSessionManager-Cdv6Xgwy.cjs} +1 -1
  4. package/dist/{AcpSessionManager-BDad8lK3.mjs → AcpSessionManager-DRzAgHtT.mjs} +1 -1
  5. package/dist/{config-DSF29tTS.cjs → config-CqM5UxVd.cjs} +2 -2
  6. package/dist/{config-BlTfR0KA.mjs → config-E3KdWyaQ.mjs} +2 -2
  7. package/dist/{index-CF3rNFlZ.mjs → index--TiLl7-A.mjs} +22 -16
  8. package/dist/{index-DjYlt3fw.mjs → index-Bzj1XdPx.mjs} +2 -2
  9. package/dist/{index-D_2eCeep.cjs → index-CX_3uUem.cjs} +26 -20
  10. package/dist/{index-CPC-a5lH.mjs → index-C_dmtMJ6.mjs} +5 -5
  11. package/dist/{index-C8HuYyZq.cjs → index-De6H3U0N.cjs} +2 -2
  12. package/dist/{index-yLIv8JPD.cjs → index-fuavV8uc.cjs} +4 -4
  13. package/dist/index.cjs +2 -2
  14. package/dist/index.mjs +2 -2
  15. package/dist/{installTerminalHooks-BVMhXRZO.cjs → installTerminalHooks-BXMBwrvq.cjs} +2 -2
  16. package/dist/{installTerminalHooks-DAR3YEo3.mjs → installTerminalHooks-DV0e8-V3.mjs} +2 -2
  17. package/dist/lib.cjs +1 -1
  18. package/dist/lib.d.cts +17 -0
  19. package/dist/lib.d.mts +17 -0
  20. package/dist/lib.mjs +1 -1
  21. package/dist/{mcp-LCZtdhF0.cjs → mcp-Cq3On_Qo.cjs} +2 -2
  22. package/dist/{mcp--I-Uz_wH.mjs → mcp-DFS9Zohz.mjs} +2 -2
  23. package/dist/{runGemini-cLR7rfj6.mjs → runGemini-BFjtlkZI.mjs} +4 -4
  24. package/dist/{runGemini-Crna_6uM.cjs → runGemini-DFvjh8cO.cjs} +4 -4
  25. package/dist/{runOpenClaw-CWjOCdWg.cjs → runOpenClaw-B5Og1FED.cjs} +3 -3
  26. package/dist/{runOpenClaw-C1u9xEH7.mjs → runOpenClaw-BFYj1F4u.mjs} +3 -3
  27. package/dist/{send-BtQ9qf_z.mjs → send-B666yos0.mjs} +2 -2
  28. package/dist/{send-CufsYMXq.cjs → send-Bog0YPxo.cjs} +2 -2
  29. package/dist/{spawn-DPllkoUN.cjs → spawn-BSdMkMPX.cjs} +2 -2
  30. package/dist/{spawn-rdb0uM9R.mjs → spawn-DrqvVoNF.mjs} +2 -2
  31. package/dist/{types-7-mfp-j5.cjs → types-14LATr9X.cjs} +349 -105
  32. package/dist/{types-B3Dnzv_q.mjs → types-D9LyZitb.mjs} +347 -105
  33. package/package.json +7 -7
@@ -3,7 +3,7 @@
3
3
  var node_child_process = require('node:child_process');
4
4
  var sdk = require('@agentclientprotocol/sdk');
5
5
  var node_crypto = require('node:crypto');
6
- var persistence = require('./types-7-mfp-j5.cjs');
6
+ var persistence = require('./types-14LATr9X.cjs');
7
7
 
8
8
  const DEFAULT_TIMEOUTS = {
9
9
  /** Default initialization timeout: 60 seconds */
@@ -1,7 +1,7 @@
1
1
  import { spawn } from 'node:child_process';
2
2
  import { ndJsonStream, ClientSideConnection } from '@agentclientprotocol/sdk';
3
3
  import { randomUUID } from 'node:crypto';
4
- import { l as logger, d as contentLogMetadata, e as errorLogMetadata, f as packageJson, g as delay } from './types-B3Dnzv_q.mjs';
4
+ import { l as logger, d as contentLogMetadata, e as errorLogMetadata, f as packageJson, g as delay } from './types-D9LyZitb.mjs';
5
5
 
6
6
  const DEFAULT_TIMEOUTS = {
7
7
  /** Default initialization timeout: 60 seconds */
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var cuid2 = require('@paralleldrive/cuid2');
4
- var persistence = require('./types-7-mfp-j5.cjs');
4
+ var persistence = require('./types-14LATr9X.cjs');
5
5
 
6
6
  function turnOptions(turnId, time) {
7
7
  return turnId ? { turn: turnId, time } : { time };
@@ -1,5 +1,5 @@
1
1
  import { createId } from '@paralleldrive/cuid2';
2
- import { b as createEnvelope } from './types-B3Dnzv_q.mjs';
2
+ import { b as createEnvelope } from './types-D9LyZitb.mjs';
3
3
 
4
4
  function turnOptions(turnId, time) {
5
5
  return turnId ? { turn: turnId, time } : { time };
@@ -4,8 +4,8 @@ var fs = require('fs');
4
4
  var path = require('path');
5
5
  var os = require('os');
6
6
  var child_process = require('child_process');
7
- var persistence = require('./types-7-mfp-j5.cjs');
8
- var index = require('./index-D_2eCeep.cjs');
7
+ var persistence = require('./types-14LATr9X.cjs');
8
+ var index = require('./index-CX_3uUem.cjs');
9
9
  require('axios');
10
10
  require('chalk');
11
11
  require('node:util');
@@ -2,8 +2,8 @@ import { existsSync, readFileSync, mkdirSync, writeFileSync } from 'fs';
2
2
  import { join } from 'path';
3
3
  import { homedir } from 'os';
4
4
  import { execSync } from 'child_process';
5
- import { l as logger } from './types-B3Dnzv_q.mjs';
6
- import { D as DEFAULT_GEMINI_MODEL, G as GEMINI_MODEL_ENV } from './index-CF3rNFlZ.mjs';
5
+ import { l as logger } from './types-D9LyZitb.mjs';
6
+ import { D as DEFAULT_GEMINI_MODEL, G as GEMINI_MODEL_ENV } from './index--TiLl7-A.mjs';
7
7
  import 'axios';
8
8
  import 'chalk';
9
9
  import 'node:util';
@@ -1,7 +1,7 @@
1
1
  import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import chalk from 'chalk';
2
2
  import os, { homedir, userInfo } from 'node:os';
3
3
  import { randomUUID, randomBytes, createHash as createHash$1, timingSafeEqual } from 'node:crypto';
4
- import { n as readDaemonState, l as logger, c as configuration, o as clearDaemonState, q as getProjectPath, p as projectPath, s as initializeSandbox, t as wrapCommand, d as contentLogMetadata, I as InvalidateSync, R as RawJSONLinesSchema, g as delay, u as AsyncLock, v as ensurePrivateDirectory, M as MAX_CHAT_ATTACHMENT_SOURCE_BYTES, x as hardenPrivateFile, f as packageJson, i as readSettings, y as readCredentials, z as credentialRelayProblem, B as deriveLocalCliUpdateSummary, j as encodeBase64, C as updateSettings, D as encodeBase64Url, E as decodeBase64, F as writeCredentialsLegacy, G as writeCredentialsDataKey, H as readCredentialsForConfiguredRelay, J as encrypt, r as readPersistedSessions, K as isClaudeSessionId, L as getLocalHappyAgentCredentialPath, N as readLocalHappyAgentCredentials, O as decryptWithDataKey, P as decryptLegacy, Q as extractCompleteLines, S as decideBackfill, T as parseTerminalHookPayload, U as tmuxArgs, V as scrubTmuxClientEnv, W as decideMirrorBinding, X as MIRROR_BACKFILL_LINES_DEFAULT, Y as persistSession, Z as mirrorLineKey, _ as mirrorLocalId, w as writePrivateFileSync, $ as detectResumeSupport, a0 as detectCLIAvailability, a1 as acquireDaemonLock, a2 as summarizeSpawnSessionForLog, a3 as deletePersistedSessions, a4 as shellescape, a5 as decrypt, a6 as writeDaemonState, A as ApiClient, a7 as writeSettings, a8 as fetchCliUpdateState, a9 as resolveCliUpdateCheckInterval, aa as DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS, ab as releaseDaemonLock, ac as isValidSessionId, ad as listVhTerminals, ae as isValidTerminalId, af as readVhTerminal, ag as sendToVhTerminal, h as connectionState, ah as startOfflineReconnection, ai as clearCredentials, aj as clearMachineId, k as ensurePrivateDirectorySync, ak as SandboxConfigSchema, b as createEnvelope, al as CodexAppServerClient, am as getLatestDaemonLog } from './types-B3Dnzv_q.mjs';
4
+ import { n as readDaemonState, l as logger, c as configuration, o as clearDaemonState, q as getProjectPath, p as projectPath, s as initializeSandbox, t as wrapCommand, d as contentLogMetadata, I as InvalidateSync, R as RawJSONLinesSchema, g as delay, u as AsyncLock, v as ensurePrivateDirectory, M as MAX_CHAT_ATTACHMENT_SOURCE_BYTES, x as hardenPrivateFile, f as packageJson, i as readSettings, y as readCredentials, z as credentialRelayProblem, B as deriveLocalCliUpdateSummary, j as encodeBase64, C as updateSettings, D as encodeBase64Url, E as decodeBase64, F as writeCredentialsLegacy, G as writeCredentialsDataKey, H as readCredentialsForConfiguredRelay, J as encrypt, r as readPersistedSessions, K as isClaudeSessionId, L as getLocalHappyAgentCredentialPath, N as readLocalHappyAgentCredentials, O as decryptWithDataKey, P as decryptLegacy, Q as extractCompleteLines, S as decideBackfill, T as parseTerminalHookPayload, U as tmuxArgs, V as scrubTmuxClientEnv, W as decideMirrorBinding, X as MIRROR_BACKFILL_LINES_DEFAULT, Y as persistSession, Z as mirrorLineKey, _ as mirrorLocalId, w as writePrivateFileSync, $ as detectResumeSupport, a0 as detectCLIAvailability, a1 as acquireDaemonLock, a2 as summarizeSpawnSessionForLog, a3 as deletePersistedSessions, a4 as shellescape, a5 as decrypt, a6 as writeDaemonState, A as ApiClient, a7 as writeSettings, a8 as fetchCliUpdateState, a9 as resolveCliUpdateCheckInterval, aa as DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS, ab as releaseDaemonLock, ac as isValidSessionId, ad as listVhTerminals, ae as isValidTerminalId, af as readVhTerminal, ag as sendToVhTerminal, ah as TITLE_PROMPT_PREFIX, ai as BOARD_ANALYZER_PROMPT_PREFIX, h as connectionState, aj as startOfflineReconnection, ak as clearCredentials, al as clearMachineId, k as ensurePrivateDirectorySync, am as SandboxConfigSchema, b as createEnvelope, an as CodexAppServerClient, ao as getLatestDaemonLog } from './types-D9LyZitb.mjs';
5
5
  import spawn$1, { spawn } from 'cross-spawn';
6
6
  import path, { join, resolve, basename, delimiter, isAbsolute, normalize, sep, dirname } from 'node:path';
7
7
  import { createInterface } from 'node:readline';
@@ -5410,7 +5410,7 @@ function resumePrecheck(metadata, fs) {
5410
5410
  }
5411
5411
  function sanitizeResumeModel(value) {
5412
5412
  if (typeof value !== "string") return null;
5413
- return /^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}$/.test(value) ? value : null;
5413
+ return /^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}(\[1m\])?$/i.test(value) ? value : null;
5414
5414
  }
5415
5415
 
5416
5416
  const DEFAULT_MAX_RESTARTS = 3;
@@ -7835,6 +7835,7 @@ async function claimSessionOrExit(happySessionId, options) {
7835
7835
  process.on("exit", () => releaseSessionLock(happySessionId));
7836
7836
  }
7837
7837
 
7838
+ const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
7838
7839
  const hostSuffix = process.env.HAPPY_VARIANT === "dev" ? "-dev" : "";
7839
7840
  const initialMachineMetadata = {
7840
7841
  host: os$1.hostname() + hostSuffix,
@@ -8170,6 +8171,9 @@ async function startDaemon() {
8170
8171
  if (options.resumeClaudeSessionId) {
8171
8172
  extraEnv.HAPPY_FORK_CLAUDE_SESSION_ID = options.resumeClaudeSessionId;
8172
8173
  }
8174
+ if (options.importedFromClaudeSessionId && UUID_RE.test(options.importedFromClaudeSessionId)) {
8175
+ extraEnv.HAPPY_IMPORTED_FROM_CLAUDE_SESSION_ID = options.importedFromClaudeSessionId;
8176
+ }
8173
8177
  if (options.resumeCodexThreadId) {
8174
8178
  extraEnv.HAPPY_FORK_CODEX_THREAD_ID = options.resumeCodexThreadId;
8175
8179
  }
@@ -10031,7 +10035,7 @@ function registerSideQuestionHandler(rpc, deps) {
10031
10035
  const retainMs = deps.retainMs ?? SIDE_QUESTION_RETAIN_MS;
10032
10036
  const maxRunMs = deps.maxRunMs ?? SIDE_QUESTION_MAX_RUN_MS;
10033
10037
  const run = deps.run ?? (async (input) => {
10034
- const { query } = await import('./index-DjYlt3fw.mjs');
10038
+ const { query } = await import('./index-Bzj1XdPx.mjs');
10035
10039
  return runSideQuestion(query, input);
10036
10040
  });
10037
10041
  const slots = /* @__PURE__ */ new Map();
@@ -10145,7 +10149,7 @@ function resolveClaudeBinary() {
10145
10149
  }
10146
10150
  function buildPrompt(firstUserMessage) {
10147
10151
  const sample = firstUserMessage.slice(0, MAX_PROMPT_SAMPLE_CHARS);
10148
- return `Summarize the SPECIFIC topic/request of this message into a 3-6 word title (match the message's language). Be concrete \u2014 name the actual task/subject. Do NOT output generic placeholders like "\u65B0\u5BF9\u8BDD"/"New chat"/"Conversation"/"Untitled". No quotes, no trailing punctuation. Reply with ONLY the title.
10152
+ return `${TITLE_PROMPT_PREFIX} (match the message's language). Be concrete \u2014 name the actual task/subject. Do NOT output generic placeholders like "\u65B0\u5BF9\u8BDD"/"New chat"/"Conversation"/"Untitled". No quotes, no trailing punctuation. Reply with ONLY the title.
10149
10153
 
10150
10154
  Message: "${sample}"`;
10151
10155
  }
@@ -10341,7 +10345,7 @@ function buildBoardPrompt(input) {
10341
10345
  const taskLines = tasks.length > 0 ? tasks.map((t) => `- ${t.id}: ${t.title}`).join("\n") : "(no tasks defined)";
10342
10346
  const todoBlock = input.todos.length > 0 ? input.todos.join("\n") : "(none)";
10343
10347
  return [
10344
- "You are a status analyzer for a task board of coding-agent sessions. Analyze this session snapshot and reply with ONLY a strict JSON object, no markdown, no explanations:",
10348
+ `${BOARD_ANALYZER_PROMPT_PREFIX} Analyze this session snapshot and reply with ONLY a strict JSON object, no markdown, no explanations:`,
10345
10349
  '{"taskId": string|null, "attention": "none"|"review"|"blocked", "progress": string}',
10346
10350
  "",
10347
10351
  "Rules:",
@@ -10569,6 +10573,7 @@ async function runClaude(credentials, options = {}) {
10569
10573
  });
10570
10574
  const forkedFromSessionId = process.env.HAPPY_FORKED_FROM_SESSION_ID;
10571
10575
  const forkedFromMessageId = process.env.HAPPY_FORKED_FROM_MESSAGE_ID;
10576
+ const importedFromClaudeSessionId = process.env.HAPPY_IMPORTED_FROM_CLAUDE_SESSION_ID;
10572
10577
  let metadata = {
10573
10578
  path: workingDirectory,
10574
10579
  host: os.hostname(),
@@ -10598,6 +10603,7 @@ async function runClaude(credentials, options = {}) {
10598
10603
  dangerouslySkipPermissions,
10599
10604
  ...forkedFromSessionId ? { parentSessionId: forkedFromSessionId } : {},
10600
10605
  ...forkedFromMessageId ? { forkedFromMessageId } : {},
10606
+ ...importedFromClaudeSessionId ? { importedFromClaudeSessionId } : {},
10601
10607
  ...isAssistantVariant ? { variant: "assistant" } : {},
10602
10608
  // B-091: sessions the assistant dispatched (daemon spawn RPC exports
10603
10609
  // HAPPY_SPAWNED_BY, B-069) are born with the 'assistant' tag so every
@@ -14964,7 +14970,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
14964
14970
  process.exit(0);
14965
14971
  } else if (subcommand === "install-terminal-hooks") {
14966
14972
  try {
14967
- const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await import('./installTerminalHooks-DAR3YEo3.mjs');
14973
+ const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await import('./installTerminalHooks-DV0e8-V3.mjs');
14968
14974
  const command = parseTerminalHooksArgs(args.slice(1));
14969
14975
  if (command.action === "help") {
14970
14976
  console.log(TERMINAL_HOOKS_HELP);
@@ -14981,7 +14987,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
14981
14987
  }
14982
14988
  } else if (subcommand === "spawn") {
14983
14989
  try {
14984
- const { handleSpawnCommand } = await import('./spawn-rdb0uM9R.mjs');
14990
+ const { handleSpawnCommand } = await import('./spawn-DrqvVoNF.mjs');
14985
14991
  await handleSpawnCommand(args.slice(1));
14986
14992
  } catch (error) {
14987
14993
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -14993,7 +14999,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
14993
14999
  return;
14994
15000
  } else if (subcommand === "send") {
14995
15001
  try {
14996
- const { handleSendCommand } = await import('./send-BtQ9qf_z.mjs');
15002
+ const { handleSendCommand } = await import('./send-B666yos0.mjs');
14997
15003
  await handleSendCommand(args.slice(1));
14998
15004
  } catch (error) {
14999
15005
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -15099,9 +15105,9 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15099
15105
  if (geminiSubcommand === "project" && args[2] === "set" && args[3]) {
15100
15106
  const projectId = args[3];
15101
15107
  try {
15102
- const { saveGoogleCloudProjectToConfig } = await import('./config-BlTfR0KA.mjs');
15103
- const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await import('./types-B3Dnzv_q.mjs').then(function (n) { return n.an; });
15104
- const { ApiClient: ApiClient2 } = await import('./types-B3Dnzv_q.mjs').then(function (n) { return n.ao; });
15108
+ const { saveGoogleCloudProjectToConfig } = await import('./config-E3KdWyaQ.mjs');
15109
+ const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await import('./types-D9LyZitb.mjs').then(function (n) { return n.ap; });
15110
+ const { ApiClient: ApiClient2 } = await import('./types-D9LyZitb.mjs').then(function (n) { return n.aq; });
15105
15111
  let userEmail = void 0;
15106
15112
  try {
15107
15113
  const credentials = await readCredentialsForConfiguredRelay2();
@@ -15132,7 +15138,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15132
15138
  }
15133
15139
  if (geminiSubcommand === "project" && args[2] === "get") {
15134
15140
  try {
15135
- const { readGeminiLocalConfig } = await import('./config-BlTfR0KA.mjs');
15141
+ const { readGeminiLocalConfig } = await import('./config-E3KdWyaQ.mjs');
15136
15142
  const config = readGeminiLocalConfig();
15137
15143
  if (config.googleCloudProject) {
15138
15144
  console.log(`Current Google Cloud Project: ${config.googleCloudProject}`);
@@ -15172,7 +15178,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15172
15178
  process.exit(0);
15173
15179
  }
15174
15180
  try {
15175
- const { runGemini } = await import('./runGemini-cLR7rfj6.mjs');
15181
+ const { runGemini } = await import('./runGemini-BFjtlkZI.mjs');
15176
15182
  let startedBy = void 0;
15177
15183
  for (let i = 1; i < args.length; i++) {
15178
15184
  if (args[i] === "--started-by") {
@@ -15194,7 +15200,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15194
15200
  return;
15195
15201
  } else if (subcommand === "acp") {
15196
15202
  try {
15197
- const { runAcp, resolveAcpAgentConfig } = await import('./index-CPC-a5lH.mjs');
15203
+ const { runAcp, resolveAcpAgentConfig } = await import('./index-C_dmtMJ6.mjs');
15198
15204
  let startedBy = void 0;
15199
15205
  let verbose = false;
15200
15206
  const acpArgs = [];
@@ -15234,7 +15240,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15234
15240
  return;
15235
15241
  } else if (subcommand === "openclaw") {
15236
15242
  try {
15237
- const { runOpenClaw } = await import('./runOpenClaw-C1u9xEH7.mjs');
15243
+ const { runOpenClaw } = await import('./runOpenClaw-BFYj1F4u.mjs');
15238
15244
  let startedBy = void 0;
15239
15245
  let verbose = false;
15240
15246
  let gatewayUrl;
@@ -15285,7 +15291,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15285
15291
  return;
15286
15292
  } else if (subcommand === "mcp" && args.length === 1) {
15287
15293
  try {
15288
- const { handleMcpCommand } = await import('./mcp--I-Uz_wH.mjs');
15294
+ const { handleMcpCommand } = await import('./mcp-DFS9Zohz.mjs');
15289
15295
  await handleMcpCommand();
15290
15296
  } catch (error) {
15291
15297
  process.stderr.write(`[very-happy mcp] Fatal: ${error instanceof Error ? error.message : String(error)}
@@ -1,9 +1,9 @@
1
- import { q as query } from './index-CF3rNFlZ.mjs';
1
+ import { q as query } from './index--TiLl7-A.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-B3Dnzv_q.mjs';
6
+ import './types-D9LyZitb.mjs';
7
7
  import 'axios';
8
8
  import 'node:util';
9
9
  import 'node:fs';
@@ -3,7 +3,7 @@
3
3
  var chalk = require('chalk');
4
4
  var os = require('node:os');
5
5
  var node_crypto = require('node:crypto');
6
- var persistence = require('./types-7-mfp-j5.cjs');
6
+ var persistence = require('./types-14LATr9X.cjs');
7
7
  var spawn = require('cross-spawn');
8
8
  var path = require('node:path');
9
9
  var node_readline = require('node:readline');
@@ -5432,7 +5432,7 @@ function resumePrecheck(metadata, fs) {
5432
5432
  }
5433
5433
  function sanitizeResumeModel(value) {
5434
5434
  if (typeof value !== "string") return null;
5435
- return /^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}$/.test(value) ? value : null;
5435
+ return /^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}(\[1m\])?$/i.test(value) ? value : null;
5436
5436
  }
5437
5437
 
5438
5438
  const DEFAULT_MAX_RESTARTS = 3;
@@ -6778,7 +6778,7 @@ function parseJsonObject(text) {
6778
6778
  return null;
6779
6779
  }
6780
6780
  }
6781
- function resolveSdkClaudeBinary(platform = process.platform, arch = process.arch, resolver = (s) => node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-D_2eCeep.cjs', document.baseURI).href))).resolve(s)) {
6781
+ function resolveSdkClaudeBinary(platform = process.platform, arch = process.arch, resolver = (s) => node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-CX_3uUem.cjs', document.baseURI).href))).resolve(s)) {
6782
6782
  const platformArch = `${platform}-${arch}`;
6783
6783
  const candidates = [
6784
6784
  `@anthropic-ai/claude-agent-sdk-${platformArch}/claude`,
@@ -7857,6 +7857,7 @@ async function claimSessionOrExit(happySessionId, options) {
7857
7857
  process.on("exit", () => releaseSessionLock(happySessionId));
7858
7858
  }
7859
7859
 
7860
+ const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
7860
7861
  const hostSuffix = process.env.HAPPY_VARIANT === "dev" ? "-dev" : "";
7861
7862
  const initialMachineMetadata = {
7862
7863
  host: os$1.hostname() + hostSuffix,
@@ -8192,6 +8193,9 @@ async function startDaemon() {
8192
8193
  if (options.resumeClaudeSessionId) {
8193
8194
  extraEnv.HAPPY_FORK_CLAUDE_SESSION_ID = options.resumeClaudeSessionId;
8194
8195
  }
8196
+ if (options.importedFromClaudeSessionId && UUID_RE.test(options.importedFromClaudeSessionId)) {
8197
+ extraEnv.HAPPY_IMPORTED_FROM_CLAUDE_SESSION_ID = options.importedFromClaudeSessionId;
8198
+ }
8195
8199
  if (options.resumeCodexThreadId) {
8196
8200
  extraEnv.HAPPY_FORK_CODEX_THREAD_ID = options.resumeCodexThreadId;
8197
8201
  }
@@ -10053,7 +10057,7 @@ function registerSideQuestionHandler(rpc, deps) {
10053
10057
  const retainMs = deps.retainMs ?? SIDE_QUESTION_RETAIN_MS;
10054
10058
  const maxRunMs = deps.maxRunMs ?? SIDE_QUESTION_MAX_RUN_MS;
10055
10059
  const run = deps.run ?? (async (input) => {
10056
- const { query } = await Promise.resolve().then(function () { return require('./index-C8HuYyZq.cjs'); });
10060
+ const { query } = await Promise.resolve().then(function () { return require('./index-De6H3U0N.cjs'); });
10057
10061
  return runSideQuestion(query, input);
10058
10062
  });
10059
10063
  const slots = /* @__PURE__ */ new Map();
@@ -10155,7 +10159,7 @@ const MAX_TITLE_CHARS = 60;
10155
10159
  const GENERATION_TIMEOUT_MS = 3e4;
10156
10160
  function resolveClaudeBinary() {
10157
10161
  try {
10158
- const require$1 = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-D_2eCeep.cjs', document.baseURI).href)));
10162
+ const require$1 = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-CX_3uUem.cjs', document.baseURI).href)));
10159
10163
  const utilsPath = path.resolve(path.join(persistence.projectPath(), "scripts", "claude_version_utils.cjs"));
10160
10164
  const { getClaudeCliPath } = require$1(utilsPath);
10161
10165
  const path$1 = getClaudeCliPath();
@@ -10167,7 +10171,7 @@ function resolveClaudeBinary() {
10167
10171
  }
10168
10172
  function buildPrompt(firstUserMessage) {
10169
10173
  const sample = firstUserMessage.slice(0, MAX_PROMPT_SAMPLE_CHARS);
10170
- return `Summarize the SPECIFIC topic/request of this message into a 3-6 word title (match the message's language). Be concrete \u2014 name the actual task/subject. Do NOT output generic placeholders like "\u65B0\u5BF9\u8BDD"/"New chat"/"Conversation"/"Untitled". No quotes, no trailing punctuation. Reply with ONLY the title.
10174
+ return `${persistence.TITLE_PROMPT_PREFIX} (match the message's language). Be concrete \u2014 name the actual task/subject. Do NOT output generic placeholders like "\u65B0\u5BF9\u8BDD"/"New chat"/"Conversation"/"Untitled". No quotes, no trailing punctuation. Reply with ONLY the title.
10171
10175
 
10172
10176
  Message: "${sample}"`;
10173
10177
  }
@@ -10363,7 +10367,7 @@ function buildBoardPrompt(input) {
10363
10367
  const taskLines = tasks.length > 0 ? tasks.map((t) => `- ${t.id}: ${t.title}`).join("\n") : "(no tasks defined)";
10364
10368
  const todoBlock = input.todos.length > 0 ? input.todos.join("\n") : "(none)";
10365
10369
  return [
10366
- "You are a status analyzer for a task board of coding-agent sessions. Analyze this session snapshot and reply with ONLY a strict JSON object, no markdown, no explanations:",
10370
+ `${persistence.BOARD_ANALYZER_PROMPT_PREFIX} Analyze this session snapshot and reply with ONLY a strict JSON object, no markdown, no explanations:`,
10367
10371
  '{"taskId": string|null, "attention": "none"|"review"|"blocked", "progress": string}',
10368
10372
  "",
10369
10373
  "Rules:",
@@ -10591,6 +10595,7 @@ async function runClaude(credentials, options = {}) {
10591
10595
  });
10592
10596
  const forkedFromSessionId = process.env.HAPPY_FORKED_FROM_SESSION_ID;
10593
10597
  const forkedFromMessageId = process.env.HAPPY_FORKED_FROM_MESSAGE_ID;
10598
+ const importedFromClaudeSessionId = process.env.HAPPY_IMPORTED_FROM_CLAUDE_SESSION_ID;
10594
10599
  let metadata = {
10595
10600
  path: workingDirectory,
10596
10601
  host: os.hostname(),
@@ -10620,6 +10625,7 @@ async function runClaude(credentials, options = {}) {
10620
10625
  dangerouslySkipPermissions,
10621
10626
  ...forkedFromSessionId ? { parentSessionId: forkedFromSessionId } : {},
10622
10627
  ...forkedFromMessageId ? { forkedFromMessageId } : {},
10628
+ ...importedFromClaudeSessionId ? { importedFromClaudeSessionId } : {},
10623
10629
  ...isAssistantVariant ? { variant: "assistant" } : {},
10624
10630
  // B-091: sessions the assistant dispatched (daemon spawn RPC exports
10625
10631
  // HAPPY_SPAWNED_BY, B-069) are born with the 'assistant' tag so every
@@ -12360,9 +12366,9 @@ function resolveLocalSignupBootstrap(configuredMode, configuredInviteCodes, gene
12360
12366
  };
12361
12367
  }
12362
12368
 
12363
- const __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-D_2eCeep.cjs', document.baseURI).href)));
12369
+ const __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-CX_3uUem.cjs', document.baseURI).href)));
12364
12370
  const __dirname$1 = path.dirname(__filename$1);
12365
- const require_ = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-D_2eCeep.cjs', document.baseURI).href)));
12371
+ const require_ = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-CX_3uUem.cjs', document.baseURI).href)));
12366
12372
  const PRISMA_QUERY_ENGINE_FILES = {
12367
12373
  "arm64-darwin": "libquery_engine-darwin-arm64.dylib.node",
12368
12374
  "x64-darwin": "libquery_engine-darwin.dylib.node",
@@ -14986,7 +14992,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
14986
14992
  process.exit(0);
14987
14993
  } else if (subcommand === "install-terminal-hooks") {
14988
14994
  try {
14989
- const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await Promise.resolve().then(function () { return require('./installTerminalHooks-BVMhXRZO.cjs'); });
14995
+ const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await Promise.resolve().then(function () { return require('./installTerminalHooks-BXMBwrvq.cjs'); });
14990
14996
  const command = parseTerminalHooksArgs(args.slice(1));
14991
14997
  if (command.action === "help") {
14992
14998
  console.log(TERMINAL_HOOKS_HELP);
@@ -15003,7 +15009,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15003
15009
  }
15004
15010
  } else if (subcommand === "spawn") {
15005
15011
  try {
15006
- const { handleSpawnCommand } = await Promise.resolve().then(function () { return require('./spawn-DPllkoUN.cjs'); });
15012
+ const { handleSpawnCommand } = await Promise.resolve().then(function () { return require('./spawn-BSdMkMPX.cjs'); });
15007
15013
  await handleSpawnCommand(args.slice(1));
15008
15014
  } catch (error) {
15009
15015
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -15015,7 +15021,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15015
15021
  return;
15016
15022
  } else if (subcommand === "send") {
15017
15023
  try {
15018
- const { handleSendCommand } = await Promise.resolve().then(function () { return require('./send-CufsYMXq.cjs'); });
15024
+ const { handleSendCommand } = await Promise.resolve().then(function () { return require('./send-Bog0YPxo.cjs'); });
15019
15025
  await handleSendCommand(args.slice(1));
15020
15026
  } catch (error) {
15021
15027
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -15121,9 +15127,9 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15121
15127
  if (geminiSubcommand === "project" && args[2] === "set" && args[3]) {
15122
15128
  const projectId = args[3];
15123
15129
  try {
15124
- const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return require('./config-DSF29tTS.cjs'); });
15125
- const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await Promise.resolve().then(function () { return require('./types-7-mfp-j5.cjs'); }).then(function (n) { return n.persistence; });
15126
- const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./types-7-mfp-j5.cjs'); }).then(function (n) { return n.api; });
15130
+ const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return require('./config-CqM5UxVd.cjs'); });
15131
+ const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await Promise.resolve().then(function () { return require('./types-14LATr9X.cjs'); }).then(function (n) { return n.persistence; });
15132
+ const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./types-14LATr9X.cjs'); }).then(function (n) { return n.api; });
15127
15133
  let userEmail = void 0;
15128
15134
  try {
15129
15135
  const credentials = await readCredentialsForConfiguredRelay2();
@@ -15154,7 +15160,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15154
15160
  }
15155
15161
  if (geminiSubcommand === "project" && args[2] === "get") {
15156
15162
  try {
15157
- const { readGeminiLocalConfig } = await Promise.resolve().then(function () { return require('./config-DSF29tTS.cjs'); });
15163
+ const { readGeminiLocalConfig } = await Promise.resolve().then(function () { return require('./config-CqM5UxVd.cjs'); });
15158
15164
  const config = readGeminiLocalConfig();
15159
15165
  if (config.googleCloudProject) {
15160
15166
  console.log(`Current Google Cloud Project: ${config.googleCloudProject}`);
@@ -15194,7 +15200,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15194
15200
  process.exit(0);
15195
15201
  }
15196
15202
  try {
15197
- const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-Crna_6uM.cjs'); });
15203
+ const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-DFvjh8cO.cjs'); });
15198
15204
  let startedBy = void 0;
15199
15205
  for (let i = 1; i < args.length; i++) {
15200
15206
  if (args[i] === "--started-by") {
@@ -15216,7 +15222,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15216
15222
  return;
15217
15223
  } else if (subcommand === "acp") {
15218
15224
  try {
15219
- const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-yLIv8JPD.cjs'); });
15225
+ const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-fuavV8uc.cjs'); });
15220
15226
  let startedBy = void 0;
15221
15227
  let verbose = false;
15222
15228
  const acpArgs = [];
@@ -15256,7 +15262,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15256
15262
  return;
15257
15263
  } else if (subcommand === "openclaw") {
15258
15264
  try {
15259
- const { runOpenClaw } = await Promise.resolve().then(function () { return require('./runOpenClaw-CWjOCdWg.cjs'); });
15265
+ const { runOpenClaw } = await Promise.resolve().then(function () { return require('./runOpenClaw-B5Og1FED.cjs'); });
15260
15266
  let startedBy = void 0;
15261
15267
  let verbose = false;
15262
15268
  let gatewayUrl;
@@ -15307,7 +15313,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15307
15313
  return;
15308
15314
  } else if (subcommand === "mcp" && args.length === 1) {
15309
15315
  try {
15310
- const { handleMcpCommand } = await Promise.resolve().then(function () { return require('./mcp-LCZtdhF0.cjs'); });
15316
+ const { handleMcpCommand } = await Promise.resolve().then(function () { return require('./mcp-Cq3On_Qo.cjs'); });
15311
15317
  await handleMcpCommand();
15312
15318
  } catch (error) {
15313
15319
  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-C1nF06ZR.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-C1nF06ZR.mjs';
3
- import { h as connectionState, A as ApiClient, i as readSettings, j as encodeBase64, l as logger, p as projectPath } from './types-B3Dnzv_q.mjs';
4
- import { A as AcpSessionManager } from './AcpSessionManager-BDad8lK3.mjs';
1
+ import { D as DefaultTransport, A as AcpBackend } from './AcpBackend-De4iQ_JG.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-De4iQ_JG.mjs';
3
+ import { h as connectionState, A as ApiClient, i as readSettings, j as encodeBase64, l as logger, p as projectPath } from './types-D9LyZitb.mjs';
4
+ import { A as AcpSessionManager } from './AcpSessionManager-DRzAgHtT.mjs';
5
5
  import { randomUUID } from 'node:crypto';
6
6
  import { join } from 'node:path';
7
- import { i as initialMachineMetadata, d as createSessionMetadata, e as setupOfflineReconnection, n as notifyDaemonSessionStarted, M as MessageQueue2, h as hashObject, f as startHappyServer, r as registerKillSessionHandler, B as BasePermissionHandler } from './index-CF3rNFlZ.mjs';
7
+ import { i as initialMachineMetadata, d as createSessionMetadata, e as setupOfflineReconnection, n as notifyDaemonSessionStarted, M as MessageQueue2, h as hashObject, f as startHappyServer, r as registerKillSessionHandler, B as BasePermissionHandler } from './index--TiLl7-A.mjs';
8
8
  import 'node:child_process';
9
9
  import '@agentclientprotocol/sdk';
10
10
  import 'axios';
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-D_2eCeep.cjs');
3
+ var index = require('./index-CX_3uUem.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-7-mfp-j5.cjs');
8
+ require('./types-14LATr9X.cjs');
9
9
  require('axios');
10
10
  require('node:util');
11
11
  require('node:fs');
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var AcpBackend = require('./AcpBackend-CpKkdwIL.cjs');
4
- var persistence = require('./types-7-mfp-j5.cjs');
5
- var AcpSessionManager = require('./AcpSessionManager-DjWIwGTR.cjs');
3
+ var AcpBackend = require('./AcpBackend-DDGfk3HJ.cjs');
4
+ var persistence = require('./types-14LATr9X.cjs');
5
+ var AcpSessionManager = require('./AcpSessionManager-Cdv6Xgwy.cjs');
6
6
  var node_crypto = require('node:crypto');
7
7
  var path = require('node:path');
8
- var index = require('./index-D_2eCeep.cjs');
8
+ var index = require('./index-CX_3uUem.cjs');
9
9
  require('node:child_process');
10
10
  require('@agentclientprotocol/sdk');
11
11
  require('axios');
package/dist/index.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  require('chalk');
4
- require('./index-D_2eCeep.cjs');
5
- require('./types-7-mfp-j5.cjs');
4
+ require('./index-CX_3uUem.cjs');
5
+ require('./types-14LATr9X.cjs');
6
6
  require('zod');
7
7
  require('node:child_process');
8
8
  require('node:os');
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import 'chalk';
2
- import './index-CF3rNFlZ.mjs';
3
- import './types-B3Dnzv_q.mjs';
2
+ import './index--TiLl7-A.mjs';
3
+ import './types-D9LyZitb.mjs';
4
4
  import 'zod';
5
5
  import 'node:child_process';
6
6
  import 'node:os';
@@ -5,8 +5,8 @@ var path = require('node:path');
5
5
  var os = require('node:os');
6
6
  var node_child_process = require('node:child_process');
7
7
  var chalk = require('chalk');
8
- var persistence = require('./types-7-mfp-j5.cjs');
9
- var index = require('./index-D_2eCeep.cjs');
8
+ var persistence = require('./types-14LATr9X.cjs');
9
+ var index = require('./index-CX_3uUem.cjs');
10
10
  require('axios');
11
11
  require('node:util');
12
12
  require('node:fs/promises');
@@ -3,8 +3,8 @@ import { join, resolve } from 'node:path';
3
3
  import { homedir } from 'node:os';
4
4
  import { spawnSync } from 'node:child_process';
5
5
  import chalk from 'chalk';
6
- import { p as projectPath } from './types-B3Dnzv_q.mjs';
7
- import { t as tmuxSupportsSessionEnv } from './index-CF3rNFlZ.mjs';
6
+ import { p as projectPath } from './types-D9LyZitb.mjs';
7
+ import { t as tmuxSupportsSessionEnv } from './index--TiLl7-A.mjs';
8
8
  import 'axios';
9
9
  import 'node:util';
10
10
  import 'node:fs/promises';
package/dist/lib.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var persistence = require('./types-7-mfp-j5.cjs');
3
+ var persistence = require('./types-14LATr9X.cjs');
4
4
  require('axios');
5
5
  require('chalk');
6
6
  require('node:util');
package/dist/lib.d.cts CHANGED
@@ -371,6 +371,10 @@ declare const DaemonStateSchema: z$1.ZodObject<{
371
371
  detectedAt: z$1.ZodNumber;
372
372
  killAttached: z$1.ZodOptional<z$1.ZodBoolean>;
373
373
  }, z$1.core.$strip>>;
374
+ claudeHistory: z$1.ZodOptional<z$1.ZodObject<{
375
+ rpcAvailable: z$1.ZodBoolean;
376
+ detectedAt: z$1.ZodNumber;
377
+ }, z$1.core.$strip>>;
374
378
  cliUpdate: z$1.ZodOptional<z$1.ZodObject<{
375
379
  currentVersion: z$1.ZodString;
376
380
  recommendedVersion: z$1.ZodNullable<z$1.ZodString>;
@@ -555,6 +559,13 @@ type Metadata = {
555
559
  /** Lineage for sessions created via the fork / duplicate flow. */
556
560
  parentSessionId?: string;
557
561
  forkedFromMessageId?: string;
562
+ /**
563
+ * B-290: the Claude conversation this session was imported from (the
564
+ * on-disk transcript written by claude CLI / desktop / claude.ai that was
565
+ * copied by `claude-fork-session`). Lets the import picker hide originals
566
+ * that already have a copy here. Absent on every other session.
567
+ */
568
+ importedFromClaudeSessionId?: string;
558
569
  /**
559
570
  * B-051: session variant. 'assistant' marks the machine's meta-agent
560
571
  * (dispatcher / voice assistant) session — fixed cwd ~/.happy/assistant,
@@ -984,6 +995,12 @@ interface SpawnSessionOptions {
984
995
  parentSessionId?: string;
985
996
  /** Happy message id used as the rewind point (only set for "duplicate"). */
986
997
  forkedFromMessageId?: string;
998
+ /**
999
+ * B-290: source Claude conversation id of an imported transcript (the
1000
+ * original that `resumeClaudeSessionId` is a copy of). Recorded in session
1001
+ * metadata so the import picker hides it. Old daemons ignore the field.
1002
+ */
1003
+ importedFromClaudeSessionId?: string;
987
1004
  /**
988
1005
  * B-051: spawn the machine's assistant (meta-agent) session. The daemon
989
1006
  * forces cwd to ~/.happy/assistant (the passed `directory` is ignored),
package/dist/lib.d.mts CHANGED
@@ -371,6 +371,10 @@ declare const DaemonStateSchema: z$1.ZodObject<{
371
371
  detectedAt: z$1.ZodNumber;
372
372
  killAttached: z$1.ZodOptional<z$1.ZodBoolean>;
373
373
  }, z$1.core.$strip>>;
374
+ claudeHistory: z$1.ZodOptional<z$1.ZodObject<{
375
+ rpcAvailable: z$1.ZodBoolean;
376
+ detectedAt: z$1.ZodNumber;
377
+ }, z$1.core.$strip>>;
374
378
  cliUpdate: z$1.ZodOptional<z$1.ZodObject<{
375
379
  currentVersion: z$1.ZodString;
376
380
  recommendedVersion: z$1.ZodNullable<z$1.ZodString>;
@@ -555,6 +559,13 @@ type Metadata = {
555
559
  /** Lineage for sessions created via the fork / duplicate flow. */
556
560
  parentSessionId?: string;
557
561
  forkedFromMessageId?: string;
562
+ /**
563
+ * B-290: the Claude conversation this session was imported from (the
564
+ * on-disk transcript written by claude CLI / desktop / claude.ai that was
565
+ * copied by `claude-fork-session`). Lets the import picker hide originals
566
+ * that already have a copy here. Absent on every other session.
567
+ */
568
+ importedFromClaudeSessionId?: string;
558
569
  /**
559
570
  * B-051: session variant. 'assistant' marks the machine's meta-agent
560
571
  * (dispatcher / voice assistant) session — fixed cwd ~/.happy/assistant,
@@ -984,6 +995,12 @@ interface SpawnSessionOptions {
984
995
  parentSessionId?: string;
985
996
  /** Happy message id used as the rewind point (only set for "duplicate"). */
986
997
  forkedFromMessageId?: string;
998
+ /**
999
+ * B-290: source Claude conversation id of an imported transcript (the
1000
+ * original that `resumeClaudeSessionId` is a copy of). Recorded in session
1001
+ * metadata so the import picker hides it. Old daemons ignore the field.
1002
+ */
1003
+ importedFromClaudeSessionId?: string;
987
1004
  /**
988
1005
  * B-051: spawn the machine's assistant (meta-agent) session. The daemon
989
1006
  * forces cwd to ~/.happy/assistant (the passed `directory` is ignored),
package/dist/lib.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { A as ApiClient, a as ApiSessionClient, R as RawJSONLinesSchema, c as configuration, l as logger } from './types-B3Dnzv_q.mjs';
1
+ export { A as ApiClient, a as ApiSessionClient, R as RawJSONLinesSchema, c as configuration, l as logger } from './types-D9LyZitb.mjs';
2
2
  import 'axios';
3
3
  import 'chalk';
4
4
  import 'node:util';