@tiangong-lca/foundry 0.1.10 → 0.1.12

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 (44) hide show
  1. package/README.md +6 -6
  2. package/docs/architecture.md +6 -6
  3. package/docs/foundry-task-contracts.md +11 -3
  4. package/docs/package-distribution-contract.md +6 -4
  5. package/docs/public-runtime-contract.md +21 -5
  6. package/docs/runtime-context-contract.md +7 -3
  7. package/docs/task-authorization-contract.md +5 -3
  8. package/package-dist/assets/foundry-package-descriptor.json +120 -64
  9. package/package-dist/scripts/foundry-facade.d.ts +1 -0
  10. package/package-dist/scripts/foundry-facade.js +261 -36
  11. package/package-dist/scripts/foundry-runtime.d.ts +2 -1
  12. package/package-dist/scripts/foundry-runtime.js +2 -2
  13. package/package-dist/scripts/lib/foundry-interaction-input.d.ts +19 -0
  14. package/package-dist/scripts/lib/foundry-interaction-input.js +327 -0
  15. package/package-dist/scripts/lib/foundry-interaction-projection.d.ts +22 -0
  16. package/package-dist/scripts/lib/foundry-interaction-projection.js +81 -0
  17. package/package-dist/scripts/lib/foundry-interaction-types.d.ts +17 -0
  18. package/package-dist/scripts/lib/foundry-interaction-types.js +4 -0
  19. package/package-dist/scripts/lib/foundry-owner-execution-store.js +34 -2
  20. package/package-dist/scripts/lib/foundry-package-contract.d.ts +3 -3
  21. package/package-dist/scripts/lib/foundry-package-contract.js +3 -1
  22. package/package-dist/scripts/lib/foundry-semantic-input.d.ts +2 -0
  23. package/package-dist/scripts/lib/foundry-semantic-input.js +29 -2
  24. package/package-dist/scripts/lib/foundry-semantic-interaction.d.ts +12 -0
  25. package/package-dist/scripts/lib/foundry-semantic-interaction.js +38 -0
  26. package/package-dist/scripts/lib/foundry-task-start-spec.d.ts +11 -0
  27. package/package-dist/scripts/lib/foundry-task-start-spec.js +36 -0
  28. package/package-dist/scripts/lib/foundry-task-store.d.ts +1 -1
  29. package/package-dist/scripts/lib/foundry-workflow-assessment.d.ts +7 -1
  30. package/package-dist/scripts/lib/foundry-workflow-assessment.js +301 -8
  31. package/package-dist/scripts/lib/foundry-workflow-finalize.js +7 -4
  32. package/package-dist/scripts/lib/foundry-workflow-interaction.d.ts +4 -0
  33. package/package-dist/scripts/lib/foundry-workflow-interaction.js +63 -0
  34. package/package-dist/scripts/lib/foundry-workflow-semantic.js +21 -1
  35. package/package-dist/scripts/lib/foundry-workflow-state.d.ts +9 -1
  36. package/package-dist/scripts/lib/foundry-workflow-state.js +173 -21
  37. package/package-dist/scripts/public-api.d.ts +2 -0
  38. package/package-dist/scripts/public-api.js +1 -0
  39. package/package-dist/scripts/runtime-entry.js +9 -1
  40. package/package.json +2 -1
  41. package/specs/schemas/foundry-interaction-input.schema.json +173 -0
  42. package/specs/schemas/foundry-package-descriptor.schema.json +2 -1
  43. package/specs/schemas/foundry-semantic-input.schema.json +12 -1
  44. package/specs/schemas/foundry-task-start.schema.json +75 -0
@@ -10,6 +10,7 @@
10
10
  "task_id": { "type": "string", "pattern": "^task-[0-9a-f]{64}-r[0-9]{4}$" },
11
11
  "actor_id": { "type": "string", "maxLength": 256, "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$" },
12
12
  "assessment_sha256": { "$ref": "#/$defs/sha" },
13
+ "interaction_sha256": { "$ref": "#/$defs/sha" },
13
14
  "submissions": {
14
15
  "type": "array",
15
16
  "minItems": 1,
@@ -27,7 +28,17 @@
27
28
  "maxLength": 4096,
28
29
  "pattern": "^[^\\u0000\\r\\n]+$"
29
30
  },
30
- "sha256": { "$ref": "#/$defs/sha" }
31
+ "sha256": { "$ref": "#/$defs/sha" },
32
+ "decision_ids": {
33
+ "type": "array",
34
+ "maxItems": 100,
35
+ "uniqueItems": true,
36
+ "items": {
37
+ "type": "string",
38
+ "maxLength": 256,
39
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$"
40
+ }
41
+ }
31
42
  }
32
43
  }
33
44
  }
@@ -92,6 +92,9 @@
92
92
  }
93
93
  ]
94
94
  },
95
+ "brief": {
96
+ "$ref": "#/$defs/taskBrief"
97
+ },
95
98
  "repair": {
96
99
  "oneOf": [
97
100
  {
@@ -162,6 +165,78 @@
162
165
  }
163
166
  ],
164
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
+ },
165
240
  "id": {
166
241
  "type": "string",
167
242
  "minLength": 1,