@contractspec/example.agent-console 1.56.1 → 1.58.0

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 (386) hide show
  1. package/.turbo/turbo-build.log +211 -277
  2. package/.turbo/turbo-prebuild.log +1 -0
  3. package/CHANGELOG.md +36 -0
  4. package/dist/agent/agent.entity.d.ts +35 -40
  5. package/dist/agent/agent.entity.d.ts.map +1 -1
  6. package/dist/agent/agent.entity.js +124 -132
  7. package/dist/agent/agent.enum.d.ts +3 -8
  8. package/dist/agent/agent.enum.d.ts.map +1 -1
  9. package/dist/agent/agent.enum.js +22 -30
  10. package/dist/agent/agent.event.d.ts +105 -111
  11. package/dist/agent/agent.event.d.ts.map +1 -1
  12. package/dist/agent/agent.event.js +107 -200
  13. package/dist/agent/agent.handler.d.ts +74 -77
  14. package/dist/agent/agent.handler.d.ts.map +1 -1
  15. package/dist/agent/agent.handler.js +293 -75
  16. package/dist/agent/agent.operation.d.ts +424 -430
  17. package/dist/agent/agent.operation.d.ts.map +1 -1
  18. package/dist/agent/agent.operation.js +728 -478
  19. package/dist/agent/agent.presentation.d.ts +3 -8
  20. package/dist/agent/agent.presentation.d.ts.map +1 -1
  21. package/dist/agent/agent.presentation.js +275 -84
  22. package/dist/agent/agent.schema.d.ts +371 -376
  23. package/dist/agent/agent.schema.d.ts.map +1 -1
  24. package/dist/agent/agent.schema.js +209 -399
  25. package/dist/agent/agent.test-spec.d.ts +2 -7
  26. package/dist/agent/agent.test-spec.d.ts.map +1 -1
  27. package/dist/agent/agent.test-spec.js +56 -62
  28. package/dist/agent/index.d.ts +11 -8
  29. package/dist/agent/index.d.ts.map +1 -0
  30. package/dist/agent/index.js +1245 -9
  31. package/dist/agent.capability.d.ts +1 -6
  32. package/dist/agent.capability.d.ts.map +1 -1
  33. package/dist/agent.capability.js +17 -20
  34. package/dist/agent.feature.d.ts +7 -7
  35. package/dist/agent.feature.d.ts.map +1 -1
  36. package/dist/agent.feature.js +117 -303
  37. package/dist/browser/agent/agent.entity.js +127 -0
  38. package/dist/browser/agent/agent.enum.js +25 -0
  39. package/dist/browser/agent/agent.event.js +116 -0
  40. package/dist/browser/agent/agent.handler.js +301 -0
  41. package/dist/browser/agent/agent.operation.js +735 -0
  42. package/dist/browser/agent/agent.presentation.js +279 -0
  43. package/dist/browser/agent/agent.schema.js +215 -0
  44. package/dist/browser/agent/agent.test-spec.js +58 -0
  45. package/dist/browser/agent/index.js +1244 -0
  46. package/dist/browser/agent.capability.js +16 -0
  47. package/dist/browser/agent.feature.js +118 -0
  48. package/dist/browser/docs/agent-console.docblock.js +93 -0
  49. package/dist/browser/docs/index.js +93 -0
  50. package/dist/browser/example.js +42 -0
  51. package/dist/browser/handlers/agent.handlers.js +252 -0
  52. package/dist/browser/handlers/index.js +799 -0
  53. package/dist/browser/index.js +5895 -0
  54. package/dist/browser/presentations/index.js +684 -0
  55. package/dist/browser/run/index.js +1350 -0
  56. package/dist/browser/run/run.entity.js +160 -0
  57. package/dist/browser/run/run.enum.js +34 -0
  58. package/dist/browser/run/run.event.js +213 -0
  59. package/dist/browser/run/run.handler.js +254 -0
  60. package/dist/browser/run/run.operation.js +667 -0
  61. package/dist/browser/run/run.presentation.js +220 -0
  62. package/dist/browser/run/run.schema.js +179 -0
  63. package/dist/browser/run/run.test-spec.js +58 -0
  64. package/dist/browser/seeders/index.js +21 -0
  65. package/dist/browser/shared/index.js +334 -0
  66. package/dist/browser/shared/mock-agents.js +82 -0
  67. package/dist/browser/shared/mock-runs.js +108 -0
  68. package/dist/browser/shared/mock-tools.js +146 -0
  69. package/dist/browser/shared/overlay-types.js +0 -0
  70. package/dist/browser/tool/index.js +946 -0
  71. package/dist/browser/tool/tool.entity.js +90 -0
  72. package/dist/browser/tool/tool.enum.js +26 -0
  73. package/dist/browser/tool/tool.event.js +99 -0
  74. package/dist/browser/tool/tool.handler.js +223 -0
  75. package/dist/browser/tool/tool.operation.js +482 -0
  76. package/dist/browser/tool/tool.presentation.js +185 -0
  77. package/dist/browser/tool/tool.schema.js +141 -0
  78. package/dist/browser/tool/tool.test-spec.js +58 -0
  79. package/dist/browser/ui/AgentDashboard.js +1607 -0
  80. package/dist/browser/ui/AgentRunList.js +250 -0
  81. package/dist/browser/ui/AgentToolRegistry.js +212 -0
  82. package/dist/browser/ui/hooks/index.js +271 -0
  83. package/dist/browser/ui/hooks/useAgentList.js +55 -0
  84. package/dist/browser/ui/hooks/useAgentMutations.js +76 -0
  85. package/dist/browser/ui/hooks/useRunList.js +55 -0
  86. package/dist/browser/ui/hooks/useToolList.js +85 -0
  87. package/dist/browser/ui/index.js +2080 -0
  88. package/dist/browser/ui/modals/AgentActionsModal.js +304 -0
  89. package/dist/browser/ui/modals/CreateAgentModal.js +229 -0
  90. package/dist/browser/ui/modals/index.js +532 -0
  91. package/dist/browser/ui/overlays/demo-overlays.js +64 -0
  92. package/dist/browser/ui/overlays/index.js +64 -0
  93. package/dist/browser/ui/renderers/agent-list.markdown.js +55 -0
  94. package/dist/browser/ui/renderers/agent-list.renderer.js +180 -0
  95. package/dist/browser/ui/renderers/dashboard.markdown.js +117 -0
  96. package/dist/browser/ui/renderers/index.js +446 -0
  97. package/dist/browser/ui/renderers/run-list.markdown.js +45 -0
  98. package/dist/browser/ui/renderers/tool-registry.markdown.js +53 -0
  99. package/dist/browser/ui/views/AgentListView.js +165 -0
  100. package/dist/browser/ui/views/RunListView.js +247 -0
  101. package/dist/browser/ui/views/ToolRegistryView.js +209 -0
  102. package/dist/browser/ui/views/index.js +619 -0
  103. package/dist/docs/agent-console.docblock.d.ts +2 -1
  104. package/dist/docs/agent-console.docblock.d.ts.map +1 -0
  105. package/dist/docs/agent-console.docblock.js +45 -64
  106. package/dist/docs/index.d.ts +2 -1
  107. package/dist/docs/index.d.ts.map +1 -0
  108. package/dist/docs/index.js +94 -1
  109. package/dist/example.d.ts +2 -6
  110. package/dist/example.d.ts.map +1 -1
  111. package/dist/example.js +40 -55
  112. package/dist/handlers/agent.handlers.d.ts +121 -121
  113. package/dist/handlers/agent.handlers.d.ts.map +1 -1
  114. package/dist/handlers/agent.handlers.js +235 -245
  115. package/dist/handlers/index.d.ts +8 -5
  116. package/dist/handlers/index.d.ts.map +1 -0
  117. package/dist/handlers/index.js +799 -5
  118. package/dist/index.d.ts +26 -48
  119. package/dist/index.d.ts.map +1 -0
  120. package/dist/index.js +5896 -50
  121. package/dist/node/agent/agent.entity.js +127 -0
  122. package/dist/node/agent/agent.enum.js +25 -0
  123. package/dist/node/agent/agent.event.js +116 -0
  124. package/dist/node/agent/agent.handler.js +301 -0
  125. package/dist/node/agent/agent.operation.js +735 -0
  126. package/dist/node/agent/agent.presentation.js +279 -0
  127. package/dist/node/agent/agent.schema.js +215 -0
  128. package/dist/node/agent/agent.test-spec.js +58 -0
  129. package/dist/node/agent/index.js +1244 -0
  130. package/dist/node/agent.capability.js +16 -0
  131. package/dist/node/agent.feature.js +118 -0
  132. package/dist/node/docs/agent-console.docblock.js +93 -0
  133. package/dist/node/docs/index.js +93 -0
  134. package/dist/node/example.js +42 -0
  135. package/dist/node/handlers/agent.handlers.js +252 -0
  136. package/dist/node/handlers/index.js +799 -0
  137. package/dist/node/index.js +5895 -0
  138. package/dist/node/presentations/index.js +684 -0
  139. package/dist/node/run/index.js +1350 -0
  140. package/dist/node/run/run.entity.js +160 -0
  141. package/dist/node/run/run.enum.js +34 -0
  142. package/dist/node/run/run.event.js +213 -0
  143. package/dist/node/run/run.handler.js +254 -0
  144. package/dist/node/run/run.operation.js +667 -0
  145. package/dist/node/run/run.presentation.js +220 -0
  146. package/dist/node/run/run.schema.js +179 -0
  147. package/dist/node/run/run.test-spec.js +58 -0
  148. package/dist/node/seeders/index.js +21 -0
  149. package/dist/node/shared/index.js +334 -0
  150. package/dist/node/shared/mock-agents.js +82 -0
  151. package/dist/node/shared/mock-runs.js +108 -0
  152. package/dist/node/shared/mock-tools.js +146 -0
  153. package/dist/node/shared/overlay-types.js +0 -0
  154. package/dist/node/tool/index.js +946 -0
  155. package/dist/node/tool/tool.entity.js +90 -0
  156. package/dist/node/tool/tool.enum.js +26 -0
  157. package/dist/node/tool/tool.event.js +99 -0
  158. package/dist/node/tool/tool.handler.js +223 -0
  159. package/dist/node/tool/tool.operation.js +482 -0
  160. package/dist/node/tool/tool.presentation.js +185 -0
  161. package/dist/node/tool/tool.schema.js +141 -0
  162. package/dist/node/tool/tool.test-spec.js +58 -0
  163. package/dist/node/ui/AgentDashboard.js +1607 -0
  164. package/dist/node/ui/AgentRunList.js +250 -0
  165. package/dist/node/ui/AgentToolRegistry.js +212 -0
  166. package/dist/node/ui/hooks/index.js +271 -0
  167. package/dist/node/ui/hooks/useAgentList.js +55 -0
  168. package/dist/node/ui/hooks/useAgentMutations.js +76 -0
  169. package/dist/node/ui/hooks/useRunList.js +55 -0
  170. package/dist/node/ui/hooks/useToolList.js +85 -0
  171. package/dist/node/ui/index.js +2080 -0
  172. package/dist/node/ui/modals/AgentActionsModal.js +304 -0
  173. package/dist/node/ui/modals/CreateAgentModal.js +229 -0
  174. package/dist/node/ui/modals/index.js +532 -0
  175. package/dist/node/ui/overlays/demo-overlays.js +64 -0
  176. package/dist/node/ui/overlays/index.js +64 -0
  177. package/dist/node/ui/renderers/agent-list.markdown.js +55 -0
  178. package/dist/node/ui/renderers/agent-list.renderer.js +180 -0
  179. package/dist/node/ui/renderers/dashboard.markdown.js +117 -0
  180. package/dist/node/ui/renderers/index.js +446 -0
  181. package/dist/node/ui/renderers/run-list.markdown.js +45 -0
  182. package/dist/node/ui/renderers/tool-registry.markdown.js +53 -0
  183. package/dist/node/ui/views/AgentListView.js +165 -0
  184. package/dist/node/ui/views/RunListView.js +247 -0
  185. package/dist/node/ui/views/ToolRegistryView.js +209 -0
  186. package/dist/node/ui/views/index.js +619 -0
  187. package/dist/presentations/index.d.ts +9 -4
  188. package/dist/presentations/index.d.ts.map +1 -0
  189. package/dist/presentations/index.js +684 -4
  190. package/dist/run/index.d.ts +11 -8
  191. package/dist/run/index.d.ts.map +1 -0
  192. package/dist/run/index.js +1351 -9
  193. package/dist/run/run.entity.d.ts +55 -60
  194. package/dist/run/run.entity.d.ts.map +1 -1
  195. package/dist/run/run.entity.js +155 -199
  196. package/dist/run/run.enum.d.ts +4 -9
  197. package/dist/run/run.enum.d.ts.map +1 -1
  198. package/dist/run/run.enum.js +30 -40
  199. package/dist/run/run.event.d.ts +255 -261
  200. package/dist/run/run.event.d.ts.map +1 -1
  201. package/dist/run/run.event.js +198 -418
  202. package/dist/run/run.handler.d.ts +169 -172
  203. package/dist/run/run.handler.d.ts.map +1 -1
  204. package/dist/run/run.handler.js +246 -74
  205. package/dist/run/run.operation.d.ts +658 -664
  206. package/dist/run/run.operation.d.ts.map +1 -1
  207. package/dist/run/run.operation.js +659 -617
  208. package/dist/run/run.presentation.d.ts +2 -7
  209. package/dist/run/run.presentation.d.ts.map +1 -1
  210. package/dist/run/run.presentation.js +217 -61
  211. package/dist/run/run.schema.d.ts +367 -372
  212. package/dist/run/run.schema.d.ts.map +1 -1
  213. package/dist/run/run.schema.js +172 -330
  214. package/dist/run/run.test-spec.d.ts +2 -7
  215. package/dist/run/run.test-spec.d.ts.map +1 -1
  216. package/dist/run/run.test-spec.js +56 -62
  217. package/dist/seeders/index.d.ts +4 -8
  218. package/dist/seeders/index.d.ts.map +1 -1
  219. package/dist/seeders/index.js +19 -17
  220. package/dist/shared/index.d.ts +7 -4
  221. package/dist/shared/index.d.ts.map +1 -0
  222. package/dist/shared/index.js +334 -4
  223. package/dist/shared/mock-agents.d.ts +77 -80
  224. package/dist/shared/mock-agents.d.ts.map +1 -1
  225. package/dist/shared/mock-agents.js +82 -93
  226. package/dist/shared/mock-runs.d.ts +107 -110
  227. package/dist/shared/mock-runs.d.ts.map +1 -1
  228. package/dist/shared/mock-runs.js +108 -117
  229. package/dist/shared/mock-tools.d.ts +217 -220
  230. package/dist/shared/mock-tools.d.ts.map +1 -1
  231. package/dist/shared/mock-tools.js +146 -180
  232. package/dist/shared/overlay-types.d.ts +25 -28
  233. package/dist/shared/overlay-types.d.ts.map +1 -1
  234. package/dist/shared/overlay-types.js +1 -0
  235. package/dist/tool/index.d.ts +11 -8
  236. package/dist/tool/index.d.ts.map +1 -0
  237. package/dist/tool/index.js +947 -9
  238. package/dist/tool/tool.entity.d.ts +23 -28
  239. package/dist/tool/tool.entity.d.ts.map +1 -1
  240. package/dist/tool/tool.entity.js +87 -101
  241. package/dist/tool/tool.enum.d.ts +3 -8
  242. package/dist/tool/tool.enum.d.ts.map +1 -1
  243. package/dist/tool/tool.enum.js +23 -31
  244. package/dist/tool/tool.event.d.ts +84 -90
  245. package/dist/tool/tool.event.d.ts.map +1 -1
  246. package/dist/tool/tool.event.js +92 -151
  247. package/dist/tool/tool.handler.d.ts +266 -269
  248. package/dist/tool/tool.handler.d.ts.map +1 -1
  249. package/dist/tool/tool.handler.js +213 -76
  250. package/dist/tool/tool.operation.d.ts +359 -365
  251. package/dist/tool/tool.operation.d.ts.map +1 -1
  252. package/dist/tool/tool.operation.js +477 -400
  253. package/dist/tool/tool.presentation.d.ts +2 -7
  254. package/dist/tool/tool.presentation.d.ts.map +1 -1
  255. package/dist/tool/tool.presentation.js +182 -61
  256. package/dist/tool/tool.schema.d.ts +196 -201
  257. package/dist/tool/tool.schema.d.ts.map +1 -1
  258. package/dist/tool/tool.schema.js +137 -231
  259. package/dist/tool/tool.test-spec.d.ts +2 -7
  260. package/dist/tool/tool.test-spec.d.ts.map +1 -1
  261. package/dist/tool/tool.test-spec.js +56 -62
  262. package/dist/ui/AgentDashboard.d.ts +1 -6
  263. package/dist/ui/AgentDashboard.d.ts.map +1 -1
  264. package/dist/ui/AgentDashboard.js +1598 -410
  265. package/dist/ui/AgentRunList.d.ts +7 -2
  266. package/dist/ui/AgentRunList.d.ts.map +1 -0
  267. package/dist/ui/AgentRunList.js +249 -3
  268. package/dist/ui/AgentToolRegistry.d.ts +7 -2
  269. package/dist/ui/AgentToolRegistry.d.ts.map +1 -0
  270. package/dist/ui/AgentToolRegistry.js +211 -3
  271. package/dist/ui/hooks/index.d.ts +8 -6
  272. package/dist/ui/hooks/index.d.ts.map +1 -0
  273. package/dist/ui/hooks/index.js +270 -6
  274. package/dist/ui/hooks/useAgentList.d.ts +21 -25
  275. package/dist/ui/hooks/useAgentList.d.ts.map +1 -1
  276. package/dist/ui/hooks/useAgentList.js +52 -62
  277. package/dist/ui/hooks/useAgentMutations.d.ts +22 -25
  278. package/dist/ui/hooks/useAgentMutations.d.ts.map +1 -1
  279. package/dist/ui/hooks/useAgentMutations.js +73 -120
  280. package/dist/ui/hooks/useRunList.d.ts +17 -21
  281. package/dist/ui/hooks/useRunList.d.ts.map +1 -1
  282. package/dist/ui/hooks/useRunList.js +52 -62
  283. package/dist/ui/hooks/useToolList.d.ts +32 -36
  284. package/dist/ui/hooks/useToolList.d.ts.map +1 -1
  285. package/dist/ui/hooks/useToolList.js +82 -92
  286. package/dist/ui/index.d.ts +9 -24
  287. package/dist/ui/index.d.ts.map +1 -0
  288. package/dist/ui/index.js +2081 -24
  289. package/dist/ui/modals/AgentActionsModal.d.ts +11 -24
  290. package/dist/ui/modals/AgentActionsModal.d.ts.map +1 -1
  291. package/dist/ui/modals/AgentActionsModal.js +300 -257
  292. package/dist/ui/modals/CreateAgentModal.d.ts +12 -21
  293. package/dist/ui/modals/CreateAgentModal.d.ts.map +1 -1
  294. package/dist/ui/modals/CreateAgentModal.js +226 -210
  295. package/dist/ui/modals/index.d.ts +3 -3
  296. package/dist/ui/modals/index.d.ts.map +1 -0
  297. package/dist/ui/modals/index.js +532 -3
  298. package/dist/ui/overlays/demo-overlays.d.ts +10 -9
  299. package/dist/ui/overlays/demo-overlays.d.ts.map +1 -1
  300. package/dist/ui/overlays/demo-overlays.js +63 -71
  301. package/dist/ui/overlays/index.d.ts +2 -2
  302. package/dist/ui/overlays/index.d.ts.map +1 -0
  303. package/dist/ui/overlays/index.js +65 -3
  304. package/dist/ui/renderers/agent-list.markdown.d.ts +9 -9
  305. package/dist/ui/renderers/agent-list.markdown.d.ts.map +1 -1
  306. package/dist/ui/renderers/agent-list.markdown.js +55 -50
  307. package/dist/ui/renderers/agent-list.renderer.d.ts +5 -7
  308. package/dist/ui/renderers/agent-list.renderer.d.ts.map +1 -1
  309. package/dist/ui/renderers/agent-list.renderer.js +179 -17
  310. package/dist/ui/renderers/dashboard.markdown.d.ts +9 -9
  311. package/dist/ui/renderers/dashboard.markdown.d.ts.map +1 -1
  312. package/dist/ui/renderers/dashboard.markdown.js +115 -97
  313. package/dist/ui/renderers/index.d.ts +9 -6
  314. package/dist/ui/renderers/index.d.ts.map +1 -0
  315. package/dist/ui/renderers/index.js +446 -6
  316. package/dist/ui/renderers/run-list.markdown.d.ts +9 -9
  317. package/dist/ui/renderers/run-list.markdown.d.ts.map +1 -1
  318. package/dist/ui/renderers/run-list.markdown.js +42 -40
  319. package/dist/ui/renderers/tool-registry.markdown.d.ts +9 -9
  320. package/dist/ui/renderers/tool-registry.markdown.d.ts.map +1 -1
  321. package/dist/ui/renderers/tool-registry.markdown.js +52 -53
  322. package/dist/ui/views/AgentListView.d.ts +1 -6
  323. package/dist/ui/views/AgentListView.d.ts.map +1 -1
  324. package/dist/ui/views/AgentListView.js +161 -88
  325. package/dist/ui/views/RunListView.d.ts +4 -11
  326. package/dist/ui/views/RunListView.d.ts.map +1 -1
  327. package/dist/ui/views/RunListView.js +237 -154
  328. package/dist/ui/views/ToolRegistryView.d.ts +4 -11
  329. package/dist/ui/views/ToolRegistryView.d.ts.map +1 -1
  330. package/dist/ui/views/ToolRegistryView.js +205 -92
  331. package/dist/ui/views/index.d.ts +7 -4
  332. package/dist/ui/views/index.d.ts.map +1 -0
  333. package/dist/ui/views/index.js +619 -4
  334. package/package.json +657 -119
  335. package/tsdown.config.js +1 -2
  336. package/.turbo/turbo-build$colon$bundle.log +0 -280
  337. package/dist/agent/agent.entity.js.map +0 -1
  338. package/dist/agent/agent.enum.js.map +0 -1
  339. package/dist/agent/agent.event.js.map +0 -1
  340. package/dist/agent/agent.handler.js.map +0 -1
  341. package/dist/agent/agent.operation.js.map +0 -1
  342. package/dist/agent/agent.presentation.js.map +0 -1
  343. package/dist/agent/agent.schema.js.map +0 -1
  344. package/dist/agent/agent.test-spec.js.map +0 -1
  345. package/dist/agent.capability.js.map +0 -1
  346. package/dist/agent.feature.js.map +0 -1
  347. package/dist/docs/agent-console.docblock.js.map +0 -1
  348. package/dist/example.js.map +0 -1
  349. package/dist/handlers/agent.handlers.js.map +0 -1
  350. package/dist/run/run.entity.js.map +0 -1
  351. package/dist/run/run.enum.js.map +0 -1
  352. package/dist/run/run.event.js.map +0 -1
  353. package/dist/run/run.handler.js.map +0 -1
  354. package/dist/run/run.operation.js.map +0 -1
  355. package/dist/run/run.presentation.js.map +0 -1
  356. package/dist/run/run.schema.js.map +0 -1
  357. package/dist/run/run.test-spec.js.map +0 -1
  358. package/dist/seeders/index.js.map +0 -1
  359. package/dist/shared/mock-agents.js.map +0 -1
  360. package/dist/shared/mock-runs.js.map +0 -1
  361. package/dist/shared/mock-tools.js.map +0 -1
  362. package/dist/tool/tool.entity.js.map +0 -1
  363. package/dist/tool/tool.enum.js.map +0 -1
  364. package/dist/tool/tool.event.js.map +0 -1
  365. package/dist/tool/tool.handler.js.map +0 -1
  366. package/dist/tool/tool.operation.js.map +0 -1
  367. package/dist/tool/tool.presentation.js.map +0 -1
  368. package/dist/tool/tool.schema.js.map +0 -1
  369. package/dist/tool/tool.test-spec.js.map +0 -1
  370. package/dist/ui/AgentDashboard.js.map +0 -1
  371. package/dist/ui/hooks/useAgentList.js.map +0 -1
  372. package/dist/ui/hooks/useAgentMutations.js.map +0 -1
  373. package/dist/ui/hooks/useRunList.js.map +0 -1
  374. package/dist/ui/hooks/useToolList.js.map +0 -1
  375. package/dist/ui/modals/AgentActionsModal.js.map +0 -1
  376. package/dist/ui/modals/CreateAgentModal.js.map +0 -1
  377. package/dist/ui/overlays/demo-overlays.js.map +0 -1
  378. package/dist/ui/renderers/agent-list.markdown.js.map +0 -1
  379. package/dist/ui/renderers/agent-list.renderer.js.map +0 -1
  380. package/dist/ui/renderers/dashboard.markdown.js.map +0 -1
  381. package/dist/ui/renderers/run-list.markdown.js.map +0 -1
  382. package/dist/ui/renderers/tool-registry.markdown.js.map +0 -1
  383. package/dist/ui/views/AgentListView.js.map +0 -1
  384. package/dist/ui/views/RunListView.js.map +0 -1
  385. package/dist/ui/views/ToolRegistryView.js.map +0 -1
  386. package/tsconfig.tsbuildinfo +0 -1
@@ -1,5 +1,685 @@
1
- import { AgentConsoleDashboardPresentation, AgentDetailPresentation, AgentListPresentation } from "../agent/agent.presentation.js";
2
- import { RunDetailPresentation, RunListPresentation } from "../run/run.presentation.js";
3
- import { ToolDetailPresentation, ToolListPresentation } from "../tool/tool.presentation.js";
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
+ ]);
4
22
 
5
- export { AgentConsoleDashboardPresentation, AgentDetailPresentation, AgentListPresentation, RunDetailPresentation, RunListPresentation, RunDetailPresentation as RunMetricsPresentation, ToolDetailPresentation, ToolListPresentation, ToolListPresentation as ToolRegistryPresentation };
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 { definePresentation, StabilityEnum } from "@contractspec/lib.contracts";
212
+ var AgentListPresentation = definePresentation({
213
+ meta: {
214
+ key: "agent-console.agent.viewList",
215
+ version: "1.0.0",
216
+ title: "Agent List",
217
+ description: "List view of AI agents with status, model provider, and version info",
218
+ goal: "Provide an overview of all agents in an organization.",
219
+ context: "Main landing page for agent management.",
220
+ domain: "agent-console",
221
+ owners: ["@agent-console-team"],
222
+ tags: ["agent", "list", "dashboard"],
223
+ stability: StabilityEnum.Experimental
224
+ },
225
+ source: {
226
+ type: "component",
227
+ framework: "react",
228
+ componentKey: "AgentListView",
229
+ props: AgentSummaryModel
230
+ },
231
+ targets: ["react", "markdown", "application/json"],
232
+ policy: { flags: ["agent-console.enabled"] }
233
+ });
234
+ var AgentDetailPresentation = definePresentation({
235
+ meta: {
236
+ key: "agent-console.agent.detail",
237
+ version: "1.0.0",
238
+ title: "Agent Details",
239
+ description: "Detailed view of an AI agent with configuration, tools, and recent runs",
240
+ goal: "Allow users to inspect and configure a specific agent.",
241
+ context: "Detailed view of an agent.",
242
+ domain: "agent-console",
243
+ owners: ["@agent-console-team"],
244
+ tags: ["agent", "detail"],
245
+ stability: StabilityEnum.Experimental
246
+ },
247
+ source: {
248
+ type: "component",
249
+ framework: "react",
250
+ componentKey: "AgentDetailView"
251
+ },
252
+ targets: ["react", "markdown"],
253
+ policy: { flags: ["agent-console.enabled"] }
254
+ });
255
+ var AgentConsoleDashboardPresentation = definePresentation({
256
+ meta: {
257
+ key: "agent-console.dashboard",
258
+ version: "1.0.0",
259
+ title: "Agent Console Dashboard",
260
+ description: "Dashboard overview of AI agents, runs, and tools",
261
+ goal: "Provide a high-level overview of the AI platform health and usage.",
262
+ context: "Root dashboard of the Agent Console.",
263
+ domain: "agent-console",
264
+ owners: ["@agent-console-team"],
265
+ tags: ["dashboard", "overview"],
266
+ stability: StabilityEnum.Experimental
267
+ },
268
+ source: {
269
+ type: "component",
270
+ framework: "react",
271
+ componentKey: "AgentConsoleDashboard"
272
+ },
273
+ targets: ["react", "markdown"],
274
+ policy: { flags: ["agent-console.enabled"] }
275
+ });
276
+
277
+ // src/run/run.enum.ts
278
+ import { defineEnum as defineEnum2 } from "@contractspec/lib.schema";
279
+ var RunStatusEnum = defineEnum2("RunStatus", [
280
+ "QUEUED",
281
+ "IN_PROGRESS",
282
+ "COMPLETED",
283
+ "FAILED",
284
+ "CANCELLED",
285
+ "EXPIRED"
286
+ ]);
287
+ var RunStepTypeEnum = defineEnum2("RunStepType", [
288
+ "MESSAGE_CREATION",
289
+ "TOOL_CALL",
290
+ "TOOL_RESULT",
291
+ "ERROR"
292
+ ]);
293
+ var LogLevelEnum = defineEnum2("LogLevel", [
294
+ "DEBUG",
295
+ "INFO",
296
+ "WARN",
297
+ "ERROR"
298
+ ]);
299
+ var GranularityEnum = defineEnum2("Granularity", [
300
+ "hour",
301
+ "day",
302
+ "week",
303
+ "month"
304
+ ]);
305
+
306
+ // src/run/run.schema.ts
307
+ import { defineSchemaModel as defineSchemaModel2, ScalarTypeEnum as ScalarTypeEnum2 } from "@contractspec/lib.schema";
308
+ var RunInputModel = defineSchemaModel2({
309
+ name: "RunInput",
310
+ description: "Input data for agent execution",
311
+ fields: {
312
+ message: { type: ScalarTypeEnum2.NonEmptyString(), isOptional: false },
313
+ context: { type: ScalarTypeEnum2.JSONObject(), isOptional: true }
314
+ }
315
+ });
316
+ var RunStepModel = defineSchemaModel2({
317
+ name: "RunStep",
318
+ description: "Individual step within a run",
319
+ fields: {
320
+ id: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
321
+ stepNumber: { type: ScalarTypeEnum2.Int_unsecure(), isOptional: false },
322
+ type: { type: RunStepTypeEnum, isOptional: false },
323
+ toolId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
324
+ toolName: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
325
+ input: { type: ScalarTypeEnum2.JSONObject(), isOptional: true },
326
+ output: { type: ScalarTypeEnum2.JSONObject(), isOptional: true },
327
+ status: { type: RunStatusEnum, isOptional: false },
328
+ errorMessage: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
329
+ tokensUsed: {
330
+ type: ScalarTypeEnum2.Int_unsecure(),
331
+ isOptional: false,
332
+ defaultValue: 0
333
+ },
334
+ durationMs: { type: ScalarTypeEnum2.Int_unsecure(), isOptional: true },
335
+ startedAt: { type: ScalarTypeEnum2.DateTime(), isOptional: false },
336
+ completedAt: { type: ScalarTypeEnum2.DateTime(), isOptional: true }
337
+ }
338
+ });
339
+ var RunLogModel = defineSchemaModel2({
340
+ name: "RunLog",
341
+ description: "Execution log entry",
342
+ fields: {
343
+ id: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
344
+ stepId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
345
+ level: { type: LogLevelEnum, isOptional: false },
346
+ message: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
347
+ data: { type: ScalarTypeEnum2.JSONObject(), isOptional: true },
348
+ source: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
349
+ traceId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
350
+ spanId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
351
+ timestamp: { type: ScalarTypeEnum2.DateTime(), isOptional: false }
352
+ }
353
+ });
354
+ var RunAgentRefModel = defineSchemaModel2({
355
+ name: "RunAgentRef",
356
+ description: "Agent reference in a run",
357
+ fields: {
358
+ id: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
359
+ name: { type: ScalarTypeEnum2.NonEmptyString(), isOptional: false },
360
+ modelProvider: {
361
+ type: ScalarTypeEnum2.String_unsecure(),
362
+ isOptional: false
363
+ },
364
+ modelName: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false }
365
+ }
366
+ });
367
+ var RunModel = defineSchemaModel2({
368
+ name: "Run",
369
+ description: "Agent execution instance",
370
+ fields: {
371
+ id: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
372
+ organizationId: {
373
+ type: ScalarTypeEnum2.String_unsecure(),
374
+ isOptional: false
375
+ },
376
+ agentId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
377
+ userId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
378
+ sessionId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
379
+ input: { type: ScalarTypeEnum2.JSONObject(), isOptional: false },
380
+ output: { type: ScalarTypeEnum2.JSONObject(), isOptional: true },
381
+ status: { type: RunStatusEnum, isOptional: false },
382
+ errorMessage: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
383
+ errorCode: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
384
+ totalTokens: {
385
+ type: ScalarTypeEnum2.Int_unsecure(),
386
+ isOptional: false,
387
+ defaultValue: 0
388
+ },
389
+ promptTokens: {
390
+ type: ScalarTypeEnum2.Int_unsecure(),
391
+ isOptional: false,
392
+ defaultValue: 0
393
+ },
394
+ completionTokens: {
395
+ type: ScalarTypeEnum2.Int_unsecure(),
396
+ isOptional: false,
397
+ defaultValue: 0
398
+ },
399
+ totalIterations: {
400
+ type: ScalarTypeEnum2.Int_unsecure(),
401
+ isOptional: false,
402
+ defaultValue: 0
403
+ },
404
+ durationMs: { type: ScalarTypeEnum2.Int_unsecure(), isOptional: true },
405
+ estimatedCostUsd: {
406
+ type: ScalarTypeEnum2.Float_unsecure(),
407
+ isOptional: true
408
+ },
409
+ queuedAt: { type: ScalarTypeEnum2.DateTime(), isOptional: false },
410
+ startedAt: { type: ScalarTypeEnum2.DateTime(), isOptional: true },
411
+ completedAt: { type: ScalarTypeEnum2.DateTime(), isOptional: true },
412
+ metadata: { type: ScalarTypeEnum2.JSONObject(), isOptional: true },
413
+ steps: { type: RunStepModel, isArray: true, isOptional: true },
414
+ logs: { type: RunLogModel, isArray: true, isOptional: true },
415
+ agent: { type: RunAgentRefModel, isOptional: true }
416
+ }
417
+ });
418
+ var RunSummaryModel = defineSchemaModel2({
419
+ name: "RunSummary",
420
+ description: "Summary of a run for list views",
421
+ fields: {
422
+ id: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
423
+ agentId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
424
+ agentName: { type: ScalarTypeEnum2.NonEmptyString(), isOptional: false },
425
+ status: { type: RunStatusEnum, isOptional: false },
426
+ totalTokens: { type: ScalarTypeEnum2.Int_unsecure(), isOptional: false },
427
+ durationMs: { type: ScalarTypeEnum2.Int_unsecure(), isOptional: true },
428
+ estimatedCostUsd: {
429
+ type: ScalarTypeEnum2.Float_unsecure(),
430
+ isOptional: true
431
+ },
432
+ queuedAt: { type: ScalarTypeEnum2.DateTime(), isOptional: false },
433
+ completedAt: { type: ScalarTypeEnum2.DateTime(), isOptional: true }
434
+ }
435
+ });
436
+ var TimelineDataPointModel = defineSchemaModel2({
437
+ name: "TimelineDataPoint",
438
+ description: "Timeline data point for metrics",
439
+ fields: {
440
+ period: { type: ScalarTypeEnum2.String_unsecure(), isOptional: false },
441
+ runs: { type: ScalarTypeEnum2.Int_unsecure(), isOptional: false },
442
+ tokens: { type: ScalarTypeEnum2.Int_unsecure(), isOptional: false },
443
+ costUsd: { type: ScalarTypeEnum2.Float_unsecure(), isOptional: false },
444
+ avgDurationMs: { type: ScalarTypeEnum2.Float_unsecure(), isOptional: false }
445
+ }
446
+ });
447
+
448
+ // src/run/run.presentation.ts
449
+ import { StabilityEnum as StabilityEnum2, definePresentation as definePresentation2 } from "@contractspec/lib.contracts";
450
+ var RunListPresentation = definePresentation2({
451
+ meta: {
452
+ key: "agent-console.run.list",
453
+ version: "1.0.0",
454
+ title: "Run List",
455
+ description: "List view of agent runs with status, tokens, and duration info",
456
+ goal: "Provide an overview of agent execution history and performance.",
457
+ context: "Run history dashboard.",
458
+ domain: "agent-console",
459
+ owners: ["@agent-console-team"],
460
+ tags: ["run", "list", "dashboard"],
461
+ stability: StabilityEnum2.Experimental
462
+ },
463
+ source: {
464
+ type: "component",
465
+ framework: "react",
466
+ componentKey: "RunListView",
467
+ props: RunSummaryModel
468
+ },
469
+ targets: ["react", "markdown", "application/json"],
470
+ policy: { flags: ["agent-console.enabled"] }
471
+ });
472
+ var RunDetailPresentation = definePresentation2({
473
+ meta: {
474
+ key: "agent-console.run.detail",
475
+ version: "1.0.0",
476
+ title: "Run Details",
477
+ description: "Detailed view of an agent run with steps, logs, and metrics",
478
+ goal: "Allow users to inspect and debug a specific agent run.",
479
+ context: "Detailed view of an agent run.",
480
+ domain: "agent-console",
481
+ owners: ["@agent-console-team"],
482
+ tags: ["run", "detail"],
483
+ stability: StabilityEnum2.Experimental
484
+ },
485
+ source: {
486
+ type: "component",
487
+ framework: "react",
488
+ componentKey: "RunDetailView"
489
+ },
490
+ targets: ["react", "markdown"],
491
+ policy: { flags: ["agent-console.enabled"] }
492
+ });
493
+
494
+ // src/tool/tool.enum.ts
495
+ import { defineEnum as defineEnum3 } from "@contractspec/lib.schema";
496
+ var ToolCategoryEnum = defineEnum3("ToolCategory", [
497
+ "RETRIEVAL",
498
+ "COMPUTATION",
499
+ "COMMUNICATION",
500
+ "INTEGRATION",
501
+ "UTILITY",
502
+ "CUSTOM"
503
+ ]);
504
+ var ToolStatusEnum = defineEnum3("ToolStatus", [
505
+ "DRAFT",
506
+ "ACTIVE",
507
+ "DEPRECATED",
508
+ "DISABLED"
509
+ ]);
510
+ var ImplementationTypeEnum = defineEnum3("ImplementationType", [
511
+ "http",
512
+ "function",
513
+ "workflow"
514
+ ]);
515
+
516
+ // src/tool/tool.schema.ts
517
+ import { defineSchemaModel as defineSchemaModel3, ScalarTypeEnum as ScalarTypeEnum3 } from "@contractspec/lib.schema";
518
+ var ToolModel = defineSchemaModel3({
519
+ name: "Tool",
520
+ description: "AI tool definition",
521
+ fields: {
522
+ id: { type: ScalarTypeEnum3.String_unsecure(), isOptional: false },
523
+ organizationId: {
524
+ type: ScalarTypeEnum3.String_unsecure(),
525
+ isOptional: false
526
+ },
527
+ name: { type: ScalarTypeEnum3.NonEmptyString(), isOptional: false },
528
+ slug: { type: ScalarTypeEnum3.String_unsecure(), isOptional: false },
529
+ description: { type: ScalarTypeEnum3.String_unsecure(), isOptional: false },
530
+ category: { type: ToolCategoryEnum, isOptional: false },
531
+ status: { type: ToolStatusEnum, isOptional: false },
532
+ parametersSchema: { type: ScalarTypeEnum3.JSONObject(), isOptional: false },
533
+ outputSchema: { type: ScalarTypeEnum3.JSONObject(), isOptional: true },
534
+ implementationType: { type: ImplementationTypeEnum, isOptional: false },
535
+ implementationConfig: {
536
+ type: ScalarTypeEnum3.JSONObject(),
537
+ isOptional: false
538
+ },
539
+ maxInvocationsPerMinute: {
540
+ type: ScalarTypeEnum3.Int_unsecure(),
541
+ isOptional: true
542
+ },
543
+ timeoutMs: {
544
+ type: ScalarTypeEnum3.Int_unsecure(),
545
+ isOptional: false,
546
+ defaultValue: 30000
547
+ },
548
+ version: { type: ScalarTypeEnum3.NonEmptyString(), isOptional: false },
549
+ tags: {
550
+ type: ScalarTypeEnum3.String_unsecure(),
551
+ isArray: true,
552
+ isOptional: true
553
+ },
554
+ createdAt: { type: ScalarTypeEnum3.DateTime(), isOptional: false },
555
+ updatedAt: { type: ScalarTypeEnum3.DateTime(), isOptional: false }
556
+ }
557
+ });
558
+ var ToolSummaryModel = defineSchemaModel3({
559
+ name: "ToolSummary",
560
+ description: "Summary of a tool for list views",
561
+ fields: {
562
+ id: { type: ScalarTypeEnum3.String_unsecure(), isOptional: false },
563
+ name: { type: ScalarTypeEnum3.NonEmptyString(), isOptional: false },
564
+ slug: { type: ScalarTypeEnum3.String_unsecure(), isOptional: false },
565
+ description: { type: ScalarTypeEnum3.String_unsecure(), isOptional: false },
566
+ category: { type: ToolCategoryEnum, isOptional: false },
567
+ status: { type: ToolStatusEnum, isOptional: false },
568
+ version: { type: ScalarTypeEnum3.NonEmptyString(), isOptional: false },
569
+ createdAt: { type: ScalarTypeEnum3.DateTime(), isOptional: false }
570
+ }
571
+ });
572
+ var CreateToolInputModel = defineSchemaModel3({
573
+ name: "CreateToolInput",
574
+ description: "Input for creating a tool",
575
+ fields: {
576
+ organizationId: {
577
+ type: ScalarTypeEnum3.String_unsecure(),
578
+ isOptional: false
579
+ },
580
+ name: { type: ScalarTypeEnum3.NonEmptyString(), isOptional: false },
581
+ slug: { type: ScalarTypeEnum3.String_unsecure(), isOptional: false },
582
+ description: { type: ScalarTypeEnum3.String_unsecure(), isOptional: false },
583
+ category: { type: ToolCategoryEnum, isOptional: true },
584
+ parametersSchema: { type: ScalarTypeEnum3.JSONObject(), isOptional: false },
585
+ outputSchema: { type: ScalarTypeEnum3.JSONObject(), isOptional: true },
586
+ implementationType: { type: ImplementationTypeEnum, isOptional: false },
587
+ implementationConfig: {
588
+ type: ScalarTypeEnum3.JSONObject(),
589
+ isOptional: false
590
+ },
591
+ maxInvocationsPerMinute: {
592
+ type: ScalarTypeEnum3.Int_unsecure(),
593
+ isOptional: true
594
+ },
595
+ timeoutMs: { type: ScalarTypeEnum3.Int_unsecure(), isOptional: true },
596
+ tags: {
597
+ type: ScalarTypeEnum3.String_unsecure(),
598
+ isArray: true,
599
+ isOptional: true
600
+ }
601
+ }
602
+ });
603
+ var UpdateToolInputModel = defineSchemaModel3({
604
+ name: "UpdateToolInput",
605
+ description: "Input for updating a tool",
606
+ fields: {
607
+ toolId: { type: ScalarTypeEnum3.String_unsecure(), isOptional: false },
608
+ name: { type: ScalarTypeEnum3.NonEmptyString(), isOptional: true },
609
+ description: { type: ScalarTypeEnum3.String_unsecure(), isOptional: true },
610
+ status: { type: ToolStatusEnum, isOptional: true },
611
+ parametersSchema: { type: ScalarTypeEnum3.JSONObject(), isOptional: true },
612
+ outputSchema: { type: ScalarTypeEnum3.JSONObject(), isOptional: true },
613
+ implementationConfig: {
614
+ type: ScalarTypeEnum3.JSONObject(),
615
+ isOptional: true
616
+ },
617
+ maxInvocationsPerMinute: {
618
+ type: ScalarTypeEnum3.Int_unsecure(),
619
+ isOptional: true
620
+ },
621
+ timeoutMs: { type: ScalarTypeEnum3.Int_unsecure(), isOptional: true },
622
+ tags: {
623
+ type: ScalarTypeEnum3.String_unsecure(),
624
+ isArray: true,
625
+ isOptional: true
626
+ }
627
+ }
628
+ });
629
+
630
+ // src/tool/tool.presentation.ts
631
+ import { StabilityEnum as StabilityEnum3, definePresentation as definePresentation3 } from "@contractspec/lib.contracts";
632
+ var ToolListPresentation = definePresentation3({
633
+ meta: {
634
+ key: "agent-console.tool.list",
635
+ version: "1.0.0",
636
+ title: "Tool List",
637
+ description: "List view of AI tools with category, status, and version info",
638
+ goal: "Provide an overview of all available tools for agents.",
639
+ context: "Tool management dashboard.",
640
+ domain: "agent-console",
641
+ owners: ["@agent-console-team"],
642
+ tags: ["tool", "list", "dashboard"],
643
+ stability: StabilityEnum3.Experimental
644
+ },
645
+ source: {
646
+ type: "component",
647
+ framework: "react",
648
+ componentKey: "ToolListView",
649
+ props: ToolSummaryModel
650
+ },
651
+ targets: ["react", "markdown", "application/json"],
652
+ policy: { flags: ["agent-console.enabled"] }
653
+ });
654
+ var ToolDetailPresentation = definePresentation3({
655
+ meta: {
656
+ key: "agent-console.tool.detail",
657
+ version: "1.0.0",
658
+ title: "Tool Details",
659
+ description: "Detailed view of an AI tool with configuration and test panel",
660
+ goal: "Allow users to inspect and test a specific tool.",
661
+ context: "Detailed view of a tool.",
662
+ domain: "agent-console",
663
+ owners: ["@agent-console-team"],
664
+ tags: ["tool", "detail"],
665
+ stability: StabilityEnum3.Experimental
666
+ },
667
+ source: {
668
+ type: "component",
669
+ framework: "react",
670
+ componentKey: "ToolDetailView"
671
+ },
672
+ targets: ["react", "markdown"],
673
+ policy: { flags: ["agent-console.enabled"] }
674
+ });
675
+ export {
676
+ ToolListPresentation as ToolRegistryPresentation,
677
+ ToolListPresentation,
678
+ ToolDetailPresentation,
679
+ RunDetailPresentation as RunMetricsPresentation,
680
+ RunListPresentation,
681
+ RunDetailPresentation,
682
+ AgentListPresentation,
683
+ AgentDetailPresentation,
684
+ AgentConsoleDashboardPresentation
685
+ };