🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
TypeScript agentic-aiagentic-frameworkagentic-workflowagentsai-agentsai-assistantai-skillsautonomous-agentsclaudecodexdsh-pluginharnessmcp-servermulti-agentmulti-agent-systemsnpmskillsswarmswarm-intelligencetypescript
fix(ai-team): enlarge workspace rail and restore evidence view (#3550)
rUv1e814f47a61f
diff --git a/plugins/ruflo-ai-team/.claude-plugin/plugin.json b/plugins/ruflo-ai-team/.claude-plugin/plugin.jsonindex 7d686aa969..0eebc6ec39 100644--- a/plugins/ruflo-ai-team/.claude-plugin/plugin.json+++ b/plugins/ruflo-ai-team/.claude-plugin/plugin.json@@ -1,7 +1,7 @@{"name": "ruflo-ai-team","description": "Give Claude a tenant-isolated AI team that divides work, coordinates progress, recalls approved context, and returns evidence-backed results.",- "version": "0.1.3",+ "version": "0.1.4","author": { "name": "ruvnet", "url": "https://github.com/ruvnet" },"homepage": "https://team.ruv.io","privacyPolicyUrl": "https://team.ruv.io/privacy",diff --git a/plugins/ruflo-ai-team/README.md b/plugins/ruflo-ai-team/README.mdindex 19d0499317..d4bf57bda7 100644--- a/plugins/ruflo-ai-team/README.md+++ b/plugins/ruflo-ai-team/README.md@@ -13,7 +13,7 @@ The public v0.1 surface coordinates work; it does not silently send messages, de- Stored task, memory, and evidence content is provenance-labelled and nonce-fenced as untrusted data.- Fourteen focused tools, two prompts, a template resource, and a ChatGPT MCP Apps board.-The read-only `team_board` tool opens one compact ruOS-style workspace in ChatGPT. Its Teams, Runs, and Tasks rail navigates inside the same card; selecting a run or pressing Refresh calls the same scoped tool through the MCP Apps bridge without asking ChatGPT to render another board. Its public HTML resource contains no tenant data; the tool requires `team:read`. Other tools remain data-only. Historical chat cards are immutable, so open a fresh chat after refreshing tools to see the current UI. `run_complete` requires `team:run` and refuses to complete a run until it has at least one task and every task is complete.+The read-only `team_board` tool opens one compact ruOS-style workspace in ChatGPT. Its Teams, Runs, Tasks, and Evidence rail navigates inside the same card; selecting a run or pressing Refresh calls the same scoped tool through the MCP Apps bridge without asking ChatGPT to render another board. Evidence shows a private run summary; `evidence_export` provides the full bundle in chat. Its public HTML resource contains no tenant data; the tool requires `team:read`. Other tools remain data-only. Historical chat cards are immutable, so open a fresh chat after refreshing tools to see the current UI. `run_complete` requires `team:run` and refuses to complete a run until it has at least one task and every task is complete.Memory search reports `lexical-degraded` unless a compatible native RuVector binding passes the startup probe. The pinned `@ruvector/core` 0.1.32 package with its 0.1.30 optional native binding fails that probe in local validation with a dimension mismatch. Do not set `RUFLO_AI_TEAM_VECTOR=native` in production until a compatible binary is verified.diff --git a/plugins/ruflo-ai-team/RELEASE_NOTES.md b/plugins/ruflo-ai-team/RELEASE_NOTES.mdindex bbb2e9c413..c431c88032 100644--- a/plugins/ruflo-ai-team/RELEASE_NOTES.md+++ b/plugins/ruflo-ai-team/RELEASE_NOTES.md@@ -1,3 +1,9 @@+# 0.1.4 — Larger, clickable workspace rail++- Increased the outside gutter around the single ChatGPT workspace and enlarged the sidebar hit targets with hover/focus states.+- Added an Evidence section to the same board with a tenant-scoped run summary and a clear path to the full `evidence_export` bundle.+- Versioned the UI resource to `ui://ruflo-ai-team/board-v4.html`; older ChatGPT cards remain immutable and require a fresh chat.+# 0.1.3 — One navigable workspace- Made the single ChatGPT MCP Apps board a navigable hub for teams, runs, and tasks, with in-card refresh and run selection through the MCP Apps bridge.diff --git a/plugins/ruflo-ai-team/deploy/cloud-run.yaml b/plugins/ruflo-ai-team/deploy/cloud-run.yamlindex ce65d2631d..bc0e221516 100644--- a/plugins/ruflo-ai-team/deploy/cloud-run.yaml+++ b/plugins/ruflo-ai-team/deploy/cloud-run.yaml@@ -13,7 +13,7 @@ spec:timeoutSeconds: 60serviceAccountName: ruflo-ai-team@PROJECT_ID.iam.gserviceaccount.comcontainers:- - image: REGION-docker.pkg.dev/PROJECT_ID/ruflo/ruflo-ai-team:0.1.3+ - image: REGION-docker.pkg.dev/PROJECT_ID/ruflo/ruflo-ai-team:0.1.4ports: [{ containerPort: 8080 }]resources:limits: { cpu: "1", memory: 1Gi }diff --git a/plugins/ruflo-ai-team/package-lock.json b/plugins/ruflo-ai-team/package-lock.jsonindex 28e5829f04..893b43fb3c 100644--- a/plugins/ruflo-ai-team/package-lock.json+++ b/plugins/ruflo-ai-team/package-lock.json@@ -1,12 +1,12 @@{"name": "@ruflo/ai-team-service",- "version": "0.1.3",+ "version": "0.1.4","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "@ruflo/ai-team-service",- "version": "0.1.3",+ "version": "0.1.4","license": "MIT","dependencies": {"@google-cloud/firestore": "^9.2.0",diff --git a/plugins/ruflo-ai-team/package.json b/plugins/ruflo-ai-team/package.jsonindex 117ad85d8d..c39dc84b25 100644--- a/plugins/ruflo-ai-team/package.json+++ b/plugins/ruflo-ai-team/package.json@@ -1,6 +1,6 @@{"name": "@ruflo/ai-team-service",- "version": "0.1.3",+ "version": "0.1.4","private": true,"type": "module","description": "Multi-tenant MCP control plane and Claude plugin for coordinated AI teams.",diff --git a/plugins/ruflo-ai-team/src/server.mjs b/plugins/ruflo-ai-team/src/server.mjsindex ae48e30bf3..5a69e65402 100644--- a/plugins/ruflo-ai-team/src/server.mjs+++ b/plugins/ruflo-ai-team/src/server.mjs@@ -11,7 +11,7 @@ import { fenced, scanStoredText } from './untrusted.mjs';import { privacyPage, supportPage, termsPage } from './public-pages.mjs';export const VERSION = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8')).version;-const TEAM_BOARD_URI = 'ui://ruflo-ai-team/board-v3.html';+const TEAM_BOARD_URI = 'ui://ruflo-ai-team/board-v4.html';const TEAM_BOARD_HTML = readFileSync(new URL('../ui/team-board.html', import.meta.url), 'utf8');const MAX_BODY = 512 * 1024;const TOOL_SCOPES = Object.freeze({@@ -58,7 +58,7 @@ export async function createAiTeamService({ store, vectorMemory, verifyToken, pomcp.tool('team_get', 'Reads one AI team owned by the authenticated tenant. Requires team:read. Foreign and missing IDs both return not_found.', { teamId: z.string() }, READ('Get AI team'), scoped(SCOPES.read, async ({ teamId }) => { const value=await store.getTeam(auth.tenantId,teamId); return value?text(value):notFound(); }));mcp.registerTool('team_board', {title: 'Show AI team board',- description: 'Opens one private, read-only ChatGPT workspace for teams, runs, and tasks. Requires team:read. The user can navigate and refresh inside this one widget; avoid calling it repeatedly in the same chat. No actions are executed.',+ description: 'Opens one private, read-only ChatGPT workspace for teams, runs, tasks, and evidence summaries. Requires team:read. The user can navigate and refresh inside this one widget; avoid calling it repeatedly in the same chat. No actions are executed.',inputSchema: { runId: z.string().optional() },annotations: READ('Show AI team board'),_meta: { ui: { resourceUri: TEAM_BOARD_URI }, 'openai/outputTemplate': TEAM_BOARD_URI },@@ -68,7 +68,8 @@ export async function createAiTeamService({ store, vectorMemory, verifyToken, poconst run = runId ? await store.getRun(auth.tenantId, runId) : null;if (runId && !run) return notFound();const tasks = run ? await store.listTasks(auth.tenantId, runId) : [];- const board = { teams: teams.map(({ id, name, status }) => ({ id, name, status })), runs: runs.slice(0, 100).map(({ id, teamId, objective, status, budgetUnits, spentUnits }) => ({ id, teamId, objective: objective.slice(0, 160), status, budgetUnits, spentUnits })), run: run && { id: run.id, objective: run.objective, status: run.status, budgetUnits: run.budgetUnits, spentUnits: run.spentUnits }, tasks: tasks.map(({ id, title, status }) => ({ id, title, status })) };+ const evidence = run ? await store.evidence(auth.tenantId, runId) : null;+ const board = { teams: teams.map(({ id, name, status }) => ({ id, name, status })), runs: runs.slice(0, 100).map(({ id, teamId, objective, status, budgetUnits, spentUnits }) => ({ id, teamId, objective: objective.slice(0, 160), status, budgetUnits, spentUnits })), run: run && { id: run.id, objective: run.objective, status: run.status, budgetUnits: run.budgetUnits, spentUnits: run.spentUnits }, tasks: tasks.map(({ id, title, status }) => ({ id, title, status })), evidence: evidence && { runId, generatedAt: evidence.generatedAt, auditEvents: evidence.audit.length, taskCount: evidence.tasks.length, teamName: evidence.team?.name ?? '' } };return { ...text(board), structuredContent: board };}));mcp.tool('team_update', 'Updates the name, objective, roles, or status of an existing tenant-local team. Requires team:write. It does not run agents or perform external actions.', {diff --git a/plugins/ruflo-ai-team/test/service.node.mjs b/plugins/ruflo-ai-team/test/service.node.mjsindex b1a31eb6fc..26a0963a79 100644--- a/plugins/ruflo-ai-team/test/service.node.mjs+++ b/plugins/ruflo-ai-team/test/service.node.mjs@@ -75,7 +75,7 @@ test('scope checks return HTTP 403 rather than model-level permission errors', atest('board resource is public but contains no tenant data; board tool remains scoped', async (t) => {const f=await fixture(); t.after(()=>f.server.close());- const uri='ui://ruflo-ai-team/board-v3.html';+ const uri='ui://ruflo-ai-team/board-v4.html';const listed=await rpc(f.base,{jsonrpc:'2.0',id:1,method:'tools/list',params:{}});assert.equal(listed.body.result.tools.find(x=>x.name==='team_board')._meta.ui.resourceUri,uri);assert.deepEqual(listed.body.result.tools.filter(x=>x._meta?.ui?.resourceUri).map(x=>x.name),['team_board']);@@ -103,7 +103,12 @@ test('run completion requires all tasks complete and preserves tenant isolation'assert.deepEqual((await call(f.base,'team_board',{},'beta:all')).body.result.structuredContent.runs,[]);assert.equal(value(await call(f.base,'task_create',{runId:run.id,title:'Late',description:'No',assigneeRole:'verifier'},'alpha:all')).error,'not_found');assert.equal(value(await call(f.base,'task_update',{taskId:task.id,status:'open'},'alpha:all')).error,'not_found');- assert.equal(value(await call(f.base,'team_board',{runId:run.id},'alpha:all')).run.status,'complete');+ const board=value(await call(f.base,'team_board',{runId:run.id},'alpha:all'));+ assert.equal(board.run.status,'complete');+ assert.equal(board.evidence.runId,run.id);+ assert.equal(board.evidence.taskCount,1);+ assert.ok(board.evidence.auditEvents>=1);+ assert.equal(value(await call(f.base,'team_board',{runId:run.id},'beta:all')).error,'not_found');});test('tenant isolation hides foreign team and run identifiers', async (t) => {diff --git a/plugins/ruflo-ai-team/ui/team-board.html b/plugins/ruflo-ai-team/ui/team-board.htmlindex 924be4d7d0..43ead917c5 100644--- a/plugins/ruflo-ai-team/ui/team-board.html+++ b/plugins/ruflo-ai-team/ui/team-board.html@@ -6,15 +6,15 @@<title>RuFlo AI Team · Workspace</title><style>:root{color-scheme:dark;--ink:#eafcff;--muted:#96afb5;--aqua:#26e9d5;--pink:#ff3b91;--line:#24454b;--panel:#0a171b;--font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif}- *{box-sizing:border-box}html,body{margin:0;min-width:270px}body{padding:8px;background:#050b0e;color:var(--ink);font:13px/1.4 var(--font)}+ *{box-sizing:border-box}html,body{margin:0;min-width:270px}body{padding:16px;background:#050b0e;color:var(--ink);font:13px/1.4 var(--font)}.desktop{max-width:760px;min-height:390px;margin:auto;overflow:hidden;border:1px solid #315158;border-radius:17px;background:radial-gradient(ellipse at 78% 30%,#153841 0,#0a1c22 38%,#050b0e 80%);box-shadow:0 14px 40px #0008,0 0 30px #26e9d512}.topbar{display:flex;align-items:center;gap:10px;min-height:48px;padding:8px 12px;background:linear-gradient(105deg,#0c2023,#11161e 55%,#24111e);border-bottom:1px solid #31565d}.mark{display:grid;place-items:center;flex:none;width:32px;height:32px;border-radius:10px;background:radial-gradient(circle at 35% 27%,#8ffff4,var(--aqua) 37%,#087f86 74%,#071014);box-shadow:0 0 18px #26e9d566;color:#041012;font-weight:900;font-size:20px}.brand{min-width:0;flex:1}.brand strong{display:block;font-size:14px;letter-spacing:.02em}.brand small{display:block;color:var(--muted);font-size:10px;letter-spacing:.05em;text-transform:uppercase}.connection{white-space:nowrap;font-size:11px;color:#b7edcf}.connection::before{content:"";display:inline-block;width:7px;height:7px;margin-right:7px;border-radius:50%;background:#48e9a2;box-shadow:0 0 10px #48e9a2}.workspace{display:grid;grid-template-columns:75px minmax(0,1fr);min-height:325px;background-image:radial-gradient(#91dce111 1px,transparent 1px);background-size:18px 18px}- .rail{display:flex;flex-direction:column;align-items:center;gap:14px;padding:18px 6px;background:#081317d9;border-right:1px solid var(--line)}- .rail-item{display:grid;justify-items:center;gap:5px;padding:0;border:0;background:none;color:var(--muted);font:10px var(--font);text-align:center;cursor:pointer}.rail-icon{display:grid;place-items:center;width:38px;height:38px;border:1px solid #315158;border-radius:12px;background:#13262a;color:var(--aqua);font:700 17px var(--font)}.rail-item[aria-pressed="true"] .rail-icon{border-color:var(--aqua);box-shadow:0 0 16px #26e9d52a;background:#173337}.rail-item:focus-visible,.row-button:focus-visible,.refresh:focus-visible{outline:2px solid var(--aqua);outline-offset:3px}+ .rail{display:flex;flex-direction:column;align-items:center;gap:9px;padding:16px 6px;background:#081317d9;border-right:1px solid var(--line)}+ .rail-item{display:grid;justify-items:center;align-content:center;gap:5px;min-width:56px;min-height:62px;padding:5px 3px;border:1px solid transparent;border-radius:11px;background:none;color:var(--muted);font:10px var(--font);text-align:center;cursor:pointer;touch-action:manipulation}.rail-item:hover{border-color:#315158;background:#173137}.rail-icon{display:grid;place-items:center;width:38px;height:38px;border:1px solid #315158;border-radius:12px;background:#13262a;color:var(--aqua);font:700 17px var(--font)}.rail-item[aria-pressed="true"] .rail-icon{border-color:var(--aqua);box-shadow:0 0 16px #26e9d52a;background:#173337}.rail-item:focus-visible,.row-button:focus-visible,.refresh:focus-visible{outline:2px solid var(--aqua);outline-offset:3px}.window{align-self:start;min-width:0;margin:15px;border:1px solid #33545a;border-radius:13px;overflow:hidden;background:#0b171ddf;box-shadow:0 16px 28px #0007}.windowbar{display:flex;align-items:center;gap:9px;min-height:34px;padding:7px 11px;border-bottom:1px solid var(--line);background:linear-gradient(90deg,#142a2f,#18232b)}.refresh{margin-left:auto;padding:3px 7px;border:1px solid #315158;border-radius:6px;background:#102429;color:var(--aqua);font:10px ui-monospace,monospace;cursor:pointer}.refresh:disabled{opacity:.55;cursor:wait}.lights{display:flex;gap:5px}.lights i{display:block;width:7px;height:7px;border-radius:50%;background:#ff567c}.lights i:nth-child(2){background:#ffd16b}.lights i:nth-child(3){background:#43dfa2}.windowbar strong{font-size:11px;font-weight:650;letter-spacing:.04em}.windowbar span{margin-left:auto;color:var(--muted);font:10px ui-monospace,monospace}@@ -24,14 +24,14 @@.section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px}.section-head h2{margin:0;color:#b9e6e2;font-size:11px;letter-spacing:.12em;text-transform:uppercase}.section-head span{color:var(--muted);font:10px ui-monospace,monospace}.rows{display:grid;gap:7px}.row{display:flex;align-items:center;gap:9px;min-width:0;width:100%;padding:9px 10px;border:1px solid #25444a;border-radius:9px;background:#11242a;color:var(--ink);text-align:left;font:inherit}.row-button{cursor:pointer}.row-button:hover{border-color:var(--aqua);background:#173137}.glyph{display:grid;place-items:center;flex:none;width:27px;height:27px;border-radius:8px;background:#1b3940;color:var(--aqua);font-weight:700}.row-copy{min-width:0;flex:1}.row-copy strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:600}.row-copy small{display:block;color:var(--muted);font-size:10px;text-transform:uppercase}.row .state{color:var(--aqua);font:10px ui-monospace,monospace;text-transform:uppercase;white-space:nowrap}.row .state[data-state="complete"]{color:#73e4a3}.row .state[data-state="blocked"]{color:#ffd17b}.empty{padding:16px;border:1px dashed #315158;border-radius:9px;color:var(--muted);text-align:center}.footer{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 12px;border-top:1px solid var(--line);background:#081317;color:var(--muted);font:10px ui-monospace,monospace}.footer b{color:var(--aqua);font-weight:500}- @media(max-width:490px){.workspace{grid-template-columns:48px minmax(0,1fr)}.rail{gap:10px;padding:12px 4px}.rail-icon{width:32px;height:32px;font-size:14px}.rail-item{font-size:0}.window{margin:9px}.content{padding:11px}.metrics{gap:5px}.metric{padding:8px}.metric strong{font-size:15px}.heading h1{font-size:16px}.connection{font-size:0}.connection::before{margin:0}}+ @media(max-width:490px){body{padding:10px}.workspace{grid-template-columns:48px minmax(0,1fr)}.rail{gap:7px;padding:12px 3px}.rail-icon{width:32px;height:32px;font-size:14px}.rail-item{min-width:40px;min-height:48px;font-size:0}.window{margin:9px}.content{padding:11px}.metrics{gap:5px}.metric{padding:8px}.metric strong{font-size:15px}.heading h1{font-size:16px}.connection{font-size:0}.connection::before{margin:0}}</style></head><body><div class="desktop" aria-label="RuFlo AI Team workspace"><header class="topbar"><div class="mark" aria-hidden="true">r</div><div class="brand"><strong>RuFlo AI Team</strong><small>Private coordination workspace</small></div><span class="connection">Tenant-scoped</span></header><div class="workspace">- <aside class="rail" aria-label="Workspace sections"><button class="rail-item" type="button" data-view="teams" aria-pressed="true"><span class="rail-icon" aria-hidden="true">◈</span><span>Teams</span></button><button class="rail-item" type="button" data-view="runs" aria-pressed="false"><span class="rail-icon" aria-hidden="true">≡</span><span>Runs</span></button><button class="rail-item" type="button" data-view="tasks" aria-pressed="false"><span class="rail-icon" aria-hidden="true">✓</span><span>Tasks</span></button></aside>+ <aside class="rail" aria-label="Workspace sections"><button class="rail-item" type="button" data-view="teams" aria-label="Teams section" aria-pressed="true"><span class="rail-icon" aria-hidden="true">◈</span><span>Teams</span></button><button class="rail-item" type="button" data-view="runs" aria-label="Runs section" aria-pressed="false"><span class="rail-icon" aria-hidden="true">≡</span><span>Runs</span></button><button class="rail-item" type="button" data-view="tasks" aria-label="Tasks section" aria-pressed="false"><span class="rail-icon" aria-hidden="true">✓</span><span>Tasks</span></button><button class="rail-item" type="button" data-view="evidence" aria-label="Evidence section" aria-pressed="false"><span class="rail-icon" aria-hidden="true">▤</span><span>Evidence</span></button></aside><main class="window"><div class="windowbar"><div class="lights" aria-hidden="true"><i></i><i></i><i></i></div><strong>TEAM CONTROL</strong><button id="refresh" class="refresh" type="button" aria-label="Refresh workspace in this card">↻ Refresh</button><span>READ ONLY</span></div><div class="content"><p class="eyebrow">Workspace overview</p><div class="heading"><div><h1 id="title">Your teams</h1><p id="subtitle">Live coordination records from your account</p></div><span id="run-status" class="status" hidden></span></div><div id="metrics" class="metrics"></div><div class="section-head"><h2 id="list-heading">Teams</h2><span id="list-count"></span></div><div id="rows" class="rows" aria-live="polite"><div class="empty">Loading team status…</div></div>@@ -43,24 +43,33 @@<script type="module">const byId=(id)=>document.getElementById(id);const element=(tag,value,className)=>{const node=document.createElement(tag);node.textContent=String(value??'');if(className)node.className=className;return node};- let workspace={teams:[],runs:[],run:null,tasks:[]};+ let workspace={teams:[],runs:[],run:null,tasks:[],evidence:null};let view='teams',selectedTeamId=null,selectedRunId=null;function render(){const teams=workspace.teams;const runs=selectedTeamId?workspace.runs.filter(run=>run.teamId===selectedTeamId):workspace.runs;const run=workspace.run;const tasks=workspace.tasks;+ const evidence=workspace.evidence;for(const button of document.querySelectorAll('[data-view]'))button.setAttribute('aria-pressed',String(button.dataset.view===view));- byId('title').textContent=view==='teams'?'Your teams':view==='runs'?'Team runs':'Run tasks';- byId('subtitle').textContent=view==='tasks'?(run?.objective??'Choose a run to see its tasks.'):view==='runs'?(selectedTeamId?'Runs for the selected team':'Private, budgeted coordination runs'):'Live coordination records from your account';- const status=byId('run-status');status.hidden=view!=='tasks'||!run;+ byId('title').textContent=view==='teams'?'Your teams':view==='runs'?'Team runs':view==='tasks'?'Run tasks':'Run evidence';+ byId('subtitle').textContent=view==='tasks'?(run?.objective??'Choose a run to see its tasks.'):view==='evidence'?(run?.objective??'Choose a run to see its evidence summary.'):view==='runs'?(selectedTeamId?'Runs for the selected team':'Private, budgeted coordination runs'):'Live coordination records from your account';+ const status=byId('run-status');status.hidden=!['tasks','evidence'].includes(view)||!run;if(run){status.textContent=run.status??'unknown';status.dataset.state=run.status??'';}const metrics=byId('metrics');metrics.replaceChildren();- const values=view==='tasks'?[['Tasks',tasks.length],['Complete',tasks.filter(task=>task.status==='complete').length],['Units',`${run?.spentUnits??0} / ${run?.budgetUnits??0}`]]:view==='runs'?[['Runs',runs.length],['Complete',runs.filter(item=>item.status==='complete').length],['Planned',runs.filter(item=>item.status==='planned').length]]:[['Teams',teams.length],['Active',teams.filter(team=>team.status==='active').length],['Complete',teams.filter(team=>team.status==='complete').length]];+ const values=view==='tasks'?[['Tasks',tasks.length],['Complete',tasks.filter(task=>task.status==='complete').length],['Units',`${run?.spentUnits??0} / ${run?.budgetUnits??0}`]]:view==='evidence'?[['Tasks',evidence?.taskCount??0],['Audit events',evidence?.auditEvents??0],['Units',`${run?.spentUnits??0} / ${run?.budgetUnits??0}`]]:view==='runs'?[['Runs',runs.length],['Complete',runs.filter(item=>item.status==='complete').length],['Planned',runs.filter(item=>item.status==='planned').length]]:[['Teams',teams.length],['Active',teams.filter(team=>team.status==='active').length],['Complete',teams.filter(team=>team.status==='complete').length]];for(const [label,value] of values){const card=element('div','', 'metric');card.append(element('small',label),element('strong',value));metrics.append(card);}- const items=view==='teams'?teams:view==='runs'?runs:tasks;- byId('list-heading').textContent=view==='teams'?'Teams':view==='runs'?'Runs':'Tasks';byId('list-count').textContent=`${items.length} ${items.length===1?'item':'items'}`;+ const items=view==='teams'?teams:view==='runs'?runs:view==='tasks'?tasks:[];+ byId('list-heading').textContent=view==='teams'?'Teams':view==='runs'?'Runs':view==='tasks'?'Tasks':'Evidence summary';byId('list-count').textContent=view==='evidence'?(evidence?'Private run':'No run selected'):`${items.length} ${items.length===1?'item':'items'}`;const rows=byId('rows');rows.replaceChildren();+ if(view==='evidence'){+ if(!evidence){rows.append(element('div','Select a run to see its evidence summary.','empty'));return;}+ for(const [label,value] of [['Run',evidence.runId],['Team',evidence.teamName],['Generated',evidence.generatedAt]]){+ const row=element('div','', 'row');const copy=element('div','', 'row-copy');copy.append(element('strong',value),element('small',label));row.append(copy);rows.append(row);+ }+ rows.append(element('div','Ask ChatGPT to use evidence_export for the full private bundle.','empty'));+ return;+ }if(!items.length){rows.append(element('div',view==='teams'?'No teams yet. Ask ChatGPT to create one.':view==='runs'?'No runs for this team yet.':run?'No tasks recorded for this run.':'Select a run to see tasks.','empty'));return;}for(const item of items){const clickable=view!=='tasks';const row=element(clickable?'button':'div','',clickable?'row row-button':'row');@@ -68,12 +77,12 @@const copy=element('div','', 'row-copy');copy.append(element('strong',view==='teams'?item.name:view==='runs'?item.objective:item.title),element('small',view==='teams'?'AI team':view==='runs'?'Coordination run':'Task'));const state=element('span',item.status??'unknown','state');state.dataset.state=item.status??'';row.append(element('span',item.status==='complete'?'✓':view==='teams'?'◈':'•','glyph'),copy,state);- if(view==='teams')row.addEventListener('click',()=>{selectedTeamId=item.id;view='runs';render();});+ if(view==='teams')row.addEventListener('click',()=>{selectedTeamId=item.id;selectedRunId=null;workspace.run=null;workspace.evidence=null;view='runs';render();});if(view==='runs')row.addEventListener('click',()=>loadRun(item.id));rows.append(row);}}- function update(result){const data=result?.structuredContent??result;if(!Array.isArray(data?.teams)||!Array.isArray(data?.runs))return;workspace={teams:data.teams,runs:data.runs,run:data.run??null,tasks:Array.isArray(data.tasks)?data.tasks:[]};if(data.run){if(!selectedRunId)view='tasks';selectedRunId=data.run.id;}render();}+ function update(result){const data=result?.structuredContent??result;if(!Array.isArray(data?.teams)||!Array.isArray(data?.runs))return;workspace={teams:data.teams,runs:data.runs,run:data.run??null,tasks:Array.isArray(data.tasks)?data.tasks:[],evidence:data.evidence??null};if(data.run){if(!selectedRunId)view='tasks';selectedRunId=data.run.id;}render();}let id=0;const pending=new Map();window.addEventListener('message',event=>{if(event.source!==window.parent||event.data?.jsonrpc!=='2.0')return;@@ -82,7 +91,7 @@if(msg.method==='ui/notifications/tool-result')update(msg.params);});const request=(method,params)=>new Promise((resolve,reject)=>{const next=++id;pending.set(next,{resolve,reject});window.parent.postMessage({jsonrpc:'2.0',id:next,method,params},'*')});- const bridgeReady=request('ui/initialize',{appInfo:{name:'ruflo-ai-team-board',version:'1.0.3'},appCapabilities:{},protocolVersion:'2026-01-26'})+ const bridgeReady=request('ui/initialize',{appInfo:{name:'ruflo-ai-team-board',version:'1.0.4'},appCapabilities:{},protocolVersion:'2026-01-26'}).then(()=>window.parent.postMessage({jsonrpc:'2.0',method:'ui/notifications/initialized',params:{}},'*')).catch(()=>{byId('rows').textContent='The ChatGPT view could not initialize. Team tools remain available in chat.'});async function refresh(runId=selectedRunId){@@ -91,11 +100,12 @@catch{byId('rows').textContent='Could not refresh this workspace. Ask ChatGPT to check the connection.';}finally{button.disabled=false;}}- async function loadRun(runId){selectedRunId=runId;workspace.run=null;workspace.tasks=[];view='tasks';render();await refresh(runId);}+ async function loadRun(runId,nextView='tasks'){selectedRunId=runId;workspace.run=null;workspace.tasks=[];workspace.evidence=null;view=nextView;render();await refresh(runId);}document.querySelector('.rail').addEventListener('click',event=>{const button=event.target.closest('[data-view]');if(!button)return;view=button.dataset.view;- if(view==='tasks'&&!workspace.run&&workspace.runs.length){loadRun(workspace.runs[0].id);return;}+ if(view==='teams')selectedTeamId=null;+ if(['tasks','evidence'].includes(view)&&!workspace.run&&workspace.runs.length){loadRun(workspace.runs[0].id,view);return;}render();});byId('refresh').addEventListener('click',()=>refresh());