@theokit/sdk 4.59.0 → 4.60.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 +20 -0
- package/dist/{agent-VHRX7XGW.cjs → agent-26RMDG4U.cjs} +8 -7
- package/dist/{agent-VHRX7XGW.cjs.map → agent-26RMDG4U.cjs.map} +1 -1
- package/dist/{agent-ST27RIJE.js → agent-6ABK2DPG.js} +7 -6
- package/dist/{agent-ST27RIJE.js.map → agent-6ABK2DPG.js.map} +1 -1
- package/dist/{chunk-SMUAG2DY.cjs → chunk-23GPJGRR.cjs} +18 -17
- package/dist/chunk-23GPJGRR.cjs.map +1 -0
- package/dist/{chunk-7GUIET73.cjs → chunk-3HDTP4ZO.cjs} +4 -4
- package/dist/{chunk-7GUIET73.cjs.map → chunk-3HDTP4ZO.cjs.map} +1 -1
- package/dist/{chunk-GNT35C5U.cjs → chunk-6SBW4QR2.cjs} +2 -2
- package/dist/{chunk-GNT35C5U.cjs.map → chunk-6SBW4QR2.cjs.map} +1 -1
- package/dist/{chunk-7LOIUIQZ.js → chunk-76XTUTKY.js} +5 -4
- package/dist/chunk-76XTUTKY.js.map +1 -0
- package/dist/{chunk-ZA255A62.js → chunk-7OXXYBHD.js} +7 -186
- package/dist/chunk-7OXXYBHD.js.map +1 -0
- package/dist/{chunk-D5NWEOCO.js → chunk-E5MWNLRX.js} +3 -3
- package/dist/{chunk-D5NWEOCO.js.map → chunk-E5MWNLRX.js.map} +1 -1
- package/dist/{chunk-XV4IZNV4.js → chunk-FUL2I7G5.js} +2 -2
- package/dist/{chunk-XV4IZNV4.js.map → chunk-FUL2I7G5.js.map} +1 -1
- package/dist/chunk-JVERBPRD.js +191 -0
- package/dist/chunk-JVERBPRD.js.map +1 -0
- package/dist/chunk-NY25NBZB.cjs +203 -0
- package/dist/chunk-NY25NBZB.cjs.map +1 -0
- package/dist/{chunk-554J7UQH.cjs → chunk-Y2KJ7MYO.cjs} +14 -201
- package/dist/chunk-Y2KJ7MYO.cjs.map +1 -0
- package/dist/cron.cjs +7 -6
- package/dist/cron.js +6 -5
- package/dist/eval.cjs +6 -5
- package/dist/eval.cjs.map +1 -1
- package/dist/eval.js +5 -4
- package/dist/eval.js.map +1 -1
- package/dist/{index-manager-A64I7KYV.js → index-manager-KP2JAXKN.js} +4 -3
- package/dist/{index-manager-A64I7KYV.js.map → index-manager-KP2JAXKN.js.map} +1 -1
- package/dist/{index-manager-A3XPHAWF.cjs → index-manager-YUORPS4G.cjs} +5 -4
- package/dist/{index-manager-A3XPHAWF.cjs.map → index-manager-YUORPS4G.cjs.map} +1 -1
- package/dist/index.cjs +35 -34
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -11
- package/dist/index.js.map +1 -1
- package/dist/internal/memory/storage/chunk-markdown.d.cts +2 -0
- package/dist/internal/memory/storage/index.cjs +54 -0
- package/dist/internal/memory/storage/index.cjs.map +1 -0
- package/dist/internal/memory/storage/index.d.cts +18 -0
- package/dist/internal/memory/storage/index.d.ts +18 -0
- package/dist/internal/memory/storage/index.js +13 -0
- package/dist/internal/memory/storage/index.js.map +1 -0
- package/dist/internal/memory/storage/markdown-store.d.cts +77 -0
- package/dist/internal/memory/storage/markdown-store.d.ts +25 -1
- package/dist/internal/memory/storage/memory-file.d.cts +54 -0
- package/dist/internal/memory/storage/reader.d.cts +8 -0
- package/dist/internal/memory/storage/session-loader.d.cts +1 -0
- package/dist/internal/memory/storage/session-summary-writer.d.cts +2 -0
- package/dist/internal/memory/storage/transcript-store.d.cts +1 -0
- package/dist/internal/memory/storage/wiki-loader.d.cts +2 -0
- package/dist/workflow.cjs +9 -9
- package/dist/workflow.js +1 -1
- package/docs/error-codes.md +1 -1
- package/docs/harness-capability-map.md +15 -1
- package/package.json +11 -1
- package/dist/chunk-554J7UQH.cjs.map +0 -1
- package/dist/chunk-7LOIUIQZ.js.map +0 -1
- package/dist/chunk-SMUAG2DY.cjs.map +0 -1
- package/dist/chunk-ZA255A62.js.map +0 -1
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkNY25NBZB_cjs = require('../../../chunk-NY25NBZB.cjs');
|
|
4
|
+
require('../../../chunk-KRD3GQAA.cjs');
|
|
5
|
+
require('../../../chunk-MUUQ2WFJ.cjs');
|
|
6
|
+
require('../../../chunk-R3UPQFKK.cjs');
|
|
7
|
+
require('../../../chunk-VKJ7V7EB.cjs');
|
|
8
|
+
require('../../../chunk-BUIK7GUA.cjs');
|
|
9
|
+
require('../../../chunk-ZF2LDKQQ.cjs');
|
|
10
|
+
require('../../../chunk-I6TGFUCO.cjs');
|
|
11
|
+
require('../../../chunk-K3FW2XZD.cjs');
|
|
12
|
+
require('../../../chunk-JTB5Q42C.cjs');
|
|
13
|
+
require('../../../chunk-NUKRL3I6.cjs');
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
Object.defineProperty(exports, "appendFact", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return chunkNY25NBZB_cjs.appendFact; }
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports, "appendFactToMarkdown", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () { return chunkNY25NBZB_cjs.appendFactToMarkdown; }
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(exports, "claudeProjectMemoryDir", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () { return chunkNY25NBZB_cjs.claudeProjectMemoryDir; }
|
|
28
|
+
});
|
|
29
|
+
Object.defineProperty(exports, "memoryDir", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: function () { return chunkNY25NBZB_cjs.memoryDir; }
|
|
32
|
+
});
|
|
33
|
+
Object.defineProperty(exports, "memoryMdPath", {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
get: function () { return chunkNY25NBZB_cjs.memoryMdPath; }
|
|
36
|
+
});
|
|
37
|
+
Object.defineProperty(exports, "memoryWriteDir", {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
get: function () { return chunkNY25NBZB_cjs.memoryWriteDir; }
|
|
40
|
+
});
|
|
41
|
+
Object.defineProperty(exports, "notesDir", {
|
|
42
|
+
enumerable: true,
|
|
43
|
+
get: function () { return chunkNY25NBZB_cjs.notesDir; }
|
|
44
|
+
});
|
|
45
|
+
Object.defineProperty(exports, "readFacts", {
|
|
46
|
+
enumerable: true,
|
|
47
|
+
get: function () { return chunkNY25NBZB_cjs.readFacts; }
|
|
48
|
+
});
|
|
49
|
+
Object.defineProperty(exports, "readFactsFromMarkdown", {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
get: function () { return chunkNY25NBZB_cjs.readFactsFromMarkdown; }
|
|
52
|
+
});
|
|
53
|
+
//# sourceMappingURL=index.cjs.map
|
|
54
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* #430 — the ONE markdown memory store, shared with `@theokit/sdk-memory`.
|
|
3
|
+
*
|
|
4
|
+
* The satellite carried a full copy, and `Memory.runDreamingSweep` REPLACES this one with the
|
|
5
|
+
* peer's whenever the peer is installed — so the copy that ran was not the copy most people read.
|
|
6
|
+
* The copy stayed on the pre-#389 layout (bullets under `MEMORY.md ## Facts`) while this one moved
|
|
7
|
+
* to a file per memory, which meant installing `@theokit/sdk-memory` made every memory the SDK had
|
|
8
|
+
* written unreadable. It reported `factsBefore: 0`, indistinguishable from an empty store.
|
|
9
|
+
*
|
|
10
|
+
* This is the same defect theokit#160 fixed for the embedding runtime, in the same package pair,
|
|
11
|
+
* with the same remedy: one implementation, imported by both. A second copy is a second place for
|
|
12
|
+
* the layout to drift, and the drift is silent by construction — nothing fails, facts just stop
|
|
13
|
+
* being found.
|
|
14
|
+
*
|
|
15
|
+
* Semver-exempt: NOT part of the stable `@theokit/sdk` API. The sub-path IS declared in
|
|
16
|
+
* `package.json` `exports`, so the names below must survive into the published declarations.
|
|
17
|
+
*/
|
|
18
|
+
export { appendFact, appendFactToMarkdown, claudeProjectMemoryDir, memoryDir, memoryMdPath, memoryWriteDir, notesDir, readFacts, readFactsFromMarkdown, } from "./markdown-store.js";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* #430 — the ONE markdown memory store, shared with `@theokit/sdk-memory`.
|
|
3
|
+
*
|
|
4
|
+
* The satellite carried a full copy, and `Memory.runDreamingSweep` REPLACES this one with the
|
|
5
|
+
* peer's whenever the peer is installed — so the copy that ran was not the copy most people read.
|
|
6
|
+
* The copy stayed on the pre-#389 layout (bullets under `MEMORY.md ## Facts`) while this one moved
|
|
7
|
+
* to a file per memory, which meant installing `@theokit/sdk-memory` made every memory the SDK had
|
|
8
|
+
* written unreadable. It reported `factsBefore: 0`, indistinguishable from an empty store.
|
|
9
|
+
*
|
|
10
|
+
* This is the same defect theokit#160 fixed for the embedding runtime, in the same package pair,
|
|
11
|
+
* with the same remedy: one implementation, imported by both. A second copy is a second place for
|
|
12
|
+
* the layout to drift, and the drift is silent by construction — nothing fails, facts just stop
|
|
13
|
+
* being found.
|
|
14
|
+
*
|
|
15
|
+
* Semver-exempt: NOT part of the stable `@theokit/sdk` API. The sub-path IS declared in
|
|
16
|
+
* `package.json` `exports`, so the names below must survive into the published declarations.
|
|
17
|
+
*/
|
|
18
|
+
export { appendFact, appendFactToMarkdown, claudeProjectMemoryDir, memoryDir, memoryMdPath, memoryWriteDir, notesDir, readFacts, readFactsFromMarkdown, } from "./markdown-store.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { appendFact, appendFactToMarkdown, claudeProjectMemoryDir, memoryDir, memoryMdPath, memoryWriteDir, notesDir, readFacts, readFactsFromMarkdown } from '../../../chunk-JVERBPRD.js';
|
|
2
|
+
import '../../../chunk-KVNWIAO4.js';
|
|
3
|
+
import '../../../chunk-FD2UT76F.js';
|
|
4
|
+
import '../../../chunk-QARJGQSA.js';
|
|
5
|
+
import '../../../chunk-RIAM53CP.js';
|
|
6
|
+
import '../../../chunk-FKMUFNQE.js';
|
|
7
|
+
import '../../../chunk-Q5EWJPRY.js';
|
|
8
|
+
import '../../../chunk-VF7EWVDG.js';
|
|
9
|
+
import '../../../chunk-IDCKSLYH.js';
|
|
10
|
+
import '../../../chunk-T7XEKOVW.js';
|
|
11
|
+
import '../../../chunk-T7O6K6PX.js';
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { type MemoryConfig, type MemoryFact } from "../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* The memory root for a workspace: `<cwd>/.theokit/memory`. Every other path here derives from it,
|
|
4
|
+
* and `memory_get` refuses to read outside it. Pure path computation — nothing is created on disk.
|
|
5
|
+
*/
|
|
6
|
+
export declare function memoryDir(cwd: string): string;
|
|
7
|
+
/**
|
|
8
|
+
* Where a NEW fact should be written.
|
|
9
|
+
*
|
|
10
|
+
* `.theokit/memory` by default, exactly as before. When the agent was given a `local.sessionDir`,
|
|
11
|
+
* it becomes `<sessionDir>/projects/<encoded-cwd>/memory` — the same place the transcript for that
|
|
12
|
+
* project goes, so a session and the memories recorded during it land beside each other.
|
|
13
|
+
*
|
|
14
|
+
* `local.sessionDir` is the switch because it is already the option this project documents for CLI
|
|
15
|
+
* interop: point it at `~/.claude` and the CLI can `--continue` a session this agent wrote. Someone
|
|
16
|
+
* who set it has said they share state with that CLI, and memory following is what the sentence
|
|
17
|
+
* already implied. It needs no new option, and nothing moves for anyone who never set it.
|
|
18
|
+
*
|
|
19
|
+
* Safe because of the rule this pairs with — WRITE ONE, READ ALL. {@link readFactsFromMarkdown}
|
|
20
|
+
* covers every location, so a consumer whose new facts move keeps every fact they already had. The
|
|
21
|
+
* change relocates where the next one lands; it orphans nothing.
|
|
22
|
+
*/
|
|
23
|
+
export declare function memoryWriteDir(cwd: string, sessionDir: string | undefined): string;
|
|
24
|
+
/**
|
|
25
|
+
* Where the Claude Code CLI keeps THIS project's memories.
|
|
26
|
+
*
|
|
27
|
+
* `<claudeHome>/projects/<encoded-cwd>/memory` — the same `encodeProjectDir` scheme the transcripts
|
|
28
|
+
* already use, which is why no new encoding is invented here. `CLAUDE_CONFIG_DIR` names the home
|
|
29
|
+
* when set (the CLI's own variable); `~/.claude` otherwise.
|
|
30
|
+
*
|
|
31
|
+
* Read, never written. Writing here by default would relocate every existing consumer's memories,
|
|
32
|
+
* and an additive change must not move what is already on disk — so this is the direction that
|
|
33
|
+
* costs nothing: a memory the CLI wrote becomes visible, and a memory the SDK wrote stays where the
|
|
34
|
+
* SDK put it.
|
|
35
|
+
*/
|
|
36
|
+
export declare function claudeProjectMemoryDir(cwd: string): string;
|
|
37
|
+
/**
|
|
38
|
+
* Path to `MEMORY.md`, the index that points at the per-memory files — and, in stores written before
|
|
39
|
+
* #389, the flat `## Facts` list itself. Pure path computation; the file may not exist.
|
|
40
|
+
*/
|
|
41
|
+
export declare function memoryMdPath(cwd: string): string;
|
|
42
|
+
/**
|
|
43
|
+
* Path to `<memory root>/notes`, where per-topic notes and the consolidated notes a dreaming sweep
|
|
44
|
+
* writes live. Pure path computation — the directory may not exist.
|
|
45
|
+
*/
|
|
46
|
+
export declare function notesDir(cwd: string): string;
|
|
47
|
+
/**
|
|
48
|
+
* Every memory in the store: the per-memory files, plus any legacy `## Facts` bullets still in
|
|
49
|
+
* `MEMORY.md`. Returns `[]` when the directory does not exist.
|
|
50
|
+
*
|
|
51
|
+
* Reading both is not transitional politeness. Those bullets are already on disk in consumers'
|
|
52
|
+
* repositories, and the store's own header invites editing them by hand — a converged writer that
|
|
53
|
+
* stopped reading them would delete what someone recorded, which is worse than the format it fixes.
|
|
54
|
+
*/
|
|
55
|
+
export declare function readFactsFromMarkdown(cwd: string, sessionDir?: string): Promise<MemoryFact[]>;
|
|
56
|
+
/**
|
|
57
|
+
* Write a fact as its own memory file and point the `MEMORY.md` index at it. Atomic + serialized.
|
|
58
|
+
*
|
|
59
|
+
* `modified` is stamped HERE and never read from `fact`: a timestamp a caller can set is a
|
|
60
|
+
* timestamp that can lie about when something was learned, and weighing recency is the point.
|
|
61
|
+
*/
|
|
62
|
+
export declare function appendFactToMarkdown(cwd: string, fact: MemoryFact, targetDir?: string): Promise<void>;
|
|
63
|
+
/**
|
|
64
|
+
* Every memory in the store, honouring the `enabled` gate on {@link MemoryConfig}: when memory is
|
|
65
|
+
* disabled the call resolves to `[]` without touching disk. Configuration-aware entry point;
|
|
66
|
+
* {@link readFactsFromMarkdown} is the same read without the gate.
|
|
67
|
+
*/
|
|
68
|
+
export declare function readFacts(cwd: string, config: MemoryConfig, memoryHome?: string): Promise<MemoryFact[]>;
|
|
69
|
+
/**
|
|
70
|
+
* Record a fact, honouring the `enabled` gate on {@link MemoryConfig}: when memory is disabled the
|
|
71
|
+
* call resolves without touching disk. Configuration-aware entry point;
|
|
72
|
+
* {@link appendFactToMarkdown} is the same write without the gate.
|
|
73
|
+
*
|
|
74
|
+
* `memoryHome` is the agent's `local.sessionDir` when it has one — see {@link memoryWriteDir} for
|
|
75
|
+
* which store that sends the fact to.
|
|
76
|
+
*/
|
|
77
|
+
export declare function appendFact(cwd: string, config: MemoryConfig, fact: MemoryFact, memoryHome?: string): Promise<void>;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { type MemoryConfig, type MemoryFact } from "../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* The memory root for a workspace: `<cwd>/.theokit/memory`. Every other path here derives from it,
|
|
4
|
+
* and `memory_get` refuses to read outside it. Pure path computation — nothing is created on disk.
|
|
5
|
+
*/
|
|
2
6
|
export declare function memoryDir(cwd: string): string;
|
|
3
7
|
/**
|
|
4
8
|
* Where a NEW fact should be written.
|
|
@@ -30,7 +34,15 @@ export declare function memoryWriteDir(cwd: string, sessionDir: string | undefin
|
|
|
30
34
|
* SDK put it.
|
|
31
35
|
*/
|
|
32
36
|
export declare function claudeProjectMemoryDir(cwd: string): string;
|
|
37
|
+
/**
|
|
38
|
+
* Path to `MEMORY.md`, the index that points at the per-memory files — and, in stores written before
|
|
39
|
+
* #389, the flat `## Facts` list itself. Pure path computation; the file may not exist.
|
|
40
|
+
*/
|
|
33
41
|
export declare function memoryMdPath(cwd: string): string;
|
|
42
|
+
/**
|
|
43
|
+
* Path to `<memory root>/notes`, where per-topic notes and the consolidated notes a dreaming sweep
|
|
44
|
+
* writes live. Pure path computation — the directory may not exist.
|
|
45
|
+
*/
|
|
34
46
|
export declare function notesDir(cwd: string): string;
|
|
35
47
|
/**
|
|
36
48
|
* Every memory in the store: the per-memory files, plus any legacy `## Facts` bullets still in
|
|
@@ -48,6 +60,18 @@ export declare function readFactsFromMarkdown(cwd: string, sessionDir?: string):
|
|
|
48
60
|
* timestamp that can lie about when something was learned, and weighing recency is the point.
|
|
49
61
|
*/
|
|
50
62
|
export declare function appendFactToMarkdown(cwd: string, fact: MemoryFact, targetDir?: string): Promise<void>;
|
|
51
|
-
/**
|
|
63
|
+
/**
|
|
64
|
+
* Every memory in the store, honouring the `enabled` gate on {@link MemoryConfig}: when memory is
|
|
65
|
+
* disabled the call resolves to `[]` without touching disk. Configuration-aware entry point;
|
|
66
|
+
* {@link readFactsFromMarkdown} is the same read without the gate.
|
|
67
|
+
*/
|
|
52
68
|
export declare function readFacts(cwd: string, config: MemoryConfig, memoryHome?: string): Promise<MemoryFact[]>;
|
|
69
|
+
/**
|
|
70
|
+
* Record a fact, honouring the `enabled` gate on {@link MemoryConfig}: when memory is disabled the
|
|
71
|
+
* call resolves without touching disk. Configuration-aware entry point;
|
|
72
|
+
* {@link appendFactToMarkdown} is the same write without the gate.
|
|
73
|
+
*
|
|
74
|
+
* `memoryHome` is the agent's `local.sessionDir` when it has one — see {@link memoryWriteDir} for
|
|
75
|
+
* which store that sends the fact to.
|
|
76
|
+
*/
|
|
53
77
|
export declare function appendFact(cwd: string, config: MemoryConfig, fact: MemoryFact, memoryHome?: string): Promise<void>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One memory as a file, in the shape the Claude Code CLI reads.
|
|
3
|
+
*
|
|
4
|
+
* `@theokit/sdk` already writes native Claude Code `.jsonl` sessions — the README's differentiator
|
|
5
|
+
* is "point `local.sessionDir` at `~/.claude` and the Claude Code CLI can `--continue` a session
|
|
6
|
+
* your agent wrote". Memory had no such convergence: a fact was a bullet under `## Facts` with its
|
|
7
|
+
* kind in an HTML comment (#389), which that CLI reads as prose. Pointing a memory directory at
|
|
8
|
+
* `~/.claude/projects/<project>/memory/` produced nothing it could open.
|
|
9
|
+
*
|
|
10
|
+
* The contract here was measured against a real store rather than inferred from documentation. Of
|
|
11
|
+
* nine files, all nine carry `name`, `description` and `metadata.type`; six also carry
|
|
12
|
+
* `node_type`, `originSessionId` and `modified`, which the runtime stamps on write. So the minimum
|
|
13
|
+
* a reader must accept is the first three — refusing the rest would refuse memories the CLI itself
|
|
14
|
+
* accepts.
|
|
15
|
+
*
|
|
16
|
+
* `originSessionId` is deliberately not written. It identifies the session that learned the fact,
|
|
17
|
+
* and the append path has no session in scope; inventing one would be worse than omitting a field
|
|
18
|
+
* the format already treats as optional.
|
|
19
|
+
*
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
import { type MemoryKind } from "../types.js";
|
|
23
|
+
/** The fields one memory file carries. */
|
|
24
|
+
export interface MemoryFileFields {
|
|
25
|
+
/** Slug, and the file's basename. */
|
|
26
|
+
readonly name: string;
|
|
27
|
+
/** One-line summary — what the index shows and what recall ranks. */
|
|
28
|
+
readonly description: string;
|
|
29
|
+
/** `metadata.type`, absent when the file does not declare one this contract admits. */
|
|
30
|
+
readonly kind?: MemoryKind;
|
|
31
|
+
/** `metadata.modified`, an ISO 8601 instant stamped by whoever wrote the file. */
|
|
32
|
+
readonly modified?: string;
|
|
33
|
+
/** The markdown after the frontmatter. */
|
|
34
|
+
readonly body: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* A readable, filesystem-safe slug for `text`.
|
|
38
|
+
*
|
|
39
|
+
* Readability is the goal — a directory of `h-3f2a…` files is a directory nobody browses — but it
|
|
40
|
+
* is not the floor. The text comes from whatever a caller learned, so anything that fails the safe
|
|
41
|
+
* grammar falls back to {@link safeFilenameForId}, which is total and always yields a valid
|
|
42
|
+
* component.
|
|
43
|
+
*/
|
|
44
|
+
export declare function slugForFact(text: string): string;
|
|
45
|
+
/** Render one memory file. `description` is quoted so a colon in the text cannot break the block. */
|
|
46
|
+
export declare function renderMemoryFile(fields: MemoryFileFields): string;
|
|
47
|
+
/**
|
|
48
|
+
* Read one memory file, or `undefined` when the content is not one.
|
|
49
|
+
*
|
|
50
|
+
* `undefined` rather than a throw, and rather than a best-effort object: the directory holds
|
|
51
|
+
* hand-written notes and a `MEMORY.md` index alongside the memories, and turning any of those into
|
|
52
|
+
* a fact would put text into recall that nobody recorded as one.
|
|
53
|
+
*/
|
|
54
|
+
export declare function parseMemoryFile(raw: string): MemoryFileFields | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function discoverSessionFiles(cwd: string): Promise<SessionFile[]>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function persistActiveMemoryTranscript(cwd: string, transcript: ActiveMemoryTranscript): Promise<void>;
|
package/dist/workflow.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk6SBW4QR2_cjs = require('./chunk-6SBW4QR2.cjs');
|
|
4
4
|
var chunkXWL6O3SW_cjs = require('./chunk-XWL6O3SW.cjs');
|
|
5
5
|
require('./chunk-VTYY7XL5.cjs');
|
|
6
6
|
require('./chunk-WJVHMTKB.cjs');
|
|
@@ -15,35 +15,35 @@ require('./chunk-NUKRL3I6.cjs');
|
|
|
15
15
|
|
|
16
16
|
Object.defineProperty(exports, "Workflow", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunk6SBW4QR2_cjs.Workflow; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "WorkflowBuilder", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunk6SBW4QR2_cjs.WorkflowBuilder; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "WorkflowToolError", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunk6SBW4QR2_cjs.WorkflowToolError; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "agentStep", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunk6SBW4QR2_cjs.agentStep; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "cloneWorkflow", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunk6SBW4QR2_cjs.cloneWorkflow; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "fn", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunk6SBW4QR2_cjs.fn; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "workflowAsTool", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunk6SBW4QR2_cjs.workflowAsTool; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "workflowStep", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunk6SBW4QR2_cjs.workflowStep; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "WorkflowAlreadyRunningError", {
|
|
49
49
|
enumerable: true,
|
package/dist/workflow.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Workflow, WorkflowBuilder, WorkflowToolError, agentStep, cloneWorkflow, fn, workflowAsTool, workflowStep } from './chunk-
|
|
1
|
+
export { Workflow, WorkflowBuilder, WorkflowToolError, agentStep, cloneWorkflow, fn, workflowAsTool, workflowStep } from './chunk-FUL2I7G5.js';
|
|
2
2
|
export { WorkflowAlreadyRunningError, WorkflowCompensateNotImplementedError, WorkflowDuplicateStepIdError, WorkflowInputError, WorkflowMaxIterationsExceededError, WorkflowNestedError, WorkflowNotSerializableError, WorkflowOutputError, WorkflowParallelError, WorkflowResumeStepNotFoundError, WorkflowSnapshotNotFoundError, WorkflowStateError, __resetSnapshotStoresForTests } from './chunk-AQLGBKNT.js';
|
|
3
3
|
import './chunk-HY66GLM6.js';
|
|
4
4
|
import './chunk-4VPXM6UU.js';
|
package/docs/error-codes.md
CHANGED
|
@@ -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:196` |
|
|
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` |
|
|
@@ -4,7 +4,7 @@ Every public symbol the TheoKit workspace publishes, and the exact specifier to
|
|
|
4
4
|
|
|
5
5
|
A symbol listed under two specifiers is reachable from both, but that does NOT make the two interchangeable: a class emitted separately into a subpath entry is a distinct nominal type from the one in the root bundle, so passing one where the other is expected fails on a private field. When a symbol appears twice, import it and everything it is passed to from the SAME specifier.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
1135 export(s) across 46 entry point(s).
|
|
8
8
|
|
|
9
9
|
## `@theokit/acp`
|
|
10
10
|
|
|
@@ -1003,6 +1003,20 @@ A symbol listed under two specifiers is reachable from both, but that does NOT m
|
|
|
1003
1003
|
| `LruEmbeddingCache` | class | Bounded in-memory LRU cache for embeddings, keyed by `sha256(text)` (or any stable key the caller chooses). |
|
|
1004
1004
|
| `OpenAiCompatibleConfig` | interface | What one provider adapter tells {@link createOpenAiCompatibleRuntime } about its wire: where to POST, which environment variables carry the key and the base URL, which model to use by default, and ... |
|
|
1005
1005
|
|
|
1006
|
+
## `@theokit/sdk/internal/memory-store`
|
|
1007
|
+
|
|
1008
|
+
| Symbol | Kind | Summary |
|
|
1009
|
+
|---|---|---|
|
|
1010
|
+
| `appendFact` | function | Record a fact, honouring the `enabled` gate on {@link MemoryConfig } : when memory is disabled the call resolves without touching disk. |
|
|
1011
|
+
| `appendFactToMarkdown` | function | Write a fact as its own memory file and point the `MEMORY.md` index at it. |
|
|
1012
|
+
| `claudeProjectMemoryDir` | function | Where the Claude Code CLI keeps THIS project's memories. |
|
|
1013
|
+
| `memoryDir` | function | The memory root for a workspace: `<cwd>/.theokit/memory`. |
|
|
1014
|
+
| `memoryMdPath` | function | Path to `MEMORY.md`, the index that points at the per-memory files — and, in stores written before #389, the flat `## Facts` list itself. |
|
|
1015
|
+
| `memoryWriteDir` | function | Where a NEW fact should be written. |
|
|
1016
|
+
| `notesDir` | function | Path to `<memory root>/notes`, where per-topic notes and the consolidated notes a dreaming sweep writes live. |
|
|
1017
|
+
| `readFacts` | function | Every memory in the store, honouring the `enabled` gate on {@link MemoryConfig } : when memory is disabled the call resolves to `[]` without touching disk. |
|
|
1018
|
+
| `readFactsFromMarkdown` | function | Every memory in the store: the per-memory files, plus any legacy `## Facts` bullets still in `MEMORY.md`. |
|
|
1019
|
+
|
|
1006
1020
|
## `@theokit/sdk/internal/persistence`
|
|
1007
1021
|
|
|
1008
1022
|
| Symbol | Kind | Summary |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theokit/sdk",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.60.0",
|
|
4
4
|
"description": "TypeScript SDK for the Theo agent harness — same surface, local or cloud.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/usetheokit/theokit-sdk#readme",
|
|
@@ -288,6 +288,16 @@
|
|
|
288
288
|
"default": "./dist/internal/memory/adapters/index.cjs"
|
|
289
289
|
}
|
|
290
290
|
},
|
|
291
|
+
"./internal/memory-store": {
|
|
292
|
+
"import": {
|
|
293
|
+
"types": "./dist/internal/memory/storage/index.d.ts",
|
|
294
|
+
"default": "./dist/internal/memory/storage/index.js"
|
|
295
|
+
},
|
|
296
|
+
"require": {
|
|
297
|
+
"types": "./dist/internal/memory/storage/index.d.cts",
|
|
298
|
+
"default": "./dist/internal/memory/storage/index.cjs"
|
|
299
|
+
}
|
|
300
|
+
},
|
|
291
301
|
"./a2a": {
|
|
292
302
|
"import": {
|
|
293
303
|
"types": "./dist/a2a/index.d.ts",
|