@theokit/sdk 5.9.2 → 5.10.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/CHANGELOG.md +45 -0
- package/dist/{agent-enXXu447.d.ts → agent-CmKwSyyD.d.ts} +27 -0
- package/dist/{agent-WQ4LLTSY.cjs → agent-TLRURB7W.cjs} +9 -8
- package/dist/{agent-WQ4LLTSY.cjs.map → agent-TLRURB7W.cjs.map} +1 -1
- package/dist/{agent-Dh2YHSLj.d.cts → agent-XMkGzff_.d.cts} +27 -0
- package/dist/{agent-GZVZXKME.js → agent-XTLAVVYC.js} +8 -7
- package/dist/{agent-GZVZXKME.js.map → agent-XTLAVVYC.js.map} +1 -1
- package/dist/{chunk-M2CCHC66.js → chunk-523O5UYB.js} +3 -3
- package/dist/{chunk-M2CCHC66.js.map → chunk-523O5UYB.js.map} +1 -1
- package/dist/chunk-7KIN3L2S.js +103 -0
- package/dist/chunk-7KIN3L2S.js.map +1 -0
- package/dist/chunk-ASK2OQM5.cjs +84 -0
- package/dist/chunk-ASK2OQM5.cjs.map +1 -0
- package/dist/{chunk-JU76WCW7.cjs → chunk-CVEQ5366.cjs} +37 -24
- package/dist/chunk-CVEQ5366.cjs.map +1 -0
- package/dist/{chunk-ZDF2IJKC.js → chunk-DPY2M74T.js} +3 -3
- package/dist/{chunk-ZDF2IJKC.js.map → chunk-DPY2M74T.js.map} +1 -1
- package/dist/{chunk-X7Z2FEI7.cjs → chunk-FYEHYQ7T.cjs} +8 -8
- package/dist/{chunk-X7Z2FEI7.cjs.map → chunk-FYEHYQ7T.cjs.map} +1 -1
- package/dist/{chunk-OZLQ6ZFM.js → chunk-IZDDSLL2.js} +4 -3
- package/dist/chunk-IZDDSLL2.js.map +1 -0
- package/dist/{chunk-DLUCTZ56.cjs → chunk-L3C6CCBG.cjs} +15 -15
- package/dist/{chunk-DLUCTZ56.cjs.map → chunk-L3C6CCBG.cjs.map} +1 -1
- package/dist/{chunk-RX3CFWQ2.cjs → chunk-NQVWSSX2.cjs} +6 -5
- package/dist/chunk-NQVWSSX2.cjs.map +1 -0
- package/dist/{chunk-KXKT3HSD.cjs → chunk-PCLRIQPX.cjs} +4 -4
- package/dist/{chunk-KXKT3HSD.cjs.map → chunk-PCLRIQPX.cjs.map} +1 -1
- package/dist/chunk-R5YPDAKD.cjs +108 -0
- package/dist/chunk-R5YPDAKD.cjs.map +1 -0
- package/dist/chunk-RGQICWFU.js +82 -0
- package/dist/chunk-RGQICWFU.js.map +1 -0
- package/dist/{chunk-PEIV7LOU.js → chunk-RTE2DD4S.js} +20 -7
- package/dist/chunk-RTE2DD4S.js.map +1 -0
- package/dist/{chunk-N7KYUNFO.js → chunk-W2ZVTEOD.js} +3 -3
- package/dist/{chunk-N7KYUNFO.js.map → chunk-W2ZVTEOD.js.map} +1 -1
- package/dist/{chunk-47Z6LP3I.js → chunk-X3LOJJMO.js} +88 -28
- package/dist/chunk-X3LOJJMO.js.map +1 -0
- package/dist/{chunk-VZ2JZ2EH.cjs → chunk-ZD66GFH5.cjs} +89 -27
- package/dist/chunk-ZD66GFH5.cjs.map +1 -0
- package/dist/{cron-DTuaPMVI.d.ts → cron-BPccQCO8.d.ts} +1 -1
- package/dist/{cron-QTgcwcZt.d.cts → cron-Blj6wMYg.d.cts} +1 -1
- package/dist/cron.cjs +8 -7
- package/dist/cron.d.cts +2 -2
- package/dist/cron.d.ts +2 -2
- package/dist/cron.js +7 -6
- package/dist/eval.cjs +11 -10
- package/dist/eval.cjs.map +1 -1
- package/dist/eval.js +7 -6
- package/dist/eval.js.map +1 -1
- package/dist/fs-session-store-3VI4CPTX.js +11 -0
- package/dist/{fs-session-store-LCZBM3LT.js.map → fs-session-store-3VI4CPTX.js.map} +1 -1
- package/dist/fs-session-store-IQ6PEHYF.cjs +20 -0
- package/dist/{fs-session-store-SVEMRE4K.cjs.map → fs-session-store-IQ6PEHYF.cjs.map} +1 -1
- package/dist/{index-manager-6B2UF5S3.js → index-manager-JVYIVTZG.js} +5 -4
- package/dist/{index-manager-6B2UF5S3.js.map → index-manager-JVYIVTZG.js.map} +1 -1
- package/dist/{index-manager-M3FHJCHQ.cjs → index-manager-YGXRFJMZ.cjs} +6 -5
- package/dist/{index-manager-M3FHJCHQ.cjs.map → index-manager-YGXRFJMZ.cjs.map} +1 -1
- package/dist/index.cjs +44 -37
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -3
- package/dist/index.d.ts +12 -3
- package/dist/index.js +22 -15
- package/dist/index.js.map +1 -1
- package/dist/internal/memory/dreaming/phases.d.ts +2 -0
- package/dist/internal/memory/dreaming/run.d.ts +5 -0
- package/dist/internal/memory/sdk-memory-peer-loader.d.ts +2 -0
- package/dist/internal/memory/storage/fact-ceiling.d.cts +19 -0
- package/dist/internal/memory/storage/fact-ceiling.d.ts +19 -0
- package/dist/internal/memory/storage/index.cjs +40 -31
- package/dist/internal/memory/storage/index.d.cts +1 -0
- package/dist/internal/memory/storage/index.d.ts +1 -0
- package/dist/internal/memory/storage/index.js +3 -2
- package/dist/internal/memory/storage/markdown-store.d.cts +3 -1
- package/dist/internal/memory/storage/markdown-store.d.ts +3 -1
- package/dist/internal/memory/types.d.ts +6 -0
- package/dist/internal/persistence/index.cjs +7 -6
- package/dist/internal/persistence/index.cjs.map +1 -1
- package/dist/internal/persistence/index.js +2 -1
- package/dist/internal/persistence/index.js.map +1 -1
- package/dist/internal/runtime/registry/agent-registry-store.d.ts +2 -0
- package/dist/persistence.cjs +7 -6
- package/dist/persistence.cjs.map +1 -1
- package/dist/persistence.js +2 -1
- package/dist/persistence.js.map +1 -1
- package/dist/subagents-loader.d.cts +1 -1
- package/dist/subagents-loader.d.ts +1 -1
- package/dist/types/agent.d.ts +27 -0
- package/docs/error-codes.md +27 -25
- package/docs/harness-capability-map.md +6 -1
- package/package.json +1 -1
- package/dist/chunk-47Z6LP3I.js.map +0 -1
- package/dist/chunk-BKMDRBJ7.js +0 -180
- package/dist/chunk-BKMDRBJ7.js.map +0 -1
- package/dist/chunk-JU76WCW7.cjs.map +0 -1
- package/dist/chunk-OF2CLCTH.cjs +0 -186
- package/dist/chunk-OF2CLCTH.cjs.map +0 -1
- package/dist/chunk-OZLQ6ZFM.js.map +0 -1
- package/dist/chunk-PEIV7LOU.js.map +0 -1
- package/dist/chunk-RX3CFWQ2.cjs.map +0 -1
- package/dist/chunk-VZ2JZ2EH.cjs.map +0 -1
- package/dist/fs-session-store-LCZBM3LT.js +0 -10
- package/dist/fs-session-store-SVEMRE4K.cjs +0 -19
package/dist/index.d.cts
CHANGED
|
@@ -2,15 +2,15 @@ import { T as TheokitAgentError, E as ErrorMetadata } from './errors-base-B5g01n
|
|
|
2
2
|
export { a as ErrorCode } from './errors-base-B5g01neU.cjs';
|
|
3
3
|
import { H as RunEvent, j as CostBreakdown, au as TokenUsage, R as RunResult, M as ModelSelection, C as CustomTool, a as McpServerConfig, T as ToolResultContentBlock, b as Run, P as Processor, c as PermissionMode, d as RunEventSink$1, S as SDKMessage } from './run-DsA5Ip2i.cjs';
|
|
4
4
|
export { A as AgentConversationTurn, e as AssistantMessage, f as CompletionCheck, g as CompletionCheckResult, h as ConversationStep, i as ConversationTurn, j as CostBreakdown, k as CostSource, l as CostStatus, D as DoomLoopThresholds, E as EnvPolicy, G as GenerateOptions, m as GenerateRunResult, I as ImageBlock, n as InputProcessorContext, o as InteractionUpdate, p as McpAuthConfig, q as McpHttpServerConfig, r as McpOAuthConfig, s as McpStdioServerConfig, t as MessageOrigin, u as ModelParameterValue, O as OutputProcessorContext, v as PartialToolCallUpdate, w as ProcessorControls, x as ProcessorTripwire, y as ProcessorViolation, z as RunCompactBoundaryEvent, B as RunCompletionCheckEvent, F as RunErrorDetail, H as RunEvent, J as RunGitInfo, K as RunMemoryDegradedEvent, L as RunOperation, N as RunPermissionDeniedEvent, Q as RunRateLimitEvent, U as RunStatus, V as RunTaskCompletedEvent, W as RunTaskStartedEvent, X as RunTaskUpdatedEvent, Y as RunTimelineEvent, Z as RunToCompletionOptions, _ as RunToCompletionResult, $ as RunToolProgressEvent, a0 as RunTripwireEvent, a1 as SDKAssistantMessage, a2 as SDKImage, a3 as SDKImageDimension, a4 as SDKObjectDelta, a5 as SDKRequestMessage, a6 as SDKStatusMessage, a7 as SDKSystemMessage, a8 as SDKTaskMessage, a9 as SDKThinkingMessage, aa as SDKToolUseMessage, ab as SDKUserMessage, ac as SDKUserMessageEvent, ad as SendOptions, ae as ShellCommand, af as ShellConversationTurn, ag as ShellOutput, ah as ShellOutputDeltaUpdate, ai as StepCompletedUpdate, aj as StepStartedUpdate, ak as StreamToCompletionResult, al as SummaryCompletedUpdate, am as SummaryStartedUpdate, an as SummaryUpdate, ao as TextBlock, ap as TextDeltaUpdate, aq as ThinkingCompletedUpdate, ar as ThinkingDeltaUpdate, as as ThinkingMessage, at as TokenDeltaUpdate, au as TokenUsage, av as ToolCall, aw as ToolCallCompletedUpdate, ax as ToolCallStartedUpdate, ay as ToolContextMessage, az as ToolResult, aA as ToolResultGuardOptions, aB as ToolUseBlock, aC as TurnEndedUpdate, aD as UserMessage, aE as UserMessageAppendedUpdate } from './run-DsA5Ip2i.cjs';
|
|
5
|
-
import { A as AgentOptions, L as LocalOptions, S as SystemPromptResolver, C as CloudOptions, M as MemorySettings, a as AgentDefinition, b as SkillsSettings, c as ListAgentsOptions, d as ListResult, e as SDKAgentInfo, G as GetAgentOptions, f as ListRunsOptions, g as GetRunOptions, h as AgentOperationOptions, i as AgentDescription, P as Plugin$1, j as ProviderProfile, I as InlineSkill, k as Skill, B as BudgetTracker, l as MemoryProvider, m as PreToolCallDecision } from './agent-
|
|
6
|
-
export { n as ActiveMemoryPassArgs, o as ActiveMemoryPassResult, p as AgentSubagentDescription, q as AgentToolDescription, r as BudgetCheck, s as BudgetTotal, t as BudgetUsageEvent, u as BuiltinToolName, v as CloudEnv, w as CloudRepo, x as CompatSource, y as CompatSourceAdapter, z as CompatSurface, D as CreateSkillSpec, H as HookApprovalGate, E as HookApprovalRequest, F as HookName, J as LlmCallContext, K as MemoryProviderAgentRef, N as MemoryProviderFactory, O as MemoryProviderHandle, Q as MemoryProviderInitOptions, R as PluginContext, T as PluginHookDisposer, U as PostAssistantReplyContext, V as PostToolCallContext, W as PreToolCallContext, X as PreUserSendContext, Y as PreUserSendResult, Z as ProviderTransform, _ as ProviderTransformContext, $ as RecordSessionSummaryArgs, a0 as SessionLifecycleContext, a1 as SessionRecord, a2 as SessionStore, a3 as SettingSource, a4 as Skill, a5 as SkillsResolver, a6 as SkillsResolverContext, a7 as SystemPromptContext, a8 as SystemPromptMemoryFact, a9 as TelemetrySettings, aa as ToolCallSummary, ab as ToolContext, ac as ToolResultTransformContext, ad as TransformContext } from './agent-
|
|
5
|
+
import { A as AgentOptions, L as LocalOptions, S as SystemPromptResolver, C as CloudOptions, M as MemorySettings, a as AgentDefinition, b as SkillsSettings, c as ListAgentsOptions, d as ListResult, e as SDKAgentInfo, G as GetAgentOptions, f as ListRunsOptions, g as GetRunOptions, h as AgentOperationOptions, i as AgentDescription, P as Plugin$1, j as ProviderProfile, I as InlineSkill, k as Skill, B as BudgetTracker, l as MemoryProvider, m as PreToolCallDecision } from './agent-XMkGzff_.cjs';
|
|
6
|
+
export { n as ActiveMemoryPassArgs, o as ActiveMemoryPassResult, p as AgentSubagentDescription, q as AgentToolDescription, r as BudgetCheck, s as BudgetTotal, t as BudgetUsageEvent, u as BuiltinToolName, v as CloudEnv, w as CloudRepo, x as CompatSource, y as CompatSourceAdapter, z as CompatSurface, D as CreateSkillSpec, H as HookApprovalGate, E as HookApprovalRequest, F as HookName, J as LlmCallContext, K as MemoryProviderAgentRef, N as MemoryProviderFactory, O as MemoryProviderHandle, Q as MemoryProviderInitOptions, R as PluginContext, T as PluginHookDisposer, U as PostAssistantReplyContext, V as PostToolCallContext, W as PreToolCallContext, X as PreUserSendContext, Y as PreUserSendResult, Z as ProviderTransform, _ as ProviderTransformContext, $ as RecordSessionSummaryArgs, a0 as SessionLifecycleContext, a1 as SessionRecord, a2 as SessionStore, a3 as SettingSource, a4 as Skill, a5 as SkillsResolver, a6 as SkillsResolverContext, a7 as SystemPromptContext, a8 as SystemPromptMemoryFact, a9 as TelemetrySettings, aa as ToolCallSummary, ab as ToolContext, ac as ToolResultTransformContext, ad as TransformContext } from './agent-XMkGzff_.cjs';
|
|
7
7
|
import * as zod from 'zod';
|
|
8
8
|
import { ZodType, z } from 'zod';
|
|
9
9
|
import { S as StructuredOutputError, B as BudgetOptions, a as BudgetHandle, b as BudgetSnapshot } from './errors-BWOJeWTZ.cjs';
|
|
10
10
|
export { A as AgentDisposedError, c as AgentRunError, d as AgentRunErrorCode, e as AuthenticationError, f as BudgetExceedEvent, g as BudgetExceededError, h as BudgetLimit, i as BudgetMode, j as BudgetScope, k as BudgetThresholdEvent, l as BudgetWindow, C as ConfigurationError, I as IntegrationNotConnectedError, m as InvalidTaskIdError, M as MemoryAdapterError, n as MemoryAdapterErrorCode, N as NetworkError, R as RateLimitError, T as TaskNotFoundError, U as UnknownAgentError, o as UnsupportedBudgetOperationError, p as UnsupportedRunOperationError, q as UnsupportedTaskOperationError, r as isTransientError } from './errors-BWOJeWTZ.cjs';
|
|
11
11
|
import { P as ProviderRoutingSettings, S as SDKAgent, C as ContextSettings, a as PluginsSettings, J as JudgeResult, G as GoalOptions, b as GoalEvent, c as GoalResult, M as MemoryId, d as SDKProvider } from './sdk-agent-dNwjwCt5.cjs';
|
|
12
12
|
export { A as AgentMemory, e as AgentOperation, f as ContextBudget, g as ContextManagerKind, h as ContextSnapshot, i as ContextSource, j as ContextSourceStatus, F as ForkOptions, k as ForkResult, I as InvalidateCacheOptions, l as MemoryAdapter, m as MemoryAdapterCapabilities, n as MemoryContext, o as MemoryFact, p as MemoryRevision, q as MemoryToolSchema, r as MemoryTurnMessage, s as PersonalityPreset, t as ProviderCapability, u as ProviderRoute, R as ResolvedProviderRoute, v as RunUntilIterator, w as SDKAgentPlugins, x as SDKAgentSkillDetail, y as SDKAgentSkills, z as SDKArtifact, B as SDKContextManager, D as SDKPluginMetadata, E as SDKProvidersManager, H as SystemPromptSkillRef, V as Verdict } from './sdk-agent-dNwjwCt5.cjs';
|
|
13
|
-
export { C as Cron, a as CronCreateOptions, b as CronGetOptions, c as CronJob, d as CronJobStatus, e as CronListOptions, f as CronOperationOptions, g as CronRunOptions, h as CronRuntime, i as CronSchedulerStatus, j as CronStartOptions } from './cron-
|
|
13
|
+
export { C as Cron, a as CronCreateOptions, b as CronGetOptions, c as CronJob, d as CronJobStatus, e as CronListOptions, f as CronOperationOptions, g as CronRunOptions, h as CronRuntime, i as CronSchedulerStatus, j as CronStartOptions } from './cron-Blj6wMYg.cjs';
|
|
14
14
|
import { StepResult } from './workflow.cjs';
|
|
15
15
|
export { Workflow, agentStep, fn } from './workflow.cjs';
|
|
16
16
|
|
|
@@ -2673,6 +2673,15 @@ interface DreamingSweepResult {
|
|
|
2673
2673
|
duplicatesRemoved: number;
|
|
2674
2674
|
clustersCreated: number;
|
|
2675
2675
|
notesWritten: number;
|
|
2676
|
+
/**
|
|
2677
|
+
* How many facts this sweep left out of clustering. A sweep clusters at most 500 facts, counted
|
|
2678
|
+
* after near-duplicates are removed; the rest wait for a later sweep, and this field is how many
|
|
2679
|
+
* that was. 0 on `"ok"` when nothing was left out and on `"skipped"`.
|
|
2680
|
+
*
|
|
2681
|
+
* Absent when the sweep failed or when an older `@theokit/sdk-memory` ran it without reporting
|
|
2682
|
+
* the count; never read absence as 0.
|
|
2683
|
+
*/
|
|
2684
|
+
factsLeftOut?: number;
|
|
2676
2685
|
}
|
|
2677
2686
|
/**
|
|
2678
2687
|
* Options for `Memory.openIndex`. Mirrors the internal `OpenIndexOptions`
|
package/dist/index.d.ts
CHANGED
|
@@ -2,15 +2,15 @@ import { T as TheokitAgentError, E as ErrorMetadata } from './errors-base-B5g01n
|
|
|
2
2
|
export { a as ErrorCode } from './errors-base-B5g01neU.js';
|
|
3
3
|
import { H as RunEvent, j as CostBreakdown, au as TokenUsage, R as RunResult, M as ModelSelection, C as CustomTool, a as McpServerConfig, T as ToolResultContentBlock, b as Run, P as Processor, c as PermissionMode, d as RunEventSink$1, S as SDKMessage } from './run-DsA5Ip2i.js';
|
|
4
4
|
export { A as AgentConversationTurn, e as AssistantMessage, f as CompletionCheck, g as CompletionCheckResult, h as ConversationStep, i as ConversationTurn, j as CostBreakdown, k as CostSource, l as CostStatus, D as DoomLoopThresholds, E as EnvPolicy, G as GenerateOptions, m as GenerateRunResult, I as ImageBlock, n as InputProcessorContext, o as InteractionUpdate, p as McpAuthConfig, q as McpHttpServerConfig, r as McpOAuthConfig, s as McpStdioServerConfig, t as MessageOrigin, u as ModelParameterValue, O as OutputProcessorContext, v as PartialToolCallUpdate, w as ProcessorControls, x as ProcessorTripwire, y as ProcessorViolation, z as RunCompactBoundaryEvent, B as RunCompletionCheckEvent, F as RunErrorDetail, H as RunEvent, J as RunGitInfo, K as RunMemoryDegradedEvent, L as RunOperation, N as RunPermissionDeniedEvent, Q as RunRateLimitEvent, U as RunStatus, V as RunTaskCompletedEvent, W as RunTaskStartedEvent, X as RunTaskUpdatedEvent, Y as RunTimelineEvent, Z as RunToCompletionOptions, _ as RunToCompletionResult, $ as RunToolProgressEvent, a0 as RunTripwireEvent, a1 as SDKAssistantMessage, a2 as SDKImage, a3 as SDKImageDimension, a4 as SDKObjectDelta, a5 as SDKRequestMessage, a6 as SDKStatusMessage, a7 as SDKSystemMessage, a8 as SDKTaskMessage, a9 as SDKThinkingMessage, aa as SDKToolUseMessage, ab as SDKUserMessage, ac as SDKUserMessageEvent, ad as SendOptions, ae as ShellCommand, af as ShellConversationTurn, ag as ShellOutput, ah as ShellOutputDeltaUpdate, ai as StepCompletedUpdate, aj as StepStartedUpdate, ak as StreamToCompletionResult, al as SummaryCompletedUpdate, am as SummaryStartedUpdate, an as SummaryUpdate, ao as TextBlock, ap as TextDeltaUpdate, aq as ThinkingCompletedUpdate, ar as ThinkingDeltaUpdate, as as ThinkingMessage, at as TokenDeltaUpdate, au as TokenUsage, av as ToolCall, aw as ToolCallCompletedUpdate, ax as ToolCallStartedUpdate, ay as ToolContextMessage, az as ToolResult, aA as ToolResultGuardOptions, aB as ToolUseBlock, aC as TurnEndedUpdate, aD as UserMessage, aE as UserMessageAppendedUpdate } from './run-DsA5Ip2i.js';
|
|
5
|
-
import { A as AgentOptions, L as LocalOptions, S as SystemPromptResolver, C as CloudOptions, M as MemorySettings, a as AgentDefinition, b as SkillsSettings, c as ListAgentsOptions, d as ListResult, e as SDKAgentInfo, G as GetAgentOptions, f as ListRunsOptions, g as GetRunOptions, h as AgentOperationOptions, i as AgentDescription, P as Plugin$1, j as ProviderProfile, I as InlineSkill, k as Skill, B as BudgetTracker, l as MemoryProvider, m as PreToolCallDecision } from './agent-
|
|
6
|
-
export { n as ActiveMemoryPassArgs, o as ActiveMemoryPassResult, p as AgentSubagentDescription, q as AgentToolDescription, r as BudgetCheck, s as BudgetTotal, t as BudgetUsageEvent, u as BuiltinToolName, v as CloudEnv, w as CloudRepo, x as CompatSource, y as CompatSourceAdapter, z as CompatSurface, D as CreateSkillSpec, H as HookApprovalGate, E as HookApprovalRequest, F as HookName, J as LlmCallContext, K as MemoryProviderAgentRef, N as MemoryProviderFactory, O as MemoryProviderHandle, Q as MemoryProviderInitOptions, R as PluginContext, T as PluginHookDisposer, U as PostAssistantReplyContext, V as PostToolCallContext, W as PreToolCallContext, X as PreUserSendContext, Y as PreUserSendResult, Z as ProviderTransform, _ as ProviderTransformContext, $ as RecordSessionSummaryArgs, a0 as SessionLifecycleContext, a1 as SessionRecord, a2 as SessionStore, a3 as SettingSource, a4 as Skill, a5 as SkillsResolver, a6 as SkillsResolverContext, a7 as SystemPromptContext, a8 as SystemPromptMemoryFact, a9 as TelemetrySettings, aa as ToolCallSummary, ab as ToolContext, ac as ToolResultTransformContext, ad as TransformContext } from './agent-
|
|
5
|
+
import { A as AgentOptions, L as LocalOptions, S as SystemPromptResolver, C as CloudOptions, M as MemorySettings, a as AgentDefinition, b as SkillsSettings, c as ListAgentsOptions, d as ListResult, e as SDKAgentInfo, G as GetAgentOptions, f as ListRunsOptions, g as GetRunOptions, h as AgentOperationOptions, i as AgentDescription, P as Plugin$1, j as ProviderProfile, I as InlineSkill, k as Skill, B as BudgetTracker, l as MemoryProvider, m as PreToolCallDecision } from './agent-CmKwSyyD.js';
|
|
6
|
+
export { n as ActiveMemoryPassArgs, o as ActiveMemoryPassResult, p as AgentSubagentDescription, q as AgentToolDescription, r as BudgetCheck, s as BudgetTotal, t as BudgetUsageEvent, u as BuiltinToolName, v as CloudEnv, w as CloudRepo, x as CompatSource, y as CompatSourceAdapter, z as CompatSurface, D as CreateSkillSpec, H as HookApprovalGate, E as HookApprovalRequest, F as HookName, J as LlmCallContext, K as MemoryProviderAgentRef, N as MemoryProviderFactory, O as MemoryProviderHandle, Q as MemoryProviderInitOptions, R as PluginContext, T as PluginHookDisposer, U as PostAssistantReplyContext, V as PostToolCallContext, W as PreToolCallContext, X as PreUserSendContext, Y as PreUserSendResult, Z as ProviderTransform, _ as ProviderTransformContext, $ as RecordSessionSummaryArgs, a0 as SessionLifecycleContext, a1 as SessionRecord, a2 as SessionStore, a3 as SettingSource, a4 as Skill, a5 as SkillsResolver, a6 as SkillsResolverContext, a7 as SystemPromptContext, a8 as SystemPromptMemoryFact, a9 as TelemetrySettings, aa as ToolCallSummary, ab as ToolContext, ac as ToolResultTransformContext, ad as TransformContext } from './agent-CmKwSyyD.js';
|
|
7
7
|
import * as zod from 'zod';
|
|
8
8
|
import { ZodType, z } from 'zod';
|
|
9
9
|
import { S as StructuredOutputError, B as BudgetOptions, a as BudgetHandle, b as BudgetSnapshot } from './errors-DDvG18IB.js';
|
|
10
10
|
export { A as AgentDisposedError, c as AgentRunError, d as AgentRunErrorCode, e as AuthenticationError, f as BudgetExceedEvent, g as BudgetExceededError, h as BudgetLimit, i as BudgetMode, j as BudgetScope, k as BudgetThresholdEvent, l as BudgetWindow, C as ConfigurationError, I as IntegrationNotConnectedError, m as InvalidTaskIdError, M as MemoryAdapterError, n as MemoryAdapterErrorCode, N as NetworkError, R as RateLimitError, T as TaskNotFoundError, U as UnknownAgentError, o as UnsupportedBudgetOperationError, p as UnsupportedRunOperationError, q as UnsupportedTaskOperationError, r as isTransientError } from './errors-DDvG18IB.js';
|
|
11
11
|
import { P as ProviderRoutingSettings, S as SDKAgent, C as ContextSettings, a as PluginsSettings, J as JudgeResult, G as GoalOptions, b as GoalEvent, c as GoalResult, M as MemoryId, d as SDKProvider } from './sdk-agent-wEOLXD3F.js';
|
|
12
12
|
export { A as AgentMemory, e as AgentOperation, f as ContextBudget, g as ContextManagerKind, h as ContextSnapshot, i as ContextSource, j as ContextSourceStatus, F as ForkOptions, k as ForkResult, I as InvalidateCacheOptions, l as MemoryAdapter, m as MemoryAdapterCapabilities, n as MemoryContext, o as MemoryFact, p as MemoryRevision, q as MemoryToolSchema, r as MemoryTurnMessage, s as PersonalityPreset, t as ProviderCapability, u as ProviderRoute, R as ResolvedProviderRoute, v as RunUntilIterator, w as SDKAgentPlugins, x as SDKAgentSkillDetail, y as SDKAgentSkills, z as SDKArtifact, B as SDKContextManager, D as SDKPluginMetadata, E as SDKProvidersManager, H as SystemPromptSkillRef, V as Verdict } from './sdk-agent-wEOLXD3F.js';
|
|
13
|
-
export { C as Cron, a as CronCreateOptions, b as CronGetOptions, c as CronJob, d as CronJobStatus, e as CronListOptions, f as CronOperationOptions, g as CronRunOptions, h as CronRuntime, i as CronSchedulerStatus, j as CronStartOptions } from './cron-
|
|
13
|
+
export { C as Cron, a as CronCreateOptions, b as CronGetOptions, c as CronJob, d as CronJobStatus, e as CronListOptions, f as CronOperationOptions, g as CronRunOptions, h as CronRuntime, i as CronSchedulerStatus, j as CronStartOptions } from './cron-BPccQCO8.js';
|
|
14
14
|
import { StepResult } from './workflow.js';
|
|
15
15
|
export { Workflow, agentStep, fn } from './workflow.js';
|
|
16
16
|
|
|
@@ -2673,6 +2673,15 @@ interface DreamingSweepResult {
|
|
|
2673
2673
|
duplicatesRemoved: number;
|
|
2674
2674
|
clustersCreated: number;
|
|
2675
2675
|
notesWritten: number;
|
|
2676
|
+
/**
|
|
2677
|
+
* How many facts this sweep left out of clustering. A sweep clusters at most 500 facts, counted
|
|
2678
|
+
* after near-duplicates are removed; the rest wait for a later sweep, and this field is how many
|
|
2679
|
+
* that was. 0 on `"ok"` when nothing was left out and on `"skipped"`.
|
|
2680
|
+
*
|
|
2681
|
+
* Absent when the sweep failed or when an older `@theokit/sdk-memory` ran it without reporting
|
|
2682
|
+
* the count; never read absence as 0.
|
|
2683
|
+
*/
|
|
2684
|
+
factsLeftOut?: number;
|
|
2676
2685
|
}
|
|
2677
2686
|
/**
|
|
2678
2687
|
* Options for `Memory.openIndex`. Mirrors the internal `OpenIndexOptions`
|
package/dist/index.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
export { StreamObjectError } from './chunk-AY43232P.js';
|
|
2
2
|
export { GOAL_CONTINUATION_MARKER } from './chunk-PY2RQOA7.js';
|
|
3
3
|
export { JudgeCredentialError } from './chunk-X6DUEDAF.js';
|
|
4
|
-
import { migrateSqliteToLance, appendDiaryEntry } from './chunk-
|
|
4
|
+
import { migrateSqliteToLance, appendDiaryEntry } from './chunk-W2ZVTEOD.js';
|
|
5
5
|
export { GenerateObjectError } from './chunk-26NEAJ6T.js';
|
|
6
6
|
import './chunk-KO6SHCEH.js';
|
|
7
7
|
import { Workflow, agentStep } from './chunk-MU7IAA7G.js';
|
|
8
8
|
export { Workflow, agentStep, fn } from './chunk-MU7IAA7G.js';
|
|
9
9
|
import './chunk-HV4V63CO.js';
|
|
10
10
|
import './chunk-HY66GLM6.js';
|
|
11
|
-
export { Cron } from './chunk-
|
|
12
|
-
import { MEMORY_EMBEDDING_ADAPTERS, resolveSessionDir, DEFAULT_AGENTIC_MODEL_ID, Agent } from './chunk-
|
|
13
|
-
export { Agent, AgentBuilder, Tool, ToolError, UsageAccumulator, computeCost, getPricingEntry, managedSettingsPathFor, readManagedSettings } from './chunk-
|
|
11
|
+
export { Cron } from './chunk-523O5UYB.js';
|
|
12
|
+
import { MEMORY_EMBEDDING_ADAPTERS, resolveSessionDir, DEFAULT_AGENTIC_MODEL_ID, Agent } from './chunk-RTE2DD4S.js';
|
|
13
|
+
export { Agent, AgentBuilder, Tool, ToolError, UsageAccumulator, computeCost, getPricingEntry, managedSettingsPathFor, readManagedSettings } from './chunk-RTE2DD4S.js';
|
|
14
14
|
import { configure, submit, list, get, cancel, subscribe } from './chunk-XKMVJ443.js';
|
|
15
15
|
export { emitRunEvent } from './chunk-XKMVJ443.js';
|
|
16
16
|
import './chunk-EXI7EHDN.js';
|
|
17
17
|
import './chunk-K2BQQ445.js';
|
|
18
|
-
import './chunk-
|
|
18
|
+
import './chunk-DPY2M74T.js';
|
|
19
19
|
import './chunk-ZHWKT2NI.js';
|
|
20
20
|
import './chunk-2SFBB54R.js';
|
|
21
21
|
import './chunk-HI3W37FY.js';
|
|
22
22
|
import './chunk-H73MEMQB.js';
|
|
23
23
|
import './chunk-OR6XIWLB.js';
|
|
24
|
-
import { resolveMemoryRoot, readFactsFromMarkdown } from './chunk-
|
|
25
|
-
import { FsSessionStore } from './chunk-
|
|
24
|
+
import { resolveMemoryRoot, readFactsFromMarkdown } from './chunk-X3LOJJMO.js';
|
|
25
|
+
import { FsSessionStore } from './chunk-IZDDSLL2.js';
|
|
26
26
|
import { discoverProviderPlugins, shouldUseFixtureMode, isFixtureApiKey, httpRequest, mapOllamaTransportError, readErrorResponseBody, mapOllamaHttpError } from './chunk-EVH3OUMY.js';
|
|
27
27
|
import './chunk-SUVCHX4L.js';
|
|
28
28
|
import './chunk-2XC6KDJM.js';
|
|
@@ -51,7 +51,8 @@ import './chunk-GTX6FEDP.js';
|
|
|
51
51
|
import './chunk-FTZTZBCU.js';
|
|
52
52
|
import './chunk-WE22OXQA.js';
|
|
53
53
|
import './chunk-XZHJYSPB.js';
|
|
54
|
-
import './chunk-
|
|
54
|
+
import './chunk-7KIN3L2S.js';
|
|
55
|
+
import './chunk-RGQICWFU.js';
|
|
55
56
|
import { withCwdMutex } from './chunk-Q5EWJPRY.js';
|
|
56
57
|
export { withCwdMutex } from './chunk-Q5EWJPRY.js';
|
|
57
58
|
export { TASK_RESERVED_PREFIXES, isValidTaskId } from './chunk-GGRPAQ3B.js';
|
|
@@ -1178,12 +1179,15 @@ async function dedupCandidates(facts, embedding, threshold) {
|
|
|
1178
1179
|
}
|
|
1179
1180
|
var DEFAULT_MAX_FACTS_PER_SWEEP = 500;
|
|
1180
1181
|
async function remPhase(facts, embedding, threshold = DEFAULT_CLUSTER_THRESHOLD, maxFactsPerSweep = DEFAULT_MAX_FACTS_PER_SWEEP) {
|
|
1181
|
-
if (facts.length === 0) return { clusters: [] };
|
|
1182
|
+
if (facts.length === 0) return { clusters: [], factsLeftOut: 0 };
|
|
1182
1183
|
const capped = facts.length > maxFactsPerSweep ? facts.slice(0, maxFactsPerSweep) : facts;
|
|
1183
1184
|
const vectors = await embedding.embed(capped.map((f) => f.text));
|
|
1184
1185
|
const clusterOfIdx = unionFindByPairs(vectors, threshold);
|
|
1185
1186
|
const groups = bucketFactsByClusterRoot(capped, clusterOfIdx);
|
|
1186
|
-
return {
|
|
1187
|
+
return {
|
|
1188
|
+
clusters: [...groups.values()].map(buildClusterFromMembers),
|
|
1189
|
+
factsLeftOut: facts.length - capped.length
|
|
1190
|
+
};
|
|
1187
1191
|
}
|
|
1188
1192
|
function unionFindByPairs(vectors, threshold) {
|
|
1189
1193
|
const clusterOfIdx = vectors.map((_, i) => i);
|
|
@@ -1282,7 +1286,8 @@ async function runInner(options) {
|
|
|
1282
1286
|
duplicatesRemoved: dedup.duplicatesRemoved,
|
|
1283
1287
|
clustersCreated: rem.clusters.length,
|
|
1284
1288
|
notesWritten,
|
|
1285
|
-
diaryEntryHash: void 0
|
|
1289
|
+
diaryEntryHash: void 0,
|
|
1290
|
+
factsLeftOut: rem.factsLeftOut
|
|
1286
1291
|
};
|
|
1287
1292
|
await appendDiaryEntry(root, {
|
|
1288
1293
|
timestampMs,
|
|
@@ -1311,7 +1316,7 @@ async function writeConsolidatedNotes(root, clusters, timestampMs) {
|
|
|
1311
1316
|
return 1;
|
|
1312
1317
|
}
|
|
1313
1318
|
function emptyResult(status) {
|
|
1314
|
-
|
|
1319
|
+
const result = {
|
|
1315
1320
|
status,
|
|
1316
1321
|
factsBefore: 0,
|
|
1317
1322
|
factsAfter: 0,
|
|
@@ -1320,6 +1325,7 @@ function emptyResult(status) {
|
|
|
1320
1325
|
notesWritten: 0,
|
|
1321
1326
|
diaryEntryHash: void 0
|
|
1322
1327
|
};
|
|
1328
|
+
return status === "skipped" ? { ...result, factsLeftOut: 0 } : result;
|
|
1323
1329
|
}
|
|
1324
1330
|
|
|
1325
1331
|
// src/internal/memory/sdk-memory-peer-loader.ts
|
|
@@ -1378,7 +1384,7 @@ var Memory = {
|
|
|
1378
1384
|
openArgs.embedding = await resolveEmbedding(opts.embedding, peer.MEMORY_EMBEDDING_ADAPTERS);
|
|
1379
1385
|
return await peer.IndexManager.open(openArgs);
|
|
1380
1386
|
}
|
|
1381
|
-
const { IndexManager } = await import('./index-manager-
|
|
1387
|
+
const { IndexManager } = await import('./index-manager-JVYIVTZG.js');
|
|
1382
1388
|
openArgs.embedding = await resolveEmbedding(opts.embedding, MEMORY_EMBEDDING_ADAPTERS);
|
|
1383
1389
|
return await IndexManager.open(openArgs);
|
|
1384
1390
|
},
|
|
@@ -1437,7 +1443,8 @@ function toDreamingSweepResult(result) {
|
|
|
1437
1443
|
factsAfter: result.factsAfter,
|
|
1438
1444
|
duplicatesRemoved: result.duplicatesRemoved,
|
|
1439
1445
|
clustersCreated: result.clustersCreated,
|
|
1440
|
-
notesWritten: result.notesWritten
|
|
1446
|
+
notesWritten: result.notesWritten,
|
|
1447
|
+
...result.factsLeftOut !== void 0 ? { factsLeftOut: result.factsLeftOut } : {}
|
|
1441
1448
|
};
|
|
1442
1449
|
}
|
|
1443
1450
|
|
|
@@ -2017,7 +2024,7 @@ function isBuiltAgent(m) {
|
|
|
2017
2024
|
return typeof m.send === "function";
|
|
2018
2025
|
}
|
|
2019
2026
|
async function materialize(def, index) {
|
|
2020
|
-
const { Agent: Agent2 } = await import('./agent-
|
|
2027
|
+
const { Agent: Agent2 } = await import('./agent-XTLAVVYC.js');
|
|
2021
2028
|
return Agent2.create({
|
|
2022
2029
|
// `AgentDefinition.model` admits the sentinel `'inherit'`, which is not a model id. Inheriting
|
|
2023
2030
|
// here means "declare nothing and let the default apply" — forwarding the literal would create
|