@tiangong-lca/foundry 0.1.17 → 0.1.19
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 +15 -3
- package/docs/foundry-task-contracts.md +27 -3
- package/docs/package-distribution-contract.md +45 -13
- package/docs/public-runtime-contract.md +85 -5
- package/docs/runtime-context-contract.md +22 -4
- package/docs/task-authorization-contract.md +15 -3
- package/docs/workspace-migration-contract.md +5 -3
- package/package-dist/assets/foundry-package-descriptor.json +541 -177
- package/package-dist/scripts/foundry-facade.d.ts +5 -0
- package/package-dist/scripts/foundry-facade.js +261 -16
- package/package-dist/scripts/foundry-runtime.d.ts +2 -2
- 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 +18 -6
- package/package-dist/scripts/lib/finalize-owners/cli-wrappers.d.ts +72 -1
- package/package-dist/scripts/lib/finalize-owners/cli-wrappers.js +123 -3
- package/package-dist/scripts/lib/finalize-owners/post-authoring.d.ts +11 -1
- package/package-dist/scripts/lib/finalize-owners/post-authoring.js +65 -9
- 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-authentication-environment.js +1 -1
- package/package-dist/scripts/lib/foundry-command-metadata.js +6 -1
- package/package-dist/scripts/lib/foundry-curation-queue.d.ts +73 -0
- package/package-dist/scripts/lib/foundry-curation-queue.js +261 -0
- 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-edge-draft-admission.d.ts +17 -0
- package/package-dist/scripts/lib/foundry-edge-draft-admission.js +94 -0
- package/package-dist/scripts/lib/foundry-edge-identity-preflight.d.ts +47 -0
- package/package-dist/scripts/lib/foundry-edge-identity-preflight.js +268 -0
- package/package-dist/scripts/lib/foundry-edge-oauth.d.ts +4 -0
- package/package-dist/scripts/lib/foundry-edge-oauth.js +154 -0
- package/package-dist/scripts/lib/foundry-edge-reference-intent.d.ts +51 -0
- package/package-dist/scripts/lib/foundry-edge-reference-intent.js +184 -0
- package/package-dist/scripts/lib/foundry-edge-repair-preparation.d.ts +21 -0
- package/package-dist/scripts/lib/foundry-edge-repair-preparation.js +120 -0
- package/package-dist/scripts/lib/foundry-edge-session.d.ts +15 -0
- package/package-dist/scripts/lib/foundry-edge-session.js +69 -0
- package/package-dist/scripts/lib/foundry-edge-support-plan.d.ts +69 -0
- package/package-dist/scripts/lib/foundry-edge-support-plan.js +245 -0
- package/package-dist/scripts/lib/foundry-edge-support-planning.d.ts +115 -0
- package/package-dist/scripts/lib/foundry-edge-support-planning.js +259 -0
- package/package-dist/scripts/lib/foundry-edge-support.d.ts +19 -0
- package/package-dist/scripts/lib/foundry-edge-support.js +188 -0
- package/package-dist/scripts/lib/foundry-execution-admission.d.ts +4 -2
- package/package-dist/scripts/lib/foundry-execution-admission.js +28 -3
- package/package-dist/scripts/lib/foundry-finalize-edge-identity.d.ts +30 -0
- package/package-dist/scripts/lib/foundry-finalize-edge-identity.js +102 -0
- package/package-dist/scripts/lib/foundry-finalize-owners.d.ts +1 -0
- package/package-dist/scripts/lib/foundry-finalize-owners.js +126 -13
- 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-owner-execution-store.d.ts +16 -16
- package/package-dist/scripts/lib/foundry-owner-execution-store.js +34 -7
- package/package-dist/scripts/lib/foundry-owner-readback.d.ts +20 -0
- package/package-dist/scripts/lib/foundry-owner-readback.js +42 -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 +2 -0
- package/package-dist/scripts/lib/foundry-preparation-cli-validation.js +96 -3
- package/package-dist/scripts/lib/foundry-process-mass-balance.d.ts +64 -0
- package/package-dist/scripts/lib/foundry-process-mass-balance.js +224 -0
- package/package-dist/scripts/lib/foundry-process-qa.d.ts +19 -0
- package/package-dist/scripts/lib/foundry-process-qa.js +423 -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-repair-execution.js +13 -2
- package/package-dist/scripts/lib/foundry-runtime-environment.d.ts +2 -0
- package/package-dist/scripts/lib/foundry-runtime-environment.js +18 -0
- package/package-dist/scripts/lib/foundry-runtime-identity.d.ts +1 -0
- package/package-dist/scripts/lib/foundry-runtime-identity.js +22 -2
- package/package-dist/scripts/lib/foundry-runtime-qualification.js +2 -2
- package/package-dist/scripts/lib/foundry-runtime-utils.d.ts +1 -0
- 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-typed-authoring-patch.d.ts +76 -0
- package/package-dist/scripts/lib/foundry-typed-authoring-patch.js +237 -0
- package/package-dist/scripts/lib/foundry-typed-context.d.ts +11 -0
- package/package-dist/scripts/lib/foundry-typed-context.js +79 -0
- package/package-dist/scripts/lib/foundry-typed-flow-qa.d.ts +166 -0
- package/package-dist/scripts/lib/foundry-typed-flow-qa.js +226 -0
- package/package-dist/scripts/lib/foundry-typed-model-write.d.ts +6 -0
- package/package-dist/scripts/lib/foundry-typed-model-write.js +59 -0
- 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 +165 -34
- package/package-dist/scripts/lib/foundry-workflow-authorization.js +99 -5
- 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 +92 -22
- package/package-dist/scripts/lib/foundry-workflow-execution.js +54 -5
- package/package-dist/scripts/lib/foundry-workflow-finalize.js +64 -3
- 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 +717 -0
- package/package-dist/scripts/lib/foundry-workflow-identity.js +26 -11
- package/package-dist/scripts/lib/foundry-workflow-io.d.ts +7 -1
- package/package-dist/scripts/lib/foundry-workflow-io.js +102 -16
- package/package-dist/scripts/lib/foundry-workflow-reference-verify.js +102 -29
- package/package-dist/scripts/lib/foundry-workflow-repair.js +53 -2
- package/package-dist/scripts/lib/foundry-workflow-semantic.js +65 -31
- package/package-dist/scripts/lib/foundry-workflow-state.d.ts +4 -0
- package/package-dist/scripts/lib/foundry-workflow-state.js +165 -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 +6 -0
- package/package-dist/scripts/lib/identity-preflight-proof.js +92 -13
- 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 +1 -0
- package/package-dist/scripts/lib/import-curation/curation-gate.js +19 -1
- 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/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
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { createHash } from "node:crypto";
|
|
4
|
+
import { FoundryContextError, resolveFoundryOutput, } from "./foundry-runtime-context.js";
|
|
5
|
+
import { readTaskBytes } from "./foundry-task-io.js";
|
|
6
|
+
import { sha256Json } from "./identity-preflight-proof.js";
|
|
7
|
+
import { readFoundryTaskRuntimeAdoptionChain } from "./foundry-task-runtime-adoption.js";
|
|
8
|
+
function hash(bytes) {
|
|
9
|
+
return createHash("sha256").update(bytes).digest("hex");
|
|
10
|
+
}
|
|
11
|
+
function object(value) {
|
|
12
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
13
|
+
}
|
|
14
|
+
function fail() {
|
|
15
|
+
throw new FoundryContextError("workflow_assessment_invalid", "The retained assessment producer is not proven by this task's original receipt and runtime identity.");
|
|
16
|
+
}
|
|
17
|
+
/** Retain producer locator meaning; this proof permits no execution of the old package or old stages. */
|
|
18
|
+
export function verifyRegisteredAssessmentProducer(context, entry, value, entries) {
|
|
19
|
+
const assessedBytes = readTaskBytes(context, entry.path);
|
|
20
|
+
if (assessedBytes.length !== entry.bytes ||
|
|
21
|
+
hash(assessedBytes) !== entry.sha256 ||
|
|
22
|
+
sha256Json(JSON.parse(assessedBytes.toString("utf8"))) !== sha256Json(value))
|
|
23
|
+
fail();
|
|
24
|
+
if (typeof value.owner_base !== "string" || !path.isAbsolute(value.owner_base))
|
|
25
|
+
fail();
|
|
26
|
+
const base = path.resolve(value.owner_base);
|
|
27
|
+
if (base === context.assetRoot)
|
|
28
|
+
return base;
|
|
29
|
+
try {
|
|
30
|
+
if (fs.realpathSync(base) !== base || !fs.statSync(base).isDirectory())
|
|
31
|
+
fail();
|
|
32
|
+
const jobBytes = readTaskBytes(context, "foundry-job.json"), job = JSON.parse(jobBytes.toString("utf8"));
|
|
33
|
+
const receiptBytes = readTaskBytes(context, entry.receipt.path), receipt = JSON.parse(receiptBytes.toString("utf8"));
|
|
34
|
+
if (hash(receiptBytes) !== entry.receipt.sha256 ||
|
|
35
|
+
!object(job) ||
|
|
36
|
+
!object(job.runtime_identity) ||
|
|
37
|
+
job.task_id !== context.taskId ||
|
|
38
|
+
job.actor_id !== context.actorId ||
|
|
39
|
+
!object(receipt) ||
|
|
40
|
+
receipt.status !== "completed" ||
|
|
41
|
+
receipt.mode !== "deterministic-local" ||
|
|
42
|
+
receipt.job_sha256 !== hash(jobBytes) ||
|
|
43
|
+
!object(receipt.plan) ||
|
|
44
|
+
typeof receipt.plan.path !== "string" ||
|
|
45
|
+
!Array.isArray(receipt.outputs))
|
|
46
|
+
fail();
|
|
47
|
+
const planBytes = readTaskBytes(context, receipt.plan.path), plan = JSON.parse(planBytes.toString("utf8"));
|
|
48
|
+
if (hash(planBytes) !== receipt.plan.sha256 ||
|
|
49
|
+
!object(plan) ||
|
|
50
|
+
plan.command !== "dataset-workflow-assessment" ||
|
|
51
|
+
plan.operation_id !== entry.operation_id ||
|
|
52
|
+
plan.job_sha256 !== hash(jobBytes) ||
|
|
53
|
+
plan.input_scope_sha256 !== entry.input_scope_sha256 ||
|
|
54
|
+
!receipt.outputs.some((item) => object(item) &&
|
|
55
|
+
item.path === entry.path &&
|
|
56
|
+
item.bytes === entry.bytes &&
|
|
57
|
+
item.sha256 === entry.sha256))
|
|
58
|
+
fail();
|
|
59
|
+
const packageFile = path.join(base, "package.json"), packageBytes = fs.readFileSync(packageFile), pkg = JSON.parse(packageBytes.toString("utf8"));
|
|
60
|
+
const chain = readFoundryTaskRuntimeAdoptionChain(context);
|
|
61
|
+
const expectedRuntime = chain?.runtimes.find((runtime) => runtime.root === base)?.identity ?? job.runtime_identity;
|
|
62
|
+
if (!object(pkg) ||
|
|
63
|
+
!object(pkg.foundryRuntime) ||
|
|
64
|
+
pkg.name !== "@tiangong-lca/foundry" ||
|
|
65
|
+
pkg.name !== expectedRuntime.package_name ||
|
|
66
|
+
pkg.version !== expectedRuntime.package_version ||
|
|
67
|
+
hash(packageBytes) !== expectedRuntime.manifest_sha256 ||
|
|
68
|
+
pkg.foundryRuntime.asset_root !== ".")
|
|
69
|
+
fail();
|
|
70
|
+
const declared = [
|
|
71
|
+
pkg.foundryRuntime.package_entry,
|
|
72
|
+
pkg.foundryRuntime.emitted_entry,
|
|
73
|
+
pkg.foundryRuntime.source_entry,
|
|
74
|
+
];
|
|
75
|
+
const runtimeIdentity = expectedRuntime;
|
|
76
|
+
if (!declared.some((candidate) => {
|
|
77
|
+
if (typeof candidate !== "string")
|
|
78
|
+
return false;
|
|
79
|
+
const file = path.resolve(base, candidate);
|
|
80
|
+
if (!file.startsWith(`${base}${path.sep}`) ||
|
|
81
|
+
!fs.existsSync(file) ||
|
|
82
|
+
fs.realpathSync(file) !== file ||
|
|
83
|
+
!fs.statSync(file).isFile())
|
|
84
|
+
return false;
|
|
85
|
+
return hash(fs.readFileSync(file)) === runtimeIdentity.entry_sha256;
|
|
86
|
+
}))
|
|
87
|
+
fail();
|
|
88
|
+
const descriptorPath = path.join(base, "package-dist/assets/foundry-package-descriptor.json");
|
|
89
|
+
if (fs.existsSync(descriptorPath) && !chain) {
|
|
90
|
+
const currentDescriptorPath = path.join(context.runtimeRoot, "package-dist/assets/foundry-package-descriptor.json");
|
|
91
|
+
const descriptorBytes = fs.readFileSync(descriptorPath);
|
|
92
|
+
if (!fs.existsSync(currentDescriptorPath) ||
|
|
93
|
+
hash(descriptorBytes) !== hash(fs.readFileSync(currentDescriptorPath)))
|
|
94
|
+
fail();
|
|
95
|
+
const descriptor = JSON.parse(descriptorBytes.toString("utf8"));
|
|
96
|
+
if (!object(descriptor) ||
|
|
97
|
+
!Array.isArray(descriptor.files) ||
|
|
98
|
+
descriptor.files.length > 5000 ||
|
|
99
|
+
descriptor.files_sha256 !== sha256Json(descriptor.files))
|
|
100
|
+
fail();
|
|
101
|
+
for (const item of descriptor.files) {
|
|
102
|
+
if (!object(item) ||
|
|
103
|
+
typeof item.path !== "string" ||
|
|
104
|
+
typeof item.sha256 !== "string" ||
|
|
105
|
+
!Number.isSafeInteger(item.bytes))
|
|
106
|
+
fail();
|
|
107
|
+
const file = path.resolve(base, item.path);
|
|
108
|
+
if (path.isAbsolute(item.path) ||
|
|
109
|
+
!file.startsWith(base + path.sep) ||
|
|
110
|
+
fs.realpathSync(file) !== file)
|
|
111
|
+
fail();
|
|
112
|
+
const content = fs.readFileSync(file);
|
|
113
|
+
if (content.length !== item.bytes || hash(content) !== item.sha256)
|
|
114
|
+
fail();
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
// Original relative authoring locators must still name exact registered files in this task.
|
|
118
|
+
if (!Array.isArray(value.sets))
|
|
119
|
+
fail();
|
|
120
|
+
for (const raw of value.sets) {
|
|
121
|
+
if (!object(raw) || typeof raw.authoring_manifest !== "string")
|
|
122
|
+
fail();
|
|
123
|
+
const file = resolveFoundryOutput(context, raw.authoring_manifest);
|
|
124
|
+
const verify = (selected) => {
|
|
125
|
+
const registered = entries.find((item) => resolveFoundryOutput(context, item.path) === selected);
|
|
126
|
+
if (!registered)
|
|
127
|
+
fail();
|
|
128
|
+
const bytes = readTaskBytes(context, path.relative(context.taskRoot, selected));
|
|
129
|
+
if (bytes.length !== registered.bytes || hash(bytes) !== registered.sha256)
|
|
130
|
+
fail();
|
|
131
|
+
return bytes;
|
|
132
|
+
};
|
|
133
|
+
const manifest = JSON.parse(verify(file).toString("utf8"));
|
|
134
|
+
if (!object(manifest) || !Array.isArray(manifest.tasks))
|
|
135
|
+
fail();
|
|
136
|
+
for (const task of manifest.tasks) {
|
|
137
|
+
if (!object(task) || !object(task.files) || typeof task.files.task_json !== "string")
|
|
138
|
+
fail();
|
|
139
|
+
const resolved = resolveFoundryOutput(context, path.resolve(base, task.files.task_json));
|
|
140
|
+
verify(resolved);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
return base;
|
|
144
|
+
}
|
|
145
|
+
catch {
|
|
146
|
+
return fail();
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
/** A retained set keeps the locator base of the operation that actually produced its manifest. */
|
|
150
|
+
export function registeredAssessmentSetProducerBase(context, entries, set) {
|
|
151
|
+
const manifestEntry = entries.find((item) => resolveFoundryOutput(context, item.path) === set.authoring_manifest);
|
|
152
|
+
const producerEntry = manifestEntry &&
|
|
153
|
+
entries.find((item) => item.operation_id === manifestEntry.operation_id &&
|
|
154
|
+
item.command === "dataset-workflow-assessment" &&
|
|
155
|
+
path.basename(item.path) === "foundry-assessment.json");
|
|
156
|
+
if (!producerEntry)
|
|
157
|
+
fail();
|
|
158
|
+
const bytes = readTaskBytes(context, producerEntry.path);
|
|
159
|
+
if (bytes.length !== producerEntry.bytes || hash(bytes) !== producerEntry.sha256)
|
|
160
|
+
fail();
|
|
161
|
+
const producer = JSON.parse(bytes.toString("utf8"));
|
|
162
|
+
if (!object(producer) ||
|
|
163
|
+
!Array.isArray(producer.sets) ||
|
|
164
|
+
!producer.sets.some((item) => object(item) && sha256Json(item) === sha256Json(set)))
|
|
165
|
+
fail();
|
|
166
|
+
return verifyRegisteredAssessmentProducer(context, producerEntry, producer, entries);
|
|
167
|
+
}
|
|
@@ -45,7 +45,7 @@ export function createFoundryAuthenticationEnvironment(authentication, sessionRe
|
|
|
45
45
|
else {
|
|
46
46
|
if (!authentication.accessToken || !authentication.apiBaseUrl || !authentication.publishableKey)
|
|
47
47
|
reject("headless_target_required", "Headless mode requires the existing CLI explicit target and process-only actor token.");
|
|
48
|
-
environment.TIANGONG_LCA_AUTH_MODE = "
|
|
48
|
+
environment.TIANGONG_LCA_AUTH_MODE = "access-token";
|
|
49
49
|
environment.TIANGONG_LCA_ACCESS_TOKEN = authentication.accessToken;
|
|
50
50
|
environment.TIANGONG_LCA_API_BASE_URL = authentication.apiBaseUrl;
|
|
51
51
|
environment.TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY = authentication.publishableKey;
|
|
@@ -330,8 +330,12 @@ export const commandMetadata = {
|
|
|
330
330
|
"profile",
|
|
331
331
|
"context files",
|
|
332
332
|
"queue artifacts",
|
|
333
|
+
"optional task-indexed exact-object preparation quality review",
|
|
334
|
+
],
|
|
335
|
+
outputs: [
|
|
336
|
+
"dataset-curation-gate-report.json (raw QA plus separately reviewed findings)",
|
|
337
|
+
"ai-authoring-packages/*",
|
|
333
338
|
],
|
|
334
|
-
outputs: ["dataset-curation-gate-report.json", "ai-authoring-packages/*"],
|
|
335
339
|
keyTests: [
|
|
336
340
|
goldenDiff,
|
|
337
341
|
nodeTest("test/scenarios/identity-curation-context.test.mts", "curation gate authoring package carries full contract text and queue dependency rows"),
|
|
@@ -921,6 +925,7 @@ export const commandMetadata = {
|
|
|
921
925
|
"schema/context files",
|
|
922
926
|
"decision/patch evidence",
|
|
923
927
|
"optional explicit Process QA reference rows and verified reference intent",
|
|
928
|
+
"optional task-indexed preparation quality review, rechecked against final rows and QA",
|
|
924
929
|
],
|
|
925
930
|
outputs: [
|
|
926
931
|
"post-authoring-finalize report (always)",
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
type Entity = "support" | "flow" | "process";
|
|
2
|
+
type QueueOptions = {
|
|
3
|
+
processes: string;
|
|
4
|
+
flows?: string | null;
|
|
5
|
+
support?: readonly string[];
|
|
6
|
+
external?: readonly string[];
|
|
7
|
+
excludeProcessIds?: readonly string[];
|
|
8
|
+
processLimit?: number;
|
|
9
|
+
outDir: string;
|
|
10
|
+
readInput?: (file: string) => Buffer;
|
|
11
|
+
};
|
|
12
|
+
export declare function buildFoundryCurationQueue(options: QueueOptions): {
|
|
13
|
+
schema_version: number;
|
|
14
|
+
producer: string;
|
|
15
|
+
generated_at_utc: string;
|
|
16
|
+
status: string;
|
|
17
|
+
out_dir: string;
|
|
18
|
+
inputs: {
|
|
19
|
+
processes: string;
|
|
20
|
+
flows: string | null;
|
|
21
|
+
support: string[];
|
|
22
|
+
external_flow_refs: string[];
|
|
23
|
+
};
|
|
24
|
+
counts: {
|
|
25
|
+
support_rows: number;
|
|
26
|
+
flow_rows: number;
|
|
27
|
+
process_rows: number;
|
|
28
|
+
external_flow_refs: number;
|
|
29
|
+
tasks: number;
|
|
30
|
+
blockers: number;
|
|
31
|
+
};
|
|
32
|
+
hashes: {
|
|
33
|
+
inputs: Record<string, string>;
|
|
34
|
+
task_order: string;
|
|
35
|
+
};
|
|
36
|
+
files: {
|
|
37
|
+
manifest: string;
|
|
38
|
+
tasks: string;
|
|
39
|
+
blockers: string;
|
|
40
|
+
locks: string;
|
|
41
|
+
};
|
|
42
|
+
tasks: {
|
|
43
|
+
schema_version: number;
|
|
44
|
+
entity_type: Entity;
|
|
45
|
+
task_id: string;
|
|
46
|
+
entity_id: string;
|
|
47
|
+
version: string;
|
|
48
|
+
lock_key: string;
|
|
49
|
+
depends_on: string[];
|
|
50
|
+
work_dir: string;
|
|
51
|
+
input_rows_file: string;
|
|
52
|
+
checkpoint_file: string;
|
|
53
|
+
run_plan_file: string;
|
|
54
|
+
closure_file: string;
|
|
55
|
+
}[];
|
|
56
|
+
blockers: {
|
|
57
|
+
schema_version: number;
|
|
58
|
+
code: string;
|
|
59
|
+
severity: string;
|
|
60
|
+
entity_type: string;
|
|
61
|
+
entity_id: string;
|
|
62
|
+
version: string;
|
|
63
|
+
message: string;
|
|
64
|
+
details: {
|
|
65
|
+
missing_flow_refs: {
|
|
66
|
+
id: string;
|
|
67
|
+
version: string | null;
|
|
68
|
+
path: string;
|
|
69
|
+
}[];
|
|
70
|
+
};
|
|
71
|
+
}[];
|
|
72
|
+
};
|
|
73
|
+
export {};
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { FoundryContextError } from "./foundry-runtime-error.js";
|
|
5
|
+
import { datasetIdentity, detectDatasetType, unwrapDatasetPayload, } from "./import-curation/internal/dataset-payload.js";
|
|
6
|
+
import { asText, readRows } from "./import-curation/internal/runtime-io.js";
|
|
7
|
+
import { collectCommonOtherTraceEntries } from "./import-curation/internal/trace-summary.js";
|
|
8
|
+
import { collectDatasetReferences } from "./import-curation/internal/workflow-reference-closure.js";
|
|
9
|
+
const layout = {
|
|
10
|
+
support: { dir: "supports", stages: ["identity", "schema", "qa_or_profile", "checkpoint"] },
|
|
11
|
+
flow: { dir: "flows", stages: ["identity", "name_plan", "schema", "qa", "checkpoint"] },
|
|
12
|
+
process: {
|
|
13
|
+
dir: "processes",
|
|
14
|
+
stages: [
|
|
15
|
+
"dependency_closure",
|
|
16
|
+
"reference_refresh",
|
|
17
|
+
"required_fields",
|
|
18
|
+
"schema",
|
|
19
|
+
"qa",
|
|
20
|
+
"curation",
|
|
21
|
+
"remote_dry_run",
|
|
22
|
+
"readback",
|
|
23
|
+
],
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
function sha256(data) {
|
|
27
|
+
return createHash("sha256").update(data).digest("hex");
|
|
28
|
+
}
|
|
29
|
+
function record(value) {
|
|
30
|
+
return value && typeof value === "object" && !Array.isArray(value)
|
|
31
|
+
? value
|
|
32
|
+
: {};
|
|
33
|
+
}
|
|
34
|
+
function invalid(message) {
|
|
35
|
+
throw new FoundryContextError("workflow_queue_invalid", message);
|
|
36
|
+
}
|
|
37
|
+
function writeText(file, contents) {
|
|
38
|
+
fs.mkdirSync(path.dirname(file), { recursive: true, mode: 0o700 });
|
|
39
|
+
fs.writeFileSync(file, contents, { mode: 0o600, flag: "wx" });
|
|
40
|
+
}
|
|
41
|
+
function writeJson(file, value) {
|
|
42
|
+
writeText(file, JSON.stringify(value, null, 2) + "\n");
|
|
43
|
+
}
|
|
44
|
+
function writeRows(file, rows) {
|
|
45
|
+
writeText(file, rows.map((row) => JSON.stringify(row) + "\n").join(""));
|
|
46
|
+
}
|
|
47
|
+
const versionKey = (id, version) => JSON.stringify([id, version]);
|
|
48
|
+
const refPath = (pointer) => pointer.replace(/^\/+|\/+$/gu, "").replace(/\//gu, ".");
|
|
49
|
+
export function buildFoundryCurationQueue(options) {
|
|
50
|
+
const outDir = path.resolve(options.outDir);
|
|
51
|
+
const files = {
|
|
52
|
+
processes: path.resolve(options.processes),
|
|
53
|
+
flows: options.flows ? path.resolve(options.flows) : null,
|
|
54
|
+
support: (options.support ?? []).map((file) => path.resolve(file)),
|
|
55
|
+
external_flow_refs: (options.external ?? []).map((file) => path.resolve(file)),
|
|
56
|
+
};
|
|
57
|
+
const hashes = {};
|
|
58
|
+
const read = (file) => {
|
|
59
|
+
const bytes = (options.readInput ?? fs.readFileSync)(file);
|
|
60
|
+
hashes[file] = sha256(bytes);
|
|
61
|
+
return readRows(file, () => bytes.toString("utf8"));
|
|
62
|
+
};
|
|
63
|
+
const taskIds = new Set();
|
|
64
|
+
const workDirs = new Set();
|
|
65
|
+
const excluded = new Set(options.excludeProcessIds);
|
|
66
|
+
const entities = (file, type) => {
|
|
67
|
+
const selected = read(file).flatMap((row, index) => {
|
|
68
|
+
const kind = type === "support" ? detectDatasetType(unwrapDatasetPayload(row, "support")) : type;
|
|
69
|
+
if (!kind)
|
|
70
|
+
return invalid("Support queue rows need a recognized dataset type.");
|
|
71
|
+
const identity = datasetIdentity(row, index, kind);
|
|
72
|
+
if (!identity.id || !identity.version || /^row-\d+$/u.test(identity.id))
|
|
73
|
+
return invalid("Queue rows need a stable identity.");
|
|
74
|
+
return type === "process" && excluded.has(identity.id) ? [] : [{ row, index, identity }];
|
|
75
|
+
});
|
|
76
|
+
return (type === "process" ? selected.slice(0, options.processLimit) : selected).map(({ row, index, identity: { id, version, payload } }) => {
|
|
77
|
+
const taskId = `${type}:${id}@${version}`;
|
|
78
|
+
const token = (value) => value.replace(/[^A-Za-z0-9._-]+/gu, "_");
|
|
79
|
+
const workDir = path.join(outDir, "entities", layout[type].dir, `${token(id)}__${token(version)}`);
|
|
80
|
+
if (taskIds.has(taskId) || workDirs.has(workDir))
|
|
81
|
+
return invalid("The queue has conflicting rows for one task or path.");
|
|
82
|
+
taskIds.add(taskId);
|
|
83
|
+
workDirs.add(workDir);
|
|
84
|
+
const task = {
|
|
85
|
+
schema_version: 1,
|
|
86
|
+
entity_type: type,
|
|
87
|
+
task_id: taskId,
|
|
88
|
+
entity_id: id,
|
|
89
|
+
version,
|
|
90
|
+
lock_key: taskId,
|
|
91
|
+
depends_on: [],
|
|
92
|
+
work_dir: workDir,
|
|
93
|
+
input_rows_file: path.join(workDir, "input.jsonl"),
|
|
94
|
+
checkpoint_file: path.join(workDir, "checkpoint.json"),
|
|
95
|
+
run_plan_file: path.join(workDir, "entity-run-plan.json"),
|
|
96
|
+
closure_file: path.join(workDir, "closure.json"),
|
|
97
|
+
};
|
|
98
|
+
return { task, row, payload, source: { file, index } };
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
const support = files.support.flatMap((file) => entities(file, "support"));
|
|
102
|
+
const flows = files.flows ? entities(files.flows, "flow") : [];
|
|
103
|
+
const processes = entities(files.processes, "process");
|
|
104
|
+
const externalRows = files.external_flow_refs.flatMap(read);
|
|
105
|
+
const external = new Set(externalRows.map((row) => {
|
|
106
|
+
const source = record(row);
|
|
107
|
+
const id = asText(source.id ?? source.dataset_id ?? source.uuid);
|
|
108
|
+
if (!id)
|
|
109
|
+
return invalid("External Flow evidence requires a stable identity.");
|
|
110
|
+
return versionKey(id, asText(source.version) || null);
|
|
111
|
+
}));
|
|
112
|
+
const byFlowVersion = new Map(flows.map(({ task }) => [versionKey(task.entity_id, task.version), task]));
|
|
113
|
+
const flowCounts = new Map();
|
|
114
|
+
const firstByFlow = new Map();
|
|
115
|
+
for (const { task } of flows) {
|
|
116
|
+
flowCounts.set(task.entity_id, (flowCounts.get(task.entity_id) ?? 0) + 1);
|
|
117
|
+
if (!firstByFlow.has(task.entity_id))
|
|
118
|
+
firstByFlow.set(task.entity_id, task);
|
|
119
|
+
}
|
|
120
|
+
const blockers = [];
|
|
121
|
+
const all = [...support, ...flows, ...processes];
|
|
122
|
+
for (const item of all) {
|
|
123
|
+
const { task, row, payload, source } = item;
|
|
124
|
+
const localTasks = [], externalRefs = [], deferredRefs = [], unresolvedRefs = [];
|
|
125
|
+
if (task.entity_type === "process") {
|
|
126
|
+
const deferred = new Map(collectCommonOtherTraceEntries(payload, "tiangongfoundry:unresolvedTrace")
|
|
127
|
+
.map(record)
|
|
128
|
+
.filter((trace) => (trace.action_item_code ?? trace.actionItemCode) ===
|
|
129
|
+
"elementary_flow_identity_manual_review")
|
|
130
|
+
.map((trace) => [
|
|
131
|
+
JSON.stringify([
|
|
132
|
+
asText(trace.reference_id ?? trace.referenceId ?? trace.ref_object_id),
|
|
133
|
+
asText(trace.reference_version ?? trace.referenceVersion ?? trace.version) || null,
|
|
134
|
+
refPath(asText(trace.blocked_path ?? trace.blockedPath ?? trace.path)),
|
|
135
|
+
]),
|
|
136
|
+
trace,
|
|
137
|
+
]));
|
|
138
|
+
const missing = [];
|
|
139
|
+
const refs = collectDatasetReferences(payload).filter((ref) => ref.table === "flows");
|
|
140
|
+
for (const ref of refs) {
|
|
141
|
+
const version = ref.version || null;
|
|
142
|
+
const key = versionKey(ref.id, version);
|
|
143
|
+
const location = refPath(ref.path);
|
|
144
|
+
const target = version
|
|
145
|
+
? byFlowVersion.get(key)
|
|
146
|
+
: flowCounts.get(ref.id) === 1
|
|
147
|
+
? firstByFlow.get(ref.id)
|
|
148
|
+
: undefined;
|
|
149
|
+
const base = { entity_type: "flow", entity_id: ref.id, version, ref_path: location };
|
|
150
|
+
const trace = deferred.get(JSON.stringify([ref.id, version, location]));
|
|
151
|
+
if (target) {
|
|
152
|
+
localTasks.push({ ...base, version: target.version, task_id: target.task_id });
|
|
153
|
+
}
|
|
154
|
+
else if (version && external.has(key)) {
|
|
155
|
+
externalRefs.push(base);
|
|
156
|
+
}
|
|
157
|
+
else if (trace) {
|
|
158
|
+
deferredRefs.push({
|
|
159
|
+
...base,
|
|
160
|
+
action_item_code: "elementary_flow_identity_manual_review",
|
|
161
|
+
reason: asText(trace.reason) || null,
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
unresolvedRefs.push(base);
|
|
166
|
+
missing.push({ id: ref.id, version, path: location });
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
if (missing.length)
|
|
170
|
+
blockers.push({
|
|
171
|
+
schema_version: 1,
|
|
172
|
+
code: "process_flow_reference_unresolved",
|
|
173
|
+
severity: "blocker",
|
|
174
|
+
entity_type: "process",
|
|
175
|
+
entity_id: task.entity_id,
|
|
176
|
+
version: task.version,
|
|
177
|
+
message: "Process Flow dependencies require one local task or exact external Flow evidence.",
|
|
178
|
+
details: { missing_flow_refs: missing },
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
task.depends_on = [...new Set(localTasks.map((entry) => entry.task_id))].sort();
|
|
182
|
+
writeRows(task.input_rows_file, [row]);
|
|
183
|
+
writeJson(task.closure_file, {
|
|
184
|
+
schema_version: 1,
|
|
185
|
+
entity_type: task.entity_type,
|
|
186
|
+
entity_id: task.entity_id,
|
|
187
|
+
version: task.version,
|
|
188
|
+
source,
|
|
189
|
+
dependencies: {
|
|
190
|
+
local_tasks: localTasks,
|
|
191
|
+
external_refs: externalRefs,
|
|
192
|
+
deferred_refs: deferredRefs,
|
|
193
|
+
unresolved_refs: unresolvedRefs,
|
|
194
|
+
},
|
|
195
|
+
});
|
|
196
|
+
writeJson(task.run_plan_file, {
|
|
197
|
+
schema_version: 1,
|
|
198
|
+
task_id: task.task_id,
|
|
199
|
+
entity_type: task.entity_type,
|
|
200
|
+
entity_id: task.entity_id,
|
|
201
|
+
version: task.version,
|
|
202
|
+
input_rows_file: task.input_rows_file,
|
|
203
|
+
checkpoint_file: task.checkpoint_file,
|
|
204
|
+
stages: layout[task.entity_type].stages.map((id) => ({
|
|
205
|
+
id,
|
|
206
|
+
status: "pending",
|
|
207
|
+
checkpoint_file: path.join(task.work_dir, "checkpoints", `${id}.json`),
|
|
208
|
+
})),
|
|
209
|
+
ai_authoring_policy: {
|
|
210
|
+
output_only: "structured_patch_or_build_plan",
|
|
211
|
+
deterministic_apply_required: true,
|
|
212
|
+
remote_write_allowed: false,
|
|
213
|
+
},
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
const tasks = all.map(({ task }) => task);
|
|
217
|
+
const output = path.join(outDir, "outputs");
|
|
218
|
+
const artifacts = {
|
|
219
|
+
manifest: path.join(output, "curation-queue-manifest.json"),
|
|
220
|
+
tasks: path.join(output, "curation-queue-tasks.jsonl"),
|
|
221
|
+
blockers: path.join(output, "curation-queue-blockers.jsonl"),
|
|
222
|
+
locks: path.join(output, "curation-queue-locks.json"),
|
|
223
|
+
};
|
|
224
|
+
const generated = new Date().toISOString();
|
|
225
|
+
const report = {
|
|
226
|
+
schema_version: 1,
|
|
227
|
+
producer: "foundry",
|
|
228
|
+
generated_at_utc: generated,
|
|
229
|
+
status: blockers.length ? "blocked" : "ready",
|
|
230
|
+
out_dir: outDir,
|
|
231
|
+
inputs: files,
|
|
232
|
+
counts: {
|
|
233
|
+
support_rows: support.length,
|
|
234
|
+
flow_rows: flows.length,
|
|
235
|
+
process_rows: processes.length,
|
|
236
|
+
external_flow_refs: externalRows.length,
|
|
237
|
+
tasks: tasks.length,
|
|
238
|
+
blockers: blockers.length,
|
|
239
|
+
},
|
|
240
|
+
hashes: { inputs: hashes, task_order: sha256(tasks.map((task) => task.task_id).join("\n")) },
|
|
241
|
+
files: artifacts,
|
|
242
|
+
tasks,
|
|
243
|
+
blockers,
|
|
244
|
+
};
|
|
245
|
+
writeRows(artifacts.tasks, tasks);
|
|
246
|
+
writeRows(artifacts.blockers, blockers);
|
|
247
|
+
writeJson(artifacts.locks, {
|
|
248
|
+
schema_version: 1,
|
|
249
|
+
generated_at_utc: generated,
|
|
250
|
+
locks: tasks.map(({ task_id, entity_type, entity_id, version, lock_key }) => ({
|
|
251
|
+
task_id,
|
|
252
|
+
entity_type,
|
|
253
|
+
entity_id,
|
|
254
|
+
version,
|
|
255
|
+
lock_key,
|
|
256
|
+
status: "available",
|
|
257
|
+
})),
|
|
258
|
+
});
|
|
259
|
+
writeJson(artifacts.manifest, report);
|
|
260
|
+
return report;
|
|
261
|
+
}
|
|
@@ -2,7 +2,7 @@ import { createClassificationDecisionCommands } from "./decision-owners/classifi
|
|
|
2
2
|
import { createLocationDecisionCommands } from "./decision-owners/location.ts";
|
|
3
3
|
import { createIdentityDecisionTaskCommands } from "./decision-owners/identity-task.ts";
|
|
4
4
|
import { createIdentityDecisionCommands } from "./decision-owners/identity.ts";
|
|
5
|
-
import type
|
|
5
|
+
import { type FoundryRuntimeContext } from "./foundry-runtime-context.ts";
|
|
6
6
|
import type { QualifiedFoundryRuntime } from "./foundry-runtime-qualification.ts";
|
|
7
7
|
interface FoundryDecisionOwners {
|
|
8
8
|
classification: ReturnType<typeof createClassificationDecisionCommands>;
|
|
@@ -13,6 +13,7 @@ import { createLocationDecisionCommands } from "./decision-owners/location.js";
|
|
|
13
13
|
import { createIdentityDecisionTaskCommands } from "./decision-owners/identity-task.js";
|
|
14
14
|
import { createIdentityDecisionCommands } from "./decision-owners/identity.js";
|
|
15
15
|
import { runWorkflowLocalCliResult } from "./foundry-workflow-io.js";
|
|
16
|
+
import { FoundryContextError } from "./foundry-runtime-context.js";
|
|
16
17
|
/** Reuse the existing owners without loading the developer dispatcher or ambient CLI overrides. */
|
|
17
18
|
export function createFoundryDecisionOwners(context, qualified, temporary) {
|
|
18
19
|
const runtime = createFoundryRuntimeUtils({ parseScalar, repoRoot: context.assetRoot });
|
|
@@ -35,13 +36,20 @@ export function createFoundryDecisionOwners(context, qualified, temporary) {
|
|
|
35
36
|
profileFor,
|
|
36
37
|
runTiangongJsonStage(stage, argv) {
|
|
37
38
|
const result = runWorkflowLocalCliResult(context, qualified, temporary, argv);
|
|
38
|
-
return {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
39
|
+
return result.validate(() => {
|
|
40
|
+
const ownerStage = {
|
|
41
|
+
stage,
|
|
42
|
+
exit_code: result.exit,
|
|
43
|
+
report: result.report,
|
|
44
|
+
stderr: "",
|
|
45
|
+
status: String(result.report.status),
|
|
46
|
+
};
|
|
47
|
+
const reportFile = runtime.reportFileFromCliStage(ownerStage, ["files.report"], null);
|
|
48
|
+
if (!reportFile)
|
|
49
|
+
throw new FoundryContextError("workflow_report_invalid", "The local decision owner returned no existing report artifact.");
|
|
50
|
+
result.verifyReportFile(reportFile);
|
|
51
|
+
return ownerStage;
|
|
52
|
+
});
|
|
45
53
|
},
|
|
46
54
|
};
|
|
47
55
|
const classification = createClassificationDecisionCommands(dependencies);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type FoundryInputFact, type FoundryRuntimeContext } from "./foundry-runtime-context.ts";
|
|
2
|
+
import { type EdgeSupportPlan, type EdgeSupportTarget } from "./foundry-edge-support-plan.ts";
|
|
3
|
+
export declare function verifySelectedEdgeDraftPlan(context: FoundryRuntimeContext, plan: EdgeSupportPlan, approved: FoundryInputFact, target: EdgeSupportTarget): {
|
|
4
|
+
root: {
|
|
5
|
+
table: string;
|
|
6
|
+
id: string;
|
|
7
|
+
version: string;
|
|
8
|
+
payload_sha256: string;
|
|
9
|
+
references: {
|
|
10
|
+
table: string;
|
|
11
|
+
id: string;
|
|
12
|
+
version: string;
|
|
13
|
+
}[];
|
|
14
|
+
};
|
|
15
|
+
content: Record<string, unknown>;
|
|
16
|
+
beforeContent?: Record<string, unknown> | undefined;
|
|
17
|
+
}[];
|