@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 +30 -25
- package/dist/chunk-STH2THPH.js +770 -0
- package/dist/chunk-STH2THPH.js.map +1 -0
- package/dist/hash.d.ts +14 -0
- package/dist/index.d.ts +4 -411
- package/dist/index.js +134 -535
- package/dist/index.js.map +1 -1
- package/dist/internal/clone.d.ts +1 -0
- package/dist/internal.d.ts +49 -0
- package/dist/internal.js +17 -0
- package/dist/internal.js.map +1 -0
- package/dist/invariants.d.ts +1 -0
- package/dist/query.d.ts +8 -0
- package/dist/records.d.ts +11 -0
- package/dist/runtime-types.d.ts +39 -0
- package/dist/service/lineage-service.d.ts +130 -0
- package/dist/store/in-memory-lineage-store.d.ts +53 -0
- package/dist/types.d.ts +197 -0
- package/dist/with-lineage.d.ts +3 -0
- package/package.json +11 -3
package/README.md
CHANGED
|
@@ -1,44 +1,49 @@
|
|
|
1
1
|
# @manifesto-ai/lineage
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Seal-aware continuity for the ADR-017 decorator runtime.
|
|
4
4
|
|
|
5
|
-
`@manifesto-ai/lineage` is the package
|
|
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
|
|
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
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
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
|
-
##
|
|
18
|
+
## Canonical Path
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
```ts
|
|
21
|
+
import { createManifesto } from "@manifesto-ai/sdk";
|
|
22
|
+
import { withLineage, createInMemoryLineageStore } from "@manifesto-ai/lineage";
|
|
20
23
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
const manifesto = createManifesto<CounterDomain>(schema, effects);
|
|
25
|
+
const world = withLineage(manifesto, {
|
|
26
|
+
store: createInMemoryLineageStore(),
|
|
27
|
+
}).activate();
|
|
25
28
|
|
|
26
|
-
|
|
29
|
+
await world.commitAsync(
|
|
30
|
+
world.createIntent(world.MEL.actions.increment),
|
|
31
|
+
);
|
|
27
32
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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-
|
|
43
|
-
- [Historical
|
|
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)
|