@psiclawops/hypermem 0.8.4 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/INSTALL.md +203 -23
- package/README.md +139 -216
- package/bench/README.md +42 -0
- package/bench/data-access-bench.mjs +380 -0
- package/bin/hypermem-bench.mjs +2 -0
- package/bin/hypermem-doctor.mjs +412 -0
- package/bin/hypermem-model-audit.mjs +339 -0
- package/bin/hypermem-status.mjs +491 -70
- package/dist/adaptive-lifecycle.d.ts +81 -0
- package/dist/adaptive-lifecycle.d.ts.map +1 -0
- package/dist/adaptive-lifecycle.js +190 -0
- package/dist/background-indexer.js +9 -9
- package/dist/budget-policy.d.ts +1 -1
- package/dist/budget-policy.d.ts.map +1 -1
- package/dist/budget-policy.js +10 -5
- package/dist/cache.d.ts +4 -0
- package/dist/cache.d.ts.map +1 -1
- package/dist/cache.js +2 -0
- package/dist/composition-snapshot-integrity.d.ts +36 -0
- package/dist/composition-snapshot-integrity.d.ts.map +1 -0
- package/dist/composition-snapshot-integrity.js +131 -0
- package/dist/composition-snapshot-runtime.d.ts +59 -0
- package/dist/composition-snapshot-runtime.d.ts.map +1 -0
- package/dist/composition-snapshot-runtime.js +250 -0
- package/dist/composition-snapshot-store.d.ts +44 -0
- package/dist/composition-snapshot-store.d.ts.map +1 -0
- package/dist/composition-snapshot-store.js +117 -0
- package/dist/compositor.d.ts +125 -1
- package/dist/compositor.d.ts.map +1 -1
- package/dist/compositor.js +692 -44
- package/dist/cross-agent.d.ts +1 -1
- package/dist/cross-agent.js +17 -17
- package/dist/doc-chunk-store.d.ts +19 -0
- package/dist/doc-chunk-store.d.ts.map +1 -1
- package/dist/doc-chunk-store.js +56 -6
- package/dist/dreaming-promoter.d.ts +1 -1
- package/dist/dreaming-promoter.js +2 -2
- package/dist/hybrid-retrieval.d.ts +38 -0
- package/dist/hybrid-retrieval.d.ts.map +1 -1
- package/dist/hybrid-retrieval.js +86 -1
- package/dist/index.d.ts +15 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +33 -7
- package/dist/knowledge-store.d.ts +4 -1
- package/dist/knowledge-store.d.ts.map +1 -1
- package/dist/knowledge-store.js +27 -4
- package/dist/library-schema.d.ts +12 -8
- package/dist/library-schema.d.ts.map +1 -1
- package/dist/library-schema.js +22 -8
- package/dist/message-store.d.ts.map +1 -1
- package/dist/message-store.js +7 -3
- package/dist/metrics-dashboard.d.ts +18 -1
- package/dist/metrics-dashboard.d.ts.map +1 -1
- package/dist/metrics-dashboard.js +52 -14
- package/dist/reranker.d.ts +1 -1
- package/dist/reranker.js +2 -2
- package/dist/schema.d.ts +1 -1
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +28 -1
- package/dist/seed.d.ts +1 -1
- package/dist/seed.d.ts.map +1 -1
- package/dist/seed.js +3 -1
- package/dist/session-flusher.d.ts +2 -2
- package/dist/session-flusher.js +2 -2
- package/dist/spawn-context.d.ts +1 -1
- package/dist/spawn-context.js +1 -1
- package/dist/topic-store.js +5 -5
- package/dist/topic-synthesizer.d.ts +20 -0
- package/dist/topic-synthesizer.d.ts.map +1 -1
- package/dist/topic-synthesizer.js +114 -4
- package/dist/trigger-registry.d.ts +1 -1
- package/dist/trigger-registry.d.ts.map +1 -1
- package/dist/trigger-registry.js +14 -6
- package/dist/types.d.ts +273 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/version.d.ts +7 -7
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +17 -7
- package/docs/DIAGNOSTICS.md +205 -0
- package/docs/INTEGRATION_VALIDATION.md +186 -0
- package/docs/MIGRATION.md +9 -6
- package/docs/MIGRATION_GUIDE.md +125 -101
- package/docs/ROADMAP.md +238 -20
- package/docs/TUNING.md +30 -6
- package/install.sh +159 -408
- package/memory-plugin/LICENSE +190 -0
- package/memory-plugin/README.md +20 -0
- package/memory-plugin/dist/index.js +50 -0
- package/memory-plugin/package.json +2 -2
- package/package.json +18 -4
- package/plugin/LICENSE +190 -0
- package/plugin/README.md +20 -0
- package/plugin/dist/index.d.ts +55 -0
- package/plugin/dist/index.d.ts.map +1 -1
- package/plugin/dist/index.js +362 -42
- package/plugin/dist/index.js.map +1 -1
- package/plugin/package.json +2 -2
- package/scripts/install-runtime.mjs +13 -3
package/dist/index.js
CHANGED
|
@@ -29,6 +29,7 @@ export { KnowledgeGraph } from './knowledge-graph.js';
|
|
|
29
29
|
export { RateLimiter, createRateLimitedEmbedder } from './rate-limiter.js';
|
|
30
30
|
export { CacheLayer } from './cache.js';
|
|
31
31
|
export { TRIM_SOFT_TARGET, TRIM_GROWTH_THRESHOLD, TRIM_HEADROOM_FRACTION, TRIM_BUDGET_POLICY, resolveTrimBudgets, } from './budget-policy.js';
|
|
32
|
+
export { resolveAdaptiveLifecyclePolicy, } from './adaptive-lifecycle.js';
|
|
32
33
|
// ── Phase C0.2: Canonical degradation contracts ───────────────────────────────
|
|
33
34
|
export {
|
|
34
35
|
// Reason enum + all values
|
|
@@ -43,7 +44,11 @@ formatReplayMarker, parseReplayMarker, isReplayMarker,
|
|
|
43
44
|
isDegradedContent, } from './degradation.js';
|
|
44
45
|
export { REPLAY_RECOVERY_POLICY, decideReplayRecovery, isColdRedisReplay, isReplayRecovered, } from './replay-recovery.js';
|
|
45
46
|
export { Compositor, applyToolGradientToWindow, canPersistReshapedHistory, OPENCLAW_BOOTSTRAP_FILES, resolveToolChainEjections } from './compositor.js';
|
|
47
|
+
// Sprint 3 + Sprint 4: depth estimator, session classifier, unified pressure signal
|
|
48
|
+
export { classifySessionType, estimateObservedMsgDensity, computeAdaptiveHistoryDepth, computeUnifiedPressure, PRESSURE_SOURCE } from './compositor.js';
|
|
46
49
|
export { TRIGGER_REGISTRY, TRIGGER_REGISTRY_VERSION, TRIGGER_REGISTRY_HASH, DEFAULT_TRIGGERS, matchTriggers, } from './trigger-registry.js';
|
|
50
|
+
export { canonicalizeSnapshotJson, hashSnapshotJson, parseSnapshotSlotsJson, isInlineSnapshotSlotPayload, computeInlineIntegrityHash, attachInlineIntegrityHash, computeSlotsIntegrityHash, verifySnapshotSlotsIntegrity, } from './composition-snapshot-integrity.js';
|
|
51
|
+
export { insertCompositionSnapshot, listCompositionSnapshots, getCompositionSnapshot, verifyCompositionSnapshot, getLatestValidCompositionSnapshot, } from './composition-snapshot-store.js';
|
|
47
52
|
export { ensureCompactionFenceSchema, updateCompactionFence, getCompactionFence, getCompactionEligibility, getCompactableMessages, } from './compaction-fence.js';
|
|
48
53
|
export { verifyPreservation, verifyPreservationFromVectors, } from './preservation-gate.js';
|
|
49
54
|
export { toProviderFormat, fromProviderFormat, userMessageToNeutral, toolResultsToNeutral, normalizeToolCallId, generateToolCallId, detectProvider, repairToolCallPairs, } from './provider-translator.js';
|
|
@@ -51,6 +56,7 @@ export { migrate, SCHEMA_VERSION } from './schema.js';
|
|
|
51
56
|
export { migrateLibrary, LIBRARY_SCHEMA_VERSION } from './library-schema.js';
|
|
52
57
|
export { VectorStore, generateEmbeddings } from './vector-store.js';
|
|
53
58
|
export { hybridSearch, buildFtsQuery } from './hybrid-retrieval.js';
|
|
59
|
+
export { createReranker, ZeroEntropyReranker, OpenRouterReranker, OllamaReranker, } from './reranker.js';
|
|
54
60
|
export { ContradictionDetector } from './contradiction-detector.js';
|
|
55
61
|
export { DocChunkStore } from './doc-chunk-store.js';
|
|
56
62
|
export { WorkspaceSeeder, seedWorkspace } from './seed.js';
|
|
@@ -97,7 +103,7 @@ const DEFAULT_CONFIG = {
|
|
|
97
103
|
cache: {
|
|
98
104
|
keyPrefix: 'hm:',
|
|
99
105
|
sessionTTL: 14400, // 4 hours — system/identity/meta slots
|
|
100
|
-
historyTTL: 604800, // 7 days — extended for
|
|
106
|
+
historyTTL: 604800, // 7 days — extended for canvas display
|
|
101
107
|
},
|
|
102
108
|
compositor: {
|
|
103
109
|
// TUNE-010 (2026-04-02): Raised from 65000 → 90000.
|
|
@@ -217,7 +223,7 @@ function mergeStartupCandidate(target, partial) {
|
|
|
217
223
|
function discoverStartupFleetCandidates(dbManager, opts = {}) {
|
|
218
224
|
const homeDir = process.env.HOME || os.homedir();
|
|
219
225
|
const workspaceRoots = opts.workspaceRoots ?? [
|
|
220
|
-
path.join(homeDir, '.openclaw', 'workspace
|
|
226
|
+
path.join(homeDir, '.openclaw', 'workspace'),
|
|
221
227
|
path.join(homeDir, '.openclaw', 'workspace'),
|
|
222
228
|
];
|
|
223
229
|
const candidates = new Map();
|
|
@@ -331,8 +337,8 @@ function discoverStartupFleetCandidates(dbManager, opts = {}) {
|
|
|
331
337
|
*
|
|
332
338
|
* Usage:
|
|
333
339
|
* const hm = await hypermem.create({ dataDir: '~/.openclaw/hypermem' });
|
|
334
|
-
* await hm.record('
|
|
335
|
-
* const result = await hm.compose({ agentId: '
|
|
340
|
+
* await hm.record('alice', 'agent:alice:webchat:main', userMsg);
|
|
341
|
+
* const result = await hm.compose({ agentId: 'alice', sessionKey: '...', ... });
|
|
336
342
|
*/
|
|
337
343
|
export class HyperMem {
|
|
338
344
|
dbManager;
|
|
@@ -408,6 +414,26 @@ export class HyperMem {
|
|
|
408
414
|
console.warn('[hypermem] Vector store init failed (non-fatal):', err.message);
|
|
409
415
|
}
|
|
410
416
|
}
|
|
417
|
+
// ── Reranker init ─────────────────────────────────────────
|
|
418
|
+
// Reranker is optional; when config.reranker is omitted or provider is
|
|
419
|
+
// 'none', the compositor receives null and hybridSearch skips the rerank
|
|
420
|
+
// hook. On provider errors, hybridSearch falls back to RRF ordering.
|
|
421
|
+
if (merged.reranker && merged.reranker.provider !== 'none') {
|
|
422
|
+
try {
|
|
423
|
+
const { createReranker } = await import('./reranker.js');
|
|
424
|
+
const rr = createReranker(merged.reranker);
|
|
425
|
+
if (rr) {
|
|
426
|
+
hm.compositor.setReranker(rr);
|
|
427
|
+
console.log(`[hypermem] Reranker enabled: provider=${rr.name}`);
|
|
428
|
+
}
|
|
429
|
+
else {
|
|
430
|
+
console.log(`[hypermem] Reranker configured (${merged.reranker.provider}) but no API key resolved — RRF-only`);
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
catch (err) {
|
|
434
|
+
console.warn('[hypermem] Reranker init failed (non-fatal):', err.message);
|
|
435
|
+
}
|
|
436
|
+
}
|
|
411
437
|
const autoStartupFleetSeeding = merged.startupFleetSeeding !== false &&
|
|
412
438
|
!path.resolve(merged.dataDir).startsWith(path.resolve(os.tmpdir()) + path.sep);
|
|
413
439
|
if (autoStartupFleetSeeding) {
|
|
@@ -531,7 +557,7 @@ export class HyperMem {
|
|
|
531
557
|
/**
|
|
532
558
|
* List archived or forked contexts for an agent.
|
|
533
559
|
*
|
|
534
|
-
*
|
|
560
|
+
* operator-safe enumeration path. This is the approved archived-context
|
|
535
561
|
* listing surface. Active composition remains separate.
|
|
536
562
|
*/
|
|
537
563
|
listArchivedContexts(agentId, opts) {
|
|
@@ -568,9 +594,9 @@ export class HyperMem {
|
|
|
568
594
|
/**
|
|
569
595
|
* Recompute the Redis hot history view from SQLite and re-apply tool gradient.
|
|
570
596
|
*/
|
|
571
|
-
async refreshRedisGradient(agentId, sessionKey, tokenBudget, historyDepth) {
|
|
597
|
+
async refreshRedisGradient(agentId, sessionKey, tokenBudget, historyDepth, trimSoftTarget) {
|
|
572
598
|
const db = this.dbManager.getMessageDb(agentId);
|
|
573
|
-
await this.compositor.refreshRedisGradient(agentId, sessionKey, db, tokenBudget, historyDepth);
|
|
599
|
+
await this.compositor.refreshRedisGradient(agentId, sessionKey, db, tokenBudget, historyDepth, trimSoftTarget);
|
|
574
600
|
}
|
|
575
601
|
/**
|
|
576
602
|
* Full-text search across all messages for an agent.
|
|
@@ -17,7 +17,10 @@ export declare class KnowledgeStore {
|
|
|
17
17
|
*
|
|
18
18
|
* Versioning semantics:
|
|
19
19
|
* - If no active entry exists: insert as version 1
|
|
20
|
-
* - If same content: refresh confidence + timestamp
|
|
20
|
+
* - If same content: refresh confidence + timestamp + source_ref/expiry
|
|
21
|
+
* metadata only (no new version). Refreshing source_ref advances
|
|
22
|
+
* synthesis watermarks (e.g. "topic:<id>:mc:<count>") so callers that
|
|
23
|
+
* re-run with identical compiled content do not loop forever.
|
|
21
24
|
* - If different content: insert as new version (max_version + 1), mark
|
|
22
25
|
* previous active row as superseded_by = new_id
|
|
23
26
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"knowledge-store.d.ts","sourceRoot":"","sources":["../src/knowledge-store.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAwB5C,MAAM,MAAM,QAAQ,GAAG,UAAU,GAAG,aAAa,GAAG,YAAY,GAAG,YAAY,GAAG,SAAS,CAAC;AAE5F,qBAAa,cAAc;IACb,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAAF,EAAE,EAAE,YAAY;IAE7C
|
|
1
|
+
{"version":3,"file":"knowledge-store.d.ts","sourceRoot":"","sources":["../src/knowledge-store.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAwB5C,MAAM,MAAM,QAAQ,GAAG,UAAU,GAAG,aAAa,GAAG,YAAY,GAAG,YAAY,GAAG,SAAS,CAAC;AAE5F,qBAAa,cAAc;IACb,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAAF,EAAE,EAAE,YAAY;IAE7C;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CACJ,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE;QACL,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,GACA,SAAS;IAuGZ;;OAEG;IACH,SAAS,CACP,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE;QACL,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,GACA,SAAS,EAAE;IAyBd;;OAEG;IACH,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;IAUnE;;OAEG;IACH,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,EAAE;IAUrE;;OAEG;IACH,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,GAAE,MAAW,GAAG,SAAS,EAAE;IAavE;;OAEG;IACH,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE;IAUrC;;OAEG;IACH,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI;IAO/D;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAOjC;;;OAGG;IACH,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM;CAwDlF"}
|
package/dist/knowledge-store.js
CHANGED
|
@@ -36,7 +36,10 @@ export class KnowledgeStore {
|
|
|
36
36
|
*
|
|
37
37
|
* Versioning semantics:
|
|
38
38
|
* - If no active entry exists: insert as version 1
|
|
39
|
-
* - If same content: refresh confidence + timestamp
|
|
39
|
+
* - If same content: refresh confidence + timestamp + source_ref/expiry
|
|
40
|
+
* metadata only (no new version). Refreshing source_ref advances
|
|
41
|
+
* synthesis watermarks (e.g. "topic:<id>:mc:<count>") so callers that
|
|
42
|
+
* re-run with identical compiled content do not loop forever.
|
|
40
43
|
* - If different content: insert as new version (max_version + 1), mark
|
|
41
44
|
* previous active row as superseded_by = new_id
|
|
42
45
|
*
|
|
@@ -63,9 +66,29 @@ export class KnowledgeStore {
|
|
|
63
66
|
ORDER BY version DESC LIMIT 1
|
|
64
67
|
`).get(agentId, domain, key);
|
|
65
68
|
if (existing && existing.content === content) {
|
|
66
|
-
// Same content — refresh confidence and
|
|
67
|
-
|
|
68
|
-
|
|
69
|
+
// Same content — refresh confidence/timestamp and synthesis metadata
|
|
70
|
+
// (source_ref, source_type, expires_at) so watermark-style refs advance
|
|
71
|
+
// without minting a new version row.
|
|
72
|
+
const nextSourceRef = opts?.sourceRef !== undefined
|
|
73
|
+
? opts.sourceRef
|
|
74
|
+
: (existing.source_ref ?? null);
|
|
75
|
+
const nextSourceType = opts?.sourceType !== undefined
|
|
76
|
+
? sourceType
|
|
77
|
+
: (existing.source_type ?? sourceType);
|
|
78
|
+
const nextExpiresAt = opts?.expiresAt !== undefined
|
|
79
|
+
? opts.expiresAt
|
|
80
|
+
: (existing.expires_at ?? null);
|
|
81
|
+
this.db.prepare(`UPDATE knowledge
|
|
82
|
+
SET confidence = ?, updated_at = ?, source_ref = ?, source_type = ?, expires_at = ?
|
|
83
|
+
WHERE id = ?`).run(confidence, now, nextSourceRef, nextSourceType, nextExpiresAt, existing.id);
|
|
84
|
+
return parseKnowledgeRow({
|
|
85
|
+
...existing,
|
|
86
|
+
confidence,
|
|
87
|
+
updated_at: now,
|
|
88
|
+
source_ref: nextSourceRef,
|
|
89
|
+
source_type: nextSourceType,
|
|
90
|
+
expires_at: nextExpiresAt,
|
|
91
|
+
});
|
|
69
92
|
}
|
|
70
93
|
// Determine next version number
|
|
71
94
|
const maxVersionRow = this.db.prepare(`
|
package/dist/library-schema.d.ts
CHANGED
|
@@ -6,15 +6,19 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Collections:
|
|
8
8
|
* 1. Library entries (versioned docs, specs, reference material)
|
|
9
|
-
* 2. Facts (agent-learned truths)
|
|
9
|
+
* 2. Facts (agent-learned truths with confidence, visibility, temporal validity)
|
|
10
10
|
* 3. Preferences (behavioral patterns)
|
|
11
|
-
* 4. Knowledge (structured domain knowledge, supersedable)
|
|
12
|
-
* 5. Episodes (significant events)
|
|
13
|
-
* 6.
|
|
14
|
-
* 7.
|
|
15
|
-
* 8.
|
|
16
|
-
* 9.
|
|
17
|
-
* 10.
|
|
11
|
+
* 4. Knowledge/wiki (structured domain knowledge, supersedable topic syntheses)
|
|
12
|
+
* 5. Episodes (significant events, decisions, discoveries)
|
|
13
|
+
* 6. Topics (cross-session thread tracking)
|
|
14
|
+
* 7. Knowledge graph links (relationships between facts, knowledge, topics, episodes)
|
|
15
|
+
* 8. Fleet registry (agents, orgs, capabilities)
|
|
16
|
+
* 9. Desired state and config events (drift detection)
|
|
17
|
+
* 10. System registry and work items (server state, work queues, events)
|
|
18
|
+
* 11. Session registry and lifecycle events
|
|
19
|
+
* 12. Document sources/chunks and trigger retrieval metadata
|
|
20
|
+
* 13. Output standards, model directives, and output metrics
|
|
21
|
+
* 14. Temporal index, expertise patterns, contradiction audits, and indexer watermarks
|
|
18
22
|
*/
|
|
19
23
|
import { DatabaseSync } from 'node:sqlite';
|
|
20
24
|
export declare const LIBRARY_SCHEMA_VERSION = 19;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"library-schema.d.ts","sourceRoot":"","sources":["../src/library-schema.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"library-schema.d.ts","sourceRoot":"","sources":["../src/library-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAI3C,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAo6BzC,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG;IAAE,QAAQ,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAkF3G;AAID,wBAAgB,cAAc,CAAC,EAAE,EAAE,YAAY,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAoa7E"}
|
package/dist/library-schema.js
CHANGED
|
@@ -6,15 +6,19 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Collections:
|
|
8
8
|
* 1. Library entries (versioned docs, specs, reference material)
|
|
9
|
-
* 2. Facts (agent-learned truths)
|
|
9
|
+
* 2. Facts (agent-learned truths with confidence, visibility, temporal validity)
|
|
10
10
|
* 3. Preferences (behavioral patterns)
|
|
11
|
-
* 4. Knowledge (structured domain knowledge, supersedable)
|
|
12
|
-
* 5. Episodes (significant events)
|
|
13
|
-
* 6.
|
|
14
|
-
* 7.
|
|
15
|
-
* 8.
|
|
16
|
-
* 9.
|
|
17
|
-
* 10.
|
|
11
|
+
* 4. Knowledge/wiki (structured domain knowledge, supersedable topic syntheses)
|
|
12
|
+
* 5. Episodes (significant events, decisions, discoveries)
|
|
13
|
+
* 6. Topics (cross-session thread tracking)
|
|
14
|
+
* 7. Knowledge graph links (relationships between facts, knowledge, topics, episodes)
|
|
15
|
+
* 8. Fleet registry (agents, orgs, capabilities)
|
|
16
|
+
* 9. Desired state and config events (drift detection)
|
|
17
|
+
* 10. System registry and work items (server state, work queues, events)
|
|
18
|
+
* 11. Session registry and lifecycle events
|
|
19
|
+
* 12. Document sources/chunks and trigger retrieval metadata
|
|
20
|
+
* 13. Output standards, model directives, and output metrics
|
|
21
|
+
* 14. Temporal index, expertise patterns, contradiction audits, and indexer watermarks
|
|
18
22
|
*/
|
|
19
23
|
import { DatabaseSync } from 'node:sqlite';
|
|
20
24
|
import { mkdirSync, renameSync, existsSync } from 'node:fs';
|
|
@@ -1321,6 +1325,16 @@ export function migrateLibrary(db, engineVersion) {
|
|
|
1321
1325
|
db.prepare('INSERT INTO schema_version (version, applied_at) VALUES (?, ?)')
|
|
1322
1326
|
.run(19, nowIso());
|
|
1323
1327
|
}
|
|
1328
|
+
// Always repair knowledge schema drift before runtime writes.
|
|
1329
|
+
// Some long-lived databases reached schema >=7 with the versioned knowledge
|
|
1330
|
+
// table present but without the visibility column. KnowledgeStore writes
|
|
1331
|
+
// require visibility, and synthesis/indexer upserts otherwise fail at runtime
|
|
1332
|
+
// even though schema_version says the migration already ran.
|
|
1333
|
+
const knowledgeCols = new Set(db.prepare('PRAGMA table_info(knowledge)').all().map(col => col.name));
|
|
1334
|
+
if (!knowledgeCols.has('visibility')) {
|
|
1335
|
+
db.exec("ALTER TABLE knowledge ADD COLUMN visibility TEXT NOT NULL DEFAULT 'private'");
|
|
1336
|
+
}
|
|
1337
|
+
db.exec('CREATE INDEX IF NOT EXISTS idx_knowledge_visibility ON knowledge(visibility, agent_id)');
|
|
1324
1338
|
// Always ensure meta exists before stamping the running engine version.
|
|
1325
1339
|
// Some legacy/stale DBs reached schema >=10 without the V10 migration having
|
|
1326
1340
|
// actually created the table, which would make startup fail with
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-store.d.ts","sourceRoot":"","sources":["../src/message-store.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EACV,cAAc,EACd,aAAa,EACb,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,UAAU,EACV,mBAAmB,EACnB,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"message-store.d.ts","sourceRoot":"","sources":["../src/message-store.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EACV,cAAc,EACd,aAAa,EACb,YA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AAE,KAAK,CAAC,EAAE,MAAM,GAAG,aAAa,EAAE;IAgBpE;;;OAGG;IACH,MAAM,CAAC,QAAQ,CAAC,kCAAkC,MAAM;IAExD;;;;OAIG;IACH,MAAM,CAAC,QAAQ,CAAC,mCAAmC,MAAM;IAIzD;;;;;;;;;;;;OAYG;IACH,mBAAmB,CAAC,KAAK,EAAE,mBAAmB,GAAG,oBAAoB,CAAC,aAAa,EAAE,CAAC;IA4CtF;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,oBAAoB,CAClB,UAAU,EAAE,MAAM,EAAE,EACpB,IAAI,CAAC,EAAE,yBAAyB,GAC/B,oBAAoB,CAAC,aAAa,EAAE,CAAC,EAAE;IA6C1C;;OAEG;IACH,OAAO,CAAC,gBAAgB;CASzB"}
|
package/dist/message-store.js
CHANGED
|
@@ -21,6 +21,9 @@ function parseMessageRow(row) {
|
|
|
21
21
|
textContent: row.text_content || null,
|
|
22
22
|
toolCalls: row.tool_calls ? JSON.parse(row.tool_calls) : null,
|
|
23
23
|
toolResults: row.tool_results ? JSON.parse(row.tool_results) : null,
|
|
24
|
+
topicId: typeof row.topic_id === 'string' && row.topic_id.length > 0
|
|
25
|
+
? row.topic_id
|
|
26
|
+
: undefined,
|
|
24
27
|
metadata: row.metadata ? JSON.parse(row.metadata) : undefined,
|
|
25
28
|
messageIndex: row.message_index,
|
|
26
29
|
tokenCount: row.token_count || null,
|
|
@@ -179,9 +182,9 @@ export class MessageStore {
|
|
|
179
182
|
}
|
|
180
183
|
}
|
|
181
184
|
const result = this.db.prepare(`
|
|
182
|
-
INSERT INTO messages (conversation_id, agent_id, role, text_content, tool_calls, tool_results, metadata, token_count, message_index, is_heartbeat, created_at, context_id, parent_id, depth)
|
|
183
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
184
|
-
`).run(conversationId, agentId, message.role, message.textContent, message.toolCalls ? JSON.stringify(message.toolCalls) : null, message.toolResults ? JSON.stringify(message.toolResults) : null, message.metadata ? JSON.stringify(message.metadata) : null, opts?.tokenCount || null, messageIndex, opts?.isHeartbeat ? 1 : 0, now, opts?.contextId ?? null, parentId, depth);
|
|
185
|
+
INSERT INTO messages (conversation_id, agent_id, role, text_content, tool_calls, tool_results, metadata, token_count, message_index, is_heartbeat, created_at, context_id, parent_id, depth, topic_id)
|
|
186
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
187
|
+
`).run(conversationId, agentId, message.role, message.textContent, message.toolCalls ? JSON.stringify(message.toolCalls) : null, message.toolResults ? JSON.stringify(message.toolResults) : null, message.metadata ? JSON.stringify(message.metadata) : null, opts?.tokenCount || null, messageIndex, opts?.isHeartbeat ? 1 : 0, now, opts?.contextId ?? null, parentId, depth, message.topicId ?? null);
|
|
185
188
|
const id = result.lastInsertRowid;
|
|
186
189
|
// Update context head pointer if contextId was provided
|
|
187
190
|
if (opts?.contextId) {
|
|
@@ -206,6 +209,7 @@ export class MessageStore {
|
|
|
206
209
|
textContent: message.textContent,
|
|
207
210
|
toolCalls: message.toolCalls,
|
|
208
211
|
toolResults: message.toolResults,
|
|
212
|
+
topicId: message.topicId,
|
|
209
213
|
metadata: message.metadata,
|
|
210
214
|
messageIndex,
|
|
211
215
|
tokenCount: opts?.tokenCount || null,
|
|
@@ -44,6 +44,14 @@ export interface VectorMetrics {
|
|
|
44
44
|
/** Embedding cache hit rate (0-1) for this process lifetime */
|
|
45
45
|
cacheHitRate: number | null;
|
|
46
46
|
}
|
|
47
|
+
export interface DocChunkMetrics {
|
|
48
|
+
/** Total doc chunks indexed across all collections */
|
|
49
|
+
totalDocChunks: number;
|
|
50
|
+
/** Doc chunks per collection */
|
|
51
|
+
byCollection: Record<string, number>;
|
|
52
|
+
/** Doc chunks added in the last 24h */
|
|
53
|
+
recentDocChunks: number;
|
|
54
|
+
}
|
|
47
55
|
export interface CompositionMetrics {
|
|
48
56
|
/** Average assembly time in ms (from output_metrics table) */
|
|
49
57
|
avgAssemblyMs: number | null;
|
|
@@ -81,6 +89,10 @@ export interface SystemHealth {
|
|
|
81
89
|
librarySchemaVersion: number | null;
|
|
82
90
|
/** hypermem package version */
|
|
83
91
|
packageVersion: string;
|
|
92
|
+
/** Resolved embedding provider from the installed config */
|
|
93
|
+
embeddingProvider: string | null;
|
|
94
|
+
/** Resolved embedding model from the installed config */
|
|
95
|
+
embeddingModel: string | null;
|
|
84
96
|
/** Cache connection status (if provided) */
|
|
85
97
|
cacheOk: boolean | null;
|
|
86
98
|
/** Timestamp of this snapshot */
|
|
@@ -88,6 +100,7 @@ export interface SystemHealth {
|
|
|
88
100
|
}
|
|
89
101
|
export interface HyperMemMetrics {
|
|
90
102
|
facts: FactMetrics;
|
|
103
|
+
docChunks: DocChunkMetrics;
|
|
91
104
|
wiki: WikiMetrics;
|
|
92
105
|
episodes: EpisodeMetrics;
|
|
93
106
|
vectors: VectorMetrics;
|
|
@@ -100,12 +113,16 @@ export interface MetricsDashboardOptions {
|
|
|
100
113
|
agentIds?: string[];
|
|
101
114
|
/** Include per-agent breakdowns. Default: true */
|
|
102
115
|
includeBreakdowns?: boolean;
|
|
116
|
+
/** Resolved embedding provider for health display. */
|
|
117
|
+
embeddingProvider?: string | null;
|
|
118
|
+
/** Resolved embedding model for health display. */
|
|
119
|
+
embeddingModel?: string | null;
|
|
103
120
|
}
|
|
104
121
|
/**
|
|
105
122
|
* Collect all metrics in a single pass.
|
|
106
123
|
* Safe to call on live DBs — all queries are read-only.
|
|
107
124
|
*/
|
|
108
|
-
export declare function collectMetrics(mainDb: DatabaseSync, libraryDb: DatabaseSync, opts?: MetricsDashboardOptions): Promise<HyperMemMetrics>;
|
|
125
|
+
export declare function collectMetrics(mainDb: DatabaseSync, libraryDb: DatabaseSync, opts?: MetricsDashboardOptions, vectorDb?: DatabaseSync | null): Promise<HyperMemMetrics>;
|
|
109
126
|
/**
|
|
110
127
|
* Format metrics as a human-readable summary string.
|
|
111
128
|
* Suitable for logging or status replies.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metrics-dashboard.d.ts","sourceRoot":"","sources":["../src/metrics-dashboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAiB,MAAM,aAAa,CAAC;AAG/D,MAAM,WAAW,WAAW;IAC1B,4CAA4C;IAC5C,UAAU,EAAE,MAAM,CAAC;IACnB,gCAAgC;IAChC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,kCAAkC;IAClC,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,WAAW;IAC1B,oDAAoD;IACpD,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB;IACtB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC;AAED,MAAM,WAAW,cAAc;IAC7B,4BAA4B;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB,yBAAyB;IACzB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,+CAA+C;IAC/C,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED,MAAM,WAAW,aAAa;IAC5B,4BAA4B;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,gCAAgC;IAChC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,+DAA+D;IAC/D,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,kBAAkB;IACjC,8DAA8D;IAC9D,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,8BAA8B;IAC9B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,qCAAqC;IACrC,eAA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AAW,CAAC;IACnB,SAAS,EAAE,eAAe,CAAC;IAC3B,IAAI,EAAE,WAAW,CAAC;IAClB,QAAQ,EAAE,cAAc,CAAC;IACzB,OAAO,EAAE,aAAa,CAAC;IACvB,WAAW,EAAE,kBAAkB,CAAC;IAChC,SAAS,EAAE,gBAAgB,CAAC;IAC5B,MAAM,EAAE,YAAY,CAAC;CACtB;AAED,MAAM,WAAW,uBAAuB;IACtC,qEAAqE;IACrE,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,kDAAkD;IAClD,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,sDAAsD;IACtD,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,mDAAmD;IACnD,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AA0WD;;;GAGG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,YAAY,EACpB,SAAS,EAAE,YAAY,EACvB,IAAI,GAAE,uBAA4B,EAClC,QAAQ,GAAE,YAAY,GAAG,IAAW,GACnC,OAAO,CAAC,eAAe,CAAC,CAW1B;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,eAAe,GAAG,MAAM,CAyD/D"}
|
|
@@ -51,6 +51,23 @@ function collectFactMetrics(libraryDb, opts) {
|
|
|
51
51
|
recentFacts: recent?.count ?? 0,
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* Collect doc chunk metrics from the library DB.
|
|
56
|
+
*/
|
|
57
|
+
function collectDocChunkMetrics(libraryDb, opts) {
|
|
58
|
+
const { clause, params } = buildAgentFilter(opts.agentIds);
|
|
59
|
+
const cutoff = new Date(Date.now() - 24 * 60 * 60 * 1000).toISOString();
|
|
60
|
+
const total = safeQuery(libraryDb, `SELECT COUNT(*) AS count FROM doc_chunks WHERE 1=1 ${clause}`, params);
|
|
61
|
+
const recent = safeQuery(libraryDb, `SELECT COUNT(*) AS count FROM doc_chunks WHERE created_at > ? ${clause}`, [cutoff, ...params]);
|
|
62
|
+
const byCollectionRows = (opts.includeBreakdowns !== false)
|
|
63
|
+
? safeQueryAll(libraryDb, `SELECT collection, COUNT(*) AS count FROM doc_chunks WHERE 1=1 ${clause} GROUP BY collection`, params)
|
|
64
|
+
: [];
|
|
65
|
+
return {
|
|
66
|
+
totalDocChunks: total?.count ?? 0,
|
|
67
|
+
byCollection: Object.fromEntries(byCollectionRows.map(r => [r.collection, r.count])),
|
|
68
|
+
recentDocChunks: recent?.count ?? 0,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
54
71
|
/**
|
|
55
72
|
* Collect wiki page metrics from the library DB (knowledge table, topic-synthesis domain).
|
|
56
73
|
*/
|
|
@@ -92,11 +109,18 @@ function collectEpisodeMetrics(libraryDb, opts) {
|
|
|
92
109
|
};
|
|
93
110
|
}
|
|
94
111
|
/**
|
|
95
|
-
* Collect vector index metrics from the
|
|
112
|
+
* Collect vector index metrics from the shared vectors DB.
|
|
96
113
|
*/
|
|
97
|
-
function collectVectorMetrics(
|
|
98
|
-
|
|
99
|
-
|
|
114
|
+
function collectVectorMetrics(vectorDb) {
|
|
115
|
+
if (!vectorDb) {
|
|
116
|
+
return {
|
|
117
|
+
totalVectors: 0,
|
|
118
|
+
byTable: {},
|
|
119
|
+
cacheHitRate: null,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
const total = safeQuery(vectorDb, 'SELECT COUNT(*) as cnt FROM vec_index_map');
|
|
123
|
+
const byTableRows = safeQueryAll(vectorDb, 'SELECT source_table, COUNT(*) as cnt FROM vec_index_map GROUP BY source_table');
|
|
100
124
|
return {
|
|
101
125
|
totalVectors: total?.cnt ?? 0,
|
|
102
126
|
byTable: Object.fromEntries(byTableRows.map(r => [r.source_table, r.cnt])),
|
|
@@ -104,11 +128,11 @@ function collectVectorMetrics(libraryDb) {
|
|
|
104
128
|
};
|
|
105
129
|
}
|
|
106
130
|
/**
|
|
107
|
-
* Collect composition performance metrics from the output_metrics table (
|
|
131
|
+
* Collect composition performance metrics from the output_metrics table (library DB).
|
|
108
132
|
*/
|
|
109
|
-
function collectCompositionMetrics(
|
|
133
|
+
function collectCompositionMetrics(libraryDb, opts) {
|
|
110
134
|
const { clause, params } = buildAgentFilter(opts.agentIds);
|
|
111
|
-
const agg = safeQuery(
|
|
135
|
+
const agg = safeQuery(libraryDb, `SELECT
|
|
112
136
|
AVG(latency_ms) AS avg_latency,
|
|
113
137
|
AVG(output_tokens) AS avg_output,
|
|
114
138
|
AVG(input_tokens) AS avg_input,
|
|
@@ -118,12 +142,12 @@ function collectCompositionMetrics(mainDb, opts) {
|
|
|
118
142
|
// p95: sort latency_ms and pick the 95th percentile row
|
|
119
143
|
let p95 = null;
|
|
120
144
|
if ((agg?.total ?? 0) > 0) {
|
|
121
|
-
const p95Row = safeQuery(
|
|
145
|
+
const p95Row = safeQuery(libraryDb, `SELECT latency_ms FROM output_metrics WHERE latency_ms IS NOT NULL ${clause}
|
|
122
146
|
ORDER BY latency_ms ASC
|
|
123
147
|
LIMIT 1 OFFSET MAX(0, CAST(COUNT(*) * 0.95 AS INT) - 1)`, params);
|
|
124
148
|
// Fallback: approximate p95 with a subquery
|
|
125
149
|
if (!p95Row) {
|
|
126
|
-
const p95Approx = safeQuery(
|
|
150
|
+
const p95Approx = safeQuery(libraryDb, `SELECT latency_ms FROM output_metrics WHERE latency_ms IS NOT NULL ${clause}
|
|
127
151
|
ORDER BY latency_ms DESC
|
|
128
152
|
LIMIT 1 OFFSET (SELECT MAX(0, CAST(COUNT(*) * 0.05 AS INT)) FROM output_metrics WHERE latency_ms IS NOT NULL ${clause})`, [...params, ...params]);
|
|
129
153
|
p95 = p95Approx?.latency_ms ?? null;
|
|
@@ -165,7 +189,7 @@ function collectIngestionMetrics(libraryDb, opts) {
|
|
|
165
189
|
/**
|
|
166
190
|
* Collect system health from both DBs.
|
|
167
191
|
*/
|
|
168
|
-
function collectHealth(mainDb, libraryDb) {
|
|
192
|
+
function collectHealth(mainDb, libraryDb, opts) {
|
|
169
193
|
let mainSchemaVersion = null;
|
|
170
194
|
let librarySchemaVersion = null;
|
|
171
195
|
let mainDbOk = false;
|
|
@@ -188,6 +212,8 @@ function collectHealth(mainDb, libraryDb) {
|
|
|
188
212
|
mainSchemaVersion,
|
|
189
213
|
librarySchemaVersion,
|
|
190
214
|
packageVersion: HYPERMEM_COMPAT_VERSION,
|
|
215
|
+
embeddingProvider: opts.embeddingProvider ?? null,
|
|
216
|
+
embeddingModel: opts.embeddingModel ?? null,
|
|
191
217
|
cacheOk: null, // caller must inject cache status
|
|
192
218
|
snapshotAt: new Date().toISOString(),
|
|
193
219
|
};
|
|
@@ -196,15 +222,16 @@ function collectHealth(mainDb, libraryDb) {
|
|
|
196
222
|
* Collect all metrics in a single pass.
|
|
197
223
|
* Safe to call on live DBs — all queries are read-only.
|
|
198
224
|
*/
|
|
199
|
-
export async function collectMetrics(mainDb, libraryDb, opts = {}) {
|
|
225
|
+
export async function collectMetrics(mainDb, libraryDb, opts = {}, vectorDb = null) {
|
|
200
226
|
return {
|
|
201
227
|
facts: collectFactMetrics(libraryDb, opts),
|
|
228
|
+
docChunks: collectDocChunkMetrics(libraryDb, opts),
|
|
202
229
|
wiki: collectWikiMetrics(libraryDb, opts),
|
|
203
230
|
episodes: collectEpisodeMetrics(libraryDb, opts),
|
|
204
|
-
vectors: collectVectorMetrics(
|
|
205
|
-
composition: collectCompositionMetrics(
|
|
231
|
+
vectors: collectVectorMetrics(vectorDb),
|
|
232
|
+
composition: collectCompositionMetrics(libraryDb, opts),
|
|
206
233
|
ingestion: collectIngestionMetrics(libraryDb, opts),
|
|
207
|
-
health: collectHealth(mainDb, libraryDb),
|
|
234
|
+
health: collectHealth(mainDb, libraryDb, opts),
|
|
208
235
|
};
|
|
209
236
|
}
|
|
210
237
|
/**
|
|
@@ -217,6 +244,12 @@ export function formatMetricsSummary(m) {
|
|
|
217
244
|
lines.push('');
|
|
218
245
|
lines.push('## Memory');
|
|
219
246
|
lines.push(` facts: ${m.facts.totalFacts.toLocaleString()} total, ${m.facts.recentFacts} added last 24h`);
|
|
247
|
+
lines.push(` doc chunks: ${m.docChunks.totalDocChunks.toLocaleString()} total, ${m.docChunks.recentDocChunks} added last 24h`);
|
|
248
|
+
if (Object.keys(m.docChunks.byCollection).length > 0) {
|
|
249
|
+
for (const [collection, count] of Object.entries(m.docChunks.byCollection)) {
|
|
250
|
+
lines.push(` ${collection}: ${count.toLocaleString()}`);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
220
253
|
lines.push(` wiki: ${m.wiki.totalPages} pages, ${m.wiki.recentPages} synthesized last 24h${m.wiki.oldestPageAgeHours !== null ? `, oldest ${m.wiki.oldestPageAgeHours}h` : ''}`);
|
|
221
254
|
lines.push(` episodes: ${m.episodes.totalEpisodes.toLocaleString()}${m.episodes.avgSignificance !== null ? `, avg significance ${m.episodes.avgSignificance.toFixed(2)}` : ''}`);
|
|
222
255
|
lines.push(` vectors: ${m.vectors.totalVectors.toLocaleString()} indexed`);
|
|
@@ -226,6 +259,10 @@ export function formatMetricsSummary(m) {
|
|
|
226
259
|
}
|
|
227
260
|
}
|
|
228
261
|
lines.push('');
|
|
262
|
+
lines.push('## Embedding');
|
|
263
|
+
lines.push(` provider: ${m.health.embeddingProvider ?? 'unknown'}`);
|
|
264
|
+
lines.push(` model: ${m.health.embeddingModel ?? 'unknown'}`);
|
|
265
|
+
lines.push('');
|
|
229
266
|
lines.push('## Composition');
|
|
230
267
|
if (m.composition.totalTurns > 0) {
|
|
231
268
|
lines.push(` turns: ${m.composition.totalTurns.toLocaleString()}`);
|
|
@@ -250,6 +287,7 @@ export function formatMetricsSummary(m) {
|
|
|
250
287
|
lines.push(` knowledge promoted: ${m.ingestion.totalKnowledgePromoted.toLocaleString()}`);
|
|
251
288
|
lines.push('');
|
|
252
289
|
lines.push('## Health');
|
|
290
|
+
lines.push(` embedding: ${m.health.embeddingProvider ?? 'unknown'}${m.health.embeddingModel ? ` / ${m.health.embeddingModel}` : ''}`);
|
|
253
291
|
lines.push(` main db: ${m.health.mainDbOk ? '✅' : '❌'}${m.health.mainSchemaVersion !== null ? ` (schema v${m.health.mainSchemaVersion})` : ''}`);
|
|
254
292
|
lines.push(` library db: ${m.health.libraryDbOk ? '✅' : '❌'}${m.health.librarySchemaVersion !== null ? ` (schema v${m.health.librarySchemaVersion})` : ''}`);
|
|
255
293
|
if (m.health.cacheOk !== null) {
|
package/dist/reranker.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* order without disruption.
|
|
7
7
|
*
|
|
8
8
|
* Providers:
|
|
9
|
-
* - ZeroEntropyReranker — https://api.zeroentropy.dev/v1/rerank (zerank-2)
|
|
9
|
+
* - ZeroEntropyReranker — https://api.zeroentropy.dev/v1/models/rerank (zerank-2)
|
|
10
10
|
* - OpenRouterReranker — https://openrouter.ai/api/v1/rerank (cohere/rerank-4-pro)
|
|
11
11
|
* - OllamaReranker — http://localhost:11434/api/chat (yes/no classification)
|
|
12
12
|
*
|
package/dist/reranker.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* order without disruption.
|
|
7
7
|
*
|
|
8
8
|
* Providers:
|
|
9
|
-
* - ZeroEntropyReranker — https://api.zeroentropy.dev/v1/rerank (zerank-2)
|
|
9
|
+
* - ZeroEntropyReranker — https://api.zeroentropy.dev/v1/models/rerank (zerank-2)
|
|
10
10
|
* - OpenRouterReranker — https://openrouter.ai/api/v1/rerank (cohere/rerank-4-pro)
|
|
11
11
|
* - OllamaReranker — http://localhost:11434/api/chat (yes/no classification)
|
|
12
12
|
*
|
|
@@ -100,7 +100,7 @@ export class ZeroEntropyReranker {
|
|
|
100
100
|
return null;
|
|
101
101
|
const { controller, clear } = withTimeout(this.timeoutMs);
|
|
102
102
|
try {
|
|
103
|
-
const response = await fetch('https://api.zeroentropy.dev/v1/rerank', {
|
|
103
|
+
const response = await fetch('https://api.zeroentropy.dev/v1/models/rerank', {
|
|
104
104
|
method: 'POST',
|
|
105
105
|
headers: {
|
|
106
106
|
'Content-Type': 'application/json',
|
package/dist/schema.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Contains ONLY conversation data — structured knowledge lives in library.db.
|
|
7
7
|
*/
|
|
8
8
|
import type { DatabaseSync } from 'node:sqlite';
|
|
9
|
-
export declare const LATEST_SCHEMA_VERSION =
|
|
9
|
+
export declare const LATEST_SCHEMA_VERSION = 11;
|
|
10
10
|
/**
|
|
11
11
|
* Run migrations on an agent message database.
|
|
12
12
|
*/
|
package/dist/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAgJxC;;GAEG;AACH,wBAAgB,OAAO,CAAC,EAAE,EAAE,YAAY,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAgJxC;;GAEG;AACH,wBAAgB,OAAO,CAAC,EAAE,EAAE,YAAY,GAAG,IAAI,CAsM9C;AAED,OAAO,EAAE,qBAAqB,IAAI,cAAc,EAAE,CAAC"}
|
package/dist/schema.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Write-heavy, temporal, rotatable.
|
|
6
6
|
* Contains ONLY conversation data — structured knowledge lives in library.db.
|
|
7
7
|
*/
|
|
8
|
-
export const LATEST_SCHEMA_VERSION =
|
|
8
|
+
export const LATEST_SCHEMA_VERSION = 11;
|
|
9
9
|
function nowIso() {
|
|
10
10
|
return new Date().toISOString();
|
|
11
11
|
}
|
|
@@ -295,6 +295,33 @@ export function migrate(db) {
|
|
|
295
295
|
db.prepare('INSERT OR IGNORE INTO schema_version (version, applied_at) VALUES (?, ?)')
|
|
296
296
|
.run(10, nowIso());
|
|
297
297
|
}
|
|
298
|
+
// v10 → v11: composition snapshot sidecar for warm-restore capture.
|
|
299
|
+
if (currentVersion < 11) {
|
|
300
|
+
db.exec(`
|
|
301
|
+
CREATE TABLE IF NOT EXISTS composition_snapshots (
|
|
302
|
+
id INTEGER PRIMARY KEY,
|
|
303
|
+
context_id INTEGER NOT NULL REFERENCES contexts(id) ON DELETE CASCADE,
|
|
304
|
+
head_message_id INTEGER REFERENCES messages(id),
|
|
305
|
+
schema_version INTEGER NOT NULL DEFAULT 1,
|
|
306
|
+
captured_at TEXT NOT NULL,
|
|
307
|
+
model TEXT NOT NULL,
|
|
308
|
+
context_window INTEGER NOT NULL,
|
|
309
|
+
total_tokens INTEGER NOT NULL,
|
|
310
|
+
fill_pct REAL NOT NULL,
|
|
311
|
+
snapshot_kind TEXT NOT NULL DEFAULT 'full',
|
|
312
|
+
repair_depth INTEGER NOT NULL DEFAULT 0,
|
|
313
|
+
slots_json TEXT NOT NULL,
|
|
314
|
+
slots_integrity_hash TEXT NOT NULL,
|
|
315
|
+
created_at TEXT NOT NULL
|
|
316
|
+
)
|
|
317
|
+
`);
|
|
318
|
+
db.exec(`
|
|
319
|
+
CREATE INDEX IF NOT EXISTS idx_composition_snapshots_context_recent
|
|
320
|
+
ON composition_snapshots(context_id, captured_at DESC)
|
|
321
|
+
`);
|
|
322
|
+
db.prepare('INSERT OR IGNORE INTO schema_version (version, applied_at) VALUES (?, ?)')
|
|
323
|
+
.run(11, nowIso());
|
|
324
|
+
}
|
|
298
325
|
}
|
|
299
326
|
export { LATEST_SCHEMA_VERSION as SCHEMA_VERSION };
|
|
300
327
|
//# sourceMappingURL=schema.js.map
|
package/dist/seed.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Usage:
|
|
8
8
|
* const seeder = new WorkspaceSeeder(hypermem);
|
|
9
|
-
* const result = await seeder.seedWorkspace('/path/to/workspace', { agentId: '
|
|
9
|
+
* const result = await seeder.seedWorkspace('/path/to/workspace', { agentId: 'alice' });
|
|
10
10
|
*
|
|
11
11
|
* Idempotent: skips files whose source hash hasn't changed since last index.
|
|
12
12
|
* Atomic: each file's chunks are swapped in a single transaction.
|
package/dist/seed.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seed.d.ts","sourceRoot":"","sources":["../src/seed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAKH,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAIvE,MAAM,WAAW,WAAW;IAC1B,2CAA2C;IAC3C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yDAAyD;IACzD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,mEAAmE;IACnE,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,4DAA4D;IAC5D,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,WAAW,CAAC;CACrB;AAED,MAAM,WAAW,UAAU;IACzB,mCAAmC;IACnC,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,gCAAgC;IAChC,aAAa,EAAE,MAAM,CAAC;IACtB,iCAAiC;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB,2CAA2C;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,iCAAiC;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,4BAA4B;I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