@ontrails/trails 1.0.0-beta.15 → 1.0.0-beta.17
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 +215 -2
- package/README.md +27 -0
- package/package.json +21 -8
- package/src/app.ts +15 -5
- package/src/cli.ts +303 -10
- package/src/completions.ts +240 -0
- package/src/load-app-mirror.ts +160 -0
- package/src/local-state-io.ts +153 -0
- package/src/project-writes.ts +320 -0
- package/src/run-collision.ts +125 -0
- package/src/run-completions-install.ts +179 -0
- package/src/run-example.ts +149 -0
- package/src/run-examples.ts +148 -0
- package/src/run-quiet.ts +75 -0
- package/src/run-trace.ts +273 -0
- package/src/run-warden.ts +39 -0
- package/src/run-watch.ts +432 -0
- package/src/scaffold-versions.generated.ts +12 -0
- package/src/trails/add-surface.ts +45 -23
- package/src/trails/add-trail.ts +27 -17
- package/src/trails/add-verify.ts +57 -17
- package/src/trails/completions-complete.ts +165 -0
- package/src/trails/completions.ts +47 -0
- package/src/trails/create-scaffold.ts +86 -33
- package/src/trails/create.ts +11 -3
- package/src/trails/dev-clean.ts +6 -1
- package/src/trails/dev-reset.ts +6 -1
- package/src/trails/dev-stats.ts +6 -1
- package/src/trails/dev-support.ts +29 -17
- package/src/trails/draft-promote.ts +289 -80
- package/src/trails/guide.ts +54 -34
- package/src/trails/load-app.ts +251 -56
- package/src/trails/root-dir.ts +21 -0
- package/src/trails/run-example.ts +482 -0
- package/src/trails/run-examples.ts +141 -0
- package/src/trails/run.ts +403 -0
- package/src/trails/survey.ts +534 -200
- package/src/trails/topo-activation.ts +385 -0
- package/src/trails/topo-compile.ts +55 -0
- package/src/trails/topo-history.ts +6 -1
- package/src/trails/topo-output-schemas.ts +219 -0
- package/src/trails/topo-pin.ts +19 -6
- package/src/trails/topo-read-support.ts +171 -228
- package/src/trails/topo-reports.ts +587 -25
- package/src/trails/topo-store-support.ts +43 -19
- package/src/trails/topo-support.ts +18 -28
- package/src/trails/topo-unpin.ts +6 -1
- package/src/trails/topo-verify.ts +18 -5
- package/src/trails/topo.ts +60 -23
- package/src/trails/warden-guide.ts +121 -0
- package/src/trails/warden.ts +137 -56
- package/src/versions.ts +3 -18
- package/.turbo/turbo-build.log +0 -1
- package/.turbo/turbo-lint.log +0 -3
- package/.turbo/turbo-typecheck.log +0 -1
- package/__tests__/examples.test.ts +0 -45
- package/dist/bin/trails.d.ts +0 -3
- package/dist/bin/trails.d.ts.map +0 -1
- package/dist/bin/trails.js +0 -4
- package/dist/bin/trails.js.map +0 -1
- package/dist/src/app.d.ts +0 -2
- package/dist/src/app.d.ts.map +0 -1
- package/dist/src/app.js +0 -22
- package/dist/src/app.js.map +0 -1
- package/dist/src/clack.d.ts +0 -9
- package/dist/src/clack.d.ts.map +0 -1
- package/dist/src/clack.js +0 -84
- package/dist/src/clack.js.map +0 -1
- package/dist/src/cli.d.ts +0 -2
- package/dist/src/cli.d.ts.map +0 -1
- package/dist/src/cli.js +0 -14
- package/dist/src/cli.js.map +0 -1
- package/dist/src/trails/add-surface.d.ts +0 -13
- package/dist/src/trails/add-surface.d.ts.map +0 -1
- package/dist/src/trails/add-surface.js +0 -110
- package/dist/src/trails/add-surface.js.map +0 -1
- package/dist/src/trails/add-trail.d.ts +0 -12
- package/dist/src/trails/add-trail.d.ts.map +0 -1
- package/dist/src/trails/add-trail.js +0 -104
- package/dist/src/trails/add-trail.js.map +0 -1
- package/dist/src/trails/add-trailhead.d.ts +0 -13
- package/dist/src/trails/add-trailhead.d.ts.map +0 -1
- package/dist/src/trails/add-trailhead.js +0 -88
- package/dist/src/trails/add-trailhead.js.map +0 -1
- package/dist/src/trails/add-verify.d.ts +0 -10
- package/dist/src/trails/add-verify.d.ts.map +0 -1
- package/dist/src/trails/add-verify.js +0 -68
- package/dist/src/trails/add-verify.js.map +0 -1
- package/dist/src/trails/create-scaffold.d.ts +0 -15
- package/dist/src/trails/create-scaffold.d.ts.map +0 -1
- package/dist/src/trails/create-scaffold.js +0 -295
- package/dist/src/trails/create-scaffold.js.map +0 -1
- package/dist/src/trails/create.d.ts +0 -18
- package/dist/src/trails/create.d.ts.map +0 -1
- package/dist/src/trails/create.js +0 -126
- package/dist/src/trails/create.js.map +0 -1
- package/dist/src/trails/dev-clean.d.ts +0 -9
- package/dist/src/trails/dev-clean.d.ts.map +0 -1
- package/dist/src/trails/dev-clean.js +0 -66
- package/dist/src/trails/dev-clean.js.map +0 -1
- package/dist/src/trails/dev-reset.d.ts +0 -6
- package/dist/src/trails/dev-reset.d.ts.map +0 -1
- package/dist/src/trails/dev-reset.js +0 -39
- package/dist/src/trails/dev-reset.js.map +0 -1
- package/dist/src/trails/dev-stats.d.ts +0 -7
- package/dist/src/trails/dev-stats.d.ts.map +0 -1
- package/dist/src/trails/dev-stats.js +0 -61
- package/dist/src/trails/dev-stats.js.map +0 -1
- package/dist/src/trails/dev-support.d.ts +0 -64
- package/dist/src/trails/dev-support.d.ts.map +0 -1
- package/dist/src/trails/dev-support.js +0 -181
- package/dist/src/trails/dev-support.js.map +0 -1
- package/dist/src/trails/draft-promote.d.ts +0 -18
- package/dist/src/trails/draft-promote.d.ts.map +0 -1
- package/dist/src/trails/draft-promote.js +0 -400
- package/dist/src/trails/draft-promote.js.map +0 -1
- package/dist/src/trails/guide.d.ts +0 -21
- package/dist/src/trails/guide.d.ts.map +0 -1
- package/dist/src/trails/guide.js +0 -61
- package/dist/src/trails/guide.js.map +0 -1
- package/dist/src/trails/load-app.d.ts +0 -12
- package/dist/src/trails/load-app.d.ts.map +0 -1
- package/dist/src/trails/load-app.js +0 -415
- package/dist/src/trails/load-app.js.map +0 -1
- package/dist/src/trails/project.d.ts +0 -8
- package/dist/src/trails/project.d.ts.map +0 -1
- package/dist/src/trails/project.js +0 -54
- package/dist/src/trails/project.js.map +0 -1
- package/dist/src/trails/survey.d.ts +0 -18
- package/dist/src/trails/survey.d.ts.map +0 -1
- package/dist/src/trails/survey.js +0 -234
- package/dist/src/trails/survey.js.map +0 -1
- package/dist/src/trails/topo-constants.d.ts +0 -3
- package/dist/src/trails/topo-constants.d.ts.map +0 -1
- package/dist/src/trails/topo-constants.js +0 -3
- package/dist/src/trails/topo-constants.js.map +0 -1
- package/dist/src/trails/topo-export.d.ts +0 -19
- package/dist/src/trails/topo-export.d.ts.map +0 -1
- package/dist/src/trails/topo-export.js +0 -31
- package/dist/src/trails/topo-export.js.map +0 -1
- package/dist/src/trails/topo-history.d.ts +0 -20
- package/dist/src/trails/topo-history.d.ts.map +0 -1
- package/dist/src/trails/topo-history.js +0 -32
- package/dist/src/trails/topo-history.js.map +0 -1
- package/dist/src/trails/topo-pin.d.ts +0 -17
- package/dist/src/trails/topo-pin.d.ts.map +0 -1
- package/dist/src/trails/topo-pin.js +0 -31
- package/dist/src/trails/topo-pin.js.map +0 -1
- package/dist/src/trails/topo-read-support.d.ts +0 -58
- package/dist/src/trails/topo-read-support.d.ts.map +0 -1
- package/dist/src/trails/topo-read-support.js +0 -167
- package/dist/src/trails/topo-read-support.js.map +0 -1
- package/dist/src/trails/topo-reports.d.ts +0 -54
- package/dist/src/trails/topo-reports.d.ts.map +0 -1
- package/dist/src/trails/topo-reports.js +0 -128
- package/dist/src/trails/topo-reports.js.map +0 -1
- package/dist/src/trails/topo-show.d.ts +0 -23
- package/dist/src/trails/topo-show.d.ts.map +0 -1
- package/dist/src/trails/topo-show.js +0 -49
- package/dist/src/trails/topo-show.js.map +0 -1
- package/dist/src/trails/topo-store-support.d.ts +0 -13
- package/dist/src/trails/topo-store-support.d.ts.map +0 -1
- package/dist/src/trails/topo-store-support.js +0 -55
- package/dist/src/trails/topo-store-support.js.map +0 -1
- package/dist/src/trails/topo-support.d.ts +0 -76
- package/dist/src/trails/topo-support.d.ts.map +0 -1
- package/dist/src/trails/topo-support.js +0 -132
- package/dist/src/trails/topo-support.js.map +0 -1
- package/dist/src/trails/topo-unpin.d.ts +0 -20
- package/dist/src/trails/topo-unpin.d.ts.map +0 -1
- package/dist/src/trails/topo-unpin.js +0 -44
- package/dist/src/trails/topo-unpin.js.map +0 -1
- package/dist/src/trails/topo-verify.d.ts +0 -5
- package/dist/src/trails/topo-verify.d.ts.map +0 -1
- package/dist/src/trails/topo-verify.js +0 -24
- package/dist/src/trails/topo-verify.js.map +0 -1
- package/dist/src/trails/topo.d.ts +0 -5
- package/dist/src/trails/topo.d.ts.map +0 -1
- package/dist/src/trails/topo.js +0 -63
- package/dist/src/trails/topo.js.map +0 -1
- package/dist/src/trails/warden.d.ts +0 -20
- package/dist/src/trails/warden.d.ts.map +0 -1
- package/dist/src/trails/warden.js +0 -98
- package/dist/src/trails/warden.js.map +0 -1
- package/dist/src/versions.d.ts +0 -12
- package/dist/src/versions.d.ts.map +0 -1
- package/dist/src/versions.js +0 -23
- package/dist/src/versions.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/src/__tests__/add-trail.test.ts +0 -97
- package/src/__tests__/create.test.ts +0 -415
- package/src/__tests__/draft-promote.test.ts +0 -144
- package/src/__tests__/guide.test.ts +0 -96
- package/src/__tests__/load-app.test.ts +0 -419
- package/src/__tests__/survey.test.ts +0 -377
- package/src/__tests__/topo-dev.test.ts +0 -426
- package/src/__tests__/warden.test.ts +0 -74
- package/src/trails/topo-export.ts +0 -35
- package/src/trails/topo-show.ts +0 -54
- package/tsconfig.json +0 -9
- package/tsconfig.tests.json +0 -10
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `survey` trail -- Full topo introspection.
|
|
3
|
-
*
|
|
4
|
-
* Lists trails, shows detail for individual trails, generates surface maps,
|
|
5
|
-
* and diffs against previous versions.
|
|
6
|
-
*/
|
|
7
|
-
import { join } from 'node:path';
|
|
8
|
-
import { NotFoundError, Result, trail } from '@ontrails/core';
|
|
9
|
-
import { deriveSurfaceMapDiff, deriveOpenApiSpec, deriveSurfaceMap, readSurfaceMap, } from '@ontrails/schema';
|
|
10
|
-
import { z } from 'zod';
|
|
11
|
-
import { loadApp, loadFreshAppLease } from './load-app.js';
|
|
12
|
-
import { buildCurrentTopoBrief, buildCurrentTopoDetail, buildCurrentTopoList, } from './topo-read-support.js';
|
|
13
|
-
import { exportCurrentTopo } from './topo-store-support.js';
|
|
14
|
-
export { deriveBriefReport, deriveResourceDetail, deriveSurveyList, deriveTrailDetail, } from './topo-reports.js';
|
|
15
|
-
// ---------------------------------------------------------------------------
|
|
16
|
-
// Brief report (formerly scout)
|
|
17
|
-
// ---------------------------------------------------------------------------
|
|
18
|
-
const formatDiff = (diff) => ({
|
|
19
|
-
breaking: diff.breaking,
|
|
20
|
-
hasBreaking: diff.hasBreaking,
|
|
21
|
-
info: diff.info,
|
|
22
|
-
warnings: diff.warnings,
|
|
23
|
-
});
|
|
24
|
-
const buildSurveyDiff = async (app, rootDir, breakingOnly) => {
|
|
25
|
-
const currentMap = deriveSurfaceMap(app);
|
|
26
|
-
const previousMap = await readSurfaceMap({ dir: join(rootDir, '.trails') });
|
|
27
|
-
if (!previousMap) {
|
|
28
|
-
return Result.err(new NotFoundError('No saved surface map found. Run `trails topo export` first.'));
|
|
29
|
-
}
|
|
30
|
-
const diff = deriveSurfaceMapDiff(previousMap, currentMap);
|
|
31
|
-
return Result.ok(breakingOnly
|
|
32
|
-
? formatDiff({
|
|
33
|
-
...diff,
|
|
34
|
-
entries: diff.breaking,
|
|
35
|
-
info: [],
|
|
36
|
-
warnings: [],
|
|
37
|
-
})
|
|
38
|
-
: formatDiff(diff));
|
|
39
|
-
};
|
|
40
|
-
const buildSurveyDetail = (app, trailId, rootDir) => {
|
|
41
|
-
const detail = buildCurrentTopoDetail(app, trailId, { rootDir });
|
|
42
|
-
if (detail !== undefined) {
|
|
43
|
-
return Result.ok(detail);
|
|
44
|
-
}
|
|
45
|
-
return Result.err(new NotFoundError(`Trail or resource not found: ${trailId}`));
|
|
46
|
-
};
|
|
47
|
-
const buildSurveyGenerate = async (app, rootDir) => {
|
|
48
|
-
const exported = await exportCurrentTopo(app, { rootDir });
|
|
49
|
-
if (exported.isErr()) {
|
|
50
|
-
return exported;
|
|
51
|
-
}
|
|
52
|
-
return Result.ok({
|
|
53
|
-
hash: exported.value.hash,
|
|
54
|
-
lockPath: exported.value.lockPath,
|
|
55
|
-
mapPath: exported.value.mapPath,
|
|
56
|
-
});
|
|
57
|
-
};
|
|
58
|
-
/** Ordered mode checks — first truthy predicate wins, otherwise 'list'. */
|
|
59
|
-
const modeChecks = [
|
|
60
|
-
[(i) => i.brief, 'brief'],
|
|
61
|
-
[(i) => i.diffSaved, 'diff'],
|
|
62
|
-
[(i) => Boolean(i.trailId), 'detail'],
|
|
63
|
-
[(i) => i.generate, 'generate'],
|
|
64
|
-
[(i) => i.openapi, 'openapi'],
|
|
65
|
-
];
|
|
66
|
-
/** Determine which survey mode was requested, falling back to 'list'. */
|
|
67
|
-
const deriveSurveyMode = (input) => modeChecks.find(([predicate]) => predicate(input))?.[1] ?? 'list';
|
|
68
|
-
/** Handlers keyed by survey mode. */
|
|
69
|
-
const surveyHandlers = {
|
|
70
|
-
brief: (app, _input, rootDir) => Result.ok(buildCurrentTopoBrief(app, { rootDir })),
|
|
71
|
-
detail: (app, input, rootDir) => buildSurveyDetail(app, input.trailId ?? '', rootDir),
|
|
72
|
-
diff: (app, input, rootDir) => buildSurveyDiff(app, rootDir, input.breakingOnly),
|
|
73
|
-
generate: (app, _input, rootDir) => buildSurveyGenerate(app, rootDir),
|
|
74
|
-
list: (app, _input, rootDir) => Result.ok(buildCurrentTopoList(app, { rootDir })),
|
|
75
|
-
openapi: (app) => Result.ok(deriveOpenApiSpec(app)),
|
|
76
|
-
};
|
|
77
|
-
/** Dispatch to the appropriate survey sub-command based on input flags. */
|
|
78
|
-
const dispatchSurvey = (app, input, rootDir) => {
|
|
79
|
-
const mode = deriveSurveyMode(input);
|
|
80
|
-
const handler = surveyHandlers[mode];
|
|
81
|
-
return handler(app, input, rootDir);
|
|
82
|
-
};
|
|
83
|
-
// ---------------------------------------------------------------------------
|
|
84
|
-
// Trail definition
|
|
85
|
-
// ---------------------------------------------------------------------------
|
|
86
|
-
export const surveyTrail = trail('survey', {
|
|
87
|
-
blaze: async (input, ctx) => {
|
|
88
|
-
const rootDir = ctx.cwd ?? '.';
|
|
89
|
-
const mode = deriveSurveyMode(input);
|
|
90
|
-
// Fresh load only for diffSaved: comparing against a previously-saved
|
|
91
|
-
// surface map requires the current app's source state, not any cached
|
|
92
|
-
// module graph that a prior import may have frozen. Other modes read
|
|
93
|
-
// the in-memory topo and benefit from the standard import cache.
|
|
94
|
-
//
|
|
95
|
-
// For diff specifically, use a disposable lease rather than retained
|
|
96
|
-
// fresh mirrors — the returned diff result is serialisable data, not
|
|
97
|
-
// a Topo reference with deferred imports, so the mirror can be
|
|
98
|
-
// released the moment dispatchSurvey returns. That keeps MCP/dev
|
|
99
|
-
// sessions that poll diff repeatedly from growing .trails-tmp/
|
|
100
|
-
// without bound.
|
|
101
|
-
if (mode === 'diff') {
|
|
102
|
-
const lease = await loadFreshAppLease(input.module, rootDir);
|
|
103
|
-
try {
|
|
104
|
-
return await dispatchSurvey(lease.app, input, rootDir);
|
|
105
|
-
}
|
|
106
|
-
finally {
|
|
107
|
-
lease.release();
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
const app = await loadApp(input.module, rootDir);
|
|
111
|
-
return dispatchSurvey(app, input, rootDir);
|
|
112
|
-
},
|
|
113
|
-
description: 'Full topo introspection',
|
|
114
|
-
examples: [
|
|
115
|
-
{
|
|
116
|
-
description: 'Lists all registered trails with safety and surface info',
|
|
117
|
-
input: { module: './src/app.ts' },
|
|
118
|
-
name: 'List all trails',
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
description: 'Quick capability summary with counts and feature flags',
|
|
122
|
-
input: { brief: true, module: './src/app.ts' },
|
|
123
|
-
name: 'Brief capability report',
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
description: 'Generate an OpenAPI 3.1 specification for the topo',
|
|
127
|
-
input: { module: './src/app.ts', openapi: true },
|
|
128
|
-
name: 'OpenAPI spec',
|
|
129
|
-
},
|
|
130
|
-
],
|
|
131
|
-
input: z.object({
|
|
132
|
-
breakingOnly: z
|
|
133
|
-
.boolean()
|
|
134
|
-
.default(false)
|
|
135
|
-
.describe('Only show breaking changes'),
|
|
136
|
-
brief: z.boolean().default(false).describe('Quick capability summary'),
|
|
137
|
-
diffSaved: z
|
|
138
|
-
.boolean()
|
|
139
|
-
.default(false)
|
|
140
|
-
.describe('Diff against the saved local surface map'),
|
|
141
|
-
generate: z
|
|
142
|
-
.boolean()
|
|
143
|
-
.default(false)
|
|
144
|
-
.describe('Generate surface map and lock file'),
|
|
145
|
-
module: z.string().optional().describe('Path to the app module'),
|
|
146
|
-
openapi: z.boolean().default(false).describe('Output OpenAPI 3.1 spec'),
|
|
147
|
-
trailId: z.string().optional().describe('Trail ID for detail view'),
|
|
148
|
-
}),
|
|
149
|
-
intent: 'read',
|
|
150
|
-
output: z.union([
|
|
151
|
-
z.object({
|
|
152
|
-
count: z.number(),
|
|
153
|
-
entries: z.array(z.object({
|
|
154
|
-
examples: z.number(),
|
|
155
|
-
id: z.string(),
|
|
156
|
-
kind: z.string(),
|
|
157
|
-
safety: z.string(),
|
|
158
|
-
})),
|
|
159
|
-
resourceCount: z.number(),
|
|
160
|
-
resources: z.array(z.object({
|
|
161
|
-
description: z.string().nullable(),
|
|
162
|
-
health: z.enum(['available', 'none']),
|
|
163
|
-
id: z.string(),
|
|
164
|
-
kind: z.literal('resource'),
|
|
165
|
-
lifetime: z.literal('singleton'),
|
|
166
|
-
usedBy: z.array(z.string()),
|
|
167
|
-
})),
|
|
168
|
-
}),
|
|
169
|
-
z.object({
|
|
170
|
-
contractVersion: z.string(),
|
|
171
|
-
features: z.object({
|
|
172
|
-
detours: z.boolean(),
|
|
173
|
-
examples: z.boolean(),
|
|
174
|
-
outputSchemas: z.boolean(),
|
|
175
|
-
resources: z.boolean(),
|
|
176
|
-
signals: z.boolean(),
|
|
177
|
-
}),
|
|
178
|
-
name: z.string(),
|
|
179
|
-
resources: z.number(),
|
|
180
|
-
signals: z.number(),
|
|
181
|
-
trails: z.number(),
|
|
182
|
-
version: z.string(),
|
|
183
|
-
}),
|
|
184
|
-
z.object({
|
|
185
|
-
breaking: z.array(z.unknown()),
|
|
186
|
-
hasBreaking: z.boolean(),
|
|
187
|
-
info: z.array(z.unknown()),
|
|
188
|
-
warnings: z.array(z.unknown()),
|
|
189
|
-
}),
|
|
190
|
-
z.object({
|
|
191
|
-
crosses: z.array(z.string()),
|
|
192
|
-
description: z.unknown().nullable(),
|
|
193
|
-
detours: z.unknown().nullable(),
|
|
194
|
-
examples: z.array(z.unknown()),
|
|
195
|
-
id: z.string(),
|
|
196
|
-
intent: z.enum(['read', 'write', 'destroy']),
|
|
197
|
-
kind: z.string(),
|
|
198
|
-
resources: z.array(z.string()),
|
|
199
|
-
safety: z.string(),
|
|
200
|
-
}),
|
|
201
|
-
z.object({
|
|
202
|
-
description: z.string().nullable(),
|
|
203
|
-
health: z.enum(['available', 'none']),
|
|
204
|
-
id: z.string(),
|
|
205
|
-
kind: z.literal('resource'),
|
|
206
|
-
lifetime: z.literal('singleton'),
|
|
207
|
-
usedBy: z.array(z.string()),
|
|
208
|
-
}),
|
|
209
|
-
z.object({
|
|
210
|
-
hash: z.string(),
|
|
211
|
-
lockPath: z.string(),
|
|
212
|
-
mapPath: z.string(),
|
|
213
|
-
}),
|
|
214
|
-
z.object({
|
|
215
|
-
components: z.object({
|
|
216
|
-
schemas: z.record(z.string(), z.unknown()),
|
|
217
|
-
}),
|
|
218
|
-
info: z.object({
|
|
219
|
-
description: z.string().optional(),
|
|
220
|
-
title: z.string(),
|
|
221
|
-
version: z.string(),
|
|
222
|
-
}),
|
|
223
|
-
openapi: z.literal('3.1.0'),
|
|
224
|
-
paths: z.record(z.string(), z.record(z.string(), z.unknown())),
|
|
225
|
-
servers: z
|
|
226
|
-
.array(z.object({
|
|
227
|
-
description: z.string().optional(),
|
|
228
|
-
url: z.string(),
|
|
229
|
-
}))
|
|
230
|
-
.optional(),
|
|
231
|
-
}),
|
|
232
|
-
]),
|
|
233
|
-
});
|
|
234
|
-
//# sourceMappingURL=survey.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"survey.js","sourceRoot":"","sources":["../../../src/trails/survey.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE9D,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,GACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,mBAAmB,CAAC;AAO3B,8EAA8E;AAC9E,gCAAgC;AAChC,8EAA8E;AAE9E,MAAM,UAAU,GAAG,CAAC,IAAgB,EAAU,EAAE,CAAC,CAAC;IAChD,QAAQ,EAAE,IAAI,CAAC,QAAQ;IACvB,WAAW,EAAE,IAAI,CAAC,WAAW;IAC7B,IAAI,EAAE,IAAI,CAAC,IAAI;IACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;CACxB,CAAC,CAAC;AAEH,MAAM,eAAe,GAAG,KAAK,EAC3B,GAAS,EACT,OAAe,EACf,YAAqB,EACW,EAAE;IAClC,MAAM,UAAU,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACzC,MAAM,WAAW,GAAG,MAAM,cAAc,CAAC,EAAE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C;YACF,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;YAC3B,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;YAC9D,OAAO,EAAE,CAAC;iBACP,KAAK,CACJ,CAAC,CAAC,MAAM,CAAC;gBACP,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;gBAClC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;aAChB,CAAC,CACH;iBACA,QAAQ,EAAE;SACd,CAAC;KACH,CAAC;CACH,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"topo-constants.d.ts","sourceRoot":"","sources":["../../../src/trails/topo-constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,YAAY,CAAC;AACjD,eAAO,MAAM,cAAc,UAAU,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"topo-constants.js","sourceRoot":"","sources":["../../../src/trails/topo-constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,uBAAuB,GAAG,SAAS,CAAC;AACjD,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export declare const topoExportTrail: import("@ontrails/core").Trail<{
|
|
2
|
-
module?: string | undefined;
|
|
3
|
-
rootDir?: string | undefined;
|
|
4
|
-
}, {
|
|
5
|
-
hash: string;
|
|
6
|
-
lockPath: string;
|
|
7
|
-
mapPath: string;
|
|
8
|
-
snapshot: {
|
|
9
|
-
createdAt: string;
|
|
10
|
-
gitDirty: boolean;
|
|
11
|
-
id: string;
|
|
12
|
-
resourceCount: number;
|
|
13
|
-
signalCount: number;
|
|
14
|
-
trailCount: number;
|
|
15
|
-
gitSha?: string | undefined;
|
|
16
|
-
pinnedAs?: string | undefined;
|
|
17
|
-
};
|
|
18
|
-
}, never>;
|
|
19
|
-
//# sourceMappingURL=topo-export.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"topo-export.d.ts","sourceRoot":"","sources":["../../../src/trails/topo-export.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;SAwB1B,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { trail } from '@ontrails/core';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import { loadApp } from './load-app.js';
|
|
4
|
-
import { exportCurrentTopo } from './topo-store-support.js';
|
|
5
|
-
import { createIsolatedExampleInput, topoSnapshotOutput, } from './topo-support.js';
|
|
6
|
-
export const topoExportTrail = trail('topo.export', {
|
|
7
|
-
blaze: async (input, ctx) => {
|
|
8
|
-
const rootDir = input.rootDir ?? ctx.cwd ?? process.cwd();
|
|
9
|
-
const app = await loadApp(input.module, rootDir);
|
|
10
|
-
return exportCurrentTopo(app, { rootDir });
|
|
11
|
-
},
|
|
12
|
-
description: 'Export the current topo to .trails artifacts',
|
|
13
|
-
examples: [
|
|
14
|
-
{
|
|
15
|
-
input: createIsolatedExampleInput('topo-export'),
|
|
16
|
-
name: 'Write the current topo export',
|
|
17
|
-
},
|
|
18
|
-
],
|
|
19
|
-
input: z.object({
|
|
20
|
-
module: z.string().optional().describe('Path to the app module'),
|
|
21
|
-
rootDir: z.string().optional().describe('Workspace root directory'),
|
|
22
|
-
}),
|
|
23
|
-
intent: 'write',
|
|
24
|
-
output: z.object({
|
|
25
|
-
hash: z.string(),
|
|
26
|
-
lockPath: z.string(),
|
|
27
|
-
mapPath: z.string(),
|
|
28
|
-
snapshot: topoSnapshotOutput,
|
|
29
|
-
}),
|
|
30
|
-
});
|
|
31
|
-
//# sourceMappingURL=topo-export.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{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CAAC,MAAM,EAAE;QACpB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;QACnB,QAAQ,EAAE,kBAAkB;KAC7B,CAAC;CACH,CAAC,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export declare const topoHistoryTrail: import("@ontrails/core").Trail<{
|
|
2
|
-
limit: number;
|
|
3
|
-
rootDir?: string | undefined;
|
|
4
|
-
}, {
|
|
5
|
-
dbPath: string;
|
|
6
|
-
limit: number;
|
|
7
|
-
pinnedCount: number;
|
|
8
|
-
snapshotCount: number;
|
|
9
|
-
snapshots: {
|
|
10
|
-
createdAt: string;
|
|
11
|
-
gitDirty: boolean;
|
|
12
|
-
id: string;
|
|
13
|
-
resourceCount: number;
|
|
14
|
-
signalCount: number;
|
|
15
|
-
trailCount: number;
|
|
16
|
-
gitSha?: string | undefined;
|
|
17
|
-
pinnedAs?: string | undefined;
|
|
18
|
-
}[];
|
|
19
|
-
}, never>;
|
|
20
|
-
//# sourceMappingURL=topo-history.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"topo-history.d.ts","sourceRoot":"","sources":["../../../src/trails/topo-history.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;SA2B3B,CAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Result, trail } from '@ontrails/core';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import { DEFAULT_TOPO_HISTORY_LIMIT, createIsolatedExampleInput, listTopoHistory, topoSnapshotOutput, } from './topo-support.js';
|
|
4
|
-
export const topoHistoryTrail = trail('topo.history', {
|
|
5
|
-
blaze: (input, ctx) => {
|
|
6
|
-
const rootDir = input.rootDir ?? ctx.cwd ?? process.cwd();
|
|
7
|
-
return Result.ok(listTopoHistory({ limit: input.limit, rootDir }));
|
|
8
|
-
},
|
|
9
|
-
description: 'List saved topo snapshots, including pinned references',
|
|
10
|
-
examples: [
|
|
11
|
-
{
|
|
12
|
-
input: createIsolatedExampleInput('topo-history'),
|
|
13
|
-
name: 'Show topo history',
|
|
14
|
-
},
|
|
15
|
-
],
|
|
16
|
-
input: z.object({
|
|
17
|
-
limit: z
|
|
18
|
-
.number()
|
|
19
|
-
.default(DEFAULT_TOPO_HISTORY_LIMIT)
|
|
20
|
-
.describe('Maximum number of snapshots to return'),
|
|
21
|
-
rootDir: z.string().optional().describe('Workspace root directory'),
|
|
22
|
-
}),
|
|
23
|
-
intent: 'read',
|
|
24
|
-
output: z.object({
|
|
25
|
-
dbPath: z.string(),
|
|
26
|
-
limit: z.number(),
|
|
27
|
-
pinnedCount: z.number(),
|
|
28
|
-
snapshotCount: z.number(),
|
|
29
|
-
snapshots: z.array(topoSnapshotOutput),
|
|
30
|
-
}),
|
|
31
|
-
});
|
|
32
|
-
//# sourceMappingURL=topo-history.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"topo-history.js","sourceRoot":"","sources":["../../../src/trails/topo-history.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,0BAA0B,EAC1B,0BAA0B,EAC1B,eAAe,EACf,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAE3B,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAC,cAAc,EAAE;IACpD,KAAK,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;QACpB,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,IAAI,GAAG,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QAC1D,OAAO,MAAM,CAAC,EAAE,CAAC,eAAe,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;IACrE,CAAC;IACD,WAAW,EAAE,wDAAwD;IACrE,QAAQ,EAAE;QACR;YACE,KAAK,EAAE,0BAA0B,CAAC,cAAc,CAAC;YACjD,IAAI,EAAE,mBAAmB;SAC1B;KACF;IACD,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,OAAO,CAAC,0BAA0B,CAAC;aACnC,QAAQ,CAAC,uCAAuC,CAAC;QACpD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0BAA0B,CAAC;KACpE,CAAC;IACF,MAAM,EAAE,MAAM;IACd,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;QAClB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;QACjB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;QACvB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;QACzB,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC;KACvC,CAAC;CACH,CAAC,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export declare const topoPinTrail: import("@ontrails/core").Trail<{
|
|
2
|
-
name: string;
|
|
3
|
-
module?: string | undefined;
|
|
4
|
-
rootDir?: string | undefined;
|
|
5
|
-
}, {
|
|
6
|
-
snapshot: {
|
|
7
|
-
createdAt: string;
|
|
8
|
-
gitDirty: boolean;
|
|
9
|
-
id: string;
|
|
10
|
-
resourceCount: number;
|
|
11
|
-
signalCount: number;
|
|
12
|
-
trailCount: number;
|
|
13
|
-
gitSha?: string | undefined;
|
|
14
|
-
pinnedAs?: string | undefined;
|
|
15
|
-
};
|
|
16
|
-
}, never>;
|
|
17
|
-
//# sourceMappingURL=topo-pin.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"topo-pin.d.ts","sourceRoot":"","sources":["../../../src/trails/topo-pin.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;SA2BvB,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { Result, trail } from '@ontrails/core';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import { loadApp } from './load-app.js';
|
|
4
|
-
import { createIsolatedExampleInput, pinCurrentTopoSnapshot, topoSnapshotOutput, } from './topo-support.js';
|
|
5
|
-
export const topoPinTrail = trail('topo.pin', {
|
|
6
|
-
blaze: async (input, ctx) => {
|
|
7
|
-
const rootDir = input.rootDir ?? ctx.cwd ?? process.cwd();
|
|
8
|
-
const app = await loadApp(input.module, rootDir);
|
|
9
|
-
return Result.ok(pinCurrentTopoSnapshot(app, { name: input.name, rootDir }));
|
|
10
|
-
},
|
|
11
|
-
description: 'Pin the current topo under a durable name',
|
|
12
|
-
examples: [
|
|
13
|
-
{
|
|
14
|
-
input: {
|
|
15
|
-
...createIsolatedExampleInput('topo-pin'),
|
|
16
|
-
name: 'before-auth-refactor',
|
|
17
|
-
},
|
|
18
|
-
name: 'Pin the current topo',
|
|
19
|
-
},
|
|
20
|
-
],
|
|
21
|
-
input: z.object({
|
|
22
|
-
module: z.string().optional().describe('Path to the app module'),
|
|
23
|
-
name: z.string().describe('Pin name'),
|
|
24
|
-
rootDir: z.string().optional().describe('Workspace root directory'),
|
|
25
|
-
}),
|
|
26
|
-
intent: 'write',
|
|
27
|
-
output: z.object({
|
|
28
|
-
snapshot: topoSnapshotOutput,
|
|
29
|
-
}),
|
|
30
|
-
});
|
|
31
|
-
//# sourceMappingURL=topo-pin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"topo-pin.js","sourceRoot":"","sources":["../../../src/trails/topo-pin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,OAAO,EAAE,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only topo store consumer helpers.
|
|
3
|
-
*
|
|
4
|
-
* Extracted from topo-support.ts to isolate read-only store consumer helpers,
|
|
5
|
-
* keeping module boundaries clean.
|
|
6
|
-
*/
|
|
7
|
-
import { Result } from '@ontrails/core';
|
|
8
|
-
import type { Topo } from '@ontrails/core';
|
|
9
|
-
import type { BriefReport, SurveyListReport } from './topo-reports.js';
|
|
10
|
-
import type { TopoSummaryReport, TopoVerifyReport } from './topo-support.js';
|
|
11
|
-
interface CurrentTrailDetail {
|
|
12
|
-
readonly crosses: string[];
|
|
13
|
-
readonly description: string | null;
|
|
14
|
-
readonly detours: readonly {
|
|
15
|
-
readonly on: string;
|
|
16
|
-
readonly maxAttempts: number;
|
|
17
|
-
}[] | null;
|
|
18
|
-
readonly examples: unknown[];
|
|
19
|
-
readonly id: string;
|
|
20
|
-
readonly intent: 'destroy' | 'read' | 'write';
|
|
21
|
-
readonly kind: string;
|
|
22
|
-
readonly pattern: string | null;
|
|
23
|
-
readonly resources: string[];
|
|
24
|
-
readonly safety: string;
|
|
25
|
-
}
|
|
26
|
-
interface CurrentResourceDetail {
|
|
27
|
-
readonly description: string | null;
|
|
28
|
-
readonly health: 'available' | 'none';
|
|
29
|
-
readonly id: string;
|
|
30
|
-
readonly kind: 'resource';
|
|
31
|
-
readonly lifetime: 'singleton';
|
|
32
|
-
readonly usedBy: string[];
|
|
33
|
-
}
|
|
34
|
-
export declare const buildTopoSummary: (app: Topo, options?: {
|
|
35
|
-
readonly rootDir?: string;
|
|
36
|
-
}) => TopoSummaryReport;
|
|
37
|
-
export declare const buildCurrentTopoBrief: (app: Topo, options?: {
|
|
38
|
-
readonly rootDir?: string;
|
|
39
|
-
}) => BriefReport;
|
|
40
|
-
export declare const buildCurrentTopoList: (app: Topo, options?: {
|
|
41
|
-
readonly rootDir?: string;
|
|
42
|
-
}) => SurveyListReport;
|
|
43
|
-
export declare const buildCurrentGuideEntries: (app: Topo, options?: {
|
|
44
|
-
readonly rootDir?: string;
|
|
45
|
-
}) => readonly {
|
|
46
|
-
readonly description: string;
|
|
47
|
-
readonly exampleCount: number;
|
|
48
|
-
readonly id: string;
|
|
49
|
-
readonly kind: string;
|
|
50
|
-
}[];
|
|
51
|
-
export declare const buildCurrentTopoDetail: (app: Topo, id: string, options?: {
|
|
52
|
-
readonly rootDir?: string;
|
|
53
|
-
}) => CurrentResourceDetail | CurrentTrailDetail | undefined;
|
|
54
|
-
export declare const verifyCurrentTopo: (app: Topo, options?: {
|
|
55
|
-
readonly rootDir?: string;
|
|
56
|
-
}) => Promise<Result<TopoVerifyReport, Error>>;
|
|
57
|
-
export {};
|
|
58
|
-
//# sourceMappingURL=topo-read-support.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"topo-read-support.d.ts","sourceRoot":"","sources":["../../../src/trails/topo-read-support.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAML,MAAM,EACP,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,IAAI,EAAgB,MAAM,gBAAgB,CAAC;AAOzD,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAoB7E,UAAU,kBAAkB;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,OAAO,EACZ,SAAS;QAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;KAAE,EAAE,GAChE,IAAI,CAAC;IACT,QAAQ,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAC;IAC7B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,GA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