@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,52 @@
|
|
|
1
|
+
function record(value) {
|
|
2
|
+
return value && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
3
|
+
}
|
|
4
|
+
function values(value) {
|
|
5
|
+
if (value == null)
|
|
6
|
+
return [];
|
|
7
|
+
return Array.isArray(value) ? value : [value];
|
|
8
|
+
}
|
|
9
|
+
function text(value) {
|
|
10
|
+
return typeof value === "string" || typeof value === "number" ? String(value).trim() : "";
|
|
11
|
+
}
|
|
12
|
+
function reportFailureEntries(report) {
|
|
13
|
+
const rowFailures = values(report.rows)
|
|
14
|
+
.map(record)
|
|
15
|
+
.filter((row) => text(row.status).toLowerCase() === "failed")
|
|
16
|
+
.map((row) => row.error);
|
|
17
|
+
const entries = rowFailures.length > 0 ? rowFailures : values(report.failures);
|
|
18
|
+
const declaredFailed = Number(record(report.counts).failed ?? 0);
|
|
19
|
+
return {
|
|
20
|
+
entries,
|
|
21
|
+
missingDetails: Number.isSafeInteger(declaredFailed) && declaredFailed > entries.length
|
|
22
|
+
? declaredFailed - entries.length
|
|
23
|
+
: 0,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export function summarizeSameIdentityCommitFailures(reports) {
|
|
27
|
+
let alreadyExists = 0;
|
|
28
|
+
let otherFailures = 0;
|
|
29
|
+
for (const report of reports) {
|
|
30
|
+
const { entries, missingDetails } = reportFailureEntries(report);
|
|
31
|
+
otherFailures += missingDetails;
|
|
32
|
+
for (const value of entries) {
|
|
33
|
+
const failure = record(value);
|
|
34
|
+
const code = text(failure.code ?? failure.status_code).toLowerCase();
|
|
35
|
+
const message = `${text(failure.message)} ${text(failure.details)}`
|
|
36
|
+
.toLowerCase()
|
|
37
|
+
.replace(/\s+/gu, " ")
|
|
38
|
+
.trim();
|
|
39
|
+
if (code === "23505" && message.includes("same id and version already exists")) {
|
|
40
|
+
alreadyExists += 1;
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
otherFailures += 1;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
accepted: alreadyExists > 0 && otherFailures === 0,
|
|
49
|
+
alreadyExists,
|
|
50
|
+
otherFailures,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
export type SourceSemanticDependencies = {
|
|
2
|
+
asText: (value: unknown) => string;
|
|
3
|
+
bundleClassificationPath: (payload: unknown, type: string) => string;
|
|
4
|
+
cloneJson: <T>(value: T) => T;
|
|
5
|
+
datasetIdentity: (payload: unknown, type: string) => DatasetIdentity;
|
|
6
|
+
deterministicUuid: (seed: string) => string;
|
|
7
|
+
languageForText: (text: unknown, fallback?: unknown) => string;
|
|
8
|
+
multiLang: (text: unknown, language?: unknown) => UnknownRecord;
|
|
9
|
+
pathExpression: (parts: PathSegment[]) => string;
|
|
10
|
+
repoRelativeMaybe: (value: unknown) => unknown;
|
|
11
|
+
textValue: (value: unknown) => string;
|
|
12
|
+
};
|
|
13
|
+
type UnknownRecord = Record<string, unknown>;
|
|
14
|
+
type PathSegment = string | number;
|
|
15
|
+
type DatasetIdentity = {
|
|
16
|
+
id: string | null;
|
|
17
|
+
version: string | null;
|
|
18
|
+
};
|
|
19
|
+
type MutableStats = Record<string, number>;
|
|
20
|
+
type SourceMetadata = {
|
|
21
|
+
shortName: string;
|
|
22
|
+
citation: string;
|
|
23
|
+
description?: string;
|
|
24
|
+
doi?: string;
|
|
25
|
+
title?: string;
|
|
26
|
+
year?: string;
|
|
27
|
+
authors?: string;
|
|
28
|
+
container?: string | null;
|
|
29
|
+
details?: string | null;
|
|
30
|
+
};
|
|
31
|
+
type SourceSummary = {
|
|
32
|
+
dataset_id?: unknown;
|
|
33
|
+
dataset_version?: unknown;
|
|
34
|
+
short_name?: unknown;
|
|
35
|
+
source_citation?: unknown;
|
|
36
|
+
source_description?: unknown;
|
|
37
|
+
classification_path?: unknown;
|
|
38
|
+
kind?: unknown;
|
|
39
|
+
fallback_database_source?: unknown;
|
|
40
|
+
};
|
|
41
|
+
type SourceLookup = {
|
|
42
|
+
get: (id: string) => SourceSummary | undefined;
|
|
43
|
+
};
|
|
44
|
+
type SourceReference = UnknownRecord & {
|
|
45
|
+
"@type": string;
|
|
46
|
+
"@refObjectId": string;
|
|
47
|
+
"@version": string;
|
|
48
|
+
"@uri": string;
|
|
49
|
+
"common:shortDescription": UnknownRecord;
|
|
50
|
+
};
|
|
51
|
+
type SourceReferenceSnapshot = {
|
|
52
|
+
ref_object_id: string | null;
|
|
53
|
+
version: string | null;
|
|
54
|
+
uri: string | null;
|
|
55
|
+
short_description: string | null;
|
|
56
|
+
};
|
|
57
|
+
type SourceAdministrativeInformation = UnknownRecord & {
|
|
58
|
+
dataEntryBy: UnknownRecord;
|
|
59
|
+
publicationAndOwnership: UnknownRecord;
|
|
60
|
+
};
|
|
61
|
+
type SourceReferenceRow = {
|
|
62
|
+
path: string;
|
|
63
|
+
relation: string;
|
|
64
|
+
ref_object_id: string;
|
|
65
|
+
version: string | null;
|
|
66
|
+
short_description: string | null;
|
|
67
|
+
};
|
|
68
|
+
type ProcessSourceReferenceRow = SourceReferenceRow & {
|
|
69
|
+
dataset_type: "process";
|
|
70
|
+
dataset_id: string | null;
|
|
71
|
+
dataset_version: string | null;
|
|
72
|
+
source_file: unknown;
|
|
73
|
+
referenced_source_kind: unknown;
|
|
74
|
+
referenced_source_classification: unknown;
|
|
75
|
+
referenced_source_citation: unknown;
|
|
76
|
+
};
|
|
77
|
+
export declare function createSourceSemanticUtils({ asText, bundleClassificationPath, cloneJson, datasetIdentity, deterministicUuid, languageForText, multiLang, pathExpression, repoRelativeMaybe, textValue, }: SourceSemanticDependencies): {
|
|
78
|
+
buildBafuFallbackSourcePayload: (options?: {
|
|
79
|
+
contactReference?: unknown;
|
|
80
|
+
id?: unknown;
|
|
81
|
+
version?: string;
|
|
82
|
+
language?: unknown;
|
|
83
|
+
timestamp?: unknown;
|
|
84
|
+
}) => {
|
|
85
|
+
sourceDataSet: {
|
|
86
|
+
"@xmlns": string;
|
|
87
|
+
"@xmlns:common": string;
|
|
88
|
+
"@xmlns:xsi": string;
|
|
89
|
+
"@version": string;
|
|
90
|
+
"@xsi:schemaLocation": string;
|
|
91
|
+
sourceInformation: {
|
|
92
|
+
dataSetInformation: {
|
|
93
|
+
"common:UUID": string;
|
|
94
|
+
"common:shortName": UnknownRecord;
|
|
95
|
+
classificationInformation: {
|
|
96
|
+
"common:classification": {
|
|
97
|
+
"common:class": {
|
|
98
|
+
"@level": string;
|
|
99
|
+
"@classId": string;
|
|
100
|
+
"#text": string;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
sourceCitation: string;
|
|
105
|
+
sourceDescriptionOrComment: UnknownRecord;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
administrativeInformation: SourceAdministrativeInformation;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
buildDatabaseFallbackSourcePayload: ({ profile, contactReference, id, version, language, timestamp, }?: {
|
|
112
|
+
profile?: unknown;
|
|
113
|
+
contactReference?: unknown;
|
|
114
|
+
id?: unknown;
|
|
115
|
+
version?: string;
|
|
116
|
+
language?: unknown;
|
|
117
|
+
timestamp?: unknown;
|
|
118
|
+
}) => {
|
|
119
|
+
sourceDataSet: {
|
|
120
|
+
"@xmlns": string;
|
|
121
|
+
"@xmlns:common": string;
|
|
122
|
+
"@xmlns:xsi": string;
|
|
123
|
+
"@version": string;
|
|
124
|
+
"@xsi:schemaLocation": string;
|
|
125
|
+
sourceInformation: {
|
|
126
|
+
dataSetInformation: {
|
|
127
|
+
"common:UUID": string;
|
|
128
|
+
"common:shortName": UnknownRecord;
|
|
129
|
+
classificationInformation: {
|
|
130
|
+
"common:classification": {
|
|
131
|
+
"common:class": {
|
|
132
|
+
"@level": string;
|
|
133
|
+
"@classId": string;
|
|
134
|
+
"#text": string;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
sourceCitation: string;
|
|
139
|
+
sourceDescriptionOrComment: UnknownRecord;
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
administrativeInformation: SourceAdministrativeInformation;
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
buildBafuProcessContextSourcePayload: ({ metadata, contactReference, id, version, language, timestamp, }?: {
|
|
146
|
+
metadata?: SourceMetadata | null;
|
|
147
|
+
contactReference?: unknown;
|
|
148
|
+
id?: unknown;
|
|
149
|
+
version?: string;
|
|
150
|
+
language?: unknown;
|
|
151
|
+
timestamp?: unknown;
|
|
152
|
+
}) => {
|
|
153
|
+
sourceDataSet: {
|
|
154
|
+
"@xmlns": string;
|
|
155
|
+
"@xmlns:common": string;
|
|
156
|
+
"@xmlns:xsi": string;
|
|
157
|
+
"@version": string;
|
|
158
|
+
"@xsi:schemaLocation": string;
|
|
159
|
+
sourceInformation: {
|
|
160
|
+
dataSetInformation: {
|
|
161
|
+
"common:UUID": string;
|
|
162
|
+
"common:shortName": UnknownRecord;
|
|
163
|
+
classificationInformation: {
|
|
164
|
+
"common:classification": {
|
|
165
|
+
"common:class": {
|
|
166
|
+
"@level": string;
|
|
167
|
+
"@classId": string;
|
|
168
|
+
"#text": string;
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
sourceCitation: string;
|
|
173
|
+
sourceDescriptionOrComment: UnknownRecord;
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
administrativeInformation: {
|
|
177
|
+
dataEntryBy: UnknownRecord;
|
|
178
|
+
publicationAndOwnership: UnknownRecord;
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
} | null;
|
|
182
|
+
canonicalSourceReferenceForRelation: (relation: string) => SourceReference | null;
|
|
183
|
+
processSourceReferenceRows: (payload: unknown, sourceLookup: SourceLookup, sourceFile: unknown) => ProcessSourceReferenceRow[];
|
|
184
|
+
processOriginalSourceMetadata: (payload: unknown) => SourceMetadata | null;
|
|
185
|
+
repairTrueSourceClassification: (payload: unknown, { sourceFile, stats, repairRows, }: {
|
|
186
|
+
sourceFile: unknown;
|
|
187
|
+
stats: MutableStats;
|
|
188
|
+
repairRows: UnknownRecord[];
|
|
189
|
+
}) => void;
|
|
190
|
+
repairTrueSourceDescription: (payload: unknown, { sourceFile, stats, repairRows, }: {
|
|
191
|
+
sourceFile: unknown;
|
|
192
|
+
stats: MutableStats;
|
|
193
|
+
repairRows: UnknownRecord[];
|
|
194
|
+
}) => void;
|
|
195
|
+
repairTrueSourceIdentity: (payload: unknown, { sourceFile, stats, repairRows, }: {
|
|
196
|
+
sourceFile: unknown;
|
|
197
|
+
stats: MutableStats;
|
|
198
|
+
repairRows: UnknownRecord[];
|
|
199
|
+
}) => void;
|
|
200
|
+
rewriteCanonicalSourceReferences: (value: unknown, { datasetType, sourceFile, stats, rewriteRows, pathSegments, datasetIdentityCache, sourceLookup, }: {
|
|
201
|
+
datasetType: string;
|
|
202
|
+
sourceFile: unknown;
|
|
203
|
+
stats: MutableStats;
|
|
204
|
+
rewriteRows: UnknownRecord[];
|
|
205
|
+
pathSegments?: PathSegment[];
|
|
206
|
+
datasetIdentityCache?: DatasetIdentity | null;
|
|
207
|
+
sourceLookup?: SourceLookup | null;
|
|
208
|
+
}) => void;
|
|
209
|
+
rewriteProcessDataSourceReferences: (value: unknown, { sourceLookup, replacementSource, forceReplacementSource, replacementRelation, replacementReason, sourceFile, stats, rewriteRows, pathSegments, datasetIdentityCache, language, }: {
|
|
210
|
+
sourceLookup: SourceLookup;
|
|
211
|
+
replacementSource?: SourceSummary | null;
|
|
212
|
+
forceReplacementSource?: boolean;
|
|
213
|
+
replacementRelation?: string | null;
|
|
214
|
+
replacementReason?: string | null;
|
|
215
|
+
sourceFile: unknown;
|
|
216
|
+
stats: MutableStats;
|
|
217
|
+
rewriteRows: UnknownRecord[];
|
|
218
|
+
pathSegments?: PathSegment[];
|
|
219
|
+
datasetIdentityCache?: DatasetIdentity | null;
|
|
220
|
+
language?: unknown;
|
|
221
|
+
}) => void;
|
|
222
|
+
rewriteTrueSourceReferenceDescriptions: (value: unknown, { sourceLookup, sourceFile, stats, rewriteRows, pathSegments, datasetIdentityCache, }: {
|
|
223
|
+
sourceLookup: SourceLookup;
|
|
224
|
+
sourceFile: unknown;
|
|
225
|
+
stats: MutableStats;
|
|
226
|
+
rewriteRows: UnknownRecord[];
|
|
227
|
+
pathSegments?: PathSegment[];
|
|
228
|
+
datasetIdentityCache?: DatasetIdentity | null;
|
|
229
|
+
}) => void;
|
|
230
|
+
sourceReferenceSemanticBlockers: (processSourceReferenceRows: ProcessSourceReferenceRow[]) => {
|
|
231
|
+
code: string;
|
|
232
|
+
message: string;
|
|
233
|
+
dataset_id: string | null;
|
|
234
|
+
dataset_version: string | null;
|
|
235
|
+
ref_object_id: string;
|
|
236
|
+
referenced_source_kind: unknown;
|
|
237
|
+
referenced_source_classification: unknown;
|
|
238
|
+
source_file: unknown;
|
|
239
|
+
path: string;
|
|
240
|
+
}[];
|
|
241
|
+
sourceReferenceSnapshot: (reference: unknown) => SourceReferenceSnapshot;
|
|
242
|
+
sourceSummaryMatchesOriginalMetadata: (source: SourceSummary | null | undefined, metadata: SourceMetadata | null | undefined) => boolean;
|
|
243
|
+
sourceSemanticSummary: (payload: unknown, sourceFile: unknown) => {
|
|
244
|
+
dataset_id: string | null;
|
|
245
|
+
dataset_version: string | null;
|
|
246
|
+
source_file: unknown;
|
|
247
|
+
kind: string;
|
|
248
|
+
materialized_as_source_row: boolean;
|
|
249
|
+
short_name: string;
|
|
250
|
+
source_citation: string | null;
|
|
251
|
+
source_description: string | null;
|
|
252
|
+
classification_path: string | null;
|
|
253
|
+
};
|
|
254
|
+
};
|
|
255
|
+
export {};
|