qlogicagent 2.24.1 → 2.24.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -324
- package/dist/agent.js +38 -43
- package/dist/cli.js +7 -7
- package/dist/default-project-knowledge/INSTRUCTIONS.md +7 -7
- package/dist/default-project-knowledge/rules/project-workflow.md +6 -6
- package/dist/index.js +265 -1018
- package/dist/orchestration.js +10 -10
- package/dist/types/agent/runtime-vars.d.ts +1 -16
- package/dist/types/agent/tool-loop/compression-pipeline.d.ts +0 -2
- package/dist/types/agent/tool-loop.d.ts +0 -6
- package/dist/types/agent/types.d.ts +3 -22
- package/dist/types/cli/acp-commands.d.ts +4 -5
- package/dist/types/cli/acp-message-router.d.ts +1 -2
- package/dist/types/cli/acp-session-handlers.d.ts +6 -12
- package/dist/types/cli/acp-session-host.d.ts +5 -48
- package/dist/types/cli/adapter-launch-config.d.ts +14 -0
- package/dist/types/cli/agent-runtime-bootstrap.d.ts +2 -23
- package/dist/types/cli/agent-runtime-session-state.d.ts +1 -6
- package/dist/types/cli/base-tool-bootstrap.d.ts +0 -2
- package/dist/types/cli/cli-acp-request-handler.d.ts +3 -5
- package/dist/types/cli/core-tool-coordinator.d.ts +0 -4
- package/dist/types/cli/core-tools/agent-tool-service.d.ts +0 -3
- package/dist/types/cli/core-tools/fork-system-prompt.d.ts +1 -5
- package/dist/types/cli/handlers/files-handler.d.ts +0 -6
- package/dist/types/cli/handlers/turn-handler.d.ts +7 -83
- package/dist/types/cli/main.d.ts +2 -4
- package/dist/types/cli/permission-approval-bridge.d.ts +2 -6
- package/dist/types/cli/permission-bootstrap.d.ts +2 -12
- package/dist/types/cli/plugin-bootstrap.d.ts +2 -4
- package/dist/types/cli/runtime-hook-bootstrap.d.ts +0 -21
- package/dist/types/cli/session-context.d.ts +4 -14
- package/dist/types/cli/session-coordinator.d.ts +1 -9
- package/dist/types/cli/stdio-acp-protocol-coordinator.d.ts +2 -9
- package/dist/types/cli/stdio-acp-request-host.d.ts +3 -15
- package/dist/types/cli/stdio-agent-session-bootstrap.d.ts +3 -23
- package/dist/types/cli/stdio-runtime-bootstrap.d.ts +0 -8
- package/dist/types/cli/stdio-runtime-services.d.ts +2 -13
- package/dist/types/cli/stdio-server.d.ts +6 -128
- package/dist/types/cli/tool-bootstrap.d.ts +4 -8
- package/dist/types/cli/tool-catalog.d.ts +2 -2
- package/dist/types/cli/tool-invoker-factory.d.ts +0 -2
- package/dist/types/cli/tool-registry-adapter.d.ts +3 -7
- package/dist/types/cli/tool-result-processor.d.ts +0 -1
- package/dist/types/cli/turn-core.d.ts +6 -10
- package/dist/types/cli/turn-event-forwarder.d.ts +6 -3
- package/dist/types/cli/turn-lifecycle.d.ts +0 -3
- package/dist/types/cli/turn-project-router.d.ts +0 -7
- package/dist/types/contracts/hooks.d.ts +1 -20
- package/dist/types/contracts/tool-execution-evidence.d.ts +20 -1
- package/dist/types/contracts/turn-event.d.ts +2 -2
- package/dist/types/orchestration/index.d.ts +1 -1
- package/dist/types/protocol/notifications.d.ts +2 -9
- package/dist/types/protocol/wire/acp-protocol.d.ts +12 -186
- package/dist/types/protocol/wire/capability-transport.d.ts +0 -2
- package/dist/types/protocol/wire/index.d.ts +2 -10
- package/dist/types/protocol/wire/notification-payloads.d.ts +4 -989
- package/dist/types/protocol/wire/thread-protocol.d.ts +24 -3
- package/dist/types/runtime/config/tunable-defaults.d.ts +3 -75
- package/dist/types/runtime/execution/forked-agent.d.ts +2 -5
- package/dist/types/runtime/execution/streaming-tool-executor.d.ts +0 -2
- package/dist/types/runtime/execution/tool-result-storage.d.ts +13 -4
- package/dist/types/runtime/infra/agent-paths.d.ts +4 -54
- package/dist/types/runtime/infra/agent-project-projection.d.ts +20 -0
- package/dist/types/runtime/infra/background-tasks.d.ts +3 -3
- package/dist/types/runtime/infra/default-path-service.d.ts +0 -7
- package/dist/types/runtime/infra/llmrouter-catalog.d.ts +1 -1
- package/dist/types/runtime/infra/model-registry.d.ts +6 -9
- package/dist/types/runtime/infra/project-store.d.ts +3 -3
- package/dist/types/runtime/infra/subagent-turn-snapshot.d.ts +54 -7
- package/dist/types/runtime/infra/task-runtime.d.ts +1 -1
- package/dist/types/runtime/ports/agent-runtime-ports.d.ts +1 -3
- package/dist/types/runtime/ports/index.d.ts +0 -4
- package/dist/types/runtime/ports/path-service.d.ts +1 -9
- package/dist/types/runtime/ports/tool-contracts.d.ts +0 -1
- package/dist/types/runtime/session/agent-session-projection.d.ts +37 -0
- package/dist/types/runtime/tasks/task-types.d.ts +2 -25
- package/dist/types/skills/mcp/mcp-manager.d.ts +2 -2
- package/dist/types/skills/plugins/plugin-loader.d.ts +1 -1
- package/dist/types/skills/skill-system/skill-category.d.ts +4 -2
- package/dist/types/skills/tools.d.ts +1 -18
- package/dist/types/test-support/project-store-fixture.d.ts +4 -4
- package/dist/types/transport/acp-event-emitter.d.ts +1 -20
- package/dist/types/transport/acp-server.d.ts +8 -88
- package/package.json +4 -96
- package/dist/agent-contract.js +0 -1
- package/dist/host-contract.js +0 -1
- package/dist/host-session-collection-contract.js +0 -1
- package/dist/memory-category-contract.js +0 -1
- package/dist/permissions.js +0 -1
- package/dist/plugin-marketplace-compute.js +0 -1
- package/dist/project-memory-host.js +0 -38
- package/dist/protocol.js +0 -1
- package/dist/skill-category-contract.js +0 -1
- package/dist/tunables.js +0 -1
- package/dist/types/agent/memory-recall-context.d.ts +0 -22
- package/dist/types/agent/memory-recall-injection.d.ts +0 -32
- package/dist/types/cli/acp-extended-handlers.d.ts +0 -110
- package/dist/types/cli/acp-extended-host-adapter.d.ts +0 -20
- package/dist/types/cli/community-resource-installer.d.ts +0 -39
- package/dist/types/cli/community-skill-installer.d.ts +0 -18
- package/dist/types/cli/community-workflow-installer.d.ts +0 -29
- package/dist/types/cli/default-project-bootstrap.d.ts +0 -12
- package/dist/types/cli/dream-host-adapter.d.ts +0 -24
- package/dist/types/cli/gateway-rpc-connection.d.ts +0 -50
- package/dist/types/cli/handlers/community-handler.d.ts +0 -14
- package/dist/types/cli/handlers/config-handler.d.ts +0 -19
- package/dist/types/cli/handlers/control-handler.d.ts +0 -29
- package/dist/types/cli/handlers/dream-handler.d.ts +0 -41
- package/dist/types/cli/handlers/goal-handler.d.ts +0 -66
- package/dist/types/cli/handlers/memory-handler.d.ts +0 -23
- package/dist/types/cli/handlers/product-handler.d.ts +0 -35
- package/dist/types/cli/handlers/session-handler.d.ts +0 -29
- package/dist/types/cli/handlers/skill-curator-handler.d.ts +0 -8
- package/dist/types/cli/handlers/solo-handler.d.ts +0 -25
- package/dist/types/cli/handlers/turn-baseline-handler.d.ts +0 -8
- package/dist/types/cli/handlers/workflow-compute-handler.d.ts +0 -8
- package/dist/types/cli/handlers/working-materials-handler.d.ts +0 -9
- package/dist/types/cli/idle-dream-coordinator.d.ts +0 -57
- package/dist/types/cli/memory-background-coordinator.d.ts +0 -26
- package/dist/types/cli/memory-candidate-service.d.ts +0 -75
- package/dist/types/cli/memory-coordinator.d.ts +0 -40
- package/dist/types/cli/multi-agent-handler-host.d.ts +0 -16
- package/dist/types/cli/multi-agent-state-coordinator.d.ts +0 -8
- package/dist/types/cli/orchestration-memory-context.d.ts +0 -23
- package/dist/types/cli/product-acp-params.d.ts +0 -30
- package/dist/types/cli/product-coordinator.d.ts +0 -21
- package/dist/types/cli/project-memory-store-factory.d.ts +0 -12
- package/dist/types/cli/project-template-seeder.d.ts +0 -5
- package/dist/types/cli/rpc-registry.d.ts +0 -56
- package/dist/types/cli/session-history-coordinator.d.ts +0 -8
- package/dist/types/cli/session-query-service.d.ts +0 -27
- package/dist/types/cli/stdio-rpc-handler-hosts.d.ts +0 -56
- package/dist/types/cli/stdio-session-runtime-coordinator.d.ts +0 -17
- package/dist/types/cli/task-distillation-coordinator.d.ts +0 -146
- package/dist/types/cli/turn-ask-user-setup.d.ts +0 -24
- package/dist/types/cli/turn-suggestion-generator.d.ts +0 -15
- package/dist/types/contracts/memory-recall-packet.d.ts +0 -31
- package/dist/types/contracts/memory-response-contract.d.ts +0 -2
- package/dist/types/host-contract/fts-segment.d.ts +0 -20
- package/dist/types/host-contract/index.d.ts +0 -1819
- package/dist/types/host-contract/memory-category.d.ts +0 -8
- package/dist/types/host-contract/skill-category.d.ts +0 -5
- package/dist/types/host-session-collection-contract.d.ts +0 -65
- package/dist/types/orchestration/agent-instance.d.ts +0 -215
- package/dist/types/orchestration/agent-roster.d.ts +0 -32
- package/dist/types/orchestration/dag-scheduler.d.ts +0 -219
- package/dist/types/orchestration/delegate-approval-policy.d.ts +0 -8
- package/dist/types/orchestration/delegate-bridge.d.ts +0 -8
- package/dist/types/orchestration/goal-acceptance.d.ts +0 -17
- package/dist/types/orchestration/goal-context-envelope.d.ts +0 -7
- package/dist/types/orchestration/goal-loop-coordinator.d.ts +0 -151
- package/dist/types/orchestration/goal-mode-adapters.d.ts +0 -152
- package/dist/types/orchestration/goal-run-persistence.d.ts +0 -21
- package/dist/types/orchestration/goal-run-types.d.ts +0 -225
- package/dist/types/orchestration/planner-memory-brief.d.ts +0 -39
- package/dist/types/orchestration/product-budget.d.ts +0 -94
- package/dist/types/orchestration/product-checkpoint.d.ts +0 -50
- package/dist/types/orchestration/product-dag-mutation-applier.d.ts +0 -10
- package/dist/types/orchestration/product-persistence.d.ts +0 -90
- package/dist/types/orchestration/product-planner.d.ts +0 -332
- package/dist/types/orchestration/product-run-coordinator.d.ts +0 -49
- package/dist/types/orchestration/product-worktree.d.ts +0 -19
- package/dist/types/orchestration/run-state-host-authority.d.ts +0 -7
- package/dist/types/orchestration/solo-evaluator.d.ts +0 -179
- package/dist/types/orchestration/solo-persistence.d.ts +0 -47
- package/dist/types/orchestration/solo-spec-builder.d.ts +0 -58
- package/dist/types/orchestration/testing/delegate-test-bridge.d.ts +0 -23
- package/dist/types/orchestration/testing/host-agent-provider-directory-fixture.d.ts +0 -7
- package/dist/types/orchestration/testing/run-state-client-double.d.ts +0 -13
- package/dist/types/orchestration/workflow/budget-permission-gate.d.ts +0 -94
- package/dist/types/orchestration/workflow/builtin-capabilities.d.ts +0 -3
- package/dist/types/orchestration/workflow/builtin-executors.d.ts +0 -18
- package/dist/types/orchestration/workflow/capability-catalog.d.ts +0 -72
- package/dist/types/orchestration/workflow/cron-schedule.d.ts +0 -36
- package/dist/types/orchestration/workflow/data-item.d.ts +0 -39
- package/dist/types/orchestration/workflow/expression.d.ts +0 -60
- package/dist/types/orchestration/workflow/host-executors.d.ts +0 -15
- package/dist/types/orchestration/workflow/n8n-expression.d.ts +0 -48
- package/dist/types/orchestration/workflow/n8n-import.d.ts +0 -64
- package/dist/types/orchestration/workflow/n8n-template-compat.d.ts +0 -5
- package/dist/types/orchestration/workflow/node-registry.d.ts +0 -32
- package/dist/types/orchestration/workflow/node-schema.d.ts +0 -249
- package/dist/types/orchestration/workflow/params-schema.d.ts +0 -69
- package/dist/types/orchestration/workflow/qla-executor-host.d.ts +0 -63
- package/dist/types/orchestration/workflow/run-checkpoint-store.d.ts +0 -53
- package/dist/types/orchestration/workflow/run-history-store.d.ts +0 -103
- package/dist/types/orchestration/workflow/semantic-acceptance.d.ts +0 -65
- package/dist/types/orchestration/workflow/trigger-validation.d.ts +0 -22
- package/dist/types/orchestration/workflow/workflow-audit-store.d.ts +0 -31
- package/dist/types/orchestration/workflow/workflow-authoring.d.ts +0 -74
- package/dist/types/orchestration/workflow/workflow-bundle.d.ts +0 -51
- package/dist/types/orchestration/workflow/workflow-controller.d.ts +0 -237
- package/dist/types/orchestration/workflow/workflow-edit-context.d.ts +0 -46
- package/dist/types/orchestration/workflow/workflow-error.d.ts +0 -28
- package/dist/types/orchestration/workflow/workflow-intent-contract.d.ts +0 -56
- package/dist/types/orchestration/workflow/workflow-patch.d.ts +0 -122
- package/dist/types/orchestration/workflow/workflow-render.d.ts +0 -40
- package/dist/types/orchestration/workflow/workflow-runtime.d.ts +0 -184
- package/dist/types/orchestration/workflow/workflow-scheduler.d.ts +0 -122
- package/dist/types/orchestration/workflow/workflow-store.d.ts +0 -85
- package/dist/types/orchestration/workflow/workflow-template-setup.d.ts +0 -65
- package/dist/types/orchestration/workflow/workflow-trigger.d.ts +0 -43
- package/dist/types/orchestration/workflow-chat-builder.d.ts +0 -152
- package/dist/types/orchestration/worktree-task-prompt.d.ts +0 -1
- package/dist/types/permissions.d.ts +0 -4
- package/dist/types/project-memory-host.d.ts +0 -4
- package/dist/types/protocol/agent-contract.d.ts +0 -93
- package/dist/types/protocol/methods.d.ts +0 -645
- package/dist/types/protocol/wire/acp-agent-management.d.ts +0 -533
- package/dist/types/protocol/wire/agent-events.d.ts +0 -1
- package/dist/types/protocol/wire/agent-methods.d.ts +0 -500
- package/dist/types/protocol/wire/agent-rpc.d.ts +0 -100
- package/dist/types/protocol/wire/gateway-contract.d.ts +0 -61
- package/dist/types/protocol/wire/gateway-rpc.d.ts +0 -1177
- package/dist/types/protocol/wire/memory-provider-lifecycle.d.ts +0 -31
- package/dist/types/protocol/wire/turn.d.ts +0 -208
- package/dist/types/runtime/community/autonomy-budget.d.ts +0 -26
- package/dist/types/runtime/community/community-consent-client.d.ts +0 -55
- package/dist/types/runtime/community/package-materialize.d.ts +0 -19
- package/dist/types/runtime/community/ranged-download.d.ts +0 -21
- package/dist/types/runtime/community/registry-signature.d.ts +0 -48
- package/dist/types/runtime/execution/dream-agent.d.ts +0 -273
- package/dist/types/runtime/execution/dream-category-context.d.ts +0 -47
- package/dist/types/runtime/execution/memory-decay.d.ts +0 -73
- package/dist/types/runtime/execution/turn-progress-notifier.d.ts +0 -16
- package/dist/types/runtime/hooks/memory-hooks.d.ts +0 -111
- package/dist/types/runtime/infra/acp-host-handler.d.ts +0 -31
- package/dist/types/runtime/infra/acp-protocol-adapter.d.ts +0 -209
- package/dist/types/runtime/infra/acp-usage-tracker.d.ts +0 -46
- package/dist/types/runtime/infra/cloud-auth-host-authority.d.ts +0 -4
- package/dist/types/runtime/infra/feedback-distillation-worker.d.ts +0 -20
- package/dist/types/runtime/infra/feedback-distillation.d.ts +0 -32
- package/dist/types/runtime/infra/feedback-event-store.d.ts +0 -179
- package/dist/types/runtime/infra/feedback-host-authority.d.ts +0 -4
- package/dist/types/runtime/infra/feedback-outbox.d.ts +0 -26
- package/dist/types/runtime/infra/feedback-redaction.d.ts +0 -71
- package/dist/types/runtime/infra/feedback-upload-client.d.ts +0 -39
- package/dist/types/runtime/infra/feedback-upload-worker.d.ts +0 -11
- package/dist/types/runtime/infra/host-agent-provider-directory.d.ts +0 -17
- package/dist/types/runtime/infra/project-authority-facade.d.ts +0 -11
- package/dist/types/runtime/infra/project-data-paths.d.ts +0 -24
- package/dist/types/runtime/infra/project-host-authority.d.ts +0 -11
- package/dist/types/runtime/infra/project-instructions-store.d.ts +0 -30
- package/dist/types/runtime/infra/turn-baseline-store.d.ts +0 -102
- package/dist/types/runtime/infra/turn-telemetry-store.d.ts +0 -100
- package/dist/types/runtime/infra/working-materials-store.d.ts +0 -29
- package/dist/types/runtime/memory/find-relevant-memories.d.ts +0 -26
- package/dist/types/runtime/memory/implicit-extraction.d.ts +0 -69
- package/dist/types/runtime/memory/memory-recall-attribution.d.ts +0 -24
- package/dist/types/runtime/ports/memory-provider.d.ts +0 -219
- package/dist/types/runtime/ports/memory-recall-source.d.ts +0 -14
- package/dist/types/runtime/ports/memory-writer.d.ts +0 -70
- package/dist/types/runtime/ports/project-memory-store.d.ts +0 -49
- package/dist/types/runtime/prompt/host-skill-directory.d.ts +0 -16
- package/dist/types/runtime/session/group-session-split.d.ts +0 -38
- package/dist/types/runtime/session/inbound-upload-persistence.d.ts +0 -47
- package/dist/types/runtime/session/session-catalog.d.ts +0 -12
- package/dist/types/runtime/session/session-deletion-guard.d.ts +0 -4
- package/dist/types/runtime/session/session-locator.d.ts +0 -26
- package/dist/types/runtime/session/session-metadata-store.d.ts +0 -8
- package/dist/types/runtime/session/session-paths.d.ts +0 -8
- package/dist/types/runtime/session/session-permission-store.d.ts +0 -6
- package/dist/types/runtime/session/session-persistence.d.ts +0 -37
- package/dist/types/runtime/session/session-recovery.d.ts +0 -62
- package/dist/types/runtime/session/session-resource-key.d.ts +0 -28
- package/dist/types/runtime/session/session-resume.d.ts +0 -9
- package/dist/types/runtime/session/session-schema.d.ts +0 -10
- package/dist/types/runtime/session/session-summary.d.ts +0 -7
- package/dist/types/runtime/session/session-title.d.ts +0 -9
- package/dist/types/runtime/session/session-transcript-store.d.ts +0 -30
- package/dist/types/runtime/session/session-types.d.ts +0 -113
- package/dist/types/runtime/session/session-write-queue.d.ts +0 -3
- package/dist/types/skills/memory/host-memory-provider.d.ts +0 -235
- package/dist/types/skills/memory/memdir.d.ts +0 -111
- package/dist/types/skills/memory/memory-content-safety.d.ts +0 -1
- package/dist/types/skills/memory/memory-vector-utils.d.ts +0 -2
- package/dist/types/skills/memory/task-distillation.d.ts +0 -183
- package/dist/types/skills/plugins/plugin-marketplace.d.ts +0 -43
- package/dist/types/skills/skill-system/skill-bundles.d.ts +0 -8
- package/dist/types/skills/skill-system/skill-lifecycle.d.ts +0 -89
- package/dist/types/test-support/run-state-authority-setup.d.ts +0 -1
- package/dist/types/transport/delegate-client.d.ts +0 -82
- package/dist/types/transport/host-capability-client.d.ts +0 -21
- package/dist/types/transport/host-cloud-auth-client.d.ts +0 -10
- package/dist/types/transport/host-community-client.d.ts +0 -7
- package/dist/types/transport/host-feedback-client.d.ts +0 -25
- package/dist/types/transport/host-profile-client.d.ts +0 -19
- package/dist/types/transport/host-project-client.d.ts +0 -16
- package/dist/types/transport/host-request-client.d.ts +0 -42
- package/dist/types/transport/host-run-state-client.d.ts +0 -23
- package/dist/types/transport/host-session-client.d.ts +0 -30
- package/dist/types/tunables.d.ts +0 -2
- package/dist/types/workflow-host.d.ts +0 -38
- package/dist/workflow-host.js +0 -11
- /package/dist/types/{host-contract → protocol/wire}/acp-content.d.ts +0 -0
- /package/dist/types/{host-contract → runtime/infra}/project-id.d.ts +0 -0
- /package/dist/types/{host-contract → runtime/infra}/provider-profile.d.ts +0 -0
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { AgentExecutionRefs } from "./transport.js";
|
|
2
|
-
export declare const MEMORY_OBSERVATION_HOOK_VALUES: readonly ["prefetch", "sync_turn", "on_pre_compress", "on_session_end", "on_delegation", "on_memory_write"];
|
|
3
|
-
export type MemoryObservationHook = (typeof MEMORY_OBSERVATION_HOOK_VALUES)[number];
|
|
4
|
-
export declare const MEMORY_OBSERVATION_SOURCE_VALUES: readonly ["turn", "sidechain", "compress", "session-end", "agent-remember", "auto-extract", "implicit-extract", "profile-extraction", "dream"];
|
|
5
|
-
export type MemoryObservationSource = (typeof MEMORY_OBSERVATION_SOURCE_VALUES)[number];
|
|
6
|
-
export declare const MEMORY_WRITE_ACCESS_VALUES: readonly ["observe-only", "parent-write", "deny"];
|
|
7
|
-
export type MemoryWriteAccess = (typeof MEMORY_WRITE_ACCESS_VALUES)[number];
|
|
8
|
-
export interface MemoryContextBlock {
|
|
9
|
-
id?: string;
|
|
10
|
-
providerId: string;
|
|
11
|
-
kind: "informational-background";
|
|
12
|
-
title?: string;
|
|
13
|
-
text: string;
|
|
14
|
-
citations?: string[];
|
|
15
|
-
}
|
|
16
|
-
export interface MemoryObservationEnvelope extends AgentExecutionRefs {
|
|
17
|
-
sessionId: string;
|
|
18
|
-
turnId?: string;
|
|
19
|
-
hook: MemoryObservationHook;
|
|
20
|
-
source: MemoryObservationSource;
|
|
21
|
-
writeAccess: MemoryWriteAccess;
|
|
22
|
-
summary?: string;
|
|
23
|
-
metadata?: Record<string, unknown>;
|
|
24
|
-
}
|
|
25
|
-
export interface MemoryObservedPayload extends MemoryObservationEnvelope {
|
|
26
|
-
providerId: string;
|
|
27
|
-
observedAtMs: number;
|
|
28
|
-
status: "observed" | "failed";
|
|
29
|
-
blocks?: MemoryContextBlock[];
|
|
30
|
-
error?: string;
|
|
31
|
-
}
|
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
import type { AgentExecutionRefs, TransportResponsePayload, TransportUsageInfo, TransportBillingInfo } from "./transport.js";
|
|
2
|
-
import type { ModelSelectionReason } from "./session.js";
|
|
3
|
-
import type { TransportCapabilitySummaryContract, TransportApprovalRequiredToolHintEntry, TransportToolEligibilitySummaryEntry, ToolExecutionStepContext, ToolInvokeApprovalDescriptor, AgentTurnConversation, AgentTurnExperience, AgentTurnRequestSpec, AgentTurnLocalContext, AgentTurnClientHints } from "./capability-transport.js";
|
|
4
|
-
export interface AgentTurnStartPayload extends AgentExecutionRefs {
|
|
5
|
-
sessionId: string;
|
|
6
|
-
turnId: string;
|
|
7
|
-
deviceId?: string;
|
|
8
|
-
principalId?: string;
|
|
9
|
-
entitlementId?: string;
|
|
10
|
-
subscriptionKey?: string;
|
|
11
|
-
conversation: AgentTurnConversation;
|
|
12
|
-
experience?: AgentTurnExperience;
|
|
13
|
-
request?: AgentTurnRequestSpec;
|
|
14
|
-
localContext?: AgentTurnLocalContext;
|
|
15
|
-
clientHints?: AgentTurnClientHints;
|
|
16
|
-
}
|
|
17
|
-
export interface AgentTurnStartMsg extends AgentTurnStartPayload {
|
|
18
|
-
type: "agent.turn.start";
|
|
19
|
-
id: string;
|
|
20
|
-
}
|
|
21
|
-
export interface AgentTurnThinkingPayload extends AgentExecutionRefs {
|
|
22
|
-
sessionId: string;
|
|
23
|
-
turnId: string;
|
|
24
|
-
stage?: "routing" | "execution" | "tool-wait";
|
|
25
|
-
message?: string;
|
|
26
|
-
}
|
|
27
|
-
export interface AgentTurnThinkingMsg {
|
|
28
|
-
type: "agent.turn.thinking";
|
|
29
|
-
id: string;
|
|
30
|
-
payload: AgentTurnThinkingPayload;
|
|
31
|
-
}
|
|
32
|
-
export interface AgentTurnDeltaPayload extends AgentExecutionRefs {
|
|
33
|
-
sessionId: string;
|
|
34
|
-
turnId: string;
|
|
35
|
-
chunk: string;
|
|
36
|
-
}
|
|
37
|
-
export interface AgentTurnDeltaMsg {
|
|
38
|
-
type: "agent.turn.delta";
|
|
39
|
-
id: string;
|
|
40
|
-
payload: AgentTurnDeltaPayload;
|
|
41
|
-
}
|
|
42
|
-
export interface AgentTurnToolPlannedPayload extends AgentExecutionRefs {
|
|
43
|
-
sessionId: string;
|
|
44
|
-
turnId: string;
|
|
45
|
-
callId: string;
|
|
46
|
-
toolName: string;
|
|
47
|
-
arguments?: Record<string, unknown>;
|
|
48
|
-
approvalMode?: "user-confirm" | "pre-authorized";
|
|
49
|
-
}
|
|
50
|
-
export interface AgentTurnToolPlannedMsg {
|
|
51
|
-
type: "agent.turn.tool-planned";
|
|
52
|
-
id: string;
|
|
53
|
-
payload: AgentTurnToolPlannedPayload;
|
|
54
|
-
}
|
|
55
|
-
export interface AgentTurnToolRunningPayload extends AgentExecutionRefs {
|
|
56
|
-
sessionId: string;
|
|
57
|
-
turnId: string;
|
|
58
|
-
callId: string;
|
|
59
|
-
toolName: string;
|
|
60
|
-
}
|
|
61
|
-
export interface AgentTurnToolRunningMsg {
|
|
62
|
-
type: "agent.turn.tool-running";
|
|
63
|
-
id: string;
|
|
64
|
-
payload: AgentTurnToolRunningPayload;
|
|
65
|
-
}
|
|
66
|
-
export interface AgentTurnCompletedPayload extends AgentExecutionRefs {
|
|
67
|
-
sessionId: string;
|
|
68
|
-
turnId: string;
|
|
69
|
-
outcomeId: string;
|
|
70
|
-
resolvedModel?: string;
|
|
71
|
-
modelSelectionReason?: ModelSelectionReason;
|
|
72
|
-
capabilitySummary?: TransportCapabilitySummaryContract;
|
|
73
|
-
approvalRequiredToolHint?: TransportApprovalRequiredToolHintEntry[];
|
|
74
|
-
eligibleToolSummary?: TransportToolEligibilitySummaryEntry[];
|
|
75
|
-
ineligibleToolSummary?: TransportToolEligibilitySummaryEntry[];
|
|
76
|
-
response?: TransportResponsePayload;
|
|
77
|
-
usage?: TransportUsageInfo;
|
|
78
|
-
billed?: TransportBillingInfo | null;
|
|
79
|
-
}
|
|
80
|
-
export interface AgentTurnCompletedMsg {
|
|
81
|
-
type: "agent.turn.completed";
|
|
82
|
-
id: string;
|
|
83
|
-
payload: AgentTurnCompletedPayload;
|
|
84
|
-
}
|
|
85
|
-
export interface BillingRecordedPayload extends AgentExecutionRefs {
|
|
86
|
-
sessionId: string;
|
|
87
|
-
turnId: string;
|
|
88
|
-
outcomeId: string;
|
|
89
|
-
billed: TransportBillingInfo;
|
|
90
|
-
}
|
|
91
|
-
export interface BillingRecordedMsg {
|
|
92
|
-
type: "billing.recorded";
|
|
93
|
-
id: string;
|
|
94
|
-
payload: BillingRecordedPayload;
|
|
95
|
-
}
|
|
96
|
-
export interface AgentTurnFailedPayload extends AgentExecutionRefs {
|
|
97
|
-
sessionId: string;
|
|
98
|
-
turnId: string;
|
|
99
|
-
outcomeId: string;
|
|
100
|
-
code: string;
|
|
101
|
-
error: string;
|
|
102
|
-
retryable: boolean;
|
|
103
|
-
}
|
|
104
|
-
export interface AgentTurnFailedMsg {
|
|
105
|
-
type: "agent.turn.failed";
|
|
106
|
-
id: string;
|
|
107
|
-
payload: AgentTurnFailedPayload;
|
|
108
|
-
}
|
|
109
|
-
export interface ToolInvokePlannedPayload extends AgentExecutionRefs, ToolExecutionStepContext {
|
|
110
|
-
sessionId: string;
|
|
111
|
-
turnId: string;
|
|
112
|
-
callId: string;
|
|
113
|
-
toolName: string;
|
|
114
|
-
arguments?: Record<string, unknown>;
|
|
115
|
-
approvalMode?: "user-confirm" | "pre-authorized";
|
|
116
|
-
}
|
|
117
|
-
export interface ToolInvokePlannedMsg {
|
|
118
|
-
type: "tool.invoke.planned";
|
|
119
|
-
id: string;
|
|
120
|
-
payload: ToolInvokePlannedPayload;
|
|
121
|
-
}
|
|
122
|
-
export interface ToolInvokeStartedPayload extends AgentExecutionRefs, ToolExecutionStepContext {
|
|
123
|
-
sessionId: string;
|
|
124
|
-
turnId: string;
|
|
125
|
-
callId: string;
|
|
126
|
-
toolName: string;
|
|
127
|
-
}
|
|
128
|
-
export interface ToolInvokeStartedMsg {
|
|
129
|
-
type: "tool.invoke.started";
|
|
130
|
-
id: string;
|
|
131
|
-
payload: ToolInvokeStartedPayload;
|
|
132
|
-
}
|
|
133
|
-
export interface ToolInvokeRequestPayload extends AgentExecutionRefs, ToolExecutionStepContext {
|
|
134
|
-
sessionId: string;
|
|
135
|
-
turnId: string;
|
|
136
|
-
callId: string;
|
|
137
|
-
tool: {
|
|
138
|
-
name: string;
|
|
139
|
-
arguments: Record<string, unknown>;
|
|
140
|
-
};
|
|
141
|
-
approval?: ToolInvokeApprovalDescriptor;
|
|
142
|
-
}
|
|
143
|
-
export interface ToolInvokeRequestMsg {
|
|
144
|
-
type: "tool.invoke.request";
|
|
145
|
-
id: string;
|
|
146
|
-
payload: ToolInvokeRequestPayload;
|
|
147
|
-
}
|
|
148
|
-
export interface ToolInvokeResultPayload extends AgentExecutionRefs, ToolExecutionStepContext {
|
|
149
|
-
sessionId: string;
|
|
150
|
-
turnId: string;
|
|
151
|
-
callId: string;
|
|
152
|
-
outcomeId: string;
|
|
153
|
-
ok: boolean;
|
|
154
|
-
payload?: unknown;
|
|
155
|
-
error?: string;
|
|
156
|
-
}
|
|
157
|
-
export interface ToolInvokeResultMsg {
|
|
158
|
-
type: "tool.invoke.result";
|
|
159
|
-
id: string;
|
|
160
|
-
payload: ToolInvokeResultPayload;
|
|
161
|
-
}
|
|
162
|
-
export type LocalExecutionEnvelopeKind = "started" | "partial" | "checkpoint" | "artifact" | "final" | "error";
|
|
163
|
-
export type LocalExecutionEnvelopeStage = "turn" | "tool" | "checkpoint" | "artifact" | "control" | "memory";
|
|
164
|
-
export interface LocalExecutionEnvelopePayload extends AgentExecutionRefs, ToolExecutionStepContext {
|
|
165
|
-
sessionId: string;
|
|
166
|
-
turnId?: string;
|
|
167
|
-
kind: LocalExecutionEnvelopeKind;
|
|
168
|
-
stage: LocalExecutionEnvelopeStage;
|
|
169
|
-
eventType: string;
|
|
170
|
-
emittedAtMs: number;
|
|
171
|
-
callId?: string;
|
|
172
|
-
approvalId?: string;
|
|
173
|
-
checkpointId?: string;
|
|
174
|
-
restoreId?: string;
|
|
175
|
-
summary?: string;
|
|
176
|
-
data?: Record<string, unknown>;
|
|
177
|
-
}
|
|
178
|
-
export interface LocalExecutionEnvelopeMsg {
|
|
179
|
-
type: "local.execution.envelope";
|
|
180
|
-
id: string;
|
|
181
|
-
payload: LocalExecutionEnvelopePayload;
|
|
182
|
-
}
|
|
183
|
-
export interface AgentSkillCreatePayload {
|
|
184
|
-
sessionId: string;
|
|
185
|
-
turnId: string;
|
|
186
|
-
executionId?: string;
|
|
187
|
-
suggestedName: string;
|
|
188
|
-
description: string;
|
|
189
|
-
tools: string[];
|
|
190
|
-
stepCount: number;
|
|
191
|
-
}
|
|
192
|
-
export interface AgentSkillCreateMsg {
|
|
193
|
-
type: "agent.skill.create";
|
|
194
|
-
id: string;
|
|
195
|
-
payload: AgentSkillCreatePayload;
|
|
196
|
-
}
|
|
197
|
-
export interface AgentSkillImprovePayload {
|
|
198
|
-
sessionId: string;
|
|
199
|
-
turnId: string;
|
|
200
|
-
executionId?: string;
|
|
201
|
-
skillName: string;
|
|
202
|
-
reason: string;
|
|
203
|
-
}
|
|
204
|
-
export interface AgentSkillImproveMsg {
|
|
205
|
-
type: "agent.skill.improve";
|
|
206
|
-
id: string;
|
|
207
|
-
payload: AgentSkillImprovePayload;
|
|
208
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export type AcquisitionRiskTier = "R0" | "R1" | "R2" | "R3";
|
|
2
|
-
export type AcquisitionSourceTier = "official" | "community";
|
|
3
|
-
export type AcquisitionMode = "silent" | "ask" | "high-risk-ask";
|
|
4
|
-
export interface AutonomyBudgetConfig {
|
|
5
|
-
/** 自治预算总开关。默认 ON(DR6);OFF → 一律问人。 */
|
|
6
|
-
enabled: boolean;
|
|
7
|
-
}
|
|
8
|
-
/** 默认配置:开箱即默认开(DR6 安装自治默认 ON;仅管本地取 R0/低风险 inert)。 */
|
|
9
|
-
export declare const DEFAULT_AUTONOMY_BUDGET: AutonomyBudgetConfig;
|
|
10
|
-
export interface AcquisitionContext {
|
|
11
|
-
effectiveRiskTier: AcquisitionRiskTier;
|
|
12
|
-
sourceTier: AcquisitionSourceTier;
|
|
13
|
-
}
|
|
14
|
-
export interface AcquisitionDecision {
|
|
15
|
-
mode: AcquisitionMode;
|
|
16
|
-
/** 是否需要 explicitInstallConsent(R>0 的普通问人)。 */
|
|
17
|
-
requiresInstallConsent: boolean;
|
|
18
|
-
/** 是否需要 explicitHighRiskConsent(R2/R3)。 */
|
|
19
|
-
requiresHighRiskConsent: boolean;
|
|
20
|
-
reason: string;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* 决定一次资源获取走静默 / 问人 / 高危问人。纯函数,无副作用。
|
|
24
|
-
* 高危(R2/R3)优先级最高:无论预算开关,都必须高危问人(可执行高危永不自动)。
|
|
25
|
-
*/
|
|
26
|
-
export declare function decideAcquisition(ctx: AcquisitionContext, config?: AutonomyBudgetConfig): AcquisitionDecision;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import type { ConfigPort } from "../ports/index.js";
|
|
2
|
-
import type { HostCommunityClient } from "../../transport/host-community-client.js";
|
|
3
|
-
export type CommunityInstallRiskTier = "R0" | "R1" | "R2" | "R3";
|
|
4
|
-
export type CommunityInstallSourceTier = "official" | "community";
|
|
5
|
-
export type CommunityInstallTrustStage = "quarantine" | "trial" | "trusted";
|
|
6
|
-
export type CommunityInstallReviewStatus = "pending" | "approved" | "rejected";
|
|
7
|
-
export interface CommunityInstallResolution {
|
|
8
|
-
id: string;
|
|
9
|
-
type: string;
|
|
10
|
-
kind: string;
|
|
11
|
-
sourceTier: CommunityInstallSourceTier;
|
|
12
|
-
trustStage: CommunityInstallTrustStage;
|
|
13
|
-
reviewStatus: CommunityInstallReviewStatus;
|
|
14
|
-
resourceRiskTier: CommunityInstallRiskTier;
|
|
15
|
-
effectiveRiskTier: CommunityInstallRiskTier;
|
|
16
|
-
requires: string[];
|
|
17
|
-
dependencies: CommunityInstallResolution[];
|
|
18
|
-
version: string;
|
|
19
|
-
checksum: string;
|
|
20
|
-
sizeBytes: number;
|
|
21
|
-
downloadUrl: string;
|
|
22
|
-
manifest: unknown;
|
|
23
|
-
/** Minimum client version the resource declares, when present (cross-cutting ①). */
|
|
24
|
-
minClientVersion?: string;
|
|
25
|
-
/** EdDSA signature (base64) + signing key id over the integrity metadata (WS-B1). */
|
|
26
|
-
signature?: string | null;
|
|
27
|
-
signingKeyId?: string | null;
|
|
28
|
-
}
|
|
29
|
-
export interface CommunityResourceVersion {
|
|
30
|
-
version: string;
|
|
31
|
-
createdAt: string;
|
|
32
|
-
sizeBytes: number;
|
|
33
|
-
yanked: boolean;
|
|
34
|
-
}
|
|
35
|
-
export interface CommunityConsentClientOptions {
|
|
36
|
-
baseUrl: string;
|
|
37
|
-
token: string;
|
|
38
|
-
fetchFn?: typeof fetch;
|
|
39
|
-
/**
|
|
40
|
-
* Client version reported to the Hub via the `x-client-version` header on
|
|
41
|
-
* every registry request (version negotiation skeleton, cross-cutting ①).
|
|
42
|
-
* Omitted when unknown — the Hub records it but never rejects in Phase 1.
|
|
43
|
-
*/
|
|
44
|
-
clientVersion?: string;
|
|
45
|
-
}
|
|
46
|
-
export interface CommunityConsentClient {
|
|
47
|
-
resolveInstall(resourceId: string, version?: string): Promise<CommunityInstallResolution>;
|
|
48
|
-
/** List a resource's published versions for the version/rollback menu (WS-B3). The
|
|
49
|
-
* default client always implements it; optional so lightweight mocks may omit it. */
|
|
50
|
-
listResourceVersions?(resourceId: string): Promise<CommunityResourceVersion[]>;
|
|
51
|
-
}
|
|
52
|
-
export declare function createCommunityConsentClient(options: CommunityConsentClientOptions): CommunityConsentClient;
|
|
53
|
-
/** Supervised desktop path: the Runtime Host owns refresh and performs authenticated Hub reads. */
|
|
54
|
-
export declare function createHostCommunityConsentClient(host: HostCommunityClient): CommunityConsentClient;
|
|
55
|
-
export declare function createDefaultCommunityConsentClient(configPort?: ConfigPort): CommunityConsentClient | null;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared community-package materialization (download → verify → extract).
|
|
3
|
-
*
|
|
4
|
-
* Single source of truth for turning a registry install resolution into bytes on
|
|
5
|
-
* disk: whole-package sha256 + size check, then a minimal tar.gz extractor with a
|
|
6
|
-
* path-traversal guard. Used by the skill installer and the pet asset installer so
|
|
7
|
-
* the security-sensitive verify/extract logic lives in exactly one place.
|
|
8
|
-
*/
|
|
9
|
-
import type { CommunityInstallResolution } from "./community-consent-client.js";
|
|
10
|
-
/**
|
|
11
|
-
* Fetch the package, verifying it matches the registry's size + sha256. Delegates
|
|
12
|
-
* to the ranged downloader (WS-C4): 4MB Range chunks + .part resume for large
|
|
13
|
-
* assets, with a transparent whole-body fallback for small/non-Range packages.
|
|
14
|
-
*/
|
|
15
|
-
export declare function downloadAndVerifyPackage(fetchFn: typeof fetch, install: Pick<CommunityInstallResolution, "downloadUrl" | "sizeBytes" | "checksum">, label: string): Promise<Buffer>;
|
|
16
|
-
/** Extract a gzip-compressed tar into targetDir; only regular files + dirs, no traversal. */
|
|
17
|
-
export declare function extractTarGz(pkg: Buffer, targetDir: string, label: string): Promise<void>;
|
|
18
|
-
/** Resolve a tar entry under rootDir, rejecting absolute paths and `..` traversal. */
|
|
19
|
-
export declare function safeTarTarget(rootDir: string, entryName: string, label: string): string;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Ranged package download with resume (WS-C4). Fetches a package in 4MB Range
|
|
3
|
-
* chunks into a `.part` file (resumable across retries/process restarts), with
|
|
4
|
-
* per-chunk retry, then verifies the assembled file's size + sha256 and returns
|
|
5
|
-
* the bytes. When the server ignores Range (responds 200 instead of 206) it
|
|
6
|
-
* falls back to verifying the whole body in memory — so small packages and
|
|
7
|
-
* non-Range servers cost no disk. Verify semantics are identical to the plain
|
|
8
|
-
* downloader, so callers are unchanged.
|
|
9
|
-
*/
|
|
10
|
-
export interface RangedDownloadTarget {
|
|
11
|
-
downloadUrl: string;
|
|
12
|
-
sizeBytes: number;
|
|
13
|
-
checksum: string;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Stream a checksum-verified package directly into a caller-owned exclusive
|
|
17
|
-
* staging path. Industrial ZIPs use this path so neither the response nor the
|
|
18
|
-
* completed archive is materialized as a second full-size Buffer.
|
|
19
|
-
*/
|
|
20
|
-
export declare function downloadVerifiedToFile(fetchFn: typeof fetch, target: RangedDownloadTarget, label: string, destination: string, timeoutMs?: number): Promise<string>;
|
|
21
|
-
export declare function rangedDownloadVerified(fetchFn: typeof fetch, target: RangedDownloadTarget, label: string): Promise<Buffer>;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Client-side registry signature verification (WS-B1, cross-cutting ⑤).
|
|
3
|
-
*
|
|
4
|
-
* `canonicalSigningPayload` MUST be byte-identical to the Hub's
|
|
5
|
-
* `core/registry/registry-signing.ts` — a hand-written fixed field order joined by
|
|
6
|
-
* newlines, never JSON. The shared golden vector in both repos' tests pins this so
|
|
7
|
-
* the two implementations can never silently diverge (a drift would make every
|
|
8
|
-
* signature fail to verify). Verification is a second anchor beside the sha256
|
|
9
|
-
* checksum in the download path; the trusted public key is built into the client.
|
|
10
|
-
*/
|
|
11
|
-
export interface SignablePackage {
|
|
12
|
-
id: string;
|
|
13
|
-
version: string;
|
|
14
|
-
checksum: string;
|
|
15
|
-
sizeBytes: number;
|
|
16
|
-
}
|
|
17
|
-
/** Byte-exact canonical payload — keep identical to the Hub. Fixed order; never reorder. */
|
|
18
|
-
export declare function canonicalSigningPayload(p: SignablePackage): string;
|
|
19
|
-
/**
|
|
20
|
-
* Normalize a PEM that may arrive with escaped newlines. The trusted public key is
|
|
21
|
-
* sourced from env (QLOGIC_REGISTRY_SIGNING_PUBLIC_KEY_PEM); env_file / single-line
|
|
22
|
-
* secret stores deliver `\n` as literal backslash-n, which createPublicKey rejects.
|
|
23
|
-
* No-op when the PEM already has real newlines, so it never affects valid keys.
|
|
24
|
-
*/
|
|
25
|
-
export declare function normalizePem(pem: string): string;
|
|
26
|
-
/** Verify an Ed25519 signature (base64) over the canonical payload. False on any error. */
|
|
27
|
-
export declare function verifyPackageSignature(p: SignablePackage, signatureBase64: string, publicKeyPem: string): boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Signature gate mode (WS-B1 gradual rollout): "warn" logs but installs; "strict"
|
|
30
|
-
* refuses an install whose signature is missing or invalid. Sourced from
|
|
31
|
-
* QLOGIC_REGISTRY_SIGNATURE_MODE; defaults to "warn" so backfill can precede strict.
|
|
32
|
-
*/
|
|
33
|
-
export type SignatureMode = "warn" | "strict";
|
|
34
|
-
export declare function resolveSignatureMode(value: string | undefined): SignatureMode;
|
|
35
|
-
export interface SignedResolution extends SignablePackage {
|
|
36
|
-
signature?: string | null;
|
|
37
|
-
signingKeyId?: string | null;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Dual-anchor signature gate (WS-B1) applied beside the sha256 check on install.
|
|
41
|
-
* strict: throw on a missing or invalid signature. warn (default): never throw —
|
|
42
|
-
* return the outcome so the caller can log it. A missing trusted public key (key
|
|
43
|
-
* ceremony not yet done) behaves like "unsigned" so warn-mode installs proceed.
|
|
44
|
-
*/
|
|
45
|
-
export declare function checkResolutionSignature(resolution: SignedResolution, mode: SignatureMode, trustedPublicKeyPem: string | undefined): {
|
|
46
|
-
verified: boolean;
|
|
47
|
-
reason?: "unsigned" | "no-trusted-key" | "invalid-signature";
|
|
48
|
-
};
|