@theokit/agents 0.30.1 → 0.30.2
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/{bridge-entry-DVhOQc_f.d.ts → bridge-entry-DzSZRp22.d.ts} +6 -2
- package/dist/bridge.d.ts +1 -1
- package/dist/bridge.js +1 -1
- package/dist/{chunk-XCQNYAVU.js → chunk-QJKU2YMC.js} +11 -2
- package/dist/chunk-QJKU2YMC.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-XCQNYAVU.js.map +0 -1
|
@@ -626,8 +626,12 @@ interface DefineAgentConfig<TInput extends z.ZodType = z.ZodType> {
|
|
|
626
626
|
system?: string;
|
|
627
627
|
/** Extended-thinking effort (mirrors `@Agent({ reasoningEffort })`). */
|
|
628
628
|
reasoningEffort?: ReasoningEffort;
|
|
629
|
-
/**
|
|
630
|
-
|
|
629
|
+
/**
|
|
630
|
+
* Pre-built tools. Accepts the `@theokit/sdk` `CustomTool` that `defineAgentTool`
|
|
631
|
+
* (theokit/server) and every `@theokit/sdk-tools` factory return (issue #81) — they are
|
|
632
|
+
* normalized to the internal {@link CompiledTool} shape at compile time.
|
|
633
|
+
*/
|
|
634
|
+
tools?: readonly CustomTool[];
|
|
631
635
|
}
|
|
632
636
|
/** A branded agent definition — the value {@link defineAgent} returns. */
|
|
633
637
|
type AgentDefinition<TInput extends z.ZodType = z.ZodType> = DefineAgentConfig<TInput> & {
|
package/dist/bridge.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-DzSZRp22.js';
|
|
2
2
|
import '@theokit/http';
|
|
3
3
|
import './skills-Dx_KJ6Eg.js';
|
|
4
4
|
import '@theokit/sdk';
|
package/dist/bridge.js
CHANGED
|
@@ -1389,12 +1389,21 @@ function isAgentDefinition(value) {
|
|
|
1389
1389
|
return typeof value === "object" && value !== null && value[AGENT_BRAND] === true;
|
|
1390
1390
|
}
|
|
1391
1391
|
__name(isAgentDefinition, "isAgentDefinition");
|
|
1392
|
+
function toCompiledTool(tool) {
|
|
1393
|
+
return {
|
|
1394
|
+
name: tool.name,
|
|
1395
|
+
description: tool.description,
|
|
1396
|
+
inputSchema: tool.inputSchema,
|
|
1397
|
+
handler: /* @__PURE__ */ __name((input) => tool.handler(input), "handler")
|
|
1398
|
+
};
|
|
1399
|
+
}
|
|
1400
|
+
__name(toCompiledTool, "toCompiledTool");
|
|
1392
1401
|
function compileAgentDefinition(def) {
|
|
1393
1402
|
return {
|
|
1394
1403
|
model: def.model,
|
|
1395
1404
|
reasoningEffort: def.reasoningEffort,
|
|
1396
1405
|
systemPrompt: def.system,
|
|
1397
|
-
tools: def.tools ?? [],
|
|
1406
|
+
tools: (def.tools ?? []).map(toCompiledTool),
|
|
1398
1407
|
agents: {},
|
|
1399
1408
|
stream: true
|
|
1400
1409
|
};
|
|
@@ -2316,4 +2325,4 @@ export {
|
|
|
2316
2325
|
generateAgentManifest,
|
|
2317
2326
|
agentsPlugin
|
|
2318
2327
|
};
|
|
2319
|
-
//# sourceMappingURL=chunk-
|
|
2328
|
+
//# sourceMappingURL=chunk-QJKU2YMC.js.map
|