@theokit/sdk 5.0.0-next.4 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/CHANGELOG.md +979 -0
  2. package/dist/{agent-IXRJYSBE.cjs → agent-TKJBWGGQ.cjs} +9 -9
  3. package/dist/{agent-IXRJYSBE.cjs.map → agent-TKJBWGGQ.cjs.map} +1 -1
  4. package/dist/{agent-L5Z6H53C.js → agent-UGYIYC3R.js} +8 -8
  5. package/dist/{agent-L5Z6H53C.js.map → agent-UGYIYC3R.js.map} +1 -1
  6. package/dist/{chunk-SYVWE64W.cjs → chunk-5AXMNUCY.cjs} +5 -5
  7. package/dist/{chunk-SYVWE64W.cjs.map → chunk-5AXMNUCY.cjs.map} +1 -1
  8. package/dist/{chunk-4S5TWFIZ.js → chunk-7RHC7HMS.js} +3 -3
  9. package/dist/{chunk-4S5TWFIZ.js.map → chunk-7RHC7HMS.js.map} +1 -1
  10. package/dist/{chunk-CYKKYNOT.js → chunk-7SZAV6QG.js} +4 -4
  11. package/dist/chunk-7SZAV6QG.js.map +1 -0
  12. package/dist/{chunk-NNA3HA6T.cjs → chunk-CC7EYKBJ.cjs} +4 -4
  13. package/dist/{chunk-NNA3HA6T.cjs.map → chunk-CC7EYKBJ.cjs.map} +1 -1
  14. package/dist/{chunk-OOEKESSL.cjs → chunk-CQLVA4CO.cjs} +54 -54
  15. package/dist/{chunk-OOEKESSL.cjs.map → chunk-CQLVA4CO.cjs.map} +1 -1
  16. package/dist/{chunk-XJZEBGXD.js → chunk-D7WAROJR.js} +3 -3
  17. package/dist/{chunk-XJZEBGXD.js.map → chunk-D7WAROJR.js.map} +1 -1
  18. package/dist/{chunk-GGZ5GPE3.cjs → chunk-DLRP7BI6.cjs} +3 -3
  19. package/dist/chunk-DLRP7BI6.cjs.map +1 -0
  20. package/dist/{chunk-67ADYSTW.js → chunk-GUKPXDGJ.js} +4 -4
  21. package/dist/chunk-GUKPXDGJ.js.map +1 -0
  22. package/dist/{chunk-H6YM3PV6.cjs → chunk-LTLPBGHC.cjs} +5 -5
  23. package/dist/{chunk-H6YM3PV6.cjs.map → chunk-LTLPBGHC.cjs.map} +1 -1
  24. package/dist/{chunk-RXZSVNDG.cjs → chunk-NQTNSHSB.cjs} +7 -3
  25. package/dist/chunk-NQTNSHSB.cjs.map +1 -0
  26. package/dist/{chunk-J2SH3PNH.js → chunk-SADXXGWU.js} +6 -3
  27. package/dist/chunk-SADXXGWU.js.map +1 -0
  28. package/dist/{chunk-WKUBCBWS.js → chunk-SVWMQCXF.js} +9 -9
  29. package/dist/{chunk-WKUBCBWS.js.map → chunk-SVWMQCXF.js.map} +1 -1
  30. package/dist/{chunk-VNDJS6I3.cjs → chunk-VPK6PHIE.cjs} +8 -8
  31. package/dist/{chunk-VNDJS6I3.cjs.map → chunk-VPK6PHIE.cjs.map} +1 -1
  32. package/dist/{chunk-DX4RUWOK.js → chunk-WS5ULCL4.js} +3 -3
  33. package/dist/{chunk-DX4RUWOK.js.map → chunk-WS5ULCL4.js.map} +1 -1
  34. package/dist/{chunk-A3FOEBYS.js → chunk-YEL3SP6X.js} +3 -3
  35. package/dist/{chunk-A3FOEBYS.js.map → chunk-YEL3SP6X.js.map} +1 -1
  36. package/dist/{chunk-KBXADFBJ.cjs → chunk-Z2JFX372.cjs} +15 -15
  37. package/dist/chunk-Z2JFX372.cjs.map +1 -0
  38. package/dist/context-FM6UZPTL.js +6 -0
  39. package/dist/{context-Y7B7SI5X.js.map → context-FM6UZPTL.js.map} +1 -1
  40. package/dist/{context-NI33FS2R.cjs → context-XQJIGZMR.cjs} +7 -7
  41. package/dist/{context-NI33FS2R.cjs.map → context-XQJIGZMR.cjs.map} +1 -1
  42. package/dist/cron.cjs +8 -8
  43. package/dist/cron.js +7 -7
  44. package/dist/eval.cjs +7 -7
  45. package/dist/eval.js +6 -6
  46. package/dist/{index-manager-OL6HTYAO.cjs → index-manager-3UNPYH34.cjs} +5 -5
  47. package/dist/{index-manager-OL6HTYAO.cjs.map → index-manager-3UNPYH34.cjs.map} +1 -1
  48. package/dist/{index-manager-E56WW5RO.js → index-manager-W7FDMGEG.js} +4 -4
  49. package/dist/{index-manager-E56WW5RO.js.map → index-manager-W7FDMGEG.js.map} +1 -1
  50. package/dist/index.cjs +30 -30
  51. package/dist/index.js +11 -11
  52. package/dist/internal/memory/storage/index.cjs +34 -30
  53. package/dist/internal/memory/storage/index.d.cts +1 -1
  54. package/dist/internal/memory/storage/index.d.ts +1 -1
  55. package/dist/internal/memory/storage/index.js +2 -2
  56. package/dist/internal/memory/storage/memory-root.d.cts +17 -0
  57. package/dist/internal/memory/storage/memory-root.d.ts +17 -0
  58. package/dist/internal/persistence/index.cjs +4 -4
  59. package/dist/internal/persistence/index.js +1 -1
  60. package/dist/internal/runtime/compat/foreign-config-sources.d.ts +29 -6
  61. package/dist/subagents-loader-7ES7PJNM.js +7 -0
  62. package/dist/{subagents-loader-Y6JFYXAY.js.map → subagents-loader-7ES7PJNM.js.map} +1 -1
  63. package/dist/subagents-loader-OMOH6ERO.cjs +16 -0
  64. package/dist/{subagents-loader-TPZLTXYZ.cjs.map → subagents-loader-OMOH6ERO.cjs.map} +1 -1
  65. package/dist/subagents-loader.cjs +3 -3
  66. package/dist/subagents-loader.js +2 -2
  67. package/docs/harness-capability-map.md +3 -1
  68. package/docs/memory-decisions.md +41 -20
  69. package/package.json +2 -2
  70. package/dist/chunk-67ADYSTW.js.map +0 -1
  71. package/dist/chunk-CYKKYNOT.js.map +0 -1
  72. package/dist/chunk-GGZ5GPE3.cjs.map +0 -1
  73. package/dist/chunk-J2SH3PNH.js.map +0 -1
  74. package/dist/chunk-KBXADFBJ.cjs.map +0 -1
  75. package/dist/chunk-RXZSVNDG.cjs.map +0 -1
  76. package/dist/context-Y7B7SI5X.js +0 -6
  77. package/dist/subagents-loader-TPZLTXYZ.cjs +0 -16
  78. package/dist/subagents-loader-Y6JFYXAY.js +0 -7
package/dist/index.js CHANGED
@@ -1,27 +1,27 @@
1
1
  export { StreamObjectError } from './chunk-5WKQDIGO.js';
2
2
  export { GOAL_CONTINUATION_MARKER } from './chunk-PY2RQOA7.js';
3
3
  export { JudgeCredentialError } from './chunk-UFPUHJWS.js';
4
- import { migrateSqliteToLance, appendDiaryEntry } from './chunk-DX4RUWOK.js';
4
+ import { migrateSqliteToLance, appendDiaryEntry } from './chunk-WS5ULCL4.js';
5
5
  export { GenerateObjectError } from './chunk-44I6UYVH.js';
6
6
  import './chunk-47TF32NQ.js';
7
7
  import { Workflow, agentStep } from './chunk-HFEJE7AC.js';
8
8
  export { Workflow, agentStep, fn } from './chunk-HFEJE7AC.js';
9
9
  import './chunk-GBCVPKHE.js';
10
10
  import './chunk-HY66GLM6.js';
11
- export { Cron } from './chunk-A3FOEBYS.js';
12
- import { MEMORY_EMBEDDING_ADAPTERS, resolveSessionDir, DEFAULT_AGENTIC_MODEL_ID, Agent } from './chunk-WKUBCBWS.js';
13
- export { Agent, AgentBuilder, Tool, ToolError, UsageAccumulator, computeCost, getPricingEntry } from './chunk-WKUBCBWS.js';
11
+ export { Cron } from './chunk-YEL3SP6X.js';
12
+ import { MEMORY_EMBEDDING_ADAPTERS, resolveSessionDir, DEFAULT_AGENTIC_MODEL_ID, Agent } from './chunk-SVWMQCXF.js';
13
+ export { Agent, AgentBuilder, Tool, ToolError, UsageAccumulator, computeCost, getPricingEntry } from './chunk-SVWMQCXF.js';
14
14
  import { configure, submit, list, get, cancel, subscribe } from './chunk-K2VMFZQ5.js';
15
15
  export { emitRunEvent } from './chunk-K2VMFZQ5.js';
16
16
  import './chunk-AWINL3ZC.js';
17
17
  import './chunk-K2BQQ445.js';
18
- import './chunk-CYKKYNOT.js';
19
- import './chunk-XJZEBGXD.js';
18
+ import './chunk-7SZAV6QG.js';
19
+ import './chunk-D7WAROJR.js';
20
20
  import './chunk-2SFBB54R.js';
21
21
  import './chunk-55GB6JYQ.js';
22
22
  import './chunk-H73MEMQB.js';
23
23
  import './chunk-OR6XIWLB.js';
24
- import { resolveMemoryRoot, readFactsFromMarkdown } from './chunk-J2SH3PNH.js';
24
+ import { resolveMemoryRoot, readFactsFromMarkdown } from './chunk-SADXXGWU.js';
25
25
  import { FsSessionStore } from './chunk-AAEZSPTC.js';
26
26
  import { discoverProviderPlugins, shouldUseFixtureMode, isFixtureApiKey, httpRequest, mapOllamaTransportError, readErrorResponseBody, mapOllamaHttpError } from './chunk-K3NH62DG.js';
27
27
  import './chunk-UBR5PWD7.js';
@@ -55,8 +55,8 @@ import { withCwdMutex } from './chunk-Q5EWJPRY.js';
55
55
  export { withCwdMutex } from './chunk-Q5EWJPRY.js';
56
56
  export { TASK_RESERVED_PREFIXES, isValidTaskId } from './chunk-EIQFAOFD.js';
57
57
  import { replaceFileAtomic } from './chunk-3JHIFQ4I.js';
58
- import './chunk-4S5TWFIZ.js';
59
- import './chunk-67ADYSTW.js';
58
+ import './chunk-7RHC7HMS.js';
59
+ import './chunk-GUKPXDGJ.js';
60
60
  import './chunk-JNAA4G4H.js';
61
61
  import { estimateTokens, CHARS_PER_TOKEN } from './chunk-6M2OIS4Y.js';
62
62
  export { estimateTokens } from './chunk-6M2OIS4Y.js';
@@ -1297,7 +1297,7 @@ var Memory = {
1297
1297
  openArgs.embedding = await resolveEmbedding(opts.embedding, peer.MEMORY_EMBEDDING_ADAPTERS);
1298
1298
  return await peer.IndexManager.open(openArgs);
1299
1299
  }
1300
- const { IndexManager } = await import('./index-manager-E56WW5RO.js');
1300
+ const { IndexManager } = await import('./index-manager-W7FDMGEG.js');
1301
1301
  openArgs.embedding = await resolveEmbedding(opts.embedding, MEMORY_EMBEDDING_ADAPTERS);
1302
1302
  return await IndexManager.open(openArgs);
1303
1303
  },
@@ -1750,7 +1750,7 @@ function isBuiltAgent(m) {
1750
1750
  return typeof m.send === "function";
1751
1751
  }
1752
1752
  async function materialize(def, index) {
1753
- const { Agent: Agent2 } = await import('./agent-L5Z6H53C.js');
1753
+ const { Agent: Agent2 } = await import('./agent-UGYIYC3R.js');
1754
1754
  return Agent2.create({
1755
1755
  // `AgentDefinition.model` admits the sentinel `'inherit'`, which is not a model id. Inheriting
1756
1756
  // here means "declare nothing and let the default apply" — forwarding the literal would create
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkVNDJS6I3_cjs = require('../../../chunk-VNDJS6I3.cjs');
3
+ var chunkVPK6PHIE_cjs = require('../../../chunk-VPK6PHIE.cjs');
4
4
  var chunkTMKTSYDS_cjs = require('../../../chunk-TMKTSYDS.cjs');
5
- var chunkRXZSVNDG_cjs = require('../../../chunk-RXZSVNDG.cjs');
5
+ var chunkNQTNSHSB_cjs = require('../../../chunk-NQTNSHSB.cjs');
6
6
  require('../../../chunk-KRD3GQAA.cjs');
7
7
  require('../../../chunk-MUUQ2WFJ.cjs');
8
8
  require('../../../chunk-LOHMT36V.cjs');
@@ -19,23 +19,23 @@ require('../../../chunk-6LHQPOMI.cjs');
19
19
 
20
20
  Object.defineProperty(exports, "appendDiaryEntry", {
21
21
  enumerable: true,
22
- get: function () { return chunkVNDJS6I3_cjs.appendDiaryEntry; }
22
+ get: function () { return chunkVPK6PHIE_cjs.appendDiaryEntry; }
23
23
  });
24
24
  Object.defineProperty(exports, "diaryPath", {
25
25
  enumerable: true,
26
- get: function () { return chunkVNDJS6I3_cjs.diaryPath; }
26
+ get: function () { return chunkVPK6PHIE_cjs.diaryPath; }
27
27
  });
28
28
  Object.defineProperty(exports, "entryHash", {
29
29
  enumerable: true,
30
- get: function () { return chunkVNDJS6I3_cjs.entryHash; }
30
+ get: function () { return chunkVPK6PHIE_cjs.entryHash; }
31
31
  });
32
32
  Object.defineProperty(exports, "readAllSqliteFacts", {
33
33
  enumerable: true,
34
- get: function () { return chunkVNDJS6I3_cjs.readAllSqliteFacts; }
34
+ get: function () { return chunkVPK6PHIE_cjs.readAllSqliteFacts; }
35
35
  });
36
36
  Object.defineProperty(exports, "renderDiaryEntry", {
37
37
  enumerable: true,
38
- get: function () { return chunkVNDJS6I3_cjs.renderDiaryEntry; }
38
+ get: function () { return chunkVPK6PHIE_cjs.renderDiaryEntry; }
39
39
  });
40
40
  Object.defineProperty(exports, "persistActiveMemoryTranscript", {
41
41
  enumerable: true,
@@ -43,95 +43,99 @@ Object.defineProperty(exports, "persistActiveMemoryTranscript", {
43
43
  });
44
44
  Object.defineProperty(exports, "MEMORY_INDEX_MAX_BYTES", {
45
45
  enumerable: true,
46
- get: function () { return chunkRXZSVNDG_cjs.MEMORY_INDEX_MAX_BYTES; }
46
+ get: function () { return chunkNQTNSHSB_cjs.MEMORY_INDEX_MAX_BYTES; }
47
47
  });
48
48
  Object.defineProperty(exports, "MEMORY_INDEX_MAX_LINES", {
49
49
  enumerable: true,
50
- get: function () { return chunkRXZSVNDG_cjs.MEMORY_INDEX_MAX_LINES; }
50
+ get: function () { return chunkNQTNSHSB_cjs.MEMORY_INDEX_MAX_LINES; }
51
51
  });
52
52
  Object.defineProperty(exports, "appendFact", {
53
53
  enumerable: true,
54
- get: function () { return chunkRXZSVNDG_cjs.appendFact; }
54
+ get: function () { return chunkNQTNSHSB_cjs.appendFact; }
55
55
  });
56
56
  Object.defineProperty(exports, "appendFactToMarkdown", {
57
57
  enumerable: true,
58
- get: function () { return chunkRXZSVNDG_cjs.appendFactToMarkdown; }
58
+ get: function () { return chunkNQTNSHSB_cjs.appendFactToMarkdown; }
59
59
  });
60
60
  Object.defineProperty(exports, "asMemoryRoot", {
61
61
  enumerable: true,
62
- get: function () { return chunkRXZSVNDG_cjs.asMemoryRoot; }
62
+ get: function () { return chunkNQTNSHSB_cjs.asMemoryRoot; }
63
63
  });
64
64
  Object.defineProperty(exports, "claudeProjectMemoryDir", {
65
65
  enumerable: true,
66
- get: function () { return chunkRXZSVNDG_cjs.claudeProjectMemoryDir; }
66
+ get: function () { return chunkNQTNSHSB_cjs.claudeProjectMemoryDir; }
67
67
  });
68
68
  Object.defineProperty(exports, "collectMarkdownFiles", {
69
69
  enumerable: true,
70
- get: function () { return chunkRXZSVNDG_cjs.collectMarkdownFiles; }
70
+ get: function () { return chunkNQTNSHSB_cjs.collectMarkdownFiles; }
71
71
  });
72
72
  Object.defineProperty(exports, "defaultIndexPath", {
73
73
  enumerable: true,
74
- get: function () { return chunkRXZSVNDG_cjs.defaultIndexPath; }
74
+ get: function () { return chunkNQTNSHSB_cjs.defaultIndexPath; }
75
75
  });
76
76
  Object.defineProperty(exports, "discoverSessionFiles", {
77
77
  enumerable: true,
78
- get: function () { return chunkRXZSVNDG_cjs.discoverSessionFiles; }
78
+ get: function () { return chunkNQTNSHSB_cjs.discoverSessionFiles; }
79
79
  });
80
80
  Object.defineProperty(exports, "discoverWikiFiles", {
81
81
  enumerable: true,
82
- get: function () { return chunkRXZSVNDG_cjs.discoverWikiFiles; }
82
+ get: function () { return chunkNQTNSHSB_cjs.discoverWikiFiles; }
83
83
  });
84
84
  Object.defineProperty(exports, "indexBudgetWarning", {
85
85
  enumerable: true,
86
- get: function () { return chunkRXZSVNDG_cjs.indexBudgetWarning; }
86
+ get: function () { return chunkNQTNSHSB_cjs.indexBudgetWarning; }
87
87
  });
88
88
  Object.defineProperty(exports, "lanceStoragePath", {
89
89
  enumerable: true,
90
- get: function () { return chunkRXZSVNDG_cjs.lanceStoragePath; }
90
+ get: function () { return chunkNQTNSHSB_cjs.lanceStoragePath; }
91
+ });
92
+ Object.defineProperty(exports, "memoryIndexRoot", {
93
+ enumerable: true,
94
+ get: function () { return chunkNQTNSHSB_cjs.memoryIndexRoot; }
91
95
  });
92
96
  Object.defineProperty(exports, "memoryMdPath", {
93
97
  enumerable: true,
94
- get: function () { return chunkRXZSVNDG_cjs.memoryMdPath; }
98
+ get: function () { return chunkNQTNSHSB_cjs.memoryMdPath; }
95
99
  });
96
100
  Object.defineProperty(exports, "memoryReadRoots", {
97
101
  enumerable: true,
98
- get: function () { return chunkRXZSVNDG_cjs.memoryReadRoots; }
102
+ get: function () { return chunkNQTNSHSB_cjs.memoryReadRoots; }
99
103
  });
100
104
  Object.defineProperty(exports, "notesDir", {
101
105
  enumerable: true,
102
- get: function () { return chunkRXZSVNDG_cjs.notesDir; }
106
+ get: function () { return chunkNQTNSHSB_cjs.notesDir; }
103
107
  });
104
108
  Object.defineProperty(exports, "projectMemoryDir", {
105
109
  enumerable: true,
106
- get: function () { return chunkRXZSVNDG_cjs.projectMemoryDir; }
110
+ get: function () { return chunkNQTNSHSB_cjs.projectMemoryDir; }
107
111
  });
108
112
  Object.defineProperty(exports, "readFacts", {
109
113
  enumerable: true,
110
- get: function () { return chunkRXZSVNDG_cjs.readFacts; }
114
+ get: function () { return chunkNQTNSHSB_cjs.readFacts; }
111
115
  });
112
116
  Object.defineProperty(exports, "readFactsFromMarkdown", {
113
117
  enumerable: true,
114
- get: function () { return chunkRXZSVNDG_cjs.readFactsFromMarkdown; }
118
+ get: function () { return chunkNQTNSHSB_cjs.readFactsFromMarkdown; }
115
119
  });
116
120
  Object.defineProperty(exports, "resolveMemoryRoot", {
117
121
  enumerable: true,
118
- get: function () { return chunkRXZSVNDG_cjs.resolveMemoryRoot; }
122
+ get: function () { return chunkNQTNSHSB_cjs.resolveMemoryRoot; }
119
123
  });
120
124
  Object.defineProperty(exports, "sessionSummaryPath", {
121
125
  enumerable: true,
122
- get: function () { return chunkRXZSVNDG_cjs.sessionSummaryPath; }
126
+ get: function () { return chunkNQTNSHSB_cjs.sessionSummaryPath; }
123
127
  });
124
128
  Object.defineProperty(exports, "sessionsDir", {
125
129
  enumerable: true,
126
- get: function () { return chunkRXZSVNDG_cjs.sessionsDir; }
130
+ get: function () { return chunkNQTNSHSB_cjs.sessionsDir; }
127
131
  });
128
132
  Object.defineProperty(exports, "wikiDir", {
129
133
  enumerable: true,
130
- get: function () { return chunkRXZSVNDG_cjs.wikiDir; }
134
+ get: function () { return chunkNQTNSHSB_cjs.wikiDir; }
131
135
  });
132
136
  Object.defineProperty(exports, "writeSessionSummary", {
133
137
  enumerable: true,
134
- get: function () { return chunkRXZSVNDG_cjs.writeSessionSummary; }
138
+ get: function () { return chunkNQTNSHSB_cjs.writeSessionSummary; }
135
139
  });
136
140
  //# sourceMappingURL=index.cjs.map
137
141
  //# sourceMappingURL=index.cjs.map
@@ -21,7 +21,7 @@ export { collectMarkdownFiles, type DiscoveredFile } from "../index-manager-help
21
21
  export { lanceStoragePath } from "../lance-index.js";
22
22
  export { readAllSqliteFacts, type SqliteFactRow } from "../migrate-sqlite-to-lance.js";
23
23
  export { appendFact, appendFactToMarkdown, memoryMdPath, notesDir, readFacts, readFactsFromMarkdown, } from "./markdown-store.js";
24
- export { asMemoryRoot, claudeProjectMemoryDir, indexBudgetWarning, MEMORY_INDEX_MAX_BYTES, MEMORY_INDEX_MAX_LINES, type MemoryLocationConfig, type MemoryRoot, memoryReadRoots, projectMemoryDir, resolveMemoryRoot, } from "./memory-root.js";
24
+ export { asMemoryRoot, claudeProjectMemoryDir, indexBudgetWarning, MEMORY_INDEX_MAX_BYTES, MEMORY_INDEX_MAX_LINES, type MemoryLocationConfig, type MemoryRoot, memoryIndexRoot, memoryReadRoots, projectMemoryDir, resolveMemoryRoot, } from "./memory-root.js";
25
25
  export { discoverSessionFiles, type SessionFile } from "./session-loader.js";
26
26
  export { type SessionSummaryInput, sessionSummaryPath, sessionsDir, writeSessionSummary, } from "./session-summary-writer.js";
27
27
  export { type ActiveMemoryTranscript, persistActiveMemoryTranscript } from "./transcript-store.js";
@@ -21,7 +21,7 @@ export { collectMarkdownFiles, type DiscoveredFile } from "../index-manager-help
21
21
  export { lanceStoragePath } from "../lance-index.js";
22
22
  export { readAllSqliteFacts, type SqliteFactRow } from "../migrate-sqlite-to-lance.js";
23
23
  export { appendFact, appendFactToMarkdown, memoryMdPath, notesDir, readFacts, readFactsFromMarkdown, } from "./markdown-store.js";
24
- export { asMemoryRoot, claudeProjectMemoryDir, indexBudgetWarning, MEMORY_INDEX_MAX_BYTES, MEMORY_INDEX_MAX_LINES, type MemoryLocationConfig, type MemoryRoot, memoryReadRoots, projectMemoryDir, resolveMemoryRoot, } from "./memory-root.js";
24
+ export { asMemoryRoot, claudeProjectMemoryDir, indexBudgetWarning, MEMORY_INDEX_MAX_BYTES, MEMORY_INDEX_MAX_LINES, type MemoryLocationConfig, type MemoryRoot, memoryIndexRoot, memoryReadRoots, projectMemoryDir, resolveMemoryRoot, } from "./memory-root.js";
25
25
  export { discoverSessionFiles, type SessionFile } from "./session-loader.js";
26
26
  export { type SessionSummaryInput, sessionSummaryPath, sessionsDir, writeSessionSummary, } from "./session-summary-writer.js";
27
27
  export { type ActiveMemoryTranscript, persistActiveMemoryTranscript } from "./transcript-store.js";
@@ -1,6 +1,6 @@
1
- export { appendDiaryEntry, diaryPath, entryHash, readAllSqliteFacts, renderDiaryEntry } from '../../../chunk-DX4RUWOK.js';
1
+ export { appendDiaryEntry, diaryPath, entryHash, readAllSqliteFacts, renderDiaryEntry } from '../../../chunk-WS5ULCL4.js';
2
2
  export { persistActiveMemoryTranscript } from '../../../chunk-OR6XIWLB.js';
3
- export { MEMORY_INDEX_MAX_BYTES, MEMORY_INDEX_MAX_LINES, appendFact, appendFactToMarkdown, asMemoryRoot, claudeProjectMemoryDir, collectMarkdownFiles, defaultIndexPath, discoverSessionFiles, discoverWikiFiles, indexBudgetWarning, lanceStoragePath, memoryMdPath, memoryReadRoots, notesDir, projectMemoryDir, readFacts, readFactsFromMarkdown, resolveMemoryRoot, sessionSummaryPath, sessionsDir, wikiDir, writeSessionSummary } from '../../../chunk-J2SH3PNH.js';
3
+ export { MEMORY_INDEX_MAX_BYTES, MEMORY_INDEX_MAX_LINES, appendFact, appendFactToMarkdown, asMemoryRoot, claudeProjectMemoryDir, collectMarkdownFiles, defaultIndexPath, discoverSessionFiles, discoverWikiFiles, indexBudgetWarning, lanceStoragePath, memoryIndexRoot, memoryMdPath, memoryReadRoots, notesDir, projectMemoryDir, readFacts, readFactsFromMarkdown, resolveMemoryRoot, sessionSummaryPath, sessionsDir, wikiDir, writeSessionSummary } from '../../../chunk-SADXXGWU.js';
4
4
  import '../../../chunk-KVNWIAO4.js';
5
5
  import '../../../chunk-FD2UT76F.js';
6
6
  import '../../../chunk-2XRAWOZZ.js';
@@ -92,6 +92,23 @@ export declare const MEMORY_INDEX_MAX_BYTES: number;
92
92
  * function is testable without a filesystem or a captured stderr.
93
93
  */
94
94
  export declare function indexBudgetWarning(index: string, root: string): string | undefined;
95
+ /**
96
+ * Where the search index belongs for this configuration (theokit-sdk#554).
97
+ *
98
+ * Not always the same root the FACTS use, and the divergence is narrow on purpose.
99
+ *
100
+ * The index is not a pointer — `chunks.text` holds the fact text, because FTS5/BM25 needs it to
101
+ * search. A copy of the index is therefore a copy of the memory. Leaving it in `<cwd>` while the
102
+ * facts move writes one operator's personal store into every repository the agent runs in,
103
+ * untracked and readable with `strings`.
104
+ *
105
+ * So the index follows the store — EXCEPT into the Claude Code CLI's own directory, which is the
106
+ * case `docs/memory-decisions.md` § 1 reasons about and settles: that CLI has no index format, so
107
+ * a binary there is an artefact the partner does not understand inside a directory it manages. The
108
+ * decision keeps exactly the scope its own argument covers, and no more; every other directory is
109
+ * a plain directory this SDK is free to own.
110
+ */
111
+ export declare function memoryIndexRoot(cwd: string, store: MemoryRoot): MemoryRoot;
95
112
  /**
96
113
  * Every directory a read must cover, deduplicated and in precedence order.
97
114
  *
@@ -92,6 +92,23 @@ export declare const MEMORY_INDEX_MAX_BYTES: number;
92
92
  * function is testable without a filesystem or a captured stderr.
93
93
  */
94
94
  export declare function indexBudgetWarning(index: string, root: string): string | undefined;
95
+ /**
96
+ * Where the search index belongs for this configuration (theokit-sdk#554).
97
+ *
98
+ * Not always the same root the FACTS use, and the divergence is narrow on purpose.
99
+ *
100
+ * The index is not a pointer — `chunks.text` holds the fact text, because FTS5/BM25 needs it to
101
+ * search. A copy of the index is therefore a copy of the memory. Leaving it in `<cwd>` while the
102
+ * facts move writes one operator's personal store into every repository the agent runs in,
103
+ * untracked and readable with `strings`.
104
+ *
105
+ * So the index follows the store — EXCEPT into the Claude Code CLI's own directory, which is the
106
+ * case `docs/memory-decisions.md` § 1 reasons about and settles: that CLI has no index format, so
107
+ * a binary there is an artefact the partner does not understand inside a directory it manages. The
108
+ * decision keeps exactly the scope its own argument covers, and no more; every other directory is
109
+ * a plain directory this SDK is free to own.
110
+ */
111
+ export declare function memoryIndexRoot(cwd: string, store: MemoryRoot): MemoryRoot;
95
112
  /**
96
113
  * Every directory a read must cover, deduplicated and in precedence order.
97
114
  *
@@ -7,7 +7,7 @@ var chunkDQZU7JK6_cjs = require('../../chunk-DQZU7JK6.cjs');
7
7
  var chunkBJUJT5ED_cjs = require('../../chunk-BJUJT5ED.cjs');
8
8
  var chunkZF2LDKQQ_cjs = require('../../chunk-ZF2LDKQQ.cjs');
9
9
  var chunkJLRLCBJ4_cjs = require('../../chunk-JLRLCBJ4.cjs');
10
- var chunkGGZ5GPE3_cjs = require('../../chunk-GGZ5GPE3.cjs');
10
+ var chunkDLRP7BI6_cjs = require('../../chunk-DLRP7BI6.cjs');
11
11
  require('../../chunk-J7J7J2GN.cjs');
12
12
  require('../../chunk-6LHQPOMI.cjs');
13
13
  var promises = require('fs/promises');
@@ -111,15 +111,15 @@ Object.defineProperty(exports, "replaceFileAtomic", {
111
111
  });
112
112
  Object.defineProperty(exports, "displayTheokitHome", {
113
113
  enumerable: true,
114
- get: function () { return chunkGGZ5GPE3_cjs.displayTheokitHome; }
114
+ get: function () { return chunkDLRP7BI6_cjs.displayTheokitHome; }
115
115
  });
116
116
  Object.defineProperty(exports, "getProfilesRoot", {
117
117
  enumerable: true,
118
- get: function () { return chunkGGZ5GPE3_cjs.getProfilesRoot; }
118
+ get: function () { return chunkDLRP7BI6_cjs.getProfilesRoot; }
119
119
  });
120
120
  Object.defineProperty(exports, "getTheokitHome", {
121
121
  enumerable: true,
122
- get: function () { return chunkGGZ5GPE3_cjs.getTheokitHome; }
122
+ get: function () { return chunkDLRP7BI6_cjs.getTheokitHome; }
123
123
  });
124
124
  exports.casUpdate = casUpdate;
125
125
  exports.createExclusive = createExclusive;
@@ -5,7 +5,7 @@ export { applyWalWithFallback, isCorruptionError, openSqliteResilient } from '..
5
5
  export { JsonlParseError, appendJsonl, loadJsonl, readJsonlIds, withFileLock } from '../../chunk-TA3K7SBK.js';
6
6
  export { withCwdMutex } from '../../chunk-Q5EWJPRY.js';
7
7
  export { atomicWriteJson, atomicWriteText, replaceFileAtomic } from '../../chunk-3JHIFQ4I.js';
8
- export { displayTheokitHome, getProfilesRoot, getTheokitHome } from '../../chunk-67ADYSTW.js';
8
+ export { displayTheokitHome, getProfilesRoot, getTheokitHome } from '../../chunk-GUKPXDGJ.js';
9
9
  import '../../chunk-ALUN2B4W.js';
10
10
  import '../../chunk-CZJ6Q7CW.js';
11
11
  import { open } from 'fs/promises';
@@ -104,13 +104,36 @@ export declare function undefinedVariablesIn(command: string, supplied: Readonly
104
104
  * executable, and it does not run. The only remaining way to learn why is a CHANGELOG entry for a
105
105
  * version the reader may not know they crossed.
106
106
  *
107
- * ## Why `diag` rather than `diagFailure`
107
+ * ## Why `diagFailure` rather than `diag` (#563)
108
108
  *
109
- * `diagFailure` falls back to stderr, and this is not a failure: ignoring an undeclared foreign
110
- * directory is precisely what #524 asked for. Every repository that has Claude Code set up and does
111
- * NOT want it imported would pay a stderr line at every agent start — on a TUI host's render
112
- * surface for behaving as instructed. That is the corruption `diagnostics.ts` exists to prevent.
109
+ * This used `diag`, on the reasoning that ignoring an undeclared directory is not a failure and
110
+ * that a repository which does NOT want the import should not pay a stderr line for behaving as
111
+ * instructed. The reasoning was sound and rested on a premise nobody checked: that a host would
112
+ * have installed a sink.
113
113
  *
114
- * So it goes on the interceptable channel, for the reader holding the question it answers.
114
+ * Measured against the published `5.0.0`. `diag` returns without doing anything when no sink is
115
+ * installed. The SDK installs none — `currentSink()` reads a `globalThis` slot only
116
+ * `setDiagnosticsSink` fills. Neither observable host installs one either: `theocode` renamed the
117
+ * key, and `theokit` exports `installDiagnosticSink` and never calls it. Two hosts out of two, and
118
+ * the SDK itself. So the message the CHANGELOG promised — "says so once, on the diagnostics
119
+ * channel" — reached nobody, while the consumer lost hooks, skills, subagents and plugins.
120
+ *
121
+ * A mitigation announced in release notes for a silent loss of capability is not a diagnostic. It
122
+ * is the error path of the breaking change itself, and `diagFailure` exists for exactly the message
123
+ * that must not be swallowed.
124
+ *
125
+ * The cost the old reasoning named is real and is now paid: a repository that wants the directory
126
+ * ignored sees a line. What makes that acceptable — ONCE per directory per process, not per turn
127
+ * (`reported` below); and before #524 that repository was having `.claude/` imported anyway, so the
128
+ * line it now sees confirms the fix it wanted. The asymmetry is one line of text against silently
129
+ * losing four subsystems.
130
+ *
131
+ * A host that installs a sink still owns its render surface: `diagFailure` prefers the sink and
132
+ * only falls back to stderr when there is none.
133
+ *
134
+ * NOT solved here: there is no way to say "I know, and I want none". `compatSources: []` would be
135
+ * the natural spelling, but `resolveCompatSources` collapses it into the same `[]` an absent option
136
+ * produces, so this function cannot tell them apart. If the noise turns out to matter, threading
137
+ * that distinction through is the shape of the fix.
115
138
  */
116
139
  export declare function reportUndeclaredSources(cwd: string, declared: readonly CompatSourceDeclaration[]): void;
@@ -0,0 +1,7 @@
1
+ export { loadSubagents } from './chunk-7RHC7HMS.js';
2
+ import './chunk-GUKPXDGJ.js';
3
+ import './chunk-JNAA4G4H.js';
4
+ import './chunk-ALUN2B4W.js';
5
+ import './chunk-CZJ6Q7CW.js';
6
+ //# sourceMappingURL=subagents-loader-7ES7PJNM.js.map
7
+ //# sourceMappingURL=subagents-loader-7ES7PJNM.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"subagents-loader-Y6JFYXAY.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"subagents-loader-7ES7PJNM.js"}
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ var chunk5AXMNUCY_cjs = require('./chunk-5AXMNUCY.cjs');
4
+ require('./chunk-DLRP7BI6.cjs');
5
+ require('./chunk-HW7SEELD.cjs');
6
+ require('./chunk-J7J7J2GN.cjs');
7
+ require('./chunk-6LHQPOMI.cjs');
8
+
9
+
10
+
11
+ Object.defineProperty(exports, "loadSubagents", {
12
+ enumerable: true,
13
+ get: function () { return chunk5AXMNUCY_cjs.loadSubagents; }
14
+ });
15
+ //# sourceMappingURL=subagents-loader-OMOH6ERO.cjs.map
16
+ //# sourceMappingURL=subagents-loader-OMOH6ERO.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"subagents-loader-TPZLTXYZ.cjs"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"subagents-loader-OMOH6ERO.cjs"}
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkSYVWE64W_cjs = require('./chunk-SYVWE64W.cjs');
4
- require('./chunk-GGZ5GPE3.cjs');
3
+ var chunk5AXMNUCY_cjs = require('./chunk-5AXMNUCY.cjs');
4
+ require('./chunk-DLRP7BI6.cjs');
5
5
  require('./chunk-HW7SEELD.cjs');
6
6
  var chunkJ7J7J2GN_cjs = require('./chunk-J7J7J2GN.cjs');
7
7
  require('./chunk-6LHQPOMI.cjs');
@@ -23,7 +23,7 @@ function resolveSources(options) {
23
23
  }
24
24
  async function discoverSubagents(cwd, options) {
25
25
  const sources = resolveSources(options);
26
- return chunkSYVWE64W_cjs.loadSubagents(cwd, sources.includes("project"), void 0);
26
+ return chunk5AXMNUCY_cjs.loadSubagents(cwd, sources.includes("project"), void 0);
27
27
  }
28
28
  async function loadSubagentDefinition(name, cwd, options) {
29
29
  return (await discoverSubagents(cwd, options))[name];
@@ -1,5 +1,5 @@
1
- import { loadSubagents } from './chunk-4S5TWFIZ.js';
2
- import './chunk-67ADYSTW.js';
1
+ import { loadSubagents } from './chunk-7RHC7HMS.js';
2
+ import './chunk-GUKPXDGJ.js';
3
3
  import './chunk-JNAA4G4H.js';
4
4
  import { ConfigurationError } from './chunk-ALUN2B4W.js';
5
5
  import './chunk-CZJ6Q7CW.js';
@@ -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
- 1191 export(s) across 46 entry point(s).
7
+ 1193 export(s) across 46 entry point(s).
8
8
 
9
9
  ## `@theokit/acp`
10
10
 
@@ -623,6 +623,7 @@ A symbol listed under two specifiers is reachable from both, but that does NOT m
623
623
  | `MemoryFileEntry` | interface | Lightweight reference to a markdown file in the memory corpus. |
624
624
  | `MemoryGetToolOptions` | interface | Options for {@link createMemoryGetTool } . |
625
625
  | `MemoryIndex` | interface | The four operations both backends implement, and the type every consumer should hold. |
626
+ | `memoryIndexRoot` | function | Where the search index belongs for this configuration (theokit-sdk#554). |
626
627
  | `MemoryLocationConfig` | type | Only `directory` is read; the full config is accepted so callers pass what they already hold. |
627
628
  | `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. |
628
629
  | `MemoryReadResult` | interface | Result of `reader.readFile`. |
@@ -1051,6 +1052,7 @@ A symbol listed under two specifiers is reachable from both, but that does NOT m
1051
1052
  | `lanceStoragePath` | function | `<memory root>/lance`. |
1052
1053
  | `MEMORY_INDEX_MAX_BYTES` | const | The byte limit the Claude Code CLI applies when it loads a `MEMORY.md`, whichever it reaches first. |
1053
1054
  | `MEMORY_INDEX_MAX_LINES` | const | The line limit the Claude Code CLI applies when it loads a `MEMORY.md`. |
1055
+ | `memoryIndexRoot` | function | Where the search index belongs for this configuration (theokit-sdk#554). |
1054
1056
  | `MemoryLocationConfig` | type | Only `directory` is read; the full config is accepted so callers pass what they already hold. |
1055
1057
  | `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. |
1056
1058
  | `memoryReadRoots` | function | Every directory a read must cover, deduplicated and in precedence order. |
@@ -18,7 +18,7 @@ decision the next refactor deletes.
18
18
  .theokit/memory/.index/memory.sqlite on the first send, when memory is enabled
19
19
  ```
20
20
 
21
- **Why it looks wrong.** With `memory.directory` pointed at the CLI's store, memory *facts* are
21
+ **Why it looks wrong.** With `memory.directory` pointed at the CLI's store, memory _facts_ are
22
22
  written to `<claudeHome>/projects/<encoded-cwd>/memory/` — where the CLI reads them. So a project
23
23
  that never adopted this SDK ends up with a `.theokit/` directory anyway, which reads like the
24
24
  "write where the CLI reads" promise leaking.
@@ -36,10 +36,31 @@ Claude Code shape to be written in:
36
36
  The facts — the thing a user recorded and would lose — go where the CLI reads. The index is derived
37
37
  data that can be rebuilt from them.
38
38
 
39
+ **Scope, narrowed 2026-09-04 (theokit-sdk#554).** This argument reaches the CLI's directory and no
40
+ other. For any other `memory.directory`, the index now follows the store —
41
+ `<directory>/.index/memory.sqlite` — and the reason the old behaviour was wrong is worth keeping:
42
+
43
+ > The index is **not** a pointer. `chunks.text` holds the fact TEXT, because FTS5/BM25 needs it to
44
+ > search, and `files.path` holds the store's absolute path. So a copy of the index is a copy of the
45
+ > memory, readable with `strings`.
46
+
47
+ Leaving it in `<cwd>` while the facts moved therefore wrote one operator's personal store into
48
+ **every repository the agent ran in**, untracked and un-ignored. "Derived data" was true of its
49
+ _derivability_ and false of its _contents_, and the sentence above was doing the work of both.
50
+
51
+ The CLI case survives unchanged, on its own argument: that partner has no index format, so a binary
52
+ there is an artefact it does not understand inside a directory it manages. `memoryIndexRoot`
53
+ (`internal/memory/storage/memory-root.ts`) is the single place that decides, using the same
54
+ path-only test `indexBudgetWarning` relies on.
55
+
56
+ **How to check the narrowed scope still holds:** `tests/memory/index-follows-a-relocated-store.test.ts`
57
+ pins both halves — a plain directory takes its own index, the CLI's does not — and
58
+ `tests/memory/root.test.ts` carries the end-to-end pair through `IndexManager.open`.
59
+
39
60
  **How to check it still holds:** `tests/claude-code-e2e-compat.test.ts`, the pair
40
61
  `test_reading_a_cli_project_creates_nothing_in_it` /
41
62
  `test_running_an_agent_creates_theokit_and_only_sdk_state_in_it`. The second exists so the first is
42
- not vacuous — it asserts the directory contains *only* `agents` and `memory`.
63
+ not vacuous — it asserts the directory contains _only_ `agents` and `memory`.
43
64
 
44
65
  ---
45
66
 
@@ -53,7 +74,7 @@ three retention buckets (atomic / consolidatable / lifecycle-managed). This SDK
53
74
 
54
75
  **Why it has not been widened.** The nine exist to drive differentiated retention, and **this SDK has
55
76
  no retention at all** — no TTL, no pruning, no decay (searched `ttl|prune|expire|retention` across
56
- both packages; the only hits are the recall result cache, which expires *results*, not entries).
77
+ both packages; the only hits are the recall result cache, which expires _results_, not entries).
57
78
  Nine names over a regime where nothing expires are nine names for one behaviour. Retention has to
58
79
  exist before a vocabulary that differentiates it is worth anything.
59
80
 
@@ -76,7 +97,7 @@ emitted. That is evidence about what it WRITES, not proof about what it ACCEPTS
76
97
  means there is no precedent, and the burden belongs to whoever adds one unilaterally.
77
98
 
78
99
  **`failure_heuristic` is the one the retention argument does not cover, and the interop argument
79
- does.** It changes *what is written* (a trigger→resolution pair) rather than how an entry expires, so
100
+ does.** It changes _what is written_ (a trigger→resolution pair) rather than how an entry expires, so
80
101
  "no retention to differentiate" says nothing about it — and nothing has adopted it (`grep
81
102
  failure_heuristic packages/sdk/src` → zero). It is not declined on retention grounds; it is held by
82
103
  the same shared-format question as the other four, and unblocking it means establishing what the CLI
@@ -112,7 +133,7 @@ text: the same text keeps the same file and increments corroboration, different
112
133
  `topic-2`. Found by the golden `multiple appends each get a file`, not by review — the failure was
113
134
  silent data loss, and nothing about the reasoning would have surfaced it.
114
135
 
115
- So the section heading stays true for what it describes, re-recording the *same* fact, and the case
136
+ So the section heading stays true for what it describes, re-recording the _same_ fact, and the case
116
137
  it never covered is now covered.
117
138
 
118
139
  That change closed #446, where a passphrase the model had just refused to store was written into the
@@ -161,11 +182,11 @@ So no dense vector participates in scoring under a default configuration. One do
161
182
  consumer names an embedding provider.
162
183
 
163
184
  **Known divergence,** on the opt-in path: the external contract forbids dense vectors in agent-memory
164
- recall below a measured threshold (>1000 entries *and* demonstrated lexical degradation). Neither has
185
+ recall below a measured threshold (>1000 entries _and_ demonstrated lexical degradation). Neither has
165
186
  been measured here.
166
187
 
167
188
  **The bigger gap WAS the default path, and it was not this divergence.** A contract arbitrating
168
- *between* retrieval methods does not cover the absence of one — and until `721a311f` there was no
189
+ _between_ retrieval methods does not cover the absence of one — and until `721a311f` there was no
169
190
  method on this path at all. That is fixed; the history is kept because the failure mode is worth
170
191
  recognising again, and because it explains why the ranking signal has to depend on the question. A
171
192
  first version cut by recency alone, and a live run showed the answering fact dropped for being old
@@ -197,7 +218,7 @@ where this agent's memory lives. Everything under the root follows it: `MEMORY.m
197
218
  files, `notes/`, `sessions/`, `wiki/`, `transcripts/`, `dream-diary.md` and `.index/memory.sqlite`.
198
219
 
199
220
  **What it replaced.** The location used to be a side effect of `local.sessionDir`, the option that
200
- names the *transcript* home, on the reasoning that a consumer who set it had already opted into CLI
221
+ names the _transcript_ home, on the reasoning that a consumer who set it had already opted into CLI
201
222
  interop. One option answered two questions — and of the fourteen places that computed a memory
202
223
  path, exactly one heard the second answer. `appendFact` relocated; the indexer, the `memory_get`
203
224
  path guard, `MEMORY.md`, `sessions/` and the index database did not. A relocated fact was written,
@@ -230,15 +251,15 @@ that were broken.
230
251
 
231
252
  Each row says what would close it, not only that it is open — the two invite very different work.
232
253
 
233
- | gap | where | what would close it |
234
- |---|---|---|
235
- | ~~The default recall path has no selection at all~~ — **closed** in `721a311f` | `local-agent-send.ts:257-272` | Closed: lexical relevance + recency, capped. Measured end to end against the real model — a 67-entry store went from ~66K to **13,606 tokens on the wire**, and the answering fact is recalled whether it is the oldest or the newest entry. |
236
- | The CLI's store is read whether or not the consumer opted in | `storage/memory-root.ts` — `claudeProjectMemoryDir(cwd)` is an unconditional entry in `memoryReadRoots` | A decision, not a fix: it is deliberate (*write one, read all*, so a consumer's existing memories are never orphaned) and it means a consumer who never opted into CLI interop still receives what the CLI accumulated in that project. Cheap while the cap holds; revisit if the cap is ever removed. |
237
- | No retention of any kind — no TTL, prune, or decay | searched `ttl\|prune\|expire\|retention` across both packages: zero | A per-kind TTL plus a prune step in the sweep. Needs the kind vocabulary to mean something first (§ 2), which is why this orders before widening it. |
238
- | Quarantine marks but does not constrain | `memory-file.ts:96`, `memory-provider.ts:48` | Implemented: three states, and `[unconfirmed]` on entries the store counted once. **Measured against the real model and it does not close the hole** — a planted memory alone is acted on 5/5, and beside a corroborated contradiction it is still asserted ~62% of runs (n=32). Marking influences the model; it does not constrain it. The guarantee is not available at this layer: blocking an uncorroborated entry would break the promise that a fact written once is recallable next session. |
239
- | A planted memory can make the agent ACT | measured: `RELEASE_OVERRIDE.txt` created in 2 of 6 runs | Register the permission layer — `PermissionPlugin.create(new PermissionEngine(…))` — which blocks it every time. This is the half that IS closable at the tool boundary; the informational half above is not. Any deployment where the memory directory is writable by anything other than this agent needs it. |
240
- | `description` is written as a copy of the body | `markdown-store.ts:205-211` — the *reader* (`:174-177`) already handles a distinct description correctly | Stop writing one when nobody declared it. The role is a one-line recall aid; deriving it mechanically would be inferring the situation, which § 2's rule already forbids for `kind`. Absent is a valid state and the reader already falls back to the body. |
241
- | The topic-name deriver filters English function words only | `memory-file.ts:73` | A store in another language keeps that language's function words in the slug and the index title — `de`, `do`, `para` survive, so the name is longer and noisier. **Never lossy:** collisions are caught by `resolveName` comparing text, not by the stopword list. Real stores here are bilingual, so this is a partial parity, not a complete one. Closes with a per-language list, or by not needing one. |
242
- | The dream sweep never filters by kind before dedup | `dreaming/phases.ts:34` — `lightPhase` never reads `kind` | Partition by kind before `lightPhase`. Nothing is deleted today, but a consolidated note can blend two distinct entries, and the note is what search returns. |
243
- | The dream sweep does not update the index | `dreaming/run.ts:53-96` writes `notes/` and never syncs | An `IndexManager.sync` after `writeConsolidatedNotes`. |
244
- | Recall fires every turn, cached on query hash, not on store manifest | `internal/local-agent/local-agent-memory.ts:87`; `sdk-memory/internal/active-memory/active-memory-cache.ts:66` | A second skip condition beside the existing one — hash of the store manifest, so an unchanged store skips even when the question changes. The query cache is not wrong; it answers a different question. |
254
+ | gap | where | what would close it |
255
+ | ------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
256
+ | ~~The default recall path has no selection at all~~ — **closed** in `721a311f` | `local-agent-send.ts:257-272` | Closed: lexical relevance + recency, capped. Measured end to end against the real model — a 67-entry store went from ~66K to **13,606 tokens on the wire**, and the answering fact is recalled whether it is the oldest or the newest entry. |
257
+ | The CLI's store is read whether or not the consumer opted in | `storage/memory-root.ts` — `claudeProjectMemoryDir(cwd)` is an unconditional entry in `memoryReadRoots` | A decision, not a fix: it is deliberate (_write one, read all_, so a consumer's existing memories are never orphaned) and it means a consumer who never opted into CLI interop still receives what the CLI accumulated in that project. Cheap while the cap holds; revisit if the cap is ever removed. |
258
+ | No retention of any kind — no TTL, prune, or decay | searched `ttl\|prune\|expire\|retention` across both packages: zero | A per-kind TTL plus a prune step in the sweep. Needs the kind vocabulary to mean something first (§ 2), which is why this orders before widening it. |
259
+ | Quarantine marks but does not constrain | `memory-file.ts:96`, `memory-provider.ts:48` | Implemented: three states, and `[unconfirmed]` on entries the store counted once. **Measured against the real model and it does not close the hole** — a planted memory alone is acted on 5/5, and beside a corroborated contradiction it is still asserted ~62% of runs (n=32). Marking influences the model; it does not constrain it. The guarantee is not available at this layer: blocking an uncorroborated entry would break the promise that a fact written once is recallable next session. |
260
+ | A planted memory can make the agent ACT | measured: `RELEASE_OVERRIDE.txt` created in 2 of 6 runs | Register the permission layer — `PermissionPlugin.create(new PermissionEngine(…))` — which blocks it every time. This is the half that IS closable at the tool boundary; the informational half above is not. Any deployment where the memory directory is writable by anything other than this agent needs it. |
261
+ | `description` is written as a copy of the body | `markdown-store.ts:205-211` — the _reader_ (`:174-177`) already handles a distinct description correctly | Stop writing one when nobody declared it. The role is a one-line recall aid; deriving it mechanically would be inferring the situation, which § 2's rule already forbids for `kind`. Absent is a valid state and the reader already falls back to the body. |
262
+ | The topic-name deriver filters English function words only | `memory-file.ts:73` | A store in another language keeps that language's function words in the slug and the index title — `de`, `do`, `para` survive, so the name is longer and noisier. **Never lossy:** collisions are caught by `resolveName` comparing text, not by the stopword list. Real stores here are bilingual, so this is a partial parity, not a complete one. Closes with a per-language list, or by not needing one. |
263
+ | The dream sweep never filters by kind before dedup | `dreaming/phases.ts:34` — `lightPhase` never reads `kind` | Partition by kind before `lightPhase`. Nothing is deleted today, but a consolidated note can blend two distinct entries, and the note is what search returns. |
264
+ | The dream sweep does not update the index | `dreaming/run.ts:53-96` writes `notes/` and never syncs | An `IndexManager.sync` after `writeConsolidatedNotes`. |
265
+ | Recall fires every turn, cached on query hash, not on store manifest | `internal/local-agent/local-agent-memory.ts:87`; `sdk-memory/internal/active-memory/active-memory-cache.ts:66` | A second skip condition beside the existing one — hash of the store manifest, so an unchanged store skips even when the question changes. The query cache is not wrong; it answers a different question. |