@contractspec/example.agent-console 3.7.6 → 3.7.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/.turbo/turbo-build.log +18 -18
  2. package/AGENTS.md +50 -31
  3. package/README.md +69 -77
  4. package/dist/agent/agent.event.js +1 -1
  5. package/dist/agent/agent.operation.js +1 -1
  6. package/dist/agent/index.d.ts +5 -5
  7. package/dist/agent/index.js +1 -1
  8. package/dist/browser/agent/agent.event.js +1 -1
  9. package/dist/browser/agent/agent.operation.js +1 -1
  10. package/dist/browser/agent/index.js +1 -1
  11. package/dist/browser/index.js +2145 -2145
  12. package/dist/browser/presentations/index.js +4 -4
  13. package/dist/browser/run/index.js +536 -536
  14. package/dist/browser/run/run.event.js +2 -2
  15. package/dist/browser/run/run.presentation.js +2 -2
  16. package/dist/browser/tool/index.js +260 -260
  17. package/dist/browser/tool/tool.event.js +1 -1
  18. package/dist/browser/tool/tool.presentation.js +2 -2
  19. package/dist/browser/ui/AgentDashboard.js +956 -956
  20. package/dist/browser/ui/AgentRunList.js +16 -16
  21. package/dist/browser/ui/AgentToolRegistry.js +9 -9
  22. package/dist/browser/ui/hooks/index.js +153 -153
  23. package/dist/browser/ui/hooks/useAgentList.js +1 -1
  24. package/dist/browser/ui/hooks/useAgentMutations.js +1 -1
  25. package/dist/browser/ui/hooks/useRunList.js +1 -1
  26. package/dist/browser/ui/hooks/useToolList.js +1 -1
  27. package/dist/browser/ui/index.js +1222 -1222
  28. package/dist/browser/ui/modals/AgentActionsModal.js +13 -13
  29. package/dist/browser/ui/modals/CreateAgentModal.js +15 -15
  30. package/dist/browser/ui/modals/index.js +297 -297
  31. package/dist/browser/ui/renderers/agent-list.renderer.js +7 -7
  32. package/dist/browser/ui/renderers/index.js +157 -157
  33. package/dist/browser/ui/views/AgentListView.js +7 -7
  34. package/dist/browser/ui/views/RunListView.js +16 -16
  35. package/dist/browser/ui/views/ToolRegistryView.js +9 -9
  36. package/dist/browser/ui/views/index.js +97 -97
  37. package/dist/handlers/index.d.ts +1 -1
  38. package/dist/index.d.ts +4 -4
  39. package/dist/index.js +2145 -2145
  40. package/dist/node/agent/agent.event.js +1 -1
  41. package/dist/node/agent/agent.operation.js +1 -1
  42. package/dist/node/agent/index.js +1 -1
  43. package/dist/node/index.js +2145 -2145
  44. package/dist/node/presentations/index.js +4 -4
  45. package/dist/node/run/index.js +536 -536
  46. package/dist/node/run/run.event.js +2 -2
  47. package/dist/node/run/run.presentation.js +2 -2
  48. package/dist/node/tool/index.js +260 -260
  49. package/dist/node/tool/tool.event.js +1 -1
  50. package/dist/node/tool/tool.presentation.js +2 -2
  51. package/dist/node/ui/AgentDashboard.js +956 -956
  52. package/dist/node/ui/AgentRunList.js +16 -16
  53. package/dist/node/ui/AgentToolRegistry.js +9 -9
  54. package/dist/node/ui/hooks/index.js +153 -153
  55. package/dist/node/ui/hooks/useAgentList.js +1 -1
  56. package/dist/node/ui/hooks/useAgentMutations.js +1 -1
  57. package/dist/node/ui/hooks/useRunList.js +1 -1
  58. package/dist/node/ui/hooks/useToolList.js +1 -1
  59. package/dist/node/ui/index.js +1222 -1222
  60. package/dist/node/ui/modals/AgentActionsModal.js +13 -13
  61. package/dist/node/ui/modals/CreateAgentModal.js +15 -15
  62. package/dist/node/ui/modals/index.js +297 -297
  63. package/dist/node/ui/renderers/agent-list.renderer.js +7 -7
  64. package/dist/node/ui/renderers/index.js +157 -157
  65. package/dist/node/ui/views/AgentListView.js +7 -7
  66. package/dist/node/ui/views/RunListView.js +16 -16
  67. package/dist/node/ui/views/ToolRegistryView.js +9 -9
  68. package/dist/node/ui/views/index.js +97 -97
  69. package/dist/presentations/index.d.ts +3 -5
  70. package/dist/presentations/index.js +4 -4
  71. package/dist/run/index.d.ts +7 -7
  72. package/dist/run/index.js +536 -536
  73. package/dist/run/run.event.js +2 -2
  74. package/dist/run/run.handler.d.ts +3 -0
  75. package/dist/run/run.presentation.js +2 -2
  76. package/dist/shared/index.d.ts +1 -1
  77. package/dist/tool/index.d.ts +7 -7
  78. package/dist/tool/index.js +260 -260
  79. package/dist/tool/tool.event.js +1 -1
  80. package/dist/tool/tool.handler.d.ts +1 -1
  81. package/dist/tool/tool.presentation.js +2 -2
  82. package/dist/ui/AgentDashboard.js +956 -956
  83. package/dist/ui/AgentRunList.js +16 -16
  84. package/dist/ui/AgentToolRegistry.js +9 -9
  85. package/dist/ui/hooks/index.d.ts +4 -4
  86. package/dist/ui/hooks/index.js +153 -153
  87. package/dist/ui/hooks/useAgentList.d.ts +5 -0
  88. package/dist/ui/hooks/useAgentList.js +1 -1
  89. package/dist/ui/hooks/useAgentMutations.d.ts +9 -2
  90. package/dist/ui/hooks/useAgentMutations.js +1 -1
  91. package/dist/ui/hooks/useRunList.d.ts +5 -0
  92. package/dist/ui/hooks/useRunList.js +1 -1
  93. package/dist/ui/hooks/useToolList.d.ts +5 -0
  94. package/dist/ui/hooks/useToolList.js +1 -1
  95. package/dist/ui/index.d.ts +3 -3
  96. package/dist/ui/index.js +1222 -1222
  97. package/dist/ui/modals/AgentActionsModal.js +13 -13
  98. package/dist/ui/modals/CreateAgentModal.js +15 -15
  99. package/dist/ui/modals/index.d.ts +1 -1
  100. package/dist/ui/modals/index.js +297 -297
  101. package/dist/ui/renderers/agent-list.markdown.d.ts +5 -0
  102. package/dist/ui/renderers/agent-list.renderer.js +7 -7
  103. package/dist/ui/renderers/dashboard.markdown.d.ts +5 -0
  104. package/dist/ui/renderers/index.d.ts +2 -2
  105. package/dist/ui/renderers/index.js +157 -157
  106. package/dist/ui/renderers/run-list.markdown.d.ts +5 -0
  107. package/dist/ui/renderers/tool-registry.markdown.d.ts +5 -0
  108. package/dist/ui/views/AgentListView.js +7 -7
  109. package/dist/ui/views/RunListView.js +16 -16
  110. package/dist/ui/views/ToolRegistryView.js +9 -9
  111. package/dist/ui/views/index.js +97 -97
  112. package/package.json +6 -6
  113. package/src/agent/agent.entity.ts +111 -111
  114. package/src/agent/agent.enum.ts +12 -12
  115. package/src/agent/agent.event.ts +91 -91
  116. package/src/agent/agent.handler.ts +123 -123
  117. package/src/agent/agent.operation.ts +400 -400
  118. package/src/agent/agent.presentation.ts +62 -62
  119. package/src/agent/agent.schema.ts +175 -175
  120. package/src/agent/agent.test-spec.ts +48 -48
  121. package/src/agent/index.ts +46 -51
  122. package/src/agent.capability.ts +11 -11
  123. package/src/agent.feature.ts +131 -131
  124. package/src/docs/agent-console.docblock.ts +42 -42
  125. package/src/example.ts +35 -35
  126. package/src/handlers/agent.handlers.ts +522 -521
  127. package/src/handlers/index.ts +12 -12
  128. package/src/index.ts +8 -9
  129. package/src/presentations/index.ts +11 -13
  130. package/src/run/index.ts +49 -54
  131. package/src/run/run.entity.ts +137 -137
  132. package/src/run/run.enum.ts +18 -18
  133. package/src/run/run.event.ts +174 -174
  134. package/src/run/run.handler.ts +92 -91
  135. package/src/run/run.operation.ts +474 -474
  136. package/src/run/run.presentation.ts +42 -42
  137. package/src/run/run.schema.ts +126 -126
  138. package/src/run/run.test-spec.ts +48 -48
  139. package/src/seeders/index.ts +21 -21
  140. package/src/shared/index.ts +1 -1
  141. package/src/shared/mock-agents.ts +76 -76
  142. package/src/shared/mock-runs.ts +102 -102
  143. package/src/shared/mock-tools.ts +140 -140
  144. package/src/shared/overlay-types.ts +23 -23
  145. package/src/tool/index.ts +39 -44
  146. package/src/tool/tool.entity.ts +73 -73
  147. package/src/tool/tool.enum.ts +13 -13
  148. package/src/tool/tool.event.ts +80 -80
  149. package/src/tool/tool.handler.ts +102 -102
  150. package/src/tool/tool.operation.ts +328 -328
  151. package/src/tool/tool.presentation.ts +43 -43
  152. package/src/tool/tool.schema.ts +106 -106
  153. package/src/tool/tool.test-spec.ts +48 -48
  154. package/src/ui/AgentDashboard.tsx +348 -348
  155. package/src/ui/hooks/index.ts +7 -7
  156. package/src/ui/hooks/useAgentList.ts +57 -56
  157. package/src/ui/hooks/useAgentMutations.ts +160 -159
  158. package/src/ui/hooks/useRunList.ts +58 -57
  159. package/src/ui/hooks/useToolList.ts +102 -101
  160. package/src/ui/index.ts +6 -9
  161. package/src/ui/modals/AgentActionsModal.tsx +262 -262
  162. package/src/ui/modals/CreateAgentModal.tsx +232 -232
  163. package/src/ui/modals/index.ts +1 -1
  164. package/src/ui/overlays/demo-overlays.ts +52 -52
  165. package/src/ui/renderers/agent-list.markdown.ts +61 -60
  166. package/src/ui/renderers/agent-list.renderer.tsx +14 -14
  167. package/src/ui/renderers/dashboard.markdown.ts +140 -139
  168. package/src/ui/renderers/index.ts +3 -4
  169. package/src/ui/renderers/run-list.markdown.ts +48 -47
  170. package/src/ui/renderers/tool-registry.markdown.ts +66 -65
  171. package/src/ui/views/AgentListView.tsx +90 -90
  172. package/src/ui/views/RunListView.tsx +141 -141
  173. package/src/ui/views/ToolRegistryView.tsx +113 -113
  174. package/tsconfig.json +7 -8
  175. package/tsdown.config.js +7 -3
@@ -1,6 +1,6 @@
1
1
  // src/ui/modals/AgentActionsModal.tsx
2
- import { useState } from "react";
3
2
  import { Button } from "@contractspec/lib.design-system";
3
+ import { useState } from "react";
4
4
  import { jsxDEV } from "react/jsx-dev-runtime";
5
5
  "use client";
6
6
  function getStatusColor(status) {
@@ -83,7 +83,7 @@ function AgentActionsModal({
83
83
  className: "fixed inset-0 z-50 flex items-center justify-center",
84
84
  children: [
85
85
  /* @__PURE__ */ jsxDEV("div", {
86
- className: "bg-background/80 absolute inset-0 backdrop-blur-sm",
86
+ className: "absolute inset-0 bg-background/80 backdrop-blur-sm",
87
87
  onClick: handleClose,
88
88
  role: "button",
89
89
  tabIndex: 0,
@@ -94,13 +94,13 @@ function AgentActionsModal({
94
94
  "aria-label": "Close modal"
95
95
  }, undefined, false, undefined, this),
96
96
  /* @__PURE__ */ jsxDEV("div", {
97
- className: "bg-card border-border relative z-10 w-full max-w-md rounded-xl border p-6 shadow-xl",
97
+ className: "relative z-10 w-full max-w-md rounded-xl border border-border bg-card p-6 shadow-xl",
98
98
  children: [
99
99
  /* @__PURE__ */ jsxDEV("div", {
100
- className: "border-border mb-4 border-b pb-4",
100
+ className: "mb-4 border-border border-b pb-4",
101
101
  children: [
102
102
  /* @__PURE__ */ jsxDEV("h2", {
103
- className: "text-xl font-semibold",
103
+ className: "font-semibold text-xl",
104
104
  children: agent.name
105
105
  }, undefined, false, undefined, this),
106
106
  /* @__PURE__ */ jsxDEV("div", {
@@ -115,13 +115,13 @@ function AgentActionsModal({
115
115
  ]
116
116
  }, undefined, true, undefined, this),
117
117
  /* @__PURE__ */ jsxDEV("span", {
118
- className: `rounded-full px-2 py-0.5 text-xs font-medium ${getStatusColor(agent.status)}`,
118
+ className: `rounded-full px-2 py-0.5 font-medium text-xs ${getStatusColor(agent.status)}`,
119
119
  children: agent.status
120
120
  }, undefined, false, undefined, this)
121
121
  ]
122
122
  }, undefined, true, undefined, this),
123
123
  agent.description && /* @__PURE__ */ jsxDEV("p", {
124
- className: "text-muted-foreground mt-2 text-sm",
124
+ className: "mt-2 text-muted-foreground text-sm",
125
125
  children: agent.description
126
126
  }, undefined, false, undefined, this)
127
127
  ]
@@ -196,7 +196,7 @@ function AgentActionsModal({
196
196
  ]
197
197
  }, undefined, true, undefined, this),
198
198
  error && /* @__PURE__ */ jsxDEV("div", {
199
- className: "bg-destructive/10 text-destructive rounded-md p-3 text-sm",
199
+ className: "rounded-md bg-destructive/10 p-3 text-destructive text-sm",
200
200
  children: error
201
201
  }, undefined, false, undefined, this),
202
202
  /* @__PURE__ */ jsxDEV("div", {
@@ -217,7 +217,7 @@ function AgentActionsModal({
217
217
  children: [
218
218
  /* @__PURE__ */ jsxDEV("label", {
219
219
  htmlFor: "execute-message",
220
- className: "text-muted-foreground mb-1 block text-sm font-medium",
220
+ className: "mb-1 block font-medium text-muted-foreground text-sm",
221
221
  children: "Message *"
222
222
  }, undefined, false, undefined, this),
223
223
  /* @__PURE__ */ jsxDEV("textarea", {
@@ -227,12 +227,12 @@ function AgentActionsModal({
227
227
  placeholder: "Enter your message to the agent...",
228
228
  rows: 4,
229
229
  disabled: isLoading,
230
- className: "border-input bg-background focus:ring-ring w-full rounded-md border px-3 py-2 text-sm focus:ring-2 focus:outline-none disabled:opacity-50"
230
+ className: "w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring disabled:opacity-50"
231
231
  }, undefined, false, undefined, this)
232
232
  ]
233
233
  }, undefined, true, undefined, this),
234
234
  error && /* @__PURE__ */ jsxDEV("div", {
235
- className: "bg-destructive/10 text-destructive rounded-md p-3 text-sm",
235
+ className: "rounded-md bg-destructive/10 p-3 text-destructive text-sm",
236
236
  children: error
237
237
  }, undefined, false, undefined, this),
238
238
  /* @__PURE__ */ jsxDEV("div", {
@@ -262,7 +262,7 @@ function AgentActionsModal({
262
262
  "Are you sure you want to archive",
263
263
  " ",
264
264
  /* @__PURE__ */ jsxDEV("span", {
265
- className: "text-foreground font-medium",
265
+ className: "font-medium text-foreground",
266
266
  children: agent.name
267
267
  }, undefined, false, undefined, this),
268
268
  "?"
@@ -273,7 +273,7 @@ function AgentActionsModal({
273
273
  children: "Archived agents cannot be executed but can be restored later."
274
274
  }, undefined, false, undefined, this),
275
275
  error && /* @__PURE__ */ jsxDEV("div", {
276
- className: "bg-destructive/10 text-destructive rounded-md p-3 text-sm",
276
+ className: "rounded-md bg-destructive/10 p-3 text-destructive text-sm",
277
277
  children: error
278
278
  }, undefined, false, undefined, this),
279
279
  /* @__PURE__ */ jsxDEV("div", {
@@ -1,6 +1,6 @@
1
1
  // src/ui/modals/CreateAgentModal.tsx
2
- import { useState } from "react";
3
2
  import { Button, Input } from "@contractspec/lib.design-system";
3
+ import { useState } from "react";
4
4
  import { jsxDEV } from "react/jsx-dev-runtime";
5
5
  "use client";
6
6
  var MODEL_PROVIDERS = [
@@ -86,7 +86,7 @@ function CreateAgentModal({
86
86
  className: "fixed inset-0 z-50 flex items-center justify-center",
87
87
  children: [
88
88
  /* @__PURE__ */ jsxDEV("div", {
89
- className: "bg-background/80 absolute inset-0 backdrop-blur-sm",
89
+ className: "absolute inset-0 bg-background/80 backdrop-blur-sm",
90
90
  onClick: onClose,
91
91
  role: "button",
92
92
  tabIndex: 0,
@@ -97,10 +97,10 @@ function CreateAgentModal({
97
97
  "aria-label": "Close modal"
98
98
  }, undefined, false, undefined, this),
99
99
  /* @__PURE__ */ jsxDEV("div", {
100
- className: "bg-card border-border relative z-10 max-h-[90vh] w-full max-w-lg overflow-y-auto rounded-xl border p-6 shadow-xl",
100
+ className: "relative z-10 max-h-[90vh] w-full max-w-lg overflow-y-auto rounded-xl border border-border bg-card p-6 shadow-xl",
101
101
  children: [
102
102
  /* @__PURE__ */ jsxDEV("h2", {
103
- className: "mb-4 text-xl font-semibold",
103
+ className: "mb-4 font-semibold text-xl",
104
104
  children: "Create New Agent"
105
105
  }, undefined, false, undefined, this),
106
106
  /* @__PURE__ */ jsxDEV("form", {
@@ -111,7 +111,7 @@ function CreateAgentModal({
111
111
  children: [
112
112
  /* @__PURE__ */ jsxDEV("label", {
113
113
  htmlFor: "agent-name",
114
- className: "text-muted-foreground mb-1 block text-sm font-medium",
114
+ className: "mb-1 block font-medium text-muted-foreground text-sm",
115
115
  children: "Agent Name *"
116
116
  }, undefined, false, undefined, this),
117
117
  /* @__PURE__ */ jsxDEV(Input, {
@@ -127,7 +127,7 @@ function CreateAgentModal({
127
127
  children: [
128
128
  /* @__PURE__ */ jsxDEV("label", {
129
129
  htmlFor: "agent-description",
130
- className: "text-muted-foreground mb-1 block text-sm font-medium",
130
+ className: "mb-1 block font-medium text-muted-foreground text-sm",
131
131
  children: "Description"
132
132
  }, undefined, false, undefined, this),
133
133
  /* @__PURE__ */ jsxDEV("textarea", {
@@ -137,7 +137,7 @@ function CreateAgentModal({
137
137
  placeholder: "Describe what this agent does...",
138
138
  rows: 2,
139
139
  disabled: isLoading,
140
- className: "border-input bg-background focus:ring-ring w-full rounded-md border px-3 py-2 text-sm focus:ring-2 focus:outline-none disabled:opacity-50"
140
+ className: "w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring disabled:opacity-50"
141
141
  }, undefined, false, undefined, this)
142
142
  ]
143
143
  }, undefined, true, undefined, this),
@@ -149,7 +149,7 @@ function CreateAgentModal({
149
149
  children: [
150
150
  /* @__PURE__ */ jsxDEV("label", {
151
151
  htmlFor: "model-provider",
152
- className: "text-muted-foreground mb-1 block text-sm font-medium",
152
+ className: "mb-1 block font-medium text-muted-foreground text-sm",
153
153
  children: "Provider *"
154
154
  }, undefined, false, undefined, this),
155
155
  /* @__PURE__ */ jsxDEV("select", {
@@ -157,7 +157,7 @@ function CreateAgentModal({
157
157
  value: modelProvider,
158
158
  onChange: (e) => handleProviderChange(e.target.value),
159
159
  disabled: isLoading,
160
- className: "border-input bg-background focus:ring-ring h-10 w-full rounded-md border px-3 py-2 text-sm focus:ring-2 focus:outline-none disabled:opacity-50",
160
+ className: "h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring disabled:opacity-50",
161
161
  children: MODEL_PROVIDERS.map((p) => /* @__PURE__ */ jsxDEV("option", {
162
162
  value: p.value,
163
163
  children: p.label
@@ -170,7 +170,7 @@ function CreateAgentModal({
170
170
  children: [
171
171
  /* @__PURE__ */ jsxDEV("label", {
172
172
  htmlFor: "model-name",
173
- className: "text-muted-foreground mb-1 block text-sm font-medium",
173
+ className: "mb-1 block font-medium text-muted-foreground text-sm",
174
174
  children: "Model *"
175
175
  }, undefined, false, undefined, this),
176
176
  /* @__PURE__ */ jsxDEV("select", {
@@ -178,7 +178,7 @@ function CreateAgentModal({
178
178
  value: modelName,
179
179
  onChange: (e) => setModelName(e.target.value),
180
180
  disabled: isLoading,
181
- className: "border-input bg-background focus:ring-ring h-10 w-full rounded-md border px-3 py-2 text-sm focus:ring-2 focus:outline-none disabled:opacity-50",
181
+ className: "h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring disabled:opacity-50",
182
182
  children: selectedProvider?.models.map((m) => /* @__PURE__ */ jsxDEV("option", {
183
183
  value: m,
184
184
  children: m
@@ -192,7 +192,7 @@ function CreateAgentModal({
192
192
  children: [
193
193
  /* @__PURE__ */ jsxDEV("label", {
194
194
  htmlFor: "system-prompt",
195
- className: "text-muted-foreground mb-1 block text-sm font-medium",
195
+ className: "mb-1 block font-medium text-muted-foreground text-sm",
196
196
  children: "System Prompt"
197
197
  }, undefined, false, undefined, this),
198
198
  /* @__PURE__ */ jsxDEV("textarea", {
@@ -202,16 +202,16 @@ function CreateAgentModal({
202
202
  placeholder: "You are a helpful assistant that...",
203
203
  rows: 4,
204
204
  disabled: isLoading,
205
- className: "border-input bg-background focus:ring-ring w-full rounded-md border px-3 py-2 font-mono text-sm focus:ring-2 focus:outline-none disabled:opacity-50"
205
+ className: "w-full rounded-md border border-input bg-background px-3 py-2 font-mono text-sm focus:outline-none focus:ring-2 focus:ring-ring disabled:opacity-50"
206
206
  }, undefined, false, undefined, this),
207
207
  /* @__PURE__ */ jsxDEV("p", {
208
- className: "text-muted-foreground mt-1 text-xs",
208
+ className: "mt-1 text-muted-foreground text-xs",
209
209
  children: "Instructions that define the agent's behavior"
210
210
  }, undefined, false, undefined, this)
211
211
  ]
212
212
  }, undefined, true, undefined, this),
213
213
  error && /* @__PURE__ */ jsxDEV("div", {
214
- className: "bg-destructive/10 text-destructive rounded-md p-3 text-sm",
214
+ className: "rounded-md bg-destructive/10 p-3 text-destructive text-sm",
215
215
  children: error
216
216
  }, undefined, false, undefined, this),
217
217
  /* @__PURE__ */ jsxDEV("div", {