@theokit/sdk 2.11.1 → 2.11.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/CHANGELOG.md +6 -0
- package/dist/a2a/index.cjs +13 -6
- package/dist/a2a/index.cjs.map +1 -1
- package/dist/a2a/index.js +13 -6
- package/dist/a2a/index.js.map +1 -1
- package/dist/{cron-CZlMLA1K.d.ts → cron-BRfFPEKY.d.ts} +1 -1
- package/dist/{cron-BNI8pyn_.d.cts → cron-DOw-Hqol.d.cts} +1 -1
- package/dist/cron.cjs +13 -6
- package/dist/cron.cjs.map +1 -1
- package/dist/cron.d.cts +2 -2
- package/dist/cron.d.ts +2 -2
- package/dist/cron.js +13 -6
- package/dist/cron.js.map +1 -1
- package/dist/{errors-FKoM44Mj.d.cts → errors-9yw4UQwX.d.cts} +1 -1
- package/dist/{errors-C8EVGqje.d.ts → errors-DFiY-NHK.d.ts} +1 -1
- package/dist/errors.d.cts +2 -2
- package/dist/eval.cjs +13 -6
- package/dist/eval.cjs.map +1 -1
- package/dist/eval.js +13 -6
- package/dist/eval.js.map +1 -1
- package/dist/index.cjs +13 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +13 -6
- package/dist/index.js.map +1 -1
- package/dist/internal/llm/types.d.ts +8 -0
- package/dist/{run-D22b53SU.d.cts → run-TMdc7gmo.d.cts} +7 -0
- package/dist/{run-D22b53SU.d.ts → run-TMdc7gmo.d.ts} +7 -0
- package/dist/types/run.d.ts +7 -0
- package/package.json +1 -1
package/dist/errors.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { A as AgentDisposedError, c as AgentRunError, d as AgentRunErrorCode, e as AuthenticationError, g as BudgetExceededError, C as ConfigurationError, u as CredentialPoolExhaustedError, E as ErrorCode, m as ErrorMetadata, I as IntegrationNotConnectedError, n as InvalidTaskIdError, K as KnownAgentRunErrorCode, M as MemoryAdapterError, o as MemoryAdapterErrorCode, N as NetworkError, R as RateLimitError, p as TaskNotFoundError, T as TheokitAgentError, U as UnknownAgentError, q as UnsupportedBudgetOperationError, r as UnsupportedRunOperationError, s as UnsupportedTaskOperationError, t as isTransientError } from './errors-
|
|
2
|
-
import './run-
|
|
1
|
+
export { A as AgentDisposedError, c as AgentRunError, d as AgentRunErrorCode, e as AuthenticationError, g as BudgetExceededError, C as ConfigurationError, u as CredentialPoolExhaustedError, E as ErrorCode, m as ErrorMetadata, I as IntegrationNotConnectedError, n as InvalidTaskIdError, K as KnownAgentRunErrorCode, M as MemoryAdapterError, o as MemoryAdapterErrorCode, N as NetworkError, R as RateLimitError, p as TaskNotFoundError, T as TheokitAgentError, U as UnknownAgentError, q as UnsupportedBudgetOperationError, r as UnsupportedRunOperationError, s as UnsupportedTaskOperationError, t as isTransientError } from './errors-9yw4UQwX.cjs';
|
|
2
|
+
import './run-TMdc7gmo.cjs';
|
package/dist/eval.cjs
CHANGED
|
@@ -8547,6 +8547,9 @@ async function streamLlmTurn(inputs, ctx) {
|
|
|
8547
8547
|
const effort = reasoningEffortFromParams(inputs.model.params);
|
|
8548
8548
|
return effort !== void 0 ? { reasoning: { effort } } : {};
|
|
8549
8549
|
})(),
|
|
8550
|
+
// Step-cap force-close: forward the per-run tool gate (`"none"` on a ceiling round forces a
|
|
8551
|
+
// text close even though tools are advertised). Absent ⇒ provider default (auto).
|
|
8552
|
+
...inputs.toolChoice !== void 0 ? { toolChoice: inputs.toolChoice } : {},
|
|
8550
8553
|
messages: ctx.messages,
|
|
8551
8554
|
tools: ctx.tools.map(toLlmTool)
|
|
8552
8555
|
},
|
|
@@ -11121,6 +11124,14 @@ function applyReasoningRequest(body, effort, providerName) {
|
|
|
11121
11124
|
}
|
|
11122
11125
|
body.reasoning = { effort };
|
|
11123
11126
|
}
|
|
11127
|
+
function applyToolsRequest(body, request) {
|
|
11128
|
+
if (request.tools === void 0 || request.tools.length === 0) return;
|
|
11129
|
+
body.tools = request.tools.map((tool) => ({
|
|
11130
|
+
type: "function",
|
|
11131
|
+
function: { name: tool.name, description: tool.description, parameters: tool.inputSchema }
|
|
11132
|
+
}));
|
|
11133
|
+
if (request.toolChoice !== void 0) body.tool_choice = request.toolChoice;
|
|
11134
|
+
}
|
|
11124
11135
|
function buildOpenAIBody(request, providerName) {
|
|
11125
11136
|
const messages = [];
|
|
11126
11137
|
const systemText = openAISystemText(request.system);
|
|
@@ -11142,12 +11153,7 @@ function buildOpenAIBody(request, providerName) {
|
|
|
11142
11153
|
if (request.temperature !== void 0) body.temperature = request.temperature;
|
|
11143
11154
|
if (request.reasoning?.effort !== void 0)
|
|
11144
11155
|
applyReasoningRequest(body, request.reasoning.effort, providerName);
|
|
11145
|
-
|
|
11146
|
-
body.tools = request.tools.map((tool) => ({
|
|
11147
|
-
type: "function",
|
|
11148
|
-
function: { name: tool.name, description: tool.description, parameters: tool.inputSchema }
|
|
11149
|
-
}));
|
|
11150
|
-
}
|
|
11156
|
+
applyToolsRequest(body, request);
|
|
11151
11157
|
const responseFormat = encodeOpenAIResponseFormat(request.responseFormat);
|
|
11152
11158
|
if (responseFormat !== void 0) body.response_format = responseFormat;
|
|
11153
11159
|
return body;
|
|
@@ -11990,6 +11996,7 @@ function buildLoopInputs(options, runId, userText) {
|
|
|
11990
11996
|
...options.systemPrompt !== void 0 ? { systemPrompt: options.systemPrompt } : {},
|
|
11991
11997
|
...options.onStep !== void 0 ? { onStep: options.onStep } : {},
|
|
11992
11998
|
...options.onDelta !== void 0 ? { onDelta: options.onDelta } : {},
|
|
11999
|
+
...options.sendOptions.toolChoice !== void 0 ? { toolChoice: options.sendOptions.toolChoice } : {},
|
|
11993
12000
|
...options.priorMessages !== void 0 ? { priorMessages: options.priorMessages } : {},
|
|
11994
12001
|
...options.memoryTools !== void 0 && options.memoryTools.length > 0 ? { memoryTools: options.memoryTools } : {},
|
|
11995
12002
|
...buildCustomToolsInput(
|