@theokit/sdk 5.13.0 → 5.14.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 +34 -0
- package/dist/{agent-iW5kPpfT.d.cts → agent-DExqjqYy.d.cts} +9 -1
- package/dist/{agent-DSMuwADp.d.ts → agent-Dfw3VsIX.d.ts} +9 -1
- package/dist/{agent-5DSDDH7K.js → agent-T34LCGQM.js} +11 -11
- package/dist/{agent-5DSDDH7K.js.map → agent-T34LCGQM.js.map} +1 -1
- package/dist/{agent-WOMRT3KX.cjs → agent-TL4K7BTG.cjs} +12 -12
- package/dist/{agent-WOMRT3KX.cjs.map → agent-TL4K7BTG.cjs.map} +1 -1
- package/dist/auth/index.cjs +17 -16
- package/dist/auth/index.cjs.map +1 -1
- package/dist/auth/index.js +5 -4
- package/dist/auth/index.js.map +1 -1
- package/dist/{chunk-NHOEXFZT.js → chunk-2HXTNVLM.js} +5 -2
- package/dist/chunk-2HXTNVLM.js.map +1 -0
- package/dist/{chunk-KL7ZUMK3.cjs → chunk-2WY2OFSC.cjs} +146 -77
- package/dist/chunk-2WY2OFSC.cjs.map +1 -0
- package/dist/{chunk-3FSBE4PS.js → chunk-3GTN4HOO.js} +10 -6
- package/dist/chunk-3GTN4HOO.js.map +1 -0
- package/dist/{chunk-XOYNB3YN.js → chunk-3ONIVO2I.js} +3 -3
- package/dist/{chunk-XOYNB3YN.js.map → chunk-3ONIVO2I.js.map} +1 -1
- package/dist/{chunk-7WARNHWW.cjs → chunk-3UMPP553.cjs} +5 -2
- package/dist/chunk-3UMPP553.cjs.map +1 -0
- package/dist/{chunk-NWWTYBD3.cjs → chunk-4KBI37F3.cjs} +5 -5
- package/dist/{chunk-NWWTYBD3.cjs.map → chunk-4KBI37F3.cjs.map} +1 -1
- package/dist/{chunk-S46WJTDL.cjs → chunk-4TEGFMSP.cjs} +6 -6
- package/dist/{chunk-S46WJTDL.cjs.map → chunk-4TEGFMSP.cjs.map} +1 -1
- package/dist/{chunk-QISSETTG.cjs → chunk-5645PMVU.cjs} +6 -4
- package/dist/chunk-5645PMVU.cjs.map +1 -0
- package/dist/{chunk-5A4UFBHW.cjs → chunk-A77UMVMD.cjs} +15 -11
- package/dist/chunk-A77UMVMD.cjs.map +1 -0
- package/dist/{chunk-47EACDOC.cjs → chunk-BZK5QL3N.cjs} +4 -4
- package/dist/{chunk-47EACDOC.cjs.map → chunk-BZK5QL3N.cjs.map} +1 -1
- package/dist/{chunk-5HSMH2ZZ.js → chunk-CJN5CEI3.js} +4 -4
- package/dist/{chunk-5HSMH2ZZ.js.map → chunk-CJN5CEI3.js.map} +1 -1
- package/dist/{chunk-JX4LB6XO.js → chunk-GARVAUCU.js} +93 -24
- package/dist/chunk-GARVAUCU.js.map +1 -0
- package/dist/{chunk-DVP3YMDA.cjs → chunk-LXG6VL6R.cjs} +3 -3
- package/dist/{chunk-DVP3YMDA.cjs.map → chunk-LXG6VL6R.cjs.map} +1 -1
- package/dist/{chunk-ZTP6ZACR.js → chunk-NAVUTK6X.js} +3 -3
- package/dist/{chunk-ZTP6ZACR.js.map → chunk-NAVUTK6X.js.map} +1 -1
- package/dist/{chunk-2SFLLOMN.js → chunk-NVQSBRG6.js} +3 -3
- package/dist/{chunk-2SFLLOMN.js.map → chunk-NVQSBRG6.js.map} +1 -1
- package/dist/{chunk-MS3TQSXU.js → chunk-QD6B6W6I.js} +6 -4
- package/dist/chunk-QD6B6W6I.js.map +1 -0
- package/dist/chunk-R5UQL2R5.cjs +18 -0
- package/dist/{chunk-LO6LIUZ6.cjs.map → chunk-R5UQL2R5.cjs.map} +1 -1
- package/dist/{chunk-4UYHP6NF.cjs → chunk-SNVYOX46.cjs} +28 -28
- package/dist/{chunk-4UYHP6NF.cjs.map → chunk-SNVYOX46.cjs.map} +1 -1
- package/dist/{chunk-NKQVLWDF.js → chunk-ULEK4OM4.js} +3 -3
- package/dist/{chunk-NKQVLWDF.js.map → chunk-ULEK4OM4.js.map} +1 -1
- package/dist/{chunk-2PRGRYEQ.js → chunk-ZOL3L4EH.js} +4 -4
- package/dist/{chunk-2PRGRYEQ.js.map → chunk-ZOL3L4EH.js.map} +1 -1
- package/dist/{compact-session-B7P6EU3Z.cjs → compact-session-D2MQDB6G.cjs} +15 -15
- package/dist/{compact-session-B7P6EU3Z.cjs.map → compact-session-D2MQDB6G.cjs.map} +1 -1
- package/dist/{compact-session-5HMX6KYT.js → compact-session-N2PPHQO6.js} +6 -6
- package/dist/{compact-session-5HMX6KYT.js.map → compact-session-N2PPHQO6.js.map} +1 -1
- package/dist/{cron-DdKzwJqK.d.ts → cron-BubDpFJG.d.ts} +2 -2
- package/dist/{cron-BvxrLW5J.d.cts → cron-CK2v0VWA.d.cts} +2 -2
- package/dist/cron.cjs +11 -11
- package/dist/cron.d.cts +3 -3
- package/dist/cron.d.ts +3 -3
- package/dist/cron.js +10 -10
- package/dist/eval.cjs +10 -10
- package/dist/eval.js +9 -9
- package/dist/index.cjs +69 -53
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -6
- package/dist/index.d.ts +9 -6
- package/dist/index.js +38 -22
- package/dist/index.js.map +1 -1
- package/dist/{inject-session-WOH7TPDX.cjs → inject-session-3ICZIJ2N.cjs} +4 -4
- package/dist/{inject-session-WOH7TPDX.cjs.map → inject-session-3ICZIJ2N.cjs.map} +1 -1
- package/dist/{inject-session-75L3NCNL.js → inject-session-J26SHHIO.js} +3 -3
- package/dist/{inject-session-75L3NCNL.js.map → inject-session-J26SHHIO.js.map} +1 -1
- package/dist/internal/agent-loop/prune-tool-results.d.ts +37 -0
- package/dist/internal/auth/credential-store.d.ts +1 -1
- package/dist/internal/auth/types.d.ts +4 -0
- package/dist/internal/runtime/skills/binary-on-path.d.ts +1 -0
- package/dist/internal/runtime/skills/discover-skills.d.ts +2 -0
- package/dist/mcp-auth.cjs +2 -2
- package/dist/mcp-auth.js +1 -1
- package/dist/models.cjs +11 -11
- package/dist/models.js +4 -4
- package/dist/providers.cjs +6 -6
- package/dist/providers.js +4 -4
- package/dist/{sdk-agent-4-dXI2GS.d.cts → sdk-agent-DwzHcuxy.d.cts} +28 -3
- package/dist/{sdk-agent-CTOJlWA_.d.ts → sdk-agent-a3fW1xUK.d.ts} +28 -3
- package/dist/skills.cjs +4 -4
- package/dist/skills.js +1 -1
- package/dist/subagents-loader.d.cts +2 -2
- package/dist/subagents-loader.d.ts +2 -2
- package/dist/types/agent.d.ts +6 -0
- package/dist/types/run.d.ts +27 -2
- package/dist/workflow.d.cts +1 -1
- package/dist/workflow.d.ts +1 -1
- package/docs/adr/mutation-testing-scope.md +56 -0
- package/docs/error-codes.md +8 -6
- package/docs/harness-capability-map.md +29 -1
- package/package.json +1 -1
- package/dist/chunk-3FSBE4PS.js.map +0 -1
- package/dist/chunk-5A4UFBHW.cjs.map +0 -1
- package/dist/chunk-7WARNHWW.cjs.map +0 -1
- package/dist/chunk-JX4LB6XO.js.map +0 -1
- package/dist/chunk-KL7ZUMK3.cjs.map +0 -1
- package/dist/chunk-LO6LIUZ6.cjs +0 -18
- package/dist/chunk-MS3TQSXU.js.map +0 -1
- package/dist/chunk-NHOEXFZT.js.map +0 -1
- package/dist/chunk-QISSETTG.cjs.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
+
import { TokenUsage } from "./index.js";
|
|
1
2
|
import { T as TheokitAgentError, E as ErrorMetadata } from './errors-base-B5g01neU.cjs';
|
|
2
3
|
export { a as ErrorCode } from './errors-base-B5g01neU.cjs';
|
|
3
|
-
import { A as AgentOptions, L as LocalOptions, B as BuiltinToolName, M as MemorySettings, S as SystemPromptResolver, C as CloudOptions, 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, l as BudgetTracker, m as MemoryProvider, n as PreToolCallDecision } from './agent-
|
|
4
|
-
export { o as ActiveMemoryPassArgs, p as ActiveMemoryPassResult, q as AgentSubagentDescription, r as AgentToolDescription, s as BudgetCheck, t as BudgetTotal, u as BudgetUsageEvent, 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 {
|
|
6
|
-
export { A as AgentConversationTurn, j as AgentMemory, k as AgentOperation, l as AssistantMessage, m as CompletionCheck, n as CompletionCheckResult, o as ContextBudget, p as ContextManagerKind, q as ContextSnapshot, r as ContextSource, s as ContextSourceStatus, t as ConversationStep, u as ConversationTurn, v as CostBreakdown, w as CostSource, x as CostStatus, D as DoomLoopThresholds, E as EnvPolicy, F as ForkOptions, y as ForkResult, z as GenerateOptions, B as GenerateRunResult, I as InputProcessorContext, H as InteractionUpdate, K as InvalidateCacheOptions, L as McpAuthConfig, N as McpHttpServerConfig, O as McpOAuthConfig, Q as McpStdioServerConfig, T as MemoryAdapter, U as MemoryAdapterCapabilities, V as MemoryContext, W as MemoryFact, X as MemoryRevision, Y as MemoryToolSchema, Z as MemoryTurnMessage, _ as MessageOrigin, $ as OutputProcessorContext, a0 as PartialToolCallUpdate, a1 as PersonalityPreset, a2 as ProcessorControls, a3 as ProcessorTripwire, a4 as ProcessorViolation, a5 as ProviderCapability, a6 as ProviderRoute, a7 as
|
|
4
|
+
import { A as AgentOptions, L as LocalOptions, B as BuiltinToolName, M as MemorySettings, S as SystemPromptResolver, C as CloudOptions, 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, l as BudgetTracker, m as MemoryProvider, n as PreToolCallDecision } from './agent-DExqjqYy.cjs';
|
|
5
|
+
export { o as ActiveMemoryPassArgs, p as ActiveMemoryPassResult, q as AgentSubagentDescription, r as AgentToolDescription, s as BudgetCheck, t as BudgetTotal, u as BudgetUsageEvent, 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-DExqjqYy.cjs';
|
|
6
|
+
import { ac as RunEvent, v as CostBreakdown, R as RunResult, P as ProviderRoutingSettings, S as SDKAgent, M as McpServerConfig, C as ContextSettings, a as PluginsSettings, b as Run, c as Processor, J as JudgeResult, G as GoalOptions, d as GoalEvent, e as GoalResult, f as MemoryId, g as RunEventSink$1, h as SDKProvider, i as SDKMessage } from './sdk-agent-DwzHcuxy.cjs';
|
|
7
|
+
export { A as AgentConversationTurn, j as AgentMemory, k as AgentOperation, l as AssistantMessage, m as CompletionCheck, n as CompletionCheckResult, o as ContextBudget, p as ContextManagerKind, q as ContextSnapshot, r as ContextSource, s as ContextSourceStatus, t as ConversationStep, u as ConversationTurn, v as CostBreakdown, w as CostSource, x as CostStatus, D as DoomLoopThresholds, E as EnvPolicy, F as ForkOptions, y as ForkResult, z as GenerateOptions, B as GenerateRunResult, I as InputProcessorContext, H as InteractionUpdate, K as InvalidateCacheOptions, L as McpAuthConfig, N as McpHttpServerConfig, O as McpOAuthConfig, Q as McpStdioServerConfig, T as MemoryAdapter, U as MemoryAdapterCapabilities, V as MemoryContext, W as MemoryFact, X as MemoryRevision, Y as MemoryToolSchema, Z as MemoryTurnMessage, _ as MessageOrigin, $ as OutputProcessorContext, a0 as PartialToolCallUpdate, a1 as PersonalityPreset, a2 as ProcessorControls, a3 as ProcessorTripwire, a4 as ProcessorViolation, a5 as ProviderCapability, a6 as ProviderRoute, a7 as PruneToolResultsOptions, a8 as ResolvedProviderRoute, a9 as RunCompactBoundaryEvent, aa as RunCompletionCheckEvent, ab as RunErrorDetail, ac as RunEvent, ad as RunGitInfo, ae as RunMemoryDegradedEvent, af as RunPermissionDeniedEvent, ag as RunRateLimitEvent, ah as RunStatus, ai as RunTaskCompletedEvent, aj as RunTaskStartedEvent, ak as RunTaskUpdatedEvent, al as RunTimelineEvent, am as RunToCompletionOptions, an as RunToCompletionResult, ao as RunToolProgressEvent, ap as RunTripwireEvent, aq as RunUntilIterator, ar as SDKAgentPlugins, as as SDKAgentSkillDetail, at as SDKAgentSkills, au as SDKArtifact, av as SDKAssistantMessage, aw as SDKContextManager, ax as SDKImage, ay as SDKImageDimension, az as SDKObjectDelta, aA as SDKPluginMetadata, aB as SDKProvidersManager, aC as SDKRequestMessage, aD as SDKStatusMessage, aE as SDKSystemMessage, aF as SDKTaskMessage, aG as SDKThinkingMessage, aH as SDKToolUseMessage, aI as SDKUserMessage, aJ as SDKUserMessageEvent, aK as SendOptions, aL as ShellCommand, aM as ShellConversationTurn, aN as ShellOutput, aO as ShellOutputDeltaUpdate, aP as StepCompletedUpdate, aQ as StepStartedUpdate, aR as StreamToCompletionResult, aS as SummaryCompletedUpdate, aT as SummaryStartedUpdate, aU as SummaryUpdate, aV as SystemPromptSkillRef, aW as TextDeltaUpdate, aX as ThinkingCompletedUpdate, aY as ThinkingDeltaUpdate, aZ as ThinkingMessage, a_ as TokenDeltaUpdate, a$ as TokenUsage, b0 as ToolCall, b1 as ToolCallCompletedUpdate, b2 as ToolCallStartedUpdate, b3 as ToolResult, b4 as ToolResultGuardOptions, b5 as ToolUseBlock, b6 as TurnEndedUpdate, b7 as UserMessage, b8 as UserMessageAppendedUpdate, b9 as Verdict } from './sdk-agent-DwzHcuxy.cjs';
|
|
7
8
|
import * as zod from 'zod';
|
|
8
9
|
import { ZodType, z } from 'zod';
|
|
9
10
|
import { S as StructuredOutputError, B as BudgetOptions, a as BudgetHandle, b as BudgetSnapshot } from './errors-BiDQFWTG.cjs';
|
|
10
11
|
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-BiDQFWTG.cjs';
|
|
11
12
|
import { M as ModelSelection, C as CustomTool, T as ToolResultContentBlock, P as PermissionMode } from './agent-prims-CZyxfCmS.cjs';
|
|
12
13
|
export { I as ImageBlock, a as ModelParameterValue, R as RunOperation, b as TextBlock, c as ToolContextMessage } from './agent-prims-CZyxfCmS.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-
|
|
14
|
+
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-CK2v0VWA.cjs';
|
|
14
15
|
import { StepResult } from './workflow.cjs';
|
|
15
16
|
export { Workflow, agentStep, fn } from './workflow.cjs';
|
|
16
17
|
|
|
@@ -1678,13 +1679,15 @@ declare class Provider {
|
|
|
1678
1679
|
* listed by name and description, with the instructions under the frontmatter unable to arrive.
|
|
1679
1680
|
*/
|
|
1680
1681
|
type ReadableSkill = InlineSkill | Skill;
|
|
1682
|
+
/** A fixed list, or a function re-evaluated on every call so later-discovered skills are readable. */
|
|
1683
|
+
type SkillReadSource = ReadonlyArray<ReadableSkill> | (() => ReadonlyArray<ReadableSkill> | Promise<ReadonlyArray<ReadableSkill>>);
|
|
1681
1684
|
/** SE36 — `SkillReadTool.create` replaces `defineSkillReadTool` (ADR 0015). @public *
|
|
1682
1685
|
* `SkillReadTool.create` returns a **`CustomTool`** — a skill-reading tool, not a
|
|
1683
1686
|
* `SkillReadTool` instance.
|
|
1684
1687
|
*/
|
|
1685
1688
|
declare class SkillReadTool {
|
|
1686
1689
|
private constructor();
|
|
1687
|
-
static create(skills:
|
|
1690
|
+
static create(skills: SkillReadSource): CustomTool;
|
|
1688
1691
|
}
|
|
1689
1692
|
|
|
1690
1693
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
+
import { TokenUsage } from "./types/index.js";
|
|
1
2
|
import { T as TheokitAgentError, E as ErrorMetadata } from './errors-base-B5g01neU.js';
|
|
2
3
|
export { a as ErrorCode } from './errors-base-B5g01neU.js';
|
|
3
|
-
import { A as AgentOptions, L as LocalOptions, B as BuiltinToolName, M as MemorySettings, S as SystemPromptResolver, C as CloudOptions, 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, l as BudgetTracker, m as MemoryProvider, n as PreToolCallDecision } from './agent-
|
|
4
|
-
export { o as ActiveMemoryPassArgs, p as ActiveMemoryPassResult, q as AgentSubagentDescription, r as AgentToolDescription, s as BudgetCheck, t as BudgetTotal, u as BudgetUsageEvent, 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 {
|
|
6
|
-
export { A as AgentConversationTurn, j as AgentMemory, k as AgentOperation, l as AssistantMessage, m as CompletionCheck, n as CompletionCheckResult, o as ContextBudget, p as ContextManagerKind, q as ContextSnapshot, r as ContextSource, s as ContextSourceStatus, t as ConversationStep, u as ConversationTurn, v as CostBreakdown, w as CostSource, x as CostStatus, D as DoomLoopThresholds, E as EnvPolicy, F as ForkOptions, y as ForkResult, z as GenerateOptions, B as GenerateRunResult, I as InputProcessorContext, H as InteractionUpdate, K as InvalidateCacheOptions, L as McpAuthConfig, N as McpHttpServerConfig, O as McpOAuthConfig, Q as McpStdioServerConfig, T as MemoryAdapter, U as MemoryAdapterCapabilities, V as MemoryContext, W as MemoryFact, X as MemoryRevision, Y as MemoryToolSchema, Z as MemoryTurnMessage, _ as MessageOrigin, $ as OutputProcessorContext, a0 as PartialToolCallUpdate, a1 as PersonalityPreset, a2 as ProcessorControls, a3 as ProcessorTripwire, a4 as ProcessorViolation, a5 as ProviderCapability, a6 as ProviderRoute, a7 as
|
|
4
|
+
import { A as AgentOptions, L as LocalOptions, B as BuiltinToolName, M as MemorySettings, S as SystemPromptResolver, C as CloudOptions, 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, l as BudgetTracker, m as MemoryProvider, n as PreToolCallDecision } from './agent-Dfw3VsIX.js';
|
|
5
|
+
export { o as ActiveMemoryPassArgs, p as ActiveMemoryPassResult, q as AgentSubagentDescription, r as AgentToolDescription, s as BudgetCheck, t as BudgetTotal, u as BudgetUsageEvent, 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-Dfw3VsIX.js';
|
|
6
|
+
import { ac as RunEvent, v as CostBreakdown, R as RunResult, P as ProviderRoutingSettings, S as SDKAgent, M as McpServerConfig, C as ContextSettings, a as PluginsSettings, b as Run, c as Processor, J as JudgeResult, G as GoalOptions, d as GoalEvent, e as GoalResult, f as MemoryId, g as RunEventSink$1, h as SDKProvider, i as SDKMessage } from './sdk-agent-a3fW1xUK.js';
|
|
7
|
+
export { A as AgentConversationTurn, j as AgentMemory, k as AgentOperation, l as AssistantMessage, m as CompletionCheck, n as CompletionCheckResult, o as ContextBudget, p as ContextManagerKind, q as ContextSnapshot, r as ContextSource, s as ContextSourceStatus, t as ConversationStep, u as ConversationTurn, v as CostBreakdown, w as CostSource, x as CostStatus, D as DoomLoopThresholds, E as EnvPolicy, F as ForkOptions, y as ForkResult, z as GenerateOptions, B as GenerateRunResult, I as InputProcessorContext, H as InteractionUpdate, K as InvalidateCacheOptions, L as McpAuthConfig, N as McpHttpServerConfig, O as McpOAuthConfig, Q as McpStdioServerConfig, T as MemoryAdapter, U as MemoryAdapterCapabilities, V as MemoryContext, W as MemoryFact, X as MemoryRevision, Y as MemoryToolSchema, Z as MemoryTurnMessage, _ as MessageOrigin, $ as OutputProcessorContext, a0 as PartialToolCallUpdate, a1 as PersonalityPreset, a2 as ProcessorControls, a3 as ProcessorTripwire, a4 as ProcessorViolation, a5 as ProviderCapability, a6 as ProviderRoute, a7 as PruneToolResultsOptions, a8 as ResolvedProviderRoute, a9 as RunCompactBoundaryEvent, aa as RunCompletionCheckEvent, ab as RunErrorDetail, ac as RunEvent, ad as RunGitInfo, ae as RunMemoryDegradedEvent, af as RunPermissionDeniedEvent, ag as RunRateLimitEvent, ah as RunStatus, ai as RunTaskCompletedEvent, aj as RunTaskStartedEvent, ak as RunTaskUpdatedEvent, al as RunTimelineEvent, am as RunToCompletionOptions, an as RunToCompletionResult, ao as RunToolProgressEvent, ap as RunTripwireEvent, aq as RunUntilIterator, ar as SDKAgentPlugins, as as SDKAgentSkillDetail, at as SDKAgentSkills, au as SDKArtifact, av as SDKAssistantMessage, aw as SDKContextManager, ax as SDKImage, ay as SDKImageDimension, az as SDKObjectDelta, aA as SDKPluginMetadata, aB as SDKProvidersManager, aC as SDKRequestMessage, aD as SDKStatusMessage, aE as SDKSystemMessage, aF as SDKTaskMessage, aG as SDKThinkingMessage, aH as SDKToolUseMessage, aI as SDKUserMessage, aJ as SDKUserMessageEvent, aK as SendOptions, aL as ShellCommand, aM as ShellConversationTurn, aN as ShellOutput, aO as ShellOutputDeltaUpdate, aP as StepCompletedUpdate, aQ as StepStartedUpdate, aR as StreamToCompletionResult, aS as SummaryCompletedUpdate, aT as SummaryStartedUpdate, aU as SummaryUpdate, aV as SystemPromptSkillRef, aW as TextDeltaUpdate, aX as ThinkingCompletedUpdate, aY as ThinkingDeltaUpdate, aZ as ThinkingMessage, a_ as TokenDeltaUpdate, a$ as TokenUsage, b0 as ToolCall, b1 as ToolCallCompletedUpdate, b2 as ToolCallStartedUpdate, b3 as ToolResult, b4 as ToolResultGuardOptions, b5 as ToolUseBlock, b6 as TurnEndedUpdate, b7 as UserMessage, b8 as UserMessageAppendedUpdate, b9 as Verdict } from './sdk-agent-a3fW1xUK.js';
|
|
7
8
|
import * as zod from 'zod';
|
|
8
9
|
import { ZodType, z } from 'zod';
|
|
9
10
|
import { S as StructuredOutputError, B as BudgetOptions, a as BudgetHandle, b as BudgetSnapshot } from './errors-Pf22PJJ-.js';
|
|
10
11
|
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-Pf22PJJ-.js';
|
|
11
12
|
import { M as ModelSelection, C as CustomTool, T as ToolResultContentBlock, P as PermissionMode } from './agent-prims-CZyxfCmS.js';
|
|
12
13
|
export { I as ImageBlock, a as ModelParameterValue, R as RunOperation, b as TextBlock, c as ToolContextMessage } from './agent-prims-CZyxfCmS.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-
|
|
14
|
+
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-BubDpFJG.js';
|
|
14
15
|
import { StepResult } from './workflow.js';
|
|
15
16
|
export { Workflow, agentStep, fn } from './workflow.js';
|
|
16
17
|
|
|
@@ -1678,13 +1679,15 @@ declare class Provider {
|
|
|
1678
1679
|
* listed by name and description, with the instructions under the frontmatter unable to arrive.
|
|
1679
1680
|
*/
|
|
1680
1681
|
type ReadableSkill = InlineSkill | Skill;
|
|
1682
|
+
/** A fixed list, or a function re-evaluated on every call so later-discovered skills are readable. */
|
|
1683
|
+
type SkillReadSource = ReadonlyArray<ReadableSkill> | (() => ReadonlyArray<ReadableSkill> | Promise<ReadonlyArray<ReadableSkill>>);
|
|
1681
1684
|
/** SE36 — `SkillReadTool.create` replaces `defineSkillReadTool` (ADR 0015). @public *
|
|
1682
1685
|
* `SkillReadTool.create` returns a **`CustomTool`** — a skill-reading tool, not a
|
|
1683
1686
|
* `SkillReadTool` instance.
|
|
1684
1687
|
*/
|
|
1685
1688
|
declare class SkillReadTool {
|
|
1686
1689
|
private constructor();
|
|
1687
|
-
static create(skills:
|
|
1690
|
+
static create(skills: SkillReadSource): CustomTool;
|
|
1688
1691
|
}
|
|
1689
1692
|
|
|
1690
1693
|
/**
|
package/dist/index.js
CHANGED
|
@@ -8,12 +8,12 @@ import { Workflow, agentStep } from './chunk-73IITAF7.js';
|
|
|
8
8
|
export { Workflow, agentStep, fn } from './chunk-73IITAF7.js';
|
|
9
9
|
import './chunk-TDED5XES.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-NAVUTK6X.js';
|
|
12
|
+
import { MEMORY_EMBEDDING_ADAPTERS, resolveSessionDir, DEFAULT_AGENTIC_MODEL_ID, Agent } from './chunk-GARVAUCU.js';
|
|
13
|
+
export { Agent, AgentBuilder, Tool, ToolError, UsageAccumulator, computeCost, getPricingEntry, managedSettingsPathFor, readManagedSettings } from './chunk-GARVAUCU.js';
|
|
14
14
|
import { configure, submit, list, get, cancel, subscribe } from './chunk-HWMGR3HA.js';
|
|
15
15
|
export { emitRunEvent } from './chunk-HWMGR3HA.js';
|
|
16
|
-
import './chunk-
|
|
16
|
+
import './chunk-3ONIVO2I.js';
|
|
17
17
|
import './chunk-K2BQQ445.js';
|
|
18
18
|
import './chunk-2C24NSNV.js';
|
|
19
19
|
import './chunk-HJ2LV464.js';
|
|
@@ -23,8 +23,8 @@ import './chunk-H73MEMQB.js';
|
|
|
23
23
|
import './chunk-QK2ERTO3.js';
|
|
24
24
|
import { resolveMemoryRoot, readFactsFromMarkdown } from './chunk-DF77RBF4.js';
|
|
25
25
|
import { FsSessionStore } from './chunk-AB4OPJLD.js';
|
|
26
|
-
import { discoverProviderPlugins, shouldUseFixtureMode, isFixtureApiKey, httpRequest, mapOllamaTransportError, readErrorResponseBody, mapOllamaHttpError } from './chunk-
|
|
27
|
-
export { inferApiMode, normalizeUsage } from './chunk-
|
|
26
|
+
import { discoverProviderPlugins, shouldUseFixtureMode, isFixtureApiKey, httpRequest, mapOllamaTransportError, readErrorResponseBody, mapOllamaHttpError } from './chunk-ZOL3L4EH.js';
|
|
27
|
+
export { inferApiMode, normalizeUsage } from './chunk-ZOL3L4EH.js';
|
|
28
28
|
import './chunk-5AR6O7GW.js';
|
|
29
29
|
import './chunk-2XC6KDJM.js';
|
|
30
30
|
import './chunk-ZJAYFSVI.js';
|
|
@@ -41,7 +41,7 @@ import './chunk-FJWQP6EE.js';
|
|
|
41
41
|
import './chunk-NAF4L3T6.js';
|
|
42
42
|
import './chunk-VZGE7NAI.js';
|
|
43
43
|
import './chunk-6X6ID4MO.js';
|
|
44
|
-
import { stripSkillFrontmatter } from './chunk-
|
|
44
|
+
import { stripSkillFrontmatter } from './chunk-2HXTNVLM.js';
|
|
45
45
|
import './chunk-4QCJAJAG.js';
|
|
46
46
|
import './chunk-SAGRF4IB.js';
|
|
47
47
|
import './chunk-PKRPV3R7.js';
|
|
@@ -63,13 +63,13 @@ import { CLAUDE_DIR_NAME, THEOKIT_DIR_LITERAL } from './chunk-YMVTUV5K.js';
|
|
|
63
63
|
import './chunk-Q7UG242V.js';
|
|
64
64
|
import { estimateTokens, CHARS_PER_TOKEN } from './chunk-SZQFCHU6.js';
|
|
65
65
|
export { estimateTokens } from './chunk-SZQFCHU6.js';
|
|
66
|
-
import './chunk-
|
|
66
|
+
import './chunk-NVQSBRG6.js';
|
|
67
67
|
import { parseModelId } from './chunk-R7WIIPUR.js';
|
|
68
|
-
import './chunk-
|
|
69
|
-
import { registerBuiltins, listProviders, getCatalogCapabilities, getProviderProfile } from './chunk-
|
|
68
|
+
import './chunk-ULEK4OM4.js';
|
|
69
|
+
import { registerBuiltins, listProviders, getCatalogCapabilities, getProviderProfile } from './chunk-CJN5CEI3.js';
|
|
70
70
|
import './chunk-AGACYRJ2.js';
|
|
71
|
-
import './chunk-
|
|
72
|
-
import './chunk-
|
|
71
|
+
import './chunk-3GTN4HOO.js';
|
|
72
|
+
import './chunk-QD6B6W6I.js';
|
|
73
73
|
import './chunk-5IUDICRK.js';
|
|
74
74
|
import './chunk-Q7GYMXVC.js';
|
|
75
75
|
import { BudgetExceededError, ConfigurationError, TheokitAgentError, MemoryAdapterError, AuthenticationError } from './chunk-TNFOU6SB.js';
|
|
@@ -77,8 +77,8 @@ export { AgentDisposedError, AgentRunError, AuthenticationError, BudgetExceededE
|
|
|
77
77
|
import { diag, redactSecrets, addPattern, resolveApiKey } from './chunk-3OY6H3I7.js';
|
|
78
78
|
export { setDiagnosticsSink } from './chunk-3OY6H3I7.js';
|
|
79
79
|
import { createHash, randomUUID } from 'crypto';
|
|
80
|
-
import {
|
|
81
|
-
import { resolve, normalize, sep, isAbsolute, parse, relative,
|
|
80
|
+
import { mkdir, readFile, readdir } from 'fs/promises';
|
|
81
|
+
import { resolve, normalize, sep, isAbsolute, parse, relative, join, dirname } from 'path';
|
|
82
82
|
import { z } from 'zod';
|
|
83
83
|
import { homedir } from 'os';
|
|
84
84
|
|
|
@@ -630,6 +630,14 @@ async function readReferences(skillDir) {
|
|
|
630
630
|
}
|
|
631
631
|
return Object.keys(refs).length > 0 ? refs : void 0;
|
|
632
632
|
}
|
|
633
|
+
function readNamed(skills, name) {
|
|
634
|
+
const skill = skills.find((s) => s.name === name);
|
|
635
|
+
if (skill === void 0) {
|
|
636
|
+
const available = skills.map((s) => s.name).join(", ");
|
|
637
|
+
return `Skill "${name}" not found. Available skills: ${available.length > 0 ? available : "(none)"}.`;
|
|
638
|
+
}
|
|
639
|
+
return renderSkill(skill);
|
|
640
|
+
}
|
|
633
641
|
var SkillReadInputSchema = z.object({
|
|
634
642
|
name: z.string().min(1, "skill_read: `name` is required.")
|
|
635
643
|
});
|
|
@@ -645,7 +653,9 @@ async function renderSkill(skill) {
|
|
|
645
653
|
}
|
|
646
654
|
return parts.join("\n");
|
|
647
655
|
}
|
|
648
|
-
function defineSkillReadTool(
|
|
656
|
+
function defineSkillReadTool(source) {
|
|
657
|
+
if (typeof source === "function") return lazySkillReadTool(source);
|
|
658
|
+
const skills = source;
|
|
649
659
|
const seen = /* @__PURE__ */ new Set();
|
|
650
660
|
for (const skill of skills) {
|
|
651
661
|
if (seen.has(skill.name)) {
|
|
@@ -666,12 +676,18 @@ function defineSkillReadTool(skills) {
|
|
|
666
676
|
// promise: parse and the not-found answer stay exactly as synchronous as they were.
|
|
667
677
|
handler: (input) => {
|
|
668
678
|
const { name } = SkillReadInputSchema.parse(input);
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
679
|
+
return readNamed(skills, name);
|
|
680
|
+
}
|
|
681
|
+
};
|
|
682
|
+
}
|
|
683
|
+
function lazySkillReadTool(source) {
|
|
684
|
+
const fixed = defineSkillReadTool([]);
|
|
685
|
+
return {
|
|
686
|
+
...fixed,
|
|
687
|
+
handler: async (input) => {
|
|
688
|
+
const { name } = SkillReadInputSchema.parse(input);
|
|
689
|
+
const skills = await source();
|
|
690
|
+
return readNamed(skills, name);
|
|
675
691
|
}
|
|
676
692
|
};
|
|
677
693
|
}
|
|
@@ -1929,7 +1945,7 @@ function isBuiltAgent(m) {
|
|
|
1929
1945
|
return typeof m.send === "function";
|
|
1930
1946
|
}
|
|
1931
1947
|
async function materialize(def, index) {
|
|
1932
|
-
const { Agent: Agent2 } = await import('./agent-
|
|
1948
|
+
const { Agent: Agent2 } = await import('./agent-T34LCGQM.js');
|
|
1933
1949
|
return Agent2.create({
|
|
1934
1950
|
// `AgentDefinition.model` admits the sentinel `'inherit'`, which is not a model id. Inheriting
|
|
1935
1951
|
// here means "declare nothing and let the default apply" — forwarding the literal would create
|