@theokit/sdk 5.12.1 → 5.14.0
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 +74 -0
- package/dist/{agent-Cn0sphpA.d.cts → agent-DExqjqYy.d.cts} +18 -3
- package/dist/{agent-CVzDy_Oj.d.ts → agent-Dfw3VsIX.d.ts} +18 -3
- package/dist/{agent-IG7BP6GN.js → agent-T34LCGQM.js} +11 -11
- package/dist/{agent-IG7BP6GN.js.map → agent-T34LCGQM.js.map} +1 -1
- package/dist/{agent-BVKIUP7F.cjs → agent-TL4K7BTG.cjs} +12 -12
- package/dist/{agent-BVKIUP7F.cjs.map → agent-TL4K7BTG.cjs.map} +1 -1
- package/dist/auth/index.cjs +17 -16
- package/dist/auth/index.cjs.map +1 -1
- package/dist/auth/index.js +5 -4
- package/dist/auth/index.js.map +1 -1
- package/dist/{chunk-NHOEXFZT.js → chunk-2HXTNVLM.js} +5 -2
- package/dist/chunk-2HXTNVLM.js.map +1 -0
- package/dist/{chunk-Q6WT5535.cjs → chunk-2WY2OFSC.cjs} +259 -79
- package/dist/chunk-2WY2OFSC.cjs.map +1 -0
- package/dist/{chunk-HN4IKB6X.cjs → chunk-2XWAYCFM.cjs} +15 -13
- package/dist/chunk-2XWAYCFM.cjs.map +1 -0
- package/dist/{chunk-3FSBE4PS.js → chunk-3GTN4HOO.js} +10 -6
- package/dist/chunk-3GTN4HOO.js.map +1 -0
- package/dist/{chunk-VVGFZQZC.js → chunk-3LMVJTNJ.js} +9 -5
- package/dist/chunk-3LMVJTNJ.js.map +1 -0
- package/dist/{chunk-4GUFNDZR.js → chunk-3ONIVO2I.js} +3 -3
- package/dist/{chunk-4GUFNDZR.js.map → chunk-3ONIVO2I.js.map} +1 -1
- package/dist/{chunk-7WARNHWW.cjs → chunk-3UMPP553.cjs} +5 -2
- package/dist/chunk-3UMPP553.cjs.map +1 -0
- package/dist/{chunk-NWWTYBD3.cjs → chunk-4KBI37F3.cjs} +5 -5
- package/dist/{chunk-NWWTYBD3.cjs.map → chunk-4KBI37F3.cjs.map} +1 -1
- package/dist/{chunk-S46WJTDL.cjs → chunk-4TEGFMSP.cjs} +6 -6
- package/dist/{chunk-S46WJTDL.cjs.map → chunk-4TEGFMSP.cjs.map} +1 -1
- package/dist/{chunk-QISSETTG.cjs → chunk-5645PMVU.cjs} +6 -4
- package/dist/chunk-5645PMVU.cjs.map +1 -0
- package/dist/{chunk-ZLFFDPXC.js → chunk-73IITAF7.js} +36 -14
- package/dist/chunk-73IITAF7.js.map +1 -0
- package/dist/{chunk-5A4UFBHW.cjs → chunk-A77UMVMD.cjs} +15 -11
- package/dist/chunk-A77UMVMD.cjs.map +1 -0
- package/dist/{chunk-IO4RI5ZJ.cjs → chunk-BZK5QL3N.cjs} +4 -4
- package/dist/{chunk-IO4RI5ZJ.cjs.map → chunk-BZK5QL3N.cjs.map} +1 -1
- package/dist/{chunk-5HSMH2ZZ.js → chunk-CJN5CEI3.js} +4 -4
- package/dist/{chunk-5HSMH2ZZ.js.map → chunk-CJN5CEI3.js.map} +1 -1
- package/dist/{chunk-XRPMZ7TO.js → chunk-CYWOJA6B.js} +6 -4
- package/dist/chunk-CYWOJA6B.js.map +1 -0
- package/dist/{chunk-AQW54OWQ.js → chunk-DFBWYETS.js} +5 -3
- package/dist/chunk-DFBWYETS.js.map +1 -0
- package/dist/{chunk-EPANMGH7.cjs → chunk-FLDHYF5C.cjs} +11 -2
- package/dist/chunk-FLDHYF5C.cjs.map +1 -0
- package/dist/{chunk-BJ7BPLQK.js → chunk-GARVAUCU.js} +209 -29
- package/dist/chunk-GARVAUCU.js.map +1 -0
- package/dist/{chunk-YOVZMN4P.cjs → chunk-LXG6VL6R.cjs} +3 -3
- package/dist/{chunk-YOVZMN4P.cjs.map → chunk-LXG6VL6R.cjs.map} +1 -1
- package/dist/{chunk-NJBJ3CUG.js → chunk-NAVUTK6X.js} +3 -3
- package/dist/{chunk-NJBJ3CUG.js.map → chunk-NAVUTK6X.js.map} +1 -1
- package/dist/{chunk-2SFLLOMN.js → chunk-NVQSBRG6.js} +3 -3
- package/dist/{chunk-2SFLLOMN.js.map → chunk-NVQSBRG6.js.map} +1 -1
- package/dist/{chunk-FEAWEBWN.cjs → chunk-PDOXYXWX.cjs} +6 -4
- package/dist/chunk-PDOXYXWX.cjs.map +1 -0
- package/dist/{chunk-MS3TQSXU.js → chunk-QD6B6W6I.js} +6 -4
- package/dist/chunk-QD6B6W6I.js.map +1 -0
- package/dist/{chunk-NBNRQN6T.js → chunk-QGDPMM3C.js} +11 -2
- package/dist/chunk-QGDPMM3C.js.map +1 -0
- package/dist/{chunk-ZWLFHSON.cjs → chunk-R35ZJAYT.cjs} +38 -15
- package/dist/chunk-R35ZJAYT.cjs.map +1 -0
- package/dist/{chunk-4YD2WI57.cjs → chunk-R427EOZE.cjs} +19 -15
- package/dist/chunk-R427EOZE.cjs.map +1 -0
- package/dist/chunk-R5UQL2R5.cjs +18 -0
- package/dist/{chunk-LO6LIUZ6.cjs.map → chunk-R5UQL2R5.cjs.map} +1 -1
- package/dist/{chunk-TLVI2OQK.cjs → chunk-SETHRLQS.cjs} +18 -2
- package/dist/chunk-SETHRLQS.cjs.map +1 -0
- package/dist/{chunk-LSWHDOCL.cjs → chunk-SNVYOX46.cjs} +88 -72
- package/dist/chunk-SNVYOX46.cjs.map +1 -0
- package/dist/{chunk-BO3PV3OP.js → chunk-TDED5XES.js} +18 -3
- package/dist/chunk-TDED5XES.js.map +1 -0
- package/dist/{chunk-NKQVLWDF.js → chunk-ULEK4OM4.js} +3 -3
- package/dist/{chunk-NKQVLWDF.js.map → chunk-ULEK4OM4.js.map} +1 -1
- package/dist/{chunk-XJ4C4NFX.js → chunk-ZOL3L4EH.js} +63 -49
- package/dist/chunk-ZOL3L4EH.js.map +1 -0
- package/dist/{compact-session-NM56BREJ.cjs → compact-session-D2MQDB6G.cjs} +15 -15
- package/dist/{compact-session-NM56BREJ.cjs.map → compact-session-D2MQDB6G.cjs.map} +1 -1
- package/dist/{compact-session-3U2JYTVG.js → compact-session-N2PPHQO6.js} +6 -6
- package/dist/{compact-session-3U2JYTVG.js.map → compact-session-N2PPHQO6.js.map} +1 -1
- package/dist/{cron-CHn-F0fC.d.ts → cron-BubDpFJG.d.ts} +2 -2
- package/dist/{cron-BWDYetbq.d.cts → cron-CK2v0VWA.d.cts} +2 -2
- package/dist/cron.cjs +11 -11
- package/dist/cron.d.cts +3 -3
- package/dist/cron.d.ts +3 -3
- package/dist/cron.js +10 -10
- package/dist/eval.cjs +15 -15
- package/dist/eval.js +10 -10
- package/dist/{executor-HKHT4CWS.cjs → executor-5QL5AXIZ.cjs} +18 -15
- package/dist/executor-5QL5AXIZ.cjs.map +1 -0
- package/dist/{executor-3D2UDJHW.js → executor-THUXNAFR.js} +6 -3
- package/dist/executor-THUXNAFR.js.map +1 -0
- package/dist/generate-object-A5F576IT.cjs +20 -0
- package/dist/{generate-object-XBWD2PU7.cjs.map → generate-object-A5F576IT.cjs.map} +1 -1
- package/dist/{generate-object-S7MNVF2V.js → generate-object-TBDOBBYW.js} +4 -4
- package/dist/{generate-object-S7MNVF2V.js.map → generate-object-TBDOBBYW.js.map} +1 -1
- package/dist/generate-object.d.ts +14 -1
- package/dist/index.cjs +81 -65
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +36 -7
- package/dist/index.d.ts +36 -7
- package/dist/index.js +44 -28
- package/dist/index.js.map +1 -1
- package/dist/{inject-session-JVTZNQF6.cjs → inject-session-3ICZIJ2N.cjs} +4 -4
- package/dist/{inject-session-JVTZNQF6.cjs.map → inject-session-3ICZIJ2N.cjs.map} +1 -1
- package/dist/{inject-session-THABTKJY.js → inject-session-J26SHHIO.js} +3 -3
- package/dist/{inject-session-THABTKJY.js.map → inject-session-J26SHHIO.js.map} +1 -1
- package/dist/internal/agent-loop/prune-tool-results.d.ts +37 -0
- package/dist/internal/auth/credential-store.d.ts +1 -1
- package/dist/internal/auth/types.d.ts +4 -0
- package/dist/internal/providers/discovery.d.ts +2 -2
- package/dist/internal/providers/trust-gate.d.ts +35 -0
- package/dist/internal/runtime/plugin-loader/manifest-entry-import.d.ts +17 -0
- package/dist/internal/runtime/plugin-loader/workspace-plugin-trust.d.ts +16 -0
- package/dist/internal/runtime/skills/binary-on-path.d.ts +1 -0
- package/dist/internal/runtime/skills/discover-skills.d.ts +2 -0
- package/dist/internal/structured-output-helpers.d.ts +5 -2
- package/dist/mcp-auth.cjs +2 -2
- package/dist/mcp-auth.js +1 -1
- package/dist/models.cjs +11 -11
- package/dist/models.js +4 -4
- package/dist/providers.cjs +6 -6
- package/dist/providers.js +4 -4
- package/dist/sandbox/bwrap.d.cts +10 -8
- package/dist/sandbox/bwrap.d.ts +10 -8
- package/dist/sandbox/deny-read.d.cts +24 -0
- package/dist/sandbox/deny-read.d.ts +24 -0
- package/dist/sandbox/index.cjs +114 -35
- package/dist/sandbox/index.cjs.map +1 -1
- package/dist/sandbox/index.d.cts +2 -1
- package/dist/sandbox/index.d.ts +2 -1
- package/dist/sandbox/index.js +96 -21
- package/dist/sandbox/index.js.map +1 -1
- package/dist/sandbox/linux-sandbox.d.cts +16 -1
- package/dist/sandbox/linux-sandbox.d.ts +16 -1
- package/dist/sandbox/local-sandbox.d.cts +3 -1
- package/dist/sandbox/local-sandbox.d.ts +3 -1
- package/dist/sandbox/seccomp-delivery.d.cts +3 -0
- package/dist/sandbox/seccomp-delivery.d.ts +3 -0
- package/dist/sandbox/shell-escape.d.cts +14 -2
- package/dist/sandbox/shell-escape.d.ts +14 -2
- package/dist/sandbox/types.d.cts +45 -0
- package/dist/sandbox/types.d.ts +45 -0
- package/dist/{sdk-agent-4-dXI2GS.d.cts → sdk-agent-DwzHcuxy.d.cts} +28 -3
- package/dist/{sdk-agent-CTOJlWA_.d.ts → sdk-agent-a3fW1xUK.d.ts} +28 -3
- package/dist/skills.cjs +4 -4
- package/dist/skills.js +1 -1
- package/dist/stream-object-AS4YYM4B.cjs +20 -0
- package/dist/{stream-object-TEEK3CAX.cjs.map → stream-object-AS4YYM4B.cjs.map} +1 -1
- package/dist/stream-object-EKM4WGTI.js +7 -0
- package/dist/{stream-object-R6SMYV4R.js.map → stream-object-EKM4WGTI.js.map} +1 -1
- package/dist/stream-object.d.ts +14 -1
- package/dist/subagents-loader.d.cts +2 -2
- package/dist/subagents-loader.d.ts +2 -2
- package/dist/types/agent.d.ts +14 -1
- package/dist/types/run.d.ts +27 -2
- package/dist/workflow-as-tool.d.ts +39 -5
- package/dist/workflow-errors.d.ts +16 -0
- package/dist/workflow.cjs +31 -23
- package/dist/workflow.d.cts +55 -5
- package/dist/workflow.d.ts +55 -5
- package/dist/workflow.js +2 -2
- package/docs/adr/mutation-testing-scope.md +56 -0
- package/docs/error-codes.md +23 -18
- package/docs/harness-capability-map.md +78 -4
- package/package.json +1 -1
- package/dist/chunk-3FSBE4PS.js.map +0 -1
- package/dist/chunk-4YD2WI57.cjs.map +0 -1
- package/dist/chunk-5A4UFBHW.cjs.map +0 -1
- package/dist/chunk-7WARNHWW.cjs.map +0 -1
- package/dist/chunk-AQW54OWQ.js.map +0 -1
- package/dist/chunk-BJ7BPLQK.js.map +0 -1
- package/dist/chunk-BO3PV3OP.js.map +0 -1
- package/dist/chunk-EPANMGH7.cjs.map +0 -1
- package/dist/chunk-FEAWEBWN.cjs.map +0 -1
- package/dist/chunk-HN4IKB6X.cjs.map +0 -1
- package/dist/chunk-LO6LIUZ6.cjs +0 -18
- package/dist/chunk-LSWHDOCL.cjs.map +0 -1
- package/dist/chunk-MS3TQSXU.js.map +0 -1
- package/dist/chunk-NBNRQN6T.js.map +0 -1
- package/dist/chunk-NHOEXFZT.js.map +0 -1
- package/dist/chunk-Q6WT5535.cjs.map +0 -1
- package/dist/chunk-QISSETTG.cjs.map +0 -1
- package/dist/chunk-TLVI2OQK.cjs.map +0 -1
- package/dist/chunk-VVGFZQZC.js.map +0 -1
- package/dist/chunk-XJ4C4NFX.js.map +0 -1
- package/dist/chunk-XRPMZ7TO.js.map +0 -1
- package/dist/chunk-ZLFFDPXC.js.map +0 -1
- package/dist/chunk-ZWLFHSON.cjs.map +0 -1
- package/dist/executor-3D2UDJHW.js.map +0 -1
- package/dist/executor-HKHT4CWS.cjs.map +0 -1
- package/dist/generate-object-XBWD2PU7.cjs +0 -20
- package/dist/stream-object-R6SMYV4R.js +0 -7
- package/dist/stream-object-TEEK3CAX.cjs +0 -20
package/dist/workflow.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkR35ZJAYT_cjs = require('./chunk-R35ZJAYT.cjs');
|
|
4
|
+
var chunkSETHRLQS_cjs = require('./chunk-SETHRLQS.cjs');
|
|
5
5
|
require('./chunk-VTYY7XL5.cjs');
|
|
6
6
|
require('./chunk-AA27GEYS.cjs');
|
|
7
7
|
require('./chunk-3KIUY67P.cjs');
|
|
@@ -14,87 +14,95 @@ require('./chunk-RNXXYF22.cjs');
|
|
|
14
14
|
|
|
15
15
|
Object.defineProperty(exports, "Workflow", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkR35ZJAYT_cjs.Workflow; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "WorkflowBuilder", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkR35ZJAYT_cjs.WorkflowBuilder; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "WorkflowToolError", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkR35ZJAYT_cjs.WorkflowToolError; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "agentStep", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkR35ZJAYT_cjs.agentStep; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "cloneWorkflow", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkR35ZJAYT_cjs.cloneWorkflow; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "fn", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkR35ZJAYT_cjs.fn; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "workflowAsTool", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkR35ZJAYT_cjs.workflowAsTool; }
|
|
42
|
+
});
|
|
43
|
+
Object.defineProperty(exports, "workflowResumeTool", {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () { return chunkR35ZJAYT_cjs.workflowResumeTool; }
|
|
42
46
|
});
|
|
43
47
|
Object.defineProperty(exports, "workflowStep", {
|
|
44
48
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkR35ZJAYT_cjs.workflowStep; }
|
|
46
50
|
});
|
|
47
51
|
Object.defineProperty(exports, "WorkflowAlreadyRunningError", {
|
|
48
52
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkSETHRLQS_cjs.WorkflowAlreadyRunningError; }
|
|
50
54
|
});
|
|
51
55
|
Object.defineProperty(exports, "WorkflowCompensateNotImplementedError", {
|
|
52
56
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunkSETHRLQS_cjs.WorkflowCompensateNotImplementedError; }
|
|
54
58
|
});
|
|
55
59
|
Object.defineProperty(exports, "WorkflowDuplicateStepIdError", {
|
|
56
60
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunkSETHRLQS_cjs.WorkflowDuplicateStepIdError; }
|
|
58
62
|
});
|
|
59
63
|
Object.defineProperty(exports, "WorkflowInputError", {
|
|
60
64
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunkSETHRLQS_cjs.WorkflowInputError; }
|
|
62
66
|
});
|
|
63
67
|
Object.defineProperty(exports, "WorkflowMaxIterationsExceededError", {
|
|
64
68
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
69
|
+
get: function () { return chunkSETHRLQS_cjs.WorkflowMaxIterationsExceededError; }
|
|
66
70
|
});
|
|
67
71
|
Object.defineProperty(exports, "WorkflowNestedError", {
|
|
68
72
|
enumerable: true,
|
|
69
|
-
get: function () { return
|
|
73
|
+
get: function () { return chunkSETHRLQS_cjs.WorkflowNestedError; }
|
|
70
74
|
});
|
|
71
75
|
Object.defineProperty(exports, "WorkflowNotSerializableError", {
|
|
72
76
|
enumerable: true,
|
|
73
|
-
get: function () { return
|
|
77
|
+
get: function () { return chunkSETHRLQS_cjs.WorkflowNotSerializableError; }
|
|
74
78
|
});
|
|
75
79
|
Object.defineProperty(exports, "WorkflowOutputError", {
|
|
76
80
|
enumerable: true,
|
|
77
|
-
get: function () { return
|
|
81
|
+
get: function () { return chunkSETHRLQS_cjs.WorkflowOutputError; }
|
|
78
82
|
});
|
|
79
83
|
Object.defineProperty(exports, "WorkflowParallelError", {
|
|
80
84
|
enumerable: true,
|
|
81
|
-
get: function () { return
|
|
85
|
+
get: function () { return chunkSETHRLQS_cjs.WorkflowParallelError; }
|
|
82
86
|
});
|
|
83
87
|
Object.defineProperty(exports, "WorkflowResumeStepNotFoundError", {
|
|
84
88
|
enumerable: true,
|
|
85
|
-
get: function () { return
|
|
89
|
+
get: function () { return chunkSETHRLQS_cjs.WorkflowResumeStepNotFoundError; }
|
|
90
|
+
});
|
|
91
|
+
Object.defineProperty(exports, "WorkflowResumeWorkflowMismatchError", {
|
|
92
|
+
enumerable: true,
|
|
93
|
+
get: function () { return chunkSETHRLQS_cjs.WorkflowResumeWorkflowMismatchError; }
|
|
86
94
|
});
|
|
87
95
|
Object.defineProperty(exports, "WorkflowSnapshotNotFoundError", {
|
|
88
96
|
enumerable: true,
|
|
89
|
-
get: function () { return
|
|
97
|
+
get: function () { return chunkSETHRLQS_cjs.WorkflowSnapshotNotFoundError; }
|
|
90
98
|
});
|
|
91
99
|
Object.defineProperty(exports, "WorkflowStateError", {
|
|
92
100
|
enumerable: true,
|
|
93
|
-
get: function () { return
|
|
101
|
+
get: function () { return chunkSETHRLQS_cjs.WorkflowStateError; }
|
|
94
102
|
});
|
|
95
103
|
Object.defineProperty(exports, "__resetSnapshotStoresForTests", {
|
|
96
104
|
enumerable: true,
|
|
97
|
-
get: function () { return
|
|
105
|
+
get: function () { return chunkSETHRLQS_cjs.__resetSnapshotStoresForTests; }
|
|
98
106
|
});
|
|
99
107
|
//# sourceMappingURL=workflow.cjs.map
|
|
100
108
|
//# sourceMappingURL=workflow.cjs.map
|
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-DwzHcuxy.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
|
|
|
@@ -459,8 +459,9 @@ declare function __resetSnapshotStoresForTests(): void;
|
|
|
459
459
|
*/
|
|
460
460
|
|
|
461
461
|
/**
|
|
462
|
-
* Raised by a {@link workflowAsTool} tool when the
|
|
463
|
-
* reach `status: "completed"` (a step failed, the run was cancelled
|
|
462
|
+
* Raised by a {@link workflowAsTool} or {@link workflowResumeTool} tool when the
|
|
463
|
+
* run does not reach `status: "completed"` (a step failed, the run was cancelled,
|
|
464
|
+
* or it suspended without `reportSuspended`, which returns a report instead).
|
|
464
465
|
* The dispatch converts it to a `tool_result(isError)`.
|
|
465
466
|
*
|
|
466
467
|
* @public
|
|
@@ -487,6 +488,22 @@ interface WorkflowAsToolSpec<T extends ZodType> {
|
|
|
487
488
|
description: string;
|
|
488
489
|
/** Zod schema for the workflow's input (a `Workflow` carries no top-level schema). */
|
|
489
490
|
inputSchema: T;
|
|
491
|
+
/**
|
|
492
|
+
* When `true`, a run that suspends returns `{"status":"suspended","runId":…,"stepId":…}` instead of
|
|
493
|
+
* raising {@link WorkflowToolError}, so the model can hand the run id to a
|
|
494
|
+
* {@link workflowResumeTool}. The report carries ids only, never the suspended payload; `stepId` is
|
|
495
|
+
* `null` for a run that carries no step result. Default `false`.
|
|
496
|
+
*/
|
|
497
|
+
reportSuspended?: boolean;
|
|
498
|
+
}
|
|
499
|
+
/** Spec for {@link workflowResumeTool}. */
|
|
500
|
+
interface WorkflowResumeToolSpec {
|
|
501
|
+
/** Tool name surfaced to the LLM. Same constraints as a `CustomTool.name`. */
|
|
502
|
+
name: string;
|
|
503
|
+
/** Description surfaced to the LLM — when the agent should resume a suspended run. */
|
|
504
|
+
description: string;
|
|
505
|
+
/** Report a run that suspends again instead of raising, as in {@link WorkflowAsToolSpec}. */
|
|
506
|
+
reportSuspended?: boolean;
|
|
490
507
|
}
|
|
491
508
|
/**
|
|
492
509
|
* SE19 — expose a {@link Workflow} as an agent {@link CustomTool}, completing the
|
|
@@ -494,7 +511,8 @@ interface WorkflowAsToolSpec<T extends ZodType> {
|
|
|
494
511
|
* The handler validates the model's args against `spec.inputSchema`, runs the
|
|
495
512
|
* workflow, and returns its output (a string as-is, else JSON). A run that does not
|
|
496
513
|
* reach `status: "completed"` raises a typed {@link WorkflowToolError} (workflow
|
|
497
|
-
* step errors do NOT throw — they surface via `run.status === "failed"`)
|
|
514
|
+
* step errors do NOT throw — they surface via `run.status === "failed"`), except a
|
|
515
|
+
* suspended run with `spec.reportSuspended`, which returns the suspended report.
|
|
498
516
|
*
|
|
499
517
|
* Accepts any `{ run }`-shaped workflow (structural), so it never imports the
|
|
500
518
|
* `Workflow` class directly.
|
|
@@ -504,6 +522,22 @@ interface WorkflowAsToolSpec<T extends ZodType> {
|
|
|
504
522
|
declare function workflowAsTool<T extends ZodType, TOutput = unknown>(workflow: {
|
|
505
523
|
run: (input: z.infer<T>) => Promise<WorkflowRun<TOutput>>;
|
|
506
524
|
}, spec: WorkflowAsToolSpec<T>): CustomTool;
|
|
525
|
+
/**
|
|
526
|
+
* B-677 — a {@link CustomTool} that resumes a suspended run of `workflow` by its run id, with an
|
|
527
|
+
* optional payload validated against the suspend step's schema. It returns the run's output like
|
|
528
|
+
* {@link workflowAsTool}; a run that suspends again keeps the same run id and is reported or raised
|
|
529
|
+
* per `spec.reportSuspended`. Snapshot errors (`WorkflowSnapshotNotFoundError` for an unknown or
|
|
530
|
+
* already-resumed id, `WorkflowResumeWorkflowMismatchError` for a run another workflow suspended,
|
|
531
|
+
* `WorkflowResumeStepNotFoundError` when `workflow` lacks the suspended step) and payload validation
|
|
532
|
+
* errors propagate to the dispatch.
|
|
533
|
+
*
|
|
534
|
+
* `workflow` must be the committed instance from `Workflow.create().commit()`. The default snapshot
|
|
535
|
+
* store is in memory and process-local: a host that resumes across processes configures a persistent
|
|
536
|
+
* backend. This tool resumes any run id it is given; deciding who may approve a run is the host's job.
|
|
537
|
+
*
|
|
538
|
+
* @public
|
|
539
|
+
*/
|
|
540
|
+
declare function workflowResumeTool(workflow: WorkflowResumeOptions["workflow"], spec: WorkflowResumeToolSpec): CustomTool;
|
|
507
541
|
|
|
508
542
|
/**
|
|
509
543
|
* The workflow error hierarchy — runtime classes, deliberately NOT in `types/`.
|
|
@@ -643,6 +677,22 @@ declare class WorkflowResumeStepNotFoundError extends TheokitAgentError {
|
|
|
643
677
|
readonly name = "WorkflowResumeStepNotFoundError";
|
|
644
678
|
constructor(stepId: string, workflowName: string);
|
|
645
679
|
}
|
|
680
|
+
/**
|
|
681
|
+
* Thrown by `Workflow.resume()` (and so by a `workflowResumeTool` tool) when the snapshot for the run
|
|
682
|
+
* id was written by a workflow of another name. The snapshot is left in the store, so the workflow
|
|
683
|
+
* that suspended the run can still resume it.
|
|
684
|
+
*
|
|
685
|
+
* Without this check the default store, one process-global memory store, would let workflow B run
|
|
686
|
+
* its own tail on workflow A's accumulated input whenever both declare a step with the suspended id.
|
|
687
|
+
* `name` is a label, not an identity: two workflows that share a name are not told apart here.
|
|
688
|
+
*/
|
|
689
|
+
declare class WorkflowResumeWorkflowMismatchError extends TheokitAgentError {
|
|
690
|
+
readonly runId: string;
|
|
691
|
+
readonly snapshotWorkflowName: string;
|
|
692
|
+
readonly workflowName: string;
|
|
693
|
+
readonly name = "WorkflowResumeWorkflowMismatchError";
|
|
694
|
+
constructor(runId: string, snapshotWorkflowName: string, workflowName: string);
|
|
695
|
+
}
|
|
646
696
|
/**
|
|
647
697
|
* Aggregate failure from parallel branches.
|
|
648
698
|
*
|
|
@@ -908,4 +958,4 @@ declare function cloneWorkflow<TI = unknown, TO = unknown>(wf: Workflow<TI, TO>,
|
|
|
908
958
|
id: string;
|
|
909
959
|
}): Workflow<TI, TO>;
|
|
910
960
|
|
|
911
|
-
export { type AgentStep, type BranchStep, type DowhileStep, type FnStep, type ForeachStep, type ParallelStep, type RetryPolicy, type SleepStep, type Step, type StepContext, type StepResult, type SuspendStep, Workflow, WorkflowAlreadyRunningError, type WorkflowAsToolSpec, WorkflowBuilder, WorkflowCompensateNotImplementedError, type WorkflowDescription, WorkflowDuplicateStepIdError, type WorkflowEvent, WorkflowInputError, WorkflowMaxIterationsExceededError, WorkflowNestedError, WorkflowNotSerializableError, type WorkflowOptions, WorkflowOutputError, WorkflowParallelError, type WorkflowPersistenceOptions, type WorkflowResumeOptions, WorkflowResumeStepNotFoundError, type WorkflowRun, type WorkflowRunOptions, type WorkflowSnapshot, WorkflowSnapshotNotFoundError, WorkflowStateError, type WorkflowStepDescription, type WorkflowStream, WorkflowToolError, __resetSnapshotStoresForTests, agentStep, cloneWorkflow, fn, workflowAsTool, workflowStep };
|
|
961
|
+
export { type AgentStep, type BranchStep, type DowhileStep, type FnStep, type ForeachStep, type ParallelStep, type RetryPolicy, type SleepStep, type Step, type StepContext, type StepResult, type SuspendStep, Workflow, WorkflowAlreadyRunningError, type WorkflowAsToolSpec, WorkflowBuilder, WorkflowCompensateNotImplementedError, type WorkflowDescription, WorkflowDuplicateStepIdError, type WorkflowEvent, WorkflowInputError, WorkflowMaxIterationsExceededError, WorkflowNestedError, WorkflowNotSerializableError, type WorkflowOptions, WorkflowOutputError, WorkflowParallelError, type WorkflowPersistenceOptions, type WorkflowResumeOptions, WorkflowResumeStepNotFoundError, type WorkflowResumeToolSpec, WorkflowResumeWorkflowMismatchError, type WorkflowRun, type WorkflowRunOptions, type WorkflowSnapshot, WorkflowSnapshotNotFoundError, WorkflowStateError, type WorkflowStepDescription, type WorkflowStream, WorkflowToolError, __resetSnapshotStoresForTests, agentStep, cloneWorkflow, fn, workflowAsTool, workflowResumeTool, workflowStep };
|
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-a3fW1xUK.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
|
|
|
@@ -459,8 +459,9 @@ declare function __resetSnapshotStoresForTests(): void;
|
|
|
459
459
|
*/
|
|
460
460
|
|
|
461
461
|
/**
|
|
462
|
-
* Raised by a {@link workflowAsTool} tool when the
|
|
463
|
-
* reach `status: "completed"` (a step failed, the run was cancelled
|
|
462
|
+
* Raised by a {@link workflowAsTool} or {@link workflowResumeTool} tool when the
|
|
463
|
+
* run does not reach `status: "completed"` (a step failed, the run was cancelled,
|
|
464
|
+
* or it suspended without `reportSuspended`, which returns a report instead).
|
|
464
465
|
* The dispatch converts it to a `tool_result(isError)`.
|
|
465
466
|
*
|
|
466
467
|
* @public
|
|
@@ -487,6 +488,22 @@ interface WorkflowAsToolSpec<T extends ZodType> {
|
|
|
487
488
|
description: string;
|
|
488
489
|
/** Zod schema for the workflow's input (a `Workflow` carries no top-level schema). */
|
|
489
490
|
inputSchema: T;
|
|
491
|
+
/**
|
|
492
|
+
* When `true`, a run that suspends returns `{"status":"suspended","runId":…,"stepId":…}` instead of
|
|
493
|
+
* raising {@link WorkflowToolError}, so the model can hand the run id to a
|
|
494
|
+
* {@link workflowResumeTool}. The report carries ids only, never the suspended payload; `stepId` is
|
|
495
|
+
* `null` for a run that carries no step result. Default `false`.
|
|
496
|
+
*/
|
|
497
|
+
reportSuspended?: boolean;
|
|
498
|
+
}
|
|
499
|
+
/** Spec for {@link workflowResumeTool}. */
|
|
500
|
+
interface WorkflowResumeToolSpec {
|
|
501
|
+
/** Tool name surfaced to the LLM. Same constraints as a `CustomTool.name`. */
|
|
502
|
+
name: string;
|
|
503
|
+
/** Description surfaced to the LLM — when the agent should resume a suspended run. */
|
|
504
|
+
description: string;
|
|
505
|
+
/** Report a run that suspends again instead of raising, as in {@link WorkflowAsToolSpec}. */
|
|
506
|
+
reportSuspended?: boolean;
|
|
490
507
|
}
|
|
491
508
|
/**
|
|
492
509
|
* SE19 — expose a {@link Workflow} as an agent {@link CustomTool}, completing the
|
|
@@ -494,7 +511,8 @@ interface WorkflowAsToolSpec<T extends ZodType> {
|
|
|
494
511
|
* The handler validates the model's args against `spec.inputSchema`, runs the
|
|
495
512
|
* workflow, and returns its output (a string as-is, else JSON). A run that does not
|
|
496
513
|
* reach `status: "completed"` raises a typed {@link WorkflowToolError} (workflow
|
|
497
|
-
* step errors do NOT throw — they surface via `run.status === "failed"`)
|
|
514
|
+
* step errors do NOT throw — they surface via `run.status === "failed"`), except a
|
|
515
|
+
* suspended run with `spec.reportSuspended`, which returns the suspended report.
|
|
498
516
|
*
|
|
499
517
|
* Accepts any `{ run }`-shaped workflow (structural), so it never imports the
|
|
500
518
|
* `Workflow` class directly.
|
|
@@ -504,6 +522,22 @@ interface WorkflowAsToolSpec<T extends ZodType> {
|
|
|
504
522
|
declare function workflowAsTool<T extends ZodType, TOutput = unknown>(workflow: {
|
|
505
523
|
run: (input: z.infer<T>) => Promise<WorkflowRun<TOutput>>;
|
|
506
524
|
}, spec: WorkflowAsToolSpec<T>): CustomTool;
|
|
525
|
+
/**
|
|
526
|
+
* B-677 — a {@link CustomTool} that resumes a suspended run of `workflow` by its run id, with an
|
|
527
|
+
* optional payload validated against the suspend step's schema. It returns the run's output like
|
|
528
|
+
* {@link workflowAsTool}; a run that suspends again keeps the same run id and is reported or raised
|
|
529
|
+
* per `spec.reportSuspended`. Snapshot errors (`WorkflowSnapshotNotFoundError` for an unknown or
|
|
530
|
+
* already-resumed id, `WorkflowResumeWorkflowMismatchError` for a run another workflow suspended,
|
|
531
|
+
* `WorkflowResumeStepNotFoundError` when `workflow` lacks the suspended step) and payload validation
|
|
532
|
+
* errors propagate to the dispatch.
|
|
533
|
+
*
|
|
534
|
+
* `workflow` must be the committed instance from `Workflow.create().commit()`. The default snapshot
|
|
535
|
+
* store is in memory and process-local: a host that resumes across processes configures a persistent
|
|
536
|
+
* backend. This tool resumes any run id it is given; deciding who may approve a run is the host's job.
|
|
537
|
+
*
|
|
538
|
+
* @public
|
|
539
|
+
*/
|
|
540
|
+
declare function workflowResumeTool(workflow: WorkflowResumeOptions["workflow"], spec: WorkflowResumeToolSpec): CustomTool;
|
|
507
541
|
|
|
508
542
|
/**
|
|
509
543
|
* The workflow error hierarchy — runtime classes, deliberately NOT in `types/`.
|
|
@@ -643,6 +677,22 @@ declare class WorkflowResumeStepNotFoundError extends TheokitAgentError {
|
|
|
643
677
|
readonly name = "WorkflowResumeStepNotFoundError";
|
|
644
678
|
constructor(stepId: string, workflowName: string);
|
|
645
679
|
}
|
|
680
|
+
/**
|
|
681
|
+
* Thrown by `Workflow.resume()` (and so by a `workflowResumeTool` tool) when the snapshot for the run
|
|
682
|
+
* id was written by a workflow of another name. The snapshot is left in the store, so the workflow
|
|
683
|
+
* that suspended the run can still resume it.
|
|
684
|
+
*
|
|
685
|
+
* Without this check the default store, one process-global memory store, would let workflow B run
|
|
686
|
+
* its own tail on workflow A's accumulated input whenever both declare a step with the suspended id.
|
|
687
|
+
* `name` is a label, not an identity: two workflows that share a name are not told apart here.
|
|
688
|
+
*/
|
|
689
|
+
declare class WorkflowResumeWorkflowMismatchError extends TheokitAgentError {
|
|
690
|
+
readonly runId: string;
|
|
691
|
+
readonly snapshotWorkflowName: string;
|
|
692
|
+
readonly workflowName: string;
|
|
693
|
+
readonly name = "WorkflowResumeWorkflowMismatchError";
|
|
694
|
+
constructor(runId: string, snapshotWorkflowName: string, workflowName: string);
|
|
695
|
+
}
|
|
646
696
|
/**
|
|
647
697
|
* Aggregate failure from parallel branches.
|
|
648
698
|
*
|
|
@@ -908,4 +958,4 @@ declare function cloneWorkflow<TI = unknown, TO = unknown>(wf: Workflow<TI, TO>,
|
|
|
908
958
|
id: string;
|
|
909
959
|
}): Workflow<TI, TO>;
|
|
910
960
|
|
|
911
|
-
export { type AgentStep, type BranchStep, type DowhileStep, type FnStep, type ForeachStep, type ParallelStep, type RetryPolicy, type SleepStep, type Step, type StepContext, type StepResult, type SuspendStep, Workflow, WorkflowAlreadyRunningError, type WorkflowAsToolSpec, WorkflowBuilder, WorkflowCompensateNotImplementedError, type WorkflowDescription, WorkflowDuplicateStepIdError, type WorkflowEvent, WorkflowInputError, WorkflowMaxIterationsExceededError, WorkflowNestedError, WorkflowNotSerializableError, type WorkflowOptions, WorkflowOutputError, WorkflowParallelError, type WorkflowPersistenceOptions, type WorkflowResumeOptions, WorkflowResumeStepNotFoundError, type WorkflowRun, type WorkflowRunOptions, type WorkflowSnapshot, WorkflowSnapshotNotFoundError, WorkflowStateError, type WorkflowStepDescription, type WorkflowStream, WorkflowToolError, __resetSnapshotStoresForTests, agentStep, cloneWorkflow, fn, workflowAsTool, workflowStep };
|
|
961
|
+
export { type AgentStep, type BranchStep, type DowhileStep, type FnStep, type ForeachStep, type ParallelStep, type RetryPolicy, type SleepStep, type Step, type StepContext, type StepResult, type SuspendStep, Workflow, WorkflowAlreadyRunningError, type WorkflowAsToolSpec, WorkflowBuilder, WorkflowCompensateNotImplementedError, type WorkflowDescription, WorkflowDuplicateStepIdError, type WorkflowEvent, WorkflowInputError, WorkflowMaxIterationsExceededError, WorkflowNestedError, WorkflowNotSerializableError, type WorkflowOptions, WorkflowOutputError, WorkflowParallelError, type WorkflowPersistenceOptions, type WorkflowResumeOptions, WorkflowResumeStepNotFoundError, type WorkflowResumeToolSpec, WorkflowResumeWorkflowMismatchError, type WorkflowRun, type WorkflowRunOptions, type WorkflowSnapshot, WorkflowSnapshotNotFoundError, WorkflowStateError, type WorkflowStepDescription, type WorkflowStream, WorkflowToolError, __resetSnapshotStoresForTests, agentStep, cloneWorkflow, fn, workflowAsTool, workflowResumeTool, workflowStep };
|
package/dist/workflow.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { Workflow, WorkflowBuilder, WorkflowToolError, agentStep, cloneWorkflow, fn, workflowAsTool, workflowStep } from './chunk-
|
|
2
|
-
export { WorkflowAlreadyRunningError, WorkflowCompensateNotImplementedError, WorkflowDuplicateStepIdError, WorkflowInputError, WorkflowMaxIterationsExceededError, WorkflowNestedError, WorkflowNotSerializableError, WorkflowOutputError, WorkflowParallelError, WorkflowResumeStepNotFoundError, WorkflowSnapshotNotFoundError, WorkflowStateError, __resetSnapshotStoresForTests } from './chunk-
|
|
1
|
+
export { Workflow, WorkflowBuilder, WorkflowToolError, agentStep, cloneWorkflow, fn, workflowAsTool, workflowResumeTool, workflowStep } from './chunk-73IITAF7.js';
|
|
2
|
+
export { WorkflowAlreadyRunningError, WorkflowCompensateNotImplementedError, WorkflowDuplicateStepIdError, WorkflowInputError, WorkflowMaxIterationsExceededError, WorkflowNestedError, WorkflowNotSerializableError, WorkflowOutputError, WorkflowParallelError, WorkflowResumeStepNotFoundError, WorkflowResumeWorkflowMismatchError, WorkflowSnapshotNotFoundError, WorkflowStateError, __resetSnapshotStoresForTests } from './chunk-TDED5XES.js';
|
|
3
3
|
import './chunk-HY66GLM6.js';
|
|
4
4
|
import './chunk-7I5Z3UBJ.js';
|
|
5
5
|
import './chunk-PKRPV3R7.js';
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Mutation testing covers only the B-026 spike over `src/internal/llm`
|
|
2
|
+
|
|
3
|
+
- Status: accepted
|
|
4
|
+
- Date: 2026-10-17
|
|
5
|
+
- Decided by: human/paulo
|
|
6
|
+
- Soft cap dismissed: `auditor_unavailable_d4` (code-quality D4, mutation testing), for B-380
|
|
7
|
+
(`sdk-memory-ceiling`) and for any item whose files sit outside the Stryker scope below
|
|
8
|
+
|
|
9
|
+
## Context
|
|
10
|
+
|
|
11
|
+
`stryker.config.json` at the repository root came in with adeba4b1 as a measurement spike for
|
|
12
|
+
B-026. It was never wired into a gate. Its scope is narrow on purpose:
|
|
13
|
+
|
|
14
|
+
- `mutate` is `src/internal/llm/**/*.ts`, nothing else;
|
|
15
|
+
- it is meant to run from `packages/sdk` (`pnpm --filter exec`), so `jsonReporter.fileName` is
|
|
16
|
+
`../../reports/mutation/slice.json`;
|
|
17
|
+
- `inPlace: true` is required because `packages/sdk/vitest.setup.ts` imports
|
|
18
|
+
`../../tools/preflight-native-bindings.mjs`, which escapes the package, so a sandbox copy fails
|
|
19
|
+
before it collects a test. The same commit records that `inPlace` restores file content but not
|
|
20
|
+
file mode, which strips the executable bit from `bin/*.mjs` entry points.
|
|
21
|
+
|
|
22
|
+
The kit's code-quality detector D4 looks for a Stryker config in the manifest directory (the
|
|
23
|
+
repository root here), runs `stryker run --reporters json` from there, and reads
|
|
24
|
+
`reports/mutation/mutation.json`. With this config that file is never written, so D4 reports
|
|
25
|
+
`auditor_unavailable_d4` ("stryker ran but wrote no report"). B-380 was the first item in this
|
|
26
|
+
repository to reach the code-quality audit, and none of its files is under `src/internal/llm`.
|
|
27
|
+
Nothing in B-380 touched the config.
|
|
28
|
+
|
|
29
|
+
## Decision
|
|
30
|
+
|
|
31
|
+
Mutation testing in theokit-sdk is the B-026 spike over `src/internal/llm` and nothing more, until
|
|
32
|
+
a separate backlog item extends it. D4 cannot measure code outside that scope today, so an item
|
|
33
|
+
whose files are outside it carries no mutation measurement, and its audit's
|
|
34
|
+
`auditor_unavailable_d4` soft cap is dismissed by this record. Extending Stryker is registered as
|
|
35
|
+
its own backlog item (`repo: theokit-sdk`).
|
|
36
|
+
|
|
37
|
+
This dismisses the cap. It does not claim the uncovered code is well tested: the unit and
|
|
38
|
+
integration suites are still the only evidence for it.
|
|
39
|
+
|
|
40
|
+
## Alternatives rejected
|
|
41
|
+
|
|
42
|
+
- Extend the Stryker config inside B-380, writing the report to `reports/mutation/mutation.json`
|
|
43
|
+
and mutating the memory files. Rejected because it widens an item that is already executing.
|
|
44
|
+
Runs over `packages/sdk` took minutes per file set, surviving mutants could need new tests, and
|
|
45
|
+
the `inPlace` file-mode risk above would come with it, all for work B-380 never scoped.
|
|
46
|
+
- Treat the mismatch as a kit defect (D4 runs from the repository root while the config expects
|
|
47
|
+
`packages/sdk`), report it to the kit and hold B-380 until it is fixed. Rejected because the
|
|
48
|
+
config is a spike that was never adopted as a gate. A kit fix would run Stryker against the same
|
|
49
|
+
`src/internal/llm` glob and still measure nothing B-380 changed.
|
|
50
|
+
|
|
51
|
+
## Consequences
|
|
52
|
+
|
|
53
|
+
- Every item outside `src/internal/llm` reaches review with D4 unmeasured and FAIL_SOFT, admitted
|
|
54
|
+
only through this record.
|
|
55
|
+
- The record stops applying once the backlog item that extends Stryker lands. At that point it
|
|
56
|
+
should be marked superseded.
|
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
|
+
256 distinct code(s).
|
|
10
10
|
|
|
11
11
|
| Code | Kind | Raised by | Sites |
|
|
12
12
|
|---|---|---|---|
|
|
@@ -40,7 +40,7 @@ Branch on `code`, never on the message: messages carry context (an id, a path, a
|
|
|
40
40
|
| `cloud_custom_tools_rejected` | domain | ConfigurationError | `packages/sdk/src/internal/cloud-agent/cloud-agent.ts:154` +1 |
|
|
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
|
-
| `cloud_plugin_path_rejected` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/plugin-loader/plugins-manager.ts:
|
|
43
|
+
| `cloud_plugin_path_rejected` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/plugin-loader/plugins-manager.ts:195` +1 |
|
|
44
44
|
| `cloud_run_http_error` | domain | NetworkError | `packages/sdk/src/internal/cloud-agent/real-cloud-run.ts:156` |
|
|
45
45
|
| `cloud_run_unknown_status` | domain | NetworkError | `packages/sdk/src/internal/cloud-agent/real-cloud-run.ts:285` +1 |
|
|
46
46
|
| `cloud_runtime_pre_release` | domain | ConfigurationError | `packages/sdk/src/agent.ts:419` +2 |
|
|
@@ -60,7 +60,7 @@ Branch on `code`, never on the message: messages carry context (an id, a path, a
|
|
|
60
60
|
| `cron_missing_message` | domain | ConfigurationError | `packages/sdk/src/cron.ts:233` +1 |
|
|
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
|
-
| `duplicate_skill_name` | domain | ConfigurationError | `packages/sdk/src/define-skill-read-tool.ts:
|
|
63
|
+
| `duplicate_skill_name` | domain | ConfigurationError | `packages/sdk/src/define-skill-read-tool.ts:166` |
|
|
64
64
|
| `duplicate_tool_name` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/validation/validate-agent-options.ts:203` |
|
|
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 |
|
|
@@ -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:467` |
|
|
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` |
|
|
@@ -100,7 +100,7 @@ Branch on `code`, never on the message: messages carry context (an id, a path, a
|
|
|
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 |
|
|
103
|
-
| `invalid_max_iterations` | domain | ConfigurationError | `packages/sdk/src/internal/local-agent/real-local-run.ts:
|
|
103
|
+
| `invalid_max_iterations` | domain | ConfigurationError | `packages/sdk/src/internal/local-agent/real-local-run.ts:94` |
|
|
104
104
|
| `invalid_memory_backend` | domain | ConfigurationError | `packages/sdk/src/internal/memory/index-manager-dispatch.ts:24` +1 |
|
|
105
105
|
| `invalid_memory_ceiling` | domain | ConfigurationError | `packages/sdk/src/internal/memory/storage/fact-ceiling.ts:23` +1 |
|
|
106
106
|
| `invalid_memory_directory` | domain | ConfigurationError | `packages/sdk/src/internal/memory/storage/memory-root.ts:151` |
|
|
@@ -108,6 +108,7 @@ Branch on `code`, never on the message: messages carry context (an id, a path, a
|
|
|
108
108
|
| `invalid_model_param` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/model-selection.ts:43` +1 |
|
|
109
109
|
| `invalid_model_selection` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/model-selection.ts:25` |
|
|
110
110
|
| `invalid_processor_options` | domain | ConfigurationError | `packages/sdk/src/built-in-processors.ts:86` |
|
|
111
|
+
| `invalid_prune_tool_results` | domain | ConfigurationError | `packages/sdk/src/internal/agent-loop/prune-tool-results.ts:78` |
|
|
111
112
|
| `invalid_redaction_pattern` | domain | ConfigurationError | `packages/sdk/src/security.ts:84` |
|
|
112
113
|
| `invalid_request` | domain | — | `packages/sdk/src/internal/error-mappers/vertex.ts:53` +1 |
|
|
113
114
|
| `invalid_retry_config` | domain | ConfigurationError | `packages/sdk/src/internal/retry/with-retry.ts:67` |
|
|
@@ -142,12 +143,13 @@ Branch on `code`, never on the message: messages carry context (an id, a path, a
|
|
|
142
143
|
| `migration_destination_exists` | domain | ConfigurationError | `packages/sdk/src/internal/memory/migrate-sqlite-to-lance.ts:159` +1 |
|
|
143
144
|
| `missing_api_key` | domain | AuthenticationError, ConfigurationError | `packages/sdk/src/internal/agent/helpers.ts:222` +2 |
|
|
144
145
|
| `missing_credential` | domain | AuthenticationError | `packages/sdk/src/internal/providers/builtin/openai-chatgpt.ts:72` |
|
|
145
|
-
| `missing_frontmatter` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/skills/skill-frontmatter.ts:
|
|
146
|
+
| `missing_frontmatter` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/skills/skill-frontmatter.ts:93` |
|
|
146
147
|
| `missing_model` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/validation/validate-agent-options.ts:37` |
|
|
147
148
|
| `model_unavailable` | domain | buildErrorMetadata | `packages/sdk/src/internal/error-mappers/ollama.ts:75` +2 |
|
|
148
149
|
| `network` | domain | MemoryAdapterError, buildErrorMetadata | `packages/memory-honcho/src/adapter.ts:258` +5 |
|
|
149
150
|
| `network_error` | domain | NetworkError | `packages/sdk/src/internal/http.ts:99` |
|
|
150
|
-
| `no_api_key` | domain | ConfigurationError | `packages/sdk-tools/src/web-search-brave.ts:50` |
|
|
151
|
+
| `no_api_key` | domain | ConfigurationError | `packages/sdk-tools/src/web-search-brave.ts:50` +1 |
|
|
152
|
+
| `no_base_url` | domain | ConfigurationError | `packages/sdk-tools/src/web-search-searxng.ts:35` |
|
|
151
153
|
| `no_memory_adapter` | domain | ConfigurationError | `packages/sdk/src/internal/local-agent/local-agent-memory-direct.ts:141` +2 |
|
|
152
154
|
| `no_such_session` | domain | NoSuchSessionError | `packages/sdk/src/interactive/types.ts:41` +1 |
|
|
153
155
|
| `no_text_answer` | domain | — | `packages/sdk/src/errors.ts:656` |
|
|
@@ -172,12 +174,14 @@ Branch on `code`, never on the message: messages carry context (an id, a path, a
|
|
|
172
174
|
| `personality_not_found` | domain | ConfigurationError | `packages/sdk/src/internal/personality/switch.ts:60` |
|
|
173
175
|
| `personality_reserved_name` | domain | ConfigurationError | `packages/sdk/src/internal/personality/registry.ts:110` |
|
|
174
176
|
| `pipeline_duplicate_provider` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/system-prompt/pipeline.ts:33` |
|
|
175
|
-
| `
|
|
177
|
+
| `plugin_entry_import_failed` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/plugin-loader/manifest-entry-import.ts:78` |
|
|
178
|
+
| `plugin_entry_missing` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/plugin-loader/plugins-manager.ts:170` |
|
|
179
|
+
| `plugin_entry_shape` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/plugin-loader/manifest-entry-import.ts:85` |
|
|
176
180
|
| `plugin_frontmatter_invalid` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/plugin-loader/plugin-frontmatter.ts:39` |
|
|
177
181
|
| `plugin_late_register_kind` | domain | ConfigurationError | `packages/sdk/src/internal/plugins/manager.ts:103` |
|
|
178
|
-
| `plugin_manifest_invalid` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/plugin-loader/plugins-manager.ts:
|
|
179
|
-
| `plugin_manifest_shape` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/plugin-loader/plugins-manager.ts:
|
|
180
|
-
| `plugin_missing_manifest` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/plugin-loader/plugins-manager.ts:
|
|
182
|
+
| `plugin_manifest_invalid` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/plugin-loader/plugins-manager.ts:221` |
|
|
183
|
+
| `plugin_manifest_shape` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/plugin-loader/plugins-manager.ts:227` |
|
|
184
|
+
| `plugin_missing_manifest` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/plugin-loader/plugins-manager.ts:212` +2 |
|
|
181
185
|
| `programmatic_hooks_rejected` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/validation/validate-agent-options.ts:99` |
|
|
182
186
|
| `provider_unresolved` | domain | ConfigurationError | `packages/sdk/src/internal/llm/router.ts:107` +2 |
|
|
183
187
|
| `quota_exceeded` | domain | — | `packages/sdk/src/internal/error-mappers/openai-compatible.ts:148` |
|
|
@@ -189,10 +193,10 @@ Branch on `code`, never on the message: messages carry context (an id, a path, a
|
|
|
189
193
|
| `run_cancelled` | domain | — | `packages/sdk/src/errors.ts:656` |
|
|
190
194
|
| `run_not_found` | domain | UnknownAgentError | `packages/sdk/src/agent.ts:426` |
|
|
191
195
|
| `runtime_exclusive` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/validation/validate-agent-options.ts:90` |
|
|
192
|
-
| `sandbox_derived_helper_failed` | domain | ConfigurationError | `packages/sdk/src/sandbox/types.ts:
|
|
193
|
-
| `sandbox_not_available` | domain | SandboxNotAvailableError | `packages/sdk/src/sandbox/types.ts:
|
|
194
|
-
| `sandbox_security` | domain | SandboxSecurityError | `packages/sdk/src/sandbox/types.ts:
|
|
195
|
-
| `schema_invalid` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/skills/skill-frontmatter.ts:
|
|
196
|
+
| `sandbox_derived_helper_failed` | domain | ConfigurationError | `packages/sdk/src/sandbox/types.ts:223` +1 |
|
|
197
|
+
| `sandbox_not_available` | domain | SandboxNotAvailableError | `packages/sdk/src/sandbox/types.ts:108` +1 |
|
|
198
|
+
| `sandbox_security` | domain | SandboxSecurityError | `packages/sdk/src/sandbox/types.ts:89` +1 |
|
|
199
|
+
| `schema_invalid` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/skills/skill-frontmatter.ts:104` +5 |
|
|
196
200
|
| `server_error` | domain | buildErrorMetadata | `packages/sdk/src/internal/error-mappers/ollama.ts:92` +1 |
|
|
197
201
|
| `session_busy` | domain | — | `packages/sdk/src/internal/persistence/session-writer.ts:56` +1 |
|
|
198
202
|
| `sql_injection_blocked` | domain | ConfigurationError | `packages/sdk/src/internal/memory/lance-index.ts:256` +3 |
|
|
@@ -246,7 +250,7 @@ Branch on `code`, never on the message: messages carry context (an id, a path, a
|
|
|
246
250
|
| `work_threw` | domain | — | `packages/sdk/src/internal/task/registry.ts:295` |
|
|
247
251
|
| `workflow_already_committed` | domain | ConfigurationError | `packages/sdk/src/workflow.ts:269` |
|
|
248
252
|
| `workflow_already_running` | domain | — | `packages/sdk/src/workflow-errors.ts:141` |
|
|
249
|
-
| `workflow_compensate_not_implemented` | domain | — | `packages/sdk/src/workflow-errors.ts:
|
|
253
|
+
| `workflow_compensate_not_implemented` | domain | — | `packages/sdk/src/workflow-errors.ts:270` +1 |
|
|
250
254
|
| `workflow_duplicate_step_id` | domain | — | `packages/sdk/src/workflow-errors.ts:31` |
|
|
251
255
|
| `workflow_input_invalid` | domain | — | `packages/sdk/src/workflow-errors.ts:48` |
|
|
252
256
|
| `workflow_max_iterations_exceeded` | domain | — | `packages/sdk/src/workflow-errors.ts:181` |
|
|
@@ -254,11 +258,12 @@ Branch on `code`, never on the message: messages carry context (an id, a path, a
|
|
|
254
258
|
| `workflow_not_serializable` | domain | — | `packages/sdk/src/workflow-errors.ts:195` +1 |
|
|
255
259
|
| `workflow_output_invalid` | domain | — | `packages/sdk/src/workflow-errors.ts:65` |
|
|
256
260
|
| `workflow_resume_step_not_found` | domain | — | `packages/sdk/src/workflow-errors.ts:210` +1 |
|
|
261
|
+
| `workflow_resume_workflow_mismatch` | domain | — | `packages/sdk/src/workflow-errors.ts:234` +1 |
|
|
257
262
|
| `workflow_snapshot_not_found` | domain | — | `packages/sdk/src/workflow-errors.ts:159` |
|
|
258
263
|
| `workflow_state_invalid` | domain | — | `packages/sdk/src/workflow-errors.ts:82` |
|
|
259
|
-
| `workflow_tool_failed` | domain | WorkflowToolError | `packages/sdk/src/workflow-as-tool.ts:
|
|
264
|
+
| `workflow_tool_failed` | domain | WorkflowToolError | `packages/sdk/src/workflow-as-tool.ts:41` +2 |
|
|
260
265
|
| `ws_global_missing` | domain | SubscriptionError | `packages/sdk/src/subscription/theokit-subscribe.ts:184` |
|
|
261
266
|
| `ws_peer_missing` | domain | SubscriptionError | `packages/sdk/src/subscription/internal/ws-adapter-node.ts:48` |
|
|
262
267
|
| `ws_transport_mismatch` | domain | SubscriptionError | `packages/sdk/src/subscription/internal/server-integration.ts:351` |
|
|
263
|
-
| `zod_not_installed` | domain | ConfigurationError | `packages/sdk/src/internal/structured-output-helpers.ts:
|
|
268
|
+
| `zod_not_installed` | domain | ConfigurationError | `packages/sdk/src/internal/structured-output-helpers.ts:40` +1 |
|
|
264
269
|
|