@theokit/agents 4.28.0 → 4.29.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.
@@ -1226,10 +1226,16 @@ interface AgentBuilder<TInput extends z.ZodType | UnsetMarker = UnsetMarker, TMo
1226
1226
  /** Set the request schema (lifted into the typed client via {@link AgentDefinition}). */
1227
1227
  input<S extends z.ZodType>(schema: S): AgentBuilder<S, TModel, TContext, TTools>;
1228
1228
  /**
1229
- * Set the model id. Required before `.build()`. COMPILE ERROR when called twice — the argument
1229
+ * Set the model. Required before `.build()`. COMPILE ERROR when called twice — the argument
1230
1230
  * type collapses to `never` once the model is set (tRPC's set-once technique).
1231
+ *
1232
+ * M94 — aceita `ModelSelection` além do id cru. A implementação do SDK **sempre** aceitou
1233
+ * (`agent-builder.ts:50`: `model(m: string | ModelSelection)`); era esta fachada que estreitava
1234
+ * para `string`, e o estreitamento tornava inalcançável qualquer campo da seleção — incluindo o
1235
+ * `contextWindow` que o SDK passou a publicar. Fachada divergindo da implementação é a mesma
1236
+ * classe de defeito que o M91 pagou dois patches para corrigir.
1231
1237
  */
1232
- model(id: TModel extends UnsetMarker ? string : never): AgentBuilder<TInput, string, TContext, TTools>;
1238
+ model(id: TModel extends UnsetMarker ? string | ModelSelection : never): AgentBuilder<TInput, string, TContext, TTools>;
1233
1239
  /** Set the static system prompt. */
1234
1240
  system(prompt: string): AgentBuilder<TInput, TModel, TContext, TTools>;
1235
1241
  /** Set the extended-thinking effort. */
package/dist/bridge.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { h as AGENT_BRAND, i as AfterToolCallContext, j as AgentBuilder, k as AgentDefinition, l as AgentDefinitionError, m as AgentExecutionContext, n as AgentManifest, f as AgentManifestEntry, o as AgentManifestSource, p as AgentManifestTool, r as AgentRoute, t as AgentRouteContext, u as AgentRunInfo, v as AgentStreamEvent, w as AgentTurnMetadata, x as AgentsPluginOptions, y as ApiErrorContext, z as ApiErrorDecision, B as ApiErrorPolicy, E as ApprovalRequiredEvent, F as ArtifactChunkEvent, I as ArtifactStartEvent, J as BackgroundDelegation, K as BeforeToolCallContext, N as BudgetExceededError, P as CheckpointSavedEvent, C as CompiledAgentOptions, Q as CompiledContextWindow, a as CompiledTool, U as ContextualTool, X as DefineAgentConfig, Y as DefinicaoOuThunk, Z as DelegateFn, _ as DelegateOptions, $ as DelegationBudgetExceededError, a0 as DelegationError, D as DelegationResult, a1 as DoneEvent, a2 as ErrorEvent, a3 as FileEditEvent, a9 as InferAgentInput, aa as InferAgentToolNames, ab as IterationEvent, ac as LLMCallContext, ah as McpApprovalSpec, ai as McpRegistryConfig, aj as McpRequestContext, ak as McpSelection, al as PartialToolCallEvent, an as ProcessInputContext, ar as RunStartedEvent, as as ScoreVerdict, at as ScoredDelegation, au as Scorer, av as SdkAgentHandle, aw as SdkMessage, ax as SdkSendOptions, ay as SdkTurnHandle, az as Segment, aC as StateUpdateEvent, S as StreamEvent, aD as TextDeltaEvent, aE as ThinkingEvent, aG as ToolCallEvent, aH as ToolCallVeto, aI as ToolHooks, aJ as ToolHooksPlugin, aK as ToolResultEvent, aL as ToolWalkResult, aN as ToolboxWalkResult, aO as agentsPlugin, aP as buildModelSelection, aQ as compileAgentDefinition, aR as compileAgentModule, aS as compileContextWindow, aT as compileProjectContext, aU as compileSkills, aV as compileTools, aW as createAgentExecutionContext, aX as createApiErrorHandler, aY as createSdkAgentStream, aZ as createThinkTagExtractor, a_ as createToolHooksPlugin, a$ as delegate, b0 as delegateBackground, b1 as delegateWithScoring, b2 as extractThinkTagStream, b3 as generateAgentManifest, b4 as generateAgentRoutes, b5 as isAgentContext, b6 as isAgentDefinition, b7 as isApprovalRequired, b8 as isDone, b9 as isError, ba as isPartialToolCall, bb as isTextDelta, bc as isToolCall, bd as isToolResult, bg as mcpRegistry, bh as mcpToolApprovals, bj as presentUIMessageStream, bk as projectContextMetadataOnlyKnobs, bo as resolveMcpServers, bp as runWithApiErrorHandling, bq as streamAgentResponse, s as streamAgentUIMessages, br as toAgentFactory, bs as translateSdkEvent } from './bridge-entry-BBtYaYVe.js';
1
+ export { h as AGENT_BRAND, i as AfterToolCallContext, j as AgentBuilder, k as AgentDefinition, l as AgentDefinitionError, m as AgentExecutionContext, n as AgentManifest, f as AgentManifestEntry, o as AgentManifestSource, p as AgentManifestTool, r as AgentRoute, t as AgentRouteContext, u as AgentRunInfo, v as AgentStreamEvent, w as AgentTurnMetadata, x as AgentsPluginOptions, y as ApiErrorContext, z as ApiErrorDecision, B as ApiErrorPolicy, E as ApprovalRequiredEvent, F as ArtifactChunkEvent, I as ArtifactStartEvent, J as BackgroundDelegation, K as BeforeToolCallContext, N as BudgetExceededError, P as CheckpointSavedEvent, C as CompiledAgentOptions, Q as CompiledContextWindow, a as CompiledTool, U as ContextualTool, X as DefineAgentConfig, Y as DefinicaoOuThunk, Z as DelegateFn, _ as DelegateOptions, $ as DelegationBudgetExceededError, a0 as DelegationError, D as DelegationResult, a1 as DoneEvent, a2 as ErrorEvent, a3 as FileEditEvent, a9 as InferAgentInput, aa as InferAgentToolNames, ab as IterationEvent, ac as LLMCallContext, ah as McpApprovalSpec, ai as McpRegistryConfig, aj as McpRequestContext, ak as McpSelection, al as PartialToolCallEvent, an as ProcessInputContext, ar as RunStartedEvent, as as ScoreVerdict, at as ScoredDelegation, au as Scorer, av as SdkAgentHandle, aw as SdkMessage, ax as SdkSendOptions, ay as SdkTurnHandle, az as Segment, aC as StateUpdateEvent, S as StreamEvent, aD as TextDeltaEvent, aE as ThinkingEvent, aG as ToolCallEvent, aH as ToolCallVeto, aI as ToolHooks, aJ as ToolHooksPlugin, aK as ToolResultEvent, aL as ToolWalkResult, aN as ToolboxWalkResult, aO as agentsPlugin, aP as buildModelSelection, aQ as compileAgentDefinition, aR as compileAgentModule, aS as compileContextWindow, aT as compileProjectContext, aU as compileSkills, aV as compileTools, aW as createAgentExecutionContext, aX as createApiErrorHandler, aY as createSdkAgentStream, aZ as createThinkTagExtractor, a_ as createToolHooksPlugin, a$ as delegate, b0 as delegateBackground, b1 as delegateWithScoring, b2 as extractThinkTagStream, b3 as generateAgentManifest, b4 as generateAgentRoutes, b5 as isAgentContext, b6 as isAgentDefinition, b7 as isApprovalRequired, b8 as isDone, b9 as isError, ba as isPartialToolCall, bb as isTextDelta, bc as isToolCall, bd as isToolResult, bg as mcpRegistry, bh as mcpToolApprovals, bj as presentUIMessageStream, bk as projectContextMetadataOnlyKnobs, bo as resolveMcpServers, bp as runWithApiErrorHandling, bq as streamAgentResponse, s as streamAgentUIMessages, br as toAgentFactory, bs as translateSdkEvent } from './bridge-entry-C1m5EjfY.js';
2
2
  import '@theokit/http';
3
3
  import '@theokit/sdk';
4
4
  import 'zod';
package/dist/bridge.js CHANGED
@@ -44,7 +44,7 @@ import {
44
44
  streamAgentUIMessages,
45
45
  toAgentFactory,
46
46
  translateSdkEvent
47
- } from "./chunk-FPJ3MSRH.js";
47
+ } from "./chunk-3WTH25DJ.js";
48
48
  import "./chunk-7QVYU63E.js";
49
49
  export {
50
50
  AGENT_BRAND,
@@ -3528,4 +3528,4 @@ export {
3528
3528
  generateAgentManifest,
3529
3529
  agentsPlugin
3530
3530
  };
3531
- //# sourceMappingURL=chunk-FPJ3MSRH.js.map
3531
+ //# sourceMappingURL=chunk-3WTH25DJ.js.map