qlogicagent 2.2.0 → 2.4.0
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 +10 -9
- package/dist/cli.js +213 -211
- package/dist/index.js +212 -210
- package/dist/orchestration.js +13 -12
- package/dist/protocol.js +1 -0
- package/dist/types/agent/constants.d.ts +4 -53
- package/dist/types/agent/tunable-defaults.d.ts +225 -0
- package/dist/types/agent/types.d.ts +24 -100
- package/dist/types/cli/stdio-server.d.ts +40 -0
- package/dist/types/cli/tool-bootstrap.d.ts +6 -0
- package/dist/types/contracts/index.d.ts +2 -3
- package/dist/types/llm/provider-def.d.ts +3 -0
- package/dist/types/llm/transport.d.ts +25 -25
- package/dist/types/llm/transports/anthropic-messages.d.ts +2 -2
- package/dist/types/llm/transports/gemini-generatecontent.d.ts +2 -2
- package/dist/types/llm/transports/openai-chat.d.ts +2 -2
- package/dist/types/llm/transports/openai-responses.d.ts +9 -9
- package/dist/types/llm/transports/volcengine-responses.d.ts +11 -11
- package/dist/types/orchestration/agent-instance.d.ts +15 -0
- package/dist/types/orchestration/skill-improvement.d.ts +39 -8
- package/dist/types/orchestration/solo-evaluator.d.ts +7 -0
- package/dist/types/orchestration/subagent/fork-subagent.d.ts +2 -2
- package/dist/types/orchestration/tool-loop/tool-choice-policy.d.ts +1 -1
- package/dist/types/protocol/methods.d.ts +143 -53
- package/dist/types/protocol/notifications.d.ts +4 -495
- package/dist/types/protocol/wire/acp-protocol.d.ts +411 -0
- package/dist/types/protocol/wire/agent-events.d.ts +32 -0
- package/dist/types/protocol/wire/agent-methods.d.ts +587 -0
- package/dist/types/protocol/wire/agent-rpc.d.ts +97 -0
- package/dist/types/protocol/wire/capability-manifest.d.ts +111 -0
- package/dist/types/protocol/wire/capability-transport.d.ts +207 -0
- package/dist/types/protocol/wire/channel-ingress.d.ts +29 -0
- package/dist/types/protocol/wire/channel.d.ts +89 -0
- package/dist/types/protocol/wire/chat-types.d.ts +87 -0
- package/dist/types/protocol/wire/checkpoint-runtime.d.ts +61 -0
- package/dist/types/protocol/wire/checkpoint.d.ts +72 -0
- package/dist/types/protocol/wire/execution.d.ts +391 -0
- package/dist/types/protocol/wire/gateway-rpc.d.ts +314 -0
- package/dist/types/protocol/wire/gateway.d.ts +62 -0
- package/dist/types/protocol/wire/hook-protocol.d.ts +37 -0
- package/dist/types/protocol/wire/index.d.ts +25 -0
- package/dist/types/protocol/wire/memory-provider-lifecycle.d.ts +80 -0
- package/dist/types/protocol/wire/notification-payloads.d.ts +581 -0
- package/dist/types/protocol/wire/provider-runtime-contract.d.ts +66 -0
- package/dist/types/protocol/wire/provider-runtime-core.d.ts +147 -0
- package/dist/types/protocol/wire/provider-runtime-io.d.ts +20 -0
- package/dist/types/protocol/wire/resource-manifest.d.ts +68 -0
- package/dist/types/protocol/wire/session.d.ts +32 -0
- package/dist/types/protocol/wire/thread-protocol.d.ts +157 -0
- package/dist/types/protocol/wire/transport.d.ts +57 -0
- package/dist/types/protocol/wire/turn.d.ts +208 -0
- package/dist/types/protocol/wire/web-capability.d.ts +51 -0
- package/dist/types/runtime/hooks/memory-hooks.d.ts +2 -5
- package/dist/types/runtime/hooks/skill-recall-hooks.d.ts +2 -4
- package/dist/types/runtime/infra/acp-types.d.ts +3 -142
- package/dist/types/runtime/infra/project-store.d.ts +6 -0
- package/dist/types/runtime/infra/skill-injector.d.ts +9 -2
- package/dist/types/runtime/infra/token-budget.d.ts +3 -3
- package/dist/types/runtime/session/index.d.ts +1 -1
- package/dist/types/runtime/session/session-memory.d.ts +46 -0
- package/dist/types/runtime/session/session-persistence.d.ts +34 -8
- package/dist/types/runtime/session/session-state.d.ts +4 -4
- package/dist/types/skills/memory/memory-tool.d.ts +1 -1
- package/dist/types/skills/memory/qmemory-adapter.d.ts +1 -1
- package/dist/types/skills/permissions/hook-runner.d.ts +4 -4
- package/dist/types/skills/permissions/permission-classifier.d.ts +2 -2
- package/dist/types/skills/skill-system/skill-source.d.ts +65 -0
- package/dist/types/skills/tools/project-switch-tool.d.ts +24 -0
- package/dist/types/skills/tools.d.ts +5 -5
- package/dist/types/transport/acp-event-emitter.d.ts +1 -1
- package/dist/types/transport/acp-server.d.ts +18 -9
- package/package.json +14 -3
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export interface AgentAuthPayload {
|
|
2
|
+
gatewayId: string;
|
|
3
|
+
token: string;
|
|
4
|
+
version: string;
|
|
5
|
+
subscriptionKey?: string;
|
|
6
|
+
deviceId?: string;
|
|
7
|
+
deviceName?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface AgentAuthOkPayload {
|
|
10
|
+
gatewayId: string;
|
|
11
|
+
boundUsers: string[];
|
|
12
|
+
planActive?: boolean;
|
|
13
|
+
principalId?: string;
|
|
14
|
+
entitlementId?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface AgentAuthFailPayload {
|
|
17
|
+
reason: string;
|
|
18
|
+
}
|
|
19
|
+
export interface AgentAuthMsg {
|
|
20
|
+
type: "agent.auth";
|
|
21
|
+
id: string;
|
|
22
|
+
payload: AgentAuthPayload;
|
|
23
|
+
}
|
|
24
|
+
export interface AgentAuthOkMsg {
|
|
25
|
+
type: "agent.auth.ok";
|
|
26
|
+
id: string;
|
|
27
|
+
payload: AgentAuthOkPayload;
|
|
28
|
+
}
|
|
29
|
+
export interface AgentAuthFailMsg {
|
|
30
|
+
type: "agent.auth.fail";
|
|
31
|
+
id: string;
|
|
32
|
+
payload: AgentAuthFailPayload;
|
|
33
|
+
}
|
|
34
|
+
export interface AgentHeartbeatPayload {
|
|
35
|
+
timestamp: string;
|
|
36
|
+
subscriptionKey?: string;
|
|
37
|
+
consumed?: Record<string, number>;
|
|
38
|
+
}
|
|
39
|
+
export interface AgentHeartbeatMsg {
|
|
40
|
+
type: "agent.heartbeat";
|
|
41
|
+
id: string;
|
|
42
|
+
payload: AgentHeartbeatPayload;
|
|
43
|
+
}
|
|
44
|
+
export interface AgentHeartbeatResponsePayload {
|
|
45
|
+
timestamp: string;
|
|
46
|
+
quotaRemaining?: Record<string, number>;
|
|
47
|
+
}
|
|
48
|
+
export interface AgentHeartbeatResponseMsg {
|
|
49
|
+
type: "agent.heartbeat.response";
|
|
50
|
+
id: string;
|
|
51
|
+
payload: AgentHeartbeatResponsePayload;
|
|
52
|
+
}
|
|
53
|
+
export interface AgentStatusPayload {
|
|
54
|
+
alertType: string;
|
|
55
|
+
description: string;
|
|
56
|
+
detail?: string;
|
|
57
|
+
}
|
|
58
|
+
export interface AgentStatusMsg {
|
|
59
|
+
type: "agent.status";
|
|
60
|
+
id: string;
|
|
61
|
+
payload: AgentStatusPayload;
|
|
62
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { AgentExecutionRefs } from "./transport.js";
|
|
2
|
+
export interface HookInvokePayload extends AgentExecutionRefs {
|
|
3
|
+
sessionId: string;
|
|
4
|
+
turnId?: string;
|
|
5
|
+
hookPoint: string;
|
|
6
|
+
context: Record<string, unknown>;
|
|
7
|
+
correlationId: string;
|
|
8
|
+
timeoutMs?: number;
|
|
9
|
+
}
|
|
10
|
+
export interface HookInvokeMsg {
|
|
11
|
+
type: "hook.invoke";
|
|
12
|
+
id: string;
|
|
13
|
+
payload: HookInvokePayload;
|
|
14
|
+
}
|
|
15
|
+
export type HookResponseAction = "continue" | "abort" | "skip";
|
|
16
|
+
export interface HookResponsePayload {
|
|
17
|
+
correlationId: string;
|
|
18
|
+
action: HookResponseAction;
|
|
19
|
+
context?: Record<string, unknown>;
|
|
20
|
+
reason?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface HookResponseMsg {
|
|
23
|
+
type: "hook.response";
|
|
24
|
+
id: string;
|
|
25
|
+
payload: HookResponsePayload;
|
|
26
|
+
}
|
|
27
|
+
export interface HookNotifyPayload extends AgentExecutionRefs {
|
|
28
|
+
sessionId: string;
|
|
29
|
+
turnId?: string;
|
|
30
|
+
hookPoint: string;
|
|
31
|
+
context: Record<string, unknown>;
|
|
32
|
+
}
|
|
33
|
+
export interface HookNotifyMsg {
|
|
34
|
+
type: "hook.notify";
|
|
35
|
+
id: string;
|
|
36
|
+
payload: HookNotifyPayload;
|
|
37
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export { AGENT_RPC_APPROVAL_METHODS, AGENT_RPC_ERROR_CODES, AGENT_RPC_PROTOCOL_VERSION, isAgentRpcNotification, isAgentRpcRequest, isAgentRpcResponse, parseAgentRpcMessage, type AgentHelloParams, type AgentHelloResult, type AgentRpcError, type AgentRpcErrorCode, type AgentRpcMessage, type AgentRpcNotification, type AgentRpcRequest, type AgentRpcResponse, type ToolApprovalRequestParams, type ToolApprovalResponseParams, } from "./agent-rpc.js";
|
|
2
|
+
export { GATEWAY_RPC_METHODS, type AgentCall, type GatewayRpcMethodMap, type ProjectInfo as RpcProjectInfo, type ProjectStatus as RpcProjectStatus, type ProjectType as RpcProjectType, } from "./gateway-rpc.js";
|
|
3
|
+
export { type ChatMessage, type ChatMessageRole, type ThinkingBlock, type ToolCallMessage, type ToolDefinition, } from "./chat-types.js";
|
|
4
|
+
export { type AgentCapabilities, type AgentCategory, type AgentConfig, type AgentDescriptor, type AgentProtocol, type AgentRpcMethodMap, type AgentStatus, type CustomAgentDef, type ProductInstanceDef, type ProductPhase, type ProductStatus, type ProductSummary, type ProductTaskDef, type ProductTaskStatus, type SoloAgentResult, type SoloAgentState, type SoloState, type SoloStatus, } from "./agent-methods.js";
|
|
5
|
+
export { AGENT_TEAM_WS_EVENT_NAMES, AGENT_WS_EVENT_NAMES, ALL_AGENT_WS_EVENT_NAMES, type AgentTeamWsEventName, type AgentWsEventName, type AllAgentWsEventName, } from "./agent-events.js";
|
|
6
|
+
export { type AgentSource, type AgentsErrorNotification, type AgentsStatusNotification, type ArtifactType, type MediaResultType, type MemoryDecayCompletedNotification, type MemoryUpdatedNotification, type NotificationMethod, type NotificationMethodMap, type NotificationThreadItem, type PermissionRuleUpdatedNotification, type PlanInterruptedNotification, type PongNotification, type ProductBudgetUpdateNotification, type ProductBudgetWarningNotification, type ProductCheckpointedNotification, type ProductCompletedNotification, type ProductDagTopologyNotification, type ProductTaskCompletedNotification, type ProductTaskFailedNotification, type ProductTaskOutputDeltaNotification, type ProductTaskStartedNotification, type ProjectArchivedNotification, type ProjectCreatedNotification, type ProjectDeletedNotification, type ProjectRenamedNotification, type ProjectSwitchedNotification, type ProjectUnarchivedNotification, type SessionInfoNotification, type SoloAgentDeltaNotification, type SoloAgentDiffNotification, type SoloAgentUsageNotification, type SoloEvaluationNotification, type SoloProgressNotification, type TeamMemberNotification, type ToolApprovalRequestNotification, type TurnAnnotationsNotification, type TurnArtifactNotification, type TurnAskUserNotification, type TurnDeltaNotification, type TurnEndNotification, type TurnErrorNotification, type TurnExecProgressNotification, type TurnHeartbeatNotification, type TurnMediaPersistedNotification, type TurnMediaProgressNotification, type TurnMediaResultNotification, type TurnPlanUpdateNotification, type TurnReasoningDeltaNotification, type TurnRecoveryNotification, type TurnSidechainCompletedNotification, type TurnSidechainStartedNotification, type TurnSkillInstructionNotification, type TurnStartNotification, type TurnSubagentDeltaNotification, type TurnSuggestionsNotification, type TurnTaskUpdatedNotification, type TurnTodosUpdatedNotification, type TurnToolBlockedNotification, type TurnToolCallNotification, type TurnToolResultNotification, type TurnToolUseSummaryNotification, type TurnUsageUpdateNotification, type WireTokenUsage, } from "./notification-payloads.js";
|
|
7
|
+
export { ACP_EXTENDED_METHODS, ACP_EXTENDED_SESSION_UPDATE_TYPES, ACP_METHODS, ACP_PROTOCOL_VERSION, ACP_SESSION_UPDATE_TYPES, isAcpJsonRpcNotification, isAcpJsonRpcRequest, isAcpJsonRpcResponse, isExtendedSessionUpdateType, isStandardSessionUpdateType, parseAcpMessage, type AcpAgentCapabilities, type AcpAgentMessageChunkPayload, type AcpAgentThoughtChunkPayload, type AcpAvailableCommandsUpdatePayload, type AcpConfigOptionDescriptor, type AcpConfigOptionUpdatePayload, type AcpContentBlock, type AcpContextItem, type AcpEndTurnPayload, type AcpExtendedMethod, type AcpExtendedSessionUpdateType, type AcpFsReadTextFileParams, type AcpFsReadTextFileResult, type AcpFsWriteTextFileParams, type AcpFsWriteTextFileResult, type AcpHostCapabilities, type AcpInitializeParams, type AcpInitializeResult, type AcpJsonRpcError, type AcpJsonRpcMessage, type AcpJsonRpcNotification, type AcpJsonRpcRequest, type AcpJsonRpcResponse, type AcpPermissionOption, type AcpPermissionRequestParams, type AcpPermissionRequestResult, type AcpPlanPayload, type AcpSessionEndParams, type AcpSessionNewParams, type AcpSessionNewResult, type AcpSessionPromptParams, type AcpSessionPromptResult, type AcpSessionSetConfigParams, type AcpSessionUpdateNotification, type AcpSessionUpdateType, type AcpStandardMethod, type AcpStandardSessionUpdateType, type AcpStopReason, type AcpToolCallPayload, type AcpToolCallUpdatePayload, type AcpUsage, type AcpUsageUpdatePayload, type AcpXAskUserPayload, type AcpXMediaProgressPayload, type AcpXMediaResultPayload, type AcpXMemoryUpdatedPayload, type AcpXProductCheckpointPayload, type AcpXProductTaskCompletedPayload, type AcpXProductTaskStartedPayload, type AcpXRecoveryPayload, type AcpXSessionInfoPayload, type AcpXSidechainCompletedPayload, type AcpXSidechainStartedPayload, type AcpXSkillInstructionPayload, type AcpXSoloAgentFinishedPayload, type AcpXSoloSelectedPayload, type AcpXSoloStartedPayload, type AcpXSubagentDeltaPayload, type AcpXSubagentEndedPayload, type AcpXSubagentStartedPayload, type AcpXSuggestionsPayload, type AcpXTeamMemberUpdatePayload, } from "./acp-protocol.js";
|
|
8
|
+
export { type ApprovalRequiredToolContract, type ModelSelectionReason, type PendingPromptContract, type RuntimeCapabilitySummaryContract, type RuntimeSessionContract, type SessionIdentityContract, } from "./session.js";
|
|
9
|
+
export { type GatewayChannelExecutionEgressContract, type GatewayChannelExecutionEgressKind, type GatewayChannelExecutionIngressBindingContract, type GatewayChannelExecutionIngressSource, } from "./channel-ingress.js";
|
|
10
|
+
export { CAPABILITY_MANIFEST_DIFF_SECTIONS, cloneCapabilityManifestSnapshot, createCapabilityManifestDiffPayload, deriveCapabilityToolNamespaces, deriveCapabilityWorkspaceIds, mergeCapabilityManifestSnapshot, type CapabilityManifestApprovalMode, type CapabilityManifestApprovalPolicyContract, type CapabilityManifestDiffSection, type CapabilityMcpManifestContract, type CapabilityManifestSnapshotContract, type HostCapabilitySnapshotContract, type CapabilityPluginManifestContract, type RuntimeCapabilityViewContract, type RuntimeToolEligibilityContract, type CapabilitySkillManifestContract, type CapabilityToolManifestContract, type CapabilityWorkspaceSummaryContract, type ToolEligibilityResolvedSource, type ToolEligibilityReasonCode, type ToolEligibilityStatus, } from "./capability-manifest.js";
|
|
11
|
+
export { WEB_ACTION_SCOPE_VALUES, WEB_APPROVAL_DEFAULT_VALUES, WEB_CAPABILITY_FAMILY_VALUES, WEB_CAPABILITY_ID_VALUES, WEB_DEGRADATION_TARGET_VALUES, WEB_ESCALATION_REASON_VALUES, WEB_EXECUTION_MODE_VALUES, WEB_POLICY_RISK_CLASS_VALUES, WEB_RETRY_POLICY_VALUES, WEB_STATEFULNESS_VALUES, WEB_TASK_MODE_VALUES, type WebActionScope, type WebApprovalDefault, type WebCapabilityDescriptorContract, type WebCapabilityFamily, type WebCapabilityId, type WebDegradationTarget, type WebEscalationReason, type WebExecutionMode, type WebPolicyRiskClass, type WebRetryPolicy, type WebStatefulness, type WebTaskMode, } from "./web-capability.js";
|
|
12
|
+
export { MEMORY_OBSERVATION_HOOK_VALUES, MEMORY_OBSERVATION_SOURCE_VALUES, MEMORY_WRITE_ACCESS_VALUES, type MemoryContextBlock, type MemoryIngestMessage, type MemoryIngestOptions, type MemoryLlmConfig, type MemoryObservedMsg, type MemoryObservedPayload, type MemoryObservationEnvelope, type MemoryObservationHook, type MemoryObservationSource, type MemoryObserveRequestMsg, type MemoryProvider, type MemorySearchOptions, type MemorySearchResult, type MemoryWriteAccess, } from "./memory-provider-lifecycle.js";
|
|
13
|
+
export { RESOURCE_MANIFEST_SCHEMA_VERSION, RUNTIME_ASSET_IDS, RUNTIME_PROFILE_IDS, createDefaultRuntimeResourceProfiles, getManifestShortcutEntry, getRuntimeResourceAsset, getRuntimeResourceProfile, getRuntimeResourceProfileAssets, normalizeRuntimeResourceManifest, upsertRuntimeResourceAsset, type RuntimeManifestShortcutEntry, type RuntimeResourceArtifact, type RuntimeResourceAsset, type RuntimeResourceAssetDelivery, type RuntimeResourceAssetKind, type RuntimeResourceAssetMap, type RuntimeResourceManifest, type RuntimeResourcePlatform, type RuntimeResourceProfile, type RuntimeResourceProfileMap, } from "./resource-manifest.js";
|
|
14
|
+
export { MUTATION_CHECKPOINT_ENTRY_KIND_VALUES, MUTATION_CHECKPOINT_BACKEND_VALUES, MUTATION_CHECKPOINT_PHASE_VALUES, type MutationCheckpointBackend, type MutationCheckpointContract, type MutationCheckpointEntryKind, type MutationCheckpointPhase, type MutationCheckpointRestoreAckContract, type MutationCheckpointRollbackResultContract, type MutationCheckpointRestoreContract, type MutationCheckpointSnapshotEntryContract, } from "./checkpoint.js";
|
|
15
|
+
export { type MutationCheckpointRuntimeManager, type MutationCheckpointRuntimeManagerDeps, } from "./checkpoint-runtime.js";
|
|
16
|
+
export { PROVIDER_RUNTIME_AUTH_MODE_VALUES, PROVIDER_RUNTIME_COMPAT_FLAG_VALUES, PROVIDER_RUNTIME_VAULT_ERROR_TYPE_VALUES, readProviderRuntimeCompatFlag, type ProviderRuntimeAdapterContract, type ProviderRuntimeAuthMode, type ProviderRuntimeCompatFlag, type ProviderRuntimeCompatModelContract, type ProviderRuntimeProfileRecordContract, type ProviderRuntimeProfileStoreContract, type ProviderRuntimeResolvedAuthContract, type ProviderRuntimeVaultErrorType, } from "./provider-runtime-contract.js";
|
|
17
|
+
export { PROVIDER_RUNTIME_OPENAI_CODEX_PROVIDER_ID, PROVIDER_RUNTIME_ENV_API_KEY_CANDIDATES, isAnthropicProviderRuntimeFamily, isOpenAiProviderRuntimeFamily, listProviderRuntimeEnvApiKeyNames, normalizeProviderRuntimeId, normalizeProviderRuntimeIdForAuth, preservesProviderRuntimeAnthropicThinkingSignatures, requiresOpenAiCompatibleAnthropicToolPayloadForProviderRuntime, resolveProviderRuntimeCapabilities, resolveProviderRuntimeEnvApiKey, resolveProviderRuntimeKeyFamily, resolveProviderRuntimeTranscriptToolCallIdMode, shouldDropThinkingBlocksForProviderRuntimeModel, shouldSanitizeProviderRuntimeThoughtSignaturesForModel, supportsOpenAiCompatTurnValidationForProviderRuntime, usesOpenAiFunctionAnthropicToolSchemaForProviderRuntime, usesOpenAiStringModeAnthropicToolChoiceForProviderRuntime, type ProviderRuntimeAuthCoreDeps, type ProviderRuntimeAuthProfileDeps, type ProviderRuntimeCapabilities, type ProviderRuntimeCredentialMap, type ProviderRuntimeCredentialRecord, type ProviderRuntimeEnvApiKeyResult, type ProviderRuntimePlatformKey, type ProviderRuntimeResolvedAuth, type ProviderRuntimeResolvedAuthMode, } from "./provider-runtime-core.js";
|
|
18
|
+
export * from "./transport.js";
|
|
19
|
+
export * from "./channel.js";
|
|
20
|
+
export * from "./capability-transport.js";
|
|
21
|
+
export * from "./execution.js";
|
|
22
|
+
export * from "./turn.js";
|
|
23
|
+
export * from "./gateway.js";
|
|
24
|
+
export * from "./hook-protocol.js";
|
|
25
|
+
export * from "./thread-protocol.js";
|
|
@@ -0,0 +1,80 @@
|
|
|
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"];
|
|
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
|
+
blockId?: 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
|
+
}
|
|
32
|
+
export interface MemoryObservedMsg {
|
|
33
|
+
type: "memory.observed";
|
|
34
|
+
id: string;
|
|
35
|
+
payload: MemoryObservedPayload;
|
|
36
|
+
}
|
|
37
|
+
export interface MemoryObserveRequestMsg {
|
|
38
|
+
type: "memory.observe";
|
|
39
|
+
id: string;
|
|
40
|
+
payload: MemoryObservationEnvelope;
|
|
41
|
+
}
|
|
42
|
+
export interface MemoryLlmConfig {
|
|
43
|
+
provider: string;
|
|
44
|
+
baseUrl: string;
|
|
45
|
+
apiKey: string;
|
|
46
|
+
model: string;
|
|
47
|
+
}
|
|
48
|
+
export interface MemorySearchResult {
|
|
49
|
+
blockId: string;
|
|
50
|
+
text: string;
|
|
51
|
+
score: number;
|
|
52
|
+
source?: string;
|
|
53
|
+
metadata?: Record<string, unknown>;
|
|
54
|
+
}
|
|
55
|
+
export interface MemorySearchOptions {
|
|
56
|
+
limit?: number;
|
|
57
|
+
minScore?: number;
|
|
58
|
+
llmConfig?: MemoryLlmConfig;
|
|
59
|
+
}
|
|
60
|
+
export interface MemoryIngestOptions {
|
|
61
|
+
llmConfig?: MemoryLlmConfig;
|
|
62
|
+
source?: MemoryObservationSource;
|
|
63
|
+
sessionId?: string;
|
|
64
|
+
}
|
|
65
|
+
export interface MemoryProvider {
|
|
66
|
+
readonly providerId: string;
|
|
67
|
+
search(query: string, userId: string, options?: MemorySearchOptions): Promise<MemorySearchResult[]>;
|
|
68
|
+
ingest(messages: MemoryIngestMessage[], userId: string, options?: MemoryIngestOptions): Promise<void>;
|
|
69
|
+
/** Store a plain text memory entry (no LLM extraction — agent decides content). */
|
|
70
|
+
addText?(text: string, userId: string, options?: MemoryIngestOptions): Promise<{
|
|
71
|
+
memoriesAdded: number;
|
|
72
|
+
}>;
|
|
73
|
+
/** Remove a memory entry by ID. */
|
|
74
|
+
remove?(memoryId: string): Promise<boolean>;
|
|
75
|
+
}
|
|
76
|
+
export interface MemoryIngestMessage {
|
|
77
|
+
role: string;
|
|
78
|
+
content: string;
|
|
79
|
+
timestamp?: number;
|
|
80
|
+
}
|