arkaos 3.36.0 → 3.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.
|
|
1
|
+
3.37.0
|
|
@@ -7,6 +7,14 @@
|
|
|
7
7
|
|
|
8
8
|
import type { TableColumn } from '@nuxt/ui'
|
|
9
9
|
|
|
10
|
+
interface WorkflowPhase {
|
|
11
|
+
id: string
|
|
12
|
+
name: string
|
|
13
|
+
description: string
|
|
14
|
+
gate_type: string
|
|
15
|
+
agent_count: number
|
|
16
|
+
}
|
|
17
|
+
|
|
10
18
|
interface Workflow {
|
|
11
19
|
id: string
|
|
12
20
|
name: string
|
|
@@ -15,6 +23,7 @@ interface Workflow {
|
|
|
15
23
|
tier: string
|
|
16
24
|
command: string
|
|
17
25
|
phases_count: number
|
|
26
|
+
phases: WorkflowPhase[]
|
|
18
27
|
file: string
|
|
19
28
|
content: string
|
|
20
29
|
}
|
|
@@ -35,7 +44,16 @@ interface WorkflowRun {
|
|
|
35
44
|
}
|
|
36
45
|
const runs = ref<WorkflowRun[]>([])
|
|
37
46
|
const runsLoading = ref(false)
|
|
38
|
-
const sidePanelTab = ref<'yaml' | 'runs'>('
|
|
47
|
+
const sidePanelTab = ref<'flow' | 'yaml' | 'runs'>('flow')
|
|
48
|
+
|
|
49
|
+
function gateColor(gateType: string): 'primary' | 'warning' | 'error' | 'neutral' {
|
|
50
|
+
const m: Record<string, 'primary' | 'warning' | 'error' | 'neutral'> = {
|
|
51
|
+
user_approval: 'warning',
|
|
52
|
+
quality_gate: 'error',
|
|
53
|
+
automatic: 'primary',
|
|
54
|
+
}
|
|
55
|
+
return m[gateType] ?? 'neutral'
|
|
56
|
+
}
|
|
39
57
|
|
|
40
58
|
async function loadRuns(id: string) {
|
|
41
59
|
runsLoading.value = true
|
|
@@ -152,7 +170,7 @@ const columns: TableColumn<Workflow>[] = [
|
|
|
152
170
|
th: 'py-2 first:rounded-l-lg last:rounded-r-lg border-y border-default first:border-l last:border-r',
|
|
153
171
|
td: 'border-b border-default',
|
|
154
172
|
}"
|
|
155
|
-
@select="(row: { original: Workflow }) => { selected = row.original; sidePanelTab = '
|
|
173
|
+
@select="(row: { original: Workflow }) => { selected = row.original; sidePanelTab = 'flow'; runs = []; loadRuns(row.original.id) }"
|
|
156
174
|
>
|
|
157
175
|
<template #name-cell="{ row }">
|
|
158
176
|
<div class="min-w-0">
|
|
@@ -205,6 +223,14 @@ const columns: TableColumn<Workflow>[] = [
|
|
|
205
223
|
{{ selected.description }}
|
|
206
224
|
</p>
|
|
207
225
|
<div class="flex items-center gap-1 mt-3 text-xs">
|
|
226
|
+
<button
|
|
227
|
+
type="button"
|
|
228
|
+
class="px-2 py-1 rounded-md transition-colors"
|
|
229
|
+
:class="sidePanelTab === 'flow' ? 'bg-elevated/60 text-default font-semibold' : 'text-muted hover:text-default'"
|
|
230
|
+
@click="sidePanelTab = 'flow'"
|
|
231
|
+
>
|
|
232
|
+
Flow
|
|
233
|
+
</button>
|
|
208
234
|
<button
|
|
209
235
|
type="button"
|
|
210
236
|
class="px-2 py-1 rounded-md transition-colors"
|
|
@@ -223,7 +249,43 @@ const columns: TableColumn<Workflow>[] = [
|
|
|
223
249
|
</button>
|
|
224
250
|
</div>
|
|
225
251
|
</div>
|
|
226
|
-
<div v-if="sidePanelTab === '
|
|
252
|
+
<div v-if="sidePanelTab === 'flow'" class="p-4">
|
|
253
|
+
<ol v-if="selected.phases.length > 0" class="relative border-l border-default ml-2 space-y-3">
|
|
254
|
+
<li
|
|
255
|
+
v-for="(ph, idx) in selected.phases"
|
|
256
|
+
:key="ph.id || idx"
|
|
257
|
+
class="ml-4"
|
|
258
|
+
>
|
|
259
|
+
<span class="absolute -left-1.5 size-3 rounded-full bg-primary border border-primary/60" />
|
|
260
|
+
<div class="rounded-lg border border-default p-3 bg-elevated/20">
|
|
261
|
+
<div class="flex items-center gap-2 flex-wrap">
|
|
262
|
+
<span class="font-mono text-xs text-muted">{{ idx + 1 }}.</span>
|
|
263
|
+
<span class="font-semibold">{{ ph.name || ph.id }}</span>
|
|
264
|
+
<UBadge
|
|
265
|
+
v-if="ph.gate_type"
|
|
266
|
+
:label="ph.gate_type"
|
|
267
|
+
:color="gateColor(ph.gate_type)"
|
|
268
|
+
variant="subtle"
|
|
269
|
+
size="xs"
|
|
270
|
+
/>
|
|
271
|
+
<UBadge
|
|
272
|
+
v-if="ph.agent_count > 0"
|
|
273
|
+
:label="`${ph.agent_count} agent${ph.agent_count === 1 ? '' : 's'}`"
|
|
274
|
+
variant="outline"
|
|
275
|
+
size="xs"
|
|
276
|
+
/>
|
|
277
|
+
</div>
|
|
278
|
+
<p v-if="ph.description" class="text-xs text-muted mt-1">
|
|
279
|
+
{{ ph.description }}
|
|
280
|
+
</p>
|
|
281
|
+
</div>
|
|
282
|
+
</li>
|
|
283
|
+
</ol>
|
|
284
|
+
<div v-else class="py-6 text-center text-sm text-muted">
|
|
285
|
+
No phases defined.
|
|
286
|
+
</div>
|
|
287
|
+
</div>
|
|
288
|
+
<div v-else-if="sidePanelTab === 'yaml'" class="overflow-x-auto">
|
|
227
289
|
<pre class="p-4 text-xs font-mono whitespace-pre">{{ selected.content }}</pre>
|
|
228
290
|
</div>
|
|
229
291
|
<div v-else class="p-4">
|
package/package.json
CHANGED
package/pyproject.toml
CHANGED
|
Binary file
|
package/scripts/dashboard-api.py
CHANGED
|
@@ -1848,12 +1848,33 @@ def workflows_list():
|
|
|
1848
1848
|
"tier": str(raw.get("tier") or ""),
|
|
1849
1849
|
"command": str(raw.get("command") or ""),
|
|
1850
1850
|
"phases_count": len(phases),
|
|
1851
|
+
"phases": _summarise_phases(phases), # PR91c v3.37.0
|
|
1851
1852
|
"file": rel,
|
|
1852
1853
|
"content": content,
|
|
1853
1854
|
})
|
|
1854
1855
|
return {"workflows": out}
|
|
1855
1856
|
|
|
1856
1857
|
|
|
1858
|
+
def _summarise_phases(phases: list) -> list[dict]:
|
|
1859
|
+
"""PR91c v3.37.0 — distil each phase down to what the flow stepper needs."""
|
|
1860
|
+
out: list[dict] = []
|
|
1861
|
+
for p in phases:
|
|
1862
|
+
if not isinstance(p, dict):
|
|
1863
|
+
continue
|
|
1864
|
+
gate = p.get("gate") if isinstance(p.get("gate"), dict) else {}
|
|
1865
|
+
agents = p.get("agents") if isinstance(p.get("agents"), list) else []
|
|
1866
|
+
out.append({
|
|
1867
|
+
"id": str(p.get("id") or ""),
|
|
1868
|
+
"name": str(p.get("name") or ""),
|
|
1869
|
+
"description": str(p.get("description") or ""),
|
|
1870
|
+
"gate_type": str(gate.get("type") or ""),
|
|
1871
|
+
"agent_count": sum(
|
|
1872
|
+
1 for a in agents if isinstance(a, dict) and a.get("agent_id")
|
|
1873
|
+
),
|
|
1874
|
+
})
|
|
1875
|
+
return out
|
|
1876
|
+
|
|
1877
|
+
|
|
1857
1878
|
# --- Sidebar stats widget (PR87d v3.22.0) ---
|
|
1858
1879
|
|
|
1859
1880
|
@app.get("/api/sidebar-stats")
|