@theokit/agents 0.29.0 → 0.30.1
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/LICENSE +201 -0
- package/dist/{bridge-entry-BlS01zM3.d.ts → bridge-entry-DVhOQc_f.d.ts} +71 -7
- package/dist/bridge.d.ts +2 -2
- package/dist/bridge.js +2 -2
- package/dist/{chunk-GVPUUKKE.js → chunk-FI6ZG2YP.js} +43 -1
- package/dist/chunk-FI6ZG2YP.js.map +1 -0
- package/dist/{chunk-SKTJS4QQ.js → chunk-K4MCMREI.js} +2 -44
- package/dist/chunk-K4MCMREI.js.map +1 -0
- package/dist/{chunk-4AN6LDJS.js → chunk-XCQNYAVU.js} +238 -23
- package/dist/chunk-XCQNYAVU.js.map +1 -0
- package/dist/decorators.d.ts +3 -43
- package/dist/decorators.js +6 -6
- package/dist/index.d.ts +5 -5
- package/dist/index.js +7 -7
- package/dist/{skills-FcUdNDbn.d.ts → skills-Dx_KJ6Eg.d.ts} +41 -1
- package/package.json +9 -9
- package/dist/chunk-4AN6LDJS.js.map +0 -1
- package/dist/chunk-GVPUUKKE.js.map +0 -1
- package/dist/chunk-SKTJS4QQ.js.map +0 -1
package/dist/decorators.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AgentOptions,
|
|
2
|
-
export { C as
|
|
1
|
+
import { A as AgentOptions, n as MainLoopOptions, m as MainLoopMeta, D as ToolOptions, E as ToolboxOptions, B as BudgetOptions, u as PolicyHandler, a as ApprovalOptions } from './skills-Dx_KJ6Eg.js';
|
|
2
|
+
export { C as Checkpoint, b as CheckpointOptions, c as CheckpointState, d as CheckpointStorage, e as CheckpointStrategy, f as Compaction, g as CompactionDecoratorConfig, h as ContextCompactionStrategy, i as ContextWindow, j as ContextWindowOptions, G as Gateway, k as GatewayOptions, H as HumanInTheLoop, l as HumanInTheLoopOptions, I as IndexStrategy, M as MCP, o as McpServerConfig, p as McpServersMap, q as Memory, r as MemoryOptions, s as MemoryProvider, t as MemoryScope, P as PlatformName, v as ProjectContext, w as ProjectContextOptions, x as RelevanceStrategy, S as SessionStrategy, y as Skills, z as SkillsOptions, T as TimeoutAction, F as getCheckpointConfig, J as getCompactionConfig, K as getContextWindowConfig, L as getGatewayConfig, N as getHumanInTheLoopConfig, O as getMcpConfig, Q as getMemoryConfig, U as getProjectContextConfig, V as getSkillsConfig, W as resolveSessionId } from './skills-Dx_KJ6Eg.js';
|
|
3
3
|
import '@theokit/sdk';
|
|
4
4
|
import 'zod';
|
|
5
5
|
|
|
@@ -58,20 +58,6 @@ interface ConversationOptions {
|
|
|
58
58
|
declare function Conversation(options?: ConversationOptions): ClassDecorator;
|
|
59
59
|
declare function getConversationConfig(target: Function): ConversationOptions | undefined;
|
|
60
60
|
|
|
61
|
-
type TimeoutAction = 'abort' | 'proceed' | 'retry';
|
|
62
|
-
interface HumanInTheLoopOptions {
|
|
63
|
-
/** Question shown to the human approver. */
|
|
64
|
-
question: string;
|
|
65
|
-
/** Timeout in milliseconds before onTimeout fires (default: 300_000 = 5 min). */
|
|
66
|
-
timeout?: number;
|
|
67
|
-
/** Action when timeout expires (default: 'abort'). */
|
|
68
|
-
onTimeout?: TimeoutAction;
|
|
69
|
-
/** Show the tool input to the approver (default: true). */
|
|
70
|
-
showInput?: boolean;
|
|
71
|
-
}
|
|
72
|
-
declare function HumanInTheLoop(options: HumanInTheLoopOptions): MethodDecorator;
|
|
73
|
-
declare function getHumanInTheLoopConfig(target: Function, propertyKey: string | symbol): HumanInTheLoopOptions | undefined;
|
|
74
|
-
|
|
75
61
|
/** Override the LLM model for an agent class or a specific tool method. */
|
|
76
62
|
declare const Model: (value: string) => MethodDecorator & ClassDecorator;
|
|
77
63
|
|
|
@@ -95,32 +81,6 @@ interface ArtifactResult {
|
|
|
95
81
|
declare function Artifact(options: ArtifactOptions): MethodDecorator;
|
|
96
82
|
declare function getArtifactConfig(target: Function, propertyKey: string | symbol): ArtifactOptions | undefined;
|
|
97
83
|
|
|
98
|
-
type CheckpointStrategy = 'after-tool-call' | 'after-iteration' | 'manual';
|
|
99
|
-
type CheckpointStorage = 'memory' | 'filesystem' | 'drizzle' | 'redis';
|
|
100
|
-
interface CheckpointOptions {
|
|
101
|
-
/** Where to persist checkpoints. */
|
|
102
|
-
storage?: CheckpointStorage;
|
|
103
|
-
/** When to auto-checkpoint (default: 'after-tool-call'). */
|
|
104
|
-
strategy?: CheckpointStrategy;
|
|
105
|
-
/** Maximum checkpoints to retain per run (rolling window). */
|
|
106
|
-
maxCheckpoints?: number;
|
|
107
|
-
/** Time-to-live in ms before checkpoints expire (default: 3_600_000 = 1h). */
|
|
108
|
-
ttl?: number;
|
|
109
|
-
}
|
|
110
|
-
/** Serializable checkpoint state. */
|
|
111
|
-
interface CheckpointState {
|
|
112
|
-
id: string;
|
|
113
|
-
runId: string;
|
|
114
|
-
agentName: string;
|
|
115
|
-
step: number;
|
|
116
|
-
messages: unknown[];
|
|
117
|
-
toolResults: unknown[];
|
|
118
|
-
createdAt: number;
|
|
119
|
-
resumeToken: string;
|
|
120
|
-
}
|
|
121
|
-
declare function Checkpoint(options?: CheckpointOptions): ClassDecorator;
|
|
122
|
-
declare function getCheckpointConfig(target: Function): CheckpointOptions | undefined;
|
|
123
|
-
|
|
124
84
|
interface ObservableEntry {
|
|
125
85
|
channel: string;
|
|
126
86
|
propertyKey: string | symbol;
|
|
@@ -211,4 +171,4 @@ declare function applyDecorators(...decorators: AnyDecorator[]): ClassDecorator
|
|
|
211
171
|
declare function Mixin(...mixinClasses: Function[]): ClassDecorator;
|
|
212
172
|
declare function getMixins(target: Function): Function[];
|
|
213
173
|
|
|
214
|
-
export { Agent, AgentOptions, ApprovalOptions, Artifact, type ArtifactOptions, type ArtifactResult, Audit, Budget, BudgetOptions,
|
|
174
|
+
export { Agent, AgentOptions, ApprovalOptions, Artifact, type ArtifactOptions, type ArtifactResult, Audit, Budget, BudgetOptions, type CommandPermissions, type CompactionStrategy, Conversation, type ConversationOptions, type ConversationStorage, EditFormat, type EditFormatType, type FilesystemPermissions, Hook, type HookEntry, type HookPoint, MainLoop, MainLoopMeta, MainLoopOptions, Mixin, Model, Observable, type ObservableEntry, Policy, PolicyHandler, RequiresApproval, RequiresCapability, Sandbox, type SandboxOptions, SubAgents, Tool, ToolOptions, Toolbox, ToolboxOptions, Trace, applyDecorators, getAgentConfig, getArtifactConfig, getConversationConfig, getHooks, getHooksByPoint, getMainLoop, getMixins, getObservableByChannel, getObservables, getSandboxConfig, getSubAgents, getToolConfig, getToolMethods, getToolboxConfig, isCommandAllowed, isPathAllowed };
|
package/dist/decorators.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Artifact,
|
|
3
|
-
Checkpoint,
|
|
4
3
|
Conversation,
|
|
5
4
|
EditFormat,
|
|
6
5
|
Hook,
|
|
7
|
-
HumanInTheLoop,
|
|
8
6
|
MainLoop,
|
|
9
7
|
Model,
|
|
10
8
|
Observable,
|
|
@@ -13,11 +11,9 @@ import {
|
|
|
13
11
|
Toolbox,
|
|
14
12
|
applyDecorators,
|
|
15
13
|
getArtifactConfig,
|
|
16
|
-
getCheckpointConfig,
|
|
17
14
|
getConversationConfig,
|
|
18
15
|
getHooks,
|
|
19
16
|
getHooksByPoint,
|
|
20
|
-
getHumanInTheLoopConfig,
|
|
21
17
|
getMainLoop,
|
|
22
18
|
getObservableByChannel,
|
|
23
19
|
getObservables,
|
|
@@ -27,14 +23,16 @@ import {
|
|
|
27
23
|
getToolboxConfig,
|
|
28
24
|
isCommandAllowed,
|
|
29
25
|
isPathAllowed
|
|
30
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-K4MCMREI.js";
|
|
31
27
|
import {
|
|
32
28
|
Agent,
|
|
33
29
|
Audit,
|
|
34
30
|
Budget,
|
|
31
|
+
Checkpoint,
|
|
35
32
|
Compaction,
|
|
36
33
|
ContextWindow,
|
|
37
34
|
Gateway,
|
|
35
|
+
HumanInTheLoop,
|
|
38
36
|
MCP,
|
|
39
37
|
Memory,
|
|
40
38
|
Mixin,
|
|
@@ -46,9 +44,11 @@ import {
|
|
|
46
44
|
SubAgents,
|
|
47
45
|
Trace,
|
|
48
46
|
getAgentConfig,
|
|
47
|
+
getCheckpointConfig,
|
|
49
48
|
getCompactionConfig,
|
|
50
49
|
getContextWindowConfig,
|
|
51
50
|
getGatewayConfig,
|
|
51
|
+
getHumanInTheLoopConfig,
|
|
52
52
|
getMcpConfig,
|
|
53
53
|
getMemoryConfig,
|
|
54
54
|
getMixins,
|
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
getSkillsConfig,
|
|
57
57
|
getSubAgents,
|
|
58
58
|
resolveSessionId
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-FI6ZG2YP.js";
|
|
60
60
|
import "./chunk-7QVYU63E.js";
|
|
61
61
|
export {
|
|
62
62
|
Agent,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { Agent, Artifact, ArtifactOptions, ArtifactResult, Audit, Budget,
|
|
2
|
-
import { R as ReasoningEffort } from './skills-
|
|
3
|
-
export { A as AgentOptions, a as ApprovalOptions, B as BudgetOptions, C as
|
|
4
|
-
import { S as StreamEvent, L as LoopStrategy, R as ReflectionStrategy, C as CompiledAgentOptions, a as CompiledTool, D as DelegationResult } from './bridge-entry-
|
|
5
|
-
export { A as AGENT_BRAND, b as AgentDefinition, c as AgentDefinitionError, d as AgentExecutionContext, e as AgentManifest, f as AgentManifestEntry, g as AgentManifestTool, h as AgentRoute, i as AgentRouteContext, j as AgentRunInfo, k as AgentStreamEvent, l as AgentWalkResult, m as AgentWarningCode, n as AgentsPluginOptions, o as ApprovalRequiredEvent, p as ArtifactChunkEvent, q as ArtifactStartEvent, B as BudgetExceededError, r as CheckpointSavedEvent, s as CompiledContextWindow, t as DEFAULT_MAX_ITERATIONS, u as DefineAgentConfig, v as DelegateOptions, w as DelegationError, x as DoneEvent, E as ErrorEvent, F as FileEditEvent, I as InferAgentInput, y as IterationEvent, z as LoopFinishReason, G as LoopOutcome, H as LoopStrategyConfig, P as PartialToolCallEvent, J as ReflectionContext, K as ReflectionResult, M as ReflectionStrategyConfig, N as RunStartedEvent, O as SdkMessage, Q as Segment, T as StateUpdateEvent, U as TextDeltaEvent, V as ThinkingEvent, W as ToolCallEvent, X as ToolResultEvent, Y as ToolWalkResult, Z as ToolboxWalkResult, _ as agentsPlugin, $ as buildModelSelection, a0 as compileAgent, a1 as compileAgentDefinition, a2 as compileAgentModule, a3 as compileContextWindow, a4 as compileProjectContext, a5 as compileSkills, a6 as compileTools, a7 as createAgentExecutionContext, a8 as createSdkAgentStream, a9 as createThinkTagExtractor, aa as defineAgent, ab as delegate, ac as extractThinkTagStream, ad as generateAgentManifest, ae as generateAgentRoutes, af as isAgentContext, ag as isAgentDefinition, ah as isApprovalRequired, ai as isDone, aj as isError, ak as isPartialToolCall, al as isTextDelta, am as isToolCall, an as isToolResult, ao as ladderReflectionStrategy, ap as loopStrategyConfigSchema, aq as noopReflectionStrategy, ar as projectContextMetadataOnlyKnobs, as as reflectionStrategyConfigSchema, at as resolveLoopStrategy, au as streamAgentResponse, av as streamAgentUIMessages, aw as translateSdkEvent, ax as translateToUIMessageStream, ay as validateUniqueRoutes, az as walkAgentMetadata } from './bridge-entry-
|
|
1
|
+
export { Agent, Artifact, ArtifactOptions, ArtifactResult, Audit, Budget, CommandPermissions, CompactionStrategy, Conversation, ConversationOptions, ConversationStorage, EditFormat, EditFormatType, FilesystemPermissions, Hook, HookEntry, HookPoint, MainLoop, Mixin, Model, Observable, ObservableEntry, Policy, RequiresApproval, RequiresCapability, Sandbox, SandboxOptions, SubAgents, Tool, Toolbox, Trace, applyDecorators, getAgentConfig, getArtifactConfig, getConversationConfig, getHooks, getHooksByPoint, getMainLoop, getMixins, getObservableByChannel, getObservables, getSandboxConfig, getSubAgents, getToolConfig, getToolMethods, getToolboxConfig, isCommandAllowed, isPathAllowed } from './decorators.js';
|
|
2
|
+
import { R as ReasoningEffort } from './skills-Dx_KJ6Eg.js';
|
|
3
|
+
export { A as AgentOptions, a as ApprovalOptions, B as BudgetOptions, C as Checkpoint, b as CheckpointOptions, c as CheckpointState, d as CheckpointStorage, e as CheckpointStrategy, f as Compaction, g as CompactionDecoratorConfig, h as ContextCompactionStrategy, i as ContextWindow, j as ContextWindowOptions, G as Gateway, k as GatewayOptions, H as HumanInTheLoop, l as HumanInTheLoopOptions, I as IndexStrategy, M as MCP, m as MainLoopMeta, n as MainLoopOptions, o as McpServerConfig, p as McpServersMap, q as Memory, r as MemoryOptions, s as MemoryProvider, t as MemoryScope, P as PlatformName, u as PolicyHandler, v as ProjectContext, w as ProjectContextOptions, x as RelevanceStrategy, S as SessionStrategy, y as Skills, z as SkillsOptions, T as TimeoutAction, D as ToolOptions, E as ToolboxOptions, F as getCheckpointConfig, J as getCompactionConfig, K as getContextWindowConfig, L as getGatewayConfig, N as getHumanInTheLoopConfig, O as getMcpConfig, Q as getMemoryConfig, U as getProjectContextConfig, V as getSkillsConfig, W as resolveSessionId } from './skills-Dx_KJ6Eg.js';
|
|
4
|
+
import { S as StreamEvent, L as LoopStrategy, R as ReflectionStrategy, C as CompiledAgentOptions, a as CompiledTool, D as DelegationResult } from './bridge-entry-DVhOQc_f.js';
|
|
5
|
+
export { A as AGENT_BRAND, b as AgentDefinition, c as AgentDefinitionError, d as AgentExecutionContext, e as AgentManifest, f as AgentManifestEntry, g as AgentManifestTool, h as AgentRoute, i as AgentRouteContext, j as AgentRunInfo, k as AgentStreamEvent, l as AgentWalkResult, m as AgentWarningCode, n as AgentsPluginOptions, o as ApprovalRequiredEvent, p as ArtifactChunkEvent, q as ArtifactStartEvent, B as BudgetExceededError, r as CheckpointSavedEvent, s as CompiledContextWindow, t as DEFAULT_MAX_ITERATIONS, u as DefineAgentConfig, v as DelegateOptions, w as DelegationError, x as DoneEvent, E as ErrorEvent, F as FileEditEvent, I as InferAgentInput, y as IterationEvent, z as LoopFinishReason, G as LoopOutcome, H as LoopStrategyConfig, P as PartialToolCallEvent, J as ReflectionContext, K as ReflectionResult, M as ReflectionStrategyConfig, N as RunStartedEvent, O as SdkMessage, Q as Segment, T as StateUpdateEvent, U as TextDeltaEvent, V as ThinkingEvent, W as ToolCallEvent, X as ToolResultEvent, Y as ToolWalkResult, Z as ToolboxWalkResult, _ as agentsPlugin, $ as buildModelSelection, a0 as compileAgent, a1 as compileAgentDefinition, a2 as compileAgentModule, a3 as compileContextWindow, a4 as compileProjectContext, a5 as compileSkills, a6 as compileTools, a7 as createAgentExecutionContext, a8 as createSdkAgentStream, a9 as createThinkTagExtractor, aa as defineAgent, ab as delegate, ac as extractThinkTagStream, ad as generateAgentManifest, ae as generateAgentRoutes, af as isAgentContext, ag as isAgentDefinition, ah as isApprovalRequired, ai as isDone, aj as isError, ak as isPartialToolCall, al as isTextDelta, am as isToolCall, an as isToolResult, ao as ladderReflectionStrategy, ap as loopStrategyConfigSchema, aq as noopReflectionStrategy, ar as projectContextMetadataOnlyKnobs, as as reflectionStrategyConfigSchema, at as resolveLoopStrategy, au as streamAgentResponse, av as streamAgentUIMessages, aw as translateSdkEvent, ax as translateToUIMessageStream, ay as validateUniqueRoutes, az as walkAgentMetadata } from './bridge-entry-DVhOQc_f.js';
|
|
6
6
|
import { PluginsSettings, Plugin, ProviderRoutingSettings, AgentDefinition, BudgetTracker, ConversationStorageAdapter, CustomTool } from '@theokit/sdk';
|
|
7
7
|
import { RetryOptions } from '@theokit/sdk/retry';
|
|
8
8
|
import { CompressibleMessage } from '@theokit/sdk/compaction';
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Artifact,
|
|
3
|
-
Checkpoint,
|
|
4
3
|
Conversation,
|
|
5
4
|
EditFormat,
|
|
6
5
|
Hook,
|
|
7
|
-
HumanInTheLoop,
|
|
8
6
|
MainLoop,
|
|
9
7
|
Model,
|
|
10
8
|
Observable,
|
|
@@ -13,11 +11,9 @@ import {
|
|
|
13
11
|
Toolbox,
|
|
14
12
|
applyDecorators,
|
|
15
13
|
getArtifactConfig,
|
|
16
|
-
getCheckpointConfig,
|
|
17
14
|
getConversationConfig,
|
|
18
15
|
getHooks,
|
|
19
16
|
getHooksByPoint,
|
|
20
|
-
getHumanInTheLoopConfig,
|
|
21
17
|
getMainLoop,
|
|
22
18
|
getObservableByChannel,
|
|
23
19
|
getObservables,
|
|
@@ -27,7 +23,7 @@ import {
|
|
|
27
23
|
getToolboxConfig,
|
|
28
24
|
isCommandAllowed,
|
|
29
25
|
isPathAllowed
|
|
30
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-K4MCMREI.js";
|
|
31
27
|
import {
|
|
32
28
|
AGENT_BRAND,
|
|
33
29
|
AgentDefinitionError,
|
|
@@ -79,14 +75,16 @@ import {
|
|
|
79
75
|
translateToUIMessageStream,
|
|
80
76
|
validateUniqueRoutes,
|
|
81
77
|
walkAgentMetadata
|
|
82
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-XCQNYAVU.js";
|
|
83
79
|
import {
|
|
84
80
|
Agent,
|
|
85
81
|
Audit,
|
|
86
82
|
Budget,
|
|
83
|
+
Checkpoint,
|
|
87
84
|
Compaction,
|
|
88
85
|
ContextWindow,
|
|
89
86
|
Gateway,
|
|
87
|
+
HumanInTheLoop,
|
|
90
88
|
MCP,
|
|
91
89
|
Memory,
|
|
92
90
|
Mixin,
|
|
@@ -98,9 +96,11 @@ import {
|
|
|
98
96
|
SubAgents,
|
|
99
97
|
Trace,
|
|
100
98
|
getAgentConfig,
|
|
99
|
+
getCheckpointConfig,
|
|
101
100
|
getCompactionConfig,
|
|
102
101
|
getContextWindowConfig,
|
|
103
102
|
getGatewayConfig,
|
|
103
|
+
getHumanInTheLoopConfig,
|
|
104
104
|
getMcpConfig,
|
|
105
105
|
getMemoryConfig,
|
|
106
106
|
getMixins,
|
|
@@ -108,7 +108,7 @@ import {
|
|
|
108
108
|
getSkillsConfig,
|
|
109
109
|
getSubAgents,
|
|
110
110
|
resolveSessionId
|
|
111
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-FI6ZG2YP.js";
|
|
112
112
|
import "./chunk-7QVYU63E.js";
|
|
113
113
|
export {
|
|
114
114
|
AGENT_BRAND,
|
|
@@ -104,6 +104,32 @@ type PolicyHandler = (user: {
|
|
|
104
104
|
roles: string[];
|
|
105
105
|
}) => boolean;
|
|
106
106
|
|
|
107
|
+
type CheckpointStrategy = 'after-tool-call' | 'after-iteration' | 'manual';
|
|
108
|
+
type CheckpointStorage = 'memory' | 'filesystem' | 'drizzle' | 'redis';
|
|
109
|
+
interface CheckpointOptions {
|
|
110
|
+
/** Where to persist checkpoints. */
|
|
111
|
+
storage?: CheckpointStorage;
|
|
112
|
+
/** When to auto-checkpoint (default: 'after-tool-call'). */
|
|
113
|
+
strategy?: CheckpointStrategy;
|
|
114
|
+
/** Maximum checkpoints to retain per run (rolling window). */
|
|
115
|
+
maxCheckpoints?: number;
|
|
116
|
+
/** Time-to-live in ms before checkpoints expire (default: 3_600_000 = 1h). */
|
|
117
|
+
ttl?: number;
|
|
118
|
+
}
|
|
119
|
+
/** Serializable checkpoint state. */
|
|
120
|
+
interface CheckpointState {
|
|
121
|
+
id: string;
|
|
122
|
+
runId: string;
|
|
123
|
+
agentName: string;
|
|
124
|
+
step: number;
|
|
125
|
+
messages: unknown[];
|
|
126
|
+
toolResults: unknown[];
|
|
127
|
+
createdAt: number;
|
|
128
|
+
resumeToken: string;
|
|
129
|
+
}
|
|
130
|
+
declare function Checkpoint(options?: CheckpointOptions): ClassDecorator;
|
|
131
|
+
declare function getCheckpointConfig(target: Function): CheckpointOptions | undefined;
|
|
132
|
+
|
|
107
133
|
/** Stored `@Compaction` declaration (resolved + validated at `AgentRunner.build()`). */
|
|
108
134
|
interface CompactionDecoratorConfig {
|
|
109
135
|
/** Strategy name (e.g. `'token-budget'`). Validated at resolve time. */
|
|
@@ -158,6 +184,20 @@ declare function resolveSessionId(strategy: SessionStrategy, platform: string, s
|
|
|
158
184
|
topicId?: string;
|
|
159
185
|
}): string;
|
|
160
186
|
|
|
187
|
+
type TimeoutAction = 'abort' | 'proceed' | 'retry';
|
|
188
|
+
interface HumanInTheLoopOptions {
|
|
189
|
+
/** Question shown to the human approver. */
|
|
190
|
+
question: string;
|
|
191
|
+
/** Timeout in milliseconds before onTimeout fires (default: 300_000 = 5 min). */
|
|
192
|
+
timeout?: number;
|
|
193
|
+
/** Action when timeout expires (default: 'abort'). */
|
|
194
|
+
onTimeout?: TimeoutAction;
|
|
195
|
+
/** Show the tool input to the approver (default: true). */
|
|
196
|
+
showInput?: boolean;
|
|
197
|
+
}
|
|
198
|
+
declare function HumanInTheLoop(options: HumanInTheLoopOptions): MethodDecorator;
|
|
199
|
+
declare function getHumanInTheLoopConfig(target: Function, propertyKey: string | symbol): HumanInTheLoopOptions | undefined;
|
|
200
|
+
|
|
161
201
|
interface McpServerConfig {
|
|
162
202
|
/** Command to start the MCP server. */
|
|
163
203
|
command: string;
|
|
@@ -217,4 +257,4 @@ interface SkillsOptions {
|
|
|
217
257
|
declare function Skills(namesOrOptions: string[] | SkillsOptions): ClassDecorator;
|
|
218
258
|
declare function getSkillsConfig(target: Function): SkillsOptions | undefined;
|
|
219
259
|
|
|
220
|
-
export { type AgentOptions as A, type BudgetOptions as B,
|
|
260
|
+
export { type AgentOptions as A, type BudgetOptions as B, Checkpoint as C, type ToolOptions as D, type ToolboxOptions as E, getCheckpointConfig as F, Gateway as G, HumanInTheLoop as H, type IndexStrategy as I, getCompactionConfig as J, getContextWindowConfig as K, getGatewayConfig as L, MCP as M, getHumanInTheLoopConfig as N, getMcpConfig as O, type PlatformName as P, getMemoryConfig as Q, type ReasoningEffort as R, type SessionStrategy as S, type TimeoutAction as T, getProjectContextConfig as U, getSkillsConfig as V, resolveSessionId as W, type ApprovalOptions as a, type CheckpointOptions as b, type CheckpointState as c, type CheckpointStorage as d, type CheckpointStrategy as e, Compaction as f, type CompactionDecoratorConfig as g, type ContextCompactionStrategy as h, ContextWindow as i, type ContextWindowOptions as j, type GatewayOptions as k, type HumanInTheLoopOptions as l, type MainLoopMeta as m, type MainLoopOptions as n, type McpServerConfig as o, type McpServersMap as p, Memory as q, type MemoryOptions as r, type MemoryProvider as s, type MemoryScope as t, type PolicyHandler as u, ProjectContext as v, type ProjectContextOptions as w, type RelevanceStrategy as x, Skills as y, type SkillsOptions as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theokit/agents",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.30.1",
|
|
4
4
|
"description": "Unified decorator runtime — AI agents as first-class citizens of the TheoKit pipeline. @Agent() compiles to SDK Agent.create(), @Tool() compiles to defineTool().",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -29,11 +29,6 @@
|
|
|
29
29
|
"README.md",
|
|
30
30
|
"LICENSE"
|
|
31
31
|
],
|
|
32
|
-
"scripts": {
|
|
33
|
-
"build": "tsup",
|
|
34
|
-
"test": "vitest run",
|
|
35
|
-
"test:watch": "vitest"
|
|
36
|
-
},
|
|
37
32
|
"peerDependencies": {
|
|
38
33
|
"@theokit/http": ">=0.1.0-alpha.0",
|
|
39
34
|
"@theokit/sdk": ">=2.13.0",
|
|
@@ -51,7 +46,6 @@
|
|
|
51
46
|
}
|
|
52
47
|
},
|
|
53
48
|
"devDependencies": {
|
|
54
|
-
"@theokit/http": "workspace:*",
|
|
55
49
|
"@theokit/sdk": "^2.13.0",
|
|
56
50
|
"@theokit/sdk-tools": "^0.2.0",
|
|
57
51
|
"ai": "^7.0.14",
|
|
@@ -59,9 +53,15 @@
|
|
|
59
53
|
"tsup": "^8.5.1",
|
|
60
54
|
"typescript": "^5.9.3",
|
|
61
55
|
"vitest": "^3.2.6",
|
|
62
|
-
"zod": "^4.4.3"
|
|
56
|
+
"zod": "^4.4.3",
|
|
57
|
+
"@theokit/http": "0.5.4"
|
|
63
58
|
},
|
|
64
59
|
"engines": {
|
|
65
60
|
"node": ">=22.12.0"
|
|
61
|
+
},
|
|
62
|
+
"scripts": {
|
|
63
|
+
"build": "tsup",
|
|
64
|
+
"test": "vitest run",
|
|
65
|
+
"test:watch": "vitest"
|
|
66
66
|
}
|
|
67
|
-
}
|
|
67
|
+
}
|