@lssm/example.agent-console 1.41.0 → 1.42.2
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 +133 -0
- package/.turbo/turbo-build.log +129 -41
- package/CHANGELOG.md +40 -0
- package/LICENSE +21 -0
- package/README.md +3 -0
- package/dist/agent/agent.entity.d.ts +55 -0
- package/dist/agent/agent.entity.d.ts.map +1 -0
- package/dist/agent/agent.entity.js +136 -1
- package/dist/agent/agent.entity.js.map +1 -0
- package/dist/agent/agent.enum.d.ts +18 -0
- package/dist/agent/agent.enum.d.ts.map +1 -0
- package/dist/agent/agent.enum.js +34 -1
- package/dist/agent/agent.enum.js.map +1 -0
- package/dist/agent/agent.event.d.ts +128 -0
- package/dist/agent/agent.event.d.ts.map +1 -0
- package/dist/agent/agent.event.js +210 -1
- package/dist/agent/agent.event.js.map +1 -0
- package/dist/agent/agent.handler.d.ts +100 -0
- package/dist/agent/agent.handler.d.ts.map +1 -0
- package/dist/agent/agent.handler.js +84 -1
- package/dist/agent/agent.handler.js.map +1 -0
- package/dist/agent/agent.operation.d.ts +471 -0
- package/dist/agent/agent.operation.d.ts.map +1 -0
- package/dist/agent/agent.operation.js +486 -0
- package/dist/agent/agent.operation.js.map +1 -0
- package/dist/agent/agent.presentation.d.ts +19 -0
- package/dist/agent/agent.presentation.d.ts.map +1 -0
- package/dist/agent/agent.presentation.js +89 -1
- package/dist/agent/agent.presentation.js.map +1 -0
- package/dist/agent/agent.schema.d.ts +401 -0
- package/dist/agent/agent.schema.d.ts.map +1 -0
- package/dist/agent/agent.schema.js +406 -1
- package/dist/agent/agent.schema.js.map +1 -0
- package/dist/agent/index.d.ts +8 -0
- package/dist/agent/index.js +9 -1
- package/dist/agent.feature.d.ts +12 -0
- package/dist/agent.feature.d.ts.map +1 -0
- package/dist/agent.feature.js +303 -1
- package/dist/agent.feature.js.map +1 -0
- package/dist/docs/agent-console.docblock.d.ts +1 -0
- package/dist/docs/agent-console.docblock.js +69 -5
- package/dist/docs/agent-console.docblock.js.map +1 -0
- package/dist/docs/index.d.ts +1 -0
- package/dist/docs/index.js +1 -1
- package/dist/example.d.ts +40 -0
- package/dist/example.d.ts.map +1 -0
- package/dist/example.js +51 -1
- package/dist/example.js.map +1 -0
- package/dist/handlers/index.d.ts +4 -0
- package/dist/handlers/index.js +5 -1
- package/dist/index.d.ts +30 -0
- package/dist/index.js +32 -1
- package/dist/presentations/index.d.ts +4 -0
- package/dist/presentations/index.js +5 -1
- package/dist/run/index.d.ts +8 -0
- package/dist/run/index.js +9 -1
- package/dist/run/run.entity.d.ts +82 -0
- package/dist/run/run.entity.d.ts.map +1 -0
- package/dist/run/run.entity.js +205 -1
- package/dist/run/run.entity.js.map +1 -0
- package/dist/run/run.enum.d.ts +22 -0
- package/dist/run/run.enum.d.ts.map +1 -0
- package/dist/run/run.enum.js +45 -1
- package/dist/run/run.enum.js.map +1 -0
- package/dist/run/run.event.d.ts +290 -0
- package/dist/run/run.event.d.ts.map +1 -0
- package/dist/run/run.event.js +434 -1
- package/dist/run/run.event.js.map +1 -0
- package/dist/run/run.handler.d.ts +203 -0
- package/dist/run/run.handler.d.ts.map +1 -0
- package/dist/run/run.handler.js +83 -1
- package/dist/run/run.handler.js.map +1 -0
- package/dist/run/run.operation.d.ts +720 -0
- package/dist/run/run.operation.d.ts.map +1 -0
- package/dist/run/run.operation.js +626 -0
- package/dist/run/run.operation.js.map +1 -0
- package/dist/run/run.presentation.d.ts +15 -0
- package/dist/run/run.presentation.d.ts.map +1 -0
- package/dist/run/run.presentation.js +65 -1
- package/dist/run/run.presentation.js.map +1 -0
- package/dist/run/run.schema.d.ts +416 -0
- package/dist/run/run.schema.d.ts.map +1 -0
- package/dist/run/run.schema.js +338 -1
- package/dist/run/run.schema.js.map +1 -0
- package/dist/shared/index.d.ts +4 -0
- package/dist/shared/index.js +5 -1
- package/dist/shared/mock-agents.d.ts +88 -0
- package/dist/shared/mock-agents.d.ts.map +1 -0
- package/dist/shared/mock-agents.js +94 -1
- package/dist/shared/mock-agents.js.map +1 -0
- package/dist/shared/mock-runs.d.ts +120 -0
- package/dist/shared/mock-runs.d.ts.map +1 -0
- package/dist/shared/mock-runs.js +118 -1
- package/dist/shared/mock-runs.js.map +1 -0
- package/dist/shared/mock-tools.d.ts +244 -0
- package/dist/shared/mock-tools.d.ts.map +1 -0
- package/dist/shared/mock-tools.js +181 -1
- package/dist/shared/mock-tools.js.map +1 -0
- package/dist/tool/index.d.ts +8 -0
- package/dist/tool/index.js +9 -1
- package/dist/tool/tool.entity.d.ts +42 -0
- package/dist/tool/tool.entity.d.ts.map +1 -0
- package/dist/tool/tool.entity.js +105 -1
- package/dist/tool/tool.entity.js.map +1 -0
- package/dist/tool/tool.enum.d.ts +18 -0
- package/dist/tool/tool.enum.d.ts.map +1 -0
- package/dist/tool/tool.enum.js +35 -1
- package/dist/tool/tool.enum.js.map +1 -0
- package/dist/tool/tool.event.d.ts +103 -0
- package/dist/tool/tool.event.d.ts.map +1 -0
- package/dist/tool/tool.event.js +159 -1
- package/dist/tool/tool.event.js.map +1 -0
- package/dist/tool/tool.handler.d.ts +315 -0
- package/dist/tool/tool.handler.d.ts.map +1 -0
- package/dist/tool/tool.handler.js +87 -1
- package/dist/tool/tool.handler.js.map +1 -0
- package/dist/tool/tool.operation.d.ts +411 -0
- package/dist/tool/tool.operation.d.ts.map +1 -0
- package/dist/tool/tool.operation.js +406 -0
- package/dist/tool/tool.operation.js.map +1 -0
- package/dist/tool/tool.presentation.d.ts +15 -0
- package/dist/tool/tool.presentation.d.ts.map +1 -0
- package/dist/tool/tool.presentation.js +65 -1
- package/dist/tool/tool.presentation.js.map +1 -0
- package/dist/tool/tool.schema.d.ts +218 -0
- package/dist/tool/tool.schema.d.ts.map +1 -0
- package/dist/tool/tool.schema.js +236 -1
- package/dist/tool/tool.schema.js.map +1 -0
- package/package.json +59 -49
- package/src/agent/agent.entity.ts +1 -6
- package/src/agent/agent.event.ts +34 -12
- package/src/agent/{agent.contracts.ts → agent.operation.ts} +176 -10
- package/src/agent/agent.presentation.ts +20 -7
- package/src/agent/index.ts +1 -1
- package/src/agent.feature.ts +58 -56
- package/src/run/index.ts +1 -1
- package/src/run/run.entity.ts +1 -6
- package/src/run/run.event.ts +58 -21
- package/src/run/{run.contracts.ts → run.operation.ts} +165 -14
- package/src/run/run.presentation.ts +14 -5
- package/src/tool/index.ts +1 -1
- package/src/tool/tool.entity.ts +1 -6
- package/src/tool/tool.event.ts +27 -10
- package/src/tool/{tool.contracts.ts → tool.operation.ts} +133 -10
- package/src/tool/tool.presentation.ts +14 -5
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/agent/agent.contracts.js +0 -1
- package/dist/run/run.contracts.js +0 -1
- package/dist/tool/tool.contracts.js +0 -1
package/src/agent/agent.event.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { defineEvent, defineSchemaModel } from '@lssm/lib.contracts';
|
|
2
2
|
import { ScalarTypeEnum } from '@lssm/lib.schema';
|
|
3
3
|
|
|
4
|
+
const OWNERS = ['@agent-console-team'] as const;
|
|
5
|
+
|
|
4
6
|
/**
|
|
5
7
|
* Payload for agent created event.
|
|
6
8
|
*/
|
|
@@ -30,9 +32,14 @@ const AgentCreatedPayload = defineSchemaModel({
|
|
|
30
32
|
* AgentCreatedEvent - A new agent was created.
|
|
31
33
|
*/
|
|
32
34
|
export const AgentCreatedEvent = defineEvent({
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
meta: {
|
|
36
|
+
key: 'agent-console.agent.created',
|
|
37
|
+
version: 1,
|
|
38
|
+
description: 'A new AI agent was configured.',
|
|
39
|
+
stability: 'stable',
|
|
40
|
+
owners: [...OWNERS],
|
|
41
|
+
tags: ['agent', 'created'],
|
|
42
|
+
},
|
|
36
43
|
payload: AgentCreatedPayload,
|
|
37
44
|
});
|
|
38
45
|
|
|
@@ -63,9 +70,14 @@ const AgentUpdatedPayload = defineSchemaModel({
|
|
|
63
70
|
* AgentUpdatedEvent - An agent was updated.
|
|
64
71
|
*/
|
|
65
72
|
export const AgentUpdatedEvent = defineEvent({
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
73
|
+
meta: {
|
|
74
|
+
key: 'agent-console.agent.updated',
|
|
75
|
+
version: 1,
|
|
76
|
+
description: 'An AI agent configuration was updated.',
|
|
77
|
+
stability: 'stable',
|
|
78
|
+
owners: [...OWNERS],
|
|
79
|
+
tags: ['agent', 'updated'],
|
|
80
|
+
},
|
|
69
81
|
payload: AgentUpdatedPayload,
|
|
70
82
|
});
|
|
71
83
|
|
|
@@ -88,9 +100,14 @@ const AgentToolAssignedPayload = defineSchemaModel({
|
|
|
88
100
|
* AgentToolAssignedEvent - A tool was assigned to an agent.
|
|
89
101
|
*/
|
|
90
102
|
export const AgentToolAssignedEvent = defineEvent({
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
103
|
+
meta: {
|
|
104
|
+
key: 'agent-console.agent.toolAssigned',
|
|
105
|
+
version: 1,
|
|
106
|
+
description: 'A tool was assigned to an agent.',
|
|
107
|
+
stability: 'stable',
|
|
108
|
+
owners: [...OWNERS],
|
|
109
|
+
tags: ['agent', 'tool', 'assigned'],
|
|
110
|
+
},
|
|
94
111
|
payload: AgentToolAssignedPayload,
|
|
95
112
|
});
|
|
96
113
|
|
|
@@ -113,8 +130,13 @@ const AgentToolRemovedPayload = defineSchemaModel({
|
|
|
113
130
|
* AgentToolRemovedEvent - A tool was removed from an agent.
|
|
114
131
|
*/
|
|
115
132
|
export const AgentToolRemovedEvent = defineEvent({
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
133
|
+
meta: {
|
|
134
|
+
key: 'agent-console.agent.toolRemoved',
|
|
135
|
+
version: 1,
|
|
136
|
+
description: 'A tool was removed from an agent.',
|
|
137
|
+
stability: 'stable',
|
|
138
|
+
owners: [...OWNERS],
|
|
139
|
+
tags: ['agent', 'tool', 'removed'],
|
|
140
|
+
},
|
|
119
141
|
payload: AgentToolRemovedPayload,
|
|
120
142
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineCommand, defineQuery } from '@lssm/lib.contracts/
|
|
1
|
+
import { defineCommand, defineQuery } from '@lssm/lib.contracts/operations';
|
|
2
2
|
import { defineSchemaModel, ScalarTypeEnum } from '@lssm/lib.schema';
|
|
3
3
|
import { AgentStatusEnum, ModelProviderEnum } from './agent.enum';
|
|
4
4
|
import {
|
|
@@ -16,7 +16,7 @@ const OWNERS = ['@agent-console-team'] as const;
|
|
|
16
16
|
*/
|
|
17
17
|
export const CreateAgentCommand = defineCommand({
|
|
18
18
|
meta: {
|
|
19
|
-
|
|
19
|
+
key: 'agent-console.agent.create',
|
|
20
20
|
version: 1,
|
|
21
21
|
stability: 'stable',
|
|
22
22
|
owners: [...OWNERS],
|
|
@@ -53,11 +53,47 @@ export const CreateAgentCommand = defineCommand({
|
|
|
53
53
|
// name: 'agent.created',
|
|
54
54
|
// version: 1,
|
|
55
55
|
// payload: AgentSummaryModel,
|
|
56
|
-
ref: AgentCreatedEvent,
|
|
56
|
+
ref: AgentCreatedEvent.meta,
|
|
57
57
|
when: 'Agent is successfully created',
|
|
58
58
|
},
|
|
59
59
|
],
|
|
60
|
-
audit: ['agent.created'],
|
|
60
|
+
audit: ['agent-console.agent.created'],
|
|
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
|
+
],
|
|
61
97
|
},
|
|
62
98
|
});
|
|
63
99
|
|
|
@@ -66,7 +102,7 @@ export const CreateAgentCommand = defineCommand({
|
|
|
66
102
|
*/
|
|
67
103
|
export const UpdateAgentCommand = defineCommand({
|
|
68
104
|
meta: {
|
|
69
|
-
|
|
105
|
+
key: 'agent-console.agent.update',
|
|
70
106
|
version: 1,
|
|
71
107
|
stability: 'stable',
|
|
72
108
|
owners: [...OWNERS],
|
|
@@ -99,14 +135,49 @@ export const UpdateAgentCommand = defineCommand({
|
|
|
99
135
|
sideEffects: {
|
|
100
136
|
emits: [
|
|
101
137
|
{
|
|
102
|
-
|
|
138
|
+
key: 'agent.updated',
|
|
103
139
|
version: 1,
|
|
140
|
+
stability: 'stable',
|
|
141
|
+
owners: [...OWNERS],
|
|
142
|
+
tags: ['agent', 'updated'],
|
|
104
143
|
when: 'Agent is updated',
|
|
105
144
|
payload: AgentSummaryModel,
|
|
106
145
|
},
|
|
107
146
|
],
|
|
108
147
|
audit: ['agent.updated'],
|
|
109
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
|
+
},
|
|
110
181
|
});
|
|
111
182
|
|
|
112
183
|
/**
|
|
@@ -114,7 +185,7 @@ export const UpdateAgentCommand = defineCommand({
|
|
|
114
185
|
*/
|
|
115
186
|
export const GetAgentQuery = defineQuery({
|
|
116
187
|
meta: {
|
|
117
|
-
|
|
188
|
+
key: 'agent-console.agent.get',
|
|
118
189
|
version: 1,
|
|
119
190
|
stability: 'stable',
|
|
120
191
|
owners: [...OWNERS],
|
|
@@ -142,6 +213,34 @@ export const GetAgentQuery = defineQuery({
|
|
|
142
213
|
},
|
|
143
214
|
},
|
|
144
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
|
+
},
|
|
145
244
|
});
|
|
146
245
|
|
|
147
246
|
/**
|
|
@@ -149,7 +248,7 @@ export const GetAgentQuery = defineQuery({
|
|
|
149
248
|
*/
|
|
150
249
|
export const ListAgentsQuery = defineQuery({
|
|
151
250
|
meta: {
|
|
152
|
-
|
|
251
|
+
key: 'agent-console.agent.list',
|
|
153
252
|
version: 1,
|
|
154
253
|
stability: 'stable',
|
|
155
254
|
owners: [...OWNERS],
|
|
@@ -191,6 +290,29 @@ export const ListAgentsQuery = defineQuery({
|
|
|
191
290
|
}),
|
|
192
291
|
},
|
|
193
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
|
+
},
|
|
194
316
|
});
|
|
195
317
|
|
|
196
318
|
/**
|
|
@@ -198,7 +320,7 @@ export const ListAgentsQuery = defineQuery({
|
|
|
198
320
|
*/
|
|
199
321
|
export const AssignToolToAgentCommand = defineCommand({
|
|
200
322
|
meta: {
|
|
201
|
-
|
|
323
|
+
key: 'agent-console.agent.assignTool',
|
|
202
324
|
version: 1,
|
|
203
325
|
stability: 'stable',
|
|
204
326
|
owners: [...OWNERS],
|
|
@@ -239,6 +361,33 @@ export const AssignToolToAgentCommand = defineCommand({
|
|
|
239
361
|
},
|
|
240
362
|
policy: { auth: 'user' },
|
|
241
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
|
+
},
|
|
242
391
|
});
|
|
243
392
|
|
|
244
393
|
/**
|
|
@@ -246,7 +395,7 @@ export const AssignToolToAgentCommand = defineCommand({
|
|
|
246
395
|
*/
|
|
247
396
|
export const RemoveToolFromAgentCommand = defineCommand({
|
|
248
397
|
meta: {
|
|
249
|
-
|
|
398
|
+
key: 'agent-console.agent.removeTool',
|
|
250
399
|
version: 1,
|
|
251
400
|
stability: 'stable',
|
|
252
401
|
owners: [...OWNERS],
|
|
@@ -272,4 +421,21 @@ export const RemoveToolFromAgentCommand = defineCommand({
|
|
|
272
421
|
},
|
|
273
422
|
policy: { auth: 'user' },
|
|
274
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
|
+
},
|
|
275
441
|
});
|
|
@@ -1,18 +1,23 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PresentationSpec } from '@lssm/lib.contracts';
|
|
2
|
+
import { StabilityEnum } from '@lssm/lib.contracts';
|
|
2
3
|
import { AgentSummaryModel } from './agent.schema';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Presentation for displaying a list of AI agents.
|
|
6
7
|
*/
|
|
7
|
-
export const AgentListPresentation:
|
|
8
|
+
export const AgentListPresentation: PresentationSpec = {
|
|
8
9
|
meta: {
|
|
9
|
-
|
|
10
|
+
key: 'agent-console.agent.list',
|
|
10
11
|
version: 1,
|
|
12
|
+
title: 'Agent List',
|
|
11
13
|
description:
|
|
12
14
|
'List view of AI agents with status, model provider, and version info',
|
|
15
|
+
goal: 'Provide an overview of all agents in an organization.',
|
|
16
|
+
context: 'Main landing page for agent management.',
|
|
13
17
|
domain: 'agent-console',
|
|
14
18
|
owners: ['@agent-console-team'],
|
|
15
19
|
tags: ['agent', 'list', 'dashboard'],
|
|
20
|
+
stability: StabilityEnum.Experimental,
|
|
16
21
|
},
|
|
17
22
|
source: {
|
|
18
23
|
type: 'component',
|
|
@@ -27,15 +32,19 @@ export const AgentListPresentation: PresentationDescriptorV2 = {
|
|
|
27
32
|
/**
|
|
28
33
|
* Presentation for agent detail view.
|
|
29
34
|
*/
|
|
30
|
-
export const AgentDetailPresentation:
|
|
35
|
+
export const AgentDetailPresentation: PresentationSpec = {
|
|
31
36
|
meta: {
|
|
32
|
-
|
|
37
|
+
key: 'agent-console.agent.detail',
|
|
33
38
|
version: 1,
|
|
39
|
+
title: 'Agent Details',
|
|
34
40
|
description:
|
|
35
41
|
'Detailed view of an AI agent with configuration, tools, and recent runs',
|
|
42
|
+
goal: 'Allow users to inspect and configure a specific agent.',
|
|
43
|
+
context: 'Detailed view of an agent.',
|
|
36
44
|
domain: 'agent-console',
|
|
37
45
|
owners: ['@agent-console-team'],
|
|
38
46
|
tags: ['agent', 'detail'],
|
|
47
|
+
stability: StabilityEnum.Experimental,
|
|
39
48
|
},
|
|
40
49
|
source: {
|
|
41
50
|
type: 'component',
|
|
@@ -49,14 +58,18 @@ export const AgentDetailPresentation: PresentationDescriptorV2 = {
|
|
|
49
58
|
/**
|
|
50
59
|
* Dashboard presentation for Agent Console - overview of agents, runs, and tools.
|
|
51
60
|
*/
|
|
52
|
-
export const AgentConsoleDashboardPresentation:
|
|
61
|
+
export const AgentConsoleDashboardPresentation: PresentationSpec = {
|
|
53
62
|
meta: {
|
|
54
|
-
|
|
63
|
+
key: 'agent-console.dashboard',
|
|
55
64
|
version: 1,
|
|
65
|
+
title: 'Agent Console Dashboard',
|
|
56
66
|
description: 'Dashboard overview of AI agents, runs, and tools',
|
|
67
|
+
goal: 'Provide a high-level overview of the AI platform health and usage.',
|
|
68
|
+
context: 'Root dashboard of the Agent Console.',
|
|
57
69
|
domain: 'agent-console',
|
|
58
70
|
owners: ['@agent-console-team'],
|
|
59
71
|
tags: ['dashboard', 'overview'],
|
|
72
|
+
stability: StabilityEnum.Experimental,
|
|
60
73
|
},
|
|
61
74
|
source: {
|
|
62
75
|
type: 'component',
|
package/src/agent/index.ts
CHANGED
package/src/agent.feature.ts
CHANGED
|
@@ -12,122 +12,123 @@ import type { FeatureModuleSpec } from '@lssm/lib.contracts';
|
|
|
12
12
|
export const AgentConsoleFeature: FeatureModuleSpec = {
|
|
13
13
|
meta: {
|
|
14
14
|
key: 'agent-console',
|
|
15
|
+
version: 1,
|
|
15
16
|
title: 'AI Agent Console',
|
|
16
17
|
description: 'AI agent orchestration with tools, runs, and logs management',
|
|
17
18
|
domain: 'ai-ops',
|
|
18
19
|
owners: ['@agent-console-team'],
|
|
19
20
|
tags: ['ai', 'agents', 'orchestration'],
|
|
20
|
-
stability: '
|
|
21
|
+
stability: 'stable',
|
|
21
22
|
},
|
|
22
23
|
|
|
23
24
|
// All contract operations included in this feature
|
|
24
25
|
operations: [
|
|
25
26
|
// Agent operations
|
|
26
|
-
{
|
|
27
|
-
{
|
|
28
|
-
{
|
|
29
|
-
{
|
|
30
|
-
{
|
|
31
|
-
{
|
|
27
|
+
{ key: 'agent-console.agent.create', version: 1 },
|
|
28
|
+
{ key: 'agent-console.agent.update', version: 1 },
|
|
29
|
+
{ key: 'agent-console.agent.get', version: 1 },
|
|
30
|
+
{ key: 'agent-console.agent.list', version: 1 },
|
|
31
|
+
{ key: 'agent-console.agent.assignTool', version: 1 },
|
|
32
|
+
{ key: 'agent-console.agent.removeTool', version: 1 },
|
|
32
33
|
|
|
33
34
|
// Tool operations
|
|
34
|
-
{
|
|
35
|
-
{
|
|
36
|
-
{
|
|
37
|
-
{
|
|
38
|
-
{
|
|
35
|
+
{ key: 'agent.tool.create', version: 1 },
|
|
36
|
+
{ key: 'agent.tool.update', version: 1 },
|
|
37
|
+
{ key: 'agent.tool.get', version: 1 },
|
|
38
|
+
{ key: 'agent.tool.list', version: 1 },
|
|
39
|
+
{ key: 'agent.tool.test', version: 1 },
|
|
39
40
|
|
|
40
41
|
// Run operations
|
|
41
|
-
{
|
|
42
|
-
{
|
|
43
|
-
{
|
|
44
|
-
{
|
|
45
|
-
{
|
|
46
|
-
{
|
|
47
|
-
{
|
|
42
|
+
{ key: 'agent.run.execute', version: 1 },
|
|
43
|
+
{ key: 'agent.run.cancel', version: 1 },
|
|
44
|
+
{ key: 'agent.run.get', version: 1 },
|
|
45
|
+
{ key: 'agent.run.list', version: 1 },
|
|
46
|
+
{ key: 'agent.run.getSteps', version: 1 },
|
|
47
|
+
{ key: 'agent.run.getLogs', version: 1 },
|
|
48
|
+
{ key: 'agent.run.getMetrics', version: 1 },
|
|
48
49
|
],
|
|
49
50
|
|
|
50
51
|
// Events emitted by this feature
|
|
51
52
|
events: [
|
|
52
53
|
// Agent events
|
|
53
|
-
{
|
|
54
|
-
{
|
|
55
|
-
{
|
|
56
|
-
{
|
|
54
|
+
{ key: 'agent-console.agent.created', version: 1 },
|
|
55
|
+
{ key: 'agent-console.agent.updated', version: 1 },
|
|
56
|
+
{ key: 'agent-console.agent.toolAssigned', version: 1 },
|
|
57
|
+
{ key: 'agent-console.agent.toolRemoved', version: 1 },
|
|
57
58
|
|
|
58
59
|
// Tool events
|
|
59
|
-
{
|
|
60
|
-
{
|
|
61
|
-
{
|
|
60
|
+
{ key: 'agent.tool.created', version: 1 },
|
|
61
|
+
{ key: 'agent.tool.updated', version: 1 },
|
|
62
|
+
{ key: 'agent.tool.statusChanged', version: 1 },
|
|
62
63
|
|
|
63
64
|
// Run events
|
|
64
|
-
{
|
|
65
|
-
{
|
|
66
|
-
{
|
|
67
|
-
{
|
|
68
|
-
{
|
|
69
|
-
{
|
|
70
|
-
{
|
|
65
|
+
{ key: 'agent.run.started', version: 1 },
|
|
66
|
+
{ key: 'agent.run.completed', version: 1 },
|
|
67
|
+
{ key: 'agent.run.failed', version: 1 },
|
|
68
|
+
{ key: 'agent.run.cancelled', version: 1 },
|
|
69
|
+
{ key: 'agent.run.toolInvoked', version: 1 },
|
|
70
|
+
{ key: 'agent.run.toolCompleted', version: 1 },
|
|
71
|
+
{ key: 'agent.run.messageGenerated', version: 1 },
|
|
71
72
|
],
|
|
72
73
|
|
|
73
74
|
// Presentations associated with this feature
|
|
74
75
|
presentations: [
|
|
75
|
-
{
|
|
76
|
-
{
|
|
77
|
-
{
|
|
78
|
-
{
|
|
79
|
-
{
|
|
80
|
-
{
|
|
81
|
-
{
|
|
76
|
+
{ key: 'agent-console.dashboard', version: 1 },
|
|
77
|
+
{ key: 'agent-console.agent.list', version: 1 },
|
|
78
|
+
{ key: 'agent-console.agent.detail', version: 1 },
|
|
79
|
+
{ key: 'agent-console.run.list', version: 1 },
|
|
80
|
+
{ key: 'agent-console.run.detail', version: 1 },
|
|
81
|
+
{ key: 'agent-console.tool.list', version: 1 },
|
|
82
|
+
{ key: 'agent-console.tool.detail', version: 1 },
|
|
82
83
|
],
|
|
83
84
|
|
|
84
85
|
// Link operations to their primary presentations
|
|
85
86
|
opToPresentation: [
|
|
86
87
|
{
|
|
87
|
-
op: {
|
|
88
|
-
pres: {
|
|
88
|
+
op: { key: 'agent-console.agent.list', version: 1 },
|
|
89
|
+
pres: { key: 'agent-console.agent.list', version: 1 },
|
|
89
90
|
},
|
|
90
91
|
{
|
|
91
|
-
op: {
|
|
92
|
-
pres: {
|
|
92
|
+
op: { key: 'agent-console.agent.get', version: 1 },
|
|
93
|
+
pres: { key: 'agent-console.agent.detail', version: 1 },
|
|
93
94
|
},
|
|
94
95
|
{
|
|
95
|
-
op: {
|
|
96
|
-
pres: {
|
|
96
|
+
op: { key: 'agent.run.list', version: 1 },
|
|
97
|
+
pres: { key: 'agent-console.run.list', version: 1 },
|
|
97
98
|
},
|
|
98
99
|
{
|
|
99
|
-
op: {
|
|
100
|
-
pres: {
|
|
100
|
+
op: { key: 'agent.run.get', version: 1 },
|
|
101
|
+
pres: { key: 'agent-console.run.detail', version: 1 },
|
|
101
102
|
},
|
|
102
103
|
{
|
|
103
|
-
op: {
|
|
104
|
-
pres: {
|
|
104
|
+
op: { key: 'agent.tool.list', version: 1 },
|
|
105
|
+
pres: { key: 'agent-console.tool.list', version: 1 },
|
|
105
106
|
},
|
|
106
107
|
{
|
|
107
|
-
op: {
|
|
108
|
-
pres: {
|
|
108
|
+
op: { key: 'agent.tool.get', version: 1 },
|
|
109
|
+
pres: { key: 'agent-console.tool.detail', version: 1 },
|
|
109
110
|
},
|
|
110
111
|
],
|
|
111
112
|
|
|
112
113
|
// Target requirements for multi-surface rendering
|
|
113
114
|
presentationsTargets: [
|
|
114
115
|
{
|
|
115
|
-
|
|
116
|
+
key: 'agent-console.dashboard',
|
|
116
117
|
version: 1,
|
|
117
118
|
targets: ['react', 'markdown'],
|
|
118
119
|
},
|
|
119
120
|
{
|
|
120
|
-
|
|
121
|
+
key: 'agent-console.agent.list',
|
|
121
122
|
version: 1,
|
|
122
123
|
targets: ['react', 'markdown', 'application/json'],
|
|
123
124
|
},
|
|
124
125
|
{
|
|
125
|
-
|
|
126
|
+
key: 'agent-console.run.list',
|
|
126
127
|
version: 1,
|
|
127
128
|
targets: ['react', 'markdown', 'application/json'],
|
|
128
129
|
},
|
|
129
130
|
{
|
|
130
|
-
|
|
131
|
+
key: 'agent-console.tool.list',
|
|
131
132
|
version: 1,
|
|
132
133
|
targets: ['react', 'markdown', 'application/json'],
|
|
133
134
|
},
|
|
@@ -140,5 +141,6 @@ export const AgentConsoleFeature: FeatureModuleSpec = {
|
|
|
140
141
|
{ key: 'audit-trail', version: 1 },
|
|
141
142
|
{ key: 'jobs', version: 1 },
|
|
142
143
|
],
|
|
144
|
+
provides: [{ key: 'agent', version: 1 }],
|
|
143
145
|
},
|
|
144
146
|
};
|
package/src/run/index.ts
CHANGED