@pellux/goodvibes-sdk 1.1.0 → 1.3.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.
Files changed (139) hide show
  1. package/dist/contracts/artifacts/operator-contract.json +1416 -88
  2. package/dist/platform/companion/companion-chat-manager.d.ts +6 -12
  3. package/dist/platform/companion/companion-chat-manager.d.ts.map +1 -1
  4. package/dist/platform/companion/companion-chat-manager.js +8 -2
  5. package/dist/platform/config/index.d.ts +2 -1
  6. package/dist/platform/config/index.d.ts.map +1 -1
  7. package/dist/platform/config/index.js +1 -0
  8. package/dist/platform/config/manager.d.ts +35 -0
  9. package/dist/platform/config/manager.d.ts.map +1 -1
  10. package/dist/platform/config/manager.js +98 -2
  11. package/dist/platform/config/shared-config-tier.d.ts +51 -0
  12. package/dist/platform/config/shared-config-tier.d.ts.map +1 -0
  13. package/dist/platform/config/shared-config-tier.js +127 -0
  14. package/dist/platform/control-plane/method-catalog-runtime.d.ts.map +1 -1
  15. package/dist/platform/control-plane/method-catalog-runtime.js +95 -1
  16. package/dist/platform/control-plane/operator-contract-schemas-knowledge.d.ts.map +1 -1
  17. package/dist/platform/control-plane/operator-contract-schemas-knowledge.js +6 -1
  18. package/dist/platform/control-plane/operator-contract-schemas-runtime.d.ts +7 -0
  19. package/dist/platform/control-plane/operator-contract-schemas-runtime.d.ts.map +1 -1
  20. package/dist/platform/control-plane/operator-contract-schemas-runtime.js +40 -1
  21. package/dist/platform/daemon/facade-composition.d.ts.map +1 -1
  22. package/dist/platform/daemon/facade-composition.js +1 -0
  23. package/dist/platform/daemon/homeassistant-chat.d.ts +4 -1
  24. package/dist/platform/daemon/homeassistant-chat.d.ts.map +1 -1
  25. package/dist/platform/daemon/homeassistant-chat.js +1 -1
  26. package/dist/platform/daemon/http/homeassistant-routes.d.ts.map +1 -1
  27. package/dist/platform/daemon/http/homeassistant-routes.js +28 -2
  28. package/dist/platform/integrations/webhooks.d.ts +15 -0
  29. package/dist/platform/integrations/webhooks.d.ts.map +1 -1
  30. package/dist/platform/integrations/webhooks.js +18 -0
  31. package/dist/platform/knowledge/extraction-policy.d.ts +12 -1
  32. package/dist/platform/knowledge/extraction-policy.d.ts.map +1 -1
  33. package/dist/platform/knowledge/extraction-policy.js +19 -1
  34. package/dist/platform/knowledge/graphql-schema.d.ts +1 -1
  35. package/dist/platform/knowledge/graphql-schema.d.ts.map +1 -1
  36. package/dist/platform/knowledge/graphql-schema.js +5 -0
  37. package/dist/platform/knowledge/home-graph/index.d.ts.map +1 -1
  38. package/dist/platform/knowledge/home-graph/index.js +4 -0
  39. package/dist/platform/knowledge/home-graph/link.d.ts +2 -2
  40. package/dist/platform/knowledge/home-graph/link.d.ts.map +1 -1
  41. package/dist/platform/knowledge/home-graph/link.js +60 -9
  42. package/dist/platform/knowledge/home-graph/refinement.d.ts +14 -9
  43. package/dist/platform/knowledge/home-graph/refinement.d.ts.map +1 -1
  44. package/dist/platform/knowledge/home-graph/refinement.js +18 -3
  45. package/dist/platform/knowledge/home-graph/reset.js +21 -4
  46. package/dist/platform/knowledge/home-graph/service.d.ts +10 -11
  47. package/dist/platform/knowledge/home-graph/service.d.ts.map +1 -1
  48. package/dist/platform/knowledge/home-graph/triage.d.ts +103 -0
  49. package/dist/platform/knowledge/home-graph/triage.d.ts.map +1 -0
  50. package/dist/platform/knowledge/home-graph/triage.js +362 -0
  51. package/dist/platform/knowledge/home-graph/types.d.ts +15 -0
  52. package/dist/platform/knowledge/home-graph/types.d.ts.map +1 -1
  53. package/dist/platform/knowledge/knowledge-api.d.ts +6 -0
  54. package/dist/platform/knowledge/knowledge-api.d.ts.map +1 -1
  55. package/dist/platform/knowledge/knowledge-api.js +5 -0
  56. package/dist/platform/knowledge/knowledge-history-types.d.ts +56 -0
  57. package/dist/platform/knowledge/knowledge-history-types.d.ts.map +1 -0
  58. package/dist/platform/knowledge/knowledge-history-types.js +1 -0
  59. package/dist/platform/knowledge/packet.d.ts.map +1 -1
  60. package/dist/platform/knowledge/packet.js +27 -3
  61. package/dist/platform/knowledge/scope-records.js +4 -2
  62. package/dist/platform/knowledge/semantic/answer-gaps.d.ts +8 -0
  63. package/dist/platform/knowledge/semantic/answer-gaps.d.ts.map +1 -1
  64. package/dist/platform/knowledge/semantic/answer-gaps.js +26 -6
  65. package/dist/platform/knowledge/semantic/enrichment.d.ts.map +1 -1
  66. package/dist/platform/knowledge/semantic/enrichment.js +15 -13
  67. package/dist/platform/knowledge/semantic/graph-index.d.ts.map +1 -1
  68. package/dist/platform/knowledge/semantic/graph-index.js +3 -1
  69. package/dist/platform/knowledge/semantic/service.d.ts +7 -0
  70. package/dist/platform/knowledge/semantic/service.d.ts.map +1 -1
  71. package/dist/platform/knowledge/semantic/service.js +10 -1
  72. package/dist/platform/knowledge/service-node-admin.d.ts +46 -0
  73. package/dist/platform/knowledge/service-node-admin.d.ts.map +1 -0
  74. package/dist/platform/knowledge/service-node-admin.js +72 -0
  75. package/dist/platform/knowledge/service.d.ts +24 -20
  76. package/dist/platform/knowledge/service.d.ts.map +1 -1
  77. package/dist/platform/knowledge/service.js +23 -47
  78. package/dist/platform/knowledge/store-config.d.ts +34 -0
  79. package/dist/platform/knowledge/store-config.d.ts.map +1 -1
  80. package/dist/platform/knowledge/store-config.js +23 -0
  81. package/dist/platform/knowledge/store-load.d.ts +3 -1
  82. package/dist/platform/knowledge/store-load.d.ts.map +1 -1
  83. package/dist/platform/knowledge/store-load.js +3 -1
  84. package/dist/platform/knowledge/store-node-history.d.ts +49 -0
  85. package/dist/platform/knowledge/store-node-history.d.ts.map +1 -0
  86. package/dist/platform/knowledge/store-node-history.js +331 -0
  87. package/dist/platform/knowledge/store-record-delete.d.ts +25 -0
  88. package/dist/platform/knowledge/store-record-delete.d.ts.map +1 -0
  89. package/dist/platform/knowledge/store-record-delete.js +84 -0
  90. package/dist/platform/knowledge/store-schema.d.ts +3 -1
  91. package/dist/platform/knowledge/store-schema.d.ts.map +1 -1
  92. package/dist/platform/knowledge/store-schema.js +66 -0
  93. package/dist/platform/knowledge/store.d.ts +19 -1
  94. package/dist/platform/knowledge/store.d.ts.map +1 -1
  95. package/dist/platform/knowledge/store.js +69 -108
  96. package/dist/platform/knowledge/types.d.ts +18 -0
  97. package/dist/platform/knowledge/types.d.ts.map +1 -1
  98. package/dist/platform/providers/registry.d.ts +18 -0
  99. package/dist/platform/providers/registry.d.ts.map +1 -1
  100. package/dist/platform/providers/registry.js +49 -3
  101. package/dist/platform/providers/runtime-snapshot.d.ts.map +1 -1
  102. package/dist/platform/providers/runtime-snapshot.js +14 -2
  103. package/dist/platform/runtime/memory-spine/client.d.ts +137 -12
  104. package/dist/platform/runtime/memory-spine/client.d.ts.map +1 -1
  105. package/dist/platform/runtime/memory-spine/client.js +119 -1
  106. package/dist/platform/runtime/memory-spine/index.d.ts +8 -1
  107. package/dist/platform/runtime/memory-spine/index.d.ts.map +1 -1
  108. package/dist/platform/runtime/memory-spine/index.js +7 -0
  109. package/dist/platform/runtime/memory-spine/recall-snapshot.d.ts +74 -0
  110. package/dist/platform/runtime/memory-spine/recall-snapshot.d.ts.map +1 -0
  111. package/dist/platform/runtime/memory-spine/recall-snapshot.js +87 -0
  112. package/dist/platform/runtime/memory-spine/wire-verb-availability.d.ts +59 -0
  113. package/dist/platform/runtime/memory-spine/wire-verb-availability.d.ts.map +1 -0
  114. package/dist/platform/runtime/memory-spine/wire-verb-availability.js +114 -0
  115. package/dist/platform/runtime/services.d.ts.map +1 -1
  116. package/dist/platform/runtime/services.js +3 -12
  117. package/dist/platform/state/memory-recall-contract.d.ts +7 -0
  118. package/dist/platform/state/memory-recall-contract.d.ts.map +1 -1
  119. package/dist/platform/state/memory-recall-contract.js +2 -0
  120. package/dist/platform/utils/notify.d.ts +25 -1
  121. package/dist/platform/utils/notify.d.ts.map +1 -1
  122. package/dist/platform/utils/notify.js +29 -1
  123. package/dist/platform/version.js +1 -1
  124. package/dist/platform/voice/index.d.ts +2 -0
  125. package/dist/platform/voice/index.d.ts.map +1 -1
  126. package/dist/platform/voice/index.js +3 -0
  127. package/dist/platform/voice/spoken-turn/audio-sink.d.ts +111 -0
  128. package/dist/platform/voice/spoken-turn/audio-sink.d.ts.map +1 -0
  129. package/dist/platform/voice/spoken-turn/audio-sink.js +1 -0
  130. package/dist/platform/voice/spoken-turn/controller.d.ts +117 -0
  131. package/dist/platform/voice/spoken-turn/controller.d.ts.map +1 -0
  132. package/dist/platform/voice/spoken-turn/controller.js +448 -0
  133. package/dist/platform/voice/spoken-turn/index.d.ts +16 -0
  134. package/dist/platform/voice/spoken-turn/index.d.ts.map +1 -0
  135. package/dist/platform/voice/spoken-turn/index.js +12 -0
  136. package/dist/platform/voice/spoken-turn/text-chunker.d.ts +33 -0
  137. package/dist/platform/voice/spoken-turn/text-chunker.d.ts.map +1 -0
  138. package/dist/platform/voice/spoken-turn/text-chunker.js +97 -0
  139. package/package.json +9 -9
@@ -19,6 +19,14 @@
19
19
  * NEVER opens the file. Enforced structurally here — the active branch only ever
20
20
  * touches `this.transport`, never `this.local`.
21
21
  *
22
+ * FULL DETACH (SDK 1.2.0). The 1.1.0 wire family covered five verbs (add,
23
+ * honestSearch, get, updateReview, delete). That was enough for a surface to store
24
+ * and recall a fact over the wire, but NOT enough to fully detach every consumer
25
+ * from the store file: the agent's `list`/`update`/semantic-search paths and the
26
+ * TUI's `/recall` browse/link/queue/export paths still fell back to a local file.
27
+ * This client now exposes the FULL read/write catalog those consumers need
28
+ * (see MemoryExtendedAccess), so a wire client never opens the file for ANY of them.
29
+ *
22
30
  * ONE-WRITER ENFORCEMENT RULING. The platform's convention (see canonical-memory.ts
23
31
  * and the session spine) is honest sequential/owned access plus stated posture, NOT
24
32
  * an OS advisory lock — sql.js exposes no lock and a cross-process flock would be a
@@ -38,9 +46,19 @@
38
46
  * would be the exact dishonest-recall failure this whole design exists to prevent.
39
47
  * A sustained daemon loss is handled by `deactivate()`, which returns the surface
40
48
  * to owned-local mode explicitly.
49
+ *
50
+ * VERSION TOLERANCE. The five CORE verbs are required of every transport. The
51
+ * EXTENDED verbs are OPTIONAL on the transport (`MemoryTransport`) so a surface
52
+ * pinned to an older SDK/daemon pair that predates a verb still satisfies the type.
53
+ * When a client in wire mode calls an extended verb its adopted daemon does not
54
+ * implement, the call REJECTS with a stated reason — it never silently reaches into
55
+ * the local file, which would break the one-writer invariant and lie about which
56
+ * store answered.
41
57
  */
42
58
  import { logger } from '../../utils/logger.js';
43
- /** Wrap a local embedded store (e.g. a MemoryRegistry) as a MemoryAccess. */
59
+ import { buildRecallSnapshot, emptyRecallSnapshot, DEFAULT_RECALL_SNAPSHOT_STALE_AFTER_MS, } from './recall-snapshot.js';
60
+ import { memoryVerbUnavailableError } from './wire-verb-availability.js';
61
+ /** Wrap a local embedded store (e.g. a MemoryRegistry) as a full MemoryAccess. */
44
62
  export function createLocalMemoryAccess(store) {
45
63
  return {
46
64
  add: (opts) => Promise.resolve(store.add(opts)),
@@ -48,6 +66,16 @@ export function createLocalMemoryAccess(store) {
48
66
  get: (id) => Promise.resolve(store.get(id)),
49
67
  updateReview: (id, patch) => Promise.resolve(store.review(id, patch)),
50
68
  delete: (id) => Promise.resolve(store.delete(id)),
69
+ list: (filter) => Promise.resolve(store.search(filter ?? {})),
70
+ searchSemantic: (filter) => Promise.resolve(store.searchSemantic(filter ?? {})),
71
+ update: (id, patch) => Promise.resolve(store.update(id, patch)),
72
+ link: (fromId, toId, relation) => Promise.resolve(store.link(fromId, toId, relation)),
73
+ linksFor: (id) => Promise.resolve(store.linksFor(id)),
74
+ reviewQueue: (limit, scope) => Promise.resolve(store.reviewQueue(limit, scope)),
75
+ exportBundle: (filter) => Promise.resolve(store.exportBundle(filter ?? {})),
76
+ importBundle: (bundle) => Promise.resolve(store.importBundle(bundle)),
77
+ vectorStats: () => Promise.resolve(store.vectorStats()),
78
+ doctor: () => Promise.resolve(store.doctor()),
51
79
  };
52
80
  }
53
81
  /**
@@ -59,10 +87,14 @@ export class MemorySpineClient {
59
87
  local;
60
88
  transport;
61
89
  log;
90
+ staleAfterMs;
91
+ /** Last recall snapshot captured by refreshRecallSnapshot(); null until first refresh. */
92
+ snapshot = null;
62
93
  constructor(options) {
63
94
  this.local = options.local;
64
95
  this.transport = options.transport ?? null;
65
96
  this.log = options.log ?? logger;
97
+ this.staleAfterMs = options.recallSnapshotStaleAfterMs ?? DEFAULT_RECALL_SNAPSHOT_STALE_AFTER_MS;
66
98
  }
67
99
  /** The current posture: 'client' when routing over the wire, 'local' otherwise. */
68
100
  mode() {
@@ -88,6 +120,7 @@ export class MemorySpineClient {
88
120
  this.transport = null;
89
121
  this.log.info('memory spine deactivated — reverting to owned-local memory access', { reason });
90
122
  }
123
+ // ── Core verbs (routed local-or-wire) ─────────────────────────────────────────
91
124
  add(opts) {
92
125
  return this.route().add(opts);
93
126
  }
@@ -103,6 +136,64 @@ export class MemorySpineClient {
103
136
  delete(id) {
104
137
  return this.route().delete(id);
105
138
  }
139
+ // ── Extended verbs (routed local-or-wire; honest reject if the daemon lacks one) ─
140
+ list(filter) {
141
+ return this.routeExtended('list', (a) => a.list(filter), (t) => t.list?.(filter));
142
+ }
143
+ searchSemantic(filter) {
144
+ return this.routeExtended('searchSemantic', (a) => a.searchSemantic(filter), (t) => t.searchSemantic?.(filter));
145
+ }
146
+ update(id, patch) {
147
+ return this.routeExtended('update', (a) => a.update(id, patch), (t) => t.update?.(id, patch));
148
+ }
149
+ link(fromId, toId, relation) {
150
+ return this.routeExtended('link', (a) => a.link(fromId, toId, relation), (t) => t.link?.(fromId, toId, relation));
151
+ }
152
+ linksFor(id) {
153
+ return this.routeExtended('linksFor', (a) => a.linksFor(id), (t) => t.linksFor?.(id));
154
+ }
155
+ reviewQueue(limit, scope) {
156
+ return this.routeExtended('reviewQueue', (a) => a.reviewQueue(limit, scope), (t) => t.reviewQueue?.(limit, scope));
157
+ }
158
+ exportBundle(filter) {
159
+ return this.routeExtended('exportBundle', (a) => a.exportBundle(filter), (t) => t.exportBundle?.(filter));
160
+ }
161
+ importBundle(bundle) {
162
+ return this.routeExtended('importBundle', (a) => a.importBundle(bundle), (t) => t.importBundle?.(bundle));
163
+ }
164
+ vectorStats() {
165
+ return this.routeExtended('vectorStats', (a) => a.vectorStats(), (t) => t.vectorStats?.());
166
+ }
167
+ doctor() {
168
+ return this.routeExtended('doctor', (a) => a.doctor(), (t) => t.doctor?.());
169
+ }
170
+ // ── The sync-recall seam ──────────────────────────────────────────────────────
171
+ /**
172
+ * Refresh the cached recall snapshot ASYNCHRONOUSLY over the CURRENT route (wire
173
+ * when adopted, local otherwise). Call this from an async pre-turn hook so a
174
+ * SYNCHRONOUS prompt builder can read the result via {@link recallSnapshot}
175
+ * without awaiting the wire. Runs the honest recall search (recall-injection
176
+ * contract ON by default), stamps the capture time and mode, and stores it.
177
+ */
178
+ async refreshRecallSnapshot(filter = {}, options = {}) {
179
+ const recall = options.recall ?? true;
180
+ const result = await this.route().honestSearch(filter, { recall });
181
+ this.snapshot = buildRecallSnapshot(result, this.mode(), Date.now(), this.staleAfterMs);
182
+ return this.snapshot;
183
+ }
184
+ /**
185
+ * Read the last recall snapshot SYNCHRONOUSLY (for a sync prompt builder). Never
186
+ * opens the file and never awaits: it returns whatever the last async refresh
187
+ * captured, with a freshly-computed age, a `stale` flag, and an HONEST `note`. If
188
+ * no refresh has happened yet it returns an EMPTY snapshot whose note says exactly
189
+ * that — never a silent empty that reads as "nothing was ever stored."
190
+ */
191
+ recallSnapshot(now = Date.now()) {
192
+ const cached = this.snapshot;
193
+ if (cached === null || cached.search === null || cached.capturedAt === null)
194
+ return emptyRecallSnapshot(this.mode());
195
+ return buildRecallSnapshot(cached.search, cached.mode, cached.capturedAt, this.staleAfterMs, now);
196
+ }
106
197
  /**
107
198
  * The single choke point that realizes the one-writer invariant: in client mode
108
199
  * EVERY op resolves through the transport and the local store is never reached.
@@ -110,4 +201,31 @@ export class MemorySpineClient {
110
201
  route() {
111
202
  return this.transport ?? this.local;
112
203
  }
204
+ /**
205
+ * Route an extended verb. Local mode → the local store. Client mode → the
206
+ * transport's verb if it implements it, otherwise an HONEST rejection stating the
207
+ * adopted daemon does not support it (never a silent local-file read, which would
208
+ * break the single-writer invariant and misreport which store answered).
209
+ *
210
+ * TWO honesty layers, both landing on the same {@link memoryVerbUnavailableError}
211
+ * message:
212
+ * 1. COMPILE-TIME omission (here): a transport object that literally does not
213
+ * implement the verb (`call === undefined`) — a surface pinned to an adapter
214
+ * that predates the verb. Rejects immediately.
215
+ * 2. RUNTIME signal (the transports): a transport that DOES implement the verb but
216
+ * whose adopted daemon route answers a route-not-found 404 folds that 404
217
+ * through `foldMemoryWireExtendedError` in its own catch and rejects with the
218
+ * same message. That path — not this one — is what a live older daemon
219
+ * actually produces; this branch alone never sees it, because a real transport
220
+ * supplies a concrete function for every verb.
221
+ */
222
+ routeExtended(verb, local, wire) {
223
+ if (this.transport === null)
224
+ return local(this.local);
225
+ const call = wire(this.transport);
226
+ if (call === undefined) {
227
+ return Promise.reject(memoryVerbUnavailableError(verb));
228
+ }
229
+ return call;
230
+ }
113
231
  }
@@ -6,6 +6,13 @@
6
6
  * directly; a surface that has adopted a compatible daemon routes memory THROUGH
7
7
  * the wire and never opens the store file. Mirrors the session-spine pattern; the
8
8
  * offline fallback stays, so the agent and TUI keep working with no daemon running.
9
+ *
10
+ * As of 1.2.0 the client exposes the FULL read/write catalog (see
11
+ * MemoryExtendedAccess) so a wire client fully detaches from the file, plus a
12
+ * freshness-stamped recall snapshot (recall-snapshot.ts) for the synchronous
13
+ * per-turn prompt-injection seam.
9
14
  */
10
- export { MemorySpineClient, createLocalMemoryAccess, type MemoryAccess, type MemoryAccessMode, type MemoryTransport, type LocalMemoryStore, type MemorySpineClientOptions, } from './client.js';
15
+ export { MemorySpineClient, createLocalMemoryAccess, type MemoryAccess, type MemoryCoreAccess, type MemoryExtendedAccess, type MemoryAccessMode, type MemoryTransport, type MemoryUpdatePatch, type LocalMemoryStore, type MemorySpineClientOptions, type MemoryRecallSnapshot, type MemoryRecallRefreshOptions, } from './client.js';
16
+ export { buildRecallSnapshot, emptyRecallSnapshot, DEFAULT_RECALL_SNAPSHOT_STALE_AFTER_MS, } from './recall-snapshot.js';
17
+ export { classifyMemoryWireError, memoryVerbUnavailableError, foldMemoryWireExtendedError, type MemoryWire404Disposition, } from './wire-verb-availability.js';
11
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/platform/runtime/memory-spine/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EACvB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,GAC9B,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/platform/runtime/memory-spine/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EACvB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,0BAA0B,GAChC,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,sCAAsC,GACvC,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,2BAA2B,EAC3B,KAAK,wBAAwB,GAC9B,MAAM,6BAA6B,CAAC"}
@@ -6,5 +6,12 @@
6
6
  * directly; a surface that has adopted a compatible daemon routes memory THROUGH
7
7
  * the wire and never opens the store file. Mirrors the session-spine pattern; the
8
8
  * offline fallback stays, so the agent and TUI keep working with no daemon running.
9
+ *
10
+ * As of 1.2.0 the client exposes the FULL read/write catalog (see
11
+ * MemoryExtendedAccess) so a wire client fully detaches from the file, plus a
12
+ * freshness-stamped recall snapshot (recall-snapshot.ts) for the synchronous
13
+ * per-turn prompt-injection seam.
9
14
  */
10
15
  export { MemorySpineClient, createLocalMemoryAccess, } from './client.js';
16
+ export { buildRecallSnapshot, emptyRecallSnapshot, DEFAULT_RECALL_SNAPSHOT_STALE_AFTER_MS, } from './recall-snapshot.js';
17
+ export { classifyMemoryWireError, memoryVerbUnavailableError, foldMemoryWireExtendedError, } from './wire-verb-availability.js';
@@ -0,0 +1,74 @@
1
+ /**
2
+ * recall-snapshot.ts — the sync-recall seam for the memory spine.
3
+ *
4
+ * THE PROBLEM. Per-turn memory recall wants to inject the recall-eligible records
5
+ * into the system prompt. But the prompt builder is SYNCHRONOUS
6
+ * (`Orchestrator.getSystemPrompt()` returns a string, not a promise), while a wire
7
+ * client's memory reads are ASYNCHRONOUS (a fetch to the adopted daemon). A sync
8
+ * function cannot await a wire read, so it cannot pull fresh memory over the wire
9
+ * inline.
10
+ *
11
+ * THE DESIGN (cached snapshot, freshness-stamped, honest staleness note). Rather
12
+ * than make the whole prompt path async (a large, cross-consumer refactor) or open
13
+ * the store file from a wire client (which would break the single-writer invariant),
14
+ * the spine maintains a CACHED recall snapshot:
15
+ *
16
+ * 1. an ASYNC pre-turn hook calls `MemorySpineClient.refreshRecallSnapshot()` —
17
+ * this awaits the wire (or local) honest recall search and stamps the result
18
+ * with a capture time and the access mode it came from;
19
+ * 2. the SYNC prompt builder calls `MemorySpineClient.recallSnapshot()` — this
20
+ * returns the cached records immediately, with a freshly-computed age, a
21
+ * `stale` flag, and a human-readable `note`.
22
+ *
23
+ * HONESTY. The snapshot never lies about its own freshness. If it has never been
24
+ * refreshed, it returns an EMPTY snapshot whose note says exactly that — never a
25
+ * silent empty that a reader would misread as "nothing was ever stored". If the last
26
+ * refresh is older than the staleness window, `stale` is true and the note says so,
27
+ * so an injector can choose to note the staleness in the prompt rather than present
28
+ * possibly-old memory as live. The `mode` records WHERE the snapshot was captured
29
+ * (local host store vs the adopted daemon over the wire), so the note never implies
30
+ * a wire read happened when it did not.
31
+ */
32
+ import type { MemoryRecord } from '../../state/memory-store.js';
33
+ import type { HonestMemorySearchResult } from '../../state/memory-recall-contract.js';
34
+ import type { MemoryAccessMode } from './client.js';
35
+ /** Default freshness window: a snapshot older than this reports `stale: true`. */
36
+ export declare const DEFAULT_RECALL_SNAPSHOT_STALE_AFTER_MS = 30000;
37
+ export interface MemoryRecallRefreshOptions {
38
+ /**
39
+ * Apply the recall-injection contract when refreshing (exclude flagged records and
40
+ * drop sub-floor records, each exclusion counted). Defaults to TRUE — the snapshot
41
+ * exists for prompt injection, which must honor the recall floor. Pass false to
42
+ * capture an unfiltered browse set instead.
43
+ */
44
+ readonly recall?: boolean | undefined;
45
+ }
46
+ /**
47
+ * A freshness-stamped, synchronously-readable recall result. `records` is what a
48
+ * sync prompt builder injects; the rest is the honest receipt.
49
+ */
50
+ export interface MemoryRecallSnapshot {
51
+ /** The recall-eligible records captured by the last refresh (empty until first refresh). */
52
+ readonly records: readonly MemoryRecord[];
53
+ /** The full honest search envelope the records came from (null until first refresh). */
54
+ readonly search: HonestMemorySearchResult | null;
55
+ /** When the snapshot was captured (epoch ms), or null if never refreshed. */
56
+ readonly capturedAt: number | null;
57
+ /** Age of the snapshot in ms at read time, or null if never refreshed. */
58
+ readonly ageMs: number | null;
59
+ /** True when the snapshot is older than the staleness window (or never captured). */
60
+ readonly stale: boolean;
61
+ /** Where the snapshot was captured from — 'client' (over the wire) or 'local'. */
62
+ readonly mode: MemoryAccessMode;
63
+ /** An honest, human-readable freshness/degradation note — never silent. */
64
+ readonly note: string;
65
+ }
66
+ /** The snapshot returned before any refresh has happened — empty, and it says so. */
67
+ export declare function emptyRecallSnapshot(mode: MemoryAccessMode): MemoryRecallSnapshot;
68
+ /**
69
+ * Build a snapshot from an honest search envelope captured at `capturedAt`, with age
70
+ * and staleness computed against `now`. The `note` states the source, the age, and
71
+ * — when stale — that the records may be out of date.
72
+ */
73
+ export declare function buildRecallSnapshot(search: HonestMemorySearchResult, mode: MemoryAccessMode, capturedAt: number, staleAfterMs: number, now?: number): MemoryRecallSnapshot;
74
+ //# sourceMappingURL=recall-snapshot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recall-snapshot.d.ts","sourceRoot":"","sources":["../../../../src/platform/runtime/memory-spine/recall-snapshot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACtF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,kFAAkF;AAClF,eAAO,MAAM,sCAAsC,QAAS,CAAC;AAE7D,MAAM,WAAW,0BAA0B;IACzC;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACvC;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,4FAA4F;IAC5F,QAAQ,CAAC,OAAO,EAAE,SAAS,YAAY,EAAE,CAAC;IAC1C,wFAAwF;IACxF,QAAQ,CAAC,MAAM,EAAE,wBAAwB,GAAG,IAAI,CAAC;IACjD,6EAA6E;IAC7E,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,0EAA0E;IAC1E,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,qFAAqF;IACrF,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,kFAAkF;IAClF,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,2EAA2E;IAC3E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAID,qFAAqF;AACrF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,gBAAgB,GAAG,oBAAoB,CAWhF;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,wBAAwB,EAChC,IAAI,EAAE,gBAAgB,EACtB,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EACpB,GAAG,GAAE,MAAmB,GACvB,oBAAoB,CAkCtB"}
@@ -0,0 +1,87 @@
1
+ /**
2
+ * recall-snapshot.ts — the sync-recall seam for the memory spine.
3
+ *
4
+ * THE PROBLEM. Per-turn memory recall wants to inject the recall-eligible records
5
+ * into the system prompt. But the prompt builder is SYNCHRONOUS
6
+ * (`Orchestrator.getSystemPrompt()` returns a string, not a promise), while a wire
7
+ * client's memory reads are ASYNCHRONOUS (a fetch to the adopted daemon). A sync
8
+ * function cannot await a wire read, so it cannot pull fresh memory over the wire
9
+ * inline.
10
+ *
11
+ * THE DESIGN (cached snapshot, freshness-stamped, honest staleness note). Rather
12
+ * than make the whole prompt path async (a large, cross-consumer refactor) or open
13
+ * the store file from a wire client (which would break the single-writer invariant),
14
+ * the spine maintains a CACHED recall snapshot:
15
+ *
16
+ * 1. an ASYNC pre-turn hook calls `MemorySpineClient.refreshRecallSnapshot()` —
17
+ * this awaits the wire (or local) honest recall search and stamps the result
18
+ * with a capture time and the access mode it came from;
19
+ * 2. the SYNC prompt builder calls `MemorySpineClient.recallSnapshot()` — this
20
+ * returns the cached records immediately, with a freshly-computed age, a
21
+ * `stale` flag, and a human-readable `note`.
22
+ *
23
+ * HONESTY. The snapshot never lies about its own freshness. If it has never been
24
+ * refreshed, it returns an EMPTY snapshot whose note says exactly that — never a
25
+ * silent empty that a reader would misread as "nothing was ever stored". If the last
26
+ * refresh is older than the staleness window, `stale` is true and the note says so,
27
+ * so an injector can choose to note the staleness in the prompt rather than present
28
+ * possibly-old memory as live. The `mode` records WHERE the snapshot was captured
29
+ * (local host store vs the adopted daemon over the wire), so the note never implies
30
+ * a wire read happened when it did not.
31
+ */
32
+ /** Default freshness window: a snapshot older than this reports `stale: true`. */
33
+ export const DEFAULT_RECALL_SNAPSHOT_STALE_AFTER_MS = 30_000;
34
+ const EMPTY_SEARCH_RECORDS = Object.freeze([]);
35
+ /** The snapshot returned before any refresh has happened — empty, and it says so. */
36
+ export function emptyRecallSnapshot(mode) {
37
+ return {
38
+ records: EMPTY_SEARCH_RECORDS,
39
+ search: null,
40
+ capturedAt: null,
41
+ ageMs: null,
42
+ stale: true,
43
+ mode,
44
+ note: 'memory recall snapshot not yet captured — no memory injected this turn. '
45
+ + 'Call refreshRecallSnapshot() in an async pre-turn hook before the synchronous prompt build.',
46
+ };
47
+ }
48
+ /**
49
+ * Build a snapshot from an honest search envelope captured at `capturedAt`, with age
50
+ * and staleness computed against `now`. The `note` states the source, the age, and
51
+ * — when stale — that the records may be out of date.
52
+ */
53
+ export function buildRecallSnapshot(search, mode, capturedAt, staleAfterMs, now = Date.now()) {
54
+ const ageMs = Math.max(0, now - capturedAt);
55
+ const stale = ageMs > staleAfterMs;
56
+ const source = mode === 'client' ? 'over the wire from the adopted daemon' : 'from the local store';
57
+ // Humanized age, matching the TUI's established freshness vocabulary
58
+ // (session-picker-modal.ts: "may be stale, last synced Ns ago"): lowercase, a
59
+ // hedged "may be stale", and whole seconds — never raw milliseconds a reader
60
+ // cannot comfortably read.
61
+ const ageSeconds = Math.max(0, Math.round(ageMs / 1000));
62
+ const staleAfterSeconds = Math.max(0, Math.round(staleAfterMs / 1000));
63
+ const freshness = stale
64
+ ? `may be stale — captured ${ageSeconds}s ago (older than the ${staleAfterSeconds}s freshness window); a refresh is due`
65
+ : `captured ${ageSeconds}s ago`;
66
+ // Honest count clause: the snapshot's own recall flag decides what its count
67
+ // means. Only a recall-filtered capture (flagged + sub-floor records dropped)
68
+ // holds a "recall-eligible" count; an unfiltered browse capture holds the raw
69
+ // browse-set count and must NOT be labeled recall-eligible.
70
+ const countClause = search.recallFiltered
71
+ ? `${search.records.length} record(s) recall-eligible`
72
+ : `${search.records.length} record(s) in the browse set (unfiltered — recall floor not applied)`;
73
+ const degraded = search.indexUnavailableReason
74
+ ? ` Recall degraded to a literal scan: ${search.indexUnavailableReason}.`
75
+ : '';
76
+ const caveat = search.caveat ? ` ${search.caveat}.` : '';
77
+ return {
78
+ records: search.records,
79
+ search,
80
+ capturedAt,
81
+ ageMs,
82
+ stale,
83
+ mode,
84
+ note: `memory recall snapshot ${source}, ${freshness}; ${countClause}.`
85
+ + degraded + caveat,
86
+ };
87
+ }
@@ -0,0 +1,59 @@
1
+ /**
2
+ * wire-verb-availability.ts — the runtime discriminator that lets a memory wire
3
+ * consumer tell "no such record" apart from "this daemon does not serve this verb".
4
+ *
5
+ * THE PROBLEM THIS SOLVES. A newer consumer may talk to an OLDER daemon that never
6
+ * registered an extended memory route (list / update / links / search-semantic /
7
+ * export …). Calling such a route hits the daemon's terminal route-not-found 404.
8
+ * A record-scoped verb (update / link) against a CURRENT daemon can ALSO 404 — when
9
+ * the addressed record genuinely does not exist. Both are HTTP 404, so a consumer
10
+ * that inspects only the status folds BOTH to `null` and then reports an existing
11
+ * record as "not found" against an older daemon — a silent data lie on the exact
12
+ * version-skew path the wire feature advertises as supported.
13
+ *
14
+ * THE RUNTIME SIGNAL. The daemon already distinguishes the two in the response BODY:
15
+ * a genuine record-miss carries `code: MEMORY_RECORD_NOT_FOUND_CODE`
16
+ * (daemon-sdk's memory handlers), while a route-not-found carries the terminal
17
+ * 404's `code: 'NOT_FOUND'`. So the disposition is read from the body code, NOT the
18
+ * transport object's shape:
19
+ * - 404 + record-missing code → 'record-missing' (safe to fold to null)
20
+ * - 404 + any OTHER code, or NO code → 'method-unavailable' (honest reject)
21
+ * - anything that is not a 404 → 'other' (propagate unchanged)
22
+ *
23
+ * THE LEGACY-404 RULING. A pre-error-unification daemon may answer a bare 404 with
24
+ * no structured code at all. That 404 is ambiguous — it could be either case — and
25
+ * we deliberately treat it as 'method-unavailable', NOT 'record-missing'. A loud
26
+ * wrong ("this daemon does not serve X" when the record was in fact simply absent)
27
+ * is recoverable and honest; a silent wrong (reporting an existing record as gone)
28
+ * is the exact dishonest-recall failure this whole design exists to prevent. Never
29
+ * silently null on an ambiguous 404.
30
+ */
31
+ /** How a caught wire error should be treated by an extended-verb call site. */
32
+ export type MemoryWire404Disposition = 'record-missing' | 'method-unavailable' | 'other';
33
+ /**
34
+ * Classify a caught memory wire error. Returns 'other' for anything that is not a
35
+ * 404 (network, auth, malformed body, 5xx) so the caller propagates it unchanged.
36
+ */
37
+ export declare function classifyMemoryWireError(error: unknown): MemoryWire404Disposition;
38
+ /**
39
+ * The single canonical "the adopted daemon does not serve this verb" rejection.
40
+ * Every consumer (the SDK client's own fallback plus each wire transport) throws
41
+ * THIS so the surfaced message is identical everywhere.
42
+ */
43
+ export declare function memoryVerbUnavailableError(verb: string, cause?: unknown): Error;
44
+ /**
45
+ * The fold a transport's extended-verb catch block runs. Given the caught wire
46
+ * error:
47
+ * - 'method-unavailable' → throw {@link memoryVerbUnavailableError} (the older
48
+ * daemon never served this route — a loud, honest reject);
49
+ * - 'record-missing' → return normally (the caller decides what a genuine
50
+ * record-miss means for its return type: `null` for a nullable verb, or a
51
+ * rethrow for a non-nullable one);
52
+ * - 'other' → rethrow the original error unchanged.
53
+ *
54
+ * A nullable record-scoped verb uses it as `foldMemoryWireExtendedError(v, e); return null;`
55
+ * — the fold throws for the version-skew case and only falls through to `null`
56
+ * for a genuine record-miss.
57
+ */
58
+ export declare function foldMemoryWireExtendedError(verb: string, error: unknown): void;
59
+ //# sourceMappingURL=wire-verb-availability.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wire-verb-availability.d.ts","sourceRoot":"","sources":["../../../../src/platform/runtime/memory-spine/wire-verb-availability.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAIH,+EAA+E;AAC/E,MAAM,MAAM,wBAAwB,GAAG,gBAAgB,GAAG,oBAAoB,GAAG,OAAO,CAAC;AA2DzF;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,wBAAwB,CAIhF;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,CAQ/E;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAK9E"}
@@ -0,0 +1,114 @@
1
+ /**
2
+ * wire-verb-availability.ts — the runtime discriminator that lets a memory wire
3
+ * consumer tell "no such record" apart from "this daemon does not serve this verb".
4
+ *
5
+ * THE PROBLEM THIS SOLVES. A newer consumer may talk to an OLDER daemon that never
6
+ * registered an extended memory route (list / update / links / search-semantic /
7
+ * export …). Calling such a route hits the daemon's terminal route-not-found 404.
8
+ * A record-scoped verb (update / link) against a CURRENT daemon can ALSO 404 — when
9
+ * the addressed record genuinely does not exist. Both are HTTP 404, so a consumer
10
+ * that inspects only the status folds BOTH to `null` and then reports an existing
11
+ * record as "not found" against an older daemon — a silent data lie on the exact
12
+ * version-skew path the wire feature advertises as supported.
13
+ *
14
+ * THE RUNTIME SIGNAL. The daemon already distinguishes the two in the response BODY:
15
+ * a genuine record-miss carries `code: MEMORY_RECORD_NOT_FOUND_CODE`
16
+ * (daemon-sdk's memory handlers), while a route-not-found carries the terminal
17
+ * 404's `code: 'NOT_FOUND'`. So the disposition is read from the body code, NOT the
18
+ * transport object's shape:
19
+ * - 404 + record-missing code → 'record-missing' (safe to fold to null)
20
+ * - 404 + any OTHER code, or NO code → 'method-unavailable' (honest reject)
21
+ * - anything that is not a 404 → 'other' (propagate unchanged)
22
+ *
23
+ * THE LEGACY-404 RULING. A pre-error-unification daemon may answer a bare 404 with
24
+ * no structured code at all. That 404 is ambiguous — it could be either case — and
25
+ * we deliberately treat it as 'method-unavailable', NOT 'record-missing'. A loud
26
+ * wrong ("this daemon does not serve X" when the record was in fact simply absent)
27
+ * is recoverable and honest; a silent wrong (reporting an existing record as gone)
28
+ * is the exact dishonest-recall failure this whole design exists to prevent. Never
29
+ * silently null on an ambiguous 404.
30
+ */
31
+ import { MEMORY_RECORD_NOT_FOUND_CODE } from '@pellux/goodvibes-errors';
32
+ function readNumber(value) {
33
+ return typeof value === 'number' && Number.isFinite(value) ? value : undefined;
34
+ }
35
+ function readString(value) {
36
+ return typeof value === 'string' && value.length > 0 ? value : undefined;
37
+ }
38
+ function readBodyCode(body) {
39
+ return body !== null && typeof body === 'object'
40
+ ? readString(body.code)
41
+ : undefined;
42
+ }
43
+ /**
44
+ * Pull the (status, code) signal out of any of the error shapes the three memory
45
+ * transports actually throw:
46
+ * - an SDK `HttpStatusError` (TUI transport via `createTransportError`): `.status`
47
+ * + `.code`, with a `.transport.body.code` fallback;
48
+ * - an error carrying an explicit `.status`/`.code` (the agent transport stamps
49
+ * these onto its thrown error) or a `.body.code`;
50
+ * - a bare `Error` whose message embeds `HTTP <status>` (a legacy/hand-rolled
51
+ * transport) — status parsed out, code absent.
52
+ */
53
+ function extractWire404Signal(error) {
54
+ if (error === null || typeof error !== 'object') {
55
+ return { status: undefined, code: undefined };
56
+ }
57
+ const record = error;
58
+ const status = readNumber(record.status)
59
+ ?? readNumber(record.transport?.status)
60
+ ?? parseStatusFromMessage(record.message);
61
+ const code = readString(record.code)
62
+ ?? readBodyCode(record.transport?.body)
63
+ ?? readBodyCode(record.body);
64
+ return { status, code };
65
+ }
66
+ function parseStatusFromMessage(message) {
67
+ if (typeof message !== 'string')
68
+ return undefined;
69
+ const match = message.match(/\bHTTP (\d{3})\b/);
70
+ return match ? Number(match[1]) : undefined;
71
+ }
72
+ /**
73
+ * Classify a caught memory wire error. Returns 'other' for anything that is not a
74
+ * 404 (network, auth, malformed body, 5xx) so the caller propagates it unchanged.
75
+ */
76
+ export function classifyMemoryWireError(error) {
77
+ const { status, code } = extractWire404Signal(error);
78
+ if (status !== 404)
79
+ return 'other';
80
+ return code === MEMORY_RECORD_NOT_FOUND_CODE ? 'record-missing' : 'method-unavailable';
81
+ }
82
+ /**
83
+ * The single canonical "the adopted daemon does not serve this verb" rejection.
84
+ * Every consumer (the SDK client's own fallback plus each wire transport) throws
85
+ * THIS so the surfaced message is identical everywhere.
86
+ */
87
+ export function memoryVerbUnavailableError(verb, cause) {
88
+ return new Error(`memory spine: the adopted daemon does not support the '${verb}' memory verb over the wire — `
89
+ + 'upgrade the daemon to a build that serves it, or run this surface offline (no daemon adopted). '
90
+ + 'A wire client will not read its own local store for this op, because that would break the '
91
+ + 'single-writer invariant and report a divergent local copy as if it were the canonical store.', cause === undefined ? undefined : { cause });
92
+ }
93
+ /**
94
+ * The fold a transport's extended-verb catch block runs. Given the caught wire
95
+ * error:
96
+ * - 'method-unavailable' → throw {@link memoryVerbUnavailableError} (the older
97
+ * daemon never served this route — a loud, honest reject);
98
+ * - 'record-missing' → return normally (the caller decides what a genuine
99
+ * record-miss means for its return type: `null` for a nullable verb, or a
100
+ * rethrow for a non-nullable one);
101
+ * - 'other' → rethrow the original error unchanged.
102
+ *
103
+ * A nullable record-scoped verb uses it as `foldMemoryWireExtendedError(v, e); return null;`
104
+ * — the fold throws for the version-skew case and only falls through to `null`
105
+ * for a genuine record-miss.
106
+ */
107
+ export function foldMemoryWireExtendedError(verb, error) {
108
+ const disposition = classifyMemoryWireError(error);
109
+ if (disposition === 'method-unavailable')
110
+ throw memoryVerbUnavailableError(verb, error);
111
+ if (disposition === 'other')
112
+ throw error;
113
+ // 'record-missing' → fall through; the caller resolves it for its own return type.
114
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../../src/platform/runtime/services.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BA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AC,eAAe,EAAE,eAAe,CAAC;IAC1C,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAC5C,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IAC1C,QAAQ,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IAChD,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IAC1C,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IAC1C,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAC9C,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IACxC;;;;;;;;OAQG;IACH,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;IAClD,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IACxC;;;;;;;;;OASG;IACH,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IAC1C,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IAC1C,QAAQ,CAAC,0BAA0B,EAAE,0BAA0B,CAAC;IAChE,QAAQ,CAAC,kBAAkB,EAAE,wBAAwB,CAAC;IACtD;;;;;;;;;;;;;;;;;OAiBG;IACH,YAAY,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACpD;AAED,wBAAgB,gCAAgC,CAC9C,YAAY,EAAE,IAAI,CAAC,kBAAkB,EAAE,WAAW,GAAG,WAAW,CAAC,EACjE,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,EAAE,YAAY,CAAC,GACvD,MAAM,IAAI,CAOZ;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,sBAAsB,GAAG,eAAe,CAyjBtF"}
@@ -286,18 +286,9 @@ export function createRuntimeServices(options) {
286
286
  return record.id;
287
287
  },
288
288
  });
289
- const knowledgeStore = new KnowledgeStore({
290
- configManager,
291
- dbFileName: REGULAR_KNOWLEDGE_DB_FILE,
292
- });
293
- const agentKnowledgeStore = new KnowledgeStore({
294
- configManager,
295
- dbFileName: GOODVIBES_AGENT_KNOWLEDGE_DB_FILE,
296
- });
297
- const homeGraphKnowledgeStore = new KnowledgeStore({
298
- configManager,
299
- dbFileName: HOME_GRAPH_KNOWLEDGE_DB_FILE,
300
- });
289
+ const knowledgeStore = new KnowledgeStore({ configManager, dbFileName: REGULAR_KNOWLEDGE_DB_FILE, family: 'wiki' });
290
+ const agentKnowledgeStore = new KnowledgeStore({ configManager, dbFileName: GOODVIBES_AGENT_KNOWLEDGE_DB_FILE, family: 'agent' });
291
+ const homeGraphKnowledgeStore = new KnowledgeStore({ configManager, dbFileName: HOME_GRAPH_KNOWLEDGE_DB_FILE, family: 'home-graph' });
301
292
  const knowledgeSemanticLlm = createProviderBackedKnowledgeSemanticLlm(providerRegistry, {
302
293
  timeoutMs: 20_000,
303
294
  maxConcurrent: 1,
@@ -101,6 +101,13 @@ export interface HonestMemorySearchResult {
101
101
  readonly excludedBelowFloorCount: number;
102
102
  /** Result count BEFORE any recall-injection filtering — so a caller can tell "index empty" from "everything filtered out". */
103
103
  readonly totalBeforeRecallFilter: number;
104
+ /**
105
+ * The store's configured recall confidence floor (MIN_PROMPT_MEMORY_CONFIDENCE)
106
+ * this result was judged against — carried on the wire so a surface can state
107
+ * the floor in a label ("below the N% recall floor") without hardcoding it and
108
+ * silently drifting if the store's floor is retuned.
109
+ */
110
+ readonly recallFloor: number;
104
111
  }
105
112
  /**
106
113
  * Run a search that HONORS the recall-honesty contract end to end:
@@ -1 +1 @@
1
- {"version":3,"file":"memory-recall-contract.d.ts","sourceRoot":"","sources":["../../../src/platform/state/memory-recall-contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AACtG,OAAO,KAAK,EAAE,iBA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