@tiangong-lca/cli 0.1.9 → 0.1.10

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 (70) hide show
  1. package/README.md +8 -5
  2. package/assets/runtime/cli-runtime-descriptor.schema.json +138 -0
  3. package/assets/runtime/cli-runtime-expectation.schema.json +38 -0
  4. package/assets/runtime/runtime-bootstrap-lock.schema.json +254 -0
  5. package/assets/runtime/runtime-command-result.schema.json +95 -0
  6. package/assets/runtime/runtime-manifest.schema.json +380 -0
  7. package/dist/src/cli.js +5 -1
  8. package/dist/src/cli.js.map +1 -1
  9. package/dist/src/lib/dataset-import-lca.js +2 -2
  10. package/dist/src/lib/dataset-import-lca.js.map +1 -1
  11. package/dist/src/lib/runtime/archive-writer.d.ts +7 -0
  12. package/dist/src/lib/runtime/archive-writer.js +89 -0
  13. package/dist/src/lib/runtime/archive-writer.js.map +1 -0
  14. package/dist/src/lib/runtime/archive.d.ts +2 -0
  15. package/dist/src/lib/runtime/archive.js +122 -0
  16. package/dist/src/lib/runtime/archive.js.map +1 -0
  17. package/dist/src/lib/runtime/command.d.ts +8 -0
  18. package/dist/src/lib/runtime/command.js +57 -0
  19. package/dist/src/lib/runtime/command.js.map +1 -0
  20. package/dist/src/lib/runtime/descriptor.d.ts +11 -0
  21. package/dist/src/lib/runtime/descriptor.js +126 -0
  22. package/dist/src/lib/runtime/descriptor.js.map +1 -0
  23. package/dist/src/lib/runtime/download.d.ts +9 -0
  24. package/dist/src/lib/runtime/download.js +118 -0
  25. package/dist/src/lib/runtime/download.js.map +1 -0
  26. package/dist/src/lib/runtime/exec-command.d.ts +7 -0
  27. package/dist/src/lib/runtime/exec-command.js +83 -0
  28. package/dist/src/lib/runtime/exec-command.js.map +1 -0
  29. package/dist/src/lib/runtime/execute.d.ts +11 -0
  30. package/dist/src/lib/runtime/execute.js +125 -0
  31. package/dist/src/lib/runtime/execute.js.map +1 -0
  32. package/dist/src/lib/runtime/files.d.ts +7 -0
  33. package/dist/src/lib/runtime/files.js +91 -0
  34. package/dist/src/lib/runtime/files.js.map +1 -0
  35. package/dist/src/lib/runtime/host.d.ts +8 -0
  36. package/dist/src/lib/runtime/host.js +37 -0
  37. package/dist/src/lib/runtime/host.js.map +1 -0
  38. package/dist/src/lib/runtime/leases.d.ts +12 -0
  39. package/dist/src/lib/runtime/leases.js +72 -0
  40. package/dist/src/lib/runtime/leases.js.map +1 -0
  41. package/dist/src/lib/runtime/managed-command.d.ts +6 -0
  42. package/dist/src/lib/runtime/managed-command.js +99 -0
  43. package/dist/src/lib/runtime/managed-command.js.map +1 -0
  44. package/dist/src/lib/runtime/manager.d.ts +33 -0
  45. package/dist/src/lib/runtime/manager.js +196 -0
  46. package/dist/src/lib/runtime/manager.js.map +1 -0
  47. package/dist/src/lib/runtime/manifest-types.d.ts +73 -0
  48. package/dist/src/lib/runtime/manifest-types.js +4 -0
  49. package/dist/src/lib/runtime/manifest-types.js.map +1 -0
  50. package/dist/src/lib/runtime/manifest-values.d.ts +15 -0
  51. package/dist/src/lib/runtime/manifest-values.js +124 -0
  52. package/dist/src/lib/runtime/manifest-values.js.map +1 -0
  53. package/dist/src/lib/runtime/manifest.d.ts +7 -0
  54. package/dist/src/lib/runtime/manifest.js +220 -0
  55. package/dist/src/lib/runtime/manifest.js.map +1 -0
  56. package/dist/src/lib/runtime/process.d.ts +3 -0
  57. package/dist/src/lib/runtime/process.js +55 -0
  58. package/dist/src/lib/runtime/process.js.map +1 -0
  59. package/dist/src/lib/runtime/storage.d.ts +8 -0
  60. package/dist/src/lib/runtime/storage.js +142 -0
  61. package/dist/src/lib/runtime/storage.js.map +1 -0
  62. package/dist/src/lib/runtime/types.d.ts +45 -0
  63. package/dist/src/lib/runtime/types.js +9 -0
  64. package/dist/src/lib/runtime/types.js.map +1 -0
  65. package/dist/src/main.js +13 -1
  66. package/dist/src/main.js.map +1 -1
  67. package/dist/src/runtime.d.ts +15 -0
  68. package/dist/src/runtime.js +22 -0
  69. package/dist/src/runtime.js.map +1 -0
  70. package/package.json +5 -1
package/README.md CHANGED
@@ -31,14 +31,16 @@ checkPaths:
31
31
  - test/auth-identity*.test.ts
32
32
  - test/public-auth-identity-receipt.test.ts
33
33
  - test/lca-release*.test.ts
34
- lastReviewedAt: 2026-09-04
35
- lastReviewedCommit: b15c074b1f10314e4835fd64cb7079c8aa9fec3d
36
- lastReviewedNote: 'Reviewed for CLI #272: release-only 0.1.9 after support export #270; runtime, dependencies, lock bytes, public exports and publication mechanics are unchanged.'
34
+ lastReviewedAt: 2026-09-05
35
+ lastReviewedCommit: 20cf32fd45ae1072bb67db27c74d3d81629206f4
36
+ lastReviewedNote: 'Reviewed for CLI #275: release-only 0.1.10 publishes merged runtime manager/bootstrap #274; runtime, dependencies, lock bytes and workflows stay at reviewed merge 20cf32f while release proof adds native and public provenance consumers.'
37
37
  ---
38
38
 
39
+ CLI 0.1.10 is the designated C1 release for `tiangong-lca runtime describe --json` and the explicit `@tiangong-lca/cli/runtime` API for package, asset and Node content inspection. Runtime inspection loads no project `.env`, performs no authentication and downloads nothing. See [the runtime distribution contract](docs/agents/runtime-distribution-contract.md) for exact fields and trust boundaries; verify public availability and provenance before treating the candidate version as released.
40
+
39
41
  # TianGong LCA CLI
40
42
 
41
- Package: `@tiangong-lca/cli` Executable: `tiangong-lca` Current package version: `0.1.8` Node: `24.19.0`
43
+ Package: `@tiangong-lca/cli` Executable: `tiangong-lca` Current package version: `0.1.10` Node: `24.19.0`
42
44
 
43
45
  Repository development is single-track on pnpm `11.24.0` and TypeScript `7.0.2`. The published package remains a clean, package-manager-neutral consumer artifact: it contains runtime files only, not pnpm, TypeScript, Oxlint, tests, source-only tooling, or repository lockfiles.
44
46
 
@@ -131,6 +133,7 @@ node ./bin/tiangong-lca.js --help
131
133
 
132
134
  The package exposes only these supported module APIs in addition to the executable launcher subpath:
133
135
 
136
+ - `@tiangong-lca/cli/runtime` (introduced by #274 and designated for C1 0.1.10) describes CLI package, asset and Node content and compares them against independently trusted exact expectations. It also exposes strict manifest loading, ensure/status/prune and manifest-declared execution with component locks, complete file verification and leases. These operations do not authenticate by themselves or attest a complete public production component. The no-Node bootstrap sources are checked in under `scripts/bootstrap/` and consume only an adjacent product-generated lock; C1 package verification belongs to #275; public product component qualification remains downstream.
134
137
  - `@tiangong-lca/cli/auth-identity-receipt` parses the exact safe receipt projection offline and exports its schema, Node-safe timeout ceiling, and receipt types. It does not expose session resolution, network execution, or test internals; callers that need a fresh receipt still invoke the CLI command.
135
138
  - `@tiangong-lca/cli/command-spec` parses, creates, artifact-binds, and executes exact `tiangong-foundry.command-spec.v1` objects. `display` is diagnostic only; executable plus argv and binding bytes/SHA-256 form the canonical authority. Sync and async execution always use `shell:false`; async callers may inject resolver, clock, sleep, spawn, timeout, and abort adapters. `timeoutMs` must fit Node's maximum timer delay.
136
139
  - `@tiangong-lca/cli/batch` runs bounded generic work with an overall run contract and a required per-item `{ item_id, content_sha256, policy_sha256 }` contract. Every identity/content/policy/resource projection is validated before work starts and rechecked before resumed acceptance or a fresh claim. Identity changes or getter failures emit `item_identity_drift` with `BatchItemIdentityDriftError`, execute zero attempts, and do not let the batch return before other in-flight items drain. An escaping scheduler/event/stop callback records the first infrastructure error, closes further claims, awaits all worker settlements, then rejects. Input order, truthful resource-aware claim order, completion order, pause/stop behavior, awaited monotonic events, and exception isolation are explicit. Optional exclusive keys serialize only matching resources; a blocked key remains unclaimed and consumes no worker while later free keys may use the public ceiling of 64 workers. Per-resource FIFO queues expose only their head through an ordered binary min-heap, giving near `O(n log k)` ready scheduling for `k` resources.
@@ -541,7 +544,7 @@ For `dataset validate`, `--type auto` supports mixed support scopes containing c
541
544
 
542
545
  For `dataset curation-queue build/next/verify`, the CLI owns entity-level Foundry import queue state. `build` writes `outputs/curation-queue-manifest.json`, `outputs/curation-queue-tasks.jsonl`, `outputs/curation-queue-locks.json`, `outputs/curation-queue-blockers.jsonl`, and per-entity `input.jsonl`, `closure.json`, and `entity-run-plan.json`. `next` returns one runnable support/flow/process task based on checkpoint state. `verify` passes only when scoped checkpoints are complete and build blockers are absent. AI authoring must return structured patches or build plans, and remote writes remain gated by deterministic apply, schema/QA, prewrite verify, and readback.
543
546
 
544
- For `dataset import-lca convert`, the CLI delegates all format detection, conversion, validation, bounded spooling, cancellation, and atomic publication to unified Rust `tidas import`; it does not reproduce import logic in TypeScript. Binary selection is `--tidas-bin`, then `TIDAS_BIN`, then `tidas` on PATH. Optional `--tidas-config` maps to native `--config`. Every run first requires a successful `tidas version --format json --progress never` handshake with `tidas.operation-report.v1` and a stable `0.2.x` binary version, then validates the native `tidas.import-execution-report.v1` summary and exact exit-class/code mapping. Native controls include explicit or automatic source format, target, mapping output, process-bundle disablement, warning failure, maximum entry size, memory budget, and queue capacity. The supported release matrix is Linux x86_64/ARM64, macOS Intel/Apple Silicon, and Windows x86_64; Windows ARM64 is unsupported. The npm package includes `assets/import-smoke/simapro.csv` for clean-machine proof but does not bundle a platform binary or require Python.
547
+ For `dataset import-lca convert`, the CLI delegates all format detection, conversion, validation, bounded spooling, cancellation, and atomic publication to unified Rust `tidas import`; it does not reproduce import logic in TypeScript. Binary selection is `--tidas-bin`, then `TIDAS_BIN`, then `tidas` on PATH. Optional `--tidas-config` maps to native `--config`. Every run first requires a successful `tidas version --format json --progress never` handshake with `tidas.operation-report.v1` and a stable `0.2.x` binary version, then validates the native `tidas.import-execution-report.v1` summary and exact exit-class/code mapping. Native controls include explicit or automatic source format, target, mapping output, process-bundle disablement, warning failure, maximum entry size, memory budget, and queue capacity. The supported release matrix is Linux x86_64/ARM64, macOS Apple Silicon (arm64), and Windows x86_64; Windows ARM64 is unsupported. The npm package includes `assets/import-smoke/simapro.csv` for clean-machine proof but does not bundle a platform binary or require Python.
545
548
 
546
549
  For `dataset references rewrite`, `--commit` executes the state-aware save-draft path for patched process and lifecyclemodel rows; without `--commit`, the command only writes local rewrite artifacts.
547
550
 
@@ -0,0 +1,138 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "urn:tiangong-lca:cli-runtime-descriptor:v1",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": [
7
+ "schema",
8
+ "scope",
9
+ "package",
10
+ "platform",
11
+ "node",
12
+ "command",
13
+ "assets",
14
+ "files",
15
+ "content_sha256"
16
+ ],
17
+ "properties": {
18
+ "schema": {
19
+ "const": "tiangong-lca.cli-runtime-descriptor.v1"
20
+ },
21
+ "scope": {
22
+ "const": "cli-package"
23
+ },
24
+ "package": {
25
+ "type": "object",
26
+ "additionalProperties": false,
27
+ "required": ["name", "version", "root", "manifest_sha256"],
28
+ "properties": {
29
+ "name": {
30
+ "const": "@tiangong-lca/cli"
31
+ },
32
+ "version": {
33
+ "type": "string",
34
+ "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
35
+ },
36
+ "root": {
37
+ "type": "string",
38
+ "minLength": 1
39
+ },
40
+ "manifest_sha256": {
41
+ "type": "string",
42
+ "pattern": "^[0-9a-f]{64}$"
43
+ }
44
+ }
45
+ },
46
+ "platform": {
47
+ "enum": ["darwin-arm64", "linux-x64", "linux-arm64", "win32-x64"]
48
+ },
49
+ "node": {
50
+ "type": "object",
51
+ "additionalProperties": false,
52
+ "required": ["version", "executable", "bytes", "sha256"],
53
+ "properties": {
54
+ "version": {
55
+ "type": "string",
56
+ "pattern": "^24\\.(?:19|[2-9][0-9]|[1-9][0-9]{2,})\\.(?:0|[1-9][0-9]*)$"
57
+ },
58
+ "executable": {
59
+ "type": "string",
60
+ "minLength": 1
61
+ },
62
+ "bytes": {
63
+ "type": "integer",
64
+ "minimum": 0,
65
+ "maximum": 536870912
66
+ },
67
+ "sha256": {
68
+ "type": "string",
69
+ "pattern": "^[0-9a-f]{64}$"
70
+ }
71
+ }
72
+ },
73
+ "command": {
74
+ "type": "object",
75
+ "additionalProperties": false,
76
+ "required": ["executable", "argv"],
77
+ "properties": {
78
+ "executable": {
79
+ "type": "string",
80
+ "minLength": 1
81
+ },
82
+ "argv": {
83
+ "type": "array",
84
+ "minItems": 1,
85
+ "maxItems": 1,
86
+ "items": {
87
+ "type": "string",
88
+ "minLength": 1
89
+ }
90
+ }
91
+ }
92
+ },
93
+ "assets": {
94
+ "type": "object",
95
+ "additionalProperties": false,
96
+ "required": ["tidas_schema_root", "sha256"],
97
+ "properties": {
98
+ "tidas_schema_root": {
99
+ "type": "string",
100
+ "minLength": 1
101
+ },
102
+ "sha256": {
103
+ "type": "string",
104
+ "pattern": "^[0-9a-f]{64}$"
105
+ }
106
+ }
107
+ },
108
+ "files": {
109
+ "type": "array",
110
+ "minItems": 1,
111
+ "maxItems": 50000,
112
+ "items": {
113
+ "type": "object",
114
+ "additionalProperties": false,
115
+ "required": ["path", "bytes", "sha256"],
116
+ "properties": {
117
+ "path": {
118
+ "type": "string",
119
+ "minLength": 1
120
+ },
121
+ "bytes": {
122
+ "type": "integer",
123
+ "minimum": 0,
124
+ "maximum": 536870912
125
+ },
126
+ "sha256": {
127
+ "type": "string",
128
+ "pattern": "^[0-9a-f]{64}$"
129
+ }
130
+ }
131
+ }
132
+ },
133
+ "content_sha256": {
134
+ "type": "string",
135
+ "pattern": "^[0-9a-f]{64}$"
136
+ }
137
+ }
138
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "urn:tiangong-lca:cli-runtime-expectation:v1",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": [
7
+ "schema",
8
+ "package_version",
9
+ "platform",
10
+ "content_sha256",
11
+ "node_version",
12
+ "node_sha256"
13
+ ],
14
+ "properties": {
15
+ "schema": {
16
+ "const": "tiangong-lca.cli-runtime-expectation.v1"
17
+ },
18
+ "package_version": {
19
+ "type": "string",
20
+ "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
21
+ },
22
+ "platform": {
23
+ "enum": ["darwin-arm64", "linux-x64", "linux-arm64", "win32-x64"]
24
+ },
25
+ "content_sha256": {
26
+ "type": "string",
27
+ "pattern": "^[0-9a-f]{64}$"
28
+ },
29
+ "node_version": {
30
+ "type": "string",
31
+ "pattern": "^24\\.(?:19|[2-9][0-9]|[1-9][0-9]{2,})\\.(?:0|[1-9][0-9]*)$"
32
+ },
33
+ "node_sha256": {
34
+ "type": "string",
35
+ "pattern": "^[0-9a-f]{64}$"
36
+ }
37
+ }
38
+ }
@@ -0,0 +1,254 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "urn:tiangong-lca:runtime-bootstrap-lock:v1",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": [
7
+ "schema",
8
+ "bootstrap_protocol",
9
+ "posix_script_sha256",
10
+ "powershell_script_sha256",
11
+ "manifest_url",
12
+ "manifest_bytes",
13
+ "manifest_sha256",
14
+ "app_entry",
15
+ "darwin_arm64_component_key",
16
+ "darwin_arm64_archive_url",
17
+ "darwin_arm64_archive_bytes",
18
+ "darwin_arm64_archive_sha256",
19
+ "darwin_arm64_integrity_path",
20
+ "darwin_arm64_integrity_sha256",
21
+ "darwin_arm64_file_count",
22
+ "darwin_arm64_node_path",
23
+ "darwin_arm64_cli_path",
24
+ "linux_x64_component_key",
25
+ "linux_x64_archive_url",
26
+ "linux_x64_archive_bytes",
27
+ "linux_x64_archive_sha256",
28
+ "linux_x64_integrity_path",
29
+ "linux_x64_integrity_sha256",
30
+ "linux_x64_file_count",
31
+ "linux_x64_node_path",
32
+ "linux_x64_cli_path",
33
+ "linux_arm64_component_key",
34
+ "linux_arm64_archive_url",
35
+ "linux_arm64_archive_bytes",
36
+ "linux_arm64_archive_sha256",
37
+ "linux_arm64_integrity_path",
38
+ "linux_arm64_integrity_sha256",
39
+ "linux_arm64_file_count",
40
+ "linux_arm64_node_path",
41
+ "linux_arm64_cli_path",
42
+ "win32_x64_component_key",
43
+ "win32_x64_archive_url",
44
+ "win32_x64_archive_bytes",
45
+ "win32_x64_archive_sha256",
46
+ "win32_x64_integrity_path",
47
+ "win32_x64_integrity_sha256",
48
+ "win32_x64_file_count",
49
+ "win32_x64_node_path",
50
+ "win32_x64_cli_path"
51
+ ],
52
+ "properties": {
53
+ "schema": {
54
+ "const": "tiangong-lca.runtime-bootstrap-lock.v1"
55
+ },
56
+ "bootstrap_protocol": {
57
+ "const": "tiangong-lca.runtime-bootstrap.v1"
58
+ },
59
+ "posix_script_sha256": {
60
+ "type": "string",
61
+ "pattern": "^[0-9a-f]{64}$"
62
+ },
63
+ "powershell_script_sha256": {
64
+ "type": "string",
65
+ "pattern": "^[0-9a-f]{64}$"
66
+ },
67
+ "manifest_url": {
68
+ "type": "string",
69
+ "format": "uri",
70
+ "pattern": "^https://"
71
+ },
72
+ "manifest_bytes": {
73
+ "type": "integer",
74
+ "minimum": 1,
75
+ "maximum": 33554432
76
+ },
77
+ "manifest_sha256": {
78
+ "type": "string",
79
+ "pattern": "^[0-9a-f]{64}$"
80
+ },
81
+ "app_entry": {
82
+ "type": "string",
83
+ "pattern": "^[a-z0-9][a-z0-9._-]{0,63}$"
84
+ },
85
+ "darwin_arm64_component_key": {
86
+ "type": "string",
87
+ "pattern": "^[0-9a-f]{64}$"
88
+ },
89
+ "darwin_arm64_archive_url": {
90
+ "type": "string",
91
+ "format": "uri",
92
+ "pattern": "^https://"
93
+ },
94
+ "darwin_arm64_archive_bytes": {
95
+ "type": "integer",
96
+ "minimum": 1,
97
+ "maximum": 536870912
98
+ },
99
+ "darwin_arm64_archive_sha256": {
100
+ "type": "string",
101
+ "pattern": "^[0-9a-f]{64}$"
102
+ },
103
+ "darwin_arm64_integrity_path": {
104
+ "type": "string",
105
+ "minLength": 1,
106
+ "maxLength": 255
107
+ },
108
+ "darwin_arm64_integrity_sha256": {
109
+ "type": "string",
110
+ "pattern": "^[0-9a-f]{64}$"
111
+ },
112
+ "darwin_arm64_file_count": {
113
+ "type": "integer",
114
+ "minimum": 1,
115
+ "maximum": 50000
116
+ },
117
+ "darwin_arm64_node_path": {
118
+ "type": "string",
119
+ "minLength": 1,
120
+ "maxLength": 255
121
+ },
122
+ "darwin_arm64_cli_path": {
123
+ "type": "string",
124
+ "minLength": 1,
125
+ "maxLength": 255
126
+ },
127
+ "linux_x64_component_key": {
128
+ "type": "string",
129
+ "pattern": "^[0-9a-f]{64}$"
130
+ },
131
+ "linux_x64_archive_url": {
132
+ "type": "string",
133
+ "format": "uri",
134
+ "pattern": "^https://"
135
+ },
136
+ "linux_x64_archive_bytes": {
137
+ "type": "integer",
138
+ "minimum": 1,
139
+ "maximum": 536870912
140
+ },
141
+ "linux_x64_archive_sha256": {
142
+ "type": "string",
143
+ "pattern": "^[0-9a-f]{64}$"
144
+ },
145
+ "linux_x64_integrity_path": {
146
+ "type": "string",
147
+ "minLength": 1,
148
+ "maxLength": 255
149
+ },
150
+ "linux_x64_integrity_sha256": {
151
+ "type": "string",
152
+ "pattern": "^[0-9a-f]{64}$"
153
+ },
154
+ "linux_x64_file_count": {
155
+ "type": "integer",
156
+ "minimum": 1,
157
+ "maximum": 50000
158
+ },
159
+ "linux_x64_node_path": {
160
+ "type": "string",
161
+ "minLength": 1,
162
+ "maxLength": 255
163
+ },
164
+ "linux_x64_cli_path": {
165
+ "type": "string",
166
+ "minLength": 1,
167
+ "maxLength": 255
168
+ },
169
+ "linux_arm64_component_key": {
170
+ "type": "string",
171
+ "pattern": "^[0-9a-f]{64}$"
172
+ },
173
+ "linux_arm64_archive_url": {
174
+ "type": "string",
175
+ "format": "uri",
176
+ "pattern": "^https://"
177
+ },
178
+ "linux_arm64_archive_bytes": {
179
+ "type": "integer",
180
+ "minimum": 1,
181
+ "maximum": 536870912
182
+ },
183
+ "linux_arm64_archive_sha256": {
184
+ "type": "string",
185
+ "pattern": "^[0-9a-f]{64}$"
186
+ },
187
+ "linux_arm64_integrity_path": {
188
+ "type": "string",
189
+ "minLength": 1,
190
+ "maxLength": 255
191
+ },
192
+ "linux_arm64_integrity_sha256": {
193
+ "type": "string",
194
+ "pattern": "^[0-9a-f]{64}$"
195
+ },
196
+ "linux_arm64_file_count": {
197
+ "type": "integer",
198
+ "minimum": 1,
199
+ "maximum": 50000
200
+ },
201
+ "linux_arm64_node_path": {
202
+ "type": "string",
203
+ "minLength": 1,
204
+ "maxLength": 255
205
+ },
206
+ "linux_arm64_cli_path": {
207
+ "type": "string",
208
+ "minLength": 1,
209
+ "maxLength": 255
210
+ },
211
+ "win32_x64_component_key": {
212
+ "type": "string",
213
+ "pattern": "^[0-9a-f]{64}$"
214
+ },
215
+ "win32_x64_archive_url": {
216
+ "type": "string",
217
+ "format": "uri",
218
+ "pattern": "^https://"
219
+ },
220
+ "win32_x64_archive_bytes": {
221
+ "type": "integer",
222
+ "minimum": 1,
223
+ "maximum": 536870912
224
+ },
225
+ "win32_x64_archive_sha256": {
226
+ "type": "string",
227
+ "pattern": "^[0-9a-f]{64}$"
228
+ },
229
+ "win32_x64_integrity_path": {
230
+ "type": "string",
231
+ "minLength": 1,
232
+ "maxLength": 255
233
+ },
234
+ "win32_x64_integrity_sha256": {
235
+ "type": "string",
236
+ "pattern": "^[0-9a-f]{64}$"
237
+ },
238
+ "win32_x64_file_count": {
239
+ "type": "integer",
240
+ "minimum": 1,
241
+ "maximum": 50000
242
+ },
243
+ "win32_x64_node_path": {
244
+ "type": "string",
245
+ "minLength": 1,
246
+ "maxLength": 255
247
+ },
248
+ "win32_x64_cli_path": {
249
+ "type": "string",
250
+ "minLength": 1,
251
+ "maxLength": 255
252
+ }
253
+ }
254
+ }
@@ -0,0 +1,95 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "urn:tiangong-lca:runtime-command-result:v1",
4
+ "oneOf": [
5
+ {
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["schema", "manifest_sha256", "platform", "status", "components"],
9
+ "properties": {
10
+ "schema": {
11
+ "const": "tiangong-lca.runtime-status.v1"
12
+ },
13
+ "manifest_sha256": {
14
+ "type": "string",
15
+ "pattern": "^[0-9a-f]{64}$"
16
+ },
17
+ "platform": {
18
+ "enum": ["darwin-arm64", "linux-x64", "linux-arm64", "win32-x64"]
19
+ },
20
+ "status": {
21
+ "enum": ["ready", "missing", "blocked"]
22
+ },
23
+ "components": {
24
+ "type": "array",
25
+ "items": {
26
+ "type": "object",
27
+ "additionalProperties": false,
28
+ "required": ["id", "version", "key", "status", "root", "reason"],
29
+ "properties": {
30
+ "id": {
31
+ "type": "string"
32
+ },
33
+ "version": {
34
+ "type": "string"
35
+ },
36
+ "key": {
37
+ "type": "string",
38
+ "pattern": "^[0-9a-f]{64}$"
39
+ },
40
+ "status": {
41
+ "enum": ["ready", "missing", "unverified", "corrupt"]
42
+ },
43
+ "root": {
44
+ "type": "string"
45
+ },
46
+ "reason": {
47
+ "type": ["string", "null"]
48
+ }
49
+ }
50
+ },
51
+ "maxItems": 128
52
+ }
53
+ }
54
+ },
55
+ {
56
+ "type": "object",
57
+ "additionalProperties": false,
58
+ "required": ["schema", "removed", "retained"],
59
+ "properties": {
60
+ "schema": {
61
+ "const": "tiangong-lca.runtime-prune.v1"
62
+ },
63
+ "removed": {
64
+ "type": "array",
65
+ "items": {
66
+ "type": "string",
67
+ "pattern": "^[0-9a-f]{64}$"
68
+ },
69
+ "maxItems": 128
70
+ },
71
+ "retained": {
72
+ "type": "array",
73
+ "items": {
74
+ "type": "string",
75
+ "pattern": "^[0-9a-f]{64}$"
76
+ },
77
+ "maxItems": 128
78
+ }
79
+ }
80
+ },
81
+ {
82
+ "type": "object",
83
+ "additionalProperties": false,
84
+ "required": ["schema", "released"],
85
+ "properties": {
86
+ "schema": {
87
+ "const": "tiangong-lca.runtime-lease-release.v1"
88
+ },
89
+ "released": {
90
+ "type": "boolean"
91
+ }
92
+ }
93
+ }
94
+ ]
95
+ }