@quolu/lattice 0.52.0 → 0.52.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.
- package/LICENSE +147 -147
- package/README.ja.md +355 -355
- package/README.md +258 -258
- package/bin/lattice-mcp.mjs +0 -0
- package/bin/lattice-scripted-adapter.mjs +0 -0
- package/bin/lattice-scripted-worker.mjs +0 -0
- package/bin/lattice-work-order-adapter.mjs +0 -0
- package/bin/lattice.mjs +0 -0
- package/docs/bridge-setup.md +132 -132
- package/docs/schemas/lattice.executor_packet.v1.schema.json +57 -57
- package/docs/schemas/lattice.executor_receipt.v1.schema.json +66 -66
- package/docs/schemas/lattice.phase_todo_revision.v3.schema.json +360 -360
- package/docs/schemas/lattice.plan_create_input.v1.schema.json +56 -56
- package/docs/schemas/lattice.plan_create_input.v2.schema.json +72 -72
- package/docs/schemas/lattice.plan_create_input.v3.schema.json +81 -81
- package/docs/schemas/lattice.plan_create_input.v4.schema.json +85 -85
- package/docs/schemas/lattice.run_request.v1.schema.json +238 -238
- package/docs/schemas/lattice.runtime_adapter_capabilities.v2.schema.json +55 -55
- package/docs/schemas/lattice.runtime_adapter_registration_input.v1.schema.json +78 -78
- package/docs/schemas/lattice.runtime_adapter_registration_input.v2.schema.json +86 -86
- package/docs/schemas/lattice.todo_extraction.v2.schema.json +298 -298
- package/docs/schemas/lattice.todo_extraction.v3.schema.json +146 -146
- package/docs/schemas/lattice.todo_revision.v2.schema.json +260 -260
- package/docs/schemas/lattice.todo_revision_set.v3.schema.json +363 -363
- package/package.json +103 -103
- package/sensor/LICENSE +21 -21
- package/sensor/NOTICE +19 -19
- package/sensor/dist/bin/lattice-sensor.js +9 -9
- package/sensor/dist/db/index.js +24 -24
- package/sensor/dist/db/migrations.js +41 -41
- package/sensor/dist/db/queries.js +164 -164
- package/sensor/dist/db/schema.sql +205 -205
- package/sensor/dist/directory.js +5 -5
- package/sensor/dist/extraction/wasm/tree-sitter-c_sharp.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-cfml.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-cfquery.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-cfscript.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-cobol.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-erlang.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-go.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-java.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-javascript.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-nix.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-pascal.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-python.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-tsx.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-typescript.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-vbnet.wasm +0 -0
- package/sensor/dist/mcp/liveness-watchdog.js +53 -53
- package/sensor/dist/mcp/server-instructions.js +95 -95
- package/sensor/package.json +56 -56
- package/src/artifact-contracts-v2.mjs +325 -325
- package/src/artifact-contracts.mjs +895 -895
- package/src/boundary-compiler.mjs +712 -712
- package/src/boundary-observation-compiler-v2.mjs +344 -344
- package/src/bounded-seam.mjs +230 -230
- package/src/bridge-address.mjs +107 -107
- package/src/bridge-cli.mjs +297 -297
- package/src/bridge-config.mjs +346 -346
- package/src/bridge-daemon.mjs +378 -378
- package/src/bridge-launch-agent.mjs +323 -323
- package/src/bridge-registrar.mjs +102 -102
- package/src/bridge-server.mjs +376 -376
- package/src/cli-help.mjs +308 -308
- package/src/cli-stdio.mjs +40 -40
- package/src/control-compiler.mjs +532 -532
- package/src/dag-chain.mjs +261 -261
- package/src/factory-diagnostics.mjs +188 -188
- package/src/hash-chain.mjs +76 -76
- package/src/hooks-cli.mjs +1057 -1053
- package/src/isolation-runner.mjs +409 -409
- package/src/node-version-guard.mjs +44 -44
- package/src/project-cli.mjs +697 -697
- package/src/project-identity.mjs +130 -130
- package/src/rc1-black-box-oracle.mjs +906 -906
- package/src/rc1-comparison.mjs +154 -154
- package/src/rc1-evidence-bundle.mjs +456 -456
- package/src/rc1-v4-campaign.mjs +708 -708
- package/src/rc1-v4-transform.mjs +467 -467
- package/src/rc1-v5-artifact-set.mjs +855 -855
- package/src/rc1-v5-behavior-evidence.mjs +594 -594
- package/src/rc1-v5-campaign.mjs +797 -797
- package/src/rc1-v5-transform.mjs +421 -421
- package/src/rc1-v6-artifact-set.mjs +807 -807
- package/src/rc1-v6-behavior-evidence.mjs +273 -273
- package/src/rc1-v6-campaign.mjs +623 -623
- package/src/rc1-v6-causal-binding.mjs +473 -473
- package/src/rc1-v6-measurement.mjs +313 -313
- package/src/rc2-artifact-set.mjs +1584 -1584
- package/src/rc2-campaign.mjs +1506 -1502
- package/src/rc2-delivery-policy-front-end.mjs +1079 -1079
- package/src/rc2-delivery-policy-oracle.mjs +134 -134
- package/src/rc2-delivery-policy-transform.mjs +1127 -1127
- package/src/rc2-rc1-transfer-front-end.mjs +511 -511
- package/src/rc3-actual-dogfood.mjs +652 -652
- package/src/rc3-dogfood-scaffold.mjs +315 -315
- package/src/rc3-scripted-campaign.mjs +1383 -1383
- package/src/rc4-stage1-dogfood.mjs +673 -673
- package/src/runtime-adapter-registry.mjs +524 -520
- package/src/runtime-cli.mjs +4588 -4584
- package/src/runtime-contracts.mjs +824 -824
- package/src/runtime-control-store.mjs +604 -600
- package/src/runtime-controller-protocol.mjs +587 -587
- package/src/runtime-decision-verifier.mjs +701 -701
- package/src/runtime-diff-observer.mjs +361 -361
- package/src/runtime-direct-os-observer.mjs +301 -301
- package/src/runtime-driver-state.mjs +166 -162
- package/src/runtime-engine.mjs +779 -779
- package/src/runtime-errors.mjs +356 -356
- package/src/runtime-event-store.mjs +189 -189
- package/src/runtime-front-end.mjs +925 -925
- package/src/runtime-gate-store.mjs +481 -477
- package/src/runtime-hold-recompile.mjs +916 -916
- package/src/runtime-io-sentinel.mjs +391 -391
- package/src/runtime-lifecycle-lock.mjs +294 -290
- package/src/runtime-managed-supervisor.mjs +1490 -1490
- package/src/runtime-multi-epoch-store.mjs +838 -834
- package/src/runtime-projection.mjs +269 -269
- package/src/runtime-pull-intake.mjs +1192 -1188
- package/src/runtime-scripted-adapter-controller.mjs +1160 -1156
- package/src/runtime-scripted-executor.mjs +163 -163
- package/src/runtime-scripted-worktree.mjs +104 -104
- package/src/runtime-seam-resolve.mjs +428 -428
- package/src/runtime-seam-treatment.mjs +173 -173
- package/src/runtime-socket-owner.mjs +125 -125
- package/src/runtime-work-order-contracts.mjs +91 -91
- package/src/runtime-work-order-controller.mjs +1171 -1167
- package/src/runtime-worktree-executor.mjs +199 -199
- package/src/schedulability-compiler-v2.mjs +303 -303
- package/src/schedulability-verifier-v2.mjs +317 -317
- package/src/seam-apply.mjs +549 -549
- package/src/seam-commit-shared.mjs +22 -22
- package/src/seam-commit-transform.mjs +81 -81
- package/src/seam-commit.mjs +18 -18
- package/src/seam-cost.mjs +322 -322
- package/src/seam-derivation.mjs +188 -188
- package/src/seam-gate.mjs +146 -146
- package/src/seam-proposal-contracts.mjs +446 -446
- package/src/seam-proposal-queries.mjs +521 -521
- package/src/seam-proposal.mjs +2011 -2011
- package/src/seam-ref.mjs +33 -33
- package/src/seam-rewrite.mjs +286 -286
- package/src/seam-transform.mjs +554 -554
- package/src/seam-verification.mjs +260 -260
- package/src/sensor-adapter.mjs +432 -432
- package/src/sensor-cli.mjs +139 -139
- package/src/sensor-diff.mjs +661 -661
- package/src/sensor-node-runtime.mjs +53 -53
- package/src/sensor-runtime.mjs +52 -52
- package/src/timestamp-contract.mjs +8 -8
- package/src/todo-audit-pending.mjs +91 -91
- package/src/todo-chain.mjs +178 -178
- package/src/todo-cli.mjs +3141 -3126
- package/src/todo-contracts.mjs +728 -728
- package/src/todo-dashboard-registry.mjs +573 -573
- package/src/todo-dispatch-shape.mjs +190 -190
- package/src/todo-gantt-html-independence.mjs +239 -239
- package/src/todo-gantt-html-shared.mjs +226 -226
- package/src/todo-gantt-html-style.mjs +131 -131
- package/src/todo-gantt-html.mjs +248 -248
- package/src/todo-gantt-layout.mjs +974 -974
- package/src/todo-gantt-live.mjs +361 -361
- package/src/todo-gantt-nested.mjs +263 -263
- package/src/todo-gantt-presentation.mjs +217 -217
- package/src/todo-gantt-scope.mjs +123 -123
- package/src/todo-gantt-svg.mjs +353 -353
- package/src/todo-independence-contracts.mjs +595 -595
- package/src/todo-independence-guidance.mjs +322 -322
- package/src/todo-independence.mjs +640 -640
- package/src/todo-markdown-renderer.mjs +260 -260
- package/src/todo-migration.mjs +448 -448
- package/src/todo-narrative-anchor.mjs +130 -130
- package/src/todo-note-store.mjs +629 -625
- package/src/todo-parallel-candidates.mjs +114 -114
- package/src/todo-revision.mjs +995 -995
- package/src/todo-split.mjs +472 -472
- package/src/todo-status.mjs +690 -690
- package/src/todo-store-git-transaction.mjs +418 -418
- package/src/todo-store.mjs +4322 -4314
- package/src/treatment-compiler.mjs +728 -728
- package/src/treatment-runner.mjs +656 -656
- package/src/witness-scaffold.mjs +180 -180
|
@@ -1,238 +1,238 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://github.com/kitepon-rgb/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-rgb/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,55 +1,55 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://github.com/kitepon-rgb/Lattice/blob/main/docs/schemas/lattice.runtime_adapter_capabilities.v2.schema.json",
|
|
4
|
-
"title": "lattice.runtime_adapter_capabilities.v2",
|
|
5
|
-
"description": "controller handshakeとlaunch descriptorを束縛するruntime adapter能力契約。host_driven_epochはhostによるmanaged epoch駆動の受入宣言である。",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"additionalProperties": false,
|
|
8
|
-
"required": [
|
|
9
|
-
"schema",
|
|
10
|
-
"operations",
|
|
11
|
-
"process_observation",
|
|
12
|
-
"worktree_fingerprint",
|
|
13
|
-
"staged_write_lease",
|
|
14
|
-
"durable_dispatch",
|
|
15
|
-
"host_driven_epoch",
|
|
16
|
-
"capabilities_digest"
|
|
17
|
-
],
|
|
18
|
-
"properties": {
|
|
19
|
-
"schema": {
|
|
20
|
-
"const": "lattice.runtime_adapter_capabilities.v2"
|
|
21
|
-
},
|
|
22
|
-
"operations": {
|
|
23
|
-
"const": [
|
|
24
|
-
"dispatch",
|
|
25
|
-
"observe",
|
|
26
|
-
"inventory",
|
|
27
|
-
"barrier",
|
|
28
|
-
"rebind",
|
|
29
|
-
"prepare",
|
|
30
|
-
"activate",
|
|
31
|
-
"release",
|
|
32
|
-
"revoke"
|
|
33
|
-
]
|
|
34
|
-
},
|
|
35
|
-
"process_observation": {
|
|
36
|
-
"const": true
|
|
37
|
-
},
|
|
38
|
-
"worktree_fingerprint": {
|
|
39
|
-
"const": true
|
|
40
|
-
},
|
|
41
|
-
"staged_write_lease": {
|
|
42
|
-
"const": true
|
|
43
|
-
},
|
|
44
|
-
"durable_dispatch": {
|
|
45
|
-
"const": true
|
|
46
|
-
},
|
|
47
|
-
"host_driven_epoch": {
|
|
48
|
-
"type": "boolean"
|
|
49
|
-
},
|
|
50
|
-
"capabilities_digest": {
|
|
51
|
-
"type": "string",
|
|
52
|
-
"pattern": "^[0-9a-f]{64}$"
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/kitepon-rgb/Lattice/blob/main/docs/schemas/lattice.runtime_adapter_capabilities.v2.schema.json",
|
|
4
|
+
"title": "lattice.runtime_adapter_capabilities.v2",
|
|
5
|
+
"description": "controller handshakeとlaunch descriptorを束縛するruntime adapter能力契約。host_driven_epochはhostによるmanaged epoch駆動の受入宣言である。",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"schema",
|
|
10
|
+
"operations",
|
|
11
|
+
"process_observation",
|
|
12
|
+
"worktree_fingerprint",
|
|
13
|
+
"staged_write_lease",
|
|
14
|
+
"durable_dispatch",
|
|
15
|
+
"host_driven_epoch",
|
|
16
|
+
"capabilities_digest"
|
|
17
|
+
],
|
|
18
|
+
"properties": {
|
|
19
|
+
"schema": {
|
|
20
|
+
"const": "lattice.runtime_adapter_capabilities.v2"
|
|
21
|
+
},
|
|
22
|
+
"operations": {
|
|
23
|
+
"const": [
|
|
24
|
+
"dispatch",
|
|
25
|
+
"observe",
|
|
26
|
+
"inventory",
|
|
27
|
+
"barrier",
|
|
28
|
+
"rebind",
|
|
29
|
+
"prepare",
|
|
30
|
+
"activate",
|
|
31
|
+
"release",
|
|
32
|
+
"revoke"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"process_observation": {
|
|
36
|
+
"const": true
|
|
37
|
+
},
|
|
38
|
+
"worktree_fingerprint": {
|
|
39
|
+
"const": true
|
|
40
|
+
},
|
|
41
|
+
"staged_write_lease": {
|
|
42
|
+
"const": true
|
|
43
|
+
},
|
|
44
|
+
"durable_dispatch": {
|
|
45
|
+
"const": true
|
|
46
|
+
},
|
|
47
|
+
"host_driven_epoch": {
|
|
48
|
+
"type": "boolean"
|
|
49
|
+
},
|
|
50
|
+
"capabilities_digest": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|