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