@theokit/sdk 4.57.0 → 4.59.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 +120 -0
- package/dist/{agent-ZIYCVEZL.js → agent-ST27RIJE.js} +10 -9
- package/dist/{agent-ZIYCVEZL.js.map → agent-ST27RIJE.js.map} +1 -1
- package/dist/{agent-2T2EJIP6.cjs → agent-VHRX7XGW.cjs} +11 -10
- package/dist/{agent-2T2EJIP6.cjs.map → agent-VHRX7XGW.cjs.map} +1 -1
- package/dist/{chunk-E7JHD6QJ.cjs → chunk-554J7UQH.cjs} +44 -27
- package/dist/chunk-554J7UQH.cjs.map +1 -0
- package/dist/{chunk-E3WZ6Y4H.cjs → chunk-7BG5UH3T.cjs} +8 -8
- package/dist/{chunk-E3WZ6Y4H.cjs.map → chunk-7BG5UH3T.cjs.map} +1 -1
- package/dist/{chunk-X7O4255I.cjs → chunk-7GUIET73.cjs} +4 -4
- package/dist/{chunk-X7O4255I.cjs.map → chunk-7GUIET73.cjs.map} +1 -1
- package/dist/{chunk-7TCRNXNK.js → chunk-7LOIUIQZ.js} +69 -29
- package/dist/chunk-7LOIUIQZ.js.map +1 -0
- package/dist/chunk-AQO3NSRG.cjs +41 -0
- package/dist/chunk-AQO3NSRG.cjs.map +1 -0
- package/dist/{chunk-LEM2GOMI.js → chunk-D5NWEOCO.js} +3 -3
- package/dist/{chunk-LEM2GOMI.js.map → chunk-D5NWEOCO.js.map} +1 -1
- package/dist/{chunk-U2AC6JUP.cjs → chunk-J2UROOIG.cjs} +2 -27
- package/dist/chunk-J2UROOIG.cjs.map +1 -0
- package/dist/{chunk-ZNW6V4Y6.cjs → chunk-LKFET5A3.cjs} +23 -2
- package/dist/chunk-LKFET5A3.cjs.map +1 -0
- package/dist/{chunk-YMA4S2WO.js → chunk-MZ2FGBLZ.js} +33 -11
- package/dist/chunk-MZ2FGBLZ.js.map +1 -0
- package/dist/{chunk-53CBTBWO.cjs → chunk-P6H23T43.cjs} +33 -11
- package/dist/chunk-P6H23T43.cjs.map +1 -0
- package/dist/{chunk-7FHZ4VQX.js → chunk-SAVIWMZB.js} +3 -3
- package/dist/{chunk-7FHZ4VQX.js.map → chunk-SAVIWMZB.js.map} +1 -1
- package/dist/{chunk-M2JWHKO6.cjs → chunk-SMUAG2DY.cjs} +103 -63
- package/dist/chunk-SMUAG2DY.cjs.map +1 -0
- package/dist/{chunk-UPRJR6IP.js → chunk-UCBJBJ27.js} +3 -25
- package/dist/chunk-UCBJBJ27.js.map +1 -0
- package/dist/chunk-UFLD2HEV.js +35 -0
- package/dist/chunk-UFLD2HEV.js.map +1 -0
- package/dist/{chunk-GTKFV7O5.js → chunk-WFC26L6Y.js} +23 -2
- package/dist/chunk-WFC26L6Y.js.map +1 -0
- package/dist/{chunk-HJBMA5MB.cjs → chunk-WNTAPVU5.cjs} +47 -6
- package/dist/chunk-WNTAPVU5.cjs.map +1 -0
- package/dist/{chunk-G6EEYRDD.js → chunk-ZA255A62.js} +43 -26
- package/dist/chunk-ZA255A62.js.map +1 -0
- package/dist/{chunk-2QKTVKH3.js → chunk-ZHPWGIUX.js} +48 -8
- package/dist/chunk-ZHPWGIUX.js.map +1 -0
- package/dist/context/index.cjs +7 -7
- package/dist/context/index.js +3 -3
- package/dist/{context-VMIE4BMD.cjs → context-LCKNH2XI.cjs} +7 -6
- package/dist/{context-VMIE4BMD.cjs.map → context-LCKNH2XI.cjs.map} +1 -1
- package/dist/context-MZSKGKYR.js +7 -0
- package/dist/{context-FDOON2DB.js.map → context-MZSKGKYR.js.map} +1 -1
- package/dist/cron.cjs +10 -9
- package/dist/cron.js +9 -8
- package/dist/eval.cjs +9 -8
- package/dist/eval.cjs.map +1 -1
- package/dist/eval.js +8 -7
- package/dist/eval.js.map +1 -1
- package/dist/{index-manager-AO4LJQZ4.cjs → index-manager-A3XPHAWF.cjs} +5 -4
- package/dist/{index-manager-AO4LJQZ4.cjs.map → index-manager-A3XPHAWF.cjs.map} +1 -1
- package/dist/{index-manager-QDPIYIGV.js → index-manager-A64I7KYV.js} +4 -3
- package/dist/{index-manager-QDPIYIGV.js.map → index-manager-A64I7KYV.js.map} +1 -1
- package/dist/index.cjs +32 -33
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +12 -13
- package/dist/index.js.map +1 -1
- package/dist/internal/memory/storage/markdown-store.d.ts +34 -4
- package/dist/internal/persistence/index.cjs +17 -16
- package/dist/internal/persistence/index.cjs.map +1 -1
- package/dist/internal/persistence/index.js +2 -1
- package/dist/internal/persistence/index.js.map +1 -1
- package/dist/internal/persistence/paths.d.cts +42 -0
- package/dist/internal/persistence/paths.d.ts +42 -0
- package/dist/internal/persistence/session-dir.d.cts +15 -0
- package/dist/internal/persistence/session-dir.d.ts +15 -0
- package/dist/internal/runtime/memory/memory-store.d.ts +2 -2
- package/dist/internal/runtime/plugins/plugin-bundles.d.ts +19 -0
- package/dist/project.cjs +3 -3
- package/dist/project.js +1 -1
- package/dist/subagents-loader-6ATCDEKN.js +8 -0
- package/dist/{subagents-loader-J54ESLDV.js.map → subagents-loader-6ATCDEKN.js.map} +1 -1
- package/dist/subagents-loader-X5QKODCL.cjs +17 -0
- package/dist/{subagents-loader-AZIXJ7D3.cjs.map → subagents-loader-X5QKODCL.cjs.map} +1 -1
- package/dist/subagents-loader.cjs +3 -2
- package/dist/subagents-loader.cjs.map +1 -1
- package/dist/subagents-loader.js +2 -1
- package/dist/subagents-loader.js.map +1 -1
- package/docs/error-codes.md +15 -15
- package/package.json +1 -1
- package/dist/chunk-2QKTVKH3.js.map +0 -1
- package/dist/chunk-53CBTBWO.cjs.map +0 -1
- package/dist/chunk-7TCRNXNK.js.map +0 -1
- package/dist/chunk-E7JHD6QJ.cjs.map +0 -1
- package/dist/chunk-G6EEYRDD.js.map +0 -1
- package/dist/chunk-GTKFV7O5.js.map +0 -1
- package/dist/chunk-HJBMA5MB.cjs.map +0 -1
- package/dist/chunk-M2JWHKO6.cjs.map +0 -1
- package/dist/chunk-U2AC6JUP.cjs.map +0 -1
- package/dist/chunk-UPRJR6IP.js.map +0 -1
- package/dist/chunk-YMA4S2WO.js.map +0 -1
- package/dist/chunk-ZNW6V4Y6.cjs.map +0 -1
- package/dist/context-FDOON2DB.js +0 -6
- package/dist/subagents-loader-AZIXJ7D3.cjs +0 -16
- package/dist/subagents-loader-J54ESLDV.js +0 -7
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
import { type MemoryConfig, type MemoryFact } from "../types.js";
|
|
2
2
|
export declare function memoryDir(cwd: string): string;
|
|
3
|
+
/**
|
|
4
|
+
* Where a NEW fact should be written.
|
|
5
|
+
*
|
|
6
|
+
* `.theokit/memory` by default, exactly as before. When the agent was given a `local.sessionDir`,
|
|
7
|
+
* it becomes `<sessionDir>/projects/<encoded-cwd>/memory` — the same place the transcript for that
|
|
8
|
+
* project goes, so a session and the memories recorded during it land beside each other.
|
|
9
|
+
*
|
|
10
|
+
* `local.sessionDir` is the switch because it is already the option this project documents for CLI
|
|
11
|
+
* interop: point it at `~/.claude` and the CLI can `--continue` a session this agent wrote. Someone
|
|
12
|
+
* who set it has said they share state with that CLI, and memory following is what the sentence
|
|
13
|
+
* already implied. It needs no new option, and nothing moves for anyone who never set it.
|
|
14
|
+
*
|
|
15
|
+
* Safe because of the rule this pairs with — WRITE ONE, READ ALL. {@link readFactsFromMarkdown}
|
|
16
|
+
* covers every location, so a consumer whose new facts move keeps every fact they already had. The
|
|
17
|
+
* change relocates where the next one lands; it orphans nothing.
|
|
18
|
+
*/
|
|
19
|
+
export declare function memoryWriteDir(cwd: string, sessionDir: string | undefined): string;
|
|
20
|
+
/**
|
|
21
|
+
* Where the Claude Code CLI keeps THIS project's memories.
|
|
22
|
+
*
|
|
23
|
+
* `<claudeHome>/projects/<encoded-cwd>/memory` — the same `encodeProjectDir` scheme the transcripts
|
|
24
|
+
* already use, which is why no new encoding is invented here. `CLAUDE_CONFIG_DIR` names the home
|
|
25
|
+
* when set (the CLI's own variable); `~/.claude` otherwise.
|
|
26
|
+
*
|
|
27
|
+
* Read, never written. Writing here by default would relocate every existing consumer's memories,
|
|
28
|
+
* and an additive change must not move what is already on disk — so this is the direction that
|
|
29
|
+
* costs nothing: a memory the CLI wrote becomes visible, and a memory the SDK wrote stays where the
|
|
30
|
+
* SDK put it.
|
|
31
|
+
*/
|
|
32
|
+
export declare function claudeProjectMemoryDir(cwd: string): string;
|
|
3
33
|
export declare function memoryMdPath(cwd: string): string;
|
|
4
34
|
export declare function notesDir(cwd: string): string;
|
|
5
35
|
/**
|
|
@@ -10,14 +40,14 @@ export declare function notesDir(cwd: string): string;
|
|
|
10
40
|
* repositories, and the store's own header invites editing them by hand — a converged writer that
|
|
11
41
|
* stopped reading them would delete what someone recorded, which is worse than the format it fixes.
|
|
12
42
|
*/
|
|
13
|
-
export declare function readFactsFromMarkdown(cwd: string): Promise<MemoryFact[]>;
|
|
43
|
+
export declare function readFactsFromMarkdown(cwd: string, sessionDir?: string): Promise<MemoryFact[]>;
|
|
14
44
|
/**
|
|
15
45
|
* Write a fact as its own memory file and point the `MEMORY.md` index at it. Atomic + serialized.
|
|
16
46
|
*
|
|
17
47
|
* `modified` is stamped HERE and never read from `fact`: a timestamp a caller can set is a
|
|
18
48
|
* timestamp that can lie about when something was learned, and weighing recency is the point.
|
|
19
49
|
*/
|
|
20
|
-
export declare function appendFactToMarkdown(cwd: string, fact: MemoryFact): Promise<void>;
|
|
50
|
+
export declare function appendFactToMarkdown(cwd: string, fact: MemoryFact, targetDir?: string): Promise<void>;
|
|
21
51
|
/** Configuration-aware accessors honoring the existing MemoryConfig contract. */
|
|
22
|
-
export declare function readFacts(cwd: string, config: MemoryConfig): Promise<MemoryFact[]>;
|
|
23
|
-
export declare function appendFact(cwd: string, config: MemoryConfig, fact: MemoryFact): Promise<void>;
|
|
52
|
+
export declare function readFacts(cwd: string, config: MemoryConfig, memoryHome?: string): Promise<MemoryFact[]>;
|
|
53
|
+
export declare function appendFact(cwd: string, config: MemoryConfig, fact: MemoryFact, memoryHome?: string): Promise<void>;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkVTYY7XL5_cjs = require('../../chunk-VTYY7XL5.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkJ2UROOIG_cjs = require('../../chunk-J2UROOIG.cjs');
|
|
5
5
|
var chunkSKXBJ2NU_cjs = require('../../chunk-SKXBJ2NU.cjs');
|
|
6
6
|
var chunk2ADR2GSO_cjs = require('../../chunk-2ADR2GSO.cjs');
|
|
7
7
|
var chunkZF2LDKQQ_cjs = require('../../chunk-ZF2LDKQQ.cjs');
|
|
8
8
|
var chunkI6TGFUCO_cjs = require('../../chunk-I6TGFUCO.cjs');
|
|
9
|
+
var chunkAQO3NSRG_cjs = require('../../chunk-AQO3NSRG.cjs');
|
|
9
10
|
require('../../chunk-K3FW2XZD.cjs');
|
|
10
11
|
require('../../chunk-JTB5Q42C.cjs');
|
|
11
12
|
require('../../chunk-NUKRL3I6.cjs');
|
|
@@ -40,29 +41,17 @@ Object.defineProperty(exports, "PersistenceSchema", {
|
|
|
40
41
|
enumerable: true,
|
|
41
42
|
get: function () { return chunkVTYY7XL5_cjs.PersistenceSchema; }
|
|
42
43
|
});
|
|
43
|
-
Object.defineProperty(exports, "displayTheokitHome", {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
get: function () { return chunkU2AC6JUP_cjs.displayTheokitHome; }
|
|
46
|
-
});
|
|
47
|
-
Object.defineProperty(exports, "getProfilesRoot", {
|
|
48
|
-
enumerable: true,
|
|
49
|
-
get: function () { return chunkU2AC6JUP_cjs.getProfilesRoot; }
|
|
50
|
-
});
|
|
51
|
-
Object.defineProperty(exports, "getTheokitHome", {
|
|
52
|
-
enumerable: true,
|
|
53
|
-
get: function () { return chunkU2AC6JUP_cjs.getTheokitHome; }
|
|
54
|
-
});
|
|
55
44
|
Object.defineProperty(exports, "migrateSchema", {
|
|
56
45
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkJ2UROOIG_cjs.migrateSchema; }
|
|
58
47
|
});
|
|
59
48
|
Object.defineProperty(exports, "readVersionedJson", {
|
|
60
49
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkJ2UROOIG_cjs.readVersionedJson; }
|
|
62
51
|
});
|
|
63
52
|
Object.defineProperty(exports, "writeVersionedJson", {
|
|
64
53
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunkJ2UROOIG_cjs.writeVersionedJson; }
|
|
66
55
|
});
|
|
67
56
|
Object.defineProperty(exports, "applyWalWithFallback", {
|
|
68
57
|
enumerable: true,
|
|
@@ -120,6 +109,18 @@ Object.defineProperty(exports, "replaceFileAtomic", {
|
|
|
120
109
|
enumerable: true,
|
|
121
110
|
get: function () { return chunkI6TGFUCO_cjs.replaceFileAtomic; }
|
|
122
111
|
});
|
|
112
|
+
Object.defineProperty(exports, "displayTheokitHome", {
|
|
113
|
+
enumerable: true,
|
|
114
|
+
get: function () { return chunkAQO3NSRG_cjs.displayTheokitHome; }
|
|
115
|
+
});
|
|
116
|
+
Object.defineProperty(exports, "getProfilesRoot", {
|
|
117
|
+
enumerable: true,
|
|
118
|
+
get: function () { return chunkAQO3NSRG_cjs.getProfilesRoot; }
|
|
119
|
+
});
|
|
120
|
+
Object.defineProperty(exports, "getTheokitHome", {
|
|
121
|
+
enumerable: true,
|
|
122
|
+
get: function () { return chunkAQO3NSRG_cjs.getTheokitHome; }
|
|
123
|
+
});
|
|
123
124
|
exports.casUpdate = casUpdate;
|
|
124
125
|
exports.createExclusive = createExclusive;
|
|
125
126
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/internal/persistence/exclusive-create.ts","../../../src/internal/persistence/sqlite-cas.ts"],"names":["open"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/internal/persistence/exclusive-create.ts","../../../src/internal/persistence/sqlite-cas.ts"],"names":["open"],"mappings":";;;;;;;;;;;;;;AAwDA,eAAsB,eAAA,CACpB,IAAA,EACA,IAAA,EACA,OAAA,EACkB;AAClB,EAAA,MAAM,IAAA,GAAO,SAAS,IAAA,IAAQ,GAAA;AAC9B,EAAA,IAAI;AACF,IAAA,MAAM,MAAA,GAAS,MAAMA,aAAA,CAAK,IAAA,EAAM,MAAM,IAAI,CAAA;AAC1C,IAAA,IAAI;AACF,MAAA,MAAM,MAAA,CAAO,UAAU,IAAI,CAAA;AAC3B,MAAA,OAAO,IAAA;AAAA,IACT,CAAA,SAAE;AACA,MAAA,MAAM,OAAO,KAAA,EAAM;AAAA,IACrB;AAAA,EACF,SAAS,GAAA,EAAK;AACZ,IAAA,IAAK,GAAA,CAA8B,SAAS,QAAA,EAAU;AACpD,MAAA,OAAO,KAAA;AAAA,IACT;AACA,IAAA,MAAM,GAAA;AAAA,EACR;AACF;;;ACdO,SAAS,SAAA,CACd,EAAA,EACA,GAAA,EACA,MAAA,EACA,kBAA0B,CAAA,EACjB;AACT,EAAA,MAAM,IAAA,GAAO,EAAA,CAAG,OAAA,CAAQ,GAAG,CAAA;AAC3B,EAAA,MAAM,MAAA,GAAS,IAAA,CAAK,GAAA,CAAI,GAAI,MAAoB,CAAA;AAChD,EAAA,OAAO,OAAO,OAAA,KAAY,eAAA;AAC5B","file":"index.cjs","sourcesContent":["/**\n * O_EXCL exclusive file creation (ADR D82).\n *\n * `createExclusive(path, data, { mode })` creates a file in a single\n * syscall (`open(path, \"wx\", mode)`). Returns `true` if created, `false`\n * if it already existed (EEXIST swallowed — caller decides). All other\n * errors propagate.\n *\n * Default mode is 0o600 (owner-only) — EC-2 fix from edge-case review:\n * token files, lockfiles, and PID files MUST NOT default to world-\n * readable 0o644 under typical umask 022. Callers writing non-sensitive\n * files can pass `mode: 0o644` explicitly.\n *\n * NFS not honoring O_EXCL is documented (D61 — same stance as\n * `withFileLock`); the SDK target is ext4/APFS/NTFS.\n *\n * @internal\n */\n\nimport { open } from \"node:fs/promises\";\n\nexport interface CreateExclusiveOptions {\n /** Unix mode for the new file (default 0o600 — owner-only). */\n mode?: number;\n}\n\n/**\n * Create `path` holding `data`, but only if it does not exist yet. Returns `true` when this call\n * created it, `false` when it was already there.\n *\n * The check and the create are one `open(path, \"wx\")` syscall, so of N processes racing to create\n * the same path exactly one gets `true` — no window between testing and writing. The content is\n * written after the create, so the `false` branch tells you the file exists, not that another\n * writer has finished filling it.\n *\n * Only `EEXIST` becomes `false`. Every other error propagates: a missing parent directory is\n * `ENOENT`, an unwritable one `EACCES`. This never creates directories.\n *\n * The file is created with mode 0600 unless `options.mode` says otherwise, and the mode is\n * subject to the process umask. That default is deliberate — the callers are token files,\n * lockfiles and PID files, and 0644 under a typical umask would make them world-readable.\n *\n * **Choosing between this and the locks.** `createExclusive` claims a NAME once and is the right\n * tool for first-writer-wins: seeding a config, electing a single owner, writing a credential\n * exactly once. It cannot guard repeated updates, because a file that already exists always loses.\n * For read-modify-write on a path several writers touch, take a lock instead —\n * {@link withFileLock} across processes, `withCwdMutex` when the writers are all in this one. For\n * an in-place update guarded by a version column in SQLite, `casUpdate` is the equivalent\n * primitive.\n *\n * Atomicity is the filesystem's `O_EXCL`, which NFS does not reliably honor; the SDK targets\n * ext4, APFS and NTFS.\n *\n * Semver-exempt: reachable via the `@theokit/sdk/internal/persistence` sub-path, which the package\n * declares in `exports` but does NOT cover with its semver contract.\n */\nexport async function createExclusive(\n path: string,\n data: string | Uint8Array,\n options?: CreateExclusiveOptions,\n): Promise<boolean> {\n const mode = options?.mode ?? 0o600;\n try {\n const handle = await open(path, \"wx\", mode);\n try {\n await handle.writeFile(data);\n return true;\n } finally {\n await handle.close();\n }\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code === \"EEXIST\") {\n return false;\n }\n throw err;\n }\n}\n","/**\n * SQLite optimistic compare-and-swap (ADR D83).\n *\n * `casUpdate(db, sql, params, expectedChanges)` executes a prepared\n * UPDATE and returns true if `result.changes === expectedChanges`.\n * Caller provides the full SQL (including `WHERE version = ?` predicate);\n * helper does NOT generate SQL — DRY at the level of \"wrap the\n * convention\", not \"build queries\".\n *\n * Use case canonical (Hermes `kanban_db.py:1922-1934`):\n *\n * const won = casUpdate(\n * db,\n * \"UPDATE registry SET status = ?, version = version + 1 WHERE id = ? AND version = ?\",\n * [\"running\", \"agent-foo\", 3],\n * );\n * if (!won) { ... re-read and retry ... }\n *\n * Helper does NOT retry — caller responsible for backoff (avoids hidden\n * loops). Helper does NOT cache prepared statements — `better-sqlite3`\n * caches internally; SDK use is one-shot per mutation, not hot loops.\n *\n * NOTE — no internal-visibility tag in this block. `tsconfig.base.json` sets `stripInternal: true`,\n * and TypeScript scans EVERY leading comment range of the declaration that follows, including the\n * import right below this one. The tag that used to sit here deleted that import from the emitted\n * `.d.ts`, leaving the types it binds unresolvable for any consumer running type-aware lint\n * (usetheodev/theokit-sdk#283 records the same trap on a declaration).\n */\n\nimport type Database from \"better-sqlite3\";\n\ntype DatabaseInstance = InstanceType<typeof Database>;\n\n/**\n * Run an UPDATE and report whether it changed exactly the number of rows you expected — the\n * optimistic-concurrency equivalent of taking a lock.\n *\n * `sql` is yours, in full, including the guard that makes it a compare-and-swap: the\n * `WHERE ... AND version = ?` predicate and the `SET version = version + 1` that closes it. This\n * function generates nothing. It prepares the statement, runs it with `params`, and compares\n * `changes` against `expectedChanges` (default 1).\n *\n * `false` means the guard did not match — someone else moved the row first, or the id does not\n * exist. Those two are indistinguishable here; if you need to tell them apart, re-read the row.\n * A `false` return means NOTHING was written, so the caller owns the re-read-and-retry, with\n * whatever backoff it wants. There is no retry loop hidden in here, by design.\n *\n * SQL errors propagate — bad syntax, a closed database, a constraint violation, a busy writer.\n * Only the row-count mismatch is reported as `false`.\n *\n * Runs as a single implicit transaction, so no explicit BEGIN is needed for one statement. Wrap\n * the call yourself when the swap has to commit together with other writes.\n *\n * **Choosing between this and the locks.** `casUpdate` never blocks and never waits: the loser\n * finds out immediately and decides what to do. Prefer it when the contended state is already a\n * row with a version column. When the contended state is a FILE, there is no version column to\n * swap on — use `withFileLock` across processes, or `withCwdMutex` within one. When the goal is\n * to create something exactly once rather than update it, `createExclusive` is the primitive.\n *\n * Semver-exempt: reachable via the `@theokit/sdk/internal/persistence` sub-path, which the package\n * declares in `exports` but does NOT cover with its semver contract.\n */\nexport function casUpdate(\n db: DatabaseInstance,\n sql: string,\n params: ReadonlyArray<unknown>,\n expectedChanges: number = 1,\n): boolean {\n const stmt = db.prepare(sql);\n const result = stmt.run(...(params as unknown[]));\n return result.changes === expectedChanges;\n}\n"]}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
export { PersistenceSchema } from '../../chunk-HY66GLM6.js';
|
|
2
|
-
export {
|
|
2
|
+
export { migrateSchema, readVersionedJson, writeVersionedJson } from '../../chunk-UCBJBJ27.js';
|
|
3
3
|
export { applyWalWithFallback, containsCjk, isCorruptionError, openSqliteResilient, sanitizeFts5Query } from '../../chunk-CQ2TQ32Y.js';
|
|
4
4
|
export { JsonlParseError, appendJsonl, loadJsonl, readJsonlIds, withFileLock } from '../../chunk-CV7XMBHP.js';
|
|
5
5
|
export { withCwdMutex } from '../../chunk-Q5EWJPRY.js';
|
|
6
6
|
export { atomicWriteJson, atomicWriteText, replaceFileAtomic } from '../../chunk-VF7EWVDG.js';
|
|
7
|
+
export { displayTheokitHome, getProfilesRoot, getTheokitHome } from '../../chunk-UFLD2HEV.js';
|
|
7
8
|
import '../../chunk-IDCKSLYH.js';
|
|
8
9
|
import '../../chunk-T7XEKOVW.js';
|
|
9
10
|
import '../../chunk-T7O6K6PX.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/internal/persistence/exclusive-create.ts","../../../src/internal/persistence/sqlite-cas.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/internal/persistence/exclusive-create.ts","../../../src/internal/persistence/sqlite-cas.ts"],"names":[],"mappings":";;;;;;;;;;;;AAwDA,eAAsB,eAAA,CACpB,IAAA,EACA,IAAA,EACA,OAAA,EACkB;AAClB,EAAA,MAAM,IAAA,GAAO,SAAS,IAAA,IAAQ,GAAA;AAC9B,EAAA,IAAI;AACF,IAAA,MAAM,MAAA,GAAS,MAAM,IAAA,CAAK,IAAA,EAAM,MAAM,IAAI,CAAA;AAC1C,IAAA,IAAI;AACF,MAAA,MAAM,MAAA,CAAO,UAAU,IAAI,CAAA;AAC3B,MAAA,OAAO,IAAA;AAAA,IACT,CAAA,SAAE;AACA,MAAA,MAAM,OAAO,KAAA,EAAM;AAAA,IACrB;AAAA,EACF,SAAS,GAAA,EAAK;AACZ,IAAA,IAAK,GAAA,CAA8B,SAAS,QAAA,EAAU;AACpD,MAAA,OAAO,KAAA;AAAA,IACT;AACA,IAAA,MAAM,GAAA;AAAA,EACR;AACF;;;ACdO,SAAS,SAAA,CACd,EAAA,EACA,GAAA,EACA,MAAA,EACA,kBAA0B,CAAA,EACjB;AACT,EAAA,MAAM,IAAA,GAAO,EAAA,CAAG,OAAA,CAAQ,GAAG,CAAA;AAC3B,EAAA,MAAM,MAAA,GAAS,IAAA,CAAK,GAAA,CAAI,GAAI,MAAoB,CAAA;AAChD,EAAA,OAAO,OAAO,OAAA,KAAY,eAAA;AAC5B","file":"index.js","sourcesContent":["/**\n * O_EXCL exclusive file creation (ADR D82).\n *\n * `createExclusive(path, data, { mode })` creates a file in a single\n * syscall (`open(path, \"wx\", mode)`). Returns `true` if created, `false`\n * if it already existed (EEXIST swallowed — caller decides). All other\n * errors propagate.\n *\n * Default mode is 0o600 (owner-only) — EC-2 fix from edge-case review:\n * token files, lockfiles, and PID files MUST NOT default to world-\n * readable 0o644 under typical umask 022. Callers writing non-sensitive\n * files can pass `mode: 0o644` explicitly.\n *\n * NFS not honoring O_EXCL is documented (D61 — same stance as\n * `withFileLock`); the SDK target is ext4/APFS/NTFS.\n *\n * @internal\n */\n\nimport { open } from \"node:fs/promises\";\n\nexport interface CreateExclusiveOptions {\n /** Unix mode for the new file (default 0o600 — owner-only). */\n mode?: number;\n}\n\n/**\n * Create `path` holding `data`, but only if it does not exist yet. Returns `true` when this call\n * created it, `false` when it was already there.\n *\n * The check and the create are one `open(path, \"wx\")` syscall, so of N processes racing to create\n * the same path exactly one gets `true` — no window between testing and writing. The content is\n * written after the create, so the `false` branch tells you the file exists, not that another\n * writer has finished filling it.\n *\n * Only `EEXIST` becomes `false`. Every other error propagates: a missing parent directory is\n * `ENOENT`, an unwritable one `EACCES`. This never creates directories.\n *\n * The file is created with mode 0600 unless `options.mode` says otherwise, and the mode is\n * subject to the process umask. That default is deliberate — the callers are token files,\n * lockfiles and PID files, and 0644 under a typical umask would make them world-readable.\n *\n * **Choosing between this and the locks.** `createExclusive` claims a NAME once and is the right\n * tool for first-writer-wins: seeding a config, electing a single owner, writing a credential\n * exactly once. It cannot guard repeated updates, because a file that already exists always loses.\n * For read-modify-write on a path several writers touch, take a lock instead —\n * {@link withFileLock} across processes, `withCwdMutex` when the writers are all in this one. For\n * an in-place update guarded by a version column in SQLite, `casUpdate` is the equivalent\n * primitive.\n *\n * Atomicity is the filesystem's `O_EXCL`, which NFS does not reliably honor; the SDK targets\n * ext4, APFS and NTFS.\n *\n * Semver-exempt: reachable via the `@theokit/sdk/internal/persistence` sub-path, which the package\n * declares in `exports` but does NOT cover with its semver contract.\n */\nexport async function createExclusive(\n path: string,\n data: string | Uint8Array,\n options?: CreateExclusiveOptions,\n): Promise<boolean> {\n const mode = options?.mode ?? 0o600;\n try {\n const handle = await open(path, \"wx\", mode);\n try {\n await handle.writeFile(data);\n return true;\n } finally {\n await handle.close();\n }\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code === \"EEXIST\") {\n return false;\n }\n throw err;\n }\n}\n","/**\n * SQLite optimistic compare-and-swap (ADR D83).\n *\n * `casUpdate(db, sql, params, expectedChanges)` executes a prepared\n * UPDATE and returns true if `result.changes === expectedChanges`.\n * Caller provides the full SQL (including `WHERE version = ?` predicate);\n * helper does NOT generate SQL — DRY at the level of \"wrap the\n * convention\", not \"build queries\".\n *\n * Use case canonical (Hermes `kanban_db.py:1922-1934`):\n *\n * const won = casUpdate(\n * db,\n * \"UPDATE registry SET status = ?, version = version + 1 WHERE id = ? AND version = ?\",\n * [\"running\", \"agent-foo\", 3],\n * );\n * if (!won) { ... re-read and retry ... }\n *\n * Helper does NOT retry — caller responsible for backoff (avoids hidden\n * loops). Helper does NOT cache prepared statements — `better-sqlite3`\n * caches internally; SDK use is one-shot per mutation, not hot loops.\n *\n * NOTE — no internal-visibility tag in this block. `tsconfig.base.json` sets `stripInternal: true`,\n * and TypeScript scans EVERY leading comment range of the declaration that follows, including the\n * import right below this one. The tag that used to sit here deleted that import from the emitted\n * `.d.ts`, leaving the types it binds unresolvable for any consumer running type-aware lint\n * (usetheodev/theokit-sdk#283 records the same trap on a declaration).\n */\n\nimport type Database from \"better-sqlite3\";\n\ntype DatabaseInstance = InstanceType<typeof Database>;\n\n/**\n * Run an UPDATE and report whether it changed exactly the number of rows you expected — the\n * optimistic-concurrency equivalent of taking a lock.\n *\n * `sql` is yours, in full, including the guard that makes it a compare-and-swap: the\n * `WHERE ... AND version = ?` predicate and the `SET version = version + 1` that closes it. This\n * function generates nothing. It prepares the statement, runs it with `params`, and compares\n * `changes` against `expectedChanges` (default 1).\n *\n * `false` means the guard did not match — someone else moved the row first, or the id does not\n * exist. Those two are indistinguishable here; if you need to tell them apart, re-read the row.\n * A `false` return means NOTHING was written, so the caller owns the re-read-and-retry, with\n * whatever backoff it wants. There is no retry loop hidden in here, by design.\n *\n * SQL errors propagate — bad syntax, a closed database, a constraint violation, a busy writer.\n * Only the row-count mismatch is reported as `false`.\n *\n * Runs as a single implicit transaction, so no explicit BEGIN is needed for one statement. Wrap\n * the call yourself when the swap has to commit together with other writes.\n *\n * **Choosing between this and the locks.** `casUpdate` never blocks and never waits: the loser\n * finds out immediately and decides what to do. Prefer it when the contended state is already a\n * row with a version column. When the contended state is a FILE, there is no version column to\n * swap on — use `withFileLock` across processes, or `withCwdMutex` within one. When the goal is\n * to create something exactly once rather than update it, `createExclusive` is the primitive.\n *\n * Semver-exempt: reachable via the `@theokit/sdk/internal/persistence` sub-path, which the package\n * declares in `exports` but does NOT cover with its semver contract.\n */\nexport function casUpdate(\n db: DatabaseInstance,\n sql: string,\n params: ReadonlyArray<unknown>,\n expectedChanges: number = 1,\n): boolean {\n const stmt = db.prepare(sql);\n const result = stmt.run(...(params as unknown[]));\n return result.changes === expectedChanges;\n}\n"]}
|
|
@@ -48,6 +48,48 @@
|
|
|
48
48
|
* declares in `exports` but does NOT cover with its semver contract.
|
|
49
49
|
*/
|
|
50
50
|
export declare function getTheokitHome(cwd: string): string;
|
|
51
|
+
/**
|
|
52
|
+
* Every directory a project's configuration may be read from, in precedence order.
|
|
53
|
+
*
|
|
54
|
+
* `.theokit` first, then `.claude`. The order is the whole contract: a project that declares a
|
|
55
|
+
* skill, agent or rule in both means the explicit namespace to win, and a caller merging these
|
|
56
|
+
* roots must therefore keep the FIRST occurrence of a name rather than the last.
|
|
57
|
+
*
|
|
58
|
+
* `.claude` is read because the formats already agree and only the location did not. Measured
|
|
59
|
+
* 2026-08-26: the SKILL.md frontmatter this SDK requires (`name` + `description`) is exactly what
|
|
60
|
+
* the CLI writes, its hook config is the same JSON shape, and 59 of the CLI's agent declarations
|
|
61
|
+
* parse here unchanged. A repository set up for the CLI was failing on the directory name alone.
|
|
62
|
+
*
|
|
63
|
+
* NOT a rename of `.theokit`, and not a migration. Both are read, so nothing that works today stops
|
|
64
|
+
* working — which is why this returns a LIST and not a single resolved answer.
|
|
65
|
+
*
|
|
66
|
+
* Deliberately NOT affected by `THEOKIT_HOME`, and this is the one thing to remember about it.
|
|
67
|
+
* That variable relocates cwd-anchored SDK *state* — sessions, the credential store. A project's
|
|
68
|
+
* *configuration* is a property of the repository, not of where this SDK keeps its state, and the
|
|
69
|
+
* loaders that read these directories have always anchored on `cwd` directly. Honouring the
|
|
70
|
+
* override here would silently move where a project's agents and skills come from, which is a
|
|
71
|
+
* behaviour change wearing the costume of a refactor.
|
|
72
|
+
*
|
|
73
|
+
* Creates nothing and checks nothing; either path may not exist, and the caller owns that.
|
|
74
|
+
*
|
|
75
|
+
* Semver-exempt: reachable via the `@theokit/sdk/internal/persistence` sub-path, which the package
|
|
76
|
+
* declares in `exports` but does NOT cover with its semver contract.
|
|
77
|
+
*/
|
|
78
|
+
export declare function projectConfigRoots(cwd: string): string[];
|
|
79
|
+
/**
|
|
80
|
+
* Every directory that may hold a plugin BUNDLE contributed by the Claude Code CLI.
|
|
81
|
+
*
|
|
82
|
+
* A CLI plugin is not a JS entry point — it is a folder whose `skills/` and `agents/` are what it
|
|
83
|
+
* exists to provide. Measured 2026-08-26 on an installed one: seven agents and three skills beside
|
|
84
|
+
* a manifest in `.claude-plugin/plugin.json`. Parsing that manifest and stopping there produced a
|
|
85
|
+
* plugin that loaded and did nothing.
|
|
86
|
+
*
|
|
87
|
+
* Project-scoped deliberately. The CLI also keeps plugins under `~/.claude/plugins/cache`, behind
|
|
88
|
+
* its own installer and enable/disable state — reproducing that is an installation system, not
|
|
89
|
+
* reading a project's configuration, and guessing at someone's enablement would run code they
|
|
90
|
+
* turned off.
|
|
91
|
+
*/
|
|
92
|
+
export declare function pluginBundleRoots(cwd: string): string[];
|
|
51
93
|
/**
|
|
52
94
|
* The directory holding every profile: always `~/.theokit/profiles`, from `os.homedir()`.
|
|
53
95
|
*
|
|
@@ -48,6 +48,48 @@
|
|
|
48
48
|
* declares in `exports` but does NOT cover with its semver contract.
|
|
49
49
|
*/
|
|
50
50
|
export declare function getTheokitHome(cwd: string): string;
|
|
51
|
+
/**
|
|
52
|
+
* Every directory a project's configuration may be read from, in precedence order.
|
|
53
|
+
*
|
|
54
|
+
* `.theokit` first, then `.claude`. The order is the whole contract: a project that declares a
|
|
55
|
+
* skill, agent or rule in both means the explicit namespace to win, and a caller merging these
|
|
56
|
+
* roots must therefore keep the FIRST occurrence of a name rather than the last.
|
|
57
|
+
*
|
|
58
|
+
* `.claude` is read because the formats already agree and only the location did not. Measured
|
|
59
|
+
* 2026-08-26: the SKILL.md frontmatter this SDK requires (`name` + `description`) is exactly what
|
|
60
|
+
* the CLI writes, its hook config is the same JSON shape, and 59 of the CLI's agent declarations
|
|
61
|
+
* parse here unchanged. A repository set up for the CLI was failing on the directory name alone.
|
|
62
|
+
*
|
|
63
|
+
* NOT a rename of `.theokit`, and not a migration. Both are read, so nothing that works today stops
|
|
64
|
+
* working — which is why this returns a LIST and not a single resolved answer.
|
|
65
|
+
*
|
|
66
|
+
* Deliberately NOT affected by `THEOKIT_HOME`, and this is the one thing to remember about it.
|
|
67
|
+
* That variable relocates cwd-anchored SDK *state* — sessions, the credential store. A project's
|
|
68
|
+
* *configuration* is a property of the repository, not of where this SDK keeps its state, and the
|
|
69
|
+
* loaders that read these directories have always anchored on `cwd` directly. Honouring the
|
|
70
|
+
* override here would silently move where a project's agents and skills come from, which is a
|
|
71
|
+
* behaviour change wearing the costume of a refactor.
|
|
72
|
+
*
|
|
73
|
+
* Creates nothing and checks nothing; either path may not exist, and the caller owns that.
|
|
74
|
+
*
|
|
75
|
+
* Semver-exempt: reachable via the `@theokit/sdk/internal/persistence` sub-path, which the package
|
|
76
|
+
* declares in `exports` but does NOT cover with its semver contract.
|
|
77
|
+
*/
|
|
78
|
+
export declare function projectConfigRoots(cwd: string): string[];
|
|
79
|
+
/**
|
|
80
|
+
* Every directory that may hold a plugin BUNDLE contributed by the Claude Code CLI.
|
|
81
|
+
*
|
|
82
|
+
* A CLI plugin is not a JS entry point — it is a folder whose `skills/` and `agents/` are what it
|
|
83
|
+
* exists to provide. Measured 2026-08-26 on an installed one: seven agents and three skills beside
|
|
84
|
+
* a manifest in `.claude-plugin/plugin.json`. Parsing that manifest and stopping there produced a
|
|
85
|
+
* plugin that loaded and did nothing.
|
|
86
|
+
*
|
|
87
|
+
* Project-scoped deliberately. The CLI also keeps plugins under `~/.claude/plugins/cache`, behind
|
|
88
|
+
* its own installer and enable/disable state — reproducing that is an installation system, not
|
|
89
|
+
* reading a project's configuration, and guessing at someone's enablement would run code they
|
|
90
|
+
* turned off.
|
|
91
|
+
*/
|
|
92
|
+
export declare function pluginBundleRoots(cwd: string): string[];
|
|
51
93
|
/**
|
|
52
94
|
* The directory holding every profile: always `~/.theokit/profiles`, from `os.homedir()`.
|
|
53
95
|
*
|
|
@@ -1 +1,16 @@
|
|
|
1
|
+
/** The subset of `LocalOptions` this resolver reads. */
|
|
2
|
+
interface SessionDirOptions {
|
|
3
|
+
sessionDir?: string;
|
|
4
|
+
baseDir?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* The session directory the caller ASKED for, or `undefined` when they asked for nothing.
|
|
8
|
+
*
|
|
9
|
+
* {@link resolveSessionDir} always answers with a path, falling back to the default home — which is
|
|
10
|
+
* the right answer for "where do transcripts go" and the wrong one for "did this consumer opt into
|
|
11
|
+
* sharing state with the Claude Code CLI". Memory writes need the second question, and the two
|
|
12
|
+
* accepted names for the option live here, so asking it anywhere else would put a copy of that
|
|
13
|
+
* knowledge somewhere it can drift.
|
|
14
|
+
*/
|
|
15
|
+
export declare function explicitSessionDir(local: SessionDirOptions | undefined): string | undefined;
|
|
1
16
|
export {};
|
|
@@ -1 +1,16 @@
|
|
|
1
|
+
/** The subset of `LocalOptions` this resolver reads. */
|
|
2
|
+
interface SessionDirOptions {
|
|
3
|
+
sessionDir?: string;
|
|
4
|
+
baseDir?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* The session directory the caller ASKED for, or `undefined` when they asked for nothing.
|
|
8
|
+
*
|
|
9
|
+
* {@link resolveSessionDir} always answers with a path, falling back to the default home — which is
|
|
10
|
+
* the right answer for "where do transcripts go" and the wrong one for "did this consumer opt into
|
|
11
|
+
* sharing state with the Claude Code CLI". Memory writes need the second question, and the two
|
|
12
|
+
* accepted names for the option live here, so asking it anywhere else would put a copy of that
|
|
13
|
+
* knowledge somewhere it can drift.
|
|
14
|
+
*/
|
|
15
|
+
export declare function explicitSessionDir(local: SessionDirOptions | undefined): string | undefined;
|
|
1
16
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type MemoryConfig, type MemoryFact, redactSecrets } from "../../memory/types.js";
|
|
2
2
|
export { redactSecrets };
|
|
3
|
-
export declare function readMemoryFacts(cwd: string, config: MemoryConfig): Promise<MemoryFact[]>;
|
|
4
|
-
export declare function appendMemoryFact(cwd: string, config: MemoryConfig, fact: MemoryFact): Promise<void>;
|
|
3
|
+
export declare function readMemoryFacts(cwd: string, config: MemoryConfig, memoryHome?: string): Promise<MemoryFact[]>;
|
|
4
|
+
export declare function appendMemoryFact(cwd: string, config: MemoryConfig, fact: MemoryFact, memoryHome?: string): Promise<void>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Locating the plugin bundles a project carries.
|
|
3
|
+
*
|
|
4
|
+
* Shared by the skills and subagents loaders, which both need the same answer to "which folders in
|
|
5
|
+
* this project are plugins" and would otherwise each grow their own copy of the directory walk.
|
|
6
|
+
*
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Every plugin folder under the project's plugin roots.
|
|
11
|
+
*
|
|
12
|
+
* Returns the FOLDERS, not their contents — what a bundle contributes (`skills/`, `agents/`) is the
|
|
13
|
+
* caller's business, and a loader that also knew the layout would have to change whenever the other
|
|
14
|
+
* one did.
|
|
15
|
+
*
|
|
16
|
+
* A missing root is not an error: most projects carry no plugins, and treating their absence as a
|
|
17
|
+
* failure would make "none installed" indistinguishable from "the directory could not be read".
|
|
18
|
+
*/
|
|
19
|
+
export declare function pluginBundleDirs(cwd: string): Promise<string[]>;
|
package/dist/project.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkLKFET5A3_cjs = require('./chunk-LKFET5A3.cjs');
|
|
4
4
|
var chunkI6TGFUCO_cjs = require('./chunk-I6TGFUCO.cjs');
|
|
5
5
|
var chunkK3FW2XZD_cjs = require('./chunk-K3FW2XZD.cjs');
|
|
6
6
|
require('./chunk-JTB5Q42C.cjs');
|
|
@@ -12,7 +12,7 @@ var DEFAULT_FILENAME = "THEO.md";
|
|
|
12
12
|
async function readProjectInstructions(cwd, options) {
|
|
13
13
|
const filename = options?.filename ?? DEFAULT_FILENAME;
|
|
14
14
|
const scope = options?.scope ?? "nearest";
|
|
15
|
-
const paths =
|
|
15
|
+
const paths = chunkLKFET5A3_cjs.walkUpForFile(cwd, filename, options?.stopDir);
|
|
16
16
|
const files = [];
|
|
17
17
|
for (const path of paths) {
|
|
18
18
|
try {
|
|
@@ -31,7 +31,7 @@ function reduceContent(files, scope) {
|
|
|
31
31
|
}
|
|
32
32
|
async function writeProjectInstructions(cwd, content, options) {
|
|
33
33
|
const filename = options?.filename ?? DEFAULT_FILENAME;
|
|
34
|
-
if (!
|
|
34
|
+
if (!chunkLKFET5A3_cjs.isSafePattern(filename)) {
|
|
35
35
|
throw new chunkK3FW2XZD_cjs.ConfigurationError(
|
|
36
36
|
`writeProjectInstructions: unsafe filename ${JSON.stringify(filename)} (no path traversal, separators, or absolute paths)`,
|
|
37
37
|
{ code: "unsafe_filename" }
|
package/dist/project.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { walkUpForFile, isSafePattern } from './chunk-
|
|
1
|
+
import { walkUpForFile, isSafePattern } from './chunk-WFC26L6Y.js';
|
|
2
2
|
import { replaceFileAtomic } from './chunk-VF7EWVDG.js';
|
|
3
3
|
import { ConfigurationError } from './chunk-IDCKSLYH.js';
|
|
4
4
|
import './chunk-T7XEKOVW.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { loadSubagents } from './chunk-ZHPWGIUX.js';
|
|
2
|
+
import './chunk-UFLD2HEV.js';
|
|
3
|
+
import './chunk-AG5JPQIY.js';
|
|
4
|
+
import './chunk-IDCKSLYH.js';
|
|
5
|
+
import './chunk-T7XEKOVW.js';
|
|
6
|
+
import './chunk-T7O6K6PX.js';
|
|
7
|
+
//# sourceMappingURL=subagents-loader-6ATCDEKN.js.map
|
|
8
|
+
//# sourceMappingURL=subagents-loader-6ATCDEKN.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"subagents-loader-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"subagents-loader-6ATCDEKN.js"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkWNTAPVU5_cjs = require('./chunk-WNTAPVU5.cjs');
|
|
4
|
+
require('./chunk-AQO3NSRG.cjs');
|
|
5
|
+
require('./chunk-IWBGCBR6.cjs');
|
|
6
|
+
require('./chunk-K3FW2XZD.cjs');
|
|
7
|
+
require('./chunk-JTB5Q42C.cjs');
|
|
8
|
+
require('./chunk-NUKRL3I6.cjs');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
Object.defineProperty(exports, "loadSubagents", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunkWNTAPVU5_cjs.loadSubagents; }
|
|
15
|
+
});
|
|
16
|
+
//# sourceMappingURL=subagents-loader-X5QKODCL.cjs.map
|
|
17
|
+
//# sourceMappingURL=subagents-loader-X5QKODCL.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"subagents-loader-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"subagents-loader-X5QKODCL.cjs"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkWNTAPVU5_cjs = require('./chunk-WNTAPVU5.cjs');
|
|
4
|
+
require('./chunk-AQO3NSRG.cjs');
|
|
4
5
|
require('./chunk-IWBGCBR6.cjs');
|
|
5
6
|
var chunkK3FW2XZD_cjs = require('./chunk-K3FW2XZD.cjs');
|
|
6
7
|
require('./chunk-JTB5Q42C.cjs');
|
|
@@ -23,7 +24,7 @@ function resolveSources(options) {
|
|
|
23
24
|
}
|
|
24
25
|
async function discoverSubagents(cwd, options) {
|
|
25
26
|
const sources = resolveSources(options);
|
|
26
|
-
return
|
|
27
|
+
return chunkWNTAPVU5_cjs.loadSubagents(cwd, sources.includes("project"), void 0);
|
|
27
28
|
}
|
|
28
29
|
async function loadSubagentDefinition(name, cwd, options) {
|
|
29
30
|
return (await discoverSubagents(cwd, options))[name];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/subagents-loader.ts"],"names":["ConfigurationError","loadSubagents"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/subagents-loader.ts"],"names":["ConfigurationError","loadSubagents"],"mappings":";;;;;;;;;;AAuCA,IAAM,gBAAA,GAA8C,CAAC,SAAS,CAAA;AAgB9D,SAAS,eAAe,OAAA,EAA0E;AAChG,EAAA,MAAM,WAAW,OAAA,EAAS,cAAA;AAC1B,EAAA,IAAI,QAAA,KAAa,QAAW,OAAO,gBAAA;AACnC,EAAA,KAAA,MAAW,UAAU,QAAA,EAAU;AAC7B,IAAA,IAAI,CAAC,gBAAA,CAAiB,QAAA,CAAS,MAAM,CAAA,EAAG;AACtC,MAAA,MAAM,IAAIA,oCAAA;AAAA,QACR,CAAA,iCAAA,EAAoC,OAAO,MAAM,CAAC,gBAAgB,gBAAA,CAAiB,IAAA,CAAK,IAAI,CAAC,CAAA,CAAA,CAAA;AAAA,QAC7F,EAAE,MAAM,iCAAA;AAAkC,OAC5C;AAAA,IACF;AAAA,EACF;AACA,EAAA,OAAO,QAAA;AACT;AAOA,eAAsB,iBAAA,CACpB,KACA,OAAA,EAC0C;AAC1C,EAAA,MAAM,OAAA,GAAU,eAAe,OAAO,CAAA;AACtC,EAAA,OAAOC,gCAAc,GAAA,EAAK,OAAA,CAAQ,QAAA,CAAS,SAAS,GAAG,MAAS,CAAA;AAClE;AAQA,eAAsB,sBAAA,CACpB,IAAA,EACA,GAAA,EACA,OAAA,EACsC;AACtC,EAAA,OAAA,CAAQ,MAAM,iBAAA,CAAkB,GAAA,EAAK,OAAO,GAAG,IAAI,CAAA;AACrD","file":"subagents-loader.cjs","sourcesContent":["/**\n * M81 — `.theokit/agents` discovery, exposed so a consumer can read the on-disk subagent\n * definitions with one import instead of hand-rolling a second parser.\n *\n * ## Why this file exists\n *\n * `src/skills.ts` already exposed `discoverSkills` for the sibling domain. Subagents had the same\n * loader — `internal/runtime/skills/subagents-loader.ts` — with no public door. A consumer behind\n * the layer boundary (the agent-builder never imports `@theokit/sdk*` directly) could not reach it,\n * so re-implementing was the only legal option. It re-implemented, and then wrote a test whose only\n * job was to watch the two parsers for drift. That test is the cleanest possible evidence that the\n * duplication should not exist.\n *\n * ## What crosses is the PARSED config\n *\n * The return is `AgentDefinition` — already interpreted — never the `.md` text or the frontmatter\n * shape. Exporting the file format would freeze an internal detail as public API; exporting the\n * parsed value leaves the format free to change.\n */\n\nimport { ConfigurationError } from \"./errors.js\";\nimport { loadSubagents } from \"./internal/runtime/skills/subagents-loader.js\";\nimport type { AgentDefinition } from \"./types/agent.js\";\n\n/**\n * The parsed subagent definition this module hands back.\n *\n * Re-exported here — beside the loader that produces it — so a consumer can NAME the value it\n * receives without reaching into `types/agent`, which no subpath publishes. A layer above may then\n * alias it (`AgentDefinition as SubagentDefinition`) to sidestep a name it has already spent.\n */\nexport type { AgentDefinition } from \"./types/agent.js\";\n\n/**\n * Where subagent definitions may be read from. A closed union rather than a boolean: a third\n * source can join it without breaking the signature, and the call site reads as what it means.\n */\nexport type SubagentSource = \"project\";\n\nconst ACCEPTED_SOURCES: readonly SubagentSource[] = [\"project\"];\n\n/** Options for {@link discoverSubagents} / {@link loadSubagentDefinition}. */\nexport interface DiscoverSubagentsOptions {\n /**\n * Which sources to read. Defaults to `[\"project\"]` — `<cwd>/.theokit/agents/*.md`.\n *\n * An empty list reads NOTHING: the directory is never opened, so a caller that has not yet\n * established trust in `cwd` can decline the read rather than filter its result.\n */\n readonly settingSources?: readonly SubagentSource[];\n}\n\n// Validated at the boundary (error-handling.md § 2): the union is erased at runtime, so a JS\n// caller — or a value crossing a serialization hop — can still carry a source nobody honors.\n// Dropping it silently would read as \"no subagents found\", which is the same shape as success.\nfunction resolveSources(options: DiscoverSubagentsOptions | undefined): readonly SubagentSource[] {\n const declared = options?.settingSources;\n if (declared === undefined) return ACCEPTED_SOURCES;\n for (const source of declared) {\n if (!ACCEPTED_SOURCES.includes(source)) {\n throw new ConfigurationError(\n `Unknown subagent setting source \"${String(source)}\" (accepted: ${ACCEPTED_SOURCES.join(\", \")})`,\n { code: \"subagent_unknown_setting_source\" },\n );\n }\n }\n return declared;\n}\n\n/**\n * Discover the subagents defined under `<cwd>/.theokit/agents/*.md`.\n *\n * An absent directory yields `{}` — a project without subagents is the common case, not an error.\n */\nexport async function discoverSubagents(\n cwd: string,\n options?: DiscoverSubagentsOptions,\n): Promise<Record<string, AgentDefinition>> {\n const sources = resolveSources(options);\n return loadSubagents(cwd, sources.includes(\"project\"), undefined);\n}\n\n/**\n * Load ONE subagent definition by name, or `undefined` when it is not defined on disk.\n *\n * A thin selector over {@link discoverSubagents} rather than a second reader: one parser is the\n * whole point of this module.\n */\nexport async function loadSubagentDefinition(\n name: string,\n cwd: string,\n options?: DiscoverSubagentsOptions,\n): Promise<AgentDefinition | undefined> {\n return (await discoverSubagents(cwd, options))[name];\n}\n"]}
|
package/dist/subagents-loader.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/subagents-loader.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/subagents-loader.ts"],"names":[],"mappings":";;;;;;;;AAuCA,IAAM,gBAAA,GAA8C,CAAC,SAAS,CAAA;AAgB9D,SAAS,eAAe,OAAA,EAA0E;AAChG,EAAA,MAAM,WAAW,OAAA,EAAS,cAAA;AAC1B,EAAA,IAAI,QAAA,KAAa,QAAW,OAAO,gBAAA;AACnC,EAAA,KAAA,MAAW,UAAU,QAAA,EAAU;AAC7B,IAAA,IAAI,CAAC,gBAAA,CAAiB,QAAA,CAAS,MAAM,CAAA,EAAG;AACtC,MAAA,MAAM,IAAI,kBAAA;AAAA,QACR,CAAA,iCAAA,EAAoC,OAAO,MAAM,CAAC,gBAAgB,gBAAA,CAAiB,IAAA,CAAK,IAAI,CAAC,CAAA,CAAA,CAAA;AAAA,QAC7F,EAAE,MAAM,iCAAA;AAAkC,OAC5C;AAAA,IACF;AAAA,EACF;AACA,EAAA,OAAO,QAAA;AACT;AAOA,eAAsB,iBAAA,CACpB,KACA,OAAA,EAC0C;AAC1C,EAAA,MAAM,OAAA,GAAU,eAAe,OAAO,CAAA;AACtC,EAAA,OAAO,cAAc,GAAA,EAAK,OAAA,CAAQ,QAAA,CAAS,SAAS,GAAG,MAAS,CAAA;AAClE;AAQA,eAAsB,sBAAA,CACpB,IAAA,EACA,GAAA,EACA,OAAA,EACsC;AACtC,EAAA,OAAA,CAAQ,MAAM,iBAAA,CAAkB,GAAA,EAAK,OAAO,GAAG,IAAI,CAAA;AACrD","file":"subagents-loader.js","sourcesContent":["/**\n * M81 — `.theokit/agents` discovery, exposed so a consumer can read the on-disk subagent\n * definitions with one import instead of hand-rolling a second parser.\n *\n * ## Why this file exists\n *\n * `src/skills.ts` already exposed `discoverSkills` for the sibling domain. Subagents had the same\n * loader — `internal/runtime/skills/subagents-loader.ts` — with no public door. A consumer behind\n * the layer boundary (the agent-builder never imports `@theokit/sdk*` directly) could not reach it,\n * so re-implementing was the only legal option. It re-implemented, and then wrote a test whose only\n * job was to watch the two parsers for drift. That test is the cleanest possible evidence that the\n * duplication should not exist.\n *\n * ## What crosses is the PARSED config\n *\n * The return is `AgentDefinition` — already interpreted — never the `.md` text or the frontmatter\n * shape. Exporting the file format would freeze an internal detail as public API; exporting the\n * parsed value leaves the format free to change.\n */\n\nimport { ConfigurationError } from \"./errors.js\";\nimport { loadSubagents } from \"./internal/runtime/skills/subagents-loader.js\";\nimport type { AgentDefinition } from \"./types/agent.js\";\n\n/**\n * The parsed subagent definition this module hands back.\n *\n * Re-exported here — beside the loader that produces it — so a consumer can NAME the value it\n * receives without reaching into `types/agent`, which no subpath publishes. A layer above may then\n * alias it (`AgentDefinition as SubagentDefinition`) to sidestep a name it has already spent.\n */\nexport type { AgentDefinition } from \"./types/agent.js\";\n\n/**\n * Where subagent definitions may be read from. A closed union rather than a boolean: a third\n * source can join it without breaking the signature, and the call site reads as what it means.\n */\nexport type SubagentSource = \"project\";\n\nconst ACCEPTED_SOURCES: readonly SubagentSource[] = [\"project\"];\n\n/** Options for {@link discoverSubagents} / {@link loadSubagentDefinition}. */\nexport interface DiscoverSubagentsOptions {\n /**\n * Which sources to read. Defaults to `[\"project\"]` — `<cwd>/.theokit/agents/*.md`.\n *\n * An empty list reads NOTHING: the directory is never opened, so a caller that has not yet\n * established trust in `cwd` can decline the read rather than filter its result.\n */\n readonly settingSources?: readonly SubagentSource[];\n}\n\n// Validated at the boundary (error-handling.md § 2): the union is erased at runtime, so a JS\n// caller — or a value crossing a serialization hop — can still carry a source nobody honors.\n// Dropping it silently would read as \"no subagents found\", which is the same shape as success.\nfunction resolveSources(options: DiscoverSubagentsOptions | undefined): readonly SubagentSource[] {\n const declared = options?.settingSources;\n if (declared === undefined) return ACCEPTED_SOURCES;\n for (const source of declared) {\n if (!ACCEPTED_SOURCES.includes(source)) {\n throw new ConfigurationError(\n `Unknown subagent setting source \"${String(source)}\" (accepted: ${ACCEPTED_SOURCES.join(\", \")})`,\n { code: \"subagent_unknown_setting_source\" },\n );\n }\n }\n return declared;\n}\n\n/**\n * Discover the subagents defined under `<cwd>/.theokit/agents/*.md`.\n *\n * An absent directory yields `{}` — a project without subagents is the common case, not an error.\n */\nexport async function discoverSubagents(\n cwd: string,\n options?: DiscoverSubagentsOptions,\n): Promise<Record<string, AgentDefinition>> {\n const sources = resolveSources(options);\n return loadSubagents(cwd, sources.includes(\"project\"), undefined);\n}\n\n/**\n * Load ONE subagent definition by name, or `undefined` when it is not defined on disk.\n *\n * A thin selector over {@link discoverSubagents} rather than a second reader: one parser is the\n * whole point of this module.\n */\nexport async function loadSubagentDefinition(\n name: string,\n cwd: string,\n options?: DiscoverSubagentsOptions,\n): Promise<AgentDefinition | undefined> {\n return (await discoverSubagents(cwd, options))[name];\n}\n"]}
|
package/docs/error-codes.md
CHANGED
|
@@ -34,7 +34,7 @@ Branch on `code`, never on the message: messages carry context (an id, a path, a
|
|
|
34
34
|
| `cloud_custom_tools_rejected` | domain | ConfigurationError | `packages/sdk/src/internal/cloud-agent/cloud-agent.ts:123` +1 |
|
|
35
35
|
| `cloud_incompatible_function_resolver` | domain | ConfigurationError | `packages/sdk/src/internal/cloud-agent/cloud-tool-parity.ts:43` +2 |
|
|
36
36
|
| `cloud_incompatible_mcp_stdio_local` | domain | ConfigurationError | `packages/sdk/src/internal/cloud-agent/cloud-tool-parity.ts:74` |
|
|
37
|
-
| `cloud_plugin_path_rejected` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/plugins/plugins-manager.ts:
|
|
37
|
+
| `cloud_plugin_path_rejected` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/plugins/plugins-manager.ts:146` +1 |
|
|
38
38
|
| `cloud_run_http_error` | domain | NetworkError | `packages/sdk/src/internal/cloud-agent/real-cloud-run.ts:155` |
|
|
39
39
|
| `cloud_run_unknown_status` | domain | NetworkError | `packages/sdk/src/internal/cloud-agent/real-cloud-run.ts:284` +1 |
|
|
40
40
|
| `cloud_runtime_pre_release` | domain | ConfigurationError | `packages/sdk/src/agent.ts:415` +2 |
|
|
@@ -69,10 +69,10 @@ Branch on `code`, never on the message: messages carry context (an id, a path, a
|
|
|
69
69
|
| `handoff_target_required` | domain | ConfigurationError | `packages/sdk-handoff/src/handoff.ts:111` |
|
|
70
70
|
| `hitl_timeout` | domain | HitlTimeoutError | `packages/sdk/src/internal/runtime/tools/hitl-middleware.ts:39` |
|
|
71
71
|
| `hook_denied` | domain | ConfigurationError | `packages/sdk/src/internal/local-agent/local-agent.ts:429` |
|
|
72
|
-
| `hooks_invalid_command` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/hooks/hooks-source.ts:
|
|
73
|
-
| `hooks_json_invalid` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/hooks/hooks-source.ts:
|
|
74
|
-
| `hooks_read_error` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/hooks/hooks-source.ts:
|
|
75
|
-
| `hooks_unsupported_type` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/hooks/hooks-source.ts:
|
|
72
|
+
| `hooks_invalid_command` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/hooks/hooks-source.ts:234` |
|
|
73
|
+
| `hooks_json_invalid` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/hooks/hooks-source.ts:152` +2 |
|
|
74
|
+
| `hooks_read_error` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/hooks/hooks-source.ts:143` |
|
|
75
|
+
| `hooks_unsupported_type` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/hooks/hooks-source.ts:228` |
|
|
76
76
|
| `interactive_unavailable` | domain | InteractiveUnavailableError | `packages/sdk/src/interactive/types.ts:20` |
|
|
77
77
|
| `INTERNAL_SERVER_ERROR` | domain | — | `packages/sdk/src/server/errors-envelope.ts:100` |
|
|
78
78
|
| `invalid_argument` | domain | TheokitAgentError | `packages/sdk/src/compaction.ts:79` |
|
|
@@ -88,7 +88,7 @@ Branch on `code`, never on the message: messages carry context (an id, a path, a
|
|
|
88
88
|
| `invalid_input` | domain | MemoryAdapterError | `packages/memory-honcho/src/adapter.ts:98` +9 |
|
|
89
89
|
| `invalid_max_iterations` | domain | ConfigurationError | `packages/sdk/src/internal/local-agent/real-local-run.ts:215` |
|
|
90
90
|
| `invalid_memory_backend` | domain | ConfigurationError | `packages/sdk/src/internal/memory/index-manager-dispatch.ts:24` +1 |
|
|
91
|
-
| `invalid_memory_kind` | domain | ConfigurationError | `packages/sdk/src/internal/memory/storage/markdown-store.ts:
|
|
91
|
+
| `invalid_memory_kind` | domain | ConfigurationError | `packages/sdk/src/internal/memory/storage/markdown-store.ts:184` |
|
|
92
92
|
| `invalid_model_selection` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/model-selection.ts:21` |
|
|
93
93
|
| `invalid_request` | transport | — | `packages/sdk/src/internal/error-mappers/vertex.ts:52` +1 |
|
|
94
94
|
| `invalid_retry_config` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/retry/with-retry.ts:67` |
|
|
@@ -145,12 +145,12 @@ Branch on `code`, never on the message: messages carry context (an id, a path, a
|
|
|
145
145
|
| `personality_not_found` | domain | ConfigurationError | `packages/sdk/src/internal/personality/switch.ts:60` |
|
|
146
146
|
| `personality_reserved_name` | domain | ConfigurationError | `packages/sdk/src/internal/personality/registry.ts:108` |
|
|
147
147
|
| `pipeline_duplicate_provider` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/system-prompt/pipeline.ts:33` |
|
|
148
|
-
| `plugin_entry_missing` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/plugins/plugins-manager.ts:
|
|
148
|
+
| `plugin_entry_missing` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/plugins/plugins-manager.ts:121` |
|
|
149
149
|
| `plugin_frontmatter_invalid` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/plugins/plugin-frontmatter.ts:39` |
|
|
150
150
|
| `plugin_late_register_kind` | domain | ConfigurationError | `packages/sdk/src/internal/plugins/manager.ts:103` |
|
|
151
|
-
| `plugin_manifest_invalid` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/plugins/plugins-manager.ts:
|
|
152
|
-
| `plugin_manifest_shape` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/plugins/plugins-manager.ts:
|
|
153
|
-
| `plugin_missing_manifest` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/plugins/plugins-manager.ts:
|
|
151
|
+
| `plugin_manifest_invalid` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/plugins/plugins-manager.ts:171` |
|
|
152
|
+
| `plugin_manifest_shape` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/plugins/plugins-manager.ts:177` |
|
|
153
|
+
| `plugin_missing_manifest` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/plugins/plugins-manager.ts:162` +2 |
|
|
154
154
|
| `programmatic_hooks_rejected` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/validation/validate-agent-options.ts:97` |
|
|
155
155
|
| `provider_unresolved` | domain | ConfigurationError | `packages/sdk/src/internal/llm/router.ts:99` +1 |
|
|
156
156
|
| `quota_exceeded` | transport | — | `packages/sdk/src/errors.ts:0` |
|
|
@@ -175,13 +175,13 @@ Branch on `code`, never on the message: messages carry context (an id, a path, a
|
|
|
175
175
|
| `ssrf_blocked` | domain | — | `packages/sdk-tools/src/internal/network-guard.ts:23` |
|
|
176
176
|
| `stream_idle_timeout` | domain | NetworkError | `packages/sdk/src/internal/llm/sse.ts:95` |
|
|
177
177
|
| `stream_truncated` | domain | NetworkError | `packages/sdk/src/internal/llm/anthropic.ts:184` +1 |
|
|
178
|
-
| `subagent_mcp_unsupported_local` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/skills/subagents-loader.ts:
|
|
178
|
+
| `subagent_mcp_unsupported_local` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/skills/subagents-loader.ts:165` |
|
|
179
179
|
| `subagent_missing_description` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/validation/validate-agent-options.ts:142` |
|
|
180
|
-
| `subagent_missing_frontmatter` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/skills/subagents-loader.ts:
|
|
180
|
+
| `subagent_missing_frontmatter` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/skills/subagents-loader.ts:242` |
|
|
181
181
|
| `subagent_missing_prompt` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/validation/validate-agent-options.ts:147` |
|
|
182
|
-
| `subagent_reasoning_effort_without_model` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/skills/subagents-loader.ts:
|
|
183
|
-
| `subagent_sandbox_not_boolean` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/skills/subagents-loader.ts:
|
|
184
|
-
| `subagent_unknown_field` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/skills/subagents-loader.ts:
|
|
182
|
+
| `subagent_reasoning_effort_without_model` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/skills/subagents-loader.ts:185` |
|
|
183
|
+
| `subagent_sandbox_not_boolean` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/skills/subagents-loader.ts:205` |
|
|
184
|
+
| `subagent_unknown_field` | domain | ConfigurationError | `packages/sdk/src/internal/runtime/skills/subagents-loader.ts:150` |
|
|
185
185
|
| `subagent_unknown_setting_source` | domain | ConfigurationError | `packages/sdk/src/subagents-loader.ts:61` |
|
|
186
186
|
| `subscribe_baseUrl_missing` | domain | SubscriptionError | `packages/sdk/src/subscription/theokit-subscribe.ts:77` |
|
|
187
187
|
| `subscribe_name_invalid` | domain | SubscriptionError | `packages/sdk/src/subscription/theokit-subscribe.ts:72` |
|
package/package.json
CHANGED