@lssm/example.agent-console 0.0.0-canary-20251225044228 → 0.0.0-canary-20251225070736
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/.turbo/turbo-build$colon$bundle.log +12 -12
- package/.turbo/turbo-build.log +17 -17
- package/CHANGELOG.md +18 -6
- package/README.md +3 -0
- package/dist/agent/agent.operation.d.ts +115 -115
- package/dist/agent/agent.operation.d.ts.map +1 -1
- package/dist/agent/agent.operation.js +152 -4
- package/dist/agent/agent.operation.js.map +1 -1
- package/dist/agent/agent.schema.d.ts +95 -95
- package/dist/run/run.operation.d.ts.map +1 -1
- package/dist/run/run.operation.js +157 -5
- package/dist/run/run.operation.js.map +1 -1
- package/dist/tool/tool.operation.d.ts.map +1 -1
- package/dist/tool/tool.operation.js +116 -3
- package/dist/tool/tool.operation.js.map +1 -1
- package/package.json +9 -9
- package/src/agent/agent.operation.ts +163 -0
- package/src/run/run.operation.ts +145 -0
- package/src/tool/tool.operation.ts +117 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -59,6 +59,42 @@ export const CreateAgentCommand = defineCommand({
|
|
|
59
59
|
],
|
|
60
60
|
audit: ['agent-console.agent.created'],
|
|
61
61
|
},
|
|
62
|
+
acceptance: {
|
|
63
|
+
scenarios: [
|
|
64
|
+
{
|
|
65
|
+
key: 'create-agent-happy-path',
|
|
66
|
+
given: ['User is authenticated', 'Organization exists'],
|
|
67
|
+
when: ['User submits valid agent configuration'],
|
|
68
|
+
then: [
|
|
69
|
+
'New agent is created with DRAFT status',
|
|
70
|
+
'AgentCreated event is emitted',
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
key: 'create-agent-slug-conflict',
|
|
75
|
+
given: ['User is authenticated', 'Agent with same slug exists'],
|
|
76
|
+
when: ['User submits agent with duplicate slug'],
|
|
77
|
+
then: ['SLUG_EXISTS error is returned with 409 status'],
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
examples: [
|
|
81
|
+
{
|
|
82
|
+
key: 'basic-create',
|
|
83
|
+
input: {
|
|
84
|
+
name: 'Support Assistant',
|
|
85
|
+
slug: 'support-assistant',
|
|
86
|
+
modelProvider: 'openai',
|
|
87
|
+
modelId: 'gpt-4',
|
|
88
|
+
},
|
|
89
|
+
output: {
|
|
90
|
+
id: 'agent-123',
|
|
91
|
+
name: 'Support Assistant',
|
|
92
|
+
slug: 'support-assistant',
|
|
93
|
+
status: 'draft',
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
],
|
|
97
|
+
},
|
|
62
98
|
});
|
|
63
99
|
|
|
64
100
|
/**
|
|
@@ -110,6 +146,38 @@ export const UpdateAgentCommand = defineCommand({
|
|
|
110
146
|
],
|
|
111
147
|
audit: ['agent.updated'],
|
|
112
148
|
},
|
|
149
|
+
acceptance: {
|
|
150
|
+
scenarios: [
|
|
151
|
+
{
|
|
152
|
+
key: 'update-agent-happy-path',
|
|
153
|
+
given: ['Agent exists', 'User owns the agent'],
|
|
154
|
+
when: ['User submits updated configuration'],
|
|
155
|
+
then: ['Agent is updated', 'AgentUpdated event is emitted'],
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
key: 'update-agent-not-found',
|
|
159
|
+
given: ['Agent does not exist'],
|
|
160
|
+
when: ['User attempts to update'],
|
|
161
|
+
then: ['AGENT_NOT_FOUND error is returned'],
|
|
162
|
+
},
|
|
163
|
+
],
|
|
164
|
+
examples: [
|
|
165
|
+
{
|
|
166
|
+
key: 'update-name',
|
|
167
|
+
input: {
|
|
168
|
+
agentId: 'agent-123',
|
|
169
|
+
name: 'Updated Assistant',
|
|
170
|
+
systemPrompt: 'You are a helpful assistant.',
|
|
171
|
+
},
|
|
172
|
+
output: {
|
|
173
|
+
id: 'agent-123',
|
|
174
|
+
name: 'Updated Assistant',
|
|
175
|
+
status: 'draft',
|
|
176
|
+
updatedAt: '2025-01-01T00:00:00Z',
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
],
|
|
180
|
+
},
|
|
113
181
|
});
|
|
114
182
|
|
|
115
183
|
/**
|
|
@@ -145,6 +213,34 @@ export const GetAgentQuery = defineQuery({
|
|
|
145
213
|
},
|
|
146
214
|
},
|
|
147
215
|
policy: { auth: 'user' },
|
|
216
|
+
acceptance: {
|
|
217
|
+
scenarios: [
|
|
218
|
+
{
|
|
219
|
+
key: 'get-agent-happy-path',
|
|
220
|
+
given: ['Agent exists'],
|
|
221
|
+
when: ['User requests agent by ID'],
|
|
222
|
+
then: ['Agent details are returned'],
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
key: 'get-agent-with-tools',
|
|
226
|
+
given: ['Agent exists with assigned tools'],
|
|
227
|
+
when: ['User requests agent with includeTools=true'],
|
|
228
|
+
then: ['Agent details with tools list are returned'],
|
|
229
|
+
},
|
|
230
|
+
],
|
|
231
|
+
examples: [
|
|
232
|
+
{
|
|
233
|
+
key: 'get-basic',
|
|
234
|
+
input: { agentId: 'agent-123', includeTools: false },
|
|
235
|
+
output: {
|
|
236
|
+
id: 'agent-123',
|
|
237
|
+
name: 'Support Assistant',
|
|
238
|
+
status: 'active',
|
|
239
|
+
tools: [],
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
],
|
|
243
|
+
},
|
|
148
244
|
});
|
|
149
245
|
|
|
150
246
|
/**
|
|
@@ -194,6 +290,29 @@ export const ListAgentsQuery = defineQuery({
|
|
|
194
290
|
}),
|
|
195
291
|
},
|
|
196
292
|
policy: { auth: 'user' },
|
|
293
|
+
acceptance: {
|
|
294
|
+
scenarios: [
|
|
295
|
+
{
|
|
296
|
+
key: 'list-agents-happy-path',
|
|
297
|
+
given: ['Organization has agents'],
|
|
298
|
+
when: ['User lists agents'],
|
|
299
|
+
then: ['Paginated list of agents is returned'],
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
key: 'list-agents-filter-by-status',
|
|
303
|
+
given: ['Organization has agents with mixed statuses'],
|
|
304
|
+
when: ['User filters by status=active'],
|
|
305
|
+
then: ['Only active agents are returned'],
|
|
306
|
+
},
|
|
307
|
+
],
|
|
308
|
+
examples: [
|
|
309
|
+
{
|
|
310
|
+
key: 'list-basic',
|
|
311
|
+
input: { organizationId: 'org-123', limit: 10, offset: 0 },
|
|
312
|
+
output: { items: [], total: 0, hasMore: false },
|
|
313
|
+
},
|
|
314
|
+
],
|
|
315
|
+
},
|
|
197
316
|
});
|
|
198
317
|
|
|
199
318
|
/**
|
|
@@ -242,6 +361,33 @@ export const AssignToolToAgentCommand = defineCommand({
|
|
|
242
361
|
},
|
|
243
362
|
policy: { auth: 'user' },
|
|
244
363
|
sideEffects: { audit: ['agent.tool.assigned'] },
|
|
364
|
+
acceptance: {
|
|
365
|
+
scenarios: [
|
|
366
|
+
{
|
|
367
|
+
key: 'assign-tool-happy-path',
|
|
368
|
+
given: ['Agent exists', 'Tool exists and is not assigned'],
|
|
369
|
+
when: ['User assigns tool to agent'],
|
|
370
|
+
then: ['Tool is assigned', 'Assignment ID is returned'],
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
key: 'assign-tool-already-assigned',
|
|
374
|
+
given: ['Tool is already assigned to agent'],
|
|
375
|
+
when: ['User attempts to assign again'],
|
|
376
|
+
then: ['TOOL_ALREADY_ASSIGNED error is returned'],
|
|
377
|
+
},
|
|
378
|
+
],
|
|
379
|
+
examples: [
|
|
380
|
+
{
|
|
381
|
+
key: 'assign-basic',
|
|
382
|
+
input: { agentId: 'agent-123', toolId: 'tool-456' },
|
|
383
|
+
output: {
|
|
384
|
+
agentToolId: 'at-789',
|
|
385
|
+
agentId: 'agent-123',
|
|
386
|
+
toolId: 'tool-456',
|
|
387
|
+
},
|
|
388
|
+
},
|
|
389
|
+
],
|
|
390
|
+
},
|
|
245
391
|
});
|
|
246
392
|
|
|
247
393
|
/**
|
|
@@ -275,4 +421,21 @@ export const RemoveToolFromAgentCommand = defineCommand({
|
|
|
275
421
|
},
|
|
276
422
|
policy: { auth: 'user' },
|
|
277
423
|
sideEffects: { audit: ['agent.tool.removed'] },
|
|
424
|
+
acceptance: {
|
|
425
|
+
scenarios: [
|
|
426
|
+
{
|
|
427
|
+
key: 'remove-tool-happy-path',
|
|
428
|
+
given: ['Agent exists', 'Tool is assigned to agent'],
|
|
429
|
+
when: ['User removes tool from agent'],
|
|
430
|
+
then: ['Tool is unassigned', 'Success is returned'],
|
|
431
|
+
},
|
|
432
|
+
],
|
|
433
|
+
examples: [
|
|
434
|
+
{
|
|
435
|
+
key: 'remove-basic',
|
|
436
|
+
input: { agentId: 'agent-123', toolId: 'tool-456' },
|
|
437
|
+
output: { success: true },
|
|
438
|
+
},
|
|
439
|
+
],
|
|
440
|
+
},
|
|
278
441
|
});
|
package/src/run/run.operation.ts
CHANGED
|
@@ -83,6 +83,29 @@ export const ExecuteAgentCommand = defineCommand({
|
|
|
83
83
|
],
|
|
84
84
|
audit: ['run.started'],
|
|
85
85
|
},
|
|
86
|
+
acceptance: {
|
|
87
|
+
scenarios: [
|
|
88
|
+
{
|
|
89
|
+
key: 'execute-agent-happy-path',
|
|
90
|
+
given: ['Agent exists', 'Agent is active'],
|
|
91
|
+
when: ['User submits execution request'],
|
|
92
|
+
then: ['Run is created', 'RunStarted event is emitted'],
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
key: 'execute-agent-not-active',
|
|
96
|
+
given: ['Agent exists but is not active'],
|
|
97
|
+
when: ['User attempts to execute'],
|
|
98
|
+
then: ['AGENT_NOT_ACTIVE error is returned'],
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
examples: [
|
|
102
|
+
{
|
|
103
|
+
key: 'basic-execute',
|
|
104
|
+
input: { agentId: 'agent-123', input: { message: 'Hello' } },
|
|
105
|
+
output: { runId: 'run-456', status: 'pending', estimatedWaitMs: 5000 },
|
|
106
|
+
},
|
|
107
|
+
],
|
|
108
|
+
},
|
|
86
109
|
});
|
|
87
110
|
|
|
88
111
|
/**
|
|
@@ -144,6 +167,29 @@ export const CancelRunCommand = defineCommand({
|
|
|
144
167
|
],
|
|
145
168
|
audit: ['run.cancelled'],
|
|
146
169
|
},
|
|
170
|
+
acceptance: {
|
|
171
|
+
scenarios: [
|
|
172
|
+
{
|
|
173
|
+
key: 'cancel-run-happy-path',
|
|
174
|
+
given: ['Run exists', 'Run is in progress'],
|
|
175
|
+
when: ['User cancels run'],
|
|
176
|
+
then: ['Run is cancelled', 'RunCancelled event is emitted'],
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
key: 'cancel-run-already-completed',
|
|
180
|
+
given: ['Run exists but is already completed'],
|
|
181
|
+
when: ['User attempts to cancel'],
|
|
182
|
+
then: ['RUN_NOT_CANCELLABLE error is returned'],
|
|
183
|
+
},
|
|
184
|
+
],
|
|
185
|
+
examples: [
|
|
186
|
+
{
|
|
187
|
+
key: 'cancel-basic',
|
|
188
|
+
input: { runId: 'run-456', reason: 'User requested' },
|
|
189
|
+
output: { success: true, status: 'cancelled' },
|
|
190
|
+
},
|
|
191
|
+
],
|
|
192
|
+
},
|
|
147
193
|
});
|
|
148
194
|
|
|
149
195
|
/**
|
|
@@ -180,6 +226,23 @@ export const GetRunQuery = defineQuery({
|
|
|
180
226
|
},
|
|
181
227
|
},
|
|
182
228
|
policy: { auth: 'user' },
|
|
229
|
+
acceptance: {
|
|
230
|
+
scenarios: [
|
|
231
|
+
{
|
|
232
|
+
key: 'get-run-happy-path',
|
|
233
|
+
given: ['Run exists'],
|
|
234
|
+
when: ['User requests run by ID'],
|
|
235
|
+
then: ['Run details are returned'],
|
|
236
|
+
},
|
|
237
|
+
],
|
|
238
|
+
examples: [
|
|
239
|
+
{
|
|
240
|
+
key: 'get-with-steps',
|
|
241
|
+
input: { runId: 'run-456', includeSteps: true, includeLogs: false },
|
|
242
|
+
output: { id: 'run-456', status: 'completed', steps: [] },
|
|
243
|
+
},
|
|
244
|
+
],
|
|
245
|
+
},
|
|
183
246
|
});
|
|
184
247
|
|
|
185
248
|
/**
|
|
@@ -232,6 +295,23 @@ export const ListRunsQuery = defineQuery({
|
|
|
232
295
|
}),
|
|
233
296
|
},
|
|
234
297
|
policy: { auth: 'user' },
|
|
298
|
+
acceptance: {
|
|
299
|
+
scenarios: [
|
|
300
|
+
{
|
|
301
|
+
key: 'list-runs-happy-path',
|
|
302
|
+
given: ['Organization has runs'],
|
|
303
|
+
when: ['User lists runs'],
|
|
304
|
+
then: ['Paginated list of runs is returned'],
|
|
305
|
+
},
|
|
306
|
+
],
|
|
307
|
+
examples: [
|
|
308
|
+
{
|
|
309
|
+
key: 'list-by-agent',
|
|
310
|
+
input: { agentId: 'agent-123', limit: 20, offset: 0 },
|
|
311
|
+
output: { items: [], total: 0, hasMore: false },
|
|
312
|
+
},
|
|
313
|
+
],
|
|
314
|
+
},
|
|
235
315
|
});
|
|
236
316
|
|
|
237
317
|
/**
|
|
@@ -263,6 +343,23 @@ export const GetRunStepsQuery = defineQuery({
|
|
|
263
343
|
}),
|
|
264
344
|
},
|
|
265
345
|
policy: { auth: 'user' },
|
|
346
|
+
acceptance: {
|
|
347
|
+
scenarios: [
|
|
348
|
+
{
|
|
349
|
+
key: 'get-run-steps-happy-path',
|
|
350
|
+
given: ['Run exists with steps'],
|
|
351
|
+
when: ['User requests steps'],
|
|
352
|
+
then: ['Steps list is returned'],
|
|
353
|
+
},
|
|
354
|
+
],
|
|
355
|
+
examples: [
|
|
356
|
+
{
|
|
357
|
+
key: 'get-steps-basic',
|
|
358
|
+
input: { runId: 'run-456' },
|
|
359
|
+
output: { steps: [] },
|
|
360
|
+
},
|
|
361
|
+
],
|
|
362
|
+
},
|
|
266
363
|
});
|
|
267
364
|
|
|
268
365
|
/**
|
|
@@ -308,6 +405,23 @@ export const GetRunLogsQuery = defineQuery({
|
|
|
308
405
|
}),
|
|
309
406
|
},
|
|
310
407
|
policy: { auth: 'user' },
|
|
408
|
+
acceptance: {
|
|
409
|
+
scenarios: [
|
|
410
|
+
{
|
|
411
|
+
key: 'get-run-logs-happy-path',
|
|
412
|
+
given: ['Run exists with logs'],
|
|
413
|
+
when: ['User requests logs'],
|
|
414
|
+
then: ['Paginated logs list is returned'],
|
|
415
|
+
},
|
|
416
|
+
],
|
|
417
|
+
examples: [
|
|
418
|
+
{
|
|
419
|
+
key: 'get-logs-filtered',
|
|
420
|
+
input: { runId: 'run-456', level: 'error', limit: 50 },
|
|
421
|
+
output: { items: [], total: 0, hasMore: false },
|
|
422
|
+
},
|
|
423
|
+
],
|
|
424
|
+
},
|
|
311
425
|
});
|
|
312
426
|
|
|
313
427
|
/**
|
|
@@ -373,4 +487,35 @@ export const GetRunMetricsQuery = defineQuery({
|
|
|
373
487
|
}),
|
|
374
488
|
},
|
|
375
489
|
policy: { auth: 'user' },
|
|
490
|
+
acceptance: {
|
|
491
|
+
scenarios: [
|
|
492
|
+
{
|
|
493
|
+
key: 'get-run-metrics-happy-path',
|
|
494
|
+
given: ['Organization has run history'],
|
|
495
|
+
when: ['User requests metrics for date range'],
|
|
496
|
+
then: ['Aggregated metrics are returned'],
|
|
497
|
+
},
|
|
498
|
+
],
|
|
499
|
+
examples: [
|
|
500
|
+
{
|
|
501
|
+
key: 'get-daily-metrics',
|
|
502
|
+
input: {
|
|
503
|
+
organizationId: 'org-123',
|
|
504
|
+
startDate: '2025-01-01',
|
|
505
|
+
endDate: '2025-01-31',
|
|
506
|
+
granularity: 'day',
|
|
507
|
+
},
|
|
508
|
+
output: {
|
|
509
|
+
totalRuns: 100,
|
|
510
|
+
completedRuns: 90,
|
|
511
|
+
failedRuns: 10,
|
|
512
|
+
totalTokens: 50000,
|
|
513
|
+
totalCostUsd: 5.0,
|
|
514
|
+
averageDurationMs: 2500,
|
|
515
|
+
successRate: 0.9,
|
|
516
|
+
timeline: [],
|
|
517
|
+
},
|
|
518
|
+
},
|
|
519
|
+
],
|
|
520
|
+
},
|
|
376
521
|
});
|
|
@@ -59,6 +59,39 @@ export const CreateToolCommand = defineCommand({
|
|
|
59
59
|
],
|
|
60
60
|
audit: ['tool.created'],
|
|
61
61
|
},
|
|
62
|
+
acceptance: {
|
|
63
|
+
scenarios: [
|
|
64
|
+
{
|
|
65
|
+
key: 'create-tool-happy-path',
|
|
66
|
+
given: ['User is authenticated', 'Organization exists'],
|
|
67
|
+
when: ['User submits valid tool configuration'],
|
|
68
|
+
then: ['New tool is created', 'ToolCreated event is emitted'],
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
key: 'create-tool-slug-conflict',
|
|
72
|
+
given: ['Tool with same slug exists'],
|
|
73
|
+
when: ['User submits tool with duplicate slug'],
|
|
74
|
+
then: ['SLUG_EXISTS error is returned'],
|
|
75
|
+
},
|
|
76
|
+
],
|
|
77
|
+
examples: [
|
|
78
|
+
{
|
|
79
|
+
key: 'create-api-tool',
|
|
80
|
+
input: {
|
|
81
|
+
name: 'Weather API',
|
|
82
|
+
slug: 'weather-api',
|
|
83
|
+
category: 'api',
|
|
84
|
+
description: 'Fetches weather data',
|
|
85
|
+
},
|
|
86
|
+
output: {
|
|
87
|
+
id: 'tool-123',
|
|
88
|
+
name: 'Weather API',
|
|
89
|
+
slug: 'weather-api',
|
|
90
|
+
status: 'draft',
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
},
|
|
62
95
|
});
|
|
63
96
|
|
|
64
97
|
/**
|
|
@@ -110,6 +143,28 @@ export const UpdateToolCommand = defineCommand({
|
|
|
110
143
|
],
|
|
111
144
|
audit: ['tool.updated'],
|
|
112
145
|
},
|
|
146
|
+
acceptance: {
|
|
147
|
+
scenarios: [
|
|
148
|
+
{
|
|
149
|
+
key: 'update-tool-happy-path',
|
|
150
|
+
given: ['Tool exists', 'User owns the tool'],
|
|
151
|
+
when: ['User submits updated configuration'],
|
|
152
|
+
then: ['Tool is updated', 'ToolUpdated event is emitted'],
|
|
153
|
+
},
|
|
154
|
+
],
|
|
155
|
+
examples: [
|
|
156
|
+
{
|
|
157
|
+
key: 'update-description',
|
|
158
|
+
input: { toolId: 'tool-123', description: 'Updated weather API tool' },
|
|
159
|
+
output: {
|
|
160
|
+
id: 'tool-123',
|
|
161
|
+
name: 'Weather API',
|
|
162
|
+
status: 'draft',
|
|
163
|
+
updatedAt: '2025-01-01T00:00:00Z',
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
],
|
|
167
|
+
},
|
|
113
168
|
});
|
|
114
169
|
|
|
115
170
|
/**
|
|
@@ -144,6 +199,28 @@ export const GetToolQuery = defineQuery({
|
|
|
144
199
|
},
|
|
145
200
|
},
|
|
146
201
|
policy: { auth: 'user' },
|
|
202
|
+
acceptance: {
|
|
203
|
+
scenarios: [
|
|
204
|
+
{
|
|
205
|
+
key: 'get-tool-happy-path',
|
|
206
|
+
given: ['Tool exists'],
|
|
207
|
+
when: ['User requests tool by ID'],
|
|
208
|
+
then: ['Tool details are returned'],
|
|
209
|
+
},
|
|
210
|
+
],
|
|
211
|
+
examples: [
|
|
212
|
+
{
|
|
213
|
+
key: 'get-basic',
|
|
214
|
+
input: { toolId: 'tool-123' },
|
|
215
|
+
output: {
|
|
216
|
+
id: 'tool-123',
|
|
217
|
+
name: 'Weather API',
|
|
218
|
+
status: 'active',
|
|
219
|
+
category: 'api',
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
],
|
|
223
|
+
},
|
|
147
224
|
});
|
|
148
225
|
|
|
149
226
|
/**
|
|
@@ -193,6 +270,23 @@ export const ListToolsQuery = defineQuery({
|
|
|
193
270
|
}),
|
|
194
271
|
},
|
|
195
272
|
policy: { auth: 'user' },
|
|
273
|
+
acceptance: {
|
|
274
|
+
scenarios: [
|
|
275
|
+
{
|
|
276
|
+
key: 'list-tools-happy-path',
|
|
277
|
+
given: ['Organization has tools'],
|
|
278
|
+
when: ['User lists tools'],
|
|
279
|
+
then: ['Paginated list of tools is returned'],
|
|
280
|
+
},
|
|
281
|
+
],
|
|
282
|
+
examples: [
|
|
283
|
+
{
|
|
284
|
+
key: 'list-by-category',
|
|
285
|
+
input: { organizationId: 'org-123', category: 'api', limit: 10 },
|
|
286
|
+
output: { items: [], total: 0, hasMore: false },
|
|
287
|
+
},
|
|
288
|
+
],
|
|
289
|
+
},
|
|
196
290
|
});
|
|
197
291
|
|
|
198
292
|
/**
|
|
@@ -243,4 +337,27 @@ export const TestToolCommand = defineCommand({
|
|
|
243
337
|
},
|
|
244
338
|
policy: { auth: 'user' },
|
|
245
339
|
sideEffects: { audit: ['tool.tested'] },
|
|
340
|
+
acceptance: {
|
|
341
|
+
scenarios: [
|
|
342
|
+
{
|
|
343
|
+
key: 'test-tool-success',
|
|
344
|
+
given: ['Tool exists', 'Tool is configured correctly'],
|
|
345
|
+
when: ['User runs test with valid input'],
|
|
346
|
+
then: ['Tool executes successfully', 'Output is returned'],
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
key: 'test-tool-failure',
|
|
350
|
+
given: ['Tool exists', 'Tool has configuration error'],
|
|
351
|
+
when: ['User runs test'],
|
|
352
|
+
then: ['TOOL_EXECUTION_ERROR is returned'],
|
|
353
|
+
},
|
|
354
|
+
],
|
|
355
|
+
examples: [
|
|
356
|
+
{
|
|
357
|
+
key: 'test-weather-api',
|
|
358
|
+
input: { toolId: 'tool-123', testInput: { city: 'Paris' } },
|
|
359
|
+
output: { success: true, output: { temperature: 22 }, durationMs: 150 },
|
|
360
|
+
},
|
|
361
|
+
],
|
|
362
|
+
},
|
|
246
363
|
});
|