@contractspec/example.agent-console 3.8.6 → 3.8.8
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 +13 -14
- package/CHANGELOG.md +30 -0
- package/dist/browser/index.js +4 -2
- package/dist/browser/ui/AgentDashboard.js +4 -2
- package/dist/browser/ui/index.js +4 -2
- package/dist/index.js +4 -2
- package/dist/node/index.js +4 -2
- package/dist/node/ui/AgentDashboard.js +4 -2
- package/dist/node/ui/index.js +4 -2
- package/dist/ui/AgentDashboard.js +4 -2
- package/dist/ui/index.js +4 -2
- package/package.json +12 -12
- package/src/ui/AgentDashboard.sandbox.test.tsx +133 -93
- package/src/ui/AgentDashboard.tsx +7 -2
- package/.turbo/turbo-prebuild.log +0 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
$ contractspec-bun-build prebuild
|
|
2
|
-
$ bun run
|
|
3
|
-
$ contractspec-bun-build prebuild
|
|
2
|
+
$ bun run build:bundle && bun run build:types
|
|
4
3
|
$ contractspec-bun-build transpile
|
|
5
4
|
[contractspec-bun-build] transpile target=bun root=src entries=73 noBundle=false
|
|
6
|
-
Bundled 79 modules in
|
|
5
|
+
Bundled 79 modules in 105ms
|
|
7
6
|
|
|
8
7
|
./agent.capability.js 442 bytes (entry point)
|
|
9
8
|
tool/tool.test-spec.js 1.38 KB (entry point)
|
|
10
9
|
shared/overlay-types.js 8 bytes (entry point)
|
|
11
10
|
run/run.test-spec.js 1.37 KB (entry point)
|
|
12
11
|
seeders/index.js 0.64 KB (entry point)
|
|
13
|
-
./index.js 233.
|
|
14
|
-
ui/index.js 105.
|
|
12
|
+
./index.js 233.69 KB (entry point)
|
|
13
|
+
ui/index.js 105.42 KB (entry point)
|
|
15
14
|
ui/views/index.js 27.89 KB (entry point)
|
|
16
15
|
ui/overlays/index.js 1.46 KB (entry point)
|
|
17
16
|
ui/renderers/index.js 21.0 KB (entry point)
|
|
@@ -23,7 +22,7 @@ Bundled 79 modules in 172ms
|
|
|
23
22
|
ui/views/AgentListView.js 5.35 KB (entry point)
|
|
24
23
|
ui/modals/index.js 22.55 KB (entry point)
|
|
25
24
|
ui/overlays/demo-overlays.js 1.46 KB (entry point)
|
|
26
|
-
ui/AgentDashboard.js 89.
|
|
25
|
+
ui/AgentDashboard.js 89.30 KB (entry point)
|
|
27
26
|
ui/modals/AgentActionsModal.js 12.32 KB (entry point)
|
|
28
27
|
ui/modals/CreateAgentModal.js 10.18 KB (entry point)
|
|
29
28
|
ui/AgentDashboard.visualizations.js 6.67 KB (entry point)
|
|
@@ -80,15 +79,15 @@ Bundled 79 modules in 172ms
|
|
|
80
79
|
agent/agent.enum.js 467 bytes (entry point)
|
|
81
80
|
|
|
82
81
|
[contractspec-bun-build] transpile target=node root=src entries=73 noBundle=false
|
|
83
|
-
Bundled 79 modules in
|
|
82
|
+
Bundled 79 modules in 108ms
|
|
84
83
|
|
|
85
84
|
./agent.capability.js 434 bytes (entry point)
|
|
86
85
|
tool/tool.test-spec.js 1.38 KB (entry point)
|
|
87
86
|
shared/overlay-types.js 0 KB (entry point)
|
|
88
87
|
run/run.test-spec.js 1.36 KB (entry point)
|
|
89
88
|
seeders/index.js 0.63 KB (entry point)
|
|
90
|
-
./index.js 233.
|
|
91
|
-
ui/index.js 105.
|
|
89
|
+
./index.js 233.63 KB (entry point)
|
|
90
|
+
ui/index.js 105.37 KB (entry point)
|
|
92
91
|
ui/views/index.js 27.88 KB (entry point)
|
|
93
92
|
ui/overlays/index.js 1.45 KB (entry point)
|
|
94
93
|
ui/renderers/index.js 21.0 KB (entry point)
|
|
@@ -100,7 +99,7 @@ Bundled 79 modules in 107ms
|
|
|
100
99
|
ui/views/AgentListView.js 5.34 KB (entry point)
|
|
101
100
|
ui/modals/index.js 22.53 KB (entry point)
|
|
102
101
|
ui/overlays/demo-overlays.js 1.45 KB (entry point)
|
|
103
|
-
ui/AgentDashboard.js 89.
|
|
102
|
+
ui/AgentDashboard.js 89.26 KB (entry point)
|
|
104
103
|
ui/modals/AgentActionsModal.js 12.29 KB (entry point)
|
|
105
104
|
ui/modals/CreateAgentModal.js 10.17 KB (entry point)
|
|
106
105
|
ui/AgentDashboard.visualizations.js 6.66 KB (entry point)
|
|
@@ -157,15 +156,15 @@ Bundled 79 modules in 107ms
|
|
|
157
156
|
agent/agent.enum.js 459 bytes (entry point)
|
|
158
157
|
|
|
159
158
|
[contractspec-bun-build] transpile target=browser root=src entries=73 noBundle=false
|
|
160
|
-
Bundled 79 modules in
|
|
159
|
+
Bundled 79 modules in 88ms
|
|
161
160
|
|
|
162
161
|
./agent.capability.js 434 bytes (entry point)
|
|
163
162
|
tool/tool.test-spec.js 1.38 KB (entry point)
|
|
164
163
|
shared/overlay-types.js 0 KB (entry point)
|
|
165
164
|
run/run.test-spec.js 1.36 KB (entry point)
|
|
166
165
|
seeders/index.js 0.63 KB (entry point)
|
|
167
|
-
./index.js 233.
|
|
168
|
-
ui/index.js 105.
|
|
166
|
+
./index.js 233.63 KB (entry point)
|
|
167
|
+
ui/index.js 105.37 KB (entry point)
|
|
169
168
|
ui/views/index.js 27.88 KB (entry point)
|
|
170
169
|
ui/overlays/index.js 1.45 KB (entry point)
|
|
171
170
|
ui/renderers/index.js 21.0 KB (entry point)
|
|
@@ -177,7 +176,7 @@ Bundled 79 modules in 165ms
|
|
|
177
176
|
ui/views/AgentListView.js 5.34 KB (entry point)
|
|
178
177
|
ui/modals/index.js 22.53 KB (entry point)
|
|
179
178
|
ui/overlays/demo-overlays.js 1.45 KB (entry point)
|
|
180
|
-
ui/AgentDashboard.js 89.
|
|
179
|
+
ui/AgentDashboard.js 89.26 KB (entry point)
|
|
181
180
|
ui/modals/AgentActionsModal.js 12.29 KB (entry point)
|
|
182
181
|
ui/modals/CreateAgentModal.js 10.17 KB (entry point)
|
|
183
182
|
ui/AgentDashboard.visualizations.js 6.66 KB (entry point)
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @contractspec/example.agent-console
|
|
2
2
|
|
|
3
|
+
## 3.8.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 2b59171: fix: crypto package issue due to nodejs only runtime
|
|
8
|
+
- Updated dependencies [2b59171]
|
|
9
|
+
- @contractspec/lib.presentation-runtime-core@3.9.4
|
|
10
|
+
- @contractspec/lib.example-shared-ui@6.0.16
|
|
11
|
+
- @contractspec/lib.runtime-sandbox@2.7.13
|
|
12
|
+
- @contractspec/lib.contracts-spec@5.0.4
|
|
13
|
+
- @contractspec/lib.design-system@3.8.9
|
|
14
|
+
- @contractspec/lib.schema@3.7.13
|
|
15
|
+
|
|
16
|
+
## 3.8.7
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- cce2b13: Fix the agent console smoke test by awaiting async button handlers, splitting the flow into smaller smoke cases, and wiring dashboard mutation refreshes so the visible agents and runs tabs update after create and execute actions. Also make the harness lab browser smoke tests skip when Chromium cannot launch in this environment and apply explicit timeouts for the browser evaluation paths.
|
|
21
|
+
- cce2b13: Add first-class Workflow DevKit support for `WorkflowSpec`, including new runtime metadata, stricter validation for Workflow-backed workflows, a dedicated Workflow DevKit integration package, CLI artifact generation, and Workflow-aware chat route helpers exposed from `@contractspec/module.ai-chat/core/workflow` so standard chat imports do not pull Workflow-only runtime assets into non-Workflow builds.
|
|
22
|
+
|
|
23
|
+
Also harden supporting runtime surfaces by reusing Playwright browser instances in the harness runtime, mapping design-system button `onPress` handlers correctly to DOM clicks, and switching the workspace git adapter to argument-safe subprocess calls while tightening slow test coverage around those flows.
|
|
24
|
+
|
|
25
|
+
- Updated dependencies [cce2b13]
|
|
26
|
+
- @contractspec/lib.presentation-runtime-core@3.9.3
|
|
27
|
+
- @contractspec/lib.example-shared-ui@6.0.15
|
|
28
|
+
- @contractspec/lib.runtime-sandbox@2.7.12
|
|
29
|
+
- @contractspec/lib.contracts-spec@5.0.3
|
|
30
|
+
- @contractspec/lib.design-system@3.8.8
|
|
31
|
+
- @contractspec/lib.schema@3.7.12
|
|
32
|
+
|
|
3
33
|
## 3.8.6
|
|
4
34
|
|
|
5
35
|
### Patch Changes
|
package/dist/browser/index.js
CHANGED
|
@@ -5669,12 +5669,14 @@ function AgentDashboard() {
|
|
|
5669
5669
|
const [isCreateModalOpen, setIsCreateModalOpen] = useState8(false);
|
|
5670
5670
|
const [selectedAgent, setSelectedAgent] = useState8(null);
|
|
5671
5671
|
const [isAgentActionsOpen, setIsAgentActionsOpen] = useState8(false);
|
|
5672
|
+
const [refreshVersion, setRefreshVersion] = useState8(0);
|
|
5672
5673
|
const { data: runData, metrics, refetch: refetchRuns } = useRunList();
|
|
5673
5674
|
const { refetch: refetchAgents } = useAgentList();
|
|
5674
5675
|
const mutations = useAgentMutations({
|
|
5675
5676
|
onSuccess: () => {
|
|
5676
5677
|
refetchAgents();
|
|
5677
5678
|
refetchRuns();
|
|
5679
|
+
setRefreshVersion((current) => current + 1);
|
|
5678
5680
|
}
|
|
5679
5681
|
});
|
|
5680
5682
|
const handleAgentClick = useCallback5((agent) => {
|
|
@@ -5772,10 +5774,10 @@ function AgentDashboard() {
|
|
|
5772
5774
|
className: "min-h-[400px]",
|
|
5773
5775
|
role: "tabpanel",
|
|
5774
5776
|
children: [
|
|
5775
|
-
activeTab === "runs" && /* @__PURE__ */ jsxDEV9(RunListView, {},
|
|
5777
|
+
activeTab === "runs" && /* @__PURE__ */ jsxDEV9(RunListView, {}, refreshVersion, false, undefined, this),
|
|
5776
5778
|
activeTab === "agents" && /* @__PURE__ */ jsxDEV9(AgentListViewWithActions, {
|
|
5777
5779
|
onAgentClick: handleAgentClick
|
|
5778
|
-
},
|
|
5780
|
+
}, refreshVersion, false, undefined, this),
|
|
5779
5781
|
activeTab === "tools" && /* @__PURE__ */ jsxDEV9(ToolRegistryView, {}, undefined, false, undefined, this),
|
|
5780
5782
|
activeTab === "metrics" && /* @__PURE__ */ jsxDEV9(MetricsView, {
|
|
5781
5783
|
metrics
|
|
@@ -2035,12 +2035,14 @@ function AgentDashboard() {
|
|
|
2035
2035
|
const [isCreateModalOpen, setIsCreateModalOpen] = useState8(false);
|
|
2036
2036
|
const [selectedAgent, setSelectedAgent] = useState8(null);
|
|
2037
2037
|
const [isAgentActionsOpen, setIsAgentActionsOpen] = useState8(false);
|
|
2038
|
+
const [refreshVersion, setRefreshVersion] = useState8(0);
|
|
2038
2039
|
const { data: runData, metrics, refetch: refetchRuns } = useRunList();
|
|
2039
2040
|
const { refetch: refetchAgents } = useAgentList();
|
|
2040
2041
|
const mutations = useAgentMutations({
|
|
2041
2042
|
onSuccess: () => {
|
|
2042
2043
|
refetchAgents();
|
|
2043
2044
|
refetchRuns();
|
|
2045
|
+
setRefreshVersion((current) => current + 1);
|
|
2044
2046
|
}
|
|
2045
2047
|
});
|
|
2046
2048
|
const handleAgentClick = useCallback5((agent) => {
|
|
@@ -2138,10 +2140,10 @@ function AgentDashboard() {
|
|
|
2138
2140
|
className: "min-h-[400px]",
|
|
2139
2141
|
role: "tabpanel",
|
|
2140
2142
|
children: [
|
|
2141
|
-
activeTab === "runs" && /* @__PURE__ */ jsxDEV9(RunListView, {},
|
|
2143
|
+
activeTab === "runs" && /* @__PURE__ */ jsxDEV9(RunListView, {}, refreshVersion, false, undefined, this),
|
|
2142
2144
|
activeTab === "agents" && /* @__PURE__ */ jsxDEV9(AgentListViewWithActions, {
|
|
2143
2145
|
onAgentClick: handleAgentClick
|
|
2144
|
-
},
|
|
2146
|
+
}, refreshVersion, false, undefined, this),
|
|
2145
2147
|
activeTab === "tools" && /* @__PURE__ */ jsxDEV9(ToolRegistryView, {}, undefined, false, undefined, this),
|
|
2146
2148
|
activeTab === "metrics" && /* @__PURE__ */ jsxDEV9(MetricsView, {
|
|
2147
2149
|
metrics
|
package/dist/browser/ui/index.js
CHANGED
|
@@ -2035,12 +2035,14 @@ function AgentDashboard() {
|
|
|
2035
2035
|
const [isCreateModalOpen, setIsCreateModalOpen] = useState8(false);
|
|
2036
2036
|
const [selectedAgent, setSelectedAgent] = useState8(null);
|
|
2037
2037
|
const [isAgentActionsOpen, setIsAgentActionsOpen] = useState8(false);
|
|
2038
|
+
const [refreshVersion, setRefreshVersion] = useState8(0);
|
|
2038
2039
|
const { data: runData, metrics, refetch: refetchRuns } = useRunList();
|
|
2039
2040
|
const { refetch: refetchAgents } = useAgentList();
|
|
2040
2041
|
const mutations = useAgentMutations({
|
|
2041
2042
|
onSuccess: () => {
|
|
2042
2043
|
refetchAgents();
|
|
2043
2044
|
refetchRuns();
|
|
2045
|
+
setRefreshVersion((current) => current + 1);
|
|
2044
2046
|
}
|
|
2045
2047
|
});
|
|
2046
2048
|
const handleAgentClick = useCallback5((agent) => {
|
|
@@ -2138,10 +2140,10 @@ function AgentDashboard() {
|
|
|
2138
2140
|
className: "min-h-[400px]",
|
|
2139
2141
|
role: "tabpanel",
|
|
2140
2142
|
children: [
|
|
2141
|
-
activeTab === "runs" && /* @__PURE__ */ jsxDEV9(RunListView, {},
|
|
2143
|
+
activeTab === "runs" && /* @__PURE__ */ jsxDEV9(RunListView, {}, refreshVersion, false, undefined, this),
|
|
2142
2144
|
activeTab === "agents" && /* @__PURE__ */ jsxDEV9(AgentListViewWithActions, {
|
|
2143
2145
|
onAgentClick: handleAgentClick
|
|
2144
|
-
},
|
|
2146
|
+
}, refreshVersion, false, undefined, this),
|
|
2145
2147
|
activeTab === "tools" && /* @__PURE__ */ jsxDEV9(ToolRegistryView, {}, undefined, false, undefined, this),
|
|
2146
2148
|
activeTab === "metrics" && /* @__PURE__ */ jsxDEV9(MetricsView, {
|
|
2147
2149
|
metrics
|
package/dist/index.js
CHANGED
|
@@ -5670,12 +5670,14 @@ function AgentDashboard() {
|
|
|
5670
5670
|
const [isCreateModalOpen, setIsCreateModalOpen] = useState8(false);
|
|
5671
5671
|
const [selectedAgent, setSelectedAgent] = useState8(null);
|
|
5672
5672
|
const [isAgentActionsOpen, setIsAgentActionsOpen] = useState8(false);
|
|
5673
|
+
const [refreshVersion, setRefreshVersion] = useState8(0);
|
|
5673
5674
|
const { data: runData, metrics, refetch: refetchRuns } = useRunList();
|
|
5674
5675
|
const { refetch: refetchAgents } = useAgentList();
|
|
5675
5676
|
const mutations = useAgentMutations({
|
|
5676
5677
|
onSuccess: () => {
|
|
5677
5678
|
refetchAgents();
|
|
5678
5679
|
refetchRuns();
|
|
5680
|
+
setRefreshVersion((current) => current + 1);
|
|
5679
5681
|
}
|
|
5680
5682
|
});
|
|
5681
5683
|
const handleAgentClick = useCallback5((agent) => {
|
|
@@ -5773,10 +5775,10 @@ function AgentDashboard() {
|
|
|
5773
5775
|
className: "min-h-[400px]",
|
|
5774
5776
|
role: "tabpanel",
|
|
5775
5777
|
children: [
|
|
5776
|
-
activeTab === "runs" && /* @__PURE__ */ jsxDEV9(RunListView, {},
|
|
5778
|
+
activeTab === "runs" && /* @__PURE__ */ jsxDEV9(RunListView, {}, refreshVersion, false, undefined, this),
|
|
5777
5779
|
activeTab === "agents" && /* @__PURE__ */ jsxDEV9(AgentListViewWithActions, {
|
|
5778
5780
|
onAgentClick: handleAgentClick
|
|
5779
|
-
},
|
|
5781
|
+
}, refreshVersion, false, undefined, this),
|
|
5780
5782
|
activeTab === "tools" && /* @__PURE__ */ jsxDEV9(ToolRegistryView, {}, undefined, false, undefined, this),
|
|
5781
5783
|
activeTab === "metrics" && /* @__PURE__ */ jsxDEV9(MetricsView, {
|
|
5782
5784
|
metrics
|
package/dist/node/index.js
CHANGED
|
@@ -5669,12 +5669,14 @@ function AgentDashboard() {
|
|
|
5669
5669
|
const [isCreateModalOpen, setIsCreateModalOpen] = useState8(false);
|
|
5670
5670
|
const [selectedAgent, setSelectedAgent] = useState8(null);
|
|
5671
5671
|
const [isAgentActionsOpen, setIsAgentActionsOpen] = useState8(false);
|
|
5672
|
+
const [refreshVersion, setRefreshVersion] = useState8(0);
|
|
5672
5673
|
const { data: runData, metrics, refetch: refetchRuns } = useRunList();
|
|
5673
5674
|
const { refetch: refetchAgents } = useAgentList();
|
|
5674
5675
|
const mutations = useAgentMutations({
|
|
5675
5676
|
onSuccess: () => {
|
|
5676
5677
|
refetchAgents();
|
|
5677
5678
|
refetchRuns();
|
|
5679
|
+
setRefreshVersion((current) => current + 1);
|
|
5678
5680
|
}
|
|
5679
5681
|
});
|
|
5680
5682
|
const handleAgentClick = useCallback5((agent) => {
|
|
@@ -5772,10 +5774,10 @@ function AgentDashboard() {
|
|
|
5772
5774
|
className: "min-h-[400px]",
|
|
5773
5775
|
role: "tabpanel",
|
|
5774
5776
|
children: [
|
|
5775
|
-
activeTab === "runs" && /* @__PURE__ */ jsxDEV9(RunListView, {},
|
|
5777
|
+
activeTab === "runs" && /* @__PURE__ */ jsxDEV9(RunListView, {}, refreshVersion, false, undefined, this),
|
|
5776
5778
|
activeTab === "agents" && /* @__PURE__ */ jsxDEV9(AgentListViewWithActions, {
|
|
5777
5779
|
onAgentClick: handleAgentClick
|
|
5778
|
-
},
|
|
5780
|
+
}, refreshVersion, false, undefined, this),
|
|
5779
5781
|
activeTab === "tools" && /* @__PURE__ */ jsxDEV9(ToolRegistryView, {}, undefined, false, undefined, this),
|
|
5780
5782
|
activeTab === "metrics" && /* @__PURE__ */ jsxDEV9(MetricsView, {
|
|
5781
5783
|
metrics
|
|
@@ -2035,12 +2035,14 @@ function AgentDashboard() {
|
|
|
2035
2035
|
const [isCreateModalOpen, setIsCreateModalOpen] = useState8(false);
|
|
2036
2036
|
const [selectedAgent, setSelectedAgent] = useState8(null);
|
|
2037
2037
|
const [isAgentActionsOpen, setIsAgentActionsOpen] = useState8(false);
|
|
2038
|
+
const [refreshVersion, setRefreshVersion] = useState8(0);
|
|
2038
2039
|
const { data: runData, metrics, refetch: refetchRuns } = useRunList();
|
|
2039
2040
|
const { refetch: refetchAgents } = useAgentList();
|
|
2040
2041
|
const mutations = useAgentMutations({
|
|
2041
2042
|
onSuccess: () => {
|
|
2042
2043
|
refetchAgents();
|
|
2043
2044
|
refetchRuns();
|
|
2045
|
+
setRefreshVersion((current) => current + 1);
|
|
2044
2046
|
}
|
|
2045
2047
|
});
|
|
2046
2048
|
const handleAgentClick = useCallback5((agent) => {
|
|
@@ -2138,10 +2140,10 @@ function AgentDashboard() {
|
|
|
2138
2140
|
className: "min-h-[400px]",
|
|
2139
2141
|
role: "tabpanel",
|
|
2140
2142
|
children: [
|
|
2141
|
-
activeTab === "runs" && /* @__PURE__ */ jsxDEV9(RunListView, {},
|
|
2143
|
+
activeTab === "runs" && /* @__PURE__ */ jsxDEV9(RunListView, {}, refreshVersion, false, undefined, this),
|
|
2142
2144
|
activeTab === "agents" && /* @__PURE__ */ jsxDEV9(AgentListViewWithActions, {
|
|
2143
2145
|
onAgentClick: handleAgentClick
|
|
2144
|
-
},
|
|
2146
|
+
}, refreshVersion, false, undefined, this),
|
|
2145
2147
|
activeTab === "tools" && /* @__PURE__ */ jsxDEV9(ToolRegistryView, {}, undefined, false, undefined, this),
|
|
2146
2148
|
activeTab === "metrics" && /* @__PURE__ */ jsxDEV9(MetricsView, {
|
|
2147
2149
|
metrics
|
package/dist/node/ui/index.js
CHANGED
|
@@ -2035,12 +2035,14 @@ function AgentDashboard() {
|
|
|
2035
2035
|
const [isCreateModalOpen, setIsCreateModalOpen] = useState8(false);
|
|
2036
2036
|
const [selectedAgent, setSelectedAgent] = useState8(null);
|
|
2037
2037
|
const [isAgentActionsOpen, setIsAgentActionsOpen] = useState8(false);
|
|
2038
|
+
const [refreshVersion, setRefreshVersion] = useState8(0);
|
|
2038
2039
|
const { data: runData, metrics, refetch: refetchRuns } = useRunList();
|
|
2039
2040
|
const { refetch: refetchAgents } = useAgentList();
|
|
2040
2041
|
const mutations = useAgentMutations({
|
|
2041
2042
|
onSuccess: () => {
|
|
2042
2043
|
refetchAgents();
|
|
2043
2044
|
refetchRuns();
|
|
2045
|
+
setRefreshVersion((current) => current + 1);
|
|
2044
2046
|
}
|
|
2045
2047
|
});
|
|
2046
2048
|
const handleAgentClick = useCallback5((agent) => {
|
|
@@ -2138,10 +2140,10 @@ function AgentDashboard() {
|
|
|
2138
2140
|
className: "min-h-[400px]",
|
|
2139
2141
|
role: "tabpanel",
|
|
2140
2142
|
children: [
|
|
2141
|
-
activeTab === "runs" && /* @__PURE__ */ jsxDEV9(RunListView, {},
|
|
2143
|
+
activeTab === "runs" && /* @__PURE__ */ jsxDEV9(RunListView, {}, refreshVersion, false, undefined, this),
|
|
2142
2144
|
activeTab === "agents" && /* @__PURE__ */ jsxDEV9(AgentListViewWithActions, {
|
|
2143
2145
|
onAgentClick: handleAgentClick
|
|
2144
|
-
},
|
|
2146
|
+
}, refreshVersion, false, undefined, this),
|
|
2145
2147
|
activeTab === "tools" && /* @__PURE__ */ jsxDEV9(ToolRegistryView, {}, undefined, false, undefined, this),
|
|
2146
2148
|
activeTab === "metrics" && /* @__PURE__ */ jsxDEV9(MetricsView, {
|
|
2147
2149
|
metrics
|
|
@@ -2036,12 +2036,14 @@ function AgentDashboard() {
|
|
|
2036
2036
|
const [isCreateModalOpen, setIsCreateModalOpen] = useState8(false);
|
|
2037
2037
|
const [selectedAgent, setSelectedAgent] = useState8(null);
|
|
2038
2038
|
const [isAgentActionsOpen, setIsAgentActionsOpen] = useState8(false);
|
|
2039
|
+
const [refreshVersion, setRefreshVersion] = useState8(0);
|
|
2039
2040
|
const { data: runData, metrics, refetch: refetchRuns } = useRunList();
|
|
2040
2041
|
const { refetch: refetchAgents } = useAgentList();
|
|
2041
2042
|
const mutations = useAgentMutations({
|
|
2042
2043
|
onSuccess: () => {
|
|
2043
2044
|
refetchAgents();
|
|
2044
2045
|
refetchRuns();
|
|
2046
|
+
setRefreshVersion((current) => current + 1);
|
|
2045
2047
|
}
|
|
2046
2048
|
});
|
|
2047
2049
|
const handleAgentClick = useCallback5((agent) => {
|
|
@@ -2139,10 +2141,10 @@ function AgentDashboard() {
|
|
|
2139
2141
|
className: "min-h-[400px]",
|
|
2140
2142
|
role: "tabpanel",
|
|
2141
2143
|
children: [
|
|
2142
|
-
activeTab === "runs" && /* @__PURE__ */ jsxDEV9(RunListView, {},
|
|
2144
|
+
activeTab === "runs" && /* @__PURE__ */ jsxDEV9(RunListView, {}, refreshVersion, false, undefined, this),
|
|
2143
2145
|
activeTab === "agents" && /* @__PURE__ */ jsxDEV9(AgentListViewWithActions, {
|
|
2144
2146
|
onAgentClick: handleAgentClick
|
|
2145
|
-
},
|
|
2147
|
+
}, refreshVersion, false, undefined, this),
|
|
2146
2148
|
activeTab === "tools" && /* @__PURE__ */ jsxDEV9(ToolRegistryView, {}, undefined, false, undefined, this),
|
|
2147
2149
|
activeTab === "metrics" && /* @__PURE__ */ jsxDEV9(MetricsView, {
|
|
2148
2150
|
metrics
|
package/dist/ui/index.js
CHANGED
|
@@ -2036,12 +2036,14 @@ function AgentDashboard() {
|
|
|
2036
2036
|
const [isCreateModalOpen, setIsCreateModalOpen] = useState8(false);
|
|
2037
2037
|
const [selectedAgent, setSelectedAgent] = useState8(null);
|
|
2038
2038
|
const [isAgentActionsOpen, setIsAgentActionsOpen] = useState8(false);
|
|
2039
|
+
const [refreshVersion, setRefreshVersion] = useState8(0);
|
|
2039
2040
|
const { data: runData, metrics, refetch: refetchRuns } = useRunList();
|
|
2040
2041
|
const { refetch: refetchAgents } = useAgentList();
|
|
2041
2042
|
const mutations = useAgentMutations({
|
|
2042
2043
|
onSuccess: () => {
|
|
2043
2044
|
refetchAgents();
|
|
2044
2045
|
refetchRuns();
|
|
2046
|
+
setRefreshVersion((current) => current + 1);
|
|
2045
2047
|
}
|
|
2046
2048
|
});
|
|
2047
2049
|
const handleAgentClick = useCallback5((agent) => {
|
|
@@ -2139,10 +2141,10 @@ function AgentDashboard() {
|
|
|
2139
2141
|
className: "min-h-[400px]",
|
|
2140
2142
|
role: "tabpanel",
|
|
2141
2143
|
children: [
|
|
2142
|
-
activeTab === "runs" && /* @__PURE__ */ jsxDEV9(RunListView, {},
|
|
2144
|
+
activeTab === "runs" && /* @__PURE__ */ jsxDEV9(RunListView, {}, refreshVersion, false, undefined, this),
|
|
2143
2145
|
activeTab === "agents" && /* @__PURE__ */ jsxDEV9(AgentListViewWithActions, {
|
|
2144
2146
|
onAgentClick: handleAgentClick
|
|
2145
|
-
},
|
|
2147
|
+
}, refreshVersion, false, undefined, this),
|
|
2146
2148
|
activeTab === "tools" && /* @__PURE__ */ jsxDEV9(ToolRegistryView, {}, undefined, false, undefined, this),
|
|
2147
2149
|
activeTab === "metrics" && /* @__PURE__ */ jsxDEV9(MetricsView, {
|
|
2148
2150
|
metrics
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contractspec/example.agent-console",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.8",
|
|
4
4
|
"description": "Agent Console example - AI agent orchestration with tools, runs, and logs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -520,7 +520,7 @@
|
|
|
520
520
|
"scripts": {
|
|
521
521
|
"publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
|
|
522
522
|
"publish:pkg:canary": "bun publish:pkg --tag canary",
|
|
523
|
-
"build": "bun run
|
|
523
|
+
"build": "bun run build:bundle && bun run build:types",
|
|
524
524
|
"build:bundle": "contractspec-bun-build transpile",
|
|
525
525
|
"build:types": "contractspec-bun-build types",
|
|
526
526
|
"dev": "contractspec-bun-build dev",
|
|
@@ -535,22 +535,22 @@
|
|
|
535
535
|
"typecheck": "tsc --noEmit"
|
|
536
536
|
},
|
|
537
537
|
"dependencies": {
|
|
538
|
-
"@contractspec/lib.schema": "3.7.
|
|
539
|
-
"@contractspec/lib.contracts-spec": "5.0.
|
|
540
|
-
"@contractspec/lib.example-shared-ui": "6.0.
|
|
541
|
-
"@contractspec/lib.design-system": "3.8.
|
|
542
|
-
"@contractspec/lib.runtime-sandbox": "2.7.
|
|
538
|
+
"@contractspec/lib.schema": "3.7.13",
|
|
539
|
+
"@contractspec/lib.contracts-spec": "5.0.4",
|
|
540
|
+
"@contractspec/lib.example-shared-ui": "6.0.16",
|
|
541
|
+
"@contractspec/lib.design-system": "3.8.9",
|
|
542
|
+
"@contractspec/lib.runtime-sandbox": "2.7.13",
|
|
543
543
|
"react": "19.2.0",
|
|
544
544
|
"react-dom": "19.2.0",
|
|
545
|
-
"@contractspec/lib.presentation-runtime-core": "3.9.
|
|
545
|
+
"@contractspec/lib.presentation-runtime-core": "3.9.4"
|
|
546
546
|
},
|
|
547
547
|
"devDependencies": {
|
|
548
|
-
"@contractspec/lib.harness": "0.2.
|
|
549
|
-
"@contractspec/tool.bun": "3.7.
|
|
550
|
-
"@contractspec/tool.typescript": "3.7.
|
|
548
|
+
"@contractspec/lib.harness": "0.2.9",
|
|
549
|
+
"@contractspec/tool.bun": "3.7.12",
|
|
550
|
+
"@contractspec/tool.typescript": "3.7.12",
|
|
551
551
|
"@types/react": "^19.2.14",
|
|
552
552
|
"@types/react-dom": "^19.2.2",
|
|
553
|
-
"happy-dom": "^20.8.
|
|
553
|
+
"happy-dom": "^20.8.8",
|
|
554
554
|
"typescript": "^5.9.3"
|
|
555
555
|
},
|
|
556
556
|
"publishConfig": {
|
|
@@ -15,6 +15,8 @@ import {
|
|
|
15
15
|
import { AgentDashboard } from './AgentDashboard';
|
|
16
16
|
|
|
17
17
|
const PROJECT_ID = 'agent-console-sandbox-smoke';
|
|
18
|
+
const DASHBOARD_TEST_TIMEOUT_MS = 10_000;
|
|
19
|
+
const MUTATION_TEST_TIMEOUT_MS = 15_000;
|
|
18
20
|
const TEMPLATE: TemplateDefinition = {
|
|
19
21
|
id: 'agent-console',
|
|
20
22
|
name: 'Agent Console',
|
|
@@ -121,6 +123,13 @@ async function waitFor(assertion: () => boolean, timeoutMs = 3000) {
|
|
|
121
123
|
throw new Error('Timed out waiting for dashboard state.');
|
|
122
124
|
}
|
|
123
125
|
|
|
126
|
+
async function waitForTextToDisappear(text: string, timeoutMs = 3000) {
|
|
127
|
+
await waitFor(
|
|
128
|
+
() => document.body.textContent?.includes(text) !== true,
|
|
129
|
+
timeoutMs
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
|
|
124
133
|
function findButton(container: HTMLElement, label: string) {
|
|
125
134
|
return [...container.getElementsByTagName('button')].find((element) =>
|
|
126
135
|
element.textContent?.includes(label)
|
|
@@ -162,11 +171,13 @@ async function click(element: Element | null | undefined) {
|
|
|
162
171
|
);
|
|
163
172
|
await act(async () => {
|
|
164
173
|
if (typeof onPress === 'function') {
|
|
165
|
-
onPress();
|
|
174
|
+
await Promise.resolve(onPress());
|
|
166
175
|
return;
|
|
167
176
|
}
|
|
168
177
|
if (typeof onClick === 'function') {
|
|
169
|
-
|
|
178
|
+
await Promise.resolve(
|
|
179
|
+
onClick(new MouseEvent('click', { bubbles: true }))
|
|
180
|
+
);
|
|
170
181
|
return;
|
|
171
182
|
}
|
|
172
183
|
if ('click' in element && typeof element.click === 'function') {
|
|
@@ -211,102 +222,131 @@ async function fill(selector: string, value: string) {
|
|
|
211
222
|
}
|
|
212
223
|
|
|
213
224
|
describe('AgentDashboard sandbox smoke', () => {
|
|
214
|
-
it(
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
);
|
|
219
|
-
await waitFor(
|
|
220
|
-
() =>
|
|
221
|
-
container.textContent?.includes(
|
|
222
|
-
'Affichage de 1 à 3 sur 5 résultats'
|
|
223
|
-
) === true
|
|
224
|
-
);
|
|
225
|
+
it(
|
|
226
|
+
'loads seeded state and renders the dashboard tabs',
|
|
227
|
+
async () => {
|
|
228
|
+
const { container, root } = await renderDashboard();
|
|
225
229
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
230
|
+
await waitFor(
|
|
231
|
+
() => container.textContent?.includes('AI Agent Console') === true
|
|
232
|
+
);
|
|
233
|
+
await waitFor(
|
|
234
|
+
() =>
|
|
235
|
+
container.textContent?.includes(
|
|
236
|
+
'Affichage de 1 à 3 sur 5 résultats'
|
|
237
|
+
) === true
|
|
238
|
+
);
|
|
231
239
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
(
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
await waitFor(
|
|
238
|
-
() => container.textContent?.includes('Usage Analytics') === true
|
|
239
|
-
);
|
|
240
|
-
await click(findButton(container, 'Agents'));
|
|
241
|
-
await waitFor(() => container.textContent?.includes('Total: 4') === true);
|
|
240
|
+
expect(container.textContent).toContain('Runs');
|
|
241
|
+
expect(container.textContent).toContain('Agents');
|
|
242
|
+
expect(container.textContent).toContain('Tools');
|
|
243
|
+
expect(container.textContent).toContain('Metrics');
|
|
244
|
+
expect(container.textContent).toContain('Run History');
|
|
242
245
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
() =>
|
|
256
|
-
container.textContent?.includes(
|
|
257
|
-
'Affichage de 1 à 3 sur 5 résultats'
|
|
258
|
-
) === true
|
|
259
|
-
);
|
|
260
|
-
await click(findButton(container, 'Agents'));
|
|
261
|
-
await waitFor(
|
|
262
|
-
() => container.textContent?.includes('Paris Meetup UI Agent') === true
|
|
263
|
-
);
|
|
264
|
-
await waitFor(() => container.textContent?.includes('Total: 5') === true);
|
|
246
|
+
await click(findButton(container, 'Tools'));
|
|
247
|
+
await waitFor(
|
|
248
|
+
() => container.textContent?.includes('Total Tools') === true
|
|
249
|
+
);
|
|
250
|
+
await click(findButton(container, 'Metrics'));
|
|
251
|
+
await waitFor(
|
|
252
|
+
() => container.textContent?.includes('Usage Analytics') === true
|
|
253
|
+
);
|
|
254
|
+
await click(findButton(container, 'Runs'));
|
|
255
|
+
await waitFor(
|
|
256
|
+
() => container.textContent?.includes('Run History') === true
|
|
257
|
+
);
|
|
265
258
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
await click(findButton(container, 'Runs'));
|
|
273
|
-
await waitFor(
|
|
274
|
-
() => container.textContent?.includes('Run History') === true
|
|
275
|
-
);
|
|
276
|
-
await click(findButton(container, 'Agents'));
|
|
277
|
-
await waitFor(
|
|
278
|
-
() =>
|
|
279
|
-
findAgentCard(
|
|
280
|
-
container,
|
|
281
|
-
'Paris Meetup UI Agent'
|
|
282
|
-
)?.textContent?.includes('ACTIVE') === true
|
|
283
|
-
);
|
|
259
|
+
await act(async () => {
|
|
260
|
+
root.unmount();
|
|
261
|
+
});
|
|
262
|
+
},
|
|
263
|
+
DASHBOARD_TEST_TIMEOUT_MS
|
|
264
|
+
);
|
|
284
265
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
);
|
|
290
|
-
await click(findButton(document.body, 'Execute Agent'));
|
|
291
|
-
await waitFor(
|
|
292
|
-
() => document.body.textContent?.includes('Message *') === true
|
|
293
|
-
);
|
|
294
|
-
await fill('#execute-message', 'Summarize the meetup smoke test.');
|
|
295
|
-
await click(findButton(document.body, 'Execute'));
|
|
266
|
+
it(
|
|
267
|
+
'creates an agent, activates it, and executes a run',
|
|
268
|
+
async () => {
|
|
269
|
+
const { container, root } = await renderDashboard();
|
|
296
270
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
);
|
|
271
|
+
await waitFor(
|
|
272
|
+
() => container.textContent?.includes('AI Agent Console') === true
|
|
273
|
+
);
|
|
274
|
+
await waitFor(
|
|
275
|
+
() =>
|
|
276
|
+
container.textContent?.includes(
|
|
277
|
+
'Affichage de 1 à 3 sur 5 résultats'
|
|
278
|
+
) === true
|
|
279
|
+
);
|
|
307
280
|
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
281
|
+
await click(findButton(container, 'Agents'));
|
|
282
|
+
await waitFor(() => container.textContent?.includes('Total: 4') === true);
|
|
283
|
+
|
|
284
|
+
await click(findButton(container, 'New Agent'));
|
|
285
|
+
await waitFor(
|
|
286
|
+
() => document.body.textContent?.includes('Create New Agent') === true
|
|
287
|
+
);
|
|
288
|
+
await fill('#agent-name', 'Paris Meetup UI Agent');
|
|
289
|
+
await fill(
|
|
290
|
+
'#agent-description',
|
|
291
|
+
'Smoke test agent for the sandbox walkthrough.'
|
|
292
|
+
);
|
|
293
|
+
await click(findButton(document.body, 'Create Agent'));
|
|
294
|
+
await waitForTextToDisappear('Create New Agent');
|
|
295
|
+
await waitFor(
|
|
296
|
+
() => container.textContent?.includes('Paris Meetup UI Agent') === true,
|
|
297
|
+
7000
|
|
298
|
+
);
|
|
299
|
+
await waitFor(
|
|
300
|
+
() => container.textContent?.includes('Total: 5') === true,
|
|
301
|
+
7000
|
|
302
|
+
);
|
|
303
|
+
|
|
304
|
+
const agentCard = findAgentCard(container, 'Paris Meetup UI Agent');
|
|
305
|
+
await click(agentCard);
|
|
306
|
+
await waitFor(
|
|
307
|
+
() => document.body.textContent?.includes('Activate Agent') === true
|
|
308
|
+
);
|
|
309
|
+
await click(findButton(document.body, 'Activate Agent'));
|
|
310
|
+
await waitForTextToDisappear('Activate Agent');
|
|
311
|
+
await waitFor(
|
|
312
|
+
() =>
|
|
313
|
+
findAgentCard(
|
|
314
|
+
container,
|
|
315
|
+
'Paris Meetup UI Agent'
|
|
316
|
+
)?.textContent?.includes('ACTIVE') === true,
|
|
317
|
+
7000
|
|
318
|
+
);
|
|
319
|
+
|
|
320
|
+
const activeAgentCard = findAgentCard(container, 'Paris Meetup UI Agent');
|
|
321
|
+
await click(activeAgentCard);
|
|
322
|
+
await waitFor(
|
|
323
|
+
() => document.body.textContent?.includes('Execute Agent') === true
|
|
324
|
+
);
|
|
325
|
+
await click(findButton(document.body, 'Execute Agent'));
|
|
326
|
+
await waitFor(
|
|
327
|
+
() => document.body.textContent?.includes('Message *') === true
|
|
328
|
+
);
|
|
329
|
+
await fill('#execute-message', 'Summarize the meetup smoke test.');
|
|
330
|
+
await click(findButton(document.body, 'Execute'));
|
|
331
|
+
await waitForTextToDisappear('Message *');
|
|
332
|
+
|
|
333
|
+
await click(findButton(container, 'Runs'));
|
|
334
|
+
await waitFor(
|
|
335
|
+
() =>
|
|
336
|
+
container.textContent?.includes(
|
|
337
|
+
'Affichage de 1 à 3 sur 6 résultats'
|
|
338
|
+
) === true,
|
|
339
|
+
7000
|
|
340
|
+
);
|
|
341
|
+
await waitFor(
|
|
342
|
+
() => container.textContent?.includes('Paris Meetup UI Agent') === true,
|
|
343
|
+
7000
|
|
344
|
+
);
|
|
345
|
+
|
|
346
|
+
await act(async () => {
|
|
347
|
+
root.unmount();
|
|
348
|
+
});
|
|
349
|
+
},
|
|
350
|
+
MUTATION_TEST_TIMEOUT_MS
|
|
351
|
+
);
|
|
312
352
|
});
|
|
@@ -34,6 +34,7 @@ export function AgentDashboard() {
|
|
|
34
34
|
const [isCreateModalOpen, setIsCreateModalOpen] = useState(false);
|
|
35
35
|
const [selectedAgent, setSelectedAgent] = useState<Agent | null>(null);
|
|
36
36
|
const [isAgentActionsOpen, setIsAgentActionsOpen] = useState(false);
|
|
37
|
+
const [refreshVersion, setRefreshVersion] = useState(0);
|
|
37
38
|
|
|
38
39
|
const { data: runData, metrics, refetch: refetchRuns } = useRunList();
|
|
39
40
|
const { refetch: refetchAgents } = useAgentList();
|
|
@@ -42,6 +43,7 @@ export function AgentDashboard() {
|
|
|
42
43
|
onSuccess: () => {
|
|
43
44
|
refetchAgents();
|
|
44
45
|
refetchRuns();
|
|
46
|
+
setRefreshVersion((current) => current + 1);
|
|
45
47
|
},
|
|
46
48
|
});
|
|
47
49
|
|
|
@@ -141,9 +143,12 @@ export function AgentDashboard() {
|
|
|
141
143
|
|
|
142
144
|
{/* Tab Content */}
|
|
143
145
|
<div className="min-h-[400px]" role="tabpanel">
|
|
144
|
-
{activeTab === 'runs' && <RunListView />}
|
|
146
|
+
{activeTab === 'runs' && <RunListView key={refreshVersion} />}
|
|
145
147
|
{activeTab === 'agents' && (
|
|
146
|
-
<AgentListViewWithActions
|
|
148
|
+
<AgentListViewWithActions
|
|
149
|
+
key={refreshVersion}
|
|
150
|
+
onAgentClick={handleAgentClick}
|
|
151
|
+
/>
|
|
147
152
|
)}
|
|
148
153
|
{activeTab === 'tools' && <ToolRegistryView />}
|
|
149
154
|
{activeTab === 'metrics' && <MetricsView metrics={metrics} />}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
$ contractspec-bun-build prebuild
|