@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.
Files changed (149) hide show
  1. package/.turbo/turbo-build$colon$bundle.log +133 -0
  2. package/.turbo/turbo-build.log +129 -41
  3. package/CHANGELOG.md +40 -0
  4. package/LICENSE +21 -0
  5. package/README.md +3 -0
  6. package/dist/agent/agent.entity.d.ts +55 -0
  7. package/dist/agent/agent.entity.d.ts.map +1 -0
  8. package/dist/agent/agent.entity.js +136 -1
  9. package/dist/agent/agent.entity.js.map +1 -0
  10. package/dist/agent/agent.enum.d.ts +18 -0
  11. package/dist/agent/agent.enum.d.ts.map +1 -0
  12. package/dist/agent/agent.enum.js +34 -1
  13. package/dist/agent/agent.enum.js.map +1 -0
  14. package/dist/agent/agent.event.d.ts +128 -0
  15. package/dist/agent/agent.event.d.ts.map +1 -0
  16. package/dist/agent/agent.event.js +210 -1
  17. package/dist/agent/agent.event.js.map +1 -0
  18. package/dist/agent/agent.handler.d.ts +100 -0
  19. package/dist/agent/agent.handler.d.ts.map +1 -0
  20. package/dist/agent/agent.handler.js +84 -1
  21. package/dist/agent/agent.handler.js.map +1 -0
  22. package/dist/agent/agent.operation.d.ts +471 -0
  23. package/dist/agent/agent.operation.d.ts.map +1 -0
  24. package/dist/agent/agent.operation.js +486 -0
  25. package/dist/agent/agent.operation.js.map +1 -0
  26. package/dist/agent/agent.presentation.d.ts +19 -0
  27. package/dist/agent/agent.presentation.d.ts.map +1 -0
  28. package/dist/agent/agent.presentation.js +89 -1
  29. package/dist/agent/agent.presentation.js.map +1 -0
  30. package/dist/agent/agent.schema.d.ts +401 -0
  31. package/dist/agent/agent.schema.d.ts.map +1 -0
  32. package/dist/agent/agent.schema.js +406 -1
  33. package/dist/agent/agent.schema.js.map +1 -0
  34. package/dist/agent/index.d.ts +8 -0
  35. package/dist/agent/index.js +9 -1
  36. package/dist/agent.feature.d.ts +12 -0
  37. package/dist/agent.feature.d.ts.map +1 -0
  38. package/dist/agent.feature.js +303 -1
  39. package/dist/agent.feature.js.map +1 -0
  40. package/dist/docs/agent-console.docblock.d.ts +1 -0
  41. package/dist/docs/agent-console.docblock.js +69 -5
  42. package/dist/docs/agent-console.docblock.js.map +1 -0
  43. package/dist/docs/index.d.ts +1 -0
  44. package/dist/docs/index.js +1 -1
  45. package/dist/example.d.ts +40 -0
  46. package/dist/example.d.ts.map +1 -0
  47. package/dist/example.js +51 -1
  48. package/dist/example.js.map +1 -0
  49. package/dist/handlers/index.d.ts +4 -0
  50. package/dist/handlers/index.js +5 -1
  51. package/dist/index.d.ts +30 -0
  52. package/dist/index.js +32 -1
  53. package/dist/presentations/index.d.ts +4 -0
  54. package/dist/presentations/index.js +5 -1
  55. package/dist/run/index.d.ts +8 -0
  56. package/dist/run/index.js +9 -1
  57. package/dist/run/run.entity.d.ts +82 -0
  58. package/dist/run/run.entity.d.ts.map +1 -0
  59. package/dist/run/run.entity.js +205 -1
  60. package/dist/run/run.entity.js.map +1 -0
  61. package/dist/run/run.enum.d.ts +22 -0
  62. package/dist/run/run.enum.d.ts.map +1 -0
  63. package/dist/run/run.enum.js +45 -1
  64. package/dist/run/run.enum.js.map +1 -0
  65. package/dist/run/run.event.d.ts +290 -0
  66. package/dist/run/run.event.d.ts.map +1 -0
  67. package/dist/run/run.event.js +434 -1
  68. package/dist/run/run.event.js.map +1 -0
  69. package/dist/run/run.handler.d.ts +203 -0
  70. package/dist/run/run.handler.d.ts.map +1 -0
  71. package/dist/run/run.handler.js +83 -1
  72. package/dist/run/run.handler.js.map +1 -0
  73. package/dist/run/run.operation.d.ts +720 -0
  74. package/dist/run/run.operation.d.ts.map +1 -0
  75. package/dist/run/run.operation.js +626 -0
  76. package/dist/run/run.operation.js.map +1 -0
  77. package/dist/run/run.presentation.d.ts +15 -0
  78. package/dist/run/run.presentation.d.ts.map +1 -0
  79. package/dist/run/run.presentation.js +65 -1
  80. package/dist/run/run.presentation.js.map +1 -0
  81. package/dist/run/run.schema.d.ts +416 -0
  82. package/dist/run/run.schema.d.ts.map +1 -0
  83. package/dist/run/run.schema.js +338 -1
  84. package/dist/run/run.schema.js.map +1 -0
  85. package/dist/shared/index.d.ts +4 -0
  86. package/dist/shared/index.js +5 -1
  87. package/dist/shared/mock-agents.d.ts +88 -0
  88. package/dist/shared/mock-agents.d.ts.map +1 -0
  89. package/dist/shared/mock-agents.js +94 -1
  90. package/dist/shared/mock-agents.js.map +1 -0
  91. package/dist/shared/mock-runs.d.ts +120 -0
  92. package/dist/shared/mock-runs.d.ts.map +1 -0
  93. package/dist/shared/mock-runs.js +118 -1
  94. package/dist/shared/mock-runs.js.map +1 -0
  95. package/dist/shared/mock-tools.d.ts +244 -0
  96. package/dist/shared/mock-tools.d.ts.map +1 -0
  97. package/dist/shared/mock-tools.js +181 -1
  98. package/dist/shared/mock-tools.js.map +1 -0
  99. package/dist/tool/index.d.ts +8 -0
  100. package/dist/tool/index.js +9 -1
  101. package/dist/tool/tool.entity.d.ts +42 -0
  102. package/dist/tool/tool.entity.d.ts.map +1 -0
  103. package/dist/tool/tool.entity.js +105 -1
  104. package/dist/tool/tool.entity.js.map +1 -0
  105. package/dist/tool/tool.enum.d.ts +18 -0
  106. package/dist/tool/tool.enum.d.ts.map +1 -0
  107. package/dist/tool/tool.enum.js +35 -1
  108. package/dist/tool/tool.enum.js.map +1 -0
  109. package/dist/tool/tool.event.d.ts +103 -0
  110. package/dist/tool/tool.event.d.ts.map +1 -0
  111. package/dist/tool/tool.event.js +159 -1
  112. package/dist/tool/tool.event.js.map +1 -0
  113. package/dist/tool/tool.handler.d.ts +315 -0
  114. package/dist/tool/tool.handler.d.ts.map +1 -0
  115. package/dist/tool/tool.handler.js +87 -1
  116. package/dist/tool/tool.handler.js.map +1 -0
  117. package/dist/tool/tool.operation.d.ts +411 -0
  118. package/dist/tool/tool.operation.d.ts.map +1 -0
  119. package/dist/tool/tool.operation.js +406 -0
  120. package/dist/tool/tool.operation.js.map +1 -0
  121. package/dist/tool/tool.presentation.d.ts +15 -0
  122. package/dist/tool/tool.presentation.d.ts.map +1 -0
  123. package/dist/tool/tool.presentation.js +65 -1
  124. package/dist/tool/tool.presentation.js.map +1 -0
  125. package/dist/tool/tool.schema.d.ts +218 -0
  126. package/dist/tool/tool.schema.d.ts.map +1 -0
  127. package/dist/tool/tool.schema.js +236 -1
  128. package/dist/tool/tool.schema.js.map +1 -0
  129. package/package.json +59 -49
  130. package/src/agent/agent.entity.ts +1 -6
  131. package/src/agent/agent.event.ts +34 -12
  132. package/src/agent/{agent.contracts.ts → agent.operation.ts} +176 -10
  133. package/src/agent/agent.presentation.ts +20 -7
  134. package/src/agent/index.ts +1 -1
  135. package/src/agent.feature.ts +58 -56
  136. package/src/run/index.ts +1 -1
  137. package/src/run/run.entity.ts +1 -6
  138. package/src/run/run.event.ts +58 -21
  139. package/src/run/{run.contracts.ts → run.operation.ts} +165 -14
  140. package/src/run/run.presentation.ts +14 -5
  141. package/src/tool/index.ts +1 -1
  142. package/src/tool/tool.entity.ts +1 -6
  143. package/src/tool/tool.event.ts +27 -10
  144. package/src/tool/{tool.contracts.ts → tool.operation.ts} +133 -10
  145. package/src/tool/tool.presentation.ts +14 -5
  146. package/tsconfig.tsbuildinfo +1 -1
  147. package/dist/agent/agent.contracts.js +0 -1
  148. package/dist/run/run.contracts.js +0 -1
  149. package/dist/tool/tool.contracts.js +0 -1
@@ -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
- name: 'agent.agent.created',
34
- version: 1,
35
- description: 'A new AI agent was configured.',
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
- name: 'agent.agent.updated',
67
- version: 1,
68
- description: 'An AI agent configuration was updated.',
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
- name: 'agent.agent.toolAssigned',
92
- version: 1,
93
- description: 'A tool was assigned to an agent.',
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
- name: 'agent.agent.toolRemoved',
117
- version: 1,
118
- description: 'A tool was removed from an agent.',
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/spec';
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
- name: 'agent.agent.create',
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
- name: 'agent.agent.update',
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
- name: 'agent.updated',
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
- name: 'agent.agent.get',
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
- name: 'agent.agent.list',
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
- name: 'agent.agent.assignTool',
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
- name: 'agent.agent.removeTool',
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 { PresentationDescriptorV2 } from '@lssm/lib.contracts';
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: PresentationDescriptorV2 = {
8
+ export const AgentListPresentation: PresentationSpec = {
8
9
  meta: {
9
- name: 'agent-console.agent.list',
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: PresentationDescriptorV2 = {
35
+ export const AgentDetailPresentation: PresentationSpec = {
31
36
  meta: {
32
- name: 'agent-console.agent.detail',
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: PresentationDescriptorV2 = {
61
+ export const AgentConsoleDashboardPresentation: PresentationSpec = {
53
62
  meta: {
54
- name: 'agent-console.dashboard',
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',
@@ -27,7 +27,7 @@ export {
27
27
  ListAgentsQuery,
28
28
  AssignToolToAgentCommand,
29
29
  RemoveToolFromAgentCommand,
30
- } from './agent.contracts';
30
+ } from './agent.operation';
31
31
 
32
32
  // Events
33
33
  export {
@@ -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: 'experimental',
21
+ stability: 'stable',
21
22
  },
22
23
 
23
24
  // All contract operations included in this feature
24
25
  operations: [
25
26
  // Agent operations
26
- { name: 'agent.agent.create', version: 1 },
27
- { name: 'agent.agent.update', version: 1 },
28
- { name: 'agent.agent.get', version: 1 },
29
- { name: 'agent.agent.list', version: 1 },
30
- { name: 'agent.agent.assignTool', version: 1 },
31
- { name: 'agent.agent.removeTool', version: 1 },
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
- { name: 'agent.tool.create', version: 1 },
35
- { name: 'agent.tool.update', version: 1 },
36
- { name: 'agent.tool.get', version: 1 },
37
- { name: 'agent.tool.list', version: 1 },
38
- { name: 'agent.tool.test', version: 1 },
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
- { name: 'agent.run.execute', version: 1 },
42
- { name: 'agent.run.cancel', version: 1 },
43
- { name: 'agent.run.get', version: 1 },
44
- { name: 'agent.run.list', version: 1 },
45
- { name: 'agent.run.getSteps', version: 1 },
46
- { name: 'agent.run.getLogs', version: 1 },
47
- { name: 'agent.run.getMetrics', version: 1 },
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
- { name: 'agent.agent.created', version: 1 },
54
- { name: 'agent.agent.updated', version: 1 },
55
- { name: 'agent.agent.toolAssigned', version: 1 },
56
- { name: 'agent.agent.toolRemoved', version: 1 },
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
- { name: 'agent.tool.created', version: 1 },
60
- { name: 'agent.tool.updated', version: 1 },
61
- { name: 'agent.tool.statusChanged', version: 1 },
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
- { name: 'agent.run.started', version: 1 },
65
- { name: 'agent.run.completed', version: 1 },
66
- { name: 'agent.run.failed', version: 1 },
67
- { name: 'agent.run.cancelled', version: 1 },
68
- { name: 'agent.run.toolInvoked', version: 1 },
69
- { name: 'agent.run.toolCompleted', version: 1 },
70
- { name: 'agent.run.messageGenerated', version: 1 },
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
- { name: 'agent-console.dashboard', version: 1 },
76
- { name: 'agent-console.agent.list', version: 1 },
77
- { name: 'agent-console.agent.detail', version: 1 },
78
- { name: 'agent-console.run.list', version: 1 },
79
- { name: 'agent-console.run.detail', version: 1 },
80
- { name: 'agent-console.tool.list', version: 1 },
81
- { name: 'agent-console.tool.detail', version: 1 },
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: { name: 'agent.agent.list', version: 1 },
88
- pres: { name: 'agent-console.agent.list', version: 1 },
88
+ op: { key: 'agent-console.agent.list', version: 1 },
89
+ pres: { key: 'agent-console.agent.list', version: 1 },
89
90
  },
90
91
  {
91
- op: { name: 'agent.agent.get', version: 1 },
92
- pres: { name: 'agent-console.agent.detail', version: 1 },
92
+ op: { key: 'agent-console.agent.get', version: 1 },
93
+ pres: { key: 'agent-console.agent.detail', version: 1 },
93
94
  },
94
95
  {
95
- op: { name: 'agent.run.list', version: 1 },
96
- pres: { name: 'agent-console.run.list', version: 1 },
96
+ op: { key: 'agent.run.list', version: 1 },
97
+ pres: { key: 'agent-console.run.list', version: 1 },
97
98
  },
98
99
  {
99
- op: { name: 'agent.run.get', version: 1 },
100
- pres: { name: 'agent-console.run.detail', version: 1 },
100
+ op: { key: 'agent.run.get', version: 1 },
101
+ pres: { key: 'agent-console.run.detail', version: 1 },
101
102
  },
102
103
  {
103
- op: { name: 'agent.tool.list', version: 1 },
104
- pres: { name: 'agent-console.tool.list', version: 1 },
104
+ op: { key: 'agent.tool.list', version: 1 },
105
+ pres: { key: 'agent-console.tool.list', version: 1 },
105
106
  },
106
107
  {
107
- op: { name: 'agent.tool.get', version: 1 },
108
- pres: { name: 'agent-console.tool.detail', version: 1 },
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
- name: 'agent-console.dashboard',
116
+ key: 'agent-console.dashboard',
116
117
  version: 1,
117
118
  targets: ['react', 'markdown'],
118
119
  },
119
120
  {
120
- name: 'agent-console.agent.list',
121
+ key: 'agent-console.agent.list',
121
122
  version: 1,
122
123
  targets: ['react', 'markdown', 'application/json'],
123
124
  },
124
125
  {
125
- name: 'agent-console.run.list',
126
+ key: 'agent-console.run.list',
126
127
  version: 1,
127
128
  targets: ['react', 'markdown', 'application/json'],
128
129
  },
129
130
  {
130
- name: 'agent-console.tool.list',
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
@@ -30,7 +30,7 @@ export {
30
30
  GetRunStepsQuery,
31
31
  GetRunLogsQuery,
32
32
  GetRunMetricsQuery,
33
- } from './run.contracts';
33
+ } from './run.operation';
34
34
 
35
35
  // Events
36
36
  export {
@@ -1,9 +1,4 @@
1
- import {
2
- defineEntity,
3
- defineEntityEnum,
4
- field,
5
- index,
6
- } from '@lssm/lib.schema/entity';
1
+ import { defineEntity, defineEntityEnum, field, index } from '@lssm/lib.schema';
7
2
 
8
3
  /**
9
4
  * Run status enum for entities.