@crvouga/atlas 0.4.0 → 0.5.0
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 +7 -1
- package/README.md +178 -617
- package/dist/bun/src/driver.d.ts +41 -7
- package/dist/bun/src/driver.js +47 -6
- package/dist/bun/src/index.d.ts +8 -0
- package/dist/bun/src/index.js +8 -0
- package/dist/core/src/cli.d.ts +14 -1
- package/dist/core/src/cli.js +30 -1
- package/dist/core/src/config.d.ts +70 -4
- package/dist/core/src/config.js +62 -3
- package/dist/core/src/events/cloudevents.d.ts +54 -9
- package/dist/core/src/events/cloudevents.js +60 -9
- package/dist/core/src/graph.d.ts +21 -0
- package/dist/core/src/graph.js +26 -0
- package/dist/core/src/index.d.ts +11 -0
- package/dist/core/src/index.js +11 -0
- package/dist/core/src/lint.d.ts +30 -0
- package/dist/core/src/lint.js +13 -0
- package/dist/core/src/plan.d.ts +39 -1
- package/dist/core/src/plan.js +28 -1
- package/dist/core/src/privacy.d.ts +29 -2
- package/dist/core/src/privacy.js +19 -2
- package/dist/core/src/report/formats.d.ts +34 -4
- package/dist/core/src/report/formats.js +24 -4
- package/dist/core/src/report/markdown.d.ts +15 -0
- package/dist/core/src/report/markdown.js +8 -0
- package/dist/core/src/run/clients.d.ts +44 -5
- package/dist/core/src/run/clients.js +46 -2
- package/dist/core/src/run/execute.d.ts +69 -16
- package/dist/core/src/run/execute.js +67 -16
- package/dist/core/src/run/frames.d.ts +13 -4
- package/dist/core/src/run/frames.js +19 -4
- package/dist/core/src/run/http.d.ts +34 -1
- package/dist/core/src/run/http.js +14 -1
- package/dist/core/src/run/types.d.ts +76 -3
- package/dist/core/src/run/types.js +19 -3
- package/dist/core/src/signals.d.ts +49 -5
- package/dist/core/src/signals.js +22 -5
- package/dist/core/src/spec/compose.d.ts +23 -1
- package/dist/core/src/spec/compose.js +10 -1
- package/dist/core/src/spec/index.d.ts +9 -1
- package/dist/core/src/spec/index.js +9 -1
- package/dist/core/src/spec/load.d.ts +22 -1
- package/dist/core/src/spec/load.js +31 -1
- package/dist/core/src/spec/parse.d.ts +16 -2
- package/dist/core/src/spec/parse.js +25 -2
- package/dist/core/src/spec/scxml.d.ts +25 -4
- package/dist/core/src/spec/scxml.js +36 -4
- package/dist/core/src/spec/types.d.ts +52 -1
- package/dist/core/src/spec/types.js +24 -0
- package/dist/detox/src/index.d.ts +54 -11
- package/dist/detox/src/index.js +45 -7
- package/dist/playwright/src/driver.d.ts +39 -3
- package/dist/playwright/src/driver.js +27 -3
- package/dist/playwright/src/index.d.ts +10 -0
- package/dist/playwright/src/index.js +10 -0
- package/dist/playwright/src/media.d.ts +50 -4
- package/dist/playwright/src/media.js +55 -4
- package/dist/playwright/src/signals.d.ts +44 -5
- package/dist/playwright/src/signals.js +29 -5
- package/dist/reports/src/attachment-files.d.ts +44 -0
- package/dist/reports/src/attachment-files.js +121 -0
- package/dist/reports/src/attachment-response.d.ts +31 -0
- package/dist/reports/src/attachment-response.js +55 -0
- package/dist/reports/src/aws-credentials.d.ts +48 -0
- package/dist/reports/src/aws-credentials.js +221 -0
- package/dist/reports/src/browser-navigation.d.ts +14 -0
- package/dist/reports/src/browser-navigation.js +7 -0
- package/dist/reports/src/bundle.d.ts +34 -2
- package/dist/reports/src/bundle.js +38 -2
- package/dist/reports/src/catalog.d.ts +34 -3
- package/dist/reports/src/catalog.js +17 -3
- package/dist/reports/src/cli-stores.d.ts +36 -0
- package/dist/reports/src/cli-stores.js +73 -0
- package/dist/reports/src/clock.d.ts +7 -2
- package/dist/reports/src/clock.js +5 -2
- package/dist/reports/src/completion-order.d.ts +18 -5
- package/dist/reports/src/completion-order.js +18 -5
- package/dist/reports/src/compose.d.ts +80 -0
- package/dist/reports/src/compose.js +117 -0
- package/dist/reports/src/copy-store.d.ts +29 -0
- package/dist/reports/src/copy-store.js +52 -0
- package/dist/reports/src/directory-outline.d.ts +38 -0
- package/dist/reports/src/directory-outline.js +103 -0
- package/dist/reports/src/directory-store.d.ts +20 -0
- package/dist/reports/src/directory-store.js +166 -0
- package/dist/reports/src/doctor.d.ts +29 -0
- package/dist/reports/src/doctor.js +83 -0
- package/dist/reports/src/effective-delta.d.ts +34 -0
- package/dist/reports/src/effective-delta.js +25 -0
- package/dist/reports/src/evidence-detail.d.ts +64 -0
- package/dist/reports/src/evidence-detail.js +92 -0
- package/dist/reports/src/evidence-live.d.ts +35 -5
- package/dist/reports/src/evidence-live.js +18 -2
- package/dist/reports/src/evidence-types.d.ts +68 -1
- package/dist/reports/src/evidence-types.js +5 -1
- package/dist/reports/src/evidence-view.d.ts +43 -4
- package/dist/reports/src/evidence-view.js +13 -2
- package/dist/reports/src/explorer-types.d.ts +40 -3
- package/dist/reports/src/explorer-types.js +8 -0
- package/dist/reports/src/explorer-versions.d.ts +9 -1
- package/dist/reports/src/explorer-versions.js +18 -1
- package/dist/reports/src/export-evidence.d.ts +16 -1
- package/dist/reports/src/export-evidence.js +52 -1
- package/dist/reports/src/fetcher.d.ts +27 -3
- package/dist/reports/src/fetcher.js +11 -3
- package/dist/reports/src/format-date.d.ts +6 -0
- package/dist/reports/src/format-date.js +6 -0
- package/dist/reports/src/format.d.ts +16 -0
- package/dist/reports/src/format.js +10 -0
- package/dist/reports/src/frames.d.ts +36 -3
- package/dist/reports/src/frames.js +22 -3
- package/dist/reports/src/hash.d.ts +18 -0
- package/dist/reports/src/hash.js +13 -0
- package/dist/reports/src/host.d.ts +29 -0
- package/dist/reports/src/host.js +64 -0
- package/dist/reports/src/html-frame.d.ts +5 -6
- package/dist/reports/src/html-frame.js +12 -1
- package/dist/reports/src/http-store.d.ts +52 -0
- package/dist/reports/src/http-store.js +145 -0
- package/dist/reports/src/http.d.ts +7 -0
- package/dist/reports/src/http.js +6 -0
- package/dist/reports/src/ingest.d.ts +54 -0
- package/dist/reports/src/ingest.js +210 -0
- package/dist/reports/src/init.d.ts +40 -0
- package/dist/reports/src/init.js +364 -0
- package/dist/reports/src/junit.d.ts +33 -6
- package/dist/reports/src/junit.js +87 -21
- package/dist/reports/src/keyboard.d.ts +20 -0
- package/dist/reports/src/keyboard.js +11 -0
- package/dist/reports/src/keys.d.ts +21 -3
- package/dist/reports/src/keys.js +21 -3
- package/dist/reports/src/layer-axes.d.ts +35 -5
- package/dist/reports/src/layer-axes.js +25 -5
- package/dist/reports/src/layer-catalog.d.ts +28 -1
- package/dist/reports/src/layer-catalog.js +18 -1
- package/dist/reports/src/layer-merge.d.ts +98 -9
- package/dist/reports/src/layer-merge.js +147 -31
- package/dist/reports/src/layer-source.d.ts +18 -0
- package/dist/reports/src/layer-source.js +11 -0
- package/dist/reports/src/layer-store.d.ts +42 -0
- package/dist/reports/src/layer-store.js +63 -5
- package/dist/reports/src/layer-types.d.ts +32 -1
- package/dist/reports/src/layers-route.d.ts +47 -4
- package/dist/reports/src/layers-route.js +86 -7
- package/dist/reports/src/media-types.d.ts +11 -0
- package/dist/reports/src/media-types.js +22 -0
- package/dist/reports/src/namespace-guard.d.ts +10 -1
- package/dist/reports/src/namespace-guard.js +10 -1
- package/dist/reports/src/navigation.d.ts +12 -0
- package/dist/reports/src/navigation.js +7 -0
- package/dist/reports/src/object-io.d.ts +11 -4
- package/dist/reports/src/object-io.js +4 -4
- package/dist/reports/src/object-store-conformance.d.ts +27 -0
- package/dist/reports/src/object-store-conformance.js +87 -0
- package/dist/reports/src/object-store.d.ts +33 -24
- package/dist/reports/src/object-store.js +17 -24
- package/dist/reports/src/parse-with.d.ts +16 -0
- package/dist/reports/src/parse-with.js +14 -0
- package/dist/reports/src/performance-part.d.ts +25 -1
- package/dist/reports/src/performance-part.js +15 -1
- package/dist/reports/src/performance.d.ts +22 -2
- package/dist/reports/src/performance.js +12 -2
- package/dist/reports/src/persist.d.ts +12 -3
- package/dist/reports/src/persist.js +12 -3
- package/dist/reports/src/phone.d.ts +18 -1
- package/dist/reports/src/phone.js +18 -1
- package/dist/reports/src/protocol.d.ts +26 -4
- package/dist/reports/src/protocol.js +15 -4
- package/dist/reports/src/publication.d.ts +21 -1
- package/dist/reports/src/publication.js +21 -1
- package/dist/reports/src/publish-checks.d.ts +35 -0
- package/dist/reports/src/publish-checks.js +122 -0
- package/dist/reports/src/publish.d.ts +42 -9
- package/dist/reports/src/publish.js +36 -7
- package/dist/reports/src/read.d.ts +46 -16
- package/dist/reports/src/read.js +38 -14
- package/dist/reports/src/recording-bundle.d.ts +13 -2
- package/dist/reports/src/recording-bundle.js +4 -2
- package/dist/reports/src/recording-keys.d.ts +15 -1
- package/dist/reports/src/recording-keys.js +15 -1
- package/dist/reports/src/remote-report.d.ts +28 -7
- package/dist/reports/src/remote-report.js +15 -7
- package/dist/reports/src/report-cli.d.ts +51 -0
- package/dist/reports/src/report-cli.js +485 -0
- package/dist/reports/src/report-index.d.ts +99 -0
- package/dist/reports/src/report-index.js +337 -0
- package/dist/reports/src/report-loader.d.ts +10 -0
- package/dist/reports/src/report-loader.js +6 -0
- package/dist/reports/src/report-parts.d.ts +29 -3
- package/dist/reports/src/report-parts.js +37 -3
- package/dist/reports/src/report-status.d.ts +48 -0
- package/dist/reports/src/report-status.js +156 -0
- package/dist/reports/src/report-types.d.ts +73 -0
- package/dist/reports/src/report-types.js +3 -0
- package/dist/reports/src/reporter.d.ts +67 -0
- package/dist/reports/src/reporter.js +128 -0
- package/dist/reports/src/reports-explorer-route.d.ts +541 -0
- package/dist/reports/src/reports-explorer-route.js +11 -0
- package/dist/reports/src/reports-list-route.d.ts +9 -0
- package/dist/reports/src/reports-list-route.js +9 -0
- package/dist/reports/src/reports-route.d.ts +561 -22
- package/dist/reports/src/reports-route.js +11 -3
- package/dist/reports/src/reports-store.d.ts +19 -2
- package/dist/reports/src/reports-store.js +10 -2
- package/dist/reports/src/resilient-cache.d.ts +14 -1
- package/dist/reports/src/resilient-cache.js +8 -1
- package/dist/reports/src/retention.d.ts +17 -1
- package/dist/reports/src/retention.js +5 -1
- package/dist/reports/src/run-bundle.d.ts +63 -0
- package/dist/reports/src/run-bundle.js +159 -0
- package/dist/reports/src/s3-store.d.ts +79 -0
- package/dist/reports/src/s3-store.js +295 -0
- package/dist/reports/src/scenario.d.ts +14 -4
- package/dist/reports/src/scenario.js +5 -4
- package/dist/reports/src/sigv4.d.ts +72 -0
- package/dist/reports/src/sigv4.js +96 -0
- package/dist/reports/src/snapshot-bundle.d.ts +24 -1
- package/dist/reports/src/snapshot-bundle.js +27 -2
- package/dist/reports/src/snapshot-surface.d.ts +20 -9
- package/dist/reports/src/snapshot-surface.js +32 -19
- package/dist/reports/src/source-content.d.ts +23 -0
- package/dist/reports/src/source-content.js +30 -1
- package/dist/reports/src/source-entries.d.ts +13 -0
- package/dist/reports/src/source-entries.js +6 -0
- package/dist/reports/src/source-part.d.ts +15 -0
- package/dist/reports/src/source-part.js +8 -0
- package/dist/reports/src/source-reader.d.ts +11 -0
- package/dist/reports/src/source-reader.js +5 -0
- package/dist/reports/src/spec-evidence.d.ts +12 -2
- package/dist/reports/src/spec-evidence.js +6 -2
- package/dist/reports/src/spec-inventory.d.ts +15 -1
- package/dist/reports/src/spec-inventory.js +22 -1
- package/dist/reports/src/spec-link.d.ts +28 -0
- package/dist/reports/src/spec-link.js +70 -0
- package/dist/reports/src/spec-set.d.ts +63 -0
- package/dist/reports/src/spec-set.js +177 -0
- package/dist/reports/src/status.d.ts +10 -0
- package/dist/reports/src/status.js +5 -0
- package/dist/reports/src/store-prefix.d.ts +28 -0
- package/dist/reports/src/store-prefix.js +22 -0
- package/dist/reports/src/store-url.d.ts +89 -0
- package/dist/reports/src/store-url.js +160 -0
- package/dist/reports/src/test-catalog-entity.d.ts +11 -0
- package/dist/reports/src/test-catalog-entity.js +6 -0
- package/dist/reports/src/types.d.ts +6 -1
- package/dist/reports/src/use-report-nav.d.ts +35 -0
- package/dist/reports/src/use-report-nav.js +12 -0
- package/dist/schema/src/api.d.ts +799 -0
- package/dist/schema/src/api.js +201 -0
- package/dist/schema/src/cli-results.d.ts +210 -0
- package/dist/schema/src/cli-results.js +124 -0
- package/dist/schema/src/common.d.ts +53 -0
- package/dist/schema/src/common.js +42 -0
- package/dist/schema/src/index.d.ts +14 -0
- package/dist/schema/src/index.js +14 -0
- package/dist/schema/src/layer.d.ts +2273 -0
- package/dist/schema/src/layer.js +462 -0
- package/dist/schema/src/manifest.d.ts +95 -0
- package/dist/schema/src/manifest.js +84 -0
- package/dist/schema/src/report-sources.d.ts +28 -0
- package/dist/schema/src/report-sources.js +25 -0
- package/dist/schema/src/runs-index.d.ts +16 -0
- package/dist/schema/src/runs-index.js +15 -0
- package/dist/schema/src/server-config.d.ts +93 -0
- package/dist/schema/src/server-config.js +73 -0
- package/dist/schema/src/spec.d.ts +69 -0
- package/dist/schema/src/spec.js +58 -0
- package/dist/server/src/app.d.ts +62 -0
- package/dist/server/src/app.js +419 -0
- package/dist/server/src/auth.d.ts +41 -0
- package/dist/server/src/auth.js +59 -0
- package/dist/server/src/config.d.ts +83 -0
- package/dist/server/src/config.js +187 -0
- package/dist/server/src/dev.d.ts +12 -0
- package/dist/server/src/dev.js +80 -0
- package/dist/server/src/events.d.ts +29 -0
- package/dist/server/src/events.js +101 -0
- package/dist/server/src/host.d.ts +30 -0
- package/dist/server/src/host.js +115 -0
- package/dist/server/src/index.d.ts +16 -0
- package/dist/server/src/index.js +16 -0
- package/dist/server/src/llms.d.ts +19 -0
- package/dist/server/src/llms.js +63 -0
- package/dist/server/src/main.d.ts +30 -0
- package/dist/server/src/main.js +112 -0
- package/dist/server/src/openapi.d.ts +59 -0
- package/dist/server/src/openapi.js +374 -0
- package/dist/server/src/problem.d.ts +8 -0
- package/dist/server/src/problem.js +39 -0
- package/dist/server/src/site.d.ts +13 -0
- package/dist/server/src/site.js +43 -0
- package/dist/server/src/store-api.d.ts +28 -0
- package/dist/server/src/store-api.js +159 -0
- package/dist/server/src/validate.d.ts +71 -0
- package/dist/server/src/validate.js +197 -0
- package/dist/vitest/src/index.d.ts +27 -5
- package/dist/vitest/src/index.js +18 -5
- package/dist/webdriver/src/driver.d.ts +63 -11
- package/dist/webdriver/src/driver.js +57 -6
- package/dist/webdriver/src/index.d.ts +8 -0
- package/dist/webdriver/src/index.js +1 -0
- package/dist/webdriver/src/protocol.d.ts +75 -6
- package/dist/webdriver/src/protocol.js +79 -6
- package/docs/agents.md +137 -0
- package/docs/deploying.md +345 -0
- package/docs/dogfooding.md +175 -0
- package/docs/extending.md +242 -0
- package/docs/integrating.md +485 -0
- package/docs/reference/bun.md +141 -0
- package/docs/reference/cli.md +146 -0
- package/docs/reference/core.md +2426 -0
- package/docs/reference/detox.md +150 -0
- package/docs/reference/http-api.md +303 -0
- package/docs/reference/playwright.md +303 -0
- package/docs/reference/reports.md +7098 -0
- package/docs/reference/schema.md +1651 -0
- package/docs/reference/server.md +685 -0
- package/docs/reference/vitest.md +45 -0
- package/docs/reference/webdriver.md +330 -0
- package/docs/report-backends.md +144 -0
- package/docs/report-contract.md +400 -0
- package/docs/reporting-issues.md +160 -0
- package/docs/server.md +285 -0
- package/docs/statecharts.md +641 -0
- package/llms-full.txt +3506 -0
- package/llms.txt +47 -0
- package/package.json +32 -4
- package/packages/core/README.md +2 -1
- package/packages/reports/README.md +65 -0
- package/packages/reports/STORAGE.md +4 -0
- package/packages/schema/README.md +14 -0
- package/packages/schema/schemas/check-detail.schema.json +1032 -0
- package/packages/schema/schemas/checks-result.schema.json +26 -0
- package/packages/schema/schemas/command-error.schema.json +35 -0
- package/packages/schema/schemas/doctor-result.schema.json +60 -0
- package/packages/schema/schemas/effective-delta.schema.json +490 -0
- package/packages/schema/schemas/effective-evidence.schema.json +471 -0
- package/packages/schema/schemas/evidence-page.schema.json +271 -0
- package/packages/schema/schemas/hello-event.schema.json +22 -0
- package/packages/schema/schemas/init-plan.schema.json +347 -0
- package/packages/schema/schemas/layer-rows.schema.json +199 -0
- package/packages/schema/schemas/layer.schema.json +2888 -0
- package/packages/schema/schemas/merge-result.schema.json +40 -0
- package/packages/schema/schemas/outline.schema.json +62 -0
- package/packages/schema/schemas/problem.schema.json +37 -0
- package/packages/schema/schemas/publish-checks.schema.json +1413 -0
- package/packages/schema/schemas/publish-result.schema.json +168 -0
- package/packages/schema/schemas/ready.schema.json +68 -0
- package/packages/schema/schemas/report-event.schema.json +100 -0
- package/packages/schema/schemas/report-status.schema.json +370 -0
- package/packages/schema/schemas/server-config.schema.json +194 -0
- package/packages/schema/schemas/server-info.schema.json +114 -0
- package/packages/schema/schemas/spec-set.schema.json +103 -0
- package/packages/schema/schemas/store-listing.schema.json +29 -0
- package/packages/schema/schemas/store-write-result.schema.json +28 -0
- package/packages/schema/schemas/stream-result.schema.json +59 -0
- package/packages/server/README.md +43 -0
- package/packages/server/openapi.json +6699 -0
- package/packages/visualizer/README.md +21 -0
- package/packages/visualizer/src/app/AppShell.tsx +9 -2
- package/packages/visualizer/src/app/report-sources.tsx +6 -4
- package/packages/visualizer/src/app/router.tsx +3 -3
- package/packages/visualizer/src/components/Header.module.css +35 -0
- package/packages/visualizer/src/components/Header.tsx +40 -3
- package/packages/visualizer/src/data/adapters/adapter.ts +5 -17
- package/packages/visualizer/src/data/adapters/index.ts +10 -1
- package/packages/visualizer/src/evidence/api.ts +14 -2
- package/packages/visualizer/src/evidence/artifacts.module.css +213 -0
- package/packages/visualizer/src/evidence/artifacts.tsx +272 -0
- package/packages/visualizer/src/evidence/check-detail.tsx +3 -1
- package/packages/visualizer/src/evidence/evidence-context.tsx +74 -12
- package/packages/visualizer/src/evidence/spec-page.tsx +23 -16
- package/packages/visualizer/src/find/Finder.tsx +1 -7
- package/packages/visualizer/src/find/open.ts +4 -0
- package/packages/visualizer/src/live/live-stream.ts +204 -0
- package/packages/visualizer/src/runtime.ts +19 -0
- package/packages/visualizer/vite/atlas-server-proxy.ts +36 -0
- package/packages/visualizer/vite.config.ts +11 -3
|
@@ -0,0 +1,1651 @@
|
|
|
1
|
+
# Reference: schema
|
|
2
|
+
|
|
3
|
+
The contract: Zod schemas, and the JSON Schemas generated from them, for layers, checks, report status, command results, server responses and configuration. Import path `@crvouga/atlas/schema`.
|
|
4
|
+
|
|
5
|
+
> Generated from the doc comments of `packages/schema/src` by `bun run docs`. Do not edit: change the comment next to the code.
|
|
6
|
+
|
|
7
|
+
### Atlas server API documents
|
|
8
|
+
|
|
9
|
+
Source: `packages/schema/src/api.ts`
|
|
10
|
+
|
|
11
|
+
The JSON bodies the Atlas server speaks, as Zod schemas: the problem document every error uses (RFC 9457), what
|
|
12
|
+
`/api/server` and `/readyz` say about the server, the report a viewer reads (`/api/reports/evidence/effective`) and
|
|
13
|
+
what changed since a version of it, the store protocol's listings and acknowledgements, and the events on the
|
|
14
|
+
stream. The server's OpenAPI document (`@crvouga/atlas/openapi.json`) is generated from these, and each is also
|
|
15
|
+
published as a JSON Schema, so a client in any language can validate what it receives.
|
|
16
|
+
|
|
17
|
+
Every object is open (unknown keys are kept, not refused) because the API only grows: within a version a response
|
|
18
|
+
may gain optional fields, never lose or change one (see AGENTS.md, "The server is a living application"). A client
|
|
19
|
+
must ignore what it does not know.
|
|
20
|
+
|
|
21
|
+
See docs/server.md
|
|
22
|
+
|
|
23
|
+
#### `EvidenceStatusSchema`
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
export const EvidenceStatusSchema = …
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
One of the statuses a check has in a report: `passed`, `failed`, `running` (not finished) or `not-run`. Closed.
|
|
30
|
+
|
|
31
|
+
#### `ProblemSchema`
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
export const ProblemSchema = …
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The body of every error the server answers, a Problem Details document (RFC 9457, `application/problem+json`).
|
|
38
|
+
`error` repeats `detail` for clients written before the standard was adopted; read `detail`.
|
|
39
|
+
|
|
40
|
+
#### `HealthSchema`
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
export const HealthSchema = …
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
What `GET /healthz` answers: the process is up.
|
|
47
|
+
|
|
48
|
+
#### `ReadySchema`
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
export const ReadySchema = …
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
What `GET /readyz` answers: whether the backends were read, and counts for logs. `ready` false comes with status 503.
|
|
55
|
+
|
|
56
|
+
#### `ServerInfoSchema`
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
export const ServerInfoSchema = …
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
What `GET /api/server` answers: what the server is, who is asking, and what it can do.
|
|
63
|
+
|
|
64
|
+
#### `BackendInfoSchema`
|
|
65
|
+
|
|
66
|
+
```ts
|
|
67
|
+
export const BackendInfoSchema = …
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
A backend as the report shows it: where results came from, and whether it could be read.
|
|
71
|
+
|
|
72
|
+
#### `EvidenceSummarySchema`
|
|
73
|
+
|
|
74
|
+
```ts
|
|
75
|
+
export const EvidenceSummarySchema = …
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
What a result carries beyond its outcome, as counts and short facts. Present only when there is something.
|
|
79
|
+
|
|
80
|
+
#### `LayerHeaderSchema`
|
|
81
|
+
|
|
82
|
+
```ts
|
|
83
|
+
export const LayerHeaderSchema = …
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
A layer as the report shows it: its origin and its checks by status.
|
|
87
|
+
|
|
88
|
+
#### `LayerRowSchema`
|
|
89
|
+
|
|
90
|
+
```ts
|
|
91
|
+
export const LayerRowSchema = …
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
One check of a layer as the report shows it.
|
|
95
|
+
|
|
96
|
+
#### `LayerRowsSchema`
|
|
97
|
+
|
|
98
|
+
```ts
|
|
99
|
+
export const LayerRowsSchema = …
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
A layer with its checks: the rows of one layer, read apart from its header.
|
|
103
|
+
|
|
104
|
+
#### `LayerEvidenceSchema`
|
|
105
|
+
|
|
106
|
+
```ts
|
|
107
|
+
export const LayerEvidenceSchema = …
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
A layer that holds winners, with only the rows that win.
|
|
111
|
+
|
|
112
|
+
#### `EffectiveEvidenceSchema`
|
|
113
|
+
|
|
114
|
+
```ts
|
|
115
|
+
export const EffectiveEvidenceSchema = …
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
The report as it stands: `GET /api/reports/evidence/effective`. Only the layers that win at least one check are
|
|
119
|
+
listed, each with only the rows that win, newest first. `version` is a hash of the report: equal exactly when the
|
|
120
|
+
report is, on every replica, so it works as an ETag and as the `since` of a delta.
|
|
121
|
+
|
|
122
|
+
#### `EffectiveDeltaSchema`
|
|
123
|
+
|
|
124
|
+
```ts
|
|
125
|
+
export const EffectiveDeltaSchema = …
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
What `GET /api/reports/evidence/effective?since=<version>` answers when the server remembers that version: only
|
|
129
|
+
what changed. Replace the layers of the same id, drop `removed`, take the rest whole; the result equals the full
|
|
130
|
+
report. When the server does not remember the version it answers with the whole report instead (no `delta` key).
|
|
131
|
+
|
|
132
|
+
#### `OutlineSpecSchema`
|
|
133
|
+
|
|
134
|
+
```ts
|
|
135
|
+
export const OutlineSpecSchema = …
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
A spec of the outline a report is laid over.
|
|
139
|
+
|
|
140
|
+
#### `OutlineSchema`
|
|
141
|
+
|
|
142
|
+
```ts
|
|
143
|
+
export const OutlineSchema = …
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
`GET /api/reports/outline`: the specs a report is laid over, from the newest committed spec set.
|
|
147
|
+
|
|
148
|
+
#### `EvidencePageSchema`
|
|
149
|
+
|
|
150
|
+
```ts
|
|
151
|
+
export const EvidencePageSchema = …
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
`GET /api/reports/evidence`: one page of layer headers, newest first. Used by clients that read the whole history.
|
|
155
|
+
|
|
156
|
+
#### `CheckDetailSchema`
|
|
157
|
+
|
|
158
|
+
```ts
|
|
159
|
+
export const CheckDetailSchema = …
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
`GET /api/reports/evidence/detail/{backend}/{id}`: everything one check carries, and what its run carries.
|
|
163
|
+
|
|
164
|
+
#### `StoreListingSchema`
|
|
165
|
+
|
|
166
|
+
```ts
|
|
167
|
+
export const StoreListingSchema = …
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
`GET /api/store?prefix=…`: one page of keys under `layers/`, in code-unit order.
|
|
171
|
+
|
|
172
|
+
#### `StoreWriteResultSchema`
|
|
173
|
+
|
|
174
|
+
```ts
|
|
175
|
+
export const StoreWriteResultSchema = …
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
`PUT /api/store/{key}` answered: the key was taken (`created`) or was already there with the same bytes.
|
|
179
|
+
|
|
180
|
+
#### `ChecksResultSchema`
|
|
181
|
+
|
|
182
|
+
```ts
|
|
183
|
+
export const ChecksResultSchema = …
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
`POST /api/checks` answered: the layer that was written.
|
|
187
|
+
|
|
188
|
+
#### `HelloEventSchema`
|
|
189
|
+
|
|
190
|
+
```ts
|
|
191
|
+
export const HelloEventSchema = …
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
The data of the `hello` event: sent first on `/api/events`.
|
|
195
|
+
|
|
196
|
+
#### `ReportEventSchema`
|
|
197
|
+
|
|
198
|
+
```ts
|
|
199
|
+
export const ReportEventSchema = …
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
The data of the `report` event: layers arrived. Enough to say who sent what, without asking.
|
|
203
|
+
|
|
204
|
+
#### `PingEventSchema`
|
|
205
|
+
|
|
206
|
+
```ts
|
|
207
|
+
export const PingEventSchema = …
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
The data of the `ping` event: sent every `heartbeatSeconds`, so a quiet server is told apart from a dead connection.
|
|
211
|
+
|
|
212
|
+
### Command results (`--format json`)
|
|
213
|
+
|
|
214
|
+
Source: `packages/schema/src/cli-results.ts`
|
|
215
|
+
|
|
216
|
+
What `atlas report publish`, `stream`, `merge` and `doctor` print on standard output with `--format json` (alias
|
|
217
|
+
`--json`), and what any `atlas` command prints on standard error for a command that was wrong: one JSON document,
|
|
218
|
+
so an agent or a script never has to parse prose. (`status` and `policy` already print documents:
|
|
219
|
+
`ReportStatusSchema`, and an IAM policy.) Each is also published as a JSON Schema.
|
|
220
|
+
|
|
221
|
+
Exit codes are the same with and without `--format json`: `0` it worked, `1` it ran and the answer is no (a
|
|
222
|
+
report that does not pass, a store that needs attention, checks that could not be sent), `2` the command itself
|
|
223
|
+
was wrong (a missing flag, a path that does not exist). Within a version these only gain optional fields.
|
|
224
|
+
|
|
225
|
+
See docs/agents.md
|
|
226
|
+
|
|
227
|
+
#### `PublishedLayerSchema`
|
|
228
|
+
|
|
229
|
+
```ts
|
|
230
|
+
export const PublishedLayerSchema = …
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
What was written for one layer by `atlas report publish`.
|
|
234
|
+
|
|
235
|
+
#### `PublishResultSchema`
|
|
236
|
+
|
|
237
|
+
```ts
|
|
238
|
+
export const PublishResultSchema = …
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
What `atlas report publish --format json` prints.
|
|
242
|
+
|
|
243
|
+
#### `StreamResultSchema`
|
|
244
|
+
|
|
245
|
+
```ts
|
|
246
|
+
export const StreamResultSchema = …
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
What `atlas report stream --format json` prints when its input ends.
|
|
250
|
+
|
|
251
|
+
#### `MergeResultSchema`
|
|
252
|
+
|
|
253
|
+
```ts
|
|
254
|
+
export const MergeResultSchema = …
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
What `atlas report merge --format json` prints.
|
|
258
|
+
|
|
259
|
+
#### `DoctorCheckSchema`
|
|
260
|
+
|
|
261
|
+
```ts
|
|
262
|
+
export const DoctorCheckSchema = …
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
One thing `atlas report doctor` checked about a store.
|
|
266
|
+
|
|
267
|
+
#### `DoctorResultSchema`
|
|
268
|
+
|
|
269
|
+
```ts
|
|
270
|
+
export const DoctorResultSchema = …
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
What `atlas report doctor --format json` prints.
|
|
274
|
+
|
|
275
|
+
#### `CommandErrorSchema`
|
|
276
|
+
|
|
277
|
+
```ts
|
|
278
|
+
export const CommandErrorSchema = …
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
What any `atlas` command prints on standard error, with `--format json`, when the command itself was wrong (exit code 2).
|
|
282
|
+
|
|
283
|
+
#### `InitSuiteSchema`
|
|
284
|
+
|
|
285
|
+
```ts
|
|
286
|
+
export const InitSuiteSchema = …
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
A test suite `atlas init` found, and the commands that run it and send its results.
|
|
290
|
+
|
|
291
|
+
#### `InitFileSchema`
|
|
292
|
+
|
|
293
|
+
```ts
|
|
294
|
+
export const InitFileSchema = …
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
A file `atlas init` creates or updates.
|
|
298
|
+
|
|
299
|
+
#### `InitPlanSchema`
|
|
300
|
+
|
|
301
|
+
```ts
|
|
302
|
+
export const InitPlanSchema = …
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
What `atlas init --format json` prints: everything found about the project, and everything it would change.
|
|
306
|
+
Without `--write` nothing is changed. With `--write`, the files are written and `written` says which.
|
|
307
|
+
|
|
308
|
+
### Shared statechart vocabulary
|
|
309
|
+
|
|
310
|
+
Source: `packages/schema/src/common.ts`
|
|
311
|
+
|
|
312
|
+
Small schemas and types used by both the run manifest (`manifest.ts`) and the spec formats (`spec.ts`): the status
|
|
313
|
+
of a run result, who sends an event, how sure a spec is, screenshot references, status tallies, the shape of a
|
|
314
|
+
reading problem, and the transition id convention. The statuses and kinds are written by `atlas run` and read by
|
|
315
|
+
the visualizer.
|
|
316
|
+
|
|
317
|
+
See docs/statecharts.md
|
|
318
|
+
|
|
319
|
+
#### `RUN_STATUSES`
|
|
320
|
+
|
|
321
|
+
```ts
|
|
322
|
+
export const RUN_STATUSES = …
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
Outcome of a state, transition, path or journey in a statechart run: `passed`, `failed`, `flaky` (failed on the
|
|
326
|
+
first attempt and passed on the retry) or `not-reached` (no path got there, or the path was blocked before it).
|
|
327
|
+
|
|
328
|
+
#### `RunStatusSchema`
|
|
329
|
+
|
|
330
|
+
```ts
|
|
331
|
+
export const RunStatusSchema = …
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
Zod enum over `RUN_STATUSES`.
|
|
335
|
+
|
|
336
|
+
#### `RunStatus`
|
|
337
|
+
|
|
338
|
+
```ts
|
|
339
|
+
export type RunStatus = z.infer<typeof RunStatusSchema>;
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
One of `RUN_STATUSES`.
|
|
343
|
+
|
|
344
|
+
#### `EVENT_KINDS`
|
|
345
|
+
|
|
346
|
+
```ts
|
|
347
|
+
export const EVENT_KINDS = …
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
Who or what sends an event: a person using the product (`user`), another system (`system`), the
|
|
351
|
+
passage of time (`time`), or a child chart handing control back to its parent (`hand-off`).
|
|
352
|
+
`member` is read as `user`, for specs written before the kinds were renamed.
|
|
353
|
+
|
|
354
|
+
#### `EventKindSchema`
|
|
355
|
+
|
|
356
|
+
```ts
|
|
357
|
+
export const EventKindSchema = …
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
Zod schema for an `EVENT_KINDS` value that first rewrites the legacy value `member` to `user`, so specs written
|
|
361
|
+
before the kinds were renamed still parse.
|
|
362
|
+
|
|
363
|
+
#### `EventKind`
|
|
364
|
+
|
|
365
|
+
```ts
|
|
366
|
+
export type EventKind = z.infer<typeof EventKindSchema>;
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
One of `EVENT_KINDS`.
|
|
370
|
+
|
|
371
|
+
#### `CONFIDENCES`
|
|
372
|
+
|
|
373
|
+
```ts
|
|
374
|
+
export const CONFIDENCES = …
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
How sure a spec is about a state's description (`meta.confidence`): `confirmed` or `assumed`. A run records
|
|
378
|
+
`assumed` for a state whose spec does not say.
|
|
379
|
+
|
|
380
|
+
#### `ConfidenceSchema`
|
|
381
|
+
|
|
382
|
+
```ts
|
|
383
|
+
export const ConfidenceSchema = …
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
Zod enum over `CONFIDENCES`.
|
|
387
|
+
|
|
388
|
+
#### `Confidence`
|
|
389
|
+
|
|
390
|
+
```ts
|
|
391
|
+
export type Confidence = z.infer<typeof ConfidenceSchema>;
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
One of `CONFIDENCES`.
|
|
395
|
+
|
|
396
|
+
#### `ImageSchema`
|
|
397
|
+
|
|
398
|
+
```ts
|
|
399
|
+
export const ImageSchema = …
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
A screenshot of a state in a run manifest: `png` and an optional `webp` thumbnail, as paths relative to the run
|
|
403
|
+
directory (the folder holding `manifest.json`), plus the other clients' screens at the same moment in a
|
|
404
|
+
multi-client run.
|
|
405
|
+
|
|
406
|
+
#### `Image`
|
|
407
|
+
|
|
408
|
+
```ts
|
|
409
|
+
export type Image = z.infer<typeof ImageSchema>;
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
A parsed `ImageSchema` value.
|
|
413
|
+
|
|
414
|
+
#### `CountSchema`
|
|
415
|
+
|
|
416
|
+
```ts
|
|
417
|
+
export const CountSchema = …
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
Tally of states or transitions by status: `total` and one count per `RUN_STATUSES` value (`notReached` for
|
|
421
|
+
`not-reached`). Used by manifest coverage and run summaries.
|
|
422
|
+
|
|
423
|
+
#### `Count`
|
|
424
|
+
|
|
425
|
+
```ts
|
|
426
|
+
export type Count = z.infer<typeof CountSchema>;
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
A parsed `CountSchema` value.
|
|
430
|
+
|
|
431
|
+
#### `ISSUE_SEVERITIES`
|
|
432
|
+
|
|
433
|
+
```ts
|
|
434
|
+
export const ISSUE_SEVERITIES = …
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
Severities of a `DataIssue`, most serious first: `error`, `warning`, `info`.
|
|
438
|
+
|
|
439
|
+
#### `IssueSeverity`
|
|
440
|
+
|
|
441
|
+
```ts
|
|
442
|
+
export type IssueSeverity = (typeof ISSUE_SEVERITIES)[number];
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
One of `ISSUE_SEVERITIES`.
|
|
446
|
+
|
|
447
|
+
#### `DataIssue`
|
|
448
|
+
|
|
449
|
+
```ts
|
|
450
|
+
export type DataIssue = {
|
|
451
|
+
severity: IssueSeverity;
|
|
452
|
+
file: string;
|
|
453
|
+
path: string;
|
|
454
|
+
message: string;
|
|
455
|
+
};
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
A problem found while reading a spec or manifest file, in words a non-engineer can read: how serious it is, which
|
|
459
|
+
file, where in the file (path segments joined with ` › `), and what is wrong. The visualizer shows these instead of
|
|
460
|
+
failing to load.
|
|
461
|
+
|
|
462
|
+
#### `TRANSITION_ID_SEPARATOR`
|
|
463
|
+
|
|
464
|
+
```ts
|
|
465
|
+
export const TRANSITION_ID_SEPARATOR = …
|
|
466
|
+
```
|
|
467
|
+
|
|
468
|
+
Separator inside a transition id (`<source state> :: <event>`). Ids are not escaped, so a state name containing it
|
|
469
|
+
makes an id ambiguous. The same value as core's `TRANSITION_SEPARATOR`.
|
|
470
|
+
|
|
471
|
+
#### `transitionId`
|
|
472
|
+
|
|
473
|
+
```ts
|
|
474
|
+
export function transitionId(source: string, event: string)
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
Builds the id of a transition, the key of `transitions` in a manifest: the source state's name,
|
|
478
|
+
`TRANSITION_ID_SEPARATOR`, then the event name.
|
|
479
|
+
|
|
480
|
+
### Schema package entry point (`@crvouga/atlas/schema`)
|
|
481
|
+
|
|
482
|
+
Source: `packages/schema/src/index.ts`. Import: `@crvouga/atlas/schema`
|
|
483
|
+
|
|
484
|
+
Re-exports every Zod schema, constant and inferred type of the Atlas contract: the layer format and report status
|
|
485
|
+
(`layer`), the statechart run manifest (`manifest`, `common`), the spec file formats (`spec`), the run index and
|
|
486
|
+
report sources the viewer reads (`runs-index`, `report-sources`) and the server configuration (`server-config`).
|
|
487
|
+
The JSON Schemas shipped in `schemas/` are generated from these by `bun run schemas`.
|
|
488
|
+
|
|
489
|
+
See docs/report-contract.md
|
|
490
|
+
|
|
491
|
+
### Layer document and report status schemas
|
|
492
|
+
|
|
493
|
+
Source: `packages/schema/src/layer.ts`
|
|
494
|
+
|
|
495
|
+
The stable evidence format. A layer is the one unit of evidence every producer writes and every reader combines;
|
|
496
|
+
this module also holds the input a producer hands to the publisher (`PublishChecksSchema`), the spec set a report is
|
|
497
|
+
laid over (`SpecSetSchema`) and the JSON `atlas report status` prints (`ReportStatusSchema`). Reports are never
|
|
498
|
+
stored
|
|
499
|
+
as a whole; they are computed by layering.
|
|
500
|
+
|
|
501
|
+
A layer is one focused recording: the checks one producer ran, on one environment, from one
|
|
502
|
+
version and branch. It is immutable and addressed by its content.
|
|
503
|
+
|
|
504
|
+
Compatibility, which is the point of this file:
|
|
505
|
+
- Within a schema major version a change only adds optional fields. Readers ignore fields they
|
|
506
|
+
do not know (every object here is loose), so an old reader reads a newer minor layer.
|
|
507
|
+
- The closed enumerations (`status`, `freshness`) change only with a new major version.
|
|
508
|
+
- `schemaVersion` is the major version. A reader that is older than a layer says so; it never
|
|
509
|
+
guesses.
|
|
510
|
+
|
|
511
|
+
Extensibility, which is what makes one format fit any test framework (docs/extending.md):
|
|
512
|
+
- Evidence is open. Beyond its outcome a check may carry attachments of any media type, timeline
|
|
513
|
+
steps, annotations, retry attempts, tags, labels, links and namespaced `extensions`. Every one of
|
|
514
|
+
them is optional, so a layer without them is as valid as it ever was.
|
|
515
|
+
- Vocabularies are open strings (`role`, `kind`, `type`, `level`, a step's `status`). The values
|
|
516
|
+
documented here are conventions, not a list: a reader shows what it does not know in a generic way.
|
|
517
|
+
- `extensions` is where a producer or a tool puts structured data of its own, under a key it owns
|
|
518
|
+
(`com.example.coverage`). Readers keep it and never fail on it.
|
|
519
|
+
- Evidence never decides a result. A reader that cannot read a piece of evidence drops that piece and
|
|
520
|
+
keeps the check, its status and its place in the report.
|
|
521
|
+
|
|
522
|
+
See docs/report-contract.md
|
|
523
|
+
See docs/extending.md
|
|
524
|
+
|
|
525
|
+
#### `LAYER_SCHEMA_VERSION`
|
|
526
|
+
|
|
527
|
+
```ts
|
|
528
|
+
export const LAYER_SCHEMA_VERSION = …
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+
The major version of the layer format, written as `schemaVersion` in every layer. `parseLayerDocument` reads a
|
|
532
|
+
layer without the field as this version and refuses any other.
|
|
533
|
+
|
|
534
|
+
#### `CHECK_STATUSES`
|
|
535
|
+
|
|
536
|
+
```ts
|
|
537
|
+
export const CHECK_STATUSES = …
|
|
538
|
+
```
|
|
539
|
+
|
|
540
|
+
Outcomes of a check. Anything not `passed` is not evidence of success.
|
|
541
|
+
|
|
542
|
+
#### `CheckStatusSchema`
|
|
543
|
+
|
|
544
|
+
```ts
|
|
545
|
+
export const CheckStatusSchema = …
|
|
546
|
+
```
|
|
547
|
+
|
|
548
|
+
Zod enum over `CHECK_STATUSES`, the closed vocabulary of a check's and an attempt's `status`. It changes only with
|
|
549
|
+
a new `schemaVersion`.
|
|
550
|
+
|
|
551
|
+
#### `CheckStatus`
|
|
552
|
+
|
|
553
|
+
```ts
|
|
554
|
+
export type CheckStatus = z.infer<typeof CheckStatusSchema>;
|
|
555
|
+
```
|
|
556
|
+
|
|
557
|
+
One of `CHECK_STATUSES`: `passed` and `failed` are completed results; `running` and `not-run` are unfinished and
|
|
558
|
+
never count as a pass.
|
|
559
|
+
|
|
560
|
+
#### `FRESHNESS`
|
|
561
|
+
|
|
562
|
+
```ts
|
|
563
|
+
export const FRESHNESS = …
|
|
564
|
+
```
|
|
565
|
+
|
|
566
|
+
Why a layer's origin is advisory: `modified` (recorded from a checkout with uncommitted changes) or `unknown`
|
|
567
|
+
(origin not captured). Absent on a layer from a clean commit. It never changes a status. A closed vocabulary: it
|
|
568
|
+
changes only with a new `schemaVersion`.
|
|
569
|
+
|
|
570
|
+
#### `MeasurementSchema`
|
|
571
|
+
|
|
572
|
+
```ts
|
|
573
|
+
export const MeasurementSchema = …
|
|
574
|
+
```
|
|
575
|
+
|
|
576
|
+
A number a check measured, such as a latency or a size, with its unit and an optional allowance. A measurement over
|
|
577
|
+
its `limit` is reported and never changes the check's status.
|
|
578
|
+
|
|
579
|
+
#### `ExtensionsSchema`
|
|
580
|
+
|
|
581
|
+
```ts
|
|
582
|
+
export const ExtensionsSchema = …
|
|
583
|
+
```
|
|
584
|
+
|
|
585
|
+
Structured data of a producer's or tool's own, by namespace: `{ "com.example.coverage": { … } }`.
|
|
586
|
+
Use a name you own (a reverse domain, or your tool's name). Readers preserve it and never fail on it.
|
|
587
|
+
|
|
588
|
+
#### `LinkSchema`
|
|
589
|
+
|
|
590
|
+
```ts
|
|
591
|
+
export const LinkSchema = …
|
|
592
|
+
```
|
|
593
|
+
|
|
594
|
+
A link attached to a layer, part, check or annotation: a URL, an optional name and why it is linked.
|
|
595
|
+
|
|
596
|
+
#### `MomentSchema`
|
|
597
|
+
|
|
598
|
+
```ts
|
|
599
|
+
export const MomentSchema = …
|
|
600
|
+
```
|
|
601
|
+
|
|
602
|
+
Where in a check something happened: at a step, and/or this long after the check started.
|
|
603
|
+
|
|
604
|
+
#### `AttachmentSchema`
|
|
605
|
+
|
|
606
|
+
```ts
|
|
607
|
+
export const AttachmentSchema = …
|
|
608
|
+
```
|
|
609
|
+
|
|
610
|
+
A file or a value that goes with a result: a screenshot, a video, a trace, a log, a DOM or accessibility
|
|
611
|
+
snapshot, a HAR, a coverage report, a diff, anything. `contentType` says how to read it; `role` says what
|
|
612
|
+
it is for, in an open vocabulary (`screenshot`, `video`, `trace`, `log`, `snapshot`, `har`, `coverage`,
|
|
613
|
+
`diff`, `report`…). The bytes are in the layer (`bundleKey`), somewhere else (`uri`), or small enough to
|
|
614
|
+
sit inline (`text`).
|
|
615
|
+
|
|
616
|
+
#### `Attachment`
|
|
617
|
+
|
|
618
|
+
```ts
|
|
619
|
+
export type Attachment = z.output<typeof AttachmentSchema>;
|
|
620
|
+
```
|
|
621
|
+
|
|
622
|
+
An attachment as stored in a layer, parsed from `AttachmentSchema`.
|
|
623
|
+
|
|
624
|
+
#### `AnnotationSchema`
|
|
625
|
+
|
|
626
|
+
```ts
|
|
627
|
+
export const AnnotationSchema = …
|
|
628
|
+
```
|
|
629
|
+
|
|
630
|
+
A note about a result: a warning, a deprecation, a coverage figure, an accessibility finding, anything.
|
|
631
|
+
|
|
632
|
+
#### `Annotation`
|
|
633
|
+
|
|
634
|
+
```ts
|
|
635
|
+
export type Annotation = z.output<typeof AnnotationSchema>;
|
|
636
|
+
```
|
|
637
|
+
|
|
638
|
+
An annotation as stored in a layer, parsed from `AnnotationSchema`.
|
|
639
|
+
|
|
640
|
+
#### `StepSchema`
|
|
641
|
+
|
|
642
|
+
```ts
|
|
643
|
+
export const StepSchema = …
|
|
644
|
+
```
|
|
645
|
+
|
|
646
|
+
One entry on a check's timeline. Steps are a flat list: nest them with `parentId`, order them by
|
|
647
|
+
`offsetMs`. Whatever a framework calls its steps (actions, hooks, requests, spans), they fit.
|
|
648
|
+
|
|
649
|
+
#### `Step`
|
|
650
|
+
|
|
651
|
+
```ts
|
|
652
|
+
export type Step = z.output<typeof StepSchema>;
|
|
653
|
+
```
|
|
654
|
+
|
|
655
|
+
A timeline step as stored in a layer, parsed from `StepSchema`.
|
|
656
|
+
|
|
657
|
+
#### `AttemptSchema`
|
|
658
|
+
|
|
659
|
+
```ts
|
|
660
|
+
export const AttemptSchema = …
|
|
661
|
+
```
|
|
662
|
+
|
|
663
|
+
One try of a check that was retried. The check's own status is the last one.
|
|
664
|
+
|
|
665
|
+
#### `Attempt`
|
|
666
|
+
|
|
667
|
+
```ts
|
|
668
|
+
export type Attempt = z.output<typeof AttemptSchema>;
|
|
669
|
+
```
|
|
670
|
+
|
|
671
|
+
A retry attempt as stored in a layer, parsed from `AttemptSchema`.
|
|
672
|
+
|
|
673
|
+
#### `CheckSchema`
|
|
674
|
+
|
|
675
|
+
```ts
|
|
676
|
+
export const CheckSchema = …
|
|
677
|
+
```
|
|
678
|
+
|
|
679
|
+
One check: the unit that has a status, such as a Gherkin scenario, a test case or a lint rule. Its `id` is stable
|
|
680
|
+
across layers; with the layer's producer, the part's kind, the spec, the environment and the parameters it names
|
|
681
|
+
the slot a result fills, and the newest completed result of a slot wins. It carries the outcome (`status`,
|
|
682
|
+
`detail`, `measurements`) and, optionally, evidence (tags, labels, links, attachments, annotations, steps,
|
|
683
|
+
attempts, extensions) that never decides the result.
|
|
684
|
+
|
|
685
|
+
#### `Check`
|
|
686
|
+
|
|
687
|
+
```ts
|
|
688
|
+
export type Check = z.output<typeof CheckSchema>;
|
|
689
|
+
```
|
|
690
|
+
|
|
691
|
+
A check as stored in a layer, parsed from `CheckSchema`.
|
|
692
|
+
|
|
693
|
+
#### `SpecEntrySchema`
|
|
694
|
+
|
|
695
|
+
```ts
|
|
696
|
+
export const SpecEntrySchema = …
|
|
697
|
+
```
|
|
698
|
+
|
|
699
|
+
A spec a layer was recorded against: its path, domain, kind and title, and an advisory fingerprint of its text so a
|
|
700
|
+
reader can warn when the spec changed since.
|
|
701
|
+
|
|
702
|
+
#### `ReportPartSchema`
|
|
703
|
+
|
|
704
|
+
```ts
|
|
705
|
+
export const ReportPartSchema = …
|
|
706
|
+
```
|
|
707
|
+
|
|
708
|
+
A group of checks inside a layer, with an open `kind` (`behavior`, `performance`, `accessibility`…) that is part of
|
|
709
|
+
the slot a check fills. `publishChecks` writes a layer with one part. Parts may carry evidence of their own.
|
|
710
|
+
|
|
711
|
+
#### `LayerSourceSchema`
|
|
712
|
+
|
|
713
|
+
```ts
|
|
714
|
+
export const LayerSourceSchema = …
|
|
715
|
+
```
|
|
716
|
+
|
|
717
|
+
A suite that recorded timelines and captured files, beside its checks. Absent for a layer of plain checks.
|
|
718
|
+
|
|
719
|
+
#### `RecordingAddressSchema`
|
|
720
|
+
|
|
721
|
+
```ts
|
|
722
|
+
export const RecordingAddressSchema = …
|
|
723
|
+
```
|
|
724
|
+
|
|
725
|
+
Where the recorded tests of a suite live in the store: in the layer's own bundle (`layer`), or at the older address
|
|
726
|
+
of a commit and a source name (`commit`).
|
|
727
|
+
|
|
728
|
+
#### `BundleIndexSchema`
|
|
729
|
+
|
|
730
|
+
```ts
|
|
731
|
+
export const BundleIndexSchema = …
|
|
732
|
+
```
|
|
733
|
+
|
|
734
|
+
The captured files of a layer by file key (`attachments/<sha256>` for attachments): each file's media type and the
|
|
735
|
+
byte ranges (`blob` store key, `offset` and `size` in the decompressed blob) whose concatenation is the file.
|
|
736
|
+
Written last when a layer is published.
|
|
737
|
+
|
|
738
|
+
#### `LAYER_ID`
|
|
739
|
+
|
|
740
|
+
```ts
|
|
741
|
+
export const LAYER_ID = …
|
|
742
|
+
```
|
|
743
|
+
|
|
744
|
+
Pattern of a layer id, a spec-set id or a content digest: 64 lowercase hexadecimal digits (a SHA-256).
|
|
745
|
+
|
|
746
|
+
#### `LayerDocumentSchema`
|
|
747
|
+
|
|
748
|
+
```ts
|
|
749
|
+
export const LayerDocumentSchema = …
|
|
750
|
+
```
|
|
751
|
+
|
|
752
|
+
`layers/manifests/<id>.json`. The id is the SHA-256 of the document without it, so two producers
|
|
753
|
+
that record the same thing write the same layer, and a retried publish changes nothing.
|
|
754
|
+
|
|
755
|
+
#### `LayerDocument`
|
|
756
|
+
|
|
757
|
+
```ts
|
|
758
|
+
export type LayerDocument = z.output<typeof LayerDocumentSchema>;
|
|
759
|
+
```
|
|
760
|
+
|
|
761
|
+
A layer as a reader holds it: the output of `LayerDocumentSchema`, with defaults applied.
|
|
762
|
+
|
|
763
|
+
#### `ParsedLayer`
|
|
764
|
+
|
|
765
|
+
```ts
|
|
766
|
+
export type ParsedLayer = { readonly ok: true; readonly layer: LayerDocument } | { readonly ok: false; readonly reason: string };
|
|
767
|
+
```
|
|
768
|
+
|
|
769
|
+
The outcome of `parseLayerDocument`: the layer, or the reason it could not be read.
|
|
770
|
+
|
|
771
|
+
#### `parseLayerDocument`
|
|
772
|
+
|
|
773
|
+
```ts
|
|
774
|
+
export function parseLayerDocument(raw: unknown): ParsedLayer
|
|
775
|
+
```
|
|
776
|
+
|
|
777
|
+
Reads a layer manifest of any age and returns it, or the reason it cannot be read; it never throws. Layers written
|
|
778
|
+
before `schemaVersion` existed are version 1. A layer of a newer major version is refused by name ("Upgrade
|
|
779
|
+
|
|
780
|
+
See /report-contract.md
|
|
781
|
+
|
|
782
|
+
**Example**
|
|
783
|
+
|
|
784
|
+
```ts
|
|
785
|
+
import { parseLayerDocument } from '@crvouga/atlas/schema';
|
|
786
|
+
|
|
787
|
+
const parsed = parseLayerDocument(JSON.parse(text));
|
|
788
|
+
if (!parsed.ok) throw new Error(parsed.reason);
|
|
789
|
+
for (const part of parsed.layer.parts) console.log(part.kind, part.checks.length);
|
|
790
|
+
```
|
|
791
|
+
|
|
792
|
+
#### `AttachmentInputSchema`
|
|
793
|
+
|
|
794
|
+
```ts
|
|
795
|
+
export const AttachmentInputSchema = …
|
|
796
|
+
```
|
|
797
|
+
|
|
798
|
+
An attachment as a producer hands it over, before the publisher stores its bytes. Give the bytes as
|
|
799
|
+
`path` (a file, read by the CLI), `base64`, `data` (from code), or `text`; the publisher stores them in
|
|
800
|
+
the layer, fills in `bundleKey`, `bytes` and `sha256`, and removes these four.
|
|
801
|
+
|
|
802
|
+
#### `PublishChecksSchema`
|
|
803
|
+
|
|
804
|
+
```ts
|
|
805
|
+
export const PublishChecksSchema = …
|
|
806
|
+
```
|
|
807
|
+
|
|
808
|
+
The checks of a layer as a producer hands them to the publisher (`publishChecks`, `atlas report publish --checks`),
|
|
809
|
+
before the publisher fills in the rest: `id`, `schemaVersion`, the part around the checks and the bundle of
|
|
810
|
+
attachment bytes. It is the whole integration surface of a producer that has no timelines to record. `kind` names
|
|
811
|
+
the part and defaults to `checks`. Attachments may carry their bytes (`AttachmentInputSchema`). Emitted as
|
|
812
|
+
`publish-checks.schema.json`.
|
|
813
|
+
|
|
814
|
+
#### `PublishChecksInput`
|
|
815
|
+
|
|
816
|
+
```ts
|
|
817
|
+
export type PublishChecksInput = z.input<typeof PublishChecksSchema>;
|
|
818
|
+
```
|
|
819
|
+
|
|
820
|
+
What a caller passes to `publishChecks`: the input type of `PublishChecksSchema`, before defaults.
|
|
821
|
+
|
|
822
|
+
#### `REPORT_STATUS_SCHEMA_VERSION`
|
|
823
|
+
|
|
824
|
+
```ts
|
|
825
|
+
export const REPORT_STATUS_SCHEMA_VERSION = …
|
|
826
|
+
```
|
|
827
|
+
|
|
828
|
+
The `schemaVersion` of the `ReportStatus` JSON, currently 1.
|
|
829
|
+
|
|
830
|
+
#### `ReportStatusSchema`
|
|
831
|
+
|
|
832
|
+
```ts
|
|
833
|
+
export const ReportStatusSchema = …
|
|
834
|
+
```
|
|
835
|
+
|
|
836
|
+
What `atlas report status --format json` prints: the combined report in numbers, and whether it
|
|
837
|
+
passes. `ok` is the gate: nothing failed, nothing is still running, nothing could not be read,
|
|
838
|
+
and every required environment has results.
|
|
839
|
+
|
|
840
|
+
#### `ReportStatus`
|
|
841
|
+
|
|
842
|
+
```ts
|
|
843
|
+
export type ReportStatus = z.output<typeof ReportStatusSchema>;
|
|
844
|
+
```
|
|
845
|
+
|
|
846
|
+
A parsed `ReportStatusSchema` value.
|
|
847
|
+
|
|
848
|
+
#### `SpecSetSchema`
|
|
849
|
+
|
|
850
|
+
```ts
|
|
851
|
+
export const SpecSetSchema = …
|
|
852
|
+
```
|
|
853
|
+
|
|
854
|
+
The specs of one version of a project, as published: what the report is laid over. Layers of
|
|
855
|
+
evidence say what ran; a spec set says what the specs were. Like layers, spec sets are immutable and
|
|
856
|
+
never replace each other: the node shows the newest one of the branch you choose.
|
|
857
|
+
|
|
858
|
+
#### `SpecSet`
|
|
859
|
+
|
|
860
|
+
```ts
|
|
861
|
+
export type SpecSet = z.output<typeof SpecSetSchema>;
|
|
862
|
+
```
|
|
863
|
+
|
|
864
|
+
A parsed `SpecSetSchema` value.
|
|
865
|
+
|
|
866
|
+
### Statechart run manifest schemas
|
|
867
|
+
|
|
868
|
+
Source: `packages/schema/src/manifest.ts`
|
|
869
|
+
|
|
870
|
+
Zod schemas for `runs/<run-id>/manifest.json`, the file `atlas run` writes for one run of a statechart spec: run
|
|
871
|
+
info, the map of states and edges, one record per state, transition, path, journey and seed, the timeline and
|
|
872
|
+
business events observed, and coverage. The envelope keeps each section `unknown` so a reader can validate every
|
|
873
|
+
record on its own and keep the ones that parse (the visualizer's `parse/manifest.ts` does). Within a
|
|
874
|
+
`schemaVersion` only optional fields are added. A run is published into the layered report with `atlas report
|
|
875
|
+
publish --manifest`.
|
|
876
|
+
|
|
877
|
+
See docs/statecharts.md
|
|
878
|
+
See docs/report-contract.md
|
|
879
|
+
|
|
880
|
+
#### `MANIFEST_SCHEMA_VERSIONS`
|
|
881
|
+
|
|
882
|
+
```ts
|
|
883
|
+
export const MANIFEST_SCHEMA_VERSIONS = …
|
|
884
|
+
```
|
|
885
|
+
|
|
886
|
+
Manifest schema versions this package describes. Readers accept these and try newer ones.
|
|
887
|
+
|
|
888
|
+
#### `LATEST_MANIFEST_SCHEMA_VERSION`
|
|
889
|
+
|
|
890
|
+
```ts
|
|
891
|
+
export const LATEST_MANIFEST_SCHEMA_VERSION = …
|
|
892
|
+
```
|
|
893
|
+
|
|
894
|
+
The newest manifest `schemaVersion` this package describes. The visualizer reads a manifest without a version as
|
|
895
|
+
this one, and reads a newer one as far as it understands it.
|
|
896
|
+
|
|
897
|
+
#### `MEDIA_STATES`
|
|
898
|
+
|
|
899
|
+
```ts
|
|
900
|
+
export const MEDIA_STATES = …
|
|
901
|
+
```
|
|
902
|
+
|
|
903
|
+
Whether a screenshot or clip a run promised is `ready`, still `processing` or `failed`. Absent means ready.
|
|
904
|
+
|
|
905
|
+
#### `MediaStateSchema`
|
|
906
|
+
|
|
907
|
+
```ts
|
|
908
|
+
export const MediaStateSchema = …
|
|
909
|
+
```
|
|
910
|
+
|
|
911
|
+
Proposed: the runner marks media it has promised but not finished writing, so a viewer can
|
|
912
|
+
show "still processing" instead of a broken image. Absent means ready.
|
|
913
|
+
|
|
914
|
+
#### `TIMELINE_KINDS`
|
|
915
|
+
|
|
916
|
+
```ts
|
|
917
|
+
export const TIMELINE_KINDS = …
|
|
918
|
+
```
|
|
919
|
+
|
|
920
|
+
Kinds of `TimelineEntry` a driver records during a transition: `tap`, `type`, `system` (a call to or from another
|
|
921
|
+
system), `screen` (the screen changed), `toast`, `note`, `time` (a clock jump), `notification`. A reader shows a
|
|
922
|
+
kind it does not know as a `note`.
|
|
923
|
+
|
|
924
|
+
#### `SystemCallSchema`
|
|
925
|
+
|
|
926
|
+
```ts
|
|
927
|
+
export const SystemCallSchema = …
|
|
928
|
+
```
|
|
929
|
+
|
|
930
|
+
A call between the product and another system during a transition, recorded on a `system` timeline entry: source,
|
|
931
|
+
endpoint, event type, payload and response. The HTTP driver records these.
|
|
932
|
+
|
|
933
|
+
#### `TimeJumpSchema`
|
|
934
|
+
|
|
935
|
+
```ts
|
|
936
|
+
export const TimeJumpSchema = …
|
|
937
|
+
```
|
|
938
|
+
|
|
939
|
+
Proposed `kind: time`: a clock jump, with the dates before and after.
|
|
940
|
+
|
|
941
|
+
#### `NotificationSchema`
|
|
942
|
+
|
|
943
|
+
```ts
|
|
944
|
+
export const NotificationSchema = …
|
|
945
|
+
```
|
|
946
|
+
|
|
947
|
+
Proposed `kind: notification`: a push, email or text the member received.
|
|
948
|
+
|
|
949
|
+
#### `TimelineEntrySchema`
|
|
950
|
+
|
|
951
|
+
```ts
|
|
952
|
+
export const TimelineEntrySchema = …
|
|
953
|
+
```
|
|
954
|
+
|
|
955
|
+
One moment in a transition's timeline: what happened (`kind`, `label`), when (`atMs` from the start of the clip)
|
|
956
|
+
and the details that go with the kind. The timeline becomes the captions of the transition's clip.
|
|
957
|
+
|
|
958
|
+
#### `TimelineEntry`
|
|
959
|
+
|
|
960
|
+
```ts
|
|
961
|
+
export type TimelineEntry = z.infer<typeof TimelineEntrySchema>;
|
|
962
|
+
```
|
|
963
|
+
|
|
964
|
+
A parsed `TimelineEntrySchema` value.
|
|
965
|
+
|
|
966
|
+
#### `CloudEventSchema`
|
|
967
|
+
|
|
968
|
+
```ts
|
|
969
|
+
export const CloudEventSchema = …
|
|
970
|
+
```
|
|
971
|
+
|
|
972
|
+
A CloudEvents 1.0 event (JSON format), as an event source observed it.
|
|
973
|
+
|
|
974
|
+
#### `CloudEvent`
|
|
975
|
+
|
|
976
|
+
```ts
|
|
977
|
+
export type CloudEvent = z.infer<typeof CloudEventSchema>;
|
|
978
|
+
```
|
|
979
|
+
|
|
980
|
+
A parsed `CloudEventSchema` value.
|
|
981
|
+
|
|
982
|
+
#### `BusinessEventsSchema`
|
|
983
|
+
|
|
984
|
+
```ts
|
|
985
|
+
export const BusinessEventsSchema = …
|
|
986
|
+
```
|
|
987
|
+
|
|
988
|
+
The business events a state expects (from `meta.events`) against what event sources observed while the step ran:
|
|
989
|
+
`expected`, `observed`, `missing`, and `noSignal` for those with no observable signal mapped.
|
|
990
|
+
|
|
991
|
+
#### `BusinessEvents`
|
|
992
|
+
|
|
993
|
+
```ts
|
|
994
|
+
export type BusinessEvents = z.infer<typeof BusinessEventsSchema>;
|
|
995
|
+
```
|
|
996
|
+
|
|
997
|
+
A parsed `BusinessEventsSchema` value.
|
|
998
|
+
|
|
999
|
+
#### `CheckResultSchema`
|
|
1000
|
+
|
|
1001
|
+
```ts
|
|
1002
|
+
export const CheckResultSchema = …
|
|
1003
|
+
```
|
|
1004
|
+
|
|
1005
|
+
The result of one item of a state's `meta.checks`: its text, whether it held, and what was expected and seen when
|
|
1006
|
+
it did not. A failed check fails the state.
|
|
1007
|
+
|
|
1008
|
+
#### `CheckResult`
|
|
1009
|
+
|
|
1010
|
+
```ts
|
|
1011
|
+
export type CheckResult = z.infer<typeof CheckResultSchema>;
|
|
1012
|
+
```
|
|
1013
|
+
|
|
1014
|
+
A parsed `CheckResultSchema` value.
|
|
1015
|
+
|
|
1016
|
+
#### `RecognizerSchema`
|
|
1017
|
+
|
|
1018
|
+
```ts
|
|
1019
|
+
export const RecognizerSchema = …
|
|
1020
|
+
```
|
|
1021
|
+
|
|
1022
|
+
What a state's recogniser saw: whether the state matched, and each signal with what was expected (visible or
|
|
1023
|
+
hidden) and whether it was visible.
|
|
1024
|
+
|
|
1025
|
+
#### `RunInfoSchema`
|
|
1026
|
+
|
|
1027
|
+
```ts
|
|
1028
|
+
export const RunInfoSchema = …
|
|
1029
|
+
```
|
|
1030
|
+
|
|
1031
|
+
The `run` section of a manifest: identity, timing and provenance of the run (id, start and finish, commit, branch,
|
|
1032
|
+
environment, mode), the spec version and directory, how far it has got, and how the plan was split, scoped, reused
|
|
1033
|
+
or merged.
|
|
1034
|
+
|
|
1035
|
+
#### `RunInfo`
|
|
1036
|
+
|
|
1037
|
+
```ts
|
|
1038
|
+
export type RunInfo = z.infer<typeof RunInfoSchema>;
|
|
1039
|
+
```
|
|
1040
|
+
|
|
1041
|
+
A parsed `RunInfoSchema` value.
|
|
1042
|
+
|
|
1043
|
+
#### `ManifestChartSchema`
|
|
1044
|
+
|
|
1045
|
+
```ts
|
|
1046
|
+
export const ManifestChartSchema = …
|
|
1047
|
+
```
|
|
1048
|
+
|
|
1049
|
+
A chart that took part in the run: its id, spec file and description, the state of its parent that invokes it, and,
|
|
1050
|
+
for each of its final states, the hand-off event its parent receives.
|
|
1051
|
+
|
|
1052
|
+
#### `MapNodeSchema`
|
|
1053
|
+
|
|
1054
|
+
```ts
|
|
1055
|
+
export const MapNodeSchema = …
|
|
1056
|
+
```
|
|
1057
|
+
|
|
1058
|
+
A state in the map of the composed product: id, parent state, chart, type, initial child, and whether it is inside
|
|
1059
|
+
the scope of the run.
|
|
1060
|
+
|
|
1061
|
+
#### `MapEdgeSchema`
|
|
1062
|
+
|
|
1063
|
+
```ts
|
|
1064
|
+
export const MapEdgeSchema = …
|
|
1065
|
+
```
|
|
1066
|
+
|
|
1067
|
+
A transition in the map: its id (see `transitionId`), source and target state names (the target is empty when the
|
|
1068
|
+
event leads nowhere), the event, who sends it, and whether it is inside the scope of the run.
|
|
1069
|
+
|
|
1070
|
+
#### `StateRecordSchema`
|
|
1071
|
+
|
|
1072
|
+
```ts
|
|
1073
|
+
export const StateRecordSchema = …
|
|
1074
|
+
```
|
|
1075
|
+
|
|
1076
|
+
The result for one state: what the spec says about it (description, snapshot, confidence, sources, expected
|
|
1077
|
+
events), whether the run reached it, its screenshots, what the recogniser saw, the business events and
|
|
1078
|
+
`meta.checks` results, and the paths that reached it.
|
|
1079
|
+
|
|
1080
|
+
#### `StateRecord`
|
|
1081
|
+
|
|
1082
|
+
```ts
|
|
1083
|
+
export type StateRecord = z.infer<typeof StateRecordSchema>;
|
|
1084
|
+
```
|
|
1085
|
+
|
|
1086
|
+
A parsed `StateRecordSchema` value.
|
|
1087
|
+
|
|
1088
|
+
#### `ClipSchema`
|
|
1089
|
+
|
|
1090
|
+
```ts
|
|
1091
|
+
export const ClipSchema = …
|
|
1092
|
+
```
|
|
1093
|
+
|
|
1094
|
+
A video of one transition: `video` and `poster` as paths relative to the run directory, its duration, and which
|
|
1095
|
+
client's screen it shows.
|
|
1096
|
+
|
|
1097
|
+
#### `Clip`
|
|
1098
|
+
|
|
1099
|
+
```ts
|
|
1100
|
+
export type Clip = z.infer<typeof ClipSchema>;
|
|
1101
|
+
```
|
|
1102
|
+
|
|
1103
|
+
A parsed `ClipSchema` value.
|
|
1104
|
+
|
|
1105
|
+
#### `TransitionRecordSchema`
|
|
1106
|
+
|
|
1107
|
+
```ts
|
|
1108
|
+
export const TransitionRecordSchema = …
|
|
1109
|
+
```
|
|
1110
|
+
|
|
1111
|
+
The result for one transition (an event leaving a state): source, target, event, who sends it, how the
|
|
1112
|
+
implementation makes it happen, its status, clip and timeline, why it was not reached, and the paths that took it.
|
|
1113
|
+
Keyed in a manifest by its id (see `transitionId`).
|
|
1114
|
+
|
|
1115
|
+
#### `TransitionRecord`
|
|
1116
|
+
|
|
1117
|
+
```ts
|
|
1118
|
+
export type TransitionRecord = z.infer<typeof TransitionRecordSchema>;
|
|
1119
|
+
```
|
|
1120
|
+
|
|
1121
|
+
A parsed `TransitionRecordSchema` value.
|
|
1122
|
+
|
|
1123
|
+
#### `PathStepSchema`
|
|
1124
|
+
|
|
1125
|
+
```ts
|
|
1126
|
+
export const PathStepSchema = …
|
|
1127
|
+
```
|
|
1128
|
+
|
|
1129
|
+
One step of a path: the event, the transition it takes and its outcome, with the reason when it was not reached.
|
|
1130
|
+
|
|
1131
|
+
#### `PathRecordSchema`
|
|
1132
|
+
|
|
1133
|
+
```ts
|
|
1134
|
+
export const PathRecordSchema = …
|
|
1135
|
+
```
|
|
1136
|
+
|
|
1137
|
+
The result for one planned path: a curated `journey` or a `generated` path covering transitions. It holds the
|
|
1138
|
+
status, every attempt (a failed first attempt is retried once unless retries are off), the steps and where it
|
|
1139
|
+
stopped, and the identity (`key`), start states and seed that let results from different runs compose.
|
|
1140
|
+
|
|
1141
|
+
#### `PathRecord`
|
|
1142
|
+
|
|
1143
|
+
```ts
|
|
1144
|
+
export type PathRecord = z.infer<typeof PathRecordSchema>;
|
|
1145
|
+
```
|
|
1146
|
+
|
|
1147
|
+
A parsed `PathRecordSchema` value.
|
|
1148
|
+
|
|
1149
|
+
#### `JourneyRecordSchema`
|
|
1150
|
+
|
|
1151
|
+
```ts
|
|
1152
|
+
export const JourneyRecordSchema = …
|
|
1153
|
+
```
|
|
1154
|
+
|
|
1155
|
+
A journey's result, composed from the paths it is cut into (one per seeded stretch).
|
|
1156
|
+
|
|
1157
|
+
#### `JourneyRecord`
|
|
1158
|
+
|
|
1159
|
+
```ts
|
|
1160
|
+
export type JourneyRecord = z.infer<typeof JourneyRecordSchema>;
|
|
1161
|
+
```
|
|
1162
|
+
|
|
1163
|
+
A parsed `JourneyRecordSchema` value.
|
|
1164
|
+
|
|
1165
|
+
#### `SeedRecordSchema`
|
|
1166
|
+
|
|
1167
|
+
```ts
|
|
1168
|
+
export const SeedRecordSchema = …
|
|
1169
|
+
```
|
|
1170
|
+
|
|
1171
|
+
A configuration the implementation can put the system in directly, and what checks it.
|
|
1172
|
+
|
|
1173
|
+
#### `SeedRecord`
|
|
1174
|
+
|
|
1175
|
+
```ts
|
|
1176
|
+
export type SeedRecord = z.infer<typeof SeedRecordSchema>;
|
|
1177
|
+
```
|
|
1178
|
+
|
|
1179
|
+
A parsed `SeedRecordSchema` value.
|
|
1180
|
+
|
|
1181
|
+
#### `ReportsSchema`
|
|
1182
|
+
|
|
1183
|
+
```ts
|
|
1184
|
+
export const ReportsSchema = …
|
|
1185
|
+
```
|
|
1186
|
+
|
|
1187
|
+
Other formats the run wrote, relative to the manifest: JUnit XML, CTRF JSON, Mermaid.
|
|
1188
|
+
|
|
1189
|
+
#### `PrivacySchema`
|
|
1190
|
+
|
|
1191
|
+
```ts
|
|
1192
|
+
export const PrivacySchema = …
|
|
1193
|
+
```
|
|
1194
|
+
|
|
1195
|
+
Result of the privacy scan of a run: whether it passed and what it found. Media of a run whose scan did not pass
|
|
1196
|
+
are not uploaded with `--upload-run`.
|
|
1197
|
+
|
|
1198
|
+
#### `ManifestEnvelopeSchema`
|
|
1199
|
+
|
|
1200
|
+
```ts
|
|
1201
|
+
export const ManifestEnvelopeSchema = …
|
|
1202
|
+
```
|
|
1203
|
+
|
|
1204
|
+
The top level of `runs/<run-id>/manifest.json`. Sections are `unknown` here so a reader can
|
|
1205
|
+
validate each record on its own and keep the valid ones; the record schemas above are the
|
|
1206
|
+
contract for each entry.
|
|
1207
|
+
|
|
1208
|
+
### Report sources and change notices
|
|
1209
|
+
|
|
1210
|
+
Source: `packages/schema/src/report-sources.ts`
|
|
1211
|
+
|
|
1212
|
+
The files and events the viewer uses to find runs. `ReportSourcesSchema` validates the sources file named by
|
|
1213
|
+
`ATLAS_SOURCES_FILE`, which lists extra places to read runs from (a directory, or another host over HTTP).
|
|
1214
|
+
`AtlasChangeSchema` is the payload of the `atlas:change` event that tells a live viewer that specs or runs changed.
|
|
1215
|
+
Both are read by the visualizer; the server sends the change notice.
|
|
1216
|
+
|
|
1217
|
+
See docs/report-backends.md
|
|
1218
|
+
|
|
1219
|
+
#### `RemoteReportSourceSchema`
|
|
1220
|
+
|
|
1221
|
+
```ts
|
|
1222
|
+
export const RemoteReportSourceSchema = …
|
|
1223
|
+
```
|
|
1224
|
+
|
|
1225
|
+
A source reached over HTTP: `type` `http` or `api`, a base URL without credentials, an optional events URL for live
|
|
1226
|
+
updates, a polling interval in milliseconds (1 000 to 3 600 000) and a `live` flag. The id `workspace` is reserved
|
|
1227
|
+
for the local runs directory.
|
|
1228
|
+
|
|
1229
|
+
#### `DirectoryReportSourceSchema`
|
|
1230
|
+
|
|
1231
|
+
```ts
|
|
1232
|
+
export const DirectoryReportSourceSchema = …
|
|
1233
|
+
```
|
|
1234
|
+
|
|
1235
|
+
A source that is a directory of runs on the machine running the viewer. A relative `runs` path is resolved against
|
|
1236
|
+
the sources file.
|
|
1237
|
+
|
|
1238
|
+
#### `ReportSourceSchema`
|
|
1239
|
+
|
|
1240
|
+
```ts
|
|
1241
|
+
export const ReportSourceSchema = …
|
|
1242
|
+
```
|
|
1243
|
+
|
|
1244
|
+
One source: a directory or a remote host.
|
|
1245
|
+
|
|
1246
|
+
#### `ReportSource`
|
|
1247
|
+
|
|
1248
|
+
```ts
|
|
1249
|
+
export type ReportSource = z.infer<typeof ReportSourceSchema>;
|
|
1250
|
+
```
|
|
1251
|
+
|
|
1252
|
+
A parsed `ReportSourceSchema` value.
|
|
1253
|
+
|
|
1254
|
+
#### `RemoteReportSource`
|
|
1255
|
+
|
|
1256
|
+
```ts
|
|
1257
|
+
export type RemoteReportSource = z.infer<typeof RemoteReportSourceSchema>;
|
|
1258
|
+
```
|
|
1259
|
+
|
|
1260
|
+
A parsed `RemoteReportSourceSchema` value.
|
|
1261
|
+
|
|
1262
|
+
#### `ReportSourcesSchema`
|
|
1263
|
+
|
|
1264
|
+
```ts
|
|
1265
|
+
export const ReportSourcesSchema = …
|
|
1266
|
+
```
|
|
1267
|
+
|
|
1268
|
+
The sources file, `{ "schemaVersion": 1, "sources": [...] }`. Source ids must be unique.
|
|
1269
|
+
|
|
1270
|
+
#### `AtlasChangeSchema`
|
|
1271
|
+
|
|
1272
|
+
```ts
|
|
1273
|
+
export const AtlasChangeSchema = …
|
|
1274
|
+
```
|
|
1275
|
+
|
|
1276
|
+
The payload of the `atlas:change` event: which `scope` changed (`specs` or `runs`), the files and run ids concerned
|
|
1277
|
+
(empty lists when not known), and the source that changed. Unknown payloads are ignored by the viewer.
|
|
1278
|
+
|
|
1279
|
+
#### `AtlasChange`
|
|
1280
|
+
|
|
1281
|
+
```ts
|
|
1282
|
+
export type AtlasChange = z.infer<typeof AtlasChangeSchema>;
|
|
1283
|
+
```
|
|
1284
|
+
|
|
1285
|
+
A parsed `AtlasChangeSchema` value.
|
|
1286
|
+
|
|
1287
|
+
### Runs index
|
|
1288
|
+
|
|
1289
|
+
Source: `packages/schema/src/runs-index.ts`
|
|
1290
|
+
|
|
1291
|
+
`runs/index.json`, the list of statechart runs a host serves, newest first, and the summary the viewer keeps for
|
|
1292
|
+
each. The index lists runs as `unknown` so a reader can validate each summary on its own and drop the ones that do
|
|
1293
|
+
not parse.
|
|
1294
|
+
|
|
1295
|
+
See docs/statecharts.md
|
|
1296
|
+
|
|
1297
|
+
#### `RUN_PROGRESS`
|
|
1298
|
+
|
|
1299
|
+
```ts
|
|
1300
|
+
export const RUN_PROGRESS = …
|
|
1301
|
+
```
|
|
1302
|
+
|
|
1303
|
+
Whether a run is still being written (`running`) or finished (`complete`).
|
|
1304
|
+
|
|
1305
|
+
#### `RunSummarySchema`
|
|
1306
|
+
|
|
1307
|
+
```ts
|
|
1308
|
+
export const RunSummarySchema = …
|
|
1309
|
+
```
|
|
1310
|
+
|
|
1311
|
+
One run in the index: its id, start, mode, commit, branch, duration and spec version, whether it is `running` or
|
|
1312
|
+
complete, the planned and completed path counts of a running run, whether its manifest exists yet, and the state,
|
|
1313
|
+
transition and journey tallies.
|
|
1314
|
+
|
|
1315
|
+
#### `RunSummary`
|
|
1316
|
+
|
|
1317
|
+
```ts
|
|
1318
|
+
export type RunSummary = z.infer<typeof RunSummarySchema>;
|
|
1319
|
+
```
|
|
1320
|
+
|
|
1321
|
+
A parsed `RunSummarySchema` value.
|
|
1322
|
+
|
|
1323
|
+
#### `RunsIndexSchema`
|
|
1324
|
+
|
|
1325
|
+
```ts
|
|
1326
|
+
export const RunsIndexSchema = …
|
|
1327
|
+
```
|
|
1328
|
+
|
|
1329
|
+
`runs/index.json`: the runs a host serves, newest first.
|
|
1330
|
+
|
|
1331
|
+
### Server configuration schema
|
|
1332
|
+
|
|
1333
|
+
Source: `packages/schema/src/server-config.ts`
|
|
1334
|
+
|
|
1335
|
+
The schema of `atlas.server.json`, the file that configures `atlas serve` and `atlas dev`: where to listen, which
|
|
1336
|
+
folder and further backends hold the data, which bearer tokens may read, publish or administer, and limits. Every
|
|
1337
|
+
field has a default, so an empty file is a working server. Unlike the report format, unknown keys are an error, so
|
|
1338
|
+
a typo is reported instead of ignored. Flags and environment variables override the file.
|
|
1339
|
+
|
|
1340
|
+
See docs/deploying.md
|
|
1341
|
+
See docs/server.md
|
|
1342
|
+
|
|
1343
|
+
#### `ServerRoleSchema`
|
|
1344
|
+
|
|
1345
|
+
```ts
|
|
1346
|
+
export const ServerRoleSchema = …
|
|
1347
|
+
```
|
|
1348
|
+
|
|
1349
|
+
What a bearer token may do: `read` (look), `publish` (also upload) or `admin` (also remove scratch objects).
|
|
1350
|
+
|
|
1351
|
+
#### `ServerRole`
|
|
1352
|
+
|
|
1353
|
+
```ts
|
|
1354
|
+
export type ServerRole = z.infer<typeof ServerRoleSchema>;
|
|
1355
|
+
```
|
|
1356
|
+
|
|
1357
|
+
One of the roles of `ServerRoleSchema`.
|
|
1358
|
+
|
|
1359
|
+
#### `ServerBackendSchema`
|
|
1360
|
+
|
|
1361
|
+
```ts
|
|
1362
|
+
export const ServerBackendSchema = …
|
|
1363
|
+
```
|
|
1364
|
+
|
|
1365
|
+
A further store the server reads together with its data folder, and optionally writes to: an id, a label and a
|
|
1366
|
+
location URL.
|
|
1367
|
+
|
|
1368
|
+
#### `ServerTokenSchema`
|
|
1369
|
+
|
|
1370
|
+
```ts
|
|
1371
|
+
export const ServerTokenSchema = …
|
|
1372
|
+
```
|
|
1373
|
+
|
|
1374
|
+
A bearer token: a name for logs, a role, and the token itself or the name of the environment variable that holds it
|
|
1375
|
+
(exactly one of the two).
|
|
1376
|
+
|
|
1377
|
+
#### `ServerConfigSchema`
|
|
1378
|
+
|
|
1379
|
+
```ts
|
|
1380
|
+
export const ServerConfigSchema = …
|
|
1381
|
+
```
|
|
1382
|
+
|
|
1383
|
+
The whole `atlas.server.json`: listening address, data folder, backends and write target, authentication, the
|
|
1384
|
+
viewer to serve, which layers take part in the report, refresh and heartbeat intervals, request limits and logging.
|
|
1385
|
+
|
|
1386
|
+
#### `ServerConfig`
|
|
1387
|
+
|
|
1388
|
+
```ts
|
|
1389
|
+
export type ServerConfig = z.output<typeof ServerConfigSchema>;
|
|
1390
|
+
```
|
|
1391
|
+
|
|
1392
|
+
A server configuration after parsing, with every default applied.
|
|
1393
|
+
|
|
1394
|
+
#### `ServerConfigInput`
|
|
1395
|
+
|
|
1396
|
+
```ts
|
|
1397
|
+
export type ServerConfigInput = z.input<typeof ServerConfigSchema>;
|
|
1398
|
+
```
|
|
1399
|
+
|
|
1400
|
+
A server configuration as written, before defaults are applied.
|
|
1401
|
+
|
|
1402
|
+
### Statechart spec schemas
|
|
1403
|
+
|
|
1404
|
+
Source: `packages/schema/src/spec.ts`
|
|
1405
|
+
|
|
1406
|
+
Zod schemas for the files in a specs directory: the `meta` a chart's states carry, XState-style machine configs,
|
|
1407
|
+
`journeys.yaml`, the optional product map `atlas.yaml`, `<chart>.layout.json` and `specs/index.json`, plus the
|
|
1408
|
+
filename patterns that identify statechart files. They describe what a person writes, so readers validate each
|
|
1409
|
+
piece on its own and report problems rather than rejecting the whole spec (the visualizer's `parse/spec.ts` does).
|
|
1410
|
+
The pure subset of statecharts that Atlas executes is documented in `docs/statecharts.md`.
|
|
1411
|
+
|
|
1412
|
+
See docs/statecharts.md
|
|
1413
|
+
|
|
1414
|
+
#### `SPEC_SCHEMA_VERSION`
|
|
1415
|
+
|
|
1416
|
+
```ts
|
|
1417
|
+
export const SPEC_SCHEMA_VERSION = …
|
|
1418
|
+
```
|
|
1419
|
+
|
|
1420
|
+
Version of the spec file formats, currently 1. `LayoutFileSchema` and `SpecIndexSchema` accept only `schemaVersion:
|
|
1421
|
+
1`.
|
|
1422
|
+
|
|
1423
|
+
#### `DesignLinkSchema`
|
|
1424
|
+
|
|
1425
|
+
```ts
|
|
1426
|
+
export const DesignLinkSchema = …
|
|
1427
|
+
```
|
|
1428
|
+
|
|
1429
|
+
A state's link to its design: an image (URL or spec-relative path), and optionally where the design lives, such as
|
|
1430
|
+
a Figma frame.
|
|
1431
|
+
|
|
1432
|
+
#### `DesignLink`
|
|
1433
|
+
|
|
1434
|
+
```ts
|
|
1435
|
+
export type DesignLink = z.infer<typeof DesignLinkSchema>;
|
|
1436
|
+
```
|
|
1437
|
+
|
|
1438
|
+
A parsed `DesignLinkSchema` value.
|
|
1439
|
+
|
|
1440
|
+
#### `ContractStepSchema`
|
|
1441
|
+
|
|
1442
|
+
```ts
|
|
1443
|
+
export const ContractStepSchema = …
|
|
1444
|
+
```
|
|
1445
|
+
|
|
1446
|
+
One Given/When/Then line of a business contract: the keyword, its text, and an optional data table or doc string.
|
|
1447
|
+
|
|
1448
|
+
#### `BusinessContractSchema`
|
|
1449
|
+
|
|
1450
|
+
```ts
|
|
1451
|
+
export const BusinessContractSchema = …
|
|
1452
|
+
```
|
|
1453
|
+
|
|
1454
|
+
A business rule copied from its authoritative `source` as exact Given/When/Then steps, carried in a state's
|
|
1455
|
+
`meta.contracts`.
|
|
1456
|
+
|
|
1457
|
+
#### `BusinessContract`
|
|
1458
|
+
|
|
1459
|
+
```ts
|
|
1460
|
+
export type BusinessContract = z.infer<typeof BusinessContractSchema>;
|
|
1461
|
+
```
|
|
1462
|
+
|
|
1463
|
+
A parsed `BusinessContractSchema` value.
|
|
1464
|
+
|
|
1465
|
+
#### `StateMetaShape`
|
|
1466
|
+
|
|
1467
|
+
```ts
|
|
1468
|
+
export const StateMetaShape = …
|
|
1469
|
+
```
|
|
1470
|
+
|
|
1471
|
+
Every field a state's `meta` may carry. Each one is optional on its own: the visualizer keeps
|
|
1472
|
+
the fields that parse and reports the ones that don't.
|
|
1473
|
+
|
|
1474
|
+
#### `StateMetaSchema`
|
|
1475
|
+
|
|
1476
|
+
```ts
|
|
1477
|
+
export const StateMetaSchema = …
|
|
1478
|
+
```
|
|
1479
|
+
|
|
1480
|
+
`StateMetaShape` with every field optional: the `meta` of a state or of a whole chart.
|
|
1481
|
+
|
|
1482
|
+
#### `StateMeta`
|
|
1483
|
+
|
|
1484
|
+
```ts
|
|
1485
|
+
export type StateMeta = z.infer<typeof StateMetaSchema>;
|
|
1486
|
+
```
|
|
1487
|
+
|
|
1488
|
+
A parsed `StateMetaSchema` value.
|
|
1489
|
+
|
|
1490
|
+
#### `TransitionTargetSchema`
|
|
1491
|
+
|
|
1492
|
+
```ts
|
|
1493
|
+
export const TransitionTargetSchema = …
|
|
1494
|
+
```
|
|
1495
|
+
|
|
1496
|
+
The target of an event transition: a state name (or `#id`) written as a string, or an object with `target`.
|
|
1497
|
+
|
|
1498
|
+
#### `STATE_TYPES`
|
|
1499
|
+
|
|
1500
|
+
```ts
|
|
1501
|
+
export const STATE_TYPES = …
|
|
1502
|
+
```
|
|
1503
|
+
|
|
1504
|
+
Kinds of state in the composed map: `atomic`, `compound`, `parallel`, `final`.
|
|
1505
|
+
|
|
1506
|
+
#### `StateType`
|
|
1507
|
+
|
|
1508
|
+
```ts
|
|
1509
|
+
export type StateType = (typeof STATE_TYPES)[number];
|
|
1510
|
+
```
|
|
1511
|
+
|
|
1512
|
+
One of `STATE_TYPES`.
|
|
1513
|
+
|
|
1514
|
+
#### `StateNodeConfig`
|
|
1515
|
+
|
|
1516
|
+
```ts
|
|
1517
|
+
export type StateNodeConfig = {
|
|
1518
|
+
id?: string | undefined;
|
|
1519
|
+
initial?: string | undefined;
|
|
1520
|
+
type?: 'parallel' | 'final' | undefined;
|
|
1521
|
+
meta?: StateMeta | undefined;
|
|
1522
|
+
states?: Record<string, StateNodeConfig> | undefined;
|
|
1523
|
+
on?: Record<string, z.infer<typeof TransitionTargetSchema>> | undefined;
|
|
1524
|
+
};
|
|
1525
|
+
```
|
|
1526
|
+
|
|
1527
|
+
TypeScript shape of one state of a machine config, matching `StateNodeSchema`: optional `id`, `initial`, `type`
|
|
1528
|
+
(`parallel` or `final`), `meta`, nested `states` and `on` transitions.
|
|
1529
|
+
|
|
1530
|
+
#### `StateNodeSchema`
|
|
1531
|
+
|
|
1532
|
+
```ts
|
|
1533
|
+
export const StateNodeSchema: z.ZodType<StateNodeConfig>
|
|
1534
|
+
```
|
|
1535
|
+
|
|
1536
|
+
One state of an XState machine config, recursively, restricted to what Atlas reads: nesting, `parallel` and `final`
|
|
1537
|
+
types, event transitions and `meta`. Guards, actions and the rest of XState are rejected by `atlas lint`, not by
|
|
1538
|
+
this schema. Emitted as `state-node.schema.json`.
|
|
1539
|
+
|
|
1540
|
+
#### `MachineSchema`
|
|
1541
|
+
|
|
1542
|
+
```ts
|
|
1543
|
+
export const MachineSchema = …
|
|
1544
|
+
```
|
|
1545
|
+
|
|
1546
|
+
A whole chart: its `id`, optional `initial`, `type` and `meta`, and its `states`. The states are `unknown` here;
|
|
1547
|
+
validate each with `StateNodeSchema`.
|
|
1548
|
+
|
|
1549
|
+
#### `JourneySchema`
|
|
1550
|
+
|
|
1551
|
+
```ts
|
|
1552
|
+
export const JourneySchema = …
|
|
1553
|
+
```
|
|
1554
|
+
|
|
1555
|
+
One curated journey in `journeys.yaml`: the business events replayed in order from the initial state, the states it
|
|
1556
|
+
must end in, and an optional owner and tour flag. `atlas lint` replays every journey, and `atlas run` runs each as
|
|
1557
|
+
its own path.
|
|
1558
|
+
|
|
1559
|
+
#### `JourneyConfig`
|
|
1560
|
+
|
|
1561
|
+
```ts
|
|
1562
|
+
export type JourneyConfig = z.infer<typeof JourneySchema>;
|
|
1563
|
+
```
|
|
1564
|
+
|
|
1565
|
+
A parsed `JourneySchema` value.
|
|
1566
|
+
|
|
1567
|
+
#### `JourneysFileSchema`
|
|
1568
|
+
|
|
1569
|
+
```ts
|
|
1570
|
+
export const JourneysFileSchema = …
|
|
1571
|
+
```
|
|
1572
|
+
|
|
1573
|
+
`journeys.yaml`: a `journeys` map from journey name to journey. The entries are `unknown` here; validate each with
|
|
1574
|
+
`JourneySchema`.
|
|
1575
|
+
|
|
1576
|
+
#### `AtlasContextSchema`
|
|
1577
|
+
|
|
1578
|
+
```ts
|
|
1579
|
+
export const AtlasContextSchema = …
|
|
1580
|
+
```
|
|
1581
|
+
|
|
1582
|
+
A product area declared in `atlas.yaml`: its id, display name, description, owner and the spec-relative directories
|
|
1583
|
+
whose charts belong to it.
|
|
1584
|
+
|
|
1585
|
+
#### `AtlasHandOffSchema`
|
|
1586
|
+
|
|
1587
|
+
```ts
|
|
1588
|
+
export const AtlasHandOffSchema = …
|
|
1589
|
+
```
|
|
1590
|
+
|
|
1591
|
+
A hand-off declared in `atlas.yaml` between two product areas: the ids of the area it `from` and `to`, and the
|
|
1592
|
+
event that passes control.
|
|
1593
|
+
|
|
1594
|
+
#### `AtlasFileSchema`
|
|
1595
|
+
|
|
1596
|
+
```ts
|
|
1597
|
+
export const AtlasFileSchema = …
|
|
1598
|
+
```
|
|
1599
|
+
|
|
1600
|
+
`atlas.yaml` at the specs root: the product map. Optional; without it every directory holding a
|
|
1601
|
+
chart becomes a context named after its first path segment.
|
|
1602
|
+
|
|
1603
|
+
#### `LayoutFileSchema`
|
|
1604
|
+
|
|
1605
|
+
```ts
|
|
1606
|
+
export const LayoutFileSchema = …
|
|
1607
|
+
```
|
|
1608
|
+
|
|
1609
|
+
`<chart>.layout.json` beside a chart: a hand-tuned layout the visualizer respects.
|
|
1610
|
+
|
|
1611
|
+
#### `LayoutFile`
|
|
1612
|
+
|
|
1613
|
+
```ts
|
|
1614
|
+
export type LayoutFile = z.infer<typeof LayoutFileSchema>;
|
|
1615
|
+
```
|
|
1616
|
+
|
|
1617
|
+
A parsed `LayoutFileSchema` value.
|
|
1618
|
+
|
|
1619
|
+
#### `SpecIndexSchema`
|
|
1620
|
+
|
|
1621
|
+
```ts
|
|
1622
|
+
export const SpecIndexSchema = …
|
|
1623
|
+
```
|
|
1624
|
+
|
|
1625
|
+
`specs/index.json`: the statechart files under the specs root, so a static host can serve the
|
|
1626
|
+
spec without directory listings. `ref` names the branch or commit the files came from.
|
|
1627
|
+
|
|
1628
|
+
#### `SpecIndex`
|
|
1629
|
+
|
|
1630
|
+
```ts
|
|
1631
|
+
export type SpecIndex = z.infer<typeof SpecIndexSchema>;
|
|
1632
|
+
```
|
|
1633
|
+
|
|
1634
|
+
A parsed `SpecIndexSchema` value.
|
|
1635
|
+
|
|
1636
|
+
#### `STATECHART_FILE_PATTERNS`
|
|
1637
|
+
|
|
1638
|
+
```ts
|
|
1639
|
+
export const STATECHART_FILE_PATTERNS = …
|
|
1640
|
+
```
|
|
1641
|
+
|
|
1642
|
+
Patterns for the paths of statechart spec files: `atlas.yaml`, `machine.yaml|json` and `*.machine.yaml|json`,
|
|
1643
|
+
`*.scxml`, `journeys.yaml`, `known-issues.md`, `open-questions.md` and `*.layout.json`, in any directory.
|
|
1644
|
+
|
|
1645
|
+
#### `isStatechartFile`
|
|
1646
|
+
|
|
1647
|
+
```ts
|
|
1648
|
+
export function isStatechartFile(path: string)
|
|
1649
|
+
```
|
|
1650
|
+
|
|
1651
|
+
Whether a spec-relative path (using `/`) matches `STATECHART_FILE_PATTERNS`.
|