@you-agent-factory/factory-emulator 0.0.0
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/LICENSE.md +3 -0
- package/README.md +286 -0
- package/generated/factory-emulator-scenario.schema.json +191 -0
- package/generated/factory.schema.json +2606 -0
- package/package.json +44 -0
- package/src/contracts.ts +41 -0
- package/src/data-error.js +21 -0
- package/src/data-only.js +208 -0
- package/src/emulator.js +195 -0
- package/src/emulator.ts +86 -0
- package/src/examples.js +86 -0
- package/src/examples.ts +11 -0
- package/src/generated/factory-schema.d.ts +3 -0
- package/src/generated/factory-schema.js +5 -0
- package/src/generated/scenario-schema.d.ts +4 -0
- package/src/generated/scenario-schema.js +6 -0
- package/src/generated/scenario.ts +103 -0
- package/src/identity.js +55 -0
- package/src/index.js +34 -0
- package/src/index.ts +102 -0
- package/src/limits.js +125 -0
- package/src/parser.js +113 -0
- package/src/parser.ts +56 -0
- package/src/scheduler.js +374 -0
- package/src/semantics.js +354 -0
- package/src/semantics.ts +38 -0
- package/src/session.js +1201 -0
- package/src/session.ts +324 -0
- package/src/sinks.js +118 -0
- package/src/sinks.ts +56 -0
- package/src/support.js +334 -0
- package/src/support.ts +15 -0
- package/src/virtual-time.js +36 -0
|
@@ -0,0 +1,2606 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$defs": {
|
|
3
|
+
"AgentWorkerToolPolicy": {
|
|
4
|
+
"description": "Explicit tool execution policy for AGENT_WORKER agent loops. DISABLED runs the harness in no-tools mode. READ_ONLY exposes bounded filesystem read tools. ENABLED adds bounded filesystem write capability for the first supported tool set.",
|
|
5
|
+
"enum": [
|
|
6
|
+
"DISABLED",
|
|
7
|
+
"READ_ONLY",
|
|
8
|
+
"ENABLED"
|
|
9
|
+
],
|
|
10
|
+
"type": "string"
|
|
11
|
+
},
|
|
12
|
+
"AgentWorkerToolsConfig": {
|
|
13
|
+
"additionalProperties": false,
|
|
14
|
+
"description": "Explicit agent-loop tool policy for AGENT_WORKER definitions. Tool execution stays disabled unless this block is present with a non-DISABLED policy.",
|
|
15
|
+
"properties": {
|
|
16
|
+
"policy": {
|
|
17
|
+
"allOf": [
|
|
18
|
+
{
|
|
19
|
+
"$ref": "#/$defs/AgentWorkerToolPolicy"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"description": "Required executor policy for agent-loop tool use on this worker."
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"required": [
|
|
26
|
+
"policy"
|
|
27
|
+
],
|
|
28
|
+
"type": "object"
|
|
29
|
+
},
|
|
30
|
+
"BundledFile": {
|
|
31
|
+
"additionalProperties": false,
|
|
32
|
+
"description": "One explicit portable bundled file entry carried by the factory portability manifest. SCRIPT files target factory/scripts/..., DOC files target factory/docs/..., INPUT files target factory/inputs/\u003cwork-type\u003e/\u003cchannel\u003e/..., and ROOT_HELPER files target supported project-root helper paths such as Makefile only when declared explicitly in bundledFiles. Export and flatten do not auto-discover project-root helpers. In v1 shared-factory exports, INPUT entries encode a share-time snapshot of starter work that is copied into the recipient factory as detached seeded work.",
|
|
33
|
+
"properties": {
|
|
34
|
+
"content": {
|
|
35
|
+
"$ref": "#/$defs/BundledFileContent"
|
|
36
|
+
},
|
|
37
|
+
"id": {
|
|
38
|
+
"description": "Durable bundled-file identifier used by portable layout and graph editor references. When omitted on input, the canonical targetPath is materialized as the stable identifier.",
|
|
39
|
+
"type": "string"
|
|
40
|
+
},
|
|
41
|
+
"targetPath": {
|
|
42
|
+
"description": "Canonical factory-relative restoration target for the bundled file. Absolute paths, backslash-separated paths, and paths that require dot-segment normalization are rejected.",
|
|
43
|
+
"type": "string"
|
|
44
|
+
},
|
|
45
|
+
"type": {
|
|
46
|
+
"description": "Portable file class. SCRIPT entries target factory/scripts/..., DOC entries target factory/docs/..., INPUT entries target factory/inputs/\u003cwork-type\u003e/\u003cchannel\u003e/..., and ROOT_HELPER entries target supported project-root helper files such as Makefile only when explicitly declared in bundledFiles. Shared-factory INPUT entries snapshot current source inputs at share time instead of creating a live link.",
|
|
47
|
+
"enum": [
|
|
48
|
+
"SCRIPT",
|
|
49
|
+
"DOC",
|
|
50
|
+
"INPUT",
|
|
51
|
+
"ROOT_HELPER"
|
|
52
|
+
],
|
|
53
|
+
"type": "string"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"required": [
|
|
57
|
+
"type",
|
|
58
|
+
"targetPath",
|
|
59
|
+
"content"
|
|
60
|
+
],
|
|
61
|
+
"type": "object"
|
|
62
|
+
},
|
|
63
|
+
"BundledFileContent": {
|
|
64
|
+
"additionalProperties": false,
|
|
65
|
+
"description": "Inline content payload for a portable bundled file.",
|
|
66
|
+
"properties": {
|
|
67
|
+
"encoding": {
|
|
68
|
+
"description": "Declared content encoding for the inline payload. V1 bundled files use UTF-8 text content.",
|
|
69
|
+
"enum": [
|
|
70
|
+
"utf-8"
|
|
71
|
+
],
|
|
72
|
+
"type": "string"
|
|
73
|
+
},
|
|
74
|
+
"inline": {
|
|
75
|
+
"description": "Inline bundled file content carried in the manifest. SCRIPT and DOC files under factory/scripts/ and factory/docs/ may be discovered during flatten, but supported root helper paths such as Makefile are bundled only when they appear as explicit ROOT_HELPER entries in bundledFiles.",
|
|
76
|
+
"type": "string"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"required": [
|
|
80
|
+
"encoding",
|
|
81
|
+
"inline"
|
|
82
|
+
],
|
|
83
|
+
"type": "object"
|
|
84
|
+
},
|
|
85
|
+
"ClassificationRoute": {
|
|
86
|
+
"additionalProperties": false,
|
|
87
|
+
"properties": {
|
|
88
|
+
"label": {
|
|
89
|
+
"description": "Case-sensitive classifier label that must match the trimmed classifier output exactly.",
|
|
90
|
+
"type": "string"
|
|
91
|
+
},
|
|
92
|
+
"outputs": {
|
|
93
|
+
"description": "One or more authored destinations emitted when this classifier label is selected.",
|
|
94
|
+
"items": {
|
|
95
|
+
"$ref": "#/$defs/WorkstationIO"
|
|
96
|
+
},
|
|
97
|
+
"type": "array"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"required": [
|
|
101
|
+
"label",
|
|
102
|
+
"outputs"
|
|
103
|
+
],
|
|
104
|
+
"type": "object"
|
|
105
|
+
},
|
|
106
|
+
"FactoryGuard": {
|
|
107
|
+
"additionalProperties": false,
|
|
108
|
+
"description": "Factory-level guard attached at the root factory definition.",
|
|
109
|
+
"properties": {
|
|
110
|
+
"model": {
|
|
111
|
+
"description": "Optional model name to scope throttling more narrowly than the provider-level window.",
|
|
112
|
+
"type": "string"
|
|
113
|
+
},
|
|
114
|
+
"modelProvider": {
|
|
115
|
+
"allOf": [
|
|
116
|
+
{
|
|
117
|
+
"$ref": "#/$defs/WorkerModelProvider"
|
|
118
|
+
}
|
|
119
|
+
],
|
|
120
|
+
"description": "Provider whose inference-throttle history controls this factory-level guard."
|
|
121
|
+
},
|
|
122
|
+
"refreshWindow": {
|
|
123
|
+
"description": "Duration string that controls how long the factory should keep re-checking throttle history before allowing the lane again.",
|
|
124
|
+
"type": "string"
|
|
125
|
+
},
|
|
126
|
+
"type": {
|
|
127
|
+
"allOf": [
|
|
128
|
+
{
|
|
129
|
+
"$ref": "#/$defs/FactoryGuardType"
|
|
130
|
+
}
|
|
131
|
+
],
|
|
132
|
+
"description": "Factory-level guard condition to evaluate before dispatch-ready transitions can proceed."
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"required": [
|
|
136
|
+
"type",
|
|
137
|
+
"modelProvider",
|
|
138
|
+
"refreshWindow"
|
|
139
|
+
],
|
|
140
|
+
"type": "object"
|
|
141
|
+
},
|
|
142
|
+
"FactoryGuardType": {
|
|
143
|
+
"description": "Factory-level guard condition attached at the root factory definition.",
|
|
144
|
+
"enum": [
|
|
145
|
+
"INFERENCE_THROTTLE_GUARD"
|
|
146
|
+
],
|
|
147
|
+
"type": "string"
|
|
148
|
+
},
|
|
149
|
+
"FactoryInvocationExample": {
|
|
150
|
+
"additionalProperties": false,
|
|
151
|
+
"description": "One example invocation for docs, help, and packaged-factory inspection.",
|
|
152
|
+
"properties": {
|
|
153
|
+
"argv": {
|
|
154
|
+
"description": "CLI-style argument vector rendered after factory selection.",
|
|
155
|
+
"items": {
|
|
156
|
+
"type": "string"
|
|
157
|
+
},
|
|
158
|
+
"type": "array"
|
|
159
|
+
},
|
|
160
|
+
"description": {
|
|
161
|
+
"description": "Customer-facing explanation of what the example does.",
|
|
162
|
+
"type": "string"
|
|
163
|
+
},
|
|
164
|
+
"name": {
|
|
165
|
+
"description": "Stable example name.",
|
|
166
|
+
"type": "string"
|
|
167
|
+
},
|
|
168
|
+
"stdin": {
|
|
169
|
+
"description": "Example stdin payload when the signature routes stdin into one parameter.",
|
|
170
|
+
"type": "string"
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"required": [
|
|
174
|
+
"name"
|
|
175
|
+
],
|
|
176
|
+
"type": "object"
|
|
177
|
+
},
|
|
178
|
+
"FactoryInvocationOutputContract": {
|
|
179
|
+
"additionalProperties": false,
|
|
180
|
+
"description": "Customer-facing output hint for a factory invocation signature.",
|
|
181
|
+
"properties": {
|
|
182
|
+
"contentType": {
|
|
183
|
+
"description": "Output media type hint for docs, API consumers, and dashboard affordances.",
|
|
184
|
+
"type": "string"
|
|
185
|
+
},
|
|
186
|
+
"description": {
|
|
187
|
+
"description": "Human-readable summary of the primary output contract.",
|
|
188
|
+
"type": "string"
|
|
189
|
+
},
|
|
190
|
+
"fileExtension": {
|
|
191
|
+
"description": "Suggested file extension when the output mode writes a file.",
|
|
192
|
+
"type": "string"
|
|
193
|
+
},
|
|
194
|
+
"mode": {
|
|
195
|
+
"allOf": [
|
|
196
|
+
{
|
|
197
|
+
"$ref": "#/$defs/FactoryInvocationOutputContractMode"
|
|
198
|
+
}
|
|
199
|
+
],
|
|
200
|
+
"description": "High-level output contract mode exposed to callers."
|
|
201
|
+
},
|
|
202
|
+
"pathParameter": {
|
|
203
|
+
"description": "Parameter name that controls the destination path when the factory writes output to disk.",
|
|
204
|
+
"type": "string"
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
"type": "object"
|
|
208
|
+
},
|
|
209
|
+
"FactoryInvocationOutputContractMode": {
|
|
210
|
+
"description": "High-level output shape hint exposed by a factory invocation signature.",
|
|
211
|
+
"enum": [
|
|
212
|
+
"INLINE",
|
|
213
|
+
"FILE",
|
|
214
|
+
"JSON"
|
|
215
|
+
],
|
|
216
|
+
"type": "string"
|
|
217
|
+
},
|
|
218
|
+
"FactoryInvocationParameter": {
|
|
219
|
+
"additionalProperties": false,
|
|
220
|
+
"description": "One canonical invocation parameter declared on a factory.",
|
|
221
|
+
"properties": {
|
|
222
|
+
"aliases": {
|
|
223
|
+
"description": "Additional accepted named-argument keys that normalize to this parameter.",
|
|
224
|
+
"items": {
|
|
225
|
+
"type": "string"
|
|
226
|
+
},
|
|
227
|
+
"type": "array"
|
|
228
|
+
},
|
|
229
|
+
"bindings": {
|
|
230
|
+
"description": "Accepted invocation bindings for this parameter across positional, named, and stdin sources.",
|
|
231
|
+
"items": {
|
|
232
|
+
"$ref": "#/$defs/FactoryInvocationParameterBinding"
|
|
233
|
+
},
|
|
234
|
+
"type": "array"
|
|
235
|
+
},
|
|
236
|
+
"choices": {
|
|
237
|
+
"description": "Optional allowed string values for this parameter.",
|
|
238
|
+
"items": {
|
|
239
|
+
"type": "string"
|
|
240
|
+
},
|
|
241
|
+
"type": "array"
|
|
242
|
+
},
|
|
243
|
+
"defaultValue": {
|
|
244
|
+
"description": "Default string value used when an omitted parameter resolves to one effective value.",
|
|
245
|
+
"type": "string"
|
|
246
|
+
},
|
|
247
|
+
"defaultValues": {
|
|
248
|
+
"description": "Default string values used when an omitted parameter resolves to multiple effective values.",
|
|
249
|
+
"items": {
|
|
250
|
+
"type": "string"
|
|
251
|
+
},
|
|
252
|
+
"type": "array"
|
|
253
|
+
},
|
|
254
|
+
"description": {
|
|
255
|
+
"description": "Customer-facing description rendered in help, docs, and form controls.",
|
|
256
|
+
"type": "string"
|
|
257
|
+
},
|
|
258
|
+
"externalName": {
|
|
259
|
+
"description": "Preferred named-argument key shown to callers, such as `output`.",
|
|
260
|
+
"type": "string"
|
|
261
|
+
},
|
|
262
|
+
"name": {
|
|
263
|
+
"description": "Internal canonical parameter name used for normalized argument maps and interpolation.",
|
|
264
|
+
"type": "string"
|
|
265
|
+
},
|
|
266
|
+
"required": {
|
|
267
|
+
"description": "When true, invocation normalization must reject requests that omit this parameter.",
|
|
268
|
+
"type": "boolean"
|
|
269
|
+
},
|
|
270
|
+
"sensitive": {
|
|
271
|
+
"description": "When true, diagnostics must preserve names and source metadata but redact concrete values.",
|
|
272
|
+
"type": "boolean"
|
|
273
|
+
},
|
|
274
|
+
"typeHint": {
|
|
275
|
+
"allOf": [
|
|
276
|
+
{
|
|
277
|
+
"$ref": "#/$defs/FactoryInvocationParameterTypeHint"
|
|
278
|
+
}
|
|
279
|
+
],
|
|
280
|
+
"description": "String-first hint that guides parsing, docs, and dashboard form selection."
|
|
281
|
+
},
|
|
282
|
+
"valueMode": {
|
|
283
|
+
"allOf": [
|
|
284
|
+
{
|
|
285
|
+
"$ref": "#/$defs/FactoryInvocationParameterValueMode"
|
|
286
|
+
}
|
|
287
|
+
],
|
|
288
|
+
"description": "Declares whether the parameter consumes one value, repeated values, variadic values, or file contents."
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
"required": [
|
|
292
|
+
"name"
|
|
293
|
+
],
|
|
294
|
+
"type": "object"
|
|
295
|
+
},
|
|
296
|
+
"FactoryInvocationParameterBinding": {
|
|
297
|
+
"additionalProperties": false,
|
|
298
|
+
"description": "One public binding that exposes a parameter to callers.",
|
|
299
|
+
"properties": {
|
|
300
|
+
"kind": {
|
|
301
|
+
"allOf": [
|
|
302
|
+
{
|
|
303
|
+
"$ref": "#/$defs/FactoryInvocationParameterBindingKind"
|
|
304
|
+
}
|
|
305
|
+
],
|
|
306
|
+
"description": "Binding kind used to route invocation input into the parameter."
|
|
307
|
+
},
|
|
308
|
+
"position": {
|
|
309
|
+
"description": "1-based positional slot used when kind is POSITIONAL.",
|
|
310
|
+
"minimum": 1,
|
|
311
|
+
"type": "integer"
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
"required": [
|
|
315
|
+
"kind"
|
|
316
|
+
],
|
|
317
|
+
"type": "object"
|
|
318
|
+
},
|
|
319
|
+
"FactoryInvocationParameterBindingKind": {
|
|
320
|
+
"description": "Public invocation binding kinds supported by factory signatures.",
|
|
321
|
+
"enum": [
|
|
322
|
+
"POSITIONAL",
|
|
323
|
+
"NAMED",
|
|
324
|
+
"STDIN",
|
|
325
|
+
"NAMED_REST"
|
|
326
|
+
],
|
|
327
|
+
"type": "string"
|
|
328
|
+
},
|
|
329
|
+
"FactoryInvocationParameterTypeHint": {
|
|
330
|
+
"description": "String-first parsing and UI hint for one factory invocation parameter.",
|
|
331
|
+
"enum": [
|
|
332
|
+
"STRING",
|
|
333
|
+
"PATH",
|
|
334
|
+
"FILE_PATH",
|
|
335
|
+
"DIRECTORY_PATH",
|
|
336
|
+
"NUMBER_STRING",
|
|
337
|
+
"BOOLEAN_STRING"
|
|
338
|
+
],
|
|
339
|
+
"type": "string"
|
|
340
|
+
},
|
|
341
|
+
"FactoryInvocationParameterValueMode": {
|
|
342
|
+
"description": "Declares how one invocation parameter consumes one or more string values.",
|
|
343
|
+
"enum": [
|
|
344
|
+
"EXACT",
|
|
345
|
+
"REPEATED",
|
|
346
|
+
"VARIADIC",
|
|
347
|
+
"FILE_CONTENTS"
|
|
348
|
+
],
|
|
349
|
+
"type": "string"
|
|
350
|
+
},
|
|
351
|
+
"FactoryInvocationSignature": {
|
|
352
|
+
"additionalProperties": false,
|
|
353
|
+
"description": "Canonical callable argument contract for invoking one factory. When present, CLI, API, dashboard, docs, and packaged-factory surfaces should discover and normalize invocation inputs from this shared schema instead of transport- or factory-specific argument definitions.",
|
|
354
|
+
"properties": {
|
|
355
|
+
"examples": {
|
|
356
|
+
"description": "Example invocations rendered in docs, help, and inspection surfaces.",
|
|
357
|
+
"items": {
|
|
358
|
+
"$ref": "#/$defs/FactoryInvocationExample"
|
|
359
|
+
},
|
|
360
|
+
"type": "array"
|
|
361
|
+
},
|
|
362
|
+
"outputContract": {
|
|
363
|
+
"allOf": [
|
|
364
|
+
{
|
|
365
|
+
"$ref": "#/$defs/FactoryInvocationOutputContract"
|
|
366
|
+
}
|
|
367
|
+
],
|
|
368
|
+
"description": "Optional customer-facing hint for the factory's primary output shape."
|
|
369
|
+
},
|
|
370
|
+
"parameters": {
|
|
371
|
+
"description": "Declared invocation parameters keyed by canonical parameter name.",
|
|
372
|
+
"items": {
|
|
373
|
+
"$ref": "#/$defs/FactoryInvocationParameter"
|
|
374
|
+
},
|
|
375
|
+
"type": "array"
|
|
376
|
+
},
|
|
377
|
+
"unknownNamedArgumentPolicy": {
|
|
378
|
+
"allOf": [
|
|
379
|
+
{
|
|
380
|
+
"$ref": "#/$defs/FactoryInvocationUnknownNamedArgumentPolicy"
|
|
381
|
+
}
|
|
382
|
+
],
|
|
383
|
+
"description": "Policy for named inputs that do not match any declared parameter binding."
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
"type": "object"
|
|
387
|
+
},
|
|
388
|
+
"FactoryInvocationUnknownNamedArgumentPolicy": {
|
|
389
|
+
"description": "Policy for named inputs that do not match any declared parameter binding.",
|
|
390
|
+
"enum": [
|
|
391
|
+
"REJECT",
|
|
392
|
+
"ALLOW",
|
|
393
|
+
"COLLECT"
|
|
394
|
+
],
|
|
395
|
+
"type": "string"
|
|
396
|
+
},
|
|
397
|
+
"FactoryLayout": {
|
|
398
|
+
"additionalProperties": false,
|
|
399
|
+
"description": "Non-executable portable graph editor layout metadata keyed by canonical graph ids.",
|
|
400
|
+
"properties": {
|
|
401
|
+
"annotations": {
|
|
402
|
+
"description": "Optional inert positioned notes and embedded-raster images that decorate the canvas without becoming graph topology.",
|
|
403
|
+
"items": {
|
|
404
|
+
"$ref": "#/$defs/FactoryLayoutAnnotation"
|
|
405
|
+
},
|
|
406
|
+
"type": "array"
|
|
407
|
+
},
|
|
408
|
+
"edges": {
|
|
409
|
+
"description": "Optional authored graph edge geometry keyed by canonical graph edge id.",
|
|
410
|
+
"items": {
|
|
411
|
+
"$ref": "#/$defs/FactoryLayoutEdge"
|
|
412
|
+
},
|
|
413
|
+
"type": "array"
|
|
414
|
+
},
|
|
415
|
+
"groups": {
|
|
416
|
+
"description": "Optional flat background groups keyed independently from topology.",
|
|
417
|
+
"items": {
|
|
418
|
+
"$ref": "#/$defs/FactoryLayoutGroup"
|
|
419
|
+
},
|
|
420
|
+
"type": "array"
|
|
421
|
+
},
|
|
422
|
+
"nodes": {
|
|
423
|
+
"description": "Optional authored graph node geometry keyed by canonical graph node id.",
|
|
424
|
+
"items": {
|
|
425
|
+
"$ref": "#/$defs/FactoryLayoutNode"
|
|
426
|
+
},
|
|
427
|
+
"type": "array"
|
|
428
|
+
},
|
|
429
|
+
"preferences": {
|
|
430
|
+
"$ref": "#/$defs/FactoryLayoutPreferences"
|
|
431
|
+
},
|
|
432
|
+
"schemaVersion": {
|
|
433
|
+
"description": "Portable layout contract schema version. Version 1 is the initial public layout contract.",
|
|
434
|
+
"format": "int32",
|
|
435
|
+
"minimum": 1,
|
|
436
|
+
"type": "integer"
|
|
437
|
+
},
|
|
438
|
+
"viewport": {
|
|
439
|
+
"$ref": "#/$defs/FactoryLayoutViewport"
|
|
440
|
+
}
|
|
441
|
+
},
|
|
442
|
+
"required": [
|
|
443
|
+
"schemaVersion"
|
|
444
|
+
],
|
|
445
|
+
"type": "object"
|
|
446
|
+
},
|
|
447
|
+
"FactoryLayoutAnnotation": {
|
|
448
|
+
"additionalProperties": false,
|
|
449
|
+
"description": "Inert positioned canvas annotation. Its kind selects either note or image content; annotations never identify graph nodes or edges, and connection-like fields are invalid.",
|
|
450
|
+
"oneOf": [
|
|
451
|
+
{
|
|
452
|
+
"additionalProperties": false,
|
|
453
|
+
"properties": {
|
|
454
|
+
"id": {
|
|
455
|
+
"type": "string"
|
|
456
|
+
},
|
|
457
|
+
"kind": {
|
|
458
|
+
"enum": [
|
|
459
|
+
"NOTE"
|
|
460
|
+
],
|
|
461
|
+
"type": "string"
|
|
462
|
+
},
|
|
463
|
+
"note": {
|
|
464
|
+
"$ref": "#/$defs/FactoryLayoutNote"
|
|
465
|
+
},
|
|
466
|
+
"position": {
|
|
467
|
+
"$ref": "#/$defs/FactoryLayoutAnnotationPosition"
|
|
468
|
+
},
|
|
469
|
+
"size": {
|
|
470
|
+
"$ref": "#/$defs/FactoryLayoutAnnotationSize"
|
|
471
|
+
}
|
|
472
|
+
},
|
|
473
|
+
"required": [
|
|
474
|
+
"id",
|
|
475
|
+
"kind",
|
|
476
|
+
"position",
|
|
477
|
+
"note"
|
|
478
|
+
],
|
|
479
|
+
"type": "object"
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
"additionalProperties": false,
|
|
483
|
+
"properties": {
|
|
484
|
+
"id": {
|
|
485
|
+
"type": "string"
|
|
486
|
+
},
|
|
487
|
+
"image": {
|
|
488
|
+
"$ref": "#/$defs/FactoryLayoutImage"
|
|
489
|
+
},
|
|
490
|
+
"kind": {
|
|
491
|
+
"enum": [
|
|
492
|
+
"IMAGE"
|
|
493
|
+
],
|
|
494
|
+
"type": "string"
|
|
495
|
+
},
|
|
496
|
+
"position": {
|
|
497
|
+
"$ref": "#/$defs/FactoryLayoutAnnotationPosition"
|
|
498
|
+
},
|
|
499
|
+
"size": {
|
|
500
|
+
"$ref": "#/$defs/FactoryLayoutAnnotationSize"
|
|
501
|
+
}
|
|
502
|
+
},
|
|
503
|
+
"required": [
|
|
504
|
+
"id",
|
|
505
|
+
"kind",
|
|
506
|
+
"position",
|
|
507
|
+
"size",
|
|
508
|
+
"image"
|
|
509
|
+
],
|
|
510
|
+
"type": "object"
|
|
511
|
+
}
|
|
512
|
+
],
|
|
513
|
+
"properties": {
|
|
514
|
+
"id": {
|
|
515
|
+
"description": "Stable annotation identifier unique within this layout.",
|
|
516
|
+
"minLength": 1,
|
|
517
|
+
"pattern": "\\S",
|
|
518
|
+
"type": "string"
|
|
519
|
+
},
|
|
520
|
+
"image": {
|
|
521
|
+
"$ref": "#/$defs/FactoryLayoutImage"
|
|
522
|
+
},
|
|
523
|
+
"kind": {
|
|
524
|
+
"$ref": "#/$defs/FactoryLayoutAnnotationKind"
|
|
525
|
+
},
|
|
526
|
+
"note": {
|
|
527
|
+
"$ref": "#/$defs/FactoryLayoutNote"
|
|
528
|
+
},
|
|
529
|
+
"position": {
|
|
530
|
+
"$ref": "#/$defs/FactoryLayoutAnnotationPosition"
|
|
531
|
+
},
|
|
532
|
+
"size": {
|
|
533
|
+
"$ref": "#/$defs/FactoryLayoutAnnotationSize"
|
|
534
|
+
}
|
|
535
|
+
},
|
|
536
|
+
"required": [
|
|
537
|
+
"id",
|
|
538
|
+
"kind",
|
|
539
|
+
"position"
|
|
540
|
+
],
|
|
541
|
+
"type": "object"
|
|
542
|
+
},
|
|
543
|
+
"FactoryLayoutAnnotationKind": {
|
|
544
|
+
"description": "The inert annotation content variant.",
|
|
545
|
+
"enum": [
|
|
546
|
+
"NOTE",
|
|
547
|
+
"IMAGE"
|
|
548
|
+
],
|
|
549
|
+
"type": "string"
|
|
550
|
+
},
|
|
551
|
+
"FactoryLayoutAnnotationPosition": {
|
|
552
|
+
"additionalProperties": false,
|
|
553
|
+
"description": "Explicit finite annotation position in canvas units. Each coordinate is bounded to keep portable layout metadata safe to render.",
|
|
554
|
+
"properties": {
|
|
555
|
+
"x": {
|
|
556
|
+
"description": "Horizontal canvas coordinate between -100,000 and 100,000 inclusive.",
|
|
557
|
+
"maximum": 100000,
|
|
558
|
+
"minimum": -100000,
|
|
559
|
+
"type": "number"
|
|
560
|
+
},
|
|
561
|
+
"y": {
|
|
562
|
+
"description": "Vertical canvas coordinate between -100,000 and 100,000 inclusive.",
|
|
563
|
+
"maximum": 100000,
|
|
564
|
+
"minimum": -100000,
|
|
565
|
+
"type": "number"
|
|
566
|
+
}
|
|
567
|
+
},
|
|
568
|
+
"required": [
|
|
569
|
+
"x",
|
|
570
|
+
"y"
|
|
571
|
+
],
|
|
572
|
+
"type": "object"
|
|
573
|
+
},
|
|
574
|
+
"FactoryLayoutAnnotationSize": {
|
|
575
|
+
"additionalProperties": false,
|
|
576
|
+
"description": "Optional finite annotation dimensions in canvas units. Image annotations require this size; note annotations may omit it.",
|
|
577
|
+
"properties": {
|
|
578
|
+
"height": {
|
|
579
|
+
"description": "Positive authored height no greater than 10,000 canvas units.",
|
|
580
|
+
"exclusiveMinimum": 0,
|
|
581
|
+
"maximum": 10000,
|
|
582
|
+
"type": "number"
|
|
583
|
+
},
|
|
584
|
+
"width": {
|
|
585
|
+
"description": "Positive authored width no greater than 10,000 canvas units.",
|
|
586
|
+
"exclusiveMinimum": 0,
|
|
587
|
+
"maximum": 10000,
|
|
588
|
+
"type": "number"
|
|
589
|
+
}
|
|
590
|
+
},
|
|
591
|
+
"required": [
|
|
592
|
+
"width",
|
|
593
|
+
"height"
|
|
594
|
+
],
|
|
595
|
+
"type": "object"
|
|
596
|
+
},
|
|
597
|
+
"FactoryLayoutBounds": {
|
|
598
|
+
"additionalProperties": false,
|
|
599
|
+
"description": "Authored rectangular bounds in graph canvas units.",
|
|
600
|
+
"properties": {
|
|
601
|
+
"height": {
|
|
602
|
+
"description": "Authored group height.",
|
|
603
|
+
"type": "number"
|
|
604
|
+
},
|
|
605
|
+
"width": {
|
|
606
|
+
"description": "Authored group width.",
|
|
607
|
+
"type": "number"
|
|
608
|
+
},
|
|
609
|
+
"x": {
|
|
610
|
+
"description": "Left graph layout coordinate.",
|
|
611
|
+
"type": "number"
|
|
612
|
+
},
|
|
613
|
+
"y": {
|
|
614
|
+
"description": "Top graph layout coordinate.",
|
|
615
|
+
"type": "number"
|
|
616
|
+
}
|
|
617
|
+
},
|
|
618
|
+
"required": [
|
|
619
|
+
"x",
|
|
620
|
+
"y",
|
|
621
|
+
"width",
|
|
622
|
+
"height"
|
|
623
|
+
],
|
|
624
|
+
"type": "object"
|
|
625
|
+
},
|
|
626
|
+
"FactoryLayoutEdge": {
|
|
627
|
+
"additionalProperties": false,
|
|
628
|
+
"description": "Portable graph edge layout keyed by canonical graph edge id.",
|
|
629
|
+
"properties": {
|
|
630
|
+
"id": {
|
|
631
|
+
"description": "Canonical graph edge id such as workstation-output:workstation:review-\u003ework-state:task:done.",
|
|
632
|
+
"type": "string"
|
|
633
|
+
},
|
|
634
|
+
"labelPosition": {
|
|
635
|
+
"$ref": "#/$defs/FactoryLayoutPoint"
|
|
636
|
+
},
|
|
637
|
+
"waypoints": {
|
|
638
|
+
"description": "Optional authored intermediate edge points in graph canvas space.",
|
|
639
|
+
"items": {
|
|
640
|
+
"$ref": "#/$defs/FactoryLayoutPoint"
|
|
641
|
+
},
|
|
642
|
+
"type": "array"
|
|
643
|
+
}
|
|
644
|
+
},
|
|
645
|
+
"required": [
|
|
646
|
+
"id"
|
|
647
|
+
],
|
|
648
|
+
"type": "object"
|
|
649
|
+
},
|
|
650
|
+
"FactoryLayoutEmptyState": {
|
|
651
|
+
"additionalProperties": false,
|
|
652
|
+
"description": "Inert presentation content for one canonical topology node when it has no live activity. It is definition metadata only and does not create events or runtime behavior.",
|
|
653
|
+
"oneOf": [
|
|
654
|
+
{
|
|
655
|
+
"additionalProperties": false,
|
|
656
|
+
"properties": {
|
|
657
|
+
"text": {
|
|
658
|
+
"description": "Literal empty-state text. It is not rendered as HTML or Markdown.",
|
|
659
|
+
"maxLength": 500,
|
|
660
|
+
"minLength": 1,
|
|
661
|
+
"pattern": "\\S",
|
|
662
|
+
"type": "string"
|
|
663
|
+
}
|
|
664
|
+
},
|
|
665
|
+
"required": [
|
|
666
|
+
"text"
|
|
667
|
+
],
|
|
668
|
+
"type": "object"
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
"additionalProperties": false,
|
|
672
|
+
"properties": {
|
|
673
|
+
"image": {
|
|
674
|
+
"$ref": "#/$defs/FactoryLayoutImage"
|
|
675
|
+
}
|
|
676
|
+
},
|
|
677
|
+
"required": [
|
|
678
|
+
"image"
|
|
679
|
+
],
|
|
680
|
+
"type": "object"
|
|
681
|
+
}
|
|
682
|
+
],
|
|
683
|
+
"properties": {
|
|
684
|
+
"image": {
|
|
685
|
+
"$ref": "#/$defs/FactoryLayoutImage"
|
|
686
|
+
},
|
|
687
|
+
"text": {
|
|
688
|
+
"description": "Literal empty-state text. It is not rendered as HTML or Markdown.",
|
|
689
|
+
"maxLength": 500,
|
|
690
|
+
"minLength": 1,
|
|
691
|
+
"pattern": "\\S",
|
|
692
|
+
"type": "string"
|
|
693
|
+
}
|
|
694
|
+
},
|
|
695
|
+
"type": "object"
|
|
696
|
+
},
|
|
697
|
+
"FactoryLayoutGroup": {
|
|
698
|
+
"additionalProperties": false,
|
|
699
|
+
"description": "Portable background grouping metadata for graph canvas presentation.",
|
|
700
|
+
"properties": {
|
|
701
|
+
"bounds": {
|
|
702
|
+
"$ref": "#/$defs/FactoryLayoutBounds"
|
|
703
|
+
},
|
|
704
|
+
"color": {
|
|
705
|
+
"description": "Optional authored group accent or fill color.",
|
|
706
|
+
"type": "string"
|
|
707
|
+
},
|
|
708
|
+
"id": {
|
|
709
|
+
"description": "Stable authored group id for future layout editing.",
|
|
710
|
+
"type": "string"
|
|
711
|
+
},
|
|
712
|
+
"label": {
|
|
713
|
+
"description": "Optional visible group label.",
|
|
714
|
+
"type": "string"
|
|
715
|
+
},
|
|
716
|
+
"locked": {
|
|
717
|
+
"description": "Optional authored group lock flag for future editor affordances.",
|
|
718
|
+
"type": "boolean"
|
|
719
|
+
},
|
|
720
|
+
"nodeIds": {
|
|
721
|
+
"description": "Canonical graph node ids visually contained by this group.",
|
|
722
|
+
"items": {
|
|
723
|
+
"type": "string"
|
|
724
|
+
},
|
|
725
|
+
"type": "array"
|
|
726
|
+
},
|
|
727
|
+
"parentGroupId": {
|
|
728
|
+
"description": "Reserved for future nested groups. Omit or set null for flat groups.",
|
|
729
|
+
"type": [
|
|
730
|
+
"string",
|
|
731
|
+
"null"
|
|
732
|
+
]
|
|
733
|
+
}
|
|
734
|
+
},
|
|
735
|
+
"required": [
|
|
736
|
+
"id",
|
|
737
|
+
"bounds",
|
|
738
|
+
"nodeIds"
|
|
739
|
+
],
|
|
740
|
+
"type": "object"
|
|
741
|
+
},
|
|
742
|
+
"FactoryLayoutImage": {
|
|
743
|
+
"additionalProperties": false,
|
|
744
|
+
"description": "Inert embedded-raster image content with required alternative text.",
|
|
745
|
+
"properties": {
|
|
746
|
+
"alternativeText": {
|
|
747
|
+
"description": "Literal alternative text for the embedded image.",
|
|
748
|
+
"maxLength": 500,
|
|
749
|
+
"minLength": 1,
|
|
750
|
+
"pattern": "\\S",
|
|
751
|
+
"type": "string"
|
|
752
|
+
},
|
|
753
|
+
"source": {
|
|
754
|
+
"$ref": "#/$defs/FactoryLayoutImageSource"
|
|
755
|
+
}
|
|
756
|
+
},
|
|
757
|
+
"required": [
|
|
758
|
+
"source",
|
|
759
|
+
"alternativeText"
|
|
760
|
+
],
|
|
761
|
+
"type": "object"
|
|
762
|
+
},
|
|
763
|
+
"FactoryLayoutImageSource": {
|
|
764
|
+
"additionalProperties": false,
|
|
765
|
+
"description": "Extensible discriminated image-source shape. Version 1 supports only embedded raster data.",
|
|
766
|
+
"properties": {
|
|
767
|
+
"data": {
|
|
768
|
+
"description": "Strict padded base64 payload for the embedded raster source, limited to 2 MiB after decoding.",
|
|
769
|
+
"format": "byte",
|
|
770
|
+
"maxLength": 2796204,
|
|
771
|
+
"minLength": 4,
|
|
772
|
+
"type": "string"
|
|
773
|
+
},
|
|
774
|
+
"kind": {
|
|
775
|
+
"description": "Source variant discriminator. EMBEDDED carries portable base64 raster data.",
|
|
776
|
+
"enum": [
|
|
777
|
+
"EMBEDDED"
|
|
778
|
+
],
|
|
779
|
+
"type": "string"
|
|
780
|
+
},
|
|
781
|
+
"mediaType": {
|
|
782
|
+
"description": "Declared media type for the embedded raster.",
|
|
783
|
+
"enum": [
|
|
784
|
+
"image/png",
|
|
785
|
+
"image/jpeg",
|
|
786
|
+
"image/webp"
|
|
787
|
+
],
|
|
788
|
+
"type": "string"
|
|
789
|
+
}
|
|
790
|
+
},
|
|
791
|
+
"required": [
|
|
792
|
+
"kind",
|
|
793
|
+
"mediaType",
|
|
794
|
+
"data"
|
|
795
|
+
],
|
|
796
|
+
"type": "object"
|
|
797
|
+
},
|
|
798
|
+
"FactoryLayoutNode": {
|
|
799
|
+
"additionalProperties": false,
|
|
800
|
+
"description": "Portable graph node layout keyed by canonical graph node id.",
|
|
801
|
+
"properties": {
|
|
802
|
+
"emptyState": {
|
|
803
|
+
"$ref": "#/$defs/FactoryLayoutEmptyState"
|
|
804
|
+
},
|
|
805
|
+
"id": {
|
|
806
|
+
"description": "Canonical graph node id such as workstation:\u003cworkstationId\u003e.",
|
|
807
|
+
"minLength": 1,
|
|
808
|
+
"pattern": "\\S",
|
|
809
|
+
"type": "string"
|
|
810
|
+
},
|
|
811
|
+
"locked": {
|
|
812
|
+
"description": "Optional authored node lock flag for future editor affordances.",
|
|
813
|
+
"type": "boolean"
|
|
814
|
+
},
|
|
815
|
+
"position": {
|
|
816
|
+
"$ref": "#/$defs/FactoryLayoutPoint"
|
|
817
|
+
},
|
|
818
|
+
"size": {
|
|
819
|
+
"$ref": "#/$defs/FactoryLayoutSize"
|
|
820
|
+
}
|
|
821
|
+
},
|
|
822
|
+
"required": [
|
|
823
|
+
"id",
|
|
824
|
+
"position"
|
|
825
|
+
],
|
|
826
|
+
"type": "object"
|
|
827
|
+
},
|
|
828
|
+
"FactoryLayoutNote": {
|
|
829
|
+
"additionalProperties": false,
|
|
830
|
+
"description": "Literal plain-text note content. Line breaks are preserved as authored text and are not interpreted as Markdown or HTML.",
|
|
831
|
+
"properties": {
|
|
832
|
+
"body": {
|
|
833
|
+
"description": "Required literal plain-text note body.",
|
|
834
|
+
"maxLength": 4000,
|
|
835
|
+
"minLength": 1,
|
|
836
|
+
"pattern": "\\S",
|
|
837
|
+
"type": "string"
|
|
838
|
+
},
|
|
839
|
+
"title": {
|
|
840
|
+
"description": "Optional literal plain-text note title.",
|
|
841
|
+
"maxLength": 160,
|
|
842
|
+
"type": "string"
|
|
843
|
+
},
|
|
844
|
+
"tone": {
|
|
845
|
+
"$ref": "#/$defs/FactoryLayoutNoteTone"
|
|
846
|
+
}
|
|
847
|
+
},
|
|
848
|
+
"required": [
|
|
849
|
+
"body",
|
|
850
|
+
"tone"
|
|
851
|
+
],
|
|
852
|
+
"type": "object"
|
|
853
|
+
},
|
|
854
|
+
"FactoryLayoutNoteTone": {
|
|
855
|
+
"description": "Presentation-only tone for a note annotation.",
|
|
856
|
+
"enum": [
|
|
857
|
+
"NEUTRAL",
|
|
858
|
+
"ACCENT",
|
|
859
|
+
"INFO",
|
|
860
|
+
"SUCCESS",
|
|
861
|
+
"WARNING",
|
|
862
|
+
"DANGER"
|
|
863
|
+
],
|
|
864
|
+
"type": "string"
|
|
865
|
+
},
|
|
866
|
+
"FactoryLayoutPoint": {
|
|
867
|
+
"additionalProperties": false,
|
|
868
|
+
"description": "Two-dimensional authored graph layout coordinate.",
|
|
869
|
+
"properties": {
|
|
870
|
+
"x": {
|
|
871
|
+
"description": "Horizontal graph layout coordinate in authored canvas space.",
|
|
872
|
+
"type": "number"
|
|
873
|
+
},
|
|
874
|
+
"y": {
|
|
875
|
+
"description": "Vertical graph layout coordinate in authored canvas space.",
|
|
876
|
+
"type": "number"
|
|
877
|
+
}
|
|
878
|
+
},
|
|
879
|
+
"required": [
|
|
880
|
+
"x",
|
|
881
|
+
"y"
|
|
882
|
+
],
|
|
883
|
+
"type": "object"
|
|
884
|
+
},
|
|
885
|
+
"FactoryLayoutPreferences": {
|
|
886
|
+
"additionalProperties": false,
|
|
887
|
+
"description": "Portable graph display defaults that do not alter factory topology.",
|
|
888
|
+
"properties": {
|
|
889
|
+
"direction": {
|
|
890
|
+
"description": "Preferred authored graph direction for portable layout rendering.",
|
|
891
|
+
"enum": [
|
|
892
|
+
"UP",
|
|
893
|
+
"DOWN",
|
|
894
|
+
"LEFT",
|
|
895
|
+
"RIGHT"
|
|
896
|
+
],
|
|
897
|
+
"type": "string"
|
|
898
|
+
}
|
|
899
|
+
},
|
|
900
|
+
"type": "object"
|
|
901
|
+
},
|
|
902
|
+
"FactoryLayoutSize": {
|
|
903
|
+
"additionalProperties": false,
|
|
904
|
+
"description": "Authored node size in graph canvas units.",
|
|
905
|
+
"properties": {
|
|
906
|
+
"height": {
|
|
907
|
+
"description": "Authored node height.",
|
|
908
|
+
"type": "number"
|
|
909
|
+
},
|
|
910
|
+
"width": {
|
|
911
|
+
"description": "Authored node width.",
|
|
912
|
+
"type": "number"
|
|
913
|
+
}
|
|
914
|
+
},
|
|
915
|
+
"required": [
|
|
916
|
+
"width",
|
|
917
|
+
"height"
|
|
918
|
+
],
|
|
919
|
+
"type": "object"
|
|
920
|
+
},
|
|
921
|
+
"FactoryLayoutViewport": {
|
|
922
|
+
"additionalProperties": false,
|
|
923
|
+
"description": "Shared authored graph camera position.",
|
|
924
|
+
"properties": {
|
|
925
|
+
"x": {
|
|
926
|
+
"description": "Authored viewport horizontal offset.",
|
|
927
|
+
"type": "number"
|
|
928
|
+
},
|
|
929
|
+
"y": {
|
|
930
|
+
"description": "Authored viewport vertical offset.",
|
|
931
|
+
"type": "number"
|
|
932
|
+
},
|
|
933
|
+
"zoom": {
|
|
934
|
+
"description": "Authored viewport zoom factor.",
|
|
935
|
+
"type": "number"
|
|
936
|
+
}
|
|
937
|
+
},
|
|
938
|
+
"required": [
|
|
939
|
+
"x",
|
|
940
|
+
"y",
|
|
941
|
+
"zoom"
|
|
942
|
+
],
|
|
943
|
+
"type": "object"
|
|
944
|
+
},
|
|
945
|
+
"FactoryName": {
|
|
946
|
+
"description": "Customer-facing identifier for one stored named factory. `GET /factory-sessions/~default/factory` may also return the reserved `UNDEFINED` identifier when the active runtime is still the default root factory and no durable current-factory pointer exists. Semantic validation failures return `INVALID_FACTORY_NAME`, including attempts to activate a named factory with the reserved identifier.",
|
|
947
|
+
"minLength": 1,
|
|
948
|
+
"pattern": "^(UNDEFINED|[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)$",
|
|
949
|
+
"type": "string"
|
|
950
|
+
},
|
|
951
|
+
"FactoryOrchestrator": {
|
|
952
|
+
"additionalProperties": false,
|
|
953
|
+
"description": "Authored orchestrator identity for one factory. When omitted, existing Petri factories load through compatibility defaulting to orchestrator.kind = PETRI.",
|
|
954
|
+
"properties": {
|
|
955
|
+
"javascript": {
|
|
956
|
+
"allOf": [
|
|
957
|
+
{
|
|
958
|
+
"$ref": "#/$defs/FactoryOrchestratorJavaScriptConfig"
|
|
959
|
+
}
|
|
960
|
+
],
|
|
961
|
+
"description": "JavaScript-specific orchestrator configuration. Required when kind = JAVASCRIPT."
|
|
962
|
+
},
|
|
963
|
+
"kind": {
|
|
964
|
+
"$ref": "#/$defs/FactoryOrchestratorKind"
|
|
965
|
+
},
|
|
966
|
+
"petri": {
|
|
967
|
+
"allOf": [
|
|
968
|
+
{
|
|
969
|
+
"$ref": "#/$defs/FactoryOrchestratorPetriConfig"
|
|
970
|
+
}
|
|
971
|
+
],
|
|
972
|
+
"description": "Petri-specific orchestrator configuration. Required only when kind = PETRI and additional Petri options are authored."
|
|
973
|
+
}
|
|
974
|
+
},
|
|
975
|
+
"required": [
|
|
976
|
+
"kind"
|
|
977
|
+
],
|
|
978
|
+
"type": "object"
|
|
979
|
+
},
|
|
980
|
+
"FactoryOrchestratorJavaScriptAgent": {
|
|
981
|
+
"additionalProperties": false,
|
|
982
|
+
"description": "Default worker selection for one named JavaScript child-agent role.",
|
|
983
|
+
"properties": {
|
|
984
|
+
"preset": {
|
|
985
|
+
"description": "Operator worker preset inherited by child calls using this agent id.",
|
|
986
|
+
"minLength": 1,
|
|
987
|
+
"type": "string"
|
|
988
|
+
}
|
|
989
|
+
},
|
|
990
|
+
"required": [
|
|
991
|
+
"preset"
|
|
992
|
+
],
|
|
993
|
+
"type": "object"
|
|
994
|
+
},
|
|
995
|
+
"FactoryOrchestratorJavaScriptConfig": {
|
|
996
|
+
"additionalProperties": false,
|
|
997
|
+
"description": "JavaScript-specific orchestrator configuration. JavaScript factories do not require Petri graph fields and instead declare workflow source identity, metadata, args schema, and default policy here.",
|
|
998
|
+
"properties": {
|
|
999
|
+
"agents": {
|
|
1000
|
+
"additionalProperties": {
|
|
1001
|
+
"$ref": "#/$defs/FactoryOrchestratorJavaScriptAgent"
|
|
1002
|
+
},
|
|
1003
|
+
"description": "Named child-agent roles and their operator worker preset defaults.",
|
|
1004
|
+
"type": "object"
|
|
1005
|
+
},
|
|
1006
|
+
"argsSchema": {
|
|
1007
|
+
"additionalProperties": true,
|
|
1008
|
+
"description": "JSON Schema object describing workflow invocation arguments.",
|
|
1009
|
+
"type": "object"
|
|
1010
|
+
},
|
|
1011
|
+
"defaultPolicy": {
|
|
1012
|
+
"additionalProperties": true,
|
|
1013
|
+
"description": "Default JavaScript workflow policy object applied when no runtime override exists.",
|
|
1014
|
+
"type": "object"
|
|
1015
|
+
},
|
|
1016
|
+
"dialect": {
|
|
1017
|
+
"description": "Optional JavaScript dialect label for the authored workflow source.",
|
|
1018
|
+
"type": "string"
|
|
1019
|
+
},
|
|
1020
|
+
"entrypoint": {
|
|
1021
|
+
"description": "Optional exported entrypoint or phase name used to start the workflow.",
|
|
1022
|
+
"type": "string"
|
|
1023
|
+
},
|
|
1024
|
+
"inlineSource": {
|
|
1025
|
+
"allOf": [
|
|
1026
|
+
{
|
|
1027
|
+
"$ref": "#/$defs/FactoryOrchestratorJavaScriptInlineSource"
|
|
1028
|
+
}
|
|
1029
|
+
],
|
|
1030
|
+
"description": "Inline workflow source when the factory carries source text directly."
|
|
1031
|
+
},
|
|
1032
|
+
"metadata": {
|
|
1033
|
+
"allOf": [
|
|
1034
|
+
{
|
|
1035
|
+
"$ref": "#/$defs/StringMap"
|
|
1036
|
+
}
|
|
1037
|
+
],
|
|
1038
|
+
"description": "Free-form JavaScript orchestrator metadata for authoring and diagnostics."
|
|
1039
|
+
},
|
|
1040
|
+
"sourceHash": {
|
|
1041
|
+
"description": "Optional content hash for the resolved workflow source.",
|
|
1042
|
+
"type": "string"
|
|
1043
|
+
},
|
|
1044
|
+
"sourceRef": {
|
|
1045
|
+
"description": "Factory-relative or authored reference to the workflow source file.",
|
|
1046
|
+
"type": "string"
|
|
1047
|
+
}
|
|
1048
|
+
},
|
|
1049
|
+
"type": "object"
|
|
1050
|
+
},
|
|
1051
|
+
"FactoryOrchestratorJavaScriptInlineSource": {
|
|
1052
|
+
"additionalProperties": false,
|
|
1053
|
+
"description": "Inline JavaScript workflow source carried directly in the factory definition.",
|
|
1054
|
+
"properties": {
|
|
1055
|
+
"encoding": {
|
|
1056
|
+
"description": "Declared content encoding for the inline workflow source.",
|
|
1057
|
+
"enum": [
|
|
1058
|
+
"utf-8"
|
|
1059
|
+
],
|
|
1060
|
+
"type": "string"
|
|
1061
|
+
},
|
|
1062
|
+
"inline": {
|
|
1063
|
+
"description": "Inline JavaScript workflow source text.",
|
|
1064
|
+
"type": "string"
|
|
1065
|
+
}
|
|
1066
|
+
},
|
|
1067
|
+
"required": [
|
|
1068
|
+
"encoding",
|
|
1069
|
+
"inline"
|
|
1070
|
+
],
|
|
1071
|
+
"type": "object"
|
|
1072
|
+
},
|
|
1073
|
+
"FactoryOrchestratorKind": {
|
|
1074
|
+
"description": "Authored orchestration engine for one factory. PETRI factories use the existing Petri graph semantics. JAVASCRIPT factories use workflow source identity and policy instead of Petri graph fields.",
|
|
1075
|
+
"enum": [
|
|
1076
|
+
"PETRI",
|
|
1077
|
+
"JAVASCRIPT"
|
|
1078
|
+
],
|
|
1079
|
+
"type": "string"
|
|
1080
|
+
},
|
|
1081
|
+
"FactoryOrchestratorPetriConfig": {
|
|
1082
|
+
"additionalProperties": false,
|
|
1083
|
+
"description": "Petri-specific orchestrator configuration. Existing Petri factories may omit this block and rely on compatibility defaulting to orchestrator.kind = PETRI.",
|
|
1084
|
+
"type": "object"
|
|
1085
|
+
},
|
|
1086
|
+
"GuardMatchConfig": {
|
|
1087
|
+
"additionalProperties": false,
|
|
1088
|
+
"properties": {
|
|
1089
|
+
"inputKey": {
|
|
1090
|
+
"description": "Field selector resolved against each candidate input, such as `.Name` or `.Tags[\"_last_output\"]`.",
|
|
1091
|
+
"minLength": 1,
|
|
1092
|
+
"type": "string"
|
|
1093
|
+
}
|
|
1094
|
+
},
|
|
1095
|
+
"required": [
|
|
1096
|
+
"inputKey"
|
|
1097
|
+
],
|
|
1098
|
+
"type": "object"
|
|
1099
|
+
},
|
|
1100
|
+
"HostedLinearWorkerClaim": {
|
|
1101
|
+
"additionalProperties": false,
|
|
1102
|
+
"description": "Optional claim-related configuration that v1 hosted Linear workers explicitly allow.",
|
|
1103
|
+
"properties": {
|
|
1104
|
+
"assigneeField": {
|
|
1105
|
+
"description": "Linear issue field name to use when deriving optional assignee claim metadata.",
|
|
1106
|
+
"type": "string"
|
|
1107
|
+
}
|
|
1108
|
+
},
|
|
1109
|
+
"type": "object"
|
|
1110
|
+
},
|
|
1111
|
+
"HostedLinearWorkerConfig": {
|
|
1112
|
+
"additionalProperties": false,
|
|
1113
|
+
"description": "Provider-specific poller configuration for the built-in hosted Linear worker.",
|
|
1114
|
+
"properties": {
|
|
1115
|
+
"claim": {
|
|
1116
|
+
"allOf": [
|
|
1117
|
+
{
|
|
1118
|
+
"$ref": "#/$defs/HostedLinearWorkerClaim"
|
|
1119
|
+
}
|
|
1120
|
+
],
|
|
1121
|
+
"description": "Optional claim-related configuration that v1 hosted Linear polling allows."
|
|
1122
|
+
},
|
|
1123
|
+
"mapping": {
|
|
1124
|
+
"allOf": [
|
|
1125
|
+
{
|
|
1126
|
+
"$ref": "#/$defs/HostedLinearWorkerMapping"
|
|
1127
|
+
}
|
|
1128
|
+
],
|
|
1129
|
+
"description": "Deterministic mapping fields for canonical work submission generation."
|
|
1130
|
+
},
|
|
1131
|
+
"pollInterval": {
|
|
1132
|
+
"description": "Optional Go duration that controls how often the hosted Linear worker polls for updates.",
|
|
1133
|
+
"type": "string"
|
|
1134
|
+
},
|
|
1135
|
+
"stateIds": {
|
|
1136
|
+
"description": "Optional Linear issue-state identifiers that bound the poll source.",
|
|
1137
|
+
"items": {
|
|
1138
|
+
"type": "string"
|
|
1139
|
+
},
|
|
1140
|
+
"type": "array"
|
|
1141
|
+
},
|
|
1142
|
+
"teamIds": {
|
|
1143
|
+
"description": "Optional Linear team identifiers that bound the poll source.",
|
|
1144
|
+
"items": {
|
|
1145
|
+
"type": "string"
|
|
1146
|
+
},
|
|
1147
|
+
"type": "array"
|
|
1148
|
+
}
|
|
1149
|
+
},
|
|
1150
|
+
"type": "object"
|
|
1151
|
+
},
|
|
1152
|
+
"HostedLinearWorkerMapping": {
|
|
1153
|
+
"additionalProperties": false,
|
|
1154
|
+
"description": "Deterministic issue-to-work mapping fields owned by a hosted Linear worker.",
|
|
1155
|
+
"properties": {
|
|
1156
|
+
"state": {
|
|
1157
|
+
"description": "Canonical submitted work state emitted for matched Linear issues.",
|
|
1158
|
+
"type": "string"
|
|
1159
|
+
},
|
|
1160
|
+
"workType": {
|
|
1161
|
+
"description": "Canonical submitted work type emitted for matched Linear issues.",
|
|
1162
|
+
"type": "string"
|
|
1163
|
+
}
|
|
1164
|
+
},
|
|
1165
|
+
"type": "object"
|
|
1166
|
+
},
|
|
1167
|
+
"HostedWorkerAuth": {
|
|
1168
|
+
"additionalProperties": false,
|
|
1169
|
+
"description": "Hosted-worker authentication contract. V1 hosted workers accept only secret references rather than inline credentials or OAuth-style fields.",
|
|
1170
|
+
"properties": {
|
|
1171
|
+
"secretRef": {
|
|
1172
|
+
"description": "Referenced secret name that resolves the hosted provider API key at runtime.",
|
|
1173
|
+
"type": "string"
|
|
1174
|
+
}
|
|
1175
|
+
},
|
|
1176
|
+
"type": "object"
|
|
1177
|
+
},
|
|
1178
|
+
"HostedWorkerProvider": {
|
|
1179
|
+
"description": "Built-in repository-owned hosted worker providers supported by the public factory-config contract.",
|
|
1180
|
+
"enum": [
|
|
1181
|
+
"LINEAR"
|
|
1182
|
+
],
|
|
1183
|
+
"type": "string"
|
|
1184
|
+
},
|
|
1185
|
+
"HybridLogicalTimestamp": {
|
|
1186
|
+
"additionalProperties": false,
|
|
1187
|
+
"properties": {
|
|
1188
|
+
"logical": {
|
|
1189
|
+
"description": "Monotonic Lamport-style logical component derived from the persisted factory definition version. Serialized as a decimal string so JavaScript clients can round-trip the 64-bit value without precision loss.",
|
|
1190
|
+
"format": "int64",
|
|
1191
|
+
"pattern": "^[0-9]+$",
|
|
1192
|
+
"type": "string"
|
|
1193
|
+
},
|
|
1194
|
+
"physical": {
|
|
1195
|
+
"description": "UTC physical timestamp component for the persisted factory definition version.",
|
|
1196
|
+
"format": "date-time",
|
|
1197
|
+
"type": "string"
|
|
1198
|
+
}
|
|
1199
|
+
},
|
|
1200
|
+
"required": [
|
|
1201
|
+
"logical",
|
|
1202
|
+
"physical"
|
|
1203
|
+
],
|
|
1204
|
+
"type": "object"
|
|
1205
|
+
},
|
|
1206
|
+
"InputGuard": {
|
|
1207
|
+
"additionalProperties": false,
|
|
1208
|
+
"description": "Guard attached to one specific workstation input.",
|
|
1209
|
+
"properties": {
|
|
1210
|
+
"matchConfig": {
|
|
1211
|
+
"allOf": [
|
|
1212
|
+
{
|
|
1213
|
+
"$ref": "#/$defs/GuardMatchConfig"
|
|
1214
|
+
}
|
|
1215
|
+
],
|
|
1216
|
+
"description": "For `MATCHES_FIELDS` guards, the field-selector configuration used to compare candidate inputs."
|
|
1217
|
+
},
|
|
1218
|
+
"matchInput": {
|
|
1219
|
+
"description": "For `SAME_NAME` and `SAME_TRACE_ID` input guards, the peer input workType name from another input in the same workstation.",
|
|
1220
|
+
"type": "string"
|
|
1221
|
+
},
|
|
1222
|
+
"maxVisits": {
|
|
1223
|
+
"description": "For `VISIT_COUNT` guards, the visit threshold.",
|
|
1224
|
+
"minimum": 1,
|
|
1225
|
+
"type": "integer"
|
|
1226
|
+
},
|
|
1227
|
+
"parentInput": {
|
|
1228
|
+
"description": "For parent-aware input guards, the parent workType name from another input in the same workstation.",
|
|
1229
|
+
"type": "string"
|
|
1230
|
+
},
|
|
1231
|
+
"spawnedBy": {
|
|
1232
|
+
"description": "For dynamic fanout input guards, the workstation that spawns the children for count tracking.",
|
|
1233
|
+
"type": "string"
|
|
1234
|
+
},
|
|
1235
|
+
"type": {
|
|
1236
|
+
"allOf": [
|
|
1237
|
+
{
|
|
1238
|
+
"$ref": "#/$defs/InputGuardType"
|
|
1239
|
+
}
|
|
1240
|
+
],
|
|
1241
|
+
"description": "Guard condition to evaluate for this input-level attachment."
|
|
1242
|
+
},
|
|
1243
|
+
"workstation": {
|
|
1244
|
+
"description": "For `VISIT_COUNT` guards, the workstation whose visits are counted.",
|
|
1245
|
+
"type": "string"
|
|
1246
|
+
}
|
|
1247
|
+
},
|
|
1248
|
+
"required": [
|
|
1249
|
+
"type"
|
|
1250
|
+
],
|
|
1251
|
+
"type": "object"
|
|
1252
|
+
},
|
|
1253
|
+
"InputGuardType": {
|
|
1254
|
+
"description": "Guard condition attached to one specific workstation input.",
|
|
1255
|
+
"enum": [
|
|
1256
|
+
"VISIT_COUNT",
|
|
1257
|
+
"ALL_CHILDREN_COMPLETE",
|
|
1258
|
+
"ANY_CHILD_FAILED",
|
|
1259
|
+
"SAME_NAME",
|
|
1260
|
+
"SAME_TRACE_ID"
|
|
1261
|
+
],
|
|
1262
|
+
"type": "string"
|
|
1263
|
+
},
|
|
1264
|
+
"InputKind": {
|
|
1265
|
+
"description": "Kinds of input. `DEFAULT` passes opaque input through to workstations as-is.",
|
|
1266
|
+
"enum": [
|
|
1267
|
+
"DEFAULT"
|
|
1268
|
+
],
|
|
1269
|
+
"type": "string"
|
|
1270
|
+
},
|
|
1271
|
+
"InputType": {
|
|
1272
|
+
"additionalProperties": false,
|
|
1273
|
+
"description": "Declared types of inputs. Used to force the inputs of a certain work type to be of a certain shape, like a specific JSON structure.",
|
|
1274
|
+
"properties": {
|
|
1275
|
+
"name": {
|
|
1276
|
+
"description": "Input type name. The reserved name \"default\" is implicit.",
|
|
1277
|
+
"type": "string"
|
|
1278
|
+
},
|
|
1279
|
+
"type": {
|
|
1280
|
+
"$ref": "#/$defs/InputKind"
|
|
1281
|
+
}
|
|
1282
|
+
},
|
|
1283
|
+
"required": [
|
|
1284
|
+
"name",
|
|
1285
|
+
"type"
|
|
1286
|
+
],
|
|
1287
|
+
"type": "object"
|
|
1288
|
+
},
|
|
1289
|
+
"InvocationReturn": {
|
|
1290
|
+
"additionalProperties": false,
|
|
1291
|
+
"description": "Factory-authored policy for selecting the primary result returned by CLI and API invocations. When omitted from a Factory, runtimes use the documented SUBMITTED_WORK_TERMINAL fallback.",
|
|
1292
|
+
"properties": {
|
|
1293
|
+
"policy": {
|
|
1294
|
+
"allOf": [
|
|
1295
|
+
{
|
|
1296
|
+
"$ref": "#/$defs/InvocationReturnPolicy"
|
|
1297
|
+
}
|
|
1298
|
+
],
|
|
1299
|
+
"description": "Return selection policy for this factory."
|
|
1300
|
+
},
|
|
1301
|
+
"terminalState": {
|
|
1302
|
+
"description": "Authored terminal state name used by EXPLICIT policy selection.",
|
|
1303
|
+
"type": "string"
|
|
1304
|
+
},
|
|
1305
|
+
"workName": {
|
|
1306
|
+
"description": "Optional authored work name filter used by EXPLICIT policy selection.",
|
|
1307
|
+
"type": "string"
|
|
1308
|
+
},
|
|
1309
|
+
"workTypeName": {
|
|
1310
|
+
"description": "Work type name used by EXPLICIT policy selection.",
|
|
1311
|
+
"type": "string"
|
|
1312
|
+
}
|
|
1313
|
+
},
|
|
1314
|
+
"required": [
|
|
1315
|
+
"policy"
|
|
1316
|
+
],
|
|
1317
|
+
"type": "object"
|
|
1318
|
+
},
|
|
1319
|
+
"InvocationReturnPolicy": {
|
|
1320
|
+
"description": "Primary-result selection policy for factory invocation responses. SUBMITTED_WORK_TERMINAL traces the work submitted by the invocation until it reaches its first terminal output. EXPLICIT selects configured work content from the invocation submit scope.",
|
|
1321
|
+
"enum": [
|
|
1322
|
+
"SUBMITTED_WORK_TERMINAL",
|
|
1323
|
+
"EXPLICIT"
|
|
1324
|
+
],
|
|
1325
|
+
"type": "string"
|
|
1326
|
+
},
|
|
1327
|
+
"ModelOperation": {
|
|
1328
|
+
"additionalProperties": false,
|
|
1329
|
+
"description": "One provider-agnostic operation exposed by a model worker, such as `TTS`.",
|
|
1330
|
+
"properties": {
|
|
1331
|
+
"inputs": {
|
|
1332
|
+
"description": "Named operation input slots this worker can consume.",
|
|
1333
|
+
"items": {
|
|
1334
|
+
"$ref": "#/$defs/ModelOperationSlot"
|
|
1335
|
+
},
|
|
1336
|
+
"type": "array"
|
|
1337
|
+
},
|
|
1338
|
+
"name": {
|
|
1339
|
+
"$ref": "#/$defs/ModelOperationName"
|
|
1340
|
+
},
|
|
1341
|
+
"outputs": {
|
|
1342
|
+
"description": "Named operation output slots this worker can produce.",
|
|
1343
|
+
"items": {
|
|
1344
|
+
"$ref": "#/$defs/ModelOperationSlot"
|
|
1345
|
+
},
|
|
1346
|
+
"type": "array"
|
|
1347
|
+
}
|
|
1348
|
+
},
|
|
1349
|
+
"required": [
|
|
1350
|
+
"name"
|
|
1351
|
+
],
|
|
1352
|
+
"type": "object"
|
|
1353
|
+
},
|
|
1354
|
+
"ModelOperationContentType": {
|
|
1355
|
+
"description": "Uppercase content-part categories supported by worker model-operation capability slots.",
|
|
1356
|
+
"enum": [
|
|
1357
|
+
"TEXT",
|
|
1358
|
+
"IMAGE",
|
|
1359
|
+
"AUDIO",
|
|
1360
|
+
"JSON",
|
|
1361
|
+
"BINARY"
|
|
1362
|
+
],
|
|
1363
|
+
"type": "string"
|
|
1364
|
+
},
|
|
1365
|
+
"ModelOperationName": {
|
|
1366
|
+
"description": "Uppercase public operation identifier such as `TTS`, `ASR`, or `EMBED`.",
|
|
1367
|
+
"pattern": "^[A-Z][A-Z0-9_]*$",
|
|
1368
|
+
"type": "string"
|
|
1369
|
+
},
|
|
1370
|
+
"ModelOperationSlot": {
|
|
1371
|
+
"additionalProperties": false,
|
|
1372
|
+
"description": "One named capability slot declared by a model operation.",
|
|
1373
|
+
"properties": {
|
|
1374
|
+
"contentTypes": {
|
|
1375
|
+
"description": "Uppercase content types accepted or produced by this slot.",
|
|
1376
|
+
"items": {
|
|
1377
|
+
"$ref": "#/$defs/ModelOperationContentType"
|
|
1378
|
+
},
|
|
1379
|
+
"minItems": 1,
|
|
1380
|
+
"type": "array"
|
|
1381
|
+
},
|
|
1382
|
+
"name": {
|
|
1383
|
+
"description": "Stable slot name used by workstation-side bindings and diagnostics.",
|
|
1384
|
+
"type": "string"
|
|
1385
|
+
},
|
|
1386
|
+
"required": {
|
|
1387
|
+
"description": "Whether this input slot must be resolved before invocation starts. Output slots omit this field when not needed.",
|
|
1388
|
+
"type": "boolean"
|
|
1389
|
+
}
|
|
1390
|
+
},
|
|
1391
|
+
"required": [
|
|
1392
|
+
"name",
|
|
1393
|
+
"contentTypes"
|
|
1394
|
+
],
|
|
1395
|
+
"type": "object"
|
|
1396
|
+
},
|
|
1397
|
+
"RequiredTool": {
|
|
1398
|
+
"additionalProperties": false,
|
|
1399
|
+
"description": "One declarative external tool dependency for a portable factory.",
|
|
1400
|
+
"properties": {
|
|
1401
|
+
"command": {
|
|
1402
|
+
"description": "Executable lookup token that must resolve on PATH.",
|
|
1403
|
+
"type": "string"
|
|
1404
|
+
},
|
|
1405
|
+
"name": {
|
|
1406
|
+
"description": "Human-readable tool name used in manifests and validation output.",
|
|
1407
|
+
"type": "string"
|
|
1408
|
+
},
|
|
1409
|
+
"purpose": {
|
|
1410
|
+
"description": "Optional explanation of why the portable factory requires this tool.",
|
|
1411
|
+
"type": "string"
|
|
1412
|
+
},
|
|
1413
|
+
"versionArgs": {
|
|
1414
|
+
"description": "Optional argument vector used by future validation flows to probe the tool version without changing the executable lookup token.",
|
|
1415
|
+
"items": {
|
|
1416
|
+
"type": "string"
|
|
1417
|
+
},
|
|
1418
|
+
"type": "array"
|
|
1419
|
+
}
|
|
1420
|
+
},
|
|
1421
|
+
"required": [
|
|
1422
|
+
"name",
|
|
1423
|
+
"command"
|
|
1424
|
+
],
|
|
1425
|
+
"type": "object"
|
|
1426
|
+
},
|
|
1427
|
+
"Resource": {
|
|
1428
|
+
"additionalProperties": false,
|
|
1429
|
+
"description": "Shared capacity that limits how much work the factory can run at once, such as worker slots or external service quotas.",
|
|
1430
|
+
"properties": {
|
|
1431
|
+
"backend": {
|
|
1432
|
+
"description": "Managed runtime backend identifier for `MODEL` resources, such as `LLAMACPP`. Backend selection stays provider-agnostic in customer-facing factory config.",
|
|
1433
|
+
"type": "string"
|
|
1434
|
+
},
|
|
1435
|
+
"capacity": {
|
|
1436
|
+
"description": "Total units of this resource available to the factory at one time.",
|
|
1437
|
+
"minimum": 1,
|
|
1438
|
+
"type": "integer"
|
|
1439
|
+
},
|
|
1440
|
+
"id": {
|
|
1441
|
+
"description": "Optional durable public identifier for this resource. When present, graph and layout references should use this id instead of the mutable name.",
|
|
1442
|
+
"type": "string"
|
|
1443
|
+
},
|
|
1444
|
+
"loadPolicy": {
|
|
1445
|
+
"description": "Managed runtime load policy for `MODEL` resources, such as `ON_DEMAND` or `EAGER`.",
|
|
1446
|
+
"type": "string"
|
|
1447
|
+
},
|
|
1448
|
+
"model": {
|
|
1449
|
+
"description": "Stable managed runtime identity for `MODEL` resources, such as `OMNIVOICE_Q4_K_M`. Packaged and authored factories declare the same managed-runtime dependency through this field plus matching `MODEL_WORKER.model` values.",
|
|
1450
|
+
"type": "string"
|
|
1451
|
+
},
|
|
1452
|
+
"name": {
|
|
1453
|
+
"description": "Resource name referenced from worker requirements and workstation resourceUsage entries.",
|
|
1454
|
+
"type": "string"
|
|
1455
|
+
},
|
|
1456
|
+
"provider": {
|
|
1457
|
+
"description": "Provider identity associated with this resource, especially for `PROVIDER_QUOTA` resources.",
|
|
1458
|
+
"type": "string"
|
|
1459
|
+
},
|
|
1460
|
+
"type": {
|
|
1461
|
+
"allOf": [
|
|
1462
|
+
{
|
|
1463
|
+
"$ref": "#/$defs/ResourceType"
|
|
1464
|
+
}
|
|
1465
|
+
],
|
|
1466
|
+
"description": "Optional uppercase resource family, such as `MODEL`, `PROVIDER_QUOTA`, or `INVOCATION_SLOT`."
|
|
1467
|
+
}
|
|
1468
|
+
},
|
|
1469
|
+
"required": [
|
|
1470
|
+
"name",
|
|
1471
|
+
"capacity"
|
|
1472
|
+
],
|
|
1473
|
+
"type": "object"
|
|
1474
|
+
},
|
|
1475
|
+
"ResourceManifest": {
|
|
1476
|
+
"additionalProperties": false,
|
|
1477
|
+
"description": "Canonical portability manifest for Agent Factory bundles. Required tools are validation-only PATH dependencies; bundled files carry portable content for restoration inside the factory boundary.",
|
|
1478
|
+
"properties": {
|
|
1479
|
+
"bundledFiles": {
|
|
1480
|
+
"description": "Portable bundled files that belong inside the factory boundary. Entries are explicit only, use factory-relative target paths, and must stay under the canonical script, docs, or inputs roots for SCRIPT, DOC, or INPUT entries, or match the supported root-helper allowlist for ROOT_HELPER entries. Export, share, flatten, and materialize flows auto-discover SCRIPT and DOC files under the documented factory subtrees, but ROOT_HELPER entries such as Makefile are opt-in manifest entries that travel only when explicitly declared here. In v1 shared-factory flows, INPUT entries capture the source factory's current starter work at share time and are restored as independent recipient copies.",
|
|
1481
|
+
"items": {
|
|
1482
|
+
"$ref": "#/$defs/BundledFile"
|
|
1483
|
+
},
|
|
1484
|
+
"type": "array"
|
|
1485
|
+
},
|
|
1486
|
+
"requiredTools": {
|
|
1487
|
+
"description": "Declarative external tools that must already resolve on PATH. These entries are validated but not embedded or installed.",
|
|
1488
|
+
"items": {
|
|
1489
|
+
"$ref": "#/$defs/RequiredTool"
|
|
1490
|
+
},
|
|
1491
|
+
"type": "array"
|
|
1492
|
+
}
|
|
1493
|
+
},
|
|
1494
|
+
"type": "object"
|
|
1495
|
+
},
|
|
1496
|
+
"ResourceRequirement": {
|
|
1497
|
+
"additionalProperties": false,
|
|
1498
|
+
"properties": {
|
|
1499
|
+
"capacity": {
|
|
1500
|
+
"minimum": 1,
|
|
1501
|
+
"type": "integer"
|
|
1502
|
+
},
|
|
1503
|
+
"name": {
|
|
1504
|
+
"type": "string"
|
|
1505
|
+
}
|
|
1506
|
+
},
|
|
1507
|
+
"required": [
|
|
1508
|
+
"name",
|
|
1509
|
+
"capacity"
|
|
1510
|
+
],
|
|
1511
|
+
"type": "object"
|
|
1512
|
+
},
|
|
1513
|
+
"ResourceType": {
|
|
1514
|
+
"description": "Uppercase resource families supported by the public factory-config contract.",
|
|
1515
|
+
"enum": [
|
|
1516
|
+
"MODEL",
|
|
1517
|
+
"PROVIDER_QUOTA",
|
|
1518
|
+
"INVOCATION_SLOT"
|
|
1519
|
+
],
|
|
1520
|
+
"type": "string"
|
|
1521
|
+
},
|
|
1522
|
+
"RunnerID": {
|
|
1523
|
+
"description": "Stable built-in runner identifiers supported by factory and workstation runner selection.",
|
|
1524
|
+
"enum": [
|
|
1525
|
+
"codex",
|
|
1526
|
+
"gemini",
|
|
1527
|
+
"kiro",
|
|
1528
|
+
"cursor-cli",
|
|
1529
|
+
"opencode",
|
|
1530
|
+
"pi"
|
|
1531
|
+
],
|
|
1532
|
+
"type": "string"
|
|
1533
|
+
},
|
|
1534
|
+
"StringMap": {
|
|
1535
|
+
"additionalProperties": {
|
|
1536
|
+
"type": "string"
|
|
1537
|
+
},
|
|
1538
|
+
"type": "object"
|
|
1539
|
+
},
|
|
1540
|
+
"WorkAudioContentPart": {
|
|
1541
|
+
"allOf": [
|
|
1542
|
+
{
|
|
1543
|
+
"$ref": "#/$defs/WorkContentCommonFields"
|
|
1544
|
+
},
|
|
1545
|
+
{
|
|
1546
|
+
"properties": {
|
|
1547
|
+
"file": {
|
|
1548
|
+
"$ref": "#/$defs/WorkContentDeprecatedFileProperty"
|
|
1549
|
+
},
|
|
1550
|
+
"type": {
|
|
1551
|
+
"allOf": [
|
|
1552
|
+
{
|
|
1553
|
+
"$ref": "#/$defs/WorkContentPartType"
|
|
1554
|
+
}
|
|
1555
|
+
],
|
|
1556
|
+
"enum": [
|
|
1557
|
+
"AUDIO"
|
|
1558
|
+
]
|
|
1559
|
+
},
|
|
1560
|
+
"url": {
|
|
1561
|
+
"$ref": "#/$defs/WorkContentURLProperty"
|
|
1562
|
+
}
|
|
1563
|
+
},
|
|
1564
|
+
"required": [
|
|
1565
|
+
"type",
|
|
1566
|
+
"url"
|
|
1567
|
+
],
|
|
1568
|
+
"type": "object"
|
|
1569
|
+
}
|
|
1570
|
+
],
|
|
1571
|
+
"description": "Ordered audio content for one work item."
|
|
1572
|
+
},
|
|
1573
|
+
"WorkBinaryContentPart": {
|
|
1574
|
+
"allOf": [
|
|
1575
|
+
{
|
|
1576
|
+
"$ref": "#/$defs/WorkContentCommonFields"
|
|
1577
|
+
},
|
|
1578
|
+
{
|
|
1579
|
+
"properties": {
|
|
1580
|
+
"file": {
|
|
1581
|
+
"$ref": "#/$defs/WorkContentDeprecatedFileProperty"
|
|
1582
|
+
},
|
|
1583
|
+
"type": {
|
|
1584
|
+
"allOf": [
|
|
1585
|
+
{
|
|
1586
|
+
"$ref": "#/$defs/WorkContentPartType"
|
|
1587
|
+
}
|
|
1588
|
+
],
|
|
1589
|
+
"enum": [
|
|
1590
|
+
"BINARY"
|
|
1591
|
+
]
|
|
1592
|
+
},
|
|
1593
|
+
"url": {
|
|
1594
|
+
"$ref": "#/$defs/WorkContentURLProperty"
|
|
1595
|
+
}
|
|
1596
|
+
},
|
|
1597
|
+
"required": [
|
|
1598
|
+
"type",
|
|
1599
|
+
"url"
|
|
1600
|
+
],
|
|
1601
|
+
"type": "object"
|
|
1602
|
+
}
|
|
1603
|
+
],
|
|
1604
|
+
"description": "Ordered binary content for one work item."
|
|
1605
|
+
},
|
|
1606
|
+
"WorkContent": {
|
|
1607
|
+
"description": "Ordered canonical content parts for one work item.",
|
|
1608
|
+
"items": {
|
|
1609
|
+
"$ref": "#/$defs/WorkContentPart"
|
|
1610
|
+
},
|
|
1611
|
+
"type": "array"
|
|
1612
|
+
},
|
|
1613
|
+
"WorkContentCommonFields": {
|
|
1614
|
+
"properties": {
|
|
1615
|
+
"artifactId": {
|
|
1616
|
+
"description": "Optional artifact identifier for externally materialized content.",
|
|
1617
|
+
"type": "string"
|
|
1618
|
+
},
|
|
1619
|
+
"contentType": {
|
|
1620
|
+
"description": "Optional MIME content type for file-backed or structured parts.",
|
|
1621
|
+
"type": "string"
|
|
1622
|
+
},
|
|
1623
|
+
"label": {
|
|
1624
|
+
"description": "Optional caller-defined label for slot binding or diagnostics.",
|
|
1625
|
+
"type": "string"
|
|
1626
|
+
},
|
|
1627
|
+
"metadata": {
|
|
1628
|
+
"$ref": "#/$defs/WorkContentMetadata"
|
|
1629
|
+
},
|
|
1630
|
+
"role": {
|
|
1631
|
+
"description": "Optional semantic role for model-operation authoring.",
|
|
1632
|
+
"type": "string"
|
|
1633
|
+
},
|
|
1634
|
+
"slot": {
|
|
1635
|
+
"description": "Optional slot name used by model-operation binding selectors and diagnostics.",
|
|
1636
|
+
"type": "string"
|
|
1637
|
+
}
|
|
1638
|
+
},
|
|
1639
|
+
"type": "object"
|
|
1640
|
+
},
|
|
1641
|
+
"WorkContentDeprecatedFileProperty": {
|
|
1642
|
+
"description": "Deprecated host-local file path. Use url instead. Legacy values may be normalized to url at ingest during migration.",
|
|
1643
|
+
"type": "string"
|
|
1644
|
+
},
|
|
1645
|
+
"WorkContentMetadata": {
|
|
1646
|
+
"additionalProperties": true,
|
|
1647
|
+
"description": "Optional metadata attached to one work content part.",
|
|
1648
|
+
"type": "object"
|
|
1649
|
+
},
|
|
1650
|
+
"WorkContentPart": {
|
|
1651
|
+
"description": "One ordered canonical content part on a work item.",
|
|
1652
|
+
"oneOf": [
|
|
1653
|
+
{
|
|
1654
|
+
"$ref": "#/$defs/WorkTextContentPart"
|
|
1655
|
+
},
|
|
1656
|
+
{
|
|
1657
|
+
"$ref": "#/$defs/WorkImageContentPart"
|
|
1658
|
+
},
|
|
1659
|
+
{
|
|
1660
|
+
"$ref": "#/$defs/WorkAudioContentPart"
|
|
1661
|
+
},
|
|
1662
|
+
{
|
|
1663
|
+
"$ref": "#/$defs/WorkJsonContentPart"
|
|
1664
|
+
},
|
|
1665
|
+
{
|
|
1666
|
+
"$ref": "#/$defs/WorkBinaryContentPart"
|
|
1667
|
+
}
|
|
1668
|
+
]
|
|
1669
|
+
},
|
|
1670
|
+
"WorkContentPartType": {
|
|
1671
|
+
"description": "Supported canonical work content part types. Legacy lowercase text and image values remain accepted for backward compatibility.",
|
|
1672
|
+
"enum": [
|
|
1673
|
+
"text",
|
|
1674
|
+
"image",
|
|
1675
|
+
"TEXT",
|
|
1676
|
+
"IMAGE",
|
|
1677
|
+
"AUDIO",
|
|
1678
|
+
"JSON",
|
|
1679
|
+
"BINARY"
|
|
1680
|
+
],
|
|
1681
|
+
"type": "string"
|
|
1682
|
+
},
|
|
1683
|
+
"WorkContentURLProperty": {
|
|
1684
|
+
"description": "Canonical content reference for file-backed parts. Supported schemes are file://, http://, https://, data:, and you-artifact:// for session-scoped factory artifact refs.",
|
|
1685
|
+
"minLength": 1,
|
|
1686
|
+
"type": "string"
|
|
1687
|
+
},
|
|
1688
|
+
"WorkImageContentPart": {
|
|
1689
|
+
"allOf": [
|
|
1690
|
+
{
|
|
1691
|
+
"$ref": "#/$defs/WorkContentCommonFields"
|
|
1692
|
+
},
|
|
1693
|
+
{
|
|
1694
|
+
"properties": {
|
|
1695
|
+
"file": {
|
|
1696
|
+
"$ref": "#/$defs/WorkContentDeprecatedFileProperty"
|
|
1697
|
+
},
|
|
1698
|
+
"type": {
|
|
1699
|
+
"allOf": [
|
|
1700
|
+
{
|
|
1701
|
+
"$ref": "#/$defs/WorkContentPartType"
|
|
1702
|
+
}
|
|
1703
|
+
],
|
|
1704
|
+
"enum": [
|
|
1705
|
+
"image",
|
|
1706
|
+
"IMAGE"
|
|
1707
|
+
]
|
|
1708
|
+
},
|
|
1709
|
+
"url": {
|
|
1710
|
+
"$ref": "#/$defs/WorkContentURLProperty"
|
|
1711
|
+
}
|
|
1712
|
+
},
|
|
1713
|
+
"required": [
|
|
1714
|
+
"type",
|
|
1715
|
+
"url"
|
|
1716
|
+
],
|
|
1717
|
+
"type": "object"
|
|
1718
|
+
}
|
|
1719
|
+
],
|
|
1720
|
+
"description": "Ordered image content for one work item."
|
|
1721
|
+
},
|
|
1722
|
+
"WorkJsonContentPart": {
|
|
1723
|
+
"allOf": [
|
|
1724
|
+
{
|
|
1725
|
+
"$ref": "#/$defs/WorkContentCommonFields"
|
|
1726
|
+
},
|
|
1727
|
+
{
|
|
1728
|
+
"properties": {
|
|
1729
|
+
"json": {
|
|
1730
|
+
"description": "Arbitrary JSON value preserved in canonical part order."
|
|
1731
|
+
},
|
|
1732
|
+
"type": {
|
|
1733
|
+
"allOf": [
|
|
1734
|
+
{
|
|
1735
|
+
"$ref": "#/$defs/WorkContentPartType"
|
|
1736
|
+
}
|
|
1737
|
+
],
|
|
1738
|
+
"enum": [
|
|
1739
|
+
"JSON"
|
|
1740
|
+
]
|
|
1741
|
+
}
|
|
1742
|
+
},
|
|
1743
|
+
"required": [
|
|
1744
|
+
"type",
|
|
1745
|
+
"json"
|
|
1746
|
+
],
|
|
1747
|
+
"type": "object"
|
|
1748
|
+
}
|
|
1749
|
+
],
|
|
1750
|
+
"description": "Ordered JSON content for one work item."
|
|
1751
|
+
},
|
|
1752
|
+
"WorkPropagation": {
|
|
1753
|
+
"additionalProperties": false,
|
|
1754
|
+
"description": "Optional workstation policy for how downstream work receives payload content after this workstation completes. When omitted, downstream work uses the workstation output payload.",
|
|
1755
|
+
"properties": {
|
|
1756
|
+
"mode": {
|
|
1757
|
+
"allOf": [
|
|
1758
|
+
{
|
|
1759
|
+
"$ref": "#/$defs/WorkPropagationMode"
|
|
1760
|
+
}
|
|
1761
|
+
],
|
|
1762
|
+
"description": "Propagation mode for downstream work payload selection after this workstation succeeds."
|
|
1763
|
+
}
|
|
1764
|
+
},
|
|
1765
|
+
"required": [
|
|
1766
|
+
"mode"
|
|
1767
|
+
],
|
|
1768
|
+
"type": "object"
|
|
1769
|
+
},
|
|
1770
|
+
"WorkPropagationMode": {
|
|
1771
|
+
"description": "Work payload propagation mode for a workstation. OUTPUT_AS_PAYLOAD uses the workstation output as the downstream work payload. PRESERVE_INPUT keeps the consumed input payload for downstream work instead of replacing it with the workstation output.",
|
|
1772
|
+
"enum": [
|
|
1773
|
+
"OUTPUT_AS_PAYLOAD",
|
|
1774
|
+
"PRESERVE_INPUT"
|
|
1775
|
+
],
|
|
1776
|
+
"type": "string"
|
|
1777
|
+
},
|
|
1778
|
+
"WorkState": {
|
|
1779
|
+
"additionalProperties": false,
|
|
1780
|
+
"description": "A lifecycle state that a work item can occupy inside one work type.",
|
|
1781
|
+
"properties": {
|
|
1782
|
+
"id": {
|
|
1783
|
+
"description": "Optional durable public identifier for this state within its work type. When present, graph and layout references should use this id instead of the mutable name.",
|
|
1784
|
+
"type": "string"
|
|
1785
|
+
},
|
|
1786
|
+
"name": {
|
|
1787
|
+
"description": "Customer-authored state name referenced by workstation inputs and outputs.",
|
|
1788
|
+
"type": "string"
|
|
1789
|
+
},
|
|
1790
|
+
"type": {
|
|
1791
|
+
"allOf": [
|
|
1792
|
+
{
|
|
1793
|
+
"$ref": "#/$defs/WorkStateType"
|
|
1794
|
+
}
|
|
1795
|
+
],
|
|
1796
|
+
"description": "Lifecycle category for this state, such as initial, processing, terminal, or failed."
|
|
1797
|
+
}
|
|
1798
|
+
},
|
|
1799
|
+
"required": [
|
|
1800
|
+
"name",
|
|
1801
|
+
"type"
|
|
1802
|
+
],
|
|
1803
|
+
"type": "object"
|
|
1804
|
+
},
|
|
1805
|
+
"WorkStateType": {
|
|
1806
|
+
"description": "Categories of work states. The factory runtime treats these categories differently for lifecycle tracking and metrics purposes. Initial: The work is waiting to be picked up by a workstation. Processing: The work has been partially processed, and is continuing through its lifecycle. Terminal: The work has completed successfully. Failed: The work has failed.",
|
|
1807
|
+
"enum": [
|
|
1808
|
+
"INITIAL",
|
|
1809
|
+
"PROCESSING",
|
|
1810
|
+
"TERMINAL",
|
|
1811
|
+
"FAILED"
|
|
1812
|
+
],
|
|
1813
|
+
"type": "string"
|
|
1814
|
+
},
|
|
1815
|
+
"WorkTextContentPart": {
|
|
1816
|
+
"allOf": [
|
|
1817
|
+
{
|
|
1818
|
+
"$ref": "#/$defs/WorkContentCommonFields"
|
|
1819
|
+
},
|
|
1820
|
+
{
|
|
1821
|
+
"properties": {
|
|
1822
|
+
"text": {
|
|
1823
|
+
"description": "Inline text content preserved in canonical part order.",
|
|
1824
|
+
"type": "string"
|
|
1825
|
+
},
|
|
1826
|
+
"type": {
|
|
1827
|
+
"allOf": [
|
|
1828
|
+
{
|
|
1829
|
+
"$ref": "#/$defs/WorkContentPartType"
|
|
1830
|
+
}
|
|
1831
|
+
],
|
|
1832
|
+
"enum": [
|
|
1833
|
+
"text",
|
|
1834
|
+
"TEXT"
|
|
1835
|
+
]
|
|
1836
|
+
}
|
|
1837
|
+
},
|
|
1838
|
+
"required": [
|
|
1839
|
+
"type",
|
|
1840
|
+
"text"
|
|
1841
|
+
],
|
|
1842
|
+
"type": "object"
|
|
1843
|
+
}
|
|
1844
|
+
],
|
|
1845
|
+
"description": "Ordered inline text content for one work item."
|
|
1846
|
+
},
|
|
1847
|
+
"WorkType": {
|
|
1848
|
+
"additionalProperties": false,
|
|
1849
|
+
"description": "A named category of work that can move through the factory. Each work type declares the lifecycle states its work items can occupy.",
|
|
1850
|
+
"properties": {
|
|
1851
|
+
"handlingBehavior": {
|
|
1852
|
+
"description": "Optional CLI routing markers for this work type. Factories used with you run --factory must declare handlingBehavior DEFAULT on exactly one work type.",
|
|
1853
|
+
"items": {
|
|
1854
|
+
"$ref": "#/$defs/WorkTypeHandlingBehavior"
|
|
1855
|
+
},
|
|
1856
|
+
"type": "array"
|
|
1857
|
+
},
|
|
1858
|
+
"id": {
|
|
1859
|
+
"description": "Optional durable public identifier for this work type. When present, graph and layout references should use this id instead of the mutable name.",
|
|
1860
|
+
"type": "string"
|
|
1861
|
+
},
|
|
1862
|
+
"name": {
|
|
1863
|
+
"description": "Customer-authored work type name referenced by workstation inputs, outputs, and submitted work.",
|
|
1864
|
+
"type": "string"
|
|
1865
|
+
},
|
|
1866
|
+
"states": {
|
|
1867
|
+
"description": "Lifecycle states available for work items of this type.",
|
|
1868
|
+
"items": {
|
|
1869
|
+
"$ref": "#/$defs/WorkState"
|
|
1870
|
+
},
|
|
1871
|
+
"type": "array"
|
|
1872
|
+
}
|
|
1873
|
+
},
|
|
1874
|
+
"required": [
|
|
1875
|
+
"name",
|
|
1876
|
+
"states"
|
|
1877
|
+
],
|
|
1878
|
+
"type": "object"
|
|
1879
|
+
},
|
|
1880
|
+
"WorkTypeHandlingBehavior": {
|
|
1881
|
+
"description": "Declares how the CLI should route simplified one-shot prompt submissions for this work type. DEFAULT marks the single work type that receives positional prompts from you run --factory.",
|
|
1882
|
+
"enum": [
|
|
1883
|
+
"DEFAULT"
|
|
1884
|
+
],
|
|
1885
|
+
"type": "string"
|
|
1886
|
+
},
|
|
1887
|
+
"Worker": {
|
|
1888
|
+
"additionalProperties": false,
|
|
1889
|
+
"description": "A reusable worker definition that tells the factory how a workstation should execute work, such as through a model-backed agent or a script.",
|
|
1890
|
+
"properties": {
|
|
1891
|
+
"agentTools": {
|
|
1892
|
+
"allOf": [
|
|
1893
|
+
{
|
|
1894
|
+
"$ref": "#/$defs/AgentWorkerToolsConfig"
|
|
1895
|
+
}
|
|
1896
|
+
],
|
|
1897
|
+
"description": "Explicit agent-loop tool policy for AGENT_WORKER definitions. Omit or set policy DISABLED to run agent loops without advertising or executing tools."
|
|
1898
|
+
},
|
|
1899
|
+
"args": {
|
|
1900
|
+
"description": "Additional command arguments passed to the configured command.",
|
|
1901
|
+
"items": {
|
|
1902
|
+
"type": "string"
|
|
1903
|
+
},
|
|
1904
|
+
"type": "array"
|
|
1905
|
+
},
|
|
1906
|
+
"auth": {
|
|
1907
|
+
"allOf": [
|
|
1908
|
+
{
|
|
1909
|
+
"$ref": "#/$defs/HostedWorkerAuth"
|
|
1910
|
+
}
|
|
1911
|
+
],
|
|
1912
|
+
"description": "Hosted-worker authentication contract. V1 hosted workers accept only auth.secretRef."
|
|
1913
|
+
},
|
|
1914
|
+
"body": {
|
|
1915
|
+
"description": "Inline worker instructions or script body when the worker is authored directly in factory config.",
|
|
1916
|
+
"type": "string"
|
|
1917
|
+
},
|
|
1918
|
+
"command": {
|
|
1919
|
+
"description": "Command to execute when this worker runs through a command or script provider.",
|
|
1920
|
+
"type": "string"
|
|
1921
|
+
},
|
|
1922
|
+
"executorProvider": {
|
|
1923
|
+
"allOf": [
|
|
1924
|
+
{
|
|
1925
|
+
"$ref": "#/$defs/WorkerProvider"
|
|
1926
|
+
}
|
|
1927
|
+
],
|
|
1928
|
+
"description": "Canonical executor adapter identifier used to select the worker execution provider or wrapper. The current public built-in value is `SCRIPT_WRAP`."
|
|
1929
|
+
},
|
|
1930
|
+
"id": {
|
|
1931
|
+
"description": "Optional durable public identifier for this worker. When present, graph and layout references should use this id instead of the mutable name.",
|
|
1932
|
+
"type": "string"
|
|
1933
|
+
},
|
|
1934
|
+
"linear": {
|
|
1935
|
+
"allOf": [
|
|
1936
|
+
{
|
|
1937
|
+
"$ref": "#/$defs/HostedLinearWorkerConfig"
|
|
1938
|
+
}
|
|
1939
|
+
],
|
|
1940
|
+
"description": "Provider-specific configuration for the built-in hosted LINEAR worker."
|
|
1941
|
+
},
|
|
1942
|
+
"model": {
|
|
1943
|
+
"description": "Model identifier to request from the configured model provider when this worker uses model execution.",
|
|
1944
|
+
"type": "string"
|
|
1945
|
+
},
|
|
1946
|
+
"modelLocality": {
|
|
1947
|
+
"allOf": [
|
|
1948
|
+
{
|
|
1949
|
+
"$ref": "#/$defs/WorkerModelLocality"
|
|
1950
|
+
}
|
|
1951
|
+
],
|
|
1952
|
+
"description": "Provider locality for this model capability declaration. Use `LOCAL` for embedded or host-managed inference and `CLOUD` for remote provider execution."
|
|
1953
|
+
},
|
|
1954
|
+
"modelProvider": {
|
|
1955
|
+
"allOf": [
|
|
1956
|
+
{
|
|
1957
|
+
"$ref": "#/$defs/WorkerModelProvider"
|
|
1958
|
+
}
|
|
1959
|
+
],
|
|
1960
|
+
"description": "Canonical model-provider identifier used for model routing and provider diagnostics. Current public built-in values are `CLAUDE` and `CODEX`; the runtime maps them onto the underlying provider command IDs."
|
|
1961
|
+
},
|
|
1962
|
+
"name": {
|
|
1963
|
+
"description": "Worker name referenced by Workstation.worker.",
|
|
1964
|
+
"type": "string"
|
|
1965
|
+
},
|
|
1966
|
+
"openCodeAgent": {
|
|
1967
|
+
"description": "Optional OpenCode agent profile name for model workers that dispatch through the OpenCode runner. When set, OpenCode dispatches invoke `opencode run --agent \u003cname\u003e`. Discover agent names with `opencode agent list` (see https://opencode.ai/docs/cli/).",
|
|
1968
|
+
"type": "string"
|
|
1969
|
+
},
|
|
1970
|
+
"operations": {
|
|
1971
|
+
"description": "Provider-agnostic model operations that this worker can execute, including named input and output slots.",
|
|
1972
|
+
"items": {
|
|
1973
|
+
"$ref": "#/$defs/ModelOperation"
|
|
1974
|
+
},
|
|
1975
|
+
"type": "array"
|
|
1976
|
+
},
|
|
1977
|
+
"provider": {
|
|
1978
|
+
"allOf": [
|
|
1979
|
+
{
|
|
1980
|
+
"$ref": "#/$defs/HostedWorkerProvider"
|
|
1981
|
+
}
|
|
1982
|
+
],
|
|
1983
|
+
"description": "Built-in hosted provider identity when this worker uses repository-owned hosted execution."
|
|
1984
|
+
},
|
|
1985
|
+
"resources": {
|
|
1986
|
+
"description": "Resource capacity this worker requires before it can be dispatched.",
|
|
1987
|
+
"items": {
|
|
1988
|
+
"$ref": "#/$defs/ResourceRequirement"
|
|
1989
|
+
},
|
|
1990
|
+
"type": "array"
|
|
1991
|
+
},
|
|
1992
|
+
"skipPermissions": {
|
|
1993
|
+
"description": "When true, bypasses permission checks for providers that support permission gating.",
|
|
1994
|
+
"type": "boolean"
|
|
1995
|
+
},
|
|
1996
|
+
"stopToken": {
|
|
1997
|
+
"description": "Marker that tells model-oriented workers where to stop generated output when the provider supports it.",
|
|
1998
|
+
"type": "string"
|
|
1999
|
+
},
|
|
2000
|
+
"timeout": {
|
|
2001
|
+
"description": "Optional Go duration that caps one worker execution attempt.",
|
|
2002
|
+
"type": "string"
|
|
2003
|
+
},
|
|
2004
|
+
"type": {
|
|
2005
|
+
"allOf": [
|
|
2006
|
+
{
|
|
2007
|
+
"$ref": "#/$defs/WorkerType"
|
|
2008
|
+
}
|
|
2009
|
+
],
|
|
2010
|
+
"description": "Worker implementation family to instantiate for this definition."
|
|
2011
|
+
}
|
|
2012
|
+
},
|
|
2013
|
+
"required": [
|
|
2014
|
+
"name"
|
|
2015
|
+
],
|
|
2016
|
+
"type": "object"
|
|
2017
|
+
},
|
|
2018
|
+
"WorkerModelLocality": {
|
|
2019
|
+
"description": "Provider locality for a model worker capability declaration.",
|
|
2020
|
+
"enum": [
|
|
2021
|
+
"LOCAL",
|
|
2022
|
+
"CLOUD"
|
|
2023
|
+
],
|
|
2024
|
+
"type": "string"
|
|
2025
|
+
},
|
|
2026
|
+
"WorkerModelProvider": {
|
|
2027
|
+
"description": "Canonical model-provider identifiers supported by model workers in factory config.",
|
|
2028
|
+
"enum": [
|
|
2029
|
+
"CLAUDE",
|
|
2030
|
+
"CODEX",
|
|
2031
|
+
"CURSOR",
|
|
2032
|
+
"GEMINI",
|
|
2033
|
+
"KIRO",
|
|
2034
|
+
"OPENCODE",
|
|
2035
|
+
"PI",
|
|
2036
|
+
"AGY"
|
|
2037
|
+
],
|
|
2038
|
+
"type": "string"
|
|
2039
|
+
},
|
|
2040
|
+
"WorkerProvider": {
|
|
2041
|
+
"description": "Concrete worker-provider wrappers supported by the public factory-config contract.",
|
|
2042
|
+
"enum": [
|
|
2043
|
+
"SCRIPT_WRAP"
|
|
2044
|
+
],
|
|
2045
|
+
"type": "string"
|
|
2046
|
+
},
|
|
2047
|
+
"WorkerType": {
|
|
2048
|
+
"description": "Worker implementation families supported by the public factory-config contract.",
|
|
2049
|
+
"enum": [
|
|
2050
|
+
"INFERENCE_WORKER",
|
|
2051
|
+
"AGENT_WORKER",
|
|
2052
|
+
"SCRIPT_WORKER",
|
|
2053
|
+
"POLLER_WORKER",
|
|
2054
|
+
"MODEL_WORKER",
|
|
2055
|
+
"HOSTED_WORKER"
|
|
2056
|
+
],
|
|
2057
|
+
"type": "string"
|
|
2058
|
+
},
|
|
2059
|
+
"Workstation": {
|
|
2060
|
+
"additionalProperties": false,
|
|
2061
|
+
"description": "A processing step in the factory graph. Workstations consume authored work states, run a worker or logical move, and emit the next work states.",
|
|
2062
|
+
"properties": {
|
|
2063
|
+
"behavior": {
|
|
2064
|
+
"allOf": [
|
|
2065
|
+
{
|
|
2066
|
+
"$ref": "#/$defs/WorkstationKind"
|
|
2067
|
+
}
|
|
2068
|
+
],
|
|
2069
|
+
"description": "Scheduling behavior for this workstation, such as STANDARD, REPEATER, or CRON execution."
|
|
2070
|
+
},
|
|
2071
|
+
"body": {
|
|
2072
|
+
"description": "Inline workstation instructions or script body when authored directly in factory config.",
|
|
2073
|
+
"type": "string"
|
|
2074
|
+
},
|
|
2075
|
+
"classificationRoutes": {
|
|
2076
|
+
"description": "Explicit label-to-destination routing used only by CLASSIFIER_WORKSTATION definitions. Each route must declare a unique non-empty label and one or more outputs.",
|
|
2077
|
+
"items": {
|
|
2078
|
+
"$ref": "#/$defs/ClassificationRoute"
|
|
2079
|
+
},
|
|
2080
|
+
"type": "array"
|
|
2081
|
+
},
|
|
2082
|
+
"copyReferencedScripts": {
|
|
2083
|
+
"description": "Copy supported referenced script files into the expanded workstation layout when config expand runs.",
|
|
2084
|
+
"type": "boolean"
|
|
2085
|
+
},
|
|
2086
|
+
"cron": {
|
|
2087
|
+
"allOf": [
|
|
2088
|
+
{
|
|
2089
|
+
"$ref": "#/$defs/WorkstationCron"
|
|
2090
|
+
}
|
|
2091
|
+
],
|
|
2092
|
+
"description": "Cron trigger configuration for workstations whose behavior is CRON."
|
|
2093
|
+
},
|
|
2094
|
+
"env": {
|
|
2095
|
+
"allOf": [
|
|
2096
|
+
{
|
|
2097
|
+
"$ref": "#/$defs/StringMap"
|
|
2098
|
+
}
|
|
2099
|
+
],
|
|
2100
|
+
"description": "Environment variables added to the workstation execution context."
|
|
2101
|
+
},
|
|
2102
|
+
"guards": {
|
|
2103
|
+
"description": "Guarded loop breakers should use `VISIT_COUNT` guards here with a `LOGICAL_MOVE` workstation instead of top-level exhaustion rules.",
|
|
2104
|
+
"items": {
|
|
2105
|
+
"$ref": "#/$defs/WorkstationGuard"
|
|
2106
|
+
},
|
|
2107
|
+
"type": "array"
|
|
2108
|
+
},
|
|
2109
|
+
"id": {
|
|
2110
|
+
"description": "Optional durable public identifier for this workstation. Graph and layout references should use this id instead of the mutable name.",
|
|
2111
|
+
"type": "string"
|
|
2112
|
+
},
|
|
2113
|
+
"inputs": {
|
|
2114
|
+
"description": "Work states this workstation can consume before it dispatches.",
|
|
2115
|
+
"items": {
|
|
2116
|
+
"$ref": "#/$defs/WorkstationIO"
|
|
2117
|
+
},
|
|
2118
|
+
"type": "array"
|
|
2119
|
+
},
|
|
2120
|
+
"limits": {
|
|
2121
|
+
"allOf": [
|
|
2122
|
+
{
|
|
2123
|
+
"$ref": "#/$defs/WorkstationLimits"
|
|
2124
|
+
}
|
|
2125
|
+
],
|
|
2126
|
+
"description": "Retry and execution ceilings applied to this workstation."
|
|
2127
|
+
},
|
|
2128
|
+
"name": {
|
|
2129
|
+
"description": "Customer-authored workstation name used by guards, diagnostics, and authored references.",
|
|
2130
|
+
"type": "string"
|
|
2131
|
+
},
|
|
2132
|
+
"onContinue": {
|
|
2133
|
+
"description": "Optional destination emitted when the workstation makes partial progress and should continue iterating. Classifier workstations must not declare onContinue.",
|
|
2134
|
+
"items": {
|
|
2135
|
+
"$ref": "#/$defs/WorkstationIO"
|
|
2136
|
+
},
|
|
2137
|
+
"type": "array"
|
|
2138
|
+
},
|
|
2139
|
+
"onFailure": {
|
|
2140
|
+
"description": "Optional destination emitted when the workstation fails permanently.",
|
|
2141
|
+
"items": {
|
|
2142
|
+
"$ref": "#/$defs/WorkstationIO"
|
|
2143
|
+
},
|
|
2144
|
+
"type": "array"
|
|
2145
|
+
},
|
|
2146
|
+
"onRejection": {
|
|
2147
|
+
"description": "Optional destination emitted when the worker rejects the current work without a hard failure. Classifier workstations must not declare onRejection.",
|
|
2148
|
+
"items": {
|
|
2149
|
+
"$ref": "#/$defs/WorkstationIO"
|
|
2150
|
+
},
|
|
2151
|
+
"type": "array"
|
|
2152
|
+
},
|
|
2153
|
+
"openCodeAgent": {
|
|
2154
|
+
"description": "Optional OpenCode agent profile override for this workstation. When set, overrides the worker default for OpenCode dispatches and invokes `opencode run --agent \u003cname\u003e`. Discover agent names with `opencode agent list` (see https://opencode.ai/docs/cli/).",
|
|
2155
|
+
"type": "string"
|
|
2156
|
+
},
|
|
2157
|
+
"operation": {
|
|
2158
|
+
"allOf": [
|
|
2159
|
+
{
|
|
2160
|
+
"$ref": "#/$defs/ModelOperationName"
|
|
2161
|
+
}
|
|
2162
|
+
],
|
|
2163
|
+
"description": "Uppercase provider-agnostic operation requested by `MODEL_INVOKE` workstations, such as `TTS`."
|
|
2164
|
+
},
|
|
2165
|
+
"operationBindings": {
|
|
2166
|
+
"description": "Optional workstation-authored slot bindings that resolve operation inputs from runtime content or static config content.",
|
|
2167
|
+
"items": {
|
|
2168
|
+
"$ref": "#/$defs/WorkstationOperationBinding"
|
|
2169
|
+
},
|
|
2170
|
+
"type": "array"
|
|
2171
|
+
},
|
|
2172
|
+
"outcomeFormat": {
|
|
2173
|
+
"allOf": [
|
|
2174
|
+
{
|
|
2175
|
+
"$ref": "#/$defs/WorkstationOutcomeFormat"
|
|
2176
|
+
}
|
|
2177
|
+
],
|
|
2178
|
+
"description": "Optional worker-output parsing mode for model workstations. When set to `decision-envelope`, agent output is parsed as a reviewer/checker JSON envelope that maps directly onto WorkResult outcome, feedback, output, and optional recorded output work instead of stop-token routing."
|
|
2179
|
+
},
|
|
2180
|
+
"outputSchema": {
|
|
2181
|
+
"description": "JSON schema string used to validate or parse structured model output when configured.",
|
|
2182
|
+
"type": "string"
|
|
2183
|
+
},
|
|
2184
|
+
"outputs": {
|
|
2185
|
+
"description": "Work states emitted after a non-classifier workstation succeeds. Classifier workstations must use classificationRoutes instead of normal success outputs.",
|
|
2186
|
+
"items": {
|
|
2187
|
+
"$ref": "#/$defs/WorkstationIO"
|
|
2188
|
+
},
|
|
2189
|
+
"type": "array"
|
|
2190
|
+
},
|
|
2191
|
+
"promptFile": {
|
|
2192
|
+
"description": "Path to a prompt template file loaded for model-oriented workstation execution.",
|
|
2193
|
+
"type": "string"
|
|
2194
|
+
},
|
|
2195
|
+
"resources": {
|
|
2196
|
+
"description": "Resource capacity this workstation consumes while one dispatch is in flight.",
|
|
2197
|
+
"items": {
|
|
2198
|
+
"$ref": "#/$defs/ResourceRequirement"
|
|
2199
|
+
},
|
|
2200
|
+
"type": "array"
|
|
2201
|
+
},
|
|
2202
|
+
"runner": {
|
|
2203
|
+
"allOf": [
|
|
2204
|
+
{
|
|
2205
|
+
"$ref": "#/$defs/RunnerID"
|
|
2206
|
+
}
|
|
2207
|
+
],
|
|
2208
|
+
"description": "Optional workstation-specific runner override. When omitted, dispatch falls back to the factory runner, then worker modelProvider compatibility when no explicit runner is configured, then the default codex runner."
|
|
2209
|
+
},
|
|
2210
|
+
"stopWords": {
|
|
2211
|
+
"description": "Stop words authored on the topology entry for model-oriented dispatches.",
|
|
2212
|
+
"items": {
|
|
2213
|
+
"type": "string"
|
|
2214
|
+
},
|
|
2215
|
+
"type": "array"
|
|
2216
|
+
},
|
|
2217
|
+
"type": {
|
|
2218
|
+
"allOf": [
|
|
2219
|
+
{
|
|
2220
|
+
"$ref": "#/$defs/WorkstationType"
|
|
2221
|
+
}
|
|
2222
|
+
],
|
|
2223
|
+
"description": "Runtime workstation implementation type, equivalent to the workstation AGENTS.md frontmatter type."
|
|
2224
|
+
},
|
|
2225
|
+
"workPropagation": {
|
|
2226
|
+
"allOf": [
|
|
2227
|
+
{
|
|
2228
|
+
"$ref": "#/$defs/WorkPropagation"
|
|
2229
|
+
}
|
|
2230
|
+
],
|
|
2231
|
+
"description": "Optional policy for whether downstream work uses the workstation output payload or preserves the consumed input payload."
|
|
2232
|
+
},
|
|
2233
|
+
"worker": {
|
|
2234
|
+
"description": "Name of a worker declared in the workers list.",
|
|
2235
|
+
"type": "string"
|
|
2236
|
+
},
|
|
2237
|
+
"workingDirectory": {
|
|
2238
|
+
"description": "Go template resolved from token tags at dispatch time.",
|
|
2239
|
+
"type": "string"
|
|
2240
|
+
},
|
|
2241
|
+
"worktree": {
|
|
2242
|
+
"description": "Go template resolved and passed as the worktree path to CLI dispatchers.",
|
|
2243
|
+
"type": "string"
|
|
2244
|
+
}
|
|
2245
|
+
},
|
|
2246
|
+
"required": [
|
|
2247
|
+
"name",
|
|
2248
|
+
"worker",
|
|
2249
|
+
"inputs"
|
|
2250
|
+
],
|
|
2251
|
+
"type": "object"
|
|
2252
|
+
},
|
|
2253
|
+
"WorkstationCron": {
|
|
2254
|
+
"additionalProperties": false,
|
|
2255
|
+
"description": "Trigger timing for cron workstations. Cron workstations use a schedule expression; interval triggers are not supported.",
|
|
2256
|
+
"properties": {
|
|
2257
|
+
"expiryWindow": {
|
|
2258
|
+
"description": "Positive Go duration after due_at before a stale cron time token expires and can be consumed by the system expiry transition. Defaults to the duration until the next scheduled cron fire when omitted.",
|
|
2259
|
+
"type": "string"
|
|
2260
|
+
},
|
|
2261
|
+
"jitter": {
|
|
2262
|
+
"description": "Non-negative Go duration used as the maximum deterministic delay added to scheduled time tokens. Defaults to \"0s\".",
|
|
2263
|
+
"type": "string"
|
|
2264
|
+
},
|
|
2265
|
+
"schedule": {
|
|
2266
|
+
"description": "Standard five-field cron expression used to produce internal time work while the factory service is running.",
|
|
2267
|
+
"type": "string"
|
|
2268
|
+
},
|
|
2269
|
+
"triggerAtStart": {
|
|
2270
|
+
"default": false,
|
|
2271
|
+
"description": "When true, service startup submits one immediate internal time work item before waiting for the next scheduled cron fire.",
|
|
2272
|
+
"type": "boolean"
|
|
2273
|
+
}
|
|
2274
|
+
},
|
|
2275
|
+
"required": [
|
|
2276
|
+
"schedule"
|
|
2277
|
+
],
|
|
2278
|
+
"type": "object"
|
|
2279
|
+
},
|
|
2280
|
+
"WorkstationGuard": {
|
|
2281
|
+
"additionalProperties": false,
|
|
2282
|
+
"description": "Guard attached to a workstation as a whole.",
|
|
2283
|
+
"properties": {
|
|
2284
|
+
"matchConfig": {
|
|
2285
|
+
"allOf": [
|
|
2286
|
+
{
|
|
2287
|
+
"$ref": "#/$defs/GuardMatchConfig"
|
|
2288
|
+
}
|
|
2289
|
+
],
|
|
2290
|
+
"description": "For `MATCHES_FIELDS` guards, the field-selector configuration used to compare candidate inputs."
|
|
2291
|
+
},
|
|
2292
|
+
"matchInput": {
|
|
2293
|
+
"description": "For `SAME_NAME` and `SAME_TRACE_ID` input guards, the peer input workType name from another input in the same workstation.",
|
|
2294
|
+
"type": "string"
|
|
2295
|
+
},
|
|
2296
|
+
"maxVisits": {
|
|
2297
|
+
"description": "For `VISIT_COUNT` guards, the visit threshold.",
|
|
2298
|
+
"minimum": 1,
|
|
2299
|
+
"type": "integer"
|
|
2300
|
+
},
|
|
2301
|
+
"parentInput": {
|
|
2302
|
+
"description": "For parent-aware input guards, the parent workType name from another input in the same workstation.",
|
|
2303
|
+
"type": "string"
|
|
2304
|
+
},
|
|
2305
|
+
"spawnedBy": {
|
|
2306
|
+
"description": "For dynamic fanout input guards, the workstation that spawns the children for count tracking.",
|
|
2307
|
+
"type": "string"
|
|
2308
|
+
},
|
|
2309
|
+
"type": {
|
|
2310
|
+
"allOf": [
|
|
2311
|
+
{
|
|
2312
|
+
"$ref": "#/$defs/WorkstationGuardType"
|
|
2313
|
+
}
|
|
2314
|
+
],
|
|
2315
|
+
"description": "Guard condition to evaluate for this workstation-level attachment."
|
|
2316
|
+
},
|
|
2317
|
+
"workstation": {
|
|
2318
|
+
"description": "For `VISIT_COUNT` guards, the workstation whose visits are counted.",
|
|
2319
|
+
"type": "string"
|
|
2320
|
+
}
|
|
2321
|
+
},
|
|
2322
|
+
"required": [
|
|
2323
|
+
"type"
|
|
2324
|
+
],
|
|
2325
|
+
"type": "object"
|
|
2326
|
+
},
|
|
2327
|
+
"WorkstationGuardType": {
|
|
2328
|
+
"description": "Guard condition attached to a workstation as a whole.",
|
|
2329
|
+
"enum": [
|
|
2330
|
+
"VISIT_COUNT",
|
|
2331
|
+
"MATCHES_FIELDS"
|
|
2332
|
+
],
|
|
2333
|
+
"type": "string"
|
|
2334
|
+
},
|
|
2335
|
+
"WorkstationIO": {
|
|
2336
|
+
"additionalProperties": false,
|
|
2337
|
+
"description": "One authored work-state reference consumed or emitted by a workstation.",
|
|
2338
|
+
"properties": {
|
|
2339
|
+
"guards": {
|
|
2340
|
+
"description": "Per-input guards that must pass before this specific input can be used.",
|
|
2341
|
+
"items": {
|
|
2342
|
+
"$ref": "#/$defs/InputGuard"
|
|
2343
|
+
},
|
|
2344
|
+
"type": "array"
|
|
2345
|
+
},
|
|
2346
|
+
"state": {
|
|
2347
|
+
"description": "Name of the work state consumed or emitted for the referenced work type.",
|
|
2348
|
+
"type": "string"
|
|
2349
|
+
},
|
|
2350
|
+
"workType": {
|
|
2351
|
+
"description": "Name of the work type consumed or emitted at this edge of the workstation.",
|
|
2352
|
+
"type": "string"
|
|
2353
|
+
}
|
|
2354
|
+
},
|
|
2355
|
+
"required": [
|
|
2356
|
+
"workType",
|
|
2357
|
+
"state"
|
|
2358
|
+
],
|
|
2359
|
+
"type": "object"
|
|
2360
|
+
},
|
|
2361
|
+
"WorkstationKind": {
|
|
2362
|
+
"default": "STANDARD",
|
|
2363
|
+
"description": "Scheduling kind for a workstation, which determines how the engine schedules and dispatches work to it. Standard workstations are scheduled as soon as their inputs are ready, and can have multiple work items in-flight at the same time. Repeater workstations are triggered whenever their inputs change, and will reloop the outputs on rejection back to the initial place. Cron workstations create internal time work and dispatch their configured worker when time and input guards are satisfied. Poller workstations bind a poller-capable worker that the service runtime supervises as a long-lived ingress loop.",
|
|
2364
|
+
"enum": [
|
|
2365
|
+
"STANDARD",
|
|
2366
|
+
"REPEATER",
|
|
2367
|
+
"CRON",
|
|
2368
|
+
"POLLER"
|
|
2369
|
+
],
|
|
2370
|
+
"type": "string"
|
|
2371
|
+
},
|
|
2372
|
+
"WorkstationLimits": {
|
|
2373
|
+
"additionalProperties": false,
|
|
2374
|
+
"description": "Retry and execution ceilings applied to one workstation definition.",
|
|
2375
|
+
"properties": {
|
|
2376
|
+
"maxExecutionTime": {
|
|
2377
|
+
"description": "Go duration limit for one dispatch attempt before it times out.",
|
|
2378
|
+
"type": "string"
|
|
2379
|
+
},
|
|
2380
|
+
"maxRetries": {
|
|
2381
|
+
"description": "Maximum number of retry attempts after a failed dispatch before the workstation gives up.",
|
|
2382
|
+
"type": "integer"
|
|
2383
|
+
}
|
|
2384
|
+
},
|
|
2385
|
+
"type": "object"
|
|
2386
|
+
},
|
|
2387
|
+
"WorkstationOperationBinding": {
|
|
2388
|
+
"additionalProperties": false,
|
|
2389
|
+
"description": "One workstation-authored binding for a provider-agnostic model-operation input slot.",
|
|
2390
|
+
"properties": {
|
|
2391
|
+
"config": {
|
|
2392
|
+
"allOf": [
|
|
2393
|
+
{
|
|
2394
|
+
"$ref": "#/$defs/WorkContent"
|
|
2395
|
+
}
|
|
2396
|
+
],
|
|
2397
|
+
"description": "Static authored content bound directly or used as the first fallback when runtime input does not match."
|
|
2398
|
+
},
|
|
2399
|
+
"defaultContent": {
|
|
2400
|
+
"allOf": [
|
|
2401
|
+
{
|
|
2402
|
+
"$ref": "#/$defs/WorkContent"
|
|
2403
|
+
}
|
|
2404
|
+
],
|
|
2405
|
+
"description": "Optional final fallback content when neither runtime input nor config content resolves the slot."
|
|
2406
|
+
},
|
|
2407
|
+
"selector": {
|
|
2408
|
+
"allOf": [
|
|
2409
|
+
{
|
|
2410
|
+
"$ref": "#/$defs/WorkstationOperationBindingSelector"
|
|
2411
|
+
}
|
|
2412
|
+
],
|
|
2413
|
+
"description": "Ordered runtime-input selector used before falling back to config or default content."
|
|
2414
|
+
},
|
|
2415
|
+
"slot": {
|
|
2416
|
+
"description": "Stable input slot name declared by the worker operation.",
|
|
2417
|
+
"type": "string"
|
|
2418
|
+
}
|
|
2419
|
+
},
|
|
2420
|
+
"required": [
|
|
2421
|
+
"slot"
|
|
2422
|
+
],
|
|
2423
|
+
"type": "object"
|
|
2424
|
+
},
|
|
2425
|
+
"WorkstationOperationBindingSelector": {
|
|
2426
|
+
"additionalProperties": false,
|
|
2427
|
+
"description": "Selector fields used to resolve one content part from ordered runtime input.",
|
|
2428
|
+
"properties": {
|
|
2429
|
+
"label": {
|
|
2430
|
+
"description": "Match a content part by its label field.",
|
|
2431
|
+
"type": "string"
|
|
2432
|
+
},
|
|
2433
|
+
"role": {
|
|
2434
|
+
"description": "Match a content part by its role field.",
|
|
2435
|
+
"type": "string"
|
|
2436
|
+
},
|
|
2437
|
+
"slot": {
|
|
2438
|
+
"description": "Match a content part by its authored slot field.",
|
|
2439
|
+
"type": "string"
|
|
2440
|
+
},
|
|
2441
|
+
"type": {
|
|
2442
|
+
"allOf": [
|
|
2443
|
+
{
|
|
2444
|
+
"$ref": "#/$defs/ModelOperationContentType"
|
|
2445
|
+
}
|
|
2446
|
+
],
|
|
2447
|
+
"description": "Match a content part by its uppercase public type."
|
|
2448
|
+
}
|
|
2449
|
+
},
|
|
2450
|
+
"type": "object"
|
|
2451
|
+
},
|
|
2452
|
+
"WorkstationOutcomeFormat": {
|
|
2453
|
+
"description": "Optional worker-output parsing mode for model workstations. When set to `decision-envelope`, agent output is parsed as a reviewer/checker JSON envelope that maps directly onto WorkResult outcome, feedback, output, and optional recorded output work instead of stop-token routing.",
|
|
2454
|
+
"enum": [
|
|
2455
|
+
"decision-envelope"
|
|
2456
|
+
],
|
|
2457
|
+
"type": "string"
|
|
2458
|
+
},
|
|
2459
|
+
"WorkstationType": {
|
|
2460
|
+
"description": "Runtime workstation implementation types supported by the public factory-config contract.",
|
|
2461
|
+
"enum": [
|
|
2462
|
+
"INFERENCE_RUN",
|
|
2463
|
+
"AGENT_RUN",
|
|
2464
|
+
"SCRIPT_RUN",
|
|
2465
|
+
"POLLER_RUN",
|
|
2466
|
+
"MODEL_WORKSTATION",
|
|
2467
|
+
"MODEL_INVOKE",
|
|
2468
|
+
"LOGICAL_MOVE",
|
|
2469
|
+
"CLASSIFIER_WORKSTATION"
|
|
2470
|
+
],
|
|
2471
|
+
"type": "string"
|
|
2472
|
+
}
|
|
2473
|
+
},
|
|
2474
|
+
"$id": "https://schemas.portpowered.com/you/config/factory.schema.json",
|
|
2475
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
2476
|
+
"additionalProperties": false,
|
|
2477
|
+
"description": "Top-level factory.json contract. Declare the work types, resources, portability resources, workers, and workstations that make up one authored factory here. Guarded loop breakers should be authored as guarded LOGICAL_MOVE workstations using VISIT_COUNT guards instead of a top-level exhaustion-rules field.",
|
|
2478
|
+
"properties": {
|
|
2479
|
+
"factoryDirectory": {
|
|
2480
|
+
"description": "Directory that contained the factory.json used for this serialized runtime config.",
|
|
2481
|
+
"type": "string"
|
|
2482
|
+
},
|
|
2483
|
+
"guards": {
|
|
2484
|
+
"description": "Root-level guards that apply across the factory instead of one specific workstation or input.",
|
|
2485
|
+
"items": {
|
|
2486
|
+
"$ref": "#/$defs/FactoryGuard"
|
|
2487
|
+
},
|
|
2488
|
+
"type": "array"
|
|
2489
|
+
},
|
|
2490
|
+
"id": {
|
|
2491
|
+
"description": "Factory identifier used as the factory-level template context fallback.",
|
|
2492
|
+
"type": "string"
|
|
2493
|
+
},
|
|
2494
|
+
"inputTypes": {
|
|
2495
|
+
"description": "Named input kinds accepted by the factory. The default input type is implicit and must not be declared.",
|
|
2496
|
+
"items": {
|
|
2497
|
+
"$ref": "#/$defs/InputType"
|
|
2498
|
+
},
|
|
2499
|
+
"type": "array"
|
|
2500
|
+
},
|
|
2501
|
+
"invocationReturn": {
|
|
2502
|
+
"allOf": [
|
|
2503
|
+
{
|
|
2504
|
+
"$ref": "#/$defs/InvocationReturn"
|
|
2505
|
+
}
|
|
2506
|
+
],
|
|
2507
|
+
"description": "Optional factory-authored invocation primary-result policy shared by CLI and API entrypoints. When omitted, runtimes use the SUBMITTED_WORK_TERMINAL fallback and return the first terminal content for the work item originally submitted by the invocation."
|
|
2508
|
+
},
|
|
2509
|
+
"invocationSignature": {
|
|
2510
|
+
"allOf": [
|
|
2511
|
+
{
|
|
2512
|
+
"$ref": "#/$defs/FactoryInvocationSignature"
|
|
2513
|
+
}
|
|
2514
|
+
],
|
|
2515
|
+
"description": "Optional canonical callable argument contract shared by CLI, API, dashboard, docs, and packaged factories. When omitted, callers use the factory's compatibility invocation behavior."
|
|
2516
|
+
},
|
|
2517
|
+
"layout": {
|
|
2518
|
+
"allOf": [
|
|
2519
|
+
{
|
|
2520
|
+
"$ref": "#/$defs/FactoryLayout"
|
|
2521
|
+
}
|
|
2522
|
+
],
|
|
2523
|
+
"description": "Optional non-executable graph editor layout metadata keyed by canonical graph node and edge ids."
|
|
2524
|
+
},
|
|
2525
|
+
"metadata": {
|
|
2526
|
+
"allOf": [
|
|
2527
|
+
{
|
|
2528
|
+
"$ref": "#/$defs/StringMap"
|
|
2529
|
+
}
|
|
2530
|
+
],
|
|
2531
|
+
"description": "Free-form factory-level metadata carried through runtime serialization and replay diagnostics."
|
|
2532
|
+
},
|
|
2533
|
+
"name": {
|
|
2534
|
+
"$ref": "#/$defs/FactoryName"
|
|
2535
|
+
},
|
|
2536
|
+
"orchestrator": {
|
|
2537
|
+
"allOf": [
|
|
2538
|
+
{
|
|
2539
|
+
"$ref": "#/$defs/FactoryOrchestrator"
|
|
2540
|
+
}
|
|
2541
|
+
],
|
|
2542
|
+
"description": "Authored orchestrator identity for this factory. When omitted, existing Petri factories load through compatibility defaulting to orchestrator.kind = PETRI."
|
|
2543
|
+
},
|
|
2544
|
+
"resources": {
|
|
2545
|
+
"description": "Shared capacity pools that workers or workstations can consume while work is executing.",
|
|
2546
|
+
"items": {
|
|
2547
|
+
"$ref": "#/$defs/Resource"
|
|
2548
|
+
},
|
|
2549
|
+
"type": "array"
|
|
2550
|
+
},
|
|
2551
|
+
"runner": {
|
|
2552
|
+
"allOf": [
|
|
2553
|
+
{
|
|
2554
|
+
"$ref": "#/$defs/RunnerID"
|
|
2555
|
+
}
|
|
2556
|
+
],
|
|
2557
|
+
"description": "Default runner selection for the factory when a workstation does not declare its own runner override."
|
|
2558
|
+
},
|
|
2559
|
+
"sourceDirectory": {
|
|
2560
|
+
"description": "Original source directory for record/replay and drift diagnostics.",
|
|
2561
|
+
"type": "string"
|
|
2562
|
+
},
|
|
2563
|
+
"supportingFiles": {
|
|
2564
|
+
"allOf": [
|
|
2565
|
+
{
|
|
2566
|
+
"$ref": "#/$defs/ResourceManifest"
|
|
2567
|
+
}
|
|
2568
|
+
],
|
|
2569
|
+
"description": "Optional portability manifest for validation-only external tools and portable bundled files. During v1 factory sharing, bundled INPUT files represent a share-time snapshot of the source factory's current inputs work so recipients restore detached starter-work copies that no longer sync back to the original factory. This contract is distinct from runtime-capacity resources."
|
|
2570
|
+
},
|
|
2571
|
+
"version": {
|
|
2572
|
+
"allOf": [
|
|
2573
|
+
{
|
|
2574
|
+
"$ref": "#/$defs/HybridLogicalTimestamp"
|
|
2575
|
+
}
|
|
2576
|
+
],
|
|
2577
|
+
"description": "Server-managed current-factory version metadata. Clients should echo this value on complete replacement saves when they want stale-write detection, but durable factory configuration does not treat it as customer-authored topology."
|
|
2578
|
+
},
|
|
2579
|
+
"workTypes": {
|
|
2580
|
+
"description": "Customer-authored work item categories and the lifecycle states each one can occupy.",
|
|
2581
|
+
"items": {
|
|
2582
|
+
"$ref": "#/$defs/WorkType"
|
|
2583
|
+
},
|
|
2584
|
+
"type": "array"
|
|
2585
|
+
},
|
|
2586
|
+
"workers": {
|
|
2587
|
+
"description": "Reusable worker definitions that workstations reference by name when dispatching work.",
|
|
2588
|
+
"items": {
|
|
2589
|
+
"$ref": "#/$defs/Worker"
|
|
2590
|
+
},
|
|
2591
|
+
"type": "array"
|
|
2592
|
+
},
|
|
2593
|
+
"workstations": {
|
|
2594
|
+
"description": "Processing steps that consume work, invoke workers, and emit the next work states.",
|
|
2595
|
+
"items": {
|
|
2596
|
+
"$ref": "#/$defs/Workstation"
|
|
2597
|
+
},
|
|
2598
|
+
"type": "array"
|
|
2599
|
+
}
|
|
2600
|
+
},
|
|
2601
|
+
"required": [
|
|
2602
|
+
"name"
|
|
2603
|
+
],
|
|
2604
|
+
"title": "You Factory configuration",
|
|
2605
|
+
"type": "object"
|
|
2606
|
+
}
|