@happyvertical/smrt-agents 0.60.15 → 0.60.17
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/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +1 -1
- package/dist/smrt-knowledge.json +3 -3
- package/dist/svelte/components/AgentAdminPanel.svelte +52 -42
- package/dist/svelte/components/AgentAdminTabs.svelte +113 -114
- package/dist/svelte/components/AgentDashboard.svelte +75 -76
- package/dist/svelte/components/AgentRunHistory.svelte +87 -82
- package/dist/svelte/components/AgentScheduleForm.svelte +35 -37
- package/dist/svelte/components/AgentScheduleList.svelte +132 -136
- package/dist/svelte/components/AgentSettingsForm.svelte +16 -15
- package/dist/svelte/components/AgentSettingsShell.svelte +150 -144
- package/package.json +18 -18
package/dist/manifest.json
CHANGED
package/dist/smrt-knowledge.json
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
"sensitiveFieldsExcluded": true,
|
|
4
4
|
"generatedAt": "1970-01-01T00:00:00.000Z",
|
|
5
5
|
"packageName": "@happyvertical/smrt-agents",
|
|
6
|
-
"packageVersion": "0.60.
|
|
6
|
+
"packageVersion": "0.60.17",
|
|
7
7
|
"sourceManifestPath": "dist/manifest.json",
|
|
8
8
|
"agentDocPath": "AGENTS.md",
|
|
9
9
|
"sourceHashes": {
|
|
10
|
-
"manifest": "
|
|
11
|
-
"packageJson": "
|
|
10
|
+
"manifest": "28b4ddc5fbd9ec08a83fd508023244f4efe0d13793c7f65bd87691e732ae2f90",
|
|
11
|
+
"packageJson": "6a2952616e00592006ea04a81049dc12ea4c22286207ce7f35751dd5b52d5ee7",
|
|
12
12
|
"agents": "8a74816d3dbbf145f5e8f4546357c6a793b1c5340ac768fec4ecbe8c5dc8cfd3",
|
|
13
13
|
"moduleDoc:agents/data-surface-discovery.md": "322415405529a3ef941691588306ef1140b7e714a6bb875330c94a0d6423c5d1",
|
|
14
14
|
"moduleDoc:agents/lazy-config.md": "f4bb02ee228e2cf43b4680e71a15732ed2e19eadcc38223be775f3e421fcb05c",
|
|
@@ -66,12 +66,12 @@ async function handleSave(newConfig: unknown) {
|
|
|
66
66
|
readonly={readonly || !onSave}
|
|
67
67
|
/>
|
|
68
68
|
{:else}
|
|
69
|
-
<div class="
|
|
70
|
-
<div class="
|
|
71
|
-
<p class="
|
|
69
|
+
<div class="smrt-agent-admin-panel__root" data-smrt-component="AgentAdminPanel">
|
|
70
|
+
<div class="smrt-agent-admin-panel__icon" data-smrt-part="icon">⚙️</div>
|
|
71
|
+
<p class="smrt-agent-admin-panel__message" data-smrt-part="message">
|
|
72
72
|
{t(M['ui.agent_admin_panel.no_panel_message'])} <code>{agentClass}.{slotId}</code>
|
|
73
73
|
</p>
|
|
74
|
-
<p class="
|
|
74
|
+
<p class="smrt-agent-admin-panel__hint" data-smrt-part="description">
|
|
75
75
|
{t(M['ui.agent_admin_panel.no_panel_hint'])}
|
|
76
76
|
</p>
|
|
77
77
|
</div>
|
|
@@ -79,44 +79,54 @@ async function handleSave(newConfig: unknown) {
|
|
|
79
79
|
|
|
80
80
|
<style>
|
|
81
81
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
82
|
-
@layer smrt.
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
font-size: var(--smrt-typography-body-large-size, 0.9375rem);
|
|
105
|
-
color: var(--smrt-color-on-surface-variant);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.no-panel-message code {
|
|
109
|
-
background: var(--smrt-color-surface-container-high);
|
|
110
|
-
padding: var(--smrt-spacing-1, 0.125rem) var(--smrt-spacing-2, 0.375rem);
|
|
111
|
-
border-radius: var(--smrt-radius-small);
|
|
112
|
-
font-family: var(--smrt-font-family-mono, 'SF Mono', Monaco, Consolas, monospace);
|
|
113
|
-
font-size: var(--smrt-typography-body-medium-size, 0.875rem);
|
|
114
|
-
}
|
|
82
|
+
@layer smrt.structure {
|
|
83
|
+
.smrt-agent-admin-panel__root {
|
|
84
|
+
display: flex;
|
|
85
|
+
flex-direction: column;
|
|
86
|
+
align-items: center;
|
|
87
|
+
justify-content: center;
|
|
88
|
+
padding: 3rem 2rem;
|
|
89
|
+
min-height: 200px;
|
|
90
|
+
}
|
|
91
|
+
.smrt-agent-admin-panel__icon {
|
|
92
|
+
margin-bottom: 1rem;
|
|
93
|
+
}
|
|
94
|
+
.smrt-agent-admin-panel__message {
|
|
95
|
+
margin: 0 0 0.5rem 0;
|
|
96
|
+
}
|
|
97
|
+
.smrt-agent-admin-panel__message code {
|
|
98
|
+
padding: var(--smrt-spacing-1, 0.125rem) var(--smrt-spacing-2, 0.375rem);
|
|
99
|
+
}
|
|
100
|
+
.smrt-agent-admin-panel__hint {
|
|
101
|
+
margin: 0;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
115
104
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
105
|
+
@layer smrt.theme {
|
|
106
|
+
.smrt-agent-admin-panel__root {
|
|
107
|
+
text-align: center;
|
|
108
|
+
background: var(--smrt-color-surface-container-low);
|
|
109
|
+
border: 1px dashed var(--smrt-color-outline-variant);
|
|
110
|
+
border-radius: var(--smrt-radius-medium);
|
|
111
|
+
}
|
|
112
|
+
.smrt-agent-admin-panel__icon {
|
|
113
|
+
font-size: var(--smrt-typography-display-medium-size, 2.5rem);
|
|
114
|
+
opacity: 0.5;
|
|
115
|
+
}
|
|
116
|
+
.smrt-agent-admin-panel__message {
|
|
117
|
+
font-size: var(--smrt-typography-body-large-size, 0.9375rem);
|
|
118
|
+
color: var(--smrt-color-on-surface-variant);
|
|
119
|
+
}
|
|
120
|
+
.smrt-agent-admin-panel__message code {
|
|
121
|
+
background: var(--smrt-color-surface-container-high);
|
|
122
|
+
border-radius: var(--smrt-radius-small);
|
|
123
|
+
font-family: var(--smrt-font-family-mono, 'SF Mono', Monaco, Consolas, monospace);
|
|
124
|
+
font-size: var(--smrt-typography-body-medium-size, 0.875rem);
|
|
125
|
+
}
|
|
126
|
+
.smrt-agent-admin-panel__hint {
|
|
127
|
+
font-size: var(--smrt-typography-body-medium-size, 0.8125rem);
|
|
128
|
+
color: var(--smrt-color-on-surface-variant);
|
|
129
|
+
}
|
|
121
130
|
}
|
|
131
|
+
|
|
122
132
|
</style>
|
|
@@ -111,13 +111,13 @@ async function handleSave(config: unknown) {
|
|
|
111
111
|
}
|
|
112
112
|
</script>
|
|
113
113
|
|
|
114
|
-
<div class="agent-admin-
|
|
115
|
-
<div class="
|
|
114
|
+
<div class="smrt-agent-admin-tabs__root" data-smrt-component="AgentAdminTabs">
|
|
115
|
+
<div class="smrt-agent-admin-tabs__nav" data-smrt-part="list" role="tablist" aria-label={t(M['ui.agent_admin_tabs.tablist_label'])} bind:this={tablistEl}>
|
|
116
116
|
{#each sortedSlots as [slotId, slot]}
|
|
117
117
|
<!-- raw-primitive-allow: tab control in a hand-rolled ARIA tablist with roving tabindex and bind:this keyboard navigation, driving externally-rendered aria-controls panels; this is a tab role (not a standard action button) and adopting the Tabs primitive would require restructuring the slot/panel wiring -->
|
|
118
118
|
<button
|
|
119
|
-
class="
|
|
120
|
-
class:
|
|
119
|
+
class="smrt-agent-admin-tabs__tab" data-smrt-part="tab"
|
|
120
|
+
class:smrt-agent-admin-tabs__active={activeSlotId === slotId}
|
|
121
121
|
role="tab"
|
|
122
122
|
aria-selected={activeSlotId === slotId}
|
|
123
123
|
aria-controls="panel-{slotId}"
|
|
@@ -128,24 +128,24 @@ async function handleSave(config: unknown) {
|
|
|
128
128
|
onkeydown={(e) => handleKeydown(e, slotId)}
|
|
129
129
|
>
|
|
130
130
|
{#if slot.icon}
|
|
131
|
-
<span class="
|
|
131
|
+
<span class="smrt-agent-admin-tabs__icon" data-smrt-part="icon" aria-hidden="true">{slot.icon}</span>
|
|
132
132
|
{/if}
|
|
133
|
-
<span class="
|
|
133
|
+
<span class="smrt-agent-admin-tabs__label" data-smrt-part="label">{slot.label}</span>
|
|
134
134
|
</button>
|
|
135
135
|
{/each}
|
|
136
136
|
</div>
|
|
137
137
|
|
|
138
|
-
<div class="
|
|
138
|
+
<div class="smrt-agent-admin-tabs__content" data-smrt-part="body">
|
|
139
139
|
{#if activeSlotId && slots[activeSlotId]}
|
|
140
140
|
{@const activeSlot = slots[activeSlotId]}
|
|
141
141
|
<div
|
|
142
142
|
id="panel-{activeSlotId}"
|
|
143
|
-
class="
|
|
143
|
+
class="smrt-agent-admin-tabs__panel" data-smrt-part="panel"
|
|
144
144
|
role="tabpanel"
|
|
145
145
|
aria-labelledby="tab-{activeSlotId}"
|
|
146
146
|
>
|
|
147
147
|
{#if activeSlot.description}
|
|
148
|
-
<p class="
|
|
148
|
+
<p class="smrt-agent-admin-tabs__description" data-smrt-part="description">{activeSlot.description}</p>
|
|
149
149
|
{/if}
|
|
150
150
|
|
|
151
151
|
<AgentAdminPanel
|
|
@@ -161,7 +161,7 @@ async function handleSave(config: unknown) {
|
|
|
161
161
|
/>
|
|
162
162
|
</div>
|
|
163
163
|
{:else}
|
|
164
|
-
<div class="
|
|
164
|
+
<div class="smrt-agent-admin-tabs__empty" data-smrt-part="empty">
|
|
165
165
|
<p>{t(M['ui.agent_admin_tabs.no_slots'])}</p>
|
|
166
166
|
</div>
|
|
167
167
|
{/if}
|
|
@@ -170,112 +170,111 @@ async function handleSave(config: unknown) {
|
|
|
170
170
|
|
|
171
171
|
<style>
|
|
172
172
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
173
|
-
@layer smrt.
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
173
|
+
@layer smrt.structure {
|
|
174
|
+
.smrt-agent-admin-tabs__root {
|
|
175
|
+
display: flex;
|
|
176
|
+
flex-direction: column;
|
|
177
|
+
gap: 1rem;
|
|
178
|
+
}
|
|
179
|
+
.smrt-agent-admin-tabs__nav {
|
|
180
|
+
display: flex;
|
|
181
|
+
gap: 0.25rem;
|
|
182
|
+
padding-bottom: 0;
|
|
183
|
+
}
|
|
184
|
+
.smrt-agent-admin-tabs__tab {
|
|
185
|
+
display: flex;
|
|
186
|
+
align-items: center;
|
|
187
|
+
gap: 0.5rem;
|
|
188
|
+
padding: 0.75rem 1rem;
|
|
189
|
+
cursor: pointer;
|
|
190
|
+
margin-bottom: -1px;
|
|
191
|
+
}
|
|
192
|
+
.smrt-agent-admin-tabs__tab:disabled {
|
|
193
|
+
cursor: not-allowed;
|
|
194
|
+
}
|
|
195
|
+
.smrt-agent-admin-tabs__label {
|
|
196
|
+
white-space: nowrap;
|
|
197
|
+
}
|
|
198
|
+
.smrt-agent-admin-tabs__content {
|
|
199
|
+
min-height: 300px;
|
|
200
|
+
}
|
|
201
|
+
.smrt-agent-admin-tabs__description {
|
|
202
|
+
margin: 0 0 1rem 0;
|
|
203
|
+
padding: 0.75rem 1rem;
|
|
204
|
+
}
|
|
205
|
+
.smrt-agent-admin-tabs__empty {
|
|
206
|
+
display: flex;
|
|
207
|
+
align-items: center;
|
|
208
|
+
justify-content: center;
|
|
209
|
+
min-height: 200px;
|
|
210
|
+
}
|
|
211
|
+
.smrt-agent-admin-tabs__empty p {
|
|
212
|
+
margin: 0;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
186
215
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
margin-bottom: -1px;
|
|
200
|
-
transition:
|
|
216
|
+
@layer smrt.theme {
|
|
217
|
+
.smrt-agent-admin-tabs__nav {
|
|
218
|
+
border-bottom: var(--smrt-hairline);
|
|
219
|
+
}
|
|
220
|
+
.smrt-agent-admin-tabs__tab {
|
|
221
|
+
border: none;
|
|
222
|
+
background: transparent;
|
|
223
|
+
color: var(--smrt-color-on-surface-variant);
|
|
224
|
+
font-size: var(--smrt-typography-label-large-size, 0.875rem);
|
|
225
|
+
font-weight: var(--smrt-typography-weight-medium, 500);
|
|
226
|
+
border-bottom: 2px solid transparent;
|
|
227
|
+
transition:
|
|
201
228
|
color var(--smrt-duration-short2, 150ms) var(--smrt-easing-standard, ease),
|
|
202
229
|
border-color var(--smrt-duration-short2, 150ms) var(--smrt-easing-standard, ease);
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
@media (prefers-reduced-motion: reduce) {
|
|
253
|
-
.tab-panel {
|
|
254
|
-
animation: none;
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
.slot-description {
|
|
259
|
-
margin: 0 0 1rem 0;
|
|
260
|
-
padding: 0.75rem 1rem;
|
|
261
|
-
background: var(--smrt-color-primary-container);
|
|
262
|
-
border-left: 3px solid var(--smrt-color-primary);
|
|
263
|
-
border-radius: 0 var(--smrt-radius-md) var(--smrt-radius-md) 0;
|
|
264
|
-
font-size: var(--smrt-typography-body-medium-size, 0.875rem);
|
|
265
|
-
color: var(--smrt-color-on-primary-container);
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
.no-slots {
|
|
269
|
-
display: flex;
|
|
270
|
-
align-items: center;
|
|
271
|
-
justify-content: center;
|
|
272
|
-
min-height: 200px;
|
|
273
|
-
color: var(--smrt-color-on-surface-variant);
|
|
274
|
-
font-size: var(--smrt-typography-body-medium-size, 0.9375rem);
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
.no-slots p {
|
|
278
|
-
margin: 0;
|
|
279
|
-
}
|
|
230
|
+
}
|
|
231
|
+
.smrt-agent-admin-tabs__tab:hover:not(:disabled) {
|
|
232
|
+
color: var(--smrt-color-on-surface);
|
|
233
|
+
}
|
|
234
|
+
.smrt-agent-admin-tabs__tab.smrt-agent-admin-tabs__active {
|
|
235
|
+
color: var(--smrt-color-primary);
|
|
236
|
+
border-bottom-color: var(--smrt-color-primary);
|
|
237
|
+
}
|
|
238
|
+
.smrt-agent-admin-tabs__tab:disabled {
|
|
239
|
+
opacity: 0.38;
|
|
240
|
+
}
|
|
241
|
+
.smrt-agent-admin-tabs__tab:focus-visible {
|
|
242
|
+
outline: 2px solid var(--smrt-color-primary);
|
|
243
|
+
outline-offset: 2px;
|
|
244
|
+
}
|
|
245
|
+
.smrt-agent-admin-tabs__icon {
|
|
246
|
+
font-size: var(--smrt-typography-title-medium-size, 1rem);
|
|
247
|
+
opacity: 0.8;
|
|
248
|
+
}
|
|
249
|
+
.smrt-agent-admin-tabs__panel {
|
|
250
|
+
animation: fadeIn var(--smrt-duration-short2, 150ms) var(--smrt-easing-standard, ease-out);
|
|
251
|
+
}
|
|
252
|
+
@keyframes fadeIn {
|
|
253
|
+
from {
|
|
254
|
+
opacity: 0;
|
|
255
|
+
transform: translateY(4px);
|
|
256
|
+
}
|
|
257
|
+
to {
|
|
258
|
+
opacity: 1;
|
|
259
|
+
transform: translateY(0);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
@media (prefers-reduced-motion: reduce) {
|
|
263
|
+
.smrt-agent-admin-tabs__panel {
|
|
264
|
+
animation: none;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
.smrt-agent-admin-tabs__description {
|
|
268
|
+
background: var(--smrt-color-primary-container);
|
|
269
|
+
border-left: 3px solid var(--smrt-color-primary);
|
|
270
|
+
border-radius: 0 var(--smrt-radius-md) var(--smrt-radius-md) 0;
|
|
271
|
+
font-size: var(--smrt-typography-body-medium-size, 0.875rem);
|
|
272
|
+
color: var(--smrt-color-on-primary-container);
|
|
273
|
+
}
|
|
274
|
+
.smrt-agent-admin-tabs__empty {
|
|
275
|
+
color: var(--smrt-color-on-surface-variant);
|
|
276
|
+
font-size: var(--smrt-typography-body-medium-size, 0.9375rem);
|
|
277
|
+
}
|
|
280
278
|
}
|
|
279
|
+
|
|
281
280
|
</style>
|
|
@@ -63,54 +63,54 @@ const stats = $derived.by(() => {
|
|
|
63
63
|
});
|
|
64
64
|
</script>
|
|
65
65
|
|
|
66
|
-
<div class="agent-
|
|
66
|
+
<div class="smrt-agent-dashboard__root" class:smrt-agent-dashboard__loading={loading} data-smrt-component="AgentDashboard">
|
|
67
67
|
<!-- Stats Overview -->
|
|
68
|
-
<section class="agent-dashboard__stats">
|
|
69
|
-
<div class="
|
|
68
|
+
<section class="smrt-agent-dashboard__stats" data-smrt-part="group">
|
|
69
|
+
<div class="smrt-agent-dashboard__grid" data-smrt-part="grid">
|
|
70
70
|
<Card padding="sm">
|
|
71
|
-
<div class="
|
|
72
|
-
<div class="
|
|
73
|
-
<div class="
|
|
71
|
+
<div class="smrt-agent-dashboard__card" data-smrt-part="item">
|
|
72
|
+
<div class="smrt-agent-dashboard__stat-value" data-smrt-part="value">{schedules.length}</div>
|
|
73
|
+
<div class="smrt-agent-dashboard__stat-label" data-smrt-part="label">{t(M['agents.dashboard.total_schedules'])}</div>
|
|
74
74
|
</div>
|
|
75
75
|
</Card>
|
|
76
76
|
|
|
77
77
|
<Card padding="sm">
|
|
78
|
-
<div class="
|
|
79
|
-
<div class="
|
|
80
|
-
<div class="
|
|
78
|
+
<div class="smrt-agent-dashboard__card smrt-agent-dashboard__card-active" data-smrt-part="item">
|
|
79
|
+
<div class="smrt-agent-dashboard__stat-value" data-smrt-part="value">{stats.active}</div>
|
|
80
|
+
<div class="smrt-agent-dashboard__stat-label" data-smrt-part="label">Active</div>
|
|
81
81
|
</div>
|
|
82
82
|
</Card>
|
|
83
83
|
|
|
84
84
|
<Card padding="sm">
|
|
85
|
-
<div class="
|
|
86
|
-
<div class="
|
|
87
|
-
<div class="
|
|
85
|
+
<div class="smrt-agent-dashboard__card smrt-agent-dashboard__card-running" data-smrt-part="item">
|
|
86
|
+
<div class="smrt-agent-dashboard__stat-value" data-smrt-part="value">{stats.running}</div>
|
|
87
|
+
<div class="smrt-agent-dashboard__stat-label" data-smrt-part="label">{t(M['agents.dashboard.running_now'])}</div>
|
|
88
88
|
</div>
|
|
89
89
|
</Card>
|
|
90
90
|
|
|
91
91
|
<Card padding="sm">
|
|
92
|
-
<div class="
|
|
93
|
-
<div class="
|
|
94
|
-
<div class="
|
|
92
|
+
<div class="smrt-agent-dashboard__card" data-smrt-part="item">
|
|
93
|
+
<div class="smrt-agent-dashboard__stat-value" data-smrt-part="value">{stats.totalRuns.toLocaleString()}</div>
|
|
94
|
+
<div class="smrt-agent-dashboard__stat-label" data-smrt-part="label">{t(M['agents.dashboard.total_runs'])}</div>
|
|
95
95
|
</div>
|
|
96
96
|
</Card>
|
|
97
97
|
|
|
98
98
|
<Card padding="sm">
|
|
99
|
-
<div class="
|
|
100
|
-
<div class="
|
|
99
|
+
<div class="smrt-agent-dashboard__card" data-smrt-part="item">
|
|
100
|
+
<div class="smrt-agent-dashboard__stat-value" data-smrt-part="value">
|
|
101
101
|
{stats.successRate !== null
|
|
102
102
|
? `${(stats.successRate * 100).toFixed(1)}%`
|
|
103
103
|
: '-'}
|
|
104
104
|
</div>
|
|
105
|
-
<div class="
|
|
105
|
+
<div class="smrt-agent-dashboard__stat-label" data-smrt-part="label">{t(M['agents.dashboard.success_rate'])}</div>
|
|
106
106
|
</div>
|
|
107
107
|
</Card>
|
|
108
108
|
|
|
109
109
|
{#if stats.error > 0}
|
|
110
110
|
<Card padding="sm">
|
|
111
|
-
<div class="
|
|
112
|
-
<div class="
|
|
113
|
-
<div class="
|
|
111
|
+
<div class="smrt-agent-dashboard__card smrt-agent-dashboard__card-error" data-smrt-part="item">
|
|
112
|
+
<div class="smrt-agent-dashboard__stat-value" data-smrt-part="value">{stats.error}</div>
|
|
113
|
+
<div class="smrt-agent-dashboard__stat-label" data-smrt-part="label">Errors</div>
|
|
114
114
|
</div>
|
|
115
115
|
</Card>
|
|
116
116
|
{/if}
|
|
@@ -118,10 +118,10 @@ const stats = $derived.by(() => {
|
|
|
118
118
|
</section>
|
|
119
119
|
|
|
120
120
|
<!-- Schedules List -->
|
|
121
|
-
<section class="agent-dashboard__section">
|
|
121
|
+
<section class="smrt-agent-dashboard__section" data-smrt-part="group">
|
|
122
122
|
<Card>
|
|
123
123
|
{#snippet header()}
|
|
124
|
-
<div class="
|
|
124
|
+
<div class="smrt-agent-dashboard__header" data-smrt-part="header">
|
|
125
125
|
<h2>{t(M['agents.dashboard.scheduled_agents'])}</h2>
|
|
126
126
|
{#if onCreateSchedule}
|
|
127
127
|
<Button variant="primary" size="sm" onclick={onCreateSchedule}>
|
|
@@ -140,7 +140,7 @@ const stats = $derived.by(() => {
|
|
|
140
140
|
{onRunNow}
|
|
141
141
|
>
|
|
142
142
|
{#snippet empty()}
|
|
143
|
-
<div class="
|
|
143
|
+
<div class="smrt-agent-dashboard__empty" data-smrt-part="empty">
|
|
144
144
|
<p>{t(M['agents.dashboard.no_scheduled_agents'])}</p>
|
|
145
145
|
{#if onCreateSchedule}
|
|
146
146
|
<Button variant="secondary" onclick={onCreateSchedule}>
|
|
@@ -155,10 +155,10 @@ const stats = $derived.by(() => {
|
|
|
155
155
|
|
|
156
156
|
<!-- Recent Run History -->
|
|
157
157
|
{#if recentHistory.length > 0}
|
|
158
|
-
<section class="agent-dashboard__section">
|
|
158
|
+
<section class="smrt-agent-dashboard__section" data-smrt-part="group">
|
|
159
159
|
<Card>
|
|
160
160
|
{#snippet header()}
|
|
161
|
-
<div class="
|
|
161
|
+
<div class="smrt-agent-dashboard__header" data-smrt-part="header">
|
|
162
162
|
<h2>{t(M['agents.dashboard.recent_runs'])}</h2>
|
|
163
163
|
</div>
|
|
164
164
|
{/snippet}
|
|
@@ -175,85 +175,84 @@ const stats = $derived.by(() => {
|
|
|
175
175
|
|
|
176
176
|
<style>
|
|
177
177
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
178
|
-
@layer smrt.
|
|
179
|
-
.agent-
|
|
178
|
+
@layer smrt.structure {
|
|
179
|
+
.smrt-agent-dashboard__root {
|
|
180
180
|
width: 100%;
|
|
181
181
|
display: flex;
|
|
182
182
|
flex-direction: column;
|
|
183
183
|
gap: var(--smrt-spacing-lg, 1.5rem);
|
|
184
184
|
}
|
|
185
|
-
|
|
186
|
-
.agent-dashboard.loading {
|
|
187
|
-
opacity: 0.7;
|
|
188
|
-
pointer-events: none;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
@media (prefers-reduced-motion: reduce) {
|
|
192
|
-
.agent-dashboard.loading {
|
|
193
|
-
transition: none;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
.agent-dashboard__stats {
|
|
185
|
+
.smrt-agent-dashboard__stats {
|
|
198
186
|
width: 100%;
|
|
199
187
|
}
|
|
200
|
-
|
|
201
|
-
.stats-grid {
|
|
188
|
+
.smrt-agent-dashboard__grid {
|
|
202
189
|
display: grid;
|
|
203
190
|
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
|
|
204
191
|
gap: var(--smrt-spacing-md, 1rem);
|
|
205
192
|
}
|
|
206
|
-
|
|
207
|
-
.stat-card {
|
|
208
|
-
text-align: center;
|
|
193
|
+
.smrt-agent-dashboard__card {
|
|
209
194
|
padding: var(--smrt-spacing-xs, 0.25rem);
|
|
210
195
|
}
|
|
196
|
+
.smrt-agent-dashboard__stat-label {
|
|
197
|
+
margin-top: var(--smrt-spacing-xs, 0.25rem);
|
|
198
|
+
}
|
|
199
|
+
.smrt-agent-dashboard__section {
|
|
200
|
+
width: 100%;
|
|
201
|
+
}
|
|
202
|
+
.smrt-agent-dashboard__header {
|
|
203
|
+
display: flex;
|
|
204
|
+
justify-content: space-between;
|
|
205
|
+
align-items: center;
|
|
206
|
+
}
|
|
207
|
+
.smrt-agent-dashboard__header h2 {
|
|
208
|
+
margin: 0;
|
|
209
|
+
}
|
|
210
|
+
.smrt-agent-dashboard__empty {
|
|
211
|
+
padding: var(--smrt-spacing-lg, 1.5rem);
|
|
212
|
+
}
|
|
213
|
+
.smrt-agent-dashboard__empty p {
|
|
214
|
+
margin: 0 0 var(--smrt-spacing-md, 1rem) 0;
|
|
215
|
+
}
|
|
216
|
+
.smrt-agent-dashboard__root.smrt-agent-dashboard__loading {
|
|
217
|
+
pointer-events: none;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
211
220
|
|
|
212
|
-
|
|
221
|
+
@layer smrt.theme {
|
|
222
|
+
.smrt-agent-dashboard__root.smrt-agent-dashboard__loading {
|
|
223
|
+
opacity: 0.7;
|
|
224
|
+
}
|
|
225
|
+
@media (prefers-reduced-motion: reduce) {
|
|
226
|
+
.smrt-agent-dashboard__root.smrt-agent-dashboard__loading {
|
|
227
|
+
transition: none;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
.smrt-agent-dashboard__card {
|
|
231
|
+
text-align: center;
|
|
232
|
+
}
|
|
233
|
+
.smrt-agent-dashboard__stat-value {
|
|
213
234
|
font: var(--smrt-typography-headline-small-font, 700 1.5rem / 1.2 sans-serif);
|
|
214
235
|
}
|
|
215
|
-
|
|
216
|
-
.stat-card__label {
|
|
236
|
+
.smrt-agent-dashboard__stat-label {
|
|
217
237
|
font: var(--smrt-typography-body-small-font, 0.875rem / 1.25 sans-serif);
|
|
218
238
|
color: var(--smrt-color-on-surface-variant);
|
|
219
|
-
margin-top: var(--smrt-spacing-xs, 0.25rem);
|
|
220
239
|
}
|
|
221
|
-
|
|
222
|
-
.stat-card--active .stat-card__value {
|
|
240
|
+
.smrt-agent-dashboard__card-active .smrt-agent-dashboard__stat-value {
|
|
223
241
|
color: var(--smrt-color-tertiary);
|
|
224
242
|
}
|
|
225
|
-
|
|
226
|
-
.stat-card--running .stat-card__value {
|
|
243
|
+
.smrt-agent-dashboard__card-running .smrt-agent-dashboard__stat-value {
|
|
227
244
|
color: var(--smrt-color-primary);
|
|
228
245
|
}
|
|
229
|
-
|
|
230
|
-
.stat-card--error .stat-card__value {
|
|
246
|
+
.smrt-agent-dashboard__card-error .smrt-agent-dashboard__stat-value {
|
|
231
247
|
color: var(--smrt-color-error);
|
|
232
248
|
}
|
|
233
|
-
|
|
234
|
-
.agent-dashboard__section {
|
|
235
|
-
width: 100%;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
.panel-header {
|
|
239
|
-
display: flex;
|
|
240
|
-
justify-content: space-between;
|
|
241
|
-
align-items: center;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
.panel-header h2 {
|
|
245
|
-
margin: 0;
|
|
249
|
+
.smrt-agent-dashboard__header h2 {
|
|
246
250
|
font: var(--smrt-typography-title-medium-font, 600 1rem / 1.5 sans-serif);
|
|
247
251
|
}
|
|
248
|
-
|
|
249
|
-
.empty-state {
|
|
250
|
-
padding: var(--smrt-spacing-lg, 1.5rem);
|
|
252
|
+
.smrt-agent-dashboard__empty {
|
|
251
253
|
text-align: center;
|
|
252
254
|
color: var(--smrt-color-on-surface-variant);
|
|
253
255
|
}
|
|
254
|
-
|
|
255
|
-
.empty-state p {
|
|
256
|
-
margin: 0 0 var(--smrt-spacing-md, 1rem) 0;
|
|
257
|
-
}
|
|
258
256
|
}
|
|
257
|
+
|
|
259
258
|
</style>
|