@tiangong-lca/foundry 0.1.19 → 0.1.20

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.
Files changed (51) hide show
  1. package/README.md +5 -3
  2. package/docs/architecture.md +5 -3
  3. package/docs/foundry-task-contracts.md +2 -0
  4. package/docs/package-distribution-contract.md +5 -3
  5. package/docs/public-runtime-contract.md +41 -3
  6. package/docs/runtime-context-contract.md +5 -3
  7. package/docs/task-authorization-contract.md +2 -0
  8. package/package-dist/assets/foundry-package-descriptor.json +142 -74
  9. package/package-dist/scripts/foundry-facade.d.ts +6 -0
  10. package/package-dist/scripts/foundry-facade.js +35 -0
  11. package/package-dist/scripts/foundry-runtime.d.ts +2 -1
  12. package/package-dist/scripts/lib/final-delivery-manifest.d.ts +40 -0
  13. package/package-dist/scripts/lib/final-delivery-manifest.js +145 -0
  14. package/package-dist/scripts/lib/final-delivery-review.d.ts +37 -0
  15. package/package-dist/scripts/lib/final-delivery-review.js +108 -0
  16. package/package-dist/scripts/lib/finalize-owners/native-draft-handoff.js +4 -3
  17. package/package-dist/scripts/lib/foundry-edge-repair-preparation.d.ts +3 -0
  18. package/package-dist/scripts/lib/foundry-edge-repair-preparation.js +90 -1
  19. package/package-dist/scripts/lib/foundry-edge-session.d.ts +18 -1
  20. package/package-dist/scripts/lib/foundry-edge-session.js +137 -3
  21. package/package-dist/scripts/lib/foundry-edge-support.d.ts +1 -1
  22. package/package-dist/scripts/lib/foundry-interaction-input.js +2 -2
  23. package/package-dist/scripts/lib/foundry-operation-result.d.ts +1 -1
  24. package/package-dist/scripts/lib/foundry-operation-result.js +1 -0
  25. package/package-dist/scripts/lib/foundry-owner-readback.d.ts +3 -2
  26. package/package-dist/scripts/lib/foundry-owner-readback.js +21 -2
  27. package/package-dist/scripts/lib/foundry-package-contract.d.ts +3 -3
  28. package/package-dist/scripts/lib/foundry-package-contract.js +7 -1
  29. package/package-dist/scripts/lib/foundry-repair-census.d.ts +82 -0
  30. package/package-dist/scripts/lib/foundry-repair-census.js +574 -0
  31. package/package-dist/scripts/lib/foundry-repair-scope.d.ts +15 -2
  32. package/package-dist/scripts/lib/foundry-repair-scope.js +62 -10
  33. package/package-dist/scripts/lib/foundry-scientific-repair.d.ts +38 -0
  34. package/package-dist/scripts/lib/foundry-scientific-repair.js +438 -0
  35. package/package-dist/scripts/lib/foundry-semantic-input.js +1 -1
  36. package/package-dist/scripts/lib/foundry-task-input-preparation.d.ts +4 -0
  37. package/package-dist/scripts/lib/foundry-task-input-preparation.js +160 -0
  38. package/package-dist/scripts/lib/foundry-task-registration.js +19 -1
  39. package/package-dist/scripts/lib/foundry-task-types.d.ts +2 -0
  40. package/package-dist/scripts/lib/foundry-workflow-execution.js +3 -0
  41. package/package-dist/scripts/lib/foundry-workflow-repair.d.ts +5 -0
  42. package/package-dist/scripts/lib/foundry-workflow-repair.js +151 -0
  43. package/package-dist/scripts/public-api.d.ts +6 -0
  44. package/package-dist/scripts/runtime-entry.js +15 -6
  45. package/package.json +4 -1
  46. package/specs/schemas/foundry-interaction-draft.schema.json +323 -0
  47. package/specs/schemas/foundry-operation-result.schema.json +1 -0
  48. package/specs/schemas/foundry-package-descriptor.schema.json +4 -1
  49. package/specs/schemas/foundry-scientific-repair.schema.json +66 -0
  50. package/specs/schemas/foundry-semantic-draft.schema.json +50 -0
  51. package/specs/schemas/foundry-task-start.schema.json +10 -2
@@ -2,7 +2,7 @@
2
2
  "schema": "tiangong-foundry.package-descriptor.v1",
3
3
  "package": {
4
4
  "name": "@tiangong-lca/foundry",
5
- "version": "0.1.19",
5
+ "version": "0.1.20",
6
6
  "cli_dependency": {
7
7
  "name": "@tiangong-lca/cli",
8
8
  "version": "0.4.0"
@@ -32,6 +32,9 @@
32
32
  "tiangong-foundry.operation-result.v1",
33
33
  "tiangong-foundry.task-start.v1",
34
34
  "tiangong-foundry.semantic-input.v1",
35
+ "tiangong-foundry.semantic-draft.v1",
36
+ "tiangong-foundry.interaction-draft.v1",
37
+ "tiangong-foundry.scientific-repair.v1",
35
38
  "tiangong-foundry.interaction-input.v1",
36
39
  "tiangong-foundry.authorization-input.v1",
37
40
  "tiangong-foundry.reference-input.v1",
@@ -64,18 +67,18 @@
64
67
  },
65
68
  {
66
69
  "path": "README.md",
67
- "bytes": 69621,
68
- "sha256": "4052fdb3bded33232189cbf969d890f5951a0e199583014b40e8039d97770923"
70
+ "bytes": 70039,
71
+ "sha256": "fb1042e17733e2a38c9622449047c738805343f4c5a20bc88cb07e76923c2487"
69
72
  },
70
73
  {
71
74
  "path": "docs/architecture.md",
72
- "bytes": 62361,
73
- "sha256": "e2abfe3a6900eb667e4e025e0c0e18a9581500db3a4cec381b38d956da12633e"
75
+ "bytes": 62853,
76
+ "sha256": "4a8f094ef162755e753942b7a78903277b03987e3face2c2c96227eab1c907d3"
74
77
  },
75
78
  {
76
79
  "path": "docs/foundry-task-contracts.md",
77
- "bytes": 34159,
78
- "sha256": "344f9a411392c75e14518b781c12313ceb7f5af1a8f34050e5a512ac79612ad4"
80
+ "bytes": 34654,
81
+ "sha256": "ca6f86fe5209208b37c8b8694a5bc21acad906478040dbb8c1a64b18c5278dfa"
79
82
  },
80
83
  {
81
84
  "path": "docs/import-profiles/bafu/constraints.md",
@@ -124,18 +127,18 @@
124
127
  },
125
128
  {
126
129
  "path": "docs/package-distribution-contract.md",
127
- "bytes": 86627,
128
- "sha256": "554fc955cd43efbca66a737c441d30bfbee0587d248aa7f42d8112b9b6645a8b"
130
+ "bytes": 87468,
131
+ "sha256": "d78144dc2983a286a6b138aaa8b71099f107b670104fff53455b7bb66085c204"
129
132
  },
130
133
  {
131
134
  "path": "docs/public-runtime-contract.md",
132
- "bytes": 83107,
133
- "sha256": "70d4903c593579b9cb9aea8d24d3320c5c6b1013ee27efcce1e6830aa613c4c9"
135
+ "bytes": 94189,
136
+ "sha256": "08138ccdec0f6db17d23f267efbfabd22fd6fcffdc4715e03627d98223041f40"
134
137
  },
135
138
  {
136
139
  "path": "docs/runtime-context-contract.md",
137
- "bytes": 26941,
138
- "sha256": "5d3ac845e3b3570c7b5056d67eb4e14448e25c961840ef00f45795d46978a3cb"
140
+ "bytes": 27383,
141
+ "sha256": "f316b2b0b5a2b70ce9e4737dab72e56df479f3cf41560e1dabc2b9c099a911f1"
139
142
  },
140
143
  {
141
144
  "path": "docs/safety-policy.md",
@@ -144,8 +147,8 @@
144
147
  },
145
148
  {
146
149
  "path": "docs/task-authorization-contract.md",
147
- "bytes": 21776,
148
- "sha256": "77d996a85e4a931b0e6eaeabc629e7114846d7268f9067143a2230c290431e19"
150
+ "bytes": 22257,
151
+ "sha256": "e32a2a6197de98f68439b739a58e665648ffb046cd33c9d5737af4b4bc2ebd23"
149
152
  },
150
153
  {
151
154
  "path": "docs/uslci-import-runbook.md",
@@ -159,18 +162,18 @@
159
162
  },
160
163
  {
161
164
  "path": "package-dist/scripts/foundry-facade.d.ts",
162
- "bytes": 3437,
163
- "sha256": "38e0c77921ce2c5a87fb356dda17040a8fad8609b01aa2eef8a266ba23c2eab8"
165
+ "bytes": 3622,
166
+ "sha256": "7be28b9f1782d2e2979fb5029fd2b4c77372c8e8069da0845b59d5f85e283260"
164
167
  },
165
168
  {
166
169
  "path": "package-dist/scripts/foundry-facade.js",
167
- "bytes": 120940,
168
- "sha256": "92d729caaa48a76adc30f09f79a24b381cc709ed685da9ffe26db45944ea167e"
170
+ "bytes": 123303,
171
+ "sha256": "0106478cff8f85c02fb429ef53b6cc3d75aea30aadc0b00a40506b5e0e705b61"
169
172
  },
170
173
  {
171
174
  "path": "package-dist/scripts/foundry-runtime.d.ts",
172
- "bytes": 13100,
173
- "sha256": "4299d2b7ca6f732f2d3345aeaf4ddfb1d32212214bbb63925b46b858ee953b92"
175
+ "bytes": 13159,
176
+ "sha256": "e37b90ef7b3b8e75a81dec32236ead78e358f4b2cd6aefe2e34fd9c67bbd84f3"
174
177
  },
175
178
  {
176
179
  "path": "package-dist/scripts/foundry-runtime.js",
@@ -307,6 +310,26 @@
307
310
  "bytes": 33921,
308
311
  "sha256": "0ffb397c3db4a8c1a8bbaad176fb8ba24960060de381d046dde98bd68e5675f8"
309
312
  },
313
+ {
314
+ "path": "package-dist/scripts/lib/final-delivery-manifest.d.ts",
315
+ "bytes": 2117,
316
+ "sha256": "eec3491c3fd06c9807b58b665fa46655801a4ad3281b2fde509ed961cd41ba96"
317
+ },
318
+ {
319
+ "path": "package-dist/scripts/lib/final-delivery-manifest.js",
320
+ "bytes": 5683,
321
+ "sha256": "b313759f725c7524f0cedbca77a6d41df3de118905f558d0c5c441b41202c01d"
322
+ },
323
+ {
324
+ "path": "package-dist/scripts/lib/final-delivery-review.d.ts",
325
+ "bytes": 1478,
326
+ "sha256": "157a7dbdff62a379a4df7610094a3f184197261a99e5624febd2b57a9d79e028"
327
+ },
328
+ {
329
+ "path": "package-dist/scripts/lib/final-delivery-review.js",
330
+ "bytes": 4626,
331
+ "sha256": "247e0164d95faef96768c56a3370e7e60e148a3e54f06ebcffdd2c1e60dee8b6"
332
+ },
310
333
  {
311
334
  "path": "package-dist/scripts/lib/finalize-owners/cli-wrappers.d.ts",
312
335
  "bytes": 4046,
@@ -364,8 +387,8 @@
364
387
  },
365
388
  {
366
389
  "path": "package-dist/scripts/lib/finalize-owners/native-draft-handoff.js",
367
- "bytes": 7777,
368
- "sha256": "0591528a4c4d47210bca6199066e8102be053c7b84fb44be1430dbbba24f8060"
390
+ "bytes": 7917,
391
+ "sha256": "58af27471f4947dd37663224a162e4c3064f56190d7e27a275b61cc4871ab65a"
369
392
  },
370
393
  {
371
394
  "path": "package-dist/scripts/lib/finalize-owners/post-authoring.d.ts",
@@ -539,23 +562,23 @@
539
562
  },
540
563
  {
541
564
  "path": "package-dist/scripts/lib/foundry-edge-repair-preparation.d.ts",
542
- "bytes": 1107,
543
- "sha256": "b56c0666b63556e130d754b507d67572900874ce9d790e6db956578510a7dd6a"
565
+ "bytes": 1290,
566
+ "sha256": "ea340f79603a3fea42a6570e71f4db429e3bb271cb7232680af665ab245f4ee4"
544
567
  },
545
568
  {
546
569
  "path": "package-dist/scripts/lib/foundry-edge-repair-preparation.js",
547
- "bytes": 7241,
548
- "sha256": "5d8a900c50221181638b97c2983454871a910cc6cccfe1cae784112764b84729"
570
+ "bytes": 12636,
571
+ "sha256": "094a2a12df4241fc9ff928c3b1a2d0fd3a81f43ff85c0ec2a9d4ae982cd70eb9"
549
572
  },
550
573
  {
551
574
  "path": "package-dist/scripts/lib/foundry-edge-session.d.ts",
552
- "bytes": 1179,
553
- "sha256": "b0e9410a451e46c0d3bba71d864c5c12039c663a243f1c5a16ca07a956e1d4cf"
575
+ "bytes": 1796,
576
+ "sha256": "0d4925557abf2a2d37e5efd52cd80025fce1cb9c38e02bfc236399338dab8b89"
554
577
  },
555
578
  {
556
579
  "path": "package-dist/scripts/lib/foundry-edge-session.js",
557
- "bytes": 3818,
558
- "sha256": "e3ffdf5776e68401fe44bf838a49e5db9571fc0284ba1407a3e4929c67790bd2"
580
+ "bytes": 11068,
581
+ "sha256": "78df570cefcee11293e97e8f23cefc5a1f154f63001750e63fd9b0487b119623"
559
582
  },
560
583
  {
561
584
  "path": "package-dist/scripts/lib/foundry-edge-support-plan.d.ts",
@@ -579,8 +602,8 @@
579
602
  },
580
603
  {
581
604
  "path": "package-dist/scripts/lib/foundry-edge-support.d.ts",
582
- "bytes": 888,
583
- "sha256": "ca2041f59801112441067e394938feef9c1b23aea1eaa2e1ca9830bca81590a4"
605
+ "bytes": 914,
606
+ "sha256": "4dfa171a54070847391ed22590b5d4da88ab19848ea559098fdd5c37cffad119"
584
607
  },
585
608
  {
586
609
  "path": "package-dist/scripts/lib/foundry-edge-support.js",
@@ -694,8 +717,8 @@
694
717
  },
695
718
  {
696
719
  "path": "package-dist/scripts/lib/foundry-interaction-input.js",
697
- "bytes": 17742,
698
- "sha256": "b44781c36af46f4e2ef8be6c62fad98e6db724aed5b1083d115087cd92661bd4"
720
+ "bytes": 17867,
721
+ "sha256": "5088cb043f91e7e507cd866c8789aac02fc5441a7a845e5db2a573dad390b32b"
699
722
  },
700
723
  {
701
724
  "path": "package-dist/scripts/lib/foundry-interaction-projection.d.ts",
@@ -869,13 +892,13 @@
869
892
  },
870
893
  {
871
894
  "path": "package-dist/scripts/lib/foundry-operation-result.d.ts",
872
- "bytes": 3099,
873
- "sha256": "4d121539db0deae6588f068fe539b4a0b3474b9a60a667f1d880c8c058f28abb"
895
+ "bytes": 3121,
896
+ "sha256": "0bbb3620fb4ea9df204a00bc1cfae6678269d392c5db94e01817de90a29da2c4"
874
897
  },
875
898
  {
876
899
  "path": "package-dist/scripts/lib/foundry-operation-result.js",
877
- "bytes": 11226,
878
- "sha256": "11cf5ed262a61a5a99070c6334bca08978ec77a1ef349573f8f55807a46b95c3"
900
+ "bytes": 11252,
901
+ "sha256": "aa1a3ee763eb60070de1eb1da2f46321db0e7fb35c9a4a28d5d3fcc526196a3e"
879
902
  },
880
903
  {
881
904
  "path": "package-dist/scripts/lib/foundry-owner-execution-store.d.ts",
@@ -889,13 +912,13 @@
889
912
  },
890
913
  {
891
914
  "path": "package-dist/scripts/lib/foundry-owner-readback.d.ts",
892
- "bytes": 2635,
893
- "sha256": "9dd3a63fcaa50b0d993342e5ec2d90d0a5a14ba372d9d958c958a27822bdea66"
915
+ "bytes": 2730,
916
+ "sha256": "75323d338b674a39da72af615a68eb72ba4f94ea5bfeb2364b78997a59541394"
894
917
  },
895
918
  {
896
919
  "path": "package-dist/scripts/lib/foundry-owner-readback.js",
897
- "bytes": 19632,
898
- "sha256": "0f09e09d1951b57266ebb31a11e4a2d6d56f2c87b8fbadbb71088fb20e979e0d"
920
+ "bytes": 20572,
921
+ "sha256": "249e9de0b0b4309fbe8fccce1b90c0a65faa0c29d79d3302c154395d9d9344b8"
899
922
  },
900
923
  {
901
924
  "path": "package-dist/scripts/lib/foundry-owner-trace-acceptance.d.ts",
@@ -909,13 +932,13 @@
909
932
  },
910
933
  {
911
934
  "path": "package-dist/scripts/lib/foundry-package-contract.d.ts",
912
- "bytes": 6144,
913
- "sha256": "d157413d9f3d68977b20b903b434c7def4f855f672b04640013f447d8f4928a3"
935
+ "bytes": 6426,
936
+ "sha256": "fb6b6d63c5be0c34a9cb0fb8d20c56afe825eafbf39bc7d9d4e80978e5943aa1"
914
937
  },
915
938
  {
916
939
  "path": "package-dist/scripts/lib/foundry-package-contract.js",
917
- "bytes": 19073,
918
- "sha256": "44efea2e1bab03aaf490a1b6fb7d2991164d0993a49a3449a71850582210ef68"
940
+ "bytes": 19379,
941
+ "sha256": "610c4ea1d3f33b4c1d6a068d946ecef5006aae4221918ecbfa76b0b497ff3565"
919
942
  },
920
943
  {
921
944
  "path": "package-dist/scripts/lib/foundry-preparation-cli-validation.d.ts",
@@ -1007,6 +1030,16 @@
1007
1030
  "bytes": 11389,
1008
1031
  "sha256": "e2403362fe28b14020e70ee3b3b47c3f0583014241e0a0500bdbadb23d826382"
1009
1032
  },
1033
+ {
1034
+ "path": "package-dist/scripts/lib/foundry-repair-census.d.ts",
1035
+ "bytes": 3091,
1036
+ "sha256": "1453e0d9ce4faeaa6018f5833e832d3f78eb986b97998ebcad78ea4991529b19"
1037
+ },
1038
+ {
1039
+ "path": "package-dist/scripts/lib/foundry-repair-census.js",
1040
+ "bytes": 26441,
1041
+ "sha256": "8fe45b6bf44124f2066672e299be80b7d7b30be5576dc28d381d35aae72aa7bf"
1042
+ },
1010
1043
  {
1011
1044
  "path": "package-dist/scripts/lib/foundry-repair-execution.d.ts",
1012
1045
  "bytes": 759,
@@ -1059,13 +1092,13 @@
1059
1092
  },
1060
1093
  {
1061
1094
  "path": "package-dist/scripts/lib/foundry-repair-scope.d.ts",
1062
- "bytes": 4305,
1063
- "sha256": "cff852613e101a6ed12a9138ef044e42770de2ca15c8528a81bfeb691ffb0c12"
1095
+ "bytes": 5088,
1096
+ "sha256": "ff72cc60f9dd05d717b0697bedc61f0ee723870f6a5002ccc23054d329b885cb"
1064
1097
  },
1065
1098
  {
1066
1099
  "path": "package-dist/scripts/lib/foundry-repair-scope.js",
1067
- "bytes": 15136,
1068
- "sha256": "422f340e5c97aa841d81a9d1134dd0d3741cd710f4f4674a64bf10621d4af074"
1100
+ "bytes": 18607,
1101
+ "sha256": "5e4f3663eeece7951d4aa361e6d7273df77d6751ba6a8408d1509ca4317163a8"
1069
1102
  },
1070
1103
  {
1071
1104
  "path": "package-dist/scripts/lib/foundry-runtime-cache.d.ts",
@@ -1187,6 +1220,16 @@
1187
1220
  "bytes": 23600,
1188
1221
  "sha256": "81147f49495d78fc7d2db9fdfadb4665fa559a055a7acb22617409e43c3bcb93"
1189
1222
  },
1223
+ {
1224
+ "path": "package-dist/scripts/lib/foundry-scientific-repair.d.ts",
1225
+ "bytes": 2264,
1226
+ "sha256": "7ededc5c9eafa1ad3844cbd14ae0da20233ca49a7c8186966acace081c47a353"
1227
+ },
1228
+ {
1229
+ "path": "package-dist/scripts/lib/foundry-scientific-repair.js",
1230
+ "bytes": 24291,
1231
+ "sha256": "f7c076d2e97ef64fe59ef83aab43a7435370bd42b35f5c5d2e22c2d3e21fcc93"
1232
+ },
1190
1233
  {
1191
1234
  "path": "package-dist/scripts/lib/foundry-semantic-input.d.ts",
1192
1235
  "bytes": 1465,
@@ -1194,8 +1237,8 @@
1194
1237
  },
1195
1238
  {
1196
1239
  "path": "package-dist/scripts/lib/foundry-semantic-input.js",
1197
- "bytes": 7442,
1198
- "sha256": "d37053ec8fd81bf7fdbbef2d7213029a9b54a8754445fe904b21f3e3e447dc60"
1240
+ "bytes": 7535,
1241
+ "sha256": "d5340eae7b0ed61ec603ea47aa9ccb3b8c13c0a693f41a48dac096210717693d"
1199
1242
  },
1200
1243
  {
1201
1244
  "path": "package-dist/scripts/lib/foundry-semantic-interaction.d.ts",
@@ -1227,6 +1270,16 @@
1227
1270
  "bytes": 20496,
1228
1271
  "sha256": "282ed219d27d95f4f592239cdee0e7153c0ba855e8f7c42903f8e1c5ce2dba7f"
1229
1272
  },
1273
+ {
1274
+ "path": "package-dist/scripts/lib/foundry-task-input-preparation.d.ts",
1275
+ "bytes": 566,
1276
+ "sha256": "f6b3e6b57485218a8b55edfc932b50a0a19209a05fe3d21065538f2337eb81ad"
1277
+ },
1278
+ {
1279
+ "path": "package-dist/scripts/lib/foundry-task-input-preparation.js",
1280
+ "bytes": 8746,
1281
+ "sha256": "704123646347edd43764fbde03b9ce328349ff59f021afeb197250a1cfd7f2bc"
1282
+ },
1230
1283
  {
1231
1284
  "path": "package-dist/scripts/lib/foundry-task-io.d.ts",
1232
1285
  "bytes": 1324,
@@ -1244,8 +1297,8 @@
1244
1297
  },
1245
1298
  {
1246
1299
  "path": "package-dist/scripts/lib/foundry-task-registration.js",
1247
- "bytes": 21914,
1248
- "sha256": "7ea6c21dfa57874d2b479a7a1aeda24ec2842830eb0a5ebdca6d025b09e76065"
1300
+ "bytes": 22951,
1301
+ "sha256": "4414a9bcccb3c2444f8ae19623d4428e594040dcd5327642c64e5327bd79ed52"
1249
1302
  },
1250
1303
  {
1251
1304
  "path": "package-dist/scripts/lib/foundry-task-runtime-adoption-write.d.ts",
@@ -1289,8 +1342,8 @@
1289
1342
  },
1290
1343
  {
1291
1344
  "path": "package-dist/scripts/lib/foundry-task-types.d.ts",
1292
- "bytes": 3606,
1293
- "sha256": "024fc6ccb9c6406b6f72580b619d782ea0c707896ab6040e2f95653d6c42515a"
1345
+ "bytes": 3664,
1346
+ "sha256": "d7fc61066a911424ebe2a584409bffa71db02ed16c7d85ae6aa477bc430ef591"
1294
1347
  },
1295
1348
  {
1296
1349
  "path": "package-dist/scripts/lib/foundry-task-types.js",
@@ -1424,8 +1477,8 @@
1424
1477
  },
1425
1478
  {
1426
1479
  "path": "package-dist/scripts/lib/foundry-workflow-execution.js",
1427
- "bytes": 18370,
1428
- "sha256": "1420f285aec988e5ed1d0791300792d898d5e576482812f4705031610f26dfd2"
1480
+ "bytes": 18616,
1481
+ "sha256": "d3ae38e637e2dba9f8a0cf4f5a8e29bfd26cb7a7ef9ce26da1f8c954b0ac10cc"
1429
1482
  },
1430
1483
  {
1431
1484
  "path": "package-dist/scripts/lib/foundry-workflow-finalize.d.ts",
@@ -1529,13 +1582,13 @@
1529
1582
  },
1530
1583
  {
1531
1584
  "path": "package-dist/scripts/lib/foundry-workflow-repair.d.ts",
1532
- "bytes": 2230,
1533
- "sha256": "07100ace33e93569e609680f68281c53d34a9641d1fdfa3fa852cf221d0baacb"
1585
+ "bytes": 2891,
1586
+ "sha256": "5ef1fe4eee565098c8d385d8ae1e5127b76594eb9561149efd3c17269ab51b5c"
1534
1587
  },
1535
1588
  {
1536
1589
  "path": "package-dist/scripts/lib/foundry-workflow-repair.js",
1537
- "bytes": 33860,
1538
- "sha256": "cd243e087a5d7efe32c0b0a182b05c939b0d938a613ebc61b0b10982d93b6b0a"
1590
+ "bytes": 43609,
1591
+ "sha256": "940f194ea5b0ae6be0d460fc56ce7b40f955f2c999802c7621805b0943db12e7"
1539
1592
  },
1540
1593
  {
1541
1594
  "path": "package-dist/scripts/lib/foundry-workflow-rows.d.ts",
@@ -2129,8 +2182,8 @@
2129
2182
  },
2130
2183
  {
2131
2184
  "path": "package-dist/scripts/public-api.d.ts",
2132
- "bytes": 6309,
2133
- "sha256": "fd8e634520a255e7a2dc2305a766c60787ec80069c03e1f5989da98ad28f06ad"
2185
+ "bytes": 6538,
2186
+ "sha256": "f9859a30e2a4f9a9c8148f15811affe0ffe04af6621bef0b3d78661950e14116"
2134
2187
  },
2135
2188
  {
2136
2189
  "path": "package-dist/scripts/public-api.js",
@@ -2144,8 +2197,8 @@
2144
2197
  },
2145
2198
  {
2146
2199
  "path": "package-dist/scripts/runtime-entry.js",
2147
- "bytes": 23354,
2148
- "sha256": "00bcdb3427fb5fd2adb61307923fff3599acb14c5d4bd7a0efcc76d1a201d6b9"
2200
+ "bytes": 24056,
2201
+ "sha256": "c7722e8589ba379e7d9b1cb16a317fd717b61f2593331a68267637f9fe3f6fd9"
2149
2202
  },
2150
2203
  {
2151
2204
  "path": "specs/canonical-support/flow-properties-unit-groups.json",
@@ -2187,6 +2240,11 @@
2187
2240
  "bytes": 1620,
2188
2241
  "sha256": "ade9e59549c35fedcd8de7277d8e1198e4420664232817f70f4c68055d4bdefa"
2189
2242
  },
2243
+ {
2244
+ "path": "specs/schemas/foundry-interaction-draft.schema.json",
2245
+ "bytes": 6844,
2246
+ "sha256": "b111b3bff9d67f976724b141b11ab4bc19c5e6444657a415f58796a45d6d9b67"
2247
+ },
2190
2248
  {
2191
2249
  "path": "specs/schemas/foundry-interaction-input.schema.json",
2192
2250
  "bytes": 5911,
@@ -2219,13 +2277,13 @@
2219
2277
  },
2220
2278
  {
2221
2279
  "path": "specs/schemas/foundry-operation-result.schema.json",
2222
- "bytes": 4839,
2223
- "sha256": "e9cd65de984ceefba248d1a2535004a591d4c05547fe578692eaefb93aafa1aa"
2280
+ "bytes": 4869,
2281
+ "sha256": "44445168ffbb92a0d8c77a9c523c323cac4e4a56322e98abf5fe6ba60493c0ae"
2224
2282
  },
2225
2283
  {
2226
2284
  "path": "specs/schemas/foundry-package-descriptor.schema.json",
2227
- "bytes": 4465,
2228
- "sha256": "dc694f41937dc231c8fd3881dd7b2bc658f07859a66a8fb4f9f4cbf47e9d8f2e"
2285
+ "bytes": 4621,
2286
+ "sha256": "db5d0af85843ea0f09967a38a7fe2a23167b38bd628e73a06a974d0dc3c18be2"
2229
2287
  },
2230
2288
  {
2231
2289
  "path": "specs/schemas/foundry-quality-review-draft.schema.json",
@@ -2247,6 +2305,16 @@
2247
2305
  "bytes": 1393,
2248
2306
  "sha256": "b118eed30c3fd316c8218fc426aa80b136dadf02fbe95d4dc7cdf45f2f49c99d"
2249
2307
  },
2308
+ {
2309
+ "path": "specs/schemas/foundry-scientific-repair.schema.json",
2310
+ "bytes": 1527,
2311
+ "sha256": "e066b305962ccad1c240f9912ab846d2d89e2112049dfa640e9774f6a5963f4a"
2312
+ },
2313
+ {
2314
+ "path": "specs/schemas/foundry-semantic-draft.schema.json",
2315
+ "bytes": 1396,
2316
+ "sha256": "8609d83b2885dc10dd054613046ad8935aaf936abd915f8de5347530d4f66667"
2317
+ },
2250
2318
  {
2251
2319
  "path": "specs/schemas/foundry-semantic-input.schema.json",
2252
2320
  "bytes": 1705,
@@ -2254,8 +2322,8 @@
2254
2322
  },
2255
2323
  {
2256
2324
  "path": "specs/schemas/foundry-task-start.schema.json",
2257
- "bytes": 8143,
2258
- "sha256": "8344546088f09cbb7540922b61e2966bb0413f033c38ff3ba04199dd129dc290"
2325
+ "bytes": 8546,
2326
+ "sha256": "d887374a78cc1b6e70ccc5009cc4527e2dd12ba4b4aa0d604784240052baf5b2"
2259
2327
  },
2260
2328
  {
2261
2329
  "path": "specs/schemas/foundry-workspace-migration-pending.schema.json",
@@ -2293,5 +2361,5 @@
2293
2361
  "sha256": "3d22fcc572f9a0f192ccb699d01fb32574287ed2bbd2aca70fb4b792b7aed487"
2294
2362
  }
2295
2363
  ],
2296
- "files_sha256": "f1d1fcad23d4d82bda43696fc9ae709f62114682ec5a859ededab3d545028cc4"
2364
+ "files_sha256": "30371c93c74b912a03f7cc3229e9bdc82e5af3c8bdd8917f64aa89167d95b233"
2297
2365
  }
@@ -64,6 +64,12 @@ export declare function createFoundryFacade(options: FoundryFacadeOptions): Read
64
64
  start(input: {
65
65
  specFile: string;
66
66
  }): Promise<FoundryOperationResult>;
67
+ prepareInput(input: {
68
+ taskId: string;
69
+ actorId: string;
70
+ kind: "interaction" | "semantic";
71
+ draftFile: string;
72
+ }): Promise<FoundryOperationResult>;
67
73
  status(input: {
68
74
  taskId: string;
69
75
  actorId: string;
@@ -1,3 +1,4 @@
1
+ import { prepareFoundryTaskInput } from "./lib/foundry-task-input-preparation.js";
1
2
  import { planFoundryTaskRuntimeAdoption, applyFoundryTaskRuntimeAdoption, } from "./lib/foundry-task-runtime-adoption-write.js";
2
3
  import { assertRuntimeAdoptionToolkit, assertAdoptedRuntimeToolkit, readFoundryTaskRuntimeAdoption, } from "./lib/foundry-task-runtime-adoption.js";
3
4
  import { assertFoundryRepairExecution } from "./lib/foundry-repair-execution.js";
@@ -1554,6 +1555,40 @@ export function createFoundryFacade(options) {
1554
1555
  return failure("task.start", taskId, error, current ? runtimeIdentity(current) : null);
1555
1556
  }
1556
1557
  },
1558
+ async prepareInput(input) {
1559
+ let current = null;
1560
+ try {
1561
+ assertNotInterrupted(options.signal);
1562
+ current = base();
1563
+ const record = loadFoundryFacadeTaskRecord(current, input.taskId, input.actorId);
1564
+ const context = taskContext(options, current, record);
1565
+ const qualified = qualification(context, options.runtimeSelection);
1566
+ const runtime = createFoundryRuntime(context, qualified);
1567
+ const before = await runtime.inspectTask();
1568
+ if (input.kind !== "interaction" && input.kind !== "semantic")
1569
+ throw new FoundryContextError("task_input_draft_invalid", "Select interaction or semantic input preparation.");
1570
+ const descriptor = prepareFoundryTaskInput(context, before.artifacts, record.spec.target_entities, input.kind, input.draftFile);
1571
+ const after = await runtime.inspectTask();
1572
+ if (sha256Json(before.artifacts) !== sha256Json(after.artifacts))
1573
+ throw new FoundryContextError("task_input_state_changed", "Task evidence changed during input preparation. Inspect the current task and prepare again.");
1574
+ assertNotInterrupted(options.signal);
1575
+ return createFoundryOperationResult({
1576
+ operation: "task.prepare-input",
1577
+ status: "ready",
1578
+ taskId: record.task_id,
1579
+ artifacts: [inlineArtifact("prepared_task_input", descriptor)],
1580
+ blockers: [],
1581
+ nextActions: [
1582
+ human("save_prepared_task_input", `Save the prepared_task_input value as JSON and submit it through task resume --${input.kind}-input. Its SHA-256 bindings name the current indexed state and exact raw file bytes. Review the selected decisions and evidence before submission.`),
1583
+ ],
1584
+ runtimeIdentity: runtimeIdentity(context, qualified),
1585
+ permissions: noPermission(),
1586
+ });
1587
+ }
1588
+ catch (error) {
1589
+ return failure("task.prepare-input", input.taskId, error, current ? runtimeIdentity(current) : null);
1590
+ }
1591
+ },
1557
1592
  async status(input) {
1558
1593
  let current = null;
1559
1594
  try {
@@ -52,6 +52,7 @@ export declare function createFoundryRuntime(context: FoundryRuntimeContext, qua
52
52
  contract: string;
53
53
  before: string;
54
54
  candidate: string;
55
+ scientific?: string;
55
56
  predecessor: Readonly<{
56
57
  task_id: string;
57
58
  receipt_sha256: string;
@@ -181,7 +182,7 @@ export declare function createFoundryRuntime(context: FoundryRuntimeContext, qua
181
182
  };
182
183
  command_policy: {
183
184
  total: number;
184
- public_operations: readonly ["workspace.init", "doctor", "task.start", "task.status", "task.resume", "task.adopt-runtime", "workspace.migrate"];
185
+ public_operations: readonly ["workspace.init", "doctor", "task.start", "task.status", "task.prepare-input", "task.resume", "task.adopt-runtime", "workspace.migrate"];
185
186
  public_facade: ("acceptance-check" | "capabilities-list" | "dataset-authoring-patch-collect" | "dataset-authoring-plan" | "dataset-authoring-task-build" | "dataset-bafu-authoring-patches-autofill" | "dataset-bafu-batch-import-run" | "dataset-bafu-identity-decisions-autofill" | "dataset-bafu-leaf-classification-category-map-project" | "dataset-bafu-leaf-classification-tasks-prepare" | "dataset-bafu-process-scope-e2e" | "dataset-bafu-universe-coverage-report" | "dataset-bundle-sample-rows" | "dataset-canonical-support-mappings-autofill" | "dataset-classification-decision-task-build" | "dataset-classification-decisions-apply" | "dataset-commit-handoff-plan" | "dataset-curation-cleanup" | "dataset-curation-gate" | "dataset-curation-queue-build" | "dataset-identity-decision-task-build" | "dataset-identity-decisions-apply" | "dataset-identity-preflight-index-merge" | "dataset-identity-preflight-query-audit" | "dataset-identity-preflight-requests-build" | "dataset-identity-preflight-run" | "dataset-identity-reference-rewrites-apply" | "dataset-import-completion-report" | "dataset-import-ledger-report" | "dataset-incremental-change-set-compose" | "dataset-library-authoring-plan" | "dataset-library-classification-decisions-project" | "dataset-library-decisions-apply" | "dataset-library-identity-decisions-from-preflight" | "dataset-library-index-build" | "dataset-location-decision-task-build" | "dataset-location-decisions-apply" | "dataset-location-decisions-suggest" | "dataset-mutation-manifest" | "dataset-patch-apply" | "dataset-post-authoring-finalize" | "dataset-post-write-closeout" | "dataset-process-scope-run" | "dataset-support-cache-refresh" | "dataset-tidas-import" | "dataset-tidas-validate" | "dataset-topology-convergence-compose" | "dataset-uslci-batch-import-run" | "dataset-worldsteel-batch-import-run" | "doctor" | "env-check" | "execution-capsule-admit" | "final-delivery-promote" | "init" | "profiles-list" | "route-task" | "storage-check" | "surface-audit" | "task-complete" | "tasks-check" | "tasks-list" | "tidas-handshake" | "workflow-check" | "workspace-map")[];
186
187
  internal_only: number;
187
188
  excluded: ("acceptance-check" | "capabilities-list" | "dataset-authoring-patch-collect" | "dataset-authoring-plan" | "dataset-authoring-task-build" | "dataset-bafu-authoring-patches-autofill" | "dataset-bafu-batch-import-run" | "dataset-bafu-identity-decisions-autofill" | "dataset-bafu-leaf-classification-category-map-project" | "dataset-bafu-leaf-classification-tasks-prepare" | "dataset-bafu-process-scope-e2e" | "dataset-bafu-universe-coverage-report" | "dataset-bundle-sample-rows" | "dataset-canonical-support-mappings-autofill" | "dataset-classification-decision-task-build" | "dataset-classification-decisions-apply" | "dataset-commit-handoff-plan" | "dataset-curation-cleanup" | "dataset-curation-gate" | "dataset-curation-queue-build" | "dataset-identity-decision-task-build" | "dataset-identity-decisions-apply" | "dataset-identity-preflight-index-merge" | "dataset-identity-preflight-query-audit" | "dataset-identity-preflight-requests-build" | "dataset-identity-preflight-run" | "dataset-identity-reference-rewrites-apply" | "dataset-import-completion-report" | "dataset-import-ledger-report" | "dataset-incremental-change-set-compose" | "dataset-library-authoring-plan" | "dataset-library-classification-decisions-project" | "dataset-library-decisions-apply" | "dataset-library-identity-decisions-from-preflight" | "dataset-library-index-build" | "dataset-location-decision-task-build" | "dataset-location-decisions-apply" | "dataset-location-decisions-suggest" | "dataset-mutation-manifest" | "dataset-patch-apply" | "dataset-post-authoring-finalize" | "dataset-post-write-closeout" | "dataset-process-scope-run" | "dataset-support-cache-refresh" | "dataset-tidas-import" | "dataset-tidas-validate" | "dataset-topology-convergence-compose" | "dataset-uslci-batch-import-run" | "dataset-worldsteel-batch-import-run" | "doctor" | "env-check" | "execution-capsule-admit" | "final-delivery-promote" | "init" | "profiles-list" | "route-task" | "storage-check" | "surface-audit" | "task-complete" | "tasks-check" | "tasks-list" | "tidas-handshake" | "workflow-check" | "workspace-map")[];
@@ -0,0 +1,40 @@
1
+ import crypto from "node:crypto";
2
+ export type JsonRecord = Record<string, unknown>;
3
+ export declare const MANIFEST_SCHEMA = "foundry-final-delivery-manifest.v1";
4
+ export declare const REPORT_SCHEMA = "foundry-final-delivery-promotion-report.v1";
5
+ export declare const LEDGER_SCHEMA = "foundry-final-delivery-promotion-ledger-row.v1";
6
+ export declare const SEAL_SCHEMA = "foundry-final-delivery-promotion-seal.v1";
7
+ export declare const MAX_ZIP_ENTRIES = 10000;
8
+ export declare const MAX_ZIP_ENTRY_BYTES: number;
9
+ export declare const MAX_ZIP_TOTAL_BYTES: number;
10
+ export declare function sha256(value: crypto.BinaryLike): string;
11
+ export declare function compareText(left: string, right: string): number;
12
+ export declare function stableJson(value: unknown): string;
13
+ export declare function isPlainObject(value: unknown): value is JsonRecord;
14
+ export declare function isSha256(value: unknown): boolean;
15
+ export declare function pathIsInside(root: string, candidate: string): boolean;
16
+ export declare function safeRelativePath(value: unknown): boolean;
17
+ export declare function writeExclusive(filePath: string, content: string | Buffer): void;
18
+ export declare function writeJsonExclusive(filePath: string, value: unknown): void;
19
+ export declare function relativeToRepo(repoRoot: string, filePath: string): string;
20
+ export type CheckSeverity = "P0" | "P1";
21
+ export type LedgerRow = {
22
+ schema_version: string;
23
+ check_id: string;
24
+ status: "PASS" | "FAIL";
25
+ severity: CheckSeverity | null;
26
+ detail: string;
27
+ evidence: unknown;
28
+ };
29
+ export type CheckCollector = {
30
+ add: (checkId: string, passed: boolean, severity: CheckSeverity, detail: string, evidence?: unknown) => boolean;
31
+ rows: LedgerRow[];
32
+ };
33
+ export declare function scanTextWithDecodedStrings(raw: string, value: unknown): string;
34
+ export declare function decodeArtifactText(buffer: Buffer): string;
35
+ export declare class PromotionArtifactError extends Error {
36
+ readonly code: string;
37
+ constructor(code: string, message: string);
38
+ }
39
+ export declare function artifactErrorCode(error: unknown): string;
40
+ export declare function checkCollector(): CheckCollector;