@theokit/sdk 5.8.0 → 5.9.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 +64 -0
- package/dist/{agent-LNTR4QH5.cjs → agent-5M7WLUWH.cjs} +8 -8
- package/dist/{agent-LNTR4QH5.cjs.map → agent-5M7WLUWH.cjs.map} +1 -1
- package/dist/{agent-3RcPVGMo.d.cts → agent-Dh2YHSLj.d.cts} +12 -0
- package/dist/{agent-7ERQNV66.js → agent-R5RERYFU.js} +7 -7
- package/dist/{agent-7ERQNV66.js.map → agent-R5RERYFU.js.map} +1 -1
- package/dist/{agent-lS68mYIL.d.ts → agent-enXXu447.d.ts} +12 -0
- package/dist/{chunk-2STSX2SY.cjs → chunk-56BCEM26.cjs} +32 -32
- package/dist/{chunk-2STSX2SY.cjs.map → chunk-56BCEM26.cjs.map} +1 -1
- package/dist/{chunk-DDRX4LYS.js → chunk-7QJYKVP6.js} +3 -3
- package/dist/{chunk-DDRX4LYS.js.map → chunk-7QJYKVP6.js.map} +1 -1
- package/dist/{chunk-XW4POZ6V.cjs → chunk-C7GKRGKN.cjs} +34 -13
- package/dist/chunk-C7GKRGKN.cjs.map +1 -0
- package/dist/{chunk-J4SA2ZEJ.cjs → chunk-KIKKTW5O.cjs} +4 -4
- package/dist/{chunk-J4SA2ZEJ.cjs.map → chunk-KIKKTW5O.cjs.map} +1 -1
- package/dist/{chunk-AOHRKGAA.cjs → chunk-LL4QA3DI.cjs} +4 -4
- package/dist/{chunk-AOHRKGAA.cjs.map → chunk-LL4QA3DI.cjs.map} +1 -1
- package/dist/{chunk-OCEQ6DW2.cjs → chunk-N6OEX5TN.cjs} +2 -2
- package/dist/chunk-N6OEX5TN.cjs.map +1 -0
- package/dist/{chunk-3CU5J7V3.js → chunk-OOM236Z4.js} +8 -8
- package/dist/{chunk-3CU5J7V3.js.map → chunk-OOM236Z4.js.map} +1 -1
- package/dist/{chunk-7GDHFV2M.js → chunk-OPAKPEPG.js} +2 -2
- package/dist/chunk-OPAKPEPG.js.map +1 -0
- package/dist/{chunk-FRL35MFN.js → chunk-QCIARBLS.js} +3 -3
- package/dist/{chunk-FRL35MFN.js.map → chunk-QCIARBLS.js.map} +1 -1
- package/dist/{chunk-KTA7YTZQ.cjs → chunk-XKZFIP7Z.cjs} +4 -4
- package/dist/{chunk-KTA7YTZQ.cjs.map → chunk-XKZFIP7Z.cjs.map} +1 -1
- package/dist/{chunk-W4VQMXBZ.js → chunk-ZDYDBXSD.js} +34 -13
- package/dist/chunk-ZDYDBXSD.js.map +1 -0
- package/dist/{chunk-PQCTDMUI.js → chunk-ZHWKT2NI.js} +3 -3
- package/dist/{chunk-PQCTDMUI.js.map → chunk-ZHWKT2NI.js.map} +1 -1
- package/dist/context/index.cjs +6 -6
- package/dist/context/index.js +3 -3
- package/dist/context-3FZRAO5K.js +7 -0
- package/dist/{context-SXR2HLHT.js.map → context-3FZRAO5K.js.map} +1 -1
- package/dist/{context-ZOULM2RB.cjs → context-B5J4GX2F.cjs} +7 -7
- package/dist/{context-ZOULM2RB.cjs.map → context-B5J4GX2F.cjs.map} +1 -1
- package/dist/{cron-DJv8zMa3.d.ts → cron-DTuaPMVI.d.ts} +1 -1
- package/dist/{cron-CGxoEKlx.d.cts → cron-QTgcwcZt.d.cts} +1 -1
- package/dist/cron.cjs +7 -7
- package/dist/cron.d.cts +2 -2
- package/dist/cron.d.ts +2 -2
- package/dist/cron.js +6 -6
- package/dist/eval.cjs +6 -6
- package/dist/eval.js +5 -5
- package/dist/index.cjs +24 -24
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +8 -8
- package/dist/internal/runtime/hooks/hooks-source.d.ts +24 -0
- package/dist/subagents-loader-5TZCAIYQ.cjs +16 -0
- package/dist/{subagents-loader-7GE7YUDI.cjs.map → subagents-loader-5TZCAIYQ.cjs.map} +1 -1
- package/dist/subagents-loader-PEV3PD4Q.js +7 -0
- package/dist/{subagents-loader-S2PMZY7J.js.map → subagents-loader-PEV3PD4Q.js.map} +1 -1
- package/dist/subagents-loader.cjs +2 -2
- package/dist/subagents-loader.d.cts +1 -1
- package/dist/subagents-loader.d.ts +1 -1
- package/dist/subagents-loader.js +1 -1
- package/dist/types/agent.d.ts +12 -0
- package/docs/error-codes.md +10 -9
- package/package.json +1 -1
- package/dist/chunk-7GDHFV2M.js.map +0 -1
- package/dist/chunk-OCEQ6DW2.cjs.map +0 -1
- package/dist/chunk-W4VQMXBZ.js.map +0 -1
- package/dist/chunk-XW4POZ6V.cjs.map +0 -1
- package/dist/context-SXR2HLHT.js +0 -7
- package/dist/subagents-loader-7GE7YUDI.cjs +0 -16
- package/dist/subagents-loader-S2PMZY7J.js +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,69 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.9.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#694](https://github.com/usetheokit/theokit-sdk/pull/694) [`aa2a04a`](https://github.com/usetheokit/theokit-sdk/commit/aa2a04a1c08514b0ea47d779640fc37f119cd21b) Thanks [@usetheodev](https://github.com/usetheodev)! - The README documents the shape of `.theokit/hooks.json`, which it previously told a consumer to
|
|
8
|
+
validate against and did not show. The sentence *"read and validated here, against the shape above"*
|
|
9
|
+
had no shape above it — the section stated where the file is read from and never what goes in it, so
|
|
10
|
+
the one thing a consumer needs in order to exercise the gate that guards it was missing
|
|
11
|
+
(usetheokit/theokit-sdk#638).
|
|
12
|
+
|
|
13
|
+
What is documented is read from the loader rather than restated beside it: the JSON shape, the three
|
|
14
|
+
fields a hook entry may carry (`type`, `command`, `timeout`), the seven Claude Code fields refused
|
|
15
|
+
with a named error rather than dropped, the four events that actually fire, and the nested
|
|
16
|
+
`hookSpecificOutput.permissionDecision` deny shape with `ask` projecting to deny.
|
|
17
|
+
|
|
18
|
+
`tests/the-readme-hooks-shape-matches-the-loader.test.ts` holds it there, reading
|
|
19
|
+
`CLAUDE_CODE_EVENT_MAP`, `ACCEPTED_HOOK_FIELDS` and `UNIMPLEMENTED_CLAUDE_CODE_HOOK_FIELDS` from the
|
|
20
|
+
loader — the last two newly exported for that purpose, from a module that is already `@internal`, on
|
|
21
|
+
the precedent `CLAUDE_CODE_EVENT_MAP` set when it was exported so the supported set would be derived
|
|
22
|
+
rather than asserted.
|
|
23
|
+
|
|
24
|
+
Each list is read from its own sentence rather than from the section. The first version of the test
|
|
25
|
+
asserted the section contained `` `if` `` and passed after `if` was deleted from the refused list,
|
|
26
|
+
because the next sentence happens to mention it — a green assertion for a reason unrelated to its
|
|
27
|
+
claim, which is the same defect one level up.
|
|
28
|
+
|
|
29
|
+
## 5.9.0
|
|
30
|
+
|
|
31
|
+
### Minor Changes
|
|
32
|
+
|
|
33
|
+
- [#691](https://github.com/usetheokit/theokit-sdk/pull/691) [`4594f67`](https://github.com/usetheokit/theokit-sdk/commit/4594f6709e48849bb7774b40d2bc5c8e6f5d9e49) Thanks [@usetheodev](https://github.com/usetheodev)! - A subagent's `memory:` frontmatter is carried on `AgentDefinition.memory` instead of failing the
|
|
34
|
+
file. The SDK does not resolve the root, read `MEMORY.md` or touch the prompt: which of three roots
|
|
35
|
+
a note lives under is a decision about who can see it, `@theokit/agents` owns that decision with
|
|
36
|
+
`resolveAgentMemory`, and a second copy of the rule here is how the two drift into disagreeing about
|
|
37
|
+
privacy. The value passes through unjudged so a scope a newer `@theokit/agents` has learned is not
|
|
38
|
+
rejected by a list in this package. `permissionMode`, `maxTurns` and the rest of
|
|
39
|
+
`KNOWN_CLAUDE_CODE_FIELDS` still skip their file.
|
|
40
|
+
|
|
41
|
+
### Patch Changes
|
|
42
|
+
|
|
43
|
+
- [#691](https://github.com/usetheokit/theokit-sdk/pull/691) [`b19965d`](https://github.com/usetheokit/theokit-sdk/commit/b19965d4a0470944fb29bb5ee6f5055c98136f2b) Thanks [@usetheodev](https://github.com/usetheodev)! - Two throwable error codes are back in the published error reference.
|
|
44
|
+
|
|
45
|
+
`subagent_foreign_runtime_field` and `subagent_unknown_field` were written as a ternary inside the
|
|
46
|
+
`ConfigurationError` options. `tools/generate-error-codes.mjs` walks the source for the literal
|
|
47
|
+
assigned to `code:`, and a ternary is not a literal, so it extracted NEITHER — the reference lost a
|
|
48
|
+
code it used to list and never gained the one that replaced it.
|
|
49
|
+
|
|
50
|
+
Both are real and both are thrown. The error reference is the one place a consumer looks to find
|
|
51
|
+
out what they can catch, and it listed neither.
|
|
52
|
+
|
|
53
|
+
- [#691](https://github.com/usetheokit/theokit-sdk/pull/691) [`1d6ce94`](https://github.com/usetheokit/theokit-sdk/commit/1d6ce943b0758223dbce3554e4d7f4c41f7837a0) Thanks [@usetheodev](https://github.com/usetheodev)! - A subagent written for another runtime no longer stops the whole directory from loading. One
|
|
54
|
+
`.claude/agents/*.md` carrying `memory:`, `permissionMode:`, `maxTurns:` or any other field in
|
|
55
|
+
`KNOWN_CLAUDE_CODE_FIELDS` threw out of `loadSubagents`, so every sibling agent failed with it and
|
|
56
|
+
the turn produced no answer at all — measured in a live session where the offending agent was not
|
|
57
|
+
used by the task. Such a file is now skipped with a diagnostic, the way a file with no frontmatter
|
|
58
|
+
already was. A misspelling of one of our own fields (`sandboxx`), or an unknown that belongs to
|
|
59
|
+
nobody (`widgets`), is still fatal — so a typo cannot return as a silent gate.
|
|
60
|
+
|
|
61
|
+
- [#691](https://github.com/usetheokit/theokit-sdk/pull/691) [`7d6664a`](https://github.com/usetheokit/theokit-sdk/commit/7d6664aa0aa9e45e720d33b438f5055c5740297a) Thanks [@usetheodev](https://github.com/usetheodev)! - The dead-code scope note carries a second measurement. It said declaring all twelve packages "was
|
|
62
|
+
measured on 2026-08-20 and surfaced nothing", which is the honest shape for a coverage gap — but a
|
|
63
|
+
note like that stays true only while its number does. Re-measured 2026-09-15 by declaring the other
|
|
64
|
+
ten workspaces and running knip: configuration hints only, no unused exports, exit 0. The ten are
|
|
65
|
+
still unexamined rather than known-dirty, now on two dates instead of one.
|
|
66
|
+
|
|
3
67
|
## 5.8.0
|
|
4
68
|
|
|
5
69
|
### Minor Changes
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk56BCEM26_cjs = require('./chunk-56BCEM26.cjs');
|
|
4
4
|
require('./chunk-J6GXS5A2.cjs');
|
|
5
5
|
require('./chunk-PSLCVSCS.cjs');
|
|
6
6
|
require('./chunk-BUUUWQMB.cjs');
|
|
7
7
|
require('./chunk-TTBIQTO5.cjs');
|
|
8
|
-
require('./chunk-
|
|
8
|
+
require('./chunk-KIKKTW5O.cjs');
|
|
9
9
|
require('./chunk-BV2MWEMV.cjs');
|
|
10
10
|
require('./chunk-MEUBLCM4.cjs');
|
|
11
11
|
require('./chunk-GHX4P3V2.cjs');
|
|
@@ -19,8 +19,8 @@ require('./chunk-WPO3VCY4.cjs');
|
|
|
19
19
|
require('./chunk-QOGNZMHD.cjs');
|
|
20
20
|
require('./chunk-YIFFF23U.cjs');
|
|
21
21
|
require('./chunk-2ZPEDVLM.cjs');
|
|
22
|
-
require('./chunk-
|
|
23
|
-
require('./chunk-
|
|
22
|
+
require('./chunk-XKZFIP7Z.cjs');
|
|
23
|
+
require('./chunk-N6OEX5TN.cjs');
|
|
24
24
|
require('./chunk-KRD3GQAA.cjs');
|
|
25
25
|
require('./chunk-RQMCOFAI.cjs');
|
|
26
26
|
require('./chunk-MUUQ2WFJ.cjs');
|
|
@@ -44,7 +44,7 @@ require('./chunk-OF2CLCTH.cjs');
|
|
|
44
44
|
require('./chunk-ZF2LDKQQ.cjs');
|
|
45
45
|
require('./chunk-GHHIJEFX.cjs');
|
|
46
46
|
require('./chunk-JLRLCBJ4.cjs');
|
|
47
|
-
require('./chunk-
|
|
47
|
+
require('./chunk-C7GKRGKN.cjs');
|
|
48
48
|
require('./chunk-TY56BKSK.cjs');
|
|
49
49
|
require('./chunk-MPR2ISL2.cjs');
|
|
50
50
|
require('./chunk-J5623RIV.cjs');
|
|
@@ -62,7 +62,7 @@ require('./chunk-6LHQPOMI.cjs');
|
|
|
62
62
|
|
|
63
63
|
Object.defineProperty(exports, "Agent", {
|
|
64
64
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunk56BCEM26_cjs.Agent; }
|
|
66
66
|
});
|
|
67
|
-
//# sourceMappingURL=agent-
|
|
68
|
-
//# sourceMappingURL=agent-
|
|
67
|
+
//# sourceMappingURL=agent-5M7WLUWH.cjs.map
|
|
68
|
+
//# sourceMappingURL=agent-5M7WLUWH.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"agent-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"agent-5M7WLUWH.cjs"}
|
|
@@ -1283,6 +1283,18 @@ interface AgentDefinition {
|
|
|
1283
1283
|
* answered it for the other two surfaces.
|
|
1284
1284
|
*/
|
|
1285
1285
|
source?: string;
|
|
1286
|
+
/**
|
|
1287
|
+
* The memory root this subagent declared, from `memory:` in its frontmatter.
|
|
1288
|
+
*
|
|
1289
|
+
* CARRIED, never acted on here. Resolving it means deciding which of three roots a note lives
|
|
1290
|
+
* under, and those roots differ in who can see it — `@theokit/agents` owns that decision, with
|
|
1291
|
+
* `resolveAgentMemory` and a refusal for any scope it does not recognise. A second copy of that
|
|
1292
|
+
* rule in this package is how the two drift into disagreeing about privacy.
|
|
1293
|
+
*
|
|
1294
|
+
* The value is passed through unjudged for the same reason: a scope a newer `@theokit/agents`
|
|
1295
|
+
* has learned would otherwise be rejected here, by a list nobody remembered to update.
|
|
1296
|
+
*/
|
|
1297
|
+
memory?: string;
|
|
1286
1298
|
model?: ModelSelection | "inherit";
|
|
1287
1299
|
mcpServers?: Array<string | Record<string, McpServerConfig>>;
|
|
1288
1300
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { Agent } from './chunk-
|
|
1
|
+
export { Agent } from './chunk-OOM236Z4.js';
|
|
2
2
|
import './chunk-XKMVJ443.js';
|
|
3
3
|
import './chunk-5522X223.js';
|
|
4
4
|
import './chunk-K2BQQ445.js';
|
|
5
5
|
import './chunk-R2C3HXR3.js';
|
|
6
|
-
import './chunk-
|
|
6
|
+
import './chunk-ZHWKT2NI.js';
|
|
7
7
|
import './chunk-2SFBB54R.js';
|
|
8
8
|
import './chunk-HOHR75KF.js';
|
|
9
9
|
import './chunk-H73MEMQB.js';
|
|
@@ -17,8 +17,8 @@ import './chunk-TE6XVTOA.js';
|
|
|
17
17
|
import './chunk-24MGQDK3.js';
|
|
18
18
|
import './chunk-2WXHA33T.js';
|
|
19
19
|
import './chunk-HKCKOAIO.js';
|
|
20
|
-
import './chunk-
|
|
21
|
-
import './chunk-
|
|
20
|
+
import './chunk-7QJYKVP6.js';
|
|
21
|
+
import './chunk-OPAKPEPG.js';
|
|
22
22
|
import './chunk-KVNWIAO4.js';
|
|
23
23
|
import './chunk-SVQIW5RJ.js';
|
|
24
24
|
import './chunk-FD2UT76F.js';
|
|
@@ -42,7 +42,7 @@ import './chunk-BKMDRBJ7.js';
|
|
|
42
42
|
import './chunk-Q5EWJPRY.js';
|
|
43
43
|
import './chunk-GGRPAQ3B.js';
|
|
44
44
|
import './chunk-3JHIFQ4I.js';
|
|
45
|
-
import './chunk-
|
|
45
|
+
import './chunk-ZDYDBXSD.js';
|
|
46
46
|
import './chunk-X7EUUHXU.js';
|
|
47
47
|
import './chunk-MQGSOKR3.js';
|
|
48
48
|
import './chunk-GMRFAX4I.js';
|
|
@@ -55,5 +55,5 @@ import './chunk-5Q4RTLMP.js';
|
|
|
55
55
|
import './chunk-H3CVJSFC.js';
|
|
56
56
|
import './chunk-B5MHRQJZ.js';
|
|
57
57
|
import './chunk-CZJ6Q7CW.js';
|
|
58
|
-
//# sourceMappingURL=agent-
|
|
59
|
-
//# sourceMappingURL=agent-
|
|
58
|
+
//# sourceMappingURL=agent-R5RERYFU.js.map
|
|
59
|
+
//# sourceMappingURL=agent-R5RERYFU.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"agent-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"agent-R5RERYFU.js"}
|
|
@@ -1283,6 +1283,18 @@ interface AgentDefinition {
|
|
|
1283
1283
|
* answered it for the other two surfaces.
|
|
1284
1284
|
*/
|
|
1285
1285
|
source?: string;
|
|
1286
|
+
/**
|
|
1287
|
+
* The memory root this subagent declared, from `memory:` in its frontmatter.
|
|
1288
|
+
*
|
|
1289
|
+
* CARRIED, never acted on here. Resolving it means deciding which of three roots a note lives
|
|
1290
|
+
* under, and those roots differ in who can see it — `@theokit/agents` owns that decision, with
|
|
1291
|
+
* `resolveAgentMemory` and a refusal for any scope it does not recognise. A second copy of that
|
|
1292
|
+
* rule in this package is how the two drift into disagreeing about privacy.
|
|
1293
|
+
*
|
|
1294
|
+
* The value is passed through unjudged for the same reason: a scope a newer `@theokit/agents`
|
|
1295
|
+
* has learned would otherwise be rejected here, by a list nobody remembered to update.
|
|
1296
|
+
*/
|
|
1297
|
+
memory?: string;
|
|
1286
1298
|
model?: ModelSelection | "inherit";
|
|
1287
1299
|
mcpServers?: Array<string | Record<string, McpServerConfig>>;
|
|
1288
1300
|
/**
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var chunkJ6GXS5A2_cjs = require('./chunk-J6GXS5A2.cjs');
|
|
4
4
|
var chunkPSLCVSCS_cjs = require('./chunk-PSLCVSCS.cjs');
|
|
5
5
|
var chunkTTBIQTO5_cjs = require('./chunk-TTBIQTO5.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkKIKKTW5O_cjs = require('./chunk-KIKKTW5O.cjs');
|
|
7
7
|
var chunkBV2MWEMV_cjs = require('./chunk-BV2MWEMV.cjs');
|
|
8
8
|
var chunkMEUBLCM4_cjs = require('./chunk-MEUBLCM4.cjs');
|
|
9
9
|
var chunkTMKTSYDS_cjs = require('./chunk-TMKTSYDS.cjs');
|
|
@@ -11,8 +11,8 @@ var chunk76PIKR4P_cjs = require('./chunk-76PIKR4P.cjs');
|
|
|
11
11
|
var chunkB3XXQX6L_cjs = require('./chunk-B3XXQX6L.cjs');
|
|
12
12
|
var chunkARMFXTY6_cjs = require('./chunk-ARMFXTY6.cjs');
|
|
13
13
|
var chunk2ZPEDVLM_cjs = require('./chunk-2ZPEDVLM.cjs');
|
|
14
|
-
var
|
|
15
|
-
var
|
|
14
|
+
var chunkXKZFIP7Z_cjs = require('./chunk-XKZFIP7Z.cjs');
|
|
15
|
+
var chunkN6OEX5TN_cjs = require('./chunk-N6OEX5TN.cjs');
|
|
16
16
|
var chunkRQMCOFAI_cjs = require('./chunk-RQMCOFAI.cjs');
|
|
17
17
|
var chunkAA27GEYS_cjs = require('./chunk-AA27GEYS.cjs');
|
|
18
18
|
var chunkYSTXFWQE_cjs = require('./chunk-YSTXFWQE.cjs');
|
|
@@ -27,7 +27,7 @@ var chunkGZV6AVRL_cjs = require('./chunk-GZV6AVRL.cjs');
|
|
|
27
27
|
var chunkOF2CLCTH_cjs = require('./chunk-OF2CLCTH.cjs');
|
|
28
28
|
var chunkZF2LDKQQ_cjs = require('./chunk-ZF2LDKQQ.cjs');
|
|
29
29
|
var chunkJLRLCBJ4_cjs = require('./chunk-JLRLCBJ4.cjs');
|
|
30
|
-
var
|
|
30
|
+
var chunkC7GKRGKN_cjs = require('./chunk-C7GKRGKN.cjs');
|
|
31
31
|
var chunkTY56BKSK_cjs = require('./chunk-TY56BKSK.cjs');
|
|
32
32
|
var chunkMPR2ISL2_cjs = require('./chunk-MPR2ISL2.cjs');
|
|
33
33
|
var chunkJ5623RIV_cjs = require('./chunk-J5623RIV.cjs');
|
|
@@ -2124,14 +2124,14 @@ async function readState(filePath) {
|
|
|
2124
2124
|
try {
|
|
2125
2125
|
parsed = JSON.parse(raw);
|
|
2126
2126
|
} catch {
|
|
2127
|
-
|
|
2127
|
+
chunkN6OEX5TN_cjs.warnOnce(
|
|
2128
2128
|
"personality-store-json-parse",
|
|
2129
2129
|
"[theokit-sdk] personality.json is malformed; treating as empty"
|
|
2130
2130
|
);
|
|
2131
2131
|
return emptyState();
|
|
2132
2132
|
}
|
|
2133
2133
|
if (!isStateV1(parsed)) {
|
|
2134
|
-
|
|
2134
|
+
chunkN6OEX5TN_cjs.warnOnce(
|
|
2135
2135
|
"personality-store-bad-version",
|
|
2136
2136
|
`[theokit-sdk] personality.json has unknown version; treating as empty (file kept untouched)`
|
|
2137
2137
|
);
|
|
@@ -2162,7 +2162,7 @@ var PersonalityStore = class {
|
|
|
2162
2162
|
try {
|
|
2163
2163
|
await this.#persist(agentId, slug);
|
|
2164
2164
|
} catch (err) {
|
|
2165
|
-
|
|
2165
|
+
chunkN6OEX5TN_cjs.warnOnce(
|
|
2166
2166
|
`personality-store-persist-failure-${agentId}`,
|
|
2167
2167
|
`[theokit-sdk] personality persist failed for ${chunk6LHQPOMI_cjs.redactSecrets(agentId)}: ${chunk6LHQPOMI_cjs.redactSecrets(
|
|
2168
2168
|
err.message
|
|
@@ -2179,7 +2179,7 @@ var PersonalityStore = class {
|
|
|
2179
2179
|
try {
|
|
2180
2180
|
state = await readState(filePath);
|
|
2181
2181
|
} catch (err) {
|
|
2182
|
-
|
|
2182
|
+
chunkN6OEX5TN_cjs.warnOnce(
|
|
2183
2183
|
`personality-store-hydrate-failure-${agentId}`,
|
|
2184
2184
|
`[theokit-sdk] personality hydrate failed for ${chunk6LHQPOMI_cjs.redactSecrets(agentId)}: ${chunk6LHQPOMI_cjs.redactSecrets(
|
|
2185
2185
|
err.message
|
|
@@ -2728,7 +2728,7 @@ var HooksExecutor = class {
|
|
|
2728
2728
|
config = {};
|
|
2729
2729
|
async initialize(settingSourcesIncludeProject) {
|
|
2730
2730
|
if (readManagedSettings(this.policy.managedSettingsRoot).disableAllHooks === true) {
|
|
2731
|
-
|
|
2731
|
+
chunkN6OEX5TN_cjs.warnFailureOnce(
|
|
2732
2732
|
"hooks-disabled-by-policy",
|
|
2733
2733
|
"[theokit-sdk] hooks: an operator policy (managed-settings.json) declares disableAllHooks \u2014 NO hook will run, including any this project declared."
|
|
2734
2734
|
);
|
|
@@ -2739,7 +2739,7 @@ var HooksExecutor = class {
|
|
|
2739
2739
|
this.config = {};
|
|
2740
2740
|
return;
|
|
2741
2741
|
}
|
|
2742
|
-
this.config = await
|
|
2742
|
+
this.config = await chunkN6OEX5TN_cjs.loadHookConfig(this.cwd, this.compatSources);
|
|
2743
2743
|
}
|
|
2744
2744
|
/** Fire every hook registered for `event` and aggregate the decisions. */
|
|
2745
2745
|
async run(payload) {
|
|
@@ -3046,7 +3046,7 @@ var SkillsManager = class {
|
|
|
3046
3046
|
...chunkTY56BKSK_cjs.projectConfigRoots(this.cwd, this.compatSources, "skills").map(
|
|
3047
3047
|
(root) => path.join(root, "skills")
|
|
3048
3048
|
),
|
|
3049
|
-
...(await
|
|
3049
|
+
...(await chunkC7GKRGKN_cjs.pluginBundleDirs(this.cwd, this.compatSources)).map((b) => path.join(b, "skills"))
|
|
3050
3050
|
] : [this.skillsDir];
|
|
3051
3051
|
const discovered = [];
|
|
3052
3052
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -3638,7 +3638,7 @@ var HISTOGRAM_NAMES = {
|
|
|
3638
3638
|
};
|
|
3639
3639
|
function safeRequire(moduleName) {
|
|
3640
3640
|
try {
|
|
3641
|
-
const r = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-
|
|
3641
|
+
const r = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-56BCEM26.cjs', document.baseURI).href)));
|
|
3642
3642
|
return r(moduleName);
|
|
3643
3643
|
} catch {
|
|
3644
3644
|
return void 0;
|
|
@@ -3881,7 +3881,7 @@ var cachedOtel;
|
|
|
3881
3881
|
function loadOtel() {
|
|
3882
3882
|
if (cachedOtel === void 0) {
|
|
3883
3883
|
try {
|
|
3884
|
-
const r = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-
|
|
3884
|
+
const r = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-56BCEM26.cjs', document.baseURI).href)));
|
|
3885
3885
|
const mod = r("@opentelemetry/api");
|
|
3886
3886
|
cachedOtel = mod;
|
|
3887
3887
|
} catch {
|
|
@@ -4200,7 +4200,7 @@ function applyAggregateCap(sources, maxTotal) {
|
|
|
4200
4200
|
}
|
|
4201
4201
|
const remaining = maxTotal - totalBytes;
|
|
4202
4202
|
if (remaining > 0) {
|
|
4203
|
-
const { finalContent } =
|
|
4203
|
+
const { finalContent } = chunkXKZFIP7Z_cjs.truncateWithMarker(s.content, remaining);
|
|
4204
4204
|
kept.push({ ...s, content: finalContent, truncated: true });
|
|
4205
4205
|
totalBytes = maxTotal;
|
|
4206
4206
|
} else {
|
|
@@ -4297,10 +4297,10 @@ var FileContextManager = class {
|
|
|
4297
4297
|
this.lastScope = [...touchedFiles];
|
|
4298
4298
|
const config = await loadContextConfig(this.cwd);
|
|
4299
4299
|
const legacy = await loadSources(config, this.cwd);
|
|
4300
|
-
const maxBytesPerFile = this.settings.maxBytesPerFile ??
|
|
4300
|
+
const maxBytesPerFile = this.settings.maxBytesPerFile ?? chunkXKZFIP7Z_cjs.DEFAULT_MAX_BYTES_PER_FILE;
|
|
4301
4301
|
const maxBytesTotal = this.settings.maxBytesTotal ?? DEFAULT_MAX_BYTES_TOTAL;
|
|
4302
4302
|
const granted = this.grantedContextDialects();
|
|
4303
|
-
const discovered = await
|
|
4303
|
+
const discovered = await chunkXKZFIP7Z_cjs.runDiscovery({
|
|
4304
4304
|
cwd: this.cwd,
|
|
4305
4305
|
maxBytesPerFile,
|
|
4306
4306
|
skipLegacyTheokitContext: true,
|
|
@@ -4373,7 +4373,7 @@ async function loadContextConfig(cwd) {
|
|
|
4373
4373
|
});
|
|
4374
4374
|
if (mdEntities.length > 0) {
|
|
4375
4375
|
if (fs.existsSync(jsonPath)) {
|
|
4376
|
-
|
|
4376
|
+
chunkN6OEX5TN_cjs.warnOnce(
|
|
4377
4377
|
"context-both-present",
|
|
4378
4378
|
"[theokit-sdk] both .theokit/context/ and .theokit/context.json detected \u2014 using markdown; remove context.json"
|
|
4379
4379
|
);
|
|
@@ -4383,7 +4383,7 @@ async function loadContextConfig(cwd) {
|
|
|
4383
4383
|
};
|
|
4384
4384
|
}
|
|
4385
4385
|
if (!fs.existsSync(jsonPath)) return { sources: [] };
|
|
4386
|
-
|
|
4386
|
+
chunkN6OEX5TN_cjs.warnOnce(
|
|
4387
4387
|
"context-json-deprecated",
|
|
4388
4388
|
// Names no command: `theokit-migrate-config` was unpublished with the `bin` entry, and a warning
|
|
4389
4389
|
// that tells you to run something the package does not ship is worse than one that tells you
|
|
@@ -4546,13 +4546,13 @@ var PluginsManager = class {
|
|
|
4546
4546
|
const jsonPath = path.join(pluginsRoot, folderName, "plugin.json");
|
|
4547
4547
|
const metadata = fs.existsSync(mdPath) ? await loadPluginManifestFromMarkdown(this.cwd, pluginsRoot, folderName) : await loadPluginManifestFromJson(this.cwd, jsonPath, folderName);
|
|
4548
4548
|
if (fs.existsSync(mdPath) && fs.existsSync(jsonPath)) {
|
|
4549
|
-
|
|
4549
|
+
chunkN6OEX5TN_cjs.warnOnce(
|
|
4550
4550
|
`plugin-${folderName}-both`,
|
|
4551
4551
|
`[theokit-sdk] both ${folderName}/PLUGIN.md and ${folderName}/plugin.json detected \u2014 using markdown; remove plugin.json`
|
|
4552
4552
|
);
|
|
4553
4553
|
}
|
|
4554
4554
|
if (!fs.existsSync(mdPath) && fs.existsSync(jsonPath)) {
|
|
4555
|
-
|
|
4555
|
+
chunkN6OEX5TN_cjs.warnOnce(
|
|
4556
4556
|
"plugin-json-deprecated",
|
|
4557
4557
|
// Same reason as the context.json warning: the CLI it used to name is no longer published.
|
|
4558
4558
|
"[theokit-sdk] plugin.json manifests are deprecated; replace each with a PLUGIN.md"
|
|
@@ -7447,7 +7447,7 @@ function applyPersonalityFilter(exposedTools, whitelist, opts) {
|
|
|
7447
7447
|
if (exposedSet.has(name)) continue;
|
|
7448
7448
|
const hint = suggestClosest(name, exposedSet);
|
|
7449
7449
|
const message = hint !== void 0 ? `[theokit-sdk] personality "${opts?.personalityName ?? "?"}" references unknown tool "${name}"; did you mean "${hint}"?` : `[theokit-sdk] personality "${opts?.personalityName ?? "?"}" references unknown tool "${name}" (not exposed)`;
|
|
7450
|
-
|
|
7450
|
+
chunkN6OEX5TN_cjs.warnOnce(
|
|
7451
7451
|
`personality-tool-missing|${opts?.agentId ?? "?"}|${opts?.personalityName ?? "?"}|${name}`,
|
|
7452
7452
|
message
|
|
7453
7453
|
);
|
|
@@ -8138,7 +8138,7 @@ async function reloadLocalAgent(agent) {
|
|
|
8138
8138
|
if (agent.context !== void 0) await agent.context.refresh();
|
|
8139
8139
|
if (agent.skillsManager !== void 0) await agent.skillsManager.refresh();
|
|
8140
8140
|
if (agent.pluginsManager !== void 0) await agent.pluginsManager.refresh();
|
|
8141
|
-
return await
|
|
8141
|
+
return await chunkC7GKRGKN_cjs.loadSubagents(
|
|
8142
8142
|
agent.workspaceCwd,
|
|
8143
8143
|
agent.settingSourcesIncludeProject,
|
|
8144
8144
|
agent.options.agents
|
|
@@ -9224,7 +9224,7 @@ function addEntity(byName, entity, origin, collisionMap) {
|
|
|
9224
9224
|
);
|
|
9225
9225
|
}
|
|
9226
9226
|
if (origin === "project" && collisionMap?.has(fm.name)) {
|
|
9227
|
-
|
|
9227
|
+
chunkN6OEX5TN_cjs.warnOnce(
|
|
9228
9228
|
`personality-collision-${fm.name}`,
|
|
9229
9229
|
`[theokit-sdk] personality "${fm.name}" overridden by project preset`
|
|
9230
9230
|
);
|
|
@@ -9274,14 +9274,14 @@ async function performPersonalitySwitch(args) {
|
|
|
9274
9274
|
|
|
9275
9275
|
// src/internal/local-agent/local-agent-personality-extensions.ts
|
|
9276
9276
|
function resolveActivePersonalityPreset(args) {
|
|
9277
|
-
const forkCtx =
|
|
9277
|
+
const forkCtx = chunkKIKKTW5O_cjs.currentPersonalityContext();
|
|
9278
9278
|
const slug = forkCtx !== void 0 ? forkCtx.slug : args.personalityStore.active(args.agentId);
|
|
9279
9279
|
if (slug === void 0) return void 0;
|
|
9280
9280
|
return args.personalityRegistry?.get(slug);
|
|
9281
9281
|
}
|
|
9282
9282
|
async function ensurePersonalityRegistryIfNeeded(args) {
|
|
9283
9283
|
if (args.personalityRegistry !== void 0) return args.personalityRegistry;
|
|
9284
|
-
const forkSlug =
|
|
9284
|
+
const forkSlug = chunkKIKKTW5O_cjs.currentPersonalityContext()?.slug;
|
|
9285
9285
|
const ownSlug = args.personalityStore.active(args.agentId);
|
|
9286
9286
|
if (forkSlug === void 0 && ownSlug === void 0) return void 0;
|
|
9287
9287
|
return await PersonalityRegistry.load(args.workspaceCwd);
|
|
@@ -9294,8 +9294,8 @@ function applyPersonalityOverlay(preset, base) {
|
|
|
9294
9294
|
${preset.systemPrompt}`;
|
|
9295
9295
|
}
|
|
9296
9296
|
async function localAgentUsePersonality(agent, name, opts) {
|
|
9297
|
-
if (
|
|
9298
|
-
|
|
9297
|
+
if (chunkKIKKTW5O_cjs.currentPersonalityContext() !== void 0) {
|
|
9298
|
+
chunkKIKKTW5O_cjs.warnPersonalitySwitchInsideFork(agent.agentId);
|
|
9299
9299
|
return null;
|
|
9300
9300
|
}
|
|
9301
9301
|
if (agent.personalityRegistry === void 0) {
|
|
@@ -9356,7 +9356,7 @@ async function* localAgentStreamToCompletion(agent, message, options) {
|
|
|
9356
9356
|
async function localAgentFork(parent, options) {
|
|
9357
9357
|
const { forkAgentImpl } = await import('./fork-agent-WAEQI2DL.cjs');
|
|
9358
9358
|
const { getAgentFacade } = await import('./agent-factory-registry-UU46BUMU.cjs');
|
|
9359
|
-
const { withPersonalityContext } = await import('./context-
|
|
9359
|
+
const { withPersonalityContext } = await import('./context-B5J4GX2F.cjs');
|
|
9360
9360
|
const create = getAgentFacade().create;
|
|
9361
9361
|
return withPersonalityContext(
|
|
9362
9362
|
{ slug: parent.personalitySlugSnapshot, isFork: true },
|
|
@@ -10177,7 +10177,7 @@ var LocalAgent = class {
|
|
|
10177
10177
|
if (this.pluginsManager !== void 0) await this.pluginsManager.initialize();
|
|
10178
10178
|
const codePlugins = chunkBV2MWEMV_cjs.extractCodePlugins(this.options.plugins);
|
|
10179
10179
|
await this.pluginManagerCode.initialize(codePlugins);
|
|
10180
|
-
this.resolvedSubagents = await
|
|
10180
|
+
this.resolvedSubagents = await chunkC7GKRGKN_cjs.loadSubagents(
|
|
10181
10181
|
this.workspaceCwd,
|
|
10182
10182
|
this.settingSourcesIncludeProject,
|
|
10183
10183
|
this.options.agents,
|
|
@@ -11136,7 +11136,7 @@ var Agent = class _Agent {
|
|
|
11136
11136
|
*/
|
|
11137
11137
|
static async describe(agentId) {
|
|
11138
11138
|
const agent = await getRegisteredAgentOrThrow(agentId);
|
|
11139
|
-
const { loadSubagents: loadSubagents2 } = await import('./subagents-loader-
|
|
11139
|
+
const { loadSubagents: loadSubagents2 } = await import('./subagents-loader-5TZCAIYQ.cjs');
|
|
11140
11140
|
const settingSources = agent.options.local?.settingSources;
|
|
11141
11141
|
const subagents = await loadSubagents2(
|
|
11142
11142
|
agent.cwd ?? process.cwd(),
|
|
@@ -11256,5 +11256,5 @@ exports.managedSettingsPathFor = managedSettingsPathFor;
|
|
|
11256
11256
|
exports.openRouterMemoryEmbeddingProviderAdapter = openRouterMemoryEmbeddingProviderAdapter;
|
|
11257
11257
|
exports.readManagedSettings = readManagedSettings;
|
|
11258
11258
|
exports.resolveSessionDir = resolveSessionDir;
|
|
11259
|
-
//# sourceMappingURL=chunk-
|
|
11260
|
-
//# sourceMappingURL=chunk-
|
|
11259
|
+
//# sourceMappingURL=chunk-56BCEM26.cjs.map
|
|
11260
|
+
//# sourceMappingURL=chunk-56BCEM26.cjs.map
|