qlogicagent 2.19.7 → 2.19.9
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/README.md +16 -5
- package/dist/agent-contract.js +1 -1
- package/dist/agent.js +26 -26
- package/dist/cli.js +1 -1
- package/dist/default-project-knowledge/INSTRUCTIONS.md +7 -7
- package/dist/default-project-knowledge/rules/project-workflow.md +6 -6
- package/dist/host-contract.js +1 -1
- package/dist/index.js +441 -455
- package/dist/protocol.js +1 -1
- package/dist/skills/builtin/desktop-screenshot/SKILL.md +62 -62
- package/dist/skills/builtin/office-doc-reading/SKILL.md +19 -19
- package/dist/skills/mcp/astraclaw-native-mcp-server.js +3 -3
- package/dist/types/cli/acp-session-host.d.ts +4 -0
- package/dist/types/cli/agent-runtime-bootstrap.d.ts +3 -1
- package/dist/types/cli/agent-runtime-session-state.d.ts +12 -4
- package/dist/types/cli/community-resource-installer.d.ts +10 -1
- package/dist/types/cli/industrial-runtime-archive.d.ts +14 -0
- package/dist/types/cli/industrial-runtime-store.d.ts +29 -0
- package/dist/types/cli/mcp-bootstrap.d.ts +11 -1
- package/dist/types/cli/permission-approval-bridge.d.ts +0 -1
- package/dist/types/cli/permission-bootstrap.d.ts +0 -1
- package/dist/types/cli/resolved-agent-cache.d.ts +7 -0
- package/dist/types/cli/runtime-dependency-catalog.d.ts +35 -5
- package/dist/types/cli/stdio-acp-request-host.d.ts +3 -4
- package/dist/types/cli/stdio-agent-session-bootstrap.d.ts +4 -2
- package/dist/types/cli/stdio-runtime-bootstrap.d.ts +0 -2
- package/dist/types/cli/stdio-runtime-services.d.ts +1 -13
- package/dist/types/cli/stdio-server.d.ts +6 -6
- package/dist/types/cli/tool-bootstrap-core-registration.d.ts +1 -0
- package/dist/types/cli/tool-registry-adapter.d.ts +9 -1
- package/dist/types/cli/turn-media-setup.d.ts +15 -0
- package/dist/types/cli/windows-authenticode.d.ts +18 -0
- package/dist/types/host-contract/index.d.ts +4 -24
- package/dist/types/protocol/agent-contract.d.ts +7 -7
- package/dist/types/protocol/wire/acp-protocol.d.ts +6 -5
- package/dist/types/protocol/wire/agent-methods.d.ts +0 -115
- package/dist/types/protocol/wire/index.d.ts +1 -2
- package/dist/types/protocol/wire/notification-payloads.d.ts +0 -87
- package/dist/types/runtime/community/community-consent-client.d.ts +3 -0
- package/dist/types/runtime/community/ranged-download.d.ts +6 -0
- package/dist/types/runtime/infra/industrial-runtime-session-server.d.ts +15 -0
- package/dist/types/runtime/infra/llmrouter-access-token.d.ts +13 -0
- package/dist/types/skills/tools/exec-tool.d.ts +4 -2
- package/dist/types/skills/tools/shell/shell-exec.d.ts +3 -0
- package/dist/types/skills/tools/shell/subprocess-env.d.ts +1 -1
- package/dist/types/test-support/project-store-fixture.d.ts +11 -0
- package/package.json +8 -18
- package/dist/pet-contracts.js +0 -1
- package/dist/pet-host.js +0 -19
- package/dist/types/cli/handlers/pet-confirm-handler.d.ts +0 -7
- package/dist/types/cli/pet-confirm-coordinator.d.ts +0 -20
- package/dist/types/cli/pet-runtime.d.ts +0 -61
- package/dist/types/pet-contracts.d.ts +0 -1
- package/dist/types/pet-host.d.ts +0 -9
- package/dist/types/protocol/wire/pet-contracts.d.ts +0 -76
- package/dist/types/runtime/pet/daily-journey-summarizer.d.ts +0 -25
- package/dist/types/runtime/pet/hatch-pet-runner.d.ts +0 -18
- package/dist/types/runtime/pet/index.d.ts +0 -19
- package/dist/types/runtime/pet/journey-catchup.d.ts +0 -14
- package/dist/types/runtime/pet/journey-day-aggregator.d.ts +0 -27
- package/dist/types/runtime/pet/journey-narrative-prompt.d.ts +0 -8
- package/dist/types/runtime/pet/pet-community-assets.d.ts +0 -21
- package/dist/types/runtime/pet/pet-file-loader.d.ts +0 -5
- package/dist/types/runtime/pet/pet-growth-engine.d.ts +0 -2
- package/dist/types/runtime/pet/pet-profile-service.d.ts +0 -111
- package/dist/types/runtime/pet/pet-reaction-engine.d.ts +0 -11
- package/dist/types/runtime/pet/pet-soul-service.d.ts +0 -21
- package/dist/types/runtime/pet/pet-types.d.ts +0 -1
- package/dist/types/runtime/pet/petdex-asset.d.ts +0 -60
- package/dist/types/runtime/pet/petdex-forge-service.d.ts +0 -21
- package/dist/types/runtime/pet/petdex-vision-qa.d.ts +0 -12
- package/dist/types/transport/host-pet-client.d.ts +0 -20
- package/dist/vendor/hatch-pet/LICENSE.txt +0 -201
- package/dist/vendor/hatch-pet/NOTICE.md +0 -25
- package/dist/vendor/hatch-pet/references/animation-rows.md +0 -29
- package/dist/vendor/hatch-pet/references/codex-pet-contract.md +0 -35
- package/dist/vendor/hatch-pet/references/qa-rubric.md +0 -66
- package/dist/vendor/hatch-pet/scripts/compose_atlas.py +0 -169
- package/dist/vendor/hatch-pet/scripts/derive_running_left_from_running_right.py +0 -150
- package/dist/vendor/hatch-pet/scripts/extract_strip_frames.py +0 -408
- package/dist/vendor/hatch-pet/scripts/inspect_frames.py +0 -256
- package/dist/vendor/hatch-pet/scripts/make_contact_sheet.py +0 -96
- package/dist/vendor/hatch-pet/scripts/prepare_pet_run.py +0 -834
- package/dist/vendor/hatch-pet/scripts/render_animation_previews.py +0 -78
- package/dist/vendor/hatch-pet/scripts/validate_atlas.py +0 -157
|
@@ -9,7 +9,6 @@ export interface PermissionApprovalBridgeDeps {
|
|
|
9
9
|
}>;
|
|
10
10
|
} | undefined;
|
|
11
11
|
sendNotification<M extends NotificationMethod>(method: M, params: NotificationMethodMap[M]): void;
|
|
12
|
-
isPetActive(): boolean;
|
|
13
12
|
}
|
|
14
13
|
export declare function requestPermissionApproval(request: ApprovalRequest, deps: PermissionApprovalBridgeDeps): Promise<ApprovalResponse>;
|
|
15
14
|
export declare function createApprovalResponseFromAcpOption(request: ApprovalRequest, optionId: string | undefined): ApprovalResponse;
|
|
@@ -30,7 +30,6 @@ export interface PermissionBootstrapDeps {
|
|
|
30
30
|
}>;
|
|
31
31
|
} | undefined;
|
|
32
32
|
sendNotification<M extends NotificationMethod>(method: M, params: NotificationMethodMap[M]): void;
|
|
33
|
-
isPetActive(): boolean;
|
|
34
33
|
resolveHostProfileClient?: () => HostProfileClient | undefined;
|
|
35
34
|
currentUnregister?: (() => void) | null;
|
|
36
35
|
}
|
|
@@ -28,6 +28,11 @@ export interface ResolvedAgentSnapshot {
|
|
|
28
28
|
baseUrl: string;
|
|
29
29
|
configKey: string;
|
|
30
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* ToolInvoker captures a session overlay at Agent construction, so equal provider/model settings
|
|
33
|
+
* are not sufficient for reuse across canonical sessions in one pooled process.
|
|
34
|
+
*/
|
|
35
|
+
export declare function buildSessionAgentConfigKey(sessionId: string, resolvedConfigKey: string, mcpConfigKey?: string): string;
|
|
31
36
|
export declare class ResolvedAgentCache {
|
|
32
37
|
agent: Agent | null;
|
|
33
38
|
transport: LLMTransport | null;
|
|
@@ -42,6 +47,8 @@ export declare class ResolvedAgentCache {
|
|
|
42
47
|
store(snapshot: ResolvedAgentSnapshot): void;
|
|
43
48
|
/** Drop only the Agent + config key — force re-resolve, keep the last snapshot. */
|
|
44
49
|
forgetAgent(): void;
|
|
50
|
+
/** Drop the derived Agent only when it belongs to the retired canonical session. */
|
|
51
|
+
forgetSession(sessionId: string): void;
|
|
45
52
|
/** Wipe ALL derived state — the resolved client is stale (registry change). */
|
|
46
53
|
invalidate(): void;
|
|
47
54
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type VerifyAuthenticodeInput } from "./windows-authenticode.js";
|
|
1
2
|
/**
|
|
2
3
|
* Vetted runtime-dependency catalog for community skills.
|
|
3
4
|
*
|
|
@@ -26,13 +27,13 @@ export interface RuntimeDependencySpec {
|
|
|
26
27
|
*/
|
|
27
28
|
quick: boolean;
|
|
28
29
|
/** Honest size estimate surfaced in the consent card. */
|
|
29
|
-
estSizeMB
|
|
30
|
-
|
|
31
|
-
hubBinary: HubBinaryInstall;
|
|
30
|
+
estSizeMB?: number;
|
|
31
|
+
install: RuntimeInstallMode;
|
|
32
32
|
installTimeoutMs: number;
|
|
33
33
|
docsUrl?: string;
|
|
34
34
|
}
|
|
35
|
-
export interface
|
|
35
|
+
export interface UserBinaryInstall {
|
|
36
|
+
kind: "user-binary";
|
|
36
37
|
/** Resolve id for the Hub (GET /api/v15/runtime/:id/resolve?platform=…). */
|
|
37
38
|
resourceId: string;
|
|
38
39
|
/** Absolute path the per-platform binary is written to (matches upstream layout). */
|
|
@@ -41,7 +42,17 @@ export interface HubBinaryInstall {
|
|
|
41
42
|
pathDir(): string;
|
|
42
43
|
/** chmod 0o755 after writing (POSIX). */
|
|
43
44
|
posixExecutable: boolean;
|
|
45
|
+
/** Verified release archives expose exactly one executable entry per host family. */
|
|
46
|
+
archiveEntries?: {
|
|
47
|
+
win32: string;
|
|
48
|
+
default: string;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export interface AstraClawPrivateZipInstall {
|
|
52
|
+
kind: "astraclaw-private-zip";
|
|
53
|
+
runtimeId: string;
|
|
44
54
|
}
|
|
55
|
+
export type RuntimeInstallMode = UserBinaryInstall | AstraClawPrivateZipInstall;
|
|
45
56
|
export declare const RUNTIME_DEPENDENCIES: Record<string, RuntimeDependencySpec>;
|
|
46
57
|
export interface RuntimeDependencyStatus {
|
|
47
58
|
id: string;
|
|
@@ -58,20 +69,34 @@ export interface RuntimeDependencyStatus {
|
|
|
58
69
|
}
|
|
59
70
|
/** Resolved download for a hub-binary runtime (signed URL + integrity metadata). */
|
|
60
71
|
export interface ResolvedRuntimeBinary {
|
|
72
|
+
id: string;
|
|
73
|
+
platform: string;
|
|
61
74
|
version: string;
|
|
62
75
|
downloadUrl: string;
|
|
63
76
|
/** sha256 hex digest — the integrity anchor verified before placing the file. */
|
|
64
77
|
checksum: string;
|
|
65
78
|
sizeBytes: number;
|
|
79
|
+
format: "executable" | "zip" | "tar.gz";
|
|
80
|
+
entrypoint?: string;
|
|
66
81
|
}
|
|
82
|
+
export type RuntimeExecFile = (file: string, args: string[], options: {
|
|
83
|
+
timeout: number;
|
|
84
|
+
windowsHide: boolean;
|
|
85
|
+
encoding: "utf8";
|
|
86
|
+
}, callback: (error: Error | null, stdout: string, stderr: string) => void) => unknown;
|
|
67
87
|
export interface RuntimeInstallDeps {
|
|
68
88
|
/** Resolve a hub-binary runtime via the Hub (community client). */
|
|
69
89
|
resolveBinary(id: string, platform: string): Promise<ResolvedRuntimeBinary>;
|
|
70
90
|
/** Injectable for tests. */
|
|
71
91
|
fetchFn?: typeof fetch;
|
|
92
|
+
hostPlatform?: string;
|
|
93
|
+
hostArch?: string;
|
|
94
|
+
rootDir?: string;
|
|
95
|
+
verifyAuthenticodeFiles?: (input: VerifyAuthenticodeInput) => Promise<void>;
|
|
96
|
+
execFileFn?: RuntimeExecFile;
|
|
72
97
|
}
|
|
73
98
|
/** Map this host to the officecli asset platform key (`<os>-<arch>`). */
|
|
74
|
-
export declare function runtimePlatformKey(): string;
|
|
99
|
+
export declare function runtimePlatformKey(platform?: string, architecture?: string): string;
|
|
75
100
|
export declare function probeRuntimeDependency(id: string): Promise<RuntimeDependencyStatus>;
|
|
76
101
|
export interface RuntimeInstallResult {
|
|
77
102
|
id: string;
|
|
@@ -80,3 +105,8 @@ export interface RuntimeInstallResult {
|
|
|
80
105
|
binPath?: string;
|
|
81
106
|
}
|
|
82
107
|
export declare function installRuntimeDependency(id: string, deps: RuntimeInstallDeps): Promise<RuntimeInstallResult>;
|
|
108
|
+
/**
|
|
109
|
+
* Read only the allowlisted executable from a checksum-verified release archive. `tar -xOf`
|
|
110
|
+
* streams the named entry without unpacking sibling files or trusting archive paths.
|
|
111
|
+
*/
|
|
112
|
+
export declare function extractRuntimeArchive(archiveBytes: Buffer, executableEntry: string): Buffer;
|
|
@@ -8,14 +8,13 @@ import type { CliAcpRequestHandlerHost } from "./cli-acp-request-handler.js";
|
|
|
8
8
|
* (`this: any`), so members it touches must be forwarded here explicitly;
|
|
9
9
|
* see TURN_PIPELINE_HOST_MEMBERS for the regression-tested list.
|
|
10
10
|
*/
|
|
11
|
-
export type StdioAcpRequestHostSource = Pick<CliAcpRequestHandlerHost, "activeTurn" | "acpSessionMeta" | "acpSessionMetaBySession" | "currentHooks" | "currentSessionId" | "currentTurnId" | "memoryPrefetchState" | "permissionChecker" | "sessionHistory" | "sessionLlmConfigBySession" | "materializedSessionProfiles" | "sessionState" | "cancelIdleDreamTimer" | "disposeSessionRuntime" | "enableIdleDream" | "ensureDefaultProject" | "initializeHostProjectAuthority" | "ensureModelRegistryHydrated" | "getActiveProjectRoot" | "log" | "sendNotification" | "setActiveWorkdir"> & {
|
|
11
|
+
export type StdioAcpRequestHostSource = Pick<CliAcpRequestHandlerHost, "activeTurn" | "acpSessionMeta" | "acpSessionMetaBySession" | "currentHooks" | "currentSessionId" | "currentTurnId" | "memoryPrefetchState" | "permissionChecker" | "sessionHistory" | "sessionLlmConfigBySession" | "materializedSessionProfiles" | "sessionState" | "cancelIdleDreamTimer" | "disposeSessionRuntime" | "disposeSessionMcp" | "runInSessionScope" | "enableIdleDream" | "ensureDefaultProject" | "initializeHostProjectAuthority" | "ensureModelRegistryHydrated" | "getActiveProjectRoot" | "log" | "sendNotification" | "setActiveWorkdir"> & {
|
|
12
12
|
currentModel: string | undefined;
|
|
13
13
|
lastAssistantMessageForExtract: string | undefined;
|
|
14
14
|
lastUserMessageForAutoExtract: string | undefined;
|
|
15
15
|
mcpReady: Promise<void>;
|
|
16
16
|
memdir: unknown;
|
|
17
17
|
pendingAskUser: unknown;
|
|
18
|
-
petRuntime: unknown;
|
|
19
18
|
projectMemoryStoreFactory: unknown;
|
|
20
19
|
toolCatalog: unknown;
|
|
21
20
|
taskDistillation: unknown;
|
|
@@ -29,11 +28,11 @@ export type StdioAcpRequestHostSource = Pick<CliAcpRequestHandlerHost, "activeTu
|
|
|
29
28
|
} | undefined;
|
|
30
29
|
getHostRequestClient(): Pick<HostRequestClient, "request"> | undefined;
|
|
31
30
|
drainPendingTaskNotifications(): string[];
|
|
32
|
-
resolveAgent(config: unknown): unknown;
|
|
31
|
+
resolveAgent(config: unknown, projectRoot?: string): unknown;
|
|
33
32
|
resolveClientForPurpose(purpose: unknown): unknown;
|
|
34
33
|
sendResponse(id: string | number, result?: unknown, error?: unknown): void;
|
|
35
34
|
};
|
|
36
35
|
/** Host members the shared turn pipeline reads/writes — keep in sync with
|
|
37
36
|
* `grep -oE "this\.[a-zA-Z]+" src/cli/handlers/turn-handler.ts | sort -u`. */
|
|
38
|
-
export declare const TURN_PIPELINE_HOST_MEMBERS: readonly ["activeTurn", "configureTurnMedia", "currentHooks", "currentModel", "currentTurnId", "drainPendingTaskNotifications", "getAcpPermissionSession", "getHostRequestClient", "getActiveProjectRoot", "lastAssistantMessageForExtract", "lastUserMessageForAutoExtract", "log", "mcpReady", "memdir", "pendingAskUser", "permissionChecker", "
|
|
37
|
+
export declare const TURN_PIPELINE_HOST_MEMBERS: readonly ["activeTurn", "configureTurnMedia", "currentHooks", "currentModel", "currentTurnId", "drainPendingTaskNotifications", "getAcpPermissionSession", "getHostRequestClient", "getActiveProjectRoot", "lastAssistantMessageForExtract", "lastUserMessageForAutoExtract", "log", "mcpReady", "memdir", "pendingAskUser", "permissionChecker", "projectMemoryStoreFactory", "resolveAgent", "resolveClientForPurpose", "sendNotification", "sendResponse", "sessionHistory", "sessionState", "setActiveWorkdir", "taskDistillation", "toolCatalog"];
|
|
39
38
|
export declare function createStdioAcpRequestHandlerHost(host: StdioAcpRequestHostSource): CliAcpRequestHandlerHost;
|
|
@@ -42,7 +42,6 @@ export interface StdioAgentSessionBootstrapDeps {
|
|
|
42
42
|
mediaPersistence: MediaPersistence;
|
|
43
43
|
toolCatalog: ToolCatalog;
|
|
44
44
|
runtimeSession: {
|
|
45
|
-
mcpManager: McpManager | null;
|
|
46
45
|
permissionUnregister: (() => void) | null;
|
|
47
46
|
fileWatcher: FileWatcher | null;
|
|
48
47
|
getPluginSkills(): ReturnType<PluginLoader["getPluginSkills"]>;
|
|
@@ -56,8 +55,12 @@ export interface StdioAgentSessionBootstrapDeps {
|
|
|
56
55
|
ruleEngine: PermissionRuleEnginePort;
|
|
57
56
|
}): void;
|
|
58
57
|
};
|
|
58
|
+
currentMcpManager: McpManager | null;
|
|
59
|
+
currentMcpReady: Promise<void>;
|
|
60
|
+
currentMcpConfigKey: string;
|
|
59
61
|
setMcpManager(manager: McpManager | null): void;
|
|
60
62
|
setMcpReady(ready: Promise<void>): void;
|
|
63
|
+
setMcpConfigKey(configKey: string): void;
|
|
61
64
|
setPluginLoader(loader: PluginLoader): void;
|
|
62
65
|
setFileWatcher(watcher: FileWatcher | null): void;
|
|
63
66
|
getAcpPermissionSession(): {
|
|
@@ -66,7 +69,6 @@ export interface StdioAgentSessionBootstrapDeps {
|
|
|
66
69
|
optionId?: string;
|
|
67
70
|
}>;
|
|
68
71
|
} | undefined;
|
|
69
|
-
isPetActive(): boolean;
|
|
70
72
|
coreToolHost: CliCoreToolHostDeps;
|
|
71
73
|
log(message: string): void;
|
|
72
74
|
sendNotification<M extends NotificationMethod>(method: M, params: NotificationMethodMap[M]): void;
|
|
@@ -4,7 +4,6 @@ import type { LLMTransport } from "./provider-core-facade.js";
|
|
|
4
4
|
import type { MemoryHostRequestAccess } from "./memory-coordinator.js";
|
|
5
5
|
import { type StdioRuntimeServices } from "./stdio-runtime-services.js";
|
|
6
6
|
import type { HostProfileClient } from "../transport/host-profile-client.js";
|
|
7
|
-
import type { HostPetClient } from "../transport/host-pet-client.js";
|
|
8
7
|
export interface StdioRuntimeBootstrapDeps {
|
|
9
8
|
verbose: boolean;
|
|
10
9
|
getActiveProjectRoot(): string;
|
|
@@ -21,6 +20,5 @@ export interface StdioRuntimeBootstrapDeps {
|
|
|
21
20
|
resolveMemoryHostRequestAccess?(): MemoryHostRequestAccess | null;
|
|
22
21
|
/** Lazy session-bound host profile facade; unavailable/non-ACP must fail loud at first web invoke. */
|
|
23
22
|
resolveHostProfileClient?(): HostProfileClient | undefined;
|
|
24
|
-
resolveHostPetClient?(): HostPetClient | undefined;
|
|
25
23
|
}
|
|
26
24
|
export declare function bootstrapStdioRuntimeServices(deps: StdioRuntimeBootstrapDeps): StdioRuntimeServices;
|
|
@@ -1,26 +1,15 @@
|
|
|
1
|
-
import type { NotificationMethod, NotificationMethodMap } from "../protocol/notifications.js";
|
|
2
1
|
import type { MemoryDreamRuntimeProvider, MemoryHandlerProvider, PathService, ToolBootstrap, ToolCatalog } from "../runtime/ports/index.js";
|
|
3
2
|
import { MediaPersistence } from "../runtime/infra/media-persistence.js";
|
|
4
|
-
import { MediaClient, ProviderRegistry
|
|
3
|
+
import { MediaClient, ProviderRegistry } from "./provider-core-facade.js";
|
|
5
4
|
import { type MemoryHostRequestAccess, type MemoryProviderState } from "./memory-coordinator.js";
|
|
6
|
-
import { type PetRuntime } from "./pet-runtime.js";
|
|
7
|
-
import type { HostPetClient } from "../transport/host-pet-client.js";
|
|
8
5
|
import { type TurnMediaSetupHost } from "./turn-media-setup.js";
|
|
9
6
|
export interface StdioRuntimeServicesDeps {
|
|
10
7
|
getActiveProjectRoot(): string;
|
|
11
|
-
getCurrentSessionId?(): string | undefined;
|
|
12
|
-
resolveClientForPurpose(purpose: import("../runtime/infra/model-registry.js").ModelPurpose): {
|
|
13
|
-
transport: LLMTransport;
|
|
14
|
-
apiKey: string;
|
|
15
|
-
model: string;
|
|
16
|
-
} | null;
|
|
17
|
-
sendNotification<M extends NotificationMethod>(method: M, params: NotificationMethodMap[M]): void;
|
|
18
8
|
/**
|
|
19
9
|
* B3(X7)host-state 接入面(AcpServer;initialize 前/非 ACP 宿主 = null)。
|
|
20
10
|
* memory provider 工厂据此在创建时刻按 memory service 一次性选型 HostMemoryProvider。
|
|
21
11
|
*/
|
|
22
12
|
resolveMemoryHostRequestAccess?(): MemoryHostRequestAccess | null;
|
|
23
|
-
resolveHostPetClient?(): HostPetClient | undefined;
|
|
24
13
|
}
|
|
25
14
|
export interface StdioRuntimeServices {
|
|
26
15
|
providerRegistry: ProviderRegistry;
|
|
@@ -29,7 +18,6 @@ export interface StdioRuntimeServices {
|
|
|
29
18
|
pathService: PathService;
|
|
30
19
|
toolCatalog: ToolCatalog;
|
|
31
20
|
toolBootstrap: ToolBootstrap;
|
|
32
|
-
petRuntime: PetRuntime;
|
|
33
21
|
configureTurnMedia(params: {
|
|
34
22
|
host: Omit<TurnMediaSetupHost, "mediaClient">;
|
|
35
23
|
config?: Record<string, unknown>;
|
|
@@ -23,10 +23,8 @@ import type { NotificationMethod, NotificationMethodMap } from "../protocol/noti
|
|
|
23
23
|
import { AgentRuntimeSessionState } from "./agent-runtime-session-state.js";
|
|
24
24
|
import { type MultiAgentHandlerHost } from "./multi-agent-handler-host.js";
|
|
25
25
|
import { SessionHistoryCoordinator } from "./session-history-coordinator.js";
|
|
26
|
-
import { PetConfirmCoordinator } from "./pet-confirm-coordinator.js";
|
|
27
26
|
import type { MemoryDreamRuntimeProvider, MemoryHandlerProvider, PermissionMode, ProjectMemoryStore } from "../runtime/ports/index.js";
|
|
28
27
|
import { HostProfileClient } from "../transport/host-profile-client.js";
|
|
29
|
-
import { HostPetClient } from "../transport/host-pet-client.js";
|
|
30
28
|
import { HostCapabilityClient } from "../transport/host-capability-client.js";
|
|
31
29
|
import { HostSessionClient } from "../transport/host-session-client.js";
|
|
32
30
|
import { HostProjectClient } from "../transport/host-project-client.js";
|
|
@@ -50,6 +48,8 @@ export declare class StdioServer {
|
|
|
50
48
|
private transport;
|
|
51
49
|
private readonly runtimeServices;
|
|
52
50
|
private readonly runtimeSession;
|
|
51
|
+
/** Canonical ACP session captured for the full async turn; never inferred from a mutable pointer. */
|
|
52
|
+
private readonly sessionScope;
|
|
53
53
|
/**
|
|
54
54
|
* DERIVED resolved-agent cache (Agent + LLM client snapshot). The invalidation
|
|
55
55
|
* invariant (full wipe on registry change vs forget-agent on session dispose)
|
|
@@ -88,7 +88,6 @@ export declare class StdioServer {
|
|
|
88
88
|
sessionHistory: SessionHistoryCoordinator;
|
|
89
89
|
private idleDreamCoordinator;
|
|
90
90
|
private readonly sessionRuntime;
|
|
91
|
-
readonly petConfirmCoordinator: PetConfirmCoordinator;
|
|
92
91
|
private modelRegistryHydration;
|
|
93
92
|
private get registry();
|
|
94
93
|
get mediaClient(): import("@xiaozhiclaw/provider-core/media-client").MediaClient;
|
|
@@ -97,7 +96,6 @@ export declare class StdioServer {
|
|
|
97
96
|
get toolCatalog(): import("../runtime/ports/tool-contracts.js").ToolCatalog;
|
|
98
97
|
/** Turn pipeline awaits this before tool dispatch (MCP servers connected). */
|
|
99
98
|
get mcpReady(): Promise<void>;
|
|
100
|
-
get petRuntime(): import("./pet-runtime.js").PetRuntime;
|
|
101
99
|
private get agent();
|
|
102
100
|
/** Cached LLM transport for sub-agent forks (dream). */
|
|
103
101
|
get currentTransport(): LLMTransport | null;
|
|
@@ -107,6 +105,8 @@ export declare class StdioServer {
|
|
|
107
105
|
private get currentBaseUrl();
|
|
108
106
|
get currentSessionId(): string;
|
|
109
107
|
set currentSessionId(v: string);
|
|
108
|
+
private activeScopedSessionId;
|
|
109
|
+
runInSessionScope<T>(sessionId: string, action: () => Promise<T>): Promise<T>;
|
|
110
110
|
get currentTurnId(): string;
|
|
111
111
|
set currentTurnId(v: string);
|
|
112
112
|
/**
|
|
@@ -128,7 +128,6 @@ export declare class StdioServer {
|
|
|
128
128
|
/** D2 telemetry/feedback business facade; durable storage remains gateway-only. */
|
|
129
129
|
getHostFeedbackClient(): HostFeedbackClient | undefined;
|
|
130
130
|
getHostProjectClient(): HostProjectClient | undefined;
|
|
131
|
-
getHostPetClient(): HostPetClient | undefined;
|
|
132
131
|
initializeHostProjectAuthority(): Promise<void>;
|
|
133
132
|
/**
|
|
134
133
|
* Mid-turn guidance queue (运行中引导). Reset per turn by runTurnPipeline, pushed by
|
|
@@ -222,7 +221,7 @@ export declare class StdioServer {
|
|
|
222
221
|
private _taskDistillation;
|
|
223
222
|
get taskDistillation(): TaskDistillationCoordinator;
|
|
224
223
|
ensureTaskDistillation(): TaskDistillationCoordinator;
|
|
225
|
-
resolveAgent(config: TurnConfig): Agent | null;
|
|
224
|
+
resolveAgent(config: TurnConfig, routedProjectRoot?: string): Agent | null;
|
|
226
225
|
private invalidateResolvedLlmCache;
|
|
227
226
|
createDreamHandlerHost(): import("./handlers/dream-handler.js").DreamHandlerHost;
|
|
228
227
|
private createAcpExtendedHandlerHost;
|
|
@@ -254,6 +253,7 @@ export declare class StdioServer {
|
|
|
254
253
|
enableIdleDream(minutes?: number): void;
|
|
255
254
|
cancelIdleDreamTimer(): void;
|
|
256
255
|
disposeSessionRuntime(): void;
|
|
256
|
+
disposeSessionMcp(sessionId: string): Promise<void>;
|
|
257
257
|
/**
|
|
258
258
|
* Initialize the ACP server alongside the legacy protocol.
|
|
259
259
|
* Called once when the host is an ACP-compliant client.
|
|
@@ -22,6 +22,7 @@ export interface LocalCoreToolRegistrationContext {
|
|
|
22
22
|
getCwd(): string;
|
|
23
23
|
activeProjectRoot(): string;
|
|
24
24
|
resolveSandboxConfig(): SandboxConfig | undefined;
|
|
25
|
+
runtimePathEntries(): Promise<string[]>;
|
|
25
26
|
isGroupSecurityMode?(): boolean;
|
|
26
27
|
pathService?: PathService;
|
|
27
28
|
log?: {
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ToolRegistry } from "../skills/tools.js";
|
|
2
2
|
import type { ToolCatalog } from "../runtime/ports/index.js";
|
|
3
3
|
export type { ToolRegistry };
|
|
4
4
|
export declare function createToolCatalogFromRegistry(registry?: ToolRegistry): ToolCatalog;
|
|
5
|
+
/**
|
|
6
|
+
* Creates an empty catalog behind the legacy registry adapter boundary.
|
|
7
|
+
*
|
|
8
|
+
* Runtime/session owners must not depend on the legacy registry implementation merely to obtain
|
|
9
|
+
* isolated storage. Keeping construction here makes ToolCatalog the only contract visible above
|
|
10
|
+
* this adapter and leaves the registry removable in a later cleanup.
|
|
11
|
+
*/
|
|
12
|
+
export declare function createIsolatedToolCatalog(): ToolCatalog;
|
|
@@ -11,6 +11,21 @@ export interface TurnMediaSetupHost {
|
|
|
11
11
|
sendNotification(method: string, params: Record<string, unknown>): void;
|
|
12
12
|
}
|
|
13
13
|
export declare function deriveMediaProvidersFromBindings(registry: Pick<ModelRegistry, "getBinding">): TurnConfig["mediaProviders"];
|
|
14
|
+
/**
|
|
15
|
+
* Derive per-turn media providers from a Host-pushed session profile's bindings. The Host materializes
|
|
16
|
+
* and pushes a FRESH profile every turn (session/set_config "profile") covering every purpose — media
|
|
17
|
+
* ones included (imageGeneration/tts/videoGeneration/musicGeneration/threeDGeneration/stt/voiceClone).
|
|
18
|
+
* Threading these into config.mediaProviders lets the fresh binding WIN over the once-hydrated in-process
|
|
19
|
+
* ModelRegistry default: configureTurnMedia merges config.mediaProviders OVER deriveMediaProvidersFromBindings,
|
|
20
|
+
* so a media purpose is no longer pinned to the registry snapshot until a process reload. Uses the same
|
|
21
|
+
* MEDIA_PURPOSES purpose→capability map as the registry path (single source of truth) and the same
|
|
22
|
+
* nativeModelId ?? model rule (profile bindings carry no nativeModelId today, so this resolves to model).
|
|
23
|
+
*/
|
|
24
|
+
export declare function deriveMediaProvidersFromProfileBindings(bindings: Record<string, {
|
|
25
|
+
provider?: string;
|
|
26
|
+
model?: string;
|
|
27
|
+
nativeModelId?: string;
|
|
28
|
+
}>): TurnConfig["mediaProviders"];
|
|
14
29
|
export declare function configureTurnMedia(params: {
|
|
15
30
|
host: TurnMediaSetupHost;
|
|
16
31
|
config?: Record<string, unknown>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type AuthenticodeExecFile = (file: string, args: string[], options: {
|
|
2
|
+
encoding: "utf8";
|
|
3
|
+
timeout: number;
|
|
4
|
+
maxBuffer: number;
|
|
5
|
+
windowsHide: boolean;
|
|
6
|
+
}, callback: (error: Error | null, stdout: string, stderr: string) => void) => unknown;
|
|
7
|
+
export interface AuthenticodeFile {
|
|
8
|
+
absolutePath: string;
|
|
9
|
+
relativePath: string;
|
|
10
|
+
}
|
|
11
|
+
export interface VerifyAuthenticodeInput {
|
|
12
|
+
files: AuthenticodeFile[];
|
|
13
|
+
execFileFn?: AuthenticodeExecFile;
|
|
14
|
+
platform?: string;
|
|
15
|
+
arch?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare function assertIndustrialRuntimePlatform(platform?: string, arch?: string): void;
|
|
18
|
+
export declare function verifyWindowsAuthenticodeFiles(input: VerifyAuthenticodeInput): Promise<void>;
|
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
* 标注 [S1 补定] 的辅助类型是 freeze 引用但未给定义的最小结构,属 S1 评审点,
|
|
12
12
|
* 其字段以 freeze 正文/recon 注释为据;实现 lane 负责与现状 store 形状做映射。
|
|
13
13
|
*/
|
|
14
|
+
import { type ModelPurpose } from "@xiaozhiclaw/model-access";
|
|
14
15
|
import type { NativeTranscript } from "../host-session-collection-contract.js";
|
|
16
|
+
export { MODEL_PURPOSES, type ModelPurpose } from "@xiaozhiclaw/model-access";
|
|
15
17
|
export type { HostSessionCollectionDelta, HostSessionCollectionScope, HostSessionCollectionSnapshot, HostSessionLifecycle, HostSessionProviderDiagnostic, HostSessionSummary, HostSessionTitleSource, NativeTranscript, NativeTranscriptMessage, } from "../host-session-collection-contract.js";
|
|
16
18
|
export { isHostSessionCollectionDelta, isHostSessionCollectionSnapshot, isNativeTranscript, } from "../host-session-collection-contract.js";
|
|
17
19
|
export * from "./provider-profile.js";
|
|
@@ -21,12 +23,6 @@ export type AgentId = string;
|
|
|
21
23
|
export type ProjectId = string;
|
|
22
24
|
/** 会话稳定身份(创建即恒定,session-identity-alignment-spec)。 */
|
|
23
25
|
export type CanonicalSessionId = string;
|
|
24
|
-
/**
|
|
25
|
-
* Gateway-resolved model purposes. This is the single vocabulary shared by
|
|
26
|
-
* profile materialization and the agent-side model registry.
|
|
27
|
-
*/
|
|
28
|
-
export declare const MODEL_PURPOSES: readonly ["textGeneration", "smallModel", "stt", "tts", "imageGeneration", "imageUnderstanding", "videoGeneration", "videoUnderstanding", "threeDGeneration", "embedding", "voiceClone", "musicGeneration", "realtimeAudio", "realtimeVideo"];
|
|
29
|
-
export type ModelPurpose = (typeof MODEL_PURPOSES)[number];
|
|
30
26
|
/** 能力实例种类。 */
|
|
31
27
|
export type MemberKind = "chat" | "product-leader" | "product-worker" | "goal-leader" | "solo-racer" | "workflow-node";
|
|
32
28
|
/**
|
|
@@ -1096,7 +1092,7 @@ export interface HostSkillInvocationResult {
|
|
|
1096
1092
|
/** 单文件读取上限;host 在解码前按 bytes 检查。 */
|
|
1097
1093
|
export declare const HOST_SKILL_FILE_MAX_BYTES: number;
|
|
1098
1094
|
/** [X7-P] 单一 agent→host 一元请求通道的服务域。 */
|
|
1099
|
-
export type HostRequestService = "memory" | "projectMemory" | "profile" | "preview" | "capability" | "session" | "feedback" | "project" | "runState" | "
|
|
1095
|
+
export type HostRequestService = "memory" | "projectMemory" | "profile" | "preview" | "capability" | "session" | "feedback" | "project" | "runState" | "provider";
|
|
1100
1096
|
/** Read-only Provider projection exposed by the Gateway Host to supervised qlogicagent compute. */
|
|
1101
1097
|
export declare const HOST_PROVIDER_PROXY_METHODS: readonly ["list", "get", "diagnose"];
|
|
1102
1098
|
export type HostProviderProxyMethod = typeof HOST_PROVIDER_PROXY_METHODS[number];
|
|
@@ -1440,22 +1436,6 @@ export type HostRunStateRequestParams = {
|
|
|
1440
1436
|
sessionId: CanonicalSessionId;
|
|
1441
1437
|
};
|
|
1442
1438
|
};
|
|
1443
|
-
export declare const HOST_PET_PROXY_METHODS: readonly ["isActive", "getSoul", "awardXp", "journeyCatchUp"];
|
|
1444
|
-
export type HostPetProxyMethod = typeof HOST_PET_PROXY_METHODS[number];
|
|
1445
|
-
export type HostPetRequestParams = {
|
|
1446
|
-
service: "pet";
|
|
1447
|
-
method: "isActive" | "getSoul" | "journeyCatchUp";
|
|
1448
|
-
params: {
|
|
1449
|
-
sessionId: CanonicalSessionId;
|
|
1450
|
-
};
|
|
1451
|
-
} | {
|
|
1452
|
-
service: "pet";
|
|
1453
|
-
method: "awardXp";
|
|
1454
|
-
params: {
|
|
1455
|
-
event: string;
|
|
1456
|
-
sessionId: CanonicalSessionId;
|
|
1457
|
-
};
|
|
1458
|
-
};
|
|
1459
1439
|
/** Agent-originated profile store calls. UI/provider surfaces are intentionally excluded. */
|
|
1460
1440
|
export declare const HOST_PROFILE_PROXY_METHODS: readonly ["getTunables", "updateTunable", "clearTunable", "appendDirectoryAllowRule"];
|
|
1461
1441
|
export type HostProfileProxyMethod = typeof HOST_PROFILE_PROXY_METHODS[number];
|
|
@@ -1672,7 +1652,7 @@ export type HostPreviewRequestParams = {
|
|
|
1672
1652
|
* [X7-P] 跨进程 HostRequest 判别联合。memory/profile/preview 共用 `x/host.request`,
|
|
1673
1653
|
* service + method 二级分派;preview 的 method 与 payload 在类型层保持逐动作关联。
|
|
1674
1654
|
*/
|
|
1675
|
-
export type HostRequestParams = HostMemoryRequestParams | HostProjectMemoryRequestParams | HostProfileRequestParams | HostPreviewRequestParams | HostCapabilityRequestParams | HostSessionRequestParams | HostFeedbackRequestParams | HostProjectRequestParams | HostRunStateRequestParams |
|
|
1655
|
+
export type HostRequestParams = HostMemoryRequestParams | HostProjectMemoryRequestParams | HostProfileRequestParams | HostPreviewRequestParams | HostCapabilityRequestParams | HostSessionRequestParams | HostFeedbackRequestParams | HostProjectRequestParams | HostRunStateRequestParams | HostProviderRequestParams;
|
|
1676
1656
|
/** initialize 声明的真实已装配 host-request 服务;version 只接受冻结版本 1。 */
|
|
1677
1657
|
export type HostRequestCapability = {
|
|
1678
1658
|
version: 1;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { NotificationMethodMap } from "./wire/notification-payloads.js";
|
|
2
|
-
export declare const AGENT_CONTRACT_VERSION:
|
|
2
|
+
export declare const AGENT_CONTRACT_VERSION: 5;
|
|
3
3
|
export declare const AGENT_EVENT_SCHEMA_VERSION: 1;
|
|
4
4
|
export declare const AGENT_TERMINAL_STATES: readonly ["completed", "failed", "cancelled"];
|
|
5
5
|
export type TerminalState = (typeof AGENT_TERMINAL_STATES)[number];
|
|
6
|
-
export declare const AGENT_WS_EVENT_NAMES: readonly ["turn.start", "turn.delta", "turn.end", "turn.error", "turn.recovery", "turn.file_changes", "turn.tool_call", "turn.tool_result", "turn.tool_blocked", "turn.reasoning_delta", "turn.approval_request", "turn.skill_instruction", "turn.ask_user", "turn.media_result", "turn.media_progress", "turn.media_usage", "turn.media_capability_check", "turn.plan_update", "turn.suggestions", "turn.sidechain_started", "turn.subagent_started", "turn.subagent_delta", "turn.subagent_ended", "turn.sidechain_completed", "turn.task_updated", "turn.todos_updated", "turn.exec_progress", "turn.progress", "turn.tool_use_summary", "turn.tool_selection_policy", "turn.lifecycle", "turn.document_maintenance", "turn.artifact_contract", "turn.usage_update", "team.member.notification", "session.info", "session.recovery_pending", "memory.updated", "skills.updated", "turn.memory_recall", "turn.memory_written", "
|
|
6
|
+
export declare const AGENT_WS_EVENT_NAMES: readonly ["turn.start", "turn.delta", "turn.end", "turn.error", "turn.recovery", "turn.file_changes", "turn.tool_call", "turn.tool_result", "turn.tool_blocked", "turn.reasoning_delta", "turn.approval_request", "turn.skill_instruction", "turn.ask_user", "turn.media_result", "turn.media_progress", "turn.media_usage", "turn.media_capability_check", "turn.plan_update", "turn.suggestions", "turn.sidechain_started", "turn.subagent_started", "turn.subagent_delta", "turn.subagent_ended", "turn.sidechain_completed", "turn.task_updated", "turn.todos_updated", "turn.exec_progress", "turn.progress", "turn.tool_use_summary", "turn.tool_selection_policy", "turn.lifecycle", "turn.document_maintenance", "turn.artifact_contract", "turn.usage_update", "team.member.notification", "session.info", "session.recovery_pending", "memory.updated", "skills.updated", "turn.memory_recall", "turn.memory_written", "system.activity", "workflow.created", "workflow.updated", "workflow.deleted", "workflow.runStarted", "workflow.runCompleted", "workflow.runFailed", "workflow.nodeStatus", "workflow.triggerDropped", "workflow.alert", "workflow.approvalRequested", "workflow.approvalTimedOut"];
|
|
7
7
|
export declare const AGENT_TEAM_WS_EVENT_NAMES: readonly ["solo.progress", "solo.specProgress", "solo.agentDelta", "solo.agentActivity", "solo.agentUsage", "solo.evaluation", "product.taskStarted", "product.taskOutput", "product.members", "product.agentActivity", "product.taskCompleted", "product.taskFailed", "product.budgetUpdate", "product.budgetWarning", "product.checkpointed", "product.completed", "product.dagTopology", "plan.interrupted", "product.planReady", "product.planningDelta", "product.leaderMessage", "product.planFailed", "product.planningAsk", "goal.run_state_changed", "goal.phase_boundary", "goal.goal_edited", "goal.message_queued", "goal.acceptance_updated", "goal.round_message", "mention.delegate_started", "mention.delegate_activity", "mention.delegate_settled"];
|
|
8
|
-
export declare const AGENT_EVENT_NAMES: readonly ["turn.start", "turn.delta", "turn.end", "turn.error", "turn.recovery", "turn.file_changes", "turn.tool_call", "turn.tool_result", "turn.tool_blocked", "turn.reasoning_delta", "turn.approval_request", "turn.skill_instruction", "turn.ask_user", "turn.media_result", "turn.media_progress", "turn.media_usage", "turn.media_capability_check", "turn.plan_update", "turn.suggestions", "turn.sidechain_started", "turn.subagent_started", "turn.subagent_delta", "turn.subagent_ended", "turn.sidechain_completed", "turn.task_updated", "turn.todos_updated", "turn.exec_progress", "turn.progress", "turn.tool_use_summary", "turn.tool_selection_policy", "turn.lifecycle", "turn.document_maintenance", "turn.artifact_contract", "turn.usage_update", "team.member.notification", "session.info", "session.recovery_pending", "memory.updated", "skills.updated", "turn.memory_recall", "turn.memory_written", "
|
|
9
|
-
export declare const ALL_AGENT_WS_EVENT_NAMES: readonly ["turn.start", "turn.delta", "turn.end", "turn.error", "turn.recovery", "turn.file_changes", "turn.tool_call", "turn.tool_result", "turn.tool_blocked", "turn.reasoning_delta", "turn.approval_request", "turn.skill_instruction", "turn.ask_user", "turn.media_result", "turn.media_progress", "turn.media_usage", "turn.media_capability_check", "turn.plan_update", "turn.suggestions", "turn.sidechain_started", "turn.subagent_started", "turn.subagent_delta", "turn.subagent_ended", "turn.sidechain_completed", "turn.task_updated", "turn.todos_updated", "turn.exec_progress", "turn.progress", "turn.tool_use_summary", "turn.tool_selection_policy", "turn.lifecycle", "turn.document_maintenance", "turn.artifact_contract", "turn.usage_update", "team.member.notification", "session.info", "session.recovery_pending", "memory.updated", "skills.updated", "turn.memory_recall", "turn.memory_written", "
|
|
8
|
+
export declare const AGENT_EVENT_NAMES: readonly ["turn.start", "turn.delta", "turn.end", "turn.error", "turn.recovery", "turn.file_changes", "turn.tool_call", "turn.tool_result", "turn.tool_blocked", "turn.reasoning_delta", "turn.approval_request", "turn.skill_instruction", "turn.ask_user", "turn.media_result", "turn.media_progress", "turn.media_usage", "turn.media_capability_check", "turn.plan_update", "turn.suggestions", "turn.sidechain_started", "turn.subagent_started", "turn.subagent_delta", "turn.subagent_ended", "turn.sidechain_completed", "turn.task_updated", "turn.todos_updated", "turn.exec_progress", "turn.progress", "turn.tool_use_summary", "turn.tool_selection_policy", "turn.lifecycle", "turn.document_maintenance", "turn.artifact_contract", "turn.usage_update", "team.member.notification", "session.info", "session.recovery_pending", "memory.updated", "skills.updated", "turn.memory_recall", "turn.memory_written", "system.activity", "workflow.created", "workflow.updated", "workflow.deleted", "workflow.runStarted", "workflow.runCompleted", "workflow.runFailed", "workflow.nodeStatus", "workflow.triggerDropped", "workflow.alert", "workflow.approvalRequested", "workflow.approvalTimedOut", "solo.progress", "solo.specProgress", "solo.agentDelta", "solo.agentActivity", "solo.agentUsage", "solo.evaluation", "product.taskStarted", "product.taskOutput", "product.members", "product.agentActivity", "product.taskCompleted", "product.taskFailed", "product.budgetUpdate", "product.budgetWarning", "product.checkpointed", "product.completed", "product.dagTopology", "plan.interrupted", "product.planReady", "product.planningDelta", "product.leaderMessage", "product.planFailed", "product.planningAsk", "goal.run_state_changed", "goal.phase_boundary", "goal.goal_edited", "goal.message_queued", "goal.acceptance_updated", "goal.round_message", "mention.delegate_started", "mention.delegate_activity", "mention.delegate_settled"];
|
|
9
|
+
export declare const ALL_AGENT_WS_EVENT_NAMES: readonly ["turn.start", "turn.delta", "turn.end", "turn.error", "turn.recovery", "turn.file_changes", "turn.tool_call", "turn.tool_result", "turn.tool_blocked", "turn.reasoning_delta", "turn.approval_request", "turn.skill_instruction", "turn.ask_user", "turn.media_result", "turn.media_progress", "turn.media_usage", "turn.media_capability_check", "turn.plan_update", "turn.suggestions", "turn.sidechain_started", "turn.subagent_started", "turn.subagent_delta", "turn.subagent_ended", "turn.sidechain_completed", "turn.task_updated", "turn.todos_updated", "turn.exec_progress", "turn.progress", "turn.tool_use_summary", "turn.tool_selection_policy", "turn.lifecycle", "turn.document_maintenance", "turn.artifact_contract", "turn.usage_update", "team.member.notification", "session.info", "session.recovery_pending", "memory.updated", "skills.updated", "turn.memory_recall", "turn.memory_written", "system.activity", "workflow.created", "workflow.updated", "workflow.deleted", "workflow.runStarted", "workflow.runCompleted", "workflow.runFailed", "workflow.nodeStatus", "workflow.triggerDropped", "workflow.alert", "workflow.approvalRequested", "workflow.approvalTimedOut", "solo.progress", "solo.specProgress", "solo.agentDelta", "solo.agentActivity", "solo.agentUsage", "solo.evaluation", "product.taskStarted", "product.taskOutput", "product.members", "product.agentActivity", "product.taskCompleted", "product.taskFailed", "product.budgetUpdate", "product.budgetWarning", "product.checkpointed", "product.completed", "product.dagTopology", "plan.interrupted", "product.planReady", "product.planningDelta", "product.leaderMessage", "product.planFailed", "product.planningAsk", "goal.run_state_changed", "goal.phase_boundary", "goal.goal_edited", "goal.message_queued", "goal.acceptance_updated", "goal.round_message", "mention.delegate_started", "mention.delegate_activity", "mention.delegate_settled"];
|
|
10
10
|
/** Runtime-required keys whose shape is not encoded by TypeScript after serialization. */
|
|
11
11
|
export declare const AGENT_EVENT_REQUIRED_KEYS: {
|
|
12
12
|
readonly "product.taskStarted": readonly ["productId", "taskId", "assignee", "attempt"];
|
|
@@ -29,9 +29,9 @@ export interface AgentEventEnvelope<K extends AgentEventName = AgentEventName> {
|
|
|
29
29
|
payload: AgentEventPayloadMap[K];
|
|
30
30
|
}
|
|
31
31
|
export declare const AGENT_CONTRACT_DESCRIPTOR: {
|
|
32
|
-
readonly version:
|
|
32
|
+
readonly version: 5;
|
|
33
33
|
readonly eventSchemaVersion: 1;
|
|
34
|
-
readonly eventNames: readonly ["turn.start", "turn.delta", "turn.end", "turn.error", "turn.recovery", "turn.file_changes", "turn.tool_call", "turn.tool_result", "turn.tool_blocked", "turn.reasoning_delta", "turn.approval_request", "turn.skill_instruction", "turn.ask_user", "turn.media_result", "turn.media_progress", "turn.media_usage", "turn.media_capability_check", "turn.plan_update", "turn.suggestions", "turn.sidechain_started", "turn.subagent_started", "turn.subagent_delta", "turn.subagent_ended", "turn.sidechain_completed", "turn.task_updated", "turn.todos_updated", "turn.exec_progress", "turn.progress", "turn.tool_use_summary", "turn.tool_selection_policy", "turn.lifecycle", "turn.document_maintenance", "turn.artifact_contract", "turn.usage_update", "team.member.notification", "session.info", "session.recovery_pending", "memory.updated", "skills.updated", "turn.memory_recall", "turn.memory_written", "
|
|
34
|
+
readonly eventNames: readonly ["turn.start", "turn.delta", "turn.end", "turn.error", "turn.recovery", "turn.file_changes", "turn.tool_call", "turn.tool_result", "turn.tool_blocked", "turn.reasoning_delta", "turn.approval_request", "turn.skill_instruction", "turn.ask_user", "turn.media_result", "turn.media_progress", "turn.media_usage", "turn.media_capability_check", "turn.plan_update", "turn.suggestions", "turn.sidechain_started", "turn.subagent_started", "turn.subagent_delta", "turn.subagent_ended", "turn.sidechain_completed", "turn.task_updated", "turn.todos_updated", "turn.exec_progress", "turn.progress", "turn.tool_use_summary", "turn.tool_selection_policy", "turn.lifecycle", "turn.document_maintenance", "turn.artifact_contract", "turn.usage_update", "team.member.notification", "session.info", "session.recovery_pending", "memory.updated", "skills.updated", "turn.memory_recall", "turn.memory_written", "system.activity", "workflow.created", "workflow.updated", "workflow.deleted", "workflow.runStarted", "workflow.runCompleted", "workflow.runFailed", "workflow.nodeStatus", "workflow.triggerDropped", "workflow.alert", "workflow.approvalRequested", "workflow.approvalTimedOut", "solo.progress", "solo.specProgress", "solo.agentDelta", "solo.agentActivity", "solo.agentUsage", "solo.evaluation", "product.taskStarted", "product.taskOutput", "product.members", "product.agentActivity", "product.taskCompleted", "product.taskFailed", "product.budgetUpdate", "product.budgetWarning", "product.checkpointed", "product.completed", "product.dagTopology", "plan.interrupted", "product.planReady", "product.planningDelta", "product.leaderMessage", "product.planFailed", "product.planningAsk", "goal.run_state_changed", "goal.phase_boundary", "goal.goal_edited", "goal.message_queued", "goal.acceptance_updated", "goal.round_message", "mention.delegate_started", "mention.delegate_activity", "mention.delegate_settled"];
|
|
35
35
|
readonly eventRequiredKeys: {
|
|
36
36
|
readonly "product.taskStarted": readonly ["productId", "taskId", "assignee", "attempt"];
|
|
37
37
|
readonly "product.taskCompleted": readonly ["productId", "taskId", "result", "attempt"];
|
|
@@ -42,7 +42,7 @@ export declare const AGENT_CONTRACT_DESCRIPTOR: {
|
|
|
42
42
|
};
|
|
43
43
|
readonly terminalStates: readonly ["completed", "failed", "cancelled"];
|
|
44
44
|
};
|
|
45
|
-
export declare const AGENT_CONTRACT_HASH: "
|
|
45
|
+
export declare const AGENT_CONTRACT_HASH: "4c36fbb48115e487dfb0c5e49a21c07797986a62058c32d99531a6bf41184298";
|
|
46
46
|
export interface AgentContractIdentity {
|
|
47
47
|
version: typeof AGENT_CONTRACT_VERSION;
|
|
48
48
|
hash: typeof AGENT_CONTRACT_HASH;
|
|
@@ -144,7 +144,8 @@ export interface AcpSessionMeta {
|
|
|
144
144
|
/** Skills the user explicitly pinned for this turn (scope:name or name). The turn pipeline
|
|
145
145
|
* force-loads each one's SKILL.md, identically to the `skill_view` tool (cc-parity). */
|
|
146
146
|
activeSkills?: string[];
|
|
147
|
-
/**
|
|
147
|
+
/** Internal materialization of the standard session/new|load `mcpServers` field.
|
|
148
|
+
* Hosts MUST NOT send this through `_meta`. */
|
|
148
149
|
mcpServers?: Record<string, unknown>;
|
|
149
150
|
}
|
|
150
151
|
export interface AcpSessionNewParams {
|
|
@@ -168,7 +169,7 @@ export interface AcpSessionNewParams {
|
|
|
168
169
|
resumeSessionId?: string;
|
|
169
170
|
forkSession?: boolean;
|
|
170
171
|
/** Per-session context supplement (no standard ACP home). Inherited by every session/prompt. */
|
|
171
|
-
_meta?: AcpSessionMeta
|
|
172
|
+
_meta?: Omit<AcpSessionMeta, "mcpServers">;
|
|
172
173
|
}
|
|
173
174
|
export interface AcpSessionLoadParams {
|
|
174
175
|
sessionId: string;
|
|
@@ -177,7 +178,7 @@ export interface AcpSessionLoadParams {
|
|
|
177
178
|
/** MCP servers re-injected by the host when resuming the session. */
|
|
178
179
|
mcpServers?: AcpSessionNewParams["mcpServers"];
|
|
179
180
|
/** Per-session context supplement restored by the host. */
|
|
180
|
-
_meta?: AcpSessionMeta
|
|
181
|
+
_meta?: Omit<AcpSessionMeta, "mcpServers">;
|
|
181
182
|
}
|
|
182
183
|
/** A selectable permission mode advertised to the host (standard ACP). */
|
|
183
184
|
export interface AcpMode {
|
|
@@ -199,8 +200,8 @@ export interface AcpSessionPromptParams {
|
|
|
199
200
|
sessionId: string;
|
|
200
201
|
/** User prompt content blocks (standard ACP field). */
|
|
201
202
|
prompt: AcpContentBlock[];
|
|
202
|
-
/** Per-turn context overrides (permissions/reasoning
|
|
203
|
-
_meta?: AcpSessionMeta
|
|
203
|
+
/** Per-turn context overrides (permissions/reasoning/...), merged over session _meta. */
|
|
204
|
+
_meta?: Omit<AcpSessionMeta, "mcpServers">;
|
|
204
205
|
}
|
|
205
206
|
export interface AcpSessionPromptResult {
|
|
206
207
|
/** Stop reason (required by ACP standard). */
|