@theokit/sdk 2.11.1 → 2.11.3
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 +12 -0
- package/dist/a2a/index.cjs +23 -6
- package/dist/a2a/index.cjs.map +1 -1
- package/dist/a2a/index.js +23 -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 +23 -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 +23 -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 +23 -6
- package/dist/eval.cjs.map +1 -1
- package/dist/eval.js +23 -6
- package/dist/eval.js.map +1 -1
- package/dist/index.cjs +23 -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 +23 -6
- package/dist/index.js.map +1 -1
- package/dist/internal/llm/openai.d.ts +12 -0
- 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 +3 -3
|
@@ -42,6 +42,18 @@ interface OpenAIDeltaChunk {
|
|
|
42
42
|
cache_creation_input_tokens?: number;
|
|
43
43
|
cache_read_input_tokens?: number;
|
|
44
44
|
};
|
|
45
|
+
/**
|
|
46
|
+
* In-stream provider error. OpenRouter (and some OpenAI-compatible proxies)
|
|
47
|
+
* report auth / quota / rate-limit failures as an HTTP 200 SSE body carrying
|
|
48
|
+
* `data: {"error":{"message":"...","code":401}}` instead of a non-2xx status.
|
|
49
|
+
* Without surfacing this, the round finishes empty and the failure is silent
|
|
50
|
+
* (usetheodev/theocode#31).
|
|
51
|
+
*/
|
|
52
|
+
error?: {
|
|
53
|
+
message?: string;
|
|
54
|
+
code?: number | string;
|
|
55
|
+
type?: string;
|
|
56
|
+
};
|
|
45
57
|
}
|
|
46
58
|
export declare class OpenAIClient implements LlmClient {
|
|
47
59
|
private readonly options;
|
|
@@ -92,6 +92,14 @@ export interface LlmRequest {
|
|
|
92
92
|
reasoning?: {
|
|
93
93
|
effort: string;
|
|
94
94
|
};
|
|
95
|
+
/**
|
|
96
|
+
* Step-cap force-close: per-request tool gating. `"none"` tells the provider to emit no tool
|
|
97
|
+
* calls even when `tools` are present (forcing a text answer); `"required"` forces a tool call;
|
|
98
|
+
* `"auto"` (or omitted) is the default. Maps to OpenAI/OpenRouter `tool_choice`. The agent loop
|
|
99
|
+
* sets `"none"` on a final/ceiling round so a cached agent (whose tools cannot be un-registered)
|
|
100
|
+
* is still forced to produce a closing summary.
|
|
101
|
+
*/
|
|
102
|
+
toolChoice?: "auto" | "none" | "required";
|
|
95
103
|
}
|
|
96
104
|
export type LlmEvent = {
|
|
97
105
|
type: "text_delta";
|
|
@@ -827,6 +827,13 @@ interface SendOptions {
|
|
|
827
827
|
onDelta?: (args: {
|
|
828
828
|
update: InteractionUpdate;
|
|
829
829
|
}) => void | Promise<void>;
|
|
830
|
+
/**
|
|
831
|
+
* Per-call tool gate (OpenAI/OpenRouter `tool_choice`). `"none"` forces a text answer even when
|
|
832
|
+
* the agent has tools registered — used by an agent loop to force a closing summary at its step
|
|
833
|
+
* ceiling (a cached agent's tools cannot be un-registered, so the gate is per-send). `"required"`
|
|
834
|
+
* forces a tool call; `"auto"` (or omitted) is the default. Local runtime; OpenAI-compat providers.
|
|
835
|
+
*/
|
|
836
|
+
toolChoice?: "auto" | "none" | "required";
|
|
830
837
|
/** Local agents only. Expire a stuck active run before starting this message. */
|
|
831
838
|
local?: {
|
|
832
839
|
force?: boolean;
|
|
@@ -827,6 +827,13 @@ interface SendOptions {
|
|
|
827
827
|
onDelta?: (args: {
|
|
828
828
|
update: InteractionUpdate;
|
|
829
829
|
}) => void | Promise<void>;
|
|
830
|
+
/**
|
|
831
|
+
* Per-call tool gate (OpenAI/OpenRouter `tool_choice`). `"none"` forces a text answer even when
|
|
832
|
+
* the agent has tools registered — used by an agent loop to force a closing summary at its step
|
|
833
|
+
* ceiling (a cached agent's tools cannot be un-registered, so the gate is per-send). `"required"`
|
|
834
|
+
* forces a tool call; `"auto"` (or omitted) is the default. Local runtime; OpenAI-compat providers.
|
|
835
|
+
*/
|
|
836
|
+
toolChoice?: "auto" | "none" | "required";
|
|
830
837
|
/** Local agents only. Expire a stuck active run before starting this message. */
|
|
831
838
|
local?: {
|
|
832
839
|
force?: boolean;
|
package/dist/types/run.d.ts
CHANGED
|
@@ -221,6 +221,13 @@ export interface SendOptions {
|
|
|
221
221
|
onDelta?: (args: {
|
|
222
222
|
update: InteractionUpdate;
|
|
223
223
|
}) => void | Promise<void>;
|
|
224
|
+
/**
|
|
225
|
+
* Per-call tool gate (OpenAI/OpenRouter `tool_choice`). `"none"` forces a text answer even when
|
|
226
|
+
* the agent has tools registered — used by an agent loop to force a closing summary at its step
|
|
227
|
+
* ceiling (a cached agent's tools cannot be un-registered, so the gate is per-send). `"required"`
|
|
228
|
+
* forces a tool call; `"auto"` (or omitted) is the default. Local runtime; OpenAI-compat providers.
|
|
229
|
+
*/
|
|
230
|
+
toolChoice?: "auto" | "none" | "required";
|
|
224
231
|
/** Local agents only. Expire a stuck active run before starting this message. */
|
|
225
232
|
local?: {
|
|
226
233
|
force?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theokit/sdk",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.3",
|
|
4
4
|
"description": "TypeScript SDK for the Theo agent harness — same surface, local or cloud.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/usetheo/theokit-sdk#readme",
|
|
@@ -364,8 +364,8 @@
|
|
|
364
364
|
"typedoc": "^0.28.19",
|
|
365
365
|
"ws": "^8.18.0",
|
|
366
366
|
"zod": "^4.0.0",
|
|
367
|
-
"@theokit/sdk-
|
|
368
|
-
"@theokit/sdk-
|
|
367
|
+
"@theokit/sdk-memory": "0.2.0",
|
|
368
|
+
"@theokit/sdk-handoff": "0.1.0"
|
|
369
369
|
},
|
|
370
370
|
"scripts": {
|
|
371
371
|
"build": "tsup && cp src/internal/providers/provider-catalog.json dist/provider-catalog.json",
|