@theokit/sdk 5.11.0 → 5.11.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.
- package/CHANGELOG.md +23 -0
- package/dist/{agent-GWKRARAL.js → agent-DFV52V6E.js} +7 -7
- package/dist/{agent-GWKRARAL.js.map → agent-DFV52V6E.js.map} +1 -1
- package/dist/{agent-5DOR5T3E.cjs → agent-OKP4LHG2.cjs} +8 -8
- package/dist/{agent-5DOR5T3E.cjs.map → agent-OKP4LHG2.cjs.map} +1 -1
- package/dist/{chunk-5OHB5HJF.cjs → chunk-35KBC4BX.cjs} +133 -93
- package/dist/chunk-35KBC4BX.cjs.map +1 -0
- package/dist/{chunk-N7ZIPW2N.cjs → chunk-3JANYJYS.cjs} +3 -3
- package/dist/{chunk-N7ZIPW2N.cjs.map → chunk-3JANYJYS.cjs.map} +1 -1
- package/dist/{chunk-Z5BAFHPU.js → chunk-6G4IRQUD.js} +3 -3
- package/dist/{chunk-Z5BAFHPU.js.map → chunk-6G4IRQUD.js.map} +1 -1
- package/dist/{chunk-74OA5DIM.js → chunk-BBJ77S62.js} +3 -3
- package/dist/{chunk-74OA5DIM.js.map → chunk-BBJ77S62.js.map} +1 -1
- package/dist/{chunk-5H2GJXGC.cjs → chunk-EQ5NCH2Y.cjs} +4 -4
- package/dist/{chunk-5H2GJXGC.cjs.map → chunk-EQ5NCH2Y.cjs.map} +1 -1
- package/dist/{chunk-TE6XVTOA.js → chunk-JLIRFWUG.js} +47 -17
- package/dist/chunk-JLIRFWUG.js.map +1 -0
- package/dist/{chunk-YEHQ3SIC.cjs → chunk-JV7JA7BM.cjs} +5 -5
- package/dist/{chunk-YEHQ3SIC.cjs.map → chunk-JV7JA7BM.cjs.map} +1 -1
- package/dist/{chunk-4PHSVR2R.js → chunk-MHIBYKWA.js} +83 -43
- package/dist/chunk-MHIBYKWA.js.map +1 -0
- package/dist/{chunk-WPO3VCY4.cjs → chunk-N7KS3TIR.cjs} +47 -17
- package/dist/chunk-N7KS3TIR.cjs.map +1 -0
- package/dist/{chunk-BZKF7TXX.cjs → chunk-P5N3Q2NH.cjs} +22 -22
- package/dist/{chunk-BZKF7TXX.cjs.map → chunk-P5N3Q2NH.cjs.map} +1 -1
- package/dist/{chunk-7Y23B7XX.js → chunk-Q34EBNYG.js} +3 -3
- package/dist/{chunk-7Y23B7XX.js.map → chunk-Q34EBNYG.js.map} +1 -1
- package/dist/{chunk-HI3W37FY.js → chunk-U27XHOEF.js} +3 -3
- package/dist/{chunk-HI3W37FY.js.map → chunk-U27XHOEF.js.map} +1 -1
- package/dist/{compact-session-F2UDGZCN.js → compact-session-4HAUP3HK.js} +4 -4
- package/dist/{compact-session-F2UDGZCN.js.map → compact-session-4HAUP3HK.js.map} +1 -1
- package/dist/{compact-session-2AETONOS.cjs → compact-session-Y56D3S57.cjs} +13 -13
- package/dist/{compact-session-2AETONOS.cjs.map → compact-session-Y56D3S57.cjs.map} +1 -1
- package/dist/cron.cjs +7 -7
- package/dist/cron.js +6 -6
- package/dist/eval.cjs +6 -6
- package/dist/eval.js +5 -5
- package/dist/index.cjs +33 -33
- package/dist/index.js +9 -9
- package/dist/{inject-session-E5UDFVLI.js → inject-session-LJX5JGV5.js} +3 -3
- package/dist/{inject-session-E5UDFVLI.js.map → inject-session-LJX5JGV5.js.map} +1 -1
- package/dist/{inject-session-W4UKACYJ.cjs → inject-session-R73PRM7B.cjs} +4 -4
- package/dist/{inject-session-W4UKACYJ.cjs.map → inject-session-R73PRM7B.cjs.map} +1 -1
- package/dist/internal/error-mappers/openai-compatible.d.ts +3 -1
- package/dist/internal/memory/adapters/index.cjs +3 -3
- package/dist/internal/memory/adapters/index.js +2 -2
- package/docs/error-codes.md +6 -3
- package/package.json +1 -1
- package/dist/chunk-4PHSVR2R.js.map +0 -1
- package/dist/chunk-5OHB5HJF.cjs.map +0 -1
- package/dist/chunk-TE6XVTOA.js.map +0 -1
- package/dist/chunk-WPO3VCY4.cjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.11.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#740](https://github.com/usetheokit/theokit-sdk/pull/740) [`f5ee221`](https://github.com/usetheokit/theokit-sdk/commit/f5ee2218c3fc7dfba0b87de64c7472b8fd7184e8) Thanks [@usetheodev](https://github.com/usetheodev)! - `run.cancel()` on a local run now aborts the provider request. Until now it only set the status to `cancelled`: the LLM request kept streaming, `onDelta` kept receiving updates, and the provider billed the whole generation. The run now aborts the request, stops waiting for in-flight tool calls and passes the abort to custom tool handlers through `ctx.signal`, and delivers no update to `onDelta` once it is terminal. Shell commands and MCP tool calls receive no abort and keep running until they finish. A run cancelled while its MCP servers start up runs no turn, and still closes the MCP clients it owns. A cancelled turn reports no `usage` or `cost`: its result resolves when you cancel, before the turn's usage is collected. A `BudgetTracker` receives no tokens for a cancelled turn either, although the provider bills what it generated before the abort. A failed `close()` of a run-owned MCP client is now reported as a diagnostic naming the server, where it used to be dropped. Once a run is cancelled, `stream()`, `events()` and `conversation()` stop growing: the `[aborted]` message and the conversation the turn returns while it winds down are no longer added after `wait()` has resolved.
|
|
8
|
+
|
|
9
|
+
- [#744](https://github.com/usetheokit/theokit-sdk/pull/744) [`afb44b1`](https://github.com/usetheokit/theokit-sdk/commit/afb44b14153b15ddf482e78b89b4541f7c99836f) Thanks [@usetheodev](https://github.com/usetheodev)! - A provider that answers HTTP 404 because it does not serve the requested model now fails the run with a `ConfigurationError` whose message names the model. Until now OpenRouter's 404 for a retired model id (`No endpoints found for deepseek/deepseek-r1.`) became an `UnknownAgentError` with code `openrouter_unknown`, and neither the error nor `result.error.message` said which model was refused. The run now reports `result.error.code` `model_unavailable`, the error's `code` is `<provider>_model_unavailable`, and the message ends with the provider's own text when the provider sends one. OpenAI's 404 with code `model_not_found` gets the same class, at every OpenAI-compatible call site. OpenRouter's other "No endpoints found" 404s, for a request your data policy or the model's tool support rules out, report the same `model_unavailable` code; the provider's text in the message tells them apart. Any other 404, such as a wrong path, is still an `UnknownAgentError` with its old message.
|
|
10
|
+
|
|
11
|
+
- [#743](https://github.com/usetheokit/theokit-sdk/pull/743) [`a87a239`](https://github.com/usetheokit/theokit-sdk/commit/a87a23961f2804e37575b12a8f7a5bb59f0b8bd7) Thanks [@usetheodev](https://github.com/usetheodev)! - The `thinking-completed` update now arrives when the reasoning ends: before the first `text-delta`
|
|
12
|
+
of a turn that reasons and then answers. It used to arrive after the whole turn's stream, so a UI
|
|
13
|
+
that closed its reasoning block on it kept the block open until the answer had finished.
|
|
14
|
+
|
|
15
|
+
`thinkingDurationMs` on that update, and `thinking_duration_ms` on the replayed `thinking` message,
|
|
16
|
+
are now the reasoning span: the time of the last reasoning delta minus the time of the first. They
|
|
17
|
+
used to run until the end of the stream and so included the answer. In a live OpenRouter recording
|
|
18
|
+
the reported value was 19076 ms for 8282 ms of reasoning. Reasoning that arrives in a single delta,
|
|
19
|
+
with no delta after it, reports 0.
|
|
20
|
+
|
|
21
|
+
A turn that reasons and then calls a tool, or that ends without text, still sends the update at the
|
|
22
|
+
end of the stream, with the same duration rule. Each turn with reasoning still sends exactly one
|
|
23
|
+
`thinking-completed`; reasoning that arrives after the answer started is shown and replayed but
|
|
24
|
+
sends no second one.
|
|
25
|
+
|
|
3
26
|
## 5.11.0
|
|
4
27
|
|
|
5
28
|
### Minor Changes
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export { Agent } from './chunk-
|
|
1
|
+
export { Agent } from './chunk-MHIBYKWA.js';
|
|
2
2
|
import './chunk-XKMVJ443.js';
|
|
3
|
-
import './chunk-
|
|
3
|
+
import './chunk-Q34EBNYG.js';
|
|
4
4
|
import './chunk-K2BQQ445.js';
|
|
5
5
|
import './chunk-DPY2M74T.js';
|
|
6
6
|
import './chunk-ZHWKT2NI.js';
|
|
7
7
|
import './chunk-2SFBB54R.js';
|
|
8
|
-
import './chunk-
|
|
8
|
+
import './chunk-U27XHOEF.js';
|
|
9
9
|
import './chunk-H73MEMQB.js';
|
|
10
10
|
import './chunk-OR6XIWLB.js';
|
|
11
11
|
import './chunk-X3LOJJMO.js';
|
|
12
12
|
import './chunk-IZDDSLL2.js';
|
|
13
|
-
import './chunk-
|
|
13
|
+
import './chunk-BBJ77S62.js';
|
|
14
14
|
import './chunk-SUVCHX4L.js';
|
|
15
15
|
import './chunk-2XC6KDJM.js';
|
|
16
|
-
import './chunk-
|
|
16
|
+
import './chunk-JLIRFWUG.js';
|
|
17
17
|
import './chunk-24MGQDK3.js';
|
|
18
18
|
import './chunk-XERM7PDQ.js';
|
|
19
19
|
import './chunk-HKCKOAIO.js';
|
|
@@ -58,5 +58,5 @@ import './chunk-H3CVJSFC.js';
|
|
|
58
58
|
import './chunk-Q7GYMXVC.js';
|
|
59
59
|
import './chunk-B5MHRQJZ.js';
|
|
60
60
|
import './chunk-CZJ6Q7CW.js';
|
|
61
|
-
//# sourceMappingURL=agent-
|
|
62
|
-
//# sourceMappingURL=agent-
|
|
61
|
+
//# sourceMappingURL=agent-DFV52V6E.js.map
|
|
62
|
+
//# sourceMappingURL=agent-DFV52V6E.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"agent-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"agent-DFV52V6E.js"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk35KBC4BX_cjs = require('./chunk-35KBC4BX.cjs');
|
|
4
4
|
require('./chunk-J6GXS5A2.cjs');
|
|
5
|
-
require('./chunk-
|
|
5
|
+
require('./chunk-3JANYJYS.cjs');
|
|
6
6
|
require('./chunk-BUUUWQMB.cjs');
|
|
7
7
|
require('./chunk-L3C6CCBG.cjs');
|
|
8
8
|
require('./chunk-KIKKTW5O.cjs');
|
|
9
9
|
require('./chunk-BV2MWEMV.cjs');
|
|
10
|
-
require('./chunk-
|
|
10
|
+
require('./chunk-JV7JA7BM.cjs');
|
|
11
11
|
require('./chunk-GHX4P3V2.cjs');
|
|
12
12
|
require('./chunk-TMKTSYDS.cjs');
|
|
13
13
|
require('./chunk-ZD66GFH5.cjs');
|
|
14
14
|
require('./chunk-NQVWSSX2.cjs');
|
|
15
|
-
require('./chunk-
|
|
15
|
+
require('./chunk-P5N3Q2NH.cjs');
|
|
16
16
|
require('./chunk-CQYBJOB2.cjs');
|
|
17
17
|
require('./chunk-YJNYDJ2T.cjs');
|
|
18
|
-
require('./chunk-
|
|
18
|
+
require('./chunk-N7KS3TIR.cjs');
|
|
19
19
|
require('./chunk-QOGNZMHD.cjs');
|
|
20
20
|
require('./chunk-ZAM7BJXJ.cjs');
|
|
21
21
|
require('./chunk-2ZPEDVLM.cjs');
|
|
@@ -65,7 +65,7 @@ require('./chunk-6LHQPOMI.cjs');
|
|
|
65
65
|
|
|
66
66
|
Object.defineProperty(exports, "Agent", {
|
|
67
67
|
enumerable: true,
|
|
68
|
-
get: function () { return
|
|
68
|
+
get: function () { return chunk35KBC4BX_cjs.Agent; }
|
|
69
69
|
});
|
|
70
|
-
//# sourceMappingURL=agent-
|
|
71
|
-
//# sourceMappingURL=agent-
|
|
70
|
+
//# sourceMappingURL=agent-OKP4LHG2.cjs.map
|
|
71
|
+
//# sourceMappingURL=agent-OKP4LHG2.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"agent-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"agent-OKP4LHG2.cjs"}
|