@tiangong-lca/cli 0.0.12 → 0.0.14

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 CHANGED
@@ -283,7 +283,7 @@ tiangong-lca lifecyclemodel orchestrate plan --input ./lifecyclemodel-orchestrat
283
283
  tiangong-lca qa process --rows-file ./process-list-report.json --out-dir ./process-qa
284
284
  tiangong-lca qa process --run-root /abs/path/to/process-run --run-id <run_id> --out-dir ./process-qa
285
285
  tiangong-lca process save-draft --input ./patched-processes.jsonl --out-dir /abs/path/to/process-save-draft --dry-run --json
286
- tiangong-lca process save-draft --input ./patched-processes.jsonl --out-dir /abs/path/to/process-save-draft --commit --json
286
+ tiangong-lca process save-draft --input ./patched-processes.jsonl --out-dir /abs/path/to/process-save-draft --commit --target-user-id <user-id> --json
287
287
  tiangong-lca flow publish-version --input-file ./ready-flows.jsonl --out-dir /abs/path/to/flow-publish --dry-run --json
288
288
  tiangong-lca flow publish-reviewed-data --flow-rows-file ./reviewed-flows.jsonl --out-dir /abs/path/to/reviewed-publish --dry-run --json
289
289
  tiangong-lca publish run --input ./publish-request.json --dry-run
@@ -298,7 +298,7 @@ For `process identity-preflight` and `flow identity-preflight`, canonical TIDAS
298
298
 
299
299
  For `process build-plan` and `flow build-plan`, canonical payloads embedded in the plan are schema-checked during `materialize`. Plan-only materialization now creates deterministic canonical `processDataSet` / `flowDataSet` wrappers from the build plan and validates them with the TIDAS SDK before reporting `passed`.
300
300
 
301
- For `process save-draft`, canonical process payloads are validated locally with `ProcessSchema` before any `--commit` write. Schema-invalid rows remain in `outputs/save-draft-rpc/failures.jsonl` instead of being persisted.
301
+ For `process save-draft`, canonical process payloads are validated locally with `ProcessSchema` before any `--commit` write. Schema-invalid rows remain in `outputs/save-draft-rpc/failures.jsonl` instead of being persisted. Batch import callers should pass `--target-user-id`; the CLI then verifies the current auth session and any visible draft owner before writing, while downstream readback verification still proves the final owner and payload.
302
302
 
303
303
  For `flow publish-version`, canonical flow payloads are validated locally with `FlowSchema` before remote visibility planning or writes. The command always writes `flow-publish-version-gate-report.json`; blocked rows are written to the remote-failure JSONL without calling the remote service.
304
304
 
@@ -310,7 +310,7 @@ For `lifecyclemodel save-draft`, canonical lifecyclemodel payloads are validated
310
310
 
311
311
  For `dataset evidence-search`, `plan` creates the field-level query matrix and search budget. `run` accepts normalized external search results from browser/web-search tools or a generic JSON provider endpoint, then writes `outputs/evidence-search-plan.json`, `outputs/evidence-search-results.jsonl`, `outputs/evidence-search-report.json`, and `outputs/evidence-search-declaration.json` when evidence is absent or only partial. The CLI records scope and normalization; Codex/skills still own semantic judgement and source selection.
312
312
 
313
- For `dataset validate`, `--type auto` supports mixed support scopes containing contact/source/unitgroup/flowproperty rows as well as flow/process/lifecyclemodel rows. For `dataset classification`, `children` and `path` navigate the bundled TIDAS category schemas copied from `tidas-tools`. `audit --type location` scans local rows for schema-derived location-code fields, plus TIDAS LCIA geography and lifecyclemodel connection location fields, whose values are not in `tidas_locations_category.json`; `apply --type location` applies structured decisions to a specific `target_path` when a row has multiple location fields.
313
+ For `dataset validate`, `--type auto` supports mixed support scopes containing contact/source/unitgroup/flowproperty rows as well as flow/process/lifecyclemodel rows. For `dataset classification`, `children` and `path` navigate the bundled TIDAS category schemas copied from `tidas-tools`. `audit --type location` scans local rows for schema-derived location-code fields, plus TIDAS LCIA geography and lifecyclemodel connection location fields, whose values are not in `tidas_locations_category.json`; `apply --type location` applies structured decisions to a specific `target_path` when a row has multiple location fields. When `target_path` explicitly points at a schema-derived location field such as `flowDataSet.flowInformation.geography.locationOfSupply`, location apply may create the missing parent object and field; ambiguous or non-location paths still block.
314
314
 
315
315
  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.
316
316
 
package/dist/src/cli.js CHANGED
@@ -1658,6 +1658,8 @@ Options:
1658
1658
  --out-dir <dir> Run root written relative to cwd when a relative path is passed
1659
1659
  --commit Execute remote save-draft writes
1660
1660
  --dry-run Keep the command local-only (default)
1661
+ --target-user-id <id>
1662
+ Require --commit to run as this user and update an owned draft
1661
1663
  --json Print compact JSON
1662
1664
  -h, --help
1663
1665
 
@@ -4358,6 +4360,7 @@ function parseProcessSaveDraftFlags(args) {
4358
4360
  'out-dir': { type: 'string' },
4359
4361
  commit: { type: 'boolean' },
4360
4362
  'dry-run': { type: 'boolean' },
4363
+ 'target-user-id': { type: 'string' },
4361
4364
  },
4362
4365
  }));
4363
4366
  }
@@ -4379,6 +4382,7 @@ function parseProcessSaveDraftFlags(args) {
4379
4382
  inputPath: typeof values.input === 'string' ? values.input : '',
4380
4383
  outDir: typeof values['out-dir'] === 'string' ? values['out-dir'] : null,
4381
4384
  commit: Boolean(values.commit),
4385
+ targetUserId: typeof values['target-user-id'] === 'string' ? values['target-user-id'] : null,
4382
4386
  };
4383
4387
  }
4384
4388
  function parseProcessRequiredFieldsFlags(args) {
@@ -5622,6 +5626,7 @@ export async function executeCli(argv, deps) {
5622
5626
  inputPath: processFlags.inputPath,
5623
5627
  outDir: processFlags.outDir,
5624
5628
  commit: processFlags.commit,
5629
+ targetUserId: processFlags.targetUserId,
5625
5630
  env: deps.env,
5626
5631
  fetchImpl: deps.fetchImpl,
5627
5632
  });