Initial commit

This commit is contained in:
Jordan
2026-04-01 23:16:45 +01:00
commit bc4199aed2
201 changed files with 25612 additions and 0 deletions

884
dashboard/css/main.css Normal file
View File

@@ -0,0 +1,884 @@
/* ============================================================
Agentic Dashboard — Design System
============================================================ */
/* --- CSS Custom Properties --- */
:root {
/* Backgrounds */
--bg-primary: #0d1117;
--bg-secondary: #161b22;
--bg-surface: #1c2128;
--bg-hover: #252c35;
--bg-input: #0d1117;
/* Text */
--text-primary: #e6edf3;
--text-secondary: #8b949e;
--text-muted: #6e7681;
--text-inverse: #0d1117;
/* Accent */
--accent: #58a6ff;
--accent-hover: #79c0ff;
--accent-muted: #1f3a5f;
/* Status */
--status-success: #3fb950;
--status-warning: #d29922;
--status-error: #f85149;
--status-info: #58a6ff;
/* Agent roles */
--agent-planner: #bc8cff;
--agent-coder: #3fb950;
--agent-collector: #d29922;
--agent-reviewer: #f778ba;
--agent-orchestrator: #58a6ff;
/* Event types */
--event-lifecycle: #58a6ff;
--event-content: #3fb950;
--event-tool: #d29922;
--event-orchestration: #bc8cff;
--event-error: #f85149;
--event-keepalive: #6e7681;
/* Borders */
--border: #30363d;
--border-subtle: #21262d;
/* Misc */
--radius: 8px;
--radius-sm: 4px;
--radius-lg: 12px;
--shadow: 0 2px 8px rgba(0,0,0,.3);
--transition: 150ms ease;
--font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
--font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
/* Layout */
--sidebar-width: 260px;
--inspector-width: 340px;
--toolbar-height: 48px;
}
/* --- Light theme --- */
[data-theme="light"] {
--bg-primary: #ffffff;
--bg-secondary: #f6f8fa;
--bg-surface: #ffffff;
--bg-hover: #f3f4f6;
--bg-input: #f6f8fa;
--text-primary: #1f2328;
--text-secondary: #656d76;
--text-muted: #8b949e;
--text-inverse: #ffffff;
--accent: #0969da;
--accent-hover: #0550ae;
--accent-muted: #ddf4ff;
--border: #d0d7de;
--border-subtle: #e1e4e8;
--shadow: 0 1px 3px rgba(0,0,0,.12);
--bg-surface: #f6f8fa;
}
/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
height: 100%;
font-family: var(--font-sans);
font-size: 14px;
line-height: 1.5;
color: var(--text-primary);
background: var(--bg-primary);
overflow: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
/* ============================================================
Layout — 3-column grid
============================================================ */
#app {
display: grid;
grid-template-rows: var(--toolbar-height) 1fr;
grid-template-columns: var(--sidebar-width) 1fr var(--inspector-width);
grid-template-areas:
"toolbar toolbar toolbar"
"sidebar main inspector";
height: 100vh;
}
#toolbar { grid-area: toolbar; }
#sidebar { grid-area: sidebar; }
#main { grid-area: main; }
#inspector { grid-area: inspector; }
/* ============================================================
Toolbar
============================================================ */
#toolbar {
display: flex;
align-items: center;
gap: 12px;
padding: 0 16px;
background: var(--bg-secondary);
border-bottom: 1px solid var(--border);
z-index: 10;
}
.toolbar-brand {
font-weight: 600;
font-size: 15px;
color: var(--text-primary);
white-space: nowrap;
}
.toolbar-separator {
width: 1px;
height: 20px;
background: var(--border);
}
.toolbar-session-id {
font-family: var(--font-mono);
font-size: 12px;
color: var(--text-secondary);
cursor: pointer;
padding: 2px 8px;
border-radius: var(--radius-sm);
background: var(--bg-surface);
border: 1px solid var(--border-subtle);
max-width: 200px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.toolbar-session-id:hover { background: var(--bg-hover); }
.toolbar-spacer { flex: 1; }
.toolbar-actions {
display: flex;
gap: 6px;
align-items: center;
}
/* ============================================================
Sidebar
============================================================ */
#sidebar {
display: flex;
flex-direction: column;
background: var(--bg-secondary);
border-right: 1px solid var(--border);
overflow: hidden;
}
.sidebar-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 14px;
border-bottom: 1px solid var(--border-subtle);
}
.sidebar-header h3 {
font-size: 12px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: .5px;
color: var(--text-secondary);
}
.session-list {
flex: 1;
overflow-y: auto;
padding: 6px;
}
.session-item {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 10px;
border-radius: var(--radius);
cursor: pointer;
transition: background var(--transition);
font-family: var(--font-mono);
font-size: 12px;
color: var(--text-secondary);
}
.session-item:hover { background: var(--bg-hover); }
.session-item.active {
background: var(--accent-muted);
color: var(--accent);
}
.session-item .delete-btn {
margin-left: auto;
opacity: 0;
transition: opacity var(--transition);
background: none;
border: none;
color: var(--text-muted);
cursor: pointer;
font-size: 14px;
padding: 2px 4px;
border-radius: var(--radius-sm);
}
.session-item:hover .delete-btn { opacity: 1; }
.session-item .delete-btn:hover { color: var(--status-error); }
.sidebar-footer {
padding: 10px 14px;
border-top: 1px solid var(--border-subtle);
display: flex;
align-items: center;
gap: 8px;
font-size: 12px;
color: var(--text-muted);
}
/* ============================================================
Status Dot
============================================================ */
.status-dot {
width: 8px;
height: 8px;
border-radius: 50%;
flex-shrink: 0;
}
.status-dot.idle { background: var(--status-success); }
.status-dot.active { background: var(--status-success); }
.status-dot.executing { background: var(--status-warning); animation: pulse 1.5s infinite; }
.status-dot.completed { background: var(--text-muted); }
.status-dot.error { background: var(--status-error); }
.status-dot.connected { background: var(--status-success); }
.status-dot.disconnected { background: var(--status-error); }
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: .4; }
}
/* ============================================================
Main Panel
============================================================ */
#main {
display: flex;
flex-direction: column;
overflow: hidden;
background: var(--bg-primary);
}
/* --- Chat messages --- */
.chat-messages {
flex: 1;
overflow-y: auto;
padding: 20px 24px;
display: flex;
flex-direction: column;
gap: 16px;
}
.chat-empty {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
flex: 1;
color: var(--text-muted);
gap: 8px;
}
.chat-empty .icon { font-size: 40px; opacity: .3; }
.chat-empty p { font-size: 13px; }
.message {
max-width: 85%;
padding: 12px 16px;
border-radius: var(--radius-lg);
font-size: 14px;
line-height: 1.6;
word-wrap: break-word;
}
.message.user {
align-self: flex-end;
background: var(--accent);
color: var(--text-inverse);
border-bottom-right-radius: 4px;
}
.message.assistant {
align-self: flex-start;
background: var(--bg-surface);
border: 1px solid var(--border-subtle);
border-bottom-left-radius: 4px;
}
.message.assistant .agent-badge {
display: inline-block;
font-size: 10px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: .5px;
padding: 1px 6px;
border-radius: 3px;
margin-bottom: 6px;
}
.message.system {
align-self: center;
background: transparent;
color: var(--text-muted);
font-size: 12px;
padding: 4px 12px;
border: 1px dashed var(--border);
border-radius: var(--radius);
}
/* Markdown inside messages */
.message h1, .message h2, .message h3 {
margin: 8px 0 4px;
font-size: 14px;
font-weight: 700;
}
.message h3 { font-size: 13px; }
.message p { margin: 4px 0; }
.message ul, .message ol { padding-left: 20px; margin: 4px 0; }
.message pre {
background: var(--bg-primary);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
padding: 10px 12px;
margin: 8px 0;
overflow-x: auto;
font-family: var(--font-mono);
font-size: 12px;
line-height: 1.5;
}
.message code {
font-family: var(--font-mono);
font-size: 12px;
background: var(--bg-primary);
padding: 1px 5px;
border-radius: 3px;
}
.message pre code { background: none; padding: 0; }
.message strong { font-weight: 700; }
/* --- Execution indicator --- */
.execution-indicator {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 16px;
background: var(--bg-surface);
border: 1px solid var(--border-subtle);
border-radius: var(--radius);
font-size: 12px;
color: var(--text-secondary);
align-self: flex-start;
}
.execution-indicator .spinner {
width: 14px;
height: 14px;
border: 2px solid var(--border);
border-top-color: var(--accent);
border-radius: 50%;
animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* --- Chat input --- */
.chat-input-area {
padding: 12px 24px 16px;
border-top: 1px solid var(--border);
background: var(--bg-secondary);
}
.chat-input-wrapper {
display: flex;
gap: 8px;
align-items: flex-end;
}
.chat-input-wrapper textarea {
flex: 1;
resize: none;
border: 1px solid var(--border);
background: var(--bg-input);
color: var(--text-primary);
border-radius: var(--radius);
padding: 10px 14px;
font-family: var(--font-sans);
font-size: 14px;
line-height: 1.5;
min-height: 42px;
max-height: 160px;
outline: none;
transition: border-color var(--transition);
}
.chat-input-wrapper textarea:focus { border-color: var(--accent); }
.chat-input-wrapper textarea::placeholder { color: var(--text-muted); }
.chat-input-wrapper textarea:disabled {
opacity: .5;
cursor: not-allowed;
}
/* ============================================================
Event Log (collapsible, below chat)
============================================================ */
.event-log-panel {
border-top: 1px solid var(--border);
background: var(--bg-secondary);
display: flex;
flex-direction: column;
max-height: 0;
overflow: hidden;
transition: max-height .3s ease;
}
.event-log-panel.open { max-height: 280px; }
.event-log-header {
display: flex;
align-items: center;
gap: 8px;
padding: 6px 16px;
cursor: pointer;
border-bottom: 1px solid var(--border-subtle);
user-select: none;
font-size: 12px;
font-weight: 600;
color: var(--text-secondary);
text-transform: uppercase;
letter-spacing: .5px;
}
.event-log-header .chevron {
transition: transform var(--transition);
font-size: 10px;
}
.event-log-panel.open .event-log-header .chevron { transform: rotate(180deg); }
.event-log-filters {
display: flex;
gap: 4px;
padding: 6px 12px;
flex-wrap: wrap;
border-bottom: 1px solid var(--border-subtle);
}
.event-filter-btn {
font-size: 10px;
padding: 2px 8px;
border-radius: 10px;
border: 1px solid var(--border);
background: transparent;
color: var(--text-secondary);
cursor: pointer;
transition: all var(--transition);
}
.event-filter-btn.active {
background: var(--accent-muted);
color: var(--accent);
border-color: var(--accent);
}
.event-log-entries {
flex: 1;
overflow-y: auto;
padding: 4px 8px;
font-family: var(--font-mono);
font-size: 11px;
}
.event-entry {
display: flex;
gap: 8px;
padding: 3px 6px;
border-radius: var(--radius-sm);
align-items: flex-start;
}
.event-entry:hover { background: var(--bg-hover); }
.event-time { color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }
.event-type-badge {
font-size: 10px;
padding: 0 6px;
border-radius: 3px;
font-weight: 600;
white-space: nowrap;
flex-shrink: 0;
}
.event-data {
color: var(--text-secondary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
flex: 1;
cursor: pointer;
}
.event-data.expanded {
white-space: pre-wrap;
word-break: break-all;
}
/* Event type colors */
.event-type-badge.lifecycle { background: rgba(88,166,255,.15); color: var(--event-lifecycle); }
.event-type-badge.content { background: rgba(63,185,80,.15); color: var(--event-content); }
.event-type-badge.tool { background: rgba(210,153,34,.15); color: var(--event-tool); }
.event-type-badge.orchestration { background: rgba(188,140,255,.15); color: var(--event-orchestration); }
.event-type-badge.error { background: rgba(248,81,73,.15); color: var(--event-error); }
.event-type-badge.keepalive { background: rgba(110,118,129,.1); color: var(--event-keepalive); }
/* ============================================================
Inspector (right panel)
============================================================ */
#inspector {
display: flex;
flex-direction: column;
background: var(--bg-secondary);
border-left: 1px solid var(--border);
overflow-y: auto;
}
.inspector-empty {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
color: var(--text-muted);
font-size: 13px;
}
.inspector-section {
padding: 12px 14px;
border-bottom: 1px solid var(--border-subtle);
}
.inspector-section-title {
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: .5px;
color: var(--text-muted);
margin-bottom: 8px;
}
.inspector-field {
display: flex;
justify-content: space-between;
align-items: center;
padding: 3px 0;
font-size: 13px;
}
.inspector-field .label {
color: var(--text-secondary);
}
.inspector-field .value {
font-family: var(--font-mono);
font-size: 12px;
color: var(--text-primary);
}
/* --- Status badge --- */
.badge {
display: inline-block;
font-size: 11px;
font-weight: 600;
padding: 1px 8px;
border-radius: 10px;
text-transform: capitalize;
}
.badge.idle { background: rgba(63,185,80,.15); color: var(--status-success); }
.badge.active { background: rgba(63,185,80,.15); color: var(--status-success); }
.badge.executing { background: rgba(210,153,34,.15); color: var(--status-warning); }
.badge.completed { background: rgba(110,118,129,.15); color: var(--text-muted); }
.badge.error { background: rgba(248,81,73,.15); color: var(--status-error); }
.badge.pending { background: rgba(110,118,129,.1); color: var(--text-muted); }
.badge.planning { background: rgba(188,140,255,.15); color: var(--agent-planner); }
.badge.reviewing { background: rgba(247,120,186,.15); color: var(--agent-reviewer); }
.badge.failed { background: rgba(248,81,73,.15); color: var(--status-error); }
/* --- Agent timeline --- */
.timeline {
position: relative;
padding-left: 20px;
}
.timeline::before {
content: '';
position: absolute;
left: 7px;
top: 0;
bottom: 0;
width: 2px;
background: var(--border);
}
.timeline-step {
position: relative;
padding: 6px 0 12px;
}
.timeline-step::before {
content: '';
position: absolute;
left: -17px;
top: 10px;
width: 10px;
height: 10px;
border-radius: 50%;
border: 2px solid var(--border);
background: var(--bg-secondary);
}
.timeline-step.active::before {
border-color: var(--status-warning);
background: var(--status-warning);
animation: pulse 1.5s infinite;
}
.timeline-step.completed::before {
border-color: var(--status-success);
background: var(--status-success);
}
.timeline-step.failed::before {
border-color: var(--status-error);
background: var(--status-error);
}
.timeline-step-header {
display: flex;
align-items: center;
gap: 6px;
font-size: 12px;
}
.timeline-step-desc {
font-size: 12px;
color: var(--text-secondary);
margin-top: 2px;
line-height: 1.4;
}
.timeline-tools {
margin-top: 4px;
display: flex;
flex-wrap: wrap;
gap: 4px;
}
.tool-chip {
font-size: 10px;
font-family: var(--font-mono);
padding: 1px 6px;
border-radius: 3px;
background: rgba(210,153,34,.1);
color: var(--event-tool);
border: 1px solid rgba(210,153,34,.2);
}
/* --- Agent role badge --- */
.role-badge {
font-size: 10px;
font-weight: 600;
padding: 1px 6px;
border-radius: 3px;
text-transform: uppercase;
letter-spacing: .3px;
}
.role-badge.planner { background: rgba(188,140,255,.15); color: var(--agent-planner); }
.role-badge.coder { background: rgba(63,185,80,.15); color: var(--agent-coder); }
.role-badge.collector { background: rgba(210,153,34,.15); color: var(--agent-collector); }
.role-badge.reviewer { background: rgba(247,120,186,.15); color: var(--agent-reviewer); }
.role-badge.orchestrator { background: rgba(88,166,255,.15); color: var(--agent-orchestrator); }
/* ============================================================
Buttons
============================================================ */
.btn {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 6px 14px;
border-radius: var(--radius);
border: 1px solid var(--border);
background: var(--bg-surface);
color: var(--text-primary);
font-size: 13px;
font-family: var(--font-sans);
cursor: pointer;
transition: all var(--transition);
white-space: nowrap;
}
.btn:hover { background: var(--bg-hover); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary {
background: var(--accent);
color: var(--text-inverse);
border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-danger {
color: var(--status-error);
border-color: transparent;
background: transparent;
}
.btn-danger:hover { background: rgba(248,81,73,.1); }
.btn-sm { padding: 3px 10px; font-size: 12px; }
.btn-icon {
padding: 4px 8px;
border: none;
background: transparent;
color: var(--text-secondary);
cursor: pointer;
border-radius: var(--radius-sm);
font-size: 16px;
}
.btn-icon:hover { background: var(--bg-hover); color: var(--text-primary); }
/* ============================================================
Modal
============================================================ */
.modal-overlay {
position: fixed;
inset: 0;
background: rgba(0,0,0,.6);
display: flex;
align-items: center;
justify-content: center;
z-index: 100;
opacity: 0;
pointer-events: none;
transition: opacity .2s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
background: var(--bg-surface);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
width: 520px;
max-height: 80vh;
overflow-y: auto;
box-shadow: 0 8px 30px rgba(0,0,0,.4);
}
.modal-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 14px 18px;
border-bottom: 1px solid var(--border-subtle);
}
.modal-header h2 { font-size: 15px; font-weight: 600; }
.modal-body { padding: 18px; }
.modal-footer {
display: flex;
justify-content: flex-end;
gap: 8px;
padding: 12px 18px;
border-top: 1px solid var(--border-subtle);
}
/* --- Form fields --- */
.form-group {
margin-bottom: 14px;
}
.form-group label {
display: block;
font-size: 12px;
font-weight: 600;
color: var(--text-secondary);
margin-bottom: 4px;
}
.form-group textarea,
.form-group input {
width: 100%;
border: 1px solid var(--border);
background: var(--bg-input);
color: var(--text-primary);
border-radius: var(--radius);
padding: 8px 12px;
font-family: var(--font-mono);
font-size: 12px;
outline: none;
transition: border-color var(--transition);
}
.form-group textarea:focus,
.form-group input:focus { border-color: var(--accent); }
.form-group textarea { min-height: 80px; resize: vertical; }
.form-group .error-text {
font-size: 11px;
color: var(--status-error);
margin-top: 3px;
}
.rules-list { display: flex; flex-direction: column; gap: 6px; }
.rule-row {
display: flex;
gap: 6px;
align-items: center;
}
.rule-row input { flex: 1; }
/* ============================================================
JSON tree viewer
============================================================ */
.json-tree details { margin-left: 14px; }
.json-tree summary {
cursor: pointer;
color: var(--text-secondary);
font-family: var(--font-mono);
font-size: 12px;
user-select: none;
}
.json-tree summary:hover { color: var(--text-primary); }
.json-tree .json-key { color: var(--accent); }
.json-tree .json-string { color: var(--status-success); }
.json-tree .json-number { color: var(--agent-planner); }
.json-tree .json-bool { color: var(--status-warning); }
.json-tree .json-null { color: var(--text-muted); }
.json-tree .json-leaf {
margin-left: 14px;
font-family: var(--font-mono);
font-size: 12px;
padding: 1px 0;
}
/* ============================================================
Responsive
============================================================ */
@media (max-width: 1200px) {
#app {
grid-template-columns: var(--sidebar-width) 1fr;
grid-template-areas:
"toolbar toolbar"
"sidebar main";
}
#inspector { display: none; }
}
@media (max-width: 768px) {
#app {
grid-template-columns: 1fr;
grid-template-areas:
"toolbar"
"main";
}
#sidebar { display: none; }
}
/* ============================================================
Utility
============================================================ */
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono { font-family: var(--font-mono); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 12px; }
.mt-2 { margin-top: 8px; }
.gap-4 { gap: 4px; }