diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml
index 088e31b99..6f3b17791 100644
--- a/.github/workflows/links.yml
+++ b/.github/workflows/links.yml
@@ -21,6 +21,7 @@ jobs:
with:
args: >-
--config .lychee.toml
+ --include-fragments
'**/*.md'
fail: true
format: markdown
diff --git a/.github/workflows/main-push-release-branch-check.yml b/.github/workflows/main-push-release-branch-check.yml
index 79811d407..89465618b 100644
--- a/.github/workflows/main-push-release-branch-check.yml
+++ b/.github/workflows/main-push-release-branch-check.yml
@@ -88,6 +88,7 @@ jobs:
with:
args: >-
--config .lychee.toml
+ --include-fragments
'**/*.md'
fail: true
format: markdown
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 1e032f5cc..1312ac0ef 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -109,6 +109,7 @@ jobs:
with:
args: >-
--config .lychee.toml
+ --include-fragments
'**/*.md'
fail: true
format: markdown
diff --git a/.lychee.toml b/.lychee.toml
index d99526caf..e7a34f261 100644
--- a/.lychee.toml
+++ b/.lychee.toml
@@ -11,9 +11,6 @@ offline = true
# Resolve bare links like [Guide](docs/GUIDE) → docs/GUIDE.md
fallback_extensions = ["md", "html"]
-# Check #heading fragment anchors within markdown files
-include_fragments = true
-
# No interactive progress bar (clean output in hooks/CI)
no_progress = true
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fd05f4151..4bcf2f004 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
+### Added
+
+- Added root `intent` builders, the runtime-backed `Intent` noun,
+ `Timeline.write(intent)`, and `WriteReceipt` results with the public
+ `ReceiptOutcome` axis: `accepted`, `obstructed`, `conflicted`,
+ `underdetermined`, and `rejected`.
+- Added root `reading` builders, the runtime-backed `Reading` noun,
+ `Timeline.read(reading)`, and receipt-bearing `ReadingResult` values for
+ first-use property and node-existence reads.
+- Added `Timeline.draft(name)`, draft writes, `Timeline.previewJoin(draft)`,
+ and `Timeline.join(draft)` with join receipts for first-use speculative
+ workflows.
+
### Changed
- Added the v19 `openWarp()` product opener plus `Warp` and `Timeline`
diff --git a/README.md b/README.md
index ecfea2316..538fb4d6c 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,7 @@
A Git-native runtime for shared causal history.
-
Offline-first, multi-writer, deterministic, and built for provenance-aware intent writes, timeline reads, and receipts.
+
Write intents. Read timelines. Keep receipts.
+
Offline-first, multi-writer, deterministic, and built for provenance-aware applications.
@@ -51,11 +52,10 @@ replay-backed so callers receive complete diff and provenance data.
See [CHANGELOG.md](CHANGELOG.md) for the full in-repository release notes.
-## Planned v19 API Direction
+## v19 First-Use API
-This is the public contract the v19 facade slices are moving toward. It is the
-direction for new application code, not an endorsement of the deprecated v18
-compatibility API.
+This is the public contract new application code should start from. The
+deprecated v18 graph-first API remains available only for migration.
```typescript
import { openWarp, intent, reading } from "@git-stunts/git-warp";
@@ -70,6 +70,10 @@ const warp = await openWarp({
const events = await warp.timeline("events");
+await events.write(intent.node.add({
+ subject: "user:alice",
+}));
+
const write = await events.write(intent.property.set({
subject: "user:alice",
key: "role",
@@ -80,6 +84,9 @@ const role = await events.read(reading.property({
subject: "user:alice",
key: "role",
}));
+
+console.log(role.value);
+console.log(role.receipt);
```
The v18 graph-first API remains only under `@git-stunts/git-warp/legacy`. That
diff --git a/docs/migrations/v19/README.md b/docs/migrations/v19/README.md
index c5ca1b236..8cb3891fe 100644
--- a/docs/migrations/v19/README.md
+++ b/docs/migrations/v19/README.md
@@ -122,18 +122,14 @@ const receipt = await events.write(
switch (receipt.outcome) {
case 'accepted':
+ console.log(receipt.patchSha);
break;
case 'obstructed':
- await preserveRepairWork(receipt.repairHints);
- break;
case 'conflicted':
- await openConflictResolution(receipt.conflicts);
- break;
case 'underdetermined':
- await gatherSupport(receipt.evidence);
- break;
case 'rejected':
- throw new Error(receipt.reason);
+ console.log(receipt.reason ?? receipt.outcome);
+ break;
}
```
@@ -253,7 +249,7 @@ and joins first.
| `WarpWorldline` | root `Timeline` | public handle rename |
| `GitGraphAdapter` | `storage` `GitStorageAdapter` | graph name removed |
| `InMemoryGraphAdapter` | `storage` `MemoryStorageAdapter` | graph name removed |
-| `GraphPersistencePort` | `storage` `StorageAdapter` | public storage contract |
+| `GraphPersistencePort` | root `WarpStorage` for app options; `legacy` for the old port | public storage contract is facade-shaped |
| `commit((patch) => ...)` | `timeline.write(intent.*)` | receipt-returning |
| `PatchBuilder` | deprecated `legacy` | replace with intent builders |
| `PatchSession` | deprecated `legacy` | replace with receipt-returning writes |
@@ -288,18 +284,14 @@ const receipt = await timeline.write(intent.property.set({
switch (receipt.outcome) {
case 'accepted':
+ console.log(receipt.patchSha);
break;
case 'obstructed':
- await repair(receipt.repairHints);
- break;
case 'conflicted':
- await resolve(receipt.conflicts);
- break;
case 'underdetermined':
- await gatherSupport(receipt.evidence);
- break;
case 'rejected':
- throw new Error(receipt.reason);
+ console.log(receipt.reason ?? receipt.outcome);
+ break;
}
```
@@ -313,8 +305,8 @@ underdetermined
rejected
```
-Operation names such as `join`, `sync`, and `read` belong in
-`receipt.operation`, not in `receipt.outcome`.
+Operation names such as `join`, `sync`, and `read` belong in distinct receipt
+classes or operation fields, not in `receipt.outcome`.
## Suggested Upgrade Sequence
diff --git a/docs/topics/api/README.md b/docs/topics/api/README.md
index 5cbd318aa..84715a531 100644
--- a/docs/topics/api/README.md
+++ b/docs/topics/api/README.md
@@ -110,6 +110,10 @@ const warp = await openWarp({
const timeline = await warp.timeline('events');
+await timeline.write(intent.node.add({
+ subject: 'user:alice',
+}));
+
const write = await timeline.write(
intent.property.set({
subject: 'user:alice',
@@ -120,18 +124,14 @@ const write = await timeline.write(
switch (write.outcome) {
case 'accepted':
+ console.log(write.patchSha);
break;
case 'obstructed':
- await preserveRepairWork(write.repairHints);
- break;
case 'conflicted':
- await openConflictResolution(write.conflicts);
- break;
case 'underdetermined':
- await gatherSupport(write.evidence);
- break;
case 'rejected':
- throw new Error(write.reason);
+ console.log(write.reason ?? write.outcome);
+ break;
}
const role = await timeline.read(
@@ -183,35 +183,30 @@ intent.property.set({
value: 'admin',
});
-intent.entity.create({
+intent.node.add({
subject: 'user:alice',
});
-intent.link.add({
+intent.edge.add({
from: 'user:alice',
to: 'team:ops',
label: 'memberOf',
});
```
-Custom intent definitions are still important, but they should be a named
-escape hatch:
+Domain-specific builders can be layered by application code, but the root API
+should keep returning runtime-backed `Intent` values:
```typescript
-const assignRole = intent.define({
- type: 'user.role.assign',
- schema: {
- subject: 'user:*',
- payload: {
- role: 'string',
- },
- },
-});
+function assignRole(subject: string, role: string) {
+ return intent.property.set({
+ subject,
+ key: 'role',
+ value: role,
+ });
+}
-await timeline.write(assignRole({
- subject: 'user:alice',
- payload: { role: 'admin' },
-}));
+await timeline.write(assignRole('user:alice', 'admin'));
```
The builder output should be a runtime-backed value, not loose shape trust.
@@ -238,14 +233,15 @@ In v18, users often need to call `prepareOpticBasis()`, capture a coordinate,
and read through `optic()`. That discipline is correct, but it should be
internal ceremony for the first-use path.
-The v19 `timeline.read(reading)` flow can still lower to an optic internally:
+The v19 `timeline.read(reading)` flow is the public shape. Advanced bounded
+read paths can still lower readings to optics internally:
1. validate the `Reading`;
2. lower `Reading` to `Optic`;
3. prepare or check an optic basis;
4. capture the observer position;
5. execute the bounded read;
-6. return `ReadingResult` and `Receipt`.
+6. return `ReadingResult` and `ReadReceipt`.
Operational uncertainty should return receipt outcomes where possible.
Programmer errors, corruption, impossible states, and violated invariants may
@@ -256,22 +252,18 @@ still throw typed errors.
Receipts should become the normal control-flow object.
```typescript
-const receipt = await timeline.write(assignRole);
+const receipt = await timeline.write(assignRole('user:alice', 'admin'));
switch (receipt.outcome) {
case 'accepted':
+ console.log(receipt.patchSha);
break;
case 'obstructed':
- await repair(receipt.repairHints);
- break;
case 'conflicted':
- await resolve(receipt.conflicts);
- break;
case 'underdetermined':
- await gatherMoreEvidence(receipt.evidence);
- break;
case 'rejected':
- throw new Error(receipt.reason);
+ console.log(receipt.reason ?? receipt.outcome);
+ break;
}
```
@@ -288,14 +280,8 @@ rejected
Do not mix operation types into outcomes. `joined`, `synced`, `staged`, and
`materialized` describe operations or states, not the outcome axis.
-Use:
-
-```text
-receipt.operation
-receipt.outcome
-```
-
-not one overloaded status string.
+Use separate result classes (`WriteReceipt`, `ReadReceipt`, and later join
+receipts), not one overloaded status string.
## Timelines, Drafts, And Joins
@@ -310,7 +296,7 @@ Strand -> speculative lane
Braid -> deterministic lane composition
```
-Public speculative work should read like this:
+Public speculative work reads like this:
```typescript
const draft = await timeline.draft('try-admin-role');
@@ -338,7 +324,7 @@ avoids boolean-trap API design and makes the two phases explicit.
## Tick And Coordinate
-Use `Tick` for ergonomic public time travel:
+Future ergonomic public time travel should use `Tick`:
```typescript
const tick = await timeline.tick();
@@ -351,11 +337,12 @@ const roleAtTick = await timeline.at(tick).read(
);
```
-Use `Coordinate` for formal evidence and proof posture:
+Use `Coordinate` for formal evidence and proof posture on advanced surfaces.
+Do not make first-use application examples import coordinate machinery.
```text
-receipt.coordinate
-receipt.evidence.observerCoordinate
+public: tick handle
+advanced: coordinate evidence
```
That split lets casual users keep a simple handle while advanced users and
diff --git a/docs/topics/reference.md b/docs/topics/reference.md
index c5ae9429a..acc0f1cba 100644
--- a/docs/topics/reference.md
+++ b/docs/topics/reference.md
@@ -26,95 +26,530 @@ public API export, CLI command, package entrypoint, or public error class.
| JSR export | `./legacy` | `./legacy.ts` | `jsr.json#L13` |
| JSR export | `./sha1sync` | `./src/infrastructure/adapters/sha1sync.ts` | `jsr.json#L14` |
-## Root API export modules
+## Root API export surface
+
+First-use product API: `openWarp`, `intent`, `reading`, timelines, and receipts.
+
+### Export modules
| Module | Kind | Source |
| --- | --- | --- |
-| `./src/domain/memory/index.ts` | export * | `index.ts#L23` |
+| `./src/domain/memory/index.ts` | export * | `index.ts#L55` |
-## Root API value exports
+### Value exports
-Source: `index.ts`. Count: 63.
+Source: `index.ts`. Count: 73.
```text
-AlfredOperationPolicyAdapter @ index.ts#L36
-AuditError @ index.ts#L39
-BunHttpAdapter @ index.ts#L70
-canonicalEmissionJson @ index.ts#L86
-canonicalObservationJson @ index.ts#L92
-CasContentEncryptionPolicy @ index.ts#L30
-checkAborted @ index.ts#L72
-ChunkEffectSink @ index.ts#L102
-ConsoleEffectSink @ index.ts#L101
-ConsoleLogger @ index.ts#L64
-ContinuumArtifactAuthorityError @ index.ts#L40
-createDeliveryObservation @ index.ts#L91
-createEffectEmission @ index.ts#L85
-createExternalizationPolicy @ index.ts#L95
-createTickReceipt @ index.ts#L76
-createTimeoutSignal @ index.ts#L72
-CryptoPort @ index.ts#L66
-DELIVERY_MODES @ index.ts#L87
-DELIVERY_OUTCOMES @ index.ts#L88
-DenoHttpAdapter @ index.ts#L71
-EffectPipeline @ index.ts#L83
-EffectSinkPort @ index.ts#L81
-EncryptionError @ index.ts#L41
-ForkError @ index.ts#L42
-HealthCheckService @ index.ts#L61
-HealthStatus @ index.ts#L61
-HttpServerPort @ index.ts#L67
-IndexError @ index.ts#L43
-INSPECT_LENS @ index.ts#L98
-LIVE_LENS @ index.ts#L96
-LoggerPort @ index.ts#L62
-LogLevel @ index.ts#L64
-MemoryBudgetError @ index.ts#L44
-MultiplexSink @ index.ts#L82
-NodeCryptoAdapter @ index.ts#L68
-NoOpEffectSink @ index.ts#L100
-NoOpLogger @ index.ts#L63
-NoopOperationPolicyAdapter @ index.ts#L37
+AlfredOperationPolicyAdapter @ index.ts#L68
+AuditError @ index.ts#L71
+BunHttpAdapter @ index.ts#L102
+canonicalEmissionJson @ index.ts#L118
+canonicalObservationJson @ index.ts#L124
+CasContentEncryptionPolicy @ index.ts#L62
+checkAborted @ index.ts#L104
+ChunkEffectSink @ index.ts#L134
+ConsoleEffectSink @ index.ts#L133
+ConsoleLogger @ index.ts#L96
+ContinuumArtifactAuthorityError @ index.ts#L72
+createDeliveryObservation @ index.ts#L123
+createEffectEmission @ index.ts#L117
+createExternalizationPolicy @ index.ts#L127
+createTickReceipt @ index.ts#L108
+createTimeoutSignal @ index.ts#L104
+CryptoPort @ index.ts#L98
+DELIVERY_MODES @ index.ts#L119
+DELIVERY_OUTCOMES @ index.ts#L120
+DenoHttpAdapter @ index.ts#L103
+DraftTimeline @ index.ts#L19
+EffectPipeline @ index.ts#L115
+EffectSinkPort @ index.ts#L113
+EncryptionError @ index.ts#L73
+ForkError @ index.ts#L74
+HealthCheckService @ index.ts#L93
+HealthStatus @ index.ts#L93
+HttpServerPort @ index.ts#L99
+IndexError @ index.ts#L75
+INSPECT_LENS @ index.ts#L130
+intent @ index.ts#L22
+Intent @ index.ts#L23
+JoinReceipt @ index.ts#L24
+JoinResult @ index.ts#L25
+LIVE_LENS @ index.ts#L128
+LoggerPort @ index.ts#L94
+LogLevel @ index.ts#L96
+MemoryBudgetError @ index.ts#L76
+MultiplexSink @ index.ts#L114
+NodeCryptoAdapter @ index.ts#L100
+NoOpEffectSink @ index.ts#L132
+NoOpLogger @ index.ts#L95
+NoopOperationPolicyAdapter @ index.ts#L69
openWarp @ index.ts#L18
-OperationAbortedError @ index.ts#L45
-OperationPolicyExhaustedError @ index.ts#L46
-OperationPolicyPort @ index.ts#L25
-OperationPolicyTimeoutError @ index.ts#L47
-PatchError @ index.ts#L48
-QueryError @ index.ts#L49
-REPLAY_LENS @ index.ts#L97
-SchemaUnsupportedError @ index.ts#L50
-ShardCorruptionError @ index.ts#L51
-ShardLoadError @ index.ts#L52
-ShardValidationError @ index.ts#L53
-StorageError @ index.ts#L54
-StrandError @ index.ts#L55
-SyncError @ index.ts#L56
-SyncSecret @ index.ts#L73
-TICK_RECEIPT_OP_TYPES @ index.ts#L78
-TICK_RECEIPT_RESULT_TYPES @ index.ts#L79
-tickReceiptCanonicalJson @ index.ts#L77
-Timeline @ index.ts#L20
-TraversalError @ index.ts#L57
-Warp @ index.ts#L19
-WebCryptoAdapter @ index.ts#L69
-WormholeError @ index.ts#L58
-WriterError @ index.ts#L65
+OperationAbortedError @ index.ts#L77
+OperationPolicyExhaustedError @ index.ts#L78
+OperationPolicyPort @ index.ts#L57
+OperationPolicyTimeoutError @ index.ts#L79
+PatchError @ index.ts#L80
+QueryError @ index.ts#L81
+reading @ index.ts#L26
+Reading @ index.ts#L27
+ReadingResult @ index.ts#L28
+ReadReceipt @ index.ts#L29
+REPLAY_LENS @ index.ts#L129
+SchemaUnsupportedError @ index.ts#L82
+ShardCorruptionError @ index.ts#L83
+ShardLoadError @ index.ts#L84
+ShardValidationError @ index.ts#L85
+StorageError @ index.ts#L86
+StrandError @ index.ts#L87
+SyncError @ index.ts#L88
+SyncSecret @ index.ts#L105
+TICK_RECEIPT_OP_TYPES @ index.ts#L110
+TICK_RECEIPT_RESULT_TYPES @ index.ts#L111
+tickReceiptCanonicalJson @ index.ts#L109
+Timeline @ index.ts#L21
+TraversalError @ index.ts#L89
+Warp @ index.ts#L20
+WebCryptoAdapter @ index.ts#L101
+WormholeError @ index.ts#L90
+WriteReceipt @ index.ts#L30
+WriterError @ index.ts#L97
+```
+
+### Type exports
+
+Source: `index.ts`. Count: 32.
+
+```text
+CasContentEncryptionDiagnostics @ index.ts#L64
+CasContentEncryptionScheme @ index.ts#L65
+CasResolvedVaultKeyOptions @ index.ts#L66
+EdgeIntentFields @ index.ts#L33
+EdgePropertyIntentFields @ index.ts#L34
+IntentBuilders @ index.ts#L40
+IntentDescriptor @ index.ts#L35
+IntentKind @ index.ts#L36
+JoinMode @ index.ts#L41
+JoinOptions @ index.ts#L43
+JoinPolicy @ index.ts#L43
+JoinReceiptOptions @ index.ts#L41
+JoinReceiptOutcome @ index.ts#L41
+JoinResultOptions @ index.ts#L42
+NodeIntentFields @ index.ts#L37
+NodeReadingFields @ index.ts#L45
+OpenWarpOptions @ index.ts#L31
+OperationPolicyExecuteOptions @ index.ts#L59
+OperationRetryDecision @ index.ts#L60
+PropertyIntentFields @ index.ts#L38
+PropertyReadingFields @ index.ts#L46
+ReadingBuilders @ index.ts#L50
+ReadingDescriptor @ index.ts#L47
+ReadingKind @ index.ts#L48
+ReadingResultOptions @ index.ts#L51
+ReadingValue @ index.ts#L51
+ReadReceiptOptions @ index.ts#L52
+ReadReceiptOutcome @ index.ts#L52
+ReceiptOutcome @ index.ts#L53
+SyncRateLimitConfig @ index.ts#L106
+WarpStorage @ index.ts#L31
+WriteReceiptOptions @ index.ts#L53
+```
+
+## Storage export surface
+
+Supported persistence and crypto adapters for first-use applications.
+
+### Value exports
+
+Source: `storage.ts`. Count: 5.
+
+```text
+CasContentEncryptionPolicy @ storage.ts#L13
+GitStorageAdapter @ storage.ts#L9
+MemoryStorageAdapter @ storage.ts#L10
+NodeCryptoAdapter @ storage.ts#L11
+WebCryptoAdapter @ storage.ts#L12
+```
+
+### Type exports
+
+Source: `storage.ts`. Count: 6.
+
+```text
+CasContentEncryptionDiagnostics @ storage.ts#L15
+CasContentEncryptionScheme @ storage.ts#L16
+CasResolvedVaultKeyOptions @ storage.ts#L17
+CollectableStream @ storage.ts#L20
+GitError @ storage.ts#L21
+GitPlumbing @ storage.ts#L22
+```
+
+## Advanced export surface
+
+Formal WARP and Continuum concepts for expert use; not first-use root API.
+
+### Export modules
+
+| Module | Kind | Source |
+| --- | --- | --- |
+| `./src/continuumExports.ts` | export * | `advanced.ts#L42` |
+
+### Value exports
+
+Source: `advanced.ts`. Count: 31.
+
+```text
+BoundedSupportRule @ advanced.ts#L10
+CausalIndexPlan @ advanced.ts#L11
+composeWormholes @ advanced.ts#L12
+createWormhole @ advanced.ts#L13
+deserializeWormhole @ advanced.ts#L14
+LiveSelector @ advanced.ts#L15
+Observer @ advanced.ts#L16
+ObserverAccumulation @ advanced.ts#L17
+ObserverBasis @ advanced.ts#L18
+ObserverEmission @ advanced.ts#L19
+ObserverPlan @ advanced.ts#L20
+ObserverReadingEnvelope @ advanced.ts#L21
+openAperture @ advanced.ts#L22
+Optic @ advanced.ts#L23
+OpticAperturePosture @ advanced.ts#L24
+OpticBasisPosture @ advanced.ts#L25
+OpticCoordinatePosture @ advanced.ts#L26
+OpticSupportRule @ advanced.ts#L27
+ProjectionHandle @ advanced.ts#L28
+RejectedZKWormhole @ advanced.ts#L29
+replayWormhole @ advanced.ts#L30
+serializeWormhole @ advanced.ts#L31
+StrandSelector @ advanced.ts#L32
+SupportFragmentPlan @ advanced.ts#L33
+VerifiedZKWormhole @ advanced.ts#L34
+verifyZKWormhole @ advanced.ts#L35
+WarpWorldlineCoordinate @ advanced.ts#L36
+WarpWorldlineOpticBasis @ advanced.ts#L37
+WorldlineSelector @ advanced.ts#L38
+ZKWormholeEdge @ advanced.ts#L39
+ZKWormholeProofVerifierPort @ advanced.ts#L40
+```
+
+### Type exports
+
+Source: `advanced.ts`. Count: 25.
+
+```text
+Aperture @ advanced.ts#L44
+ApertureOpeningVerificationResult @ advanced.ts#L45
+BoundedSupportDirection @ advanced.ts#L46
+BoundedSupportKind @ advanced.ts#L47
+BoundedSupportRuleFields @ advanced.ts#L48
+BoundedSupportSurface @ advanced.ts#L49
+CausalIndexFamily @ advanced.ts#L50
+CausalIndexPlanFields @ advanced.ts#L51
+CausalIndexPlanPosture @ advanced.ts#L52
+ObserverConfig @ advanced.ts#L53
+ObserverPlanFields @ advanced.ts#L54
+ObserverReadingEnvelopeBudget @ advanced.ts#L55
+ObserverReadingEnvelopeFields @ advanced.ts#L56
+OpticAperturePostureValue @ advanced.ts#L57
+OpticBasisPostureValue @ advanced.ts#L58
+OpticContextValue @ advanced.ts#L59
+OpticCoordinatePostureValue @ advanced.ts#L60
+OpticFields @ advanced.ts#L61
+OpticPostureFields @ advanced.ts#L62
+OpticSupportRuleValue @ advanced.ts#L63
+SupportFragmentMaterializationPosture @ advanced.ts#L64
+SupportFragmentPlanFields @ advanced.ts#L65
+WarpWorldlineCoordinateFrontierEntry @ advanced.ts#L66
+ZKWormholeEdgeFields @ advanced.ts#L67
+ZKWormholeVerificationResult @ advanced.ts#L68
+```
+
+## Diagnostics export surface
+
+Operator, inspection, comparison, and replay tools.
+
+### Value exports
+
+Source: `diagnostics.ts`. Count: 18.
+
+```text
+BisectService @ diagnostics.ts#L9
+CommitDagTraversalService @ diagnostics.ts#L10
+ContentAttachmentProjection @ diagnostics.ts#L11
+exportCoordinateComparisonFact @ diagnostics.ts#L12
+exportCoordinateTransferPlanFact @ diagnostics.ts#L13
+GraphDiff @ diagnostics.ts#L14
+GraphOpAlgebraProjection @ diagnostics.ts#L15
+nodeIdInVisibleStateScope @ diagnostics.ts#L41
+normalizeVisibleStateScope @ diagnostics.ts#L40
+QueryBuilder @ diagnostics.ts#L16
+scopeMaterializedState @ diagnostics.ts#L42
+TtdMergeBranch @ diagnostics.ts#L17
+TtdMergeFootprint @ diagnostics.ts#L18
+TtdMergeInspection @ diagnostics.ts#L19
+TtdMergeInspector @ diagnostics.ts#L20
+TtdMergeLoweringWitness @ diagnostics.ts#L21
+TtdMergeObstructionWitness @ diagnostics.ts#L22
+TtdMergePolicyRequirement @ diagnostics.ts#L23
+```
+
+### Type exports
+
+Source: `diagnostics.ts`. Count: 14.
+
+```text
+GraphDiffFields @ diagnostics.ts#L26
+GraphDiffOptions @ diagnostics.ts#L27
+TtdMergeBranchFields @ diagnostics.ts#L28
+TtdMergeFootprintFields @ diagnostics.ts#L29
+TtdMergeInspectionDomain @ diagnostics.ts#L30
+TtdMergeInspectionFields @ diagnostics.ts#L31
+TtdMergeLoweringSurface @ diagnostics.ts#L32
+TtdMergeLoweringWitnessFields @ diagnostics.ts#L33
+TtdMergeObjectBranchInput @ diagnostics.ts#L34
+TtdMergeObjectInspectionInput @ diagnostics.ts#L35
+TtdMergeObstructionWitnessFields @ diagnostics.ts#L36
+TtdMergePolicyRequirementFields @ diagnostics.ts#L37
+VisibleStateScope @ diagnostics.ts#L45
+VisibleStateScopePrefixFilter @ diagnostics.ts#L46
+```
+
+## Legacy export surface
+
+Deprecated compatibility-only imports for migration paydown.
+
+### Export modules
+
+| Module | Kind | Source |
+| --- | --- | --- |
+| `./src/domain/graph/publicGraphSubstrate.ts` | export * | `legacy.ts#L220` |
+| `./src/domain/memory/index.ts` | export * | `legacy.ts#L221` |
+| `./src/continuumExports.ts` | export * | `legacy.ts#L222` |
+
+### Value exports
+
+Source: `legacy.ts`. Count: 161.
+
+```text
+AlfredOperationPolicyAdapter @ legacy.ts#L227
+ApertureOpeningProof @ legacy.ts#L406
+AuditError @ legacy.ts#L231
+BisectService @ legacy.ts#L272
+BitmapIndexBuilder @ legacy.ts#L266
+BitmapIndexReader @ legacy.ts#L267
+BlobStoragePort @ legacy.ts#L286
+BoundedSupportRule @ legacy.ts#L329
+BTR @ legacy.ts#L395
+buildWarpStateIndex @ legacy.ts#L362
+BunHttpAdapter @ legacy.ts#L296
+canonicalEmissionJson @ legacy.ts#L415
+canonicalObservationJson @ legacy.ts#L417
+CasContentEncryptionPolicy @ legacy.ts#L225
+CausalIndexPlan @ legacy.ts#L330
+checkAborted @ legacy.ts#L303
+ChunkEffectSink @ legacy.ts#L426
+CommitDagTraversalService @ legacy.ts#L271
+compareVisibleState @ legacy.ts#L366
+composeWormholes @ legacy.ts#L402
+computeStateHash @ legacy.ts#L363
+computeTranslationCost @ legacy.ts#L343
+ConsoleEffectSink @ legacy.ts#L425
+ConsoleLogger @ legacy.ts#L279
+CONTENT_PROPERTY_KEY @ legacy.ts#L358
+ContentAttachmentProjection @ legacy.ts#L428
+ContinuumArtifactAuthorityError @ legacy.ts#L232
+CoordinateSelector @ legacy.ts#L327
+createBlobValue @ legacy.ts#L352
+createBTR @ legacy.ts#L396
+createDeliveryObservation @ legacy.ts#L416
+createEdgeAdd @ legacy.ts#L348
+createEdgeTombstone @ legacy.ts#L349
+createEffectEmission @ legacy.ts#L414
+createExternalizationPolicy @ legacy.ts#L418
+createInlineValue @ legacy.ts#L351
+createNodeAdd @ legacy.ts#L346
+createNodeTombstone @ legacy.ts#L347
+createPropSet @ legacy.ts#L350
+createStateReader @ legacy.ts#L365
+createTickReceipt @ legacy.ts#L386
+createTimeoutSignal @ legacy.ts#L304
+createV18BoundedMemoryCapabilityReport @ legacy.ts#L383
+createWormhole @ legacy.ts#L401
+CryptoPort @ legacy.ts#L288
+decodeEdgePropKey @ legacy.ts#L356
+DELIVERY_MODES @ legacy.ts#L419
+DELIVERY_OUTCOMES @ legacy.ts#L420
+DenoHttpAdapter @ legacy.ts#L297
+deserializeWormhole @ legacy.ts#L405
+EffectPipeline @ legacy.ts#L413
+EffectSinkPort @ legacy.ts#L411
+encodeEdgePropKey @ legacy.ts#L355
+EncryptionError @ legacy.ts#L233
+exportCoordinateComparisonFact @ legacy.ts#L381
+exportCoordinateTransferPlanFact @ legacy.ts#L382
+ForkError @ legacy.ts#L234
+GitGraphAdapter @ legacy.ts#L262
+GraphDiff @ legacy.ts#L367
+GraphNode @ legacy.ts#L264
+GraphOpAlgebraProjection @ legacy.ts#L265
+GraphPersistencePort @ legacy.ts#L273
+HealthCheckService @ legacy.ts#L269
+HealthStatus @ legacy.ts#L270
+HttpServerPort @ legacy.ts#L289
+ImmutableBytes @ legacy.ts#L375
+IndexError @ legacy.ts#L235
+IndexRebuildService @ legacy.ts#L268
+IndexStoragePort @ legacy.ts#L274
+InMemoryBlobStorageAdapter @ legacy.ts#L287
+InMemoryGraphAdapter @ legacy.ts#L263
+INSPECT_LENS @ legacy.ts#L423
+isEdgePropKey @ legacy.ts#L357
+LIVE_LENS @ legacy.ts#L421
+LiveSelector @ legacy.ts#L326
+LoggerPort @ legacy.ts#L277
+LogLevel @ legacy.ts#L280
+MemoryBudgetError @ legacy.ts#L236
+MultiplexSink @ legacy.ts#L412
+NodeCryptoAdapter @ legacy.ts#L292
+NoOpEffectSink @ legacy.ts#L424
+NoOpLogger @ legacy.ts#L278
+NoopOperationPolicyAdapter @ legacy.ts#L228
+normalizeVisibleStateScope @ legacy.ts#L379
+Observer @ legacy.ts#L333
+ObserverAccumulation @ legacy.ts#L334
+ObserverBasis @ legacy.ts#L335
+ObserverEmission @ legacy.ts#L336
+ObserverPlan @ legacy.ts#L337
+ObserverReadingEnvelope @ legacy.ts#L338
+openAperture @ legacy.ts#L408
+openWarpGraph @ legacy.ts#L308
+openWarpWorldline @ legacy.ts#L311
+OperationAbortedError @ legacy.ts#L237
+OperationPolicyExhaustedError @ legacy.ts#L229
+OperationPolicyPort @ legacy.ts#L223
+OperationPolicyTimeoutError @ legacy.ts#L229
+Optic @ legacy.ts#L315
+OpticAperturePosture @ legacy.ts#L316
+OpticBasisPosture @ legacy.ts#L317
+OpticCoordinatePosture @ legacy.ts#L318
+OpticSupportRule @ legacy.ts#L319
+PatchBuilder @ legacy.ts#L339
+PatchError @ legacy.ts#L238
+PatchSession @ legacy.ts#L340
+ProjectionHandle @ legacy.ts#L320
+projectState @ legacy.ts#L364
+ProvenanceIndex @ legacy.ts#L342
+ProvenancePayload @ legacy.ts#L392
+QueryBuilder @ legacy.ts#L332
+QueryError @ legacy.ts#L239
+RejectedApertureOpening @ legacy.ts#L406
+RejectedZKWormhole @ legacy.ts#L406
+REPLAY_LENS @ legacy.ts#L422
+replayBTR @ legacy.ts#L398
+replayWormhole @ legacy.ts#L403
+SchemaUnsupportedError @ legacy.ts#L240
+scopeMaterializedState @ legacy.ts#L380
+SeekCachePort @ legacy.ts#L283
+serializeWormhole @ legacy.ts#L404
+ShardCorruptionError @ legacy.ts#L241
+ShardLoadError @ legacy.ts#L242
+ShardValidationError @ legacy.ts#L243
+SnapshotORSet @ legacy.ts#L376
+SnapshotVersionVector @ legacy.ts#L377
+SnapshotWarpState @ legacy.ts#L378
+StorageError @ legacy.ts#L244
+StrandError @ legacy.ts#L245
+StrandSelector @ legacy.ts#L328
+SupportFragmentPlan @ legacy.ts#L331
+SyncError @ legacy.ts#L246
+SyncSecret @ legacy.ts#L427
+TICK_RECEIPT_OP_TYPES @ legacy.ts#L388
+TICK_RECEIPT_RESULT_TYPES @ legacy.ts#L389
+tickReceiptCanonicalJson @ legacy.ts#L387
+TraversalError @ legacy.ts#L247
+TtdMergeBranch @ legacy.ts#L368
+TtdMergeFootprint @ legacy.ts#L369
+TtdMergeInspection @ legacy.ts#L370
+TtdMergeInspector @ legacy.ts#L371
+TtdMergeLoweringWitness @ legacy.ts#L372
+TtdMergeObstructionWitness @ legacy.ts#L373
+TtdMergePolicyRequirement @ legacy.ts#L374
+VerifiedApertureOpening @ legacy.ts#L407
+VerifiedZKWormhole @ legacy.ts#L407
+verifyBTR @ legacy.ts#L397
+verifyZKWormhole @ legacy.ts#L408
+WarpApp @ legacy.ts#L323
+WarpCore @ legacy.ts#L324
+WarpOpenOptions @ legacy.ts#L307
+WarpStateIndexBuilder @ legacy.ts#L361
+WarpWorldline @ legacy.ts#L312
+WarpWorldlineCoordinate @ legacy.ts#L313
+WarpWorldlineOpticBasis @ legacy.ts#L314
+WebCryptoAdapter @ legacy.ts#L293
+WorldlineSelector @ legacy.ts#L325
+WormholeError @ legacy.ts#L248
+Writer @ legacy.ts#L341
+WriterError @ legacy.ts#L300
+ZKWormholeEdge @ legacy.ts#L407
+ZKWormholeProofVerifierPort @ legacy.ts#L408
```
-## Root API type exports
+### Type exports
-Source: `index.ts`. Count: 8.
+Source: `legacy.ts`. Count: 51.
```text
-CasContentEncryptionDiagnostics @ index.ts#L32
-CasContentEncryptionScheme @ index.ts#L33
-CasResolvedVaultKeyOptions @ index.ts#L34
-OpenWarpOptions @ index.ts#L21
-OperationPolicyExecuteOptions @ index.ts#L27
-OperationRetryDecision @ index.ts#L28
-SyncRateLimitConfig @ index.ts#L74
-WarpStorage @ index.ts#L21
+Aperture @ legacy.ts#L432
+ApertureOpeningProofFields @ legacy.ts#L461
+ApertureOpeningVerificationResult @ legacy.ts#L461
+BoundedSupportDirection @ legacy.ts#L447
+BoundedSupportKind @ legacy.ts#L448
+BoundedSupportRuleFields @ legacy.ts#L449
+BoundedSupportSurface @ legacy.ts#L450
+CasContentEncryptionDiagnostics @ legacy.ts#L226
+CasContentEncryptionScheme @ legacy.ts#L226
+CasResolvedVaultKeyOptions @ legacy.ts#L226
+CasVaultResolutionWitness @ legacy.ts#L226
+CausalIndexFamily @ legacy.ts#L451
+CausalIndexPlanFields @ legacy.ts#L452
+CausalIndexPlanPosture @ legacy.ts#L453
+GraphDiffFields @ legacy.ts#L457
+GraphDiffOptions @ legacy.ts#L456
+ObserverConfig @ legacy.ts#L433
+ObserverPlanFields @ legacy.ts#L458
+ObserverReadingEnvelopeBudget @ legacy.ts#L459
+ObserverReadingEnvelopeFields @ legacy.ts#L460
+OperationPolicyExecuteOptions @ legacy.ts#L224
+OperationRetryDecision @ legacy.ts#L224
+OperationRetryObserver @ legacy.ts#L224
+OpticAperturePostureValue @ legacy.ts#L440
+OpticBasisPostureValue @ legacy.ts#L441
+OpticContextValue @ legacy.ts#L442
+OpticCoordinatePostureValue @ legacy.ts#L443
+OpticFields @ legacy.ts#L444
+OpticPostureFields @ legacy.ts#L445
+OpticSupportRuleValue @ legacy.ts#L446
+PropValue @ legacy.ts#L434
+SnapshotPropValue @ legacy.ts#L435
+SupportFragmentMaterializationPosture @ legacy.ts#L454
+SupportFragmentPlanFields @ legacy.ts#L455
+SyncRateLimitConfig @ legacy.ts#L436
+TtdMergeBranchFields @ legacy.ts#L464
+TtdMergeFootprintFields @ legacy.ts#L465
+TtdMergeInspectionDomain @ legacy.ts#L466
+TtdMergeInspectionFields @ legacy.ts#L467
+TtdMergeLoweringSurface @ legacy.ts#L468
+TtdMergeLoweringWitnessFields @ legacy.ts#L469
+TtdMergeObjectBranchInput @ legacy.ts#L470
+TtdMergeObjectInspectionInput @ legacy.ts#L471
+TtdMergeObstructionWitnessFields @ legacy.ts#L472
+TtdMergePolicyRequirementFields @ legacy.ts#L473
+WarpKernelPort @ legacy.ts#L437
+WarpWorldlineCoordinateFrontierEntry @ legacy.ts#L463
+WarpWorldlineOpenOptions @ legacy.ts#L438
+WarpWorldlinePatchBuild @ legacy.ts#L439
+ZKWormholeEdgeFields @ legacy.ts#L462
+ZKWormholeVerificationResult @ legacy.ts#L462
```
## CLI command registry
diff --git a/index.ts b/index.ts
index 35e27eba3..3f4b89df1 100644
--- a/index.ts
+++ b/index.ts
@@ -16,9 +16,41 @@ import { installDefaultRuntimeHostNodePorts } from './src/application/RuntimeHos
installDefaultRuntimeHostNodePorts();
export { openWarp } from './src/domain/api/openWarp.ts';
+export { default as DraftTimeline } from './src/domain/api/DraftTimeline.ts';
export { default as Warp } from './src/domain/api/Warp.ts';
export { default as Timeline } from './src/domain/api/Timeline.ts';
+export { intent } from './src/domain/api/IntentBuilders.ts';
+export { default as Intent } from './src/domain/api/Intent.ts';
+export { default as JoinReceipt } from './src/domain/api/JoinReceipt.ts';
+export { default as JoinResult } from './src/domain/api/JoinResult.ts';
+export { reading } from './src/domain/api/ReadingBuilders.ts';
+export { default as Reading } from './src/domain/api/Reading.ts';
+export { default as ReadingResult } from './src/domain/api/ReadingResult.ts';
+export { default as ReadReceipt } from './src/domain/api/ReadReceipt.ts';
+export { default as WriteReceipt } from './src/domain/api/WriteReceipt.ts';
export type { OpenWarpOptions, WarpStorage } from './src/domain/api/openWarp.ts';
+export type {
+ EdgeIntentFields,
+ EdgePropertyIntentFields,
+ IntentDescriptor,
+ IntentKind,
+ NodeIntentFields,
+ PropertyIntentFields,
+} from './src/domain/api/Intent.ts';
+export type { IntentBuilders } from './src/domain/api/IntentBuilders.ts';
+export type { JoinMode, JoinReceiptOptions, JoinReceiptOutcome } from './src/domain/api/JoinReceipt.ts';
+export type { JoinResultOptions } from './src/domain/api/JoinResult.ts';
+export type { JoinOptions, JoinPolicy } from './src/domain/api/Timeline.ts';
+export type {
+ NodeReadingFields,
+ PropertyReadingFields,
+ ReadingDescriptor,
+ ReadingKind,
+} from './src/domain/api/Reading.ts';
+export type { ReadingBuilders } from './src/domain/api/ReadingBuilders.ts';
+export type { ReadingResultOptions, ReadingValue } from './src/domain/api/ReadingResult.ts';
+export type { ReadReceiptOptions, ReadReceiptOutcome } from './src/domain/api/ReadReceipt.ts';
+export type { ReceiptOutcome, WriteReceiptOptions } from './src/domain/api/WriteReceipt.ts';
export * from './src/domain/memory/index.ts';
diff --git a/package.json b/package.json
index b33457c1c..f929b8c01 100644
--- a/package.json
+++ b/package.json
@@ -81,7 +81,7 @@
"lint:md": "markdownlint \"**/*.md\" --ignore node_modules --ignore \"**/node_modules/**\"",
"lint:md:code": "node scripts/lint-markdown-code-samples.ts",
"lint:docs-topology": "bash scripts/check-docs-topology.sh && npm run lint:source-backed-reference",
- "lint:links": "lychee --config .lychee.toml '**/*.md'",
+ "lint:links": "lychee --config .lychee.toml --include-fragments '**/*.md'",
"lint:semgrep": "node scripts/lint-semgrep-with-quarantines.ts",
"lint:sludge": "bash scripts/check-anti-sludge.sh",
"lint:cas-invariants": "bash scripts/check-git-cas-invariants.sh",
diff --git a/scripts/check-source-backed-reference.ts b/scripts/check-source-backed-reference.ts
index 5b378e1d2..9c934747b 100644
--- a/scripts/check-source-backed-reference.ts
+++ b/scripts/check-source-backed-reference.ts
@@ -1,33 +1,17 @@
import { readFileSync, writeFileSync } from 'node:fs';
import process from 'node:process';
-
const OUTPUT_PATH = 'docs/topics/reference.md';
-
class SourceText {
readonly path: string;
readonly lines: readonly string[];
- constructor(path: string) {
- this.path = path;
- this.lines = readFileSync(path, 'utf8').split('\n');
- }
-
+ constructor(path: string) { this.path = path; this.lines = readFileSync(path, 'utf8').split('\n'); }
line(index: number): string { return this.lines[index] ?? ''; }
-
ref(index: number): string { return `${this.path}#L${index + 1}`; }
}
-class InventoryItem {
- readonly name: string;
- readonly detail: string;
- readonly source: string;
-
- constructor(name: string, detail: string, source: string) {
- this.name = name;
- this.detail = detail;
- this.source = source;
- }
-}
+type InventoryItem = { readonly name: string; readonly detail: string; readonly source: string };
+function inventoryItem(name: string, detail: string, source: string): InventoryItem { return Object.freeze({ name, detail, source }); }
function captureObjectEntries(source: SourceText, field: string): readonly InventoryItem[] {
const items: InventoryItem[] = [];
@@ -54,7 +38,7 @@ function captureObjectEntries(source: SourceText, field: string): readonly Inven
const match = /^\s+"([^"]+)":\s+"([^"]+)"/.exec(line);
if (match) {
- items.push(new InventoryItem(match[1] ?? '', match[2] ?? '', source.ref(index)));
+ items.push(inventoryItem(match[1] ?? '', match[2] ?? '', source.ref(index)));
}
}
@@ -81,7 +65,7 @@ function captureExportEntries(source: SourceText, field: string): readonly Inven
if (depth === 1) {
const stringMatch = /^\s+"([^"]+)":\s+"([^"]+)"/.exec(line);
if (stringMatch) {
- items.push(new InventoryItem(stringMatch[1] ?? '', stringMatch[2] ?? '', source.ref(index)));
+ items.push(inventoryItem(stringMatch[1] ?? '', stringMatch[2] ?? '', source.ref(index)));
}
const objectMatch = /^\s+"([^"]+)":\s+\{$/.exec(line);
@@ -99,7 +83,7 @@ function captureExportEntries(source: SourceText, field: string): readonly Inven
nestedDepth -= (nestedLine.match(/}/g) ?? []).length;
nestedIndex += 1;
}
- items.push(new InventoryItem(objectMatch[1] ?? '', details.join('; '), source.ref(index)));
+ items.push(inventoryItem(objectMatch[1] ?? '', details.join('; '), source.ref(index)));
index = nestedIndex - 1;
continue;
}
@@ -141,7 +125,7 @@ function collectLineNames(line: string): readonly string[] {
.sort((left, right) => left.localeCompare(right));
}
-function captureRootExports(indexSource: SourceText, kind: 'values' | 'types'): readonly InventoryItem[] {
+function captureExports(indexSource: SourceText, kind: 'values' | 'types'): readonly InventoryItem[] {
const items: InventoryItem[] = [];
const prefix = kind === 'types' ? 'export type {' : 'export {';
@@ -155,7 +139,7 @@ function captureRootExports(indexSource: SourceText, kind: 'values' | 'types'):
while (exportIndex < indexSource.lines.length) {
const exportLine = indexSource.line(exportIndex);
for (const name of collectLineNames(exportLine)) {
- items.push(new InventoryItem(name, kind, indexSource.ref(exportIndex)));
+ items.push(inventoryItem(name, kind, indexSource.ref(exportIndex)));
}
if (exportLine.includes('};') || exportLine.includes("} from ")) {
break;
@@ -174,7 +158,7 @@ function captureReExportModules(indexSource: SourceText): readonly InventoryItem
for (let index = 0; index < indexSource.lines.length; index += 1) {
const match = /^export \* from '([^']+)';$/.exec(indexSource.line(index));
if (match) {
- items.push(new InventoryItem(match[1] ?? '', 'export *', indexSource.ref(index)));
+ items.push(inventoryItem(match[1] ?? '', 'export *', indexSource.ref(index)));
}
}
return items;
@@ -185,7 +169,7 @@ function captureCommands(registrySource: SourceText): readonly InventoryItem[] {
for (let index = 0; index < registrySource.lines.length; index += 1) {
const match = /^\s+\['([^']+)',\s*([A-Za-z0-9_]+)\],$/.exec(registrySource.line(index));
if (match) {
- items.push(new InventoryItem(match[1] ?? '', match[2] ?? '', registrySource.ref(index)));
+ items.push(inventoryItem(match[1] ?? '', match[2] ?? '', registrySource.ref(index)));
}
}
return items;
@@ -196,7 +180,7 @@ function captureErrorClasses(errorSource: SourceText): readonly InventoryItem[]
for (let index = 0; index < errorSource.lines.length; index += 1) {
const match = /^export \{ default as ([A-Za-z0-9_]+) \} from '([^']+)';$/.exec(errorSource.line(index));
if (match) {
- items.push(new InventoryItem(match[1] ?? '', match[2] ?? '', errorSource.ref(index)));
+ items.push(inventoryItem(match[1] ?? '', match[2] ?? '', errorSource.ref(index)));
}
}
return items;
@@ -221,20 +205,44 @@ function requireLineRef(source: SourceText, needle: string): string {
throw new Error(`${needle} not found in ${source.path}`);
}
+function exportSurface(title: string, source: SourceText, contract: string): readonly string[] {
+ const modules = captureReExportModules(source);
+ const valueExports = captureExports(source, 'values');
+ const typeExports = captureExports(source, 'types');
+ return [
+ `## ${title}`,
+ '',
+ contract,
+ '',
+ ...(modules.length === 0 ? [] : ['### Export modules', '', table(['Module', 'Kind', 'Source'], modules.map((item) => [`\`${item.name}\``, item.detail, `\`${item.source}\``])), '']),
+ '### Value exports',
+ '',
+ `Source: \`${source.path}\`. Count: ${valueExports.length}.`,
+ '',
+ codeList(valueExports),
+ '',
+ '### Type exports',
+ '',
+ `Source: \`${source.path}\`. Count: ${typeExports.length}.`,
+ '',
+ codeList(typeExports),
+ ];
+}
+
function generate(): string {
const packageSource = new SourceText('package.json');
const jsrSource = new SourceText('jsr.json');
- const indexSource = new SourceText('index.ts');
const registrySource = new SourceText('bin/cli/commands/registry.ts');
const cliSource = new SourceText('bin/warp-graph.ts');
const errorSource = new SourceText('src/domain/errors/index.ts');
-
+ const rootSource = new SourceText('index.ts');
+ const storageSource = new SourceText('storage.ts');
+ const advancedSource = new SourceText('advanced.ts');
+ const diagnosticsSource = new SourceText('diagnostics.ts');
+ const legacySource = new SourceText('legacy.ts');
const packageBins = captureObjectEntries(packageSource, 'bin');
const packageExports = captureExportEntries(packageSource, 'exports').filter((item) => item.name.startsWith('.'));
const jsrExports = captureExportEntries(jsrSource, 'exports').filter((item) => item.name.startsWith('.'));
- const reExports = captureReExportModules(indexSource);
- const valueExports = captureRootExports(indexSource, 'values');
- const typeExports = captureRootExports(indexSource, 'types');
const commands = captureCommands(registrySource);
const errors = captureErrorClasses(errorSource);
@@ -253,21 +261,15 @@ function generate(): string {
...jsrExports.map((item) => ['JSR export', `\`${item.name}\``, `\`${item.detail}\``, `\`${item.source}\``]),
]),
'',
- '## Root API export modules',
- '',
- table(['Module', 'Kind', 'Source'], reExports.map((item) => [`\`${item.name}\``, item.detail, `\`${item.source}\``])),
- '',
- '## Root API value exports',
+ ...exportSurface('Root API export surface', rootSource, 'First-use product API: `openWarp`, `intent`, `reading`, timelines, and receipts.'),
'',
- `Source: \`index.ts\`. Count: ${valueExports.length}.`,
+ ...exportSurface('Storage export surface', storageSource, 'Supported persistence and crypto adapters for first-use applications.'),
'',
- codeList(valueExports),
- '',
- '## Root API type exports',
+ ...exportSurface('Advanced export surface', advancedSource, 'Formal WARP and Continuum concepts for expert use; not first-use root API.'),
'',
- `Source: \`index.ts\`. Count: ${typeExports.length}.`,
+ ...exportSurface('Diagnostics export surface', diagnosticsSource, 'Operator, inspection, comparison, and replay tools.'),
'',
- codeList(typeExports),
+ ...exportSurface('Legacy export surface', legacySource, 'Deprecated compatibility-only imports for migration paydown.'),
'',
'## CLI command registry',
'',
diff --git a/scripts/hooks/pre-push b/scripts/hooks/pre-push
index 4994ba14c..9fdcf763b 100755
--- a/scripts/hooks/pre-push
+++ b/scripts/hooks/pre-push
@@ -54,7 +54,7 @@ echo "════════════════════════
# ── Link check (optional) ──────────────────────────────────────────────────
if command_exists "$LINKCHECK_LAUNCHER" "$LINKCHECK_BIN"; then
echo "[Gate 0] Link check..."
- run_tool "$LINKCHECK_LAUNCHER" "$LINKCHECK_BIN" --config .lychee.toml '**/*.md'
+ run_tool "$LINKCHECK_LAUNCHER" "$LINKCHECK_BIN" --config .lychee.toml --include-fragments '**/*.md'
else
echo "[Gate 0] Link check skipped (lychee not installed)"
fi
diff --git a/src/domain/WarpWorldline.ts b/src/domain/WarpWorldline.ts
index 1b507126b..0e8d90f7c 100644
--- a/src/domain/WarpWorldline.ts
+++ b/src/domain/WarpWorldline.ts
@@ -30,9 +30,17 @@ export type WarpWorldlinePatchBuild = (
) => void | Promise;
type CommitPatch = (build: WarpWorldlinePatchBuild) => Promise;
+type CreateDraft = (name: string) => Promise;
type WorldlineOptions = Parameters[0];
type CreateWorldline = (options?: WorldlineOptions) => ProjectionHandle;
+type PatchDraft = (name: string, build: WarpWorldlinePatchBuild) => Promise;
+type PreviewDraftJoin = (name: string) => Promise;
+type RuntimeGraph = Awaited>;
type PrepareOpticBasis = () => Promise;
+type DraftWorldlineOptions = Pick<
+ WarpWorldlineConstructionOptions,
+ 'createDraft' | 'patchDraft' | 'previewDraftJoin'
+>;
type GetFrontier = () => Promise