@contractspec/example.agent-console 3.7.6 → 3.7.7
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.log +18 -18
- package/AGENTS.md +50 -31
- package/README.md +69 -77
- package/dist/agent/agent.event.js +1 -1
- package/dist/agent/agent.operation.js +1 -1
- package/dist/agent/index.d.ts +5 -5
- package/dist/agent/index.js +1 -1
- package/dist/browser/agent/agent.event.js +1 -1
- package/dist/browser/agent/agent.operation.js +1 -1
- package/dist/browser/agent/index.js +1 -1
- package/dist/browser/index.js +2145 -2145
- package/dist/browser/presentations/index.js +4 -4
- package/dist/browser/run/index.js +536 -536
- package/dist/browser/run/run.event.js +2 -2
- package/dist/browser/run/run.presentation.js +2 -2
- package/dist/browser/tool/index.js +260 -260
- package/dist/browser/tool/tool.event.js +1 -1
- package/dist/browser/tool/tool.presentation.js +2 -2
- package/dist/browser/ui/AgentDashboard.js +956 -956
- package/dist/browser/ui/AgentRunList.js +16 -16
- package/dist/browser/ui/AgentToolRegistry.js +9 -9
- package/dist/browser/ui/hooks/index.js +153 -153
- package/dist/browser/ui/hooks/useAgentList.js +1 -1
- package/dist/browser/ui/hooks/useAgentMutations.js +1 -1
- package/dist/browser/ui/hooks/useRunList.js +1 -1
- package/dist/browser/ui/hooks/useToolList.js +1 -1
- package/dist/browser/ui/index.js +1222 -1222
- package/dist/browser/ui/modals/AgentActionsModal.js +13 -13
- package/dist/browser/ui/modals/CreateAgentModal.js +15 -15
- package/dist/browser/ui/modals/index.js +297 -297
- package/dist/browser/ui/renderers/agent-list.renderer.js +7 -7
- package/dist/browser/ui/renderers/index.js +157 -157
- package/dist/browser/ui/views/AgentListView.js +7 -7
- package/dist/browser/ui/views/RunListView.js +16 -16
- package/dist/browser/ui/views/ToolRegistryView.js +9 -9
- package/dist/browser/ui/views/index.js +97 -97
- package/dist/handlers/index.d.ts +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2145 -2145
- package/dist/node/agent/agent.event.js +1 -1
- package/dist/node/agent/agent.operation.js +1 -1
- package/dist/node/agent/index.js +1 -1
- package/dist/node/index.js +2145 -2145
- package/dist/node/presentations/index.js +4 -4
- package/dist/node/run/index.js +536 -536
- package/dist/node/run/run.event.js +2 -2
- package/dist/node/run/run.presentation.js +2 -2
- package/dist/node/tool/index.js +260 -260
- package/dist/node/tool/tool.event.js +1 -1
- package/dist/node/tool/tool.presentation.js +2 -2
- package/dist/node/ui/AgentDashboard.js +956 -956
- package/dist/node/ui/AgentRunList.js +16 -16
- package/dist/node/ui/AgentToolRegistry.js +9 -9
- package/dist/node/ui/hooks/index.js +153 -153
- package/dist/node/ui/hooks/useAgentList.js +1 -1
- package/dist/node/ui/hooks/useAgentMutations.js +1 -1
- package/dist/node/ui/hooks/useRunList.js +1 -1
- package/dist/node/ui/hooks/useToolList.js +1 -1
- package/dist/node/ui/index.js +1222 -1222
- package/dist/node/ui/modals/AgentActionsModal.js +13 -13
- package/dist/node/ui/modals/CreateAgentModal.js +15 -15
- package/dist/node/ui/modals/index.js +297 -297
- package/dist/node/ui/renderers/agent-list.renderer.js +7 -7
- package/dist/node/ui/renderers/index.js +157 -157
- package/dist/node/ui/views/AgentListView.js +7 -7
- package/dist/node/ui/views/RunListView.js +16 -16
- package/dist/node/ui/views/ToolRegistryView.js +9 -9
- package/dist/node/ui/views/index.js +97 -97
- package/dist/presentations/index.d.ts +3 -5
- package/dist/presentations/index.js +4 -4
- package/dist/run/index.d.ts +7 -7
- package/dist/run/index.js +536 -536
- package/dist/run/run.event.js +2 -2
- package/dist/run/run.handler.d.ts +3 -0
- package/dist/run/run.presentation.js +2 -2
- package/dist/shared/index.d.ts +1 -1
- package/dist/tool/index.d.ts +7 -7
- package/dist/tool/index.js +260 -260
- package/dist/tool/tool.event.js +1 -1
- package/dist/tool/tool.handler.d.ts +1 -1
- package/dist/tool/tool.presentation.js +2 -2
- package/dist/ui/AgentDashboard.js +956 -956
- package/dist/ui/AgentRunList.js +16 -16
- package/dist/ui/AgentToolRegistry.js +9 -9
- package/dist/ui/hooks/index.d.ts +4 -4
- package/dist/ui/hooks/index.js +153 -153
- package/dist/ui/hooks/useAgentList.d.ts +5 -0
- package/dist/ui/hooks/useAgentList.js +1 -1
- package/dist/ui/hooks/useAgentMutations.d.ts +9 -2
- package/dist/ui/hooks/useAgentMutations.js +1 -1
- package/dist/ui/hooks/useRunList.d.ts +5 -0
- package/dist/ui/hooks/useRunList.js +1 -1
- package/dist/ui/hooks/useToolList.d.ts +5 -0
- package/dist/ui/hooks/useToolList.js +1 -1
- package/dist/ui/index.d.ts +3 -3
- package/dist/ui/index.js +1222 -1222
- package/dist/ui/modals/AgentActionsModal.js +13 -13
- package/dist/ui/modals/CreateAgentModal.js +15 -15
- package/dist/ui/modals/index.d.ts +1 -1
- package/dist/ui/modals/index.js +297 -297
- package/dist/ui/renderers/agent-list.markdown.d.ts +5 -0
- package/dist/ui/renderers/agent-list.renderer.js +7 -7
- package/dist/ui/renderers/dashboard.markdown.d.ts +5 -0
- package/dist/ui/renderers/index.d.ts +2 -2
- package/dist/ui/renderers/index.js +157 -157
- package/dist/ui/renderers/run-list.markdown.d.ts +5 -0
- package/dist/ui/renderers/tool-registry.markdown.d.ts +5 -0
- package/dist/ui/views/AgentListView.js +7 -7
- package/dist/ui/views/RunListView.js +16 -16
- package/dist/ui/views/ToolRegistryView.js +9 -9
- package/dist/ui/views/index.js +97 -97
- package/package.json +6 -6
- package/src/agent/agent.entity.ts +111 -111
- package/src/agent/agent.enum.ts +12 -12
- package/src/agent/agent.event.ts +91 -91
- package/src/agent/agent.handler.ts +123 -123
- package/src/agent/agent.operation.ts +400 -400
- package/src/agent/agent.presentation.ts +62 -62
- package/src/agent/agent.schema.ts +175 -175
- package/src/agent/agent.test-spec.ts +48 -48
- package/src/agent/index.ts +46 -51
- package/src/agent.capability.ts +11 -11
- package/src/agent.feature.ts +131 -131
- package/src/docs/agent-console.docblock.ts +42 -42
- package/src/example.ts +35 -35
- package/src/handlers/agent.handlers.ts +522 -521
- package/src/handlers/index.ts +12 -12
- package/src/index.ts +8 -9
- package/src/presentations/index.ts +11 -13
- package/src/run/index.ts +49 -54
- package/src/run/run.entity.ts +137 -137
- package/src/run/run.enum.ts +18 -18
- package/src/run/run.event.ts +174 -174
- package/src/run/run.handler.ts +92 -91
- package/src/run/run.operation.ts +474 -474
- package/src/run/run.presentation.ts +42 -42
- package/src/run/run.schema.ts +126 -126
- package/src/run/run.test-spec.ts +48 -48
- package/src/seeders/index.ts +21 -21
- package/src/shared/index.ts +1 -1
- package/src/shared/mock-agents.ts +76 -76
- package/src/shared/mock-runs.ts +102 -102
- package/src/shared/mock-tools.ts +140 -140
- package/src/shared/overlay-types.ts +23 -23
- package/src/tool/index.ts +39 -44
- package/src/tool/tool.entity.ts +73 -73
- package/src/tool/tool.enum.ts +13 -13
- package/src/tool/tool.event.ts +80 -80
- package/src/tool/tool.handler.ts +102 -102
- package/src/tool/tool.operation.ts +328 -328
- package/src/tool/tool.presentation.ts +43 -43
- package/src/tool/tool.schema.ts +106 -106
- package/src/tool/tool.test-spec.ts +48 -48
- package/src/ui/AgentDashboard.tsx +348 -348
- package/src/ui/hooks/index.ts +7 -7
- package/src/ui/hooks/useAgentList.ts +57 -56
- package/src/ui/hooks/useAgentMutations.ts +160 -159
- package/src/ui/hooks/useRunList.ts +58 -57
- package/src/ui/hooks/useToolList.ts +102 -101
- package/src/ui/index.ts +6 -9
- package/src/ui/modals/AgentActionsModal.tsx +262 -262
- package/src/ui/modals/CreateAgentModal.tsx +232 -232
- package/src/ui/modals/index.ts +1 -1
- package/src/ui/overlays/demo-overlays.ts +52 -52
- package/src/ui/renderers/agent-list.markdown.ts +61 -60
- package/src/ui/renderers/agent-list.renderer.tsx +14 -14
- package/src/ui/renderers/dashboard.markdown.ts +140 -139
- package/src/ui/renderers/index.ts +3 -4
- package/src/ui/renderers/run-list.markdown.ts +48 -47
- package/src/ui/renderers/tool-registry.markdown.ts +66 -65
- package/src/ui/views/AgentListView.tsx +90 -90
- package/src/ui/views/RunListView.tsx +141 -141
- package/src/ui/views/ToolRegistryView.tsx +113 -113
- package/tsconfig.json +7 -8
- package/tsdown.config.js +7 -3
|
@@ -2,80 +2,80 @@
|
|
|
2
2
|
* Mock agent data for testing and demos.
|
|
3
3
|
*/
|
|
4
4
|
export const MOCK_AGENTS = [
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
5
|
+
{
|
|
6
|
+
id: 'agent-1',
|
|
7
|
+
organizationId: 'demo-org',
|
|
8
|
+
name: 'Customer Support Bot',
|
|
9
|
+
slug: 'customer-support-bot',
|
|
10
|
+
description: 'Handles tier-1 customer inquiries and routes complex issues.',
|
|
11
|
+
status: 'ACTIVE' as const,
|
|
12
|
+
modelProvider: 'OPENAI' as const,
|
|
13
|
+
modelName: 'gpt-4o-mini',
|
|
14
|
+
modelConfig: { temperature: 0.7 },
|
|
15
|
+
systemPrompt: 'You are a helpful customer support assistant.',
|
|
16
|
+
toolChoice: 'auto' as const,
|
|
17
|
+
maxIterations: 10,
|
|
18
|
+
timeoutMs: 120000,
|
|
19
|
+
version: '1.0.0',
|
|
20
|
+
tags: ['support', 'tier-1'],
|
|
21
|
+
createdAt: new Date('2024-01-15T10:00:00Z'),
|
|
22
|
+
updatedAt: new Date('2024-03-20T14:30:00Z'),
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: 'agent-2',
|
|
26
|
+
organizationId: 'demo-org',
|
|
27
|
+
name: 'Code Review Assistant',
|
|
28
|
+
slug: 'code-review-assistant',
|
|
29
|
+
description: 'Reviews pull requests and provides actionable feedback.',
|
|
30
|
+
status: 'ACTIVE' as const,
|
|
31
|
+
modelProvider: 'ANTHROPIC' as const,
|
|
32
|
+
modelName: 'claude-sonnet-4-20250514',
|
|
33
|
+
modelConfig: { temperature: 0.3 },
|
|
34
|
+
systemPrompt: 'You are a code review expert.',
|
|
35
|
+
toolChoice: 'auto' as const,
|
|
36
|
+
maxIterations: 15,
|
|
37
|
+
timeoutMs: 180000,
|
|
38
|
+
version: '2.1.0',
|
|
39
|
+
tags: ['code', 'review', 'dev'],
|
|
40
|
+
createdAt: new Date('2024-02-10T09:00:00Z'),
|
|
41
|
+
updatedAt: new Date('2024-04-05T11:15:00Z'),
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: 'agent-3',
|
|
45
|
+
organizationId: 'demo-org',
|
|
46
|
+
name: 'Data Analyst',
|
|
47
|
+
slug: 'data-analyst',
|
|
48
|
+
description: 'Queries databases and generates insights from data.',
|
|
49
|
+
status: 'PAUSED' as const,
|
|
50
|
+
modelProvider: 'OPENAI' as const,
|
|
51
|
+
modelName: 'gpt-4o',
|
|
52
|
+
modelConfig: { temperature: 0.5 },
|
|
53
|
+
systemPrompt: 'You are a data analyst expert in SQL and analytics.',
|
|
54
|
+
toolChoice: 'required' as const,
|
|
55
|
+
maxIterations: 20,
|
|
56
|
+
timeoutMs: 300000,
|
|
57
|
+
version: '1.2.0',
|
|
58
|
+
tags: ['data', 'analytics', 'sql'],
|
|
59
|
+
createdAt: new Date('2024-03-01T08:00:00Z'),
|
|
60
|
+
updatedAt: new Date('2024-04-10T16:45:00Z'),
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
id: 'agent-4',
|
|
64
|
+
organizationId: 'demo-org',
|
|
65
|
+
name: 'Meeting Scheduler',
|
|
66
|
+
slug: 'meeting-scheduler',
|
|
67
|
+
description: 'Schedules meetings and manages calendar conflicts.',
|
|
68
|
+
status: 'DRAFT' as const,
|
|
69
|
+
modelProvider: 'GOOGLE' as const,
|
|
70
|
+
modelName: 'gemini-2.0-flash',
|
|
71
|
+
modelConfig: { temperature: 0.2 },
|
|
72
|
+
systemPrompt: 'You help schedule and organize meetings efficiently.',
|
|
73
|
+
toolChoice: 'auto' as const,
|
|
74
|
+
maxIterations: 5,
|
|
75
|
+
timeoutMs: 60000,
|
|
76
|
+
version: '0.1.0',
|
|
77
|
+
tags: ['calendar', 'scheduling'],
|
|
78
|
+
createdAt: new Date('2024-04-01T12:00:00Z'),
|
|
79
|
+
updatedAt: new Date('2024-04-01T12:00:00Z'),
|
|
80
|
+
},
|
|
81
81
|
];
|
package/src/shared/mock-runs.ts
CHANGED
|
@@ -2,106 +2,106 @@
|
|
|
2
2
|
* Mock run data for testing and demos.
|
|
3
3
|
*/
|
|
4
4
|
export const MOCK_RUNS = [
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
5
|
+
{
|
|
6
|
+
id: 'run-1',
|
|
7
|
+
organizationId: 'demo-org',
|
|
8
|
+
agentId: 'agent-1',
|
|
9
|
+
agentName: 'Customer Support Bot',
|
|
10
|
+
userId: 'user-1',
|
|
11
|
+
sessionId: 'session-1',
|
|
12
|
+
input: { message: 'How do I reset my password?', context: {} },
|
|
13
|
+
output: { response: 'You can reset your password by clicking...' },
|
|
14
|
+
status: 'COMPLETED' as const,
|
|
15
|
+
totalTokens: 1250,
|
|
16
|
+
promptTokens: 800,
|
|
17
|
+
completionTokens: 450,
|
|
18
|
+
totalIterations: 3,
|
|
19
|
+
durationMs: 4500,
|
|
20
|
+
estimatedCostUsd: 0.0025,
|
|
21
|
+
queuedAt: new Date('2024-04-15T10:00:00Z'),
|
|
22
|
+
startedAt: new Date('2024-04-15T10:00:01Z'),
|
|
23
|
+
completedAt: new Date('2024-04-15T10:00:05Z'),
|
|
24
|
+
steps: [],
|
|
25
|
+
logs: [],
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: 'run-2',
|
|
29
|
+
organizationId: 'demo-org',
|
|
30
|
+
agentId: 'agent-2',
|
|
31
|
+
agentName: 'Code Review Assistant',
|
|
32
|
+
userId: 'user-2',
|
|
33
|
+
input: { message: 'Review PR #123', context: { prNumber: 123 } },
|
|
34
|
+
status: 'IN_PROGRESS' as const,
|
|
35
|
+
totalTokens: 3500,
|
|
36
|
+
promptTokens: 3000,
|
|
37
|
+
completionTokens: 500,
|
|
38
|
+
totalIterations: 5,
|
|
39
|
+
queuedAt: new Date('2024-04-15T10:30:00Z'),
|
|
40
|
+
startedAt: new Date('2024-04-15T10:30:02Z'),
|
|
41
|
+
steps: [],
|
|
42
|
+
logs: [],
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: 'run-3',
|
|
46
|
+
organizationId: 'demo-org',
|
|
47
|
+
agentId: 'agent-1',
|
|
48
|
+
agentName: 'Customer Support Bot',
|
|
49
|
+
userId: 'user-1',
|
|
50
|
+
input: { message: 'What are your business hours?' },
|
|
51
|
+
output: { response: 'Our business hours are 9 AM to 5 PM EST...' },
|
|
52
|
+
status: 'COMPLETED' as const,
|
|
53
|
+
totalTokens: 800,
|
|
54
|
+
promptTokens: 500,
|
|
55
|
+
completionTokens: 300,
|
|
56
|
+
totalIterations: 2,
|
|
57
|
+
durationMs: 2100,
|
|
58
|
+
estimatedCostUsd: 0.0012,
|
|
59
|
+
queuedAt: new Date('2024-04-15T09:00:00Z'),
|
|
60
|
+
startedAt: new Date('2024-04-15T09:00:01Z'),
|
|
61
|
+
completedAt: new Date('2024-04-15T09:00:03Z'),
|
|
62
|
+
steps: [],
|
|
63
|
+
logs: [],
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: 'run-4',
|
|
67
|
+
organizationId: 'demo-org',
|
|
68
|
+
agentId: 'agent-3',
|
|
69
|
+
agentName: 'Data Analyst',
|
|
70
|
+
userId: 'user-3',
|
|
71
|
+
input: { message: 'Generate sales report for Q1' },
|
|
72
|
+
status: 'FAILED' as const,
|
|
73
|
+
errorMessage: 'Database connection timeout',
|
|
74
|
+
errorCode: 'DB_TIMEOUT',
|
|
75
|
+
totalTokens: 2000,
|
|
76
|
+
promptTokens: 1500,
|
|
77
|
+
completionTokens: 500,
|
|
78
|
+
totalIterations: 8,
|
|
79
|
+
durationMs: 45000,
|
|
80
|
+
queuedAt: new Date('2024-04-14T15:00:00Z'),
|
|
81
|
+
startedAt: new Date('2024-04-14T15:00:05Z'),
|
|
82
|
+
completedAt: new Date('2024-04-14T15:00:50Z'),
|
|
83
|
+
steps: [],
|
|
84
|
+
logs: [],
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
id: 'run-5',
|
|
88
|
+
organizationId: 'demo-org',
|
|
89
|
+
agentId: 'agent-2',
|
|
90
|
+
agentName: 'Code Review Assistant',
|
|
91
|
+
userId: 'user-2',
|
|
92
|
+
input: { message: 'Review PR #120' },
|
|
93
|
+
output: { response: 'Code review complete. 3 suggestions...' },
|
|
94
|
+
status: 'COMPLETED' as const,
|
|
95
|
+
totalTokens: 5200,
|
|
96
|
+
promptTokens: 4000,
|
|
97
|
+
completionTokens: 1200,
|
|
98
|
+
totalIterations: 7,
|
|
99
|
+
durationMs: 15000,
|
|
100
|
+
estimatedCostUsd: 0.0156,
|
|
101
|
+
queuedAt: new Date('2024-04-14T11:00:00Z'),
|
|
102
|
+
startedAt: new Date('2024-04-14T11:00:03Z'),
|
|
103
|
+
completedAt: new Date('2024-04-14T11:00:18Z'),
|
|
104
|
+
steps: [],
|
|
105
|
+
logs: [],
|
|
106
|
+
},
|
|
107
107
|
];
|
package/src/shared/mock-tools.ts
CHANGED
|
@@ -2,144 +2,144 @@
|
|
|
2
2
|
* Mock tool data for testing and demos.
|
|
3
3
|
*/
|
|
4
4
|
export const MOCK_TOOLS = [
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
5
|
+
{
|
|
6
|
+
id: 'tool-1',
|
|
7
|
+
organizationId: 'demo-org',
|
|
8
|
+
name: 'Web Search',
|
|
9
|
+
slug: 'web-search',
|
|
10
|
+
description: 'Search the web for real-time information using Brave API.',
|
|
11
|
+
category: 'RETRIEVAL' as const,
|
|
12
|
+
status: 'ACTIVE' as const,
|
|
13
|
+
parametersSchema: {
|
|
14
|
+
type: 'object',
|
|
15
|
+
properties: {
|
|
16
|
+
query: { type: 'string', description: 'Search query' },
|
|
17
|
+
numResults: { type: 'number', default: 10 },
|
|
18
|
+
},
|
|
19
|
+
required: ['query'],
|
|
20
|
+
},
|
|
21
|
+
outputSchema: { type: 'array', items: { type: 'object' } },
|
|
22
|
+
implementationType: 'http' as const,
|
|
23
|
+
implementationConfig: {
|
|
24
|
+
url: 'https://api.brave.com/search',
|
|
25
|
+
method: 'GET',
|
|
26
|
+
},
|
|
27
|
+
maxInvocationsPerMinute: 60,
|
|
28
|
+
timeoutMs: 30000,
|
|
29
|
+
version: '1.0.0',
|
|
30
|
+
tags: ['search', 'web'],
|
|
31
|
+
createdAt: new Date('2024-01-01T00:00:00Z'),
|
|
32
|
+
updatedAt: new Date('2024-02-15T10:00:00Z'),
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
id: 'tool-2',
|
|
36
|
+
organizationId: 'demo-org',
|
|
37
|
+
name: 'SQL Query',
|
|
38
|
+
slug: 'sql-query',
|
|
39
|
+
description: 'Execute read-only SQL queries against the data warehouse.',
|
|
40
|
+
category: 'RETRIEVAL' as const,
|
|
41
|
+
status: 'ACTIVE' as const,
|
|
42
|
+
parametersSchema: {
|
|
43
|
+
type: 'object',
|
|
44
|
+
properties: {
|
|
45
|
+
query: { type: 'string', description: 'SQL query' },
|
|
46
|
+
maxRows: { type: 'number', default: 100 },
|
|
47
|
+
},
|
|
48
|
+
required: ['query'],
|
|
49
|
+
},
|
|
50
|
+
outputSchema: { type: 'object' },
|
|
51
|
+
implementationType: 'function' as const,
|
|
52
|
+
implementationConfig: { handler: 'executeSqlQuery' },
|
|
53
|
+
maxInvocationsPerMinute: 30,
|
|
54
|
+
timeoutMs: 60000,
|
|
55
|
+
version: '1.1.0',
|
|
56
|
+
tags: ['sql', 'database'],
|
|
57
|
+
createdAt: new Date('2024-01-05T00:00:00Z'),
|
|
58
|
+
updatedAt: new Date('2024-03-10T14:00:00Z'),
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
id: 'tool-3',
|
|
62
|
+
organizationId: 'demo-org',
|
|
63
|
+
name: 'Email Sender',
|
|
64
|
+
slug: 'email-sender',
|
|
65
|
+
description: 'Send emails via SMTP or API.',
|
|
66
|
+
category: 'COMMUNICATION' as const,
|
|
67
|
+
status: 'ACTIVE' as const,
|
|
68
|
+
parametersSchema: {
|
|
69
|
+
type: 'object',
|
|
70
|
+
properties: {
|
|
71
|
+
to: { type: 'string' },
|
|
72
|
+
subject: { type: 'string' },
|
|
73
|
+
body: { type: 'string' },
|
|
74
|
+
},
|
|
75
|
+
required: ['to', 'subject', 'body'],
|
|
76
|
+
},
|
|
77
|
+
implementationType: 'http' as const,
|
|
78
|
+
implementationConfig: { url: '/api/send-email', method: 'POST' },
|
|
79
|
+
maxInvocationsPerMinute: 10,
|
|
80
|
+
timeoutMs: 30000,
|
|
81
|
+
version: '1.0.0',
|
|
82
|
+
tags: ['email', 'communication'],
|
|
83
|
+
createdAt: new Date('2024-02-01T00:00:00Z'),
|
|
84
|
+
updatedAt: new Date('2024-02-01T00:00:00Z'),
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
id: 'tool-4',
|
|
88
|
+
organizationId: 'demo-org',
|
|
89
|
+
name: 'GitHub Integration',
|
|
90
|
+
slug: 'github-integration',
|
|
91
|
+
description: 'Interact with GitHub repositories, PRs, and issues.',
|
|
92
|
+
category: 'INTEGRATION' as const,
|
|
93
|
+
status: 'ACTIVE' as const,
|
|
94
|
+
parametersSchema: {
|
|
95
|
+
type: 'object',
|
|
96
|
+
properties: {
|
|
97
|
+
action: {
|
|
98
|
+
type: 'string',
|
|
99
|
+
enum: ['list_prs', 'get_pr', 'create_comment'],
|
|
100
|
+
},
|
|
101
|
+
repo: { type: 'string' },
|
|
102
|
+
params: { type: 'object' },
|
|
103
|
+
},
|
|
104
|
+
required: ['action', 'repo'],
|
|
105
|
+
},
|
|
106
|
+
implementationType: 'http' as const,
|
|
107
|
+
implementationConfig: { url: 'https://api.github.com', auth: 'token' },
|
|
108
|
+
maxInvocationsPerMinute: 100,
|
|
109
|
+
timeoutMs: 15000,
|
|
110
|
+
version: '2.0.0',
|
|
111
|
+
tags: ['github', 'integration', 'code'],
|
|
112
|
+
createdAt: new Date('2024-02-20T00:00:00Z'),
|
|
113
|
+
updatedAt: new Date('2024-04-01T09:00:00Z'),
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
id: 'tool-5',
|
|
117
|
+
organizationId: 'demo-org',
|
|
118
|
+
name: 'Calculator',
|
|
119
|
+
slug: 'calculator',
|
|
120
|
+
description: 'Perform mathematical calculations.',
|
|
121
|
+
category: 'COMPUTATION' as const,
|
|
122
|
+
status: 'ACTIVE' as const,
|
|
123
|
+
parametersSchema: {
|
|
124
|
+
type: 'object',
|
|
125
|
+
properties: {
|
|
126
|
+
expression: {
|
|
127
|
+
type: 'string',
|
|
128
|
+
description: 'Math expression to evaluate',
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
required: ['expression'],
|
|
132
|
+
},
|
|
133
|
+
outputSchema: {
|
|
134
|
+
type: 'object',
|
|
135
|
+
properties: { result: { type: 'number' } },
|
|
136
|
+
},
|
|
137
|
+
implementationType: 'function' as const,
|
|
138
|
+
implementationConfig: { handler: 'evaluateMath' },
|
|
139
|
+
timeoutMs: 5000,
|
|
140
|
+
version: '1.0.0',
|
|
141
|
+
tags: ['math', 'utility'],
|
|
142
|
+
createdAt: new Date('2024-01-10T00:00:00Z'),
|
|
143
|
+
updatedAt: new Date('2024-01-10T00:00:00Z'),
|
|
144
|
+
},
|
|
145
145
|
];
|