@crvouga/atlas 0.3.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 +12 -0
- package/README.md +178 -604
- 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 +40 -4
- package/dist/reports/src/evidence-live.js +52 -4
- package/dist/reports/src/evidence-types.d.ts +70 -1
- package/dist/reports/src/evidence-types.js +5 -1
- package/dist/reports/src/evidence-view.d.ts +58 -6
- package/dist/reports/src/evidence-view.js +44 -5
- 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 +48 -0
- package/dist/reports/src/layer-axes.js +71 -0
- package/dist/reports/src/layer-catalog.d.ts +28 -1
- package/dist/reports/src/layer-catalog.js +19 -2
- package/dist/reports/src/layer-merge.d.ts +98 -9
- package/dist/reports/src/layer-merge.js +154 -33
- package/dist/reports/src/layer-source.d.ts +18 -0
- package/dist/reports/src/layer-source.js +14 -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 +34 -1
- package/dist/reports/src/layers-route.d.ts +47 -4
- package/dist/reports/src/layers-route.js +88 -12
- 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 +30 -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 +44 -9
- package/dist/reports/src/publish.js +40 -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 +40 -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 +33 -5
- package/packages/core/README.md +2 -1
- package/packages/reports/README.md +69 -2
- package/packages/reports/STORAGE.md +5 -1
- 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 +27 -5
- package/packages/visualizer/example/specs/coffee/ordering/cart.qnt +7 -0
- package/packages/visualizer/example/specs/coffee/ordering/checkout.openslo.yaml +10 -0
- package/packages/visualizer/example/specs/coffee/ordering/drink-price.dmn +24 -0
- package/packages/visualizer/example/specs/coffee/ordering/loyalty.feature +7 -0
- package/packages/visualizer/example/specs/coffee/ordering/ordering.feature +36 -0
- package/packages/visualizer/example/specs/coffee/ordering/payment.als +4 -0
- package/packages/visualizer/fixtures/failures/specs/coffee/ordering/cart.qnt +7 -0
- package/packages/visualizer/fixtures/failures/specs/coffee/ordering/checkout.openslo.yaml +10 -0
- package/packages/visualizer/fixtures/failures/specs/coffee/ordering/drink-price.dmn +24 -0
- package/packages/visualizer/fixtures/failures/specs/coffee/ordering/loyalty.feature +7 -0
- package/packages/visualizer/fixtures/failures/specs/coffee/ordering/ordering.feature +36 -0
- package/packages/visualizer/fixtures/failures/specs/coffee/ordering/payment.als +4 -0
- package/packages/visualizer/fixtures/full/specs/coffee/ordering/cart.qnt +7 -0
- package/packages/visualizer/fixtures/full/specs/coffee/ordering/checkout.openslo.yaml +10 -0
- package/packages/visualizer/fixtures/full/specs/coffee/ordering/drink-price.dmn +24 -0
- package/packages/visualizer/fixtures/full/specs/coffee/ordering/loyalty.feature +7 -0
- package/packages/visualizer/fixtures/full/specs/coffee/ordering/ordering.feature +36 -0
- package/packages/visualizer/fixtures/full/specs/coffee/ordering/payment.als +4 -0
- package/packages/visualizer/fixtures/malformed/specs/coffee/ordering/cart.qnt +7 -0
- package/packages/visualizer/fixtures/malformed/specs/coffee/ordering/checkout.openslo.yaml +10 -0
- package/packages/visualizer/fixtures/malformed/specs/coffee/ordering/drink-price.dmn +24 -0
- package/packages/visualizer/fixtures/malformed/specs/coffee/ordering/loyalty.feature +7 -0
- package/packages/visualizer/fixtures/malformed/specs/coffee/ordering/ordering.feature +36 -0
- package/packages/visualizer/fixtures/malformed/specs/coffee/ordering/payment.als +4 -0
- package/packages/visualizer/fixtures/partial/specs/coffee/ordering/cart.qnt +7 -0
- package/packages/visualizer/fixtures/partial/specs/coffee/ordering/checkout.openslo.yaml +10 -0
- package/packages/visualizer/fixtures/partial/specs/coffee/ordering/drink-price.dmn +24 -0
- package/packages/visualizer/fixtures/partial/specs/coffee/ordering/loyalty.feature +7 -0
- package/packages/visualizer/fixtures/partial/specs/coffee/ordering/ordering.feature +36 -0
- package/packages/visualizer/fixtures/partial/specs/coffee/ordering/payment.als +4 -0
- package/packages/visualizer/fixtures/removed/specs/coffee/ordering/cart.qnt +7 -0
- package/packages/visualizer/fixtures/removed/specs/coffee/ordering/checkout.openslo.yaml +10 -0
- package/packages/visualizer/fixtures/removed/specs/coffee/ordering/drink-price.dmn +24 -0
- package/packages/visualizer/fixtures/removed/specs/coffee/ordering/loyalty.feature +7 -0
- package/packages/visualizer/fixtures/removed/specs/coffee/ordering/ordering.feature +36 -0
- package/packages/visualizer/fixtures/removed/specs/coffee/ordering/payment.als +4 -0
- package/packages/visualizer/fixtures/spec-only/specs/coffee/ordering/cart.qnt +7 -0
- package/packages/visualizer/fixtures/spec-only/specs/coffee/ordering/checkout.openslo.yaml +10 -0
- package/packages/visualizer/fixtures/spec-only/specs/coffee/ordering/drink-price.dmn +24 -0
- package/packages/visualizer/fixtures/spec-only/specs/coffee/ordering/loyalty.feature +7 -0
- package/packages/visualizer/fixtures/spec-only/specs/coffee/ordering/ordering.feature +36 -0
- package/packages/visualizer/fixtures/spec-only/specs/coffee/ordering/payment.als +4 -0
- package/packages/visualizer/scripts/make-fixtures.ts +2 -0
- package/packages/visualizer/scripts/publish-data.ts +1 -2
- 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 +41 -4
- 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 +38 -4
- package/packages/visualizer/src/evidence/evidence-context.tsx +74 -12
- package/packages/visualizer/src/evidence/evidence.module.css +20 -0
- package/packages/visualizer/src/evidence/marks.tsx +2 -0
- package/packages/visualizer/src/evidence/overview.tsx +3 -3
- package/packages/visualizer/src/evidence/sources-panel.tsx +88 -34
- 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/src/state/ui-store.ts +6 -2
- package/packages/visualizer/vite/atlas-server-proxy.ts +36 -0
- package/packages/visualizer/vite/example-reports.ts +475 -0
- package/packages/visualizer/vite.config.ts +18 -2
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module Atlas server API documents
|
|
3
|
+
*
|
|
4
|
+
* The JSON bodies the Atlas server speaks, as Zod schemas: the problem document every error uses (RFC 9457), what
|
|
5
|
+
* `/api/server` and `/readyz` say about the server, the report a viewer reads (`/api/reports/evidence/effective`) and
|
|
6
|
+
* what changed since a version of it, the store protocol's listings and acknowledgements, and the events on the
|
|
7
|
+
* stream. The server's OpenAPI document (`@crvouga/atlas/openapi.json`) is generated from these, and each is also
|
|
8
|
+
* published as a JSON Schema, so a client in any language can validate what it receives.
|
|
9
|
+
*
|
|
10
|
+
* Every object is open (unknown keys are kept, not refused) because the API only grows: within a version a response
|
|
11
|
+
* may gain optional fields, never lose or change one (see AGENTS.md, "The server is a living application"). A client
|
|
12
|
+
* must ignore what it does not know.
|
|
13
|
+
*
|
|
14
|
+
* @see docs/server.md
|
|
15
|
+
*/
|
|
16
|
+
import { z } from 'zod/v4';
|
|
17
|
+
import { CheckSchema } from './layer.js';
|
|
18
|
+
/** One of the statuses a check has in a report: `passed`, `failed`, `running` (not finished) or `not-run`. Closed. */
|
|
19
|
+
export const EvidenceStatusSchema = z.enum(['passed', 'failed', 'running', 'not-run']);
|
|
20
|
+
/**
|
|
21
|
+
* The body of every error the server answers, a Problem Details document (RFC 9457, `application/problem+json`).
|
|
22
|
+
* `error` repeats `detail` for clients written before the standard was adopted; read `detail`.
|
|
23
|
+
*/
|
|
24
|
+
export const ProblemSchema = z.looseObject({
|
|
25
|
+
type: z.string().default('about:blank').describe('A URI naming the kind of problem. `about:blank` means the status code says it all'),
|
|
26
|
+
title: z.string().describe('The status in words, such as "Unauthorized"'),
|
|
27
|
+
status: z.number().int().describe('The HTTP status code'),
|
|
28
|
+
detail: z.string().describe('What went wrong and what to do about it, in a sentence an agent or a person can act on'),
|
|
29
|
+
error: z.string().describe('The same as `detail`. Kept for clients that read `error`')
|
|
30
|
+
});
|
|
31
|
+
/** What `GET /healthz` answers: the process is up. */
|
|
32
|
+
export const HealthSchema = z.looseObject({ ok: z.literal(true) });
|
|
33
|
+
/** What `GET /readyz` answers: whether the backends were read, and counts for logs. `ready` false comes with status 503. */
|
|
34
|
+
export const ReadySchema = z.looseObject({
|
|
35
|
+
ready: z.boolean().describe('True once the first pass over the backends is done and at least one backend answers'),
|
|
36
|
+
layers: z.number().int().nonnegative().describe('Distinct layers read'),
|
|
37
|
+
slots: z.number().int().nonnegative().describe('Distinct checks (slots) the report holds a winner for'),
|
|
38
|
+
holding: z.number().int().nonnegative().describe('Layers that still hold at least one winner'),
|
|
39
|
+
failed: z.number().int().nonnegative().describe('Layers or backends that could not be read right now'),
|
|
40
|
+
refreshedAt: z.number().describe('When a pass over the backends last finished, epoch milliseconds; 0 before the first'),
|
|
41
|
+
backends: z.array(z.looseObject({ id: z.string(), available: z.boolean() }))
|
|
42
|
+
});
|
|
43
|
+
/** What `GET /api/server` answers: what the server is, who is asking, and what it can do. */
|
|
44
|
+
export const ServerInfoSchema = z.looseObject({
|
|
45
|
+
name: z.literal('atlas'),
|
|
46
|
+
version: z.string().nullable().describe('The @crvouga/atlas version the server runs, or null when it does not know'),
|
|
47
|
+
role: z.enum(['read', 'publish', 'admin']).describe('What the token of this request may do. A server with no tokens treats everyone as admin'),
|
|
48
|
+
open: z.boolean().describe('True when the server has no tokens at all'),
|
|
49
|
+
write: z.string().describe('The id of the backend uploads go to'),
|
|
50
|
+
ready: z.boolean(),
|
|
51
|
+
viewers: z.number().int().nonnegative().describe('Viewers connected to /api/events right now'),
|
|
52
|
+
time: z.number().describe('The server clock, epoch milliseconds'),
|
|
53
|
+
backends: z.array(z.looseObject({ id: z.string(), label: z.string(), available: z.boolean(), write: z.boolean() })),
|
|
54
|
+
layers: z.number().int().nonnegative(),
|
|
55
|
+
slots: z.number().int().nonnegative(),
|
|
56
|
+
capabilities: z.record(z.string(), z.boolean()).describe('Features this server has, by name: `events`, `ingest`, `store`, `checks`, `status`, `effective`. A client checks a name before using what it names')
|
|
57
|
+
});
|
|
58
|
+
/** A backend as the report shows it: where results came from, and whether it could be read. */
|
|
59
|
+
export const BackendInfoSchema = z.looseObject({
|
|
60
|
+
id: z.string(),
|
|
61
|
+
label: z.string(),
|
|
62
|
+
live: z.boolean().describe('Always false on a server'),
|
|
63
|
+
available: z.boolean().describe('False when the backend could not be read; its results are then unknown, never passed')
|
|
64
|
+
});
|
|
65
|
+
/** What a result carries beyond its outcome, as counts and short facts. Present only when there is something. */
|
|
66
|
+
export const EvidenceSummarySchema = z.looseObject({
|
|
67
|
+
attachments: z.number().int().nonnegative(),
|
|
68
|
+
steps: z.number().int().nonnegative(),
|
|
69
|
+
annotations: z.number().int().nonnegative(),
|
|
70
|
+
attempts: z.number().int().nonnegative(),
|
|
71
|
+
links: z.number().int().nonnegative(),
|
|
72
|
+
tags: z.array(z.string()),
|
|
73
|
+
labels: z.record(z.string(), z.string()),
|
|
74
|
+
roles: z.array(z.string())
|
|
75
|
+
});
|
|
76
|
+
/** A layer as the report shows it: its origin and its checks by status. */
|
|
77
|
+
export const LayerHeaderSchema = z.looseObject({
|
|
78
|
+
id: z.string().describe('The layer id: 64 lowercase hex digits, the SHA-256 of its content'),
|
|
79
|
+
backend: z.string().describe('The backend it was read from; the one that sorts first when several hold it'),
|
|
80
|
+
producer: z.string().describe('The suite or tool that made it. Part of the slot'),
|
|
81
|
+
packageDir: z.string().nullable(),
|
|
82
|
+
recordedAtMs: z.number().describe('When the checks ran, epoch milliseconds. The newest completed result wins its slot'),
|
|
83
|
+
sha: z.string().nullable().describe('The commit it was recorded at. Provenance only'),
|
|
84
|
+
branch: z.string().nullable().describe('The branch it was recorded on. Provenance only'),
|
|
85
|
+
environment: z.string().nullable().describe('The client it checked, such as `ios`. Part of the slot'),
|
|
86
|
+
runUrl: z.string().nullable(),
|
|
87
|
+
parameters: z.record(z.string(), z.string()).describe('Other choices that make a result its own slot'),
|
|
88
|
+
freshness: z.enum(['unknown', 'modified']).optional().describe('`modified`: recorded from a checkout with uncommitted changes. `unknown`: origin not captured. Absent: clean'),
|
|
89
|
+
recording: z.unknown().nullable().describe('Where recorded timelines are read from, or null'),
|
|
90
|
+
live: z.boolean(),
|
|
91
|
+
counts: z.record(EvidenceStatusSchema, z.number().int().nonnegative()),
|
|
92
|
+
execution: z.string(),
|
|
93
|
+
evidence: EvidenceSummarySchema.optional()
|
|
94
|
+
});
|
|
95
|
+
/** One check of a layer as the report shows it. */
|
|
96
|
+
export const LayerRowSchema = z.looseObject({
|
|
97
|
+
kind: z.string().describe('The kind of the part holding the check. Part of the slot'),
|
|
98
|
+
id: z.string().describe('The check id. Part of the slot'),
|
|
99
|
+
title: z.string(),
|
|
100
|
+
status: EvidenceStatusSchema,
|
|
101
|
+
specPath: z.string().nullable().describe('The spec the check belongs to, `specs/<path>`, or null'),
|
|
102
|
+
detail: z.string().describe('Why it has this status; empty when there is nothing to add'),
|
|
103
|
+
measurements: z.array(z.looseObject({ name: z.string(), value: z.number(), unit: z.string(), limit: z.number().optional() })),
|
|
104
|
+
testId: z.string().nullable(),
|
|
105
|
+
variant: z.record(z.string(), z.string()),
|
|
106
|
+
durationMs: z.number().nullable(),
|
|
107
|
+
evidence: EvidenceSummarySchema.optional()
|
|
108
|
+
});
|
|
109
|
+
/** A layer with its checks: the rows of one layer, read apart from its header. */
|
|
110
|
+
export const LayerRowsSchema = z.looseObject({
|
|
111
|
+
id: z.string(),
|
|
112
|
+
rows: z.array(LayerRowSchema),
|
|
113
|
+
fingerprints: z.record(z.string(), z.string()).describe('Spec path to the fingerprint the layer recorded for it')
|
|
114
|
+
});
|
|
115
|
+
/** A layer that holds winners, with only the rows that win. */
|
|
116
|
+
export const LayerEvidenceSchema = LayerRowsSchema.extend({ layer: LayerHeaderSchema });
|
|
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
|
+
export const EffectiveEvidenceSchema = z.looseObject({
|
|
123
|
+
version: z.string().describe('Changes exactly when the report does'),
|
|
124
|
+
layers: z.array(LayerEvidenceSchema),
|
|
125
|
+
backends: z.array(BackendInfoSchema),
|
|
126
|
+
notices: z.array(z.string()).describe('What could not be read. A gate treats any notice as unknown, never as passed'),
|
|
127
|
+
totalLayers: z.number().int().nonnegative().describe('Every layer read, whether or not it still wins anything'),
|
|
128
|
+
active: z.array(z.unknown()).describe('Always empty on a server; kept for viewers written for live spec runs')
|
|
129
|
+
});
|
|
130
|
+
/**
|
|
131
|
+
* What `GET /api/reports/evidence/effective?since=<version>` answers when the server remembers that version: only
|
|
132
|
+
* what changed. Replace the layers of the same id, drop `removed`, take the rest whole; the result equals the full
|
|
133
|
+
* report. When the server does not remember the version it answers with the whole report instead (no `delta` key).
|
|
134
|
+
*/
|
|
135
|
+
export const EffectiveDeltaSchema = EffectiveEvidenceSchema.extend({
|
|
136
|
+
delta: z.literal(true),
|
|
137
|
+
base: z.string().describe('The version this applies to'),
|
|
138
|
+
layers: z.array(LayerEvidenceSchema).describe('Layers that are new or changed since `base`, whole'),
|
|
139
|
+
removed: z.array(z.string()).describe('Ids of layers that no longer hold a winner')
|
|
140
|
+
});
|
|
141
|
+
/** A spec of the outline a report is laid over. */
|
|
142
|
+
export const OutlineSpecSchema = z.looseObject({
|
|
143
|
+
path: z.string().describe('`specs/<path>`'),
|
|
144
|
+
domain: z.string(),
|
|
145
|
+
kind: z.string().describe('The kind of spec: `gherkin`, `quint`, `dmn`, …'),
|
|
146
|
+
title: z.string(),
|
|
147
|
+
fingerprint: z.string().optional().describe('Identity of the spec text, so a result recorded against other text is flagged as possibly outdated')
|
|
148
|
+
});
|
|
149
|
+
/** `GET /api/reports/outline`: the specs a report is laid over, from the newest committed spec set. */
|
|
150
|
+
export const OutlineSchema = z.looseObject({
|
|
151
|
+
specs: z.array(OutlineSpecSchema),
|
|
152
|
+
sha: z.string().nullable(),
|
|
153
|
+
changedFiles: z.array(z.string())
|
|
154
|
+
});
|
|
155
|
+
/** `GET /api/reports/evidence`: one page of layer headers, newest first. Used by clients that read the whole history. */
|
|
156
|
+
export const EvidencePageSchema = z.looseObject({
|
|
157
|
+
layers: z.array(LayerHeaderSchema),
|
|
158
|
+
cursor: z.string().nullable().describe('Pass as `?cursor=` for the next page; null at the end'),
|
|
159
|
+
notices: z.array(z.string()),
|
|
160
|
+
backends: z.array(BackendInfoSchema),
|
|
161
|
+
active: z.array(z.unknown())
|
|
162
|
+
});
|
|
163
|
+
/** `GET /api/reports/evidence/detail/{backend}/{id}`: everything one check carries, and what its run carries. */
|
|
164
|
+
export const CheckDetailSchema = z.looseObject({
|
|
165
|
+
layer: z.string(),
|
|
166
|
+
kind: z.string(),
|
|
167
|
+
check: CheckSchema,
|
|
168
|
+
run: z.looseObject({}).describe('What the run as a whole carries: its logs, links, labels, annotations and extensions')
|
|
169
|
+
});
|
|
170
|
+
/** `GET /api/store?prefix=…`: one page of keys under `layers/`, in code-unit order. */
|
|
171
|
+
export const StoreListingSchema = z.looseObject({
|
|
172
|
+
keys: z.array(z.string()),
|
|
173
|
+
next: z.string().nullable().describe('Pass as `?after=` for the next page; null when there are no more')
|
|
174
|
+
});
|
|
175
|
+
/** `PUT /api/store/{key}` answered: the key was taken (`created`) or was already there with the same bytes. */
|
|
176
|
+
export const StoreWriteResultSchema = z.looseObject({
|
|
177
|
+
ok: z.literal(true),
|
|
178
|
+
key: z.string(),
|
|
179
|
+
kind: z.string().describe('What the server recognised the key as: `layer`, `layer-catalog`, `blob`, `spec-body`, `spec-set`, `spec-catalog`, `run-manifest`, `run-catalog`, `run-file` or `scratch`'),
|
|
180
|
+
created: z.boolean()
|
|
181
|
+
});
|
|
182
|
+
/** `POST /api/checks` answered: the layer that was written. */
|
|
183
|
+
export const ChecksResultSchema = z.looseObject({
|
|
184
|
+
ok: z.literal(true),
|
|
185
|
+
id: z.string().describe('The layer id'),
|
|
186
|
+
checks: z.number().int().nonnegative()
|
|
187
|
+
});
|
|
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() });
|
|
190
|
+
/** The data of the `report` event: layers arrived. Enough to say who sent what, without asking. */
|
|
191
|
+
export const ReportEventSchema = z.looseObject({
|
|
192
|
+
version: z.string().describe('The report version after these layers'),
|
|
193
|
+
totalLayers: z.number().int().nonnegative(),
|
|
194
|
+
added: z.array(z.looseObject({
|
|
195
|
+
id: z.string(), producer: z.string(), environment: z.string().nullable().optional(), branch: z.string().nullable().optional(),
|
|
196
|
+
sha: z.string().nullable().optional(), recordedAtMs: z.number(), counts: z.record(EvidenceStatusSchema, z.number().int().nonnegative()).optional()
|
|
197
|
+
})).describe('At most the 20 newest of the layers that arrived'),
|
|
198
|
+
addedTotal: z.number().int().nonnegative().describe('How many layers arrived, including those not listed')
|
|
199
|
+
});
|
|
200
|
+
/** The data of the `ping` event: sent every `heartbeatSeconds`, so a quiet server is told apart from a dead connection. */
|
|
201
|
+
export const PingEventSchema = z.looseObject({});
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module Command results (`--format json`)
|
|
3
|
+
*
|
|
4
|
+
* What `atlas report publish`, `stream`, `merge` and `doctor` print on standard output with `--format json` (alias
|
|
5
|
+
* `--json`), and what any `atlas` command prints on standard error for a command that was wrong: one JSON document,
|
|
6
|
+
* so an agent or a script never has to parse prose. (`status` and `policy` already print documents:
|
|
7
|
+
* `ReportStatusSchema`, and an IAM policy.) Each is also published as a JSON Schema.
|
|
8
|
+
*
|
|
9
|
+
* Exit codes are the same with and without `--format json`: `0` it worked, `1` it ran and the answer is no (a
|
|
10
|
+
* report that does not pass, a store that needs attention, checks that could not be sent), `2` the command itself
|
|
11
|
+
* was wrong (a missing flag, a path that does not exist). Within a version these only gain optional fields.
|
|
12
|
+
*
|
|
13
|
+
* @see docs/agents.md
|
|
14
|
+
*/
|
|
15
|
+
import { z } from 'zod/v4';
|
|
16
|
+
/** What was written for one layer by `atlas report publish`. */
|
|
17
|
+
export declare const PublishedLayerSchema: z.ZodObject<{
|
|
18
|
+
id: z.ZodString;
|
|
19
|
+
producer: z.ZodString;
|
|
20
|
+
environment: z.ZodNullable<z.ZodString>;
|
|
21
|
+
checks: z.ZodNumber;
|
|
22
|
+
passed: z.ZodNumber;
|
|
23
|
+
failed: z.ZodNumber;
|
|
24
|
+
notRun: z.ZodNumber;
|
|
25
|
+
linkedToSpec: z.ZodNumber;
|
|
26
|
+
freshness: z.ZodOptional<z.ZodEnum<{
|
|
27
|
+
unknown: "unknown";
|
|
28
|
+
modified: "modified";
|
|
29
|
+
}>>;
|
|
30
|
+
attachmentFiles: z.ZodNumber;
|
|
31
|
+
attachmentBytes: z.ZodNumber;
|
|
32
|
+
}, z.core.$loose>;
|
|
33
|
+
/** What `atlas report publish --format json` prints. */
|
|
34
|
+
export declare const PublishResultSchema: z.ZodObject<{
|
|
35
|
+
ok: z.ZodLiteral<true>;
|
|
36
|
+
store: z.ZodString;
|
|
37
|
+
layer: z.ZodObject<{
|
|
38
|
+
id: z.ZodString;
|
|
39
|
+
producer: z.ZodString;
|
|
40
|
+
environment: z.ZodNullable<z.ZodString>;
|
|
41
|
+
checks: z.ZodNumber;
|
|
42
|
+
passed: z.ZodNumber;
|
|
43
|
+
failed: z.ZodNumber;
|
|
44
|
+
notRun: z.ZodNumber;
|
|
45
|
+
linkedToSpec: z.ZodNumber;
|
|
46
|
+
freshness: z.ZodOptional<z.ZodEnum<{
|
|
47
|
+
unknown: "unknown";
|
|
48
|
+
modified: "modified";
|
|
49
|
+
}>>;
|
|
50
|
+
attachmentFiles: z.ZodNumber;
|
|
51
|
+
attachmentBytes: z.ZodNumber;
|
|
52
|
+
}, z.core.$loose>;
|
|
53
|
+
specSet: z.ZodOptional<z.ZodObject<{
|
|
54
|
+
id: z.ZodString;
|
|
55
|
+
files: z.ZodNumber;
|
|
56
|
+
branch: z.ZodNullable<z.ZodString>;
|
|
57
|
+
}, z.core.$loose>>;
|
|
58
|
+
run: z.ZodOptional<z.ZodObject<{
|
|
59
|
+
id: z.ZodString;
|
|
60
|
+
files: z.ZodNumber;
|
|
61
|
+
bytes: z.ZodNumber;
|
|
62
|
+
alreadyPublished: z.ZodBoolean;
|
|
63
|
+
}, z.core.$loose>>;
|
|
64
|
+
warnings: z.ZodArray<z.ZodString>;
|
|
65
|
+
}, z.core.$loose>;
|
|
66
|
+
/** What `atlas report stream --format json` prints when its input ends. */
|
|
67
|
+
export declare const StreamResultSchema: z.ZodObject<{
|
|
68
|
+
ok: z.ZodBoolean;
|
|
69
|
+
producer: z.ZodString;
|
|
70
|
+
environment: z.ZodNullable<z.ZodString>;
|
|
71
|
+
layers: z.ZodNumber;
|
|
72
|
+
checks: z.ZodNumber;
|
|
73
|
+
lost: z.ZodNumber;
|
|
74
|
+
warnings: z.ZodArray<z.ZodString>;
|
|
75
|
+
}, z.core.$loose>;
|
|
76
|
+
/** What `atlas report merge --format json` prints. */
|
|
77
|
+
export declare const MergeResultSchema: z.ZodObject<{
|
|
78
|
+
ok: z.ZodLiteral<true>;
|
|
79
|
+
into: z.ZodString;
|
|
80
|
+
copied: z.ZodNumber;
|
|
81
|
+
skipped: z.ZodNumber;
|
|
82
|
+
ignored: z.ZodNumber;
|
|
83
|
+
}, z.core.$loose>;
|
|
84
|
+
/** One thing `atlas report doctor` checked about a store. */
|
|
85
|
+
export declare const DoctorCheckSchema: z.ZodObject<{
|
|
86
|
+
name: z.ZodString;
|
|
87
|
+
ok: z.ZodBoolean;
|
|
88
|
+
detail: z.ZodString;
|
|
89
|
+
fix: z.ZodOptional<z.ZodString>;
|
|
90
|
+
}, z.core.$loose>;
|
|
91
|
+
/** What `atlas report doctor --format json` prints. */
|
|
92
|
+
export declare const DoctorResultSchema: z.ZodObject<{
|
|
93
|
+
ok: z.ZodBoolean;
|
|
94
|
+
stores: z.ZodArray<z.ZodObject<{
|
|
95
|
+
id: z.ZodString;
|
|
96
|
+
checks: z.ZodArray<z.ZodObject<{
|
|
97
|
+
name: z.ZodString;
|
|
98
|
+
ok: z.ZodBoolean;
|
|
99
|
+
detail: z.ZodString;
|
|
100
|
+
fix: z.ZodOptional<z.ZodString>;
|
|
101
|
+
}, z.core.$loose>>;
|
|
102
|
+
}, z.core.$loose>>;
|
|
103
|
+
}, z.core.$loose>;
|
|
104
|
+
/** What any `atlas` command prints on standard error, with `--format json`, when the command itself was wrong (exit code 2). */
|
|
105
|
+
export declare const CommandErrorSchema: z.ZodObject<{
|
|
106
|
+
ok: z.ZodLiteral<false>;
|
|
107
|
+
error: z.ZodObject<{
|
|
108
|
+
message: z.ZodString;
|
|
109
|
+
code: z.ZodLiteral<"usage">;
|
|
110
|
+
}, z.core.$loose>;
|
|
111
|
+
}, z.core.$loose>;
|
|
112
|
+
/** A test suite `atlas init` found, and the commands that run it and send its results. */
|
|
113
|
+
export declare const InitSuiteSchema: z.ZodObject<{
|
|
114
|
+
id: z.ZodString;
|
|
115
|
+
runner: z.ZodString;
|
|
116
|
+
evidence: z.ZodString;
|
|
117
|
+
run: z.ZodString;
|
|
118
|
+
output: z.ZodString;
|
|
119
|
+
format: z.ZodEnum<{
|
|
120
|
+
junit: "junit";
|
|
121
|
+
ctrf: "ctrf";
|
|
122
|
+
manifest: "manifest";
|
|
123
|
+
}>;
|
|
124
|
+
environment: z.ZodNullable<z.ZodString>;
|
|
125
|
+
publish: z.ZodString;
|
|
126
|
+
stream: z.ZodNullable<z.ZodString>;
|
|
127
|
+
prerequisites: z.ZodArray<z.ZodString>;
|
|
128
|
+
}, z.core.$loose>;
|
|
129
|
+
/** A file `atlas init` creates or updates. */
|
|
130
|
+
export declare const InitFileSchema: z.ZodObject<{
|
|
131
|
+
path: z.ZodString;
|
|
132
|
+
action: z.ZodEnum<{
|
|
133
|
+
create: "create";
|
|
134
|
+
update: "update";
|
|
135
|
+
unchanged: "unchanged";
|
|
136
|
+
}>;
|
|
137
|
+
purpose: z.ZodString;
|
|
138
|
+
content: z.ZodString;
|
|
139
|
+
}, z.core.$loose>;
|
|
140
|
+
/**
|
|
141
|
+
* What `atlas init --format json` prints: everything found about the project, and everything it would change.
|
|
142
|
+
* Without `--write` nothing is changed. With `--write`, the files are written and `written` says which.
|
|
143
|
+
*/
|
|
144
|
+
export declare const InitPlanSchema: z.ZodObject<{
|
|
145
|
+
ok: z.ZodBoolean;
|
|
146
|
+
directory: z.ZodString;
|
|
147
|
+
project: z.ZodObject<{
|
|
148
|
+
name: z.ZodNullable<z.ZodString>;
|
|
149
|
+
packageManager: z.ZodNullable<z.ZodEnum<{
|
|
150
|
+
bun: "bun";
|
|
151
|
+
pnpm: "pnpm";
|
|
152
|
+
yarn: "yarn";
|
|
153
|
+
npm: "npm";
|
|
154
|
+
}>>;
|
|
155
|
+
languages: z.ZodArray<z.ZodString>;
|
|
156
|
+
}, z.core.$loose>;
|
|
157
|
+
git: z.ZodObject<{
|
|
158
|
+
branch: z.ZodNullable<z.ZodString>;
|
|
159
|
+
defaultBranch: z.ZodString;
|
|
160
|
+
}, z.core.$loose>;
|
|
161
|
+
ci: z.ZodEnum<{
|
|
162
|
+
none: "none";
|
|
163
|
+
"github-actions": "github-actions";
|
|
164
|
+
"gitlab-ci": "gitlab-ci";
|
|
165
|
+
circleci: "circleci";
|
|
166
|
+
}>;
|
|
167
|
+
server: z.ZodObject<{
|
|
168
|
+
url: z.ZodNullable<z.ZodString>;
|
|
169
|
+
tokenEnv: z.ZodLiteral<"ATLAS_TOKEN">;
|
|
170
|
+
}, z.core.$loose>;
|
|
171
|
+
specs: z.ZodObject<{
|
|
172
|
+
directory: z.ZodNullable<z.ZodString>;
|
|
173
|
+
kinds: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
174
|
+
}, z.core.$loose>;
|
|
175
|
+
suites: z.ZodArray<z.ZodObject<{
|
|
176
|
+
id: z.ZodString;
|
|
177
|
+
runner: z.ZodString;
|
|
178
|
+
evidence: z.ZodString;
|
|
179
|
+
run: z.ZodString;
|
|
180
|
+
output: z.ZodString;
|
|
181
|
+
format: z.ZodEnum<{
|
|
182
|
+
junit: "junit";
|
|
183
|
+
ctrf: "ctrf";
|
|
184
|
+
manifest: "manifest";
|
|
185
|
+
}>;
|
|
186
|
+
environment: z.ZodNullable<z.ZodString>;
|
|
187
|
+
publish: z.ZodString;
|
|
188
|
+
stream: z.ZodNullable<z.ZodString>;
|
|
189
|
+
prerequisites: z.ZodArray<z.ZodString>;
|
|
190
|
+
}, z.core.$loose>>;
|
|
191
|
+
files: z.ZodArray<z.ZodObject<{
|
|
192
|
+
path: z.ZodString;
|
|
193
|
+
action: z.ZodEnum<{
|
|
194
|
+
create: "create";
|
|
195
|
+
update: "update";
|
|
196
|
+
unchanged: "unchanged";
|
|
197
|
+
}>;
|
|
198
|
+
purpose: z.ZodString;
|
|
199
|
+
content: z.ZodString;
|
|
200
|
+
}, z.core.$loose>>;
|
|
201
|
+
written: z.ZodArray<z.ZodString>;
|
|
202
|
+
verification: z.ZodNullable<z.ZodObject<{
|
|
203
|
+
reachable: z.ZodBoolean;
|
|
204
|
+
role: z.ZodNullable<z.ZodString>;
|
|
205
|
+
canPublish: z.ZodBoolean;
|
|
206
|
+
error: z.ZodNullable<z.ZodString>;
|
|
207
|
+
}, z.core.$loose>>;
|
|
208
|
+
nextSteps: z.ZodArray<z.ZodString>;
|
|
209
|
+
warnings: z.ZodArray<z.ZodString>;
|
|
210
|
+
}, z.core.$loose>;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module Command results (`--format json`)
|
|
3
|
+
*
|
|
4
|
+
* What `atlas report publish`, `stream`, `merge` and `doctor` print on standard output with `--format json` (alias
|
|
5
|
+
* `--json`), and what any `atlas` command prints on standard error for a command that was wrong: one JSON document,
|
|
6
|
+
* so an agent or a script never has to parse prose. (`status` and `policy` already print documents:
|
|
7
|
+
* `ReportStatusSchema`, and an IAM policy.) Each is also published as a JSON Schema.
|
|
8
|
+
*
|
|
9
|
+
* Exit codes are the same with and without `--format json`: `0` it worked, `1` it ran and the answer is no (a
|
|
10
|
+
* report that does not pass, a store that needs attention, checks that could not be sent), `2` the command itself
|
|
11
|
+
* was wrong (a missing flag, a path that does not exist). Within a version these only gain optional fields.
|
|
12
|
+
*
|
|
13
|
+
* @see docs/agents.md
|
|
14
|
+
*/
|
|
15
|
+
import { z } from 'zod/v4';
|
|
16
|
+
/** What was written for one layer by `atlas report publish`. */
|
|
17
|
+
export const PublishedLayerSchema = z.looseObject({
|
|
18
|
+
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'),
|
|
19
|
+
producer: z.string(),
|
|
20
|
+
environment: z.string().nullable(),
|
|
21
|
+
checks: z.number().int().nonnegative(),
|
|
22
|
+
passed: z.number().int().nonnegative(),
|
|
23
|
+
failed: z.number().int().nonnegative(),
|
|
24
|
+
notRun: z.number().int().nonnegative().describe('Skipped, pending or otherwise not run'),
|
|
25
|
+
linkedToSpec: z.number().int().nonnegative().describe('Checks that were matched to a spec file. The rest still count, but belong to no spec'),
|
|
26
|
+
freshness: z.enum(['modified', 'unknown']).optional().describe('Set when the checkout had uncommitted changes (`modified`) or no git origin (`unknown`)'),
|
|
27
|
+
attachmentFiles: z.number().int().nonnegative(),
|
|
28
|
+
attachmentBytes: z.number().int().nonnegative()
|
|
29
|
+
});
|
|
30
|
+
/** What `atlas report publish --format json` prints. */
|
|
31
|
+
export const PublishResultSchema = z.looseObject({
|
|
32
|
+
ok: z.literal(true),
|
|
33
|
+
store: z.string().describe('Where it was written: a folder, `s3://…` or a server URL'),
|
|
34
|
+
layer: PublishedLayerSchema,
|
|
35
|
+
specSet: z.looseObject({ id: z.string(), files: z.number().int().nonnegative(), branch: z.string().nullable() }).optional().describe('Present when `--specs` was given'),
|
|
36
|
+
run: z.looseObject({ id: z.string(), files: z.number().int().nonnegative(), bytes: z.number().int().nonnegative(), alreadyPublished: z.boolean() }).optional().describe('Present with `--upload-run`'),
|
|
37
|
+
warnings: z.array(z.string()).describe('What was skipped and why, such as an attachment file that could not be read. Never fatal')
|
|
38
|
+
});
|
|
39
|
+
/** What `atlas report stream --format json` prints when its input ends. */
|
|
40
|
+
export const StreamResultSchema = z.looseObject({
|
|
41
|
+
ok: z.boolean().describe('False when any check could not be sent (the exit code is then 1)'),
|
|
42
|
+
producer: z.string(),
|
|
43
|
+
environment: z.string().nullable(),
|
|
44
|
+
layers: z.number().int().nonnegative().describe('Layers that arrived'),
|
|
45
|
+
checks: z.number().int().nonnegative().describe('Checks that arrived'),
|
|
46
|
+
lost: z.number().int().nonnegative().describe('Checks that never arrived'),
|
|
47
|
+
warnings: z.array(z.string()).describe('Input lines that were skipped, and sends that failed')
|
|
48
|
+
});
|
|
49
|
+
/** What `atlas report merge --format json` prints. */
|
|
50
|
+
export const MergeResultSchema = z.looseObject({
|
|
51
|
+
ok: z.literal(true),
|
|
52
|
+
into: z.string(),
|
|
53
|
+
copied: z.number().int().nonnegative().describe('Objects that were missing in the destination and were copied'),
|
|
54
|
+
skipped: z.number().int().nonnegative().describe('Objects the destination already had'),
|
|
55
|
+
ignored: z.number().int().nonnegative().describe('Objects outside `layers/`, which are never merged')
|
|
56
|
+
});
|
|
57
|
+
/** One thing `atlas report doctor` checked about a store. */
|
|
58
|
+
export const DoctorCheckSchema = z.looseObject({
|
|
59
|
+
name: z.string().describe('`store`, `list`, `contents`, `write`, …'),
|
|
60
|
+
ok: z.boolean(),
|
|
61
|
+
detail: z.string(),
|
|
62
|
+
fix: z.string().optional().describe('What to change, when `ok` is false')
|
|
63
|
+
});
|
|
64
|
+
/** What `atlas report doctor --format json` prints. */
|
|
65
|
+
export const DoctorResultSchema = z.looseObject({
|
|
66
|
+
ok: z.boolean().describe('True when every check of every store passed (otherwise the exit code is 1)'),
|
|
67
|
+
stores: z.array(z.looseObject({ id: z.string(), checks: z.array(DoctorCheckSchema) }))
|
|
68
|
+
});
|
|
69
|
+
/** What any `atlas` command prints on standard error, with `--format json`, when the command itself was wrong (exit code 2). */
|
|
70
|
+
export const CommandErrorSchema = z.looseObject({
|
|
71
|
+
ok: z.literal(false),
|
|
72
|
+
error: z.looseObject({
|
|
73
|
+
message: z.string().describe('What is wrong, and usually what to do about it'),
|
|
74
|
+
code: z.literal('usage').describe('`usage`: the command or its inputs were wrong. Nothing was written')
|
|
75
|
+
})
|
|
76
|
+
});
|
|
77
|
+
/** A test suite `atlas init` found, and the commands that run it and send its results. */
|
|
78
|
+
export const InitSuiteSchema = z.looseObject({
|
|
79
|
+
id: z.string().describe('A stable name for the suite, lowercase: `vitest`, `playwright`, `pytest`, … Used as the default `--producer`'),
|
|
80
|
+
runner: z.string().describe('What runs it: `vitest`, `jest`, `playwright`, `bun-test`, `mocha`, `cypress`, `cucumber`, `pytest`, `go-test`, `atlas-statecharts`'),
|
|
81
|
+
evidence: z.string().describe('Where the detection came from, such as `package.json devDependencies: vitest`'),
|
|
82
|
+
run: z.string().describe('A command that runs the suite and writes its results to `output`. Its exit code is the suite\'s; publish regardless'),
|
|
83
|
+
output: z.string().describe('The file the results are written to'),
|
|
84
|
+
format: z.enum(['junit', 'ctrf', 'manifest']).describe('How `publish` should read `output`: `--junit`, `--ctrf` or `--manifest`'),
|
|
85
|
+
environment: z.string().nullable().describe('The client the suite checks (`desktop-web`, `ios`, …) when that is known; null when it should be chosen'),
|
|
86
|
+
publish: z.string().describe('The command that sends `output` to the server'),
|
|
87
|
+
stream: z.string().nullable().describe('The command that streams checks as they finish, when the runner can print them as JSON lines; else null'),
|
|
88
|
+
prerequisites: z.array(z.string()).describe('What must be installed or configured first, as commands (`bun add -d jest-junit`)')
|
|
89
|
+
});
|
|
90
|
+
/** A file `atlas init` creates or updates. */
|
|
91
|
+
export const InitFileSchema = z.looseObject({
|
|
92
|
+
path: z.string().describe('Relative to the project directory'),
|
|
93
|
+
action: z.enum(['create', 'update', 'unchanged']).describe('`unchanged`: already what it would write, so applying changes nothing'),
|
|
94
|
+
purpose: z.string(),
|
|
95
|
+
content: z.string().describe('The whole file as it would be written')
|
|
96
|
+
});
|
|
97
|
+
/**
|
|
98
|
+
* What `atlas init --format json` prints: everything found about the project, and everything it would change.
|
|
99
|
+
* Without `--write` nothing is changed. With `--write`, the files are written and `written` says which.
|
|
100
|
+
*/
|
|
101
|
+
export const InitPlanSchema = z.looseObject({
|
|
102
|
+
ok: z.boolean().describe('False when `verification` was asked for and failed (the exit code is then 1)'),
|
|
103
|
+
directory: z.string(),
|
|
104
|
+
project: z.looseObject({
|
|
105
|
+
name: z.string().nullable(),
|
|
106
|
+
packageManager: z.enum(['bun', 'pnpm', 'yarn', 'npm']).nullable(),
|
|
107
|
+
languages: z.array(z.string())
|
|
108
|
+
}),
|
|
109
|
+
git: z.looseObject({ branch: z.string().nullable(), defaultBranch: z.string().describe('`main` unless the repository says otherwise') }),
|
|
110
|
+
ci: z.enum(['github-actions', 'gitlab-ci', 'circleci', 'none']),
|
|
111
|
+
server: z.looseObject({ url: z.string().nullable(), tokenEnv: z.literal('ATLAS_TOKEN') }),
|
|
112
|
+
specs: z.looseObject({
|
|
113
|
+
directory: z.string().nullable().describe('The folder to pass as `--specs`, relative to the project; null when no spec files were found'),
|
|
114
|
+
kinds: z.record(z.string(), z.number().int().nonnegative()).describe('Spec files by kind: `gherkin`, `quint`, `dmn`, `alloy`, `openslo`, `scxml`, …')
|
|
115
|
+
}),
|
|
116
|
+
suites: z.array(InitSuiteSchema),
|
|
117
|
+
files: z.array(InitFileSchema),
|
|
118
|
+
written: z.array(z.string()).describe('The files `--write` wrote; empty without it'),
|
|
119
|
+
verification: z.looseObject({
|
|
120
|
+
reachable: z.boolean(), role: z.string().nullable(), canPublish: z.boolean(), error: z.string().nullable()
|
|
121
|
+
}).nullable().describe('Present with `--verify` (and a server): whether the server answers, and what the token in `ATLAS_TOKEN` may do'),
|
|
122
|
+
nextSteps: z.array(z.string()).describe('What to do next, in order, as plain instructions an agent can follow'),
|
|
123
|
+
warnings: z.array(z.string())
|
|
124
|
+
});
|
|
@@ -1,11 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module Shared statechart vocabulary
|
|
3
|
+
*
|
|
4
|
+
* Small schemas and types used by both the run manifest (`manifest.ts`) and the spec formats (`spec.ts`): the status
|
|
5
|
+
* of a run result, who sends an event, how sure a spec is, screenshot references, status tallies, the shape of a
|
|
6
|
+
* reading problem, and the transition id convention. The statuses and kinds are written by `atlas run` and read by
|
|
7
|
+
* the visualizer.
|
|
8
|
+
*
|
|
9
|
+
* @see docs/statecharts.md
|
|
10
|
+
*/
|
|
1
11
|
import { z } from 'zod/v4';
|
|
12
|
+
/**
|
|
13
|
+
* Outcome of a state, transition, path or journey in a statechart run: `passed`, `failed`, `flaky` (failed on the
|
|
14
|
+
* first attempt and passed on the retry) or `not-reached` (no path got there, or the path was blocked before it).
|
|
15
|
+
*/
|
|
2
16
|
export declare const RUN_STATUSES: readonly ["passed", "failed", "flaky", "not-reached"];
|
|
17
|
+
/** Zod enum over `RUN_STATUSES`. */
|
|
3
18
|
export declare const RunStatusSchema: z.ZodEnum<{
|
|
4
19
|
passed: "passed";
|
|
5
20
|
failed: "failed";
|
|
6
21
|
flaky: "flaky";
|
|
7
22
|
"not-reached": "not-reached";
|
|
8
23
|
}>;
|
|
24
|
+
/** One of `RUN_STATUSES`. */
|
|
9
25
|
export type RunStatus = z.infer<typeof RunStatusSchema>;
|
|
10
26
|
/**
|
|
11
27
|
* Who or what sends an event: a person using the product (`user`), another system (`system`), the
|
|
@@ -13,19 +29,35 @@ export type RunStatus = z.infer<typeof RunStatusSchema>;
|
|
|
13
29
|
* `member` is read as `user`, for specs written before the kinds were renamed.
|
|
14
30
|
*/
|
|
15
31
|
export declare const EVENT_KINDS: readonly ["user", "system", "time", "hand-off"];
|
|
32
|
+
/**
|
|
33
|
+
* Zod schema for an `EVENT_KINDS` value that first rewrites the legacy value `member` to `user`, so specs written
|
|
34
|
+
* before the kinds were renamed still parse.
|
|
35
|
+
*/
|
|
16
36
|
export declare const EventKindSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodEnum<{
|
|
17
37
|
time: "time";
|
|
18
38
|
user: "user";
|
|
19
39
|
system: "system";
|
|
20
40
|
"hand-off": "hand-off";
|
|
21
41
|
}>>;
|
|
42
|
+
/** One of `EVENT_KINDS`. */
|
|
22
43
|
export type EventKind = z.infer<typeof EventKindSchema>;
|
|
44
|
+
/**
|
|
45
|
+
* How sure a spec is about a state's description (`meta.confidence`): `confirmed` or `assumed`. A run records
|
|
46
|
+
* `assumed` for a state whose spec does not say.
|
|
47
|
+
*/
|
|
23
48
|
export declare const CONFIDENCES: readonly ["confirmed", "assumed"];
|
|
49
|
+
/** Zod enum over `CONFIDENCES`. */
|
|
24
50
|
export declare const ConfidenceSchema: z.ZodEnum<{
|
|
25
51
|
confirmed: "confirmed";
|
|
26
52
|
assumed: "assumed";
|
|
27
53
|
}>;
|
|
54
|
+
/** One of `CONFIDENCES`. */
|
|
28
55
|
export type Confidence = z.infer<typeof ConfidenceSchema>;
|
|
56
|
+
/**
|
|
57
|
+
* A screenshot of a state in a run manifest: `png` and an optional `webp` thumbnail, as paths relative to the run
|
|
58
|
+
* directory (the folder holding `manifest.json`), plus the other clients' screens at the same moment in a
|
|
59
|
+
* multi-client run.
|
|
60
|
+
*/
|
|
29
61
|
export declare const ImageSchema: z.ZodObject<{
|
|
30
62
|
png: z.ZodString;
|
|
31
63
|
webp: z.ZodOptional<z.ZodString>;
|
|
@@ -36,7 +68,12 @@ export declare const ImageSchema: z.ZodObject<{
|
|
|
36
68
|
client: z.ZodOptional<z.ZodString>;
|
|
37
69
|
}, z.core.$strip>>>;
|
|
38
70
|
}, z.core.$strip>;
|
|
71
|
+
/** A parsed `ImageSchema` value. */
|
|
39
72
|
export type Image = z.infer<typeof ImageSchema>;
|
|
73
|
+
/**
|
|
74
|
+
* Tally of states or transitions by status: `total` and one count per `RUN_STATUSES` value (`notReached` for
|
|
75
|
+
* `not-reached`). Used by manifest coverage and run summaries.
|
|
76
|
+
*/
|
|
40
77
|
export declare const CountSchema: z.ZodObject<{
|
|
41
78
|
total: z.ZodNumber;
|
|
42
79
|
passed: z.ZodNumber;
|
|
@@ -44,14 +81,30 @@ export declare const CountSchema: z.ZodObject<{
|
|
|
44
81
|
flaky: z.ZodNumber;
|
|
45
82
|
notReached: z.ZodNumber;
|
|
46
83
|
}, z.core.$strip>;
|
|
84
|
+
/** A parsed `CountSchema` value. */
|
|
47
85
|
export type Count = z.infer<typeof CountSchema>;
|
|
86
|
+
/** Severities of a `DataIssue`, most serious first: `error`, `warning`, `info`. */
|
|
48
87
|
export declare const ISSUE_SEVERITIES: readonly ["error", "warning", "info"];
|
|
88
|
+
/** One of `ISSUE_SEVERITIES`. */
|
|
49
89
|
export type IssueSeverity = (typeof ISSUE_SEVERITIES)[number];
|
|
90
|
+
/**
|
|
91
|
+
* A problem found while reading a spec or manifest file, in words a non-engineer can read: how serious it is, which
|
|
92
|
+
* file, where in the file (path segments joined with ` › `), and what is wrong. The visualizer shows these instead of
|
|
93
|
+
* failing to load.
|
|
94
|
+
*/
|
|
50
95
|
export type DataIssue = {
|
|
51
96
|
severity: IssueSeverity;
|
|
52
97
|
file: string;
|
|
53
98
|
path: string;
|
|
54
99
|
message: string;
|
|
55
100
|
};
|
|
101
|
+
/**
|
|
102
|
+
* Separator inside a transition id (`<source state> :: <event>`). Ids are not escaped, so a state name containing it
|
|
103
|
+
* makes an id ambiguous. The same value as core's `TRANSITION_SEPARATOR`.
|
|
104
|
+
*/
|
|
56
105
|
export declare const TRANSITION_ID_SEPARATOR = " :: ";
|
|
106
|
+
/**
|
|
107
|
+
* Builds the id of a transition, the key of `transitions` in a manifest: the source state's name,
|
|
108
|
+
* `TRANSITION_ID_SEPARATOR`, then the event name.
|
|
109
|
+
*/
|
|
57
110
|
export declare function transitionId(source: string, event: string): string;
|