@tangleai/pipeline 0.21.1 → 0.24.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/CHANGELOG.md +35 -0
- package/README.md +11 -0
- package/package.json +7 -7
- package/src/run.d.ts +1 -1
- package/src/run.js +3 -7
- package/src/standins.d.ts +4 -32
- package/src/standins.js +4 -31
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# @tangleai/pipeline
|
|
2
2
|
|
|
3
|
+
## 0.24.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- @tangleai/core@0.24.1
|
|
8
|
+
- @tangleai/memory@0.24.1
|
|
9
|
+
- @tangleai/models@0.24.1
|
|
10
|
+
|
|
11
|
+
## 0.24.0
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
- @tangleai/memory@0.24.0
|
|
17
|
+
- @tangleai/core@0.24.0
|
|
18
|
+
- @tangleai/models@0.24.0
|
|
19
|
+
|
|
20
|
+
## 0.23.0
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
- @tangleai/memory@0.23.0
|
|
26
|
+
- @tangleai/core@0.23.0
|
|
27
|
+
- @tangleai/models@0.23.0
|
|
28
|
+
|
|
29
|
+
## 0.22.0
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- Updated dependencies
|
|
34
|
+
- @tangleai/models@0.22.0
|
|
35
|
+
- @tangleai/core@0.22.0
|
|
36
|
+
- @tangleai/memory@0.22.0
|
|
37
|
+
|
|
3
38
|
## 0.21.1
|
|
4
39
|
|
|
5
40
|
### 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.
|
|
3
|
+
"version": "0.24.1",
|
|
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.
|
|
42
|
-
"@tangleai/memory": "^0.
|
|
43
|
-
"@jarenjs/flow": "0.
|
|
44
|
-
"@jarenjs/json": "0.
|
|
45
|
-
"@jarenjs/mermaid": "0.
|
|
46
|
-
"@tangleai/models": "^0.
|
|
41
|
+
"@tangleai/core": "^0.24.1",
|
|
42
|
+
"@tangleai/memory": "^0.24.1",
|
|
43
|
+
"@jarenjs/flow": "0.86.0",
|
|
44
|
+
"@jarenjs/json": "0.86.0",
|
|
45
|
+
"@jarenjs/mermaid": "0.86.0",
|
|
46
|
+
"@tangleai/models": "^0.24.1"
|
|
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
|
|
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
|
|
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
|
|
33
|
-
/**
|
|
34
|
-
export declare const OFFLINE_EMBEDDER_DIMS
|
|
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
|
-
|
|
32
|
-
|
|
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 });
|