@tangleai/pipeline 0.20.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 +67 -0
- package/README.md +11 -0
- package/package.json +7 -7
- package/src/run.d.ts +3 -3
- package/src/run.js +4 -8
- package/src/standins.d.ts +5 -33
- package/src/standins.js +5 -32
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,72 @@
|
|
|
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
|
+
|
|
38
|
+
## 0.21.1
|
|
39
|
+
|
|
40
|
+
### Patch Changes
|
|
41
|
+
|
|
42
|
+
- Update the exact Jaren foundation dependencies and source pin to the published
|
|
43
|
+
0.84.3 release after verifying its AI-free archives against source-built bytes.
|
|
44
|
+
Retain Tangle's model, context and agent ownership and align the development
|
|
45
|
+
Node pin with 24.20.0. Tangle publication remains a manual author action.
|
|
46
|
+
Allow release preparation after an already committed local release while
|
|
47
|
+
preserving its record and rejecting unprepared version edits.
|
|
48
|
+
- Updated dependencies
|
|
49
|
+
- @tangleai/models@0.21.1
|
|
50
|
+
- @tangleai/core@0.21.1
|
|
51
|
+
- @tangleai/memory@0.21.1
|
|
52
|
+
|
|
53
|
+
## 0.21.0
|
|
54
|
+
|
|
55
|
+
### Minor Changes
|
|
56
|
+
|
|
57
|
+
- Use the models, context and agents owners of the inherited AI mechanisms. MAS
|
|
58
|
+
executable identity version 3 names all executed mechanism versions; an old
|
|
59
|
+
executable checkpoint is refused intact through the existing mismatch path.
|
|
60
|
+
Memory and ledger records retain their schemas and projection contracts.
|
|
61
|
+
|
|
62
|
+
### Patch Changes
|
|
63
|
+
|
|
64
|
+
- Updated dependencies
|
|
65
|
+
- Updated dependencies
|
|
66
|
+
- @tangleai/core@0.21.0
|
|
67
|
+
- @tangleai/memory@0.21.0
|
|
68
|
+
- @tangleai/models@0.21.0
|
|
69
|
+
|
|
3
70
|
## 0.20.1
|
|
4
71
|
|
|
5
72
|
### 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/
|
|
44
|
-
"@jarenjs/
|
|
45
|
-
"@jarenjs/
|
|
46
|
-
"@
|
|
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
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
*
|
|
4
4
|
* `createPipeline` binds the DAG's named task handlers to injected
|
|
5
5
|
* seams — the store (any MemoryStore: in-memory for tests and the pages
|
|
6
|
-
* demo, SQLite in the desktop app), an embedder (the @
|
|
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
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* store, not in the return value. Per-node timing/status records stream
|
|
18
18
|
* through `onNode` exactly as @jarenjs/flow emits them.
|
|
19
19
|
*/
|
|
20
|
-
import type { Embedder } from '@
|
|
20
|
+
import type { Embedder } from '@tangleai/models/embed';
|
|
21
21
|
import { type MemoryStore, type MemoryUnitInput } from '@tangleai/memory';
|
|
22
22
|
import { type Judge } from './standins.ts';
|
|
23
23
|
export interface PipelineThresholds {
|
package/src/run.js
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
*
|
|
4
4
|
* `createPipeline` binds the DAG's named task handlers to injected
|
|
5
5
|
* seams — the store (any MemoryStore: in-memory for tests and the pages
|
|
6
|
-
* demo, SQLite in the desktop app), an embedder (the @
|
|
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
|
-
|
|
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 @jarenjs/ai'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
|
-
*/
|
|
30
|
-
import { type Embedder } from '@jarenjs/ai/embed';
|
|
1
|
+
/** Offline seams: the selected lexical hash width and the local numeric-contrast judge. */
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
* `createOfflineEmbedder` is @jarenjs/ai'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
|
-
*/
|
|
30
|
-
import { createHashEmbedder } from '@jarenjs/ai/embed';
|
|
31
|
-
/** The measured width (see the header). */
|
|
32
|
-
export const OFFLINE_EMBEDDER_DIMS = 64;
|
|
1
|
+
/** Offline seams: the selected lexical hash width and the local numeric-contrast judge. */
|
|
2
|
+
import { createHashEmbedder } from '@tangleai/models/embed';
|
|
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 });
|