@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
|
@@ -34,7 +34,7 @@ function publicCommand(argv) {
|
|
|
34
34
|
return { operation: "workspace.init", args: parseArgs(rest) };
|
|
35
35
|
if (group === "workspace" && action === "migrate")
|
|
36
36
|
return { operation: "workspace.migrate", args: parseArgs(rest) };
|
|
37
|
-
if (group === "task" && ["start", "status", "resume"].includes(action))
|
|
37
|
+
if (group === "task" && ["start", "status", "resume", "adopt-runtime"].includes(action))
|
|
38
38
|
return { operation: `task.${action}`, args: parseArgs(rest) };
|
|
39
39
|
if (group === "workspace" || group === "task")
|
|
40
40
|
return { operation: "unknown", args: parseArgs([action, ...rest].filter(Boolean)) };
|
|
@@ -126,10 +126,14 @@ async function runPublicCommand(parsed, host) {
|
|
|
126
126
|
"authorizationInput",
|
|
127
127
|
"referenceInput",
|
|
128
128
|
"interactionInput",
|
|
129
|
+
"identityStageInput",
|
|
130
|
+
"qualityReviewInput",
|
|
129
131
|
]
|
|
130
|
-
: parsed.operation === "task.
|
|
131
|
-
? ["task", "actor"]
|
|
132
|
-
:
|
|
132
|
+
: parsed.operation === "task.adopt-runtime"
|
|
133
|
+
? ["task", "actor", "dryRun", "apply", "audit", "selection", "plan"]
|
|
134
|
+
: parsed.operation === "task.status"
|
|
135
|
+
? ["task", "actor"]
|
|
136
|
+
: []),
|
|
133
137
|
]);
|
|
134
138
|
const unknownOption = Object.keys(parsed.args).find((key) => !allowed.has(key));
|
|
135
139
|
if (unknownOption)
|
|
@@ -147,6 +151,7 @@ async function runPublicCommand(parsed, host) {
|
|
|
147
151
|
authentication: host.authentication,
|
|
148
152
|
workspaceAccess: host.workspaceAccess,
|
|
149
153
|
runtimeManager: host.runtimeManager,
|
|
154
|
+
runtimeAdoptionQualification: host.runtimeAdoptionQualification,
|
|
150
155
|
accountIntent: parsed.operation === "doctor"
|
|
151
156
|
? (doctorAccountIntent(parsed.args) ?? host.accountIntent)
|
|
152
157
|
: host.accountIntent,
|
|
@@ -298,17 +303,39 @@ async function runPublicCommand(parsed, host) {
|
|
|
298
303
|
const actorId = option(parsed.args.actor, "--actor");
|
|
299
304
|
if (!taskId || !actorId)
|
|
300
305
|
return invalidResult(parsed.operation, taskId, "argument_task_actor_required", "Task status and resume require exact --task and --actor values.");
|
|
301
|
-
|
|
302
|
-
parsed.
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
306
|
+
if (parsed.operation === "task.adopt-runtime") {
|
|
307
|
+
const modes = [parsed.args.dryRun, parsed.args.apply, parsed.args.audit];
|
|
308
|
+
if (modes.filter((value) => value === true).length !== 1 ||
|
|
309
|
+
modes.some((value) => value !== undefined && value !== true))
|
|
310
|
+
throw new FoundryContextError("runtime_adoption_mode_invalid", "Select exactly one of --dry-run, --apply or --audit.");
|
|
311
|
+
const selection = option(parsed.args.selection, "--selection"), plan = option(parsed.args.plan, "--plan");
|
|
312
|
+
const readSelected = (file) => {
|
|
313
|
+
if (migrationCredentialPath(file))
|
|
314
|
+
throw new FoundryContextError("credential_input_forbidden", "Private files cannot select runtime adoption.");
|
|
315
|
+
return JSON.parse(transferRead(path.resolve(file), 8 * 1024 * 1024).toString("utf8"));
|
|
316
|
+
};
|
|
317
|
+
result = await facade.adoptTaskRuntime({
|
|
318
|
+
taskId,
|
|
319
|
+
actorId,
|
|
320
|
+
mode: parsed.args.dryRun === true ? "plan" : parsed.args.apply === true ? "apply" : "audit",
|
|
321
|
+
...(selection ? { selection: readSelected(selection) } : {}),
|
|
322
|
+
...(plan ? { plan: readSelected(plan) } : {}),
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
else
|
|
326
|
+
result =
|
|
327
|
+
parsed.operation === "task.status"
|
|
328
|
+
? await facade.status({ taskId, actorId })
|
|
329
|
+
: await facade.resume({
|
|
330
|
+
taskId,
|
|
331
|
+
actorId,
|
|
332
|
+
semanticInputFile: option(parsed.args.semanticInput, "--semantic-input") ?? undefined,
|
|
333
|
+
interactionInputFile: option(parsed.args.interactionInput, "--interaction-input") ?? undefined,
|
|
334
|
+
referenceInputFile: option(parsed.args.referenceInput, "--reference-input") ?? undefined,
|
|
335
|
+
identityStageInputFile: option(parsed.args.identityStageInput, "--identity-stage-input") ?? undefined,
|
|
336
|
+
qualityReviewInputFile: option(parsed.args.qualityReviewInput, "--quality-review-input") ?? undefined,
|
|
337
|
+
authorizationInputFile: option(parsed.args.authorizationInput, "--authorization-input") ?? undefined,
|
|
338
|
+
});
|
|
312
339
|
}
|
|
313
340
|
return result;
|
|
314
341
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tiangong-lca/foundry",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.18",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Control plane for TianGong LCA external dataset import and TIDAS authoring work.",
|
|
6
6
|
"repository": {
|
|
@@ -44,6 +44,9 @@
|
|
|
44
44
|
"specs/schemas/foundry-interaction-input.schema.json",
|
|
45
45
|
"specs/schemas/foundry-authorization-input.schema.json",
|
|
46
46
|
"specs/schemas/foundry-reference-input.schema.json",
|
|
47
|
+
"specs/schemas/foundry-identity-stage-input.schema.json",
|
|
48
|
+
"specs/schemas/foundry-quality-review-input.schema.json",
|
|
49
|
+
"specs/schemas/foundry-quality-review-draft.schema.json",
|
|
47
50
|
"specs/schemas/foundry-workspace-migration-plan.schema.json",
|
|
48
51
|
"specs/schemas/foundry-workspace-migration-transfer-plan.schema.json",
|
|
49
52
|
"specs/schemas/foundry-migration-transfer-receipt.schema.json",
|
|
@@ -53,6 +56,7 @@
|
|
|
53
56
|
"specs/schemas/foundry-workspace-v2.schema.json",
|
|
54
57
|
"specs/schemas/foundry-runtime-selection.schema.json",
|
|
55
58
|
"specs/schemas/foundry-managed-runtime.schema.json",
|
|
59
|
+
"specs/schemas/foundry-managed-adoption.schema.json",
|
|
56
60
|
"specs/schemas/runtime-qualification.schema.json",
|
|
57
61
|
"specs/schemas/task-authorization.schema.json",
|
|
58
62
|
"specs/schemas/tidas-runtime-expectation.schema.json",
|
|
@@ -82,7 +86,7 @@
|
|
|
82
86
|
},
|
|
83
87
|
"license": "MIT",
|
|
84
88
|
"dependencies": {
|
|
85
|
-
"@tiangong-lca/cli": "0.1.
|
|
89
|
+
"@tiangong-lca/cli": "0.1.28"
|
|
86
90
|
},
|
|
87
91
|
"foundryRuntime": {
|
|
88
92
|
"schema": "tiangong-foundry.runtime-layout.v2",
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "Foundry Explicit New Read-only Identity Stage Input v1",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": [
|
|
7
|
+
"schema",
|
|
8
|
+
"intent_id",
|
|
9
|
+
"task_id",
|
|
10
|
+
"actor_id",
|
|
11
|
+
"rows_report_sha256",
|
|
12
|
+
"predecessor_identity_sha256",
|
|
13
|
+
"targets"
|
|
14
|
+
],
|
|
15
|
+
"properties": {
|
|
16
|
+
"schema": { "const": "tiangong-foundry.identity-stage-input.v1" },
|
|
17
|
+
"intent_id": { "$ref": "#/$defs/token" },
|
|
18
|
+
"task_id": { "type": "string", "pattern": "^task-[0-9a-f]{64}-r[0-9]{4}$" },
|
|
19
|
+
"actor_id": { "$ref": "#/$defs/token" },
|
|
20
|
+
"rows_report_sha256": { "$ref": "#/$defs/sha256" },
|
|
21
|
+
"predecessor_identity_sha256": { "$ref": "#/$defs/sha256" },
|
|
22
|
+
"targets": {
|
|
23
|
+
"type": "array",
|
|
24
|
+
"minItems": 1,
|
|
25
|
+
"maxItems": 64,
|
|
26
|
+
"uniqueItems": true,
|
|
27
|
+
"items": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"additionalProperties": false,
|
|
30
|
+
"required": ["dataset_type", "dataset_id", "dataset_version", "source_row_sha256"],
|
|
31
|
+
"properties": {
|
|
32
|
+
"dataset_type": { "enum": ["flow", "process"] },
|
|
33
|
+
"dataset_id": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
|
|
36
|
+
},
|
|
37
|
+
"dataset_version": { "type": "string", "pattern": "^[0-9]{2}\\.[0-9]{2}\\.[0-9]{3}$" },
|
|
38
|
+
"source_row_sha256": { "$ref": "#/$defs/sha256" }
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"$defs": {
|
|
44
|
+
"token": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]{0,255}$" },
|
|
45
|
+
"sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" }
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://tiangong-lca.local/foundry/foundry-managed-adoption.schema.json",
|
|
4
|
+
"title": "Foundry inventory-bound managed adoption carrier",
|
|
5
|
+
"$comment": "Structural shape only. The package-owned host verifies the independently trusted carrier, complete successor runtime equality, non-executable control component and same-package qualification brand.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["schema", "platform", "successor_manifest", "launches"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"schema": { "const": "tiangong-foundry.managed-adoption.v1" },
|
|
11
|
+
"platform": { "enum": ["linux-x64", "linux-arm64", "darwin-arm64", "win32-x64"] },
|
|
12
|
+
"successor_manifest": {
|
|
13
|
+
"$ref": "https://tiangong-lca.local/foundry/foundry-managed-runtime.schema.json#/$defs/componentReference"
|
|
14
|
+
},
|
|
15
|
+
"launches": {
|
|
16
|
+
"type": "array",
|
|
17
|
+
"minItems": 1,
|
|
18
|
+
"maxItems": 16,
|
|
19
|
+
"uniqueItems": true,
|
|
20
|
+
"items": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"additionalProperties": false,
|
|
23
|
+
"required": ["id", "qualification"],
|
|
24
|
+
"properties": {
|
|
25
|
+
"id": {
|
|
26
|
+
"$ref": "https://tiangong-lca.local/foundry/foundry-managed-runtime.schema.json#/$defs/identifier"
|
|
27
|
+
},
|
|
28
|
+
"qualification": {
|
|
29
|
+
"anyOf": [
|
|
30
|
+
{ "type": "null" },
|
|
31
|
+
{
|
|
32
|
+
"$ref": "https://tiangong-lca.local/foundry/foundry-managed-runtime.schema.json#/$defs/componentReference"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"const": "@tiangong-lca/foundry"
|
|
19
19
|
},
|
|
20
20
|
"version": {
|
|
21
|
-
"const": "0.1.
|
|
21
|
+
"const": "0.1.18"
|
|
22
22
|
},
|
|
23
23
|
"cli_dependency": {
|
|
24
24
|
"type": "object",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"const": "@tiangong-lca/cli"
|
|
30
30
|
},
|
|
31
31
|
"version": {
|
|
32
|
-
"const": "0.1.
|
|
32
|
+
"const": "0.1.28"
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
},
|
|
@@ -76,6 +76,9 @@
|
|
|
76
76
|
"tiangong-foundry.interaction-input.v1",
|
|
77
77
|
"tiangong-foundry.authorization-input.v1",
|
|
78
78
|
"tiangong-foundry.reference-input.v1",
|
|
79
|
+
"tiangong-foundry.identity-stage-input.v1",
|
|
80
|
+
"tiangong-foundry.quality-review-input.v1",
|
|
81
|
+
"tiangong-foundry.quality-review-draft.v1",
|
|
79
82
|
"tiangong-foundry.facade-request-index.v1",
|
|
80
83
|
"tiangong-foundry.workspace-migration-plan.v1",
|
|
81
84
|
"tiangong-foundry.workspace-migration-transfer-plan.v2",
|
|
@@ -86,6 +89,7 @@
|
|
|
86
89
|
"tiangong-foundry.workspace.v2",
|
|
87
90
|
"tiangong-foundry.workspace-runtime-selection.v1",
|
|
88
91
|
"tiangong-foundry.managed-runtime.v1",
|
|
92
|
+
"tiangong-foundry.managed-adoption.v1",
|
|
89
93
|
"tiangong-foundry.runtime-qualification.v1",
|
|
90
94
|
"tiangong-foundry.tidas-runtime-expectation.v1",
|
|
91
95
|
"tiangong-foundry.execution-context.v1",
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "Foundry Quality Review Draft v1",
|
|
4
|
+
"$comment": "Completed generated draft submission. Emitted templates deliberately have null disposition and empty rationale/evidence and are invalid until the reviewer makes actual choices. The owner captures evidence hashes and enforces quality-review-input.v1 scope and time bounds.",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schema",
|
|
9
|
+
"binding",
|
|
10
|
+
"runtime_qualification_sha256",
|
|
11
|
+
"rows_manifest_sha256",
|
|
12
|
+
"assessment_sha256",
|
|
13
|
+
"context_sha256",
|
|
14
|
+
"qa_report_sha256",
|
|
15
|
+
"qa_findings_sha256",
|
|
16
|
+
"reference_inputs_sha256",
|
|
17
|
+
"interaction_context_sha256",
|
|
18
|
+
"expected_previous_sha256",
|
|
19
|
+
"issued_at_utc",
|
|
20
|
+
"expires_at_utc",
|
|
21
|
+
"reviews",
|
|
22
|
+
"evidence"
|
|
23
|
+
],
|
|
24
|
+
"properties": {
|
|
25
|
+
"schema": {
|
|
26
|
+
"const": "tiangong-foundry.quality-review-draft.v1"
|
|
27
|
+
},
|
|
28
|
+
"binding": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"additionalProperties": false,
|
|
31
|
+
"required": [
|
|
32
|
+
"workspace_id",
|
|
33
|
+
"actor_id",
|
|
34
|
+
"project_ref",
|
|
35
|
+
"user_id",
|
|
36
|
+
"profile_id",
|
|
37
|
+
"task_id",
|
|
38
|
+
"profile_sha256",
|
|
39
|
+
"input_scope_sha256"
|
|
40
|
+
],
|
|
41
|
+
"properties": {
|
|
42
|
+
"workspace_id": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]{0,255}$"
|
|
45
|
+
},
|
|
46
|
+
"actor_id": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]{0,255}$"
|
|
49
|
+
},
|
|
50
|
+
"project_ref": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]{0,255}$"
|
|
53
|
+
},
|
|
54
|
+
"user_id": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]{0,255}$"
|
|
57
|
+
},
|
|
58
|
+
"profile_id": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]{0,255}$"
|
|
61
|
+
},
|
|
62
|
+
"task_id": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"pattern": "^task-[0-9a-f]{64}-r[0-9]{4}$"
|
|
65
|
+
},
|
|
66
|
+
"profile_sha256": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
69
|
+
},
|
|
70
|
+
"input_scope_sha256": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"runtime_qualification_sha256": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
79
|
+
},
|
|
80
|
+
"rows_manifest_sha256": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
83
|
+
},
|
|
84
|
+
"assessment_sha256": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
87
|
+
},
|
|
88
|
+
"context_sha256": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
91
|
+
},
|
|
92
|
+
"qa_report_sha256": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
95
|
+
},
|
|
96
|
+
"qa_findings_sha256": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
99
|
+
},
|
|
100
|
+
"reference_inputs_sha256": {
|
|
101
|
+
"anyOf": [
|
|
102
|
+
{
|
|
103
|
+
"type": "string",
|
|
104
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"type": "null"
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
"expected_previous_sha256": {
|
|
112
|
+
"anyOf": [
|
|
113
|
+
{
|
|
114
|
+
"type": "string",
|
|
115
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"type": "null"
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
"issued_at_utc": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{3}Z$"
|
|
125
|
+
},
|
|
126
|
+
"expires_at_utc": {
|
|
127
|
+
"type": "string",
|
|
128
|
+
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{3}Z$"
|
|
129
|
+
},
|
|
130
|
+
"reviews": {
|
|
131
|
+
"type": "array",
|
|
132
|
+
"minItems": 1,
|
|
133
|
+
"maxItems": 128,
|
|
134
|
+
"uniqueItems": true,
|
|
135
|
+
"items": {
|
|
136
|
+
"$ref": "#/$defs/review"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"evidence": {
|
|
140
|
+
"type": "array",
|
|
141
|
+
"minItems": 1,
|
|
142
|
+
"maxItems": 100,
|
|
143
|
+
"uniqueItems": true,
|
|
144
|
+
"items": {
|
|
145
|
+
"$ref": "#/$defs/evidence"
|
|
146
|
+
},
|
|
147
|
+
"allOf": [
|
|
148
|
+
{
|
|
149
|
+
"contains": {
|
|
150
|
+
"type": "object",
|
|
151
|
+
"properties": {
|
|
152
|
+
"kind": {
|
|
153
|
+
"const": "user-decision"
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"required": ["kind"]
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"contains": {
|
|
161
|
+
"type": "object",
|
|
162
|
+
"properties": {
|
|
163
|
+
"kind": {
|
|
164
|
+
"const": "source-model"
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"required": ["kind"]
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
]
|
|
171
|
+
},
|
|
172
|
+
"interaction_context_sha256": {
|
|
173
|
+
"anyOf": [
|
|
174
|
+
{
|
|
175
|
+
"type": "string",
|
|
176
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"type": "null"
|
|
180
|
+
}
|
|
181
|
+
]
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"$defs": {
|
|
185
|
+
"review": {
|
|
186
|
+
"type": "object",
|
|
187
|
+
"additionalProperties": false,
|
|
188
|
+
"required": [
|
|
189
|
+
"row_index",
|
|
190
|
+
"id",
|
|
191
|
+
"version",
|
|
192
|
+
"payload_sha256",
|
|
193
|
+
"finding_sha256",
|
|
194
|
+
"code",
|
|
195
|
+
"evidence_ids",
|
|
196
|
+
"rationale",
|
|
197
|
+
"disposition"
|
|
198
|
+
],
|
|
199
|
+
"properties": {
|
|
200
|
+
"row_index": {
|
|
201
|
+
"type": "integer",
|
|
202
|
+
"minimum": 0,
|
|
203
|
+
"maximum": 9007199254740991
|
|
204
|
+
},
|
|
205
|
+
"id": {
|
|
206
|
+
"type": "string",
|
|
207
|
+
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
|
|
208
|
+
},
|
|
209
|
+
"version": {
|
|
210
|
+
"type": "string",
|
|
211
|
+
"pattern": "^[0-9]{2}\\.[0-9]{2}\\.[0-9]{3}$"
|
|
212
|
+
},
|
|
213
|
+
"payload_sha256": {
|
|
214
|
+
"type": "string",
|
|
215
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
216
|
+
},
|
|
217
|
+
"finding_sha256": {
|
|
218
|
+
"type": "string",
|
|
219
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
220
|
+
},
|
|
221
|
+
"code": {
|
|
222
|
+
"const": "process_material_balance_deviation"
|
|
223
|
+
},
|
|
224
|
+
"evidence_ids": {
|
|
225
|
+
"type": "array",
|
|
226
|
+
"minItems": 1,
|
|
227
|
+
"maxItems": 100,
|
|
228
|
+
"uniqueItems": true,
|
|
229
|
+
"items": {
|
|
230
|
+
"type": "string",
|
|
231
|
+
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]{0,255}$"
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
"rationale": {
|
|
235
|
+
"type": "string",
|
|
236
|
+
"minLength": 1,
|
|
237
|
+
"maxLength": 8192,
|
|
238
|
+
"pattern": "\\S"
|
|
239
|
+
},
|
|
240
|
+
"disposition": {
|
|
241
|
+
"const": "accept-interpretation"
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
"evidence": {
|
|
246
|
+
"type": "object",
|
|
247
|
+
"additionalProperties": false,
|
|
248
|
+
"required": ["id", "kind", "file"],
|
|
249
|
+
"properties": {
|
|
250
|
+
"id": {
|
|
251
|
+
"type": "string",
|
|
252
|
+
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]{0,255}$"
|
|
253
|
+
},
|
|
254
|
+
"kind": {
|
|
255
|
+
"enum": ["user-decision", "source-model"]
|
|
256
|
+
},
|
|
257
|
+
"file": {
|
|
258
|
+
"type": "string",
|
|
259
|
+
"minLength": 1,
|
|
260
|
+
"maxLength": 4096,
|
|
261
|
+
"pattern": "^[^\\u0000\\r\\n]+$",
|
|
262
|
+
"allOf": [
|
|
263
|
+
{
|
|
264
|
+
"pattern": "\\S"
|
|
265
|
+
}
|
|
266
|
+
]
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|