@ontrails/topography 1.0.0-beta.41
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 +543 -0
- package/README.md +196 -0
- package/package.json +33 -0
- package/src/activation-report.ts +385 -0
- package/src/backend-support.ts +11 -0
- package/src/derive.ts +690 -0
- package/src/diff.ts +1088 -0
- package/src/forces.ts +125 -0
- package/src/hash.ts +55 -0
- package/src/index.ts +272 -0
- package/src/internal/topo-snapshots.ts +682 -0
- package/src/internal/topo-store-read.ts +1102 -0
- package/src/internal/topo-store.ts +1651 -0
- package/src/io.ts +280 -0
- package/src/library-projection.ts +133 -0
- package/src/overlays.ts +155 -0
- package/src/permit.ts +19 -0
- package/src/source-fingerprint.ts +103 -0
- package/src/surface-bindings.ts +101 -0
- package/src/topo-store.ts +716 -0
- package/src/types.ts +749 -0
- package/src/versioning.ts +280 -0
- package/src/wayfind/error-facts.ts +363 -0
- package/src/wayfind/filters.ts +430 -0
- package/src/wayfind/loader.ts +443 -0
- package/src/wayfind/navigation.ts +265 -0
- package/src/wayfind/provenance.ts +152 -0
- package/src/wayfind/queries.ts +1656 -0
- package/src/wayfind/relations.ts +344 -0
- package/src/workspace-topos.ts +483 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,543 @@
|
|
|
1
|
+
# @ontrails/topography
|
|
2
|
+
|
|
3
|
+
## 1.0.0-beta.41
|
|
4
|
+
|
|
5
|
+
## 1.0.0-beta.40
|
|
6
|
+
|
|
7
|
+
### Minor Changes
|
|
8
|
+
|
|
9
|
+
- [`6712075`](https://github.com/outfitter-dev/trails/commit/67120754df3f614c7f4dd98be1fa0ba9d69b7765): Complete the v1 hard cutover from the `contour` domain-object declaration
|
|
10
|
+
vocabulary to `entity` across contracts, topo facts, store helpers, Warden,
|
|
11
|
+
Wayfinder, operator surfaces, examples, and generated locks. Existing
|
|
12
|
+
applications must rename contour APIs, run `trails dev reset --yes` to discard
|
|
13
|
+
pre-cutover local Topographer snapshots, and then recompile committed
|
|
14
|
+
`trails.lock` artifacts before upgrading. Those derived snapshots are
|
|
15
|
+
intentionally not read through a compatibility layer.
|
|
16
|
+
The entity-shaped wire contract advances `TopoGraph` and split lock manifests
|
|
17
|
+
from schema version 3 to 4; old split artifacts fail with regeneration guidance,
|
|
18
|
+
while the canonical root `trails.lock` remains schema version 5.
|
|
19
|
+
Wayfinder reports those stale rows as topo-store drift while keeping current
|
|
20
|
+
committed lock facts available for inspection.
|
|
21
|
+
- [`35e5fed`](https://github.com/outfitter-dev/trails/commit/35e5fedd228e498783f479f0dd502e2f3ec772b8): Fold the Wayfinder graph-read catalog into `@ontrails/topography`. Wayfind
|
|
22
|
+
remains the product, trail-id, CLI, and MCP brand, but there is no longer an
|
|
23
|
+
`@ontrails/wayfinder` package to install or import. Programmatic consumers
|
|
24
|
+
should move imports such as `wayfinderTopo`, `wayfindOverviewTrail`,
|
|
25
|
+
`loadWayfinderArtifacts`, and the Wayfinder filter/provenance types to
|
|
26
|
+
`@ontrails/topography`.
|
|
27
|
+
|
|
28
|
+
Expose that package move as a governed Regrade transition so exact
|
|
29
|
+
`@ontrails/wayfinder` imports can move safely while product vocabulary and near
|
|
30
|
+
routes remain unchanged for review. Regrade routes package manifests through
|
|
31
|
+
structured review instead of rewriting dependency keys as plain text.
|
|
32
|
+
|
|
33
|
+
The Trails operator now reads all `wayfind.*` query trails and artifact helpers
|
|
34
|
+
from `@ontrails/topography` while preserving the existing CLI/MCP schemas,
|
|
35
|
+
route IDs, output shapes, and internal trail visibility.
|
|
36
|
+
|
|
37
|
+
- [`3a65ae3`](https://github.com/outfitter-dev/trails/commit/3a65ae363e05b7589f4a9876da4346886353b48c): Rename the durable graph substrate package from `@ontrails/topographer` to
|
|
38
|
+
`@ontrails/topography` after folding Wayfind graph queries into that owner.
|
|
39
|
+
|
|
40
|
+
Update imports to `@ontrails/topography` or
|
|
41
|
+
`@ontrails/topography/backend-support`. The pre-1.0 cutover does not ship a
|
|
42
|
+
compatibility package. TopoGraph, lock, topo-store, semantic diff, and Wayfind
|
|
43
|
+
APIs keep their existing contracts, and the `trails wayfind` CLI and MCP names
|
|
44
|
+
remain unchanged.
|
|
45
|
+
|
|
46
|
+
The governed package-route transition moves legacy `@ontrails/wayfinder`
|
|
47
|
+
imports directly to `@ontrails/topography`; it does not emit the retired
|
|
48
|
+
intermediate `@ontrails/topographer` route.
|
|
49
|
+
|
|
50
|
+
## 1.0.0-beta.39
|
|
51
|
+
|
|
52
|
+
### Minor Changes
|
|
53
|
+
|
|
54
|
+
- [`ea55825`](https://github.com/outfitter-dev/trails/commit/ea558259fa9a6585e5b7e58ff2e0acf94f4ab8a5): Add the namespaced-overlays extension point to the topo graph: `deriveTopoGraph` accepts overlay registrations (namespace + zod schema + derive function), embeds validated facts as `overlays.<namespace>`, covers them with the canonical graph hash, and preserves unknown namespaces byte-for-byte so older toolchains never drop or reject newer overlays.
|
|
55
|
+
|
|
56
|
+
### Patch Changes
|
|
57
|
+
|
|
58
|
+
- [`f42ca6e`](https://github.com/outfitter-dev/trails/commit/f42ca6e40b29155acec446e5bf44e52e014466bd): Hard cutover: the CLI consumes `cli` bindings from the app-authored surfaces overlay. Scalar bindings behave identically to the removed cliAliases (parity-tested) — the binding name splits on `.` into a transparent synonym command path for exactly one trail. List bindings arrive as command groups: each expanded member trail gets a group-prefixed route that dispatches the member trail with its identity preserved, and a singleton list stays a group. Expansion is fail-fast boundary validation: a scalar binding resolving to zero or multiple trails, or a group with an empty member union, is a `ValidationError` naming the binding. `DeriveTopoGraphOptions.cliAliases`, the `cliAliases`/`trailsCliAliases` app-module export convention, and the per-kind compile lift are deleted; `deriveCliCommands`/`createProgram` take `overlays` instead of `aliases`, and both topo-graph derivation pipelines expand the same bindings through one shared helper so runtime CLI routes and lock routes come from one semantic. A leftover legacy export is now a Warden error (`no-legacy-cli-alias-export`) naming the `surfaceOverlay({ cli: { ... } })` rewrite.
|
|
59
|
+
|
|
60
|
+
This is a breaking API removal shipped under the lockstep beta patch convention (pre-1.0 hard-cutover posture, zero external adoption); the removed options have no deprecation window by design.
|
|
61
|
+
|
|
62
|
+
- [`81373bc`](https://github.com/outfitter-dev/trails/commit/81373bc5e980bb06d56fb06af4f0986f72e318c7): Wave-2 MCP cutover to the app-authored `surfaces` overlay. The overlay's `mcp` bindings are now the authored, lockable default for the MCP surface: a list binding derives one grouped trailhead tool (member selection in `{ trail, input }`, member identity preserved in `{ trail, output }`, deterministic derived description), and a scalar binding derives an additional tool synonym whose MCP-safe name is published verbatim and must expand to exactly one trail. `deriveMcpTools`/`createServer` accept the new `overlays` option; `@ontrails/core` gains `expandMcpSurfaceBindings` and `deriveMcpTrailheadDescription`.
|
|
63
|
+
|
|
64
|
+
The call-site `CreateServerOptions.trailheads` map survives as permanent override-in-context design, not a compatibility bridge: when both channels are present, the call-site map wins at runtime. Warden's new `trailhead-override-divergence` rule (warn) names both sides when a call-site map's binding names or member selectors diverge from the authored overlay default.
|
|
65
|
+
|
|
66
|
+
Topographer now derives `graph.trailheads` from the overlay's `mcp` list bindings in both `deriveTopoGraph` and the store-side graph build, so trailhead facts flow from compiled locks into Wayfinder reads for the first time. The never-wired `DeriveTopoGraphOptions.trailheads` option and the `TopoGraphTrailheadDeclaration`/`TopoGraphTrailheadTrailSelector` types are removed — a beta-window hard cutover of an option no caller could reach; author the equivalent `mcp` list binding in `surfaceOverlay({ mcp })` instead.
|
|
67
|
+
|
|
68
|
+
- [`820b4ad`](https://github.com/outfitter-dev/trails/commit/820b4ad9c40ea383b3c489a05fe7e4b2328e324f): Add `surfaceOverlay` — the shared surface-naming schema (scalar binding = synonym, list binding = grouped entry, singleton list stays a group) with app-authored/adapter-derived overlay provenance enforced at collection and consumption, and the `surface-overlay-coherence` Warden rule. MCP tool-name derivation moves to `@ontrails/core` (`deriveMcpToolName`) so the surface and governance read one projection; `@ontrails/mcp`'s `deriveToolName` now delegates to it. The coherence rule activates on standard warden runs once fresh derivations collect app-module overlays through the shared compile channel (TRL-1209, next in this stack).
|
|
69
|
+
- [`a89d469`](https://github.com/outfitter-dev/trails/commit/a89d4696aa78f3dda9394c14665ab3ea8c0f313c): Make `trails compile` → `trails validate` round-trip deterministically (TRL-1191). The per-user topo store no longer reuses previously stored JSON Schema bytes by zod definition hash — that hash cannot see `.describe()` metadata or object field order, so a warm store could serve pre-edit schema values into a freshly compiled lock and make `validate` report it stale immediately. Every snapshot now regenerates schema JSON from the live Zod schema, the store's graph hash goes through the same shared `deriveStableHash` path as `deriveTopoGraphHash`, and the committed `trails.lock` omits the wallclock `generatedAt` field so recompiling unchanged sources yields a byte-identical lock. `TopoGraph.generatedAt` is now optional; locks written by earlier versions still parse.
|
|
70
|
+
- [`a89d469`](https://github.com/outfitter-dev/trails/commit/a89d4696aa78f3dda9394c14665ab3ea8c0f313c): Make the per-user topo store an honest cache (TRL-1196). Every snapshot now records a content fingerprint of the app source set (`topo_snapshots.source_fingerprint`, store schema v14), `trails compile` reports it in its output, and Wayfinder artifact loading compares it against a freshly derived fingerprint — a mismatch surfaces as a `topo-store-source-fingerprint-mismatch` stale reason instead of silently serving pre-edit facts. Compile derives everything from live source on every run, so a poisoned or stale store can never reach `trails.lock`, with or without `--force`.
|
|
71
|
+
|
|
72
|
+
## 1.0.0-beta.38
|
|
73
|
+
|
|
74
|
+
## 1.0.0-beta.37
|
|
75
|
+
|
|
76
|
+
## 1.0.0-beta.36
|
|
77
|
+
|
|
78
|
+
### Patch Changes
|
|
79
|
+
|
|
80
|
+
- [`6e63e48`](https://github.com/outfitter-dev/trails/commit/6e63e483617b84cb6868d0c4d58d5b5a8d3b9ed2): Complete the v1 grouped surface-entry vocabulary cutover from facet to trailhead, including Regrade dogfood support for governed string literal renames and composed AST rewrite application.
|
|
81
|
+
|
|
82
|
+
## 1.0.0-beta.35
|
|
83
|
+
|
|
84
|
+
## 1.0.0-beta.34
|
|
85
|
+
|
|
86
|
+
## 1.0.0-beta.33
|
|
87
|
+
|
|
88
|
+
## 1.0.0-beta.32
|
|
89
|
+
|
|
90
|
+
### Patch Changes
|
|
91
|
+
|
|
92
|
+
- 8db145e: Move activation report derivation into Topographer and keep the Trails app
|
|
93
|
+
consuming the owner-held activation facts through a compatibility re-export.
|
|
94
|
+
- Updated dependencies [3e5c0fc]
|
|
95
|
+
- Updated dependencies [f3c4fef]
|
|
96
|
+
- Updated dependencies [cb0a9d8]
|
|
97
|
+
- Updated dependencies [21c6dda]
|
|
98
|
+
- Updated dependencies [fe72b84]
|
|
99
|
+
- @ontrails/core@1.0.0-beta.32
|
|
100
|
+
|
|
101
|
+
## 1.0.0-beta.31
|
|
102
|
+
|
|
103
|
+
### Patch Changes
|
|
104
|
+
|
|
105
|
+
- Updated dependencies [4cd5d4e]
|
|
106
|
+
- Updated dependencies [38907cc]
|
|
107
|
+
- @ontrails/core@1.0.0-beta.31
|
|
108
|
+
|
|
109
|
+
## 1.0.0-beta.30
|
|
110
|
+
|
|
111
|
+
### Patch Changes
|
|
112
|
+
|
|
113
|
+
- @ontrails/core@1.0.0-beta.30
|
|
114
|
+
|
|
115
|
+
## 1.0.0-beta.29
|
|
116
|
+
|
|
117
|
+
### Patch Changes
|
|
118
|
+
|
|
119
|
+
- @ontrails/core@1.0.0-beta.29
|
|
120
|
+
|
|
121
|
+
## 1.0.0-beta.28
|
|
122
|
+
|
|
123
|
+
### Patch Changes
|
|
124
|
+
|
|
125
|
+
- @ontrails/core@1.0.0-beta.28
|
|
126
|
+
|
|
127
|
+
## 1.0.0-beta.27
|
|
128
|
+
|
|
129
|
+
### Patch Changes
|
|
130
|
+
|
|
131
|
+
- @ontrails/core@1.0.0-beta.27
|
|
132
|
+
|
|
133
|
+
## 1.0.0-beta.26
|
|
134
|
+
|
|
135
|
+
### Patch Changes
|
|
136
|
+
|
|
137
|
+
- f8403c4: Collapse normal topo compilation onto one root `trails.lock` envelope that embeds the TopoGraph, hash, and summary while keeping legacy `.trails/trails.lock` plus `.trails/topo.lock` readers for migration compatibility.
|
|
138
|
+
- 371d19e: Move the default `trails.db` location to the per-user Trails state store, expose deterministic state-store path helpers, stop scaffolding disposable `.trails/cache` and `.trails/state` directories, and update topo-store documentation for the global-state substrate.
|
|
139
|
+
- Updated dependencies [1307568]
|
|
140
|
+
- Updated dependencies [371d19e]
|
|
141
|
+
- @ontrails/core@1.0.0-beta.26
|
|
142
|
+
|
|
143
|
+
## 1.0.0-beta.25
|
|
144
|
+
|
|
145
|
+
### Patch Changes
|
|
146
|
+
|
|
147
|
+
- c36aca9: Preserve existing Result error boundaries directly and widen Warden pass-through
|
|
148
|
+
coaching beyond trail blazes.
|
|
149
|
+
- 9bcf34e: Add trail-owned CLI command projection metadata and serialize resolved command
|
|
150
|
+
route facts for downstream tools.
|
|
151
|
+
- 59d10da: Dogfood CLI command route aliases through the Trails operator, saved Topographer artifacts, and Wayfinder contract inspection.
|
|
152
|
+
- d9c6e50: Embed serializable library projection facts in `topo.lock` so Wayfinder, Warden,
|
|
153
|
+
and generated library package governance can inspect exports, exclusions, and
|
|
154
|
+
collisions from the artifact family.
|
|
155
|
+
- Updated dependencies [c36aca9]
|
|
156
|
+
- Updated dependencies [3befcf1]
|
|
157
|
+
- Updated dependencies [a4f9cf6]
|
|
158
|
+
- Updated dependencies [9bcf34e]
|
|
159
|
+
- @ontrails/core@1.0.0-beta.25
|
|
160
|
+
|
|
161
|
+
## 1.0.0-beta.24
|
|
162
|
+
|
|
163
|
+
### Patch Changes
|
|
164
|
+
|
|
165
|
+
- @ontrails/core@1.0.0-beta.24
|
|
166
|
+
|
|
167
|
+
## 1.0.0-beta.23
|
|
168
|
+
|
|
169
|
+
### Patch Changes
|
|
170
|
+
|
|
171
|
+
- @ontrails/core@1.0.0-beta.23
|
|
172
|
+
|
|
173
|
+
## 1.0.0-beta.22
|
|
174
|
+
|
|
175
|
+
### Patch Changes
|
|
176
|
+
|
|
177
|
+
- @ontrails/core@1.0.0-beta.22
|
|
178
|
+
|
|
179
|
+
## 1.0.0-beta.21
|
|
180
|
+
|
|
181
|
+
### Patch Changes
|
|
182
|
+
|
|
183
|
+
- 99523f2: Clean up resource context naming in shipped source and examples so resource
|
|
184
|
+
factories consistently use resource vocabulary.
|
|
185
|
+
- Updated dependencies [99523f2]
|
|
186
|
+
- @ontrails/core@1.0.0-beta.21
|
|
187
|
+
|
|
188
|
+
## 1.0.0-beta.20
|
|
189
|
+
|
|
190
|
+
### Minor Changes
|
|
191
|
+
|
|
192
|
+
- eee1307: Serialize resolved surface facet metadata in TopoGraph artifacts and expose adapter type evidence for downstream projection checks.
|
|
193
|
+
|
|
194
|
+
### Patch Changes
|
|
195
|
+
|
|
196
|
+
- b248d4a: Add the read-only Wayfinder artifact loader and fact provenance envelope helpers, including cold topo-store schema preflight support.
|
|
197
|
+
- Updated dependencies [851a2a3]
|
|
198
|
+
- @ontrails/core@1.0.0-beta.20
|
|
199
|
+
|
|
200
|
+
## 1.0.0-beta.19
|
|
201
|
+
|
|
202
|
+
### Major Changes
|
|
203
|
+
|
|
204
|
+
- 1eb5bdc: Rename first-class trail composition from the `cross` API family to the `compose` family across core contracts, testing helpers, topo projections, Warden rules, CLI scaffolds, and docs. `composes`, `ctx.compose`, `composeInput`, and `Compose*` type names are now the public authoring vocabulary; topo persistence migrates legacy composition rows and graph keys forward.
|
|
205
|
+
|
|
206
|
+
### Minor Changes
|
|
207
|
+
|
|
208
|
+
- 120caf5: Promote topo artifact commands to `trails compile` and `trails validate`.
|
|
209
|
+
|
|
210
|
+
### Patch Changes
|
|
211
|
+
|
|
212
|
+
- 4bc8a99: Clarify the Topographer artifact workflow around top-level `trails compile`, `trails validate`, and `trails diff` commands, including explicit diagnostics for retired `trails topo compile`, `trails topo verify`, and `trails topo check` attempts.
|
|
213
|
+
- 2d53717: Add trail-only `version` / `versions` authoring types and TopoGraph projection.
|
|
214
|
+
- 16cb740: Run examples and contract checks across live trail version entries, and project version-entry example coverage into topo and survey reports.
|
|
215
|
+
- 8894ecb: Project content-addressed trail version markers and marker-prefix resolution.
|
|
216
|
+
- 653d1fc: Add a top-level `trails diff` command and extend TopoGraph diffs with version, marker, lifecycle status, support set, and force-event audit details.
|
|
217
|
+
- 2e76288: Add graph-only force event projection for forced compile break acceptance and block unforced breaking topo changes.
|
|
218
|
+
- Updated dependencies [e41c382]
|
|
219
|
+
- Updated dependencies [1eb5bdc]
|
|
220
|
+
- Updated dependencies [f8d80b9]
|
|
221
|
+
- Updated dependencies [846a597]
|
|
222
|
+
- Updated dependencies [223aaad]
|
|
223
|
+
- Updated dependencies [3125f4d]
|
|
224
|
+
- Updated dependencies [2494dc6]
|
|
225
|
+
- Updated dependencies [2d53717]
|
|
226
|
+
- Updated dependencies [16cb740]
|
|
227
|
+
- Updated dependencies [8894ecb]
|
|
228
|
+
- Updated dependencies [fdf7ec9]
|
|
229
|
+
- Updated dependencies [d76be13]
|
|
230
|
+
- Updated dependencies [84f56a5]
|
|
231
|
+
- Updated dependencies [431b04c]
|
|
232
|
+
- Updated dependencies [5d88104]
|
|
233
|
+
- Updated dependencies [f04a9ef]
|
|
234
|
+
- @ontrails/core@1.0.0-beta.19
|
|
235
|
+
|
|
236
|
+
## 1.0.0-beta.18
|
|
237
|
+
|
|
238
|
+
### Patch Changes
|
|
239
|
+
|
|
240
|
+
- @ontrails/core@1.0.0-beta.18
|
|
241
|
+
|
|
242
|
+
## 1.0.0-beta.17
|
|
243
|
+
|
|
244
|
+
### Patch Changes
|
|
245
|
+
|
|
246
|
+
- Updated dependencies [3dc8254]
|
|
247
|
+
- @ontrails/core@1.0.0-beta.17
|
|
248
|
+
|
|
249
|
+
## 1.0.0-beta.16
|
|
250
|
+
|
|
251
|
+
### Major Changes
|
|
252
|
+
|
|
253
|
+
- 2bf239e: Move OpenAPI generation ownership to the HTTP surface.
|
|
254
|
+
|
|
255
|
+
**http**: Export `deriveOpenApiSpec()` and its OpenAPI types from `@ontrails/http`.
|
|
256
|
+
|
|
257
|
+
**schema**: Remove the OpenAPI helper export so schema stays focused on surface maps, locks, and semantic diffing.
|
|
258
|
+
|
|
259
|
+
- 3395234: Move store adapter-binding helpers to `@ontrails/store/adapter-support` and topographer direct database/admin helpers to `@ontrails/topographer/backend-support`, keeping root exports focused on contract-level APIs.
|
|
260
|
+
- 7a1d4a9: Rename the public resolved graph API from `SurfaceMap` to `TopoGraph`, including
|
|
261
|
+
the derive, hash, diff, and current graph artifact I/O helpers.
|
|
262
|
+
- 84f595a: Add lock v3 manifest and `topo.lock` I/O. `trails.lock` now reads as a compact v3 manifest that points at the serialized TopoGraph artifact, and legacy v2/hash-only lock inputs fail with a regenerate instruction.
|
|
263
|
+
- d2cb9ba: Rename topo-store export artifacts from surface-era names to TopoGraph names. The `topo_exports` table now stores `topo_graph`, `topo_graph_hash`, and `lock_manifest`, and backend-support export records expose `topoGraphJson`, `topoGraphHash`, and `lockManifestJson`.
|
|
264
|
+
- bbb1ea4: Move the workspace trail index out of the lock manifest and into the serialized TopoGraph artifact. Workspace index reads now consult `topo.lock` workspace metadata, and `buildWorkspaceTrailIndex()` exposes `topo-lock` cache hits through the artifact-family path.
|
|
265
|
+
|
|
266
|
+
### Minor Changes
|
|
267
|
+
|
|
268
|
+
- 3f678d4: Record topo and trail layer attachments in trail surface-map entries, including layer input schemas, so resolved-contract hashing and diffing can detect layer contract changes.
|
|
269
|
+
- 331e3a9: Relocate the topo-store public API from `@ontrails/core` to `@ontrails/topographer` per ADR-0042. Generic `trails-db` helpers (`openReadTrailsDb`, `openWriteTrailsDb`, `ensureSubsystemSchema`, `deriveTrailsDbPath`, `deriveTrailsDir`) stay in core because tracing and other subsystems share them.
|
|
270
|
+
|
|
271
|
+
Breaking pre-1.0 beta change. Update consumer imports:
|
|
272
|
+
|
|
273
|
+
```diff
|
|
274
|
+
- import { topoStore, createTopoStore, createMockTopoStore, createTopoSnapshot, listTopoSnapshots, pinTopoSnapshot, unpinTopoSnapshot, createStoredTopoSnapshot, getStoredTopoExport, countTopoSnapshots, countPinnedSnapshots, countPrunableSnapshots, pruneUnpinnedSnapshots } from '@ontrails/core';
|
|
275
|
+
+ import { topoStore, createTopoStore, createMockTopoStore, createTopoSnapshot, listTopoSnapshots, pinTopoSnapshot, unpinTopoSnapshot } from '@ontrails/topographer';
|
|
276
|
+
+ import { createStoredTopoSnapshot, getStoredTopoExport, countTopoSnapshots, countPinnedSnapshots, countPrunableSnapshots, pruneUnpinnedSnapshots } from '@ontrails/topographer/backend-support';
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
The same root move applies to types `ReadOnlyTopoStore`, `MockTopoStoreSeed`, `TopoSnapshot`, `TopoStoreRef`, `TopoStoreExportRecord`, `TopoStoreResourceRecord`, `TopoStoreTrailRecord`, `TopoStoreTrailDetailRecord`, `CreateTopoSnapshotInput`, and `ListTopoSnapshotsOptions`. The direct DB helper type `StoredTopoExport` moves to `@ontrails/topographer/backend-support`.
|
|
280
|
+
|
|
281
|
+
Core newly exports `activationSourceKey`, `projectActivationSourceDeclaration`, `activationSourceDeclarationSignature`, and the `ActivationSourceProjection` type — these were already used internally and are now part of the public surface so `@ontrails/topographer` (the only consumer that needs them) can import them through normal package channels.
|
|
282
|
+
|
|
283
|
+
- 4b8d13b: **BREAKING:** Rename surface-map exposure fields from `trailheads` to `surfaces`.
|
|
284
|
+
|
|
285
|
+
`SurfaceMapEntry.trailheads` is now `SurfaceMapEntry.surfaces`, persisted surface-map JSON now writes `surfaces`, and diff details now report `Surface "<name>" added/removed`.
|
|
286
|
+
|
|
287
|
+
See `docs/migration/trailhead-to-surface.md` for the full migration map.
|
|
288
|
+
|
|
289
|
+
- 6be2e95: Extend the lockfile schema to catalog trail IDs across apps. `SurfaceLock` now carries a Zod-validated `workspaceTrails` map whose entries include the trail ID, owning app name, and app module path, plus a narrowed `version: '2'` envelope for structured locks. The new `readWorkspaceLock()` reader returns the enriched trail-id index when present, or `null` for legacy / single-app locks. `TopoSnapshot` gains an optional `appName` attribution column (SQLite `topo_snapshots.app_name`, schema version 11) so snapshots can be attributed to their owning app. Single-app repos remain backward compatible — no workspace metadata is emitted unless the writer is given a `workspaceTrails` map.
|
|
290
|
+
- 819de09: Add `buildWorkspaceTrailIndex()` for runtime workspace topo discovery and cross-app trail-ID resolution. Discovers apps via root `package.json` workspaces, identifies Trails apps by `package.json.trails.module` or a `src/app.ts` convention, and builds an enriched `{ trailId → { trailId, appName, modulePath } }` index. Prefers the lockfile's `workspaceTrails` map (from TRL-403) when present for fast paths; falls back to dynamic loader-based discovery otherwise. The loader is injectable for testing. This is the runtime substrate that `trails run <id>` (TRL-398) will use to resolve trail IDs to owning apps without scanning source. Per the TRL-608 boundary rule, this is Topographer-owned tooling — `@ontrails/core` is not modified.
|
|
291
|
+
- be08686: Detect trail-ID collisions across apps in `buildWorkspaceTrailIndex()`. Replaces last-write-wins behavior with structured collision facts: `WorkspaceTrailIndexResult` now carries `collisions: WorkspaceTrailCollision[]` where each collision records the trail ID and the sorted list of owning apps. Colliding IDs are **omitted from `index`** so silent ambiguity is impossible; callers such as `trails run` must explicitly resolve via `--app` or prompt. Non-colliding IDs continue to resolve through the enriched `index` entries. Lockfile path always returns `collisions: []` because the lockfile is already a flat map and cannot collide.
|
|
292
|
+
- 893025e: Add `--permit '<json>'` to inject an inline permit on `trails run`. New `permitPreset()` exposes a `--permit` string flag that the CLI build parses and validates against the `BasePermit` shape (`{ id: string, scopes: string[] }`) using a small Zod schema. Valid permits flow through `ExecuteTrailOptions.permit` → `applyContextOverrides` → `ctx.permit` so existing `enforcePermitRequirement` behavior just sees a populated permit. Invalid JSON or schema mismatch surface as `Result.err(ValidationError)` (exit code 1) before the trail runs, avoiding spurious `PermitError` results from malformed input. The flag is global, never routed into trail input (added to `META_FLAG_CANDIDATES`), and overlays only when defined.
|
|
293
|
+
|
|
294
|
+
Topographer now projects permit requirements into surface-map entries and classifies permit-tightening diffs as breaking when new scopes are required.
|
|
295
|
+
|
|
296
|
+
### Patch Changes
|
|
297
|
+
|
|
298
|
+
- de30d6c: Introduce `topo.compile` as the canonical trail for writing `.trails` lockfile
|
|
299
|
+
and surface artifacts, remove the `survey --generate` mode, and update drift
|
|
300
|
+
guidance to point at the compile command.
|
|
301
|
+
- c40865a: Batch topo-store signal relation reads for list views so signal consumers, producers, and source trails are loaded with one bounded query per relation table instead of per signal.
|
|
302
|
+
- 4399fdb: Renamed `@ontrails/schema` to `@ontrails/topographer`. Mechanical rename only — no API changes. Update import sites from `@ontrails/schema` to `@ontrails/topographer`. See ADR-0042 for the durable graph substrate doctrine.
|
|
303
|
+
- b12e19b: Added typed topo-store views over saved `TopoGraph` content, including typed
|
|
304
|
+
`topoGraph`, `entries`, and `contours` accessors plus parsed lock manifest and
|
|
305
|
+
TopoGraph payloads on exported snapshot records.
|
|
306
|
+
- ed7f6f6: Expand topo-store and survey trail detail records with resolved TopoGraph contract facts for blind-agent review.
|
|
307
|
+
- Updated dependencies [73622ae]
|
|
308
|
+
- Updated dependencies [6300f70]
|
|
309
|
+
- Updated dependencies [d172013]
|
|
310
|
+
- Updated dependencies [c3fc5c3]
|
|
311
|
+
- Updated dependencies [20d7a5c]
|
|
312
|
+
- Updated dependencies [be5fb46]
|
|
313
|
+
- Updated dependencies [e898cc4]
|
|
314
|
+
- Updated dependencies [3395234]
|
|
315
|
+
- Updated dependencies [bcdc484]
|
|
316
|
+
- Updated dependencies [331e3a9]
|
|
317
|
+
- Updated dependencies [4399fdb]
|
|
318
|
+
- Updated dependencies [4b8d13b]
|
|
319
|
+
- Updated dependencies [112b9f2]
|
|
320
|
+
- Updated dependencies [893025e]
|
|
321
|
+
- Updated dependencies [eec5e9d]
|
|
322
|
+
- Updated dependencies [ebd4434]
|
|
323
|
+
- Updated dependencies [863d473]
|
|
324
|
+
- Updated dependencies [344f2f7]
|
|
325
|
+
- Updated dependencies [26f9ffd]
|
|
326
|
+
- Updated dependencies [10eae9a]
|
|
327
|
+
- Updated dependencies [22c6c06]
|
|
328
|
+
- @ontrails/core@1.0.0-beta.16
|
|
329
|
+
|
|
330
|
+
## Unreleased
|
|
331
|
+
|
|
332
|
+
### Patch Changes
|
|
333
|
+
|
|
334
|
+
- Renamed package from `@ontrails/schema` to `@ontrails/topographer`. No API changes; mechanical rename only. See ADR-0042 for the durable graph substrate doctrine.
|
|
335
|
+
|
|
336
|
+
## 1.0.0-beta.15
|
|
337
|
+
|
|
338
|
+
### Patch Changes
|
|
339
|
+
|
|
340
|
+
- Updated dependencies [4ad6b25]
|
|
341
|
+
- @ontrails/core@1.0.0-beta.15
|
|
342
|
+
|
|
343
|
+
## 1.0.0-beta.14
|
|
344
|
+
|
|
345
|
+
### Minor Changes
|
|
346
|
+
|
|
347
|
+
- 69057e9: Add hierarchical CLI command trees and structured input, enforce established-only topo exports across trailheads, move developer topo and tracker state onto shared `trails.db` with pins and maintenance flows, and ship schema-derived stores through `@ontrails/store` and its Drizzle runtime.
|
|
348
|
+
|
|
349
|
+
### Patch Changes
|
|
350
|
+
|
|
351
|
+
- Updated dependencies [69057e9]
|
|
352
|
+
- @ontrails/core@1.0.0-beta.14
|
|
353
|
+
|
|
354
|
+
## 1.0.0-beta.13
|
|
355
|
+
|
|
356
|
+
### Minor Changes
|
|
357
|
+
|
|
358
|
+
- Trail-native vocabulary cutover. Breaking API field renames across all packages:
|
|
359
|
+
|
|
360
|
+
- Trail spec: `run:` → `blaze:`, `follow:` → `crosses:`, `services:` → `provisions:`, `metadata:` → `meta:`, `emits:` → `signals:`
|
|
361
|
+
- Runtime: `ctx.follow()` → `ctx.cross()`, `ctx.emit()` → `ctx.signal()`, `ctx.signal` (abort) → `ctx.abortSignal`
|
|
362
|
+
- Entry points: `blaze(app)` → `trailhead(app)`
|
|
363
|
+
- Package rename: `@ontrails/crumbs` → `@ontrails/tracker`
|
|
364
|
+
- Wrapper types: `Layer` → `Gate`, `layers`/`middleware` → `gates`
|
|
365
|
+
- Transport: `surface` → `trailhead`, `adapter` → `connector`
|
|
366
|
+
|
|
367
|
+
### Patch Changes
|
|
368
|
+
|
|
369
|
+
- Updated dependencies [6944147]
|
|
370
|
+
- Updated dependencies
|
|
371
|
+
- @ontrails/core@1.0.0-beta.13
|
|
372
|
+
|
|
373
|
+
## 1.0.0-beta.12
|
|
374
|
+
|
|
375
|
+
### Patch Changes
|
|
376
|
+
|
|
377
|
+
- Updated dependencies
|
|
378
|
+
- @ontrails/core@1.0.0-beta.12
|
|
379
|
+
|
|
380
|
+
## 1.0.0-beta.11
|
|
381
|
+
|
|
382
|
+
### Patch Changes
|
|
383
|
+
|
|
384
|
+
- Add provisions as a first-class primitive.
|
|
385
|
+
|
|
386
|
+
Provisions make infrastructure dependencies declarative, injectable, and governable. Define a provision with `provision()`, declare it on a trail with `provisions: [db]`, and access it with `db.from(ctx)` or `ctx.provision()`.
|
|
387
|
+
|
|
388
|
+
**Core:** `provision()` factory, `ProvisionSpec<T>`, `ProvisionContext`, singleton resolution in `executeTrail`, in-flight creation dedup, `isProvision` guard, `findDuplicateProvisionId`, topo provision discovery and validation, `provisions` field on trail specs.
|
|
389
|
+
|
|
390
|
+
**Testing:** Auto-resolution of `mock` factories in `testAll`, `testExamples`, `testContracts`, and `testCrosses`. Explicit `provisions` overrides with correct precedence (`explicit > ctx.extensions > auto-mock`). Provision mock propagation through crossing graphs.
|
|
391
|
+
|
|
392
|
+
**Warden:** `provision-declarations` rule validates `db.from(ctx)` and `ctx.provision()` usage matches declared `provisions: [...]`. `provision-exists` rule validates declared provision IDs resolve in project context. Scope-aware AST walking skips nested function boundaries.
|
|
393
|
+
|
|
394
|
+
**Trailheads:** Provision overrides thread through `run` and `trailhead` on CLI, MCP, and HTTP.
|
|
395
|
+
|
|
396
|
+
**Introspection:** Survey and trailhead map outputs include provision graph. Topo exposes `.provisions`, `.getProvision()`, `.hasProvision()`, `.listProvisions()`, `.provisionIds()`, `.provisionCount`.
|
|
397
|
+
|
|
398
|
+
**Docs:** ADR-009 accepted. Unified services guide, updated vocabulary, getting-started, architecture, and package READMEs.
|
|
399
|
+
|
|
400
|
+
- Updated dependencies
|
|
401
|
+
- @ontrails/core@1.0.0-beta.11
|
|
402
|
+
|
|
403
|
+
## 1.0.0-beta.10
|
|
404
|
+
|
|
405
|
+
### Patch Changes
|
|
406
|
+
|
|
407
|
+
- Updated dependencies
|
|
408
|
+
- @ontrails/core@1.0.0-beta.10
|
|
409
|
+
|
|
410
|
+
## 1.0.0-beta.9
|
|
411
|
+
|
|
412
|
+
### Minor Changes
|
|
413
|
+
|
|
414
|
+
- Consolidated improvements across all trailhead packages.
|
|
415
|
+
|
|
416
|
+
**core**: Add `TrailResult<T>` utility type, `topo.ids()` and `topo.count` accessors, `run()` for headless trail execution, and extract shared `executeTrail` pipeline used by CLI/MCP/HTTP.
|
|
417
|
+
|
|
418
|
+
**http**: Detect route path collisions and return `Result` from `buildHttpRoutes()`, wire request `AbortSignal` through to trail context, and make write → POST mapping explicit in intent-to-method lookup.
|
|
419
|
+
|
|
420
|
+
**mcp**: Return `Result` from `buildMcpTools()` on collision instead of throwing.
|
|
421
|
+
|
|
422
|
+
**cli**: Verify exception catching via centralized `executeTrail`.
|
|
423
|
+
|
|
424
|
+
**testing**: Cross-context awareness improvements.
|
|
425
|
+
|
|
426
|
+
**warden**: Refactor rules as composable trails with examples.
|
|
427
|
+
|
|
428
|
+
**schema**: Error code and empty body fixes.
|
|
429
|
+
|
|
430
|
+
### Patch Changes
|
|
431
|
+
|
|
432
|
+
- Updated dependencies
|
|
433
|
+
- @ontrails/core@1.0.0-beta.9
|
|
434
|
+
|
|
435
|
+
## 1.0.0-beta.8
|
|
436
|
+
|
|
437
|
+
### Patch Changes
|
|
438
|
+
|
|
439
|
+
- Restructure HTTP package and fix Codex review findings.
|
|
440
|
+
|
|
441
|
+
**http**: BREAKING — `trailhead()` moved to `@ontrails/http/hono` subpath. Hono is now a peer dependency. `buildHttpRoutes()` is framework-agnostic. Fixed: malformed JSON → 400, execute() never throws, query parsing preserves raw strings and supports arrays.
|
|
442
|
+
|
|
443
|
+
**schema**: OpenAPI 200 response wraps in `{ data }` envelope matching wire format. Always includes 400 ValidationError with error schema. basePath trailing slash normalized.
|
|
444
|
+
|
|
445
|
+
- @ontrails/core@1.0.0-beta.8
|
|
446
|
+
|
|
447
|
+
## 1.0.0-beta.7
|
|
448
|
+
|
|
449
|
+
### Minor Changes
|
|
450
|
+
|
|
451
|
+
- HTTP trailhead and OpenAPI generation.
|
|
452
|
+
|
|
453
|
+
**http**: New `@ontrails/http` package — Hono-based HTTP connector. `trailhead()` derives routes from trail IDs, maps intent to HTTP verbs (read→GET, write→POST, destroy→DELETE), and maps error taxonomy to status codes. Returns the Hono instance.
|
|
454
|
+
|
|
455
|
+
**schema**: Add `generateOpenApiSpec(topo)` — generates a complete OpenAPI 3.1 spec from the topo. Each trail becomes an operation with path, method, schemas, and error responses derived from the contract.
|
|
456
|
+
|
|
457
|
+
**trails**: `trails survey --openapi` outputs the OpenAPI spec for any Trails app.
|
|
458
|
+
|
|
459
|
+
### Patch Changes
|
|
460
|
+
|
|
461
|
+
- @ontrails/core@1.0.0-beta.7
|
|
462
|
+
|
|
463
|
+
## 1.0.0-beta.6
|
|
464
|
+
|
|
465
|
+
### Patch Changes
|
|
466
|
+
|
|
467
|
+
- Updated dependencies
|
|
468
|
+
- @ontrails/core@1.0.0-beta.6
|
|
469
|
+
|
|
470
|
+
## 1.0.0-beta.5
|
|
471
|
+
|
|
472
|
+
### Patch Changes
|
|
473
|
+
|
|
474
|
+
- Updated dependencies
|
|
475
|
+
- @ontrails/core@1.0.0-beta.5
|
|
476
|
+
|
|
477
|
+
## 1.0.0-beta.4
|
|
478
|
+
|
|
479
|
+
### Major Changes
|
|
480
|
+
|
|
481
|
+
- API simplification: unified trail model, intent enum, run, metadata.
|
|
482
|
+
|
|
483
|
+
**BREAKING CHANGES:**
|
|
484
|
+
|
|
485
|
+
- `hike()` removed — use `trail()` with optional `crosses: [...]` field
|
|
486
|
+
- `follows` renamed to `crosses` (matching `ctx.cross()`)
|
|
487
|
+
- `topo.hikes` removed — single `topo.trails` map
|
|
488
|
+
- `kind: 'hike'` removed — everything is `kind: 'trail'`
|
|
489
|
+
- `readOnly`/`destructive` booleans replaced by `intent: 'read' | 'write' | 'destroy'`
|
|
490
|
+
- `implementation` field renamed to `run`
|
|
491
|
+
- `markers` field renamed to `metadata`
|
|
492
|
+
- `testHike` renamed to `testCrosses`, `HikeScenario` to `CrossScenario`
|
|
493
|
+
- `trailhead()` now returns the trailhead handle (`Command` for CLI, `Server` for MCP)
|
|
494
|
+
|
|
495
|
+
### Patch Changes
|
|
496
|
+
|
|
497
|
+
- Updated dependencies
|
|
498
|
+
- @ontrails/core@1.0.0-beta.4
|
|
499
|
+
|
|
500
|
+
## 1.0.0-beta.3
|
|
501
|
+
|
|
502
|
+
### Patch Changes
|
|
503
|
+
|
|
504
|
+
- Updated dependencies
|
|
505
|
+
- @ontrails/core@1.0.0-beta.3
|
|
506
|
+
|
|
507
|
+
## 1.0.0-beta.2
|
|
508
|
+
|
|
509
|
+
### Patch Changes
|
|
510
|
+
|
|
511
|
+
- Fix workspace dependency resolution in published packages. Now using bun publish
|
|
512
|
+
which correctly replaces workspace:^ with actual version numbers.
|
|
513
|
+
- Updated dependencies
|
|
514
|
+
- @ontrails/core@1.0.0-beta.2
|
|
515
|
+
|
|
516
|
+
## 1.0.0-beta.1
|
|
517
|
+
|
|
518
|
+
### Patch Changes
|
|
519
|
+
|
|
520
|
+
- Fix two blocking bugs from real-world migration:
|
|
521
|
+
- Published packages now resolve correctly (workspace:^ instead of workspace:\*)
|
|
522
|
+
- Error forwarding works across different success types (Err no longer carries phantom T)
|
|
523
|
+
- Updated dependencies
|
|
524
|
+
- @ontrails/core@1.0.0-beta.1
|
|
525
|
+
|
|
526
|
+
## 1.0.0-beta.0
|
|
527
|
+
|
|
528
|
+
### Minor Changes
|
|
529
|
+
|
|
530
|
+
- Initial v1 beta release of the Trails framework.
|
|
531
|
+
|
|
532
|
+
- **@ontrails/core** — Result type, error taxonomy, trail/hike/event/topo, validateTopo, validateInput/Output, deriveFields, patterns, redaction, branded types, resilience
|
|
533
|
+
- **@ontrails/cli** — CLI trailhead connector, Commander integration, flag derivation, gates
|
|
534
|
+
- **@ontrails/mcp** — MCP trailhead connector, tool generation, annotations, progress bridge
|
|
535
|
+
- **@ontrails/logging** — Structured logging, sinks, formatters, LogTape connector
|
|
536
|
+
- **@ontrails/testing** — testAll, testExamples, testTrail, testHike, testContracts, testDetours, trailhead harnesses
|
|
537
|
+
- **@ontrails/warden** — AST-based code convention rules via oxc-parser, drift detection, CI formatters
|
|
538
|
+
- **@ontrails/schema** — Trailhead map generation, hashing, semantic diffing
|
|
539
|
+
|
|
540
|
+
### Patch Changes
|
|
541
|
+
|
|
542
|
+
- Updated dependencies
|
|
543
|
+
- @ontrails/core@1.0.0-beta.0
|