@tiangong-lca/foundry 0.1.16 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -7
- package/docs/architecture.md +19 -5
- package/docs/foundry-task-contracts.md +27 -3
- package/docs/package-distribution-contract.md +47 -15
- package/docs/public-runtime-contract.md +77 -5
- package/docs/runtime-context-contract.md +21 -5
- package/docs/task-authorization-contract.md +15 -3
- package/docs/workspace-migration-contract.md +5 -3
- package/package-dist/assets/foundry-package-descriptor.json +351 -137
- package/package-dist/scripts/foundry-facade.d.ts +5 -0
- package/package-dist/scripts/foundry-facade.js +258 -16
- package/package-dist/scripts/foundry-runtime.d.ts +1 -1
- package/package-dist/scripts/lib/bundle-sample-utils.d.ts +4 -4
- package/package-dist/scripts/lib/bundle-source-context.d.ts +6 -4
- package/package-dist/scripts/lib/bundle-source-context.js +10 -8
- package/package-dist/scripts/lib/decision-owners/identity-preflight.js +16 -6
- package/package-dist/scripts/lib/finalize-owners/post-authoring.d.ts +2 -1
- package/package-dist/scripts/lib/finalize-owners/post-authoring.js +28 -1
- package/package-dist/scripts/lib/foundry-assessment-producer.d.ts +6 -0
- package/package-dist/scripts/lib/foundry-assessment-producer.js +167 -0
- package/package-dist/scripts/lib/foundry-command-metadata.js +6 -1
- package/package-dist/scripts/lib/foundry-decision-owners.d.ts +1 -1
- package/package-dist/scripts/lib/foundry-decision-owners.js +15 -7
- package/package-dist/scripts/lib/foundry-execution-admission.js +4 -1
- package/package-dist/scripts/lib/foundry-finalize-owners.js +64 -17
- package/package-dist/scripts/lib/foundry-identity-stage-input.d.ts +24 -0
- package/package-dist/scripts/lib/foundry-identity-stage-input.js +122 -0
- package/package-dist/scripts/lib/foundry-identity-stage-state.d.ts +17 -0
- package/package-dist/scripts/lib/foundry-identity-stage-state.js +48 -0
- package/package-dist/scripts/lib/foundry-installed-entry.d.ts +2 -0
- package/package-dist/scripts/lib/foundry-installed-entry.js +173 -0
- package/package-dist/scripts/lib/foundry-managed-adoption.d.ts +12 -0
- package/package-dist/scripts/lib/foundry-managed-adoption.js +108 -0
- package/package-dist/scripts/lib/foundry-managed-authentication.d.ts +4 -0
- package/package-dist/scripts/lib/foundry-managed-authentication.js +28 -0
- package/package-dist/scripts/lib/foundry-managed-host.js +14 -2
- package/package-dist/scripts/lib/foundry-migration-transfer-io.d.ts +2 -0
- package/package-dist/scripts/lib/foundry-migration-transfer-io.js +27 -3
- package/package-dist/scripts/lib/foundry-operation-result.d.ts +1 -1
- package/package-dist/scripts/lib/foundry-operation-result.js +1 -0
- package/package-dist/scripts/lib/foundry-package-contract.d.ts +4 -4
- package/package-dist/scripts/lib/foundry-package-contract.js +10 -2
- package/package-dist/scripts/lib/foundry-preparation-cli-validation.d.ts +22 -0
- package/package-dist/scripts/lib/foundry-preparation-cli-validation.js +213 -0
- package/package-dist/scripts/lib/foundry-quality-review-context.d.ts +3 -0
- package/package-dist/scripts/lib/foundry-quality-review-context.js +18 -0
- package/package-dist/scripts/lib/foundry-quality-review-input.d.ts +48 -0
- package/package-dist/scripts/lib/foundry-quality-review-input.js +284 -0
- package/package-dist/scripts/lib/foundry-quality-review-lineage.d.ts +13 -0
- package/package-dist/scripts/lib/foundry-quality-review-lineage.js +123 -0
- package/package-dist/scripts/lib/foundry-quality-review.d.ts +112 -0
- package/package-dist/scripts/lib/foundry-quality-review.js +487 -0
- package/package-dist/scripts/lib/foundry-runtime-identity.js +3 -1
- package/package-dist/scripts/lib/foundry-runtime-qualification.js +2 -2
- package/package-dist/scripts/lib/foundry-runtime-utils.js +1 -1
- package/package-dist/scripts/lib/foundry-task-authorization.d.ts +2 -1
- package/package-dist/scripts/lib/foundry-task-authorization.js +32 -11
- package/package-dist/scripts/lib/foundry-task-registration.js +4 -5
- package/package-dist/scripts/lib/foundry-task-runtime-adoption-write.d.ts +28 -0
- package/package-dist/scripts/lib/foundry-task-runtime-adoption-write.js +250 -0
- package/package-dist/scripts/lib/foundry-task-runtime-adoption.d.ts +60 -0
- package/package-dist/scripts/lib/foundry-task-runtime-adoption.js +549 -0
- package/package-dist/scripts/lib/foundry-task-store.d.ts +4 -1
- package/package-dist/scripts/lib/foundry-task-store.js +113 -4
- package/package-dist/scripts/lib/foundry-task-types.d.ts +2 -1
- package/package-dist/scripts/lib/foundry-validation-reference-context.d.ts +8 -0
- package/package-dist/scripts/lib/foundry-validation-reference-context.js +115 -0
- package/package-dist/scripts/lib/foundry-workflow-assessment.d.ts +1 -0
- package/package-dist/scripts/lib/foundry-workflow-assessment.js +149 -18
- package/package-dist/scripts/lib/foundry-workflow-authorization.js +17 -4
- package/package-dist/scripts/lib/foundry-workflow-child-failure.d.ts +44 -0
- package/package-dist/scripts/lib/foundry-workflow-child-failure.js +439 -0
- package/package-dist/scripts/lib/foundry-workflow-context.js +37 -8
- package/package-dist/scripts/lib/foundry-workflow-finalize.js +37 -0
- package/package-dist/scripts/lib/foundry-workflow-identity-recovery.d.ts +6 -0
- package/package-dist/scripts/lib/foundry-workflow-identity-recovery.js +450 -0
- package/package-dist/scripts/lib/foundry-workflow-identity-stage.d.ts +9 -0
- package/package-dist/scripts/lib/foundry-workflow-identity-stage.js +676 -0
- package/package-dist/scripts/lib/foundry-workflow-identity.js +10 -1
- package/package-dist/scripts/lib/foundry-workflow-io.d.ts +7 -1
- package/package-dist/scripts/lib/foundry-workflow-io.js +79 -13
- package/package-dist/scripts/lib/foundry-workflow-semantic.js +27 -13
- package/package-dist/scripts/lib/foundry-workflow-state.d.ts +4 -0
- package/package-dist/scripts/lib/foundry-workflow-state.js +175 -22
- package/package-dist/scripts/lib/identity-preflight-artifacts.d.ts +4 -7
- package/package-dist/scripts/lib/identity-preflight-artifacts.js +18 -5
- package/package-dist/scripts/lib/identity-preflight-proof.d.ts +5 -0
- package/package-dist/scripts/lib/identity-preflight-proof.js +73 -1
- package/package-dist/scripts/lib/identity-preflight-recovery-proof.d.ts +78 -0
- package/package-dist/scripts/lib/identity-preflight-recovery-proof.js +415 -0
- package/package-dist/scripts/lib/import-curation/curation-cleanup.d.ts +9 -1
- package/package-dist/scripts/lib/import-curation/curation-cleanup.js +39 -2
- package/package-dist/scripts/lib/import-curation/curation-gate.d.ts +6 -1
- package/package-dist/scripts/lib/import-curation/curation-gate.js +48 -2
- package/package-dist/scripts/lib/import-curation/internal/context-inputs.js +1 -1
- package/package-dist/scripts/lib/import-curation/internal/workflow-identity-preflight.js +11 -2
- package/package-dist/scripts/lib/import-curation/internal/workflow-reference-closure.js +4 -1
- package/package-dist/scripts/lib/tidas-adapter.js +38 -15
- package/package-dist/scripts/lib/tidas-process-flow-context.d.ts +12 -0
- package/package-dist/scripts/lib/tidas-process-flow-context.js +96 -0
- package/package-dist/scripts/package-entry.js +2 -3
- package/package-dist/scripts/public-api.d.ts +5 -0
- package/package-dist/scripts/public-api.js +2 -0
- package/package-dist/scripts/runtime-entry.d.ts +2 -0
- package/package-dist/scripts/runtime-entry.js +42 -15
- package/package.json +6 -2
- package/specs/schemas/foundry-identity-stage-input.schema.json +47 -0
- package/specs/schemas/foundry-managed-adoption.schema.json +40 -0
- package/specs/schemas/foundry-managed-runtime.schema.json +1 -1
- package/specs/schemas/foundry-operation-result.schema.json +1 -0
- package/specs/schemas/foundry-package-descriptor.schema.json +6 -2
- package/specs/schemas/foundry-quality-review-draft.schema.json +271 -0
- package/specs/schemas/foundry-quality-review-input.schema.json +271 -0
- package/specs/schemas/runtime-qualification.schema.json +1 -1
|
@@ -2,6 +2,7 @@ import path from "node:path";
|
|
|
2
2
|
import { datasetTypeFromOptions, datasetTypePlural } from "./internal/dataset-types.js";
|
|
3
3
|
import { datasetIdentity } from "./internal/dataset-payload.js";
|
|
4
4
|
import { sha256Json } from "./internal/hash-utils.js";
|
|
5
|
+
import { projectFoundryValidationReferences } from "../foundry-validation-reference-context.js";
|
|
5
6
|
import { annualSupplyFieldPath, applyDeterministicSourceExchangeCompletenessProofs, buildSourceRowsByIdentity, ensureFoundryTraceNamespaces, externalizeImportTraceMetadata, normalizeAnnualSupplyEvidence, normalizeDateTimeMetadata, sanitizeFoundryTraceEvidenceLocators, } from "./internal/prewrite-cleanup.js";
|
|
6
7
|
import { fileExists, jsonLines, nowIso, readRows, repoRelativePath, resolveRepoPath, writeJson, writeText, } from "./internal/runtime-io.js";
|
|
7
8
|
function dateTimeBlockersFromError(error) {
|
|
@@ -13,13 +14,15 @@ function dateTimeBlockersFromError(error) {
|
|
|
13
14
|
}
|
|
14
15
|
return record.blockers.filter((blocker) => Boolean(blocker) && typeof blocker === "object" && !Array.isArray(blocker));
|
|
15
16
|
}
|
|
16
|
-
export function runDatasetCurationCleanup({ repoRoot, options = {}, io, } = {}) {
|
|
17
|
+
export function runDatasetCurationCleanup({ repoRoot, options = {}, processValidationReferences, io, } = {}) {
|
|
17
18
|
const readInputRows = io?.readRows ?? readRows;
|
|
18
19
|
const hasFile = io?.fileExists ?? fileExists;
|
|
19
20
|
const writeReport = io?.writeJson ?? writeJson;
|
|
20
21
|
const writeRows = io?.writeText ?? writeText;
|
|
21
22
|
const capturedAt = io?.nowIso ?? nowIso;
|
|
22
23
|
const datasetType = datasetTypeFromOptions(options);
|
|
24
|
+
if (processValidationReferences && datasetType !== "process")
|
|
25
|
+
throw new Error("Selected Flow validation evidence belongs only to Process cleanup.");
|
|
23
26
|
if (options.help) {
|
|
24
27
|
return {
|
|
25
28
|
schema_version: 2,
|
|
@@ -53,6 +56,18 @@ export function runDatasetCurationCleanup({ repoRoot, options = {}, io, } = {})
|
|
|
53
56
|
const sourceRowsByKey = sourceRows.length > 0 ? buildSourceRowsByIdentity(sourceRows) : null;
|
|
54
57
|
const rows = readInputRows(rowsFile);
|
|
55
58
|
const cleanedRows = rows.map((row) => JSON.parse(JSON.stringify(row)));
|
|
59
|
+
// Supplemental validation evidence is not candidate metadata. In particular, a
|
|
60
|
+
// complete referenced Flow must retain its exact body across recursive cleanup.
|
|
61
|
+
const validationContexts = cleanedRows.map((value) => {
|
|
62
|
+
if (datasetType !== "process" || !value || typeof value !== "object" || Array.isArray(value))
|
|
63
|
+
return null;
|
|
64
|
+
const row = value;
|
|
65
|
+
if (!Object.hasOwn(row, "semantic_context"))
|
|
66
|
+
return null;
|
|
67
|
+
const context = { value: row.semantic_context };
|
|
68
|
+
delete row.semantic_context;
|
|
69
|
+
return context;
|
|
70
|
+
});
|
|
56
71
|
let normalizedDateTimeValues = 0;
|
|
57
72
|
const invalidDateTimeBlockers = [];
|
|
58
73
|
cleanedRows.forEach((cleaned, rowIndex) => {
|
|
@@ -167,6 +182,10 @@ export function runDatasetCurationCleanup({ repoRoot, options = {}, io, } = {})
|
|
|
167
182
|
redactedFoundryTraceEvidenceLocators += sanitizeFoundryTraceEvidenceLocators(cleaned);
|
|
168
183
|
addedFoundryTraceNamespaces += ensureFoundryTraceNamespaces(cleaned);
|
|
169
184
|
});
|
|
185
|
+
validationContexts.forEach((context, index) => {
|
|
186
|
+
if (context)
|
|
187
|
+
cleanedRows[index].semantic_context = context.value;
|
|
188
|
+
});
|
|
170
189
|
// Bound only after every other cleanup transform has run, so the output hash describes the
|
|
171
190
|
// exact unwrapped payload the caller will write, with no row metadata mixed in.
|
|
172
191
|
const annualSupplyEvidenceGaps = pendingAnnualSupplyGaps.map((pending) => {
|
|
@@ -184,7 +203,12 @@ export function runDatasetCurationCleanup({ repoRoot, options = {}, io, } = {})
|
|
|
184
203
|
output_payload_sha256: sha256Json(outputIdentity.payload),
|
|
185
204
|
};
|
|
186
205
|
});
|
|
187
|
-
|
|
206
|
+
// Project only after cleanup, so selected reference bodies never enter its
|
|
207
|
+
// recursive candidate transforms. All later owners use this same final file.
|
|
208
|
+
const finalRows = processValidationReferences
|
|
209
|
+
? projectFoundryValidationReferences(cleanedRows, processValidationReferences.rows)
|
|
210
|
+
: cleanedRows;
|
|
211
|
+
writeRows(outFile, jsonLines(finalRows));
|
|
188
212
|
const report = {
|
|
189
213
|
schema_version: 2,
|
|
190
214
|
generated_at_utc: capturedAt(),
|
|
@@ -194,6 +218,19 @@ export function runDatasetCurationCleanup({ repoRoot, options = {}, io, } = {})
|
|
|
194
218
|
remote_write_mode: "read-only",
|
|
195
219
|
rows_file: repoRelativePath(root, rowsFile),
|
|
196
220
|
cleaned_rows_file: repoRelativePath(root, outFile),
|
|
221
|
+
...(processValidationReferences
|
|
222
|
+
? {
|
|
223
|
+
process_validation_references: {
|
|
224
|
+
files: processValidationReferences.files,
|
|
225
|
+
rows: finalRows.map((row, rowIndex) => ({
|
|
226
|
+
row_index: rowIndex,
|
|
227
|
+
input_payload_sha256: sha256Json(datasetIdentity(cleanedRows[rowIndex], rowIndex, datasetType).payload),
|
|
228
|
+
output_payload_sha256: sha256Json(datasetIdentity(row, rowIndex, datasetType).payload),
|
|
229
|
+
flow_documents_sha256: sha256Json(row.semantic_context.flow_documents),
|
|
230
|
+
})),
|
|
231
|
+
},
|
|
232
|
+
}
|
|
233
|
+
: {}),
|
|
197
234
|
counts: {
|
|
198
235
|
rows: cleanedRows.length,
|
|
199
236
|
blockers: 0,
|
|
@@ -42,6 +42,11 @@ interface CurationGateArgs {
|
|
|
42
42
|
options?: CurationGateOptions;
|
|
43
43
|
routeAction?: (action: JsonRecord, datasetType: string, payload: unknown) => JsonRecord;
|
|
44
44
|
requireIdentityPreflight?: boolean;
|
|
45
|
+
cliValidation?: {
|
|
46
|
+
report: string;
|
|
47
|
+
exit: number;
|
|
48
|
+
input?: import("../foundry-runtime-context.ts").FoundryInputFact;
|
|
49
|
+
};
|
|
45
50
|
}
|
|
46
|
-
export declare function runDatasetCurationGate({ repoRoot, options, routeAction, requireIdentityPreflight, }?: CurationGateArgs): JsonRecord;
|
|
51
|
+
export declare function runDatasetCurationGate({ repoRoot, options, routeAction, requireIdentityPreflight, cliValidation, }?: CurationGateArgs): JsonRecord;
|
|
47
52
|
export {};
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
2
|
import path from "node:path";
|
|
3
|
+
import { reviewedFoundryQualityFindings } from "../foundry-quality-review.js";
|
|
4
|
+
import { readPreparationCliEvidence, preparationValidationActions, preparationValidationEvidence, } from "../foundry-preparation-cli-validation.js";
|
|
3
5
|
import * as curationGateWorkflow from "./internal/curation-gate-workflow.js";
|
|
4
6
|
const { authoringQueueRowsForIdentity, buildIdentityPreflightAuthoringContext, buildQueueAuthoringContext, classificationQueueActionItem, classificationQueueRowStillNeedsAuthoring, collectBundledSchemaContextFiles, collectContextDirFiles, collectExplicitContextFiles, collectProfileSemanticActionItems, contextFileDetails, datasetIdentity, datasetTypeFromOptions, datasetTypePlural, ensureArray, entityIdFromFinding, fileExists, fullContextAiCompletionRequirement, fullContextGateItems, identityDecisionApplyContextDecisionsForIdentity, identityDecisionApplyReportOptionValues, identityKey, identityPreflightAuthoringActionItems, identityPreflightGateItems, jsonLines, locationQueueActionItem, locationQueueRowStillNeedsAuthoring, mapRowsByIdentity, nowIso, profileFor, qaFindingCode, qaFindingCurationAction, readAuthoringQueueContext, readCanonicalSupportRewriteContext, readClassificationDecisionApplyContext, readCleanupTransformContext, readContextFiles, readCurationQueueContext, readIdentityDecisionApplyContexts, readIdentityPreflightContext, readIdentityReferenceRewriteContext, readJson, readJsonArtifactsIfOption, readJsonIfOption, readQaFindings, readRows, readSourceContactRewriteContext, readText, readUnresolvedExchangeExternalizationContext, repoRelativePath, resolveRepoPath, sanitizeFileName, schemaIssueCurationAction, sha256Text, unresolvedExchangeExternalizationRowsForIdentity, writeJson, writeText, } = curationGateWorkflow;
|
|
5
7
|
function asJsonRecord(value) {
|
|
6
8
|
return value;
|
|
7
9
|
}
|
|
8
|
-
export function runDatasetCurationGate({ repoRoot, options = {}, routeAction, requireIdentityPreflight = false, } = {}) {
|
|
10
|
+
export function runDatasetCurationGate({ repoRoot, options = {}, routeAction, requireIdentityPreflight = false, cliValidation, } = {}) {
|
|
9
11
|
const datasetType = datasetTypeFromOptions(options);
|
|
10
12
|
if (options.help) {
|
|
11
13
|
return {
|
|
@@ -46,9 +48,17 @@ export function runDatasetCurationGate({ repoRoot, options = {}, routeAction, re
|
|
|
46
48
|
throw new Error("--qa-report is required and must point to a QA report JSON.");
|
|
47
49
|
}
|
|
48
50
|
const rows = readRows(rowsFile);
|
|
51
|
+
const cliEvidence = cliValidation
|
|
52
|
+
? readPreparationCliEvidence(cliValidation, rows, rowsFile)
|
|
53
|
+
: null;
|
|
54
|
+
const cliValidationRows = cliEvidence?.rows;
|
|
55
|
+
const cliValidationReportSha256 = cliEvidence?.sha256;
|
|
49
56
|
const schemaReport = readJson(schemaReportPath);
|
|
50
57
|
const qaReport = readJson(qaReportPath);
|
|
51
58
|
const qaFindings = readQaFindings(root, qaReport, qaReportPath, datasetType);
|
|
59
|
+
const qualityReviews = options.qualityReview && datasetType === "process"
|
|
60
|
+
? reviewedFoundryQualityFindings(options.qualityReview, rowsFile, qaReport, qaFindings, options.cleanupReport)
|
|
61
|
+
: [];
|
|
52
62
|
const profileContext = readContextFiles(root, profile.docs.map((filePath) => [
|
|
53
63
|
"profile",
|
|
54
64
|
filePath,
|
|
@@ -168,7 +178,11 @@ export function runDatasetCurationGate({ repoRoot, options = {}, routeAction, re
|
|
|
168
178
|
const schemaIssues = ensureArray(schemaRow?.issues);
|
|
169
179
|
const entityQaFindings = qaFindingsById.get(identity.id) ?? [];
|
|
170
180
|
const waivedFindings = entityQaFindings.filter((finding) => waivedQaCodes.has(qaFindingCode(finding)));
|
|
171
|
-
const
|
|
181
|
+
const reviewedFindings = qualityReviews.filter((review) => review.row_index === index &&
|
|
182
|
+
review.id === identity.id &&
|
|
183
|
+
review.version === identity.version);
|
|
184
|
+
const actionableQaFindings = entityQaFindings.filter((finding) => !waivedQaCodes.has(qaFindingCode(finding)) &&
|
|
185
|
+
!reviewedFindings.some((review) => review.finding === finding));
|
|
172
186
|
const schemaActionItems = schemaIssues.map((issue) => schemaIssueCurationAction(issue));
|
|
173
187
|
const qaActionItems = actionableQaFindings.map((finding) => qaFindingCurationAction(finding, datasetType));
|
|
174
188
|
const semanticActionItems = collectProfileSemanticActionItems({
|
|
@@ -181,6 +195,12 @@ export function runDatasetCurationGate({ repoRoot, options = {}, routeAction, re
|
|
|
181
195
|
const locationQueueActionItems = unresolvedLocationAuthoringRows.map(locationQueueActionItem);
|
|
182
196
|
const actionItems = [
|
|
183
197
|
...schemaActionItems.filter((item) => item.ai_required),
|
|
198
|
+
...(cliValidationRows
|
|
199
|
+
? preparationValidationActions(cliValidationRows[index], {
|
|
200
|
+
report_file: cliValidation.report,
|
|
201
|
+
report_sha256: cliValidationReportSha256,
|
|
202
|
+
})
|
|
203
|
+
: []),
|
|
184
204
|
...qaActionItems,
|
|
185
205
|
...identityPreflightActionItems,
|
|
186
206
|
...classificationQueueActionItems,
|
|
@@ -288,7 +308,13 @@ export function runDatasetCurationGate({ repoRoot, options = {}, routeAction, re
|
|
|
288
308
|
},
|
|
289
309
|
missing_context_files: [...profileContext.missing, ...contractContext.missing],
|
|
290
310
|
schema_issues: schemaIssues,
|
|
311
|
+
...(cliValidationRows
|
|
312
|
+
? {
|
|
313
|
+
cli_validation: preparationValidationEvidence(cliValidationRows[index], cliValidation.report, cliValidationReportSha256),
|
|
314
|
+
}
|
|
315
|
+
: {}),
|
|
291
316
|
qa_findings: entityQaFindings,
|
|
317
|
+
...(reviewedFindings.length ? { reviewed_findings: reviewedFindings } : {}),
|
|
292
318
|
waived_findings: waivedFindings.map((finding) => ({
|
|
293
319
|
...finding,
|
|
294
320
|
waiver_basis: profile.waiverReasons?.[qaFindingCode(finding)] ?? null,
|
|
@@ -372,6 +398,12 @@ export function runDatasetCurationGate({ repoRoot, options = {}, routeAction, re
|
|
|
372
398
|
qa_finding_count: entityQaFindings.length,
|
|
373
399
|
...(datasetType === "process" ? { process_qa_finding_count: entityQaFindings.length } : {}),
|
|
374
400
|
waived_finding_count: waivedFindings.length,
|
|
401
|
+
...(reviewedFindings.length
|
|
402
|
+
? {
|
|
403
|
+
reviewed_finding_count: reviewedFindings.length,
|
|
404
|
+
quality_review_receipt_sha256: reviewedFindings[0].receipt_sha256,
|
|
405
|
+
}
|
|
406
|
+
: {}),
|
|
375
407
|
action_item_count: actionItems.length,
|
|
376
408
|
identity_action_item_count: identityPreflightActionItems.length,
|
|
377
409
|
identity_decision_apply_count: identityDecisionApplyRows.length,
|
|
@@ -408,9 +440,23 @@ export function runDatasetCurationGate({ repoRoot, options = {}, routeAction, re
|
|
|
408
440
|
dataset_type: datasetType,
|
|
409
441
|
rows_file: repoRelativePath(root, rowsFile),
|
|
410
442
|
schema_report: repoRelativePath(root, schemaReportPath),
|
|
443
|
+
...(cliValidation
|
|
444
|
+
? {
|
|
445
|
+
cli_validation_report: repoRelativePath(root, cliValidation.report),
|
|
446
|
+
cli_validation_report_sha256: cliValidationReportSha256,
|
|
447
|
+
}
|
|
448
|
+
: {}),
|
|
411
449
|
qa_report: repoRelativePath(root, qaReportPath),
|
|
450
|
+
...(qualityReviews.length
|
|
451
|
+
? { quality_review_receipt_sha256: qualityReviews[0].receipt_sha256 }
|
|
452
|
+
: {}),
|
|
412
453
|
policy: {
|
|
413
454
|
cli_qa_role: "deterministic_qa_report_only",
|
|
455
|
+
...(cliValidation
|
|
456
|
+
? {
|
|
457
|
+
cli_validation_role: "Current local save-equivalent schema, authoring, content, multilingual and allocation/reference profile evidence; final authenticated reference eligibility remains separate.",
|
|
458
|
+
}
|
|
459
|
+
: {}),
|
|
414
460
|
foundry_role: "profile policy, AI authoring package, deterministic cleanup, waiver, final prewrite decision",
|
|
415
461
|
waived_qa_codes: [...waivedQaCodes],
|
|
416
462
|
required_multilang_english_before_write: true,
|
|
@@ -6,7 +6,7 @@ import { asText, directoryExists, ensureArray, fileExists, readJson, readText, r
|
|
|
6
6
|
function asJsonRecord(value) {
|
|
7
7
|
return value && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
8
8
|
}
|
|
9
|
-
export const tidasSchemaSearchRoots = ["@tiangong-lca/cli@0.1.
|
|
9
|
+
export const tidasSchemaSearchRoots = ["@tiangong-lca/cli@0.1.28/assets/tidas-schemas"];
|
|
10
10
|
export function tidasSchemaPath(repoRoot, schemaFile) {
|
|
11
11
|
void repoRoot;
|
|
12
12
|
const candidate = path.join(resolveInstalledTiangongLcaCliPackage().schemaDir, schemaFile);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { validateIdentityPreflightEvidence } from "../../identity-preflight-proof.js";
|
|
3
|
+
import { validateIdentityPreflightRecoveryEvidence } from "../../identity-preflight-recovery-proof.js";
|
|
3
4
|
import { readJsonLinesIfExists, resolveArtifactPath } from "./artifact-inputs.js";
|
|
4
5
|
import { dataSetInformation, datasetRoot, identityFreshnessIdentityKey, } from "./dataset-payload.js";
|
|
5
6
|
import { sha256Json } from "./hash-utils.js";
|
|
@@ -51,7 +52,9 @@ export function readIdentityPreflightIndexRow(repoRoot, indexPath, row) {
|
|
|
51
52
|
const resultPath = identityPreflightResultFile(repoRoot, indexPath, row);
|
|
52
53
|
const result = resultPath ? readJsonIfExists(resultPath) : null;
|
|
53
54
|
const resultText = resultPath && fileExists(resultPath) ? readText(resultPath) : null;
|
|
54
|
-
const executionManifestPath = resolveArtifactPath(repoRoot, asText(typedRow.
|
|
55
|
+
const executionManifestPath = resolveArtifactPath(repoRoot, asText(typedRow.recovery_manifest_file ??
|
|
56
|
+
typedRow.execution_manifest_file ??
|
|
57
|
+
typedRow.executionManifestFile), baseDir) ??
|
|
55
58
|
(resultPath
|
|
56
59
|
? path.join(path.dirname(resultPath), "foundry-identity-preflight-execution.json")
|
|
57
60
|
: null);
|
|
@@ -61,7 +64,13 @@ export function readIdentityPreflightIndexRow(repoRoot, indexPath, row) {
|
|
|
61
64
|
const targetSha256 = typedRow.target_sha256 ??
|
|
62
65
|
typedRow.targetSha256 ??
|
|
63
66
|
(request ? sha256Json(request.target ?? null) : null);
|
|
64
|
-
const
|
|
67
|
+
const validateEvidence = typedRow.recovery_manifest_file
|
|
68
|
+
? validateIdentityPreflightRecoveryEvidence
|
|
69
|
+
: validateIdentityPreflightEvidence;
|
|
70
|
+
const executionEvidence = validateEvidence(executionManifest, {
|
|
71
|
+
...(typedRow.recovery_manifest_file
|
|
72
|
+
? { expectedRetainedCliContentSha256: asText(typedRow.recovery_cli_content_sha256) }
|
|
73
|
+
: {}),
|
|
65
74
|
requestText,
|
|
66
75
|
reportText: resultText,
|
|
67
76
|
datasetType,
|
|
@@ -444,7 +444,10 @@ export function buildReferenceClosureBlockers({ repoRoot, rows, datasetType, rem
|
|
|
444
444
|
const blockers = [];
|
|
445
445
|
const seen = new Set();
|
|
446
446
|
rows.forEach((row, rowIndex) => {
|
|
447
|
-
|
|
447
|
+
// Supplemental validation documents stay bound to the row envelope, but
|
|
448
|
+
// business closure follows the same payload used by the write candidate.
|
|
449
|
+
const payload = datasetIdentity(row, rowIndex, datasetType).payload;
|
|
450
|
+
for (const ref of collectDatasetReferences(payload)) {
|
|
448
451
|
if (!ref.table) {
|
|
449
452
|
const key = `unsupported\u0000${rowIndex}\u0000${ref.id}\u0000${ref.path}`;
|
|
450
453
|
if (seen.has(key))
|
|
@@ -3,6 +3,7 @@ import { createHash, randomUUID } from "node:crypto";
|
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import process from "node:process";
|
|
6
|
+
import { assertTidasProcessCoverage, augmentTidasProcessFlowContext, } from "./tidas-process-flow-context.js";
|
|
6
7
|
export const TIDAS_OPERATION_REPORT_SCHEMA = "tidas.operation-report.v1";
|
|
7
8
|
export const TIDAS_IMPORT_REPORT_SCHEMA = "tidas.import-execution-report.v1";
|
|
8
9
|
export const TIDAS_VALIDATION_SUMMARY_SCHEMA = "tidas.validation-summary.v1";
|
|
@@ -361,6 +362,7 @@ export function runTidasRowsValidation({ repoRoot, options = {}, environment = p
|
|
|
361
362
|
if (!options.outDir)
|
|
362
363
|
throw new Error("--out-dir is required.");
|
|
363
364
|
const rows = readRows(rowsFile);
|
|
365
|
+
const { documents, supplementalOwners } = augmentTidasProcessFlowContext(rows, payloadForRow, identityForPayload);
|
|
364
366
|
fs.mkdirSync(path.dirname(outDir), { recursive: true });
|
|
365
367
|
const staging = path.join(path.dirname(outDir), `.tidas-validate-stage-${randomUUID()}`);
|
|
366
368
|
// Keep staging beside the output for atomic rename; Windows mkdtemp rejects deep prefixes.
|
|
@@ -368,7 +370,7 @@ export function runTidasRowsValidation({ repoRoot, options = {}, environment = p
|
|
|
368
370
|
try {
|
|
369
371
|
const inputRoot = path.join(staging, "input");
|
|
370
372
|
const manifest = [];
|
|
371
|
-
for (const [ordinal, row] of
|
|
373
|
+
for (const [ordinal, row] of documents.entries()) {
|
|
372
374
|
const payload = payloadForRow(row);
|
|
373
375
|
const { rootKey, category, informationKey } = documentCategory(payload);
|
|
374
376
|
const identity = identityForPayload(payload, rootKey, informationKey);
|
|
@@ -416,6 +418,8 @@ export function runTidasRowsValidation({ repoRoot, options = {}, environment = p
|
|
|
416
418
|
finalEvent.completed !== true) {
|
|
417
419
|
throw new Error("tidas_validation_batch_final_invalid");
|
|
418
420
|
}
|
|
421
|
+
if (record(finalEvent.summary)?.document_count !== documents.length)
|
|
422
|
+
throw new Error("tidas_validation_document_count_invalid");
|
|
419
423
|
const finalFingerprints = record(finalEvent.fingerprints);
|
|
420
424
|
if (finalFingerprints?.asset_fingerprint !== operation.validation_describe.asset_fingerprint) {
|
|
421
425
|
throw new Error("tidas_validation_asset_fingerprint_mismatch");
|
|
@@ -430,33 +434,48 @@ export function runTidasRowsValidation({ repoRoot, options = {}, environment = p
|
|
|
430
434
|
if (event.type !== "issue")
|
|
431
435
|
continue;
|
|
432
436
|
const ordinal = Number(event.document_ordinal);
|
|
433
|
-
if (!Number.isSafeInteger(ordinal) || ordinal < 0 || ordinal >=
|
|
437
|
+
if (!Number.isSafeInteger(ordinal) || ordinal < 0 || ordinal >= documents.length)
|
|
434
438
|
throw new Error("tidas_validation_issue_ordinal_invalid");
|
|
435
|
-
|
|
436
|
-
issuesByOrdinal.set(ordinal, []);
|
|
439
|
+
const owners = supplementalOwners.get(ordinal) ?? new Map([[ordinal, ""]]);
|
|
437
440
|
const nativeIssue = record(event.issue);
|
|
438
441
|
if (!nativeIssue)
|
|
439
442
|
throw new Error("tidas_validation_issue_invalid");
|
|
440
443
|
const location = typeof nativeIssue.location === "string" ? nativeIssue.location : null;
|
|
441
|
-
const payload = payloadForRow(
|
|
442
|
-
const wrapper = payload ===
|
|
444
|
+
const payload = payloadForRow(documents[ordinal]);
|
|
445
|
+
const wrapper = payload === documents[ordinal]
|
|
443
446
|
? null
|
|
444
|
-
: Object.entries(
|
|
447
|
+
: Object.entries(documents[ordinal]).find(([, value]) => value === payload)?.[0];
|
|
445
448
|
const pointer = location === null
|
|
446
449
|
? null
|
|
447
450
|
: location === "" || location.startsWith("/")
|
|
448
451
|
? location
|
|
449
452
|
: `/${location}`;
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
453
|
+
for (const [owner, contextPointer] of owners) {
|
|
454
|
+
if (!issuesByOrdinal.has(owner))
|
|
455
|
+
issuesByOrdinal.set(owner, []);
|
|
456
|
+
issuesByOrdinal.get(owner).push({
|
|
457
|
+
...nativeIssue,
|
|
458
|
+
code: nativeIssue.code ?? nativeIssue.issue_code,
|
|
459
|
+
path: nativeIssue.path ??
|
|
460
|
+
(pointer === null
|
|
461
|
+
? null
|
|
462
|
+
: `${contextPointer}${wrapper ? `/${wrapper}` : ""}${pointer}`),
|
|
463
|
+
...(supplementalOwners.has(ordinal)
|
|
464
|
+
? { supplemental_document_key: event.document_key, supplemental_context: true }
|
|
465
|
+
: {}),
|
|
466
|
+
});
|
|
467
|
+
}
|
|
456
468
|
}
|
|
457
469
|
const invalidOrdinals = new Set(events
|
|
458
470
|
.filter((event) => event.type === "issue" && record(event.issue)?.severity === "error")
|
|
459
|
-
.
|
|
471
|
+
.flatMap((event) => [
|
|
472
|
+
...(supplementalOwners.get(Number(event.document_ordinal))?.keys() ?? [
|
|
473
|
+
Number(event.document_ordinal),
|
|
474
|
+
]),
|
|
475
|
+
]));
|
|
476
|
+
const processCount = rows.filter((row) => record(payloadForRow(row).processDataSet)).length;
|
|
477
|
+
const coverage = record(record(finalEvent.summary)?.semantic_coverage);
|
|
478
|
+
assertTidasProcessCoverage(coverage, operation.binary_version, processCount, rows.filter((row, index) => record(payloadForRow(row).processDataSet) && invalidOrdinals.has(index)).length);
|
|
460
479
|
const validRows = rows.filter((_, ordinal) => !invalidOrdinals.has(ordinal));
|
|
461
480
|
const invalidRows = rows.filter((_, ordinal) => invalidOrdinals.has(ordinal));
|
|
462
481
|
const reportPath = path.join(staging, "outputs", "validation-report.json");
|
|
@@ -471,7 +490,7 @@ export function runTidasRowsValidation({ repoRoot, options = {}, environment = p
|
|
|
471
490
|
dataset_type: String(options.type ?? options.datasetType ?? "auto"),
|
|
472
491
|
engine: "tidas",
|
|
473
492
|
binary_version: operation.binary_version,
|
|
474
|
-
rows: manifest.map((entry, ordinal) => ({
|
|
493
|
+
rows: manifest.slice(0, rows.length).map((entry, ordinal) => ({
|
|
475
494
|
index: ordinal,
|
|
476
495
|
id: entry.identity.dataset_id,
|
|
477
496
|
version: entry.identity.dataset_version,
|
|
@@ -493,6 +512,10 @@ export function runTidasRowsValidation({ repoRoot, options = {}, environment = p
|
|
|
493
512
|
profile: finalEvent.profile,
|
|
494
513
|
logical_issue_stream_sha256: finalEvent.logical_issue_stream_sha256,
|
|
495
514
|
asset_fingerprint: finalFingerprints?.asset_fingerprint ?? null,
|
|
515
|
+
augmented_document_count: documents.length,
|
|
516
|
+
supplemental_document_count: documents.length - rows.length,
|
|
517
|
+
augmented_manifest_sha256: sha256(fs.readFileSync(manifestPath)),
|
|
518
|
+
semantic_coverage: record(finalEvent.summary)?.semantic_coverage ?? null,
|
|
496
519
|
validation_describe_schema: TIDAS_VALIDATION_DESCRIBE_SCHEMA,
|
|
497
520
|
},
|
|
498
521
|
files: {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type Json = Record<string, unknown>;
|
|
2
|
+
/** Preserve explicit owner-row Flow evidence in one native manifest, rejecting exact identity conflicts. */
|
|
3
|
+
export declare function augmentTidasProcessFlowContext(rows: Json[], payloadForRow: (row: Json) => Json, identityForPayload: (payload: Json, root: string, information: string) => {
|
|
4
|
+
id: string | null;
|
|
5
|
+
version: string | null;
|
|
6
|
+
}): {
|
|
7
|
+
documents: Json[];
|
|
8
|
+
supplementalOwners: Map<number, Map<number, string>>;
|
|
9
|
+
};
|
|
10
|
+
/** Admit the native profile's transport coverage without deciding scientific validity. */
|
|
11
|
+
export declare function assertTidasProcessCoverage(coverage: Json | null, binaryVersion: string, processCount: number, invalidProcessCount: number): void;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { sha256Json } from "./identity-preflight-proof.js";
|
|
2
|
+
function record(value) {
|
|
3
|
+
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
4
|
+
}
|
|
5
|
+
/** Preserve explicit owner-row Flow evidence in one native manifest, rejecting exact identity conflicts. */
|
|
6
|
+
export function augmentTidasProcessFlowContext(rows, payloadForRow, identityForPayload) {
|
|
7
|
+
const documents = [...rows];
|
|
8
|
+
const supplementalOwners = new Map();
|
|
9
|
+
const exactFlows = new Map();
|
|
10
|
+
for (const [ordinal, row] of rows.entries()) {
|
|
11
|
+
const flow = payloadForRow(row);
|
|
12
|
+
if (!record(flow.flowDataSet))
|
|
13
|
+
continue;
|
|
14
|
+
const identity = identityForPayload(flow, "flowDataSet", "flowInformation");
|
|
15
|
+
if (!identity.id || !identity.version)
|
|
16
|
+
continue;
|
|
17
|
+
const key = JSON.stringify([identity.id, identity.version]);
|
|
18
|
+
const hash = sha256Json(flow);
|
|
19
|
+
const prior = exactFlows.get(key);
|
|
20
|
+
if (prior && prior.hash !== hash)
|
|
21
|
+
throw new Error("tidas_flow_context_identity_conflict");
|
|
22
|
+
if (!prior)
|
|
23
|
+
exactFlows.set(key, { hash, ordinal });
|
|
24
|
+
}
|
|
25
|
+
for (const [owner, row] of rows.entries()) {
|
|
26
|
+
if (!record(payloadForRow(row).processDataSet))
|
|
27
|
+
continue;
|
|
28
|
+
const context = record(row.semantic_context);
|
|
29
|
+
const flows = context?.flow_documents;
|
|
30
|
+
if (!Array.isArray(flows))
|
|
31
|
+
continue;
|
|
32
|
+
for (const [flowIndex, raw] of flows.entries()) {
|
|
33
|
+
const flow = record(raw);
|
|
34
|
+
if (!flow || !record(flow.flowDataSet))
|
|
35
|
+
throw new Error("tidas_flow_context_document_invalid");
|
|
36
|
+
const identity = identityForPayload(flow, "flowDataSet", "flowInformation");
|
|
37
|
+
const key = JSON.stringify([identity.id, identity.version]);
|
|
38
|
+
const hash = sha256Json(flow);
|
|
39
|
+
const existing = identity.id && identity.version ? exactFlows.get(key) : undefined;
|
|
40
|
+
if (existing && existing.hash !== hash)
|
|
41
|
+
throw new Error("tidas_flow_context_identity_conflict");
|
|
42
|
+
const ordinal = existing?.ordinal ?? documents.length;
|
|
43
|
+
if (!existing) {
|
|
44
|
+
documents.push(flow);
|
|
45
|
+
if (identity.id && identity.version)
|
|
46
|
+
exactFlows.set(key, { hash, ordinal });
|
|
47
|
+
}
|
|
48
|
+
if (!supplementalOwners.has(ordinal))
|
|
49
|
+
supplementalOwners.set(ordinal, new Map(ordinal < rows.length ? [[ordinal, ""]] : []));
|
|
50
|
+
supplementalOwners.get(ordinal).set(owner, `/semantic_context/flow_documents/${flowIndex}`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return { documents, supplementalOwners };
|
|
54
|
+
}
|
|
55
|
+
/** Admit the native profile's transport coverage without deciding scientific validity. */
|
|
56
|
+
export function assertTidasProcessCoverage(coverage, binaryVersion, processCount, invalidProcessCount) {
|
|
57
|
+
const versionParts = binaryVersion.split(".").map(Number);
|
|
58
|
+
const requiresCoverage = processCount > 0 &&
|
|
59
|
+
(coverage || (versionParts[0] === 0 && versionParts[1] === 3 && versionParts[2] >= 4));
|
|
60
|
+
if (requiresCoverage &&
|
|
61
|
+
(!coverage ||
|
|
62
|
+
coverage.profile !== "tidas.process-allocation-reference.v1" ||
|
|
63
|
+
coverage.process_count !== processCount ||
|
|
64
|
+
typeof coverage.complete !== "boolean" ||
|
|
65
|
+
!record(coverage.checks)))
|
|
66
|
+
throw new Error("tidas_process_semantic_coverage_invalid");
|
|
67
|
+
if (coverage && coverage.complete === false && invalidProcessCount === 0)
|
|
68
|
+
throw new Error("tidas_process_semantic_coverage_incomplete");
|
|
69
|
+
if (coverage && processCount > 0) {
|
|
70
|
+
const checks = record(coverage.checks);
|
|
71
|
+
let unresolved = 0;
|
|
72
|
+
let invalid = 0;
|
|
73
|
+
// Native 0.3.4 contracts.rs aggregates emitted checks, not a fixed seven-key map.
|
|
74
|
+
// Unconditional valid-Process checks remain mandatory; invalid schema input may omit them.
|
|
75
|
+
if (invalidProcessCount === 0 &&
|
|
76
|
+
[
|
|
77
|
+
"allocation-target-type",
|
|
78
|
+
"allocation-vector",
|
|
79
|
+
"exchange-identity",
|
|
80
|
+
"quantitative-reference",
|
|
81
|
+
].some((name) => !record(checks[name])))
|
|
82
|
+
throw new Error("tidas_process_semantic_coverage_invalid");
|
|
83
|
+
for (const value of Object.values(checks)) {
|
|
84
|
+
const check = record(value);
|
|
85
|
+
if (!check ||
|
|
86
|
+
["passed", "invalid", "unresolved", "not_applicable"].some((key) => !Number.isSafeInteger(check[key]) || Number(check[key]) < 0))
|
|
87
|
+
throw new Error("tidas_process_semantic_coverage_invalid");
|
|
88
|
+
unresolved += Number(check.unresolved);
|
|
89
|
+
invalid += Number(check.invalid);
|
|
90
|
+
}
|
|
91
|
+
if (coverage.complete !== (unresolved === 0))
|
|
92
|
+
throw new Error("tidas_process_semantic_coverage_invalid");
|
|
93
|
+
if ((unresolved > 0 || invalid > 0) && invalidProcessCount === 0)
|
|
94
|
+
throw new Error("tidas_process_semantic_coverage_incomplete");
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
void runFoundryPublicCommand(process.argv, {}, receiveFoundryManagedHost);
|
|
2
|
+
import { runFoundryInstalledCommand } from "./lib/foundry-installed-entry.js";
|
|
3
|
+
void runFoundryInstalledCommand();
|
|
@@ -9,6 +9,7 @@ export declare function createFoundryWorkspaceAccess(input: {
|
|
|
9
9
|
export type FoundryPackageFacadeOptions = Omit<FoundryFacadeOptions, "moduleUrl">;
|
|
10
10
|
export type { FoundryFacadeRuntimeSelection } from "./foundry-facade.ts";
|
|
11
11
|
export { FOUNDRY_AUTHORIZATION_INPUT_SCHEMA, type FoundryAuthorizationInput, } from "./lib/foundry-authorization-input.ts";
|
|
12
|
+
export { FOUNDRY_QUALITY_REVIEW_INPUT_SCHEMA, type FoundryQualityReviewInput, type FoundryQualityReviewEvidence, } from "./lib/foundry-quality-review-input.ts";
|
|
12
13
|
export type { FoundryAuthentication, FoundryPublicOAuthConfiguration, } from "./lib/foundry-runtime-identity.ts";
|
|
13
14
|
export { FOUNDRY_SEMANTIC_INPUT_SCHEMA, type FoundrySemanticInput, type SemanticPatchInput, type SemanticDecisionInput, type SemanticSubmission, } from "./lib/foundry-semantic-input.ts";
|
|
14
15
|
export { FOUNDRY_INTERACTION_INPUT_SCHEMA, FOUNDRY_INTERACTION_STATE_SCHEMA, type FoundryInteractionInput, type FoundryInteractionState, } from "./lib/foundry-interaction-input.ts";
|
|
@@ -17,6 +18,7 @@ export { FOUNDRY_RUNTIME_SELECTION_SCHEMA, type FoundryRuntimeSelectionRecord, }
|
|
|
17
18
|
export type { FoundryRuntimeManagerOptions } from "./lib/foundry-runtime-selection.ts";
|
|
18
19
|
/** Public host factory with package/source identity bound by this module, never caller input. */
|
|
19
20
|
export declare function createFoundryFacade(options: FoundryPackageFacadeOptions): Readonly<{
|
|
21
|
+
adoptTaskRuntime(input: import("./lib/foundry-task-runtime-adoption.ts").FoundryTaskRuntimeAdoptionInput): Promise<import("./lib/foundry-operation-result.ts").FoundryOperationResult>;
|
|
20
22
|
runtimeUse(input: {
|
|
21
23
|
manifest: import("@tiangong-lca/cli/runtime").TrustedRuntimeManifest;
|
|
22
24
|
requestId: string;
|
|
@@ -66,6 +68,8 @@ export declare function createFoundryFacade(options: FoundryPackageFacadeOptions
|
|
|
66
68
|
interactionInputFile?: string;
|
|
67
69
|
authorizationInputFile?: string;
|
|
68
70
|
referenceInputFile?: string;
|
|
71
|
+
identityStageInputFile?: string;
|
|
72
|
+
qualityReviewInputFile?: string;
|
|
69
73
|
}): Promise<import("./lib/foundry-operation-result.ts").FoundryOperationResult>;
|
|
70
74
|
requestBinding(input: {
|
|
71
75
|
taskId: string;
|
|
@@ -81,3 +85,4 @@ export { FOUNDRY_MIGRATION_TRANSFER_RECEIPT_SCHEMA, type FoundryMigrationTransfe
|
|
|
81
85
|
export { FOUNDRY_MIGRATION_ADOPTION_PLAN_SCHEMA, type FoundryMigrationAdoptionPlan, type MigrationAdoptionSelection, } from "./lib/foundry-migration-adoption-plan.ts";
|
|
82
86
|
export { FOUNDRY_MIGRATION_ACTIVATION_SCHEMA, FOUNDRY_MIGRATED_WORKSPACE_SCHEMA, type FoundryMigrationActivation, type MigrationTaskAuthority, } from "./lib/foundry-migration-authority.ts";
|
|
83
87
|
export { FOUNDRY_PACKAGE_DESCRIPTOR_SCHEMA, FoundryPackageError, assertFoundryPackage, assertFoundryPackageDescriptor, type FoundryPackageDescriptor, type FoundryPackageFileFact, } from "./lib/foundry-package-contract.ts";
|
|
88
|
+
export { createFoundryRuntimeAdoptionQualification, type TrustedFoundryRuntimeAdoptionQualification, type FoundryTaskRuntimeAdoptionInput, } from "./lib/foundry-task-runtime-adoption.ts";
|
|
@@ -11,6 +11,7 @@ export function createFoundryWorkspaceAccess(input) {
|
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
export { FOUNDRY_AUTHORIZATION_INPUT_SCHEMA, } from "./lib/foundry-authorization-input.js";
|
|
14
|
+
export { FOUNDRY_QUALITY_REVIEW_INPUT_SCHEMA, } from "./lib/foundry-quality-review-input.js";
|
|
14
15
|
export { FOUNDRY_SEMANTIC_INPUT_SCHEMA, } from "./lib/foundry-semantic-input.js";
|
|
15
16
|
export { FOUNDRY_INTERACTION_INPUT_SCHEMA, FOUNDRY_INTERACTION_STATE_SCHEMA, } from "./lib/foundry-interaction-input.js";
|
|
16
17
|
export { FOUNDRY_RUNTIME_SELECTION_SCHEMA, } from "./lib/foundry-runtime-selection-record.js";
|
|
@@ -27,3 +28,4 @@ export { FOUNDRY_MIGRATION_TRANSFER_RECEIPT_SCHEMA, } from "./lib/foundry-migrat
|
|
|
27
28
|
export { FOUNDRY_MIGRATION_ADOPTION_PLAN_SCHEMA, } from "./lib/foundry-migration-adoption-plan.js";
|
|
28
29
|
export { FOUNDRY_MIGRATION_ACTIVATION_SCHEMA, FOUNDRY_MIGRATED_WORKSPACE_SCHEMA, } from "./lib/foundry-migration-authority.js";
|
|
29
30
|
export { FOUNDRY_PACKAGE_DESCRIPTOR_SCHEMA, FoundryPackageError, assertFoundryPackage, assertFoundryPackageDescriptor, } from "./lib/foundry-package-contract.js";
|
|
31
|
+
export { createFoundryRuntimeAdoptionQualification, } from "./lib/foundry-task-runtime-adoption.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import type { TrustedFoundryRuntimeAdoptionQualification } from "./lib/foundry-task-runtime-adoption.ts";
|
|
2
3
|
import type { TrustedRuntimeManifest } from "@tiangong-lca/cli/runtime";
|
|
3
4
|
import type { FoundryRuntimeManagerOptions } from "./lib/foundry-runtime-selection.ts";
|
|
4
5
|
import type { FoundryAuthentication } from "./lib/foundry-runtime-identity.ts";
|
|
@@ -13,6 +14,7 @@ export interface FoundryRuntimeCommandHost {
|
|
|
13
14
|
readonly authentication?: FoundryAuthentication;
|
|
14
15
|
readonly runtimeTarget?: TrustedRuntimeManifest;
|
|
15
16
|
readonly runtimeManager?: FoundryRuntimeManagerOptions;
|
|
17
|
+
readonly runtimeAdoptionQualification?: TrustedFoundryRuntimeAdoptionQualification;
|
|
16
18
|
readonly signal?: AbortSignal;
|
|
17
19
|
readonly writeStdout?: (text: string) => void;
|
|
18
20
|
readonly setExitCode?: (code: number) => void;
|