happy-imou-cloud 2.0.8 → 2.0.10

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.
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
3
  var node_crypto = require('node:crypto');
4
- var api = require('./api-CN-WqYd_.cjs');
5
- var persistence = require('./persistence-DBGkO8gB.cjs');
6
- var index = require('./index-DM6z3aeG.cjs');
7
- var names = require('./names-BnV67N_O.cjs');
8
- var registerKillSessionHandler = require('./registerKillSessionHandler-CYc0SIjF.cjs');
4
+ var api = require('./api-DUE5TJBE.cjs');
5
+ var persistence = require('./persistence-D7JtnrYA.cjs');
6
+ var index = require('./index-Cuvfa15L.cjs');
7
+ var names = require('./names-yJNZoTv_.cjs');
8
+ var registerKillSessionHandler = require('./registerKillSessionHandler-DCMFiXyA.cjs');
9
9
  var React = require('react');
10
10
  var ink = require('ink');
11
11
  require('axios');
@@ -737,6 +737,7 @@ function normalizeCodexBackendError(error) {
737
737
  record?.code !== void 0 && record?.code !== null ? `[code=${String(record.code)}]` : "",
738
738
  record?.status !== void 0 && record?.status !== null ? `[status=${String(record.status)}]` : ""
739
739
  ].filter(Boolean).join(" ") : "";
740
+ const searchableLower = searchableText.toLowerCase();
740
741
  if (searchableText.includes("Failed to locate @zed-industries/codex-acp-")) {
741
742
  const hint = "Codex ACP could not start because the @zed-industries/codex-acp platform binary is missing. Reinstall codex-acp for this machine, or set HAPPY_CODEX_ACP_BIN to a working codex-acp executable.";
742
743
  return prefix ? `${prefix} ${hint}` : hint;
@@ -745,6 +746,10 @@ function normalizeCodexBackendError(error) {
745
746
  const hint = "The configured Codex ACP command does not speak the ACP protocol. Make sure HAPPY_CODEX_ACP_BIN points to codex-acp, not the codex CLI.";
746
747
  return prefix ? `${prefix} ${hint}` : hint;
747
748
  }
749
+ if ((searchableLower.includes("ripgrep") || searchableLower.includes(" rg ")) && (searchableLower.includes("not found") || searchableLower.includes("could not find") || searchableLower.includes("no such file") || searchableLower.includes("is not recognized"))) {
750
+ const hint = "Codex ACP could not find ripgrep (rg). Happy injects Codex's bundled rg into PATH at startup; if you still see this, restart the Happy daemon/CLI so the new environment is used, or reinstall @openai/codex.";
751
+ return prefix ? `${prefix} ${hint}` : hint;
752
+ }
748
753
  if (typeof record?.message === "string" && record.message.trim().toLowerCase() === "internal error" && dataText) {
749
754
  return prefix ? `${prefix} ${dataText}` : dataText;
750
755
  }
@@ -1466,18 +1471,12 @@ async function runCodex(opts) {
1466
1471
  onSessionSwap: (newSession) => {
1467
1472
  sessionClient = newSession;
1468
1473
  codexSession?.updateClient(newSession);
1474
+ void index.publishSessionRegistration(newSession.sessionId, metadata);
1469
1475
  }
1470
1476
  });
1471
1477
  sessionClient = initialSession;
1472
1478
  if (response) {
1473
- try {
1474
- const result = await index.notifyDaemonSessionStarted(response.id, metadata);
1475
- if (result.error) {
1476
- api.logger.debug("[START] Failed to report to daemon:", result.error);
1477
- }
1478
- } catch (error) {
1479
- api.logger.debug("[START] Failed to report to daemon:", error);
1480
- }
1479
+ await index.publishSessionRegistration(response.id, metadata);
1481
1480
  }
1482
1481
  const messageQueue = new registerKillSessionHandler.MessageQueue2(getCodexExecutionFingerprint);
1483
1482
  let currentPermissionMode = initialPermissionMode;
@@ -1,11 +1,11 @@
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, i as isAuthenticationRequiredError } from './api-D-uiH_TF.mjs';
5
- import { readSettings } from './persistence-DiNg1DPF.mjs';
6
- import { B as BasePermissionHandler, a as BaseReasoningProcessor, c as createSessionMetadata, s as setupOfflineReconnection, b as attachToolHappierMetaV2, r as resolveCanonicalToolNameV2, i as inferToolResultError } from './names-BjEof0E2.mjs';
7
- import { i as initialMachineMetadata, n as notifyDaemonSessionStarted, g as getInitialGeminiModel, r as readGeminiLocalConfig, G as GEMINI_MODEL_ENV, s as saveGeminiModelToConfig, a as createGeminiBackend, b as stopCaffeinate } from './index-DhheEtRl.mjs';
8
- import { M as MessageQueue2, h as hashObject, a as MessageBuffer, r as registerKillSessionHandler } from './registerKillSessionHandler-Cu9rHGsI.mjs';
4
+ import { l as logger, b as connectionState, A as ApiClient, i as isAuthenticationRequiredError } from './api-BjxmW-0W.mjs';
5
+ import { readSettings } from './persistence-BxP6Jw1f.mjs';
6
+ import { B as BasePermissionHandler, a as BaseReasoningProcessor, c as createSessionMetadata, s as setupOfflineReconnection, b as attachToolHappierMetaV2, r as resolveCanonicalToolNameV2, i as inferToolResultError } from './names-CicSgRNg.mjs';
7
+ import { i as initialMachineMetadata, p as publishSessionRegistration, g as getInitialGeminiModel, r as readGeminiLocalConfig, G as GEMINI_MODEL_ENV, s as saveGeminiModelToConfig, a as createGeminiBackend, b as stopCaffeinate } from './index-CzvgPwr1.mjs';
8
+ import { M as MessageQueue2, h as hashObject, a as MessageBuffer, r as registerKillSessionHandler } from './registerKillSessionHandler-ARQrPvnT.mjs';
9
9
  import 'axios';
10
10
  import 'chalk';
11
11
  import 'fs';
@@ -642,21 +642,12 @@ async function runGemini(opts) {
642
642
  permissionHandler.updateSession(newSession);
643
643
  }
644
644
  }
645
+ void publishSessionRegistration(newSession.sessionId, metadata);
645
646
  }
646
647
  });
647
648
  session = initialSession;
648
649
  if (response) {
649
- try {
650
- logger.debug(`[START] Reporting session ${response.id} to daemon`);
651
- const result = await notifyDaemonSessionStarted(response.id, metadata);
652
- if (result.error) {
653
- logger.debug(`[START] Failed to report to daemon (may not be running):`, result.error);
654
- } else {
655
- logger.debug(`[START] Reported session ${response.id} to daemon`);
656
- }
657
- } catch (error) {
658
- logger.debug("[START] Failed to report to daemon (may not be running):", error);
659
- }
650
+ await publishSessionRegistration(response.id, metadata);
660
651
  }
661
652
  const messageQueue = new MessageQueue2((mode) => hashObject({
662
653
  permissionMode: mode.permissionMode,
@@ -3,11 +3,11 @@
3
3
  var ink = require('ink');
4
4
  var React = require('react');
5
5
  var node_crypto = require('node:crypto');
6
- var api = require('./api-CN-WqYd_.cjs');
7
- var persistence = require('./persistence-DBGkO8gB.cjs');
8
- var names = require('./names-BnV67N_O.cjs');
9
- var index = require('./index-DM6z3aeG.cjs');
10
- var registerKillSessionHandler = require('./registerKillSessionHandler-CYc0SIjF.cjs');
6
+ var api = require('./api-DUE5TJBE.cjs');
7
+ var persistence = require('./persistence-D7JtnrYA.cjs');
8
+ var names = require('./names-yJNZoTv_.cjs');
9
+ var index = require('./index-Cuvfa15L.cjs');
10
+ var registerKillSessionHandler = require('./registerKillSessionHandler-DCMFiXyA.cjs');
11
11
  require('axios');
12
12
  require('chalk');
13
13
  require('fs');
@@ -644,21 +644,12 @@ async function runGemini(opts) {
644
644
  permissionHandler.updateSession(newSession);
645
645
  }
646
646
  }
647
+ void index.publishSessionRegistration(newSession.sessionId, metadata);
647
648
  }
648
649
  });
649
650
  session = initialSession;
650
651
  if (response) {
651
- try {
652
- api.logger.debug(`[START] Reporting session ${response.id} to daemon`);
653
- const result = await index.notifyDaemonSessionStarted(response.id, metadata);
654
- if (result.error) {
655
- api.logger.debug(`[START] Failed to report to daemon (may not be running):`, result.error);
656
- } else {
657
- api.logger.debug(`[START] Reported session ${response.id} to daemon`);
658
- }
659
- } catch (error) {
660
- api.logger.debug("[START] Failed to report to daemon (may not be running):", error);
661
- }
652
+ await index.publishSessionRegistration(response.id, metadata);
662
653
  }
663
654
  const messageQueue = new registerKillSessionHandler.MessageQueue2((mode) => registerKillSessionHandler.hashObject({
664
655
  permissionMode: mode.permissionMode,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "happy-imou-cloud",
3
- "version": "2.0.8",
3
+ "version": "2.0.10",
4
4
  "description": "hicloud - Imou 企业定制版。关键是 happy!移动端远程 AI 编程工具,支持 Claude Code、Codex 和 Gemini CLI",
5
5
  "author": "long.zhu",
6
6
  "license": "MIT",