@theokit/agents 7.3.1 → 7.4.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/dist/{agent-handle-tgyu8J7q.d.ts → agent-handle-BX4oFqfb.d.ts} +10 -10
- package/dist/auth.d.ts +68 -66
- package/dist/auth.js +106 -98
- package/dist/auth.js.map +1 -1
- package/dist/{bridge-entry-ofFpOe-j.d.ts → bridge-entry-Z8GjrwH4.d.ts} +85 -84
- package/dist/bridge.d.ts +1 -1
- package/dist/bridge.js +1 -2
- package/dist/{chunk-CVDPGEJF.js → chunk-FJA4QQLZ.js} +191 -246
- package/dist/chunk-FJA4QQLZ.js.map +1 -0
- package/dist/{chunk-7ECCHM4N.js → chunk-PHUNONZT.js} +523 -1053
- package/dist/chunk-PHUNONZT.js.map +1 -0
- package/dist/client-react.d.ts +1 -1
- package/dist/client-react.js +3 -9
- package/dist/client-react.js.map +1 -1
- package/dist/client.d.ts +3 -3
- package/dist/client.js +1 -2
- package/dist/index.d.ts +82 -50
- package/dist/index.js +161 -394
- package/dist/index.js.map +1 -1
- package/dist/interactive.js +6 -3
- package/dist/interactive.js.map +1 -1
- package/dist/persistence.js +0 -2
- package/dist/persistence.js.map +1 -1
- package/dist/pty.js +7 -3
- package/dist/pty.js.map +1 -1
- package/dist/sandbox.js +26 -3
- package/dist/sandbox.js.map +1 -1
- package/dist/testing.js +3 -21
- package/dist/testing.js.map +1 -1
- package/dist/tools.js +55 -3
- package/dist/tools.js.map +1 -1
- package/package.json +12 -12
- package/LICENSE +0 -201
- package/dist/chunk-7ECCHM4N.js.map +0 -1
- package/dist/chunk-CVDPGEJF.js.map +0 -1
- package/dist/chunk-Z4QWC7IK.js +0 -7
- package/dist/chunk-Z4QWC7IK.js.map +0 -1
|
@@ -785,35 +785,35 @@ interface HitlWiring {
|
|
|
785
785
|
}
|
|
786
786
|
|
|
787
787
|
/**
|
|
788
|
-
*
|
|
789
|
-
* "
|
|
788
|
+
* What this surface does when a gated tool asks for approval. Four variants, none of them
|
|
789
|
+
* "omission" — each with a concrete consumer and a written reason.
|
|
790
790
|
*/
|
|
791
791
|
type ApprovalPosture = {
|
|
792
|
-
/**
|
|
792
|
+
/** There is a human: the request is EMITTED and execution pauses until the decision arrives. */
|
|
793
793
|
kind: 'interactive';
|
|
794
794
|
/**
|
|
795
|
-
*
|
|
796
|
-
*
|
|
797
|
-
*
|
|
798
|
-
*
|
|
795
|
+
* Pushes the `ApprovalRequiredEvent` into the surface's stream. MANDATORY: `toAgentFactory`
|
|
796
|
+
* returns a raw handle, with no stream and no translator, so the sink comes from whoever passes
|
|
797
|
+
* the posture — which is precisely the surface that owns the stream. A no-op default would
|
|
798
|
+
* bring the silent discard back through the back door: the request would be "emitted" nowhere.
|
|
799
799
|
*/
|
|
800
800
|
emit: (event: ApprovalRequiredEvent) => void;
|
|
801
|
-
/**
|
|
801
|
+
/** Resolves the human decision; execution stays paused until this settles. */
|
|
802
802
|
awaitApproval: (approvalId: string, opts: HumanInTheLoopOptions, toolName: string) => Promise<boolean | HitlDecision>;
|
|
803
803
|
} | {
|
|
804
|
-
/**
|
|
804
|
+
/** Nobody asks and the tool runs. Legitimate when something else confines the execution. */
|
|
805
805
|
kind: 'auto-approve';
|
|
806
806
|
reason: string;
|
|
807
807
|
} | {
|
|
808
|
-
/**
|
|
808
|
+
/** Nobody asks and the tool does NOT run — the safe reading of omission (codex `GranularApprovalConfig`). */
|
|
809
809
|
kind: 'auto-reject';
|
|
810
810
|
reason: string;
|
|
811
811
|
} | {
|
|
812
812
|
/**
|
|
813
|
-
*
|
|
814
|
-
*
|
|
815
|
-
*
|
|
816
|
-
*
|
|
813
|
+
* The gate is driven by the SERVING SURFACE (the ACP client, through the protocol itself), so
|
|
814
|
+
* the layer installs no plugin at all. It is a bypass — but a NAMED bypass, with a written
|
|
815
|
+
* reason, that shows up in the `match`, shows up in logs and can be counted by a gate. What it
|
|
816
|
+
* replaces is worse: today the same effect happens by omission, with none of that.
|
|
817
817
|
*/
|
|
818
818
|
kind: 'owned-by-surface';
|
|
819
819
|
reason: string;
|
|
@@ -822,49 +822,49 @@ type ApprovalPosture = {
|
|
|
822
822
|
/**
|
|
823
823
|
* M82 — the typed shape of `AgentBuilder.create().hooks({...})`.
|
|
824
824
|
*
|
|
825
|
-
* ##
|
|
825
|
+
* ## Why this type lives here
|
|
826
826
|
*
|
|
827
|
-
*
|
|
828
|
-
* handler
|
|
829
|
-
*
|
|
830
|
-
* `ctx: unknown`
|
|
827
|
+
* Until M82 the signature was `Readonly<Record<string, unknown>>`: any key was accepted and every
|
|
828
|
+
* handler received `ctx: unknown`. A consumer that wanted types had to declare its own — and that is
|
|
829
|
+
* exactly what agent-builder did, with a local alias of five handlers, four of them carrying
|
|
830
|
+
* `ctx: unknown` because there was nowhere to import the contexts from.
|
|
831
831
|
*
|
|
832
|
-
*
|
|
833
|
-
*
|
|
832
|
+
* It is the same class M81 closed with `discoverSubagents`: framework knowledge reimplemented in the
|
|
833
|
+
* app because the framework did not publish it. The type is born where the knowledge lives.
|
|
834
834
|
*
|
|
835
|
-
* ##
|
|
835
|
+
* ## About `transform_tool_result`
|
|
836
836
|
*
|
|
837
|
-
*
|
|
838
|
-
*
|
|
839
|
-
*
|
|
840
|
-
*
|
|
837
|
+
* This is the ONLY tool-stage channel whose return value the SDK applies — `#runTransform` folds the
|
|
838
|
+
* returned value in; `#runFireAndForget`, used by `post_tool_call`, discards it. Since M82 its
|
|
839
|
+
* context carries `toolCalls`, so a scoped policy (by tool name) can ACT on the result rather than
|
|
840
|
+
* merely observe it.
|
|
841
841
|
*/
|
|
842
842
|
|
|
843
843
|
/**
|
|
844
|
-
*
|
|
844
|
+
* Lifecycle handlers keyed by `HookName`.
|
|
845
845
|
*
|
|
846
|
-
*
|
|
847
|
-
*
|
|
848
|
-
*
|
|
846
|
+
* Every field is optional: an agent registers only the events it cares about. `.hooks()` accepts the
|
|
847
|
+
* UNION of this type with the earlier loose shape (M82's ADR-4), so no implicit index signature is
|
|
848
|
+
* needed for the value to pass at the call site — the narrowing is gradual, not a break.
|
|
849
849
|
*/
|
|
850
850
|
interface HookHandlers {
|
|
851
851
|
/**
|
|
852
|
-
*
|
|
853
|
-
*
|
|
852
|
+
* Runs BEFORE the tool. Returning `{ block: true, message }` VETOES the call — the only hook with
|
|
853
|
+
* veto power.
|
|
854
854
|
*/
|
|
855
855
|
pre_tool_call?: (ctx: PreToolCallContext) => Promise<PreToolCallDecision | undefined> | PreToolCallDecision | undefined;
|
|
856
856
|
/**
|
|
857
|
-
*
|
|
858
|
-
*
|
|
857
|
+
* Runs AFTER the tool, with `{name, args, result}`. Fire-and-forget: the return value is
|
|
858
|
+
* **discarded** by the SDK. To ACT on the result use {@link transform_tool_result}.
|
|
859
859
|
*/
|
|
860
860
|
post_tool_call?: (ctx: PostToolCallContext) => Promise<void> | void;
|
|
861
861
|
/**
|
|
862
|
-
*
|
|
863
|
-
* `toolCalls` — plural,
|
|
862
|
+
* Folds the turn's tool results before they go up to the model. Since M82 the context brings
|
|
863
|
+
* `toolCalls` — plural, because the seam receives the turn's BATCH; correlate by
|
|
864
864
|
* `toolUseId === id`.
|
|
865
865
|
*/
|
|
866
866
|
transform_tool_result?: <T>(results: T, ctx: ToolResultTransformContext) => Promise<T> | T;
|
|
867
|
-
/**
|
|
867
|
+
/** Folds the model's text before it is consumed. No tool call involved. */
|
|
868
868
|
transform_llm_output?: (output: string, ctx: TransformContext) => Promise<string> | string;
|
|
869
869
|
on_session_start?: (ctx: SessionLifecycleContext) => Promise<void> | void;
|
|
870
870
|
on_session_end?: (ctx: SessionLifecycleContext) => Promise<void> | void;
|
|
@@ -999,19 +999,19 @@ declare function isAgentDefinition(value: unknown): value is AgentDefinition;
|
|
|
999
999
|
declare function compileAgentDefinition(def: AgentDefinition): CompiledAgentOptions;
|
|
1000
1000
|
|
|
1001
1001
|
/**
|
|
1002
|
-
*
|
|
1002
|
+
* A definition, or a THUNK that produces one per session.
|
|
1003
1003
|
*
|
|
1004
|
-
* M91 —
|
|
1005
|
-
*
|
|
1006
|
-
*
|
|
1007
|
-
*
|
|
1004
|
+
* M91 — the `apiKey` line just below has accepted a thunk since M74, added for **exactly** this
|
|
1005
|
+
* reason. The asymmetry was one line wide and cost a lot: with the object shape, trust, hooks, skills
|
|
1006
|
+
* and MCP are frozen at module load. In a `theokit acp` process an IDE keeps open for hours, that
|
|
1007
|
+
* reintroduces the staleness M67 removed by moving construction to the entry point.
|
|
1008
1008
|
*/
|
|
1009
|
-
type
|
|
1009
|
+
type DefinitionOrThunk = AgentDefinition | ((sessionId: string) => AgentDefinition | Promise<AgentDefinition>);
|
|
1010
1010
|
|
|
1011
1011
|
/**
|
|
1012
1012
|
* SDK Adapter — bridges @theokit/agents decorators → @theokit/sdk runtime.
|
|
1013
1013
|
*
|
|
1014
|
-
* Per rule sdk-runtime.md (
|
|
1014
|
+
* Per rule sdk-runtime.md (UNBREAKABLE): @theokit/sdk is the ONLY agent runtime.
|
|
1015
1015
|
* This adapter replaces llm-runner.ts (which called OpenRouter API directly).
|
|
1016
1016
|
*
|
|
1017
1017
|
* Flow: @Agent decorator → compileAgent() → createSdkAgentStream() → SDK Agent.create() → Run.stream()
|
|
@@ -1122,10 +1122,11 @@ declare function createSdkAgentStream(compiled: CompiledAgentOptions, compiledTo
|
|
|
1122
1122
|
* hands back without re-exporting the full `@theokit/sdk` `Agent` type.
|
|
1123
1123
|
*/
|
|
1124
1124
|
/**
|
|
1125
|
-
*
|
|
1125
|
+
* The minimum a turn returns. Structural on purpose (M91's ADR-2).
|
|
1126
1126
|
*
|
|
1127
|
-
* Re-
|
|
1128
|
-
*
|
|
1127
|
+
* Re-exporting the SDK's type would tie this layer's public signature to theirs — the opposite of
|
|
1128
|
+
* what the boundary exists to do, and the same reason `SdkAgentHandle` was already an alias rather
|
|
1129
|
+
* than a
|
|
1129
1130
|
* re-export.
|
|
1130
1131
|
*/
|
|
1131
1132
|
interface SdkTurnHandle {
|
|
@@ -1136,24 +1137,24 @@ interface SdkTurnHandle {
|
|
|
1136
1137
|
};
|
|
1137
1138
|
}>;
|
|
1138
1139
|
}
|
|
1139
|
-
/**
|
|
1140
|
+
/** Per-turn options. Open for now — the SDK accepts more than the layer needs to declare. */
|
|
1140
1141
|
type SdkSendOptions = Record<string, unknown>;
|
|
1141
1142
|
interface SdkAgentHandle {
|
|
1142
1143
|
readonly agentId: string;
|
|
1143
1144
|
/**
|
|
1144
1145
|
* M91 — era `(msg: string, opts?: unknown) => unknown`.
|
|
1145
1146
|
*
|
|
1146
|
-
*
|
|
1147
|
-
*
|
|
1148
|
-
*
|
|
1149
|
-
*
|
|
1150
|
-
* milestones**.
|
|
1147
|
+
* The `unknown` return cost the consumer a whole module: `agents/lib/goal/runner-facade.ts`, 38
|
|
1148
|
+
* lines whose only job was to re-narrow this return into the `send → wait` contract the goal loop
|
|
1149
|
+
* requires. That module's docstring records that, before it, the caller wrote `as never` — and that
|
|
1150
|
+
* **it was under that cover that the goal surface diverged from the real agent for several
|
|
1151
|
+
* milestones**. The layer always knew the shape; it simply did not declare it.
|
|
1151
1152
|
*
|
|
1152
|
-
*
|
|
1153
|
-
*
|
|
1154
|
-
*
|
|
1155
|
-
*
|
|
1156
|
-
*
|
|
1153
|
+
* The shape is **asynchronous**: `SDKAgent.send` returns `Promise<Run>`, and the SDK's
|
|
1154
|
+
* `GoalLoopAgent` declares `send(prompt): Promise<{ wait(): Promise<…> }>`. This milestone's first
|
|
1155
|
+
* attempt typed it as synchronous and the consumer's `tsc` would not have caught it — the facade's
|
|
1156
|
+
* `as never` absorbed the difference. It is literally the divergence the facade's docstring
|
|
1157
|
+
* described, met again while trying to remove it.
|
|
1157
1158
|
*/
|
|
1158
1159
|
send: (msg: string, opts?: SdkSendOptions) => Promise<SdkTurnHandle>;
|
|
1159
1160
|
dispose: () => Promise<void>;
|
|
@@ -1167,11 +1168,11 @@ interface SdkAgentHandle {
|
|
|
1167
1168
|
* model / `assembleM8CreateOptions`), so the served agent has identical tools, model, system prompt,
|
|
1168
1169
|
* skills, and `mcpServers`. Keyed per `sessionId` via `Agent.getOrCreate` (matches the run path).
|
|
1169
1170
|
*
|
|
1170
|
-
* M96 —
|
|
1171
|
-
*
|
|
1171
|
+
* M96 — the surface DECLARES its {@link ApprovalPosture} and the factory installs the plugin the
|
|
1172
|
+
* variant requires. Before, the `compiled.hitl` map was compiled and DISCARDED here. Rationale in
|
|
1172
1173
|
* `./approval-posture.ts`.
|
|
1173
1174
|
*/
|
|
1174
|
-
declare function toAgentFactory(def:
|
|
1175
|
+
declare function toAgentFactory(def: DefinitionOrThunk, opts: {
|
|
1175
1176
|
apiKey: string | (() => string | Promise<string>);
|
|
1176
1177
|
approvals: ApprovalPosture;
|
|
1177
1178
|
overrides?: RuntimeOverrides;
|
|
@@ -1358,11 +1359,11 @@ interface AgentBuilder<TInput extends z.ZodType | UnsetMarker = UnsetMarker, TMo
|
|
|
1358
1359
|
* Set the model. Required before `.build()`. COMPILE ERROR when called twice — the argument
|
|
1359
1360
|
* type collapses to `never` once the model is set (tRPC's set-once technique).
|
|
1360
1361
|
*
|
|
1361
|
-
* M94 —
|
|
1362
|
-
* (`agent-builder.ts:50`: `model(m: string | ModelSelection)`);
|
|
1363
|
-
*
|
|
1364
|
-
* `contextWindow`
|
|
1365
|
-
*
|
|
1362
|
+
* M94 — accepts a `ModelSelection` as well as the raw id. The SDK implementation **always**
|
|
1363
|
+
* accepted it (`agent-builder.ts:50`: `model(m: string | ModelSelection)`); it was this facade that
|
|
1364
|
+
* narrowed to `string`, and the narrowing made every field of the selection unreachable — including
|
|
1365
|
+
* the `contextWindow` the SDK had started publishing. A facade diverging from the implementation is
|
|
1366
|
+
* the same class of defect M91 paid two patches to fix.
|
|
1366
1367
|
*/
|
|
1367
1368
|
model(id: TModel extends UnsetMarker ? string | ModelSelection : never): AgentBuilder<TInput, string, TContext, TTools>;
|
|
1368
1369
|
/** Set the static system prompt. */
|
|
@@ -1555,7 +1556,7 @@ declare function streamAgentUIMessages(compiled: CompiledAgentOptions, apiKey: s
|
|
|
1555
1556
|
* Config is Zod-validated so an invalid `maxIterations` fails fast at resolve
|
|
1556
1557
|
* time, never as a silent infinite loop at runtime (plan ADR D3).
|
|
1557
1558
|
*
|
|
1558
|
-
*
|
|
1559
|
+
* reference: knowledge-base/references/mastra agentic-loop/index.ts (stopWhen + maxSteps).
|
|
1559
1560
|
*/
|
|
1560
1561
|
|
|
1561
1562
|
/** Why a single round ended (or, for the V4-D terminals, why the whole loop ended). */
|
|
@@ -1658,21 +1659,21 @@ interface DelegationResult {
|
|
|
1658
1659
|
finishReason?: LoopFinishReason;
|
|
1659
1660
|
}
|
|
1660
1661
|
/**
|
|
1661
|
-
*
|
|
1662
|
+
* DELEGATION budget exceeded — the dollar cost of a delegated agent.
|
|
1662
1663
|
*
|
|
1663
|
-
* ##
|
|
1664
|
+
* ## Why the name changed in M91
|
|
1664
1665
|
*
|
|
1665
|
-
*
|
|
1666
|
-
*
|
|
1667
|
-
* (`agentName`/`actualCost`).
|
|
1668
|
-
*
|
|
1669
|
-
*
|
|
1666
|
+
* It was called `BudgetExceededError` and **shadowed** the SDK class of the same name, which belongs
|
|
1667
|
+
* to another domain: context-WINDOW budget (`budgetName`/`window`/`mode`) against DELEGATION budget
|
|
1668
|
+
* (`agentName`/`actualCost`). Since the consumer holds an unbreakable rule never to import
|
|
1669
|
+
* `@theokit/sdk` directly, it **could never reach the SDK's** — and an `instanceof` against this
|
|
1670
|
+
* barrel silently matched the wrong domain.
|
|
1670
1671
|
*
|
|
1671
|
-
*
|
|
1672
|
-
*
|
|
1672
|
+
* It is the failure mode M73 documented in `auth-parity.test.ts`: when two classes compete for the
|
|
1673
|
+
* same name, no behavioural test goes red — only an identity `toBe` catches it.
|
|
1673
1674
|
*
|
|
1674
|
-
* `subpath-coverage.test.ts`
|
|
1675
|
-
*
|
|
1675
|
+
* `subpath-coverage.test.ts` recorded the collision as a `gap` on `./errors`, with the reason written
|
|
1676
|
+
* down and the acknowledgement that renaming was breaking and out of M78's scope. M91 paid the bill.
|
|
1676
1677
|
*/
|
|
1677
1678
|
declare class DelegationBudgetExceededError extends Error {
|
|
1678
1679
|
readonly agentName: string;
|
|
@@ -1681,9 +1682,9 @@ declare class DelegationBudgetExceededError extends Error {
|
|
|
1681
1682
|
constructor(agentName: string, actualCost: number, budgetLimit: number);
|
|
1682
1683
|
}
|
|
1683
1684
|
/**
|
|
1684
|
-
* @deprecated Use {@link DelegationBudgetExceededError}.
|
|
1685
|
-
*
|
|
1686
|
-
*
|
|
1685
|
+
* @deprecated Use {@link DelegationBudgetExceededError}. The alias is kept for one major so anyone
|
|
1686
|
+
* catching by the old name is not broken; it is the **same** class, not a copy — `instanceof` still
|
|
1687
|
+
* holds in both directions, and a referential-identity test (`toBe`) pins that.
|
|
1687
1688
|
*/
|
|
1688
1689
|
declare const BudgetExceededError: typeof DelegationBudgetExceededError;
|
|
1689
1690
|
/** @deprecated Use {@link DelegationBudgetExceededError}. */
|
|
@@ -1704,7 +1705,7 @@ declare class DelegationError extends Error {
|
|
|
1704
1705
|
* into the next round's prompt plus a `continue` hint. The hard round ceiling
|
|
1705
1706
|
* lives in `LoopStrategy.shouldContinue` (maxIterations), NOT here.
|
|
1706
1707
|
*
|
|
1707
|
-
*
|
|
1708
|
+
* reference: knowledge-base/references/mastra agentic-loop/index.ts (onIterationComplete → { feedback, continue }).
|
|
1708
1709
|
*/
|
|
1709
1710
|
|
|
1710
1711
|
/** Result of reflecting on a completed round. */
|
|
@@ -1775,7 +1776,7 @@ declare const noopReflectionStrategy: ReflectionStrategy;
|
|
|
1775
1776
|
* `runReflectiveLoop` is INTERNAL (not re-exported from the package barrel,
|
|
1776
1777
|
* Drawback #4) — consumed by `delegate()` (T2.2) and `AgentRunner` (T3.1).
|
|
1777
1778
|
*
|
|
1778
|
-
*
|
|
1779
|
+
* reference: knowledge-base/references/mastra agent.ts (re-enter the loop with feedback).
|
|
1779
1780
|
*/
|
|
1780
1781
|
|
|
1781
1782
|
/** One SDK stream turn: `createSdkAgentStream(...)` returns this shape. */
|
|
@@ -2324,4 +2325,4 @@ declare function agentsPlugin(opts: AgentsPluginOptions): {
|
|
|
2324
2325
|
register(app: PluginApp): void;
|
|
2325
2326
|
};
|
|
2326
2327
|
|
|
2327
|
-
export { type DelegateOptions as $, type ApprovalOptions as A, type ApiErrorDecision as B, type CompiledAgentOptions as C, type DelegationResult as D, type ApiErrorPolicy as E, type ApprovalRequiredEvent as F, type Guardrail as G, type HumanInTheLoopOptions as H, type ArtifactChunkEvent as I, type ArtifactStartEvent as J, type BackgroundDelegation as K, type LoopStrategy as L, type MainLoopMeta as M, type BeforeToolCallContext as N, BudgetExceededError as O, type BudgetOptions as P, type CheckpointSavedEvent as Q, type ReflectionStrategy as R, type StreamEvent as S, type ToolOptions as T, type CompiledContextWindow as U, ContextualTool as V, CostBudgetExceededError as W, DEFAULT_MAX_ITERATIONS as X, type DefineAgentConfig as Y, type
|
|
2328
|
+
export { type DelegateOptions as $, type ApprovalOptions as A, type ApiErrorDecision as B, type CompiledAgentOptions as C, type DelegationResult as D, type ApiErrorPolicy as E, type ApprovalRequiredEvent as F, type Guardrail as G, type HumanInTheLoopOptions as H, type ArtifactChunkEvent as I, type ArtifactStartEvent as J, type BackgroundDelegation as K, type LoopStrategy as L, type MainLoopMeta as M, type BeforeToolCallContext as N, BudgetExceededError as O, type BudgetOptions as P, type CheckpointSavedEvent as Q, type ReflectionStrategy as R, type StreamEvent as S, type ToolOptions as T, type CompiledContextWindow as U, ContextualTool as V, CostBudgetExceededError as W, DEFAULT_MAX_ITERATIONS as X, type DefineAgentConfig as Y, type DefinitionOrThunk as Z, type DelegateFn as _, type CompiledTool as a, createSdkAgentStream as a$, DelegationBudgetExceededError as a0, DelegationError as a1, type DoneEvent as a2, type ErrorEvent as a3, type FileEditEvent as a4, type GuardrailAction as a5, type GuardrailPhase as a6, type GuardrailResult as a7, GuardrailViolationError as a8, type HookHandlers as a9, type SdkSendOptions as aA, type SdkTurnHandle as aB, type Segment as aC, type SkillsRequestContext as aD, type SkillsSelection as aE, type StateUpdateEvent as aF, type TextDeltaEvent as aG, type ThinkingEvent as aH, type TimeoutAction as aI, type ToolCallEvent as aJ, type ToolCallVeto as aK, type ToolHooks as aL, type ToolHooksPlugin as aM, type ToolResultEvent as aN, type ToolWalkResult as aO, type ToolboxOptions as aP, type ToolboxWalkResult as aQ, agentsPlugin as aR, buildModelSelection as aS, compileAgentDefinition as aT, compileAgentModule as aU, compileContextWindow as aV, compileProjectContext as aW, compileSkills as aX, compileTools as aY, createAgentExecutionContext as aZ, createApiErrorHandler as a_, type InferAgentInput as aa, type InferAgentToolNames as ab, type IterationEvent as ac, type LLMCallContext as ad, type LoopFinishReason as ae, type LoopOutcome as af, type LoopStrategyConfig as ag, type MainLoopOptions as ah, type McpApprovalSpec as ai, McpFileError as aj, type McpRegistryConfig as ak, type McpRequestContext as al, type McpSelection as am, type McpServersMap as an, type PartialToolCallEvent as ao, type PolicyHandler as ap, type ProcessInputContext as aq, type ReflectionContext as ar, type ReflectionResult as as, type ReflectionStrategyConfig as at, type RunStartedEvent as au, type ScoreVerdict as av, type ScoredDelegation as aw, type Scorer as ax, type SdkAgentHandle as ay, type SdkMessage as az, type ReasoningEffort as b, createThinkTagExtractor as b0, createToolHooksPlugin as b1, delegate as b2, delegateBackground as b3, delegateWithScoring as b4, extractThinkTagStream as b5, generateAgentManifest as b6, generateAgentRoutes as b7, isAgentContext as b8, isAgentDefinition as b9, isApprovalRequired as ba, isDone as bb, isError as bc, isPartialToolCall as bd, isTextDelta as be, isToolCall as bf, isToolResult as bg, ladderReflectionStrategy as bh, loadMcpJson as bi, loopStrategyConfigSchema as bj, mcpRegistry as bk, mcpToolApprovals as bl, noopReflectionStrategy as bm, presentUIMessageStream as bn, projectContextMetadataOnlyKnobs as bo, reasoningEffortOf as bp, reflectionStrategyConfigSchema as bq, resolveEnabledSkills as br, resolveLoopStrategy as bs, resolveMcpServers as bt, runWithApiErrorHandling as bu, streamAgentResponse as bv, toAgentFactory as bw, translateSdkEvent as bx, type RoundStreamFactory as c, type ContextWindowOptions as d, type SkillsOptions as e, type AgentManifestEntry as f, type HitlDecision as g, type ApprovalPosture as h, AGENT_BRAND as i, type AfterToolCallContext as j, AgentBuilder as k, type AgentDefinition as l, AgentDefinitionError as m, type AgentExecutionContext as n, type AgentManifest as o, type AgentManifestSource as p, type AgentManifestTool as q, type AgentOptions as r, streamAgentUIMessages as s, type AgentRoute as t, type AgentRouteContext as u, type AgentRunInfo as v, type AgentStreamEvent as w, type AgentTurnMetadata as x, type AgentsPluginOptions as y, type ApiErrorContext as z };
|
package/dist/bridge.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { i as AGENT_BRAND, j as AfterToolCallContext, k as AgentBuilder, l as AgentDefinition, m as AgentDefinitionError, n as AgentExecutionContext, o as AgentManifest, f as AgentManifestEntry, p as AgentManifestSource, q as AgentManifestTool, t as AgentRoute, u as AgentRouteContext, v as AgentRunInfo, w as AgentStreamEvent, x as AgentTurnMetadata, y as AgentsPluginOptions, z as ApiErrorContext, B as ApiErrorDecision, E as ApiErrorPolicy, h as ApprovalPosture, F as ApprovalRequiredEvent, I as ArtifactChunkEvent, J as ArtifactStartEvent, K as BackgroundDelegation, N as BeforeToolCallContext, O as BudgetExceededError, Q as CheckpointSavedEvent, C as CompiledAgentOptions, U as CompiledContextWindow, a as CompiledTool, V as ContextualTool, Y as DefineAgentConfig, Z as
|
|
1
|
+
export { i as AGENT_BRAND, j as AfterToolCallContext, k as AgentBuilder, l as AgentDefinition, m as AgentDefinitionError, n as AgentExecutionContext, o as AgentManifest, f as AgentManifestEntry, p as AgentManifestSource, q as AgentManifestTool, t as AgentRoute, u as AgentRouteContext, v as AgentRunInfo, w as AgentStreamEvent, x as AgentTurnMetadata, y as AgentsPluginOptions, z as ApiErrorContext, B as ApiErrorDecision, E as ApiErrorPolicy, h as ApprovalPosture, F as ApprovalRequiredEvent, I as ArtifactChunkEvent, J as ArtifactStartEvent, K as BackgroundDelegation, N as BeforeToolCallContext, O as BudgetExceededError, Q as CheckpointSavedEvent, C as CompiledAgentOptions, U as CompiledContextWindow, a as CompiledTool, V as ContextualTool, Y as DefineAgentConfig, Z as DefinitionOrThunk, _ as DelegateFn, $ as DelegateOptions, a0 as DelegationBudgetExceededError, a1 as DelegationError, D as DelegationResult, a2 as DoneEvent, a3 as ErrorEvent, a4 as FileEditEvent, aa as InferAgentInput, ab as InferAgentToolNames, ac as IterationEvent, ad as LLMCallContext, ai as McpApprovalSpec, aj as McpFileError, ak as McpRegistryConfig, al as McpRequestContext, am as McpSelection, ao as PartialToolCallEvent, aq as ProcessInputContext, au as RunStartedEvent, av as ScoreVerdict, aw as ScoredDelegation, ax as Scorer, ay as SdkAgentHandle, az as SdkMessage, aA as SdkSendOptions, aB as SdkTurnHandle, aC as Segment, aF as StateUpdateEvent, S as StreamEvent, aG as TextDeltaEvent, aH as ThinkingEvent, aJ as ToolCallEvent, aK as ToolCallVeto, aL as ToolHooks, aM as ToolHooksPlugin, aN as ToolResultEvent, aO as ToolWalkResult, aQ as ToolboxWalkResult, aR as agentsPlugin, aS as buildModelSelection, aT as compileAgentDefinition, aU as compileAgentModule, aV as compileContextWindow, aW as compileProjectContext, aX as compileSkills, aY as compileTools, aZ as createAgentExecutionContext, a_ as createApiErrorHandler, a$ as createSdkAgentStream, b0 as createThinkTagExtractor, b1 as createToolHooksPlugin, b2 as delegate, b3 as delegateBackground, b4 as delegateWithScoring, b5 as extractThinkTagStream, b6 as generateAgentManifest, b7 as generateAgentRoutes, b8 as isAgentContext, b9 as isAgentDefinition, ba as isApprovalRequired, bb as isDone, bc as isError, bd as isPartialToolCall, be as isTextDelta, bf as isToolCall, bg as isToolResult, bi as loadMcpJson, bk as mcpRegistry, bl as mcpToolApprovals, bn as presentUIMessageStream, bo as projectContextMetadataOnlyKnobs, bp as reasoningEffortOf, bt as resolveMcpServers, bu as runWithApiErrorHandling, bv as streamAgentResponse, s as streamAgentUIMessages, bw as toAgentFactory, bx as translateSdkEvent } from './bridge-entry-Z8GjrwH4.js';
|
|
2
2
|
import '@theokit/http';
|
|
3
3
|
import '@theokit/sdk';
|
|
4
4
|
import 'zod';
|