happy-imou-cloud 2.1.5 → 2.1.7

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 (31) hide show
  1. package/dist/{BaseReasoningProcessor-CTWoJTb8.mjs → BaseReasoningProcessor-C0A6Jr8V.mjs} +16 -3
  2. package/dist/{BaseReasoningProcessor-DsunYoSL.cjs → BaseReasoningProcessor-iSuaFeZH.cjs} +17 -4
  3. package/dist/{ProviderSelectionHandler-BxcgZ5df.cjs → ProviderSelectionHandler-DI9QK1iY.cjs} +2 -2
  4. package/dist/{ProviderSelectionHandler-LiWZjziD.mjs → ProviderSelectionHandler-WT-tvePy.mjs} +2 -2
  5. package/dist/{api-RxQ4bfJm.mjs → api-BYKV7vX6.mjs} +3 -3
  6. package/dist/{api-DOn5w7Lv.cjs → api-CdGT5hsH.cjs} +2 -2
  7. package/dist/{command-BZ8G4IiN.mjs → command-C1cKqmsa.mjs} +3 -3
  8. package/dist/{command-C3XGNSfh.cjs → command-uyA8cYmL.cjs} +3 -3
  9. package/dist/{index-CQEVJsPp.mjs → index-BAhlFq45.mjs} +268 -32
  10. package/dist/{index-C06zeR85.cjs → index-D_S_7bqK.cjs} +264 -24
  11. package/dist/index.cjs +3 -3
  12. package/dist/index.mjs +3 -3
  13. package/dist/lib.cjs +1 -1
  14. package/dist/lib.d.cts +36 -36
  15. package/dist/lib.d.mts +36 -36
  16. package/dist/lib.mjs +1 -1
  17. package/dist/{persistence-Bf5FdmEK.mjs → persistence-B8Wgn6aN.mjs} +1 -1
  18. package/dist/{persistence-DuakVvfB.cjs → persistence-CMvrZ4SA.cjs} +1 -1
  19. package/dist/{registerKillSessionHandler-BuzsaxI2.mjs → registerKillSessionHandler-5DVlZaJx.mjs} +4 -73
  20. package/dist/{registerKillSessionHandler-BRC1HO05.cjs → registerKillSessionHandler-DjxtkGMv.cjs} +3 -74
  21. package/dist/{runClaude-C8Lx-Xij.cjs → runClaude-DNZFsQY0.cjs} +132 -47
  22. package/dist/{runClaude-Cg8x5JOI.mjs → runClaude-WB884iOO.mjs} +129 -44
  23. package/dist/{runCodex-e4wK1OuI.mjs → runCodex-MJar-238.mjs} +10 -9
  24. package/dist/{runCodex-rYroXLgt.cjs → runCodex-WZ91ZLK7.cjs} +12 -11
  25. package/dist/{runGemini-Cd1FWJJ_.mjs → runGemini-BPGpwljp.mjs} +5 -5
  26. package/dist/{runGemini-Bjw2PSMh.cjs → runGemini-B_wCHgPU.cjs} +7 -7
  27. package/package.json +1 -1
  28. package/scripts/devtools/README.md +9 -9
  29. package/scripts/e2e/fake-codex-acp-agent.mjs +139 -139
  30. package/scripts/e2e/local-server-session-roundtrip.mjs +1063 -1063
  31. package/scripts/ensureAcpSdkCompat.mjs +1 -1
@@ -1,6 +1,5 @@
1
- import { p as publishSessionRegistration } from './index-CQEVJsPp.mjs';
2
- import { s as startOfflineReconnection, c as configuration, i as isAuthenticationRequiredError, l as logger } from './api-RxQ4bfJm.mjs';
3
- import { c as createSessionMetadata } from './registerKillSessionHandler-BuzsaxI2.mjs';
1
+ import { a as createSessionMetadata, p as publishSessionRegistration } from './index-BAhlFq45.mjs';
2
+ import { s as startOfflineReconnection, c as configuration, i as isAuthenticationRequiredError, l as logger } from './api-BYKV7vX6.mjs';
4
3
  import { EventEmitter } from 'node:events';
5
4
  import { randomUUID } from 'node:crypto';
6
5
 
@@ -89,6 +88,16 @@ async function bootstrapManagedProviderSession(opts) {
89
88
  machineId: opts.machineId,
90
89
  startedBy: opts.startedBy
91
90
  });
91
+ const reconcileAttachedSessionMetadata = (session2) => {
92
+ if (!opts.reconcileMetadataOnAttach) {
93
+ return;
94
+ }
95
+ try {
96
+ session2.updateMetadata(() => metadata);
97
+ } catch (error) {
98
+ logger.debug(`[managed-session] Failed to reconcile metadata for ${opts.flavor} session`, error);
99
+ }
100
+ };
92
101
  let response = null;
93
102
  try {
94
103
  response = await opts.api.getOrCreateSession({
@@ -110,9 +119,13 @@ async function bootstrapManagedProviderSession(opts) {
110
119
  response,
111
120
  onSessionSwap: (newSession) => {
112
121
  opts.onSessionSwap?.(newSession, metadata);
122
+ reconcileAttachedSessionMetadata(newSession);
113
123
  void publishSessionRegistration(newSession.sessionId, metadata);
114
124
  }
115
125
  });
126
+ if (response) {
127
+ reconcileAttachedSessionMetadata(session);
128
+ }
116
129
  if (response) {
117
130
  await publishSessionRegistration(response.id, metadata);
118
131
  }
@@ -1,8 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-C06zeR85.cjs');
4
- var api = require('./api-DOn5w7Lv.cjs');
5
- var registerKillSessionHandler = require('./registerKillSessionHandler-BRC1HO05.cjs');
3
+ var index = require('./index-D_S_7bqK.cjs');
4
+ var api = require('./api-CdGT5hsH.cjs');
6
5
  var node_events = require('node:events');
7
6
  var node_crypto = require('node:crypto');
8
7
 
@@ -86,11 +85,21 @@ function setupOfflineReconnection(opts) {
86
85
  }
87
86
 
88
87
  async function bootstrapManagedProviderSession(opts) {
89
- const { state, metadata } = registerKillSessionHandler.createSessionMetadata({
88
+ const { state, metadata } = index.createSessionMetadata({
90
89
  flavor: opts.flavor,
91
90
  machineId: opts.machineId,
92
91
  startedBy: opts.startedBy
93
92
  });
93
+ const reconcileAttachedSessionMetadata = (session2) => {
94
+ if (!opts.reconcileMetadataOnAttach) {
95
+ return;
96
+ }
97
+ try {
98
+ session2.updateMetadata(() => metadata);
99
+ } catch (error) {
100
+ api.logger.debug(`[managed-session] Failed to reconcile metadata for ${opts.flavor} session`, error);
101
+ }
102
+ };
94
103
  let response = null;
95
104
  try {
96
105
  response = await opts.api.getOrCreateSession({
@@ -112,9 +121,13 @@ async function bootstrapManagedProviderSession(opts) {
112
121
  response,
113
122
  onSessionSwap: (newSession) => {
114
123
  opts.onSessionSwap?.(newSession, metadata);
124
+ reconcileAttachedSessionMetadata(newSession);
115
125
  void index.publishSessionRegistration(newSession.sessionId, metadata);
116
126
  }
117
127
  });
128
+ if (response) {
129
+ reconcileAttachedSessionMetadata(session);
130
+ }
118
131
  if (response) {
119
132
  await index.publishSessionRegistration(response.id, metadata);
120
133
  }
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var api = require('./api-DOn5w7Lv.cjs');
4
- var registerKillSessionHandler = require('./registerKillSessionHandler-BRC1HO05.cjs');
3
+ var api = require('./api-CdGT5hsH.cjs');
4
+ var registerKillSessionHandler = require('./registerKillSessionHandler-DjxtkGMv.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-RxQ4bfJm.mjs';
2
- import { g as getPendingInteractionTimeoutMs, I as INTERACTION_SUPERSEDED_ERROR, a as INTERACTION_TIMED_OUT_ERROR } from './registerKillSessionHandler-BuzsaxI2.mjs';
1
+ import { l as logger } from './api-BYKV7vX6.mjs';
2
+ import { g as getPendingInteractionTimeoutMs, I as INTERACTION_SUPERSEDED_ERROR, a as INTERACTION_TIMED_OUT_ERROR } from './registerKillSessionHandler-5DVlZaJx.mjs';
3
3
 
4
4
  async function runModeLoop(opts) {
5
5
  let currentMode = opts.startingMode;
@@ -16,7 +16,7 @@ import { spawn } from 'node:child_process';
16
16
  import { Expo } from 'expo-server-sdk';
17
17
 
18
18
  var name = "happy-imou-cloud";
19
- var version = "2.1.5";
19
+ var version = "2.1.7";
20
20
  var description = "hicloud - Imou 企业定制版。关键是 happy!移动端远程 AI 编程工具,支持 Claude Code、Codex 和 Gemini CLI";
21
21
  var author = "long.zhu";
22
22
  var license = "MIT";
@@ -431,7 +431,7 @@ async function listDaemonLogFiles(limit = 50) {
431
431
  return { file, path: fullPath, modified: stats.mtime };
432
432
  }).sort((a, b) => b.modified.getTime() - a.modified.getTime());
433
433
  try {
434
- const { readDaemonState } = await import('./persistence-Bf5FdmEK.mjs');
434
+ const { readDaemonState } = await import('./persistence-B8Wgn6aN.mjs');
435
435
  const state = await readDaemonState();
436
436
  if (!state) {
437
437
  return logs;
@@ -3645,4 +3645,4 @@ var api = /*#__PURE__*/Object.freeze({
3645
3645
  ApiClient: ApiClient
3646
3646
  });
3647
3647
 
3648
- export { ApiClient as A, HAPPY_ORG_TURN_REPORT_TAG as H, SigningBootstrapRequiredError as S, ApiSessionClient as a, connectionState as b, configuration as c, HAPPY_ORG_SUMMARY_MAX_LENGTH as d, encodeBase64 as e, HAPPY_ORG_REPEAT_THRESHOLD as f, backoff as g, delay as h, isAuthenticationRequiredError as i, AsyncLock as j, buildAuthenticatedHeaders as k, logger as l, SIGNING_BOOTSTRAP_REQUIRED_MESSAGE as m, encodeBase64Url as n, buildClientHeaders as o, packageJson as p, decodeBase64 as q, HAPPY_CLOUD_DAEMON_PORT as r, startOfflineReconnection as s, HeadTailPreviewBuffer as t, getLatestDaemonLog as u, api as v };
3648
+ export { ApiClient as A, HAPPY_ORG_TURN_REPORT_TAG as H, SigningBootstrapRequiredError as S, ApiSessionClient as a, connectionState as b, configuration as c, HAPPY_ORG_SUMMARY_MAX_LENGTH as d, encodeBase64 as e, HAPPY_ORG_REPEAT_THRESHOLD as f, backoff as g, delay as h, isAuthenticationRequiredError as i, AsyncLock as j, buildAuthenticatedHeaders as k, logger as l, SIGNING_BOOTSTRAP_REQUIRED_MESSAGE as m, encodeBase64Url as n, buildClientHeaders as o, decodeBase64 as p, HAPPY_CLOUD_DAEMON_PORT as q, packageJson as r, startOfflineReconnection as s, HeadTailPreviewBuffer as t, getLatestDaemonLog as u, api as v };
@@ -18,7 +18,7 @@ var node_child_process = require('node:child_process');
18
18
  var expoServerSdk = require('expo-server-sdk');
19
19
 
20
20
  var name = "happy-imou-cloud";
21
- var version = "2.1.5";
21
+ var version = "2.1.7";
22
22
  var description = "hicloud - Imou 企业定制版。关键是 happy!移动端远程 AI 编程工具,支持 Claude Code、Codex 和 Gemini CLI";
23
23
  var author = "long.zhu";
24
24
  var license = "MIT";
@@ -433,7 +433,7 @@ async function listDaemonLogFiles(limit = 50) {
433
433
  return { file, path: fullPath, modified: stats.mtime };
434
434
  }).sort((a, b) => b.modified.getTime() - a.modified.getTime());
435
435
  try {
436
- const { readDaemonState } = await Promise.resolve().then(function () { return require('./persistence-DuakVvfB.cjs'); });
436
+ const { readDaemonState } = await Promise.resolve().then(function () { return require('./persistence-CMvrZ4SA.cjs'); });
437
437
  const state = await readDaemonState();
438
438
  if (!state) {
439
439
  return logs;
@@ -1,6 +1,6 @@
1
- import { c as createDefaultRuntimeShell } from './index-CQEVJsPp.mjs';
1
+ import { c as createDefaultRuntimeShell } from './index-BAhlFq45.mjs';
2
2
  import 'chalk';
3
- import './api-RxQ4bfJm.mjs';
3
+ import './api-BYKV7vX6.mjs';
4
4
  import 'axios';
5
5
  import 'fs';
6
6
  import 'node:fs';
@@ -16,7 +16,7 @@ import 'crypto';
16
16
  import 'path';
17
17
  import 'node:child_process';
18
18
  import 'expo-server-sdk';
19
- import './persistence-Bf5FdmEK.mjs';
19
+ import './persistence-B8Wgn6aN.mjs';
20
20
  import 'node:fs/promises';
21
21
  import 'os';
22
22
  import 'tmp';
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-C06zeR85.cjs');
3
+ var index = require('./index-D_S_7bqK.cjs');
4
4
  require('chalk');
5
- require('./api-DOn5w7Lv.cjs');
5
+ require('./api-CdGT5hsH.cjs');
6
6
  require('axios');
7
7
  require('fs');
8
8
  require('node:fs');
@@ -18,7 +18,7 @@ require('crypto');
18
18
  require('path');
19
19
  require('node:child_process');
20
20
  require('expo-server-sdk');
21
- require('./persistence-DuakVvfB.cjs');
21
+ require('./persistence-CMvrZ4SA.cjs');
22
22
  require('node:fs/promises');
23
23
  require('os');
24
24
  require('tmp');