happy-imou-cloud 2.1.46 → 2.1.47

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 (23) hide show
  1. package/dist/{BaseReasoningProcessor-Bsnew7fc.cjs → BaseReasoningProcessor-CBbzF7oj.cjs} +2 -2
  2. package/dist/{BaseReasoningProcessor-Mrdbmfl3.mjs → BaseReasoningProcessor-KXIi0QF_.mjs} +2 -2
  3. package/dist/{ProviderSelectionHandler-gaUVvyCU.cjs → ProviderSelectionHandler-CJLlwlAu.cjs} +2 -2
  4. package/dist/{ProviderSelectionHandler-BymmO261.mjs → ProviderSelectionHandler-DzYObYrV.mjs} +2 -2
  5. package/dist/{api-Bekjk9d5.cjs → api-CVuTajTL.cjs} +1 -1
  6. package/dist/{api-DTSpLLTK.mjs → api-D3vYIva3.mjs} +1 -1
  7. package/dist/{command-BwhJX0G5.cjs → command-BZRQuZsh.cjs} +2 -3
  8. package/dist/{command-umgXYSY2.mjs → command-fcJ-4Yq3.mjs} +2 -3
  9. package/dist/{index-CUVIZLuf.mjs → index-Cp1I5I3U.mjs} +83 -38
  10. package/dist/{index-DkaYNlRO.cjs → index-CyW9A7hx.cjs} +59 -33
  11. package/dist/index.cjs +2 -3
  12. package/dist/index.mjs +2 -3
  13. package/dist/lib.cjs +1 -1
  14. package/dist/lib.mjs +1 -1
  15. package/dist/{registerKillSessionHandler-BYWJJDre.cjs → registerKillSessionHandler-8C_Wrgor.cjs} +2 -2
  16. package/dist/{registerKillSessionHandler-hQE08yMO.mjs → registerKillSessionHandler-OhhMUuCQ.mjs} +2 -2
  17. package/dist/{runClaude-CFeIMCY2.mjs → runClaude-BviM1Wl5.mjs} +4 -5
  18. package/dist/{runClaude-jpo2aFey.cjs → runClaude-CfdT_ccS.cjs} +4 -5
  19. package/dist/{runCodex-CrxyWcga.cjs → runCodex-B-t0yy4k.cjs} +5 -6
  20. package/dist/{runCodex-ByjUfTyr.mjs → runCodex-Dx3osc7U.mjs} +5 -6
  21. package/dist/{runGemini-CihCRgcR.mjs → runGemini-CnJ75Q--.mjs} +4 -5
  22. package/dist/{runGemini-BhIz1N_b.cjs → runGemini-DZ5-uzB9.cjs} +4 -5
  23. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-DkaYNlRO.cjs');
4
- var persistence = require('./api-Bekjk9d5.cjs');
3
+ var index = require('./index-CyW9A7hx.cjs');
4
+ var persistence = require('./api-CVuTajTL.cjs');
5
5
  var node_events = require('node:events');
6
6
  var node_crypto = require('node:crypto');
7
7
 
@@ -1,5 +1,5 @@
1
- import { a as createSessionMetadata, p as publishSessionRegistration } from './index-CUVIZLuf.mjs';
2
- import { s as startOfflineReconnection, c as configuration, i as isAuthenticationRequiredError, l as logger } from './api-DTSpLLTK.mjs';
1
+ import { a as createSessionMetadata, p as publishSessionRegistration } from './index-Cp1I5I3U.mjs';
2
+ import { s as startOfflineReconnection, c as configuration, i as isAuthenticationRequiredError, l as logger } from './api-D3vYIva3.mjs';
3
3
  import { EventEmitter } from 'node:events';
4
4
  import { randomUUID } from 'node:crypto';
5
5
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var persistence = require('./api-Bekjk9d5.cjs');
4
- var registerKillSessionHandler = require('./registerKillSessionHandler-BYWJJDre.cjs');
3
+ var persistence = require('./api-CVuTajTL.cjs');
4
+ var registerKillSessionHandler = require('./registerKillSessionHandler-8C_Wrgor.cjs');
5
5
 
6
6
  async function runModeLoop(opts) {
7
7
  let currentMode = opts.startingMode;
@@ -1,5 +1,5 @@
1
- import { l as logger } from './api-DTSpLLTK.mjs';
2
- import { g as getPendingInteractionTimeoutMs, I as INTERACTION_SUPERSEDED_ERROR, a as INTERACTION_TIMED_OUT_ERROR } from './registerKillSessionHandler-hQE08yMO.mjs';
1
+ import { l as logger } from './api-D3vYIva3.mjs';
2
+ import { g as getPendingInteractionTimeoutMs, I as INTERACTION_SUPERSEDED_ERROR, a as INTERACTION_TIMED_OUT_ERROR } from './registerKillSessionHandler-OhhMUuCQ.mjs';
3
3
 
4
4
  async function runModeLoop(opts) {
5
5
  let currentMode = opts.startingMode;
@@ -38,7 +38,7 @@ function _interopNamespaceDefault(e) {
38
38
  var z__namespace = /*#__PURE__*/_interopNamespaceDefault(z);
39
39
 
40
40
  var name = "happy-imou-cloud";
41
- var version = "2.1.46";
41
+ var version = "2.1.47";
42
42
  var description = "hicloud - Imou 企业定制版。关键是 happy!移动端远程 AI 编程工具,支持 Claude Code、Codex 和 Gemini CLI";
43
43
  var author = "long.zhu";
44
44
  var license = "MIT";
@@ -18,7 +18,7 @@ import { spawn } from 'node:child_process';
18
18
  import { Expo } from 'expo-server-sdk';
19
19
 
20
20
  var name = "happy-imou-cloud";
21
- var version = "2.1.46";
21
+ var version = "2.1.47";
22
22
  var description = "hicloud - Imou 企业定制版。关键是 happy!移动端远程 AI 编程工具,支持 Claude Code、Codex 和 Gemini CLI";
23
23
  var author = "long.zhu";
24
24
  var license = "MIT";
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-DkaYNlRO.cjs');
3
+ var index = require('./index-CyW9A7hx.cjs');
4
4
  require('chalk');
5
- require('./api-Bekjk9d5.cjs');
5
+ require('./api-CVuTajTL.cjs');
6
6
  require('axios');
7
7
  require('fs');
8
8
  require('node:fs');
@@ -20,7 +20,6 @@ require('path');
20
20
  require('node:child_process');
21
21
  require('expo-server-sdk');
22
22
  require('os');
23
- require('tmp');
24
23
  require('qrcode-terminal');
25
24
  require('node:module');
26
25
  require('open');
@@ -1,6 +1,6 @@
1
- import { c as createDefaultRuntimeShell } from './index-CUVIZLuf.mjs';
1
+ import { c as createDefaultRuntimeShell } from './index-Cp1I5I3U.mjs';
2
2
  import 'chalk';
3
- import './api-DTSpLLTK.mjs';
3
+ import './api-D3vYIva3.mjs';
4
4
  import 'axios';
5
5
  import 'fs';
6
6
  import 'node:fs';
@@ -18,7 +18,6 @@ import 'path';
18
18
  import 'node:child_process';
19
19
  import 'expo-server-sdk';
20
20
  import 'os';
21
- import 'tmp';
22
21
  import 'qrcode-terminal';
23
22
  import 'node:module';
24
23
  import 'open';
@@ -1,16 +1,15 @@
1
1
  import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import chalk from 'chalk';
2
- import { l as logger, q as encodeBase64, c as configuration, t as readCredentials, u as ensureSigningCredentials, r as readSettings, v as updateSettings, w as encodeBase64Url, m as delay, x as buildClientHeaders, y as decodeBase64, z as writeCredentialsLegacy, B as writeCredentialsDataKey, C as readDaemonState, D as HAPPY_CLOUD_DAEMON_PORT, E as clearDaemonState, F as packageJson, i as isAuthenticationRequiredError, G as buildSessionRuntimeIndex, I as acquireDaemonLock, J as writeDaemonState, A as ApiClient, K as releaseDaemonLock, L as validateProfileForAgent, M as getProfileEnvironmentVariables, N as clearCredentials, O as clearMachineId, P as readHappyOrgDispatchTruthSnapshot, Q as processHappyOrgRepoRequests, R as readHappyOrgRepoTaskBoard, S as HappyOrgTurnReportSchema, T as recordHappyOrgTurnReport, U as MessageContentSchema, V as buildSocketAuth, W as encrypt, H as HeadTailPreviewBuffer, X as getLatestDaemonLog } from './api-DTSpLLTK.mjs';
2
+ import { l as logger, q as encodeBase64, c as configuration, t as readCredentials, u as ensureSigningCredentials, r as readSettings, v as updateSettings, w as encodeBase64Url, m as delay, x as buildClientHeaders, y as decodeBase64, z as writeCredentialsLegacy, B as writeCredentialsDataKey, C as readDaemonState, D as HAPPY_CLOUD_DAEMON_PORT, E as clearDaemonState, F as packageJson, i as isAuthenticationRequiredError, G as buildSessionRuntimeIndex, I as acquireDaemonLock, J as writeDaemonState, A as ApiClient, K as releaseDaemonLock, L as validateProfileForAgent, M as getProfileEnvironmentVariables, N as clearCredentials, O as clearMachineId, P as readHappyOrgDispatchTruthSnapshot, Q as processHappyOrgRepoRequests, R as readHappyOrgRepoTaskBoard, S as HappyOrgTurnReportSchema, T as recordHappyOrgTurnReport, U as MessageContentSchema, V as buildSocketAuth, W as encrypt, H as HeadTailPreviewBuffer, X as getLatestDaemonLog } from './api-D3vYIva3.mjs';
3
3
  import { z } from 'zod';
4
4
  import fs, { writeFile as writeFile$1, rename, unlink as unlink$1 } from 'fs/promises';
5
- import os$1, { homedir } from 'os';
6
- import * as tmp from 'tmp';
5
+ import os$1, { homedir as homedir$1 } from 'os';
7
6
  import { randomUUID, randomBytes, createCipheriv } from 'node:crypto';
8
7
  import tweetnacl from 'tweetnacl';
9
8
  import axios from 'axios';
10
9
  import qrcode from 'qrcode-terminal';
11
10
  import { writeFile, unlink, readdir, readFile, mkdir } from 'node:fs/promises';
12
11
  import { createRequire } from 'node:module';
13
- import os, { tmpdir, homedir as homedir$1 } from 'node:os';
12
+ import os, { tmpdir, homedir } from 'node:os';
14
13
  import path, { join, resolve as resolve$1, dirname as dirname$1, normalize, isAbsolute, delimiter, relative, basename } from 'node:path';
15
14
  import open from 'open';
16
15
  import React, { useState } from 'react';
@@ -18,11 +17,11 @@ import { useInput, Box, Text, render } from 'ink';
18
17
  import { spawn, execSync, exec } from 'child_process';
19
18
  import { dirname, resolve, join as join$1 } from 'path';
20
19
  import { fileURLToPath } from 'url';
21
- import { readFileSync as readFileSync$1, existsSync as existsSync$1, writeFileSync, chmodSync, unlinkSync as unlinkSync$1, mkdirSync } from 'fs';
20
+ import { readFileSync as readFileSync$1, existsSync as existsSync$1, writeFileSync as writeFileSync$1, chmodSync, unlinkSync as unlinkSync$1, mkdirSync as mkdirSync$1 } from 'fs';
22
21
  import { execFileSync, spawn as spawn$2, execSync as execSync$1 } from 'node:child_process';
23
22
  import psList from 'ps-list';
24
23
  import spawn$1 from 'cross-spawn';
25
- import fs$1, { existsSync, readFileSync, readdirSync, statSync, unlinkSync, rmSync, mkdirSync as mkdirSync$1, mkdtempSync, cpSync, realpathSync } from 'node:fs';
24
+ import fs$1, { existsSync, readFileSync, readdirSync, statSync, unlinkSync, mkdirSync, writeFileSync, cpSync, rmSync, mkdtempSync, realpathSync } from 'node:fs';
26
25
  import fastify from 'fastify';
27
26
  import { validatorCompiler, serializerCompiler } from 'fastify-type-provider-zod';
28
27
  import { randomUUID as randomUUID$1, randomBytes as randomBytes$1, createHash } from 'crypto';
@@ -3409,6 +3408,50 @@ function resolveTrackedHappySessionId(opts) {
3409
3408
  return opts.precreatedSessionId ?? opts.requestedSessionId;
3410
3409
  }
3411
3410
 
3411
+ const CODEX_HOME_CONFIG_FILES = [
3412
+ "config.toml",
3413
+ "cap_sid",
3414
+ "version.json",
3415
+ "MEMORY.md"
3416
+ ];
3417
+ const CODEX_HOME_CONFIG_DIRS = [
3418
+ "rules",
3419
+ "skills"
3420
+ ];
3421
+ function copyCodexHomeEntry$1(sourcePath, destPath) {
3422
+ if (!existsSync(sourcePath)) {
3423
+ return;
3424
+ }
3425
+ mkdirSync(dirname$1(destPath), { recursive: true });
3426
+ cpSync(sourcePath, destPath, {
3427
+ recursive: true,
3428
+ force: true,
3429
+ dereference: false,
3430
+ verbatimSymlinks: true
3431
+ });
3432
+ }
3433
+ function createDaemonCodexAuthHome(options) {
3434
+ const sourceHomeDir = options.sourceHomeDir ?? join(homedir(), ".codex");
3435
+ const targetHomeDir = options.tempDir;
3436
+ mkdirSync(targetHomeDir, { recursive: true });
3437
+ for (const fileName of CODEX_HOME_CONFIG_FILES) {
3438
+ try {
3439
+ copyCodexHomeEntry$1(join(sourceHomeDir, fileName), join(targetHomeDir, fileName));
3440
+ } catch (error) {
3441
+ logger.debug(`[codex] Failed to copy source CODEX_HOME file ${fileName} into daemon auth home`, error);
3442
+ }
3443
+ }
3444
+ for (const dirName of CODEX_HOME_CONFIG_DIRS) {
3445
+ try {
3446
+ copyCodexHomeEntry$1(join(sourceHomeDir, dirName), join(targetHomeDir, dirName));
3447
+ } catch (error) {
3448
+ logger.debug(`[codex] Failed to copy source CODEX_HOME directory ${dirName} into daemon auth home`, error);
3449
+ }
3450
+ }
3451
+ writeFileSync(join(targetHomeDir, "auth.json"), options.authJson, "utf8");
3452
+ return targetHomeDir;
3453
+ }
3454
+
3412
3455
  const DEFAULT_SESSION_WEBHOOK_TIMEOUT_MS = 45e3;
3413
3456
  const DEFAULT_TRACKED_SESSION_SWEEP_INTERVAL_MS = 5e3;
3414
3457
  function resolveSessionWebhookTimeoutMs() {
@@ -3619,9 +3662,11 @@ async function startDaemon() {
3619
3662
  const authEnv = {};
3620
3663
  if (options.token) {
3621
3664
  if (options.agent === "codex") {
3622
- const codexHomeDir = tmp.dirSync();
3623
- fs.writeFile(join$1(codexHomeDir.name, "auth.json"), options.token);
3624
- authEnv.CODEX_HOME = codexHomeDir.name;
3665
+ const codexHomeDir = await fs.mkdtemp(join$1(os$1.tmpdir(), "happy-codex-daemon-home-"));
3666
+ authEnv.CODEX_HOME = createDaemonCodexAuthHome({
3667
+ authJson: options.token,
3668
+ tempDir: codexHomeDir
3669
+ });
3625
3670
  } else {
3626
3671
  authEnv.CLAUDE_CODE_OAUTH_TOKEN = options.token;
3627
3672
  }
@@ -4337,7 +4382,7 @@ async function install$1() {
4337
4382
  </dict>
4338
4383
  </plist>
4339
4384
  `);
4340
- writeFileSync(PLIST_FILE$1, plistContent);
4385
+ writeFileSync$1(PLIST_FILE$1, plistContent);
4341
4386
  chmodSync(PLIST_FILE$1, 420);
4342
4387
  logger.info(`Created daemon plist at ${PLIST_FILE$1}`);
4343
4388
  execSync(`launchctl load ${PLIST_FILE$1}`, { stdio: "inherit" });
@@ -5190,10 +5235,10 @@ async function handleConnectStatus() {
5190
5235
  }
5191
5236
  function updateLocalGeminiCredentials(tokens) {
5192
5237
  try {
5193
- const geminiDir = join$1(homedir(), ".gemini");
5238
+ const geminiDir = join$1(homedir$1(), ".gemini");
5194
5239
  const credentialsPath = join$1(geminiDir, "oauth_creds.json");
5195
5240
  if (!existsSync$1(geminiDir)) {
5196
- mkdirSync(geminiDir, { recursive: true });
5241
+ mkdirSync$1(geminiDir, { recursive: true });
5197
5242
  }
5198
5243
  const credentials = {
5199
5244
  access_token: tokens.access_token,
@@ -5203,7 +5248,7 @@ function updateLocalGeminiCredentials(tokens) {
5203
5248
  ...tokens.id_token && { id_token: tokens.id_token },
5204
5249
  ...tokens.expires_in && { expires_in: tokens.expires_in }
5205
5250
  };
5206
- writeFileSync(credentialsPath, JSON.stringify(credentials, null, 2), "utf-8");
5251
+ writeFileSync$1(credentialsPath, JSON.stringify(credentials, null, 2), "utf-8");
5207
5252
  console.log(chalk.gray(` Updated local credentials: ${credentialsPath}`));
5208
5253
  } catch (error) {
5209
5254
  console.log(chalk.yellow(` \u26A0\uFE0F Could not update local credentials: ${error}`));
@@ -6111,7 +6156,7 @@ function getProjectPath(workingDirectory, claudeConfigDirOverride) {
6111
6156
  const projectId = resolve$1(workingDirectory).replace(/[^a-zA-Z0-9-]/g, "-");
6112
6157
  const claudeConfigDirRaw = process.env.CLAUDE_CONFIG_DIR ?? "";
6113
6158
  const claudeConfigDirTrimmed = claudeConfigDirRaw.trim();
6114
- const claudeConfigDir = claudeConfigDirTrimmed ? claudeConfigDirTrimmed : join(homedir$1(), ".claude");
6159
+ const claudeConfigDir = claudeConfigDirTrimmed ? claudeConfigDirTrimmed : join(homedir(), ".claude");
6115
6160
  return join(claudeConfigDir, "projects", projectId);
6116
6161
  }
6117
6162
 
@@ -6176,7 +6221,7 @@ class ExitCodeError extends Error {
6176
6221
  const claudeCliPath = resolve$1(join(projectPath(), "scripts", "claude_local_launcher.cjs"));
6177
6222
  async function claudeLocal(opts) {
6178
6223
  const projectDir = getProjectPath(opts.path);
6179
- mkdirSync$1(projectDir, { recursive: true });
6224
+ mkdirSync(projectDir, { recursive: true });
6180
6225
  const hasContinueFlag = opts.claudeArgs?.includes("--continue");
6181
6226
  const hasResumeFlag = opts.claudeArgs?.includes("--resume");
6182
6227
  const hasUserSessionControl = hasContinueFlag || hasResumeFlag;
@@ -9782,12 +9827,12 @@ function readGeminiLocalConfig() {
9782
9827
  let googleCloudProject = null;
9783
9828
  let googleCloudProjectEmail = null;
9784
9829
  const possiblePaths = [
9785
- join$1(homedir(), ".gemini", "oauth_creds.json"),
9830
+ join$1(homedir$1(), ".gemini", "oauth_creds.json"),
9786
9831
  // Main OAuth credentials file
9787
- join$1(homedir(), ".gemini", "config.json"),
9788
- join$1(homedir(), ".config", "gemini", "config.json"),
9789
- join$1(homedir(), ".gemini", "auth.json"),
9790
- join$1(homedir(), ".config", "gemini", "auth.json")
9832
+ join$1(homedir$1(), ".gemini", "config.json"),
9833
+ join$1(homedir$1(), ".config", "gemini", "config.json"),
9834
+ join$1(homedir$1(), ".gemini", "auth.json"),
9835
+ join$1(homedir$1(), ".config", "gemini", "auth.json")
9791
9836
  ];
9792
9837
  for (const configPath of possiblePaths) {
9793
9838
  if (existsSync$1(configPath)) {
@@ -9865,10 +9910,10 @@ function determineGeminiModel(explicitModel, localConfig) {
9865
9910
  }
9866
9911
  function saveGeminiModelToConfig(model) {
9867
9912
  try {
9868
- const configDir = join$1(homedir(), ".gemini");
9913
+ const configDir = join$1(homedir$1(), ".gemini");
9869
9914
  const configPath = join$1(configDir, "config.json");
9870
9915
  if (!existsSync$1(configDir)) {
9871
- mkdirSync(configDir, { recursive: true });
9916
+ mkdirSync$1(configDir, { recursive: true });
9872
9917
  }
9873
9918
  let config = {};
9874
9919
  if (existsSync$1(configPath)) {
@@ -9880,7 +9925,7 @@ function saveGeminiModelToConfig(model) {
9880
9925
  }
9881
9926
  }
9882
9927
  config.model = model;
9883
- writeFileSync(configPath, JSON.stringify(config, null, 2), "utf-8");
9928
+ writeFileSync$1(configPath, JSON.stringify(config, null, 2), "utf-8");
9884
9929
  logger.debug(`[Gemini] Saved model "${model}" to ${configPath}`);
9885
9930
  } catch (error) {
9886
9931
  logger.debug(`[Gemini] Failed to save model to config:`, error);
@@ -9888,10 +9933,10 @@ function saveGeminiModelToConfig(model) {
9888
9933
  }
9889
9934
  function saveGoogleCloudProjectToConfig(projectId, email) {
9890
9935
  try {
9891
- const configDir = join$1(homedir(), ".gemini");
9936
+ const configDir = join$1(homedir$1(), ".gemini");
9892
9937
  const configPath = join$1(configDir, "config.json");
9893
9938
  if (!existsSync$1(configDir)) {
9894
- mkdirSync(configDir, { recursive: true });
9939
+ mkdirSync$1(configDir, { recursive: true });
9895
9940
  }
9896
9941
  let config = {};
9897
9942
  if (existsSync$1(configPath)) {
@@ -9905,7 +9950,7 @@ function saveGoogleCloudProjectToConfig(projectId, email) {
9905
9950
  if (email) {
9906
9951
  config.googleCloudProjectEmail = email;
9907
9952
  }
9908
- writeFileSync(configPath, JSON.stringify(config, null, 2), "utf-8");
9953
+ writeFileSync$1(configPath, JSON.stringify(config, null, 2), "utf-8");
9909
9954
  logger.debug(`[Gemini] Saved Google Cloud Project "${projectId}"${email ? ` for ${email}` : ""} to ${configPath}`);
9910
9955
  } catch (error) {
9911
9956
  logger.debug(`[Gemini] Failed to save Google Cloud Project to config:`, error);
@@ -10410,7 +10455,7 @@ function copyCodexHomeEntry(sourcePath, destPath) {
10410
10455
  if (!existsSync(sourcePath)) {
10411
10456
  return;
10412
10457
  }
10413
- mkdirSync$1(dirname$1(destPath), { recursive: true });
10458
+ mkdirSync(dirname$1(destPath), { recursive: true });
10414
10459
  cpSync(sourcePath, destPath, {
10415
10460
  recursive: true,
10416
10461
  force: true,
@@ -10494,7 +10539,7 @@ function seedCodexSkillEntries(sourceSkillsDir, isolatedHomeDir, sourceLabel) {
10494
10539
  return;
10495
10540
  }
10496
10541
  const destSkillsDir = join(isolatedHomeDir, "skills");
10497
- mkdirSync$1(destSkillsDir, { recursive: true });
10542
+ mkdirSync(destSkillsDir, { recursive: true });
10498
10543
  for (const entryName of readdirSync(sourceSkillsDir)) {
10499
10544
  const sourceEntryPath = join(sourceSkillsDir, entryName);
10500
10545
  if (!shouldSeedCodexSkillEntry(sourceEntryPath)) {
@@ -10677,7 +10722,7 @@ function prepareCodexAcpEnvironment(overrides = {}, options = {}) {
10677
10722
  return { env };
10678
10723
  }
10679
10724
  }
10680
- const sourceHomeDir = options.sourceHomeDir ?? join(homedir$1(), ".codex");
10725
+ const sourceHomeDir = options.sourceHomeDir ?? join(homedir(), ".codex");
10681
10726
  const bundledSkillsDir = options.bundledSkillsDir ?? join(projectPath(), "skills");
10682
10727
  if (shouldUseSourceCodexHomeForMutableAuth(sourceHomeDir)) {
10683
10728
  logger.debug("[codex] Using source CODEX_HOME for mutable Codex auth credentials");
@@ -10689,7 +10734,7 @@ function prepareCodexAcpEnvironment(overrides = {}, options = {}) {
10689
10734
  }
10690
10735
  const tempDirFactory = options.tempDirFactory ?? mkdtempSync;
10691
10736
  const isolatedHomeDir = tempDirFactory(join(tmpdir(), "happy-codex-home-"));
10692
- mkdirSync$1(isolatedHomeDir, { recursive: true });
10737
+ mkdirSync(isolatedHomeDir, { recursive: true });
10693
10738
  seedIsolatedCodexHome(sourceHomeDir, isolatedHomeDir, bundledSkillsDir, options.resumeSessionId, platform);
10694
10739
  env.CODEX_HOME = isolatedHomeDir;
10695
10740
  return {
@@ -10859,7 +10904,7 @@ function getGlobalClaudeVersion() {
10859
10904
  const output = execSync$1("claude --version", {
10860
10905
  encoding: "utf8",
10861
10906
  stdio: ["pipe", "pipe", "pipe"],
10862
- cwd: homedir$1(),
10907
+ cwd: homedir(),
10863
10908
  env: cleanEnv,
10864
10909
  windowsHide: true
10865
10910
  }).trim();
@@ -10896,7 +10941,7 @@ function getCleanEnv() {
10896
10941
  return env;
10897
10942
  }
10898
10943
  function findGlobalClaudePath() {
10899
- const homeDir = homedir$1();
10944
+ const homeDir = homedir();
10900
10945
  const cleanEnv = getCleanEnv();
10901
10946
  try {
10902
10947
  execSync$1("claude --version", {
@@ -12176,14 +12221,14 @@ var launch = /*#__PURE__*/Object.freeze({
12176
12221
  const unifiedProviderExecutors = {
12177
12222
  claude: async (opts) => {
12178
12223
  const claudeOptions = opts.claudeOptions ?? {};
12179
- const { runClaude } = await import('./runClaude-CFeIMCY2.mjs');
12224
+ const { runClaude } = await import('./runClaude-BviM1Wl5.mjs');
12180
12225
  await runClaude(opts.credentials, {
12181
12226
  ...claudeOptions,
12182
12227
  startingMode: claudeOptions.startingMode ?? (claudeOptions.startedBy === "daemon" ? "remote" : void 0)
12183
12228
  });
12184
12229
  },
12185
12230
  codex: async (opts) => {
12186
- const { runCodex } = await import('./runCodex-ByjUfTyr.mjs');
12231
+ const { runCodex } = await import('./runCodex-Dx3osc7U.mjs');
12187
12232
  await runCodex({
12188
12233
  credentials: opts.credentials,
12189
12234
  startedBy: opts.startedBy,
@@ -12192,7 +12237,7 @@ const unifiedProviderExecutors = {
12192
12237
  });
12193
12238
  },
12194
12239
  gemini: async (opts) => {
12195
- const { runGemini } = await import('./runGemini-CihCRgcR.mjs');
12240
+ const { runGemini } = await import('./runGemini-CnJ75Q--.mjs');
12196
12241
  await runGemini({
12197
12242
  credentials: opts.credentials,
12198
12243
  startedBy: opts.startedBy
@@ -12275,7 +12320,7 @@ function shouldRunMainClaudeFlow(opts) {
12275
12320
  return;
12276
12321
  } else if (subcommand === "runtime") {
12277
12322
  if (args[1] === "providers") {
12278
- const { renderRuntimeProviders } = await import('./command-umgXYSY2.mjs');
12323
+ const { renderRuntimeProviders } = await import('./command-fcJ-4Yq3.mjs');
12279
12324
  console.log(renderRuntimeProviders());
12280
12325
  return;
12281
12326
  }
@@ -12481,8 +12526,8 @@ function shouldRunMainClaudeFlow(opts) {
12481
12526
  const projectId = args[3];
12482
12527
  try {
12483
12528
  const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return config; });
12484
- const { readCredentials: readCredentials2 } = await import('./api-DTSpLLTK.mjs').then(function (n) { return n.Y; });
12485
- const { ApiClient: ApiClient2 } = await import('./api-DTSpLLTK.mjs').then(function (n) { return n.Z; });
12529
+ const { readCredentials: readCredentials2 } = await import('./api-D3vYIva3.mjs').then(function (n) { return n.Y; });
12530
+ const { ApiClient: ApiClient2 } = await import('./api-D3vYIva3.mjs').then(function (n) { return n.Z; });
12486
12531
  let userEmail = void 0;
12487
12532
  try {
12488
12533
  const credentials = await readCredentials2();
@@ -1,11 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var chalk = require('chalk');
4
- var persistence = require('./api-Bekjk9d5.cjs');
4
+ var persistence = require('./api-CVuTajTL.cjs');
5
5
  var z = require('zod');
6
6
  var fs$2 = require('fs/promises');
7
7
  var os$1 = require('os');
8
- var tmp = require('tmp');
9
8
  var node_crypto = require('node:crypto');
10
9
  var tweetnacl = require('tweetnacl');
11
10
  var axios = require('axios');
@@ -37,25 +36,6 @@ var node_url = require('node:url');
37
36
  require('node:events');
38
37
 
39
38
  var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
40
- function _interopNamespaceDefault(e) {
41
- var n = Object.create(null);
42
- if (e) {
43
- Object.keys(e).forEach(function (k) {
44
- if (k !== 'default') {
45
- var d = Object.getOwnPropertyDescriptor(e, k);
46
- Object.defineProperty(n, k, d.get ? d : {
47
- enumerable: true,
48
- get: function () { return e[k]; }
49
- });
50
- }
51
- });
52
- }
53
- n.default = e;
54
- return Object.freeze(n);
55
- }
56
-
57
- var tmp__namespace = /*#__PURE__*/_interopNamespaceDefault(tmp);
58
-
59
39
  async function openBrowser(url) {
60
40
  try {
61
41
  if (!process.stdout.isTTY || process.env.CI || process.env.HEADLESS) {
@@ -72,7 +52,7 @@ async function openBrowser(url) {
72
52
  }
73
53
  }
74
54
 
75
- 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-DkaYNlRO.cjs', document.baseURI).href)));
55
+ 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-CyW9A7hx.cjs', document.baseURI).href)));
76
56
  const QRCode = require$1("qrcode-terminal/vendor/QRCode");
77
57
  const QRErrorCorrectLevel = require$1("qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel");
78
58
  const pendingTempFiles = /* @__PURE__ */ new Set();
@@ -637,7 +617,7 @@ function setupCleanupHandlers() {
637
617
  });
638
618
  }
639
619
 
640
- const __dirname$2 = path$1.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-DkaYNlRO.cjs', document.baseURI).href))));
620
+ const __dirname$2 = path$1.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-CyW9A7hx.cjs', document.baseURI).href))));
641
621
  function projectPath() {
642
622
  const path = path$1.resolve(__dirname$2, "..");
643
623
  return path;
@@ -3431,6 +3411,50 @@ function resolveTrackedHappySessionId(opts) {
3431
3411
  return opts.precreatedSessionId ?? opts.requestedSessionId;
3432
3412
  }
3433
3413
 
3414
+ const CODEX_HOME_CONFIG_FILES = [
3415
+ "config.toml",
3416
+ "cap_sid",
3417
+ "version.json",
3418
+ "MEMORY.md"
3419
+ ];
3420
+ const CODEX_HOME_CONFIG_DIRS = [
3421
+ "rules",
3422
+ "skills"
3423
+ ];
3424
+ function copyCodexHomeEntry$1(sourcePath, destPath) {
3425
+ if (!fs.existsSync(sourcePath)) {
3426
+ return;
3427
+ }
3428
+ fs.mkdirSync(path.dirname(destPath), { recursive: true });
3429
+ fs.cpSync(sourcePath, destPath, {
3430
+ recursive: true,
3431
+ force: true,
3432
+ dereference: false,
3433
+ verbatimSymlinks: true
3434
+ });
3435
+ }
3436
+ function createDaemonCodexAuthHome(options) {
3437
+ const sourceHomeDir = options.sourceHomeDir ?? path.join(os.homedir(), ".codex");
3438
+ const targetHomeDir = options.tempDir;
3439
+ fs.mkdirSync(targetHomeDir, { recursive: true });
3440
+ for (const fileName of CODEX_HOME_CONFIG_FILES) {
3441
+ try {
3442
+ copyCodexHomeEntry$1(path.join(sourceHomeDir, fileName), path.join(targetHomeDir, fileName));
3443
+ } catch (error) {
3444
+ persistence.logger.debug(`[codex] Failed to copy source CODEX_HOME file ${fileName} into daemon auth home`, error);
3445
+ }
3446
+ }
3447
+ for (const dirName of CODEX_HOME_CONFIG_DIRS) {
3448
+ try {
3449
+ copyCodexHomeEntry$1(path.join(sourceHomeDir, dirName), path.join(targetHomeDir, dirName));
3450
+ } catch (error) {
3451
+ persistence.logger.debug(`[codex] Failed to copy source CODEX_HOME directory ${dirName} into daemon auth home`, error);
3452
+ }
3453
+ }
3454
+ fs.writeFileSync(path.join(targetHomeDir, "auth.json"), options.authJson, "utf8");
3455
+ return targetHomeDir;
3456
+ }
3457
+
3434
3458
  const DEFAULT_SESSION_WEBHOOK_TIMEOUT_MS = 45e3;
3435
3459
  const DEFAULT_TRACKED_SESSION_SWEEP_INTERVAL_MS = 5e3;
3436
3460
  function resolveSessionWebhookTimeoutMs() {
@@ -3641,9 +3665,11 @@ async function startDaemon() {
3641
3665
  const authEnv = {};
3642
3666
  if (options.token) {
3643
3667
  if (options.agent === "codex") {
3644
- const codexHomeDir = tmp__namespace.dirSync();
3645
- fs$2.writeFile(path$1.join(codexHomeDir.name, "auth.json"), options.token);
3646
- authEnv.CODEX_HOME = codexHomeDir.name;
3668
+ const codexHomeDir = await fs$2.mkdtemp(path$1.join(os$1.tmpdir(), "happy-codex-daemon-home-"));
3669
+ authEnv.CODEX_HOME = createDaemonCodexAuthHome({
3670
+ authJson: options.token,
3671
+ tempDir: codexHomeDir
3672
+ });
3647
3673
  } else {
3648
3674
  authEnv.CLAUDE_CODE_OAUTH_TOKEN = options.token;
3649
3675
  }
@@ -10873,7 +10899,7 @@ class AbortError extends Error {
10873
10899
  }
10874
10900
  }
10875
10901
 
10876
- 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-DkaYNlRO.cjs', document.baseURI).href)));
10902
+ 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-CyW9A7hx.cjs', document.baseURI).href)));
10877
10903
  const __dirname$1 = path.join(__filename$1, "..");
10878
10904
  function getGlobalClaudeVersion() {
10879
10905
  try {
@@ -12198,14 +12224,14 @@ var launch = /*#__PURE__*/Object.freeze({
12198
12224
  const unifiedProviderExecutors = {
12199
12225
  claude: async (opts) => {
12200
12226
  const claudeOptions = opts.claudeOptions ?? {};
12201
- const { runClaude } = await Promise.resolve().then(function () { return require('./runClaude-jpo2aFey.cjs'); });
12227
+ const { runClaude } = await Promise.resolve().then(function () { return require('./runClaude-CfdT_ccS.cjs'); });
12202
12228
  await runClaude(opts.credentials, {
12203
12229
  ...claudeOptions,
12204
12230
  startingMode: claudeOptions.startingMode ?? (claudeOptions.startedBy === "daemon" ? "remote" : void 0)
12205
12231
  });
12206
12232
  },
12207
12233
  codex: async (opts) => {
12208
- const { runCodex } = await Promise.resolve().then(function () { return require('./runCodex-CrxyWcga.cjs'); });
12234
+ const { runCodex } = await Promise.resolve().then(function () { return require('./runCodex-B-t0yy4k.cjs'); });
12209
12235
  await runCodex({
12210
12236
  credentials: opts.credentials,
12211
12237
  startedBy: opts.startedBy,
@@ -12214,7 +12240,7 @@ const unifiedProviderExecutors = {
12214
12240
  });
12215
12241
  },
12216
12242
  gemini: async (opts) => {
12217
- const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-BhIz1N_b.cjs'); });
12243
+ const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-DZ5-uzB9.cjs'); });
12218
12244
  await runGemini({
12219
12245
  credentials: opts.credentials,
12220
12246
  startedBy: opts.startedBy
@@ -12297,7 +12323,7 @@ function shouldRunMainClaudeFlow(opts) {
12297
12323
  return;
12298
12324
  } else if (subcommand === "runtime") {
12299
12325
  if (args[1] === "providers") {
12300
- const { renderRuntimeProviders } = await Promise.resolve().then(function () { return require('./command-BwhJX0G5.cjs'); });
12326
+ const { renderRuntimeProviders } = await Promise.resolve().then(function () { return require('./command-BZRQuZsh.cjs'); });
12301
12327
  console.log(renderRuntimeProviders());
12302
12328
  return;
12303
12329
  }
@@ -12503,8 +12529,8 @@ function shouldRunMainClaudeFlow(opts) {
12503
12529
  const projectId = args[3];
12504
12530
  try {
12505
12531
  const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return config; });
12506
- const { readCredentials: readCredentials2 } = await Promise.resolve().then(function () { return require('./api-Bekjk9d5.cjs'); }).then(function (n) { return n.persistence; });
12507
- const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./api-Bekjk9d5.cjs'); }).then(function (n) { return n.api; });
12532
+ const { readCredentials: readCredentials2 } = await Promise.resolve().then(function () { return require('./api-CVuTajTL.cjs'); }).then(function (n) { return n.persistence; });
12533
+ const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./api-CVuTajTL.cjs'); }).then(function (n) { return n.api; });
12508
12534
  let userEmail = void 0;
12509
12535
  try {
12510
12536
  const credentials = await readCredentials2();
package/dist/index.cjs CHANGED
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
3
  require('chalk');
4
- require('./api-Bekjk9d5.cjs');
4
+ require('./api-CVuTajTL.cjs');
5
5
  require('zod');
6
- require('./index-DkaYNlRO.cjs');
6
+ require('./index-CyW9A7hx.cjs');
7
7
  require('node:child_process');
8
8
  require('node:fs');
9
9
  require('cross-spawn');
@@ -25,7 +25,6 @@ require('axios');
25
25
  require('socket.io-client');
26
26
  require('tweetnacl');
27
27
  require('expo-server-sdk');
28
- require('tmp');
29
28
  require('qrcode-terminal');
30
29
  require('node:module');
31
30
  require('open');
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import 'chalk';
2
- import './api-DTSpLLTK.mjs';
2
+ import './api-D3vYIva3.mjs';
3
3
  import 'zod';
4
- import './index-CUVIZLuf.mjs';
4
+ import './index-Cp1I5I3U.mjs';
5
5
  import 'node:child_process';
6
6
  import 'node:fs';
7
7
  import 'cross-spawn';
@@ -23,7 +23,6 @@ import 'axios';
23
23
  import 'socket.io-client';
24
24
  import 'tweetnacl';
25
25
  import 'expo-server-sdk';
26
- import 'tmp';
27
26
  import 'qrcode-terminal';
28
27
  import 'node:module';
29
28
  import 'open';
package/dist/lib.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var persistence = require('./api-Bekjk9d5.cjs');
3
+ var persistence = require('./api-CVuTajTL.cjs');
4
4
  var types = require('./types-DVk3crez.cjs');
5
5
  require('axios');
6
6
  require('chalk');
package/dist/lib.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { A as ApiClient, a as ApiSessionClient, c as configuration, l as logger } from './api-DTSpLLTK.mjs';
1
+ export { A as ApiClient, a as ApiSessionClient, c as configuration, l as logger } from './api-D3vYIva3.mjs';
2
2
  export { R as RawJSONLinesSchema } from './types-CiliQpqS.mjs';
3
3
  import 'axios';
4
4
  import 'chalk';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-DkaYNlRO.cjs');
4
- var persistence = require('./api-Bekjk9d5.cjs');
3
+ var index = require('./index-CyW9A7hx.cjs');
4
+ var persistence = require('./api-CVuTajTL.cjs');
5
5
  var node_crypto = require('node:crypto');
6
6
  var path = require('node:path');
7
7
  require('axios');
@@ -1,5 +1,5 @@
1
- import { m as initialMachineMetadata, R as RuntimeShell, f as formatDisplayMessage, n as resolveCanonicalToolNameV2, o as isTerminalReferenceOnlyPayload, t as truncateDisplayMessage } from './index-CUVIZLuf.mjs';
2
- import { r as readSettings, H as HeadTailPreviewBuffer, e as HAPPY_ORG_REPLY_ACK_VERSION, f as HAPPY_ORG_TURN_REPORT_TAG, g as HAPPY_ORG_SUMMARY_MAX_LENGTH, j as HAPPY_ORG_REPEAT_THRESHOLD, l as logger, n as normalizePreviewableArtifactTarget } from './api-DTSpLLTK.mjs';
1
+ import { m as initialMachineMetadata, R as RuntimeShell, f as formatDisplayMessage, n as resolveCanonicalToolNameV2, o as isTerminalReferenceOnlyPayload, t as truncateDisplayMessage } from './index-Cp1I5I3U.mjs';
2
+ import { r as readSettings, H as HeadTailPreviewBuffer, e as HAPPY_ORG_REPLY_ACK_VERSION, f as HAPPY_ORG_TURN_REPORT_TAG, g as HAPPY_ORG_SUMMARY_MAX_LENGTH, j as HAPPY_ORG_REPEAT_THRESHOLD, l as logger, n as normalizePreviewableArtifactTarget } from './api-D3vYIva3.mjs';
3
3
  import { randomUUID } from 'node:crypto';
4
4
  import { basename } from 'node:path';
5
5
  import 'axios';
@@ -1,8 +1,8 @@
1
1
  import { randomUUID } from 'node:crypto';
2
- import { l as logger, k as backoff, m as delay, d as AssistantMessageStream, o as AsyncLock, c as configuration, s as startOfflineReconnection, b as connectionState, A as ApiClient, i as isAuthenticationRequiredError, h as hashObject } from './api-DTSpLLTK.mjs';
2
+ import { l as logger, k as backoff, m as delay, d as AssistantMessageStream, o as AsyncLock, c as configuration, s as startOfflineReconnection, b as connectionState, A as ApiClient, i as isAuthenticationRequiredError, h as hashObject } from './api-D3vYIva3.mjs';
3
3
  import 'cross-spawn';
4
4
  import '@agentclientprotocol/sdk';
5
- import { q as getProjectPath, F as Future, u as claudeLocal, E as ExitCodeError, w as trimIdent, x as createClaudeBackend, f as formatDisplayMessage, t as truncateDisplayMessage, y as claudeCheckSession, z as projectPath, B as mapToClaudeMode, P as PushableAsyncIterable, C as query, D as AbortError, e as stopCaffeinate, p as publishSessionRegistration, H as getEnvironmentInfo, a as createSessionMetadata, I as startCaffeinate, b as closeProviderSession } from './index-CUVIZLuf.mjs';
5
+ import { q as getProjectPath, F as Future, u as claudeLocal, E as ExitCodeError, w as trimIdent, x as createClaudeBackend, f as formatDisplayMessage, t as truncateDisplayMessage, y as claudeCheckSession, z as projectPath, B as mapToClaudeMode, P as PushableAsyncIterable, C as query, D as AbortError, e as stopCaffeinate, p as publishSessionRegistration, H as getEnvironmentInfo, a as createSessionMetadata, I as startCaffeinate, b as closeProviderSession } from './index-Cp1I5I3U.mjs';
6
6
  import 'ps-list';
7
7
  import 'fs';
8
8
  import 'path';
@@ -23,15 +23,14 @@ import 'tweetnacl';
23
23
  import 'open';
24
24
  import React, { useState, useRef, useEffect, useCallback } from 'react';
25
25
  import { useStdout, useInput, Box, Text, render } from 'ink';
26
- import { c as createKeepAliveController, P as ProviderSelectionHandler, r as runModeLoop } from './ProviderSelectionHandler-BymmO261.mjs';
26
+ import { c as createKeepAliveController, P as ProviderSelectionHandler, r as runModeLoop } from './ProviderSelectionHandler-DzYObYrV.mjs';
27
27
  import { R as RawJSONLinesSchema } from './types-CiliQpqS.mjs';
28
- import { B as BasePermissionHandler, d as MessageBuffer, C as ConversationHistory$1, f as buildHappyOrgTurnPrompt, w as waitForResponseCompleteWithAbort, h as finalizeHappyOrgTurnWithBusinessAck, i as buildTurnResultPushNotification, t as createSessionTranscriptInkRenderer, j as buildReadyPushNotification, l as launchRuntimeHandleWithFactoryResult, n as renderTerminalOutputPreview, p as prepareTerminalOutputForForwarding, q as forwardAgentMessageToProviderSession, m as buildPermissionPushNotification, s as syncControlledByUserState, r as resolveHappyOrgQueuedTurn, e as ensureManagedProviderMachine, M as MissingMachineIdError, b as MessageQueue2, c as registerKillSessionHandler } from './registerKillSessionHandler-hQE08yMO.mjs';
28
+ import { B as BasePermissionHandler, d as MessageBuffer, C as ConversationHistory$1, f as buildHappyOrgTurnPrompt, w as waitForResponseCompleteWithAbort, h as finalizeHappyOrgTurnWithBusinessAck, i as buildTurnResultPushNotification, t as createSessionTranscriptInkRenderer, j as buildReadyPushNotification, l as launchRuntimeHandleWithFactoryResult, n as renderTerminalOutputPreview, p as prepareTerminalOutputForForwarding, q as forwardAgentMessageToProviderSession, m as buildPermissionPushNotification, s as syncControlledByUserState, r as resolveHappyOrgQueuedTurn, e as ensureManagedProviderMachine, M as MissingMachineIdError, b as MessageQueue2, c as registerKillSessionHandler } from './registerKillSessionHandler-OhhMUuCQ.mjs';
29
29
  import 'socket.io-client';
30
30
  import 'expo-server-sdk';
31
31
  import { isDeepStrictEqual } from 'node:util';
32
32
  import { createServer } from 'node:http';
33
33
  import 'zod';
34
- import 'tmp';
35
34
  import 'qrcode-terminal';
36
35
  import 'node:module';
37
36
  import 'url';
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var node_crypto = require('node:crypto');
4
- var persistence = require('./api-Bekjk9d5.cjs');
4
+ var persistence = require('./api-CVuTajTL.cjs');
5
5
  require('cross-spawn');
6
6
  require('@agentclientprotocol/sdk');
7
- var index = require('./index-DkaYNlRO.cjs');
7
+ var index = require('./index-CyW9A7hx.cjs');
8
8
  require('ps-list');
9
9
  require('fs');
10
10
  require('path');
@@ -25,15 +25,14 @@ require('tweetnacl');
25
25
  require('open');
26
26
  var React = require('react');
27
27
  var ink = require('ink');
28
- var ProviderSelectionHandler = require('./ProviderSelectionHandler-gaUVvyCU.cjs');
28
+ var ProviderSelectionHandler = require('./ProviderSelectionHandler-CJLlwlAu.cjs');
29
29
  var types = require('./types-DVk3crez.cjs');
30
- var registerKillSessionHandler = require('./registerKillSessionHandler-BYWJJDre.cjs');
30
+ var registerKillSessionHandler = require('./registerKillSessionHandler-8C_Wrgor.cjs');
31
31
  require('socket.io-client');
32
32
  require('expo-server-sdk');
33
33
  var node_util = require('node:util');
34
34
  var node_http = require('node:http');
35
35
  require('zod');
36
- require('tmp');
37
36
  require('qrcode-terminal');
38
37
  require('node:module');
39
38
  require('url');
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var persistence = require('./api-Bekjk9d5.cjs');
4
- var registerKillSessionHandler = require('./registerKillSessionHandler-BYWJJDre.cjs');
5
- var index = require('./index-DkaYNlRO.cjs');
3
+ var persistence = require('./api-CVuTajTL.cjs');
4
+ var registerKillSessionHandler = require('./registerKillSessionHandler-8C_Wrgor.cjs');
5
+ var index = require('./index-CyW9A7hx.cjs');
6
6
  require('cross-spawn');
7
7
  require('@agentclientprotocol/sdk');
8
8
  var node_crypto = require('node:crypto');
@@ -26,13 +26,12 @@ require('tweetnacl');
26
26
  require('open');
27
27
  var React = require('react');
28
28
  var ink = require('ink');
29
- var ProviderSelectionHandler = require('./ProviderSelectionHandler-gaUVvyCU.cjs');
30
- var BaseReasoningProcessor = require('./BaseReasoningProcessor-Bsnew7fc.cjs');
29
+ var ProviderSelectionHandler = require('./ProviderSelectionHandler-CJLlwlAu.cjs');
30
+ var BaseReasoningProcessor = require('./BaseReasoningProcessor-CBbzF7oj.cjs');
31
31
  require('zod');
32
32
  require('socket.io-client');
33
33
  require('expo-server-sdk');
34
34
  require('./types-DVk3crez.cjs');
35
- require('tmp');
36
35
  require('qrcode-terminal');
37
36
  require('node:module');
38
37
  require('url');
@@ -1,6 +1,6 @@
1
- import { p as preserveSessionRuntimeMetadata, l as logger, h as hashObject, d as AssistantMessageStream, b as connectionState, A as ApiClient } from './api-DTSpLLTK.mjs';
2
- import { B as BasePermissionHandler, d as MessageBuffer, C as ConversationHistory$1, f as buildHappyOrgTurnPrompt, w as waitForResponseCompleteWithAbort, h as finalizeHappyOrgTurnWithBusinessAck, i as buildTurnResultPushNotification, c as registerKillSessionHandler, j as buildReadyPushNotification, l as launchRuntimeHandleWithFactoryResult, t as createSessionTranscriptInkRenderer, k as extractPermissionRequestPushContext, m as buildPermissionPushNotification, n as renderTerminalOutputPreview, p as prepareTerminalOutputForForwarding, o as inferToolResultError, q as forwardAgentMessageToProviderSession, e as ensureManagedProviderMachine, M as MissingMachineIdError, b as MessageQueue2, r as resolveHappyOrgQueuedTurn, s as syncControlledByUserState } from './registerKillSessionHandler-hQE08yMO.mjs';
3
- import { f as formatDisplayMessage, v as validateCodexAcpSpawn, h as createCodexBackend, A as AcpBackend, t as truncateDisplayMessage, b as closeProviderSession, e as stopCaffeinate, i as resolveCodexExecutable, j as shouldUseShellForCodex, F as Future, k as readManagedSessionTag, l as resolveManagedSessionTag } from './index-CUVIZLuf.mjs';
1
+ import { p as preserveSessionRuntimeMetadata, l as logger, h as hashObject, d as AssistantMessageStream, b as connectionState, A as ApiClient } from './api-D3vYIva3.mjs';
2
+ import { B as BasePermissionHandler, d as MessageBuffer, C as ConversationHistory$1, f as buildHappyOrgTurnPrompt, w as waitForResponseCompleteWithAbort, h as finalizeHappyOrgTurnWithBusinessAck, i as buildTurnResultPushNotification, c as registerKillSessionHandler, j as buildReadyPushNotification, l as launchRuntimeHandleWithFactoryResult, t as createSessionTranscriptInkRenderer, k as extractPermissionRequestPushContext, m as buildPermissionPushNotification, n as renderTerminalOutputPreview, p as prepareTerminalOutputForForwarding, o as inferToolResultError, q as forwardAgentMessageToProviderSession, e as ensureManagedProviderMachine, M as MissingMachineIdError, b as MessageQueue2, r as resolveHappyOrgQueuedTurn, s as syncControlledByUserState } from './registerKillSessionHandler-OhhMUuCQ.mjs';
3
+ import { f as formatDisplayMessage, v as validateCodexAcpSpawn, h as createCodexBackend, A as AcpBackend, t as truncateDisplayMessage, b as closeProviderSession, e as stopCaffeinate, i as resolveCodexExecutable, j as shouldUseShellForCodex, F as Future, k as readManagedSessionTag, l as resolveManagedSessionTag } from './index-Cp1I5I3U.mjs';
4
4
  import 'cross-spawn';
5
5
  import '@agentclientprotocol/sdk';
6
6
  import { randomUUID } from 'node:crypto';
@@ -24,13 +24,12 @@ import 'tweetnacl';
24
24
  import 'open';
25
25
  import React, { useState, useRef, useEffect, useCallback } from 'react';
26
26
  import { useStdout, useInput, Box, Text, render } from 'ink';
27
- import { c as createKeepAliveController, P as ProviderSelectionHandler, r as runModeLoop } from './ProviderSelectionHandler-BymmO261.mjs';
28
- import { B as BaseReasoningProcessor, b as bootstrapManagedProviderSession } from './BaseReasoningProcessor-Mrdbmfl3.mjs';
27
+ import { c as createKeepAliveController, P as ProviderSelectionHandler, r as runModeLoop } from './ProviderSelectionHandler-DzYObYrV.mjs';
28
+ import { B as BaseReasoningProcessor, b as bootstrapManagedProviderSession } from './BaseReasoningProcessor-KXIi0QF_.mjs';
29
29
  import 'zod';
30
30
  import 'socket.io-client';
31
31
  import 'expo-server-sdk';
32
32
  import './types-CiliQpqS.mjs';
33
- import 'tmp';
34
33
  import 'qrcode-terminal';
35
34
  import 'node:module';
36
35
  import 'url';
@@ -1,10 +1,10 @@
1
1
  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
- import { l as logger, b as connectionState, A as ApiClient, h as hashObject, d as AssistantMessageStream } from './api-DTSpLLTK.mjs';
5
- import { B as BasePermissionHandler, C as ConversationHistory$1, r as resolveHappyOrgQueuedTurn, e as ensureManagedProviderMachine, M as MissingMachineIdError, s as syncControlledByUserState, b as MessageQueue2, c as registerKillSessionHandler, d as MessageBuffer, f as buildHappyOrgTurnPrompt, w as waitForResponseCompleteWithAbort, h as finalizeHappyOrgTurnWithBusinessAck, i as buildTurnResultPushNotification, j as buildReadyPushNotification, l as launchRuntimeHandleWithFactoryResult, k as extractPermissionRequestPushContext, m as buildPermissionPushNotification, n as renderTerminalOutputPreview, p as prepareTerminalOutputForForwarding, o as inferToolResultError, q as forwardAgentMessageToProviderSession, t as createSessionTranscriptInkRenderer } from './registerKillSessionHandler-hQE08yMO.mjs';
6
- import { g as getInitialGeminiModel, r as readGeminiLocalConfig, G as GEMINI_MODEL_ENV, b as closeProviderSession, s as saveGeminiModelToConfig, d as createGeminiBackend, e as stopCaffeinate } from './index-CUVIZLuf.mjs';
7
- import { B as BaseReasoningProcessor, b as bootstrapManagedProviderSession } from './BaseReasoningProcessor-Mrdbmfl3.mjs';
4
+ import { l as logger, b as connectionState, A as ApiClient, h as hashObject, d as AssistantMessageStream } from './api-D3vYIva3.mjs';
5
+ import { B as BasePermissionHandler, C as ConversationHistory$1, r as resolveHappyOrgQueuedTurn, e as ensureManagedProviderMachine, M as MissingMachineIdError, s as syncControlledByUserState, b as MessageQueue2, c as registerKillSessionHandler, d as MessageBuffer, f as buildHappyOrgTurnPrompt, w as waitForResponseCompleteWithAbort, h as finalizeHappyOrgTurnWithBusinessAck, i as buildTurnResultPushNotification, j as buildReadyPushNotification, l as launchRuntimeHandleWithFactoryResult, k as extractPermissionRequestPushContext, m as buildPermissionPushNotification, n as renderTerminalOutputPreview, p as prepareTerminalOutputForForwarding, o as inferToolResultError, q as forwardAgentMessageToProviderSession, t as createSessionTranscriptInkRenderer } from './registerKillSessionHandler-OhhMUuCQ.mjs';
6
+ import { g as getInitialGeminiModel, r as readGeminiLocalConfig, G as GEMINI_MODEL_ENV, b as closeProviderSession, s as saveGeminiModelToConfig, d as createGeminiBackend, e as stopCaffeinate } from './index-Cp1I5I3U.mjs';
7
+ import { B as BaseReasoningProcessor, b as bootstrapManagedProviderSession } from './BaseReasoningProcessor-KXIi0QF_.mjs';
8
8
  import 'cross-spawn';
9
9
  import '@agentclientprotocol/sdk';
10
10
  import 'ps-list';
@@ -29,7 +29,6 @@ import 'crypto';
29
29
  import 'expo-server-sdk';
30
30
  import './types-CiliQpqS.mjs';
31
31
  import 'os';
32
- import 'tmp';
33
32
  import 'qrcode-terminal';
34
33
  import 'node:module';
35
34
  import 'url';
@@ -3,10 +3,10 @@
3
3
  var ink = require('ink');
4
4
  var React = require('react');
5
5
  var node_crypto = require('node:crypto');
6
- var persistence = require('./api-Bekjk9d5.cjs');
7
- var registerKillSessionHandler = require('./registerKillSessionHandler-BYWJJDre.cjs');
8
- var index = require('./index-DkaYNlRO.cjs');
9
- var BaseReasoningProcessor = require('./BaseReasoningProcessor-Bsnew7fc.cjs');
6
+ var persistence = require('./api-CVuTajTL.cjs');
7
+ var registerKillSessionHandler = require('./registerKillSessionHandler-8C_Wrgor.cjs');
8
+ var index = require('./index-CyW9A7hx.cjs');
9
+ var BaseReasoningProcessor = require('./BaseReasoningProcessor-CBbzF7oj.cjs');
10
10
  require('cross-spawn');
11
11
  require('@agentclientprotocol/sdk');
12
12
  require('ps-list');
@@ -31,7 +31,6 @@ require('crypto');
31
31
  require('expo-server-sdk');
32
32
  require('./types-DVk3crez.cjs');
33
33
  require('os');
34
- require('tmp');
35
34
  require('qrcode-terminal');
36
35
  require('node:module');
37
36
  require('url');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "happy-imou-cloud",
3
- "version": "2.1.46",
3
+ "version": "2.1.47",
4
4
  "description": "hicloud - Imou 企业定制版。关键是 happy!移动端远程 AI 编程工具,支持 Claude Code、Codex 和 Gemini CLI",
5
5
  "author": "long.zhu",
6
6
  "license": "MIT",