docattest 0.0.0-stage → 0.1.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 (139) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +147 -2
  3. package/dist/agents/claude.json +30 -0
  4. package/dist/agents/cursor.json +19 -0
  5. package/dist/agents/gemini.json +27 -0
  6. package/dist/agents/index.json +3 -0
  7. package/dist/api/adapter.d.ts +231 -0
  8. package/dist/api/adapter.js +2 -0
  9. package/dist/api/attestation.d.ts +76 -0
  10. package/dist/api/attestation.js +2 -0
  11. package/dist/api/audit.d.ts +56 -0
  12. package/dist/api/audit.js +2 -0
  13. package/dist/api/config.d.ts +44 -0
  14. package/dist/api/config.js +2 -0
  15. package/dist/api/constants.d.ts +35 -0
  16. package/dist/api/constants.js +56 -0
  17. package/dist/api/errors.d.ts +15 -0
  18. package/dist/api/errors.js +22 -0
  19. package/dist/api/impact.d.ts +49 -0
  20. package/dist/api/impact.js +2 -0
  21. package/dist/api/project.d.ts +64 -0
  22. package/dist/api/project.js +2 -0
  23. package/dist/api/report.d.ts +107 -0
  24. package/dist/api/report.js +2 -0
  25. package/dist/client/answers.d.ts +17 -0
  26. package/dist/client/answers.js +23 -0
  27. package/dist/client/core.d.ts +18 -0
  28. package/dist/client/core.js +58 -0
  29. package/dist/client/place.d.ts +14 -0
  30. package/dist/client/place.js +37 -0
  31. package/dist/client/project.d.ts +3 -0
  32. package/dist/client/project.js +98 -0
  33. package/dist/client/workspace.d.ts +12 -0
  34. package/dist/client/workspace.js +72 -0
  35. package/dist/compare-strings.d.ts +2 -0
  36. package/dist/compare-strings.js +5 -0
  37. package/dist/core-binary/locate.js +113 -0
  38. package/dist/core-binary/package.js +70 -0
  39. package/dist/core.json +4 -0
  40. package/dist/files/disk.d.ts +4 -0
  41. package/dist/files/disk.js +67 -0
  42. package/dist/files/glob.d.ts +10 -0
  43. package/dist/files/glob.js +21 -0
  44. package/dist/files/ignored.d.ts +14 -0
  45. package/dist/files/ignored.js +14 -0
  46. package/dist/files/memory.d.ts +5 -0
  47. package/dist/files/memory.js +26 -0
  48. package/dist/files/source.d.ts +22 -0
  49. package/dist/files/source.js +17 -0
  50. package/dist/index.d.ts +10 -0
  51. package/dist/index.js +6 -0
  52. package/dist/json.d.ts +16 -0
  53. package/dist/json.js +43 -0
  54. package/dist/language/cache.js +18 -0
  55. package/dist/language/citations/listing.js +64 -0
  56. package/dist/language/citations/match.js +14 -0
  57. package/dist/language/citations/tests-in-file.js +101 -0
  58. package/dist/language/compiler.js +73 -0
  59. package/dist/language/description.js +24 -0
  60. package/dist/language/impact/affected.js +50 -0
  61. package/dist/language/impact/fingerprint.js +123 -0
  62. package/dist/language/impact/graph.js +72 -0
  63. package/dist/language/impact/lookup.js +100 -0
  64. package/dist/language/impact/program.js +87 -0
  65. package/dist/language/impact/renames.js +57 -0
  66. package/dist/language/impact/revision.js +62 -0
  67. package/dist/language/impact/units.js +80 -0
  68. package/dist/language/index.js +10 -0
  69. package/dist/language/inventory/observables.js +56 -0
  70. package/dist/language/inventory/plan.js +72 -0
  71. package/dist/language/inventory/probe.js +150 -0
  72. package/dist/language/languages.js +43 -0
  73. package/dist/language/node/dependency.js +34 -0
  74. package/dist/language/node/exports-map.js +92 -0
  75. package/dist/language/program/exports.js +29 -0
  76. package/dist/language/program/file-names.js +13 -0
  77. package/dist/language/program/globals.js +38 -0
  78. package/dist/language/program/host.js +91 -0
  79. package/dist/language/program/options.js +48 -0
  80. package/dist/language/program/program.js +41 -0
  81. package/dist/language/run/attempt.js +100 -0
  82. package/dist/language/run/facts.js +109 -0
  83. package/dist/language/run/host.js +73 -0
  84. package/dist/language/run/jobs.js +37 -0
  85. package/dist/language/run/pool.js +75 -0
  86. package/dist/language/run/protocol.js +37 -0
  87. package/dist/language/run/result.js +18 -0
  88. package/dist/language/run/runner.js +115 -0
  89. package/dist/language/run/sourcemap.js +43 -0
  90. package/dist/language/run/spawn.js +40 -0
  91. package/dist/language/run/transpile.js +50 -0
  92. package/dist/language/session.js +42 -0
  93. package/dist/language/surfaces/packages.js +71 -0
  94. package/dist/language/surfaces/resolve.js +48 -0
  95. package/dist/language/surfaces/specs.js +32 -0
  96. package/dist/language/surfaces/stale.js +23 -0
  97. package/dist/language/symbols.js +95 -0
  98. package/dist/language/syntax/doc-comments.js +90 -0
  99. package/dist/language/syntax/doc-prose.js +23 -0
  100. package/dist/language/syntax/expression.js +52 -0
  101. package/dist/language/syntax/imports.js +83 -0
  102. package/dist/language/syntax/lexical.js +41 -0
  103. package/dist/language/syntax/parse.js +11 -0
  104. package/dist/language/syntax/prose.js +11 -0
  105. package/dist/language/syntax/setup-module.js +88 -0
  106. package/dist/language/ts.cjs +9 -0
  107. package/dist/language/worker/cases.js +73 -0
  108. package/dist/language/worker/compile.js +15 -0
  109. package/dist/language/worker/console.js +10 -0
  110. package/dist/language/worker/context.js +16 -0
  111. package/dist/language/worker/describe.js +107 -0
  112. package/dist/language/worker/example.js +27 -0
  113. package/dist/language/worker/facts.js +69 -0
  114. package/dist/language/worker/host-client.js +55 -0
  115. package/dist/language/worker/main.js +71 -0
  116. package/dist/language/worker/network.js +35 -0
  117. package/dist/language/worker/observe.js +39 -0
  118. package/dist/language/worker/registry.js +78 -0
  119. package/dist/language/worker/setup-facts.js +50 -0
  120. package/dist/language/worker/strays.js +37 -0
  121. package/dist/launcher/main.js +38 -0
  122. package/dist/platforms.json +40 -0
  123. package/dist/protocol/context.js +48 -0
  124. package/dist/protocol/main.js +22 -0
  125. package/dist/protocol/methods.js +178 -0
  126. package/dist/protocol/output.js +40 -0
  127. package/dist/protocol/overlay.js +31 -0
  128. package/dist/protocol/serve.js +24 -0
  129. package/dist/protocol/server.js +108 -0
  130. package/dist/protocol/wire.js +117 -0
  131. package/dist/schema/agent.json +162 -0
  132. package/dist/schema/attestations.json +307 -0
  133. package/dist/schema/kit.json +190 -0
  134. package/dist/schema/language.json +162 -0
  135. package/dist/schema/messages.json +68 -0
  136. package/dist/schema/methods.json +412 -0
  137. package/dist/schema/project.json +113 -0
  138. package/dist/schema/results.json +249 -0
  139. package/package.json +73 -4
@@ -0,0 +1,162 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "docattest agent descriptor: what one coding agent's hooks look like, as data",
4
+ "$defs": {
5
+ "Agent": {
6
+ "type": "object",
7
+ "description": "One coding agent. `hooks install --agent`, `impact --hook`, `check --hook` and `skill install` apply it; nothing in docattest knows an agent otherwise.",
8
+ "properties": {
9
+ "$schema": {
10
+ "type": "string"
11
+ },
12
+ "name": {
13
+ "description": "The agent's name: lower-case letters, digits, `-` and `_`, starting with a letter. A shipped descriptor is `protocol/agents/<name>.json`.",
14
+ "type": "string",
15
+ "minLength": 1
16
+ },
17
+ "docs": {
18
+ "description": "Where the agent documents its hooks: the page this descriptor was checked against.",
19
+ "type": "string",
20
+ "minLength": 1
21
+ },
22
+ "projectRoot": {
23
+ "description": "How a hook command of this agent writes the project root, as shell text: it replaces `{root}` in the command that runs docattest. Left out when the agent runs hooks in the project root, where `.` will do.",
24
+ "type": "string",
25
+ "minLength": 1
26
+ },
27
+ "skill": {
28
+ "description": "Where the agent looks for the docattest skill: a path relative to the project root, and to the home directory for `skill install --global`. Left out when the agent has no such place.",
29
+ "type": "string",
30
+ "minLength": 1
31
+ },
32
+ "settings": {
33
+ "$ref": "#/$defs/Settings"
34
+ },
35
+ "hooks": {
36
+ "type": "object",
37
+ "description": "Which event runs which docattest action. An action the agent has no event for is left out.",
38
+ "properties": {
39
+ "impact": {
40
+ "$ref": "#/$defs/ImpactHook"
41
+ },
42
+ "check": {
43
+ "$ref": "#/$defs/CheckHook"
44
+ }
45
+ },
46
+ "additionalProperties": false
47
+ }
48
+ },
49
+ "required": ["name", "settings", "hooks"],
50
+ "additionalProperties": false
51
+ },
52
+ "Settings": {
53
+ "type": "object",
54
+ "description": "The JSON file the agent reads its hooks from, and where a hook goes in it.",
55
+ "properties": {
56
+ "file": {
57
+ "description": "The settings file, relative to the project root.",
58
+ "type": "string",
59
+ "minLength": 1
60
+ },
61
+ "hooks": {
62
+ "description": "The key of the file's top-level object that maps an event name to a list of entries.",
63
+ "type": "string",
64
+ "minLength": 1
65
+ },
66
+ "group": {
67
+ "description": "When an entry is a group of handlers: the key of the group that holds the list of handlers. Left out when an entry is itself a handler.",
68
+ "type": "string",
69
+ "minLength": 1
70
+ },
71
+ "handler": {
72
+ "type": "object",
73
+ "description": "Fields every handler carries besides its command, written before it."
74
+ },
75
+ "command": {
76
+ "description": "The key of a handler that holds the shell command.",
77
+ "type": "string",
78
+ "minLength": 1
79
+ },
80
+ "defaults": {
81
+ "type": "object",
82
+ "description": "Top-level keys the file must have, added with these values where they are missing."
83
+ }
84
+ },
85
+ "required": ["file", "hooks", "command"],
86
+ "additionalProperties": false
87
+ },
88
+ "ImpactHook": {
89
+ "type": "object",
90
+ "description": "The event after the agent edited a file, bound to `impact --hook`.",
91
+ "properties": {
92
+ "event": {
93
+ "type": "string",
94
+ "minLength": 1
95
+ },
96
+ "matcher": {
97
+ "description": "The entry's `matcher`, where the event needs one to select the tools that edit files.",
98
+ "type": "string",
99
+ "minLength": 1
100
+ },
101
+ "file": {
102
+ "description": "Where the edited file's path is in the event the agent writes to standard input.",
103
+ "$ref": "#/$defs/Path"
104
+ },
105
+ "reply": {
106
+ "description": "The answer that puts text into the agent's context.",
107
+ "$ref": "#/$defs/Reply"
108
+ }
109
+ },
110
+ "required": ["event", "file", "reply"],
111
+ "additionalProperties": false
112
+ },
113
+ "CheckHook": {
114
+ "type": "object",
115
+ "description": "The event before the agent stops, bound to `check --hook`.",
116
+ "properties": {
117
+ "event": {
118
+ "type": "string",
119
+ "minLength": 1
120
+ },
121
+ "matcher": {
122
+ "type": "string",
123
+ "minLength": 1
124
+ },
125
+ "continuing": {
126
+ "description": "Where the event says the agent is already continuing because a hook sent it back: `true`, or a count above 0. The hook then stays silent, so a failure the agent cannot fix never loops.",
127
+ "$ref": "#/$defs/Path"
128
+ },
129
+ "reply": {
130
+ "description": "The answer that keeps the agent working, with the text as the reason.",
131
+ "$ref": "#/$defs/Reply"
132
+ }
133
+ },
134
+ "required": ["event", "reply"],
135
+ "additionalProperties": false
136
+ },
137
+ "Reply": {
138
+ "type": "object",
139
+ "description": "The one JSON object a hook prints: `fixed`, with the text put at `text`.",
140
+ "properties": {
141
+ "fixed": {
142
+ "type": "object",
143
+ "description": "What the answer holds whatever the text is."
144
+ },
145
+ "text": {
146
+ "description": "Where the text goes in the answer.",
147
+ "$ref": "#/$defs/Path"
148
+ }
149
+ },
150
+ "required": ["text"],
151
+ "additionalProperties": false
152
+ },
153
+ "Path": {
154
+ "description": "Keys from the top of a JSON object down to one value.",
155
+ "type": "array",
156
+ "items": {
157
+ "type": "string",
158
+ "minLength": 1
159
+ }
160
+ }
161
+ }
162
+ }
@@ -0,0 +1,307 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "docattest adapter protocol, version 1: the attestations the core sends",
4
+ "description": "Every value the protocol carries. Optional fields are omitted, never null, unless a type says null. Paths are relative to the project root, with / separators.",
5
+ "$defs": {
6
+ "Attestation": {
7
+ "anyOf": [
8
+ {
9
+ "$ref": "#/$defs/ExampleAttestation"
10
+ },
11
+ {
12
+ "$ref": "#/$defs/FactAttestation"
13
+ },
14
+ {
15
+ "$ref": "#/$defs/CasesAttestation"
16
+ },
17
+ {
18
+ "$ref": "#/$defs/TestAttestation"
19
+ }
20
+ ]
21
+ },
22
+ "ExampleAttestation": {
23
+ "type": "object",
24
+ "description": "A fenced block, or an example in a doc comment.",
25
+ "properties": {
26
+ "id": {
27
+ "description": "Unique within one invocation.",
28
+ "type": "string"
29
+ },
30
+ "page": {
31
+ "description": "Project-relative path of the page (or source file) the attestation is on.",
32
+ "type": "string"
33
+ },
34
+ "line": {
35
+ "description": "Line on the page, counted from 1.",
36
+ "type": "integer",
37
+ "minimum": 1
38
+ },
39
+ "claim": {
40
+ "description": "The sentence the proof defends.",
41
+ "type": "string"
42
+ },
43
+ "kind": {
44
+ "const": "example"
45
+ },
46
+ "lang": {
47
+ "description": "The block's info-string language, as written.",
48
+ "type": "string"
49
+ },
50
+ "mode": {
51
+ "description": "check runs the example; compile only checks it as far as the language can without running it.",
52
+ "enum": ["check", "compile"]
53
+ },
54
+ "network": {
55
+ "description": "Whether the block is tagged network.",
56
+ "type": "boolean"
57
+ },
58
+ "code": {
59
+ "type": "string"
60
+ },
61
+ "weak": {
62
+ "description": "A check block that asserts nothing.",
63
+ "type": "boolean"
64
+ },
65
+ "owner": {
66
+ "description": "The documented declaration, for a doc-comment example.",
67
+ "type": "string"
68
+ },
69
+ "tags": {
70
+ "description": "The adapter's own info-string words on the block (hello.infoWords), in the order written; an attribute as key=value, its quotes removed. Omitted when there are none.",
71
+ "type": "array",
72
+ "items": {
73
+ "type": "string"
74
+ }
75
+ },
76
+ "error": {
77
+ "description": "A problem found while planning; such an attestation is never sent to be compiled, evaluated or run.",
78
+ "type": "string"
79
+ }
80
+ },
81
+ "required": [
82
+ "id",
83
+ "page",
84
+ "line",
85
+ "claim",
86
+ "kind",
87
+ "lang",
88
+ "mode",
89
+ "network",
90
+ "code",
91
+ "weak"
92
+ ],
93
+ "additionalProperties": false
94
+ },
95
+ "FactAttestation": {
96
+ "type": "object",
97
+ "description": "A literal on the page checked against an expression over a surface.",
98
+ "properties": {
99
+ "id": {
100
+ "description": "Unique within one invocation.",
101
+ "type": "string"
102
+ },
103
+ "page": {
104
+ "description": "Project-relative path of the page (or source file) the attestation is on.",
105
+ "type": "string"
106
+ },
107
+ "line": {
108
+ "description": "Line on the page, counted from 1.",
109
+ "type": "integer",
110
+ "minimum": 1
111
+ },
112
+ "claim": {
113
+ "description": "The sentence the proof defends.",
114
+ "type": "string"
115
+ },
116
+ "kind": {
117
+ "const": "fact"
118
+ },
119
+ "expression": {
120
+ "type": "string"
121
+ },
122
+ "surface": {
123
+ "description": "Surface name.",
124
+ "type": "string"
125
+ },
126
+ "ordered": {
127
+ "type": "boolean"
128
+ },
129
+ "column": {
130
+ "type": "string"
131
+ },
132
+ "target": {
133
+ "$ref": "#/$defs/FactTarget"
134
+ },
135
+ "error": {
136
+ "description": "A problem found while planning; such an attestation is never sent to be compiled, evaluated or run.",
137
+ "type": "string"
138
+ }
139
+ },
140
+ "required": ["id", "page", "line", "claim", "kind", "expression", "surface", "ordered"],
141
+ "additionalProperties": false
142
+ },
143
+ "FactTarget": {
144
+ "description": "What a fact compares its value with.",
145
+ "anyOf": [
146
+ {
147
+ "type": "object",
148
+ "properties": {
149
+ "kind": {
150
+ "const": "scalar"
151
+ },
152
+ "value": {
153
+ "type": "string"
154
+ }
155
+ },
156
+ "required": ["kind", "value"],
157
+ "additionalProperties": false
158
+ },
159
+ {
160
+ "type": "object",
161
+ "properties": {
162
+ "kind": {
163
+ "const": "set"
164
+ },
165
+ "items": {
166
+ "type": "array",
167
+ "items": {
168
+ "type": "string"
169
+ }
170
+ },
171
+ "from": {
172
+ "enum": ["list", "table", "sentence"]
173
+ }
174
+ },
175
+ "required": ["kind", "items", "from"],
176
+ "additionalProperties": false
177
+ },
178
+ {
179
+ "type": "object",
180
+ "properties": {
181
+ "kind": {
182
+ "const": "text"
183
+ },
184
+ "text": {
185
+ "type": "string"
186
+ }
187
+ },
188
+ "required": ["kind", "text"],
189
+ "additionalProperties": false
190
+ }
191
+ ]
192
+ },
193
+ "CasesAttestation": {
194
+ "type": "object",
195
+ "description": "A table run row by row by a runner of the setup module.",
196
+ "properties": {
197
+ "id": {
198
+ "description": "Unique within one invocation.",
199
+ "type": "string"
200
+ },
201
+ "page": {
202
+ "description": "Project-relative path of the page (or source file) the attestation is on.",
203
+ "type": "string"
204
+ },
205
+ "line": {
206
+ "description": "Line on the page, counted from 1.",
207
+ "type": "integer",
208
+ "minimum": 1
209
+ },
210
+ "claim": {
211
+ "description": "The sentence the proof defends.",
212
+ "type": "string"
213
+ },
214
+ "kind": {
215
+ "const": "cases"
216
+ },
217
+ "runner": {
218
+ "type": "string"
219
+ },
220
+ "header": {
221
+ "type": "array",
222
+ "items": {
223
+ "type": "string"
224
+ }
225
+ },
226
+ "rows": {
227
+ "type": "array",
228
+ "items": {
229
+ "$ref": "#/$defs/CasesRow"
230
+ }
231
+ },
232
+ "error": {
233
+ "description": "A problem found while planning; such an attestation is never sent to be compiled, evaluated or run.",
234
+ "type": "string"
235
+ }
236
+ },
237
+ "required": ["id", "page", "line", "claim", "kind", "runner", "header", "rows"],
238
+ "additionalProperties": false
239
+ },
240
+ "CasesRow": {
241
+ "type": "object",
242
+ "properties": {
243
+ "line": {
244
+ "type": "integer",
245
+ "minimum": 1
246
+ },
247
+ "name": {
248
+ "type": "string"
249
+ },
250
+ "values": {
251
+ "type": "object",
252
+ "additionalProperties": {
253
+ "type": "string"
254
+ }
255
+ }
256
+ },
257
+ "required": ["line", "name", "values"],
258
+ "additionalProperties": false
259
+ },
260
+ "TestAttestation": {
261
+ "type": "object",
262
+ "description": "A sentence tied to a test that already exists; it is never run.",
263
+ "properties": {
264
+ "id": {
265
+ "description": "Unique within one invocation.",
266
+ "type": "string"
267
+ },
268
+ "page": {
269
+ "description": "Project-relative path of the page (or source file) the attestation is on.",
270
+ "type": "string"
271
+ },
272
+ "line": {
273
+ "description": "Line on the page, counted from 1.",
274
+ "type": "integer",
275
+ "minimum": 1
276
+ },
277
+ "claim": {
278
+ "description": "The sentence the proof defends.",
279
+ "type": "string"
280
+ },
281
+ "kind": {
282
+ "const": "test"
283
+ },
284
+ "file": {
285
+ "description": "The cited test file.",
286
+ "type": "string"
287
+ },
288
+ "title": {
289
+ "type": "string"
290
+ },
291
+ "describes": {
292
+ "description": "Titles that enclose the test, outermost first; empty matches any.",
293
+ "type": "array",
294
+ "items": {
295
+ "type": "string"
296
+ }
297
+ },
298
+ "error": {
299
+ "description": "A problem found while planning; such an attestation is never sent to be compiled, evaluated or run.",
300
+ "type": "string"
301
+ }
302
+ },
303
+ "required": ["id", "page", "line", "claim", "kind", "file", "title", "describes"],
304
+ "additionalProperties": false
305
+ }
306
+ }
307
+ }
@@ -0,0 +1,190 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "docattest adapter protocol, version 1: an adapter's conformance kit",
4
+ "description": "What the conformance suite must be told about a language (PROTOCOL.md section 5): a small project, and labelled pieces of code in the language. `docattest conformance run` refuses a kit that does not fit.",
5
+ "$defs": {
6
+ "Kit": {
7
+ "type": "object",
8
+ "properties": {
9
+ "adapter": { "description": "The name the adapter greets with.", "type": "string" },
10
+ "page": {
11
+ "description": "The page the suite's attestations claim to be on (default docs/conformance.md).",
12
+ "type": "string"
13
+ },
14
+ "files": { "description": "The project: path to text.", "$ref": "#/$defs/Texts" },
15
+ "surfaces": {
16
+ "type": "array",
17
+ "items": {
18
+ "type": "object",
19
+ "properties": { "name": { "type": "string" }, "entry": { "type": "string" } },
20
+ "required": ["name", "entry"]
21
+ }
22
+ },
23
+ "setup": { "description": "The setup module, a path among files.", "type": "string" },
24
+ "notSource": {
25
+ "description": "A path that is not a source file of the language.",
26
+ "type": "string"
27
+ },
28
+ "docComment": {
29
+ "description": "A source file with doc comments: its text, how many examples they hold, one's prose.",
30
+ "type": "object",
31
+ "properties": {
32
+ "page": { "type": "string" },
33
+ "text": { "type": "string" },
34
+ "examples": { "type": "integer", "minimum": 0 },
35
+ "prose": { "type": "string" }
36
+ },
37
+ "required": ["page", "text", "examples", "prose"]
38
+ },
39
+ "examples": {
40
+ "description": "Examples that pass, fail, do not compile, assert nothing, print, and take half a second.",
41
+ "type": "object",
42
+ "properties": {
43
+ "passes": { "$ref": "#/$defs/Example" },
44
+ "fails": { "$ref": "#/$defs/Example" },
45
+ "broken": { "$ref": "#/$defs/Example" },
46
+ "weak": { "$ref": "#/$defs/Example" },
47
+ "prints": { "$ref": "#/$defs/Example" },
48
+ "slow": { "$ref": "#/$defs/Example" }
49
+ },
50
+ "required": ["passes", "fails", "broken", "weak", "prints", "slow"]
51
+ },
52
+ "facts": {
53
+ "description": "Fact expressions, with what they display.",
54
+ "type": "object",
55
+ "properties": {
56
+ "scalar": {
57
+ "type": "object",
58
+ "properties": {
59
+ "expression": { "type": "string" },
60
+ "text": { "type": "string" },
61
+ "symbol": { "type": "string" }
62
+ },
63
+ "required": ["expression", "text", "symbol"]
64
+ },
65
+ "list": {
66
+ "type": "object",
67
+ "properties": {
68
+ "expression": { "type": "string" },
69
+ "items": { "$ref": "#/$defs/Words" }
70
+ },
71
+ "required": ["expression", "items"]
72
+ },
73
+ "text": {
74
+ "type": "object",
75
+ "properties": { "expression": { "type": "string" }, "text": { "type": "string" } },
76
+ "required": ["expression", "text"]
77
+ },
78
+ "invalid": {
79
+ "type": "object",
80
+ "properties": { "expression": { "type": "string" } },
81
+ "required": ["expression"]
82
+ },
83
+ "manifest": {
84
+ "description": "An expression that reads the field version of manifest(\"meta.json\"), which the suite opens every session with.",
85
+ "type": "object",
86
+ "properties": { "expression": { "type": "string" } },
87
+ "required": ["expression"]
88
+ }
89
+ },
90
+ "required": ["scalar", "list", "text", "invalid", "manifest"]
91
+ },
92
+ "exports": { "description": "Names the default surface exports.", "$ref": "#/$defs/Words" },
93
+ "expressions": {
94
+ "description": "Two expressions of one shape with other names, and one of another shape.",
95
+ "type": "object",
96
+ "properties": {
97
+ "one": { "type": "string" },
98
+ "renamed": { "type": "string" },
99
+ "other": { "type": "string" }
100
+ },
101
+ "required": ["one", "renamed", "other"]
102
+ },
103
+ "mention": {
104
+ "description": "A code span that names symbol, and one that names nothing.",
105
+ "type": "object",
106
+ "properties": {
107
+ "span": { "type": "string" },
108
+ "symbol": { "type": "string" },
109
+ "other": { "type": "string" }
110
+ },
111
+ "required": ["span", "symbol", "other"]
112
+ },
113
+ "inCode": {
114
+ "description": "A name the files hold, one they do not, and the files.",
115
+ "type": "object",
116
+ "properties": {
117
+ "present": { "type": "string" },
118
+ "absent": { "type": "string" },
119
+ "files": { "$ref": "#/$defs/Words" }
120
+ },
121
+ "required": ["present", "absent", "files"]
122
+ },
123
+ "test": {
124
+ "description": "A test the tests capability lists, and its suite if the language has them.",
125
+ "type": "object",
126
+ "properties": {
127
+ "file": { "type": "string" },
128
+ "title": { "type": "string" },
129
+ "suite": { "type": "string" }
130
+ },
131
+ "required": ["file", "title"]
132
+ },
133
+ "cases": {
134
+ "description": "A cases table: its runner, header, rows (header name to text), and each row's status.",
135
+ "type": "object",
136
+ "properties": {
137
+ "runner": { "type": "string" },
138
+ "header": { "$ref": "#/$defs/Words" },
139
+ "rows": { "type": "array", "items": { "$ref": "#/$defs/Texts" } },
140
+ "statuses": { "$ref": "#/$defs/Words" }
141
+ },
142
+ "required": ["runner", "header", "rows", "statuses"]
143
+ },
144
+ "affected": {
145
+ "description": "A change the affected capability sees: the files at the base, what changed, the names it affects.",
146
+ "type": "object",
147
+ "properties": {
148
+ "base": { "$ref": "#/$defs/Texts" },
149
+ "changed": { "$ref": "#/$defs/Words" },
150
+ "names": { "$ref": "#/$defs/Words" }
151
+ },
152
+ "required": ["base", "changed", "names"]
153
+ }
154
+ },
155
+ "required": [
156
+ "adapter",
157
+ "files",
158
+ "surfaces",
159
+ "notSource",
160
+ "docComment",
161
+ "examples",
162
+ "facts",
163
+ "exports",
164
+ "expressions",
165
+ "mention",
166
+ "inCode",
167
+ "test"
168
+ ]
169
+ },
170
+ "Example": {
171
+ "description": "A piece of code in a block of the language.",
172
+ "type": "object",
173
+ "properties": {
174
+ "lang": { "type": "string" },
175
+ "code": { "type": "string" },
176
+ "tags": { "$ref": "#/$defs/Words" }
177
+ },
178
+ "required": ["lang", "code"]
179
+ },
180
+ "Texts": {
181
+ "description": "An object whose every property is a string.",
182
+ "type": "object",
183
+ "additionalProperties": { "type": "string" }
184
+ },
185
+ "Words": {
186
+ "type": "array",
187
+ "items": { "type": "string" }
188
+ }
189
+ }
190
+ }