qlogicagent 2.18.6 → 2.18.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/dist/agent.js +30 -30
  2. package/dist/cli.js +1 -1
  3. package/dist/host-contract.js +1 -0
  4. package/dist/index.js +538 -528
  5. package/dist/orchestration.js +4 -4
  6. package/dist/permissions.js +1 -1
  7. package/dist/plugin-marketplace-compute.js +1 -0
  8. package/dist/protocol.js +1 -1
  9. package/dist/skills/mcp/astraclaw-native-mcp-server.js +4 -4
  10. package/dist/tunables.js +1 -0
  11. package/dist/types/agent/runtime-vars.d.ts +1 -2
  12. package/dist/types/agent/tool-loop.d.ts +6 -0
  13. package/dist/types/agent/tool-loop.test-harness.d.ts +20 -0
  14. package/dist/types/agent/types.d.ts +2 -0
  15. package/dist/types/cli/acp-extended-handlers.d.ts +7 -0
  16. package/dist/types/cli/acp-extended-host-adapter.d.ts +2 -0
  17. package/dist/types/cli/acp-session-host.d.ts +15 -2
  18. package/dist/types/cli/base-tool-bootstrap.d.ts +1 -0
  19. package/dist/types/cli/community-skill-installer.d.ts +2 -0
  20. package/dist/types/cli/core-tool-coordinator.d.ts +4 -0
  21. package/dist/types/cli/core-tools/config-tool-bootstrap.d.ts +3 -1
  22. package/dist/types/cli/core-tools/config-tool-service.d.ts +7 -5
  23. package/dist/types/cli/default-project-bootstrap.d.ts +1 -0
  24. package/dist/types/cli/handlers/agents-handler.d.ts +4 -1
  25. package/dist/types/cli/handlers/community-handler.d.ts +2 -0
  26. package/dist/types/cli/handlers/config-handler.d.ts +2 -15
  27. package/dist/types/cli/handlers/pet-handler.d.ts +3 -2
  28. package/dist/types/cli/handlers/session-handler.d.ts +1 -1
  29. package/dist/types/cli/handlers/skills-handler.d.ts +12 -10
  30. package/dist/types/cli/handlers/solo-handler.d.ts +3 -0
  31. package/dist/types/cli/handlers/turn-handler.d.ts +47 -33
  32. package/dist/types/cli/handlers/workflow-handler.d.ts +6 -0
  33. package/dist/types/cli/mcp-bootstrap.d.ts +0 -2
  34. package/dist/types/cli/media-inline.d.ts +14 -0
  35. package/dist/types/cli/media-understanding.d.ts +65 -8
  36. package/dist/types/cli/memory-coordinator.d.ts +8 -0
  37. package/dist/types/cli/multi-agent-handler-host.d.ts +2 -0
  38. package/dist/types/cli/permission-bootstrap.d.ts +2 -0
  39. package/dist/types/cli/pet-runtime.d.ts +0 -1
  40. package/dist/types/cli/plugin-bootstrap.d.ts +2 -1
  41. package/dist/types/cli/product-coordinator.d.ts +4 -1
  42. package/dist/types/cli/rpc-registry.d.ts +1 -3
  43. package/dist/types/cli/runtime-watcher-bootstrap.d.ts +0 -2
  44. package/dist/types/cli/session-context.d.ts +4 -2
  45. package/dist/types/cli/skill-invocation-service.d.ts +2 -0
  46. package/dist/types/cli/skill-tools-bootstrap.d.ts +2 -0
  47. package/dist/types/cli/skills-query-service.d.ts +2 -1
  48. package/dist/types/cli/stdio-acp-protocol-coordinator.d.ts +9 -0
  49. package/dist/types/cli/stdio-acp-request-host.d.ts +11 -2
  50. package/dist/types/cli/stdio-rpc-handler-hosts.d.ts +1 -1
  51. package/dist/types/cli/stdio-runtime-bootstrap.d.ts +6 -0
  52. package/dist/types/cli/stdio-runtime-services.d.ts +6 -1
  53. package/dist/types/cli/stdio-server.d.ts +33 -4
  54. package/dist/types/cli/task-distillation-coordinator.d.ts +9 -4
  55. package/dist/types/cli/tool-bootstrap-core-registration.d.ts +3 -0
  56. package/dist/types/cli/tool-bootstrap-media-registration.d.ts +10 -0
  57. package/dist/types/cli/tool-bootstrap-web-registration.d.ts +1 -0
  58. package/dist/types/cli/tool-bootstrap.d.ts +9 -0
  59. package/dist/types/cli/turn-core.d.ts +2 -0
  60. package/dist/types/cli/turn-preview-browser-setup.d.ts +15 -0
  61. package/dist/types/cli/turn-project-router.d.ts +1 -1
  62. package/dist/types/cli/workflow-host-adapter.d.ts +2 -0
  63. package/dist/types/contracts/structured-planner.d.ts +2 -0
  64. package/dist/types/host-contract/index.d.ts +1475 -0
  65. package/dist/types/host-contract/project-id.d.ts +5 -0
  66. package/dist/types/host-contract/provider-profile.d.ts +46 -0
  67. package/dist/types/orchestration/agent-instance.d.ts +6 -0
  68. package/dist/types/orchestration/delegation-coordinator.d.ts +40 -0
  69. package/dist/types/orchestration/goal-mode-adapters.d.ts +3 -0
  70. package/dist/types/orchestration/product-planner.d.ts +3 -0
  71. package/dist/types/orchestration/solo-evaluator.d.ts +19 -5
  72. package/dist/types/orchestration/solo-persistence.d.ts +2 -0
  73. package/dist/types/orchestration/testing/delegate-test-bridge.d.ts +4 -0
  74. package/dist/types/permissions.d.ts +2 -0
  75. package/dist/types/protocol/methods.d.ts +0 -199
  76. package/dist/types/protocol/wire/acp-protocol.d.ts +16 -1
  77. package/dist/types/protocol/wire/agent-methods.d.ts +1 -173
  78. package/dist/types/protocol/wire/chat-types.d.ts +6 -0
  79. package/dist/types/runtime/config/tunable-defaults.d.ts +13 -3
  80. package/dist/types/runtime/execution/dream-agent.d.ts +9 -8
  81. package/dist/types/runtime/infra/agent-paths.d.ts +3 -3
  82. package/dist/types/runtime/infra/astraclaw-capabilities.d.ts +1 -1
  83. package/dist/types/runtime/infra/clixml-sanitize.d.ts +16 -0
  84. package/dist/types/runtime/infra/external-agent-approvals.d.ts +18 -0
  85. package/dist/types/runtime/infra/feedback-distillation.d.ts +3 -1
  86. package/dist/types/runtime/infra/feedback-host-authority.d.ts +4 -0
  87. package/dist/types/runtime/infra/llmrouter-catalog.d.ts +2 -13
  88. package/dist/types/runtime/infra/model-registry.d.ts +3 -1
  89. package/dist/types/runtime/infra/project-authority-facade.d.ts +11 -0
  90. package/dist/types/runtime/infra/project-host-authority.d.ts +10 -0
  91. package/dist/types/runtime/ports/memory-provider.d.ts +11 -7
  92. package/dist/types/runtime/ports/tool-contracts.d.ts +2 -0
  93. package/dist/types/runtime/prompt/fresh-workspace-evidence.d.ts +2 -2
  94. package/dist/types/runtime/session/session-persistence.d.ts +29 -10
  95. package/dist/types/runtime/session/session-recovery.d.ts +4 -0
  96. package/dist/types/runtime/session/session-summary.d.ts +3 -1
  97. package/dist/types/runtime/session/session-transcript-store.d.ts +7 -0
  98. package/dist/types/skills/memory/host-memory-provider.d.ts +148 -0
  99. package/dist/types/skills/memory/local-memory-provider.d.ts +19 -10
  100. package/dist/types/skills/memory/task-distillation.d.ts +6 -0
  101. package/dist/types/skills/plugins/plugin-marketplace.d.ts +23 -57
  102. package/dist/types/skills/tools/media-understand-tool.d.ts +28 -0
  103. package/dist/types/skills/tools/preview-browser-tool.d.ts +136 -0
  104. package/dist/types/skills/tools/shell/task-output.d.ts +10 -1
  105. package/dist/types/skills/tools/skill-tool.d.ts +1 -1
  106. package/dist/types/skills/web-search/brave-source.d.ts +2 -1
  107. package/dist/types/skills/web-search/crawl4ai-extractor.d.ts +3 -2
  108. package/dist/types/skills/web-search/exa-source.d.ts +2 -1
  109. package/dist/types/skills/web-search/search-svc-source.d.ts +4 -3
  110. package/dist/types/skills/web-search/searxng-source.d.ts +3 -1
  111. package/dist/types/skills/web-search/serper-source.d.ts +2 -1
  112. package/dist/types/skills/web-search/source-factory.d.ts +2 -1
  113. package/dist/types/skills/web-search/web-tunable-resolver.d.ts +16 -0
  114. package/dist/types/test-support/global-home-setup.d.ts +2 -0
  115. package/dist/types/transport/acp-server.d.ts +29 -0
  116. package/dist/types/transport/delegate-client.d.ts +82 -0
  117. package/dist/types/transport/host-capability-client.d.ts +21 -0
  118. package/dist/types/transport/host-feedback-client.d.ts +25 -0
  119. package/dist/types/transport/host-profile-client.d.ts +19 -0
  120. package/dist/types/transport/host-project-client.d.ts +16 -0
  121. package/dist/types/transport/host-request-client.d.ts +38 -0
  122. package/dist/types/transport/host-session-client.d.ts +29 -0
  123. package/dist/types/tunables.d.ts +2 -0
  124. package/package.json +26 -3
  125. package/dist/types/cli/handlers/settings-handler.d.ts +0 -19
  126. package/dist/types/cli/permission-rule-persistence.d.ts +0 -16
  127. package/dist/types/cli/tunable-store.d.ts +0 -26
  128. package/dist/types/skills/permissions/settings-watcher.d.ts +0 -26
  129. /package/dist/types/{skills/memory → host-contract}/fts-segment.d.ts +0 -0
@@ -3,6 +3,7 @@ import type { AcpSessionMeta } from "../protocol/wire/index.js";
3
3
  import { createMemoryPrefetchState } from "../runtime/hooks/memory-hooks.js";
4
4
  import type { SessionState } from "../runtime/session/session-state.js";
5
5
  import type { SessionHistoryCoordinator } from "./session-history-coordinator.js";
6
+ import type { HostCapabilityClient } from "../transport/host-capability-client.js";
6
7
  /**
7
8
  * LLM config pinned on the session by the host (session/set_config_option /
8
9
  * session/set_model / the /model command). This is host-supplied INPUT — distinct
@@ -18,6 +19,14 @@ export interface SessionLlmConfig {
18
19
  apiKey?: string;
19
20
  baseUrl?: string;
20
21
  }
22
+ export interface MaterializedSessionBinding extends SessionLlmConfig {
23
+ routing?: string;
24
+ }
25
+ /** Gateway-materialized session-private profile. apiKey exists in memory only. */
26
+ export interface MaterializedSessionProfile {
27
+ bindings: Record<string, MaterializedSessionBinding>;
28
+ permissions: Record<string, unknown>;
29
+ }
21
30
  export interface AcpSessionHost {
22
31
  /** Gateway-supplied per-session context (_meta from session/new).
23
32
  * LEGACY fallback: a per-CONNECTION singleton overwritten by the last session/new — kept only
@@ -25,8 +34,10 @@ export interface AcpSessionHost {
25
34
  acpSessionMeta: AcpSessionMeta | null;
26
35
  /** Per-session gateway _meta(session/new 注册;prompt 按 sessionId 取,消除跨会话串扰)。 */
27
36
  acpSessionMetaBySession: Map<string, AcpSessionMeta>;
28
- /** Host-pinned per-session LLM config; overlaid into every prompt's turn config. */
29
- sessionLlmConfig: SessionLlmConfig;
37
+ /** Legacy per-option pins, keyed by session (never a connection singleton). */
38
+ sessionLlmConfigBySession: Map<string, SessionLlmConfig>;
39
+ /** F2 full gateway profile, keyed by session; secrets are memory-only. */
40
+ materializedSessionProfiles: Map<string, MaterializedSessionProfile>;
30
41
  currentHooks: HookRegistry | null;
31
42
  currentSessionId: string;
32
43
  memoryPrefetchState: ReturnType<typeof createMemoryPrefetchState>;
@@ -36,6 +47,7 @@ export interface AcpSessionHost {
36
47
  disposeSessionRuntime?(): void;
37
48
  enableIdleDream(): void;
38
49
  ensureDefaultProject(): void;
50
+ initializeHostProjectAuthority?(): Promise<void>;
39
51
  /**
40
52
  * Ensure the model-registry catalog (this.models) is hydrated from the owner profile +
41
53
  * built-in/llmrouter catalog. A spawned/headless qlogicagent only runs load() (bindings +
@@ -45,6 +57,7 @@ export interface AcpSessionHost {
45
57
  */
46
58
  ensureModelRegistryHydrated?(): Promise<void>;
47
59
  getActiveProjectRoot(): string;
60
+ getHostCapabilityClient?(): HostCapabilityClient | undefined;
48
61
  log(message: string): void;
49
62
  sendNotification(method: string, params: Record<string, unknown>): void;
50
63
  setActiveWorkdir(dir: string): void;
@@ -18,5 +18,6 @@ export interface BaseToolBootstrapDeps {
18
18
  } | null;
19
19
  getTaskScopeKey?(): string | undefined;
20
20
  getCurrentTurnId?(): string | undefined;
21
+ loadTunableOverrides?(): Promise<Record<string, unknown>>;
21
22
  }
22
23
  export declare function configureBaseToolBootstrap(deps: BaseToolBootstrapDeps): void;
@@ -1,4 +1,5 @@
1
1
  import type { CommunityInstallResolution } from "../runtime/community/community-consent-client.js";
2
+ import type { HostCapabilityClient } from "../transport/host-capability-client.js";
2
3
  export interface CommunityInstalledResource {
3
4
  resourceId: string;
4
5
  version: string;
@@ -10,5 +11,6 @@ export interface InstallCommunitySkillOptions {
10
11
  fetchFn?: typeof fetch;
11
12
  /** Replace an existing install in place (update flow) instead of erroring. */
12
13
  allowReplace?: boolean;
14
+ hostCapabilityClient?: Pick<HostCapabilityClient, "prepareSkillInstall" | "finalizeSkillInstall">;
13
15
  }
14
16
  export declare function installCommunitySkillResource(install: CommunityInstallResolution, options?: InstallCommunitySkillOptions): Promise<CommunityInstalledResource>;
@@ -3,6 +3,8 @@ import type { HookRegistry } from "../contracts/hooks.js";
3
3
  import type { BackgroundTaskManager } from "../runtime/infra/background-tasks.js";
4
4
  import type { ToolCatalog } from "../runtime/ports/index.js";
5
5
  import type { LLMTransport } from "./provider-core-facade.js";
6
+ import type { HostProfileClient } from "../transport/host-profile-client.js";
7
+ import type { HostCapabilityClient } from "../transport/host-capability-client.js";
6
8
  export interface CliCoreToolHostDeps {
7
9
  getAgent(): unknown | null;
8
10
  getCurrentTransport(): LLMTransport | null;
@@ -28,6 +30,8 @@ export interface CliCoreToolHostDeps {
28
30
  };
29
31
  }): void;
30
32
  handleMcpToolCall(memberId: string, toolName: string, args: Record<string, unknown>): Promise<unknown>;
33
+ getHostProfileClient?(): HostProfileClient | undefined;
34
+ getHostCapabilityClient?(): HostCapabilityClient | undefined;
31
35
  }
32
36
  export interface CliCoreToolCoordinatorDeps {
33
37
  config: Record<string, unknown>;
@@ -1,5 +1,7 @@
1
1
  import type { ToolCatalog } from "../../runtime/ports/index.js";
2
+ import type { HostProfileClient } from "../../transport/host-profile-client.js";
2
3
  export interface ConfigToolRegistrationDeps {
3
4
  toolCatalog: ToolCatalog;
5
+ resolveHostProfileClient?: () => HostProfileClient | undefined;
4
6
  }
5
- export declare function registerConfigTool({ toolCatalog }: ConfigToolRegistrationDeps): void;
7
+ export declare function registerConfigTool({ toolCatalog, resolveHostProfileClient }: ConfigToolRegistrationDeps): void;
@@ -1,11 +1,13 @@
1
1
  /**
2
- * Config tool service — backs the `config` tool onto the REAL tunables system
3
- * (settings.tunables.*), the same store the UI settings page manages via the
4
- * config.updateTunable RPC. ModelRegistry.getTunable() re-reads settings.json
5
- * per call, so every write here is hot no restart needed.
2
+ * Config tool service — a thin compute-side proxy over the gateway-owned tunable store.
3
+ *
4
+ * Defaults/coercion/validation come from the public qlogicagent/tunables contract. Persistent
5
+ * overrides are read and mutated only through HostProfileClient's private X7 profile service.
6
+ * The agent never reads or writes settings.json and has no local fallback.
6
7
  */
7
8
  import type { ConfigToolDeps } from "../../skills/tools/config-tool.js";
9
+ import type { HostProfileClient } from "../../transport/host-profile-client.js";
8
10
  export interface ConfigToolServiceOptions {
9
- settingsPath?: string;
11
+ resolveHostProfileClient?: () => HostProfileClient | undefined;
10
12
  }
11
13
  export declare function createConfigToolService(options?: ConfigToolServiceOptions): ConfigToolDeps;
@@ -20,6 +20,7 @@ export interface DefaultProjectBootstrapDeps {
20
20
  interface DeferredHeavyWork {
21
21
  /** A default project was freshly created this run → its starter templates still need seeding. */
22
22
  freshDefaultDir?: string;
23
+ hostOwned?: boolean;
23
24
  }
24
25
  /** Resolves once the most recently scheduled deferred heavy work has settled (never rejects). */
25
26
  export declare function getDefaultProjectHeavyWorkPromise(): Promise<void>;
@@ -5,10 +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 { AgentProcessManager } from "../../runtime/infra/agent-process.js";
8
+ import type { AgentProcessManager } from "../../runtime/infra/agent-process.js";
9
9
  import type { AgentConfigStore } from "../../runtime/infra/agent-config-store.js";
10
10
  import { type AcpDetector } from "../../runtime/infra/acp-detector.js";
11
11
  import { type PooledTurnCtx } from "../../runtime/infra/external-agent-pool.js";
12
+ import type { DelegateBridge } from "../../orchestration/delegation-coordinator.js";
12
13
  export interface AgentsHandlerHost {
13
14
  acpDetector: AcpDetector;
14
15
  soloProcessManager: AgentProcessManager | null;
@@ -19,6 +20,8 @@ export interface AgentsHandlerHost {
19
20
  log?(message: string): void;
20
21
  sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
21
22
  sendNotification?(method: string, params: Record<string, unknown>): void;
23
+ /** 激活层(S3c §1.1):gateway-routed delegate 桥(懒读;未挂/gate 关 = undefined → 旧进程池路径)。 */
24
+ getDelegateBridge?(): DelegateBridge | undefined;
22
25
  }
23
26
  export declare function relayPooledTurnNotification(input: {
24
27
  agentId: string;
@@ -1,8 +1,10 @@
1
1
  import { type CommunityConsentClient } from "../../runtime/community/community-consent-client.js";
2
2
  import { type AgentRpcError, type AgentRpcRequest } from "../../protocol/wire/index.js";
3
+ import type { HostCapabilityClient } from "../../transport/host-capability-client.js";
3
4
  export type { CommunityConsentClient, CommunityInstallRiskTier, CommunityInstallResolution, } from "../../runtime/community/community-consent-client.js";
4
5
  export interface CommunityHandlerHost {
5
6
  resolveCommunityConsentClient?: () => CommunityConsentClient | null;
7
+ getHostCapabilityClient?(): HostCapabilityClient | undefined;
6
8
  sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
7
9
  /** Push a JSON-RPC notification (e.g. pet.asset.updated after a community pet install hydrates the UI store). */
8
10
  sendNotification(method: string, params: Record<string, unknown>): void;
@@ -1,13 +1,8 @@
1
1
  /**
2
- * Config + tunables handlers extracted from StdioServer.
3
- * Handles: config.get, config.update, config.tunables, config.updateTunable,
4
- * provider.list, tools.list, todos.list, tasks.list, tasks.cancel
5
- *
6
- * NOTE: Provider/model/key management is handled by settings-handler.ts (settings.* RPC).
7
- * config.get/config.update only operate on tunables and non-model settings.
2
+ * Provider/catalog and task-list handlers retained after the public config.* RPC teardown.
3
+ * Profile/tunable state is gateway-owned and is available to agent tools only through private X7.
8
4
  */
9
5
  import { type AgentRpcError, type AgentRpcRequest } from "../../protocol/wire/index.js";
10
- import type { PermissionMode } from "../../runtime/ports/index.js";
11
6
  import type { BackgroundTaskManager } from "../../runtime/infra/background-tasks.js";
12
7
  import type { TaskStore } from "../../runtime/infra/task-runtime.js";
13
8
  import type { ToolCatalog } from "../../runtime/ports/index.js";
@@ -16,18 +11,10 @@ export interface ConfigHandlerHost {
16
11
  backgroundTasks: BackgroundTaskManager;
17
12
  toolCatalog?: ToolCatalog;
18
13
  syncToolListMediaConfig?(): void;
19
- /** 权限热应用:config.update 写盘后立即同步活的 rule engine(否则要等下一轮 _meta/重启)。 */
20
- applyPermissionConfig?(perm: {
21
- mode: PermissionMode;
22
- }): void;
23
14
  sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
24
15
  }
25
16
  export declare function handleToolsList(this: ConfigHandlerHost, msg: AgentRpcRequest): void;
26
17
  export declare function handleProviderList(this: ConfigHandlerHost, msg: AgentRpcRequest): void;
27
- export declare function handleConfigGet(this: ConfigHandlerHost, msg: AgentRpcRequest): void;
28
- export declare function handleConfigUpdate(this: ConfigHandlerHost, msg: AgentRpcRequest): Promise<void>;
29
- export declare function handleConfigTunables(this: ConfigHandlerHost, msg: AgentRpcRequest): void;
30
- export declare function handleConfigUpdateTunable(this: ConfigHandlerHost, msg: AgentRpcRequest): Promise<void>;
31
18
  export declare function handleTodosList(this: ConfigHandlerHost, msg: AgentRpcRequest): Promise<void>;
32
19
  export declare function handleTasksList(this: ConfigHandlerHost, msg: AgentRpcRequest): void;
33
20
  export declare function handleTasksCancel(this: ConfigHandlerHost, msg: AgentRpcRequest): void;
@@ -14,7 +14,8 @@ interface PetMemoryActivitySummary {
14
14
  }>;
15
15
  }
16
16
  interface PetMemoryProviderLike {
17
- getActivitySummary(userId: string, days: number): PetMemoryActivitySummary | undefined;
17
+ /** B3(X7)异步化:16 host-state proxy 方法(host 模式经 x/host.request 跨进程)。 */
18
+ getActivitySummary(userId: string, days: number): Promise<PetMemoryActivitySummary | undefined> | undefined;
18
19
  }
19
20
  interface PetSessionStateLike {
20
21
  turnCount?: number;
@@ -25,7 +26,7 @@ export interface PetHandlerHost {
25
26
  memoryProvider?: PetMemoryProviderLike | null;
26
27
  memoryUserId?: string;
27
28
  ownerUserId?: string;
28
- petRuntime: Pick<PetRuntime, "createPetSoulGenerator" | "createSmallLLMCall" | "forgeAnalyzeImage"> & Partial<Pick<PetRuntime, "forgeGeneratePetdexAtlas" | "isImageGenerationAvailable" | "isPetdexForgeAvailable">>;
29
+ petRuntime: Pick<PetRuntime, "createPetSoulGenerator" | "createSmallLLMCall"> & Partial<Pick<PetRuntime, "forgeGeneratePetdexAtlas" | "isImageGenerationAvailable" | "isPetdexForgeAvailable">>;
29
30
  getActiveProjectRoot(): string;
30
31
  sendNotification(method: string, params: Record<string, unknown>): void;
31
32
  sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
@@ -90,7 +90,7 @@ 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): void;
93
+ export declare function handleSessionSwitchProject(this: SessionHandlerHost, msg: AgentRpcRequest): Promise<void>;
94
94
  export declare function handleSessionGetState(this: SessionHandlerHost, msg: AgentRpcRequest): void;
95
95
  /**
96
96
  * `session.focus` - Desktop UI reports which session is currently focused.
@@ -5,11 +5,13 @@
5
5
  * skills.curator, skills.lifecycle
6
6
  */
7
7
  import { type AgentRpcError, type AgentRpcRequest } from "../../protocol/wire/index.js";
8
+ import type { HostCapabilityClient } from "../../transport/host-capability-client.js";
8
9
  export interface SkillsHandlerHost {
9
10
  projectLocator?: {
10
11
  resolveProjectRoot(projectId: string): string | undefined;
11
12
  };
12
13
  getActiveProjectRoot(): string;
14
+ getHostCapabilityClient(): HostCapabilityClient | undefined;
13
15
  sendNotification(method: string, params: Record<string, unknown>): void;
14
16
  sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
15
17
  }
@@ -17,19 +19,19 @@ export declare function extractSkillMeta(skillMdPath: string): {
17
19
  version?: string;
18
20
  description?: string;
19
21
  };
20
- export declare function handleSkillsList(this: SkillsHandlerHost, msg: AgentRpcRequest): void;
21
- export declare function handleSkillsActivate(this: SkillsHandlerHost, msg: AgentRpcRequest): void;
22
- export declare function handleSkillsDeactivate(this: SkillsHandlerHost, msg: AgentRpcRequest): void;
22
+ export declare function handleSkillsList(this: SkillsHandlerHost, msg: AgentRpcRequest): Promise<void>;
23
+ export declare function handleSkillsActivate(this: SkillsHandlerHost, msg: AgentRpcRequest): Promise<void>;
24
+ export declare function handleSkillsDeactivate(this: SkillsHandlerHost, msg: AgentRpcRequest): Promise<void>;
23
25
  export declare function handleSkillsDelete(this: SkillsHandlerHost, msg: AgentRpcRequest): Promise<void>;
24
- export declare function handleSkillsPromote(this: SkillsHandlerHost, msg: AgentRpcRequest): void;
26
+ export declare function handleSkillsPromote(this: SkillsHandlerHost, msg: AgentRpcRequest): Promise<void>;
25
27
  /**
26
28
  * Per-project opt-out: mute (or un-mute) a globally-installed skill in ONE project so the agent
27
29
  * doesn't see it there — cuts context and mis-triggering without uninstalling the skill. The file
28
30
  * stays in the global store and stays active in every other project. This is the "本项目技能" toggle.
29
31
  */
30
- export declare function handleSkillsSetProjectDisabled(this: SkillsHandlerHost, msg: AgentRpcRequest): void;
31
- export declare function handleSkillsStats(this: SkillsHandlerHost, msg: AgentRpcRequest): void;
32
- export declare function handleSkillsPin(this: SkillsHandlerHost, msg: AgentRpcRequest): void;
33
- export declare function handleSkillsUnpin(this: SkillsHandlerHost, msg: AgentRpcRequest): void;
34
- export declare function handleSkillsCurator(this: SkillsHandlerHost, msg: AgentRpcRequest): void;
35
- export declare function handleSkillsLifecycle(this: SkillsHandlerHost, msg: AgentRpcRequest): void;
32
+ export declare function handleSkillsSetProjectDisabled(this: SkillsHandlerHost, msg: AgentRpcRequest): Promise<void>;
33
+ export declare function handleSkillsStats(this: SkillsHandlerHost, msg: AgentRpcRequest): Promise<void>;
34
+ export declare function handleSkillsPin(this: SkillsHandlerHost, msg: AgentRpcRequest): Promise<void>;
35
+ export declare function handleSkillsUnpin(this: SkillsHandlerHost, msg: AgentRpcRequest): Promise<void>;
36
+ export declare function handleSkillsCurator(this: SkillsHandlerHost, msg: AgentRpcRequest): Promise<void>;
37
+ export declare function handleSkillsLifecycle(this: SkillsHandlerHost, msg: AgentRpcRequest): Promise<void>;
@@ -7,6 +7,7 @@ import { AgentProcessManager } from "../../runtime/infra/agent-process.js";
7
7
  import type { AcpDetector } from "../../runtime/infra/acp-detector.js";
8
8
  import type { AgentConfigStore } from "../../runtime/infra/agent-config-store.js";
9
9
  import { SoloEvaluator } from "../../orchestration/solo-evaluator.js";
10
+ import type { DelegateBridge } from "../../orchestration/delegation-coordinator.js";
10
11
  import { type AgentRpcError, type AgentRpcRequest } from "../../protocol/wire/index.js";
11
12
  export declare const soloProjectMap: Map<string, string>;
12
13
  export interface SoloHandlerHost {
@@ -26,6 +27,8 @@ export interface SoloHandlerHost {
26
27
  };
27
28
  }): void;
28
29
  handleMcpToolCall(memberId: string, toolName: string, args: Record<string, unknown>): Promise<unknown>;
30
+ /** 激活层(S3c §1.5):gateway-routed delegate 桥(懒读;未挂/gate 关 = undefined → 旧本地 spawn 路径)。 */
31
+ getDelegateBridge?(): DelegateBridge | undefined;
29
32
  }
30
33
  export declare function ensureSoloEvaluator(this: SoloHandlerHost): SoloEvaluator;
31
34
  export declare function handleSoloStart(this: SoloHandlerHost, msg: AgentRpcRequest): Promise<void>;
@@ -3,9 +3,10 @@
3
3
  * Handles: the shared turn pipeline (runTurnPipeline) + thread.user_response (ask-user answers).
4
4
  */
5
5
  import { type ModelPurpose } from "../../runtime/infra/model-registry.js";
6
- import { type UnderstandMediaClient, type UnderstandMediaKind } from "../media-understanding.js";
6
+ import { type UnderstandMediaKind } from "../media-understanding.js";
7
7
  import { type InstructionFileInfo } from "../../runtime/prompt/instruction-loader.js";
8
8
  import type { HookRegistry } from "../../contracts/hooks.js";
9
+ export { isStructuredPlannerSystemPrompt } from "../../contracts/structured-planner.js";
9
10
  import type { AppendMessageOutcome } from "../../runtime/session/session-transcript-store.js";
10
11
  import type { PermissionMetadataResolver, ToolCatalog } from "../../runtime/ports/index.js";
11
12
  import type { ChatMessage, TokenUsage, ToolDefinition, TurnConfig } from "../../agent/types.js";
@@ -98,9 +99,6 @@ export declare function loadInstructionBlockForTurn(deps: {
98
99
  }): Promise<string | undefined>;
99
100
  export declare function hydrateTurnConfigFromModelMetadata(config: TurnConfig): TurnConfig;
100
101
  export declare function hydrateAttachmentReferenceUrlsForTurn(messages: ChatMessage[]): ChatMessage[];
101
- export declare function getFocusedAttachmentToolNamesForTurn(messages: ChatMessage[]): Set<string> | null;
102
- type FocusedAttachmentModelPurpose = "imageUnderstanding" | "videoUnderstanding";
103
- export declare function getFocusedAttachmentUnsupportedContentForTurn(messages: ChatMessage[], purpose: FocusedAttachmentModelPurpose): string | null;
104
102
  /**
105
103
  * Return a shallow-cloned message array whose LAST user message has the model-facing attachment
106
104
  * context (numbered manifest / reference URLs / picked-element selector+styles) appended to its
@@ -145,44 +143,61 @@ export declare function injectSkillContextBeforeLastUser(messages: ChatMessage[]
145
143
  */
146
144
  export declare function buildMemoryIndexBlock(globalBlock: string | null, projectBlock: string | null): string | null;
147
145
  export declare function injectDomainGuidanceBeforeLastUser(messages: ChatMessage[], domainGuidance: string): ChatMessage[];
148
- export declare function getFocusedAttachmentModelPurposeForTurn(messages: ChatMessage[]): FocusedAttachmentModelPurpose | null;
149
146
  export declare function refreshPermissionCheckerToolMeta(permissionChecker: PermissionMetadataResolver | null | undefined, tools: ToolDefinition[]): void;
150
147
  export declare function handleUserResponse(this: TurnControlHandlerHost, msg: AgentRpcRequest): void;
151
- /**
152
- * Pure: assemble the text appended to the user message after modality routing.
153
- * `descriptorsByKind` are the successfully understood texts (in order per modality);
154
- * `fallbackStripped` are the "X 张图片"-style labels for media that was dropped without
155
- * understanding. Returns "" when there is nothing to inject.
156
- *
157
- * The understood blocks lead with a note stating they are model transcriptions; the
158
- * "media omitted" note is appended ONLY for the fallback set, so a successful transcription
159
- * is never contradicted by a blanket "media omitted" line.
160
- */
161
- export declare function buildUnderstoodInjection(descriptorsByKind: Record<UnderstandMediaKind, string[]>, fallbackStripped: string[]): string;
162
148
  interface ModalityRegistryView {
163
149
  acceptsInputModality(modality: string, purpose: ModelPurpose): boolean;
164
150
  isAvailable(purpose: ModelPurpose): boolean;
165
151
  }
166
- interface RouteUnsupportedModalitiesDeps {
167
- lastUserMsg: ChatMessage;
168
- purpose: ModelPurpose;
169
- registry: ModalityRegistryView;
170
- resolveClient(purpose: ModelPurpose): UnderstandMediaClient | null;
171
- signal?: AbortSignal;
172
- log(message: string): void;
152
+ export interface UnsupportedMediaRefs {
153
+ image: string[];
154
+ video: string[];
155
+ audio: string[];
156
+ }
157
+ /** Plan for the media a text-only main model can't consume, produced by detectUnsupportedMediaForTools. */
158
+ export interface MediaUnderstandingPlan {
159
+ /** Refs the model should call the understanding tool on — understanding model bound AND the ref is
160
+ * tool-addressable (a short URL/path it can echo). Capped when surfaced (see the notice builder). */
161
+ toolRefs: UnsupportedMediaRefs;
162
+ /** Kinds present but NOT understandable this turn: no understanding model is bound for them, or every
163
+ * ref is a non-addressable (data:/oversized) URL. Surfaced as an HONEST "cannot read this" note so
164
+ * the model never points at an absent tool while being forbidden to admit blindness. */
165
+ blockedKinds: UnderstandMediaKind[];
173
166
  }
174
167
  /**
175
- * For each modality the resolved main model can't consume, route the media to its
176
- * understanding model (image→imageUnderstanding, audio→stt, video→videoUnderstanding)
177
- * and fold the returned text into the user message; media that can't be understood
178
- * (model unavailable / call failed / empty / over the cap) degrades to the previous
179
- * behavior (field dropped + omission note). The media field is ALWAYS deleted afterward
180
- * the main model still can't consume it, so leaving it would 400 the turn.
168
+ * Detect the media modalities the resolved main model can't consume, STRIP the media fields (a text-only
169
+ * model 400s on multimodal content), and PLAN what to tell the model: which refs to call the understanding
170
+ * tool on, and which kinds it must honestly report as unreadable (no understanding model bound, or every
171
+ * ref is a non-addressable data:/oversized URL). It does NOT transcribe and does NOT touch the message
172
+ * text the plan is surfaced via a model-only notice so the model calls image_understand /
173
+ * video_understand / stt itself, exactly as it would for an in-message media path; the user's bubble
174
+ * stays clean. This is the ONLY media-understanding path (the legacy eager pre-inject was fully retired).
175
+ *
176
+ * Reliability note: unlike the eager path, this DEPENDS on the model calling the tool — the medium is not
177
+ * transcribed anywhere, so if the model ignores the notice the understanding does not happen this turn
178
+ * (mitigated by the strong notice). Cross-turn is fine WITHIN a live session: the model's prior
179
+ * image_understand call (carrying the image_url ref) stays in the running conversation, so a later turn
180
+ * can re-read the same image — verified by a 2-turn test. The only gap is a COLD resume: the on-disk
181
+ * transcript stores just the user text (media stripped) + the assistant's text, not the tool calls/results
182
+ * (see appendMessage), so re-opening the session in a fresh process rebuilds history without the ref —
183
+ * the model then has only its earlier answer text, not a way to look again.
181
184
  *
182
- * Mutates `lastUserMsg` in place. Injection only touches string content (array content is
183
- * left as-is, matching the prior behavior). Best-effort: never throws for a per-item failure.
185
+ * Attachments were saved to disk + rewritten to short gateway local-media URLs by persistInboundUploadsForTurn
186
+ * upstream, so a proxy ref is compact; isToolAddressableRef guards the residual raw-data: case. Mutates
187
+ * `lastUserMsg` (deletes the consumed media fields).
188
+ */
189
+ export declare function detectUnsupportedMediaForTools(lastUserMsg: ChatMessage, purpose: ModelPurpose, registry: ModalityRegistryView): MediaUnderstandingPlan;
190
+ /**
191
+ * Build the MODEL-ONLY notice for a MediaUnderstandingPlan. Understandable media → a directive to call the
192
+ * matching tool on each listed ref (capped at MAX_MEDIA_UNDERSTAND_REFS). Blocked media → an HONEST
193
+ * "cannot read this, do not guess" note (no understanding model / unaddressable ref) — never a directive to
194
+ * call an absent tool. For a user ATTACHMENT the notice rides the LLM copy of the user message
195
+ * (effectiveMessages), NEVER the persisted/displayed message, so the bubble stays clean; for a TOOL RESULT
196
+ * it is appended to the tool-result content. Returns "" when there is no unconsumable media.
184
197
  */
185
- export declare function routeUnsupportedModalitiesToUnderstanding(deps: RouteUnsupportedModalitiesDeps): Promise<void>;
198
+ export declare function buildMediaUnderstandingToolNotice(plan: MediaUnderstandingPlan, opts?: {
199
+ source?: "attachment" | "tool_result";
200
+ }): string;
186
201
  export interface TurnPipelineInput {
187
202
  turnId: string;
188
203
  sessionId: string;
@@ -213,4 +228,3 @@ export interface TurnPipelineResult {
213
228
  * Invoked with `.call(host, input)` by the standard-ACP `session/prompt` handler.
214
229
  */
215
230
  export declare function runTurnPipeline(this: any, input: TurnPipelineInput): Promise<TurnPipelineResult>;
216
- export {};
@@ -8,6 +8,7 @@
8
8
  */
9
9
  import { AgentProcessManager } from "../../runtime/infra/agent-process.js";
10
10
  import type { AcpDetector } from "../../runtime/infra/acp-detector.js";
11
+ import type { DelegateBridge } from "../../orchestration/delegation-coordinator.js";
11
12
  import { type AgentRpcError, type AgentRpcRequest } from "../../protocol/wire/index.js";
12
13
  import { WorkflowController } from "../../orchestration/workflow/workflow-controller.js";
13
14
  import { WorkflowStore, type WorkflowRecord } from "../../orchestration/workflow/workflow-store.js";
@@ -46,6 +47,11 @@ export interface WorkflowCoordinatorHost {
46
47
  } | null;
47
48
  /** Per-root engine bundles keyed by resolved cwd; built lazily by ensureWorkflowRoot. */
48
49
  workflowRoots: Map<string, WorkflowRootBundle> | null;
50
+ /**
51
+ * 激活层(S3c §1.6):gateway-routed delegate 桥(gateway 在 initialize 声明 delegate 能力位时
52
+ * 才 isSupported;缺省/gate 关 = 旧 AgentProcessManager 本地 spawn 路径,单轨保留零回归)。
53
+ */
54
+ getDelegateBridge?(): DelegateBridge | undefined;
49
55
  }
50
56
  export interface WorkflowHandlerHost extends WorkflowCoordinatorHost {
51
57
  sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
@@ -13,9 +13,7 @@ export interface McpBootstrapDeps {
13
13
  }
14
14
  export declare const mcpToolRegistrationModule: import("../runtime/ports/tool-contracts.js").ToolRegistrationModule<McpBootstrapDeps>;
15
15
  export declare function configureMcpBootstrap(deps: McpBootstrapDeps): void;
16
- export declare function readUserMcpConfig(pathService: PathService, log?: RuntimeLogger): unknown;
17
16
  export declare function buildMcpBootstrapEntries(params: {
18
17
  turnMcpConfig?: unknown;
19
- userMcpConfig?: unknown;
20
18
  projectRoot: string;
21
19
  }): import("../skills/mcp/mcp-manager.js").McpServerEntry[];
@@ -15,3 +15,17 @@
15
15
  * unchanged. Never throws.
16
16
  */
17
17
  export declare function resolveLocalMediaForModel(url: string): string;
18
+ /**
19
+ * Resolve an IMAGE reference for an understanding call, preferring a self-contained base64 `data:` URL
20
+ * for a small LOCAL image over the upload path. A local image inlined as base64 is delivered inside the
21
+ * request (the model provider fetches nothing), so it sidesteps the whole local→upload→OSS→signed-URL
22
+ * chain that a text main model's image understanding otherwise depends on (an unsigned private-OSS URL
23
+ * the provider 403s on is the classic silent-empty fault). Behavior:
24
+ * - `data:` URL → returned as-is (already inline).
25
+ * - public `http(s)`/`blob:` URL → returned as-is (the provider fetches it server-side).
26
+ * - LOCAL image (raw path / `file://` / the 127.0.0.1 media-proxy URL) within the inline ceiling →
27
+ * read + base64 `data:` URL.
28
+ * - LOCAL image over the ceiling (or unreadable) → fall back to resolveLocalMediaForModel (proxy/upload).
29
+ * Only images inline as base64 — video is far too large, so it always takes the URL path. Never throws.
30
+ */
31
+ export declare function resolveImageForUnderstanding(url: string): string;
@@ -20,6 +20,22 @@ export declare const PURPOSE_BY_KIND: Record<UnderstandMediaKind, "imageUndersta
20
20
  export declare const URL_FIELD_BY_KIND: Record<UnderstandMediaKind, "imageUrls" | "audioUrls" | "videoUrls">;
21
21
  /** Per-medium instruction. Every kind is normalized to plain text so callers only swap a label. */
22
22
  export declare const PROMPT_BY_KIND: Record<UnderstandMediaKind, string>;
23
+ /**
24
+ * The subset of stream-chunk fields understandMediaUrl inspects. Deliberately loose and
25
+ * all-optional beyond `type` so it stays structurally compatible with the real LLMTransport's
26
+ * discriminated LLMChunk union (delta / usage / error / done all satisfy it) and the memory
27
+ * client. Beyond the `delta` text we read the `usage` tokens and the terminal `error` / `done`
28
+ * so an empty reply can be diagnosed (medium never reached the model) rather than silently
29
+ * reported as a blank description.
30
+ */
31
+ export interface UnderstandMediaChunk {
32
+ type: string;
33
+ text?: string;
34
+ promptTokens?: number;
35
+ completionTokens?: number;
36
+ finishReason?: string;
37
+ message?: string;
38
+ }
23
39
  /**
24
40
  * A resolved understanding client. Structurally compatible with both the real LLMTransport
25
41
  * (whose `stream` takes an optional third `signal` arg) and the memory client. Deliberately
@@ -29,17 +45,58 @@ export interface UnderstandMediaClient {
29
45
  model: string;
30
46
  apiKey: string;
31
47
  transport: {
32
- stream(request: Record<string, unknown>, apiKey: string, signal?: AbortSignal): AsyncIterable<{
33
- type: string;
34
- text?: string;
35
- }>;
48
+ stream(request: object, apiKey: string, signal?: AbortSignal): AsyncIterable<UnderstandMediaChunk>;
36
49
  };
37
50
  }
38
51
  /**
39
- * Understand a single medium at `url` and return the model's trimmed text (may be empty
40
- * if the model produced nothing). Never throws for an empty reply an empty string is a
41
- * valid "no text" result the caller degrades on.
52
+ * Why an understanding call yielded no usable text. Lets callers separate a genuine "the model
53
+ * looked and had nothing to say" (`empty_output`) from "the medium never reached the model"
54
+ * (`fetch_failed`) the silent-empty failure mode where an unfetchable image (e.g. a private-OSS
55
+ * URL the provider 403s on) bills zero input tokens, so an empty reply is a delivery failure, not
56
+ * a blank description. `stream_error` is an explicit upstream error surfaced mid-stream.
57
+ */
58
+ export type MediaUnderstandFailure = "fetch_failed" | "stream_error" | "empty_output";
59
+ /**
60
+ * Structured outcome of understandMediaUrl. `text` is the transcript (empty ⇔ the model produced
61
+ * no text); when `text` is empty, `failure` classifies WHY so callers can surface a delivery
62
+ * failure distinctly instead of treating every empty reply as "nothing to describe". The token /
63
+ * finishReason fields carry the diagnostic evidence for logs.
64
+ */
65
+ export interface UnderstandMediaResult {
66
+ /** The model's trimmed text. Empty string ⇔ no text was produced (see `failure`). */
67
+ text: string;
68
+ /** Input tokens the provider billed, if a usage chunk arrived. undefined ⇔ no usage chunk was
69
+ * seen at all — itself a strong "nothing reached, or came back from, the model" signal. */
70
+ promptTokens?: number;
71
+ /** Output tokens, if a usage chunk arrived. */
72
+ completionTokens?: number;
73
+ /** finishReason from the terminal chunk ("" / undefined ⇔ truncated or none). */
74
+ finishReason?: string;
75
+ /** Message from an explicit `error` chunk, if the stream surfaced one. */
76
+ errorText?: string;
77
+ /** Set when the reply is not a trustworthy result. Usually `text` is empty, but `fetch_failed` can
78
+ * accompany NON-empty `text` — an image billed at text-only tokens was never seen, so its "description"
79
+ * is confabulated. undefined ⇔ a real success; when set, callers must NOT treat `text` as valid. */
80
+ failure?: MediaUnderstandFailure;
81
+ }
82
+ /**
83
+ * Stream an already-built understanding request and classify an empty reply. Placement of the
84
+ * prompt and media URL(s) onto the request is the CALLER's job — this owns only the streaming +
85
+ * diagnosis, so every vision caller (the turn gate's understandMediaUrl AND the pet forge's image
86
+ * analysis / vision-QA) shares ONE definition of "fetch_failed vs empty_output vs stream_error"
87
+ * instead of each re-deriving it from a thin delta-only loop. `kind` drives only the image
88
+ * token-floor heuristic — pass the kind of the primary medium carried on the request.
89
+ */
90
+ export declare function streamUnderstanding(client: UnderstandMediaClient, request: Record<string, unknown>, kind: UnderstandMediaKind, opts?: {
91
+ signal?: AbortSignal;
92
+ }): Promise<UnderstandMediaResult>;
93
+ /**
94
+ * Understand a single medium at `url`. Returns a structured result: the trimmed text (may be
95
+ * empty) plus, when empty, a `failure` classifying WHY. Never throws for an empty reply — the
96
+ * caller decides how to degrade, but can now tell a delivery failure (`fetch_failed`) apart from a
97
+ * blank description (`empty_output`) instead of treating every empty reply the same. Thin wrapper
98
+ * over streamUnderstanding that builds the single-URL, modality-correct request.
42
99
  */
43
100
  export declare function understandMediaUrl(client: UnderstandMediaClient, kind: UnderstandMediaKind, url: string, opts?: {
44
101
  signal?: AbortSignal;
45
- }): Promise<string>;
102
+ }): Promise<UnderstandMediaResult>;
@@ -1,3 +1,4 @@
1
+ import { type HostRequestRequester } from "../skills/memory/host-memory-provider.js";
1
2
  import { type MemoryPrefetchState } from "../runtime/hooks/memory-hooks.js";
2
3
  import type { HookRegistry } from "../contracts/hooks.js";
3
4
  import type { RuntimeLogger } from "../runtime/hooks/hook-registry.js";
@@ -12,6 +13,13 @@ export interface MemoryProviderState {
12
13
  dreamProvider: MemoryDreamRuntimeProvider | null;
13
14
  userId: string;
14
15
  }
16
+ /** Host-request access exposed by the ACP protocol coordinator. */
17
+ export interface MemoryHostRequestAccess {
18
+ supportsHostRequestService(service: "memory"): boolean;
19
+ readonly hostRequest: HostRequestRequester;
20
+ }
21
+ /** 装配期绑定(stdio-runtime-services 注入;lazy resolver——gate 在创建时刻现读)。重绑重置选型护栏。 */
22
+ export declare function bindMemoryHostRequestAccess(resolve: () => MemoryHostRequestAccess | null): void;
15
23
  export declare function ensureLocalMemoryProvider(currentUserId: string): MemoryProviderState;
16
24
  export interface RegisterMemoryRuntimeHooksDeps {
17
25
  hooks: HookRegistry;
@@ -22,6 +22,8 @@ export interface MultiAgentHandlerHostDeps {
22
22
  log(message: string): void;
23
23
  sendNotification(method: string, params: Record<string, unknown>): void;
24
24
  sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
25
+ /** 激活层(S3c):gateway-routed delegate 桥(懒读;未挂/gate 关 = undefined → 各旧本地 spawn 路径)。 */
26
+ getDelegateBridge?: ProductHandlerHost["getDelegateBridge"];
25
27
  }
26
28
  export declare function createMultiAgentHandlerHost(deps: MultiAgentHandlerHostDeps): MultiAgentHandlerHost;
27
29
  export {};
@@ -2,6 +2,7 @@ import type { HookRegistry } from "../contracts/hooks.js";
2
2
  import type { NotificationMethod, NotificationMethodMap } from "../protocol/notifications.js";
3
3
  import type { AcpPermissionRequestParams } from "../protocol/wire/index.js";
4
4
  import type { ToolCatalog } from "../runtime/ports/index.js";
5
+ import type { HostProfileClient } from "../transport/host-profile-client.js";
5
6
  import { type RuntimePermissionChecker, type RuntimePermissionRuleEngine } from "./permission-runtime-service.js";
6
7
  export { createApprovalResponseFromAcpOption } from "./permission-approval-bridge.js";
7
8
  export interface PermissionBootstrapDeps {
@@ -30,6 +31,7 @@ export interface PermissionBootstrapDeps {
30
31
  } | undefined;
31
32
  sendNotification<M extends NotificationMethod>(method: M, params: NotificationMethodMap[M]): void;
32
33
  isPetActive(): boolean;
34
+ resolveHostProfileClient?: () => HostProfileClient | undefined;
33
35
  currentUnregister?: (() => void) | null;
34
36
  }
35
37
  export interface PermissionBootstrapResult {
@@ -40,7 +40,6 @@ export interface PetLlmClient {
40
40
  export interface PetRuntime {
41
41
  createPetSoulGenerator(): PetSoulGenerator | undefined;
42
42
  createSmallLLMCall(): SmallLlmCall | undefined;
43
- forgeAnalyzeImage(imageBase64: string, hint?: string): Promise<string>;
44
43
  isImageGenerationAvailable(): boolean;
45
44
  isPetdexForgeAvailable(): boolean;
46
45
  forgeGeneratePetdexAtlas(input: PetdexForgeInput): Promise<PetdexForgeOutput>;