@contractspec/example.agent-console 3.7.5 → 3.7.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +18 -18
- package/AGENTS.md +50 -31
- package/CHANGELOG.md +12 -0
- package/README.md +69 -77
- package/dist/agent/agent.event.js +1 -1
- package/dist/agent/agent.operation.js +1 -1
- package/dist/agent/index.d.ts +5 -5
- package/dist/agent/index.js +1 -1
- package/dist/browser/agent/agent.event.js +1 -1
- package/dist/browser/agent/agent.operation.js +1 -1
- package/dist/browser/agent/index.js +1 -1
- package/dist/browser/index.js +2145 -2145
- package/dist/browser/presentations/index.js +4 -4
- package/dist/browser/run/index.js +536 -536
- package/dist/browser/run/run.event.js +2 -2
- package/dist/browser/run/run.presentation.js +2 -2
- package/dist/browser/tool/index.js +260 -260
- package/dist/browser/tool/tool.event.js +1 -1
- package/dist/browser/tool/tool.presentation.js +2 -2
- package/dist/browser/ui/AgentDashboard.js +956 -956
- package/dist/browser/ui/AgentRunList.js +16 -16
- package/dist/browser/ui/AgentToolRegistry.js +9 -9
- package/dist/browser/ui/hooks/index.js +153 -153
- package/dist/browser/ui/hooks/useAgentList.js +1 -1
- package/dist/browser/ui/hooks/useAgentMutations.js +1 -1
- package/dist/browser/ui/hooks/useRunList.js +1 -1
- package/dist/browser/ui/hooks/useToolList.js +1 -1
- package/dist/browser/ui/index.js +1222 -1222
- package/dist/browser/ui/modals/AgentActionsModal.js +13 -13
- package/dist/browser/ui/modals/CreateAgentModal.js +15 -15
- package/dist/browser/ui/modals/index.js +297 -297
- package/dist/browser/ui/renderers/agent-list.renderer.js +7 -7
- package/dist/browser/ui/renderers/index.js +157 -157
- package/dist/browser/ui/views/AgentListView.js +7 -7
- package/dist/browser/ui/views/RunListView.js +16 -16
- package/dist/browser/ui/views/ToolRegistryView.js +9 -9
- package/dist/browser/ui/views/index.js +97 -97
- package/dist/handlers/index.d.ts +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2145 -2145
- package/dist/node/agent/agent.event.js +1 -1
- package/dist/node/agent/agent.operation.js +1 -1
- package/dist/node/agent/index.js +1 -1
- package/dist/node/index.js +2145 -2145
- package/dist/node/presentations/index.js +4 -4
- package/dist/node/run/index.js +536 -536
- package/dist/node/run/run.event.js +2 -2
- package/dist/node/run/run.presentation.js +2 -2
- package/dist/node/tool/index.js +260 -260
- package/dist/node/tool/tool.event.js +1 -1
- package/dist/node/tool/tool.presentation.js +2 -2
- package/dist/node/ui/AgentDashboard.js +956 -956
- package/dist/node/ui/AgentRunList.js +16 -16
- package/dist/node/ui/AgentToolRegistry.js +9 -9
- package/dist/node/ui/hooks/index.js +153 -153
- package/dist/node/ui/hooks/useAgentList.js +1 -1
- package/dist/node/ui/hooks/useAgentMutations.js +1 -1
- package/dist/node/ui/hooks/useRunList.js +1 -1
- package/dist/node/ui/hooks/useToolList.js +1 -1
- package/dist/node/ui/index.js +1222 -1222
- package/dist/node/ui/modals/AgentActionsModal.js +13 -13
- package/dist/node/ui/modals/CreateAgentModal.js +15 -15
- package/dist/node/ui/modals/index.js +297 -297
- package/dist/node/ui/renderers/agent-list.renderer.js +7 -7
- package/dist/node/ui/renderers/index.js +157 -157
- package/dist/node/ui/views/AgentListView.js +7 -7
- package/dist/node/ui/views/RunListView.js +16 -16
- package/dist/node/ui/views/ToolRegistryView.js +9 -9
- package/dist/node/ui/views/index.js +97 -97
- package/dist/presentations/index.d.ts +3 -5
- package/dist/presentations/index.js +4 -4
- package/dist/run/index.d.ts +7 -7
- package/dist/run/index.js +536 -536
- package/dist/run/run.event.js +2 -2
- package/dist/run/run.handler.d.ts +3 -0
- package/dist/run/run.presentation.js +2 -2
- package/dist/shared/index.d.ts +1 -1
- package/dist/tool/index.d.ts +7 -7
- package/dist/tool/index.js +260 -260
- package/dist/tool/tool.event.js +1 -1
- package/dist/tool/tool.handler.d.ts +1 -1
- package/dist/tool/tool.presentation.js +2 -2
- package/dist/ui/AgentDashboard.js +956 -956
- package/dist/ui/AgentRunList.js +16 -16
- package/dist/ui/AgentToolRegistry.js +9 -9
- package/dist/ui/hooks/index.d.ts +4 -4
- package/dist/ui/hooks/index.js +153 -153
- package/dist/ui/hooks/useAgentList.d.ts +5 -0
- package/dist/ui/hooks/useAgentList.js +1 -1
- package/dist/ui/hooks/useAgentMutations.d.ts +9 -2
- package/dist/ui/hooks/useAgentMutations.js +1 -1
- package/dist/ui/hooks/useRunList.d.ts +5 -0
- package/dist/ui/hooks/useRunList.js +1 -1
- package/dist/ui/hooks/useToolList.d.ts +5 -0
- package/dist/ui/hooks/useToolList.js +1 -1
- package/dist/ui/index.d.ts +3 -3
- package/dist/ui/index.js +1222 -1222
- package/dist/ui/modals/AgentActionsModal.js +13 -13
- package/dist/ui/modals/CreateAgentModal.js +15 -15
- package/dist/ui/modals/index.d.ts +1 -1
- package/dist/ui/modals/index.js +297 -297
- package/dist/ui/renderers/agent-list.markdown.d.ts +5 -0
- package/dist/ui/renderers/agent-list.renderer.js +7 -7
- package/dist/ui/renderers/dashboard.markdown.d.ts +5 -0
- package/dist/ui/renderers/index.d.ts +2 -2
- package/dist/ui/renderers/index.js +157 -157
- package/dist/ui/renderers/run-list.markdown.d.ts +5 -0
- package/dist/ui/renderers/tool-registry.markdown.d.ts +5 -0
- package/dist/ui/views/AgentListView.js +7 -7
- package/dist/ui/views/RunListView.js +16 -16
- package/dist/ui/views/ToolRegistryView.js +9 -9
- package/dist/ui/views/index.js +97 -97
- package/package.json +10 -10
- package/src/agent/agent.entity.ts +111 -111
- package/src/agent/agent.enum.ts +12 -12
- package/src/agent/agent.event.ts +91 -91
- package/src/agent/agent.handler.ts +123 -123
- package/src/agent/agent.operation.ts +400 -400
- package/src/agent/agent.presentation.ts +62 -62
- package/src/agent/agent.schema.ts +175 -175
- package/src/agent/agent.test-spec.ts +48 -48
- package/src/agent/index.ts +46 -51
- package/src/agent.capability.ts +11 -11
- package/src/agent.feature.ts +131 -131
- package/src/docs/agent-console.docblock.ts +42 -42
- package/src/example.ts +35 -35
- package/src/handlers/agent.handlers.ts +522 -521
- package/src/handlers/index.ts +12 -12
- package/src/index.ts +8 -9
- package/src/presentations/index.ts +11 -13
- package/src/run/index.ts +49 -54
- package/src/run/run.entity.ts +137 -137
- package/src/run/run.enum.ts +18 -18
- package/src/run/run.event.ts +174 -174
- package/src/run/run.handler.ts +92 -91
- package/src/run/run.operation.ts +474 -474
- package/src/run/run.presentation.ts +42 -42
- package/src/run/run.schema.ts +126 -126
- package/src/run/run.test-spec.ts +48 -48
- package/src/seeders/index.ts +21 -21
- package/src/shared/index.ts +1 -1
- package/src/shared/mock-agents.ts +76 -76
- package/src/shared/mock-runs.ts +102 -102
- package/src/shared/mock-tools.ts +140 -140
- package/src/shared/overlay-types.ts +23 -23
- package/src/tool/index.ts +39 -44
- package/src/tool/tool.entity.ts +73 -73
- package/src/tool/tool.enum.ts +13 -13
- package/src/tool/tool.event.ts +80 -80
- package/src/tool/tool.handler.ts +102 -102
- package/src/tool/tool.operation.ts +328 -328
- package/src/tool/tool.presentation.ts +43 -43
- package/src/tool/tool.schema.ts +106 -106
- package/src/tool/tool.test-spec.ts +48 -48
- package/src/ui/AgentDashboard.tsx +348 -348
- package/src/ui/hooks/index.ts +7 -7
- package/src/ui/hooks/useAgentList.ts +57 -56
- package/src/ui/hooks/useAgentMutations.ts +160 -159
- package/src/ui/hooks/useRunList.ts +58 -57
- package/src/ui/hooks/useToolList.ts +102 -101
- package/src/ui/index.ts +6 -9
- package/src/ui/modals/AgentActionsModal.tsx +262 -262
- package/src/ui/modals/CreateAgentModal.tsx +232 -232
- package/src/ui/modals/index.ts +1 -1
- package/src/ui/overlays/demo-overlays.ts +52 -52
- package/src/ui/renderers/agent-list.markdown.ts +61 -60
- package/src/ui/renderers/agent-list.renderer.tsx +14 -14
- package/src/ui/renderers/dashboard.markdown.ts +140 -139
- package/src/ui/renderers/index.ts +3 -4
- package/src/ui/renderers/run-list.markdown.ts +48 -47
- package/src/ui/renderers/tool-registry.markdown.ts +66 -65
- package/src/ui/views/AgentListView.tsx +90 -90
- package/src/ui/views/RunListView.tsx +141 -141
- package/src/ui/views/ToolRegistryView.tsx +113 -113
- package/tsconfig.json +7 -8
- 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
|
|
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: "
|
|
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: "
|
|
100
|
+
className: "mb-4 border-border border-b pb-4",
|
|
101
101
|
children: [
|
|
102
102
|
/* @__PURE__ */ jsxDEV("h2", {
|
|
103
|
-
className: "text-xl
|
|
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
|
|
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
|
|
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
|
|
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: "
|
|
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: "
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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: "
|
|
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
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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
|
|
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
|
|
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", {
|