happy-imou-cloud 2.0.10 → 2.0.11

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 (34) hide show
  1. package/dist/BaseReasoningProcessor-5ACv9gKu.mjs +320 -0
  2. package/dist/BaseReasoningProcessor-COrRWyn0.cjs +323 -0
  3. package/dist/ProviderSelectionHandler-BljOLMQn.mjs +261 -0
  4. package/dist/ProviderSelectionHandler-DBGobhGZ.cjs +265 -0
  5. package/dist/{api-BjxmW-0W.mjs → api-BcWf5v4i.mjs} +174 -46
  6. package/dist/{api-DUE5TJBE.cjs → api-Ye-rPX6s.cjs} +174 -46
  7. package/dist/{command-Df7u5eAT.cjs → command-BK93nizl.cjs} +6 -6
  8. package/dist/{command-ComOeFLY.mjs → command-nOI80Mnm.mjs} +6 -6
  9. package/dist/{index-CzvgPwr1.mjs → index-DnsqY6I_.mjs} +189 -60
  10. package/dist/{index-Cuvfa15L.cjs → index-J7QKJ8lc.cjs} +194 -61
  11. package/dist/index.cjs +8 -8
  12. package/dist/index.mjs +8 -8
  13. package/dist/lib.cjs +2 -3
  14. package/dist/lib.d.cts +2 -0
  15. package/dist/lib.d.mts +2 -0
  16. package/dist/lib.mjs +2 -3
  17. package/dist/{persistence-BxP6Jw1f.mjs → persistence-BMa6cyw9.mjs} +2 -3
  18. package/dist/{persistence-D7JtnrYA.cjs → persistence-xK5CKhbn.cjs} +2 -3
  19. package/dist/registerKillSessionHandler-CH6yN0eG.cjs +1198 -0
  20. package/dist/registerKillSessionHandler-Dxwg4L4J.mjs +1179 -0
  21. package/dist/{runClaude-C1W_Nw0C.cjs → runClaude-BMHlBny_.cjs} +884 -398
  22. package/dist/{runClaude-B_fTMxc4.mjs → runClaude-cQ-UT0Ke.mjs} +882 -396
  23. package/dist/{runCodex-CUgOiIEz.mjs → runCodex-AnJUPIhX.mjs} +155 -578
  24. package/dist/{runCodex-D2VCWVEK.cjs → runCodex-roOSOWWL.cjs} +158 -583
  25. package/dist/{runGemini-2_FEtJYa.mjs → runGemini-BGo_0mzA.mjs} +142 -387
  26. package/dist/{runGemini-CiGnjflq.cjs → runGemini-Cg6Zbqlz.cjs} +145 -390
  27. package/package.json +9 -8
  28. package/scripts/e2e/fake-codex-acp-agent.mjs +139 -0
  29. package/scripts/e2e/local-server-session-roundtrip.mjs +1063 -0
  30. package/scripts/release-smoke.mjs +23 -6
  31. package/dist/names-CicSgRNg.mjs +0 -625
  32. package/dist/names-yJNZoTv_.cjs +0 -636
  33. package/dist/registerKillSessionHandler-ARQrPvnT.mjs +0 -454
  34. package/dist/registerKillSessionHandler-DCMFiXyA.cjs +0 -459
@@ -1,6 +1,6 @@
1
- import { c as createDefaultRuntimeShell } from './index-CzvgPwr1.mjs';
1
+ import { c as createDefaultRuntimeShell } from './index-DnsqY6I_.mjs';
2
2
  import 'chalk';
3
- import './api-BjxmW-0W.mjs';
3
+ import './api-BcWf5v4i.mjs';
4
4
  import 'axios';
5
5
  import 'fs';
6
6
  import 'node:fs';
@@ -11,13 +11,12 @@ import 'socket.io-client';
11
11
  import 'zod';
12
12
  import 'node:crypto';
13
13
  import 'tweetnacl';
14
- import 'child_process';
15
- import 'util';
16
14
  import 'fs/promises';
17
15
  import 'crypto';
18
16
  import 'path';
17
+ import 'node:child_process';
19
18
  import 'expo-server-sdk';
20
- import './persistence-BxP6Jw1f.mjs';
19
+ import './persistence-BMa6cyw9.mjs';
21
20
  import 'node:fs/promises';
22
21
  import 'os';
23
22
  import 'tmp';
@@ -26,14 +25,15 @@ import 'node:module';
26
25
  import 'open';
27
26
  import 'react';
28
27
  import 'ink';
28
+ import 'child_process';
29
29
  import 'url';
30
- import 'node:child_process';
31
30
  import 'ps-list';
32
31
  import 'cross-spawn';
33
32
  import 'fastify';
34
33
  import 'fastify-type-provider-zod';
35
34
  import 'node:readline';
36
35
  import 'http';
36
+ import 'util';
37
37
  import '@agentclientprotocol/sdk';
38
38
 
39
39
  function listRuntimeProviders() {
@@ -1,6 +1,6 @@
1
1
  import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import chalk from 'chalk';
2
- import { l as logger, e as encodeBase64, c as configuration, h as buildAuthenticatedHeaders, S as SigningBootstrapRequiredError, j as SIGNING_BOOTSTRAP_REQUIRED_MESSAGE, k as encodeBase64Url, f as delay, m as buildClientHeaders, n as decodeBase64, H as HAPPY_CLOUD_DAEMON_PORT, p as packageJson, A as ApiClient, o as getLatestDaemonLog } from './api-BjxmW-0W.mjs';
3
- import { writeCredentialsLegacy, writeCredentialsDataKey, readCredentials, readSettings, updateSettings, readDaemonState, clearDaemonState, acquireDaemonLock, writeDaemonState, releaseDaemonLock, validateProfileForAgent, getProfileEnvironmentVariables, clearCredentials, clearMachineId } from './persistence-BxP6Jw1f.mjs';
2
+ import { l as logger, e as encodeBase64, c as configuration, h as buildAuthenticatedHeaders, S as SigningBootstrapRequiredError, j as SIGNING_BOOTSTRAP_REQUIRED_MESSAGE, k as encodeBase64Url, f as delay, m as buildClientHeaders, n as decodeBase64, H as HAPPY_CLOUD_DAEMON_PORT, p as packageJson, A as ApiClient, o as getLatestDaemonLog } from './api-BcWf5v4i.mjs';
3
+ import { writeCredentialsLegacy, writeCredentialsDataKey, readCredentials, readSettings, updateSettings, readDaemonState, clearDaemonState, acquireDaemonLock, writeDaemonState, releaseDaemonLock, validateProfileForAgent, getProfileEnvironmentVariables, clearCredentials, clearMachineId } from './persistence-BMa6cyw9.mjs';
4
4
  import { z } from 'zod';
5
5
  import fs, { writeFile as writeFile$1, rename, unlink as unlink$1 } from 'fs/promises';
6
6
  import os, { homedir } from 'os';
@@ -31,6 +31,7 @@ import { createInterface } from 'node:readline';
31
31
  import { createServer } from 'http';
32
32
  import { promisify } from 'util';
33
33
  import { ndJsonStream, ClientSideConnection } from '@agentclientprotocol/sdk';
34
+ import 'node:events';
34
35
 
35
36
  async function openBrowser(url) {
36
37
  try {
@@ -2644,6 +2645,14 @@ async function recoverTrackedSessionsFromLocalRegistry({
2644
2645
  return { recoveredCount, removedStaleCount };
2645
2646
  }
2646
2647
 
2648
+ const DEFAULT_SESSION_WEBHOOK_TIMEOUT_MS = 45e3;
2649
+ function resolveSessionWebhookTimeoutMs() {
2650
+ const parsed = Number.parseInt(process.env.HAPPY_DAEMON_SESSION_WEBHOOK_TIMEOUT || "", 10);
2651
+ if (Number.isFinite(parsed) && parsed > 0) {
2652
+ return parsed;
2653
+ }
2654
+ return DEFAULT_SESSION_WEBHOOK_TIMEOUT_MS;
2655
+ }
2647
2656
  const initialMachineMetadata = {
2648
2657
  host: os.hostname(),
2649
2658
  platform: os.platform(),
@@ -2673,6 +2682,7 @@ async function getProfileEnvironmentVariablesForAgent(profileId, agentType) {
2673
2682
  }
2674
2683
  }
2675
2684
  async function startDaemon() {
2685
+ const sessionWebhookTimeoutMs = resolveSessionWebhookTimeoutMs();
2676
2686
  const shutdownCoordinator = createShutdownCoordinator(async () => {
2677
2687
  logger.debug("[DAEMON RUN] Startup malfunctioned, forcing exit with code 1");
2678
2688
  await new Promise((resolve) => setTimeout(resolve, 100));
@@ -2915,7 +2925,7 @@ async function startDaemon() {
2915
2925
  type: spawnError.type,
2916
2926
  errorMessage: spawnError.errorMessage
2917
2927
  });
2918
- }, 15e3);
2928
+ }, sessionWebhookTimeoutMs);
2919
2929
  pidToAwaiter.set(tmuxResult.pid, (result) => {
2920
2930
  clearTimeout(timeout);
2921
2931
  resolve(result);
@@ -3002,7 +3012,7 @@ async function startDaemon() {
3002
3012
  type: spawnError.type,
3003
3013
  errorMessage: spawnError.errorMessage
3004
3014
  });
3005
- }, 15e3);
3015
+ }, sessionWebhookTimeoutMs);
3006
3016
  pidToAwaiter.set(happyProcess.pid, (result) => {
3007
3017
  clearTimeout(timeout);
3008
3018
  resolve(result);
@@ -3077,17 +3087,19 @@ async function startDaemon() {
3077
3087
  onHappySessionWebhook,
3078
3088
  port: HAPPY_CLOUD_DAEMON_PORT
3079
3089
  });
3080
- const recoveryResult = await recoverTrackedSessionsFromLocalRegistry({
3081
- trackedSessionPids: pidToTrackedSession.keys(),
3082
- trackSession: (pid, trackedSession) => {
3083
- pidToTrackedSession.set(pid, trackedSession);
3090
+ const runSessionRegistryRecovery = async (label) => {
3091
+ const recoveryResult = await recoverTrackedSessionsFromLocalRegistry({
3092
+ trackedSessionPids: pidToTrackedSession.keys(),
3093
+ trackSession: (pid, trackedSession) => {
3094
+ pidToTrackedSession.set(pid, trackedSession);
3095
+ }
3096
+ });
3097
+ if (recoveryResult.recoveredCount > 0 || recoveryResult.removedStaleCount > 0) {
3098
+ logger.debug(
3099
+ `[DAEMON RUN] Session registry recovery ${label} completed: recovered=${recoveryResult.recoveredCount}, removedStale=${recoveryResult.removedStaleCount}`
3100
+ );
3084
3101
  }
3085
- });
3086
- if (recoveryResult.recoveredCount > 0 || recoveryResult.removedStaleCount > 0) {
3087
- logger.debug(
3088
- `[DAEMON RUN] Session registry recovery completed: recovered=${recoveryResult.recoveredCount}, removedStale=${recoveryResult.removedStaleCount}`
3089
- );
3090
- }
3102
+ };
3091
3103
  const fileState = {
3092
3104
  pid: process.pid,
3093
3105
  httpPort: controlPort,
@@ -3117,6 +3129,9 @@ async function startDaemon() {
3117
3129
  requestShutdown: () => requestShutdown("happy-app")
3118
3130
  });
3119
3131
  apiMachine.connect();
3132
+ void runSessionRegistryRecovery("startup").catch((error) => {
3133
+ logger.debug("[DAEMON RUN] Session registry startup recovery failed", error);
3134
+ });
3120
3135
  const heartbeatIntervalMs = parseInt(process.env.HAPPY_DAEMON_HEARTBEAT_INTERVAL || "60000");
3121
3136
  let heartbeatRunning = false;
3122
3137
  const restartOnStaleVersionAndHeartbeat = setInterval(async () => {
@@ -3128,17 +3143,7 @@ async function startDaemon() {
3128
3143
  logger.debug(`[DAEMON RUN] Health check started at ${(/* @__PURE__ */ new Date()).toLocaleString()}`);
3129
3144
  }
3130
3145
  try {
3131
- const recoveryResult2 = await recoverTrackedSessionsFromLocalRegistry({
3132
- trackedSessionPids: pidToTrackedSession.keys(),
3133
- trackSession: (pid, trackedSession) => {
3134
- pidToTrackedSession.set(pid, trackedSession);
3135
- }
3136
- });
3137
- if (recoveryResult2.recoveredCount > 0 || recoveryResult2.removedStaleCount > 0) {
3138
- logger.debug(
3139
- `[DAEMON RUN] Session registry recovery tick completed: recovered=${recoveryResult2.recoveredCount}, removedStale=${recoveryResult2.removedStaleCount}`
3140
- );
3141
- }
3146
+ await runSessionRegistryRecovery("tick");
3142
3147
  await runDaemonHealthCheck({
3143
3148
  trackedSessionPids: pidToTrackedSession.keys(),
3144
3149
  removeTrackedSession: (pid) => {
@@ -7317,12 +7322,57 @@ function registerCodexAgent() {
7317
7322
  agentRegistry.register("codex", (opts) => createCodexBackend(opts).backend);
7318
7323
  }
7319
7324
 
7325
+ function mapToClaudeMode(mode) {
7326
+ const codexToClaudeMap = {
7327
+ "yolo": "bypassPermissions",
7328
+ "safe-yolo": "default",
7329
+ "read-only": "default"
7330
+ };
7331
+ return codexToClaudeMap[mode] ?? mode;
7332
+ }
7333
+
7334
+ function ensureExperimentalAcp(args) {
7335
+ if (args.includes("--experimental-acp")) {
7336
+ return args;
7337
+ }
7338
+ return ["--experimental-acp", ...args];
7339
+ }
7320
7340
  function defaultClaudeArgs() {
7321
- return ["--experimental-acp"];
7341
+ return ensureExperimentalAcp([]);
7342
+ }
7343
+ function appendStringFlag(args, flag, value) {
7344
+ if (value && value.trim().length > 0) {
7345
+ args.push(flag, value);
7346
+ }
7347
+ }
7348
+ function appendListFlag(args, flag, values) {
7349
+ if (values && values.length > 0) {
7350
+ args.push(flag, values.join(","));
7351
+ }
7352
+ }
7353
+ function resolveClaudeAcpArgs(options) {
7354
+ if (options.args) {
7355
+ return ensureExperimentalAcp([...options.args]);
7356
+ }
7357
+ const args = ensureExperimentalAcp([...options.baseArgs ?? []]);
7358
+ appendStringFlag(args, "--system-prompt", options.customSystemPrompt);
7359
+ appendStringFlag(args, "--append-system-prompt", options.appendSystemPrompt);
7360
+ appendStringFlag(args, "--model", options.model);
7361
+ appendStringFlag(args, "--fallback-model", options.fallbackModel);
7362
+ appendListFlag(args, "--allowedTools", options.allowedTools);
7363
+ appendListFlag(args, "--disallowedTools", options.disallowedTools);
7364
+ appendStringFlag(args, "--settings", options.settingsPath);
7365
+ if (options.permissionMode) {
7366
+ args.push("--permission-mode", mapToClaudeMode(options.permissionMode));
7367
+ }
7368
+ return args;
7322
7369
  }
7323
7370
  function createClaudeBackend(options) {
7324
7371
  const command = options.command ?? process.env.HAPPY_CLAUDE_ACP_COMMAND ?? "claude";
7325
- const args = options.args ?? defaultClaudeArgs();
7372
+ const args = resolveClaudeAcpArgs({
7373
+ ...options,
7374
+ baseArgs: options.baseArgs ?? defaultClaudeArgs()
7375
+ });
7326
7376
  const backendOptions = {
7327
7377
  agentName: "claude",
7328
7378
  cwd: options.cwd,
@@ -7334,6 +7384,7 @@ function createClaudeBackend(options) {
7334
7384
  },
7335
7385
  mcpServers: options.mcpServers,
7336
7386
  permissionHandler: options.permissionHandler,
7387
+ selectionHandler: options.selectionHandler,
7337
7388
  transportHandler: claudeTransport
7338
7389
  };
7339
7390
  return {
@@ -7384,8 +7435,15 @@ function initializeAgents() {
7384
7435
 
7385
7436
  class InMemoryRuntimeEventBuffer {
7386
7437
  events = [];
7438
+ maxEvents;
7439
+ constructor(maxEvents = 64) {
7440
+ this.maxEvents = Math.max(1, maxEvents);
7441
+ }
7387
7442
  push(event) {
7388
7443
  this.events.push(event);
7444
+ while (this.events.length > this.maxEvents) {
7445
+ this.events.shift();
7446
+ }
7389
7447
  }
7390
7448
  drain() {
7391
7449
  return this.events.splice(0, this.events.length);
@@ -7400,17 +7458,20 @@ class RuntimeShell {
7400
7458
  return this.registry.has(provider);
7401
7459
  }
7402
7460
  async launch(opts) {
7403
- if (!this.registry.has(opts.provider)) {
7461
+ if (!opts.createBackend && !this.registry.has(opts.provider)) {
7404
7462
  throw new Error(`Runtime provider "${opts.provider}" is not registered`);
7405
7463
  }
7406
- const backend = this.registry.create(opts.provider, {
7464
+ const backendFactory = opts.createBackend ?? ((factoryOpts) => this.registry.create(opts.provider, factoryOpts));
7465
+ const backend = backendFactory({
7407
7466
  cwd: opts.cwd,
7408
7467
  env: opts.env
7409
7468
  });
7410
7469
  const handlers = /* @__PURE__ */ new Set();
7411
7470
  const eventBuffer = new InMemoryRuntimeEventBuffer();
7412
7471
  const fanout = (message) => {
7413
- eventBuffer.push(message);
7472
+ if (handlers.size === 0) {
7473
+ eventBuffer.push(message);
7474
+ }
7414
7475
  for (const handler of handlers) {
7415
7476
  handler(message);
7416
7477
  }
@@ -7452,6 +7513,69 @@ function createDefaultRuntimeShell() {
7452
7513
  return new RuntimeShell();
7453
7514
  }
7454
7515
 
7516
+ const KNOWN_CANONICAL_TOOL_NAMES_V2 = [
7517
+ "Bash",
7518
+ "Read",
7519
+ "Write",
7520
+ "Edit",
7521
+ "MultiEdit",
7522
+ "Delete",
7523
+ "Patch",
7524
+ "Diff",
7525
+ "Glob",
7526
+ "Grep",
7527
+ "LS",
7528
+ "CodeSearch",
7529
+ "WebFetch",
7530
+ "WebSearch",
7531
+ "TodoWrite",
7532
+ "TodoRead",
7533
+ "Task",
7534
+ "Reasoning",
7535
+ "EnterPlanMode",
7536
+ "ExitPlanMode",
7537
+ "AskUserQuestion",
7538
+ "AcpHistoryImport",
7539
+ "WorkspaceIndexingPermission",
7540
+ "SubAgentRun",
7541
+ "AgentTeamCreate",
7542
+ "AgentTeamDelete",
7543
+ "AgentTeamSendMessage"
7544
+ ];
7545
+ const CANONICAL_TOOL_NAME_LOOKUP = new Map(
7546
+ KNOWN_CANONICAL_TOOL_NAMES_V2.map((name) => [name.toLowerCase(), name])
7547
+ );
7548
+ const RAW_TO_CANONICAL_TOOL_NAME_LOOKUP = {
7549
+ bash: "Bash",
7550
+ shell: "Bash",
7551
+ execute: "Bash",
7552
+ claudebash: "Bash",
7553
+ codexbash: "Bash",
7554
+ geminibash: "Bash",
7555
+ claudepatch: "Patch",
7556
+ codexpatch: "Patch",
7557
+ geminipatch: "Patch"
7558
+ };
7559
+ function resolveCanonicalToolNameV2(rawToolName) {
7560
+ const normalized = typeof rawToolName === "string" ? rawToolName.trim() : "";
7561
+ if (!normalized) {
7562
+ return "Bash";
7563
+ }
7564
+ if (normalized.startsWith("mcp__")) {
7565
+ return normalized;
7566
+ }
7567
+ const lower = normalized.toLowerCase();
7568
+ const known = CANONICAL_TOOL_NAME_LOOKUP.get(lower);
7569
+ if (known) {
7570
+ return known;
7571
+ }
7572
+ const mapped = RAW_TO_CANONICAL_TOOL_NAME_LOOKUP[lower];
7573
+ if (mapped) {
7574
+ return mapped;
7575
+ }
7576
+ return normalized;
7577
+ }
7578
+
7455
7579
  const DAEMON_STARTUP_TIMEOUT_MS = 3e4;
7456
7580
  const DAEMON_STARTUP_POLL_INTERVAL_MS = 250;
7457
7581
  async function waitForDaemonReady(timeoutMs = DAEMON_STARTUP_TIMEOUT_MS, pollIntervalMs = DAEMON_STARTUP_POLL_INTERVAL_MS) {
@@ -7493,6 +7617,34 @@ var launch = /*#__PURE__*/Object.freeze({
7493
7617
  launchRuntimeProvider: launchRuntimeProvider
7494
7618
  });
7495
7619
 
7620
+ const unifiedProviderExecutors = {
7621
+ claude: async (opts) => {
7622
+ const { runClaude } = await import('./runClaude-cQ-UT0Ke.mjs');
7623
+ await runClaude(opts.credentials, opts.claudeOptions ?? {});
7624
+ },
7625
+ codex: async (opts) => {
7626
+ const { runCodex } = await import('./runCodex-AnJUPIhX.mjs');
7627
+ await runCodex({
7628
+ credentials: opts.credentials,
7629
+ startedBy: opts.startedBy,
7630
+ startingMode: opts.startingMode ?? (opts.startedBy === "daemon" ? "remote" : "local"),
7631
+ codexArgs: opts.codexArgs ?? []
7632
+ });
7633
+ },
7634
+ gemini: async (opts) => {
7635
+ const { runGemini } = await import('./runGemini-BGo_0mzA.mjs');
7636
+ await runGemini({
7637
+ credentials: opts.credentials,
7638
+ startedBy: opts.startedBy
7639
+ });
7640
+ },
7641
+ cursor: async (opts) => {
7642
+ await launchRuntimeProvider({
7643
+ provider: "cursor",
7644
+ initialPrompt: opts.initialPrompt
7645
+ });
7646
+ }
7647
+ };
7496
7648
  async function ensureUnifiedRuntimePrerequisites(credentials) {
7497
7649
  if (credentials) {
7498
7650
  await ensureUnifiedDaemonStarted();
@@ -7521,32 +7673,9 @@ async function ensureUnifiedDaemonStarted() {
7521
7673
  }
7522
7674
  async function executeUnifiedProvider(opts) {
7523
7675
  const credentials = await ensureUnifiedRuntimePrerequisites(opts.credentials);
7524
- if (opts.provider === "claude") {
7525
- const { runClaude } = await import('./runClaude-B_fTMxc4.mjs');
7526
- await runClaude(credentials, opts.claudeOptions ?? {});
7527
- return;
7528
- }
7529
- if (opts.provider === "codex") {
7530
- const { runCodex } = await import('./runCodex-CUgOiIEz.mjs');
7531
- await runCodex({
7532
- credentials,
7533
- startedBy: opts.startedBy,
7534
- startingMode: opts.startingMode ?? (opts.startedBy === "daemon" ? "remote" : "local"),
7535
- codexArgs: opts.codexArgs ?? []
7536
- });
7537
- return;
7538
- }
7539
- if (opts.provider === "gemini") {
7540
- const { runGemini } = await import('./runGemini-2_FEtJYa.mjs');
7541
- await runGemini({
7542
- credentials,
7543
- startedBy: opts.startedBy
7544
- });
7545
- return;
7546
- }
7547
- await launchRuntimeProvider({
7548
- provider: "cursor",
7549
- initialPrompt: opts.initialPrompt
7676
+ await unifiedProviderExecutors[opts.provider]({
7677
+ ...opts,
7678
+ credentials
7550
7679
  });
7551
7680
  }
7552
7681
 
@@ -7579,7 +7708,7 @@ function shouldRunMainClaudeFlow(opts) {
7579
7708
  return;
7580
7709
  } else if (subcommand === "runtime") {
7581
7710
  if (args[1] === "providers") {
7582
- const { renderRuntimeProviders } = await import('./command-ComOeFLY.mjs');
7711
+ const { renderRuntimeProviders } = await import('./command-nOI80Mnm.mjs');
7583
7712
  console.log(renderRuntimeProviders());
7584
7713
  return;
7585
7714
  }
@@ -7757,8 +7886,8 @@ function shouldRunMainClaudeFlow(opts) {
7757
7886
  const projectId = args[3];
7758
7887
  try {
7759
7888
  const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return config; });
7760
- const { readCredentials: readCredentials2 } = await import('./persistence-BxP6Jw1f.mjs');
7761
- const { ApiClient: ApiClient2 } = await import('./api-BjxmW-0W.mjs').then(function (n) { return n.q; });
7889
+ const { readCredentials: readCredentials2 } = await import('./persistence-BMa6cyw9.mjs');
7890
+ const { ApiClient: ApiClient2 } = await import('./api-BcWf5v4i.mjs').then(function (n) { return n.q; });
7762
7891
  let userEmail = void 0;
7763
7892
  try {
7764
7893
  const credentials = await readCredentials2();
@@ -8174,4 +8303,4 @@ ${chalk.bold("Examples:")}
8174
8303
  }
8175
8304
  }
8176
8305
 
8177
- export { ExitCodeError as E, GEMINI_MODEL_ENV as G, createGeminiBackend as a, stopCaffeinate as b, createDefaultRuntimeShell as c, projectPath as d, createCodexBackend as e, formatDisplayMessage as f, getInitialGeminiModel as g, getProjectPath as h, initialMachineMetadata as i, claudeLocal as j, isBun as k, trimIdent as l, claudeCheckSession as m, getEnvironmentInfo as n, startCaffeinate as o, publishSessionRegistration as p, readGeminiLocalConfig as r, saveGeminiModelToConfig as s, truncateDisplayMessage as t, validateCodexAcpSpawn as v };
8306
+ export { ExitCodeError as E, GEMINI_MODEL_ENV as G, RuntimeShell as R, createGeminiBackend as a, stopCaffeinate as b, createDefaultRuntimeShell as c, createCodexBackend as d, projectPath as e, formatDisplayMessage as f, getInitialGeminiModel as g, resolveCanonicalToolNameV2 as h, initialMachineMetadata as i, getProjectPath as j, claudeLocal as k, trimIdent as l, createClaudeBackend as m, isBun as n, claudeCheckSession as o, publishSessionRegistration as p, mapToClaudeMode as q, readGeminiLocalConfig as r, saveGeminiModelToConfig as s, truncateDisplayMessage as t, getEnvironmentInfo as u, validateCodexAcpSpawn as v, startCaffeinate as w };