happy-imou-cloud 2.1.11 → 2.1.14
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/bin/happy-cloud.mjs +1 -1
- package/dist/{BaseReasoningProcessor-G3hno_kB.cjs → BaseReasoningProcessor-BopJzCX1.cjs} +2 -2
- package/dist/{BaseReasoningProcessor-BrQM8i44.mjs → BaseReasoningProcessor-DBI-wmAq.mjs} +2 -2
- package/dist/{ProviderSelectionHandler-bkna8Dc0.mjs → ProviderSelectionHandler-BBhFPe8E.mjs} +2 -2
- package/dist/{ProviderSelectionHandler-B0HZZgMG.cjs → ProviderSelectionHandler-D-g808TK.cjs} +2 -2
- package/dist/{api-CtQFwLUJ.cjs → api-CleaBHoF.cjs} +68 -5
- package/dist/{api-CEUrdZHY.mjs → api-ehyDSOc5.mjs} +68 -5
- package/dist/{command-C6M6wHp1.cjs → command-jYweihkY.cjs} +3 -3
- package/dist/{command-DZ8Od7tC.mjs → command-o-MfrQiP.mjs} +3 -3
- package/dist/{index-Drrrz-Ot.mjs → index-DN6ihUoI.mjs} +324 -8
- package/dist/{index-AwnMQcsU.cjs → index-aAcmZ774.cjs} +327 -11
- package/dist/index.cjs +3 -3
- package/dist/index.mjs +3 -3
- package/dist/lib.cjs +1 -1
- package/dist/lib.d.cts +441 -81
- package/dist/lib.d.mts +441 -81
- package/dist/lib.mjs +1 -1
- package/dist/{persistence-tRrZOs0P.mjs → persistence-DBVrW1P5.mjs} +1 -1
- package/dist/{persistence-n4WMW33G.cjs → persistence-oHFJbsvr.cjs} +1 -1
- package/dist/{registerKillSessionHandler-DKWTYJ3L.cjs → registerKillSessionHandler-3R7E1V6V.cjs} +168 -9
- package/dist/{registerKillSessionHandler-DPh8LfUR.mjs → registerKillSessionHandler-BVnsXvxn.mjs} +168 -9
- package/dist/{runClaude-C-JjQB5i.mjs → runClaude-0rReIj8o.mjs} +15 -7
- package/dist/{runClaude-7rux3CCC.cjs → runClaude-C1eZZv8o.cjs} +15 -7
- package/dist/{runCodex-D81osbbB.cjs → runCodex-BROvg6-O.cjs} +35 -11
- package/dist/{runCodex-uHVY1g3W.mjs → runCodex-CwT9QIML.mjs} +35 -11
- package/dist/{runGemini-DFhltfvZ.mjs → runGemini-BlJNEB-g.mjs} +15 -7
- package/dist/{runGemini-DaSpiomM.cjs → runGemini-C-oJCLfz.cjs} +15 -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
- package/scripts/release-notes-utils.mjs +91 -0
- package/scripts/release-smoke-utils.mjs +11 -0
- package/scripts/release-smoke.mjs +270 -264
package/bin/happy-cloud.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var api = require('./api-
|
|
3
|
+
var index = require('./index-aAcmZ774.cjs');
|
|
4
|
+
var api = require('./api-CleaBHoF.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-
|
|
2
|
-
import { s as startOfflineReconnection, c as configuration, i as isAuthenticationRequiredError, l as logger } from './api-
|
|
1
|
+
import { a as createSessionMetadata, p as publishSessionRegistration } from './index-DN6ihUoI.mjs';
|
|
2
|
+
import { s as startOfflineReconnection, c as configuration, i as isAuthenticationRequiredError, l as logger } from './api-ehyDSOc5.mjs';
|
|
3
3
|
import { EventEmitter } from 'node:events';
|
|
4
4
|
import { randomUUID } from 'node:crypto';
|
|
5
5
|
|
package/dist/{ProviderSelectionHandler-bkna8Dc0.mjs → ProviderSelectionHandler-BBhFPe8E.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-ehyDSOc5.mjs';
|
|
2
|
+
import { g as getPendingInteractionTimeoutMs, I as INTERACTION_SUPERSEDED_ERROR, a as INTERACTION_TIMED_OUT_ERROR } from './registerKillSessionHandler-BVnsXvxn.mjs';
|
|
3
3
|
|
|
4
4
|
async function runModeLoop(opts) {
|
|
5
5
|
let currentMode = opts.startingMode;
|
package/dist/{ProviderSelectionHandler-B0HZZgMG.cjs → ProviderSelectionHandler-D-g808TK.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-CleaBHoF.cjs');
|
|
4
|
+
var registerKillSessionHandler = require('./registerKillSessionHandler-3R7E1V6V.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.14";
|
|
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-oHFJbsvr.cjs'); });
|
|
437
437
|
const state = await readDaemonState();
|
|
438
438
|
if (!state) {
|
|
439
439
|
return logs;
|
|
@@ -594,9 +594,23 @@ const HappyOrgTaskControlSchema = z.z.object({
|
|
|
594
594
|
newDecision: z.z.string().min(1).optional().nullable(),
|
|
595
595
|
newResource: z.z.string().min(1).optional().nullable()
|
|
596
596
|
});
|
|
597
|
+
const HappyOrgReplyContextSchema = z.z.object({
|
|
598
|
+
dispatchId: z.z.string().min(1),
|
|
599
|
+
scope: z.z.string().min(1),
|
|
600
|
+
replyTo: z.z.string().min(1)
|
|
601
|
+
});
|
|
602
|
+
const HappyOrgSpecialistHomeIdentitySchema = z.z.object({
|
|
603
|
+
homeSlug: z.z.string().min(1),
|
|
604
|
+
path: z.z.string().min(1).nullish(),
|
|
605
|
+
happySessionId: z.z.string().min(1).nullish(),
|
|
606
|
+
machineId: z.z.string().min(1).nullish(),
|
|
607
|
+
startedBy: z.z.enum(["daemon", "terminal"]).nullish(),
|
|
608
|
+
flavor: z.z.string().min(1).nullish()
|
|
609
|
+
});
|
|
597
610
|
const HappyOrgMessageMetaSchema = z.z.object({
|
|
598
611
|
taskContext: HappyOrgTaskContextSchema.optional(),
|
|
599
|
-
control: HappyOrgTaskControlSchema.optional()
|
|
612
|
+
control: HappyOrgTaskControlSchema.optional(),
|
|
613
|
+
replyContext: HappyOrgReplyContextSchema.optional()
|
|
600
614
|
});
|
|
601
615
|
z.z.object({
|
|
602
616
|
turnStatus: HappyOrgTurnStatusSchema.optional().nullable(),
|
|
@@ -613,7 +627,9 @@ const HappyOrgTurnReportSchema = HappyOrgTaskContextSchema.extend({
|
|
|
613
627
|
blockerCode: z.z.string().nullable(),
|
|
614
628
|
decisionNeeded: z.z.string().nullable(),
|
|
615
629
|
targetArtifact: z.z.string().nullable(),
|
|
616
|
-
repeatFingerprint: z.z.string().nullable()
|
|
630
|
+
repeatFingerprint: z.z.string().nullable(),
|
|
631
|
+
replyContext: HappyOrgReplyContextSchema.nullish(),
|
|
632
|
+
specialistHome: HappyOrgSpecialistHomeIdentitySchema.nullish()
|
|
617
633
|
});
|
|
618
634
|
const HappyOrgRepeatEntrySchema = z.z.object({
|
|
619
635
|
count: z.z.number().int().nonnegative(),
|
|
@@ -640,6 +656,8 @@ z.z.object({
|
|
|
640
656
|
taskContext: HappyOrgTaskContextSchema.optional(),
|
|
641
657
|
runtime: HappyOrgRuntimeStateSchema.optional(),
|
|
642
658
|
activeOwner: HappyOrgTaskOwnershipSchema.nullish(),
|
|
659
|
+
replyContext: HappyOrgReplyContextSchema.nullish(),
|
|
660
|
+
specialistHome: HappyOrgSpecialistHomeIdentitySchema.nullish(),
|
|
643
661
|
repeat: z.z.object({
|
|
644
662
|
threshold: z.z.number().int().positive(),
|
|
645
663
|
fingerprints: z.z.record(z.z.string(), HappyOrgRepeatEntrySchema)
|
|
@@ -3578,13 +3596,58 @@ class ApiClient {
|
|
|
3578
3596
|
url: opts.url,
|
|
3579
3597
|
body: opts.data,
|
|
3580
3598
|
headers: {
|
|
3581
|
-
"Content-Type": "application/json"
|
|
3599
|
+
"Content-Type": "application/json",
|
|
3600
|
+
...opts.headers ?? {}
|
|
3582
3601
|
},
|
|
3583
3602
|
signRequest: opts.signRequest ?? true
|
|
3584
3603
|
}),
|
|
3585
3604
|
timeout: opts.timeout
|
|
3586
3605
|
});
|
|
3587
3606
|
}
|
|
3607
|
+
async getOrganizationFrontDoor() {
|
|
3608
|
+
const response = await this.request({
|
|
3609
|
+
method: "GET",
|
|
3610
|
+
url: `${configuration.serverUrl}/control/v1/views/organization-front-door`,
|
|
3611
|
+
timeout: 5e3
|
|
3612
|
+
});
|
|
3613
|
+
return response.data.frontDoor;
|
|
3614
|
+
}
|
|
3615
|
+
async listOrganizationAgents(opts = {}) {
|
|
3616
|
+
const response = await this.request({
|
|
3617
|
+
method: "GET",
|
|
3618
|
+
url: `${configuration.serverUrl}/control/v1/agents`,
|
|
3619
|
+
headers: opts.organizationId ? { "x-happy-organization-id": opts.organizationId } : void 0,
|
|
3620
|
+
timeout: 5e3
|
|
3621
|
+
});
|
|
3622
|
+
return response.data.agents;
|
|
3623
|
+
}
|
|
3624
|
+
async createOrganizationDispatchNotice(opts) {
|
|
3625
|
+
const response = await this.request({
|
|
3626
|
+
method: "POST",
|
|
3627
|
+
url: `${configuration.serverUrl}/control/v1/dispatches`,
|
|
3628
|
+
data: {
|
|
3629
|
+
memberAgentId: opts.memberAgentId,
|
|
3630
|
+
task_id: opts.taskId,
|
|
3631
|
+
scope: opts.scope,
|
|
3632
|
+
allowed_paths: opts.allowedPaths,
|
|
3633
|
+
forbidden_paths: opts.forbiddenPaths ?? [],
|
|
3634
|
+
cross_scope_policy: "ask-first",
|
|
3635
|
+
note: opts.note ?? null
|
|
3636
|
+
},
|
|
3637
|
+
headers: { "x-happy-organization-id": opts.organizationId },
|
|
3638
|
+
timeout: 1e4
|
|
3639
|
+
});
|
|
3640
|
+
return response.data.receipt;
|
|
3641
|
+
}
|
|
3642
|
+
async getOrganizationDispatchReceipt(opts) {
|
|
3643
|
+
const response = await this.request({
|
|
3644
|
+
method: "GET",
|
|
3645
|
+
url: `${configuration.serverUrl}/control/v1/views/dispatches/${encodeURIComponent(opts.dispatchId)}`,
|
|
3646
|
+
headers: { "x-happy-organization-id": opts.organizationId },
|
|
3647
|
+
timeout: 5e3
|
|
3648
|
+
});
|
|
3649
|
+
return response.data.receipt;
|
|
3650
|
+
}
|
|
3588
3651
|
async getProtocolV3Descriptor() {
|
|
3589
3652
|
const url = `${configuration.serverUrl}/v3/capabilities`;
|
|
3590
3653
|
const payload = await this.requestProtocolV3Resource({
|
|
@@ -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.14";
|
|
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-DBVrW1P5.mjs');
|
|
435
435
|
const state = await readDaemonState();
|
|
436
436
|
if (!state) {
|
|
437
437
|
return logs;
|
|
@@ -592,9 +592,23 @@ const HappyOrgTaskControlSchema = z.object({
|
|
|
592
592
|
newDecision: z.string().min(1).optional().nullable(),
|
|
593
593
|
newResource: z.string().min(1).optional().nullable()
|
|
594
594
|
});
|
|
595
|
+
const HappyOrgReplyContextSchema = z.object({
|
|
596
|
+
dispatchId: z.string().min(1),
|
|
597
|
+
scope: z.string().min(1),
|
|
598
|
+
replyTo: z.string().min(1)
|
|
599
|
+
});
|
|
600
|
+
const HappyOrgSpecialistHomeIdentitySchema = z.object({
|
|
601
|
+
homeSlug: z.string().min(1),
|
|
602
|
+
path: z.string().min(1).nullish(),
|
|
603
|
+
happySessionId: z.string().min(1).nullish(),
|
|
604
|
+
machineId: z.string().min(1).nullish(),
|
|
605
|
+
startedBy: z.enum(["daemon", "terminal"]).nullish(),
|
|
606
|
+
flavor: z.string().min(1).nullish()
|
|
607
|
+
});
|
|
595
608
|
const HappyOrgMessageMetaSchema = z.object({
|
|
596
609
|
taskContext: HappyOrgTaskContextSchema.optional(),
|
|
597
|
-
control: HappyOrgTaskControlSchema.optional()
|
|
610
|
+
control: HappyOrgTaskControlSchema.optional(),
|
|
611
|
+
replyContext: HappyOrgReplyContextSchema.optional()
|
|
598
612
|
});
|
|
599
613
|
z.object({
|
|
600
614
|
turnStatus: HappyOrgTurnStatusSchema.optional().nullable(),
|
|
@@ -611,7 +625,9 @@ const HappyOrgTurnReportSchema = HappyOrgTaskContextSchema.extend({
|
|
|
611
625
|
blockerCode: z.string().nullable(),
|
|
612
626
|
decisionNeeded: z.string().nullable(),
|
|
613
627
|
targetArtifact: z.string().nullable(),
|
|
614
|
-
repeatFingerprint: z.string().nullable()
|
|
628
|
+
repeatFingerprint: z.string().nullable(),
|
|
629
|
+
replyContext: HappyOrgReplyContextSchema.nullish(),
|
|
630
|
+
specialistHome: HappyOrgSpecialistHomeIdentitySchema.nullish()
|
|
615
631
|
});
|
|
616
632
|
const HappyOrgRepeatEntrySchema = z.object({
|
|
617
633
|
count: z.number().int().nonnegative(),
|
|
@@ -638,6 +654,8 @@ z.object({
|
|
|
638
654
|
taskContext: HappyOrgTaskContextSchema.optional(),
|
|
639
655
|
runtime: HappyOrgRuntimeStateSchema.optional(),
|
|
640
656
|
activeOwner: HappyOrgTaskOwnershipSchema.nullish(),
|
|
657
|
+
replyContext: HappyOrgReplyContextSchema.nullish(),
|
|
658
|
+
specialistHome: HappyOrgSpecialistHomeIdentitySchema.nullish(),
|
|
641
659
|
repeat: z.object({
|
|
642
660
|
threshold: z.number().int().positive(),
|
|
643
661
|
fingerprints: z.record(z.string(), HappyOrgRepeatEntrySchema)
|
|
@@ -3576,13 +3594,58 @@ class ApiClient {
|
|
|
3576
3594
|
url: opts.url,
|
|
3577
3595
|
body: opts.data,
|
|
3578
3596
|
headers: {
|
|
3579
|
-
"Content-Type": "application/json"
|
|
3597
|
+
"Content-Type": "application/json",
|
|
3598
|
+
...opts.headers ?? {}
|
|
3580
3599
|
},
|
|
3581
3600
|
signRequest: opts.signRequest ?? true
|
|
3582
3601
|
}),
|
|
3583
3602
|
timeout: opts.timeout
|
|
3584
3603
|
});
|
|
3585
3604
|
}
|
|
3605
|
+
async getOrganizationFrontDoor() {
|
|
3606
|
+
const response = await this.request({
|
|
3607
|
+
method: "GET",
|
|
3608
|
+
url: `${configuration.serverUrl}/control/v1/views/organization-front-door`,
|
|
3609
|
+
timeout: 5e3
|
|
3610
|
+
});
|
|
3611
|
+
return response.data.frontDoor;
|
|
3612
|
+
}
|
|
3613
|
+
async listOrganizationAgents(opts = {}) {
|
|
3614
|
+
const response = await this.request({
|
|
3615
|
+
method: "GET",
|
|
3616
|
+
url: `${configuration.serverUrl}/control/v1/agents`,
|
|
3617
|
+
headers: opts.organizationId ? { "x-happy-organization-id": opts.organizationId } : void 0,
|
|
3618
|
+
timeout: 5e3
|
|
3619
|
+
});
|
|
3620
|
+
return response.data.agents;
|
|
3621
|
+
}
|
|
3622
|
+
async createOrganizationDispatchNotice(opts) {
|
|
3623
|
+
const response = await this.request({
|
|
3624
|
+
method: "POST",
|
|
3625
|
+
url: `${configuration.serverUrl}/control/v1/dispatches`,
|
|
3626
|
+
data: {
|
|
3627
|
+
memberAgentId: opts.memberAgentId,
|
|
3628
|
+
task_id: opts.taskId,
|
|
3629
|
+
scope: opts.scope,
|
|
3630
|
+
allowed_paths: opts.allowedPaths,
|
|
3631
|
+
forbidden_paths: opts.forbiddenPaths ?? [],
|
|
3632
|
+
cross_scope_policy: "ask-first",
|
|
3633
|
+
note: opts.note ?? null
|
|
3634
|
+
},
|
|
3635
|
+
headers: { "x-happy-organization-id": opts.organizationId },
|
|
3636
|
+
timeout: 1e4
|
|
3637
|
+
});
|
|
3638
|
+
return response.data.receipt;
|
|
3639
|
+
}
|
|
3640
|
+
async getOrganizationDispatchReceipt(opts) {
|
|
3641
|
+
const response = await this.request({
|
|
3642
|
+
method: "GET",
|
|
3643
|
+
url: `${configuration.serverUrl}/control/v1/views/dispatches/${encodeURIComponent(opts.dispatchId)}`,
|
|
3644
|
+
headers: { "x-happy-organization-id": opts.organizationId },
|
|
3645
|
+
timeout: 5e3
|
|
3646
|
+
});
|
|
3647
|
+
return response.data.receipt;
|
|
3648
|
+
}
|
|
3586
3649
|
async getProtocolV3Descriptor() {
|
|
3587
3650
|
const url = `${configuration.serverUrl}/v3/capabilities`;
|
|
3588
3651
|
const payload = await this.requestProtocolV3Resource({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-aAcmZ774.cjs');
|
|
4
4
|
require('chalk');
|
|
5
|
-
require('./api-
|
|
5
|
+
require('./api-CleaBHoF.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-oHFJbsvr.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-DN6ihUoI.mjs';
|
|
2
2
|
import 'chalk';
|
|
3
|
-
import './api-
|
|
3
|
+
import './api-ehyDSOc5.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-DBVrW1P5.mjs';
|
|
20
20
|
import 'node:fs/promises';
|
|
21
21
|
import 'os';
|
|
22
22
|
import 'tmp';
|