@theokit/agents 7.4.0 → 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.
@@ -785,35 +785,35 @@ interface HitlWiring {
785
785
  }
786
786
 
787
787
  /**
788
- * O que esta superfície faz quando uma tool gateada pede aprovação. Quatro variantes, nenhuma delas
789
- * "omissão" — cada uma com um consumidor concreto e uma razão escrita.
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
- /** humano: o pedido é EMITIDO e a execução pausa até a decisão chegar. */
792
+ /** There is a human: the request is EMITTED and execution pauses until the decision arrives. */
793
793
  kind: 'interactive';
794
794
  /**
795
- * Empurra o `ApprovalRequiredEvent` para o stream da superfície. OBRIGATÓRIO: `toAgentFactory`
796
- * devolve um handle cru, sem stream nem translator, então o sink vem de quem passa a postura —
797
- * que é justamente a superfície dona do stream. Um default no-op devolveria o descarte
798
- * silencioso pela porta dos fundos: o pedido seria "emitido" para lugar nenhum.
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
- /** Resolve a decisão humana; a execução fica pausada até isto resolver. */
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
- /** Ninguém pergunta e a tool roda. Legítimo quando outra coisa confina a execução. */
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
- /** Ninguém pergunta e a tool NÃO rodaa leitura segura da omissão (codex `GranularApprovalConfig`). */
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
- * O gate é conduzido pela SUPERFÍCIE servidora (o cliente ACP, pelo próprio protocolo), então
814
- * a camada não instala plugin nenhum. É um bypass — mas um bypass NOMEADO, com razão escrita,
815
- * que aparece no `match`, aparece em log e pode ser contado por um gate. O que ele substitui é
816
- * pior: hoje o mesmo efeito acontece por omissão, sem nada disso.
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
- * ## Por que este tipo mora aqui
825
+ * ## Why this type lives here
826
826
  *
827
- * Até o M82 a assinatura era `Readonly<Record<string, unknown>>`: qualquer chave era aceita e cada
828
- * handler recebia `ctx: unknown`. O consumidor que quisesse tipo tinha de declarar o seue foi
829
- * exatamente o que o agent-builder fez, com um alias local de cinco handlers, quatro deles com
830
- * `ctx: unknown` porque não havia de onde importar os contextos.
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 ownand 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
- * É a mesma classe que o M81 fechou com `discoverSubagents`: conhecimento do framework reimplementado
833
- * no app porque o framework não o publicava. O tipo nasce onde o conhecimento mora.
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
- * ## Sobre `transform_tool_result`
835
+ * ## About `transform_tool_result`
836
836
  *
837
- * Este é o ÚNICO canal de estágio-de-tool cujo retorno o SDK aplica — `#runTransform` dobra o valor
838
- * devolvido; `#runFireAndForget`, usado por `post_tool_call`, descarta. Desde o M82 seu contexto
839
- * carrega `toolCalls`, de modo que uma política com escopo (por nome de tool) possa AGIR sobre o
840
- * resultado em vez de apenas observá-lo.
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
- * Handlers de ciclo de vida chaveados por `HookName`.
844
+ * Lifecycle handlers keyed by `HookName`.
845
845
  *
846
- * Cada campo é opcional: um agente registra os eventos que lhe interessam. `.hooks()` aceita a
847
- * UNIÃO deste tipo com o shape solto de antes (ADR-4 do M82), então não é preciso index signature
848
- * implícita para o valor passar no call site — o estreitamento é gradual, não uma quebra.
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
- * Roda ANTES da tool. Devolver `{ block: true, message }` VETA a chamadaé o único hook com
853
- * poder de veto.
852
+ * Runs BEFORE the tool. Returning `{ block: true, message }` VETOES the callthe only hook with
853
+ * veto power.
854
854
  */
855
855
  pre_tool_call?: (ctx: PreToolCallContext) => Promise<PreToolCallDecision | undefined> | PreToolCallDecision | undefined;
856
856
  /**
857
- * Roda DEPOIS da tool, com `{name, args, result}`. Fire-and-forget: o retorno é **descartado**
858
- * pelo SDK. Para AGIR sobre o resultado use {@link transform_tool_result}.
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
- * Dobra os resultados de tool do turn antes de eles subirem ao modelo. Desde o M82 o contexto traz
863
- * `toolCalls` — plural, porque o seam recebe o LOTE do turn; correlacione por
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
- /** Dobra o texto do modelo antes de ele ser consumido. Sem tool call envolvida. */
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
- * Uma definição, ou um THUNK que a produz por sessão.
1002
+ * A definition, or a THUNK that produces one per session.
1003
1003
  *
1004
- * M91 — a linha do `apiKey` logo abaixo aceitava thunk desde o M74, adicionada por **exatamente**
1005
- * esta razão. A assimetria tinha uma linha de largura e custava caro: com a forma objeto, trust, hooks,
1006
- * skills e MCP ficam congelados no load do módulo. Num processo `theokit acp` que uma IDE mantém aberto
1007
- * por horas, isso reintroduz a obsolescência que o M67 removeu ao mover a construção para o entry point.
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 DefinicaoOuThunk = AgentDefinition | ((sessionId: string) => AgentDefinition | Promise<AgentDefinition>);
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 (INQUEBRÁVEL): @theokit/sdk is the ONLY agent runtime.
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
- * O mínimo que um turno devolve. Estrutural de propósito (ADR-2 do M91).
1125
+ * The minimum a turn returns. Structural on purpose (M91's ADR-2).
1126
1126
  *
1127
- * Re-exportar o tipo do SDK amarraria a assinatura pública desta camada à dele o oposto do que a
1128
- * fronteira existe para fazer, e a mesma razão pela qual `SdkAgentHandle` era um alias em vez de um
1127
+ * Re-exporting the SDK's type would tie this layer's public signature to theirsthe 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
- /** Opções por turno. Aberto por orao SDK aceita mais do que a camada precisa declarar. */
1140
+ /** Per-turn options. Open for nowthe 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
- * O `unknown` de retorno custava ao consumidor um módulo inteiro: `agents/lib/goal/runner-facade.ts`,
1147
- * 38 linhas cujo único trabalho era re-estreitar este retorno para o contrato `send → wait` que o
1148
- * loop de goal exige. O docstring daquele módulo registra que, antes dele, o chamador escrevia
1149
- * `as never` — e que **foi sob essa capa que a superfície goal divergiu do agente real por vários
1150
- * milestones**. A camada sempre soube a forma; ela não a declarava.
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
- * A forma é **assíncrona**: `SDKAgent.send` devolve `Promise<Run>`, e o `GoalLoopAgent` do SDK
1153
- * declara `send(prompt): Promise<{ wait(): Promise<…> }>`. A primeira tentativa deste milestone
1154
- * tipou como síncrona e o `tsc` do consumidor não teria pegoo `as never` do facade absorvia a
1155
- * diferença. É literalmente a divergência que o docstring do facade descrevia, reencontrada ao
1156
- * tentar removê-lo.
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 itthe 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 — a superfície DECLARA sua {@link ApprovalPosture} e o factory instala o plugin que a variante
1171
- * exige. Antes, o mapa `compiled.hitl` era compilado e DESCARTADO aqui. Rationale em
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: DefinicaoOuThunk, opts: {
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 — aceita `ModelSelection` além do id cru. A implementação do SDK **sempre** aceitou
1362
- * (`agent-builder.ts:50`: `model(m: string | ModelSelection)`); era esta fachada que estreitava
1363
- * para `string`, e o estreitamento tornava inalcançável qualquer campo da seleçãoincluindo o
1364
- * `contextWindow` que o SDK passou a publicar. Fachada divergindo da implementação é a mesma
1365
- * classe de defeito que o M91 pagou dois patches para corrigir.
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
- * referencia: knowledge-base/references/mastra agentic-loop/index.ts (stopWhen + maxSteps).
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
- * Orçamento de DELEGAÇÃO estourado custo em dólares de um agente delegado.
1662
+ * DELEGATION budget exceededthe dollar cost of a delegated agent.
1662
1663
  *
1663
- * ## Por que o nome mudou no M91
1664
+ * ## Why the name changed in M91
1664
1665
  *
1665
- * Chamava-se `BudgetExceededError` e **sombreava** a classe homônima do SDK, que é de outro domínio:
1666
- * orçamento de JANELA de contexto (`budgetName`/`window`/`mode`) contra orçamento de DELEGAÇÃO
1667
- * (`agentName`/`actualCost`). Como o consumidor tem regra inquebrável de nunca importar `@theokit/sdk`
1668
- * direto, ele **nunca conseguia alcançar a do SDK** — e um `instanceof` contra este barril casava
1669
- * silenciosamente com o domínio errado.
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
- * É o modo de falha que o M73 documentou em `auth-parity.test.ts`: quando duas classes competem pelo
1672
- * mesmo nome, nenhum teste de comportamento fica vermelho o `toBe` de identidade pega.
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 redonly an identity `toBe` catches it.
1673
1674
  *
1674
- * `subpath-coverage.test.ts` registrava a colisão como `lacuna` de `./errors`, com a razão escrita e o
1675
- * reconhecimento de que renomear era breaking e estava fora do escopo do M78. O M91 pagou a conta.
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}. Alias mantido por uma major para não quebrar
1685
- * quem captura pelo nome antigo; é a **mesma** classe, não uma cópia — `instanceof` continua valendo
1686
- * nos dois sentidos, e um teste de identidade referencial (`toBe`) trava isso.
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
- * referencia: knowledge-base/references/mastra agentic-loop/index.ts (onIterationComplete → { feedback, continue }).
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
- * referencia: knowledge-base/references/mastra agent.ts (re-enter the loop with feedback).
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 DefinicaoOuThunk 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 };
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 DefinicaoOuThunk, _ 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-ofFpOe-j.js';
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';
package/dist/bridge.js CHANGED
@@ -47,7 +47,7 @@ import {
47
47
  streamAgentUIMessages,
48
48
  toAgentFactory,
49
49
  translateSdkEvent
50
- } from "./chunk-NSJDG6XE.js";
50
+ } from "./chunk-PHUNONZT.js";
51
51
  export {
52
52
  AGENT_BRAND,
53
53
  AgentBuilder,