@crvouga/atlas 0.5.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +51 -16
  3. package/dist/core/src/cli.d.ts +1 -1
  4. package/dist/core/src/cli.js +8 -3
  5. package/dist/core/src/config.d.ts +7 -0
  6. package/dist/core/src/config.js +48 -14
  7. package/dist/core/src/run/execute.d.ts +6 -0
  8. package/dist/core/src/run/execute.js +4 -2
  9. package/dist/reports/src/doctor.d.ts +1 -1
  10. package/dist/reports/src/doctor.js +3 -1
  11. package/dist/reports/src/http-store.d.ts +4 -0
  12. package/dist/reports/src/http-store.js +6 -3
  13. package/dist/reports/src/init.js +24 -16
  14. package/dist/reports/src/live-reporter.d.ts +34 -0
  15. package/dist/reports/src/live-reporter.js +122 -0
  16. package/dist/reports/src/package-managers.d.ts +35 -0
  17. package/dist/reports/src/package-managers.js +23 -0
  18. package/dist/reports/src/report-cli.d.ts +1 -1
  19. package/dist/reports/src/report-cli.js +3 -2
  20. package/dist/reports/src/store-url.js +1 -1
  21. package/dist/runners/src/codecept.d.ts +14 -0
  22. package/dist/runners/src/codecept.js +16 -0
  23. package/dist/runners/src/jest.d.ts +50 -0
  24. package/dist/runners/src/jest.js +52 -0
  25. package/dist/runners/src/mocha.d.ts +40 -0
  26. package/dist/runners/src/mocha.js +39 -0
  27. package/dist/runners/src/node-test.d.ts +28 -0
  28. package/dist/runners/src/node-test.js +44 -0
  29. package/dist/runners/src/publish.d.ts +30 -0
  30. package/dist/runners/src/publish.js +68 -0
  31. package/dist/schema/src/api.d.ts +1 -0
  32. package/dist/schema/src/api.js +1 -1
  33. package/dist/schema/src/cli-results.d.ts +233 -2
  34. package/dist/schema/src/cli-results.js +14 -0
  35. package/dist/schema/src/index.d.ts +2 -0
  36. package/dist/schema/src/index.js +2 -0
  37. package/dist/schema/src/live-run.d.ts +123 -0
  38. package/dist/schema/src/live-run.js +30 -0
  39. package/dist/schema/src/manifest.d.ts +2 -2
  40. package/dist/schema/src/project.d.ts +20 -0
  41. package/dist/schema/src/project.js +10 -0
  42. package/dist/schema/src/report-sources.d.ts +1 -0
  43. package/dist/schema/src/report-sources.js +2 -1
  44. package/dist/schema/src/runs-index.d.ts +1 -1
  45. package/dist/schema/src/server-config.d.ts +84 -0
  46. package/dist/schema/src/server-config.js +12 -0
  47. package/dist/server/src/app.d.ts +10 -0
  48. package/dist/server/src/app.js +148 -10
  49. package/dist/server/src/config.d.ts +1 -1
  50. package/dist/server/src/config.js +20 -3
  51. package/dist/server/src/dev.d.ts +3 -3
  52. package/dist/server/src/dev.js +22 -13
  53. package/dist/server/src/events.d.ts +3 -3
  54. package/dist/server/src/events.js +1 -1
  55. package/dist/server/src/index.d.ts +2 -0
  56. package/dist/server/src/index.js +2 -0
  57. package/dist/server/src/live-runs.d.ts +52 -0
  58. package/dist/server/src/live-runs.js +229 -0
  59. package/dist/server/src/llms.js +17 -8
  60. package/dist/server/src/main.d.ts +1 -1
  61. package/dist/server/src/main.js +7 -5
  62. package/dist/server/src/openapi.d.ts +2 -5
  63. package/dist/server/src/openapi.js +71 -7
  64. package/dist/server/src/projects.d.ts +3 -0
  65. package/dist/server/src/projects.js +154 -0
  66. package/dist/server/src/settings-page.d.ts +9 -0
  67. package/dist/server/src/settings-page.js +93 -0
  68. package/dist/server/src/settings.d.ts +23 -0
  69. package/dist/server/src/settings.js +72 -0
  70. package/dist/server/src/site.d.ts +8 -6
  71. package/dist/server/src/site.js +45 -10
  72. package/dist/server/src/store-api.js +43 -22
  73. package/docs/agents.md +166 -15
  74. package/docs/deploying.md +24 -20
  75. package/docs/dogfooding.md +7 -3
  76. package/docs/extending.md +3 -3
  77. package/docs/integrating.md +19 -11
  78. package/docs/quickstart.md +81 -0
  79. package/docs/reference/cli.md +9 -7
  80. package/docs/reference/core.md +6 -0
  81. package/docs/reference/http-api.md +498 -2
  82. package/docs/reference/reports.md +84 -1
  83. package/docs/reference/runners.md +169 -0
  84. package/docs/reference/schema.md +120 -0
  85. package/docs/reference/server.md +154 -14
  86. package/docs/report-backends.md +8 -8
  87. package/docs/report-contract.md +7 -7
  88. package/docs/reporting-issues.md +3 -3
  89. package/docs/runners.md +69 -0
  90. package/docs/server.md +155 -25
  91. package/docs/statecharts.md +22 -20
  92. package/llms-full.txt +1079 -126
  93. package/llms.txt +7 -4
  94. package/package.json +33 -9
  95. package/packages/core/README.md +3 -1
  96. package/packages/runners/README.md +6 -0
  97. package/packages/runners/compat/codecept.cjs +2 -0
  98. package/packages/runners/compat/jest.cjs +2 -0
  99. package/packages/runners/compat/mocha.cjs +2 -0
  100. package/packages/schema/schemas/atlas-change.schema.json +4 -0
  101. package/packages/schema/schemas/hello-event.schema.json +4 -0
  102. package/packages/schema/schemas/live-run-start.schema.json +42 -0
  103. package/packages/schema/schemas/live-run-update.schema.json +93 -0
  104. package/packages/schema/schemas/live-run.schema.json +225 -0
  105. package/packages/schema/schemas/project-slug.schema.json +8 -0
  106. package/packages/schema/schemas/project.schema.json +22 -0
  107. package/packages/schema/schemas/projects.schema.json +33 -0
  108. package/packages/schema/schemas/server-config.schema.json +14 -0
  109. package/packages/schema/schemas/server-editable-settings.schema.json +132 -0
  110. package/packages/schema/schemas/server-settings-snapshot.schema.json +285 -0
  111. package/packages/server/openapi.json +5101 -779
  112. package/packages/visualizer/README.md +13 -13
  113. package/packages/visualizer/bin/atlas-client.mjs +176 -0
  114. package/packages/visualizer/bin/atlas-visualizer.mjs +2 -175
  115. package/packages/visualizer/src/app/AppShell.tsx +26 -17
  116. package/packages/visualizer/src/app/report-sources.tsx +2 -1
  117. package/packages/visualizer/src/components/ActivityIndicator.module.css +4 -0
  118. package/packages/visualizer/src/components/ActivityIndicator.tsx +6 -0
  119. package/packages/visualizer/src/components/Header.module.css +101 -227
  120. package/packages/visualizer/src/components/Header.tsx +79 -41
  121. package/packages/visualizer/src/components/ProjectPicker.tsx +64 -0
  122. package/packages/visualizer/src/data/adapters/report-backend.test.ts +3 -2
  123. package/packages/visualizer/src/data/adapters/report-backend.ts +1 -1
  124. package/packages/visualizer/src/data/queries.ts +14 -7
  125. package/packages/visualizer/src/evidence/api.ts +2 -1
  126. package/packages/visualizer/src/evidence/check-detail.tsx +19 -4
  127. package/packages/visualizer/src/evidence/document-page.tsx +6 -2
  128. package/packages/visualizer/src/evidence/evidence-context.tsx +17 -12
  129. package/packages/visualizer/src/evidence/evidence.module.css +11 -1
  130. package/packages/visualizer/src/evidence/feature-page.tsx +7 -3
  131. package/packages/visualizer/src/evidence/model-page.tsx +6 -2
  132. package/packages/visualizer/src/evidence/project-home.tsx +45 -0
  133. package/packages/visualizer/src/evidence/recording-page.tsx +4 -1
  134. package/packages/visualizer/src/evidence/spec-index.tsx +2 -1
  135. package/packages/visualizer/src/evidence/test-filter.tsx +21 -0
  136. package/packages/visualizer/src/live/live-query.ts +21 -0
  137. package/packages/visualizer/src/live/live-runs.tsx +69 -0
  138. package/packages/visualizer/src/live/live-stream.ts +30 -9
  139. package/packages/visualizer/src/live/report-progress.ts +62 -0
  140. package/packages/visualizer/src/live/test-progress.tsx +34 -0
  141. package/packages/visualizer/src/runtime.ts +17 -1
  142. package/packages/visualizer/src/state/ui-store.ts +3 -2
  143. package/packages/visualizer/src/views/ChartPage.tsx +2 -0
  144. package/packages/visualizer/src/views/ChartTests.tsx +43 -0
  145. package/packages/visualizer/src/views/SidePanel.tsx +2 -0
  146. package/packages/visualizer/vite/atlas-files.test.ts +4 -4
  147. package/packages/visualizer/vite/atlas-files.ts +1 -5
  148. package/packages/visualizer/vite/atlas-server-proxy.ts +2 -1
package/llms.txt CHANGED
@@ -1,17 +1,19 @@
1
1
  # Atlas
2
2
 
3
- > Atlas shows whether a product still does what it was specified to do. Test results from any suite on any machine are published as immutable layers; a report is computed from layers, never partitioned, and one Atlas server per project keeps them and shows everyone the combined report, live. Specs of any kind (Gherkin, Quint, DMN, Alloy, OpenSLO, statecharts); evidence of any kind (screenshots, videos, traces, logs). Distributed as the npm package `@crvouga/atlas`; runs on Bun and Node.
3
+ > Atlas shows whether a product still does what it was specified to do. Test results from any suite on any machine are published as immutable layers; a report is computed from layers, and a shared Atlas server hosts projects selected by slug and shows each project's combined report, live. Directory stores also work without a server. Specs of any kind (Gherkin, Quint, DMN, Alloy, OpenSLO, statecharts); evidence of any kind (screenshots, videos, traces, logs). Distributed as the npm package `@crvouga/atlas`; runs on Bun and Node.
4
4
 
5
- To integrate a project: `bunx @crvouga/atlas init --server <url> --format json` prints a plan; `--write` applies it. Everything prints JSON on request, has a JSON Schema, and exits 0 (worked), 1 (the answer is no) or 2 (the command was wrong).
5
+ Given only the repository link, start at docs/agents.md: install `@crvouga/atlas` in the consumer project with its own package manager, then read the version-matched docs in the installed package. No clone or Atlas build is needed. docs/quickstart.md verifies local publishing and gating without a server or token. For a shared server, `atlas init --server <url> --format json` prints a plan; `--write` applies it. Report commands and init support JSON with published schemas; exits are 0 (worked), 1 (the answer is no), 2 (the command was wrong).
6
6
 
7
7
  ## Start here
8
8
 
9
- - [Atlas for AI agents](https://raw.githubusercontent.com/crvouga/atlas/main/docs/agents.md): Everything an agent needs to integrate a project with Atlas, send it test results, and read them back, with nothing to click and nothing to guess.
9
+ - [Atlas for AI agents](https://raw.githubusercontent.com/crvouga/atlas/main/docs/agents.md): Start here when given the Atlas repository link to integrate it into another project.
10
+ - [Verify Atlas locally](https://raw.githubusercontent.com/crvouga/atlas/main/docs/quickstart.md): Prove that the installed Atlas can publish, combine and gate evidence before connecting your project's real suites.
10
11
  - [Integrating Atlas into a project](https://raw.githubusercontent.com/crvouga/atlas/main/docs/integrating.md): This guide takes a project from nothing to a layered, gated report of its specs.
12
+ - [Native test runner reporters](https://raw.githubusercontent.com/crvouga/atlas/main/docs/runners.md): Projects upload results to a shared Atlas node under their own project slug.
11
13
 
12
14
  ## Run and use the server
13
15
 
14
- - [The Atlas server](https://raw.githubusercontent.com/crvouga/atlas/main/docs/server.md): One process per project that takes in results from every environment, keeps them, and shows everyone the combined report, live.
16
+ - [The Atlas server](https://raw.githubusercontent.com/crvouga/atlas/main/docs/server.md): One node for multiple projects that takes in results from every environment, keeps them, and shows everyone the combined report, live.
15
17
  - [Running Atlas for a project: one server](https://raw.githubusercontent.com/crvouga/atlas/main/docs/deploying.md): This is the production setup. A project runs one Atlas server.
16
18
 
17
19
  ## Formats and rules
@@ -39,6 +41,7 @@ To integrate a project: `bunx @crvouga/atlas init --server <url> --format json`
39
41
  - [TypeScript API: bun](https://raw.githubusercontent.com/crvouga/atlas/main/docs/reference/bun.md): The Bun WebView driver for statechart runs.
40
42
  - [TypeScript API: webdriver](https://raw.githubusercontent.com/crvouga/atlas/main/docs/reference/webdriver.md): The W3C WebDriver / Appium driver for statechart runs.
41
43
  - [TypeScript API: detox](https://raw.githubusercontent.com/crvouga/atlas/main/docs/reference/detox.md): The Detox driver for statechart runs of React Native apps.
44
+ - [TypeScript API: runners](https://raw.githubusercontent.com/crvouga/atlas/main/docs/reference/runners.md): Native reporters that upload to the project server.
42
45
  - [TypeScript API: vitest](https://raw.githubusercontent.com/crvouga/atlas/main/docs/reference/vitest.md): Run a statechart plan as Vitest tests.
43
46
  - [JSON Schemas](https://unpkg.com/@crvouga/atlas/packages/schema/schemas/): the layer format, checks file, report status, command results, server responses, server configuration.
44
47
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crvouga/atlas",
3
- "version": "0.5.0",
3
+ "version": "0.6.1",
4
4
  "description": "Atlas: specs of any kind, reported as layered evidence. Publish checks from any runner (JUnit, CTRF, a script), combine them across nodes, branches, environments and backends, gate CI on the result, and run statecharts against the real app.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -92,7 +92,26 @@
92
92
  "./schemas/*": "./packages/schema/schemas/*",
93
93
  "./openapi.json": "./packages/server/openapi.json",
94
94
  "./llms.txt": "./llms.txt",
95
- "./llms-full.txt": "./llms-full.txt"
95
+ "./llms-full.txt": "./llms-full.txt",
96
+ "./mocha": {
97
+ "types": "./dist/runners/src/mocha.d.ts",
98
+ "require": "./packages/runners/compat/mocha.cjs",
99
+ "default": "./dist/runners/src/mocha.js"
100
+ },
101
+ "./codecept": {
102
+ "types": "./dist/runners/src/codecept.d.ts",
103
+ "require": "./packages/runners/compat/codecept.cjs",
104
+ "default": "./dist/runners/src/codecept.js"
105
+ },
106
+ "./jest": {
107
+ "types": "./dist/runners/src/jest.d.ts",
108
+ "require": "./packages/runners/compat/jest.cjs",
109
+ "default": "./dist/runners/src/jest.js"
110
+ },
111
+ "./node-test": {
112
+ "types": "./dist/runners/src/node-test.d.ts",
113
+ "default": "./dist/runners/src/node-test.js"
114
+ }
96
115
  },
97
116
  "publishConfig": {
98
117
  "access": "public",
@@ -106,6 +125,7 @@
106
125
  "llms.txt",
107
126
  "llms-full.txt",
108
127
  "docs/agents.md",
128
+ "docs/quickstart.md",
109
129
  "docs/reference",
110
130
  "packages/visualizer/bin",
111
131
  "packages/visualizer/example",
@@ -126,7 +146,9 @@
126
146
  "docs/report-backends.md",
127
147
  "docs/dogfooding.md",
128
148
  "docs/reporting-issues.md",
129
- "CHANGELOG.md"
149
+ "CHANGELOG.md",
150
+ "docs/runners.md",
151
+ "packages/runners/compat"
130
152
  ],
131
153
  "scripts": {
132
154
  "build": "bun scripts/build-package.ts",
@@ -134,11 +156,12 @@
134
156
  "type-check": "for dir in packages/* scripts scripts/docs examples/todo; do tsc --noEmit -p \"$dir\" || exit 1; done",
135
157
  "schemas": "bun packages/schema/scripts/emit-json-schemas.ts",
136
158
  "docs": "bun scripts/docs/generate.ts",
159
+ "docs:check": "bun test scripts/docs scripts/release/docs-links.test.ts packages/schema/tests/schemas.test.ts packages/server/tests/openapi.test.ts packages/server/tests/settings.test.ts",
137
160
  "dev": "bun packages/core/bin/atlas.mjs dev --data .atlas-data",
138
- "viz:dev": "bun packages/visualizer/bin/atlas-visualizer.mjs dev --specs \"$(pwd)/packages/visualizer/fixtures/full/specs\" --runs \"$(pwd)/packages/visualizer/fixtures/full/runs\"",
139
- "viz:build": "cd packages/visualizer && INIT_CWD=\"$OLDPWD\" bun --bun vite build --configLoader runner",
140
- "viz:publish-data": "bun packages/visualizer/scripts/publish-data.ts",
141
- "viz:fixtures": "bun packages/visualizer/scripts/make-fixtures.ts",
161
+ "client:dev": "bun packages/core/bin/atlas.mjs dev",
162
+ "client:build": "bun packages/core/bin/atlas.mjs client build --no-data",
163
+ "client:publish-data": "bun packages/visualizer/scripts/publish-data.ts",
164
+ "client:fixtures": "bun packages/visualizer/scripts/make-fixtures.ts",
142
165
  "example:start": "bun examples/todo/server.ts",
143
166
  "example:lint": "bun --cwd examples/todo ../../packages/core/bin/atlas.mjs lint --require-implementations",
144
167
  "example:plan": "bun --cwd examples/todo ../../packages/core/bin/atlas.mjs plan",
@@ -147,13 +170,14 @@
147
170
  "example:clients": "bun --cwd examples/todo ../../packages/core/bin/atlas.mjs run --config clients/atlas.config.ts --mode showcase",
148
171
  "example:clients:bun": "ATLAS_DESKTOP=bun bun --cwd examples/todo ../../packages/core/bin/atlas.mjs run --config clients/atlas.config.ts --mode showcase",
149
172
  "atlas:run": "status=0; bun run example:clients || status=$?; bun run example:run || status=$?; exit $status",
150
- "atlas:viz": "ATLAS_REPORTS_MODULE=\"$(pwd)/examples/todo/reports-dev.ts\" bun packages/visualizer/bin/atlas-visualizer.mjs dev --specs examples/todo/specs --runs examples/todo/atlas-runs",
151
173
  "release:plan": "bun scripts/release/plan.ts",
152
174
  "release:publish": "bun scripts/release/publish.ts",
153
175
  "release:smoke": "bun scripts/release/consumer-smoke.ts",
154
176
  "release:seed": "bun scripts/release/seed.ts",
155
177
  "health": "bun scripts/health/cli.ts",
156
- "prepare": "husky"
178
+ "prepare": "husky",
179
+ "example:publish": "bun examples/todo/publish.ts",
180
+ "atlas": "bun scripts/atlas.mjs"
157
181
  },
158
182
  "dependencies": {
159
183
  "@cucumber/gherkin": "^42.0.1",
@@ -9,7 +9,9 @@ any driver, and write a manifest with JUnit, CTRF, Mermaid and WebVTT alongside.
9
9
  bun add -d @crvouga/atlas
10
10
  ```
11
11
 
12
- Runs on Bun, or on Node 22.18 or later.
12
+ <!-- generated:runtime-requirements -->
13
+ Supported runtimes (from `package.json`): **node `>=22.18.0`** or **bun `>=1.2.0`**. Node consumers do not need Bun unless they use the Bun WebView driver.
14
+ <!-- /generated:runtime-requirements -->
13
15
 
14
16
  ## Use
15
17
 
@@ -0,0 +1,6 @@
1
+ # Native reporters
2
+
3
+ Native CodeceptJS, Mocha, Jest and Node test runner reporters upload checks to a project's Atlas server.
4
+ They are entry points of `@crvouga/atlas`, not separate packages.
5
+
6
+ See [runner setup](../../docs/runners.md) and [generated API reference](../../docs/reference/runners.md).
@@ -0,0 +1,2 @@
1
+ // CodeceptJS's bundled Mocha loads reporters with require() and expects the constructor itself.
2
+ module.exports = require('../../../dist/runners/src/codecept.js').default;
@@ -0,0 +1,2 @@
1
+ // Jest versions which use require() expect the reporter constructor itself.
2
+ module.exports = require('../../../dist/runners/src/jest.js').default;
@@ -0,0 +1,2 @@
1
+ // Older Mocha versions require the constructor directly rather than an ESM namespace.
2
+ module.exports = require('../../../dist/runners/src/mocha.js').default;
@@ -26,6 +26,10 @@
26
26
  },
27
27
  "sourceId": {
28
28
  "type": "string"
29
+ },
30
+ "liveRunId": {
31
+ "description": "A live lease changed; its bounded snapshot is also sent as a run event",
32
+ "type": "string"
29
33
  }
30
34
  },
31
35
  "required": [
@@ -11,6 +11,10 @@
11
11
  },
12
12
  "time": {
13
13
  "type": "number"
14
+ },
15
+ "heartbeatMs": {
16
+ "type": "number",
17
+ "exclusiveMinimum": 0
14
18
  }
15
19
  },
16
20
  "required": [
@@ -0,0 +1,42 @@
1
+ {
2
+ "$id": "https://github.com/crvouga/atlas/schemas/live-run-start.schema.json",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "id": {
7
+ "type": "string",
8
+ "format": "uuid",
9
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
10
+ },
11
+ "producer": {
12
+ "type": "string",
13
+ "minLength": 1,
14
+ "maxLength": 200
15
+ },
16
+ "title": {
17
+ "type": "string",
18
+ "maxLength": 2048
19
+ },
20
+ "environment": {
21
+ "type": "string",
22
+ "maxLength": 200
23
+ },
24
+ "branch": {
25
+ "type": "string",
26
+ "maxLength": 500
27
+ },
28
+ "sha": {
29
+ "type": "string",
30
+ "maxLength": 200
31
+ },
32
+ "plannedChecks": {
33
+ "type": "integer",
34
+ "minimum": 0,
35
+ "maximum": 1000000
36
+ }
37
+ },
38
+ "required": [
39
+ "id",
40
+ "producer"
41
+ ]
42
+ }
@@ -0,0 +1,93 @@
1
+ {
2
+ "$id": "https://github.com/crvouga/atlas/schemas/live-run-update.schema.json",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "sequence": {
7
+ "type": "integer",
8
+ "exclusiveMinimum": 0,
9
+ "maximum": 9007199254740991
10
+ },
11
+ "checks": {
12
+ "default": [],
13
+ "maxItems": 1000,
14
+ "type": "array",
15
+ "items": {
16
+ "type": "object",
17
+ "properties": {
18
+ "id": {
19
+ "type": "string",
20
+ "minLength": 1,
21
+ "maxLength": 16384
22
+ },
23
+ "title": {
24
+ "type": "string",
25
+ "minLength": 1,
26
+ "maxLength": 2048
27
+ },
28
+ "status": {
29
+ "type": "string",
30
+ "enum": [
31
+ "running",
32
+ "passed",
33
+ "failed",
34
+ "not-run"
35
+ ]
36
+ },
37
+ "detail": {
38
+ "default": "",
39
+ "type": "string",
40
+ "maxLength": 8000
41
+ },
42
+ "specPath": {
43
+ "type": "string",
44
+ "maxLength": 2048
45
+ },
46
+ "durationMs": {
47
+ "type": "number",
48
+ "minimum": 0
49
+ },
50
+ "steps": {
51
+ "maxItems": 20,
52
+ "type": "array",
53
+ "items": {
54
+ "type": "object",
55
+ "properties": {
56
+ "name": {
57
+ "type": "string",
58
+ "maxLength": 2048
59
+ },
60
+ "status": {
61
+ "type": "string",
62
+ "maxLength": 100
63
+ }
64
+ },
65
+ "required": [
66
+ "name"
67
+ ]
68
+ }
69
+ }
70
+ },
71
+ "required": [
72
+ "id",
73
+ "title",
74
+ "status"
75
+ ]
76
+ }
77
+ },
78
+ "finish": {
79
+ "type": "string",
80
+ "enum": [
81
+ "completed",
82
+ "interrupted"
83
+ ]
84
+ },
85
+ "reason": {
86
+ "type": "string",
87
+ "maxLength": 2000
88
+ }
89
+ },
90
+ "required": [
91
+ "sequence"
92
+ ]
93
+ }
@@ -0,0 +1,225 @@
1
+ {
2
+ "$id": "https://github.com/crvouga/atlas/schemas/live-run.schema.json",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "id": {
7
+ "type": "string",
8
+ "format": "uuid",
9
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
10
+ },
11
+ "producer": {
12
+ "type": "string",
13
+ "minLength": 1,
14
+ "maxLength": 200
15
+ },
16
+ "title": {
17
+ "type": "string",
18
+ "maxLength": 2048
19
+ },
20
+ "environment": {
21
+ "type": "string",
22
+ "maxLength": 200
23
+ },
24
+ "branch": {
25
+ "type": "string",
26
+ "maxLength": 500
27
+ },
28
+ "sha": {
29
+ "type": "string",
30
+ "maxLength": 200
31
+ },
32
+ "plannedChecks": {
33
+ "type": "integer",
34
+ "minimum": 0,
35
+ "maximum": 1000000
36
+ },
37
+ "status": {
38
+ "type": "string",
39
+ "enum": [
40
+ "running",
41
+ "completed",
42
+ "interrupted"
43
+ ]
44
+ },
45
+ "startedAtMs": {
46
+ "type": "number"
47
+ },
48
+ "lastHeartbeatAtMs": {
49
+ "type": "number"
50
+ },
51
+ "lastProgressAtMs": {
52
+ "type": "number"
53
+ },
54
+ "finishedAtMs": {
55
+ "type": "number"
56
+ },
57
+ "reason": {
58
+ "type": "string"
59
+ },
60
+ "sequence": {
61
+ "type": "number"
62
+ },
63
+ "completed": {
64
+ "type": "number"
65
+ },
66
+ "passed": {
67
+ "type": "number"
68
+ },
69
+ "failed": {
70
+ "type": "number"
71
+ },
72
+ "notRun": {
73
+ "type": "number"
74
+ },
75
+ "running": {
76
+ "type": "number"
77
+ },
78
+ "current": {
79
+ "type": "array",
80
+ "items": {
81
+ "type": "object",
82
+ "properties": {
83
+ "id": {
84
+ "type": "string",
85
+ "minLength": 1,
86
+ "maxLength": 16384
87
+ },
88
+ "title": {
89
+ "type": "string",
90
+ "minLength": 1,
91
+ "maxLength": 2048
92
+ },
93
+ "status": {
94
+ "type": "string",
95
+ "enum": [
96
+ "running",
97
+ "passed",
98
+ "failed",
99
+ "not-run"
100
+ ]
101
+ },
102
+ "detail": {
103
+ "default": "",
104
+ "type": "string",
105
+ "maxLength": 8000
106
+ },
107
+ "specPath": {
108
+ "type": "string",
109
+ "maxLength": 2048
110
+ },
111
+ "durationMs": {
112
+ "type": "number",
113
+ "minimum": 0
114
+ },
115
+ "steps": {
116
+ "maxItems": 20,
117
+ "type": "array",
118
+ "items": {
119
+ "type": "object",
120
+ "properties": {
121
+ "name": {
122
+ "type": "string",
123
+ "maxLength": 2048
124
+ },
125
+ "status": {
126
+ "type": "string",
127
+ "maxLength": 100
128
+ }
129
+ },
130
+ "required": [
131
+ "name"
132
+ ]
133
+ }
134
+ }
135
+ },
136
+ "required": [
137
+ "id",
138
+ "title",
139
+ "status"
140
+ ]
141
+ }
142
+ },
143
+ "recent": {
144
+ "type": "array",
145
+ "items": {
146
+ "type": "object",
147
+ "properties": {
148
+ "id": {
149
+ "type": "string",
150
+ "minLength": 1,
151
+ "maxLength": 16384
152
+ },
153
+ "title": {
154
+ "type": "string",
155
+ "minLength": 1,
156
+ "maxLength": 2048
157
+ },
158
+ "status": {
159
+ "type": "string",
160
+ "enum": [
161
+ "running",
162
+ "passed",
163
+ "failed",
164
+ "not-run"
165
+ ]
166
+ },
167
+ "detail": {
168
+ "default": "",
169
+ "type": "string",
170
+ "maxLength": 8000
171
+ },
172
+ "specPath": {
173
+ "type": "string",
174
+ "maxLength": 2048
175
+ },
176
+ "durationMs": {
177
+ "type": "number",
178
+ "minimum": 0
179
+ },
180
+ "steps": {
181
+ "maxItems": 20,
182
+ "type": "array",
183
+ "items": {
184
+ "type": "object",
185
+ "properties": {
186
+ "name": {
187
+ "type": "string",
188
+ "maxLength": 2048
189
+ },
190
+ "status": {
191
+ "type": "string",
192
+ "maxLength": 100
193
+ }
194
+ },
195
+ "required": [
196
+ "name"
197
+ ]
198
+ }
199
+ }
200
+ },
201
+ "required": [
202
+ "id",
203
+ "title",
204
+ "status"
205
+ ]
206
+ }
207
+ }
208
+ },
209
+ "required": [
210
+ "id",
211
+ "producer",
212
+ "status",
213
+ "startedAtMs",
214
+ "lastHeartbeatAtMs",
215
+ "lastProgressAtMs",
216
+ "sequence",
217
+ "completed",
218
+ "passed",
219
+ "failed",
220
+ "notRun",
221
+ "running",
222
+ "current",
223
+ "recent"
224
+ ]
225
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "$id": "https://github.com/crvouga/atlas/schemas/project-slug.schema.json",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "string",
5
+ "minLength": 1,
6
+ "maxLength": 64,
7
+ "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
8
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "$id": "https://github.com/crvouga/atlas/schemas/project.schema.json",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "slug": {
7
+ "type": "string",
8
+ "minLength": 1,
9
+ "maxLength": 64,
10
+ "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
11
+ },
12
+ "name": {
13
+ "type": "string",
14
+ "minLength": 1,
15
+ "maxLength": 200
16
+ }
17
+ },
18
+ "required": [
19
+ "slug",
20
+ "name"
21
+ ]
22
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "$id": "https://github.com/crvouga/atlas/schemas/projects.schema.json",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "projects": {
7
+ "type": "array",
8
+ "items": {
9
+ "type": "object",
10
+ "properties": {
11
+ "slug": {
12
+ "type": "string",
13
+ "minLength": 1,
14
+ "maxLength": 64,
15
+ "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
16
+ },
17
+ "name": {
18
+ "type": "string",
19
+ "minLength": 1,
20
+ "maxLength": 200
21
+ }
22
+ },
23
+ "required": [
24
+ "slug",
25
+ "name"
26
+ ]
27
+ }
28
+ }
29
+ },
30
+ "required": [
31
+ "projects"
32
+ ]
33
+ }
@@ -178,6 +178,20 @@
178
178
  },
179
179
  "additionalProperties": false
180
180
  },
181
+ "runTimeoutSeconds": {
182
+ "description": "Interrupt a live run after this many seconds without a producer heartbeat",
183
+ "default": 30,
184
+ "type": "number",
185
+ "minimum": 10,
186
+ "maximum": 3600
187
+ },
188
+ "runStallSeconds": {
189
+ "description": "Interrupt after this many seconds without test progress; 0 disables progress expiry",
190
+ "default": 900,
191
+ "type": "number",
192
+ "minimum": 0,
193
+ "maximum": 86400
194
+ },
181
195
  "heartbeatSeconds": {
182
196
  "description": "How often a live connection is touched, so proxies keep it open",
183
197
  "default": 15,