@tiangong-lca/cli 0.0.27 → 0.0.29
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/README.md +85 -2
- package/dist/src/cli.js +544 -3
- package/dist/src/cli.js.map +1 -1
- package/dist/src/lib/dataset-maintenance-contract.js.map +1 -1
- package/dist/src/lib/dataset-maintenance-flow-identity-approval-claim.js +175 -0
- package/dist/src/lib/dataset-maintenance-flow-identity-approval-claim.js.map +1 -0
- package/dist/src/lib/dataset-maintenance-flow-identity-capture.js +511 -0
- package/dist/src/lib/dataset-maintenance-flow-identity-capture.js.map +1 -0
- package/dist/src/lib/dataset-maintenance-flow-identity-command.js +26 -0
- package/dist/src/lib/dataset-maintenance-flow-identity-command.js.map +1 -0
- package/dist/src/lib/dataset-maintenance-flow-identity-contract.js +784 -0
- package/dist/src/lib/dataset-maintenance-flow-identity-contract.js.map +1 -0
- package/dist/src/lib/dataset-maintenance-flow-identity-execution-contract.js +1317 -0
- package/dist/src/lib/dataset-maintenance-flow-identity-execution-contract.js.map +1 -0
- package/dist/src/lib/dataset-maintenance-flow-identity-freeze.js +342 -0
- package/dist/src/lib/dataset-maintenance-flow-identity-freeze.js.map +1 -0
- package/dist/src/lib/dataset-maintenance-flow-identity-plan.js +900 -0
- package/dist/src/lib/dataset-maintenance-flow-identity-plan.js.map +1 -0
- package/dist/src/lib/dataset-maintenance-flow-identity-recovery.js +688 -0
- package/dist/src/lib/dataset-maintenance-flow-identity-recovery.js.map +1 -0
- package/dist/src/lib/dataset-maintenance-flow-identity-run.js +1369 -0
- package/dist/src/lib/dataset-maintenance-flow-identity-run.js.map +1 -0
- package/dist/src/lib/dataset-maintenance-flow-identity-seal.js +144 -0
- package/dist/src/lib/dataset-maintenance-flow-identity-seal.js.map +1 -0
- package/dist/src/lib/dataset-maintenance-flow-identity-verify.js +377 -0
- package/dist/src/lib/dataset-maintenance-flow-identity-verify.js.map +1 -0
- package/dist/src/lib/dataset-maintenance-flow-identity-wire.js +178 -0
- package/dist/src/lib/dataset-maintenance-flow-identity-wire.js.map +1 -0
- package/dist/src/lib/dataset-maintenance-protected-verify.js +76 -1
- package/dist/src/lib/dataset-maintenance-protected-verify.js.map +1 -1
- package/dist/src/lib/dataset-maintenance-remote.js +156 -10
- package/dist/src/lib/dataset-maintenance-remote.js.map +1 -1
- package/dist/src/lib/http.js.map +1 -1
- package/dist/src/lib/lca-release.js +683 -0
- package/dist/src/lib/lca-release.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,8 +17,10 @@ checkPaths:
|
|
|
17
17
|
- bin/**
|
|
18
18
|
- src/cli.ts
|
|
19
19
|
- src/main.ts
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
- src/lib/lca-release.ts
|
|
21
|
+
- test/lca-release*.test.ts
|
|
22
|
+
lastReviewedAt: 2026-07-16
|
|
23
|
+
lastReviewedCommit: 1aa9b58f7a62f50d2cb680f372452fe829686d75
|
|
22
24
|
---
|
|
23
25
|
|
|
24
26
|
# TianGong LCA CLI
|
|
@@ -35,6 +37,10 @@ Review note, 2026-07-15: `dataset maintenance run-protected` adds a production-o
|
|
|
35
37
|
|
|
36
38
|
Review note, 2026-07-15: `dataset maintenance freeze-protected` and `seal-protected-approval` close the preparation gap without adding a second execution path. Freeze preparation authenticates directly to the explicitly confirmed production project, performs only complete account/support reads plus the 50 derivative snapshot RPCs, and writes an unapproved canonical request. Approval sealing is entirely local and requires the exact human-returned UTF-8 bytes plus explicit freeze/request/text hashes and account confirmation. Only the later `run-protected` command can preflight or admit work.
|
|
37
39
|
|
|
40
|
+
Review note, 2026-07-16: `release ...` is the LCI/LCIA data-release command family, not the npm package release workflow. It uses the normal user-session bootstrap, requires the server to authorize `data_product_manager` for private and mutating operations, never accepts a service-role key, and keeps large Calculation Bundle or ZIP payloads in hash-verified files instead of stdout.
|
|
41
|
+
|
|
42
|
+
Review note, 2026-07-17: `dataset maintenance flow-identity capture|plan|freeze|seal-approval|run|freeze-recovery|seal-recovery-approval|run-recovery|verify` is the dedicated Step 3 workflow for approved BAFU elementary-flow identity mappings. Capture performs one complete authenticated census and one database-attestation POST; plan rejects historical authorities and binds the exact 305-source request to its immutable receipt. The write path uses a database-minted one-wrapper permit that rotates after each successful process/finalize write and is never stored in proof artifacts; a create-only local approval claim is defense in depth. A lost permit or preflight response cannot be replayed: the operator must freeze and approve an exact recovery baseline, while status/recovery may locate only the same actor-owned scope through the exact read-only lookup. Terminal verification independently proves unchanged source/public/support rows, exact desired owner-draft processes, zero approved-source residue, unchanged pending/blocker/orphan closure, and causal derivative completion. Failed/stale derivatives still require a separate derivative-only plan, freeze, and approval and never replay the process mutation. Production use remains gated on merge, Preview validation, and coordinated database/CLI release.
|
|
43
|
+
|
|
38
44
|
## Run
|
|
39
45
|
|
|
40
46
|
One-off published run:
|
|
@@ -87,6 +93,83 @@ TIANGONG_LCA_DISABLE_SESSION_CACHE=false
|
|
|
87
93
|
TIANGONG_LCA_FORCE_REAUTH=false
|
|
88
94
|
```
|
|
89
95
|
|
|
96
|
+
## LCI/LCIA Data Release
|
|
97
|
+
|
|
98
|
+
The `release` command family is the authenticated transport used by the standalone release control plane. It does not introduce a TIDAS schema variant: result packages reuse the existing Process exchange structure for LCI and the existing Process LCIA result fields, with a LifecycleModel referencing the resulting Process.
|
|
99
|
+
|
|
100
|
+
The canonical publication set contains four self-contained ZIPs:
|
|
101
|
+
|
|
102
|
+
- Unit Process full closure in TIDAS and ILCD.
|
|
103
|
+
- Standalone LifecycleModel + Result full closure in TIDAS and ILCD. This package repeats the required canonical Unit Process and support closure, so it has no dependency on another ZIP.
|
|
104
|
+
|
|
105
|
+
Workflow:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
tiangong-lca release prepare --input ./release-prepare.json --json
|
|
109
|
+
tiangong-lca release upload --input ./release-upload.json --output ./upload-receipt.json
|
|
110
|
+
tiangong-lca release finalize --input ./release-finalize.json --json
|
|
111
|
+
tiangong-lca release approve --input ./release-approval.json --json
|
|
112
|
+
tiangong-lca release publish --input ./release-publish.json --json
|
|
113
|
+
tiangong-lca release readback-verify --input ./release-readback.json --json
|
|
114
|
+
tiangong-lca release status --release-run-id <release-run-id> --json
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
`release-upload.json` contains the immutable plan identity plus exactly one artifact for each profile/format pair. Paths are resolved relative to the request file:
|
|
118
|
+
|
|
119
|
+
```json
|
|
120
|
+
{
|
|
121
|
+
"releaseRunId": "11111111-1111-4111-8111-111111111111",
|
|
122
|
+
"publishPlanHash": "<64 lowercase hex characters>",
|
|
123
|
+
"artifacts": [
|
|
124
|
+
{
|
|
125
|
+
"profileId": "unit-process-full-closure.v1",
|
|
126
|
+
"format": "tidas",
|
|
127
|
+
"path": "./packages/unit-process.tidas.zip",
|
|
128
|
+
"sha256": "<64 lowercase hex characters>",
|
|
129
|
+
"byteSize": 1234,
|
|
130
|
+
"mediaType": "application/zip"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"profileId": "unit-process-full-closure.v1",
|
|
134
|
+
"format": "ilcd",
|
|
135
|
+
"path": "./packages/unit-process.ilcd.zip",
|
|
136
|
+
"sha256": "<64 lowercase hex characters>",
|
|
137
|
+
"byteSize": 1234,
|
|
138
|
+
"mediaType": "application/zip"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"profileId": "standalone-lifecyclemodel-result-full-closure.v1",
|
|
142
|
+
"format": "tidas",
|
|
143
|
+
"path": "./packages/result.tidas.zip",
|
|
144
|
+
"sha256": "<64 lowercase hex characters>",
|
|
145
|
+
"byteSize": 1234,
|
|
146
|
+
"mediaType": "application/zip"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"profileId": "standalone-lifecyclemodel-result-full-closure.v1",
|
|
150
|
+
"format": "ilcd",
|
|
151
|
+
"path": "./packages/result.ilcd.zip",
|
|
152
|
+
"sha256": "<64 lowercase hex characters>",
|
|
153
|
+
"byteSize": 1234,
|
|
154
|
+
"mediaType": "application/zip"
|
|
155
|
+
}
|
|
156
|
+
]
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
The CLI verifies every local upload against its declared byte size, SHA-256, media type, and required pair before requesting signed URLs. Upload receipts and downloads are written atomically with private file permissions. Existing outputs are preserved unless `--force` is explicit. The publish credential fingerprint is derived locally from `TIANGONG_LCA_API_KEY`; callers cannot inject it through the request file.
|
|
161
|
+
|
|
162
|
+
Calculation results and published artifacts remain file-first:
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
tiangong-lca release calculation-bundle --package-id <package-id> --output ./calculation-bundle.json
|
|
166
|
+
tiangong-lca release calculation-artifact --package-id <package-id> --artifact-path chunks/lci-00000.jsonl.gz --output ./lci-00000.jsonl.gz
|
|
167
|
+
tiangong-lca release current --json
|
|
168
|
+
tiangong-lca release artifact-download --artifact-id <artifact-id> --output ./release.zip
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
`calculation-bundle` writes a verified manifest projection with short-lived URLs for its declared artifacts. Artifact downloads are accepted only when their exact path is present in that manifest, and downloaded bytes must match the durable size and SHA-256 before the output is exposed. Use `--dry-run` to validate inputs and inspect a credential-masked request without network writes.
|
|
172
|
+
|
|
90
173
|
Optional LLM review env, only for `qa process --enable-llm` or `qa flow --enable-llm`:
|
|
91
174
|
|
|
92
175
|
```bash
|