@crvouga/atlas 0.5.0 → 0.6.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.
Files changed (140) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +30 -11
  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 +6 -1
  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/report-cli.d.ts +1 -1
  17. package/dist/reports/src/report-cli.js +3 -2
  18. package/dist/reports/src/store-url.js +1 -1
  19. package/dist/runners/src/codecept.d.ts +14 -0
  20. package/dist/runners/src/codecept.js +16 -0
  21. package/dist/runners/src/jest.d.ts +50 -0
  22. package/dist/runners/src/jest.js +52 -0
  23. package/dist/runners/src/mocha.d.ts +40 -0
  24. package/dist/runners/src/mocha.js +39 -0
  25. package/dist/runners/src/node-test.d.ts +28 -0
  26. package/dist/runners/src/node-test.js +44 -0
  27. package/dist/runners/src/publish.d.ts +30 -0
  28. package/dist/runners/src/publish.js +68 -0
  29. package/dist/schema/src/api.d.ts +1 -0
  30. package/dist/schema/src/api.js +1 -1
  31. package/dist/schema/src/index.d.ts +2 -0
  32. package/dist/schema/src/index.js +2 -0
  33. package/dist/schema/src/live-run.d.ts +123 -0
  34. package/dist/schema/src/live-run.js +30 -0
  35. package/dist/schema/src/manifest.d.ts +2 -2
  36. package/dist/schema/src/project.d.ts +20 -0
  37. package/dist/schema/src/project.js +10 -0
  38. package/dist/schema/src/report-sources.d.ts +1 -0
  39. package/dist/schema/src/report-sources.js +2 -1
  40. package/dist/schema/src/runs-index.d.ts +1 -1
  41. package/dist/schema/src/server-config.d.ts +84 -0
  42. package/dist/schema/src/server-config.js +12 -0
  43. package/dist/server/src/app.d.ts +10 -0
  44. package/dist/server/src/app.js +148 -10
  45. package/dist/server/src/config.d.ts +1 -1
  46. package/dist/server/src/config.js +20 -3
  47. package/dist/server/src/dev.d.ts +3 -3
  48. package/dist/server/src/dev.js +22 -13
  49. package/dist/server/src/events.d.ts +3 -3
  50. package/dist/server/src/events.js +1 -1
  51. package/dist/server/src/index.d.ts +2 -0
  52. package/dist/server/src/index.js +2 -0
  53. package/dist/server/src/live-runs.d.ts +52 -0
  54. package/dist/server/src/live-runs.js +229 -0
  55. package/dist/server/src/main.d.ts +1 -1
  56. package/dist/server/src/main.js +7 -5
  57. package/dist/server/src/openapi.d.ts +2 -5
  58. package/dist/server/src/openapi.js +71 -7
  59. package/dist/server/src/projects.d.ts +3 -0
  60. package/dist/server/src/projects.js +154 -0
  61. package/dist/server/src/settings-page.d.ts +9 -0
  62. package/dist/server/src/settings-page.js +93 -0
  63. package/dist/server/src/settings.d.ts +23 -0
  64. package/dist/server/src/settings.js +72 -0
  65. package/dist/server/src/site.d.ts +8 -6
  66. package/dist/server/src/site.js +45 -10
  67. package/dist/server/src/store-api.js +43 -22
  68. package/docs/deploying.md +19 -19
  69. package/docs/dogfooding.md +2 -2
  70. package/docs/extending.md +3 -3
  71. package/docs/integrating.md +9 -9
  72. package/docs/reference/cli.md +9 -7
  73. package/docs/reference/core.md +6 -0
  74. package/docs/reference/http-api.md +498 -2
  75. package/docs/reference/reports.md +55 -1
  76. package/docs/reference/runners.md +169 -0
  77. package/docs/reference/schema.md +111 -0
  78. package/docs/reference/server.md +154 -14
  79. package/docs/report-backends.md +8 -8
  80. package/docs/report-contract.md +7 -7
  81. package/docs/reporting-issues.md +3 -3
  82. package/docs/runners.md +69 -0
  83. package/docs/server.md +61 -25
  84. package/docs/statecharts.md +22 -20
  85. package/llms-full.txt +713 -105
  86. package/llms.txt +3 -1
  87. package/package.json +31 -9
  88. package/packages/runners/README.md +6 -0
  89. package/packages/runners/compat/codecept.cjs +2 -0
  90. package/packages/runners/compat/jest.cjs +2 -0
  91. package/packages/runners/compat/mocha.cjs +2 -0
  92. package/packages/schema/schemas/atlas-change.schema.json +4 -0
  93. package/packages/schema/schemas/hello-event.schema.json +4 -0
  94. package/packages/schema/schemas/live-run-start.schema.json +42 -0
  95. package/packages/schema/schemas/live-run-update.schema.json +93 -0
  96. package/packages/schema/schemas/live-run.schema.json +225 -0
  97. package/packages/schema/schemas/project-slug.schema.json +8 -0
  98. package/packages/schema/schemas/project.schema.json +22 -0
  99. package/packages/schema/schemas/projects.schema.json +33 -0
  100. package/packages/schema/schemas/server-config.schema.json +14 -0
  101. package/packages/schema/schemas/server-editable-settings.schema.json +132 -0
  102. package/packages/schema/schemas/server-settings-snapshot.schema.json +285 -0
  103. package/packages/server/openapi.json +5101 -779
  104. package/packages/visualizer/README.md +13 -13
  105. package/packages/visualizer/bin/atlas-client.mjs +176 -0
  106. package/packages/visualizer/bin/atlas-visualizer.mjs +2 -175
  107. package/packages/visualizer/src/app/AppShell.tsx +26 -17
  108. package/packages/visualizer/src/app/report-sources.tsx +2 -1
  109. package/packages/visualizer/src/components/ActivityIndicator.module.css +4 -0
  110. package/packages/visualizer/src/components/ActivityIndicator.tsx +6 -0
  111. package/packages/visualizer/src/components/Header.module.css +101 -227
  112. package/packages/visualizer/src/components/Header.tsx +79 -41
  113. package/packages/visualizer/src/components/ProjectPicker.tsx +64 -0
  114. package/packages/visualizer/src/data/adapters/report-backend.test.ts +3 -2
  115. package/packages/visualizer/src/data/adapters/report-backend.ts +1 -1
  116. package/packages/visualizer/src/data/queries.ts +14 -7
  117. package/packages/visualizer/src/evidence/api.ts +2 -1
  118. package/packages/visualizer/src/evidence/check-detail.tsx +19 -4
  119. package/packages/visualizer/src/evidence/document-page.tsx +6 -2
  120. package/packages/visualizer/src/evidence/evidence-context.tsx +17 -12
  121. package/packages/visualizer/src/evidence/evidence.module.css +11 -1
  122. package/packages/visualizer/src/evidence/feature-page.tsx +7 -3
  123. package/packages/visualizer/src/evidence/model-page.tsx +6 -2
  124. package/packages/visualizer/src/evidence/project-home.tsx +45 -0
  125. package/packages/visualizer/src/evidence/recording-page.tsx +4 -1
  126. package/packages/visualizer/src/evidence/spec-index.tsx +2 -1
  127. package/packages/visualizer/src/evidence/test-filter.tsx +21 -0
  128. package/packages/visualizer/src/live/live-query.ts +21 -0
  129. package/packages/visualizer/src/live/live-runs.tsx +69 -0
  130. package/packages/visualizer/src/live/live-stream.ts +30 -9
  131. package/packages/visualizer/src/live/report-progress.ts +62 -0
  132. package/packages/visualizer/src/live/test-progress.tsx +34 -0
  133. package/packages/visualizer/src/runtime.ts +17 -1
  134. package/packages/visualizer/src/state/ui-store.ts +3 -2
  135. package/packages/visualizer/src/views/ChartPage.tsx +2 -0
  136. package/packages/visualizer/src/views/ChartTests.tsx +43 -0
  137. package/packages/visualizer/src/views/SidePanel.tsx +2 -0
  138. package/packages/visualizer/vite/atlas-files.test.ts +4 -4
  139. package/packages/visualizer/vite/atlas-files.ts +1 -5
  140. package/packages/visualizer/vite/atlas-server-proxy.ts +2 -1
package/llms.txt CHANGED
@@ -8,10 +8,11 @@ To integrate a project: `bunx @crvouga/atlas init --server <url> --format json`
8
8
 
9
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.
10
10
  - [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.
11
+ - [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
12
 
12
13
  ## Run and use the server
13
14
 
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.
15
+ - [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
16
  - [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
17
 
17
18
  ## Formats and rules
@@ -39,6 +40,7 @@ To integrate a project: `bunx @crvouga/atlas init --server <url> --format json`
39
40
  - [TypeScript API: bun](https://raw.githubusercontent.com/crvouga/atlas/main/docs/reference/bun.md): The Bun WebView driver for statechart runs.
40
41
  - [TypeScript API: webdriver](https://raw.githubusercontent.com/crvouga/atlas/main/docs/reference/webdriver.md): The W3C WebDriver / Appium driver for statechart runs.
41
42
  - [TypeScript API: detox](https://raw.githubusercontent.com/crvouga/atlas/main/docs/reference/detox.md): The Detox driver for statechart runs of React Native apps.
43
+ - [TypeScript API: runners](https://raw.githubusercontent.com/crvouga/atlas/main/docs/reference/runners.md): Native reporters that upload to the project server.
42
44
  - [TypeScript API: vitest](https://raw.githubusercontent.com/crvouga/atlas/main/docs/reference/vitest.md): Run a statechart plan as Vitest tests.
43
45
  - [JSON Schemas](https://unpkg.com/@crvouga/atlas/packages/schema/schemas/): the layer format, checks file, report status, command results, server responses, server configuration.
44
46
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crvouga/atlas",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
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",
@@ -126,7 +145,9 @@
126
145
  "docs/report-backends.md",
127
146
  "docs/dogfooding.md",
128
147
  "docs/reporting-issues.md",
129
- "CHANGELOG.md"
148
+ "CHANGELOG.md",
149
+ "docs/runners.md",
150
+ "packages/runners/compat"
130
151
  ],
131
152
  "scripts": {
132
153
  "build": "bun scripts/build-package.ts",
@@ -135,10 +156,10 @@
135
156
  "schemas": "bun packages/schema/scripts/emit-json-schemas.ts",
136
157
  "docs": "bun scripts/docs/generate.ts",
137
158
  "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",
159
+ "client:dev": "bun packages/core/bin/atlas.mjs dev",
160
+ "client:build": "bun packages/core/bin/atlas.mjs client build --no-data",
161
+ "client:publish-data": "bun packages/visualizer/scripts/publish-data.ts",
162
+ "client:fixtures": "bun packages/visualizer/scripts/make-fixtures.ts",
142
163
  "example:start": "bun examples/todo/server.ts",
143
164
  "example:lint": "bun --cwd examples/todo ../../packages/core/bin/atlas.mjs lint --require-implementations",
144
165
  "example:plan": "bun --cwd examples/todo ../../packages/core/bin/atlas.mjs plan",
@@ -147,13 +168,14 @@
147
168
  "example:clients": "bun --cwd examples/todo ../../packages/core/bin/atlas.mjs run --config clients/atlas.config.ts --mode showcase",
148
169
  "example:clients:bun": "ATLAS_DESKTOP=bun bun --cwd examples/todo ../../packages/core/bin/atlas.mjs run --config clients/atlas.config.ts --mode showcase",
149
170
  "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
171
  "release:plan": "bun scripts/release/plan.ts",
152
172
  "release:publish": "bun scripts/release/publish.ts",
153
173
  "release:smoke": "bun scripts/release/consumer-smoke.ts",
154
174
  "release:seed": "bun scripts/release/seed.ts",
155
175
  "health": "bun scripts/health/cli.ts",
156
- "prepare": "husky"
176
+ "prepare": "husky",
177
+ "example:publish": "bun examples/todo/publish.ts",
178
+ "atlas": "bun scripts/atlas.mjs"
157
179
  },
158
180
  "dependencies": {
159
181
  "@cucumber/gherkin": "^42.0.1",
@@ -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,