@theokit/sdk 4.29.0 → 4.31.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.
Files changed (90) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/dist/{agent-LBCEK6VH.cjs → agent-6GQBOHHA.cjs} +8 -8
  3. package/dist/{agent-LBCEK6VH.cjs.map → agent-6GQBOHHA.cjs.map} +1 -1
  4. package/dist/{agent-CdjSCbYz.d.cts → agent-Bzg2_uGr.d.cts} +55 -1
  5. package/dist/{agent-FBTLZI6V.js → agent-DY5LGZ5E.js} +7 -7
  6. package/dist/{agent-FBTLZI6V.js.map → agent-DY5LGZ5E.js.map} +1 -1
  7. package/dist/{agent-BZz4X8ZM.d.ts → agent-Ekv8y7_c.d.ts} +55 -1
  8. package/dist/agent.d.ts +15 -2
  9. package/dist/{chunk-EULKRTB5.js → chunk-4JWZRASX.js} +3 -3
  10. package/dist/{chunk-EULKRTB5.js.map → chunk-4JWZRASX.js.map} +1 -1
  11. package/dist/{chunk-YQAPEYUV.cjs → chunk-CYTAM3E6.cjs} +81 -43
  12. package/dist/chunk-CYTAM3E6.cjs.map +1 -0
  13. package/dist/{chunk-54YLX4Q6.cjs → chunk-FDGRQQWX.cjs} +5 -5
  14. package/dist/{chunk-54YLX4Q6.cjs.map → chunk-FDGRQQWX.cjs.map} +1 -1
  15. package/dist/{chunk-VUJ3NVDC.js → chunk-FZ75EZR5.js} +52 -14
  16. package/dist/chunk-FZ75EZR5.js.map +1 -0
  17. package/dist/chunk-ICSCKB3N.js +140 -0
  18. package/dist/chunk-ICSCKB3N.js.map +1 -0
  19. package/dist/{chunk-U6QGZHPN.js → chunk-PORDVVJS.js} +5 -6
  20. package/dist/chunk-PORDVVJS.js.map +1 -0
  21. package/dist/{chunk-NRSH7RJY.js → chunk-TLG444A6.js} +61 -13
  22. package/dist/chunk-TLG444A6.js.map +1 -0
  23. package/dist/{chunk-2HRYBRD7.cjs → chunk-U447MTG4.cjs} +5 -6
  24. package/dist/chunk-U447MTG4.cjs.map +1 -0
  25. package/dist/{chunk-2MF3IE2D.cjs → chunk-UKNMWCPZ.cjs} +63 -15
  26. package/dist/chunk-UKNMWCPZ.cjs.map +1 -0
  27. package/dist/{chunk-SQLZ7ONU.js → chunk-VUXLNVX7.js} +3 -3
  28. package/dist/{chunk-SQLZ7ONU.js.map → chunk-VUXLNVX7.js.map} +1 -1
  29. package/dist/{chunk-HK7ZHSAX.cjs → chunk-WQEQCJTZ.cjs} +64 -3
  30. package/dist/chunk-WQEQCJTZ.cjs.map +1 -0
  31. package/dist/{chunk-YU6KON2I.cjs → chunk-XJT5VACT.cjs} +3 -3
  32. package/dist/{chunk-YU6KON2I.cjs.map → chunk-XJT5VACT.cjs.map} +1 -1
  33. package/dist/{compact-session-OO7NVWPB.cjs → compact-session-2BFNMENR.cjs} +11 -11
  34. package/dist/{compact-session-OO7NVWPB.cjs.map → compact-session-2BFNMENR.cjs.map} +1 -1
  35. package/dist/{compact-session-OO2GD76G.js → compact-session-2JONXHLR.js} +3 -3
  36. package/dist/{compact-session-OO2GD76G.js.map → compact-session-2JONXHLR.js.map} +1 -1
  37. package/dist/{cron-CIIshMs3.d.cts → cron-CjzvXGT2.d.cts} +1 -1
  38. package/dist/{cron-dElBjDaL.d.ts → cron-D0Z29gI-.d.ts} +1 -1
  39. package/dist/cron.cjs +7 -7
  40. package/dist/cron.d.cts +2 -2
  41. package/dist/cron.d.ts +2 -2
  42. package/dist/cron.js +6 -6
  43. package/dist/eval.cjs +10 -11
  44. package/dist/eval.cjs.map +1 -1
  45. package/dist/eval.js +6 -7
  46. package/dist/eval.js.map +1 -1
  47. package/dist/fs-session-store-26WVVMC4.cjs +17 -0
  48. package/dist/{fs-session-store-KAUQYSGI.cjs.map → fs-session-store-26WVVMC4.cjs.map} +1 -1
  49. package/dist/fs-session-store-7AEI4STY.js +8 -0
  50. package/dist/{fs-session-store-ZKB5NN37.js.map → fs-session-store-7AEI4STY.js.map} +1 -1
  51. package/dist/index.cjs +28 -28
  52. package/dist/index.cjs.map +1 -1
  53. package/dist/index.d.cts +19 -6
  54. package/dist/index.d.ts +19 -6
  55. package/dist/index.js +8 -8
  56. package/dist/index.js.map +1 -1
  57. package/dist/{inject-session-6MJUSGZP.cjs → inject-session-MIFEKATN.cjs} +4 -4
  58. package/dist/{inject-session-6MJUSGZP.cjs.map → inject-session-MIFEKATN.cjs.map} +1 -1
  59. package/dist/{inject-session-KOFHS5K3.js → inject-session-NNSCCIVP.js} +3 -3
  60. package/dist/{inject-session-KOFHS5K3.js.map → inject-session-NNSCCIVP.js.map} +1 -1
  61. package/dist/internal/llm/retrying-client.d.ts +29 -0
  62. package/dist/internal/persistence/index.cjs +18 -19
  63. package/dist/internal/persistence/index.cjs.map +1 -1
  64. package/dist/internal/persistence/index.js +1 -2
  65. package/dist/internal/persistence/index.js.map +1 -1
  66. package/dist/internal/plugins/types.d.cts +1 -1
  67. package/dist/internal/plugins/types.d.ts +1 -1
  68. package/dist/persistence.cjs +10 -11
  69. package/dist/persistence.cjs.map +1 -1
  70. package/dist/persistence.js +1 -2
  71. package/dist/persistence.js.map +1 -1
  72. package/dist/subagents-loader.d.cts +1 -1
  73. package/dist/subagents-loader.d.ts +1 -1
  74. package/dist/types/plugin.d.ts +32 -0
  75. package/package.json +1 -1
  76. package/dist/chunk-2HRYBRD7.cjs.map +0 -1
  77. package/dist/chunk-2MF3IE2D.cjs.map +0 -1
  78. package/dist/chunk-C7PICHRF.cjs +0 -68
  79. package/dist/chunk-C7PICHRF.cjs.map +0 -1
  80. package/dist/chunk-HK7ZHSAX.cjs.map +0 -1
  81. package/dist/chunk-HZQEDNF6.js +0 -66
  82. package/dist/chunk-HZQEDNF6.js.map +0 -1
  83. package/dist/chunk-NRSH7RJY.js.map +0 -1
  84. package/dist/chunk-R6ZP6KNB.js +0 -80
  85. package/dist/chunk-R6ZP6KNB.js.map +0 -1
  86. package/dist/chunk-U6QGZHPN.js.map +0 -1
  87. package/dist/chunk-VUJ3NVDC.js.map +0 -1
  88. package/dist/chunk-YQAPEYUV.cjs.map +0 -1
  89. package/dist/fs-session-store-KAUQYSGI.cjs +0 -17
  90. package/dist/fs-session-store-ZKB5NN37.js +0 -8
package/dist/index.d.cts CHANGED
@@ -1,13 +1,13 @@
1
1
  import { T as TheokitAgentError, B as BudgetOptions, a as BudgetHandle, b as BudgetSnapshot, E as ErrorMetadata } from './errors-BdL-buYn.cjs';
2
2
  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, m as ErrorCode, I as IntegrationNotConnectedError, n as InvalidTaskIdError, M as MemoryAdapterError, o as MemoryAdapterErrorCode, N as NetworkError, R as RateLimitError, p as TaskNotFoundError, U as UnknownAgentError, q as UnsupportedBudgetOperationError, r as UnsupportedRunOperationError, s as UnsupportedTaskOperationError, t as isTransientError } from './errors-BdL-buYn.cjs';
3
- import { A as AgentOptions, L as LocalOptions, P as ProviderRoutingSettings, S as SystemPromptResolver, C as CloudOptions, M as MemorySettings, a as AgentDefinition, b as ContextSettings, c as PluginsSettings, d as SkillsSettings, e as SDKAgent, f as ListAgentsOptions, g as ListResult, h as SDKAgentInfo, G as GetAgentOptions, i as ListRunsOptions, j as GetRunOptions, k as AgentOperationOptions, l as Plugin$1, m as ProviderProfile, I as InlineSkill, J as JudgeResult, n as GoalOptions, o as GoalEvent, p as GoalResult, B as BudgetTracker, q as MemoryProvider, r as MemoryId, s as PreToolCallDecision, t as SDKProvider } from './agent-CdjSCbYz.cjs';
4
- export { u as ActiveMemoryPassArgs, v as ActiveMemoryPassResult, w as AgentMemory, x as BudgetCheck, y as BudgetTotal, z as BudgetUsageEvent, D as CloudEnv, E as CloudRepo, F as ContextBudget, H as ContextManagerKind, K as ContextSnapshot, N as ContextSource, O as ContextSourceStatus, Q as CreateSkillSpec, R as HookName, T as InvalidateCacheOptions, U as MemoryAdapter, V as MemoryAdapterCapabilities, W as MemoryContext, X as MemoryFact, Y as MemoryProviderHandle, Z as MemoryProviderInitOptions, _ as MemoryRevision, $ as MemoryToolSchema, a0 as MemoryTurnMessage, a1 as PersonalityPreset, a2 as PluginContext, a3 as PostAssistantReplyContext, a4 as PreToolCallContext, a5 as PreUserSendContext, a6 as PreUserSendResult, a7 as ProviderCapability, a8 as ProviderRoute, a9 as ProviderTransform, aa as ProviderTransformContext, ab as RecordSessionSummaryArgs, ac as ResolvedProviderRoute, ad as RunUntilIterator, ae as SDKAgentPlugins, af as SDKAgentSkillDetail, ag as SDKAgentSkills, ah as SDKArtifact, ai as SDKContextManager, aj as SDKPluginMetadata, ak as SDKProvidersManager, al as SessionRecord, am as SessionStore, an as SettingSource, ao as Skill, ap as SkillsResolver, aq as SkillsResolverContext, ar as SystemPromptContext, as as SystemPromptMemoryFact, at as SystemPromptSkillRef, au as TelemetrySettings, av as Verdict } from './agent-CdjSCbYz.cjs';
3
+ import { A as AgentOptions, L as LocalOptions, P as ProviderRoutingSettings, S as SystemPromptResolver, C as CloudOptions, M as MemorySettings, a as AgentDefinition, b as ContextSettings, c as PluginsSettings, d as SkillsSettings, e as SDKAgent, f as ListAgentsOptions, g as ListResult, h as SDKAgentInfo, G as GetAgentOptions, i as ListRunsOptions, j as GetRunOptions, k as AgentOperationOptions, l as Plugin$1, m as ProviderProfile, I as InlineSkill, J as JudgeResult, n as GoalOptions, o as GoalEvent, p as GoalResult, B as BudgetTracker, q as MemoryProvider, r as MemoryId, s as PreToolCallDecision, t as SDKProvider } from './agent-Bzg2_uGr.cjs';
4
+ export { u as ActiveMemoryPassArgs, v as ActiveMemoryPassResult, w as AgentMemory, x as BudgetCheck, y as BudgetTotal, z as BudgetUsageEvent, D as CloudEnv, E as CloudRepo, F as ContextBudget, H as ContextManagerKind, K as ContextSnapshot, N as ContextSource, O as ContextSourceStatus, Q as CreateSkillSpec, R as HookName, T as InvalidateCacheOptions, U as MemoryAdapter, V as MemoryAdapterCapabilities, W as MemoryContext, X as MemoryFact, Y as MemoryProviderHandle, Z as MemoryProviderInitOptions, _ as MemoryRevision, $ as MemoryToolSchema, a0 as MemoryTurnMessage, a1 as PersonalityPreset, a2 as PluginContext, a3 as PostAssistantReplyContext, a4 as PostToolCallContext, a5 as PreToolCallContext, a6 as PreUserSendContext, a7 as PreUserSendResult, a8 as ProviderCapability, a9 as ProviderRoute, aa as ProviderTransform, ab as ProviderTransformContext, ac as RecordSessionSummaryArgs, ad as ResolvedProviderRoute, ae as RunUntilIterator, af as SDKAgentPlugins, ag as SDKAgentSkillDetail, ah as SDKAgentSkills, ai as SDKArtifact, aj as SDKContextManager, ak as SDKPluginMetadata, al as SDKProvidersManager, am as SessionLifecycleContext, an as SessionRecord, ao as SessionStore, ap as SettingSource, aq as Skill, ar as SkillsResolver, as as SkillsResolverContext, at as SystemPromptContext, au as SystemPromptMemoryFact, av as SystemPromptSkillRef, aw as TelemetrySettings, ax as ToolCallSummary, ay as ToolResultTransformContext, az as TransformContext, aA as Verdict } from './agent-Bzg2_uGr.cjs';
5
5
  import { R as RunResult, M as ModelSelection, C as CustomTool, a as McpServerConfig, b as Run, P as Processor, T as ToolResultContentBlock, c as PermissionMode, d as PermissionEngine, e as RunEventSink, S as SDKMessage } from './run-OJbGyweZ.cjs';
6
6
  export { A as AgentConversationTurn, f as AssistantMessage, g as CompletionCheck, h as CompletionCheckResult, i as ConversationStep, j as ConversationTurn, k as CostBreakdown, l as CostSource, m as CostStatus, D as DoomLoopThresholds, G as GenerateOptions, n as GenerateRunResult, I as ImageBlock, o as InputProcessorContext, p as InteractionUpdate, q as McpAuthConfig, r as McpHttpServerConfig, s as McpOAuthConfig, t as McpStdioServerConfig, u as MessageOrigin, v as ModelParameterValue, O as OutputProcessorContext, w as PartialToolCallUpdate, x as PermissionAction, y as PermissionEngineOptions, z as PermissionRule, B as ProcessorControls, E as ProcessorTripwire, F as ProcessorViolation, H as RunCompactBoundaryEvent, J as RunCompletionCheckEvent, K as RunErrorDetail, L as RunEvent, N as RunGitInfo, Q as RunOperation, U as RunPermissionDeniedEvent, V as RunRateLimitEvent, W as RunStatus, X as RunTaskCompletedEvent, Y as RunTaskStartedEvent, Z as RunTaskUpdatedEvent, _ as RunToCompletionOptions, $ as RunToCompletionResult, a0 as RunToolProgressEvent, a1 as RunTripwireEvent, a2 as SDKAssistantMessage, a3 as SDKImage, a4 as SDKImageDimension, a5 as SDKObjectDelta, a6 as SDKRequestMessage, a7 as SDKStatusMessage, a8 as SDKSystemMessage, a9 as SDKTaskMessage, aa as SDKThinkingMessage, ab as SDKToolUseMessage, ac as SDKUserMessage, ad as SDKUserMessageEvent, ae as SendOptions, af as ShellCommand, ag as ShellConversationTurn, ah as ShellOutput, ai as ShellOutputDeltaUpdate, aj as StepCompletedUpdate, ak as StepStartedUpdate, al as StreamToCompletionResult, am as SummaryCompletedUpdate, an as SummaryStartedUpdate, ao as SummaryUpdate, ap as TextBlock, aq as TextDeltaUpdate, ar as ThinkingCompletedUpdate, as as ThinkingDeltaUpdate, at as ThinkingMessage, au as TokenDeltaUpdate, av as TokenUsage, aw as ToolCall, ax as ToolCallCompletedUpdate, ay as ToolCallStartedUpdate, az as ToolContextMessage, aA as ToolResult, aB as ToolResultGuardOptions, aC as ToolUseBlock, aD as TurnEndedUpdate, aE as UserMessage, aF as UserMessageAppendedUpdate, aG as applyMode, aH as emitRunEvent } from './run-OJbGyweZ.cjs';
7
7
  import * as zod from 'zod';
8
8
  import { ZodType, z } from 'zod';
9
- import { S as StepResult } from './cron-CIIshMs3.cjs';
10
- 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-CIIshMs3.cjs';
9
+ import { S as StepResult } from './cron-CjzvXGT2.cjs';
10
+ 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-CjzvXGT2.cjs';
11
11
 
12
12
  /**
13
13
  * Public compaction / context-management helpers (M2-1, extended V3-3).
@@ -590,8 +590,21 @@ declare class Agent {
590
590
  * Caveats:
591
591
  * - The function-level `agentId` always wins over `options.agentId`.
592
592
  * - Options differ between calls? Last-call-wins for this handle (matches `Agent.resume`).
593
- * - Disposed agents are NOT auto-deleted from the registry. To force a fresh
594
- * agent, call `Agent.delete(agentId)` first.
593
+ * - A DISPOSED agent is replaced automatically. `dispose()` evicts the id from the
594
+ * live cache (`liveAgentRegistry.forget`), so the next `getOrCreate(id)` builds a
595
+ * fresh handle — no `Agent.delete(agentId)` needed.
596
+ *
597
+ * This bullet used to say the opposite ("Disposed agents are NOT auto-deleted...
598
+ * call `Agent.delete(agentId)` first"). It was measured false in M91:
599
+ * `tests/m91-getorcreate-apos-dispose.test.ts` builds an agent, disposes it, and
600
+ * gets a different instance back. The claim was about the PERSISTENT registry and
601
+ * read as being about the live cache — and consumers built around the wrong half.
602
+ * The agent-builder's M85 interrupt rotates the session id to work around a
603
+ * constraint that does not exist.
604
+ *
605
+ * - `close()` marks the handle disposed WITHOUT evicting the cache entry. It is
606
+ * internal and unused today; if it becomes reachable, this bullet stops being true
607
+ * for that path.
595
608
  *
596
609
  * @public
597
610
  */
package/dist/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  import { T as TheokitAgentError, B as BudgetOptions, a as BudgetHandle, b as BudgetSnapshot, E as ErrorMetadata } from './errors-DHZtSNnj.js';
2
2
  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, m as ErrorCode, I as IntegrationNotConnectedError, n as InvalidTaskIdError, M as MemoryAdapterError, o as MemoryAdapterErrorCode, N as NetworkError, R as RateLimitError, p as TaskNotFoundError, U as UnknownAgentError, q as UnsupportedBudgetOperationError, r as UnsupportedRunOperationError, s as UnsupportedTaskOperationError, t as isTransientError } from './errors-DHZtSNnj.js';
3
- import { A as AgentOptions, L as LocalOptions, P as ProviderRoutingSettings, S as SystemPromptResolver, C as CloudOptions, M as MemorySettings, a as AgentDefinition, b as ContextSettings, c as PluginsSettings, d as SkillsSettings, e as SDKAgent, f as ListAgentsOptions, g as ListResult, h as SDKAgentInfo, G as GetAgentOptions, i as ListRunsOptions, j as GetRunOptions, k as AgentOperationOptions, l as Plugin$1, m as ProviderProfile, I as InlineSkill, J as JudgeResult, n as GoalOptions, o as GoalEvent, p as GoalResult, B as BudgetTracker, q as MemoryProvider, r as MemoryId, s as PreToolCallDecision, t as SDKProvider } from './agent-BZz4X8ZM.js';
4
- export { u as ActiveMemoryPassArgs, v as ActiveMemoryPassResult, w as AgentMemory, x as BudgetCheck, y as BudgetTotal, z as BudgetUsageEvent, D as CloudEnv, E as CloudRepo, F as ContextBudget, H as ContextManagerKind, K as ContextSnapshot, N as ContextSource, O as ContextSourceStatus, Q as CreateSkillSpec, R as HookName, T as InvalidateCacheOptions, U as MemoryAdapter, V as MemoryAdapterCapabilities, W as MemoryContext, X as MemoryFact, Y as MemoryProviderHandle, Z as MemoryProviderInitOptions, _ as MemoryRevision, $ as MemoryToolSchema, a0 as MemoryTurnMessage, a1 as PersonalityPreset, a2 as PluginContext, a3 as PostAssistantReplyContext, a4 as PreToolCallContext, a5 as PreUserSendContext, a6 as PreUserSendResult, a7 as ProviderCapability, a8 as ProviderRoute, a9 as ProviderTransform, aa as ProviderTransformContext, ab as RecordSessionSummaryArgs, ac as ResolvedProviderRoute, ad as RunUntilIterator, ae as SDKAgentPlugins, af as SDKAgentSkillDetail, ag as SDKAgentSkills, ah as SDKArtifact, ai as SDKContextManager, aj as SDKPluginMetadata, ak as SDKProvidersManager, al as SessionRecord, am as SessionStore, an as SettingSource, ao as Skill, ap as SkillsResolver, aq as SkillsResolverContext, ar as SystemPromptContext, as as SystemPromptMemoryFact, at as SystemPromptSkillRef, au as TelemetrySettings, av as Verdict } from './agent-BZz4X8ZM.js';
3
+ import { A as AgentOptions, L as LocalOptions, P as ProviderRoutingSettings, S as SystemPromptResolver, C as CloudOptions, M as MemorySettings, a as AgentDefinition, b as ContextSettings, c as PluginsSettings, d as SkillsSettings, e as SDKAgent, f as ListAgentsOptions, g as ListResult, h as SDKAgentInfo, G as GetAgentOptions, i as ListRunsOptions, j as GetRunOptions, k as AgentOperationOptions, l as Plugin$1, m as ProviderProfile, I as InlineSkill, J as JudgeResult, n as GoalOptions, o as GoalEvent, p as GoalResult, B as BudgetTracker, q as MemoryProvider, r as MemoryId, s as PreToolCallDecision, t as SDKProvider } from './agent-Ekv8y7_c.js';
4
+ export { u as ActiveMemoryPassArgs, v as ActiveMemoryPassResult, w as AgentMemory, x as BudgetCheck, y as BudgetTotal, z as BudgetUsageEvent, D as CloudEnv, E as CloudRepo, F as ContextBudget, H as ContextManagerKind, K as ContextSnapshot, N as ContextSource, O as ContextSourceStatus, Q as CreateSkillSpec, R as HookName, T as InvalidateCacheOptions, U as MemoryAdapter, V as MemoryAdapterCapabilities, W as MemoryContext, X as MemoryFact, Y as MemoryProviderHandle, Z as MemoryProviderInitOptions, _ as MemoryRevision, $ as MemoryToolSchema, a0 as MemoryTurnMessage, a1 as PersonalityPreset, a2 as PluginContext, a3 as PostAssistantReplyContext, a4 as PostToolCallContext, a5 as PreToolCallContext, a6 as PreUserSendContext, a7 as PreUserSendResult, a8 as ProviderCapability, a9 as ProviderRoute, aa as ProviderTransform, ab as ProviderTransformContext, ac as RecordSessionSummaryArgs, ad as ResolvedProviderRoute, ae as RunUntilIterator, af as SDKAgentPlugins, ag as SDKAgentSkillDetail, ah as SDKAgentSkills, ai as SDKArtifact, aj as SDKContextManager, ak as SDKPluginMetadata, al as SDKProvidersManager, am as SessionLifecycleContext, an as SessionRecord, ao as SessionStore, ap as SettingSource, aq as Skill, ar as SkillsResolver, as as SkillsResolverContext, at as SystemPromptContext, au as SystemPromptMemoryFact, av as SystemPromptSkillRef, aw as TelemetrySettings, ax as ToolCallSummary, ay as ToolResultTransformContext, az as TransformContext, aA as Verdict } from './agent-Ekv8y7_c.js';
5
5
  import { R as RunResult, M as ModelSelection, C as CustomTool, a as McpServerConfig, b as Run, P as Processor, T as ToolResultContentBlock, c as PermissionMode, d as PermissionEngine, e as RunEventSink, S as SDKMessage } from './run-OJbGyweZ.js';
6
6
  export { A as AgentConversationTurn, f as AssistantMessage, g as CompletionCheck, h as CompletionCheckResult, i as ConversationStep, j as ConversationTurn, k as CostBreakdown, l as CostSource, m as CostStatus, D as DoomLoopThresholds, G as GenerateOptions, n as GenerateRunResult, I as ImageBlock, o as InputProcessorContext, p as InteractionUpdate, q as McpAuthConfig, r as McpHttpServerConfig, s as McpOAuthConfig, t as McpStdioServerConfig, u as MessageOrigin, v as ModelParameterValue, O as OutputProcessorContext, w as PartialToolCallUpdate, x as PermissionAction, y as PermissionEngineOptions, z as PermissionRule, B as ProcessorControls, E as ProcessorTripwire, F as ProcessorViolation, H as RunCompactBoundaryEvent, J as RunCompletionCheckEvent, K as RunErrorDetail, L as RunEvent, N as RunGitInfo, Q as RunOperation, U as RunPermissionDeniedEvent, V as RunRateLimitEvent, W as RunStatus, X as RunTaskCompletedEvent, Y as RunTaskStartedEvent, Z as RunTaskUpdatedEvent, _ as RunToCompletionOptions, $ as RunToCompletionResult, a0 as RunToolProgressEvent, a1 as RunTripwireEvent, a2 as SDKAssistantMessage, a3 as SDKImage, a4 as SDKImageDimension, a5 as SDKObjectDelta, a6 as SDKRequestMessage, a7 as SDKStatusMessage, a8 as SDKSystemMessage, a9 as SDKTaskMessage, aa as SDKThinkingMessage, ab as SDKToolUseMessage, ac as SDKUserMessage, ad as SDKUserMessageEvent, ae as SendOptions, af as ShellCommand, ag as ShellConversationTurn, ah as ShellOutput, ai as ShellOutputDeltaUpdate, aj as StepCompletedUpdate, ak as StepStartedUpdate, al as StreamToCompletionResult, am as SummaryCompletedUpdate, an as SummaryStartedUpdate, ao as SummaryUpdate, ap as TextBlock, aq as TextDeltaUpdate, ar as ThinkingCompletedUpdate, as as ThinkingDeltaUpdate, at as ThinkingMessage, au as TokenDeltaUpdate, av as TokenUsage, aw as ToolCall, ax as ToolCallCompletedUpdate, ay as ToolCallStartedUpdate, az as ToolContextMessage, aA as ToolResult, aB as ToolResultGuardOptions, aC as ToolUseBlock, aD as TurnEndedUpdate, aE as UserMessage, aF as UserMessageAppendedUpdate, aG as applyMode, aH as emitRunEvent } from './run-OJbGyweZ.js';
7
7
  import * as zod from 'zod';
8
8
  import { ZodType, z } from 'zod';
9
- import { S as StepResult } from './cron-dElBjDaL.js';
10
- 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-dElBjDaL.js';
9
+ import { S as StepResult } from './cron-D0Z29gI-.js';
10
+ 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-D0Z29gI-.js';
11
11
 
12
12
  /**
13
13
  * Public compaction / context-management helpers (M2-1, extended V3-3).
@@ -590,8 +590,21 @@ declare class Agent {
590
590
  * Caveats:
591
591
  * - The function-level `agentId` always wins over `options.agentId`.
592
592
  * - Options differ between calls? Last-call-wins for this handle (matches `Agent.resume`).
593
- * - Disposed agents are NOT auto-deleted from the registry. To force a fresh
594
- * agent, call `Agent.delete(agentId)` first.
593
+ * - A DISPOSED agent is replaced automatically. `dispose()` evicts the id from the
594
+ * live cache (`liveAgentRegistry.forget`), so the next `getOrCreate(id)` builds a
595
+ * fresh handle — no `Agent.delete(agentId)` needed.
596
+ *
597
+ * This bullet used to say the opposite ("Disposed agents are NOT auto-deleted...
598
+ * call `Agent.delete(agentId)` first"). It was measured false in M91:
599
+ * `tests/m91-getorcreate-apos-dispose.test.ts` builds an agent, disposes it, and
600
+ * gets a different instance back. The claim was about the PERSISTENT registry and
601
+ * read as being about the live cache — and consumers built around the wrong half.
602
+ * The agent-builder's M85 interrupt rotates the session id to work around a
603
+ * constraint that does not exist.
604
+ *
605
+ * - `close()` marks the handle disposed WITHOUT evicting the cache entry. It is
606
+ * internal and unused today; if it becomes reachable, this bullet stops being true
607
+ * for that path.
595
608
  *
596
609
  * @public
597
610
  */
package/dist/index.js CHANGED
@@ -6,16 +6,16 @@ import './chunk-GJAGKFTR.js';
6
6
  import { Workflow, agentStep } from './chunk-BFWPZMG7.js';
7
7
  import './chunk-UVNG67DG.js';
8
8
  import './chunk-CAH3G4IS.js';
9
- export { Cron } from './chunk-EULKRTB5.js';
10
- import { MEMORY_EMBEDDING_ADAPTERS, resolveApiKey, shouldUseFixtureMode, isFixtureApiKey, httpRequest, DEFAULT_AGENTIC_MODEL_ID, Agent } from './chunk-VUJ3NVDC.js';
11
- export { Agent, AgentBuilder, Tool, ToolError, UsageAccumulator, computeCost, getPricingEntry } from './chunk-VUJ3NVDC.js';
9
+ export { Cron } from './chunk-4JWZRASX.js';
10
+ import { MEMORY_EMBEDDING_ADAPTERS, resolveApiKey, shouldUseFixtureMode, isFixtureApiKey, httpRequest, DEFAULT_AGENTIC_MODEL_ID, Agent } from './chunk-FZ75EZR5.js';
11
+ export { Agent, AgentBuilder, Tool, ToolError, UsageAccumulator, computeCost, getPricingEntry } from './chunk-FZ75EZR5.js';
12
12
  import './chunk-2SFBB54R.js';
13
13
  import { configure, submit, list, get, cancel, subscribe } from './chunk-HRA3CPGG.js';
14
14
  export { emitRunEvent } from './chunk-HRA3CPGG.js';
15
- import './chunk-SQLZ7ONU.js';
15
+ import './chunk-VUXLNVX7.js';
16
16
  import './chunk-K2BQQ445.js';
17
- import './chunk-U6QGZHPN.js';
18
- import { discoverProviderPlugins, mapOllamaTransportError, mapOllamaHttpError } from './chunk-NRSH7RJY.js';
17
+ import './chunk-PORDVVJS.js';
18
+ import { discoverProviderPlugins, mapOllamaTransportError, mapOllamaHttpError } from './chunk-TLG444A6.js';
19
19
  import './chunk-6CLRANZA.js';
20
20
  import './chunk-EEZ7CFMM.js';
21
21
  import { lanceStoragePath, LanceIndex, readFactsFromMarkdown, defaultIndexPath, openMemoryDb, memoryDir } from './chunk-XAUBQMQU.js';
@@ -30,7 +30,7 @@ import './chunk-UJ7IQJAG.js';
30
30
  import './chunk-7AD3ZTZL.js';
31
31
  import './chunk-V4XRLPEF.js';
32
32
  import './chunk-5PZMMF4H.js';
33
- import './chunk-HZQEDNF6.js';
33
+ import './chunk-ICSCKB3N.js';
34
34
  import './chunk-77FOZCOT.js';
35
35
  import { withCwdMutex } from './chunk-2XLKLVVR.js';
36
36
  export { withCwdMutex } from './chunk-2XLKLVVR.js';
@@ -1580,7 +1580,7 @@ function ehAgenteConstruido(m) {
1580
1580
  return typeof m.send === "function";
1581
1581
  }
1582
1582
  async function materializar(def, indice) {
1583
- const { Agent: Agent2 } = await import('./agent-FBTLZI6V.js');
1583
+ const { Agent: Agent2 } = await import('./agent-DY5LGZ5E.js');
1584
1584
  return Agent2.create({
1585
1585
  // `AgentDefinition.model` admite o sentinel `'inherit'`, que não é um id de modelo. Herdar
1586
1586
  // aqui significa "não declare nada e deixe o default valer" — passar o literal adiante criaria