@contractspec/example.agent-console 3.8.9 → 3.8.10

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 (228) hide show
  1. package/.turbo/turbo-build.log +225 -222
  2. package/CHANGELOG.md +18 -0
  3. package/dist/agent/agent.entity.js +1 -127
  4. package/dist/agent/agent.enum.js +1 -25
  5. package/dist/agent/agent.event.js +1 -116
  6. package/dist/agent/agent.handler.js +1 -1030
  7. package/dist/agent/agent.operation.js +1 -735
  8. package/dist/agent/agent.presentation.js +1 -282
  9. package/dist/agent/agent.schema.js +1 -215
  10. package/dist/agent/agent.test-spec.js +1 -58
  11. package/dist/agent/index.js +1 -1248
  12. package/dist/agent.capability.js +1 -19
  13. package/dist/agent.feature.js +1 -305
  14. package/dist/browser/agent/agent.entity.js +1 -127
  15. package/dist/browser/agent/agent.enum.js +1 -25
  16. package/dist/browser/agent/agent.event.js +1 -116
  17. package/dist/browser/agent/agent.handler.js +1 -1030
  18. package/dist/browser/agent/agent.operation.js +1 -735
  19. package/dist/browser/agent/agent.presentation.js +1 -282
  20. package/dist/browser/agent/agent.schema.js +1 -215
  21. package/dist/browser/agent/agent.test-spec.js +1 -58
  22. package/dist/browser/agent/index.js +1 -1248
  23. package/dist/browser/agent.capability.js +1 -19
  24. package/dist/browser/agent.feature.js +1 -305
  25. package/dist/browser/docs/agent-console.docblock.js +5 -49
  26. package/dist/browser/docs/index.js +5 -49
  27. package/dist/browser/example.js +1 -41
  28. package/dist/browser/handlers/agent.handlers.js +6 -2143
  29. package/dist/browser/handlers/index.js +6 -2943
  30. package/dist/browser/index.js +14 -6828
  31. package/dist/browser/presentations/index.js +1 -693
  32. package/dist/browser/run/index.js +1 -1363
  33. package/dist/browser/run/run.entity.js +1 -160
  34. package/dist/browser/run/run.enum.js +1 -34
  35. package/dist/browser/run/run.event.js +1 -217
  36. package/dist/browser/run/run.handler.js +1 -919
  37. package/dist/browser/run/run.operation.js +1 -667
  38. package/dist/browser/run/run.presentation.js +1 -223
  39. package/dist/browser/run/run.schema.js +1 -179
  40. package/dist/browser/run/run.test-spec.js +1 -58
  41. package/dist/browser/seeders/index.js +2 -21
  42. package/dist/browser/shared/index.js +1 -626
  43. package/dist/browser/shared/mock-agents.js +1 -82
  44. package/dist/browser/shared/mock-runs.js +1 -113
  45. package/dist/browser/shared/mock-tools.js +1 -146
  46. package/dist/browser/tool/index.js +1 -949
  47. package/dist/browser/tool/tool.entity.js +1 -90
  48. package/dist/browser/tool/tool.enum.js +1 -26
  49. package/dist/browser/tool/tool.event.js +1 -99
  50. package/dist/browser/tool/tool.handler.js +1 -699
  51. package/dist/browser/tool/tool.operation.js +1 -482
  52. package/dist/browser/tool/tool.presentation.js +1 -188
  53. package/dist/browser/tool/tool.schema.js +1 -141
  54. package/dist/browser/tool/tool.test-spec.js +1 -58
  55. package/dist/browser/ui/AgentDashboard.js +1 -2527
  56. package/dist/browser/ui/AgentDashboard.visualizations.js +1 -217
  57. package/dist/browser/ui/AgentRunList.js +1 -482
  58. package/dist/browser/ui/AgentToolRegistry.js +1 -212
  59. package/dist/browser/ui/ExecutionConsoleHost.js +1 -0
  60. package/dist/browser/ui/hooks/index.js +1 -740
  61. package/dist/browser/ui/hooks/useAgentList.js +1 -55
  62. package/dist/browser/ui/hooks/useAgentMutations.js +1 -530
  63. package/dist/browser/ui/hooks/useRunList.js +1 -70
  64. package/dist/browser/ui/hooks/useToolList.js +1 -85
  65. package/dist/browser/ui/index.js +5 -3018
  66. package/dist/browser/ui/modals/AgentActionsModal.js +1 -304
  67. package/dist/browser/ui/modals/CreateAgentModal.js +1 -243
  68. package/dist/browser/ui/modals/index.js +1 -546
  69. package/dist/browser/ui/overlays/demo-overlays.js +1 -64
  70. package/dist/browser/ui/overlays/index.js +1 -64
  71. package/dist/browser/ui/renderers/agent-list.markdown.js +2 -64
  72. package/dist/browser/ui/renderers/agent-list.renderer.js +1 -180
  73. package/dist/browser/ui/renderers/dashboard.markdown.js +2 -288
  74. package/dist/browser/ui/renderers/index.js +5 -642
  75. package/dist/browser/ui/renderers/run-list.markdown.js +2 -50
  76. package/dist/browser/ui/renderers/tool-registry.markdown.js +2 -64
  77. package/dist/browser/ui/views/AgentListView.js +1 -165
  78. package/dist/browser/ui/views/RunDataTable.js +1 -326
  79. package/dist/browser/ui/views/RunListView.js +1 -479
  80. package/dist/browser/ui/views/ToolRegistryView.js +1 -209
  81. package/dist/browser/ui/views/index.js +1 -851
  82. package/dist/browser/ui/views/run-data-table.columns.js +1 -271
  83. package/dist/browser/ui/views/run-list.shared.js +1 -177
  84. package/dist/browser/visualizations/catalog.js +1 -134
  85. package/dist/browser/visualizations/index.js +1 -187
  86. package/dist/browser/visualizations/selectors.js +1 -181
  87. package/dist/docs/agent-console.docblock.js +5 -49
  88. package/dist/docs/index.js +5 -49
  89. package/dist/example.js +1 -41
  90. package/dist/handlers/agent.handlers.js +6 -2143
  91. package/dist/handlers/index.js +6 -2943
  92. package/dist/index.js +14 -6828
  93. package/dist/node/agent/agent.entity.js +1 -127
  94. package/dist/node/agent/agent.enum.js +1 -25
  95. package/dist/node/agent/agent.event.js +1 -116
  96. package/dist/node/agent/agent.handler.js +1 -1030
  97. package/dist/node/agent/agent.operation.js +1 -735
  98. package/dist/node/agent/agent.presentation.js +1 -282
  99. package/dist/node/agent/agent.schema.js +1 -215
  100. package/dist/node/agent/agent.test-spec.js +1 -58
  101. package/dist/node/agent/index.js +1 -1248
  102. package/dist/node/agent.capability.js +1 -19
  103. package/dist/node/agent.feature.js +1 -305
  104. package/dist/node/docs/agent-console.docblock.js +5 -49
  105. package/dist/node/docs/index.js +5 -49
  106. package/dist/node/example.js +1 -41
  107. package/dist/node/handlers/agent.handlers.js +6 -2143
  108. package/dist/node/handlers/index.js +6 -2943
  109. package/dist/node/index.js +14 -6828
  110. package/dist/node/presentations/index.js +1 -693
  111. package/dist/node/run/index.js +1 -1363
  112. package/dist/node/run/run.entity.js +1 -160
  113. package/dist/node/run/run.enum.js +1 -34
  114. package/dist/node/run/run.event.js +1 -217
  115. package/dist/node/run/run.handler.js +1 -919
  116. package/dist/node/run/run.operation.js +1 -667
  117. package/dist/node/run/run.presentation.js +1 -223
  118. package/dist/node/run/run.schema.js +1 -179
  119. package/dist/node/run/run.test-spec.js +1 -58
  120. package/dist/node/seeders/index.js +2 -21
  121. package/dist/node/shared/index.js +1 -626
  122. package/dist/node/shared/mock-agents.js +1 -82
  123. package/dist/node/shared/mock-runs.js +1 -113
  124. package/dist/node/shared/mock-tools.js +1 -146
  125. package/dist/node/tool/index.js +1 -949
  126. package/dist/node/tool/tool.entity.js +1 -90
  127. package/dist/node/tool/tool.enum.js +1 -26
  128. package/dist/node/tool/tool.event.js +1 -99
  129. package/dist/node/tool/tool.handler.js +1 -699
  130. package/dist/node/tool/tool.operation.js +1 -482
  131. package/dist/node/tool/tool.presentation.js +1 -188
  132. package/dist/node/tool/tool.schema.js +1 -141
  133. package/dist/node/tool/tool.test-spec.js +1 -58
  134. package/dist/node/ui/AgentDashboard.js +1 -2527
  135. package/dist/node/ui/AgentDashboard.visualizations.js +1 -217
  136. package/dist/node/ui/AgentRunList.js +1 -482
  137. package/dist/node/ui/AgentToolRegistry.js +1 -212
  138. package/dist/node/ui/ExecutionConsoleHost.js +1 -0
  139. package/dist/node/ui/hooks/index.js +1 -740
  140. package/dist/node/ui/hooks/useAgentList.js +1 -55
  141. package/dist/node/ui/hooks/useAgentMutations.js +1 -530
  142. package/dist/node/ui/hooks/useRunList.js +1 -70
  143. package/dist/node/ui/hooks/useToolList.js +1 -85
  144. package/dist/node/ui/index.js +5 -3018
  145. package/dist/node/ui/modals/AgentActionsModal.js +1 -304
  146. package/dist/node/ui/modals/CreateAgentModal.js +1 -243
  147. package/dist/node/ui/modals/index.js +1 -546
  148. package/dist/node/ui/overlays/demo-overlays.js +1 -64
  149. package/dist/node/ui/overlays/index.js +1 -64
  150. package/dist/node/ui/renderers/agent-list.markdown.js +2 -64
  151. package/dist/node/ui/renderers/agent-list.renderer.js +1 -180
  152. package/dist/node/ui/renderers/dashboard.markdown.js +2 -288
  153. package/dist/node/ui/renderers/index.js +5 -642
  154. package/dist/node/ui/renderers/run-list.markdown.js +2 -50
  155. package/dist/node/ui/renderers/tool-registry.markdown.js +2 -64
  156. package/dist/node/ui/views/AgentListView.js +1 -165
  157. package/dist/node/ui/views/RunDataTable.js +1 -326
  158. package/dist/node/ui/views/RunListView.js +1 -479
  159. package/dist/node/ui/views/ToolRegistryView.js +1 -209
  160. package/dist/node/ui/views/index.js +1 -851
  161. package/dist/node/ui/views/run-data-table.columns.js +1 -271
  162. package/dist/node/ui/views/run-list.shared.js +1 -177
  163. package/dist/node/visualizations/catalog.js +1 -134
  164. package/dist/node/visualizations/index.js +1 -187
  165. package/dist/node/visualizations/selectors.js +1 -181
  166. package/dist/presentations/index.js +1 -693
  167. package/dist/run/index.js +1 -1363
  168. package/dist/run/run.entity.js +1 -160
  169. package/dist/run/run.enum.js +1 -34
  170. package/dist/run/run.event.js +1 -217
  171. package/dist/run/run.handler.js +1 -919
  172. package/dist/run/run.operation.js +1 -667
  173. package/dist/run/run.presentation.js +1 -223
  174. package/dist/run/run.schema.js +1 -179
  175. package/dist/run/run.test-spec.js +1 -58
  176. package/dist/seeders/index.js +2 -21
  177. package/dist/shared/index.js +1 -626
  178. package/dist/shared/mock-agents.js +1 -82
  179. package/dist/shared/mock-runs.js +1 -113
  180. package/dist/shared/mock-tools.js +1 -146
  181. package/dist/tool/index.js +1 -949
  182. package/dist/tool/tool.entity.js +1 -90
  183. package/dist/tool/tool.enum.js +1 -26
  184. package/dist/tool/tool.event.js +1 -99
  185. package/dist/tool/tool.handler.js +1 -699
  186. package/dist/tool/tool.operation.js +1 -482
  187. package/dist/tool/tool.presentation.js +1 -188
  188. package/dist/tool/tool.schema.js +1 -141
  189. package/dist/tool/tool.test-spec.js +1 -58
  190. package/dist/ui/AgentDashboard.js +1 -2527
  191. package/dist/ui/AgentDashboard.visualizations.js +1 -217
  192. package/dist/ui/AgentRunList.js +1 -482
  193. package/dist/ui/AgentToolRegistry.js +1 -212
  194. package/dist/ui/ExecutionConsoleHost.d.ts +1 -0
  195. package/dist/ui/ExecutionConsoleHost.js +2 -0
  196. package/dist/ui/ExecutionConsoleHost.test.d.ts +1 -0
  197. package/dist/ui/hooks/index.js +1 -740
  198. package/dist/ui/hooks/useAgentList.js +1 -55
  199. package/dist/ui/hooks/useAgentMutations.js +1 -530
  200. package/dist/ui/hooks/useRunList.js +1 -70
  201. package/dist/ui/hooks/useToolList.js +1 -85
  202. package/dist/ui/index.d.ts +1 -0
  203. package/dist/ui/index.js +5 -3018
  204. package/dist/ui/modals/AgentActionsModal.js +1 -304
  205. package/dist/ui/modals/CreateAgentModal.js +1 -243
  206. package/dist/ui/modals/index.js +1 -546
  207. package/dist/ui/overlays/demo-overlays.js +1 -64
  208. package/dist/ui/overlays/index.js +1 -64
  209. package/dist/ui/renderers/agent-list.markdown.js +2 -64
  210. package/dist/ui/renderers/agent-list.renderer.js +1 -180
  211. package/dist/ui/renderers/dashboard.markdown.js +2 -288
  212. package/dist/ui/renderers/index.js +5 -642
  213. package/dist/ui/renderers/run-list.markdown.js +2 -50
  214. package/dist/ui/renderers/tool-registry.markdown.js +2 -64
  215. package/dist/ui/views/AgentListView.js +1 -165
  216. package/dist/ui/views/RunDataTable.js +1 -326
  217. package/dist/ui/views/RunListView.js +1 -479
  218. package/dist/ui/views/ToolRegistryView.js +1 -209
  219. package/dist/ui/views/index.js +1 -851
  220. package/dist/ui/views/run-data-table.columns.js +1 -271
  221. package/dist/ui/views/run-list.shared.js +1 -177
  222. package/dist/visualizations/catalog.js +1 -134
  223. package/dist/visualizations/index.js +1 -187
  224. package/dist/visualizations/selectors.js +1 -181
  225. package/package.json +26 -10
  226. package/src/ui/ExecutionConsoleHost.test.tsx +110 -0
  227. package/src/ui/ExecutionConsoleHost.tsx +14 -0
  228. package/src/ui/index.ts +1 -1
@@ -1,282 +1 @@
1
- // src/agent/agent.enum.ts
2
- import { defineEnum } from "@contractspec/lib.schema";
3
- var AgentStatusEnum = defineEnum("AgentStatus", [
4
- "DRAFT",
5
- "ACTIVE",
6
- "PAUSED",
7
- "ARCHIVED"
8
- ]);
9
- var ModelProviderEnum = defineEnum("ModelProvider", [
10
- "OPENAI",
11
- "ANTHROPIC",
12
- "GOOGLE",
13
- "MISTRAL",
14
- "CUSTOM"
15
- ]);
16
- var ToolChoiceEnum = defineEnum("ToolChoice", [
17
- "auto",
18
- "required",
19
- "none"
20
- ]);
21
-
22
- // src/agent/agent.schema.ts
23
- import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
24
- var AgentModel = defineSchemaModel({
25
- name: "Agent",
26
- description: "AI agent configuration",
27
- fields: {
28
- id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
29
- organizationId: {
30
- type: ScalarTypeEnum.String_unsecure(),
31
- isOptional: false
32
- },
33
- name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
34
- slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
35
- description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
36
- status: { type: AgentStatusEnum, isOptional: false },
37
- modelProvider: { type: ModelProviderEnum, isOptional: false },
38
- modelName: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
39
- modelConfig: { type: ScalarTypeEnum.JSONObject(), isOptional: true },
40
- systemPrompt: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
41
- userPromptTemplate: {
42
- type: ScalarTypeEnum.String_unsecure(),
43
- isOptional: true
44
- },
45
- toolIds: {
46
- type: ScalarTypeEnum.String_unsecure(),
47
- isArray: true,
48
- isOptional: true
49
- },
50
- toolChoice: {
51
- type: ToolChoiceEnum,
52
- isOptional: false,
53
- defaultValue: "auto"
54
- },
55
- maxIterations: {
56
- type: ScalarTypeEnum.Int_unsecure(),
57
- isOptional: false,
58
- defaultValue: 10
59
- },
60
- maxTokensPerRun: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
61
- timeoutMs: {
62
- type: ScalarTypeEnum.Int_unsecure(),
63
- isOptional: false,
64
- defaultValue: 120000
65
- },
66
- version: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
67
- tags: {
68
- type: ScalarTypeEnum.String_unsecure(),
69
- isArray: true,
70
- isOptional: true
71
- },
72
- createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },
73
- updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
74
- }
75
- });
76
- var AgentSummaryModel = defineSchemaModel({
77
- name: "AgentSummary",
78
- description: "Summary of an agent for list views",
79
- fields: {
80
- id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
81
- name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
82
- slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
83
- description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
84
- status: { type: AgentStatusEnum, isOptional: false },
85
- modelProvider: { type: ModelProviderEnum, isOptional: false },
86
- modelName: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
87
- version: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
88
- createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
89
- }
90
- });
91
- var AgentToolRefModel = defineSchemaModel({
92
- name: "AgentToolRef",
93
- description: "Tool reference in agent context",
94
- fields: {
95
- id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
96
- name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
97
- slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
98
- description: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
99
- category: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }
100
- }
101
- });
102
- var AgentWithToolsModel = defineSchemaModel({
103
- name: "AgentWithTools",
104
- description: "Agent with associated tools",
105
- fields: {
106
- id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
107
- organizationId: {
108
- type: ScalarTypeEnum.String_unsecure(),
109
- isOptional: false
110
- },
111
- name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
112
- slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
113
- description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
114
- status: { type: AgentStatusEnum, isOptional: false },
115
- modelProvider: { type: ModelProviderEnum, isOptional: false },
116
- modelName: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
117
- modelConfig: { type: ScalarTypeEnum.JSONObject(), isOptional: true },
118
- systemPrompt: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
119
- userPromptTemplate: {
120
- type: ScalarTypeEnum.String_unsecure(),
121
- isOptional: true
122
- },
123
- toolIds: {
124
- type: ScalarTypeEnum.String_unsecure(),
125
- isArray: true,
126
- isOptional: true
127
- },
128
- toolChoice: { type: ToolChoiceEnum, isOptional: false },
129
- maxIterations: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
130
- maxTokensPerRun: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
131
- timeoutMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
132
- version: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
133
- tags: {
134
- type: ScalarTypeEnum.String_unsecure(),
135
- isArray: true,
136
- isOptional: true
137
- },
138
- createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },
139
- updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },
140
- tools: { type: AgentToolRefModel, isArray: true, isOptional: true }
141
- }
142
- });
143
- var CreateAgentInputModel = defineSchemaModel({
144
- name: "CreateAgentInput",
145
- description: "Input for creating an agent",
146
- fields: {
147
- organizationId: {
148
- type: ScalarTypeEnum.String_unsecure(),
149
- isOptional: false
150
- },
151
- name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
152
- slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
153
- description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
154
- modelProvider: { type: ModelProviderEnum, isOptional: false },
155
- modelName: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
156
- modelConfig: { type: ScalarTypeEnum.JSONObject(), isOptional: true },
157
- systemPrompt: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
158
- userPromptTemplate: {
159
- type: ScalarTypeEnum.String_unsecure(),
160
- isOptional: true
161
- },
162
- toolIds: {
163
- type: ScalarTypeEnum.String_unsecure(),
164
- isArray: true,
165
- isOptional: true
166
- },
167
- toolChoice: { type: ToolChoiceEnum, isOptional: true },
168
- maxIterations: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
169
- maxTokensPerRun: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
170
- timeoutMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
171
- tags: {
172
- type: ScalarTypeEnum.String_unsecure(),
173
- isArray: true,
174
- isOptional: true
175
- }
176
- }
177
- });
178
- var UpdateAgentInputModel = defineSchemaModel({
179
- name: "UpdateAgentInput",
180
- description: "Input for updating an agent",
181
- fields: {
182
- agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
183
- name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: true },
184
- description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
185
- status: { type: AgentStatusEnum, isOptional: true },
186
- modelConfig: { type: ScalarTypeEnum.JSONObject(), isOptional: true },
187
- systemPrompt: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
188
- userPromptTemplate: {
189
- type: ScalarTypeEnum.String_unsecure(),
190
- isOptional: true
191
- },
192
- toolIds: {
193
- type: ScalarTypeEnum.String_unsecure(),
194
- isArray: true,
195
- isOptional: true
196
- },
197
- toolChoice: { type: ToolChoiceEnum, isOptional: true },
198
- maxIterations: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
199
- maxTokensPerRun: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
200
- timeoutMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
201
- tags: {
202
- type: ScalarTypeEnum.String_unsecure(),
203
- isArray: true,
204
- isOptional: true
205
- }
206
- }
207
- });
208
-
209
- // src/agent/agent.presentation.ts
210
- import {
211
- definePresentation,
212
- StabilityEnum
213
- } from "@contractspec/lib.contracts-spec";
214
- var AgentListPresentation = definePresentation({
215
- meta: {
216
- key: "agent-console.agent.viewList",
217
- version: "1.0.0",
218
- title: "Agent List",
219
- description: "List view of AI agents with status, model provider, and version info",
220
- goal: "Provide an overview of all agents in an organization.",
221
- context: "Main landing page for agent management.",
222
- domain: "agent-console",
223
- owners: ["@agent-console-team"],
224
- tags: ["agent", "list", "dashboard"],
225
- stability: StabilityEnum.Experimental
226
- },
227
- source: {
228
- type: "component",
229
- framework: "react",
230
- componentKey: "AgentListView",
231
- props: AgentSummaryModel
232
- },
233
- targets: ["react", "markdown", "application/json"],
234
- policy: { flags: ["agent-console.enabled"] }
235
- });
236
- var AgentDetailPresentation = definePresentation({
237
- meta: {
238
- key: "agent-console.agent.detail",
239
- version: "1.0.0",
240
- title: "Agent Details",
241
- description: "Detailed view of an AI agent with configuration, tools, and recent runs",
242
- goal: "Allow users to inspect and configure a specific agent.",
243
- context: "Detailed view of an agent.",
244
- domain: "agent-console",
245
- owners: ["@agent-console-team"],
246
- tags: ["agent", "detail"],
247
- stability: StabilityEnum.Experimental
248
- },
249
- source: {
250
- type: "component",
251
- framework: "react",
252
- componentKey: "AgentDetailView"
253
- },
254
- targets: ["react", "markdown"],
255
- policy: { flags: ["agent-console.enabled"] }
256
- });
257
- var AgentConsoleDashboardPresentation = definePresentation({
258
- meta: {
259
- key: "agent-console.dashboard",
260
- version: "1.0.0",
261
- title: "Agent Console Dashboard",
262
- description: "Dashboard overview of AI agents, runs, and tools",
263
- goal: "Provide a high-level overview of the AI platform health and usage.",
264
- context: "Root dashboard of the Agent Console.",
265
- domain: "agent-console",
266
- owners: ["@agent-console-team"],
267
- tags: ["dashboard", "overview"],
268
- stability: StabilityEnum.Experimental
269
- },
270
- source: {
271
- type: "component",
272
- framework: "react",
273
- componentKey: "AgentConsoleDashboard"
274
- },
275
- targets: ["react", "markdown"],
276
- policy: { flags: ["agent-console.enabled"] }
277
- });
278
- export {
279
- AgentListPresentation,
280
- AgentDetailPresentation,
281
- AgentConsoleDashboardPresentation
282
- };
1
+ import{defineEnum as z}from"@contractspec/lib.schema";var q=z("AgentStatus",["DRAFT","ACTIVE","PAUSED","ARCHIVED"]),w=z("ModelProvider",["OPENAI","ANTHROPIC","GOOGLE","MISTRAL","CUSTOM"]),x=z("ToolChoice",["auto","required","none"]);import{defineSchemaModel as k,ScalarTypeEnum as j}from"@contractspec/lib.schema";var N=k({name:"Agent",description:"AI agent configuration",fields:{id:{type:j.String_unsecure(),isOptional:!1},organizationId:{type:j.String_unsecure(),isOptional:!1},name:{type:j.NonEmptyString(),isOptional:!1},slug:{type:j.String_unsecure(),isOptional:!1},description:{type:j.String_unsecure(),isOptional:!0},status:{type:q,isOptional:!1},modelProvider:{type:w,isOptional:!1},modelName:{type:j.NonEmptyString(),isOptional:!1},modelConfig:{type:j.JSONObject(),isOptional:!0},systemPrompt:{type:j.String_unsecure(),isOptional:!1},userPromptTemplate:{type:j.String_unsecure(),isOptional:!0},toolIds:{type:j.String_unsecure(),isArray:!0,isOptional:!0},toolChoice:{type:x,isOptional:!1,defaultValue:"auto"},maxIterations:{type:j.Int_unsecure(),isOptional:!1,defaultValue:10},maxTokensPerRun:{type:j.Int_unsecure(),isOptional:!0},timeoutMs:{type:j.Int_unsecure(),isOptional:!1,defaultValue:120000},version:{type:j.NonEmptyString(),isOptional:!1},tags:{type:j.String_unsecure(),isArray:!0,isOptional:!0},createdAt:{type:j.DateTime(),isOptional:!1},updatedAt:{type:j.DateTime(),isOptional:!1}}}),F=k({name:"AgentSummary",description:"Summary of an agent for list views",fields:{id:{type:j.String_unsecure(),isOptional:!1},name:{type:j.NonEmptyString(),isOptional:!1},slug:{type:j.String_unsecure(),isOptional:!1},description:{type:j.String_unsecure(),isOptional:!0},status:{type:q,isOptional:!1},modelProvider:{type:w,isOptional:!1},modelName:{type:j.NonEmptyString(),isOptional:!1},version:{type:j.NonEmptyString(),isOptional:!1},createdAt:{type:j.DateTime(),isOptional:!1}}}),G=k({name:"AgentToolRef",description:"Tool reference in agent context",fields:{id:{type:j.String_unsecure(),isOptional:!1},name:{type:j.NonEmptyString(),isOptional:!1},slug:{type:j.String_unsecure(),isOptional:!1},description:{type:j.String_unsecure(),isOptional:!1},category:{type:j.String_unsecure(),isOptional:!1}}}),O=k({name:"AgentWithTools",description:"Agent with associated tools",fields:{id:{type:j.String_unsecure(),isOptional:!1},organizationId:{type:j.String_unsecure(),isOptional:!1},name:{type:j.NonEmptyString(),isOptional:!1},slug:{type:j.String_unsecure(),isOptional:!1},description:{type:j.String_unsecure(),isOptional:!0},status:{type:q,isOptional:!1},modelProvider:{type:w,isOptional:!1},modelName:{type:j.NonEmptyString(),isOptional:!1},modelConfig:{type:j.JSONObject(),isOptional:!0},systemPrompt:{type:j.String_unsecure(),isOptional:!1},userPromptTemplate:{type:j.String_unsecure(),isOptional:!0},toolIds:{type:j.String_unsecure(),isArray:!0,isOptional:!0},toolChoice:{type:x,isOptional:!1},maxIterations:{type:j.Int_unsecure(),isOptional:!1},maxTokensPerRun:{type:j.Int_unsecure(),isOptional:!0},timeoutMs:{type:j.Int_unsecure(),isOptional:!1},version:{type:j.NonEmptyString(),isOptional:!1},tags:{type:j.String_unsecure(),isArray:!0,isOptional:!0},createdAt:{type:j.DateTime(),isOptional:!1},updatedAt:{type:j.DateTime(),isOptional:!1},tools:{type:G,isArray:!0,isOptional:!0}}}),Q=k({name:"CreateAgentInput",description:"Input for creating an agent",fields:{organizationId:{type:j.String_unsecure(),isOptional:!1},name:{type:j.NonEmptyString(),isOptional:!1},slug:{type:j.String_unsecure(),isOptional:!1},description:{type:j.String_unsecure(),isOptional:!0},modelProvider:{type:w,isOptional:!1},modelName:{type:j.NonEmptyString(),isOptional:!1},modelConfig:{type:j.JSONObject(),isOptional:!0},systemPrompt:{type:j.String_unsecure(),isOptional:!1},userPromptTemplate:{type:j.String_unsecure(),isOptional:!0},toolIds:{type:j.String_unsecure(),isArray:!0,isOptional:!0},toolChoice:{type:x,isOptional:!0},maxIterations:{type:j.Int_unsecure(),isOptional:!0},maxTokensPerRun:{type:j.Int_unsecure(),isOptional:!0},timeoutMs:{type:j.Int_unsecure(),isOptional:!0},tags:{type:j.String_unsecure(),isArray:!0,isOptional:!0}}}),U=k({name:"UpdateAgentInput",description:"Input for updating an agent",fields:{agentId:{type:j.String_unsecure(),isOptional:!1},name:{type:j.NonEmptyString(),isOptional:!0},description:{type:j.String_unsecure(),isOptional:!0},status:{type:q,isOptional:!0},modelConfig:{type:j.JSONObject(),isOptional:!0},systemPrompt:{type:j.String_unsecure(),isOptional:!0},userPromptTemplate:{type:j.String_unsecure(),isOptional:!0},toolIds:{type:j.String_unsecure(),isArray:!0,isOptional:!0},toolChoice:{type:x,isOptional:!0},maxIterations:{type:j.Int_unsecure(),isOptional:!0},maxTokensPerRun:{type:j.Int_unsecure(),isOptional:!0},timeoutMs:{type:j.Int_unsecure(),isOptional:!0},tags:{type:j.String_unsecure(),isArray:!0,isOptional:!0}}});import{definePresentation as B,StabilityEnum as D}from"@contractspec/lib.contracts-spec";var Y=B({meta:{key:"agent-console.agent.viewList",version:"1.0.0",title:"Agent List",description:"List view of AI agents with status, model provider, and version info",goal:"Provide an overview of all agents in an organization.",context:"Main landing page for agent management.",domain:"agent-console",owners:["@agent-console-team"],tags:["agent","list","dashboard"],stability:D.Experimental},source:{type:"component",framework:"react",componentKey:"AgentListView",props:F},targets:["react","markdown","application/json"],policy:{flags:["agent-console.enabled"]}}),Z=B({meta:{key:"agent-console.agent.detail",version:"1.0.0",title:"Agent Details",description:"Detailed view of an AI agent with configuration, tools, and recent runs",goal:"Allow users to inspect and configure a specific agent.",context:"Detailed view of an agent.",domain:"agent-console",owners:["@agent-console-team"],tags:["agent","detail"],stability:D.Experimental},source:{type:"component",framework:"react",componentKey:"AgentDetailView"},targets:["react","markdown"],policy:{flags:["agent-console.enabled"]}}),_=B({meta:{key:"agent-console.dashboard",version:"1.0.0",title:"Agent Console Dashboard",description:"Dashboard overview of AI agents, runs, and tools",goal:"Provide a high-level overview of the AI platform health and usage.",context:"Root dashboard of the Agent Console.",domain:"agent-console",owners:["@agent-console-team"],tags:["dashboard","overview"],stability:D.Experimental},source:{type:"component",framework:"react",componentKey:"AgentConsoleDashboard"},targets:["react","markdown"],policy:{flags:["agent-console.enabled"]}});export{Y as AgentListPresentation,Z as AgentDetailPresentation,_ as AgentConsoleDashboardPresentation};
@@ -1,215 +1 @@
1
- // src/agent/agent.enum.ts
2
- import { defineEnum } from "@contractspec/lib.schema";
3
- var AgentStatusEnum = defineEnum("AgentStatus", [
4
- "DRAFT",
5
- "ACTIVE",
6
- "PAUSED",
7
- "ARCHIVED"
8
- ]);
9
- var ModelProviderEnum = defineEnum("ModelProvider", [
10
- "OPENAI",
11
- "ANTHROPIC",
12
- "GOOGLE",
13
- "MISTRAL",
14
- "CUSTOM"
15
- ]);
16
- var ToolChoiceEnum = defineEnum("ToolChoice", [
17
- "auto",
18
- "required",
19
- "none"
20
- ]);
21
-
22
- // src/agent/agent.schema.ts
23
- import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
24
- var AgentModel = defineSchemaModel({
25
- name: "Agent",
26
- description: "AI agent configuration",
27
- fields: {
28
- id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
29
- organizationId: {
30
- type: ScalarTypeEnum.String_unsecure(),
31
- isOptional: false
32
- },
33
- name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
34
- slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
35
- description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
36
- status: { type: AgentStatusEnum, isOptional: false },
37
- modelProvider: { type: ModelProviderEnum, isOptional: false },
38
- modelName: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
39
- modelConfig: { type: ScalarTypeEnum.JSONObject(), isOptional: true },
40
- systemPrompt: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
41
- userPromptTemplate: {
42
- type: ScalarTypeEnum.String_unsecure(),
43
- isOptional: true
44
- },
45
- toolIds: {
46
- type: ScalarTypeEnum.String_unsecure(),
47
- isArray: true,
48
- isOptional: true
49
- },
50
- toolChoice: {
51
- type: ToolChoiceEnum,
52
- isOptional: false,
53
- defaultValue: "auto"
54
- },
55
- maxIterations: {
56
- type: ScalarTypeEnum.Int_unsecure(),
57
- isOptional: false,
58
- defaultValue: 10
59
- },
60
- maxTokensPerRun: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
61
- timeoutMs: {
62
- type: ScalarTypeEnum.Int_unsecure(),
63
- isOptional: false,
64
- defaultValue: 120000
65
- },
66
- version: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
67
- tags: {
68
- type: ScalarTypeEnum.String_unsecure(),
69
- isArray: true,
70
- isOptional: true
71
- },
72
- createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },
73
- updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
74
- }
75
- });
76
- var AgentSummaryModel = defineSchemaModel({
77
- name: "AgentSummary",
78
- description: "Summary of an agent for list views",
79
- fields: {
80
- id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
81
- name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
82
- slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
83
- description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
84
- status: { type: AgentStatusEnum, isOptional: false },
85
- modelProvider: { type: ModelProviderEnum, isOptional: false },
86
- modelName: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
87
- version: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
88
- createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
89
- }
90
- });
91
- var AgentToolRefModel = defineSchemaModel({
92
- name: "AgentToolRef",
93
- description: "Tool reference in agent context",
94
- fields: {
95
- id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
96
- name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
97
- slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
98
- description: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
99
- category: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }
100
- }
101
- });
102
- var AgentWithToolsModel = defineSchemaModel({
103
- name: "AgentWithTools",
104
- description: "Agent with associated tools",
105
- fields: {
106
- id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
107
- organizationId: {
108
- type: ScalarTypeEnum.String_unsecure(),
109
- isOptional: false
110
- },
111
- name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
112
- slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
113
- description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
114
- status: { type: AgentStatusEnum, isOptional: false },
115
- modelProvider: { type: ModelProviderEnum, isOptional: false },
116
- modelName: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
117
- modelConfig: { type: ScalarTypeEnum.JSONObject(), isOptional: true },
118
- systemPrompt: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
119
- userPromptTemplate: {
120
- type: ScalarTypeEnum.String_unsecure(),
121
- isOptional: true
122
- },
123
- toolIds: {
124
- type: ScalarTypeEnum.String_unsecure(),
125
- isArray: true,
126
- isOptional: true
127
- },
128
- toolChoice: { type: ToolChoiceEnum, isOptional: false },
129
- maxIterations: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
130
- maxTokensPerRun: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
131
- timeoutMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
132
- version: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
133
- tags: {
134
- type: ScalarTypeEnum.String_unsecure(),
135
- isArray: true,
136
- isOptional: true
137
- },
138
- createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },
139
- updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },
140
- tools: { type: AgentToolRefModel, isArray: true, isOptional: true }
141
- }
142
- });
143
- var CreateAgentInputModel = defineSchemaModel({
144
- name: "CreateAgentInput",
145
- description: "Input for creating an agent",
146
- fields: {
147
- organizationId: {
148
- type: ScalarTypeEnum.String_unsecure(),
149
- isOptional: false
150
- },
151
- name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
152
- slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
153
- description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
154
- modelProvider: { type: ModelProviderEnum, isOptional: false },
155
- modelName: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
156
- modelConfig: { type: ScalarTypeEnum.JSONObject(), isOptional: true },
157
- systemPrompt: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
158
- userPromptTemplate: {
159
- type: ScalarTypeEnum.String_unsecure(),
160
- isOptional: true
161
- },
162
- toolIds: {
163
- type: ScalarTypeEnum.String_unsecure(),
164
- isArray: true,
165
- isOptional: true
166
- },
167
- toolChoice: { type: ToolChoiceEnum, isOptional: true },
168
- maxIterations: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
169
- maxTokensPerRun: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
170
- timeoutMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
171
- tags: {
172
- type: ScalarTypeEnum.String_unsecure(),
173
- isArray: true,
174
- isOptional: true
175
- }
176
- }
177
- });
178
- var UpdateAgentInputModel = defineSchemaModel({
179
- name: "UpdateAgentInput",
180
- description: "Input for updating an agent",
181
- fields: {
182
- agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
183
- name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: true },
184
- description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
185
- status: { type: AgentStatusEnum, isOptional: true },
186
- modelConfig: { type: ScalarTypeEnum.JSONObject(), isOptional: true },
187
- systemPrompt: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
188
- userPromptTemplate: {
189
- type: ScalarTypeEnum.String_unsecure(),
190
- isOptional: true
191
- },
192
- toolIds: {
193
- type: ScalarTypeEnum.String_unsecure(),
194
- isArray: true,
195
- isOptional: true
196
- },
197
- toolChoice: { type: ToolChoiceEnum, isOptional: true },
198
- maxIterations: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
199
- maxTokensPerRun: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
200
- timeoutMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
201
- tags: {
202
- type: ScalarTypeEnum.String_unsecure(),
203
- isArray: true,
204
- isOptional: true
205
- }
206
- }
207
- });
208
- export {
209
- UpdateAgentInputModel,
210
- CreateAgentInputModel,
211
- AgentWithToolsModel,
212
- AgentToolRefModel,
213
- AgentSummaryModel,
214
- AgentModel
215
- };
1
+ import{defineEnum as z}from"@contractspec/lib.schema";var q=z("AgentStatus",["DRAFT","ACTIVE","PAUSED","ARCHIVED"]),w=z("ModelProvider",["OPENAI","ANTHROPIC","GOOGLE","MISTRAL","CUSTOM"]),x=z("ToolChoice",["auto","required","none"]);import{defineSchemaModel as k,ScalarTypeEnum as j}from"@contractspec/lib.schema";var J=k({name:"Agent",description:"AI agent configuration",fields:{id:{type:j.String_unsecure(),isOptional:!1},organizationId:{type:j.String_unsecure(),isOptional:!1},name:{type:j.NonEmptyString(),isOptional:!1},slug:{type:j.String_unsecure(),isOptional:!1},description:{type:j.String_unsecure(),isOptional:!0},status:{type:q,isOptional:!1},modelProvider:{type:w,isOptional:!1},modelName:{type:j.NonEmptyString(),isOptional:!1},modelConfig:{type:j.JSONObject(),isOptional:!0},systemPrompt:{type:j.String_unsecure(),isOptional:!1},userPromptTemplate:{type:j.String_unsecure(),isOptional:!0},toolIds:{type:j.String_unsecure(),isArray:!0,isOptional:!0},toolChoice:{type:x,isOptional:!1,defaultValue:"auto"},maxIterations:{type:j.Int_unsecure(),isOptional:!1,defaultValue:10},maxTokensPerRun:{type:j.Int_unsecure(),isOptional:!0},timeoutMs:{type:j.Int_unsecure(),isOptional:!1,defaultValue:120000},version:{type:j.NonEmptyString(),isOptional:!1},tags:{type:j.String_unsecure(),isArray:!0,isOptional:!0},createdAt:{type:j.DateTime(),isOptional:!1},updatedAt:{type:j.DateTime(),isOptional:!1}}}),K=k({name:"AgentSummary",description:"Summary of an agent for list views",fields:{id:{type:j.String_unsecure(),isOptional:!1},name:{type:j.NonEmptyString(),isOptional:!1},slug:{type:j.String_unsecure(),isOptional:!1},description:{type:j.String_unsecure(),isOptional:!0},status:{type:q,isOptional:!1},modelProvider:{type:w,isOptional:!1},modelName:{type:j.NonEmptyString(),isOptional:!1},version:{type:j.NonEmptyString(),isOptional:!1},createdAt:{type:j.DateTime(),isOptional:!1}}}),B=k({name:"AgentToolRef",description:"Tool reference in agent context",fields:{id:{type:j.String_unsecure(),isOptional:!1},name:{type:j.NonEmptyString(),isOptional:!1},slug:{type:j.String_unsecure(),isOptional:!1},description:{type:j.String_unsecure(),isOptional:!1},category:{type:j.String_unsecure(),isOptional:!1}}}),L=k({name:"AgentWithTools",description:"Agent with associated tools",fields:{id:{type:j.String_unsecure(),isOptional:!1},organizationId:{type:j.String_unsecure(),isOptional:!1},name:{type:j.NonEmptyString(),isOptional:!1},slug:{type:j.String_unsecure(),isOptional:!1},description:{type:j.String_unsecure(),isOptional:!0},status:{type:q,isOptional:!1},modelProvider:{type:w,isOptional:!1},modelName:{type:j.NonEmptyString(),isOptional:!1},modelConfig:{type:j.JSONObject(),isOptional:!0},systemPrompt:{type:j.String_unsecure(),isOptional:!1},userPromptTemplate:{type:j.String_unsecure(),isOptional:!0},toolIds:{type:j.String_unsecure(),isArray:!0,isOptional:!0},toolChoice:{type:x,isOptional:!1},maxIterations:{type:j.Int_unsecure(),isOptional:!1},maxTokensPerRun:{type:j.Int_unsecure(),isOptional:!0},timeoutMs:{type:j.Int_unsecure(),isOptional:!1},version:{type:j.NonEmptyString(),isOptional:!1},tags:{type:j.String_unsecure(),isArray:!0,isOptional:!0},createdAt:{type:j.DateTime(),isOptional:!1},updatedAt:{type:j.DateTime(),isOptional:!1},tools:{type:B,isArray:!0,isOptional:!0}}}),N=k({name:"CreateAgentInput",description:"Input for creating an agent",fields:{organizationId:{type:j.String_unsecure(),isOptional:!1},name:{type:j.NonEmptyString(),isOptional:!1},slug:{type:j.String_unsecure(),isOptional:!1},description:{type:j.String_unsecure(),isOptional:!0},modelProvider:{type:w,isOptional:!1},modelName:{type:j.NonEmptyString(),isOptional:!1},modelConfig:{type:j.JSONObject(),isOptional:!0},systemPrompt:{type:j.String_unsecure(),isOptional:!1},userPromptTemplate:{type:j.String_unsecure(),isOptional:!0},toolIds:{type:j.String_unsecure(),isArray:!0,isOptional:!0},toolChoice:{type:x,isOptional:!0},maxIterations:{type:j.Int_unsecure(),isOptional:!0},maxTokensPerRun:{type:j.Int_unsecure(),isOptional:!0},timeoutMs:{type:j.Int_unsecure(),isOptional:!0},tags:{type:j.String_unsecure(),isArray:!0,isOptional:!0}}}),O=k({name:"UpdateAgentInput",description:"Input for updating an agent",fields:{agentId:{type:j.String_unsecure(),isOptional:!1},name:{type:j.NonEmptyString(),isOptional:!0},description:{type:j.String_unsecure(),isOptional:!0},status:{type:q,isOptional:!0},modelConfig:{type:j.JSONObject(),isOptional:!0},systemPrompt:{type:j.String_unsecure(),isOptional:!0},userPromptTemplate:{type:j.String_unsecure(),isOptional:!0},toolIds:{type:j.String_unsecure(),isArray:!0,isOptional:!0},toolChoice:{type:x,isOptional:!0},maxIterations:{type:j.Int_unsecure(),isOptional:!0},maxTokensPerRun:{type:j.Int_unsecure(),isOptional:!0},timeoutMs:{type:j.Int_unsecure(),isOptional:!0},tags:{type:j.String_unsecure(),isArray:!0,isOptional:!0}}});export{O as UpdateAgentInputModel,N as CreateAgentInputModel,L as AgentWithToolsModel,B as AgentToolRefModel,K as AgentSummaryModel,J as AgentModel};
@@ -1,58 +1 @@
1
- // src/agent/agent.test-spec.ts
2
- import { defineTestSpec } from "@contractspec/lib.contracts-spec/tests";
3
- var agentListTest = defineTestSpec({
4
- meta: {
5
- key: "test.agent-console.agent.list",
6
- version: "1.0.0",
7
- owners: ["@agent-console-team"],
8
- description: "Test for listing agents",
9
- stability: "stable",
10
- tags: ["test"]
11
- },
12
- target: {
13
- type: "operation",
14
- operation: { key: "agent-console.agent.list", version: "1.0.0" }
15
- },
16
- scenarios: [
17
- {
18
- key: "success",
19
- when: { operation: { key: "agent-console.agent.list" } },
20
- then: [{ type: "expectOutput", match: {} }]
21
- },
22
- {
23
- key: "error",
24
- when: { operation: { key: "agent-console.agent.list" } },
25
- then: [{ type: "expectError" }]
26
- }
27
- ]
28
- });
29
- var agentGetTest = defineTestSpec({
30
- meta: {
31
- key: "test.agent-console.agent.get",
32
- version: "1.0.0",
33
- owners: ["@agent-console-team"],
34
- description: "Test for getting agent",
35
- stability: "stable",
36
- tags: ["test"]
37
- },
38
- target: {
39
- type: "operation",
40
- operation: { key: "agent-console.agent.get", version: "1.0.0" }
41
- },
42
- scenarios: [
43
- {
44
- key: "success",
45
- when: { operation: { key: "agent-console.agent.get" } },
46
- then: [{ type: "expectOutput", match: {} }]
47
- },
48
- {
49
- key: "error",
50
- when: { operation: { key: "agent-console.agent.get" } },
51
- then: [{ type: "expectError" }]
52
- }
53
- ]
54
- });
55
- export {
56
- agentListTest,
57
- agentGetTest
58
- };
1
+ import{defineTestSpec as g}from"@contractspec/lib.contracts-spec/tests";var j=g({meta:{key:"test.agent-console.agent.list",version:"1.0.0",owners:["@agent-console-team"],description:"Test for listing agents",stability:"stable",tags:["test"]},target:{type:"operation",operation:{key:"agent-console.agent.list",version:"1.0.0"}},scenarios:[{key:"success",when:{operation:{key:"agent-console.agent.list"}},then:[{type:"expectOutput",match:{}}]},{key:"error",when:{operation:{key:"agent-console.agent.list"}},then:[{type:"expectError"}]}]}),k=g({meta:{key:"test.agent-console.agent.get",version:"1.0.0",owners:["@agent-console-team"],description:"Test for getting agent",stability:"stable",tags:["test"]},target:{type:"operation",operation:{key:"agent-console.agent.get",version:"1.0.0"}},scenarios:[{key:"success",when:{operation:{key:"agent-console.agent.get"}},then:[{type:"expectOutput",match:{}}]},{key:"error",when:{operation:{key:"agent-console.agent.get"}},then:[{type:"expectError"}]}]});export{j as agentListTest,k as agentGetTest};