@atomicmemory/core 1.0.0 → 1.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.
- package/dist/config.d.ts +2 -2
- package/dist/db/belief-edges-repository.d.ts +1 -1
- package/dist/db/belief-edges-repository.js +1 -1
- package/dist/db/schema.sql +2 -2
- package/dist/db/summaries-repository.d.ts +1 -2
- package/dist/db/summaries-repository.js +1 -2
- package/dist/services/memory-service-types.d.ts +0 -1
- package/dist/services/retrieval-policy.js +1 -1
- package/dist/services/typed-belief-calculus.d.ts +1 -2
- package/dist/services/typed-belief-calculus.js +1 -2
- package/package.json +1 -1
package/dist/config.d.ts
CHANGED
|
@@ -175,7 +175,7 @@ export interface RuntimeConfig {
|
|
|
175
175
|
* Typed Belief Calculus (TBC) gate. When true, the AUDN decision step
|
|
176
176
|
* defers to `decideBeliefOperator` from `services/typed-belief-calculus.ts`.
|
|
177
177
|
* Default false — Phase 1 ships only the type surface and stub resolver,
|
|
178
|
-
* so existing AUDN behavior is unchanged.
|
|
178
|
+
* so existing AUDN behavior is unchanged.
|
|
179
179
|
*/
|
|
180
180
|
tbcEnabled: boolean;
|
|
181
181
|
/**
|
|
@@ -183,7 +183,7 @@ export interface RuntimeConfig {
|
|
|
183
183
|
* conversation/session summaries first, then expands to atomic facts within
|
|
184
184
|
* the matched sessions. Targets BEAM-10M scale (~14M tokens of context per
|
|
185
185
|
* system) where flat top-K retrieval loses signal.
|
|
186
|
-
* Default false.
|
|
186
|
+
* Default false.
|
|
187
187
|
* Env var: HIERARCHICAL_RETRIEVAL_ENABLED=true
|
|
188
188
|
*/
|
|
189
189
|
hierarchicalRetrievalEnabled: boolean;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Promote / Demote operators of the typed belief calculus.
|
|
5
5
|
*
|
|
6
6
|
* Schema lives in src/db/schema.sql under "TBC Phase 3" section.
|
|
7
|
-
* Activated only when `TBC_ENABLED=true
|
|
7
|
+
* Activated only when `TBC_ENABLED=true`.
|
|
8
8
|
*/
|
|
9
9
|
import pg from 'pg';
|
|
10
10
|
export type BeliefEdgeType = 'evidence_for' | 'counter' | 'supersedes' | 'promotes' | 'demotes';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Promote / Demote operators of the typed belief calculus.
|
|
5
5
|
*
|
|
6
6
|
* Schema lives in src/db/schema.sql under "TBC Phase 3" section.
|
|
7
|
-
* Activated only when `TBC_ENABLED=true
|
|
7
|
+
* Activated only when `TBC_ENABLED=true`.
|
|
8
8
|
*/
|
|
9
9
|
export class BeliefEdgesRepository {
|
|
10
10
|
pool;
|
package/dist/db/schema.sql
CHANGED
|
@@ -520,7 +520,7 @@ CREATE INDEX IF NOT EXISTS idx_memory_foresight_workspace
|
|
|
520
520
|
-- Promotes belief state from `memories.metadata` JSONB into typed columns +
|
|
521
521
|
-- a new `belief_edges` table. All additions are idempotent (IF NOT EXISTS).
|
|
522
522
|
-- Pre-migration databases stay queryable; tbc-execution.ts dual-writes
|
|
523
|
-
-- during the migration window.
|
|
523
|
+
-- during the migration window.
|
|
524
524
|
-- Activated only when TBC_ENABLED=true; defaults preserve existing behavior.
|
|
525
525
|
-- ---------------------------------------------------------------------------
|
|
526
526
|
|
|
@@ -593,7 +593,7 @@ CREATE INDEX IF NOT EXISTS idx_belief_edges_user_target
|
|
|
593
593
|
-- BEAM-10M scale (10 conversations × ~1.4M tokens each = ~14M total context).
|
|
594
594
|
-- session_summaries + conv_summaries indexed via HNSW on summary_embedding.
|
|
595
595
|
-- Activated only when HIERARCHICAL_RETRIEVAL_ENABLED=true; defaults preserve
|
|
596
|
-
-- existing flat-retrieval behavior.
|
|
596
|
+
-- existing flat-retrieval behavior.
|
|
597
597
|
-- ---------------------------------------------------------------------------
|
|
598
598
|
|
|
599
599
|
CREATE TABLE IF NOT EXISTS session_summaries (
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Repository for hierarchical-retrieval session + conversation summaries.
|
|
3
3
|
* Schema lives in src/db/schema.sql under "Hierarchical Retrieval" section.
|
|
4
|
-
* Activated only when `HIERARCHICAL_RETRIEVAL_ENABLED=true
|
|
5
|
-
* docs/hierarchical-retrieval.md.
|
|
4
|
+
* Activated only when `HIERARCHICAL_RETRIEVAL_ENABLED=true`.
|
|
6
5
|
*
|
|
7
6
|
* Reads use pgvector cosine distance (`embedding <=> $1`) returning
|
|
8
7
|
* `1 - distance` as similarity. The `pgvector` package converts JS
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Repository for hierarchical-retrieval session + conversation summaries.
|
|
3
3
|
* Schema lives in src/db/schema.sql under "Hierarchical Retrieval" section.
|
|
4
|
-
* Activated only when `HIERARCHICAL_RETRIEVAL_ENABLED=true
|
|
5
|
-
* docs/hierarchical-retrieval.md.
|
|
4
|
+
* Activated only when `HIERARCHICAL_RETRIEVAL_ENABLED=true`.
|
|
6
5
|
*
|
|
7
6
|
* Reads use pgvector cosine distance (`embedding <=> $1`) returning
|
|
8
7
|
* `1 - distance` as similarity. The `pgvector` package converts JS
|
|
@@ -323,7 +323,6 @@ export interface IngestRuntimeConfig {
|
|
|
323
323
|
* Hierarchical retrieval gate. When true, ingest generates session +
|
|
324
324
|
* conversation summaries (session-summary-generator.ts); search adds a 5th
|
|
325
325
|
* RRF arm over those summaries. Default false — no runtime effect today.
|
|
326
|
-
* See `docs/hierarchical-retrieval.md`.
|
|
327
326
|
*/
|
|
328
327
|
hierarchicalRetrievalEnabled: boolean;
|
|
329
328
|
/**
|
|
@@ -26,7 +26,7 @@ const RECALL_BYPASS_REASONS = {
|
|
|
26
26
|
*
|
|
27
27
|
* Validated 2026-04-01: 0/15 false positives across 2,173 benchmark queries
|
|
28
28
|
* (7 datasets). 4 borderline date-pinned queries are harmless (extra depth,
|
|
29
|
-
* no accuracy impact).
|
|
29
|
+
* no accuracy impact).
|
|
30
30
|
*
|
|
31
31
|
* If editing this list, re-run the FP scan:
|
|
32
32
|
* classifyQueryDetailed() against all eval dataset queries.
|
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
* Phase 2 (this revision) wires `decideBeliefOperator` to a real LLM call
|
|
10
10
|
* and lets `memory-audn.ts` route through it when `RuntimeConfig.tbcEnabled`
|
|
11
11
|
* is true. Schema is unchanged — TBC mutations write to existing JSONB
|
|
12
|
-
* metadata only. See `tbc-execution.ts` for the executor
|
|
13
|
-
* `docs/typed-belief-calculus.md` for design rationale.
|
|
12
|
+
* metadata only. See `tbc-execution.ts` for the executor.
|
|
14
13
|
*/
|
|
15
14
|
import type { LLMProvider } from './llm.js';
|
|
16
15
|
import type { CandidateMemory } from './conflict-policy.js';
|
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
* Phase 2 (this revision) wires `decideBeliefOperator` to a real LLM call
|
|
10
10
|
* and lets `memory-audn.ts` route through it when `RuntimeConfig.tbcEnabled`
|
|
11
11
|
* is true. Schema is unchanged — TBC mutations write to existing JSONB
|
|
12
|
-
* metadata only. See `tbc-execution.ts` for the executor
|
|
13
|
-
* `docs/typed-belief-calculus.md` for design rationale.
|
|
12
|
+
* metadata only. See `tbc-execution.ts` for the executor.
|
|
14
13
|
*/
|
|
15
14
|
import { llm as defaultLlm } from './llm.js';
|
|
16
15
|
import { extractFirstJsonObject } from './extraction.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atomicmemory/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Open-source memory engine for AI applications — semantic retrieval, AUDN mutation, and contradiction-safe claim versioning.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|