@theokit/agents 0.28.0 → 0.30.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.
@@ -1,9 +1,9 @@
1
1
  import { ExecutionContext } from '@theokit/http';
2
- import { A as AgentOptions, T as ToolOptions, g as MainLoopMeta, a as ApprovalOptions, B as BudgetOptions, f as GatewayOptions, l as MemoryOptions, t as SkillsOptions, e as ContextWindowOptions, q as ProjectContextOptions, j as McpServersMap, b as CompactionDecoratorConfig, R as ReasoningEffort } from './skills-FcUdNDbn.js';
3
- import { SystemPromptResolver, SkillsSettings, ContextSettings, PluginsSettings, Plugin, ProviderRoutingSettings, AgentDefinition, BudgetTracker, ConversationStorageAdapter, CustomTool, ModelSelection } from '@theokit/sdk';
2
+ import { A as AgentOptions, D as ToolOptions, m as MainLoopMeta, a as ApprovalOptions, B as BudgetOptions, l as HumanInTheLoopOptions, k as GatewayOptions, r as MemoryOptions, z as SkillsOptions, j as ContextWindowOptions, w as ProjectContextOptions, p as McpServersMap, g as CompactionDecoratorConfig, b as CheckpointOptions, R as ReasoningEffort } from './skills-Dx_KJ6Eg.js';
3
+ import { SystemPromptResolver, SkillsSettings, ContextSettings, PluginsSettings, Plugin, ProviderRoutingSettings, AgentDefinition as AgentDefinition$1, BudgetTracker, ConversationStorageAdapter, CustomTool, ModelSelection } from '@theokit/sdk';
4
4
  import { UIMessageChunk } from 'ai';
5
- import { RetryOptions } from '@theokit/sdk/retry';
6
5
  import { z } from 'zod';
6
+ import { RetryOptions } from '@theokit/sdk/retry';
7
7
 
8
8
  /**
9
9
  * AgentExecutionContext — extends http-decorators' ExecutionContext with agent-specific methods.
@@ -49,6 +49,7 @@ declare const AgentWarningCode: {
49
49
  readonly BUDGET_TOP_LEVEL_METADATA_ONLY: "THEO_AGENT_BUDGET_TOP_LEVEL_METADATA_ONLY";
50
50
  readonly CONTEXT_STRATEGY_METADATA_ONLY: "THEO_AGENT_CONTEXT_STRATEGY_METADATA_ONLY";
51
51
  readonly PROJECT_CONTEXT_KNOB_METADATA_ONLY: "THEO_AGENT_PROJECT_CONTEXT_KNOB_METADATA_ONLY";
52
+ readonly CHECKPOINT_STORAGE_METADATA_ONLY: "THEO_AGENT_CHECKPOINT_STORAGE_METADATA_ONLY";
52
53
  };
53
54
  interface AgentWalkResult {
54
55
  agentConfig: AgentOptions;
@@ -66,6 +67,8 @@ interface AgentWalkResult {
66
67
  projectContext?: ProjectContextOptions;
67
68
  mcpServers?: McpServersMap;
68
69
  compaction?: CompactionDecoratorConfig;
70
+ /** `@Checkpoint` config (M4) when the agent declares resumable execution; absent ⇒ no checkpoint. */
71
+ checkpoint?: CheckpointOptions;
69
72
  }
70
73
  interface ToolboxWalkResult {
71
74
  class: Function;
@@ -82,6 +85,8 @@ interface ToolWalkResult {
82
85
  budget?: BudgetOptions;
83
86
  trace: boolean;
84
87
  audit: boolean;
88
+ /** `@HumanInTheLoop` config when the tool method is gated (M4); absent ⇒ not gated. */
89
+ hitl?: HumanInTheLoopOptions;
85
90
  }
86
91
  /**
87
92
  * Walk all metadata on an agent class and its toolboxes.
@@ -156,6 +161,16 @@ interface CompiledAgentOptions {
156
161
  maxIterations?: number;
157
162
  timeoutMs?: number;
158
163
  stream: boolean;
164
+ /**
165
+ * HITL gate map (M4): runtime tool name → `@HumanInTheLoop` config. Absent/empty ⇒ no gated
166
+ * tools. The harness (`mountAgent`) turns this into the `pre_tool_call` pause wiring.
167
+ */
168
+ hitl?: Map<string, HumanInTheLoopOptions>;
169
+ /**
170
+ * `@Checkpoint` config (M4): when present the harness emits `checkpoint_saved` and selects the
171
+ * durable SDK conversation storage (`storage: 'filesystem'`) so a same-`sessionId` request resumes.
172
+ */
173
+ checkpoint?: CheckpointOptions;
159
174
  }
160
175
  /**
161
176
  * Compile @Agent metadata into SDK-compatible options.
@@ -469,7 +484,7 @@ interface RuntimeOverrides {
469
484
  /** Per-run provider routing. */
470
485
  providers?: ProviderRoutingSettings;
471
486
  /** Per-run sub-agent definitions (opts-only; `compiled.agents` stays deferred — ADR D3). */
472
- agents?: Record<string, AgentDefinition>;
487
+ agents?: Record<string, AgentDefinition$1>;
473
488
  /** Per-run SDK budget tracker (inner tool-loop cap; distinct from the loop's USD `budget`). */
474
489
  budgetTracker?: BudgetTracker;
475
490
  /**
@@ -582,6 +597,140 @@ declare function translateToUIMessageStream(events: AsyncIterable<AgentStreamEve
582
597
  textId: string;
583
598
  }): AsyncGenerator<UIMessageChunk, void, unknown>;
584
599
 
600
+ /**
601
+ * M2 (theokit-ai-first) — `defineAgent`, the zero-config imperative agent surface.
602
+ *
603
+ * ADR-B1: `defineAgent({...})` (default-exported from a top-level `agents/<name>.ts`) is
604
+ * the canonical zero-config surface; the `@Agent` class decorator stays the advanced/DI
605
+ * surface. Both compile to {@link CompiledAgentOptions} and run through the same SDK
606
+ * runtime (`createSdkAgentStream`) — one runtime, two syntaxes.
607
+ *
608
+ * This module is PURE metadata (sdk-runtime.md / G2): `defineAgent` describes an agent, it
609
+ * NEVER calls an LLM. It imports only `zod` (types) + the compiler shape — no `theokit`
610
+ * core, preserving the agents → (nothing) dependency direction (G1).
611
+ */
612
+
613
+ /**
614
+ * Brand tag for a `defineAgent` value. `Symbol.for` (global registry, not `Symbol()`) so
615
+ * the brand survives duplicate module instances (dual-package / bundling) — the scanner's
616
+ * brand-check then works regardless of which copy created the definition.
617
+ */
618
+ declare const AGENT_BRAND: unique symbol;
619
+ /** Config accepted by {@link defineAgent}. */
620
+ interface DefineAgentConfig<TInput extends z.ZodType = z.ZodType> {
621
+ /** Zod schema for the request body — lifted into the typed client (M2, {@link InferAgentInput}). */
622
+ input?: TInput;
623
+ /** Model id (e.g. `claude-sonnet-4-6`). Falls back to the SDK default when omitted. */
624
+ model?: string;
625
+ /** Static system prompt. */
626
+ system?: string;
627
+ /** Extended-thinking effort (mirrors `@Agent({ reasoningEffort })`). */
628
+ reasoningEffort?: ReasoningEffort;
629
+ /** Pre-built tools (SDK-ready `CompiledTool` shape). */
630
+ tools?: CompiledTool[];
631
+ }
632
+ /** A branded agent definition — the value {@link defineAgent} returns. */
633
+ type AgentDefinition<TInput extends z.ZodType = z.ZodType> = DefineAgentConfig<TInput> & {
634
+ readonly [AGENT_BRAND]: true;
635
+ };
636
+ /** Infer the request type of an agent definition from its `input` Zod schema. */
637
+ type InferAgentInput<T> = T extends AgentDefinition<infer S> ? (S extends z.ZodType ? z.infer<S> : never) : never;
638
+ /**
639
+ * Define a zero-config agent. Identity/normalizer (like `defineRoute`) — returns the config
640
+ * branded so the scanner recognizes it. Compilation is deferred to {@link compileAgentDefinition}.
641
+ */
642
+ declare function defineAgent<TInput extends z.ZodType = z.ZodType>(config: DefineAgentConfig<TInput>): AgentDefinition<TInput>;
643
+ /** Brand-check: is `value` a {@link defineAgent} result? */
644
+ declare function isAgentDefinition(value: unknown): value is AgentDefinition;
645
+ /**
646
+ * Lower a definition to the SDK-ready {@link CompiledAgentOptions} — the same shape
647
+ * `compileAgent` (decorator path) produces, so both surfaces converge on one runtime.
648
+ */
649
+ declare function compileAgentDefinition(def: AgentDefinition): CompiledAgentOptions;
650
+
651
+ /**
652
+ * M4 (theokit-ai-first) — the HITL producer: a `pre_tool_call` plugin that pauses the SDK run
653
+ * for a human-in-the-loop tool approval.
654
+ *
655
+ * ADR 0038: this is the ADAPTER seam — it makes the shipped-but-dead `@HumanInTheLoop` decorator
656
+ * FUNCTIONAL by wiring the SDK's OWN async `pre_tool_call` veto hook (which the SDK loop `await`s,
657
+ * so returning a pending Promise genuinely PAUSES the run) to a human approval. It calls no LLM,
658
+ * dispatches no tool, and runs no second loop — the SDK owns all of that.
659
+ *
660
+ * Flow: gated tool about to run → emit an `ApprovalRequiredEvent` (which the translator maps to
661
+ * the ai-sdk `tool-approval-request` chunk) → `await awaitApproval(approvalId)` (resolved by the
662
+ * out-of-band approve route) → allow (`undefined`) or veto (`{ block, message }`, which the SDK
663
+ * surfaces as a tool result the model self-corrects on).
664
+ */
665
+
666
+ /** Injected wiring — the harness (mount-agent) supplies these; the plugin stays pure. */
667
+ interface HitlWiring {
668
+ /** Tool name → its `@HumanInTheLoop` config. A tool absent here is NOT gated. */
669
+ gated: Map<string, HumanInTheLoopOptions>;
670
+ /** Push the approval-required event into the agent stream (the translator emits the chunk). */
671
+ emit: (event: ApprovalRequiredEvent) => void;
672
+ /** Await the human decision for `approvalId`; resolves true=approve, false=deny (or timeout). */
673
+ awaitApproval: (approvalId: string, opts: HumanInTheLoopOptions) => Promise<boolean>;
674
+ }
675
+
676
+ /**
677
+ * M2 (theokit-ai-first) — the file-convention runtime bridge.
678
+ *
679
+ * Turns a loaded `agents/<name>.ts` module into the M0/M1 canonical `UIMessageStream`:
680
+ *
681
+ * module (defineAgent value | @Agent class) ──compileAgentModule──▶ CompiledAgentOptions
682
+ * CompiledAgentOptions ──createSdkAgentStream──▶ AgentStreamEvent* ──translate──▶ UIMessageChunk*
683
+ *
684
+ * Both agent surfaces converge here (ADR-B1): a `defineAgent` value lowers via
685
+ * `compileAgentDefinition`, an `@Agent`-decorated class lowers via `compileAgent`
686
+ * (which requires the full `@MainLoop` decoration — its existing errors surface for
687
+ * DI-heavy classes). Neither runs an LLM directly — `@theokit/sdk` stays the sole
688
+ * runtime (G2 / sdk-runtime.md); this module only wires its output onto the wire.
689
+ */
690
+
691
+ /** Thrown when an `agents/` file default-exports neither a `defineAgent` value nor an `@Agent` class. */
692
+ declare class AgentDefinitionError extends Error {
693
+ constructor(source: string);
694
+ }
695
+ /**
696
+ * Compile a loaded `agents/` module to SDK-ready options. Accepts a `defineAgent` value
697
+ * (zero-config surface) OR an `@Agent`-decorated class (advanced surface). `source` labels
698
+ * the fail-fast error (typically the file path).
699
+ *
700
+ * For a class agent, its `@Mixin(...)` toolboxes are gathered (the declared tool-association
701
+ * mechanism, same as `app.ts`/`theokit-plugin.ts`) and instantiated with a no-arg `new` — the
702
+ * zero-config file convention has no DI container. This is what makes a `@HumanInTheLoop`-gated
703
+ * tool on a mixin actually gate through the M2 endpoint (M4): its config reaches `compiled.hitl`.
704
+ */
705
+ declare function compileAgentModule(mod: unknown, source?: string): CompiledAgentOptions;
706
+ /** HITL wiring supplied by the harness (mount-agent): the gated-tool map + the approval resolver. */
707
+ interface StreamHitlOptions {
708
+ gated: HitlWiring['gated'];
709
+ awaitApproval: HitlWiring['awaitApproval'];
710
+ }
711
+ interface StreamAgentOptions {
712
+ message: string;
713
+ sessionId: string;
714
+ /** Enable human-in-the-loop tool approval (M4). Absent ⇒ the M2 non-HITL path, byte-unchanged. */
715
+ hitl?: StreamHitlOptions;
716
+ /** Durable conversation storage for resume (M4); defaults to the SDK per-run in-memory store. */
717
+ conversationStorage?: RuntimeOverrides['conversationStorage'];
718
+ /**
719
+ * The request's abort signal (M4). On client disconnect, the HITL merge queue is closed so the
720
+ * detached SDK pump stops buffering (bounded memory) and the client stream terminates at once.
721
+ * The paused SDK run itself is released by the approval timeout, not instantly — a durable-store
722
+ * follow-up. The non-HITL path is pull-based and already tears down on the consumer's return.
723
+ */
724
+ signal?: AbortSignal;
725
+ }
726
+ /**
727
+ * Run a compiled agent and yield the M0/M1 `UIMessageStream` chunks. `apiKey` is resolved by the
728
+ * caller (`resolveProvider`). One `textId` per run (G8: `crypto.randomUUID`). When `hitl` is
729
+ * supplied (M4), a HITL `pre_tool_call` plugin pauses the run for gated tools — the pause is the
730
+ * SDK's own awaited hook, never a second loop (ADR 0038).
731
+ */
732
+ declare function streamAgentUIMessages(compiled: CompiledAgentOptions, apiKey: string, input: StreamAgentOptions): AsyncGenerator<UIMessageChunk>;
733
+
585
734
  /**
586
735
  * LoopStrategy — the per-round terminal-decision contract that gives runtime to
587
736
  * `@MainLoop({ strategy })`.
@@ -801,7 +950,7 @@ interface DelegateOptions {
801
950
  /** Per-run provider routing (e.g. OpenRouter). */
802
951
  providers?: ProviderRoutingSettings;
803
952
  /** Per-run sub-agent definitions. */
804
- agents?: Record<string, AgentDefinition>;
953
+ agents?: Record<string, AgentDefinition$1>;
805
954
  /** Per-run SDK budget tracker (inner tool-loop cap). */
806
955
  budgetTracker?: BudgetTracker;
807
956
  /** Per-run conversation store (cross-round history). */
@@ -912,4 +1061,4 @@ declare function agentsPlugin(opts: AgentsPluginOptions): {
912
1061
  register(app: PluginApp): void;
913
1062
  };
914
1063
 
915
- export { compileTools as $, type AgentExecutionContext as A, BudgetExceededError as B, type CompiledAgentOptions as C, type DelegationResult as D, type ErrorEvent as E, type FileEditEvent as F, type RunStartedEvent as G, type SdkMessage as H, type IterationEvent as I, type Segment as J, type StateUpdateEvent as K, type LoopStrategy as L, type ThinkingEvent as M, type ToolCallEvent as N, type ToolResultEvent as O, type PartialToolCallEvent as P, type ToolWalkResult as Q, type ReflectionStrategy as R, type StreamEvent as S, type TextDeltaEvent as T, type ToolboxWalkResult as U, agentsPlugin as V, buildModelSelection as W, compileAgent as X, compileContextWindow as Y, compileProjectContext as Z, compileSkills as _, type CompiledTool as a, createAgentExecutionContext as a0, createSdkAgentStream as a1, createThinkTagExtractor as a2, delegate as a3, extractThinkTagStream as a4, generateAgentManifest as a5, generateAgentRoutes as a6, isAgentContext as a7, isApprovalRequired as a8, isDone as a9, isError as aa, isPartialToolCall as ab, isTextDelta as ac, isToolCall as ad, isToolResult as ae, ladderReflectionStrategy as af, loopStrategyConfigSchema as ag, noopReflectionStrategy as ah, projectContextMetadataOnlyKnobs as ai, reflectionStrategyConfigSchema as aj, resolveLoopStrategy as ak, streamAgentResponse as al, translateSdkEvent as am, translateToUIMessageStream as an, validateUniqueRoutes as ao, walkAgentMetadata as ap, type AgentManifest as b, type AgentManifestEntry as c, type AgentManifestTool as d, type AgentRoute as e, type AgentRouteContext as f, type AgentRunInfo as g, type AgentStreamEvent as h, type AgentWalkResult as i, AgentWarningCode as j, type AgentsPluginOptions as k, type ApprovalRequiredEvent as l, type ArtifactChunkEvent as m, type ArtifactStartEvent as n, type CheckpointSavedEvent as o, type CompiledContextWindow as p, DEFAULT_MAX_ITERATIONS as q, type DelegateOptions as r, DelegationError as s, type DoneEvent as t, type LoopFinishReason as u, type LoopOutcome as v, type LoopStrategyConfig as w, type ReflectionContext as x, type ReflectionResult as y, type ReflectionStrategyConfig as z };
1064
+ export { buildModelSelection as $, AGENT_BRAND as A, BudgetExceededError as B, type CompiledAgentOptions as C, type DelegationResult as D, type ErrorEvent as E, type FileEditEvent as F, type LoopOutcome as G, type LoopStrategyConfig as H, type InferAgentInput as I, type ReflectionContext as J, type ReflectionResult as K, type LoopStrategy as L, type ReflectionStrategyConfig as M, type RunStartedEvent as N, type SdkMessage as O, type PartialToolCallEvent as P, type Segment as Q, type ReflectionStrategy as R, type StreamEvent as S, type StateUpdateEvent as T, type TextDeltaEvent as U, type ThinkingEvent as V, type ToolCallEvent as W, type ToolResultEvent as X, type ToolWalkResult as Y, type ToolboxWalkResult as Z, agentsPlugin as _, type CompiledTool as a, compileAgent as a0, compileAgentDefinition as a1, compileAgentModule as a2, compileContextWindow as a3, compileProjectContext as a4, compileSkills as a5, compileTools as a6, createAgentExecutionContext as a7, createSdkAgentStream as a8, createThinkTagExtractor as a9, defineAgent as aa, delegate as ab, extractThinkTagStream as ac, generateAgentManifest as ad, generateAgentRoutes as ae, isAgentContext as af, isAgentDefinition as ag, isApprovalRequired as ah, isDone as ai, isError as aj, isPartialToolCall as ak, isTextDelta as al, isToolCall as am, isToolResult as an, ladderReflectionStrategy as ao, loopStrategyConfigSchema as ap, noopReflectionStrategy as aq, projectContextMetadataOnlyKnobs as ar, reflectionStrategyConfigSchema as as, resolveLoopStrategy as at, streamAgentResponse as au, streamAgentUIMessages as av, translateSdkEvent as aw, translateToUIMessageStream as ax, validateUniqueRoutes as ay, walkAgentMetadata as az, type AgentDefinition as b, AgentDefinitionError as c, type AgentExecutionContext as d, type AgentManifest as e, type AgentManifestEntry as f, type AgentManifestTool as g, type AgentRoute as h, type AgentRouteContext as i, type AgentRunInfo as j, type AgentStreamEvent as k, type AgentWalkResult as l, AgentWarningCode as m, type AgentsPluginOptions as n, type ApprovalRequiredEvent as o, type ArtifactChunkEvent as p, type ArtifactStartEvent as q, type CheckpointSavedEvent as r, type CompiledContextWindow as s, DEFAULT_MAX_ITERATIONS as t, type DefineAgentConfig as u, type DelegateOptions as v, DelegationError as w, type DoneEvent as x, type IterationEvent as y, type LoopFinishReason as z };
package/dist/bridge.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- export { A as AgentExecutionContext, b as AgentManifest, c as AgentManifestEntry, d as AgentManifestTool, e as AgentRoute, f as AgentRouteContext, g as AgentRunInfo, h as AgentStreamEvent, i as AgentWalkResult, j as AgentWarningCode, k as AgentsPluginOptions, l as ApprovalRequiredEvent, m as ArtifactChunkEvent, n as ArtifactStartEvent, B as BudgetExceededError, o as CheckpointSavedEvent, C as CompiledAgentOptions, p as CompiledContextWindow, a as CompiledTool, r as DelegateOptions, s as DelegationError, D as DelegationResult, t as DoneEvent, E as ErrorEvent, F as FileEditEvent, I as IterationEvent, P as PartialToolCallEvent, G as RunStartedEvent, H as SdkMessage, J as Segment, K as StateUpdateEvent, S as StreamEvent, T as TextDeltaEvent, M as ThinkingEvent, N as ToolCallEvent, O as ToolResultEvent, Q as ToolWalkResult, U as ToolboxWalkResult, V as agentsPlugin, W as buildModelSelection, X as compileAgent, Y as compileContextWindow, Z as compileProjectContext, _ as compileSkills, $ as compileTools, a0 as createAgentExecutionContext, a1 as createSdkAgentStream, a2 as createThinkTagExtractor, a3 as delegate, a4 as extractThinkTagStream, a5 as generateAgentManifest, a6 as generateAgentRoutes, a7 as isAgentContext, a8 as isApprovalRequired, a9 as isDone, aa as isError, ab as isPartialToolCall, ac as isTextDelta, ad as isToolCall, ae as isToolResult, ai as projectContextMetadataOnlyKnobs, al as streamAgentResponse, am as translateSdkEvent, an as translateToUIMessageStream, ao as validateUniqueRoutes, ap as walkAgentMetadata } from './bridge-entry-CsUiO2YU.js';
1
+ 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, C as CompiledAgentOptions, s as CompiledContextWindow, a as CompiledTool, u as DefineAgentConfig, v as DelegateOptions, w as DelegationError, D as DelegationResult, x as DoneEvent, E as ErrorEvent, F as FileEditEvent, I as InferAgentInput, y as IterationEvent, P as PartialToolCallEvent, N as RunStartedEvent, O as SdkMessage, Q as Segment, T as StateUpdateEvent, S as StreamEvent, 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, ar as projectContextMetadataOnlyKnobs, au as streamAgentResponse, av as streamAgentUIMessages, aw as translateSdkEvent, ax as translateToUIMessageStream, ay as validateUniqueRoutes, az as walkAgentMetadata } from './bridge-entry-DVhOQc_f.js';
2
2
  import '@theokit/http';
3
- import './skills-FcUdNDbn.js';
3
+ import './skills-Dx_KJ6Eg.js';
4
4
  import '@theokit/sdk';
5
5
  import 'zod';
6
6
  import 'ai';
package/dist/bridge.js CHANGED
@@ -1,10 +1,14 @@
1
1
  import {
2
+ AGENT_BRAND,
3
+ AgentDefinitionError,
2
4
  AgentWarningCode,
3
5
  BudgetExceededError,
4
6
  DelegationError,
5
7
  agentsPlugin,
6
8
  buildModelSelection,
7
9
  compileAgent,
10
+ compileAgentDefinition,
11
+ compileAgentModule,
8
12
  compileContextWindow,
9
13
  compileProjectContext,
10
14
  compileSkills,
@@ -12,11 +16,13 @@ import {
12
16
  createAgentExecutionContext,
13
17
  createSdkAgentStream,
14
18
  createThinkTagExtractor,
19
+ defineAgent,
15
20
  delegate,
16
21
  extractThinkTagStream,
17
22
  generateAgentManifest,
18
23
  generateAgentRoutes,
19
24
  isAgentContext,
25
+ isAgentDefinition,
20
26
  isApprovalRequired,
21
27
  isDone,
22
28
  isError,
@@ -26,20 +32,25 @@ import {
26
32
  isToolResult,
27
33
  projectContextMetadataOnlyKnobs,
28
34
  streamAgentResponse,
35
+ streamAgentUIMessages,
29
36
  translateSdkEvent,
30
37
  translateToUIMessageStream,
31
38
  validateUniqueRoutes,
32
39
  walkAgentMetadata
33
- } from "./chunk-DA7HHFL5.js";
34
- import "./chunk-GVPUUKKE.js";
40
+ } from "./chunk-AUOCWGPS.js";
41
+ import "./chunk-FI6ZG2YP.js";
35
42
  import "./chunk-7QVYU63E.js";
36
43
  export {
44
+ AGENT_BRAND,
45
+ AgentDefinitionError,
37
46
  AgentWarningCode,
38
47
  BudgetExceededError,
39
48
  DelegationError,
40
49
  agentsPlugin,
41
50
  buildModelSelection,
42
51
  compileAgent,
52
+ compileAgentDefinition,
53
+ compileAgentModule,
43
54
  compileContextWindow,
44
55
  compileProjectContext,
45
56
  compileSkills,
@@ -47,11 +58,13 @@ export {
47
58
  createAgentExecutionContext,
48
59
  createSdkAgentStream,
49
60
  createThinkTagExtractor,
61
+ defineAgent,
50
62
  delegate,
51
63
  extractThinkTagStream,
52
64
  generateAgentManifest,
53
65
  generateAgentRoutes,
54
66
  isAgentContext,
67
+ isAgentDefinition,
55
68
  isApprovalRequired,
56
69
  isDone,
57
70
  isError,
@@ -61,6 +74,7 @@ export {
61
74
  isToolResult,
62
75
  projectContextMetadataOnlyKnobs,
63
76
  streamAgentResponse,
77
+ streamAgentUIMessages,
64
78
  translateSdkEvent,
65
79
  translateToUIMessageStream,
66
80
  validateUniqueRoutes,