@manifesto-ai/lineage 0.1.1 → 3.1.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/README.md CHANGED
@@ -1,44 +1,49 @@
1
1
  # @manifesto-ai/lineage
2
2
 
3
- > Split-native lineage protocol for identity, history, and sealing.
3
+ > Seal-aware continuity for the ADR-017 decorator runtime.
4
4
 
5
- `@manifesto-ai/lineage` is the package to use when you need deterministic world identity, branch history, and snapshot sealing directly. It is the lower substrate that `@manifesto-ai/governance` and `@manifesto-ai/world` build on.
5
+ `@manifesto-ai/lineage` is the package that adds time, history, and restore to a composable manifesto.
6
6
 
7
- > **Current Contract Note:** The current public package contract is documented in [docs/lineage-SPEC-2.0.0v.md](docs/lineage-SPEC-2.0.0v.md). The v1.x lineage docs remain available as historical split-era baselines.
7
+ > **Current Contract Note:** The truthful current package contract is [docs/lineage-SPEC-v3.0.0-draft.md](docs/lineage-SPEC-v3.0.0-draft.md). The v2 lineage spec remains as the historical service-first baseline.
8
8
 
9
9
  ## What This Package Owns
10
10
 
11
- - snapshot and world identity computation
12
- - branch, head, and epoch reads
13
- - seal protocol and prepared commits
14
- - lineage persistence and replay
15
- - in-memory lineage storage
11
+ - `withLineage(createManifesto(...), config).activate()`
12
+ - lineage-aware `commitAsync` that seals before publication
13
+ - restore, head, branch, and world queries on the activated runtime
14
+ - `getLineage()` for DAG inspection on the activated runtime
15
+ - sealing substrate and the internal provider surface
16
+ - deterministic world identity, branch semantics, and restore normalization
16
17
 
17
- ## When to Use It
18
+ ## Canonical Path
18
19
 
19
- Use `@manifesto-ai/lineage` directly when you want:
20
+ ```ts
21
+ import { createManifesto } from "@manifesto-ai/sdk";
22
+ import { withLineage, createInMemoryLineageStore } from "@manifesto-ai/lineage";
20
23
 
21
- - world history without governance
22
- - deterministic identity and resume support
23
- - custom persistence or replay tooling
24
- - isolated tests for hashing, branch, and sealing behavior
24
+ const manifesto = createManifesto<CounterDomain>(schema, effects);
25
+ const world = withLineage(manifesto, {
26
+ store: createInMemoryLineageStore(),
27
+ }).activate();
25
28
 
26
- ## Quick Start
29
+ await world.commitAsync(
30
+ world.createIntent(world.MEL.actions.increment),
31
+ );
27
32
 
28
- ```typescript
29
- import {
30
- createInMemoryLineageStore,
31
- createLineageService,
32
- } from "@manifesto-ai/lineage";
33
-
34
- const store = createInMemoryLineageStore();
35
- const lineage = createLineageService(store);
33
+ const head = await world.getLatestHead();
34
+ if (head) {
35
+ await world.restore(head.worldId);
36
+ }
36
37
  ```
37
38
 
39
+ ## Low-Level Usage
40
+
41
+ Use `@manifesto-ai/lineage/internal` when you need `LineageService`, `LineageStore`, prepared commits, or custom persistence without the activated runtime wrapper.
42
+
38
43
  ## Docs
39
44
 
40
45
  - [Docs Landing](docs/README.md)
41
46
  - [Lineage Guide](docs/GUIDE.md)
42
- - [Lineage Specification](docs/lineage-SPEC-2.0.0v.md)
43
- - [Historical v1 Baseline](docs/lineage-SPEC-1.0.1v.md)
47
+ - [Lineage Specification](docs/lineage-SPEC-v3.0.0-draft.md)
48
+ - [Historical v2 Service-First SPEC](docs/lineage-SPEC-2.0.0v.md)
44
49
  - [VERSION-INDEX](docs/VERSION-INDEX.md)