Where agent teams gather. Cross-platform team chat where AI agents are first-class teammates — with cloud or bring-your-own (Claude Code / Codex) brains.
TypeScript
feat(desktop): local engine detect, dark toasts, and optional chat bubbles (#76)
Kelvin816180d3751f
diff --git a/electron/main.cjs b/electron/main.cjsindex 8d76769..db91307 100644--- a/electron/main.cjs+++ b/electron/main.cjs@@ -2,6 +2,8 @@const { app, BrowserWindow, Tray, Menu, nativeImage, shell, nativeTheme, screen, ipcMain, globalShortcut, protocol, net } = require('electron')const path = require('node:path')const fs = require('node:fs')+const os = require('node:os')+const { spawn } = require('node:child_process')const http = require('node:http')const crypto = require('node:crypto')const { pathToFileURL } = require('node:url')@@ -1389,6 +1391,103 @@ ipcMain.handle('app:is-focused', () => {return !!(mainWindow && !mainWindow.isDestroyed() && mainWindow.isFocused())})+// Keep in sync with src/lib/engines.ts. Official daemon detectEngines() only+// probes engines with adapters (claude/cursor/codex/grok/opencode/pi). The rest+// are listed so the Me page can show what is installed on THIS machine; they+// cannot be assigned to people.+const LOCAL_CLIS = [+ { id: 'claude', bin: 'claude' },+ { id: 'cursor', bin: 'cursor-agent' },+ { id: 'codex', bin: 'codex' },+ { id: 'grok', bin: 'grok' },+ { id: 'opencode', bin: 'opencode' },+ { id: 'pi', bin: 'pi' },+ { id: 'gemini', bin: 'gemini' },+ { id: 'qwen', bin: 'qwen' },+ { id: 'hermes', bin: 'hermes' },+]++function detectSearchPath() {+ const home = os.homedir()+ const extra = [+ path.join(home, '.local', 'bin'),+ path.join(home, 'bin'),+ '/opt/homebrew/bin',+ '/usr/local/bin',+ path.join(home, '.npm-global', 'bin'),+ path.join(home, '.volta', 'bin'),+ path.join(home, '.asdf', 'shims'),+ ]+ const parts = (process.env.PATH ?? '').split(path.delimiter).filter(Boolean)+ for (const dir of extra) {+ if (!parts.includes(dir)) parts.unshift(dir)+ }+ return parts.join(path.delimiter)+}++function spawnText(cmd, args, envPath) {+ return new Promise((resolve) => {+ const child = spawn(cmd, args, {+ stdio: ['ignore', 'pipe', 'ignore'],+ env: { ...process.env, PATH: envPath ?? process.env.PATH },+ })+ let out = ''+ child.stdout?.on('data', (buf) => { out += buf.toString('utf8') })+ child.on('error', () => resolve(''))+ child.on('close', () => resolve(out.trim()))+ })+}++async function resolveCliPath(bin, envPath) {+ const whichCmd = process.platform === 'win32' ? 'where' : 'which'+ const fromWhich = (await spawnText(whichCmd, [bin], envPath)).split(/\r?\n/)[0]?.trim()+ if (fromWhich) return fromWhich+ const home = os.homedir()+ const names = process.platform === 'win32' ? [bin, `${bin}.cmd`, `${bin}.exe`] : [bin]+ const dirs = [+ path.join(home, '.local', 'bin'),+ path.join(home, 'bin'),+ '/opt/homebrew/bin',+ '/usr/local/bin',+ ]+ for (const dir of dirs) {+ for (const name of names) {+ const candidate = path.join(dir, name)+ try {+ await fs.promises.access(candidate)+ return candidate+ } catch { /* next */ }+ }+ }+ return null+}++async function detectLocalHostNames() {+ const names = new Set()+ try {+ const host = os.hostname()+ if (host) names.add(host)+ } catch { /* ignore */ }+ if (process.platform === 'darwin') {+ for (const key of ['ComputerName', 'LocalHostName']) {+ const name = await spawnText('scutil', ['--get', key])+ if (name) names.add(name)+ }+ }+ return [...names]+}++ipcMain.handle('detect:local-clis', async () => {+ const envPath = detectSearchPath()+ const hostNames = await detectLocalHostNames()+ const clis = []+ for (const { id, bin } of LOCAL_CLIS) {+ const resolved = await resolveCliPath(bin, envPath)+ if (resolved) clis.push({ id, bin, path: resolved })+ }+ return { hostNames, clis }+})+ipcMain.on('theme:set', (_event, source) => {if (source !== 'system' && source !== 'light' && source !== 'dark') returnnativeTheme.themeSource = sourcediff --git a/electron/preload.cjs b/electron/preload.cjsindex 67e5d7c..e5658cc 100644--- a/electron/preload.cjs+++ b/electron/preload.cjs@@ -102,6 +102,16 @@ contextBridge.exposeInMainWorld('cumora', {set: (source) => ipcRenderer.send('theme:set', source),},+ /**+ * Local CLI scan on THIS machine (main process `which` + common bin+ * dirs). The renderer must not probe PATH itself — notebook App vs+ * VPS daemon would mix. Official pairing only reports the five+ * runnable engines; this surface also lists Pi / Gemini / etc.+ */+ detect: {+ localClis: () => ipcRenderer.invoke('detect:local-clis'),+ },+/*** Auto-update bridge. Mirrors alma's pattern:* - getAppInfo() — current version + autoupdate capability flagdiff --git a/server/src/__tests__/agent-computer-pairing-token.test.ts b/server/src/__tests__/agent-computer-pairing-token.test.tsindex adada04..f842cab 100644--- a/server/src/__tests__/agent-computer-pairing-token.test.ts+++ b/server/src/__tests__/agent-computer-pairing-token.test.ts@@ -3,10 +3,11 @@** Run: node --import tsx --test server/src/__tests__/agent-computer-pairing-token.test.ts*/-import { afterEach, test } from 'node:test'+import { after, afterEach, test } from 'node:test'import assert from 'node:assert/strict'process.env.CUMORA_RUNTIME_CLIENT = 'http'+process.env.OPENAI_API_KEY ??= 'test-key'const registry = await import('../agents/computer/registry.js')const { pool } = await import('../db/pool.js')@@ -31,6 +32,15 @@ afterEach(() => {;(pool as unknown as { query: typeof originalQuery }).query = originalQuery})+after(async () => {+ try { await pool.end() } catch { /* ignore */ }+ try {+ const { redis, sub } = await import('../redis.js')+ redis.disconnect()+ sub.disconnect()+ } catch { /* ignore */ }+})+test('company add token is persistent and reattaches an existing host by name', async () => {let companyTokenSelected = falseconst calls = installPoolMock(({ sql }) => {diff --git a/server/src/__tests__/agents-computer-engine-detect.test.ts b/server/src/__tests__/agents-computer-engine-detect.test.tsnew file mode 100644index 0000000..a57336c--- /dev/null+++ b/server/src/__tests__/agents-computer-engine-detect.test.ts@@ -0,0 +1,142 @@+/**+ * Cached engine detection + inherit/default for BYOA computers.+ *+ * Run: node --import tsx --test server/src/__tests__/agents-computer-engine-detect.test.ts+ */+import { after, afterEach, test } from 'node:test'+import assert from 'node:assert/strict'++process.env.CUMORA_RUNTIME_CLIENT = 'http'+process.env.CUMORA_DEFAULT_CLAUDE_MODEL = 'claude-opus-4-7'+process.env.OPENAI_API_KEY ??= 'test-key'++const registry = await import('../agents/computer/registry.js')+const { pool } = await import('../db/pool.js')++const originalQuery = pool.query.bind(pool)++type QueryCall = { sql: string; params: unknown[] }++function installPoolMock(handler: (call: QueryCall) => { rows?: unknown[]; rowCount?: number }) {+ const calls: QueryCall[] = []+ ;(pool as unknown as { query: (sql: string, params?: unknown[]) => Promise<{ rows: unknown[]; rowCount: number }> }).query =+ async (sql: string, params: unknown[] = []) => {+ const call = { sql, params }+ calls.push(call)+ const out = handler(call)+ return { rows: out.rows ?? [], rowCount: out.rowCount ?? (out.rows?.length ?? 0) }+ }+ return calls+}++afterEach(() => {+ ;(pool as unknown as { query: typeof originalQuery }).query = originalQuery+})++after(async () => {+ try { await pool.end() } catch { /* ignore */ }+ try {+ const { redis, sub } = await import('../redis.js')+ redis.disconnect()+ sub.disconnect()+ } catch { /* ignore */ }+})++test('sanitizeDetectedEngines drops unknown ids and fills missing bins', () => {+ const out = registry.sanitizeDetectedEngines(+ [{ id: 'claude', bin: 'claude', path: '/usr/bin/claude' }, { id: 'bogus', bin: 'x', path: null }],+ ['claude', 'codex', 'bogus'],+ )+ assert.deepEqual(out, [+ { id: 'claude', bin: 'claude', path: '/usr/bin/claude' },+ { id: 'codex', bin: 'codex', path: null },+ ])+})++test('listAgentsForComputer keeps an explicit model and pins CUMORA_DEFAULT_* when empty', async () => {+ installPoolMock(({ sql }) => {+ if (/FROM participants/.test(sql)) {+ return { rows: [+ { id: 'bram', name: 'Bram', role: 'engineer', systemPrompt: null, engine: 'claude', model: 'stale-pin', fastModel: 'haiku' },+ { id: 'saga', name: 'Saga', role: 'writer', systemPrompt: null, engine: 'claude', model: null, fastModel: null },+ ] }+ }+ return { rows: [] }+ })+ const agents = await registry.listAgentsForComputer('comp-1')+ assert.equal(agents[0]?.model, 'stale-pin')+ assert.equal(agents[0]?.fastModel, 'haiku')+ assert.equal(agents[1]?.model, 'claude-opus-4-7')+ assert.equal(agents[1]?.engine, 'claude')+})++test('reportDetectedEngines keeps the previous default first when it is still installed', async () => {+ const calls = installPoolMock(({ sql }) => {+ if (/SELECT available_engines/.test(sql)) {+ return { rows: [{ available_engines: ['codex', 'claude'], company_id: 'co-1' }] }+ }+ if (/UPDATE computers/.test(sql)) return { rowCount: 1 }+ return { rows: [] }+ })+ const ok = await registry.reportDetectedEngines({+ computerId: 'comp-1',+ engines: ['claude', 'codex', 'opencode'],+ detected: [+ { id: 'claude', bin: 'claude', path: '/bin/claude' },+ { id: 'codex', bin: 'codex', path: '/bin/codex' },+ { id: 'opencode', bin: 'opencode', path: null },+ ],+ })+ assert.equal(ok, true)+ const update = calls.find((c) => /SET available_engines/.test(c.sql))+ assert.equal(update?.params[1], JSON.stringify(['codex', 'claude', 'opencode']))+})++test('setComputerDefaultEngine reorders engines and only moves inheriting agents', async () => {+ const calls = installPoolMock(({ sql }) => {+ if (/SELECT available_engines/.test(sql)) {+ return { rows: [{ available_engines: ['claude', 'codex'], detected_engines: [] }] }+ }+ if (/UPDATE computers/.test(sql)) return { rowCount: 1 }+ if (/UPDATE participants SET engine/.test(sql)) return { rowCount: 3 }+ return { rows: [] }+ })+ const out = await setDefault()+ assert.deepEqual(out, { engine: 'codex', updated: 3 })+ const moved = calls.find((c) => /UPDATE participants SET engine/.test(c.sql))+ assert.equal(moved?.params[0], 'codex')+ assert.match(moved?.sql ?? '', /engine_inherit = TRUE/)++ async function setDefault() {+ return registry.setComputerDefaultEngine({ computerId: 'comp-1', companyId: 'co-1', engine: 'codex' })+ }+})++test('heartbeatComputer is quiet when the computer is already online', async () => {+ installPoolMock(({ sql }) => {+ if (/AND status = 'online'/.test(sql)) {+ return { rows: [{}], rowCount: 1 }+ }+ return { rows: [] }+ })+ await registry.heartbeatComputer('comp-1', '0.5.0', true)+})++test('assignAgentToComputer pins when an engine is named and inherits when it is not', async () => {+ installPoolMock(({ sql }) => {+ if (/SELECT kind, available_engines/.test(sql)) {+ return { rows: [{ kind: 'local', available_engines: ['claude', 'codex'] }] }+ }+ if (/UPDATE participants SET computer_id/.test(sql)) return { rowCount: 1 }+ return { rows: [] }+ })+ const pinned = await registry.assignAgentToComputer({+ agentId: 'bram', companyId: 'co-1', computerId: 'comp-1', engine: 'codex', inherit: false,+ })+ assert.deepEqual(pinned, { kind: 'local', engine: 'codex', inherit: false })++ const inherited = await registry.assignAgentToComputer({+ agentId: 'bram', companyId: 'co-1', computerId: 'comp-1', inherit: true,+ })+ assert.deepEqual(inherited, { kind: 'local', engine: 'claude', inherit: true })+})diff --git a/server/src/agents/computer/daemon.ts b/server/src/agents/computer/daemon.tsindex c83d436..dcb6ca1 100644--- a/server/src/agents/computer/daemon.ts+++ b/server/src/agents/computer/daemon.ts@@ -27,7 +27,7 @@ import { promisify } from 'node:util'const execFileP = promisify(execFile)import { parseSseStream, wakeStreamWasStable } from '../runtime/sse-parse.js'-import { detectEngines, detectEnginesWithStatus, getAdapter, ENGINE_IDS, runEngineDoctor, type EngineId, type EngineSession, type EngineRunResult, type EngineUsage, type EngineHopReport } from './engine.js'+import { detectEnginesWithStatus, snapshotDetectedEngines, getAdapter, ENGINE_IDS, runEngineDoctor, type EngineId, type EngineSession, type EngineRunResult, type EngineUsage, type EngineHopReport } from './engine.js'import { usageFromClaude, type TokenUsage } from '../cost.js'import { parseTriage, finalizeTriage, isRateLimited } from '../triage-core.js'import { GLANCE_YIELD_RULES } from '../glance-protocol.js'@@ -693,9 +693,12 @@ function helpText(): string {}async function requireLocalEngine(): Promise<EngineId[]> {- const engines = await detectEngines()- if (engines.length === 0) throw new Error(missingEngineMessage())- return engines+ const detected = await detectEnginesWithStatus()+ if (!detected.reliable) {+ throw new Error('could not scan PATH (`which` / `where` failed). Fix that, then retry pairing.')+ }+ if (detected.engines.length === 0) throw new Error(missingEngineMessage())+ return detected.engines}/** Resolve the engine a daemon can actually run from its LIVE PATH inventory. */@@ -862,9 +865,13 @@ async function doPair(code: string, serverUrl: string, preferredEngine?: string)}engines = [preferredEngine as EngineId, ...detected.filter((e) => e !== preferredEngine)]}+ const snapshot = await snapshotDetectedEngines(engines)const paired = await api<{ computerId: string; deviceToken: string }>(serverUrl, '/api/computers/pair',- { method: 'POST', body: JSON.stringify({ code, hostName: await detectHostName(), engines, version: CURRENT_VERSION, supervised: SUPERVISED }) },+ { method: 'POST', body: JSON.stringify({+ code, hostName: await detectHostName(), engines, detected: snapshot,+ version: CURRENT_VERSION, supervised: SUPERVISED,+ }) },)await saveConfig({ serverUrl, computerId: paired.computerId, deviceToken: paired.deviceToken })console.log(`[computer] paired as ${paired.computerId} (default engine: ${engines[0] ?? 'none'}; available: ${engines.join(', ') || 'none'}) — starting…`)@@ -973,19 +980,10 @@ const ENGINE_MODEL_LOCAL = 'local'/** The model the LOCAL engine should run this agent's turns on.*- * Cumora pins a model per agent (participants.model, else the deploy-level- * CUMORA_DEFAULT_* default) so a CLI upgrade can't silently change behaviour.- * That pin is an Anthropic/OpenAI model id — which is simply wrong for a BYOA- * operator whose `claude` points at a custom provider (CC Switch and friends):- * the provider has never heard of e.g. `claude-opus-4-7`, so EVERY turn dies- * with "There's an issue with the selected model". The pin is resolved- * server-side, so on hosted Cumora the operator cannot change it, and their- * only escape was CUMORA_CLAUDE_ARGS — which also disables the persistent- * session and makes them hand-write the entire flag set.- *- * CUMORA_ENGINE_MODEL overrides the pin daemon-side. The value `local` passes- * NO model at all, so the CLI runs on whatever it is already configured for —- * the same escape CUMORA_TRIAGE_MODEL already gives the small brain.+ * BYOA wakes omit `--model` by default so the machine's CLI uses its own+ * config (Claude `settings.json`, Codex `config.toml`, …). The daemon+ * discovery list leaves `agent.model` unset; `CUMORA_ENGINE_MODEL=local`+ * is the same no-pin path. A concrete `CUMORA_ENGINE_MODEL` still overrides.** Exported for tests. */export function resolveEngineModel(@@ -2515,7 +2513,20 @@ async function doRun(serverOverride?: string): Promise<void> {const next = detected.enginesconst previous = engineInventory.currentconst changed = replaceEngineInventory(engineInventory, next)- if (changed) console.log(`[computer] engines on PATH changed: ${previous.join(', ') || 'none'} → ${next.join(', ') || 'none'}`)+ if (changed) {+ console.log(`[computer] engines on PATH changed: ${previous.join(', ') || 'none'} → ${next.join(', ') || 'none'}`)+ // Heartbeat already advertises the live inventory. This snapshot is+ // only the PATH display the app reads — pairable engines, never the+ // detect-only bins Electron lists on the Me page.+ const snapshot = await snapshotDetectedEngines(next)+ await api(cfg.serverUrl, '/api/computers/me/engines', {+ method: 'POST',+ headers: { Authorization: `Bearer ${cfg.deviceToken}` },+ body: JSON.stringify({ engines: next, detected: snapshot }),+ }).catch((err) => {+ console.warn('[computer] engine snapshot report failed', err instanceof Error ? err.message : err)+ })+ }// This is the same live inventory sync() uses to choose an agent's// adapter. Updating only a heartbeat cache would advertise a newly// installed engine while silently running that agent on the old default.diff --git a/server/src/agents/computer/engine.ts b/server/src/agents/computer/engine.tsindex bcd5f91..3e8bf6d 100644--- a/server/src/agents/computer/engine.ts+++ b/server/src/agents/computer/engine.ts@@ -3326,6 +3326,28 @@ export async function detectEngines(): Promise<EngineId[]> {return (await detectEnginesWithStatus()).engines}+/** One detected engine as stored on the computer row and shown in the app.+ * Paths are resolved on the daemon machine (Windows `where` / POSIX `which`);+ * the renderer never probes PATH. */+export interface DetectedEngineSnapshot {+ id: EngineId+ bin: string+ path: string | null+}++/** Snapshot the installed engines, optionally in a caller-supplied order+ * (pairing puts the chosen default first). Does not spawn the CLIs. */+export async function snapshotDetectedEngines(ids?: EngineId[]): Promise<DetectedEngineSnapshot[]> {+ const present = ids ?? await detectEngines()+ return Promise.all(present.map(async (id) => {+ const bin = ADAPTERS[id].bin+ const path = id === 'grok'+ ? (resolveGrokBin() ?? await resolveBinPath(bin))+ : await resolveBinPath(bin)+ return { id, bin, path }+ }))+}+/** Resolve a bin's absolute path on PATH (the first hit), or null if absent. */export async function resolveBinPath(bin: string): Promise<string | null> {return new Promise((resolve) => {diff --git a/server/src/agents/computer/registry.ts b/server/src/agents/computer/registry.tsindex da76535..b525e4e 100644--- a/server/src/agents/computer/registry.ts+++ b/server/src/agents/computer/registry.ts@@ -78,6 +78,40 @@ export function mergeDetectedEngines(current: string[], detected: string[]): strreturn same ? null : next}+const ENGINE_BINS: Record<string, string> = {+ claude: 'claude',+ codex: 'codex',+ grok: 'grok',+ cursor: 'cursor-agent',+ opencode: 'opencode',+ pi: 'pi',+}++/** Cached PATH snapshot from the daemon. The app reads this; it never probes. */+export interface DetectedEngine {+ id: string+ bin: string+ path: string | null+}++export function sanitizeDetectedEngines(raw: unknown, engineIds: string[]): DetectedEngine[] {+ const allowed = engineIds.filter((id) => PAIRABLE_ENGINES.has(id))+ if (!Array.isArray(raw)) {+ return allowed.map((id) => ({ id, bin: ENGINE_BINS[id] ?? id, path: null }))+ }+ const byId = new Map<string, DetectedEngine>()+ for (const item of raw) {+ if (!item || typeof item !== 'object') continue+ const rec = item as Record<string, unknown>+ const id = typeof rec.id === 'string' ? rec.id : ''+ if (!PAIRABLE_ENGINES.has(id) || !allowed.includes(id)) continue+ const bin = typeof rec.bin === 'string' && rec.bin.trim() ? rec.bin.trim() : (ENGINE_BINS[id] ?? id)+ const path = typeof rec.path === 'string' && rec.path.trim() ? rec.path.trim() : null+ byId.set(id, { id, bin, path })+ }+ return allowed.map((id) => byId.get(id) ?? { id, bin: ENGINE_BINS[id] ?? id, path: null })+}+export interface ComputerRow {id: stringcompany_id: string@@ -96,6 +130,9 @@ export interface ComputerRow {* FALSE = a manually-run foreground command, NULL = cloud / an old daemon* that doesn't report it. Drives run-mode-specific update instructions. */daemon_supervised: boolean | null+ detected_engines: DetectedEngine[]+ engines_detected_at: string | null+ detect_requested_at: string | null}/** A computer plus the computed upgrade signal the app uses to show the banner. */@@ -221,6 +258,8 @@ export async function pairComputer(args: {code: stringhostName?: stringengines?: string[]+ /** Optional PATH snapshot from the daemon (bin + resolved path). */+ detected?: unknown/** The daemon's running version, stored so the app can flag outdated daemons. */version?: string/** Whether the daemon runs supervised (service) vs. as a foreground command. */@@ -232,6 +271,8 @@ export async function pairComputer(args: {deferBroadcast?: boolean}): Promise<{ computerId: string; companyId: string; deviceToken: string } | null> {const engines = (args.engines ?? []).filter((e) => PAIRABLE_ENGINES.has(e))+ const detected = sanitizeDetectedEngines(args.detected, engines)+ const detectedJson = JSON.stringify(detected)const version = typeof args.version === 'string' && args.version ? args.version.slice(0, 32) : nullconst supervised = typeof args.supervised === 'boolean' ? args.supervised : nullconst deviceToken = randomBytes(32).toString('base64url')@@ -252,9 +293,10 @@ export async function pairComputer(args: {name = COALESCE(NULLIF($3, ''), name),daemon_version = COALESCE($5, daemon_version),daemon_supervised = COALESCE($6, daemon_supervised),+ detected_engines = $7::jsonb, engines_detected_at = NOW(), detect_requested_at = NULL,status = 'online', last_seen_at = NOW(), paired_at = NOW()WHERE id = $4`,- [hashToken(deviceToken), JSON.stringify(engines), reportedName, id, version, supervised],+ [hashToken(deviceToken), JSON.stringify(engines), reportedName, id, version, supervised, detectedJson],)if (!args.deferBroadcast) await broadcastComputerStatus(id, companyId, 'online')return { computerId: id, companyId, deviceToken }@@ -284,9 +326,10 @@ export async function pairComputer(args: {SET credential_hash = $1, available_engines = $2::jsonb,daemon_version = COALESCE($4, daemon_version),daemon_supervised = COALESCE($5, daemon_supervised),+ detected_engines = $6::jsonb, engines_detected_at = NOW(), detect_requested_at = NULL,status = 'online', last_seen_at = NOW(), paired_at = NOW(), revoked_at = NULLWHERE id = $3`,- [hashToken(deviceToken), JSON.stringify(engines), id, version, supervised],+ [hashToken(deviceToken), JSON.stringify(engines), id, version, supervised, detectedJson],)if (!args.deferBroadcast) await broadcastComputerStatus(id, companyId, 'online')return { computerId: id, companyId, deviceToken }@@ -295,9 +338,9 @@ export async function pairComputer(args: {const computerId = `comp-${randomUUID().slice(0, 12)}`await pool.query(`INSERT INTO computers- (id, company_id, owner_user_id, name, kind, available_engines, status, credential_hash, paired_at, last_seen_at, daemon_version, daemon_supervised)- VALUES ($1, $2, $3, $4, 'local', $5::jsonb, 'online', $6, NOW(), NOW(), $7, $8)`,- [computerId, companyId, ownerUserId, name, JSON.stringify(engines), hashToken(deviceToken), version, supervised],+ (id, company_id, owner_user_id, name, kind, available_engines, status, credential_hash, paired_at, last_seen_at, daemon_version, daemon_supervised, detected_engines, engines_detected_at)+ VALUES ($1, $2, $3, $4, 'local', $5::jsonb, 'online', $6, NOW(), NOW(), $7, $8, $9::jsonb, NOW())`,+ [computerId, companyId, ownerUserId, name, JSON.stringify(engines), hashToken(deviceToken), version, supervised, detectedJson],)if (!args.deferBroadcast) await broadcastComputerStatus(computerId, companyId, 'online')return { computerId, companyId, deviceToken }@@ -452,7 +495,9 @@ export async function listAgentsForComputer(computerId: string): Promise<export async function listComputers(companyId: string): Promise<ComputerWithUpgrade[]> {const { rows } = await pool.query<ComputerRow>(`SELECT id, company_id, owner_user_id, name, kind, available_engines, status,- last_seen_at, paired_at, revoked_at, created_at, daemon_version, daemon_supervised+ last_seen_at, paired_at, revoked_at, created_at, daemon_version, daemon_supervised,+ COALESCE(detected_engines, '[]'::jsonb) AS detected_engines,+ engines_detected_at, detect_requested_atFROM computersWHERE company_id = $1 AND revoked_at IS NULLORDER BY (kind = 'cloud') DESC, created_at ASC`,@@ -510,7 +555,9 @@ export async function assignAgentToComputer(args: {companyId: stringcomputerId: stringengine?: string-}): Promise<{ kind: ComputerKind; engine: EngineId } | null> {+ /** When true (or when no engine is named), follow the computer default. */+ inherit?: boolean+}): Promise<{ kind: ComputerKind; engine: EngineId; inherit: boolean } | null> {const { rows } = await pool.query<{ kind: ComputerKind; available_engines: string[] }>(`SELECT kind, available_engines FROM computersWHERE id = $1 AND company_id = $2 AND revoked_at IS NULL LIMIT 1`,@@ -520,23 +567,113 @@ export async function assignAgentToComputer(args: {if (!computer) return nulllet engine: EngineId+ let inherit = falseif (computer.kind === 'cloud') {engine = 'managed'+ inherit = false} else {const advertised = computer.available_engines ?? []+ const wantInherit = args.inherit === true || !args.engineconst requested = args.engine && PAIRABLE_ENGINES.has(args.engine) ? (args.engine as EngineId) : null- const pick = (requested && advertised.includes(requested) ? requested : advertised[0]) as EngineId | undefined+ const pick = (+ wantInherit+ ? advertised[0]+ : (requested && advertised.includes(requested) ? requested : advertised[0])+ ) as EngineId | undefinedif (!pick) return null // a paired computer with no usable engineengine = pick+ inherit = wantInherit}const { rowCount } = await pool.query(- `UPDATE participants SET computer_id = $1, engine = $2- WHERE id = $3 AND company_id = $4 AND kind = 'agent'`,- [args.computerId, engine, args.agentId, args.companyId],+ `UPDATE participants SET computer_id = $1, engine = $2, engine_inherit = $3+ WHERE id = $4 AND company_id = $5 AND kind = 'agent'`,+ [args.computerId, engine, inherit, args.agentId, args.companyId],)if (!rowCount) return null- return { kind: computer.kind, engine }+ return { kind: computer.kind, engine, inherit }+}++/** Ask the online daemon to re-probe PATH on its next heartbeat. */+export async function requestEngineDetect(args: {+ computerId: string+ companyId: string+}): Promise<boolean> {+ const { rowCount } = await pool.query(+ `UPDATE computers SET detect_requested_at = NOW()+ WHERE id = $1 AND company_id = $2 AND kind <> 'cloud' AND revoked_at IS NULL`,+ [args.computerId, args.companyId],+ )+ return Boolean(rowCount)+}++/** Daemon reports a fresh PATH snapshot. Keeps the current default first when+ * that engine is still installed. */+export async function reportDetectedEngines(args: {+ computerId: string+ engines?: string[]+ detected?: unknown+}): Promise<boolean> {+ const { rows } = await pool.query<{ available_engines: string[]; company_id: string }>(+ `SELECT available_engines, company_id FROM computers+ WHERE id = $1 AND kind <> 'cloud' AND revoked_at IS NULL LIMIT 1`,+ [args.computerId],+ )+ const row = rows[0]+ if (!row) return false+ const incoming = (args.engines ?? []).filter((e) => PAIRABLE_ENGINES.has(e))+ const prevDefault = (row.available_engines ?? []).find((e) => PAIRABLE_ENGINES.has(e))+ const ordered = prevDefault && incoming.includes(prevDefault)+ ? [prevDefault, ...incoming.filter((e) => e !== prevDefault)]+ : incoming+ const detected = sanitizeDetectedEngines(args.detected, ordered)+ await pool.query(+ `UPDATE computers+ SET available_engines = $2::jsonb,+ detected_engines = $3::jsonb,+ engines_detected_at = NOW(),+ detect_requested_at = NULL+ WHERE id = $1`,+ [args.computerId, JSON.stringify(ordered), JSON.stringify(detected)],+ )+ await broadcastComputerStatus(args.computerId, row.company_id, 'online')+ return true+}++/** Make `engine` this computer's default and move every inheriting agent onto it. */+export async function setComputerDefaultEngine(args: {+ computerId: string+ companyId: string+ engine: string+}): Promise<{ engine: EngineId; updated: number } | null> {+ if (!PAIRABLE_ENGINES.has(args.engine)) return null+ const { rows } = await pool.query<{ available_engines: string[]; detected_engines: DetectedEngine[] }>(+ `SELECT available_engines, COALESCE(detected_engines, '[]'::jsonb) AS detected_engines+ FROM computers+ WHERE id = $1 AND company_id = $2 AND kind <> 'cloud' AND revoked_at IS NULL LIMIT 1`,+ [args.computerId, args.companyId],+ )+ const computer = rows[0]+ if (!computer) return null+ const advertised = computer.available_engines ?? []+ if (!advertised.includes(args.engine)) return null+ const engine = args.engine as EngineId+ const ordered = [engine, ...advertised.filter((e) => e !== engine)]+ const detected = sanitizeDetectedEngines(computer.detected_engines, ordered)+ await pool.query(+ `UPDATE computers+ SET available_engines = $2::jsonb, detected_engines = $3::jsonb+ WHERE id = $1`,+ [args.computerId, JSON.stringify(ordered), JSON.stringify(detected)],+ )+ const moved = await pool.query(+ `UPDATE participants SET engine = $1+ WHERE computer_id = $2 AND company_id = $3 AND kind = 'agent'+ AND departed_at IS NULL AND engine_inherit = TRUE`,+ [engine, args.computerId, args.companyId],+ )+ await broadcastComputerStatus(args.computerId, args.companyId, 'online')+ return { engine, updated: moved.rowCount ?? 0 }}/** Revoke a paired computer: the device token + every derived agent JWT stopdiff --git a/server/src/api/router.ts b/server/src/api/router.tsindex 0f069ec..cf9ede6 100644--- a/server/src/api/router.ts+++ b/server/src/api/router.ts@@ -31,7 +31,8 @@ import {ensureCloudComputer, issuePairingCode, pairComputer, announceComputerOnline,resolveDevice, mintAgentRuntimeToken, listAgentsForComputer,listComputers, revokeComputer, assignAgentToComputer, heartbeatComputer,- cloudComputerId, issueRepairCode,+ cloudComputerId, issueRepairCode, requestEngineDetect, reportDetectedEngines,+ setComputerDefaultEngine,} from '../agents/computer/registry.js'import { companyTier } from '../tier.js'import { createShippingRouter } from './shipping-router.js'@@ -1071,7 +1072,10 @@ api.post('/agents/:id/computer', safe(async (req, res) => {throw new HttpError(403, 'Free tier agents run on your own computer. Upgrade to Pro to use Cumora Cloud.')}const engine = typeof req.body?.engine === 'string' ? req.body.engine : undefined- const out = await assignAgentToComputer({ agentId: String(req.params.id), companyId, computerId, engine })+ const inherit = req.body?.inherit === true+ const out = await assignAgentToComputer({+ agentId: String(req.params.id), companyId, computerId, engine, inherit: inherit || !engine,+ })if (!out) throw new HttpError(400, 'invalid computer, agent, or engine for this company')res.json({ ok: true, ...out })}))@@ -1085,6 +1089,7 @@ api.post('/computers/pair', safe(async (req, res) => {const engines = Array.isArray(req.body?.engines)? (req.body.engines as unknown[]).filter((e): e is string => typeof e === 'string'): []+ const detected = req.body?.detectedconst hostName = typeof req.body?.hostName === 'string' ? req.body.hostName : undefinedconst version = typeof req.body?.version === 'string' ? req.body.version : undefinedconst supervised = typeof req.body?.supervised === 'boolean' ? req.body.supervised : undefined@@ -1092,7 +1097,7 @@ api.post('/computers/pair', safe(async (req, res) => {// its onboarding gate on that event and immediately reloads its roster, so the// starter team + "Everyone" group must already exist when it fires — otherwise// the user lands on an empty Conversations list that fills in a beat later.- const paired = await pairComputer({ code, hostName, engines, version, supervised, deferBroadcast: true })+ const paired = await pairComputer({ code, hostName, engines, detected, version, supervised, deferBroadcast: true })if (!paired) throw new HttpError(400, 'invalid pairing token')// Free-tier BYOA onboarding on pair. The daemon sends the engines list with// the user's CHOSEN engine first (`cumora agent computer --pair … --engine X`),@@ -1136,6 +1141,31 @@ api.post('/computers/pair', safe(async (req, res) => {res.json(paired)}))+api.post('/computers/:id/detect', safe(async (req, res) => {+ const { companyId } = await requireCompanyRole(req)+ const ok = await requestEngineDetect({ computerId: String(req.params.id), companyId })+ if (!ok) throw new HttpError(404, 'computer not found')+ res.json({ ok: true })+}))++api.post('/computers/:id/default-engine', safe(async (req, res) => {+ const { companyId } = await requireCompanyRole(req)+ const engine = typeof req.body?.engine === 'string' ? req.body.engine : ''+ const out = await setComputerDefaultEngine({ computerId: String(req.params.id), companyId, engine })+ if (!out) throw new HttpError(400, 'engine is not installed on this computer')+ res.json({ ok: true, ...out })+}))++api.post('/computers/me/engines', safe(async (req, res) => {+ const { computerId } = await requireDevice(req)+ const engines = Array.isArray(req.body?.engines)+ ? (req.body.engines as unknown[]).filter((e): e is string => typeof e === 'string')+ : []+ const ok = await reportDetectedEngines({ computerId, engines, detected: req.body?.detected })+ if (!ok) throw new HttpError(404, 'computer not found')+ res.json({ ok: true })+}))+// Agents assigned to the calling computer (daemon discovery on boot).api.get('/computers/me/agents', safe(async (req, res) => {const { computerId } = await requireDevice(req)@@ -1811,12 +1841,14 @@ api.get('/participants', async (req, res) => {email: string | null; companySlug: string | nulldepartedAt: string | nullcomputerId: string | null; engine: string | null; fastModel: string | null+ engineInherit: boolean | null}>(`SELECT p.id, p.kind, p.name, p.role, p.initial,p.avatar_bg AS "avatarBg", p.avatar_url AS "avatarUrl",p.status, p.status_updated_at AS "statusUpdatedAt",p.bio, p.tools, p.system_prompt AS "systemPrompt", p.model,p.computer_id AS "computerId", p.engine, p.fast_model AS "fastModel",+ p.engine_inherit AS "engineInherit",-- Email resolution differs by kind:-- - agents carry their own minted address on participants.email-- - humans don't have one there; surface their real auth emaildiff --git a/server/src/db/migrate.ts b/server/src/db/migrate.tsindex 43e59e9..a20f6aa 100644--- a/server/src/db/migrate.ts+++ b/server/src/db/migrate.ts@@ -1514,6 +1514,16 @@ CREATE UNIQUE INDEX IF NOT EXISTS companies_pair_token_idx ON companies(pair_tokALTER TABLE computers ADD COLUMN IF NOT EXISTS pair_token TEXT;CREATE UNIQUE INDEX IF NOT EXISTS computers_pair_token_idx ON computers(pair_token) WHERE pair_token IS NOT NULL;+-- Cached local-engine detection for the Agents tab / character editor.+-- available_engines[0] remains the computer default; detected_engines holds+-- bin + resolved path from the last pair/refresh. detect_requested_at is a+-- one-shot flag the online daemon consumes on its next heartbeat.+ALTER TABLE computers ADD COLUMN IF NOT EXISTS detected_engines JSONB NOT NULL DEFAULT '[]'::jsonb;+ALTER TABLE computers ADD COLUMN IF NOT EXISTS engines_detected_at TIMESTAMP WITH TIME ZONE;+ALTER TABLE computers ADD COLUMN IF NOT EXISTS detect_requested_at TIMESTAMP WITH TIME ZONE;+-- true = follow computers.available_engines[0]; false = pin participants.engine.+ALTER TABLE participants ADD COLUMN IF NOT EXISTS engine_inherit BOOLEAN NOT NULL DEFAULT TRUE;+-- ============== Evidence-backed feature shipping =======================-- A shipping feature is deliberately distinct from a generic board card.-- Cards answer "what are we doing?"; a feature contract answers "what mustdiff --git a/src/api/client.ts b/src/api/client.tsindex 8f4f2e7..0baf035 100644--- a/src/api/client.ts+++ b/src/api/client.ts@@ -224,6 +224,7 @@ export interface ApiParticipant {departedAt?: string | nullcomputerId?: string | nullengine?: string | null+ engineInherit?: boolean | nullfastModel?: string | null}@@ -235,6 +236,8 @@ export interface ApiComputer {name: stringkind: ComputerKindavailable_engines: EngineId[]+ detected_engines?: Array<{ id: EngineId; bin: string; path: string | null }>+ engines_detected_at?: string | nullstatus: ComputerStatuslast_seen_at: string | nullpaired_at: string | null@@ -919,10 +922,10 @@ export const api = {http<{ code: string; expiresInSeconds: number | null }>(`/computers/${encodeURIComponent(id)}/repair`, { method: 'POST', body: '{}' }),/** Move an agent to a computer, choosing its engine (Cumora Cloud = managed). */- assignAgentComputer: (agentId: string, computerId: string, engine?: EngineId) =>- http<{ ok: boolean; kind: ComputerKind; engine: EngineId }>(+ assignAgentComputer: (agentId: string, computerId: string, engine?: EngineId, inherit?: boolean) =>+ http<{ ok: boolean; kind: ComputerKind; engine: EngineId; inherit?: boolean }>(`/agents/${encodeURIComponent(agentId)}/computer`,- { method: 'POST', body: JSON.stringify({ computerId, engine }) }),+ { method: 'POST', body: JSON.stringify({ computerId, engine, inherit }) }),createAgent: (input: AgentInput) =>http<{ id: string }>('/agents', { method: 'POST', body: JSON.stringify(input) }),updateAgent: (id: string, input: AgentInput) =>diff --git a/src/components/AgentEditor.tsx b/src/components/AgentEditor.tsxindex 7f310ab..12a69af 100644--- a/src/components/AgentEditor.tsx+++ b/src/components/AgentEditor.tsx@@ -1,4 +1,4 @@-import { useEffect, useState } from 'react'+import { useEffect, useRef, useState } from 'react'import { api, getPairingServerOrigin, type AgentInput } from '@/api/client'import { isNativePlatform } from '@/lib/native'import { useParticipants } from '@/stores/participants'@@ -10,6 +10,22 @@ import { TextArea } from '@/components/TextArea'import { Select } from '@/components/Select'import type { Participant, EngineId } from '@/types'import { useT } from '@/lib/i18n'+import { engineLabel } from '@/lib/engines'++const INHERIT_ENGINE = '__inherit__'++/** Which engine-dropdown value to show for a saved agent.+ * Official production has no `engineInherit`: a stored engine that isn't+ * the computer default means the user pinned it. */+function initialEngineChoice(agent: Participant | null, computer: { kind: string; availableEngines: EngineId[] } | undefined): string {+ if (!agent || !computer || computer.kind === 'cloud') return INHERIT_ENGINE+ const advertised = computer.availableEngines+ const engine = agent.engine+ if (!engine || engine === 'managed' || !advertised.includes(engine)) return INHERIT_ENGINE+ if (agent.engineInherit === true) return INHERIT_ENGINE+ if (agent.engineInherit === false) return engine+ return engine === advertised[0] ? INHERIT_ENGINE : engine+}const PALETTE = ['#FFB088', '#FFD9D2', '#FFB7AF', '#F4B740',@@ -54,9 +70,17 @@ export function AgentEditor({ agent, onClose }: Props) {const firstByoa = computers.find((c) => c.kind !== 'cloud')// Default for a NEW agent: paid → Cumora Cloud; free → first paired computer.const [computerId, setComputerId] = useState(agent?.computerId ?? (isFreeTier ? firstByoa?.id : cloud?.id) ?? '')- const [engine, setEngine] = useState<EngineId>((agent?.engine as EngineId) ?? 'managed')+ const [engineChoice, setEngineChoice] = useState(+ initialEngineChoice(agent, agent?.computerId ? computersById[agent.computerId] : undefined),+ )+ const engineTouched = useRef(false)const selectedComputer = computerId ? computersById[computerId] : undefinedconst isByoa = !!selectedComputer && selectedComputer.kind !== 'cloud'+ const selectedEngineId: EngineId = (+ engineChoice !== INHERIT_ENGINE+ ? engineChoice+ : (selectedComputer?.availableEngines[0] ?? 'claude')+ ) as EngineIdconst selectedComputerOffline = isByoa && selectedComputer.status !== 'online'const origin = getPairingServerOrigin()const repairCommand = repairCode@@ -64,6 +88,12 @@ export function AgentEditor({ agent, onClose }: Props) {: ''useEffect(() => { void useComputers.getState().refresh() }, [])+ useEffect(() => {+ if (!agent || engineTouched.current) return+ const host = agent.computerId ? computersById[agent.computerId] : undefined+ if (!host) return+ setEngineChoice(initialEngineChoice(agent, host))+ }, [agent, computersById])useEffect(() => {setRepairCopied(false)setRepairErr(null)@@ -87,17 +117,14 @@ export function AgentEditor({ agent, onClose }: Props) {// free → the first paired computer (never cloud).useEffect(() => {if (computerId) return- if (isFreeTier && firstByoa) { setComputerId(firstByoa.id); setEngine((firstByoa.availableEngines[0] as EngineId) ?? 'claude') }- else if (!isFreeTier && cloud) { setComputerId(cloud.id); setEngine('managed') }+ if (isFreeTier && firstByoa) { setComputerId(firstByoa.id); setEngineChoice(INHERIT_ENGINE) }+ else if (!isFreeTier && cloud) { setComputerId(cloud.id); setEngineChoice(INHERIT_ENGINE) }}, [cloud, firstByoa, computerId, isFreeTier])const changeComputer = (id: string): void => {+ engineTouched.current = truesetComputerId(id)- const c = computersById[id]- if (!c || c.kind === 'cloud') setEngine('managed')- else setEngine((agent?.engine as EngineId) && c.availableEngines.includes(agent!.engine as EngineId)- ? (agent!.engine as EngineId)- : (c.availableEngines[0] ?? 'claude'))+ setEngineChoice(INHERIT_ENGINE)}// Esc to close@@ -111,7 +138,15 @@ export function AgentEditor({ agent, onClose }: Props) {setErr(null)setBusy(true)try {- const payload: AgentInput = { name, role, systemPrompt, bio, avatarBg, model: model.trim() || null, fastModel: fastModel.trim() || null }+ const target = computerId || cloud?.id+ const current = agent?.computerId ?? cloud?.id+ const targetComputer = target ? computersById[target] : undefined+ const isByoaTarget = !!targetComputer && targetComputer.kind !== 'cloud'+ const payload: AgentInput = {+ name, role, systemPrompt, bio, avatarBg,+ model: model.trim() || null,+ fastModel: fastModel.trim() || null,+ }let agentId = agent?.idif (editing) {// Only send avatarUrl on change so we don't clobber it on no-op edits.@@ -127,13 +162,16 @@ export function AgentEditor({ agent, onClose }: Props) {// (Engine lives in the same assign call; gating only on the computer// would silently drop a Claude→Codex switch on the same machine.) Still// skipped on a plain style edit to avoid the owner/admin-gated call.- const target = computerId || cloud?.id- const current = agent?.computerId ?? cloud?.id- const targetComputer = target ? computersById[target] : undefined- const isByoaTarget = !!targetComputer && targetComputer.kind !== 'cloud'- const engineChanged = isByoaTarget && engine !== ((agent?.engine as EngineId) ?? null)- if (agentId && target && (target !== current || engineChanged)) {- await api.assignAgentComputer(agentId, target, isByoaTarget ? engine : undefined)+ const inherit = engineChoice === INHERIT_ENGINE+ const pinned = inherit ? undefined : (engineChoice as EngineId)+ const savedChoice = initialEngineChoice(agent, targetComputer)+ const inheritChanged = isByoaTarget && inherit !== (savedChoice === INHERIT_ENGINE)+ const engineChanged = isByoaTarget && !inherit && pinned !== ((agent?.engine as EngineId) ?? null)+ if (agentId && target && (target !== current || inheritChanged || engineChanged)) {+ const out = await api.assignAgentComputer(agentId, target, isByoaTarget ? pinned : undefined, isByoaTarget ? inherit : false)+ if (isByoaTarget && pinned && out.engine !== pinned) {+ throw new Error(t('agent.enginePinRejected', { engine: engineLabel(pinned) }))+ }}await useParticipants.getState().load()await useConversations.getState().reload()@@ -241,7 +279,7 @@ export function AgentEditor({ agent, onClose }: Props) {<Fieldlabel={isByoa ? t('agent.modelLabelByoa') : t('agent.modelLabel')}hint={isByoa- ? `${t('agent.modelHintByoaPrefix')} ${engine === 'codex' ? t('agent.modelHintByoaCodex') : engine === 'grok' ? t('agent.modelHintByoaGrok') : engine === 'cursor' ? t('agent.modelHintByoaCursor') : engine === 'opencode' ? t('agent.modelHintByoaOpenCode') : engine === 'pi' ? t('agent.modelHintByoaPi') : t('agent.modelHintByoaClaude')} ${t('agent.modelHintByoaSuffix')}`+ ? `${t('agent.modelHintByoaPrefix')} ${selectedEngineId === 'codex' ? t('agent.modelHintByoaCodex') : selectedEngineId === 'grok' ? t('agent.modelHintByoaGrok') : selectedEngineId === 'cursor' ? t('agent.modelHintByoaCursor') : selectedEngineId === 'opencode' ? t('agent.modelHintByoaOpenCode') : selectedEngineId === 'pi' ? t('agent.modelHintByoaPi') : t('agent.modelHintByoaClaude')} ${t('agent.modelHintByoaSuffix')}`: t('agent.modelHintCloud')}><Input@@ -257,15 +295,15 @@ export function AgentEditor({ agent, onClose }: Props) {{isByoa && (<Fieldlabel={t('agent.fastLabelByoa')}- hint={engine === 'codex'+ hint={selectedEngineId === 'codex'? t('agent.fastHintByoaCodex')- : engine === 'grok'+ : selectedEngineId === 'grok'? t('agent.fastHintByoaGrok')- : engine === 'cursor'+ : selectedEngineId === 'cursor'? t('agent.fastHintByoaCursor')- : engine === 'opencode'+ : selectedEngineId === 'opencode'? t('agent.fastHintByoaOpenCode')- : engine === 'pi'+ : selectedEngineId === 'pi'? t('agent.fastHintByoaPi'): t('agent.fastHintByoaClaude')}>@@ -310,13 +348,20 @@ export function AgentEditor({ agent, onClose }: Props) {<div className="mt-2"><SelectariaLabel={t('agent.engineLabel')}- value={engine}- onValueChange={(v) => setEngine(v as EngineId)}- options={(selectedComputer.availableEngines.length- ? selectedComputer.availableEngines- : (['claude'] as EngineId[])- ).map((en) => ({ value: en, label: en === 'claude' ? t('agent.engineClaude') : en === 'codex' ? t('agent.engineCodex') : en === 'grok' ? t('agent.engineGrok') : en === 'cursor' ? t('agent.engineCursor') : en === 'opencode' ? t('agent.engineOpenCode') : en }))}+ value={engineChoice}+ onValueChange={(value) => { engineTouched.current = true; setEngineChoice(value) }}+ options={(() => {+ const advertised = selectedComputer.availableEngines.length+ ? selectedComputer.availableEngines+ : (['claude'] as EngineId[])+ const defaultId = advertised[0]+ return [+ { value: INHERIT_ENGINE, label: t('agent.engineInherit', { engine: engineLabel(defaultId) }) },+ ...advertised.map((en) => ({ value: en, label: engineLabel(en) })),+ ]+ })()}/>+ <div className="mt-1.5 text-[11.5px] text-ink-400">{t('agent.engineHint')}</div></div>)}{selectedComputerOffline && (diff --git a/src/components/AppearancePicker.tsx b/src/components/AppearancePicker.tsxindex 2977564..2cba41e 100644--- a/src/components/AppearancePicker.tsx+++ b/src/components/AppearancePicker.tsx@@ -1,5 +1,6 @@/**- * Appearance picker — system / light / dark.+ * Appearance picker — system / light / dark — plus chat layout+ * (official thread vs left/right bubbles).** Shared by desktop Preferences and the mobile You screen so the two* shells can't drift apart on which choices exist or how they're worded.@@ -9,6 +10,7 @@import { Select } from '@/components/Select'import { useT, type MessageKey } from '@/lib/i18n'import { useAppearanceStore, type Appearance } from '@/lib/theme'+import { useChatLayoutStore, type ChatLayout } from '@/lib/chatLayout'const OPTIONS: Array<{ value: Appearance; label: MessageKey }> = [{ value: 'system', label: 'common.appearance.system' },@@ -31,3 +33,24 @@ export function AppearancePicker({ className }: { className?: string }) {/>)}++const LAYOUT_OPTIONS: Array<{ value: ChatLayout; label: MessageKey }> = [+ { value: 'thread', label: 'common.chatLayout.thread' },+ { value: 'bubble', label: 'common.chatLayout.bubble' },+]++export function ChatLayoutPicker({ className }: { className?: string }) {+ const t = useT()+ const layout = useChatLayoutStore((s) => s.layout)+ const setLayout = useChatLayoutStore((s) => s.setLayout)++ return (+ <Select<ChatLayout>+ className={className}+ value={layout}+ ariaLabel={t('common.chatLayout')}+ onValueChange={setLayout}+ options={LAYOUT_OPTIONS.map((o) => ({ value: o.value, label: t(o.label) }))}+ />+ )+}diff --git a/src/components/BoardLink.tsx b/src/components/BoardLink.tsxindex 8887e11..1187e35 100644--- a/src/components/BoardLink.tsx+++ b/src/components/BoardLink.tsx@@ -35,7 +35,7 @@ export function BoardLink({ id: rawId }: { id: string }) {if (view === 'conversations') openBoardPeek(id)else setView('boards')}}- className="inline-flex max-w-[260px] items-center gap-1.5 rounded-full border border-sky2-100 bg-sky2-50 px-2 py-0.5 text-[13px] font-semibold text-skype-deep no-underline transition hover:border-sky2-200 hover:bg-[#EAF7FD]"+ className="inline-flex max-w-[260px] items-center gap-1.5 rounded-full border border-sky2-100 bg-sky2-50 px-2 py-0.5 text-[13px] font-semibold text-skype-deep no-underline transition hover:border-sky2-200 hover:bg-sky2-100"style={{ verticalAlign: '-0.16em' }}title={`Open board ${id}`}aria-label={`Open board ${label}`}diff --git a/src/components/CalendarLink.tsx b/src/components/CalendarLink.tsxindex cf59674..085ee0d 100644--- a/src/components/CalendarLink.tsx+++ b/src/components/CalendarLink.tsx@@ -32,7 +32,7 @@ export function CalendarLink({ id: rawId }: { id: string }) {if (view === 'conversations') openCalendarEventPeek(id)else setView('calendar')}}- className="inline-flex max-w-[260px] items-center gap-1.5 rounded-full border border-sky2-100 bg-[#F5FBFF] px-2 py-0.5 text-[13px] font-semibold text-skype-deep no-underline transition hover:border-sky2-200 hover:bg-[#EAF7FD]"+ className="inline-flex max-w-[260px] items-center gap-1.5 rounded-full border border-sky2-100 bg-sky2-50 px-2 py-0.5 text-[13px] font-semibold text-skype-deep no-underline transition hover:border-sky2-200 hover:bg-sky2-100"style={{ verticalAlign: '-0.16em' }}title={`Open calendar event ${id}`}aria-label={`Open calendar event ${label}`}diff --git a/src/components/CardLink.tsx b/src/components/CardLink.tsxindex 0a54499..33a4110 100644--- a/src/components/CardLink.tsx+++ b/src/components/CardLink.tsx@@ -49,7 +49,7 @@ export function CardLink({ id: rawId }: { id: string }) {if (view !== 'conversations') setView('boards')})}}- className="inline-flex max-w-[260px] items-center gap-1.5 rounded-full border border-sky2-100 bg-sky2-50 px-2 py-0.5 text-[13px] font-semibold text-skype-deep no-underline transition hover:border-sky2-200 hover:bg-[#EAF7FD]"+ className="inline-flex max-w-[260px] items-center gap-1.5 rounded-full border border-sky2-100 bg-sky2-50 px-2 py-0.5 text-[13px] font-semibold text-skype-deep no-underline transition hover:border-sky2-200 hover:bg-sky2-100"style={{ verticalAlign: '-0.16em' }}title={`Open card ${id}`}aria-label={`Open card ${label}`}diff --git a/src/components/LinkPreview.tsx b/src/components/LinkPreview.tsxindex e3d54cf..edf9f85 100644--- a/src/components/LinkPreview.tsx+++ b/src/components/LinkPreview.tsx@@ -136,7 +136,7 @@ export function LinkPreview({ url }: { url: string }) {href={url}target="_blank"rel="noopener noreferrer"- className="flex w-full items-center px-3 transition hover:bg-[rgba(15,30,50,0.03)]"+ className="flex w-full items-center px-3 transition hover:bg-sky2-50"style={{ color: 'var(--ink-700)', textDecoration: 'none' }}><span className="truncate text-[12px]">{fallbackHost || url}</span>@@ -154,7 +154,7 @@ export function LinkPreview({ url }: { url: string }) {href={data.url}target="_blank"rel="noopener noreferrer"- className="flex w-full transition-colors hover:bg-[rgba(15,30,50,0.03)]"+ className="flex w-full transition-colors hover:bg-sky2-50"style={{ textDecoration: 'none' }}>{/* Thumbnail slot — fixed square so the layout doesn't depend ondiff --git a/src/components/MentionList.tsx b/src/components/MentionList.tsxindex d0c6caa..93cdab0 100644--- a/src/components/MentionList.tsx+++ b/src/components/MentionList.tsx@@ -59,14 +59,14 @@ export const MentionList = forwardRef<MentionListHandle, MentionListProps>(functif (items.length === 0) {return (- <div className="rounded-lg bg-white border border-stone-200 shadow-lg px-3 py-2 text-xs text-stone-400">+ <div className="rounded-lg bg-cloud border border-ink-100 shadow-lg px-3 py-2 text-xs text-ink-400">no match</div>)}return (- <div className="rounded-lg bg-white border border-stone-200 shadow-lg overflow-hidden min-w-[220px] max-h-[280px] overflow-y-auto py-1">+ <div className="rounded-lg bg-cloud border border-ink-100 shadow-lg overflow-hidden min-w-[220px] max-h-[280px] overflow-y-auto py-1">{items.map((p, i) => (<buttontype="button"@@ -83,13 +83,13 @@ export const MentionList = forwardRef<MentionListHandle, MentionListProps>(funct'w-full flex items-center gap-2.5 px-3 py-1.5 text-left text-sm transition-colors',i === selectedIndex? 'bg-skype/10 text-skype-deep'- : 'text-stone-700 hover:bg-stone-50',+ : 'text-ink-700 hover:bg-sky2-50',)}><Avatar p={p} size={24} /><div className="min-w-0 flex-1"><div className="truncate font-medium leading-tight">{p.name}</div>- <div className="truncate text-[11px] text-stone-400 leading-tight">+ <div className="truncate text-[11px] text-ink-400 leading-tight">{p.kind === 'agent' ? 'agent' : 'human'}{p.role ? ` · ${p.role}` : ''}</div></div>diff --git a/src/components/Message.tsx b/src/components/Message.tsxindex fdc34b7..743c339 100644--- a/src/components/Message.tsx+++ b/src/components/Message.tsx@@ -29,6 +29,7 @@ import { useCalendar } from '@/stores/calendar'import { PollBubble } from './PollBubble'import { LinkPreview, firstUrlInBody } from './LinkPreview'import { useT } from '@/lib/i18n'+import { useChatLayoutStore } from '@/lib/chatLayout'function MentionChip({ id }: { id: string }) {const t = useT()@@ -91,7 +92,7 @@ function MentionChip({ id }: { id: string }) {// uses the same value): `baseline`/`middle` ride high, -0.25em (the// old value) sat visibly low. Keep this in sync with RichInput.'inline-flex items-center justify-center gap-1 px-1.5 py-0.5 rounded-full font-semibold cursor-pointer transition',- isAgent ? 'text-skype-deep bg-sky-50 hover:bg-sky-100'+ isAgent ? 'text-skype-deep bg-sky2-50 hover:bg-sky2-100': 'text-coral-deep bg-coral-soft hover:brightness-95',)}style={{ verticalAlign: '-0.15em' }}@@ -327,7 +328,7 @@ function MessageRefChip({ n }: { n: number }) {onClick={onClick}onMouseEnter={enter}onMouseLeave={leave}- className="inline-flex items-center px-1.5 py-0.5 rounded-full font-semibold cursor-pointer transition text-skype-deep bg-sky-50 hover:bg-sky-100"+ className="inline-flex items-center px-1.5 py-0.5 rounded-full font-semibold cursor-pointer transition text-skype-deep bg-sky2-50 hover:bg-sky2-100"// Measured against 14px / line-height 1.55 CJK text — -0.05em centers// the chip on the CJK glyph center; -0.15em (the MentionChip value)// visibly sits low here because there's no avatar to anchor it.@@ -1700,6 +1701,7 @@ function MessageRowImpl({ msg, author, delay = 0, animate = true }: MessageRowPrconst openAgentInfo = useApp((s) => s.openAgentInfo)const openThreadView = useApp((s) => s.openThreadView)const meId = useMe()+ const split = useChatLayoutStore((s) => s.layout === 'bubble')// System / whisper rows don't need a resolved author — handle them before// touching `author` so a synthetic-author system message (the calendar-fired// notice, authored by CALENDAR_SYSTEM_AUTHOR_ID) renders instead of being@@ -1724,12 +1726,71 @@ function MessageRowImpl({ msg, author, delay = 0, animate = true }: MessageRowPrconst onAvatarClick = () => {if (!isMine) openAgentInfo(author.id)}+ const alignEnd = split && isMine++ const body = (+ <>+ <QuoteCard msg={msg} />++ {!isToolOnly && !isAttachOnly && !isPoll && (+ <div+ className={cn(+ 'inline-block py-2.5 px-3.5 text-[14px] leading-[1.55] break-words',+ split ? 'max-w-full' : 'max-w-[min(100%,580px)]',+ alignEnd+ ? 'border rounded-tl-[14px] rounded-tr-[4px] rounded-br-[14px] rounded-bl-[14px]'+ : cn(+ 'rounded-tl-[4px] rounded-tr-[14px] rounded-br-[14px] rounded-bl-[14px]',+ isMine ? 'border' : 'bg-sky2-50 border border-sky2-100 text-ink-700',+ ),+ )}+ style={isMine ? {+ background: 'linear-gradient(135deg, #FFE8E1, #FFD9D2)',+ borderColor: 'rgba(255, 122, 107, 0.25)',+ color: '#5A2B22',+ } : undefined}+ >+ <RichBody body={msg.body} conversationId={msg.conversationId} />+ </div>+ )}++ {/* Open-Graph card for the first URL in a chat-style body. Skipped+ for tool / attachment / poll / email kinds — those have their+ own card UIs and a link preview underneath would be visual+ noise. The component itself returns null when there's nothing+ useful to render, so this gate is just to avoid spurious+ network calls for non-text messages. */}+ {!isToolOnly && !isAttachOnly && !isPoll && msg.kind !== 'email' && (() => {+ const linkUrl = firstUrlInBody(msg.body)+ return linkUrl ? <LinkPreview url={linkUrl} /> : null+ })()}++ {isPoll && <PollBubble msg={msg} />}++ {msg.kind === 'tool' && <ToolCard msg={msg} />}+ {artifactRefs.length > 0 && (+ <div className="flex flex-col">+ {artifactRefs.map((ref) => (+ ref.type === 'document'+ ? <DocumentArtifactCard key={artifactKey(ref)} id={ref.id} conversationId={msg.conversationId} />+ : ref.type === 'board'+ ? <BoardArtifactCard key={artifactKey(ref)} id={ref.id} />+ : ref.type === 'card'+ ? <CardArtifactCard key={artifactKey(ref)} id={ref.id} />+ : <CalendarArtifactCard key={artifactKey(ref)} id={ref.id} />+ ))}+ </div>+ )}+ {msg.attachment && <AttachmentCard msg={msg} />}+ </>+ )return (<divid={`m-${msg.id}`}className={cn(- 'group grid grid-cols-[38px_1fr] gap-3 items-start scroll-mt-20',+ 'group gap-3 items-start scroll-mt-20',+ alignEnd ? 'flex flex-row-reverse' : 'grid grid-cols-[38px_1fr]',animate && 'animate-rise',)}style={animate ? { animationDelay: `${delay}ms` } : undefined}@@ -1737,69 +1798,31 @@ function MessageRowImpl({ msg, author, delay = 0, animate = true }: MessageRowPr<buttononClick={onAvatarClick}disabled={isMine}- className={cn('rounded-full transition', !isMine && 'hover:opacity-80 active:scale-95 cursor-pointer')}+ className={cn('rounded-full transition shrink-0', !isMine && 'hover:opacity-80 active:scale-95 cursor-pointer')}title={isMine ? undefined : t('chat.showAuthorInfo', { name: author.name })}><Avatar p={author} size={38} ringColor="var(--cloud)" /></button>- <div className="min-w-0">- <div className="flex items-baseline gap-2 mb-1">- <span className="font-bold text-[13.5px] text-ink-900">{author.name}</span>- {author.role && !isHuman && (- <span className="text-[10.5px] text-ink-300 font-semibold tracking-wider uppercase">{author.role}</span>- )}- {isHuman && !isMine && <HumanBadge />}- <span className="ml-auto text-[10.5px] text-ink-300 tabular-nums">{msg.at}</span>- </div>-- <QuoteCard msg={msg} />-- {!isToolOnly && !isAttachOnly && !isPoll && (- <div- className={cn(- 'inline-block py-2.5 px-3.5 rounded-tl-[4px] rounded-tr-[14px] rounded-br-[14px] rounded-bl-[14px] text-[14px] leading-[1.55] max-w-[min(100%,580px)] break-words',- isMine- ? 'border'- : 'bg-sky2-50 border border-sky2-100 text-ink-700'+ <div className={cn('min-w-0', alignEnd ? 'flex-1 flex flex-col items-end' : '')}>+ {(!split || !isMine) && (+ <div className="flex items-baseline gap-2 mb-1">+ <span className="font-bold text-[13.5px] text-ink-900">{author.name}</span>+ {author.role && !isHuman && (+ <span className="text-[10.5px] text-ink-300 font-semibold tracking-wider uppercase">{author.role}</span>+ )}+ {isHuman && !isMine && <HumanBadge />}+ {!split && (+ <span className="ml-auto text-[10.5px] text-ink-300 tabular-nums">{msg.at}</span>)}- style={isMine ? {- background: 'linear-gradient(135deg, #FFE8E1, #FFD9D2)',- borderColor: 'rgba(255, 122, 107, 0.25)',- color: '#5A2B22',- } : undefined}- >- <RichBody body={msg.body} conversationId={msg.conversationId} /></div>)}- {/* Open-Graph card for the first URL in a chat-style body. Skipped- for tool / attachment / poll / email kinds — those have their- own card UIs and a link preview underneath would be visual- noise. The component itself returns null when there's nothing- useful to render, so this gate is just to avoid spurious- network calls for non-text messages. */}- {!isToolOnly && !isAttachOnly && !isPoll && msg.kind !== 'email' && (() => {- const linkUrl = firstUrlInBody(msg.body)- return linkUrl ? <LinkPreview url={linkUrl} /> : null- })()}-- {isPoll && <PollBubble msg={msg} />}-- {msg.kind === 'tool' && <ToolCard msg={msg} />}- {artifactRefs.length > 0 && (- <div className="flex flex-col">- {artifactRefs.map((ref) => (- ref.type === 'document'- ? <DocumentArtifactCard key={artifactKey(ref)} id={ref.id} conversationId={msg.conversationId} />- : ref.type === 'board'- ? <BoardArtifactCard key={artifactKey(ref)} id={ref.id} />- : ref.type === 'card'- ? <CardArtifactCard key={artifactKey(ref)} id={ref.id} />- : <CalendarArtifactCard key={artifactKey(ref)} id={ref.id} />- ))}+ {split ? (+ <div className={cn('flex items-end gap-1.5 max-w-full', isMine && 'flex-row-reverse')}>+ <div className="min-w-0 max-w-[min(100%,580px)]">{body}</div>+ <span className="shrink-0 text-[10.5px] text-ink-300 tabular-nums leading-none pb-1">{msg.at}</span></div>- )}- {msg.attachment && <AttachmentCard msg={msg} />}+ ) : body}{(msg.failed || msg.unconfirmed) && (<div className="mt-1 flex items-center gap-2 text-[11px] text-coral-deep">diff --git a/src/components/NotificationToasts.tsx b/src/components/NotificationToasts.tsxindex 272eaaf..164491b 100644--- a/src/components/NotificationToasts.tsx+++ b/src/components/NotificationToasts.tsx@@ -371,17 +371,15 @@ function ToastCard({ toast, onClick, onDismiss }: { toast: Toast; onClick: () =>style={{// Browser-fallback (no Electron notification window). Floats over// the app's own UI, so backdrop-filter genuinely blurs the chat- // beneath the toast. Slightly translucent white so the frost- // reads, opaque enough that text never loses contrast.- background: 'rgba(255, 255, 255, 0.82)',+ // beneath the toast. Tokens remap under html.dark; light stays+ // the original frost white.+ background: 'var(--toast-frost-bg)',backdropFilter: 'blur(20px) saturate(180%)',WebkitBackdropFilter: 'blur(20px) saturate(180%)',borderRadius: 14,padding: '10px 12px 12px',- // Soft sky-tinted shadow + 1px hairline — matches the rest of- // Cumora's "lifted-card" treatment elsewhere in the app.- boxShadow: '0 18px 40px -14px rgba(10, 30, 60, 0.24), 0 6px 14px -8px rgba(10, 30, 60, 0.14), 0 0 0 1px rgba(255, 255, 255, 0.55) inset',- border: '1px solid rgba(10, 30, 60, 0.08)',+ boxShadow: 'var(--toast-frost-shadow)',+ border: '1px solid var(--toast-frost-border)',cursor: 'pointer',minWidth: 280,maxWidth: 340,diff --git a/src/components/NotificationWindow.tsx b/src/components/NotificationWindow.tsxindex 747daee..53be2bc 100644--- a/src/components/NotificationWindow.tsx+++ b/src/components/NotificationWindow.tsx@@ -280,22 +280,20 @@ function ToastCard({ toast, onClick, onDismiss }: { toast: Toast; onClick: () =>onMouseLeave={() => setHovered(false)}className="text-left"style={{- // Solid opaque card on a transparent BrowserWindow. Mirrors- // wails-gui (toast_window_assets/toast.html — `--panel: #ffffff`- // + `border: 1px solid rgba(33, 28, 22, 0.12)`, no box-shadow).+ // Solid opaque card on a transparent BrowserWindow. Tokens remap+ // under html.dark so this panel follows the same One Dark Pro+ // chrome as the main window (hardcoded #ffffff stayed white).//// We can't give each toast its own NSWindow inside Electron, so// when toasts stack inside ONE window their CSS drop shadows// bleed into each other and look like a single big frosted- // rectangle. wails-gui's answer is "no toast-level shadow at all"- // — separation comes from the 1px hairline border + spacing. We- // do the same; just a tiny low-spread shadow for lift, nothing- // that extends past the card more than a few pixels.- background: '#ffffff',+ // rectangle. Keep the shadow tiny; separation comes from the+ // hairline border + spacing.+ background: 'var(--toast-bg)',borderRadius: 14,padding: '14px 16px',- boxShadow: '0 2px 6px rgba(0, 0, 0, 0.08)',- border: '1px solid rgba(33, 28, 22, 0.12)',+ boxShadow: 'var(--toast-shadow)',+ border: '1px solid var(--toast-border)',cursor: 'pointer',minWidth: 280,maxWidth: 340,diff --git a/src/desktop/MeView.tsx b/src/desktop/MeView.tsxindex 316201d..9f1f650 100644--- a/src/desktop/MeView.tsx+++ b/src/desktop/MeView.tsx@@ -7,11 +7,13 @@ import { useDevtools } from '@/stores/devtools'import { useAuth } from '@/stores/auth'import { Avatar } from '@/components/Avatar'import { Checkbox } from '@/components/Checkbox'-import { AppearancePicker } from '@/components/AppearancePicker'+import { AppearancePicker, ChatLayoutPicker } from '@/components/AppearancePicker'import { LanguagePicker } from '@/components/LanguagePicker'import { useT, type MessageKey } from '@/lib/i18n'import { cn } from '@/lib/utils'import { api, getPairingServerOrigin, getServerOrigin, type ApiProject, type ApiQuotaSnapshot, type ApiQuotaWindow } from '@/api/client'+import { ENGINE_BIN, ENGINE_LABEL, RUNNABLE_ENGINE_IDS, engineLabel } from '@/lib/engines'+import type { Computer, EngineId } from '@/types'// The tab's identity is its `key`; the label is a message key resolved at// render. Before this they were the same string, which would have made@@ -723,6 +725,16 @@ function AppearanceSection() {</div><AppearancePicker className="w-[180px] shrink-0" /></div>+ <div className="bg-cloud rounded-[14px] p-4 flex items-center gap-4 mt-2"+ style={{ border: '1px solid var(--ink-100)' }}>+ <div className="flex-1 min-w-0">+ <div className="font-semibold text-[13px] text-ink-900">{t('common.chatLayout')}</div>+ <div className="font-display italic font-normal text-[11.5px] text-ink-500 mt-0.5">+ {t('common.chatLayoutSub')}+ </div>+ </div>+ <ChatLayoutPicker className="w-[180px] shrink-0" />+ </div></Section>)}@@ -756,13 +768,63 @@ function SkypeSoundSection() {)}-// Brand and engine names stay in English in every locale. The values-// below are display labels surfaced to users when we list computers —-// products keep their own casing.-const ENGINE_LABEL: Record<string, string> = { managed: 'Cumora', claude: 'Claude Code', codex: 'Codex', grok: 'Grok Build', cursor: 'Cursor', opencode: 'OpenCode', pi: 'pi' }const KIND_ICON: Record<string, string> = { cloud: '☁', local: '💻', vps: '🖥' }const STATUS_COLOR: Record<string, string> = { online: '#3BB273', busy: '#E6A23C', offline: 'var(--ink-300)' }+type AgentRow = { id: string; bin: string; path: string | null }++const CLI_ORDER = [+ 'claude', 'cursor', 'codex', 'grok', 'opencode',+ 'pi', 'gemini', 'qwen', 'hermes',+]++const COMPUTER_STATUS_KEY: Record<string, MessageKey> = {+ online: 'me.computerStatus.online',+ busy: 'me.computerStatus.busy',+ offline: 'me.computerStatus.offline',+}++function pairedRows(computer: Computer): AgentRow[] {+ if (computer.detectedEngines && computer.detectedEngines.length > 0) return computer.detectedEngines+ return (computer.availableEngines ?? []).map((id) => ({+ id, bin: ENGINE_BIN[id] ?? id, path: null as string | null,+ }))+}++function namesMatch(computerName: string, hostNames: string[]): boolean {+ const n = computerName.trim().toLowerCase().replace(/\.local$/, '')+ if (!n) return false+ return hostNames.some((h) => h.trim().toLowerCase().replace(/\.local$/, '') === n)+}++function isThisMachine(computer: Computer, hostNames: string[], localComputerCount: number): boolean {+ if (computer.kind !== 'local') return false+ if (namesMatch(computer.name, hostNames)) return true+ return localComputerCount === 1 && hostNames.length > 0+}++function mergeAgentRows(+ computer: Computer,+ localClis: Array<{ id: string; bin: string; path: string }> | null,+ thisMachine: boolean,+): AgentRow[] {+ const byId = new Map<string, AgentRow>()+ for (const row of pairedRows(computer)) byId.set(row.id, row)+ if (thisMachine && localClis) {+ for (const hit of localClis) byId.set(hit.id, hit)+ }+ return [...byId.values()].sort((a, b) => {+ const ia = CLI_ORDER.indexOf(a.id)+ const ib = CLI_ORDER.indexOf(b.id)+ return (ia === -1 ? 99 : ia) - (ib === -1 ? 99 : ib)+ })+}++function asRunnableEngine(id: string): EngineId | null {+ if (RUNNABLE_ENGINE_IDS.has(id) && id !== 'managed') return id as EngineId+ return null+}+function ComputersTab() {const t = useT()const byId = useComputers((s) => s.byId)@@ -782,12 +844,33 @@ function ComputersTab() {const [repairFor, setRepairFor] = useState<string | null>(null)const [repairCode, setRepairCode] = useState<string | null>(null)const [repairCopied, setRepairCopied] = useState(false)+ const [busyId, setBusyId] = useState<string | null>(null)+ const [localDetect, setLocalDetect] = useState<{+ hostNames: string[]+ clis: Array<{ id: string; bin: string; path: string }>+ } | null>(null)++ async function scanLocal() {+ const fn = typeof window !== 'undefined' ? window.cumora?.detect?.localClis : undefined+ if (!fn) return+ try {+ setLocalDetect(await fn())+ } catch { /* keep previous */ }+ }- useEffect(() => { void useComputers.getState().refresh() }, [])+ useEffect(() => {+ void useComputers.getState().refresh()+ void scanLocal()+ }, [])useEffect(() => { if (!repairCopied) return; const id = window.setTimeout(() => setRepairCopied(false), 1600); return () => window.clearTimeout(id) }, [repairCopied])async function toggleRepair(id: string) {if (repairFor === id) { setRepairFor(null); setRepairCode(null); return }+ await openRepair(id)+ }++ async function openRepair(id: string) {+ if (repairFor === id) returnsetRepairFor(id); setRepairCode(null)try { setRepairCode((await api.repairComputer(id)).code) }catch (e) { alert(e instanceof Error ? e.message : String(e)); setRepairFor(null) }@@ -805,6 +888,7 @@ function ComputersTab() {const pairCommand = code ? `npx cumora@latest agent computer --pair ${code}${serverFlag}${engineFlag}${asService ? ' --install-service' : ''}` : ''const list = Object.values(byId).sort((a, b) =>(a.kind === 'cloud' ? 0 : 1) - (b.kind === 'cloud' ? 0 : 1) || a.name.localeCompare(b.name))+ const localComputerCount = list.filter((c) => c.kind === 'local').lengthfunction agentCount(computerId: string, isCloud: boolean): number {return Object.values(participants).filter((p) =>@@ -834,6 +918,18 @@ function ComputersTab() {} catch (e) { alert(e instanceof Error ? e.message : String(e)) }}+ async function refreshEngines(id: string) {+ setErr(null)+ setBusyId(id)+ try {+ await Promise.all([useComputers.getState().refresh(), scanLocal()])+ } catch (e) {+ setErr(e instanceof Error ? e.message : String(e))+ } finally {+ setBusyId(null)+ }+ }+return (<div className="space-y-6"><Section title={t('me.sectionComputers')}>@@ -842,16 +938,23 @@ function ComputersTab() {{!loaded && <div className="text-[13px] text-ink-400">{t('common.loading')}</div>}+ {err && <div className="mb-3 text-[12px] text-coral-deep bg-coral-soft rounded-[8px] p-2">{err}</div>}+<div className="grid gap-3">{list.map((c) => {const n = agentCount(c.id, c.kind === 'cloud')const repairable = c.kind !== 'cloud'const expanded = repairFor === c.idconst repairCmd = repairCode ? `npx cumora@latest agent computer --pair ${repairCode}${serverFlag}` : ''+ const thisMachine = isThisMachine(c, localDetect?.hostNames ?? [], localComputerCount)+ const rows = repairable+ ? mergeAgentRows(c, thisMachine ? (localDetect?.clis ?? null) : null, thisMachine)+ : []+ const detecting = busyId === c.idreturn (<div key={c.id} className="bg-cloud rounded-[14px]" style={{ border: '1px solid var(--ink-100)' }}><div- className={cn('p-4 flex items-center gap-4 rounded-[14px]', repairable && 'cursor-pointer hover:bg-sky-50/50')}+ className={cn('p-4 flex items-center gap-4 rounded-[14px]', repairable && 'cursor-pointer hover:bg-sky2-50')}onClick={repairable ? () => void toggleRepair(c.id) : undefined}><div className="text-[22px] w-8 text-center">{KIND_ICON[c.kind] ?? '🖥'}</div><div className="flex-1 min-w-0">@@ -859,7 +962,7 @@ function ComputersTab() {<span className="font-display font-medium text-[16px] text-ink-900">{c.name}</span><span className="inline-flex items-center gap-1.5 text-[11px] text-ink-500"><span className="w-2 h-2 rounded-full" style={{ background: STATUS_COLOR[c.status] ?? 'var(--ink-300)' }} />- {c.status}+ {t(COMPUTER_STATUS_KEY[c.status] ?? 'me.computerStatus.offline')}</span>{c.daemonOutdated && (<span className="inline-flex items-center gap-1 text-[10.5px] font-semibold px-2 py-0.5 rounded-full"@@ -870,15 +973,30 @@ function ComputersTab() {)}</div><div className="text-[12px] text-ink-500 mt-0.5">- {c.availableEngines.map((e) => ENGINE_LABEL[e] ?? e).join(', ') || '—'}- {' · '}{n === 1 ? t('me.agentsCountOne', { n }) : t('me.agentsCountOther', { n })}- {repairable && c.daemonVersion && (- <>{' · '}<span className="font-mono text-[11px] text-ink-400">{t('me.daemonVersion', { version: c.daemonVersion })}</span></>- )}+ {repairable+ ? (+ <>+ {n === 1 ? t('me.agentsCountOne', { n }) : t('me.agentsCountOther', { n })}+ {rows.length > 0 && <>{' · '}{t('me.agentsDetected', { n: rows.length })}</>}+ {c.daemonVersion && (+ <>{' · '}<span className="font-mono text-[11px] text-ink-400">{t('me.daemonVersion', { version: c.daemonVersion })}</span></>+ )}+ </>+ )+ : (+ <>+ {c.availableEngines.map((e) => ENGINE_LABEL[e] ?? e).join(', ') || '—'}+ {' · '}{n === 1 ? t('me.agentsCountOne', { n }) : t('me.agentsCountOther', { n })}+ </>+ )}</div></div>{repairable && (<>+ <button type="button" disabled={detecting} onClick={(e) => { e.stopPropagation(); void refreshEngines(c.id) }}+ className="text-[12px] font-semibold text-skype-deep disabled:opacity-45 px-2 py-1">+ {detecting ? t('me.agentsRefreshing') : t('me.agentsRefresh')}+ </button><span className="text-[12px] font-semibold text-skype-deep">{expanded ? t('me.hideAction') : t('me.reconnect')}</span><button onClick={(e) => { e.stopPropagation(); void remove(c.id, c.name) }}className="text-[12px] font-semibold text-coral-deep hover:underline px-2 py-1">@@ -887,6 +1005,35 @@ function ComputersTab() {</>)}</div>+ {repairable && (+ rows.length === 0 ? (+ <div className="px-4 pb-4 text-[12px] text-ink-400">{t('me.agentsNoEngines')}</div>+ ) : (+ <div className="px-4 pb-4 space-y-2">+ {rows.map((row) => {+ const engineId = asRunnableEngine(row.id)+ const advertised = engineId != null && c.availableEngines.includes(engineId)+ const isDefault = advertised && row.id === c.availableEngines[0]+ return (+ <div key={row.id} className="flex items-center gap-3 rounded-[12px] px-3 py-2.5"+ style={{ border: '1px solid var(--ink-100)' }}>+ <div className="flex-1 min-w-0">+ <div className="text-[13px] font-semibold text-ink-900">{engineLabel(row.id)}</div>+ <div className="font-mono text-[11px] text-ink-400 truncate">+ {row.bin}{row.path ? ` · ${row.path}` : ''}+ </div>+ </div>+ {isDefault ? (+ <span className="text-[12px] font-semibold text-skype-deep">✓ {t('me.agentsIsDefault')}</span>+ ) : engineId ? null : (+ <span className="text-[11px] text-ink-400 shrink-0">{t('me.agentsNotRunnable')}</span>+ )}+ </div>+ )+ })}+ </div>+ )+ )}{expanded && (<div className="px-4 pb-4 pt-3 border-t border-ink-100"><div className="text-[12px] text-ink-500 mb-2 italic font-display">@@ -912,7 +1059,7 @@ function ComputersTab() {</div>{code ? (- <div className="mt-4 bg-sky-50 rounded-[14px] p-4" style={{ border: '1px solid var(--sky-100)' }}>+ <div className="mt-4 bg-sky2-50 rounded-[14px] p-4" style={{ border: '1px solid var(--sky-100)' }}><div className="text-[13px] font-semibold text-ink-900 mb-1">{t('me.runOnHost')}</div>@@ -964,13 +1111,10 @@ function ComputersTab() {`}</style></div>) : (- <>- {err && <div className="mt-4 text-[12px] text-coral-deep bg-coral-soft rounded-[8px] p-2">{err}</div>}- <button onClick={addComputer} disabled={busy}- className="mt-4 px-4 py-2 rounded-[10px] bg-skype text-white text-[13px] font-semibold disabled:opacity-50">- {busy ? t('me.computersGenerating') : t('me.addComputer')}- </button>- </>+ <button onClick={addComputer} disabled={busy}+ className="mt-4 px-4 py-2 rounded-[10px] bg-skype text-white text-[13px] font-semibold disabled:opacity-50">+ {busy ? t('me.computersGenerating') : t('me.addComputer')}+ </button>)}</Section></div>diff --git a/src/desktop/ObservabilityView.tsx b/src/desktop/ObservabilityView.tsxindex c3dd744..13799b5 100644--- a/src/desktop/ObservabilityView.tsx+++ b/src/desktop/ObservabilityView.tsx@@ -298,14 +298,16 @@ function RefreshButton({ loading, onClick }: { loading: boolean; onClick: () =>const t = useT()return (<button+ type="button"onClick={onClick}className={cn(- 'inline-flex h-[46px] min-w-[96px] items-center justify-center gap-2 rounded-[13px] border border-ink-100 bg-cloud px-4 text-[12.5px] font-semibold text-skype-deep transition',- 'shadow-[0_1px_0_rgba(255,255,255,0.95)_inset,0_12px_28px_-24px_rgba(26,78,120,0.58)]',+ 'inline-flex h-11 min-w-[96px] items-center justify-center gap-2 rounded-[14px] border border-ink-100 bg-cloud px-4 text-[12.5px] font-semibold text-skype-deep transition',+ 'shadow-[var(--select-shadow)]','hover:border-sky2-200 hover:bg-sky2-50/70 active:scale-[0.985]','focus:outline-none focus:ring-4 focus:ring-sky2-100',loading && 'text-skype-deep/75',)}+ style={{ backgroundImage: 'var(--select-face)' }}aria-busy={loading}><span@@ -314,7 +316,7 @@ function RefreshButton({ loading, onClick }: { loading: boolean; onClick: () =>'grid h-4 w-4 place-items-center rounded-full border transition',loading? 'animate-spin border-sky2-200 border-t-skype'- : 'border-sky2-200 bg-sky2-50 shadow-[inset_0_0_0_4px_rgba(255,255,255,0.72)]',+ : 'border-sky2-200 bg-sky2-50',)}/><span>{t('obs.refresh')}</span>diff --git a/src/lib/chatLayout.ts b/src/lib/chatLayout.tsnew file mode 100644index 0000000..dcd6450--- /dev/null+++ b/src/lib/chatLayout.ts@@ -0,0 +1,40 @@+/**+ * Chat bubble layout — per-device, like appearance and locale.+ *+ * Default is `thread` (official: every message on the left). `bubble`+ * puts your messages on the right. Not synced through server+ * preferences: two devices can disagree.+ */+import { create } from 'zustand'++export type ChatLayout = 'thread' | 'bubble'++const STORAGE_KEY = 'cumora.chatLayout'++function isChatLayout(v: string | null): v is ChatLayout {+ return v === 'thread' || v === 'bubble'+}++function readInitial(): ChatLayout {+ if (typeof window === 'undefined') return 'thread'+ try {+ const raw = window.localStorage.getItem(STORAGE_KEY)+ if (isChatLayout(raw)) return raw+ } catch {+ /* private mode */+ }+ return 'thread'+}++interface ChatLayoutState {+ layout: ChatLayout+ setLayout(next: ChatLayout): void+}++export const useChatLayoutStore = create<ChatLayoutState>((set) => ({+ layout: readInitial(),+ setLayout(next) {+ set({ layout: next })+ try { window.localStorage.setItem(STORAGE_KEY, next) } catch { /* ignore */ }+ },+}))diff --git a/src/lib/engines.ts b/src/lib/engines.tsnew file mode 100644index 0000000..95a0fca--- /dev/null+++ b/src/lib/engines.ts@@ -0,0 +1,33 @@+/** Display names for BYOA engines. Brand names stay English in every locale. */+export const ENGINE_LABEL: Record<string, string> = {+ managed: 'Cumora',+ claude: 'Claude Code',+ codex: 'Codex',+ grok: 'Grok Build',+ cursor: 'Cursor',+ opencode: 'OpenCode',+ pi: 'Pi',+ gemini: 'Gemini',+ qwen: 'Qwen Code',+ hermes: 'Hermes',+}++/** PATH binary names (Cursor's CLI is `cursor-agent`, not `cursor`). */+export const ENGINE_BIN: Record<string, string> = {+ claude: 'claude',+ codex: 'codex',+ grok: 'grok',+ cursor: 'cursor-agent',+ opencode: 'opencode',+ pi: 'pi',+ gemini: 'gemini',+ qwen: 'qwen',+ hermes: 'hermes',+}++/** Engines Cumora can actually wake. Everything else is detect-only. */+export const RUNNABLE_ENGINE_IDS = new Set(['claude', 'codex', 'grok', 'cursor', 'opencode', 'pi'])++export function engineLabel(id: string): string {+ return ENGINE_LABEL[id] ?? id+}diff --git a/src/lib/runtime.ts b/src/lib/runtime.tsindex 10634e9..3a62364 100644--- a/src/lib/runtime.ts+++ b/src/lib/runtime.ts@@ -85,6 +85,13 @@ interface CumoraBridge {theme?: {set: (source: 'system' | 'light' | 'dark') => void}+ /** Main-process PATH scan of CLIs on this machine. Electron only. */+ detect?: {+ localClis: () => Promise<{+ hostNames: string[]+ clis: Array<{ id: string; bin: string; path: string }>+ }>+ }/** Auto-update bridge — ported from alma's pattern. Surfaces* electron-updater status to the renderer so the React side can* render the upgrade UI without polling. Unavailable in browser /diff --git a/src/lib/theme.ts b/src/lib/theme.tsindex b66f60c..83c21bd 100644--- a/src/lib/theme.ts+++ b/src/lib/theme.ts@@ -111,3 +111,15 @@ export const useAppearanceStore = create<AppearanceState>((set, get) => {},}})++// The Electron notification panel is a second renderer. It boots its+// own zustand copy from localStorage, then won't hear setAppearance+// from the main window. `storage` fires in other windows only.+if (typeof window !== 'undefined') {+ window.addEventListener('storage', (e) => {+ if (e.key !== STORAGE_KEY) return+ const next = isAppearance(e.newValue) ? e.newValue : 'system'+ if (next === useAppearanceStore.getState().appearance) return+ useAppearanceStore.getState().setAppearance(next)+ })+}diff --git a/src/locales/en.ts b/src/locales/en.tsindex 7421d6f..db041ce 100644--- a/src/locales/en.ts+++ b/src/locales/en.ts@@ -23,6 +23,10 @@ export const en = {'common.appearance.system': 'System','common.appearance.light': 'Light','common.appearance.dark': 'Dark',+ 'common.chatLayout': 'Chat layout',+ 'common.chatLayoutSub': 'this device only · applies immediately',+ 'common.chatLayout.thread': 'Official',+ 'common.chatLayout.bubble': 'Left & right','common.titlebarTagline': '— where agent teams gather','common.daemonOutdatedTip': 'A computer daemon needs updating — open You','common.cancel': 'Cancel',@@ -468,6 +472,9 @@ export const en = {'agent.offlineSuffix': '(offline)','agent.upgradeToPro': '☁ Cumora Cloud — upgrade to Pro','agent.engineLabel': 'Engine',+ 'agent.engineInherit': 'Default · {engine}',+ 'agent.engineHint': 'Default follows this computer. Pick one engine to pin only this teammate.',+ 'agent.enginePinRejected': '{engine} is not advertised on this computer, so the server kept the default. Pair again, then pick it.','agent.engineClaude': 'Claude Code','agent.engineCodex': 'Codex','agent.engineGrok': 'Grok Build',@@ -1251,6 +1258,17 @@ export const en = {'me.engineLabel': 'Engine','me.computersGenerating': 'Generating…','me.engineDefaultHint': 'just the default — this computer can still run agents on any detected engine',+ 'me.agentsDetected': '{n} detected',+ 'me.agentsRefresh': 'Refresh',+ 'me.agentsRefreshing': 'Refreshing…',+ 'me.agentsIsDefault': 'Default',+ 'me.agentsOffline': 'This computer is offline. The list is still the last pairing report.',+ 'me.agentsNoEngines': 'The daemon reported no engines at pairing. Re-run the pairing command on that computer to scan PATH again.',+ 'me.agentsNotRunnable': 'Detected only — Cumora cannot run this yet',+ 'me.agentsNeedPair': 'Re-pair to use',+ 'me.computerStatus.online': 'online',+ 'me.computerStatus.busy': 'busy',+ 'me.computerStatus.offline': 'offline',// ─── updater dialog + banner ──────────────────────────────────────'updater.bannerUpdateReady': 'Update ready',diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.tsindex 1cf3a51..e17046e 100644--- a/src/locales/zh-CN.ts+++ b/src/locales/zh-CN.ts@@ -29,6 +29,10 @@ export const zhCN: Partial<Record<keyof typeof en, string>> = {'common.appearance.system': '跟随系统','common.appearance.light': '浅色','common.appearance.dark': '深色',+ 'common.chatLayout': '聊天布局',+ 'common.chatLayoutSub': '仅本设备 · 立即生效',+ 'common.chatLayout.thread': '官方',+ 'common.chatLayout.bubble': '左右气泡','common.titlebarTagline': '—— 智能体团队的汇合地','common.daemonOutdatedTip': '某台计算机的守护进程需要更新——打开「我」','common.cancel': '取消',@@ -470,6 +474,9 @@ export const zhCN: Partial<Record<keyof typeof en, string>> = {'agent.offlineSuffix': '(离线)','agent.upgradeToPro': '☁ Cumora Cloud — 升级到 Pro','agent.engineLabel': '引擎',+ 'agent.engineInherit': '默认 · {engine}',+ 'agent.engineHint': '默认跟随这台计算机。单独选一个则只对这个人物生效。',+ 'agent.enginePinRejected': '这台计算机没有把 {engine} 记进可用列表,服务器仍使用默认引擎。请重新配对后再选。','agent.engineClaude': 'Claude Code','agent.engineCodex': 'Codex','agent.engineCursor': 'Cursor',@@ -1253,6 +1260,17 @@ export const zhCN: Partial<Record<keyof typeof en, string>> = {'me.engineLabel': '引擎','me.computersGenerating': '生成中…','me.engineDefaultHint': '只是默认值 —— 这台计算机仍可在任意被检测到的引擎上跑智能体',+ 'me.agentsDetected': '{n} 已检测',+ 'me.agentsRefresh': '刷新',+ 'me.agentsRefreshing': '刷新中…',+ 'me.agentsIsDefault': '默认',+ 'me.agentsOffline': '这台计算机离线。列表仍是上次配对时的检测结果。',+ 'me.agentsNoEngines': '配对时 daemon 没有报任何引擎。要重新扫 PATH,请在那台机器上再跑一次配对命令。',+ 'me.agentsNotRunnable': '仅识别,Cumora 还不能当引擎跑',+ 'me.agentsNeedPair': '重新配对后使用',+ 'me.computerStatus.online': '在线',+ 'me.computerStatus.busy': '忙碌',+ 'me.computerStatus.offline': '离线',// ─── 自动更新对话框 + 横幅 ────────────────────────────────────────'updater.bannerUpdateReady': '更新就绪',diff --git a/src/mobile/MobileMe.tsx b/src/mobile/MobileMe.tsxindex fe0707f..3289afb 100644--- a/src/mobile/MobileMe.tsx+++ b/src/mobile/MobileMe.tsx@@ -10,7 +10,7 @@ import { usePrefs } from '@/stores/preferences'import { CompanySwitcher } from '@/components/CompanySwitcher'import { getPushStatus, initPushNotifications, teardownPushNotifications, type PushStatus } from '@/lib/push'import { api } from '@/api/client'-import { AppearancePicker } from '@/components/AppearancePicker'+import { AppearancePicker, ChatLayoutPicker } from '@/components/AppearancePicker'import { LanguagePicker } from '@/components/LanguagePicker'import { translate, useLocale, useT, type MessageKey } from '@/lib/i18n'import type { Participant } from '@/types'@@ -223,6 +223,14 @@ export function MobileMe() {</div><AppearancePicker className="w-[140px] shrink-0" /></div>+ <div className="bg-cloud rounded-[12px] p-3.5 flex items-center gap-3 mt-2"+ style={{ border: '1px solid var(--ink-100)' }}>+ <div className="flex-1 min-w-0">+ <div className="font-semibold text-[13px] text-ink-900 leading-tight">{t('common.chatLayout')}</div>+ <div className="font-display italic text-[11px] text-ink-500 mt-0.5">{t('common.chatLayoutSub')}</div>+ </div>+ <ChatLayoutPicker className="w-[140px] shrink-0" />+ </div></Section><div className="px-4 pt-2 pb-4 space-y-2">diff --git a/src/stores/computers.ts b/src/stores/computers.tsindex 0166f4b..3daa860 100644--- a/src/stores/computers.ts+++ b/src/stores/computers.ts@@ -21,6 +21,8 @@ function fromApi(c: ApiComputer): Computer {kind: c.kind,status: c.status,availableEngines: c.available_engines ?? [],+ detectedEngines: c.detected_engines ?? [],+ enginesDetectedAt: c.engines_detected_at ?? null,lastSeenAt: c.last_seen_at ?? null,pairedAt: c.paired_at ?? null,daemonVersion: c.daemon_version ?? null,diff --git a/src/stores/participants.ts b/src/stores/participants.tsindex 14ce6eb..3c0ab97 100644--- a/src/stores/participants.ts+++ b/src/stores/participants.ts@@ -71,6 +71,9 @@ function fromApi(p: ApiParticipant): Participant {departedAt: p.departedAt ?? null,computerId: p.computerId ?? null,engine: (p.engine as Participant['engine']) ?? null,+ // Official API omits this field. Don't coerce missing → true or the+ // editor always shows "Default · Claude" even when engine is Cursor.+ engineInherit: p.engineInherit == null ? undefined : p.engineInherit,}}diff --git a/src/styles/globals.css b/src/styles/globals.cssindex 6b6238e..9bf4f08 100644--- a/src/styles/globals.css+++ b/src/styles/globals.css@@ -106,6 +106,14 @@--select-shadow: 0 1px 0 rgba(255, 255, 255, 0.92) inset, 0 10px 24px -24px rgba(26, 78, 120, 0.55);--select-menu-shadow: 0 22px 55px -24px rgba(10, 30, 60, 0.38), 0 8px 18px -12px rgba(10, 30, 60, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.72) inset;--select-menu-border: rgb(var(--sky-100-rgb));+ /* Desktop-corner toast (Electron panel) + in-app frost toast. Light+ * keeps the original white card; dark remaps onto cloud / ink. */+ --toast-bg: #ffffff;+ --toast-border: rgb(33 28 22 / 0.12);+ --toast-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);+ --toast-frost-bg: rgb(255 255 255 / 0.82);+ --toast-frost-border: rgb(10 30 60 / 0.08);+ --toast-frost-shadow: 0 18px 40px -14px rgba(10, 30, 60, 0.24), 0 6px 14px -8px rgba(10, 30, 60, 0.14), 0 0 0 1px rgba(255, 255, 255, 0.55) inset;/* Chat surface atmosphere + a few chrome pieces that were frozen as* light RGBA. Dark remaps these; light stays pixel-identical. */--chat-wash: radial-gradient(ellipse 80% 40% at 0% 0%, rgba(194, 230, 251, 0.3), transparent 60%), radial-gradient(ellipse 60% 40% at 100% 100%, rgba(255, 217, 210, 0.25), transparent 60%), var(--cloud);@@ -217,6 +225,12 @@ html.dark {--select-shadow: 0 0 #0000;--select-menu-shadow: 0 22px 55px -24px rgba(0, 0, 0, 0.55), 0 8px 18px -12px rgba(0, 0, 0, 0.35);--select-menu-border: rgb(var(--ink-200-rgb));+ --toast-bg: rgb(var(--cloud-rgb));+ --toast-border: rgb(var(--ink-200-rgb));+ --toast-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);+ --toast-frost-bg: rgb(var(--cloud-rgb) / 0.88);+ --toast-frost-border: rgb(var(--ink-200-rgb) / 0.85);+ --toast-frost-shadow: 0 18px 40px -14px rgba(0, 0, 0, 0.55), 0 6px 14px -8px rgba(0, 0, 0, 0.35), 0 0 0 1px rgb(255 255 255 / 0.04) inset;--chat-wash: rgb(var(--cloud-rgb));--whispers-wash: rgb(var(--cloud-rgb));--whisper-room-wash: rgb(var(--paper-rgb));@@ -926,8 +940,8 @@ input:focus, textarea:focus, button:focus { outline: none; }color: var(--ink-500);}.reaction-quick-button:hover {- background: rgba(0, 168, 240, 0.08);- box-shadow: 0 8px 18px -16px rgba(0, 120, 200, 0.5);+ background: rgb(var(--skype-rgb) / 0.12);+ box-shadow: 0 8px 18px -16px rgb(var(--skype-deep-rgb) / 0.5);}.reaction-burst {position: absolute;diff --git a/src/types.ts b/src/types.tsindex 643550c..69605b8 100644--- a/src/types.ts+++ b/src/types.ts@@ -15,6 +15,9 @@ export interface Computer {kind: ComputerKindstatus: ComputerStatusavailableEngines: EngineId[]+ /** Last PATH snapshot from the daemon (bin + resolved path). */+ detectedEngines?: Array<{ id: EngineId; bin: string; path: string | null }>+ enginesDetectedAt?: string | nulllastSeenAt?: string | nullpairedAt?: string | null/** The cumora daemon version this computer is running (null = cloud / unknown). */@@ -52,6 +55,8 @@ export interface Participant {computerId?: string | null/** engine the agent's host runs it on ('managed' for cloud agents) */engine?: EngineId | null+ /** true = follow the computer's default engine; false = pin `engine` */+ engineInherit?: boolean/** Real external email address. Agents get one of the form* `<id>@<companySlug>.<EMAIL_DOMAIN>` (auto-minted on first use);* humans carry their auth email here for the renderer's contactdiff --git a/tailwind.config.ts b/tailwind.config.tsindex 25eb7e1..f4a296e 100644--- a/tailwind.config.ts+++ b/tailwind.config.ts@@ -15,6 +15,15 @@ const config: Config = {deep: rgb('--skype-deep-rgb'),ink: rgb('--skype-ink-rgb'),},+ // Default Tailwind `sky` is a frozen light wash (`#f0f9ff`). Bind+ // it to the same tokens as `sky2` so `bg-sky-50` / hover follow+ // `html.dark`.+ sky: {+ 50: rgb('--sky-50-rgb'),+ 100: rgb('--sky-100-rgb'),+ 200: rgb('--sky-200-rgb'),+ 300: rgb('--sky-300-rgb'),+ },sky2: {50: rgb('--sky-50-rgb'),100: rgb('--sky-100-rgb'),