language-operator 0.1.30 → 0.1.35
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.
- checksums.yaml +4 -4
- data/.rubocop.yml +7 -8
- data/CHANGELOG.md +49 -0
- data/CI_STATUS.md +56 -0
- data/Gemfile.lock +2 -2
- data/Makefile +28 -7
- data/Rakefile +29 -0
- data/docs/dsl/SCHEMA_VERSION.md +250 -0
- data/docs/dsl/agent-reference.md +13 -0
- data/lib/language_operator/agent/base.rb +10 -6
- data/lib/language_operator/agent/executor.rb +19 -97
- data/lib/language_operator/agent/safety/ast_validator.rb +62 -43
- data/lib/language_operator/agent/safety/safe_executor.rb +39 -2
- data/lib/language_operator/agent/scheduler.rb +60 -0
- data/lib/language_operator/agent/task_executor.rb +548 -0
- data/lib/language_operator/agent.rb +90 -27
- data/lib/language_operator/cli/base_command.rb +117 -0
- data/lib/language_operator/cli/commands/agent.rb +351 -466
- data/lib/language_operator/cli/commands/cluster.rb +276 -256
- data/lib/language_operator/cli/commands/install.rb +110 -119
- data/lib/language_operator/cli/commands/model.rb +284 -184
- data/lib/language_operator/cli/commands/persona.rb +220 -289
- data/lib/language_operator/cli/commands/quickstart.rb +4 -5
- data/lib/language_operator/cli/commands/status.rb +36 -53
- data/lib/language_operator/cli/commands/system.rb +760 -0
- data/lib/language_operator/cli/commands/tool.rb +356 -422
- data/lib/language_operator/cli/commands/use.rb +19 -22
- data/lib/language_operator/cli/formatters/code_formatter.rb +3 -7
- data/lib/language_operator/cli/formatters/log_formatter.rb +3 -5
- data/lib/language_operator/cli/formatters/progress_formatter.rb +3 -7
- data/lib/language_operator/cli/formatters/status_formatter.rb +37 -0
- data/lib/language_operator/cli/formatters/table_formatter.rb +10 -26
- data/lib/language_operator/cli/helpers/pastel_helper.rb +24 -0
- data/lib/language_operator/cli/helpers/resource_dependency_checker.rb +0 -18
- data/lib/language_operator/cli/main.rb +4 -0
- data/lib/language_operator/cli/wizards/quickstart_wizard.rb +0 -1
- data/lib/language_operator/client/config.rb +20 -21
- data/lib/language_operator/config.rb +115 -3
- data/lib/language_operator/constants.rb +54 -0
- data/lib/language_operator/dsl/agent_context.rb +7 -7
- data/lib/language_operator/dsl/agent_definition.rb +111 -26
- data/lib/language_operator/dsl/config.rb +30 -66
- data/lib/language_operator/dsl/main_definition.rb +114 -0
- data/lib/language_operator/dsl/schema.rb +1143 -0
- data/lib/language_operator/dsl/task_definition.rb +315 -0
- data/lib/language_operator/dsl.rb +1 -1
- data/lib/language_operator/instrumentation/task_tracer.rb +285 -0
- data/lib/language_operator/logger.rb +4 -4
- data/lib/language_operator/synthesis_test_harness.rb +324 -0
- data/lib/language_operator/templates/README.md +23 -0
- data/lib/language_operator/templates/examples/agent_synthesis.tmpl +133 -0
- data/lib/language_operator/templates/examples/persona_distillation.tmpl +19 -0
- data/lib/language_operator/templates/schema/.gitkeep +0 -0
- data/lib/language_operator/templates/schema/CHANGELOG.md +119 -0
- data/lib/language_operator/templates/schema/agent_dsl_openapi.yaml +306 -0
- data/lib/language_operator/templates/schema/agent_dsl_schema.json +494 -0
- data/lib/language_operator/type_coercion.rb +250 -0
- data/lib/language_operator/ux/base.rb +81 -0
- data/lib/language_operator/ux/concerns/README.md +155 -0
- data/lib/language_operator/ux/concerns/headings.rb +90 -0
- data/lib/language_operator/ux/concerns/input_validation.rb +146 -0
- data/lib/language_operator/ux/concerns/provider_helpers.rb +167 -0
- data/lib/language_operator/ux/create_agent.rb +252 -0
- data/lib/language_operator/ux/create_model.rb +267 -0
- data/lib/language_operator/ux/quickstart.rb +594 -0
- data/lib/language_operator/version.rb +1 -1
- data/lib/language_operator.rb +2 -0
- data/requirements/ARCHITECTURE.md +1 -0
- data/requirements/SCRATCH.md +153 -0
- data/requirements/dsl.md +0 -0
- data/requirements/features +1 -0
- data/requirements/personas +1 -0
- data/requirements/proposals +1 -0
- data/requirements/tasks/iterate.md +14 -15
- data/requirements/tasks/optimize.md +13 -4
- data/synth/001/Makefile +90 -0
- data/synth/001/agent.rb +26 -0
- data/synth/001/agent.yaml +7 -0
- data/synth/001/output.log +44 -0
- data/synth/Makefile +39 -0
- data/synth/README.md +342 -0
- metadata +49 -18
- data/examples/README.md +0 -569
- data/examples/agent_example.rb +0 -86
- data/examples/chat_endpoint_agent.rb +0 -118
- data/examples/github_webhook_agent.rb +0 -171
- data/examples/mcp_agent.rb +0 -158
- data/examples/oauth_callback_agent.rb +0 -296
- data/examples/stripe_webhook_agent.rb +0 -219
- data/examples/webhook_agent.rb +0 -80
- data/lib/language_operator/dsl/workflow_definition.rb +0 -259
- data/test_agent_dsl.rb +0 -108
|
@@ -0,0 +1,494 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://github.com/language-operator/language-operator-gem/schema/agent-dsl.json",
|
|
4
|
+
"title": "Language Operator Agent DSL",
|
|
5
|
+
"description": "Schema for defining autonomous AI agents using the Language Operator DSL",
|
|
6
|
+
"version": "0.1.35",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"name": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "Unique agent identifier (lowercase, alphanumeric, hyphens)",
|
|
12
|
+
"pattern": "^[a-z0-9-]+$",
|
|
13
|
+
"minLength": 1,
|
|
14
|
+
"maxLength": 63
|
|
15
|
+
},
|
|
16
|
+
"description": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "Human-readable description of agent purpose"
|
|
19
|
+
},
|
|
20
|
+
"persona": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "System prompt or persona defining agent behavior and expertise"
|
|
23
|
+
},
|
|
24
|
+
"schedule": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "Cron expression for scheduled execution (sets mode to :scheduled)",
|
|
27
|
+
"pattern": "^\\s*(\\S+\\s+){4}\\S+\\s*$"
|
|
28
|
+
},
|
|
29
|
+
"mode": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"description": "Execution mode for the agent",
|
|
32
|
+
"enum": [
|
|
33
|
+
"autonomous",
|
|
34
|
+
"scheduled",
|
|
35
|
+
"reactive"
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"objectives": {
|
|
39
|
+
"type": "array",
|
|
40
|
+
"description": "List of goals the agent should achieve",
|
|
41
|
+
"items": {
|
|
42
|
+
"type": "string"
|
|
43
|
+
},
|
|
44
|
+
"minItems": 0
|
|
45
|
+
},
|
|
46
|
+
"tasks": {
|
|
47
|
+
"type": "array",
|
|
48
|
+
"description": "Task definitions (organic functions with stable contracts)",
|
|
49
|
+
"items": {
|
|
50
|
+
"$ref": "#/definitions/TaskDefinition"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"main": {
|
|
54
|
+
"$ref": "#/definitions/MainDefinition",
|
|
55
|
+
"description": "Main execution block (imperative entry point)"
|
|
56
|
+
},
|
|
57
|
+
"constraints": {
|
|
58
|
+
"$ref": "#/definitions/ConstraintsDefinition"
|
|
59
|
+
},
|
|
60
|
+
"output": {
|
|
61
|
+
"$ref": "#/definitions/OutputDefinition"
|
|
62
|
+
},
|
|
63
|
+
"webhooks": {
|
|
64
|
+
"type": "array",
|
|
65
|
+
"description": "Webhook endpoints for reactive agents",
|
|
66
|
+
"items": {
|
|
67
|
+
"$ref": "#/definitions/WebhookDefinition"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"mcp_server": {
|
|
71
|
+
"$ref": "#/definitions/McpServerDefinition"
|
|
72
|
+
},
|
|
73
|
+
"chat_endpoint": {
|
|
74
|
+
"$ref": "#/definitions/ChatEndpointDefinition"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"required": [
|
|
78
|
+
"name"
|
|
79
|
+
],
|
|
80
|
+
"definitions": {
|
|
81
|
+
"TaskDefinition": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"description": "Organic function with stable contract (inputs/outputs) and evolving implementation",
|
|
84
|
+
"properties": {
|
|
85
|
+
"name": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"description": "Task identifier (symbol)",
|
|
88
|
+
"pattern": "^[a-z_][a-z0-9_]*$"
|
|
89
|
+
},
|
|
90
|
+
"inputs": {
|
|
91
|
+
"$ref": "#/definitions/TypeSchema",
|
|
92
|
+
"description": "Input contract (parameter types)"
|
|
93
|
+
},
|
|
94
|
+
"outputs": {
|
|
95
|
+
"$ref": "#/definitions/TypeSchema",
|
|
96
|
+
"description": "Output contract (return value types)"
|
|
97
|
+
},
|
|
98
|
+
"instructions": {
|
|
99
|
+
"type": "string",
|
|
100
|
+
"description": "Natural language instructions for neural implementation (optional)"
|
|
101
|
+
},
|
|
102
|
+
"implementation_type": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"description": "Implementation approach",
|
|
105
|
+
"enum": [
|
|
106
|
+
"neural",
|
|
107
|
+
"symbolic",
|
|
108
|
+
"hybrid",
|
|
109
|
+
"undefined"
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"required": [
|
|
114
|
+
"name",
|
|
115
|
+
"inputs",
|
|
116
|
+
"outputs"
|
|
117
|
+
]
|
|
118
|
+
},
|
|
119
|
+
"MainDefinition": {
|
|
120
|
+
"type": "object",
|
|
121
|
+
"description": "Imperative entry point for agent execution",
|
|
122
|
+
"properties": {
|
|
123
|
+
"type": {
|
|
124
|
+
"type": "string",
|
|
125
|
+
"description": "Block type",
|
|
126
|
+
"enum": [
|
|
127
|
+
"main"
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
"description": {
|
|
131
|
+
"type": "string",
|
|
132
|
+
"description": "Main block executes tasks using execute_task() with Ruby control flow"
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"additionalProperties": false
|
|
136
|
+
},
|
|
137
|
+
"TypeSchema": {
|
|
138
|
+
"type": "object",
|
|
139
|
+
"description": "Type schema for task contract validation",
|
|
140
|
+
"patternProperties": {
|
|
141
|
+
"^[a-z_][a-z0-9_]*$": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"description": "Parameter type",
|
|
144
|
+
"enum": [
|
|
145
|
+
"string",
|
|
146
|
+
"integer",
|
|
147
|
+
"number",
|
|
148
|
+
"boolean",
|
|
149
|
+
"array",
|
|
150
|
+
"hash",
|
|
151
|
+
"any"
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"additionalProperties": false,
|
|
156
|
+
"examples": [
|
|
157
|
+
{
|
|
158
|
+
"user_id": "integer",
|
|
159
|
+
"name": "string",
|
|
160
|
+
"active": "boolean"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"data": "array",
|
|
164
|
+
"metadata": "hash"
|
|
165
|
+
}
|
|
166
|
+
]
|
|
167
|
+
},
|
|
168
|
+
"ConstraintsDefinition": {
|
|
169
|
+
"type": "object",
|
|
170
|
+
"description": "Execution constraints and limits",
|
|
171
|
+
"properties": {
|
|
172
|
+
"max_iterations": {
|
|
173
|
+
"type": "integer",
|
|
174
|
+
"description": "Maximum number of execution iterations",
|
|
175
|
+
"minimum": 1
|
|
176
|
+
},
|
|
177
|
+
"timeout": {
|
|
178
|
+
"type": "string",
|
|
179
|
+
"description": "Execution timeout (e.g., \"30s\", \"5m\", \"1h\")",
|
|
180
|
+
"pattern": "^\\d+[smh]$"
|
|
181
|
+
},
|
|
182
|
+
"memory": {
|
|
183
|
+
"type": "string",
|
|
184
|
+
"description": "Memory limit (e.g., \"512Mi\", \"1Gi\")"
|
|
185
|
+
},
|
|
186
|
+
"rate_limit": {
|
|
187
|
+
"type": "integer",
|
|
188
|
+
"description": "Maximum requests per time period",
|
|
189
|
+
"minimum": 1
|
|
190
|
+
},
|
|
191
|
+
"daily_budget": {
|
|
192
|
+
"type": "number",
|
|
193
|
+
"description": "Maximum daily cost in USD",
|
|
194
|
+
"minimum": 0
|
|
195
|
+
},
|
|
196
|
+
"hourly_budget": {
|
|
197
|
+
"type": "number",
|
|
198
|
+
"description": "Maximum hourly cost in USD",
|
|
199
|
+
"minimum": 0
|
|
200
|
+
},
|
|
201
|
+
"token_budget": {
|
|
202
|
+
"type": "integer",
|
|
203
|
+
"description": "Maximum total tokens allowed",
|
|
204
|
+
"minimum": 1
|
|
205
|
+
},
|
|
206
|
+
"requests_per_minute": {
|
|
207
|
+
"type": "integer",
|
|
208
|
+
"description": "Maximum requests per minute",
|
|
209
|
+
"minimum": 1
|
|
210
|
+
},
|
|
211
|
+
"requests_per_hour": {
|
|
212
|
+
"type": "integer",
|
|
213
|
+
"description": "Maximum requests per hour",
|
|
214
|
+
"minimum": 1
|
|
215
|
+
},
|
|
216
|
+
"requests_per_day": {
|
|
217
|
+
"type": "integer",
|
|
218
|
+
"description": "Maximum requests per day",
|
|
219
|
+
"minimum": 1
|
|
220
|
+
},
|
|
221
|
+
"blocked_patterns": {
|
|
222
|
+
"type": "array",
|
|
223
|
+
"description": "Content patterns to block",
|
|
224
|
+
"items": {
|
|
225
|
+
"type": "string"
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
"blocked_topics": {
|
|
229
|
+
"type": "array",
|
|
230
|
+
"description": "Topics to avoid",
|
|
231
|
+
"items": {
|
|
232
|
+
"type": "string"
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
"OutputDefinition": {
|
|
238
|
+
"type": "object",
|
|
239
|
+
"description": "Output destination configuration",
|
|
240
|
+
"properties": {
|
|
241
|
+
"workspace": {
|
|
242
|
+
"type": "string",
|
|
243
|
+
"description": "Workspace directory path for file outputs"
|
|
244
|
+
},
|
|
245
|
+
"slack": {
|
|
246
|
+
"type": "object",
|
|
247
|
+
"description": "Slack integration configuration",
|
|
248
|
+
"properties": {
|
|
249
|
+
"channel": {
|
|
250
|
+
"type": "string",
|
|
251
|
+
"description": "Slack channel name or ID"
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
"required": [
|
|
255
|
+
"channel"
|
|
256
|
+
]
|
|
257
|
+
},
|
|
258
|
+
"email": {
|
|
259
|
+
"type": "object",
|
|
260
|
+
"description": "Email notification configuration",
|
|
261
|
+
"properties": {
|
|
262
|
+
"to": {
|
|
263
|
+
"type": "string",
|
|
264
|
+
"description": "Email recipient address",
|
|
265
|
+
"format": "email"
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
"required": [
|
|
269
|
+
"to"
|
|
270
|
+
]
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
"WebhookDefinition": {
|
|
275
|
+
"type": "object",
|
|
276
|
+
"description": "Webhook endpoint configuration",
|
|
277
|
+
"properties": {
|
|
278
|
+
"path": {
|
|
279
|
+
"type": "string",
|
|
280
|
+
"description": "URL path for webhook endpoint",
|
|
281
|
+
"pattern": "^/"
|
|
282
|
+
},
|
|
283
|
+
"method": {
|
|
284
|
+
"type": "string",
|
|
285
|
+
"description": "HTTP method",
|
|
286
|
+
"enum": [
|
|
287
|
+
"get",
|
|
288
|
+
"post",
|
|
289
|
+
"put",
|
|
290
|
+
"delete",
|
|
291
|
+
"patch"
|
|
292
|
+
],
|
|
293
|
+
"default": "post"
|
|
294
|
+
},
|
|
295
|
+
"authentication": {
|
|
296
|
+
"$ref": "#/definitions/WebhookAuthentication"
|
|
297
|
+
},
|
|
298
|
+
"validations": {
|
|
299
|
+
"type": "array",
|
|
300
|
+
"description": "Request validation rules",
|
|
301
|
+
"items": {
|
|
302
|
+
"type": "object",
|
|
303
|
+
"properties": {
|
|
304
|
+
"type": {
|
|
305
|
+
"type": "string",
|
|
306
|
+
"enum": [
|
|
307
|
+
"headers",
|
|
308
|
+
"content_type",
|
|
309
|
+
"custom"
|
|
310
|
+
]
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
"required": [
|
|
317
|
+
"path"
|
|
318
|
+
]
|
|
319
|
+
},
|
|
320
|
+
"WebhookAuthentication": {
|
|
321
|
+
"type": "object",
|
|
322
|
+
"description": "Webhook authentication configuration",
|
|
323
|
+
"properties": {
|
|
324
|
+
"type": {
|
|
325
|
+
"type": "string",
|
|
326
|
+
"description": "Authentication type",
|
|
327
|
+
"enum": [
|
|
328
|
+
"hmac",
|
|
329
|
+
"api_key",
|
|
330
|
+
"bearer",
|
|
331
|
+
"custom"
|
|
332
|
+
]
|
|
333
|
+
},
|
|
334
|
+
"secret": {
|
|
335
|
+
"type": "string",
|
|
336
|
+
"description": "Secret key for authentication"
|
|
337
|
+
},
|
|
338
|
+
"header": {
|
|
339
|
+
"type": "string",
|
|
340
|
+
"description": "Header name containing signature/token"
|
|
341
|
+
},
|
|
342
|
+
"algorithm": {
|
|
343
|
+
"type": "string",
|
|
344
|
+
"description": "HMAC algorithm",
|
|
345
|
+
"enum": [
|
|
346
|
+
"sha1",
|
|
347
|
+
"sha256",
|
|
348
|
+
"sha512"
|
|
349
|
+
]
|
|
350
|
+
},
|
|
351
|
+
"prefix": {
|
|
352
|
+
"type": "string",
|
|
353
|
+
"description": "Signature prefix (e.g., \"sha256=\")"
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
"McpServerDefinition": {
|
|
358
|
+
"type": "object",
|
|
359
|
+
"description": "MCP (Model Context Protocol) server configuration",
|
|
360
|
+
"properties": {
|
|
361
|
+
"name": {
|
|
362
|
+
"type": "string",
|
|
363
|
+
"description": "MCP server name"
|
|
364
|
+
},
|
|
365
|
+
"tools": {
|
|
366
|
+
"type": "object",
|
|
367
|
+
"description": "Tools exposed via MCP",
|
|
368
|
+
"additionalProperties": {
|
|
369
|
+
"$ref": "#/definitions/ToolDefinition"
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
"ChatEndpointDefinition": {
|
|
375
|
+
"type": "object",
|
|
376
|
+
"description": "OpenAI-compatible chat endpoint configuration",
|
|
377
|
+
"properties": {
|
|
378
|
+
"system_prompt": {
|
|
379
|
+
"type": "string",
|
|
380
|
+
"description": "System prompt for chat mode"
|
|
381
|
+
},
|
|
382
|
+
"temperature": {
|
|
383
|
+
"type": "number",
|
|
384
|
+
"description": "Sampling temperature (0.0-2.0)",
|
|
385
|
+
"minimum": 0.0,
|
|
386
|
+
"maximum": 2.0,
|
|
387
|
+
"default": 0.7
|
|
388
|
+
},
|
|
389
|
+
"max_tokens": {
|
|
390
|
+
"type": "integer",
|
|
391
|
+
"description": "Maximum tokens in response",
|
|
392
|
+
"minimum": 1,
|
|
393
|
+
"default": 2000
|
|
394
|
+
},
|
|
395
|
+
"model_name": {
|
|
396
|
+
"type": "string",
|
|
397
|
+
"description": "Model name exposed in API"
|
|
398
|
+
},
|
|
399
|
+
"top_p": {
|
|
400
|
+
"type": "number",
|
|
401
|
+
"description": "Nucleus sampling parameter (0.0-1.0)",
|
|
402
|
+
"minimum": 0.0,
|
|
403
|
+
"maximum": 1.0,
|
|
404
|
+
"default": 1.0
|
|
405
|
+
},
|
|
406
|
+
"frequency_penalty": {
|
|
407
|
+
"type": "number",
|
|
408
|
+
"description": "Frequency penalty (-2.0 to 2.0)",
|
|
409
|
+
"minimum": -2.0,
|
|
410
|
+
"maximum": 2.0,
|
|
411
|
+
"default": 0.0
|
|
412
|
+
},
|
|
413
|
+
"presence_penalty": {
|
|
414
|
+
"type": "number",
|
|
415
|
+
"description": "Presence penalty (-2.0 to 2.0)",
|
|
416
|
+
"minimum": -2.0,
|
|
417
|
+
"maximum": 2.0,
|
|
418
|
+
"default": 0.0
|
|
419
|
+
},
|
|
420
|
+
"stop_sequences": {
|
|
421
|
+
"type": "array",
|
|
422
|
+
"description": "Sequences that stop generation",
|
|
423
|
+
"items": {
|
|
424
|
+
"type": "string"
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
},
|
|
429
|
+
"ToolDefinition": {
|
|
430
|
+
"type": "object",
|
|
431
|
+
"description": "MCP tool definition",
|
|
432
|
+
"properties": {
|
|
433
|
+
"name": {
|
|
434
|
+
"type": "string",
|
|
435
|
+
"description": "Tool name (lowercase, alphanumeric, underscores)",
|
|
436
|
+
"pattern": "^[a-z0-9_]+$"
|
|
437
|
+
},
|
|
438
|
+
"description": {
|
|
439
|
+
"type": "string",
|
|
440
|
+
"description": "Human-readable tool description"
|
|
441
|
+
},
|
|
442
|
+
"parameters": {
|
|
443
|
+
"type": "object",
|
|
444
|
+
"description": "Tool parameters",
|
|
445
|
+
"additionalProperties": {
|
|
446
|
+
"$ref": "#/definitions/ParameterDefinition"
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
},
|
|
450
|
+
"required": [
|
|
451
|
+
"name",
|
|
452
|
+
"description"
|
|
453
|
+
]
|
|
454
|
+
},
|
|
455
|
+
"ParameterDefinition": {
|
|
456
|
+
"type": "object",
|
|
457
|
+
"description": "Tool parameter definition",
|
|
458
|
+
"properties": {
|
|
459
|
+
"type": {
|
|
460
|
+
"type": "string",
|
|
461
|
+
"description": "Parameter type",
|
|
462
|
+
"enum": [
|
|
463
|
+
"string",
|
|
464
|
+
"number",
|
|
465
|
+
"integer",
|
|
466
|
+
"boolean",
|
|
467
|
+
"array",
|
|
468
|
+
"object"
|
|
469
|
+
]
|
|
470
|
+
},
|
|
471
|
+
"description": {
|
|
472
|
+
"type": "string",
|
|
473
|
+
"description": "Parameter description"
|
|
474
|
+
},
|
|
475
|
+
"required": {
|
|
476
|
+
"type": "boolean",
|
|
477
|
+
"description": "Whether parameter is required",
|
|
478
|
+
"default": false
|
|
479
|
+
},
|
|
480
|
+
"default": {
|
|
481
|
+
"description": "Default value if not provided"
|
|
482
|
+
},
|
|
483
|
+
"enum": {
|
|
484
|
+
"type": "array",
|
|
485
|
+
"description": "Allowed values",
|
|
486
|
+
"items": {}
|
|
487
|
+
}
|
|
488
|
+
},
|
|
489
|
+
"required": [
|
|
490
|
+
"type"
|
|
491
|
+
]
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
}
|