@tiangong-lca/cli 0.1.1 → 0.1.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 (154) hide show
  1. package/README.md +26 -6
  2. package/dist/src/batch.d.ts +6 -0
  3. package/dist/src/batch.js +6 -0
  4. package/dist/src/batch.js.map +1 -0
  5. package/dist/src/cli.d.ts +161 -0
  6. package/dist/src/command-spec.d.ts +90 -0
  7. package/dist/src/command-spec.js +400 -0
  8. package/dist/src/command-spec.js.map +1 -0
  9. package/dist/src/lib/artifacts.d.ts +9 -0
  10. package/dist/src/lib/auth-identity-receipt.d.ts +160 -0
  11. package/dist/src/lib/batch/attempt-recovery.d.ts +12 -0
  12. package/dist/src/lib/batch/attempt-recovery.js +183 -0
  13. package/dist/src/lib/batch/attempt-recovery.js.map +1 -0
  14. package/dist/src/lib/batch/canonical-contracts.d.ts +21 -0
  15. package/dist/src/lib/batch/canonical-contracts.js +180 -0
  16. package/dist/src/lib/batch/canonical-contracts.js.map +1 -0
  17. package/dist/src/lib/batch/engine.d.ts +2 -0
  18. package/dist/src/lib/batch/engine.js +294 -0
  19. package/dist/src/lib/batch/engine.js.map +1 -0
  20. package/dist/src/lib/batch/errors.d.ts +51 -0
  21. package/dist/src/lib/batch/errors.js +81 -0
  22. package/dist/src/lib/batch/errors.js.map +1 -0
  23. package/dist/src/lib/batch/item-projection.d.ts +10 -0
  24. package/dist/src/lib/batch/item-projection.js +118 -0
  25. package/dist/src/lib/batch/item-projection.js.map +1 -0
  26. package/dist/src/lib/batch/run-lock.d.ts +4 -0
  27. package/dist/src/lib/batch/run-lock.js +155 -0
  28. package/dist/src/lib/batch/run-lock.js.map +1 -0
  29. package/dist/src/lib/batch/scheduler-runtime.d.ts +29 -0
  30. package/dist/src/lib/batch/scheduler-runtime.js +114 -0
  31. package/dist/src/lib/batch/scheduler-runtime.js.map +1 -0
  32. package/dist/src/lib/batch/types.d.ts +183 -0
  33. package/dist/src/lib/batch/types.js +2 -0
  34. package/dist/src/lib/batch/types.js.map +1 -0
  35. package/dist/src/lib/dataset-author.d.ts +39 -0
  36. package/dist/src/lib/dataset-bilingual.d.ts +165 -0
  37. package/dist/src/lib/dataset-classification.d.ts +279 -0
  38. package/dist/src/lib/dataset-command.d.ts +53 -0
  39. package/dist/src/lib/dataset-contract.d.ts +82 -0
  40. package/dist/src/lib/dataset-curation-queue.d.ts +219 -0
  41. package/dist/src/lib/dataset-evidence-search.d.ts +134 -0
  42. package/dist/src/lib/dataset-import-lca.d.ts +136 -0
  43. package/dist/src/lib/dataset-local.d.ts +23 -0
  44. package/dist/src/lib/dataset-maintenance-alias-request.d.ts +12 -0
  45. package/dist/src/lib/dataset-maintenance-alias-rewrite.d.ts +111 -0
  46. package/dist/src/lib/dataset-maintenance-apply.d.ts +458 -0
  47. package/dist/src/lib/dataset-maintenance-clear-account.d.ts +161 -0
  48. package/dist/src/lib/dataset-maintenance-contract.d.ts +317 -0
  49. package/dist/src/lib/dataset-maintenance-derivatives.d.ts +48 -0
  50. package/dist/src/lib/dataset-maintenance-flow-identity-approval-claim.d.ts +50 -0
  51. package/dist/src/lib/dataset-maintenance-flow-identity-capture.d.ts +110 -0
  52. package/dist/src/lib/dataset-maintenance-flow-identity-command.d.ts +15 -0
  53. package/dist/src/lib/dataset-maintenance-flow-identity-contract.d.ts +387 -0
  54. package/dist/src/lib/dataset-maintenance-flow-identity-execution-contract.d.ts +456 -0
  55. package/dist/src/lib/dataset-maintenance-flow-identity-freeze.d.ts +99 -0
  56. package/dist/src/lib/dataset-maintenance-flow-identity-plan.d.ts +85 -0
  57. package/dist/src/lib/dataset-maintenance-flow-identity-recovery.d.ts +268 -0
  58. package/dist/src/lib/dataset-maintenance-flow-identity-run.d.ts +123 -0
  59. package/dist/src/lib/dataset-maintenance-flow-identity-seal.d.ts +50 -0
  60. package/dist/src/lib/dataset-maintenance-flow-identity-verify.d.ts +85 -0
  61. package/dist/src/lib/dataset-maintenance-flow-identity-wire.d.ts +32 -0
  62. package/dist/src/lib/dataset-maintenance-pagination.d.ts +58 -0
  63. package/dist/src/lib/dataset-maintenance-plan.d.ts +40 -0
  64. package/dist/src/lib/dataset-maintenance-protected-artifacts.d.ts +16 -0
  65. package/dist/src/lib/dataset-maintenance-protected-before.d.ts +71 -0
  66. package/dist/src/lib/dataset-maintenance-protected-contract.d.ts +385 -0
  67. package/dist/src/lib/dataset-maintenance-protected-freeze.d.ts +148 -0
  68. package/dist/src/lib/dataset-maintenance-protected-preparation.d.ts +76 -0
  69. package/dist/src/lib/dataset-maintenance-protected-run.d.ts +252 -0
  70. package/dist/src/lib/dataset-maintenance-protected-seal.d.ts +93 -0
  71. package/dist/src/lib/dataset-maintenance-protected-toolchain.d.ts +31 -0
  72. package/dist/src/lib/dataset-maintenance-protected-verify.d.ts +99 -0
  73. package/dist/src/lib/dataset-maintenance-remote.d.ts +212 -0
  74. package/dist/src/lib/dataset-maintenance-support-validation.d.ts +18 -0
  75. package/dist/src/lib/dataset-maintenance-verify.d.ts +102 -0
  76. package/dist/src/lib/dataset-patch.d.ts +193 -0
  77. package/dist/src/lib/dataset-references-rewrite.d.ts +77 -0
  78. package/dist/src/lib/dataset-remote-refresh.d.ts +64 -0
  79. package/dist/src/lib/dataset-remote-verify.d.ts +168 -0
  80. package/dist/src/lib/dataset-save-draft-run.d.ts +283 -0
  81. package/dist/src/lib/dataset-save-draft-run.js +54 -21
  82. package/dist/src/lib/dataset-save-draft-run.js.map +1 -1
  83. package/dist/src/lib/dataset-source-upload-attachments.d.ts +109 -0
  84. package/dist/src/lib/dataset-validate.d.ts +62 -0
  85. package/dist/src/lib/dotenv.d.ts +6 -0
  86. package/dist/src/lib/env.d.ts +59 -0
  87. package/dist/src/lib/errors.d.ts +18 -0
  88. package/dist/src/lib/flow-build-alias-map.d.ts +80 -0
  89. package/dist/src/lib/flow-fetch-rows.d.ts +70 -0
  90. package/dist/src/lib/flow-get.d.ts +35 -0
  91. package/dist/src/lib/flow-governance.d.ts +22 -0
  92. package/dist/src/lib/flow-list.d.ts +57 -0
  93. package/dist/src/lib/flow-materialize-decisions.d.ts +67 -0
  94. package/dist/src/lib/flow-payload-validation.d.ts +32 -0
  95. package/dist/src/lib/flow-publish-reviewed-data.d.ts +262 -0
  96. package/dist/src/lib/flow-publish-version.d.ts +193 -0
  97. package/dist/src/lib/flow-qa.d.ts +289 -0
  98. package/dist/src/lib/flow-read.d.ts +70 -0
  99. package/dist/src/lib/flow-regen-product.d.ts +431 -0
  100. package/dist/src/lib/flow-remediate.d.ts +133 -0
  101. package/dist/src/lib/http.d.ts +25 -0
  102. package/dist/src/lib/identity-preflight.d.ts +235 -0
  103. package/dist/src/lib/io.d.ts +2 -0
  104. package/dist/src/lib/kb-search.d.ts +23 -0
  105. package/dist/src/lib/lca-release.d.ts +105 -0
  106. package/dist/src/lib/lifecyclemodel-auto-build.d.ts +223 -0
  107. package/dist/src/lib/lifecyclemodel-bundle-save.d.ts +71 -0
  108. package/dist/src/lib/lifecyclemodel-graph.d.ts +91 -0
  109. package/dist/src/lib/lifecyclemodel-orchestrate.d.ts +349 -0
  110. package/dist/src/lib/lifecyclemodel-publish-build.d.ts +77 -0
  111. package/dist/src/lib/lifecyclemodel-publish-resulting-process.d.ts +27 -0
  112. package/dist/src/lib/lifecyclemodel-qa.d.ts +206 -0
  113. package/dist/src/lib/lifecyclemodel-resulting-process.d.ts +204 -0
  114. package/dist/src/lib/lifecyclemodel-save-draft-run.d.ts +96 -0
  115. package/dist/src/lib/lifecyclemodel-validate-build.d.ts +78 -0
  116. package/dist/src/lib/llm.d.ts +51 -0
  117. package/dist/src/lib/package-version.d.ts +3 -0
  118. package/dist/src/lib/process-auto-build.d.ts +168 -0
  119. package/dist/src/lib/process-batch-build.d.ts +97 -0
  120. package/dist/src/lib/process-dedup-review.d.ts +253 -0
  121. package/dist/src/lib/process-flow-build-plan.d.ts +108 -0
  122. package/dist/src/lib/process-get.d.ts +26 -0
  123. package/dist/src/lib/process-list.d.ts +87 -0
  124. package/dist/src/lib/process-payload-validation.d.ts +27 -0
  125. package/dist/src/lib/process-publish-build.d.ts +148 -0
  126. package/dist/src/lib/process-qa.d.ts +243 -0
  127. package/dist/src/lib/process-refresh-references.d.ts +179 -0
  128. package/dist/src/lib/process-required-fields.d.ts +142 -0
  129. package/dist/src/lib/process-resume-build.d.ts +77 -0
  130. package/dist/src/lib/process-save-draft-run.d.ts +72 -0
  131. package/dist/src/lib/process-save-draft.d.ts +53 -0
  132. package/dist/src/lib/process-scope-statistics.d.ts +210 -0
  133. package/dist/src/lib/process-verify-rows.d.ts +71 -0
  134. package/dist/src/lib/publish.d.ts +219 -0
  135. package/dist/src/lib/remote.d.ts +19 -0
  136. package/dist/src/lib/run.d.ts +60 -0
  137. package/dist/src/lib/runtime-rulesets.d.ts +29 -0
  138. package/dist/src/lib/state-lock.d.ts +25 -0
  139. package/dist/src/lib/state-lock.js +23 -1
  140. package/dist/src/lib/state-lock.js.map +1 -1
  141. package/dist/src/lib/supabase-client.d.ts +47 -0
  142. package/dist/src/lib/supabase-data-api-contract.d.ts +304 -0
  143. package/dist/src/lib/supabase-data-api-replay.d.ts +74 -0
  144. package/dist/src/lib/supabase-json-ordered-write.d.ts +65 -0
  145. package/dist/src/lib/supabase-rest.d.ts +26 -0
  146. package/dist/src/lib/supabase-session.d.ts +115 -0
  147. package/dist/src/lib/tidas-languages.d.ts +3 -0
  148. package/dist/src/lib/tidas-sdk-package-validator.d.ts +111 -0
  149. package/dist/src/lib/tidas-sdk-validation.d.ts +42 -0
  150. package/dist/src/lib/unstructured.d.ts +32 -0
  151. package/dist/src/lib/user-api-key.d.ts +16 -0
  152. package/dist/src/lib/validation.d.ts +82 -0
  153. package/dist/src/main.d.ts +4 -0
  154. package/package.json +13 -2
package/README.md CHANGED
@@ -19,21 +19,23 @@ checkPaths:
19
19
  - bin/**
20
20
  - src/cli.ts
21
21
  - src/main.ts
22
+ - src/batch.ts
23
+ - src/command-spec.ts
22
24
  - src/lib/auth-identity-receipt.ts
23
25
  - src/lib/lca-release.ts
24
26
  - scripts/run-auth-identity-production-case.ts
25
27
  - test/auth-identity*.test.ts
26
28
  - test/lca-release*.test.ts
27
- lastReviewedAt: 2026-08-25
28
- lastReviewedCommit: 47b44c65cf4bf27070fa1057e672c6ef2b2e54f3
29
- lastReviewedNote: 'Reviewed for Issue #230: identifies 0.1.1 as the public auth-receipt release on exact Node 24.19.0 with cryptographic Sigstore and isolated pnpm verification.'
29
+ lastReviewedAt: 2026-08-26
30
+ lastReviewedCommit: b9a99011fcc1d7388355e66649113ac5d4a7a9c8
31
+ lastReviewedNote: 'Reviewed for Issue #237: identifies 0.1.2 as the release-only package identity for the bounded pnpm 11.24 public API while runtime, exports, dependencies, and release behavior stay fixed.'
30
32
  ---
31
33
 
32
34
  # TianGong LCA CLI
33
35
 
34
- Package: `@tiangong-lca/cli` Executable: `tiangong-lca` Current package version: `0.1.1` Node: `24.19.0`
36
+ Package: `@tiangong-lca/cli` Executable: `tiangong-lca` Current package version: `0.1.2` Node: `24.19.0`
35
37
 
36
- Repository development is single-track on pnpm `11.23.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.
38
+ 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.
37
39
 
38
40
  Review note, 2026-08-25: Issue #224 migrates repository development and release automation to the sole root `pnpm-workspace.yaml` / `pnpm-lock.yaml`, TypeScript 7.0.2, and type-aware Oxlint on Node 24. The feature change deliberately keeps version 0.0.33. A separate release-only PR should prepare 0.1.0 after the toolchain change merges and its full package/coverage/release gates pass.
39
41
 
@@ -43,6 +45,14 @@ Review note, 2026-08-25: Issue #228 implements `auth identity-receipt` as a boun
43
45
 
44
46
  Review note, 2026-08-25: Issue #230 publishes the merged identity receipt as `@tiangong-lca/cli@0.1.1`. Runtime logic and published dependencies remain unchanged; the sole pnpm lock changes only for exact dev-only `sigstore@5.0.0`. Local metadata, engines, and every workflow converge on Node 24.19.0. Release automation asserts actual platform/architecture across the reusable four-platform pre-tag matrix and provides `pnpm release:verify-published` for cryptographic Fulcio/CT/Rekor provenance, registry signatures, actual tarball integrity, isolated user/global package-manager configuration, exact pnpm 11.23.0, and credential-free bin/ESM/CJS consumer proof.
45
47
 
48
+ Review note, 2026-08-26: Issue #232 adds two supported typed library subpaths without changing version `0.1.1`: `@tiangong-lca/cli/command-spec` owns the byte-compatible `tiangong-foundry.command-spec.v1` authority and shell-free execution adapters, while `@tiangong-lca/cli/batch` owns identity/content/policy-bound scheduling, resource-aware exclusive keys, explicit mutation readback recovery, and host-safe run-directory locks. Claim-time identity drift—including a throwing identity getter—is a stable item failure/event and every already-started worker is drained before return. Any escaping infrastructure callback error records one fatal cause, immediately closes new claims, drains only already-claimed workers, and rejects after all worker promises settle. A blocked resource stays unclaimed and consumes no worker while a later free resource may run; per-resource FIFO cursors and a private minimum-ready heap keep ordinary scheduling near `O(n log k)` rather than repeatedly scanning all pending items. Run-lock PID/host/timestamp ownership is derived internally and cannot be supplied by callers. Every public timer-backed timeout, poll, or retry delay is bounded by Node's `2_147_483_647ms` maximum. The package root remains unsupported and publication requires a later release-only delivery.
49
+
50
+ Review note, 2026-08-26: Issue #233 changes only the internal shape of the batch subpath. `src/batch.ts` is now a 62-line facade over bounded, acyclic modules for types, errors/contracts, locking, projection, scheduler runtime, attempts/recovery, and the engine. Executable budgets keep the facade below 400 lines and every internal module below 800 while locking exact public export identities, declarations, errors, event/result bytes, packed consumers, and dataset dogfood. Package version, dependencies, pnpm-only TypeScript 7 development, and runtime behavior are unchanged.
51
+
52
+ Review note, 2026-08-26: Issue #236 changes only the repository and clean-consumer package-manager requirement from exact pnpm 11.23.0 to 11.24.0. The sole root lock requires no byte change under pnpm 11.24.0; Node 24.19.0, TypeScript 7.0.2, package version 0.1.1, public commands and exports, dependencies, tags, provenance, and publication remain unchanged, with no npm/Yarn fallback.
53
+
54
+ Review note, 2026-08-26: Issue #237 releases the already reviewed bounded CommandSpec/batch runtime and pnpm 11.24 toolchain as `@tiangong-lca/cli@0.1.2`. The release changes only package metadata and four live CLI-version fixtures; runtime files, public subpaths and object identities, dependencies, the sole lock, Node 24.19.0, TypeScript 7.0.2, package-manager-neutral consumers, and automated provenance path remain unchanged.
55
+
46
56
  Review note, 2026-07-12: `dataset maintenance plan/apply/verify` provides current-user RLS-scoped exact-row maintenance with immutable plans, explicit approval, per-action logs, platform audit correlation, and independent readback. `merge-support-aliases` now runs only in `target_mode=owner_draft`: source/target support and all changed rows stay private `state_code=0`; publication is a separate future workflow.
47
57
 
48
58
  Review note, 2026-07-13: maintenance scans now prove exact-count pagination even when PostgREST returns fewer rows than the requested `--page-size`. An incomplete or inconsistent scan fails before artifacts, approval, or mutation; under stable filtered membership/order the proof represents a complete ordered multi-request traversal, not one transaction-level/MVCC snapshot.
@@ -94,6 +104,16 @@ pnpm build
94
104
  node ./bin/tiangong-lca.js --help
95
105
  ```
96
106
 
107
+ ## Typed library subpaths
108
+
109
+ The package exposes only these supported module APIs in addition to the executable launcher subpath:
110
+
111
+ - `@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.
112
+ - `@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.
113
+ - Mutation batches reject automatic retry. A consumed or ambiguous mutation can continue only through an explicitly supplied readback-recovery callback; resume requires exact run and item contracts, and each resumed or rejected result participates in stop decisions before fresh claims. Retry/backoff values must be non-negative safe integers within Node's timer limit. Exclusive keys must be runtime strings. `withBatchRunLock` gives one canonical run directory one cross-process lock domain, permits reentrancy only from a still-live scope owned by the current holder, keeps the top-level promise pending until detached nested scopes drain, rejects completed-context reentry into a later owner, preserves live or foreign-host locks, and stale-recovers only a same-host dead PID. Public lock callers cannot set PID, host, or ownership time; timeout/poll values are non-negative safe integers within Node's timer limit.
114
+
115
+ The packed ESM, CJS dynamic-import, and TypeScript consumers exercise both public subpaths and generated declarations. Deep imports and `import '@tiangong-lca/cli'` remain unsupported.
116
+
97
117
  ## Env
98
118
 
99
119
  Remote commands require:
@@ -451,7 +471,7 @@ For `process build-plan` and `flow build-plan`, canonical payloads embedded in t
451
471
 
452
472
  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.
453
473
 
454
- For `dataset save-draft --execution-contract`, the JSON contract uses schema `dataset-save-draft-execution-contract.v1` and supplies `execution_id`, `project_ref`, an exact owner (`user_id`, lowercase `email`, `state_code: 0`), and ordered actions. Each action binds `action_id`, `desired_sha256`, `expected_operation` (`insert` or `save_draft`), table/id/version, `before_sha256`, and earlier `dependency_action_ids`. Contract mode requires `--commit`; account-local Unit Group or Flow Property support rows additionally require `--allow-account-local-support`. `--max-parallel` defaults to 1 and is capped at 8. When it is greater than 1, every action through the highest referenced dependency remains serial; only the later table/id/version-unique suffix may overlap. The exact owner token is renewed and checked before each DML dispatch. Attempts and outcomes are stored under the platform user-state directory (`$XDG_STATE_HOME/tiangong-lca-cli` when configured), not beside the contract or report. Any prior terminal or unresolved attempt is read back or retained without re-dispatch; exit status is nonzero unless every action has exact terminal success.
474
+ For `dataset save-draft --execution-contract`, the JSON contract uses schema `dataset-save-draft-execution-contract.v1` and supplies `execution_id`, `project_ref`, an exact owner (`user_id`, lowercase `email`, `state_code: 0`), and ordered actions. Each action binds `action_id`, `desired_sha256`, `expected_operation` (`insert` or `save_draft`), table/id/version, `before_sha256`, and earlier `dependency_action_ids`. Contract mode requires `--commit`; account-local Unit Group or Flow Property support rows additionally require `--allow-account-local-support`. `--max-parallel` defaults to 1 and is capped at 8. Every action through the highest referenced dependency remains on the existing serial path; only the later table/id/version-unique suffix delegates claims and fatal-stop coordination to the public batch engine. `executeAction` still exclusively owns PREPARED evidence, exact before-state checks, token renewal, dispatch, durable attempts, readback, and no-replay decisions, so report bytes and input ordering do not change. Attempts and outcomes are stored under the platform user-state directory (`$XDG_STATE_HOME/tiangong-lca-cli` when configured), not beside the contract or report. Any prior terminal or unresolved attempt is read back or retained without re-dispatch; exit status is nonzero unless every action has exact terminal success.
455
475
 
456
476
  For `dataset maintenance apply`, explicitly passing `--max-parallel 1..8` opts into the destructive flow-convergence profile. It accepts only a non-empty, unique-target, flow delete-only plan whose current and projected reference impacts are both zero. Before dispatch it completes a fresh SELECT-only scan of every process visible to the owner session and rejects any inbound edge. For a separately governed all-process check, pair `--global-inbound-proof /absolute/proof.json` with `--approve-global-inbound-proof <sha256>`; the proof must be fresh, SELECT-only, complete, zero-inbound, and bound to the exact project, actor, plan, and ordered target set, and it is validated before the live scan is skipped. The CLI never runs raw SQL. Each action writes append-only `PREPARED` and `DISPATCHED` evidence before its protected owner-session RPC, then records `COMMITTED` only after exact absent readback. An ambiguous action is read back, marked `UNKNOWN`, and never replayed automatically; independent actions continue. Omit `--max-parallel` to retain ordinary maintenance apply behavior.
457
477
 
@@ -0,0 +1,6 @@
1
+ export { assertBatchContractMatches, assertBatchItemContractMatches, canonicalBatchJson, createBatchContract, createBatchItemContract, parseBatchContract, parseBatchItemContract, sha256BatchBytes, sha256BatchJson, } from './lib/batch/canonical-contracts.js';
2
+ export { runBoundedBatch } from './lib/batch/engine.js';
3
+ export { BatchContractError, BatchItemIdentityDriftError, BatchItemProjectionDriftError, BatchItemResourceDriftError, BatchItemResumeContractError, BatchMutationReplayError, BatchMutationRetryError, BatchRunLockIdentityConflictError, BatchRunLockTimeoutError, } from './lib/batch/errors.js';
4
+ export { batchRunLockPath, batchRunLockStatePath, withBatchRunLock } from './lib/batch/run-lock.js';
5
+ export { MAX_BATCH_CONCURRENCY } from './lib/batch/types.js';
6
+ export type { BatchAttemptedResumeItem, BatchClock, BatchCompletedResumeItem, BatchContract, BatchEvent, BatchEventType, BatchExclusiveKeyContext, BatchExecutionContext, BatchItemContract, BatchItemFailedResult, BatchItemResult, BatchItemResultStatus, BatchItemSucceededResult, BatchItemSuccessStatus, BatchJsonObject, BatchJsonPrimitive, BatchJsonValue, BatchMode, BatchMutationRecoveryContext, BatchMutationRecoveryResult, BatchPauseContext, BatchRecoverySource, BatchResumeItem, BatchResumeState, BatchRetryContext, BatchRetryPolicy, BatchRunLockOptions, BatchRunLockReceipt, BatchRunResult, BatchSleep, BatchStatus, BatchStopContext, CreateBatchContractOptions, CreateBatchItemContractOptions, RunBoundedBatchOptions, } from './lib/batch/types.js';
@@ -0,0 +1,6 @@
1
+ export { assertBatchContractMatches, assertBatchItemContractMatches, canonicalBatchJson, createBatchContract, createBatchItemContract, parseBatchContract, parseBatchItemContract, sha256BatchBytes, sha256BatchJson, } from './lib/batch/canonical-contracts.js';
2
+ export { runBoundedBatch } from './lib/batch/engine.js';
3
+ export { BatchContractError, BatchItemIdentityDriftError, BatchItemProjectionDriftError, BatchItemResourceDriftError, BatchItemResumeContractError, BatchMutationReplayError, BatchMutationRetryError, BatchRunLockIdentityConflictError, BatchRunLockTimeoutError, } from './lib/batch/errors.js';
4
+ export { batchRunLockPath, batchRunLockStatePath, withBatchRunLock } from './lib/batch/run-lock.js';
5
+ export { MAX_BATCH_CONCURRENCY } from './lib/batch/types.js';
6
+ //# sourceMappingURL=batch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"batch.js","sourceRoot":"","sources":["../../src/batch.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,8BAA8B,EAC9B,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,EACvB,kBAAkB,EAClB,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,GAChB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EACL,kBAAkB,EAClB,2BAA2B,EAC3B,6BAA6B,EAC7B,2BAA2B,EAC3B,4BAA4B,EAC5B,wBAAwB,EACxB,uBAAuB,EACvB,iCAAiC,EACjC,wBAAwB,GACzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACpG,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["export {\n assertBatchContractMatches,\n assertBatchItemContractMatches,\n canonicalBatchJson,\n createBatchContract,\n createBatchItemContract,\n parseBatchContract,\n parseBatchItemContract,\n sha256BatchBytes,\n sha256BatchJson,\n} from './lib/batch/canonical-contracts.js';\nexport { runBoundedBatch } from './lib/batch/engine.js';\nexport {\n BatchContractError,\n BatchItemIdentityDriftError,\n BatchItemProjectionDriftError,\n BatchItemResourceDriftError,\n BatchItemResumeContractError,\n BatchMutationReplayError,\n BatchMutationRetryError,\n BatchRunLockIdentityConflictError,\n BatchRunLockTimeoutError,\n} from './lib/batch/errors.js';\nexport { batchRunLockPath, batchRunLockStatePath, withBatchRunLock } from './lib/batch/run-lock.js';\nexport { MAX_BATCH_CONCURRENCY } from './lib/batch/types.js';\nexport type {\n BatchAttemptedResumeItem,\n BatchClock,\n BatchCompletedResumeItem,\n BatchContract,\n BatchEvent,\n BatchEventType,\n BatchExclusiveKeyContext,\n BatchExecutionContext,\n BatchItemContract,\n BatchItemFailedResult,\n BatchItemResult,\n BatchItemResultStatus,\n BatchItemSucceededResult,\n BatchItemSuccessStatus,\n BatchJsonObject,\n BatchJsonPrimitive,\n BatchJsonValue,\n BatchMode,\n BatchMutationRecoveryContext,\n BatchMutationRecoveryResult,\n BatchPauseContext,\n BatchRecoverySource,\n BatchResumeItem,\n BatchResumeState,\n BatchRetryContext,\n BatchRetryPolicy,\n BatchRunLockOptions,\n BatchRunLockReceipt,\n BatchRunResult,\n BatchSleep,\n BatchStatus,\n BatchStopContext,\n CreateBatchContractOptions,\n CreateBatchItemContractOptions,\n RunBoundedBatchOptions,\n} from './lib/batch/types.js';\n"]}
@@ -0,0 +1,161 @@
1
+ import type { DotEnvLoadResult } from './lib/dotenv.js';
2
+ import type { FetchLike } from './lib/http.js';
3
+ import { type AuthIdentityReceipt, type RunAuthIdentityReceiptOptions } from './lib/auth-identity-receipt.js';
4
+ import { type LifecyclemodelAutoBuildReport, type RunLifecyclemodelAutoBuildOptions } from './lib/lifecyclemodel-auto-build.js';
5
+ import { type LifecyclemodelResultingProcessReport, type RunLifecyclemodelResultingProcessOptions } from './lib/lifecyclemodel-resulting-process.js';
6
+ import { type LifecyclemodelPublishResultingProcessReport, type RunLifecyclemodelPublishResultingProcessOptions } from './lib/lifecyclemodel-publish-resulting-process.js';
7
+ import { type LifecyclemodelValidateBuildReport, type RunLifecyclemodelValidateBuildOptions } from './lib/lifecyclemodel-validate-build.js';
8
+ import { type LifecyclemodelPublishBuildReport, type RunLifecyclemodelPublishBuildOptions } from './lib/lifecyclemodel-publish-build.js';
9
+ import { type LifecyclemodelSaveDraftReport, type RunLifecyclemodelSaveDraftOptions } from './lib/lifecyclemodel-save-draft-run.js';
10
+ import { type LifecyclemodelGraphReport, type RunLifecyclemodelGraphOptions } from './lib/lifecyclemodel-graph.js';
11
+ import { type LifecyclemodelOrchestrateReport, type RunLifecyclemodelOrchestrateOptions } from './lib/lifecyclemodel-orchestrate.js';
12
+ import { type ProcessAutoBuildReport, type RunProcessAutoBuildOptions } from './lib/process-auto-build.js';
13
+ import { type ProcessGetReport, type RunProcessGetOptions } from './lib/process-get.js';
14
+ import { type ProcessListReport, type RunProcessListOptions } from './lib/process-list.js';
15
+ import { type ProcessBatchBuildReport, type RunProcessBatchBuildOptions } from './lib/process-batch-build.js';
16
+ import { type ProcessScopeStatisticsReport, type RunProcessScopeStatisticsOptions } from './lib/process-scope-statistics.js';
17
+ import { type ProcessRefreshReferencesReport, type RunProcessRefreshReferencesOptions } from './lib/process-refresh-references.js';
18
+ import { type ProcessDedupReviewReport, type RunProcessDedupReviewOptions } from './lib/process-dedup-review.js';
19
+ import { type ProcessResumeBuildReport, type RunProcessResumeBuildOptions } from './lib/process-resume-build.js';
20
+ import { type ProcessPublishBuildReport, type RunProcessPublishBuildOptions } from './lib/process-publish-build.js';
21
+ import { type ProcessSaveDraftReport, type RunProcessSaveDraftOptions } from './lib/process-save-draft-run.js';
22
+ import { type ProcessRequiredFieldsReport, type RunProcessRequiredFieldsCompleteOptions } from './lib/process-required-fields.js';
23
+ import { type ProcessVerifyRowsReport, type RunProcessVerifyRowsOptions } from './lib/process-verify-rows.js';
24
+ import { type FlowBuildPlanGateReport, type ProcessBuildPlanGateReport, type RunFlowBuildPlanMaterializeOptions, type RunFlowBuildPlanValidateOptions, type RunProcessBuildPlanMaterializeOptions, type RunProcessBuildPlanValidateOptions } from './lib/process-flow-build-plan.js';
25
+ import { type FlowIdentityPreflightReport, type ProcessIdentityPreflightReport, type RunFlowIdentityPreflightOptions, type RunProcessIdentityPreflightOptions } from './lib/identity-preflight.js';
26
+ import { type PublishReport, type RunPublishOptions } from './lib/publish.js';
27
+ import { type ProcessQaReport, type RunProcessQaOptions } from './lib/process-qa.js';
28
+ import { type FlowQaReport, type RunFlowQaOptions } from './lib/flow-qa.js';
29
+ import { type LifecyclemodelQaReport, type RunLifecyclemodelQaOptions } from './lib/lifecyclemodel-qa.js';
30
+ import { type FlowRemediationReport, type RunFlowRemediateOptions } from './lib/flow-remediate.js';
31
+ import { type FlowFetchRowsReport, type RunFlowFetchRowsOptions } from './lib/flow-fetch-rows.js';
32
+ import { type FlowMaterializeDecisionsReport, type RunFlowMaterializeDecisionsOptions } from './lib/flow-materialize-decisions.js';
33
+ import { type FlowGetReport, type RunFlowGetOptions } from './lib/flow-get.js';
34
+ import { type FlowListReport, type RunFlowListOptions } from './lib/flow-list.js';
35
+ import { type FlowPublishVersionReport, type RunFlowPublishVersionOptions } from './lib/flow-publish-version.js';
36
+ import { type FlowReviewedPublishDataReport, type RunFlowReviewedPublishDataOptions } from './lib/flow-publish-reviewed-data.js';
37
+ import { type FlowBuildAliasMapReport, type RunFlowBuildAliasMapOptions } from './lib/flow-build-alias-map.js';
38
+ import { type FlowApplyProcessFlowRepairsReport, type FlowPlanProcessFlowRepairsReport, type FlowRegenProductReport, type FlowScanProcessFlowRefsReport, type FlowValidateProcessesReport, type RunFlowApplyProcessFlowRepairsOptions, type RunFlowPlanProcessFlowRepairsOptions, type RunFlowRegenProductOptions, type RunFlowScanProcessFlowRefsOptions, type RunFlowValidateProcessesOptions } from './lib/flow-regen-product.js';
39
+ import { type LcaReleaseReport, type RunLcaReleaseOptions } from './lib/lca-release.js';
40
+ import { type RunValidationOptions, type ValidationRunReport } from './lib/validation.js';
41
+ import { type DatasetValidateReport, type RunDatasetValidateOptions } from './lib/dataset-validate.js';
42
+ import { type DatasetCurationQueueBuildReport, type DatasetCurationQueueNextReport, type DatasetCurationQueueVerifyReport, type RunDatasetCurationQueueBuildOptions, type RunDatasetCurationQueueNextOptions, type RunDatasetCurationQueueVerifyOptions } from './lib/dataset-curation-queue.js';
43
+ import { type DatasetReferencesRewriteReport, type RunDatasetReferencesRewriteOptions } from './lib/dataset-references-rewrite.js';
44
+ import { type DatasetRemoteRefreshReport, type RunDatasetRemoteRefreshOptions } from './lib/dataset-remote-refresh.js';
45
+ import { type DatasetRemoteVerificationReport, type RunDatasetRemoteVerifyOptions } from './lib/dataset-remote-verify.js';
46
+ import { type DatasetBilingualApplyReport, type DatasetBilingualExtractReport, type DatasetBilingualValidateReport, type RunDatasetBilingualApplyOptions, type RunDatasetBilingualExtractOptions, type RunDatasetBilingualValidateOptions } from './lib/dataset-bilingual.js';
47
+ import { type EvidenceSearchReport, type RunDatasetEvidenceSearchOptions } from './lib/dataset-evidence-search.js';
48
+ import { type DatasetContractReport, type RunDatasetContractOptions } from './lib/dataset-contract.js';
49
+ import { type DatasetImportLcaReport, type RunDatasetImportLcaConvertOptions } from './lib/dataset-import-lca.js';
50
+ import { type DatasetAuthorReport, type RunDatasetAuthorOptions } from './lib/dataset-author.js';
51
+ import { type DatasetPatchApplyReport, type RunDatasetPatchApplyOptions } from './lib/dataset-patch.js';
52
+ import { type DatasetSaveDraftReport, type RunDatasetSaveDraftOptions } from './lib/dataset-save-draft-run.js';
53
+ import { type DatasetClassificationApplyReport, type DatasetClassificationAuditReport, type DatasetClassificationChildrenReport, type DatasetClassificationPathReport, type RunDatasetClassificationApplyOptions, type RunDatasetClassificationAuditOptions, type RunDatasetClassificationChildrenOptions, type RunDatasetClassificationPathOptions } from './lib/dataset-classification.js';
54
+ import { type DatasetMaintenanceClearAccountReport, type RunDatasetMaintenanceClearAccountOptions } from './lib/dataset-maintenance-clear-account.js';
55
+ import { runDatasetMaintenancePlan } from './lib/dataset-maintenance-plan.js';
56
+ import { runDatasetMaintenanceApply } from './lib/dataset-maintenance-apply.js';
57
+ import { freezeDatasetMaintenanceProtected } from './lib/dataset-maintenance-protected-freeze.js';
58
+ import { runDatasetMaintenanceProtected } from './lib/dataset-maintenance-protected-run.js';
59
+ import { sealDatasetMaintenanceProtectedApproval } from './lib/dataset-maintenance-protected-seal.js';
60
+ import { runDatasetMaintenanceVerify } from './lib/dataset-maintenance-verify.js';
61
+ import { runFlowIdentityPlanFromFiles } from './lib/dataset-maintenance-flow-identity-command.js';
62
+ import { captureFlowIdentity } from './lib/dataset-maintenance-flow-identity-capture.js';
63
+ import { freezeFlowIdentity } from './lib/dataset-maintenance-flow-identity-freeze.js';
64
+ import { sealFlowIdentityApproval } from './lib/dataset-maintenance-flow-identity-seal.js';
65
+ import { freezeFlowIdentityRecovery, sealFlowIdentityRecoveryApproval } from './lib/dataset-maintenance-flow-identity-recovery.js';
66
+ import { runFlowIdentity } from './lib/dataset-maintenance-flow-identity-run.js';
67
+ import { verifyFlowIdentity } from './lib/dataset-maintenance-flow-identity-verify.js';
68
+ import { type DatasetSourceUploadAttachmentsReport, type RunDatasetSourceUploadAttachmentsOptions } from './lib/dataset-source-upload-attachments.js';
69
+ export type CliDeps = {
70
+ env: NodeJS.ProcessEnv;
71
+ dotEnvStatus: DotEnvLoadResult;
72
+ fetchImpl: FetchLike;
73
+ runAuthIdentityReceiptImpl?: (options: RunAuthIdentityReceiptOptions) => Promise<AuthIdentityReceipt>;
74
+ runPublishImpl?: (options: RunPublishOptions) => Promise<PublishReport>;
75
+ runValidationImpl?: (options: RunValidationOptions) => Promise<ValidationRunReport>;
76
+ runLcaReleaseImpl?: (options: RunLcaReleaseOptions) => Promise<LcaReleaseReport>;
77
+ runLifecyclemodelAutoBuildImpl?: (options: RunLifecyclemodelAutoBuildOptions) => Promise<LifecyclemodelAutoBuildReport>;
78
+ runLifecyclemodelBuildResultingProcessImpl?: (options: RunLifecyclemodelResultingProcessOptions) => Promise<LifecyclemodelResultingProcessReport>;
79
+ runLifecyclemodelPublishResultingProcessImpl?: (options: RunLifecyclemodelPublishResultingProcessOptions) => Promise<LifecyclemodelPublishResultingProcessReport>;
80
+ runLifecyclemodelValidateBuildImpl?: (options: RunLifecyclemodelValidateBuildOptions) => Promise<LifecyclemodelValidateBuildReport>;
81
+ runLifecyclemodelPublishBuildImpl?: (options: RunLifecyclemodelPublishBuildOptions) => Promise<LifecyclemodelPublishBuildReport>;
82
+ runLifecyclemodelSaveDraftImpl?: (options: RunLifecyclemodelSaveDraftOptions) => Promise<LifecyclemodelSaveDraftReport>;
83
+ runLifecyclemodelGraphImpl?: (options: RunLifecyclemodelGraphOptions) => Promise<LifecyclemodelGraphReport>;
84
+ runLifecyclemodelOrchestrateImpl?: (options: RunLifecyclemodelOrchestrateOptions) => Promise<LifecyclemodelOrchestrateReport>;
85
+ runProcessGetImpl?: (options: RunProcessGetOptions) => Promise<ProcessGetReport>;
86
+ runProcessListImpl?: (options: RunProcessListOptions) => Promise<ProcessListReport>;
87
+ runProcessAutoBuildImpl?: (options: RunProcessAutoBuildOptions) => Promise<ProcessAutoBuildReport>;
88
+ runProcessBatchBuildImpl?: (options: RunProcessBatchBuildOptions) => Promise<ProcessBatchBuildReport>;
89
+ runProcessScopeStatisticsImpl?: (options: RunProcessScopeStatisticsOptions) => Promise<ProcessScopeStatisticsReport>;
90
+ runProcessRefreshReferencesImpl?: (options: RunProcessRefreshReferencesOptions) => Promise<ProcessRefreshReferencesReport>;
91
+ runProcessDedupReviewImpl?: (options: RunProcessDedupReviewOptions) => Promise<ProcessDedupReviewReport>;
92
+ runProcessResumeBuildImpl?: (options: RunProcessResumeBuildOptions) => Promise<ProcessResumeBuildReport>;
93
+ runProcessPublishBuildImpl?: (options: RunProcessPublishBuildOptions) => Promise<ProcessPublishBuildReport>;
94
+ runProcessSaveDraftImpl?: (options: RunProcessSaveDraftOptions) => Promise<ProcessSaveDraftReport>;
95
+ runProcessRequiredFieldsCompleteImpl?: (options: RunProcessRequiredFieldsCompleteOptions) => Promise<ProcessRequiredFieldsReport>;
96
+ runProcessVerifyRowsImpl?: (options: RunProcessVerifyRowsOptions) => Promise<ProcessVerifyRowsReport>;
97
+ runProcessIdentityPreflightImpl?: (options: RunProcessIdentityPreflightOptions) => Promise<ProcessIdentityPreflightReport>;
98
+ runProcessBuildPlanValidateImpl?: (options: RunProcessBuildPlanValidateOptions) => Promise<ProcessBuildPlanGateReport>;
99
+ runProcessBuildPlanMaterializeImpl?: (options: RunProcessBuildPlanMaterializeOptions) => Promise<ProcessBuildPlanGateReport>;
100
+ runProcessQaImpl?: (options: RunProcessQaOptions) => Promise<ProcessQaReport>;
101
+ runFlowQaImpl?: (options: RunFlowQaOptions) => Promise<FlowQaReport>;
102
+ runLifecyclemodelQaImpl?: (options: RunLifecyclemodelQaOptions) => Promise<LifecyclemodelQaReport>;
103
+ runFlowRemediateImpl?: (options: RunFlowRemediateOptions) => Promise<FlowRemediationReport>;
104
+ runFlowFetchRowsImpl?: (options: RunFlowFetchRowsOptions) => Promise<FlowFetchRowsReport>;
105
+ runFlowMaterializeDecisionsImpl?: (options: RunFlowMaterializeDecisionsOptions) => Promise<FlowMaterializeDecisionsReport>;
106
+ runFlowGetImpl?: (options: RunFlowGetOptions) => Promise<FlowGetReport>;
107
+ runFlowListImpl?: (options: RunFlowListOptions) => Promise<FlowListReport>;
108
+ runFlowPublishVersionImpl?: (options: RunFlowPublishVersionOptions) => Promise<FlowPublishVersionReport>;
109
+ runFlowReviewedPublishDataImpl?: (options: RunFlowReviewedPublishDataOptions) => Promise<FlowReviewedPublishDataReport>;
110
+ runFlowBuildAliasMapImpl?: (options: RunFlowBuildAliasMapOptions) => Promise<FlowBuildAliasMapReport>;
111
+ runFlowScanProcessFlowRefsImpl?: (options: RunFlowScanProcessFlowRefsOptions) => Promise<FlowScanProcessFlowRefsReport>;
112
+ runFlowPlanProcessFlowRepairsImpl?: (options: RunFlowPlanProcessFlowRepairsOptions) => Promise<FlowPlanProcessFlowRepairsReport>;
113
+ runFlowApplyProcessFlowRepairsImpl?: (options: RunFlowApplyProcessFlowRepairsOptions) => Promise<FlowApplyProcessFlowRepairsReport>;
114
+ runFlowRegenProductImpl?: (options: RunFlowRegenProductOptions) => Promise<FlowRegenProductReport>;
115
+ runFlowValidateProcessesImpl?: (options: RunFlowValidateProcessesOptions) => Promise<FlowValidateProcessesReport>;
116
+ runFlowIdentityPreflightImpl?: (options: RunFlowIdentityPreflightOptions) => Promise<FlowIdentityPreflightReport>;
117
+ runFlowBuildPlanValidateImpl?: (options: RunFlowBuildPlanValidateOptions) => Promise<FlowBuildPlanGateReport>;
118
+ runFlowBuildPlanMaterializeImpl?: (options: RunFlowBuildPlanMaterializeOptions) => Promise<FlowBuildPlanGateReport>;
119
+ runDatasetValidateImpl?: (options: RunDatasetValidateOptions) => Promise<DatasetValidateReport>;
120
+ runDatasetCurationQueueBuildImpl?: (options: RunDatasetCurationQueueBuildOptions) => Promise<DatasetCurationQueueBuildReport>;
121
+ runDatasetCurationQueueNextImpl?: (options: RunDatasetCurationQueueNextOptions) => Promise<DatasetCurationQueueNextReport>;
122
+ runDatasetCurationQueueVerifyImpl?: (options: RunDatasetCurationQueueVerifyOptions) => Promise<DatasetCurationQueueVerifyReport>;
123
+ runDatasetReferencesRewriteImpl?: (options: RunDatasetReferencesRewriteOptions) => Promise<DatasetReferencesRewriteReport>;
124
+ runDatasetRemoteRefreshImpl?: (options: RunDatasetRemoteRefreshOptions) => Promise<DatasetRemoteRefreshReport>;
125
+ runDatasetRemoteVerifyImpl?: (options: RunDatasetRemoteVerifyOptions) => Promise<DatasetRemoteVerificationReport>;
126
+ runDatasetBilingualExtractImpl?: (options: RunDatasetBilingualExtractOptions) => Promise<DatasetBilingualExtractReport>;
127
+ runDatasetBilingualApplyImpl?: (options: RunDatasetBilingualApplyOptions) => Promise<DatasetBilingualApplyReport>;
128
+ runDatasetBilingualValidateImpl?: (options: RunDatasetBilingualValidateOptions) => Promise<DatasetBilingualValidateReport>;
129
+ runDatasetEvidenceSearchImpl?: (options: RunDatasetEvidenceSearchOptions) => Promise<EvidenceSearchReport>;
130
+ runDatasetContractImpl?: (options: RunDatasetContractOptions) => Promise<DatasetContractReport>;
131
+ runDatasetImportLcaConvertImpl?: (options: RunDatasetImportLcaConvertOptions) => Promise<DatasetImportLcaReport> | DatasetImportLcaReport;
132
+ runDatasetAuthorImpl?: (options: RunDatasetAuthorOptions) => Promise<DatasetAuthorReport>;
133
+ runDatasetPatchApplyImpl?: (options: RunDatasetPatchApplyOptions) => Promise<DatasetPatchApplyReport>;
134
+ runDatasetSaveDraftImpl?: (options: RunDatasetSaveDraftOptions) => Promise<DatasetSaveDraftReport>;
135
+ runDatasetClassificationChildrenImpl?: (options: RunDatasetClassificationChildrenOptions) => Promise<DatasetClassificationChildrenReport>;
136
+ runDatasetClassificationPathImpl?: (options: RunDatasetClassificationPathOptions) => Promise<DatasetClassificationPathReport>;
137
+ runDatasetClassificationAuditImpl?: (options: RunDatasetClassificationAuditOptions) => Promise<DatasetClassificationAuditReport>;
138
+ runDatasetClassificationApplyImpl?: (options: RunDatasetClassificationApplyOptions) => Promise<DatasetClassificationApplyReport>;
139
+ runDatasetMaintenanceClearAccountImpl?: (options: RunDatasetMaintenanceClearAccountOptions) => Promise<DatasetMaintenanceClearAccountReport>;
140
+ runDatasetMaintenancePlanImpl?: typeof runDatasetMaintenancePlan;
141
+ runDatasetMaintenanceApplyImpl?: typeof runDatasetMaintenanceApply;
142
+ freezeDatasetMaintenanceProtectedImpl?: typeof freezeDatasetMaintenanceProtected;
143
+ runDatasetMaintenanceProtectedImpl?: typeof runDatasetMaintenanceProtected;
144
+ sealDatasetMaintenanceProtectedApprovalImpl?: typeof sealDatasetMaintenanceProtectedApproval;
145
+ runDatasetMaintenanceVerifyImpl?: typeof runDatasetMaintenanceVerify;
146
+ runFlowIdentityPlanFromFilesImpl?: typeof runFlowIdentityPlanFromFiles;
147
+ captureFlowIdentityImpl?: typeof captureFlowIdentity;
148
+ freezeFlowIdentityImpl?: typeof freezeFlowIdentity;
149
+ sealFlowIdentityApprovalImpl?: typeof sealFlowIdentityApproval;
150
+ freezeFlowIdentityRecoveryImpl?: typeof freezeFlowIdentityRecovery;
151
+ sealFlowIdentityRecoveryApprovalImpl?: typeof sealFlowIdentityRecoveryApproval;
152
+ runFlowIdentityImpl?: typeof runFlowIdentity;
153
+ verifyFlowIdentityImpl?: typeof verifyFlowIdentity;
154
+ runDatasetSourceUploadAttachmentsImpl?: (options: RunDatasetSourceUploadAttachmentsOptions) => Promise<DatasetSourceUploadAttachmentsReport>;
155
+ };
156
+ export type CliResult = {
157
+ exitCode: number;
158
+ stdout: string;
159
+ stderr: string;
160
+ };
161
+ export declare function executeCli(argv: string[], deps: CliDeps): Promise<CliResult>;
@@ -0,0 +1,90 @@
1
+ export declare const FOUNDRY_COMMAND_SPEC_SCHEMA: 'tiangong-foundry.command-spec.v1';
2
+ export type FoundryArtifactFact = {
3
+ role: string;
4
+ path: string;
5
+ bytes: number;
6
+ sha256: string;
7
+ };
8
+ export type FoundryCommandSpecBinding = {
9
+ artifacts: FoundryArtifactFact[];
10
+ };
11
+ export type FoundryCommandSpec = {
12
+ schema: typeof FOUNDRY_COMMAND_SPEC_SCHEMA;
13
+ executable: string;
14
+ argv: string[];
15
+ display: string;
16
+ binding: FoundryCommandSpecBinding;
17
+ sha256: string;
18
+ };
19
+ export type CreateFoundryCommandSpecOptions = {
20
+ executable: string;
21
+ argv: readonly string[];
22
+ binding?: FoundryCommandSpecBinding;
23
+ };
24
+ export type CreateFileArtifactFactOptions = {
25
+ role: string;
26
+ path: string;
27
+ filePath: string;
28
+ };
29
+ export type FoundryCommandSpecEnvironment = Record<string, string | undefined>;
30
+ export type FoundryCommandSpecSpawnOptions = {
31
+ cwd?: string;
32
+ env?: FoundryCommandSpecEnvironment;
33
+ encoding: 'utf8';
34
+ maxBuffer?: number;
35
+ shell: false;
36
+ windowsHide: true;
37
+ };
38
+ export type FoundryCommandSpecAsyncSpawnOptions = FoundryCommandSpecSpawnOptions & {
39
+ signal: AbortSignal;
40
+ };
41
+ export type FoundryCommandSpecSpawnResult = {
42
+ pid?: number;
43
+ output?: unknown[];
44
+ stdout: string;
45
+ stderr: string;
46
+ status: number | null;
47
+ signal: string | null;
48
+ error?: Error;
49
+ };
50
+ export type ExecuteFoundryCommandSpecSyncOptions = {
51
+ resolveArtifactPath: (artifactPath: string) => string | null;
52
+ cwd?: string;
53
+ env?: FoundryCommandSpecEnvironment;
54
+ maxBuffer?: number;
55
+ spawnImpl?: (executable: string, argv: readonly string[], options: FoundryCommandSpecSpawnOptions) => FoundryCommandSpecSpawnResult;
56
+ };
57
+ export type FoundryCommandSpecClock = {
58
+ now: () => number;
59
+ };
60
+ export type FoundryCommandSpecSleep = (milliseconds: number, signal: AbortSignal) => Promise<void>;
61
+ export type ExecuteFoundryCommandSpecOptions = {
62
+ resolveArtifactPath: (artifactPath: string) => string | null;
63
+ cwd?: string;
64
+ env?: FoundryCommandSpecEnvironment;
65
+ maxBuffer?: number;
66
+ timeoutMs?: number;
67
+ signal?: AbortSignal;
68
+ clock?: FoundryCommandSpecClock;
69
+ sleep?: FoundryCommandSpecSleep;
70
+ spawnImpl?: (executable: string, argv: readonly string[], options: FoundryCommandSpecAsyncSpawnOptions) => Promise<FoundryCommandSpecSpawnResult>;
71
+ };
72
+ export declare class FoundryCommandSpecTimeoutError extends Error {
73
+ readonly timeoutMs: number;
74
+ readonly startedAtMs: number;
75
+ readonly deadlineMs: number;
76
+ constructor(timeoutMs: number, startedAtMs: number);
77
+ }
78
+ export declare class FoundryCommandSpecAbortError extends Error {
79
+ readonly reason: unknown;
80
+ constructor(reason: unknown);
81
+ }
82
+ export declare function renderFoundryCommandDisplay(executable: string, argv: readonly string[]): string;
83
+ export declare function parseFoundryCommandSpec(value: unknown): FoundryCommandSpec;
84
+ export declare function createFoundryCommandSpec(options: CreateFoundryCommandSpecOptions): FoundryCommandSpec;
85
+ export declare function createFileArtifactFact(options: CreateFileArtifactFactOptions): FoundryArtifactFact;
86
+ export declare function commandSpecOptionValue(value: unknown, optionName: string): string | null;
87
+ export declare function assertFoundryCommandSpecArtifactsCurrent(value: unknown, resolveArtifactPath: (artifactPath: string) => string | null): FoundryCommandSpec;
88
+ export declare function assertFoundryCommandSpecBindsArtifact(value: unknown, requiredArtifact: FoundryArtifactFact): FoundryCommandSpec;
89
+ export declare function executeFoundryCommandSpecSync(value: unknown, options: ExecuteFoundryCommandSpecSyncOptions): FoundryCommandSpecSpawnResult;
90
+ export declare function executeFoundryCommandSpec(value: unknown, options: ExecuteFoundryCommandSpecOptions): Promise<FoundryCommandSpecSpawnResult>;