@theokit/sdk 5.9.1 → 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 +119 -0
- package/dist/{agent-enXXu447.d.ts → agent-CmKwSyyD.d.ts} +27 -0
- package/dist/{agent-5M7WLUWH.cjs → agent-TLRURB7W.cjs} +18 -16
- package/dist/{agent-5M7WLUWH.cjs.map → agent-TLRURB7W.cjs.map} +1 -1
- package/dist/{agent-Dh2YHSLj.d.cts → agent-XMkGzff_.d.cts} +27 -0
- package/dist/{agent-R5RERYFU.js → agent-XTLAVVYC.js} +17 -15
- package/dist/{agent-R5RERYFU.js.map → agent-XTLAVVYC.js.map} +1 -1
- package/dist/agent-session-store-ODD3IZCW.js +6 -0
- package/dist/{agent-session-store-AFML3AXC.js.map → agent-session-store-ODD3IZCW.js.map} +1 -1
- package/dist/agent-session-store-SVEJHSUA.cjs +23 -0
- package/dist/{agent-session-store-MTSIY3MH.cjs.map → agent-session-store-SVEJHSUA.cjs.map} +1 -1
- package/dist/auth/index.cjs +8 -7
- package/dist/auth/index.cjs.map +1 -1
- package/dist/auth/index.js +3 -2
- package/dist/auth/index.js.map +1 -1
- package/dist/{chunk-QCIARBLS.js → chunk-523O5UYB.js} +3 -3
- package/dist/{chunk-QCIARBLS.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-56BCEM26.cjs → chunk-CVEQ5366.cjs} +105 -91
- package/dist/chunk-CVEQ5366.cjs.map +1 -0
- package/dist/{chunk-R2C3HXR3.js → chunk-DPY2M74T.js} +3 -3
- package/dist/{chunk-R2C3HXR3.js.map → chunk-DPY2M74T.js.map} +1 -1
- package/dist/chunk-EHD25JBZ.cjs +10 -0
- package/dist/chunk-EHD25JBZ.cjs.map +1 -0
- package/dist/{chunk-NOO6GZTZ.js → chunk-EVH3OUMY.js} +13 -12
- package/dist/chunk-EVH3OUMY.js.map +1 -0
- package/dist/{chunk-5522X223.js → chunk-EXI7EHDN.js} +4 -4
- package/dist/{chunk-5522X223.js.map → chunk-EXI7EHDN.js.map} +1 -1
- package/dist/{chunk-PSLCVSCS.cjs → chunk-FR6COQXZ.cjs} +6 -6
- package/dist/{chunk-PSLCVSCS.cjs.map → chunk-FR6COQXZ.cjs.map} +1 -1
- package/dist/{chunk-JOFVLOFY.js → chunk-FTZTZBCU.js} +12 -4
- package/dist/chunk-FTZTZBCU.js.map +1 -0
- package/dist/{chunk-T5KOSR5Y.cjs → chunk-FYEHYQ7T.cjs} +8 -8
- package/dist/{chunk-T5KOSR5Y.cjs.map → chunk-FYEHYQ7T.cjs.map} +1 -1
- package/dist/{chunk-HOHR75KF.js → chunk-HI3W37FY.js} +4 -3
- package/dist/chunk-HI3W37FY.js.map +1 -0
- package/dist/chunk-HU666T3Q.cjs +1891 -0
- package/dist/chunk-HU666T3Q.cjs.map +1 -0
- package/dist/{chunk-53RDNK3H.js → chunk-I2ORT6QD.js} +3 -3
- package/dist/{chunk-53RDNK3H.js.map → chunk-I2ORT6QD.js.map} +1 -1
- package/dist/{chunk-UNZOJVVC.js → chunk-IZDDSLL2.js} +5 -4
- package/dist/chunk-IZDDSLL2.js.map +1 -0
- package/dist/{chunk-TTBIQTO5.cjs → chunk-L3C6CCBG.cjs} +15 -15
- package/dist/{chunk-TTBIQTO5.cjs.map → chunk-L3C6CCBG.cjs.map} +1 -1
- package/dist/{chunk-B3XXQX6L.cjs → chunk-NQVWSSX2.cjs} +10 -9
- package/dist/chunk-NQVWSSX2.cjs.map +1 -0
- package/dist/{chunk-LL4QA3DI.cjs → chunk-PCLRIQPX.cjs} +4 -4
- package/dist/{chunk-LL4QA3DI.cjs.map → chunk-PCLRIQPX.cjs.map} +1 -1
- package/dist/chunk-Q7GYMXVC.js +8 -0
- package/dist/chunk-Q7GYMXVC.js.map +1 -0
- package/dist/{chunk-ARMFXTY6.cjs → chunk-QY3CIMUV.cjs} +34 -33
- package/dist/chunk-QY3CIMUV.cjs.map +1 -0
- 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-OOM236Z4.js → chunk-RTE2DD4S.js} +32 -18
- package/dist/chunk-RTE2DD4S.js.map +1 -0
- package/dist/chunk-SGC7LSHF.cjs +18 -0
- package/dist/{chunk-R3ZQBPA5.cjs.map → chunk-SGC7LSHF.cjs.map} +1 -1
- package/dist/{chunk-RA7IE4NK.cjs → chunk-SKDNCTXG.cjs} +4 -3
- package/dist/chunk-SKDNCTXG.cjs.map +1 -0
- package/dist/chunk-SVCPJRUB.js +1874 -0
- package/dist/chunk-SVCPJRUB.js.map +1 -0
- package/dist/{chunk-EJROML3Q.js → chunk-TX56N7FR.js} +4 -3
- package/dist/chunk-TX56N7FR.js.map +1 -0
- package/dist/{chunk-QDQQYRJI.js → chunk-W2ZVTEOD.js} +3 -3
- package/dist/{chunk-QDQQYRJI.js.map → chunk-W2ZVTEOD.js.map} +1 -1
- package/dist/{chunk-TC4RWP3Y.js → chunk-X3LOJJMO.js} +89 -29
- package/dist/chunk-X3LOJJMO.js.map +1 -0
- package/dist/{chunk-2WXHA33T.js → chunk-XERM7PDQ.js} +3 -3
- package/dist/{chunk-2WXHA33T.js.map → chunk-XERM7PDQ.js.map} +1 -1
- package/dist/{chunk-MEUBLCM4.cjs → chunk-YEHQ3SIC.cjs} +4 -3
- package/dist/chunk-YEHQ3SIC.cjs.map +1 -0
- package/dist/{chunk-YIFFF23U.cjs → chunk-ZAM7BJXJ.cjs} +5 -5
- package/dist/{chunk-YIFFF23U.cjs.map → chunk-ZAM7BJXJ.cjs.map} +1 -1
- package/dist/{chunk-76PIKR4P.cjs → chunk-ZD66GFH5.cjs} +91 -29
- package/dist/chunk-ZD66GFH5.cjs.map +1 -0
- package/dist/{chunk-GZV6AVRL.cjs → chunk-ZWACQM5U.cjs} +11 -3
- package/dist/chunk-ZWACQM5U.cjs.map +1 -0
- package/dist/{compact-session-RBPLUPCK.cjs → compact-session-4QHBBGEY.cjs} +16 -15
- package/dist/{compact-session-RBPLUPCK.cjs.map → compact-session-4QHBBGEY.cjs.map} +1 -1
- package/dist/{compact-session-2N3ZYJTW.js → compact-session-PVAWTKKL.js} +7 -6
- package/dist/{compact-session-2N3ZYJTW.js.map → compact-session-PVAWTKKL.js.map} +1 -1
- 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 +17 -15
- package/dist/cron.d.cts +2 -2
- package/dist/cron.d.ts +2 -2
- package/dist/cron.js +16 -14
- package/dist/eval.cjs +20 -18
- package/dist/eval.cjs.map +1 -1
- package/dist/eval.js +16 -14
- package/dist/eval.js.map +1 -1
- package/dist/fs-session-store-3VI4CPTX.js +11 -0
- package/dist/{fs-session-store-STZZFXH2.js.map → fs-session-store-3VI4CPTX.js.map} +1 -1
- package/dist/fs-session-store-IQ6PEHYF.cjs +20 -0
- package/dist/{fs-session-store-JHBJFKVV.cjs.map → fs-session-store-IQ6PEHYF.cjs.map} +1 -1
- package/dist/{index-manager-ONQJSWX5.js → index-manager-JVYIVTZG.js} +6 -5
- package/dist/{index-manager-ONQJSWX5.js.map → index-manager-JVYIVTZG.js.map} +1 -1
- package/dist/{index-manager-ZGJN25FD.cjs → index-manager-YGXRFJMZ.cjs} +7 -6
- package/dist/{index-manager-ZGJN25FD.cjs.map → index-manager-YGXRFJMZ.cjs.map} +1 -1
- package/dist/index.cjs +68 -60
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +42 -6
- package/dist/index.d.ts +42 -6
- package/dist/index.js +31 -23
- package/dist/index.js.map +1 -1
- package/dist/{inject-session-YNNOE3O6.js → inject-session-O24XGRR6.js} +5 -5
- package/dist/{inject-session-YNNOE3O6.js.map → inject-session-O24XGRR6.js.map} +1 -1
- package/dist/{inject-session-3FPXJDJP.cjs → inject-session-OMLFL2V3.cjs} +7 -7
- package/dist/{inject-session-3FPXJDJP.cjs.map → inject-session-OMLFL2V3.cjs.map} +1 -1
- package/dist/internal/memory/adapters/index.cjs +3 -2
- package/dist/internal/memory/adapters/index.js +2 -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 +41 -32
- 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 +4 -3
- 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/persistence/persistence-schema.d.cts +1 -1
- package/dist/internal/persistence/persistence-schema.d.ts +1 -1
- package/dist/internal/providers/catalog-loader.d.ts +30 -3
- package/dist/internal/runtime/registry/agent-registry-store.d.ts +2 -0
- package/dist/internal/runtime-fetch.d.ts +1 -0
- package/dist/models.cjs +12 -11
- package/dist/models.cjs.map +1 -1
- package/dist/models.js +4 -3
- package/dist/models.js.map +1 -1
- package/dist/persistence.cjs +14 -13
- package/dist/persistence.cjs.map +1 -1
- package/dist/persistence.js +4 -3
- package/dist/persistence.js.map +1 -1
- package/dist/providers.cjs +6 -5
- package/dist/providers.js +4 -3
- package/dist/{session-transcript-VTBTCGQX.js → session-transcript-AR7IBICT.js} +3 -3
- package/dist/{session-transcript-VTBTCGQX.js.map → session-transcript-AR7IBICT.js.map} +1 -1
- package/dist/{session-transcript-LGHSNVY5.cjs → session-transcript-RACG7BK2.cjs} +16 -16
- package/dist/{session-transcript-LGHSNVY5.cjs.map → session-transcript-RACG7BK2.cjs.map} +1 -1
- package/dist/subagents-loader.d.cts +1 -1
- package/dist/subagents-loader.d.ts +1 -1
- package/dist/subscription/index.cjs +2 -1
- package/dist/subscription/index.cjs.map +1 -1
- package/dist/subscription/index.js +2 -1
- package/dist/subscription/index.js.map +1 -1
- package/dist/types/agent.d.ts +27 -0
- package/docs/error-codes.md +40 -38
- package/docs/harness-capability-map.md +6 -1
- package/package.json +2 -2
- package/dist/agent-session-store-AFML3AXC.js +0 -6
- package/dist/agent-session-store-MTSIY3MH.cjs +0 -23
- package/dist/chunk-56BCEM26.cjs.map +0 -1
- package/dist/chunk-76PIKR4P.cjs.map +0 -1
- package/dist/chunk-ARMFXTY6.cjs.map +0 -1
- package/dist/chunk-B3XXQX6L.cjs.map +0 -1
- package/dist/chunk-BKMDRBJ7.js +0 -180
- package/dist/chunk-BKMDRBJ7.js.map +0 -1
- package/dist/chunk-EJROML3Q.js.map +0 -1
- package/dist/chunk-GZV6AVRL.cjs.map +0 -1
- package/dist/chunk-HOHR75KF.js.map +0 -1
- package/dist/chunk-JOFVLOFY.js.map +0 -1
- package/dist/chunk-MEUBLCM4.cjs.map +0 -1
- package/dist/chunk-MFZODA5Y.js +0 -583
- package/dist/chunk-MFZODA5Y.js.map +0 -1
- package/dist/chunk-NOO6GZTZ.js.map +0 -1
- package/dist/chunk-OF2CLCTH.cjs +0 -186
- package/dist/chunk-OF2CLCTH.cjs.map +0 -1
- package/dist/chunk-OOM236Z4.js.map +0 -1
- package/dist/chunk-R3ZQBPA5.cjs +0 -18
- package/dist/chunk-RA7IE4NK.cjs.map +0 -1
- package/dist/chunk-TC4RWP3Y.js.map +0 -1
- package/dist/chunk-UNZOJVVC.js.map +0 -1
- package/dist/chunk-YRJA2POB.cjs +0 -601
- package/dist/chunk-YRJA2POB.cjs.map +0 -1
- package/dist/fs-session-store-JHBJFKVV.cjs +0 -19
- package/dist/fs-session-store-STZZFXH2.js +0 -10
- package/dist/provider-catalog.json +0 -1295
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`
|
|
@@ -3889,10 +3898,37 @@ declare class Task {
|
|
|
3889
3898
|
}
|
|
3890
3899
|
|
|
3891
3900
|
/**
|
|
3892
|
-
*
|
|
3901
|
+
* Provider catalog loader (T10.1, ADR D447).
|
|
3902
|
+
*
|
|
3903
|
+
* Provider metadata, EMBEDDED at build time. Malformed entries are skipped with WARN (EC-1) — never
|
|
3904
|
+
* crash.
|
|
3905
|
+
*
|
|
3906
|
+
* ## Why embedded and not read from disk
|
|
3907
|
+
*
|
|
3908
|
+
* It used to be `readFileSync` from a directory computed as
|
|
3909
|
+
* `dirname(fileURLToPath(import.meta.url))` at module scope. Both halves break on a runtime with no
|
|
3910
|
+
* filesystem, in that order, and this file is only model METADATA — so an environment that could not
|
|
3911
|
+
* read it could not run a turn at all.
|
|
3912
|
+
*
|
|
3913
|
+
* Measured end to end on 2026-09-28, driving a real deploy of a TheoKit app (theokit#705):
|
|
3914
|
+
*
|
|
3915
|
+
* 1. Cloudflare EXECUTES the top-level module during validation, so the upload was refused before
|
|
3916
|
+
* any request existed — `The "path" argument must be of type string … Received undefined`,
|
|
3917
|
+
* code 10021.
|
|
3918
|
+
* 2. With `import.meta.url` substituted by the consumer's bundler, the module initialised and the
|
|
3919
|
+
* TURN failed: `[unenv] fs.readFileSync is not implemented yet!`
|
|
3920
|
+
* 3. With a newer `compatibility_date`, workerd implements `readFileSync` and the error became the
|
|
3921
|
+
* honest one: `ENOENT: readAll '/provider-catalog.json'`. The same `ENOENT` reached a deployed
|
|
3922
|
+
* Vercel function, whose bundle carries the JS and not the JSON.
|
|
3923
|
+
*
|
|
3924
|
+
* No consumer's bundler can fix that from outside. Probed from inside a deployed worker, workerd's
|
|
3925
|
+
* whole virtual filesystem is `/bundle/worker.js`, an empty `/tmp` and `/dev` — there is nowhere to
|
|
3926
|
+
* put this package's private data file such that `join(dirname(<a file URL>), …)` finds it, short of
|
|
3927
|
+
* hardcoding our internal layout into their build.
|
|
3893
3928
|
*
|
|
3894
|
-
*
|
|
3895
|
-
*
|
|
3929
|
+
* `with { type: "json" }` follows `internal/budget/pricing-registry.ts`, which has imported a sibling
|
|
3930
|
+
* JSON exactly this way in this package for as long as it has existed. Bundlers inline it, so the
|
|
3931
|
+
* emitted module carries the data and reaches for nothing.
|
|
3896
3932
|
*
|
|
3897
3933
|
* @internal
|
|
3898
3934
|
*/
|
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`
|
|
@@ -3889,10 +3898,37 @@ declare class Task {
|
|
|
3889
3898
|
}
|
|
3890
3899
|
|
|
3891
3900
|
/**
|
|
3892
|
-
*
|
|
3901
|
+
* Provider catalog loader (T10.1, ADR D447).
|
|
3902
|
+
*
|
|
3903
|
+
* Provider metadata, EMBEDDED at build time. Malformed entries are skipped with WARN (EC-1) — never
|
|
3904
|
+
* crash.
|
|
3905
|
+
*
|
|
3906
|
+
* ## Why embedded and not read from disk
|
|
3907
|
+
*
|
|
3908
|
+
* It used to be `readFileSync` from a directory computed as
|
|
3909
|
+
* `dirname(fileURLToPath(import.meta.url))` at module scope. Both halves break on a runtime with no
|
|
3910
|
+
* filesystem, in that order, and this file is only model METADATA — so an environment that could not
|
|
3911
|
+
* read it could not run a turn at all.
|
|
3912
|
+
*
|
|
3913
|
+
* Measured end to end on 2026-09-28, driving a real deploy of a TheoKit app (theokit#705):
|
|
3914
|
+
*
|
|
3915
|
+
* 1. Cloudflare EXECUTES the top-level module during validation, so the upload was refused before
|
|
3916
|
+
* any request existed — `The "path" argument must be of type string … Received undefined`,
|
|
3917
|
+
* code 10021.
|
|
3918
|
+
* 2. With `import.meta.url` substituted by the consumer's bundler, the module initialised and the
|
|
3919
|
+
* TURN failed: `[unenv] fs.readFileSync is not implemented yet!`
|
|
3920
|
+
* 3. With a newer `compatibility_date`, workerd implements `readFileSync` and the error became the
|
|
3921
|
+
* honest one: `ENOENT: readAll '/provider-catalog.json'`. The same `ENOENT` reached a deployed
|
|
3922
|
+
* Vercel function, whose bundle carries the JS and not the JSON.
|
|
3923
|
+
*
|
|
3924
|
+
* No consumer's bundler can fix that from outside. Probed from inside a deployed worker, workerd's
|
|
3925
|
+
* whole virtual filesystem is `/bundle/worker.js`, an empty `/tmp` and `/dev` — there is nowhere to
|
|
3926
|
+
* put this package's private data file such that `join(dirname(<a file URL>), …)` finds it, short of
|
|
3927
|
+
* hardcoding our internal layout into their build.
|
|
3893
3928
|
*
|
|
3894
|
-
*
|
|
3895
|
-
*
|
|
3929
|
+
* `with { type: "json" }` follows `internal/budget/pricing-registry.ts`, which has imported a sibling
|
|
3930
|
+
* JSON exactly this way in this package for as long as it has existed. Bundlers inline it, so the
|
|
3931
|
+
* emitted module carries the data and reaches for nothing.
|
|
3896
3932
|
*
|
|
3897
3933
|
* @internal
|
|
3898
3934
|
*/
|
package/dist/index.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
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
|
-
import './chunk-
|
|
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
|
-
import './chunk-
|
|
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-
|
|
26
|
-
import { discoverProviderPlugins, shouldUseFixtureMode, isFixtureApiKey, httpRequest, mapOllamaTransportError, readErrorResponseBody, mapOllamaHttpError } from './chunk-
|
|
24
|
+
import { resolveMemoryRoot, readFactsFromMarkdown } from './chunk-X3LOJJMO.js';
|
|
25
|
+
import { FsSessionStore } from './chunk-IZDDSLL2.js';
|
|
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';
|
|
29
29
|
import './chunk-TE6XVTOA.js';
|
|
30
30
|
import './chunk-24MGQDK3.js';
|
|
31
|
-
import { readSessionMessages } from './chunk-
|
|
31
|
+
import { readSessionMessages } from './chunk-XERM7PDQ.js';
|
|
32
32
|
import './chunk-HKCKOAIO.js';
|
|
33
33
|
import './chunk-7QJYKVP6.js';
|
|
34
34
|
import './chunk-OPAKPEPG.js';
|
|
@@ -48,10 +48,11 @@ import './chunk-UKMBRMGT.js';
|
|
|
48
48
|
import './chunk-7JAKO3NM.js';
|
|
49
49
|
import './chunk-ZWFTECOE.js';
|
|
50
50
|
import './chunk-GTX6FEDP.js';
|
|
51
|
-
import './chunk-
|
|
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';
|
|
@@ -62,12 +63,13 @@ import './chunk-MQGSOKR3.js';
|
|
|
62
63
|
import { estimateTokens, CHARS_PER_TOKEN } from './chunk-GMRFAX4I.js';
|
|
63
64
|
export { estimateTokens } from './chunk-GMRFAX4I.js';
|
|
64
65
|
import { parseModelId } from './chunk-R7WIIPUR.js';
|
|
65
|
-
import './chunk-
|
|
66
|
-
import { registerBuiltins, listProviders, getCatalogCapabilities, getProviderProfile } from './chunk-
|
|
66
|
+
import './chunk-I2ORT6QD.js';
|
|
67
|
+
import { registerBuiltins, listProviders, getCatalogCapabilities, getProviderProfile } from './chunk-SVCPJRUB.js';
|
|
67
68
|
import './chunk-AGACYRJ2.js';
|
|
68
|
-
import './chunk-
|
|
69
|
+
import './chunk-TX56N7FR.js';
|
|
69
70
|
import './chunk-5Q4RTLMP.js';
|
|
70
71
|
import './chunk-H3CVJSFC.js';
|
|
72
|
+
import './chunk-Q7GYMXVC.js';
|
|
71
73
|
import { BudgetExceededError, ConfigurationError, TheokitAgentError, MemoryAdapterError, AuthenticationError } from './chunk-B5MHRQJZ.js';
|
|
72
74
|
export { AgentDisposedError, AgentRunError, AuthenticationError, BudgetExceededError, ConfigurationError, IntegrationNotConnectedError, InvalidTaskIdError, MemoryAdapterError, NetworkError, RateLimitError, TaskNotFoundError, TheokitAgentError, UnknownAgentError, UnsupportedBudgetOperationError, UnsupportedRunOperationError, UnsupportedTaskOperationError, isTransientError } from './chunk-B5MHRQJZ.js';
|
|
73
75
|
import { diag, redactSecrets, addPattern, resolveApiKey } from './chunk-CZJ6Q7CW.js';
|
|
@@ -1177,12 +1179,15 @@ async function dedupCandidates(facts, embedding, threshold) {
|
|
|
1177
1179
|
}
|
|
1178
1180
|
var DEFAULT_MAX_FACTS_PER_SWEEP = 500;
|
|
1179
1181
|
async function remPhase(facts, embedding, threshold = DEFAULT_CLUSTER_THRESHOLD, maxFactsPerSweep = DEFAULT_MAX_FACTS_PER_SWEEP) {
|
|
1180
|
-
if (facts.length === 0) return { clusters: [] };
|
|
1182
|
+
if (facts.length === 0) return { clusters: [], factsLeftOut: 0 };
|
|
1181
1183
|
const capped = facts.length > maxFactsPerSweep ? facts.slice(0, maxFactsPerSweep) : facts;
|
|
1182
1184
|
const vectors = await embedding.embed(capped.map((f) => f.text));
|
|
1183
1185
|
const clusterOfIdx = unionFindByPairs(vectors, threshold);
|
|
1184
1186
|
const groups = bucketFactsByClusterRoot(capped, clusterOfIdx);
|
|
1185
|
-
return {
|
|
1187
|
+
return {
|
|
1188
|
+
clusters: [...groups.values()].map(buildClusterFromMembers),
|
|
1189
|
+
factsLeftOut: facts.length - capped.length
|
|
1190
|
+
};
|
|
1186
1191
|
}
|
|
1187
1192
|
function unionFindByPairs(vectors, threshold) {
|
|
1188
1193
|
const clusterOfIdx = vectors.map((_, i) => i);
|
|
@@ -1281,7 +1286,8 @@ async function runInner(options) {
|
|
|
1281
1286
|
duplicatesRemoved: dedup.duplicatesRemoved,
|
|
1282
1287
|
clustersCreated: rem.clusters.length,
|
|
1283
1288
|
notesWritten,
|
|
1284
|
-
diaryEntryHash: void 0
|
|
1289
|
+
diaryEntryHash: void 0,
|
|
1290
|
+
factsLeftOut: rem.factsLeftOut
|
|
1285
1291
|
};
|
|
1286
1292
|
await appendDiaryEntry(root, {
|
|
1287
1293
|
timestampMs,
|
|
@@ -1310,7 +1316,7 @@ async function writeConsolidatedNotes(root, clusters, timestampMs) {
|
|
|
1310
1316
|
return 1;
|
|
1311
1317
|
}
|
|
1312
1318
|
function emptyResult(status) {
|
|
1313
|
-
|
|
1319
|
+
const result = {
|
|
1314
1320
|
status,
|
|
1315
1321
|
factsBefore: 0,
|
|
1316
1322
|
factsAfter: 0,
|
|
@@ -1319,6 +1325,7 @@ function emptyResult(status) {
|
|
|
1319
1325
|
notesWritten: 0,
|
|
1320
1326
|
diaryEntryHash: void 0
|
|
1321
1327
|
};
|
|
1328
|
+
return status === "skipped" ? { ...result, factsLeftOut: 0 } : result;
|
|
1322
1329
|
}
|
|
1323
1330
|
|
|
1324
1331
|
// src/internal/memory/sdk-memory-peer-loader.ts
|
|
@@ -1377,7 +1384,7 @@ var Memory = {
|
|
|
1377
1384
|
openArgs.embedding = await resolveEmbedding(opts.embedding, peer.MEMORY_EMBEDDING_ADAPTERS);
|
|
1378
1385
|
return await peer.IndexManager.open(openArgs);
|
|
1379
1386
|
}
|
|
1380
|
-
const { IndexManager } = await import('./index-manager-
|
|
1387
|
+
const { IndexManager } = await import('./index-manager-JVYIVTZG.js');
|
|
1381
1388
|
openArgs.embedding = await resolveEmbedding(opts.embedding, MEMORY_EMBEDDING_ADAPTERS);
|
|
1382
1389
|
return await IndexManager.open(openArgs);
|
|
1383
1390
|
},
|
|
@@ -1436,7 +1443,8 @@ function toDreamingSweepResult(result) {
|
|
|
1436
1443
|
factsAfter: result.factsAfter,
|
|
1437
1444
|
duplicatesRemoved: result.duplicatesRemoved,
|
|
1438
1445
|
clustersCreated: result.clustersCreated,
|
|
1439
|
-
notesWritten: result.notesWritten
|
|
1446
|
+
notesWritten: result.notesWritten,
|
|
1447
|
+
...result.factsLeftOut !== void 0 ? { factsLeftOut: result.factsLeftOut } : {}
|
|
1440
1448
|
};
|
|
1441
1449
|
}
|
|
1442
1450
|
|
|
@@ -2016,7 +2024,7 @@ function isBuiltAgent(m) {
|
|
|
2016
2024
|
return typeof m.send === "function";
|
|
2017
2025
|
}
|
|
2018
2026
|
async function materialize(def, index) {
|
|
2019
|
-
const { Agent: Agent2 } = await import('./agent-
|
|
2027
|
+
const { Agent: Agent2 } = await import('./agent-XTLAVVYC.js');
|
|
2020
2028
|
return Agent2.create({
|
|
2021
2029
|
// `AgentDefinition.model` admits the sentinel `'inherit'`, which is not a model id. Inheriting
|
|
2022
2030
|
// here means "declare nothing and let the default apply" — forwarding the literal would create
|