@tiangong-lca/foundry 0.1.9 → 0.1.11
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 +13 -11
- package/docs/architecture.md +12 -10
- package/docs/foundry-task-contracts.md +16 -4
- package/docs/import-profiles/bafu/constraints.md +1 -1
- package/docs/import-profiles/bafu/profile.md +1 -1
- package/docs/import-profiles/worldsteel/constraints.md +3 -3
- package/docs/import-profiles/worldsteel/import-coverage.md +3 -3
- package/docs/import-profiles/worldsteel/import-plan.md +4 -4
- package/docs/import-profiles/worldsteel/profile.md +3 -3
- package/docs/package-distribution-contract.md +11 -9
- package/docs/public-runtime-contract.md +31 -9
- package/docs/runtime-context-contract.md +7 -5
- package/docs/task-authorization-contract.md +5 -3
- package/package-dist/assets/foundry-package-descriptor.json +300 -154
- package/package-dist/scripts/foundry-facade.d.ts +1 -0
- package/package-dist/scripts/foundry-facade.js +233 -28
- package/package-dist/scripts/foundry-runtime.d.ts +14 -3
- package/package-dist/scripts/foundry-runtime.js +2 -2
- package/package-dist/scripts/lib/finalize-owners/commit-handoff.js +3 -3
- package/package-dist/scripts/lib/finalize-owners/{native-insert-closeout.d.ts → native-draft-closeout.d.ts} +1 -1
- package/package-dist/scripts/lib/finalize-owners/{native-insert-closeout.js → native-draft-closeout.js} +10 -6
- package/package-dist/scripts/lib/finalize-owners/{native-insert-handoff.d.ts → native-draft-handoff.d.ts} +7 -5
- package/package-dist/scripts/lib/finalize-owners/{native-insert-handoff.js → native-draft-handoff.js} +30 -11
- package/package-dist/scripts/lib/finalize-owners/post-write-closeout.js +2 -2
- package/package-dist/scripts/lib/foundry-authorization-input.d.ts +10 -1
- package/package-dist/scripts/lib/foundry-authorization-input.js +27 -3
- package/package-dist/scripts/lib/foundry-command-metadata.js +25 -2
- package/package-dist/scripts/lib/foundry-command-registry.d.ts +4 -4
- package/package-dist/scripts/lib/foundry-command-registry.js +3 -0
- package/package-dist/scripts/lib/foundry-execution-admission.js +3 -3
- package/package-dist/scripts/lib/foundry-facade-store.js +56 -6
- package/package-dist/scripts/lib/foundry-interaction-input.d.ts +19 -0
- package/package-dist/scripts/lib/foundry-interaction-input.js +327 -0
- package/package-dist/scripts/lib/foundry-interaction-projection.d.ts +22 -0
- package/package-dist/scripts/lib/foundry-interaction-projection.js +81 -0
- package/package-dist/scripts/lib/foundry-interaction-types.d.ts +17 -0
- package/package-dist/scripts/lib/foundry-interaction-types.js +4 -0
- package/package-dist/scripts/lib/foundry-owner-execution-store.d.ts +33 -16
- package/package-dist/scripts/lib/foundry-owner-execution-store.js +66 -5
- package/package-dist/scripts/lib/foundry-owner-readback.d.ts +3 -0
- package/package-dist/scripts/lib/foundry-owner-readback.js +101 -27
- package/package-dist/scripts/lib/foundry-package-contract.d.ts +4 -4
- package/package-dist/scripts/lib/foundry-package-contract.js +4 -2
- package/package-dist/scripts/lib/foundry-repair-execution.d.ts +11 -0
- package/package-dist/scripts/lib/foundry-repair-execution.js +70 -0
- package/package-dist/scripts/lib/foundry-repair-handoff.d.ts +16 -0
- package/package-dist/scripts/lib/foundry-repair-handoff.js +108 -0
- package/package-dist/scripts/lib/foundry-repair-preflight.d.ts +96 -0
- package/package-dist/scripts/lib/foundry-repair-preflight.js +313 -0
- package/package-dist/scripts/lib/foundry-repair-reference-binding.d.ts +26 -0
- package/package-dist/scripts/lib/foundry-repair-reference-binding.js +120 -0
- package/package-dist/scripts/lib/foundry-repair-reference-proof.d.ts +63 -0
- package/package-dist/scripts/lib/foundry-repair-reference-proof.js +329 -0
- package/package-dist/scripts/lib/foundry-repair-scope.d.ts +76 -0
- package/package-dist/scripts/lib/foundry-repair-scope.js +304 -0
- package/package-dist/scripts/lib/foundry-runtime-command-policy.js +1 -0
- package/package-dist/scripts/lib/foundry-runtime-qualification.js +2 -2
- package/package-dist/scripts/lib/foundry-runtime-utils.d.ts +3 -0
- package/package-dist/scripts/lib/foundry-runtime-utils.js +6 -1
- package/package-dist/scripts/lib/foundry-semantic-input.d.ts +2 -0
- package/package-dist/scripts/lib/foundry-semantic-input.js +29 -2
- package/package-dist/scripts/lib/foundry-semantic-interaction.d.ts +12 -0
- package/package-dist/scripts/lib/foundry-semantic-interaction.js +38 -0
- package/package-dist/scripts/lib/foundry-successor-predecessor.d.ts +36 -0
- package/package-dist/scripts/lib/foundry-successor-predecessor.js +399 -0
- package/package-dist/scripts/lib/foundry-task-registration.js +64 -3
- package/package-dist/scripts/lib/foundry-task-start-spec.d.ts +14 -0
- package/package-dist/scripts/lib/foundry-task-start-spec.js +60 -1
- package/package-dist/scripts/lib/foundry-task-store.d.ts +13 -1
- package/package-dist/scripts/lib/foundry-task-store.js +23 -12
- package/package-dist/scripts/lib/foundry-task-types.d.ts +22 -1
- package/package-dist/scripts/lib/foundry-tidas-source.d.ts +15 -0
- package/package-dist/scripts/lib/foundry-tidas-source.js +90 -0
- package/package-dist/scripts/lib/foundry-workflow-assessment.d.ts +7 -1
- package/package-dist/scripts/lib/foundry-workflow-assessment.js +127 -6
- package/package-dist/scripts/lib/foundry-workflow-authorization.d.ts +2 -1
- package/package-dist/scripts/lib/foundry-workflow-authorization.js +194 -26
- package/package-dist/scripts/lib/foundry-workflow-context.js +4 -0
- package/package-dist/scripts/lib/foundry-workflow-execution.js +6 -1
- package/package-dist/scripts/lib/foundry-workflow-finalize.js +7 -4
- package/package-dist/scripts/lib/foundry-workflow-interaction.d.ts +4 -0
- package/package-dist/scripts/lib/foundry-workflow-interaction.js +63 -0
- package/package-dist/scripts/lib/foundry-workflow-repair.d.ts +36 -0
- package/package-dist/scripts/lib/foundry-workflow-repair.js +580 -0
- package/package-dist/scripts/lib/foundry-workflow-semantic.js +21 -1
- package/package-dist/scripts/lib/foundry-workflow-state.d.ts +9 -1
- package/package-dist/scripts/lib/foundry-workflow-state.js +239 -39
- package/package-dist/scripts/lib/import-curation/curation-cleanup.js +39 -8
- package/package-dist/scripts/lib/import-curation/internal/context-inputs.js +1 -1
- package/package-dist/scripts/lib/import-curation/internal/prewrite-cleanup.d.ts +13 -2
- package/package-dist/scripts/lib/import-curation/internal/prewrite-cleanup.js +100 -29
- package/package-dist/scripts/lib/import-curation/internal/workflow-authoring-tasks.js +1 -2
- package/package-dist/scripts/lib/import-curation/internal/workflow-patch-collect.js +2 -3
- package/package-dist/scripts/lib/import-curation/internal/workflow-queue-context.js +8 -8
- package/package-dist/scripts/lib/import-curation/internal/workflow-semantic-actions.js +12 -2
- package/package-dist/scripts/public-api.d.ts +2 -0
- package/package-dist/scripts/public-api.js +1 -0
- package/package-dist/scripts/runtime-entry.js +9 -1
- package/package.json +3 -2
- package/specs/import-profiles.json +1 -1
- package/specs/schemas/foundry-authorization-input.schema.json +45 -2
- package/specs/schemas/foundry-interaction-input.schema.json +173 -0
- package/specs/schemas/foundry-managed-runtime.schema.json +1 -1
- package/specs/schemas/foundry-package-descriptor.schema.json +3 -2
- package/specs/schemas/foundry-semantic-input.schema.json +12 -1
- package/specs/schemas/foundry-task-start.schema.json +275 -19
- package/specs/schemas/runtime-qualification.schema.json +1 -1
|
@@ -17,13 +17,25 @@
|
|
|
17
17
|
"preparation"
|
|
18
18
|
],
|
|
19
19
|
"properties": {
|
|
20
|
-
"schema": {
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
"schema": {
|
|
21
|
+
"const": "tiangong-foundry.task-start.v1"
|
|
22
|
+
},
|
|
23
|
+
"request_id": {
|
|
24
|
+
"$ref": "#/$defs/id"
|
|
25
|
+
},
|
|
26
|
+
"actor_id": {
|
|
27
|
+
"$ref": "#/$defs/id"
|
|
28
|
+
},
|
|
23
29
|
"lane": {
|
|
24
|
-
"enum": [
|
|
30
|
+
"enum": [
|
|
31
|
+
"external-dataset-curated-import",
|
|
32
|
+
"source-evidence-dataset-development",
|
|
33
|
+
"existing-owner-draft-repair"
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"profile_id": {
|
|
37
|
+
"$ref": "#/$defs/id"
|
|
25
38
|
},
|
|
26
|
-
"profile_id": { "$ref": "#/$defs/id" },
|
|
27
39
|
"target_entities": {
|
|
28
40
|
"type": "array",
|
|
29
41
|
"minItems": 1,
|
|
@@ -46,26 +58,185 @@
|
|
|
46
58
|
"type": "array",
|
|
47
59
|
"minItems": 1,
|
|
48
60
|
"maxItems": 1000,
|
|
49
|
-
"items": {
|
|
61
|
+
"items": {
|
|
62
|
+
"$ref": "#/$defs/selection"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"seed": {
|
|
66
|
+
"oneOf": [
|
|
67
|
+
{
|
|
68
|
+
"$ref": "#/$defs/selection"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"type": "null"
|
|
72
|
+
}
|
|
73
|
+
]
|
|
50
74
|
},
|
|
51
|
-
"seed": { "oneOf": [{ "$ref": "#/$defs/selection" }, { "type": "null" }] },
|
|
52
75
|
"account_intent": {
|
|
53
|
-
"oneOf": [
|
|
76
|
+
"oneOf": [
|
|
77
|
+
{
|
|
78
|
+
"$ref": "#/$defs/accountIntent"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"type": "null"
|
|
82
|
+
}
|
|
83
|
+
]
|
|
54
84
|
},
|
|
55
85
|
"preparation": {
|
|
56
|
-
"oneOf": [
|
|
86
|
+
"oneOf": [
|
|
87
|
+
{
|
|
88
|
+
"$ref": "#/$defs/cleanupPreparation"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"type": "null"
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
"brief": {
|
|
96
|
+
"$ref": "#/$defs/taskBrief"
|
|
97
|
+
},
|
|
98
|
+
"repair": {
|
|
99
|
+
"oneOf": [
|
|
100
|
+
{
|
|
101
|
+
"$ref": "#/$defs/repairSelection"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"type": "null"
|
|
105
|
+
}
|
|
106
|
+
]
|
|
57
107
|
}
|
|
58
108
|
},
|
|
59
109
|
"allOf": [
|
|
60
110
|
{
|
|
61
111
|
"if": {
|
|
62
|
-
"properties": {
|
|
112
|
+
"properties": {
|
|
113
|
+
"lane": {
|
|
114
|
+
"const": "source-evidence-dataset-development"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
63
117
|
"required": ["lane"]
|
|
64
118
|
},
|
|
65
|
-
"then": {
|
|
119
|
+
"then": {
|
|
120
|
+
"properties": {
|
|
121
|
+
"seed": {
|
|
122
|
+
"$ref": "#/$defs/selection"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"if": {
|
|
129
|
+
"properties": {
|
|
130
|
+
"lane": {
|
|
131
|
+
"const": "existing-owner-draft-repair"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"required": ["lane"]
|
|
135
|
+
},
|
|
136
|
+
"then": {
|
|
137
|
+
"required": ["repair"],
|
|
138
|
+
"properties": {
|
|
139
|
+
"repair": {
|
|
140
|
+
"$ref": "#/$defs/repairSelection"
|
|
141
|
+
},
|
|
142
|
+
"target_entities": {
|
|
143
|
+
"type": "array",
|
|
144
|
+
"minItems": 1,
|
|
145
|
+
"maxItems": 1,
|
|
146
|
+
"items": {
|
|
147
|
+
"const": "process"
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"seed": {
|
|
151
|
+
"type": "null"
|
|
152
|
+
},
|
|
153
|
+
"preparation": {
|
|
154
|
+
"type": "null"
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"else": {
|
|
159
|
+
"properties": {
|
|
160
|
+
"repair": {
|
|
161
|
+
"type": "null"
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
66
165
|
}
|
|
67
166
|
],
|
|
68
167
|
"$defs": {
|
|
168
|
+
"taskBrief": {
|
|
169
|
+
"type": "object",
|
|
170
|
+
"additionalProperties": false,
|
|
171
|
+
"required": [
|
|
172
|
+
"original_request",
|
|
173
|
+
"goal",
|
|
174
|
+
"intended_use",
|
|
175
|
+
"scope",
|
|
176
|
+
"deliverables",
|
|
177
|
+
"user_constraints",
|
|
178
|
+
"ai_assumptions"
|
|
179
|
+
],
|
|
180
|
+
"properties": {
|
|
181
|
+
"original_request": {
|
|
182
|
+
"oneOf": [
|
|
183
|
+
{
|
|
184
|
+
"type": "string",
|
|
185
|
+
"minLength": 1,
|
|
186
|
+
"maxLength": 16384,
|
|
187
|
+
"pattern": "\\S"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"type": "null"
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
},
|
|
194
|
+
"goal": {
|
|
195
|
+
"$ref": "#/$defs/briefText"
|
|
196
|
+
},
|
|
197
|
+
"intended_use": {
|
|
198
|
+
"$ref": "#/$defs/nullableBriefText"
|
|
199
|
+
},
|
|
200
|
+
"scope": {
|
|
201
|
+
"$ref": "#/$defs/nullableBriefText"
|
|
202
|
+
},
|
|
203
|
+
"deliverables": {
|
|
204
|
+
"$ref": "#/$defs/briefItems"
|
|
205
|
+
},
|
|
206
|
+
"user_constraints": {
|
|
207
|
+
"$ref": "#/$defs/briefItems"
|
|
208
|
+
},
|
|
209
|
+
"ai_assumptions": {
|
|
210
|
+
"$ref": "#/$defs/briefItems"
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
"briefText": {
|
|
215
|
+
"type": "string",
|
|
216
|
+
"minLength": 1,
|
|
217
|
+
"maxLength": 4096,
|
|
218
|
+
"pattern": "\\S"
|
|
219
|
+
},
|
|
220
|
+
"nullableBriefText": {
|
|
221
|
+
"oneOf": [
|
|
222
|
+
{
|
|
223
|
+
"$ref": "#/$defs/briefText"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"type": "null"
|
|
227
|
+
}
|
|
228
|
+
]
|
|
229
|
+
},
|
|
230
|
+
"briefItems": {
|
|
231
|
+
"type": "array",
|
|
232
|
+
"maxItems": 32,
|
|
233
|
+
"items": {
|
|
234
|
+
"type": "string",
|
|
235
|
+
"minLength": 1,
|
|
236
|
+
"maxLength": 2048,
|
|
237
|
+
"pattern": "\\S"
|
|
238
|
+
}
|
|
239
|
+
},
|
|
69
240
|
"id": {
|
|
70
241
|
"type": "string",
|
|
71
242
|
"minLength": 1,
|
|
@@ -76,21 +247,41 @@
|
|
|
76
247
|
"type": "object",
|
|
77
248
|
"additionalProperties": false,
|
|
78
249
|
"required": ["path"],
|
|
79
|
-
"properties": {
|
|
250
|
+
"properties": {
|
|
251
|
+
"path": {
|
|
252
|
+
"type": "string",
|
|
253
|
+
"minLength": 1,
|
|
254
|
+
"maxLength": 4096
|
|
255
|
+
}
|
|
256
|
+
}
|
|
80
257
|
},
|
|
81
258
|
"accountIntent": {
|
|
82
259
|
"type": "object",
|
|
83
260
|
"additionalProperties": false,
|
|
84
261
|
"required": ["project_ref", "user_id", "session_reference"],
|
|
85
262
|
"properties": {
|
|
86
|
-
"project_ref": {
|
|
263
|
+
"project_ref": {
|
|
264
|
+
"type": "string",
|
|
265
|
+
"pattern": "^[a-z0-9]{20}$"
|
|
266
|
+
},
|
|
87
267
|
"user_id": {
|
|
88
268
|
"type": "string",
|
|
89
269
|
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89aAbB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
|
|
90
270
|
},
|
|
91
|
-
"account_mode": {
|
|
271
|
+
"account_mode": {
|
|
272
|
+
"enum": ["ordinary", "production-test"]
|
|
273
|
+
},
|
|
92
274
|
"session_reference": {
|
|
93
|
-
"oneOf": [
|
|
275
|
+
"oneOf": [
|
|
276
|
+
{
|
|
277
|
+
"type": "string",
|
|
278
|
+
"minLength": 1,
|
|
279
|
+
"maxLength": 4096
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"type": "null"
|
|
283
|
+
}
|
|
284
|
+
]
|
|
94
285
|
}
|
|
95
286
|
}
|
|
96
287
|
},
|
|
@@ -99,7 +290,9 @@
|
|
|
99
290
|
"additionalProperties": false,
|
|
100
291
|
"required": ["operation", "type", "input", "source_input", "output_directory"],
|
|
101
292
|
"properties": {
|
|
102
|
-
"operation": {
|
|
293
|
+
"operation": {
|
|
294
|
+
"const": "dataset-curation-cleanup"
|
|
295
|
+
},
|
|
103
296
|
"type": {
|
|
104
297
|
"enum": [
|
|
105
298
|
"contact",
|
|
@@ -112,11 +305,74 @@
|
|
|
112
305
|
"lifecyclemodel"
|
|
113
306
|
]
|
|
114
307
|
},
|
|
115
|
-
"input": {
|
|
308
|
+
"input": {
|
|
309
|
+
"type": "string",
|
|
310
|
+
"minLength": 1,
|
|
311
|
+
"maxLength": 4096
|
|
312
|
+
},
|
|
116
313
|
"source_input": {
|
|
117
|
-
"oneOf": [
|
|
314
|
+
"oneOf": [
|
|
315
|
+
{
|
|
316
|
+
"type": "string",
|
|
317
|
+
"minLength": 1,
|
|
318
|
+
"maxLength": 4096
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"type": "null"
|
|
322
|
+
}
|
|
323
|
+
]
|
|
324
|
+
},
|
|
325
|
+
"output_directory": {
|
|
326
|
+
"type": "string",
|
|
327
|
+
"minLength": 1,
|
|
328
|
+
"maxLength": 4096
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
"repairSelection": {
|
|
333
|
+
"type": "object",
|
|
334
|
+
"additionalProperties": false,
|
|
335
|
+
"required": ["kind", "contract", "before", "candidate", "predecessor"],
|
|
336
|
+
"properties": {
|
|
337
|
+
"kind": {
|
|
338
|
+
"const": "existing-owner-draft-metadata"
|
|
339
|
+
},
|
|
340
|
+
"contract": {
|
|
341
|
+
"type": "string",
|
|
342
|
+
"minLength": 1,
|
|
343
|
+
"maxLength": 4096
|
|
344
|
+
},
|
|
345
|
+
"before": {
|
|
346
|
+
"type": "string",
|
|
347
|
+
"minLength": 1,
|
|
348
|
+
"maxLength": 4096
|
|
349
|
+
},
|
|
350
|
+
"candidate": {
|
|
351
|
+
"type": "string",
|
|
352
|
+
"minLength": 1,
|
|
353
|
+
"maxLength": 4096
|
|
118
354
|
},
|
|
119
|
-
"
|
|
355
|
+
"predecessor": {
|
|
356
|
+
"oneOf": [
|
|
357
|
+
{
|
|
358
|
+
"type": "object",
|
|
359
|
+
"additionalProperties": false,
|
|
360
|
+
"required": ["task_id", "receipt_sha256"],
|
|
361
|
+
"properties": {
|
|
362
|
+
"task_id": {
|
|
363
|
+
"$ref": "#/$defs/id"
|
|
364
|
+
},
|
|
365
|
+
"receipt_sha256": {
|
|
366
|
+
"type": "string",
|
|
367
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
"type": "null"
|
|
373
|
+
}
|
|
374
|
+
]
|
|
375
|
+
}
|
|
120
376
|
}
|
|
121
377
|
}
|
|
122
378
|
}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"additionalProperties": false,
|
|
15
15
|
"required": ["package_version", "platform", "content_sha256", "node_version", "node_sha256"],
|
|
16
16
|
"properties": {
|
|
17
|
-
"package_version": { "const": "0.1.
|
|
17
|
+
"package_version": { "const": "0.1.19" },
|
|
18
18
|
"platform": {
|
|
19
19
|
"enum": ["linux-x64", "linux-arm64", "darwin-arm64", "win32-x64"]
|
|
20
20
|
},
|