@contractspec/example.agent-console 3.7.5 → 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.
Files changed (176) hide show
  1. package/.turbo/turbo-build.log +18 -18
  2. package/AGENTS.md +50 -31
  3. package/CHANGELOG.md +12 -0
  4. package/README.md +69 -77
  5. package/dist/agent/agent.event.js +1 -1
  6. package/dist/agent/agent.operation.js +1 -1
  7. package/dist/agent/index.d.ts +5 -5
  8. package/dist/agent/index.js +1 -1
  9. package/dist/browser/agent/agent.event.js +1 -1
  10. package/dist/browser/agent/agent.operation.js +1 -1
  11. package/dist/browser/agent/index.js +1 -1
  12. package/dist/browser/index.js +2145 -2145
  13. package/dist/browser/presentations/index.js +4 -4
  14. package/dist/browser/run/index.js +536 -536
  15. package/dist/browser/run/run.event.js +2 -2
  16. package/dist/browser/run/run.presentation.js +2 -2
  17. package/dist/browser/tool/index.js +260 -260
  18. package/dist/browser/tool/tool.event.js +1 -1
  19. package/dist/browser/tool/tool.presentation.js +2 -2
  20. package/dist/browser/ui/AgentDashboard.js +956 -956
  21. package/dist/browser/ui/AgentRunList.js +16 -16
  22. package/dist/browser/ui/AgentToolRegistry.js +9 -9
  23. package/dist/browser/ui/hooks/index.js +153 -153
  24. package/dist/browser/ui/hooks/useAgentList.js +1 -1
  25. package/dist/browser/ui/hooks/useAgentMutations.js +1 -1
  26. package/dist/browser/ui/hooks/useRunList.js +1 -1
  27. package/dist/browser/ui/hooks/useToolList.js +1 -1
  28. package/dist/browser/ui/index.js +1222 -1222
  29. package/dist/browser/ui/modals/AgentActionsModal.js +13 -13
  30. package/dist/browser/ui/modals/CreateAgentModal.js +15 -15
  31. package/dist/browser/ui/modals/index.js +297 -297
  32. package/dist/browser/ui/renderers/agent-list.renderer.js +7 -7
  33. package/dist/browser/ui/renderers/index.js +157 -157
  34. package/dist/browser/ui/views/AgentListView.js +7 -7
  35. package/dist/browser/ui/views/RunListView.js +16 -16
  36. package/dist/browser/ui/views/ToolRegistryView.js +9 -9
  37. package/dist/browser/ui/views/index.js +97 -97
  38. package/dist/handlers/index.d.ts +1 -1
  39. package/dist/index.d.ts +4 -4
  40. package/dist/index.js +2145 -2145
  41. package/dist/node/agent/agent.event.js +1 -1
  42. package/dist/node/agent/agent.operation.js +1 -1
  43. package/dist/node/agent/index.js +1 -1
  44. package/dist/node/index.js +2145 -2145
  45. package/dist/node/presentations/index.js +4 -4
  46. package/dist/node/run/index.js +536 -536
  47. package/dist/node/run/run.event.js +2 -2
  48. package/dist/node/run/run.presentation.js +2 -2
  49. package/dist/node/tool/index.js +260 -260
  50. package/dist/node/tool/tool.event.js +1 -1
  51. package/dist/node/tool/tool.presentation.js +2 -2
  52. package/dist/node/ui/AgentDashboard.js +956 -956
  53. package/dist/node/ui/AgentRunList.js +16 -16
  54. package/dist/node/ui/AgentToolRegistry.js +9 -9
  55. package/dist/node/ui/hooks/index.js +153 -153
  56. package/dist/node/ui/hooks/useAgentList.js +1 -1
  57. package/dist/node/ui/hooks/useAgentMutations.js +1 -1
  58. package/dist/node/ui/hooks/useRunList.js +1 -1
  59. package/dist/node/ui/hooks/useToolList.js +1 -1
  60. package/dist/node/ui/index.js +1222 -1222
  61. package/dist/node/ui/modals/AgentActionsModal.js +13 -13
  62. package/dist/node/ui/modals/CreateAgentModal.js +15 -15
  63. package/dist/node/ui/modals/index.js +297 -297
  64. package/dist/node/ui/renderers/agent-list.renderer.js +7 -7
  65. package/dist/node/ui/renderers/index.js +157 -157
  66. package/dist/node/ui/views/AgentListView.js +7 -7
  67. package/dist/node/ui/views/RunListView.js +16 -16
  68. package/dist/node/ui/views/ToolRegistryView.js +9 -9
  69. package/dist/node/ui/views/index.js +97 -97
  70. package/dist/presentations/index.d.ts +3 -5
  71. package/dist/presentations/index.js +4 -4
  72. package/dist/run/index.d.ts +7 -7
  73. package/dist/run/index.js +536 -536
  74. package/dist/run/run.event.js +2 -2
  75. package/dist/run/run.handler.d.ts +3 -0
  76. package/dist/run/run.presentation.js +2 -2
  77. package/dist/shared/index.d.ts +1 -1
  78. package/dist/tool/index.d.ts +7 -7
  79. package/dist/tool/index.js +260 -260
  80. package/dist/tool/tool.event.js +1 -1
  81. package/dist/tool/tool.handler.d.ts +1 -1
  82. package/dist/tool/tool.presentation.js +2 -2
  83. package/dist/ui/AgentDashboard.js +956 -956
  84. package/dist/ui/AgentRunList.js +16 -16
  85. package/dist/ui/AgentToolRegistry.js +9 -9
  86. package/dist/ui/hooks/index.d.ts +4 -4
  87. package/dist/ui/hooks/index.js +153 -153
  88. package/dist/ui/hooks/useAgentList.d.ts +5 -0
  89. package/dist/ui/hooks/useAgentList.js +1 -1
  90. package/dist/ui/hooks/useAgentMutations.d.ts +9 -2
  91. package/dist/ui/hooks/useAgentMutations.js +1 -1
  92. package/dist/ui/hooks/useRunList.d.ts +5 -0
  93. package/dist/ui/hooks/useRunList.js +1 -1
  94. package/dist/ui/hooks/useToolList.d.ts +5 -0
  95. package/dist/ui/hooks/useToolList.js +1 -1
  96. package/dist/ui/index.d.ts +3 -3
  97. package/dist/ui/index.js +1222 -1222
  98. package/dist/ui/modals/AgentActionsModal.js +13 -13
  99. package/dist/ui/modals/CreateAgentModal.js +15 -15
  100. package/dist/ui/modals/index.d.ts +1 -1
  101. package/dist/ui/modals/index.js +297 -297
  102. package/dist/ui/renderers/agent-list.markdown.d.ts +5 -0
  103. package/dist/ui/renderers/agent-list.renderer.js +7 -7
  104. package/dist/ui/renderers/dashboard.markdown.d.ts +5 -0
  105. package/dist/ui/renderers/index.d.ts +2 -2
  106. package/dist/ui/renderers/index.js +157 -157
  107. package/dist/ui/renderers/run-list.markdown.d.ts +5 -0
  108. package/dist/ui/renderers/tool-registry.markdown.d.ts +5 -0
  109. package/dist/ui/views/AgentListView.js +7 -7
  110. package/dist/ui/views/RunListView.js +16 -16
  111. package/dist/ui/views/ToolRegistryView.js +9 -9
  112. package/dist/ui/views/index.js +97 -97
  113. package/package.json +10 -10
  114. package/src/agent/agent.entity.ts +111 -111
  115. package/src/agent/agent.enum.ts +12 -12
  116. package/src/agent/agent.event.ts +91 -91
  117. package/src/agent/agent.handler.ts +123 -123
  118. package/src/agent/agent.operation.ts +400 -400
  119. package/src/agent/agent.presentation.ts +62 -62
  120. package/src/agent/agent.schema.ts +175 -175
  121. package/src/agent/agent.test-spec.ts +48 -48
  122. package/src/agent/index.ts +46 -51
  123. package/src/agent.capability.ts +11 -11
  124. package/src/agent.feature.ts +131 -131
  125. package/src/docs/agent-console.docblock.ts +42 -42
  126. package/src/example.ts +35 -35
  127. package/src/handlers/agent.handlers.ts +522 -521
  128. package/src/handlers/index.ts +12 -12
  129. package/src/index.ts +8 -9
  130. package/src/presentations/index.ts +11 -13
  131. package/src/run/index.ts +49 -54
  132. package/src/run/run.entity.ts +137 -137
  133. package/src/run/run.enum.ts +18 -18
  134. package/src/run/run.event.ts +174 -174
  135. package/src/run/run.handler.ts +92 -91
  136. package/src/run/run.operation.ts +474 -474
  137. package/src/run/run.presentation.ts +42 -42
  138. package/src/run/run.schema.ts +126 -126
  139. package/src/run/run.test-spec.ts +48 -48
  140. package/src/seeders/index.ts +21 -21
  141. package/src/shared/index.ts +1 -1
  142. package/src/shared/mock-agents.ts +76 -76
  143. package/src/shared/mock-runs.ts +102 -102
  144. package/src/shared/mock-tools.ts +140 -140
  145. package/src/shared/overlay-types.ts +23 -23
  146. package/src/tool/index.ts +39 -44
  147. package/src/tool/tool.entity.ts +73 -73
  148. package/src/tool/tool.enum.ts +13 -13
  149. package/src/tool/tool.event.ts +80 -80
  150. package/src/tool/tool.handler.ts +102 -102
  151. package/src/tool/tool.operation.ts +328 -328
  152. package/src/tool/tool.presentation.ts +43 -43
  153. package/src/tool/tool.schema.ts +106 -106
  154. package/src/tool/tool.test-spec.ts +48 -48
  155. package/src/ui/AgentDashboard.tsx +348 -348
  156. package/src/ui/hooks/index.ts +7 -7
  157. package/src/ui/hooks/useAgentList.ts +57 -56
  158. package/src/ui/hooks/useAgentMutations.ts +160 -159
  159. package/src/ui/hooks/useRunList.ts +58 -57
  160. package/src/ui/hooks/useToolList.ts +102 -101
  161. package/src/ui/index.ts +6 -9
  162. package/src/ui/modals/AgentActionsModal.tsx +262 -262
  163. package/src/ui/modals/CreateAgentModal.tsx +232 -232
  164. package/src/ui/modals/index.ts +1 -1
  165. package/src/ui/overlays/demo-overlays.ts +52 -52
  166. package/src/ui/renderers/agent-list.markdown.ts +61 -60
  167. package/src/ui/renderers/agent-list.renderer.tsx +14 -14
  168. package/src/ui/renderers/dashboard.markdown.ts +140 -139
  169. package/src/ui/renderers/index.ts +3 -4
  170. package/src/ui/renderers/run-list.markdown.ts +48 -47
  171. package/src/ui/renderers/tool-registry.markdown.ts +66 -65
  172. package/src/ui/views/AgentListView.tsx +90 -90
  173. package/src/ui/views/RunListView.tsx +141 -141
  174. package/src/ui/views/ToolRegistryView.tsx +113 -113
  175. package/tsconfig.json +7 -8
  176. package/tsdown.config.js +7 -3
@@ -2,66 +2,61 @@
2
2
  * Agent domain - AI agent configuration and management.
3
3
  */
4
4
 
5
+ // Entities
6
+ export {
7
+ AgentEntity,
8
+ AgentStatusEntityEnum,
9
+ AgentToolEntity,
10
+ ModelProviderEntityEnum,
11
+ } from './agent.entity';
5
12
  // Enums
6
13
  export {
7
- AgentStatusEnum,
8
- ModelProviderEnum,
9
- ToolChoiceEnum,
14
+ AgentStatusEnum,
15
+ ModelProviderEnum,
16
+ ToolChoiceEnum,
10
17
  } from './agent.enum';
11
-
12
- // Schema models
13
- export {
14
- AgentModel,
15
- AgentSummaryModel,
16
- AgentToolRefModel,
17
- AgentWithToolsModel,
18
- CreateAgentInputModel,
19
- UpdateAgentInputModel,
20
- } from './agent.schema';
21
-
22
- // Contracts
23
- export {
24
- CreateAgentCommand,
25
- UpdateAgentCommand,
26
- GetAgentQuery,
27
- ListAgentsQuery,
28
- AssignToolToAgentCommand,
29
- RemoveToolFromAgentCommand,
30
- } from './agent.operation';
31
-
32
18
  // Events
33
19
  export {
34
- AgentCreatedEvent,
35
- AgentUpdatedEvent,
36
- AgentToolAssignedEvent,
37
- AgentToolRemovedEvent,
20
+ AgentCreatedEvent,
21
+ AgentToolAssignedEvent,
22
+ AgentToolRemovedEvent,
23
+ AgentUpdatedEvent,
38
24
  } from './agent.event';
39
-
40
- // Entities
25
+ // Handlers
41
26
  export {
42
- AgentStatusEntityEnum,
43
- ModelProviderEntityEnum,
44
- AgentEntity,
45
- AgentToolEntity,
46
- } from './agent.entity';
27
+ type AgentSummary,
28
+ type AgentToolRef,
29
+ type AgentWithTools,
30
+ type GetAgentInput,
31
+ type ListAgentsInput,
32
+ type ListAgentsOutput,
33
+ mockCreateAgentHandler,
34
+ mockGetAgentHandler,
35
+ mockListAgentsHandler,
36
+ mockUpdateAgentHandler,
37
+ } from './agent.handler';
38
+ // Contracts
39
+ export {
40
+ AssignToolToAgentCommand,
41
+ CreateAgentCommand,
42
+ GetAgentQuery,
43
+ ListAgentsQuery,
44
+ RemoveToolFromAgentCommand,
45
+ UpdateAgentCommand,
46
+ } from './agent.operation';
47
47
 
48
48
  // Presentations
49
49
  export {
50
- AgentListPresentation,
51
- AgentDetailPresentation,
52
- AgentConsoleDashboardPresentation,
50
+ AgentConsoleDashboardPresentation,
51
+ AgentDetailPresentation,
52
+ AgentListPresentation,
53
53
  } from './agent.presentation';
54
-
55
- // Handlers
54
+ // Schema models
56
55
  export {
57
- mockListAgentsHandler,
58
- mockGetAgentHandler,
59
- mockCreateAgentHandler,
60
- mockUpdateAgentHandler,
61
- type ListAgentsInput,
62
- type AgentSummary,
63
- type ListAgentsOutput,
64
- type GetAgentInput,
65
- type AgentToolRef,
66
- type AgentWithTools,
67
- } from './agent.handler';
56
+ AgentModel,
57
+ AgentSummaryModel,
58
+ AgentToolRefModel,
59
+ AgentWithToolsModel,
60
+ CreateAgentInputModel,
61
+ UpdateAgentInputModel,
62
+ } from './agent.schema';
@@ -1,16 +1,16 @@
1
1
  import {
2
- defineCapability,
3
- StabilityEnum,
2
+ defineCapability,
3
+ StabilityEnum,
4
4
  } from '@contractspec/lib.contracts-spec';
5
5
 
6
6
  export const AgentCapability = defineCapability({
7
- meta: {
8
- key: 'agent',
9
- version: '1.0.0',
10
- kind: 'ui',
11
- stability: StabilityEnum.Experimental,
12
- description: 'AI agent management and console capability',
13
- owners: ['platform.core'],
14
- tags: ['agent', 'ai', 'console'],
15
- },
7
+ meta: {
8
+ key: 'agent',
9
+ version: '1.0.0',
10
+ kind: 'ui',
11
+ stability: StabilityEnum.Experimental,
12
+ description: 'AI agent management and console capability',
13
+ owners: ['platform.core'],
14
+ tags: ['agent', 'ai', 'console'],
15
+ },
16
16
  });
@@ -11,148 +11,148 @@ import { defineFeature } from '@contractspec/lib.contracts-spec';
11
11
  * operations, events, and presentations into an installable feature.
12
12
  */
13
13
  export const AgentConsoleFeature: FeatureModuleSpec = defineFeature({
14
- meta: {
15
- key: 'agent-console',
16
- version: '1.0.0',
17
- title: 'AI Agent Console',
18
- description: 'AI agent orchestration with tools, runs, and logs management',
19
- domain: 'ai-ops',
20
- owners: ['@agent-console-team'],
21
- tags: ['ai', 'agents', 'orchestration'],
22
- stability: 'stable',
23
- },
14
+ meta: {
15
+ key: 'agent-console',
16
+ version: '1.0.0',
17
+ title: 'AI Agent Console',
18
+ description: 'AI agent orchestration with tools, runs, and logs management',
19
+ domain: 'ai-ops',
20
+ owners: ['@agent-console-team'],
21
+ tags: ['ai', 'agents', 'orchestration'],
22
+ stability: 'stable',
23
+ },
24
24
 
25
- // All contract operations included in this feature
26
- operations: [
27
- // Agent operations
28
- { key: 'agent-console.agent.create', version: '1.0.0' },
29
- { key: 'agent-console.agent.update', version: '1.0.0' },
30
- { key: 'agent-console.agent.get', version: '1.0.0' },
31
- { key: 'agent-console.agent.list', version: '1.0.0' },
32
- { key: 'agent-console.agent.assignTool', version: '1.0.0' },
33
- { key: 'agent-console.agent.removeTool', version: '1.0.0' },
25
+ // All contract operations included in this feature
26
+ operations: [
27
+ // Agent operations
28
+ { key: 'agent-console.agent.create', version: '1.0.0' },
29
+ { key: 'agent-console.agent.update', version: '1.0.0' },
30
+ { key: 'agent-console.agent.get', version: '1.0.0' },
31
+ { key: 'agent-console.agent.list', version: '1.0.0' },
32
+ { key: 'agent-console.agent.assignTool', version: '1.0.0' },
33
+ { key: 'agent-console.agent.removeTool', version: '1.0.0' },
34
34
 
35
- // Tool operations
36
- { key: 'agent.tool.create', version: '1.0.0' },
37
- { key: 'agent.tool.update', version: '1.0.0' },
38
- { key: 'agent.tool.get', version: '1.0.0' },
39
- { key: 'agent.tool.list', version: '1.0.0' },
40
- { key: 'agent.tool.test', version: '1.0.0' },
35
+ // Tool operations
36
+ { key: 'agent.tool.create', version: '1.0.0' },
37
+ { key: 'agent.tool.update', version: '1.0.0' },
38
+ { key: 'agent.tool.get', version: '1.0.0' },
39
+ { key: 'agent.tool.list', version: '1.0.0' },
40
+ { key: 'agent.tool.test', version: '1.0.0' },
41
41
 
42
- // Run operations
43
- { key: 'agent.run.execute', version: '1.0.0' },
44
- { key: 'agent.run.cancel', version: '1.0.0' },
45
- { key: 'agent.run.get', version: '1.0.0' },
46
- { key: 'agent.run.list', version: '1.0.0' },
47
- { key: 'agent.run.getSteps', version: '1.0.0' },
48
- { key: 'agent.run.getLogs', version: '1.0.0' },
49
- { key: 'agent.run.getMetrics', version: '1.0.0' },
50
- ],
42
+ // Run operations
43
+ { key: 'agent.run.execute', version: '1.0.0' },
44
+ { key: 'agent.run.cancel', version: '1.0.0' },
45
+ { key: 'agent.run.get', version: '1.0.0' },
46
+ { key: 'agent.run.list', version: '1.0.0' },
47
+ { key: 'agent.run.getSteps', version: '1.0.0' },
48
+ { key: 'agent.run.getLogs', version: '1.0.0' },
49
+ { key: 'agent.run.getMetrics', version: '1.0.0' },
50
+ ],
51
51
 
52
- // Events emitted by this feature
53
- events: [
54
- // Agent events
55
- { key: 'agent-console.agent.created', version: '1.0.0' },
56
- { key: 'agent-console.agent.updated', version: '1.0.0' },
57
- { key: 'agent-console.agent.toolAssigned', version: '1.0.0' },
58
- { key: 'agent-console.agent.toolRemoved', version: '1.0.0' },
52
+ // Events emitted by this feature
53
+ events: [
54
+ // Agent events
55
+ { key: 'agent-console.agent.created', version: '1.0.0' },
56
+ { key: 'agent-console.agent.updated', version: '1.0.0' },
57
+ { key: 'agent-console.agent.toolAssigned', version: '1.0.0' },
58
+ { key: 'agent-console.agent.toolRemoved', version: '1.0.0' },
59
59
 
60
- // Tool events
61
- { key: 'agent.tool.created', version: '1.0.0' },
62
- { key: 'agent.tool.updated', version: '1.0.0' },
63
- { key: 'agent.tool.statusChanged', version: '1.0.0' },
60
+ // Tool events
61
+ { key: 'agent.tool.created', version: '1.0.0' },
62
+ { key: 'agent.tool.updated', version: '1.0.0' },
63
+ { key: 'agent.tool.statusChanged', version: '1.0.0' },
64
64
 
65
- // Run events
66
- { key: 'agent.run.started', version: '1.0.0' },
67
- { key: 'agent.run.completed', version: '1.0.0' },
68
- { key: 'agent.run.failed', version: '1.0.0' },
69
- { key: 'agent.run.cancelled', version: '1.0.0' },
70
- { key: 'agent.run.toolInvoked', version: '1.0.0' },
71
- { key: 'agent.run.toolCompleted', version: '1.0.0' },
72
- { key: 'agent.run.messageGenerated', version: '1.0.0' },
73
- ],
65
+ // Run events
66
+ { key: 'agent.run.started', version: '1.0.0' },
67
+ { key: 'agent.run.completed', version: '1.0.0' },
68
+ { key: 'agent.run.failed', version: '1.0.0' },
69
+ { key: 'agent.run.cancelled', version: '1.0.0' },
70
+ { key: 'agent.run.toolInvoked', version: '1.0.0' },
71
+ { key: 'agent.run.toolCompleted', version: '1.0.0' },
72
+ { key: 'agent.run.messageGenerated', version: '1.0.0' },
73
+ ],
74
74
 
75
- // Presentations associated with this feature
76
- presentations: [
77
- { key: 'agent-console.dashboard', version: '1.0.0' },
78
- { key: 'agent-console.agent.viewList', version: '1.0.0' },
79
- { key: 'agent-console.agent.detail', version: '1.0.0' },
80
- { key: 'agent-console.run.list', version: '1.0.0' },
81
- { key: 'agent-console.run.detail', version: '1.0.0' },
82
- { key: 'agent-console.tool.list', version: '1.0.0' },
83
- { key: 'agent-console.tool.detail', version: '1.0.0' },
84
- ],
75
+ // Presentations associated with this feature
76
+ presentations: [
77
+ { key: 'agent-console.dashboard', version: '1.0.0' },
78
+ { key: 'agent-console.agent.viewList', version: '1.0.0' },
79
+ { key: 'agent-console.agent.detail', version: '1.0.0' },
80
+ { key: 'agent-console.run.list', version: '1.0.0' },
81
+ { key: 'agent-console.run.detail', version: '1.0.0' },
82
+ { key: 'agent-console.tool.list', version: '1.0.0' },
83
+ { key: 'agent-console.tool.detail', version: '1.0.0' },
84
+ ],
85
85
 
86
- // Link operations to their primary presentations
87
- opToPresentation: [
88
- {
89
- op: { key: 'agent-console.agent.list', version: '1.0.0' },
90
- pres: { key: 'agent-console.agent.viewList', version: '1.0.0' },
91
- },
92
- {
93
- op: { key: 'agent-console.agent.get', version: '1.0.0' },
94
- pres: { key: 'agent-console.agent.detail', version: '1.0.0' },
95
- },
96
- {
97
- op: { key: 'agent.run.list', version: '1.0.0' },
98
- pres: { key: 'agent-console.run.list', version: '1.0.0' },
99
- },
100
- {
101
- op: { key: 'agent.run.get', version: '1.0.0' },
102
- pres: { key: 'agent-console.run.detail', version: '1.0.0' },
103
- },
104
- {
105
- op: { key: 'agent.tool.list', version: '1.0.0' },
106
- pres: { key: 'agent-console.tool.list', version: '1.0.0' },
107
- },
108
- {
109
- op: { key: 'agent.tool.get', version: '1.0.0' },
110
- pres: { key: 'agent-console.tool.detail', version: '1.0.0' },
111
- },
112
- ],
86
+ // Link operations to their primary presentations
87
+ opToPresentation: [
88
+ {
89
+ op: { key: 'agent-console.agent.list', version: '1.0.0' },
90
+ pres: { key: 'agent-console.agent.viewList', version: '1.0.0' },
91
+ },
92
+ {
93
+ op: { key: 'agent-console.agent.get', version: '1.0.0' },
94
+ pres: { key: 'agent-console.agent.detail', version: '1.0.0' },
95
+ },
96
+ {
97
+ op: { key: 'agent.run.list', version: '1.0.0' },
98
+ pres: { key: 'agent-console.run.list', version: '1.0.0' },
99
+ },
100
+ {
101
+ op: { key: 'agent.run.get', version: '1.0.0' },
102
+ pres: { key: 'agent-console.run.detail', version: '1.0.0' },
103
+ },
104
+ {
105
+ op: { key: 'agent.tool.list', version: '1.0.0' },
106
+ pres: { key: 'agent-console.tool.list', version: '1.0.0' },
107
+ },
108
+ {
109
+ op: { key: 'agent.tool.get', version: '1.0.0' },
110
+ pres: { key: 'agent-console.tool.detail', version: '1.0.0' },
111
+ },
112
+ ],
113
113
 
114
- // Target requirements for multi-surface rendering
115
- presentationsTargets: [
116
- {
117
- key: 'agent-console.dashboard',
118
- version: '1.0.0',
119
- targets: ['react', 'markdown'],
120
- },
121
- {
122
- key: 'agent-console.agent.viewList',
123
- version: '1.0.0',
124
- targets: ['react', 'markdown', 'application/json'],
125
- },
126
- {
127
- key: 'agent-console.run.list',
128
- version: '1.0.0',
129
- targets: ['react', 'markdown', 'application/json'],
130
- },
131
- {
132
- key: 'agent-console.tool.list',
133
- version: '1.0.0',
134
- targets: ['react', 'markdown', 'application/json'],
135
- },
136
- ],
114
+ // Target requirements for multi-surface rendering
115
+ presentationsTargets: [
116
+ {
117
+ key: 'agent-console.dashboard',
118
+ version: '1.0.0',
119
+ targets: ['react', 'markdown'],
120
+ },
121
+ {
122
+ key: 'agent-console.agent.viewList',
123
+ version: '1.0.0',
124
+ targets: ['react', 'markdown', 'application/json'],
125
+ },
126
+ {
127
+ key: 'agent-console.run.list',
128
+ version: '1.0.0',
129
+ targets: ['react', 'markdown', 'application/json'],
130
+ },
131
+ {
132
+ key: 'agent-console.tool.list',
133
+ version: '1.0.0',
134
+ targets: ['react', 'markdown', 'application/json'],
135
+ },
136
+ ],
137
137
 
138
- // Capability requirements
139
- capabilities: {
140
- requires: [
141
- { key: 'identity', version: '1.0.0' },
142
- { key: 'audit-trail', version: '1.0.0' },
143
- { key: 'jobs', version: '1.0.0' },
144
- ],
145
- provides: [{ key: 'agent', version: '1.0.0' }],
146
- },
138
+ // Capability requirements
139
+ capabilities: {
140
+ requires: [
141
+ { key: 'identity', version: '1.0.0' },
142
+ { key: 'audit-trail', version: '1.0.0' },
143
+ { key: 'jobs', version: '1.0.0' },
144
+ ],
145
+ provides: [{ key: 'agent', version: '1.0.0' }],
146
+ },
147
147
 
148
- telemetry: [{ key: 'agent-console.telemetry', version: '1.0.0' }],
148
+ telemetry: [{ key: 'agent-console.telemetry', version: '1.0.0' }],
149
149
 
150
- jobs: [{ key: 'agent-console.job.run-execution', version: '1.0.0' }],
150
+ jobs: [{ key: 'agent-console.job.run-execution', version: '1.0.0' }],
151
151
 
152
- docs: [
153
- 'docs.examples.agent-console.goal',
154
- 'docs.examples.agent-console.usage',
155
- 'docs.examples.agent-console.reference',
156
- 'docs.examples.agent-console.constraints',
157
- ],
152
+ docs: [
153
+ 'docs.examples.agent-console.goal',
154
+ 'docs.examples.agent-console.usage',
155
+ 'docs.examples.agent-console.reference',
156
+ 'docs.examples.agent-console.constraints',
157
+ ],
158
158
  });
@@ -2,15 +2,15 @@ import type { DocBlock } from '@contractspec/lib.contracts-spec/docs';
2
2
  import { registerDocBlocks } from '@contractspec/lib.contracts-spec/docs';
3
3
 
4
4
  const agentConsoleDocBlocks: DocBlock[] = [
5
- {
6
- id: 'docs.examples.agent-console.goal',
7
- title: 'Agent Console — Goal',
8
- summary: 'AI agent ops console: tools, agents, runs, logs, and metrics.',
9
- kind: 'goal',
10
- visibility: 'public',
11
- route: '/docs/examples/agent-console/goal',
12
- tags: ['ai', 'agents', 'goal'],
13
- body: `## Why it matters
5
+ {
6
+ id: 'docs.examples.agent-console.goal',
7
+ title: 'Agent Console — Goal',
8
+ summary: 'AI agent ops console: tools, agents, runs, logs, and metrics.',
9
+ kind: 'goal',
10
+ visibility: 'public',
11
+ route: '/docs/examples/agent-console/goal',
12
+ tags: ['ai', 'agents', 'goal'],
13
+ body: `## Why it matters
14
14
  - Provides a regenerable agent operations surface with tool registry and run history.
15
15
  - Prevents drift between tool schemas, agent configs, and execution logs.
16
16
 
@@ -21,16 +21,16 @@ const agentConsoleDocBlocks: DocBlock[] = [
21
21
  ## Success criteria
22
22
  - Tool/agent/run specs regenerate UI/API/events cleanly.
23
23
  - Logs/metrics stay aligned and PII is scoped.`,
24
- },
25
- {
26
- id: 'docs.examples.agent-console.usage',
27
- title: 'Agent Console — Usage',
28
- summary: 'How to operate, extend, and regenerate the agent console safely.',
29
- kind: 'usage',
30
- visibility: 'public',
31
- route: '/docs/examples/agent-console/usage',
32
- tags: ['ai', 'agents', 'usage'],
33
- body: `## Setup
24
+ },
25
+ {
26
+ id: 'docs.examples.agent-console.usage',
27
+ title: 'Agent Console — Usage',
28
+ summary: 'How to operate, extend, and regenerate the agent console safely.',
29
+ kind: 'usage',
30
+ visibility: 'public',
31
+ route: '/docs/examples/agent-console/usage',
32
+ tags: ['ai', 'agents', 'usage'],
33
+ body: `## Setup
34
34
  1) Seed (if available) or create tools and agents; define run configs.
35
35
  2) Configure Notifications for run completion/failure; Audit for changes.
36
36
 
@@ -43,17 +43,17 @@ const agentConsoleDocBlocks: DocBlock[] = [
43
43
  - Emit events for run lifecycle; store logs with redaction where needed.
44
44
  - Enforce tool input validation; avoid unsafe arbitrary code exec in handlers.
45
45
  - Keep tenant/user scoping explicit for ops data.`,
46
- },
47
- {
48
- id: 'docs.examples.agent-console.reference',
49
- title: 'Agent Console — Reference',
50
- summary:
51
- 'Entities, contracts, events, and presentations for the agent console.',
52
- kind: 'reference',
53
- visibility: 'public',
54
- route: '/docs/examples/agent-console',
55
- tags: ['ai', 'agents', 'reference'],
56
- body: `## Entities
46
+ },
47
+ {
48
+ id: 'docs.examples.agent-console.reference',
49
+ title: 'Agent Console — Reference',
50
+ summary:
51
+ 'Entities, contracts, events, and presentations for the agent console.',
52
+ kind: 'reference',
53
+ visibility: 'public',
54
+ route: '/docs/examples/agent-console',
55
+ tags: ['ai', 'agents', 'reference'],
56
+ body: `## Entities
57
57
  - Tool, Agent, AgentTool, Run, RunStep, RunLog, RunMetric.
58
58
 
59
59
  ## Contracts
@@ -68,17 +68,17 @@ const agentConsoleDocBlocks: DocBlock[] = [
68
68
  ## Notes
69
69
  - Keep tool schemas explicit; enforce validation in spec.
70
70
  - Use Audit Trail for agent/run changes; Notifications for run outcomes.`,
71
- },
72
- {
73
- id: 'docs.examples.agent-console.constraints',
74
- title: 'Agent Console — Constraints & Safety',
75
- summary:
76
- 'Internal guardrails for tool/agent/run safety, PII, and regeneration.',
77
- kind: 'reference',
78
- visibility: 'internal',
79
- route: '/docs/examples/agent-console/constraints',
80
- tags: ['ai', 'agents', 'constraints', 'internal'],
81
- body: `## Constraints
71
+ },
72
+ {
73
+ id: 'docs.examples.agent-console.constraints',
74
+ title: 'Agent Console — Constraints & Safety',
75
+ summary:
76
+ 'Internal guardrails for tool/agent/run safety, PII, and regeneration.',
77
+ kind: 'reference',
78
+ visibility: 'internal',
79
+ route: '/docs/examples/agent-console/constraints',
80
+ tags: ['ai', 'agents', 'constraints', 'internal'],
81
+ body: `## Constraints
82
82
  - Tool schemas (inputs/outputs) must be explicit in spec; no arbitrary untyped payloads.
83
83
  - Events to emit: tool.created, agent.created, run.started/completed/failed, tool.invoked.
84
84
  - Regeneration must not loosen execution policies or logging without explicit spec diff.
@@ -91,7 +91,7 @@ const agentConsoleDocBlocks: DocBlock[] = [
91
91
  - Add fixtures for tool schema changes and run lifecycle.
92
92
  - Ensure Audit/Notifications remain wired for runs; metrics collection unchanged.
93
93
  - Use Feature Flags to gate risky tools; default safe/off.`,
94
- },
94
+ },
95
95
  ];
96
96
 
97
97
  registerDocBlocks(agentConsoleDocBlocks);
package/src/example.ts CHANGED
@@ -1,41 +1,41 @@
1
1
  import { defineExample } from '@contractspec/lib.contracts-spec';
2
2
 
3
3
  const example = defineExample({
4
- meta: {
5
- key: 'agent-console',
6
- version: '1.0.0',
7
- title: 'Agent Console',
8
- description:
9
- 'AI agent ops console: tools, agents, runs, logs, and metrics (spec-first, regenerable).',
10
- kind: 'template',
11
- visibility: 'public',
12
- stability: 'experimental',
13
- owners: ['@platform.core'],
14
- tags: ['ai', 'agents', 'tools', 'orchestration'],
15
- },
16
- docs: {
17
- rootDocId: 'docs.examples.agent-console.reference',
18
- goalDocId: 'docs.examples.agent-console.goal',
19
- usageDocId: 'docs.examples.agent-console.usage',
20
- constraintsDocId: 'docs.examples.agent-console.constraints',
21
- },
22
- entrypoints: {
23
- packageName: '@contractspec/example.agent-console',
24
- feature: './feature',
25
- contracts: './contracts',
26
- presentations: './presentations',
27
- handlers: './handlers',
28
- docs: './docs',
29
- },
30
- surfaces: {
31
- templates: true,
32
- sandbox: {
33
- enabled: true,
34
- modes: ['playground', 'specs', 'builder', 'markdown', 'evolution'],
35
- },
36
- studio: { enabled: true, installable: true },
37
- mcp: { enabled: true },
38
- },
4
+ meta: {
5
+ key: 'agent-console',
6
+ version: '1.0.0',
7
+ title: 'Agent Console',
8
+ description:
9
+ 'AI agent ops console: tools, agents, runs, logs, and metrics (spec-first, regenerable).',
10
+ kind: 'template',
11
+ visibility: 'public',
12
+ stability: 'experimental',
13
+ owners: ['@platform.core'],
14
+ tags: ['ai', 'agents', 'tools', 'orchestration'],
15
+ },
16
+ docs: {
17
+ rootDocId: 'docs.examples.agent-console.reference',
18
+ goalDocId: 'docs.examples.agent-console.goal',
19
+ usageDocId: 'docs.examples.agent-console.usage',
20
+ constraintsDocId: 'docs.examples.agent-console.constraints',
21
+ },
22
+ entrypoints: {
23
+ packageName: '@contractspec/example.agent-console',
24
+ feature: './feature',
25
+ contracts: './contracts',
26
+ presentations: './presentations',
27
+ handlers: './handlers',
28
+ docs: './docs',
29
+ },
30
+ surfaces: {
31
+ templates: true,
32
+ sandbox: {
33
+ enabled: true,
34
+ modes: ['playground', 'specs', 'builder', 'markdown', 'evolution'],
35
+ },
36
+ studio: { enabled: true, installable: true },
37
+ mcp: { enabled: true },
38
+ },
39
39
  });
40
40
 
41
41
  export default example;