@tiangong-lca/foundry 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.
- package/LICENSE +21 -0
- package/README.md +532 -0
- package/docs/architecture.md +450 -0
- package/docs/foundry-task-contracts.md +147 -0
- package/docs/import-profiles/bafu/constraints.md +343 -0
- package/docs/import-profiles/bafu/leaf-process-classification-authoring.md +153 -0
- package/docs/import-profiles/bafu/profile.md +183 -0
- package/docs/import-profiles/uslci/constraints.md +29 -0
- package/docs/import-profiles/uslci/profile.md +43 -0
- package/docs/import-profiles/worldsteel/constraints.md +77 -0
- package/docs/import-profiles/worldsteel/import-coverage.md +93 -0
- package/docs/import-profiles/worldsteel/import-plan.md +375 -0
- package/docs/import-profiles/worldsteel/profile.md +78 -0
- package/docs/package-distribution-contract.md +287 -0
- package/docs/public-runtime-contract.md +218 -0
- package/docs/runtime-context-contract.md +138 -0
- package/docs/safety-policy.md +164 -0
- package/docs/task-authorization-contract.md +131 -0
- package/docs/uslci-import-runbook.md +336 -0
- package/docs/workspace-migration-contract.md +127 -0
- package/package-dist/assets/foundry-package-descriptor.json +1661 -0
- package/package-dist/scripts/foundry-facade.d.ts +78 -0
- package/package-dist/scripts/foundry-facade.js +1317 -0
- package/package-dist/scripts/foundry-runtime.d.ts +180 -0
- package/package-dist/scripts/foundry-runtime.js +190 -0
- package/package-dist/scripts/lib/batch-orchestration/scope-attempt-ledger.d.ts +27 -0
- package/package-dist/scripts/lib/batch-orchestration/scope-attempt-ledger.js +85 -0
- package/package-dist/scripts/lib/batch-orchestration/scope-resume-contract.d.ts +38 -0
- package/package-dist/scripts/lib/batch-orchestration/scope-resume-contract.js +90 -0
- package/package-dist/scripts/lib/bundle-row-types.d.ts +44 -0
- package/package-dist/scripts/lib/bundle-row-types.js +46 -0
- package/package-dist/scripts/lib/bundle-sample-utils.d.ts +183 -0
- package/package-dist/scripts/lib/bundle-sample-utils.js +526 -0
- package/package-dist/scripts/lib/bundle-source-context.d.ts +31 -0
- package/package-dist/scripts/lib/bundle-source-context.js +142 -0
- package/package-dist/scripts/lib/canonical-description.d.ts +12 -0
- package/package-dist/scripts/lib/canonical-description.js +72 -0
- package/package-dist/scripts/lib/canonical-support-rewrites.d.ts +127 -0
- package/package-dist/scripts/lib/canonical-support-rewrites.js +527 -0
- package/package-dist/scripts/lib/decision-owners/classification.d.ts +245 -0
- package/package-dist/scripts/lib/decision-owners/classification.js +754 -0
- package/package-dist/scripts/lib/decision-owners/identity-preflight.d.ts +333 -0
- package/package-dist/scripts/lib/decision-owners/identity-preflight.js +1353 -0
- package/package-dist/scripts/lib/decision-owners/identity-task.d.ts +130 -0
- package/package-dist/scripts/lib/decision-owners/identity-task.js +494 -0
- package/package-dist/scripts/lib/decision-owners/identity.d.ts +74 -0
- package/package-dist/scripts/lib/decision-owners/identity.js +443 -0
- package/package-dist/scripts/lib/decision-owners/location.d.ts +239 -0
- package/package-dist/scripts/lib/decision-owners/location.js +704 -0
- package/package-dist/scripts/lib/decision-task-utils.d.ts +484 -0
- package/package-dist/scripts/lib/decision-task-utils.js +735 -0
- package/package-dist/scripts/lib/finalize-owners/cli-wrappers.d.ts +52 -0
- package/package-dist/scripts/lib/finalize-owners/cli-wrappers.js +146 -0
- package/package-dist/scripts/lib/finalize-owners/commit-handoff.d.ts +79 -0
- package/package-dist/scripts/lib/finalize-owners/commit-handoff.js +515 -0
- package/package-dist/scripts/lib/finalize-owners/post-authoring.d.ts +234 -0
- package/package-dist/scripts/lib/finalize-owners/post-authoring.js +1720 -0
- package/package-dist/scripts/lib/finalize-owners/post-write-closeout.d.ts +140 -0
- package/package-dist/scripts/lib/finalize-owners/post-write-closeout.js +656 -0
- package/package-dist/scripts/lib/foundry-args.d.ts +7 -0
- package/package-dist/scripts/lib/foundry-args.js +38 -0
- package/package-dist/scripts/lib/foundry-authentication-environment.d.ts +17 -0
- package/package-dist/scripts/lib/foundry-authentication-environment.js +55 -0
- package/package-dist/scripts/lib/foundry-authorization-input.d.ts +31 -0
- package/package-dist/scripts/lib/foundry-authorization-input.js +151 -0
- package/package-dist/scripts/lib/foundry-command-metadata.d.ts +32 -0
- package/package-dist/scripts/lib/foundry-command-metadata.js +1012 -0
- package/package-dist/scripts/lib/foundry-command-registry.d.ts +34 -0
- package/package-dist/scripts/lib/foundry-command-registry.js +241 -0
- package/package-dist/scripts/lib/foundry-command-spec.d.ts +1 -0
- package/package-dist/scripts/lib/foundry-command-spec.js +1 -0
- package/package-dist/scripts/lib/foundry-decision-owners.d.ts +17 -0
- package/package-dist/scripts/lib/foundry-decision-owners.js +68 -0
- package/package-dist/scripts/lib/foundry-decision-routing.d.ts +3 -0
- package/package-dist/scripts/lib/foundry-decision-routing.js +38 -0
- package/package-dist/scripts/lib/foundry-execution-admission.d.ts +33 -0
- package/package-dist/scripts/lib/foundry-execution-admission.js +225 -0
- package/package-dist/scripts/lib/foundry-execution-attempt.d.ts +11 -0
- package/package-dist/scripts/lib/foundry-execution-attempt.js +33 -0
- package/package-dist/scripts/lib/foundry-execution-context-format.d.ts +18 -0
- package/package-dist/scripts/lib/foundry-execution-context-format.js +83 -0
- package/package-dist/scripts/lib/foundry-facade-store.d.ts +25 -0
- package/package-dist/scripts/lib/foundry-facade-store.js +449 -0
- package/package-dist/scripts/lib/foundry-finalize-owners.d.ts +21 -0
- package/package-dist/scripts/lib/foundry-finalize-owners.js +203 -0
- package/package-dist/scripts/lib/foundry-identity-owners.d.ts +13 -0
- package/package-dist/scripts/lib/foundry-identity-owners.js +58 -0
- package/package-dist/scripts/lib/foundry-managed-host.d.ts +7 -0
- package/package-dist/scripts/lib/foundry-managed-host.js +173 -0
- package/package-dist/scripts/lib/foundry-migration-adoption-plan.d.ts +39 -0
- package/package-dist/scripts/lib/foundry-migration-adoption-plan.js +467 -0
- package/package-dist/scripts/lib/foundry-migration-adoption.d.ts +31 -0
- package/package-dist/scripts/lib/foundry-migration-adoption.js +187 -0
- package/package-dist/scripts/lib/foundry-migration-authority.d.ts +42 -0
- package/package-dist/scripts/lib/foundry-migration-authority.js +280 -0
- package/package-dist/scripts/lib/foundry-migration-inventory.d.ts +31 -0
- package/package-dist/scripts/lib/foundry-migration-inventory.js +148 -0
- package/package-dist/scripts/lib/foundry-migration-plan.d.ts +48 -0
- package/package-dist/scripts/lib/foundry-migration-plan.js +234 -0
- package/package-dist/scripts/lib/foundry-migration-replay.d.ts +3 -0
- package/package-dist/scripts/lib/foundry-migration-replay.js +134 -0
- package/package-dist/scripts/lib/foundry-migration-stage.d.ts +15 -0
- package/package-dist/scripts/lib/foundry-migration-stage.js +152 -0
- package/package-dist/scripts/lib/foundry-migration-transfer-io.d.ts +13 -0
- package/package-dist/scripts/lib/foundry-migration-transfer-io.js +226 -0
- package/package-dist/scripts/lib/foundry-migration-transfer.d.ts +36 -0
- package/package-dist/scripts/lib/foundry-migration-transfer.js +350 -0
- package/package-dist/scripts/lib/foundry-operation-result.d.ts +71 -0
- package/package-dist/scripts/lib/foundry-operation-result.js +264 -0
- package/package-dist/scripts/lib/foundry-owner-execution-store.d.ts +319 -0
- package/package-dist/scripts/lib/foundry-owner-execution-store.js +293 -0
- package/package-dist/scripts/lib/foundry-owner-readback.d.ts +22 -0
- package/package-dist/scripts/lib/foundry-owner-readback.js +189 -0
- package/package-dist/scripts/lib/foundry-owner-trace-acceptance.d.ts +15 -0
- package/package-dist/scripts/lib/foundry-owner-trace-acceptance.js +68 -0
- package/package-dist/scripts/lib/foundry-package-contract.d.ts +56 -0
- package/package-dist/scripts/lib/foundry-package-contract.js +392 -0
- package/package-dist/scripts/lib/foundry-private-path.d.ts +2 -0
- package/package-dist/scripts/lib/foundry-private-path.js +20 -0
- package/package-dist/scripts/lib/foundry-runtime-cache.d.ts +3 -0
- package/package-dist/scripts/lib/foundry-runtime-cache.js +25 -0
- package/package-dist/scripts/lib/foundry-runtime-command-policy.d.ts +20 -0
- package/package-dist/scripts/lib/foundry-runtime-command-policy.js +173 -0
- package/package-dist/scripts/lib/foundry-runtime-context-types.d.ts +59 -0
- package/package-dist/scripts/lib/foundry-runtime-context-types.js +1 -0
- package/package-dist/scripts/lib/foundry-runtime-context.d.ts +27 -0
- package/package-dist/scripts/lib/foundry-runtime-context.js +668 -0
- package/package-dist/scripts/lib/foundry-runtime-environment.d.ts +9 -0
- package/package-dist/scripts/lib/foundry-runtime-environment.js +90 -0
- package/package-dist/scripts/lib/foundry-runtime-error.d.ts +4 -0
- package/package-dist/scripts/lib/foundry-runtime-error.js +8 -0
- package/package-dist/scripts/lib/foundry-runtime-identity.d.ts +18 -0
- package/package-dist/scripts/lib/foundry-runtime-identity.js +127 -0
- package/package-dist/scripts/lib/foundry-runtime-paths.d.ts +16 -0
- package/package-dist/scripts/lib/foundry-runtime-paths.js +159 -0
- package/package-dist/scripts/lib/foundry-runtime-qualification.d.ts +66 -0
- package/package-dist/scripts/lib/foundry-runtime-qualification.js +223 -0
- package/package-dist/scripts/lib/foundry-runtime-selection-record.d.ts +16 -0
- package/package-dist/scripts/lib/foundry-runtime-selection-record.js +32 -0
- package/package-dist/scripts/lib/foundry-runtime-selection.d.ts +14 -0
- package/package-dist/scripts/lib/foundry-runtime-selection.js +123 -0
- package/package-dist/scripts/lib/foundry-runtime-utils.d.ts +178 -0
- package/package-dist/scripts/lib/foundry-runtime-utils.js +603 -0
- package/package-dist/scripts/lib/foundry-semantic-input.d.ts +30 -0
- package/package-dist/scripts/lib/foundry-semantic-input.js +132 -0
- package/package-dist/scripts/lib/foundry-task-authorization.d.ts +68 -0
- package/package-dist/scripts/lib/foundry-task-authorization.js +350 -0
- package/package-dist/scripts/lib/foundry-task-io.d.ts +18 -0
- package/package-dist/scripts/lib/foundry-task-io.js +92 -0
- package/package-dist/scripts/lib/foundry-task-registration.d.ts +6 -0
- package/package-dist/scripts/lib/foundry-task-registration.js +384 -0
- package/package-dist/scripts/lib/foundry-task-start-spec.d.ts +34 -0
- package/package-dist/scripts/lib/foundry-task-start-spec.js +161 -0
- package/package-dist/scripts/lib/foundry-task-store.d.ts +18 -0
- package/package-dist/scripts/lib/foundry-task-store.js +466 -0
- package/package-dist/scripts/lib/foundry-task-types.d.ts +99 -0
- package/package-dist/scripts/lib/foundry-task-types.js +1 -0
- package/package-dist/scripts/lib/foundry-workflow-approval-continuation.d.ts +6 -0
- package/package-dist/scripts/lib/foundry-workflow-approval-continuation.js +136 -0
- package/package-dist/scripts/lib/foundry-workflow-assessment.d.ts +3 -0
- package/package-dist/scripts/lib/foundry-workflow-assessment.js +231 -0
- package/package-dist/scripts/lib/foundry-workflow-authorization.d.ts +22 -0
- package/package-dist/scripts/lib/foundry-workflow-authorization.js +174 -0
- package/package-dist/scripts/lib/foundry-workflow-context.d.ts +3 -0
- package/package-dist/scripts/lib/foundry-workflow-context.js +99 -0
- package/package-dist/scripts/lib/foundry-workflow-decisions.d.ts +18 -0
- package/package-dist/scripts/lib/foundry-workflow-decisions.js +123 -0
- package/package-dist/scripts/lib/foundry-workflow-execution.d.ts +8 -0
- package/package-dist/scripts/lib/foundry-workflow-execution.js +248 -0
- package/package-dist/scripts/lib/foundry-workflow-finalize.d.ts +13 -0
- package/package-dist/scripts/lib/foundry-workflow-finalize.js +264 -0
- package/package-dist/scripts/lib/foundry-workflow-identity-apply.d.ts +14 -0
- package/package-dist/scripts/lib/foundry-workflow-identity-apply.js +159 -0
- package/package-dist/scripts/lib/foundry-workflow-identity.d.ts +6 -0
- package/package-dist/scripts/lib/foundry-workflow-identity.js +153 -0
- package/package-dist/scripts/lib/foundry-workflow-import.d.ts +4 -0
- package/package-dist/scripts/lib/foundry-workflow-import.js +70 -0
- package/package-dist/scripts/lib/foundry-workflow-io.d.ts +11 -0
- package/package-dist/scripts/lib/foundry-workflow-io.js +77 -0
- package/package-dist/scripts/lib/foundry-workflow-reference-verify.d.ts +41 -0
- package/package-dist/scripts/lib/foundry-workflow-reference-verify.js +266 -0
- package/package-dist/scripts/lib/foundry-workflow-rows.d.ts +2 -0
- package/package-dist/scripts/lib/foundry-workflow-rows.js +47 -0
- package/package-dist/scripts/lib/foundry-workflow-semantic.d.ts +5 -0
- package/package-dist/scripts/lib/foundry-workflow-semantic.js +367 -0
- package/package-dist/scripts/lib/foundry-workflow-state.d.ts +37 -0
- package/package-dist/scripts/lib/foundry-workflow-state.js +158 -0
- package/package-dist/scripts/lib/full-context-proof.d.ts +51 -0
- package/package-dist/scripts/lib/full-context-proof.js +932 -0
- package/package-dist/scripts/lib/identity-preflight-artifacts.d.ts +184 -0
- package/package-dist/scripts/lib/identity-preflight-artifacts.js +573 -0
- package/package-dist/scripts/lib/identity-preflight-proof.d.ts +117 -0
- package/package-dist/scripts/lib/identity-preflight-proof.js +341 -0
- package/package-dist/scripts/lib/identity-reference-rewrite-utils.d.ts +147 -0
- package/package-dist/scripts/lib/identity-reference-rewrite-utils.js +817 -0
- package/package-dist/scripts/lib/import-curation/authoring-packages.d.ts +28 -0
- package/package-dist/scripts/lib/import-curation/authoring-packages.js +92 -0
- package/package-dist/scripts/lib/import-curation/curation-cleanup.d.ts +32 -0
- package/package-dist/scripts/lib/import-curation/curation-cleanup.js +203 -0
- package/package-dist/scripts/lib/import-curation/curation-gate.d.ts +47 -0
- package/package-dist/scripts/lib/import-curation/curation-gate.js +528 -0
- package/package-dist/scripts/lib/import-curation/internal/artifact-inputs.d.ts +24 -0
- package/package-dist/scripts/lib/import-curation/internal/artifact-inputs.js +152 -0
- package/package-dist/scripts/lib/import-curation/internal/authoring-patch-workflow.d.ts +3 -0
- package/package-dist/scripts/lib/import-curation/internal/authoring-patch-workflow.js +3 -0
- package/package-dist/scripts/lib/import-curation/internal/authoring-task-workflow.d.ts +1 -0
- package/package-dist/scripts/lib/import-curation/internal/authoring-task-workflow.js +1 -0
- package/package-dist/scripts/lib/import-curation/internal/context-inputs.d.ts +56 -0
- package/package-dist/scripts/lib/import-curation/internal/context-inputs.js +206 -0
- package/package-dist/scripts/lib/import-curation/internal/curation-gate-workflow.d.ts +14 -0
- package/package-dist/scripts/lib/import-curation/internal/curation-gate-workflow.js +14 -0
- package/package-dist/scripts/lib/import-curation/internal/dataset-payload.d.ts +70 -0
- package/package-dist/scripts/lib/import-curation/internal/dataset-payload.js +141 -0
- package/package-dist/scripts/lib/import-curation/internal/dataset-types.d.ts +25 -0
- package/package-dist/scripts/lib/import-curation/internal/dataset-types.js +45 -0
- package/package-dist/scripts/lib/import-curation/internal/full-context-proof.d.ts +129 -0
- package/package-dist/scripts/lib/import-curation/internal/full-context-proof.js +552 -0
- package/package-dist/scripts/lib/import-curation/internal/hash-utils.d.ts +2 -0
- package/package-dist/scripts/lib/import-curation/internal/hash-utils.js +10 -0
- package/package-dist/scripts/lib/import-curation/internal/mutation-manifest-workflow.d.ts +15 -0
- package/package-dist/scripts/lib/import-curation/internal/mutation-manifest-workflow.js +15 -0
- package/package-dist/scripts/lib/import-curation/internal/prewrite-cleanup.d.ts +31 -0
- package/package-dist/scripts/lib/import-curation/internal/prewrite-cleanup.js +467 -0
- package/package-dist/scripts/lib/import-curation/internal/profiles-config.d.ts +47 -0
- package/package-dist/scripts/lib/import-curation/internal/profiles-config.js +88 -0
- package/package-dist/scripts/lib/import-curation/internal/runtime-io.d.ts +23 -0
- package/package-dist/scripts/lib/import-curation/internal/runtime-io.js +132 -0
- package/package-dist/scripts/lib/import-curation/internal/trace-summary.d.ts +53 -0
- package/package-dist/scripts/lib/import-curation/internal/trace-summary.js +114 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-authoring-tasks.d.ts +141 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-authoring-tasks.js +854 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-decision-apply-context.d.ts +20 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-decision-apply-context.js +46 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-decision-full-context.d.ts +110 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-decision-full-context.js +782 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-dry-run-context.d.ts +24 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-dry-run-context.js +191 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-evidence-scope.d.ts +80 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-evidence-scope.js +359 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-identity-decision-context.d.ts +146 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-identity-decision-context.js +381 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-identity-preflight.d.ts +223 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-identity-preflight.js +1079 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-patch-collect.d.ts +41 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-patch-collect.js +412 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-patch-evidence-context.d.ts +117 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-patch-evidence-context.js +278 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-patch-evidence.d.ts +59 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-patch-evidence.js +593 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-queue-context.d.ts +58 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-queue-context.js +263 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-reference-closure.d.ts +177 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-reference-closure.js +812 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-row-transform-context.d.ts +159 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-row-transform-context.js +466 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-semantic-actions.d.ts +152 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-semantic-actions.js +1377 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-source-reference-context.d.ts +38 -0
- package/package-dist/scripts/lib/import-curation/internal/workflow-source-reference-context.js +116 -0
- package/package-dist/scripts/lib/import-curation/mutation-manifest.d.ts +51 -0
- package/package-dist/scripts/lib/import-curation/mutation-manifest.js +542 -0
- package/package-dist/scripts/lib/import-curation/patch-collect.d.ts +18 -0
- package/package-dist/scripts/lib/import-curation/patch-collect.js +172 -0
- package/package-dist/scripts/lib/import-curation/profiles.d.ts +1 -0
- package/package-dist/scripts/lib/import-curation/profiles.js +1 -0
- package/package-dist/scripts/lib/import-curation/trace-summary.d.ts +1 -0
- package/package-dist/scripts/lib/import-curation/trace-summary.js +1 -0
- package/package-dist/scripts/lib/oauth-session-reference.d.ts +1 -0
- package/package-dist/scripts/lib/oauth-session-reference.js +20 -0
- package/package-dist/scripts/lib/post-authoring-finalize-utils.d.ts +95 -0
- package/package-dist/scripts/lib/post-authoring-finalize-utils.js +548 -0
- package/package-dist/scripts/lib/post-write-root-proof.d.ts +44 -0
- package/package-dist/scripts/lib/post-write-root-proof.js +169 -0
- package/package-dist/scripts/lib/reference-description-text.d.ts +2 -0
- package/package-dist/scripts/lib/reference-description-text.js +12 -0
- package/package-dist/scripts/lib/remote-verification-accepted-diff.d.ts +42 -0
- package/package-dist/scripts/lib/remote-verification-accepted-diff.js +424 -0
- package/package-dist/scripts/lib/same-identity-commit-recovery.d.ts +8 -0
- package/package-dist/scripts/lib/same-identity-commit-recovery.js +52 -0
- package/package-dist/scripts/lib/source-semantics.d.ts +255 -0
- package/package-dist/scripts/lib/source-semantics.js +888 -0
- package/package-dist/scripts/lib/stage-contract.d.ts +36 -0
- package/package-dist/scripts/lib/stage-contract.js +25 -0
- package/package-dist/scripts/lib/task-authorization.d.ts +84 -0
- package/package-dist/scripts/lib/task-authorization.js +210 -0
- package/package-dist/scripts/lib/tidas-adapter.d.ts +113 -0
- package/package-dist/scripts/lib/tidas-adapter.js +525 -0
- package/package-dist/scripts/lib/tidas-language-utils.d.ts +8 -0
- package/package-dist/scripts/lib/tidas-language-utils.js +206 -0
- package/package-dist/scripts/lib/tidas-row-utils.d.ts +70 -0
- package/package-dist/scripts/lib/tidas-row-utils.js +225 -0
- package/package-dist/scripts/lib/trace-coverage.d.ts +53 -0
- package/package-dist/scripts/lib/trace-coverage.js +178 -0
- package/package-dist/scripts/package-entry.d.ts +2 -0
- package/package-dist/scripts/package-entry.js +4 -0
- package/package-dist/scripts/public-api.d.ts +80 -0
- package/package-dist/scripts/public-api.js +28 -0
- package/package-dist/scripts/runtime-entry.d.ts +23 -0
- package/package-dist/scripts/runtime-entry.js +424 -0
- package/package.json +93 -0
- package/specs/canonical-support/flow-properties-unit-groups.json +2692 -0
- package/specs/import-profiles.json +118 -0
- package/specs/prewrite-content-policy.json +105 -0
- package/specs/schemas/authorization-derivation.schema.json +34 -0
- package/specs/schemas/execution-context.schema.json +68 -0
- package/specs/schemas/foundry-authorization-input.schema.json +120 -0
- package/specs/schemas/foundry-facade-request-index.schema.json +78 -0
- package/specs/schemas/foundry-managed-runtime.schema.json +122 -0
- package/specs/schemas/foundry-migration-activation.schema.json +213 -0
- package/specs/schemas/foundry-migration-adoption-plan.schema.json +548 -0
- package/specs/schemas/foundry-migration-transfer-receipt.schema.json +93 -0
- package/specs/schemas/foundry-operation-result.schema.json +147 -0
- package/specs/schemas/foundry-package-descriptor.schema.json +134 -0
- package/specs/schemas/foundry-runtime-selection.schema.json +59 -0
- package/specs/schemas/foundry-semantic-input.schema.json +36 -0
- package/specs/schemas/foundry-task-start.schema.json +123 -0
- package/specs/schemas/foundry-workspace-migration-pending.schema.json +17 -0
- package/specs/schemas/foundry-workspace-migration-plan.schema.json +59 -0
- package/specs/schemas/foundry-workspace-migration-transfer-plan.schema.json +357 -0
- package/specs/schemas/foundry-workspace-v2.schema.json +70 -0
- package/specs/schemas/runtime-qualification.schema.json +63 -0
- package/specs/schemas/task-authorization.schema.json +154 -0
- package/specs/schemas/tidas-runtime-expectation.schema.json +54 -0
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import { FoundryContextError } from "./foundry-runtime-context.js";
|
|
2
|
+
import { sha256Json } from "./identity-preflight-proof.js";
|
|
3
|
+
export const FOUNDRY_OPERATION_RESULT_SCHEMA = "tiangong-foundry.operation-result.v1";
|
|
4
|
+
export const foundryOperationStatuses = Object.freeze([
|
|
5
|
+
"ready",
|
|
6
|
+
"running",
|
|
7
|
+
"needs_auth",
|
|
8
|
+
"needs_input",
|
|
9
|
+
"blocked",
|
|
10
|
+
"completed",
|
|
11
|
+
"failed",
|
|
12
|
+
]);
|
|
13
|
+
export const foundryOperationPermissionStates = Object.freeze([
|
|
14
|
+
"not_required",
|
|
15
|
+
"required",
|
|
16
|
+
"granted",
|
|
17
|
+
"invalid",
|
|
18
|
+
]);
|
|
19
|
+
export const foundryPublicOperations = Object.freeze([
|
|
20
|
+
"workspace.init",
|
|
21
|
+
"doctor",
|
|
22
|
+
"task.start",
|
|
23
|
+
"task.status",
|
|
24
|
+
"task.resume",
|
|
25
|
+
"workspace.migrate",
|
|
26
|
+
]);
|
|
27
|
+
export const FOUNDRY_COMMAND_NEXT_ACTION_BINDING_SCHEMA = "tiangong-foundry.command-next-action-binding.v1";
|
|
28
|
+
const operations = new Set(["unknown", ...foundryPublicOperations]);
|
|
29
|
+
const shaPattern = /^[0-9a-f]{64}$/u;
|
|
30
|
+
const idPattern = /^[a-zA-Z0-9][a-zA-Z0-9._:/-]{0,255}$/u;
|
|
31
|
+
const credentialKey = /(?:^|_)(?:password|passwd|token|secret|cookie|credential|session)(?:_|$)/iu;
|
|
32
|
+
function fail(message) {
|
|
33
|
+
throw new FoundryContextError("operation_result_invalid", message);
|
|
34
|
+
}
|
|
35
|
+
function record(value, label) {
|
|
36
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
37
|
+
fail(`${label} must be an object.`);
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
function exact(value, keys, label) {
|
|
41
|
+
if (Object.keys(value).length !== keys.length || keys.some((key) => !Object.hasOwn(value, key)))
|
|
42
|
+
fail(`${label} has missing or unsupported fields.`);
|
|
43
|
+
}
|
|
44
|
+
function text(value, label, max = 4_096) {
|
|
45
|
+
if (typeof value !== "string" || !value || value.length > max || /[\0\r\n]/u.test(value))
|
|
46
|
+
fail(`${label} must be a bounded nonempty single-line string.`);
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
49
|
+
function deepFreeze(value) {
|
|
50
|
+
if (value && typeof value === "object" && !Object.isFrozen(value)) {
|
|
51
|
+
for (const child of Object.values(value))
|
|
52
|
+
deepFreeze(child);
|
|
53
|
+
Object.freeze(value);
|
|
54
|
+
}
|
|
55
|
+
return value;
|
|
56
|
+
}
|
|
57
|
+
function safeJson(value, depth = 0) {
|
|
58
|
+
if (depth > 32)
|
|
59
|
+
fail("Runtime or inline artifact identity exceeds its nesting limit.");
|
|
60
|
+
if (value === null || typeof value === "string" || typeof value === "boolean")
|
|
61
|
+
return value;
|
|
62
|
+
if (typeof value === "number" && Number.isFinite(value))
|
|
63
|
+
return value;
|
|
64
|
+
if (Array.isArray(value)) {
|
|
65
|
+
if (value.length > 10_000)
|
|
66
|
+
fail("Runtime or inline artifact array exceeds its limit.");
|
|
67
|
+
return value.map((item) => safeJson(item, depth + 1));
|
|
68
|
+
}
|
|
69
|
+
const item = record(value, "Runtime or inline artifact value");
|
|
70
|
+
if (Object.keys(item).length > 256)
|
|
71
|
+
fail("Runtime or inline artifact object exceeds its limit.");
|
|
72
|
+
const result = {};
|
|
73
|
+
for (const [key, child] of Object.entries(item)) {
|
|
74
|
+
if (!key || key.length > 256 || credentialKey.test(key))
|
|
75
|
+
fail("Operation results cannot contain credential-like fields.");
|
|
76
|
+
result[key] = safeJson(child, depth + 1);
|
|
77
|
+
}
|
|
78
|
+
return result;
|
|
79
|
+
}
|
|
80
|
+
function artifact(value) {
|
|
81
|
+
const item = record(value, "Operation artifact");
|
|
82
|
+
if (item.kind === "file") {
|
|
83
|
+
exact(item, ["kind", "role", "path", "bytes", "sha256"], "File artifact");
|
|
84
|
+
if (!Number.isSafeInteger(item.bytes) ||
|
|
85
|
+
Number(item.bytes) < 0 ||
|
|
86
|
+
typeof item.sha256 !== "string" ||
|
|
87
|
+
!shaPattern.test(item.sha256))
|
|
88
|
+
fail("File artifact requires exact byte and SHA-256 facts.");
|
|
89
|
+
return {
|
|
90
|
+
kind: "file",
|
|
91
|
+
role: text(item.role, "Artifact role", 256),
|
|
92
|
+
path: text(item.path, "Artifact path"),
|
|
93
|
+
bytes: Number(item.bytes),
|
|
94
|
+
sha256: item.sha256,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
if (item.kind === "inline") {
|
|
98
|
+
exact(item, ["kind", "role", "bytes", "sha256", "value"], "Inline artifact");
|
|
99
|
+
const valueJson = safeJson(item.value);
|
|
100
|
+
if (!Number.isSafeInteger(item.bytes) ||
|
|
101
|
+
Number(item.bytes) < 0 ||
|
|
102
|
+
typeof item.sha256 !== "string" ||
|
|
103
|
+
!shaPattern.test(item.sha256))
|
|
104
|
+
fail("Inline artifact requires exact byte and SHA-256 facts.");
|
|
105
|
+
return {
|
|
106
|
+
kind: "inline",
|
|
107
|
+
role: text(item.role, "Artifact role", 256),
|
|
108
|
+
bytes: Number(item.bytes),
|
|
109
|
+
sha256: item.sha256,
|
|
110
|
+
value: valueJson,
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
return fail("Operation artifact kind is unsupported.");
|
|
114
|
+
}
|
|
115
|
+
function blocker(value) {
|
|
116
|
+
const item = record(value, "Operation blocker");
|
|
117
|
+
exact(item, ["code", "message", "scope"], "Operation blocker");
|
|
118
|
+
if (item.scope !== null && typeof item.scope !== "string")
|
|
119
|
+
fail("Operation blocker scope must be a string or null.");
|
|
120
|
+
return {
|
|
121
|
+
code: text(item.code, "Blocker code", 256),
|
|
122
|
+
message: text(item.message, "Blocker message", 4_096),
|
|
123
|
+
scope: item.scope === null ? null : text(item.scope, "Blocker scope", 1_024),
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
function nextAction(value) {
|
|
127
|
+
const item = record(value, "Next action");
|
|
128
|
+
if (item.kind === "human") {
|
|
129
|
+
exact(item, ["kind", "code", "instructions"], "Human next action");
|
|
130
|
+
return {
|
|
131
|
+
kind: "human",
|
|
132
|
+
code: text(item.code, "Human action code", 256),
|
|
133
|
+
instructions: text(item.instructions, "Human action instructions", 8_192),
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
if (item.kind === "command") {
|
|
137
|
+
exact(item, ["kind", "code", "executable", "argv", "cwd", "purpose", "binding_sha256"], "Command next action");
|
|
138
|
+
if (!Array.isArray(item.argv) ||
|
|
139
|
+
item.argv.length > 256 ||
|
|
140
|
+
item.argv.some((token) => typeof token !== "string" || !token || /[\0\r\n]/u.test(token)) ||
|
|
141
|
+
typeof item.binding_sha256 !== "string" ||
|
|
142
|
+
!shaPattern.test(item.binding_sha256))
|
|
143
|
+
fail("Command next action requires bounded argv and an exact binding digest.");
|
|
144
|
+
const action = {
|
|
145
|
+
kind: "command",
|
|
146
|
+
code: text(item.code, "Command action code", 256),
|
|
147
|
+
executable: text(item.executable, "Command executable"),
|
|
148
|
+
argv: [...item.argv],
|
|
149
|
+
cwd: text(item.cwd, "Command working directory"),
|
|
150
|
+
purpose: text(item.purpose, "Command purpose", 4_096),
|
|
151
|
+
};
|
|
152
|
+
if (commandNextActionBindingSha256(action) !== item.binding_sha256)
|
|
153
|
+
fail("Command next action binding does not match its executable fields.");
|
|
154
|
+
return { ...action, binding_sha256: item.binding_sha256 };
|
|
155
|
+
}
|
|
156
|
+
return fail("Next actions must be explicit human or executable-plus-argv records.");
|
|
157
|
+
}
|
|
158
|
+
/** Bind exactly the executable fields a consumer is allowed to invoke. */
|
|
159
|
+
export function commandNextActionBindingSha256(value) {
|
|
160
|
+
const item = record(value, "Command next action binding input");
|
|
161
|
+
exact(item, ["kind", "code", "executable", "argv", "cwd", "purpose"], "Command next action binding input");
|
|
162
|
+
if (item.kind !== "command" ||
|
|
163
|
+
!Array.isArray(item.argv) ||
|
|
164
|
+
item.argv.length > 256 ||
|
|
165
|
+
item.argv.some((token) => typeof token !== "string" || !token || /[\0\r\n]/u.test(token)))
|
|
166
|
+
fail("Command next action binding input is malformed.");
|
|
167
|
+
return sha256Json({
|
|
168
|
+
schema: FOUNDRY_COMMAND_NEXT_ACTION_BINDING_SCHEMA,
|
|
169
|
+
kind: "command",
|
|
170
|
+
code: text(item.code, "Command action code", 256),
|
|
171
|
+
executable: text(item.executable, "Command executable"),
|
|
172
|
+
argv: [...item.argv],
|
|
173
|
+
cwd: text(item.cwd, "Command working directory"),
|
|
174
|
+
purpose: text(item.purpose, "Command purpose", 4_096),
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
function permissions(value) {
|
|
178
|
+
const item = record(value, "Operation permissions");
|
|
179
|
+
exact(item, ["state", "requested_actions", "approval_reference"], "Operation permissions");
|
|
180
|
+
if (typeof item.state !== "string" ||
|
|
181
|
+
!foundryOperationPermissionStates.includes(item.state) ||
|
|
182
|
+
!Array.isArray(item.requested_actions) ||
|
|
183
|
+
item.requested_actions.length > 32 ||
|
|
184
|
+
new Set(item.requested_actions).size !== item.requested_actions.length ||
|
|
185
|
+
item.requested_actions.some((action) => typeof action !== "string" || !idPattern.test(action)) ||
|
|
186
|
+
(item.approval_reference !== null &&
|
|
187
|
+
(typeof item.approval_reference !== "string" || !item.approval_reference)))
|
|
188
|
+
fail("Operation permissions have an unsupported state, action or approval reference.");
|
|
189
|
+
return {
|
|
190
|
+
state: item.state,
|
|
191
|
+
requested_actions: [...item.requested_actions],
|
|
192
|
+
approval_reference: item.approval_reference,
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
export function assertFoundryOperationResult(value) {
|
|
196
|
+
const item = record(value, "Operation result");
|
|
197
|
+
exact(item, [
|
|
198
|
+
"schema",
|
|
199
|
+
"operation",
|
|
200
|
+
"status",
|
|
201
|
+
"task_id",
|
|
202
|
+
"artifacts",
|
|
203
|
+
"blockers",
|
|
204
|
+
"next_actions",
|
|
205
|
+
"runtime_identity",
|
|
206
|
+
"permissions",
|
|
207
|
+
], "Operation result");
|
|
208
|
+
if (item.schema !== FOUNDRY_OPERATION_RESULT_SCHEMA ||
|
|
209
|
+
typeof item.operation !== "string" ||
|
|
210
|
+
!operations.has(item.operation) ||
|
|
211
|
+
typeof item.status !== "string" ||
|
|
212
|
+
!foundryOperationStatuses.includes(item.status) ||
|
|
213
|
+
(item.task_id !== null &&
|
|
214
|
+
(typeof item.task_id !== "string" || !idPattern.test(item.task_id))) ||
|
|
215
|
+
!Array.isArray(item.artifacts) ||
|
|
216
|
+
item.artifacts.length > 10_000 ||
|
|
217
|
+
!Array.isArray(item.blockers) ||
|
|
218
|
+
item.blockers.length > 10_000 ||
|
|
219
|
+
!Array.isArray(item.next_actions) ||
|
|
220
|
+
item.next_actions.length > 1_000)
|
|
221
|
+
fail("Operation result has an unsupported identity, status or collection shape.");
|
|
222
|
+
const blockers = item.blockers.map(blocker);
|
|
223
|
+
if ((["ready", "running", "completed"].includes(item.status) && blockers.length > 0) ||
|
|
224
|
+
(!["ready", "running", "completed"].includes(item.status) && blockers.length === 0))
|
|
225
|
+
fail("Successful results cannot carry blockers and non-success results require one blocker.");
|
|
226
|
+
const result = {
|
|
227
|
+
schema: FOUNDRY_OPERATION_RESULT_SCHEMA,
|
|
228
|
+
operation: item.operation,
|
|
229
|
+
status: item.status,
|
|
230
|
+
task_id: item.task_id,
|
|
231
|
+
artifacts: item.artifacts.map(artifact),
|
|
232
|
+
blockers,
|
|
233
|
+
next_actions: item.next_actions.map(nextAction),
|
|
234
|
+
runtime_identity: safeJson(item.runtime_identity),
|
|
235
|
+
permissions: permissions(item.permissions),
|
|
236
|
+
};
|
|
237
|
+
return deepFreeze(result);
|
|
238
|
+
}
|
|
239
|
+
export function createFoundryOperationResult(options) {
|
|
240
|
+
return assertFoundryOperationResult({
|
|
241
|
+
schema: FOUNDRY_OPERATION_RESULT_SCHEMA,
|
|
242
|
+
operation: options.operation,
|
|
243
|
+
status: options.status,
|
|
244
|
+
task_id: options.taskId,
|
|
245
|
+
artifacts: options.artifacts,
|
|
246
|
+
blockers: options.blockers,
|
|
247
|
+
next_actions: options.nextActions,
|
|
248
|
+
runtime_identity: options.runtimeIdentity,
|
|
249
|
+
permissions: options.permissions,
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
export function exitCodeForFoundryOperationResult(result) {
|
|
253
|
+
if (result.blockers.some((item) => item.code === "operation_interrupted"))
|
|
254
|
+
return 130;
|
|
255
|
+
if (["ready", "running", "completed"].includes(result.status))
|
|
256
|
+
return 0;
|
|
257
|
+
if (result.status === "needs_input")
|
|
258
|
+
return 2;
|
|
259
|
+
if (result.status === "needs_auth")
|
|
260
|
+
return 3;
|
|
261
|
+
if (result.status === "blocked")
|
|
262
|
+
return 4;
|
|
263
|
+
return 1;
|
|
264
|
+
}
|
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
import { type BatchEvent } from "@tiangong-lca/cli/batch";
|
|
2
|
+
import { type FoundryRuntimeContext } from "./foundry-runtime-context.ts";
|
|
3
|
+
import { readWorkflowArtifact } from "./foundry-workflow-state.ts";
|
|
4
|
+
import type { ArtifactEntry } from "./foundry-task-types.ts";
|
|
5
|
+
export type OwnerExecutionRequest = ReturnType<typeof buildRequest>;
|
|
6
|
+
declare function buildRequest(context: FoundryRuntimeContext, authorization: ReturnType<typeof readWorkflowArtifact>): {
|
|
7
|
+
schema: "tiangong-foundry.owner-execution-request.v1";
|
|
8
|
+
scope_id: string;
|
|
9
|
+
content: {
|
|
10
|
+
authorization: string;
|
|
11
|
+
input: import("./foundry-runtime-context-types.ts").FoundryInputFact;
|
|
12
|
+
capsule: import("./foundry-runtime-context-types.ts").FoundryInputFact;
|
|
13
|
+
commit: import("@tiangong-lca/cli/command-spec").FoundryCommandSpec;
|
|
14
|
+
verify: import("@tiangong-lca/cli/command-spec").FoundryCommandSpec;
|
|
15
|
+
};
|
|
16
|
+
policy: {
|
|
17
|
+
task_id: string;
|
|
18
|
+
actor_id: string;
|
|
19
|
+
project_ref: string;
|
|
20
|
+
user_id: string;
|
|
21
|
+
state_code: number;
|
|
22
|
+
dataset_type: string;
|
|
23
|
+
account_mode: string;
|
|
24
|
+
};
|
|
25
|
+
contract: import("@tiangong-lca/cli/batch").BatchContract<{
|
|
26
|
+
task: string;
|
|
27
|
+
scope: string;
|
|
28
|
+
}>;
|
|
29
|
+
item_contract: Readonly<{
|
|
30
|
+
item_id: string;
|
|
31
|
+
content_sha256: string;
|
|
32
|
+
policy_sha256: string;
|
|
33
|
+
}>;
|
|
34
|
+
handoff_file: string;
|
|
35
|
+
finalize_file: string;
|
|
36
|
+
mutation_file: string;
|
|
37
|
+
};
|
|
38
|
+
export declare function prepareFoundryOwnerExecution(context: FoundryRuntimeContext, entries: readonly ArtifactEntry[]): Promise<import("./foundry-task-types.ts").JsonRecord>;
|
|
39
|
+
export declare function readOwnerExecutionRequests(context: FoundryRuntimeContext, entries: readonly ArtifactEntry[]): {
|
|
40
|
+
entry: ArtifactEntry;
|
|
41
|
+
file: string;
|
|
42
|
+
value: Record<string, unknown>;
|
|
43
|
+
request: {
|
|
44
|
+
schema: "tiangong-foundry.owner-execution-request.v1";
|
|
45
|
+
scope_id: string;
|
|
46
|
+
content: {
|
|
47
|
+
authorization: string;
|
|
48
|
+
input: import("./foundry-runtime-context-types.ts").FoundryInputFact;
|
|
49
|
+
capsule: import("./foundry-runtime-context-types.ts").FoundryInputFact;
|
|
50
|
+
commit: import("@tiangong-lca/cli/command-spec").FoundryCommandSpec;
|
|
51
|
+
verify: import("@tiangong-lca/cli/command-spec").FoundryCommandSpec;
|
|
52
|
+
};
|
|
53
|
+
policy: {
|
|
54
|
+
task_id: string;
|
|
55
|
+
actor_id: string;
|
|
56
|
+
project_ref: string;
|
|
57
|
+
user_id: string;
|
|
58
|
+
state_code: number;
|
|
59
|
+
dataset_type: string;
|
|
60
|
+
account_mode: string;
|
|
61
|
+
};
|
|
62
|
+
contract: import("@tiangong-lca/cli/batch").BatchContract<{
|
|
63
|
+
task: string;
|
|
64
|
+
scope: string;
|
|
65
|
+
}>;
|
|
66
|
+
item_contract: Readonly<{
|
|
67
|
+
item_id: string;
|
|
68
|
+
content_sha256: string;
|
|
69
|
+
policy_sha256: string;
|
|
70
|
+
}>;
|
|
71
|
+
handoff_file: string;
|
|
72
|
+
finalize_file: string;
|
|
73
|
+
mutation_file: string;
|
|
74
|
+
};
|
|
75
|
+
}[];
|
|
76
|
+
export declare function ownerAttemptStore(context: FoundryRuntimeContext, scopeId: string, request: {
|
|
77
|
+
path: string;
|
|
78
|
+
sha256: string;
|
|
79
|
+
}): {
|
|
80
|
+
ledger: Readonly<{
|
|
81
|
+
loadResumeItems: (selectedIds: ReadonlySet<string>) => import("@tiangong-lca/cli/batch").BatchAttemptedResumeItem[];
|
|
82
|
+
record: (input: import("./batch-orchestration/scope-attempt-ledger.ts").ScopeAttemptEventInput) => void;
|
|
83
|
+
compact: () => void;
|
|
84
|
+
}>;
|
|
85
|
+
readEvents: () => Record<string, unknown>[];
|
|
86
|
+
record: (event: BatchEvent, itemContract: OwnerExecutionRequest["item_contract"]) => void;
|
|
87
|
+
};
|
|
88
|
+
export declare function markOwnerAttemptConsumed(context: FoundryRuntimeContext, artifact: ReturnType<typeof readOwnerExecutionRequests>[number]): Promise<import("./foundry-task-types.ts").JsonRecord>;
|
|
89
|
+
export declare function inspectOwnerExecutions(context: FoundryRuntimeContext, entries: readonly ArtifactEntry[]): {
|
|
90
|
+
requests: {
|
|
91
|
+
entry: ArtifactEntry;
|
|
92
|
+
file: string;
|
|
93
|
+
value: Record<string, unknown>;
|
|
94
|
+
request: {
|
|
95
|
+
schema: "tiangong-foundry.owner-execution-request.v1";
|
|
96
|
+
scope_id: string;
|
|
97
|
+
content: {
|
|
98
|
+
authorization: string;
|
|
99
|
+
input: import("./foundry-runtime-context-types.ts").FoundryInputFact;
|
|
100
|
+
capsule: import("./foundry-runtime-context-types.ts").FoundryInputFact;
|
|
101
|
+
commit: import("@tiangong-lca/cli/command-spec").FoundryCommandSpec;
|
|
102
|
+
verify: import("@tiangong-lca/cli/command-spec").FoundryCommandSpec;
|
|
103
|
+
};
|
|
104
|
+
policy: {
|
|
105
|
+
task_id: string;
|
|
106
|
+
actor_id: string;
|
|
107
|
+
project_ref: string;
|
|
108
|
+
user_id: string;
|
|
109
|
+
state_code: number;
|
|
110
|
+
dataset_type: string;
|
|
111
|
+
account_mode: string;
|
|
112
|
+
};
|
|
113
|
+
contract: import("@tiangong-lca/cli/batch").BatchContract<{
|
|
114
|
+
task: string;
|
|
115
|
+
scope: string;
|
|
116
|
+
}>;
|
|
117
|
+
item_contract: Readonly<{
|
|
118
|
+
item_id: string;
|
|
119
|
+
content_sha256: string;
|
|
120
|
+
policy_sha256: string;
|
|
121
|
+
}>;
|
|
122
|
+
handoff_file: string;
|
|
123
|
+
finalize_file: string;
|
|
124
|
+
mutation_file: string;
|
|
125
|
+
};
|
|
126
|
+
}[];
|
|
127
|
+
consumed: Map<string, {
|
|
128
|
+
entry: ArtifactEntry;
|
|
129
|
+
file: string;
|
|
130
|
+
value: Record<string, unknown>;
|
|
131
|
+
request: {
|
|
132
|
+
schema: "tiangong-foundry.owner-execution-request.v1";
|
|
133
|
+
scope_id: string;
|
|
134
|
+
content: {
|
|
135
|
+
authorization: string;
|
|
136
|
+
input: import("./foundry-runtime-context-types.ts").FoundryInputFact;
|
|
137
|
+
capsule: import("./foundry-runtime-context-types.ts").FoundryInputFact;
|
|
138
|
+
commit: import("@tiangong-lca/cli/command-spec").FoundryCommandSpec;
|
|
139
|
+
verify: import("@tiangong-lca/cli/command-spec").FoundryCommandSpec;
|
|
140
|
+
};
|
|
141
|
+
policy: {
|
|
142
|
+
task_id: string;
|
|
143
|
+
actor_id: string;
|
|
144
|
+
project_ref: string;
|
|
145
|
+
user_id: string;
|
|
146
|
+
state_code: number;
|
|
147
|
+
dataset_type: string;
|
|
148
|
+
account_mode: string;
|
|
149
|
+
};
|
|
150
|
+
contract: import("@tiangong-lca/cli/batch").BatchContract<{
|
|
151
|
+
task: string;
|
|
152
|
+
scope: string;
|
|
153
|
+
}>;
|
|
154
|
+
item_contract: Readonly<{
|
|
155
|
+
item_id: string;
|
|
156
|
+
content_sha256: string;
|
|
157
|
+
policy_sha256: string;
|
|
158
|
+
}>;
|
|
159
|
+
handoff_file: string;
|
|
160
|
+
finalize_file: string;
|
|
161
|
+
mutation_file: string;
|
|
162
|
+
};
|
|
163
|
+
}>;
|
|
164
|
+
verified: Map<string, import("./foundry-workflow-state.ts").WorkflowArtifact<Record<string, unknown>>>;
|
|
165
|
+
pending: {
|
|
166
|
+
entry: ArtifactEntry;
|
|
167
|
+
file: string;
|
|
168
|
+
value: Record<string, unknown>;
|
|
169
|
+
request: {
|
|
170
|
+
schema: "tiangong-foundry.owner-execution-request.v1";
|
|
171
|
+
scope_id: string;
|
|
172
|
+
content: {
|
|
173
|
+
authorization: string;
|
|
174
|
+
input: import("./foundry-runtime-context-types.ts").FoundryInputFact;
|
|
175
|
+
capsule: import("./foundry-runtime-context-types.ts").FoundryInputFact;
|
|
176
|
+
commit: import("@tiangong-lca/cli/command-spec").FoundryCommandSpec;
|
|
177
|
+
verify: import("@tiangong-lca/cli/command-spec").FoundryCommandSpec;
|
|
178
|
+
};
|
|
179
|
+
policy: {
|
|
180
|
+
task_id: string;
|
|
181
|
+
actor_id: string;
|
|
182
|
+
project_ref: string;
|
|
183
|
+
user_id: string;
|
|
184
|
+
state_code: number;
|
|
185
|
+
dataset_type: string;
|
|
186
|
+
account_mode: string;
|
|
187
|
+
};
|
|
188
|
+
contract: import("@tiangong-lca/cli/batch").BatchContract<{
|
|
189
|
+
task: string;
|
|
190
|
+
scope: string;
|
|
191
|
+
}>;
|
|
192
|
+
item_contract: Readonly<{
|
|
193
|
+
item_id: string;
|
|
194
|
+
content_sha256: string;
|
|
195
|
+
policy_sha256: string;
|
|
196
|
+
}>;
|
|
197
|
+
handoff_file: string;
|
|
198
|
+
finalize_file: string;
|
|
199
|
+
mutation_file: string;
|
|
200
|
+
};
|
|
201
|
+
}[];
|
|
202
|
+
};
|
|
203
|
+
export declare function completedOwnerScopes(context: FoundryRuntimeContext, entries: readonly ArtifactEntry[]): {
|
|
204
|
+
requests: {
|
|
205
|
+
entry: ArtifactEntry;
|
|
206
|
+
file: string;
|
|
207
|
+
value: Record<string, unknown>;
|
|
208
|
+
request: {
|
|
209
|
+
schema: "tiangong-foundry.owner-execution-request.v1";
|
|
210
|
+
scope_id: string;
|
|
211
|
+
content: {
|
|
212
|
+
authorization: string;
|
|
213
|
+
input: import("./foundry-runtime-context-types.ts").FoundryInputFact;
|
|
214
|
+
capsule: import("./foundry-runtime-context-types.ts").FoundryInputFact;
|
|
215
|
+
commit: import("@tiangong-lca/cli/command-spec").FoundryCommandSpec;
|
|
216
|
+
verify: import("@tiangong-lca/cli/command-spec").FoundryCommandSpec;
|
|
217
|
+
};
|
|
218
|
+
policy: {
|
|
219
|
+
task_id: string;
|
|
220
|
+
actor_id: string;
|
|
221
|
+
project_ref: string;
|
|
222
|
+
user_id: string;
|
|
223
|
+
state_code: number;
|
|
224
|
+
dataset_type: string;
|
|
225
|
+
account_mode: string;
|
|
226
|
+
};
|
|
227
|
+
contract: import("@tiangong-lca/cli/batch").BatchContract<{
|
|
228
|
+
task: string;
|
|
229
|
+
scope: string;
|
|
230
|
+
}>;
|
|
231
|
+
item_contract: Readonly<{
|
|
232
|
+
item_id: string;
|
|
233
|
+
content_sha256: string;
|
|
234
|
+
policy_sha256: string;
|
|
235
|
+
}>;
|
|
236
|
+
handoff_file: string;
|
|
237
|
+
finalize_file: string;
|
|
238
|
+
mutation_file: string;
|
|
239
|
+
};
|
|
240
|
+
}[];
|
|
241
|
+
consumed: Map<string, {
|
|
242
|
+
entry: ArtifactEntry;
|
|
243
|
+
file: string;
|
|
244
|
+
value: Record<string, unknown>;
|
|
245
|
+
request: {
|
|
246
|
+
schema: "tiangong-foundry.owner-execution-request.v1";
|
|
247
|
+
scope_id: string;
|
|
248
|
+
content: {
|
|
249
|
+
authorization: string;
|
|
250
|
+
input: import("./foundry-runtime-context-types.ts").FoundryInputFact;
|
|
251
|
+
capsule: import("./foundry-runtime-context-types.ts").FoundryInputFact;
|
|
252
|
+
commit: import("@tiangong-lca/cli/command-spec").FoundryCommandSpec;
|
|
253
|
+
verify: import("@tiangong-lca/cli/command-spec").FoundryCommandSpec;
|
|
254
|
+
};
|
|
255
|
+
policy: {
|
|
256
|
+
task_id: string;
|
|
257
|
+
actor_id: string;
|
|
258
|
+
project_ref: string;
|
|
259
|
+
user_id: string;
|
|
260
|
+
state_code: number;
|
|
261
|
+
dataset_type: string;
|
|
262
|
+
account_mode: string;
|
|
263
|
+
};
|
|
264
|
+
contract: import("@tiangong-lca/cli/batch").BatchContract<{
|
|
265
|
+
task: string;
|
|
266
|
+
scope: string;
|
|
267
|
+
}>;
|
|
268
|
+
item_contract: Readonly<{
|
|
269
|
+
item_id: string;
|
|
270
|
+
content_sha256: string;
|
|
271
|
+
policy_sha256: string;
|
|
272
|
+
}>;
|
|
273
|
+
handoff_file: string;
|
|
274
|
+
finalize_file: string;
|
|
275
|
+
mutation_file: string;
|
|
276
|
+
};
|
|
277
|
+
}>;
|
|
278
|
+
verified: Map<string, import("./foundry-workflow-state.ts").WorkflowArtifact<Record<string, unknown>>>;
|
|
279
|
+
pending: {
|
|
280
|
+
entry: ArtifactEntry;
|
|
281
|
+
file: string;
|
|
282
|
+
value: Record<string, unknown>;
|
|
283
|
+
request: {
|
|
284
|
+
schema: "tiangong-foundry.owner-execution-request.v1";
|
|
285
|
+
scope_id: string;
|
|
286
|
+
content: {
|
|
287
|
+
authorization: string;
|
|
288
|
+
input: import("./foundry-runtime-context-types.ts").FoundryInputFact;
|
|
289
|
+
capsule: import("./foundry-runtime-context-types.ts").FoundryInputFact;
|
|
290
|
+
commit: import("@tiangong-lca/cli/command-spec").FoundryCommandSpec;
|
|
291
|
+
verify: import("@tiangong-lca/cli/command-spec").FoundryCommandSpec;
|
|
292
|
+
};
|
|
293
|
+
policy: {
|
|
294
|
+
task_id: string;
|
|
295
|
+
actor_id: string;
|
|
296
|
+
project_ref: string;
|
|
297
|
+
user_id: string;
|
|
298
|
+
state_code: number;
|
|
299
|
+
dataset_type: string;
|
|
300
|
+
account_mode: string;
|
|
301
|
+
};
|
|
302
|
+
contract: import("@tiangong-lca/cli/batch").BatchContract<{
|
|
303
|
+
task: string;
|
|
304
|
+
scope: string;
|
|
305
|
+
}>;
|
|
306
|
+
item_contract: Readonly<{
|
|
307
|
+
item_id: string;
|
|
308
|
+
content_sha256: string;
|
|
309
|
+
policy_sha256: string;
|
|
310
|
+
}>;
|
|
311
|
+
handoff_file: string;
|
|
312
|
+
finalize_file: string;
|
|
313
|
+
mutation_file: string;
|
|
314
|
+
};
|
|
315
|
+
}[];
|
|
316
|
+
completed: Map<string, Record<string, unknown>>;
|
|
317
|
+
progressSha256: string;
|
|
318
|
+
};
|
|
319
|
+
export {};
|