qlogicagent 2.18.8 → 2.18.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.
- package/dist/cli.js +1 -1
- package/dist/host-contract.js +1 -1
- package/dist/index.js +458 -1018
- package/dist/pet-host.js +19 -0
- package/dist/project-memory-host.js +40 -0
- package/dist/protocol.js +1 -1
- package/dist/skills/mcp/astraclaw-native-mcp-server.js +7 -7
- package/dist/types/cli/acp-session-host.d.ts +1 -1
- package/dist/types/cli/community-resource-installer.d.ts +3 -5
- package/dist/types/cli/core-tools/registry.d.ts +1 -2
- package/dist/types/cli/default-project-bootstrap.d.ts +1 -1
- package/dist/types/cli/handlers/agents-handler.d.ts +8 -6
- package/dist/types/cli/handlers/community-handler.d.ts +0 -4
- package/dist/types/cli/handlers/control-handler.d.ts +1 -1
- package/dist/types/cli/handlers/project-handler.d.ts +1 -1
- package/dist/types/cli/handlers/session-handler.d.ts +0 -7
- package/dist/types/cli/handlers/solo-handler.d.ts +0 -2
- package/dist/types/cli/handlers/workflow-compute-handler.d.ts +8 -0
- package/dist/types/cli/memory-coordinator.d.ts +1 -1
- package/dist/types/cli/multi-agent-state-coordinator.d.ts +0 -3
- package/dist/types/cli/pet-runtime.d.ts +5 -5
- package/dist/types/cli/product-coordinator.d.ts +0 -2
- package/dist/types/cli/project-memory-store-factory.d.ts +11 -1
- package/dist/types/cli/rpc-registry.d.ts +0 -15
- package/dist/types/cli/stdio-rpc-handler-hosts.d.ts +2 -5
- package/dist/types/cli/stdio-runtime-bootstrap.d.ts +2 -0
- package/dist/types/cli/stdio-runtime-services.d.ts +2 -0
- package/dist/types/cli/stdio-server.d.ts +3 -4
- package/dist/types/config/cn-mirror.d.ts +2 -2
- package/dist/types/host-contract/index.d.ts +167 -9
- package/dist/types/orchestration/agent-instance.d.ts +1 -3
- package/dist/types/orchestration/goal-mode-adapters.d.ts +0 -3
- package/dist/types/orchestration/goal-run-persistence.d.ts +0 -3
- package/dist/types/orchestration/product-persistence.d.ts +1 -4
- package/dist/types/orchestration/product-planner.d.ts +2 -3
- package/dist/types/orchestration/run-state-host-authority.d.ts +7 -0
- package/dist/types/orchestration/solo-evaluator.d.ts +8 -3
- package/dist/types/orchestration/solo-persistence.d.ts +4 -7
- package/dist/types/orchestration/testing/delegate-test-bridge.d.ts +13 -2
- package/dist/types/orchestration/workflow/node-schema.d.ts +2 -1
- package/dist/types/orchestration/workflow/qla-executor-host.d.ts +1 -1
- package/dist/types/orchestration/workflow/workflow-bundle.d.ts +1 -1
- package/dist/types/pet-host.d.ts +9 -0
- package/dist/types/project-memory-host.d.ts +3 -0
- package/dist/types/protocol/wire/acp-agent-management.d.ts +1 -1
- package/dist/types/protocol/wire/acp-protocol.d.ts +8 -1
- package/dist/types/runtime/infra/acp-detector.d.ts +1 -1
- package/dist/types/runtime/infra/background-tasks.d.ts +1 -1
- package/dist/types/runtime/pet/pet-community-assets.d.ts +7 -17
- package/dist/types/runtime/pet/pet-reaction-engine.d.ts +1 -1
- package/dist/types/runtime/pet/petdex-vision-qa.d.ts +12 -0
- package/dist/types/runtime/ports/memory-recall-source.d.ts +10 -0
- package/dist/types/runtime/ports/project-memory-store.d.ts +1 -1
- package/dist/types/runtime/session/session-persistence.d.ts +3 -4
- package/dist/types/skills/mcp/mcp-manager.d.ts +4 -0
- package/dist/types/skills/memory/host-memory-provider.d.ts +2 -2
- package/dist/types/skills/memory/memory-config-resolver.d.ts +4 -0
- package/dist/types/skills/memory/task-distillation.d.ts +1 -1
- package/dist/types/test-support/run-state-authority-setup.d.ts +1 -0
- package/dist/types/transport/host-pet-client.d.ts +20 -0
- package/dist/types/transport/host-run-state-client.d.ts +17 -0
- package/dist/types/workflow-host.d.ts +33 -0
- package/dist/workflow-host.js +13 -0
- package/package.json +27 -3
- package/dist/runtime/infra/mcp-bridge-server.js +0 -338
- package/dist/types/cli/core-tools/cron-tool-bootstrap.d.ts +0 -8
- package/dist/types/cli/core-tools/cron-workflow-service.d.ts +0 -7
- package/dist/types/cli/handlers/message-feedback-handler.d.ts +0 -31
- package/dist/types/cli/handlers/pet-handler.d.ts +0 -49
- package/dist/types/cli/handlers/workflow-handler.d.ts +0 -182
- package/dist/types/cli/tool-bootstrap-workflow-registration.d.ts +0 -7
- package/dist/types/cli/workflow-host-adapter.d.ts +0 -31
- package/dist/types/orchestration/workflow/workflow-service.d.ts +0 -14
- package/dist/types/runtime/infra/agent-process.d.ts +0 -368
- package/dist/types/runtime/infra/external-agent-pool.d.ts +0 -89
- package/dist/types/skills/memory/local-memory-provider.d.ts +0 -325
- package/dist/types/skills/memory/memory-provider-factory.d.ts +0 -33
- package/dist/types/skills/tools/cron-tool.d.ts +0 -96
- package/dist/types/skills/tools/petdex-create-tool.d.ts +0 -47
- package/dist/types/skills/tools/workflow-tool.d.ts +0 -45
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type AgentToolRegistrationDeps } from "./agent-tool-bootstrap.js";
|
|
2
2
|
import { type CheckpointToolRegistrationDeps } from "./checkpoint-tool-bootstrap.js";
|
|
3
3
|
import { type ConfigToolRegistrationDeps } from "./config-tool-bootstrap.js";
|
|
4
|
-
import { type CronToolRegistrationDeps } from "./cron-tool-bootstrap.js";
|
|
5
4
|
import { type MonitorToolRegistrationDeps } from "./monitor-tool-bootstrap.js";
|
|
6
|
-
export type CoreToolSetRegistrationDeps = AgentToolRegistrationDeps & CheckpointToolRegistrationDeps & ConfigToolRegistrationDeps &
|
|
5
|
+
export type CoreToolSetRegistrationDeps = AgentToolRegistrationDeps & CheckpointToolRegistrationDeps & ConfigToolRegistrationDeps & MonitorToolRegistrationDeps;
|
|
7
6
|
export declare function registerCoreToolSet(deps: CoreToolSetRegistrationDeps): void;
|
|
@@ -24,7 +24,7 @@ interface DeferredHeavyWork {
|
|
|
24
24
|
}
|
|
25
25
|
/** Resolves once the most recently scheduled deferred heavy work has settled (never rejects). */
|
|
26
26
|
export declare function getDefaultProjectHeavyWorkPromise(): Promise<void>;
|
|
27
|
-
export declare function ensureDefaultProjectBootstrap(deps: DefaultProjectBootstrapDeps): ProjectMemoryStore
|
|
27
|
+
export declare function ensureDefaultProjectBootstrap(deps: DefaultProjectBootstrapDeps): Promise<ProjectMemoryStore>;
|
|
28
28
|
/**
|
|
29
29
|
* Schedule (fire-and-forget) the deferred heavy work so it runs off the synchronous initialize path.
|
|
30
30
|
* Exposed for tests; production calls it from ensureDefaultProjectBootstrap. Records a gate promise on
|
|
@@ -5,15 +5,11 @@
|
|
|
5
5
|
* agents.kill, agents.listConfigured, agents.getLog, agents.testConnection
|
|
6
6
|
*/
|
|
7
7
|
import { type AgentRpcError, type AgentRpcRequest } from "../../protocol/wire/index.js";
|
|
8
|
-
import type { AgentProcessManager } from "../../runtime/infra/agent-process.js";
|
|
9
8
|
import type { AgentConfigStore } from "../../runtime/infra/agent-config-store.js";
|
|
10
9
|
import { type AcpDetector } from "../../runtime/infra/acp-detector.js";
|
|
11
|
-
import { type PooledTurnCtx } from "../../runtime/infra/external-agent-pool.js";
|
|
12
10
|
import type { DelegateBridge } from "../../orchestration/delegation-coordinator.js";
|
|
13
11
|
export interface AgentsHandlerHost {
|
|
14
12
|
acpDetector: AcpDetector;
|
|
15
|
-
soloProcessManager: AgentProcessManager | null;
|
|
16
|
-
productProcessManager: AgentProcessManager | null;
|
|
17
13
|
ensureAgentConfigStore(): Promise<AgentConfigStore>;
|
|
18
14
|
getActiveProjectRoot?(): string;
|
|
19
15
|
handleMcpToolCall?(memberId: string, tool: string, args: Record<string, unknown>): Promise<unknown>;
|
|
@@ -23,6 +19,13 @@ export interface AgentsHandlerHost {
|
|
|
23
19
|
/** 激活层(S3c §1.1):gateway-routed delegate 桥(懒读;未挂/gate 关 = undefined → 旧进程池路径)。 */
|
|
24
20
|
getDelegateBridge?(): DelegateBridge | undefined;
|
|
25
21
|
}
|
|
22
|
+
interface PooledTurnCtx {
|
|
23
|
+
sessionId?: string;
|
|
24
|
+
turnId?: string;
|
|
25
|
+
requestId?: string;
|
|
26
|
+
deltas: string[];
|
|
27
|
+
streamedAny: boolean;
|
|
28
|
+
}
|
|
26
29
|
export declare function relayPooledTurnNotification(input: {
|
|
27
30
|
agentId: string;
|
|
28
31
|
turn: PooledTurnCtx | null;
|
|
@@ -68,8 +71,6 @@ export declare function handleAgentsLogout(this: AgentsHandlerHost, msg: AgentRp
|
|
|
68
71
|
export declare function handleAgentsSetGateway(this: AgentsHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
69
72
|
export declare function handleAgentsGetGateway(this: AgentsHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
70
73
|
export declare function handleAgentsListConfigured(this: AgentsHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
71
|
-
export declare function handleAgentsProcesses(this: AgentsHandlerHost, msg: AgentRpcRequest): void;
|
|
72
|
-
export declare function handleAgentsKill(this: AgentsHandlerHost, msg: AgentRpcRequest): void;
|
|
73
74
|
export declare function handleAgentsGetLog(this: AgentsHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
74
75
|
export declare function handleAgentsTestConnection(this: AgentsHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
75
76
|
/** Formats a session persisted transcript into a compact prior-conversation block for an external
|
|
@@ -117,3 +118,4 @@ export declare function resolveNativeColdResume(input: {
|
|
|
117
118
|
/** Pre-warm an external agent's process (on agent-select) so the first message skips the cold start. */
|
|
118
119
|
export declare function handleAgentsWarm(this: AgentsHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
119
120
|
export declare function handleAgentsPrompt(this: AgentsHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
121
|
+
export {};
|
|
@@ -6,10 +6,6 @@ export interface CommunityHandlerHost {
|
|
|
6
6
|
resolveCommunityConsentClient?: () => CommunityConsentClient | null;
|
|
7
7
|
getHostCapabilityClient?(): HostCapabilityClient | undefined;
|
|
8
8
|
sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
|
|
9
|
-
/** Push a JSON-RPC notification (e.g. pet.asset.updated after a community pet install hydrates the UI store). */
|
|
10
|
-
sendNotification(method: string, params: Record<string, unknown>): void;
|
|
11
|
-
/** Active owner id, so community pet install/publish land in the same profile pet.status reads. */
|
|
12
|
-
memoryUserId?: string;
|
|
13
9
|
}
|
|
14
10
|
export declare function handleCommunityResolveInstall(this: CommunityHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
15
11
|
export declare function handleCommunityListResourceVersions(this: CommunityHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
@@ -14,7 +14,7 @@ export interface ControlHandlerHost {
|
|
|
14
14
|
log(message: string): void;
|
|
15
15
|
sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
|
|
16
16
|
sendNotification<M extends keyof NotificationMethodMap>(method: M, params: NotificationMethodMap[M]): void;
|
|
17
|
-
ensureDefaultProject(): void
|
|
17
|
+
ensureDefaultProject(): void | Promise<void>;
|
|
18
18
|
/** LH-10: propagate an explicit cancel to the background tasks the current
|
|
19
19
|
* session launched. No-op if the host has no task registry. */
|
|
20
20
|
cancelBackgroundTasksForSession?(sessionId?: string): void;
|
|
@@ -19,7 +19,7 @@ export interface ProjectHandlerHost {
|
|
|
19
19
|
}
|
|
20
20
|
export declare function handleProjectCreate(this: ProjectHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
21
21
|
export declare function handleProjectList(this: ProjectHandlerHost, msg: AgentRpcRequest): void;
|
|
22
|
-
export declare function handleProjectSwitch(this: ProjectHandlerHost, msg: AgentRpcRequest): void
|
|
22
|
+
export declare function handleProjectSwitch(this: ProjectHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
23
23
|
/**
|
|
24
24
|
* Reliable recursive directory removal for Windows. fs.rmSync({recursive,force}) cannot be trusted
|
|
25
25
|
* here: on git repos it silently leaves read-only object/pack files (and whole subtrees) behind
|
|
@@ -90,13 +90,6 @@ export declare function handleSessionArchive(this: SessionHandlerHost, msg: Agen
|
|
|
90
90
|
export declare function handleSessionMarkCleanShutdown(this: SessionHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
91
91
|
export declare function handleSessionResume(this: SessionHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
92
92
|
export declare function handleSessionGetInfo(this: SessionHandlerHost, msg: AgentRpcRequest): void;
|
|
93
|
-
export declare function handleSessionSwitchProject(this: SessionHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
94
|
-
export declare function handleSessionGetState(this: SessionHandlerHost, msg: AgentRpcRequest): void;
|
|
95
|
-
/**
|
|
96
|
-
* `session.focus` - Desktop UI reports which session is currently focused.
|
|
97
|
-
* Agent switches active project/cwd to the session's owning project.
|
|
98
|
-
*/
|
|
99
|
-
export declare function handleSessionFocus(this: SessionHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
100
93
|
/**
|
|
101
94
|
* `session.moveToProject` - Move a session from one project to another.
|
|
102
95
|
* Physically copies session files, updates metadata.projectId, then removes the source.
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* Handles: solo.start, solo.status, solo.cancel, solo.select,
|
|
4
4
|
* solo.list, solo.delete, solo.message, solo.evaluate
|
|
5
5
|
*/
|
|
6
|
-
import { AgentProcessManager } from "../../runtime/infra/agent-process.js";
|
|
7
6
|
import type { AcpDetector } from "../../runtime/infra/acp-detector.js";
|
|
8
7
|
import type { AgentConfigStore } from "../../runtime/infra/agent-config-store.js";
|
|
9
8
|
import { SoloEvaluator } from "../../orchestration/solo-evaluator.js";
|
|
@@ -12,7 +11,6 @@ import { type AgentRpcError, type AgentRpcRequest } from "../../protocol/wire/in
|
|
|
12
11
|
export declare const soloProjectMap: Map<string, string>;
|
|
13
12
|
export interface SoloHandlerHost {
|
|
14
13
|
soloEvaluator: SoloEvaluator | null;
|
|
15
|
-
soloProcessManager: AgentProcessManager | null;
|
|
16
14
|
acpDetector: AcpDetector;
|
|
17
15
|
agentConfigStore: AgentConfigStore | null;
|
|
18
16
|
sendNotification(method: string, params: Record<string, unknown>): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type AgentRpcError, type AgentRpcRequest } from "../../protocol/wire/index.js";
|
|
2
|
+
import type { ToolCatalog } from "../../runtime/ports/index.js";
|
|
3
|
+
export interface WorkflowComputeHandlerHost {
|
|
4
|
+
toolCatalog?: ToolCatalog;
|
|
5
|
+
sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
|
|
6
|
+
}
|
|
7
|
+
/** Stateless compute port. Workflow definitions, runs, credentials, and approvals remain gateway-owned. */
|
|
8
|
+
export declare function handleComputeToolInvoke(this: WorkflowComputeHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
@@ -20,7 +20,7 @@ export interface MemoryHostRequestAccess {
|
|
|
20
20
|
}
|
|
21
21
|
/** 装配期绑定(stdio-runtime-services 注入;lazy resolver——gate 在创建时刻现读)。重绑重置选型护栏。 */
|
|
22
22
|
export declare function bindMemoryHostRequestAccess(resolve: () => MemoryHostRequestAccess | null): void;
|
|
23
|
-
export declare function
|
|
23
|
+
export declare function ensureHostMemoryProvider(currentUserId: string): MemoryProviderState;
|
|
24
24
|
export interface RegisterMemoryRuntimeHooksDeps {
|
|
25
25
|
hooks: HookRegistry;
|
|
26
26
|
currentUserId: string;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import type { ProductOrchestrator } from "../orchestration/agent-instance.js";
|
|
2
2
|
import type { ProductPlanner } from "../orchestration/product-planner.js";
|
|
3
3
|
import type { SoloEvaluator } from "../orchestration/solo-evaluator.js";
|
|
4
|
-
import type { AgentProcessManager } from "../runtime/infra/agent-process.js";
|
|
5
4
|
export declare class MultiAgentStateCoordinator {
|
|
6
5
|
soloEvaluator: SoloEvaluator | null;
|
|
7
6
|
productOrchestrator: ProductOrchestrator | null;
|
|
8
7
|
productPlanner: ProductPlanner | null;
|
|
9
|
-
soloProcessManager: AgentProcessManager | null;
|
|
10
|
-
productProcessManager: AgentProcessManager | null;
|
|
11
8
|
}
|
|
@@ -2,6 +2,7 @@ import type { ChatMessage } from "../agent/types.js";
|
|
|
2
2
|
import type { ModelPurpose } from "../runtime/infra/model-registry.js";
|
|
3
3
|
import { type PetStats, type PetdexPetAsset, type PetdexValidationReport } from "../runtime/pet/index.js";
|
|
4
4
|
import { type PetdexProductionRun } from "../runtime/pet/petdex-forge-service.js";
|
|
5
|
+
import type { HostPetClient } from "../transport/host-pet-client.js";
|
|
5
6
|
import type { LLMTransport } from "./provider-core-facade.js";
|
|
6
7
|
export type PetSoulGenerator = (rarity: string, stats: PetStats) => Promise<{
|
|
7
8
|
name: string;
|
|
@@ -47,15 +48,14 @@ export interface PetRuntime {
|
|
|
47
48
|
reactAfterTurn(messages: ChatMessage[]): Promise<void>;
|
|
48
49
|
/** Backfill missing daily journey summaries (per-owner, cross-project, idempotent, best-effort).
|
|
49
50
|
* Owns the LLM + project-listing side effects so stdio-server doesn't reach into runtime/infra. */
|
|
50
|
-
catchUpJourney(
|
|
51
|
+
catchUpJourney(): Promise<string[]>;
|
|
52
|
+
refreshActive(): Promise<boolean>;
|
|
51
53
|
isActive(): boolean;
|
|
52
54
|
}
|
|
53
55
|
export interface PetRuntimeDeps {
|
|
54
|
-
getActiveProjectRoot(): string;
|
|
55
|
-
resolveOwnerUserId?: () => string;
|
|
56
56
|
resolveClientForPurpose(purpose: ModelPurpose): PetLlmClient | null;
|
|
57
57
|
sendNotification(method: string, params: Record<string, unknown>): void;
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
getCurrentSessionId?(): string | undefined;
|
|
59
|
+
resolveHostPetClient?(): HostPetClient | undefined;
|
|
60
60
|
}
|
|
61
61
|
export declare function createPetRuntime(deps: PetRuntimeDeps): PetRuntime;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ProductOrchestrator } from "../orchestration/agent-instance.js";
|
|
2
2
|
import { ProductPlanner } from "../orchestration/product-planner.js";
|
|
3
3
|
import type { DelegateBridge } from "../orchestration/delegation-coordinator.js";
|
|
4
|
-
import { AgentProcessManager } from "../runtime/infra/agent-process.js";
|
|
5
4
|
import type { AgentConfigStore } from "../runtime/infra/agent-config-store.js";
|
|
6
5
|
import type { AcpDetector } from "../runtime/infra/acp-detector.js";
|
|
7
6
|
export interface ProductCoordinatorHost {
|
|
@@ -9,7 +8,6 @@ export interface ProductCoordinatorHost {
|
|
|
9
8
|
agentConfigStore: AgentConfigStore | null;
|
|
10
9
|
productOrchestrator: ProductOrchestrator | null;
|
|
11
10
|
productPlanner: ProductPlanner | null;
|
|
12
|
-
productProcessManager: AgentProcessManager | null;
|
|
13
11
|
emitAgentStatus(agentId: string, state: string, extra?: {
|
|
14
12
|
missedBeats?: number;
|
|
15
13
|
lastActivityAt?: number;
|
|
@@ -1,2 +1,12 @@
|
|
|
1
|
+
import type { HostRequestParams, HostRequestService } from "../host-contract/index.js";
|
|
1
2
|
import type { ProjectMemoryStoreFactory } from "../runtime/ports/index.js";
|
|
2
|
-
export
|
|
3
|
+
export interface ProjectMemoryHostRequestAccess {
|
|
4
|
+
supportsHostRequestService(service: HostRequestService): boolean;
|
|
5
|
+
readonly hostRequest: {
|
|
6
|
+
request(params: HostRequestParams, opts?: {
|
|
7
|
+
timeoutMs?: number;
|
|
8
|
+
signal?: AbortSignal;
|
|
9
|
+
}): Promise<unknown>;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export declare function createCliProjectMemoryStoreFactory(resolveAccess?: () => ProjectMemoryHostRequestAccess | null, resolveSessionId?: () => string | undefined): ProjectMemoryStoreFactory;
|
|
@@ -5,14 +5,10 @@ import { type ControlHandlerHost } from "./handlers/control-handler.js";
|
|
|
5
5
|
import { type FilesHandlerHost } from "./handlers/files-handler.js";
|
|
6
6
|
import { type MediaHandlerHost } from "./handlers/media-handler.js";
|
|
7
7
|
import { type MemoryHandlerHost } from "./handlers/memory-handler.js";
|
|
8
|
-
import { type PetConfirmHandlerHost } from "./handlers/pet-confirm-handler.js";
|
|
9
|
-
import { type PetHandlerHost } from "./handlers/pet-handler.js";
|
|
10
|
-
import { type WorkflowHandlerHost } from "./handlers/workflow-handler.js";
|
|
11
8
|
import { type ProjectHandlerHost } from "./handlers/project-handler.js";
|
|
12
9
|
import { type SessionHandlerHost } from "./handlers/session-handler.js";
|
|
13
10
|
import { type SkillsHandlerHost } from "./handlers/skills-handler.js";
|
|
14
11
|
import { type TurnBaselineHandlerHost } from "./handlers/turn-baseline-handler.js";
|
|
15
|
-
import { type MessageFeedbackHandlerHost } from "./handlers/message-feedback-handler.js";
|
|
16
12
|
import { type TurnControlHandlerHost } from "./handlers/turn-handler.js";
|
|
17
13
|
import { type WorkingMaterialsHandlerHost } from "./handlers/working-materials-handler.js";
|
|
18
14
|
import { type DreamHandlerHost } from "./handlers/dream-handler.js";
|
|
@@ -54,24 +50,13 @@ export interface RpcHandlerHosts {
|
|
|
54
50
|
files: FilesHandlerHost;
|
|
55
51
|
media: MediaHandlerHost;
|
|
56
52
|
skills: SkillsHandlerHost;
|
|
57
|
-
pet: PetHandlerHost;
|
|
58
|
-
petConfirm: PetConfirmHandlerHost;
|
|
59
53
|
project: ProjectHandlerHost;
|
|
60
54
|
community: CommunityHandlerHost;
|
|
61
55
|
dream: DreamHandlerHost;
|
|
62
56
|
turn: TurnControlHandlerHost;
|
|
63
57
|
turnBaseline: TurnBaselineHandlerHost;
|
|
64
|
-
messageFeedback: MessageFeedbackHandlerHost;
|
|
65
58
|
workingMaterials: WorkingMaterialsHandlerHost;
|
|
66
59
|
/** agents/solo/product are served by the multi-agent sub-host. */
|
|
67
60
|
multiAgent: MultiAgentHandlerHost;
|
|
68
|
-
/**
|
|
69
|
-
* workflow.* binds to its own host: it needs `toolCatalog` plus the lazy engine slots
|
|
70
|
-
* (controller/store/scheduler/processManager) that the multi-agent sub-host lacks. The host
|
|
71
|
-
* (StdioServer) supplies a dedicated WorkflowHostAdapter that sources acpDetector from the
|
|
72
|
-
* multi-agent sub-host and toolCatalog from the runtime — so this binding is compiler-checked
|
|
73
|
-
* like every other domain, with no cast.
|
|
74
|
-
*/
|
|
75
|
-
workflow: WorkflowHandlerHost;
|
|
76
61
|
}
|
|
77
62
|
export declare function createRpcMethodRegistry(host: RpcHandlerHosts): ReadonlyMap<string, RpcMethodHandler>;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import type { LLMRequest } from "../agent/types.js";
|
|
2
2
|
import type { ModelPurpose } from "../runtime/infra/model-registry.js";
|
|
3
3
|
import type { RpcHandlerHosts } from "./rpc-registry.js";
|
|
4
|
-
type DirectStdioRpcHost = RpcHandlerHosts["config"] & RpcHandlerHosts["control"] & RpcHandlerHosts["files"] & RpcHandlerHosts["skills"] & RpcHandlerHosts["project"] & RpcHandlerHosts["community"] &
|
|
4
|
+
type DirectStdioRpcHost = RpcHandlerHosts["config"] & RpcHandlerHosts["control"] & RpcHandlerHosts["files"] & RpcHandlerHosts["skills"] & RpcHandlerHosts["project"] & RpcHandlerHosts["community"] & {
|
|
5
5
|
currentTurnId?: string;
|
|
6
6
|
/** Mid-turn guidance queue (运行中引导) — shared between handleTurnGuide and the tool loop's drain. */
|
|
7
7
|
pendingTurnGuidance?: string[];
|
|
8
8
|
getActiveProjectRoot(): string;
|
|
9
9
|
readonly multiAgentHandlerHost: RpcHandlerHosts["multiAgent"];
|
|
10
|
-
readonly workflowHandlerHost: RpcHandlerHosts["workflow"];
|
|
11
10
|
};
|
|
12
11
|
type StdioRpcAdapterSource = DirectStdioRpcHost & {
|
|
13
12
|
ensureTaskDistillation(): import("./rpc-registry.js").TaskDistillationRpcSurface;
|
|
@@ -24,7 +23,6 @@ type StdioRpcAdapterSource = DirectStdioRpcHost & {
|
|
|
24
23
|
memoryDreamProvider: RpcHandlerHosts["dream"]["memoryProvider"];
|
|
25
24
|
memoryUserId: NonNullable<RpcHandlerHosts["memory"]["memoryUserId"]>;
|
|
26
25
|
pendingAskUser: RpcHandlerHosts["turn"]["pendingAskUser"];
|
|
27
|
-
petRuntime: RpcHandlerHosts["pet"]["petRuntime"];
|
|
28
26
|
verbose: NonNullable<RpcHandlerHosts["dream"]["verbose"]>;
|
|
29
27
|
resolveClientForPurpose(purpose: ModelPurpose): {
|
|
30
28
|
transport: {
|
|
@@ -37,9 +35,8 @@ type StdioRpcAdapterSource = DirectStdioRpcHost & {
|
|
|
37
35
|
model: string;
|
|
38
36
|
} | null;
|
|
39
37
|
ensureMemoryProvider: NonNullable<RpcHandlerHosts["memory"]["ensureMemoryProvider"]>;
|
|
40
|
-
ensureModelRegistryHydrated: NonNullable<RpcHandlerHosts["pet"]["ensureModelRegistryHydrated"]>;
|
|
41
38
|
enableIdleDream: NonNullable<RpcHandlerHosts["session"]["enableIdleDream"]>;
|
|
42
|
-
configureTurnMedia: NonNullable<RpcHandlerHosts["
|
|
39
|
+
configureTurnMedia: NonNullable<RpcHandlerHosts["turn"]["configureTurnMedia"]>;
|
|
43
40
|
sendError: NonNullable<RpcHandlerHosts["session"]["sendError"]>;
|
|
44
41
|
createDreamHandlerHost(): RpcHandlerHosts["dream"];
|
|
45
42
|
};
|
|
@@ -4,6 +4,7 @@ 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";
|
|
7
8
|
export interface StdioRuntimeBootstrapDeps {
|
|
8
9
|
verbose: boolean;
|
|
9
10
|
getActiveProjectRoot(): string;
|
|
@@ -20,5 +21,6 @@ export interface StdioRuntimeBootstrapDeps {
|
|
|
20
21
|
resolveMemoryHostRequestAccess?(): MemoryHostRequestAccess | null;
|
|
21
22
|
/** Lazy session-bound host profile facade; unavailable/non-ACP must fail loud at first web invoke. */
|
|
22
23
|
resolveHostProfileClient?(): HostProfileClient | undefined;
|
|
24
|
+
resolveHostPetClient?(): HostPetClient | undefined;
|
|
23
25
|
}
|
|
24
26
|
export declare function bootstrapStdioRuntimeServices(deps: StdioRuntimeBootstrapDeps): StdioRuntimeServices;
|
|
@@ -4,6 +4,7 @@ import { MediaPersistence } from "../runtime/infra/media-persistence.js";
|
|
|
4
4
|
import { MediaClient, ProviderRegistry, type LLMTransport } from "./provider-core-facade.js";
|
|
5
5
|
import { type MemoryHostRequestAccess, type MemoryProviderState } from "./memory-coordinator.js";
|
|
6
6
|
import { type PetRuntime } from "./pet-runtime.js";
|
|
7
|
+
import type { HostPetClient } from "../transport/host-pet-client.js";
|
|
7
8
|
import { type TurnMediaSetupHost } from "./turn-media-setup.js";
|
|
8
9
|
export interface StdioRuntimeServicesDeps {
|
|
9
10
|
getActiveProjectRoot(): string;
|
|
@@ -19,6 +20,7 @@ export interface StdioRuntimeServicesDeps {
|
|
|
19
20
|
* memory provider 工厂据此在创建时刻按 memory service 一次性选型 HostMemoryProvider。
|
|
20
21
|
*/
|
|
21
22
|
resolveMemoryHostRequestAccess?(): MemoryHostRequestAccess | null;
|
|
23
|
+
resolveHostPetClient?(): HostPetClient | undefined;
|
|
22
24
|
}
|
|
23
25
|
export interface StdioRuntimeServices {
|
|
24
26
|
providerRegistry: ProviderRegistry;
|
|
@@ -22,11 +22,11 @@ import type { AcpServer } from "../transport/acp-server.js";
|
|
|
22
22
|
import type { NotificationMethod, NotificationMethodMap } from "../protocol/notifications.js";
|
|
23
23
|
import { AgentRuntimeSessionState } from "./agent-runtime-session-state.js";
|
|
24
24
|
import { type MultiAgentHandlerHost } from "./multi-agent-handler-host.js";
|
|
25
|
-
import type { WorkflowHandlerHost } from "./handlers/workflow-handler.js";
|
|
26
25
|
import { SessionHistoryCoordinator } from "./session-history-coordinator.js";
|
|
27
26
|
import { PetConfirmCoordinator } from "./pet-confirm-coordinator.js";
|
|
28
27
|
import type { MemoryDreamRuntimeProvider, MemoryHandlerProvider, PermissionMode, ProjectMemoryStore } from "../runtime/ports/index.js";
|
|
29
28
|
import { HostProfileClient } from "../transport/host-profile-client.js";
|
|
29
|
+
import { HostPetClient } from "../transport/host-pet-client.js";
|
|
30
30
|
import { HostCapabilityClient } from "../transport/host-capability-client.js";
|
|
31
31
|
import { HostSessionClient } from "../transport/host-session-client.js";
|
|
32
32
|
import { HostProjectClient } from "../transport/host-project-client.js";
|
|
@@ -83,8 +83,6 @@ export declare class StdioServer {
|
|
|
83
83
|
}>;
|
|
84
84
|
/** Agents/solo/product handler facade. */
|
|
85
85
|
readonly multiAgentHandlerHost: MultiAgentHandlerHost;
|
|
86
|
-
/** Workflow handler host — carries toolCatalog + the lazy engine slots the multi-agent host lacks. */
|
|
87
|
-
readonly workflowHandlerHost: WorkflowHandlerHost;
|
|
88
86
|
/** ACP protocol coordinator — owns AcpServer lifecycle and ACP event mapping. */
|
|
89
87
|
private readonly acp;
|
|
90
88
|
sessionHistory: SessionHistoryCoordinator;
|
|
@@ -129,6 +127,7 @@ export declare class StdioServer {
|
|
|
129
127
|
/** D2 telemetry/feedback business facade; durable storage remains gateway-only. */
|
|
130
128
|
getHostFeedbackClient(): HostFeedbackClient | undefined;
|
|
131
129
|
getHostProjectClient(): HostProjectClient | undefined;
|
|
130
|
+
getHostPetClient(): HostPetClient | undefined;
|
|
132
131
|
initializeHostProjectAuthority(): Promise<void>;
|
|
133
132
|
/**
|
|
134
133
|
* Mid-turn guidance queue (运行中引导). Reset per turn by runTurnPipeline, pushed by
|
|
@@ -200,7 +199,7 @@ export declare class StdioServer {
|
|
|
200
199
|
* Ensure a default project exists on first start.
|
|
201
200
|
* Called from both legacy handleInitialize and ACP acpHandleInitialize.
|
|
202
201
|
*/
|
|
203
|
-
ensureDefaultProject(): void
|
|
202
|
+
ensureDefaultProject(): Promise<void>;
|
|
204
203
|
/**
|
|
205
204
|
* Atomically resolve transport + model + apiKey for a given ModelPurpose.
|
|
206
205
|
* If the resolved provider matches `this.currentProvider`, reuses cached transport.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* NOT our OSS. Lives in the config layer (not infra) so it can be public API:
|
|
5
5
|
* the runtime gateway merges it into the agent env when the user's region/network
|
|
6
6
|
* switch is on (cross-cutting ③); MCP subprocesses and skill shells then inherit
|
|
7
|
-
* it
|
|
7
|
+
* it through the Gateway Supervisor child-environment allow-list.
|
|
8
8
|
*
|
|
9
9
|
* Honest scope: this only redirects dependency *resolution* to official mirrors
|
|
10
10
|
* (covers most). It does NOT guarantee cold/new packages (npmmirror sync lag →
|
|
@@ -17,7 +17,7 @@ export declare const CN_BINARY_HOST = "https://registry.npmmirror.com/-/binary";
|
|
|
17
17
|
/** Mirror endpoint values (official mirrors, not our OSS). */
|
|
18
18
|
export declare function buildCnMirrorEnv(): Record<string, string>;
|
|
19
19
|
/**
|
|
20
|
-
* The env keys `buildCnMirrorEnv()` sets.
|
|
20
|
+
* The env keys `buildCnMirrorEnv()` sets. The Gateway Supervisor appends these to its
|
|
21
21
|
* forwarded-env list so a mirror set on the agent propagates to MCP/skill children.
|
|
22
22
|
*/
|
|
23
23
|
export declare const CN_MIRROR_ENV_KEYS: string[];
|
|
@@ -509,11 +509,9 @@ export interface MemoryMatch {
|
|
|
509
509
|
* 是 memory MCP 能力模块(freeze §3.7)的 store-owner;三张脸(MCP 面/UI-API 面/brain proxy 面 X7)
|
|
510
510
|
* 都是 thin adapter,唯一写者恒为本服务(脸数≠拷贝数,M-1)。
|
|
511
511
|
*
|
|
512
|
-
*
|
|
513
|
-
*
|
|
514
|
-
*
|
|
515
|
-
* (VSCode main IFileService 同构),agent 侧 qla 直接 fs 操作如常。`read(source, target)` 的 memdir
|
|
516
|
-
* 两义剥除——source 只指库内来源标识,绝不再指 memdir 文件。
|
|
512
|
+
* A 域库面(memories.db + 附件 + 晋升/蒸馏 JSON + 用户级 INDEX.md 派生渲染)与 C 域项目 memdir
|
|
513
|
+
* (`<cwd>/.qlogicagent/memory/`)都由 Gateway 独占在线存取。C 域仍是项目文件而非用户 Host store,
|
|
514
|
+
* 但 agent 只能经 projectMemory X7 语义代理访问,与 VSCode ext host 经 main IFileService proxy 同构。
|
|
517
515
|
*/
|
|
518
516
|
export interface MemoryProfileService {
|
|
519
517
|
atlas(query: MemoryQuery): MemoryRecord[];
|
|
@@ -573,6 +571,8 @@ export interface RunEvent {
|
|
|
573
571
|
/** ISO 时间戳 */
|
|
574
572
|
at: string;
|
|
575
573
|
type: string;
|
|
574
|
+
/** Optional domain event sequence (Goal event-sourcing recovery). */
|
|
575
|
+
sequence?: number;
|
|
576
576
|
member?: MemberHandle;
|
|
577
577
|
payload?: unknown;
|
|
578
578
|
}
|
|
@@ -595,15 +595,20 @@ export interface RunState {
|
|
|
595
595
|
* leader 大脑逻辑(怎么规划、派谁)仍留 qlogicagent,只写"计划"、不持久化"进度记录"(P5)。
|
|
596
596
|
*/
|
|
597
597
|
export interface RunStateStore {
|
|
598
|
-
|
|
598
|
+
/** Optional caller-selected domain id keeps Solo/Product/Goal public ids identical to host run ids. */
|
|
599
|
+
openRun(kind: "solo" | "product" | "goal", owner: SessionContext, runId?: RunId): RunId;
|
|
599
600
|
recordEvent(runId: RunId, ev: RunEvent): void;
|
|
600
601
|
/** product/solo 检查点 */
|
|
601
|
-
checkpoint(runId: RunId, snapshot: unknown): void;
|
|
602
|
+
checkpoint(runId: RunId, snapshot: unknown, checkpointId?: string): void;
|
|
603
|
+
getCheckpoint(runId: RunId, checkpointId: string): unknown | undefined;
|
|
604
|
+
listCheckpoints(runId: RunId): string[];
|
|
605
|
+
restoreCheckpoint(runId: RunId, checkpointId: string): unknown | undefined;
|
|
602
606
|
getRun(runId: RunId): RunState;
|
|
603
607
|
listRuns(filter: {
|
|
604
608
|
projectId: ProjectId;
|
|
605
609
|
kind?: string;
|
|
606
610
|
}): RunState[];
|
|
611
|
+
deleteRun(runId: RunId): boolean;
|
|
607
612
|
}
|
|
608
613
|
export interface EvBase {
|
|
609
614
|
/** 由 relay 合成(今天线上无 handle,只有 agentId+sessionId+delegationId 关联;R1) */
|
|
@@ -786,6 +791,18 @@ export interface HostNotificationSink {
|
|
|
786
791
|
*/
|
|
787
792
|
export declare const HOST_MEMORY_PROXY_METHODS: readonly ["search", "addText", "embedText", "ingestExtracted", "proposeExtracted", "consumePendingProposals", "feedback", "findRelatedEvents", "synthesizeTimeline", "getActivitySummary", "getAllProfiles", "setProfile", "getAtlas", "setMemoryArchived", "triggerDecay", "resolveConflicts"];
|
|
788
793
|
export type HostMemoryProxyMethod = (typeof HOST_MEMORY_PROXY_METHODS)[number];
|
|
794
|
+
/** Project-scoped Markdown memory face. Gateway resolves cwd/project from the supervised caller. */
|
|
795
|
+
export declare const HOST_PROJECT_MEMORY_PROXY_METHODS: readonly ["initialize", "getIndex", "addToIndex", "replaceInIndex", "removeFromIndex", "createFile", "writeFile", "readFile", "deleteFile", "listFiles", "searchLocal"];
|
|
796
|
+
export type HostProjectMemoryProxyMethod = (typeof HOST_PROJECT_MEMORY_PROXY_METHODS)[number];
|
|
797
|
+
export interface HostProjectMemoryIndexSnapshot {
|
|
798
|
+
raw: string;
|
|
799
|
+
prompt: string;
|
|
800
|
+
usage: {
|
|
801
|
+
chars: number;
|
|
802
|
+
lines: number;
|
|
803
|
+
percent: number;
|
|
804
|
+
};
|
|
805
|
+
}
|
|
789
806
|
/** [X7-C1a] Capability 大脑代理当前只开放两个只读方法;写面与 connector 尚未入约。 */
|
|
790
807
|
export declare const HOST_CAPABILITY_PROXY_METHODS: readonly ["getSkillSnapshot", "readSkillFile", "recordSkillInvocation", "commitSkillMutation", "applyCuratorPlan", "prepareSkillInstall", "finalizeSkillInstall"];
|
|
791
808
|
export type HostCapabilityProxyMethod = (typeof HOST_CAPABILITY_PROXY_METHODS)[number];
|
|
@@ -1061,10 +1078,15 @@ export interface HostSkillInvocationResult {
|
|
|
1061
1078
|
/** 单文件读取上限;host 在解码前按 bytes 检查。 */
|
|
1062
1079
|
export declare const HOST_SKILL_FILE_MAX_BYTES: number;
|
|
1063
1080
|
/** [X7-P] 单一 agent→host 一元请求通道的服务域。 */
|
|
1064
|
-
export type HostRequestService = "memory" | "profile" | "preview" | "capability" | "session" | "feedback" | "project";
|
|
1081
|
+
export type HostRequestService = "memory" | "projectMemory" | "profile" | "preview" | "capability" | "session" | "feedback" | "project" | "runState" | "pet";
|
|
1065
1082
|
/** Preview Browser 的七个允许动作;tool 与 gateway 必须消费此单源。 */
|
|
1066
1083
|
export declare const PREVIEW_BROWSER_ACTIONS: readonly ["navigate", "snapshot", "click", "type", "screenshot", "console", "network"];
|
|
1067
1084
|
export type PreviewBrowserAction = (typeof PREVIEW_BROWSER_ACTIONS)[number];
|
|
1085
|
+
export declare const PREVIEW_BROWSER_MUTATION_ACTIONS: readonly ["navigate", "click", "type"];
|
|
1086
|
+
export declare const PREVIEW_BROWSER_READ_ACTIONS: readonly ["snapshot", "screenshot", "console", "network"];
|
|
1087
|
+
/** Canonical identity for a built-in preview WebContentsView. */
|
|
1088
|
+
export type PreviewTargetKey = `preview:${number}`;
|
|
1089
|
+
export declare function isPreviewTargetKey(value: unknown): value is PreviewTargetKey;
|
|
1068
1090
|
/** 每个 preview action 的精确 payload;禁止把任意 Electron IPC method/params 暴露给 agent。 */
|
|
1069
1091
|
export interface PreviewBrowserActionParams {
|
|
1070
1092
|
navigate: {
|
|
@@ -1106,12 +1128,65 @@ export interface PreviewBrowserDriveResult {
|
|
|
1106
1128
|
screenshotB64?: string;
|
|
1107
1129
|
error?: string;
|
|
1108
1130
|
details?: unknown;
|
|
1131
|
+
targetKey?: PreviewTargetKey;
|
|
1132
|
+
refGeneration?: number;
|
|
1109
1133
|
}
|
|
1110
1134
|
export type HostMemoryRequestParams = {
|
|
1111
1135
|
service: "memory";
|
|
1112
1136
|
method: HostMemoryProxyMethod;
|
|
1113
1137
|
params: unknown[];
|
|
1114
1138
|
};
|
|
1139
|
+
export type HostProjectMemoryRequestParams = {
|
|
1140
|
+
service: "projectMemory";
|
|
1141
|
+
method: "initialize" | "getIndex" | "listFiles";
|
|
1142
|
+
params: {
|
|
1143
|
+
sessionId: string;
|
|
1144
|
+
};
|
|
1145
|
+
} | {
|
|
1146
|
+
service: "projectMemory";
|
|
1147
|
+
method: "addToIndex";
|
|
1148
|
+
params: {
|
|
1149
|
+
sessionId: string;
|
|
1150
|
+
content: string;
|
|
1151
|
+
};
|
|
1152
|
+
} | {
|
|
1153
|
+
service: "projectMemory";
|
|
1154
|
+
method: "replaceInIndex";
|
|
1155
|
+
params: {
|
|
1156
|
+
sessionId: string;
|
|
1157
|
+
oldText: string;
|
|
1158
|
+
newText: string;
|
|
1159
|
+
};
|
|
1160
|
+
} | {
|
|
1161
|
+
service: "projectMemory";
|
|
1162
|
+
method: "removeFromIndex";
|
|
1163
|
+
params: {
|
|
1164
|
+
sessionId: string;
|
|
1165
|
+
oldText: string;
|
|
1166
|
+
};
|
|
1167
|
+
} | {
|
|
1168
|
+
service: "projectMemory";
|
|
1169
|
+
method: "createFile" | "writeFile";
|
|
1170
|
+
params: {
|
|
1171
|
+
sessionId: string;
|
|
1172
|
+
name: string;
|
|
1173
|
+
content: string;
|
|
1174
|
+
};
|
|
1175
|
+
} | {
|
|
1176
|
+
service: "projectMemory";
|
|
1177
|
+
method: "readFile" | "deleteFile";
|
|
1178
|
+
params: {
|
|
1179
|
+
sessionId: string;
|
|
1180
|
+
name: string;
|
|
1181
|
+
};
|
|
1182
|
+
} | {
|
|
1183
|
+
service: "projectMemory";
|
|
1184
|
+
method: "searchLocal";
|
|
1185
|
+
params: {
|
|
1186
|
+
sessionId: string;
|
|
1187
|
+
query: string;
|
|
1188
|
+
};
|
|
1189
|
+
};
|
|
1115
1190
|
export type HostSessionRequestParams = {
|
|
1116
1191
|
service: "session";
|
|
1117
1192
|
method: "loadForResume";
|
|
@@ -1209,6 +1284,89 @@ export type HostFeedbackRequestParams = {
|
|
|
1209
1284
|
projectId: ProjectId;
|
|
1210
1285
|
};
|
|
1211
1286
|
};
|
|
1287
|
+
/** Agent-originated semantic run-state operations. Owner/project/cwd are resolved by Gateway scope. */
|
|
1288
|
+
export declare const HOST_RUN_STATE_PROXY_METHODS: readonly ["open", "recordEvent", "checkpoint", "get", "list", "delete", "getCheckpoint", "listCheckpoints", "restoreCheckpoint"];
|
|
1289
|
+
export type HostRunStateProxyMethod = typeof HOST_RUN_STATE_PROXY_METHODS[number];
|
|
1290
|
+
export type HostRunStateRequestParams = {
|
|
1291
|
+
service: "runState";
|
|
1292
|
+
method: "open";
|
|
1293
|
+
params: {
|
|
1294
|
+
runId: RunId;
|
|
1295
|
+
kind: "solo" | "product" | "goal";
|
|
1296
|
+
projectId: ProjectId;
|
|
1297
|
+
sessionId: CanonicalSessionId;
|
|
1298
|
+
};
|
|
1299
|
+
} | {
|
|
1300
|
+
service: "runState";
|
|
1301
|
+
method: "recordEvent";
|
|
1302
|
+
params: {
|
|
1303
|
+
runId: RunId;
|
|
1304
|
+
event: Omit<RunEvent, "member">;
|
|
1305
|
+
sessionId: CanonicalSessionId;
|
|
1306
|
+
};
|
|
1307
|
+
} | {
|
|
1308
|
+
service: "runState";
|
|
1309
|
+
method: "checkpoint";
|
|
1310
|
+
params: {
|
|
1311
|
+
runId: RunId;
|
|
1312
|
+
checkpointId?: string;
|
|
1313
|
+
snapshot: unknown;
|
|
1314
|
+
sessionId: CanonicalSessionId;
|
|
1315
|
+
};
|
|
1316
|
+
} | {
|
|
1317
|
+
service: "runState";
|
|
1318
|
+
method: "get";
|
|
1319
|
+
params: {
|
|
1320
|
+
runId: RunId;
|
|
1321
|
+
sessionId: CanonicalSessionId;
|
|
1322
|
+
};
|
|
1323
|
+
} | {
|
|
1324
|
+
service: "runState";
|
|
1325
|
+
method: "list";
|
|
1326
|
+
params: {
|
|
1327
|
+
projectId: ProjectId;
|
|
1328
|
+
kind?: "solo" | "product" | "goal";
|
|
1329
|
+
sessionId: CanonicalSessionId;
|
|
1330
|
+
};
|
|
1331
|
+
} | {
|
|
1332
|
+
service: "runState";
|
|
1333
|
+
method: "delete";
|
|
1334
|
+
params: {
|
|
1335
|
+
runId: RunId;
|
|
1336
|
+
sessionId: CanonicalSessionId;
|
|
1337
|
+
};
|
|
1338
|
+
} | {
|
|
1339
|
+
service: "runState";
|
|
1340
|
+
method: "getCheckpoint" | "restoreCheckpoint";
|
|
1341
|
+
params: {
|
|
1342
|
+
runId: RunId;
|
|
1343
|
+
checkpointId: string;
|
|
1344
|
+
sessionId: CanonicalSessionId;
|
|
1345
|
+
};
|
|
1346
|
+
} | {
|
|
1347
|
+
service: "runState";
|
|
1348
|
+
method: "listCheckpoints";
|
|
1349
|
+
params: {
|
|
1350
|
+
runId: RunId;
|
|
1351
|
+
sessionId: CanonicalSessionId;
|
|
1352
|
+
};
|
|
1353
|
+
};
|
|
1354
|
+
export declare const HOST_PET_PROXY_METHODS: readonly ["isActive", "getSoul", "awardXp", "journeyCatchUp"];
|
|
1355
|
+
export type HostPetProxyMethod = typeof HOST_PET_PROXY_METHODS[number];
|
|
1356
|
+
export type HostPetRequestParams = {
|
|
1357
|
+
service: "pet";
|
|
1358
|
+
method: "isActive" | "getSoul" | "journeyCatchUp";
|
|
1359
|
+
params: {
|
|
1360
|
+
sessionId: CanonicalSessionId;
|
|
1361
|
+
};
|
|
1362
|
+
} | {
|
|
1363
|
+
service: "pet";
|
|
1364
|
+
method: "awardXp";
|
|
1365
|
+
params: {
|
|
1366
|
+
event: string;
|
|
1367
|
+
sessionId: CanonicalSessionId;
|
|
1368
|
+
};
|
|
1369
|
+
};
|
|
1212
1370
|
/** Agent-originated profile store calls. UI/provider surfaces are intentionally excluded. */
|
|
1213
1371
|
export declare const HOST_PROFILE_PROXY_METHODS: readonly ["getTunables", "updateTunable", "clearTunable", "appendDirectoryAllowRule"];
|
|
1214
1372
|
export type HostProfileProxyMethod = typeof HOST_PROFILE_PROXY_METHODS[number];
|
|
@@ -1425,7 +1583,7 @@ export type HostPreviewRequestParams = {
|
|
|
1425
1583
|
* [X7-P] 跨进程 HostRequest 判别联合。memory/profile/preview 共用 `x/host.request`,
|
|
1426
1584
|
* service + method 二级分派;preview 的 method 与 payload 在类型层保持逐动作关联。
|
|
1427
1585
|
*/
|
|
1428
|
-
export type HostRequestParams = HostMemoryRequestParams | HostProfileRequestParams | HostPreviewRequestParams | HostCapabilityRequestParams | HostSessionRequestParams | HostFeedbackRequestParams | HostProjectRequestParams;
|
|
1586
|
+
export type HostRequestParams = HostMemoryRequestParams | HostProjectMemoryRequestParams | HostProfileRequestParams | HostPreviewRequestParams | HostCapabilityRequestParams | HostSessionRequestParams | HostFeedbackRequestParams | HostProjectRequestParams | HostRunStateRequestParams | HostPetRequestParams;
|
|
1429
1587
|
/** initialize 声明的真实已装配 host-request 服务;version 只接受冻结版本 1。 */
|
|
1430
1588
|
export type HostRequestCapability = {
|
|
1431
1589
|
version: 1;
|