@quolu/lattice 0.64.0 → 0.64.2

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 (62) hide show
  1. package/LICENSE +147 -147
  2. package/README.ja.md +378 -378
  3. package/README.md +303 -303
  4. package/bin/lattice-mcp.mjs +0 -0
  5. package/bin/lattice-scripted-adapter.mjs +0 -0
  6. package/bin/lattice-scripted-worker.mjs +0 -0
  7. package/bin/lattice-work-order-adapter.mjs +0 -0
  8. package/bin/lattice.mjs +0 -0
  9. package/docs/bridge-setup.md +248 -248
  10. package/docs/schemas/lattice.executor_packet.v1.schema.json +57 -57
  11. package/docs/schemas/lattice.executor_receipt.v1.schema.json +66 -66
  12. package/docs/schemas/lattice.phase_todo_revision.v3.schema.json +360 -360
  13. package/docs/schemas/lattice.plan_create_input.v1.schema.json +56 -56
  14. package/docs/schemas/lattice.plan_create_input.v2.schema.json +72 -72
  15. package/docs/schemas/lattice.plan_create_input.v3.schema.json +81 -81
  16. package/docs/schemas/lattice.plan_create_input.v4.schema.json +357 -357
  17. package/docs/schemas/lattice.plan_scope_review.v1.schema.json +55 -55
  18. package/docs/schemas/lattice.run_request.v1.schema.json +238 -238
  19. package/docs/schemas/lattice.runtime_adapter_capabilities.v2.schema.json +55 -55
  20. package/docs/schemas/lattice.runtime_adapter_registration_input.v1.schema.json +78 -78
  21. package/docs/schemas/lattice.runtime_adapter_registration_input.v2.schema.json +86 -86
  22. package/docs/schemas/lattice.todo_extraction.v2.schema.json +298 -298
  23. package/docs/schemas/lattice.todo_extraction.v3.schema.json +150 -150
  24. package/docs/schemas/lattice.todo_extraction.v4.schema.json +161 -161
  25. package/docs/schemas/lattice.todo_revision.v2.schema.json +260 -260
  26. package/docs/schemas/lattice.todo_revision_set.v3.schema.json +363 -363
  27. package/docs/schemas/lattice.todo_structure_binding.v1.schema.json +47 -47
  28. package/docs/schemas/lattice.todo_structure_realization.v1.schema.json +55 -55
  29. package/docs/schemas/lattice.todo_structure_set.v1.schema.json +264 -264
  30. package/package.json +109 -109
  31. package/sensor/LICENSE +21 -21
  32. package/sensor/NOTICE +19 -19
  33. package/sensor/dist/bin/lattice-sensor.js +9 -9
  34. package/sensor/dist/db/index.js +24 -24
  35. package/sensor/dist/db/migrations.js +41 -41
  36. package/sensor/dist/db/queries.js +164 -164
  37. package/sensor/dist/db/schema.sql +205 -205
  38. package/sensor/dist/directory.js +5 -5
  39. package/sensor/dist/extraction/wasm/tree-sitter-c_sharp.wasm +0 -0
  40. package/sensor/dist/extraction/wasm/tree-sitter-cfml.wasm +0 -0
  41. package/sensor/dist/extraction/wasm/tree-sitter-cfquery.wasm +0 -0
  42. package/sensor/dist/extraction/wasm/tree-sitter-cfscript.wasm +0 -0
  43. package/sensor/dist/extraction/wasm/tree-sitter-cobol.wasm +0 -0
  44. package/sensor/dist/extraction/wasm/tree-sitter-erlang.wasm +0 -0
  45. package/sensor/dist/extraction/wasm/tree-sitter-go.wasm +0 -0
  46. package/sensor/dist/extraction/wasm/tree-sitter-java.wasm +0 -0
  47. package/sensor/dist/extraction/wasm/tree-sitter-javascript.wasm +0 -0
  48. package/sensor/dist/extraction/wasm/tree-sitter-nix.wasm +0 -0
  49. package/sensor/dist/extraction/wasm/tree-sitter-pascal.wasm +0 -0
  50. package/sensor/dist/extraction/wasm/tree-sitter-python.wasm +0 -0
  51. package/sensor/dist/extraction/wasm/tree-sitter-tsx.wasm +0 -0
  52. package/sensor/dist/extraction/wasm/tree-sitter-typescript.wasm +0 -0
  53. package/sensor/dist/extraction/wasm/tree-sitter-vbnet.wasm +0 -0
  54. package/sensor/dist/mcp/liveness-watchdog.js +53 -53
  55. package/sensor/dist/mcp/server-instructions.js +95 -95
  56. package/sensor/package.json +56 -56
  57. package/src/cli-help.mjs +2 -0
  58. package/src/hooks-cli.mjs +0 -1
  59. package/src/project-cli.mjs +8 -1
  60. package/src/todo-cli.mjs +20 -2
  61. package/src/todo-store-worktree-eol.mjs +191 -0
  62. package/src/todo-store.mjs +35 -17
@@ -1,55 +1,55 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://github.com/kitepon/Lattice/blob/main/docs/schemas/lattice.plan_scope_review.v1.schema.json",
4
- "title": "lattice.plan_scope_review.v1",
5
- "description": "AI-authored review performed after the complete plan is written and before it is registered. Every planned task is judged against the owner-supplied work specifications; task splitting and parallelization are allowed, but a new product purpose is not.",
6
- "$comment": "Lattice validates complete task coverage, known work-spec references, verdict consistency, and digest binding. The operating AI owns the semantic judgment.",
7
- "type": "object",
8
- "additionalProperties": false,
9
- "required": [
10
- "schema", "authoring_digest", "work_specs", "task_assessments", "verdict", "review_digest"
11
- ],
12
- "properties": {
13
- "schema": { "const": "lattice.plan_scope_review.v1" },
14
- "authoring_digest": { "$ref": "#/$defs/digest" },
15
- "work_specs": {
16
- "type": "array", "minItems": 1, "maxItems": 512,
17
- "description": "The owner-supplied work specifications. Do not add inferred improvements as work specifications.",
18
- "items": { "$ref": "#/$defs/workSpec" }
19
- },
20
- "task_assessments": {
21
- "type": "array", "minItems": 1, "maxItems": 512,
22
- "description": "Exactly one assessment for every task that will be registered. Use out_of_scope when the task creates a purpose not required by any work specification.",
23
- "items": { "$ref": "#/$defs/taskAssessment" }
24
- },
25
- "verdict": { "enum": ["scope_preserved", "scope_mismatch"] },
26
- "review_digest": { "$ref": "#/$defs/digest" }
27
- },
28
- "$defs": {
29
- "identifier": { "type": "string", "pattern": "^[0-9A-Za-z](?:[0-9A-Za-z._-]{0,127})$" },
30
- "digest": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
31
- "text": { "type": "string", "minLength": 1, "maxLength": 16384, "pattern": "\\S" },
32
- "workSpec": {
33
- "type": "object", "additionalProperties": false,
34
- "required": ["work_spec_id", "requirement", "acceptance"],
35
- "properties": {
36
- "work_spec_id": { "$ref": "#/$defs/identifier" },
37
- "requirement": { "$ref": "#/$defs/text" },
38
- "acceptance": { "$ref": "#/$defs/text" }
39
- }
40
- },
41
- "taskAssessment": {
42
- "type": "object", "additionalProperties": false,
43
- "required": ["task_id", "work_spec_ids", "judgment", "reason"],
44
- "properties": {
45
- "task_id": { "$ref": "#/$defs/identifier" },
46
- "work_spec_ids": {
47
- "type": "array", "maxItems": 512, "uniqueItems": true,
48
- "items": { "$ref": "#/$defs/identifier" }
49
- },
50
- "judgment": { "enum": ["required", "out_of_scope"] },
51
- "reason": { "$ref": "#/$defs/text" }
52
- }
53
- }
54
- }
55
- }
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/kitepon/Lattice/blob/main/docs/schemas/lattice.plan_scope_review.v1.schema.json",
4
+ "title": "lattice.plan_scope_review.v1",
5
+ "description": "AI-authored review performed after the complete plan is written and before it is registered. Every planned task is judged against the owner-supplied work specifications; task splitting and parallelization are allowed, but a new product purpose is not.",
6
+ "$comment": "Lattice validates complete task coverage, known work-spec references, verdict consistency, and digest binding. The operating AI owns the semantic judgment.",
7
+ "type": "object",
8
+ "additionalProperties": false,
9
+ "required": [
10
+ "schema", "authoring_digest", "work_specs", "task_assessments", "verdict", "review_digest"
11
+ ],
12
+ "properties": {
13
+ "schema": { "const": "lattice.plan_scope_review.v1" },
14
+ "authoring_digest": { "$ref": "#/$defs/digest" },
15
+ "work_specs": {
16
+ "type": "array", "minItems": 1, "maxItems": 512,
17
+ "description": "The owner-supplied work specifications. Do not add inferred improvements as work specifications.",
18
+ "items": { "$ref": "#/$defs/workSpec" }
19
+ },
20
+ "task_assessments": {
21
+ "type": "array", "minItems": 1, "maxItems": 512,
22
+ "description": "Exactly one assessment for every task that will be registered. Use out_of_scope when the task creates a purpose not required by any work specification.",
23
+ "items": { "$ref": "#/$defs/taskAssessment" }
24
+ },
25
+ "verdict": { "enum": ["scope_preserved", "scope_mismatch"] },
26
+ "review_digest": { "$ref": "#/$defs/digest" }
27
+ },
28
+ "$defs": {
29
+ "identifier": { "type": "string", "pattern": "^[0-9A-Za-z](?:[0-9A-Za-z._-]{0,127})$" },
30
+ "digest": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
31
+ "text": { "type": "string", "minLength": 1, "maxLength": 16384, "pattern": "\\S" },
32
+ "workSpec": {
33
+ "type": "object", "additionalProperties": false,
34
+ "required": ["work_spec_id", "requirement", "acceptance"],
35
+ "properties": {
36
+ "work_spec_id": { "$ref": "#/$defs/identifier" },
37
+ "requirement": { "$ref": "#/$defs/text" },
38
+ "acceptance": { "$ref": "#/$defs/text" }
39
+ }
40
+ },
41
+ "taskAssessment": {
42
+ "type": "object", "additionalProperties": false,
43
+ "required": ["task_id", "work_spec_ids", "judgment", "reason"],
44
+ "properties": {
45
+ "task_id": { "$ref": "#/$defs/identifier" },
46
+ "work_spec_ids": {
47
+ "type": "array", "maxItems": 512, "uniqueItems": true,
48
+ "items": { "$ref": "#/$defs/identifier" }
49
+ },
50
+ "judgment": { "enum": ["required", "out_of_scope"] },
51
+ "reason": { "$ref": "#/$defs/text" }
52
+ }
53
+ }
54
+ }
55
+ }
@@ -1,238 +1,238 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://github.com/kitepon/Lattice/blob/main/docs/schemas/lattice.run_request.v1.schema.json",
4
- "title": "lattice.run_request.v1",
5
- "description": "Canonical run request accepted by `lattice plan compile --request` and `lattice run start --request`.",
6
- "$comment": "Runtime validation additionally enforces canonical JSON bytes and the self-digest rule: `request_digest` is the SHA-256 of the canonical JSON of the request with `request_digest` removed. Rejections are reported as `lattice.cli_error.v2` with `detail.reason` and `detail.path`.",
7
- "type": "object",
8
- "additionalProperties": false,
9
- "required": [
10
- "schema",
11
- "request_id",
12
- "repo",
13
- "capacity",
14
- "todos",
15
- "manual_witness",
16
- "sensor_query_set",
17
- "executor_capability",
18
- "claim_mode",
19
- "request_digest"
20
- ],
21
- "properties": {
22
- "schema": { "const": "lattice.run_request.v1" },
23
- "request_id": { "$ref": "#/$defs/identifier" },
24
- "repo": {
25
- "type": "object",
26
- "additionalProperties": false,
27
- "required": ["base_sha", "root_kind"],
28
- "properties": {
29
- "base_sha": { "$ref": "#/$defs/gitSha" },
30
- "root_kind": { "$ref": "#/$defs/identifier" }
31
- }
32
- },
33
- "capacity": {
34
- "type": "object",
35
- "additionalProperties": false,
36
- "required": ["executors"],
37
- "properties": { "executors": { "type": "integer", "minimum": 1 } }
38
- },
39
- "todos": {
40
- "type": "array",
41
- "minItems": 1,
42
- "maxItems": 256,
43
- "items": {
44
- "type": "object",
45
- "additionalProperties": false,
46
- "required": ["todo_id"],
47
- "properties": { "todo_id": { "$ref": "#/$defs/identifier" } }
48
- },
49
- "$comment": "`todo_id` is chosen by the host. It is not qualified by any TODO store project/plan/revision identity."
50
- },
51
- "manual_witness": {
52
- "type": "object",
53
- "description": "Keys must be exactly the `todo_id` values listed in `todos`.",
54
- "additionalProperties": { "$ref": "#/$defs/manualWitness" }
55
- },
56
- "sensor_query_set": {
57
- "type": "object",
58
- "additionalProperties": false,
59
- "required": ["queries"],
60
- "properties": {
61
- "queries": {
62
- "type": "array",
63
- "maxItems": 256,
64
- "items": { "$ref": "#/$defs/sensorQuery" }
65
- }
66
- }
67
- },
68
- "executor_capability": {
69
- "type": "object",
70
- "additionalProperties": false,
71
- "required": ["adapters"],
72
- "properties": {
73
- "adapters": {
74
- "type": "array",
75
- "minItems": 1,
76
- "maxItems": 256,
77
- "uniqueItems": true,
78
- "items": { "$ref": "#/$defs/identifier" }
79
- }
80
- }
81
- },
82
- "claim_mode": { "const": "exact_minimum" },
83
- "request_digest": { "$ref": "#/$defs/digest" }
84
- },
85
- "$defs": {
86
- "identifier": {
87
- "type": "string",
88
- "pattern": "^[0-9A-Za-z](?:[0-9A-Za-z._-]{0,127})$"
89
- },
90
- "digest": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
91
- "gitSha": { "type": "string", "pattern": "^[0-9a-f]{40}$" },
92
- "repoRelativePath": {
93
- "type": "string",
94
- "minLength": 1,
95
- "description": "Repo-relative path. Absolute paths, `..` traversal, empty segments, control characters and `\\` separators are rejected.",
96
- "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.?(?:/|$))[^\\u0000-\\u001f\\u007f\\\\]+$"
97
- },
98
- "repoRelativePathOrPrefix": {
99
- "type": "string",
100
- "minLength": 1,
101
- "description": "Same as `repoRelativePath` but a trailing `/` is allowed to declare a directory write prefix.",
102
- "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.?(?:/|$))[^\\u0000-\\u001f\\u007f\\\\]+/?$"
103
- },
104
- "sensorQuery": {
105
- "type": "object",
106
- "additionalProperties": false,
107
- "required": ["id", "operation"],
108
- "properties": {
109
- "id": { "$ref": "#/$defs/identifier" },
110
- "operation": {
111
- "enum": ["status", "query", "callers", "callees", "impact", "affected"]
112
- },
113
- "target": { "type": "string", "minLength": 1 }
114
- },
115
- "$comment": "`id` must be unique across the query set."
116
- },
117
- "sensorExpect": {
118
- "oneOf": [
119
- {
120
- "type": "object",
121
- "additionalProperties": false,
122
- "required": ["kind", "name", "path"],
123
- "properties": {
124
- "kind": { "const": "symbol" },
125
- "name": { "type": "string", "minLength": 1 },
126
- "path": { "$ref": "#/$defs/repoRelativePath" }
127
- }
128
- },
129
- {
130
- "type": "object",
131
- "additionalProperties": false,
132
- "required": ["kind", "path"],
133
- "properties": {
134
- "kind": { "enum": ["path", "affected"] },
135
- "path": { "$ref": "#/$defs/repoRelativePath" }
136
- }
137
- }
138
- ]
139
- },
140
- "manualWitness": {
141
- "type": "object",
142
- "additionalProperties": false,
143
- "required": [
144
- "owns",
145
- "reads",
146
- "writes",
147
- "resources",
148
- "state_effects",
149
- "sensor_provenance",
150
- "affected_tests",
151
- "unknowns"
152
- ],
153
- "properties": {
154
- "owns": {
155
- "type": "array",
156
- "maxItems": 256,
157
- "items": {
158
- "type": "object",
159
- "additionalProperties": false,
160
- "required": ["kind", "target"],
161
- "properties": {
162
- "kind": { "enum": ["symbol", "path"] },
163
- "target": { "type": "string", "minLength": 1, "maxLength": 1024 }
164
- }
165
- }
166
- },
167
- "reads": {
168
- "type": "array",
169
- "maxItems": 256,
170
- "items": { "$ref": "#/$defs/repoRelativePath" }
171
- },
172
- "writes": {
173
- "type": "array",
174
- "maxItems": 256,
175
- "items": { "$ref": "#/$defs/repoRelativePathOrPrefix" }
176
- },
177
- "resources": {
178
- "type": "array",
179
- "maxItems": 256,
180
- "items": { "$ref": "#/$defs/identifier" }
181
- },
182
- "state_effects": {
183
- "type": "array",
184
- "maxItems": 256,
185
- "items": {
186
- "type": "object",
187
- "additionalProperties": false,
188
- "required": ["resource_id", "kind"],
189
- "properties": {
190
- "resource_id": { "$ref": "#/$defs/identifier" },
191
- "kind": {
192
- "enum": ["state", "schema", "invariant", "effect", "external_effect"]
193
- }
194
- }
195
- }
196
- },
197
- "sensor_provenance": {
198
- "type": "object",
199
- "additionalProperties": false,
200
- "required": ["queries"],
201
- "properties": {
202
- "queries": {
203
- "type": "array",
204
- "maxItems": 256,
205
- "items": {
206
- "type": "object",
207
- "additionalProperties": false,
208
- "required": ["query_id", "expect"],
209
- "properties": {
210
- "query_id": { "$ref": "#/$defs/identifier" },
211
- "expect": { "$ref": "#/$defs/sensorExpect" }
212
- }
213
- }
214
- }
215
- }
216
- },
217
- "affected_tests": {
218
- "type": "array",
219
- "maxItems": 256,
220
- "items": { "$ref": "#/$defs/repoRelativePath" }
221
- },
222
- "unknowns": {
223
- "type": "array",
224
- "maxItems": 256,
225
- "items": {
226
- "type": "object",
227
- "additionalProperties": false,
228
- "required": ["kind", "ref"],
229
- "properties": {
230
- "kind": { "$ref": "#/$defs/identifier" },
231
- "ref": { "type": "string", "minLength": 1 }
232
- }
233
- }
234
- }
235
- }
236
- }
237
- }
238
- }
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/kitepon/Lattice/blob/main/docs/schemas/lattice.run_request.v1.schema.json",
4
+ "title": "lattice.run_request.v1",
5
+ "description": "Canonical run request accepted by `lattice plan compile --request` and `lattice run start --request`.",
6
+ "$comment": "Runtime validation additionally enforces canonical JSON bytes and the self-digest rule: `request_digest` is the SHA-256 of the canonical JSON of the request with `request_digest` removed. Rejections are reported as `lattice.cli_error.v2` with `detail.reason` and `detail.path`.",
7
+ "type": "object",
8
+ "additionalProperties": false,
9
+ "required": [
10
+ "schema",
11
+ "request_id",
12
+ "repo",
13
+ "capacity",
14
+ "todos",
15
+ "manual_witness",
16
+ "sensor_query_set",
17
+ "executor_capability",
18
+ "claim_mode",
19
+ "request_digest"
20
+ ],
21
+ "properties": {
22
+ "schema": { "const": "lattice.run_request.v1" },
23
+ "request_id": { "$ref": "#/$defs/identifier" },
24
+ "repo": {
25
+ "type": "object",
26
+ "additionalProperties": false,
27
+ "required": ["base_sha", "root_kind"],
28
+ "properties": {
29
+ "base_sha": { "$ref": "#/$defs/gitSha" },
30
+ "root_kind": { "$ref": "#/$defs/identifier" }
31
+ }
32
+ },
33
+ "capacity": {
34
+ "type": "object",
35
+ "additionalProperties": false,
36
+ "required": ["executors"],
37
+ "properties": { "executors": { "type": "integer", "minimum": 1 } }
38
+ },
39
+ "todos": {
40
+ "type": "array",
41
+ "minItems": 1,
42
+ "maxItems": 256,
43
+ "items": {
44
+ "type": "object",
45
+ "additionalProperties": false,
46
+ "required": ["todo_id"],
47
+ "properties": { "todo_id": { "$ref": "#/$defs/identifier" } }
48
+ },
49
+ "$comment": "`todo_id` is chosen by the host. It is not qualified by any TODO store project/plan/revision identity."
50
+ },
51
+ "manual_witness": {
52
+ "type": "object",
53
+ "description": "Keys must be exactly the `todo_id` values listed in `todos`.",
54
+ "additionalProperties": { "$ref": "#/$defs/manualWitness" }
55
+ },
56
+ "sensor_query_set": {
57
+ "type": "object",
58
+ "additionalProperties": false,
59
+ "required": ["queries"],
60
+ "properties": {
61
+ "queries": {
62
+ "type": "array",
63
+ "maxItems": 256,
64
+ "items": { "$ref": "#/$defs/sensorQuery" }
65
+ }
66
+ }
67
+ },
68
+ "executor_capability": {
69
+ "type": "object",
70
+ "additionalProperties": false,
71
+ "required": ["adapters"],
72
+ "properties": {
73
+ "adapters": {
74
+ "type": "array",
75
+ "minItems": 1,
76
+ "maxItems": 256,
77
+ "uniqueItems": true,
78
+ "items": { "$ref": "#/$defs/identifier" }
79
+ }
80
+ }
81
+ },
82
+ "claim_mode": { "const": "exact_minimum" },
83
+ "request_digest": { "$ref": "#/$defs/digest" }
84
+ },
85
+ "$defs": {
86
+ "identifier": {
87
+ "type": "string",
88
+ "pattern": "^[0-9A-Za-z](?:[0-9A-Za-z._-]{0,127})$"
89
+ },
90
+ "digest": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
91
+ "gitSha": { "type": "string", "pattern": "^[0-9a-f]{40}$" },
92
+ "repoRelativePath": {
93
+ "type": "string",
94
+ "minLength": 1,
95
+ "description": "Repo-relative path. Absolute paths, `..` traversal, empty segments, control characters and `\\` separators are rejected.",
96
+ "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.?(?:/|$))[^\\u0000-\\u001f\\u007f\\\\]+$"
97
+ },
98
+ "repoRelativePathOrPrefix": {
99
+ "type": "string",
100
+ "minLength": 1,
101
+ "description": "Same as `repoRelativePath` but a trailing `/` is allowed to declare a directory write prefix.",
102
+ "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.?(?:/|$))[^\\u0000-\\u001f\\u007f\\\\]+/?$"
103
+ },
104
+ "sensorQuery": {
105
+ "type": "object",
106
+ "additionalProperties": false,
107
+ "required": ["id", "operation"],
108
+ "properties": {
109
+ "id": { "$ref": "#/$defs/identifier" },
110
+ "operation": {
111
+ "enum": ["status", "query", "callers", "callees", "impact", "affected"]
112
+ },
113
+ "target": { "type": "string", "minLength": 1 }
114
+ },
115
+ "$comment": "`id` must be unique across the query set."
116
+ },
117
+ "sensorExpect": {
118
+ "oneOf": [
119
+ {
120
+ "type": "object",
121
+ "additionalProperties": false,
122
+ "required": ["kind", "name", "path"],
123
+ "properties": {
124
+ "kind": { "const": "symbol" },
125
+ "name": { "type": "string", "minLength": 1 },
126
+ "path": { "$ref": "#/$defs/repoRelativePath" }
127
+ }
128
+ },
129
+ {
130
+ "type": "object",
131
+ "additionalProperties": false,
132
+ "required": ["kind", "path"],
133
+ "properties": {
134
+ "kind": { "enum": ["path", "affected"] },
135
+ "path": { "$ref": "#/$defs/repoRelativePath" }
136
+ }
137
+ }
138
+ ]
139
+ },
140
+ "manualWitness": {
141
+ "type": "object",
142
+ "additionalProperties": false,
143
+ "required": [
144
+ "owns",
145
+ "reads",
146
+ "writes",
147
+ "resources",
148
+ "state_effects",
149
+ "sensor_provenance",
150
+ "affected_tests",
151
+ "unknowns"
152
+ ],
153
+ "properties": {
154
+ "owns": {
155
+ "type": "array",
156
+ "maxItems": 256,
157
+ "items": {
158
+ "type": "object",
159
+ "additionalProperties": false,
160
+ "required": ["kind", "target"],
161
+ "properties": {
162
+ "kind": { "enum": ["symbol", "path"] },
163
+ "target": { "type": "string", "minLength": 1, "maxLength": 1024 }
164
+ }
165
+ }
166
+ },
167
+ "reads": {
168
+ "type": "array",
169
+ "maxItems": 256,
170
+ "items": { "$ref": "#/$defs/repoRelativePath" }
171
+ },
172
+ "writes": {
173
+ "type": "array",
174
+ "maxItems": 256,
175
+ "items": { "$ref": "#/$defs/repoRelativePathOrPrefix" }
176
+ },
177
+ "resources": {
178
+ "type": "array",
179
+ "maxItems": 256,
180
+ "items": { "$ref": "#/$defs/identifier" }
181
+ },
182
+ "state_effects": {
183
+ "type": "array",
184
+ "maxItems": 256,
185
+ "items": {
186
+ "type": "object",
187
+ "additionalProperties": false,
188
+ "required": ["resource_id", "kind"],
189
+ "properties": {
190
+ "resource_id": { "$ref": "#/$defs/identifier" },
191
+ "kind": {
192
+ "enum": ["state", "schema", "invariant", "effect", "external_effect"]
193
+ }
194
+ }
195
+ }
196
+ },
197
+ "sensor_provenance": {
198
+ "type": "object",
199
+ "additionalProperties": false,
200
+ "required": ["queries"],
201
+ "properties": {
202
+ "queries": {
203
+ "type": "array",
204
+ "maxItems": 256,
205
+ "items": {
206
+ "type": "object",
207
+ "additionalProperties": false,
208
+ "required": ["query_id", "expect"],
209
+ "properties": {
210
+ "query_id": { "$ref": "#/$defs/identifier" },
211
+ "expect": { "$ref": "#/$defs/sensorExpect" }
212
+ }
213
+ }
214
+ }
215
+ }
216
+ },
217
+ "affected_tests": {
218
+ "type": "array",
219
+ "maxItems": 256,
220
+ "items": { "$ref": "#/$defs/repoRelativePath" }
221
+ },
222
+ "unknowns": {
223
+ "type": "array",
224
+ "maxItems": 256,
225
+ "items": {
226
+ "type": "object",
227
+ "additionalProperties": false,
228
+ "required": ["kind", "ref"],
229
+ "properties": {
230
+ "kind": { "$ref": "#/$defs/identifier" },
231
+ "ref": { "type": "string", "minLength": 1 }
232
+ }
233
+ }
234
+ }
235
+ }
236
+ }
237
+ }
238
+ }