@theokit/sdk 4.31.1 → 4.33.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 +28 -0
- package/dist/{agent-BKNJIOEY.cjs → agent-2STDGKNI.cjs} +11 -10
- package/dist/{agent-BKNJIOEY.cjs.map → agent-2STDGKNI.cjs.map} +1 -1
- package/dist/{agent-CbZPGFfM.d.cts → agent-DGv1-d81.d.cts} +51 -1
- package/dist/{agent-HW7OY2W3.js → agent-LFSVFAUI.js} +10 -9
- package/dist/{agent-HW7OY2W3.js.map → agent-LFSVFAUI.js.map} +1 -1
- package/dist/{agent-BJbGi8-R.d.ts → agent-SmxntivO.d.ts} +51 -1
- package/dist/{chunk-U2FO3MRG.cjs → chunk-2DYI7MIF.cjs} +2 -2
- package/dist/chunk-2DYI7MIF.cjs.map +1 -0
- package/dist/{chunk-OIYQBUW4.cjs → chunk-6M6A6WWW.cjs} +2 -2
- package/dist/{chunk-OIYQBUW4.cjs.map → chunk-6M6A6WWW.cjs.map} +1 -1
- package/dist/chunk-B3HUL2OQ.js +78 -0
- package/dist/chunk-B3HUL2OQ.js.map +1 -0
- package/dist/{chunk-E2YEDATX.cjs → chunk-E33A7YIR.cjs} +28 -6
- package/dist/chunk-E33A7YIR.cjs.map +1 -0
- package/dist/chunk-FER7UMIC.cjs +75 -0
- package/dist/chunk-FER7UMIC.cjs.map +1 -0
- package/dist/{chunk-NZCFLEHO.cjs → chunk-FTRNHGAD.cjs} +11 -11
- package/dist/{chunk-NZCFLEHO.cjs.map → chunk-FTRNHGAD.cjs.map} +1 -1
- package/dist/{chunk-EVADEGM7.cjs → chunk-FX2DAR5R.cjs} +7 -5
- package/dist/chunk-FX2DAR5R.cjs.map +1 -0
- package/dist/{chunk-WA3FO4R7.js → chunk-GBCQ5742.js} +7 -6
- package/dist/chunk-GBCQ5742.js.map +1 -0
- package/dist/{chunk-S6F3FKFR.cjs → chunk-HTO4C32Q.cjs} +67 -51
- package/dist/chunk-HTO4C32Q.cjs.map +1 -0
- package/dist/{chunk-XDNGF5BY.js → chunk-KT6SWUY6.js} +4 -4
- package/dist/{chunk-XDNGF5BY.js.map → chunk-KT6SWUY6.js.map} +1 -1
- package/dist/chunk-LDDUIXWS.cjs +81 -0
- package/dist/chunk-LDDUIXWS.cjs.map +1 -0
- package/dist/chunk-OMDRRHRF.js +73 -0
- package/dist/chunk-OMDRRHRF.js.map +1 -0
- package/dist/{chunk-GQBXBHZ2.cjs → chunk-PZ4Q5K7O.cjs} +5 -5
- package/dist/{chunk-GQBXBHZ2.cjs.map → chunk-PZ4Q5K7O.cjs.map} +1 -1
- package/dist/{chunk-VGUOUAM2.js → chunk-Q56IYTBZ.js} +2 -2
- package/dist/chunk-Q56IYTBZ.js.map +1 -0
- package/dist/{chunk-SJLOIZ4Z.js → chunk-SDYJESYZ.js} +27 -6
- package/dist/chunk-SDYJESYZ.js.map +1 -0
- package/dist/{chunk-CCRWSZ2F.js → chunk-TKE4RTYA.js} +31 -15
- package/dist/chunk-TKE4RTYA.js.map +1 -0
- package/dist/{chunk-WYPHQ7NM.js → chunk-WBGCDZDV.js} +3 -3
- package/dist/{chunk-WYPHQ7NM.js.map → chunk-WBGCDZDV.js.map} +1 -1
- package/dist/{chunk-DGRZNMTU.js → chunk-XV2RBL6D.js} +2 -2
- package/dist/{chunk-DGRZNMTU.js.map → chunk-XV2RBL6D.js.map} +1 -1
- package/dist/{compact-session-42BK7RE3.cjs → compact-session-24PK2G4M.cjs} +13 -13
- package/dist/{compact-session-42BK7RE3.cjs.map → compact-session-24PK2G4M.cjs.map} +1 -1
- package/dist/{compact-session-QMBOCFVQ.js → compact-session-J7VNCICZ.js} +5 -5
- package/dist/{compact-session-QMBOCFVQ.js.map → compact-session-J7VNCICZ.js.map} +1 -1
- package/dist/compaction.cjs +17 -13
- package/dist/compaction.d.cts +8 -0
- package/dist/compaction.d.ts +8 -0
- package/dist/compaction.js +1 -1
- package/dist/{cron-BwojPwEs.d.cts → cron-BiK_aNJI.d.cts} +1 -1
- package/dist/{cron-BU9qD5B6.d.ts → cron-Dx7B-3WB.d.ts} +1 -1
- package/dist/cron.cjs +10 -9
- package/dist/cron.d.cts +2 -2
- package/dist/cron.d.ts +2 -2
- package/dist/cron.js +9 -8
- package/dist/eval.cjs +9 -8
- package/dist/eval.cjs.map +1 -1
- package/dist/eval.js +8 -7
- package/dist/eval.js.map +1 -1
- package/dist/fs-session-store-MZ4GD2C6.js +10 -0
- package/dist/{fs-session-store-T7YPW5A4.js.map → fs-session-store-MZ4GD2C6.js.map} +1 -1
- package/dist/fs-session-store-YMBSJ5Y7.cjs +19 -0
- package/dist/{fs-session-store-IIP7ZBYE.cjs.map → fs-session-store-YMBSJ5Y7.cjs.map} +1 -1
- package/dist/index.cjs +52 -32
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -4
- package/dist/index.d.ts +19 -4
- package/dist/index.js +32 -12
- package/dist/index.js.map +1 -1
- package/dist/{inject-session-6ZMCA2NE.cjs → inject-session-343WIDCM.cjs} +6 -6
- package/dist/{inject-session-6ZMCA2NE.cjs.map → inject-session-343WIDCM.cjs.map} +1 -1
- package/dist/{inject-session-YA3GQE4G.js → inject-session-RZEDWO53.js} +4 -4
- package/dist/{inject-session-YA3GQE4G.js.map → inject-session-RZEDWO53.js.map} +1 -1
- package/dist/internal/local-agent/local-agent.d.ts +93 -1
- package/dist/internal/persistence/fs-session-store.d.cts +16 -0
- package/dist/internal/persistence/fs-session-store.d.ts +16 -0
- package/dist/internal/persistence/index.cjs +7 -7
- package/dist/internal/persistence/index.js +1 -1
- package/dist/internal/persistence/paths.d.cts +11 -1
- package/dist/internal/persistence/paths.d.ts +11 -1
- package/dist/internal/persistence/session-writer.d.cts +8 -0
- package/dist/internal/persistence/session-writer.d.ts +8 -0
- package/dist/internal/session/agent-session.d.ts +22 -0
- package/dist/persistence.cjs +13 -39
- package/dist/persistence.cjs.map +1 -1
- package/dist/persistence.d.cts +1 -0
- package/dist/persistence.d.ts +1 -0
- package/dist/persistence.js +4 -36
- package/dist/persistence.js.map +1 -1
- package/dist/{session-transcript-5VZUWEJ5.js → session-transcript-F2ANTA2M.js} +3 -3
- package/dist/{session-transcript-5VZUWEJ5.js.map → session-transcript-F2ANTA2M.js.map} +1 -1
- package/dist/{session-transcript-T4SB66I7.cjs → session-transcript-JXFMPLOT.cjs} +13 -13
- package/dist/{session-transcript-T4SB66I7.cjs.map → session-transcript-JXFMPLOT.cjs.map} +1 -1
- package/dist/subagents-loader.d.cts +1 -1
- package/dist/subagents-loader.d.ts +1 -1
- package/dist/types/session-record.d.ts +51 -1
- package/package.json +1 -1
- package/dist/chunk-CCRWSZ2F.js.map +0 -1
- package/dist/chunk-E2YEDATX.cjs.map +0 -1
- package/dist/chunk-EVADEGM7.cjs.map +0 -1
- package/dist/chunk-IOOSAZZH.cjs +0 -30
- package/dist/chunk-IOOSAZZH.cjs.map +0 -1
- package/dist/chunk-RPKTXBPK.js +0 -28
- package/dist/chunk-RPKTXBPK.js.map +0 -1
- package/dist/chunk-S6F3FKFR.cjs.map +0 -1
- package/dist/chunk-SJLOIZ4Z.js.map +0 -1
- package/dist/chunk-U2FO3MRG.cjs.map +0 -1
- package/dist/chunk-VGUOUAM2.js.map +0 -1
- package/dist/chunk-WA3FO4R7.js.map +0 -1
- package/dist/fs-session-store-IIP7ZBYE.cjs +0 -17
- package/dist/fs-session-store-T7YPW5A4.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-DyVbXdR4.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-DyVbXdR4.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-
|
|
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-
|
|
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-DGv1-d81.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-DGv1-d81.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-CwEJtLPE.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-CwEJtLPE.cjs';
|
|
7
7
|
import * as zod from 'zod';
|
|
8
8
|
import { ZodType, z } from 'zod';
|
|
9
|
-
import { S as StepResult } from './cron-
|
|
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-
|
|
9
|
+
import { S as StepResult } from './cron-BiK_aNJI.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-BiK_aNJI.cjs';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Public compaction / context-management helpers (M2-1, extended V3-3).
|
|
@@ -1019,6 +1019,21 @@ declare class Provider {
|
|
|
1019
1019
|
* `.plugins(Provider.builtins())` once, then pick a `provider/model` id. @public
|
|
1020
1020
|
*/
|
|
1021
1021
|
static builtins(): Plugin[];
|
|
1022
|
+
/**
|
|
1023
|
+
* O builtin que atende `modelId`, ou `undefined` quando nenhum atende.
|
|
1024
|
+
*
|
|
1025
|
+
* A gramática de um id de modelo — `provider/modelo` — passa a ter **um** dono. M94: o consumidor
|
|
1026
|
+
* a refazia à mão com `modelId.slice(0, modelId.indexOf('/'))`, que num id **sem barra** devolve o
|
|
1027
|
+
* id menos o último caractere (`claude-opus-5` → `claude-opus-`): casa provider nenhum e o
|
|
1028
|
+
* chamador seguia para o default, sem distinguir isso de um acerto. Um modelo não-roteável era
|
|
1029
|
+
* indistinguível do caminho feliz.
|
|
1030
|
+
*
|
|
1031
|
+
* Devolve `undefined` em vez de lançar: quem decide se a ausência é erro é o chamador, e só ele
|
|
1032
|
+
* sabe se o modelo veio de um `--model` explícito (erro) ou do default (normal).
|
|
1033
|
+
*
|
|
1034
|
+
* @public
|
|
1035
|
+
*/
|
|
1036
|
+
static forModel(modelId: string): Plugin | undefined;
|
|
1022
1037
|
}
|
|
1023
1038
|
|
|
1024
1039
|
/**
|
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-Cua4WC9H.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-Cua4WC9H.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-
|
|
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-
|
|
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-SmxntivO.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-SmxntivO.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-CwEJtLPE.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-CwEJtLPE.js';
|
|
7
7
|
import * as zod from 'zod';
|
|
8
8
|
import { ZodType, z } from 'zod';
|
|
9
|
-
import { S as StepResult } from './cron-
|
|
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-
|
|
9
|
+
import { S as StepResult } from './cron-Dx7B-3WB.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-Dx7B-3WB.js';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Public compaction / context-management helpers (M2-1, extended V3-3).
|
|
@@ -1019,6 +1019,21 @@ declare class Provider {
|
|
|
1019
1019
|
* `.plugins(Provider.builtins())` once, then pick a `provider/model` id. @public
|
|
1020
1020
|
*/
|
|
1021
1021
|
static builtins(): Plugin[];
|
|
1022
|
+
/**
|
|
1023
|
+
* O builtin que atende `modelId`, ou `undefined` quando nenhum atende.
|
|
1024
|
+
*
|
|
1025
|
+
* A gramática de um id de modelo — `provider/modelo` — passa a ter **um** dono. M94: o consumidor
|
|
1026
|
+
* a refazia à mão com `modelId.slice(0, modelId.indexOf('/'))`, que num id **sem barra** devolve o
|
|
1027
|
+
* id menos o último caractere (`claude-opus-5` → `claude-opus-`): casa provider nenhum e o
|
|
1028
|
+
* chamador seguia para o default, sem distinguir isso de um acerto. Um modelo não-roteável era
|
|
1029
|
+
* indistinguível do caminho feliz.
|
|
1030
|
+
*
|
|
1031
|
+
* Devolve `undefined` em vez de lançar: quem decide se a ausência é erro é o chamador, e só ele
|
|
1032
|
+
* sabe se o modelo veio de um `--model` explícito (erro) ou do default (normal).
|
|
1033
|
+
*
|
|
1034
|
+
* @public
|
|
1035
|
+
*/
|
|
1036
|
+
static forModel(modelId: string): Plugin | undefined;
|
|
1022
1037
|
}
|
|
1023
1038
|
|
|
1024
1039
|
/**
|
package/dist/index.js
CHANGED
|
@@ -6,22 +6,22 @@ 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-
|
|
10
|
-
import { MEMORY_EMBEDDING_ADAPTERS, resolveApiKey, shouldUseFixtureMode, isFixtureApiKey, httpRequest, DEFAULT_AGENTIC_MODEL_ID, Agent } from './chunk-
|
|
11
|
-
export { Agent, AgentBuilder, Tool, ToolError, UsageAccumulator, computeCost, getPricingEntry } from './chunk-
|
|
9
|
+
export { Cron } from './chunk-WBGCDZDV.js';
|
|
10
|
+
import { MEMORY_EMBEDDING_ADAPTERS, resolveApiKey, shouldUseFixtureMode, isFixtureApiKey, httpRequest, DEFAULT_AGENTIC_MODEL_ID, Agent } from './chunk-TKE4RTYA.js';
|
|
11
|
+
export { Agent, AgentBuilder, Tool, ToolError, UsageAccumulator, computeCost, getPricingEntry } from './chunk-TKE4RTYA.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-
|
|
15
|
+
import './chunk-SDYJESYZ.js';
|
|
16
16
|
import './chunk-K2BQQ445.js';
|
|
17
|
-
import './chunk-
|
|
18
|
-
import { discoverProviderPlugins, mapOllamaTransportError, mapOllamaHttpError } from './chunk-
|
|
17
|
+
import './chunk-OMDRRHRF.js';
|
|
18
|
+
import { discoverProviderPlugins, mapOllamaTransportError, mapOllamaHttpError } from './chunk-KT6SWUY6.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';
|
|
22
22
|
import './chunk-XIG2IE3L.js';
|
|
23
23
|
import './chunk-7GFX45DD.js';
|
|
24
|
-
import './chunk-
|
|
24
|
+
import './chunk-XV2RBL6D.js';
|
|
25
25
|
import './chunk-FD2UT76F.js';
|
|
26
26
|
import './chunk-U54XCYG3.js';
|
|
27
27
|
import './chunk-FV3YEMQ7.js';
|
|
@@ -30,17 +30,18 @@ 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-B3HUL2OQ.js';
|
|
33
34
|
import './chunk-UAYYNWYJ.js';
|
|
34
35
|
import './chunk-77FOZCOT.js';
|
|
35
36
|
import { withCwdMutex } from './chunk-2XLKLVVR.js';
|
|
36
37
|
export { withCwdMutex } from './chunk-2XLKLVVR.js';
|
|
37
|
-
import './chunk-
|
|
38
|
+
import './chunk-Q56IYTBZ.js';
|
|
38
39
|
import './chunk-BXV2QUIC.js';
|
|
39
40
|
import { toJsonSchema } from './chunk-4VPXM6UU.js';
|
|
40
41
|
import { replaceFileAtomic } from './chunk-S2BBRVQX.js';
|
|
41
42
|
import './chunk-BNIFFFH3.js';
|
|
42
|
-
import './chunk-
|
|
43
|
-
import './chunk-X2FR4OIT.js';
|
|
43
|
+
import './chunk-GBCQ5742.js';
|
|
44
|
+
import { parseModelId } from './chunk-X2FR4OIT.js';
|
|
44
45
|
import { registerBuiltins, listProviders, getCatalogCapabilities, getProviderProfile } from './chunk-KAP4GJHO.js';
|
|
45
46
|
import './chunk-LU7VALW5.js';
|
|
46
47
|
import './chunk-5NBUH3NO.js';
|
|
@@ -574,7 +575,7 @@ function defineProvider(profile, opts) {
|
|
|
574
575
|
profile
|
|
575
576
|
};
|
|
576
577
|
}
|
|
577
|
-
var Provider = class {
|
|
578
|
+
var Provider = class _Provider {
|
|
578
579
|
constructor() {
|
|
579
580
|
}
|
|
580
581
|
static create(profile, opts) {
|
|
@@ -592,6 +593,25 @@ var Provider = class {
|
|
|
592
593
|
registerBuiltins();
|
|
593
594
|
return listProviders().map((profile) => defineProvider(profile));
|
|
594
595
|
}
|
|
596
|
+
/**
|
|
597
|
+
* O builtin que atende `modelId`, ou `undefined` quando nenhum atende.
|
|
598
|
+
*
|
|
599
|
+
* A gramática de um id de modelo — `provider/modelo` — passa a ter **um** dono. M94: o consumidor
|
|
600
|
+
* a refazia à mão com `modelId.slice(0, modelId.indexOf('/'))`, que num id **sem barra** devolve o
|
|
601
|
+
* id menos o último caractere (`claude-opus-5` → `claude-opus-`): casa provider nenhum e o
|
|
602
|
+
* chamador seguia para o default, sem distinguir isso de um acerto. Um modelo não-roteável era
|
|
603
|
+
* indistinguível do caminho feliz.
|
|
604
|
+
*
|
|
605
|
+
* Devolve `undefined` em vez de lançar: quem decide se a ausência é erro é o chamador, e só ele
|
|
606
|
+
* sabe se o modelo veio de um `--model` explícito (erro) ou do default (normal).
|
|
607
|
+
*
|
|
608
|
+
* @public
|
|
609
|
+
*/
|
|
610
|
+
static forModel(modelId) {
|
|
611
|
+
const { provider } = parseModelId(modelId);
|
|
612
|
+
if (provider === void 0) return void 0;
|
|
613
|
+
return _Provider.builtins().find((p) => p.name === provider);
|
|
614
|
+
}
|
|
595
615
|
};
|
|
596
616
|
var SkillReadInputSchema = z.object({
|
|
597
617
|
name: z.string().min(1, "skill_read: `name` is required.")
|
|
@@ -1580,7 +1600,7 @@ function ehAgenteConstruido(m) {
|
|
|
1580
1600
|
return typeof m.send === "function";
|
|
1581
1601
|
}
|
|
1582
1602
|
async function materializar(def, indice) {
|
|
1583
|
-
const { Agent: Agent2 } = await import('./agent-
|
|
1603
|
+
const { Agent: Agent2 } = await import('./agent-LFSVFAUI.js');
|
|
1584
1604
|
return Agent2.create({
|
|
1585
1605
|
// `AgentDefinition.model` admite o sentinel `'inherit'`, que não é um id de modelo. Herdar
|
|
1586
1606
|
// aqui significa "não declare nada e deixe o default valer" — passar o literal adiante criaria
|