@tangleai/pipeline 0.21.1 → 0.25.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 CHANGED
@@ -1,5 +1,48 @@
1
1
  # @tangleai/pipeline
2
2
 
3
+ ## 0.25.0
4
+
5
+ ### Patch Changes
6
+
7
+ - @tangleai/core@0.25.0
8
+ - @tangleai/memory@0.25.0
9
+ - @tangleai/models@0.25.0
10
+
11
+ ## 0.24.1
12
+
13
+ ### Patch Changes
14
+
15
+ - @tangleai/core@0.24.1
16
+ - @tangleai/memory@0.24.1
17
+ - @tangleai/models@0.24.1
18
+
19
+ ## 0.24.0
20
+
21
+ ### Patch Changes
22
+
23
+ - Updated dependencies
24
+ - @tangleai/memory@0.24.0
25
+ - @tangleai/core@0.24.0
26
+ - @tangleai/models@0.24.0
27
+
28
+ ## 0.23.0
29
+
30
+ ### Patch Changes
31
+
32
+ - Updated dependencies
33
+ - @tangleai/memory@0.23.0
34
+ - @tangleai/core@0.23.0
35
+ - @tangleai/models@0.23.0
36
+
37
+ ## 0.22.0
38
+
39
+ ### Patch Changes
40
+
41
+ - Updated dependencies
42
+ - @tangleai/models@0.22.0
43
+ - @tangleai/core@0.22.0
44
+ - @tangleai/memory@0.22.0
45
+
3
46
  ## 0.21.1
4
47
 
5
48
  ### Patch Changes
package/README.md CHANGED
@@ -5,3 +5,14 @@ Tangle AI pipeline — the memory loop as a jaren-dag document, executed by @jar
5
5
  Install with `npm install @tangleai/pipeline`. The npm distribution provides ESM JavaScript, TypeScript declarations, and the documented package subpaths for Node 24 and Bun 1.4 or newer.
6
6
 
7
7
  See the [Tangle documentation](https://github.com/jklarenbeek/tangleai#readme) for architecture, examples, and runtime requirements. All public Tangle packages use one coordinated version.
8
+
9
+ `DEFAULT_THRESHOLDS` and `createOfflineEmbedder()` consume the selected
10
+ `@tangleai/memory/policy` contract. The current ingest default is inert (novelty,
11
+ contradiction and crystallization thresholds are 2); the offline embedder is
12
+ `hash-trigram-512`. Explicit `thresholds`, `embedder` and `judge` options retain
13
+ their meanings. Outcome learning remains driven by evidenced outcomes.
14
+
15
+ The [memory package](../memory/README.md) documents the exact policy provenance,
16
+ measured alternatives and the explicit historical 64-dimensional configuration.
17
+ The [registered report](https://github.com/jklarenbeek/tangleai/blob/main/docs/LOCOMO_POLICY.md)
18
+ explains the held-out bounded-null decision and the independent lexical width.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangleai/pipeline",
3
- "version": "0.21.1",
3
+ "version": "0.25.0",
4
4
  "description": "Tangle AI pipeline — the memory loop as a jaren-dag document, executed by @jarenjs/flow, projected to mermaid for display",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -38,12 +38,12 @@
38
38
  },
39
39
  "sideEffects": false,
40
40
  "dependencies": {
41
- "@tangleai/core": "^0.21.1",
42
- "@tangleai/memory": "^0.21.1",
43
- "@jarenjs/flow": "0.84.3",
44
- "@jarenjs/json": "0.84.3",
45
- "@jarenjs/mermaid": "0.84.3",
46
- "@tangleai/models": "^0.21.1"
41
+ "@tangleai/core": "^0.25.0",
42
+ "@tangleai/memory": "^0.25.0",
43
+ "@jarenjs/flow": "0.86.0",
44
+ "@jarenjs/json": "0.86.0",
45
+ "@jarenjs/mermaid": "0.86.0",
46
+ "@tangleai/models": "^0.25.0"
47
47
  },
48
48
  "private": false,
49
49
  "types": "./src/index.d.ts",
package/src/run.d.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  * demo, SQLite in the desktop app), an embedder (the @tangleai/models seam:
7
7
  * `{ embed, model, dims }` — `createEmbeddingClient` for a wire,
8
8
  * `createHashEmbedder` as the offline default), a contradiction judge,
9
- * a clock, and the tuned thresholds (salvaged memflow defaults). The
9
+ * a clock, and explicit threshold overrides over the measured policy. The
10
10
  * document stays pure JSON; everything replaceable arrives here.
11
11
  *
12
12
  * Every vector the embed node writes carries its identity
package/src/run.js CHANGED
@@ -6,7 +6,7 @@
6
6
  * demo, SQLite in the desktop app), an embedder (the @tangleai/models seam:
7
7
  * `{ embed, model, dims }` — `createEmbeddingClient` for a wire,
8
8
  * `createHashEmbedder` as the offline default), a contradiction judge,
9
- * a clock, and the tuned thresholds (salvaged memflow defaults). The
9
+ * a clock, and explicit threshold overrides over the measured policy. The
10
10
  * document stays pure JSON; everything replaceable arrives here.
11
11
  *
12
12
  * Every vector the embed node writes carries its identity
@@ -18,14 +18,10 @@
18
18
  * through `onNode` exactly as @jarenjs/flow emits them.
19
19
  */
20
20
  import { compileDag } from '@jarenjs/flow';
21
- import { createMemoryUnit, noveltyGate, planContradictionPairs, resolveContradictions, planCrystallization, applyCrystallization, } from '@tangleai/memory';
21
+ import { createMemoryUnit, noveltyGate, policyThresholds, planContradictionPairs, resolveContradictions, planCrystallization, applyCrystallization, } from '@tangleai/memory';
22
22
  import { createOfflineEmbedder, numericContrastJudge } from "./standins.js";
23
23
  import { PIPELINE_DAG } from "./dag.js";
24
- export const DEFAULT_THRESHOLDS = {
25
- novelty: 0.97,
26
- contradiction: 0.8,
27
- crystallize: 0.9,
28
- };
24
+ export const DEFAULT_THRESHOLDS = policyThresholds();
29
25
  export function createPipeline(options) {
30
26
  const store = options.store;
31
27
  const embedder = options.embedder ?? createOfflineEmbedder();
package/src/standins.d.ts CHANGED
@@ -1,37 +1,9 @@
1
- /**
2
- * The two offline stand-ins — an embedder and a contradiction judge —
3
- * that let the whole pipeline run with zero network, promoted out of
4
- * `examples/skeleton.ts` because the desktop app and the pages demo
5
- * need them as real seams.
6
- *
7
- * `createOfflineEmbedder` is @tangleai/models's `createHashEmbedder` — the
8
- * suite's own deterministic hashed-trigram reference, behind the same
9
- * `{ embed, model, dims }` seam a wire client fills — at the width the
10
- * pipeline's thresholds were measured against. Measured over the
11
- * skeleton corpus (2026-08-26, `hash-trigram-<dims>`, cosine), against
12
- * the defaults novelty 0.97 / crystallize 0.9 / contradiction 0.8:
13
- *
14
- * dims repeat paraphrase contradiction max-unrelated
15
- * 64 0.989 0.931 0.964 0.606 ← every pair on its side of every threshold
16
- * 128 0.985 0.902 0.954 0.424 ← paraphrase a hair over the 0.9 merge line
17
- * 256 0.984 0.888 0.941 0.323 ← paraphrase under the merge line: never crystallized
18
- * 512 0.983 0.884 0.936 0.225
19
- *
20
- * 64 — the suite's own default — is the width with margin on all four:
21
- * wider buckets spread the shared trigrams thinner, so the paraphrase
22
- * loses its merge long before an unrelated pair threatens the 0.8
23
- * judge line. It stays demo-grade and lexical — a real model behind
24
- * the same seam is the upgrade.
25
- *
26
- * `numericContrastJudge` flags two records that agree in words but
27
- * disagree in figures — the rule stand-in for an LLM contradiction
28
- * judge (`createStructuredOutput` over `contradictionMessages`).
29
- */
1
+ /** Offline seams: the selected lexical hash width and the local numeric-contrast judge. */
30
2
  import { type Embedder } from '@tangleai/models/embed';
31
3
  import type { MemoryUnit } from '@tangleai/core/schemas/memory';
32
- import type { ContradictionVerdict } from '@tangleai/memory';
33
- /** The measured width (see the header). */
34
- export declare const OFFLINE_EMBEDDER_DIMS = 64;
4
+ import { type ContradictionVerdict } from '@tangleai/memory';
5
+ /** Selected by lexical evidence recall, independently of live F1. */
6
+ export declare const OFFLINE_EMBEDDER_DIMS: number;
35
7
  /** The offline embedder: the suite's hash reference at the measured width. */
36
8
  export declare function createOfflineEmbedder(): Embedder & {
37
9
  dims: number;
package/src/standins.js CHANGED
@@ -1,35 +1,8 @@
1
- /**
2
- * The two offline stand-ins — an embedder and a contradiction judge —
3
- * that let the whole pipeline run with zero network, promoted out of
4
- * `examples/skeleton.ts` because the desktop app and the pages demo
5
- * need them as real seams.
6
- *
7
- * `createOfflineEmbedder` is @tangleai/models's `createHashEmbedder` — the
8
- * suite's own deterministic hashed-trigram reference, behind the same
9
- * `{ embed, model, dims }` seam a wire client fills — at the width the
10
- * pipeline's thresholds were measured against. Measured over the
11
- * skeleton corpus (2026-08-26, `hash-trigram-<dims>`, cosine), against
12
- * the defaults novelty 0.97 / crystallize 0.9 / contradiction 0.8:
13
- *
14
- * dims repeat paraphrase contradiction max-unrelated
15
- * 64 0.989 0.931 0.964 0.606 ← every pair on its side of every threshold
16
- * 128 0.985 0.902 0.954 0.424 ← paraphrase a hair over the 0.9 merge line
17
- * 256 0.984 0.888 0.941 0.323 ← paraphrase under the merge line: never crystallized
18
- * 512 0.983 0.884 0.936 0.225
19
- *
20
- * 64 — the suite's own default — is the width with margin on all four:
21
- * wider buckets spread the shared trigrams thinner, so the paraphrase
22
- * loses its merge long before an unrelated pair threatens the 0.8
23
- * judge line. It stays demo-grade and lexical — a real model behind
24
- * the same seam is the upgrade.
25
- *
26
- * `numericContrastJudge` flags two records that agree in words but
27
- * disagree in figures — the rule stand-in for an LLM contradiction
28
- * judge (`createStructuredOutput` over `contradictionMessages`).
29
- */
1
+ /** Offline seams: the selected lexical hash width and the local numeric-contrast judge. */
30
2
  import { createHashEmbedder } from '@tangleai/models/embed';
31
- /** The measured width (see the header). */
32
- export const OFFLINE_EMBEDDER_DIMS = 64;
3
+ import { DEFAULT_MEMORY_POLICY } from '@tangleai/memory';
4
+ /** Selected by lexical evidence recall, independently of live F1. */
5
+ export const OFFLINE_EMBEDDER_DIMS = DEFAULT_MEMORY_POLICY.embedding.dims;
33
6
  /** The offline embedder: the suite's hash reference at the measured width. */
34
7
  export function createOfflineEmbedder() {
35
8
  return createHashEmbedder({ dims: OFFLINE_EMBEDDER_DIMS });