Workspace overview
Your teams
Live coordination records from your account
diff --git a/plugins/ruflo-ai-team/.claude-plugin/plugin.json b/plugins/ruflo-ai-team/.claude-plugin/plugin.json index f0de17f1b7..7d686aa969 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.2", + "version": "0.1.3", "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.md index 3e5af469ad..19d0499317 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 renders a compact ruOS-style desktop workspace in ChatGPT, with team/run metrics and task status. Its public HTML resource contains no tenant data; the tool requires `team:read`. The rail is visual context, not clickable navigation. `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, 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. 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.md index 04a8baf0de..bbb2e9c413 100644 --- a/plugins/ruflo-ai-team/RELEASE_NOTES.md +++ b/plugins/ruflo-ai-team/RELEASE_NOTES.md @@ -1,3 +1,9 @@ +# 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. +- Added tenant-scoped run summaries to the board response. Other MCP tools remain data-only and do not create separate UI surfaces. +- Versioned the UI resource as `ui://ruflo-ai-team/board-v3.html` so a refreshed ChatGPT installation fetches the new component. + # 0.1.2 — Desktop-style team workspace - Reworked the ChatGPT board into a compact ruOS-inspired desktop with window chrome, workspace rail, status indicators, run metrics, task rows, and responsive narrow-width layout. diff --git a/plugins/ruflo-ai-team/deploy/cloud-run.yaml b/plugins/ruflo-ai-team/deploy/cloud-run.yaml index 8d08b69c8d..ce65d2631d 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: 60 serviceAccountName: ruflo-ai-team@PROJECT_ID.iam.gserviceaccount.com containers: - - image: REGION-docker.pkg.dev/PROJECT_ID/ruflo/ruflo-ai-team:0.1.2 + - image: REGION-docker.pkg.dev/PROJECT_ID/ruflo/ruflo-ai-team:0.1.3 ports: [{ 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.json index 7ea9cdc2e4..28e5829f04 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.2", + "version": "0.1.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@ruflo/ai-team-service", - "version": "0.1.2", + "version": "0.1.3", "license": "MIT", "dependencies": { "@google-cloud/firestore": "^9.2.0", diff --git a/plugins/ruflo-ai-team/package.json b/plugins/ruflo-ai-team/package.json index 6e79f17ea0..117ad85d8d 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.2", + "version": "0.1.3", "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.mjs index aab93a9248..ae48e30bf3 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-v2.html'; +const TEAM_BOARD_URI = 'ui://ruflo-ai-team/board-v3.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,16 +58,17 @@ export async function createAiTeamService({ store, vectorMemory, verifyToken, po mcp.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: 'Renders a private, read-only ChatGPT board of your teams, or one run and its tasks. Requires team:read. Use after data tools when a visual summary helps. No actions are executed.', + 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.', inputSchema: { runId: z.string().optional() }, annotations: READ('Show AI team board'), _meta: { ui: { resourceUri: TEAM_BOARD_URI }, 'openai/outputTemplate': TEAM_BOARD_URI }, }, scoped(SCOPES.read, async ({ runId }) => { const teams = await store.listTeams(auth.tenantId); + const runs = await store.listRuns(auth.tenantId); const 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 })), 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 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 })) }; 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/src/store.mjs b/plugins/ruflo-ai-team/src/store.mjs index 02e1fc3d5b..616817555f 100644 --- a/plugins/ruflo-ai-team/src/store.mjs +++ b/plugins/ruflo-ai-team/src/store.mjs @@ -27,6 +27,7 @@ export class InMemoryStore { bucket.runs.set(id, value); this.#audit(bucket, actor, 'run.created', id); return clone(value); } async getRun(tenantId, id) { const value = this.#bucket(tenantId).runs.get(id); return value ? clone(value) : null; } + async listRuns(tenantId) { return [...this.#bucket(tenantId).runs.values()].map(clone); } async updateRun(tenantId, id, patch, actor = '-') { const bucket = this.#bucket(tenantId); const current = bucket.runs.get(id); if (!current) return null; const value = { ...current, ...patch, id, updatedAt: now() }; bucket.runs.set(id, value); this.#audit(bucket, actor, `run.${value.status}`, id); return clone(value); @@ -82,6 +83,7 @@ export class FirestoreStore { async updateTeam(t,id,p,a='-') { const c=await this.#get(t,'teams',id); if(!c)return null; const v={...c,...p,id,updatedAt:now()}; await this.#put(t,'teams',v); await this.#audit(t,a,'team.updated',id); return v; } async createRun(t,i,a='-') { if(!await this.#get(t,'teams',i.teamId))return null; const v={id:`run_${randomUUID()}`,teamId:i.teamId,objective:i.objective,budgetUnits:i.budgetUnits,spentUnits:0,status:'planned',createdAt:now(),updatedAt:now()}; await this.#put(t,'runs',v); await this.#audit(t,a,'run.created',v.id); return v; } async getRun(t,id) { return this.#get(t,'runs',id); } + async listRuns(t) { return this.#list(t,'runs',100); } async updateRun(t,id,p,a='-') { const c=await this.#get(t,'runs',id); if(!c)return null; const v={...c,...p,id,updatedAt:now()}; await this.#put(t,'runs',v); await this.#audit(t,a,`run.${v.status}`,id); return v; } async createTask(t,i,a='-') { const run=await this.#get(t,'runs',i.runId); if(!run||run.status==='complete')return null; const v={id:`task_${randomUUID()}`,runId:i.runId,title:i.title,description:i.description,assigneeRole:i.assigneeRole,status:'open',result:null,createdAt:now(),updatedAt:now()}; await this.#put(t,'tasks',v); await this.#audit(t,a,'task.created',v.id); return v; } async listTasks(t,runId) { const snap=await this.#tenant(t).collection('tasks').where('runId','==',runId).limit(200).get(); return snap.docs.map(d=>d.data()); } diff --git a/plugins/ruflo-ai-team/test/service.node.mjs b/plugins/ruflo-ai-team/test/service.node.mjs index 652a372e48..b1a31eb6fc 100644 --- a/plugins/ruflo-ai-team/test/service.node.mjs +++ b/plugins/ruflo-ai-team/test/service.node.mjs @@ -75,15 +75,17 @@ test('scope checks return HTTP 403 rather than model-level permission errors', a test('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-v2.html'; + const uri='ui://ruflo-ai-team/board-v3.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']); const resource=await rpc(f.base,{jsonrpc:'2.0',id:2,method:'resources/read',params:{uri}}); assert.equal(resource.status,200); assert.equal(resource.body.result.contents[0].mimeType,'text/html;profile=mcp-app'); assert.doesNotMatch(resource.body.result.contents[0].text,/Bearer |tenant_id|api.key/i); assert.equal((await call(f.base,'team_board',{},null)).status,401); - assert.deepEqual((await call(f.base,'team_board',{},'alpha:all')).body.result.structuredContent.teams,[]); + const board=(await call(f.base,'team_board',{},'alpha:all')).body.result.structuredContent; + assert.deepEqual(board.teams,[]); assert.deepEqual(board.runs,[]); }); test('run completion requires all tasks complete and preserves tenant isolation', async (t) => { @@ -97,6 +99,8 @@ test('run completion requires all tasks complete and preserves tenant isolation' assert.equal(value(await call(f.base,'run_complete',{runId:run.id},'beta:all')).error,'not_found'); assert.equal(value(await call(f.base,'run_complete',{runId:run.id},'alpha:all')).status,'complete'); assert.equal(value(await call(f.base,'run_complete',{runId:run.id},'alpha:all')).status,'complete'); + assert.equal((await call(f.base,'team_board',{},'alpha:all')).body.result.structuredContent.runs[0].id,run.id); + 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'); diff --git a/plugins/ruflo-ai-team/ui/team-board.html b/plugins/ruflo-ai-team/ui/team-board.html index 2e6585b2a7..924be4d7d0 100644 --- a/plugins/ruflo-ai-team/ui/team-board.html +++ b/plugins/ruflo-ai-team/ui/team-board.html @@ -14,15 +14,15 @@ .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;color:var(--muted);font-size:10px;text-align:center}.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.active .rail-icon{border-color:var(--aqua);box-shadow:0 0 16px #26e9d52a;background:#173337} + .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} .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)} + .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} .content{padding:14px}.eyebrow{margin:0 0 3px;color:var(--aqua);font:10px ui-monospace,monospace;letter-spacing:.14em;text-transform:uppercase}.heading{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:12px}.heading h1{margin:0;font-size:19px;line-height:1.15}.heading p{margin:5px 0 0;color:var(--muted);font-size:11px;overflow-wrap:anywhere} .status{flex:none;display:inline-flex;align-items:center;gap:6px;padding:4px 8px;border:1px solid #3d6b70;border-radius:20px;color:#9bf5e5;font:10px ui-monospace,monospace;text-transform:uppercase}.status[hidden]{display:none}.status::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--aqua)}.status[data-state="complete"]{color:#abf0ca;border-color:#386753}.status[data-state="complete"]::before{background:#4de59a}.status[data-state="blocked"]{color:#ffd17b;border-color:#786038}.status[data-state="blocked"]::before{background:#ffd17b} .metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0 0 15px}.metric{min-width:0;padding:10px;border:1px solid #24434a;border-radius:10px;background:linear-gradient(150deg,#122b30,#101e25)}.metric small{display:block;color:var(--muted);font-size:10px}.metric strong{display:block;margin-top:3px;font:700 18px ui-monospace,monospace;white-space:nowrap}.metric:nth-child(2) strong{color:var(--aqua)} .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;padding:9px 10px;border:1px solid #25444a;border-radius:9px;background:#11242a}.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} + .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}} @@ -31,8 +31,8 @@
Workspace overview
Live coordination records from your account