@theokit/sdk 2.30.0 → 3.0.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 +10 -0
- package/dist/a2a/index.cjs +8 -1
- package/dist/a2a/index.cjs.map +1 -1
- package/dist/a2a/index.d.cts +1 -1
- package/dist/a2a/index.d.ts +1 -1
- package/dist/a2a/index.js +8 -1
- package/dist/a2a/index.js.map +1 -1
- package/dist/a2a/subagent.d.cts +5 -1
- package/dist/a2a/subagent.d.ts +5 -1
- package/dist/agent-factory.d.ts +5 -20
- package/dist/concurrency.cjs +10 -1
- package/dist/concurrency.cjs.map +1 -1
- package/dist/concurrency.d.cts +7 -1
- package/dist/concurrency.d.ts +7 -1
- package/dist/concurrency.js +10 -1
- package/dist/concurrency.js.map +1 -1
- package/dist/create-skill.d.ts +7 -7
- package/dist/{cron-BNHJywtl.d.ts → cron-BLRe166v.d.ts} +19 -15
- package/dist/{cron-t4oKI2Is.d.cts → cron-C2jWAvlQ.d.cts} +19 -15
- package/dist/cron.d.cts +1 -1
- package/dist/cron.d.ts +1 -1
- package/dist/define-tool.d.ts +12 -1
- package/dist/index.cjs +90 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +60 -114
- package/dist/index.d.ts +60 -114
- package/dist/index.js +79 -1
- package/dist/index.js.map +1 -1
- package/dist/internal/plugins/index.d.cts +1 -1
- package/dist/internal/plugins/index.d.ts +1 -1
- package/dist/internal/plugins/types.d.cts +4 -0
- package/dist/internal/plugins/types.d.ts +4 -0
- package/dist/retry.cjs +10 -1
- package/dist/retry.cjs.map +1 -1
- package/dist/retry.d.cts +12 -1
- package/dist/retry.d.ts +12 -1
- package/dist/retry.js +10 -1
- package/dist/retry.js.map +1 -1
- package/dist/server/auth/index.cjs +8 -1
- package/dist/server/auth/index.cjs.map +1 -1
- package/dist/server/auth/index.d.cts +1 -1
- package/dist/server/auth/index.d.ts +1 -1
- package/dist/server/auth/index.js +8 -1
- package/dist/server/auth/index.js.map +1 -1
- package/dist/server/auth/orchestrator.d.cts +5 -1
- package/dist/server/auth/orchestrator.d.ts +5 -1
- package/dist/subscription/define-subscription.d.cts +5 -0
- package/dist/subscription/define-subscription.d.ts +5 -0
- package/dist/subscription/index.cjs +8 -1
- package/dist/subscription/index.cjs.map +1 -1
- package/dist/subscription/index.d.cts +1 -1
- package/dist/subscription/index.d.ts +1 -1
- package/dist/subscription/index.js +8 -1
- package/dist/subscription/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { T as TheokitAgentError, B as BudgetOptions, a as BudgetHandle, b as BudgetSnapshot, E as ErrorMetadata } from './errors-DZpCGlYv.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-DZpCGlYv.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, O as ObjectiveRecord, B as BudgetTracker, r as MemoryProvider, s as MemoryId, t as PreToolCallDecision, u as StepResult, v as SDKProvider } from './cron-
|
|
4
|
-
export { w as ActiveMemoryPassArgs, x as ActiveMemoryPassResult, y as AgentGoalConfig, z as AgentMemory, D as BudgetCheck, E as BudgetTotal, F as BudgetUsageEvent, H as CloudEnv, J as CloudRepo, K as ContextBudget, N as ContextManagerKind, Q as ContextSnapshot, R as ContextSource, T as ContextSourceStatus, U as CreateSkillSpec, V as Cron, W as CronCreateOptions, X as CronGetOptions, Y as CronJob, Z as CronJobStatus, _ as CronListOptions, $ as CronOperationOptions, a0 as CronRunOptions, a1 as CronRuntime, a2 as CronSchedulerStatus, a3 as CronStartOptions, a4 as DurableGoalOptions, a5 as GoalEvent, a6 as GoalOptions, a7 as GoalResult, a8 as HookName, a9 as InvalidateCacheOptions, aa as MemoryAdapter, ab as MemoryAdapterCapabilities, ac as MemoryContext, ad as MemoryFact, ae as MemoryProviderHandle, af as MemoryProviderInitOptions, ag as MemoryRevision, ah as MemoryToolSchema, ai as MemoryTurnMessage, aj as ObjectiveStatus, ak as PersonalityPreset, al as PluginContext, am as PostAssistantReplyContext, an as PreToolCallContext, ao as PreUserSendContext, ap as PreUserSendResult, aq as ProviderCapability, ar as ProviderRoute, as as RecordSessionSummaryArgs, at as ResolvedProviderRoute, au as RunUntilIterator, av as SDKAgentPlugins, aw as SDKAgentSkillDetail, ax as SDKAgentSkills, ay as SDKArtifact, az as SDKContextManager, aA as SDKPluginMetadata, aB as SDKProvidersManager, aC as SettingSource, aD as
|
|
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, O as ObjectiveRecord, B as BudgetTracker, r as MemoryProvider, s as MemoryId, t as PreToolCallDecision, u as StepResult, v as SDKProvider } from './cron-C2jWAvlQ.cjs';
|
|
4
|
+
export { w as ActiveMemoryPassArgs, x as ActiveMemoryPassResult, y as AgentGoalConfig, z as AgentMemory, D as BudgetCheck, E as BudgetTotal, F as BudgetUsageEvent, H as CloudEnv, J as CloudRepo, K as ContextBudget, N as ContextManagerKind, Q as ContextSnapshot, R as ContextSource, T as ContextSourceStatus, U as CreateSkillSpec, V as Cron, W as CronCreateOptions, X as CronGetOptions, Y as CronJob, Z as CronJobStatus, _ as CronListOptions, $ as CronOperationOptions, a0 as CronRunOptions, a1 as CronRuntime, a2 as CronSchedulerStatus, a3 as CronStartOptions, a4 as DurableGoalOptions, a5 as GoalEvent, a6 as GoalOptions, a7 as GoalResult, a8 as HookName, a9 as InvalidateCacheOptions, aa as MemoryAdapter, ab as MemoryAdapterCapabilities, ac as MemoryContext, ad as MemoryFact, ae as MemoryProviderHandle, af as MemoryProviderInitOptions, ag as MemoryRevision, ah as MemoryToolSchema, ai as MemoryTurnMessage, aj as ObjectiveStatus, ak as PersonalityPreset, al as PluginContext, am as PostAssistantReplyContext, an as PreToolCallContext, ao as PreUserSendContext, ap as PreUserSendResult, aq as ProviderCapability, ar as ProviderRoute, as as RecordSessionSummaryArgs, at as ResolvedProviderRoute, au as RunUntilIterator, av as SDKAgentPlugins, aw as SDKAgentSkillDetail, ax as SDKAgentSkills, ay as SDKArtifact, az as SDKContextManager, aA as SDKPluginMetadata, aB as SDKProvidersManager, aC as SettingSource, aD as Skill, aE as SkillsResolver, aF as SkillsResolverContext, aG as SystemPromptContext, aH as SystemPromptMemoryFact, aI as SystemPromptSkillRef, aJ as TelemetrySettings } from './cron-C2jWAvlQ.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, S as SDKMessage } from './run-CLXKMRgq.cjs';
|
|
6
6
|
export { A as AgentConversationTurn, c as AssistantMessage, d as CompletionCheck, e as CompletionCheckResult, f as ConversationStep, g as ConversationTurn, h as CostBreakdown, i as CostSource, j as CostStatus, D as DoomLoopThresholds, G as GenerateOptions, k as GenerateRunResult, I as ImageBlock, l as InputProcessorContext, m as InteractionUpdate, n as McpAuthConfig, o as McpHttpServerConfig, p as McpOAuthConfig, q as McpStdioServerConfig, r as MessageOrigin, s as ModelParameterValue, O as OutputProcessorContext, t as PartialToolCallUpdate, u as ProcessorControls, v as ProcessorTripwire, w as ProcessorViolation, x as RunCompactBoundaryEvent, y as RunCompletionCheckEvent, z as RunErrorDetail, B as RunEvent, E as RunEventSink, F as RunGitInfo, H as RunOperation, J as RunPermissionDeniedEvent, K as RunRateLimitEvent, L as RunStatus, N as RunTaskCompletedEvent, Q as RunTaskStartedEvent, U as RunTaskUpdatedEvent, V as RunToCompletionOptions, W as RunToCompletionResult, X as RunToolProgressEvent, Y as RunTripwireEvent, Z as SDKAssistantMessage, _ as SDKImage, $ as SDKImageDimension, a0 as SDKObjectDelta, a1 as SDKRequestMessage, a2 as SDKStatusMessage, a3 as SDKSystemMessage, a4 as SDKTaskMessage, a5 as SDKThinkingMessage, a6 as SDKToolUseMessage, a7 as SDKUserMessage, a8 as SDKUserMessageEvent, a9 as SendOptions, aa as ShellCommand, ab as ShellConversationTurn, ac as ShellOutput, ad as ShellOutputDeltaUpdate, ae as StepCompletedUpdate, af as StepStartedUpdate, ag as StreamToCompletionResult, ah as SummaryCompletedUpdate, ai as SummaryStartedUpdate, aj as SummaryUpdate, ak as TextBlock, al as TextDeltaUpdate, am as ThinkingCompletedUpdate, an as ThinkingDeltaUpdate, ao as ThinkingMessage, ap as TokenDeltaUpdate, aq as TokenUsage, ar as ToolCall, as as ToolCallCompletedUpdate, at as ToolCallStartedUpdate, au as ToolContextMessage, av as ToolResult, aw as ToolResultGuardOptions, ax as ToolUseBlock, ay as TurnEndedUpdate, az as UserMessage, aA as UserMessageAppendedUpdate, aB as emitRunEvent } from './run-CLXKMRgq.cjs';
|
|
7
7
|
import * as zod from 'zod';
|
|
@@ -601,26 +601,11 @@ interface AgentFactory {
|
|
|
601
601
|
*/
|
|
602
602
|
getOrCreate(agentId: string, overrides?: Partial<AgentOptions>): Promise<SDKAgent>;
|
|
603
603
|
}
|
|
604
|
-
/**
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
* Merge rules (ADR D23):
|
|
610
|
-
* - Top-level shallow merge with `overrides` winning.
|
|
611
|
-
* - Deep merge for `local`, `memory`, `cloud` (configuration objects with
|
|
612
|
-
* non-conflicting flat keys).
|
|
613
|
-
* - Total replace for `mcpServers`, `agents`, `tools`, `providers`,
|
|
614
|
-
* `plugins`, `skills`, `context` (collection-shaped).
|
|
615
|
-
* - The function-level `agentId` always wins over both `common.agentId` and
|
|
616
|
-
* `overrides.agentId`.
|
|
617
|
-
*
|
|
618
|
-
* The factory holds `common` by reference — mutating it after construction
|
|
619
|
-
* leaks to subsequent `forSession` calls (documented caveat).
|
|
620
|
-
*
|
|
621
|
-
* @public
|
|
622
|
-
*/
|
|
623
|
-
declare function createAgentFactory(common: Partial<AgentOptions>): AgentFactory;
|
|
604
|
+
/** SE36 — `AgentFactory.create` replaces `createAgentFactory` (ADR 0015). Merges with the `AgentFactory` interface. @public */
|
|
605
|
+
declare class AgentFactory {
|
|
606
|
+
private constructor();
|
|
607
|
+
static create(common: Partial<AgentOptions>): AgentFactory;
|
|
608
|
+
}
|
|
624
609
|
|
|
625
610
|
/**
|
|
626
611
|
* computeCost — apply pricing entries to a TokenUsage and produce a
|
|
@@ -865,15 +850,6 @@ interface UnicodeNormalizerOptions {
|
|
|
865
850
|
/** Collapse runs of intra-line whitespace to one space, 3+ blank lines to one, and trim. Default `false`. Uses legacy `\s`; Unicode-only whitespace (U+00A0 NBSP, U+FEFF BOM, U+2000–U+200A) is NOT collapsed. */
|
|
866
851
|
collapseWhitespace?: boolean;
|
|
867
852
|
}
|
|
868
|
-
/**
|
|
869
|
-
* SE25 — an input processor that normalizes user text: Unicode NFC (so
|
|
870
|
-
* canonically-equivalent sequences compare equal) plus optional control-char
|
|
871
|
-
* stripping and whitespace collapsing. Pure + deterministic; no LLM. Mirrors
|
|
872
|
-
* Mastra's `UnicodeNormalizer`.
|
|
873
|
-
*
|
|
874
|
-
* @public
|
|
875
|
-
*/
|
|
876
|
-
declare function createUnicodeNormalizer(opts?: UnicodeNormalizerOptions): Processor;
|
|
877
853
|
/** Options for {@link createTokenLimiter}. @public */
|
|
878
854
|
interface TokenLimiterOptions {
|
|
879
855
|
/** Positive integer token budget (estimate — see {@link estimateTokens}). */
|
|
@@ -881,15 +857,16 @@ interface TokenLimiterOptions {
|
|
|
881
857
|
/** Over the limit: `"truncate"` (default, cut to fit) or `"block"` (abort with a tripwire). */
|
|
882
858
|
strategy?: "truncate" | "block";
|
|
883
859
|
}
|
|
884
|
-
/**
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
860
|
+
/** SE36 — `TokenLimiter.create` replaces `createTokenLimiter` (ADR 0015). @public */
|
|
861
|
+
declare class TokenLimiter {
|
|
862
|
+
private constructor();
|
|
863
|
+
static create(opts: TokenLimiterOptions): Processor;
|
|
864
|
+
}
|
|
865
|
+
/** SE36 — `UnicodeNormalizer.create` replaces `createUnicodeNormalizer` (ADR 0015). @public */
|
|
866
|
+
declare class UnicodeNormalizer {
|
|
867
|
+
private constructor();
|
|
868
|
+
static create(opts?: UnicodeNormalizerOptions): Processor;
|
|
869
|
+
}
|
|
893
870
|
|
|
894
871
|
/**
|
|
895
872
|
* Options for {@link defineProvider}.
|
|
@@ -900,38 +877,11 @@ interface DefineProviderOptions {
|
|
|
900
877
|
/** Plugin version surfaced in diagnostics. Default `"1.0.0"`. */
|
|
901
878
|
version?: string;
|
|
902
879
|
}
|
|
903
|
-
/**
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
* A {@link ProviderProfile} is data-only: it declares the provider name, the
|
|
909
|
-
* HTTP dialect (`apiMode`), auth, base URL and fallback models. The transport
|
|
910
|
-
* is selected from `apiMode` by the router, so any OpenAI-/Anthropic-compatible
|
|
911
|
-
* endpoint (Groq, Together, Fireworks, a private gateway) is expressible as a
|
|
912
|
-
* profile with no new code.
|
|
913
|
-
*
|
|
914
|
-
* Pass the result to `Agent.create({ plugins: [...] })` and route to it with
|
|
915
|
-
* the `provider/model` id prefix or `providers.routes`:
|
|
916
|
-
*
|
|
917
|
-
* ```ts
|
|
918
|
-
* const groq = defineProvider({
|
|
919
|
-
* name: "groq",
|
|
920
|
-
* apiMode: "chat_completions",
|
|
921
|
-
* authType: "api_key",
|
|
922
|
-
* envVars: ["GROQ_API_KEY"],
|
|
923
|
-
* baseUrl: "https://api.groq.com/openai/v1",
|
|
924
|
-
* fallbackModels: ["groq/llama-3.1-8b-instant"],
|
|
925
|
-
* });
|
|
926
|
-
* const agent = await Agent.create({
|
|
927
|
-
* model: { id: "groq/llama-3.1-8b-instant" },
|
|
928
|
-
* plugins: [groq],
|
|
929
|
-
* });
|
|
930
|
-
* ```
|
|
931
|
-
*
|
|
932
|
-
* @public
|
|
933
|
-
*/
|
|
934
|
-
declare function defineProvider(profile: ProviderProfile, opts?: DefineProviderOptions): Plugin;
|
|
880
|
+
/** SE36 — uniform namespace API. `Provider.create` replaces `defineProvider` (ADR 0015). @public */
|
|
881
|
+
declare class Provider {
|
|
882
|
+
private constructor();
|
|
883
|
+
static create(profile: ProviderProfile, opts?: DefineProviderOptions): Plugin;
|
|
884
|
+
}
|
|
935
885
|
|
|
936
886
|
/**
|
|
937
887
|
* SE23 — `defineSkillReadTool`: an OPT-IN factory that gives the MODEL on-demand
|
|
@@ -956,19 +906,11 @@ declare function defineProvider(profile: ProviderProfile, opts?: DefineProviderO
|
|
|
956
906
|
* @public
|
|
957
907
|
*/
|
|
958
908
|
|
|
959
|
-
/**
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
* Malformed input (missing `name`) fails at the trust boundary via the schema.
|
|
965
|
-
*
|
|
966
|
-
* The consumer controls exposure by choosing which skills to pass; the SDK
|
|
967
|
-
* never auto-injects this tool.
|
|
968
|
-
*
|
|
969
|
-
* @public
|
|
970
|
-
*/
|
|
971
|
-
declare function defineSkillReadTool(skills: ReadonlyArray<InlineSkill>): CustomTool;
|
|
909
|
+
/** SE36 — `SkillReadTool.create` replaces `defineSkillReadTool` (ADR 0015). @public */
|
|
910
|
+
declare class SkillReadTool {
|
|
911
|
+
private constructor();
|
|
912
|
+
static create(skills: ReadonlyArray<InlineSkill>): CustomTool;
|
|
913
|
+
}
|
|
972
914
|
|
|
973
915
|
/**
|
|
974
916
|
* Options for {@link sanitizeToolInput}. Trim is the only default-on rung — coercion and JSON
|
|
@@ -1056,7 +998,18 @@ interface DefineToolSpec<T extends ZodType, O extends ZodType = never> {
|
|
|
1056
998
|
*/
|
|
1057
999
|
sanitize?: boolean | SanitizeOptions;
|
|
1058
1000
|
}
|
|
1059
|
-
|
|
1001
|
+
/**
|
|
1002
|
+
* SE36 — the uniform `X.create()` namespace API. `Tool.create(spec)` is the sole public
|
|
1003
|
+
* constructor for a {@link CustomTool}; it wraps the internal builder so behavior is identical
|
|
1004
|
+
* (ADR 0015). A `private constructor` makes `Tool` a namespace, not an instantiable value —
|
|
1005
|
+
* `new Tool()` is a compile error. Mirrors `Agent.create` / `Cron.create`.
|
|
1006
|
+
*
|
|
1007
|
+
* @public
|
|
1008
|
+
*/
|
|
1009
|
+
declare class Tool {
|
|
1010
|
+
private constructor();
|
|
1011
|
+
static create<T extends ZodType, O extends ZodType = never>(spec: DefineToolSpec<T, O>): CustomTool;
|
|
1012
|
+
}
|
|
1060
1013
|
|
|
1061
1014
|
/**
|
|
1062
1015
|
* `EventBus` — typed EventEmitter wrapper.
|
|
@@ -1274,13 +1227,11 @@ declare function buildReplayHistory(base: readonly StoredMessage[], events: read
|
|
|
1274
1227
|
* @public — surface-level reference impl.
|
|
1275
1228
|
*/
|
|
1276
1229
|
|
|
1277
|
-
/**
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
*/
|
|
1283
|
-
declare function createNoopMemoryProvider(): MemoryProvider;
|
|
1230
|
+
/** SE36 — `NoopMemoryProvider.create` replaces `createNoopMemoryProvider` (ADR 0015). @public */
|
|
1231
|
+
declare class NoopMemoryProvider {
|
|
1232
|
+
private constructor();
|
|
1233
|
+
static create(): MemoryProvider;
|
|
1234
|
+
}
|
|
1284
1235
|
|
|
1285
1236
|
/**
|
|
1286
1237
|
* `JobQueue` — background job queue with status tracking, cancellation, and an
|
|
@@ -1669,12 +1620,11 @@ interface PermissionPluginOptions {
|
|
|
1669
1620
|
*/
|
|
1670
1621
|
readonly onAsk?: (toolName: string) => PreToolCallDecision | undefined;
|
|
1671
1622
|
}
|
|
1672
|
-
/**
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
declare function createPermissionPlugin(engine: PermissionEngine, opts?: PermissionPluginOptions): Plugin;
|
|
1623
|
+
/** SE36 — `PermissionPlugin.create` replaces `createPermissionPlugin` (ADR 0015). @public */
|
|
1624
|
+
declare class PermissionPlugin {
|
|
1625
|
+
private constructor();
|
|
1626
|
+
static create(engine: PermissionEngine, opts?: PermissionPluginOptions): Plugin;
|
|
1627
|
+
}
|
|
1678
1628
|
|
|
1679
1629
|
/** The internal JSON-Schema shape the synthetic `output` tool consumes. */
|
|
1680
1630
|
type NormalizedJsonSchema = Record<string, unknown>;
|
|
@@ -1870,12 +1820,11 @@ interface SessionManager {
|
|
|
1870
1820
|
* @public
|
|
1871
1821
|
*/
|
|
1872
1822
|
|
|
1873
|
-
/**
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
declare function createSessionManager(storage: ConversationStorageAdapter): SessionManager;
|
|
1823
|
+
/** SE36 — `Session.create` replaces `createSessionManager` (ADR 0015). @public */
|
|
1824
|
+
declare class Session {
|
|
1825
|
+
private constructor();
|
|
1826
|
+
static create(storage: ConversationStorageAdapter): SessionManager;
|
|
1827
|
+
}
|
|
1879
1828
|
|
|
1880
1829
|
/**
|
|
1881
1830
|
* M3 #62 — scoped session state.
|
|
@@ -1956,14 +1905,11 @@ interface Squad {
|
|
|
1956
1905
|
/** Run the team over `input`, threading each agent's output to the next. */
|
|
1957
1906
|
run(input: unknown): Promise<SquadRun>;
|
|
1958
1907
|
}
|
|
1959
|
-
/**
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
* @public
|
|
1965
|
-
*/
|
|
1966
|
-
declare function createSquad(options: SquadOptions): Squad;
|
|
1908
|
+
/** SE36 — `Squad.create` replaces `createSquad` (ADR 0015). Merges with the `Squad` interface. @public */
|
|
1909
|
+
declare class Squad {
|
|
1910
|
+
private constructor();
|
|
1911
|
+
static create(options: SquadOptions): Squad;
|
|
1912
|
+
}
|
|
1967
1913
|
|
|
1968
1914
|
/**
|
|
1969
1915
|
* Public type contract for the Task observability registry (ADRs D361-D374).
|
|
@@ -2460,4 +2406,4 @@ declare function toShareGptTrajectory(result: BatchResult, options?: {
|
|
|
2460
2406
|
model?: string;
|
|
2461
2407
|
}): ShareGptTrajectory | null;
|
|
2462
2408
|
|
|
2463
|
-
export { Agent, AgentBuilder, AgentDefinition,
|
|
2409
|
+
export { Agent, AgentBuilder, AgentDefinition, 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, type MigrateOptions, type MigrateResult, type ModelListItem, type ModelParameterDefinition, ModelSelection, type ModelVariant, NoopMemoryProvider, type NormalizedJsonSchema, ObjectiveRecord, type PermissionAction, PermissionEngine, type PermissionEngineOptions, type PermissionGate, type PermissionGateContext, type PermissionGateDecision, type PermissionMode, PermissionPlugin, type PermissionPluginOptions, type PermissionRule, Plugin, PluginsSettings, PreToolCallDecision, Processor, Provider, ProviderProfile, ProviderRoutingSettings, type ReplayHistoryOptions, Run, RunResult, SDKAgent, SDKAgentInfo, SDKMessage, type SDKModel, SDKProvider, type SDKRepository, type SDKUser, Security, Session, type SessionCapabilityResult, type SessionListOptions, type SessionManager, SessionMeta, SessionMetaPatch, type SessionScope, type SessionSummary, type ShareGptMessage, type ShareGptTrajectory, SkillReadTool, SkillsSettings, 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, TokenLimiter, type TokenLimiterOptions, Tool, ToolError, ToolResultContentBlock, UnicodeNormalizer, type UnicodeNormalizerOptions, UsageAccumulator, applyMode, buildReplayHistory, chargeAndCheckThresholds, computeCost, createCounterBudgetTracker, estimateTokens, extractRawId, getPricingEntry, inferApiMode, isValidTaskId, migrateSqliteToLance, mkMemoryId, normalizeSchema, normalizeUsage, preflightCheck, scopedConversationId, sessionScopePrefix, toShareGptTrajectory, withCwdMutex };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { T as TheokitAgentError, B as BudgetOptions, a as BudgetHandle, b as BudgetSnapshot, E as ErrorMetadata } from './errors-D_Bfo30u.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-D_Bfo30u.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, O as ObjectiveRecord, B as BudgetTracker, r as MemoryProvider, s as MemoryId, t as PreToolCallDecision, u as StepResult, v as SDKProvider } from './cron-
|
|
4
|
-
export { w as ActiveMemoryPassArgs, x as ActiveMemoryPassResult, y as AgentGoalConfig, z as AgentMemory, D as BudgetCheck, E as BudgetTotal, F as BudgetUsageEvent, H as CloudEnv, J as CloudRepo, K as ContextBudget, N as ContextManagerKind, Q as ContextSnapshot, R as ContextSource, T as ContextSourceStatus, U as CreateSkillSpec, V as Cron, W as CronCreateOptions, X as CronGetOptions, Y as CronJob, Z as CronJobStatus, _ as CronListOptions, $ as CronOperationOptions, a0 as CronRunOptions, a1 as CronRuntime, a2 as CronSchedulerStatus, a3 as CronStartOptions, a4 as DurableGoalOptions, a5 as GoalEvent, a6 as GoalOptions, a7 as GoalResult, a8 as HookName, a9 as InvalidateCacheOptions, aa as MemoryAdapter, ab as MemoryAdapterCapabilities, ac as MemoryContext, ad as MemoryFact, ae as MemoryProviderHandle, af as MemoryProviderInitOptions, ag as MemoryRevision, ah as MemoryToolSchema, ai as MemoryTurnMessage, aj as ObjectiveStatus, ak as PersonalityPreset, al as PluginContext, am as PostAssistantReplyContext, an as PreToolCallContext, ao as PreUserSendContext, ap as PreUserSendResult, aq as ProviderCapability, ar as ProviderRoute, as as RecordSessionSummaryArgs, at as ResolvedProviderRoute, au as RunUntilIterator, av as SDKAgentPlugins, aw as SDKAgentSkillDetail, ax as SDKAgentSkills, ay as SDKArtifact, az as SDKContextManager, aA as SDKPluginMetadata, aB as SDKProvidersManager, aC as SettingSource, aD as
|
|
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, O as ObjectiveRecord, B as BudgetTracker, r as MemoryProvider, s as MemoryId, t as PreToolCallDecision, u as StepResult, v as SDKProvider } from './cron-BLRe166v.js';
|
|
4
|
+
export { w as ActiveMemoryPassArgs, x as ActiveMemoryPassResult, y as AgentGoalConfig, z as AgentMemory, D as BudgetCheck, E as BudgetTotal, F as BudgetUsageEvent, H as CloudEnv, J as CloudRepo, K as ContextBudget, N as ContextManagerKind, Q as ContextSnapshot, R as ContextSource, T as ContextSourceStatus, U as CreateSkillSpec, V as Cron, W as CronCreateOptions, X as CronGetOptions, Y as CronJob, Z as CronJobStatus, _ as CronListOptions, $ as CronOperationOptions, a0 as CronRunOptions, a1 as CronRuntime, a2 as CronSchedulerStatus, a3 as CronStartOptions, a4 as DurableGoalOptions, a5 as GoalEvent, a6 as GoalOptions, a7 as GoalResult, a8 as HookName, a9 as InvalidateCacheOptions, aa as MemoryAdapter, ab as MemoryAdapterCapabilities, ac as MemoryContext, ad as MemoryFact, ae as MemoryProviderHandle, af as MemoryProviderInitOptions, ag as MemoryRevision, ah as MemoryToolSchema, ai as MemoryTurnMessage, aj as ObjectiveStatus, ak as PersonalityPreset, al as PluginContext, am as PostAssistantReplyContext, an as PreToolCallContext, ao as PreUserSendContext, ap as PreUserSendResult, aq as ProviderCapability, ar as ProviderRoute, as as RecordSessionSummaryArgs, at as ResolvedProviderRoute, au as RunUntilIterator, av as SDKAgentPlugins, aw as SDKAgentSkillDetail, ax as SDKAgentSkills, ay as SDKArtifact, az as SDKContextManager, aA as SDKPluginMetadata, aB as SDKProvidersManager, aC as SettingSource, aD as Skill, aE as SkillsResolver, aF as SkillsResolverContext, aG as SystemPromptContext, aH as SystemPromptMemoryFact, aI as SystemPromptSkillRef, aJ as TelemetrySettings } from './cron-BLRe166v.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, S as SDKMessage } from './run-CLXKMRgq.js';
|
|
6
6
|
export { A as AgentConversationTurn, c as AssistantMessage, d as CompletionCheck, e as CompletionCheckResult, f as ConversationStep, g as ConversationTurn, h as CostBreakdown, i as CostSource, j as CostStatus, D as DoomLoopThresholds, G as GenerateOptions, k as GenerateRunResult, I as ImageBlock, l as InputProcessorContext, m as InteractionUpdate, n as McpAuthConfig, o as McpHttpServerConfig, p as McpOAuthConfig, q as McpStdioServerConfig, r as MessageOrigin, s as ModelParameterValue, O as OutputProcessorContext, t as PartialToolCallUpdate, u as ProcessorControls, v as ProcessorTripwire, w as ProcessorViolation, x as RunCompactBoundaryEvent, y as RunCompletionCheckEvent, z as RunErrorDetail, B as RunEvent, E as RunEventSink, F as RunGitInfo, H as RunOperation, J as RunPermissionDeniedEvent, K as RunRateLimitEvent, L as RunStatus, N as RunTaskCompletedEvent, Q as RunTaskStartedEvent, U as RunTaskUpdatedEvent, V as RunToCompletionOptions, W as RunToCompletionResult, X as RunToolProgressEvent, Y as RunTripwireEvent, Z as SDKAssistantMessage, _ as SDKImage, $ as SDKImageDimension, a0 as SDKObjectDelta, a1 as SDKRequestMessage, a2 as SDKStatusMessage, a3 as SDKSystemMessage, a4 as SDKTaskMessage, a5 as SDKThinkingMessage, a6 as SDKToolUseMessage, a7 as SDKUserMessage, a8 as SDKUserMessageEvent, a9 as SendOptions, aa as ShellCommand, ab as ShellConversationTurn, ac as ShellOutput, ad as ShellOutputDeltaUpdate, ae as StepCompletedUpdate, af as StepStartedUpdate, ag as StreamToCompletionResult, ah as SummaryCompletedUpdate, ai as SummaryStartedUpdate, aj as SummaryUpdate, ak as TextBlock, al as TextDeltaUpdate, am as ThinkingCompletedUpdate, an as ThinkingDeltaUpdate, ao as ThinkingMessage, ap as TokenDeltaUpdate, aq as TokenUsage, ar as ToolCall, as as ToolCallCompletedUpdate, at as ToolCallStartedUpdate, au as ToolContextMessage, av as ToolResult, aw as ToolResultGuardOptions, ax as ToolUseBlock, ay as TurnEndedUpdate, az as UserMessage, aA as UserMessageAppendedUpdate, aB as emitRunEvent } from './run-CLXKMRgq.js';
|
|
7
7
|
import * as zod from 'zod';
|
|
@@ -601,26 +601,11 @@ interface AgentFactory {
|
|
|
601
601
|
*/
|
|
602
602
|
getOrCreate(agentId: string, overrides?: Partial<AgentOptions>): Promise<SDKAgent>;
|
|
603
603
|
}
|
|
604
|
-
/**
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
* Merge rules (ADR D23):
|
|
610
|
-
* - Top-level shallow merge with `overrides` winning.
|
|
611
|
-
* - Deep merge for `local`, `memory`, `cloud` (configuration objects with
|
|
612
|
-
* non-conflicting flat keys).
|
|
613
|
-
* - Total replace for `mcpServers`, `agents`, `tools`, `providers`,
|
|
614
|
-
* `plugins`, `skills`, `context` (collection-shaped).
|
|
615
|
-
* - The function-level `agentId` always wins over both `common.agentId` and
|
|
616
|
-
* `overrides.agentId`.
|
|
617
|
-
*
|
|
618
|
-
* The factory holds `common` by reference — mutating it after construction
|
|
619
|
-
* leaks to subsequent `forSession` calls (documented caveat).
|
|
620
|
-
*
|
|
621
|
-
* @public
|
|
622
|
-
*/
|
|
623
|
-
declare function createAgentFactory(common: Partial<AgentOptions>): AgentFactory;
|
|
604
|
+
/** SE36 — `AgentFactory.create` replaces `createAgentFactory` (ADR 0015). Merges with the `AgentFactory` interface. @public */
|
|
605
|
+
declare class AgentFactory {
|
|
606
|
+
private constructor();
|
|
607
|
+
static create(common: Partial<AgentOptions>): AgentFactory;
|
|
608
|
+
}
|
|
624
609
|
|
|
625
610
|
/**
|
|
626
611
|
* computeCost — apply pricing entries to a TokenUsage and produce a
|
|
@@ -865,15 +850,6 @@ interface UnicodeNormalizerOptions {
|
|
|
865
850
|
/** Collapse runs of intra-line whitespace to one space, 3+ blank lines to one, and trim. Default `false`. Uses legacy `\s`; Unicode-only whitespace (U+00A0 NBSP, U+FEFF BOM, U+2000–U+200A) is NOT collapsed. */
|
|
866
851
|
collapseWhitespace?: boolean;
|
|
867
852
|
}
|
|
868
|
-
/**
|
|
869
|
-
* SE25 — an input processor that normalizes user text: Unicode NFC (so
|
|
870
|
-
* canonically-equivalent sequences compare equal) plus optional control-char
|
|
871
|
-
* stripping and whitespace collapsing. Pure + deterministic; no LLM. Mirrors
|
|
872
|
-
* Mastra's `UnicodeNormalizer`.
|
|
873
|
-
*
|
|
874
|
-
* @public
|
|
875
|
-
*/
|
|
876
|
-
declare function createUnicodeNormalizer(opts?: UnicodeNormalizerOptions): Processor;
|
|
877
853
|
/** Options for {@link createTokenLimiter}. @public */
|
|
878
854
|
interface TokenLimiterOptions {
|
|
879
855
|
/** Positive integer token budget (estimate — see {@link estimateTokens}). */
|
|
@@ -881,15 +857,16 @@ interface TokenLimiterOptions {
|
|
|
881
857
|
/** Over the limit: `"truncate"` (default, cut to fit) or `"block"` (abort with a tripwire). */
|
|
882
858
|
strategy?: "truncate" | "block";
|
|
883
859
|
}
|
|
884
|
-
/**
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
860
|
+
/** SE36 — `TokenLimiter.create` replaces `createTokenLimiter` (ADR 0015). @public */
|
|
861
|
+
declare class TokenLimiter {
|
|
862
|
+
private constructor();
|
|
863
|
+
static create(opts: TokenLimiterOptions): Processor;
|
|
864
|
+
}
|
|
865
|
+
/** SE36 — `UnicodeNormalizer.create` replaces `createUnicodeNormalizer` (ADR 0015). @public */
|
|
866
|
+
declare class UnicodeNormalizer {
|
|
867
|
+
private constructor();
|
|
868
|
+
static create(opts?: UnicodeNormalizerOptions): Processor;
|
|
869
|
+
}
|
|
893
870
|
|
|
894
871
|
/**
|
|
895
872
|
* Options for {@link defineProvider}.
|
|
@@ -900,38 +877,11 @@ interface DefineProviderOptions {
|
|
|
900
877
|
/** Plugin version surfaced in diagnostics. Default `"1.0.0"`. */
|
|
901
878
|
version?: string;
|
|
902
879
|
}
|
|
903
|
-
/**
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
* A {@link ProviderProfile} is data-only: it declares the provider name, the
|
|
909
|
-
* HTTP dialect (`apiMode`), auth, base URL and fallback models. The transport
|
|
910
|
-
* is selected from `apiMode` by the router, so any OpenAI-/Anthropic-compatible
|
|
911
|
-
* endpoint (Groq, Together, Fireworks, a private gateway) is expressible as a
|
|
912
|
-
* profile with no new code.
|
|
913
|
-
*
|
|
914
|
-
* Pass the result to `Agent.create({ plugins: [...] })` and route to it with
|
|
915
|
-
* the `provider/model` id prefix or `providers.routes`:
|
|
916
|
-
*
|
|
917
|
-
* ```ts
|
|
918
|
-
* const groq = defineProvider({
|
|
919
|
-
* name: "groq",
|
|
920
|
-
* apiMode: "chat_completions",
|
|
921
|
-
* authType: "api_key",
|
|
922
|
-
* envVars: ["GROQ_API_KEY"],
|
|
923
|
-
* baseUrl: "https://api.groq.com/openai/v1",
|
|
924
|
-
* fallbackModels: ["groq/llama-3.1-8b-instant"],
|
|
925
|
-
* });
|
|
926
|
-
* const agent = await Agent.create({
|
|
927
|
-
* model: { id: "groq/llama-3.1-8b-instant" },
|
|
928
|
-
* plugins: [groq],
|
|
929
|
-
* });
|
|
930
|
-
* ```
|
|
931
|
-
*
|
|
932
|
-
* @public
|
|
933
|
-
*/
|
|
934
|
-
declare function defineProvider(profile: ProviderProfile, opts?: DefineProviderOptions): Plugin;
|
|
880
|
+
/** SE36 — uniform namespace API. `Provider.create` replaces `defineProvider` (ADR 0015). @public */
|
|
881
|
+
declare class Provider {
|
|
882
|
+
private constructor();
|
|
883
|
+
static create(profile: ProviderProfile, opts?: DefineProviderOptions): Plugin;
|
|
884
|
+
}
|
|
935
885
|
|
|
936
886
|
/**
|
|
937
887
|
* SE23 — `defineSkillReadTool`: an OPT-IN factory that gives the MODEL on-demand
|
|
@@ -956,19 +906,11 @@ declare function defineProvider(profile: ProviderProfile, opts?: DefineProviderO
|
|
|
956
906
|
* @public
|
|
957
907
|
*/
|
|
958
908
|
|
|
959
|
-
/**
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
* Malformed input (missing `name`) fails at the trust boundary via the schema.
|
|
965
|
-
*
|
|
966
|
-
* The consumer controls exposure by choosing which skills to pass; the SDK
|
|
967
|
-
* never auto-injects this tool.
|
|
968
|
-
*
|
|
969
|
-
* @public
|
|
970
|
-
*/
|
|
971
|
-
declare function defineSkillReadTool(skills: ReadonlyArray<InlineSkill>): CustomTool;
|
|
909
|
+
/** SE36 — `SkillReadTool.create` replaces `defineSkillReadTool` (ADR 0015). @public */
|
|
910
|
+
declare class SkillReadTool {
|
|
911
|
+
private constructor();
|
|
912
|
+
static create(skills: ReadonlyArray<InlineSkill>): CustomTool;
|
|
913
|
+
}
|
|
972
914
|
|
|
973
915
|
/**
|
|
974
916
|
* Options for {@link sanitizeToolInput}. Trim is the only default-on rung — coercion and JSON
|
|
@@ -1056,7 +998,18 @@ interface DefineToolSpec<T extends ZodType, O extends ZodType = never> {
|
|
|
1056
998
|
*/
|
|
1057
999
|
sanitize?: boolean | SanitizeOptions;
|
|
1058
1000
|
}
|
|
1059
|
-
|
|
1001
|
+
/**
|
|
1002
|
+
* SE36 — the uniform `X.create()` namespace API. `Tool.create(spec)` is the sole public
|
|
1003
|
+
* constructor for a {@link CustomTool}; it wraps the internal builder so behavior is identical
|
|
1004
|
+
* (ADR 0015). A `private constructor` makes `Tool` a namespace, not an instantiable value —
|
|
1005
|
+
* `new Tool()` is a compile error. Mirrors `Agent.create` / `Cron.create`.
|
|
1006
|
+
*
|
|
1007
|
+
* @public
|
|
1008
|
+
*/
|
|
1009
|
+
declare class Tool {
|
|
1010
|
+
private constructor();
|
|
1011
|
+
static create<T extends ZodType, O extends ZodType = never>(spec: DefineToolSpec<T, O>): CustomTool;
|
|
1012
|
+
}
|
|
1060
1013
|
|
|
1061
1014
|
/**
|
|
1062
1015
|
* `EventBus` — typed EventEmitter wrapper.
|
|
@@ -1274,13 +1227,11 @@ declare function buildReplayHistory(base: readonly StoredMessage[], events: read
|
|
|
1274
1227
|
* @public — surface-level reference impl.
|
|
1275
1228
|
*/
|
|
1276
1229
|
|
|
1277
|
-
/**
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
*/
|
|
1283
|
-
declare function createNoopMemoryProvider(): MemoryProvider;
|
|
1230
|
+
/** SE36 — `NoopMemoryProvider.create` replaces `createNoopMemoryProvider` (ADR 0015). @public */
|
|
1231
|
+
declare class NoopMemoryProvider {
|
|
1232
|
+
private constructor();
|
|
1233
|
+
static create(): MemoryProvider;
|
|
1234
|
+
}
|
|
1284
1235
|
|
|
1285
1236
|
/**
|
|
1286
1237
|
* `JobQueue` — background job queue with status tracking, cancellation, and an
|
|
@@ -1669,12 +1620,11 @@ interface PermissionPluginOptions {
|
|
|
1669
1620
|
*/
|
|
1670
1621
|
readonly onAsk?: (toolName: string) => PreToolCallDecision | undefined;
|
|
1671
1622
|
}
|
|
1672
|
-
/**
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
declare function createPermissionPlugin(engine: PermissionEngine, opts?: PermissionPluginOptions): Plugin;
|
|
1623
|
+
/** SE36 — `PermissionPlugin.create` replaces `createPermissionPlugin` (ADR 0015). @public */
|
|
1624
|
+
declare class PermissionPlugin {
|
|
1625
|
+
private constructor();
|
|
1626
|
+
static create(engine: PermissionEngine, opts?: PermissionPluginOptions): Plugin;
|
|
1627
|
+
}
|
|
1678
1628
|
|
|
1679
1629
|
/** The internal JSON-Schema shape the synthetic `output` tool consumes. */
|
|
1680
1630
|
type NormalizedJsonSchema = Record<string, unknown>;
|
|
@@ -1870,12 +1820,11 @@ interface SessionManager {
|
|
|
1870
1820
|
* @public
|
|
1871
1821
|
*/
|
|
1872
1822
|
|
|
1873
|
-
/**
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
declare function createSessionManager(storage: ConversationStorageAdapter): SessionManager;
|
|
1823
|
+
/** SE36 — `Session.create` replaces `createSessionManager` (ADR 0015). @public */
|
|
1824
|
+
declare class Session {
|
|
1825
|
+
private constructor();
|
|
1826
|
+
static create(storage: ConversationStorageAdapter): SessionManager;
|
|
1827
|
+
}
|
|
1879
1828
|
|
|
1880
1829
|
/**
|
|
1881
1830
|
* M3 #62 — scoped session state.
|
|
@@ -1956,14 +1905,11 @@ interface Squad {
|
|
|
1956
1905
|
/** Run the team over `input`, threading each agent's output to the next. */
|
|
1957
1906
|
run(input: unknown): Promise<SquadRun>;
|
|
1958
1907
|
}
|
|
1959
|
-
/**
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
* @public
|
|
1965
|
-
*/
|
|
1966
|
-
declare function createSquad(options: SquadOptions): Squad;
|
|
1908
|
+
/** SE36 — `Squad.create` replaces `createSquad` (ADR 0015). Merges with the `Squad` interface. @public */
|
|
1909
|
+
declare class Squad {
|
|
1910
|
+
private constructor();
|
|
1911
|
+
static create(options: SquadOptions): Squad;
|
|
1912
|
+
}
|
|
1967
1913
|
|
|
1968
1914
|
/**
|
|
1969
1915
|
* Public type contract for the Task observability registry (ADRs D361-D374).
|
|
@@ -2460,4 +2406,4 @@ declare function toShareGptTrajectory(result: BatchResult, options?: {
|
|
|
2460
2406
|
model?: string;
|
|
2461
2407
|
}): ShareGptTrajectory | null;
|
|
2462
2408
|
|
|
2463
|
-
export { Agent, AgentBuilder, AgentDefinition,
|
|
2409
|
+
export { Agent, AgentBuilder, AgentDefinition, 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, type MigrateOptions, type MigrateResult, type ModelListItem, type ModelParameterDefinition, ModelSelection, type ModelVariant, NoopMemoryProvider, type NormalizedJsonSchema, ObjectiveRecord, type PermissionAction, PermissionEngine, type PermissionEngineOptions, type PermissionGate, type PermissionGateContext, type PermissionGateDecision, type PermissionMode, PermissionPlugin, type PermissionPluginOptions, type PermissionRule, Plugin, PluginsSettings, PreToolCallDecision, Processor, Provider, ProviderProfile, ProviderRoutingSettings, type ReplayHistoryOptions, Run, RunResult, SDKAgent, SDKAgentInfo, SDKMessage, type SDKModel, SDKProvider, type SDKRepository, type SDKUser, Security, Session, type SessionCapabilityResult, type SessionListOptions, type SessionManager, SessionMeta, SessionMetaPatch, type SessionScope, type SessionSummary, type ShareGptMessage, type ShareGptTrajectory, SkillReadTool, SkillsSettings, 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, TokenLimiter, type TokenLimiterOptions, Tool, ToolError, ToolResultContentBlock, UnicodeNormalizer, type UnicodeNormalizerOptions, UsageAccumulator, applyMode, buildReplayHistory, chargeAndCheckThresholds, computeCost, createCounterBudgetTracker, estimateTokens, extractRawId, getPricingEntry, inferApiMode, isValidTaskId, migrateSqliteToLance, mkMemoryId, normalizeSchema, normalizeUsage, preflightCheck, scopedConversationId, sessionScopePrefix, toShareGptTrajectory, withCwdMutex };
|