@tiangong-lca/foundry 0.1.18 → 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/docs/package-distribution-contract.md +5 -5
- package/docs/public-runtime-contract.md +12 -0
- package/docs/runtime-context-contract.md +2 -0
- package/package-dist/assets/foundry-package-descriptor.json +268 -98
- package/package-dist/scripts/foundry-facade.js +3 -0
- package/package-dist/scripts/foundry-runtime.d.ts +1 -1
- package/package-dist/scripts/lib/decision-owners/identity-preflight.js +3 -1
- 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 +9 -0
- package/package-dist/scripts/lib/finalize-owners/post-authoring.js +37 -8
- package/package-dist/scripts/lib/foundry-authentication-environment.js +1 -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-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 +24 -2
- 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 +68 -2
- package/package-dist/scripts/lib/foundry-managed-authentication.js +1 -1
- 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 +2 -2
- package/package-dist/scripts/lib/foundry-package-contract.js +2 -2
- package/package-dist/scripts/lib/foundry-preparation-cli-validation.js +71 -0
- 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-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 +19 -1
- 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-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-workflow-assessment.js +67 -29
- package/package-dist/scripts/lib/foundry-workflow-authorization.js +82 -1
- package/package-dist/scripts/lib/foundry-workflow-context.js +59 -18
- package/package-dist/scripts/lib/foundry-workflow-execution.js +54 -5
- package/package-dist/scripts/lib/foundry-workflow-finalize.js +27 -3
- package/package-dist/scripts/lib/foundry-workflow-identity-stage.js +202 -161
- package/package-dist/scripts/lib/foundry-workflow-identity.js +16 -10
- package/package-dist/scripts/lib/foundry-workflow-io.js +27 -6
- 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 +41 -21
- package/package-dist/scripts/lib/identity-preflight-proof.d.ts +1 -0
- package/package-dist/scripts/lib/identity-preflight-proof.js +19 -12
- package/package-dist/scripts/lib/import-curation/internal/context-inputs.js +1 -1
- package/package.json +2 -2
- package/specs/schemas/foundry-managed-runtime.schema.json +1 -1
- package/specs/schemas/foundry-package-descriptor.schema.json +2 -2
- package/specs/schemas/runtime-qualification.schema.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type FoundryInputFact, type FoundryRuntimeContext } from "./foundry-runtime-context.ts";
|
|
2
|
+
import type { QualifiedFoundryRuntime } from "./foundry-runtime-qualification.ts";
|
|
3
|
+
import { type FoundryAuthentication } from "./foundry-authentication-environment.ts";
|
|
4
|
+
import { type FoundryRepairExpectation } from "./foundry-repair-preflight.ts";
|
|
5
|
+
export declare function readEdgeRepairValidation(report: Record<string, unknown>, expectation: FoundryRepairExpectation): Record<string, boolean>;
|
|
6
|
+
export declare function prepareEdgeProcessRepair(context: FoundryRuntimeContext, qualified: QualifiedFoundryRuntime, authentication: FoundryAuthentication, expectation: FoundryRepairExpectation, files: {
|
|
7
|
+
before: string;
|
|
8
|
+
candidate: string;
|
|
9
|
+
temporary: string;
|
|
10
|
+
directory: string;
|
|
11
|
+
}): Promise<{
|
|
12
|
+
schema: string;
|
|
13
|
+
input_path: string;
|
|
14
|
+
before: FoundryInputFact;
|
|
15
|
+
contract_sha256: string;
|
|
16
|
+
validation_sha256: string;
|
|
17
|
+
before_validation_sha256: string | null;
|
|
18
|
+
rule_verification: Record<string, boolean>;
|
|
19
|
+
reference_evidence: FoundryInputFact;
|
|
20
|
+
remote_before_sha256: string;
|
|
21
|
+
}>;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { captureFoundryInput, FoundryContextError, readFoundryInput, writeFoundryArtifact, } from "./foundry-runtime-context.js";
|
|
4
|
+
import { createFoundryEdgeActor } from "./foundry-edge-session.js";
|
|
5
|
+
import { buildEdgeSupportPlan } from "./foundry-edge-support-plan.js";
|
|
6
|
+
import { planFoundryEdgeSupportStage } from "./foundry-edge-support-planning.js";
|
|
7
|
+
import { verifyFoundryEdgeSupport } from "./foundry-edge-support.js";
|
|
8
|
+
import { createFoundryAuthenticationEnvironment, } from "./foundry-authentication-environment.js";
|
|
9
|
+
import { runFoundryTypedDatasetQa } from "./foundry-typed-flow-qa.js";
|
|
10
|
+
import { readRows } from "./import-curation/internal/runtime-io.js";
|
|
11
|
+
import { parseFoundryRepairValidateReport, } from "./foundry-repair-preflight.js";
|
|
12
|
+
import { sha256Json } from "./identity-preflight-proof.js";
|
|
13
|
+
import { workflowObject } from "./foundry-workflow-state.js";
|
|
14
|
+
const invalid = (message) => new FoundryContextError("repair_edge_preflight_invalid", message);
|
|
15
|
+
export function readEdgeRepairValidation(report, expectation) {
|
|
16
|
+
if (report.schema !== "tiangong-foundry.typed-process-qa.v1" || !Array.isArray(report.rows))
|
|
17
|
+
throw invalid("Expected the full typed Process validation evidence.");
|
|
18
|
+
parseFoundryRepairValidateReport(report, expectation);
|
|
19
|
+
const verification = {};
|
|
20
|
+
for (const raw of report.rows) {
|
|
21
|
+
const row = workflowObject(raw);
|
|
22
|
+
if (workflowObject(row.allocation_semantics).status !== "passed" ||
|
|
23
|
+
workflowObject(row.flow_reference_names).status !== "passed" ||
|
|
24
|
+
!Array.isArray(row.issues) ||
|
|
25
|
+
row.issues.some((issue) => workflowObject(issue).code !== "annual_supply_or_production_volume_missing"))
|
|
26
|
+
throw invalid("Repair must preserve qualified allocation, exact Flow names and all validation checks except the bounded unknown annual-volume gap.");
|
|
27
|
+
verification[String(row.payload_sha256)] = row.status === "passed";
|
|
28
|
+
}
|
|
29
|
+
return verification;
|
|
30
|
+
}
|
|
31
|
+
export async function prepareEdgeProcessRepair(context, qualified, authentication, expectation, files) {
|
|
32
|
+
const { before, candidate, temporary, directory } = files;
|
|
33
|
+
const actor = await createFoundryEdgeActor(context, qualified, authentication);
|
|
34
|
+
const receiptFile = path.join(directory, "identity-receipt.json");
|
|
35
|
+
const save = (file, value) => writeFoundryArtifact(context, file, JSON.stringify(value, null, 2) + "\n");
|
|
36
|
+
save(receiptFile, actor.receipt);
|
|
37
|
+
const candidateFact = captureFoundryInput(candidate);
|
|
38
|
+
const referenceDir = path.join(directory, "references");
|
|
39
|
+
const environment = createFoundryAuthenticationEnvironment(authentication, context.accountIntent?.sessionReference, process.env);
|
|
40
|
+
const references = (() => {
|
|
41
|
+
try {
|
|
42
|
+
return planFoundryEdgeSupportStage(context, qualified, environment, "process", "repair_preflight", ["--input", candidate, "--out-dir", referenceDir], true, receiptFile, candidateFact);
|
|
43
|
+
}
|
|
44
|
+
finally {
|
|
45
|
+
delete environment.TIANGONG_LCA_ACCESS_TOKEN;
|
|
46
|
+
}
|
|
47
|
+
})();
|
|
48
|
+
if (references.exit_code !== 0 || !references.referenceDocuments)
|
|
49
|
+
throw invalid("Every exact repair dependency must be independently readable.");
|
|
50
|
+
const referenceReport = references.report.files.report;
|
|
51
|
+
if (typeof referenceReport !== "string")
|
|
52
|
+
throw invalid("Repair dependency evidence is missing.");
|
|
53
|
+
const documents = path.join(directory, "validation-references.json");
|
|
54
|
+
save(documents, references.referenceDocuments);
|
|
55
|
+
const validate = (file, directory) => {
|
|
56
|
+
const validation = runFoundryTypedDatasetQa(context, qualified, temporary, save, "process", file, directory, {
|
|
57
|
+
referenceFiles: [documents],
|
|
58
|
+
readRowsFile: (file) => file === documents
|
|
59
|
+
? fs.readFileSync(documents, "utf8")
|
|
60
|
+
: readFoundryInput(context, file).toString("utf8"),
|
|
61
|
+
});
|
|
62
|
+
return JSON.parse(fs.readFileSync(validation.validationReportFile, "utf8"));
|
|
63
|
+
};
|
|
64
|
+
const complete = validate(candidate, path.join(directory, "validation"));
|
|
65
|
+
const ruleVerification = readEdgeRepairValidation(complete, expectation);
|
|
66
|
+
const requiresBeforeValidation = Object.values(ruleVerification).includes(false);
|
|
67
|
+
const beforeEvidence = requiresBeforeValidation
|
|
68
|
+
? validate(before, path.join(directory, "before-validation"))
|
|
69
|
+
: null;
|
|
70
|
+
if (beforeEvidence) {
|
|
71
|
+
const beforeRules = readEdgeRepairValidation(beforeEvidence, {
|
|
72
|
+
...expectation,
|
|
73
|
+
actions: expectation.actions.map((action) => ({
|
|
74
|
+
...action,
|
|
75
|
+
desired_sha256: action.before_sha256,
|
|
76
|
+
})),
|
|
77
|
+
});
|
|
78
|
+
if (expectation.actions.some((action) => !ruleVerification[action.desired_sha256] && beforeRules[action.before_sha256]))
|
|
79
|
+
throw invalid("The unknown annual-volume gap must already exist in the selected before draft.");
|
|
80
|
+
}
|
|
81
|
+
const read = (fact) => readRows(fact.path, (file) => readFoundryInput(context, file).toString("utf8"));
|
|
82
|
+
const candidateRows = read(candidateFact);
|
|
83
|
+
const beforeFact = captureFoundryInput(before);
|
|
84
|
+
const target = { project_ref: expectation.project_ref, user_id: expectation.owner_user_id };
|
|
85
|
+
const plan = buildEdgeSupportPlan("process", candidateFact, target, candidateRows, {
|
|
86
|
+
fact: captureFoundryInput(referenceReport),
|
|
87
|
+
report: references.report,
|
|
88
|
+
});
|
|
89
|
+
const beforePlan = buildEdgeSupportPlan("process", beforeFact, target, read(beforeFact));
|
|
90
|
+
const expected = new Map(expectation.actions.map((item) => [`${item.id}@${item.version}`, item]));
|
|
91
|
+
const roots = plan.roots.map((root) => {
|
|
92
|
+
const prior = beforePlan.roots.find((item) => item.id === root.id && item.version === root.version);
|
|
93
|
+
const action = expected.get(`${root.id}@${root.version}`);
|
|
94
|
+
if (!prior ||
|
|
95
|
+
!action ||
|
|
96
|
+
prior.payload_sha256 !== action.before_sha256 ||
|
|
97
|
+
root.payload_sha256 !== action.desired_sha256)
|
|
98
|
+
throw invalid("Guarded update roots must match the exact reviewed contract.");
|
|
99
|
+
return { ...root, payload_sha256: prior.payload_sha256 };
|
|
100
|
+
});
|
|
101
|
+
// The repair scope has already bound every exact reference occurrence in both documents.
|
|
102
|
+
// An older visible dependency can be retained with the same content, owner and state.
|
|
103
|
+
const checked = await verifyFoundryEdgeSupport(actor, { ...plan, roots }, "after", true);
|
|
104
|
+
save(path.join(directory, "edge-before.json"), checked.responses);
|
|
105
|
+
if (checked.blockers.length)
|
|
106
|
+
throw invalid("Current draft or a dependency differs from the exact before snapshot.");
|
|
107
|
+
const report = {
|
|
108
|
+
schema: "tiangong-foundry.edge-repair-preflight.v1",
|
|
109
|
+
input_path: candidate,
|
|
110
|
+
before: beforeFact,
|
|
111
|
+
contract_sha256: expectation.contract_sha256,
|
|
112
|
+
validation_sha256: sha256Json(complete),
|
|
113
|
+
before_validation_sha256: beforeEvidence ? sha256Json(beforeEvidence) : null,
|
|
114
|
+
rule_verification: ruleVerification,
|
|
115
|
+
reference_evidence: captureFoundryInput(referenceReport),
|
|
116
|
+
remote_before_sha256: sha256Json(checked.responses),
|
|
117
|
+
};
|
|
118
|
+
save(path.join(directory, "owner-report.json"), report);
|
|
119
|
+
return report;
|
|
120
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type FoundryRuntimeContext } from "./foundry-runtime-context.ts";
|
|
2
|
+
import type { QualifiedFoundryRuntime } from "./foundry-runtime-qualification.ts";
|
|
3
|
+
import { type FoundryAuthentication } from "./foundry-runtime-identity.ts";
|
|
4
|
+
type IdentityEndpoint = "flow_hybrid_search" | "process_hybrid_search";
|
|
5
|
+
type EdgeEndpoint = IdentityEndpoint | "app_dataset_create" | "app_dataset_save_draft" | "app_dataset_verify_remote";
|
|
6
|
+
export declare function foundryEdgeProjectOrigin(value: string): string;
|
|
7
|
+
export declare function createFoundryEdgeActor(context: FoundryRuntimeContext, qualified: QualifiedFoundryRuntime, authentication: FoundryAuthentication): Promise<{
|
|
8
|
+
receipt: import("@tiangong-lca/cli/auth-identity-receipt").AuthIdentityReceipt;
|
|
9
|
+
post(endpoint: EdgeEndpoint, body: Record<string, unknown>): Promise<unknown>;
|
|
10
|
+
}>;
|
|
11
|
+
export declare function queryFoundryEdgeIdentity(context: FoundryRuntimeContext, qualified: QualifiedFoundryRuntime, authentication: FoundryAuthentication, endpoint: IdentityEndpoint, body: Record<string, unknown>): Promise<{
|
|
12
|
+
receipt: import("@tiangong-lca/cli/auth-identity-receipt").AuthIdentityReceipt;
|
|
13
|
+
result: unknown;
|
|
14
|
+
}>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { FoundryContextError } from "./foundry-runtime-context.js";
|
|
2
|
+
import { assertVerifiedFoundryIdentity, verifyFoundryRuntimeIdentity, } from "./foundry-runtime-identity.js";
|
|
3
|
+
import { resolveFoundryEdgeOAuth } from "./foundry-edge-oauth.js";
|
|
4
|
+
export function foundryEdgeProjectOrigin(value) {
|
|
5
|
+
const url = new URL(value);
|
|
6
|
+
if (!["https:", "http:"].includes(url.protocol) ||
|
|
7
|
+
url.username ||
|
|
8
|
+
url.password ||
|
|
9
|
+
url.search ||
|
|
10
|
+
url.hash ||
|
|
11
|
+
!["", "/functions/v1", "/rest/v1"].includes(url.pathname.replace(/\/+$/u, "")))
|
|
12
|
+
throw new FoundryContextError("edge_project_invalid", "Expected an explicit project base URL.");
|
|
13
|
+
return url.origin;
|
|
14
|
+
}
|
|
15
|
+
export async function createFoundryEdgeActor(context, qualified, authentication) {
|
|
16
|
+
const credentials = authentication.mode === "headless"
|
|
17
|
+
? { ...authentication }
|
|
18
|
+
: {
|
|
19
|
+
...authentication,
|
|
20
|
+
configuration: { ...authentication.configuration },
|
|
21
|
+
};
|
|
22
|
+
const identity = verifyFoundryRuntimeIdentity(context, credentials, process.env, qualified);
|
|
23
|
+
const verifiedOrigin = foundryEdgeProjectOrigin(identity.receipt.project.project_base_url);
|
|
24
|
+
const configured = credentials.mode === "headless" ? credentials.apiBaseUrl : credentials.configuration.apiBaseUrl;
|
|
25
|
+
const origin = configured ? foundryEdgeProjectOrigin(configured) : verifiedOrigin;
|
|
26
|
+
if (origin !== verifiedOrigin)
|
|
27
|
+
throw new FoundryContextError("edge_project_mismatch", "Edge target must match the verified operator project.");
|
|
28
|
+
const token = credentials.mode === "headless"
|
|
29
|
+
? credentials.accessToken
|
|
30
|
+
: await resolveFoundryEdgeOAuth(origin, identity.receipt.identity.user_id, credentials.configuration);
|
|
31
|
+
const publishableKey = credentials.mode === "headless"
|
|
32
|
+
? credentials.publishableKey
|
|
33
|
+
: credentials.configuration.publishableKey;
|
|
34
|
+
// Browser authorization can take longer than the CLI receipt window.
|
|
35
|
+
const current = credentials.mode === "headless"
|
|
36
|
+
? identity
|
|
37
|
+
: verifyFoundryRuntimeIdentity(context, credentials, process.env, qualified);
|
|
38
|
+
if (foundryEdgeProjectOrigin(current.receipt.project.project_base_url) !== origin)
|
|
39
|
+
throw new FoundryContextError("edge_project_mismatch", "The OAuth project changed during authentication.");
|
|
40
|
+
return {
|
|
41
|
+
receipt: current.receipt,
|
|
42
|
+
async post(endpoint, body) {
|
|
43
|
+
assertVerifiedFoundryIdentity(context, current, qualified);
|
|
44
|
+
const url = new URL(`/functions/v1/${endpoint}`, origin);
|
|
45
|
+
const response = await fetch(url, {
|
|
46
|
+
method: "POST",
|
|
47
|
+
headers: {
|
|
48
|
+
Authorization: `Bearer ${token}`,
|
|
49
|
+
...(publishableKey ? { apikey: publishableKey } : {}),
|
|
50
|
+
"Content-Type": "application/json",
|
|
51
|
+
Accept: "application/json",
|
|
52
|
+
},
|
|
53
|
+
redirect: "error",
|
|
54
|
+
signal: AbortSignal.timeout(30_000),
|
|
55
|
+
body: JSON.stringify(body),
|
|
56
|
+
});
|
|
57
|
+
if (!response.ok && !(endpoint === "app_dataset_verify_remote" && response.status === 409))
|
|
58
|
+
throw new FoundryContextError("edge_request_failed", "The selected Edge request was rejected.");
|
|
59
|
+
const text = await response.text();
|
|
60
|
+
if (Buffer.byteLength(text) > 8 * 1024 * 1024)
|
|
61
|
+
throw new FoundryContextError("edge_response_invalid", "The Edge response exceeds the evidence limit.");
|
|
62
|
+
return JSON.parse(text);
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
export async function queryFoundryEdgeIdentity(context, qualified, authentication, endpoint, body) {
|
|
67
|
+
const actor = await createFoundryEdgeActor(context, qualified, authentication);
|
|
68
|
+
return { receipt: actor.receipt, result: await actor.post(endpoint, body) };
|
|
69
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { type FoundryInputFact } from "./foundry-runtime-context.ts";
|
|
2
|
+
import { type EdgeReferenceSnapshot } from "./foundry-edge-reference-intent.ts";
|
|
3
|
+
declare const schema = "tiangong-foundry.edge-support-create.v1";
|
|
4
|
+
declare const edgeDraftTypes: readonly ["unitgroup", "flowproperty", "process", "contact", "source", "flow", "lifecyclemodel"];
|
|
5
|
+
export type EdgeDraftType = (typeof edgeDraftTypes)[number];
|
|
6
|
+
export declare const isFoundryEdgeDraftType: (value: unknown) => value is EdgeDraftType;
|
|
7
|
+
export type EdgeSupportTarget = {
|
|
8
|
+
project_ref: string;
|
|
9
|
+
user_id: string;
|
|
10
|
+
};
|
|
11
|
+
type ExactKey = {
|
|
12
|
+
table: string;
|
|
13
|
+
id: string;
|
|
14
|
+
version: string;
|
|
15
|
+
};
|
|
16
|
+
export type EdgeSupportRoot = ExactKey & {
|
|
17
|
+
payload_sha256: string;
|
|
18
|
+
before_sha256?: string;
|
|
19
|
+
flow_head?: EdgeReferenceSnapshot | null;
|
|
20
|
+
references: Array<ExactKey & {
|
|
21
|
+
payload_sha256?: string;
|
|
22
|
+
expected_state_code?: number;
|
|
23
|
+
expected_owner?: string | null;
|
|
24
|
+
reviewed_latest?: EdgeReferenceSnapshot;
|
|
25
|
+
}>;
|
|
26
|
+
};
|
|
27
|
+
export type EdgeUpdateBinding = {
|
|
28
|
+
before: FoundryInputFact;
|
|
29
|
+
contract: FoundryInputFact;
|
|
30
|
+
preparation: FoundryInputFact;
|
|
31
|
+
rule_verification: Record<string, boolean>;
|
|
32
|
+
};
|
|
33
|
+
type EdgeUpdateInput = {
|
|
34
|
+
binding: EdgeUpdateBinding;
|
|
35
|
+
rows: unknown[];
|
|
36
|
+
};
|
|
37
|
+
export type EdgeSupportPlan = {
|
|
38
|
+
schema: typeof schema;
|
|
39
|
+
dataset_type: EdgeDraftType;
|
|
40
|
+
input: FoundryInputFact;
|
|
41
|
+
project_ref: string;
|
|
42
|
+
user_id: string;
|
|
43
|
+
state_code: 0;
|
|
44
|
+
roots: EdgeSupportRoot[];
|
|
45
|
+
reference_evidence?: FoundryInputFact;
|
|
46
|
+
reference_intent?: FoundryInputFact[];
|
|
47
|
+
insert_contract?: FoundryInputFact;
|
|
48
|
+
update?: EdgeUpdateBinding;
|
|
49
|
+
sha256: string;
|
|
50
|
+
};
|
|
51
|
+
type ReferenceEvidence = {
|
|
52
|
+
fact: FoundryInputFact;
|
|
53
|
+
report: unknown;
|
|
54
|
+
};
|
|
55
|
+
export declare function buildEdgeSupportPlan(type: EdgeDraftType, input: FoundryInputFact, target: EdgeSupportTarget, rows: unknown[], evidence?: ReferenceEvidence, update?: EdgeUpdateInput, insertContract?: FoundryInputFact): EdgeSupportPlan;
|
|
56
|
+
export declare function isNextFlowVersion(current: string, desired: string): boolean;
|
|
57
|
+
export declare function isEdgeSupportPlan(value: unknown): value is EdgeSupportPlan;
|
|
58
|
+
export declare function verifyEdgeSupportPlan(plan: EdgeSupportPlan, approved: FoundryInputFact, target: EdgeSupportTarget, rows: unknown[], evidence?: ReferenceEvidence, update?: EdgeUpdateInput, insertContract?: FoundryInputFact): {
|
|
59
|
+
root: {
|
|
60
|
+
table: string;
|
|
61
|
+
id: string;
|
|
62
|
+
version: string;
|
|
63
|
+
payload_sha256: string;
|
|
64
|
+
references: ExactKey[];
|
|
65
|
+
};
|
|
66
|
+
content: Record<string, unknown>;
|
|
67
|
+
beforeContent?: Record<string, unknown> | undefined;
|
|
68
|
+
}[];
|
|
69
|
+
export {};
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import { bundleRowTypes } from "./bundle-row-types.js";
|
|
2
|
+
import { isAbsolute } from "node:path";
|
|
3
|
+
import { FoundryContextError } from "./foundry-runtime-context.js";
|
|
4
|
+
import { sha256Json } from "./identity-preflight-proof.js";
|
|
5
|
+
import { dataSetInformation, datasetRoot, unwrapDatasetPayload, } from "./import-curation/internal/dataset-payload.js";
|
|
6
|
+
import { collectDatasetReferences } from "./import-curation/internal/workflow-reference-closure.js";
|
|
7
|
+
import { edgeReferenceKey, readEdgeReferenceSnapshot, } from "./foundry-edge-reference-intent.js";
|
|
8
|
+
const schema = "tiangong-foundry.edge-support-create.v1";
|
|
9
|
+
const uuid = /^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/u;
|
|
10
|
+
const versionPattern = /^\d{2}\.\d{2}\.\d{3}$/u;
|
|
11
|
+
const hash = /^[a-f0-9]{64}$/u;
|
|
12
|
+
const referenceTables = [
|
|
13
|
+
"contacts",
|
|
14
|
+
"sources",
|
|
15
|
+
"unitgroups",
|
|
16
|
+
"flowproperties",
|
|
17
|
+
"flows",
|
|
18
|
+
"processes",
|
|
19
|
+
"lifecyclemodels",
|
|
20
|
+
"lciamethods",
|
|
21
|
+
];
|
|
22
|
+
const edgeDraftTypes = [
|
|
23
|
+
"unitgroup",
|
|
24
|
+
"flowproperty",
|
|
25
|
+
"process",
|
|
26
|
+
"contact",
|
|
27
|
+
"source",
|
|
28
|
+
"flow",
|
|
29
|
+
"lifecyclemodel",
|
|
30
|
+
];
|
|
31
|
+
export const isFoundryEdgeDraftType = (value) => edgeDraftTypes.some((type) => type === value);
|
|
32
|
+
function invalid(message) {
|
|
33
|
+
throw new FoundryContextError("edge_support_plan_invalid", message);
|
|
34
|
+
}
|
|
35
|
+
function object(value) {
|
|
36
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
37
|
+
return invalid("Edge draft plan requires structured objects.");
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
function exactKey(table, id, version) {
|
|
41
|
+
if (typeof table !== "string" ||
|
|
42
|
+
!referenceTables.includes(table) ||
|
|
43
|
+
typeof id !== "string" ||
|
|
44
|
+
!uuid.test(id) ||
|
|
45
|
+
typeof version !== "string" ||
|
|
46
|
+
!versionPattern.test(version))
|
|
47
|
+
return invalid("Every draft and dependency must select an exact UUID and version.");
|
|
48
|
+
return { table, id, version };
|
|
49
|
+
}
|
|
50
|
+
function rootsFor(type, rows) {
|
|
51
|
+
if (!rows.length)
|
|
52
|
+
return invalid("Edge draft plan requires at least one approved dataset row.");
|
|
53
|
+
const seen = new Set();
|
|
54
|
+
const table = bundleRowTypes[type].plural;
|
|
55
|
+
return rows.map((row) => {
|
|
56
|
+
const content = object(unwrapDatasetPayload(row, type));
|
|
57
|
+
const root = datasetRoot(content, type);
|
|
58
|
+
const own = object(object(root.administrativeInformation).publicationAndOwnership);
|
|
59
|
+
const key = exactKey(table, dataSetInformation(root, type)["common:UUID"], own["common:dataSetVersion"]);
|
|
60
|
+
const envelope = object(row);
|
|
61
|
+
if ((envelope.id !== undefined && envelope.id !== key.id) ||
|
|
62
|
+
(envelope.version !== undefined && envelope.version !== key.version) ||
|
|
63
|
+
seen.has(key.id))
|
|
64
|
+
return invalid("The approved rows contain an ambiguous identity or multiple versions.");
|
|
65
|
+
seen.add(key.id);
|
|
66
|
+
const refs = collectDatasetReferences(content);
|
|
67
|
+
if (type === "flowproperty") {
|
|
68
|
+
const unitGroup = refs.filter((ref) => ref.path.endsWith("/quantitativeReference/referenceToReferenceUnitGroup"));
|
|
69
|
+
if (unitGroup.length !== 1 || unitGroup[0].table !== "unitgroups")
|
|
70
|
+
return invalid("FlowProperty creation requires one exact reference UnitGroup.");
|
|
71
|
+
}
|
|
72
|
+
const references = new Map();
|
|
73
|
+
for (const ref of refs) {
|
|
74
|
+
const exact = exactKey(ref.table, ref.id, ref.version);
|
|
75
|
+
references.set(`${exact.table}:${exact.id}@${exact.version}`, exact);
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
root: { ...key, payload_sha256: sha256Json(content), references: [...references.values()] },
|
|
79
|
+
content,
|
|
80
|
+
};
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
export function buildEdgeSupportPlan(type, input, target, rows, evidence, update, insertContract) {
|
|
84
|
+
if (!isAbsolute(input.path) ||
|
|
85
|
+
!hash.test(input.sha256) ||
|
|
86
|
+
!Number.isSafeInteger(input.bytes) ||
|
|
87
|
+
input.bytes < 1)
|
|
88
|
+
return invalid("The Edge draft plan requires exact approved input bytes.");
|
|
89
|
+
if (!target.project_ref || !uuid.test(target.user_id))
|
|
90
|
+
return invalid("The Edge draft plan requires an exact project and owner.");
|
|
91
|
+
const documents = rootsFor(type, rows);
|
|
92
|
+
const payload = {
|
|
93
|
+
schema,
|
|
94
|
+
dataset_type: type,
|
|
95
|
+
input,
|
|
96
|
+
project_ref: target.project_ref,
|
|
97
|
+
user_id: target.user_id,
|
|
98
|
+
state_code: 0,
|
|
99
|
+
roots: documents.map(({ root }) => root),
|
|
100
|
+
};
|
|
101
|
+
if (evidence) {
|
|
102
|
+
const report = object(evidence.report);
|
|
103
|
+
if (report.schema !== "tiangong-foundry.edge-support-precommit.v1" ||
|
|
104
|
+
report.status !== "passed_remote_verification" ||
|
|
105
|
+
report.input_path !== input.path ||
|
|
106
|
+
report.edge_plan_sha256 !== sha256Json(payload) ||
|
|
107
|
+
!Array.isArray(report.checks))
|
|
108
|
+
return invalid("Reference evidence must verify all dependencies for these final rows.");
|
|
109
|
+
const checks = report.checks.map(object);
|
|
110
|
+
if (type === "flow") {
|
|
111
|
+
const heads = report.flow_heads;
|
|
112
|
+
if (!Array.isArray(heads) || heads.length !== payload.roots.length)
|
|
113
|
+
return invalid("Flow planning requires one observed head for every approved identity.");
|
|
114
|
+
payload.roots.forEach((root, index) => {
|
|
115
|
+
const observed = object(heads[index]);
|
|
116
|
+
if (observed.id !== root.id)
|
|
117
|
+
invalid("The observed Flow head belongs to another identity.");
|
|
118
|
+
root.flow_head =
|
|
119
|
+
observed.head === null ? null : readEdgeReferenceSnapshot(observed.head, target.user_id);
|
|
120
|
+
if (root.flow_head &&
|
|
121
|
+
(root.flow_head.table !== root.table ||
|
|
122
|
+
root.flow_head.id !== root.id ||
|
|
123
|
+
!isNextFlowVersion(root.flow_head.version, root.version)))
|
|
124
|
+
invalid("A new Flow version must immediately follow its verified current head.");
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
const reviewed = new Map();
|
|
128
|
+
if (report.reference_intent) {
|
|
129
|
+
const intent = object(report.reference_intent);
|
|
130
|
+
if (!Array.isArray(intent.references) ||
|
|
131
|
+
!intent.references.length ||
|
|
132
|
+
!Array.isArray(intent.review_files) ||
|
|
133
|
+
!intent.review_files.length)
|
|
134
|
+
return invalid("Explicit reference intent requires the selected review artifacts.");
|
|
135
|
+
for (const raw of intent.references) {
|
|
136
|
+
const reference = object(raw);
|
|
137
|
+
const selected = readEdgeReferenceSnapshot(reference.selected, target.user_id);
|
|
138
|
+
const latest = readEdgeReferenceSnapshot(object(reference.review).latest, target.user_id);
|
|
139
|
+
reviewed.set(edgeReferenceKey(selected), { selected, latest });
|
|
140
|
+
}
|
|
141
|
+
payload.reference_intent = [intent.file, ...intent.review_files].map((raw) => {
|
|
142
|
+
const fact = object(raw);
|
|
143
|
+
if (typeof fact.path !== "string" ||
|
|
144
|
+
!isAbsolute(fact.path) ||
|
|
145
|
+
typeof fact.sha256 !== "string" ||
|
|
146
|
+
!hash.test(fact.sha256) ||
|
|
147
|
+
typeof fact.bytes !== "number" ||
|
|
148
|
+
!Number.isSafeInteger(fact.bytes) ||
|
|
149
|
+
fact.bytes < 1)
|
|
150
|
+
return invalid("Explicit reference artifacts require exact file facts.");
|
|
151
|
+
return { path: fact.path, sha256: fact.sha256, bytes: fact.bytes };
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
for (const root of payload.roots) {
|
|
155
|
+
root.references = root.references.map((reference) => {
|
|
156
|
+
const selected = checks.filter((check) => check.table === reference.table &&
|
|
157
|
+
check.id === reference.id &&
|
|
158
|
+
check.version === reference.version);
|
|
159
|
+
const check = selected[0];
|
|
160
|
+
const review = reviewed.get(edgeReferenceKey(reference));
|
|
161
|
+
if (selected.length !== 1 ||
|
|
162
|
+
check.role !== "reference" ||
|
|
163
|
+
check.status !== "ok" ||
|
|
164
|
+
typeof check.remote_payload_sha256 !== "string" ||
|
|
165
|
+
!hash.test(check.remote_payload_sha256) ||
|
|
166
|
+
!([100, 200].includes(Number(check.remote_state_code)) ||
|
|
167
|
+
(check.remote_state_code === 0 && check.remote_user_id === target.user_id)))
|
|
168
|
+
return invalid("A sealed draft dependency lacks exact owner and content evidence.");
|
|
169
|
+
if (review &&
|
|
170
|
+
(sha256Json(check.reviewed_latest) !== sha256Json(review.latest) ||
|
|
171
|
+
check.remote_payload_sha256 !== review.selected.payload_sha256 ||
|
|
172
|
+
check.remote_state_code !== review.selected.state_code ||
|
|
173
|
+
check.remote_user_id !== review.selected.user_id))
|
|
174
|
+
return invalid("Reviewed dependency evidence differs from the selected and latest snapshots.");
|
|
175
|
+
return {
|
|
176
|
+
...reference,
|
|
177
|
+
payload_sha256: check.remote_payload_sha256,
|
|
178
|
+
expected_state_code: Number(check.remote_state_code),
|
|
179
|
+
expected_owner: typeof check.remote_user_id === "string" ? check.remote_user_id : null,
|
|
180
|
+
...(review ? { reviewed_latest: review.latest } : {}),
|
|
181
|
+
};
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
payload.reference_evidence = evidence.fact;
|
|
185
|
+
}
|
|
186
|
+
if (update) {
|
|
187
|
+
if (type !== "process")
|
|
188
|
+
return invalid("Guarded Edge updates require a Process repair scope.");
|
|
189
|
+
const before = beforeFor(documents, update.rows);
|
|
190
|
+
payload.roots.forEach((root, index) => {
|
|
191
|
+
root.before_sha256 = sha256Json(before[index].content);
|
|
192
|
+
if (typeof update.binding.rule_verification[root.payload_sha256] !== "boolean")
|
|
193
|
+
invalid("Every update must preserve its approved validation result.");
|
|
194
|
+
});
|
|
195
|
+
if (payload.roots.every((root) => root.before_sha256 === root.payload_sha256))
|
|
196
|
+
return invalid("An unchanged draft does not require a guarded update.");
|
|
197
|
+
payload.update = update.binding;
|
|
198
|
+
}
|
|
199
|
+
if (insertContract) {
|
|
200
|
+
if (update || !["flow", "process", "source"].includes(type))
|
|
201
|
+
return invalid("An explicit insert contract must select eligible final rows.");
|
|
202
|
+
payload.insert_contract = insertContract;
|
|
203
|
+
}
|
|
204
|
+
return { ...payload, sha256: sha256Json(payload) };
|
|
205
|
+
}
|
|
206
|
+
export function isNextFlowVersion(current, desired) {
|
|
207
|
+
if (!versionPattern.test(current) || !versionPattern.test(desired))
|
|
208
|
+
return false;
|
|
209
|
+
const sequence = (value) => Number(value.replaceAll(".", ""));
|
|
210
|
+
return sequence(desired) === sequence(current) + 1;
|
|
211
|
+
}
|
|
212
|
+
function beforeFor(documents, rows) {
|
|
213
|
+
const previous = rootsFor("process", rows);
|
|
214
|
+
if (previous.length !== documents.length)
|
|
215
|
+
return invalid("Guarded update requires one before document for every exact target.");
|
|
216
|
+
const occurrences = (content) => collectDatasetReferences(content)
|
|
217
|
+
.map(({ table, id, version, path }) => sha256Json({ table, id, version, path }))
|
|
218
|
+
.sort();
|
|
219
|
+
return documents.map(({ root, content }) => {
|
|
220
|
+
const selected = previous.find((item) => item.root.id === root.id && item.root.version === root.version);
|
|
221
|
+
if (!selected || sha256Json(occurrences(selected.content)) !== sha256Json(occurrences(content)))
|
|
222
|
+
return invalid("Before and desired draft references must select the same exact dependencies.");
|
|
223
|
+
return selected;
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
export function isEdgeSupportPlan(value) {
|
|
227
|
+
if (!value || typeof value !== "object" || !("schema" in value))
|
|
228
|
+
return false;
|
|
229
|
+
return value.schema === schema;
|
|
230
|
+
}
|
|
231
|
+
export function verifyEdgeSupportPlan(plan, approved, target, rows, evidence, update, insertContract) {
|
|
232
|
+
if (!evidence || !plan.reference_evidence)
|
|
233
|
+
return invalid("Edge draft execution requires sealed exact dependency evidence.");
|
|
234
|
+
if (!isFoundryEdgeDraftType(plan.dataset_type))
|
|
235
|
+
return invalid("Edge creation requires a supported dataset scope.");
|
|
236
|
+
const current = buildEdgeSupportPlan(plan.dataset_type, approved, target, rows, evidence, update, insertContract);
|
|
237
|
+
if (sha256Json(current) !== sha256Json(plan))
|
|
238
|
+
return invalid("The sealed Edge draft plan disagrees with the task approval or final rows.");
|
|
239
|
+
const documents = rootsFor(plan.dataset_type, rows);
|
|
240
|
+
const before = update && beforeFor(documents, update.rows);
|
|
241
|
+
return documents.map((item, index) => ({
|
|
242
|
+
...item,
|
|
243
|
+
...(before ? { beforeContent: before[index].content } : {}),
|
|
244
|
+
}));
|
|
245
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { type EdgeDraftType } from "./foundry-edge-support-plan.ts";
|
|
2
|
+
import { type FoundryInputFact, type FoundryRuntimeContext } from "./foundry-runtime-context.ts";
|
|
3
|
+
import type { QualifiedFoundryRuntime } from "./foundry-runtime-qualification.ts";
|
|
4
|
+
export declare function planFoundryEdgeSupportStage(context: FoundryRuntimeContext, qualified: QualifiedFoundryRuntime, environment: NodeJS.ProcessEnv, type: EdgeDraftType, stage: string, source: readonly string[], verifyDependencies: boolean, receiptFile: string | undefined, selectedInput?: FoundryInputFact): {
|
|
5
|
+
stage: string;
|
|
6
|
+
status: string;
|
|
7
|
+
report: {
|
|
8
|
+
schema: string;
|
|
9
|
+
status: string;
|
|
10
|
+
mode: string;
|
|
11
|
+
dry_run: boolean;
|
|
12
|
+
commit: boolean;
|
|
13
|
+
input_path: string;
|
|
14
|
+
counts: {
|
|
15
|
+
selected: number;
|
|
16
|
+
executed: number;
|
|
17
|
+
failed: number;
|
|
18
|
+
};
|
|
19
|
+
files: {
|
|
20
|
+
summary_json: string;
|
|
21
|
+
progress_jsonl: string;
|
|
22
|
+
report?: string | undefined;
|
|
23
|
+
success_list?: string | undefined;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
exit_code: number;
|
|
27
|
+
command: string;
|
|
28
|
+
args: never[];
|
|
29
|
+
stderr: string;
|
|
30
|
+
referenceDocuments?: undefined;
|
|
31
|
+
} | {
|
|
32
|
+
stage: string;
|
|
33
|
+
status: string;
|
|
34
|
+
report: {
|
|
35
|
+
schema: string;
|
|
36
|
+
status: string;
|
|
37
|
+
input_path: string;
|
|
38
|
+
edge_plan_sha256: string;
|
|
39
|
+
checks: {
|
|
40
|
+
table: string;
|
|
41
|
+
id: string;
|
|
42
|
+
version: string;
|
|
43
|
+
payload_sha256?: string;
|
|
44
|
+
expected_state_code?: number;
|
|
45
|
+
expected_owner?: string | null;
|
|
46
|
+
reviewed_latest?: import("./foundry-edge-reference-intent.ts").EdgeReferenceSnapshot;
|
|
47
|
+
role: string;
|
|
48
|
+
status: string;
|
|
49
|
+
}[];
|
|
50
|
+
blockers: {
|
|
51
|
+
table: string;
|
|
52
|
+
id: string;
|
|
53
|
+
version: string;
|
|
54
|
+
payload_sha256?: string;
|
|
55
|
+
expected_state_code?: number;
|
|
56
|
+
expected_owner?: string | null;
|
|
57
|
+
reviewed_latest?: import("./foundry-edge-reference-intent.ts").EdgeReferenceSnapshot;
|
|
58
|
+
role: string;
|
|
59
|
+
status: string;
|
|
60
|
+
code: string;
|
|
61
|
+
}[];
|
|
62
|
+
counts: {
|
|
63
|
+
rows: number;
|
|
64
|
+
blockers: number;
|
|
65
|
+
};
|
|
66
|
+
reference_intent?: {
|
|
67
|
+
file: {
|
|
68
|
+
path: string;
|
|
69
|
+
sha256: string;
|
|
70
|
+
bytes: number;
|
|
71
|
+
};
|
|
72
|
+
project_ref: string;
|
|
73
|
+
actor_user_id: string;
|
|
74
|
+
consumers: {
|
|
75
|
+
row_index: number;
|
|
76
|
+
table: string;
|
|
77
|
+
id: string;
|
|
78
|
+
version: string;
|
|
79
|
+
payload_sha256: string;
|
|
80
|
+
}[];
|
|
81
|
+
references: {
|
|
82
|
+
row_index: number;
|
|
83
|
+
path: string;
|
|
84
|
+
selected: import("./foundry-edge-reference-intent.ts").EdgeReferenceSnapshot;
|
|
85
|
+
review: {
|
|
86
|
+
file: FoundryInputFact;
|
|
87
|
+
latest: import("./foundry-edge-reference-intent.ts").EdgeReferenceSnapshot;
|
|
88
|
+
};
|
|
89
|
+
}[];
|
|
90
|
+
review_files: FoundryInputFact[];
|
|
91
|
+
} | undefined;
|
|
92
|
+
flow_heads?: ({
|
|
93
|
+
id: string;
|
|
94
|
+
head: null;
|
|
95
|
+
} | {
|
|
96
|
+
id: string;
|
|
97
|
+
head: {
|
|
98
|
+
table: string;
|
|
99
|
+
id: string;
|
|
100
|
+
version: string;
|
|
101
|
+
user_id: string;
|
|
102
|
+
state_code: number;
|
|
103
|
+
payload_sha256: string;
|
|
104
|
+
};
|
|
105
|
+
})[] | undefined;
|
|
106
|
+
files: {
|
|
107
|
+
report: string;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
exit_code: number;
|
|
111
|
+
referenceDocuments: unknown[];
|
|
112
|
+
command: string;
|
|
113
|
+
args: never[];
|
|
114
|
+
stderr: string;
|
|
115
|
+
};
|