@crvouga/atlas 0.5.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +51 -16
- package/dist/core/src/cli.d.ts +1 -1
- package/dist/core/src/cli.js +8 -3
- package/dist/core/src/config.d.ts +7 -0
- package/dist/core/src/config.js +48 -14
- package/dist/core/src/run/execute.d.ts +6 -0
- package/dist/core/src/run/execute.js +4 -2
- package/dist/reports/src/doctor.d.ts +1 -1
- package/dist/reports/src/doctor.js +3 -1
- package/dist/reports/src/http-store.d.ts +4 -0
- package/dist/reports/src/http-store.js +6 -3
- package/dist/reports/src/init.js +24 -16
- package/dist/reports/src/live-reporter.d.ts +34 -0
- package/dist/reports/src/live-reporter.js +122 -0
- package/dist/reports/src/package-managers.d.ts +35 -0
- package/dist/reports/src/package-managers.js +23 -0
- package/dist/reports/src/report-cli.d.ts +1 -1
- package/dist/reports/src/report-cli.js +3 -2
- package/dist/reports/src/store-url.js +1 -1
- package/dist/runners/src/codecept.d.ts +14 -0
- package/dist/runners/src/codecept.js +16 -0
- package/dist/runners/src/jest.d.ts +50 -0
- package/dist/runners/src/jest.js +52 -0
- package/dist/runners/src/mocha.d.ts +40 -0
- package/dist/runners/src/mocha.js +39 -0
- package/dist/runners/src/node-test.d.ts +28 -0
- package/dist/runners/src/node-test.js +44 -0
- package/dist/runners/src/publish.d.ts +30 -0
- package/dist/runners/src/publish.js +68 -0
- package/dist/schema/src/api.d.ts +1 -0
- package/dist/schema/src/api.js +1 -1
- package/dist/schema/src/cli-results.d.ts +233 -2
- package/dist/schema/src/cli-results.js +14 -0
- package/dist/schema/src/index.d.ts +2 -0
- package/dist/schema/src/index.js +2 -0
- package/dist/schema/src/live-run.d.ts +123 -0
- package/dist/schema/src/live-run.js +30 -0
- package/dist/schema/src/manifest.d.ts +2 -2
- package/dist/schema/src/project.d.ts +20 -0
- package/dist/schema/src/project.js +10 -0
- package/dist/schema/src/report-sources.d.ts +1 -0
- package/dist/schema/src/report-sources.js +2 -1
- package/dist/schema/src/runs-index.d.ts +1 -1
- package/dist/schema/src/server-config.d.ts +84 -0
- package/dist/schema/src/server-config.js +12 -0
- package/dist/server/src/app.d.ts +10 -0
- package/dist/server/src/app.js +148 -10
- package/dist/server/src/config.d.ts +1 -1
- package/dist/server/src/config.js +20 -3
- package/dist/server/src/dev.d.ts +3 -3
- package/dist/server/src/dev.js +22 -13
- package/dist/server/src/events.d.ts +3 -3
- package/dist/server/src/events.js +1 -1
- package/dist/server/src/index.d.ts +2 -0
- package/dist/server/src/index.js +2 -0
- package/dist/server/src/live-runs.d.ts +52 -0
- package/dist/server/src/live-runs.js +229 -0
- package/dist/server/src/llms.js +17 -8
- package/dist/server/src/main.d.ts +1 -1
- package/dist/server/src/main.js +7 -5
- package/dist/server/src/openapi.d.ts +2 -5
- package/dist/server/src/openapi.js +71 -7
- package/dist/server/src/projects.d.ts +3 -0
- package/dist/server/src/projects.js +154 -0
- package/dist/server/src/settings-page.d.ts +9 -0
- package/dist/server/src/settings-page.js +93 -0
- package/dist/server/src/settings.d.ts +23 -0
- package/dist/server/src/settings.js +72 -0
- package/dist/server/src/site.d.ts +8 -6
- package/dist/server/src/site.js +45 -10
- package/dist/server/src/store-api.js +43 -22
- package/docs/agents.md +166 -15
- package/docs/deploying.md +24 -20
- package/docs/dogfooding.md +7 -3
- package/docs/extending.md +3 -3
- package/docs/integrating.md +19 -11
- package/docs/quickstart.md +81 -0
- package/docs/reference/cli.md +9 -7
- package/docs/reference/core.md +6 -0
- package/docs/reference/http-api.md +498 -2
- package/docs/reference/reports.md +84 -1
- package/docs/reference/runners.md +169 -0
- package/docs/reference/schema.md +120 -0
- package/docs/reference/server.md +154 -14
- package/docs/report-backends.md +8 -8
- package/docs/report-contract.md +7 -7
- package/docs/reporting-issues.md +3 -3
- package/docs/runners.md +69 -0
- package/docs/server.md +155 -25
- package/docs/statecharts.md +22 -20
- package/llms-full.txt +1079 -126
- package/llms.txt +7 -4
- package/package.json +33 -9
- package/packages/core/README.md +3 -1
- package/packages/runners/README.md +6 -0
- package/packages/runners/compat/codecept.cjs +2 -0
- package/packages/runners/compat/jest.cjs +2 -0
- package/packages/runners/compat/mocha.cjs +2 -0
- package/packages/schema/schemas/atlas-change.schema.json +4 -0
- package/packages/schema/schemas/hello-event.schema.json +4 -0
- package/packages/schema/schemas/live-run-start.schema.json +42 -0
- package/packages/schema/schemas/live-run-update.schema.json +93 -0
- package/packages/schema/schemas/live-run.schema.json +225 -0
- package/packages/schema/schemas/project-slug.schema.json +8 -0
- package/packages/schema/schemas/project.schema.json +22 -0
- package/packages/schema/schemas/projects.schema.json +33 -0
- package/packages/schema/schemas/server-config.schema.json +14 -0
- package/packages/schema/schemas/server-editable-settings.schema.json +132 -0
- package/packages/schema/schemas/server-settings-snapshot.schema.json +285 -0
- package/packages/server/openapi.json +5101 -779
- package/packages/visualizer/README.md +13 -13
- package/packages/visualizer/bin/atlas-client.mjs +176 -0
- package/packages/visualizer/bin/atlas-visualizer.mjs +2 -175
- package/packages/visualizer/src/app/AppShell.tsx +26 -17
- package/packages/visualizer/src/app/report-sources.tsx +2 -1
- package/packages/visualizer/src/components/ActivityIndicator.module.css +4 -0
- package/packages/visualizer/src/components/ActivityIndicator.tsx +6 -0
- package/packages/visualizer/src/components/Header.module.css +101 -227
- package/packages/visualizer/src/components/Header.tsx +79 -41
- package/packages/visualizer/src/components/ProjectPicker.tsx +64 -0
- package/packages/visualizer/src/data/adapters/report-backend.test.ts +3 -2
- package/packages/visualizer/src/data/adapters/report-backend.ts +1 -1
- package/packages/visualizer/src/data/queries.ts +14 -7
- package/packages/visualizer/src/evidence/api.ts +2 -1
- package/packages/visualizer/src/evidence/check-detail.tsx +19 -4
- package/packages/visualizer/src/evidence/document-page.tsx +6 -2
- package/packages/visualizer/src/evidence/evidence-context.tsx +17 -12
- package/packages/visualizer/src/evidence/evidence.module.css +11 -1
- package/packages/visualizer/src/evidence/feature-page.tsx +7 -3
- package/packages/visualizer/src/evidence/model-page.tsx +6 -2
- package/packages/visualizer/src/evidence/project-home.tsx +45 -0
- package/packages/visualizer/src/evidence/recording-page.tsx +4 -1
- package/packages/visualizer/src/evidence/spec-index.tsx +2 -1
- package/packages/visualizer/src/evidence/test-filter.tsx +21 -0
- package/packages/visualizer/src/live/live-query.ts +21 -0
- package/packages/visualizer/src/live/live-runs.tsx +69 -0
- package/packages/visualizer/src/live/live-stream.ts +30 -9
- package/packages/visualizer/src/live/report-progress.ts +62 -0
- package/packages/visualizer/src/live/test-progress.tsx +34 -0
- package/packages/visualizer/src/runtime.ts +17 -1
- package/packages/visualizer/src/state/ui-store.ts +3 -2
- package/packages/visualizer/src/views/ChartPage.tsx +2 -0
- package/packages/visualizer/src/views/ChartTests.tsx +43 -0
- package/packages/visualizer/src/views/SidePanel.tsx +2 -0
- package/packages/visualizer/vite/atlas-files.test.ts +4 -4
- package/packages/visualizer/vite/atlas-files.ts +1 -5
- package/packages/visualizer/vite/atlas-server-proxy.ts +2 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { testFile, runnerLive, finishRunner } from './publish.js';
|
|
2
|
+
/**
|
|
3
|
+
* Mocha reporter; use `--reporter @crvouga/atlas/mocha` or CodeceptJS `--reporter @crvouga/atlas/codecept`.
|
|
4
|
+
* Reporter options go in `reporterOptions`; environment variables are supported by every runner.
|
|
5
|
+
* A failed upload adds a runner failure through Mocha's completion callback.
|
|
6
|
+
* @example
|
|
7
|
+
* // mocha configuration
|
|
8
|
+
* export default { reporter: '@crvouga/atlas/mocha', reporterOptions: { url: 'https://atlas.example.com' } };
|
|
9
|
+
*/
|
|
10
|
+
export default class AtlasMochaReporter {
|
|
11
|
+
checks = new Map();
|
|
12
|
+
options;
|
|
13
|
+
runnerName;
|
|
14
|
+
live;
|
|
15
|
+
constructor(runner, options = {}, runnerName = 'mocha') {
|
|
16
|
+
this.options = options.reporterOptions ?? {};
|
|
17
|
+
this.runnerName = runnerName;
|
|
18
|
+
this.live = runnerLive(runnerName, this.options, runner.total);
|
|
19
|
+
const add = (test, status, error) => {
|
|
20
|
+
const file = testFile(test.file, this.options.rootDir);
|
|
21
|
+
const retry = test.currentRetry?.() ?? 0;
|
|
22
|
+
this.checks.set(test, { id: [file, test.fullTitle()].filter(Boolean).join(' > '), title: test.title, status,
|
|
23
|
+
detail: error?.stack ?? error?.message ?? (status === 'failed' ? test.err?.stack ?? test.err?.message ?? 'failed' : ''), measurements: [],
|
|
24
|
+
...(typeof test.duration === 'number' && Number.isFinite(test.duration) && test.duration >= 0 ? { durationMs: test.duration } : {}),
|
|
25
|
+
...(retry ? { labels: { retries: String(retry), ...(status === 'passed' ? { flaky: 'true' } : {}) } } : {}),
|
|
26
|
+
...(test.steps?.length ? { steps: test.steps.map(step => ({ name: step.name ?? 'step', ...(step.status ? { status: step.status } : {}) })) } : {}) });
|
|
27
|
+
const check = this.checks.get(test);
|
|
28
|
+
this.live.check({ ...check, steps: check.steps?.map(step => ({ name: step.name, status: step.status })) });
|
|
29
|
+
};
|
|
30
|
+
runner.on('test', test => add(test, 'running'));
|
|
31
|
+
runner.on('pass', test => add(test, 'passed'));
|
|
32
|
+
runner.on('fail', (test, error) => add(test, 'failed', error));
|
|
33
|
+
runner.on('pending', test => add(test, 'not-run'));
|
|
34
|
+
}
|
|
35
|
+
/** Mocha waits for this callback before exiting. Publishing errors fail the invocation. */
|
|
36
|
+
done(failures, callback) {
|
|
37
|
+
void finishRunner(this.live, this.runnerName, [...this.checks.values()], this.options).then(() => callback(failures), error => { console.error(error instanceof Error ? error.message : String(error)); callback(failures + 1); });
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
type Event = {
|
|
2
|
+
type: string;
|
|
3
|
+
data: {
|
|
4
|
+
name?: string;
|
|
5
|
+
file?: string;
|
|
6
|
+
nesting?: number;
|
|
7
|
+
type?: string;
|
|
8
|
+
skip?: boolean | string;
|
|
9
|
+
todo?: boolean | string;
|
|
10
|
+
details?: {
|
|
11
|
+
type?: string;
|
|
12
|
+
duration_ms?: number;
|
|
13
|
+
error?: {
|
|
14
|
+
stack?: string;
|
|
15
|
+
message?: string;
|
|
16
|
+
failureType?: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Async generator reporter. Use alongside Node's spec reporter to keep normal output.
|
|
23
|
+
* Upload errors reject the stream; skips and TODOs never count as passed. Successful suite containers are excluded; hook failures are retained.
|
|
24
|
+
* @example
|
|
25
|
+
* // node --test --test-reporter=spec --test-reporter=@crvouga/atlas/node-test
|
|
26
|
+
*/
|
|
27
|
+
export default function atlasNodeReporter(source: AsyncIterable<Event>): AsyncGenerator<string>;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { testFile, runnerLive, finishRunner } from './publish.js';
|
|
2
|
+
/**
|
|
3
|
+
* Async generator reporter. Use alongside Node's spec reporter to keep normal output.
|
|
4
|
+
* Upload errors reject the stream; skips and TODOs never count as passed. Successful suite containers are excluded; hook failures are retained.
|
|
5
|
+
* @example
|
|
6
|
+
* // node --test --test-reporter=spec --test-reporter=@crvouga/atlas/node-test
|
|
7
|
+
*/
|
|
8
|
+
export default async function* atlasNodeReporter(source) {
|
|
9
|
+
const checks = [];
|
|
10
|
+
const live = runnerLive('node-test');
|
|
11
|
+
const kinds = new Map();
|
|
12
|
+
try {
|
|
13
|
+
const parents = [];
|
|
14
|
+
for await (const { type, data } of source) {
|
|
15
|
+
const nesting = data.nesting ?? 0;
|
|
16
|
+
const identity = `${data.file ?? ''}|${nesting}|${data.name ?? ''}`;
|
|
17
|
+
if (type === 'test:enqueue' && data.type)
|
|
18
|
+
kinds.set(identity, data.type);
|
|
19
|
+
if (type === 'test:start') {
|
|
20
|
+
parents[nesting] = data.name ?? '';
|
|
21
|
+
parents.length = nesting + 1;
|
|
22
|
+
if (kinds.get(identity) === 'test')
|
|
23
|
+
live.check({ id: [testFile(data.file), ...parents.slice(0, nesting), data.name].filter(Boolean).join(' > '), title: data.name ?? 'test', status: 'running' });
|
|
24
|
+
}
|
|
25
|
+
if (type !== 'test:pass' && type !== 'test:fail')
|
|
26
|
+
continue;
|
|
27
|
+
if (data.details?.type === 'suite' && (type === 'test:pass' || data.details.error?.failureType === 'subtestsFailed'))
|
|
28
|
+
continue;
|
|
29
|
+
const file = testFile(data.file);
|
|
30
|
+
const status = data.skip || data.todo ? 'not-run' : type === 'test:pass' ? 'passed' : 'failed';
|
|
31
|
+
checks.push({ id: [file, ...parents.slice(0, nesting), data.name].filter(Boolean).join(' > '), title: data.name ?? 'test', status,
|
|
32
|
+
detail: data.details?.error?.stack ?? data.details?.error?.message ?? '', measurements: [],
|
|
33
|
+
...(typeof data.details?.duration_ms === 'number' && Number.isFinite(data.details.duration_ms) && data.details.duration_ms >= 0 ? { durationMs: data.details.duration_ms } : {}) });
|
|
34
|
+
live.check(checks.at(-1));
|
|
35
|
+
}
|
|
36
|
+
checks.forEach(check => live.check(check));
|
|
37
|
+
await finishRunner(live, 'node-test', checks);
|
|
38
|
+
yield `Atlas: uploaded ${checks.length} checks\n`;
|
|
39
|
+
}
|
|
40
|
+
catch (error) {
|
|
41
|
+
await live.finish('interrupted', 'The test event stream ended unexpectedly.').catch(() => { });
|
|
42
|
+
throw error;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { EvidenceCheck } from '../../reports/src/explorer-types.js';
|
|
2
|
+
/** Reporter options; explicit values override ATLAS_SERVER_URL, ATLAS_PUBLISH_TOKEN, ATLAS_ENVIRONMENT, ATLAS_BRANCH and ATLAS_SHA. */
|
|
3
|
+
export type ReporterOptions = {
|
|
4
|
+
/** Project namespace; defaults to ATLAS_PROJECT. */
|
|
5
|
+
readonly project?: string;
|
|
6
|
+
readonly url?: string;
|
|
7
|
+
readonly token?: string;
|
|
8
|
+
readonly producer?: string;
|
|
9
|
+
readonly environment?: string;
|
|
10
|
+
readonly branch?: string;
|
|
11
|
+
readonly sha?: string;
|
|
12
|
+
readonly timeoutMs?: number;
|
|
13
|
+
readonly rootDir?: string;
|
|
14
|
+
/** Explicit final evidence time; normally generated when publication finishes. */
|
|
15
|
+
readonly recordedAtMs?: number;
|
|
16
|
+
};
|
|
17
|
+
/** A portable check identity: paths relative to the project, using forward slashes on every OS. */
|
|
18
|
+
export declare function testFile(file: string | undefined, root?: string): string;
|
|
19
|
+
/**
|
|
20
|
+
* Upload one completed runner invocation. Unknown outcomes stay not-run, repeated identities are numbered.
|
|
21
|
+
* Throws on missing configuration, timeouts or refused uploads so CI cannot silently lose its evidence.
|
|
22
|
+
* No storage credentials or backend URL are needed by the runner.
|
|
23
|
+
* @example
|
|
24
|
+
* await uploadChecks('mocha', checks, { url: 'https://atlas.example.com', token: process.env.ATLAS_PUBLISH_TOKEN });
|
|
25
|
+
*/
|
|
26
|
+
export declare function uploadChecks(runner: string, checks: readonly EvidenceCheck[], options?: ReporterOptions): Promise<void>;
|
|
27
|
+
/** Start the native runner's live feed with the same endpoint and identity as its final report. */
|
|
28
|
+
export declare function runnerLive(runner: string, options?: ReporterOptions, plannedChecks?: number): import('../../reports/src/live-reporter.js').LiveReporter;
|
|
29
|
+
/** Flush live progress, then publish the full final evidence even if the lease was interrupted. Reject either failure. */
|
|
30
|
+
export declare function finishRunner(live: import('../../reports/src/live-reporter.js').LiveReporter, runner: string, checks: readonly EvidenceCheck[], options?: ReporterOptions): Promise<void>;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/** @module Publishing native runner results
|
|
2
|
+
* Native reporters send checks to the project's Atlas server. Only the server knows its storage backend.
|
|
3
|
+
*/
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { createLiveReporter } from '../../reports/src/live-reporter.js';
|
|
6
|
+
import { uniqueChecks } from '../../reports/src/ingest.js';
|
|
7
|
+
/** A portable check identity: paths relative to the project, using forward slashes on every OS. */
|
|
8
|
+
export function testFile(file, root = process.cwd()) {
|
|
9
|
+
return file ? path.relative(root, path.resolve(root, file)).replaceAll('\\', '/') : '';
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Upload one completed runner invocation. Unknown outcomes stay not-run, repeated identities are numbered.
|
|
13
|
+
* Throws on missing configuration, timeouts or refused uploads so CI cannot silently lose its evidence.
|
|
14
|
+
* No storage credentials or backend URL are needed by the runner.
|
|
15
|
+
* @example
|
|
16
|
+
* await uploadChecks('mocha', checks, { url: 'https://atlas.example.com', token: process.env.ATLAS_PUBLISH_TOKEN });
|
|
17
|
+
*/
|
|
18
|
+
export async function uploadChecks(runner, checks, options = {}) {
|
|
19
|
+
const url = options.url ?? process.env.ATLAS_SERVER_URL;
|
|
20
|
+
if (!url)
|
|
21
|
+
throw new Error('Atlas reporter: set ATLAS_SERVER_URL to the project Atlas server');
|
|
22
|
+
const target = new URL(url);
|
|
23
|
+
if (!['http:', 'https:'].includes(target.protocol) || target.username || target.password || target.search || target.hash)
|
|
24
|
+
throw new Error('Atlas reporter: use an HTTP(S) server URL without credentials, query or fragment');
|
|
25
|
+
target.pathname = `${target.pathname.replace(/\/$/, '')}/api/checks`;
|
|
26
|
+
const token = options.token ?? process.env.ATLAS_PUBLISH_TOKEN ?? process.env.ATLAS_TOKEN;
|
|
27
|
+
const response = await fetch(target, {
|
|
28
|
+
method: 'POST', redirect: 'error', signal: AbortSignal.timeout(options.timeoutMs ?? 30_000),
|
|
29
|
+
headers: { 'content-type': 'application/json', ...((options.project ?? process.env.ATLAS_PROJECT) ? { 'x-atlas-project': options.project ?? process.env.ATLAS_PROJECT } : {}), ...(token ? { authorization: `Bearer ${token}` } : {}) },
|
|
30
|
+
body: JSON.stringify({ producer: options.producer ?? runner, recordedAtMs: options.recordedAtMs ?? Date.now(),
|
|
31
|
+
environment: options.environment ?? process.env.ATLAS_ENVIRONMENT,
|
|
32
|
+
branch: options.branch ?? process.env.ATLAS_BRANCH, sha: options.sha ?? process.env.ATLAS_SHA,
|
|
33
|
+
checks: uniqueChecks(checks) })
|
|
34
|
+
});
|
|
35
|
+
if (!response.ok) {
|
|
36
|
+
await response.body?.cancel();
|
|
37
|
+
throw new Error(`Atlas reporter: upload refused (HTTP ${response.status})`);
|
|
38
|
+
}
|
|
39
|
+
await response.body?.cancel();
|
|
40
|
+
}
|
|
41
|
+
/** Start the native runner's live feed with the same endpoint and identity as its final report. */
|
|
42
|
+
export function runnerLive(runner, options = {}, plannedChecks) {
|
|
43
|
+
const url = options.url ?? process.env.ATLAS_SERVER_URL;
|
|
44
|
+
if (!url)
|
|
45
|
+
throw new Error('Atlas reporter: set ATLAS_SERVER_URL to the project Atlas server');
|
|
46
|
+
return createLiveReporter({ producer: options.producer ?? runner, plannedChecks, title: `${runner} tests`, environment: options.environment ?? process.env.ATLAS_ENVIRONMENT,
|
|
47
|
+
branch: options.branch ?? process.env.ATLAS_BRANCH, sha: options.sha ?? process.env.ATLAS_SHA }, { url, project: options.project ?? process.env.ATLAS_PROJECT, token: options.token ?? process.env.ATLAS_PUBLISH_TOKEN ?? process.env.ATLAS_TOKEN, timeoutMs: options.timeoutMs });
|
|
48
|
+
}
|
|
49
|
+
/** Flush live progress, then publish the full final evidence even if the lease was interrupted. Reject either failure. */
|
|
50
|
+
export async function finishRunner(live, runner, checks, options = {}) {
|
|
51
|
+
let error;
|
|
52
|
+
const finalChecks = uniqueChecks(checks);
|
|
53
|
+
finalChecks.forEach(check => live.check(check));
|
|
54
|
+
try {
|
|
55
|
+
await live.finish();
|
|
56
|
+
}
|
|
57
|
+
catch (caught) {
|
|
58
|
+
error = caught;
|
|
59
|
+
}
|
|
60
|
+
try {
|
|
61
|
+
await uploadChecks(runner, finalChecks, { ...options, recordedAtMs: Math.max(Date.now(), (live.finishedAtMs ?? 0) + 1) });
|
|
62
|
+
}
|
|
63
|
+
catch (caught) {
|
|
64
|
+
error ??= caught;
|
|
65
|
+
}
|
|
66
|
+
if (error)
|
|
67
|
+
throw error;
|
|
68
|
+
}
|
package/dist/schema/src/api.d.ts
CHANGED
|
@@ -774,6 +774,7 @@ export declare const HelloEventSchema: z.ZodObject<{
|
|
|
774
774
|
version: z.ZodString;
|
|
775
775
|
ready: z.ZodBoolean;
|
|
776
776
|
time: z.ZodNumber;
|
|
777
|
+
heartbeatMs: z.ZodOptional<z.ZodNumber>;
|
|
777
778
|
}, z.core.$loose>;
|
|
778
779
|
/** The data of the `report` event: layers arrived. Enough to say who sent what, without asking. */
|
|
779
780
|
export declare const ReportEventSchema: z.ZodObject<{
|
package/dist/schema/src/api.js
CHANGED
|
@@ -186,7 +186,7 @@ export const ChecksResultSchema = z.looseObject({
|
|
|
186
186
|
checks: z.number().int().nonnegative()
|
|
187
187
|
});
|
|
188
188
|
/** The data of the `hello` event: sent first on `/api/events`. */
|
|
189
|
-
export const HelloEventSchema = z.looseObject({ version: z.string(), ready: z.boolean(), time: z.number() });
|
|
189
|
+
export const HelloEventSchema = z.looseObject({ version: z.string(), ready: z.boolean(), time: z.number(), heartbeatMs: z.number().positive().optional() });
|
|
190
190
|
/** The data of the `report` event: layers arrived. Enough to say who sent what, without asking. */
|
|
191
191
|
export const ReportEventSchema = z.looseObject({
|
|
192
192
|
version: z.string().describe('The report version after these layers'),
|
|
@@ -147,10 +147,10 @@ export declare const InitPlanSchema: z.ZodObject<{
|
|
|
147
147
|
project: z.ZodObject<{
|
|
148
148
|
name: z.ZodNullable<z.ZodString>;
|
|
149
149
|
packageManager: z.ZodNullable<z.ZodEnum<{
|
|
150
|
-
|
|
150
|
+
npm: "npm";
|
|
151
151
|
pnpm: "pnpm";
|
|
152
|
+
bun: "bun";
|
|
152
153
|
yarn: "yarn";
|
|
153
|
-
npm: "npm";
|
|
154
154
|
}>>;
|
|
155
155
|
languages: z.ZodArray<z.ZodString>;
|
|
156
156
|
}, z.core.$loose>;
|
|
@@ -208,3 +208,234 @@ export declare const InitPlanSchema: z.ZodObject<{
|
|
|
208
208
|
nextSteps: z.ZodArray<z.ZodString>;
|
|
209
209
|
warnings: z.ZodArray<z.ZodString>;
|
|
210
210
|
}, z.core.$loose>;
|
|
211
|
+
/**
|
|
212
|
+
* JSON command contracts, shared by schema publication, agent documentation and executable command checks.
|
|
213
|
+
* A new result needs an entry here and a runtime scenario in the documentation contract tests.
|
|
214
|
+
*/
|
|
215
|
+
export declare const CLI_RESULTS: {
|
|
216
|
+
readonly init: {
|
|
217
|
+
readonly command: "atlas init";
|
|
218
|
+
readonly schemaName: "init-plan";
|
|
219
|
+
readonly schema: z.ZodObject<{
|
|
220
|
+
ok: z.ZodBoolean;
|
|
221
|
+
directory: z.ZodString;
|
|
222
|
+
project: z.ZodObject<{
|
|
223
|
+
name: z.ZodNullable<z.ZodString>;
|
|
224
|
+
packageManager: z.ZodNullable<z.ZodEnum<{
|
|
225
|
+
npm: "npm";
|
|
226
|
+
pnpm: "pnpm";
|
|
227
|
+
bun: "bun";
|
|
228
|
+
yarn: "yarn";
|
|
229
|
+
}>>;
|
|
230
|
+
languages: z.ZodArray<z.ZodString>;
|
|
231
|
+
}, z.core.$loose>;
|
|
232
|
+
git: z.ZodObject<{
|
|
233
|
+
branch: z.ZodNullable<z.ZodString>;
|
|
234
|
+
defaultBranch: z.ZodString;
|
|
235
|
+
}, z.core.$loose>;
|
|
236
|
+
ci: z.ZodEnum<{
|
|
237
|
+
none: "none";
|
|
238
|
+
"github-actions": "github-actions";
|
|
239
|
+
"gitlab-ci": "gitlab-ci";
|
|
240
|
+
circleci: "circleci";
|
|
241
|
+
}>;
|
|
242
|
+
server: z.ZodObject<{
|
|
243
|
+
url: z.ZodNullable<z.ZodString>;
|
|
244
|
+
tokenEnv: z.ZodLiteral<"ATLAS_TOKEN">;
|
|
245
|
+
}, z.core.$loose>;
|
|
246
|
+
specs: z.ZodObject<{
|
|
247
|
+
directory: z.ZodNullable<z.ZodString>;
|
|
248
|
+
kinds: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
249
|
+
}, z.core.$loose>;
|
|
250
|
+
suites: z.ZodArray<z.ZodObject<{
|
|
251
|
+
id: z.ZodString;
|
|
252
|
+
runner: z.ZodString;
|
|
253
|
+
evidence: z.ZodString;
|
|
254
|
+
run: z.ZodString;
|
|
255
|
+
output: z.ZodString;
|
|
256
|
+
format: z.ZodEnum<{
|
|
257
|
+
junit: "junit";
|
|
258
|
+
ctrf: "ctrf";
|
|
259
|
+
manifest: "manifest";
|
|
260
|
+
}>;
|
|
261
|
+
environment: z.ZodNullable<z.ZodString>;
|
|
262
|
+
publish: z.ZodString;
|
|
263
|
+
stream: z.ZodNullable<z.ZodString>;
|
|
264
|
+
prerequisites: z.ZodArray<z.ZodString>;
|
|
265
|
+
}, z.core.$loose>>;
|
|
266
|
+
files: z.ZodArray<z.ZodObject<{
|
|
267
|
+
path: z.ZodString;
|
|
268
|
+
action: z.ZodEnum<{
|
|
269
|
+
create: "create";
|
|
270
|
+
update: "update";
|
|
271
|
+
unchanged: "unchanged";
|
|
272
|
+
}>;
|
|
273
|
+
purpose: z.ZodString;
|
|
274
|
+
content: z.ZodString;
|
|
275
|
+
}, z.core.$loose>>;
|
|
276
|
+
written: z.ZodArray<z.ZodString>;
|
|
277
|
+
verification: z.ZodNullable<z.ZodObject<{
|
|
278
|
+
reachable: z.ZodBoolean;
|
|
279
|
+
role: z.ZodNullable<z.ZodString>;
|
|
280
|
+
canPublish: z.ZodBoolean;
|
|
281
|
+
error: z.ZodNullable<z.ZodString>;
|
|
282
|
+
}, z.core.$loose>>;
|
|
283
|
+
nextSteps: z.ZodArray<z.ZodString>;
|
|
284
|
+
warnings: z.ZodArray<z.ZodString>;
|
|
285
|
+
}, z.core.$loose>;
|
|
286
|
+
};
|
|
287
|
+
readonly publish: {
|
|
288
|
+
readonly command: "atlas report publish";
|
|
289
|
+
readonly schemaName: "publish-result";
|
|
290
|
+
readonly schema: z.ZodObject<{
|
|
291
|
+
ok: z.ZodLiteral<true>;
|
|
292
|
+
store: z.ZodString;
|
|
293
|
+
layer: z.ZodObject<{
|
|
294
|
+
id: z.ZodString;
|
|
295
|
+
producer: z.ZodString;
|
|
296
|
+
environment: z.ZodNullable<z.ZodString>;
|
|
297
|
+
checks: z.ZodNumber;
|
|
298
|
+
passed: z.ZodNumber;
|
|
299
|
+
failed: z.ZodNumber;
|
|
300
|
+
notRun: z.ZodNumber;
|
|
301
|
+
linkedToSpec: z.ZodNumber;
|
|
302
|
+
freshness: z.ZodOptional<z.ZodEnum<{
|
|
303
|
+
unknown: "unknown";
|
|
304
|
+
modified: "modified";
|
|
305
|
+
}>>;
|
|
306
|
+
attachmentFiles: z.ZodNumber;
|
|
307
|
+
attachmentBytes: z.ZodNumber;
|
|
308
|
+
}, z.core.$loose>;
|
|
309
|
+
specSet: z.ZodOptional<z.ZodObject<{
|
|
310
|
+
id: z.ZodString;
|
|
311
|
+
files: z.ZodNumber;
|
|
312
|
+
branch: z.ZodNullable<z.ZodString>;
|
|
313
|
+
}, z.core.$loose>>;
|
|
314
|
+
run: z.ZodOptional<z.ZodObject<{
|
|
315
|
+
id: z.ZodString;
|
|
316
|
+
files: z.ZodNumber;
|
|
317
|
+
bytes: z.ZodNumber;
|
|
318
|
+
alreadyPublished: z.ZodBoolean;
|
|
319
|
+
}, z.core.$loose>>;
|
|
320
|
+
warnings: z.ZodArray<z.ZodString>;
|
|
321
|
+
}, z.core.$loose>;
|
|
322
|
+
};
|
|
323
|
+
readonly stream: {
|
|
324
|
+
readonly command: "atlas report stream";
|
|
325
|
+
readonly schemaName: "stream-result";
|
|
326
|
+
readonly schema: z.ZodObject<{
|
|
327
|
+
ok: z.ZodBoolean;
|
|
328
|
+
producer: z.ZodString;
|
|
329
|
+
environment: z.ZodNullable<z.ZodString>;
|
|
330
|
+
layers: z.ZodNumber;
|
|
331
|
+
checks: z.ZodNumber;
|
|
332
|
+
lost: z.ZodNumber;
|
|
333
|
+
warnings: z.ZodArray<z.ZodString>;
|
|
334
|
+
}, z.core.$loose>;
|
|
335
|
+
};
|
|
336
|
+
readonly merge: {
|
|
337
|
+
readonly command: "atlas report merge";
|
|
338
|
+
readonly schemaName: "merge-result";
|
|
339
|
+
readonly schema: z.ZodObject<{
|
|
340
|
+
ok: z.ZodLiteral<true>;
|
|
341
|
+
into: z.ZodString;
|
|
342
|
+
copied: z.ZodNumber;
|
|
343
|
+
skipped: z.ZodNumber;
|
|
344
|
+
ignored: z.ZodNumber;
|
|
345
|
+
}, z.core.$loose>;
|
|
346
|
+
};
|
|
347
|
+
readonly doctor: {
|
|
348
|
+
readonly command: "atlas report doctor";
|
|
349
|
+
readonly schemaName: "doctor-result";
|
|
350
|
+
readonly schema: z.ZodObject<{
|
|
351
|
+
ok: z.ZodBoolean;
|
|
352
|
+
stores: z.ZodArray<z.ZodObject<{
|
|
353
|
+
id: z.ZodString;
|
|
354
|
+
checks: z.ZodArray<z.ZodObject<{
|
|
355
|
+
name: z.ZodString;
|
|
356
|
+
ok: z.ZodBoolean;
|
|
357
|
+
detail: z.ZodString;
|
|
358
|
+
fix: z.ZodOptional<z.ZodString>;
|
|
359
|
+
}, z.core.$loose>>;
|
|
360
|
+
}, z.core.$loose>>;
|
|
361
|
+
}, z.core.$loose>;
|
|
362
|
+
};
|
|
363
|
+
readonly status: {
|
|
364
|
+
readonly command: "atlas report status";
|
|
365
|
+
readonly schemaName: "report-status";
|
|
366
|
+
readonly schema: z.ZodObject<{
|
|
367
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
368
|
+
ok: z.ZodBoolean;
|
|
369
|
+
reasons: z.ZodArray<z.ZodString>;
|
|
370
|
+
checks: z.ZodObject<{
|
|
371
|
+
passed: z.ZodNumber;
|
|
372
|
+
failed: z.ZodNumber;
|
|
373
|
+
running: z.ZodNumber;
|
|
374
|
+
'not-run': z.ZodNumber;
|
|
375
|
+
total: z.ZodNumber;
|
|
376
|
+
}, z.core.$strip>;
|
|
377
|
+
byEnvironment: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
378
|
+
passed: z.ZodNumber;
|
|
379
|
+
failed: z.ZodNumber;
|
|
380
|
+
running: z.ZodNumber;
|
|
381
|
+
'not-run': z.ZodNumber;
|
|
382
|
+
total: z.ZodNumber;
|
|
383
|
+
}, z.core.$strip>>;
|
|
384
|
+
layers: z.ZodNumber;
|
|
385
|
+
backends: z.ZodArray<z.ZodObject<{
|
|
386
|
+
id: z.ZodString;
|
|
387
|
+
label: z.ZodString;
|
|
388
|
+
available: z.ZodBoolean;
|
|
389
|
+
}, z.core.$strip>>;
|
|
390
|
+
notices: z.ZodArray<z.ZodString>;
|
|
391
|
+
specsWithoutEvidence: z.ZodArray<z.ZodString>;
|
|
392
|
+
specs: z.ZodArray<z.ZodObject<{
|
|
393
|
+
path: z.ZodNullable<z.ZodString>;
|
|
394
|
+
title: z.ZodString;
|
|
395
|
+
kind: z.ZodString;
|
|
396
|
+
checks: z.ZodObject<{
|
|
397
|
+
passed: z.ZodNumber;
|
|
398
|
+
failed: z.ZodNumber;
|
|
399
|
+
running: z.ZodNumber;
|
|
400
|
+
'not-run': z.ZodNumber;
|
|
401
|
+
total: z.ZodNumber;
|
|
402
|
+
}, z.core.$strip>;
|
|
403
|
+
byEnvironment: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
404
|
+
passed: z.ZodNumber;
|
|
405
|
+
failed: z.ZodNumber;
|
|
406
|
+
running: z.ZodNumber;
|
|
407
|
+
'not-run': z.ZodNumber;
|
|
408
|
+
total: z.ZodNumber;
|
|
409
|
+
}, z.core.$strip>>;
|
|
410
|
+
}, z.core.$loose>>;
|
|
411
|
+
failing: z.ZodArray<z.ZodObject<{
|
|
412
|
+
spec: z.ZodNullable<z.ZodString>;
|
|
413
|
+
check: z.ZodString;
|
|
414
|
+
title: z.ZodString;
|
|
415
|
+
status: z.ZodEnum<{
|
|
416
|
+
failed: "failed";
|
|
417
|
+
running: "running";
|
|
418
|
+
}>;
|
|
419
|
+
environment: z.ZodNullable<z.ZodString>;
|
|
420
|
+
producer: z.ZodString;
|
|
421
|
+
branch: z.ZodNullable<z.ZodString>;
|
|
422
|
+
sha: z.ZodNullable<z.ZodString>;
|
|
423
|
+
layer: z.ZodString;
|
|
424
|
+
backend: z.ZodString;
|
|
425
|
+
runUrl: z.ZodNullable<z.ZodString>;
|
|
426
|
+
detail: z.ZodString;
|
|
427
|
+
}, z.core.$loose>>;
|
|
428
|
+
}, z.core.$loose>;
|
|
429
|
+
};
|
|
430
|
+
readonly error: {
|
|
431
|
+
readonly command: "a command that was wrong (standard error)";
|
|
432
|
+
readonly schemaName: "command-error";
|
|
433
|
+
readonly schema: z.ZodObject<{
|
|
434
|
+
ok: z.ZodLiteral<false>;
|
|
435
|
+
error: z.ZodObject<{
|
|
436
|
+
message: z.ZodString;
|
|
437
|
+
code: z.ZodLiteral<"usage">;
|
|
438
|
+
}, z.core.$loose>;
|
|
439
|
+
}, z.core.$loose>;
|
|
440
|
+
};
|
|
441
|
+
};
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* @see docs/agents.md
|
|
14
14
|
*/
|
|
15
15
|
import { z } from 'zod/v4';
|
|
16
|
+
import { ReportStatusSchema } from './layer.js';
|
|
16
17
|
/** What was written for one layer by `atlas report publish`. */
|
|
17
18
|
export const PublishedLayerSchema = z.looseObject({
|
|
18
19
|
id: z.string().describe('The layer id: 64 hex digits, the SHA-256 of its content. Publishing the same input again gives the same id'),
|
|
@@ -122,3 +123,16 @@ export const InitPlanSchema = z.looseObject({
|
|
|
122
123
|
nextSteps: z.array(z.string()).describe('What to do next, in order, as plain instructions an agent can follow'),
|
|
123
124
|
warnings: z.array(z.string())
|
|
124
125
|
});
|
|
126
|
+
/**
|
|
127
|
+
* JSON command contracts, shared by schema publication, agent documentation and executable command checks.
|
|
128
|
+
* A new result needs an entry here and a runtime scenario in the documentation contract tests.
|
|
129
|
+
*/
|
|
130
|
+
export const CLI_RESULTS = {
|
|
131
|
+
init: { command: 'atlas init', schemaName: 'init-plan', schema: InitPlanSchema },
|
|
132
|
+
publish: { command: 'atlas report publish', schemaName: 'publish-result', schema: PublishResultSchema },
|
|
133
|
+
stream: { command: 'atlas report stream', schemaName: 'stream-result', schema: StreamResultSchema },
|
|
134
|
+
merge: { command: 'atlas report merge', schemaName: 'merge-result', schema: MergeResultSchema },
|
|
135
|
+
doctor: { command: 'atlas report doctor', schemaName: 'doctor-result', schema: DoctorResultSchema },
|
|
136
|
+
status: { command: 'atlas report status', schemaName: 'report-status', schema: ReportStatusSchema },
|
|
137
|
+
error: { command: 'a command that was wrong (standard error)', schemaName: 'command-error', schema: CommandErrorSchema }
|
|
138
|
+
};
|
package/dist/schema/src/index.js
CHANGED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/** @module Live run protocol
|
|
2
|
+
* A live run is a producer lease, separate from immutable report layers. Server receipt times determine liveness.
|
|
3
|
+
* Expiration means interrupted, never passed; completed check results retain the stable layer contract.
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod/v4';
|
|
6
|
+
/** Small progress messages: no attachment bytes, bounded step history and text. */
|
|
7
|
+
export declare const LiveCheckSchema: z.ZodObject<{
|
|
8
|
+
id: z.ZodString;
|
|
9
|
+
title: z.ZodString;
|
|
10
|
+
status: z.ZodEnum<{
|
|
11
|
+
passed: "passed";
|
|
12
|
+
failed: "failed";
|
|
13
|
+
running: "running";
|
|
14
|
+
"not-run": "not-run";
|
|
15
|
+
}>;
|
|
16
|
+
detail: z.ZodDefault<z.ZodString>;
|
|
17
|
+
specPath: z.ZodOptional<z.ZodString>;
|
|
18
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
20
|
+
name: z.ZodString;
|
|
21
|
+
status: z.ZodOptional<z.ZodString>;
|
|
22
|
+
}, z.core.$strip>>>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
/** The producer starts one UUID-named run. Identity stays fixed for its lifetime. */
|
|
25
|
+
export declare const LiveRunStartSchema: z.ZodObject<{
|
|
26
|
+
id: z.ZodString;
|
|
27
|
+
producer: z.ZodString;
|
|
28
|
+
title: z.ZodOptional<z.ZodString>;
|
|
29
|
+
environment: z.ZodOptional<z.ZodString>;
|
|
30
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
31
|
+
sha: z.ZodOptional<z.ZodString>;
|
|
32
|
+
plannedChecks: z.ZodOptional<z.ZodNumber>;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
/** Ordered deltas. A retried sequence must have identical content; terminal runs never accept more progress. */
|
|
35
|
+
export declare const LiveRunUpdateSchema: z.ZodObject<{
|
|
36
|
+
sequence: z.ZodNumber;
|
|
37
|
+
checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
38
|
+
id: z.ZodString;
|
|
39
|
+
title: z.ZodString;
|
|
40
|
+
status: z.ZodEnum<{
|
|
41
|
+
passed: "passed";
|
|
42
|
+
failed: "failed";
|
|
43
|
+
running: "running";
|
|
44
|
+
"not-run": "not-run";
|
|
45
|
+
}>;
|
|
46
|
+
detail: z.ZodDefault<z.ZodString>;
|
|
47
|
+
specPath: z.ZodOptional<z.ZodString>;
|
|
48
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
49
|
+
steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
50
|
+
name: z.ZodString;
|
|
51
|
+
status: z.ZodOptional<z.ZodString>;
|
|
52
|
+
}, z.core.$strip>>>;
|
|
53
|
+
}, z.core.$strip>>>;
|
|
54
|
+
finish: z.ZodOptional<z.ZodEnum<{
|
|
55
|
+
completed: "completed";
|
|
56
|
+
interrupted: "interrupted";
|
|
57
|
+
}>>;
|
|
58
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
/** The bounded live feed response; completed and interrupted runs remain visible as recent history. */
|
|
61
|
+
export declare const LiveRunSchema: z.ZodObject<{
|
|
62
|
+
id: z.ZodString;
|
|
63
|
+
producer: z.ZodString;
|
|
64
|
+
title: z.ZodOptional<z.ZodString>;
|
|
65
|
+
environment: z.ZodOptional<z.ZodString>;
|
|
66
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
67
|
+
sha: z.ZodOptional<z.ZodString>;
|
|
68
|
+
plannedChecks: z.ZodOptional<z.ZodNumber>;
|
|
69
|
+
status: z.ZodEnum<{
|
|
70
|
+
running: "running";
|
|
71
|
+
completed: "completed";
|
|
72
|
+
interrupted: "interrupted";
|
|
73
|
+
}>;
|
|
74
|
+
startedAtMs: z.ZodNumber;
|
|
75
|
+
lastHeartbeatAtMs: z.ZodNumber;
|
|
76
|
+
lastProgressAtMs: z.ZodNumber;
|
|
77
|
+
finishedAtMs: z.ZodOptional<z.ZodNumber>;
|
|
78
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
79
|
+
sequence: z.ZodNumber;
|
|
80
|
+
completed: z.ZodNumber;
|
|
81
|
+
passed: z.ZodNumber;
|
|
82
|
+
failed: z.ZodNumber;
|
|
83
|
+
notRun: z.ZodNumber;
|
|
84
|
+
running: z.ZodNumber;
|
|
85
|
+
current: z.ZodArray<z.ZodObject<{
|
|
86
|
+
id: z.ZodString;
|
|
87
|
+
title: z.ZodString;
|
|
88
|
+
status: z.ZodEnum<{
|
|
89
|
+
passed: "passed";
|
|
90
|
+
failed: "failed";
|
|
91
|
+
running: "running";
|
|
92
|
+
"not-run": "not-run";
|
|
93
|
+
}>;
|
|
94
|
+
detail: z.ZodDefault<z.ZodString>;
|
|
95
|
+
specPath: z.ZodOptional<z.ZodString>;
|
|
96
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
97
|
+
steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
98
|
+
name: z.ZodString;
|
|
99
|
+
status: z.ZodOptional<z.ZodString>;
|
|
100
|
+
}, z.core.$strip>>>;
|
|
101
|
+
}, z.core.$strip>>;
|
|
102
|
+
recent: z.ZodArray<z.ZodObject<{
|
|
103
|
+
id: z.ZodString;
|
|
104
|
+
title: z.ZodString;
|
|
105
|
+
status: z.ZodEnum<{
|
|
106
|
+
passed: "passed";
|
|
107
|
+
failed: "failed";
|
|
108
|
+
running: "running";
|
|
109
|
+
"not-run": "not-run";
|
|
110
|
+
}>;
|
|
111
|
+
detail: z.ZodDefault<z.ZodString>;
|
|
112
|
+
specPath: z.ZodOptional<z.ZodString>;
|
|
113
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
114
|
+
steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
115
|
+
name: z.ZodString;
|
|
116
|
+
status: z.ZodOptional<z.ZodString>;
|
|
117
|
+
}, z.core.$strip>>>;
|
|
118
|
+
}, z.core.$strip>>;
|
|
119
|
+
}, z.core.$strip>;
|
|
120
|
+
/** The shape a producer uses for a progress check. */
|
|
121
|
+
export type LiveCheck = z.input<typeof LiveCheckSchema>;
|
|
122
|
+
/** A server's live run snapshot. */
|
|
123
|
+
export type LiveRun = z.output<typeof LiveRunSchema>;
|