@theokit/sdk 5.14.0 → 5.15.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 +35 -0
- package/dist/{agent-T34LCGQM.js → agent-66U5QCPF.js} +18 -17
- package/dist/{agent-T34LCGQM.js.map → agent-66U5QCPF.js.map} +1 -1
- package/dist/{agent-DExqjqYy.d.cts → agent-BL4kxgwq.d.cts} +30 -214
- package/dist/{agent-Dfw3VsIX.d.ts → agent-ByDx7K30.d.ts} +30 -214
- package/dist/{agent-TL4K7BTG.cjs → agent-CB27KF6O.cjs} +19 -18
- package/dist/{agent-TL4K7BTG.cjs.map → agent-CB27KF6O.cjs.map} +1 -1
- package/dist/agent.d.ts +2 -3
- package/dist/{batch-EP3FCL6D.js → batch-N2XDYZED.js} +4 -4
- package/dist/{batch-EP3FCL6D.js.map → batch-N2XDYZED.js.map} +1 -1
- package/dist/{batch-IZ5EDKJ5.cjs → batch-VFR2MAUE.cjs} +7 -7
- package/dist/{batch-IZ5EDKJ5.cjs.map → batch-VFR2MAUE.cjs.map} +1 -1
- package/dist/{chunk-ZOL3L4EH.js → chunk-26GI3OYA.js} +118 -21
- package/dist/chunk-26GI3OYA.js.map +1 -0
- package/dist/{chunk-2WY2OFSC.cjs → chunk-26UQG242.cjs} +616 -318
- package/dist/chunk-26UQG242.cjs.map +1 -0
- package/dist/{chunk-2C24NSNV.js → chunk-3BBTHFGJ.js} +3 -3
- package/dist/{chunk-2C24NSNV.js.map → chunk-3BBTHFGJ.js.map} +1 -1
- package/dist/{chunk-SNVYOX46.cjs → chunk-3E3VSMB6.cjs} +160 -63
- package/dist/chunk-3E3VSMB6.cjs.map +1 -0
- package/dist/{chunk-NP362THY.cjs → chunk-3F53FLQ7.cjs} +5 -7
- package/dist/chunk-3F53FLQ7.cjs.map +1 -0
- package/dist/{chunk-SXH37C7X.cjs → chunk-55LLQFHW.cjs} +6 -6
- package/dist/{chunk-SXH37C7X.cjs.map → chunk-55LLQFHW.cjs.map} +1 -1
- package/dist/{chunk-ZJAYFSVI.js → chunk-7ACS6P5Z.js} +5 -7
- package/dist/chunk-7ACS6P5Z.js.map +1 -0
- package/dist/{chunk-WDVG5R2Q.cjs → chunk-AUH2EVWY.cjs} +4 -3
- package/dist/chunk-AUH2EVWY.cjs.map +1 -0
- package/dist/chunk-BNEUB52I.cjs +55 -0
- package/dist/chunk-BNEUB52I.cjs.map +1 -0
- package/dist/chunk-BPL5CVZ5.js +53 -0
- package/dist/chunk-BPL5CVZ5.js.map +1 -0
- package/dist/{chunk-NVQSBRG6.js → chunk-CBBT42VX.js} +3 -3
- package/dist/{chunk-NVQSBRG6.js.map → chunk-CBBT42VX.js.map} +1 -1
- package/dist/chunk-CHKV2L2Y.cjs +416 -0
- package/dist/chunk-CHKV2L2Y.cjs.map +1 -0
- package/dist/{chunk-LXG6VL6R.cjs → chunk-FBIDOOJM.cjs} +3 -3
- package/dist/{chunk-LXG6VL6R.cjs.map → chunk-FBIDOOJM.cjs.map} +1 -1
- package/dist/{chunk-354F3OF5.js → chunk-FGGVSHDW.js} +3 -3
- package/dist/{chunk-354F3OF5.js.map → chunk-FGGVSHDW.js.map} +1 -1
- package/dist/{chunk-6OCJWGVD.cjs → chunk-FTXY4D44.cjs} +4 -4
- package/dist/{chunk-6OCJWGVD.cjs.map → chunk-FTXY4D44.cjs.map} +1 -1
- package/dist/chunk-INVEGVGO.js +405 -0
- package/dist/chunk-INVEGVGO.js.map +1 -0
- package/dist/{chunk-DF77RBF4.js → chunk-LCCT5ZXJ.js} +6 -6
- package/dist/{chunk-DF77RBF4.js.map → chunk-LCCT5ZXJ.js.map} +1 -1
- package/dist/{chunk-G7XBVM3T.cjs → chunk-MHUOVS5I.cjs} +5 -5
- package/dist/{chunk-G7XBVM3T.cjs.map → chunk-MHUOVS5I.cjs.map} +1 -1
- package/dist/{chunk-CWQPQTUZ.cjs → chunk-NEH3BPFD.cjs} +15 -15
- package/dist/{chunk-CWQPQTUZ.cjs.map → chunk-NEH3BPFD.cjs.map} +1 -1
- package/dist/{chunk-5AR6O7GW.js → chunk-NK5EOTDY.js} +3 -3
- package/dist/{chunk-5AR6O7GW.js.map → chunk-NK5EOTDY.js.map} +1 -1
- package/dist/{chunk-NAVUTK6X.js → chunk-O2RCS3SJ.js} +3 -3
- package/dist/{chunk-NAVUTK6X.js.map → chunk-O2RCS3SJ.js.map} +1 -1
- package/dist/{chunk-4TEGFMSP.cjs → chunk-P7QYG4RZ.cjs} +23 -15
- package/dist/chunk-P7QYG4RZ.cjs.map +1 -0
- package/dist/chunk-PPU2D4FZ.js +19 -0
- package/dist/chunk-PPU2D4FZ.js.map +1 -0
- package/dist/{chunk-AB4OPJLD.js → chunk-RGVMJU57.js} +3 -3
- package/dist/{chunk-AB4OPJLD.js.map → chunk-RGVMJU57.js.map} +1 -1
- package/dist/{chunk-4KBI37F3.cjs → chunk-RTDVSHJR.cjs} +5 -5
- package/dist/{chunk-4KBI37F3.cjs.map → chunk-RTDVSHJR.cjs.map} +1 -1
- package/dist/{chunk-CJN5CEI3.js → chunk-RZL2W4C3.js} +23 -15
- package/dist/chunk-RZL2W4C3.js.map +1 -0
- package/dist/chunk-SPEN7RJU.cjs +18 -0
- package/dist/{chunk-R5UQL2R5.cjs.map → chunk-SPEN7RJU.cjs.map} +1 -1
- package/dist/{chunk-BZK5QL3N.cjs → chunk-TRPRTZEH.cjs} +4 -4
- package/dist/{chunk-BZK5QL3N.cjs.map → chunk-TRPRTZEH.cjs.map} +1 -1
- package/dist/{chunk-ZF2LDKQQ.cjs → chunk-U3DW3WDE.cjs} +9 -8
- package/dist/chunk-U3DW3WDE.cjs.map +1 -0
- package/dist/{chunk-H7G65PNI.js → chunk-VCQ37TC5.js} +3 -3
- package/dist/{chunk-H7G65PNI.js.map → chunk-VCQ37TC5.js.map} +1 -1
- package/dist/{chunk-3ONIVO2I.js → chunk-VNRNZ3WI.js} +3 -3
- package/dist/{chunk-3ONIVO2I.js.map → chunk-VNRNZ3WI.js.map} +1 -1
- package/dist/{chunk-SDZ4XDWS.cjs → chunk-VWYFGE27.cjs} +9 -9
- package/dist/{chunk-SDZ4XDWS.cjs.map → chunk-VWYFGE27.cjs.map} +1 -1
- package/dist/{chunk-RN3XDZGS.js → chunk-WM646HEN.js} +4 -3
- package/dist/chunk-WM646HEN.js.map +1 -0
- package/dist/chunk-X7CE7Y5W.js +305 -0
- package/dist/chunk-X7CE7Y5W.js.map +1 -0
- package/dist/{chunk-CGH4BCIY.cjs → chunk-XE3CAY6Z.cjs} +5 -5
- package/dist/{chunk-CGH4BCIY.cjs.map → chunk-XE3CAY6Z.cjs.map} +1 -1
- package/dist/chunk-XOU3CL7S.cjs +312 -0
- package/dist/chunk-XOU3CL7S.cjs.map +1 -0
- package/dist/{chunk-ULEK4OM4.js → chunk-YKNBTHMD.js} +3 -3
- package/dist/{chunk-ULEK4OM4.js.map → chunk-YKNBTHMD.js.map} +1 -1
- package/dist/{chunk-GARVAUCU.js → chunk-ZQWRUJHE.js} +534 -236
- package/dist/chunk-ZQWRUJHE.js.map +1 -0
- package/dist/{compact-session-D2MQDB6G.cjs → compact-session-CHBJOYWP.cjs} +16 -16
- package/dist/{compact-session-D2MQDB6G.cjs.map → compact-session-CHBJOYWP.cjs.map} +1 -1
- package/dist/{compact-session-N2PPHQO6.js → compact-session-F3J3FMEU.js} +7 -7
- package/dist/{compact-session-N2PPHQO6.js.map → compact-session-F3J3FMEU.js.map} +1 -1
- package/dist/{cron-CK2v0VWA.d.cts → cron-B7KH9sHW.d.cts} +2 -2
- package/dist/{cron-BubDpFJG.d.ts → cron-FEO7UAQF.d.ts} +2 -2
- package/dist/cron.cjs +18 -17
- package/dist/cron.d.cts +4 -3
- package/dist/cron.d.ts +4 -3
- package/dist/cron.js +17 -16
- package/dist/eval.cjs +17 -16
- package/dist/eval.cjs.map +1 -1
- package/dist/eval.js +16 -15
- package/dist/eval.js.map +1 -1
- package/dist/fs-session-store-CYNTEPJZ.cjs +20 -0
- package/dist/{fs-session-store-S2AXVJIX.cjs.map → fs-session-store-CYNTEPJZ.cjs.map} +1 -1
- package/dist/fs-session-store-MYQEVUFL.js +11 -0
- package/dist/{fs-session-store-6ZCCJX3K.js.map → fs-session-store-MYQEVUFL.js.map} +1 -1
- package/dist/{index-manager-HO456AVW.cjs → index-manager-2KH75BRW.cjs} +7 -7
- package/dist/{index-manager-HO456AVW.cjs.map → index-manager-2KH75BRW.cjs.map} +1 -1
- package/dist/{index-manager-QDH56FER.js → index-manager-NF2WRLOU.js} +6 -6
- package/dist/{index-manager-QDH56FER.js.map → index-manager-NF2WRLOU.js.map} +1 -1
- package/dist/index.cjs +66 -262
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -46
- package/dist/index.d.ts +10 -46
- package/dist/index.js +27 -227
- package/dist/index.js.map +1 -1
- package/dist/{inject-session-J26SHHIO.js → inject-session-LC2TROHM.js} +3 -3
- package/dist/{inject-session-J26SHHIO.js.map → inject-session-LC2TROHM.js.map} +1 -1
- package/dist/{inject-session-3ICZIJ2N.cjs → inject-session-T4RXANG3.cjs} +4 -4
- package/dist/{inject-session-3ICZIJ2N.cjs.map → inject-session-T4RXANG3.cjs.map} +1 -1
- package/dist/internal/agent-loop/doom-loop-tracker.d.ts +3 -0
- package/dist/internal/agent-loop/types.d.ts +6 -0
- package/dist/internal/error-mappers/anthropic.d.ts +3 -0
- package/dist/internal/error-mappers/openai-compatible.d.ts +2 -3
- package/dist/internal/llm/hermes-tool-extract.d.ts +2 -0
- package/dist/internal/local-agent/local-agent-dispatch.d.ts +3 -1
- package/dist/internal/local-agent/send-queue.d.ts +31 -0
- package/dist/internal/mcp/client.d.ts +2 -0
- package/dist/internal/mcp/oauth-bearer.d.ts +2 -0
- package/dist/internal/memory/adapters/index.cjs +3 -3
- package/dist/internal/memory/adapters/index.js +2 -2
- package/dist/internal/memory/dreaming/phases.d.ts +15 -0
- package/dist/internal/memory/dreaming/run.d.ts +29 -0
- package/dist/internal/memory/sdk-memory-peer-loader.d.ts +2 -0
- package/dist/internal/memory/storage/index.cjs +51 -35
- package/dist/internal/memory/storage/index.d.cts +2 -0
- package/dist/internal/memory/storage/index.d.ts +2 -0
- package/dist/internal/memory/storage/index.js +4 -4
- package/dist/internal/persistence/cwd-mutex.d.cts +4 -2
- package/dist/internal/persistence/cwd-mutex.d.ts +4 -2
- package/dist/internal/persistence/index.cjs +4 -4
- package/dist/internal/persistence/index.js +2 -2
- package/dist/internal/persistence/sqlite-session-store.d.cts +25 -0
- package/dist/internal/persistence/sqlite-session-store.d.ts +25 -0
- package/dist/internal/providers/registry.d.ts +5 -1
- package/dist/mcp-auth.cjs +25 -307
- package/dist/mcp-auth.cjs.map +1 -1
- package/dist/mcp-auth.js +5 -305
- package/dist/mcp-auth.js.map +1 -1
- package/dist/models.cjs +9 -9
- package/dist/models.js +2 -2
- package/dist/persistence.cjs +9 -4
- package/dist/persistence.cjs.map +1 -1
- package/dist/persistence.d.cts +744 -40
- package/dist/persistence.d.ts +744 -40
- package/dist/persistence.js +3 -2
- package/dist/persistence.js.map +1 -1
- package/dist/providers.cjs +4 -4
- package/dist/providers.js +2 -2
- package/dist/sandbox/docker-sandbox.d.cts +58 -0
- package/dist/sandbox/docker-sandbox.d.ts +58 -0
- package/dist/sandbox/index.cjs +129 -1
- package/dist/sandbox/index.cjs.map +1 -1
- package/dist/sandbox/index.d.cts +1 -0
- package/dist/sandbox/index.d.ts +1 -0
- package/dist/sandbox/index.js +132 -5
- package/dist/sandbox/index.js.map +1 -1
- package/dist/{sdk-agent-DwzHcuxy.d.cts → sdk-agent-BA_6_wtc.d.cts} +30 -2
- package/dist/{sdk-agent-a3fW1xUK.d.ts → sdk-agent-CnwPODYH.d.ts} +30 -2
- package/dist/session-store-Dh07jr9N.d.cts +209 -0
- package/dist/session-store-Dh07jr9N.d.ts +209 -0
- package/dist/sqlite-session-store-BbcpKY1L.d.ts +64 -0
- package/dist/sqlite-session-store-TKXtT4ON.d.cts +64 -0
- package/dist/subagents-loader-KLWF4QPD.cjs +16 -0
- package/dist/{subagents-loader-TXOA5EJJ.cjs.map → subagents-loader-KLWF4QPD.cjs.map} +1 -1
- package/dist/subagents-loader-SXETS2F2.js +7 -0
- package/dist/{subagents-loader-Z744TAKD.js.map → subagents-loader-SXETS2F2.js.map} +1 -1
- package/dist/subagents-loader.cjs +2 -2
- package/dist/subagents-loader.d.cts +3 -2
- package/dist/subagents-loader.d.ts +3 -2
- package/dist/subagents-loader.js +1 -1
- package/dist/types/agent.d.ts +14 -1
- package/dist/types/budget-tracker.d.ts +6 -2
- package/dist/types/hooks.d.ts +7 -1
- package/dist/types/mcp.d.ts +14 -0
- package/dist/types/run.d.ts +15 -1
- package/dist/workflow.d.cts +1 -1
- package/dist/workflow.d.ts +1 -1
- package/docs/adr/mutation-testing-scope.md +12 -2
- package/docs/error-codes.md +41 -40
- package/docs/harness-capability-map.md +32 -6
- package/package.json +1 -1
- package/dist/chunk-2WY2OFSC.cjs.map +0 -1
- package/dist/chunk-4TEGFMSP.cjs.map +0 -1
- package/dist/chunk-6CXRYPG7.cjs +0 -211
- package/dist/chunk-6CXRYPG7.cjs.map +0 -1
- package/dist/chunk-CJN5CEI3.js.map +0 -1
- package/dist/chunk-GARVAUCU.js.map +0 -1
- package/dist/chunk-MSEL5E5P.js +0 -204
- package/dist/chunk-MSEL5E5P.js.map +0 -1
- package/dist/chunk-NP362THY.cjs.map +0 -1
- package/dist/chunk-Q5EWJPRY.js +0 -18
- package/dist/chunk-Q5EWJPRY.js.map +0 -1
- package/dist/chunk-R5UQL2R5.cjs +0 -18
- package/dist/chunk-RN3XDZGS.js.map +0 -1
- package/dist/chunk-SNVYOX46.cjs.map +0 -1
- package/dist/chunk-WDVG5R2Q.cjs.map +0 -1
- package/dist/chunk-ZF2LDKQQ.cjs.map +0 -1
- package/dist/chunk-ZJAYFSVI.js.map +0 -1
- package/dist/chunk-ZOL3L4EH.js.map +0 -1
- package/dist/fs-session-store-6ZCCJX3K.js +0 -11
- package/dist/fs-session-store-S2AXVJIX.cjs +0 -20
- package/dist/subagents-loader-TXOA5EJJ.cjs +0 -16
- package/dist/subagents-loader-Z744TAKD.js +0 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkAUH2EVWY_cjs = require('./chunk-AUH2EVWY.cjs');
|
|
4
4
|
require('./chunk-YQ3XC6C2.cjs');
|
|
5
5
|
require('./chunk-6XQLTQB6.cjs');
|
|
6
6
|
var chunkCEGU5AVD_cjs = require('./chunk-CEGU5AVD.cjs');
|
|
@@ -23,7 +23,7 @@ function resolveSources(options) {
|
|
|
23
23
|
}
|
|
24
24
|
async function discoverSubagents(cwd, options) {
|
|
25
25
|
const sources = resolveSources(options);
|
|
26
|
-
return
|
|
26
|
+
return chunkAUH2EVWY_cjs.loadSubagents(cwd, sources.includes("project"), void 0, options?.compatSources ?? []);
|
|
27
27
|
}
|
|
28
28
|
async function loadSubagentDefinition(name, cwd, options) {
|
|
29
29
|
return (await discoverSubagents(cwd, options))[name];
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { a as AgentDefinition } from './agent-
|
|
2
|
-
import './sdk-agent-
|
|
1
|
+
import { a as AgentDefinition } from './agent-BL4kxgwq.cjs';
|
|
2
|
+
import './sdk-agent-BA_6_wtc.cjs';
|
|
3
3
|
import './agent-prims-CZyxfCmS.cjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import './errors-base-B5g01neU.cjs';
|
|
6
|
+
import './session-store-Dh07jr9N.cjs';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* A declared foreign source: a bare kind, or a kind with the surfaces it may be read for.
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { a as AgentDefinition } from './agent-
|
|
2
|
-
import './sdk-agent-
|
|
1
|
+
import { a as AgentDefinition } from './agent-ByDx7K30.js';
|
|
2
|
+
import './sdk-agent-CnwPODYH.js';
|
|
3
3
|
import './agent-prims-CZyxfCmS.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import './errors-base-B5g01neU.js';
|
|
6
|
+
import './session-store-Dh07jr9N.js';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* A declared foreign source: a bare kind, or a kind with the surfaces it may be read for.
|
package/dist/subagents-loader.js
CHANGED
package/dist/types/agent.d.ts
CHANGED
|
@@ -327,7 +327,8 @@ export type SystemPromptResolver = (ctx: SystemPromptContext) => string | Promis
|
|
|
327
327
|
*/
|
|
328
328
|
export interface SkillsSettings {
|
|
329
329
|
/**
|
|
330
|
-
* Names of skills the
|
|
330
|
+
* Names of skills the local runtime loads: a skill not named here cannot be listed or read.
|
|
331
|
+
* When omitted, every
|
|
331
332
|
* discovered skill is enabled.
|
|
332
333
|
*/
|
|
333
334
|
enabled?: string[];
|
|
@@ -743,6 +744,18 @@ export interface AgentOptions {
|
|
|
743
744
|
conversationId: string;
|
|
744
745
|
userId?: string;
|
|
745
746
|
}) => Promise<void> | void;
|
|
747
|
+
/**
|
|
748
|
+
* Start a fresh conversation when the agent has been idle this many minutes.
|
|
749
|
+
*
|
|
750
|
+
* Checked at the start of a local `send`: when more than this long has passed since the previous
|
|
751
|
+
* `send` on the same agent began, the in-memory conversation is cleared first, so the model
|
|
752
|
+
* receives no prior messages and `onBeforeSend` reports `previousMessageCount: 0`. Absent (the
|
|
753
|
+
* default), or not a positive finite number, never resets. The first send of a process has no
|
|
754
|
+
* previous send, so it never resets. The on-disk transcript is not deleted.
|
|
755
|
+
*
|
|
756
|
+
* @public
|
|
757
|
+
*/
|
|
758
|
+
sessionIdleResetMinutes?: number;
|
|
746
759
|
/**
|
|
747
760
|
* Fires before each `agent.send`. `previousMessageCount` is the count of
|
|
748
761
|
* messages already persisted BEFORE the current send adds the user
|
|
@@ -24,8 +24,12 @@ export interface BudgetUsageEvent {
|
|
|
24
24
|
readonly tokens: number;
|
|
25
25
|
/** Provider/model identifier (e.g., `"openai/gpt-4o-mini"`). */
|
|
26
26
|
readonly model: string;
|
|
27
|
-
/**
|
|
28
|
-
|
|
27
|
+
/**
|
|
28
|
+
* Whether this is an input (uncached prompt), output (completion), `cache_read` (prompt tokens
|
|
29
|
+
* served from the provider's cache) or `cache_write` (prompt tokens written to it) measurement.
|
|
30
|
+
* A tracker that has no separate rate for the cache types should treat them as input.
|
|
31
|
+
*/
|
|
32
|
+
readonly type: "input" | "output" | "cache_read" | "cache_write";
|
|
29
33
|
/** Optional ISO 8601 timestamp; defaults to now() if omitted. */
|
|
30
34
|
readonly at?: string;
|
|
31
35
|
}
|
package/dist/types/hooks.d.ts
CHANGED
|
@@ -18,7 +18,13 @@
|
|
|
18
18
|
*
|
|
19
19
|
* @public
|
|
20
20
|
*/
|
|
21
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* The five lifecycle events the runtime actually fires.
|
|
23
|
+
*
|
|
24
|
+
* `postRun` (once per run, including a failed run) is internal-only: it is reachable from the
|
|
25
|
+
* SDK's own hook config and spies, but `.theokit/hooks.json` (Claude Code event names) cannot
|
|
26
|
+
* register it, because no Claude Code event means "end of a run". `Stop` fires only on a finished run.
|
|
27
|
+
*/
|
|
22
28
|
export type HookEvent = "preRun" | "postRun" | "preToolUse" | "postToolUse" | "stop";
|
|
23
29
|
/**
|
|
24
30
|
* #631 — what the consumer is shown when asked to approve a hook.
|
package/dist/types/mcp.d.ts
CHANGED
|
@@ -30,6 +30,13 @@ export type McpStdioServerConfig = {
|
|
|
30
30
|
* policy and always wins. Pass `"all"` to restore full inheritance.
|
|
31
31
|
*/
|
|
32
32
|
envPolicy?: EnvPolicy;
|
|
33
|
+
/**
|
|
34
|
+
* Run the calls a model makes to this server's tools in ONE step one at a time, in the order the
|
|
35
|
+
* model listed them, instead of at once. Set it for a stateful server whose tools act on shared
|
|
36
|
+
* state, such as a browser MCP server where a snapshot must wait for the navigation before it.
|
|
37
|
+
* Calls to other servers or non-MCP tools in the same step are not held behind it. Default `false`.
|
|
38
|
+
*/
|
|
39
|
+
sequential?: boolean;
|
|
33
40
|
};
|
|
34
41
|
/**
|
|
35
42
|
* OAuth-style auth bundle for HTTP/SSE MCP servers.
|
|
@@ -81,6 +88,13 @@ export type McpHttpServerConfig = {
|
|
|
81
88
|
* `NetworkError` (`code: "mcp_timeout"`). Default 30_000.
|
|
82
89
|
*/
|
|
83
90
|
requestTimeoutMs?: number;
|
|
91
|
+
/**
|
|
92
|
+
* Run the calls a model makes to this server's tools in ONE step one at a time, in the order the
|
|
93
|
+
* model listed them, instead of at once. Set it for a stateful server whose tools act on shared
|
|
94
|
+
* state, such as a browser MCP server where a snapshot must wait for the navigation before it.
|
|
95
|
+
* Calls to other servers or non-MCP tools in the same step are not held behind it. Default `false`.
|
|
96
|
+
*/
|
|
97
|
+
sequential?: boolean;
|
|
84
98
|
};
|
|
85
99
|
/**
|
|
86
100
|
* Union of MCP server configs.
|
package/dist/types/run.d.ts
CHANGED
|
@@ -311,6 +311,8 @@ export type SDKImage = {
|
|
|
311
311
|
mimeType: string;
|
|
312
312
|
dimension?: SDKImageDimension;
|
|
313
313
|
};
|
|
314
|
+
/** How a message sent during a running turn is queued. See {@link SendOptions.queueMode}. @public */
|
|
315
|
+
export type QueueMode = "followup" | "steer" | "collect";
|
|
314
316
|
/**
|
|
315
317
|
* Structured form of `agent.send()`'s message argument. Use it to send images
|
|
316
318
|
* alongside text.
|
|
@@ -338,7 +340,7 @@ export interface SDKUserMessage {
|
|
|
338
340
|
* | rendering a live UI | `onDelta`, `onStep`, `onRunEvent` |
|
|
339
341
|
* | applying a policy | `permissionMode`, `activeTools`, `toolChoice`, `toolResultGuard`, `pruneToolResults`, `perToolTimeoutMs` |
|
|
340
342
|
* | running an eval or a harness | `maxIterations`, `completionCheck`, `doomLoop`, `signal` |
|
|
341
|
-
* | orchestrating agents | `origin`, `task`, `context` |
|
|
343
|
+
* | orchestrating agents | `origin`, `task`, `context`, `queueMode` |
|
|
342
344
|
* | overriding this one send | `model`, `systemPrompt`, `tools`, `mcpServers`, `contextPaths`, `local` |
|
|
343
345
|
*
|
|
344
346
|
* Every field appears in exactly one row, and
|
|
@@ -349,6 +351,18 @@ export interface SDKUserMessage {
|
|
|
349
351
|
* @public
|
|
350
352
|
*/
|
|
351
353
|
export interface SendOptions {
|
|
354
|
+
/**
|
|
355
|
+
* What to do with this message when the agent is ALREADY running a turn (local runtime only; a
|
|
356
|
+
* cloud agent always queues as `"followup"`). With no turn running, every mode just starts one.
|
|
357
|
+
*
|
|
358
|
+
* - `"followup"` (default) — wait for the running turn, then run as its own turn.
|
|
359
|
+
* - `"steer"` — inject the text into the RUNNING turn as a user message, picked up before the
|
|
360
|
+
* model's next call (after the current tool round). Resolves to the running turn's `Run`. If
|
|
361
|
+
* the turn ends before it can pick the message up, it runs as a followup turn instead.
|
|
362
|
+
* - `"collect"` — batch every `"collect"` message sent while a turn runs into ONE followup turn
|
|
363
|
+
* (texts joined by a blank line). Every collecting caller resolves to that same batched `Run`.
|
|
364
|
+
*/
|
|
365
|
+
queueMode?: QueueMode;
|
|
352
366
|
/**
|
|
353
367
|
* Per-send model override. SE8 — accepts a bare-string id shorthand
|
|
354
368
|
* (`"openai/gpt-4o-mini"`, normalized to `{ id }`) OR a {@link ModelSelection}
|
package/dist/workflow.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ZodType, z } from 'zod';
|
|
2
|
-
import { S as SDKAgent, _ as MessageOrigin } from './sdk-agent-
|
|
2
|
+
import { S as SDKAgent, _ as MessageOrigin } from './sdk-agent-BA_6_wtc.cjs';
|
|
3
3
|
import { T as TheokitAgentError } from './errors-base-B5g01neU.cjs';
|
|
4
4
|
import { C as CustomTool } from './agent-prims-CZyxfCmS.cjs';
|
|
5
5
|
|
package/dist/workflow.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ZodType, z } from 'zod';
|
|
2
|
-
import { S as SDKAgent, _ as MessageOrigin } from './sdk-agent-
|
|
2
|
+
import { S as SDKAgent, _ as MessageOrigin } from './sdk-agent-CnwPODYH.js';
|
|
3
3
|
import { T as TheokitAgentError } from './errors-base-B5g01neU.js';
|
|
4
4
|
import { C as CustomTool } from './agent-prims-CZyxfCmS.js';
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Mutation testing covers only the B-026 spike over `src/internal/llm`
|
|
2
2
|
|
|
3
|
-
- Status:
|
|
3
|
+
- Status: superseded by B-445 (Stryker scope extended to `packages/sdk/src`, see below)
|
|
4
4
|
- Date: 2026-10-17
|
|
5
5
|
- Decided by: human/paulo
|
|
6
6
|
- Soft cap dismissed: `auditor_unavailable_d4` (code-quality D4, mutation testing), for B-380
|
|
@@ -13,7 +13,7 @@ B-026. It was never wired into a gate. Its scope is narrow on purpose:
|
|
|
13
13
|
|
|
14
14
|
- `mutate` is `src/internal/llm/**/*.ts`, nothing else;
|
|
15
15
|
- it is meant to run from `packages/sdk` (`pnpm --filter exec`), so `jsonReporter.fileName` is
|
|
16
|
-
`../../reports/mutation/slice.json
|
|
16
|
+
`../../reports/mutation/slice.json` (now `reports/mutation/mutation.json`);
|
|
17
17
|
- `inPlace: true` is required because `packages/sdk/vitest.setup.ts` imports
|
|
18
18
|
`../../tools/preflight-native-bindings.mjs`, which escapes the package, so a sandbox copy fails
|
|
19
19
|
before it collects a test. The same commit records that `inPlace` restores file content but not
|
|
@@ -54,3 +54,13 @@ integration suites are still the only evidence for it.
|
|
|
54
54
|
only through this record.
|
|
55
55
|
- The record stops applying once the backlog item that extends Stryker lands. At that point it
|
|
56
56
|
should be marked superseded.
|
|
57
|
+
|
|
58
|
+
## Superseded (B-445)
|
|
59
|
+
|
|
60
|
+
This record is superseded by the record of the new scope: `stryker.config.json` now mutates
|
|
61
|
+
`packages/sdk/src/**/*.ts`, runs from the repository root and writes
|
|
62
|
+
`reports/mutation/mutation.json`, which is where the D4 detector reads it. So D4 reports a score for
|
|
63
|
+
items under `packages/sdk/src`, and the `auditor_unavailable_d4` dismissal above no longer applies.
|
|
64
|
+
`inPlace` still drops file modes, so `pnpm run mutation` snapshots the mode of every
|
|
65
|
+
`packages/*/bin/*.mjs` first and `tools/check-bin-modes.mjs verify` fails the run if any changed.
|
|
66
|
+
The full-scope run was not executed where this was written (no dependencies installed).
|
package/docs/error-codes.md
CHANGED
|
@@ -6,7 +6,7 @@ Branch on `code`, never on the message: messages carry context (an id, a path, a
|
|
|
6
6
|
|
|
7
7
|
**Transport codes vs the rest.** `ErrorCode` in `errors.ts` is the small canonical union a provider failure maps onto — the codes marked *transport* below. Everything else is raised by a specific subsystem at a specific place, and a `catch` that only handles the union will meet them anyway.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
257 distinct code(s).
|
|
10
10
|
|
|
11
11
|
| Code | Kind | Raised by | Sites |
|
|
12
12
|
|---|---|---|---|
|
|
@@ -17,11 +17,11 @@ Branch on `code`, never on the message: messages carry context (an id, a path, a
|
|
|
17
17
|
| `agent_id_already_exists` | domain | ConfigurationError | `packages/sdk/src/internal/agent/helpers.ts:59` |
|
|
18
18
|
| `agent_not_registered` | domain | UnknownAgentError | `packages/sdk/src/internal/cron/run-job.ts:61` |
|
|
19
19
|
| `agent_rehydration_failed` | domain | UnknownAgentError | `packages/sdk/src/internal/agent/helpers.ts:362` +1 |
|
|
20
|
-
| `anthropic_auth_failed` | domain | AuthenticationError | `packages/sdk/src/internal/error-mappers/anthropic.ts:
|
|
21
|
-
| `anthropic_rate_limit` | domain | RateLimitError | `packages/sdk/src/internal/error-mappers/anthropic.ts:
|
|
22
|
-
| `anthropic_server_error` | domain | NetworkError | `packages/sdk/src/internal/error-mappers/anthropic.ts:
|
|
23
|
-
| `anthropic_timeout` | domain | NetworkError | `packages/sdk/src/internal/error-mappers/anthropic.ts:
|
|
24
|
-
| `anthropic_unknown` | domain | UnknownAgentError | `packages/sdk/src/internal/error-mappers/anthropic.ts:
|
|
20
|
+
| `anthropic_auth_failed` | domain | AuthenticationError | `packages/sdk/src/internal/error-mappers/anthropic.ts:59` |
|
|
21
|
+
| `anthropic_rate_limit` | domain | RateLimitError | `packages/sdk/src/internal/error-mappers/anthropic.ts:62` |
|
|
22
|
+
| `anthropic_server_error` | domain | NetworkError | `packages/sdk/src/internal/error-mappers/anthropic.ts:74` |
|
|
23
|
+
| `anthropic_timeout` | domain | NetworkError | `packages/sdk/src/internal/error-mappers/anthropic.ts:71` |
|
|
24
|
+
| `anthropic_unknown` | domain | UnknownAgentError | `packages/sdk/src/internal/error-mappers/anthropic.ts:76` |
|
|
25
25
|
| `artifact_path_traversal` | domain | ConfigurationError | `packages/sdk/src/internal/cloud-agent/cloud-agent.ts:294` |
|
|
26
26
|
| `auth_failed` | domain | ConfigurationError, MemoryAdapterError | `packages/memory-honcho/src/adapter.ts:237` +10 |
|
|
27
27
|
| `auth_permission` | domain | — | `packages/sdk/src/internal/error-mappers/vertex.ts:49` |
|
|
@@ -41,19 +41,19 @@ Branch on `code`, never on the message: messages carry context (an id, a path, a
|
|
|
41
41
|
| `cloud_incompatible_function_resolver` | domain | ConfigurationError | `packages/sdk/src/internal/cloud-agent/cloud-tool-parity.ts:43` +2 |
|
|
42
42
|
| `cloud_incompatible_mcp_stdio_local` | domain | ConfigurationError | `packages/sdk/src/internal/cloud-agent/cloud-tool-parity.ts:74` |
|
|
43
43
|
| `cloud_plugin_path_rejected` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/plugin-loader/plugins-manager.ts:195` +1 |
|
|
44
|
-
| `cloud_run_http_error` | domain | NetworkError | `packages/sdk/src/internal/cloud-agent/real-cloud-run.ts:
|
|
45
|
-
| `cloud_run_unknown_status` | domain | NetworkError | `packages/sdk/src/internal/cloud-agent/real-cloud-run.ts:
|
|
46
|
-
| `cloud_runtime_pre_release` | domain | ConfigurationError | `packages/sdk/src/agent.ts:
|
|
44
|
+
| `cloud_run_http_error` | domain | NetworkError | `packages/sdk/src/internal/cloud-agent/real-cloud-run.ts:159` |
|
|
45
|
+
| `cloud_run_unknown_status` | domain | NetworkError | `packages/sdk/src/internal/cloud-agent/real-cloud-run.ts:292` +1 |
|
|
46
|
+
| `cloud_runtime_pre_release` | domain | ConfigurationError | `packages/sdk/src/agent.ts:435` +2 |
|
|
47
47
|
| `cloud_stdio_cwd_rejected` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/validation/validate-agent-options.ts:123` |
|
|
48
48
|
| `compression_failed` | domain | — | `packages/sdk/src/errors.ts:703` |
|
|
49
49
|
| `compression_model_unresolved` | domain | — | `packages/sdk/src/internal/runtime/compression/compression-model-registry.ts:102` +1 |
|
|
50
|
-
| `content_filtered` | domain | — | `packages/sdk/src/internal/error-mappers/openai-compatible.ts:
|
|
50
|
+
| `content_filtered` | domain | — | `packages/sdk/src/internal/error-mappers/openai-compatible.ts:135` |
|
|
51
51
|
| `context_config_shape` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/context/context-manager.ts:288` |
|
|
52
52
|
| `context_frontmatter_invalid` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/context/context-frontmatter.ts:38` |
|
|
53
53
|
| `context_json_invalid` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/context/context-manager.ts:282` |
|
|
54
54
|
| `context_read_error` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/context/context-manager.ts:269` |
|
|
55
55
|
| `context_sources_shape` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/context/context-manager.ts:309` |
|
|
56
|
-
| `context_too_long` | domain | — | `packages/sdk/src/internal/error-mappers/openai-compatible.ts:
|
|
56
|
+
| `context_too_long` | domain | — | `packages/sdk/src/internal/error-mappers/openai-compatible.ts:133` |
|
|
57
57
|
| `credential_pool_ambiguous` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/validation/validate-agent-options.ts:70` +1 |
|
|
58
58
|
| `credential_pool_empty` | domain | ConfigurationError | `packages/sdk/src/internal/llm/credential-pool.ts:91` |
|
|
59
59
|
| `cron_ambiguous_target` | domain | ConfigurationError | `packages/sdk/src/cron.ts:215` |
|
|
@@ -61,7 +61,7 @@ Branch on `code`, never on the message: messages carry context (an id, a path, a
|
|
|
61
61
|
| `cron_no_target` | domain | ConfigurationError | `packages/sdk/src/cron.ts:221` +1 |
|
|
62
62
|
| `cron_workflow_message` | domain | ConfigurationError | `packages/sdk/src/cron.ts:227` |
|
|
63
63
|
| `duplicate_skill_name` | domain | ConfigurationError | `packages/sdk/src/define-skill-read-tool.ts:166` |
|
|
64
|
-
| `duplicate_tool_name` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/validation/validate-agent-options.ts:
|
|
64
|
+
| `duplicate_tool_name` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/validation/validate-agent-options.ts:225` |
|
|
65
65
|
| `effective_tools_expected_options` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/validation/effective-tools.ts:102` +1 |
|
|
66
66
|
| `embedding_dimension_mismatch` | domain | ConfigurationError | `packages/sdk/src/internal/memory/lance-index.ts:146` +1 |
|
|
67
67
|
| `embedding_invalid_response` | domain | NetworkError | `packages/sdk/src/internal/memory/adapters/openai-compatible.ts:400` |
|
|
@@ -80,7 +80,7 @@ Branch on `code`, never on the message: messages carry context (an id, a path, a
|
|
|
80
80
|
| `handoff_target_invalid` | domain | ConfigurationError | `packages/sdk-handoff/src/handoff.ts:116` |
|
|
81
81
|
| `handoff_target_required` | domain | ConfigurationError | `packages/sdk-handoff/src/handoff.ts:111` |
|
|
82
82
|
| `hitl_timeout` | domain | HitlTimeoutError | `packages/sdk/src/internal/runtime/tools/hitl-middleware.ts:42` +1 |
|
|
83
|
-
| `hook_denied` | domain | ConfigurationError | `packages/sdk/src/internal/local-agent/local-agent.ts:
|
|
83
|
+
| `hook_denied` | domain | ConfigurationError | `packages/sdk/src/internal/local-agent/local-agent.ts:551` |
|
|
84
84
|
| `hooks_invalid_command` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/hooks/hooks-source.ts:415` |
|
|
85
85
|
| `hooks_json_invalid` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/hooks/hooks-source.ts:252` +2 |
|
|
86
86
|
| `hooks_read_error` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/hooks/hooks-source.ts:243` |
|
|
@@ -96,7 +96,7 @@ Branch on `code`, never on the message: messages carry context (an id, a path, a
|
|
|
96
96
|
| `invalid_concurrency` | domain | ConfigurationError | `packages/sdk/src/internal/agent/batch.ts:58` +1 |
|
|
97
97
|
| `invalid_context_window_margin` | domain | — | `packages/sdk/src/compaction.ts:278` +1 |
|
|
98
98
|
| `invalid_cron` | domain | ConfigurationError | `packages/sdk/src/internal/cron/validate.ts:35` +3 |
|
|
99
|
-
| `invalid_doom_loop_threshold` | domain | ConfigurationError | `packages/sdk/src/internal/agent-loop/doom-loop-tracker.ts:
|
|
99
|
+
| `invalid_doom_loop_threshold` | domain | ConfigurationError | `packages/sdk/src/internal/agent-loop/doom-loop-tracker.ts:51` |
|
|
100
100
|
| `invalid_filename_id` | domain | ConfigurationError | `packages/sdk/src/internal/security/path-guard.ts:486` |
|
|
101
101
|
| `invalid_identifier` | domain | ConfigurationError | `packages/sdk/src/internal/security/path-guard.ts:434` +2 |
|
|
102
102
|
| `invalid_input` | domain | MemoryAdapterError | `packages/memory-honcho/src/adapter.ts:98` +9 |
|
|
@@ -127,17 +127,18 @@ Branch on `code`, never on the message: messages carry context (an id, a path, a
|
|
|
127
127
|
| `local_provider_unreachable` | domain | ConfigurationError | `packages/sdk/src/internal/catalog/local-models.ts:46` |
|
|
128
128
|
| `malformed_api_key` | domain | AuthenticationError | `packages/sdk/src/internal/agent/helpers.ts:231` +1 |
|
|
129
129
|
| `max_delegation_depth` | domain | MaxDelegationDepthError | `packages/sdk/src/a2a/subagent.ts:239` +1 |
|
|
130
|
-
| `
|
|
131
|
-
| `
|
|
132
|
-
| `
|
|
133
|
-
| `
|
|
134
|
-
| `
|
|
135
|
-
| `
|
|
136
|
-
| `
|
|
130
|
+
| `mcp_auth_unsupported` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/validation/validate-agent-options.ts:140` +1 |
|
|
131
|
+
| `mcp_buffer_overflow` | domain | NetworkError | `packages/sdk/src/internal/mcp/client.ts:338` |
|
|
132
|
+
| `mcp_closed` | domain | NetworkError | `packages/sdk/src/internal/mcp/client.ts:313` |
|
|
133
|
+
| `mcp_crashed` | domain | NetworkError | `packages/sdk/src/internal/mcp/client.ts:228` |
|
|
134
|
+
| `mcp_disconnected` | domain | NetworkError | `packages/sdk/src/internal/mcp/client.ts:241` +2 |
|
|
135
|
+
| `mcp_http_error` | domain | NetworkError | `packages/sdk/src/internal/mcp/client.ts:510` +1 |
|
|
136
|
+
| `mcp_not_init` | domain | ConfigurationError | `packages/sdk/src/internal/mcp/client.ts:271` +2 |
|
|
137
|
+
| `mcp_timeout` | domain | NetworkError | `packages/sdk/src/internal/mcp/client.ts:71` |
|
|
137
138
|
| `memory_ceiling_reached` | domain | ConfigurationError | `packages/sdk/src/internal/memory/storage/fact-ceiling.ts:43` +1 |
|
|
138
139
|
| `memory_context_missing_user_id` | domain | ConfigurationError | `packages/sdk/src/internal/local-agent/local-agent-memory-direct.ts:128` |
|
|
139
140
|
| `memory_path_escapes_root` | domain | ConfigurationError | `packages/sdk/src/internal/memory/tools.ts:115` +1 |
|
|
140
|
-
| `memory_path_traversal` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/validation/validate-agent-options.ts:
|
|
141
|
+
| `memory_path_traversal` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/validation/validate-agent-options.ts:307` |
|
|
141
142
|
| `memory_threat_rejected` | domain | ConfigurationError | `packages/sdk/src/internal/memory/storage/markdown-store.ts:283` |
|
|
142
143
|
| `memory_tool_bad_args` | domain | ConfigurationError | `packages/sdk/src/internal/memory/tools.ts:138` +1 |
|
|
143
144
|
| `migration_destination_exists` | domain | ConfigurationError | `packages/sdk/src/internal/memory/migrate-sqlite-to-lance.ts:159` +1 |
|
|
@@ -183,15 +184,15 @@ Branch on `code`, never on the message: messages carry context (an id, a path, a
|
|
|
183
184
|
| `plugin_manifest_shape` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/plugin-loader/plugins-manager.ts:227` |
|
|
184
185
|
| `plugin_missing_manifest` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/plugin-loader/plugins-manager.ts:212` +2 |
|
|
185
186
|
| `programmatic_hooks_rejected` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/validation/validate-agent-options.ts:99` |
|
|
186
|
-
| `provider_unresolved` | domain | ConfigurationError | `packages/sdk/src/internal/llm/router.ts:
|
|
187
|
-
| `quota_exceeded` | domain | — | `packages/sdk/src/internal/error-mappers/openai-compatible.ts:
|
|
187
|
+
| `provider_unresolved` | domain | ConfigurationError | `packages/sdk/src/internal/llm/router.ts:110` +2 |
|
|
188
|
+
| `quota_exceeded` | domain | — | `packages/sdk/src/internal/error-mappers/openai-compatible.ts:144` |
|
|
188
189
|
| `rate_limit` | domain | — | `packages/sdk/src/internal/error-mappers/vertex.ts:47` |
|
|
189
190
|
| `rate_limited` | domain | MemoryAdapterError | `packages/memory-honcho/src/adapter.ts:244` +3 |
|
|
190
191
|
| `redirect_blocked` | domain | — | `packages/sdk-tools/src/internal/network-guard.ts:38` |
|
|
191
192
|
| `repo_provision_failed` | domain | — | `packages/sdk/src/sandbox/provision.ts:33` |
|
|
192
193
|
| `reserved_env_prefix` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/validation/validate-agent-options.ts:110` |
|
|
193
194
|
| `run_cancelled` | domain | — | `packages/sdk/src/errors.ts:656` |
|
|
194
|
-
| `run_not_found` | domain | UnknownAgentError | `packages/sdk/src/agent.ts:
|
|
195
|
+
| `run_not_found` | domain | UnknownAgentError | `packages/sdk/src/agent.ts:442` |
|
|
195
196
|
| `runtime_exclusive` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/validation/validate-agent-options.ts:90` |
|
|
196
197
|
| `sandbox_derived_helper_failed` | domain | ConfigurationError | `packages/sdk/src/sandbox/types.ts:223` +1 |
|
|
197
198
|
| `sandbox_not_available` | domain | SandboxNotAvailableError | `packages/sdk/src/sandbox/types.ts:108` +1 |
|
|
@@ -207,15 +208,15 @@ Branch on `code`, never on the message: messages carry context (an id, a path, a
|
|
|
207
208
|
| `sse_server_error` | domain | SubscriptionError | `packages/sdk/src/subscription/theokit-subscribe.ts:155` |
|
|
208
209
|
| `ssrf_blocked` | domain | — | `packages/sdk-tools/src/internal/network-guard.ts:23` |
|
|
209
210
|
| `stream_idle_timeout` | domain | NetworkError | `packages/sdk/src/internal/llm/sse.ts:95` |
|
|
210
|
-
| `stream_malformed_frame` | domain | NetworkError | `packages/sdk/src/internal/llm/anthropic.ts:
|
|
211
|
+
| `stream_malformed_frame` | domain | NetworkError | `packages/sdk/src/internal/llm/anthropic.ts:229` |
|
|
211
212
|
| `stream_truncated` | domain | NetworkError | `packages/sdk/src/internal/llm/anthropic.ts:189` +1 |
|
|
212
213
|
| `subagent_foreign_runtime_field` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/skills/subagents-loader.ts:245` |
|
|
213
214
|
| `subagent_mcp_unsupported_local` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/skills/subagents-loader.ts:272` |
|
|
214
|
-
| `subagent_missing_description` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/validation/validate-agent-options.ts:
|
|
215
|
-
| `subagent_missing_frontmatter` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/skills/subagents-loader.ts:
|
|
216
|
-
| `subagent_missing_prompt` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/validation/validate-agent-options.ts:
|
|
217
|
-
| `subagent_reasoning_effort_without_model` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/skills/subagents-loader.ts:
|
|
218
|
-
| `subagent_sandbox_not_boolean` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/skills/subagents-loader.ts:
|
|
215
|
+
| `subagent_missing_description` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/validation/validate-agent-options.ts:166` |
|
|
216
|
+
| `subagent_missing_frontmatter` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/skills/subagents-loader.ts:352` |
|
|
217
|
+
| `subagent_missing_prompt` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/validation/validate-agent-options.ts:171` |
|
|
218
|
+
| `subagent_reasoning_effort_without_model` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/skills/subagents-loader.ts:295` |
|
|
219
|
+
| `subagent_sandbox_not_boolean` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/skills/subagents-loader.ts:315` |
|
|
219
220
|
| `subagent_unknown_field` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/skills/subagents-loader.ts:249` |
|
|
220
221
|
| `subagent_unknown_setting_source` | domain | ConfigurationError | `packages/sdk/src/subagents-loader.ts:96` |
|
|
221
222
|
| `subscribe_baseUrl_missing` | domain | SubscriptionError | `packages/sdk/src/subscription/theokit-subscribe.ts:78` |
|
|
@@ -228,18 +229,18 @@ Branch on `code`, never on the message: messages carry context (an id, a path, a
|
|
|
228
229
|
| `task_not_found` | domain | — | `packages/sdk/src/task-errors.ts:53` +1 |
|
|
229
230
|
| `task_op_unsupported` | domain | — | `packages/sdk/src/task-errors.ts:73` +1 |
|
|
230
231
|
| `timeout` | domain | — | `packages/sdk/src/internal/error-mappers/vertex.ts:55` |
|
|
231
|
-
| `tool_invalid_name` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/validation/validate-agent-options.ts:
|
|
232
|
-
| `tool_invalid_schema_type` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/validation/validate-agent-options.ts:
|
|
233
|
-
| `tool_missing_description` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/validation/validate-agent-options.ts:
|
|
234
|
-
| `tool_missing_handler` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/validation/validate-agent-options.ts:
|
|
235
|
-
| `tool_missing_name` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/validation/validate-agent-options.ts:
|
|
236
|
-
| `tool_missing_schema` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/validation/validate-agent-options.ts:
|
|
237
|
-
| `tool_reserved_name` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/validation/validate-agent-options.ts:
|
|
232
|
+
| `tool_invalid_name` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/validation/validate-agent-options.ts:263` |
|
|
233
|
+
| `tool_invalid_schema_type` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/validation/validate-agent-options.ts:292` |
|
|
234
|
+
| `tool_missing_description` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/validation/validate-agent-options.ts:278` |
|
|
235
|
+
| `tool_missing_handler` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/validation/validate-agent-options.ts:250` |
|
|
236
|
+
| `tool_missing_name` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/validation/validate-agent-options.ts:258` |
|
|
237
|
+
| `tool_missing_schema` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/validation/validate-agent-options.ts:287` |
|
|
238
|
+
| `tool_reserved_name` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/validation/validate-agent-options.ts:269` |
|
|
238
239
|
| `transport_failure` | domain | NetworkError | `packages/sdk/src/internal/llm/transport-error.ts:48` |
|
|
239
|
-
| `transport_unavailable` | domain | ConfigurationError | `packages/sdk/src/internal/llm/router.ts:
|
|
240
|
+
| `transport_unavailable` | domain | ConfigurationError | `packages/sdk/src/internal/llm/router.ts:603` +1 |
|
|
240
241
|
| `unimplemented_budget_scope` | domain | ConfigurationError | `packages/sdk/src/internal/budget/registry.ts:58` +1 |
|
|
241
242
|
| `unknown` | domain | AgentRunError, MemoryAdapterError, TheokitAgentError | `packages/memory-honcho/src/adapter.ts:264` +5 |
|
|
242
|
-
| `unknown_agent` | domain | UnknownAgentError | `packages/sdk/src/agent.ts:
|
|
243
|
+
| `unknown_agent` | domain | UnknownAgentError | `packages/sdk/src/agent.ts:212` +1 |
|
|
243
244
|
| `unknown_artifact` | domain | UnknownAgentError | `packages/sdk/src/internal/cloud-agent/cloud-agent.ts:313` |
|
|
244
245
|
| `unknown_category` | domain | ConfigurationError | `packages/sdk-memory/src/internal/categorized-memory.ts:76` |
|
|
245
246
|
| `unknown_cron_job` | domain | UnknownAgentError | `packages/sdk/src/cron.ts:80` +2 |
|
|
@@ -4,7 +4,7 @@ Every public symbol the TheoKit workspace publishes, and the exact specifier to
|
|
|
4
4
|
|
|
5
5
|
A symbol listed under two specifiers is reachable from both, but that does NOT make the two interchangeable: a class emitted separately into a subpath entry is a distinct nominal type from the one in the root bundle, so passing one where the other is expected fails on a private field. When a symbol appears twice, import it and everything it is passed to from the SAME specifier.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
1293 export(s) across 54 entry point(s).
|
|
8
8
|
|
|
9
9
|
## `@theokit/acp`
|
|
10
10
|
|
|
@@ -309,6 +309,7 @@ A symbol listed under two specifiers is reachable from both, but that does NOT m
|
|
|
309
309
|
| `ProviderTransform` | interface | M41 — the one OPTIONAL behavior seam on a provider profile. |
|
|
310
310
|
| `ProviderTransformContext` | interface | M41 (agent-builder provider framework) — the context a provider's `transform` receives per request. |
|
|
311
311
|
| `PruneToolResultsOptions` | interface | B-564 — how old a tool result may get, in tool rounds, before its content is pruned from the next LLM request (`SendOptions.pruneToolResults`). |
|
|
312
|
+
| `QueueMode` | type | How a message sent during a running turn is queued. |
|
|
312
313
|
| `RateLimitError` | class | Too many requests or usage limits exceeded. |
|
|
313
314
|
| `readManagedSettings` | function | Read the deployed policy, or `{}` when none is. |
|
|
314
315
|
| `readSessionMessages` | function | Read the messages a session already contains, for a surface that needs to re-render it. |
|
|
@@ -397,6 +398,8 @@ A symbol listed under two specifiers is reachable from both, but that does NOT m
|
|
|
397
398
|
| `SkillsSettings` | interface | Skills configuration accepted by `Agent.create()` via {@link AgentOptions.skills } . |
|
|
398
399
|
| `SOVEREIGN_ENV_KEYS` | const | Variables a project-scoped source may never set. |
|
|
399
400
|
| `SovereignEnvKey` | type | The union of {@link SOVEREIGN_ENV_KEYS } entries — the variables a project-scoped `.env` may never set. |
|
|
401
|
+
| `SqliteSessionStore` | class | A {@link SessionStore } that keeps the native session records in one SQLite file instead of per-agent JSONL transcripts. |
|
|
402
|
+
| `SqliteSessionStoreOptions` | interface | Options for {@link SqliteSessionStore } . |
|
|
400
403
|
| `Squad` | class | A sequential agent team produced by {@link createSquad } . |
|
|
401
404
|
| `SquadOptions` | interface | Options for {@link createSquad } . |
|
|
402
405
|
| `SquadRun` | interface | Result of a {@link Squad.run } . |
|
|
@@ -572,8 +575,8 @@ A symbol listed under two specifiers is reachable from both, but that does NOT m
|
|
|
572
575
|
| `CircuitBreaker` | class | Stops calling a recall path that keeps timing out. |
|
|
573
576
|
| `CircuitBreakerOptions` | interface | Consecutive-timeout circuit breaker for Active Memory recall. |
|
|
574
577
|
| `claudeProjectMemoryDir` | function | Where the Claude Code CLI keeps THIS project's memories. |
|
|
575
|
-
| `Cluster` | interface | A group of facts the
|
|
576
|
-
| `ClusterResult` | interface | What
|
|
578
|
+
| `Cluster` | interface | A group of semantically similar facts, with the text chosen to represent them. |
|
|
579
|
+
| `ClusterResult` | interface | What clustering produced: the clusters and how many facts the per-sweep cap left out. |
|
|
577
580
|
| `cohereMemoryEmbeddingProviderAdapter` | const | Cohere embeddings. |
|
|
578
581
|
| `collectMarkdownFiles` | function | Every markdown file the memory corpus holds: the index, the per-memory files, `notes/`, `wiki/` and `sessions/`, each tagged with the bucket `memory_search`'s `corpus` filters on. |
|
|
579
582
|
| `CreateAdapterOptions` | interface | Per-call overrides handed to {@link MemoryEmbeddingProviderAdapter.create } . |
|
|
@@ -605,7 +608,7 @@ A symbol listed under two specifiers is reachable from both, but that does NOT m
|
|
|
605
608
|
| `discoverSessionFiles` | function | Every session summary under `<memory root>/sessions`, as `{ absolutePath, relPath }` records. |
|
|
606
609
|
| `discoverWikiFiles` | function | Every wiki supplement under `<memory root>/wiki`, as `{ absolutePath, relPath }` records. |
|
|
607
610
|
| `DreamingOptions` | interface | Dreaming sweep orchestrator (ADR D7 of memory-system-peer-project-parity). |
|
|
608
|
-
| `DreamingResult` | interface |
|
|
611
|
+
| `DreamingResult` | interface | Outcome of one dreaming sweep: counts before and after, and the note written. |
|
|
609
612
|
| `dropVectorIndex` | function | Drop the `embeddings` table, discarding every stored vector. |
|
|
610
613
|
| `EmbedAllArgs` | interface | Inputs for {@link embedMissingChunks } : the open database and the embedding runtime to call. |
|
|
611
614
|
| `EmbeddingCache` | interface | The cache contract the shared runtime writes through. |
|
|
@@ -631,7 +634,7 @@ A symbol listed under two specifiers is reachable from both, but that does NOT m
|
|
|
631
634
|
| `LanceSearchOptions` | interface | Filters for `LanceIndex.search`. |
|
|
632
635
|
| `lanceStoragePath` | function | `<memory root>/lance`. |
|
|
633
636
|
| `legacyMemoryJsonPath` | function | Resolve the legacy JSON memory path used pre-ADR-D8 (kept for migration helpers + tests). |
|
|
634
|
-
| `lightPhase` | function | Light phase — drop facts whose embedding is too similar to one already kept.
|
|
637
|
+
| `lightPhase` | function | Light phase — drop facts whose embedding is too similar to one already kept. |
|
|
635
638
|
| `listNotes` | function | List the `.md` files directly under `notes/`. |
|
|
636
639
|
| `loadSqliteVecExtension` | function | Load the `sqlite-vec` extension into an opened SQLite connection. |
|
|
637
640
|
| `mapOpenAICompatibleError` | function | Turn a failed OpenAI-shaped HTTP response into the typed error the SDK throws. |
|
|
@@ -697,7 +700,7 @@ A symbol listed under two specifiers is reachable from both, but that does NOT m
|
|
|
697
700
|
| `resolveMemoryRoot` | function | The memory root for this agent: `memory.directory` when set, the project store otherwise. |
|
|
698
701
|
| `runActiveMemory` | function | Run one blocking recall before the system prompt is assembled, and report what happened. |
|
|
699
702
|
| `RunActiveMemoryArgs` | interface | Everything {@link runActiveMemory } needs for one attempt. |
|
|
700
|
-
| `runDreamingSweep` | function | Run one
|
|
703
|
+
| `runDreamingSweep` | function | Run one dreaming sweep (dedupe, cluster, write a consolidated note), serialised per `cwd`. |
|
|
701
704
|
| `SCHEMA_STATEMENTS` | const | SQLite schema for the memory index. |
|
|
702
705
|
| `SearchOptions` | interface | Search tuning. |
|
|
703
706
|
| `SessionFile` | interface | Session summary discovery (ADR D20). |
|
|
@@ -880,6 +883,14 @@ A symbol listed under two specifiers is reachable from both, but that does NOT m
|
|
|
880
883
|
| `LogbookEntry` | type | One line of the log. |
|
|
881
884
|
| `ScreenshotLogbookResult` | type | The tool's result, before it is serialised to the JSON string the handler returns. |
|
|
882
885
|
|
|
886
|
+
## `@theokit/sdk-tools/secrets`
|
|
887
|
+
|
|
888
|
+
| Symbol | Kind | Summary |
|
|
889
|
+
|---|---|---|
|
|
890
|
+
| `createSecretsTool` | function | Create a tool that resolves `{{secret:NAME}}` references and masks secret values in output. |
|
|
891
|
+
| `CreateSecretsToolOptions` | interface | `secrets` — lets an agent USE a stored secret without the value reaching the model. |
|
|
892
|
+
| `SecretsTool` | interface | A secrets tool: a custom tool that can also wrap other tools with secret resolution. |
|
|
893
|
+
|
|
883
894
|
## `@theokit/sdk-tools/structured-output`
|
|
884
895
|
|
|
885
896
|
| Symbol | Kind | Summary |
|
|
@@ -1139,16 +1150,23 @@ A symbol listed under two specifiers is reachable from both, but that does NOT m
|
|
|
1139
1150
|
| `asMemoryRoot` | function | Treat a directory as a memory root without resolving one. |
|
|
1140
1151
|
| `ceilingReachedError` | function | The refusal of a new fact at a store's declared ceiling: where the store is, how many facts it holds, the ceiling, and what to consolidate. |
|
|
1141
1152
|
| `claudeProjectMemoryDir` | function | Where the Claude Code CLI keeps THIS project's memories. |
|
|
1153
|
+
| `Cluster` | interface | A group of semantically similar facts, with the text chosen to represent them. |
|
|
1154
|
+
| `ClusterResult` | interface | What clustering produced: the clusters and how many facts the per-sweep cap left out. |
|
|
1142
1155
|
| `collectMarkdownFiles` | function | Every markdown file the memory corpus holds: the index, the per-memory files, `notes/`, `wiki/` and `sessions/`, each tagged with the bucket `memory_search`'s `corpus` filters on. |
|
|
1156
|
+
| `DedupResult` | interface | Dreaming/REM phase logic. |
|
|
1157
|
+
| `deepPhase` | function | Deep phase — render consolidated markdown for the dreamed note. |
|
|
1143
1158
|
| `defaultIndexPath` | function | `<index root>/.index/memory.sqlite`. |
|
|
1144
1159
|
| `DiaryEntry` | interface | Dream-diary append (ADR D7). |
|
|
1145
1160
|
| `diaryPath` | function | `<memory root>/dream-diary.md`. |
|
|
1146
1161
|
| `DiscoveredFile` | interface | One markdown file the corpus walk found, with the source bucket the indexer tags it with. |
|
|
1147
1162
|
| `discoverSessionFiles` | function | Every session summary under `<memory root>/sessions`, as `{ absolutePath, relPath }` records. |
|
|
1148
1163
|
| `discoverWikiFiles` | function | Every wiki supplement under `<memory root>/wiki`, as `{ absolutePath, relPath }` records. |
|
|
1164
|
+
| `DreamingOptions` | interface | Dreaming sweep orchestrator (ADR D7 of memory-system-peer-project-parity). |
|
|
1165
|
+
| `DreamingResult` | interface | Outcome of one dreaming sweep: counts before and after, and the note written. |
|
|
1149
1166
|
| `entryHash` | function | A stable hash of one entry's counts, so two sweeps that did the same work read as the same work. |
|
|
1150
1167
|
| `indexBudgetWarning` | function | What to say about an index that the interop partner will truncate, or `undefined` when there is nothing true to say. |
|
|
1151
1168
|
| `lanceStoragePath` | function | `<memory root>/lance`. |
|
|
1169
|
+
| `lightPhase` | function | Light phase — drop facts whose embedding is too similar to one already kept. |
|
|
1152
1170
|
| `MEMORY_INDEX_MAX_BYTES` | const | The byte limit the Claude Code CLI applies when it loads a `MEMORY.md`, whichever it reaches first. |
|
|
1153
1171
|
| `MEMORY_INDEX_MAX_LINES` | const | The line limit the Claude Code CLI applies when it loads a `MEMORY.md`. |
|
|
1154
1172
|
| `memoryIndexRoot` | function | Where the search index belongs for this configuration (theokit-sdk#554). |
|
|
@@ -1162,9 +1180,11 @@ A symbol listed under two specifiers is reachable from both, but that does NOT m
|
|
|
1162
1180
|
| `readAllSqliteFacts` | function | Read all facts from the SQLite memory index. |
|
|
1163
1181
|
| `readFacts` | function | Every memory in the store, honouring the `enabled` gate on {@link MemoryConfig } : when memory is disabled the call resolves to `[]` without touching disk. |
|
|
1164
1182
|
| `readFactsFromMarkdown` | function | Every memory in the store: the per-memory files, plus any legacy `## Facts` bullets still in `MEMORY.md`. |
|
|
1183
|
+
| `remPhase` | function | REM phase — single-link agglomerative clustering by cosine similarity. |
|
|
1165
1184
|
| `renderDiaryEntry` | function | One diary entry as the markdown that gets appended: a timestamp heading, the short entry hash, and the counts the sweep produced. |
|
|
1166
1185
|
| `resolveMaxFacts` | function | The ceiling a caller declared, or `undefined` when none was declared. |
|
|
1167
1186
|
| `resolveMemoryRoot` | function | The memory root for this agent: `memory.directory` when set, the project store otherwise. |
|
|
1187
|
+
| `runDreamingSweep` | function | Run one dreaming sweep (dedupe, cluster, write a consolidated note), serialised per `cwd`. |
|
|
1168
1188
|
| `SessionFile` | interface | Session summary discovery (ADR D20). |
|
|
1169
1189
|
| `sessionsDir` | function | `<memory root>/sessions`. |
|
|
1170
1190
|
| `SessionSummaryInput` | interface | Per-run session summary writer (ADR D20). |
|
|
@@ -1320,6 +1340,8 @@ A symbol listed under two specifiers is reachable from both, but that does NOT m
|
|
|
1320
1340
|
| `SessionListing` | interface | One session found on disk. |
|
|
1321
1341
|
| `sessionUuidFor` | function | The transcript filename for an agent id — always a UUID. |
|
|
1322
1342
|
| `SessionWriterLease` | interface | A held writer lease. |
|
|
1343
|
+
| `SqliteSessionStore` | class | A {@link SessionStore } that keeps the native session records in one SQLite file instead of per-agent JSONL transcripts. |
|
|
1344
|
+
| `SqliteSessionStoreOptions` | interface | Options for {@link SqliteSessionStore } . |
|
|
1323
1345
|
| `TranscriptBlock` | type | A content block inside {@link TranscriptMessage } . |
|
|
1324
1346
|
| `TranscriptMessage` | interface | The message body of a {@link SessionRecord } . |
|
|
1325
1347
|
| `transcriptPath` | function | The `.jsonl` path for a session: `<baseDir>/projects/<encoded-cwd>/<session-uuid>.jsonl`. |
|
|
@@ -1368,6 +1390,10 @@ A symbol listed under two specifiers is reachable from both, but that does NOT m
|
|
|
1368
1390
|
| `CreateSandboxBackendOptions` | interface | Options for `createSandboxBackend`, which probes for bubblewrap and returns a {@link LinuxSandbox } when confinement is genuinely available or a `LocalSandbox` when it is not — warning once when th... |
|
|
1369
1391
|
| `detectBwrap` | function | Honest detection — fail-closed on every probe; NEVER throws (callers WARN + fall back). |
|
|
1370
1392
|
| `detectBwrapMemoized` | function | `detectBwrap` with memoization — what production should call. |
|
|
1393
|
+
| `DockerRunner` | type | Seam for tests: runs `docker <args>`, optionally feeding `input` to stdin. |
|
|
1394
|
+
| `DockerRunResult` | interface | Result of one `docker` invocation: captured output, exit code and whether it timed out. |
|
|
1395
|
+
| `DockerSandbox` | class | Sandbox backend that runs each command in a throwaway Docker container. |
|
|
1396
|
+
| `DockerSandboxConfig` | interface | Configuration for {@link DockerSandbox } . |
|
|
1371
1397
|
| `ExecuteResult` | interface | What a {@link SandboxBackend } returns for one command. |
|
|
1372
1398
|
| `interactiveWrapCommand` | function | The composition the interactive path needs — the counterpart of `createSandboxBackend`. |
|
|
1373
1399
|
| `InteractiveWrapOptions` | interface | Options for `interactiveWrapCommand`, the PTY counterpart of `createSandboxBackend`. |
|
package/package.json
CHANGED