qlogicagent 2.10.33 → 2.10.35
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/agent.js +6 -21
- package/dist/cli.js +386 -387
- package/dist/index.js +388 -389
- package/dist/orchestration.js +8 -8
- package/dist/permissions.js +1 -1
- package/dist/protocol.js +1 -1
- package/dist/types/agent/agent.d.ts +4 -2
- package/dist/types/agent/tool-loop/artifact-events.d.ts +17 -0
- package/dist/types/agent/tool-loop/loop-helpers.d.ts +15 -0
- package/dist/types/agent/tool-loop/recovery-helpers.d.ts +18 -0
- package/dist/types/agent/tool-loop/single-round.d.ts +2 -0
- package/dist/types/agent/tool-loop/tool-result-events.d.ts +7 -0
- package/dist/types/agent/tool-loop.d.ts +12 -11
- package/dist/types/agent/types.d.ts +3 -1
- package/dist/types/cli/acp-session-handlers.d.ts +2 -0
- package/dist/types/cli/agent-runtime-bootstrap.d.ts +2 -1
- package/dist/types/cli/agent-runtime-ports-adapter.d.ts +2 -0
- package/dist/types/cli/agent-runtime-session-state.d.ts +24 -0
- package/dist/types/cli/base-tool-bootstrap.d.ts +2 -0
- package/dist/types/cli/core-tool-coordinator.d.ts +3 -0
- package/dist/types/cli/core-tools/agent-tool-bootstrap.d.ts +3 -1
- package/dist/types/cli/core-tools/agent-tool-service.d.ts +3 -1
- package/dist/types/cli/core-tools/checkpoint-tool-bootstrap.d.ts +3 -1
- package/dist/types/cli/core-tools/config-tool-bootstrap.d.ts +3 -1
- package/dist/types/cli/core-tools/cron-tool-bootstrap.d.ts +3 -1
- package/dist/types/cli/core-tools/monitor-tool-bootstrap.d.ts +3 -1
- package/dist/types/cli/core-tools/team-tool-bootstrap.d.ts +3 -1
- package/dist/types/cli/core-tools/utility-tool-bootstrap.d.ts +3 -1
- package/dist/types/cli/dev-tool-bootstrap.d.ts +4 -0
- package/dist/types/cli/dev-tools/dev-tool-bootstrap-service.d.ts +6 -0
- package/dist/types/cli/dev-tools/dev-tool-registry.d.ts +7 -0
- package/dist/types/cli/dream-host-adapter.d.ts +1 -0
- package/dist/types/cli/handlers/community-handler.d.ts +2 -1
- package/dist/types/cli/handlers/config-handler.d.ts +2 -0
- package/dist/types/cli/handlers/dream-handler.d.ts +2 -0
- package/dist/types/cli/handlers/pet-handler.d.ts +1 -0
- package/dist/types/cli/handlers/product-handler.d.ts +18 -40
- package/dist/types/cli/handlers/project-handler.d.ts +1 -1
- package/dist/types/cli/handlers/turn-handler.d.ts +3 -1
- package/dist/types/cli/handlers/workflow-handler.d.ts +2 -0
- package/dist/types/cli/mcp-bootstrap.d.ts +20 -0
- package/dist/types/cli/mcp-plugin-bootstrap.d.ts +2 -27
- package/dist/types/cli/media-runtime-facade.d.ts +20 -0
- package/dist/types/cli/memory-candidate-service.d.ts +74 -0
- package/dist/types/cli/memory-coordinator.d.ts +3 -3
- package/dist/types/cli/permission-approval-bridge.d.ts +15 -0
- package/dist/types/cli/permission-bootstrap.d.ts +6 -6
- package/dist/types/cli/permission-runtime-service.d.ts +9 -0
- package/dist/types/cli/pet-confirm-coordinator.d.ts +2 -2
- package/dist/types/cli/plugin-bootstrap.d.ts +14 -0
- package/dist/types/cli/product-coordinator.d.ts +25 -0
- package/dist/types/cli/project-command-service.d.ts +26 -0
- package/dist/types/cli/provider-core-facade.d.ts +1 -0
- package/dist/types/cli/runtime-hook-bootstrap.d.ts +2 -1
- package/dist/types/cli/runtime-watcher-bootstrap.d.ts +2 -2
- package/dist/types/cli/session-coordinator.d.ts +5 -3
- package/dist/types/cli/session-query-service.d.ts +23 -0
- package/dist/types/cli/skill-meta-subturn-service.d.ts +22 -0
- package/dist/types/cli/skill-meta-tool-bootstrap.d.ts +9 -7
- package/dist/types/cli/skills-query-service.d.ts +26 -0
- package/dist/types/cli/stdio-agent-session-bootstrap.d.ts +78 -0
- package/dist/types/cli/stdio-runtime-bootstrap.d.ts +16 -0
- package/dist/types/cli/stdio-runtime-services.d.ts +36 -0
- package/dist/types/cli/stdio-server.d.ts +19 -18
- package/dist/types/cli/test-support/tool-catalog-fixture.d.ts +3 -0
- package/dist/types/cli/tool-bootstrap-providers.d.ts +3 -0
- package/dist/types/cli/tool-bootstrap.d.ts +7 -20
- package/dist/types/cli/tool-catalog.d.ts +4 -2
- package/dist/types/cli/tool-invoker-factory.d.ts +2 -0
- package/dist/types/cli/tool-registry-adapter.d.ts +5 -0
- package/dist/types/contracts/hooks.d.ts +1 -1
- package/dist/types/index.d.ts +1 -2
- package/dist/types/orchestration/product-persistence.d.ts +7 -3
- package/dist/types/orchestration/solo-persistence.d.ts +8 -4
- package/dist/types/orchestration/subagent/agent-registry.d.ts +3 -3
- package/dist/types/orchestration/tool-cascade.d.ts +12 -3
- package/dist/types/orchestration/tool-loop/tool-schema.d.ts +4 -1
- package/dist/types/orchestration/workflow/qla-executor-host.d.ts +3 -3
- package/dist/types/protocol/methods.d.ts +27 -1
- package/dist/types/protocol/wire/acp-protocol.d.ts +0 -2
- package/dist/types/protocol/wire/agent-rpc.d.ts +4 -4
- package/dist/types/protocol/wire/capability-manifest.d.ts +2 -1
- package/dist/types/protocol/wire/capability-transport.d.ts +2 -2
- package/dist/types/protocol/wire/chat-types.d.ts +4 -0
- package/dist/types/protocol/wire/index.d.ts +1 -1
- package/dist/types/protocol/wire/notification-payloads.d.ts +2 -1
- package/dist/types/protocol/wire/web-capability.d.ts +3 -0
- package/dist/types/runtime/community/community-consent-client.d.ts +21 -1
- package/dist/types/runtime/execution/dream-agent.d.ts +1 -1
- package/dist/types/runtime/execution/forked-agent.d.ts +1 -1
- package/dist/types/runtime/execution/tool-eligibility.d.ts +14 -37
- package/dist/types/runtime/hooks/context-compression.d.ts +1 -1
- package/dist/types/runtime/infra/agent-paths.d.ts +0 -4
- package/dist/types/runtime/infra/default-path-service.d.ts +32 -0
- package/dist/types/runtime/infra/llmrouter-catalog.d.ts +6 -5
- package/dist/types/runtime/infra/model-registry.d.ts +1 -2
- package/dist/types/runtime/infra/process-config-port.d.ts +2 -0
- package/dist/types/runtime/infra/provider-catalog-adapter.d.ts +48 -0
- package/dist/types/runtime/infra/token-budget.d.ts +1 -1
- package/dist/types/runtime/ports/agent-runtime-ports.d.ts +76 -0
- package/dist/types/runtime/ports/config-port.d.ts +4 -0
- package/dist/types/runtime/ports/index.d.ts +8 -2
- package/dist/types/runtime/ports/model-transport-contracts.d.ts +125 -0
- package/dist/types/runtime/ports/path-service.d.ts +18 -0
- package/dist/types/runtime/ports/permission-contracts.d.ts +8 -3
- package/dist/types/runtime/ports/tool-contracts.d.ts +63 -2
- package/dist/types/runtime/session/session-persistence.d.ts +1 -1
- package/dist/types/runtime/tasks/task-types.d.ts +2 -1
- package/dist/types/skills/index.d.ts +1 -109
- package/dist/types/skills/mcp/mcp-manager.d.ts +13 -0
- package/dist/types/skills/memory/local-memory-provider.d.ts +0 -4
- package/dist/types/skills/memory/local-store-records.d.ts +184 -0
- package/dist/types/skills/memory/local-store.d.ts +9 -14
- package/dist/types/skills/memory/memory-db-path.d.ts +7 -0
- package/dist/types/skills/memory/memory-embedding-config.d.ts +31 -0
- package/dist/types/skills/memory/memory-provider-factory.d.ts +3 -14
- package/dist/types/skills/memory/memory-vector-utils.d.ts +2 -0
- package/dist/types/skills/memory/sqlite-memory-mappers.d.ts +6 -0
- package/dist/types/skills/memory/sqlite-memory-schema.d.ts +3 -0
- package/dist/types/skills/permissions/hook-runner.d.ts +1 -1
- package/dist/types/skills/permissions/rule-engine.d.ts +2 -5
- package/dist/types/skills/permissions/settings-watcher.d.ts +6 -35
- package/dist/types/skills/permissions/types.d.ts +1 -1
- package/dist/types/skills/plugins/plugin-loader.d.ts +10 -0
- package/dist/types/skills/portable-tool.d.ts +10 -0
- package/dist/types/skills/tools/cron-tool.d.ts +0 -20
- package/dist/types/skills/tools.d.ts +24 -59
- package/dist/types/transport/acp-server.d.ts +7 -7
- package/package.json +3 -1
- package/dist/types/agent/memory-recall-context.test.d.ts +0 -1
- package/dist/types/cli/acp-extended-host-adapter.test.d.ts +0 -1
- package/dist/types/cli/acp-session-handlers.test.d.ts +0 -1
- package/dist/types/cli/agent-status-notifier.test.d.ts +0 -1
- package/dist/types/cli/cli-acp-request-handler.test.d.ts +0 -1
- package/dist/types/cli/community-skill-installer.test.d.ts +0 -1
- package/dist/types/cli/core-tools/cron-workflow-service.test.d.ts +0 -1
- package/dist/types/cli/dev-tools/repl-lsp-tool-services.test.d.ts +0 -1
- package/dist/types/cli/handlers/community-handler.test.d.ts +0 -1
- package/dist/types/cli/handlers/config-handler.test.d.ts +0 -1
- package/dist/types/cli/handlers/config-handler.tools-list.test.d.ts +0 -1
- package/dist/types/cli/handlers/files-handler.instructions.test.d.ts +0 -1
- package/dist/types/cli/handlers/media-handler.test.d.ts +0 -1
- package/dist/types/cli/handlers/pet-handler.test.d.ts +0 -1
- package/dist/types/cli/handlers/session-handler.resume.test.d.ts +0 -1
- package/dist/types/cli/handlers/settings-handler.remote-catalog.test.d.ts +0 -1
- package/dist/types/cli/handlers/skills-handler.profile.test.d.ts +0 -1
- package/dist/types/cli/handlers/turn-handler.approval.test.d.ts +0 -1
- package/dist/types/cli/handlers/workflow-handler.events.test.d.ts +0 -1
- package/dist/types/cli/idle-dream-coordinator.test.d.ts +0 -1
- package/dist/types/cli/mcp-plugin-bootstrap.test.d.ts +0 -1
- package/dist/types/cli/media-file-api-service.test.d.ts +0 -1
- package/dist/types/cli/multi-agent-handler-host.test.d.ts +0 -1
- package/dist/types/cli/permission-bootstrap.test.d.ts +0 -1
- package/dist/types/cli/permission-settings-store.test.d.ts +0 -1
- package/dist/types/cli/pet-confirm-coordinator.test.d.ts +0 -1
- package/dist/types/cli/pet-runtime.test.d.ts +0 -1
- package/dist/types/cli/rpc-registry.community.test.d.ts +0 -1
- package/dist/types/cli/session-coordinator.test.d.ts +0 -1
- package/dist/types/cli/session-history-coordinator.test.d.ts +0 -1
- package/dist/types/cli/skill-meta-tool-bootstrap.test.d.ts +0 -1
- package/dist/types/cli/stdio-server.contract.test.d.ts +0 -1
- package/dist/types/cli/tool-bootstrap.instructions.test.d.ts +0 -1
- package/dist/types/cli/tool-bootstrap.media-provider-alias.test.d.ts +0 -1
- package/dist/types/cli/turn-lifecycle.test.d.ts +0 -1
- package/dist/types/cli/turn-media-setup.test.d.ts +0 -1
- package/dist/types/cli/turn-permission-sync.test.d.ts +0 -1
- package/dist/types/cli/turn-project-router.test.d.ts +0 -1
- package/dist/types/cli/turn-skill-autopersist.test.d.ts +0 -1
- package/dist/types/permissions.public-api.test.d.ts +0 -1
- package/dist/types/protocol/wire/gateway-contract.test.d.ts +0 -1
- package/dist/types/runtime/community/community-consent-client.test.d.ts +0 -1
- package/dist/types/runtime/community/community-desensitization-red-team-cli.test.d.ts +0 -1
- package/dist/types/runtime/community/community-desensitization.test.d.ts +0 -1
- package/dist/types/runtime/infra/agent-paths.test.d.ts +0 -1
- package/dist/types/runtime/infra/model-registry.test.d.ts +0 -1
- package/dist/types/runtime/infra/profile-storage.test.d.ts +0 -1
- package/dist/types/runtime/infra/skill-injector.test.d.ts +0 -1
- package/dist/types/runtime/pet/pet-growth-engine.test.d.ts +0 -1
- package/dist/types/runtime/pet/pet-reaction-service.test.d.ts +0 -1
- package/dist/types/runtime/pet/pet-soul-service.test.d.ts +0 -1
- package/dist/types/runtime/prompt/environment-context.test.d.ts +0 -1
- package/dist/types/runtime/prompt/fresh-workspace-evidence.test.d.ts +0 -1
- package/dist/types/runtime/prompt/instruction-loader.test.d.ts +0 -1
- package/dist/types/runtime/session/session-persistence.test.d.ts +0 -1
|
@@ -4,7 +4,7 @@ import type { NotificationMethod, NotificationMethodMap } from "../protocol/noti
|
|
|
4
4
|
import type { AcpPermissionRequestParams } from "../protocol/wire/index.js";
|
|
5
5
|
import type { MemoryPrefetchState } from "../runtime/hooks/memory-hooks.js";
|
|
6
6
|
import type { TaskStore } from "../runtime/infra/task-runtime.js";
|
|
7
|
-
import type { MemoryDreamRuntimeProvider, MemoryHandlerProvider, PermissionMetadataResolver, PermissionRuleEnginePort, ProjectMemoryStore, ToolCatalog } from "../runtime/ports/index.js";
|
|
7
|
+
import type { MemoryDreamRuntimeProvider, MemoryHandlerProvider, PermissionMetadataResolver, PermissionRuleEnginePort, PathService, ProjectMemoryStore, ToolCatalog } from "../runtime/ports/index.js";
|
|
8
8
|
import type { McpManager } from "../skills/mcp/mcp-manager.js";
|
|
9
9
|
import type { PluginLoader } from "../skills/plugins/plugin-loader.js";
|
|
10
10
|
import type { CliAgentClient } from "./cli-agent-builder.js";
|
|
@@ -20,6 +20,7 @@ export interface AgentRuntimeBootstrapDeps {
|
|
|
20
20
|
sessionId: string;
|
|
21
21
|
getTurnId(): string;
|
|
22
22
|
projectRoot: string;
|
|
23
|
+
pathService: PathService;
|
|
23
24
|
memdir: ProjectMemoryStore;
|
|
24
25
|
currentUserId: string;
|
|
25
26
|
memoryPrefetchState: MemoryPrefetchState;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { HookRegistry } from "../contracts/hooks.js";
|
|
2
|
+
import type { MemoryDreamRuntimeProvider, MemoryHandlerProvider, PermissionMetadataResolver } from "../runtime/ports/index.js";
|
|
3
|
+
import type { McpManager } from "../skills/mcp/mcp-manager.js";
|
|
4
|
+
import type { PluginLoader } from "../skills/plugins/plugin-loader.js";
|
|
5
|
+
import type { AgentRuntimeBootstrapResult, FileWatcher } from "./agent-runtime-bootstrap.js";
|
|
6
|
+
export declare class AgentRuntimeSessionState {
|
|
7
|
+
currentHooks: HookRegistry | null;
|
|
8
|
+
mcpManager: McpManager | null;
|
|
9
|
+
mcpReady: Promise<void>;
|
|
10
|
+
pluginLoader: PluginLoader | null;
|
|
11
|
+
permissionChecker: PermissionMetadataResolver | null;
|
|
12
|
+
permissionUnregister: (() => void) | null;
|
|
13
|
+
fileWatcher: FileWatcher | null;
|
|
14
|
+
memoryProvider: MemoryHandlerProvider | null;
|
|
15
|
+
memoryDreamProvider: MemoryDreamRuntimeProvider | null;
|
|
16
|
+
memoryUserId: string;
|
|
17
|
+
getPluginSkills(): ReturnType<PluginLoader["getPluginSkills"]>;
|
|
18
|
+
applyBootstrap(result: AgentRuntimeBootstrapResult): void;
|
|
19
|
+
resetAfterSessionDispose(): void;
|
|
20
|
+
stopFileWatcher(): void;
|
|
21
|
+
disconnectMcp(): Promise<void>;
|
|
22
|
+
unregisterPermissions(): void;
|
|
23
|
+
resetMemoryProviders(): void;
|
|
24
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { NotificationMethod, NotificationMethodMap } from "../protocol/notifications.js";
|
|
2
|
+
import type { ToolBootstrap } from "../runtime/ports/index.js";
|
|
2
3
|
export interface BaseToolBootstrapDeps {
|
|
3
4
|
verbose: boolean;
|
|
5
|
+
toolBootstrap: ToolBootstrap;
|
|
4
6
|
log(message: string): void;
|
|
5
7
|
sendNotification<M extends NotificationMethod>(method: M, params: NotificationMethodMap[M]): void;
|
|
6
8
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AgentLogger, ToolInvoker } from "../agent/types.js";
|
|
2
2
|
import type { HookRegistry } from "../contracts/hooks.js";
|
|
3
|
+
import type { ToolCatalog } from "../runtime/ports/index.js";
|
|
3
4
|
import type { LLMTransport } from "./provider-core-facade.js";
|
|
4
5
|
export interface CliCoreToolHostDeps {
|
|
5
6
|
getAgent(): unknown | null;
|
|
@@ -26,6 +27,8 @@ export interface CliCoreToolCoordinatorDeps {
|
|
|
26
27
|
host: CliCoreToolHostDeps;
|
|
27
28
|
hooks: HookRegistry;
|
|
28
29
|
log: AgentLogger;
|
|
30
|
+
toolCatalog: ToolCatalog;
|
|
29
31
|
toolInvoker: ToolInvoker;
|
|
30
32
|
}
|
|
33
|
+
export declare const coreToolRegistrationModule: import("../runtime/ports/tool-contracts.js").ToolRegistrationModule<CliCoreToolCoordinatorDeps>;
|
|
31
34
|
export declare function configureCliCoreTools(deps: CliCoreToolCoordinatorDeps): void;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { AgentLogger, ToolInvoker } from "../../agent/types.js";
|
|
2
2
|
import type { HookRegistry } from "../../contracts/hooks.js";
|
|
3
|
+
import type { ToolCatalog } from "../../runtime/ports/index.js";
|
|
3
4
|
import { type AgentToolServiceHost } from "./agent-tool-service.js";
|
|
4
5
|
export interface AgentToolRegistrationDeps {
|
|
5
6
|
host: AgentToolServiceHost;
|
|
6
7
|
hooks: HookRegistry;
|
|
7
8
|
log: AgentLogger;
|
|
9
|
+
toolCatalog: ToolCatalog;
|
|
8
10
|
toolInvoker: ToolInvoker;
|
|
9
11
|
}
|
|
10
|
-
export declare function registerAgentTool({ host, hooks, log, toolInvoker }: AgentToolRegistrationDeps): void;
|
|
12
|
+
export declare function registerAgentTool({ host, hooks, log, toolCatalog, toolInvoker }: AgentToolRegistrationDeps): void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AgentLogger, ToolInvoker } from "../../agent/types.js";
|
|
2
2
|
import type { HookRegistry } from "../../contracts/hooks.js";
|
|
3
|
+
import type { ToolCatalog } from "../../runtime/ports/index.js";
|
|
3
4
|
import type { AgentToolDeps } from "../../skills/tools/agent-tool.js";
|
|
4
5
|
import type { LLMTransport } from "../provider-core-facade.js";
|
|
5
6
|
export interface AgentToolServiceHost {
|
|
@@ -13,6 +14,7 @@ export interface AgentToolServiceOptions {
|
|
|
13
14
|
host: AgentToolServiceHost;
|
|
14
15
|
hooks: HookRegistry;
|
|
15
16
|
log: AgentLogger;
|
|
17
|
+
toolCatalog: ToolCatalog;
|
|
16
18
|
toolInvoker: ToolInvoker;
|
|
17
19
|
}
|
|
18
|
-
export declare function createAgentToolService({ host, hooks, log, toolInvoker }: AgentToolServiceOptions): AgentToolDeps;
|
|
20
|
+
export declare function createAgentToolService({ host, hooks, log, toolCatalog, toolInvoker }: AgentToolServiceOptions): AgentToolDeps;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import type { ToolCatalog } from "../../runtime/ports/index.js";
|
|
1
2
|
export interface CheckpointToolRegistrationDeps {
|
|
2
3
|
config: Record<string, unknown>;
|
|
4
|
+
toolCatalog: ToolCatalog;
|
|
3
5
|
host: {
|
|
4
6
|
readonly currentSessionId: string;
|
|
5
7
|
};
|
|
6
8
|
}
|
|
7
|
-
export declare function registerCheckpointTool({ config, host }: CheckpointToolRegistrationDeps): void;
|
|
9
|
+
export declare function registerCheckpointTool({ config, host, toolCatalog }: CheckpointToolRegistrationDeps): void;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import type { ToolCatalog } from "../../runtime/ports/index.js";
|
|
1
2
|
export interface ConfigToolRegistrationDeps {
|
|
3
|
+
toolCatalog: ToolCatalog;
|
|
2
4
|
host: {
|
|
3
5
|
readonly currentModel: string;
|
|
4
6
|
readonly verbose: boolean;
|
|
5
7
|
};
|
|
6
8
|
}
|
|
7
|
-
export declare function registerConfigTool({ host }: ConfigToolRegistrationDeps): void;
|
|
9
|
+
export declare function registerConfigTool({ host, toolCatalog }: ConfigToolRegistrationDeps): void;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import type { ToolCatalog } from "../../runtime/ports/index.js";
|
|
1
2
|
export interface CronToolRegistrationDeps {
|
|
3
|
+
toolCatalog: ToolCatalog;
|
|
2
4
|
host: {
|
|
3
5
|
getActiveProjectRoot(): string;
|
|
4
6
|
};
|
|
5
7
|
}
|
|
6
|
-
export declare function registerCronTool({ host }: CronToolRegistrationDeps): void;
|
|
8
|
+
export declare function registerCronTool({ host, toolCatalog }: CronToolRegistrationDeps): void;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type { ToolCatalog } from "../../runtime/ports/index.js";
|
|
1
2
|
import type { AgentLogger } from "../../agent/types.js";
|
|
2
3
|
export interface MonitorToolRegistrationDeps {
|
|
3
4
|
log: AgentLogger;
|
|
5
|
+
toolCatalog: ToolCatalog;
|
|
4
6
|
}
|
|
5
|
-
export declare function registerMonitorTool({ log }: MonitorToolRegistrationDeps): void;
|
|
7
|
+
export declare function registerMonitorTool({ log, toolCatalog }: MonitorToolRegistrationDeps): void;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import type { ToolCatalog } from "../../runtime/ports/index.js";
|
|
1
2
|
import type { AgentLogger } from "../../agent/types.js";
|
|
2
3
|
import { type TeamToolServiceHost } from "./team-tool-service.js";
|
|
3
4
|
export interface TeamToolRegistrationDeps {
|
|
4
5
|
host: TeamToolServiceHost;
|
|
5
6
|
log: AgentLogger;
|
|
7
|
+
toolCatalog: ToolCatalog;
|
|
6
8
|
}
|
|
7
|
-
export declare function registerTeamTool({ host, log }: TeamToolRegistrationDeps): void;
|
|
9
|
+
export declare function registerTeamTool({ host, log, toolCatalog }: TeamToolRegistrationDeps): void;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import type { ToolCatalog } from "../../runtime/ports/index.js";
|
|
1
2
|
import type { AgentLogger } from "../../agent/types.js";
|
|
2
3
|
export interface UtilityToolRegistrationDeps {
|
|
4
|
+
toolCatalog: ToolCatalog;
|
|
3
5
|
host: {
|
|
4
6
|
readonly currentSessionId: string;
|
|
5
7
|
};
|
|
6
8
|
log: Pick<AgentLogger, "info">;
|
|
7
9
|
}
|
|
8
|
-
export declare function registerUtilityTools({ host, log }: UtilityToolRegistrationDeps): void;
|
|
10
|
+
export declare function registerUtilityTools({ host, log, toolCatalog }: UtilityToolRegistrationDeps): void;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
import type { PathService, ToolCatalog } from "../runtime/ports/index.js";
|
|
1
2
|
export interface DevToolBootstrapDeps {
|
|
2
3
|
config: Record<string, unknown>;
|
|
4
|
+
pathService?: PathService;
|
|
5
|
+
toolCatalog: ToolCatalog;
|
|
3
6
|
}
|
|
7
|
+
export declare const devToolRegistrationModule: import("../runtime/ports/tool-contracts.js").ToolRegistrationModule<DevToolBootstrapDeps>;
|
|
4
8
|
export declare function configureDevToolBootstrap(deps: DevToolBootstrapDeps): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createLspTool } from "../../skills/tools/lsp-tool.js";
|
|
2
|
+
import { createReplTool } from "../../skills/tools/repl-tool.js";
|
|
3
|
+
export interface DevToolRegistryOptions {
|
|
4
|
+
workdir: string;
|
|
5
|
+
}
|
|
6
|
+
export type DevTool = ReturnType<typeof createReplTool> | ReturnType<typeof createLspTool>;
|
|
7
|
+
export declare function buildDevTools(options: DevToolRegistryOptions): DevTool[];
|
|
@@ -10,6 +10,7 @@ export interface DreamHostAdapterDeps {
|
|
|
10
10
|
getCurrentHooks(): DreamHandlerHost["currentHooks"];
|
|
11
11
|
getMemoryProvider(): DreamHandlerHost["memoryProvider"];
|
|
12
12
|
getMemoryUserId(): string;
|
|
13
|
+
getToolCatalog(): DreamHandlerHost["toolCatalog"];
|
|
13
14
|
getVerbose(): boolean;
|
|
14
15
|
log(message: string): void;
|
|
15
16
|
resolveAgent(config: TurnConfig): unknown | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type CommunityConsentClient, type CommunityConsentView } from "../../runtime/community/community-consent-client.js";
|
|
2
2
|
import { type AgentRpcError, type AgentRpcRequest } from "../../protocol/wire/index.js";
|
|
3
|
-
export type { CommunityConsentClient, CommunityConsentView, CommunityInstallRiskTier, CommunityInstallResolution, CommunityListNoticesInput, CommunityNotice, CommunityPublishSkillInput, CommunityRecordSignalInput, CommunityRecordTelemetryInput, CommunitySignalEvent, SetCommunityConsentInput, } from "../../runtime/community/community-consent-client.js";
|
|
3
|
+
export type { CommunityConsentClient, CommunityConsentView, CommunityInstallRiskTier, CommunityInstallResolution, CommunityListNoticesInput, CommunityNotice, CommunityPublishSkillInput, CommunityRecordSignalInput, CommunityRecordTelemetryInput, CommunityRegistryMatchInput, CommunitySignalEvent, SetCommunityConsentInput, } from "../../runtime/community/community-consent-client.js";
|
|
4
4
|
export type { CommunityTelemetryEvent } from "../../runtime/community/community-telemetry-types.js";
|
|
5
5
|
export interface CommunityConsentStore {
|
|
6
6
|
read(): Promise<CommunityConsentView>;
|
|
@@ -14,6 +14,7 @@ export interface CommunityHandlerHost {
|
|
|
14
14
|
export declare function handleCommunityGetConsent(this: CommunityHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
15
15
|
export declare function handleCommunitySetConsent(this: CommunityHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
16
16
|
export declare function handleCommunityListShared(this: CommunityHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
17
|
+
export declare function handleCommunityMatchRegistry(this: CommunityHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
17
18
|
export declare function handleCommunityResolveInstall(this: CommunityHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
18
19
|
export declare function handleCommunityInstallResource(this: CommunityHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
19
20
|
export declare function handleCommunityPublishSkill(this: CommunityHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
@@ -8,8 +8,10 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { type AgentRpcError, type AgentRpcRequest } from "../../protocol/wire/index.js";
|
|
10
10
|
import type { TaskStore } from "../../runtime/infra/task-runtime.js";
|
|
11
|
+
import type { ToolCatalog } from "../../runtime/ports/index.js";
|
|
11
12
|
export interface ConfigHandlerHost {
|
|
12
13
|
taskStore: TaskStore;
|
|
14
|
+
toolCatalog?: ToolCatalog;
|
|
13
15
|
syncToolListMediaConfig?(): void;
|
|
14
16
|
sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
|
|
15
17
|
}
|
|
@@ -6,6 +6,7 @@ import type { TurnConfig } from "../../agent/types.js";
|
|
|
6
6
|
import type { AgentRpcError, AgentRpcRequest } from "../../protocol/wire/index.js";
|
|
7
7
|
import { type DreamRunDeps } from "../../runtime/execution/dream-agent.js";
|
|
8
8
|
import { type DecayCycleDeps } from "../../runtime/execution/memory-decay.js";
|
|
9
|
+
import type { ToolCatalog } from "../../runtime/ports/index.js";
|
|
9
10
|
type DreamMemoryProvider = NonNullable<DreamRunDeps["memoryProvider"]> & DecayCycleDeps["adapter"];
|
|
10
11
|
export interface DreamHandlerHost {
|
|
11
12
|
activeTurn?: AbortController | null;
|
|
@@ -15,6 +16,7 @@ export interface DreamHandlerHost {
|
|
|
15
16
|
currentHooks?: DreamRunDeps["hooks"] | null;
|
|
16
17
|
memoryProvider?: DreamMemoryProvider | null;
|
|
17
18
|
memoryUserId?: string;
|
|
19
|
+
toolCatalog: ToolCatalog;
|
|
18
20
|
verbose?: boolean;
|
|
19
21
|
log(message: string): void;
|
|
20
22
|
resolveAgent(config: TurnConfig): unknown | null;
|
|
@@ -25,6 +25,7 @@ export interface PetHandlerHost {
|
|
|
25
25
|
sessionState?: PetSessionStateLike | null;
|
|
26
26
|
memoryProvider?: PetMemoryProviderLike | null;
|
|
27
27
|
memoryUserId?: string;
|
|
28
|
+
ownerUserId?: string;
|
|
28
29
|
petRuntime: Pick<PetRuntime, "createPetSoulGenerator" | "createSmallLLMCall" | "forgeAnalyzeImage" | "forgeGenerateSkeleton">;
|
|
29
30
|
getActiveProjectRoot(): string;
|
|
30
31
|
sendNotification(method: string, params: Record<string, unknown>): void;
|
|
@@ -1,58 +1,36 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Product mode handlers
|
|
3
|
-
* Handles: product.plan/confirm/message/create/resume/pause/checkpoint/status/list/delete/cancel/rollback
|
|
2
|
+
* Product mode handlers.
|
|
3
|
+
* Handles: product.plan/confirm/message/create/resume/pause/checkpoint/status/list/delete/cancel/rollback.
|
|
4
4
|
*/
|
|
5
|
-
import { AgentProcessManager } from "../../runtime/infra/agent-process.js";
|
|
6
|
-
import type { AgentConfigStore } from "../../runtime/infra/agent-config-store.js";
|
|
7
|
-
import type { AcpDetector } from "../../runtime/infra/acp-detector.js";
|
|
8
|
-
import { ProductOrchestrator } from "../../orchestration/agent-instance.js";
|
|
9
|
-
import { ProductPlanner } from "../../orchestration/product-planner.js";
|
|
10
5
|
import { type AgentRpcError, type AgentRpcRequest } from "../../protocol/wire/index.js";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
agentConfigStore: AgentConfigStore | null;
|
|
14
|
-
productOrchestrator: ProductOrchestrator | null;
|
|
15
|
-
productPlanner: ProductPlanner | null;
|
|
16
|
-
productProcessManager: AgentProcessManager | null;
|
|
17
|
-
emitAgentStatus(agentId: string, state: string, extra?: {
|
|
18
|
-
missedBeats?: number;
|
|
19
|
-
lastActivityAt?: number;
|
|
20
|
-
usage?: {
|
|
21
|
-
inputTokens: number;
|
|
22
|
-
outputTokens: number;
|
|
23
|
-
totalTokens: number;
|
|
24
|
-
};
|
|
25
|
-
}): void;
|
|
26
|
-
getActiveProjectRoot(): string;
|
|
27
|
-
handleMcpToolCall(memberId: string, tool: string, args: Record<string, unknown>): Promise<unknown>;
|
|
28
|
-
sendNotification(method: string, params: Record<string, unknown>): void;
|
|
29
|
-
}
|
|
6
|
+
import { type ProductCoordinatorHost } from "../product-coordinator.js";
|
|
7
|
+
export type { ProductCoordinatorHost } from "../product-coordinator.js";
|
|
30
8
|
export interface ProductHandlerHost extends ProductCoordinatorHost {
|
|
9
|
+
getActiveProjectRoot(): string;
|
|
31
10
|
sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
|
|
32
11
|
}
|
|
33
|
-
export declare function ensureProductOrchestrator(this: ProductCoordinatorHost): ProductOrchestrator;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
/** `product.plan` — Start interactive planning with leader agent. */
|
|
12
|
+
export declare function ensureProductOrchestrator(this: ProductCoordinatorHost): import("../../orchestration/agent-instance.js").ProductOrchestrator;
|
|
13
|
+
export declare function ensureProductPlanner(this: ProductCoordinatorHost): import("../../orchestration/product-planner.js").ProductPlanner;
|
|
14
|
+
/** `product.plan` - Start interactive planning with leader agent. */
|
|
37
15
|
export declare function handleProductPlan(this: ProductHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
38
|
-
/** `product.confirm`
|
|
16
|
+
/** `product.confirm` - User confirms the plan, transition to execution. */
|
|
39
17
|
export declare function handleProductConfirm(this: ProductHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
40
|
-
/** `product.message`
|
|
18
|
+
/** `product.message` - User sends message to leader (multi-turn planning or execution intervention). */
|
|
41
19
|
export declare function handleProductMessage(this: ProductHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
42
|
-
/** `product.create`
|
|
20
|
+
/** `product.create` - Create a new Product Mode session. */
|
|
43
21
|
export declare function handleProductCreate(this: ProductHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
44
|
-
/** `product.resume`
|
|
22
|
+
/** `product.resume` - Resume a paused product. */
|
|
45
23
|
export declare function handleProductResume(this: ProductHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
46
|
-
/** `product.pause`
|
|
24
|
+
/** `product.pause` - Pause a running product. */
|
|
47
25
|
export declare function handleProductPause(this: ProductHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
48
|
-
/** `product.checkpoint`
|
|
26
|
+
/** `product.checkpoint` - Manual checkpoint. */
|
|
49
27
|
export declare function handleProductCheckpoint(this: ProductHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
50
|
-
/** `product.status`
|
|
28
|
+
/** `product.status` - Query product status. */
|
|
51
29
|
export declare function handleProductStatus(this: ProductHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
52
|
-
/** `product.list`
|
|
30
|
+
/** `product.list` - List all products. */
|
|
53
31
|
export declare function handleProductList(this: ProductHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
54
32
|
export declare function handleProductDelete(this: ProductHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
55
|
-
/** `product.cancel`
|
|
33
|
+
/** `product.cancel` - Cancel a running product. */
|
|
56
34
|
export declare function handleProductCancel(this: ProductHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
57
|
-
/** `product.rollback`
|
|
35
|
+
/** `product.rollback` - Rollback a product to a checkpoint. */
|
|
58
36
|
export declare function handleProductRollback(this: ProductHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Turn execution handlers — extracted from StdioServer.
|
|
3
3
|
* Handles: thread.turn, agent.abort, tool.approval.response, thread.user_response
|
|
4
4
|
*/
|
|
5
|
-
import type { PermissionMetadataResolver } from "../../runtime/ports/index.js";
|
|
5
|
+
import type { PermissionMetadataResolver, ToolCatalog } from "../../runtime/ports/index.js";
|
|
6
6
|
import type { ToolDefinition } from "../../agent/types.js";
|
|
7
7
|
import type { AgentRpcRequest } from "../../protocol/wire/agent-rpc.js";
|
|
8
8
|
interface PendingAskUserRequest {
|
|
@@ -11,7 +11,9 @@ interface PendingAskUserRequest {
|
|
|
11
11
|
export interface TurnControlHandlerHost {
|
|
12
12
|
activeTurn: AbortController | null;
|
|
13
13
|
permissionChecker?: PermissionMetadataResolver | null;
|
|
14
|
+
toolCatalog?: ToolCatalog;
|
|
14
15
|
pendingAskUser: Map<string, PendingAskUserRequest>;
|
|
16
|
+
configureTurnMedia?(config: Record<string, unknown> | undefined, turnId: string): void;
|
|
15
17
|
log(message: string): void;
|
|
16
18
|
sendResponse(id: string | number, result?: unknown, error?: unknown): void;
|
|
17
19
|
}
|
|
@@ -12,11 +12,13 @@ import { type AgentRpcError, type AgentRpcRequest } from "../../protocol/wire/in
|
|
|
12
12
|
import { WorkflowController } from "../../orchestration/workflow/workflow-controller.js";
|
|
13
13
|
import { WorkflowStore } from "../../orchestration/workflow/workflow-store.js";
|
|
14
14
|
import { WorkflowScheduler } from "../../orchestration/workflow/workflow-scheduler.js";
|
|
15
|
+
import type { ToolCatalog } from "../../runtime/ports/index.js";
|
|
15
16
|
export interface WorkflowCoordinatorHost {
|
|
16
17
|
acpDetector: AcpDetector;
|
|
17
18
|
getActiveProjectRoot(): string;
|
|
18
19
|
handleMcpToolCall(memberId: string, tool: string, args: Record<string, unknown>): Promise<unknown>;
|
|
19
20
|
sendNotification(method: string, params: Record<string, unknown>): void;
|
|
21
|
+
toolCatalog: ToolCatalog;
|
|
20
22
|
workflowController: WorkflowController | null;
|
|
21
23
|
workflowStore: WorkflowStore | null;
|
|
22
24
|
workflowProcessManager: AgentProcessManager | null;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { McpManager } from "../skills/mcp/mcp-manager.js";
|
|
2
|
+
import type { RuntimeLogger } from "../runtime/hooks/hook-registry.js";
|
|
3
|
+
import type { PathService, ToolCatalog } from "../runtime/ports/index.js";
|
|
4
|
+
export interface McpBootstrapDeps {
|
|
5
|
+
config: Record<string, unknown>;
|
|
6
|
+
projectRoot: string;
|
|
7
|
+
log: RuntimeLogger;
|
|
8
|
+
pathService: PathService;
|
|
9
|
+
toolCatalog: ToolCatalog;
|
|
10
|
+
currentManager: McpManager | null;
|
|
11
|
+
setManager(manager: McpManager | null): void;
|
|
12
|
+
setReady(ready: Promise<void>): void;
|
|
13
|
+
}
|
|
14
|
+
export declare const mcpToolRegistrationModule: import("../runtime/ports/tool-contracts.js").ToolRegistrationModule<McpBootstrapDeps>;
|
|
15
|
+
export declare function configureMcpBootstrap(deps: McpBootstrapDeps): void;
|
|
16
|
+
export declare function buildMcpBootstrapEntries(params: {
|
|
17
|
+
turnMcpConfig?: unknown;
|
|
18
|
+
userMcpConfig?: unknown;
|
|
19
|
+
projectRoot: string;
|
|
20
|
+
}): import("../skills/mcp/mcp-manager.js").McpServerEntry[];
|
|
@@ -1,27 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import type { HookRegistry } from "../contracts/hooks.js";
|
|
4
|
-
import type { RuntimeLogger } from "../runtime/hooks/hook-registry.js";
|
|
5
|
-
import type { ToolCatalog } from "../runtime/ports/index.js";
|
|
6
|
-
export interface McpBootstrapDeps {
|
|
7
|
-
config: Record<string, unknown>;
|
|
8
|
-
projectRoot: string;
|
|
9
|
-
log: RuntimeLogger;
|
|
10
|
-
toolCatalog: ToolCatalog;
|
|
11
|
-
currentManager: McpManager | null;
|
|
12
|
-
setManager(manager: McpManager | null): void;
|
|
13
|
-
setReady(ready: Promise<void>): void;
|
|
14
|
-
}
|
|
15
|
-
export declare function configureMcpBootstrap(deps: McpBootstrapDeps): void;
|
|
16
|
-
export declare function buildMcpBootstrapEntries(params: {
|
|
17
|
-
turnMcpConfig?: unknown;
|
|
18
|
-
userMcpConfig?: unknown;
|
|
19
|
-
projectRoot: string;
|
|
20
|
-
}): import("../skills/mcp/mcp-manager.js").McpServerEntry[];
|
|
21
|
-
export interface PluginBootstrapDeps {
|
|
22
|
-
config: Record<string, unknown>;
|
|
23
|
-
hooks: HookRegistry;
|
|
24
|
-
log: RuntimeLogger;
|
|
25
|
-
setPluginLoader(loader: PluginLoader): void;
|
|
26
|
-
}
|
|
27
|
-
export declare function configurePluginBootstrap(deps: PluginBootstrapDeps): void;
|
|
1
|
+
export { buildMcpBootstrapEntries, configureMcpBootstrap, type McpBootstrapDeps, } from "./mcp-bootstrap.js";
|
|
2
|
+
export { configurePluginBootstrap, type PluginBootstrapDeps, } from "./plugin-bootstrap.js";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type MediaCapability, type MediaClient, type MediaRequest, type MediaResult, type ProviderToolAPI } from "./provider-core-facade.js";
|
|
2
|
+
import type { MediaFileServiceContext } from "./media-file-api-service.js";
|
|
3
|
+
export declare function setProviderToolAPI(api: ProviderToolAPI | undefined): void;
|
|
4
|
+
export declare function getProviderToolAPI(): ProviderToolAPI | undefined;
|
|
5
|
+
export declare function setMediaClientConfig(client: MediaClient | undefined, apiKeys?: Record<string, string>, onMediaUsage?: (model: string, billingUnit: string, quantity: number) => void, providers?: Partial<Record<MediaCapability, {
|
|
6
|
+
provider: string;
|
|
7
|
+
model: string;
|
|
8
|
+
}>>, onMediaProgress?: (taskId: string, mediaType: string, percent: number, status: string, provider?: string) => void): void;
|
|
9
|
+
export declare function getMediaRuntimeContext(): MediaFileServiceContext;
|
|
10
|
+
export declare function generateMedia(request: MediaRequest): Promise<MediaResult>;
|
|
11
|
+
export declare function isMediaAvailable(mediaType: string): boolean;
|
|
12
|
+
export declare function isMediaOperationAvailable(mediaType: string, operation: string): boolean;
|
|
13
|
+
export declare function generateMusicLyrics(prompt: string): Promise<string>;
|
|
14
|
+
export declare function cancelMediaTask(params: {
|
|
15
|
+
taskId: string;
|
|
16
|
+
provider?: string;
|
|
17
|
+
}): Promise<{
|
|
18
|
+
ok: boolean;
|
|
19
|
+
message: string;
|
|
20
|
+
}>;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
interface MemoryLlmClient {
|
|
2
|
+
model: string;
|
|
3
|
+
apiKey: string;
|
|
4
|
+
transport: {
|
|
5
|
+
stream(request: Record<string, unknown>, apiKey: string): AsyncIterable<{
|
|
6
|
+
type: string;
|
|
7
|
+
text?: string;
|
|
8
|
+
}>;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export interface MemoryCandidateHost {
|
|
12
|
+
memoryProvider?: {
|
|
13
|
+
search?(query: string, userId: string, options?: {
|
|
14
|
+
limit?: number;
|
|
15
|
+
minScore?: number;
|
|
16
|
+
}): Promise<Array<{
|
|
17
|
+
blockId: string;
|
|
18
|
+
text: string;
|
|
19
|
+
score?: number;
|
|
20
|
+
metadata?: Record<string, unknown>;
|
|
21
|
+
}>>;
|
|
22
|
+
} | null;
|
|
23
|
+
resolveClientForPurpose?(purpose: "smallModel" | "textGeneration"): MemoryLlmClient | null;
|
|
24
|
+
}
|
|
25
|
+
export interface MemoryAttachment {
|
|
26
|
+
type: string;
|
|
27
|
+
filename: string;
|
|
28
|
+
mimeType: string;
|
|
29
|
+
text: string;
|
|
30
|
+
url: string;
|
|
31
|
+
path: string;
|
|
32
|
+
size?: number;
|
|
33
|
+
}
|
|
34
|
+
export interface RelatedMemoryHit {
|
|
35
|
+
id: string;
|
|
36
|
+
text: string;
|
|
37
|
+
score: number;
|
|
38
|
+
category?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface MemoryCandidate {
|
|
41
|
+
id: string;
|
|
42
|
+
text: string;
|
|
43
|
+
category: string;
|
|
44
|
+
importance: number;
|
|
45
|
+
confidence: number;
|
|
46
|
+
source: string;
|
|
47
|
+
eventDate: string;
|
|
48
|
+
tags: string[];
|
|
49
|
+
relatedMemoryIds: string[];
|
|
50
|
+
evidence: Array<Record<string, unknown>>;
|
|
51
|
+
requiresConfirmation: boolean;
|
|
52
|
+
reason: string;
|
|
53
|
+
}
|
|
54
|
+
export interface MemoryCandidateParams {
|
|
55
|
+
text?: string;
|
|
56
|
+
attachments?: unknown[];
|
|
57
|
+
tags?: unknown;
|
|
58
|
+
category?: unknown;
|
|
59
|
+
importance?: unknown;
|
|
60
|
+
source?: unknown;
|
|
61
|
+
autoExtract?: boolean;
|
|
62
|
+
}
|
|
63
|
+
export declare function normalizeInputCandidate(input: unknown): MemoryCandidate | null;
|
|
64
|
+
export declare function buildMemoryCandidates(ctx: MemoryCandidateHost, params: MemoryCandidateParams, userId: string): Promise<{
|
|
65
|
+
candidates: MemoryCandidate[];
|
|
66
|
+
related: RelatedMemoryHit[];
|
|
67
|
+
source: "llm" | "deterministic";
|
|
68
|
+
}>;
|
|
69
|
+
export declare function buildMemoryCandidateProposal(ctx: MemoryCandidateHost, params: MemoryCandidateParams, userId: string): Promise<{
|
|
70
|
+
candidates: MemoryCandidate[];
|
|
71
|
+
relatedMemories: RelatedMemoryHit[];
|
|
72
|
+
extractor: "llm" | "deterministic";
|
|
73
|
+
}>;
|
|
74
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type MemoryPrefetchState } from "../runtime/hooks/memory-hooks.js";
|
|
2
2
|
import type { HookRegistry } from "../contracts/hooks.js";
|
|
3
3
|
import type { RuntimeLogger } from "../runtime/hooks/hook-registry.js";
|
|
4
|
-
import type { MemoryDreamRuntimeProvider, MemoryHandlerProvider, MemoryLearningSink, MemoryProvider, MemoryRuntimeHookProvider, MemoryToolProvider, ProjectMemoryStore } from "../runtime/ports/index.js";
|
|
4
|
+
import type { MemoryDreamRuntimeProvider, MemoryHandlerProvider, MemoryLearningSink, MemoryProvider, MemoryRuntimeHookProvider, MemoryToolProvider, ProjectMemoryStore, ToolCatalog } from "../runtime/ports/index.js";
|
|
5
5
|
import type { LLMTransport } from "./provider-core-facade.js";
|
|
6
6
|
export interface MemoryProviderState {
|
|
7
7
|
recallProvider: MemoryProvider | null;
|
|
@@ -12,10 +12,9 @@ export interface MemoryProviderState {
|
|
|
12
12
|
dreamProvider: MemoryDreamRuntimeProvider | null;
|
|
13
13
|
userId: string;
|
|
14
14
|
}
|
|
15
|
-
export declare function ensureLocalMemoryProvider(
|
|
15
|
+
export declare function ensureLocalMemoryProvider(currentUserId: string): MemoryProviderState;
|
|
16
16
|
export interface RegisterMemoryRuntimeHooksDeps {
|
|
17
17
|
hooks: HookRegistry;
|
|
18
|
-
projectRoot: string;
|
|
19
18
|
currentUserId: string;
|
|
20
19
|
log: RuntimeLogger;
|
|
21
20
|
prefetchState: MemoryPrefetchState;
|
|
@@ -32,5 +31,6 @@ export interface RegisterMemoryToolDeps {
|
|
|
32
31
|
memdir: ProjectMemoryStore;
|
|
33
32
|
memoryProvider: MemoryToolProvider | null;
|
|
34
33
|
memoryUserId: string;
|
|
34
|
+
toolCatalog: ToolCatalog;
|
|
35
35
|
}
|
|
36
36
|
export declare function registerMemoryTool(deps: RegisterMemoryToolDeps): void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { NotificationMethod, NotificationMethodMap } from "../protocol/notifications.js";
|
|
2
|
+
import type { AcpPermissionRequestParams } from "../protocol/wire/index.js";
|
|
3
|
+
import type { ApprovalRequest, ApprovalResponse } from "../runtime/ports/index.js";
|
|
4
|
+
export interface PermissionApprovalBridgeDeps {
|
|
5
|
+
getAcpPermissionSession(): {
|
|
6
|
+
sessionId: string;
|
|
7
|
+
requestPermission(params: AcpPermissionRequestParams): Promise<{
|
|
8
|
+
optionId?: string;
|
|
9
|
+
}>;
|
|
10
|
+
} | undefined;
|
|
11
|
+
sendNotification<M extends NotificationMethod>(method: M, params: NotificationMethodMap[M]): void;
|
|
12
|
+
isPetActive(): boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare function requestPermissionApproval(request: ApprovalRequest, deps: PermissionApprovalBridgeDeps): Promise<ApprovalResponse>;
|
|
15
|
+
export declare function createApprovalResponseFromAcpOption(request: ApprovalRequest, optionId: string | undefined): ApprovalResponse;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
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
|
-
import type {
|
|
5
|
-
import {
|
|
6
|
-
|
|
4
|
+
import type { ToolCatalog } from "../runtime/ports/index.js";
|
|
5
|
+
import { type RuntimePermissionChecker, type RuntimePermissionRuleEngine } from "./permission-runtime-service.js";
|
|
6
|
+
export { createApprovalResponseFromAcpOption } from "./permission-approval-bridge.js";
|
|
7
7
|
export interface PermissionBootstrapDeps {
|
|
8
8
|
config: Record<string, unknown>;
|
|
9
|
+
toolCatalog: ToolCatalog;
|
|
9
10
|
hooks: HookRegistry;
|
|
10
11
|
log: {
|
|
11
12
|
info(message: string): void;
|
|
@@ -25,9 +26,8 @@ export interface PermissionBootstrapDeps {
|
|
|
25
26
|
currentUnregister?: (() => void) | null;
|
|
26
27
|
}
|
|
27
28
|
export interface PermissionBootstrapResult {
|
|
28
|
-
permissionChecker:
|
|
29
|
+
permissionChecker: RuntimePermissionChecker;
|
|
29
30
|
permissionUnregister: () => void;
|
|
30
|
-
ruleEngine:
|
|
31
|
+
ruleEngine: RuntimePermissionRuleEngine;
|
|
31
32
|
}
|
|
32
33
|
export declare function configurePermissionBootstrap(deps: PermissionBootstrapDeps): PermissionBootstrapResult;
|
|
33
|
-
export declare function createApprovalResponseFromAcpOption(request: ApprovalRequest, optionId: string | undefined): ApprovalResponse;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PermissionChecker } from "../skills/permissions/hook-runner.js";
|
|
2
|
+
import { PermissionRuleEngine } from "../skills/permissions/rule-engine.js";
|
|
3
|
+
import type { PermissionConfig } from "../runtime/ports/index.js";
|
|
4
|
+
import type { PermissionCheckerDeps } from "../skills/permissions/hook-runner.js";
|
|
5
|
+
export type RuntimePermissionChecker = PermissionChecker;
|
|
6
|
+
export type RuntimePermissionRuleEngine = PermissionRuleEngine;
|
|
7
|
+
export declare function parseRuntimePermissionConfig(raw: unknown): PermissionConfig;
|
|
8
|
+
export declare function createRuntimePermissionRuleEngine(raw: unknown): PermissionRuleEngine;
|
|
9
|
+
export declare function createRuntimePermissionChecker(deps: PermissionCheckerDeps): PermissionChecker;
|