agentxchain 2.135.1 → 2.136.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/bin/agentxchain.js +8 -1
- package/package.json +4 -2
- package/scripts/release-preflight.sh +2 -0
- package/src/commands/connector.js +136 -0
- package/src/commands/restart.js +3 -0
- package/src/commands/resume.js +15 -0
- package/src/commands/step.js +12 -0
- package/src/lib/connector-validate.js +6 -0
- package/src/lib/continuous-run.js +60 -5
- package/src/lib/dispatch-bundle.js +14 -0
- package/src/lib/governed-state.js +42 -46
- package/src/lib/intake.js +17 -57
- package/src/lib/intent-startup-migration.js +151 -0
- package/src/lib/runtime-capabilities.js +101 -81
- package/src/lib/schemas/agentxchain-config.schema.json +391 -0
- package/src/lib/schemas/connector-capabilities-output.schema.json +104 -0
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://agentxchain.dev/schemas/agentxchain-config.schema.json",
|
|
4
|
+
"title": "AgentXchain Governed Config",
|
|
5
|
+
"description": "Raw governed agentxchain.json config. Canonical role bindings use roles.<role>.runtime. runtime_id is a normalized runtime artifact, not a raw config field.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["schema_version", "project", "roles", "runtimes"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schema_version": {
|
|
10
|
+
"description": "Governed config schema version. Raw governed repos use \"1.0\"; numeric 4 is accepted for compatibility with older reference-runner artifacts.",
|
|
11
|
+
"enum": ["1.0", 4]
|
|
12
|
+
},
|
|
13
|
+
"template": {
|
|
14
|
+
"type": "string"
|
|
15
|
+
},
|
|
16
|
+
"project": {
|
|
17
|
+
"$ref": "#/$defs/project"
|
|
18
|
+
},
|
|
19
|
+
"roles": {
|
|
20
|
+
"type": "object",
|
|
21
|
+
"minProperties": 1,
|
|
22
|
+
"propertyNames": {
|
|
23
|
+
"pattern": "^[a-z0-9_-]+$"
|
|
24
|
+
},
|
|
25
|
+
"additionalProperties": {
|
|
26
|
+
"$ref": "#/$defs/role"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"runtimes": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"minProperties": 1,
|
|
32
|
+
"additionalProperties": {
|
|
33
|
+
"$ref": "#/$defs/runtime"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"routing": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"additionalProperties": {
|
|
39
|
+
"$ref": "#/$defs/route_phase"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"gates": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"additionalProperties": {
|
|
45
|
+
"$ref": "#/$defs/gate"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"hooks": {
|
|
49
|
+
"type": "object"
|
|
50
|
+
},
|
|
51
|
+
"notifications": {
|
|
52
|
+
"type": "object"
|
|
53
|
+
},
|
|
54
|
+
"schedules": {
|
|
55
|
+
"type": "object"
|
|
56
|
+
},
|
|
57
|
+
"budget": {
|
|
58
|
+
"type": "object"
|
|
59
|
+
},
|
|
60
|
+
"policies": {
|
|
61
|
+
"type": ["array", "object"]
|
|
62
|
+
},
|
|
63
|
+
"approval_policy": {
|
|
64
|
+
"type": ["object", "null"]
|
|
65
|
+
},
|
|
66
|
+
"timeouts": {
|
|
67
|
+
"type": ["object", "null"]
|
|
68
|
+
},
|
|
69
|
+
"workflow_kit": {
|
|
70
|
+
"type": "object"
|
|
71
|
+
},
|
|
72
|
+
"retention": {
|
|
73
|
+
"type": "object"
|
|
74
|
+
},
|
|
75
|
+
"rules": {
|
|
76
|
+
"type": "object"
|
|
77
|
+
},
|
|
78
|
+
"prompts": {
|
|
79
|
+
"type": "object",
|
|
80
|
+
"additionalProperties": {
|
|
81
|
+
"type": "string"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"files": {
|
|
85
|
+
"type": "object"
|
|
86
|
+
},
|
|
87
|
+
"run_loop": {
|
|
88
|
+
"type": "object"
|
|
89
|
+
},
|
|
90
|
+
"mission_planner": {
|
|
91
|
+
"type": "object"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"additionalProperties": true,
|
|
95
|
+
"$defs": {
|
|
96
|
+
"non_empty_string": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"minLength": 1
|
|
99
|
+
},
|
|
100
|
+
"string_array": {
|
|
101
|
+
"type": "array",
|
|
102
|
+
"items": {
|
|
103
|
+
"type": "string"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"command_value": {
|
|
107
|
+
"oneOf": [
|
|
108
|
+
{
|
|
109
|
+
"type": "string",
|
|
110
|
+
"minLength": 1
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"type": "array",
|
|
114
|
+
"minItems": 1,
|
|
115
|
+
"items": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"minLength": 1
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
"runtime_capabilities": {
|
|
123
|
+
"type": "object",
|
|
124
|
+
"properties": {
|
|
125
|
+
"can_write_files": {
|
|
126
|
+
"enum": ["direct", "proposal_only", "tool_defined", "unknown"]
|
|
127
|
+
},
|
|
128
|
+
"proposal_support": {
|
|
129
|
+
"enum": ["none", "optional", "native", "tool_defined", "unknown"]
|
|
130
|
+
},
|
|
131
|
+
"workflow_artifact_ownership": {
|
|
132
|
+
"enum": ["yes", "no", "proposal_apply_required", "tool_defined", "unknown"]
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"additionalProperties": false
|
|
136
|
+
},
|
|
137
|
+
"project": {
|
|
138
|
+
"type": "object",
|
|
139
|
+
"required": ["id", "name"],
|
|
140
|
+
"properties": {
|
|
141
|
+
"id": {
|
|
142
|
+
"$ref": "#/$defs/non_empty_string"
|
|
143
|
+
},
|
|
144
|
+
"name": {
|
|
145
|
+
"$ref": "#/$defs/non_empty_string"
|
|
146
|
+
},
|
|
147
|
+
"goal": {
|
|
148
|
+
"type": "string",
|
|
149
|
+
"minLength": 1,
|
|
150
|
+
"maxLength": 500
|
|
151
|
+
},
|
|
152
|
+
"default_branch": {
|
|
153
|
+
"$ref": "#/$defs/non_empty_string"
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"additionalProperties": true
|
|
157
|
+
},
|
|
158
|
+
"role": {
|
|
159
|
+
"type": "object",
|
|
160
|
+
"required": ["title", "mandate", "write_authority", "runtime"],
|
|
161
|
+
"properties": {
|
|
162
|
+
"title": {
|
|
163
|
+
"$ref": "#/$defs/non_empty_string"
|
|
164
|
+
},
|
|
165
|
+
"mandate": {
|
|
166
|
+
"$ref": "#/$defs/non_empty_string"
|
|
167
|
+
},
|
|
168
|
+
"write_authority": {
|
|
169
|
+
"enum": ["authoritative", "proposed", "review_only"]
|
|
170
|
+
},
|
|
171
|
+
"decision_authority": {
|
|
172
|
+
"type": "integer",
|
|
173
|
+
"minimum": 0,
|
|
174
|
+
"maximum": 99
|
|
175
|
+
},
|
|
176
|
+
"runtime": {
|
|
177
|
+
"$ref": "#/$defs/non_empty_string",
|
|
178
|
+
"description": "Canonical raw config field. The reference runner normalizes this to runtime_id in memory."
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"additionalProperties": false
|
|
182
|
+
},
|
|
183
|
+
"route_phase": {
|
|
184
|
+
"type": "object",
|
|
185
|
+
"properties": {
|
|
186
|
+
"entry_role": {
|
|
187
|
+
"$ref": "#/$defs/non_empty_string"
|
|
188
|
+
},
|
|
189
|
+
"allowed_next_roles": {
|
|
190
|
+
"$ref": "#/$defs/string_array"
|
|
191
|
+
},
|
|
192
|
+
"exit_gate": {
|
|
193
|
+
"$ref": "#/$defs/non_empty_string"
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"additionalProperties": true
|
|
197
|
+
},
|
|
198
|
+
"gate": {
|
|
199
|
+
"type": "object",
|
|
200
|
+
"properties": {
|
|
201
|
+
"requires_files": {
|
|
202
|
+
"$ref": "#/$defs/string_array"
|
|
203
|
+
},
|
|
204
|
+
"requires_human_approval": {
|
|
205
|
+
"type": "boolean"
|
|
206
|
+
},
|
|
207
|
+
"requires_verification_pass": {
|
|
208
|
+
"type": "boolean"
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
"additionalProperties": true
|
|
212
|
+
},
|
|
213
|
+
"manual_runtime": {
|
|
214
|
+
"type": "object",
|
|
215
|
+
"required": ["type"],
|
|
216
|
+
"properties": {
|
|
217
|
+
"type": {
|
|
218
|
+
"const": "manual"
|
|
219
|
+
},
|
|
220
|
+
"capabilities": {
|
|
221
|
+
"$ref": "#/$defs/runtime_capabilities"
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
"additionalProperties": true
|
|
225
|
+
},
|
|
226
|
+
"local_cli_runtime": {
|
|
227
|
+
"type": "object",
|
|
228
|
+
"required": ["type", "command"],
|
|
229
|
+
"properties": {
|
|
230
|
+
"type": {
|
|
231
|
+
"const": "local_cli"
|
|
232
|
+
},
|
|
233
|
+
"command": {
|
|
234
|
+
"$ref": "#/$defs/command_value"
|
|
235
|
+
},
|
|
236
|
+
"args": {
|
|
237
|
+
"$ref": "#/$defs/string_array"
|
|
238
|
+
},
|
|
239
|
+
"cwd": {
|
|
240
|
+
"$ref": "#/$defs/non_empty_string"
|
|
241
|
+
},
|
|
242
|
+
"prompt_transport": {
|
|
243
|
+
"enum": ["argv", "stdin", "dispatch_bundle_only"]
|
|
244
|
+
},
|
|
245
|
+
"capabilities": {
|
|
246
|
+
"$ref": "#/$defs/runtime_capabilities"
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
"additionalProperties": true
|
|
250
|
+
},
|
|
251
|
+
"api_proxy_runtime": {
|
|
252
|
+
"type": "object",
|
|
253
|
+
"required": ["type", "provider", "model"],
|
|
254
|
+
"properties": {
|
|
255
|
+
"type": {
|
|
256
|
+
"const": "api_proxy"
|
|
257
|
+
},
|
|
258
|
+
"provider": {
|
|
259
|
+
"enum": ["anthropic", "openai", "google", "ollama"]
|
|
260
|
+
},
|
|
261
|
+
"model": {
|
|
262
|
+
"$ref": "#/$defs/non_empty_string"
|
|
263
|
+
},
|
|
264
|
+
"auth_env": {
|
|
265
|
+
"$ref": "#/$defs/non_empty_string"
|
|
266
|
+
},
|
|
267
|
+
"base_url": {
|
|
268
|
+
"$ref": "#/$defs/non_empty_string"
|
|
269
|
+
},
|
|
270
|
+
"context_window_tokens": {
|
|
271
|
+
"type": "integer",
|
|
272
|
+
"minimum": 1
|
|
273
|
+
},
|
|
274
|
+
"max_output_tokens": {
|
|
275
|
+
"type": "integer",
|
|
276
|
+
"minimum": 1
|
|
277
|
+
},
|
|
278
|
+
"retry_policy": {
|
|
279
|
+
"type": "object"
|
|
280
|
+
},
|
|
281
|
+
"preflight_tokenization": {
|
|
282
|
+
"type": "object"
|
|
283
|
+
},
|
|
284
|
+
"capabilities": {
|
|
285
|
+
"$ref": "#/$defs/runtime_capabilities"
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
"additionalProperties": true
|
|
289
|
+
},
|
|
290
|
+
"mcp_runtime": {
|
|
291
|
+
"type": "object",
|
|
292
|
+
"required": ["type"],
|
|
293
|
+
"properties": {
|
|
294
|
+
"type": {
|
|
295
|
+
"const": "mcp"
|
|
296
|
+
},
|
|
297
|
+
"transport": {
|
|
298
|
+
"enum": ["stdio", "streamable_http"]
|
|
299
|
+
},
|
|
300
|
+
"command": {
|
|
301
|
+
"$ref": "#/$defs/command_value"
|
|
302
|
+
},
|
|
303
|
+
"args": {
|
|
304
|
+
"$ref": "#/$defs/string_array"
|
|
305
|
+
},
|
|
306
|
+
"cwd": {
|
|
307
|
+
"$ref": "#/$defs/non_empty_string"
|
|
308
|
+
},
|
|
309
|
+
"url": {
|
|
310
|
+
"$ref": "#/$defs/non_empty_string"
|
|
311
|
+
},
|
|
312
|
+
"headers": {
|
|
313
|
+
"type": "object",
|
|
314
|
+
"additionalProperties": {
|
|
315
|
+
"type": "string"
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
"tool_name": {
|
|
319
|
+
"$ref": "#/$defs/non_empty_string"
|
|
320
|
+
},
|
|
321
|
+
"capabilities": {
|
|
322
|
+
"$ref": "#/$defs/runtime_capabilities"
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
"allOf": [
|
|
326
|
+
{
|
|
327
|
+
"if": {
|
|
328
|
+
"properties": {
|
|
329
|
+
"transport": {
|
|
330
|
+
"const": "streamable_http"
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
"required": ["transport"]
|
|
334
|
+
},
|
|
335
|
+
"then": {
|
|
336
|
+
"required": ["url"]
|
|
337
|
+
},
|
|
338
|
+
"else": {
|
|
339
|
+
"required": ["command"]
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
],
|
|
343
|
+
"additionalProperties": true
|
|
344
|
+
},
|
|
345
|
+
"remote_agent_runtime": {
|
|
346
|
+
"type": "object",
|
|
347
|
+
"required": ["type", "url"],
|
|
348
|
+
"properties": {
|
|
349
|
+
"type": {
|
|
350
|
+
"const": "remote_agent"
|
|
351
|
+
},
|
|
352
|
+
"url": {
|
|
353
|
+
"$ref": "#/$defs/non_empty_string"
|
|
354
|
+
},
|
|
355
|
+
"headers": {
|
|
356
|
+
"type": "object",
|
|
357
|
+
"additionalProperties": {
|
|
358
|
+
"type": "string"
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
"timeout_ms": {
|
|
362
|
+
"type": "integer",
|
|
363
|
+
"minimum": 1
|
|
364
|
+
},
|
|
365
|
+
"capabilities": {
|
|
366
|
+
"$ref": "#/$defs/runtime_capabilities"
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
"additionalProperties": true
|
|
370
|
+
},
|
|
371
|
+
"runtime": {
|
|
372
|
+
"oneOf": [
|
|
373
|
+
{
|
|
374
|
+
"$ref": "#/$defs/manual_runtime"
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
"$ref": "#/$defs/local_cli_runtime"
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
"$ref": "#/$defs/api_proxy_runtime"
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"$ref": "#/$defs/mcp_runtime"
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
"$ref": "#/$defs/remote_agent_runtime"
|
|
387
|
+
}
|
|
388
|
+
]
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://agentxchain.dev/schemas/connector-capabilities-output.schema.json",
|
|
4
|
+
"title": "AgentXchain Connector Capabilities Output",
|
|
5
|
+
"description": "Output schema for `connector capabilities [runtime_id] --json`. Covers single-runtime, multi-runtime (--all), and error responses.",
|
|
6
|
+
"oneOf": [
|
|
7
|
+
{ "$ref": "#/$defs/single_runtime_response" },
|
|
8
|
+
{ "$ref": "#/$defs/multi_runtime_response" },
|
|
9
|
+
{ "$ref": "#/$defs/error_response" }
|
|
10
|
+
],
|
|
11
|
+
"$defs": {
|
|
12
|
+
"write_capability": {
|
|
13
|
+
"enum": ["direct", "proposal_only", "tool_defined", "unknown"]
|
|
14
|
+
},
|
|
15
|
+
"proposal_capability": {
|
|
16
|
+
"enum": ["none", "optional", "native", "tool_defined", "unknown"]
|
|
17
|
+
},
|
|
18
|
+
"ownership_capability": {
|
|
19
|
+
"enum": ["yes", "no", "proposal_apply_required", "tool_defined", "unknown"]
|
|
20
|
+
},
|
|
21
|
+
"merged_contract": {
|
|
22
|
+
"type": "object",
|
|
23
|
+
"required": ["runtime_type", "transport", "can_write_files", "proposal_support", "requires_local_binary", "workflow_artifact_ownership"],
|
|
24
|
+
"properties": {
|
|
25
|
+
"runtime_type": { "type": "string" },
|
|
26
|
+
"transport": { "type": "string" },
|
|
27
|
+
"can_write_files": { "$ref": "#/$defs/write_capability" },
|
|
28
|
+
"review_only_behavior": { "type": "string" },
|
|
29
|
+
"proposal_support": { "$ref": "#/$defs/proposal_capability" },
|
|
30
|
+
"requires_local_binary": { "type": "boolean" },
|
|
31
|
+
"workflow_artifact_ownership": { "$ref": "#/$defs/ownership_capability" }
|
|
32
|
+
},
|
|
33
|
+
"additionalProperties": false
|
|
34
|
+
},
|
|
35
|
+
"declared_capabilities": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"properties": {
|
|
38
|
+
"can_write_files": { "$ref": "#/$defs/write_capability" },
|
|
39
|
+
"proposal_support": { "$ref": "#/$defs/proposal_capability" },
|
|
40
|
+
"workflow_artifact_ownership": { "$ref": "#/$defs/ownership_capability" }
|
|
41
|
+
},
|
|
42
|
+
"additionalProperties": false
|
|
43
|
+
},
|
|
44
|
+
"role_binding": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"required": ["role_id", "role_write_authority", "effective_write_path", "workflow_artifact_ownership", "notes"],
|
|
47
|
+
"properties": {
|
|
48
|
+
"role_id": { "type": "string" },
|
|
49
|
+
"role_write_authority": {
|
|
50
|
+
"enum": ["authoritative", "proposed", "review_only", "unknown"]
|
|
51
|
+
},
|
|
52
|
+
"effective_write_path": { "type": "string" },
|
|
53
|
+
"workflow_artifact_ownership": { "type": "string" },
|
|
54
|
+
"notes": {
|
|
55
|
+
"type": "array",
|
|
56
|
+
"items": { "type": "string" }
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"additionalProperties": false
|
|
60
|
+
},
|
|
61
|
+
"single_runtime_response": {
|
|
62
|
+
"type": "object",
|
|
63
|
+
"required": ["runtime_id", "runtime_type", "declared_capabilities", "merged_contract", "declaration_warnings", "role_bindings"],
|
|
64
|
+
"properties": {
|
|
65
|
+
"runtime_id": { "type": "string" },
|
|
66
|
+
"runtime_type": { "type": "string" },
|
|
67
|
+
"declared_capabilities": { "$ref": "#/$defs/declared_capabilities" },
|
|
68
|
+
"merged_contract": { "$ref": "#/$defs/merged_contract" },
|
|
69
|
+
"declaration_warnings": {
|
|
70
|
+
"type": "array",
|
|
71
|
+
"items": { "type": "string" }
|
|
72
|
+
},
|
|
73
|
+
"role_bindings": {
|
|
74
|
+
"type": "array",
|
|
75
|
+
"items": { "$ref": "#/$defs/role_binding" }
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"additionalProperties": false
|
|
79
|
+
},
|
|
80
|
+
"multi_runtime_response": {
|
|
81
|
+
"type": "object",
|
|
82
|
+
"required": ["runtimes"],
|
|
83
|
+
"properties": {
|
|
84
|
+
"runtimes": {
|
|
85
|
+
"type": "array",
|
|
86
|
+
"items": { "$ref": "#/$defs/single_runtime_response" }
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"additionalProperties": false
|
|
90
|
+
},
|
|
91
|
+
"error_response": {
|
|
92
|
+
"type": "object",
|
|
93
|
+
"required": ["error"],
|
|
94
|
+
"properties": {
|
|
95
|
+
"error": { "type": "string" },
|
|
96
|
+
"available_runtimes": {
|
|
97
|
+
"type": "array",
|
|
98
|
+
"items": { "type": "string" }
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"additionalProperties": false
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|