very-happy-cli 0.2.105 → 0.2.107

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-CbMPn2Sx.cjs → AcpBackend-B3WfHjyi.cjs} +1 -1
  2. package/dist/{AcpBackend-zefm5lwc.mjs → AcpBackend-leZGKCNL.mjs} +1 -1
  3. package/dist/{AcpSessionManager-DFeZAfz4.mjs → AcpSessionManager-CI_-4TvB.mjs} +1 -1
  4. package/dist/{AcpSessionManager-lM9HBlOx.cjs → AcpSessionManager-Cza1nTaQ.cjs} +1 -1
  5. package/dist/{config-CYpWD6Tc.cjs → config-CpVncJmR.cjs} +2 -2
  6. package/dist/{config-CRCUgh2E.mjs → config-TEae6YCF.mjs} +2 -2
  7. package/dist/{index-Cietz-nU.cjs → index-CF9-9B70.cjs} +84 -20
  8. package/dist/{index-NiUS5t0N.mjs → index-CIfhQ_X6.mjs} +80 -16
  9. package/dist/{index-_t9O9dGp.mjs → index-D9H-dsUT.mjs} +5 -5
  10. package/dist/{index-neppKLsI.mjs → index-Dg78JF0h.mjs} +2 -2
  11. package/dist/{index-Bmv3lZU7.cjs → index-RyvQwH4I.cjs} +2 -2
  12. package/dist/{index-m9BL5ZWn.cjs → index-b_E_olpx.cjs} +4 -4
  13. package/dist/index.cjs +2 -2
  14. package/dist/index.mjs +2 -2
  15. package/dist/{installTerminalHooks-BMDcB8nc.cjs → installTerminalHooks-DMSUDPG3.cjs} +2 -2
  16. package/dist/{installTerminalHooks-Czv6GUOw.mjs → installTerminalHooks-tPNg8EgD.mjs} +2 -2
  17. package/dist/lib.cjs +1 -1
  18. package/dist/lib.d.cts +6 -1
  19. package/dist/lib.d.mts +6 -1
  20. package/dist/lib.mjs +1 -1
  21. package/dist/{mcp-Cn4icOYK.cjs → mcp-B13ZiAxa.cjs} +2 -2
  22. package/dist/{mcp-Bt4btDMD.mjs → mcp-DUXABUpc.mjs} +2 -2
  23. package/dist/{runGemini-5Rgckz_I.cjs → runGemini-Dvf_ajZd.cjs} +4 -4
  24. package/dist/{runGemini-wMF-U7zR.mjs → runGemini-aCMjZ4lm.mjs} +4 -4
  25. package/dist/{runOpenClaw-Za9vMsSB.mjs → runOpenClaw-BLdlHdZa.mjs} +3 -3
  26. package/dist/{runOpenClaw-DnbKLi5s.cjs → runOpenClaw-D9v6E9th.cjs} +3 -3
  27. package/dist/{send-DliNFuy7.mjs → send-DAnYf1wR.mjs} +2 -2
  28. package/dist/{send-v6085rvq.cjs → send-DUoz9am9.cjs} +2 -2
  29. package/dist/{spawn-DUU9rhJa.cjs → spawn-4FlGcOQK.cjs} +2 -2
  30. package/dist/{spawn-D3D-H-VF.mjs → spawn-Gr4_bY2m.mjs} +2 -2
  31. package/dist/{types-Cq7yzNWv.cjs → types-4iIbK7lA.cjs} +19 -11
  32. package/dist/{types-CFIlcwe9.mjs → types-DOJq8cyH.mjs} +18 -10
  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-Cq7yzNWv.cjs');
6
+ var persistence = require('./types-4iIbK7lA.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-CFIlcwe9.mjs';
4
+ import { l as logger, d as contentLogMetadata, e as errorLogMetadata, f as packageJson, g as delay } from './types-DOJq8cyH.mjs';
5
5
 
6
6
  const DEFAULT_TIMEOUTS = {
7
7
  /** Default initialization timeout: 60 seconds */
@@ -1,5 +1,5 @@
1
1
  import { createId } from '@paralleldrive/cuid2';
2
- import { b as createEnvelope } from './types-CFIlcwe9.mjs';
2
+ import { b as createEnvelope } from './types-DOJq8cyH.mjs';
3
3
 
4
4
  function turnOptions(turnId, time) {
5
5
  return turnId ? { turn: turnId, time } : { time };
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var cuid2 = require('@paralleldrive/cuid2');
4
- var persistence = require('./types-Cq7yzNWv.cjs');
4
+ var persistence = require('./types-4iIbK7lA.cjs');
5
5
 
6
6
  function turnOptions(turnId, time) {
7
7
  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-Cq7yzNWv.cjs');
8
- var index = require('./index-Cietz-nU.cjs');
7
+ var persistence = require('./types-4iIbK7lA.cjs');
8
+ var index = require('./index-CF9-9B70.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-CFIlcwe9.mjs';
6
- import { D as DEFAULT_GEMINI_MODEL, G as GEMINI_MODEL_ENV } from './index-NiUS5t0N.mjs';
5
+ import { l as logger } from './types-DOJq8cyH.mjs';
6
+ import { D as DEFAULT_GEMINI_MODEL, G as GEMINI_MODEL_ENV } from './index-CIfhQ_X6.mjs';
7
7
  import 'axios';
8
8
  import 'chalk';
9
9
  import 'node:util';
@@ -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-Cq7yzNWv.cjs');
6
+ var persistence = require('./types-4iIbK7lA.cjs');
7
7
  var spawn = require('cross-spawn');
8
8
  var path = require('node:path');
9
9
  var node_readline = require('node:readline');
@@ -6850,6 +6850,29 @@ async function handleResumeCommand(args) {
6850
6850
  }
6851
6851
  }
6852
6852
 
6853
+ function str(value) {
6854
+ return typeof value === "string" && value.length > 0 ? value : void 0;
6855
+ }
6856
+ function bareHost(host) {
6857
+ return host.endsWith("-dev") ? host.slice(0, -"-dev".length) : host;
6858
+ }
6859
+ function detectMachineIdentityConflict(recorded, current) {
6860
+ if (!recorded) return null;
6861
+ const recordedFacts = { host: str(recorded.host), platform: str(recorded.platform), homeDir: str(recorded.homeDir) };
6862
+ const fields = [];
6863
+ if (recordedFacts.host && bareHost(recordedFacts.host) !== bareHost(current.host)) fields.push("host");
6864
+ if (recordedFacts.platform && recordedFacts.platform !== current.platform) fields.push("platform");
6865
+ if (recordedFacts.homeDir && recordedFacts.homeDir !== current.homeDir) fields.push("homeDir");
6866
+ if (fields.length === 0) return null;
6867
+ const strong = fields.some((field) => field !== "host");
6868
+ return { confidence: strong ? "strong" : "weak", fields, recorded: recordedFacts, current };
6869
+ }
6870
+ function describeMachineIdentityConflict(conflict) {
6871
+ const diffs = conflict.fields.map((field) => `${field}: recorded=${conflict.recorded[field] ?? "?"} current=${conflict.current[field]}`).join(", ");
6872
+ const cause = conflict.confidence === "strong" ? "This machine id is registered to a different machine \u2014 ~/.happy was almost certainly copied here." : "This machine id is registered under a different hostname. If you renamed this host, ignore this; otherwise ~/.happy was copied here.";
6873
+ return `${cause} Two daemons sharing one machine id fight over the same machine row, and a copied ~/.claude/.credentials.json makes them invalidate each other's Claude login. Fix: run 'very-happy auth login --force' on this machine (it mints a fresh machine id), then log in to Claude here separately with 'claude'. (${diffs})`;
6874
+ }
6875
+
6853
6876
  const CLAUDE_KEYCHAIN_SERVICE_PREFIX = "Claude Code";
6854
6877
  function keychainIdentity(env = process.env, deps = {}) {
6855
6878
  const home = deps.home ?? os.homedir();
@@ -6913,7 +6936,7 @@ function parseJsonObject(text) {
6913
6936
  return null;
6914
6937
  }
6915
6938
  }
6916
- 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-Cietz-nU.cjs', document.baseURI).href))).resolve(s)) {
6939
+ 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-CF9-9B70.cjs', document.baseURI).href))).resolve(s)) {
6917
6940
  const platformArch = `${platform}-${arch}`;
6918
6941
  const candidates = [
6919
6942
  `@anthropic-ai/claude-agent-sdk-${platformArch}/claude`,
@@ -6956,6 +6979,7 @@ function interpretCredentialsFile(text) {
6956
6979
  function tokenTail(token) {
6957
6980
  return token ? node_crypto.createHash("sha256").update(token).digest("hex").slice(-6) : "";
6958
6981
  }
6982
+ const CREDENTIALS_REJECTED_DETAIL = "Credentials exist but Claude Code rejects them in the daemon context \u2014 the refresh token has most likely been rotated away by another store or another machine using the same credentials. Log in again with `claude` on this machine.";
6959
6983
  function diagnoseStores(input) {
6960
6984
  const { status, keychain, file } = input;
6961
6985
  if (keychain.kind === "present") {
@@ -6980,7 +7004,7 @@ function diagnoseStores(input) {
6980
7004
  return { diagnosis: "no-credentials", detail: "No Claude Code credentials found for this daemon context; log in with `claude` on this machine." };
6981
7005
  }
6982
7006
  if (keychain.kind === "unreadable" && file.hasTokens && status === "not-logged-in") {
6983
- return { detail: "The daemon context cannot read the keychain and the file credentials were not accepted; compare `claude auth status` on the machine." };
7007
+ return { diagnosis: "credentials-rejected", detail: CREDENTIALS_REJECTED_DETAIL };
6984
7008
  }
6985
7009
  if (keychain.kind === "error") {
6986
7010
  return { detail: `keychain check failed: ${keychain.detail}` };
@@ -7152,9 +7176,16 @@ class ClaudeAuthService {
7152
7176
  if (this.platform === "darwin" && store !== "file" && (classification.status === "not-logged-in" || withDiagnosis && classification.status !== "unknown")) {
7153
7177
  diagnosis = await this.diagnose(classification.status);
7154
7178
  this.lastDiagnosis = diagnosis;
7155
- } else if (classification.status === "not-logged-in" && store === "file") {
7179
+ } else if (classification.status === "not-logged-in") {
7156
7180
  const file = interpretCredentialsFile(this.readCredentialsFile());
7157
- if (!file.hasTokens) diagnosis = { diagnosis: "no-credentials", detail: "credentialStore=file and ~/.claude/.credentials.json has no tokens; log in with `claude` from a terminal on this machine." };
7181
+ if (!file.hasTokens) {
7182
+ diagnosis = {
7183
+ diagnosis: "no-credentials",
7184
+ detail: store === "file" ? "credentialStore=file and ~/.claude/.credentials.json has no tokens; log in with `claude` from a terminal on this machine." : "No Claude Code credentials found for this daemon context; log in with `claude` on this machine."
7185
+ };
7186
+ } else {
7187
+ diagnosis = { diagnosis: "credentials-rejected", detail: CREDENTIALS_REJECTED_DETAIL };
7188
+ }
7158
7189
  }
7159
7190
  if (storeRequested === "file" && store === "auto") {
7160
7191
  diagnosis = { ...diagnosis ?? {}, detail: `credentialStore=file requested but the keychain-off shim is missing under ${keychainOffShimDir(this.opts.happyLibDir)}; running in auto mode.` };
@@ -7993,6 +8024,12 @@ async function claimSessionOrExit(happySessionId, options) {
7993
8024
  }
7994
8025
 
7995
8026
  const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
8027
+ function sanitizeImportTitle(value) {
8028
+ if (typeof value !== "string") return null;
8029
+ const collapsed = value.replace(/[\u0000-\u001f\u007f]/g, " ").replace(/\s+/g, " ").trim();
8030
+ if (collapsed.length === 0) return null;
8031
+ return collapsed.length > 200 ? `${collapsed.slice(0, 199)}\u2026` : collapsed;
8032
+ }
7996
8033
  const hostSuffix = process.env.HAPPY_VARIANT === "dev" ? "-dev" : "";
7997
8034
  const initialMachineMetadata = {
7998
8035
  host: os$1.hostname() + hostSuffix,
@@ -8250,6 +8287,9 @@ async function startDaemon() {
8250
8287
  cwd: assistantHome(),
8251
8288
  env: {
8252
8289
  ...process.env,
8290
+ // B-297: see the resume/restart paths — every spawn carries the
8291
+ // credentialStore=file shim, not just fresh sessions (B-276 D8).
8292
+ ...claudeAuthServiceRef?.claudeProcessEnvOverrides() ?? {},
8253
8293
  HAPPY_SESSION_VARIANT: "assistant",
8254
8294
  HAPPY_RECONNECT_SESSION_ID: assistantSessionId,
8255
8295
  HAPPY_RECONNECT_ENCRYPTION_KEY: s.encryptionKey,
@@ -8331,6 +8371,10 @@ async function startDaemon() {
8331
8371
  if (options.importedFromClaudeSessionId && UUID_RE.test(options.importedFromClaudeSessionId)) {
8332
8372
  extraEnv.HAPPY_IMPORTED_FROM_CLAUDE_SESSION_ID = options.importedFromClaudeSessionId;
8333
8373
  }
8374
+ const importTitle = sanitizeImportTitle(options.importTitle);
8375
+ if (importTitle) {
8376
+ extraEnv.HAPPY_IMPORT_TITLE = importTitle;
8377
+ }
8334
8378
  if (options.resumeCodexThreadId) {
8335
8379
  extraEnv.HAPPY_FORK_CODEX_THREAD_ID = options.resumeCodexThreadId;
8336
8380
  }
@@ -8696,6 +8740,11 @@ async function startDaemon() {
8696
8740
  cwd: launch.cwd,
8697
8741
  env: {
8698
8742
  ...process.env,
8743
+ // B-297: the credentialStore=file shim must ride every spawn path,
8744
+ // not just fresh sessions — a resumed/restarted wrapper that silently
8745
+ // fell back to `auto` reads a different credential store than the
8746
+ // fresh one next to it (B-276 D8).
8747
+ ...claudeAuthServiceRef?.claudeProcessEnvOverrides() ?? {},
8699
8748
  HAPPY_RECONNECT_SESSION_ID: happySessionId,
8700
8749
  HAPPY_RECONNECT_ENCRYPTION_KEY: persistence.encodeBase64(tracked.encryption.encryptionKey),
8701
8750
  HAPPY_RECONNECT_ENCRYPTION_VARIANT: tracked.encryption.encryptionVariant,
@@ -8822,6 +8871,11 @@ async function startDaemon() {
8822
8871
  cwd,
8823
8872
  env: {
8824
8873
  ...process.env,
8874
+ // B-297: the credentialStore=file shim must ride every spawn path,
8875
+ // not just fresh sessions — a resumed/restarted wrapper that silently
8876
+ // fell back to `auto` reads a different credential store than the
8877
+ // fresh one next to it (B-276 D8).
8878
+ ...claudeAuthServiceRef?.claudeProcessEnvOverrides() ?? {},
8825
8879
  HAPPY_RECONNECT_SESSION_ID: happySessionId,
8826
8880
  HAPPY_RECONNECT_ENCRYPTION_KEY: persistence.encodeBase64(tracked.encryption.encryptionKey),
8827
8881
  HAPPY_RECONNECT_ENCRYPTION_VARIANT: tracked.encryption.encryptionVariant,
@@ -8991,6 +9045,14 @@ async function startDaemon() {
8991
9045
  daemonState: initialDaemonState
8992
9046
  });
8993
9047
  persistence.logger.debug(`[DAEMON RUN] Machine registered: ${machine.id}`);
9048
+ const identityConflict = detectMachineIdentityConflict(machine.metadata, {
9049
+ host: initialMachineMetadata.host,
9050
+ platform: initialMachineMetadata.platform,
9051
+ homeDir: initialMachineMetadata.homeDir
9052
+ });
9053
+ if (identityConflict) {
9054
+ persistence.logger.warn(`[DAEMON RUN] machine identity conflict (${identityConflict.confidence}): ${describeMachineIdentityConflict(identityConflict)}`);
9055
+ }
8994
9056
  const apiMachine = api.machineSyncClient(machine);
8995
9057
  apiMachineRef = apiMachine;
8996
9058
  const mirrorManager = createMirrorManager({
@@ -10192,7 +10254,7 @@ function registerSideQuestionHandler(rpc, deps) {
10192
10254
  const retainMs = deps.retainMs ?? SIDE_QUESTION_RETAIN_MS;
10193
10255
  const maxRunMs = deps.maxRunMs ?? SIDE_QUESTION_MAX_RUN_MS;
10194
10256
  const run = deps.run ?? (async (input) => {
10195
- const { query } = await Promise.resolve().then(function () { return require('./index-Bmv3lZU7.cjs'); });
10257
+ const { query } = await Promise.resolve().then(function () { return require('./index-RyvQwH4I.cjs'); });
10196
10258
  return runSideQuestion(query, input);
10197
10259
  });
10198
10260
  const slots = /* @__PURE__ */ new Map();
@@ -10294,7 +10356,7 @@ const MAX_TITLE_CHARS = 60;
10294
10356
  const GENERATION_TIMEOUT_MS = 3e4;
10295
10357
  function resolveClaudeBinary() {
10296
10358
  try {
10297
- 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-Cietz-nU.cjs', document.baseURI).href)));
10359
+ 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-CF9-9B70.cjs', document.baseURI).href)));
10298
10360
  const utilsPath = path.resolve(path.join(persistence.projectPath(), "scripts", "claude_version_utils.cjs"));
10299
10361
  const { getClaudeCliPath } = require$1(utilsPath);
10300
10362
  const path$1 = getClaudeCliPath();
@@ -10731,6 +10793,7 @@ async function runClaude(credentials, options = {}) {
10731
10793
  const forkedFromSessionId = process.env.HAPPY_FORKED_FROM_SESSION_ID;
10732
10794
  const forkedFromMessageId = process.env.HAPPY_FORKED_FROM_MESSAGE_ID;
10733
10795
  const importedFromClaudeSessionId = process.env.HAPPY_IMPORTED_FROM_CLAUDE_SESSION_ID;
10796
+ const importTitle = process.env.HAPPY_IMPORT_TITLE;
10734
10797
  let metadata = {
10735
10798
  path: workingDirectory,
10736
10799
  host: os.hostname(),
@@ -10761,6 +10824,7 @@ async function runClaude(credentials, options = {}) {
10761
10824
  ...forkedFromSessionId ? { parentSessionId: forkedFromSessionId } : {},
10762
10825
  ...forkedFromMessageId ? { forkedFromMessageId } : {},
10763
10826
  ...importedFromClaudeSessionId ? { importedFromClaudeSessionId } : {},
10827
+ ...importTitle ? { summary: { text: importTitle, updatedAt: Date.now() } } : {},
10764
10828
  ...isAssistantVariant ? { variant: "assistant" } : {},
10765
10829
  // B-091: sessions the assistant dispatched (daemon spawn RPC exports
10766
10830
  // HAPPY_SPAWNED_BY, B-069) are born with the 'assistant' tag so every
@@ -12492,9 +12556,9 @@ function resolveLocalSignupBootstrap(configuredMode, configuredInviteCodes, gene
12492
12556
  };
12493
12557
  }
12494
12558
 
12495
- 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-Cietz-nU.cjs', document.baseURI).href)));
12559
+ 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-CF9-9B70.cjs', document.baseURI).href)));
12496
12560
  const __dirname$1 = path.dirname(__filename$1);
12497
- const require_ = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-Cietz-nU.cjs', document.baseURI).href)));
12561
+ const require_ = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-CF9-9B70.cjs', document.baseURI).href)));
12498
12562
  const PRISMA_QUERY_ENGINE_FILES = {
12499
12563
  "arm64-darwin": "libquery_engine-darwin-arm64.dylib.node",
12500
12564
  "x64-darwin": "libquery_engine-darwin.dylib.node",
@@ -15118,7 +15182,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15118
15182
  process.exit(0);
15119
15183
  } else if (subcommand === "install-terminal-hooks") {
15120
15184
  try {
15121
- const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await Promise.resolve().then(function () { return require('./installTerminalHooks-BMDcB8nc.cjs'); });
15185
+ const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await Promise.resolve().then(function () { return require('./installTerminalHooks-DMSUDPG3.cjs'); });
15122
15186
  const command = parseTerminalHooksArgs(args.slice(1));
15123
15187
  if (command.action === "help") {
15124
15188
  console.log(TERMINAL_HOOKS_HELP);
@@ -15135,7 +15199,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15135
15199
  }
15136
15200
  } else if (subcommand === "spawn") {
15137
15201
  try {
15138
- const { handleSpawnCommand } = await Promise.resolve().then(function () { return require('./spawn-DUU9rhJa.cjs'); });
15202
+ const { handleSpawnCommand } = await Promise.resolve().then(function () { return require('./spawn-4FlGcOQK.cjs'); });
15139
15203
  await handleSpawnCommand(args.slice(1));
15140
15204
  } catch (error) {
15141
15205
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -15147,7 +15211,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15147
15211
  return;
15148
15212
  } else if (subcommand === "send") {
15149
15213
  try {
15150
- const { handleSendCommand } = await Promise.resolve().then(function () { return require('./send-v6085rvq.cjs'); });
15214
+ const { handleSendCommand } = await Promise.resolve().then(function () { return require('./send-DUoz9am9.cjs'); });
15151
15215
  await handleSendCommand(args.slice(1));
15152
15216
  } catch (error) {
15153
15217
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -15253,9 +15317,9 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15253
15317
  if (geminiSubcommand === "project" && args[2] === "set" && args[3]) {
15254
15318
  const projectId = args[3];
15255
15319
  try {
15256
- const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return require('./config-CYpWD6Tc.cjs'); });
15257
- const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await Promise.resolve().then(function () { return require('./types-Cq7yzNWv.cjs'); }).then(function (n) { return n.persistence; });
15258
- const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./types-Cq7yzNWv.cjs'); }).then(function (n) { return n.api; });
15320
+ const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return require('./config-CpVncJmR.cjs'); });
15321
+ const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await Promise.resolve().then(function () { return require('./types-4iIbK7lA.cjs'); }).then(function (n) { return n.persistence; });
15322
+ const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./types-4iIbK7lA.cjs'); }).then(function (n) { return n.api; });
15259
15323
  let userEmail = void 0;
15260
15324
  try {
15261
15325
  const credentials = await readCredentialsForConfiguredRelay2();
@@ -15286,7 +15350,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15286
15350
  }
15287
15351
  if (geminiSubcommand === "project" && args[2] === "get") {
15288
15352
  try {
15289
- const { readGeminiLocalConfig } = await Promise.resolve().then(function () { return require('./config-CYpWD6Tc.cjs'); });
15353
+ const { readGeminiLocalConfig } = await Promise.resolve().then(function () { return require('./config-CpVncJmR.cjs'); });
15290
15354
  const config = readGeminiLocalConfig();
15291
15355
  if (config.googleCloudProject) {
15292
15356
  console.log(`Current Google Cloud Project: ${config.googleCloudProject}`);
@@ -15326,7 +15390,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15326
15390
  process.exit(0);
15327
15391
  }
15328
15392
  try {
15329
- const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-5Rgckz_I.cjs'); });
15393
+ const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-Dvf_ajZd.cjs'); });
15330
15394
  let startedBy = void 0;
15331
15395
  for (let i = 1; i < args.length; i++) {
15332
15396
  if (args[i] === "--started-by") {
@@ -15348,7 +15412,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15348
15412
  return;
15349
15413
  } else if (subcommand === "acp") {
15350
15414
  try {
15351
- const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-m9BL5ZWn.cjs'); });
15415
+ const { runAcp, resolveAcpAgentConfig } = await Promise.resolve().then(function () { return require('./index-b_E_olpx.cjs'); });
15352
15416
  let startedBy = void 0;
15353
15417
  let verbose = false;
15354
15418
  const acpArgs = [];
@@ -15388,7 +15452,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15388
15452
  return;
15389
15453
  } else if (subcommand === "openclaw") {
15390
15454
  try {
15391
- const { runOpenClaw } = await Promise.resolve().then(function () { return require('./runOpenClaw-DnbKLi5s.cjs'); });
15455
+ const { runOpenClaw } = await Promise.resolve().then(function () { return require('./runOpenClaw-D9v6E9th.cjs'); });
15392
15456
  let startedBy = void 0;
15393
15457
  let verbose = false;
15394
15458
  let gatewayUrl;
@@ -15439,7 +15503,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15439
15503
  return;
15440
15504
  } else if (subcommand === "mcp" && args.length === 1) {
15441
15505
  try {
15442
- const { handleMcpCommand } = await Promise.resolve().then(function () { return require('./mcp-Cn4icOYK.cjs'); });
15506
+ const { handleMcpCommand } = await Promise.resolve().then(function () { return require('./mcp-B13ZiAxa.cjs'); });
15443
15507
  await handleMcpCommand();
15444
15508
  } catch (error) {
15445
15509
  process.stderr.write(`[very-happy mcp] Fatal: ${error instanceof Error ? error.message : String(error)}
@@ -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, 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-CFIlcwe9.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-DOJq8cyH.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';
@@ -6828,6 +6828,29 @@ async function handleResumeCommand(args) {
6828
6828
  }
6829
6829
  }
6830
6830
 
6831
+ function str(value) {
6832
+ return typeof value === "string" && value.length > 0 ? value : void 0;
6833
+ }
6834
+ function bareHost(host) {
6835
+ return host.endsWith("-dev") ? host.slice(0, -"-dev".length) : host;
6836
+ }
6837
+ function detectMachineIdentityConflict(recorded, current) {
6838
+ if (!recorded) return null;
6839
+ const recordedFacts = { host: str(recorded.host), platform: str(recorded.platform), homeDir: str(recorded.homeDir) };
6840
+ const fields = [];
6841
+ if (recordedFacts.host && bareHost(recordedFacts.host) !== bareHost(current.host)) fields.push("host");
6842
+ if (recordedFacts.platform && recordedFacts.platform !== current.platform) fields.push("platform");
6843
+ if (recordedFacts.homeDir && recordedFacts.homeDir !== current.homeDir) fields.push("homeDir");
6844
+ if (fields.length === 0) return null;
6845
+ const strong = fields.some((field) => field !== "host");
6846
+ return { confidence: strong ? "strong" : "weak", fields, recorded: recordedFacts, current };
6847
+ }
6848
+ function describeMachineIdentityConflict(conflict) {
6849
+ const diffs = conflict.fields.map((field) => `${field}: recorded=${conflict.recorded[field] ?? "?"} current=${conflict.current[field]}`).join(", ");
6850
+ const cause = conflict.confidence === "strong" ? "This machine id is registered to a different machine \u2014 ~/.happy was almost certainly copied here." : "This machine id is registered under a different hostname. If you renamed this host, ignore this; otherwise ~/.happy was copied here.";
6851
+ return `${cause} Two daemons sharing one machine id fight over the same machine row, and a copied ~/.claude/.credentials.json makes them invalidate each other's Claude login. Fix: run 'very-happy auth login --force' on this machine (it mints a fresh machine id), then log in to Claude here separately with 'claude'. (${diffs})`;
6852
+ }
6853
+
6831
6854
  const CLAUDE_KEYCHAIN_SERVICE_PREFIX = "Claude Code";
6832
6855
  function keychainIdentity(env = process.env, deps = {}) {
6833
6856
  const home = deps.home ?? homedir();
@@ -6934,6 +6957,7 @@ function interpretCredentialsFile(text) {
6934
6957
  function tokenTail(token) {
6935
6958
  return token ? createHash$1("sha256").update(token).digest("hex").slice(-6) : "";
6936
6959
  }
6960
+ const CREDENTIALS_REJECTED_DETAIL = "Credentials exist but Claude Code rejects them in the daemon context \u2014 the refresh token has most likely been rotated away by another store or another machine using the same credentials. Log in again with `claude` on this machine.";
6937
6961
  function diagnoseStores(input) {
6938
6962
  const { status, keychain, file } = input;
6939
6963
  if (keychain.kind === "present") {
@@ -6958,7 +6982,7 @@ function diagnoseStores(input) {
6958
6982
  return { diagnosis: "no-credentials", detail: "No Claude Code credentials found for this daemon context; log in with `claude` on this machine." };
6959
6983
  }
6960
6984
  if (keychain.kind === "unreadable" && file.hasTokens && status === "not-logged-in") {
6961
- return { detail: "The daemon context cannot read the keychain and the file credentials were not accepted; compare `claude auth status` on the machine." };
6985
+ return { diagnosis: "credentials-rejected", detail: CREDENTIALS_REJECTED_DETAIL };
6962
6986
  }
6963
6987
  if (keychain.kind === "error") {
6964
6988
  return { detail: `keychain check failed: ${keychain.detail}` };
@@ -7130,9 +7154,16 @@ class ClaudeAuthService {
7130
7154
  if (this.platform === "darwin" && store !== "file" && (classification.status === "not-logged-in" || withDiagnosis && classification.status !== "unknown")) {
7131
7155
  diagnosis = await this.diagnose(classification.status);
7132
7156
  this.lastDiagnosis = diagnosis;
7133
- } else if (classification.status === "not-logged-in" && store === "file") {
7157
+ } else if (classification.status === "not-logged-in") {
7134
7158
  const file = interpretCredentialsFile(this.readCredentialsFile());
7135
- if (!file.hasTokens) diagnosis = { diagnosis: "no-credentials", detail: "credentialStore=file and ~/.claude/.credentials.json has no tokens; log in with `claude` from a terminal on this machine." };
7159
+ if (!file.hasTokens) {
7160
+ diagnosis = {
7161
+ diagnosis: "no-credentials",
7162
+ detail: store === "file" ? "credentialStore=file and ~/.claude/.credentials.json has no tokens; log in with `claude` from a terminal on this machine." : "No Claude Code credentials found for this daemon context; log in with `claude` on this machine."
7163
+ };
7164
+ } else {
7165
+ diagnosis = { diagnosis: "credentials-rejected", detail: CREDENTIALS_REJECTED_DETAIL };
7166
+ }
7136
7167
  }
7137
7168
  if (storeRequested === "file" && store === "auto") {
7138
7169
  diagnosis = { ...diagnosis ?? {}, detail: `credentialStore=file requested but the keychain-off shim is missing under ${keychainOffShimDir(this.opts.happyLibDir)}; running in auto mode.` };
@@ -7971,6 +8002,12 @@ async function claimSessionOrExit(happySessionId, options) {
7971
8002
  }
7972
8003
 
7973
8004
  const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
8005
+ function sanitizeImportTitle(value) {
8006
+ if (typeof value !== "string") return null;
8007
+ const collapsed = value.replace(/[\u0000-\u001f\u007f]/g, " ").replace(/\s+/g, " ").trim();
8008
+ if (collapsed.length === 0) return null;
8009
+ return collapsed.length > 200 ? `${collapsed.slice(0, 199)}\u2026` : collapsed;
8010
+ }
7974
8011
  const hostSuffix = process.env.HAPPY_VARIANT === "dev" ? "-dev" : "";
7975
8012
  const initialMachineMetadata = {
7976
8013
  host: os$1.hostname() + hostSuffix,
@@ -8228,6 +8265,9 @@ async function startDaemon() {
8228
8265
  cwd: assistantHome(),
8229
8266
  env: {
8230
8267
  ...process.env,
8268
+ // B-297: see the resume/restart paths — every spawn carries the
8269
+ // credentialStore=file shim, not just fresh sessions (B-276 D8).
8270
+ ...claudeAuthServiceRef?.claudeProcessEnvOverrides() ?? {},
8231
8271
  HAPPY_SESSION_VARIANT: "assistant",
8232
8272
  HAPPY_RECONNECT_SESSION_ID: assistantSessionId,
8233
8273
  HAPPY_RECONNECT_ENCRYPTION_KEY: s.encryptionKey,
@@ -8309,6 +8349,10 @@ async function startDaemon() {
8309
8349
  if (options.importedFromClaudeSessionId && UUID_RE.test(options.importedFromClaudeSessionId)) {
8310
8350
  extraEnv.HAPPY_IMPORTED_FROM_CLAUDE_SESSION_ID = options.importedFromClaudeSessionId;
8311
8351
  }
8352
+ const importTitle = sanitizeImportTitle(options.importTitle);
8353
+ if (importTitle) {
8354
+ extraEnv.HAPPY_IMPORT_TITLE = importTitle;
8355
+ }
8312
8356
  if (options.resumeCodexThreadId) {
8313
8357
  extraEnv.HAPPY_FORK_CODEX_THREAD_ID = options.resumeCodexThreadId;
8314
8358
  }
@@ -8674,6 +8718,11 @@ async function startDaemon() {
8674
8718
  cwd: launch.cwd,
8675
8719
  env: {
8676
8720
  ...process.env,
8721
+ // B-297: the credentialStore=file shim must ride every spawn path,
8722
+ // not just fresh sessions — a resumed/restarted wrapper that silently
8723
+ // fell back to `auto` reads a different credential store than the
8724
+ // fresh one next to it (B-276 D8).
8725
+ ...claudeAuthServiceRef?.claudeProcessEnvOverrides() ?? {},
8677
8726
  HAPPY_RECONNECT_SESSION_ID: happySessionId,
8678
8727
  HAPPY_RECONNECT_ENCRYPTION_KEY: encodeBase64(tracked.encryption.encryptionKey),
8679
8728
  HAPPY_RECONNECT_ENCRYPTION_VARIANT: tracked.encryption.encryptionVariant,
@@ -8800,6 +8849,11 @@ async function startDaemon() {
8800
8849
  cwd,
8801
8850
  env: {
8802
8851
  ...process.env,
8852
+ // B-297: the credentialStore=file shim must ride every spawn path,
8853
+ // not just fresh sessions — a resumed/restarted wrapper that silently
8854
+ // fell back to `auto` reads a different credential store than the
8855
+ // fresh one next to it (B-276 D8).
8856
+ ...claudeAuthServiceRef?.claudeProcessEnvOverrides() ?? {},
8803
8857
  HAPPY_RECONNECT_SESSION_ID: happySessionId,
8804
8858
  HAPPY_RECONNECT_ENCRYPTION_KEY: encodeBase64(tracked.encryption.encryptionKey),
8805
8859
  HAPPY_RECONNECT_ENCRYPTION_VARIANT: tracked.encryption.encryptionVariant,
@@ -8969,6 +9023,14 @@ async function startDaemon() {
8969
9023
  daemonState: initialDaemonState
8970
9024
  });
8971
9025
  logger.debug(`[DAEMON RUN] Machine registered: ${machine.id}`);
9026
+ const identityConflict = detectMachineIdentityConflict(machine.metadata, {
9027
+ host: initialMachineMetadata.host,
9028
+ platform: initialMachineMetadata.platform,
9029
+ homeDir: initialMachineMetadata.homeDir
9030
+ });
9031
+ if (identityConflict) {
9032
+ logger.warn(`[DAEMON RUN] machine identity conflict (${identityConflict.confidence}): ${describeMachineIdentityConflict(identityConflict)}`);
9033
+ }
8972
9034
  const apiMachine = api.machineSyncClient(machine);
8973
9035
  apiMachineRef = apiMachine;
8974
9036
  const mirrorManager = createMirrorManager({
@@ -10170,7 +10232,7 @@ function registerSideQuestionHandler(rpc, deps) {
10170
10232
  const retainMs = deps.retainMs ?? SIDE_QUESTION_RETAIN_MS;
10171
10233
  const maxRunMs = deps.maxRunMs ?? SIDE_QUESTION_MAX_RUN_MS;
10172
10234
  const run = deps.run ?? (async (input) => {
10173
- const { query } = await import('./index-neppKLsI.mjs');
10235
+ const { query } = await import('./index-Dg78JF0h.mjs');
10174
10236
  return runSideQuestion(query, input);
10175
10237
  });
10176
10238
  const slots = /* @__PURE__ */ new Map();
@@ -10709,6 +10771,7 @@ async function runClaude(credentials, options = {}) {
10709
10771
  const forkedFromSessionId = process.env.HAPPY_FORKED_FROM_SESSION_ID;
10710
10772
  const forkedFromMessageId = process.env.HAPPY_FORKED_FROM_MESSAGE_ID;
10711
10773
  const importedFromClaudeSessionId = process.env.HAPPY_IMPORTED_FROM_CLAUDE_SESSION_ID;
10774
+ const importTitle = process.env.HAPPY_IMPORT_TITLE;
10712
10775
  let metadata = {
10713
10776
  path: workingDirectory,
10714
10777
  host: os.hostname(),
@@ -10739,6 +10802,7 @@ async function runClaude(credentials, options = {}) {
10739
10802
  ...forkedFromSessionId ? { parentSessionId: forkedFromSessionId } : {},
10740
10803
  ...forkedFromMessageId ? { forkedFromMessageId } : {},
10741
10804
  ...importedFromClaudeSessionId ? { importedFromClaudeSessionId } : {},
10805
+ ...importTitle ? { summary: { text: importTitle, updatedAt: Date.now() } } : {},
10742
10806
  ...isAssistantVariant ? { variant: "assistant" } : {},
10743
10807
  // B-091: sessions the assistant dispatched (daemon spawn RPC exports
10744
10808
  // HAPPY_SPAWNED_BY, B-069) are born with the 'assistant' tag so every
@@ -15096,7 +15160,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15096
15160
  process.exit(0);
15097
15161
  } else if (subcommand === "install-terminal-hooks") {
15098
15162
  try {
15099
- const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await import('./installTerminalHooks-Czv6GUOw.mjs');
15163
+ const { installTerminalHooks, parseTerminalHooksArgs, TERMINAL_HOOKS_HELP } = await import('./installTerminalHooks-tPNg8EgD.mjs');
15100
15164
  const command = parseTerminalHooksArgs(args.slice(1));
15101
15165
  if (command.action === "help") {
15102
15166
  console.log(TERMINAL_HOOKS_HELP);
@@ -15113,7 +15177,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15113
15177
  }
15114
15178
  } else if (subcommand === "spawn") {
15115
15179
  try {
15116
- const { handleSpawnCommand } = await import('./spawn-D3D-H-VF.mjs');
15180
+ const { handleSpawnCommand } = await import('./spawn-Gr4_bY2m.mjs');
15117
15181
  await handleSpawnCommand(args.slice(1));
15118
15182
  } catch (error) {
15119
15183
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -15125,7 +15189,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15125
15189
  return;
15126
15190
  } else if (subcommand === "send") {
15127
15191
  try {
15128
- const { handleSendCommand } = await import('./send-DliNFuy7.mjs');
15192
+ const { handleSendCommand } = await import('./send-DAnYf1wR.mjs');
15129
15193
  await handleSendCommand(args.slice(1));
15130
15194
  } catch (error) {
15131
15195
  console.error(chalk.red("Error:"), error instanceof Error ? error.message : "Unknown error");
@@ -15231,9 +15295,9 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15231
15295
  if (geminiSubcommand === "project" && args[2] === "set" && args[3]) {
15232
15296
  const projectId = args[3];
15233
15297
  try {
15234
- const { saveGoogleCloudProjectToConfig } = await import('./config-CRCUgh2E.mjs');
15235
- const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await import('./types-CFIlcwe9.mjs').then(function (n) { return n.ap; });
15236
- const { ApiClient: ApiClient2 } = await import('./types-CFIlcwe9.mjs').then(function (n) { return n.aq; });
15298
+ const { saveGoogleCloudProjectToConfig } = await import('./config-TEae6YCF.mjs');
15299
+ const { readCredentialsForConfiguredRelay: readCredentialsForConfiguredRelay2 } = await import('./types-DOJq8cyH.mjs').then(function (n) { return n.ap; });
15300
+ const { ApiClient: ApiClient2 } = await import('./types-DOJq8cyH.mjs').then(function (n) { return n.aq; });
15237
15301
  let userEmail = void 0;
15238
15302
  try {
15239
15303
  const credentials = await readCredentialsForConfiguredRelay2();
@@ -15264,7 +15328,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15264
15328
  }
15265
15329
  if (geminiSubcommand === "project" && args[2] === "get") {
15266
15330
  try {
15267
- const { readGeminiLocalConfig } = await import('./config-CRCUgh2E.mjs');
15331
+ const { readGeminiLocalConfig } = await import('./config-TEae6YCF.mjs');
15268
15332
  const config = readGeminiLocalConfig();
15269
15333
  if (config.googleCloudProject) {
15270
15334
  console.log(`Current Google Cloud Project: ${config.googleCloudProject}`);
@@ -15304,7 +15368,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15304
15368
  process.exit(0);
15305
15369
  }
15306
15370
  try {
15307
- const { runGemini } = await import('./runGemini-wMF-U7zR.mjs');
15371
+ const { runGemini } = await import('./runGemini-aCMjZ4lm.mjs');
15308
15372
  let startedBy = void 0;
15309
15373
  for (let i = 1; i < args.length; i++) {
15310
15374
  if (args[i] === "--started-by") {
@@ -15326,7 +15390,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15326
15390
  return;
15327
15391
  } else if (subcommand === "acp") {
15328
15392
  try {
15329
- const { runAcp, resolveAcpAgentConfig } = await import('./index-_t9O9dGp.mjs');
15393
+ const { runAcp, resolveAcpAgentConfig } = await import('./index-D9H-dsUT.mjs');
15330
15394
  let startedBy = void 0;
15331
15395
  let verbose = false;
15332
15396
  const acpArgs = [];
@@ -15366,7 +15430,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15366
15430
  return;
15367
15431
  } else if (subcommand === "openclaw") {
15368
15432
  try {
15369
- const { runOpenClaw } = await import('./runOpenClaw-Za9vMsSB.mjs');
15433
+ const { runOpenClaw } = await import('./runOpenClaw-BLdlHdZa.mjs');
15370
15434
  let startedBy = void 0;
15371
15435
  let verbose = false;
15372
15436
  let gatewayUrl;
@@ -15417,7 +15481,7 @@ Conversation history is preserved on the server, but in-flight tool calls are in
15417
15481
  return;
15418
15482
  } else if (subcommand === "mcp" && args.length === 1) {
15419
15483
  try {
15420
- const { handleMcpCommand } = await import('./mcp-Bt4btDMD.mjs');
15484
+ const { handleMcpCommand } = await import('./mcp-DUXABUpc.mjs');
15421
15485
  await handleMcpCommand();
15422
15486
  } catch (error) {
15423
15487
  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-zefm5lwc.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-zefm5lwc.mjs';
3
- import { h as connectionState, A as ApiClient, i as readSettings, j as encodeBase64, l as logger, p as projectPath } from './types-CFIlcwe9.mjs';
4
- import { A as AcpSessionManager } from './AcpSessionManager-DFeZAfz4.mjs';
1
+ import { D as DefaultTransport, A as AcpBackend } from './AcpBackend-leZGKCNL.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-leZGKCNL.mjs';
3
+ import { h as connectionState, A as ApiClient, i as readSettings, j as encodeBase64, l as logger, p as projectPath } from './types-DOJq8cyH.mjs';
4
+ import { A as AcpSessionManager } from './AcpSessionManager-CI_-4TvB.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-NiUS5t0N.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-CIfhQ_X6.mjs';
8
8
  import 'node:child_process';
9
9
  import '@agentclientprotocol/sdk';
10
10
  import 'axios';
@@ -1,9 +1,9 @@
1
- import { q as query } from './index-NiUS5t0N.mjs';
1
+ import { q as query } from './index-CIfhQ_X6.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-CFIlcwe9.mjs';
6
+ import './types-DOJq8cyH.mjs';
7
7
  import 'axios';
8
8
  import 'node:util';
9
9
  import 'node:fs';
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-Cietz-nU.cjs');
3
+ var index = require('./index-CF9-9B70.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-Cq7yzNWv.cjs');
8
+ require('./types-4iIbK7lA.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-CbMPn2Sx.cjs');
4
- var persistence = require('./types-Cq7yzNWv.cjs');
5
- var AcpSessionManager = require('./AcpSessionManager-lM9HBlOx.cjs');
3
+ var AcpBackend = require('./AcpBackend-B3WfHjyi.cjs');
4
+ var persistence = require('./types-4iIbK7lA.cjs');
5
+ var AcpSessionManager = require('./AcpSessionManager-Cza1nTaQ.cjs');
6
6
  var node_crypto = require('node:crypto');
7
7
  var path = require('node:path');
8
- var index = require('./index-Cietz-nU.cjs');
8
+ var index = require('./index-CF9-9B70.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-Cietz-nU.cjs');
5
- require('./types-Cq7yzNWv.cjs');
4
+ require('./index-CF9-9B70.cjs');
5
+ require('./types-4iIbK7lA.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-NiUS5t0N.mjs';
3
- import './types-CFIlcwe9.mjs';
2
+ import './index-CIfhQ_X6.mjs';
3
+ import './types-DOJq8cyH.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-Cq7yzNWv.cjs');
9
- var index = require('./index-Cietz-nU.cjs');
8
+ var persistence = require('./types-4iIbK7lA.cjs');
9
+ var index = require('./index-CF9-9B70.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-CFIlcwe9.mjs';
7
- import { t as tmuxSupportsSessionEnv } from './index-NiUS5t0N.mjs';
6
+ import { p as projectPath } from './types-DOJq8cyH.mjs';
7
+ import { t as tmuxSupportsSessionEnv } from './index-CIfhQ_X6.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-Cq7yzNWv.cjs');
3
+ var persistence = require('./types-4iIbK7lA.cjs');
4
4
  require('axios');
5
5
  require('chalk');
6
6
  require('node:util');
package/dist/lib.d.cts CHANGED
@@ -7,7 +7,7 @@ import { ExpoPushMessage } from 'expo-server-sdk';
7
7
 
8
8
  declare const CLAUDE_AUTH_PROBE_VERSION: 1;
9
9
  type ClaudeAuthStatus = 'ok' | 'not-logged-in' | 'unknown' | 'error' | 'claude-missing';
10
- type ClaudeAuthDiagnosis = 'keychain-empty-item' | 'store-divergence' | 'no-credentials' | 'sdk-binary-missing' | 'probe-timeout' | 'probe-crash';
10
+ type ClaudeAuthDiagnosis = 'keychain-empty-item' | 'store-divergence' | 'no-credentials' | 'credentials-rejected' | 'sdk-binary-missing' | 'probe-timeout' | 'probe-crash';
11
11
  type ClaudeAuthLineage = 'launchd' | 'inherited-env' | 'other';
12
12
  type ClaudeCredentialStore = 'auto' | 'file';
13
13
  interface ClaudeAuthState$1 {
@@ -1002,6 +1002,11 @@ interface SpawnSessionOptions {
1002
1002
  * metadata so the import picker hides it. Old daemons ignore the field.
1003
1003
  */
1004
1004
  importedFromClaudeSessionId?: string;
1005
+ /**
1006
+ * B-294: title to stamp on the imported session's metadata (the source
1007
+ * conversation's summary / first prompt). Sanitized daemon-side.
1008
+ */
1009
+ importTitle?: string;
1005
1010
  /**
1006
1011
  * B-051: spawn the machine's assistant (meta-agent) session. The daemon
1007
1012
  * forces cwd to ~/.happy/assistant (the passed `directory` is ignored),
package/dist/lib.d.mts CHANGED
@@ -7,7 +7,7 @@ import { ExpoPushMessage } from 'expo-server-sdk';
7
7
 
8
8
  declare const CLAUDE_AUTH_PROBE_VERSION: 1;
9
9
  type ClaudeAuthStatus = 'ok' | 'not-logged-in' | 'unknown' | 'error' | 'claude-missing';
10
- type ClaudeAuthDiagnosis = 'keychain-empty-item' | 'store-divergence' | 'no-credentials' | 'sdk-binary-missing' | 'probe-timeout' | 'probe-crash';
10
+ type ClaudeAuthDiagnosis = 'keychain-empty-item' | 'store-divergence' | 'no-credentials' | 'credentials-rejected' | 'sdk-binary-missing' | 'probe-timeout' | 'probe-crash';
11
11
  type ClaudeAuthLineage = 'launchd' | 'inherited-env' | 'other';
12
12
  type ClaudeCredentialStore = 'auto' | 'file';
13
13
  interface ClaudeAuthState$1 {
@@ -1002,6 +1002,11 @@ interface SpawnSessionOptions {
1002
1002
  * metadata so the import picker hides it. Old daemons ignore the field.
1003
1003
  */
1004
1004
  importedFromClaudeSessionId?: string;
1005
+ /**
1006
+ * B-294: title to stamp on the imported session's metadata (the source
1007
+ * conversation's summary / first prompt). Sanitized daemon-side.
1008
+ */
1009
+ importTitle?: string;
1005
1010
  /**
1006
1011
  * B-051: spawn the machine's assistant (meta-agent) session. The daemon
1007
1012
  * 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-CFIlcwe9.mjs';
1
+ export { A as ApiClient, a as ApiSessionClient, R as RawJSONLinesSchema, c as configuration, l as logger } from './types-DOJq8cyH.mjs';
2
2
  import 'axios';
3
3
  import 'chalk';
4
4
  import 'node:util';
@@ -3,9 +3,9 @@
3
3
  var mcp_js = require('@modelcontextprotocol/sdk/server/mcp.js');
4
4
  var stdio_js = require('@modelcontextprotocol/sdk/server/stdio.js');
5
5
  var z = require('zod');
6
- var index = require('./index-Cietz-nU.cjs');
6
+ var index = require('./index-CF9-9B70.cjs');
7
7
  var limits = require('./limits-KdWKmwtH.cjs');
8
- var persistence = require('./types-Cq7yzNWv.cjs');
8
+ var persistence = require('./types-4iIbK7lA.cjs');
9
9
  require('chalk');
10
10
  require('node:os');
11
11
  require('node:crypto');
@@ -1,9 +1,9 @@
1
1
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
2
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
3
3
  import { z } from 'zod';
4
- import { p as pushClipboardViaDaemon } from './index-NiUS5t0N.mjs';
4
+ import { p as pushClipboardViaDaemon } from './index-CIfhQ_X6.mjs';
5
5
  import { C as CLIPBOARD_TOOL_NAME, a as CLIPBOARD_TOOL_TITLE, b as CLIPBOARD_TOOL_DESCRIPTION, c as CLIPBOARD_MAX_BYTES } from './limits-CwFb5S2b.mjs';
6
- import { l as logger } from './types-CFIlcwe9.mjs';
6
+ import { l as logger } from './types-DOJq8cyH.mjs';
7
7
  import 'chalk';
8
8
  import 'node:os';
9
9
  import 'node:crypto';
@@ -4,10 +4,10 @@ var ink = require('ink');
4
4
  var React = require('react');
5
5
  var node_crypto = require('node:crypto');
6
6
  var path = require('node:path');
7
- var persistence = require('./types-Cq7yzNWv.cjs');
8
- var index = require('./index-Cietz-nU.cjs');
9
- var AcpBackend = require('./AcpBackend-CbMPn2Sx.cjs');
10
- var config = require('./config-CYpWD6Tc.cjs');
7
+ var persistence = require('./types-4iIbK7lA.cjs');
8
+ var index = require('./index-CF9-9B70.cjs');
9
+ var AcpBackend = require('./AcpBackend-B3WfHjyi.cjs');
10
+ var config = require('./config-CpVncJmR.cjs');
11
11
  require('axios');
12
12
  require('chalk');
13
13
  require('node:util');
@@ -2,10 +2,10 @@ import { useStdout, useInput, Box, Text, render } from 'ink';
2
2
  import React, { useState, useRef, useEffect, useCallback } from 'react';
3
3
  import { randomUUID } from 'node:crypto';
4
4
  import { join } from 'node:path';
5
- import { l as logger, h as connectionState, A as ApiClient, i as readSettings, e as errorLogMetadata, j as encodeBase64, p as projectPath, d as contentLogMetadata } from './types-CFIlcwe9.mjs';
6
- import { g as GEMINI_API_KEY_ENV, j as GOOGLE_API_KEY_ENV, G as GEMINI_MODEL_ENV, B as BasePermissionHandler, k as BaseReasoningProcessor, i as initialMachineMetadata, d as createSessionMetadata, e as setupOfflineReconnection, n as notifyDaemonSessionStarted, M as MessageQueue2, h as hashObject, l as MessageBuffer, C as CHANGE_TITLE_INSTRUCTION, r as registerKillSessionHandler, f as startHappyServer } from './index-NiUS5t0N.mjs';
7
- import { A as AcpBackend } from './AcpBackend-zefm5lwc.mjs';
8
- import { readGeminiLocalConfig, determineGeminiModel, getGeminiModelSource, getInitialGeminiModel, saveGeminiModelToConfig } from './config-CRCUgh2E.mjs';
5
+ import { l as logger, h as connectionState, A as ApiClient, i as readSettings, e as errorLogMetadata, j as encodeBase64, p as projectPath, d as contentLogMetadata } from './types-DOJq8cyH.mjs';
6
+ import { g as GEMINI_API_KEY_ENV, j as GOOGLE_API_KEY_ENV, G as GEMINI_MODEL_ENV, B as BasePermissionHandler, k as BaseReasoningProcessor, i as initialMachineMetadata, d as createSessionMetadata, e as setupOfflineReconnection, n as notifyDaemonSessionStarted, M as MessageQueue2, h as hashObject, l as MessageBuffer, C as CHANGE_TITLE_INSTRUCTION, r as registerKillSessionHandler, f as startHappyServer } from './index-CIfhQ_X6.mjs';
7
+ import { A as AcpBackend } from './AcpBackend-leZGKCNL.mjs';
8
+ import { readGeminiLocalConfig, determineGeminiModel, getGeminiModelSource, getInitialGeminiModel, saveGeminiModelToConfig } from './config-TEae6YCF.mjs';
9
9
  import 'axios';
10
10
  import 'chalk';
11
11
  import 'node:util';
@@ -3,9 +3,9 @@ import { execFileSync } from 'node:child_process';
3
3
  import os from 'node:os';
4
4
  import { existsSync, readFileSync } from 'node:fs';
5
5
  import { join } from 'node:path';
6
- import { k as ensurePrivateDirectorySync, m as hardenPrivateFileSync, w as writePrivateFileSync, e as errorLogMetadata, d as contentLogMetadata, h as connectionState, A as ApiClient, i as readSettings, j as encodeBase64, l as logger, c as configuration } from './types-CFIlcwe9.mjs';
7
- import { A as AcpSessionManager } from './AcpSessionManager-DFeZAfz4.mjs';
8
- import { i as initialMachineMetadata, d as createSessionMetadata, e as setupOfflineReconnection, n as notifyDaemonSessionStarted, M as MessageQueue2, r as registerKillSessionHandler } from './index-NiUS5t0N.mjs';
6
+ import { k as ensurePrivateDirectorySync, m as hardenPrivateFileSync, w as writePrivateFileSync, e as errorLogMetadata, d as contentLogMetadata, h as connectionState, A as ApiClient, i as readSettings, j as encodeBase64, l as logger, c as configuration } from './types-DOJq8cyH.mjs';
7
+ import { A as AcpSessionManager } from './AcpSessionManager-CI_-4TvB.mjs';
8
+ import { i as initialMachineMetadata, d as createSessionMetadata, e as setupOfflineReconnection, n as notifyDaemonSessionStarted, M as MessageQueue2, r as registerKillSessionHandler } from './index-CIfhQ_X6.mjs';
9
9
  import WebSocket from 'ws';
10
10
  import * as ed from '@noble/ed25519';
11
11
  import { sha512 } from '@noble/hashes/sha2.js';
@@ -5,9 +5,9 @@ var node_child_process = require('node:child_process');
5
5
  var os = require('node:os');
6
6
  var node_fs = require('node:fs');
7
7
  var path = require('node:path');
8
- var persistence = require('./types-Cq7yzNWv.cjs');
9
- var AcpSessionManager = require('./AcpSessionManager-lM9HBlOx.cjs');
10
- var index = require('./index-Cietz-nU.cjs');
8
+ var persistence = require('./types-4iIbK7lA.cjs');
9
+ var AcpSessionManager = require('./AcpSessionManager-Cza1nTaQ.cjs');
10
+ var index = require('./index-CF9-9B70.cjs');
11
11
  var WebSocket = require('ws');
12
12
  var ed = require('@noble/ed25519');
13
13
  var sha2_js = require('@noble/hashes/sha2.js');
@@ -1,8 +1,8 @@
1
1
  import chalk from 'chalk';
2
2
  import { readFileSync } from 'node:fs';
3
3
  import { resolve } from 'node:path';
4
- import { r as readPersistedSessions, c as configuration } from './types-CFIlcwe9.mjs';
5
- import { b as sendUserMessage, a as sessionWebUrl } from './index-NiUS5t0N.mjs';
4
+ import { r as readPersistedSessions, c as configuration } from './types-DOJq8cyH.mjs';
5
+ import { b as sendUserMessage, a as sessionWebUrl } from './index-CIfhQ_X6.mjs';
6
6
  import 'axios';
7
7
  import 'node:util';
8
8
  import 'node:os';
@@ -3,8 +3,8 @@
3
3
  var chalk = require('chalk');
4
4
  var node_fs = require('node:fs');
5
5
  var path = require('node:path');
6
- var persistence = require('./types-Cq7yzNWv.cjs');
7
- var index = require('./index-Cietz-nU.cjs');
6
+ var persistence = require('./types-4iIbK7lA.cjs');
7
+ var index = require('./index-CF9-9B70.cjs');
8
8
  require('axios');
9
9
  require('node:util');
10
10
  require('node:os');
@@ -3,8 +3,8 @@
3
3
  var chalk = require('chalk');
4
4
  var node_fs = require('node:fs');
5
5
  var path = require('node:path');
6
- var index = require('./index-Cietz-nU.cjs');
7
- var persistence = require('./types-Cq7yzNWv.cjs');
6
+ var index = require('./index-CF9-9B70.cjs');
7
+ var persistence = require('./types-4iIbK7lA.cjs');
8
8
  require('node:os');
9
9
  require('node:crypto');
10
10
  require('cross-spawn');
@@ -1,8 +1,8 @@
1
1
  import chalk from 'chalk';
2
2
  import { readFileSync, statSync } from 'node:fs';
3
3
  import { resolve } from 'node:path';
4
- import { c as checkIfDaemonRunningAndCleanupStaleState, s as spawnDaemonSession, a as sessionWebUrl, w as waitForSessionKey, b as sendUserMessage } from './index-NiUS5t0N.mjs';
5
- import { l as logger } from './types-CFIlcwe9.mjs';
4
+ import { c as checkIfDaemonRunningAndCleanupStaleState, s as spawnDaemonSession, a as sessionWebUrl, w as waitForSessionKey, b as sendUserMessage } from './index-CIfhQ_X6.mjs';
5
+ import { l as logger } from './types-DOJq8cyH.mjs';
6
6
  import 'node:os';
7
7
  import 'node:crypto';
8
8
  import 'cross-spawn';
@@ -51,7 +51,7 @@ var z__namespace = /*#__PURE__*/_interopNamespaceDefault(z);
51
51
  var pty__namespace = /*#__PURE__*/_interopNamespaceDefault(pty);
52
52
 
53
53
  var name = "very-happy-cli";
54
- var version = "0.2.105";
54
+ var version = "0.2.107";
55
55
  var description = "Remote multi-agent workspace CLI with deep Claude integration, native terminal streaming, and self-hosting.";
56
56
  var author = "Kirill Dubovitskiy";
57
57
  var contributors = [
@@ -164,12 +164,12 @@ var dependencies = {
164
164
  zod: "^4.0.0"
165
165
  };
166
166
  var optionalDependencies = {
167
- "very-happy-tools-arm64-darwin": "0.2.105",
168
- "very-happy-tools-x64-darwin": "0.2.105",
169
- "very-happy-tools-arm64-linux": "0.2.105",
170
- "very-happy-tools-x64-linux": "0.2.105",
171
- "very-happy-tools-arm64-win32": "0.2.105",
172
- "very-happy-tools-x64-win32": "0.2.105"
167
+ "very-happy-tools-arm64-darwin": "0.2.107",
168
+ "very-happy-tools-x64-darwin": "0.2.107",
169
+ "very-happy-tools-arm64-linux": "0.2.107",
170
+ "very-happy-tools-x64-linux": "0.2.107",
171
+ "very-happy-tools-arm64-win32": "0.2.107",
172
+ "very-happy-tools-x64-win32": "0.2.107"
173
173
  };
174
174
  var devDependencies = {
175
175
  "@slopus/happy-wire": "workspace:*",
@@ -1603,7 +1603,7 @@ class RpcHandlerManager {
1603
1603
  }
1604
1604
  }
1605
1605
 
1606
- const __dirname$1 = path$1.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('types-Cq7yzNWv.cjs', document.baseURI).href))));
1606
+ const __dirname$1 = path$1.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('types-4iIbK7lA.cjs', document.baseURI).href))));
1607
1607
  function projectPath() {
1608
1608
  const path = path$1.resolve(__dirname$1, "..");
1609
1609
  return path;
@@ -14421,7 +14421,7 @@ class ApiMachineClient {
14421
14421
  }
14422
14422
  });
14423
14423
  this.rpcHandlerManager.registerHandler("claude-import-session", async (params) => {
14424
- const { directory, claudeSessionId, approvedNewDirectoryCreation, permissionMode } = params || {};
14424
+ const { directory, claudeSessionId, approvedNewDirectoryCreation, permissionMode, title } = params || {};
14425
14425
  if (typeof directory !== "string" || directory.length === 0) {
14426
14426
  throw new Error("directory is required");
14427
14427
  }
@@ -14447,7 +14447,12 @@ class ApiMachineClient {
14447
14447
  agent: "claude",
14448
14448
  resumeClaudeSessionId: newClaudeSessionId,
14449
14449
  importedFromClaudeSessionId: claudeSessionId,
14450
- permissionMode: typeof permissionMode === "string" ? permissionMode : void 0
14450
+ permissionMode: typeof permissionMode === "string" ? permissionMode : void 0,
14451
+ // B-294: the imported session carries the source title from the
14452
+ // start. The CLI's own title generator only fires on a new user
14453
+ // message and skips a session that already has a summary, so an
14454
+ // import without this stays "New chat" forever.
14455
+ importTitle: typeof title === "string" ? title : void 0
14451
14456
  });
14452
14457
  } catch (error) {
14453
14458
  await discardForkedSession(projectDir, newClaudeSessionId);
@@ -15953,7 +15958,10 @@ class ApiClient {
15953
15958
  ` \u2192 This usually happens after re-authenticating with a different account`
15954
15959
  ));
15955
15960
  console.log(chalk.yellow(
15956
- ` \u2192 Run 'very-happy doctor clean' to reset local state and generate a new machine ID`
15961
+ // B-297: `doctor clean` only kills processes it has never reset local
15962
+ // state or minted a machine id. `auth login --force` is the command
15963
+ // that does (it regenerates machineId, src/ui/auth.ts).
15964
+ ` \u2192 Run 'very-happy auth login --force' to re-authenticate and generate a new machine ID`
15957
15965
  ));
15958
15966
  console.log(chalk.yellow(
15959
15967
  ` \u2192 Open a GitHub issue if this problem persists`
@@ -29,7 +29,7 @@ import { SandboxManager } from '@anthropic-ai/sandbox-runtime';
29
29
  import { Expo } from 'expo-server-sdk';
30
30
 
31
31
  var name = "very-happy-cli";
32
- var version = "0.2.105";
32
+ var version = "0.2.107";
33
33
  var description = "Remote multi-agent workspace CLI with deep Claude integration, native terminal streaming, and self-hosting.";
34
34
  var author = "Kirill Dubovitskiy";
35
35
  var contributors = [
@@ -142,12 +142,12 @@ var dependencies = {
142
142
  zod: "^4.0.0"
143
143
  };
144
144
  var optionalDependencies = {
145
- "very-happy-tools-arm64-darwin": "0.2.105",
146
- "very-happy-tools-x64-darwin": "0.2.105",
147
- "very-happy-tools-arm64-linux": "0.2.105",
148
- "very-happy-tools-x64-linux": "0.2.105",
149
- "very-happy-tools-arm64-win32": "0.2.105",
150
- "very-happy-tools-x64-win32": "0.2.105"
145
+ "very-happy-tools-arm64-darwin": "0.2.107",
146
+ "very-happy-tools-x64-darwin": "0.2.107",
147
+ "very-happy-tools-arm64-linux": "0.2.107",
148
+ "very-happy-tools-x64-linux": "0.2.107",
149
+ "very-happy-tools-arm64-win32": "0.2.107",
150
+ "very-happy-tools-x64-win32": "0.2.107"
151
151
  };
152
152
  var devDependencies = {
153
153
  "@slopus/happy-wire": "workspace:*",
@@ -14399,7 +14399,7 @@ class ApiMachineClient {
14399
14399
  }
14400
14400
  });
14401
14401
  this.rpcHandlerManager.registerHandler("claude-import-session", async (params) => {
14402
- const { directory, claudeSessionId, approvedNewDirectoryCreation, permissionMode } = params || {};
14402
+ const { directory, claudeSessionId, approvedNewDirectoryCreation, permissionMode, title } = params || {};
14403
14403
  if (typeof directory !== "string" || directory.length === 0) {
14404
14404
  throw new Error("directory is required");
14405
14405
  }
@@ -14425,7 +14425,12 @@ class ApiMachineClient {
14425
14425
  agent: "claude",
14426
14426
  resumeClaudeSessionId: newClaudeSessionId,
14427
14427
  importedFromClaudeSessionId: claudeSessionId,
14428
- permissionMode: typeof permissionMode === "string" ? permissionMode : void 0
14428
+ permissionMode: typeof permissionMode === "string" ? permissionMode : void 0,
14429
+ // B-294: the imported session carries the source title from the
14430
+ // start. The CLI's own title generator only fires on a new user
14431
+ // message and skips a session that already has a summary, so an
14432
+ // import without this stays "New chat" forever.
14433
+ importTitle: typeof title === "string" ? title : void 0
14429
14434
  });
14430
14435
  } catch (error) {
14431
14436
  await discardForkedSession(projectDir, newClaudeSessionId);
@@ -15931,7 +15936,10 @@ class ApiClient {
15931
15936
  ` \u2192 This usually happens after re-authenticating with a different account`
15932
15937
  ));
15933
15938
  console.log(chalk.yellow(
15934
- ` \u2192 Run 'very-happy doctor clean' to reset local state and generate a new machine ID`
15939
+ // B-297: `doctor clean` only kills processes it has never reset local
15940
+ // state or minted a machine id. `auth login --force` is the command
15941
+ // that does (it regenerates machineId, src/ui/auth.ts).
15942
+ ` \u2192 Run 'very-happy auth login --force' to re-authenticate and generate a new machine ID`
15935
15943
  ));
15936
15944
  console.log(chalk.yellow(
15937
15945
  ` \u2192 Open a GitHub issue if this problem persists`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "very-happy-cli",
3
- "version": "0.2.105",
3
+ "version": "0.2.107",
4
4
  "description": "Remote multi-agent workspace CLI with deep Claude integration, native terminal streaming, and self-hosting.",
5
5
  "author": "Kirill Dubovitskiy",
6
6
  "contributors": [
@@ -113,12 +113,12 @@
113
113
  "zod": "^4.0.0"
114
114
  },
115
115
  "optionalDependencies": {
116
- "very-happy-tools-arm64-darwin": "0.2.105",
117
- "very-happy-tools-x64-darwin": "0.2.105",
118
- "very-happy-tools-arm64-linux": "0.2.105",
119
- "very-happy-tools-x64-linux": "0.2.105",
120
- "very-happy-tools-arm64-win32": "0.2.105",
121
- "very-happy-tools-x64-win32": "0.2.105"
116
+ "very-happy-tools-arm64-darwin": "0.2.107",
117
+ "very-happy-tools-x64-darwin": "0.2.107",
118
+ "very-happy-tools-arm64-linux": "0.2.107",
119
+ "very-happy-tools-x64-linux": "0.2.107",
120
+ "very-happy-tools-arm64-win32": "0.2.107",
121
+ "very-happy-tools-x64-win32": "0.2.107"
122
122
  },
123
123
  "devDependencies": {
124
124
  "@slopus/happy-wire": "workspace:*",