@mstar-harness/dsh 2.1.1
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/README.i18n.yaml +7 -0
- package/README.md +448 -0
- package/README.zh.md +221 -0
- package/bundle/README.md +312 -0
- package/bundle/cordis.patch.yml +17 -0
- package/dist/client/index.d.ts +14 -0
- package/dist/client/panel/PanelView.d.ts +67 -0
- package/dist/client/panel/TabNav.d.ts +28 -0
- package/dist/client/panel/graph/event-log.d.ts +76 -0
- package/dist/client/panel/graph/project-graph.d.ts +499 -0
- package/dist/client/panel/graph/schema.d.ts +224 -0
- package/dist/client/panel/guards.d.ts +12 -0
- package/dist/client/panel/locale.d.ts +134 -0
- package/dist/client/panel/pages/AgentCanvasPage.d.ts +363 -0
- package/dist/client/panel/pages/EventLogPage.d.ts +48 -0
- package/dist/client/panel/pages/IterationInfoSection.d.ts +80 -0
- package/dist/client/panel/pages/IterationTaskPage.d.ts +37 -0
- package/dist/client/panel/panel-meta.d.ts +18 -0
- package/dist/client/panel/plan-sort.d.ts +54 -0
- package/dist/client/panel/sidebar.d.ts +17 -0
- package/dist/client/panel/state-section.d.ts +23 -0
- package/dist/client/panel/use-mstar-engine-status.d.ts +42 -0
- package/dist/client/panel/zones/Legend.d.ts +18 -0
- package/dist/client/panel/zones/TaskBoard.d.ts +40 -0
- package/dist/client.d.ts +1 -0
- package/dist/client.js +4486 -0
- package/dist/gates/_shared.d.ts +198 -0
- package/dist/gates/adapter.d.ts +131 -0
- package/dist/gates/agent-flow.d.ts +320 -0
- package/dist/gates/catalog.d.ts +118 -0
- package/dist/gates/dispatch.d.ts +152 -0
- package/dist/gates/seams.d.ts +152 -0
- package/dist/gates/skill-lint.d.ts +87 -0
- package/dist/gates/status.d.ts +81 -0
- package/dist/gates/tools.d.ts +37 -0
- package/dist/index.d.ts +107 -0
- package/dist/index.js +5748 -0
- package/dist/invariant.d.ts +15 -0
- package/dist/invariant.js +29 -0
- package/dist/service.d.ts +96 -0
- package/dist/types.d.ts +241 -0
- package/harness-commands/codebase-audit.md +40 -0
- package/harness-commands/iteration-drive.md +129 -0
- package/harness-commands/iteration-loop.md +139 -0
- package/harness-commands/iteration-start.md +179 -0
- package/harness-skills/grill-me/SKILL.md +10 -0
- package/harness-skills/mstar-audit/SKILL.md +183 -0
- package/harness-skills/mstar-audit/references/audit-playbook.md +130 -0
- package/harness-skills/mstar-audit/references/finding-format.md +65 -0
- package/harness-skills/mstar-branch-worktree/SKILL.md +219 -0
- package/harness-skills/mstar-branch-worktree/references/parallel-writable-pre-dispatch.md +68 -0
- package/harness-skills/mstar-coding-behavior/SKILL.md +147 -0
- package/harness-skills/mstar-compound/SKILL.md +105 -0
- package/harness-skills/mstar-compound/assets/resolution-template.md +94 -0
- package/harness-skills/mstar-compound/references/category-mapping.md +37 -0
- package/harness-skills/mstar-compound/references/compound-workflow.md +155 -0
- package/harness-skills/mstar-compound/references/concepts-vocabulary.md +44 -0
- package/harness-skills/mstar-compound/references/schema.yaml +122 -0
- package/harness-skills/mstar-compound-refresh/SKILL.md +140 -0
- package/harness-skills/mstar-compound-refresh/references/project-knowledge-bootstrap.md +164 -0
- package/harness-skills/mstar-design-md/SKILL.md +142 -0
- package/harness-skills/mstar-design-md/references/completeness-checklist.md +181 -0
- package/harness-skills/mstar-design-md/references/design-md-spec.md +508 -0
- package/harness-skills/mstar-design-md/references/vercel-example.md +200 -0
- package/harness-skills/mstar-design-md/templates/DESIGN.dark.md.template +354 -0
- package/harness-skills/mstar-design-md/templates/DESIGN.md.template +474 -0
- package/harness-skills/mstar-dispatch-gates/SKILL.md +128 -0
- package/harness-skills/mstar-dispatch-gates/references/leaf-executor-checklist.md +23 -0
- package/harness-skills/mstar-harness-core/SKILL.md +180 -0
- package/harness-skills/mstar-host/SKILL.md +78 -0
- package/harness-skills/mstar-host/references/_shared/host-role-binding-core.md +51 -0
- package/harness-skills/mstar-host/references/_shared/plan-mode-bridge-core.md +91 -0
- package/harness-skills/mstar-host/references/codex.md +61 -0
- package/harness-skills/mstar-host/references/cursor-plan-mode-bridge.md +159 -0
- package/harness-skills/mstar-host/references/cursor.md +183 -0
- package/harness-skills/mstar-host/references/dsh.md +502 -0
- package/harness-skills/mstar-host/references/kimi-plan-mode-bridge.md +36 -0
- package/harness-skills/mstar-host/references/kimi.md +136 -0
- package/harness-skills/mstar-host/references/omp-plan-mode-bridge.md +32 -0
- package/harness-skills/mstar-host/references/omp.md +244 -0
- package/harness-skills/mstar-host/references/opencode.md +76 -0
- package/harness-skills/mstar-host/references/parallel-dispatch.md +68 -0
- package/harness-skills/mstar-host/references/zcode-plan-mode-bridge.md +36 -0
- package/harness-skills/mstar-host/references/zcode.md +129 -0
- package/harness-skills/mstar-iteration/SKILL.md +393 -0
- package/harness-skills/mstar-iteration/references/autonomous-direction-lock.md +90 -0
- package/harness-skills/mstar-iteration/references/iteration-artifact-boundaries.md +103 -0
- package/harness-skills/mstar-iteration/references/iteration-compass-template.md +142 -0
- package/harness-skills/mstar-iteration/references/iteration-corpus-hygiene.md +45 -0
- package/harness-skills/mstar-iteration/references/iteration-workspace-readme-template.md +27 -0
- package/harness-skills/mstar-iteration/references/phase-2-worktree-lease.md +193 -0
- package/harness-skills/mstar-iteration/references/phase-3-iteration-close.md +95 -0
- package/harness-skills/mstar-iteration/references/phase-4-5-pr-delivery.md +84 -0
- package/harness-skills/mstar-iteration/references/phase5-helper-discovery.md +24 -0
- package/harness-skills/mstar-phase-gates/SKILL.md +112 -0
- package/harness-skills/mstar-plan-artifacts/SKILL.md +46 -0
- package/harness-skills/mstar-plan-artifacts/references/done-compaction.md +88 -0
- package/harness-skills/mstar-plan-artifacts/references/knowledge-and-designs.md +100 -0
- package/harness-skills/mstar-plan-artifacts/references/plan-files-and-reports.md +99 -0
- package/harness-skills/mstar-plan-artifacts/references/plan-quality-bar.md +99 -0
- package/harness-skills/mstar-plan-artifacts/references/status-and-residuals.md +570 -0
- package/harness-skills/mstar-plan-artifacts/templates/README.md +9 -0
- package/harness-skills/mstar-plan-artifacts/templates/notes.empty.json +5 -0
- package/harness-skills/mstar-plan-artifacts/templates/plan.main.md +54 -0
- package/harness-skills/mstar-plan-artifacts/templates/plans-done.empty.json +3 -0
- package/harness-skills/mstar-plan-artifacts/templates/status.empty.json +7 -0
- package/harness-skills/mstar-plan-conventions/SKILL.md +165 -0
- package/harness-skills/mstar-plan-conventions/references/artifact-storage-paths.md +50 -0
- package/harness-skills/mstar-plan-conventions/references/effort-estimation.md +38 -0
- package/harness-skills/mstar-plan-conventions/references/harness-bootstrap-and-agents-layering.md +93 -0
- package/harness-skills/mstar-review-qc/SKILL.md +60 -0
- package/harness-skills/mstar-review-qc/references/review-responsibility-boundaries.md +54 -0
- package/harness-skills/mstar-roles/SKILL.md +86 -0
- package/harness-skills/mstar-roles/references/_shared/leaf-executor-core.md +46 -0
- package/harness-skills/mstar-roles/references/architect.md +114 -0
- package/harness-skills/mstar-roles/references/code-reviewer.md +109 -0
- package/harness-skills/mstar-roles/references/frontend-dev.md +70 -0
- package/harness-skills/mstar-roles/references/fullstack-dev-shared.md +89 -0
- package/harness-skills/mstar-roles/references/ops-engineer.md +78 -0
- package/harness-skills/mstar-roles/references/product-manager.md +107 -0
- package/harness-skills/mstar-roles/references/project-manager/dispatch-and-assignment.md +198 -0
- package/harness-skills/mstar-roles/references/project-manager/plan-management.md +61 -0
- package/harness-skills/mstar-roles/references/project-manager/qa-trigger-matrix.md +56 -0
- package/harness-skills/mstar-roles/references/project-manager/qc-and-residuals.md +98 -0
- package/harness-skills/mstar-roles/references/project-manager/routing-and-dev-allocation.md +99 -0
- package/harness-skills/mstar-roles/references/project-manager.md +310 -0
- package/harness-skills/mstar-roles/references/prompt-engineer.md +71 -0
- package/harness-skills/mstar-roles/references/qa-engineer/acceptance-gate.md +62 -0
- package/harness-skills/mstar-roles/references/qa-engineer.md +79 -0
- package/harness-skills/mstar-roles/references/qc-specialist/deep-review-lenses.md +95 -0
- package/harness-skills/mstar-roles/references/qc-specialist/report-template.md +72 -0
- package/harness-skills/mstar-roles/references/qc-specialist/reviewer-checklist.md +44 -0
- package/harness-skills/mstar-roles/references/qc-specialist/reviewer-workflow.md +57 -0
- package/harness-skills/mstar-roles/references/qc-specialist-shared.md +128 -0
- package/harness-skills/mstar-roles/references/writing-specialist.md +59 -0
- package/harness-skills/mstar-sdd/SKILL.md +133 -0
- package/harness-skills/mstar-sdd/references/file-handoffs.md +83 -0
- package/harness-skills/mstar-sdd/references/implementer-continuation-prompt.md +44 -0
- package/harness-skills/mstar-sdd/references/implementer-prompt.md +56 -0
- package/harness-skills/mstar-sdd/references/sticky-implementer-session.md +103 -0
- package/harness-skills/mstar-sdd/references/task-reviewer-prompt.md +53 -0
- package/harness-skills/mstar-skill-authoring/SKILL.md +162 -0
- package/harness-skills/mstar-skill-authoring/references/skillsbench-authoring.md +117 -0
- package/harness-skills/mstar-strategy/SKILL.md +130 -0
- package/harness-skills/pm/SKILL.md +40 -0
- package/package.json +92 -0
package/dist/client.js
ADDED
|
@@ -0,0 +1,4486 @@
|
|
|
1
|
+
window.__ModuleLoader__.load({ id: "@mstar-harness/dsh", factory: (require) => {
|
|
2
|
+
var module = { exports: {} }; var exports = module.exports;
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
10
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
11
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
12
|
+
for (let key of __getOwnPropNames(mod))
|
|
13
|
+
if (!__hasOwnProp.call(to, key))
|
|
14
|
+
__defProp(to, key, {
|
|
15
|
+
get: () => mod[key],
|
|
16
|
+
enumerable: true
|
|
17
|
+
});
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __moduleCache = /* @__PURE__ */ new WeakMap;
|
|
21
|
+
var __toCommonJS = (from) => {
|
|
22
|
+
var entry = __moduleCache.get(from), desc;
|
|
23
|
+
if (entry)
|
|
24
|
+
return entry;
|
|
25
|
+
entry = __defProp({}, "__esModule", { value: true });
|
|
26
|
+
if (from && typeof from === "object" || typeof from === "function")
|
|
27
|
+
__getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
|
|
28
|
+
get: () => from[key],
|
|
29
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
30
|
+
}));
|
|
31
|
+
__moduleCache.set(from, entry);
|
|
32
|
+
return entry;
|
|
33
|
+
};
|
|
34
|
+
var __export = (target, all) => {
|
|
35
|
+
for (var name in all)
|
|
36
|
+
__defProp(target, name, {
|
|
37
|
+
get: all[name],
|
|
38
|
+
enumerable: true,
|
|
39
|
+
configurable: true,
|
|
40
|
+
set: (newValue) => all[name] = () => newValue
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
// src/client/index.ts
|
|
45
|
+
var exports_client = {};
|
|
46
|
+
__export(exports_client, {
|
|
47
|
+
inject: () => inject,
|
|
48
|
+
apply: () => apply
|
|
49
|
+
});
|
|
50
|
+
module.exports = __toCommonJS(exports_client);
|
|
51
|
+
|
|
52
|
+
// src/client/panel/locale.ts
|
|
53
|
+
var NS = "mstar-panel";
|
|
54
|
+
var zh = {
|
|
55
|
+
"view.mstar-workflow": "MStar 工作流",
|
|
56
|
+
"tab.tasks": "任务迭代",
|
|
57
|
+
"tab.agents": "代理执行",
|
|
58
|
+
"tab.events": "事件记录",
|
|
59
|
+
"page.iteration.not-started": "迭代未启动",
|
|
60
|
+
"page.iteration.expand": "展开",
|
|
61
|
+
"page.iteration.collapse": "收拢",
|
|
62
|
+
"event-log.section.events": "Agent 流转事件",
|
|
63
|
+
"event-log.section.violations": "违规记录",
|
|
64
|
+
"event-log.empty": "暂无记录",
|
|
65
|
+
"event-log.empty.events": "暂无流转事件",
|
|
66
|
+
"event-log.empty.violations": "暂无违规记录",
|
|
67
|
+
"event-log.field.role": "执行角色",
|
|
68
|
+
"event-log.field.agent": "Agent(会话)",
|
|
69
|
+
"event-log.field.stage": "阶段",
|
|
70
|
+
"event-log.field.plan": "计划",
|
|
71
|
+
"event-log.field.task": "任务",
|
|
72
|
+
"event-log.field.category": "任务类别",
|
|
73
|
+
"event-log.field.time": "时间",
|
|
74
|
+
"event-log.field.kind": "类型",
|
|
75
|
+
"event-log.field.status": "状态",
|
|
76
|
+
"event-log.field.expected": "预期角色",
|
|
77
|
+
"event-log.field.settled": "已结算",
|
|
78
|
+
"event-log.field.duration": "耗时",
|
|
79
|
+
"event-log.field.severity": "严重度",
|
|
80
|
+
"event-log.field.code": "代码",
|
|
81
|
+
"event-log.field.message": "信息",
|
|
82
|
+
"event-log.kind.dispatch": "派发",
|
|
83
|
+
"event-log.kind.settle": "结算",
|
|
84
|
+
"event-log.yes": "是",
|
|
85
|
+
"event-log.no": "否",
|
|
86
|
+
"empty.waiting": "等待首条 engine-status catalog…",
|
|
87
|
+
"empty.no-harness": "未检测到 Morning Star harness",
|
|
88
|
+
"empty.no-harness-hint": "当前工作区未发现 .mstar/ harness 目录,详细面板保持未激活;检测到 harness 后自动呈现",
|
|
89
|
+
"watermark.version": "mstar {version}",
|
|
90
|
+
"watermark.harness": "harness: {dir}",
|
|
91
|
+
"watermark.none": "无",
|
|
92
|
+
"panel.unknown": "未知",
|
|
93
|
+
"graph.pass": "PASS",
|
|
94
|
+
"graph.fail": "FAIL",
|
|
95
|
+
"zone.legend.title": "图例",
|
|
96
|
+
"zone.legend.agent-running": "执行中实体(发光)",
|
|
97
|
+
"zone.legend.agent-settled": "已完成实体(独立绿框 + ✓;off 阶段不显示)",
|
|
98
|
+
"zone.legend.agent-idle": "未工作实体(虚线)",
|
|
99
|
+
"zone.iteration.step-label": "{n}/{total}",
|
|
100
|
+
"zone.iteration.step-badge": "{n}",
|
|
101
|
+
"zone.iteration.step.current": "当前",
|
|
102
|
+
"zone.iteration.step.next": "下一步",
|
|
103
|
+
"zone.iteration.step.done": "已完成",
|
|
104
|
+
"zone.iteration.step.idle": "待命",
|
|
105
|
+
"zone.phase.iteration-start": "迭代启动",
|
|
106
|
+
"zone.phase.autonomous-execute": "自主执行",
|
|
107
|
+
"zone.phase.iteration-close": "迭代收口",
|
|
108
|
+
"zone.phase.pr-delivery": "PR 交付",
|
|
109
|
+
"zone.phase.merge-ready": "合并就绪",
|
|
110
|
+
"zone.branches.title": "分支",
|
|
111
|
+
"zone.branches.iteration-base": "迭代 base",
|
|
112
|
+
"zone.branches.target": "目标分支",
|
|
113
|
+
"zone.branches.spec-integration": "spec 集成分支",
|
|
114
|
+
"zone.tasks.title": "任务",
|
|
115
|
+
"zone.tasks.total": "{count} 个计划",
|
|
116
|
+
"zone.tasks.no-plans": "暂无计划",
|
|
117
|
+
"zone.tasks.more": "+{count} 更多",
|
|
118
|
+
"zone.tasks.collapse": "收起",
|
|
119
|
+
"zone.state.Todo": "待办",
|
|
120
|
+
"zone.state.InProgress": "进行中",
|
|
121
|
+
"zone.state.InReview": "审查中",
|
|
122
|
+
"zone.state.Done": "已完成",
|
|
123
|
+
"zone.state.blocked-unknown": "受阻/未知",
|
|
124
|
+
"zone.agents.title": "代理执行",
|
|
125
|
+
"zone.agents.summary": "{executing} 执行中 · {pending} 待执行",
|
|
126
|
+
"zone.agents.on-demand": "按需执行",
|
|
127
|
+
"zone.agents.unknown-sub": "unknown / 未匹配角色",
|
|
128
|
+
"zone.agents.bucket.implementor": "implementor",
|
|
129
|
+
"zone.agents.bucket.reviewer": "sdd-reviewer",
|
|
130
|
+
"zone.agents.group.phase-1": "Phase 1 · 顺序完成(review-edit-chain)",
|
|
131
|
+
"zone.agents.group.phase-2": "Phase 2 · 循环迭代 plans",
|
|
132
|
+
"zone.agents.group.phase-n": "Phase {n}",
|
|
133
|
+
"zone.agents.group.plan": "plan: {plan}",
|
|
134
|
+
"zone.agents.group.no-plan": "无进行中 plan",
|
|
135
|
+
"zone.agents.group.plan-more": "+{n} 更多",
|
|
136
|
+
"flow.empty": "暂无实际派发(记录自 agent-flow plan 合并起生效)",
|
|
137
|
+
"flow.settle-only": "仅有结算记录(无派发证据)",
|
|
138
|
+
"flow.degraded": "agentFlow 证据缺失",
|
|
139
|
+
"flow.unexpected": "未匹配角色",
|
|
140
|
+
"flow.in-flight": "已派发",
|
|
141
|
+
"flow.settled-ok": "已结算",
|
|
142
|
+
"flow.error": "出错",
|
|
143
|
+
"flow.advisory": "提示",
|
|
144
|
+
"flow.denied": "拒绝",
|
|
145
|
+
"state.title": "工作区状态",
|
|
146
|
+
"state.plans": "计划",
|
|
147
|
+
"state.residuals": "未决残留",
|
|
148
|
+
"state.policy": "策略",
|
|
149
|
+
"state.leases": "租约",
|
|
150
|
+
"state.knowledge": "知识",
|
|
151
|
+
"state.direction": "方向",
|
|
152
|
+
"state.none": "无",
|
|
153
|
+
"state.enforcement": "执行策略",
|
|
154
|
+
"state.enforcement.hard": "hard",
|
|
155
|
+
"state.enforcement.soft": "soft",
|
|
156
|
+
"state.plans.more": "+{count} 更多",
|
|
157
|
+
"state.residual.more": "+{count} 更多",
|
|
158
|
+
"state.policy.push": "push",
|
|
159
|
+
"state.policy.worktree": "worktree",
|
|
160
|
+
"state.policy.control-worktree": "control worktree",
|
|
161
|
+
"state.knowledge.docs": "{count} 篇文档",
|
|
162
|
+
"freshness.last-updated": "最后更新 {time}",
|
|
163
|
+
"freshness.refresh-note": "刷新跟随 catalog 重发(约 ≤1 分钟)"
|
|
164
|
+
};
|
|
165
|
+
var en = {
|
|
166
|
+
"view.mstar-workflow": "MStar Workflow",
|
|
167
|
+
"tab.tasks": "Task Iteration",
|
|
168
|
+
"tab.agents": "Agent Run",
|
|
169
|
+
"tab.events": "Event Log",
|
|
170
|
+
"page.iteration.not-started": "iteration not started",
|
|
171
|
+
"page.iteration.expand": "expand",
|
|
172
|
+
"page.iteration.collapse": "collapse",
|
|
173
|
+
"event-log.section.events": "Agent flow events",
|
|
174
|
+
"event-log.section.violations": "Violations",
|
|
175
|
+
"event-log.empty": "No records yet",
|
|
176
|
+
"event-log.empty.events": "No flow events yet",
|
|
177
|
+
"event-log.empty.violations": "No violations yet",
|
|
178
|
+
"event-log.field.role": "Role",
|
|
179
|
+
"event-log.field.agent": "Agent (session)",
|
|
180
|
+
"event-log.field.stage": "Stage",
|
|
181
|
+
"event-log.field.plan": "Plan",
|
|
182
|
+
"event-log.field.task": "Task",
|
|
183
|
+
"event-log.field.category": "Category",
|
|
184
|
+
"event-log.field.time": "Time",
|
|
185
|
+
"event-log.field.kind": "Kind",
|
|
186
|
+
"event-log.field.status": "Status",
|
|
187
|
+
"event-log.field.expected": "Expected role",
|
|
188
|
+
"event-log.field.settled": "Settled",
|
|
189
|
+
"event-log.field.duration": "Duration",
|
|
190
|
+
"event-log.field.severity": "Severity",
|
|
191
|
+
"event-log.field.code": "Code",
|
|
192
|
+
"event-log.field.message": "Message",
|
|
193
|
+
"event-log.kind.dispatch": "dispatch",
|
|
194
|
+
"event-log.kind.settle": "settle",
|
|
195
|
+
"event-log.yes": "yes",
|
|
196
|
+
"event-log.no": "no",
|
|
197
|
+
"empty.waiting": "Waiting for the first engine-status catalog…",
|
|
198
|
+
"empty.no-harness": "No Morning Star harness detected",
|
|
199
|
+
"empty.no-harness-hint": "No .mstar/ harness directory found in this workspace — the detail panel stays inactive and activates automatically once a harness is detected",
|
|
200
|
+
"watermark.version": "mstar {version}",
|
|
201
|
+
"watermark.harness": "harness: {dir}",
|
|
202
|
+
"watermark.none": "none",
|
|
203
|
+
"panel.unknown": "unknown",
|
|
204
|
+
"graph.pass": "PASS",
|
|
205
|
+
"graph.fail": "FAIL",
|
|
206
|
+
"zone.legend.title": "Legend",
|
|
207
|
+
"zone.legend.agent-running": "agent running (glow)",
|
|
208
|
+
"zone.legend.agent-settled": "settled agent (green done frame + ✓; off-tier roles show neither)",
|
|
209
|
+
"zone.legend.agent-idle": "idle agent (dashed)",
|
|
210
|
+
"zone.iteration.step-label": "{n}/{total}",
|
|
211
|
+
"zone.iteration.step-badge": "{n}",
|
|
212
|
+
"zone.iteration.step.current": "current",
|
|
213
|
+
"zone.iteration.step.next": "next",
|
|
214
|
+
"zone.iteration.step.done": "done",
|
|
215
|
+
"zone.iteration.step.idle": "idle",
|
|
216
|
+
"zone.phase.iteration-start": "Iteration Start",
|
|
217
|
+
"zone.phase.autonomous-execute": "Autonomous Execute",
|
|
218
|
+
"zone.phase.iteration-close": "Iteration Close",
|
|
219
|
+
"zone.phase.pr-delivery": "PR Delivery",
|
|
220
|
+
"zone.phase.merge-ready": "Merge Ready",
|
|
221
|
+
"zone.branches.title": "Branches",
|
|
222
|
+
"zone.branches.iteration-base": "iteration base",
|
|
223
|
+
"zone.branches.target": "target",
|
|
224
|
+
"zone.branches.spec-integration": "spec integration",
|
|
225
|
+
"zone.tasks.title": "Tasks",
|
|
226
|
+
"zone.tasks.total": "{count} plans",
|
|
227
|
+
"zone.tasks.no-plans": "no plans",
|
|
228
|
+
"zone.tasks.more": "+{count} more",
|
|
229
|
+
"zone.tasks.collapse": "collapse",
|
|
230
|
+
"zone.state.Todo": "Todo",
|
|
231
|
+
"zone.state.InProgress": "InProgress",
|
|
232
|
+
"zone.state.InReview": "InReview",
|
|
233
|
+
"zone.state.Done": "Done",
|
|
234
|
+
"zone.state.blocked-unknown": "Blocked / Unknown",
|
|
235
|
+
"zone.agents.title": "Agent Flow",
|
|
236
|
+
"zone.agents.summary": "{executing} executing · {pending} pending",
|
|
237
|
+
"zone.agents.on-demand": "On-demand",
|
|
238
|
+
"zone.agents.unknown-sub": "unknown / unmatched roles",
|
|
239
|
+
"zone.agents.bucket.implementor": "implementor",
|
|
240
|
+
"zone.agents.bucket.reviewer": "sdd-reviewer",
|
|
241
|
+
"zone.agents.group.phase-1": "Phase 1 · sequential (review-edit-chain)",
|
|
242
|
+
"zone.agents.group.phase-2": "Phase 2 · iterative plan loop",
|
|
243
|
+
"zone.agents.group.phase-n": "Phase {n}",
|
|
244
|
+
"zone.agents.group.plan": "plan: {plan}",
|
|
245
|
+
"zone.agents.group.no-plan": "no in-progress plan",
|
|
246
|
+
"zone.agents.group.plan-more": "+{n} more",
|
|
247
|
+
"flow.empty": "No actual dispatches yet (recording starts at agent-flow plan merge)",
|
|
248
|
+
"flow.settle-only": "Settle records only (no dispatch evidence)",
|
|
249
|
+
"flow.degraded": "No agent-flow evidence (ledger missing)",
|
|
250
|
+
"flow.unexpected": "Unexpected roles",
|
|
251
|
+
"flow.in-flight": "dispatched",
|
|
252
|
+
"flow.settled-ok": "settled ok",
|
|
253
|
+
"flow.error": "error",
|
|
254
|
+
"flow.advisory": "advisory",
|
|
255
|
+
"flow.denied": "denied",
|
|
256
|
+
"state.title": "Workspace state",
|
|
257
|
+
"state.plans": "Plans",
|
|
258
|
+
"state.residuals": "Open residuals",
|
|
259
|
+
"state.policy": "Policy",
|
|
260
|
+
"state.leases": "Leases",
|
|
261
|
+
"state.knowledge": "Knowledge",
|
|
262
|
+
"state.direction": "Direction",
|
|
263
|
+
"state.none": "none",
|
|
264
|
+
"state.enforcement": "enforcement",
|
|
265
|
+
"state.enforcement.hard": "hard",
|
|
266
|
+
"state.enforcement.soft": "soft",
|
|
267
|
+
"state.plans.more": "+{count} more",
|
|
268
|
+
"state.residual.more": "+{count} more",
|
|
269
|
+
"state.policy.push": "push",
|
|
270
|
+
"state.policy.worktree": "worktree",
|
|
271
|
+
"state.policy.control-worktree": "control worktree",
|
|
272
|
+
"state.knowledge.docs": "{count} docs",
|
|
273
|
+
"freshness.last-updated": "last updated {time}",
|
|
274
|
+
"freshness.refresh-note": "refreshes with catalog re-emission (≤~1 min)"
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
// src/client/panel/PanelView.tsx
|
|
278
|
+
var import_react3 = require("react");
|
|
279
|
+
|
|
280
|
+
// src/client/panel/panel.module.css
|
|
281
|
+
var css = `
|
|
282
|
+
|
|
283
|
+
.\\32 0fd0e45_root,
|
|
284
|
+
.f83e09fa_emptyRoot {
|
|
285
|
+
box-sizing: border-box;
|
|
286
|
+
color: var(--dsw-alias-label-primary);
|
|
287
|
+
background: var(--dsw-alias-bg-layer-1);
|
|
288
|
+
font: var(--dsw-font-xs-13);
|
|
289
|
+
line-height: 1.6;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
.\\32 0fd0e45_root {
|
|
294
|
+
--mstar-space-1: 4px;
|
|
295
|
+
--mstar-space-2: 8px;
|
|
296
|
+
--mstar-space-3: 12px;
|
|
297
|
+
--mstar-space-4: 16px;
|
|
298
|
+
--mstar-space-5: 24px;
|
|
299
|
+
--mstar-space-6: 32px;
|
|
300
|
+
display: grid;
|
|
301
|
+
grid-template-columns: minmax(0, 1fr) 300px;
|
|
302
|
+
grid-template-rows: minmax(0, 1fr);
|
|
303
|
+
grid-template-areas: 'main sidebar';
|
|
304
|
+
height: 100%;
|
|
305
|
+
min-height: 0;
|
|
306
|
+
width: 100%;
|
|
307
|
+
padding: 0;
|
|
308
|
+
|
|
309
|
+
padding-bottom: calc(var(--dsh-composer-height, 152px) + var(--mstar-space-3));
|
|
310
|
+
overflow: hidden;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
.\\32 0fd0e45_root[data-mstar-panel='no-harness'] {
|
|
315
|
+
grid-template-columns: 1fr;
|
|
316
|
+
grid-template-areas: 'main';
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
.\\35 8245a20_noHarnessCard {
|
|
321
|
+
flex: 1;
|
|
322
|
+
min-height: 0;
|
|
323
|
+
width: 100%;
|
|
324
|
+
max-width: 400px;
|
|
325
|
+
align-self: center;
|
|
326
|
+
display: flex;
|
|
327
|
+
flex-direction: column;
|
|
328
|
+
align-items: center;
|
|
329
|
+
justify-content: center;
|
|
330
|
+
gap: var(--mstar-space-2);
|
|
331
|
+
padding: var(--mstar-space-5);
|
|
332
|
+
border: 1px solid var(--dsw-alias-border-l1);
|
|
333
|
+
border-radius: 8px;
|
|
334
|
+
background: var(--dsw-alias-bg-layer-1);
|
|
335
|
+
text-align: center;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.ffb65da7_noHarnessIcon {
|
|
339
|
+
color: var(--dsw-alias-label-caption);
|
|
340
|
+
margin-bottom: var(--mstar-space-1);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.\\38 1e1817c_noHarnessTitle {
|
|
344
|
+
margin: 0;
|
|
345
|
+
max-width: 100%;
|
|
346
|
+
color: var(--dsw-alias-label-secondary);
|
|
347
|
+
font: var(--dsw-font-xxs-12);
|
|
348
|
+
font-weight: 600;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.a2289da7_noHarnessHint {
|
|
352
|
+
margin: 0;
|
|
353
|
+
max-width: 100%;
|
|
354
|
+
color: var(--dsw-alias-label-caption);
|
|
355
|
+
font: var(--dsw-font-xxxs-11);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
@media (max-width: 860px) {
|
|
359
|
+
.\\32 0fd0e45_root {
|
|
360
|
+
grid-template-columns: 1fr;
|
|
361
|
+
grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
|
|
362
|
+
grid-template-areas:
|
|
363
|
+
'main'
|
|
364
|
+
'sidebar';
|
|
365
|
+
}
|
|
366
|
+
.c87acfc7_sidebar {
|
|
367
|
+
border-left: 0;
|
|
368
|
+
border-top: 1px solid var(--dsw-alias-border-l1);
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.\\37 7aea5a6_iterationHeadSplit {
|
|
372
|
+
flex-direction: column;
|
|
373
|
+
}
|
|
374
|
+
.\\37 7aea5a6_iterationHeadSplit > .c3b8dcb0_iterationBranches {
|
|
375
|
+
flex: 0 1 auto;
|
|
376
|
+
max-width: none;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
.f83e09fa_emptyRoot {
|
|
382
|
+
display: flex;
|
|
383
|
+
align-items: center;
|
|
384
|
+
justify-content: center;
|
|
385
|
+
height: 100%;
|
|
386
|
+
min-height: 0;
|
|
387
|
+
width: 100%;
|
|
388
|
+
padding: var(--mstar-space-4);
|
|
389
|
+
overflow: hidden;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
.ea90e208_main {
|
|
395
|
+
grid-area: main;
|
|
396
|
+
display: flex;
|
|
397
|
+
flex-direction: column;
|
|
398
|
+
min-width: 0;
|
|
399
|
+
min-height: 0;
|
|
400
|
+
padding: var(--mstar-space-4);
|
|
401
|
+
overflow: hidden;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
.\\34 bb38bc9_tabNav {
|
|
407
|
+
display: flex;
|
|
408
|
+
flex: none;
|
|
409
|
+
gap: var(--mstar-space-1);
|
|
410
|
+
padding: 0;
|
|
411
|
+
margin: 0 0 var(--mstar-space-2);
|
|
412
|
+
border-bottom: 1px solid var(--dsw-alias-border-l1);
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
.\\39 8f72e4c_tab {
|
|
417
|
+
appearance: none;
|
|
418
|
+
border: 0;
|
|
419
|
+
background: none;
|
|
420
|
+
padding: var(--mstar-space-2) var(--mstar-space-3);
|
|
421
|
+
color: var(--dsw-alias-label-secondary);
|
|
422
|
+
font: var(--dsw-font-xxs-12);
|
|
423
|
+
cursor: pointer;
|
|
424
|
+
box-shadow: inset 0 -2px 0 0 transparent;
|
|
425
|
+
transition: color 150ms ease, box-shadow 150ms ease;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.\\39 8f72e4c_tab:hover {
|
|
429
|
+
color: var(--dsw-alias-label-primary);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
.\\35 9e199de_tabActive {
|
|
433
|
+
color: var(--dsw-alias-state-business-primary);
|
|
434
|
+
box-shadow: inset 0 -2px 0 0 var(--dsw-alias-state-business-primary);
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
.\\39 0bec3c2_content {
|
|
439
|
+
flex: 1;
|
|
440
|
+
min-height: 0;
|
|
441
|
+
display: flex;
|
|
442
|
+
flex-direction: column;
|
|
443
|
+
overflow: hidden;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
.\\33 b1c4147_iterationPage {
|
|
449
|
+
flex: 1;
|
|
450
|
+
min-height: 0;
|
|
451
|
+
display: flex;
|
|
452
|
+
flex-direction: column;
|
|
453
|
+
gap: var(--mstar-space-3);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
|
|
457
|
+
.\\38 a629a8e_iterationHead {
|
|
458
|
+
flex: none;
|
|
459
|
+
display: flex;
|
|
460
|
+
flex-direction: column;
|
|
461
|
+
gap: var(--mstar-space-2);
|
|
462
|
+
padding: var(--mstar-space-3);
|
|
463
|
+
border: 1px solid var(--dsw-alias-border-l1);
|
|
464
|
+
border-radius: 8px;
|
|
465
|
+
background: var(--dsw-alias-bg-layer-1);
|
|
466
|
+
color: var(--dsw-alias-label-secondary);
|
|
467
|
+
transition: border-color 150ms ease;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
.\\38 a629a8e_iterationHead:hover {
|
|
471
|
+
border-color: var(--dsw-alias-border-l2);
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
.\\38 a629a8e_iterationHead[data-iteration-head-active='true'] {
|
|
475
|
+
border-color: var(--dsw-alias-state-business-primary);
|
|
476
|
+
box-shadow: 0 0 0 1px var(--dsw-alias-state-business-primary);
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
.\\38 a629a8e_iterationHead[data-iteration-head-active='true']:hover {
|
|
480
|
+
border-color: var(--dsw-alias-state-business-primary);
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
.\\32 d1bee34_iterationSummary {
|
|
485
|
+
appearance: none;
|
|
486
|
+
border: 0;
|
|
487
|
+
background: none;
|
|
488
|
+
display: flex;
|
|
489
|
+
align-items: center;
|
|
490
|
+
flex-wrap: wrap;
|
|
491
|
+
gap: var(--mstar-space-2);
|
|
492
|
+
padding: 0;
|
|
493
|
+
margin: 0;
|
|
494
|
+
color: var(--dsw-alias-label-secondary);
|
|
495
|
+
font: var(--dsw-font-xxxs-11);
|
|
496
|
+
cursor: pointer;
|
|
497
|
+
text-align: left;
|
|
498
|
+
transition: color 150ms ease;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
.\\32 d1bee34_iterationSummary:hover {
|
|
502
|
+
color: var(--dsw-alias-label-primary);
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
.\\31 7162a99_iterationSummaryId {
|
|
506
|
+
overflow-wrap: anywhere;
|
|
507
|
+
color: var(--dsw-alias-label-primary);
|
|
508
|
+
font: var(--dsw-font-xxxs-11);
|
|
509
|
+
font-weight: 600;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
.d3d74135_iterationSummaryVerdict {
|
|
513
|
+
padding: 0 var(--mstar-space-2);
|
|
514
|
+
border: 1px solid var(--dsw-alias-border-l2);
|
|
515
|
+
border-radius: 999px;
|
|
516
|
+
color: var(--dsw-alias-label-caption);
|
|
517
|
+
font: var(--dsw-font-xxxs-11);
|
|
518
|
+
font-weight: 600;
|
|
519
|
+
letter-spacing: 0.03em;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
[data-iteration-head-verdict='pass'] {
|
|
523
|
+
border-color: var(--dsw-alias-state-success-primary);
|
|
524
|
+
color: var(--dsw-alias-state-success-primary);
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
[data-iteration-head-verdict='fail'] {
|
|
528
|
+
border-color: var(--dsw-alias-state-error-primary);
|
|
529
|
+
color: var(--dsw-alias-state-error-primary);
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
.d9a886be_iterationSummaryStatus {
|
|
533
|
+
color: var(--dsw-alias-state-business-primary);
|
|
534
|
+
font: var(--dsw-font-xxxs-11);
|
|
535
|
+
font-weight: 600;
|
|
536
|
+
letter-spacing: 0.03em;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
.\\31 3bf2f41_iterationSummaryStatusMuted {
|
|
540
|
+
color: var(--dsw-alias-label-caption);
|
|
541
|
+
font: var(--dsw-font-xxxs-11);
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
.ede5708d_iterationSummaryHint {
|
|
545
|
+
color: var(--dsw-alias-label-caption);
|
|
546
|
+
font: var(--dsw-font-xxxs-11);
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
.\\36 4d1da62_iterationHeadBody {
|
|
550
|
+
display: flex;
|
|
551
|
+
flex-direction: column;
|
|
552
|
+
gap: var(--mstar-space-2);
|
|
553
|
+
padding-top: var(--mstar-space-2);
|
|
554
|
+
border-top: 1px solid var(--dsw-alias-border-l1);
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
|
|
558
|
+
.\\37 7aea5a6_iterationHeadSplit {
|
|
559
|
+
display: flex;
|
|
560
|
+
align-items: stretch;
|
|
561
|
+
gap: var(--mstar-space-4);
|
|
562
|
+
min-width: 0;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
@media (min-width: 861px) {
|
|
566
|
+
|
|
567
|
+
.\\37 7aea5a6_iterationHeadSplit > .c3b8dcb0_iterationBranches {
|
|
568
|
+
flex: 0 1 260px;
|
|
569
|
+
max-width: 280px;
|
|
570
|
+
min-width: 0;
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
.\\37 7aea5a6_iterationHeadSplit > .c52f7b85_iterationStepsRow {
|
|
575
|
+
flex: 1 1 0;
|
|
576
|
+
min-width: 0;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
.c52f7b85_iterationStepsRow {
|
|
581
|
+
display: flex;
|
|
582
|
+
align-items: stretch;
|
|
583
|
+
gap: var(--mstar-space-3);
|
|
584
|
+
margin: 0;
|
|
585
|
+
padding: 0;
|
|
586
|
+
list-style: none;
|
|
587
|
+
overflow-x: auto;
|
|
588
|
+
overscroll-behavior: contain;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
.\\38 1013a9d_iterationStepItem {
|
|
592
|
+
flex: 1 1 0;
|
|
593
|
+
min-width: 0;
|
|
594
|
+
display: flex;
|
|
595
|
+
flex-direction: column;
|
|
596
|
+
align-items: center;
|
|
597
|
+
justify-content: center;
|
|
598
|
+
gap: var(--mstar-space-1);
|
|
599
|
+
text-align: center;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
.\\37 befde45_iterationStepBadge {
|
|
603
|
+
display: inline-flex;
|
|
604
|
+
align-items: center;
|
|
605
|
+
justify-content: center;
|
|
606
|
+
width: 22px;
|
|
607
|
+
height: 22px;
|
|
608
|
+
border: 1px solid var(--dsw-alias-border-l2);
|
|
609
|
+
border-radius: 999px;
|
|
610
|
+
color: var(--dsw-alias-label-secondary);
|
|
611
|
+
font: var(--dsw-font-xxxs-11);
|
|
612
|
+
font-weight: 600;
|
|
613
|
+
font-variant-numeric: tabular-nums;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
.d6cd23a5_iterationStepPhase {
|
|
617
|
+
overflow-wrap: anywhere;
|
|
618
|
+
color: var(--dsw-alias-label-secondary);
|
|
619
|
+
font: var(--dsw-font-xxxs-11);
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
.de293024_iterationStepChip {
|
|
624
|
+
display: inline-flex;
|
|
625
|
+
align-items: center;
|
|
626
|
+
padding: 0 var(--mstar-space-2);
|
|
627
|
+
border: 1px solid var(--dsw-alias-border-l1);
|
|
628
|
+
border-radius: 999px;
|
|
629
|
+
color: var(--dsw-alias-label-caption);
|
|
630
|
+
font: var(--dsw-font-xxxs-11);
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
[data-step-state='current'] .\\37 befde45_iterationStepBadge,
|
|
634
|
+
[data-step-state='current'] .de293024_iterationStepChip {
|
|
635
|
+
border-color: var(--dsw-alias-state-business-primary);
|
|
636
|
+
box-shadow: 0 0 0 1px var(--dsw-alias-state-business-primary);
|
|
637
|
+
color: var(--dsw-alias-state-business-primary);
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
[data-step-state='current'] .de293024_iterationStepChip {
|
|
641
|
+
font-weight: 600;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
[data-step-state='next'] .\\37 befde45_iterationStepBadge,
|
|
645
|
+
[data-step-state='next'] .de293024_iterationStepChip {
|
|
646
|
+
border: 1px dashed var(--dsw-alias-state-business-primary);
|
|
647
|
+
color: var(--dsw-alias-state-business-primary);
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
[data-step-state='idle'] .\\37 befde45_iterationStepBadge {
|
|
651
|
+
border-color: var(--dsw-alias-border-l1);
|
|
652
|
+
color: var(--dsw-alias-label-caption);
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
[data-step-state='done'] .\\37 befde45_iterationStepBadge {
|
|
657
|
+
border-color: var(--dsw-alias-state-success-primary);
|
|
658
|
+
color: var(--dsw-alias-state-success-primary);
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
[data-step-state='done'] .de293024_iterationStepChip {
|
|
662
|
+
color: var(--dsw-alias-label-secondary);
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
[data-step-state='done'] .de293024_iterationStepChip::before {
|
|
666
|
+
content: '✓';
|
|
667
|
+
margin-right: var(--mstar-space-1);
|
|
668
|
+
color: var(--dsw-alias-state-success-primary);
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
|
|
672
|
+
.afea5850_iterationVerdictSeat {
|
|
673
|
+
display: flex;
|
|
674
|
+
align-items: center;
|
|
675
|
+
justify-content: center;
|
|
676
|
+
height: 22px;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
|
|
680
|
+
.ebe6bbcd_iterationVerdict {
|
|
681
|
+
display: inline-flex;
|
|
682
|
+
align-items: center;
|
|
683
|
+
padding: 0 var(--mstar-space-2);
|
|
684
|
+
border: 1px solid var(--dsw-alias-border-l2);
|
|
685
|
+
border-radius: 999px;
|
|
686
|
+
color: var(--dsw-alias-label-caption);
|
|
687
|
+
font: var(--dsw-font-xxxs-11);
|
|
688
|
+
font-weight: 600;
|
|
689
|
+
letter-spacing: 0.03em;
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
[data-iteration-verdict='pass'] {
|
|
693
|
+
border-color: var(--dsw-alias-state-success-primary);
|
|
694
|
+
color: var(--dsw-alias-state-success-primary);
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
[data-iteration-verdict='fail'] {
|
|
698
|
+
border-color: var(--dsw-alias-state-error-primary);
|
|
699
|
+
color: var(--dsw-alias-state-error-primary);
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
.c3b8dcb0_iterationBranches {
|
|
704
|
+
display: flex;
|
|
705
|
+
flex-direction: column;
|
|
706
|
+
gap: var(--mstar-space-1);
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
.e6921da6_iterationBranchesTitle {
|
|
710
|
+
margin: 0;
|
|
711
|
+
color: var(--dsw-alias-label-secondary);
|
|
712
|
+
font: var(--dsw-font-xxs-12);
|
|
713
|
+
font-weight: 600;
|
|
714
|
+
letter-spacing: 0.03em;
|
|
715
|
+
text-transform: uppercase;
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
.\\38 a2cd65c_iterationBranchList {
|
|
719
|
+
display: flex;
|
|
720
|
+
flex-direction: column;
|
|
721
|
+
gap: var(--mstar-space-1);
|
|
722
|
+
margin: 0;
|
|
723
|
+
padding: 0;
|
|
724
|
+
list-style: none;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
.\\39 97b0230_iterationBranchRow {
|
|
728
|
+
display: flex;
|
|
729
|
+
align-items: baseline;
|
|
730
|
+
justify-content: space-between;
|
|
731
|
+
gap: var(--mstar-space-2);
|
|
732
|
+
min-width: 0;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
.\\36 cafc032_iterationBranchLabel {
|
|
736
|
+
color: var(--dsw-alias-label-caption);
|
|
737
|
+
font: var(--dsw-font-xxxs-11);
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
.cdcd06ed_iterationBranchValue {
|
|
741
|
+
overflow-wrap: anywhere;
|
|
742
|
+
color: var(--dsw-alias-label-secondary);
|
|
743
|
+
font: var(--dsw-font-xxxs-11);
|
|
744
|
+
font-weight: 600;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
|
|
748
|
+
.\\38 7f7efbe_iterationTasks {
|
|
749
|
+
flex: 1;
|
|
750
|
+
min-height: 0;
|
|
751
|
+
overflow-y: auto;
|
|
752
|
+
overscroll-behavior: contain;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
|
|
756
|
+
|
|
757
|
+
.c87acfc7_sidebar {
|
|
758
|
+
grid-area: sidebar;
|
|
759
|
+
display: flex;
|
|
760
|
+
flex-direction: column;
|
|
761
|
+
min-width: 0;
|
|
762
|
+
min-height: 0;
|
|
763
|
+
border-left: 1px solid var(--dsw-alias-border-l1);
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
|
|
767
|
+
.a0b80516_sidebarScroll {
|
|
768
|
+
flex: 1;
|
|
769
|
+
min-height: 0;
|
|
770
|
+
overflow-y: auto;
|
|
771
|
+
display: flex;
|
|
772
|
+
flex-direction: column;
|
|
773
|
+
gap: var(--mstar-space-4);
|
|
774
|
+
padding: var(--mstar-space-4);
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
|
|
778
|
+
|
|
779
|
+
.\\38 1fe4f58_meta {
|
|
780
|
+
display: flex;
|
|
781
|
+
flex-direction: column;
|
|
782
|
+
gap: var(--mstar-space-1);
|
|
783
|
+
flex: none;
|
|
784
|
+
padding: var(--mstar-space-3) var(--mstar-space-4);
|
|
785
|
+
border-top: 1px solid var(--dsw-alias-border-l1);
|
|
786
|
+
color: var(--dsw-alias-label-caption);
|
|
787
|
+
font: var(--dsw-font-xxxs-11);
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
.\\30 fc275e2_metaLine {
|
|
791
|
+
margin: 0;
|
|
792
|
+
min-width: 0;
|
|
793
|
+
overflow-wrap: anywhere;
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
|
|
797
|
+
|
|
798
|
+
.fcdd0ccc_section {
|
|
799
|
+
display: flex;
|
|
800
|
+
flex-direction: column;
|
|
801
|
+
gap: var(--mstar-space-2);
|
|
802
|
+
padding-top: var(--mstar-space-3);
|
|
803
|
+
border-top: 1px solid var(--dsw-alias-border-l1);
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
.aded23ea_sectionTitle {
|
|
807
|
+
margin: 0;
|
|
808
|
+
color: var(--dsw-alias-label-secondary);
|
|
809
|
+
font: var(--dsw-font-xxs-12);
|
|
810
|
+
font-weight: 600;
|
|
811
|
+
letter-spacing: 0.03em;
|
|
812
|
+
text-transform: uppercase;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
|
|
816
|
+
.b7190159_subTitle {
|
|
817
|
+
margin: var(--mstar-space-4) 0 0;
|
|
818
|
+
color: var(--dsw-alias-label-secondary);
|
|
819
|
+
font: var(--dsw-font-xxs-12);
|
|
820
|
+
font-weight: 600;
|
|
821
|
+
letter-spacing: 0.03em;
|
|
822
|
+
text-transform: uppercase;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
.\\32 6763614_defList {
|
|
826
|
+
display: grid;
|
|
827
|
+
grid-template-columns: max-content minmax(0, 1fr);
|
|
828
|
+
gap: var(--mstar-space-1) var(--mstar-space-3);
|
|
829
|
+
margin: 0;
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
.\\36 70df156_defTerm {
|
|
833
|
+
color: var(--dsw-alias-label-caption);
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
.\\33 f1b3a05_defValue {
|
|
837
|
+
margin: 0;
|
|
838
|
+
overflow-wrap: anywhere;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
.a129f16e_planList,
|
|
842
|
+
.\\31 13e0aa2_residualList,
|
|
843
|
+
.\\33 3dfcc85_leaseList,
|
|
844
|
+
.\\39 99efdc0_violationList {
|
|
845
|
+
display: flex;
|
|
846
|
+
flex-direction: column;
|
|
847
|
+
gap: var(--mstar-space-1);
|
|
848
|
+
margin: 0;
|
|
849
|
+
padding: 0;
|
|
850
|
+
list-style: none;
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
.\\37 44bf63f_planId,
|
|
854
|
+
.\\35 60663a6_leasePlan,
|
|
855
|
+
.a68a6d03_leaseHolder,
|
|
856
|
+
.db027b44_leaseWorktree,
|
|
857
|
+
.\\31 797fd51_findingSeverity,
|
|
858
|
+
.c80b7bb0_findingTitle,
|
|
859
|
+
.\\36 16667ad_findingPlan,
|
|
860
|
+
.e42c0bfd_violationCode,
|
|
861
|
+
.e2098247_knowledgeCategories {
|
|
862
|
+
display: inline-block;
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
.a3021d7c_planStatus {
|
|
866
|
+
display: inline-block;
|
|
867
|
+
margin-right: var(--mstar-space-2);
|
|
868
|
+
padding: 0 var(--mstar-space-2);
|
|
869
|
+
border: 1px solid var(--dsw-alias-border-l2);
|
|
870
|
+
border-radius: 999px;
|
|
871
|
+
color: var(--dsw-alias-label-secondary);
|
|
872
|
+
font: var(--dsw-font-xxxs-11);
|
|
873
|
+
transition: color 150ms ease, border-color 150ms ease;
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
.a3021d7c_planStatus:hover {
|
|
877
|
+
border-color: var(--dsw-alias-label-secondary);
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
.a3021d7c_planStatus[data-status='Done'] {
|
|
881
|
+
border-color: var(--dsw-alias-state-success-primary);
|
|
882
|
+
color: var(--dsw-alias-state-success-primary);
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
.a3021d7c_planStatus[data-status='InProgress'] {
|
|
886
|
+
border-color: var(--dsw-alias-state-business-primary);
|
|
887
|
+
color: var(--dsw-alias-state-business-primary);
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
.e42c0bfd_violationCode {
|
|
891
|
+
margin-right: var(--mstar-space-2);
|
|
892
|
+
color: var(--dsw-alias-state-warn-label);
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
.\\39 99efdc0_violationList [data-severity='critical'],
|
|
896
|
+
.\\39 99efdc0_violationList [data-severity='high'] {
|
|
897
|
+
color: var(--dsw-alias-state-error-primary);
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
|
|
901
|
+
.\\31 797fd51_findingSeverity {
|
|
902
|
+
margin-right: var(--mstar-space-2);
|
|
903
|
+
padding: 0 var(--mstar-space-2);
|
|
904
|
+
border: 1px solid var(--dsw-alias-border-l2);
|
|
905
|
+
border-radius: 999px;
|
|
906
|
+
color: var(--dsw-alias-label-secondary);
|
|
907
|
+
font: var(--dsw-font-xxxs-11);
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
.\\31 797fd51_findingSeverity[data-severity='critical'],
|
|
911
|
+
.\\31 797fd51_findingSeverity[data-severity='high'] {
|
|
912
|
+
border-color: var(--dsw-alias-state-error-primary);
|
|
913
|
+
color: var(--dsw-alias-state-error-primary);
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
.\\31 797fd51_findingSeverity[data-severity='medium'] {
|
|
917
|
+
border-color: var(--dsw-alias-state-warn-label);
|
|
918
|
+
color: var(--dsw-alias-state-warn-label);
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
.c80b7bb0_findingTitle {
|
|
922
|
+
margin-right: var(--mstar-space-2);
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
.\\36 16667ad_findingPlan {
|
|
926
|
+
color: var(--dsw-alias-label-caption);
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
|
|
930
|
+
.\\31 849d129_truncated {
|
|
931
|
+
margin: 0;
|
|
932
|
+
color: var(--dsw-alias-label-caption);
|
|
933
|
+
font: var(--dsw-font-xxxs-11);
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
.db027b44_leaseWorktree {
|
|
937
|
+
margin-left: var(--mstar-space-2);
|
|
938
|
+
color: var(--dsw-alias-label-caption);
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
.\\33 eb5feeb_knowledge {
|
|
942
|
+
display: flex;
|
|
943
|
+
flex-wrap: wrap;
|
|
944
|
+
gap: var(--mstar-space-1) var(--mstar-space-2);
|
|
945
|
+
margin: 0;
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
.e2098247_knowledgeCategories {
|
|
949
|
+
color: var(--dsw-alias-label-caption);
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
.df6dc76a_direction {
|
|
953
|
+
margin: 0;
|
|
954
|
+
overflow-wrap: anywhere;
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
.\\31 8a7beee_empty {
|
|
958
|
+
margin: 0;
|
|
959
|
+
color: var(--dsw-alias-label-caption);
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
.c75c59b0_freshness {
|
|
963
|
+
display: flex;
|
|
964
|
+
flex-wrap: wrap;
|
|
965
|
+
gap: var(--mstar-space-1) var(--mstar-space-3);
|
|
966
|
+
padding-top: var(--mstar-space-3);
|
|
967
|
+
border-top: 1px solid var(--dsw-alias-border-l1);
|
|
968
|
+
color: var(--dsw-alias-label-caption);
|
|
969
|
+
font: var(--dsw-font-xxxs-11);
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
|
|
973
|
+
@media (prefers-reduced-motion: reduce) {
|
|
974
|
+
* {
|
|
975
|
+
transition: none !important;
|
|
976
|
+
animation: none !important;
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
`;
|
|
980
|
+
var tagId = "@mstar-harness/dsh/panel.module.css";
|
|
981
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
982
|
+
const tag = document.createElement("style");
|
|
983
|
+
tag.dataset.plugin = "@mstar-harness/dsh";
|
|
984
|
+
tag.dataset.pluginCss = tagId;
|
|
985
|
+
tag.textContent = css;
|
|
986
|
+
document.head.appendChild(tag);
|
|
987
|
+
}
|
|
988
|
+
var panel_module_default = { root: "20fd0e45_root", emptyRoot: "f83e09fa_emptyRoot", noHarnessCard: "58245a20_noHarnessCard", noHarnessIcon: "ffb65da7_noHarnessIcon", noHarnessTitle: "81e1817c_noHarnessTitle", noHarnessHint: "a2289da7_noHarnessHint", sidebar: "c87acfc7_sidebar", iterationHeadSplit: "77aea5a6_iterationHeadSplit", iterationBranches: "c3b8dcb0_iterationBranches", main: "ea90e208_main", tabNav: "4bb38bc9_tabNav", tab: "98f72e4c_tab", tabActive: "59e199de_tabActive", content: "90bec3c2_content", iterationPage: "3b1c4147_iterationPage", iterationHead: "8a629a8e_iterationHead", iterationSummary: "2d1bee34_iterationSummary", iterationSummaryId: "17162a99_iterationSummaryId", iterationSummaryVerdict: "d3d74135_iterationSummaryVerdict", iterationSummaryStatus: "d9a886be_iterationSummaryStatus", iterationSummaryStatusMuted: "13bf2f41_iterationSummaryStatusMuted", iterationSummaryHint: "ede5708d_iterationSummaryHint", iterationHeadBody: "64d1da62_iterationHeadBody", iterationStepsRow: "c52f7b85_iterationStepsRow", iterationStepItem: "81013a9d_iterationStepItem", iterationStepBadge: "7befde45_iterationStepBadge", iterationStepPhase: "d6cd23a5_iterationStepPhase", iterationStepChip: "de293024_iterationStepChip", iterationVerdictSeat: "afea5850_iterationVerdictSeat", iterationVerdict: "ebe6bbcd_iterationVerdict", iterationBranchesTitle: "e6921da6_iterationBranchesTitle", iterationBranchList: "8a2cd65c_iterationBranchList", iterationBranchRow: "997b0230_iterationBranchRow", iterationBranchLabel: "6cafc032_iterationBranchLabel", iterationBranchValue: "cdcd06ed_iterationBranchValue", iterationTasks: "87f7efbe_iterationTasks", sidebarScroll: "a0b80516_sidebarScroll", meta: "81fe4f58_meta", metaLine: "0fc275e2_metaLine", section: "fcdd0ccc_section", sectionTitle: "aded23ea_sectionTitle", subTitle: "b7190159_subTitle", defList: "26763614_defList", defTerm: "670df156_defTerm", defValue: "3f1b3a05_defValue", planList: "a129f16e_planList", residualList: "113e0aa2_residualList", leaseList: "33dfcc85_leaseList", violationList: "999efdc0_violationList", planId: "744bf63f_planId", leasePlan: "560663a6_leasePlan", leaseHolder: "a68a6d03_leaseHolder", leaseWorktree: "db027b44_leaseWorktree", findingSeverity: "1797fd51_findingSeverity", findingTitle: "c80b7bb0_findingTitle", findingPlan: "616667ad_findingPlan", violationCode: "e42c0bfd_violationCode", knowledgeCategories: "e2098247_knowledgeCategories", planStatus: "a3021d7c_planStatus", truncated: "1849d129_truncated", knowledge: "3eb5feeb_knowledge", direction: "df6dc76a_direction", empty: "18a7beee_empty", freshness: "c75c59b0_freshness" };
|
|
989
|
+
|
|
990
|
+
// src/client/panel/guards.ts
|
|
991
|
+
function str(value) {
|
|
992
|
+
return typeof value === "string" && value.length > 0 ? value : null;
|
|
993
|
+
}
|
|
994
|
+
function bool(value) {
|
|
995
|
+
return typeof value === "boolean" ? value : null;
|
|
996
|
+
}
|
|
997
|
+
function count(value) {
|
|
998
|
+
return typeof value === "number" && Number.isFinite(value) ? value : null;
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
// src/client/panel/plan-sort.ts
|
|
1002
|
+
var PLAN_CAP = 5;
|
|
1003
|
+
var FINDINGS_CAP = 10;
|
|
1004
|
+
var DONE_AT_RE = /^\d{4}-\d{2}-\d{2}$/;
|
|
1005
|
+
var ID_DATE_RE = /^\d{8}/;
|
|
1006
|
+
function doneAtKey(doneAt) {
|
|
1007
|
+
if (typeof doneAt !== "string" || !DONE_AT_RE.test(doneAt))
|
|
1008
|
+
return "";
|
|
1009
|
+
return doneAt.replaceAll("-", "");
|
|
1010
|
+
}
|
|
1011
|
+
function idDateKey(id) {
|
|
1012
|
+
return ID_DATE_RE.test(id) ? id.slice(0, 8) : "";
|
|
1013
|
+
}
|
|
1014
|
+
function comparePlans(a, b) {
|
|
1015
|
+
const aDone = doneAtKey(a.doneAt);
|
|
1016
|
+
const bDone = doneAtKey(b.doneAt);
|
|
1017
|
+
if (aDone !== bDone)
|
|
1018
|
+
return aDone < bDone ? 1 : -1;
|
|
1019
|
+
const aDate = idDateKey(a.id);
|
|
1020
|
+
const bDate = idDateKey(b.id);
|
|
1021
|
+
if (aDate !== bDate)
|
|
1022
|
+
return aDate < bDate ? 1 : -1;
|
|
1023
|
+
return a.id < b.id ? 1 : a.id > b.id ? -1 : 0;
|
|
1024
|
+
}
|
|
1025
|
+
function sortPlans(plans) {
|
|
1026
|
+
return Array.from(plans).sort(comparePlans);
|
|
1027
|
+
}
|
|
1028
|
+
function comparePlansByIterationRecency(a, b) {
|
|
1029
|
+
const aDate = idDateKey(a.id);
|
|
1030
|
+
const bDate = idDateKey(b.id);
|
|
1031
|
+
if (aDate !== bDate)
|
|
1032
|
+
return aDate < bDate ? 1 : -1;
|
|
1033
|
+
const aDone = doneAtKey(a.doneAt);
|
|
1034
|
+
const bDone = doneAtKey(b.doneAt);
|
|
1035
|
+
if (aDone !== bDone)
|
|
1036
|
+
return aDone < bDone ? 1 : -1;
|
|
1037
|
+
return a.id < b.id ? 1 : a.id > b.id ? -1 : 0;
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
// src/client/panel/graph/schema.ts
|
|
1041
|
+
var PHASE_IDS = [
|
|
1042
|
+
"iteration-start",
|
|
1043
|
+
"autonomous-execute",
|
|
1044
|
+
"iteration-close",
|
|
1045
|
+
"pr-delivery",
|
|
1046
|
+
"merge-ready"
|
|
1047
|
+
];
|
|
1048
|
+
var PLAN_STATE_IDS = ["Todo", "InProgress", "InReview", "Done", "blocked-unknown"];
|
|
1049
|
+
var PHASE_EDGES = [
|
|
1050
|
+
{ source: "iteration-start", target: "autonomous-execute", kind: "forward" },
|
|
1051
|
+
{ source: "autonomous-execute", target: "iteration-close", kind: "forward" },
|
|
1052
|
+
{ source: "iteration-close", target: "pr-delivery", kind: "forward" },
|
|
1053
|
+
{ source: "pr-delivery", target: "merge-ready", kind: "forward" },
|
|
1054
|
+
{ source: "merge-ready", target: "iteration-start", kind: "loop" }
|
|
1055
|
+
];
|
|
1056
|
+
var TRANSITION_TO_PHASE = {
|
|
1057
|
+
"phase-2-execute": "autonomous-execute",
|
|
1058
|
+
"phase-3-close": "iteration-close",
|
|
1059
|
+
"phase-4-pr-delivery": "pr-delivery"
|
|
1060
|
+
};
|
|
1061
|
+
var EXPECTED_ROLE_FLOW = [
|
|
1062
|
+
{ phase: "iteration-start", stage: "review-edit-chain", roles: ["product-manager", "architect", "writing-specialist"] },
|
|
1063
|
+
{ phase: "autonomous-execute", stage: "sdd-implement", roles: ["fullstack-dev", "fullstack-dev-2", "frontend-dev", "code-reviewer"] },
|
|
1064
|
+
{ phase: "autonomous-execute", stage: "qc-tri", roles: ["qc-specialist", "qc-specialist-2", "qc-specialist-3"] },
|
|
1065
|
+
{ phase: "autonomous-execute", stage: "qa-gate", roles: ["qa-engineer"] }
|
|
1066
|
+
];
|
|
1067
|
+
var SDD_BUCKET_ROLES = {
|
|
1068
|
+
implementor: ["fullstack-dev", "fullstack-dev-2", "frontend-dev", "ops-engineer", "prompt-engineer"],
|
|
1069
|
+
reviewer: ["code-reviewer"]
|
|
1070
|
+
};
|
|
1071
|
+
var GENERAL_BUCKET = "general";
|
|
1072
|
+
var KNOWN_AGENTS = [
|
|
1073
|
+
{ id: "product-manager", stage: { phase: "iteration-start", stage: "review-edit-chain" } },
|
|
1074
|
+
{ id: "architect", stage: { phase: "iteration-start", stage: "review-edit-chain" } },
|
|
1075
|
+
{ id: "fullstack-dev", stage: { phase: "autonomous-execute", stage: "sdd-implement" } },
|
|
1076
|
+
{ id: "fullstack-dev-2", stage: { phase: "autonomous-execute", stage: "sdd-implement" } },
|
|
1077
|
+
{ id: "frontend-dev", stage: { phase: "autonomous-execute", stage: "sdd-implement" } },
|
|
1078
|
+
{ id: "code-reviewer", stage: { phase: "autonomous-execute", stage: "sdd-implement" } },
|
|
1079
|
+
{ id: "qa-engineer", stage: { phase: "autonomous-execute", stage: "qa-gate" } },
|
|
1080
|
+
{ id: "qc-specialist", stage: { phase: "autonomous-execute", stage: "qc-tri" } },
|
|
1081
|
+
{ id: "qc-specialist-2", stage: { phase: "autonomous-execute", stage: "qc-tri" } },
|
|
1082
|
+
{ id: "qc-specialist-3", stage: { phase: "autonomous-execute", stage: "qc-tri" } },
|
|
1083
|
+
{ id: "ops-engineer", stage: null, zone: "on-demand" },
|
|
1084
|
+
{ id: "writing-specialist", stage: { phase: "iteration-start", stage: "review-edit-chain" } },
|
|
1085
|
+
{ id: "prompt-engineer", stage: null, zone: "on-demand" },
|
|
1086
|
+
{ id: GENERAL_BUCKET, stage: null, zone: GENERAL_BUCKET }
|
|
1087
|
+
];
|
|
1088
|
+
|
|
1089
|
+
// src/client/panel/graph/project-graph.ts
|
|
1090
|
+
function emphasisOf(stage, currentStep) {
|
|
1091
|
+
if (currentStep === null)
|
|
1092
|
+
return null;
|
|
1093
|
+
if (stage === null)
|
|
1094
|
+
return "off";
|
|
1095
|
+
const currentPhase = PHASE_IDS[currentStep - 1];
|
|
1096
|
+
if (currentPhase === undefined)
|
|
1097
|
+
return null;
|
|
1098
|
+
const rank = PHASE_IDS.indexOf(stage.phase);
|
|
1099
|
+
const currentRank = PHASE_IDS.indexOf(currentPhase);
|
|
1100
|
+
if (rank < currentRank)
|
|
1101
|
+
return "off";
|
|
1102
|
+
if (rank === currentRank)
|
|
1103
|
+
return "current";
|
|
1104
|
+
return "next";
|
|
1105
|
+
}
|
|
1106
|
+
function idleStep(id, step) {
|
|
1107
|
+
return { id, step, state: "idle", verdict: "unknown" };
|
|
1108
|
+
}
|
|
1109
|
+
function iterationRefsOf(value) {
|
|
1110
|
+
return Array.isArray(value) ? value.filter((v) => typeof v === "string" && v !== "") : [];
|
|
1111
|
+
}
|
|
1112
|
+
function planRow(raw) {
|
|
1113
|
+
const row = raw;
|
|
1114
|
+
return {
|
|
1115
|
+
id: str(row?.id) ?? "",
|
|
1116
|
+
status: str(row?.status) ?? "",
|
|
1117
|
+
doneAt: str(row?.doneAt),
|
|
1118
|
+
iterationRefs: iterationRefsOf(row?.iterationRefs)
|
|
1119
|
+
};
|
|
1120
|
+
}
|
|
1121
|
+
function planBucket(status) {
|
|
1122
|
+
switch (status) {
|
|
1123
|
+
case "Todo":
|
|
1124
|
+
case "InProgress":
|
|
1125
|
+
case "InReview":
|
|
1126
|
+
case "Done":
|
|
1127
|
+
return status;
|
|
1128
|
+
default:
|
|
1129
|
+
return "blocked-unknown";
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
function violationRow(raw) {
|
|
1133
|
+
const row = raw;
|
|
1134
|
+
return {
|
|
1135
|
+
severity: str(row?.severity) ?? "",
|
|
1136
|
+
code: str(row?.code) ?? "",
|
|
1137
|
+
message: str(row?.message) ?? ""
|
|
1138
|
+
};
|
|
1139
|
+
}
|
|
1140
|
+
function stateRow(source) {
|
|
1141
|
+
const state = source == null ? null : source.state;
|
|
1142
|
+
if (state === null || typeof state !== "object")
|
|
1143
|
+
return null;
|
|
1144
|
+
return state;
|
|
1145
|
+
}
|
|
1146
|
+
function projectGraph(source) {
|
|
1147
|
+
const degraded = { iteration: false, state: false, plans: false };
|
|
1148
|
+
const steps = PHASE_IDS.map((id, i) => idleStep(id, i + 1));
|
|
1149
|
+
let active = false;
|
|
1150
|
+
let currentStep = null;
|
|
1151
|
+
let iterationId = null;
|
|
1152
|
+
let verdict = "unknown";
|
|
1153
|
+
let violationCount = null;
|
|
1154
|
+
let violations = [];
|
|
1155
|
+
let branches = null;
|
|
1156
|
+
const iteration = source == null ? null : source.iteration;
|
|
1157
|
+
if (iteration !== null && iteration !== undefined) {
|
|
1158
|
+
const row = iteration;
|
|
1159
|
+
iterationId = str(row.iterationId);
|
|
1160
|
+
const gate = row.gate;
|
|
1161
|
+
const transition = gate === null || typeof gate !== "object" ? null : str(gate.transition);
|
|
1162
|
+
const phaseId = transition === null || !Object.hasOwn(TRANSITION_TO_PHASE, transition) ? undefined : TRANSITION_TO_PHASE[transition];
|
|
1163
|
+
if (phaseId !== undefined) {
|
|
1164
|
+
active = true;
|
|
1165
|
+
if (row.compassStatus === "active" && transition === "phase-2-execute") {
|
|
1166
|
+
currentStep = 1;
|
|
1167
|
+
const current = steps[0];
|
|
1168
|
+
current.state = "current";
|
|
1169
|
+
current.verdict = "unknown";
|
|
1170
|
+
const forward = PHASE_EDGES.find((e) => e.source === "iteration-start" && e.kind === "forward");
|
|
1171
|
+
if (forward !== undefined)
|
|
1172
|
+
steps[PHASE_IDS.indexOf(forward.target)].state = "next";
|
|
1173
|
+
} else {
|
|
1174
|
+
const index = PHASE_IDS.indexOf(phaseId);
|
|
1175
|
+
currentStep = index + 1;
|
|
1176
|
+
const current = steps[index];
|
|
1177
|
+
current.state = "current";
|
|
1178
|
+
for (let i = 0;i < index; i++)
|
|
1179
|
+
steps[i].state = "done";
|
|
1180
|
+
const ok = gate === null || typeof gate !== "object" ? null : bool(gate.ok);
|
|
1181
|
+
current.verdict = ok === null ? "unknown" : ok ? "pass" : "fail";
|
|
1182
|
+
const rawViolations = gate !== null && typeof gate === "object" && Array.isArray(gate.violations) ? gate.violations : null;
|
|
1183
|
+
violationCount = rawViolations === null ? null : rawViolations.length;
|
|
1184
|
+
violations = rawViolations === null ? [] : rawViolations.map(violationRow);
|
|
1185
|
+
verdict = current.verdict;
|
|
1186
|
+
const forward = PHASE_EDGES.find((e) => e.source === phaseId && e.kind === "forward");
|
|
1187
|
+
if (forward !== undefined)
|
|
1188
|
+
steps[PHASE_IDS.indexOf(forward.target)].state = "next";
|
|
1189
|
+
}
|
|
1190
|
+
const state2 = stateRow(source);
|
|
1191
|
+
branches = {
|
|
1192
|
+
iterationBase: str(state2?.iterationBaseBranch),
|
|
1193
|
+
target: str(state2?.targetBranch),
|
|
1194
|
+
specIntegration: str(state2?.specIntegrationBranch)
|
|
1195
|
+
};
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
degraded.iteration = !active;
|
|
1199
|
+
const columns = PLAN_STATE_IDS.map((id) => ({ id, plans: [], count: 0, capped: null }));
|
|
1200
|
+
const doneRows = [];
|
|
1201
|
+
let total = 0;
|
|
1202
|
+
let truncated = false;
|
|
1203
|
+
const state = stateRow(source);
|
|
1204
|
+
if (state === null) {
|
|
1205
|
+
degraded.state = true;
|
|
1206
|
+
degraded.plans = true;
|
|
1207
|
+
} else {
|
|
1208
|
+
const plans = state.plans;
|
|
1209
|
+
if (!Array.isArray(plans)) {
|
|
1210
|
+
degraded.plans = true;
|
|
1211
|
+
} else {
|
|
1212
|
+
for (const raw of plans) {
|
|
1213
|
+
const row = planRow(raw);
|
|
1214
|
+
total += 1;
|
|
1215
|
+
const bucket = planBucket(row.status);
|
|
1216
|
+
const column = columns.find((c) => c.id === bucket);
|
|
1217
|
+
column.count += 1;
|
|
1218
|
+
if (bucket === "Done") {
|
|
1219
|
+
doneRows.push(row);
|
|
1220
|
+
} else {
|
|
1221
|
+
column.plans.push({ id: row.id, status: row.status });
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
const doneColumn = columns.find((c) => c.id === "Done");
|
|
1227
|
+
doneColumn.plans = sortPlans(doneRows).map((r) => ({ id: r.id, status: r.status }));
|
|
1228
|
+
for (const column of columns) {
|
|
1229
|
+
if (column.count > PLAN_CAP) {
|
|
1230
|
+
column.capped = PLAN_CAP;
|
|
1231
|
+
truncated = true;
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
const agents = projectAgents(source, currentStep);
|
|
1235
|
+
const flow = projectFlowEvents(source);
|
|
1236
|
+
return {
|
|
1237
|
+
iteration: {
|
|
1238
|
+
active,
|
|
1239
|
+
iterationId,
|
|
1240
|
+
steps,
|
|
1241
|
+
currentStep,
|
|
1242
|
+
branches,
|
|
1243
|
+
verdict,
|
|
1244
|
+
violationCount
|
|
1245
|
+
},
|
|
1246
|
+
tasks: { columns, total, truncated },
|
|
1247
|
+
agents,
|
|
1248
|
+
verdict,
|
|
1249
|
+
violations,
|
|
1250
|
+
events: flow.events,
|
|
1251
|
+
unexpected: flow.unexpected,
|
|
1252
|
+
degraded
|
|
1253
|
+
};
|
|
1254
|
+
}
|
|
1255
|
+
function bucketOf(role) {
|
|
1256
|
+
if (SDD_BUCKET_ROLES.implementor.includes(role))
|
|
1257
|
+
return "implementor";
|
|
1258
|
+
if (SDD_BUCKET_ROLES.reviewer.includes(role))
|
|
1259
|
+
return "reviewer";
|
|
1260
|
+
return null;
|
|
1261
|
+
}
|
|
1262
|
+
function sddImplementColumnId(stages) {
|
|
1263
|
+
const s = stages.find((x) => x.stage === "sdd-implement");
|
|
1264
|
+
return s === undefined ? null : s.id;
|
|
1265
|
+
}
|
|
1266
|
+
function superviseEdges(stages, entries) {
|
|
1267
|
+
const columnId = sddImplementColumnId(stages);
|
|
1268
|
+
if (columnId === null)
|
|
1269
|
+
return [];
|
|
1270
|
+
const evidenced = entries.some((e) => e.view.kind === "dispatch" && bucketOf(e.view.role) !== null);
|
|
1271
|
+
return [{
|
|
1272
|
+
kind: "supervise",
|
|
1273
|
+
source: `${columnId}:implementor`,
|
|
1274
|
+
target: `${columnId}:reviewer`,
|
|
1275
|
+
entityKey: null,
|
|
1276
|
+
evidenced
|
|
1277
|
+
}];
|
|
1278
|
+
}
|
|
1279
|
+
function entityKeyOf(role) {
|
|
1280
|
+
if (role !== "" && KNOWN_AGENTS.some((a) => a.id === role))
|
|
1281
|
+
return role;
|
|
1282
|
+
return GENERAL_BUCKET;
|
|
1283
|
+
}
|
|
1284
|
+
function roleZone(role, stage) {
|
|
1285
|
+
if (stage !== null)
|
|
1286
|
+
return "flow";
|
|
1287
|
+
const known = KNOWN_AGENTS.find((a) => a.id === role);
|
|
1288
|
+
return known === undefined ? GENERAL_BUCKET : known.zone ?? GENERAL_BUCKET;
|
|
1289
|
+
}
|
|
1290
|
+
function entityStatus(acc, pairStatus) {
|
|
1291
|
+
if (acc.verdict === "denied")
|
|
1292
|
+
return "denied";
|
|
1293
|
+
const paired = pairStatus.get(acc.latestIndex);
|
|
1294
|
+
return paired === "error" ? "error" : paired === undefined ? "running" : "settled";
|
|
1295
|
+
}
|
|
1296
|
+
function aggregateEntities(entries, pairStatus, currentStep) {
|
|
1297
|
+
const acc = new Map;
|
|
1298
|
+
for (let i = 0;i < entries.length; i++) {
|
|
1299
|
+
const v = entries[i].view;
|
|
1300
|
+
if (v.kind !== "dispatch")
|
|
1301
|
+
continue;
|
|
1302
|
+
const key = entityKeyOf(v.role);
|
|
1303
|
+
const role = key === GENERAL_BUCKET ? GENERAL_BUCKET : v.role;
|
|
1304
|
+
const task = v.planId === null ? null : v.taskId === null ? v.planId : `${v.planId}#${v.taskId}`;
|
|
1305
|
+
const cur = acc.get(key);
|
|
1306
|
+
if (cur === undefined) {
|
|
1307
|
+
acc.set(key, {
|
|
1308
|
+
key,
|
|
1309
|
+
agent: v.agent,
|
|
1310
|
+
name: v.agent ?? role,
|
|
1311
|
+
role,
|
|
1312
|
+
task,
|
|
1313
|
+
count: 1,
|
|
1314
|
+
ts: v.ts,
|
|
1315
|
+
stage: v.stage,
|
|
1316
|
+
zone: roleZone(role, v.stage),
|
|
1317
|
+
bucket: bucketOf(role),
|
|
1318
|
+
latestIndex: i,
|
|
1319
|
+
verdict: v.status
|
|
1320
|
+
});
|
|
1321
|
+
} else {
|
|
1322
|
+
cur.count += 1;
|
|
1323
|
+
if (v.ts > cur.ts || v.ts === cur.ts && i < cur.latestIndex) {
|
|
1324
|
+
cur.ts = v.ts;
|
|
1325
|
+
cur.latestIndex = i;
|
|
1326
|
+
cur.verdict = v.status;
|
|
1327
|
+
cur.agent = v.agent;
|
|
1328
|
+
cur.name = v.agent ?? role;
|
|
1329
|
+
cur.role = role;
|
|
1330
|
+
cur.task = task;
|
|
1331
|
+
cur.stage = v.stage;
|
|
1332
|
+
cur.zone = roleZone(role, v.stage);
|
|
1333
|
+
cur.bucket = bucketOf(role);
|
|
1334
|
+
}
|
|
1335
|
+
}
|
|
1336
|
+
}
|
|
1337
|
+
return Array.from(acc.values()).map((e) => ({
|
|
1338
|
+
key: e.key,
|
|
1339
|
+
agent: e.agent,
|
|
1340
|
+
name: e.name,
|
|
1341
|
+
role: e.role,
|
|
1342
|
+
task: e.task,
|
|
1343
|
+
count: e.count,
|
|
1344
|
+
ts: e.ts,
|
|
1345
|
+
stage: e.stage,
|
|
1346
|
+
zone: e.zone,
|
|
1347
|
+
bucket: e.bucket,
|
|
1348
|
+
emphasis: emphasisOf(e.stage, currentStep),
|
|
1349
|
+
status: entityStatus(e, pairStatus),
|
|
1350
|
+
idle: false
|
|
1351
|
+
}));
|
|
1352
|
+
}
|
|
1353
|
+
function actualEdges(entries) {
|
|
1354
|
+
const byPlan = new Map;
|
|
1355
|
+
entries.forEach((e, idx) => {
|
|
1356
|
+
const v = e.view;
|
|
1357
|
+
if (v.kind !== "dispatch")
|
|
1358
|
+
return;
|
|
1359
|
+
if (v.planId === null)
|
|
1360
|
+
return;
|
|
1361
|
+
const key = entityKeyOf(v.role);
|
|
1362
|
+
const list = byPlan.get(v.planId);
|
|
1363
|
+
if (list === undefined)
|
|
1364
|
+
byPlan.set(v.planId, [{ key, ts: v.ts, idx }]);
|
|
1365
|
+
else
|
|
1366
|
+
list.push({ key, ts: v.ts, idx });
|
|
1367
|
+
});
|
|
1368
|
+
const pairEdges = new Map;
|
|
1369
|
+
for (const planId of Array.from(byPlan.keys()).sort()) {
|
|
1370
|
+
const rows = byPlan.get(planId).slice().sort((a, b) => a.ts - b.ts || (a.key < b.key ? -1 : a.key > b.key ? 1 : 0) || a.idx - b.idx);
|
|
1371
|
+
for (let i = 0;i + 1 < rows.length; i++) {
|
|
1372
|
+
if (rows[i].key === rows[i + 1].key)
|
|
1373
|
+
continue;
|
|
1374
|
+
const a = rows[i].key;
|
|
1375
|
+
const b = rows[i + 1].key;
|
|
1376
|
+
if (a === GENERAL_BUCKET || b === GENERAL_BUCKET)
|
|
1377
|
+
continue;
|
|
1378
|
+
const pairKey = a < b ? `${a}|${b}` : `${b}|${a}`;
|
|
1379
|
+
pairEdges.set(pairKey, { kind: "actual", source: a, target: b, entityKey: null });
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
return Array.from(pairEdges.values());
|
|
1383
|
+
}
|
|
1384
|
+
function idleEntities(evidencedRoles, litKeys, currentStep) {
|
|
1385
|
+
const out = [];
|
|
1386
|
+
for (const known of KNOWN_AGENTS) {
|
|
1387
|
+
if (evidencedRoles.has(known.id))
|
|
1388
|
+
continue;
|
|
1389
|
+
if (litKeys.has(known.id))
|
|
1390
|
+
continue;
|
|
1391
|
+
const stage = known.stage ?? null;
|
|
1392
|
+
out.push({
|
|
1393
|
+
key: known.id,
|
|
1394
|
+
agent: null,
|
|
1395
|
+
name: known.displayName ?? known.id,
|
|
1396
|
+
role: known.id,
|
|
1397
|
+
task: null,
|
|
1398
|
+
status: "idle",
|
|
1399
|
+
idle: true,
|
|
1400
|
+
count: 0,
|
|
1401
|
+
ts: 0,
|
|
1402
|
+
stage,
|
|
1403
|
+
zone: idleZone(known),
|
|
1404
|
+
bucket: bucketOf(known.id),
|
|
1405
|
+
emphasis: emphasisOf(stage, currentStep)
|
|
1406
|
+
});
|
|
1407
|
+
}
|
|
1408
|
+
return out;
|
|
1409
|
+
}
|
|
1410
|
+
function idleZone(known) {
|
|
1411
|
+
if (known.stage !== null)
|
|
1412
|
+
return "flow";
|
|
1413
|
+
return known.zone ?? GENERAL_BUCKET;
|
|
1414
|
+
}
|
|
1415
|
+
function currentIterationIds(iterationId, plans) {
|
|
1416
|
+
if (iterationId !== null && iterationId !== "")
|
|
1417
|
+
return new Set([iterationId]);
|
|
1418
|
+
let latest;
|
|
1419
|
+
for (const plan of plans) {
|
|
1420
|
+
if (plan.iterationRefs.length === 0)
|
|
1421
|
+
continue;
|
|
1422
|
+
if (latest === undefined || comparePlansByIterationRecency(plan, latest) < 0)
|
|
1423
|
+
latest = plan;
|
|
1424
|
+
}
|
|
1425
|
+
return new Set(latest === undefined ? [] : latest.iterationRefs);
|
|
1426
|
+
}
|
|
1427
|
+
function isCurrentIterationDispatch(planId, planRefs, currentIds) {
|
|
1428
|
+
if (planId === null)
|
|
1429
|
+
return true;
|
|
1430
|
+
const refs = planRefs.get(planId);
|
|
1431
|
+
if (refs === undefined || refs.length === 0)
|
|
1432
|
+
return true;
|
|
1433
|
+
return refs.some((it) => currentIds.has(it));
|
|
1434
|
+
}
|
|
1435
|
+
function projectAgents(source, currentStep) {
|
|
1436
|
+
const stages = EXPECTED_ROLE_FLOW.map((s) => ({
|
|
1437
|
+
id: `${s.phase}:${s.stage}`,
|
|
1438
|
+
phase: s.phase,
|
|
1439
|
+
stage: s.stage,
|
|
1440
|
+
roles: s.roles,
|
|
1441
|
+
evidenced: false
|
|
1442
|
+
}));
|
|
1443
|
+
const state = source == null ? null : source.state;
|
|
1444
|
+
const agentFlow = state == null ? undefined : state.agentFlow;
|
|
1445
|
+
const rawAgentFlow = agentFlow;
|
|
1446
|
+
const rawEvents = rawAgentFlow === null || rawAgentFlow === undefined || typeof rawAgentFlow !== "object" ? null : rawAgentFlow.events;
|
|
1447
|
+
const rawPlans = state == null ? undefined : state.plans;
|
|
1448
|
+
const activePlans = Array.isArray(rawPlans) ? rawPlans.map((p) => ({ id: str(p?.id), status: str(p?.status) })).filter((p) => p.status === "InProgress" && p.id !== "").map((p) => p.id) : [];
|
|
1449
|
+
const activePlanId = activePlans[0] ?? null;
|
|
1450
|
+
const activePlanCount = activePlans.length;
|
|
1451
|
+
if (rawEvents === null || !Array.isArray(rawEvents)) {
|
|
1452
|
+
return {
|
|
1453
|
+
stages,
|
|
1454
|
+
degraded: true,
|
|
1455
|
+
empty: false,
|
|
1456
|
+
note: null,
|
|
1457
|
+
entities: idleEntities(new Set, new Set, currentStep),
|
|
1458
|
+
edges: superviseEdges(stages, []),
|
|
1459
|
+
executing: 0,
|
|
1460
|
+
pending: 0,
|
|
1461
|
+
activePlanId,
|
|
1462
|
+
activePlanCount
|
|
1463
|
+
};
|
|
1464
|
+
}
|
|
1465
|
+
const entries = classifyFlowRows(rawEvents);
|
|
1466
|
+
const empty = rawEvents.length === 0;
|
|
1467
|
+
const note = empty ? "empty" : entries.some((e) => e.view.kind === "dispatch") ? null : "settle-only";
|
|
1468
|
+
const iterationRow = source == null ? null : source.iteration;
|
|
1469
|
+
const iterationId = iterationRow === null || iterationRow === undefined ? null : str(iterationRow.iterationId);
|
|
1470
|
+
const planRows = Array.isArray(rawPlans) ? rawPlans.map(planRow) : [];
|
|
1471
|
+
const planRefs = new Map;
|
|
1472
|
+
for (const plan of planRows)
|
|
1473
|
+
planRefs.set(plan.id, plan.iterationRefs);
|
|
1474
|
+
const currentIds = currentIterationIds(iterationId, planRows);
|
|
1475
|
+
const filtered = entries.filter((e) => e.view.kind === "settle" || isCurrentIterationDispatch(e.view.planId, planRefs, currentIds));
|
|
1476
|
+
const evidenced = new Set;
|
|
1477
|
+
const evidencedRoles = new Set;
|
|
1478
|
+
for (const e of filtered) {
|
|
1479
|
+
if (e.view.kind !== "dispatch")
|
|
1480
|
+
continue;
|
|
1481
|
+
if (e.view.stage !== null)
|
|
1482
|
+
evidenced.add(`${e.view.stage.phase}:${e.view.stage.stage}`);
|
|
1483
|
+
if (e.view.role !== "")
|
|
1484
|
+
evidencedRoles.add(e.view.role);
|
|
1485
|
+
}
|
|
1486
|
+
for (const s of stages)
|
|
1487
|
+
s.evidenced = evidenced.has(s.id);
|
|
1488
|
+
const pairStatus = pairSettleStatus(filtered.map((e) => ({
|
|
1489
|
+
kind: e.view.kind,
|
|
1490
|
+
agent: e.view.agent,
|
|
1491
|
+
role: e.view.role,
|
|
1492
|
+
planId: e.view.planId,
|
|
1493
|
+
taskId: e.view.taskId,
|
|
1494
|
+
...e.view.paired === true ? { paired: true } : {},
|
|
1495
|
+
status: e.view.status
|
|
1496
|
+
})));
|
|
1497
|
+
const lit = aggregateEntities(filtered, pairStatus, currentStep);
|
|
1498
|
+
const litKeys = new Set(lit.map((e) => e.key));
|
|
1499
|
+
const entities = [...lit, ...idleEntities(evidencedRoles, litKeys, currentStep)];
|
|
1500
|
+
const edges = [
|
|
1501
|
+
...actualEdges(filtered),
|
|
1502
|
+
...superviseEdges(stages, entries)
|
|
1503
|
+
];
|
|
1504
|
+
const executing = entities.filter((e) => e.status === "running").length;
|
|
1505
|
+
const pending = stages.reduce((sum, s) => sum + (evidenced.has(s.id) ? 0 : s.roles.length), 0);
|
|
1506
|
+
return { stages, degraded: false, empty, note, entities, edges, executing, pending, activePlanId, activePlanCount };
|
|
1507
|
+
}
|
|
1508
|
+
var FLOW_EVENT_WINDOW = 50;
|
|
1509
|
+
function roleStageIndex() {
|
|
1510
|
+
const index = new Map;
|
|
1511
|
+
for (const stage of EXPECTED_ROLE_FLOW) {
|
|
1512
|
+
for (const role of stage.roles) {
|
|
1513
|
+
if (!index.has(role))
|
|
1514
|
+
index.set(role, { phase: stage.phase, stage: stage.stage });
|
|
1515
|
+
}
|
|
1516
|
+
}
|
|
1517
|
+
return index;
|
|
1518
|
+
}
|
|
1519
|
+
function dispatchStatus(verdict) {
|
|
1520
|
+
return verdict === "denied" ? "denied" : verdict === "advisory" ? "advisory" : "dispatched";
|
|
1521
|
+
}
|
|
1522
|
+
function settleStatus(outcome) {
|
|
1523
|
+
return outcome === "error" ? "error" : outcome === "denied" ? "denied" : "ok";
|
|
1524
|
+
}
|
|
1525
|
+
function flowEventOf(raw, index, stageIndex) {
|
|
1526
|
+
const row = raw;
|
|
1527
|
+
const kind = row?.kind;
|
|
1528
|
+
if (kind !== "dispatch" && kind !== "settle")
|
|
1529
|
+
return null;
|
|
1530
|
+
const role = str(row?.role) ?? "";
|
|
1531
|
+
const matched = stageIndex.get(role);
|
|
1532
|
+
const ts = count(row?.ts) ?? 0;
|
|
1533
|
+
return {
|
|
1534
|
+
id: `${ts}-${kind}-${index}`,
|
|
1535
|
+
ts,
|
|
1536
|
+
kind,
|
|
1537
|
+
role,
|
|
1538
|
+
planId: str(row?.planId),
|
|
1539
|
+
taskId: str(row?.taskId),
|
|
1540
|
+
taskCategory: str(row?.taskCategory),
|
|
1541
|
+
agent: str(row?.agent),
|
|
1542
|
+
status: kind === "dispatch" ? dispatchStatus(row?.verdict) : settleStatus(row?.outcome),
|
|
1543
|
+
expected: matched !== undefined,
|
|
1544
|
+
stage: matched ?? null,
|
|
1545
|
+
settled: false,
|
|
1546
|
+
...kind === "settle" && row?.paired === true ? { paired: true } : {},
|
|
1547
|
+
durationMs: count(row?.durationMs)
|
|
1548
|
+
};
|
|
1549
|
+
}
|
|
1550
|
+
function pairingKeyOf(row) {
|
|
1551
|
+
return [row.agent ?? "", row.role ?? "", row.planId ?? "", row.taskId ?? ""].join("\x00");
|
|
1552
|
+
}
|
|
1553
|
+
function pairSettleStatus(rows) {
|
|
1554
|
+
const record = new Map;
|
|
1555
|
+
const lastDispatch = new Map;
|
|
1556
|
+
for (let i = rows.length - 1;i >= 0; i--) {
|
|
1557
|
+
const entry = rows[i];
|
|
1558
|
+
if (entry.kind === "dispatch") {
|
|
1559
|
+
if (entry.agent !== null)
|
|
1560
|
+
lastDispatch.set(pairingKeyOf(entry), i);
|
|
1561
|
+
} else if (entry.paired === true && entry.agent !== null) {
|
|
1562
|
+
const paired = lastDispatch.get(pairingKeyOf(entry));
|
|
1563
|
+
if (paired !== undefined)
|
|
1564
|
+
record.set(paired, entry.status ?? "ok");
|
|
1565
|
+
}
|
|
1566
|
+
}
|
|
1567
|
+
return record;
|
|
1568
|
+
}
|
|
1569
|
+
function pairSettleIndexes(rows) {
|
|
1570
|
+
return new Set(pairSettleStatus(rows).keys());
|
|
1571
|
+
}
|
|
1572
|
+
function classifyFlowRows(rawEvents) {
|
|
1573
|
+
const stageIndex = roleStageIndex();
|
|
1574
|
+
const windowed = rawEvents.slice(0, FLOW_EVENT_WINDOW);
|
|
1575
|
+
const entries = [];
|
|
1576
|
+
windowed.forEach((raw, i) => {
|
|
1577
|
+
const view = flowEventOf(raw, i, stageIndex);
|
|
1578
|
+
if (view === null)
|
|
1579
|
+
return;
|
|
1580
|
+
entries.push({ view });
|
|
1581
|
+
});
|
|
1582
|
+
return entries;
|
|
1583
|
+
}
|
|
1584
|
+
function projectFlowEvents(source) {
|
|
1585
|
+
const state = source == null ? null : source.state;
|
|
1586
|
+
const agentFlow = state == null ? undefined : state.agentFlow;
|
|
1587
|
+
const rawAgentFlow = agentFlow;
|
|
1588
|
+
const rawEvents = rawAgentFlow === null || rawAgentFlow === undefined || typeof rawAgentFlow !== "object" ? null : rawAgentFlow.events;
|
|
1589
|
+
if (rawEvents === null || !Array.isArray(rawEvents)) {
|
|
1590
|
+
return { events: [], unexpected: [] };
|
|
1591
|
+
}
|
|
1592
|
+
const entries = classifyFlowRows(rawEvents);
|
|
1593
|
+
for (const i of pairSettleIndexes(entries.map((e) => ({
|
|
1594
|
+
kind: e.view.kind,
|
|
1595
|
+
agent: e.view.agent,
|
|
1596
|
+
role: e.view.role,
|
|
1597
|
+
planId: e.view.planId,
|
|
1598
|
+
taskId: e.view.taskId,
|
|
1599
|
+
...e.view.paired === true ? { paired: true } : {}
|
|
1600
|
+
})))) {
|
|
1601
|
+
entries[i].view.settled = true;
|
|
1602
|
+
}
|
|
1603
|
+
const events = entries.map((e) => e.view);
|
|
1604
|
+
const unexpected = entries.filter((e) => e.view.kind === "dispatch" && !e.view.expected).map((e) => e.view);
|
|
1605
|
+
return { events, unexpected };
|
|
1606
|
+
}
|
|
1607
|
+
|
|
1608
|
+
// src/client/panel/panel-meta.tsx
|
|
1609
|
+
var jsx_runtime = require("react/jsx-runtime");
|
|
1610
|
+
function PanelMeta({ t, source }) {
|
|
1611
|
+
return /* @__PURE__ */ jsx_runtime.jsxs("footer", {
|
|
1612
|
+
className: panel_module_default.meta,
|
|
1613
|
+
"data-mstar-meta": true,
|
|
1614
|
+
"data-mstar-watermark": true,
|
|
1615
|
+
children: [
|
|
1616
|
+
/* @__PURE__ */ jsx_runtime.jsx("p", {
|
|
1617
|
+
className: panel_module_default.metaLine,
|
|
1618
|
+
"data-mstar-meta-version": true,
|
|
1619
|
+
children: t("watermark.version", { version: str(source.version) ?? t("panel.unknown") })
|
|
1620
|
+
}),
|
|
1621
|
+
/* @__PURE__ */ jsx_runtime.jsx("p", {
|
|
1622
|
+
className: panel_module_default.metaLine,
|
|
1623
|
+
"data-mstar-meta-harness": true,
|
|
1624
|
+
children: t("watermark.harness", { dir: source.harnessDir ?? t("watermark.none") })
|
|
1625
|
+
})
|
|
1626
|
+
]
|
|
1627
|
+
});
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
// src/client/panel/state-section.tsx
|
|
1631
|
+
var jsx_runtime2 = require("react/jsx-runtime");
|
|
1632
|
+
function enforcementLabel(t, enforcement) {
|
|
1633
|
+
if (enforcement === null || enforcement === undefined || typeof enforcement !== "object") {
|
|
1634
|
+
return t("panel.unknown");
|
|
1635
|
+
}
|
|
1636
|
+
const hard = bool(enforcement.hard);
|
|
1637
|
+
const source = str(enforcement.source);
|
|
1638
|
+
const flag = hard === null ? t("panel.unknown") : hard ? t("state.enforcement.hard") : t("state.enforcement.soft");
|
|
1639
|
+
return source === null ? flag : `${flag} (${source})`;
|
|
1640
|
+
}
|
|
1641
|
+
function StateSection({ t, state, enforcement }) {
|
|
1642
|
+
const plans = Array.isArray(state?.plans) ? state.plans : [];
|
|
1643
|
+
const sortedPlans = sortPlans(plans);
|
|
1644
|
+
const visiblePlans = sortedPlans.slice(0, PLAN_CAP);
|
|
1645
|
+
const hiddenPlans = sortedPlans.length - visiblePlans.length;
|
|
1646
|
+
const findings = Array.isArray(state?.residualFindings) ? state.residualFindings : null;
|
|
1647
|
+
const visibleFindings = findings === null ? null : findings.slice(0, FINDINGS_CAP);
|
|
1648
|
+
const hiddenFindings = findings === null ? 0 : Math.max(0, findings.length - FINDINGS_CAP);
|
|
1649
|
+
const leases = Array.isArray(state?.leases) ? state.leases : [];
|
|
1650
|
+
const knowledge = state?.knowledge ?? null;
|
|
1651
|
+
return /* @__PURE__ */ jsx_runtime2.jsxs("section", {
|
|
1652
|
+
className: panel_module_default.section,
|
|
1653
|
+
"data-mstar-section": "state",
|
|
1654
|
+
children: [
|
|
1655
|
+
/* @__PURE__ */ jsx_runtime2.jsx("h2", {
|
|
1656
|
+
className: panel_module_default.sectionTitle,
|
|
1657
|
+
children: t("state.title")
|
|
1658
|
+
}),
|
|
1659
|
+
/* @__PURE__ */ jsx_runtime2.jsx("h3", {
|
|
1660
|
+
className: panel_module_default.subTitle,
|
|
1661
|
+
children: t("state.plans")
|
|
1662
|
+
}),
|
|
1663
|
+
visiblePlans.length === 0 ? /* @__PURE__ */ jsx_runtime2.jsx("p", {
|
|
1664
|
+
className: panel_module_default.empty,
|
|
1665
|
+
"data-mstar-empty": "no-plans",
|
|
1666
|
+
children: t("state.none")
|
|
1667
|
+
}) : /* @__PURE__ */ jsx_runtime2.jsx("ul", {
|
|
1668
|
+
className: panel_module_default.planList,
|
|
1669
|
+
children: visiblePlans.map((plan, i) => /* @__PURE__ */ jsx_runtime2.jsxs("li", {
|
|
1670
|
+
"data-plan-id": str(plan.id) ?? "unknown",
|
|
1671
|
+
"data-plan-status": str(plan.status) ?? "unknown",
|
|
1672
|
+
children: [
|
|
1673
|
+
/* @__PURE__ */ jsx_runtime2.jsx("span", {
|
|
1674
|
+
className: panel_module_default.planStatus,
|
|
1675
|
+
"data-status": str(plan.status) ?? "unknown",
|
|
1676
|
+
children: str(plan.status) ?? t("panel.unknown")
|
|
1677
|
+
}),
|
|
1678
|
+
/* @__PURE__ */ jsx_runtime2.jsx("span", {
|
|
1679
|
+
className: panel_module_default.planId,
|
|
1680
|
+
children: str(plan.id) ?? t("panel.unknown")
|
|
1681
|
+
})
|
|
1682
|
+
]
|
|
1683
|
+
}, str(plan.id) ?? `plan-${i}`))
|
|
1684
|
+
}),
|
|
1685
|
+
hiddenPlans > 0 ? /* @__PURE__ */ jsx_runtime2.jsx("p", {
|
|
1686
|
+
className: panel_module_default.truncated,
|
|
1687
|
+
"data-plan-truncated": true,
|
|
1688
|
+
children: t("state.plans.more", { count: String(hiddenPlans) })
|
|
1689
|
+
}) : null,
|
|
1690
|
+
/* @__PURE__ */ jsx_runtime2.jsx("h3", {
|
|
1691
|
+
className: panel_module_default.subTitle,
|
|
1692
|
+
children: t("state.residuals")
|
|
1693
|
+
}),
|
|
1694
|
+
visibleFindings === null || visibleFindings.length === 0 ? /* @__PURE__ */ jsx_runtime2.jsx("p", {
|
|
1695
|
+
className: panel_module_default.empty,
|
|
1696
|
+
"data-mstar-empty": "no-residuals",
|
|
1697
|
+
children: t("state.none")
|
|
1698
|
+
}) : /* @__PURE__ */ jsx_runtime2.jsx("ul", {
|
|
1699
|
+
className: panel_module_default.residualList,
|
|
1700
|
+
children: visibleFindings.map((finding, i) => /* @__PURE__ */ jsx_runtime2.jsxs("li", {
|
|
1701
|
+
"data-residual-finding": true,
|
|
1702
|
+
"data-residual-finding-id": str(finding.id) ?? "unknown",
|
|
1703
|
+
"data-residual-finding-severity": str(finding.severity) ?? "unknown",
|
|
1704
|
+
"data-residual-finding-plan": str(finding.planId) ?? "unknown",
|
|
1705
|
+
children: [
|
|
1706
|
+
/* @__PURE__ */ jsx_runtime2.jsx("span", {
|
|
1707
|
+
className: panel_module_default.findingSeverity,
|
|
1708
|
+
"data-severity": str(finding.severity) ?? "unknown",
|
|
1709
|
+
children: str(finding.severity) ?? t("panel.unknown")
|
|
1710
|
+
}),
|
|
1711
|
+
/* @__PURE__ */ jsx_runtime2.jsx("span", {
|
|
1712
|
+
className: panel_module_default.findingTitle,
|
|
1713
|
+
children: str(finding.title) ?? t("panel.unknown")
|
|
1714
|
+
}),
|
|
1715
|
+
str(finding.planId) !== null ? /* @__PURE__ */ jsx_runtime2.jsx("span", {
|
|
1716
|
+
className: panel_module_default.findingPlan,
|
|
1717
|
+
children: finding.planId
|
|
1718
|
+
}) : null
|
|
1719
|
+
]
|
|
1720
|
+
}, str(finding.id) ?? `finding-${i}`))
|
|
1721
|
+
}),
|
|
1722
|
+
hiddenFindings > 0 ? /* @__PURE__ */ jsx_runtime2.jsx("p", {
|
|
1723
|
+
className: panel_module_default.truncated,
|
|
1724
|
+
"data-residual-truncated": true,
|
|
1725
|
+
children: t("state.residual.more", { count: String(hiddenFindings) })
|
|
1726
|
+
}) : null,
|
|
1727
|
+
/* @__PURE__ */ jsx_runtime2.jsx("h3", {
|
|
1728
|
+
className: panel_module_default.subTitle,
|
|
1729
|
+
children: t("state.policy")
|
|
1730
|
+
}),
|
|
1731
|
+
/* @__PURE__ */ jsx_runtime2.jsxs("dl", {
|
|
1732
|
+
className: panel_module_default.defList,
|
|
1733
|
+
children: [
|
|
1734
|
+
/* @__PURE__ */ jsx_runtime2.jsx("dt", {
|
|
1735
|
+
className: panel_module_default.defTerm,
|
|
1736
|
+
children: t("state.enforcement")
|
|
1737
|
+
}),
|
|
1738
|
+
/* @__PURE__ */ jsx_runtime2.jsx("dd", {
|
|
1739
|
+
className: panel_module_default.defValue,
|
|
1740
|
+
"data-field": "enforcement",
|
|
1741
|
+
children: enforcementLabel(t, enforcement)
|
|
1742
|
+
}),
|
|
1743
|
+
/* @__PURE__ */ jsx_runtime2.jsx("dt", {
|
|
1744
|
+
className: panel_module_default.defTerm,
|
|
1745
|
+
children: t("state.policy.push")
|
|
1746
|
+
}),
|
|
1747
|
+
/* @__PURE__ */ jsx_runtime2.jsx("dd", {
|
|
1748
|
+
className: panel_module_default.defValue,
|
|
1749
|
+
"data-field": "push-policy",
|
|
1750
|
+
children: str(state?.pushPolicy) ?? t("state.none")
|
|
1751
|
+
}),
|
|
1752
|
+
/* @__PURE__ */ jsx_runtime2.jsx("dt", {
|
|
1753
|
+
className: panel_module_default.defTerm,
|
|
1754
|
+
children: t("state.policy.worktree")
|
|
1755
|
+
}),
|
|
1756
|
+
/* @__PURE__ */ jsx_runtime2.jsx("dd", {
|
|
1757
|
+
className: panel_module_default.defValue,
|
|
1758
|
+
"data-field": "worktree-mode",
|
|
1759
|
+
children: str(state?.worktreeMode) ?? t("state.none")
|
|
1760
|
+
}),
|
|
1761
|
+
/* @__PURE__ */ jsx_runtime2.jsx("dt", {
|
|
1762
|
+
className: panel_module_default.defTerm,
|
|
1763
|
+
children: t("state.policy.control-worktree")
|
|
1764
|
+
}),
|
|
1765
|
+
/* @__PURE__ */ jsx_runtime2.jsx("dd", {
|
|
1766
|
+
className: panel_module_default.defValue,
|
|
1767
|
+
"data-field": "control-worktree-path",
|
|
1768
|
+
children: str(state?.controlWorktreePath) ?? t("state.none")
|
|
1769
|
+
})
|
|
1770
|
+
]
|
|
1771
|
+
}),
|
|
1772
|
+
/* @__PURE__ */ jsx_runtime2.jsx("h3", {
|
|
1773
|
+
className: panel_module_default.subTitle,
|
|
1774
|
+
children: t("state.leases")
|
|
1775
|
+
}),
|
|
1776
|
+
leases.length === 0 ? /* @__PURE__ */ jsx_runtime2.jsx("p", {
|
|
1777
|
+
className: panel_module_default.empty,
|
|
1778
|
+
"data-mstar-empty": "no-leases",
|
|
1779
|
+
children: t("state.none")
|
|
1780
|
+
}) : /* @__PURE__ */ jsx_runtime2.jsx("ul", {
|
|
1781
|
+
className: panel_module_default.leaseList,
|
|
1782
|
+
children: leases.map((lease, i) => /* @__PURE__ */ jsx_runtime2.jsxs("li", {
|
|
1783
|
+
"data-lease-plan": str(lease.planId) ?? "unknown",
|
|
1784
|
+
children: [
|
|
1785
|
+
/* @__PURE__ */ jsx_runtime2.jsx("span", {
|
|
1786
|
+
className: panel_module_default.leasePlan,
|
|
1787
|
+
children: str(lease.planId) ?? t("panel.unknown")
|
|
1788
|
+
}),
|
|
1789
|
+
/* @__PURE__ */ jsx_runtime2.jsx("span", {
|
|
1790
|
+
className: panel_module_default.leaseHolder,
|
|
1791
|
+
children: str(lease.holder) ?? t("panel.unknown")
|
|
1792
|
+
}),
|
|
1793
|
+
str(lease.worktreePath) !== null ? /* @__PURE__ */ jsx_runtime2.jsx("span", {
|
|
1794
|
+
className: panel_module_default.leaseWorktree,
|
|
1795
|
+
children: lease.worktreePath
|
|
1796
|
+
}) : null
|
|
1797
|
+
]
|
|
1798
|
+
}, str(lease.planId) ?? `lease-${i}`))
|
|
1799
|
+
}),
|
|
1800
|
+
/* @__PURE__ */ jsx_runtime2.jsx("h3", {
|
|
1801
|
+
className: panel_module_default.subTitle,
|
|
1802
|
+
children: t("state.knowledge")
|
|
1803
|
+
}),
|
|
1804
|
+
knowledge === null ? /* @__PURE__ */ jsx_runtime2.jsx("p", {
|
|
1805
|
+
className: panel_module_default.empty,
|
|
1806
|
+
"data-mstar-empty": "no-knowledge",
|
|
1807
|
+
children: t("state.none")
|
|
1808
|
+
}) : /* @__PURE__ */ jsx_runtime2.jsxs("p", {
|
|
1809
|
+
className: panel_module_default.knowledge,
|
|
1810
|
+
"data-knowledge-docs": count(knowledge.docCount) === null ? "unknown" : String(knowledge.docCount),
|
|
1811
|
+
children: [
|
|
1812
|
+
/* @__PURE__ */ jsx_runtime2.jsx("span", {
|
|
1813
|
+
children: t("state.knowledge.docs", { count: count(knowledge.docCount) === null ? t("panel.unknown") : String(knowledge.docCount) })
|
|
1814
|
+
}),
|
|
1815
|
+
Array.isArray(knowledge.categories) && knowledge.categories.length > 0 ? /* @__PURE__ */ jsx_runtime2.jsx("span", {
|
|
1816
|
+
className: panel_module_default.knowledgeCategories,
|
|
1817
|
+
children: knowledge.categories.filter((category) => typeof category === "string").join(" · ")
|
|
1818
|
+
}) : null
|
|
1819
|
+
]
|
|
1820
|
+
}),
|
|
1821
|
+
/* @__PURE__ */ jsx_runtime2.jsx("h3", {
|
|
1822
|
+
className: panel_module_default.subTitle,
|
|
1823
|
+
children: t("state.direction")
|
|
1824
|
+
}),
|
|
1825
|
+
/* @__PURE__ */ jsx_runtime2.jsx("p", {
|
|
1826
|
+
className: panel_module_default.direction,
|
|
1827
|
+
"data-direction": true,
|
|
1828
|
+
children: str(state?.direction) ?? t("state.none")
|
|
1829
|
+
})
|
|
1830
|
+
]
|
|
1831
|
+
});
|
|
1832
|
+
}
|
|
1833
|
+
|
|
1834
|
+
// src/client/panel/sidebar.tsx
|
|
1835
|
+
var jsx_runtime3 = require("react/jsx-runtime");
|
|
1836
|
+
function Sidebar({ t, state, source }) {
|
|
1837
|
+
return /* @__PURE__ */ jsx_runtime3.jsxs("aside", {
|
|
1838
|
+
className: panel_module_default.sidebar,
|
|
1839
|
+
"data-mstar-sidebar": true,
|
|
1840
|
+
children: [
|
|
1841
|
+
/* @__PURE__ */ jsx_runtime3.jsx("div", {
|
|
1842
|
+
className: panel_module_default.sidebarScroll,
|
|
1843
|
+
"data-mstar-sidebar-scroll": true,
|
|
1844
|
+
children: state === null ? /* @__PURE__ */ jsx_runtime3.jsx("p", {
|
|
1845
|
+
className: panel_module_default.empty,
|
|
1846
|
+
"data-mstar-empty": "no-state",
|
|
1847
|
+
children: t("state.none")
|
|
1848
|
+
}) : /* @__PURE__ */ jsx_runtime3.jsx(StateSection, {
|
|
1849
|
+
t,
|
|
1850
|
+
state,
|
|
1851
|
+
enforcement: source.enforcement
|
|
1852
|
+
})
|
|
1853
|
+
}),
|
|
1854
|
+
/* @__PURE__ */ jsx_runtime3.jsx(PanelMeta, {
|
|
1855
|
+
t,
|
|
1856
|
+
source
|
|
1857
|
+
})
|
|
1858
|
+
]
|
|
1859
|
+
});
|
|
1860
|
+
}
|
|
1861
|
+
|
|
1862
|
+
// src/client/panel/TabNav.tsx
|
|
1863
|
+
var jsx_runtime4 = require("react/jsx-runtime");
|
|
1864
|
+
var TABS = [
|
|
1865
|
+
{ id: "tasks", label: "tab.tasks" },
|
|
1866
|
+
{ id: "agents", label: "tab.agents" },
|
|
1867
|
+
{ id: "events", label: "tab.events" }
|
|
1868
|
+
];
|
|
1869
|
+
function TabNav({ active, onChange, t }) {
|
|
1870
|
+
return /* @__PURE__ */ jsx_runtime4.jsx("nav", {
|
|
1871
|
+
className: panel_module_default.tabNav,
|
|
1872
|
+
"data-mstar-tab-nav": true,
|
|
1873
|
+
role: "tablist",
|
|
1874
|
+
children: TABS.map((tab) => /* @__PURE__ */ jsx_runtime4.jsx("button", {
|
|
1875
|
+
type: "button",
|
|
1876
|
+
role: "tab",
|
|
1877
|
+
className: active === tab.id ? `${panel_module_default.tab} ${panel_module_default.tabActive}` : panel_module_default.tab,
|
|
1878
|
+
"data-mstar-tab": tab.id,
|
|
1879
|
+
"data-mstar-tab-active": active === tab.id ? "true" : "false",
|
|
1880
|
+
"aria-selected": active === tab.id,
|
|
1881
|
+
onClick: () => onChange(tab.id),
|
|
1882
|
+
children: t(tab.label)
|
|
1883
|
+
}, tab.id))
|
|
1884
|
+
});
|
|
1885
|
+
}
|
|
1886
|
+
|
|
1887
|
+
// src/client/panel/pages/AgentCanvasPage.tsx
|
|
1888
|
+
var import_react2 = require("react");
|
|
1889
|
+
|
|
1890
|
+
// src/client/panel/zones/zones.module.css
|
|
1891
|
+
var css2 = `
|
|
1892
|
+
|
|
1893
|
+
|
|
1894
|
+
|
|
1895
|
+
.\\30 390dc47_zone {
|
|
1896
|
+
display: flex;
|
|
1897
|
+
flex-direction: column;
|
|
1898
|
+
gap: var(--mstar-space-2);
|
|
1899
|
+
min-width: 0;
|
|
1900
|
+
padding: var(--mstar-space-3);
|
|
1901
|
+
border: 1px solid var(--dsw-alias-border-l1);
|
|
1902
|
+
border-radius: 8px;
|
|
1903
|
+
background: var(--dsw-alias-bg-layer-1);
|
|
1904
|
+
color: var(--dsw-alias-label-secondary);
|
|
1905
|
+
font: var(--dsw-font-xxxs-11);
|
|
1906
|
+
transition: border-color 150ms ease;
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
.\\30 390dc47_zone:hover {
|
|
1910
|
+
border-color: var(--dsw-alias-border-l2);
|
|
1911
|
+
}
|
|
1912
|
+
|
|
1913
|
+
.fa5472ae_zoneHeader {
|
|
1914
|
+
margin: 0;
|
|
1915
|
+
color: var(--dsw-alias-label-secondary);
|
|
1916
|
+
font: var(--dsw-font-xxs-12);
|
|
1917
|
+
font-weight: 600;
|
|
1918
|
+
letter-spacing: 0.03em;
|
|
1919
|
+
text-transform: uppercase;
|
|
1920
|
+
}
|
|
1921
|
+
|
|
1922
|
+
.\\32 358ca74_zoneEmpty {
|
|
1923
|
+
margin: 0;
|
|
1924
|
+
color: var(--dsw-alias-label-caption);
|
|
1925
|
+
font: var(--dsw-font-xxxs-11);
|
|
1926
|
+
}
|
|
1927
|
+
|
|
1928
|
+
.\\30 214fc64_legend {
|
|
1929
|
+
display: flex;
|
|
1930
|
+
flex-direction: column;
|
|
1931
|
+
gap: var(--mstar-space-1);
|
|
1932
|
+
min-width: 0;
|
|
1933
|
+
}
|
|
1934
|
+
|
|
1935
|
+
.\\37 fdf3af2_legendTitle {
|
|
1936
|
+
color: var(--dsw-alias-label-secondary);
|
|
1937
|
+
font: var(--dsw-font-xxs-12);
|
|
1938
|
+
font-weight: 600;
|
|
1939
|
+
letter-spacing: 0.03em;
|
|
1940
|
+
text-transform: uppercase;
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
.\\35 751e1ec_legendList {
|
|
1944
|
+
display: flex;
|
|
1945
|
+
flex-wrap: wrap;
|
|
1946
|
+
gap: var(--mstar-space-1) var(--mstar-space-3);
|
|
1947
|
+
margin: 0;
|
|
1948
|
+
padding: 0;
|
|
1949
|
+
list-style: none;
|
|
1950
|
+
color: var(--dsw-alias-label-caption);
|
|
1951
|
+
font: var(--dsw-font-xxxs-11);
|
|
1952
|
+
}
|
|
1953
|
+
|
|
1954
|
+
.c648f79b_legendItem {
|
|
1955
|
+
display: inline-flex;
|
|
1956
|
+
align-items: center;
|
|
1957
|
+
gap: var(--mstar-space-1);
|
|
1958
|
+
}
|
|
1959
|
+
|
|
1960
|
+
.\\38 4f03998_legendSwatch {
|
|
1961
|
+
display: inline-block;
|
|
1962
|
+
width: 10px;
|
|
1963
|
+
height: 10px;
|
|
1964
|
+
border-radius: 2px;
|
|
1965
|
+
}
|
|
1966
|
+
|
|
1967
|
+
|
|
1968
|
+
|
|
1969
|
+
|
|
1970
|
+
.\\36 37ae7a1_swatchAgentRunning {
|
|
1971
|
+
background: var(--dsw-alias-state-business-primary);
|
|
1972
|
+
border-radius: 999px;
|
|
1973
|
+
box-shadow: 0 0 0 1px var(--dsw-alias-bg-layer-1), 0 0 0 2px var(--dsw-alias-state-business-primary);
|
|
1974
|
+
}
|
|
1975
|
+
|
|
1976
|
+
.e8a7988b_swatchAgentSettled {
|
|
1977
|
+
background: var(--dsw-alias-state-success-primary);
|
|
1978
|
+
border-radius: 999px;
|
|
1979
|
+
}
|
|
1980
|
+
|
|
1981
|
+
.d34b3834_swatchAgentIdle {
|
|
1982
|
+
border: 1px dashed var(--dsw-alias-label-caption);
|
|
1983
|
+
}
|
|
1984
|
+
|
|
1985
|
+
|
|
1986
|
+
|
|
1987
|
+
.\\39 c376db8_tasksHeader {
|
|
1988
|
+
display: flex;
|
|
1989
|
+
align-items: baseline;
|
|
1990
|
+
justify-content: space-between;
|
|
1991
|
+
gap: var(--mstar-space-2);
|
|
1992
|
+
min-width: 0;
|
|
1993
|
+
}
|
|
1994
|
+
|
|
1995
|
+
.b5ad0f15_tasksTotal {
|
|
1996
|
+
flex: none;
|
|
1997
|
+
color: var(--dsw-alias-label-caption);
|
|
1998
|
+
font: var(--dsw-font-xxxs-11);
|
|
1999
|
+
font-variant-numeric: tabular-nums;
|
|
2000
|
+
}
|
|
2001
|
+
|
|
2002
|
+
|
|
2003
|
+
.\\31 2dfaa6e_kanban {
|
|
2004
|
+
display: flex;
|
|
2005
|
+
align-items: flex-start;
|
|
2006
|
+
gap: var(--mstar-space-1);
|
|
2007
|
+
min-width: 0;
|
|
2008
|
+
overflow-x: auto;
|
|
2009
|
+
overscroll-behavior: contain;
|
|
2010
|
+
}
|
|
2011
|
+
|
|
2012
|
+
|
|
2013
|
+
.\\31 f8473a4_kanbanColumn {
|
|
2014
|
+
box-sizing: border-box;
|
|
2015
|
+
display: flex;
|
|
2016
|
+
flex: 1 1 0;
|
|
2017
|
+
flex-direction: column;
|
|
2018
|
+
gap: var(--mstar-space-2);
|
|
2019
|
+
min-width: 120px;
|
|
2020
|
+
padding: var(--mstar-space-2);
|
|
2021
|
+
border: 1px solid var(--dsw-alias-border-l1);
|
|
2022
|
+
border-radius: 8px;
|
|
2023
|
+
background: var(--dsw-alias-bg-layer-1);
|
|
2024
|
+
transition: border-color 150ms ease;
|
|
2025
|
+
}
|
|
2026
|
+
|
|
2027
|
+
.\\31 f8473a4_kanbanColumn:hover {
|
|
2028
|
+
border-color: var(--dsw-alias-border-l2);
|
|
2029
|
+
}
|
|
2030
|
+
|
|
2031
|
+
|
|
2032
|
+
[data-kanban-column='blocked-unknown'] {
|
|
2033
|
+
border-style: dashed;
|
|
2034
|
+
color: var(--dsw-alias-label-caption);
|
|
2035
|
+
opacity: 0.7;
|
|
2036
|
+
}
|
|
2037
|
+
|
|
2038
|
+
.\\33 b1cc701_kanbanColumnHeader {
|
|
2039
|
+
display: flex;
|
|
2040
|
+
align-items: center;
|
|
2041
|
+
justify-content: space-between;
|
|
2042
|
+
gap: var(--mstar-space-1);
|
|
2043
|
+
min-width: 0;
|
|
2044
|
+
}
|
|
2045
|
+
|
|
2046
|
+
.\\35 03b6432_kanbanColumnTitle {
|
|
2047
|
+
overflow: hidden;
|
|
2048
|
+
text-overflow: ellipsis;
|
|
2049
|
+
white-space: nowrap;
|
|
2050
|
+
color: var(--dsw-alias-label-secondary);
|
|
2051
|
+
font: var(--dsw-font-xxxs-11);
|
|
2052
|
+
font-weight: 600;
|
|
2053
|
+
letter-spacing: 0.03em;
|
|
2054
|
+
text-transform: uppercase;
|
|
2055
|
+
}
|
|
2056
|
+
|
|
2057
|
+
.\\34 96af60d_kanbanCount {
|
|
2058
|
+
flex: none;
|
|
2059
|
+
min-width: 18px;
|
|
2060
|
+
padding: 0 var(--mstar-space-1);
|
|
2061
|
+
border: 1px solid var(--dsw-alias-border-l2);
|
|
2062
|
+
border-radius: 999px;
|
|
2063
|
+
color: var(--dsw-alias-label-caption);
|
|
2064
|
+
font: var(--dsw-font-xxxs-11);
|
|
2065
|
+
font-variant-numeric: tabular-nums;
|
|
2066
|
+
text-align: center;
|
|
2067
|
+
}
|
|
2068
|
+
|
|
2069
|
+
.\\31 61359fd_kanbanCards {
|
|
2070
|
+
display: flex;
|
|
2071
|
+
flex-direction: column;
|
|
2072
|
+
gap: var(--mstar-space-1);
|
|
2073
|
+
margin: 0;
|
|
2074
|
+
padding: 0;
|
|
2075
|
+
list-style: none;
|
|
2076
|
+
}
|
|
2077
|
+
|
|
2078
|
+
.\\37 3f0e028_planCard {
|
|
2079
|
+
display: flex;
|
|
2080
|
+
flex-direction: column;
|
|
2081
|
+
gap: var(--mstar-space-1);
|
|
2082
|
+
min-width: 0;
|
|
2083
|
+
padding: var(--mstar-space-2);
|
|
2084
|
+
border: 1px solid var(--dsw-alias-border-l1);
|
|
2085
|
+
border-radius: 8px;
|
|
2086
|
+
background: var(--dsw-alias-bg-layer-1);
|
|
2087
|
+
transition: border-color 150ms ease;
|
|
2088
|
+
}
|
|
2089
|
+
|
|
2090
|
+
.\\37 3f0e028_planCard:hover {
|
|
2091
|
+
border-color: var(--dsw-alias-border-l2);
|
|
2092
|
+
}
|
|
2093
|
+
|
|
2094
|
+
.a37c7a75_planCardId {
|
|
2095
|
+
overflow: hidden;
|
|
2096
|
+
text-overflow: ellipsis;
|
|
2097
|
+
white-space: nowrap;
|
|
2098
|
+
color: var(--dsw-alias-label-primary);
|
|
2099
|
+
font: var(--dsw-font-xxxs-11);
|
|
2100
|
+
font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
|
|
2101
|
+
font-variant-numeric: tabular-nums;
|
|
2102
|
+
}
|
|
2103
|
+
|
|
2104
|
+
|
|
2105
|
+
.\\31 1b4fd6a_planCardStatus {
|
|
2106
|
+
align-self: flex-start;
|
|
2107
|
+
padding: 0 var(--mstar-space-1);
|
|
2108
|
+
border: 1px solid var(--dsw-alias-border-l2);
|
|
2109
|
+
border-radius: 999px;
|
|
2110
|
+
color: var(--dsw-alias-label-secondary);
|
|
2111
|
+
font: var(--dsw-font-xxxs-11);
|
|
2112
|
+
transition: color 150ms ease, border-color 150ms ease;
|
|
2113
|
+
}
|
|
2114
|
+
|
|
2115
|
+
.\\31 1b4fd6a_planCardStatus[data-status='Done'] {
|
|
2116
|
+
border-color: var(--dsw-alias-state-success-primary);
|
|
2117
|
+
color: var(--dsw-alias-state-success-primary);
|
|
2118
|
+
}
|
|
2119
|
+
|
|
2120
|
+
.\\31 1b4fd6a_planCardStatus[data-status='InProgress'] {
|
|
2121
|
+
border-color: var(--dsw-alias-state-business-primary);
|
|
2122
|
+
color: var(--dsw-alias-state-business-primary);
|
|
2123
|
+
}
|
|
2124
|
+
|
|
2125
|
+
|
|
2126
|
+
.\\36 3518033_kanbanArrow {
|
|
2127
|
+
flex: none;
|
|
2128
|
+
align-self: center;
|
|
2129
|
+
width: 18px;
|
|
2130
|
+
height: 18px;
|
|
2131
|
+
display: inline-flex;
|
|
2132
|
+
align-items: center;
|
|
2133
|
+
justify-content: center;
|
|
2134
|
+
color: var(--dsw-alias-label-caption);
|
|
2135
|
+
font: var(--dsw-font-xxxs-11);
|
|
2136
|
+
font-weight: 600;
|
|
2137
|
+
}
|
|
2138
|
+
|
|
2139
|
+
|
|
2140
|
+
.\\30 c600f2f_kanbanMore {
|
|
2141
|
+
margin: 0;
|
|
2142
|
+
padding: 0;
|
|
2143
|
+
}
|
|
2144
|
+
|
|
2145
|
+
.d0f95d1f_kanbanMoreButton {
|
|
2146
|
+
appearance: none;
|
|
2147
|
+
display: block;
|
|
2148
|
+
width: 100%;
|
|
2149
|
+
border: 1px dashed var(--dsw-alias-border-l2);
|
|
2150
|
+
border-radius: 8px;
|
|
2151
|
+
background: none;
|
|
2152
|
+
padding: var(--mstar-space-1) var(--mstar-space-2);
|
|
2153
|
+
color: var(--dsw-alias-label-caption);
|
|
2154
|
+
font: var(--dsw-font-xxxs-11);
|
|
2155
|
+
font-variant-numeric: tabular-nums;
|
|
2156
|
+
cursor: pointer;
|
|
2157
|
+
transition: color 150ms ease, border-color 150ms ease;
|
|
2158
|
+
}
|
|
2159
|
+
|
|
2160
|
+
.d0f95d1f_kanbanMoreButton:hover {
|
|
2161
|
+
border-color: var(--dsw-alias-border-l1);
|
|
2162
|
+
color: var(--dsw-alias-label-secondary);
|
|
2163
|
+
}
|
|
2164
|
+
|
|
2165
|
+
`;
|
|
2166
|
+
var tagId2 = "@mstar-harness/dsh/zones.module.css";
|
|
2167
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId2) + "]") === null) {
|
|
2168
|
+
const tag = document.createElement("style");
|
|
2169
|
+
tag.dataset.plugin = "@mstar-harness/dsh";
|
|
2170
|
+
tag.dataset.pluginCss = tagId2;
|
|
2171
|
+
tag.textContent = css2;
|
|
2172
|
+
document.head.appendChild(tag);
|
|
2173
|
+
}
|
|
2174
|
+
var zones_module_default = { zone: "0390dc47_zone", zoneHeader: "fa5472ae_zoneHeader", zoneEmpty: "2358ca74_zoneEmpty", legend: "0214fc64_legend", legendTitle: "7fdf3af2_legendTitle", legendList: "5751e1ec_legendList", legendItem: "c648f79b_legendItem", legendSwatch: "84f03998_legendSwatch", swatchAgentRunning: "637ae7a1_swatchAgentRunning", swatchAgentSettled: "e8a7988b_swatchAgentSettled", swatchAgentIdle: "d34b3834_swatchAgentIdle", tasksHeader: "9c376db8_tasksHeader", tasksTotal: "b5ad0f15_tasksTotal", kanban: "12dfaa6e_kanban", kanbanColumn: "1f8473a4_kanbanColumn", kanbanColumnHeader: "3b1cc701_kanbanColumnHeader", kanbanColumnTitle: "503b6432_kanbanColumnTitle", kanbanCount: "496af60d_kanbanCount", kanbanCards: "161359fd_kanbanCards", planCard: "73f0e028_planCard", planCardId: "a37c7a75_planCardId", planCardStatus: "11b4fd6a_planCardStatus", kanbanArrow: "63518033_kanbanArrow", kanbanMore: "0c600f2f_kanbanMore", kanbanMoreButton: "d0f95d1f_kanbanMoreButton" };
|
|
2175
|
+
|
|
2176
|
+
// src/client/panel/zones/Legend.tsx
|
|
2177
|
+
var jsx_runtime5 = require("react/jsx-runtime");
|
|
2178
|
+
function Legend({ t }) {
|
|
2179
|
+
const items = [
|
|
2180
|
+
{ key: "agent-running", swatch: zones_module_default.swatchAgentRunning, label: t("zone.legend.agent-running") },
|
|
2181
|
+
{ key: "agent-settled", swatch: zones_module_default.swatchAgentSettled, label: t("zone.legend.agent-settled") },
|
|
2182
|
+
{ key: "agent-idle", swatch: zones_module_default.swatchAgentIdle, label: t("zone.legend.agent-idle") }
|
|
2183
|
+
];
|
|
2184
|
+
return /* @__PURE__ */ jsx_runtime5.jsxs("div", {
|
|
2185
|
+
className: zones_module_default.legend,
|
|
2186
|
+
"data-mstar-legend": true,
|
|
2187
|
+
children: [
|
|
2188
|
+
/* @__PURE__ */ jsx_runtime5.jsx("span", {
|
|
2189
|
+
className: zones_module_default.legendTitle,
|
|
2190
|
+
children: t("zone.legend.title")
|
|
2191
|
+
}),
|
|
2192
|
+
/* @__PURE__ */ jsx_runtime5.jsx("ul", {
|
|
2193
|
+
className: zones_module_default.legendList,
|
|
2194
|
+
children: items.map((item) => /* @__PURE__ */ jsx_runtime5.jsxs("li", {
|
|
2195
|
+
className: zones_module_default.legendItem,
|
|
2196
|
+
"data-mstar-legend-item": item.key,
|
|
2197
|
+
children: [
|
|
2198
|
+
/* @__PURE__ */ jsx_runtime5.jsx("span", {
|
|
2199
|
+
className: `${zones_module_default.legendSwatch} ${item.swatch}`
|
|
2200
|
+
}),
|
|
2201
|
+
item.label
|
|
2202
|
+
]
|
|
2203
|
+
}, item.key))
|
|
2204
|
+
})
|
|
2205
|
+
]
|
|
2206
|
+
});
|
|
2207
|
+
}
|
|
2208
|
+
|
|
2209
|
+
// src/client/panel/pages/IterationInfoSection.tsx
|
|
2210
|
+
var import_react = require("react");
|
|
2211
|
+
var jsx_runtime6 = require("react/jsx-runtime");
|
|
2212
|
+
function nextExpandedOnActivation(prev, prevActive, nextActive) {
|
|
2213
|
+
return !prevActive && nextActive ? true : prev;
|
|
2214
|
+
}
|
|
2215
|
+
var STATE_LABEL = {
|
|
2216
|
+
current: "zone.iteration.step.current",
|
|
2217
|
+
next: "zone.iteration.step.next",
|
|
2218
|
+
done: "zone.iteration.step.done",
|
|
2219
|
+
idle: "zone.iteration.step.idle"
|
|
2220
|
+
};
|
|
2221
|
+
function iterationSplitActive(active, branches) {
|
|
2222
|
+
return active && branches !== null;
|
|
2223
|
+
}
|
|
2224
|
+
var BRANCH_ROWS = [
|
|
2225
|
+
{ kind: "iteration-base", label: "zone.branches.iteration-base", value: "iterationBase" },
|
|
2226
|
+
{ kind: "target", label: "zone.branches.target", value: "target" },
|
|
2227
|
+
{ kind: "spec-integration", label: "zone.branches.spec-integration", value: "specIntegration" }
|
|
2228
|
+
];
|
|
2229
|
+
function IterationInfoSection({ iteration, t }) {
|
|
2230
|
+
const active = iteration.active;
|
|
2231
|
+
const [expanded, setExpanded] = import_react.useState(active);
|
|
2232
|
+
const activeRef = import_react.useRef(active);
|
|
2233
|
+
import_react.useEffect(() => {
|
|
2234
|
+
setExpanded((prev) => nextExpandedOnActivation(prev, activeRef.current, active));
|
|
2235
|
+
activeRef.current = active;
|
|
2236
|
+
}, [active]);
|
|
2237
|
+
const verdictLabel = (verdict) => verdict === "pass" ? t("graph.pass") : verdict === "fail" ? t("graph.fail") : t("panel.unknown");
|
|
2238
|
+
const idLabel = iteration.iterationId ?? t("panel.unknown");
|
|
2239
|
+
const statusLabel = active && iteration.currentStep !== null ? t("zone.iteration.step-label", { n: String(iteration.currentStep), total: String(iteration.steps.length) }) : t("page.iteration.not-started");
|
|
2240
|
+
const stepsRow = /* @__PURE__ */ jsx_runtime6.jsx("ol", {
|
|
2241
|
+
className: panel_module_default.iterationStepsRow,
|
|
2242
|
+
"data-iteration-head-steps": true,
|
|
2243
|
+
children: iteration.steps.map((step) => /* @__PURE__ */ jsx_runtime6.jsxs("li", {
|
|
2244
|
+
className: panel_module_default.iterationStepItem,
|
|
2245
|
+
"data-step": step.step,
|
|
2246
|
+
"data-step-state": step.state,
|
|
2247
|
+
children: [
|
|
2248
|
+
/* @__PURE__ */ jsx_runtime6.jsx("span", {
|
|
2249
|
+
className: panel_module_default.iterationStepBadge,
|
|
2250
|
+
"data-step-badge": true,
|
|
2251
|
+
children: t("zone.iteration.step-badge", { n: String(step.step) })
|
|
2252
|
+
}),
|
|
2253
|
+
/* @__PURE__ */ jsx_runtime6.jsx("span", {
|
|
2254
|
+
className: panel_module_default.iterationStepPhase,
|
|
2255
|
+
"data-step-phase": true,
|
|
2256
|
+
children: t(`zone.phase.${step.id}`)
|
|
2257
|
+
}),
|
|
2258
|
+
/* @__PURE__ */ jsx_runtime6.jsx("span", {
|
|
2259
|
+
className: panel_module_default.iterationStepChip,
|
|
2260
|
+
"data-step-chip": true,
|
|
2261
|
+
children: t(STATE_LABEL[step.state])
|
|
2262
|
+
}),
|
|
2263
|
+
/* @__PURE__ */ jsx_runtime6.jsx("span", {
|
|
2264
|
+
className: panel_module_default.iterationVerdictSeat,
|
|
2265
|
+
"data-step-verdict-seat": true,
|
|
2266
|
+
children: step.state === "current" && step.verdict !== "unknown" && /* @__PURE__ */ jsx_runtime6.jsx("span", {
|
|
2267
|
+
className: panel_module_default.iterationVerdict,
|
|
2268
|
+
"data-iteration-verdict": step.verdict,
|
|
2269
|
+
children: verdictLabel(step.verdict)
|
|
2270
|
+
})
|
|
2271
|
+
})
|
|
2272
|
+
]
|
|
2273
|
+
}, step.step))
|
|
2274
|
+
});
|
|
2275
|
+
return /* @__PURE__ */ jsx_runtime6.jsxs("section", {
|
|
2276
|
+
className: panel_module_default.iterationHead,
|
|
2277
|
+
"data-iteration-head": true,
|
|
2278
|
+
"data-iteration-head-active": active ? "true" : "false",
|
|
2279
|
+
"data-iteration-head-expanded": expanded ? "true" : "false",
|
|
2280
|
+
children: [
|
|
2281
|
+
/* @__PURE__ */ jsx_runtime6.jsxs("button", {
|
|
2282
|
+
type: "button",
|
|
2283
|
+
className: panel_module_default.iterationSummary,
|
|
2284
|
+
"data-iteration-head-toggle": true,
|
|
2285
|
+
"data-iteration-head-summary": true,
|
|
2286
|
+
"aria-expanded": expanded,
|
|
2287
|
+
"aria-controls": "iteration-head-body",
|
|
2288
|
+
onClick: () => setExpanded((v) => !v),
|
|
2289
|
+
children: [
|
|
2290
|
+
/* @__PURE__ */ jsx_runtime6.jsx("span", {
|
|
2291
|
+
className: panel_module_default.iterationSummaryId,
|
|
2292
|
+
"data-iteration-head-id": idLabel,
|
|
2293
|
+
children: idLabel
|
|
2294
|
+
}),
|
|
2295
|
+
/* @__PURE__ */ jsx_runtime6.jsx("span", {
|
|
2296
|
+
className: panel_module_default.iterationSummaryVerdict,
|
|
2297
|
+
"data-iteration-head-verdict": iteration.verdict,
|
|
2298
|
+
children: verdictLabel(iteration.verdict)
|
|
2299
|
+
}),
|
|
2300
|
+
/* @__PURE__ */ jsx_runtime6.jsx("span", {
|
|
2301
|
+
className: active ? panel_module_default.iterationSummaryStatus : panel_module_default.iterationSummaryStatusMuted,
|
|
2302
|
+
"data-iteration-head-status": statusLabel,
|
|
2303
|
+
children: statusLabel
|
|
2304
|
+
}),
|
|
2305
|
+
/* @__PURE__ */ jsx_runtime6.jsx("span", {
|
|
2306
|
+
className: panel_module_default.iterationSummaryHint,
|
|
2307
|
+
"data-iteration-head-hint": true,
|
|
2308
|
+
children: t(expanded ? "page.iteration.collapse" : "page.iteration.expand")
|
|
2309
|
+
})
|
|
2310
|
+
]
|
|
2311
|
+
}),
|
|
2312
|
+
expanded && /* @__PURE__ */ jsx_runtime6.jsx("div", {
|
|
2313
|
+
className: panel_module_default.iterationHeadBody,
|
|
2314
|
+
id: "iteration-head-body",
|
|
2315
|
+
"data-iteration-head-body": true,
|
|
2316
|
+
children: iterationSplitActive(active, iteration.branches) ? /* @__PURE__ */ jsx_runtime6.jsxs("div", {
|
|
2317
|
+
className: panel_module_default.iterationHeadSplit,
|
|
2318
|
+
"data-iteration-head-split": true,
|
|
2319
|
+
children: [
|
|
2320
|
+
/* @__PURE__ */ jsx_runtime6.jsxs("div", {
|
|
2321
|
+
className: panel_module_default.iterationBranches,
|
|
2322
|
+
"data-iteration-head-branches": true,
|
|
2323
|
+
children: [
|
|
2324
|
+
/* @__PURE__ */ jsx_runtime6.jsx("h3", {
|
|
2325
|
+
className: panel_module_default.iterationBranchesTitle,
|
|
2326
|
+
"data-branches-title": true,
|
|
2327
|
+
children: t("zone.branches.title")
|
|
2328
|
+
}),
|
|
2329
|
+
/* @__PURE__ */ jsx_runtime6.jsx("ul", {
|
|
2330
|
+
className: panel_module_default.iterationBranchList,
|
|
2331
|
+
children: BRANCH_ROWS.map((row) => /* @__PURE__ */ jsx_runtime6.jsxs("li", {
|
|
2332
|
+
className: panel_module_default.iterationBranchRow,
|
|
2333
|
+
"data-branch": row.kind,
|
|
2334
|
+
children: [
|
|
2335
|
+
/* @__PURE__ */ jsx_runtime6.jsx("span", {
|
|
2336
|
+
className: panel_module_default.iterationBranchLabel,
|
|
2337
|
+
children: t(row.label)
|
|
2338
|
+
}),
|
|
2339
|
+
/* @__PURE__ */ jsx_runtime6.jsx("code", {
|
|
2340
|
+
className: panel_module_default.iterationBranchValue,
|
|
2341
|
+
"data-branch-value": true,
|
|
2342
|
+
children: iteration.branches?.[row.value] ?? "—"
|
|
2343
|
+
})
|
|
2344
|
+
]
|
|
2345
|
+
}, row.kind))
|
|
2346
|
+
})
|
|
2347
|
+
]
|
|
2348
|
+
}),
|
|
2349
|
+
stepsRow
|
|
2350
|
+
]
|
|
2351
|
+
}) : stepsRow
|
|
2352
|
+
})
|
|
2353
|
+
]
|
|
2354
|
+
});
|
|
2355
|
+
}
|
|
2356
|
+
|
|
2357
|
+
// src/client/panel/pages/agent-canvas.module.css
|
|
2358
|
+
var css3 = `
|
|
2359
|
+
|
|
2360
|
+
|
|
2361
|
+
|
|
2362
|
+
.\\36 2d5f9b2_canvasPage {
|
|
2363
|
+
flex: 1;
|
|
2364
|
+
min-height: 0;
|
|
2365
|
+
display: flex;
|
|
2366
|
+
flex-direction: column;
|
|
2367
|
+
gap: var(--mstar-space-2);
|
|
2368
|
+
padding: var(--mstar-space-3);
|
|
2369
|
+
|
|
2370
|
+
--mstar-canvas-emphasis-current: 100%;
|
|
2371
|
+
--mstar-canvas-emphasis-next: 75%;
|
|
2372
|
+
--mstar-canvas-emphasis-off: 45%;
|
|
2373
|
+
}
|
|
2374
|
+
|
|
2375
|
+
.\\37 608ed94_canvasHeader {
|
|
2376
|
+
display: flex;
|
|
2377
|
+
align-items: baseline;
|
|
2378
|
+
justify-content: space-between;
|
|
2379
|
+
gap: var(--mstar-space-2);
|
|
2380
|
+
flex: none;
|
|
2381
|
+
min-width: 0;
|
|
2382
|
+
}
|
|
2383
|
+
|
|
2384
|
+
.\\39 e2394fd_canvasTitle {
|
|
2385
|
+
margin: 0;
|
|
2386
|
+
color: var(--dsw-alias-label-primary);
|
|
2387
|
+
font: var(--dsw-font-xs-13);
|
|
2388
|
+
font-weight: 600;
|
|
2389
|
+
}
|
|
2390
|
+
|
|
2391
|
+
|
|
2392
|
+
.\\37 4514c6f_canvasSummary {
|
|
2393
|
+
flex: none;
|
|
2394
|
+
color: var(--dsw-alias-label-caption);
|
|
2395
|
+
font: var(--dsw-font-xxxs-11);
|
|
2396
|
+
font-variant-numeric: tabular-nums;
|
|
2397
|
+
}
|
|
2398
|
+
|
|
2399
|
+
|
|
2400
|
+
.\\38 5e71ac9_canvasNote {
|
|
2401
|
+
flex: none;
|
|
2402
|
+
margin: 0;
|
|
2403
|
+
color: var(--dsw-alias-label-caption);
|
|
2404
|
+
font: var(--dsw-font-xxs-12);
|
|
2405
|
+
}
|
|
2406
|
+
|
|
2407
|
+
|
|
2408
|
+
.\\34 374ac40_canvasLegend {
|
|
2409
|
+
flex: none;
|
|
2410
|
+
}
|
|
2411
|
+
|
|
2412
|
+
|
|
2413
|
+
|
|
2414
|
+
.\\30 ceb0467_canvasViewport {
|
|
2415
|
+
position: relative;
|
|
2416
|
+
flex: 1;
|
|
2417
|
+
min-height: 0;
|
|
2418
|
+
overflow: hidden;
|
|
2419
|
+
touch-action: none;
|
|
2420
|
+
background: var(--dsw-alias-bg-layer-1);
|
|
2421
|
+
border: 1px solid var(--dsw-alias-border-l1);
|
|
2422
|
+
border-radius: 8px;
|
|
2423
|
+
cursor: grab;
|
|
2424
|
+
user-select: none;
|
|
2425
|
+
}
|
|
2426
|
+
|
|
2427
|
+
.\\30 ceb0467_canvasViewport:active {
|
|
2428
|
+
cursor: grabbing;
|
|
2429
|
+
}
|
|
2430
|
+
|
|
2431
|
+
|
|
2432
|
+
|
|
2433
|
+
.\\34 8d128d6_canvasContent {
|
|
2434
|
+
position: absolute;
|
|
2435
|
+
top: 0;
|
|
2436
|
+
left: 0;
|
|
2437
|
+
background-color: var(--dsw-alias-bg-layer-1);
|
|
2438
|
+
background-image:
|
|
2439
|
+
linear-gradient(var(--dsw-alias-border-l1) 1px, transparent 1px),
|
|
2440
|
+
linear-gradient(90deg, var(--dsw-alias-border-l1) 1px, transparent 1px);
|
|
2441
|
+
background-size: 24px 24px;
|
|
2442
|
+
will-change: transform;
|
|
2443
|
+
}
|
|
2444
|
+
|
|
2445
|
+
|
|
2446
|
+
.\\37 f010373_canvasColumnLabel {
|
|
2447
|
+
position: absolute;
|
|
2448
|
+
padding: 0 var(--mstar-space-1);
|
|
2449
|
+
overflow: hidden;
|
|
2450
|
+
text-overflow: ellipsis;
|
|
2451
|
+
white-space: nowrap;
|
|
2452
|
+
color: var(--dsw-alias-label-caption);
|
|
2453
|
+
font: var(--dsw-font-xxxs-11);
|
|
2454
|
+
font-weight: 600;
|
|
2455
|
+
letter-spacing: 0.03em;
|
|
2456
|
+
text-transform: uppercase;
|
|
2457
|
+
}
|
|
2458
|
+
|
|
2459
|
+
|
|
2460
|
+
.fcf0fc76_canvasGroupLabel {
|
|
2461
|
+
position: absolute;
|
|
2462
|
+
display: flex;
|
|
2463
|
+
align-items: center;
|
|
2464
|
+
gap: var(--mstar-space-2);
|
|
2465
|
+
min-width: 0;
|
|
2466
|
+
padding: 0 var(--mstar-space-1);
|
|
2467
|
+
overflow: hidden;
|
|
2468
|
+
color: var(--dsw-alias-label-primary);
|
|
2469
|
+
font: var(--dsw-font-xxxs-11);
|
|
2470
|
+
font-weight: 600;
|
|
2471
|
+
letter-spacing: 0.03em;
|
|
2472
|
+
text-transform: uppercase;
|
|
2473
|
+
}
|
|
2474
|
+
|
|
2475
|
+
|
|
2476
|
+
.f17a7dfb_canvasGroupPlan {
|
|
2477
|
+
display: flex;
|
|
2478
|
+
align-items: center;
|
|
2479
|
+
gap: var(--mstar-space-1);
|
|
2480
|
+
min-width: 0;
|
|
2481
|
+
max-width: 220px;
|
|
2482
|
+
padding: 0 var(--mstar-space-2);
|
|
2483
|
+
border: 1px solid var(--dsw-alias-border-l2);
|
|
2484
|
+
border-radius: 999px;
|
|
2485
|
+
overflow: hidden;
|
|
2486
|
+
color: var(--dsw-alias-label-secondary);
|
|
2487
|
+
font: var(--dsw-font-xxxs-11);
|
|
2488
|
+
font-weight: 400;
|
|
2489
|
+
letter-spacing: 0;
|
|
2490
|
+
text-overflow: ellipsis;
|
|
2491
|
+
text-transform: none;
|
|
2492
|
+
white-space: nowrap;
|
|
2493
|
+
}
|
|
2494
|
+
|
|
2495
|
+
|
|
2496
|
+
.\\32 387c06e_canvasGroupPlanMore {
|
|
2497
|
+
flex: none;
|
|
2498
|
+
color: var(--dsw-alias-label-caption);
|
|
2499
|
+
font: var(--dsw-font-xxxs-11);
|
|
2500
|
+
letter-spacing: 0;
|
|
2501
|
+
text-transform: none;
|
|
2502
|
+
}
|
|
2503
|
+
|
|
2504
|
+
|
|
2505
|
+
.\\34 eb1cc60_canvasGroupNoPlan {
|
|
2506
|
+
color: var(--dsw-alias-label-caption);
|
|
2507
|
+
font: var(--dsw-font-xxxs-11);
|
|
2508
|
+
font-weight: 400;
|
|
2509
|
+
letter-spacing: 0;
|
|
2510
|
+
text-transform: none;
|
|
2511
|
+
}
|
|
2512
|
+
|
|
2513
|
+
|
|
2514
|
+
|
|
2515
|
+
.d0988ac1_canvasEdges {
|
|
2516
|
+
position: absolute;
|
|
2517
|
+
top: 0;
|
|
2518
|
+
left: 0;
|
|
2519
|
+
pointer-events: none;
|
|
2520
|
+
}
|
|
2521
|
+
|
|
2522
|
+
|
|
2523
|
+
.ee3e51b3_canvasEdgeCurve {
|
|
2524
|
+
fill: none;
|
|
2525
|
+
}
|
|
2526
|
+
|
|
2527
|
+
.e6a1115e_canvasEdgeActual {
|
|
2528
|
+
stroke: var(--dsw-alias-state-business-primary);
|
|
2529
|
+
stroke-width: 1.5;
|
|
2530
|
+
}
|
|
2531
|
+
|
|
2532
|
+
|
|
2533
|
+
.d3a4fb6c_canvasArrowActual {
|
|
2534
|
+
fill: var(--dsw-alias-state-business-primary);
|
|
2535
|
+
}
|
|
2536
|
+
|
|
2537
|
+
|
|
2538
|
+
|
|
2539
|
+
.\\34 4301340_canvasCards {
|
|
2540
|
+
position: absolute;
|
|
2541
|
+
top: 0;
|
|
2542
|
+
left: 0;
|
|
2543
|
+
margin: 0;
|
|
2544
|
+
padding: 0;
|
|
2545
|
+
list-style: none;
|
|
2546
|
+
}
|
|
2547
|
+
|
|
2548
|
+
.a9030174_agentCard {
|
|
2549
|
+
position: absolute;
|
|
2550
|
+
box-sizing: border-box;
|
|
2551
|
+
display: flex;
|
|
2552
|
+
flex-direction: column;
|
|
2553
|
+
gap: var(--mstar-space-1);
|
|
2554
|
+
min-width: 0;
|
|
2555
|
+
padding: var(--mstar-space-2);
|
|
2556
|
+
|
|
2557
|
+
--mstar-chrome-alpha: var(--mstar-canvas-emphasis-current);
|
|
2558
|
+
border: 1px solid color-mix(in srgb, var(--dsw-alias-border-l1) var(--mstar-chrome-alpha), var(--dsw-alias-bg-layer-1));
|
|
2559
|
+
border-radius: 8px;
|
|
2560
|
+
background: var(--dsw-alias-bg-layer-1);
|
|
2561
|
+
transition: border-color 150ms ease;
|
|
2562
|
+
}
|
|
2563
|
+
|
|
2564
|
+
|
|
2565
|
+
.a9030174_agentCard[data-agent-emphasis='next'] {
|
|
2566
|
+
--mstar-chrome-alpha: var(--mstar-canvas-emphasis-next);
|
|
2567
|
+
}
|
|
2568
|
+
|
|
2569
|
+
.a9030174_agentCard[data-agent-emphasis='off'] {
|
|
2570
|
+
--mstar-chrome-alpha: var(--mstar-canvas-emphasis-off);
|
|
2571
|
+
}
|
|
2572
|
+
|
|
2573
|
+
.a9030174_agentCard:hover {
|
|
2574
|
+
|
|
2575
|
+
border-color: color-mix(in srgb, var(--dsw-alias-border-l2) var(--mstar-chrome-alpha), var(--dsw-alias-bg-layer-1));
|
|
2576
|
+
}
|
|
2577
|
+
|
|
2578
|
+
|
|
2579
|
+
.\\34 e2c7873_agentCardRunning {
|
|
2580
|
+
border-color: var(--dsw-alias-state-business-primary);
|
|
2581
|
+
box-shadow: 0 0 0 1px var(--dsw-alias-state-business-primary);
|
|
2582
|
+
animation: canvas-card-pulse 1.6s ease-in-out infinite;
|
|
2583
|
+
}
|
|
2584
|
+
|
|
2585
|
+
.\\34 e2c7873_agentCardRunning:hover {
|
|
2586
|
+
border-color: var(--dsw-alias-state-business-primary);
|
|
2587
|
+
}
|
|
2588
|
+
|
|
2589
|
+
@keyframes canvas-card-pulse {
|
|
2590
|
+
0%, 100% {
|
|
2591
|
+
box-shadow: 0 0 0 1px var(--dsw-alias-state-business-primary);
|
|
2592
|
+
}
|
|
2593
|
+
50% {
|
|
2594
|
+
box-shadow: 0 0 0 1px var(--dsw-alias-state-business-primary), 0 0 6px 0 var(--dsw-alias-state-business-primary);
|
|
2595
|
+
}
|
|
2596
|
+
}
|
|
2597
|
+
|
|
2598
|
+
|
|
2599
|
+
.\\31 a8bb13e_agentCardIdle {
|
|
2600
|
+
border-style: dashed;
|
|
2601
|
+
border-color: color-mix(in srgb, var(--dsw-alias-border-l2) var(--mstar-chrome-alpha), var(--dsw-alias-bg-layer-1));
|
|
2602
|
+
}
|
|
2603
|
+
|
|
2604
|
+
.\\31 a8bb13e_agentCardIdle:hover {
|
|
2605
|
+
border-color: color-mix(in srgb, var(--dsw-alias-label-caption) var(--mstar-chrome-alpha), var(--dsw-alias-bg-layer-1));
|
|
2606
|
+
}
|
|
2607
|
+
|
|
2608
|
+
|
|
2609
|
+
.d6bf2954_agentCardDone {
|
|
2610
|
+
border-color: var(--dsw-alias-state-success-primary);
|
|
2611
|
+
box-shadow: 0 0 0 1px var(--dsw-alias-state-success-primary);
|
|
2612
|
+
}
|
|
2613
|
+
|
|
2614
|
+
.d6bf2954_agentCardDone:hover {
|
|
2615
|
+
border-color: var(--dsw-alias-state-success-primary);
|
|
2616
|
+
}
|
|
2617
|
+
|
|
2618
|
+
|
|
2619
|
+
.\\34 fd21091_agentPort {
|
|
2620
|
+
position: absolute;
|
|
2621
|
+
width: 3px;
|
|
2622
|
+
height: 3px;
|
|
2623
|
+
border-radius: 999px;
|
|
2624
|
+
background: var(--dsw-alias-label-caption);
|
|
2625
|
+
opacity: 0;
|
|
2626
|
+
pointer-events: none;
|
|
2627
|
+
transition: opacity 150ms ease;
|
|
2628
|
+
}
|
|
2629
|
+
|
|
2630
|
+
.a9030174_agentCard:hover .\\34 fd21091_agentPort {
|
|
2631
|
+
opacity: 1;
|
|
2632
|
+
}
|
|
2633
|
+
|
|
2634
|
+
.\\34 e2c7873_agentCardRunning:hover .\\34 fd21091_agentPort {
|
|
2635
|
+
background: var(--dsw-alias-state-business-primary);
|
|
2636
|
+
}
|
|
2637
|
+
|
|
2638
|
+
.\\34 fd21091_agentPort[data-agent-port='north'] {
|
|
2639
|
+
top: 0;
|
|
2640
|
+
left: 50%;
|
|
2641
|
+
transform: translate(-50%, -50%);
|
|
2642
|
+
}
|
|
2643
|
+
|
|
2644
|
+
.\\34 fd21091_agentPort[data-agent-port='south'] {
|
|
2645
|
+
bottom: 0;
|
|
2646
|
+
left: 50%;
|
|
2647
|
+
transform: translate(-50%, 50%);
|
|
2648
|
+
}
|
|
2649
|
+
|
|
2650
|
+
.\\34 fd21091_agentPort[data-agent-port='west'] {
|
|
2651
|
+
left: 0;
|
|
2652
|
+
top: 50%;
|
|
2653
|
+
transform: translate(-50%, -50%);
|
|
2654
|
+
}
|
|
2655
|
+
|
|
2656
|
+
.\\34 fd21091_agentPort[data-agent-port='east'] {
|
|
2657
|
+
right: 0;
|
|
2658
|
+
top: 50%;
|
|
2659
|
+
transform: translate(50%, -50%);
|
|
2660
|
+
}
|
|
2661
|
+
|
|
2662
|
+
|
|
2663
|
+
.c2c54212_onDemandBadge {
|
|
2664
|
+
align-self: flex-start;
|
|
2665
|
+
padding: 0 var(--mstar-space-1);
|
|
2666
|
+
border: 1px dashed color-mix(in srgb, var(--dsw-alias-state-business-primary) var(--mstar-chrome-alpha), var(--dsw-alias-bg-layer-1));
|
|
2667
|
+
border-radius: 999px;
|
|
2668
|
+
color: color-mix(in srgb, var(--dsw-alias-label-secondary) var(--mstar-chrome-alpha), var(--dsw-alias-bg-layer-1));
|
|
2669
|
+
font: var(--dsw-font-xxxs-11);
|
|
2670
|
+
}
|
|
2671
|
+
|
|
2672
|
+
|
|
2673
|
+
.\\37 78a2d3f_subBucketLabel {
|
|
2674
|
+
position: absolute;
|
|
2675
|
+
display: flex;
|
|
2676
|
+
align-items: center;
|
|
2677
|
+
gap: var(--mstar-space-1);
|
|
2678
|
+
color: var(--dsw-alias-label-caption);
|
|
2679
|
+
font: var(--dsw-font-xxxs-11);
|
|
2680
|
+
letter-spacing: 0.03em;
|
|
2681
|
+
text-transform: uppercase;
|
|
2682
|
+
}
|
|
2683
|
+
|
|
2684
|
+
|
|
2685
|
+
.\\37 78a2d3f_subBucketLabel::after {
|
|
2686
|
+
content: '';
|
|
2687
|
+
flex: 1;
|
|
2688
|
+
border-top: 1px dashed var(--dsw-alias-border-l2);
|
|
2689
|
+
}
|
|
2690
|
+
|
|
2691
|
+
|
|
2692
|
+
.\\39 94a2772_canvasEdgeSupervise {
|
|
2693
|
+
stroke: var(--dsw-alias-label-caption);
|
|
2694
|
+
stroke-width: 1.5;
|
|
2695
|
+
stroke-dasharray: 5 4;
|
|
2696
|
+
}
|
|
2697
|
+
|
|
2698
|
+
.b2bb1e47_canvasEdgeSuperviseLit {
|
|
2699
|
+
|
|
2700
|
+
stroke: var(--dsw-alias-state-business-primary);
|
|
2701
|
+
stroke-dasharray: none;
|
|
2702
|
+
}
|
|
2703
|
+
|
|
2704
|
+
.ad3aae58_canvasArrowSupervise {
|
|
2705
|
+
fill: var(--dsw-alias-label-caption);
|
|
2706
|
+
}
|
|
2707
|
+
|
|
2708
|
+
.\\32 6e265a1_canvasArrowSuperviseLit {
|
|
2709
|
+
fill: var(--dsw-alias-state-business-primary);
|
|
2710
|
+
}
|
|
2711
|
+
|
|
2712
|
+
.e7716946_agentCardLine {
|
|
2713
|
+
display: flex;
|
|
2714
|
+
align-items: center;
|
|
2715
|
+
gap: var(--mstar-space-1);
|
|
2716
|
+
min-width: 0;
|
|
2717
|
+
}
|
|
2718
|
+
|
|
2719
|
+
.a47ac04f_agentCardName {
|
|
2720
|
+
flex: 1;
|
|
2721
|
+
overflow: hidden;
|
|
2722
|
+
text-overflow: ellipsis;
|
|
2723
|
+
white-space: nowrap;
|
|
2724
|
+
color: color-mix(in srgb, var(--dsw-alias-label-primary) var(--mstar-chrome-alpha), var(--dsw-alias-bg-layer-1));
|
|
2725
|
+
font: var(--dsw-font-xxxs-11);
|
|
2726
|
+
font-weight: 600;
|
|
2727
|
+
}
|
|
2728
|
+
|
|
2729
|
+
.\\31 a8bb13e_agentCardIdle .a47ac04f_agentCardName {
|
|
2730
|
+
color: color-mix(in srgb, var(--dsw-alias-label-caption) var(--mstar-chrome-alpha), var(--dsw-alias-bg-layer-1));
|
|
2731
|
+
}
|
|
2732
|
+
|
|
2733
|
+
|
|
2734
|
+
.e2aedf35_agentCount {
|
|
2735
|
+
flex: none;
|
|
2736
|
+
min-width: 18px;
|
|
2737
|
+
padding: 0 var(--mstar-space-1);
|
|
2738
|
+
border: 1px solid color-mix(in srgb, var(--dsw-alias-border-l2) var(--mstar-chrome-alpha), var(--dsw-alias-bg-layer-1));
|
|
2739
|
+
border-radius: 999px;
|
|
2740
|
+
color: color-mix(in srgb, var(--dsw-alias-label-caption) var(--mstar-chrome-alpha), var(--dsw-alias-bg-layer-1));
|
|
2741
|
+
font: var(--dsw-font-xxxs-11);
|
|
2742
|
+
font-variant-numeric: tabular-nums;
|
|
2743
|
+
text-align: center;
|
|
2744
|
+
}
|
|
2745
|
+
|
|
2746
|
+
.e26900b4_agentRoleChip {
|
|
2747
|
+
align-self: flex-start;
|
|
2748
|
+
padding: 0 var(--mstar-space-1);
|
|
2749
|
+
border: 1px solid color-mix(in srgb, var(--dsw-alias-border-l2) var(--mstar-chrome-alpha), var(--dsw-alias-bg-layer-1));
|
|
2750
|
+
border-radius: 999px;
|
|
2751
|
+
color: color-mix(in srgb, var(--dsw-alias-label-secondary) var(--mstar-chrome-alpha), var(--dsw-alias-bg-layer-1));
|
|
2752
|
+
font: var(--dsw-font-xxxs-11);
|
|
2753
|
+
}
|
|
2754
|
+
|
|
2755
|
+
|
|
2756
|
+
.\\31 e3b3403_agentRecord {
|
|
2757
|
+
overflow: hidden;
|
|
2758
|
+
text-overflow: ellipsis;
|
|
2759
|
+
white-space: nowrap;
|
|
2760
|
+
color: color-mix(in srgb, var(--dsw-alias-label-caption) var(--mstar-chrome-alpha), var(--dsw-alias-bg-layer-1));
|
|
2761
|
+
font: var(--dsw-font-xxxs-11);
|
|
2762
|
+
font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
|
|
2763
|
+
font-variant-numeric: tabular-nums;
|
|
2764
|
+
}
|
|
2765
|
+
|
|
2766
|
+
|
|
2767
|
+
.\\30 30ace7f_agentStatusDot {
|
|
2768
|
+
flex: none;
|
|
2769
|
+
width: 8px;
|
|
2770
|
+
height: 8px;
|
|
2771
|
+
border-radius: 999px;
|
|
2772
|
+
background: currentColor;
|
|
2773
|
+
}
|
|
2774
|
+
|
|
2775
|
+
.\\32 3846eb7_agentStatusRunning {
|
|
2776
|
+
color: var(--dsw-alias-state-business-primary);
|
|
2777
|
+
box-shadow: 0 0 0 1px var(--dsw-alias-state-business-primary);
|
|
2778
|
+
}
|
|
2779
|
+
|
|
2780
|
+
.\\39 1dcfc09_agentStatusSettled {
|
|
2781
|
+
display: inline-flex;
|
|
2782
|
+
align-items: center;
|
|
2783
|
+
justify-content: center;
|
|
2784
|
+
width: 12px;
|
|
2785
|
+
height: 12px;
|
|
2786
|
+
background: none;
|
|
2787
|
+
color: var(--dsw-alias-state-success-primary);
|
|
2788
|
+
font: var(--dsw-font-xxxs-11);
|
|
2789
|
+
font-weight: 600;
|
|
2790
|
+
}
|
|
2791
|
+
|
|
2792
|
+
.eeb20a6e_agentStatusError {
|
|
2793
|
+
color: var(--dsw-alias-state-error-primary);
|
|
2794
|
+
}
|
|
2795
|
+
|
|
2796
|
+
.ec5fca43_agentStatusAdvisory {
|
|
2797
|
+
color: var(--dsw-alias-state-warn-label);
|
|
2798
|
+
}
|
|
2799
|
+
|
|
2800
|
+
.\\36 3e283ba_agentStatusIdle {
|
|
2801
|
+
color: var(--dsw-alias-label-caption);
|
|
2802
|
+
}
|
|
2803
|
+
`;
|
|
2804
|
+
var tagId3 = "@mstar-harness/dsh/agent-canvas.module.css";
|
|
2805
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId3) + "]") === null) {
|
|
2806
|
+
const tag = document.createElement("style");
|
|
2807
|
+
tag.dataset.plugin = "@mstar-harness/dsh";
|
|
2808
|
+
tag.dataset.pluginCss = tagId3;
|
|
2809
|
+
tag.textContent = css3;
|
|
2810
|
+
document.head.appendChild(tag);
|
|
2811
|
+
}
|
|
2812
|
+
var agent_canvas_module_default = { canvasPage: "62d5f9b2_canvasPage", canvasHeader: "7608ed94_canvasHeader", canvasTitle: "9e2394fd_canvasTitle", canvasSummary: "74514c6f_canvasSummary", canvasNote: "85e71ac9_canvasNote", canvasLegend: "4374ac40_canvasLegend", canvasViewport: "0ceb0467_canvasViewport", canvasContent: "48d128d6_canvasContent", canvasColumnLabel: "7f010373_canvasColumnLabel", canvasGroupLabel: "fcf0fc76_canvasGroupLabel", canvasGroupPlan: "f17a7dfb_canvasGroupPlan", canvasGroupPlanMore: "2387c06e_canvasGroupPlanMore", canvasGroupNoPlan: "4eb1cc60_canvasGroupNoPlan", canvasEdges: "d0988ac1_canvasEdges", canvasEdgeCurve: "ee3e51b3_canvasEdgeCurve", canvasEdgeActual: "e6a1115e_canvasEdgeActual", canvasArrowActual: "d3a4fb6c_canvasArrowActual", canvasCards: "44301340_canvasCards", agentCard: "a9030174_agentCard", agentCardRunning: "4e2c7873_agentCardRunning", agentCardIdle: "1a8bb13e_agentCardIdle", agentCardDone: "d6bf2954_agentCardDone", agentPort: "4fd21091_agentPort", onDemandBadge: "c2c54212_onDemandBadge", subBucketLabel: "778a2d3f_subBucketLabel", canvasEdgeSupervise: "994a2772_canvasEdgeSupervise", canvasEdgeSuperviseLit: "b2bb1e47_canvasEdgeSuperviseLit", canvasArrowSupervise: "ad3aae58_canvasArrowSupervise", canvasArrowSuperviseLit: "26e265a1_canvasArrowSuperviseLit", agentCardLine: "e7716946_agentCardLine", agentCardName: "a47ac04f_agentCardName", agentCount: "e2aedf35_agentCount", agentRoleChip: "e26900b4_agentRoleChip", agentRecord: "1e3b3403_agentRecord", agentStatusDot: "030ace7f_agentStatusDot", agentStatusRunning: "23846eb7_agentStatusRunning", agentStatusSettled: "91dcfc09_agentStatusSettled", agentStatusError: "eeb20a6e_agentStatusError", agentStatusAdvisory: "ec5fca43_agentStatusAdvisory", agentStatusIdle: "63e283ba_agentStatusIdle" };
|
|
2813
|
+
|
|
2814
|
+
// src/client/panel/pages/AgentCanvasPage.tsx
|
|
2815
|
+
var jsx_runtime7 = require("react/jsx-runtime");
|
|
2816
|
+
var PAN_ORIGIN = { x: 0, y: 0 };
|
|
2817
|
+
function panDragStart(pan, x, y) {
|
|
2818
|
+
return { originX: pan.x, originY: pan.y, startX: x, startY: y };
|
|
2819
|
+
}
|
|
2820
|
+
function panDragMove(drag, x, y) {
|
|
2821
|
+
return { x: drag.originX + (x - drag.startX), y: drag.originY + (y - drag.startY) };
|
|
2822
|
+
}
|
|
2823
|
+
function panTransform(pan) {
|
|
2824
|
+
return `translate(${pan.x}px, ${pan.y}px)`;
|
|
2825
|
+
}
|
|
2826
|
+
var COL_W = 200;
|
|
2827
|
+
var COL_GAP = 56;
|
|
2828
|
+
var CARD_W = 176;
|
|
2829
|
+
var CARD_H = 72;
|
|
2830
|
+
var ROW_GAP = 12;
|
|
2831
|
+
var PAD_X = 24;
|
|
2832
|
+
var PAD_Y = 24;
|
|
2833
|
+
var COL_PAD = 12;
|
|
2834
|
+
var LABEL_H = 18;
|
|
2835
|
+
var SUB_LABEL_H = 14;
|
|
2836
|
+
var SUB_GAP = 4;
|
|
2837
|
+
var GROUP_GAP = 24;
|
|
2838
|
+
var STANDOFF = 10;
|
|
2839
|
+
var SIDE_GAP = 18;
|
|
2840
|
+
var UNKNOWN_COLUMN = "unknown";
|
|
2841
|
+
var GENERAL_SINK_STAGE = "sdd-implement";
|
|
2842
|
+
function layoutAgents(view) {
|
|
2843
|
+
const columnIds = view.stages.map((s) => s.id);
|
|
2844
|
+
const unknownSinkId = columnIds[columnIds.length - 1] ?? UNKNOWN_COLUMN;
|
|
2845
|
+
const sddStage = view.stages.find((s) => s.stage === GENERAL_SINK_STAGE);
|
|
2846
|
+
const sddSinkId = sddStage === undefined ? unknownSinkId : sddStage.id;
|
|
2847
|
+
const buckets = new Map;
|
|
2848
|
+
for (const entity of view.entities) {
|
|
2849
|
+
const colId = entity.zone === GENERAL_BUCKET ? unknownSinkId : entity.zone === "on-demand" ? sddSinkId : entity.zone === "flow" && entity.stage !== null ? `${entity.stage.phase}:${entity.stage.stage}` : sddSinkId;
|
|
2850
|
+
const bucketId = columnIds.includes(colId) ? colId : sddSinkId;
|
|
2851
|
+
const bucket = buckets.get(bucketId);
|
|
2852
|
+
if (bucket === undefined)
|
|
2853
|
+
buckets.set(bucketId, [entity]);
|
|
2854
|
+
else
|
|
2855
|
+
bucket.push(entity);
|
|
2856
|
+
}
|
|
2857
|
+
const rawGroups = [];
|
|
2858
|
+
for (const stage of view.stages) {
|
|
2859
|
+
const last = rawGroups[rawGroups.length - 1];
|
|
2860
|
+
if (last === undefined || last.phase !== stage.phase) {
|
|
2861
|
+
rawGroups.push({
|
|
2862
|
+
phase: stage.phase,
|
|
2863
|
+
index: rawGroups.length + 1,
|
|
2864
|
+
columnIds: [stage.id],
|
|
2865
|
+
planNote: stage.phase === "autonomous-execute"
|
|
2866
|
+
});
|
|
2867
|
+
} else {
|
|
2868
|
+
last.columnIds.push(stage.id);
|
|
2869
|
+
}
|
|
2870
|
+
}
|
|
2871
|
+
const groups = rawGroups.map((g) => ({ ...g, label: { x: 0, y: 0, w: 0, h: 0 } }));
|
|
2872
|
+
const cards = new Map;
|
|
2873
|
+
const columns = [];
|
|
2874
|
+
const subBuckets = new Map;
|
|
2875
|
+
let unknown = null;
|
|
2876
|
+
const colY = PAD_Y + LABEL_H + COL_PAD;
|
|
2877
|
+
let groupX = PAD_X;
|
|
2878
|
+
let canvasBottom = colY;
|
|
2879
|
+
for (const group of groups) {
|
|
2880
|
+
const groupW = group.columnIds.length * (COL_W + COL_GAP) - COL_GAP;
|
|
2881
|
+
group.label = { x: groupX, y: PAD_Y, w: groupW, h: LABEL_H };
|
|
2882
|
+
let groupBottom = colY;
|
|
2883
|
+
group.columnIds.forEach((id, ci) => {
|
|
2884
|
+
const colX = groupX + ci * (COL_W + COL_GAP);
|
|
2885
|
+
const column = { id, x: colX, y: colY, w: COL_W, h: 0 };
|
|
2886
|
+
columns.push(column);
|
|
2887
|
+
const list = buckets.get(id) ?? [];
|
|
2888
|
+
if (id === sddSinkId && sddStage !== undefined) {
|
|
2889
|
+
const implementor = list.filter((e) => e.bucket === "implementor");
|
|
2890
|
+
const reviewer = list.filter((e) => e.bucket === "reviewer");
|
|
2891
|
+
const rest = list.filter((e) => e.bucket !== "implementor" && e.bucket !== "reviewer");
|
|
2892
|
+
const rosterIndex = new Map(KNOWN_AGENTS.map((a, i) => [a.id, i]));
|
|
2893
|
+
const implementorKey = (e) => {
|
|
2894
|
+
if (e.zone === "flow") {
|
|
2895
|
+
const i = sddStage.roles.indexOf(e.role);
|
|
2896
|
+
return i === -1 ? Number.MAX_SAFE_INTEGER : i;
|
|
2897
|
+
}
|
|
2898
|
+
if (e.zone === "on-demand") {
|
|
2899
|
+
return sddStage.roles.length + (rosterIndex.get(e.role) ?? Number.MAX_SAFE_INTEGER);
|
|
2900
|
+
}
|
|
2901
|
+
return Number.MAX_SAFE_INTEGER;
|
|
2902
|
+
};
|
|
2903
|
+
implementor.sort((a, b) => implementorKey(a) - implementorKey(b));
|
|
2904
|
+
const implLabelY = colY + LABEL_H + COL_PAD;
|
|
2905
|
+
const implCards = [];
|
|
2906
|
+
let cy = implLabelY + SUB_LABEL_H + SUB_GAP;
|
|
2907
|
+
for (const entity of implementor) {
|
|
2908
|
+
const box = { x: colX + (COL_W - CARD_W) / 2, y: cy, w: CARD_W, h: CARD_H };
|
|
2909
|
+
cards.set(entity.key, box);
|
|
2910
|
+
implCards.push(box);
|
|
2911
|
+
cy += CARD_H + ROW_GAP;
|
|
2912
|
+
}
|
|
2913
|
+
const revLabelY = cy;
|
|
2914
|
+
const revCards = [];
|
|
2915
|
+
cy = revLabelY + SUB_LABEL_H + SUB_GAP;
|
|
2916
|
+
for (const entity of reviewer) {
|
|
2917
|
+
const box = { x: colX + (COL_W - CARD_W) / 2, y: cy, w: CARD_W, h: CARD_H };
|
|
2918
|
+
cards.set(entity.key, box);
|
|
2919
|
+
revCards.push(box);
|
|
2920
|
+
cy += CARD_H + ROW_GAP;
|
|
2921
|
+
}
|
|
2922
|
+
for (const entity of rest) {
|
|
2923
|
+
const box = { x: colX + (COL_W - CARD_W) / 2, y: cy, w: CARD_W, h: CARD_H };
|
|
2924
|
+
cards.set(entity.key, box);
|
|
2925
|
+
cy += CARD_H + ROW_GAP;
|
|
2926
|
+
}
|
|
2927
|
+
const colBottom = cy - ROW_GAP;
|
|
2928
|
+
column.h = Math.max(colBottom - colY + COL_PAD, CARD_H + LABEL_H + COL_PAD * 2);
|
|
2929
|
+
const band = (boxes) => boxes.length === 0 ? null : { x: colX, y: boxes[0].y, w: COL_W, h: boxes[boxes.length - 1].y + CARD_H - boxes[0].y };
|
|
2930
|
+
const labelW = CARD_W;
|
|
2931
|
+
subBuckets.set(id, {
|
|
2932
|
+
implementor: { label: { x: colX + (COL_W - CARD_W) / 2, y: implLabelY, w: labelW }, band: band(implCards) },
|
|
2933
|
+
reviewer: { label: { x: colX + (COL_W - CARD_W) / 2, y: revLabelY, w: labelW }, band: band(revCards) }
|
|
2934
|
+
});
|
|
2935
|
+
} else if (id === unknownSinkId) {
|
|
2936
|
+
const flowList = list.filter((e) => e.zone !== GENERAL_BUCKET);
|
|
2937
|
+
const generalList = list.filter((e) => e.zone === GENERAL_BUCKET);
|
|
2938
|
+
let cy = colY + LABEL_H + COL_PAD;
|
|
2939
|
+
for (const entity of flowList) {
|
|
2940
|
+
cards.set(entity.key, { x: colX + (COL_W - CARD_W) / 2, y: cy, w: CARD_W, h: CARD_H });
|
|
2941
|
+
cy += CARD_H + ROW_GAP;
|
|
2942
|
+
}
|
|
2943
|
+
const unknownLabelY = cy;
|
|
2944
|
+
const unknownBoxes = [];
|
|
2945
|
+
cy = unknownLabelY + SUB_LABEL_H + SUB_GAP;
|
|
2946
|
+
for (const entity of generalList) {
|
|
2947
|
+
const box = { x: colX + (COL_W - CARD_W) / 2, y: cy, w: CARD_W, h: CARD_H };
|
|
2948
|
+
cards.set(entity.key, box);
|
|
2949
|
+
unknownBoxes.push(box);
|
|
2950
|
+
cy += CARD_H + ROW_GAP;
|
|
2951
|
+
}
|
|
2952
|
+
const colBottom = cy - ROW_GAP;
|
|
2953
|
+
column.h = Math.max(colBottom - colY + COL_PAD, CARD_H + LABEL_H + COL_PAD * 2);
|
|
2954
|
+
const labelW = CARD_W;
|
|
2955
|
+
unknown = {
|
|
2956
|
+
label: { x: colX + (COL_W - CARD_W) / 2, y: unknownLabelY, w: labelW },
|
|
2957
|
+
band: unknownBoxes.length === 0 ? null : { x: colX, y: unknownBoxes[0].y, w: COL_W, h: unknownBoxes[unknownBoxes.length - 1].y + CARD_H - unknownBoxes[0].y }
|
|
2958
|
+
};
|
|
2959
|
+
} else {
|
|
2960
|
+
list.forEach((entity, i) => {
|
|
2961
|
+
cards.set(entity.key, {
|
|
2962
|
+
x: colX + (COL_W - CARD_W) / 2,
|
|
2963
|
+
y: colY + LABEL_H + COL_PAD + i * (CARD_H + ROW_GAP),
|
|
2964
|
+
w: CARD_W,
|
|
2965
|
+
h: CARD_H
|
|
2966
|
+
});
|
|
2967
|
+
});
|
|
2968
|
+
const h = COL_PAD * 2 + LABEL_H + list.length * CARD_H + Math.max(0, list.length - 1) * ROW_GAP;
|
|
2969
|
+
column.h = Math.max(h, CARD_H + LABEL_H + COL_PAD * 2);
|
|
2970
|
+
}
|
|
2971
|
+
groupBottom = Math.max(groupBottom, colY + column.h);
|
|
2972
|
+
});
|
|
2973
|
+
canvasBottom = Math.max(canvasBottom, groupBottom);
|
|
2974
|
+
groupX += groupW + GROUP_GAP;
|
|
2975
|
+
}
|
|
2976
|
+
return {
|
|
2977
|
+
width: groups.length === 0 ? 0 : groupX - GROUP_GAP + PAD_X,
|
|
2978
|
+
height: canvasBottom + PAD_Y,
|
|
2979
|
+
columns,
|
|
2980
|
+
cards,
|
|
2981
|
+
subBuckets,
|
|
2982
|
+
unknown,
|
|
2983
|
+
groups
|
|
2984
|
+
};
|
|
2985
|
+
}
|
|
2986
|
+
function superviseAnchor(anchor, layout) {
|
|
2987
|
+
const idx = anchor.lastIndexOf(":");
|
|
2988
|
+
if (idx === -1)
|
|
2989
|
+
return null;
|
|
2990
|
+
const columnId = anchor.slice(0, idx);
|
|
2991
|
+
const bucket = anchor.slice(idx + 1);
|
|
2992
|
+
if (bucket !== "implementor" && bucket !== "reviewer")
|
|
2993
|
+
return null;
|
|
2994
|
+
const column = layout.columns.find((c) => c.id === columnId);
|
|
2995
|
+
if (column === undefined)
|
|
2996
|
+
return null;
|
|
2997
|
+
const geometry = layout.subBuckets.get(columnId);
|
|
2998
|
+
if (geometry === undefined)
|
|
2999
|
+
return null;
|
|
3000
|
+
const partition = bucket === "implementor" ? geometry.implementor : geometry.reviewer;
|
|
3001
|
+
const band = partition.band;
|
|
3002
|
+
if (band === null)
|
|
3003
|
+
return null;
|
|
3004
|
+
const cardLeft = column.x + (COL_W - CARD_W) / 2;
|
|
3005
|
+
const x = cardLeft + CARD_W + SIDE_GAP;
|
|
3006
|
+
const y = bucket === "implementor" ? band.y + band.h : band.y;
|
|
3007
|
+
return { x, y };
|
|
3008
|
+
}
|
|
3009
|
+
function portPoint(box, port) {
|
|
3010
|
+
switch (port) {
|
|
3011
|
+
case "north":
|
|
3012
|
+
return { x: box.x + box.w / 2, y: box.y };
|
|
3013
|
+
case "south":
|
|
3014
|
+
return { x: box.x + box.w / 2, y: box.y + box.h };
|
|
3015
|
+
case "west":
|
|
3016
|
+
return { x: box.x, y: box.y + box.h / 2 };
|
|
3017
|
+
case "east":
|
|
3018
|
+
return { x: box.x + box.w, y: box.y + box.h / 2 };
|
|
3019
|
+
}
|
|
3020
|
+
}
|
|
3021
|
+
function columnIndexOfBox(layout, box) {
|
|
3022
|
+
return layout.columns.findIndex((c) => box.x >= c.x && box.x < c.x + c.w && box.y >= c.y && box.y < c.y + c.h);
|
|
3023
|
+
}
|
|
3024
|
+
function captionRows(layout, columnId) {
|
|
3025
|
+
const rows = [];
|
|
3026
|
+
const geometry = layout.subBuckets.get(columnId);
|
|
3027
|
+
if (geometry !== undefined) {
|
|
3028
|
+
for (const p of [geometry.implementor, geometry.reviewer]) {
|
|
3029
|
+
if (p.band !== null)
|
|
3030
|
+
rows.push({ x: p.label.x, y: p.label.y, w: p.label.w, h: SUB_LABEL_H });
|
|
3031
|
+
}
|
|
3032
|
+
}
|
|
3033
|
+
const lastId = layout.columns[layout.columns.length - 1]?.id;
|
|
3034
|
+
if (columnId === lastId && layout.unknown !== null && layout.unknown.band !== null) {
|
|
3035
|
+
rows.push({ x: layout.unknown.label.x, y: layout.unknown.label.y, w: layout.unknown.label.w, h: SUB_LABEL_H });
|
|
3036
|
+
}
|
|
3037
|
+
return rows;
|
|
3038
|
+
}
|
|
3039
|
+
function intermediateCardBoxes(layout, srcCol, tgtCol) {
|
|
3040
|
+
const lo = Math.min(srcCol, tgtCol);
|
|
3041
|
+
const hi = Math.max(srcCol, tgtCol);
|
|
3042
|
+
const boxes = [];
|
|
3043
|
+
for (const box of layout.cards.values()) {
|
|
3044
|
+
const col = columnIndexOfBox(layout, box);
|
|
3045
|
+
if (col > lo && col < hi)
|
|
3046
|
+
boxes.push(box);
|
|
3047
|
+
}
|
|
3048
|
+
return boxes;
|
|
3049
|
+
}
|
|
3050
|
+
function crossesCardBody(g, layout, srcCol, tgtCol) {
|
|
3051
|
+
return intermediateCardBoxes(layout, srcCol, tgtCol).some((card) => boxOverlaps(g, card));
|
|
3052
|
+
}
|
|
3053
|
+
function horizontalBBox(sx, sy, tx, ty) {
|
|
3054
|
+
const dx = tx - sx;
|
|
3055
|
+
const off = Math.max(Math.abs(dx) / 2, 24);
|
|
3056
|
+
const dir = dx < 0 ? -1 : 1;
|
|
3057
|
+
const xs = [sx, tx, sx + dir * off, tx - dir * off];
|
|
3058
|
+
const minX = Math.min(...xs);
|
|
3059
|
+
const maxX = Math.max(...xs);
|
|
3060
|
+
const minY = Math.min(sy, ty);
|
|
3061
|
+
const maxY = Math.max(sy, ty);
|
|
3062
|
+
return { x: minX, y: minY, w: maxX - minX, h: maxY - minY };
|
|
3063
|
+
}
|
|
3064
|
+
function boxOverlaps(a, b) {
|
|
3065
|
+
return a.x < b.x + b.w && a.x + a.w > b.x && a.y < b.y + b.h && a.y + a.h > b.y;
|
|
3066
|
+
}
|
|
3067
|
+
function sideGapDetour(sx, sy, endX, endY, sourceBox, targetBox, layout, srcCol, tgtCol) {
|
|
3068
|
+
const forward = srcCol < tgtCol;
|
|
3069
|
+
const band = intermediateCardBoxes(layout, srcCol, tgtCol);
|
|
3070
|
+
const bandBottom = band.reduce((m, c) => Math.max(m, c.y + c.h), 0);
|
|
3071
|
+
const detourY = bandBottom + SIDE_GAP;
|
|
3072
|
+
const sourceGapX = forward ? sourceBox.x + sourceBox.w + SIDE_GAP : sourceBox.x - SIDE_GAP;
|
|
3073
|
+
const targetGapX = forward ? targetBox.x - SIDE_GAP : targetBox.x + targetBox.w + SIDE_GAP;
|
|
3074
|
+
const d = `M ${sx} ${sy} L ${sourceGapX} ${sy} L ${sourceGapX} ${detourY} L ${targetGapX} ${detourY} L ${targetGapX} ${endY} L ${endX} ${endY}`;
|
|
3075
|
+
return { d, x1: sx, y1: sy, x2: endX, y2: endY };
|
|
3076
|
+
}
|
|
3077
|
+
function sameColumnStandoff(gap) {
|
|
3078
|
+
return Math.min(STANDOFF, Math.max(2, gap - 8));
|
|
3079
|
+
}
|
|
3080
|
+
function crossesSameColumnCard(layout, cx, startY, endY, sourceBox, targetBox) {
|
|
3081
|
+
const seg = { x: cx, y: Math.min(startY, endY), w: 0, h: Math.abs(endY - startY) };
|
|
3082
|
+
for (const box of layout.cards.values()) {
|
|
3083
|
+
if (box === sourceBox || box === targetBox)
|
|
3084
|
+
continue;
|
|
3085
|
+
if (boxOverlaps(seg, box))
|
|
3086
|
+
return true;
|
|
3087
|
+
}
|
|
3088
|
+
return false;
|
|
3089
|
+
}
|
|
3090
|
+
function horizontalCurve(sx, sy, tx, ty) {
|
|
3091
|
+
const dx = tx - sx;
|
|
3092
|
+
const off = Math.max(Math.abs(dx) / 2, 24);
|
|
3093
|
+
const dir = dx < 0 ? -1 : 1;
|
|
3094
|
+
const d = `M ${sx} ${sy} C ${sx + dir * off} ${sy}, ${tx - dir * off} ${ty}, ${tx} ${ty}`;
|
|
3095
|
+
return { d, x1: sx, y1: sy, x2: tx, y2: ty };
|
|
3096
|
+
}
|
|
3097
|
+
function verticalCurve(sx, sy, tx, ty) {
|
|
3098
|
+
const span = ty - sy;
|
|
3099
|
+
const d = `M ${sx} ${sy} C ${sx} ${sy + span / 3}, ${tx} ${ty - span / 3}, ${tx} ${ty}`;
|
|
3100
|
+
return { d, x1: sx, y1: sy, x2: tx, y2: ty };
|
|
3101
|
+
}
|
|
3102
|
+
function edgePath(edge, layout) {
|
|
3103
|
+
if (edge.kind === "supervise") {
|
|
3104
|
+
const source = superviseAnchor(edge.source, layout);
|
|
3105
|
+
const target = superviseAnchor(edge.target, layout);
|
|
3106
|
+
if (source === null || target === null)
|
|
3107
|
+
return null;
|
|
3108
|
+
return verticalCurve(source.x, source.y, target.x, target.y);
|
|
3109
|
+
}
|
|
3110
|
+
const sourceBox = layout.cards.get(edge.source);
|
|
3111
|
+
const targetBox = layout.cards.get(edge.target);
|
|
3112
|
+
if (sourceBox === undefined || targetBox === undefined)
|
|
3113
|
+
return null;
|
|
3114
|
+
const srcCol = columnIndexOfBox(layout, sourceBox);
|
|
3115
|
+
const tgtCol = columnIndexOfBox(layout, targetBox);
|
|
3116
|
+
if (srcCol < tgtCol) {
|
|
3117
|
+
const s = portPoint(sourceBox, "east");
|
|
3118
|
+
const t = portPoint(targetBox, "west");
|
|
3119
|
+
const endX = t.x - STANDOFF;
|
|
3120
|
+
if (crossesCardBody(horizontalBBox(s.x, s.y, endX, t.y), layout, srcCol, tgtCol)) {
|
|
3121
|
+
return sideGapDetour(s.x, s.y, endX, t.y, sourceBox, targetBox, layout, srcCol, tgtCol);
|
|
3122
|
+
}
|
|
3123
|
+
return horizontalCurve(s.x, s.y, endX, t.y);
|
|
3124
|
+
}
|
|
3125
|
+
if (srcCol > tgtCol) {
|
|
3126
|
+
const s = portPoint(sourceBox, "west");
|
|
3127
|
+
const t = portPoint(targetBox, "east");
|
|
3128
|
+
const endX = t.x + STANDOFF;
|
|
3129
|
+
if (crossesCardBody(horizontalBBox(s.x, s.y, endX, t.y), layout, srcCol, tgtCol)) {
|
|
3130
|
+
return sideGapDetour(s.x, s.y, endX, t.y, sourceBox, targetBox, layout, srcCol, tgtCol);
|
|
3131
|
+
}
|
|
3132
|
+
return horizontalCurve(s.x, s.y, endX, t.y);
|
|
3133
|
+
}
|
|
3134
|
+
const forward = sourceBox.y + sourceBox.h <= targetBox.y;
|
|
3135
|
+
const gap = forward ? targetBox.y - (sourceBox.y + sourceBox.h) : sourceBox.y - (targetBox.y + targetBox.h);
|
|
3136
|
+
const standoff = sameColumnStandoff(gap);
|
|
3137
|
+
const cx = sourceBox.x + sourceBox.w / 2;
|
|
3138
|
+
const startY = forward ? sourceBox.y + sourceBox.h : sourceBox.y;
|
|
3139
|
+
const endY = forward ? targetBox.y - standoff : targetBox.y + targetBox.h + standoff;
|
|
3140
|
+
const colId = layout.columns[srcCol]?.id;
|
|
3141
|
+
const crossesCaption = colId !== undefined && captionRows(layout, colId).some((row) => cx >= row.x && cx <= row.x + row.w && Math.min(startY, endY) < row.y + row.h && Math.max(startY, endY) > row.y);
|
|
3142
|
+
if (crossesCaption || crossesSameColumnCard(layout, cx, startY, endY, sourceBox, targetBox)) {
|
|
3143
|
+
const sideX = sourceBox.x - SIDE_GAP;
|
|
3144
|
+
return verticalCurve(sideX, startY, sideX, endY);
|
|
3145
|
+
}
|
|
3146
|
+
return verticalCurve(cx, startY, cx, endY);
|
|
3147
|
+
}
|
|
3148
|
+
function StatusPoint({ status, done }) {
|
|
3149
|
+
const className = agent_canvas_module_default.agentStatusDot + (status === "running" ? ` ${agent_canvas_module_default.agentStatusRunning}` : status === "settled" ? done ? ` ${agent_canvas_module_default.agentStatusSettled}` : ` ${agent_canvas_module_default.agentStatusIdle}` : status === "error" || status === "denied" ? ` ${agent_canvas_module_default.agentStatusError}` : status === "advisory" ? ` ${agent_canvas_module_default.agentStatusAdvisory}` : ` ${agent_canvas_module_default.agentStatusIdle}`);
|
|
3150
|
+
if (status === "settled" && done) {
|
|
3151
|
+
return /* @__PURE__ */ jsx_runtime7.jsx("span", {
|
|
3152
|
+
className,
|
|
3153
|
+
"data-agent-status": status,
|
|
3154
|
+
"data-agent-done": "true",
|
|
3155
|
+
"aria-label": "settled",
|
|
3156
|
+
children: "✓"
|
|
3157
|
+
});
|
|
3158
|
+
}
|
|
3159
|
+
return /* @__PURE__ */ jsx_runtime7.jsx("span", {
|
|
3160
|
+
className,
|
|
3161
|
+
"data-agent-status": status,
|
|
3162
|
+
"aria-hidden": "true"
|
|
3163
|
+
});
|
|
3164
|
+
}
|
|
3165
|
+
function EntityCard({ entity, t, box }) {
|
|
3166
|
+
const running = entity.status === "running";
|
|
3167
|
+
const done = entity.status === "settled" && entity.emphasis !== "off";
|
|
3168
|
+
const title = entity.idle ? entity.name : entity.role !== "" ? entity.role : entity.name;
|
|
3169
|
+
const record = [];
|
|
3170
|
+
if (entity.agent !== null)
|
|
3171
|
+
record.push(entity.agent);
|
|
3172
|
+
if (entity.task !== null)
|
|
3173
|
+
record.push(entity.task);
|
|
3174
|
+
return /* @__PURE__ */ jsx_runtime7.jsxs("li", {
|
|
3175
|
+
className: entity.idle ? `${agent_canvas_module_default.agentCard} ${agent_canvas_module_default.agentCardIdle}` : running ? `${agent_canvas_module_default.agentCard} ${agent_canvas_module_default.agentCardRunning}` : done ? `${agent_canvas_module_default.agentCard} ${agent_canvas_module_default.agentCardDone}` : agent_canvas_module_default.agentCard,
|
|
3176
|
+
style: { left: box.x, top: box.y, width: box.w, height: box.h },
|
|
3177
|
+
"data-agent-entity": entity.key,
|
|
3178
|
+
"data-agent-status": entity.status,
|
|
3179
|
+
"data-agent-idle": entity.idle ? "true" : undefined,
|
|
3180
|
+
"data-agent-running": running ? "true" : undefined,
|
|
3181
|
+
"data-agent-done": done ? "true" : "false",
|
|
3182
|
+
"data-agent-stage": entity.stage === null ? entity.zone : `${entity.stage.phase}:${entity.stage.stage}`,
|
|
3183
|
+
"data-agent-bucket": entity.bucket ?? undefined,
|
|
3184
|
+
"data-agent-emphasis": entity.emphasis ?? undefined,
|
|
3185
|
+
children: [
|
|
3186
|
+
entity.zone === "on-demand" && /* @__PURE__ */ jsx_runtime7.jsx("span", {
|
|
3187
|
+
className: agent_canvas_module_default.onDemandBadge,
|
|
3188
|
+
"data-agent-on-demand": "true",
|
|
3189
|
+
children: t("zone.agents.on-demand")
|
|
3190
|
+
}),
|
|
3191
|
+
/* @__PURE__ */ jsx_runtime7.jsx("span", {
|
|
3192
|
+
className: agent_canvas_module_default.agentPort,
|
|
3193
|
+
"data-agent-port": "north",
|
|
3194
|
+
"aria-hidden": "true"
|
|
3195
|
+
}),
|
|
3196
|
+
/* @__PURE__ */ jsx_runtime7.jsx("span", {
|
|
3197
|
+
className: agent_canvas_module_default.agentPort,
|
|
3198
|
+
"data-agent-port": "south",
|
|
3199
|
+
"aria-hidden": "true"
|
|
3200
|
+
}),
|
|
3201
|
+
/* @__PURE__ */ jsx_runtime7.jsx("span", {
|
|
3202
|
+
className: agent_canvas_module_default.agentPort,
|
|
3203
|
+
"data-agent-port": "west",
|
|
3204
|
+
"aria-hidden": "true"
|
|
3205
|
+
}),
|
|
3206
|
+
/* @__PURE__ */ jsx_runtime7.jsx("span", {
|
|
3207
|
+
className: agent_canvas_module_default.agentPort,
|
|
3208
|
+
"data-agent-port": "east",
|
|
3209
|
+
"aria-hidden": "true"
|
|
3210
|
+
}),
|
|
3211
|
+
/* @__PURE__ */ jsx_runtime7.jsxs("div", {
|
|
3212
|
+
className: agent_canvas_module_default.agentCardLine,
|
|
3213
|
+
children: [
|
|
3214
|
+
/* @__PURE__ */ jsx_runtime7.jsx("span", {
|
|
3215
|
+
className: agent_canvas_module_default.agentCardName,
|
|
3216
|
+
title,
|
|
3217
|
+
children: title
|
|
3218
|
+
}),
|
|
3219
|
+
/* @__PURE__ */ jsx_runtime7.jsx(StatusPoint, {
|
|
3220
|
+
status: entity.status,
|
|
3221
|
+
done
|
|
3222
|
+
}),
|
|
3223
|
+
entity.count > 1 && /* @__PURE__ */ jsx_runtime7.jsx("span", {
|
|
3224
|
+
className: agent_canvas_module_default.agentCount,
|
|
3225
|
+
"data-agent-count": entity.count,
|
|
3226
|
+
children: `×${entity.count}`
|
|
3227
|
+
})
|
|
3228
|
+
]
|
|
3229
|
+
}),
|
|
3230
|
+
entity.role !== "" && entity.role !== entity.key && /* @__PURE__ */ jsx_runtime7.jsx("span", {
|
|
3231
|
+
className: agent_canvas_module_default.agentRoleChip,
|
|
3232
|
+
"data-agent-role": entity.role,
|
|
3233
|
+
children: entity.role
|
|
3234
|
+
}),
|
|
3235
|
+
record.length > 0 && /* @__PURE__ */ jsx_runtime7.jsx("span", {
|
|
3236
|
+
className: agent_canvas_module_default.agentRecord,
|
|
3237
|
+
"data-agent-record": true,
|
|
3238
|
+
children: record.join(" · ")
|
|
3239
|
+
})
|
|
3240
|
+
]
|
|
3241
|
+
});
|
|
3242
|
+
}
|
|
3243
|
+
function AgentCanvasPage({ view, iteration, t, initialPan }) {
|
|
3244
|
+
const { entities, edges, degraded, note, executing, pending } = view;
|
|
3245
|
+
const [pan, setPan] = import_react2.useState(() => initialPan ?? PAN_ORIGIN);
|
|
3246
|
+
const dragRef = import_react2.useRef(null);
|
|
3247
|
+
const layout = import_react2.useMemo(() => layoutAgents(view), [view]);
|
|
3248
|
+
const edgeGeoms = import_react2.useMemo(() => edges.map((edge) => ({ edge, curve: edgePath(edge, layout) })), [edges, layout]);
|
|
3249
|
+
const handlePointerDown = (e) => {
|
|
3250
|
+
if (e.button !== 0 || !e.isPrimary)
|
|
3251
|
+
return;
|
|
3252
|
+
e.preventDefault();
|
|
3253
|
+
e.currentTarget.setPointerCapture(e.pointerId);
|
|
3254
|
+
dragRef.current = panDragStart(pan, e.clientX, e.clientY);
|
|
3255
|
+
};
|
|
3256
|
+
const handlePointerMove = (e) => {
|
|
3257
|
+
const drag = dragRef.current;
|
|
3258
|
+
if (drag === null)
|
|
3259
|
+
return;
|
|
3260
|
+
setPan(panDragMove(drag, e.clientX, e.clientY));
|
|
3261
|
+
};
|
|
3262
|
+
const handlePointerEnd = (e) => {
|
|
3263
|
+
dragRef.current = null;
|
|
3264
|
+
if (e.currentTarget.hasPointerCapture(e.pointerId)) {
|
|
3265
|
+
e.currentTarget.releasePointerCapture(e.pointerId);
|
|
3266
|
+
}
|
|
3267
|
+
};
|
|
3268
|
+
const noteInfo = degraded ? { anchor: "degraded", text: t("flow.degraded") } : note === "empty" ? { anchor: "empty", text: t("flow.empty") } : note === "settle-only" ? { anchor: "settle-only", text: t("flow.settle-only") } : null;
|
|
3269
|
+
return /* @__PURE__ */ jsx_runtime7.jsxs("div", {
|
|
3270
|
+
className: agent_canvas_module_default.canvasPage,
|
|
3271
|
+
"data-mstar-page": "agents",
|
|
3272
|
+
children: [
|
|
3273
|
+
/* @__PURE__ */ jsx_runtime7.jsx(IterationInfoSection, {
|
|
3274
|
+
iteration,
|
|
3275
|
+
t
|
|
3276
|
+
}),
|
|
3277
|
+
/* @__PURE__ */ jsx_runtime7.jsxs("header", {
|
|
3278
|
+
className: agent_canvas_module_default.canvasHeader,
|
|
3279
|
+
children: [
|
|
3280
|
+
/* @__PURE__ */ jsx_runtime7.jsx("h2", {
|
|
3281
|
+
className: agent_canvas_module_default.canvasTitle,
|
|
3282
|
+
children: t("zone.agents.title")
|
|
3283
|
+
}),
|
|
3284
|
+
/* @__PURE__ */ jsx_runtime7.jsx("span", {
|
|
3285
|
+
className: agent_canvas_module_default.canvasSummary,
|
|
3286
|
+
"data-agent-summary": true,
|
|
3287
|
+
"data-agent-summary-executing": executing,
|
|
3288
|
+
"data-agent-summary-pending": pending,
|
|
3289
|
+
children: t("zone.agents.summary", { executing: String(executing), pending: String(pending) })
|
|
3290
|
+
})
|
|
3291
|
+
]
|
|
3292
|
+
}),
|
|
3293
|
+
noteInfo !== null && /* @__PURE__ */ jsx_runtime7.jsx("p", {
|
|
3294
|
+
className: agent_canvas_module_default.canvasNote,
|
|
3295
|
+
"data-canvas-note": noteInfo.anchor,
|
|
3296
|
+
children: noteInfo.text
|
|
3297
|
+
}),
|
|
3298
|
+
/* @__PURE__ */ jsx_runtime7.jsx("div", {
|
|
3299
|
+
className: agent_canvas_module_default.canvasViewport,
|
|
3300
|
+
"data-canvas-viewport": true,
|
|
3301
|
+
onPointerDown: handlePointerDown,
|
|
3302
|
+
onPointerMove: handlePointerMove,
|
|
3303
|
+
onPointerUp: handlePointerEnd,
|
|
3304
|
+
onPointerCancel: handlePointerEnd,
|
|
3305
|
+
onLostPointerCapture: handlePointerEnd,
|
|
3306
|
+
children: /* @__PURE__ */ jsx_runtime7.jsxs("div", {
|
|
3307
|
+
className: agent_canvas_module_default.canvasContent,
|
|
3308
|
+
"data-canvas-pan": true,
|
|
3309
|
+
style: { transform: panTransform(pan), width: layout.width, height: layout.height },
|
|
3310
|
+
children: [
|
|
3311
|
+
layout.groups.map((group) => /* @__PURE__ */ jsx_runtime7.jsxs("span", {
|
|
3312
|
+
className: agent_canvas_module_default.canvasGroupLabel,
|
|
3313
|
+
style: { left: group.label.x, top: group.label.y, width: group.label.w },
|
|
3314
|
+
"data-canvas-group": group.phase,
|
|
3315
|
+
"data-canvas-group-index": group.index,
|
|
3316
|
+
children: [
|
|
3317
|
+
group.phase === "iteration-start" ? t("zone.agents.group.phase-1") : group.phase === "autonomous-execute" ? t("zone.agents.group.phase-2") : t("zone.agents.group.phase-n", { n: String(group.index) }),
|
|
3318
|
+
group.planNote && (view.activePlanId === null ? /* @__PURE__ */ jsx_runtime7.jsx("span", {
|
|
3319
|
+
className: agent_canvas_module_default.canvasGroupNoPlan,
|
|
3320
|
+
"data-canvas-group-no-plan": true,
|
|
3321
|
+
children: t("zone.agents.group.no-plan")
|
|
3322
|
+
}) : /* @__PURE__ */ jsx_runtime7.jsxs("span", {
|
|
3323
|
+
className: agent_canvas_module_default.canvasGroupPlan,
|
|
3324
|
+
"data-canvas-group-plan": view.activePlanId,
|
|
3325
|
+
children: [
|
|
3326
|
+
t("zone.agents.group.plan", { plan: view.activePlanId }),
|
|
3327
|
+
view.activePlanCount > 1 && /* @__PURE__ */ jsx_runtime7.jsx("span", {
|
|
3328
|
+
className: agent_canvas_module_default.canvasGroupPlanMore,
|
|
3329
|
+
"data-canvas-group-plan-more": true,
|
|
3330
|
+
children: t("zone.agents.group.plan-more", { n: String(view.activePlanCount - 1) })
|
|
3331
|
+
})
|
|
3332
|
+
]
|
|
3333
|
+
}))
|
|
3334
|
+
]
|
|
3335
|
+
}, group.phase)),
|
|
3336
|
+
layout.columns.map((col) => /* @__PURE__ */ jsx_runtime7.jsx("span", {
|
|
3337
|
+
className: agent_canvas_module_default.canvasColumnLabel,
|
|
3338
|
+
style: { left: col.x, top: col.y },
|
|
3339
|
+
"data-canvas-column": col.id,
|
|
3340
|
+
children: col.id.slice(col.id.indexOf(":") + 1)
|
|
3341
|
+
}, col.id)),
|
|
3342
|
+
Array.from(layout.subBuckets.entries()).map(([colId, geometry]) => /* @__PURE__ */ jsx_runtime7.jsxs("span", {
|
|
3343
|
+
children: [
|
|
3344
|
+
geometry.implementor.band !== null && /* @__PURE__ */ jsx_runtime7.jsx("span", {
|
|
3345
|
+
className: agent_canvas_module_default.subBucketLabel,
|
|
3346
|
+
style: { left: geometry.implementor.label.x, top: geometry.implementor.label.y, width: geometry.implementor.label.w },
|
|
3347
|
+
"data-sub-bucket": "implementor",
|
|
3348
|
+
children: t("zone.agents.bucket.implementor")
|
|
3349
|
+
}),
|
|
3350
|
+
geometry.reviewer.band !== null && /* @__PURE__ */ jsx_runtime7.jsx("span", {
|
|
3351
|
+
className: agent_canvas_module_default.subBucketLabel,
|
|
3352
|
+
style: { left: geometry.reviewer.label.x, top: geometry.reviewer.label.y, width: geometry.reviewer.label.w },
|
|
3353
|
+
"data-sub-bucket": "reviewer",
|
|
3354
|
+
children: t("zone.agents.bucket.reviewer")
|
|
3355
|
+
})
|
|
3356
|
+
]
|
|
3357
|
+
}, colId)),
|
|
3358
|
+
layout.unknown !== null && layout.unknown.band !== null && /* @__PURE__ */ jsx_runtime7.jsx("span", {
|
|
3359
|
+
className: agent_canvas_module_default.subBucketLabel,
|
|
3360
|
+
style: { left: layout.unknown.label.x, top: layout.unknown.label.y, width: layout.unknown.label.w },
|
|
3361
|
+
"data-sub-bucket": UNKNOWN_COLUMN,
|
|
3362
|
+
children: t("zone.agents.unknown-sub")
|
|
3363
|
+
}),
|
|
3364
|
+
/* @__PURE__ */ jsx_runtime7.jsxs("svg", {
|
|
3365
|
+
className: agent_canvas_module_default.canvasEdges,
|
|
3366
|
+
width: layout.width,
|
|
3367
|
+
height: layout.height,
|
|
3368
|
+
"aria-hidden": "true",
|
|
3369
|
+
children: [
|
|
3370
|
+
/* @__PURE__ */ jsx_runtime7.jsxs("defs", {
|
|
3371
|
+
children: [
|
|
3372
|
+
/* @__PURE__ */ jsx_runtime7.jsx("marker", {
|
|
3373
|
+
id: "canvas-arrow-actual",
|
|
3374
|
+
markerUnits: "userSpaceOnUse",
|
|
3375
|
+
viewBox: "0 0 6 8",
|
|
3376
|
+
refX: "6",
|
|
3377
|
+
refY: "4",
|
|
3378
|
+
markerWidth: "6",
|
|
3379
|
+
markerHeight: "8",
|
|
3380
|
+
orient: "auto",
|
|
3381
|
+
children: /* @__PURE__ */ jsx_runtime7.jsx("path", {
|
|
3382
|
+
className: agent_canvas_module_default.canvasArrowActual,
|
|
3383
|
+
d: "M 0 1 L 6 4 L 0 7 z"
|
|
3384
|
+
})
|
|
3385
|
+
}),
|
|
3386
|
+
/* @__PURE__ */ jsx_runtime7.jsx("marker", {
|
|
3387
|
+
id: "canvas-arrow-supervise",
|
|
3388
|
+
markerUnits: "userSpaceOnUse",
|
|
3389
|
+
viewBox: "0 0 6 8",
|
|
3390
|
+
refX: "6",
|
|
3391
|
+
refY: "4",
|
|
3392
|
+
markerWidth: "6",
|
|
3393
|
+
markerHeight: "8",
|
|
3394
|
+
orient: "auto-start-reverse",
|
|
3395
|
+
children: /* @__PURE__ */ jsx_runtime7.jsx("path", {
|
|
3396
|
+
className: agent_canvas_module_default.canvasArrowSupervise,
|
|
3397
|
+
d: "M 0 1 L 6 4 L 0 7 z"
|
|
3398
|
+
})
|
|
3399
|
+
}),
|
|
3400
|
+
/* @__PURE__ */ jsx_runtime7.jsx("marker", {
|
|
3401
|
+
id: "canvas-arrow-supervise-lit",
|
|
3402
|
+
markerUnits: "userSpaceOnUse",
|
|
3403
|
+
viewBox: "0 0 6 8",
|
|
3404
|
+
refX: "6",
|
|
3405
|
+
refY: "4",
|
|
3406
|
+
markerWidth: "6",
|
|
3407
|
+
markerHeight: "8",
|
|
3408
|
+
orient: "auto-start-reverse",
|
|
3409
|
+
children: /* @__PURE__ */ jsx_runtime7.jsx("path", {
|
|
3410
|
+
className: agent_canvas_module_default.canvasArrowSuperviseLit,
|
|
3411
|
+
d: "M 0 1 L 6 4 L 0 7 z"
|
|
3412
|
+
})
|
|
3413
|
+
})
|
|
3414
|
+
]
|
|
3415
|
+
}),
|
|
3416
|
+
edgeGeoms.map((geom, i) => {
|
|
3417
|
+
const curve = geom.curve;
|
|
3418
|
+
if (curve === null)
|
|
3419
|
+
return null;
|
|
3420
|
+
if (geom.edge.kind === "supervise") {
|
|
3421
|
+
const lit = geom.edge.evidenced === true;
|
|
3422
|
+
return /* @__PURE__ */ jsx_runtime7.jsx("path", {
|
|
3423
|
+
className: `${agent_canvas_module_default.canvasEdgeCurve} ${lit ? `${agent_canvas_module_default.canvasEdgeSupervise} ${agent_canvas_module_default.canvasEdgeSuperviseLit}` : agent_canvas_module_default.canvasEdgeSupervise}`,
|
|
3424
|
+
d: curve.d,
|
|
3425
|
+
markerStart: lit ? "url(#canvas-arrow-supervise-lit)" : "url(#canvas-arrow-supervise)",
|
|
3426
|
+
markerEnd: lit ? "url(#canvas-arrow-supervise-lit)" : "url(#canvas-arrow-supervise)",
|
|
3427
|
+
"data-agent-edge-supervise": `${geom.edge.source}->${geom.edge.target}`,
|
|
3428
|
+
"data-agent-edge-supervise-lit": lit ? "true" : undefined
|
|
3429
|
+
}, `supervise-${i}-${geom.edge.source}-${geom.edge.target}`);
|
|
3430
|
+
}
|
|
3431
|
+
return /* @__PURE__ */ jsx_runtime7.jsx("path", {
|
|
3432
|
+
className: `${agent_canvas_module_default.canvasEdgeCurve} ${agent_canvas_module_default.canvasEdgeActual}`,
|
|
3433
|
+
d: curve.d,
|
|
3434
|
+
markerEnd: "url(#canvas-arrow-actual)",
|
|
3435
|
+
"data-agent-edge-actual": `${geom.edge.source}->${geom.edge.target}`
|
|
3436
|
+
}, `actual-${i}-${geom.edge.source}-${geom.edge.target}`);
|
|
3437
|
+
})
|
|
3438
|
+
]
|
|
3439
|
+
}),
|
|
3440
|
+
/* @__PURE__ */ jsx_runtime7.jsx("ul", {
|
|
3441
|
+
className: agent_canvas_module_default.canvasCards,
|
|
3442
|
+
children: entities.map((entity) => {
|
|
3443
|
+
const box = layout.cards.get(entity.key);
|
|
3444
|
+
if (box === undefined)
|
|
3445
|
+
return null;
|
|
3446
|
+
return /* @__PURE__ */ jsx_runtime7.jsx(EntityCard, {
|
|
3447
|
+
entity,
|
|
3448
|
+
t,
|
|
3449
|
+
box
|
|
3450
|
+
}, entity.key);
|
|
3451
|
+
})
|
|
3452
|
+
})
|
|
3453
|
+
]
|
|
3454
|
+
})
|
|
3455
|
+
}),
|
|
3456
|
+
/* @__PURE__ */ jsx_runtime7.jsx("div", {
|
|
3457
|
+
className: agent_canvas_module_default.canvasLegend,
|
|
3458
|
+
children: /* @__PURE__ */ jsx_runtime7.jsx(Legend, {
|
|
3459
|
+
t
|
|
3460
|
+
})
|
|
3461
|
+
})
|
|
3462
|
+
]
|
|
3463
|
+
});
|
|
3464
|
+
}
|
|
3465
|
+
|
|
3466
|
+
// src/client/panel/graph/event-log.ts
|
|
3467
|
+
function taskTag(event) {
|
|
3468
|
+
if (event.planId !== null && event.taskId !== null)
|
|
3469
|
+
return `${event.planId}#${event.taskId}`;
|
|
3470
|
+
if (event.planId !== null)
|
|
3471
|
+
return event.planId;
|
|
3472
|
+
if (event.taskId !== null)
|
|
3473
|
+
return `#${event.taskId}`;
|
|
3474
|
+
return "";
|
|
3475
|
+
}
|
|
3476
|
+
function eventEntryOf(event) {
|
|
3477
|
+
return {
|
|
3478
|
+
kind: "event",
|
|
3479
|
+
id: event.id,
|
|
3480
|
+
eventKind: event.kind,
|
|
3481
|
+
role: event.role,
|
|
3482
|
+
agent: event.agent ?? "",
|
|
3483
|
+
stage: event.stage === null ? "" : `${event.stage.phase}:${event.stage.stage}`,
|
|
3484
|
+
task: taskTag(event),
|
|
3485
|
+
ts: event.ts,
|
|
3486
|
+
status: event.status,
|
|
3487
|
+
settled: event.settled,
|
|
3488
|
+
durationMs: event.durationMs,
|
|
3489
|
+
expected: event.expected
|
|
3490
|
+
};
|
|
3491
|
+
}
|
|
3492
|
+
function eventLogEntries(view) {
|
|
3493
|
+
const entries = view.events.map(eventEntryOf);
|
|
3494
|
+
view.violations.forEach((violation, i) => {
|
|
3495
|
+
entries.push({
|
|
3496
|
+
kind: "violation",
|
|
3497
|
+
id: `violation-${i}`,
|
|
3498
|
+
severity: violation.severity,
|
|
3499
|
+
code: violation.code,
|
|
3500
|
+
message: violation.message
|
|
3501
|
+
});
|
|
3502
|
+
});
|
|
3503
|
+
return entries;
|
|
3504
|
+
}
|
|
3505
|
+
|
|
3506
|
+
// src/client/panel/pages/event-log.module.css
|
|
3507
|
+
var css4 = `
|
|
3508
|
+
|
|
3509
|
+
|
|
3510
|
+
|
|
3511
|
+
.\\38 e395e34_eventLogPage {
|
|
3512
|
+
flex: 1;
|
|
3513
|
+
min-height: 0;
|
|
3514
|
+
display: grid;
|
|
3515
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
3516
|
+
grid-template-rows: minmax(0, 1fr);
|
|
3517
|
+
gap: var(--mstar-space-3);
|
|
3518
|
+
padding: var(--mstar-space-3);
|
|
3519
|
+
overflow: hidden;
|
|
3520
|
+
}
|
|
3521
|
+
|
|
3522
|
+
|
|
3523
|
+
|
|
3524
|
+
.fcdd0ccc_section {
|
|
3525
|
+
display: flex;
|
|
3526
|
+
flex-direction: column;
|
|
3527
|
+
gap: var(--mstar-space-2);
|
|
3528
|
+
min-width: 0;
|
|
3529
|
+
min-height: 0;
|
|
3530
|
+
padding: var(--mstar-space-3);
|
|
3531
|
+
border: 1px solid var(--dsw-alias-border-l1);
|
|
3532
|
+
border-radius: 8px;
|
|
3533
|
+
background: var(--dsw-alias-bg-layer-1);
|
|
3534
|
+
color: var(--dsw-alias-label-secondary);
|
|
3535
|
+
font: var(--dsw-font-xxxs-11);
|
|
3536
|
+
}
|
|
3537
|
+
|
|
3538
|
+
.aded23ea_sectionTitle {
|
|
3539
|
+
margin: 0;
|
|
3540
|
+
color: var(--dsw-alias-label-secondary);
|
|
3541
|
+
font: var(--dsw-font-xxs-12);
|
|
3542
|
+
font-weight: 600;
|
|
3543
|
+
letter-spacing: 0.03em;
|
|
3544
|
+
text-transform: uppercase;
|
|
3545
|
+
}
|
|
3546
|
+
|
|
3547
|
+
|
|
3548
|
+
.\\31 8a7beee_empty {
|
|
3549
|
+
margin: 0;
|
|
3550
|
+
color: var(--dsw-alias-label-caption);
|
|
3551
|
+
font: var(--dsw-font-xxs-12);
|
|
3552
|
+
}
|
|
3553
|
+
|
|
3554
|
+
|
|
3555
|
+
|
|
3556
|
+
.\\34 0959323_rowList {
|
|
3557
|
+
display: flex;
|
|
3558
|
+
flex-direction: column;
|
|
3559
|
+
gap: var(--mstar-space-1);
|
|
3560
|
+
margin: 0;
|
|
3561
|
+
padding: 0;
|
|
3562
|
+
list-style: none;
|
|
3563
|
+
flex: 1;
|
|
3564
|
+
min-height: 0;
|
|
3565
|
+
overflow-y: auto;
|
|
3566
|
+
}
|
|
3567
|
+
|
|
3568
|
+
|
|
3569
|
+
.\\35 a6ad2b9_eventSummary,
|
|
3570
|
+
.c5acc9f0_violationSummary {
|
|
3571
|
+
display: flex;
|
|
3572
|
+
align-items: center;
|
|
3573
|
+
flex-wrap: wrap;
|
|
3574
|
+
gap: var(--mstar-space-2);
|
|
3575
|
+
min-width: 0;
|
|
3576
|
+
padding: var(--mstar-space-1) var(--mstar-space-2);
|
|
3577
|
+
border-radius: 8px;
|
|
3578
|
+
color: var(--dsw-alias-label-secondary);
|
|
3579
|
+
cursor: pointer;
|
|
3580
|
+
transition: color 150ms ease;
|
|
3581
|
+
list-style: none;
|
|
3582
|
+
}
|
|
3583
|
+
|
|
3584
|
+
|
|
3585
|
+
.\\35 a6ad2b9_eventSummary::-webkit-details-marker,
|
|
3586
|
+
.c5acc9f0_violationSummary::-webkit-details-marker {
|
|
3587
|
+
display: none;
|
|
3588
|
+
}
|
|
3589
|
+
|
|
3590
|
+
.\\35 a6ad2b9_eventSummary::marker,
|
|
3591
|
+
.c5acc9f0_violationSummary::marker {
|
|
3592
|
+
content: '';
|
|
3593
|
+
}
|
|
3594
|
+
|
|
3595
|
+
.\\35 a6ad2b9_eventSummary::before,
|
|
3596
|
+
.c5acc9f0_violationSummary::before {
|
|
3597
|
+
content: '▸';
|
|
3598
|
+
flex: none;
|
|
3599
|
+
color: var(--dsw-alias-label-caption);
|
|
3600
|
+
font: var(--dsw-font-xxxs-11);
|
|
3601
|
+
line-height: 1;
|
|
3602
|
+
transition: transform 150ms ease;
|
|
3603
|
+
}
|
|
3604
|
+
|
|
3605
|
+
.\\31 e6e6b57_eventDetails[open] > .\\35 a6ad2b9_eventSummary::before,
|
|
3606
|
+
.\\31 e6e6b57_eventDetails[open] > .c5acc9f0_violationSummary::before {
|
|
3607
|
+
transform: rotate(90deg);
|
|
3608
|
+
}
|
|
3609
|
+
|
|
3610
|
+
.\\35 a6ad2b9_eventSummary:hover,
|
|
3611
|
+
.c5acc9f0_violationSummary:hover {
|
|
3612
|
+
color: var(--dsw-alias-label-primary);
|
|
3613
|
+
}
|
|
3614
|
+
|
|
3615
|
+
.\\33 97ccf2b_eventRole {
|
|
3616
|
+
font-weight: 600;
|
|
3617
|
+
color: var(--dsw-alias-label-primary);
|
|
3618
|
+
}
|
|
3619
|
+
|
|
3620
|
+
.\\31 8dd486b_eventStage,
|
|
3621
|
+
.\\39 0ce3f22_eventTarget {
|
|
3622
|
+
overflow-wrap: anywhere;
|
|
3623
|
+
}
|
|
3624
|
+
|
|
3625
|
+
.ae6064ce_eventTime,
|
|
3626
|
+
.ff483c84_eventAgent,
|
|
3627
|
+
.\\33 e37545b_eventDuration {
|
|
3628
|
+
color: var(--dsw-alias-label-caption);
|
|
3629
|
+
font-variant-numeric: tabular-nums;
|
|
3630
|
+
}
|
|
3631
|
+
|
|
3632
|
+
|
|
3633
|
+
.c32c2c65_statusChip {
|
|
3634
|
+
display: inline-flex;
|
|
3635
|
+
align-items: center;
|
|
3636
|
+
gap: var(--mstar-space-1);
|
|
3637
|
+
font: var(--dsw-font-xxxs-11);
|
|
3638
|
+
}
|
|
3639
|
+
|
|
3640
|
+
.\\38 8d97a8a_statusDot {
|
|
3641
|
+
width: 6px;
|
|
3642
|
+
height: 6px;
|
|
3643
|
+
border-radius: 999px;
|
|
3644
|
+
background: currentColor;
|
|
3645
|
+
}
|
|
3646
|
+
|
|
3647
|
+
.d260dfec_statusDispatched {
|
|
3648
|
+
color: var(--dsw-alias-state-business-primary);
|
|
3649
|
+
}
|
|
3650
|
+
|
|
3651
|
+
.\\38 bbef368_statusAdvisory {
|
|
3652
|
+
color: var(--dsw-alias-state-warn-label);
|
|
3653
|
+
}
|
|
3654
|
+
|
|
3655
|
+
.d1f67934_statusDenied {
|
|
3656
|
+
color: var(--dsw-alias-state-error-primary);
|
|
3657
|
+
}
|
|
3658
|
+
|
|
3659
|
+
.ba35cad1_statusOk {
|
|
3660
|
+
color: var(--dsw-alias-state-success-primary);
|
|
3661
|
+
}
|
|
3662
|
+
|
|
3663
|
+
.\\38 19501bf_statusError {
|
|
3664
|
+
color: var(--dsw-alias-state-error-primary);
|
|
3665
|
+
}
|
|
3666
|
+
|
|
3667
|
+
|
|
3668
|
+
.\\35 3c75757_statusUnknown {
|
|
3669
|
+
color: var(--dsw-alias-label-caption);
|
|
3670
|
+
}
|
|
3671
|
+
|
|
3672
|
+
|
|
3673
|
+
.\\33 98c5713_settledMark {
|
|
3674
|
+
color: var(--dsw-alias-state-success-primary);
|
|
3675
|
+
font-weight: 600;
|
|
3676
|
+
}
|
|
3677
|
+
|
|
3678
|
+
|
|
3679
|
+
.\\38 3e240f0_settleGlyph {
|
|
3680
|
+
color: var(--dsw-alias-label-secondary);
|
|
3681
|
+
font-weight: 600;
|
|
3682
|
+
}
|
|
3683
|
+
|
|
3684
|
+
|
|
3685
|
+
.\\38 8450335_unexpectedBadge {
|
|
3686
|
+
display: inline-block;
|
|
3687
|
+
padding: 0 var(--mstar-space-2);
|
|
3688
|
+
border: 1px solid var(--dsw-alias-state-warn-label);
|
|
3689
|
+
border-radius: 999px;
|
|
3690
|
+
color: var(--dsw-alias-state-warn-label);
|
|
3691
|
+
font: var(--dsw-font-xxxs-11);
|
|
3692
|
+
}
|
|
3693
|
+
|
|
3694
|
+
|
|
3695
|
+
.\\38 f4e5388_severityChip {
|
|
3696
|
+
display: inline-block;
|
|
3697
|
+
padding: 0 var(--mstar-space-2);
|
|
3698
|
+
border: 1px solid var(--dsw-alias-border-l2);
|
|
3699
|
+
border-radius: 999px;
|
|
3700
|
+
color: var(--dsw-alias-label-secondary);
|
|
3701
|
+
font: var(--dsw-font-xxxs-11);
|
|
3702
|
+
font-weight: 600;
|
|
3703
|
+
}
|
|
3704
|
+
|
|
3705
|
+
.\\38 f4e5388_severityChip[data-event-log-severity='critical'],
|
|
3706
|
+
.\\38 f4e5388_severityChip[data-event-log-severity='high'] {
|
|
3707
|
+
border-color: var(--dsw-alias-state-error-primary);
|
|
3708
|
+
color: var(--dsw-alias-state-error-primary);
|
|
3709
|
+
}
|
|
3710
|
+
|
|
3711
|
+
.\\38 f4e5388_severityChip[data-event-log-severity='medium'] {
|
|
3712
|
+
border-color: var(--dsw-alias-state-warn-label);
|
|
3713
|
+
color: var(--dsw-alias-state-warn-label);
|
|
3714
|
+
}
|
|
3715
|
+
|
|
3716
|
+
.e42c0bfd_violationCode {
|
|
3717
|
+
color: var(--dsw-alias-label-primary);
|
|
3718
|
+
font: var(--dsw-font-xxs-12);
|
|
3719
|
+
}
|
|
3720
|
+
|
|
3721
|
+
.\\33 5d5910f_violationMessage {
|
|
3722
|
+
overflow-wrap: anywhere;
|
|
3723
|
+
}
|
|
3724
|
+
|
|
3725
|
+
|
|
3726
|
+
|
|
3727
|
+
.\\35 58cab30_detailBody {
|
|
3728
|
+
display: flex;
|
|
3729
|
+
flex-direction: column;
|
|
3730
|
+
gap: var(--mstar-space-1);
|
|
3731
|
+
margin-top: var(--mstar-space-1);
|
|
3732
|
+
padding: var(--mstar-space-2) var(--mstar-space-3);
|
|
3733
|
+
border-top: 1px solid var(--dsw-alias-border-l1);
|
|
3734
|
+
}
|
|
3735
|
+
|
|
3736
|
+
.\\33 f8595e8_detailField {
|
|
3737
|
+
display: flex;
|
|
3738
|
+
align-items: baseline;
|
|
3739
|
+
gap: var(--mstar-space-2);
|
|
3740
|
+
min-width: 0;
|
|
3741
|
+
}
|
|
3742
|
+
|
|
3743
|
+
.a6812cb2_detailLabel {
|
|
3744
|
+
flex: none;
|
|
3745
|
+
width: 9em;
|
|
3746
|
+
color: var(--dsw-alias-label-caption);
|
|
3747
|
+
font: var(--dsw-font-xxxs-11);
|
|
3748
|
+
}
|
|
3749
|
+
|
|
3750
|
+
.\\30 79e736d_detailValue {
|
|
3751
|
+
color: var(--dsw-alias-label-primary);
|
|
3752
|
+
font: var(--dsw-font-xxs-12);
|
|
3753
|
+
overflow-wrap: anywhere;
|
|
3754
|
+
}
|
|
3755
|
+
|
|
3756
|
+
|
|
3757
|
+
.bd3cb6ff_detailValueMissing {
|
|
3758
|
+
color: var(--dsw-alias-label-caption);
|
|
3759
|
+
}
|
|
3760
|
+
|
|
3761
|
+
|
|
3762
|
+
|
|
3763
|
+
@media (max-width: 1200px) {
|
|
3764
|
+
.\\38 e395e34_eventLogPage {
|
|
3765
|
+
grid-template-columns: 1fr;
|
|
3766
|
+
grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
|
|
3767
|
+
}
|
|
3768
|
+
}
|
|
3769
|
+
`;
|
|
3770
|
+
var tagId4 = "@mstar-harness/dsh/event-log.module.css";
|
|
3771
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId4) + "]") === null) {
|
|
3772
|
+
const tag = document.createElement("style");
|
|
3773
|
+
tag.dataset.plugin = "@mstar-harness/dsh";
|
|
3774
|
+
tag.dataset.pluginCss = tagId4;
|
|
3775
|
+
tag.textContent = css4;
|
|
3776
|
+
document.head.appendChild(tag);
|
|
3777
|
+
}
|
|
3778
|
+
var event_log_module_default = { eventLogPage: "8e395e34_eventLogPage", section: "fcdd0ccc_section", sectionTitle: "aded23ea_sectionTitle", empty: "18a7beee_empty", rowList: "40959323_rowList", eventSummary: "5a6ad2b9_eventSummary", violationSummary: "c5acc9f0_violationSummary", eventDetails: "1e6e6b57_eventDetails", eventRole: "397ccf2b_eventRole", eventStage: "18dd486b_eventStage", eventTarget: "90ce3f22_eventTarget", eventTime: "ae6064ce_eventTime", eventAgent: "ff483c84_eventAgent", eventDuration: "3e37545b_eventDuration", statusChip: "c32c2c65_statusChip", statusDot: "88d97a8a_statusDot", statusDispatched: "d260dfec_statusDispatched", statusAdvisory: "8bbef368_statusAdvisory", statusDenied: "d1f67934_statusDenied", statusOk: "ba35cad1_statusOk", statusError: "819501bf_statusError", statusUnknown: "53c75757_statusUnknown", settledMark: "398c5713_settledMark", settleGlyph: "83e240f0_settleGlyph", unexpectedBadge: "88450335_unexpectedBadge", severityChip: "8f4e5388_severityChip", violationCode: "e42c0bfd_violationCode", violationMessage: "35d5910f_violationMessage", detailBody: "558cab30_detailBody", detailField: "3f8595e8_detailField", detailLabel: "a6812cb2_detailLabel", detailValue: "079e736d_detailValue", detailValueMissing: "bd3cb6ff_detailValueMissing" };
|
|
3779
|
+
|
|
3780
|
+
// src/client/panel/pages/EventLogPage.tsx
|
|
3781
|
+
var jsx_runtime8 = require("react/jsx-runtime");
|
|
3782
|
+
function flowStatusLabel(status, t) {
|
|
3783
|
+
switch (status) {
|
|
3784
|
+
case "dispatched":
|
|
3785
|
+
return t("flow.in-flight");
|
|
3786
|
+
case "advisory":
|
|
3787
|
+
return t("flow.advisory");
|
|
3788
|
+
case "denied":
|
|
3789
|
+
return t("flow.denied");
|
|
3790
|
+
case "ok":
|
|
3791
|
+
return t("flow.settled-ok");
|
|
3792
|
+
case "error":
|
|
3793
|
+
return t("flow.error");
|
|
3794
|
+
default:
|
|
3795
|
+
return t("panel.unknown");
|
|
3796
|
+
}
|
|
3797
|
+
}
|
|
3798
|
+
function flowStatusClass(status) {
|
|
3799
|
+
switch (status) {
|
|
3800
|
+
case "dispatched":
|
|
3801
|
+
return event_log_module_default.statusDispatched;
|
|
3802
|
+
case "advisory":
|
|
3803
|
+
return event_log_module_default.statusAdvisory;
|
|
3804
|
+
case "denied":
|
|
3805
|
+
return event_log_module_default.statusDenied;
|
|
3806
|
+
case "ok":
|
|
3807
|
+
return event_log_module_default.statusOk;
|
|
3808
|
+
case "error":
|
|
3809
|
+
return event_log_module_default.statusError;
|
|
3810
|
+
default:
|
|
3811
|
+
return event_log_module_default.statusUnknown;
|
|
3812
|
+
}
|
|
3813
|
+
}
|
|
3814
|
+
function isRenderableTime(ts) {
|
|
3815
|
+
return Number.isFinite(ts) && ts > 0 && Math.abs(ts) <= 8640000000000000;
|
|
3816
|
+
}
|
|
3817
|
+
function formatEventTime(ts) {
|
|
3818
|
+
if (!isRenderableTime(ts))
|
|
3819
|
+
return "";
|
|
3820
|
+
return new Date(ts).toLocaleTimeString("en-GB", { hour: "2-digit", minute: "2-digit" });
|
|
3821
|
+
}
|
|
3822
|
+
function formatEventTimeFull(ts) {
|
|
3823
|
+
if (!isRenderableTime(ts))
|
|
3824
|
+
return "";
|
|
3825
|
+
return new Date(ts).toLocaleTimeString("en-GB");
|
|
3826
|
+
}
|
|
3827
|
+
function orDash(value) {
|
|
3828
|
+
return value === "" ? "—" : value;
|
|
3829
|
+
}
|
|
3830
|
+
function DetailField({ field, label, value }) {
|
|
3831
|
+
const missing = value === "";
|
|
3832
|
+
return /* @__PURE__ */ jsx_runtime8.jsxs("div", {
|
|
3833
|
+
className: event_log_module_default.detailField,
|
|
3834
|
+
"data-event-log-field": field,
|
|
3835
|
+
"data-event-log-missing": missing ? "true" : "false",
|
|
3836
|
+
children: [
|
|
3837
|
+
/* @__PURE__ */ jsx_runtime8.jsx("span", {
|
|
3838
|
+
className: event_log_module_default.detailLabel,
|
|
3839
|
+
children: label
|
|
3840
|
+
}),
|
|
3841
|
+
/* @__PURE__ */ jsx_runtime8.jsx("span", {
|
|
3842
|
+
className: missing ? `${event_log_module_default.detailValue} ${event_log_module_default.detailValueMissing}` : event_log_module_default.detailValue,
|
|
3843
|
+
children: missing ? "—" : value
|
|
3844
|
+
})
|
|
3845
|
+
]
|
|
3846
|
+
});
|
|
3847
|
+
}
|
|
3848
|
+
function EventDetailsBody({
|
|
3849
|
+
entry,
|
|
3850
|
+
source,
|
|
3851
|
+
t
|
|
3852
|
+
}) {
|
|
3853
|
+
return /* @__PURE__ */ jsx_runtime8.jsxs("div", {
|
|
3854
|
+
className: event_log_module_default.detailBody,
|
|
3855
|
+
"data-event-log-detail-body": true,
|
|
3856
|
+
children: [
|
|
3857
|
+
/* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
|
|
3858
|
+
field: "role",
|
|
3859
|
+
label: t("event-log.field.role"),
|
|
3860
|
+
value: entry.role
|
|
3861
|
+
}),
|
|
3862
|
+
/* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
|
|
3863
|
+
field: "agent",
|
|
3864
|
+
label: t("event-log.field.agent"),
|
|
3865
|
+
value: entry.agent
|
|
3866
|
+
}),
|
|
3867
|
+
/* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
|
|
3868
|
+
field: "stage",
|
|
3869
|
+
label: t("event-log.field.stage"),
|
|
3870
|
+
value: entry.stage
|
|
3871
|
+
}),
|
|
3872
|
+
/* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
|
|
3873
|
+
field: "plan",
|
|
3874
|
+
label: t("event-log.field.plan"),
|
|
3875
|
+
value: source?.planId ?? ""
|
|
3876
|
+
}),
|
|
3877
|
+
/* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
|
|
3878
|
+
field: "task",
|
|
3879
|
+
label: t("event-log.field.task"),
|
|
3880
|
+
value: source?.taskId ?? ""
|
|
3881
|
+
}),
|
|
3882
|
+
/* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
|
|
3883
|
+
field: "category",
|
|
3884
|
+
label: t("event-log.field.category"),
|
|
3885
|
+
value: source?.taskCategory ?? ""
|
|
3886
|
+
}),
|
|
3887
|
+
/* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
|
|
3888
|
+
field: "time",
|
|
3889
|
+
label: t("event-log.field.time"),
|
|
3890
|
+
value: source === undefined ? "" : formatEventTimeFull(source.ts)
|
|
3891
|
+
}),
|
|
3892
|
+
/* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
|
|
3893
|
+
field: "kind",
|
|
3894
|
+
label: t("event-log.field.kind"),
|
|
3895
|
+
value: entry.eventKind === "dispatch" ? t("event-log.kind.dispatch") : t("event-log.kind.settle")
|
|
3896
|
+
}),
|
|
3897
|
+
/* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
|
|
3898
|
+
field: "status",
|
|
3899
|
+
label: t("event-log.field.status"),
|
|
3900
|
+
value: flowStatusLabel(entry.status, t)
|
|
3901
|
+
}),
|
|
3902
|
+
/* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
|
|
3903
|
+
field: "expected",
|
|
3904
|
+
label: t("event-log.field.expected"),
|
|
3905
|
+
value: entry.eventKind === "settle" ? "" : entry.expected ? t("event-log.yes") : t("event-log.no")
|
|
3906
|
+
}),
|
|
3907
|
+
/* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
|
|
3908
|
+
field: "settled",
|
|
3909
|
+
label: t("event-log.field.settled"),
|
|
3910
|
+
value: entry.eventKind === "settle" ? "" : entry.settled ? t("event-log.yes") : t("event-log.no")
|
|
3911
|
+
}),
|
|
3912
|
+
/* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
|
|
3913
|
+
field: "duration",
|
|
3914
|
+
label: t("event-log.field.duration"),
|
|
3915
|
+
value: entry.durationMs === null ? "" : `${entry.durationMs}ms`
|
|
3916
|
+
})
|
|
3917
|
+
]
|
|
3918
|
+
});
|
|
3919
|
+
}
|
|
3920
|
+
function EventLogEventRow({
|
|
3921
|
+
entry,
|
|
3922
|
+
source,
|
|
3923
|
+
t
|
|
3924
|
+
}) {
|
|
3925
|
+
const time = formatEventTime(entry.ts);
|
|
3926
|
+
return /* @__PURE__ */ jsx_runtime8.jsx("li", {
|
|
3927
|
+
className: event_log_module_default.eventRow,
|
|
3928
|
+
"data-event-log-row-kind": "event",
|
|
3929
|
+
"data-event-log-row-id": entry.id,
|
|
3930
|
+
"data-event-log-expected": entry.expected ? "true" : "false",
|
|
3931
|
+
children: /* @__PURE__ */ jsx_runtime8.jsxs("details", {
|
|
3932
|
+
className: event_log_module_default.eventDetails,
|
|
3933
|
+
"data-event-log-details": true,
|
|
3934
|
+
children: [
|
|
3935
|
+
/* @__PURE__ */ jsx_runtime8.jsxs("summary", {
|
|
3936
|
+
className: event_log_module_default.eventSummary,
|
|
3937
|
+
"data-event-log-summary": true,
|
|
3938
|
+
children: [
|
|
3939
|
+
/* @__PURE__ */ jsx_runtime8.jsx("span", {
|
|
3940
|
+
className: event_log_module_default.eventRole,
|
|
3941
|
+
children: entry.eventKind === "settle" ? /* @__PURE__ */ jsx_runtime8.jsx("span", {
|
|
3942
|
+
className: event_log_module_default.settleGlyph,
|
|
3943
|
+
"aria-hidden": "true",
|
|
3944
|
+
children: "✓"
|
|
3945
|
+
}) : entry.role !== "" ? entry.role : t("panel.unknown")
|
|
3946
|
+
}),
|
|
3947
|
+
entry.stage !== "" && /* @__PURE__ */ jsx_runtime8.jsx("span", {
|
|
3948
|
+
className: event_log_module_default.eventStage,
|
|
3949
|
+
"data-event-log-stage": entry.stage,
|
|
3950
|
+
children: entry.stage
|
|
3951
|
+
}),
|
|
3952
|
+
entry.task !== "" && /* @__PURE__ */ jsx_runtime8.jsx("span", {
|
|
3953
|
+
className: event_log_module_default.eventTarget,
|
|
3954
|
+
"data-event-log-target": entry.task,
|
|
3955
|
+
children: entry.task
|
|
3956
|
+
}),
|
|
3957
|
+
time !== "" && /* @__PURE__ */ jsx_runtime8.jsx("span", {
|
|
3958
|
+
className: event_log_module_default.eventTime,
|
|
3959
|
+
"data-event-log-time": time,
|
|
3960
|
+
children: time
|
|
3961
|
+
}),
|
|
3962
|
+
/* @__PURE__ */ jsx_runtime8.jsxs("span", {
|
|
3963
|
+
className: `${event_log_module_default.statusChip} ${flowStatusClass(entry.status)}`,
|
|
3964
|
+
"data-event-log-status": entry.status,
|
|
3965
|
+
children: [
|
|
3966
|
+
/* @__PURE__ */ jsx_runtime8.jsx("span", {
|
|
3967
|
+
className: event_log_module_default.statusDot,
|
|
3968
|
+
"aria-hidden": "true"
|
|
3969
|
+
}),
|
|
3970
|
+
flowStatusLabel(entry.status, t)
|
|
3971
|
+
]
|
|
3972
|
+
}),
|
|
3973
|
+
entry.eventKind === "dispatch" && entry.settled && /* @__PURE__ */ jsx_runtime8.jsx("span", {
|
|
3974
|
+
className: event_log_module_default.settledMark,
|
|
3975
|
+
"data-event-log-settled": "true",
|
|
3976
|
+
"aria-hidden": "true",
|
|
3977
|
+
children: "✓"
|
|
3978
|
+
}),
|
|
3979
|
+
entry.agent !== "" && /* @__PURE__ */ jsx_runtime8.jsx("span", {
|
|
3980
|
+
className: event_log_module_default.eventAgent,
|
|
3981
|
+
"data-event-log-agent": entry.agent,
|
|
3982
|
+
children: entry.agent
|
|
3983
|
+
}),
|
|
3984
|
+
entry.durationMs !== null && /* @__PURE__ */ jsx_runtime8.jsxs("span", {
|
|
3985
|
+
className: event_log_module_default.eventDuration,
|
|
3986
|
+
"data-event-log-duration": entry.durationMs,
|
|
3987
|
+
children: [
|
|
3988
|
+
entry.durationMs,
|
|
3989
|
+
"ms"
|
|
3990
|
+
]
|
|
3991
|
+
}),
|
|
3992
|
+
entry.eventKind === "dispatch" && !entry.expected && /* @__PURE__ */ jsx_runtime8.jsx("span", {
|
|
3993
|
+
className: event_log_module_default.unexpectedBadge,
|
|
3994
|
+
"data-event-log-unexpected": "true",
|
|
3995
|
+
children: t("flow.unexpected")
|
|
3996
|
+
})
|
|
3997
|
+
]
|
|
3998
|
+
}),
|
|
3999
|
+
/* @__PURE__ */ jsx_runtime8.jsx(EventDetailsBody, {
|
|
4000
|
+
entry,
|
|
4001
|
+
source,
|
|
4002
|
+
t
|
|
4003
|
+
})
|
|
4004
|
+
]
|
|
4005
|
+
})
|
|
4006
|
+
});
|
|
4007
|
+
}
|
|
4008
|
+
function ViolationRow({ entry, t }) {
|
|
4009
|
+
const severity = entry.severity !== "" ? entry.severity : "unknown";
|
|
4010
|
+
return /* @__PURE__ */ jsx_runtime8.jsx("li", {
|
|
4011
|
+
className: event_log_module_default.violationRow,
|
|
4012
|
+
"data-event-log-row-kind": "violation",
|
|
4013
|
+
"data-event-log-row-id": entry.id,
|
|
4014
|
+
children: /* @__PURE__ */ jsx_runtime8.jsxs("details", {
|
|
4015
|
+
className: event_log_module_default.eventDetails,
|
|
4016
|
+
"data-event-log-details": true,
|
|
4017
|
+
children: [
|
|
4018
|
+
/* @__PURE__ */ jsx_runtime8.jsxs("summary", {
|
|
4019
|
+
className: event_log_module_default.violationSummary,
|
|
4020
|
+
"data-event-log-summary": true,
|
|
4021
|
+
children: [
|
|
4022
|
+
/* @__PURE__ */ jsx_runtime8.jsx("span", {
|
|
4023
|
+
className: event_log_module_default.severityChip,
|
|
4024
|
+
"data-event-log-severity": severity,
|
|
4025
|
+
children: entry.severity !== "" ? entry.severity : t("panel.unknown")
|
|
4026
|
+
}),
|
|
4027
|
+
entry.code !== "" && /* @__PURE__ */ jsx_runtime8.jsx("code", {
|
|
4028
|
+
className: event_log_module_default.violationCode,
|
|
4029
|
+
"data-event-log-code": entry.code,
|
|
4030
|
+
children: entry.code
|
|
4031
|
+
}),
|
|
4032
|
+
/* @__PURE__ */ jsx_runtime8.jsx("span", {
|
|
4033
|
+
className: event_log_module_default.violationMessage,
|
|
4034
|
+
"data-event-log-message": entry.message,
|
|
4035
|
+
children: orDash(entry.message)
|
|
4036
|
+
})
|
|
4037
|
+
]
|
|
4038
|
+
}),
|
|
4039
|
+
/* @__PURE__ */ jsx_runtime8.jsxs("div", {
|
|
4040
|
+
className: event_log_module_default.detailBody,
|
|
4041
|
+
"data-event-log-detail-body": true,
|
|
4042
|
+
children: [
|
|
4043
|
+
/* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
|
|
4044
|
+
field: "severity",
|
|
4045
|
+
label: t("event-log.field.severity"),
|
|
4046
|
+
value: entry.severity
|
|
4047
|
+
}),
|
|
4048
|
+
/* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
|
|
4049
|
+
field: "code",
|
|
4050
|
+
label: t("event-log.field.code"),
|
|
4051
|
+
value: entry.code
|
|
4052
|
+
}),
|
|
4053
|
+
/* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
|
|
4054
|
+
field: "message",
|
|
4055
|
+
label: t("event-log.field.message"),
|
|
4056
|
+
value: entry.message
|
|
4057
|
+
})
|
|
4058
|
+
]
|
|
4059
|
+
})
|
|
4060
|
+
]
|
|
4061
|
+
})
|
|
4062
|
+
});
|
|
4063
|
+
}
|
|
4064
|
+
function EventLogPage({ view, t }) {
|
|
4065
|
+
const entries = eventLogEntries(view);
|
|
4066
|
+
const eventEntries = entries.filter((e) => e.kind === "event");
|
|
4067
|
+
const violationEntries = entries.filter((e) => e.kind === "violation");
|
|
4068
|
+
const eventById = new Map(view.events.map((event) => [event.id, event]));
|
|
4069
|
+
if (eventEntries.length === 0 && violationEntries.length === 0) {
|
|
4070
|
+
return /* @__PURE__ */ jsx_runtime8.jsx("div", {
|
|
4071
|
+
className: event_log_module_default.eventLogPage,
|
|
4072
|
+
"data-mstar-page": "events",
|
|
4073
|
+
children: /* @__PURE__ */ jsx_runtime8.jsx("p", {
|
|
4074
|
+
className: event_log_module_default.empty,
|
|
4075
|
+
"data-event-log-empty": true,
|
|
4076
|
+
children: t("event-log.empty")
|
|
4077
|
+
})
|
|
4078
|
+
});
|
|
4079
|
+
}
|
|
4080
|
+
return /* @__PURE__ */ jsx_runtime8.jsxs("div", {
|
|
4081
|
+
className: event_log_module_default.eventLogPage,
|
|
4082
|
+
"data-mstar-page": "events",
|
|
4083
|
+
children: [
|
|
4084
|
+
/* @__PURE__ */ jsx_runtime8.jsxs("section", {
|
|
4085
|
+
className: event_log_module_default.section,
|
|
4086
|
+
"data-event-log-section": "events",
|
|
4087
|
+
"data-event-log-section-count": eventEntries.length,
|
|
4088
|
+
children: [
|
|
4089
|
+
/* @__PURE__ */ jsx_runtime8.jsx("h2", {
|
|
4090
|
+
className: event_log_module_default.sectionTitle,
|
|
4091
|
+
"data-event-log-section-title": true,
|
|
4092
|
+
children: t("event-log.section.events")
|
|
4093
|
+
}),
|
|
4094
|
+
eventEntries.length === 0 ? /* @__PURE__ */ jsx_runtime8.jsx("p", {
|
|
4095
|
+
className: event_log_module_default.empty,
|
|
4096
|
+
"data-event-log-empty-section": "events",
|
|
4097
|
+
children: t("event-log.empty.events")
|
|
4098
|
+
}) : /* @__PURE__ */ jsx_runtime8.jsx("ul", {
|
|
4099
|
+
className: event_log_module_default.rowList,
|
|
4100
|
+
"data-event-log-list": "events",
|
|
4101
|
+
children: eventEntries.map((entry) => /* @__PURE__ */ jsx_runtime8.jsx(EventLogEventRow, {
|
|
4102
|
+
entry,
|
|
4103
|
+
source: eventById.get(entry.id),
|
|
4104
|
+
t
|
|
4105
|
+
}, entry.id))
|
|
4106
|
+
})
|
|
4107
|
+
]
|
|
4108
|
+
}),
|
|
4109
|
+
/* @__PURE__ */ jsx_runtime8.jsxs("section", {
|
|
4110
|
+
className: event_log_module_default.section,
|
|
4111
|
+
"data-event-log-section": "violations",
|
|
4112
|
+
"data-event-log-section-count": violationEntries.length,
|
|
4113
|
+
children: [
|
|
4114
|
+
/* @__PURE__ */ jsx_runtime8.jsx("h2", {
|
|
4115
|
+
className: event_log_module_default.sectionTitle,
|
|
4116
|
+
"data-event-log-section-title": true,
|
|
4117
|
+
children: t("event-log.section.violations")
|
|
4118
|
+
}),
|
|
4119
|
+
violationEntries.length === 0 ? /* @__PURE__ */ jsx_runtime8.jsx("p", {
|
|
4120
|
+
className: event_log_module_default.empty,
|
|
4121
|
+
"data-event-log-empty-section": "violations",
|
|
4122
|
+
children: t("event-log.empty.violations")
|
|
4123
|
+
}) : /* @__PURE__ */ jsx_runtime8.jsx("ul", {
|
|
4124
|
+
className: event_log_module_default.rowList,
|
|
4125
|
+
"data-event-log-list": "violations",
|
|
4126
|
+
children: violationEntries.map((entry) => /* @__PURE__ */ jsx_runtime8.jsx(ViolationRow, {
|
|
4127
|
+
entry,
|
|
4128
|
+
t
|
|
4129
|
+
}, entry.id))
|
|
4130
|
+
})
|
|
4131
|
+
]
|
|
4132
|
+
})
|
|
4133
|
+
]
|
|
4134
|
+
});
|
|
4135
|
+
}
|
|
4136
|
+
|
|
4137
|
+
// src/client/panel/zones/TaskBoard.tsx
|
|
4138
|
+
var React = __toESM(require("react"));
|
|
4139
|
+
var jsx_runtime9 = require("react/jsx-runtime");
|
|
4140
|
+
var COLUMN_TITLE = {
|
|
4141
|
+
Todo: "zone.state.Todo",
|
|
4142
|
+
InProgress: "zone.state.InProgress",
|
|
4143
|
+
InReview: "zone.state.InReview",
|
|
4144
|
+
Done: "zone.state.Done",
|
|
4145
|
+
"blocked-unknown": "zone.state.blocked-unknown"
|
|
4146
|
+
};
|
|
4147
|
+
var COLUMN_ARROWS = [
|
|
4148
|
+
{ before: "InProgress", label: "Todo-InProgress", glyph: "→" },
|
|
4149
|
+
{ before: "InReview", label: "InProgress-InReview", glyph: "→" },
|
|
4150
|
+
{ before: "Done", label: "InReview-Done", glyph: "→" },
|
|
4151
|
+
{ before: "blocked-unknown", label: "InProgress-Blocked", glyph: "⇄" }
|
|
4152
|
+
];
|
|
4153
|
+
function leadingArrow(id) {
|
|
4154
|
+
return COLUMN_ARROWS.find((a) => a.before === id) ?? null;
|
|
4155
|
+
}
|
|
4156
|
+
function toggleKanbanExpanded(expanded, id) {
|
|
4157
|
+
const next = new Set(expanded);
|
|
4158
|
+
if (next.has(id))
|
|
4159
|
+
next.delete(id);
|
|
4160
|
+
else
|
|
4161
|
+
next.add(id);
|
|
4162
|
+
return next;
|
|
4163
|
+
}
|
|
4164
|
+
function visibleKanbanPlans(column, expanded) {
|
|
4165
|
+
return expanded ? column.plans : column.plans.slice(0, PLAN_CAP);
|
|
4166
|
+
}
|
|
4167
|
+
function TaskBoard({ view, t }) {
|
|
4168
|
+
const columns = view.columns;
|
|
4169
|
+
const empty = view.total === 0;
|
|
4170
|
+
const [expanded, setExpanded] = React.useState(new Set);
|
|
4171
|
+
const toggle = (id) => setExpanded((prev) => toggleKanbanExpanded(prev, id));
|
|
4172
|
+
return /* @__PURE__ */ jsx_runtime9.jsxs("section", {
|
|
4173
|
+
className: zones_module_default.zone,
|
|
4174
|
+
"data-zone": "tasks",
|
|
4175
|
+
children: [
|
|
4176
|
+
/* @__PURE__ */ jsx_runtime9.jsxs("header", {
|
|
4177
|
+
className: zones_module_default.tasksHeader,
|
|
4178
|
+
"data-zone-header": true,
|
|
4179
|
+
children: [
|
|
4180
|
+
/* @__PURE__ */ jsx_runtime9.jsx("h2", {
|
|
4181
|
+
className: zones_module_default.zoneHeader,
|
|
4182
|
+
children: t("zone.tasks.title")
|
|
4183
|
+
}),
|
|
4184
|
+
/* @__PURE__ */ jsx_runtime9.jsx("span", {
|
|
4185
|
+
className: zones_module_default.tasksTotal,
|
|
4186
|
+
"data-tasks-total": view.total,
|
|
4187
|
+
children: t("zone.tasks.total", { count: String(view.total) })
|
|
4188
|
+
})
|
|
4189
|
+
]
|
|
4190
|
+
}),
|
|
4191
|
+
empty && /* @__PURE__ */ jsx_runtime9.jsx("p", {
|
|
4192
|
+
className: zones_module_default.zoneEmpty,
|
|
4193
|
+
"data-zone-empty": "no-plans",
|
|
4194
|
+
children: t("zone.tasks.no-plans")
|
|
4195
|
+
}),
|
|
4196
|
+
/* @__PURE__ */ jsx_runtime9.jsx("div", {
|
|
4197
|
+
className: zones_module_default.kanban,
|
|
4198
|
+
"data-mstar-kanban": true,
|
|
4199
|
+
children: columns.map((column, i) => {
|
|
4200
|
+
const arrow = i > 0 ? leadingArrow(column.id) : null;
|
|
4201
|
+
const isExpanded = expanded.has(column.id);
|
|
4202
|
+
const shown = visibleKanbanPlans(column, isExpanded);
|
|
4203
|
+
const overflow = column.capped === null ? 0 : column.count - column.capped;
|
|
4204
|
+
return /* @__PURE__ */ jsx_runtime9.jsxs(React.Fragment, {
|
|
4205
|
+
children: [
|
|
4206
|
+
arrow !== null && /* @__PURE__ */ jsx_runtime9.jsx("span", {
|
|
4207
|
+
className: zones_module_default.kanbanArrow,
|
|
4208
|
+
"data-kanban-arrow": arrow.label,
|
|
4209
|
+
"aria-hidden": "true",
|
|
4210
|
+
children: arrow.glyph
|
|
4211
|
+
}),
|
|
4212
|
+
/* @__PURE__ */ jsx_runtime9.jsxs("div", {
|
|
4213
|
+
className: zones_module_default.kanbanColumn,
|
|
4214
|
+
"data-kanban-column": column.id,
|
|
4215
|
+
children: [
|
|
4216
|
+
/* @__PURE__ */ jsx_runtime9.jsxs("header", {
|
|
4217
|
+
className: zones_module_default.kanbanColumnHeader,
|
|
4218
|
+
children: [
|
|
4219
|
+
/* @__PURE__ */ jsx_runtime9.jsx("span", {
|
|
4220
|
+
className: zones_module_default.kanbanColumnTitle,
|
|
4221
|
+
children: t(COLUMN_TITLE[column.id])
|
|
4222
|
+
}),
|
|
4223
|
+
/* @__PURE__ */ jsx_runtime9.jsx("span", {
|
|
4224
|
+
className: zones_module_default.kanbanCount,
|
|
4225
|
+
"data-kanban-count": column.count,
|
|
4226
|
+
children: column.count
|
|
4227
|
+
})
|
|
4228
|
+
]
|
|
4229
|
+
}),
|
|
4230
|
+
/* @__PURE__ */ jsx_runtime9.jsxs("ul", {
|
|
4231
|
+
className: zones_module_default.kanbanCards,
|
|
4232
|
+
id: `kanban-cards-${column.id}`,
|
|
4233
|
+
children: [
|
|
4234
|
+
shown.map((plan, j) => /* @__PURE__ */ jsx_runtime9.jsxs("li", {
|
|
4235
|
+
className: zones_module_default.planCard,
|
|
4236
|
+
"data-plan-id": plan.id,
|
|
4237
|
+
"data-plan-status": plan.status,
|
|
4238
|
+
children: [
|
|
4239
|
+
/* @__PURE__ */ jsx_runtime9.jsx("code", {
|
|
4240
|
+
className: zones_module_default.planCardId,
|
|
4241
|
+
children: plan.id
|
|
4242
|
+
}),
|
|
4243
|
+
/* @__PURE__ */ jsx_runtime9.jsx("span", {
|
|
4244
|
+
className: zones_module_default.planCardStatus,
|
|
4245
|
+
"data-status": plan.status,
|
|
4246
|
+
children: plan.status
|
|
4247
|
+
})
|
|
4248
|
+
]
|
|
4249
|
+
}, plan.id === "" ? `card-${j}` : plan.id)),
|
|
4250
|
+
overflow > 0 && /* @__PURE__ */ jsx_runtime9.jsx("li", {
|
|
4251
|
+
className: zones_module_default.kanbanMore,
|
|
4252
|
+
children: /* @__PURE__ */ jsx_runtime9.jsx("button", {
|
|
4253
|
+
type: "button",
|
|
4254
|
+
className: zones_module_default.kanbanMoreButton,
|
|
4255
|
+
"data-kanban-more": isExpanded ? "collapse" : "expand",
|
|
4256
|
+
"aria-expanded": isExpanded,
|
|
4257
|
+
"aria-controls": `kanban-cards-${column.id}`,
|
|
4258
|
+
onClick: () => toggle(column.id),
|
|
4259
|
+
children: isExpanded ? t("zone.tasks.collapse") : t("zone.tasks.more", { count: String(overflow) })
|
|
4260
|
+
})
|
|
4261
|
+
})
|
|
4262
|
+
]
|
|
4263
|
+
})
|
|
4264
|
+
]
|
|
4265
|
+
})
|
|
4266
|
+
]
|
|
4267
|
+
}, column.id);
|
|
4268
|
+
})
|
|
4269
|
+
})
|
|
4270
|
+
]
|
|
4271
|
+
});
|
|
4272
|
+
}
|
|
4273
|
+
|
|
4274
|
+
// src/client/panel/pages/IterationTaskPage.tsx
|
|
4275
|
+
var jsx_runtime10 = require("react/jsx-runtime");
|
|
4276
|
+
function IterationTaskPage({ view, t }) {
|
|
4277
|
+
return /* @__PURE__ */ jsx_runtime10.jsxs("div", {
|
|
4278
|
+
className: panel_module_default.iterationPage,
|
|
4279
|
+
"data-mstar-page": "tasks",
|
|
4280
|
+
children: [
|
|
4281
|
+
/* @__PURE__ */ jsx_runtime10.jsx(IterationInfoSection, {
|
|
4282
|
+
iteration: view.iteration,
|
|
4283
|
+
t
|
|
4284
|
+
}),
|
|
4285
|
+
/* @__PURE__ */ jsx_runtime10.jsx("div", {
|
|
4286
|
+
className: panel_module_default.iterationTasks,
|
|
4287
|
+
"data-mstar-tasks-scroll": true,
|
|
4288
|
+
children: /* @__PURE__ */ jsx_runtime10.jsx(TaskBoard, {
|
|
4289
|
+
view: view.tasks,
|
|
4290
|
+
t
|
|
4291
|
+
})
|
|
4292
|
+
})
|
|
4293
|
+
]
|
|
4294
|
+
});
|
|
4295
|
+
}
|
|
4296
|
+
|
|
4297
|
+
// src/client/panel/use-mstar-engine-status.ts
|
|
4298
|
+
var EMPTY = { source: null, lastUpdated: null };
|
|
4299
|
+
function latestEngineStatusRow(nodes) {
|
|
4300
|
+
for (let i = nodes.length - 1;i >= 0; i--) {
|
|
4301
|
+
const node = nodes[i];
|
|
4302
|
+
if (node.kind !== "context" || node.form !== "catalog")
|
|
4303
|
+
continue;
|
|
4304
|
+
const source = node.source;
|
|
4305
|
+
if (source?.kind === "mstar-engine-status")
|
|
4306
|
+
return node;
|
|
4307
|
+
}
|
|
4308
|
+
return null;
|
|
4309
|
+
}
|
|
4310
|
+
function sameView(a, b) {
|
|
4311
|
+
return a.source === b.source && a.lastUpdated === b.lastUpdated;
|
|
4312
|
+
}
|
|
4313
|
+
function selectEngineStatus(snapshot) {
|
|
4314
|
+
try {
|
|
4315
|
+
const row = latestEngineStatusRow(snapshot.nodes);
|
|
4316
|
+
if (row === null)
|
|
4317
|
+
return EMPTY;
|
|
4318
|
+
return { source: row.source, lastUpdated: row.time };
|
|
4319
|
+
} catch {
|
|
4320
|
+
return EMPTY;
|
|
4321
|
+
}
|
|
4322
|
+
}
|
|
4323
|
+
function useMstarEngineStatus(useSession) {
|
|
4324
|
+
try {
|
|
4325
|
+
const view = useSession(selectEngineStatus, sameView);
|
|
4326
|
+
return view ?? EMPTY;
|
|
4327
|
+
} catch {
|
|
4328
|
+
return EMPTY;
|
|
4329
|
+
}
|
|
4330
|
+
}
|
|
4331
|
+
|
|
4332
|
+
// src/client/panel/PanelView.tsx
|
|
4333
|
+
var jsx_runtime11 = require("react/jsx-runtime");
|
|
4334
|
+
function formatTime(ms) {
|
|
4335
|
+
return new Date(ms).toLocaleTimeString("en-GB");
|
|
4336
|
+
}
|
|
4337
|
+
function PanelContent({ tab, source, t }) {
|
|
4338
|
+
if (tab === "agents") {
|
|
4339
|
+
const view = projectGraph(source);
|
|
4340
|
+
return /* @__PURE__ */ jsx_runtime11.jsx(AgentCanvasPage, {
|
|
4341
|
+
view: view.agents,
|
|
4342
|
+
iteration: view.iteration,
|
|
4343
|
+
t
|
|
4344
|
+
});
|
|
4345
|
+
}
|
|
4346
|
+
if (tab === "events")
|
|
4347
|
+
return /* @__PURE__ */ jsx_runtime11.jsx(EventLogPage, {
|
|
4348
|
+
view: projectGraph(source),
|
|
4349
|
+
t
|
|
4350
|
+
});
|
|
4351
|
+
return /* @__PURE__ */ jsx_runtime11.jsx(IterationTaskPage, {
|
|
4352
|
+
view: projectGraph(source),
|
|
4353
|
+
t
|
|
4354
|
+
});
|
|
4355
|
+
}
|
|
4356
|
+
function PanelView({ t, useSession }) {
|
|
4357
|
+
const { source, lastUpdated } = useMstarEngineStatus(useSession);
|
|
4358
|
+
const [tab, setTab] = import_react3.useState("tasks");
|
|
4359
|
+
if (source === null || source === undefined) {
|
|
4360
|
+
return /* @__PURE__ */ jsx_runtime11.jsx("div", {
|
|
4361
|
+
className: panel_module_default.emptyRoot,
|
|
4362
|
+
"data-mstar-panel": "waiting",
|
|
4363
|
+
"data-conversation-composer-overlay": "",
|
|
4364
|
+
children: /* @__PURE__ */ jsx_runtime11.jsx("p", {
|
|
4365
|
+
className: panel_module_default.empty,
|
|
4366
|
+
"data-mstar-empty": "waiting",
|
|
4367
|
+
children: t("empty.waiting")
|
|
4368
|
+
})
|
|
4369
|
+
});
|
|
4370
|
+
}
|
|
4371
|
+
const noHarness = source.harnessDir === null && source.state === null && source.iteration == null;
|
|
4372
|
+
const freshness = /* @__PURE__ */ jsx_runtime11.jsxs("footer", {
|
|
4373
|
+
className: panel_module_default.freshness,
|
|
4374
|
+
"data-mstar-freshness": true,
|
|
4375
|
+
children: [
|
|
4376
|
+
typeof lastUpdated === "number" ? /* @__PURE__ */ jsx_runtime11.jsx("span", {
|
|
4377
|
+
children: t("freshness.last-updated", { time: formatTime(lastUpdated) })
|
|
4378
|
+
}) : null,
|
|
4379
|
+
/* @__PURE__ */ jsx_runtime11.jsx("span", {
|
|
4380
|
+
children: t("freshness.refresh-note")
|
|
4381
|
+
})
|
|
4382
|
+
]
|
|
4383
|
+
});
|
|
4384
|
+
if (noHarness) {
|
|
4385
|
+
return /* @__PURE__ */ jsx_runtime11.jsx("div", {
|
|
4386
|
+
className: panel_module_default.root,
|
|
4387
|
+
"data-mstar-panel": "no-harness",
|
|
4388
|
+
"data-conversation-composer-overlay": "",
|
|
4389
|
+
children: /* @__PURE__ */ jsx_runtime11.jsxs("main", {
|
|
4390
|
+
className: panel_module_default.main,
|
|
4391
|
+
"data-mstar-graph": true,
|
|
4392
|
+
children: [
|
|
4393
|
+
/* @__PURE__ */ jsx_runtime11.jsxs("div", {
|
|
4394
|
+
className: panel_module_default.noHarnessCard,
|
|
4395
|
+
"data-mstar-empty-card": true,
|
|
4396
|
+
children: [
|
|
4397
|
+
/* @__PURE__ */ jsx_runtime11.jsxs("svg", {
|
|
4398
|
+
className: panel_module_default.noHarnessIcon,
|
|
4399
|
+
"data-mstar-empty-icon": true,
|
|
4400
|
+
width: "32",
|
|
4401
|
+
height: "32",
|
|
4402
|
+
viewBox: "0 0 24 24",
|
|
4403
|
+
fill: "none",
|
|
4404
|
+
stroke: "currentColor",
|
|
4405
|
+
strokeWidth: "1.5",
|
|
4406
|
+
strokeLinecap: "round",
|
|
4407
|
+
strokeLinejoin: "round",
|
|
4408
|
+
"aria-hidden": "true",
|
|
4409
|
+
children: [
|
|
4410
|
+
/* @__PURE__ */ jsx_runtime11.jsx("path", {
|
|
4411
|
+
d: "M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"
|
|
4412
|
+
}),
|
|
4413
|
+
/* @__PURE__ */ jsx_runtime11.jsx("path", {
|
|
4414
|
+
d: "M9.7 9.4a2.4 2.4 0 1 1 3.4 2.2c-.7.3-1 .8-1 1.5"
|
|
4415
|
+
}),
|
|
4416
|
+
/* @__PURE__ */ jsx_runtime11.jsx("circle", {
|
|
4417
|
+
cx: "12",
|
|
4418
|
+
cy: "16.4",
|
|
4419
|
+
r: "0.6"
|
|
4420
|
+
})
|
|
4421
|
+
]
|
|
4422
|
+
}),
|
|
4423
|
+
/* @__PURE__ */ jsx_runtime11.jsx("p", {
|
|
4424
|
+
className: panel_module_default.noHarnessTitle,
|
|
4425
|
+
"data-mstar-empty": "no-harness",
|
|
4426
|
+
children: t("empty.no-harness")
|
|
4427
|
+
}),
|
|
4428
|
+
/* @__PURE__ */ jsx_runtime11.jsx("p", {
|
|
4429
|
+
className: panel_module_default.noHarnessHint,
|
|
4430
|
+
children: t("empty.no-harness-hint")
|
|
4431
|
+
})
|
|
4432
|
+
]
|
|
4433
|
+
}),
|
|
4434
|
+
freshness
|
|
4435
|
+
]
|
|
4436
|
+
})
|
|
4437
|
+
});
|
|
4438
|
+
}
|
|
4439
|
+
return /* @__PURE__ */ jsx_runtime11.jsxs("div", {
|
|
4440
|
+
className: panel_module_default.root,
|
|
4441
|
+
"data-mstar-panel": "panel",
|
|
4442
|
+
"data-conversation-composer-overlay": "",
|
|
4443
|
+
children: [
|
|
4444
|
+
/* @__PURE__ */ jsx_runtime11.jsxs("main", {
|
|
4445
|
+
className: panel_module_default.main,
|
|
4446
|
+
children: [
|
|
4447
|
+
/* @__PURE__ */ jsx_runtime11.jsx(TabNav, {
|
|
4448
|
+
active: tab,
|
|
4449
|
+
onChange: setTab,
|
|
4450
|
+
t
|
|
4451
|
+
}),
|
|
4452
|
+
/* @__PURE__ */ jsx_runtime11.jsx("div", {
|
|
4453
|
+
className: panel_module_default.content,
|
|
4454
|
+
"data-mstar-graph": true,
|
|
4455
|
+
children: /* @__PURE__ */ jsx_runtime11.jsx(PanelContent, {
|
|
4456
|
+
tab,
|
|
4457
|
+
source,
|
|
4458
|
+
t
|
|
4459
|
+
})
|
|
4460
|
+
}),
|
|
4461
|
+
freshness
|
|
4462
|
+
]
|
|
4463
|
+
}),
|
|
4464
|
+
/* @__PURE__ */ jsx_runtime11.jsx(Sidebar, {
|
|
4465
|
+
t,
|
|
4466
|
+
state: source.state,
|
|
4467
|
+
source
|
|
4468
|
+
})
|
|
4469
|
+
]
|
|
4470
|
+
});
|
|
4471
|
+
}
|
|
4472
|
+
|
|
4473
|
+
// src/client/index.ts
|
|
4474
|
+
var inject = ["slots", "sessions", "locale"];
|
|
4475
|
+
function apply(ctx) {
|
|
4476
|
+
ctx.effect(() => ctx.locale.register(NS, { zh, en }), "ui-mstar-panel: dictionaries");
|
|
4477
|
+
ctx.slots.inject("conversation.view", () => ctx.slots.register({
|
|
4478
|
+
name: "conversation.view",
|
|
4479
|
+
id: "mstar-workflow",
|
|
4480
|
+
order: 20,
|
|
4481
|
+
label: () => ctx.locale.bind(NS)("view.mstar-workflow"),
|
|
4482
|
+
locale: NS
|
|
4483
|
+
}, PanelView));
|
|
4484
|
+
}
|
|
4485
|
+
|
|
4486
|
+
return module.exports; } });
|