happy-imou-cloud 2.1.5 → 2.1.6
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.
- package/dist/{BaseReasoningProcessor-DsunYoSL.cjs → BaseReasoningProcessor-C3oDrA4i.cjs} +17 -4
- package/dist/{BaseReasoningProcessor-CTWoJTb8.mjs → BaseReasoningProcessor-CRXr7Axk.mjs} +16 -3
- package/dist/{ProviderSelectionHandler-LiWZjziD.mjs → ProviderSelectionHandler-C3kHFqeq.mjs} +2 -2
- package/dist/{ProviderSelectionHandler-BxcgZ5df.cjs → ProviderSelectionHandler-Drg2Pp1-.cjs} +2 -2
- package/dist/{api-DOn5w7Lv.cjs → api-CvtU4DI-.cjs} +2 -2
- package/dist/{api-RxQ4bfJm.mjs → api-DF9A136-.mjs} +3 -3
- package/dist/{command-C3XGNSfh.cjs → command-UZr1nodh.cjs} +3 -3
- package/dist/{command-BZ8G4IiN.mjs → command-hO52qTzQ.mjs} +3 -3
- package/dist/{index-CQEVJsPp.mjs → index-B5e-MA1d.mjs} +268 -32
- package/dist/{index-C06zeR85.cjs → index-DA-K28E3.cjs} +264 -24
- package/dist/index.cjs +3 -3
- package/dist/index.mjs +3 -3
- package/dist/lib.cjs +1 -1
- package/dist/lib.d.cts +36 -36
- package/dist/lib.d.mts +36 -36
- package/dist/lib.mjs +1 -1
- package/dist/{persistence-Bf5FdmEK.mjs → persistence-BsWBBi7E.mjs} +1 -1
- package/dist/{persistence-DuakVvfB.cjs → persistence-CKgPuZRR.cjs} +1 -1
- package/dist/{registerKillSessionHandler-BRC1HO05.cjs → registerKillSessionHandler-3ytO-yBI.cjs} +3 -74
- package/dist/{registerKillSessionHandler-BuzsaxI2.mjs → registerKillSessionHandler-DmG1p8l7.mjs} +4 -73
- package/dist/{runClaude-Cg8x5JOI.mjs → runClaude-MF34EsCp.mjs} +103 -40
- package/dist/{runClaude-C8Lx-Xij.cjs → runClaude-bAlUdUGw.cjs} +106 -43
- package/dist/{runCodex-e4wK1OuI.mjs → runCodex-B31D_imZ.mjs} +10 -8
- package/dist/{runCodex-rYroXLgt.cjs → runCodex-CiIbJ1wa.cjs} +12 -10
- package/dist/{runGemini-Cd1FWJJ_.mjs → runGemini-BJ7PxLyl.mjs} +5 -5
- package/dist/{runGemini-Bjw2PSMh.cjs → runGemini-BZJR84o-.cjs} +7 -7
- package/package.json +1 -1
- package/scripts/devtools/README.md +9 -9
- package/scripts/e2e/fake-codex-acp-agent.mjs +139 -139
- package/scripts/e2e/local-server-session-roundtrip.mjs +1063 -1063
- package/scripts/ensureAcpSdkCompat.mjs +1 -1
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var api = require('./api-
|
|
5
|
-
var registerKillSessionHandler = require('./registerKillSessionHandler-BRC1HO05.cjs');
|
|
3
|
+
var index = require('./index-DA-K28E3.cjs');
|
|
4
|
+
var api = require('./api-CvtU4DI-.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 } =
|
|
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,6 +1,5 @@
|
|
|
1
|
-
import { p as publishSessionRegistration } from './index-
|
|
2
|
-
import { s as startOfflineReconnection, c as configuration, i as isAuthenticationRequiredError, l as logger } from './api-
|
|
3
|
-
import { c as createSessionMetadata } from './registerKillSessionHandler-BuzsaxI2.mjs';
|
|
1
|
+
import { a as createSessionMetadata, p as publishSessionRegistration } from './index-B5e-MA1d.mjs';
|
|
2
|
+
import { s as startOfflineReconnection, c as configuration, i as isAuthenticationRequiredError, l as logger } from './api-DF9A136-.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
|
}
|
package/dist/{ProviderSelectionHandler-LiWZjziD.mjs → ProviderSelectionHandler-C3kHFqeq.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as logger } from './api-
|
|
2
|
-
import { g as getPendingInteractionTimeoutMs, I as INTERACTION_SUPERSEDED_ERROR, a as INTERACTION_TIMED_OUT_ERROR } from './registerKillSessionHandler-
|
|
1
|
+
import { l as logger } from './api-DF9A136-.mjs';
|
|
2
|
+
import { g as getPendingInteractionTimeoutMs, I as INTERACTION_SUPERSEDED_ERROR, a as INTERACTION_TIMED_OUT_ERROR } from './registerKillSessionHandler-DmG1p8l7.mjs';
|
|
3
3
|
|
|
4
4
|
async function runModeLoop(opts) {
|
|
5
5
|
let currentMode = opts.startingMode;
|
package/dist/{ProviderSelectionHandler-BxcgZ5df.cjs → ProviderSelectionHandler-Drg2Pp1-.cjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var api = require('./api-
|
|
4
|
-
var registerKillSessionHandler = require('./registerKillSessionHandler-
|
|
3
|
+
var api = require('./api-CvtU4DI-.cjs');
|
|
4
|
+
var registerKillSessionHandler = require('./registerKillSessionHandler-3ytO-yBI.cjs');
|
|
5
5
|
|
|
6
6
|
async function runModeLoop(opts) {
|
|
7
7
|
let currentMode = opts.startingMode;
|
|
@@ -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.
|
|
21
|
+
var version = "2.1.6";
|
|
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-
|
|
436
|
+
const { readDaemonState } = await Promise.resolve().then(function () { return require('./persistence-CKgPuZRR.cjs'); });
|
|
437
437
|
const state = await readDaemonState();
|
|
438
438
|
if (!state) {
|
|
439
439
|
return logs;
|
|
@@ -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.
|
|
19
|
+
var version = "2.1.6";
|
|
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-
|
|
434
|
+
const { readDaemonState } = await import('./persistence-BsWBBi7E.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,
|
|
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 };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-DA-K28E3.cjs');
|
|
4
4
|
require('chalk');
|
|
5
|
-
require('./api-
|
|
5
|
+
require('./api-CvtU4DI-.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-
|
|
21
|
+
require('./persistence-CKgPuZRR.cjs');
|
|
22
22
|
require('node:fs/promises');
|
|
23
23
|
require('os');
|
|
24
24
|
require('tmp');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as createDefaultRuntimeShell } from './index-
|
|
1
|
+
import { c as createDefaultRuntimeShell } from './index-B5e-MA1d.mjs';
|
|
2
2
|
import 'chalk';
|
|
3
|
-
import './api-
|
|
3
|
+
import './api-DF9A136-.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-
|
|
19
|
+
import './persistence-BsWBBi7E.mjs';
|
|
20
20
|
import 'node:fs/promises';
|
|
21
21
|
import 'os';
|
|
22
22
|
import 'tmp';
|