a2a-codex 1.6.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/README.md +451 -0
- package/agents/example/config.json +66 -0
- package/agents/example/start.sh +39 -0
- package/agents/example/workspace/.gitkeep +0 -0
- package/agents/multi-agent/config.json +77 -0
- package/agents/multi-agent/start.sh +36 -0
- package/agents/multi-agent/workspace/.gitkeep +0 -0
- package/agents/read-only-reviewer/config.json +50 -0
- package/agents/read-only-reviewer/start.sh +32 -0
- package/agents/read-only-reviewer/workspace/.gitkeep +0 -0
- package/dist/cli.d.ts +17 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +175 -0
- package/dist/cli.js.map +1 -0
- package/dist/codex/backend-paths.d.ts +12 -0
- package/dist/codex/backend-paths.d.ts.map +1 -0
- package/dist/codex/backend-paths.js +14 -0
- package/dist/codex/backend-paths.js.map +1 -0
- package/dist/codex/capabilities.d.ts +21 -0
- package/dist/codex/capabilities.d.ts.map +1 -0
- package/dist/codex/capabilities.js +16 -0
- package/dist/codex/capabilities.js.map +1 -0
- package/dist/codex/client-factory.d.ts +65 -0
- package/dist/codex/client-factory.d.ts.map +1 -0
- package/dist/codex/client-factory.js +36 -0
- package/dist/codex/client-factory.js.map +1 -0
- package/dist/codex/event-mapper.d.ts +33 -0
- package/dist/codex/event-mapper.d.ts.map +1 -0
- package/dist/codex/event-mapper.js +248 -0
- package/dist/codex/event-mapper.js.map +1 -0
- package/dist/codex/executor.d.ts +29 -0
- package/dist/codex/executor.d.ts.map +1 -0
- package/dist/codex/executor.js +282 -0
- package/dist/codex/executor.js.map +1 -0
- package/dist/codex/index.d.ts +8 -0
- package/dist/codex/index.d.ts.map +1 -0
- package/dist/codex/index.js +7 -0
- package/dist/codex/index.js.map +1 -0
- package/dist/codex/mcp-adapter.d.ts +29 -0
- package/dist/codex/mcp-adapter.d.ts.map +1 -0
- package/dist/codex/mcp-adapter.js +104 -0
- package/dist/codex/mcp-adapter.js.map +1 -0
- package/dist/codex/prompt-builder.d.ts +9 -0
- package/dist/codex/prompt-builder.d.ts.map +1 -0
- package/dist/codex/prompt-builder.js +16 -0
- package/dist/codex/prompt-builder.js.map +1 -0
- package/dist/codex/session-manager.d.ts +54 -0
- package/dist/codex/session-manager.d.ts.map +1 -0
- package/dist/codex/session-manager.js +124 -0
- package/dist/codex/session-manager.js.map +1 -0
- package/dist/config/defaults.d.ts +9 -0
- package/dist/config/defaults.d.ts.map +1 -0
- package/dist/config/defaults.js +60 -0
- package/dist/config/defaults.js.map +1 -0
- package/dist/config/loader.d.ts +16 -0
- package/dist/config/loader.d.ts.map +1 -0
- package/dist/config/loader.js +152 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/config/types.d.ts +224 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/config/types.js +8 -0
- package/dist/config/types.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/server/agent-card.d.ts +7 -0
- package/dist/server/agent-card.d.ts.map +1 -0
- package/dist/server/agent-card.js +20 -0
- package/dist/server/agent-card.js.map +1 -0
- package/dist/server/index.d.ts +22 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +123 -0
- package/dist/server/index.js.map +1 -0
- package/dist/utils/logger.d.ts +30 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +64 -0
- package/dist/utils/logger.js.map +1 -0
- package/package.json +73 -0
- package/schemas/agent-config.schema.json +615 -0
|
@@ -0,0 +1,615 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$ref": "#/definitions/AgentConfig",
|
|
3
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
|
+
"definitions": {
|
|
5
|
+
"AgentCardConfig": {
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"description": "Agent identity and capabilities advertised via the A2A Agent Card.",
|
|
8
|
+
"properties": {
|
|
9
|
+
"defaultInputModes": {
|
|
10
|
+
"description": "Supported input modes (default: [\"text\"])",
|
|
11
|
+
"items": {
|
|
12
|
+
"type": "string"
|
|
13
|
+
},
|
|
14
|
+
"type": "array"
|
|
15
|
+
},
|
|
16
|
+
"defaultOutputModes": {
|
|
17
|
+
"description": "Supported output modes (default: [\"text\"])",
|
|
18
|
+
"items": {
|
|
19
|
+
"type": "string"
|
|
20
|
+
},
|
|
21
|
+
"type": "array"
|
|
22
|
+
},
|
|
23
|
+
"description": {
|
|
24
|
+
"description": "Agent description (shown to orchestrators / callers)",
|
|
25
|
+
"type": "string"
|
|
26
|
+
},
|
|
27
|
+
"name": {
|
|
28
|
+
"description": "Human-readable agent name",
|
|
29
|
+
"type": "string"
|
|
30
|
+
},
|
|
31
|
+
"protocolVersion": {
|
|
32
|
+
"description": "Protocol version (default: \"0.3.0\")",
|
|
33
|
+
"type": "string"
|
|
34
|
+
},
|
|
35
|
+
"provider": {
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"description": "Agent provider info",
|
|
38
|
+
"properties": {
|
|
39
|
+
"organization": {
|
|
40
|
+
"type": "string"
|
|
41
|
+
},
|
|
42
|
+
"url": {
|
|
43
|
+
"type": "string"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"required": [
|
|
47
|
+
"organization"
|
|
48
|
+
],
|
|
49
|
+
"type": "object"
|
|
50
|
+
},
|
|
51
|
+
"pushNotifications": {
|
|
52
|
+
"description": "Enable push notifications (default: false)",
|
|
53
|
+
"type": "boolean"
|
|
54
|
+
},
|
|
55
|
+
"skills": {
|
|
56
|
+
"description": "Skills this agent exposes",
|
|
57
|
+
"items": {
|
|
58
|
+
"$ref": "#/definitions/SkillConfig"
|
|
59
|
+
},
|
|
60
|
+
"type": "array"
|
|
61
|
+
},
|
|
62
|
+
"stateTransitionHistory": {
|
|
63
|
+
"deprecated": "This capability is not implemented in the A2A v1.0 spec and\nwas removed. Kept for backward compatibility only \u2014 value is ignored.\nDefault: false.",
|
|
64
|
+
"description": "Enable state transition history capability advertisement.",
|
|
65
|
+
"type": "boolean"
|
|
66
|
+
},
|
|
67
|
+
"streaming": {
|
|
68
|
+
"description": "Enable streaming capability (default: true)",
|
|
69
|
+
"type": "boolean"
|
|
70
|
+
},
|
|
71
|
+
"version": {
|
|
72
|
+
"description": "Agent software version (default: \"1.0.0\")",
|
|
73
|
+
"type": "string"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"required": [
|
|
77
|
+
"name",
|
|
78
|
+
"description"
|
|
79
|
+
],
|
|
80
|
+
"type": "object"
|
|
81
|
+
},
|
|
82
|
+
"AgentConfig": {
|
|
83
|
+
"additionalProperties": false,
|
|
84
|
+
"description": "Complete agent configuration for a2a-codex.\n\nThis is what a JSON config file (e.g. `agents/example/config.json`) maps to. All fields except `agentCard` are optional \u2014 sensible secure defaults are applied for everything.",
|
|
85
|
+
"properties": {
|
|
86
|
+
"agentCard": {
|
|
87
|
+
"$ref": "#/definitions/AgentCardConfig",
|
|
88
|
+
"description": "Agent card identity & capabilities"
|
|
89
|
+
},
|
|
90
|
+
"codex": {
|
|
91
|
+
"$ref": "#/definitions/CodexConfig",
|
|
92
|
+
"description": "OpenAI Codex SDK connection and execution settings"
|
|
93
|
+
},
|
|
94
|
+
"server": {
|
|
95
|
+
"$ref": "#/definitions/ServerConfig",
|
|
96
|
+
"description": "Network / server settings"
|
|
97
|
+
},
|
|
98
|
+
"session": {
|
|
99
|
+
"$ref": "#/definitions/SessionConfig",
|
|
100
|
+
"description": "Session management"
|
|
101
|
+
},
|
|
102
|
+
"features": {
|
|
103
|
+
"$ref": "#/definitions/FeatureFlags",
|
|
104
|
+
"description": "Feature flags"
|
|
105
|
+
},
|
|
106
|
+
"timeouts": {
|
|
107
|
+
"$ref": "#/definitions/TimeoutConfig",
|
|
108
|
+
"description": "Timeout settings"
|
|
109
|
+
},
|
|
110
|
+
"logging": {
|
|
111
|
+
"$ref": "#/definitions/LoggingConfig",
|
|
112
|
+
"description": "Logging settings"
|
|
113
|
+
},
|
|
114
|
+
"mcp": {
|
|
115
|
+
"additionalProperties": {
|
|
116
|
+
"$ref": "#/definitions/McpServerConfig"
|
|
117
|
+
},
|
|
118
|
+
"description": "MCP servers to register with Codex at startup. Keys are server names; values are stdio or http server configs. The key \"a2a-subagents\" is reserved for the sub-agent bridge.",
|
|
119
|
+
"type": "object"
|
|
120
|
+
},
|
|
121
|
+
"events": {
|
|
122
|
+
"$ref": "#/definitions/EventsConfig",
|
|
123
|
+
"description": "Event transport configuration for sideband observability events."
|
|
124
|
+
},
|
|
125
|
+
"memory": {
|
|
126
|
+
"$ref": "#/definitions/MemoryConfig",
|
|
127
|
+
"description": "Optional memory configuration for persisting instructions and skills. When present, the materializer writes these to backend-specific paths in the workspace directory during executor initialization."
|
|
128
|
+
},
|
|
129
|
+
"subAgents": {
|
|
130
|
+
"$ref": "#/definitions/SubAgentsConfig",
|
|
131
|
+
"description": "Optional sub-agents to expose as MCP tools via the `a2a-mcp-skillmap` bridge. When present, the parent agent spawns skillmap as a stdio MCP server and registers it under the reserved `a2a-subagents` key in the resolved {@link mcp } map. Sub-agents declared here become callable as ordinary MCP tools by the Codex runtime.\n\nWhen this field is absent or `agents` is empty, the parent skips every sub-agent code path with no side effects."
|
|
132
|
+
},
|
|
133
|
+
"configDir": {
|
|
134
|
+
"description": "Directory containing the agent's config.json file. Populated automatically by the CLI scaffold when a config file path is provided. Used by the materializer for resolving relative paths in memory config.",
|
|
135
|
+
"type": "string"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"required": [
|
|
139
|
+
"agentCard"
|
|
140
|
+
],
|
|
141
|
+
"type": "object"
|
|
142
|
+
},
|
|
143
|
+
"EventsConfig": {
|
|
144
|
+
"additionalProperties": false,
|
|
145
|
+
"description": "Event transport configuration for sideband observability events.\n\nControls how trace events (MCP tool calls, agent reasoning, lifecycle) are delivered. Only the two built-in transports are configurable via JSON config \u2014 for custom transports (Kafka, Redis, DB, etc.), use the programmatic API and pass a transport function to `createA2AServer()`.",
|
|
146
|
+
"properties": {
|
|
147
|
+
"enabled": {
|
|
148
|
+
"default": true,
|
|
149
|
+
"description": "Enable event emission.",
|
|
150
|
+
"type": "boolean"
|
|
151
|
+
},
|
|
152
|
+
"httpHeaders": {
|
|
153
|
+
"additionalProperties": {
|
|
154
|
+
"type": "string"
|
|
155
|
+
},
|
|
156
|
+
"description": "Custom HTTP headers sent with every event POST. Useful for authentication tokens: ```json { \"Authorization\": \"Bearer ${CORTEX_TOKEN}\" } ```",
|
|
157
|
+
"type": "object"
|
|
158
|
+
},
|
|
159
|
+
"httpTimeout": {
|
|
160
|
+
"default": "10_000",
|
|
161
|
+
"description": "HTTP request timeout in milliseconds for the `\"http\"` transport.",
|
|
162
|
+
"type": "number"
|
|
163
|
+
},
|
|
164
|
+
"httpUrl": {
|
|
165
|
+
"description": "HTTP endpoint URL for the `\"http\"` transport. Required when `transport` is `\"http\"`.",
|
|
166
|
+
"type": "string"
|
|
167
|
+
},
|
|
168
|
+
"transport": {
|
|
169
|
+
"default": "a2a",
|
|
170
|
+
"description": "Built-in transport type.\n\n- `\"a2a\"` \u2014 publish as sideband trace artifacts on the A2A ExecutionEventBus (default, zero dependencies).\n- `\"http\"` \u2014 POST events as JSON to {@link httpUrl } .\n\nFor custom transports, leave this unset and provide a transport function via the programmatic `createA2AServer()` API.",
|
|
171
|
+
"enum": [
|
|
172
|
+
"a2a",
|
|
173
|
+
"http"
|
|
174
|
+
],
|
|
175
|
+
"type": "string"
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"type": "object"
|
|
179
|
+
},
|
|
180
|
+
"FeatureFlags": {
|
|
181
|
+
"additionalProperties": false,
|
|
182
|
+
"description": "Feature toggles for runtime behavior.",
|
|
183
|
+
"properties": {
|
|
184
|
+
"streamArtifactChunks": {
|
|
185
|
+
"description": "Stream artifact chunks individually (A2A spec-correct) vs buffer and send single artifact (inspector-compatible). Default: false (buffered).",
|
|
186
|
+
"type": "boolean"
|
|
187
|
+
},
|
|
188
|
+
"emitReasoningSummaries": {
|
|
189
|
+
"description": "Publish reasoning summaries as thinking sideband events (default: true).",
|
|
190
|
+
"type": "boolean"
|
|
191
|
+
},
|
|
192
|
+
"emitCommandEvents": {
|
|
193
|
+
"description": "Publish shell command start/end as tool_call sideband events (default: true).",
|
|
194
|
+
"type": "boolean"
|
|
195
|
+
},
|
|
196
|
+
"emitFileChangeEvents": {
|
|
197
|
+
"description": "Publish file change metadata as decision sideband events (default: true).",
|
|
198
|
+
"type": "boolean"
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"type": "object"
|
|
202
|
+
},
|
|
203
|
+
"LoggingConfig": {
|
|
204
|
+
"additionalProperties": false,
|
|
205
|
+
"description": "Logging settings.",
|
|
206
|
+
"properties": {
|
|
207
|
+
"level": {
|
|
208
|
+
"description": "Log level: \"debug\" | \"info\" | \"warn\" | \"error\" (default: \"info\")",
|
|
209
|
+
"type": "string"
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
"type": "object"
|
|
213
|
+
},
|
|
214
|
+
"McpHttpServerConfig": {
|
|
215
|
+
"additionalProperties": false,
|
|
216
|
+
"description": "Configuration for an MCP server connected via HTTP (streamable).",
|
|
217
|
+
"properties": {
|
|
218
|
+
"enabled": {
|
|
219
|
+
"description": "Enable on startup (default: true)",
|
|
220
|
+
"type": "boolean"
|
|
221
|
+
},
|
|
222
|
+
"headers": {
|
|
223
|
+
"additionalProperties": {
|
|
224
|
+
"type": "string"
|
|
225
|
+
},
|
|
226
|
+
"description": "Optional HTTP headers sent with every request to this server. Use for auth tokens, API keys, etc. Values support `${ENV_VAR}` (or `$ENV_VAR`) substitution so secrets stay out of config.json \u2014 e.g. `{ \"Authorization\": \"Bearer ${LINEAR_API_KEY}\" }`.",
|
|
227
|
+
"type": "object"
|
|
228
|
+
},
|
|
229
|
+
"type": {
|
|
230
|
+
"const": "http",
|
|
231
|
+
"type": "string"
|
|
232
|
+
},
|
|
233
|
+
"url": {
|
|
234
|
+
"description": "URL of the remote MCP server (e.g. http://127.0.0.1:8002/mcp)",
|
|
235
|
+
"type": "string"
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
"required": [
|
|
239
|
+
"type",
|
|
240
|
+
"url"
|
|
241
|
+
],
|
|
242
|
+
"type": "object"
|
|
243
|
+
},
|
|
244
|
+
"McpServerConfig": {
|
|
245
|
+
"anyOf": [
|
|
246
|
+
{
|
|
247
|
+
"$ref": "#/definitions/McpHttpServerConfig"
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"$ref": "#/definitions/McpStdioServerConfig"
|
|
251
|
+
}
|
|
252
|
+
],
|
|
253
|
+
"description": "MCP server configuration. Only stdio and http (Streamable HTTP) transports are supported. SSE-only servers are not supported \u2014 use http or stdio instead."
|
|
254
|
+
},
|
|
255
|
+
"McpStdioServerConfig": {
|
|
256
|
+
"additionalProperties": false,
|
|
257
|
+
"description": "Configuration for a stdio-based MCP server.",
|
|
258
|
+
"properties": {
|
|
259
|
+
"args": {
|
|
260
|
+
"description": "Arguments to pass to the command. Values support `${ENV_VAR}` (or `$ENV_VAR`) substitution.",
|
|
261
|
+
"items": {
|
|
262
|
+
"type": "string"
|
|
263
|
+
},
|
|
264
|
+
"type": "array"
|
|
265
|
+
},
|
|
266
|
+
"command": {
|
|
267
|
+
"description": "Command to launch the MCP server",
|
|
268
|
+
"type": "string"
|
|
269
|
+
},
|
|
270
|
+
"enabled": {
|
|
271
|
+
"description": "Enable on startup (default: true)",
|
|
272
|
+
"type": "boolean"
|
|
273
|
+
},
|
|
274
|
+
"env": {
|
|
275
|
+
"additionalProperties": {
|
|
276
|
+
"type": "string"
|
|
277
|
+
},
|
|
278
|
+
"description": "Environment variables for the spawned process. Values support `${ENV_VAR}` (or `$ENV_VAR`) substitution so secrets stay out of config.json \u2014 e.g. `{ \"API_KEY\": \"${MY_API_KEY}\" }`.",
|
|
279
|
+
"type": "object"
|
|
280
|
+
},
|
|
281
|
+
"type": {
|
|
282
|
+
"const": "stdio",
|
|
283
|
+
"type": "string"
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
"required": [
|
|
287
|
+
"type",
|
|
288
|
+
"command"
|
|
289
|
+
],
|
|
290
|
+
"type": "object"
|
|
291
|
+
},
|
|
292
|
+
"MemoryConfig": {
|
|
293
|
+
"additionalProperties": false,
|
|
294
|
+
"description": "Optional memory configuration section in agent config.json.\n\nDeclares instructions and skills to materialize into the agent's workspace at startup. Both fields are optional \u2014 operators can declare instructions only, skills only, or both.\n\nPaths are resolved relative to the directory containing config.json (Config_Directory) unless they are absolute.",
|
|
295
|
+
"properties": {
|
|
296
|
+
"instructions": {
|
|
297
|
+
"description": "Path to a markdown instructions file. Resolved relative to Config_Directory when relative, used as-is when absolute.",
|
|
298
|
+
"type": "string"
|
|
299
|
+
},
|
|
300
|
+
"skills": {
|
|
301
|
+
"description": "Paths to skill directories, each containing a SKILL.md file. Resolved relative to Config_Directory when relative, used as-is when absolute.",
|
|
302
|
+
"items": {
|
|
303
|
+
"type": "string"
|
|
304
|
+
},
|
|
305
|
+
"type": "array"
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
"type": "object"
|
|
309
|
+
},
|
|
310
|
+
"ServerConfig": {
|
|
311
|
+
"additionalProperties": false,
|
|
312
|
+
"description": "Network and server settings.",
|
|
313
|
+
"properties": {
|
|
314
|
+
"advertiseHost": {
|
|
315
|
+
"description": "Hostname advertised in agent card URLs (default: \"localhost\"). Set to machine IP or \"host.containers.internal\" for Docker.",
|
|
316
|
+
"type": "string"
|
|
317
|
+
},
|
|
318
|
+
"advertiseProtocol": {
|
|
319
|
+
"description": "Protocol used in advertised URLs (default: \"http\"). Set to \"https\" when the agent is deployed behind TLS or a TLS-terminating reverse proxy. The A2A spec requires HTTPS for production deployments.",
|
|
320
|
+
"enum": [
|
|
321
|
+
"http",
|
|
322
|
+
"https"
|
|
323
|
+
],
|
|
324
|
+
"type": "string"
|
|
325
|
+
},
|
|
326
|
+
"hostname": {
|
|
327
|
+
"description": "Bind address (default: \"0.0.0.0\")",
|
|
328
|
+
"type": "string"
|
|
329
|
+
},
|
|
330
|
+
"port": {
|
|
331
|
+
"description": "A2A server port (default: 3000)",
|
|
332
|
+
"type": "number"
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
"type": "object"
|
|
336
|
+
},
|
|
337
|
+
"SessionConfig": {
|
|
338
|
+
"additionalProperties": false,
|
|
339
|
+
"description": "Session lifecycle management.",
|
|
340
|
+
"properties": {
|
|
341
|
+
"cleanupInterval": {
|
|
342
|
+
"description": "Session cleanup interval in ms (default: 300_000 = 5 min)",
|
|
343
|
+
"type": "number"
|
|
344
|
+
},
|
|
345
|
+
"reuseByContext": {
|
|
346
|
+
"description": "Reuse sessions by A2A contextId (default: true)",
|
|
347
|
+
"type": "boolean"
|
|
348
|
+
},
|
|
349
|
+
"titlePrefix": {
|
|
350
|
+
"description": "Session title prefix (default: \"A2A Session\")",
|
|
351
|
+
"type": "string"
|
|
352
|
+
},
|
|
353
|
+
"ttl": {
|
|
354
|
+
"description": "Session TTL in ms (default: 3_600_000 = 1 hour)",
|
|
355
|
+
"type": "number"
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
"type": "object"
|
|
359
|
+
},
|
|
360
|
+
"SkillConfig": {
|
|
361
|
+
"additionalProperties": false,
|
|
362
|
+
"description": "A single skill exposed on the agent card.",
|
|
363
|
+
"properties": {
|
|
364
|
+
"description": {
|
|
365
|
+
"type": "string"
|
|
366
|
+
},
|
|
367
|
+
"examples": {
|
|
368
|
+
"items": {
|
|
369
|
+
"type": "string"
|
|
370
|
+
},
|
|
371
|
+
"type": "array"
|
|
372
|
+
},
|
|
373
|
+
"id": {
|
|
374
|
+
"type": "string"
|
|
375
|
+
},
|
|
376
|
+
"name": {
|
|
377
|
+
"type": "string"
|
|
378
|
+
},
|
|
379
|
+
"tags": {
|
|
380
|
+
"items": {
|
|
381
|
+
"type": "string"
|
|
382
|
+
},
|
|
383
|
+
"type": "array"
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
"required": [
|
|
387
|
+
"id",
|
|
388
|
+
"name",
|
|
389
|
+
"description"
|
|
390
|
+
],
|
|
391
|
+
"type": "object"
|
|
392
|
+
},
|
|
393
|
+
"SubAgentAuthConfig": {
|
|
394
|
+
"anyOf": [
|
|
395
|
+
{
|
|
396
|
+
"additionalProperties": false,
|
|
397
|
+
"properties": {
|
|
398
|
+
"mode": {
|
|
399
|
+
"const": "none",
|
|
400
|
+
"type": "string"
|
|
401
|
+
}
|
|
402
|
+
},
|
|
403
|
+
"required": [
|
|
404
|
+
"mode"
|
|
405
|
+
],
|
|
406
|
+
"type": "object"
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
"additionalProperties": false,
|
|
410
|
+
"properties": {
|
|
411
|
+
"mode": {
|
|
412
|
+
"const": "bearer",
|
|
413
|
+
"type": "string"
|
|
414
|
+
},
|
|
415
|
+
"token": {
|
|
416
|
+
"type": "string"
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
"required": [
|
|
420
|
+
"mode",
|
|
421
|
+
"token"
|
|
422
|
+
],
|
|
423
|
+
"type": "object"
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
"additionalProperties": false,
|
|
427
|
+
"properties": {
|
|
428
|
+
"headerName": {
|
|
429
|
+
"type": "string"
|
|
430
|
+
},
|
|
431
|
+
"mode": {
|
|
432
|
+
"const": "api_key",
|
|
433
|
+
"type": "string"
|
|
434
|
+
},
|
|
435
|
+
"token": {
|
|
436
|
+
"type": "string"
|
|
437
|
+
}
|
|
438
|
+
},
|
|
439
|
+
"required": [
|
|
440
|
+
"mode",
|
|
441
|
+
"token"
|
|
442
|
+
],
|
|
443
|
+
"type": "object"
|
|
444
|
+
}
|
|
445
|
+
],
|
|
446
|
+
"description": "Outbound credentials the bridge presents when calling a remote A2A sub-agent. Forwarded verbatim into the bridge config consumed by `a2a-mcp-skillmap`.\n\n`mode: \"none\"` is equivalent to omitting the `auth` field entirely and produces no auth block in the generated bridge config.\n\nFor `mode: \"api_key\"`, the optional `headerName` defaults to whatever `a2a-mcp-skillmap` uses (typically `X-API-Key`).\n\nTokens may reference environment variables via `${VAR_NAME}` syntax; the substitution happens during validation and missing variables cause the auth block to be omitted with a warning."
|
|
447
|
+
},
|
|
448
|
+
"SubAgentConfig": {
|
|
449
|
+
"additionalProperties": false,
|
|
450
|
+
"description": "One remote A2A agent the parent will expose as MCP tools via the `a2a-mcp-skillmap` bridge.",
|
|
451
|
+
"properties": {
|
|
452
|
+
"agentCardUrl": {
|
|
453
|
+
"description": "URL of the sub-agent's A2A agent card. Required.\n\nTypically `https://<host>/.well-known/agent-card.json`, but any URL the bridge can probe is valid. Must use the `http:` or `https:` protocol.",
|
|
454
|
+
"type": "string"
|
|
455
|
+
},
|
|
456
|
+
"auth": {
|
|
457
|
+
"$ref": "#/definitions/SubAgentAuthConfig",
|
|
458
|
+
"description": "Outbound credentials the bridge presents when calling this sub-agent. Forwarded verbatim into the bridge config.\n\nOmitting this field is equivalent to `{ mode: \"none\" }`."
|
|
459
|
+
},
|
|
460
|
+
"endpointUrlOverride": {
|
|
461
|
+
"description": "Optional override for the URL the bridge probes. Useful when the agent card declares an endpoint that differs from where the agent is actually reachable (NAT, port-forward, internal vs external).\n\nWhen set, this URL is passed to the bridge instead of {@link agentCardUrl } . The bridge still resolves a card from this URL \u2014 point it at a card URL or a base URL it can probe under `/.well-known/`. Must use the `http:` or `https:` protocol.",
|
|
462
|
+
"type": "string"
|
|
463
|
+
},
|
|
464
|
+
"name": {
|
|
465
|
+
"description": "Stable identifier for this sub-agent. Becomes the prefix on generated MCP tool names (`{name}__{skillId}`). Required.\n\nAllowed characters: ASCII letters, digits, hyphens, and underscores (must match `/^[A-Za-z0-9_-]+$/`). Must be unique across all entries in the `subAgents.agents` array.",
|
|
466
|
+
"type": "string"
|
|
467
|
+
}
|
|
468
|
+
},
|
|
469
|
+
"required": [
|
|
470
|
+
"name",
|
|
471
|
+
"agentCardUrl"
|
|
472
|
+
],
|
|
473
|
+
"type": "object"
|
|
474
|
+
},
|
|
475
|
+
"SubAgentsConfig": {
|
|
476
|
+
"additionalProperties": false,
|
|
477
|
+
"description": "Top-level shape of the `subAgents` field merged into the agent's `BaseAgentConfig`.\n\nWhen this field is absent or `agents` is an empty array, the parent skips every sub-agent code path with no side effects (no bridge config written, no MCP entry injected).",
|
|
478
|
+
"properties": {
|
|
479
|
+
"agents": {
|
|
480
|
+
"description": "The list of remote A2A agents to expose as MCP tools.",
|
|
481
|
+
"items": {
|
|
482
|
+
"$ref": "#/definitions/SubAgentConfig"
|
|
483
|
+
},
|
|
484
|
+
"type": "array"
|
|
485
|
+
},
|
|
486
|
+
"options": {
|
|
487
|
+
"$ref": "#/definitions/SubAgentsOptions",
|
|
488
|
+
"description": "Optional bridge-wide knobs."
|
|
489
|
+
}
|
|
490
|
+
},
|
|
491
|
+
"required": [
|
|
492
|
+
"agents"
|
|
493
|
+
],
|
|
494
|
+
"type": "object"
|
|
495
|
+
},
|
|
496
|
+
"SubAgentsOptions": {
|
|
497
|
+
"additionalProperties": false,
|
|
498
|
+
"description": "Optional knobs that apply to the bridge process as a whole, not to any single sub-agent.",
|
|
499
|
+
"properties": {
|
|
500
|
+
"probeTimeoutMs": {
|
|
501
|
+
"description": "Probe timeout in milliseconds for the startup reachability check the parent performs against each sub-agent. Defaults to `5000` when unset.",
|
|
502
|
+
"type": "number"
|
|
503
|
+
},
|
|
504
|
+
"responseMode": {
|
|
505
|
+
"description": "Skillmap response shaping mode passed through to the bridge config. Defaults to `\"artifact\"` when unset.",
|
|
506
|
+
"enum": [
|
|
507
|
+
"structured",
|
|
508
|
+
"compact",
|
|
509
|
+
"artifact",
|
|
510
|
+
"raw"
|
|
511
|
+
],
|
|
512
|
+
"type": "string"
|
|
513
|
+
},
|
|
514
|
+
"syncBudgetMs": {
|
|
515
|
+
"description": "Sync budget in milliseconds passed to `a2a-mcp-skillmap` via the bridge config. Controls how long the bridge waits for an A2A agent to respond before switching to async task-handle mode.\n\nWhen the budget expires the bridge immediately returns a `taskId` to the MCP client; the A2A dispatch continues in the background. The LLM can then poll via the built-in `task_result` / `task_status` tools which actively re-query the remote agent before responding.\n\n- Set lower (e.g. `10000`) for interactive use where you want fast task-handle responses.\n- Set to `0` to wait indefinitely (no async fallback).\n- Defaults to `30000` (30 s) when unset \u2014 skillmap's own default.",
|
|
516
|
+
"type": "number"
|
|
517
|
+
}
|
|
518
|
+
},
|
|
519
|
+
"type": "object"
|
|
520
|
+
},
|
|
521
|
+
"TimeoutConfig": {
|
|
522
|
+
"additionalProperties": false,
|
|
523
|
+
"description": "Timeout settings.",
|
|
524
|
+
"properties": {
|
|
525
|
+
"prompt": {
|
|
526
|
+
"description": "Timeout for a single prompt in ms (default: 600_000 = 10 min)",
|
|
527
|
+
"type": "number"
|
|
528
|
+
}
|
|
529
|
+
},
|
|
530
|
+
"type": "object"
|
|
531
|
+
},
|
|
532
|
+
"CodexConfig": {
|
|
533
|
+
"additionalProperties": false,
|
|
534
|
+
"description": "OpenAI Codex SDK connection and execution settings.",
|
|
535
|
+
"properties": {
|
|
536
|
+
"workingDirectory": {
|
|
537
|
+
"description": "Absolute path to the Git repository Codex should operate on. Required at runtime. Supports ${WORKSPACE_DIR} and other ${ENV_VAR} substitution.",
|
|
538
|
+
"type": "string"
|
|
539
|
+
},
|
|
540
|
+
"model": {
|
|
541
|
+
"description": "Model to use (e.g. \"o4-mini\", \"o3\", \"gpt-4o\"). Falls back to Codex default when omitted. Supports ${CODEX_MODEL} substitution.",
|
|
542
|
+
"type": "string"
|
|
543
|
+
},
|
|
544
|
+
"sandboxMode": {
|
|
545
|
+
"description": "Codex sandbox mode controlling filesystem access.\n- \"read-only\" \u2014 analysis and review tasks; no file writes\n- \"workspace-write\" \u2014 recommended default; writes scoped to workingDirectory\n- \"danger-full-access\" \u2014 unrestricted; only use inside an isolated container or VM",
|
|
546
|
+
"enum": [
|
|
547
|
+
"read-only",
|
|
548
|
+
"workspace-write",
|
|
549
|
+
"danger-full-access"
|
|
550
|
+
],
|
|
551
|
+
"type": "string"
|
|
552
|
+
},
|
|
553
|
+
"approvalPolicy": {
|
|
554
|
+
"description": "Tool approval policy.\n- \"never\" \u2014 auto-approve all (default, required for headless A2A)\n- \"on-failure\" \u2014 approve only on command failure\n- \"untrusted\" \u2014 approve tools from untrusted sources\n- \"on-request\" \u2014 NOT SUPPORTED in headless A2A",
|
|
555
|
+
"enum": [
|
|
556
|
+
"never",
|
|
557
|
+
"on-failure",
|
|
558
|
+
"untrusted",
|
|
559
|
+
"on-request"
|
|
560
|
+
],
|
|
561
|
+
"type": "string"
|
|
562
|
+
},
|
|
563
|
+
"networkAccessEnabled": {
|
|
564
|
+
"description": "Allow Codex to make outbound network requests (default: false).",
|
|
565
|
+
"type": "boolean"
|
|
566
|
+
},
|
|
567
|
+
"webSearchMode": {
|
|
568
|
+
"description": "Web search access.\n- \"disabled\" \u2014 no web search (default)\n- \"cached\" \u2014 cached results only\n- \"live\" \u2014 live search (requires networkAccessEnabled: true)",
|
|
569
|
+
"enum": [
|
|
570
|
+
"disabled",
|
|
571
|
+
"cached",
|
|
572
|
+
"live"
|
|
573
|
+
],
|
|
574
|
+
"type": "string"
|
|
575
|
+
},
|
|
576
|
+
"skipGitRepoCheck": {
|
|
577
|
+
"description": "Skip Codex's built-in Git repository validation check (default: false).",
|
|
578
|
+
"type": "boolean"
|
|
579
|
+
},
|
|
580
|
+
"additionalDirectories": {
|
|
581
|
+
"description": "Additional directories to make accessible beyond workingDirectory. Paths support ${ENV_VAR} substitution.",
|
|
582
|
+
"items": {
|
|
583
|
+
"type": "string"
|
|
584
|
+
},
|
|
585
|
+
"type": "array"
|
|
586
|
+
},
|
|
587
|
+
"developerInstructions": {
|
|
588
|
+
"description": "Instructions prepended to every Codex prompt as developer context.",
|
|
589
|
+
"type": "string"
|
|
590
|
+
},
|
|
591
|
+
"baseUrl": {
|
|
592
|
+
"description": "Override the OpenAI API base URL (useful for corporate proxies).",
|
|
593
|
+
"type": "string"
|
|
594
|
+
},
|
|
595
|
+
"codexPathOverride": {
|
|
596
|
+
"description": "Override the path to the Codex CLI binary.",
|
|
597
|
+
"type": "string"
|
|
598
|
+
},
|
|
599
|
+
"configOverrides": {
|
|
600
|
+
"description": "Additional Codex configuration overrides (CodexOptions.config key=value pairs).",
|
|
601
|
+
"type": "object"
|
|
602
|
+
},
|
|
603
|
+
"contextFile": {
|
|
604
|
+
"description": "Filename for the pre-built domain context file within workingDirectory (default: \"context.md\")",
|
|
605
|
+
"type": "string"
|
|
606
|
+
},
|
|
607
|
+
"contextPrompt": {
|
|
608
|
+
"description": "Default prompt used when buildContext() is called without an explicit prompt.",
|
|
609
|
+
"type": "string"
|
|
610
|
+
}
|
|
611
|
+
},
|
|
612
|
+
"type": "object"
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
}
|