AIOS-Cockpit / templates /workbench.html
smlflg's picture
Initial public upload from Projekte/AIOS-Cockpit
1aee5ae verified
Raw History Blame Contribute Delete
8.38 kB
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Workbench 路 AIOS Cockpit</title>
<link rel="stylesheet" href="/static/styles.css">
</head>
<body>
<header class="topbar">
<div>
<p class="eyebrow">Agent Terminal</p>
<h1>AIOS Workbench</h1>
</div>
<nav>
<a href="/dashboard">Dashboard</a>
<a href="/handoffs">Handoffs</a>
<a href="/codex-max-harness/">Codex Max</a>
</nav>
</header>
<main class="workbench-shell">
<aside class="rail">
<section class="panel">
<h2>Project</h2>
<form action="/workbench" method="get" class="stack-form">
<select name="project" onchange="this.form.submit()">
{% for project in projects %}
<option value="{{ project.name }}" {{ "selected" if selected_project and project.name == selected_project.name else "" }}>
{{ project.name }}
</option>
{% endfor %}
</select>
<button type="submit">Open</button>
</form>
</section>
<section class="panel">
<div class="section-head">
<h2>Queue</h2>
<span>{{ task_views|length }}</span>
</div>
<ul class="task-list">
{% for item_view in task_views %}
{% set item = item_view.task %}
<li class="{{ 'active' if selected_task and item.id == selected_task.id else '' }}">
<a href="/workbench?project={{ item.project_name }}&task={{ item.id }}">
<strong>{{ item.title }}</strong>
<span>{{ item.project_name }} 路 {{ item.status }}</span>
{% if item_view.warnings %}
<small class="warn">{{ item_view.warnings|length }} warning</small>
{% endif %}
</a>
</li>
{% else %}
<li><span>No workbench tasks yet.</span></li>
{% endfor %}
</ul>
</section>
<section class="panel">
<h2>Sources</h2>
<ul class="task-list">
{% for project in integrate_projects[:8] %}
<li><a href="/workbench?project={{ project.name }}">{{ project.name }}<span>{{ project.category }}</span></a></li>
{% endfor %}
</ul>
</section>
</aside>
<section class="terminal">
{% if selected_task %}
<div class="terminal-head">
<div>
<p class="eyebrow">{{ selected_task.project_name }} 路 {{ selected_task.status }}</p>
<h2>{{ selected_task.title }}</h2>
</div>
<span class="pill">{{ selected_task.target_agent or "route default" }}</span>
</div>
<article class="terminal-block">
<h3>Task</h3>
<pre>{{ selected_task.description }}</pre>
</article>
<article class="terminal-block">
<h3>Verification</h3>
<p>{{ selected_task.verification }}</p>
</article>
{% if selected_task_view and selected_task_view.warnings %}
<article class="terminal-block warning-block">
<h3>Warnings</h3>
<ul class="runs">
{% for warning in selected_task_view.warnings %}
<li><span class="warn">{{ warning }}</span></li>
{% endfor %}
</ul>
</article>
{% endif %}
<div class="action-row">
<form action="/api/tasks/{{ selected_task.id }}/route" method="post">
<button type="submit">Route</button>
</form>
<form action="/api/tasks/{{ selected_task.id }}/handoff" method="post">
<button type="submit">Save Handoff</button>
</form>
<form action="/api/tasks/{{ selected_task.id }}/prepare-run" method="post">
<button type="submit">Prepare Run</button>
</form>
<form action="/api/tasks/{{ selected_task.id }}/start-run" method="post">
<button type="submit">Dry Run Preview</button>
</form>
</div>
{% if selected_route %}
<article class="terminal-block">
<h3>Route</h3>
<div class="route-grid">
<span>Harness</span><strong>{{ selected_route.get("harness", "") }}</strong>
<span>Class</span><strong>{{ selected_route.get("task_class", "") }}</strong>
<span>Confidence</span><strong>{{ selected_route.get("confidence", 0) }}%</strong>
<span>Level</span><strong>{{ selected_route.get("decision_level", "") }}</strong>
</div>
<p>{{ selected_route.get("why", "") }}</p>
<p class="warn">{{ selected_route.get("risks", "") }}</p>
</article>
{% endif %}
{% if selected_task.handoff_filename %}
<article class="terminal-block">
<h3>Handoff</h3>
{% if selected_task_view and selected_task_view.handoff_exists %}
<p><a href="/handoffs/{{ selected_task.handoff_filename }}">{{ selected_task.handoff_filename }}</a></p>
{% else %}
<p class="warn">Missing handoff artifact: {{ selected_task.handoff_filename }}</p>
{% endif %}
</article>
{% endif %}
{% if run_preview %}
<article class="terminal-block">
<h3>Run Preview</h3>
<p>{{ run_preview.status }} 路 {{ run_preview.created_at }}</p>
<p class="path">{{ run_preview.cwd }}</p>
<pre>{{ run_preview.command | join(" ") }}</pre>
{% if run_preview.stdout %}
<h3>stdout</h3>
<pre>{{ run_preview.stdout }}</pre>
{% endif %}
{% if run_preview.stderr %}
<h3>stderr</h3>
<pre>{{ run_preview.stderr }}</pre>
{% endif %}
</article>
{% endif %}
{% else %}
<div class="terminal-head">
<div>
<p class="eyebrow">{{ selected_project.name if selected_project else "No project" }}</p>
<h2>Build A Sprint From This Project</h2>
</div>
</div>
<div class="candidate-list">
{% for candidate in candidates %}
<article class="candidate">
<div>
<span class="pill">{{ candidate.source }}</span>
<h3>{{ candidate.title }}</h3>
<p>{{ candidate.description }}</p>
<small>{{ candidate.verification }}</small>
</div>
<form action="/api/tasks" method="post">
<input type="hidden" name="project" value="{{ selected_project.name }}">
<input type="hidden" name="title" value="{{ candidate.title }}">
<input type="hidden" name="description" value="{{ candidate.description }}">
<input type="hidden" name="verification" value="{{ candidate.verification }}">
<select name="target_agent">
<option value="">route default</option>
<option value="codex">codex</option>
<option value="opencode">opencode</option>
<option value="claude">claude</option>
</select>
<button type="submit">Add Task</button>
</form>
</article>
{% endfor %}
</div>
{% endif %}
</section>
<aside class="context-pane">
<section class="panel">
<h2>Today</h2>
<p>{{ snapshot.today.daily_focus or "No daily focus." }}</p>
</section>
{% if selected_project %}
<section class="panel">
<h2>Context</h2>
<p><a href="/projects/{{ selected_project.name }}">{{ selected_project.name }}</a></p>
<p>{{ selected_project.category }} 路 {{ selected_project.status }}</p>
<p class="path">{{ selected_project.path }}</p>
<p class="{{ 'warn' if selected_project.git_dirty else 'ok' }}">
{{ selected_project.git_change_count }} local changes
</p>
</section>
{% endif %}
<section class="panel">
<h2>Runbook</h2>
<a class="button-link" href="/codex-max-harness/">Codex Max Harness</a>
</section>
<section class="panel">
<h2>Latest Runs</h2>
<ul class="runs">
{% for run in snapshot.runs[:5] %}
<li>
<strong><a href="/runs/{{ run.run_id }}">{{ run.harness }}</a></strong>
<span>{{ run.phase }} 路 {{ run.status }}</span>
</li>
{% else %}
<li>No Zentrale runs found.</li>
{% endfor %}
</ul>
</section>
</aside>
</main>
</body>
</html>