@theokit/sdk 2.23.0 → 2.25.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 +56 -0
- package/dist/a2a/index.cjs +259 -192
- package/dist/a2a/index.cjs.map +1 -1
- package/dist/a2a/index.js +259 -192
- package/dist/a2a/index.js.map +1 -1
- package/dist/create-skill.d.ts +8 -0
- package/dist/{cron-7CruUd_0.d.ts → cron-B44D-678.d.ts} +67 -4
- package/dist/{cron-Bpt_1khA.d.cts → cron-qI-dbG7c.d.cts} +67 -4
- package/dist/cron.cjs +246 -181
- package/dist/cron.cjs.map +1 -1
- package/dist/cron.d.cts +2 -2
- package/dist/cron.d.ts +2 -2
- package/dist/cron.js +246 -181
- package/dist/cron.js.map +1 -1
- package/dist/define-tool.d.ts +33 -20
- package/dist/{errors-CkCaIqVP.d.cts → errors-DIKBXffg.d.cts} +1 -1
- package/dist/{errors-BuwwkrAk.d.ts → errors-DRS-kqOK.d.ts} +1 -1
- package/dist/errors.d.cts +2 -2
- package/dist/eval.cjs +246 -181
- package/dist/eval.cjs.map +1 -1
- package/dist/eval.js +246 -181
- package/dist/eval.js.map +1 -1
- package/dist/index.cjs +299 -186
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +75 -27
- package/dist/index.d.ts +75 -27
- package/dist/index.js +299 -187
- package/dist/index.js.map +1 -1
- package/dist/internal/runtime/local-agent/local-agent-bootstrap.d.ts +2 -4
- package/dist/internal/runtime/skills/skill-frontmatter.d.ts +6 -0
- package/dist/{run-CrIulPF7.d.cts → run-Cr0C6cOM.d.cts} +17 -0
- package/dist/{run-CrIulPF7.d.ts → run-Cr0C6cOM.d.ts} +17 -0
- package/dist/skills.cjs.map +1 -1
- package/dist/skills.js.map +1 -1
- package/dist/types/agent.d.ts +57 -2
- package/dist/types/run.d.ts +17 -0
- package/dist/workflow.cjs +37 -0
- package/dist/workflow.cjs.map +1 -1
- package/dist/workflow.d.cts +47 -1
- package/dist/workflow.d.ts +47 -1
- package/dist/workflow.js +37 -2
- package/dist/workflow.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { T as TheokitAgentError, B as BudgetOptions, a as BudgetHandle, b as BudgetSnapshot, E as ErrorMetadata } from './errors-
|
|
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-
|
|
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 ProviderProfile, m as Plugin, n as ConversationStorageAdapter, o as StoredMessage, p as SessionMeta, q as SessionMetaPatch, B as BudgetTracker, r as MemoryProvider, s as MemoryId, t as PreToolCallDecision, u as SDKProvider } from './cron-
|
|
4
|
-
export { v as ActiveMemoryPassArgs, w as ActiveMemoryPassResult, x as AgentMemory, y as BudgetCheck, z as BudgetTotal, D as BudgetUsageEvent, E as CloudEnv, F as CloudRepo, H as ContextBudget,
|
|
5
|
-
import { R as RunResult, M as ModelSelection, C as CustomTool, a as McpServerConfig, b as Run,
|
|
6
|
-
export { A as AgentConversationTurn, d as AssistantMessage, e as ConversationStep, f as ConversationTurn, g as CostBreakdown, h as CostSource, i as CostStatus, D as DoomLoopThresholds, G as GenerateOptions, j as GenerateRunResult, I as ImageBlock, k as InteractionUpdate, l as McpAuthConfig, m as McpHttpServerConfig, n as McpOAuthConfig, o as McpStdioServerConfig, p as ModelParameterValue, P as PartialToolCallUpdate, q as RunCompactBoundaryEvent, r as RunErrorDetail, s as RunEvent, t as RunEventSink, u as RunGitInfo, v as RunOperation, w as RunPermissionDeniedEvent, x as RunRateLimitEvent, y as RunStatus, z as RunTaskCompletedEvent, B as RunTaskStartedEvent, E as RunTaskUpdatedEvent, F as RunToCompletionOptions, H as RunToCompletionResult, J as RunToolProgressEvent, K as SDKAssistantMessage, L as SDKImage, N as SDKImageDimension, O as SDKObjectDelta, Q as SDKRequestMessage, U as SDKStatusMessage, V as SDKSystemMessage, W as SDKTaskMessage, X as SDKThinkingMessage, Y as SDKToolUseMessage, Z as SDKUserMessage, _ as SDKUserMessageEvent, $ as SendOptions, a0 as ShellCommand, a1 as ShellConversationTurn, a2 as ShellOutput, a3 as ShellOutputDeltaUpdate, a4 as StepCompletedUpdate, a5 as StepStartedUpdate, a6 as StreamToCompletionResult, a7 as SummaryCompletedUpdate, a8 as SummaryStartedUpdate, a9 as SummaryUpdate, aa as TextBlock, ab as TextDeltaUpdate, ac as ThinkingCompletedUpdate, ad as ThinkingDeltaUpdate, ae as ThinkingMessage, af as TokenDeltaUpdate, ag as TokenUsage, ah as ToolCall, ai as ToolCallCompletedUpdate, aj as ToolCallStartedUpdate, ak as ToolContextMessage, al as ToolResult, am as ToolResultGuardOptions, an as ToolUseBlock, ao as TurnEndedUpdate, ap as UserMessage, aq as UserMessageAppendedUpdate, ar as emitRunEvent } from './run-
|
|
1
|
+
import { T as TheokitAgentError, B as BudgetOptions, a as BudgetHandle, b as BudgetSnapshot, E as ErrorMetadata } from './errors-DIKBXffg.cjs';
|
|
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-DIKBXffg.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 ProviderProfile, m as Plugin, I as InlineSkill, n as ConversationStorageAdapter, o as StoredMessage, p as SessionMeta, q as SessionMetaPatch, B as BudgetTracker, r as MemoryProvider, s as MemoryId, t as PreToolCallDecision, u as SDKProvider } from './cron-qI-dbG7c.cjs';
|
|
4
|
+
export { v as ActiveMemoryPassArgs, w as ActiveMemoryPassResult, x as AgentMemory, y as BudgetCheck, z as BudgetTotal, D as BudgetUsageEvent, E as CloudEnv, F as CloudRepo, H as ContextBudget, J as ContextManagerKind, K as ContextSnapshot, N as ContextSource, O as ContextSourceStatus, Q as CreateSkillSpec, R as Cron, T as CronCreateOptions, U as CronGetOptions, V as CronJob, W as CronJobStatus, X as CronListOptions, Y as CronOperationOptions, Z as CronRunOptions, _ as CronRuntime, $ as CronSchedulerStatus, a0 as CronStartOptions, a1 as GoalEvent, a2 as GoalOptions, a3 as GoalResult, a4 as HookName, a5 as InvalidateCacheOptions, a6 as MemoryAdapter, a7 as MemoryAdapterCapabilities, a8 as MemoryContext, a9 as MemoryFact, aa as MemoryProviderHandle, ab as MemoryProviderInitOptions, ac as MemoryRevision, ad as MemoryToolSchema, ae as MemoryTurnMessage, af as PersonalityPreset, ag as PluginContext, ah as PostAssistantReplyContext, ai as PreToolCallContext, aj as PreUserSendContext, ak as PreUserSendResult, al as ProviderCapability, am as ProviderRoute, an as RecordSessionSummaryArgs, ao as ResolvedProviderRoute, ap as RunUntilIterator, aq as SDKAgentPlugins, ar as SDKAgentSkillDetail, as as SDKAgentSkills, at as SDKArtifact, au as SDKContextManager, av as SDKPluginMetadata, aw as SDKProvidersManager, ax as SettingSource, ay as SkillsResolver, az as SkillsResolverContext, aA as SystemPromptContext, aB as SystemPromptMemoryFact, aC as SystemPromptSkillRef, aD as TelemetrySettings, aE as createSkill, aF as definePlugin } from './cron-qI-dbG7c.cjs';
|
|
5
|
+
import { R as RunResult, M as ModelSelection, C as CustomTool, a as McpServerConfig, b as Run, T as ToolResultContentBlock, S as SDKMessage, c as MessageOrigin } from './run-Cr0C6cOM.cjs';
|
|
6
|
+
export { A as AgentConversationTurn, d as AssistantMessage, e as ConversationStep, f as ConversationTurn, g as CostBreakdown, h as CostSource, i as CostStatus, D as DoomLoopThresholds, G as GenerateOptions, j as GenerateRunResult, I as ImageBlock, k as InteractionUpdate, l as McpAuthConfig, m as McpHttpServerConfig, n as McpOAuthConfig, o as McpStdioServerConfig, p as ModelParameterValue, P as PartialToolCallUpdate, q as RunCompactBoundaryEvent, r as RunErrorDetail, s as RunEvent, t as RunEventSink, u as RunGitInfo, v as RunOperation, w as RunPermissionDeniedEvent, x as RunRateLimitEvent, y as RunStatus, z as RunTaskCompletedEvent, B as RunTaskStartedEvent, E as RunTaskUpdatedEvent, F as RunToCompletionOptions, H as RunToCompletionResult, J as RunToolProgressEvent, K as SDKAssistantMessage, L as SDKImage, N as SDKImageDimension, O as SDKObjectDelta, Q as SDKRequestMessage, U as SDKStatusMessage, V as SDKSystemMessage, W as SDKTaskMessage, X as SDKThinkingMessage, Y as SDKToolUseMessage, Z as SDKUserMessage, _ as SDKUserMessageEvent, $ as SendOptions, a0 as ShellCommand, a1 as ShellConversationTurn, a2 as ShellOutput, a3 as ShellOutputDeltaUpdate, a4 as StepCompletedUpdate, a5 as StepStartedUpdate, a6 as StreamToCompletionResult, a7 as SummaryCompletedUpdate, a8 as SummaryStartedUpdate, a9 as SummaryUpdate, aa as TextBlock, ab as TextDeltaUpdate, ac as ThinkingCompletedUpdate, ad as ThinkingDeltaUpdate, ae as ThinkingMessage, af as TokenDeltaUpdate, ag as TokenUsage, ah as ToolCall, ai as ToolCallCompletedUpdate, aj as ToolCallStartedUpdate, ak as ToolContextMessage, al as ToolResult, am as ToolResultGuardOptions, an as ToolUseBlock, ao as TurnEndedUpdate, ap as UserMessage, aq as UserMessageAppendedUpdate, ar as emitRunEvent } from './run-Cr0C6cOM.cjs';
|
|
7
7
|
import * as zod from 'zod';
|
|
8
8
|
import { ZodType, z } from 'zod';
|
|
9
9
|
|
|
@@ -884,6 +884,43 @@ interface DefineProviderOptions {
|
|
|
884
884
|
*/
|
|
885
885
|
declare function defineProvider(profile: ProviderProfile, opts?: DefineProviderOptions): Plugin;
|
|
886
886
|
|
|
887
|
+
/**
|
|
888
|
+
* SE23 — `defineSkillReadTool`: an OPT-IN factory that gives the MODEL on-demand
|
|
889
|
+
* access to a skill's full body + references via a `skill_read` tool.
|
|
890
|
+
*
|
|
891
|
+
* TheoKit discloses skills eagerly through the `<skills>` system-prompt block
|
|
892
|
+
* (name + description only). This factory is the LAZY read path: the consumer
|
|
893
|
+
* explicitly adds the returned {@link CustomTool} to `tools`, and when the model
|
|
894
|
+
* calls it with a skill name, it gets that skill's `instructions` (+ SE21
|
|
895
|
+
* `references`). The SDK NEVER auto-injects it — bring-your-own-tools stays
|
|
896
|
+
* intact (sibling of `defineSubAgent` / `workflowAsTool`). See ADR 0007.
|
|
897
|
+
*
|
|
898
|
+
* import { Agent, createSkill, defineSkillReadTool } from "@theokit/sdk";
|
|
899
|
+
*
|
|
900
|
+
* const skills = [createSkill({ name: "release", description: "…", instructions: "…" })];
|
|
901
|
+
* const agent = await Agent.create({
|
|
902
|
+
* model: { id: "openai/gpt-4o-mini" },
|
|
903
|
+
* skills: { inline: skills },
|
|
904
|
+
* tools: [defineSkillReadTool(skills)],
|
|
905
|
+
* });
|
|
906
|
+
*
|
|
907
|
+
* @public
|
|
908
|
+
*/
|
|
909
|
+
|
|
910
|
+
/**
|
|
911
|
+
* SE23 — build an OPT-IN `skill_read` {@link CustomTool} over the given inline
|
|
912
|
+
* skills. When the model calls it with `{ name }`, the handler returns that
|
|
913
|
+
* skill's body + references. An UNKNOWN (but well-formed) name returns a typed
|
|
914
|
+
* "not found" string the model can act on — NOT a throw that kills the run.
|
|
915
|
+
* Malformed input (missing `name`) fails at the trust boundary via the schema.
|
|
916
|
+
*
|
|
917
|
+
* The consumer controls exposure by choosing which skills to pass; the SDK
|
|
918
|
+
* never auto-injects this tool.
|
|
919
|
+
*
|
|
920
|
+
* @public
|
|
921
|
+
*/
|
|
922
|
+
declare function defineSkillReadTool(skills: ReadonlyArray<InlineSkill>): CustomTool;
|
|
923
|
+
|
|
887
924
|
/**
|
|
888
925
|
* Options for {@link sanitizeToolInput}. Trim is the only default-on rung — coercion and JSON
|
|
889
926
|
* repair change a value's representation, so they are opt-in (the SDK's "values are strings; Zod
|
|
@@ -918,7 +955,14 @@ interface SanitizeOptions {
|
|
|
918
955
|
*
|
|
919
956
|
* @public
|
|
920
957
|
*/
|
|
921
|
-
|
|
958
|
+
/**
|
|
959
|
+
* SE16 — the handler's return type. With no `outputSchema` the tool returns a
|
|
960
|
+
* plain `string` (pre-SE16 shape). With an `outputSchema` the handler returns the
|
|
961
|
+
* STRUCTURED output inferred from it (validated + serialized to the tool result).
|
|
962
|
+
* The `[O]` tuple wrap prevents distribution so `never` maps cleanly to `string`.
|
|
963
|
+
*/
|
|
964
|
+
type ToolHandlerReturn<O extends ZodType> = [O] extends [never] ? string : z.infer<O>;
|
|
965
|
+
interface DefineToolSpec<T extends ZodType, O extends ZodType = never> {
|
|
922
966
|
/** Tool name surfaced to the LLM. Same constraints as {@link CustomTool.name}. */
|
|
923
967
|
name: string;
|
|
924
968
|
/** Description surfaced to the LLM. */
|
|
@@ -926,7 +970,16 @@ interface DefineToolSpec<T extends ZodType> {
|
|
|
926
970
|
/** Zod schema describing the input. Must be `z.object(...)` at the root for the LLM tool contract. */
|
|
927
971
|
inputSchema: T;
|
|
928
972
|
/**
|
|
929
|
-
*
|
|
973
|
+
* SE16 — optional Zod schema describing the OUTPUT. When set, the handler
|
|
974
|
+
* returns the structured value inferred from it; the value is validated against
|
|
975
|
+
* this schema and serialized to the tool result (a string stays as-is, an object
|
|
976
|
+
* is JSON-stringified). A validation failure raises `ZodError`, converted to a
|
|
977
|
+
* `tool_result(isError)`. Absent ⇒ the handler returns a plain string (unchanged).
|
|
978
|
+
*/
|
|
979
|
+
outputSchema?: O;
|
|
980
|
+
/**
|
|
981
|
+
* Handler invoked with the parsed input. Type is inferred via `z.infer<T>`; the
|
|
982
|
+
* return type is `z.infer<O>` when `outputSchema` is set, else `string`.
|
|
930
983
|
* #65 — an optional 2nd `ToolContext` argument carries the run's `AbortSignal`,
|
|
931
984
|
* so a cooperative handler can stop early when the run is cancelled. Existing
|
|
932
985
|
* single-argument handlers are unaffected.
|
|
@@ -934,7 +987,18 @@ interface DefineToolSpec<T extends ZodType> {
|
|
|
934
987
|
handler: (input: z.infer<T>, ctx?: {
|
|
935
988
|
signal?: AbortSignal;
|
|
936
989
|
context?: unknown;
|
|
937
|
-
}) =>
|
|
990
|
+
}) => ToolHandlerReturn<O> | Promise<ToolHandlerReturn<O>>;
|
|
991
|
+
/**
|
|
992
|
+
* SE17 — map the handler's (validated) output to the compact / multimodal
|
|
993
|
+
* representation the MODEL sees in the tool_result. The handler keeps returning
|
|
994
|
+
* the FULL result (validated by `outputSchema`); `toModelOutput` shapes only what
|
|
995
|
+
* reaches the model, so app-facing detail is not forced into model context.
|
|
996
|
+
* Returns a string OR SE7 `ToolResultContentBlock[]` (text + image). Absent ⇒
|
|
997
|
+
* the tool_result is the serialized handler output (SE16 / pre-SE17 behavior).
|
|
998
|
+
* Note: observability (`onToolEnd`) sees the model-facing result this returns,
|
|
999
|
+
* not the raw handler output — the full result lives in the handler's own scope.
|
|
1000
|
+
*/
|
|
1001
|
+
toModelOutput?: (output: ToolHandlerReturn<O>) => string | ToolResultContentBlock[];
|
|
938
1002
|
/**
|
|
939
1003
|
* Sanitize the raw model-emitted args BEFORE schema validation (`@theokit/sdk/sanitize`).
|
|
940
1004
|
* `true` trims whitespace; an object opts into coercion / JSON-repair. Coercion is schema-aware
|
|
@@ -943,23 +1007,7 @@ interface DefineToolSpec<T extends ZodType> {
|
|
|
943
1007
|
*/
|
|
944
1008
|
sanitize?: boolean | SanitizeOptions;
|
|
945
1009
|
}
|
|
946
|
-
|
|
947
|
-
* Type-safe builder for {@link CustomTool}. Converts a Zod schema to JSON
|
|
948
|
-
* Schema (for the LLM-facing `inputSchema` field), wraps the handler with a
|
|
949
|
-
* runtime `schema.parse` step, and preserves type inference.
|
|
950
|
-
*
|
|
951
|
-
* Behaviour (ADR D24):
|
|
952
|
-
* - JSON Schema conversion uses Zod 4's native `z.toJSONSchema` with
|
|
953
|
-
* `unrepresentable: "any"` so transforms/refinements round-trip.
|
|
954
|
-
* - Runtime parse failures throw `ZodError`; the SDK's tool-dispatch converts
|
|
955
|
-
* them to `tool_result(isError)` with the Zod message.
|
|
956
|
-
* - Handler signature is `(input: z.infer<T>)`, not `Record<string, unknown>`.
|
|
957
|
-
* - `zod` loads lazily via `createRequire` — consumers who don't call
|
|
958
|
-
* `defineTool` don't need `zod` installed.
|
|
959
|
-
*
|
|
960
|
-
* @public
|
|
961
|
-
*/
|
|
962
|
-
declare function defineTool<T extends ZodType>(spec: DefineToolSpec<T>): CustomTool;
|
|
1010
|
+
declare function defineTool<T extends ZodType, O extends ZodType = never>(spec: DefineToolSpec<T, O>): CustomTool;
|
|
963
1011
|
|
|
964
1012
|
/**
|
|
965
1013
|
* `EventBus` — typed EventEmitter wrapper.
|
|
@@ -2472,4 +2520,4 @@ declare function toShareGptTrajectory(result: BatchResult, options?: {
|
|
|
2472
2520
|
model?: string;
|
|
2473
2521
|
}): ShareGptTrajectory | null;
|
|
2474
2522
|
|
|
2475
|
-
export { Agent, AgentBuilder, AgentDefinition, type AgentFactory, AgentOperationOptions, AgentOptions, type AgentPromptResult, type AgentRegistryOptions, type BatchItem, type BatchOptions, type BatchProgress, type BatchResult, Budget, BudgetHandle, BudgetOptions, BudgetSnapshot, BudgetTracker, CloudOptions, ContextSettings, ConversationStorageAdapter, type CounterBudgetTrackerOptions, CustomTool, type DeepPartial, type DefineProviderOptions, type DefineToolSpec, type DreamingSweepOptions, type DreamingSweepResult, ErrorMetadata, EventBus, type EvictReason, FileSystemConversationStorage, GenerateObjectError, type GenerateObjectOptions, type GenerateObjectResult, GetAgentOptions, GetRunOptions, InMemoryConversationStorage, JobQueue, type JobQueueOptions, ListAgentsOptions, ListResult, ListRunsOptions, LiveAgentRegistry, LocalOptions, McpServerConfig, Memory, MemoryId, MemoryProvider, MemorySettings, MessageOrigin, type MigrateOptions, type MigrateResult, type ModelListItem, type ModelParameterDefinition, ModelSelection, type ModelVariant, type NormalizedJsonSchema, type PermissionAction, PermissionEngine, type PermissionEngineOptions, type PermissionGate, type PermissionGateContext, type PermissionGateDecision, type PermissionMode, type PermissionPluginOptions, type PermissionRule, Plugin, PluginsSettings, PreToolCallDecision, ProviderProfile, ProviderRoutingSettings, type ReplayHistoryOptions, Run, RunResult, SDKAgent, SDKAgentInfo, SDKMessage, type SDKModel, SDKProvider, type SDKRepository, type SDKUser, Security, type SessionCapabilityResult, type SessionListOptions, type SessionManager, SessionMeta, SessionMetaPatch, type SessionScope, type SessionSummary, type ShareGptMessage, type ShareGptTrajectory, SkillsSettings, type Squad, type SquadOptions, type SquadRun, StoredMessage, StreamObjectError, type StreamObjectEvent, type StreamObjectOptions, SystemPromptResolver, TASK_RESERVED_PREFIXES, Task, type TaskCancelResult, type TaskConfigureOptions, type TaskEvent, type TaskFilter, type TaskHandle, type TaskKind, type TaskState, type TaskStoreOptions, type TaskSubmitOptions, type TaskWorkContext, type TaskWorkFn, Theokit, TheokitAgentError, type TheokitRequestOptions, ToolError, ToolResultContentBlock, UsageAccumulator, applyMode, buildReplayHistory, chargeAndCheckThresholds, computeCost, createAgentFactory, createCounterBudgetTracker, createNoopMemoryProvider, createPermissionPlugin, createSessionManager, createSquad, defineProvider, defineTool, extractRawId, getPricingEntry, inferApiMode, isValidTaskId, migrateSqliteToLance, mkMemoryId, normalizeSchema, normalizeUsage, preflightCheck, scopedConversationId, sessionScopePrefix, toShareGptTrajectory, withCwdMutex };
|
|
2523
|
+
export { Agent, AgentBuilder, AgentDefinition, type AgentFactory, AgentOperationOptions, AgentOptions, type AgentPromptResult, type AgentRegistryOptions, type BatchItem, type BatchOptions, type BatchProgress, type BatchResult, Budget, BudgetHandle, BudgetOptions, BudgetSnapshot, BudgetTracker, CloudOptions, ContextSettings, ConversationStorageAdapter, type CounterBudgetTrackerOptions, CustomTool, type DeepPartial, type DefineProviderOptions, type DefineToolSpec, type DreamingSweepOptions, type DreamingSweepResult, ErrorMetadata, EventBus, type EvictReason, FileSystemConversationStorage, GenerateObjectError, type GenerateObjectOptions, type GenerateObjectResult, GetAgentOptions, GetRunOptions, InMemoryConversationStorage, InlineSkill, JobQueue, type JobQueueOptions, ListAgentsOptions, ListResult, ListRunsOptions, LiveAgentRegistry, LocalOptions, McpServerConfig, Memory, MemoryId, MemoryProvider, MemorySettings, MessageOrigin, type MigrateOptions, type MigrateResult, type ModelListItem, type ModelParameterDefinition, ModelSelection, type ModelVariant, type NormalizedJsonSchema, type PermissionAction, PermissionEngine, type PermissionEngineOptions, type PermissionGate, type PermissionGateContext, type PermissionGateDecision, type PermissionMode, type PermissionPluginOptions, type PermissionRule, Plugin, PluginsSettings, PreToolCallDecision, ProviderProfile, ProviderRoutingSettings, type ReplayHistoryOptions, Run, RunResult, SDKAgent, SDKAgentInfo, SDKMessage, type SDKModel, SDKProvider, type SDKRepository, type SDKUser, Security, type SessionCapabilityResult, type SessionListOptions, type SessionManager, SessionMeta, SessionMetaPatch, type SessionScope, type SessionSummary, type ShareGptMessage, type ShareGptTrajectory, SkillsSettings, type Squad, type SquadOptions, type SquadRun, StoredMessage, StreamObjectError, type StreamObjectEvent, type StreamObjectOptions, SystemPromptResolver, TASK_RESERVED_PREFIXES, Task, type TaskCancelResult, type TaskConfigureOptions, type TaskEvent, type TaskFilter, type TaskHandle, type TaskKind, type TaskState, type TaskStoreOptions, type TaskSubmitOptions, type TaskWorkContext, type TaskWorkFn, Theokit, TheokitAgentError, type TheokitRequestOptions, ToolError, ToolResultContentBlock, UsageAccumulator, applyMode, buildReplayHistory, chargeAndCheckThresholds, computeCost, createAgentFactory, createCounterBudgetTracker, createNoopMemoryProvider, createPermissionPlugin, createSessionManager, createSquad, defineProvider, defineSkillReadTool, defineTool, extractRawId, getPricingEntry, inferApiMode, isValidTaskId, migrateSqliteToLance, mkMemoryId, normalizeSchema, normalizeUsage, preflightCheck, scopedConversationId, sessionScopePrefix, toShareGptTrajectory, withCwdMutex };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { T as TheokitAgentError, B as BudgetOptions, a as BudgetHandle, b as BudgetSnapshot, E as ErrorMetadata } from './errors-
|
|
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-
|
|
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 ProviderProfile, m as Plugin, n as ConversationStorageAdapter, o as StoredMessage, p as SessionMeta, q as SessionMetaPatch, B as BudgetTracker, r as MemoryProvider, s as MemoryId, t as PreToolCallDecision, u as SDKProvider } from './cron-
|
|
4
|
-
export { v as ActiveMemoryPassArgs, w as ActiveMemoryPassResult, x as AgentMemory, y as BudgetCheck, z as BudgetTotal, D as BudgetUsageEvent, E as CloudEnv, F as CloudRepo, H as ContextBudget,
|
|
5
|
-
import { R as RunResult, M as ModelSelection, C as CustomTool, a as McpServerConfig, b as Run,
|
|
6
|
-
export { A as AgentConversationTurn, d as AssistantMessage, e as ConversationStep, f as ConversationTurn, g as CostBreakdown, h as CostSource, i as CostStatus, D as DoomLoopThresholds, G as GenerateOptions, j as GenerateRunResult, I as ImageBlock, k as InteractionUpdate, l as McpAuthConfig, m as McpHttpServerConfig, n as McpOAuthConfig, o as McpStdioServerConfig, p as ModelParameterValue, P as PartialToolCallUpdate, q as RunCompactBoundaryEvent, r as RunErrorDetail, s as RunEvent, t as RunEventSink, u as RunGitInfo, v as RunOperation, w as RunPermissionDeniedEvent, x as RunRateLimitEvent, y as RunStatus, z as RunTaskCompletedEvent, B as RunTaskStartedEvent, E as RunTaskUpdatedEvent, F as RunToCompletionOptions, H as RunToCompletionResult, J as RunToolProgressEvent, K as SDKAssistantMessage, L as SDKImage, N as SDKImageDimension, O as SDKObjectDelta, Q as SDKRequestMessage, U as SDKStatusMessage, V as SDKSystemMessage, W as SDKTaskMessage, X as SDKThinkingMessage, Y as SDKToolUseMessage, Z as SDKUserMessage, _ as SDKUserMessageEvent, $ as SendOptions, a0 as ShellCommand, a1 as ShellConversationTurn, a2 as ShellOutput, a3 as ShellOutputDeltaUpdate, a4 as StepCompletedUpdate, a5 as StepStartedUpdate, a6 as StreamToCompletionResult, a7 as SummaryCompletedUpdate, a8 as SummaryStartedUpdate, a9 as SummaryUpdate, aa as TextBlock, ab as TextDeltaUpdate, ac as ThinkingCompletedUpdate, ad as ThinkingDeltaUpdate, ae as ThinkingMessage, af as TokenDeltaUpdate, ag as TokenUsage, ah as ToolCall, ai as ToolCallCompletedUpdate, aj as ToolCallStartedUpdate, ak as ToolContextMessage, al as ToolResult, am as ToolResultGuardOptions, an as ToolUseBlock, ao as TurnEndedUpdate, ap as UserMessage, aq as UserMessageAppendedUpdate, ar as emitRunEvent } from './run-
|
|
1
|
+
import { T as TheokitAgentError, B as BudgetOptions, a as BudgetHandle, b as BudgetSnapshot, E as ErrorMetadata } from './errors-DRS-kqOK.js';
|
|
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-DRS-kqOK.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 ProviderProfile, m as Plugin, I as InlineSkill, n as ConversationStorageAdapter, o as StoredMessage, p as SessionMeta, q as SessionMetaPatch, B as BudgetTracker, r as MemoryProvider, s as MemoryId, t as PreToolCallDecision, u as SDKProvider } from './cron-B44D-678.js';
|
|
4
|
+
export { v as ActiveMemoryPassArgs, w as ActiveMemoryPassResult, x as AgentMemory, y as BudgetCheck, z as BudgetTotal, D as BudgetUsageEvent, E as CloudEnv, F as CloudRepo, H as ContextBudget, J as ContextManagerKind, K as ContextSnapshot, N as ContextSource, O as ContextSourceStatus, Q as CreateSkillSpec, R as Cron, T as CronCreateOptions, U as CronGetOptions, V as CronJob, W as CronJobStatus, X as CronListOptions, Y as CronOperationOptions, Z as CronRunOptions, _ as CronRuntime, $ as CronSchedulerStatus, a0 as CronStartOptions, a1 as GoalEvent, a2 as GoalOptions, a3 as GoalResult, a4 as HookName, a5 as InvalidateCacheOptions, a6 as MemoryAdapter, a7 as MemoryAdapterCapabilities, a8 as MemoryContext, a9 as MemoryFact, aa as MemoryProviderHandle, ab as MemoryProviderInitOptions, ac as MemoryRevision, ad as MemoryToolSchema, ae as MemoryTurnMessage, af as PersonalityPreset, ag as PluginContext, ah as PostAssistantReplyContext, ai as PreToolCallContext, aj as PreUserSendContext, ak as PreUserSendResult, al as ProviderCapability, am as ProviderRoute, an as RecordSessionSummaryArgs, ao as ResolvedProviderRoute, ap as RunUntilIterator, aq as SDKAgentPlugins, ar as SDKAgentSkillDetail, as as SDKAgentSkills, at as SDKArtifact, au as SDKContextManager, av as SDKPluginMetadata, aw as SDKProvidersManager, ax as SettingSource, ay as SkillsResolver, az as SkillsResolverContext, aA as SystemPromptContext, aB as SystemPromptMemoryFact, aC as SystemPromptSkillRef, aD as TelemetrySettings, aE as createSkill, aF as definePlugin } from './cron-B44D-678.js';
|
|
5
|
+
import { R as RunResult, M as ModelSelection, C as CustomTool, a as McpServerConfig, b as Run, T as ToolResultContentBlock, S as SDKMessage, c as MessageOrigin } from './run-Cr0C6cOM.js';
|
|
6
|
+
export { A as AgentConversationTurn, d as AssistantMessage, e as ConversationStep, f as ConversationTurn, g as CostBreakdown, h as CostSource, i as CostStatus, D as DoomLoopThresholds, G as GenerateOptions, j as GenerateRunResult, I as ImageBlock, k as InteractionUpdate, l as McpAuthConfig, m as McpHttpServerConfig, n as McpOAuthConfig, o as McpStdioServerConfig, p as ModelParameterValue, P as PartialToolCallUpdate, q as RunCompactBoundaryEvent, r as RunErrorDetail, s as RunEvent, t as RunEventSink, u as RunGitInfo, v as RunOperation, w as RunPermissionDeniedEvent, x as RunRateLimitEvent, y as RunStatus, z as RunTaskCompletedEvent, B as RunTaskStartedEvent, E as RunTaskUpdatedEvent, F as RunToCompletionOptions, H as RunToCompletionResult, J as RunToolProgressEvent, K as SDKAssistantMessage, L as SDKImage, N as SDKImageDimension, O as SDKObjectDelta, Q as SDKRequestMessage, U as SDKStatusMessage, V as SDKSystemMessage, W as SDKTaskMessage, X as SDKThinkingMessage, Y as SDKToolUseMessage, Z as SDKUserMessage, _ as SDKUserMessageEvent, $ as SendOptions, a0 as ShellCommand, a1 as ShellConversationTurn, a2 as ShellOutput, a3 as ShellOutputDeltaUpdate, a4 as StepCompletedUpdate, a5 as StepStartedUpdate, a6 as StreamToCompletionResult, a7 as SummaryCompletedUpdate, a8 as SummaryStartedUpdate, a9 as SummaryUpdate, aa as TextBlock, ab as TextDeltaUpdate, ac as ThinkingCompletedUpdate, ad as ThinkingDeltaUpdate, ae as ThinkingMessage, af as TokenDeltaUpdate, ag as TokenUsage, ah as ToolCall, ai as ToolCallCompletedUpdate, aj as ToolCallStartedUpdate, ak as ToolContextMessage, al as ToolResult, am as ToolResultGuardOptions, an as ToolUseBlock, ao as TurnEndedUpdate, ap as UserMessage, aq as UserMessageAppendedUpdate, ar as emitRunEvent } from './run-Cr0C6cOM.js';
|
|
7
7
|
import * as zod from 'zod';
|
|
8
8
|
import { ZodType, z } from 'zod';
|
|
9
9
|
|
|
@@ -884,6 +884,43 @@ interface DefineProviderOptions {
|
|
|
884
884
|
*/
|
|
885
885
|
declare function defineProvider(profile: ProviderProfile, opts?: DefineProviderOptions): Plugin;
|
|
886
886
|
|
|
887
|
+
/**
|
|
888
|
+
* SE23 — `defineSkillReadTool`: an OPT-IN factory that gives the MODEL on-demand
|
|
889
|
+
* access to a skill's full body + references via a `skill_read` tool.
|
|
890
|
+
*
|
|
891
|
+
* TheoKit discloses skills eagerly through the `<skills>` system-prompt block
|
|
892
|
+
* (name + description only). This factory is the LAZY read path: the consumer
|
|
893
|
+
* explicitly adds the returned {@link CustomTool} to `tools`, and when the model
|
|
894
|
+
* calls it with a skill name, it gets that skill's `instructions` (+ SE21
|
|
895
|
+
* `references`). The SDK NEVER auto-injects it — bring-your-own-tools stays
|
|
896
|
+
* intact (sibling of `defineSubAgent` / `workflowAsTool`). See ADR 0007.
|
|
897
|
+
*
|
|
898
|
+
* import { Agent, createSkill, defineSkillReadTool } from "@theokit/sdk";
|
|
899
|
+
*
|
|
900
|
+
* const skills = [createSkill({ name: "release", description: "…", instructions: "…" })];
|
|
901
|
+
* const agent = await Agent.create({
|
|
902
|
+
* model: { id: "openai/gpt-4o-mini" },
|
|
903
|
+
* skills: { inline: skills },
|
|
904
|
+
* tools: [defineSkillReadTool(skills)],
|
|
905
|
+
* });
|
|
906
|
+
*
|
|
907
|
+
* @public
|
|
908
|
+
*/
|
|
909
|
+
|
|
910
|
+
/**
|
|
911
|
+
* SE23 — build an OPT-IN `skill_read` {@link CustomTool} over the given inline
|
|
912
|
+
* skills. When the model calls it with `{ name }`, the handler returns that
|
|
913
|
+
* skill's body + references. An UNKNOWN (but well-formed) name returns a typed
|
|
914
|
+
* "not found" string the model can act on — NOT a throw that kills the run.
|
|
915
|
+
* Malformed input (missing `name`) fails at the trust boundary via the schema.
|
|
916
|
+
*
|
|
917
|
+
* The consumer controls exposure by choosing which skills to pass; the SDK
|
|
918
|
+
* never auto-injects this tool.
|
|
919
|
+
*
|
|
920
|
+
* @public
|
|
921
|
+
*/
|
|
922
|
+
declare function defineSkillReadTool(skills: ReadonlyArray<InlineSkill>): CustomTool;
|
|
923
|
+
|
|
887
924
|
/**
|
|
888
925
|
* Options for {@link sanitizeToolInput}. Trim is the only default-on rung — coercion and JSON
|
|
889
926
|
* repair change a value's representation, so they are opt-in (the SDK's "values are strings; Zod
|
|
@@ -918,7 +955,14 @@ interface SanitizeOptions {
|
|
|
918
955
|
*
|
|
919
956
|
* @public
|
|
920
957
|
*/
|
|
921
|
-
|
|
958
|
+
/**
|
|
959
|
+
* SE16 — the handler's return type. With no `outputSchema` the tool returns a
|
|
960
|
+
* plain `string` (pre-SE16 shape). With an `outputSchema` the handler returns the
|
|
961
|
+
* STRUCTURED output inferred from it (validated + serialized to the tool result).
|
|
962
|
+
* The `[O]` tuple wrap prevents distribution so `never` maps cleanly to `string`.
|
|
963
|
+
*/
|
|
964
|
+
type ToolHandlerReturn<O extends ZodType> = [O] extends [never] ? string : z.infer<O>;
|
|
965
|
+
interface DefineToolSpec<T extends ZodType, O extends ZodType = never> {
|
|
922
966
|
/** Tool name surfaced to the LLM. Same constraints as {@link CustomTool.name}. */
|
|
923
967
|
name: string;
|
|
924
968
|
/** Description surfaced to the LLM. */
|
|
@@ -926,7 +970,16 @@ interface DefineToolSpec<T extends ZodType> {
|
|
|
926
970
|
/** Zod schema describing the input. Must be `z.object(...)` at the root for the LLM tool contract. */
|
|
927
971
|
inputSchema: T;
|
|
928
972
|
/**
|
|
929
|
-
*
|
|
973
|
+
* SE16 — optional Zod schema describing the OUTPUT. When set, the handler
|
|
974
|
+
* returns the structured value inferred from it; the value is validated against
|
|
975
|
+
* this schema and serialized to the tool result (a string stays as-is, an object
|
|
976
|
+
* is JSON-stringified). A validation failure raises `ZodError`, converted to a
|
|
977
|
+
* `tool_result(isError)`. Absent ⇒ the handler returns a plain string (unchanged).
|
|
978
|
+
*/
|
|
979
|
+
outputSchema?: O;
|
|
980
|
+
/**
|
|
981
|
+
* Handler invoked with the parsed input. Type is inferred via `z.infer<T>`; the
|
|
982
|
+
* return type is `z.infer<O>` when `outputSchema` is set, else `string`.
|
|
930
983
|
* #65 — an optional 2nd `ToolContext` argument carries the run's `AbortSignal`,
|
|
931
984
|
* so a cooperative handler can stop early when the run is cancelled. Existing
|
|
932
985
|
* single-argument handlers are unaffected.
|
|
@@ -934,7 +987,18 @@ interface DefineToolSpec<T extends ZodType> {
|
|
|
934
987
|
handler: (input: z.infer<T>, ctx?: {
|
|
935
988
|
signal?: AbortSignal;
|
|
936
989
|
context?: unknown;
|
|
937
|
-
}) =>
|
|
990
|
+
}) => ToolHandlerReturn<O> | Promise<ToolHandlerReturn<O>>;
|
|
991
|
+
/**
|
|
992
|
+
* SE17 — map the handler's (validated) output to the compact / multimodal
|
|
993
|
+
* representation the MODEL sees in the tool_result. The handler keeps returning
|
|
994
|
+
* the FULL result (validated by `outputSchema`); `toModelOutput` shapes only what
|
|
995
|
+
* reaches the model, so app-facing detail is not forced into model context.
|
|
996
|
+
* Returns a string OR SE7 `ToolResultContentBlock[]` (text + image). Absent ⇒
|
|
997
|
+
* the tool_result is the serialized handler output (SE16 / pre-SE17 behavior).
|
|
998
|
+
* Note: observability (`onToolEnd`) sees the model-facing result this returns,
|
|
999
|
+
* not the raw handler output — the full result lives in the handler's own scope.
|
|
1000
|
+
*/
|
|
1001
|
+
toModelOutput?: (output: ToolHandlerReturn<O>) => string | ToolResultContentBlock[];
|
|
938
1002
|
/**
|
|
939
1003
|
* Sanitize the raw model-emitted args BEFORE schema validation (`@theokit/sdk/sanitize`).
|
|
940
1004
|
* `true` trims whitespace; an object opts into coercion / JSON-repair. Coercion is schema-aware
|
|
@@ -943,23 +1007,7 @@ interface DefineToolSpec<T extends ZodType> {
|
|
|
943
1007
|
*/
|
|
944
1008
|
sanitize?: boolean | SanitizeOptions;
|
|
945
1009
|
}
|
|
946
|
-
|
|
947
|
-
* Type-safe builder for {@link CustomTool}. Converts a Zod schema to JSON
|
|
948
|
-
* Schema (for the LLM-facing `inputSchema` field), wraps the handler with a
|
|
949
|
-
* runtime `schema.parse` step, and preserves type inference.
|
|
950
|
-
*
|
|
951
|
-
* Behaviour (ADR D24):
|
|
952
|
-
* - JSON Schema conversion uses Zod 4's native `z.toJSONSchema` with
|
|
953
|
-
* `unrepresentable: "any"` so transforms/refinements round-trip.
|
|
954
|
-
* - Runtime parse failures throw `ZodError`; the SDK's tool-dispatch converts
|
|
955
|
-
* them to `tool_result(isError)` with the Zod message.
|
|
956
|
-
* - Handler signature is `(input: z.infer<T>)`, not `Record<string, unknown>`.
|
|
957
|
-
* - `zod` loads lazily via `createRequire` — consumers who don't call
|
|
958
|
-
* `defineTool` don't need `zod` installed.
|
|
959
|
-
*
|
|
960
|
-
* @public
|
|
961
|
-
*/
|
|
962
|
-
declare function defineTool<T extends ZodType>(spec: DefineToolSpec<T>): CustomTool;
|
|
1010
|
+
declare function defineTool<T extends ZodType, O extends ZodType = never>(spec: DefineToolSpec<T, O>): CustomTool;
|
|
963
1011
|
|
|
964
1012
|
/**
|
|
965
1013
|
* `EventBus` — typed EventEmitter wrapper.
|
|
@@ -2472,4 +2520,4 @@ declare function toShareGptTrajectory(result: BatchResult, options?: {
|
|
|
2472
2520
|
model?: string;
|
|
2473
2521
|
}): ShareGptTrajectory | null;
|
|
2474
2522
|
|
|
2475
|
-
export { Agent, AgentBuilder, AgentDefinition, type AgentFactory, AgentOperationOptions, AgentOptions, type AgentPromptResult, type AgentRegistryOptions, type BatchItem, type BatchOptions, type BatchProgress, type BatchResult, Budget, BudgetHandle, BudgetOptions, BudgetSnapshot, BudgetTracker, CloudOptions, ContextSettings, ConversationStorageAdapter, type CounterBudgetTrackerOptions, CustomTool, type DeepPartial, type DefineProviderOptions, type DefineToolSpec, type DreamingSweepOptions, type DreamingSweepResult, ErrorMetadata, EventBus, type EvictReason, FileSystemConversationStorage, GenerateObjectError, type GenerateObjectOptions, type GenerateObjectResult, GetAgentOptions, GetRunOptions, InMemoryConversationStorage, JobQueue, type JobQueueOptions, ListAgentsOptions, ListResult, ListRunsOptions, LiveAgentRegistry, LocalOptions, McpServerConfig, Memory, MemoryId, MemoryProvider, MemorySettings, MessageOrigin, type MigrateOptions, type MigrateResult, type ModelListItem, type ModelParameterDefinition, ModelSelection, type ModelVariant, type NormalizedJsonSchema, type PermissionAction, PermissionEngine, type PermissionEngineOptions, type PermissionGate, type PermissionGateContext, type PermissionGateDecision, type PermissionMode, type PermissionPluginOptions, type PermissionRule, Plugin, PluginsSettings, PreToolCallDecision, ProviderProfile, ProviderRoutingSettings, type ReplayHistoryOptions, Run, RunResult, SDKAgent, SDKAgentInfo, SDKMessage, type SDKModel, SDKProvider, type SDKRepository, type SDKUser, Security, type SessionCapabilityResult, type SessionListOptions, type SessionManager, SessionMeta, SessionMetaPatch, type SessionScope, type SessionSummary, type ShareGptMessage, type ShareGptTrajectory, SkillsSettings, type Squad, type SquadOptions, type SquadRun, StoredMessage, StreamObjectError, type StreamObjectEvent, type StreamObjectOptions, SystemPromptResolver, TASK_RESERVED_PREFIXES, Task, type TaskCancelResult, type TaskConfigureOptions, type TaskEvent, type TaskFilter, type TaskHandle, type TaskKind, type TaskState, type TaskStoreOptions, type TaskSubmitOptions, type TaskWorkContext, type TaskWorkFn, Theokit, TheokitAgentError, type TheokitRequestOptions, ToolError, ToolResultContentBlock, UsageAccumulator, applyMode, buildReplayHistory, chargeAndCheckThresholds, computeCost, createAgentFactory, createCounterBudgetTracker, createNoopMemoryProvider, createPermissionPlugin, createSessionManager, createSquad, defineProvider, defineTool, extractRawId, getPricingEntry, inferApiMode, isValidTaskId, migrateSqliteToLance, mkMemoryId, normalizeSchema, normalizeUsage, preflightCheck, scopedConversationId, sessionScopePrefix, toShareGptTrajectory, withCwdMutex };
|
|
2523
|
+
export { Agent, AgentBuilder, AgentDefinition, type AgentFactory, AgentOperationOptions, AgentOptions, type AgentPromptResult, type AgentRegistryOptions, type BatchItem, type BatchOptions, type BatchProgress, type BatchResult, Budget, BudgetHandle, BudgetOptions, BudgetSnapshot, BudgetTracker, CloudOptions, ContextSettings, ConversationStorageAdapter, type CounterBudgetTrackerOptions, CustomTool, type DeepPartial, type DefineProviderOptions, type DefineToolSpec, type DreamingSweepOptions, type DreamingSweepResult, ErrorMetadata, EventBus, type EvictReason, FileSystemConversationStorage, GenerateObjectError, type GenerateObjectOptions, type GenerateObjectResult, GetAgentOptions, GetRunOptions, InMemoryConversationStorage, InlineSkill, JobQueue, type JobQueueOptions, ListAgentsOptions, ListResult, ListRunsOptions, LiveAgentRegistry, LocalOptions, McpServerConfig, Memory, MemoryId, MemoryProvider, MemorySettings, MessageOrigin, type MigrateOptions, type MigrateResult, type ModelListItem, type ModelParameterDefinition, ModelSelection, type ModelVariant, type NormalizedJsonSchema, type PermissionAction, PermissionEngine, type PermissionEngineOptions, type PermissionGate, type PermissionGateContext, type PermissionGateDecision, type PermissionMode, type PermissionPluginOptions, type PermissionRule, Plugin, PluginsSettings, PreToolCallDecision, ProviderProfile, ProviderRoutingSettings, type ReplayHistoryOptions, Run, RunResult, SDKAgent, SDKAgentInfo, SDKMessage, type SDKModel, SDKProvider, type SDKRepository, type SDKUser, Security, type SessionCapabilityResult, type SessionListOptions, type SessionManager, SessionMeta, SessionMetaPatch, type SessionScope, type SessionSummary, type ShareGptMessage, type ShareGptTrajectory, SkillsSettings, type Squad, type SquadOptions, type SquadRun, StoredMessage, StreamObjectError, type StreamObjectEvent, type StreamObjectOptions, SystemPromptResolver, TASK_RESERVED_PREFIXES, Task, type TaskCancelResult, type TaskConfigureOptions, type TaskEvent, type TaskFilter, type TaskHandle, type TaskKind, type TaskState, type TaskStoreOptions, type TaskSubmitOptions, type TaskWorkContext, type TaskWorkFn, Theokit, TheokitAgentError, type TheokitRequestOptions, ToolError, ToolResultContentBlock, UsageAccumulator, applyMode, buildReplayHistory, chargeAndCheckThresholds, computeCost, createAgentFactory, createCounterBudgetTracker, createNoopMemoryProvider, createPermissionPlugin, createSessionManager, createSquad, defineProvider, defineSkillReadTool, defineTool, extractRawId, getPricingEntry, inferApiMode, isValidTaskId, migrateSqliteToLance, mkMemoryId, normalizeSchema, normalizeUsage, preflightCheck, scopedConversationId, sessionScopePrefix, toShareGptTrajectory, withCwdMutex };
|