Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

feat(settings): Providers section as compact rows, per-app Uses switcher, bundled provider marks (#6170)

ddupont34f12df58fc0
diff --git a/apps/cua-spaces-desktop/src/bridge/agent-keys.ts b/apps/cua-spaces-desktop/src/bridge/agent-keys.ts
index 0f51684f83..be2bcffb94 100644
--- a/apps/cua-spaces-desktop/src/bridge/agent-keys.ts
+++ b/apps/cua-spaces-desktop/src/bridge/agent-keys.ts
@@ -31,9 +31,28 @@ export function agentKeysMethods({ model }: BridgeContext): Handlers {
const env = optionalString(args, "env");
if (env) call.env = env;
Object.assign(call, choices(args));
+ // Another key beside the first one for the provider, named (it replaces nothing).
+ if (args.add === true) call.add = true;
+ const label = optionalString(args, "label");
+ if (label) call.label = label;
return model.agents.keys.call("agent_keys.set", call);
},
- "agentKeys.remove": (args) => model.agents.keys.call("agent_keys.remove", { env: string(args, "env") }),
+ "agentKeys.remove": (args) => {
+ const call: Record<string, unknown> = { env: string(args, "env") };
+ const slot = optionalString(args, "slot");
+ if (slot) call.slot = slot;
+ if (args.keep_others === true) call.keep_others = true;
+ return model.agents.keys.call("agent_keys.remove", call);
+ },
+ // Which saved credential an app that takes any provider uses from its next run (no `env`: the first that works).
+ "agentKeys.use": (args) => {
+ const call: Record<string, unknown> = { app: string(args, "app") };
+ const env = optionalString(args, "env");
+ if (env) call.env = env;
+ const slot = optionalString(args, "slot");
+ if (slot) call.slot = slot;
+ return model.agents.keys.call("agent_keys.use", call);
+ },
// Which provider keys your login shell has (names only), and one saved from it (the value never crosses the bridge).
"agentKeys.shell": () => model.agents.keys.call("agent_keys.shell"),
"agentKeys.fromShell": (args) => model.agents.keys.call("agent_keys.from_shell", { env: string(args, "env"), ...choices(args) }),
diff --git a/apps/cua-spaces-desktop/src/bridge/methods.ts b/apps/cua-spaces-desktop/src/bridge/methods.ts
index e5f3b4676d..20c7ef70ae 100644
--- a/apps/cua-spaces-desktop/src/bridge/methods.ts
+++ b/apps/cua-spaces-desktop/src/bridge/methods.ts
@@ -20,7 +20,7 @@ export const METHODS = [
"agents.status", "agents.connect", "agents.disconnect", "agents.signInStart", "agents.signInWait", "agents.start", "agents.message",
"agents.detail", "agents.readFile", "agents.restoreFile", "agents.addRoutine", "agents.setRoutine",
"agents.removeRoutine", "agents.allowComputer", "agents.revokeComputer",
- "agentKeys.list", "agentKeys.check", "agentKeys.set", "agentKeys.remove", "agentKeys.shell", "agentKeys.fromShell",
+ "agentKeys.list", "agentKeys.check", "agentKeys.set", "agentKeys.remove", "agentKeys.use", "agentKeys.shell", "agentKeys.fromShell",
"spaces.add", "clouds.status", "clouds.test", "clouds.connect", "clouds.disconnect", "clouds.approve",
"teleport.catalog", "teleport.entryForPath", "teleport.windows", "teleport.remoteWindows",
"teleport.icon", "teleport.thumbnail", "teleport.plan", "teleport.run", "teleport.sites",
diff --git a/apps/cua-spaces-desktop/src/model/agents.ts b/apps/cua-spaces-desktop/src/model/agents.ts
index d39da8e035..826cd4d681 100644
--- a/apps/cua-spaces-desktop/src/model/agents.ts
+++ b/apps/cua-spaces-desktop/src/model/agents.ts
@@ -381,7 +381,9 @@ function stringMap(v: unknown): Map<string, string> {
/** The core's input for `agent_keys.list`'s answer (never a value). */
export function agentKeysInput(report: Json | null, error: string | null): AppAgentKeysInput {
+ // Keys saved beside the first one for a variable (they have a slot) are the web page's; a native row is the first.
const keys = arr(report ?? {}, "keys")
+ .filter((k) => k.slot === undefined || k.slot === null)
.map((k) => ({
provider: typeof k.provider === "string" ? k.provider : "other",
env: typeof k.env === "string" ? k.env : "",
diff --git a/apps/cua-spaces-desktop/test/agents-fixtures.ts b/apps/cua-spaces-desktop/test/agents-fixtures.ts
index 2129a2ab9c..f8f243d9d3 100644
--- a/apps/cua-spaces-desktop/test/agents-fixtures.ts
+++ b/apps/cua-spaces-desktop/test/agents-fixtures.ts
@@ -85,6 +85,7 @@ export class FakeAgentsTools {
export class FakeAgentKeysTools {
calls: [string, Record<string, unknown>][] = [];
keys: Record<string, unknown>[] = [{ provider: "openai", env: "OPENAI_API_KEY", last4: "3f9a", added_ms: 1_790_000_000_000 }];
+ uses: Record<string, Record<string, unknown>> = {};
available = true;
run: ToolRunner = async (tool, args) => {
@@ -97,10 +98,14 @@ export class FakeAgentKeysTools {
const provider = String(args.provider ?? "");
const env = provider === "anthropic" ? "ANTHROPIC_API_KEY" : provider === "openai" ? "OPENAI_API_KEY" : String(args.env ?? "");
const value = String(args.value ?? "");
- this.keys = this.keys.filter((k) => k.env !== env);
+ // Another key beside the first one (named); saving the first again replaces only it.
+ const slot = args.add === true && this.keys.some((k) => k.env === env && !k.slot) ? `k${this.keys.length}` : undefined;
+ if (!slot) this.keys = this.keys.filter((k) => !(k.env === env && !k.slot));
this.keys.push({
provider,
env,
+ ...(slot ? { slot } : {}),
+ ...(typeof args.label === "string" ? { label: args.label } : {}),
last4: value.slice(-4),
added_ms: 1_790_000_100_000,
...(typeof args.region === "string" ? { region: args.region } : {}),
@@ -109,12 +114,18 @@ export class FakeAgentKeysTools {
break;
}
case "agent_keys.remove":
- this.keys = this.keys.filter((k) => k.env !== args.env);
+ this.keys = this.keys.filter((k) => (typeof args.slot === "string" ? !(k.env === args.env && k.slot === args.slot) : k.env !== args.env));
break;
+ case "agent_keys.use": {
+ const app = String(args.app ?? "");
+ if (typeof args.env === "string") this.uses[app] = { provider: "anthropic", env: args.env, ...(typeof args.slot === "string" ? { slot: args.slot } : {}) };
+ else delete this.uses[app];
+ break;
+ }
default:
throw new ToolError(`unknown tool ${tool}`);
}
- const report: Record<string, unknown> = { keys: this.keys, providers: [], available: this.available };
+ const report: Record<string, unknown> = { keys: this.keys, providers: [], available: this.available, ...(Object.keys(this.uses).length ? { uses: this.uses } : {}) };
if (!this.available) report.unavailable = "this build keeps credentials in a file";
return report;
};
@@ -211,7 +222,7 @@ export class FixtureAgentSetup implements AgentSetupRunning {
async deviceSignInWaitJson(id: string) {
this.calls.push(`device-wait:${id}`);
- return JSON.stringify({ imported: { source: "codex", env: "CODEX_AUTH_JSON", label: "Codex · ChatGPT sign-in", expires_ms: null, added_ms: 1 }, refused: null, line: null });
+ return JSON.stringify({ imported: { source: "codex", env: "CODEX_AUTH_JSON", label: "ChatGPT sign-in for Codex", expires_ms: null, added_ms: 1 }, refused: null, line: null });
}
/** The sign-in finishes at once (no browser in a fixture). */
@@ -238,5 +249,5 @@ export const AGENT_METHODS = [
"agents.detail", "agents.readFile", "agents.restoreFile", "agents.addRoutine", "agents.setRoutine", "agents.removeRoutine",
"agents.allowComputer", "agents.revokeComputer",
"agents.status", "agents.connect", "agents.disconnect", "agents.signInStart", "agents.signInWait",
- "agentKeys.list", "agentKeys.check", "agentKeys.set", "agentKeys.remove", "agentKeys.shell", "agentKeys.fromShell",
+ "agentKeys.list", "agentKeys.check", "agentKeys.set", "agentKeys.remove", "agentKeys.use", "agentKeys.shell", "agentKeys.fromShell",
];
diff --git a/apps/cua-spaces-desktop/test/agents.test.ts b/apps/cua-spaces-desktop/test/agents.test.ts
index dd140b7b0a..7535a99eb0 100644
--- a/apps/cua-spaces-desktop/test/agents.test.ts
+++ b/apps/cua-spaces-desktop/test/agents.test.ts
@@ -478,6 +478,31 @@ describe.skipIf(!built)("agents", () => {
expect(await code(bridge, "agentKeys.remove", {})).toBe("bad_args");
});
+ it("keeps several keys for one provider and tells an app which one to use", async () => {
+ const { bridge } = makeBridge();
+ // Another key beside the first one, named; one removed by its slot; the first removed while the others stay.
+ const added = (await call(bridge, "agentKeys.set", { provider: "openai", value: "sk-work-0000-9z9z", add: true, label: "Work key" })) as { keys: { env: string; slot?: string; label?: string }[] };
+ expect(keys.calls.at(-1)).toEqual(["agent_keys.set", { provider: "openai", value: "sk-work-0000-9z9z", add: true, label: "Work key" }]);
+ const work = added.keys.find((k) => k.slot);
+ expect(work).toMatchObject({ env: "OPENAI_API_KEY", label: "Work key" });
+ expect(JSON.stringify(added)).not.toContain("sk-work");
+ // Which key an app uses: names only, and nothing is signed out or deleted by choosing.
+ const used = (await call(bridge, "agentKeys.use", { app: "hermes", env: "OPENAI_API_KEY", slot: work!.slot })) as { keys: unknown[]; uses?: Record<string, { env: string; slot?: string }> };
+ expect(keys.calls.at(-1)).toEqual(["agent_keys.use", { app: "hermes", env: "OPENAI_API_KEY", slot: work!.slot }]);
+ expect(used.uses?.hermes).toMatchObject({ env: "OPENAI_API_KEY", slot: work!.slot });
+ expect(used.keys).toHaveLength(2);
+ const cleared = (await call(bridge, "agentKeys.use", { app: "hermes" })) as { uses?: unknown };
+ expect(keys.calls.at(-1)).toEqual(["agent_keys.use", { app: "hermes" }]);
+ expect(cleared.uses).toBeUndefined();
+ await call(bridge, "agentKeys.remove", { env: "OPENAI_API_KEY", slot: work!.slot });
+ expect(keys.calls.at(-1)).toEqual(["agent_keys.remove", { env: "OPENAI_API_KEY", slot: work!.slot }]);
+ await call(bridge, "agentKeys.remove", { env: "OPENAI_API_KEY", keep_others: true });
+ expect(keys.calls.at(-1)).toEqual(["agent_keys.remove", { env: "OPENAI_API_KEY", keep_others: true }]);
+ expect(await code(bridge, "agentKeys.use", {})).toBe("bad_args");
+ // A native row is the first key for a variable; the ones beside it are the web page's.
+ expect(agentKeysInput({ keys: [{ provider: "openai", env: "OPENAI_API_KEY", last4: "1111", added_ms: 1 }, { provider: "openai", env: "OPENAI_API_KEY", slot: "k1", last4: "2222", added_ms: 2 }] }, null).keys).toHaveLength(1);
+ });
+
it("fails a key call in the daemon's words, or without a daemon", async () => {
const { bridge } = makeBridge({ tools: null });
expect(await message(bridge, "agentKeys.list")).toBe("Agent keys need the cua daemon");
diff --git a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/AgentKeysModel.swift b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/AgentKeysModel.swift
index e71f4f6671..5054cd5c61 100644
--- a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/AgentKeysModel.swift
+++ b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/AgentKeysModel.swift
@@ -72,7 +72,8 @@ public final class AgentKeysModel {
}
static func input(report: [String: Any]?, error: String?) -> AppAgentKeysInput {
- let keys = (report?["keys"] as? [Any] ?? []).compactMap { $0 as? [String: Any] }.map { k in
+ // Keys saved beside the first one for a variable (they have a slot) are the web page's; a native row is the first.
+ let keys = (report?["keys"] as? [Any] ?? []).compactMap { $0 as? [String: Any] }.filter { $0["slot"] == nil }.map { k in
AppAgentKeyInput(provider: k["provider"] as? String ?? "other", env: k["env"] as? String ?? "",
last4: k["last4"] as? String ?? "",
addedMs: (k["added_ms"] as? NSNumber)?.uint64Value ?? 0,
diff --git a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/AppServices.swift b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/AppServices.swift
index 34c8caa96c..9c6da95171 100644
--- a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/AppServices.swift
+++ b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Models/AppServices.swift
@@ -219,7 +219,7 @@ public final class FixtureAgentSetup: AgentSetupRunning, @unchecked Sendable {
public func deviceSignInWaitJson(id: String) async throws -> String {
calls.append("device-wait:\(id)")
- return #"{"imported":{"source":"codex","env":"CODEX_AUTH_JSON","label":"Codex · ChatGPT sign-in","expires_ms":null,"added_ms":1},"refused":null,"line":null}"#
+ return #"{"imported":{"source":"codex","env":"CODEX_AUTH_JSON","label":"ChatGPT sign-in for Codex","expires_ms":null,"added_ms":1},"refused":null,"line":null}"#
}
public func remove(agents: [String]) async throws -> [AppAgentSetupOutcomeInput] {
diff --git a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/WebHost/WebUIBridge+Pages.swift b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/WebHost/WebUIBridge+Pages.swift
index f7e0b2521c..a1eaf13678 100644
--- a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/WebHost/WebUIBridge+Pages.swift
+++ b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/WebHost/WebUIBridge+Pages.swift
@@ -89,8 +89,21 @@ extension WebUIBridge {
if let env = args["env"] as? String, !env.isEmpty { keyArgs["env"] = env }
if let region = args["region"] as? String, !region.isEmpty { keyArgs["region"] = region }
if let fields = args["fields"] as? [String: String], !fields.isEmpty { keyArgs["fields"] = fields }
+ // Another key beside the first one for the provider, named (it replaces nothing).
+ if args["add"] as? Bool == true { keyArgs["add"] = true }
+ if let label = args["label"] as? String, !label.isEmpty { keyArgs["label"] = label }
return try await model.agentKeys.call("agent_keys.set", keyArgs)
- case "agentKeys.remove": return try await model.agentKeys.call("agent_keys.remove", ["env": try string(args, "env")])
+ case "agentKeys.remove":
+ var removeArgs: [String: Any] = ["env": try string(args, "env")]
+ if let slot = args["slot"] as? String, !slot.isEmpty { removeArgs["slot"] = slot }
+ if args["keep_others"] as? Bool == true { removeArgs["keep_others"] = true }
+ return try await model.agentKeys.call("agent_keys.remove", removeArgs)
+ // Which saved credential an app that takes any provider uses from its next run (no env: the first that works).
+ case "agentKeys.use":
+ var useArgs: [String: Any] = ["app": try string(args, "app")]
+ if let env = args["env"] as? String, !env.isEmpty { useArgs["env"] = env }
+ if let slot = args["slot"] as? String, !slot.isEmpty { useArgs["slot"] = slot }
+ return try await model.agentKeys.call("agent_keys.use", useArgs)
// Which provider keys your login shell has (names only), and one saved from it (the value never crosses the bridge).
case "agentKeys.shell": return try await model.agentKeys.call("agent_keys.shell")
case "agentKeys.fromShell":
diff --git a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/WebHost/WebUIBridge.swift b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/WebHost/WebUIBridge.swift
index 51421a0092..36e14cf2b7 100644
--- a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/WebHost/WebUIBridge.swift
+++ b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/WebHost/WebUIBridge.swift
@@ -81,7 +81,7 @@ final class WebUIBridge: NSObject, WKScriptMessageHandlerWithReply {
// A persistent agent's Memory, Routines and Access (`PersistentModel`).
"agents.detail", "agents.readFile", "agents.restoreFile", "agents.addRoutine", "agents.setRoutine",
"agents.removeRoutine", "agents.allowComputer", "agents.revokeComputer",
- "agentKeys.list", "agentKeys.check", "agentKeys.set", "agentKeys.remove", "agentKeys.shell", "agentKeys.fromShell",
+ "agentKeys.list", "agentKeys.check", "agentKeys.set", "agentKeys.remove", "agentKeys.use", "agentKeys.shell", "agentKeys.fromShell",
// New Space's address form and Connect a cloud, Teleport and Share,
// Cua Volume, Settings and Notifications, a Space's detail and This
// machine (WebUIBridge+Pages.swift).
diff --git a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/AgentKeysTests.swift b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/AgentKeysTests.swift
index fa91528730..4c22210e3f 100644
--- a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/AgentKeysTests.swift
+++ b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/AgentKeysTests.swift
@@ -26,7 +26,12 @@ final class FakeAgentKeysTools: AgentsToolRunning, @unchecked Sendable {
keys.removeAll { $0["env"] as? String == env }
keys.append(["provider": provider, "env": env, "last4": String(value.suffix(4)), "added_ms": 1_790_000_100_000])
case "agent_keys.remove":
- keys.removeAll { $0["env"] as? String == args["env"] as? String }
+ if let slot = args["slot"] as? String {
+ keys.removeAll { $0["env"] as? String == args["env"] as? String && $0["slot"] as? String == slot }
+ } else {
+ keys.removeAll { $0["env"] as? String == args["env"] as? String }
+ }
+ case "agent_keys.use": break
// Your login shell has an Anthropic key: names only, and a copy saved on request.
case "agent_keys.shell": return ["names": ["ANTHROPIC_API_KEY"]]
case "agent_keys.from_shell":
@@ -102,8 +107,17 @@ struct AgentKeysTests {
}
@Test func theWebBridgeRoutesAgentKeysToTheDaemon() {
- for m in ["agentKeys.list", "agentKeys.check", "agentKeys.set", "agentKeys.remove", "agentKeys.shell", "agentKeys.fromShell"] {
+ for m in ["agentKeys.list", "agentKeys.check", "agentKeys.set", "agentKeys.remove", "agentKeys.use", "agentKeys.shell", "agentKeys.fromShell"] {
#expect(WebUIBridge.methods.contains(m))
}
}
+
+ @Test func aKeyBesideTheFirstIsNotARowOfItsOwn() async throws {
+ let tools = FakeAgentKeysTools()
+ tools.keys.append(["provider": "openai", "env": "OPENAI_API_KEY", "slot": "k1", "label": "Work key", "last4": "7777", "added_ms": 1_790_000_300_000])
+ let m = AgentKeysModel(tools: tools)
+ await m.load()
+ // The native rows are the first key for each variable; the web page lists the others.
+ #expect(m.view.rows.map(\.status) == ["Not set", "\u{2022}\u{2022}\u{2022}\u{2022} 3f9a"])
+ }
}
diff --git a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/BridgeContractTests.swift b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/BridgeContractTests.swift
index 9c4f0657f6..603a49650b 100644
--- a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/BridgeContractTests.swift
+++ b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/BridgeContractTests.swift
@@ -256,6 +256,7 @@ struct BridgeContractTests {
("agents.revokeComputer", ["agent": "ada", "machine": "relay:0123"]),
("agentKeys.list", [:]), ("agentKeys.check", [:]), ("agentKeys.set", ["provider": "anthropic", "value": "sk-ant-test-0000"]),
("agentKeys.remove", ["env": "ANTHROPIC_API_KEY"]),
+ ("agentKeys.use", ["app": "hermes", "env": "ANTHROPIC_API_KEY"]),
("agentKeys.shell", [:]), ("agentKeys.fromShell", ["env": "ANTHROPIC_API_KEY"]),
("clouds.status", [:]), ("clouds.test", ["target": ["provider": "aws", "region": "us-west-2"]]),
("clouds.connect", ["target": ["provider": "aws", "region": "us-west-2"], "makeDefault": false]),
diff --git a/apps/cua-spaces-web/e2e/settings-tab-layout.spec.ts b/apps/cua-spaces-web/e2e/settings-tab-layout.spec.ts
index 211c25d65b..794ecc6a69 100644
--- a/apps/cua-spaces-web/e2e/settings-tab-layout.spec.ts
+++ b/apps/cua-spaces-web/e2e/settings-tab-layout.spec.ts
@@ -18,9 +18,9 @@ const TABS = [
["About", "/settings/about"],
] as const;
-// A window that fits the short tabs but not Connections; a Settings tab bar and heading to measure.
+// A window that fits the short tabs (General has Terminal at its end) but not Connections; a Settings tab bar and heading to measure.
test.use({
- viewport: { width: 1100, height: 900 },
+ viewport: { width: 1100, height: 1100 },
// Headless Chromium hides scrollbars by default; a Mac window with a mouse
// (or "always show scrollbars") shows them, and they take width.
launchOptions: { ignoreDefaultArgs: ["--hide-scrollbars"] },
@@ -29,7 +29,7 @@ test.use({
test("Settings: the heading, tab bar and content keep their left edge across tabs", async ({ page }) => {
await page.goto("/settings?bridge=demo&parity");
// The window's own size is the host's (the Electron window ignores the viewport): fix the page's height here.
- await page.addStyleTag({ content: "html, body, #root { height: 760px !important; max-height: 760px !important; overflow: hidden !important; }" });
+ await page.addStyleTag({ content: "html, body, #root { height: 1000px !important; max-height: 1000px !important; overflow: hidden !important; }" });
const nav = page.getByRole("tablist", { name: "Settings" });
await nav.waitFor();
diff --git a/apps/cua-spaces-web/public/onboarding/marks/NOTICE b/apps/cua-spaces-web/public/onboarding/marks/NOTICE
index 985d9f6a69..75d9f859dd 100644
--- a/apps/cua-spaces-web/public/onboarding/marks/NOTICE
+++ b/apps/cua-spaces-web/public/onboarding/marks/NOTICE
@@ -101,3 +101,13 @@ mark-t3code.png
Source: https://github.com/pingdotgg/t3code
Terms: the repository is MIT (Copyright (c) 2026 T3 Tools Inc.); no trademark or logo policy is published.
The MIT License grants rights to the copyrighted file, not to the mark, which names the harness only.
+
+providers/*.svg (alibabacloud.svg, alibabacloud-dark.svg, arcee.svg, arcee-dark.svg, azureai.svg, azureai-dark.svg, bedrock.svg, bedrock-dark.svg, commandcode.svg, commandcode-dark.svg, deepinfra.svg, deepinfra-dark.svg, deepseek.svg, deepseek-dark.svg, fireworks.svg, fireworks-dark.svg, gmicloud.svg, gmicloud-dark.svg, huggingface.svg, huggingface-dark.svg, kilocode.svg, kilocode-dark.svg, kimi.svg, kimi-dark.svg, metaai.svg, metaai-dark.svg, minimax.svg, minimax-dark.svg, nebius.svg, nebius-dark.svg, nousresearch.svg, nousresearch-dark.svg, novita.svg, novita-dark.svg, nvidia.svg, nvidia-dark.svg, ollama.svg, ollama-dark.svg, opencode.svg, opencode-dark.svg, openrouter.svg, openrouter-dark.svg, qwen.svg, qwen-dark.svg, stepfun.svg, stepfun-dark.svg, tencent.svg, tencent-dark.svg, upstage.svg, upstage-dark.svg, vercel.svg, vercel-dark.svg, vertexai.svg, vertexai-dark.svg, xai.svg, xai-dark.svg, xiaomimimo.svg, xiaomimimo-dark.svg, zai.svg, zai-dark.svg)
+ Provider marks (OpenRouter, xAI, DeepSeek, Kimi, Qwen Cloud, Vercel AI Gateway, Arcee, Azure AI Foundry, Amazon Bedrock,
+ CommandCode, DeepInfra, Fireworks, GMI Cloud, Hugging Face, Kilo Code, Meta, MiniMax, Nebius, Nous Research, Novita, NVIDIA,
+ Ollama, OpenCode, StepFun, Tencent, Upstage, Vertex AI, Xiaomi MiMo, Z.ai): the one-colour (monochrome) artwork from
+ Lobe Icons (lobehub/lobe-icons, @lobehub/icons-static-svg 1.101.0, MIT License, Copyright (c) LobeHub), fetched 29 Oct 2026.
+ Only the fill colour was set (near-black for light themes, near-white for files ending in -dark); the paths are unchanged.
+ The marks are trademarks of their owners and are used only to identify each provider next to its name.
+ Providers with no mark here (Actual Computer, Ramp Router, Custom endpoint) show a letter or a neutral glyph.
+ T3 Code (MIT) was checked first and ships no provider marks to reuse.
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/alibabacloud-dark.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/alibabacloud-dark.svg
new file mode 100644
index 0000000000..7bfa888e24
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/alibabacloud-dark.svg
@@ -0,0 +1 @@
+<svg fill="#f5f5f7" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M14.752 4.64h5.274C22.242 4.64 24 6.475 24 8.691V15.8a3.947 3.947 0 01-3.974 3.975h-5.274l1.299-1.835 3.822-1.222c.688-.23 1.146-.918 1.146-1.605v-5.81c0-.687-.458-1.375-1.146-1.605L16.05 6.475l-1.3-1.835zM2.98 15.111c0 .688.46 1.376 1.147 1.606l3.822 1.146 1.3 1.835H3.974A3.947 3.947 0 010 15.723V8.69c0-2.216 1.758-4.05 3.975-4.05h5.273L7.95 6.474 4.127 7.697c-.688.23-1.146.918-1.146 1.606v5.808z"></path><path d="M16.051 11.213H8.025v1.835h8.026v-1.835z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/alibabacloud.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/alibabacloud.svg
new file mode 100644
index 0000000000..906406cec2
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/alibabacloud.svg
@@ -0,0 +1 @@
+<svg fill="#1d1d1f" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M14.752 4.64h5.274C22.242 4.64 24 6.475 24 8.691V15.8a3.947 3.947 0 01-3.974 3.975h-5.274l1.299-1.835 3.822-1.222c.688-.23 1.146-.918 1.146-1.605v-5.81c0-.687-.458-1.375-1.146-1.605L16.05 6.475l-1.3-1.835zM2.98 15.111c0 .688.46 1.376 1.147 1.606l3.822 1.146 1.3 1.835H3.974A3.947 3.947 0 010 15.723V8.69c0-2.216 1.758-4.05 3.975-4.05h5.273L7.95 6.474 4.127 7.697c-.688.23-1.146.918-1.146 1.606v5.808z"></path><path d="M16.051 11.213H8.025v1.835h8.026v-1.835z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/arcee-dark.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/arcee-dark.svg
new file mode 100644
index 0000000000..951212b6b4
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/arcee-dark.svg
@@ -0,0 +1 @@
+<svg fill="#f5f5f7" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M13.236 2.377L2.751 20.493H0L11.863 0l1.373 2.377zm3.554 6.156l-9.606 11.96H4.13L15.511 6.32l1.279 2.212zm6.908 11.96H14.05l8.406-2.151 1.242 2.15zm-3.42-5.922l-7.843 5.92H8.482l10.597-7.997 1.2 2.077z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/arcee.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/arcee.svg
new file mode 100644
index 0000000000..781554d527
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/arcee.svg
@@ -0,0 +1 @@
+<svg fill="#1d1d1f" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M13.236 2.377L2.751 20.493H0L11.863 0l1.373 2.377zm3.554 6.156l-9.606 11.96H4.13L15.511 6.32l1.279 2.212zm6.908 11.96H14.05l8.406-2.151 1.242 2.15zm-3.42-5.922l-7.843 5.92H8.482l10.597-7.997 1.2 2.077z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/azureai-dark.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/azureai-dark.svg
new file mode 100644
index 0000000000..e1fc4df57b
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/azureai-dark.svg
@@ -0,0 +1 @@
+<svg fill="#f5f5f7" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M16.233 0c.713 0 1.345.551 1.572 1.329.227.778 1.555 5.59 1.555 5.59v9.562h-4.813L14.645 0h1.588z" fill-opacity=".5"></path><path d="M23.298 7.47c0-.34-.275-.6-.6-.6h-2.835a3.617 3.617 0 00-3.614 3.615v5.996h3.436a3.617 3.617 0 003.613-3.614V7.47z"></path><path clip-rule="evenodd" d="M16.233 0a.982.982 0 00-.989.989l-.097 18.198A4.814 4.814 0 0110.334 24H1.6a.597.597 0 01-.567-.794l7-19.981A4.819 4.819 0 0112.57 0h3.679-.016z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/azureai.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/azureai.svg
new file mode 100644
index 0000000000..38d621db74
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/azureai.svg
@@ -0,0 +1 @@
+<svg fill="#1d1d1f" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M16.233 0c.713 0 1.345.551 1.572 1.329.227.778 1.555 5.59 1.555 5.59v9.562h-4.813L14.645 0h1.588z" fill-opacity=".5"></path><path d="M23.298 7.47c0-.34-.275-.6-.6-.6h-2.835a3.617 3.617 0 00-3.614 3.615v5.996h3.436a3.617 3.617 0 003.613-3.614V7.47z"></path><path clip-rule="evenodd" d="M16.233 0a.982.982 0 00-.989.989l-.097 18.198A4.814 4.814 0 0110.334 24H1.6a.597.597 0 01-.567-.794l7-19.981A4.819 4.819 0 0112.57 0h3.679-.016z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/bedrock-dark.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/bedrock-dark.svg
new file mode 100644
index 0000000000..2d534d2c5f
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/bedrock-dark.svg
@@ -0,0 +1 @@
+<svg fill="#f5f5f7" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M13.05 15.513h3.08c.214 0 .389.177.389.394v1.82a1.704 1.704 0 011.296 1.661c0 .943-.755 1.708-1.685 1.708-.931 0-1.686-.765-1.686-1.708 0-.807.554-1.484 1.297-1.662v-1.425h-2.69v4.663a.395.395 0 01-.188.338l-2.69 1.641a.385.385 0 01-.405-.002l-4.926-3.086a.395.395 0 01-.185-.336V16.3L2.196 14.87A.395.395 0 012 14.555L2 14.528V9.406c0-.14.073-.27.192-.34l2.465-1.462V4.448c0-.129.062-.249.165-.322l.021-.014L9.77 1.058a.385.385 0 01.407 0l2.69 1.675a.395.395 0 01.185.336V7.6h3.856V5.683a1.704 1.704 0 01-1.296-1.662c0-.943.755-1.708 1.685-1.708.931 0 1.685.765 1.685 1.708 0 .807-.553 1.484-1.296 1.662v2.311a.391.391 0 01-.389.394h-4.245v1.806h6.624a1.69 1.69 0 011.64-1.313c.93 0 1.685.764 1.685 1.707 0 .943-.754 1.708-1.685 1.708a1.69 1.69 0 01-1.64-1.314H13.05v1.937h4.953l.915 1.18a1.66 1.66 0 01.84-.227c.931 0 1.685.764 1.685 1.707 0 .943-.754 1.708-1.685 1.708-.93 0-1.685-.765-1.685-1.708 0-.346.102-.668.276-.937l-.724-.935H13.05v1.806zM9.973 1.856L7.93 3.122V6.09h-.778V3.604L5.435 4.669v2.945l2.11 1.36L9.712 7.61V5.334h.778V7.83c0 .136-.07.263-.184.335L7.963 9.638v2.081l1.422 1.009-.446.646-1.406-.998-1.53 1.005-.423-.66 1.605-1.055v-1.99L5.038 8.29l-2.26 1.34v1.676l1.972-1.189.398.677-2.37 1.429V14.3l2.166 1.258 2.27-1.368.397.677-2.176 1.311V19.3l1.876 1.175 2.365-1.426.398.678-2.017 1.216 1.918 1.201 2.298-1.403v-5.78l-4.758 2.893-.4-.675 5.158-3.136V3.289L9.972 1.856zM16.13 18.47a.913.913 0 00-.908.92c0 .507.406.918.908.918a.913.913 0 00.907-.919.913.913 0 00-.907-.92zm3.63-3.81a.913.913 0 00-.908.92c0 .508.406.92.907.92a.913.913 0 00.908-.92.913.913 0 00-.908-.92zm1.555-4.99a.913.913 0 00-.908.92c0 .507.407.918.908.918a.913.913 0 00.907-.919.913.913 0 00-.907-.92zM17.296 3.1a.913.913 0 00-.907.92c0 .508.406.92.907.92a.913.913 0 00.908-.92.913.913 0 00-.908-.92z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/bedrock.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/bedrock.svg
new file mode 100644
index 0000000000..16f763cbc0
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/bedrock.svg
@@ -0,0 +1 @@
+<svg fill="#1d1d1f" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M13.05 15.513h3.08c.214 0 .389.177.389.394v1.82a1.704 1.704 0 011.296 1.661c0 .943-.755 1.708-1.685 1.708-.931 0-1.686-.765-1.686-1.708 0-.807.554-1.484 1.297-1.662v-1.425h-2.69v4.663a.395.395 0 01-.188.338l-2.69 1.641a.385.385 0 01-.405-.002l-4.926-3.086a.395.395 0 01-.185-.336V16.3L2.196 14.87A.395.395 0 012 14.555L2 14.528V9.406c0-.14.073-.27.192-.34l2.465-1.462V4.448c0-.129.062-.249.165-.322l.021-.014L9.77 1.058a.385.385 0 01.407 0l2.69 1.675a.395.395 0 01.185.336V7.6h3.856V5.683a1.704 1.704 0 01-1.296-1.662c0-.943.755-1.708 1.685-1.708.931 0 1.685.765 1.685 1.708 0 .807-.553 1.484-1.296 1.662v2.311a.391.391 0 01-.389.394h-4.245v1.806h6.624a1.69 1.69 0 011.64-1.313c.93 0 1.685.764 1.685 1.707 0 .943-.754 1.708-1.685 1.708a1.69 1.69 0 01-1.64-1.314H13.05v1.937h4.953l.915 1.18a1.66 1.66 0 01.84-.227c.931 0 1.685.764 1.685 1.707 0 .943-.754 1.708-1.685 1.708-.93 0-1.685-.765-1.685-1.708 0-.346.102-.668.276-.937l-.724-.935H13.05v1.806zM9.973 1.856L7.93 3.122V6.09h-.778V3.604L5.435 4.669v2.945l2.11 1.36L9.712 7.61V5.334h.778V7.83c0 .136-.07.263-.184.335L7.963 9.638v2.081l1.422 1.009-.446.646-1.406-.998-1.53 1.005-.423-.66 1.605-1.055v-1.99L5.038 8.29l-2.26 1.34v1.676l1.972-1.189.398.677-2.37 1.429V14.3l2.166 1.258 2.27-1.368.397.677-2.176 1.311V19.3l1.876 1.175 2.365-1.426.398.678-2.017 1.216 1.918 1.201 2.298-1.403v-5.78l-4.758 2.893-.4-.675 5.158-3.136V3.289L9.972 1.856zM16.13 18.47a.913.913 0 00-.908.92c0 .507.406.918.908.918a.913.913 0 00.907-.919.913.913 0 00-.907-.92zm3.63-3.81a.913.913 0 00-.908.92c0 .508.406.92.907.92a.913.913 0 00.908-.92.913.913 0 00-.908-.92zm1.555-4.99a.913.913 0 00-.908.92c0 .507.407.918.908.918a.913.913 0 00.907-.919.913.913 0 00-.907-.92zM17.296 3.1a.913.913 0 00-.907.92c0 .508.406.92.907.92a.913.913 0 00.908-.92.913.913 0 00-.908-.92z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/commandcode-dark.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/commandcode-dark.svg
new file mode 100644
index 0000000000..991463848d
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/commandcode-dark.svg
@@ -0,0 +1 @@
+<svg fill="#f5f5f7" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M19.334 0a4.67 4.67 0 0 0-4.666 4.668v2H9.334v-2A4.67 4.67 0 0 0 4.668 0 4.67 4.67 0 0 0 0 4.668a4.67 4.67 0 0 0 4.668 4.665h2v5.334h-2A4.67 4.67 0 0 0 0 19.334 4.67 4.67 0 0 0 4.668 24a4.67 4.67 0 0 0 4.666-4.666v-2h5.334v2A4.67 4.67 0 0 0 19.334 24 4.67 4.67 0 0 0 24 19.334a4.67 4.67 0 0 0-4.666-4.667h-2V9.333h2A4.67 4.67 0 0 0 24 4.668 4.673 4.673 0 0 0 19.334 0m-2 6.666v-2c0-1.107.893-2 2-2s2 .893 2 2-.893 2-2 2zm-12.668 0c-1.107 0-2-.893-2-2s.893-2 2-2 2 .893 2 2v2zm4.666 8V9.334h5.334v5.334zm10.002 6.667c-1.107 0-2-.893-2-2v-2h2c1.107 0 2 .892 2 2 0 1.107-.893 2-2 2m-14.668 0c-1.107 0-2-.893-2-2 0-1.108.893-2 2-2h2v2c0 1.107-.893 2-2 2"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/commandcode.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/commandcode.svg
new file mode 100644
index 0000000000..fe7a220c0f
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/commandcode.svg
@@ -0,0 +1 @@
+<svg fill="#1d1d1f" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M19.334 0a4.67 4.67 0 0 0-4.666 4.668v2H9.334v-2A4.67 4.67 0 0 0 4.668 0 4.67 4.67 0 0 0 0 4.668a4.67 4.67 0 0 0 4.668 4.665h2v5.334h-2A4.67 4.67 0 0 0 0 19.334 4.67 4.67 0 0 0 4.668 24a4.67 4.67 0 0 0 4.666-4.666v-2h5.334v2A4.67 4.67 0 0 0 19.334 24 4.67 4.67 0 0 0 24 19.334a4.67 4.67 0 0 0-4.666-4.667h-2V9.333h2A4.67 4.67 0 0 0 24 4.668 4.673 4.673 0 0 0 19.334 0m-2 6.666v-2c0-1.107.893-2 2-2s2 .893 2 2-.893 2-2 2zm-12.668 0c-1.107 0-2-.893-2-2s.893-2 2-2 2 .893 2 2v2zm4.666 8V9.334h5.334v5.334zm10.002 6.667c-1.107 0-2-.893-2-2v-2h2c1.107 0 2 .892 2 2 0 1.107-.893 2-2 2m-14.668 0c-1.107 0-2-.893-2-2 0-1.108.893-2 2-2h2v2c0 1.107-.893 2-2 2"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/deepinfra-dark.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/deepinfra-dark.svg
new file mode 100644
index 0000000000..4bff99c338
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/deepinfra-dark.svg
@@ -0,0 +1 @@
+<svg fill="#f5f5f7" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M3.294 7.821A2.297 2.297 0 011 5.527a2.297 2.297 0 012.294-2.295A2.297 2.297 0 015.59 5.527 2.297 2.297 0 013.294 7.82zm0-3.688a1.396 1.396 0 000 2.79 1.396 1.396 0 000-2.79zM3.294 14.293A2.297 2.297 0 011 11.998a2.297 2.297 0 012.294-2.294 2.297 2.297 0 012.295 2.294 2.297 2.297 0 01-2.295 2.295zm0-3.688a1.395 1.395 0 000 2.788 1.395 1.395 0 100-2.788zM3.294 20.761A2.297 2.297 0 011 18.467a2.297 2.297 0 012.294-2.295 2.297 2.297 0 012.295 2.295 2.297 2.297 0 01-2.295 2.294zm0-3.688a1.396 1.396 0 000 2.79 1.396 1.396 0 000-2.79zM20.738 7.821a2.297 2.297 0 01-2.295-2.294 2.297 2.297 0 012.294-2.295 2.297 2.297 0 012.295 2.295 2.297 2.297 0 01-2.294 2.294zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.626-1.395-1.395-1.395zM20.738 14.293a2.297 2.297 0 01-2.295-2.295 2.297 2.297 0 012.294-2.294 2.297 2.297 0 012.295 2.294 2.297 2.297 0 01-2.294 2.295zm0-3.688c-.769 0-1.395.625-1.395 1.393a1.396 1.396 0 002.79 0c0-.77-.626-1.393-1.395-1.393zM20.738 20.761a2.297 2.297 0 01-2.295-2.294 2.297 2.297 0 012.294-2.295 2.297 2.297 0 012.295 2.295 2.297 2.297 0 01-2.294 2.294zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.626-1.395-1.395-1.395zM12.016 11.057a2.297 2.297 0 01-2.294-2.294 2.297 2.297 0 012.294-2.295 2.297 2.297 0 012.295 2.295 2.297 2.297 0 01-2.295 2.294zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.625-1.395-1.395-1.395zM12.017 4.589a2.297 2.297 0 01-2.295-2.295A2.297 2.297 0 0112.017 0a2.297 2.297 0 012.294 2.294 2.297 2.297 0 01-2.294 2.295zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.626-1.395-1.395-1.395zM12.017 17.529a2.297 2.297 0 01-2.295-2.295 2.297 2.297 0 012.295-2.294 2.297 2.297 0 012.294 2.294 2.297 2.297 0 01-2.294 2.295zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.626-1.395-1.395-1.395zM12.016 24a2.297 2.297 0 01-2.294-2.295 2.297 2.297 0 012.294-2.294 2.297 2.297 0 012.295 2.294A2.297 2.297 0 0112.016 24zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.625-1.395-1.395-1.395z"></path><path d="M8.363 8.222a.742.742 0 01-.277-.053l-1.494-.596a.75.75 0 11.557-1.392l1.493.595a.75.75 0 01-.278 1.446h-.001zM8.363 14.566a.743.743 0 01-.277-.053l-1.494-.595a.75.75 0 11.557-1.393l1.493.596a.75.75 0 01-.278 1.445h-.001zM17.124 11.397a.741.741 0 01-.277-.054l-1.493-.595a.75.75 0 11.555-1.392l1.493.595a.75.75 0 01-.278 1.446zM17.124 5.05a.744.744 0 01-.277-.054L15.354 4.4a.75.75 0 01.555-1.392l1.493.596a.75.75 0 01-.278 1.445zM17.124 17.739a.743.743 0 01-.277-.053l-1.494-.596a.75.75 0 11.556-1.392l1.493.596a.75.75 0 01-.278 1.445zM6.91 17.966a.75.75 0 01-.279-1.445l1.494-.595a.749.749 0 11.556 1.392l-1.493.595a.743.743 0 01-.277.053H6.91zM6.91 11.66a.75.75 0 01-.279-1.446l1.494-.595a.75.75 0 01.556 1.392l-1.493.595a.743.743 0 01-.277.053H6.91zM6.91 5.033a.75.75 0 01-.279-1.446l1.494-.595a.75.75 0 01.556 1.392l-1.493.596a.744.744 0 01-.277.053H6.91zM8.363 21.364a.743.743 0 01-.277-.053l-1.494-.596a.75.75 0 01.555-1.392l1.494.595a.75.75 0 01-.278 1.446zM15.63 8.223a.75.75 0 01-.278-1.447l1.494-.595a.75.75 0 01.556 1.393l-1.494.595a.744.744 0 01-.276.054h-.002zM15.63 14.567a.75.75 0 01-.278-1.446l1.494-.596a.75.75 0 01.556 1.394l-1.494.595a.743.743 0 01-.276.053h-.002zM15.63 21.363a.749.749 0 01-.278-1.445l1.494-.595a.75.75 0 11.555 1.392l-1.494.595a.741.741 0 01-.277.053z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/deepinfra.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/deepinfra.svg
new file mode 100644
index 0000000000..08b268ecc9
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/deepinfra.svg
@@ -0,0 +1 @@
+<svg fill="#1d1d1f" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M3.294 7.821A2.297 2.297 0 011 5.527a2.297 2.297 0 012.294-2.295A2.297 2.297 0 015.59 5.527 2.297 2.297 0 013.294 7.82zm0-3.688a1.396 1.396 0 000 2.79 1.396 1.396 0 000-2.79zM3.294 14.293A2.297 2.297 0 011 11.998a2.297 2.297 0 012.294-2.294 2.297 2.297 0 012.295 2.294 2.297 2.297 0 01-2.295 2.295zm0-3.688a1.395 1.395 0 000 2.788 1.395 1.395 0 100-2.788zM3.294 20.761A2.297 2.297 0 011 18.467a2.297 2.297 0 012.294-2.295 2.297 2.297 0 012.295 2.295 2.297 2.297 0 01-2.295 2.294zm0-3.688a1.396 1.396 0 000 2.79 1.396 1.396 0 000-2.79zM20.738 7.821a2.297 2.297 0 01-2.295-2.294 2.297 2.297 0 012.294-2.295 2.297 2.297 0 012.295 2.295 2.297 2.297 0 01-2.294 2.294zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.626-1.395-1.395-1.395zM20.738 14.293a2.297 2.297 0 01-2.295-2.295 2.297 2.297 0 012.294-2.294 2.297 2.297 0 012.295 2.294 2.297 2.297 0 01-2.294 2.295zm0-3.688c-.769 0-1.395.625-1.395 1.393a1.396 1.396 0 002.79 0c0-.77-.626-1.393-1.395-1.393zM20.738 20.761a2.297 2.297 0 01-2.295-2.294 2.297 2.297 0 012.294-2.295 2.297 2.297 0 012.295 2.295 2.297 2.297 0 01-2.294 2.294zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.626-1.395-1.395-1.395zM12.016 11.057a2.297 2.297 0 01-2.294-2.294 2.297 2.297 0 012.294-2.295 2.297 2.297 0 012.295 2.295 2.297 2.297 0 01-2.295 2.294zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.625-1.395-1.395-1.395zM12.017 4.589a2.297 2.297 0 01-2.295-2.295A2.297 2.297 0 0112.017 0a2.297 2.297 0 012.294 2.294 2.297 2.297 0 01-2.294 2.295zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.626-1.395-1.395-1.395zM12.017 17.529a2.297 2.297 0 01-2.295-2.295 2.297 2.297 0 012.295-2.294 2.297 2.297 0 012.294 2.294 2.297 2.297 0 01-2.294 2.295zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.626-1.395-1.395-1.395zM12.016 24a2.297 2.297 0 01-2.294-2.295 2.297 2.297 0 012.294-2.294 2.297 2.297 0 012.295 2.294A2.297 2.297 0 0112.016 24zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.625-1.395-1.395-1.395z"></path><path d="M8.363 8.222a.742.742 0 01-.277-.053l-1.494-.596a.75.75 0 11.557-1.392l1.493.595a.75.75 0 01-.278 1.446h-.001zM8.363 14.566a.743.743 0 01-.277-.053l-1.494-.595a.75.75 0 11.557-1.393l1.493.596a.75.75 0 01-.278 1.445h-.001zM17.124 11.397a.741.741 0 01-.277-.054l-1.493-.595a.75.75 0 11.555-1.392l1.493.595a.75.75 0 01-.278 1.446zM17.124 5.05a.744.744 0 01-.277-.054L15.354 4.4a.75.75 0 01.555-1.392l1.493.596a.75.75 0 01-.278 1.445zM17.124 17.739a.743.743 0 01-.277-.053l-1.494-.596a.75.75 0 11.556-1.392l1.493.596a.75.75 0 01-.278 1.445zM6.91 17.966a.75.75 0 01-.279-1.445l1.494-.595a.749.749 0 11.556 1.392l-1.493.595a.743.743 0 01-.277.053H6.91zM6.91 11.66a.75.75 0 01-.279-1.446l1.494-.595a.75.75 0 01.556 1.392l-1.493.595a.743.743 0 01-.277.053H6.91zM6.91 5.033a.75.75 0 01-.279-1.446l1.494-.595a.75.75 0 01.556 1.392l-1.493.596a.744.744 0 01-.277.053H6.91zM8.363 21.364a.743.743 0 01-.277-.053l-1.494-.596a.75.75 0 01.555-1.392l1.494.595a.75.75 0 01-.278 1.446zM15.63 8.223a.75.75 0 01-.278-1.447l1.494-.595a.75.75 0 01.556 1.393l-1.494.595a.744.744 0 01-.276.054h-.002zM15.63 14.567a.75.75 0 01-.278-1.446l1.494-.596a.75.75 0 01.556 1.394l-1.494.595a.743.743 0 01-.276.053h-.002zM15.63 21.363a.749.749 0 01-.278-1.445l1.494-.595a.75.75 0 11.555 1.392l-1.494.595a.741.741 0 01-.277.053z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/deepseek-dark.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/deepseek-dark.svg
new file mode 100644
index 0000000000..342e4d7c21
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/deepseek-dark.svg
@@ -0,0 +1 @@
+<svg fill="#f5f5f7" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/deepseek.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/deepseek.svg
new file mode 100644
index 0000000000..394f9aab65
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/deepseek.svg
@@ -0,0 +1 @@
+<svg fill="#1d1d1f" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/fireworks-dark.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/fireworks-dark.svg
new file mode 100644
index 0000000000..794131a260
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/fireworks-dark.svg
@@ -0,0 +1 @@
+<svg fill="#f5f5f7" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M14.8 5l-2.801 6.795L9.195 5H7.397l3.072 7.428a1.64 1.64 0 003.038.002L16.598 5H14.8zm1.196 10.352l5.124-5.244-.699-1.669-5.596 5.739a1.664 1.664 0 00-.343 1.807 1.642 1.642 0 001.516 1.012L16 17l8-.02-.699-1.669-7.303.041h-.002zM2.88 10.104l.699-1.669 5.596 5.739c.468.479.603 1.189.343 1.807a1.643 1.643 0 01-1.516 1.012l-8-.018-.002.002.699-1.669 7.303.042-5.122-5.246z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/fireworks.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/fireworks.svg
new file mode 100644
index 0000000000..32e41ad7a7
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/fireworks.svg
@@ -0,0 +1 @@
+<svg fill="#1d1d1f" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M14.8 5l-2.801 6.795L9.195 5H7.397l3.072 7.428a1.64 1.64 0 003.038.002L16.598 5H14.8zm1.196 10.352l5.124-5.244-.699-1.669-5.596 5.739a1.664 1.664 0 00-.343 1.807 1.642 1.642 0 001.516 1.012L16 17l8-.02-.699-1.669-7.303.041h-.002zM2.88 10.104l.699-1.669 5.596 5.739c.468.479.603 1.189.343 1.807a1.643 1.643 0 01-1.516 1.012l-8-.018-.002.002.699-1.669 7.303.042-5.122-5.246z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/gmicloud-dark.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/gmicloud-dark.svg
new file mode 100644
index 0000000000..1c97d2cd8f
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/gmicloud-dark.svg
@@ -0,0 +1 @@
+<svg fill="#f5f5f7" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M15.55 5c.249 0 .45.225.45.5v2c0 .276-.202.5-.45.5h-3.1c-.25 0-.451.226-.451.5v2c0 .277-.203.5-.45.5h-3.1c-.25 0-.451.225-.451.5v2c0 .276.203.5.45.5h3.104c.25 0 .45.225.45.5v2c0 .277.203.5.45.5h3.1c.25 0 .451.225.451.5v2c0 .277-.203.5-.45.5h-7.1c-.25 0-.45-.225-.45-.5v-2c0-.276-.203-.5-.45-.5H4.451c-.25 0-.45-.225-.45-.5v-2c0-.277-.203-.5-.451-.5H.45C.2 14 0 13.775 0 13.5v-2c0-.277.203-.5.45-.5h3.098c.25 0 .45-.225.45-.5v-2c0-.276.203-.5.45-.5H7.55C7.8 8 8 7.775 8 7.5v-2c0-.277.203-.5.451-.5z"></path><path d="M23.55 11.002c.247 0 .45.223.45.5v2c0 .274-.201.5-.45.5h-3.1c-.249 0-.451.223-.451.5v2c0 .274-.202.5-.45.5h-3.101c-.248 0-.45-.224-.45-.5v-4.999c0-.275.2-.5.45-.5h7.1z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/gmicloud.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/gmicloud.svg
new file mode 100644
index 0000000000..07ff69c260
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/gmicloud.svg
@@ -0,0 +1 @@
+<svg fill="#1d1d1f" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M15.55 5c.249 0 .45.225.45.5v2c0 .276-.202.5-.45.5h-3.1c-.25 0-.451.226-.451.5v2c0 .277-.203.5-.45.5h-3.1c-.25 0-.451.225-.451.5v2c0 .276.203.5.45.5h3.104c.25 0 .45.225.45.5v2c0 .277.203.5.45.5h3.1c.25 0 .451.225.451.5v2c0 .277-.203.5-.45.5h-7.1c-.25 0-.45-.225-.45-.5v-2c0-.276-.203-.5-.45-.5H4.451c-.25 0-.45-.225-.45-.5v-2c0-.277-.203-.5-.451-.5H.45C.2 14 0 13.775 0 13.5v-2c0-.277.203-.5.45-.5h3.098c.25 0 .45-.225.45-.5v-2c0-.276.203-.5.45-.5H7.55C7.8 8 8 7.775 8 7.5v-2c0-.277.203-.5.451-.5z"></path><path d="M23.55 11.002c.247 0 .45.223.45.5v2c0 .274-.201.5-.45.5h-3.1c-.249 0-.451.223-.451.5v2c0 .274-.202.5-.45.5h-3.101c-.248 0-.45-.224-.45-.5v-4.999c0-.275.2-.5.45-.5h7.1z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/huggingface-dark.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/huggingface-dark.svg
new file mode 100644
index 0000000000..ef62259301
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/huggingface-dark.svg
@@ -0,0 +1 @@
+<svg fill="#f5f5f7" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M16.781 3.277c2.997 1.704 4.844 4.851 4.844 8.258 0 .995-.155 1.955-.443 2.857a1.332 1.332 0 011.125.4 1.41 1.41 0 01.2 1.723c.204.165.352.385.428.632l.017.062c.06.222.12.69-.2 1.166.244.37.279.836.093 1.236-.255.57-.893 1.018-2.128 1.5l-.202.078-.131.048c-.478.173-.89.295-1.061.345l-.086.024c-.89.243-1.808.375-2.732.394-1.32 0-2.3-.36-2.923-1.067a9.852 9.852 0 01-3.18.018C9.778 21.647 8.802 22 7.494 22a11.249 11.249 0 01-2.541-.343l-.221-.06-.273-.08a16.574 16.574 0 01-1.175-.405c-1.237-.483-1.875-.93-2.13-1.501-.186-.4-.151-.867.093-1.236a1.42 1.42 0 01-.2-1.166c.069-.273.226-.516.447-.694a1.41 1.41 0 01.2-1.722c.233-.248.557-.391.917-.407l.078-.001a9.385 9.385 0 01-.44-2.85c0-3.407 1.847-6.554 4.844-8.258a9.822 9.822 0 019.687 0zM4.188 14.758c.125.687 2.357 2.35 2.14 2.707-.19.315-.796-.239-.948-.386l-.041-.04-.168-.147c-.561-.479-2.304-1.9-2.74-1.432-.43.46.119.859 1.055 1.42l.784.467.136.083c1.045.643 1.12.84.95 1.113-.188.295-3.07-2.1-3.34-1.083-.27 1.011 2.942 1.304 2.744 2.006-.2.7-2.265-1.324-2.685-.537-.425.79 2.913 1.718 2.94 1.725l.16.04.175.042c1.227.284 3.565.65 4.435-.604.673-.973.64-1.709-.248-2.61l-.057-.057c-.945-.928-1.495-2.288-1.495-2.288l-.017-.058-.025-.072c-.082-.22-.284-.639-.63-.584-.46.073-.798 1.21.12 1.933l.05.038c.977.721-.195 1.21-.573.534l-.058-.104-.143-.25c-.463-.799-1.282-2.111-1.739-2.397-.532-.332-.907-.148-.782.541zm14.842-.541c-.533.335-1.563 2.074-1.94 2.751a.613.613 0 01-.687.302.436.436 0 01-.176-.098.303.303 0 01-.049-.06l-.014-.028-.008-.02-.007-.019-.003-.013-.003-.017a.289.289 0 01-.004-.048c0-.12.071-.266.25-.427.026-.024.054-.047.084-.07l.047-.036c.022-.016.043-.032.063-.049.883-.71.573-1.81.131-1.917l-.031-.006-.056-.004a.368.368 0 00-.062.006l-.028.005-.042.014-.039.017-.028.015-.028.019-.036.027-.023.02c-.173.158-.273.428-.31.542l-.016.054s-.53 1.309-1.439 2.234l-.054.054c-.365.358-.596.69-.702 1.018-.143.437-.066.868.21 1.353.055.097.117.195.187.296.882 1.275 3.282.876 4.494.59l.286-.07.25-.074c.276-.084.736-.233 1.2-.42l.188-.077.065-.028.064-.028.124-.056.081-.038c.529-.252.964-.543.994-.827l.001-.036a.299.299 0 00-.037-.139c-.094-.176-.271-.212-.491-.168l-.045.01c-.044.01-.09.024-.136.04l-.097.035-.054.022c-.559.23-1.238.705-1.607.745h.006a.452.452 0 01-.05.003h-.024l-.024-.003-.023-.005c-.068-.016-.116-.06-.14-.142a.22.22 0 01-.005-.1c.062-.345.958-.595 1.713-.91l.066-.028c.528-.224.97-.483.985-.832v-.04a.47.47 0 00-.016-.098c-.048-.18-.175-.251-.36-.251-.785 0-2.55 1.36-2.92 1.36-.025 0-.048-.007-.058-.024a.6.6 0 01-.046-.088c-.1-.238.068-.462 1.06-1.066l.209-.126c.538-.32 1.01-.588 1.341-.831.29-.212.475-.406.503-.6l.003-.028c.008-.113-.038-.227-.147-.344a.266.266 0 00-.07-.054l-.034-.015-.013-.005a.403.403 0 00-.13-.02c-.162 0-.369.07-.595.18-.637.313-1.431.952-1.826 1.285l-.249.215-.033.033c-.08.078-.288.27-.493.386l-.071.037-.041.019a.535.535 0 01-.122.036h.005a.346.346 0 01-.031.003l.01-.001-.013.001c-.079.005-.145-.021-.19-.095a.113.113 0 01-.014-.065c.027-.465 2.034-1.991 2.152-2.642l.009-.048c.1-.65-.271-.817-.791-.493zM11.938 2.984c-4.798 0-8.688 3.829-8.688 8.55 0 .692.083 1.364.24 2.008l.008-.009c.252-.298.612-.46 1.017-.46.355.008.699.117.993.312.22.14.465.384.715.694.261-.372.69-.598 1.15-.605.852 0 1.367.728 1.562 1.383l.047.105.06.127c.192.396.595 1.139 1.143 1.68 1.06 1.04 1.324 2.115.8 3.266a8.865 8.865 0 002.024-.014c-.505-1.12-.26-2.17.74-3.186l.066-.066c.695-.684 1.157-1.69 1.252-1.912.195-.655.708-1.383 1.56-1.383.46.007.889.233 1.15.605.25-.31.495-.553.718-.694a1.87 1.87 0 01.99-.312c.357 0 .682.126.925.36.14-.61.215-1.245.215-1.898 0-4.722-3.89-8.55-8.687-8.55zm1.857 8.926l.439-.212c.553-.264.89-.383.89.152 0 1.093-.771 3.208-3.155 3.262h-.184c-2.325-.052-3.116-2.06-3.156-3.175l-.001-.087c0-1.107 1.452.586 3.25.586.716 0 1.379-.272 1.917-.526zm4.017-3.143c.45 0 .813.358.813.8 0 .441-.364.8-.813.8a.806.806 0 01-.812-.8c0-.442.364-.8.812-.8zm-11.624 0c.448 0 .812.358.812.8 0 .441-.364.8-.812.8a.806.806 0 01-.813-.8c0-.442.364-.8.813-.8zm7.79-.841c.32-.384.846-.54 1.33-.394.483.146.83.564.878 1.06.048.495-.212.97-.659 1.203-.322.168-.447-.477-.767-.585l.002-.003c-.287-.098-.772.362-.925.079a1.215 1.215 0 01.14-1.36zm-4.323 0c.322.384.377.92.14 1.36-.152.283-.64-.177-.925-.079l.003.003c-.108.036-.194.134-.273.24l-.118.165c-.11.15-.22.262-.377.18a1.226 1.226 0 01-.658-1.204c.048-.495.395-.913.878-1.059a1.262 1.262 0 011.33.394z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/huggingface.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/huggingface.svg
new file mode 100644
index 0000000000..4a7a07e54a
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/huggingface.svg
@@ -0,0 +1 @@
+<svg fill="#1d1d1f" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M16.781 3.277c2.997 1.704 4.844 4.851 4.844 8.258 0 .995-.155 1.955-.443 2.857a1.332 1.332 0 011.125.4 1.41 1.41 0 01.2 1.723c.204.165.352.385.428.632l.017.062c.06.222.12.69-.2 1.166.244.37.279.836.093 1.236-.255.57-.893 1.018-2.128 1.5l-.202.078-.131.048c-.478.173-.89.295-1.061.345l-.086.024c-.89.243-1.808.375-2.732.394-1.32 0-2.3-.36-2.923-1.067a9.852 9.852 0 01-3.18.018C9.778 21.647 8.802 22 7.494 22a11.249 11.249 0 01-2.541-.343l-.221-.06-.273-.08a16.574 16.574 0 01-1.175-.405c-1.237-.483-1.875-.93-2.13-1.501-.186-.4-.151-.867.093-1.236a1.42 1.42 0 01-.2-1.166c.069-.273.226-.516.447-.694a1.41 1.41 0 01.2-1.722c.233-.248.557-.391.917-.407l.078-.001a9.385 9.385 0 01-.44-2.85c0-3.407 1.847-6.554 4.844-8.258a9.822 9.822 0 019.687 0zM4.188 14.758c.125.687 2.357 2.35 2.14 2.707-.19.315-.796-.239-.948-.386l-.041-.04-.168-.147c-.561-.479-2.304-1.9-2.74-1.432-.43.46.119.859 1.055 1.42l.784.467.136.083c1.045.643 1.12.84.95 1.113-.188.295-3.07-2.1-3.34-1.083-.27 1.011 2.942 1.304 2.744 2.006-.2.7-2.265-1.324-2.685-.537-.425.79 2.913 1.718 2.94 1.725l.16.04.175.042c1.227.284 3.565.65 4.435-.604.673-.973.64-1.709-.248-2.61l-.057-.057c-.945-.928-1.495-2.288-1.495-2.288l-.017-.058-.025-.072c-.082-.22-.284-.639-.63-.584-.46.073-.798 1.21.12 1.933l.05.038c.977.721-.195 1.21-.573.534l-.058-.104-.143-.25c-.463-.799-1.282-2.111-1.739-2.397-.532-.332-.907-.148-.782.541zm14.842-.541c-.533.335-1.563 2.074-1.94 2.751a.613.613 0 01-.687.302.436.436 0 01-.176-.098.303.303 0 01-.049-.06l-.014-.028-.008-.02-.007-.019-.003-.013-.003-.017a.289.289 0 01-.004-.048c0-.12.071-.266.25-.427.026-.024.054-.047.084-.07l.047-.036c.022-.016.043-.032.063-.049.883-.71.573-1.81.131-1.917l-.031-.006-.056-.004a.368.368 0 00-.062.006l-.028.005-.042.014-.039.017-.028.015-.028.019-.036.027-.023.02c-.173.158-.273.428-.31.542l-.016.054s-.53 1.309-1.439 2.234l-.054.054c-.365.358-.596.69-.702 1.018-.143.437-.066.868.21 1.353.055.097.117.195.187.296.882 1.275 3.282.876 4.494.59l.286-.07.25-.074c.276-.084.736-.233 1.2-.42l.188-.077.065-.028.064-.028.124-.056.081-.038c.529-.252.964-.543.994-.827l.001-.036a.299.299 0 00-.037-.139c-.094-.176-.271-.212-.491-.168l-.045.01c-.044.01-.09.024-.136.04l-.097.035-.054.022c-.559.23-1.238.705-1.607.745h.006a.452.452 0 01-.05.003h-.024l-.024-.003-.023-.005c-.068-.016-.116-.06-.14-.142a.22.22 0 01-.005-.1c.062-.345.958-.595 1.713-.91l.066-.028c.528-.224.97-.483.985-.832v-.04a.47.47 0 00-.016-.098c-.048-.18-.175-.251-.36-.251-.785 0-2.55 1.36-2.92 1.36-.025 0-.048-.007-.058-.024a.6.6 0 01-.046-.088c-.1-.238.068-.462 1.06-1.066l.209-.126c.538-.32 1.01-.588 1.341-.831.29-.212.475-.406.503-.6l.003-.028c.008-.113-.038-.227-.147-.344a.266.266 0 00-.07-.054l-.034-.015-.013-.005a.403.403 0 00-.13-.02c-.162 0-.369.07-.595.18-.637.313-1.431.952-1.826 1.285l-.249.215-.033.033c-.08.078-.288.27-.493.386l-.071.037-.041.019a.535.535 0 01-.122.036h.005a.346.346 0 01-.031.003l.01-.001-.013.001c-.079.005-.145-.021-.19-.095a.113.113 0 01-.014-.065c.027-.465 2.034-1.991 2.152-2.642l.009-.048c.1-.65-.271-.817-.791-.493zM11.938 2.984c-4.798 0-8.688 3.829-8.688 8.55 0 .692.083 1.364.24 2.008l.008-.009c.252-.298.612-.46 1.017-.46.355.008.699.117.993.312.22.14.465.384.715.694.261-.372.69-.598 1.15-.605.852 0 1.367.728 1.562 1.383l.047.105.06.127c.192.396.595 1.139 1.143 1.68 1.06 1.04 1.324 2.115.8 3.266a8.865 8.865 0 002.024-.014c-.505-1.12-.26-2.17.74-3.186l.066-.066c.695-.684 1.157-1.69 1.252-1.912.195-.655.708-1.383 1.56-1.383.46.007.889.233 1.15.605.25-.31.495-.553.718-.694a1.87 1.87 0 01.99-.312c.357 0 .682.126.925.36.14-.61.215-1.245.215-1.898 0-4.722-3.89-8.55-8.687-8.55zm1.857 8.926l.439-.212c.553-.264.89-.383.89.152 0 1.093-.771 3.208-3.155 3.262h-.184c-2.325-.052-3.116-2.06-3.156-3.175l-.001-.087c0-1.107 1.452.586 3.25.586.716 0 1.379-.272 1.917-.526zm4.017-3.143c.45 0 .813.358.813.8 0 .441-.364.8-.813.8a.806.806 0 01-.812-.8c0-.442.364-.8.812-.8zm-11.624 0c.448 0 .812.358.812.8 0 .441-.364.8-.812.8a.806.806 0 01-.813-.8c0-.442.364-.8.813-.8zm7.79-.841c.32-.384.846-.54 1.33-.394.483.146.83.564.878 1.06.048.495-.212.97-.659 1.203-.322.168-.447-.477-.767-.585l.002-.003c-.287-.098-.772.362-.925.079a1.215 1.215 0 01.14-1.36zm-4.323 0c.322.384.377.92.14 1.36-.152.283-.64-.177-.925-.079l.003.003c-.108.036-.194.134-.273.24l-.118.165c-.11.15-.22.262-.377.18a1.226 1.226 0 01-.658-1.204c.048-.495.395-.913.878-1.059a1.262 1.262 0 011.33.394z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/kilocode-dark.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/kilocode-dark.svg
new file mode 100644
index 0000000000..4423e5e583
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/kilocode-dark.svg
@@ -0,0 +1 @@
+<svg fill="#f5f5f7" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M0 0v24h24V0H0zm22.222 22.222H1.778V1.778h20.444v20.444zm-7.555-4.964h2.222v1.778h-2.794L12.89 17.83v-2.794h1.778v2.222zm4 0h-1.778v-2.222h-2.222v-1.778h2.793l1.207 1.207v2.793zm-7.556-2.591H9.333v-1.778h1.778v1.778zm-5.778-1.778h1.778v4h4v1.778H6.54L5.333 17.46V12.89zm13.334-3.556v1.778h-5.778V9.333h1.987V7.111h-1.987V5.333h2.558l1.206 1.207v2.793h2.014zm-11.556-2h2.222l1.778 1.778v2H9.333v-2H7.111v2H5.333V5.333h1.778v2zm4 0H9.333v-2h1.778v2z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/kilocode.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/kilocode.svg
new file mode 100644
index 0000000000..bfb65b1af4
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/kilocode.svg
@@ -0,0 +1 @@
+<svg fill="#1d1d1f" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M0 0v24h24V0H0zm22.222 22.222H1.778V1.778h20.444v20.444zm-7.555-4.964h2.222v1.778h-2.794L12.89 17.83v-2.794h1.778v2.222zm4 0h-1.778v-2.222h-2.222v-1.778h2.793l1.207 1.207v2.793zm-7.556-2.591H9.333v-1.778h1.778v1.778zm-5.778-1.778h1.778v4h4v1.778H6.54L5.333 17.46V12.89zm13.334-3.556v1.778h-5.778V9.333h1.987V7.111h-1.987V5.333h2.558l1.206 1.207v2.793h2.014zm-11.556-2h2.222l1.778 1.778v2H9.333v-2H7.111v2H5.333V5.333h1.778v2zm4 0H9.333v-2h1.778v2z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/kimi-dark.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/kimi-dark.svg
new file mode 100644
index 0000000000..59dd811afa
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/kimi-dark.svg
@@ -0,0 +1 @@
+<svg fill="#f5f5f7" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z"></path><path d="M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/kimi.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/kimi.svg
new file mode 100644
index 0000000000..e980b26ed4
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/kimi.svg
@@ -0,0 +1 @@
+<svg fill="#1d1d1f" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z"></path><path d="M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/metaai-dark.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/metaai-dark.svg
new file mode 100644
index 0000000000..045c2f43b3
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/metaai-dark.svg
@@ -0,0 +1 @@
+<svg fill="#f5f5f7" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M10.547.232c.776-.086 1.543.244 2.152.712.784.598 1.375 1.434 1.757 2.347.19.444.3.92.345 1.402.01.384.024.781-.108 1.148-.126.406-.362.795-.728 1.017-.352.236-.786.3-1.199.288-.84-.073-1.613-.52-2.212-1.106-.15-.1-.236-.263-.368-.38-.801-.97-1.394-2.203-1.324-3.496.048-.698.38-1.44 1.03-1.75.206-.1.428-.164.655-.182zM18.595 3.077c.52-.045 1.032.186 1.4.551.402.434.625 1.006.736 1.584.096.605.09 1.233-.048 1.83a5.97 5.97 0 01-.907 2.19c-.198.25-.382.519-.633.719-.493.45-1.181.725-1.848.598-.42-.08-.819-.306-1.085-.646-.514-.591-.687-1.403-.714-2.17a6.11 6.11 0 011.03-3.285c.237-.314.49-.62.797-.867.375-.27.805-.486 1.272-.504zM5.038 4.172c.618-.045 1.238.067 1.832.235.871.28 1.741.78 2.182 1.624.177.383.256.826.152 1.242-.097.442-.375.816-.71 1.105-.724.59-1.664.84-2.577.887a5.356 5.356 0 01-2.881-.675c-.39-.248-.765-.539-1.025-.93a1.9 1.9 0 01-.327-1.283c.067-.507.357-.968.741-1.289.723-.62 1.684-.873 2.613-.916zM4.87 10.369c.69-.06 1.465.223 1.811.866.213.349.278.763.29 1.166.006.528-.136 1.046-.34 1.529-.34.793-.893 1.478-1.538 2.036-.64.538-1.42.951-2.26 1.015a2.031 2.031 0 01-1.467-.398c-.353-.281-.578-.707-.662-1.15-.156-.8.077-1.62.445-2.327.196-.377.444-.724.72-1.044.767-.886 1.814-1.608 3.001-1.693zM20.391 11.05c.881-.087 1.872.116 2.477.822.473.58.534 1.425.239 2.102-.118.317-.32.59-.527.852-.877.962-2.11 1.553-3.379 1.744-.818.123-1.723.036-2.406-.477-.2-.161-.386-.346-.514-.573-.277-.436-.321-.994-.216-1.492.224-.904.92-1.594 1.676-2.073a5.874 5.874 0 012.65-.905zM7.553 15.523c.381-.052.775.004 1.118.184.344.154.613.427.866.702.866 1.097 1.267 2.549 1.146 3.944a4.476 4.476 0 01-.497 1.61c-.273.469-.663.91-1.187 1.08-.35.103-.731.118-1.077-.005a2.53 2.53 0 01-.959-.612c-.798-.859-1.236-2.02-1.343-3.185-.055-.646-.006-1.31.21-1.923.146-.471.384-.92.738-1.265.261-.277.62-.452.985-.53zM13.637 16.5a4.237 4.237 0 011.82.219c.795.286 1.542.724 2.148 1.323.535.504.963 1.162 1.099 1.899.055.379.038.785-.122 1.138-.19.465-.599.807-1.051.996-.883.364-1.887.253-2.76-.082a5.568 5.568 0 01-2.343-1.685c-.347-.445-.616-.968-.697-1.534-.042-.382-.036-.788.13-1.142.194-.418.55-.76.978-.925.25-.119.525-.174.798-.207z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/metaai.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/metaai.svg
new file mode 100644
index 0000000000..cb5561bc4f
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/metaai.svg
@@ -0,0 +1 @@
+<svg fill="#1d1d1f" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M10.547.232c.776-.086 1.543.244 2.152.712.784.598 1.375 1.434 1.757 2.347.19.444.3.92.345 1.402.01.384.024.781-.108 1.148-.126.406-.362.795-.728 1.017-.352.236-.786.3-1.199.288-.84-.073-1.613-.52-2.212-1.106-.15-.1-.236-.263-.368-.38-.801-.97-1.394-2.203-1.324-3.496.048-.698.38-1.44 1.03-1.75.206-.1.428-.164.655-.182zM18.595 3.077c.52-.045 1.032.186 1.4.551.402.434.625 1.006.736 1.584.096.605.09 1.233-.048 1.83a5.97 5.97 0 01-.907 2.19c-.198.25-.382.519-.633.719-.493.45-1.181.725-1.848.598-.42-.08-.819-.306-1.085-.646-.514-.591-.687-1.403-.714-2.17a6.11 6.11 0 011.03-3.285c.237-.314.49-.62.797-.867.375-.27.805-.486 1.272-.504zM5.038 4.172c.618-.045 1.238.067 1.832.235.871.28 1.741.78 2.182 1.624.177.383.256.826.152 1.242-.097.442-.375.816-.71 1.105-.724.59-1.664.84-2.577.887a5.356 5.356 0 01-2.881-.675c-.39-.248-.765-.539-1.025-.93a1.9 1.9 0 01-.327-1.283c.067-.507.357-.968.741-1.289.723-.62 1.684-.873 2.613-.916zM4.87 10.369c.69-.06 1.465.223 1.811.866.213.349.278.763.29 1.166.006.528-.136 1.046-.34 1.529-.34.793-.893 1.478-1.538 2.036-.64.538-1.42.951-2.26 1.015a2.031 2.031 0 01-1.467-.398c-.353-.281-.578-.707-.662-1.15-.156-.8.077-1.62.445-2.327.196-.377.444-.724.72-1.044.767-.886 1.814-1.608 3.001-1.693zM20.391 11.05c.881-.087 1.872.116 2.477.822.473.58.534 1.425.239 2.102-.118.317-.32.59-.527.852-.877.962-2.11 1.553-3.379 1.744-.818.123-1.723.036-2.406-.477-.2-.161-.386-.346-.514-.573-.277-.436-.321-.994-.216-1.492.224-.904.92-1.594 1.676-2.073a5.874 5.874 0 012.65-.905zM7.553 15.523c.381-.052.775.004 1.118.184.344.154.613.427.866.702.866 1.097 1.267 2.549 1.146 3.944a4.476 4.476 0 01-.497 1.61c-.273.469-.663.91-1.187 1.08-.35.103-.731.118-1.077-.005a2.53 2.53 0 01-.959-.612c-.798-.859-1.236-2.02-1.343-3.185-.055-.646-.006-1.31.21-1.923.146-.471.384-.92.738-1.265.261-.277.62-.452.985-.53zM13.637 16.5a4.237 4.237 0 011.82.219c.795.286 1.542.724 2.148 1.323.535.504.963 1.162 1.099 1.899.055.379.038.785-.122 1.138-.19.465-.599.807-1.051.996-.883.364-1.887.253-2.76-.082a5.568 5.568 0 01-2.343-1.685c-.347-.445-.616-.968-.697-1.534-.042-.382-.036-.788.13-1.142.194-.418.55-.76.978-.925.25-.119.525-.174.798-.207z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/minimax-dark.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/minimax-dark.svg
new file mode 100644
index 0000000000..7f2264286e
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/minimax-dark.svg
@@ -0,0 +1 @@
+<svg fill="#f5f5f7" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M16.278 2c1.156 0 2.093.927 2.093 2.07v12.501a.74.74 0 00.744.709.74.74 0 00.743-.709V9.099a2.06 2.06 0 012.071-2.049A2.06 2.06 0 0124 9.1v6.561a.649.649 0 01-.652.645.649.649 0 01-.653-.645V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v7.472a2.037 2.037 0 01-2.048 2.026 2.037 2.037 0 01-2.048-2.026v-12.5a.785.785 0 00-.788-.753.785.785 0 00-.789.752l-.001 15.904A2.037 2.037 0 0113.441 22a2.037 2.037 0 01-2.048-2.026V18.04c0-.356.292-.645.652-.645.36 0 .652.289.652.645v1.934c0 .263.142.506.372.638.23.131.514.131.744 0a.734.734 0 00.372-.638V4.07c0-1.143.937-2.07 2.093-2.07zm-5.674 0c1.156 0 2.093.927 2.093 2.07v11.523a.648.648 0 01-.652.645.648.648 0 01-.652-.645V4.07a.785.785 0 00-.789-.78.785.785 0 00-.789.78v14.013a2.06 2.06 0 01-2.07 2.048 2.06 2.06 0 01-2.071-2.048V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v3.8a2.06 2.06 0 01-2.071 2.049A2.06 2.06 0 010 12.9v-1.378c0-.357.292-.646.652-.646.36 0 .653.29.653.646V12.9c0 .418.343.757.766.757s.766-.339.766-.757V9.099a2.06 2.06 0 012.07-2.048 2.06 2.06 0 012.071 2.048v8.984c0 .419.343.758.767.758.423 0 .766-.339.766-.758V4.07c0-1.143.937-2.07 2.093-2.07z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/minimax.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/minimax.svg
new file mode 100644
index 0000000000..b8e377cfdb
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/minimax.svg
@@ -0,0 +1 @@
+<svg fill="#1d1d1f" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M16.278 2c1.156 0 2.093.927 2.093 2.07v12.501a.74.74 0 00.744.709.74.74 0 00.743-.709V9.099a2.06 2.06 0 012.071-2.049A2.06 2.06 0 0124 9.1v6.561a.649.649 0 01-.652.645.649.649 0 01-.653-.645V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v7.472a2.037 2.037 0 01-2.048 2.026 2.037 2.037 0 01-2.048-2.026v-12.5a.785.785 0 00-.788-.753.785.785 0 00-.789.752l-.001 15.904A2.037 2.037 0 0113.441 22a2.037 2.037 0 01-2.048-2.026V18.04c0-.356.292-.645.652-.645.36 0 .652.289.652.645v1.934c0 .263.142.506.372.638.23.131.514.131.744 0a.734.734 0 00.372-.638V4.07c0-1.143.937-2.07 2.093-2.07zm-5.674 0c1.156 0 2.093.927 2.093 2.07v11.523a.648.648 0 01-.652.645.648.648 0 01-.652-.645V4.07a.785.785 0 00-.789-.78.785.785 0 00-.789.78v14.013a2.06 2.06 0 01-2.07 2.048 2.06 2.06 0 01-2.071-2.048V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v3.8a2.06 2.06 0 01-2.071 2.049A2.06 2.06 0 010 12.9v-1.378c0-.357.292-.646.652-.646.36 0 .653.29.653.646V12.9c0 .418.343.757.766.757s.766-.339.766-.757V9.099a2.06 2.06 0 012.07-2.048 2.06 2.06 0 012.071 2.048v8.984c0 .419.343.758.767.758.423 0 .766-.339.766-.758V4.07c0-1.143.937-2.07 2.093-2.07z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/nebius-dark.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/nebius-dark.svg
new file mode 100644
index 0000000000..eed21a9152
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/nebius-dark.svg
@@ -0,0 +1 @@
+<svg fill="#f5f5f7" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M20 2.306v16.797s4-.242 4-4.815V2.306h-4zM4 22.001V5.204s-4 .242-4 4.816V22h4z"></path><path d="M16.318 16.51L11.286 4.94c-.824-1.872-2.168-2.926-4.077-2.926-1.908 0-3.211 1.54-3.211 3.19 0 0 2.405-.333 3.68 2.593l5.036 11.57c.821 1.87 2.168 2.926 4.075 2.926 1.905 0 3.211-1.541 3.211-3.19 0 0-2.406.333-3.682-2.594z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/nebius.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/nebius.svg
new file mode 100644
index 0000000000..789f3208dd
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/nebius.svg
@@ -0,0 +1 @@
+<svg fill="#1d1d1f" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M20 2.306v16.797s4-.242 4-4.815V2.306h-4zM4 22.001V5.204s-4 .242-4 4.816V22h4z"></path><path d="M16.318 16.51L11.286 4.94c-.824-1.872-2.168-2.926-4.077-2.926-1.908 0-3.211 1.54-3.211 3.19 0 0 2.405-.333 3.68 2.593l5.036 11.57c.821 1.87 2.168 2.926 4.075 2.926 1.905 0 3.211-1.541 3.211-3.19 0 0-2.406.333-3.682-2.594z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/nousresearch-dark.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/nousresearch-dark.svg
new file mode 100644
index 0000000000..79ae32f03e
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/nousresearch-dark.svg
@@ -0,0 +1 @@
+<svg fill="#f5f5f7" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M5.938 12.835c.127-.039.285.02.373.143.028.038.036.092.046.14.003.014-.02.033-.04.05-.124-.098-.24-.194-.354-.291-.011-.01-.016-.027-.025-.042zM8.396 9.412c.195-.032.39-.06.588-.05a.54.54 0 01.148.026c.202.071.402.147.601.224.028.01.05.036.075.055l-.013.027a9.203 9.203 0 01-.26-.089c-.115-.038-.213-.077-.315-.098-.25-.05-.25-.046-.292-.014l.574.144c.275.139.55.276.823.417.042.022.09.057.107.098.026.06.063.076.117.072.066-.006.132-.017.213-.027l-.04.086c.051.08.142.02.216.064-.074.13-.247.09-.334.199l.061.074-.12.087c0 .106-.038.168-.306.243l.026.085-.196.042.07.124h-.25l-.007.137c-.081-.01-.161-.018-.244-.027l-.053.123c-.027-.008-.052-.011-.073-.023-.067-.038-.128-.056-.195.006-.019.017-.063.014-.093.008-.026-.006-.05-.029-.07-.042-.11.095-.11.095-.208.003-.057.046-.12.074-.186.011-.063.027-.123-.02-.178-.014-.07.007-.097-.035-.133-.07l-.13.033c-.013-.236-.194-.19-.34-.203.005-.072.05-.092.095-.094a.474.474 0 01.159.022c.164.05.32.12.496.138.203.021.405.029.601-.015.265-.059.52-.149.707-.365.049-.056.083-.127.117-.195.019-.038.02-.084-.02-.116a1.397 1.397 0 00-.382-.217c.024.12-.031.182-.115.221 0 .014-.004.025 0 .03.08.115.084.16-.007.267a1.39 1.39 0 01-.218.211.477.477 0 01-.641-.05 1.36 1.36 0 01-.133-.152c-.078-.107-.076-.108-.033-.236-.165-.08-.128-.226-.104-.364.008-.05.028-.096.049-.163-.04.014-.067.017-.087.032a.897.897 0 00-.316.357c-.007.016-.01.034-.02.047-.012.015-.034.038-.045.035-.02-.006-.037-.027-.05-.045-.008-.012-.007-.032-.012-.057h-.126l.053-.172a14.82 14.82 0 00-.039-.049l.11-.284c-.06.026-.091.044-.124.051-.03.007-.064 0-.095 0 0-.031-.01-.07.004-.092.149-.22.305-.428.593-.476z"></path><path d="M8.06 10.788c-.003-.038-.004-.075.037-.062.016.006.034.048.028.067-.01.04-.038.032-.064-.005z"></path><path clip-rule="evenodd" d="M11.981.009c.226-.012.453-.011.679 0 .247.01.495.024.74.062.401.064.798.157 1.19.273.463.138.92.299 1.356.511a7.31 7.31 0 012.948 2.642c.292.469.536.963.739 1.479.219.556.446 1.11.623 1.683.204.654.329 1.326.458 1.997.097.504.182 1.01.29 1.511.156.722.329 1.44.494 2.16.186.812.4 1.615.63 2.415.102.355.193.713.282 1.072.11.436.202.876.254 1.323.031.278.066.557.073.837a7.56 7.56 0 01-.017.88c-.037.413-.1.818-.226 1.212a5.017 5.017 0 01-.915 1.649l-.13.156.018.023c.043-.023.088-.041.127-.068.2-.138.373-.307.531-.49.4-.46.721-.973.975-1.529a3.59 3.59 0 00.325-1.72c-.024-.424-.097-.834-.3-1.213-.013-.027-.015-.06-.03-.121.05.035.082.048.101.072.107.13.22.258.315.398.33.494.46 1.052.486 1.64a3.75 3.75 0 01-.47 1.97c-.36.655-.887 1.14-1.526 1.506-.193.111-.394.21-.595.308-.157.078-.248.211-.318.365a.522.522 0 00-.033.406.359.359 0 01.013.139c-.005.077-.077.155-.14.162-.054.006-.125-.043-.15-.116a1.206 1.206 0 01-.06-.233c-.04-.314-.155-.6-.308-.87a3.906 3.906 0 00-.73-.91 2.129 2.129 0 00-.897-.524 4.093 4.093 0 00-.692-.131c-.075-.008-.15-.04-.22.01.18.06.363.11.538.18.434.173.82.43 1.18.728.308.255.58.543.794.884.098.155.186.315.227.496.027.123.042.25.067.375.013.062-.002.109-.053.144-.047.033-.122.034-.163-.01a.455.455 0 01-.08-.14c-.03-.073-.038-.159-.078-.225a7.314 7.314 0 00-1.423-1.664c-.16-.137-.329-.26-.537-.323-.376-.114-.753-.203-1.15-.154-.213.025-.427.032-.64.053a1.6 1.6 0 00-.736.278 5.14 5.14 0 00-.834.72c-.329.342-.642.699-.955 1.055-.136.155-.264.319-.314.531a5.227 5.227 0 00-.012.051.096.096 0 01-.09.076h-.31c-.046 0-.082-.048-.072-.094.023-.108.045-.216.07-.324.075-.325.19-.635.368-.917.024-.039.04-.088.104-.08l.01.049.027.077c.28-.435.571-.834.996-1.135.283-.204.584-.378.89-.55a.196.196 0 00-.098-.002c-.162.043-.325.084-.485.134-.402.124-.764.33-1.11.566-.147.1-.298.193-.414.333a7.314 7.314 0 00-1.07 1.767.845.845 0 00-.04.12.075.075 0 01-.072.056h-.494c-.04 0-.062-.051-.036-.082.123-.14.246-.282.377-.415.275-.281.58-.532.777-.884.027-.048.063-.09.095-.135.238-.333.54-.607.818-.902.082-.086.175-.16.26-.24.029-.027.053-.057.079-.085l-.018-.025-.135.041c-.034.017-.07.031-.102.05-.248.144-.494.292-.743.433-.408.23-.825.439-1.209.711-.281.2-.591.358-.889.533-.02.012-.044.015-.08.028-.015-.135.143-.201.108-.336-.033.014-.064.02-.085.038-.111.096-.227.19-.328.296-.148.157-.284.325-.425.488-.125.143-.25.286-.373.431A.153.153 0 019.89 24H8.762a.316.316 0 00.016-.042c.028-.09.085-.172.083-.28-.091-.018-.162.001-.212.077a4.45 4.45 0 00-.136.215c-.01.016-.024.03-.042.03h-.093c-.019 0-.029-.022-.017-.037.071-.088.14-.178.209-.268.001-.002-.006-.012-.012-.024-.014.004-.03.006-.045.013-.176.09-.352.181-.527.274a.363.363 0 01-.168.042H5.202c-.026 0-.039-.036-.019-.053.21-.178.402-.374.558-.605.335-.496.538-1.047.667-1.629.004-.02-.003-.043-.006-.091-.037.048-.059.072-.076.1a1.943 1.943 0 01-.334.415c-.28.258-.59.448-.983.464-.297.012-.588 0-.865-.127-.46-.21-.722-.57-.794-1.072-.025-.17-.017-.171-.182-.219A3.513 3.513 0 011.97 20.6a2.286 2.286 0 01-.808-1.13 3.569 3.569 0 01-.16-1.245c.002-.034.016-.067.024-.1.032.023.046.043.05.066.033.153.059.308.096.46.086.355.257.664.516.92.258.256.571.419.91.532.358.118.717.138 1.07-.016a1.89 1.89 0 00.621-.452c.328-.348.533-.76.648-1.223.009-.034.005-.071.007-.11-.015.006-.026.006-.03.011-.031.05-.064.1-.093.152-.284.502-.679.887-1.196 1.135-.351.17-.718.255-1.11.159a1.607 1.607 0 01-.971-.64 2.006 2.006 0 01-.368-.924 2.903 2.903 0 01.02-.886c.05-.439.466-1.17.742-1.271-.02.063-.035.112-.053.16-.043.116-.097.227-.13.345a1.901 1.901 0 00-.05.82c.033.212.09.416.204.6.147.236.346.407.62.465.11.023.225.014.338.018a.576.576 0 00.386-.131c.164-.128.282-.292.366-.481.168-.375.24-.777.309-1.179.05-.296.093-.594.133-.893.039-.281.071-.563.104-.845.026-.232.048-.464.074-.696.024-.228.052-.455.076-.683.024-.227.047-.455.069-.683.013-.14.022-.28.034-.42l.037-.417c.022-.25.041-.5.065-.748.008-.082-.02-.132-.09-.177a2.46 2.46 0 01-.492-.418c-.1-.109-.188-.228-.282-.342-.035-.042-.056-.097-.116-.118a2.084 2.084 0 00.275.597c.06.092.131.176.196.265.063.086.182.115.234.226-.028.003-.046.01-.06.006a4.74 4.74 0 01-.22-.057 2.71 2.71 0 01-1.287-.819c-.435-.487-.656-1.076-.71-1.723a5.206 5.206 0 01.014-1.06c.072-.602.22-1.186.45-1.745.155-.376.338-.741.526-1.102.205-.393.466-.75.765-1.076.512-.559 1.104-1.024 1.726-1.448.717-.49 1.478-.898 2.277-1.233C8.244.828 8.767.632 9.31.494c.655-.166 1.31-.33 1.982-.415.229-.03.458-.058.688-.07zm-1.847 22.82c-.07.06-.147.111-.207.18-.238.27-.464.549-.668.869l-.044.108a.177.177 0 00.093-.057c.174-.19.351-.378.519-.574.104-.122.195-.255.288-.386.024-.034.03-.08.046-.12l-.027-.02zm1.65-3.695a5.51 5.51 0 00-.653.593l-.37.386a.963.963 0 01-.377.25 1.372 1.372 0 01-.467.09c-.044 0-.087.006-.151.012.028.058.043.097.064.131.15.242.301.482.45.724.136.22.276.438.399.666.068.125.105.267.156.404.077.027.14-.018.202-.048.29-.135.579-.274.867-.412.213-.101.437-.186.636-.31.347-.215.68-.455 1.018-.685.015-.01.026-.028.042-.046-.023-.019-.038-.037-.056-.044-.287-.111-.527-.3-.77-.482a5.319 5.319 0 01-.506-.42 1.757 1.757 0 01-.41-.653c-.019-.049-.045-.095-.075-.156zm-5.847.264c-.06.096-.097.194-.132.293a3.38 3.38 0 01-.555 1.01c-.2.25-.455.412-.762.493-.23.06-.464.076-.7.07-.048-.002-.097.002-.158.005.016.04.021.066.035.085.1.145.23.246.4.295.157.046.316.034.498.023.181-.037.343-.115.485-.234.238-.199.402-.454.536-.732.175-.363.264-.751.342-1.144.01-.053.008-.11.011-.164zm14.945-4.586c.008.029.016.057.027.107.024.155.051.31.072.464.03.219.067.437.078.657.017.344.027.689-.014 1.033-.037.315-.063.633-.116.946a6.153 6.153 0 01-.46 1.518c-.008.018-.01.039-.02.082.047-.03.077-.042.098-.064.085-.083.17-.167.248-.255.271-.305.458-.66.596-1.043.18-.498.228-1.011.145-1.531-.103-.65-.33-1.263-.597-1.881a9.055 9.055 0 00-.024-.055l-.033.022zM5.797 8.29a.26.26 0 00.018.153c.124.251.25.501.379.75.025.049.066.09.03.163-.284.06-.578.119-.88.255.059.038.097.06.132.087.042.032.112.058.09.12-.01.033-.075.048-.117.072.017.01.043.021.067.036.166.102.33.207.447.368.138.192.229.404.188.644-.079.469-.306.85-.69 1.132-.054.04-.106.083-.161.122a.243.243 0 00-.103.245.77.77 0 00.055.195c.083.196.22.35.375.492.083.076.159.164.222.257a.37.37 0 01.025.377c-.023.05-.05.099-.076.148-.03.06-.028.111.022.162.041.042.08.089.112.138.038.058.078.079.147.05a.486.486 0 01.333-.006c.16.046.302.126.444.21.13.077.264.149.4.219.067.035.14.05.219.026.071-.022.124.01.145.076.02.064-.003.108-.074.139-.07.03-.137.063-.209.088-.1.035-.201.073-.314.077-.013-.107.11-.088.127-.159-.206-.126-.643-.145-.801-.034.063.112.035.21-.096.313-.13-.1-.025-.202.002-.3a.209.209 0 00-.249.17c-.015.101.067.216.178.224.108.007.218-.005.326-.012.06-.005.12-.027.199 0-.103.123-.248.127-.357.19.002.05.07.086.019.131-.053.048-.095-.001-.132-.03-.08-.063-.16-.126-.231-.197a.474.474 0 01-.157-.311.52.52 0 00-.043-.172c-.032-.074-.032-.137.033-.19-.018-.03-.028-.053-.045-.072a1.222 1.222 0 01-.196-.369c-.053-.137-.046-.264.048-.381.024-.03.05-.06.064-.095a.664.664 0 00.047-.168c.017-.165-.064-.287-.182-.387-.186-.156-.36-.322-.46-.551-.005-.011-.024-.017-.037-.026-.011.017-.024.027-.025.038-.019.185-.045.37-.052.557-.014.377.058.743.162 1.104.118.41.289.798.488 1.173.267.502.537 1.002.812 1.5.055.098.13.189.208.27.198.202.452.272.724.273.202 0 .404-.006.605-.026.295-.03.59-.073.884-.113.183-.025.365-.057.548-.08.21-.026.38.073.522.21.16.156.305.327.447.5.22.265.397.56.554.867.05.098.07.1.147.03.13-.121.26-.242.394-.36.067-.059.088-.12.067-.213a3.535 3.535 0 01-.085-.796c.002-.157.006-.314.018-.471.015-.224.03-.45.06-.672a59.114 59.114 0 01.362-2.298c.087-.493.182-.984.268-1.477.06-.347.118-.694.162-1.043.034-.273.055-.55.063-.825.011-.332.003-.665.002-.998 0-.077.004-.155-.01-.23-.028-.142-.01-.155-.162-.19a5.826 5.826 0 00-.607-.107c-.146-.018-.207-.053-.221-.19-.006-.049-.025-.098-.041-.146-.009-.025-.024-.048-.046-.09l-.025.264c-.009.096-.029.116-.127.115-.055 0-.11-.008-.164-.008-.476 0-.952-.008-1.426.032-.095.008-.173-.015-.226-.103-.04-.066-.088-.126-.134-.186-.063-.084-.086-.093-.182-.06-.195.068-.388.138-.582.21a2.71 2.71 0 00-.675.394.986.986 0 01-.323.168c-.033.01-.07.008-.127.013.02-.066.024-.114.047-.15.064-.105.135-.205.205-.306.023-.033.049-.063.073-.095l-.015-.023-.201.037c-.146.04-.296.07-.437.122-.148.053-.266.023-.386-.072a3.623 3.623 0 01-.733-.786l-.093-.132zm8.592 8.963l-.147.09c-.22.134-.44.266-.659.402-.093.058-.184.12-.27.188-.085.07-.124.161-.072.272.047.1.093.2.147.294.047.08.124.138.213.147.11.01.228.012.336-.012.217-.05.372-.205.528-.357a.291.291 0 00.087-.308c-.046-.18-.079-.365-.118-.547-.011-.052-.027-.103-.045-.169zm-.257-2.409c-.12.291-.205.597-.325.91-.151.433-.294.87-.435 1.323.036-.01.054-.01.067-.018.261-.16.522-.324.785-.484.054-.033.071-.078.065-.138-.012-.13-.024-.262-.034-.393l-.068-.886c-.008-.103-.02-.206-.029-.31-.009 0-.017-.002-.026-.004zm3.081-8.13l.099.285c.08.231.159.463.24.714l.58 1.952c.187.63.372 1.262.558 1.893.114.382.235.762.343 1.146.072.257.126.519.186.799.044.206.087.413.127.64.034.106.023.226.077.325l.025-.006-.068-.362c-.038-.206-.077-.412-.113-.638-.015-.07-.029-.141-.046-.211-.095-.396-.177-.796-.29-1.187-.196-.685-.413-1.364-.618-2.046-.165-.549-.322-1.1-.488-1.648-.069-.227-.15-.45-.226-.695l-.117-.336c-.037-.107-.075-.216-.115-.322-.04-.106-.084-.21-.127-.314a7.558 7.558 0 01-.027.01zM6.225 14.304c-.063-.001-.115.014-.134.083a.35.35 0 00.41.012 4.533 4.533 0 00-.276-.095zM5.23 11.98c-.026-.027-.057-.048-.075.002-.012.032-.007.07-.01.113.082-.037.082-.037.085-.115zm.062-1.189a.135.135 0 00-.088.056.197.197 0 00-.025.11c.005.152.01.306.026.457a.751.751 0 00.066.218c.061.136.157.167.288.101.055-.027.06-.054.025-.11a4.52 4.52 0 01-.129-.211c-.015-.068-.066-.131-.033-.207.04-.09-.076-.116-.074-.19V10.874c-.003-.038-.006-.087-.056-.083zm-.017-.968a.867.867 0 00-.467.127c-.076.045-.084.07-.05.158.034.087.07.173.115.254.064.117.09.125.21.077a.657.657 0 01.336-.053c.202.022.357.136.504.264l.092.077c.007-.006.014-.013.022-.018-.019-.105-.035-.226-.149-.264-.157-.053-.324-.075-.508-.117l-.24-.005c.24-.169.452-.044.687.009-.063-.115-.153-.147-.23-.193-.082-.05-.17-.092-.25-.144-.06-.037-.12-.08-.072-.172zm10.233.325c-.23-.01-.427.08-.608.211-.034.026-.06.065-.105.117.087.026.15.046.232.065.044-.015.088-.03.13-.046.306-.114.61-.115.904.031.126.063.237.04.366-.005-.02-.031-.03-.054-.045-.071a.986.986 0 00-.448-.273c-.14-.044-.284-.024-.426-.03zM7.99 6.483a.308.308 0 00.002.133c.08.321.156.643.242.962.104.387.27.75.456 1.103.02.037.061.08.098.087a.404.404 0 00.253-.051l-.472-.84c-.23-.448-.405-.92-.579-1.394zM10.397.497c-.2-.008-.405.004-.603.034-.236.035-.47.087-.7.152-.287.08-.569.18-.852.273-.04.013-.074.038-.11.058.028.014.05.018.07.014.287-.068.58-.085.873-.09.134-.002.269.009.402.025.19.024.382.048.57.09.456.104.874.3 1.265.556.464.306.888.66 1.257 1.078.205.232.395.475.56.739.17.274.315.561.449.856.273.601.456 1.232.6 1.876.04.173.07.348.1.524.017.104.065.167.17.19.122.028.2.105.22.251-.003.102-.06.174-.129.24a1.065 1.065 0 00-.268.358.164.164 0 00.083-.039c.08-.086.162-.172.235-.265a.56.56 0 00.13-.333c.009-.05.022-.1.024-.15.007-.124-.017-.15-.143-.168-.025-.004-.049-.014-.073-.015-.082-.007-.125-.063-.137-.131-.033-.198-.004-.355.247-.408.086-.018.174-.03.26-.042.158-.023.315-.053.473-.067.14-.012.19.033.226.167.008.029.018.057.021.087.019.179-.008.225-.141.288-.027.013-.055.024-.078.042a.148.148 0 00-.051.067c-.039.144.073.382.206.445l.673.32c.023.011.05.015.075.023l.018-.026c-.015-.008-.032-.013-.044-.024a2.27 2.27 0 00-.544-.32 4.898 4.898 0 00-.173-.075.203.203 0 01-.126-.191c-.003-.085.045-.154.128-.187l.059-.025c.099-.044.118-.076.112-.187a.384.384 0 00-.008-.063c-.067-.294-.123-.59-.205-.88a9.478 9.478 0 00-.826-2.036 7.465 7.465 0 00-1.39-1.805 4.536 4.536 0 00-1.177-.824 3.656 3.656 0 00-1.016-.328 6.155 6.155 0 00-.712-.074zm6.719 5.955c.01.014.018.028.038.034l-.022-.044-.016.01zM4.103 3.917a.062.062 0 01-.03.012.455.455 0 01-.04.039c-.01.01-.02.02-.045.04l-.363.354c-.088.085-.17.178-.266.253-.284.22-.425.53-.544.855a.132.132 0 00-.007.071c.013.055.033.108.052.168l.074.026c-.017.056-.03.105-.047.152-.058.164-.118.327-.175.491-.005.015.008.036.019.077.08-.175.158-.33.225-.489.228-.544.484-1.074.819-1.561.09-.133.182-.266.283-.401.004-.006.007-.013.022-.03.001-.016.003-.032.015-.04l.008-.017zm12.976 2.408a.023.023 0 01.009.019.073.073 0 00-.006.01.188.188 0 00.007.02l.018.022c.002-.007.007-.016.005-.021-.003-.01-.012-.018-.02-.038a1.331 1.331 0 01-.013-.012zM4.199 4.48c-.003.004-.008.008-.027.014-.005.013-.011.025-.031.047a2.085 2.085 0 01-.124.167c-.048.07-.116.055-.181.041-.134-.028-.228.016-.287.143-.089.187-.187.37-.273.56-.049.108-.11.216-.118.36.081.003.154.007.228.008h.228a2.563 2.563 0 01-.079.264c-.01.052-.022.103-.033.155l.02.004c.018-.046.037-.092.067-.153.066-.142.13-.285.2-.426.02-.04.034-.1.116-.092 0 .043.004.084 0 .124-.005.045-.017.09-.028.143.141.043.086.174.115.269.102-.022.104-.195.248-.144v.205l.017.002.439-1.059c-.13 0-.246-.02-.358.033-.024.011-.058-.001-.108-.004.075-.15.139-.278.211-.417a.128.128 0 01.025-.036c0-.015-.001-.03.008-.038l.006-.02c-.005.006-.01.011-.028.017-.004.012-.009.024-.026.045a.085.085 0 01-.032.033c-.123.157-.09.164-.258.106-.079-.027-.078-.028-.047-.144.028-.046.056-.093.098-.15 0-.016-.001-.032.007-.042L4.2 4.48zm2.073-.67c-.003.006-.007.011-.027.016-.094.125-.194.246-.28.377-.155.238-.301.481-.451.723-.14.224-.345.368-.575.481-.017.008-.04.006-.079.011.012-.059.016-.109.033-.153a6.076 6.076 0 01.229-.518l-.007-.02a.138.138 0 01-.035.025c-.028.05-.055.1-.093.164-.26.424-.443.817-.442.95.024.004.048.011.073.013.177.013.188.007.26-.165.03-.07.077-.12.147-.15l.175-.07c.044-.018.085-.057.146-.032.003.05-.01.11.014.145.042.062.044.125.047.193.002.049.017.098.026.147.029-.034.039-.065.05-.097.142-.39.277-.782.428-1.17.1-.256.22-.504.33-.756.013-.03.013-.067.03-.092V3.81zm3.987-.34c0 .045.01.084.021.123.042.16.094.318.124.48.024.133.023.27.028.406 0 .033-.019.067-.032.11-.094-.058-.047-.158-.106-.215h-.125c-.015.072-.01.152-.046.2-.066.085-.155.154-.236.227-.043.038-.078.018-.103-.025l-.046-.087c-.065.035-.117.069-.172.093-.116.051-.235.095-.35.147-.085.038-.09.053-.07.147.014.075.034.148.047.223.013.072.05.109.123.124.233.05.462.115.657.265.058-.102.058-.102.168-.151.03-.014.06-.03.092-.042.08-.03.115-.017.15.06.023.048.041.098.066.158.06-.14-.042-.267.017-.416.157.18.24.39.375.567a.235.235 0 00.022-.098c.002-.124 0-.247.002-.371 0-.034.013-.067.02-.1l.032-.003c.11.155.13.354.226.52a3.036 3.036 0 00-.01-.392c-.004-.045 0-.074.05-.088.08.036.116.14.215.158-.03-.275-.423-1.137-.798-1.635-.114-.127-.2-.28-.34-.386zm-2.667.696c-.019.034-.03.05-.037.067-.061.185-.125.37-.18.556-.031.105-.087.169-.195.19-.09.019-.178.052-.268.073-.038.009-.089.015-.118-.003-.024-.016-.025-.069-.036-.106-.064.076-.082.087-.17.047-.133-.062-.262-.135-.393-.201-.048-.025-.093-.063-.17-.03-.043.12-.091.25-.137.382-.099.28-.087.242.095.453.046.048.102.03.154.023.054-.009.106-.03.16-.036.13-.013.26-.08.367-.015.204-.064.387-.122.571-.178.05-.015.089.005.114.054.022.042.034.093.082.121.038-.056-.013-.128.063-.178l.14.241-.042-1.46zm.278.358c-.096-.01-.107.01-.11.108-.002.038-.003.078.002.115.03.2.099.386.174.57.002.006.012.01.022.015l.078-.05c.052.036.081.088.153.088.205-.002.41.014.616.012.099-.001.158.042.205.12.018.03.024.077.088.066l-.08-.394c-.05-.195-.085-.395-.172-.589-.057.057-.114.068-.18.046a.72.72 0 00-.135-.028c-.22-.028-.44-.059-.66-.08zm10.254-1.727c.089.163.155.316.139.491-.016.168.026.342-.044.516-.047-.033-.088-.082-.112-.075-.117.035-.164-.057-.227-.115a4.772 4.772 0 01-.286-.29l-.104-.113a4.856 4.856 0 01-.023.019c.035.046.07.093.11.156.04.064.084.127.122.193.034.058.065.118.031.205-.082-.01-.164-.019-.246-.032-.06-.01-.101 0-.124.07-.031.098-.037.096-.15.09.02.042.036.08.057.116.041.074.03.138-.03.196-.06.06-.118.122-.178.181a.175.175 0 01-.185.046c-.222-.061-.447-.113-.67-.174-.032-.009-.063-.04-.086-.068-.03-.04-.052-.087-.08-.13-.044-.07-.09-.138-.136-.207a.18.18 0 00-.014.105c.012.127.03.253.035.38.005.1-.024.12-.121.104-.104-.017-.206-.04-.31-.058-.064-.012-.131-.028-.202.03l.081.208c.09 0 .166-.01.237.002a.819.819 0 01.458.251c.078.083.154.168.241.26l.018-.005c-.004-.006-.008-.013-.01-.04.014-.056-.062-.118.018-.178.031.03.064.057.088.09.058.078.111.159.169.257l.089.141.024-.013a2093.819 2093.819 0 01-.427-.934c.055.007.083.007.108.016.193.07.385.142.577.216.074.028.147.06.219.094.062.028.112.018.157-.033.05-.056.102-.112.154-.167.05-.051.095-.046.132.014.016.025.026.053.04.08.071.138.143.277.217.433l.159.308.025-.011c-.044-.106-.07-.218-.138-.334-.057-.182-.168-.346-.206-.545.136.034.362.326.567.732l.057.074.018-.011a1.563 1.563 0 01-.052-.127c-.046-.145-.097-.29-.136-.436-.022-.083-.036-.173.022-.26l.109.058-.026-.207.027-.016c.022.02.05.036.065.06.073.108.143.22.215.33.01.016.029.029.043.043-.036-.217-.2-.38-.229-.626l.155.112c.014-.166.012-.319.042-.465.032-.158-.023-.297-.063-.445.024.004.036.006.055.025.092.124.183.249.277.371.02.027.05.047.069.087l.04.063.019-.015a.293.293 0 01-.053-.082 27.922 27.922 0 01-.332-.49c-.221-.311-.363-.467-.485-.521zm-6.57.327c-.003.161.092.275.069.415l-.368.087c.09.139.032.237-.052.331-.05.057-.092.122-.143.178-.037.04-.046.078-.018.126l.16.275c.029.048.072.066.128.064.076-.003.152 0 .228-.001.116-.003.216.022.275.137.006.014.02.024.044.052.004-.059-.003-.098.01-.13.016-.04.04-.099.072-.108.084-.023.173-.024.26-.03.013-.001.027.018.04.029l.071.065c.019-.11-.082-.198-.024-.31l.126.04c-.026-.123-.07-.245-.071-.366 0-.123.051-.243.115-.36.107.062.16.156.234.253.183.265.36.533.494.834.165-.078.27.068.407.088-.003-.106-.133-.441-.197-.492a.142.142 0 00-.102-.028c-.06.011-.119.039-.191.063-.025-.039-.056-.078-.077-.122a3.936 3.936 0 00-.473-.783c-.076-.094-.16-.182-.228-.26l-.391.285c-.049.035-.094.03-.132-.017l-.169-.207c-.025-.03-.053-.059-.097-.108z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/nousresearch.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/nousresearch.svg
new file mode 100644
index 0000000000..470bdcb9f8
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/nousresearch.svg
@@ -0,0 +1 @@
+<svg fill="#1d1d1f" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M5.938 12.835c.127-.039.285.02.373.143.028.038.036.092.046.14.003.014-.02.033-.04.05-.124-.098-.24-.194-.354-.291-.011-.01-.016-.027-.025-.042zM8.396 9.412c.195-.032.39-.06.588-.05a.54.54 0 01.148.026c.202.071.402.147.601.224.028.01.05.036.075.055l-.013.027a9.203 9.203 0 01-.26-.089c-.115-.038-.213-.077-.315-.098-.25-.05-.25-.046-.292-.014l.574.144c.275.139.55.276.823.417.042.022.09.057.107.098.026.06.063.076.117.072.066-.006.132-.017.213-.027l-.04.086c.051.08.142.02.216.064-.074.13-.247.09-.334.199l.061.074-.12.087c0 .106-.038.168-.306.243l.026.085-.196.042.07.124h-.25l-.007.137c-.081-.01-.161-.018-.244-.027l-.053.123c-.027-.008-.052-.011-.073-.023-.067-.038-.128-.056-.195.006-.019.017-.063.014-.093.008-.026-.006-.05-.029-.07-.042-.11.095-.11.095-.208.003-.057.046-.12.074-.186.011-.063.027-.123-.02-.178-.014-.07.007-.097-.035-.133-.07l-.13.033c-.013-.236-.194-.19-.34-.203.005-.072.05-.092.095-.094a.474.474 0 01.159.022c.164.05.32.12.496.138.203.021.405.029.601-.015.265-.059.52-.149.707-.365.049-.056.083-.127.117-.195.019-.038.02-.084-.02-.116a1.397 1.397 0 00-.382-.217c.024.12-.031.182-.115.221 0 .014-.004.025 0 .03.08.115.084.16-.007.267a1.39 1.39 0 01-.218.211.477.477 0 01-.641-.05 1.36 1.36 0 01-.133-.152c-.078-.107-.076-.108-.033-.236-.165-.08-.128-.226-.104-.364.008-.05.028-.096.049-.163-.04.014-.067.017-.087.032a.897.897 0 00-.316.357c-.007.016-.01.034-.02.047-.012.015-.034.038-.045.035-.02-.006-.037-.027-.05-.045-.008-.012-.007-.032-.012-.057h-.126l.053-.172a14.82 14.82 0 00-.039-.049l.11-.284c-.06.026-.091.044-.124.051-.03.007-.064 0-.095 0 0-.031-.01-.07.004-.092.149-.22.305-.428.593-.476z"></path><path d="M8.06 10.788c-.003-.038-.004-.075.037-.062.016.006.034.048.028.067-.01.04-.038.032-.064-.005z"></path><path clip-rule="evenodd" d="M11.981.009c.226-.012.453-.011.679 0 .247.01.495.024.74.062.401.064.798.157 1.19.273.463.138.92.299 1.356.511a7.31 7.31 0 012.948 2.642c.292.469.536.963.739 1.479.219.556.446 1.11.623 1.683.204.654.329 1.326.458 1.997.097.504.182 1.01.29 1.511.156.722.329 1.44.494 2.16.186.812.4 1.615.63 2.415.102.355.193.713.282 1.072.11.436.202.876.254 1.323.031.278.066.557.073.837a7.56 7.56 0 01-.017.88c-.037.413-.1.818-.226 1.212a5.017 5.017 0 01-.915 1.649l-.13.156.018.023c.043-.023.088-.041.127-.068.2-.138.373-.307.531-.49.4-.46.721-.973.975-1.529a3.59 3.59 0 00.325-1.72c-.024-.424-.097-.834-.3-1.213-.013-.027-.015-.06-.03-.121.05.035.082.048.101.072.107.13.22.258.315.398.33.494.46 1.052.486 1.64a3.75 3.75 0 01-.47 1.97c-.36.655-.887 1.14-1.526 1.506-.193.111-.394.21-.595.308-.157.078-.248.211-.318.365a.522.522 0 00-.033.406.359.359 0 01.013.139c-.005.077-.077.155-.14.162-.054.006-.125-.043-.15-.116a1.206 1.206 0 01-.06-.233c-.04-.314-.155-.6-.308-.87a3.906 3.906 0 00-.73-.91 2.129 2.129 0 00-.897-.524 4.093 4.093 0 00-.692-.131c-.075-.008-.15-.04-.22.01.18.06.363.11.538.18.434.173.82.43 1.18.728.308.255.58.543.794.884.098.155.186.315.227.496.027.123.042.25.067.375.013.062-.002.109-.053.144-.047.033-.122.034-.163-.01a.455.455 0 01-.08-.14c-.03-.073-.038-.159-.078-.225a7.314 7.314 0 00-1.423-1.664c-.16-.137-.329-.26-.537-.323-.376-.114-.753-.203-1.15-.154-.213.025-.427.032-.64.053a1.6 1.6 0 00-.736.278 5.14 5.14 0 00-.834.72c-.329.342-.642.699-.955 1.055-.136.155-.264.319-.314.531a5.227 5.227 0 00-.012.051.096.096 0 01-.09.076h-.31c-.046 0-.082-.048-.072-.094.023-.108.045-.216.07-.324.075-.325.19-.635.368-.917.024-.039.04-.088.104-.08l.01.049.027.077c.28-.435.571-.834.996-1.135.283-.204.584-.378.89-.55a.196.196 0 00-.098-.002c-.162.043-.325.084-.485.134-.402.124-.764.33-1.11.566-.147.1-.298.193-.414.333a7.314 7.314 0 00-1.07 1.767.845.845 0 00-.04.12.075.075 0 01-.072.056h-.494c-.04 0-.062-.051-.036-.082.123-.14.246-.282.377-.415.275-.281.58-.532.777-.884.027-.048.063-.09.095-.135.238-.333.54-.607.818-.902.082-.086.175-.16.26-.24.029-.027.053-.057.079-.085l-.018-.025-.135.041c-.034.017-.07.031-.102.05-.248.144-.494.292-.743.433-.408.23-.825.439-1.209.711-.281.2-.591.358-.889.533-.02.012-.044.015-.08.028-.015-.135.143-.201.108-.336-.033.014-.064.02-.085.038-.111.096-.227.19-.328.296-.148.157-.284.325-.425.488-.125.143-.25.286-.373.431A.153.153 0 019.89 24H8.762a.316.316 0 00.016-.042c.028-.09.085-.172.083-.28-.091-.018-.162.001-.212.077a4.45 4.45 0 00-.136.215c-.01.016-.024.03-.042.03h-.093c-.019 0-.029-.022-.017-.037.071-.088.14-.178.209-.268.001-.002-.006-.012-.012-.024-.014.004-.03.006-.045.013-.176.09-.352.181-.527.274a.363.363 0 01-.168.042H5.202c-.026 0-.039-.036-.019-.053.21-.178.402-.374.558-.605.335-.496.538-1.047.667-1.629.004-.02-.003-.043-.006-.091-.037.048-.059.072-.076.1a1.943 1.943 0 01-.334.415c-.28.258-.59.448-.983.464-.297.012-.588 0-.865-.127-.46-.21-.722-.57-.794-1.072-.025-.17-.017-.171-.182-.219A3.513 3.513 0 011.97 20.6a2.286 2.286 0 01-.808-1.13 3.569 3.569 0 01-.16-1.245c.002-.034.016-.067.024-.1.032.023.046.043.05.066.033.153.059.308.096.46.086.355.257.664.516.92.258.256.571.419.91.532.358.118.717.138 1.07-.016a1.89 1.89 0 00.621-.452c.328-.348.533-.76.648-1.223.009-.034.005-.071.007-.11-.015.006-.026.006-.03.011-.031.05-.064.1-.093.152-.284.502-.679.887-1.196 1.135-.351.17-.718.255-1.11.159a1.607 1.607 0 01-.971-.64 2.006 2.006 0 01-.368-.924 2.903 2.903 0 01.02-.886c.05-.439.466-1.17.742-1.271-.02.063-.035.112-.053.16-.043.116-.097.227-.13.345a1.901 1.901 0 00-.05.82c.033.212.09.416.204.6.147.236.346.407.62.465.11.023.225.014.338.018a.576.576 0 00.386-.131c.164-.128.282-.292.366-.481.168-.375.24-.777.309-1.179.05-.296.093-.594.133-.893.039-.281.071-.563.104-.845.026-.232.048-.464.074-.696.024-.228.052-.455.076-.683.024-.227.047-.455.069-.683.013-.14.022-.28.034-.42l.037-.417c.022-.25.041-.5.065-.748.008-.082-.02-.132-.09-.177a2.46 2.46 0 01-.492-.418c-.1-.109-.188-.228-.282-.342-.035-.042-.056-.097-.116-.118a2.084 2.084 0 00.275.597c.06.092.131.176.196.265.063.086.182.115.234.226-.028.003-.046.01-.06.006a4.74 4.74 0 01-.22-.057 2.71 2.71 0 01-1.287-.819c-.435-.487-.656-1.076-.71-1.723a5.206 5.206 0 01.014-1.06c.072-.602.22-1.186.45-1.745.155-.376.338-.741.526-1.102.205-.393.466-.75.765-1.076.512-.559 1.104-1.024 1.726-1.448.717-.49 1.478-.898 2.277-1.233C8.244.828 8.767.632 9.31.494c.655-.166 1.31-.33 1.982-.415.229-.03.458-.058.688-.07zm-1.847 22.82c-.07.06-.147.111-.207.18-.238.27-.464.549-.668.869l-.044.108a.177.177 0 00.093-.057c.174-.19.351-.378.519-.574.104-.122.195-.255.288-.386.024-.034.03-.08.046-.12l-.027-.02zm1.65-3.695a5.51 5.51 0 00-.653.593l-.37.386a.963.963 0 01-.377.25 1.372 1.372 0 01-.467.09c-.044 0-.087.006-.151.012.028.058.043.097.064.131.15.242.301.482.45.724.136.22.276.438.399.666.068.125.105.267.156.404.077.027.14-.018.202-.048.29-.135.579-.274.867-.412.213-.101.437-.186.636-.31.347-.215.68-.455 1.018-.685.015-.01.026-.028.042-.046-.023-.019-.038-.037-.056-.044-.287-.111-.527-.3-.77-.482a5.319 5.319 0 01-.506-.42 1.757 1.757 0 01-.41-.653c-.019-.049-.045-.095-.075-.156zm-5.847.264c-.06.096-.097.194-.132.293a3.38 3.38 0 01-.555 1.01c-.2.25-.455.412-.762.493-.23.06-.464.076-.7.07-.048-.002-.097.002-.158.005.016.04.021.066.035.085.1.145.23.246.4.295.157.046.316.034.498.023.181-.037.343-.115.485-.234.238-.199.402-.454.536-.732.175-.363.264-.751.342-1.144.01-.053.008-.11.011-.164zm14.945-4.586c.008.029.016.057.027.107.024.155.051.31.072.464.03.219.067.437.078.657.017.344.027.689-.014 1.033-.037.315-.063.633-.116.946a6.153 6.153 0 01-.46 1.518c-.008.018-.01.039-.02.082.047-.03.077-.042.098-.064.085-.083.17-.167.248-.255.271-.305.458-.66.596-1.043.18-.498.228-1.011.145-1.531-.103-.65-.33-1.263-.597-1.881a9.055 9.055 0 00-.024-.055l-.033.022zM5.797 8.29a.26.26 0 00.018.153c.124.251.25.501.379.75.025.049.066.09.03.163-.284.06-.578.119-.88.255.059.038.097.06.132.087.042.032.112.058.09.12-.01.033-.075.048-.117.072.017.01.043.021.067.036.166.102.33.207.447.368.138.192.229.404.188.644-.079.469-.306.85-.69 1.132-.054.04-.106.083-.161.122a.243.243 0 00-.103.245.77.77 0 00.055.195c.083.196.22.35.375.492.083.076.159.164.222.257a.37.37 0 01.025.377c-.023.05-.05.099-.076.148-.03.06-.028.111.022.162.041.042.08.089.112.138.038.058.078.079.147.05a.486.486 0 01.333-.006c.16.046.302.126.444.21.13.077.264.149.4.219.067.035.14.05.219.026.071-.022.124.01.145.076.02.064-.003.108-.074.139-.07.03-.137.063-.209.088-.1.035-.201.073-.314.077-.013-.107.11-.088.127-.159-.206-.126-.643-.145-.801-.034.063.112.035.21-.096.313-.13-.1-.025-.202.002-.3a.209.209 0 00-.249.17c-.015.101.067.216.178.224.108.007.218-.005.326-.012.06-.005.12-.027.199 0-.103.123-.248.127-.357.19.002.05.07.086.019.131-.053.048-.095-.001-.132-.03-.08-.063-.16-.126-.231-.197a.474.474 0 01-.157-.311.52.52 0 00-.043-.172c-.032-.074-.032-.137.033-.19-.018-.03-.028-.053-.045-.072a1.222 1.222 0 01-.196-.369c-.053-.137-.046-.264.048-.381.024-.03.05-.06.064-.095a.664.664 0 00.047-.168c.017-.165-.064-.287-.182-.387-.186-.156-.36-.322-.46-.551-.005-.011-.024-.017-.037-.026-.011.017-.024.027-.025.038-.019.185-.045.37-.052.557-.014.377.058.743.162 1.104.118.41.289.798.488 1.173.267.502.537 1.002.812 1.5.055.098.13.189.208.27.198.202.452.272.724.273.202 0 .404-.006.605-.026.295-.03.59-.073.884-.113.183-.025.365-.057.548-.08.21-.026.38.073.522.21.16.156.305.327.447.5.22.265.397.56.554.867.05.098.07.1.147.03.13-.121.26-.242.394-.36.067-.059.088-.12.067-.213a3.535 3.535 0 01-.085-.796c.002-.157.006-.314.018-.471.015-.224.03-.45.06-.672a59.114 59.114 0 01.362-2.298c.087-.493.182-.984.268-1.477.06-.347.118-.694.162-1.043.034-.273.055-.55.063-.825.011-.332.003-.665.002-.998 0-.077.004-.155-.01-.23-.028-.142-.01-.155-.162-.19a5.826 5.826 0 00-.607-.107c-.146-.018-.207-.053-.221-.19-.006-.049-.025-.098-.041-.146-.009-.025-.024-.048-.046-.09l-.025.264c-.009.096-.029.116-.127.115-.055 0-.11-.008-.164-.008-.476 0-.952-.008-1.426.032-.095.008-.173-.015-.226-.103-.04-.066-.088-.126-.134-.186-.063-.084-.086-.093-.182-.06-.195.068-.388.138-.582.21a2.71 2.71 0 00-.675.394.986.986 0 01-.323.168c-.033.01-.07.008-.127.013.02-.066.024-.114.047-.15.064-.105.135-.205.205-.306.023-.033.049-.063.073-.095l-.015-.023-.201.037c-.146.04-.296.07-.437.122-.148.053-.266.023-.386-.072a3.623 3.623 0 01-.733-.786l-.093-.132zm8.592 8.963l-.147.09c-.22.134-.44.266-.659.402-.093.058-.184.12-.27.188-.085.07-.124.161-.072.272.047.1.093.2.147.294.047.08.124.138.213.147.11.01.228.012.336-.012.217-.05.372-.205.528-.357a.291.291 0 00.087-.308c-.046-.18-.079-.365-.118-.547-.011-.052-.027-.103-.045-.169zm-.257-2.409c-.12.291-.205.597-.325.91-.151.433-.294.87-.435 1.323.036-.01.054-.01.067-.018.261-.16.522-.324.785-.484.054-.033.071-.078.065-.138-.012-.13-.024-.262-.034-.393l-.068-.886c-.008-.103-.02-.206-.029-.31-.009 0-.017-.002-.026-.004zm3.081-8.13l.099.285c.08.231.159.463.24.714l.58 1.952c.187.63.372 1.262.558 1.893.114.382.235.762.343 1.146.072.257.126.519.186.799.044.206.087.413.127.64.034.106.023.226.077.325l.025-.006-.068-.362c-.038-.206-.077-.412-.113-.638-.015-.07-.029-.141-.046-.211-.095-.396-.177-.796-.29-1.187-.196-.685-.413-1.364-.618-2.046-.165-.549-.322-1.1-.488-1.648-.069-.227-.15-.45-.226-.695l-.117-.336c-.037-.107-.075-.216-.115-.322-.04-.106-.084-.21-.127-.314a7.558 7.558 0 01-.027.01zM6.225 14.304c-.063-.001-.115.014-.134.083a.35.35 0 00.41.012 4.533 4.533 0 00-.276-.095zM5.23 11.98c-.026-.027-.057-.048-.075.002-.012.032-.007.07-.01.113.082-.037.082-.037.085-.115zm.062-1.189a.135.135 0 00-.088.056.197.197 0 00-.025.11c.005.152.01.306.026.457a.751.751 0 00.066.218c.061.136.157.167.288.101.055-.027.06-.054.025-.11a4.52 4.52 0 01-.129-.211c-.015-.068-.066-.131-.033-.207.04-.09-.076-.116-.074-.19V10.874c-.003-.038-.006-.087-.056-.083zm-.017-.968a.867.867 0 00-.467.127c-.076.045-.084.07-.05.158.034.087.07.173.115.254.064.117.09.125.21.077a.657.657 0 01.336-.053c.202.022.357.136.504.264l.092.077c.007-.006.014-.013.022-.018-.019-.105-.035-.226-.149-.264-.157-.053-.324-.075-.508-.117l-.24-.005c.24-.169.452-.044.687.009-.063-.115-.153-.147-.23-.193-.082-.05-.17-.092-.25-.144-.06-.037-.12-.08-.072-.172zm10.233.325c-.23-.01-.427.08-.608.211-.034.026-.06.065-.105.117.087.026.15.046.232.065.044-.015.088-.03.13-.046.306-.114.61-.115.904.031.126.063.237.04.366-.005-.02-.031-.03-.054-.045-.071a.986.986 0 00-.448-.273c-.14-.044-.284-.024-.426-.03zM7.99 6.483a.308.308 0 00.002.133c.08.321.156.643.242.962.104.387.27.75.456 1.103.02.037.061.08.098.087a.404.404 0 00.253-.051l-.472-.84c-.23-.448-.405-.92-.579-1.394zM10.397.497c-.2-.008-.405.004-.603.034-.236.035-.47.087-.7.152-.287.08-.569.18-.852.273-.04.013-.074.038-.11.058.028.014.05.018.07.014.287-.068.58-.085.873-.09.134-.002.269.009.402.025.19.024.382.048.57.09.456.104.874.3 1.265.556.464.306.888.66 1.257 1.078.205.232.395.475.56.739.17.274.315.561.449.856.273.601.456 1.232.6 1.876.04.173.07.348.1.524.017.104.065.167.17.19.122.028.2.105.22.251-.003.102-.06.174-.129.24a1.065 1.065 0 00-.268.358.164.164 0 00.083-.039c.08-.086.162-.172.235-.265a.56.56 0 00.13-.333c.009-.05.022-.1.024-.15.007-.124-.017-.15-.143-.168-.025-.004-.049-.014-.073-.015-.082-.007-.125-.063-.137-.131-.033-.198-.004-.355.247-.408.086-.018.174-.03.26-.042.158-.023.315-.053.473-.067.14-.012.19.033.226.167.008.029.018.057.021.087.019.179-.008.225-.141.288-.027.013-.055.024-.078.042a.148.148 0 00-.051.067c-.039.144.073.382.206.445l.673.32c.023.011.05.015.075.023l.018-.026c-.015-.008-.032-.013-.044-.024a2.27 2.27 0 00-.544-.32 4.898 4.898 0 00-.173-.075.203.203 0 01-.126-.191c-.003-.085.045-.154.128-.187l.059-.025c.099-.044.118-.076.112-.187a.384.384 0 00-.008-.063c-.067-.294-.123-.59-.205-.88a9.478 9.478 0 00-.826-2.036 7.465 7.465 0 00-1.39-1.805 4.536 4.536 0 00-1.177-.824 3.656 3.656 0 00-1.016-.328 6.155 6.155 0 00-.712-.074zm6.719 5.955c.01.014.018.028.038.034l-.022-.044-.016.01zM4.103 3.917a.062.062 0 01-.03.012.455.455 0 01-.04.039c-.01.01-.02.02-.045.04l-.363.354c-.088.085-.17.178-.266.253-.284.22-.425.53-.544.855a.132.132 0 00-.007.071c.013.055.033.108.052.168l.074.026c-.017.056-.03.105-.047.152-.058.164-.118.327-.175.491-.005.015.008.036.019.077.08-.175.158-.33.225-.489.228-.544.484-1.074.819-1.561.09-.133.182-.266.283-.401.004-.006.007-.013.022-.03.001-.016.003-.032.015-.04l.008-.017zm12.976 2.408a.023.023 0 01.009.019.073.073 0 00-.006.01.188.188 0 00.007.02l.018.022c.002-.007.007-.016.005-.021-.003-.01-.012-.018-.02-.038a1.331 1.331 0 01-.013-.012zM4.199 4.48c-.003.004-.008.008-.027.014-.005.013-.011.025-.031.047a2.085 2.085 0 01-.124.167c-.048.07-.116.055-.181.041-.134-.028-.228.016-.287.143-.089.187-.187.37-.273.56-.049.108-.11.216-.118.36.081.003.154.007.228.008h.228a2.563 2.563 0 01-.079.264c-.01.052-.022.103-.033.155l.02.004c.018-.046.037-.092.067-.153.066-.142.13-.285.2-.426.02-.04.034-.1.116-.092 0 .043.004.084 0 .124-.005.045-.017.09-.028.143.141.043.086.174.115.269.102-.022.104-.195.248-.144v.205l.017.002.439-1.059c-.13 0-.246-.02-.358.033-.024.011-.058-.001-.108-.004.075-.15.139-.278.211-.417a.128.128 0 01.025-.036c0-.015-.001-.03.008-.038l.006-.02c-.005.006-.01.011-.028.017-.004.012-.009.024-.026.045a.085.085 0 01-.032.033c-.123.157-.09.164-.258.106-.079-.027-.078-.028-.047-.144.028-.046.056-.093.098-.15 0-.016-.001-.032.007-.042L4.2 4.48zm2.073-.67c-.003.006-.007.011-.027.016-.094.125-.194.246-.28.377-.155.238-.301.481-.451.723-.14.224-.345.368-.575.481-.017.008-.04.006-.079.011.012-.059.016-.109.033-.153a6.076 6.076 0 01.229-.518l-.007-.02a.138.138 0 01-.035.025c-.028.05-.055.1-.093.164-.26.424-.443.817-.442.95.024.004.048.011.073.013.177.013.188.007.26-.165.03-.07.077-.12.147-.15l.175-.07c.044-.018.085-.057.146-.032.003.05-.01.11.014.145.042.062.044.125.047.193.002.049.017.098.026.147.029-.034.039-.065.05-.097.142-.39.277-.782.428-1.17.1-.256.22-.504.33-.756.013-.03.013-.067.03-.092V3.81zm3.987-.34c0 .045.01.084.021.123.042.16.094.318.124.48.024.133.023.27.028.406 0 .033-.019.067-.032.11-.094-.058-.047-.158-.106-.215h-.125c-.015.072-.01.152-.046.2-.066.085-.155.154-.236.227-.043.038-.078.018-.103-.025l-.046-.087c-.065.035-.117.069-.172.093-.116.051-.235.095-.35.147-.085.038-.09.053-.07.147.014.075.034.148.047.223.013.072.05.109.123.124.233.05.462.115.657.265.058-.102.058-.102.168-.151.03-.014.06-.03.092-.042.08-.03.115-.017.15.06.023.048.041.098.066.158.06-.14-.042-.267.017-.416.157.18.24.39.375.567a.235.235 0 00.022-.098c.002-.124 0-.247.002-.371 0-.034.013-.067.02-.1l.032-.003c.11.155.13.354.226.52a3.036 3.036 0 00-.01-.392c-.004-.045 0-.074.05-.088.08.036.116.14.215.158-.03-.275-.423-1.137-.798-1.635-.114-.127-.2-.28-.34-.386zm-2.667.696c-.019.034-.03.05-.037.067-.061.185-.125.37-.18.556-.031.105-.087.169-.195.19-.09.019-.178.052-.268.073-.038.009-.089.015-.118-.003-.024-.016-.025-.069-.036-.106-.064.076-.082.087-.17.047-.133-.062-.262-.135-.393-.201-.048-.025-.093-.063-.17-.03-.043.12-.091.25-.137.382-.099.28-.087.242.095.453.046.048.102.03.154.023.054-.009.106-.03.16-.036.13-.013.26-.08.367-.015.204-.064.387-.122.571-.178.05-.015.089.005.114.054.022.042.034.093.082.121.038-.056-.013-.128.063-.178l.14.241-.042-1.46zm.278.358c-.096-.01-.107.01-.11.108-.002.038-.003.078.002.115.03.2.099.386.174.57.002.006.012.01.022.015l.078-.05c.052.036.081.088.153.088.205-.002.41.014.616.012.099-.001.158.042.205.12.018.03.024.077.088.066l-.08-.394c-.05-.195-.085-.395-.172-.589-.057.057-.114.068-.18.046a.72.72 0 00-.135-.028c-.22-.028-.44-.059-.66-.08zm10.254-1.727c.089.163.155.316.139.491-.016.168.026.342-.044.516-.047-.033-.088-.082-.112-.075-.117.035-.164-.057-.227-.115a4.772 4.772 0 01-.286-.29l-.104-.113a4.856 4.856 0 01-.023.019c.035.046.07.093.11.156.04.064.084.127.122.193.034.058.065.118.031.205-.082-.01-.164-.019-.246-.032-.06-.01-.101 0-.124.07-.031.098-.037.096-.15.09.02.042.036.08.057.116.041.074.03.138-.03.196-.06.06-.118.122-.178.181a.175.175 0 01-.185.046c-.222-.061-.447-.113-.67-.174-.032-.009-.063-.04-.086-.068-.03-.04-.052-.087-.08-.13-.044-.07-.09-.138-.136-.207a.18.18 0 00-.014.105c.012.127.03.253.035.38.005.1-.024.12-.121.104-.104-.017-.206-.04-.31-.058-.064-.012-.131-.028-.202.03l.081.208c.09 0 .166-.01.237.002a.819.819 0 01.458.251c.078.083.154.168.241.26l.018-.005c-.004-.006-.008-.013-.01-.04.014-.056-.062-.118.018-.178.031.03.064.057.088.09.058.078.111.159.169.257l.089.141.024-.013a2093.819 2093.819 0 01-.427-.934c.055.007.083.007.108.016.193.07.385.142.577.216.074.028.147.06.219.094.062.028.112.018.157-.033.05-.056.102-.112.154-.167.05-.051.095-.046.132.014.016.025.026.053.04.08.071.138.143.277.217.433l.159.308.025-.011c-.044-.106-.07-.218-.138-.334-.057-.182-.168-.346-.206-.545.136.034.362.326.567.732l.057.074.018-.011a1.563 1.563 0 01-.052-.127c-.046-.145-.097-.29-.136-.436-.022-.083-.036-.173.022-.26l.109.058-.026-.207.027-.016c.022.02.05.036.065.06.073.108.143.22.215.33.01.016.029.029.043.043-.036-.217-.2-.38-.229-.626l.155.112c.014-.166.012-.319.042-.465.032-.158-.023-.297-.063-.445.024.004.036.006.055.025.092.124.183.249.277.371.02.027.05.047.069.087l.04.063.019-.015a.293.293 0 01-.053-.082 27.922 27.922 0 01-.332-.49c-.221-.311-.363-.467-.485-.521zm-6.57.327c-.003.161.092.275.069.415l-.368.087c.09.139.032.237-.052.331-.05.057-.092.122-.143.178-.037.04-.046.078-.018.126l.16.275c.029.048.072.066.128.064.076-.003.152 0 .228-.001.116-.003.216.022.275.137.006.014.02.024.044.052.004-.059-.003-.098.01-.13.016-.04.04-.099.072-.108.084-.023.173-.024.26-.03.013-.001.027.018.04.029l.071.065c.019-.11-.082-.198-.024-.31l.126.04c-.026-.123-.07-.245-.071-.366 0-.123.051-.243.115-.36.107.062.16.156.234.253.183.265.36.533.494.834.165-.078.27.068.407.088-.003-.106-.133-.441-.197-.492a.142.142 0 00-.102-.028c-.06.011-.119.039-.191.063-.025-.039-.056-.078-.077-.122a3.936 3.936 0 00-.473-.783c-.076-.094-.16-.182-.228-.26l-.391.285c-.049.035-.094.03-.132-.017l-.169-.207c-.025-.03-.053-.059-.097-.108z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/novita-dark.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/novita-dark.svg
new file mode 100644
index 0000000000..fce8cc1659
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/novita-dark.svg
@@ -0,0 +1 @@
+<svg fill="#f5f5f7" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M9.167 4.17v5.665L0 19.003h9.167v-5.666l5.666 5.666H24L9.167 4.17z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/novita.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/novita.svg
new file mode 100644
index 0000000000..81b23dab2d
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/novita.svg
@@ -0,0 +1 @@
+<svg fill="#1d1d1f" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M9.167 4.17v5.665L0 19.003h9.167v-5.666l5.666 5.666H24L9.167 4.17z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/nvidia-dark.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/nvidia-dark.svg
new file mode 100644
index 0000000000..ded546dc85
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/nvidia-dark.svg
@@ -0,0 +1 @@
+<svg fill="#f5f5f7" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M10.212 8.976V7.62c.127-.01.256-.017.388-.021 3.596-.117 5.957 3.184 5.957 3.184s-2.548 3.647-5.282 3.647a3.227 3.227 0 01-1.063-.175v-4.109c1.4.174 1.681.812 2.523 2.258l1.873-1.627a4.905 4.905 0 00-3.67-1.846 6.594 6.594 0 00-.729.044m0-4.476v2.025c.13-.01.259-.019.388-.024 5.002-.174 8.261 4.226 8.261 4.226s-3.743 4.69-7.643 4.69c-.338 0-.675-.031-1.007-.092v1.25c.278.038.558.057.838.057 3.629 0 6.253-1.91 8.794-4.169.421.347 2.146 1.193 2.501 1.564-2.416 2.083-8.048 3.763-11.24 3.763-.308 0-.603-.02-.894-.048V19.5H24v-15H10.21zm0 9.756v1.068c-3.356-.616-4.287-4.21-4.287-4.21a7.173 7.173 0 014.287-2.138v1.172h-.005a3.182 3.182 0 00-2.502 1.178s.615 2.276 2.507 2.931m-5.961-3.3c1.436-1.935 3.604-3.148 5.961-3.336V6.523C5.81 6.887 2 10.723 2 10.723s2.158 6.427 8.21 7.015v-1.166C5.77 16 4.25 10.958 4.25 10.958h-.002z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/nvidia.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/nvidia.svg
new file mode 100644
index 0000000000..ec3d9b4983
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/nvidia.svg
@@ -0,0 +1 @@
+<svg fill="#1d1d1f" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M10.212 8.976V7.62c.127-.01.256-.017.388-.021 3.596-.117 5.957 3.184 5.957 3.184s-2.548 3.647-5.282 3.647a3.227 3.227 0 01-1.063-.175v-4.109c1.4.174 1.681.812 2.523 2.258l1.873-1.627a4.905 4.905 0 00-3.67-1.846 6.594 6.594 0 00-.729.044m0-4.476v2.025c.13-.01.259-.019.388-.024 5.002-.174 8.261 4.226 8.261 4.226s-3.743 4.69-7.643 4.69c-.338 0-.675-.031-1.007-.092v1.25c.278.038.558.057.838.057 3.629 0 6.253-1.91 8.794-4.169.421.347 2.146 1.193 2.501 1.564-2.416 2.083-8.048 3.763-11.24 3.763-.308 0-.603-.02-.894-.048V19.5H24v-15H10.21zm0 9.756v1.068c-3.356-.616-4.287-4.21-4.287-4.21a7.173 7.173 0 014.287-2.138v1.172h-.005a3.182 3.182 0 00-2.502 1.178s.615 2.276 2.507 2.931m-5.961-3.3c1.436-1.935 3.604-3.148 5.961-3.336V6.523C5.81 6.887 2 10.723 2 10.723s2.158 6.427 8.21 7.015v-1.166C5.77 16 4.25 10.958 4.25 10.958h-.002z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/ollama-dark.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/ollama-dark.svg
new file mode 100644
index 0000000000..ed9ee75e84
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/ollama-dark.svg
@@ -0,0 +1 @@
+<svg fill="#f5f5f7" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7.905 1.09c.216.085.411.225.588.41.295.306.544.744.734 1.263.191.522.315 1.1.362 1.68a5.054 5.054 0 012.049-.636l.051-.004c.87-.07 1.73.087 2.48.474.101.053.2.11.297.17.05-.569.172-1.134.36-1.644.19-.52.439-.957.733-1.264a1.67 1.67 0 01.589-.41c.257-.1.53-.118.796-.042.401.114.745.368 1.016.737.248.337.434.769.561 1.287.23.934.27 2.163.115 3.645l.053.04.026.019c.757.576 1.284 1.397 1.563 2.35.435 1.487.216 3.155-.534 4.088l-.018.021.002.003c.417.762.67 1.567.724 2.4l.002.03c.064 1.065-.2 2.137-.814 3.19l-.007.01.01.024c.472 1.157.62 2.322.438 3.486l-.006.039a.651.651 0 01-.747.536.648.648 0 01-.54-.742c.167-1.033.01-2.069-.48-3.123a.643.643 0 01.04-.617l.004-.006c.604-.924.854-1.83.8-2.72-.046-.779-.325-1.544-.8-2.273a.644.644 0 01.18-.886l.009-.006c.243-.159.467-.565.58-1.12a4.229 4.229 0 00-.095-1.974c-.205-.7-.58-1.284-1.105-1.683-.595-.454-1.383-.673-2.38-.61a.653.653 0 01-.632-.371c-.314-.665-.772-1.141-1.343-1.436a3.288 3.288 0 00-1.772-.332c-1.245.099-2.343.801-2.67 1.686a.652.652 0 01-.61.425c-1.067.002-1.893.252-2.497.703-.522.39-.878.935-1.066 1.588a4.07 4.07 0 00-.068 1.886c.112.558.331 1.02.582 1.269l.008.007c.212.207.257.53.109.785-.36.622-.629 1.549-.673 2.44-.05 1.018.186 1.902.719 2.536l.016.019a.643.643 0 01.095.69c-.576 1.236-.753 2.252-.562 3.052a.652.652 0 01-1.269.298c-.243-1.018-.078-2.184.473-3.498l.014-.035-.008-.012a4.339 4.339 0 01-.598-1.309l-.005-.019a5.764 5.764 0 01-.177-1.785c.044-.91.278-1.842.622-2.59l.012-.026-.002-.002c-.293-.418-.51-.953-.63-1.545l-.005-.024a5.352 5.352 0 01.093-2.49c.262-.915.777-1.701 1.536-2.269.06-.045.123-.09.186-.132-.159-1.493-.119-2.73.112-3.67.127-.518.314-.95.562-1.287.27-.368.614-.622 1.015-.737.266-.076.54-.059.797.042zm4.116 9.09c.936 0 1.8.313 2.446.855.63.527 1.005 1.235 1.005 1.94 0 .888-.406 1.58-1.133 2.022-.62.375-1.451.557-2.403.557-1.009 0-1.871-.259-2.493-.734-.617-.47-.963-1.13-.963-1.845 0-.707.398-1.417 1.056-1.946.668-.537 1.55-.849 2.485-.849zm0 .896a3.07 3.07 0 00-1.916.65c-.461.37-.722.835-.722 1.25 0 .428.21.829.61 1.134.455.347 1.124.548 1.943.548.799 0 1.473-.147 1.932-.426.463-.28.7-.686.7-1.257 0-.423-.246-.89-.683-1.256-.484-.405-1.14-.643-1.864-.643zm.662 1.21l.004.004c.12.151.095.37-.056.49l-.292.23v.446a.375.375 0 01-.376.373.375.375 0 01-.376-.373v-.46l-.271-.218a.347.347 0 01-.052-.49.353.353 0 01.494-.051l.215.172.22-.174a.353.353 0 01.49.051zm-5.04-1.919c.478 0 .867.39.867.871a.87.87 0 01-.868.871.87.87 0 01-.867-.87.87.87 0 01.867-.872zm8.706 0c.48 0 .868.39.868.871a.87.87 0 01-.868.871.87.87 0 01-.867-.87.87.87 0 01.867-.872zM7.44 2.3l-.003.002a.659.659 0 00-.285.238l-.005.006c-.138.189-.258.467-.348.832-.17.692-.216 1.631-.124 2.782.43-.128.899-.208 1.404-.237l.01-.001.019-.034c.046-.082.095-.161.148-.239.123-.771.022-1.692-.253-2.444-.134-.364-.297-.65-.453-.813a.628.628 0 00-.107-.09L7.44 2.3zm9.174.04l-.002.001a.628.628 0 00-.107.09c-.156.163-.32.45-.453.814-.29.794-.387 1.776-.23 2.572l.058.097.008.014h.03a5.184 5.184 0 011.466.212c.086-1.124.038-2.043-.128-2.722-.09-.365-.21-.643-.349-.832l-.004-.006a.659.659 0 00-.285-.239h-.004z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/ollama.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/ollama.svg
new file mode 100644
index 0000000000..d917b8605f
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/ollama.svg
@@ -0,0 +1 @@
+<svg fill="#1d1d1f" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7.905 1.09c.216.085.411.225.588.41.295.306.544.744.734 1.263.191.522.315 1.1.362 1.68a5.054 5.054 0 012.049-.636l.051-.004c.87-.07 1.73.087 2.48.474.101.053.2.11.297.17.05-.569.172-1.134.36-1.644.19-.52.439-.957.733-1.264a1.67 1.67 0 01.589-.41c.257-.1.53-.118.796-.042.401.114.745.368 1.016.737.248.337.434.769.561 1.287.23.934.27 2.163.115 3.645l.053.04.026.019c.757.576 1.284 1.397 1.563 2.35.435 1.487.216 3.155-.534 4.088l-.018.021.002.003c.417.762.67 1.567.724 2.4l.002.03c.064 1.065-.2 2.137-.814 3.19l-.007.01.01.024c.472 1.157.62 2.322.438 3.486l-.006.039a.651.651 0 01-.747.536.648.648 0 01-.54-.742c.167-1.033.01-2.069-.48-3.123a.643.643 0 01.04-.617l.004-.006c.604-.924.854-1.83.8-2.72-.046-.779-.325-1.544-.8-2.273a.644.644 0 01.18-.886l.009-.006c.243-.159.467-.565.58-1.12a4.229 4.229 0 00-.095-1.974c-.205-.7-.58-1.284-1.105-1.683-.595-.454-1.383-.673-2.38-.61a.653.653 0 01-.632-.371c-.314-.665-.772-1.141-1.343-1.436a3.288 3.288 0 00-1.772-.332c-1.245.099-2.343.801-2.67 1.686a.652.652 0 01-.61.425c-1.067.002-1.893.252-2.497.703-.522.39-.878.935-1.066 1.588a4.07 4.07 0 00-.068 1.886c.112.558.331 1.02.582 1.269l.008.007c.212.207.257.53.109.785-.36.622-.629 1.549-.673 2.44-.05 1.018.186 1.902.719 2.536l.016.019a.643.643 0 01.095.69c-.576 1.236-.753 2.252-.562 3.052a.652.652 0 01-1.269.298c-.243-1.018-.078-2.184.473-3.498l.014-.035-.008-.012a4.339 4.339 0 01-.598-1.309l-.005-.019a5.764 5.764 0 01-.177-1.785c.044-.91.278-1.842.622-2.59l.012-.026-.002-.002c-.293-.418-.51-.953-.63-1.545l-.005-.024a5.352 5.352 0 01.093-2.49c.262-.915.777-1.701 1.536-2.269.06-.045.123-.09.186-.132-.159-1.493-.119-2.73.112-3.67.127-.518.314-.95.562-1.287.27-.368.614-.622 1.015-.737.266-.076.54-.059.797.042zm4.116 9.09c.936 0 1.8.313 2.446.855.63.527 1.005 1.235 1.005 1.94 0 .888-.406 1.58-1.133 2.022-.62.375-1.451.557-2.403.557-1.009 0-1.871-.259-2.493-.734-.617-.47-.963-1.13-.963-1.845 0-.707.398-1.417 1.056-1.946.668-.537 1.55-.849 2.485-.849zm0 .896a3.07 3.07 0 00-1.916.65c-.461.37-.722.835-.722 1.25 0 .428.21.829.61 1.134.455.347 1.124.548 1.943.548.799 0 1.473-.147 1.932-.426.463-.28.7-.686.7-1.257 0-.423-.246-.89-.683-1.256-.484-.405-1.14-.643-1.864-.643zm.662 1.21l.004.004c.12.151.095.37-.056.49l-.292.23v.446a.375.375 0 01-.376.373.375.375 0 01-.376-.373v-.46l-.271-.218a.347.347 0 01-.052-.49.353.353 0 01.494-.051l.215.172.22-.174a.353.353 0 01.49.051zm-5.04-1.919c.478 0 .867.39.867.871a.87.87 0 01-.868.871.87.87 0 01-.867-.87.87.87 0 01.867-.872zm8.706 0c.48 0 .868.39.868.871a.87.87 0 01-.868.871.87.87 0 01-.867-.87.87.87 0 01.867-.872zM7.44 2.3l-.003.002a.659.659 0 00-.285.238l-.005.006c-.138.189-.258.467-.348.832-.17.692-.216 1.631-.124 2.782.43-.128.899-.208 1.404-.237l.01-.001.019-.034c.046-.082.095-.161.148-.239.123-.771.022-1.692-.253-2.444-.134-.364-.297-.65-.453-.813a.628.628 0 00-.107-.09L7.44 2.3zm9.174.04l-.002.001a.628.628 0 00-.107.09c-.156.163-.32.45-.453.814-.29.794-.387 1.776-.23 2.572l.058.097.008.014h.03a5.184 5.184 0 011.466.212c.086-1.124.038-2.043-.128-2.722-.09-.365-.21-.643-.349-.832l-.004-.006a.659.659 0 00-.285-.239h-.004z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/opencode-dark.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/opencode-dark.svg
new file mode 100644
index 0000000000..a1ed93d323
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/opencode-dark.svg
@@ -0,0 +1 @@
+<svg fill="#f5f5f7" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M16 6H8v12h8V6zm4 16H4V2h16v20z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/opencode.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/opencode.svg
new file mode 100644
index 0000000000..779c1a49be
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/opencode.svg
@@ -0,0 +1 @@
+<svg fill="#1d1d1f" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M16 6H8v12h8V6zm4 16H4V2h16v20z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/openrouter-dark.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/openrouter-dark.svg
new file mode 100644
index 0000000000..0a79c1b7aa
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/openrouter-dark.svg
@@ -0,0 +1 @@
+<svg fill="#f5f5f7" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M18.654 3.87a5.087 5.087 0 110 10.174L23.7 19.09c.64.641.187 1.737-.72 1.737H8.48a8.479 8.479 0 010-16.958h10.175zM8.479 7.26a5.087 5.087 0 100 10.176 5.087 5.087 0 000-10.175z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/openrouter.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/openrouter.svg
new file mode 100644
index 0000000000..294fae0e4f
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/openrouter.svg
@@ -0,0 +1 @@
+<svg fill="#1d1d1f" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M18.654 3.87a5.087 5.087 0 110 10.174L23.7 19.09c.64.641.187 1.737-.72 1.737H8.48a8.479 8.479 0 010-16.958h10.175zM8.479 7.26a5.087 5.087 0 100 10.176 5.087 5.087 0 000-10.175z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/qwen-dark.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/qwen-dark.svg
new file mode 100644
index 0000000000..0ceca5de83
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/qwen-dark.svg
@@ -0,0 +1 @@
+<svg fill="#f5f5f7" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M19.713 2.825h-5.907c0-.251-.066-.503-.196-.728L12.819.728A1.46 1.46 0 0 0 11.559 0h-1.58c-.52 0-1 .275-1.26.728l-2.42 4.19a1.45 1.45 0 0 0 0 1.453l.791 1.37c.26.448.74.727 1.26.727h11.36c.52 0 1-.275 1.26-.728l.79-1.37a1.45 1.45 0 0 0 0-1.451l-.79-1.37a1.46 1.46 0 0 0-1.26-.728zM.195 9.905l2.951 5.115a1.46 1.46 0 0 0-.531.531l-.791 1.37a1.45 1.45 0 0 0 0 1.452l.79 1.37c.26.448.74.727 1.26.727h4.84c.52 0 1-.275 1.26-.728l.79-1.37a1.45 1.45 0 0 0 0-1.451L5.086 7.083a1.46 1.46 0 0 0-1.26-.728h-1.58c-.52 0-1 .276-1.26.728l-.79 1.37a1.45 1.45 0 0 0 0 1.452m15.888 13.367 2.951-5.115c.217.125.469.196.728.196h1.582c.52 0 1-.275 1.26-.728l.79-1.37a1.45 1.45 0 0 0 0-1.451l-2.42-4.191a1.46 1.46 0 0 0-1.259-.728h-1.582c-.52 0-1 .276-1.259.728l-5.678 9.838a1.45 1.45 0 0 0 0 1.452l.79 1.37c.26.448.74.727 1.26.727h1.582c.52 0 1-.275 1.26-.728z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/qwen.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/qwen.svg
new file mode 100644
index 0000000000..6248bbf9ff
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/qwen.svg
@@ -0,0 +1 @@
+<svg fill="#1d1d1f" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M19.713 2.825h-5.907c0-.251-.066-.503-.196-.728L12.819.728A1.46 1.46 0 0 0 11.559 0h-1.58c-.52 0-1 .275-1.26.728l-2.42 4.19a1.45 1.45 0 0 0 0 1.453l.791 1.37c.26.448.74.727 1.26.727h11.36c.52 0 1-.275 1.26-.728l.79-1.37a1.45 1.45 0 0 0 0-1.451l-.79-1.37a1.46 1.46 0 0 0-1.26-.728zM.195 9.905l2.951 5.115a1.46 1.46 0 0 0-.531.531l-.791 1.37a1.45 1.45 0 0 0 0 1.452l.79 1.37c.26.448.74.727 1.26.727h4.84c.52 0 1-.275 1.26-.728l.79-1.37a1.45 1.45 0 0 0 0-1.451L5.086 7.083a1.46 1.46 0 0 0-1.26-.728h-1.58c-.52 0-1 .276-1.26.728l-.79 1.37a1.45 1.45 0 0 0 0 1.452m15.888 13.367 2.951-5.115c.217.125.469.196.728.196h1.582c.52 0 1-.275 1.26-.728l.79-1.37a1.45 1.45 0 0 0 0-1.451l-2.42-4.191a1.46 1.46 0 0 0-1.259-.728h-1.582c-.52 0-1 .276-1.259.728l-5.678 9.838a1.45 1.45 0 0 0 0 1.452l.79 1.37c.26.448.74.727 1.26.727h1.582c.52 0 1-.275 1.26-.728z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/stepfun-dark.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/stepfun-dark.svg
new file mode 100644
index 0000000000..8d95dfffc3
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/stepfun-dark.svg
@@ -0,0 +1 @@
+<svg fill="#f5f5f7" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M12 0C5.372 0 0 5.372 0 12s5.372 12 12 12 12-5.372 12-12S18.628 0 12 0zM8.762 19.614H4.376v-4.386h4.386v4.386zm5.423 0H9.798v-4.386h4.387v4.386zm0-5.42H9.798V9.81h4.387v4.386zm0-5.418H9.798V4.39h4.387v4.386zm5.422-.004h-4.386V4.386h4.386v4.386z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/stepfun.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/stepfun.svg
new file mode 100644
index 0000000000..5ed27e8368
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/stepfun.svg
@@ -0,0 +1 @@
+<svg fill="#1d1d1f" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M12 0C5.372 0 0 5.372 0 12s5.372 12 12 12 12-5.372 12-12S18.628 0 12 0zM8.762 19.614H4.376v-4.386h4.386v4.386zm5.423 0H9.798v-4.386h4.387v4.386zm0-5.42H9.798V9.81h4.387v4.386zm0-5.418H9.798V4.39h4.387v4.386zm5.422-.004h-4.386V4.386h4.386v4.386z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/tencent-dark.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/tencent-dark.svg
new file mode 100644
index 0000000000..245b6265f5
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/tencent-dark.svg
@@ -0,0 +1 @@
+<svg fill="#f5f5f7" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M9.976 1L24 9.8l-10.587.015L10.723 23H5.489L8.18 9.8H3.244L1 5.4h8.077L9.976 1z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/tencent.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/tencent.svg
new file mode 100644
index 0000000000..590bbd8360
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/tencent.svg
@@ -0,0 +1 @@
+<svg fill="#1d1d1f" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M9.976 1L24 9.8l-10.587.015L10.723 23H5.489L8.18 9.8H3.244L1 5.4h8.077L9.976 1z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/upstage-dark.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/upstage-dark.svg
new file mode 100644
index 0000000000..f0064ba50a
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/upstage-dark.svg
@@ -0,0 +1 @@
+<svg fill="#f5f5f7" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M19.763 0l-.373 1.297h2.594L22.354 0h-2.591z"></path><path d="M16.192 2.27l-.376 1.298h5.52l.37-1.298h-5.514z"></path><path d="M12.897 4.54l-.377 1.298h8.167l.37-1.297h-8.16z"></path><path d="M2.85 6.81l-.377 1.298h17.565l.37-1.297H2.85z"></path><path d="M3.884 9.081l-.376 1.297H19.39l.37-1.297H3.883z"></path><path d="M4.088 24l.376-1.297H1.866L1.5 24h2.588z"></path><path d="M7.662 21.73l.376-1.298H2.515L2.15 21.73h5.513z"></path><path d="M10.957 19.46l.377-1.298h-8.17l-.367 1.297h8.16z"></path><path d="M21.005 17.19l.376-1.298H3.812l-.366 1.297h17.559z"></path><path d="M19.967 14.919l.376-1.297H4.461l-.366 1.297h15.872z"></path><path d="M18.787 12.649l.376-1.298H4.26l-.366 1.298h14.893z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/upstage.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/upstage.svg
new file mode 100644
index 0000000000..788706ef77
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/upstage.svg
@@ -0,0 +1 @@
+<svg fill="#1d1d1f" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M19.763 0l-.373 1.297h2.594L22.354 0h-2.591z"></path><path d="M16.192 2.27l-.376 1.298h5.52l.37-1.298h-5.514z"></path><path d="M12.897 4.54l-.377 1.298h8.167l.37-1.297h-8.16z"></path><path d="M2.85 6.81l-.377 1.298h17.565l.37-1.297H2.85z"></path><path d="M3.884 9.081l-.376 1.297H19.39l.37-1.297H3.883z"></path><path d="M4.088 24l.376-1.297H1.866L1.5 24h2.588z"></path><path d="M7.662 21.73l.376-1.298H2.515L2.15 21.73h5.513z"></path><path d="M10.957 19.46l.377-1.298h-8.17l-.367 1.297h8.16z"></path><path d="M21.005 17.19l.376-1.298H3.812l-.366 1.297h17.559z"></path><path d="M19.967 14.919l.376-1.297H4.461l-.366 1.297h15.872z"></path><path d="M18.787 12.649l.376-1.298H4.26l-.366 1.298h14.893z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/vercel-dark.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/vercel-dark.svg
new file mode 100644
index 0000000000..8245da71bf
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/vercel-dark.svg
@@ -0,0 +1 @@
+<svg fill="#f5f5f7" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M12 0l12 20.785H0L12 0z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/vercel.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/vercel.svg
new file mode 100644
index 0000000000..24f967db61
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/vercel.svg
@@ -0,0 +1 @@
+<svg fill="#1d1d1f" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M12 0l12 20.785H0L12 0z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/vertexai-dark.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/vertexai-dark.svg
new file mode 100644
index 0000000000..fe918f7539
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/vertexai-dark.svg
@@ -0,0 +1 @@
+<svg fill="#f5f5f7" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M11.995 20.216a1.892 1.892 0 100 3.785 1.892 1.892 0 000-3.785zm0 2.806a.927.927 0 11.927-.914.914.914 0 01-.927.914z"></path><path clip-rule="evenodd" d="M21.687 14.144c.237.038.452.16.605.344a.978.978 0 01-.18 1.3l-8.24 6.082a1.892 1.892 0 00-1.147-1.508l8.28-6.08a.991.991 0 01.682-.138z"></path><path clip-rule="evenodd" d="M10.122 21.842l-8.217-6.066a.952.952 0 01-.206-1.287.978.978 0 011.287-.206l8.28 6.08a1.893 1.893 0 00-1.144 1.479z"></path><path d="M4.273 4.475a.978.978 0 01-.965-.965V1.09a.978.978 0 111.943 0v2.42a.978.978 0 01-.978.965zM4.247 13.034a.978.978 0 100-1.956.978.978 0 000 1.956zM4.247 10.19a.978.978 0 100-1.956.978.978 0 000 1.956zM4.247 7.332a.978.978 0 100-1.956.978.978 0 000 1.956z"></path><path d="M19.718 7.307a.978.978 0 01-.965-.979v-2.42a.965.965 0 011.93 0v2.42a.964.964 0 01-.965.979zM19.743 13.047a.978.978 0 100-1.956.978.978 0 000 1.956zM19.743 10.151a.978.978 0 100-1.956.978.978 0 000 1.956zM19.743 2.068a.978.978 0 100-1.956.978.978 0 000 1.956z"></path><path d="M11.995 15.917a.978.978 0 01-.965-.965v-2.459a.978.978 0 011.943 0v2.433a.976.976 0 01-.978.991zM11.995 18.762a.978.978 0 100-1.956.978.978 0 000 1.956zM11.995 10.64a.978.978 0 100-1.956.978.978 0 000 1.956zM11.995 7.783a.978.978 0 100-1.956.978.978 0 000 1.956z"></path><path d="M15.856 10.177a.978.978 0 01-.965-.965v-2.42a.977.977 0 011.702-.763.979.979 0 01.241.763v2.42a.978.978 0 01-.978.965zM15.869 4.913a.978.978 0 100-1.956.978.978 0 000 1.956zM15.869 15.853a.978.978 0 100-1.956.978.978 0 000 1.956zM15.869 12.996a.978.978 0 100-1.956.978.978 0 000 1.956z"></path><path d="M8.121 15.853a.978.978 0 100-1.956.978.978 0 000 1.956zM8.121 7.783a.978.978 0 100-1.956.978.978 0 000 1.956zM8.121 4.913a.978.978 0 100-1.957.978.978 0 000 1.957zM8.134 12.996a.978.978 0 01-.978-.94V9.611a.965.965 0 011.93 0v2.445a.966.966 0 01-.952.94z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/vertexai.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/vertexai.svg
new file mode 100644
index 0000000000..1bc122ba1e
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/vertexai.svg
@@ -0,0 +1 @@
+<svg fill="#1d1d1f" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M11.995 20.216a1.892 1.892 0 100 3.785 1.892 1.892 0 000-3.785zm0 2.806a.927.927 0 11.927-.914.914.914 0 01-.927.914z"></path><path clip-rule="evenodd" d="M21.687 14.144c.237.038.452.16.605.344a.978.978 0 01-.18 1.3l-8.24 6.082a1.892 1.892 0 00-1.147-1.508l8.28-6.08a.991.991 0 01.682-.138z"></path><path clip-rule="evenodd" d="M10.122 21.842l-8.217-6.066a.952.952 0 01-.206-1.287.978.978 0 011.287-.206l8.28 6.08a1.893 1.893 0 00-1.144 1.479z"></path><path d="M4.273 4.475a.978.978 0 01-.965-.965V1.09a.978.978 0 111.943 0v2.42a.978.978 0 01-.978.965zM4.247 13.034a.978.978 0 100-1.956.978.978 0 000 1.956zM4.247 10.19a.978.978 0 100-1.956.978.978 0 000 1.956zM4.247 7.332a.978.978 0 100-1.956.978.978 0 000 1.956z"></path><path d="M19.718 7.307a.978.978 0 01-.965-.979v-2.42a.965.965 0 011.93 0v2.42a.964.964 0 01-.965.979zM19.743 13.047a.978.978 0 100-1.956.978.978 0 000 1.956zM19.743 10.151a.978.978 0 100-1.956.978.978 0 000 1.956zM19.743 2.068a.978.978 0 100-1.956.978.978 0 000 1.956z"></path><path d="M11.995 15.917a.978.978 0 01-.965-.965v-2.459a.978.978 0 011.943 0v2.433a.976.976 0 01-.978.991zM11.995 18.762a.978.978 0 100-1.956.978.978 0 000 1.956zM11.995 10.64a.978.978 0 100-1.956.978.978 0 000 1.956zM11.995 7.783a.978.978 0 100-1.956.978.978 0 000 1.956z"></path><path d="M15.856 10.177a.978.978 0 01-.965-.965v-2.42a.977.977 0 011.702-.763.979.979 0 01.241.763v2.42a.978.978 0 01-.978.965zM15.869 4.913a.978.978 0 100-1.956.978.978 0 000 1.956zM15.869 15.853a.978.978 0 100-1.956.978.978 0 000 1.956zM15.869 12.996a.978.978 0 100-1.956.978.978 0 000 1.956z"></path><path d="M8.121 15.853a.978.978 0 100-1.956.978.978 0 000 1.956zM8.121 7.783a.978.978 0 100-1.956.978.978 0 000 1.956zM8.121 4.913a.978.978 0 100-1.957.978.978 0 000 1.957zM8.134 12.996a.978.978 0 01-.978-.94V9.611a.965.965 0 011.93 0v2.445a.966.966 0 01-.952.94z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/xai-dark.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/xai-dark.svg
new file mode 100644
index 0000000000..69ce3eff17
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/xai-dark.svg
@@ -0,0 +1 @@
+<svg fill="#f5f5f7" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M6.469 8.776L16.512 23h-4.464L2.005 8.776H6.47zm-.004 7.9l2.233 3.164L6.467 23H2l4.465-6.324zM22 2.582V23h-3.659V7.764L22 2.582zM22 1l-9.952 14.095-2.233-3.163L17.533 1H22z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/xai.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/xai.svg
new file mode 100644
index 0000000000..c2946a6b6b
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/xai.svg
@@ -0,0 +1 @@
+<svg fill="#1d1d1f" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M6.469 8.776L16.512 23h-4.464L2.005 8.776H6.47zm-.004 7.9l2.233 3.164L6.467 23H2l4.465-6.324zM22 2.582V23h-3.659V7.764L22 2.582zM22 1l-9.952 14.095-2.233-3.163L17.533 1H22z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/xiaomimimo-dark.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/xiaomimimo-dark.svg
new file mode 100644
index 0000000000..1e257cbd93
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/xiaomimimo-dark.svg
@@ -0,0 +1 @@
+<svg fill="#f5f5f7" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M.958 15.936a.459.459 0 01.459.44v2.729a.46.46 0 01-.918 0v-2.729a.459.459 0 01.459-.44zm4.814-2.035a.46.46 0 01.553.45v4.754a.458.458 0 11-.918 0V15.48L3.74 17.202a.462.462 0 01-.655.016.462.462 0 01-.065-.082L.628 14.67a.459.459 0 01.658-.637l2.124 2.187 2.127-2.188a.46.46 0 01.235-.13zm2.068.004a.46.46 0 01.458.445v4.755a.46.46 0 01-.458.458.459.459 0 01-.458-.458V14.35a.459.459 0 01.458-.445zm1.973 2.014a.46.46 0 01.46.457v2.729a.46.46 0 01-.784.324.46.46 0 01-.134-.324v-2.729a.46.46 0 01.458-.458zm.002-2.045a.458.458 0 01.328.157l2.127 2.19 2.125-2.19a.459.459 0 01.784.318v4.756a.46.46 0 01-.455.458.46.46 0 01-.458-.458V15.48l-1.667 1.723a.46.46 0 01-.65.008l-.005-.005c0-.002-.002-.002-.004-.003l-2.455-2.534a.46.46 0 01-.008-.667.461.461 0 01.338-.128zm6.797 1.206a.46.46 0 01.53.651A1.966 1.966 0 0019.81 18.4a.462.462 0 01.623.18.46.46 0 01-.181.624 2.863 2.863 0 01-1.38.353l-.142-.004a2.88 2.88 0 01-2.393-4.263.461.461 0 01.274-.21zm.864-.931a2.884 2.884 0 013.915 3.914.46.46 0 01-.402.24l-.057-.004a.458.458 0 01-.164-.055.46.46 0 01-.182-.622 1.967 1.967 0 00-2.669-2.67.459.459 0 11-.441-.803zM9.59 6.368c1.481 0 1.696 1.202 1.696 1.654v2.648h-.917v-.432c-.26.346-.792.535-1.36.535-.133 0-1.289-.03-1.384-1.136-.082-.932.675-1.61 2.053-1.61h.691c0-.563-.367-.886-.983-.886-.44.013-.864.174-1.2.458l-.36-.664c.484-.379 1.012-.567 1.764-.567zm4.427.1c1.263 0 2.082.97 2.083 2.15 0 1.181-.824 2.154-2.083 2.154-1.26 0-2.084-.972-2.084-2.152 0-1.18.82-2.153 2.084-2.153zm6.801.015c.68 0 1.202.465 1.197 1.548v2.642H21.1V8.29c0-.312-.002-.98-.63-.98s-.628.667-.628.838v2.524h-.89V8.148c0-.17-.001-.838-.63-.838-.628 0-.628.668-.628.98v2.383h-.917v-4.03h.917V7a1.22 1.22 0 01.947-.516c.398 0 .76.193.982.686a1.321 1.321 0 011.195-.686zm-18.093.872l1.457-1.772H5.32L3.311 8.07l2.14 2.602H4.24L2.725 8.796 1.21 10.672H0L2.138 8.07.13 5.583h1.138l1.458 1.772zm4.149 3.317h-.916V6.644h.916v4.028zm16.99 0h-.916V6.644h.916v4.028zM9.925 8.71c-1.055 0-1.359.412-1.326.742.032.329.324.537.757.537a1.013 1.013 0 001.014-.968l.002-.31h-.447zM14.018 7.3c-.663 0-1.184.487-1.184 1.32 0 .832.52 1.32 1.184 1.32.662 0 1.182-.49 1.182-1.32 0-.832-.52-1.32-1.182-1.32zM6.417 5.001a.568.568 0 01.587.582.588.588 0 01-1.175 0A.57.57 0 016.417 5zm16.991 0a.57.57 0 01.592.582.588.588 0 01-1.174 0 .57.57 0 01.357-.542.572.572 0 01.225-.04z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/xiaomimimo.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/xiaomimimo.svg
new file mode 100644
index 0000000000..f3be9455be
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/xiaomimimo.svg
@@ -0,0 +1 @@
+<svg fill="#1d1d1f" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M.958 15.936a.459.459 0 01.459.44v2.729a.46.46 0 01-.918 0v-2.729a.459.459 0 01.459-.44zm4.814-2.035a.46.46 0 01.553.45v4.754a.458.458 0 11-.918 0V15.48L3.74 17.202a.462.462 0 01-.655.016.462.462 0 01-.065-.082L.628 14.67a.459.459 0 01.658-.637l2.124 2.187 2.127-2.188a.46.46 0 01.235-.13zm2.068.004a.46.46 0 01.458.445v4.755a.46.46 0 01-.458.458.459.459 0 01-.458-.458V14.35a.459.459 0 01.458-.445zm1.973 2.014a.46.46 0 01.46.457v2.729a.46.46 0 01-.784.324.46.46 0 01-.134-.324v-2.729a.46.46 0 01.458-.458zm.002-2.045a.458.458 0 01.328.157l2.127 2.19 2.125-2.19a.459.459 0 01.784.318v4.756a.46.46 0 01-.455.458.46.46 0 01-.458-.458V15.48l-1.667 1.723a.46.46 0 01-.65.008l-.005-.005c0-.002-.002-.002-.004-.003l-2.455-2.534a.46.46 0 01-.008-.667.461.461 0 01.338-.128zm6.797 1.206a.46.46 0 01.53.651A1.966 1.966 0 0019.81 18.4a.462.462 0 01.623.18.46.46 0 01-.181.624 2.863 2.863 0 01-1.38.353l-.142-.004a2.88 2.88 0 01-2.393-4.263.461.461 0 01.274-.21zm.864-.931a2.884 2.884 0 013.915 3.914.46.46 0 01-.402.24l-.057-.004a.458.458 0 01-.164-.055.46.46 0 01-.182-.622 1.967 1.967 0 00-2.669-2.67.459.459 0 11-.441-.803zM9.59 6.368c1.481 0 1.696 1.202 1.696 1.654v2.648h-.917v-.432c-.26.346-.792.535-1.36.535-.133 0-1.289-.03-1.384-1.136-.082-.932.675-1.61 2.053-1.61h.691c0-.563-.367-.886-.983-.886-.44.013-.864.174-1.2.458l-.36-.664c.484-.379 1.012-.567 1.764-.567zm4.427.1c1.263 0 2.082.97 2.083 2.15 0 1.181-.824 2.154-2.083 2.154-1.26 0-2.084-.972-2.084-2.152 0-1.18.82-2.153 2.084-2.153zm6.801.015c.68 0 1.202.465 1.197 1.548v2.642H21.1V8.29c0-.312-.002-.98-.63-.98s-.628.667-.628.838v2.524h-.89V8.148c0-.17-.001-.838-.63-.838-.628 0-.628.668-.628.98v2.383h-.917v-4.03h.917V7a1.22 1.22 0 01.947-.516c.398 0 .76.193.982.686a1.321 1.321 0 011.195-.686zm-18.093.872l1.457-1.772H5.32L3.311 8.07l2.14 2.602H4.24L2.725 8.796 1.21 10.672H0L2.138 8.07.13 5.583h1.138l1.458 1.772zm4.149 3.317h-.916V6.644h.916v4.028zm16.99 0h-.916V6.644h.916v4.028zM9.925 8.71c-1.055 0-1.359.412-1.326.742.032.329.324.537.757.537a1.013 1.013 0 001.014-.968l.002-.31h-.447zM14.018 7.3c-.663 0-1.184.487-1.184 1.32 0 .832.52 1.32 1.184 1.32.662 0 1.182-.49 1.182-1.32 0-.832-.52-1.32-1.182-1.32zM6.417 5.001a.568.568 0 01.587.582.588.588 0 01-1.175 0A.57.57 0 016.417 5zm16.991 0a.57.57 0 01.592.582.588.588 0 01-1.174 0 .57.57 0 01.357-.542.572.572 0 01.225-.04z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/zai-dark.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/zai-dark.svg
new file mode 100644
index 0000000000..dcccaf9928
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/zai-dark.svg
@@ -0,0 +1 @@
+<svg fill="#f5f5f7" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M12.105 2L9.927 4.953H.653L2.83 2h9.276zM23.254 19.048L21.078 22h-9.242l2.174-2.952h9.244zM24 2L9.264 22H0L14.736 2H24z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/public/onboarding/marks/providers/zai.svg b/apps/cua-spaces-web/public/onboarding/marks/providers/zai.svg
new file mode 100644
index 0000000000..0f0c04f3b4
--- /dev/null
+++ b/apps/cua-spaces-web/public/onboarding/marks/providers/zai.svg
@@ -0,0 +1 @@
+<svg fill="#1d1d1f" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M12.105 2L9.927 4.953H.653L2.83 2h9.276zM23.254 19.048L21.078 22h-9.242l2.174-2.952h9.244zM24 2L9.264 22H0L14.736 2H24z"></path></svg>
\ No newline at end of file
diff --git a/apps/cua-spaces-web/src/__tests__/app-uses.test.tsx b/apps/cua-spaces-web/src/__tests__/app-uses.test.tsx
new file mode 100644
index 0000000000..d02cbd5261
--- /dev/null
+++ b/apps/cua-spaces-web/src/__tests__/app-uses.test.tsx
@@ -0,0 +1,159 @@
+// SPDX-License-Identifier: FSL-1.1-MIT
+// Copyright (c) 2026 Cua AI, Inc.
+
+// An app's page says which credential it uses. Claude Code and Codex read one fixed sign-in; Hermes, OpenCode,
+// Goose, Pi and OpenClaw take any provider, so their page has a Uses row with a menu of the connected providers
+// and keys they can really read, and Connect another provider at the bottom. Choosing signs nothing out.
+
+import { act, cleanup, fireEvent, waitFor } from "@testing-library/react";
+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
+
+import { wasmBuilt } from "@/bridge/__tests__/testCore";
+import { resetConnectedAppsState } from "@/hooks/use-connected-apps";
+import { resetConnectState } from "@/hooks/use-connectors";
+import { mountApp, stubBrowserApis } from "./app-harness";
+
+stubBrowserApis();
+beforeEach(() => {
+ localStorage.clear();
+ resetConnectedAppsState();
+ resetConnectState();
+});
+afterEach(() => {
+ cleanup();
+ vi.unstubAllEnvs();
+});
+
+type Call = { op: string; args: unknown };
+const q = (s: string) => document.querySelector<HTMLElement>(s);
+const qa = (s: string) => [...document.querySelectorAll<HTMLElement>(s)];
+const found = (s: string) =>
+ waitFor(() => {
+ const el = q(s);
+ expect(el).not.toBeNull();
+ return el!;
+ });
+const click = (el: Element) =>
+ act(async () => {
+ fireEvent.click(el);
+ });
+const type = (el: Element, value: string) => fireEvent.change(el, { target: { value } });
+const host = (calls: Call[], demo: object = {}) => ({ failsCreates: false, listsGhost: false, demo, intercept: (op: string, args: unknown) => (calls.push({ op, args }), undefined) });
+/** Only the Claude and ChatGPT sign-ins are saved: no API key at all. */
+const SIGN_INS_ONLY = { keys: "none", claudeLogin: "signed-in", chatgptLogin: true };
+const SWITCHABLE = ["hermes", "opencode", "goose", "pi", "openclaw"];
+
+/** Opens the Uses menu (Base UI opens on a pointer press). */
+const openMenu = async () => {
+ const trigger = await found("[data-uses-menu]");
+ await act(async () => {
+ fireEvent.pointerDown(trigger, { button: 0, pointerType: "mouse" });
+ fireEvent.mouseDown(trigger, { button: 0 });
+ fireEvent.pointerUp(trigger, { button: 0, pointerType: "mouse" });
+ fireEvent.click(trigger);
+ });
+ return found("[data-uses-popup]");
+};
+
+describe.skipIf(!wasmBuilt)("an app's Uses row", () => {
+ it.each(SWITCHABLE)("%s with only a Claude and a ChatGPT sign-in saved is not connected, and says so", async (app) => {
+ await mountApp(`/settings/connections/${app}`, host([], SIGN_INS_ONLY));
+ const row = await found(`[data-connector-uses-app=${app}]`);
+ expect(row.dataset.connectorUses).toBe("not-connected");
+ expect(row.textContent).toContain("No provider connected");
+ expect(row.textContent).toContain(`${q(`[data-connector-detail=${app}]`)!.querySelector("h2")!.textContent} needs an API key`);
+ expect(row.textContent).not.toMatch(/\bUses\b/);
+ // Never the Claude or ChatGPT sign-in, never Sign out on this page.
+ expect(q(`[data-connector-detail=${app}]`)!.textContent).not.toMatch(/ada@example\.com|Claude Max|ChatGPT|Signed in as/);
+ expect(q("[data-connector-detail-signin-action]")).toBeNull();
+ expect(q("[data-uses-menu]")).toBeNull();
+ expect(q("[data-connector-detail-status]")!.textContent).not.toMatch(/Signed in|Connected/);
+ expect(q("[data-uses-connect]")!.textContent).toBe("Connect");
+ });
+
+ it("Claude Code keeps its fixed sign-in row, with Sign out, and no switcher", async () => {
+ await mountApp("/settings/connections/claude-code", host([], SIGN_INS_ONLY));
+ const row = await found("[data-connector-detail-signin]");
+ expect(row.textContent).toContain("[email protected]");
+ expect(q("[data-connector-detail-signin-action]")!.textContent).toBe("Sign out");
+ expect(q("[data-connector-uses-app]")).toBeNull();
+ expect(q("[data-uses-menu]")).toBeNull();
+ });
+
+ it("lists the connected providers the app can read, points it at one without signing anything out, and says when it takes effect", async () => {
+ const calls: Call[] = [];
+ await mountApp("/settings/connections/hermes", host(calls, { keys: "several", claudeLogin: "signed-in", chatgptLogin: true }));
+ const row = await found("[data-connector-uses=connected]");
+ // The first connected one that works is in use until the person chooses.
+ expect(row.querySelector("[data-uses-provider]")!.textContent).toBe("Anthropic");
+ expect(row.querySelector("[data-uses-line]")!.textContent).toContain("API key ending a91c");
+ expect(document.body.textContent).toContain("Takes effect the next time Hermes runs.");
+ const popup = await openMenu();
+ const options = qa("[data-uses-option]").map((o) => o.dataset.usesOption);
+ expect(options).toEqual(expect.arrayContaining(["anthropic", "openrouter", "deepseek"]));
+ // The Claude and ChatGPT sign-ins never appear for an app that cannot read them.
+ expect(popup.textContent).not.toMatch(/ada@example\.com|ChatGPT/);
+ expect(qa("[data-uses-option]").filter((o) => o.dataset.usesOption === "anthropic")).toHaveLength(1);
+ expect(popup.textContent).toContain("Connect another provider");
+ await click(q("[data-uses-option=openrouter]")!);
+ await waitFor(() => expect(calls.filter((c) => c.op === "agentKeys.use").map((c) => c.args)).toEqual([{ app: "hermes", env: "OPENROUTER_API_KEY" }]));
+ await waitFor(() => expect(q("[data-connector-uses-app=hermes] [data-uses-provider]")!.textContent).toBe("OpenRouter"));
+ // Nothing was signed out or removed by choosing.
+ expect(calls.filter((c) => c.op === "agentKeys.remove")).toEqual([]);
+ expect(q("[data-connector-uses-app=hermes] [data-uses-line]")!.textContent).toContain("API key ending cdef");
+ });
+
+ it("Connect another provider opens the provider choice for this app", async () => {
+ await mountApp("/settings/connections/hermes", host([], { keys: "several" }));
+ await openMenu();
+ await click(q("[data-uses-connect]")!);
+ await found("[data-provider-picker], [data-provider-sheet]");
+ });
+
+ it("a removed key leaves the app not connected with a Connect state, never moved to another key", async () => {
+ const calls: Call[] = [];
+ const { router } = await mountApp("/settings/connections/hermes", host(calls, { keys: "several" }));
+ await openMenu();
+ await click(await found("[data-uses-option=deepseek]"));
+ await waitFor(() => expect(q("[data-connector-uses-app=hermes] [data-uses-provider]")!.textContent).toBe("DeepSeek"));
+ // Disconnect DeepSeek on the list.
+ await act(async () => {
+ await router.navigate({ to: "/settings/connections" });
+ });
+ await click(await found("[data-connector-provider=deepseek]"));
+ await click(await found("[data-provider-detail=deepseek] [data-connector-provider-action='sign-out']"));
+ await waitFor(() => expect(q("[data-connector-provider=deepseek]")?.dataset.state ?? "gone").not.toBe("connected"));
+ await act(async () => {
+ await router.navigate({ to: "/settings/connections/$app", params: { app: "hermes" } });
+ });
+ const row = await found("[data-connector-uses=gone]");
+ expect(row.textContent).toContain("isn't saved any more");
+ expect(row.textContent).toContain("Key not found");
+ expect(row.textContent).not.toMatch(/\bUses\b/);
+ expect(row.querySelector("[data-uses-provider]")).toBeNull();
+ expect(q("[data-connector-detail-status]")!.textContent).not.toMatch(/Connected/);
+ // Anthropic and the rest are still saved and still offered, but none is selected for it.
+ await openMenu();
+ expect(qa("[data-uses-option]").length).toBeGreaterThan(1);
+ expect(qa("[data-uses-option][data-selected]")).toHaveLength(0);
+ });
+
+ it("another key for a provider is named, kept beside the first, and offered to the apps that take any provider", async () => {
+ const calls: Call[] = [];
+ await mountApp("/settings/connections", host(calls, { keys: "several" }));
+ await click(await found("[data-connector-provider=anthropic]"));
+ await click(await found("[data-connector-add-key]"));
+ await found("[data-connector-add-key-sheet=anthropic]");
+ type(q("[data-add-key-name]")!, "Work key");
+ type(q("[data-add-key-value]")!, "sk-ant-api03-work-0123456789");
+ await click(q("[data-add-key-save]")!);
+ await waitFor(() => expect(q("[data-connector-add-key-sheet]")).toBeNull());
+ expect(calls.filter((c) => c.op === "agentKeys.set").map((c) => c.args)).toEqual([{ provider: "anthropic", value: "sk-ant-api03-work-0123456789", env: null, add: true, label: "Work key" }]);
+ // The provider's row is still the first key: nothing was replaced.
+ expect(q("[data-connector-provider=anthropic] [data-connector-credential]")!.textContent).toContain("a91c");
+ // Its sheet now lists both keys, each removable.
+ await click(await found("[data-connector-provider=anthropic]"));
+ await waitFor(() => expect(qa("[data-connector-key]")).toHaveLength(2));
+ expect(q("[data-connector-keys]")!.textContent).toContain("Work key");
+ });
+});
diff --git a/apps/cua-spaces-web/src/__tests__/claude-import.test.tsx b/apps/cua-spaces-web/src/__tests__/claude-import.test.tsx
index fb15dd2ea4..308d017186 100644
--- a/apps/cua-spaces-web/src/__tests__/claude-import.test.tsx
+++ b/apps/cua-spaces-web/src/__tests__/claude-import.test.tsx
@@ -93,7 +93,9 @@ describe.skipIf(!wasmBuilt)("importing the Claude Code sign-in", () => {
// The row, the Anthropic provider row and the app's own page.
expect(q("[data-connector-app=claude-code]")!.textContent).toContain(WHO);
expect(q("[data-connector-provider=anthropic]")!.textContent).toContain(WHO);
- expect(q("[data-connector-provider=anthropic]")!.textContent).toContain("Disconnect");
+ // Disconnect is in the provider's sheet, not on its row.
+ await click(q("[data-connector-provider=anthropic]")!);
+ expect((await found("[data-provider-detail=anthropic] [data-connector-provider-action='sign-out']")).textContent).toBe("Disconnect");
// Hermes does not count it: a Claude sign-in is Claude Code's alone.
expect(q("[data-connector-app=hermes]")!.dataset.state).not.toBe("connected");
});
diff --git a/apps/cua-spaces-web/src/__tests__/cli-settings.test.tsx b/apps/cua-spaces-web/src/__tests__/cli-settings.test.tsx
index 0afd6751ae..9a6daec6d3 100644
--- a/apps/cua-spaces-web/src/__tests__/cli-settings.test.tsx
+++ b/apps/cua-spaces-web/src/__tests__/cli-settings.test.tsx
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: FSL-1.1-MIT
// Copyright (c) 2026 Cua AI, Inc.
-// Settings → Terminal: the first run's CLI install, reachable later.
+// Settings, General, Terminal: the first run's CLI install, reachable later.
import { cleanup, fireEvent, waitFor } from "@testing-library/react";
import { afterEach, describe, expect, it } from "vitest";
@@ -11,10 +11,10 @@ import { mountApp, stubBrowserApis } from "./app-harness";
afterEach(cleanup);
stubBrowserApis();
-describe.skipIf(!wasmBuilt)("Settings, Terminal", () => {
+describe.skipIf(!wasmBuilt)("Settings, General, Terminal", () => {
it("names the file, installs on Install, then says where it is", { timeout: 20_000 }, async () => {
const calls: { op: string; args: unknown }[] = [];
- await mountApp("/settings/connections", {
+ await mountApp("/settings/general", {
failsCreates: false,
listsGhost: false,
demo: { cli: "missing" },
@@ -36,7 +36,7 @@ describe.skipIf(!wasmBuilt)("Settings, Terminal", () => {
});
it("shows where a Local build's CLI is", { timeout: 20_000 }, async () => {
- await mountApp("/settings/connections", { failsCreates: false, listsGhost: false, demo: { cli: "local" } });
+ await mountApp("/settings/general", { failsCreates: false, listsGhost: false, demo: { cli: "local" } });
await waitFor(() => expect(document.querySelector('[data-settings-cli="installed"]')?.textContent).toMatch(/~\/\.local\/bin\/cua-local.*cua-local spaces ls/), { timeout: 8000 });
});
});
diff --git a/apps/cua-spaces-web/src/__tests__/connections-list.test.tsx b/apps/cua-spaces-web/src/__tests__/connections-list.test.tsx
index 0a557f2815..bf18da795a 100644
--- a/apps/cua-spaces-web/src/__tests__/connections-list.test.tsx
+++ b/apps/cua-spaces-web/src/__tests__/connections-list.test.tsx
@@ -41,6 +41,16 @@ const click = (el: Element) =>
});
const type = (el: Element, value: string) => fireEvent.change(el, { target: { value } });
const host = (calls: Call[], demo: object = {}) => ({ failsCreates: false, listsGhost: false, demo, intercept: (op: string, args: unknown) => (calls.push({ op, args }), undefined) });
+/** The sheet a provider's row opens. */
+const openRow = async (id: string) => {
+ await click(await found(`[data-connector-provider=${id}]`));
+ return found(`[data-provider-detail=${id}]`);
+};
+/** Show all, so the search and the rest of the providers are there. */
+const openMore = async () => {
+ const toggle = await found("[data-connectors-more-toggle]");
+ if (toggle.getAttribute("aria-expanded") !== "true") await click(toggle);
+};
const sets = (calls: Call[]) => calls.filter((c) => c.op === "agentKeys.set").map((c) => c.args as Record<string, unknown>);
describe.skipIf(!wasmBuilt)("the Connections list", () => {
@@ -50,27 +60,31 @@ describe.skipIf(!wasmBuilt)("the Connections list", () => {
expect(qa("[data-connectors-providers] [data-connector-provider]").map((r) => r.dataset.connectorProvider)).toEqual(
PROVIDER_REGISTRY.filter((p) => p.tier === "top").map((p) => p.id),
);
+ // The rows are compact like the coding apps: one grey line, a status or Connect, a chevron. The apps it works
+ // with are in its sheet, and only as a short hover hint on the row.
const anthropic = q("[data-connector-provider=anthropic]")!;
- expect(anthropic.querySelector("[data-connector-works-with]")!.textContent).toContain("Works with");
+ expect(anthropic.querySelector("[data-connector-works-with]")).toBeNull();
+ expect(anthropic.textContent).not.toContain("Works with");
+ expect(anthropic.getAttribute("title")).toMatch(/^Works with Claude Code/);
+ expect(anthropic.querySelector("[data-connector-chevron]")).not.toBeNull();
+ const sheet = await openRow("anthropic");
+ expect(sheet.querySelector("[data-connector-works-with]")!.textContent).toContain("Works with");
// Claude Code takes Anthropic and no other provider on the list.
- expect(qa("[data-connector-chip=claude-code]").map((c) => c.closest("[data-connector-provider]")!.getAttribute("data-connector-provider"))).toEqual(["anthropic"]);
- // The chips are four and a count; a chip opens its app's page.
- expect(anthropic.querySelectorAll("[data-connector-chip]").length).toBe(4);
- expect(anthropic.querySelector("[data-connector-chips-more]")!.textContent).toBe("and 3 more");
- const nav = await found("[data-connector-provider=anthropic] [data-connector-chip=claude-code]");
- await click(nav);
+ await click(await found("[data-provider-detail=anthropic] [data-connector-chip=claude-code]"));
await found("[data-connector-detail=claude-code]");
+ expect(q("[data-provider-detail]")).toBeNull();
});
it("keeps the rest in More providers: closed, then all of them, searched by name or alias", async () => {
await mountApp("/settings/connections", host([]));
- await found("[data-connectors-more]");
- expect(qa("[data-connectors-more] [data-connector-provider]")).toHaveLength(0);
- const toggle = q("[data-connectors-more-toggle]")!;
- expect(toggle.textContent).toMatch(/^Show all \d+$/);
+ const toggle = await found("[data-connectors-more-toggle]");
+ expect(qa("[data-more-list]")).toHaveLength(0);
+ expect(q("[data-connectors-search]")).toBeNull();
+ expect(toggle.textContent!.trim()).toMatch(/^Show all \d+$/);
await click(toggle);
+ expect(q("[data-connectors-more-toggle]")!.textContent!.trim()).toBe("Show fewer");
const all = await waitFor(() => {
- const rows = qa("[data-connectors-more] [data-connector-provider]").map((r) => r.dataset.connectorProvider);
+ const rows = qa("[data-more-list]").map((r) => r.dataset.connectorProvider);
expect(rows.length).toBeGreaterThan(15);
return rows;
});
@@ -79,9 +93,9 @@ describe.skipIf(!wasmBuilt)("the Connections list", () => {
for (const id of ["nous", "qwen-oauth", "minimax-oauth", "xai-oauth", "vertex", "bedrock", "azure-foundry", "meta-ai"]) expect(all).not.toContain(id);
// Search by alias: HF is Hugging Face, glm is Z.AI.
type(q("[data-connectors-search]")!, "hf");
- await waitFor(() => expect(qa("[data-connectors-more] [data-connector-provider]").map((r) => r.dataset.connectorProvider)).toEqual(["huggingface"]));
+ await waitFor(() => expect(qa("[data-more-list]").map((r) => r.dataset.connectorProvider)).toEqual(["huggingface"]));
type(q("[data-connectors-search]")!, "glm");
- await waitFor(() => expect(qa("[data-connectors-more] [data-connector-provider]").map((r) => r.dataset.connectorProvider)).toEqual(["zai"]));
+ await waitFor(() => expect(qa("[data-more-list]").map((r) => r.dataset.connectorProvider)).toEqual(["zai"]));
type(q("[data-connectors-search]")!, "no such thing");
await found("[data-connectors-more-empty]");
expect(q("[data-connectors-more-empty]")!.textContent).toBe("No provider matches that.");
@@ -108,10 +122,12 @@ describe.skipIf(!wasmBuilt)("the Connections list", () => {
const row = q("[data-connector-provider=openrouter]")!;
expect(row.textContent).toContain("Connected");
expect(row.querySelector("[data-connector-credential]")!.textContent).toContain("•••• cdef");
- expect(row.textContent).toContain("Disconnect");
+ const sheet = await openRow("openrouter");
+ expect(sheet.querySelector("[data-connector-provider-action]")!.textContent).toBe("Disconnect");
+ expect(sheet.querySelector("[data-connector-added]")!.textContent).toMatch(/^Added/);
// Hermes (and the other apps that read an OpenRouter key) are connected by it.
expect(q("[data-connector-app=goose]")!.dataset.state).toBe("connected");
- expect(q("[data-connector-provider=openrouter] [data-connector-chip=hermes]")).not.toBeNull();
+ expect(sheet.querySelector("[data-connector-chip=hermes]")).not.toBeNull();
});
it("a custom endpoint asks for its URL, model and API style, needs no key, and says what a local server needs", async () => {
@@ -136,13 +152,14 @@ describe.skipIf(!wasmBuilt)("the Connections list", () => {
expect(q("[data-connector-provider=custom] [data-connector-credential]")!.textContent).toBe("http://127.0.0.1:1234/v1");
// Hermes and the apps that can be pointed at an endpoint are connected by it.
for (const app of ["opencode", "goose"]) expect(q(`[data-connector-app=${app}]`)!.dataset.state).toBe("connected");
- expect(q("[data-connector-provider=custom] [data-connector-chip=hermes]")).not.toBeNull();
+ expect((await openRow("custom")).querySelector("[data-connector-chip=hermes]")).not.toBeNull();
expect(q("[data-connector-app=claude-code]")!.dataset.state).not.toBe("connected");
});
it("Z.AI asks which plan, because the plans bill separately", async () => {
const calls: Call[] = [];
await mountApp("/settings/connections", host(calls));
+ await openMore();
type(await found("[data-connectors-search]"), "z.ai");
await click(await found("[data-connector-provider=zai] [data-connector-provider-action]"));
await found("[data-provider-sheet=zai]");
@@ -177,13 +194,15 @@ describe.skipIf(!wasmBuilt)("the Connections list", () => {
await waitFor(() => expect(q("[data-connector-provider=openai]")?.textContent).toContain("Needs reconnect"));
expect(q("[data-connector-provider=openai] [data-connector-provider-action]")!.textContent).toBe("Reconnect");
// Save a Fireworks key: it joins the list up front.
+ await openMore();
type(await found("[data-connectors-search]"), "fireworks");
- await click(await found("[data-connectors-more] [data-connector-provider=fireworks] [data-connector-provider-action]"));
+ await click(await found("[data-more-list][data-connector-provider=fireworks] [data-connector-provider-action]"));
await click(await found("[data-provider-way=key]"));
type(await found("[data-provider-key]"), "fw_0123456789abcdef");
await click(q("[data-provider-save]")!);
await waitFor(() => expect(q("[data-connectors-providers] [data-connector-provider=fireworks]")?.dataset.state).toBe("connected"));
- await click(q("[data-connectors-providers] [data-connector-provider=fireworks] [data-connector-provider-action]")!);
+ await click(q("[data-connectors-providers] [data-connector-provider=fireworks]")!);
+ await click(await found("[data-provider-detail=fireworks] [data-connector-provider-action='sign-out']"));
await waitFor(() => expect(q("[data-connector-provider=fireworks]")?.dataset.state ?? "gone").not.toBe("connected"));
expect(calls.some((c) => c.op === "agentKeys.remove" && (c.args as { env: string }).env === "FIREWORKS_API_KEY")).toBe(true);
});
diff --git a/apps/cua-spaces-web/src/__tests__/connectors-redesign.test.tsx b/apps/cua-spaces-web/src/__tests__/connectors-redesign.test.tsx
index 6dea191fb8..ff0d84ac53 100644
--- a/apps/cua-spaces-web/src/__tests__/connectors-redesign.test.tsx
+++ b/apps/cua-spaces-web/src/__tests__/connectors-redesign.test.tsx
@@ -40,6 +40,17 @@ const click = (el: Element) =>
fireEvent.click(el);
});
+/** Opens a provider's sheet from its row and disconnects it there. */
+const disconnect = async (id: string) => {
+ await click(await found(`[data-connector-provider=${id}]`));
+ await click(await found(`[data-provider-detail=${id}] [data-connector-provider-action='sign-out']`));
+};
+/** Show all, so the search and the rest of the providers are there. */
+const openMore = async () => {
+ const toggle = await found("[data-connectors-more-toggle]");
+ if (toggle.getAttribute("aria-expanded") !== "true") await click(toggle);
+};
+
function host(calls: { op: string; args: unknown }[]) {
return { failsCreates: false, listsGhost: false, intercept: (op: string, args: unknown) => (calls.push({ op, args }), undefined) };
}
@@ -56,7 +67,12 @@ describe.skipIf(!wasmBuilt)("Settings, Connections", () => {
expect(qa("[data-connectors-apps] [role=switch]").length).toBe(1); // Set up new apps automatically only
expect(qa("[data-connector-provider]").map((r) => r.dataset.connectorProvider)).toEqual(["anthropic", "openai", "openrouter", "google", "xai", "deepseek", "kimi", "custom"]);
expect(q("[data-connector-provider=anthropic]")!.textContent).toContain("Not connected");
- expect(q("[data-connector-provider=openai]")!.textContent).toContain("Disconnect");
+ // Compact rows like the coding apps: a check and Connected, a chevron to the sheet, and nothing else on the row.
+ const openai = q("[data-connector-provider=openai]")!;
+ expect(openai.textContent).toContain("Connected");
+ expect(openai.querySelector("[data-connector-chevron]")).not.toBeNull();
+ expect(openai.textContent).not.toContain("Disconnect");
+ for (const r of qa("[data-connector-provider]")) expect(r.textContent).not.toMatch(/Works with|Added /);
expect(document.body.textContent).not.toContain("Account keys");
});
@@ -88,7 +104,7 @@ describe.skipIf(!wasmBuilt)("Settings, Connections", () => {
const calls: { op: string; args: unknown }[] = [];
await mountApp("/settings/connections", host(calls));
// The demo has an OpenAI key saved; sign out first so nothing reads one.
- await click(await found("[data-connector-provider=openai] [data-connector-provider-action='sign-out']"));
+ await disconnect("openai");
await waitFor(() => expect(q("[data-connector-app=opencode]")!.dataset.state).toBe("not-connected"));
await click(q("[data-connector-app=opencode] [data-connector-connect]")!);
// The sheet for its first provider, with the others one click away in a searchable choice.
@@ -128,6 +144,7 @@ describe.skipIf(!wasmBuilt)("Settings, Connections", () => {
it("a provider without a sign-in of its own asks for a key; Disconnect removes it", async () => {
await mountApp("/settings/connections", host([]));
// GitHub is in More providers: search for it, then Connect.
+ await openMore();
fireEvent.change(await found("[data-connectors-search]"), { target: { value: "copilot" } });
await click(await found("[data-connector-provider=github] [data-connector-provider-action]"));
await found("[data-provider-sheet=github]");
@@ -137,7 +154,7 @@ describe.skipIf(!wasmBuilt)("Settings, Connections", () => {
await click(q("[data-provider-save]")!);
await waitFor(() => expect(q("[data-connector-provider=github]")!.dataset.state).toBe("connected"));
expect(q("[data-provider-sheet]")).toBeNull();
- await click(q("[data-connector-provider=github] [data-connector-provider-action]")!);
+ await disconnect("github");
await waitFor(() => expect(q("[data-connector-provider=github]")!.dataset.state).toBe("not-connected"));
});
@@ -155,7 +172,7 @@ describe.skipIf(!wasmBuilt)("Settings, Connections", () => {
const calls: { op: string; args: unknown }[] = [];
await mountApp("/settings/connections", host(calls));
// OpenAI starts connected in the demo with a key; sign out first.
- await click(await found("[data-connector-provider=openai] [data-connector-provider-action='sign-out']"));
+ await disconnect("openai");
await waitFor(() => expect(q("[data-connector-app=codex]")!.dataset.state).toBe("not-connected"));
await click(q("[data-connector-app=codex] [data-connector-connect]")!);
const code = await found("[data-device-code]");
diff --git a/apps/cua-spaces-web/src/__tests__/provider-marks.test.ts b/apps/cua-spaces-web/src/__tests__/provider-marks.test.ts
new file mode 100644
index 0000000000..df598a51ae
--- /dev/null
+++ b/apps/cua-spaces-web/src/__tests__/provider-marks.test.ts
@@ -0,0 +1,67 @@
+// SPDX-License-Identifier: FSL-1.1-MIT
+// Copyright (c) 2026 Cua AI, Inc.
+
+// Provider marks ship with the app as static files. The app never asks an icon host for one, and every
+// provider is either drawn from a bundled mark or is named here as one that has none (it gets a letter tile).
+
+import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
+import { join, resolve } from "node:path";
+import { describe, expect, it } from "vitest";
+
+import { APP_MARKS } from "@/components/agents/harness-mark";
+import { PROVIDER_REGISTRY } from "@/bridge/generated/providers";
+
+const root = resolve(__dirname, "../..");
+const src = join(root, "src");
+
+/** The visible providers with no brand mark to use: a clean letter tile. */
+const NO_MARK = ["custom"];
+
+function files(dir: string, out: string[] = []): string[] {
+ for (const name of readdirSync(dir)) {
+ const p = join(dir, name);
+ if (statSync(p).isDirectory()) {
+ if (name === "node_modules" || name === "wasm") continue;
+ files(p, out);
+ } else if (/\.(tsx?|css|html)$/.test(name)) out.push(p);
+ }
+ return out;
+}
+
+describe("provider marks", () => {
+ it("every provider is drawn from a bundled mark, except the ones listed here", () => {
+ const missing = PROVIDER_REGISTRY.filter((p) => !(`provider:${p.id}` in APP_MARKS) && !["anthropic", "openai", "google", "github"].includes(p.id)).map((p) => p.id);
+ expect(missing).toEqual(NO_MARK);
+ });
+
+ it("every mark is a file in public/, in a light and a dark ink where it has both", () => {
+ for (const [id, m] of Object.entries(APP_MARKS)) {
+ for (const f of new Set([m.light, m.dark])) {
+ expect(f.startsWith("/"), `${id}: ${f}`).toBe(true);
+ expect(existsSync(join(root, "public", f)), `${id}: ${f}`).toBe(true);
+ }
+ }
+ });
+
+ it("no mark is fetched from another host: a bundled path only", () => {
+ for (const [id, m] of Object.entries(APP_MARKS)) {
+ for (const f of [m.light, m.dark]) expect(f, id).not.toMatch(/^[a-z]+:|^\/\//i);
+ }
+ });
+
+ it("no component, style or page names an icon host or a favicon service", () => {
+ const hosts = /(?:s2\/favicons|faviconV2|favicon\.ico\?|gstatic\.com\/faviconV2|google\.com\/s2|simpleicons\.org|cdn\.simpleicons|lobehub|lobe-icons|logo\.clearbit|icons\.duckduckgo|cdn\.jsdelivr\.net\/npm\/@lobehub|unpkg\.com\/@lobehub|iconify\.design)/i;
+ const imageUrl = /(?:src|href|url\()\s*=?\s*[\("'`]\s*https?:\/\/[^"'`)\s]+\.(?:svg|png|ico|jpe?g|webp)/i;
+ const bad: string[] = [];
+ for (const f of files(src)) {
+ if (/\.test\.|__tests__|\/test\//.test(f)) continue;
+ const text = readFileSync(f, "utf8");
+ if (hosts.test(text) || imageUrl.test(text)) bad.push(f.slice(root.length + 1));
+ }
+ expect(bad).toEqual([]);
+ });
+
+ it("the page that loads the app draws no mark from a host either", () => {
+ expect(readFileSync(join(root, "index.html"), "utf8")).not.toMatch(/https?:\/\/[^"']+\.(?:svg|png|ico)/i);
+ });
+});
diff --git a/apps/cua-spaces-web/src/__tests__/settings-tabs.test.tsx b/apps/cua-spaces-web/src/__tests__/settings-tabs.test.tsx
index bcab58433f..a0c763fa2c 100644
--- a/apps/cua-spaces-web/src/__tests__/settings-tabs.test.tsx
+++ b/apps/cua-spaces-web/src/__tests__/settings-tabs.test.tsx
@@ -77,14 +77,26 @@ describe.skipIf(!wasmBuilt)("Settings tabs (real routes, wasm core)", () => {
expect(text).not.toMatch(/Keyboard shortcuts|Shared links|Storage|Runtimes|Keyvault|AI agents|Welcome/);
});
- it("puts Connections where Agents was: the providers, More providers and Terminal", async () => {
- await mountApp("/settings/connections", host);
+ it("puts the Providers below Coding apps and On another machine, and Terminal is not on this tab", async () => {
+ await mountApp("/settings/connections", { ...host, demo: { cli: "missing" } });
await waitFor(() => expect(document.querySelector("[data-connectors-providers]")).not.toBeNull(), { timeout: 8000 });
- const text = tab("connections")!.textContent!;
- expect(text).toContain("Connections");
- expect(text).toContain("More providers");
+ const t = tab("connections")!;
+ const headings = [...t.querySelectorAll("h2")].map((h) => h.textContent);
+ expect(headings).toEqual(["Coding apps", "On another machine", "Providers"]);
+ // The providers are the last section on the page.
+ const sections = [...t.querySelectorAll("[data-connectors-apps], [data-connectors-other-machine-group], [data-connectors-providers]")].map((e) => e.getAttributeNames().find((n) => n.startsWith("data-connectors-")));
+ expect(sections).toEqual(["data-connectors-apps", "data-connectors-other-machine-group", "data-connectors-providers"]);
+ expect(t.textContent).not.toContain("Connections");
+ expect(t.textContent).not.toMatch(/Use Cua from Terminal/);
+ expect(t.querySelector("[data-settings-cli]")).toBeNull();
expect(document.querySelector("[data-agent-key-add-other]")).not.toBeNull();
- expect(text).not.toMatch(/provider key/i);
+ expect(t.textContent).not.toMatch(/provider key/i);
+ });
+
+ it("keeps Use Cua from Terminal reachable, in General", async () => {
+ await mountApp("/settings/general", { ...host, demo: { cli: "missing" } });
+ await waitFor(() => expect(document.querySelector('[data-settings-cli="missing"]')).not.toBeNull(), { timeout: 8000 });
+ expect(tab("general")!.textContent).toContain("Use Cua from Terminal");
});
it("moves Early releases here from About, and drops the Sharing and Your cloud switches", async () => {
diff --git a/apps/cua-spaces-web/src/bridge/__tests__/contract-args.ts b/apps/cua-spaces-web/src/bridge/__tests__/contract-args.ts
index f066f85a78..78cd1f31c3 100644
--- a/apps/cua-spaces-web/src/bridge/__tests__/contract-args.ts
+++ b/apps/cua-spaces-web/src/bridge/__tests__/contract-args.ts
@@ -98,6 +98,7 @@ export const DEMO_ARGS: { [K in OpName]: OpArgs<K> } = {
"agentKeys.check": {},
"agentKeys.set": { provider: "anthropic", value: "sk-ant-test-0000" },
"agentKeys.remove": { env: "ANTHROPIC_API_KEY" },
+ "agentKeys.use": { app: "hermes", env: "OPENAI_API_KEY" },
"agentKeys.shell": {},
"agentKeys.fromShell": { env: "ANTHROPIC_API_KEY" },
"volume.overview": {},
diff --git a/apps/cua-spaces-web/src/bridge/adapters/demo/agent-keys.ts b/apps/cua-spaces-web/src/bridge/adapters/demo/agent-keys.ts
index de67e0d303..0d978ef267 100644
--- a/apps/cua-spaces-web/src/bridge/adapters/demo/agent-keys.ts
+++ b/apps/cua-spaces-web/src/bridge/adapters/demo/agent-keys.ts
@@ -8,7 +8,7 @@
import { HostError } from "../../adapter";
import { PROVIDER_REGISTRY } from "../../generated/providers";
-import type { AgentKeyInfo, AgentKeyProvider, AgentKeysReport } from "../../ops/agent-keys";
+import type { AgentKeyInfo, AgentKeyProvider, AgentKeyUse, AgentKeysReport } from "../../ops/agent-keys";
import type { DemoHandlers } from "./context";
/** The registry's providers that take a key, as the daemon lists them. */
@@ -19,6 +19,8 @@ const providerOf = (env: string): AgentKeyProvider => PROVIDERS.find((p) => p.en
/** The demo's saved keys, shared with Connect (a sign-in Connect copies lands here, as in the daemon's store). */
export interface DemoKeyStore {
keys: AgentKeyInfo[];
+ /** Which saved credential each app that takes any provider uses (`agentKeys.use`). */
+ uses: Record<string, AgentKeyUse>;
/** Variables the provider refuses: a check marks them `expired` (needs a reconnect). `?demo=rejected-key`. */
rejected: string[];
}
@@ -44,6 +46,7 @@ export const demoKeyStore = (now: () => number, rejected: string[] = [], claude?
...(chatgpt ? [{ provider: "other" as const, env: "CODEX_AUTH_JSON", last4: "", addedMs: now() - 3 * 3600_000, label: "Signed in with ChatGPT" }] : []),
],
rejected,
+ uses: {},
});
export function demoAgentKeysHandlers({
@@ -56,9 +59,9 @@ export function demoAgentKeysHandlers({
stepMs: number;
now: () => number;
store?: DemoKeyStore;
-}): DemoHandlers<"agentKeys.list" | "agentKeys.check" | "agentKeys.set" | "agentKeys.remove" | "agentKeys.shell" | "agentKeys.fromShell"> {
+}): DemoHandlers<"agentKeys.list" | "agentKeys.check" | "agentKeys.set" | "agentKeys.remove" | "agentKeys.use" | "agentKeys.shell" | "agentKeys.fromShell"> {
const keys = () => store.keys;
- const report = (): AgentKeysReport => ({ keys: keys().map((k) => ({ ...k })), providers: PROVIDERS, available: true, unavailable: null });
+ const report = (): AgentKeysReport => ({ keys: keys().map((k) => ({ ...k })), ...(Object.keys(store.uses).length ? { uses: { ...store.uses } } : {}), providers: PROVIDERS, available: true, unavailable: null });
return {
"agentKeys.list": () => report(),
// The providers answer: the keys they refuse need a reconnect, and a key saved again is not refused.
@@ -67,7 +70,7 @@ export function demoAgentKeysHandlers({
const r = report();
return { ...r, keys: r.keys.map((k) => (store.rejected.includes(k.env) ? { ...k, expired: true } : k)) };
},
- "agentKeys.set": async ({ provider, env, value, region, fields }) => {
+ "agentKeys.set": async ({ provider, env, value, region, fields, add, label }) => {
const name = provider === "other" ? (env ?? "").trim() : PROVIDERS.find((p) => p.id === provider)?.env;
if (!name) throw new HostError(`unknown provider ${provider}`);
// The core's sheet refuses unsafe names before Save; the daemon checks again.
@@ -79,12 +82,13 @@ export function demoAgentKeysHandlers({
// The Keychain write.
await wait(stepMs / 2);
store.rejected = store.rejected.filter((e) => e !== name);
+ // Another key goes beside the first one (named); saving the first again replaces only it.
+ const slot = add && keys().some((k) => k.env === name && !k.slot) ? `k${now().toString(16)}` : undefined;
+ if (label && (label.length > 40 || /[\u0000-\u001f]/.test(label))) throw new HostError("a key's name must be one line of at most 40 characters");
store.keys = [
- ...keys().filter((k) => k.env !== name),
- { provider: providerOf(name), env: name, last4: v.length >= 12 ? v.slice(-4) : "", addedMs: now(), ...(region ? { region } : {}), ...(fields && Object.keys(fields).length ? { fields } : {}) },
- ].sort(
- (a, b) => a.env.localeCompare(b.env),
- );
+ ...keys().filter((k) => !(k.env === name && !k.slot && !slot)),
+ { provider: providerOf(name), env: name, ...(slot ? { slot } : {}), last4: v.length >= 12 ? v.slice(-4) : "", addedMs: now(), ...(label?.trim() ? { label: label.trim() } : {}), ...(region ? { region } : {}), ...(fields && Object.keys(fields).length ? { fields } : {}) },
+ ].sort((a, b) => a.env.localeCompare(b.env) || (a.slot ?? "").localeCompare(b.slot ?? ""));
return report();
},
// The demo's shell exports an Anthropic key (`?demo=…` none needed): Use it saves a copy.
@@ -98,9 +102,29 @@ export function demoAgentKeysHandlers({
store.keys = [...keys().filter((k) => k.env !== env), { provider: "anthropic", env, last4: "a91c", addedMs: now() }];
return report();
},
- "agentKeys.remove": async ({ env }) => {
+ "agentKeys.remove": async ({ env, slot, keepOthers }) => {
await wait(stepMs / 2);
- store.keys = keys().filter((k) => k.env !== env);
+ if (slot) store.keys = keys().filter((k) => !(k.env === env && k.slot === slot));
+ else if (keepOthers) {
+ const rest = keys().filter((k) => !(k.env === env && !k.slot));
+ const next = rest.filter((k) => k.env === env && k.slot).sort((x, y) => x.addedMs - y.addedMs)[0];
+ // An app that was told to use the removed first key has no credential; it does not move onto the next.
+ for (const u of Object.values(store.uses)) if (u.env === env && !u.slot) u.slot = "removed";
+ store.keys = rest.map((k) => (k === next ? (({ slot: _slot, ...r }) => r)(k) : k));
+ } else store.keys = keys().filter((k) => k.env !== env);
+ return report();
+ },
+ // Which credential an app uses: one that is saved and that the app can read (the demo knows the apps that take any provider).
+ "agentKeys.use": async ({ app, env, slot }) => {
+ await wait(stepMs / 2);
+ if (!["hermes", "opencode", "goose", "pi", "openclaw"].includes(app)) throw new HostError(`${app} reads one fixed sign-in; there is nothing to choose`);
+ if (!env) {
+ delete store.uses[app];
+ return report();
+ }
+ const k = keys().find((x) => x.env === env && (x.slot ?? undefined) === (slot ?? undefined) && !x.expired);
+ if (!k || env === "CLAUDE_CODE_OAUTH_TOKEN" || env === "CODEX_AUTH_JSON") throw new HostError("that key isn't saved, or has stopped working");
+ store.uses[app] = { provider: k.provider, env: k.env, ...(k.slot ? { slot: k.slot } : {}) };
return report();
},
};
diff --git a/apps/cua-spaces-web/src/bridge/agent-keys.ts b/apps/cua-spaces-web/src/bridge/agent-keys.ts
index 60deefd29e..debe37f7d3 100644
--- a/apps/cua-spaces-web/src/bridge/agent-keys.ts
+++ b/apps/cua-spaces-web/src/bridge/agent-keys.ts
@@ -23,7 +23,12 @@ import type { AgentKeyProvider, AgentKeysReport, KeyChoices } from "./ops/agent-
/** What the section shows (`agent_keys::AgentKeysInput`). */
export interface AgentKeysInput {
- keys: { provider: string; env: string; last4: string; addedMs: number; expired?: boolean; label?: string; region?: string; fields?: Record<string, string> }[];
+ /** The first key saved for each variable. */
+ keys: { provider: string; env: string; slot?: string; last4: string; addedMs: number; expired?: boolean; label?: string; region?: string; fields?: Record<string, string> }[];
+ /** Keys saved beside the first for the same variable (named; an app that takes any provider can use one). */
+ extras?: { provider: string; env: string; slot?: string; last4: string; addedMs: number; expired?: boolean; label?: string; region?: string; fields?: Record<string, string> }[];
+ /** Which credential each app that takes any provider uses, by app. */
+ uses?: Record<string, { provider: string; env: string; slot?: string }>;
unavailable?: string | null;
error?: string | null;
}
@@ -82,17 +87,22 @@ export interface AgentKeyConfirm {
cancelLabel: string;
}
+const keyInput = ({ provider, env, slot, last4, addedMs, expired, label, region, fields }: AgentKeysReport["keys"][number]) => ({
+ provider,
+ env,
+ ...(slot ? { slot } : {}),
+ last4,
+ addedMs,
+ ...(expired ? { expired: true } : {}),
+ ...(label ? { label } : {}),
+ ...(region ? { region } : {}),
+ ...(fields && Object.keys(fields).length ? { fields } : {}),
+});
+
export const agentKeysInputOf = (report: AgentKeysReport | undefined, error: Error | null): AgentKeysInput => ({
- keys: (report?.keys ?? []).map(({ provider, env, last4, addedMs, expired, label, region, fields }) => ({
- provider,
- env,
- last4,
- addedMs,
- ...(expired ? { expired: true } : {}),
- ...(label ? { label } : {}),
- ...(region ? { region } : {}),
- ...(fields && Object.keys(fields).length ? { fields } : {}),
- })),
+ keys: (report?.keys ?? []).filter((k) => !k.slot).map(keyInput),
+ ...((report?.keys ?? []).some((k) => k.slot) ? { extras: (report?.keys ?? []).filter((k) => k.slot).map(keyInput) } : {}),
+ ...(report?.uses && Object.keys(report.uses).length ? { uses: report.uses } : {}),
unavailable: report?.available === false ? (report.unavailable ?? "this machine can't keep keys") : null,
error: error ? error.message : null,
});
@@ -227,22 +237,31 @@ export class AgentKeysStore {
}
/** Saves a key; the list after it replaces the shown one. Throws the host's words. */
- async save(provider: AgentKeyProvider, value: string, env: string | null, choices: KeyChoices = {}): Promise<void> {
+ async save(provider: AgentKeyProvider, value: string, env: string | null, choices: KeyChoices = {}, more: { add?: boolean; label?: string } = {}): Promise<void> {
this.epoch++;
- const report = await this.adapter.call("agentKeys.set", { provider, value, env, ...choices });
+ const report = await this.adapter.call("agentKeys.set", { provider, value, env, ...choices, ...more });
this.epoch++;
this.pinned = false;
this.set({ report, error: null, sheet: null });
}
- async remove(env: string): Promise<void> {
+ async remove(env: string, which: { slot?: string; keepOthers?: boolean } = {}): Promise<void> {
this.epoch++;
- const report = await this.adapter.call("agentKeys.remove", { env });
+ const report = await this.adapter.call("agentKeys.remove", { env, ...which });
this.epoch++;
this.pinned = false;
this.set({ report, error: null, removing: null });
}
+ /** Tells `app` which saved credential to use from its next run (none: the first that works). Throws the host's words. */
+ async use(app: string, choice: { env: string; slot?: string } | null): Promise<void> {
+ this.epoch++;
+ const report = await this.adapter.call("agentKeys.use", { app, ...(choice ? { env: choice.env, ...(choice.slot ? { slot: choice.slot } : {}) } : {}) });
+ this.epoch++;
+ this.pinned = false;
+ this.set({ report, error: null });
+ }
+
openSheet(provider: AgentKeyProvider, env: string | null = null): void {
this.set({ sheet: { provider, env }, removing: null });
}
@@ -258,7 +277,8 @@ export class AgentKeysStore {
this.pinned = true;
this.loaded = true;
const report: AgentKeysReport = {
- keys: input.keys.map((k) => ({ ...k })),
+ keys: [...input.keys, ...(input.extras ?? [])].map((k) => ({ ...k })),
+ ...(input.uses ? { uses: input.uses } : {}),
providers: [],
available: !input.unavailable,
unavailable: input.unavailable ?? null,
@@ -288,8 +308,10 @@ export interface AgentKeysHook extends AgentKeysState {
/** The list after the providers were asked whether the saved keys still work. */
check(): Promise<void>;
/** Adds or replaces a key; `env` names an Other key. */
- save(provider: AgentKeyProvider, value: string, env: string | null, choices?: KeyChoices): Promise<void>;
- remove(env: string): Promise<void>;
+ save(provider: AgentKeyProvider, value: string, env: string | null, choices?: KeyChoices, more?: { add?: boolean; label?: string }): Promise<void>;
+ remove(env: string, which?: { slot?: string; keepOthers?: boolean }): Promise<void>;
+ /** Tells `app` which saved credential to use (null: the first that works). */
+ use(app: string, choice: { env: string; slot?: string } | null): Promise<void>;
openSheet(provider: AgentKeyProvider, env?: string | null): void;
closeSheet(): void;
askRemove(env: string | null): void;
@@ -330,8 +352,9 @@ export function useAgentKeys({ watch = false }: { watch?: boolean } = {}): Agent
core: ctx.core,
refresh: () => (store ? store.refresh() : Promise.resolve()),
check: () => (store ? store.check() : Promise.resolve()),
- save: (provider, value, env, choices) => need().save(provider, value, env, choices),
- remove: (env) => need().remove(env),
+ save: (provider, value, env, choices, more) => need().save(provider, value, env, choices, more),
+ remove: (env, which) => need().remove(env, which),
+ use: (app, choice) => need().use(app, choice),
openSheet: (provider, env = null) => store?.openSheet(provider, env),
closeSheet: () => store?.closeSheet(),
askRemove: (env) => store?.askRemove(env),
diff --git a/apps/cua-spaces-web/src/bridge/connectors.ts b/apps/cua-spaces-web/src/bridge/connectors.ts
index 1ac1d502d7..ec8983b3ec 100644
--- a/apps/cua-spaces-web/src/bridge/connectors.ts
+++ b/apps/cua-spaces-web/src/bridge/connectors.ts
@@ -30,7 +30,12 @@ export interface ConnectorAppInput {
export interface ConnectorsInput {
apps: ConnectorAppInput[];
- keys: AgentKeysInput;
+ /** The first key saved for each variable. */
+ keys: Omit<AgentKeysInput, "extras" | "uses">;
+ /** Keys saved beside the first for the same variable. */
+ keyExtras?: NonNullable<AgentKeysInput["extras"]>;
+ /** Which credential each app that takes any provider uses, by app. */
+ uses?: NonNullable<AgentKeysInput["uses"]>;
shellKeys: string[];
auto: boolean;
off: string[];
@@ -216,6 +221,32 @@ export interface ConnectorToggle {
enabled: boolean;
}
+/** One credential an app can use (a row of the Uses menu). */
+export interface UseOption {
+ provider: string;
+ providerName: string;
+ icon: string;
+ env: string;
+ slot: string | null;
+ /** "API key ending 4f2a", or the key's own name. */
+ line: string;
+ model: string | null;
+ selected: boolean;
+}
+
+/** An app's Uses row: which saved credential it runs with, and the others it could. */
+export interface AppUses {
+ title: string;
+ state: "connected" | "not-connected" | "gone";
+ status: string;
+ current: UseOption | null;
+ options: UseOption[];
+ chosen: boolean;
+ connectLabel: string;
+ note: string;
+ enabled: boolean;
+}
+
export interface AppDetailView {
agent: string;
name: string;
@@ -226,6 +257,8 @@ export interface AppDetailView {
toolsTitle: string;
toggles: ConnectorToggle[];
signInTitle: string;
+ /** Which credential the app uses (an app that takes any provider); it replaces `signIn`. */
+ uses: AppUses | null;
signIn: { title: string; status: string; connected: boolean; way: string; provider: string; button: ConnectorButton } | null;
signInNote: string | null;
settingsFileLabel: string;
@@ -260,7 +293,9 @@ export function connectorsInputOf(
mcp: r.mcpConfig ? r.configured || /MCP/i.test(r.detail) : null,
mcpConfig: r.mcpConfig,
})),
- keys,
+ keys: { keys: keys.keys, unavailable: keys.unavailable, error: keys.error },
+ ...(keys.extras?.length ? { keyExtras: keys.extras } : {}),
+ ...(keys.uses && Object.keys(keys.uses).length ? { uses: keys.uses } : {}),
shellKeys: extra.shellKeys ?? [],
auto: extra.auto ?? false,
off: extra.off ?? [],
diff --git a/apps/cua-spaces-web/src/bridge/contracts/bridge-shapes.json b/apps/cua-spaces-web/src/bridge/contracts/bridge-shapes.json
index e3307e05f0..374ba7ed2e 100644
--- a/apps/cua-spaces-web/src/bridge/contracts/bridge-shapes.json
+++ b/apps/cua-spaces-web/src/bridge/contracts/bridge-shapes.json
@@ -186,6 +186,9 @@
"env": {
"type": "string"
},
+ "slot": {
+ "type": "string"
+ },
"last4": {
"type": "string"
},
@@ -216,6 +219,27 @@
]
}
},
+ "uses": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string"
+ },
+ "env": {
+ "type": "string"
+ },
+ "slot": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "provider",
+ "env"
+ ]
+ }
+ },
"providers": {
"type": "array",
"items": {
@@ -7294,6 +7318,9 @@
"names"
]
},
+ "agentKeys.use": {
+ "$ref": "#/$defs/AgentKeysReport"
+ },
"agents.addRoutine": {
"type": "null"
},
@@ -9337,6 +9364,9 @@
"env": {
"type": "string"
},
+ "slot": {
+ "type": "string"
+ },
"last4": {
"type": "string"
},
@@ -9367,6 +9397,27 @@
]
}
},
+ "uses": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string"
+ },
+ "env": {
+ "type": "string"
+ },
+ "slot": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "provider",
+ "env"
+ ]
+ }
+ },
"providers": {
"type": "array",
"items": {
@@ -9418,6 +9469,9 @@
"env": {
"type": "string"
},
+ "slot": {
+ "type": "string"
+ },
"last4": {
"type": "string"
},
@@ -9448,6 +9502,27 @@
]
}
},
+ "uses": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string"
+ },
+ "env": {
+ "type": "string"
+ },
+ "slot": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "provider",
+ "env"
+ ]
+ }
+ },
"providers": {
"type": "array",
"items": {
@@ -9499,6 +9574,9 @@
"env": {
"type": "string"
},
+ "slot": {
+ "type": "string"
+ },
"last4": {
"type": "string"
},
@@ -9529,6 +9607,27 @@
]
}
},
+ "uses": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string"
+ },
+ "env": {
+ "type": "string"
+ },
+ "slot": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "provider",
+ "env"
+ ]
+ }
+ },
"providers": {
"type": "array",
"items": {
@@ -9580,6 +9679,9 @@
"env": {
"type": "string"
},
+ "slot": {
+ "type": "string"
+ },
"last4": {
"type": "string"
},
@@ -9610,6 +9712,27 @@
]
}
},
+ "uses": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string"
+ },
+ "env": {
+ "type": "string"
+ },
+ "slot": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "provider",
+ "env"
+ ]
+ }
+ },
"providers": {
"type": "array",
"items": {
@@ -9661,6 +9784,9 @@
"env": {
"type": "string"
},
+ "slot": {
+ "type": "string"
+ },
"last4": {
"type": "string"
},
@@ -9691,6 +9817,27 @@
]
}
},
+ "uses": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string"
+ },
+ "env": {
+ "type": "string"
+ },
+ "slot": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "provider",
+ "env"
+ ]
+ }
+ },
"providers": {
"type": "array",
"items": {
@@ -9742,6 +9889,111 @@
"names"
]
},
+ "agentKeys.use": {
+ "type": "object",
+ "properties": {
+ "keys": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string"
+ },
+ "env": {
+ "type": "string"
+ },
+ "slot": {
+ "type": "string"
+ },
+ "last4": {
+ "type": "string"
+ },
+ "added_ms": {
+ "type": "number"
+ },
+ "expired": {
+ "type": "boolean"
+ },
+ "label": {
+ "type": "string"
+ },
+ "region": {
+ "type": "string"
+ },
+ "fields": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ }
+ },
+ "required": [
+ "provider",
+ "env",
+ "last4",
+ "added_ms"
+ ]
+ }
+ },
+ "uses": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string"
+ },
+ "env": {
+ "type": "string"
+ },
+ "slot": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "provider",
+ "env"
+ ]
+ }
+ },
+ "providers": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "env": {
+ "type": "string"
+ },
+ "label": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "env"
+ ]
+ }
+ },
+ "available": {
+ "type": "boolean"
+ },
+ "unavailable": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "keys",
+ "providers",
+ "available"
+ ]
+ },
"agents.addRoutine": {
"type": "null"
},
diff --git a/apps/cua-spaces-web/src/bridge/contracts/shapes.ts b/apps/cua-spaces-web/src/bridge/contracts/shapes.ts
index 35dc25267a..49dbbf5ab6 100644
--- a/apps/cua-spaces-web/src/bridge/contracts/shapes.ts
+++ b/apps/cua-spaces-web/src/bridge/contracts/shapes.ts
@@ -567,7 +567,8 @@ const NotificationShape = ref(
const AgentKeysShape = ref(
"AgentKeysReport",
obj<AgentKeysReport>()({
- keys: list(object({ provider: str, env: str, last4: str, addedMs: num, expired: opt(bool), label: opt(str), region: opt(str), fields: opt(dict(str)) })),
+ keys: list(object({ provider: str, env: str, slot: opt(str), last4: str, addedMs: num, expired: opt(bool), label: opt(str), region: opt(str), fields: opt(dict(str)) })),
+ uses: opt(dict(object({ provider: str, env: str, slot: opt(str) }))),
providers: list(object({ id: str, label: str, env: str })),
available: bool,
unavailable: nullable(str),
@@ -1346,6 +1347,7 @@ export const OP_SHAPES: Record<OpName, Schema> = {
"agentKeys.check": AgentKeysShape,
"agentKeys.set": AgentKeysShape,
"agentKeys.remove": AgentKeysShape,
+ "agentKeys.use": AgentKeysShape,
"agentKeys.shell": object({ names: list(str) }),
"agentKeys.fromShell": AgentKeysShape,
@@ -1664,7 +1666,8 @@ const WkMachinesShape = ref(
/** The daemon's `agent_keys.*` answer, which `agentKeysFromWire` reads. */
const AgentKeysWire = object({
- keys: list(object({ provider: str, env: str, last4: str, added_ms: num, expired: opt(bool), label: opt(str), region: opt(str), fields: opt(dict(str)) })),
+ keys: list(object({ provider: str, env: str, slot: opt(str), last4: str, added_ms: num, expired: opt(bool), label: opt(str), region: opt(str), fields: opt(dict(str)) })),
+ uses: opt(dict(object({ provider: str, env: str, slot: opt(str) }))),
providers: list(object({ id: str, env: str, label: opt(str) })),
available: bool,
unavailable: optNull(str),
@@ -1784,6 +1787,7 @@ export const WEBKIT_SHAPES: Partial<Record<WebkitMethod, Schema>> = {
"agentKeys.check": AgentKeysWire,
"agentKeys.set": AgentKeysWire,
"agentKeys.remove": AgentKeysWire,
+ "agentKeys.use": AgentKeysWire,
"agentKeys.shell": object({ names: list(str) }),
"agentKeys.fromShell": AgentKeysWire,
"clouds.status": nullable(OP_SHAPES["clouds.status"]),
diff --git a/apps/cua-spaces-web/src/bridge/ops/agent-keys.ts b/apps/cua-spaces-web/src/bridge/ops/agent-keys.ts
index 524ab54b06..e4034e8f6e 100644
--- a/apps/cua-spaces-web/src/bridge/ops/agent-keys.ts
+++ b/apps/cua-spaces-web/src/bridge/ops/agent-keys.ts
@@ -18,7 +18,8 @@
* |---|---|---|
* | `agentKeys.list` | `agent_keys.list` | `agentKeys.list` → `PersistentModel.daemonTool` |
* | `agentKeys.set {provider, env?, value}` | `agent_keys.set` | `agentKeys.set` |
- * | `agentKeys.remove {env}` | `agent_keys.remove` | `agentKeys.remove` |
+ * | `agentKeys.remove {env, slot?, keepOthers?}` | `agent_keys.remove` | `agentKeys.remove` |
+ * | `agentKeys.use {app, env?, slot?}` | `agent_keys.use` | `agentKeys.use` |
*
* The Electron shell answers the SwiftUI host's methods.
*/
@@ -34,6 +35,8 @@ export interface AgentKeyInfo {
provider: AgentKeyProvider;
/** The variable a run gets it as. */
env: string;
+ /** Which of several keys saved for the same variable this is; absent for the first one. */
+ slot?: string;
/** Its last four characters; empty for a short key. */
last4: string;
/** When it was added (Unix ms). */
@@ -56,6 +59,13 @@ export interface KeyChoices {
fields?: Record<string, string>;
}
+/** The credential an app was told to use (`keys::UseChoice`): names only. */
+export interface AgentKeyUse {
+ provider: AgentKeyProvider;
+ env: string;
+ slot?: string;
+}
+
/** A provider row (`keys::Provider`). */
export interface AgentKeyProviderRow {
id: AgentKeyProvider;
@@ -66,6 +76,8 @@ export interface AgentKeyProviderRow {
/** `agent_keys.list` (`keys::KeysReport`). */
export interface AgentKeysReport {
keys: AgentKeyInfo[];
+ /** Which credential each app that takes any provider uses, by app (an app not listed uses the first that works). */
+ uses?: Record<string, AgentKeyUse>;
providers: AgentKeyProviderRow[];
/** Keys can be saved on this machine. */
available: boolean;
@@ -84,10 +96,22 @@ declare module "../protocol" {
* is listed as it is.
*/
"agentKeys.check": { args: Record<string, never>; result: AgentKeysReport };
- /** Adds or replaces a key; `env` names an `other` key. Answers the list after. */
- "agentKeys.set": { args: { provider: AgentKeyProvider; env?: string | null; value: string } & KeyChoices; result: AgentKeysReport };
- /** Removes the key named `env`. Answers the list after. */
- "agentKeys.remove": { args: { env: string }; result: AgentKeysReport };
+ /**
+ * Adds or replaces a key; `env` names an `other` key. With `add` it is saved as another key
+ * beside the first one for the provider (named `label`); it replaces nothing. Answers the list after.
+ */
+ "agentKeys.set": { args: { provider: AgentKeyProvider; env?: string | null; value: string; add?: boolean; label?: string } & KeyChoices; result: AgentKeysReport };
+ /**
+ * Removes the key named `env` and every key saved beside it, or with `slot` only that one, or with
+ * `keepOthers` only the first (the oldest of the others takes its place). Answers the list after.
+ */
+ "agentKeys.remove": { args: { env: string; slot?: string; keepOthers?: boolean }; result: AgentKeysReport };
+ /**
+ * Tells an app that takes any provider (Hermes, OpenCode, Goose, Pi, OpenClaw) which saved credential to
+ * use from its next run; without `env`, the first one that works again. Signs nothing out and deletes
+ * nothing. Answers the list after.
+ */
+ "agentKeys.use": { args: { app: string; env?: string; slot?: string }; result: AgentKeysReport };
/** Which provider keys your login shell has set (names only; never a value). */
"agentKeys.shell": { args: Record<string, never>; result: { names: string[] } };
/** Saves the key `env` from your login shell (the value goes straight to the store). Answers the list after. */
@@ -95,7 +119,7 @@ declare module "../protocol" {
}
}
-export const AGENT_KEYS_OPERATIONS = ["agentKeys.list", "agentKeys.check", "agentKeys.set", "agentKeys.remove", "agentKeys.shell", "agentKeys.fromShell"] as const;
+export const AGENT_KEYS_OPERATIONS = ["agentKeys.list", "agentKeys.check", "agentKeys.set", "agentKeys.remove", "agentKeys.use", "agentKeys.shell", "agentKeys.fromShell"] as const;
export type AgentKeysOp = (typeof AGENT_KEYS_OPERATIONS)[number];
/** The SwiftUI host routes each under its own name. */
@@ -107,6 +131,7 @@ export const AGENT_KEYS_METHODS = {
"agentKeys.check": "agent_keys.check",
"agentKeys.set": "agent_keys.set",
"agentKeys.remove": "agent_keys.remove",
+ "agentKeys.use": "agent_keys.use",
"agentKeys.shell": "agent_keys.shell",
"agentKeys.fromShell": "agent_keys.from_shell",
} as const satisfies { [K in AgentKeysOp]: string };
@@ -116,6 +141,7 @@ export const AGENT_KEYS_COVERAGE = {
"agentKeys.check": { webkit: { methods: ["agentKeys.check"] }, tauri: ["agents_tool"] },
"agentKeys.set": { webkit: { methods: ["agentKeys.set"] }, tauri: ["agents_tool"] },
"agentKeys.remove": { webkit: { methods: ["agentKeys.remove"] }, tauri: ["agents_tool"] },
+ "agentKeys.use": { webkit: { methods: ["agentKeys.use"] }, tauri: ["agents_tool"] },
"agentKeys.shell": { webkit: { methods: ["agentKeys.shell"] }, tauri: ["agents_tool"] },
"agentKeys.fromShell": { webkit: { methods: ["agentKeys.fromShell"] }, tauri: ["agents_tool"] },
} as const satisfies Record<AgentKeysOp, OpCoverage>;
@@ -126,6 +152,7 @@ export const AGENT_KEYS_ARGS: { [K in AgentKeysOp]: OpArgs<K> } = {
"agentKeys.check": {},
"agentKeys.set": { provider: "anthropic", value: "sk-ant-test-0000" },
"agentKeys.remove": { env: "ANTHROPIC_API_KEY" },
+ "agentKeys.use": { app: "hermes", env: "OPENAI_API_KEY" },
"agentKeys.shell": {},
"agentKeys.fromShell": { env: "ANTHROPIC_API_KEY" },
};
@@ -158,15 +185,24 @@ export function agentKeysFromWire(raw: unknown): AgentKeysReport {
const env = str(r.env);
if (!env) return [];
const added = r.added_ms ?? r.addedMs;
- return [{ provider: providerOf(r.provider), env, last4: str(r.last4).slice(-4), addedMs: typeof added === "number" ? added : 0, ...(r.expired === true ? { expired: true } : {}), ...(label(r.label) ? { label: label(r.label) } : {}), ...(line(r.region) ? { region: line(r.region) } : {}), ...(Object.keys(fieldsOf(r.fields)).length ? { fields: fieldsOf(r.fields) } : {}) }];
+ const slot = typeof r.slot === "string" && /^[A-Za-z0-9_-]{1,40}$/.test(r.slot) ? r.slot : "";
+ return [{ provider: providerOf(r.provider), env, ...(slot ? { slot } : {}), last4: str(r.last4).slice(-4), addedMs: typeof added === "number" ? added : 0, ...(r.expired === true ? { expired: true } : {}), ...(label(r.label) ? { label: label(r.label) } : {}), ...(line(r.region) ? { region: line(r.region) } : {}), ...(Object.keys(fieldsOf(r.fields)).length ? { fields: fieldsOf(r.fields) } : {}) }];
});
const providers = (Array.isArray(o.providers) ? o.providers : []).flatMap((p): AgentKeyProviderRow[] => {
const r = (p ?? {}) as Record<string, unknown>;
const id = providerOf(r.id);
return id === "other" || !str(r.env) ? [] : [{ id, label: str(r.label) || id, env: str(r.env) }];
});
+ const uses: Record<string, AgentKeyUse> = {};
+ for (const [app, u] of Object.entries(o.uses && typeof o.uses === "object" && !Array.isArray(o.uses) ? (o.uses as Record<string, unknown>) : {})) {
+ const r = (u ?? {}) as Record<string, unknown>;
+ if (!/^[a-z0-9-]{1,40}$/.test(app) || !str(r.env)) continue;
+ const slot = typeof r.slot === "string" && /^[A-Za-z0-9_-]{1,40}$/.test(r.slot) ? r.slot : "";
+ uses[app] = { provider: providerOf(r.provider), env: str(r.env), ...(slot ? { slot } : {}) };
+ }
return {
keys,
+ ...(Object.keys(uses).length ? { uses } : {}),
providers: providers.length ? providers : PROVIDERS,
available: o.available !== false,
unavailable: typeof o.unavailable === "string" && o.unavailable ? o.unavailable : null,
@@ -178,8 +214,12 @@ const choicesOf = ({ region, fields }: KeyChoices) => ({
...(region ? { region } : {}),
...(fields && Object.keys(fields).length ? { fields } : {}),
});
-const setArgs = ({ provider, env, value, region, fields }: OpArgs<"agentKeys.set">) =>
- provider === "other" ? { provider, env: (env ?? "").trim(), value, ...choicesOf({ region, fields }) } : { provider, value, ...choicesOf({ region, fields }) };
+const setArgs = ({ provider, env, value, region, fields, add, label }: OpArgs<"agentKeys.set">) => {
+ const more = { ...(add ? { add: true } : {}), ...(label?.trim() ? { label: label.trim() } : {}) };
+ return provider === "other" ? { provider, env: (env ?? "").trim(), value, ...choicesOf({ region, fields }), ...more } : { provider, value, ...choicesOf({ region, fields }), ...more };
+};
+/** The arguments `agent_keys.remove` takes (the daemon's `keep_others`). */
+const removeArgs = ({ env, slot, keepOthers }: OpArgs<"agentKeys.remove">) => ({ env, ...(slot ? { slot } : {}), ...(keepOthers ? { keep_others: true } : {}) });
type Handlers = { [K in AgentKeysOp]: (args: OpArgs<K>) => Promise<OpResult<K>> };
type Invoke = <T>(cmd: string, args?: Record<string, unknown>) => Promise<T>;
@@ -199,7 +239,8 @@ export function tauriAgentKeysOps(invoke: Invoke): Handlers {
"agentKeys.list": () => tool("agentKeys.list"),
"agentKeys.check": () => tool("agentKeys.check"),
"agentKeys.set": (args) => tool("agentKeys.set", setArgs(args)),
- "agentKeys.remove": ({ env }) => tool("agentKeys.remove", { env }),
+ "agentKeys.remove": (args) => tool("agentKeys.remove", removeArgs(args)),
+ "agentKeys.use": ({ app, env, slot }) => tool("agentKeys.use", { app, ...(env ? { env } : {}), ...(slot ? { slot } : {}) }),
"agentKeys.shell": async () => shellNamesFromWire(await invoke<unknown>("agents_tool", { tool: AGENT_KEYS_METHODS["agentKeys.shell"], args: {} })),
"agentKeys.fromShell": ({ env, region, fields }) => tool("agentKeys.fromShell", { env, ...choicesOf({ region, fields }) }),
};
@@ -212,7 +253,8 @@ export function webkitAgentKeysOps(request: Request): Handlers {
"agentKeys.list": () => call("agentKeys.list"),
"agentKeys.check": () => call("agentKeys.check"),
"agentKeys.set": (args) => call("agentKeys.set", setArgs(args)),
- "agentKeys.remove": ({ env }) => call("agentKeys.remove", { env }),
+ "agentKeys.remove": (args) => call("agentKeys.remove", removeArgs(args)),
+ "agentKeys.use": ({ app, env, slot }) => call("agentKeys.use", { app, ...(env ? { env } : {}), ...(slot ? { slot } : {}) }),
"agentKeys.shell": async () => shellNamesFromWire(await request<unknown>("agentKeys.shell", {})),
"agentKeys.fromShell": ({ env, region, fields }) => call("agentKeys.fromShell", { env, ...choicesOf({ region, fields }) }),
};
diff --git a/apps/cua-spaces-web/src/components/__tests__/notices-dialog.test.tsx b/apps/cua-spaces-web/src/components/__tests__/notices-dialog.test.tsx
index 224266fe1a..e8f5ff3cd4 100644
--- a/apps/cua-spaces-web/src/components/__tests__/notices-dialog.test.tsx
+++ b/apps/cua-spaces-web/src/components/__tests__/notices-dialog.test.tsx
@@ -37,6 +37,6 @@ describe("NoticesDialog (About, Acknowledgements)", () => {
it("draws a notices table as a list (the Markdown view has no tables)", () => {
const md = "Intro\n\n| Project | Used in |\n|---|---|\n| A @ 1 | x.swift |\n| B | y.swift |\n\nAfter";
- expect(tablesAsLists(md)).toBe("Intro\n\n- A @ 1 · x.swift\n- B · y.swift\n\nAfter");
+ expect(tablesAsLists(md)).toBe("Intro\n\n- A @ 1, x.swift\n- B, y.swift\n\nAfter");
});
});
diff --git a/apps/cua-spaces-web/src/components/agents/harness-mark.tsx b/apps/cua-spaces-web/src/components/agents/harness-mark.tsx
index 2c8439d876..236abb2471 100644
--- a/apps/cua-spaces-web/src/components/agents/harness-mark.tsx
+++ b/apps/cua-spaces-web/src/components/agents/harness-mark.tsx
@@ -17,6 +17,46 @@ const M = "/onboarding/marks/";
const both = (file: string, scale?: number): AppMark => ({ light: M + file, dark: M + file, scale });
const pair = (id: string, scale?: number): AppMark => ({ light: `${M}mark-${id}.svg`, dark: `${M}mark-${id}-dark.svg`, scale });
+/** A provider's one-colour mark, drawn once in dark ink and once in light ink (public/onboarding/marks/providers). */
+const providerMark = (name: string): AppMark => ({ light: `${M}providers/${name}.svg`, dark: `${M}providers/${name}-dark.svg`, scale: 0.9 });
+
+/** The providers with a mark (keyed `provider:<id>`, as the Providers list asks for them). The rest get the letter tile. */
+const PROVIDER_MARKS: Record<string, AppMark> = {
+ "provider:openrouter": providerMark("openrouter"),
+ "provider:xai": providerMark("xai"),
+ "provider:xai-oauth": providerMark("xai"),
+ "provider:deepseek": providerMark("deepseek"),
+ "provider:kimi": providerMark("kimi"),
+ "provider:alibaba": providerMark("alibabacloud"),
+ "provider:qwen-oauth": providerMark("qwen"),
+ "provider:ai-gateway": providerMark("vercel"),
+ "provider:arcee": providerMark("arcee"),
+ "provider:azure-foundry": providerMark("azureai"),
+ "provider:bedrock": providerMark("bedrock"),
+ "provider:commandcode": providerMark("commandcode"),
+ "provider:deepinfra": providerMark("deepinfra"),
+ "provider:fireworks": providerMark("fireworks"),
+ "provider:gmi": providerMark("gmicloud"),
+ "provider:huggingface": providerMark("huggingface"),
+ "provider:kilocode": providerMark("kilocode"),
+ "provider:meta-ai": providerMark("metaai"),
+ "provider:minimax": providerMark("minimax"),
+ "provider:minimax-oauth": providerMark("minimax"),
+ "provider:nebius-token-factory": providerMark("nebius"),
+ "provider:nous": providerMark("nousresearch"),
+ "provider:novita": providerMark("novita"),
+ "provider:nvidia": providerMark("nvidia"),
+ "provider:ollama-cloud": providerMark("ollama"),
+ "provider:opencode-zen": providerMark("opencode"),
+ "provider:opencode-go": providerMark("opencode"),
+ "provider:stepfun": providerMark("stepfun"),
+ "provider:tencent-tokenhub": providerMark("tencent"),
+ "provider:upstage": providerMark("upstage"),
+ "provider:vertex": providerMark("vertexai"),
+ "provider:xiaomi": providerMark("xiaomimimo"),
+ "provider:zai": providerMark("zai"),
+};
+
/**
* Every coding app with a usable official mark. Sources and brand guidelines
* are in public/onboarding/marks/NOTICE. Apps not listed (Kiro) get the letter tile.
@@ -40,6 +80,7 @@ export const APP_MARKS: Record<string, AppMark> = {
zed: pair("zed", 0.85),
antigravity: both("mark-antigravity.svg", 1.15),
t3code: both("mark-t3code.png"),
+ ...PROVIDER_MARKS,
};
/** The app's mark at the size `className` gives, switched with the app theme; null when it has none. */
diff --git a/apps/cua-spaces-web/src/components/settings/account-tab.tsx b/apps/cua-spaces-web/src/components/settings/account-tab.tsx
index f1735727a1..61de146402 100644
--- a/apps/cua-spaces-web/src/components/settings/account-tab.tsx
+++ b/apps/cua-spaces-web/src/components/settings/account-tab.tsx
@@ -24,12 +24,12 @@ const planName = (label: string) => label.replace(/ plan$/i, "");
/** 6.5, 20 and 6 hours: one decimal at most, none when whole. */
const hours = (n: number) => String(Math.round(n * 10) / 10);
-/** The team the core names ("Acme Robotics", "Owner · Pro plan"), as "Acme Robotics · Owner". */
+/** The team the core names ("Acme Robotics", "Owner · Pro plan"), as "Acme Robotics, Owner". */
function teamLine(teams: SettingsSection | undefined): string | null {
const head = teams?.rows.find((r) => /^team:[^:]+$/.test(r.id));
if (!head) return null;
const role = head.value?.split(" · ")[0];
- return role ? `${head.label} · ${role}` : head.label;
+ return role ? `${head.label}, ${role}` : head.label;
}
/** One bar of the usage meter: `used` of `limit` (no bar without a limit). */
diff --git a/apps/cua-spaces-web/src/components/settings/cli-section.tsx b/apps/cua-spaces-web/src/components/settings/cli-section.tsx
index c544477577..cb5118ce0a 100644
--- a/apps/cua-spaces-web/src/components/settings/cli-section.tsx
+++ b/apps/cua-spaces-web/src/components/settings/cli-section.tsx
@@ -11,6 +11,7 @@
import { firstRunCliView, useBridge, useCliInstall, useSettings } from "@/bridge";
import { SettingsGroup, SettingsRow } from "@/components/settings-group";
import { Button } from "@/components/ui/button";
+import { useQuiet } from "@/hooks/use-quiet";
/** "~/.local/bin, in ~/.zshrc" as a sentence. */
function pathLine(value: string): string {
@@ -22,6 +23,9 @@ export function CliSettingsSection() {
const { core } = useBridge();
const cli = useCliInstall();
const name = useSettings().data?.cli?.name ?? null;
+ // The plan is a host read that answers after the page draws: hold its room until it has, so the page does not jump (CUA-1951).
+ const settled = useQuiet(`${cli.state.plan ? 1 : 0}|${name ? 1 : 0}`);
+ if (!settled) return <div aria-hidden className="mb-8 h-[84px]" />;
if (!cli.state.plan) return null;
const view = firstRunCliView(core, { cli: cli.state, cliName: name });
if (!view) return null;
diff --git a/apps/cua-spaces-web/src/components/settings/connections/app-detail.tsx b/apps/cua-spaces-web/src/components/settings/connections/app-detail.tsx
index 2dbcd014ba..5ef89a92c1 100644
--- a/apps/cua-spaces-web/src/components/settings/connections/app-detail.tsx
+++ b/apps/cua-spaces-web/src/components/settings/connections/app-detail.tsx
@@ -7,6 +7,7 @@ import { CheckIcon, ChevronLeftIcon, Loader2Icon } from "lucide-react";
import { HarnessMark } from "@/components/agents/harness-mark";
import { useThisAndOthers } from "@/components/agents/other-machine-block";
import { SettingsGroup, SettingsRow } from "@/components/settings-group";
+import { UsesRow } from "@/components/settings/connections/uses-row";
import { Snippet } from "@/components/settings/snippet";
import { Button } from "@/components/ui/button";
import { DetailsDisclosure, GroupedRow, SettingRow } from "@/components/ui/grouped";
@@ -82,8 +83,15 @@ export function ConnectorAppPage({ agent }: { agent: string }) {
</SettingsGroup>
) : null}
- <SettingsGroup title={d.signInTitle} footer={d.signIn?.way}>
- {d.signIn ? (
+ <SettingsGroup title={d.signInTitle} footer={d.uses ? d.uses.note : d.signIn?.way}>
+ {d.uses ? (
+ <UsesRow
+ agent={agent}
+ uses={d.uses}
+ onChoose={(o) => void c.useCredential(agent, { env: o.env, slot: o.slot })}
+ onConnect={() => c.openProvider(null, agent)}
+ />
+ ) : d.signIn ? (
<GroupedRow className="min-h-12" data-connector-detail-signin={d.signIn.provider}>
<div className="min-w-0 flex-1">
<div>{d.signIn.title}</div>
diff --git a/apps/cua-spaces-web/src/components/settings/connections/connectors-page.tsx b/apps/cua-spaces-web/src/components/settings/connections/connectors-page.tsx
index a7bb0129cc..74f3bbdd4d 100644
--- a/apps/cua-spaces-web/src/components/settings/connections/connectors-page.tsx
+++ b/apps/cua-spaces-web/src/components/settings/connections/connectors-page.tsx
@@ -5,14 +5,15 @@ import { useNavigate } from "@tanstack/react-router";
import { CheckIcon, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, Loader2Icon, TriangleAlertIcon } from "lucide-react";
import { lazy, Suspense, useEffect, useState, type KeyboardEvent, type MouseEvent } from "react";
-import { useAgentKeys, useBridge, useKeysRecheck, type ConnectorAppRow, type ConnectorProviderRow, type WorkChip } from "@/bridge";
+import { useAgentKeys, useBridge, useKeysRecheck, type AgentKeysHook, type ConnectorAppRow, type ConnectorProviderRow } from "@/bridge";
import { OtherMachineBlock, useThisAndOthers } from "@/components/agents/other-machine-block";
import { HarnessMark } from "@/components/agents/harness-mark";
import { KeySheet } from "@/components/agents/key-sheet";
import { SettingsGroup, SettingsRow } from "@/components/settings-group";
import { ConfirmDialog } from "@/components/ui/alert-dialog";
import { Button } from "@/components/ui/button";
-import { GroupedAction, GroupedRow } from "@/components/ui/grouped";
+import { Dialog, DialogDescription, DialogPopup, DialogTitle } from "@/components/ui/dialog";
+import { FactRow, GroupedAction, GroupedRow } from "@/components/ui/grouped";
import { Input } from "@/components/ui/input";
import { ProviderMark } from "@/components/settings/connections/provider-mark";
import { Switch } from "@/components/ui/switch";
@@ -25,10 +26,11 @@ import { cn } from "@/lib/utils";
const DriverSettingsCard = lazy(() => import("@/components/volume/driver-card").then((m) => ({ default: m.DriverSettingsCard })));
/**
- * Settings, Connections: the providers (each with its state, the apps it
- * works with and Connect, Reconnect or Disconnect), then More providers with
- * a search; Coding apps, each with Connect (Cua's tools and the app's
- * sign-in, once) and a chevron to its own page. Every word and state is the
+ * Settings, Connections: Coding apps, each with Connect (Cua's tools and the
+ * app's sign-in, once) and a chevron to its own page; On another machine; then
+ * Providers, drawn the same way (an icon, the name, one grey line, Connect or
+ * a check, a chevron to a sheet with the apps it works with, when it was added
+ * and Disconnect), with Show all for the rest. Every word and state is the
* core's (`connectors.view`).
*/
export function ConnectorsRedesign({ focusApp }: { focusApp?: string }) {
@@ -41,6 +43,7 @@ export function ConnectorsRedesign({ focusApp }: { focusApp?: string }) {
useKeysRecheck();
const [all, setAll] = useState(false);
const [otherOpen, setOtherOpen] = useState(false);
+ const [detail, setDetail] = useState<string | null>(null);
const { hereName, others } = useThisAndOthers();
const [lit, setLit] = useState<string | null>(null);
@@ -54,6 +57,8 @@ export function ConnectorsRedesign({ focusApp }: { focusApp?: string }) {
if (!view || c.apps.rows === null) return <div className="mb-8 h-48" aria-busy="true" />;
const open = (agent: string) => void navigate({ to: "/settings/connections/$app", params: { app: agent } });
+ const moreOpen = Boolean(c.input.moreOpen || (c.input.query ?? "").trim());
+ const detailRow = detail ? [...view.providers, ...view.moreProviders].find((p) => p.id === detail) ?? null : null;
const confirm = keys.removing ? keys.removeConfirmOf(keys.removing) : null;
return (
@@ -65,71 +70,6 @@ export function ConnectorsRedesign({ focusApp }: { focusApp?: string }) {
</div>
) : null}
- <SettingsGroup title={view.providersTitle} footer={view.providersFooter} data-connectors-providers="">
- {view.providers.map((p) => (
- <ProviderRow key={p.id} row={p} addedLabel={view.addedLabel} c={c} onOpenApp={open} />
- ))}
- </SettingsGroup>
-
- <SettingsGroup title={view.moreTitle} data-connectors-more="">
- <GroupedRow className="gap-2">
- <Input
- type="search"
- data-connectors-search=""
- aria-label={view.moreSearchLabel}
- placeholder={view.moreSearchLabel}
- value={c.input.query ?? ""}
- autoComplete="off"
- spellCheck={false}
- onChange={(e) => c.searchMore(e.currentTarget.value)}
- className="h-8 flex-1"
- />
- {c.input.moreOpen || (c.input.query ?? "").trim() ? (
- <Button size="sm" variant="ghost" data-connectors-more-toggle="" onClick={() => c.searchMore("", false)}>
- Hide
- </Button>
- ) : (
- <Button size="sm" variant="outline" data-connectors-more-toggle="" onClick={() => c.searchMore("", true)}>
- Show all {view.moreCount}
- </Button>
- )}
- </GroupedRow>
- {view.moreProviders.map((p) => (
- <ProviderRow key={p.id} row={p} addedLabel={view.addedLabel} c={c} onOpenApp={open} />
- ))}
- {view.moreEmpty ? (
- <GroupedRow className="text-muted-foreground" data-connectors-more-empty="">
- {view.moreEmpty}
- </GroupedRow>
- ) : null}
- {view.others.map((r) => (
- <GroupedRow key={r.env} data-agent-key-row={r.env}>
- <div className="min-w-0 flex-1">
- <div className="truncate font-mono text-[12px]">{r.title}</div>
- <div className="truncate text-xs text-muted-foreground">{r.detail}</div>
- </div>
- <span className="font-mono text-[12px] text-muted-foreground">{r.status}</span>
- <Button size="sm" variant="outline" disabled={!view.canEdit} onClick={() => keys.openSheet("other", r.env)}>
- {r.actionLabel}
- </Button>
- {r.removeLabel ? (
- <Button size="sm" variant="ghost" disabled={!view.canEdit} onClick={() => keys.askRemove(r.env)}>
- {r.removeLabel}
- </Button>
- ) : null}
- </GroupedRow>
- ))}
- <SettingsRow
- label={view.addOtherLabel}
- description={view.otherHelp}
- control={
- <Button size="sm" variant="outline" disabled={!view.canEdit} onClick={() => keys.openSheet("other")} data-agent-key-add-other="">
- Add key
- </Button>
- }
- />
- </SettingsGroup>
-
<SettingsGroup
title={view.appsTitle}
data-connectors-apps=""
@@ -194,6 +134,77 @@ export function ConnectorsRedesign({ focusApp }: { focusApp?: string }) {
{otherOpen ? <OtherMachineBlock /> : null}
</SettingsGroup>
+ <SettingsGroup title={view.providersTitle} footer={view.providersFooter} data-connectors-providers="">
+ {view.providers.map((p) => (
+ <ProviderRow key={p.id} row={p} c={c} onOpen={() => setDetail(p.id)} />
+ ))}
+ {moreOpen ? (
+ <>
+ <GroupedRow className="gap-2" data-connectors-more="">
+ <Input
+ type="search"
+ data-connectors-search=""
+ aria-label={view.moreSearchLabel}
+ placeholder={view.moreSearchLabel}
+ value={c.input.query ?? ""}
+ autoComplete="off"
+ spellCheck={false}
+ onChange={(e) => c.searchMore(e.currentTarget.value)}
+ className="h-8 flex-1"
+ />
+ </GroupedRow>
+ {view.moreProviders.map((p) => (
+ <ProviderRow key={p.id} row={p} c={c} onOpen={() => setDetail(p.id)} inMore />
+ ))}
+ {view.moreEmpty ? (
+ <GroupedRow className="text-muted-foreground" data-connectors-more-empty="">
+ {view.moreEmpty}
+ </GroupedRow>
+ ) : null}
+ </>
+ ) : null}
+ {view.others.map((r) => (
+ <GroupedRow key={r.env} data-agent-key-row={r.env}>
+ <div className="min-w-0 flex-1">
+ <div className="truncate font-mono text-[12px]">{r.title}</div>
+ <div className="truncate text-xs text-muted-foreground">{r.detail}</div>
+ </div>
+ <span className="font-mono text-[12px] text-muted-foreground">{r.status}</span>
+ <Button size="sm" variant="outline" disabled={!view.canEdit} onClick={() => keys.openSheet("other", r.env)}>
+ {r.actionLabel}
+ </Button>
+ {r.removeLabel ? (
+ <Button size="sm" variant="ghost" disabled={!view.canEdit} onClick={() => keys.askRemove(r.env)}>
+ {r.removeLabel}
+ </Button>
+ ) : null}
+ </GroupedRow>
+ ))}
+ <SettingsRow
+ label={view.addOtherLabel}
+ description={view.otherHelp}
+ control={
+ <Button size="sm" variant="outline" disabled={!view.canEdit} onClick={() => keys.openSheet("other")} data-agent-key-add-other="">
+ Add key
+ </Button>
+ }
+ />
+ <GroupedAction data-connectors-more-toggle="" aria-expanded={moreOpen} onClick={() => c.searchMore("", !moreOpen)}>
+ {moreOpen ? "Show fewer" : `Show all ${view.moreCount}`} {moreOpen ? <ChevronUpIcon className="size-3.5" /> : <ChevronDownIcon className="size-3.5" />}
+ </GroupedAction>
+ </SettingsGroup>
+
+ {detailRow ? (
+ <ProviderDetail
+ row={detailRow}
+ addedLabel={view.addedLabel}
+ c={c}
+ keys={keys}
+ onClose={() => setDetail(null)}
+ onOpenApp={(agent) => (setDetail(null), open(agent))}
+ />
+ ) : null}
+
{keys.sheet ? <KeySheet key={`${keys.sheet.provider}:${keys.sheet.env ?? ""}`} keys={keys} provider={keys.sheet.provider} env={keys.sheet.env} /> : null}
<ConfirmDialog
open={confirm !== null}
@@ -260,70 +271,215 @@ function AppRow({ row, lit, onOpen, onConnect }: { row: ConnectorAppRow; lit: bo
);
}
-/** How many of the apps a connection works with show as chips; the rest are a count. */
-const CHIPS_SHOWN = 4;
-
-function ProviderRow({ row, addedLabel, c, onOpenApp }: { row: ConnectorProviderRow; addedLabel: string; c: Connectors; onOpenApp: (agent: string) => void }) {
+/** A provider: the whole row opens its sheet (hover, chevron); Connect works on its own. */
+function ProviderRow({ row, c, onOpen, inMore }: { row: ConnectorProviderRow; c: Connectors; onOpen: () => void; inMore?: boolean }) {
+ const stop = (e: MouseEvent | KeyboardEvent) => e.stopPropagation();
const connected = row.state === "connected";
- const needsReconnect = row.status === "Needs reconnect";
+ const problem = row.state === "failed" || row.status === "Needs reconnect";
+ // Connected rows say what is saved; the others say why not (Not connected, Needs reconnect, what failed).
+ const line = connected && row.credential ? row.credential : row.status;
return (
- <GroupedRow data-connector-provider={row.id} data-state={row.state} className="min-h-14 items-start py-3">
+ <div
+ role="link"
+ tabIndex={0}
+ aria-label={`${row.label} settings`}
+ title={row.worksWith.length ? `${row.worksWithLabel} ${row.worksWith.map((w) => w.name).join(", ")}` : undefined}
+ data-connector-provider={row.id}
+ data-state={row.state}
+ data-more-list={inMore ? "" : undefined}
+ onClick={onOpen}
+ onKeyDown={(e) => {
+ if (e.key === "Enter" || e.key === " ") {
+ e.preventDefault();
+ onOpen();
+ }
+ }}
+ className={cn(
+ "flex min-h-12 cursor-default items-center gap-3 px-4 py-2.5 text-[13px] outline-none transition-colors hover:bg-accent/50 focus-visible:bg-accent/50",
+ row.state === "failed" && "bg-destructive/5",
+ )}
+ >
<ProviderMark id={row.id} name={row.label} />
<div className="min-w-0 flex-1">
<div className="truncate">{row.label}</div>
- {row.credential ? (
- <div className="truncate text-xs text-muted-foreground" data-connector-credential="">
- {row.credential}
- </div>
- ) : null}
- {row.worksWith.length ? <WorkChips chips={row.worksWith} label={row.worksWithLabel} onOpen={onOpenApp} /> : null}
+ <p className={cn("mt-px truncate text-xs", problem ? "text-destructive" : "text-muted-foreground")} data-connector-credential="" data-connector-status="">
+ {line}
+ </p>
</div>
- <div className="flex shrink-0 flex-col items-end gap-1.5">
- <span
- className={cn("flex items-center gap-1.5 text-[13px]", connected ? "" : row.state === "failed" || needsReconnect ? "text-destructive" : "text-muted-foreground")}
- data-connector-status=""
- >
- {row.state === "connecting" ? <Loader2Icon className="size-3.5 animate-spin" /> : connected ? <CheckIcon className="size-3.5 text-success" /> : needsReconnect ? <TriangleAlertIcon className="size-3.5" /> : null}
- {row.status}
+ {connected ? (
+ <span className="flex items-center gap-1 text-[13px] text-muted-foreground" data-connector-connected="">
+ <CheckIcon className="size-3.5 text-success" /> {row.status}
</span>
- {row.addedMs !== null ? <span className="text-[11px] text-muted-foreground">{addedText(addedLabel, row.addedMs)}</span> : null}
+ ) : (
<Button
size="sm"
- variant={connected ? "ghost" : "outline"}
+ variant="outline"
disabled={!row.button.enabled}
data-connector-provider-action={row.button.id}
- onClick={() => (row.button.id === "sign-out" ? void c.signOut(row.id) : c.openProvider(row.id))}
+ onClick={(e) => (stop(e), c.openProvider(row.id))}
+ onKeyDown={stop}
>
+ {row.state === "connecting" ? <Loader2Icon className="animate-spin" /> : null}
{row.button.label}
</Button>
- </div>
- </GroupedRow>
+ )}
+ <ChevronRightIcon aria-hidden className="size-4 shrink-0 text-muted-foreground/70" data-connector-chevron="" />
+ </div>
);
}
-/** The apps a connection works with, each a small button to that app's page. */
-function WorkChips({ chips, label, onOpen }: { chips: WorkChip[]; label: string; onOpen: (agent: string) => void }) {
- const shown = chips.slice(0, CHIPS_SHOWN);
- const rest = chips.length - shown.length;
+/**
+ * A provider's sheet: what is saved, when it was added, the apps it works with
+ * (each opens the app's page) and Disconnect, or Connect when nothing is saved.
+ */
+/** Sign-ins are one fixed credential of an app; only API keys can be several. */
+const SIGN_IN_ENVS = new Set(["CLAUDE_CODE_OAUTH_TOKEN", "CODEX_AUTH_JSON"]);
+
+function ProviderDetail({
+ row,
+ addedLabel,
+ c,
+ keys,
+ onClose,
+ onOpenApp,
+}: {
+ row: ConnectorProviderRow;
+ addedLabel: string;
+ c: Connectors;
+ keys: AgentKeysHook;
+ onClose: () => void;
+ onOpenApp: (agent: string) => void;
+}) {
+ const connected = row.state === "connected";
+ const [adding, setAdding] = useState(false);
+ // The API keys saved for it: the first, then those added beside it (each named, or by its last four).
+ const saved = [...keys.input.keys, ...(keys.input.extras ?? [])].filter((k) => k.provider === row.id && !SIGN_IN_ENVS.has(k.env));
+ const several = saved.length > 1;
+ const removeKey = (k: (typeof saved)[number]) => {
+ const others = saved.some((x) => x.env === k.env && x !== k);
+ void (k.slot ? keys.remove(k.env, { slot: k.slot }) : keys.remove(k.env, others ? { keepOthers: true } : {})).then(() => c.reload()).catch(toastError("Couldn't remove the key"));
+ };
+ if (adding) return <AddKeyDialog row={row} keys={keys} onDone={() => (setAdding(false), void c.reload())} onCancel={() => setAdding(false)} />;
return (
- <div className="mt-1.5 flex flex-wrap items-center gap-1" data-connector-works-with="">
- <span className="mr-0.5 text-xs text-muted-foreground">{label}</span>
- {shown.map((chip) => (
- <button
- key={chip.agent}
- type="button"
- data-connector-chip={chip.agent}
- onClick={() => onOpen(chip.agent)}
- className="cursor-default rounded-lg bg-muted px-1.5 py-0.5 text-[11px] text-muted-foreground outline-none hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/60"
- >
- {chip.name}
- </button>
- ))}
- {rest > 0 ? (
- <span className="px-0.5 text-[11px] text-muted-foreground" title={chips.slice(CHIPS_SHOWN).map((x) => x.name).join(", ")} data-connector-chips-more="">
- and {rest} more
- </span>
- ) : null}
- </div>
+ <Dialog open onOpenChange={(o) => !o && onClose()}>
+ <DialogPopup data-provider-detail={row.id} className="top-[12vh] w-[min(480px,calc(100vw-2rem))]">
+ <div className="px-6 pt-5 pb-5">
+ <div className="flex items-center gap-3">
+ <ProviderMark id={row.id} name={row.label} large />
+ <div className="min-w-0 flex-1">
+ <DialogTitle className="truncate text-[15px] font-semibold">{row.label}</DialogTitle>
+ <DialogDescription className="truncate text-[13px] text-muted-foreground">{connected && row.credential ? row.credential : row.status}</DialogDescription>
+ </div>
+ </div>
+ {row.addedMs !== null ? <FactRow className="mt-3" label="Added" value={addedText(addedLabel, row.addedMs).replace(/^Added /, "")} data-connector-added="" /> : null}
+ {several ? (
+ <div className="mt-3" data-connector-keys="">
+ <div className="px-1 text-xs text-muted-foreground">Keys</div>
+ {saved.map((k) => (
+ <div key={`${k.env}:${k.slot ?? ""}`} className="flex items-center gap-2 px-1 py-1 text-[13px]" data-connector-key={k.slot ?? "first"}>
+ <span className="min-w-0 flex-1 truncate">{k.label?.trim() || (k.last4 ? `API key ending ${k.last4}` : "API key")}</span>
+ <Button size="sm" variant="ghost" onClick={() => removeKey(k)} data-connector-key-remove="">
+ Remove
+ </Button>
+ </div>
+ ))}
+ </div>
+ ) : null}
+ {row.worksWith.length ? (
+ <div className="mt-3" data-connector-works-with="">
+ <div className="px-1 text-xs text-muted-foreground">{row.worksWithLabel}</div>
+ <div className="mt-1 flex flex-col">
+ {row.worksWith.map((chip) => (
+ <button
+ key={chip.agent}
+ type="button"
+ data-connector-chip={chip.agent}
+ onClick={() => onOpenApp(chip.agent)}
+ className="-mx-1 flex w-[calc(100%+0.5rem)] cursor-default items-center gap-2.5 rounded-lg px-2 py-1.5 text-left text-[13px] outline-none hover:bg-accent focus-visible:bg-accent"
+ >
+ <HarnessMark agent={chip.agent} name={chip.name} />
+ <span className="min-w-0 flex-1 truncate">{chip.name}</span>
+ <ChevronRightIcon aria-hidden className="size-3.5 shrink-0 text-muted-foreground/60" />
+ </button>
+ ))}
+ </div>
+ </div>
+ ) : null}
+ <div className="mt-4 flex justify-end gap-2">
+ {connected && saved.length > 0 ? (
+ <Button variant="ghost" className="mr-auto" onClick={() => setAdding(true)} data-connector-add-key="">
+ Add another key
+ </Button>
+ ) : null}
+ <Button variant="outline" onClick={onClose}>
+ Close
+ </Button>
+ <Button
+ variant={connected ? "outline" : "default"}
+ disabled={!row.button.enabled}
+ data-connector-provider-action={row.button.id}
+ onClick={() => {
+ onClose();
+ if (row.button.id === "sign-out") void c.signOut(row.id);
+ else c.openProvider(row.id);
+ }}
+ >
+ {row.button.label}
+ </Button>
+ </div>
+ </div>
+ </DialogPopup>
+ </Dialog>
+ );
+}
+
+/** "Add another key": a second API key for a provider, named so it can be told apart ("Work key"). It replaces nothing. */
+function AddKeyDialog({ row, keys, onDone, onCancel }: { row: ConnectorProviderRow; keys: AgentKeysHook; onDone: () => void; onCancel: () => void }) {
+ const [name, setName] = useState("");
+ const [value, setValue] = useState("");
+ const [busy, setBusy] = useState(false);
+ const [error, setError] = useState<string | null>(null);
+ const save = async () => {
+ setBusy(true);
+ setError(null);
+ try {
+ await keys.save(row.id, value.trim(), null, {}, { add: true, ...(name.trim() ? { label: name.trim() } : {}) });
+ onDone();
+ } catch (e) {
+ setError(e instanceof Error ? e.message : String(e));
+ setBusy(false);
+ }
+ };
+ return (
+ <Dialog open onOpenChange={(o) => !o && !busy && onCancel()}>
+ <DialogPopup data-connector-add-key-sheet={row.id} className="top-[12vh] w-[min(440px,calc(100vw-2rem))]">
+ <div className="px-6 pt-5 pb-5">
+ <DialogTitle className="text-[15px] font-semibold">Add another {row.label} key</DialogTitle>
+ <DialogDescription className="mt-1 text-[13px] text-muted-foreground">It is saved beside the one you have. An app that can use any provider can be pointed at either.</DialogDescription>
+ <label className="mt-3 block">
+ <span className="mb-1 block text-xs font-medium">Name (optional)</span>
+ <Input value={name} maxLength={40} placeholder="Work key" autoComplete="off" onChange={(e) => setName(e.currentTarget.value)} data-add-key-name="" />
+ </label>
+ <label className="mt-3 block">
+ <span className="mb-1 block text-xs font-medium">Key</span>
+ <Input type="password" value={value} autoComplete="off" spellCheck={false} className="font-mono" onChange={(e) => setValue(e.currentTarget.value)} data-add-key-value="" />
+ </label>
+ {error ? (
+ <p className="mt-2 text-[13px] text-destructive" data-add-key-error="">
+ {error}
+ </p>
+ ) : null}
+ <div className="mt-4 flex justify-end gap-2">
+ <Button variant="outline" disabled={busy} onClick={onCancel}>
+ Cancel
+ </Button>
+ <Button disabled={busy || !value.trim()} onClick={() => void save()} data-add-key-save="">
+ {busy ? <Loader2Icon className="animate-spin" /> : null}
+ Save
+ </Button>
+ </div>
+ </div>
+ </DialogPopup>
+ </Dialog>
);
}
diff --git a/apps/cua-spaces-web/src/components/settings/connections/uses-row.tsx b/apps/cua-spaces-web/src/components/settings/connections/uses-row.tsx
new file mode 100644
index 0000000000..0382efc846
--- /dev/null
+++ b/apps/cua-spaces-web/src/components/settings/connections/uses-row.tsx
@@ -0,0 +1,102 @@
+// SPDX-License-Identifier: FSL-1.1-MIT
+// Copyright (c) 2026 Cua AI, Inc.
+
+import { ChevronsUpDownIcon, PlusIcon } from "lucide-react";
+
+import type { AppUses, UseOption } from "@/bridge";
+import { ProviderMark } from "@/components/settings/connections/provider-mark";
+import { Button } from "@/components/ui/button";
+import { GroupedRow } from "@/components/ui/grouped";
+import { ChoiceMenu } from "@/components/ui/menu";
+import { cn } from "@/lib/utils";
+
+const same = (a: UseOption, b: UseOption) => a.env === b.env && a.slot === b.slot;
+
+/** What a credential reads as under its provider's name: "API key ending 4f2a", then the model when one was set. */
+function Line({ o }: { o: UseOption }) {
+ return (
+ <>
+ {o.line}
+ {o.model ? `, model ${o.model}` : ""}
+ </>
+ );
+}
+
+/**
+ * An app's "Uses" row (Hermes, OpenCode, Goose, Pi, OpenClaw): the provider and key it runs with, a menu
+ * to point it at another connected one, and Connect another provider at the bottom of that menu.
+ * Choosing signs nothing out and deletes nothing; it takes effect on the app's next run.
+ */
+export function UsesRow({ agent, uses, onChoose, onConnect }: { agent: string; uses: AppUses; onChoose: (o: UseOption) => void; onConnect: () => void }) {
+ const cur = uses.current;
+ return (
+ <GroupedRow className="min-h-14" data-connector-uses={uses.state} data-connector-uses-app={agent}>
+ {cur ? (
+ <ProviderMark id={cur.provider} name={cur.providerName} />
+ ) : null}
+ <div className="min-w-0 flex-1">
+ {cur ? (
+ <>
+ <div className="truncate" data-uses-provider="">
+ {cur.providerName}
+ </div>
+ <p className="mt-px truncate text-xs text-muted-foreground" data-uses-line="">
+ <Line o={cur} />
+ </p>
+ </>
+ ) : (
+ <>
+ <div className="truncate">{uses.title}</div>
+ <p className={cn("mt-px text-xs", uses.state === "gone" ? "text-destructive" : "text-muted-foreground")} data-uses-status="">
+ {uses.status}
+ </p>
+ </>
+ )}
+ </div>
+ {uses.options.length > 0 ? (
+ <ChoiceMenu
+ popupAttrs={{ "data-uses-popup": "" }}
+ trigger={
+ <Button size="sm" variant="outline" disabled={!uses.enabled} data-uses-menu="" aria-label={`Choose what ${agent} uses`}>
+ {cur ? "Change" : "Choose"}
+ <ChevronsUpDownIcon className="size-3.5 text-muted-foreground" />
+ </Button>
+ }
+ items={uses.options.map((o) => ({
+ key: `${o.env}:${o.slot ?? ""}`,
+ selected: Boolean(cur && same(o, cur)),
+ onSelect: () => onChoose(o),
+ attrs: { "data-uses-option": o.provider },
+ content: (
+ <>
+ <ProviderMark id={o.provider} name={o.providerName} />
+ <span className="min-w-0 flex-1">
+ <span className="block truncate">{o.providerName}</span>
+ <span className="block truncate text-xs text-muted-foreground">
+ <Line o={o} />
+ </span>
+ </span>
+ </>
+ ),
+ }))}
+ action={{
+ onSelect: onConnect,
+ attrs: { "data-uses-connect": "" },
+ content: (
+ <>
+ <span className="flex size-8 shrink-0 items-center justify-center text-muted-foreground">
+ <PlusIcon className="size-4" />
+ </span>
+ {uses.connectLabel}
+ </>
+ ),
+ }}
+ />
+ ) : (
+ <Button size="sm" variant="outline" disabled={!uses.enabled} data-uses-connect="" onClick={onConnect}>
+ Connect
+ </Button>
+ )}
+ </GroupedRow>
+ );
+}
diff --git a/apps/cua-spaces-web/src/components/settings/general-tab.tsx b/apps/cua-spaces-web/src/components/settings/general-tab.tsx
index 1f7c943482..2c2d4ef157 100644
--- a/apps/cua-spaces-web/src/components/settings/general-tab.tsx
+++ b/apps/cua-spaces-web/src/components/settings/general-tab.tsx
@@ -8,6 +8,7 @@ import type { HostLimitRow, HostLimits } from "@/bridge/contracts/host";
import { chooseSettings, useBridge, useLoginItem, useMachines, useSession, useSettings, useThisMachine, useTips, type GlobalShortcut, type SettingsRow as CoreRow } from "@/bridge";
import { SettingsGroup, SettingsRow } from "@/components/settings-group";
+import { CliSettingsSection } from "@/components/settings/cli-section";
import { CoreSettingsRow } from "@/components/settings/core-section";
import { RepoCacheGroup } from "@/components/settings/repo-cache-group";
import { Button } from "@/components/ui/button";
@@ -127,6 +128,7 @@ export function GeneralTab() {
/>
) : null}
</SettingsGroup>
+ <CliSettingsSection />
<SharingGroup />
<RepoCacheGroup />
</div>
diff --git a/apps/cua-spaces-web/src/components/settings/notices-dialog.tsx b/apps/cua-spaces-web/src/components/settings/notices-dialog.tsx
index 28fb592131..f30ed36d42 100644
--- a/apps/cua-spaces-web/src/components/settings/notices-dialog.tsx
+++ b/apps/cua-spaces-web/src/components/settings/notices-dialog.tsx
@@ -32,7 +32,7 @@ export const tablesAsLists = (t: string) => {
continue;
}
const cells = line.trim().slice(1, -1).split("|").map((c) => c.trim()).filter(Boolean);
- out.push(`- ${cells.join(" · ")}`);
+ out.push(`- ${cells.join(", ")}`);
}
return out.join("\n");
};
diff --git a/apps/cua-spaces-web/src/components/ui/menu.tsx b/apps/cua-spaces-web/src/components/ui/menu.tsx
index 6f0b561e4f..3799ece1ae 100644
--- a/apps/cua-spaces-web/src/components/ui/menu.tsx
+++ b/apps/cua-spaces-web/src/components/ui/menu.tsx
@@ -2,6 +2,7 @@
// Copyright (c) 2026 Cua AI, Inc.
import { Menu as MenuPrimitive } from "@base-ui/react/menu";
+import { CheckIcon } from "lucide-react";
import type { ReactElement, ReactNode } from "react";
import { cn } from "@/lib/utils";
@@ -41,3 +42,59 @@ export function Menu({ trigger, items, label }: { trigger: ReactElement; items:
</MenuPrimitive.Root>
);
}
+
+export interface ChoiceItem {
+ key: string;
+ /** What the row shows (an icon and two lines). */
+ content: ReactNode;
+ selected?: boolean;
+ onSelect: () => void;
+ /** `data-*` attributes for the row. */
+ attrs?: Record<`data-${string}`, string | undefined>;
+}
+
+/**
+ * A pop-up menu to pick one of several things, each a rich row with a check on the one in use, and an
+ * action row below a rule ("Connect another provider"). The trigger is a button.
+ */
+export function ChoiceMenu({
+ trigger,
+ items,
+ action,
+ popupAttrs,
+}: {
+ trigger: ReactElement;
+ items: readonly ChoiceItem[];
+ action?: { content: ReactNode; onSelect: () => void; attrs?: Record<`data-${string}`, string | undefined> };
+ popupAttrs?: Record<`data-${string}`, string | undefined>;
+}) {
+ const row = "flex cursor-default items-center gap-2.5 rounded-lg px-2 py-1.5 text-[13px] outline-none data-highlighted:bg-accent";
+ return (
+ <MenuPrimitive.Root>
+ <MenuPrimitive.Trigger render={trigger} />
+ <MenuPrimitive.Portal>
+ <MenuPrimitive.Positioner sideOffset={4} align="end" className="z-50 outline-none">
+ <MenuPrimitive.Popup
+ {...popupAttrs}
+ className="glass min-w-64 max-w-[min(360px,calc(100vw-2rem))] origin-(--transform-origin) rounded-lg border p-1 text-popover-foreground shadow-float outline-none transition-[opacity,scale] data-ending-style:scale-95 data-ending-style:opacity-0 data-starting-style:scale-95 data-starting-style:opacity-0"
+ >
+ {items.map((item) => (
+ <MenuPrimitive.Item key={item.key} onClick={item.onSelect} data-selected={item.selected ? "" : undefined} {...item.attrs} className={row}>
+ <span className="flex min-w-0 flex-1 items-center gap-2.5">{item.content}</span>
+ {item.selected ? <CheckIcon className="size-3.5 shrink-0 text-foreground" /> : null}
+ </MenuPrimitive.Item>
+ ))}
+ {action ? (
+ <>
+ <MenuPrimitive.Separator className="my-1 h-px bg-border" />
+ <MenuPrimitive.Item onClick={action.onSelect} {...action.attrs} className={row}>
+ {action.content}
+ </MenuPrimitive.Item>
+ </>
+ ) : null}
+ </MenuPrimitive.Popup>
+ </MenuPrimitive.Positioner>
+ </MenuPrimitive.Portal>
+ </MenuPrimitive.Root>
+ );
+}
diff --git a/apps/cua-spaces-web/src/hooks/use-connectors.ts b/apps/cua-spaces-web/src/hooks/use-connectors.ts
index d8340e4a7b..1d470c73d1 100644
--- a/apps/cua-spaces-web/src/hooks/use-connectors.ts
+++ b/apps/cua-spaces-web/src/hooks/use-connectors.ts
@@ -130,6 +130,8 @@ export interface Connectors {
/** Runs one of the sheet's ways: a pasted `value` for a key, token or endpoint, with its `choices` (a plan, a model, a URL). */
runWay(way: ProviderWay, value?: string, choices?: KeyChoices): Promise<boolean>;
signOut(provider: string): Promise<void>;
+ /** Tells an app that takes any provider which saved credential to use from its next run (null: the first that works). */
+ useCredential(app: string, choice: { env: string; slot?: string | null } | null): Promise<void>;
/** An app page's switch: Cua's skills, its MCP server, or keeping it set up. */
setToggle(agent: string, id: "skills" | "mcp" | "auto", on: boolean): Promise<void>;
/** Takes Cua out of the app (and turns Keep it set up off). */
@@ -342,6 +344,18 @@ export function useConnectors(): Connectors {
[view, keys],
);
+ const useCredential = useCallback(
+ async (app: string, choice: { env: string; slot?: string | null } | null) => {
+ const id = `app:${app}`;
+ try {
+ await keys.use(app, choice ? { env: choice.env, ...(choice.slot ? { slot: choice.slot } : {}) } : null);
+ } catch (e) {
+ fail(id, message(e));
+ }
+ },
+ [keys],
+ );
+
const setToggle = useCallback(
async (agent: string, which: "skills" | "mcp" | "auto", on: boolean) => {
if (which === "auto") {
@@ -407,6 +421,7 @@ export function useConnectors(): Connectors {
searchMore: (query, open) => set((s) => ({ query, moreOpen: open ?? (s.moreOpen || query.trim() !== "") })),
runWay,
signOut,
+ useCredential,
setToggle,
removeFromApp,
reload,
diff --git a/apps/cua-spaces-web/src/lib/design-baseline.json b/apps/cua-spaces-web/src/lib/design-baseline.json
index c43a224126..cae15704e3 100644
--- a/apps/cua-spaces-web/src/lib/design-baseline.json
+++ b/apps/cua-spaces-web/src/lib/design-baseline.json
@@ -75,12 +75,6 @@
"partial-line": 3,
"outlined-box": 1
},
- "components/settings/account-tab.tsx": {
- "dot-chain": 1
- },
- "components/settings/notices-dialog.tsx": {
- "dot-chain": 2
- },
"components/settings/snippet.tsx": {
"outlined-box": 1,
"partial-line": 1
diff --git a/apps/cua-spaces-web/src/routes/settings/connections.tsx b/apps/cua-spaces-web/src/routes/settings/connections.tsx
index 955983e6c5..f299a3583f 100644
--- a/apps/cua-spaces-web/src/routes/settings/connections.tsx
+++ b/apps/cua-spaces-web/src/routes/settings/connections.tsx
@@ -3,10 +3,7 @@
import { createFileRoute, Outlet, useMatch } from "@tanstack/react-router";
-import { useCliInstall, useSettings } from "@/bridge";
-import { CliSettingsSection } from "@/components/settings/cli-section";
import { ConnectorsRedesign } from "@/components/settings/connections/connectors-page";
-import { useQuiet } from "@/hooks/use-quiet";
/** `app` is a coding app to bring into view (the Agents page's Connect). */
export const Route = createFileRoute("/settings/connections")({
@@ -15,8 +12,8 @@ export const Route = createFileRoute("/settings/connections")({
});
/**
- * Settings, Connections (was Connectors, and Agents before): the providers connected once for every app that can use them, the coding apps Cua works with, and Cua in Terminal.
- * Its parts come from separate host reads; the page draws once they have answered, not one by one with the page jumping at each (CUA-1951).
+ * Settings, Connections (was Connectors, and Agents before): the coding apps Cua works with, how to use this machine from another, and the providers connected once for every app that can use them.
+ * (Cua in Terminal moved to General.) The page draws once the host has answered, not part by part with the page jumping (CUA-1951).
*/
function ConnectorsPage() {
// An app's own page (`/settings/connections/<app>`) draws in place of the list.
@@ -25,17 +22,11 @@ function ConnectorsPage() {
return <Redesign />;
}
-/** The connections, then coding apps with Connect and their pages. */
function Redesign() {
const { app } = Route.useSearch();
- const { data } = useSettings();
- const cli = useCliInstall();
- const settled = useQuiet(`${data?.cli ? 1 : 0}|${cli.state.plan ? 1 : 0}`);
- if (!settled) return <div className="h-96" aria-busy="true" />;
return (
<div data-settings-tab="connections">
<ConnectorsRedesign focusApp={app} />
- <CliSettingsSection />
</div>
);
}
diff --git a/apps/cua-spaces/src-tauri/src/persistent.rs b/apps/cua-spaces/src-tauri/src/persistent.rs
index 565634954d..963fea9751 100644
--- a/apps/cua-spaces/src-tauri/src/persistent.rs
+++ b/apps/cua-spaces/src-tauri/src/persistent.rs
@@ -22,6 +22,7 @@ pub const TOOLS: &[&str] = &[
"agent_keys.list",
"agent_keys.set",
"agent_keys.remove",
+ "agent_keys.use",
"persistent_agent_list",
"persistent_agent_save",
"agent_pause",
diff --git a/docs/content/docs/spaces/guides/connect-your-agent.mdx b/docs/content/docs/spaces/guides/connect-your-agent.mdx
index 3b0a802cf5..e1ea0900c1 100644
--- a/docs/content/docs/spaces/guides/connect-your-agent.mdx
+++ b/docs/content/docs/spaces/guides/connect-your-agent.mdx
@@ -25,8 +25,8 @@ most used first: Hermes, Claude Code, Codex, Cursor, then the rest. Each row
names the settings file Cua changes. Press **Connect** on each agent you want:
the app adds the Cua skills and MCP server to that agent's settings. Nothing is
connected until you press it. If an agent was already open, close it and open
-it again. Connecting none is fine: connect agents later in **Settings, AI
-agents**.
+it again. Connecting none is fine: connect agents later in **Settings,
+Connections**.
### Per computer
@@ -54,7 +54,7 @@ in this computer's Keychain (Credential Manager on Windows).
If you already use Claude Code on this computer, Cua can run it in your Spaces
with the same Claude plan. Press **Connect** next to Claude Code in **Settings,
-Connectors**. Before it reads anything, Cua says what it will do and waits for
+Connections**. Before it reads anything, Cua says what it will do and waits for
you to press **Use my sign-in**:
1. Cua reads the sign-in Claude Code already keeps on this computer. On a Mac
@@ -89,11 +89,11 @@ again), paste a token made with `claude setup-token` (a long-lived token for
people who prefer one), or use an Anthropic API key. Sign out removes Cua's copy
and never touches Claude Code.
-To connect an agent later, or to remove one, open **Settings, AI agents**:
+To connect an agent later, or to remove one, open **Settings, Connections**:
-- Press **Configure** next to a detected agent to set it up, or **Remove** to
- take out what Cua added.
-- Press **Configure all detected agents** to set up every one at once.
+- Press **Connect** next to a detected agent under **Coding apps** to set it up.
+- Open the agent's row to switch **Cua skills** and **Cua tools** on or off, or
+ press **Remove Cua from** the agent to take out what Cua added.
## Connect from a terminal
@@ -284,9 +284,13 @@ gets the key it needs.
- **Another key**: save it under the variable its agent reads, like
`GEMINI_API_KEY` or `OPENROUTER_API_KEY`.
-Each row shows only `•••• ` and the key's last four characters, and when you
-added it. Replace and Remove are on the same row. A key is never shown again
-after you save it.
+Each provider is one row under **Providers**, which shows only `•••• ` and the
+key's last four characters. Click the row for when you added it, the apps it
+works with, **Disconnect**, and **Add another key** if you keep more than one.
+A key is never shown again after you save it. Hermes, OpenCode, Goose, Pi and
+OpenClaw can be pointed at any connected provider or key from their **Provider**
+row (see [Connections](/spaces/guides/connections#pick-which-key-an-app-uses)).
+Cua in Terminal, the `cua` command, installs from **Settings, General**.
The same works from the `cua` CLI. The key is read from stdin, so it never lands
in your shell history:
diff --git a/docs/content/docs/spaces/guides/connections.mdx b/docs/content/docs/spaces/guides/connections.mdx
index 0d20681b21..2845152eb6 100644
--- a/docs/content/docs/spaces/guides/connections.mdx
+++ b/docs/content/docs/spaces/guides/connections.mdx
@@ -10,20 +10,30 @@ with nothing to set up inside the Space.
## Connect a provider
-Open **Settings, Connections**. Each row is one provider, with its state and the
-apps it works with:
+Open **Settings, Connections** and scroll to **Providers**, below **Coding
+apps** and **On another machine**. Each row is one provider on one line: its
+icon, its name, a grey line saying what is saved (for example **Signed in as
[email protected] (Claude Max)** or **API key ending 4f2a**) or **Not
+connected**, and then either **Connect** or a check and **Connected**.
- **Connected**: Cua has a key or sign-in for it and last saw it work.
- **Needs reconnect**: the provider refused the key or sign-in, or it ran out.
Press **Reconnect** and connect it again.
- **Not connected**: press **Connect**.
+Click a row to open its sheet. It shows when the provider was connected, the
+apps it works with (each opens that app's page), and **Disconnect**. If you have
+more than one key for the provider, it lists them, each with **Remove**, and
+**Add another key** saves a second one beside the first, with a name you pick
+such as **Work key**. The first key is the one the row shows and the one every
+app uses unless you tell an app otherwise (see [Pick which key an app uses](#pick-which-key-an-app-uses)).
+
The sheet shows only the ways that apply on this machine. For Anthropic that
can be your Claude sign-in (found on this machine, for Claude Code only) or an
API key. For OpenAI it is an API key, or your ChatGPT sign-in for Codex.
Every other provider takes an API key. Anthropic, OpenAI, OpenRouter, Google
-AI Studio, xAI, DeepSeek, Kimi and Custom endpoint are up front; the rest are
-under **More providers**, which you can search by name.
+AI Studio, xAI, DeepSeek, Kimi and Custom endpoint are up front; press **Show
+all** for the rest, which you can search by name.
Saving never waits on the provider. Cua checks a key in the background and only
marks it **Needs reconnect** when the provider says it is invalid.
@@ -58,13 +68,30 @@ A key reaches a run as an environment variable of that run only, written to a
file in the run's folder that only the run can read and removed from the event
log. Nothing is written to the Space image or its Volume.
+### Pick which key an app uses
+
+Claude Code and Codex read one fixed sign-in, so their page shows it. Hermes,
+OpenCode, Goose, Pi and OpenClaw take any provider, so their page (open it from
+**Coding apps**) has a **Provider** section instead. It shows the provider and the key
+the app runs with, for example **Anthropic, API key ending 4f2a**. Press
+**Change** to point the app at another provider you have connected, or at
+another key of the same provider. The menu lists only what that app can really
+read: your Claude and ChatGPT sign-ins are never in it. **Connect another
+provider** at the bottom opens the Connect sheet.
+
+Choosing signs nothing out and deletes nothing, and it takes effect the next
+time the app runs. Until you choose, the app uses the first connected provider
+that works. If the key you chose is removed, the app does not move to another
+one on its own: its page says so and shows **Connect**, and you pick again.
+
### Hermes
Hermes picks a provider by its own order when it is not told which, and can
borrow the sign-ins of other command line tools it finds. Cua tells it instead:
each run gets a generated Hermes configuration that names the provider you
-connected (Anthropic first, then OpenAI, OpenRouter and the rest), lists the
-other connected providers as fallbacks, and turns off borrowing sign-ins. If
+chose in its **Provider** section (or, until you choose, the first one you connected:
+Anthropic, then OpenAI, OpenRouter and the rest), lists the other connected
+providers as fallbacks when you have not chosen one, and turns off borrowing sign-ins. If
Hermes cannot reach its provider, the run fails and the thread shows the
**Connect** card for it.
diff --git a/libs/cua/crates/cua-connections/src/delivery.rs b/libs/cua/crates/cua-connections/src/delivery.rs
index cb090c292d..dd03d8803d 100644
--- a/libs/cua/crates/cua-connections/src/delivery.rs
+++ b/libs/cua/crates/cua-connections/src/delivery.rs
@@ -14,8 +14,18 @@ use crate::{Connected, ENDPOINT_HARNESSES, HARNESS_IDS, Provider, provider, visi
/// sign-in) is skipped for every app but its own, even if a provider file
/// listed it (the generator refuses such a file too).
pub fn deliver(harness: &str, lookup: &dyn Fn(&str) -> Option<String>) -> BTreeMap<String, String> {
+ deliver_from(harness, None, lookup)
+}
+
+/// [`deliver`] from one provider only (`only`: the provider the person told the
+/// app to use), or from every provider (`None`).
+pub fn deliver_from(
+ harness: &str,
+ only: Option<&str>,
+ lookup: &dyn Fn(&str) -> Option<String>,
+) -> BTreeMap<String, String> {
let mut out = BTreeMap::new();
- for p in visible() {
+ for p in visible().filter(|p| only.is_none_or(|o| o == p.id)) {
for e in p.delivery_for(harness) {
if p.scope_of(e.src).is_some_and(|s| s != harness) {
continue;
@@ -31,6 +41,24 @@ pub fn deliver(harness: &str, lookup: &dyn Fn(&str) -> Option<String>) -> BTreeM
out
}
+/// Whether `harness` can use a saved credential named `env`: a name it reads,
+/// or the key of a provider it is pointed at by endpoint. A sign-in scoped to
+/// another app (Claude Code's, Codex's) is never one.
+pub fn can_read(harness: &str, env: &str) -> bool {
+ if crate::reads(harness).contains(&env) {
+ return true;
+ }
+ let Some(p) = crate::provider_of_env(env).filter(|p| p.visible()) else {
+ return false;
+ };
+ p.scope_of(env).is_none()
+ && p.delivery_for(harness).is_empty()
+ && p.delivery.iter().all(|d| d.harness != harness)
+ && endpoint_wire(p, harness).is_some()
+ && p.key_method()
+ .is_some_and(|m| m.env == env || m.aliases.contains(&env))
+}
+
/// The apps that can use `p`, in the order of the Connections page: those it
/// delivers a variable to, then (for providers an app has no variable for)
/// the apps that can be pointed at its wire with a base URL and a model.
diff --git a/libs/cua/crates/cua-connections/src/lib.rs b/libs/cua/crates/cua-connections/src/lib.rs
index ac44a9c97a..4500ea330f 100644
--- a/libs/cua/crates/cua-connections/src/lib.rs
+++ b/libs/cua/crates/cua-connections/src/lib.rs
@@ -25,7 +25,7 @@ mod generated;
use std::collections::BTreeMap;
-pub use delivery::{deliver, endpoint_for, works_with};
+pub use delivery::{can_read, deliver, deliver_from, endpoint_for, works_with};
pub use generated::*;
/// Every agent harness a run can use, in the order the Connections page lists
diff --git a/libs/cua/crates/cua-spaces-app-core/parity/golden/connectors.json b/libs/cua/crates/cua-spaces-app-core/parity/golden/connectors.json
index 981684a07f..c9914fd8e9 100644
--- a/libs/cua/crates/cua-spaces-app-core/parity/golden/connectors.json
+++ b/libs/cua/crates/cua-spaces-app-core/parity/golden/connectors.json
@@ -28,7 +28,7 @@
"custom | top | not-connected | Not connected | - | OpenCode, Goose, Pi, Hermes, OpenClaw | Connect"
],
"step": "nothing connected",
- "title": "Connections"
+ "title": "Providers"
},
{
"apps": [
@@ -56,7 +56,7 @@
"custom | top | not-connected | Not connected | - | OpenCode, Goose, Pi, Hermes, OpenClaw | Connect"
],
"step": "Claude Code signed in, an OpenAI key pasted, Codex connecting",
- "title": "Connections"
+ "title": "Providers"
},
{
"apps": [
@@ -84,7 +84,7 @@
"custom | top | not-connected | Not connected | - | OpenCode, Goose, Pi, Hermes, OpenClaw | Connect"
],
"step": "Claude Code sign-in ran out (needs reconnect)",
- "title": "Connections"
+ "title": "Providers"
},
{
"apps": [
@@ -112,7 +112,7 @@
"custom | top | not-connected | Not connected | - | OpenCode, Goose, Pi, Hermes, OpenClaw | Connect"
],
"step": "Claude Code is reading its sign-in",
- "title": "Connections"
+ "title": "Providers"
},
{
"apps": [
@@ -144,7 +144,7 @@
"zai | more | connected | Connected | API key •••• 7d1f, Global, Coding Plan | OpenCode, Goose, Pi, Hermes, OpenClaw | Disconnect"
],
"step": "DeepSeek key and a custom endpoint, More providers searched",
- "title": "Connections"
+ "title": "Providers"
},
{
"lede": "Works with Claude Code, OpenCode, Goose, Pi, Hermes, OpenClaw and T3 Code.",
diff --git a/libs/cua/crates/cua-spaces-app-core/src/connectors.rs b/libs/cua/crates/cua-spaces-app-core/src/connectors.rs
index 39a63ef1d8..5a735f3b6b 100644
--- a/libs/cua/crates/cua-spaces-app-core/src/connectors.rs
+++ b/libs/cua/crates/cua-spaces-app-core/src/connectors.rs
@@ -269,13 +269,35 @@ pub struct ConnectorFailure {
pub line: String,
}
+/// A key saved beside the first one for the same variable: named, and told apart by its slot.
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase", default)]
+pub struct ExtraKeyInput {
+ #[serde(flatten)]
+ pub key: AgentKeyInput,
+ pub slot: Option<String>,
+}
+
+/// The credential an app was told to use (names only).
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase", default)]
+pub struct UseInput {
+ pub provider: String,
+ pub env: String,
+ pub slot: Option<String>,
+}
+
/// What the Connectors page reads.
#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase", default)]
pub struct ConnectorsInput {
pub apps: Vec<ConnectorAppInput>,
- /// The saved keys and sign-ins (`agentKeys.list`).
+ /// The saved keys and sign-ins (`agentKeys.list`): the first for each variable.
pub keys: AgentKeysInput,
+ /// Keys saved beside the first for the same variable (an app that takes any provider can use one).
+ pub key_extras: Vec<ExtraKeyInput>,
+ /// Which credential each app that takes any provider was told to use, by app.
+ pub uses: std::collections::HashMap<String, UseInput>,
/// Provider variables exported in the person's shell (names only).
pub shell_keys: Vec<String>,
/// "Set up new apps automatically".
@@ -294,6 +316,23 @@ impl ConnectorsInput {
fn key(&self, env: &str) -> Option<&AgentKeyInput> {
self.keys.keys.iter().find(|k| k.env == env)
}
+ /// Every saved key for `env` with its slot: the first (none), then those saved beside it.
+ fn keys_of<'a>(
+ &'a self,
+ env: &'a str,
+ ) -> impl Iterator<Item = (&'a AgentKeyInput, Option<&'a str>)> + 'a {
+ self.keys
+ .keys
+ .iter()
+ .filter(move |k| k.env == env)
+ .map(|k| (k, None))
+ .chain(
+ self.key_extras
+ .iter()
+ .filter(move |x| x.key.env == env)
+ .map(|x| (&x.key, x.slot.as_deref())),
+ )
+ }
fn busy(&self, id: &str) -> Option<&str> {
self.busy
.iter()
@@ -405,6 +444,10 @@ fn app_signed_in(input: &ConnectorsInput, app: &str) -> bool {
let Some(a) = app_sign_in(app) else {
return true;
};
+ // An app told which credential to use is connected only while that one works.
+ if let Some(u) = input.uses.get(app).filter(|_| switchable(app)) {
+ return chosen_option(input, app, u).is_some();
+ }
if a.reads.is_empty() {
return a.providers.iter().any(|p| provider_connected(input, p.id));
}
@@ -573,9 +616,9 @@ pub struct ConnectorsView {
pub auto_label: String,
pub auto_help: String,
pub auto: bool,
- /// "Connections".
+ /// "Providers".
pub providers_title: String,
- /// Under Connections: where credentials stay.
+ /// Under Providers: where credentials stay.
pub providers_footer: String,
/// The providers up front, then any other that is connected or needs
/// reconnecting (so a connected one never hides in the search).
@@ -932,7 +975,7 @@ pub fn view_on(input: &ConnectorsInput, os: SpaceOs) -> ConnectorsView {
auto_label: "Set up new apps automatically".into(),
auto_help: "When you install another coding app, Cua adds itself and tells you.".into(),
auto: input.auto,
- providers_title: "Connections".into(),
+ providers_title: "Providers".into(),
providers_footer: format!(
"Sign-ins and keys stay on {this}{place}. Each one is only given to the apps that use it."
),
@@ -1614,6 +1657,186 @@ pub struct ConnectorSignIn {
pub button: ConnectorButton,
}
+/// Whether `app` takes any provider, so the person picks which credential it uses.
+pub fn switchable(app: &str) -> bool {
+ matches!(app, "hermes" | "opencode" | "goose" | "pi" | "openclaw")
+}
+
+/// One credential an app can use (a row of the Uses menu).
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct UseOption {
+ pub provider: String,
+ /// "Anthropic".
+ pub provider_name: String,
+ /// The icon's key (the provider id).
+ pub icon: String,
+ /// The variable the credential is saved as, and which of its keys.
+ pub env: String,
+ pub slot: Option<String>,
+ /// "API key ending 4f2a", or the key's own name ("Work key").
+ pub line: String,
+ /// The model the app is told to use with it, when the person set one.
+ pub model: Option<String>,
+ pub selected: bool,
+}
+
+/// An app's Uses row: which saved credential it runs with, and the others it could.
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct AppUses {
+ /// The row's heading: the provider in use, "No provider connected" or "Key not found".
+ pub title: String,
+ /// `connected` (a credential is in use), `not-connected`, or `gone` (the one
+ /// chosen is no longer saved or stopped working).
+ pub state: String,
+ /// The line under the title when no credential is in use.
+ pub status: String,
+ /// The credential in use.
+ pub current: Option<UseOption>,
+ /// Everything the app can use, first choice first. The Claude and ChatGPT
+ /// sign-ins are never among them.
+ pub options: Vec<UseOption>,
+ /// The person chose (rather than the first one that works being used).
+ pub chosen: bool,
+ /// "Connect another provider", at the bottom of the menu.
+ pub connect_label: String,
+ /// The one plain line under the row.
+ pub note: String,
+ pub enabled: bool,
+}
+
+/// What one saved key reads as in a menu.
+fn use_line(p: &reg::Provider, k: &AgentKeyInput) -> String {
+ if let Some(l) = k.label.as_deref().filter(|l| !l.is_empty()) {
+ return l.to_string();
+ }
+ if p.kind == reg::Kind::Custom {
+ if let Some(u) = k.fields.get("base_url").filter(|u| !u.is_empty()) {
+ return u.clone();
+ }
+ return "Saved".into();
+ }
+ let plan = k
+ .region
+ .as_deref()
+ .and_then(|r| p.regions.iter().find(|x| x.id == r))
+ .map(|r| format!(", {}", r.name))
+ .unwrap_or_default();
+ if k.last4.is_empty() {
+ format!("API key{plan}")
+ } else {
+ format!("API key ending {}{plan}", k.last4)
+ }
+}
+
+/// Every credential `app` can use now, in the order of preference: providers by rank, the
+/// first key of each before the keys saved beside it.
+fn use_options(input: &ConnectorsInput, app: &str) -> Vec<UseOption> {
+ let Some(a) = app_sign_in(app) else {
+ return vec![];
+ };
+ let harness = harness_of_app(app).unwrap_or(app);
+ let mut out = vec![];
+ for p in &a.providers {
+ for env in provider_envs(p) {
+ for (k, slot) in input.keys_of(env).filter(|(k, _)| !k.expired) {
+ // A sign-in scoped to another app is never offered; a custom endpoint needs its URL and model.
+ if p.scope_of(env).is_some() || !reg::can_read(harness, env) {
+ continue;
+ }
+ if p.kind == reg::Kind::Custom
+ && !(k.fields.get("base_url").is_some_and(|v| !v.is_empty())
+ && k.fields.get("model").is_some_and(|v| !v.is_empty()))
+ {
+ continue;
+ }
+ out.push(UseOption {
+ provider: p.id.into(),
+ provider_name: p.name.into(),
+ icon: p.id.into(),
+ env: env.into(),
+ slot: slot.map(str::to_string),
+ line: use_line(p, k),
+ model: k.fields.get("model").filter(|m| !m.is_empty()).cloned(),
+ selected: false,
+ });
+ }
+ }
+ }
+ out
+}
+
+/// The option an app was told to use, while it is still saved and works.
+fn chosen_option(input: &ConnectorsInput, app: &str, u: &UseInput) -> Option<UseOption> {
+ use_options(input, app)
+ .into_iter()
+ .find(|o| o.env == u.env && o.slot == u.slot)
+}
+
+fn app_uses(input: &ConnectorsInput, app: &str, name: &str, can_edit: bool) -> AppUses {
+ let mut options = use_options(input, app);
+ let choice = input.uses.get(app);
+ let picked = choice.and_then(|u| {
+ options
+ .iter()
+ .position(|o| o.env == u.env && o.slot == u.slot)
+ });
+ let current_ix = match (choice, picked) {
+ (None, _) => (!options.is_empty()).then_some(0),
+ (Some(_), p) => p,
+ };
+ if let Some(i) = current_ix {
+ options[i].selected = true;
+ }
+ let current = current_ix.map(|i| options[i].clone());
+ let (state, status) = match (&current, choice) {
+ (Some(_), _) => ("connected", String::new()),
+ (None, Some(_)) => (
+ "gone",
+ format!(
+ "The key {name} was told to use isn't saved any more. Choose another or connect one."
+ ),
+ ),
+ (None, None) => {
+ // Only a sign-in this app cannot read is saved: say what it needs, not a bare "not connected".
+ let sign_in_only = input.keys.keys.iter().any(|k| {
+ matches!(
+ k.env.as_str(),
+ "CLAUDE_CODE_OAUTH_TOKEN" | "CODEX_AUTH_JSON"
+ ) && !k.expired
+ });
+ (
+ "not-connected",
+ if sign_in_only {
+ format!("{name} needs an API key")
+ } else {
+ format!("Connect a provider to run {name}")
+ },
+ )
+ }
+ };
+ let title = match state {
+ "connected" => current
+ .as_ref()
+ .map(|c| c.provider_name.clone())
+ .unwrap_or_default(),
+ "gone" => "Key not found".to_string(),
+ _ => "No provider connected".to_string(),
+ };
+ AppUses {
+ title,
+ state: state.into(),
+ status,
+ current,
+ options,
+ chosen: choice.is_some(),
+ connect_label: "Connect another provider".into(),
+ note: format!("Takes effect the next time {name} runs."),
+ enabled: can_edit,
+ }
+}
+
/// One app's page.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
@@ -1629,7 +1852,9 @@ pub struct AppDetailView {
pub tools_title: String,
pub toggles: Vec<ConnectorToggle>,
pub sign_in_title: String,
- /// Absent for an app that signs in on its own.
+ /// Which credential the app uses, for an app that takes any provider (instead of `sign_in`).
+ pub uses: Option<AppUses>,
+ /// Absent for an app that signs in on its own, and for one with `uses`.
pub sign_in: Option<ConnectorSignIn>,
/// Instead of `sign_in`: the app signs in on its own.
pub sign_in_note: Option<String>,
@@ -1691,7 +1916,8 @@ pub fn app_detail(input: &ConnectorsInput, agent: &str) -> Option<AppDetailView>
enabled: !busy,
});
}
- let sign_in = app_sign_in(agent).map(|s| {
+ let uses = switchable(agent).then(|| app_uses(input, agent, &a.name, can_edit && !busy));
+ let sign_in = app_sign_in(agent).filter(|_| uses.is_none()).map(|s| {
// The provider it uses: the first connected one, else the first.
let p = s
.providers
@@ -1730,7 +1956,7 @@ pub fn app_detail(input: &ConnectorsInput, agent: &str) -> Option<AppDetailView>
},
}
});
- let sign_in_note = sign_in.is_none().then(|| {
+ let sign_in_note = (sign_in.is_none() && uses.is_none()).then(|| {
format!(
"{} signs in on its own. Cua doesn't need a sign-in for it.",
a.name
@@ -1742,6 +1968,10 @@ pub fn app_detail(input: &ConnectorsInput, agent: &str) -> Option<AppDetailView>
back_label: "Connections".into(),
status: match row.state.as_str() {
"connected" => signed_in_as(input, agent).unwrap_or_else(|| "Connected".into()),
+ // It has a provider to run with; what is missing is Cua's tools in the app.
+ _ if row.line.is_none() && local && app_signed_in(input, agent) => {
+ format!("Cua isn't set up in {} yet", a.name)
+ }
_ => row.line.clone().unwrap_or_else(|| "Not connected".into()),
},
connected: row.state == "connected",
@@ -1752,7 +1982,13 @@ pub fn app_detail(input: &ConnectorsInput, agent: &str) -> Option<AppDetailView>
String::new()
},
toggles,
- sign_in_title: "Sign-in".into(),
+ sign_in_title: if uses.is_some() {
+ "Provider"
+ } else {
+ "Sign-in"
+ }
+ .into(),
+ uses,
sign_in,
sign_in_note,
settings_file_label: "Settings file".into(),
@@ -2091,10 +2327,14 @@ mod tests {
let d = app_detail(&ConnectorsInput::default(), "goose").unwrap();
assert_eq!(d.name, "Goose");
assert!(d.toggles.is_empty() && d.tools_title.is_empty());
+ // Goose takes any provider: its page says which credential it uses, not a sign-in.
+ assert!(d.sign_in.is_none() && d.sign_in_note.is_none());
+ let u = d.uses.as_ref().unwrap();
assert_eq!(
- d.sign_in.as_ref().unwrap().title,
- "Signs in with a connected provider"
+ (u.title.as_str(), u.state.as_str()),
+ ("No provider connected", "not-connected")
);
+ assert_eq!(u.status, "Connect a provider to run Goose");
assert_eq!(d.connect.as_ref().unwrap().label, "Connect");
assert!(d.remove_label.is_none() && d.settings_file.is_none());
assert!(app_detail(&ConnectorsInput::default(), "vscode").is_none());
@@ -2200,13 +2440,19 @@ mod tests {
i.keys.keys.push(key("CLAUDE_CODE_OAUTH_TOKEN", "AAAA"));
i.keys.keys.push(key("CODEX_AUTH_JSON", "BBBB"));
let d = app_detail(&i, "hermes").unwrap();
- let s = d.sign_in.unwrap();
- assert!(!s.connected, "{s:?}");
- assert_ne!(s.status, "Connected");
+ // The card says what Hermes can read: nothing yet, and never the Claude or ChatGPT sign-in.
+ let u = d.uses.unwrap();
+ assert_eq!(u.state, "not-connected", "{u:?}");
+ assert!(u.current.is_none() && u.options.is_empty());
+ assert_eq!(u.title, "No provider connected");
+ assert_eq!(u.status, "Hermes needs an API key");
+ assert!(!d.connected);
assert!(!signed_in(&i, "hermes"));
i.keys.keys.push(key("OPENAI_API_KEY", "CCCC"));
assert!(signed_in(&i, "hermes"));
- assert!(app_detail(&i, "hermes").unwrap().sign_in.unwrap().connected);
+ let u = app_detail(&i, "hermes").unwrap().uses.unwrap();
+ assert_eq!(u.state, "connected");
+ assert_eq!(u.current.unwrap().provider, "openai");
}
#[test]
@@ -2277,7 +2523,7 @@ mod tests {
fn apps_start_with_connect_and_providers_not_connected() {
let v = view(&input());
assert_eq!(v.apps_title, "Coding apps");
- assert_eq!(v.providers_title, "Connections");
+ assert_eq!(v.providers_title, "Providers");
let claude = &v.apps[0];
assert_eq!(claude.state, "not-connected");
assert_eq!(claude.button.as_ref().unwrap().label, "Connect");
@@ -2931,4 +3177,204 @@ mod tests {
"machines, not devices"
);
}
+
+ const SWITCHABLE: [&str; 5] = ["hermes", "opencode", "goose", "pi", "openclaw"];
+
+ fn extra(env: &str, last4: &str, slot: &str, label: Option<&str>) -> ExtraKeyInput {
+ let mut k = key(env, last4);
+ k.label = label.map(str::to_string);
+ k.added_ms += 5;
+ ExtraKeyInput {
+ key: k,
+ slot: Some(slot.into()),
+ }
+ }
+
+ fn using(app: &str, env: &str, slot: Option<&str>) -> (String, UseInput) {
+ (
+ app.into(),
+ UseInput {
+ provider: provider_of_env_for_test(env),
+ env: env.into(),
+ slot: slot.map(str::to_string),
+ },
+ )
+ }
+
+ fn provider_of_env_for_test(env: &str) -> String {
+ reg::provider_of_env(env)
+ .map(|p| p.id.to_string())
+ .unwrap_or_default()
+ }
+
+ #[test]
+ fn every_app_that_takes_any_provider_lists_only_what_it_can_read() {
+ for app in SWITCHABLE {
+ // Only the Claude and ChatGPT sign-ins are saved: none is a credential for this app.
+ let mut i = input();
+ i.keys.keys.push(key("CLAUDE_CODE_OAUTH_TOKEN", "AAAA"));
+ i.keys.keys.push(key("CODEX_AUTH_JSON", "BBBB"));
+ let u = app_detail(&i, app).unwrap().uses.unwrap();
+ assert_eq!(u.state, "not-connected", "{app}");
+ assert!(u.options.is_empty() && u.current.is_none(), "{app}: {u:?}");
+ assert!(!signed_in(&i, app), "{app}");
+ assert!(app_detail(&i, app).unwrap().sign_in.is_none(), "{app}");
+ // Two API keys: both are offered, the first one by rank is in use, nothing is chosen.
+ i.keys.keys.push(key("OPENAI_API_KEY", "CCCC"));
+ i.keys.keys.push(key("ANTHROPIC_API_KEY", "DDDD"));
+ let u = app_detail(&i, app).unwrap().uses.unwrap();
+ let ids: Vec<_> = u.options.iter().map(|o| o.provider.as_str()).collect();
+ assert!(
+ ids.contains(&"anthropic") && ids.contains(&"openai"),
+ "{app}: {ids:?}"
+ );
+ assert!(
+ u.options
+ .iter()
+ .all(|o| !o.env.contains("OAUTH") && o.env != "CODEX_AUTH_JSON"),
+ "{app}"
+ );
+ assert_eq!(u.state, "connected", "{app}");
+ assert!(!u.chosen, "{app}");
+ let cur = u.current.unwrap();
+ assert_eq!(cur.env, u.options[0].env, "{app}: the first that works");
+ assert!(cur.selected);
+ assert_eq!(u.options.iter().filter(|o| o.selected).count(), 1, "{app}");
+ assert!(u.options[0].line.contains("ending"), "{app}");
+ }
+ }
+
+ #[test]
+ fn apps_with_one_fixed_sign_in_have_no_switcher() {
+ let mut i = input();
+ i.keys.keys.push(key("ANTHROPIC_API_KEY", "AAAA"));
+ i.keys.keys.push(key("OPENAI_API_KEY", "BBBB"));
+ for app in ["claude-code", "codex", "gemini-cli", "antigravity"] {
+ let d = app_detail(&i, app).unwrap();
+ assert!(d.uses.is_none(), "{app}");
+ assert!(d.sign_in.is_some(), "{app}");
+ assert!(!switchable(app));
+ }
+ }
+
+ #[test]
+ fn the_person_picks_which_key_an_app_uses() {
+ for app in SWITCHABLE {
+ let mut i = input();
+ i.keys.keys.push(key("ANTHROPIC_API_KEY", "AAAA"));
+ i.keys.keys.push(key("OPENAI_API_KEY", "BBBB"));
+ i.key_extras
+ .push(extra("ANTHROPIC_API_KEY", "CCCC", "k2", Some("Work key")));
+ let u = app_detail(&i, app).unwrap().uses.unwrap();
+ assert_eq!(u.options.len(), 3, "{app}");
+ assert!(
+ u.options
+ .iter()
+ .any(|o| o.line == "Work key" && o.slot.as_deref() == Some("k2"))
+ );
+ // Pointed at OpenAI: that one is in use and it is chosen.
+ let (a, c) = using(app, "OPENAI_API_KEY", None);
+ i.uses.insert(a, c);
+ let u = app_detail(&i, app).unwrap().uses.unwrap();
+ let cur = u.current.unwrap();
+ assert_eq!(
+ (cur.provider.as_str(), u.chosen, u.state.as_str()),
+ ("openai", true, "connected"),
+ "{app}"
+ );
+ assert!(signed_in(&i, app));
+ // Pointed at the second Anthropic key.
+ let (a, c) = using(app, "ANTHROPIC_API_KEY", Some("k2"));
+ i.uses.insert(a, c);
+ let cur = app_detail(&i, app).unwrap().uses.unwrap().current.unwrap();
+ assert_eq!(
+ (cur.line.as_str(), cur.slot.as_deref()),
+ ("Work key", Some("k2")),
+ "{app}"
+ );
+ }
+ }
+
+ #[test]
+ fn a_removed_key_leaves_the_app_not_connected_and_never_switches_silently() {
+ for app in SWITCHABLE {
+ let mut i = input();
+ i.keys.keys.push(key("ANTHROPIC_API_KEY", "AAAA"));
+ i.keys.keys.push(key("OPENAI_API_KEY", "BBBB"));
+ // It was told to use a key beside the first one, and that key is gone.
+ let (a, c) = using(app, "ANTHROPIC_API_KEY", Some("k2"));
+ i.uses.insert(a, c);
+ let d = app_detail(&i, app).unwrap();
+ let u = d.uses.unwrap();
+ assert_eq!(u.state, "gone", "{app}");
+ assert!(u.current.is_none(), "{app}: no silent switch");
+ assert!(u.options.iter().all(|o| !o.selected));
+ assert!(u.status.contains("isn't saved any more"), "{}", u.status);
+ assert!(!signed_in(&i, app), "{app}");
+ assert!(!d.connected, "{app}");
+ assert_eq!(d.connect.unwrap().label, "Connect");
+ // An expired key is the same.
+ let mut j = input();
+ let mut k = key("OPENAI_API_KEY", "BBBB");
+ k.expired = true;
+ j.keys.keys.push(k);
+ j.keys.keys.push(key("ANTHROPIC_API_KEY", "AAAA"));
+ let (a, c) = using(app, "OPENAI_API_KEY", None);
+ j.uses.insert(a, c);
+ assert_eq!(
+ app_detail(&j, app).unwrap().uses.unwrap().state,
+ "gone",
+ "{app}"
+ );
+ }
+ }
+
+ #[test]
+ fn no_state_of_the_provider_row_reads_like_an_action_called_uses() {
+ for app in SWITCHABLE {
+ let mut states = vec![];
+ states.push(input());
+ let mut signs = input();
+ signs.keys.keys.push(key("CLAUDE_CODE_OAUTH_TOKEN", "AAAA"));
+ states.push(signs);
+ let mut chosen = input();
+ chosen.keys.keys.push(key("ANTHROPIC_API_KEY", "AAAA"));
+ states.push(chosen.clone());
+ let (a, c) = using(app, "ANTHROPIC_API_KEY", Some("gone"));
+ chosen.uses.insert(a, c);
+ states.push(chosen);
+ for i in states {
+ let u = app_detail(&i, app).unwrap().uses.unwrap();
+ let words = format!("{} | {}", u.title, u.status);
+ assert!(!words.contains("Uses"), "{app}: {words}");
+ assert!(!u.title.is_empty(), "{app}");
+ }
+ }
+ let u = app_detail(&input(), "opencode").unwrap().uses.unwrap();
+ assert_eq!(
+ (u.title.as_str(), u.status.as_str()),
+ (
+ "No provider connected",
+ "Connect a provider to run OpenCode"
+ )
+ );
+ }
+
+ #[test]
+ fn the_uses_words_have_no_middle_dot_or_devices() {
+ let mut i = input();
+ i.keys.keys.push(key("ANTHROPIC_API_KEY", "AAAA"));
+ i.key_extras
+ .push(extra("ANTHROPIC_API_KEY", "CCCC", "k2", Some("Work key")));
+ let (a, c) = using("hermes", "ANTHROPIC_API_KEY", Some("gone"));
+ i.uses.insert(a, c);
+ for app in SWITCHABLE {
+ let text = format!("{:?}", app_detail(&i, app).unwrap().uses);
+ assert!(
+ !text.contains('\u{b7}') && !text.to_lowercase().contains("device"),
+ "{text}"
+ );
+ assert!(text.contains("Takes effect the next time"), "{text}");
+ }
+ }
}
diff --git a/libs/cua/crates/cua-spaces/src/agents/keys.rs b/libs/cua/crates/cua-spaces/src/agents/keys.rs
index 9d6f6ae92f..857b565e2c 100644
--- a/libs/cua/crates/cua-spaces/src/agents/keys.rs
+++ b/libs/cua/crates/cua-spaces/src/agents/keys.rs
@@ -27,6 +27,15 @@ use std::time::{Duration, Instant};
/// The store's secret name.
pub const SECRET_NAME: &str = "agent-keys";
+/// The store's secret name for which credential each app uses (not a secret:
+/// a provider, a variable name and a slot, kept beside the keys).
+pub const USES_NAME: &str = "agent-uses";
+
+/// The apps that take any provider and so let the person pick which
+/// credential they use (Settings, Connections, the app's page). Claude Code,
+/// Codex, Gemini CLI and Antigravity read one fixed sign-in.
+pub const SWITCHABLE_APPS: &[&str] = &["hermes", "opencode", "goose", "pi", "openclaw"];
+
/// The app's settings methods (`SpaceService.CallSpaceTool` names). They are
/// not contract tools: no MCP server lists or calls them, so an agent can
/// never read or change a key.
@@ -35,6 +44,7 @@ pub const APP_METHODS: &[&str] = &[
"agent_keys.check",
"agent_keys.set",
"agent_keys.remove",
+ "agent_keys.use",
"agent_keys.shell",
"agent_keys.from_shell",
];
@@ -264,6 +274,10 @@ pub struct KeyInfo {
pub provider: String,
/// The variable a run gets it as.
pub env: String,
+ /// Which of several keys saved for the same variable this is; absent for the
+ /// first one (the key a provider's row shows).
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub slot: Option<String>,
/// Its last four characters (empty for a key shorter than 12).
pub last4: String,
/// When it was added (Unix ms).
@@ -294,6 +308,9 @@ pub struct KeyInfo {
#[derive(Clone, Debug, PartialEq, Eq, Serialize)]
pub struct KeysReport {
pub keys: Vec<KeyInfo>,
+ /// Which credential each switchable app uses, by app; an app not listed uses
+ /// the first one that works.
+ pub uses: BTreeMap<String, UseChoice>,
pub providers: Vec<Provider>,
/// Keys can be saved here.
pub available: bool,
@@ -302,9 +319,22 @@ pub struct KeysReport {
pub unavailable: Option<String>,
}
+/// The credential an app was told to use: a variable and which of its saved
+/// keys. Names only, never a value.
+#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
+pub struct UseChoice {
+ pub provider: String,
+ pub env: String,
+ #[serde(default, skip_serializing_if = "Option::is_none")]
+ pub slot: Option<String>,
+}
+
#[derive(Clone, Serialize, Deserialize)]
struct Stored {
env: String,
+ /// Set on a key added beside the first one for the same variable.
+ #[serde(default, skip_serializing_if = "Option::is_none")]
+ slot: Option<String>,
provider: String,
value: String,
added_ms: u64,
@@ -362,6 +392,7 @@ impl Stored {
KeyInfo {
provider: self.provider.clone(),
env: self.env.clone(),
+ slot: self.slot.clone(),
last4,
added_ms: self.added_ms,
label: self.label.clone(),
@@ -453,6 +484,8 @@ pub struct AgentKeys {
cache: Mutex<Option<(Instant, Vec<Stored>)>>,
// When Claude Code's own sign-in was last re-read ([`AgentKeys::sync_claude_login`]).
claude_sync: Mutex<Option<Instant>>,
+ // Which credential each switchable app uses, as last read.
+ uses_cache: Mutex<Option<(Instant, BTreeMap<String, UseChoice>)>>,
}
impl std::fmt::Debug for AgentKeys {
@@ -486,6 +519,7 @@ impl AgentKeys {
unavailable: None,
cache: Mutex::new(None),
claude_sync: Mutex::new(None),
+ uses_cache: Mutex::new(None),
}
} else {
Self::unavailable(file_store_reason())
@@ -499,6 +533,7 @@ impl AgentKeys {
unavailable: Some(reason.into()),
cache: Mutex::new(None),
claude_sync: Mutex::new(None),
+ uses_cache: Mutex::new(None),
}
}
@@ -562,6 +597,7 @@ impl AgentKeys {
pub fn report(&self) -> Result<KeysReport> {
Ok(KeysReport {
keys: self.list()?,
+ uses: self.uses(),
providers: providers(),
available: self.available(),
unavailable: self.unavailable.clone(),
@@ -588,11 +624,43 @@ impl AgentKeys {
region: Option<&str>,
fields: &BTreeMap<String, String>,
) -> Result<KeyInfo> {
+ self.set_slot(provider, env, value, region, fields, None, false)
+ }
+
+ /// [`AgentKeys::set_with`], optionally as another key beside the first one
+ /// saved for the provider (`add`), named `label` ("Work key"). With `add`
+ /// and no first key yet, it is saved as the first. The first key is what a
+ /// provider's row shows; the others are only used by an app that was told
+ /// to use one ([`AgentKeys::set_use`]).
+ #[allow(clippy::too_many_arguments)]
+ pub fn set_slot(
+ &self,
+ provider: &str,
+ env: Option<&str>,
+ value: &str,
+ region: Option<&str>,
+ fields: &BTreeMap<String, String>,
+ label: Option<&str>,
+ add: bool,
+ ) -> Result<KeyInfo> {
+ let label = match label.map(str::trim).filter(|l| !l.is_empty()) {
+ Some(l) if l.chars().count() > 40 || l.chars().any(|c| c.is_control()) => {
+ return Err(Error::InvalidArgument(
+ "a key's name must be one line of at most 40 characters".into(),
+ ));
+ }
+ other => other,
+ };
let mut optional_secret = false;
// A Claude token (`sk-ant-oat...`, from `claude setup-token`) pasted where an API
// key goes is a sign-in for Claude Code, not an API key: saved as one, so it
// works for Claude Code and is never offered to another app as a key.
if provider == "anthropic" && value.trim().contains("sk-ant-oat") {
+ if add {
+ return Err(Error::InvalidArgument(
+ "a Claude sign-in token is used by Claude Code only; it can't be added as another key".into(),
+ ));
+ }
let copy = cua_agents::signin::claude_pasted_token(value)
.map_err(|r| Error::InvalidArgument(r.line().into()))?;
return self.import(
@@ -638,13 +706,19 @@ impl AgentKeys {
}
let mut g = self.lock();
let mut keys = self.read(&mut g, true)?;
- keys.retain(|k| k.env != env);
+ // Another key goes beside the first; saving the first again replaces only it.
+ let slot = (add && keys.iter().any(|k| k.env == env && k.slot.is_none()))
+ .then(|| format!("k{:x}", now_ms()));
+ if slot.is_none() {
+ keys.retain(|k| !(k.env == env && k.slot.is_none()));
+ }
let stored = Stored {
+ slot,
provider: id,
env,
value: value.into(),
added_ms: now_ms(),
- label: None,
+ label: label.map(str::to_string),
source: None,
expires_ms: None,
rejected_ms: None,
@@ -658,12 +732,75 @@ impl AgentKeys {
};
let info = stored.info();
keys.push(stored);
- keys.sort_by(|a, b| a.env.cmp(&b.env));
+ keys.sort_by(|a, b| (&a.env, &a.slot, a.added_ms).cmp(&(&b.env, &b.slot, b.added_ms)));
self.write(&mut g, keys)?;
Ok(info)
}
- /// Removes the key named `env`; whether there was one.
+ /// Removes one key beside the first, named by its `slot`; whether there was one.
+ /// An app that was told to use it then has no credential (it says so), never
+ /// another one.
+ pub fn remove_slot(&self, env: &str, slot: &str) -> Result<bool> {
+ if self.store.is_none() {
+ return Ok(false);
+ }
+ let mut g = self.lock();
+ let mut keys = self.read(&mut g, true)?;
+ let before = keys.len();
+ keys.retain(|k| !(k.env == env && k.slot.as_deref() == Some(slot)));
+ if keys.len() == before {
+ return Ok(false);
+ }
+ self.write(&mut g, keys)?;
+ Ok(true)
+ }
+
+ /// Removes the first key saved for `env` and keeps the others: the oldest of them
+ /// becomes the first. Whether there was one.
+ pub fn remove_first(&self, env: &str) -> Result<bool> {
+ if self.store.is_none() {
+ return Ok(false);
+ }
+ let mut g = self.lock();
+ let mut keys = self.read(&mut g, true)?;
+ let Some(at) = keys.iter().position(|k| k.env == env && k.slot.is_none()) else {
+ return Ok(false);
+ };
+ keys.remove(at);
+ // The oldest key beside it takes its place; a use that named it follows.
+ let next = keys
+ .iter()
+ .enumerate()
+ .filter(|(_, k)| k.env == env && k.slot.is_some())
+ .min_by_key(|(_, k)| k.added_ms)
+ .map(|(i, _)| i);
+ if let Some(i) = next {
+ keys[i].slot = None;
+ }
+ self.write(&mut g, keys)?;
+ drop(g);
+ // An app told to use the key just removed has no credential now (it says so); it is
+ // not moved to the key that took its place.
+ let mut all = self.uses();
+ let mut changed = false;
+ for u in all
+ .values_mut()
+ .filter(|u| u.env == env && u.slot.is_none())
+ {
+ u.slot = Some("removed".into());
+ changed = true;
+ }
+ if changed && let Some(store) = &self.store {
+ store
+ .save_secret(USES_NAME, &serde_json::to_vec(&all)?)
+ .map_err(store_err)?;
+ *self.uses_cache.lock().unwrap_or_else(|p| p.into_inner()) =
+ Some((Instant::now(), all));
+ }
+ Ok(true)
+ }
+
+ /// Removes the key named `env`, and every key saved beside it; whether there was one.
pub fn remove(&self, env: &str) -> Result<bool> {
if self.store.is_none() {
return Ok(false);
@@ -709,6 +846,7 @@ impl AgentKeys {
}
keys.retain(|k| k.source.as_deref() != Some(source));
let stored = Stored {
+ slot: None,
provider: provider_of(env).into(),
env: env.into(),
value: value.into(),
@@ -860,7 +998,7 @@ impl AgentKeys {
match self.read(&mut g, false) {
Ok(keys) => keys
.into_iter()
- .filter(Stored::usable)
+ .filter(|k| k.slot.is_none() && k.usable())
.map(|k| k.env)
.collect(),
Err(e) => {
@@ -882,7 +1020,7 @@ impl AgentKeys {
.into_iter()
// A sign-in past its expiry is not forwarded: the run would
// only be told 401 by the provider.
- .filter(|k| names.contains(&k.env.as_str()) && k.usable())
+ .filter(|k| k.slot.is_none() && names.contains(&k.env.as_str()) && k.usable())
.map(|k| (k.env, k.value))
.collect(),
Err(e) => {
@@ -893,6 +1031,149 @@ impl AgentKeys {
}
}
+/// What an app was told to use, against what is saved.
+#[derive(Clone, Debug, PartialEq, Eq)]
+pub enum Chosen {
+ /// Nothing was chosen: the app gets every credential it can read, as before.
+ NoChoice,
+ /// It was told to use a credential that is no longer saved or no longer works.
+ /// The app gets no credential from the keys; Settings says so.
+ Gone,
+ /// The credential it was told to use, and what comes with it.
+ Found {
+ provider: String,
+ env: String,
+ value: String,
+ region: Option<String>,
+ fields: BTreeMap<String, String>,
+ },
+}
+
+impl AgentKeys {
+ /// Which credential each switchable app was told to use (names only).
+ pub fn uses(&self) -> BTreeMap<String, UseChoice> {
+ let Some(store) = &self.store else {
+ return BTreeMap::new();
+ };
+ let mut g = self.uses_cache.lock().unwrap_or_else(|p| p.into_inner());
+ if let Some((at, m)) = g.as_ref()
+ && at.elapsed() < CACHE_FOR
+ {
+ return m.clone();
+ }
+ let m = match store.load_secret(USES_NAME) {
+ Ok(Some(bytes)) => {
+ serde_json::from_slice::<BTreeMap<String, UseChoice>>(&bytes).unwrap_or_default()
+ }
+ _ => BTreeMap::new(),
+ };
+ *g = Some((Instant::now(), m.clone()));
+ m
+ }
+
+ /// Tells `app` (a switchable app's setup id) which saved credential to use,
+ /// or with `None` to use the first one that works again. The credential must
+ /// be saved and one the app can read; nothing is signed out or deleted.
+ pub fn set_use(&self, app: &str, choice: Option<(&str, Option<&str>)>) -> Result<()> {
+ if !SWITCHABLE_APPS.contains(&app) {
+ return Err(Error::InvalidArgument(format!(
+ "{app} reads one fixed sign-in; there is nothing to choose"
+ )));
+ }
+ let Some(store) = &self.store else {
+ return Err(self.refusal());
+ };
+ let new = match choice {
+ None => None,
+ Some((env, slot)) => {
+ let keys = {
+ let mut g = self.lock();
+ self.read(&mut g, true)?
+ };
+ let k = keys
+ .iter()
+ .find(|k| k.env == env && k.slot.as_deref() == slot && k.usable())
+ .ok_or_else(|| {
+ Error::InvalidArgument(
+ "that key isn't saved, or has stopped working".into(),
+ )
+ })?;
+ if !registry::can_read(app, env) {
+ return Err(Error::InvalidArgument(format!(
+ "{app} can't use that credential"
+ )));
+ }
+ Some(UseChoice {
+ provider: k.provider.clone(),
+ env: k.env.clone(),
+ slot: k.slot.clone(),
+ })
+ }
+ };
+ let mut all = self.uses();
+ match new {
+ Some(c) => {
+ all.insert(app.to_string(), c);
+ }
+ None => {
+ all.remove(app);
+ }
+ }
+ if all.is_empty() {
+ store.clear_secret(USES_NAME).map_err(store_err)?;
+ } else {
+ store
+ .save_secret(USES_NAME, &serde_json::to_vec(&all)?)
+ .map_err(store_err)?;
+ }
+ *self.uses_cache.lock().unwrap_or_else(|p| p.into_inner()) = Some((Instant::now(), all));
+ Ok(())
+ }
+
+ /// What `app` was told to use, against what is saved now.
+ pub fn chosen(&self, app: &str) -> Chosen {
+ let Some(u) = self.uses().remove(app) else {
+ return Chosen::NoChoice;
+ };
+ let mut g = self.lock();
+ let keys = self.read(&mut g, false).unwrap_or_default();
+ match keys
+ .into_iter()
+ .find(|k| k.env == u.env && k.slot == u.slot && k.usable())
+ {
+ Some(k) if registry::can_read(app, &k.env) => Chosen::Found {
+ provider: k.provider,
+ env: k.env,
+ value: k.value,
+ region: k.region,
+ fields: k.fields,
+ },
+ _ => Chosen::Gone,
+ }
+ }
+
+ /// Notes that a run was refused with the key in `slot`: it reads as needing a reconnect.
+ pub fn mark_slot_rejected(&self, env: &str, slot: &str) -> Result<()> {
+ if self.store.is_none() {
+ return Ok(());
+ }
+ let mut g = self.lock();
+ let mut keys = self.read(&mut g, true)?;
+ let mut changed = false;
+ for k in keys
+ .iter_mut()
+ .filter(|k| k.env == env && k.slot.as_deref() == Some(slot) && k.rejected_ms.is_none())
+ {
+ k.rejected_ms = Some(now_ms());
+ changed = true;
+ }
+ if changed {
+ self.write(&mut g, keys)?;
+ }
+ Ok(())
+ }
+}
+
impl AgentKeys {
/// The connections the saved keys make: one per provider that has a usable
/// credential a run may be given (a sign-in scoped to one app counts for
@@ -908,7 +1189,7 @@ impl AgentKeys {
}
};
let mut out: Vec<registry::Connected> = vec![];
- for k in keys.into_iter().filter(Stored::usable) {
+ for k in keys.into_iter().filter(|k| k.slot.is_none() && k.usable()) {
let Some(def) = registry::provider_of_env(&k.env) else {
continue;
};
@@ -959,7 +1240,7 @@ impl AgentKeys {
let mut g = self.lock();
let mut keys = self.read(&mut g, true)?;
let mut changed = vec![];
- for k in keys.iter_mut() {
+ for k in keys.iter_mut().filter(|k| k.slot.is_none()) {
let Some((_, added)) = which.iter().find(|(e, _)| *e == k.env) else {
continue;
};
@@ -983,7 +1264,7 @@ impl AgentKeys {
match self.read(&mut g, true) {
Ok(keys) => keys
.into_iter()
- .filter(|k| !k.expired() && !k.value.is_empty())
+ .filter(|k| k.slot.is_none() && !k.expired() && !k.value.is_empty())
.filter_map(|k| {
let def = registry::provider_of_env(&k.env)?;
def.check?;
@@ -1167,6 +1448,16 @@ pub fn mark_rejected_for_run(harness: &str, provider: &str) {
let mut envs = envs;
envs.sort_unstable();
envs.dedup();
+ // An app told to use a key beside the first one: that key is the one refused.
+ if let Some(u) = global().uses().remove(harness)
+ && u.provider == provider
+ && let Some(slot) = u.slot.as_deref()
+ {
+ envs.retain(|e| *e != u.env);
+ if let Err(e) = global().mark_slot_rejected(&u.env, slot) {
+ tracing::warn!(error = %e, "agent keys: could not note a rejected credential");
+ }
+ }
if let Err(e) = global().mark_rejected(&envs) {
tracing::warn!(error = %e, "agent keys: could not note a rejected credential");
}
@@ -1285,12 +1576,35 @@ struct SetArgs {
region: Option<String>,
#[serde(default)]
fields: BTreeMap<String, String>,
+ /// Save as another key beside the first one for the provider.
+ #[serde(default)]
+ add: bool,
+ /// A name for the key ("Work key").
+ #[serde(default)]
+ label: Option<String>,
}
#[derive(Deserialize)]
#[serde(deny_unknown_fields)]
struct RemoveArgs {
env: String,
+ /// Remove only this key beside the first one (without it, the key and all beside it).
+ #[serde(default)]
+ slot: Option<String>,
+ /// With no `slot`: remove only the first key and keep the others.
+ #[serde(default)]
+ keep_others: bool,
+}
+
+#[derive(Deserialize)]
+#[serde(deny_unknown_fields)]
+struct UseArgs {
+ app: String,
+ /// Absent: use the first credential that works again.
+ #[serde(default)]
+ env: Option<String>,
+ #[serde(default)]
+ slot: Option<String>,
}
#[derive(Deserialize)]
@@ -1349,12 +1663,14 @@ pub fn app_call(
.map(|l| l.iter().any(|k| k.provider == provider))
.unwrap_or(false);
let saved = parsed.and_then(|a| {
- keys.set_with(
+ keys.set_slot(
&a.provider,
a.env.as_deref(),
&a.value,
a.region.as_deref(),
&a.fields,
+ a.label.as_deref(),
+ a.add,
)
});
note_connection(
@@ -1368,7 +1684,11 @@ pub fn app_call(
serde_json::from_value::<RemoveArgs>(args)
.map_err(|e| Error::InvalidArgument(format!("agent_keys.remove: {e}")))
.and_then(|a| {
- let removed = keys.remove(&a.env)?;
+ let removed = match a.slot.as_deref() {
+ Some(slot) => keys.remove_slot(&a.env, slot)?,
+ None if a.keep_others => keys.remove_first(&a.env)?,
+ None => keys.remove(&a.env)?,
+ };
if removed {
note_connection(&a.env, "remove", "ok");
}
@@ -1376,6 +1696,14 @@ pub fn app_call(
})
.and_then(|_| keys.report()),
),
+ "agent_keys.use" => report(
+ serde_json::from_value::<UseArgs>(args)
+ .map_err(|e| Error::InvalidArgument(format!("agent_keys.use: {e}")))
+ .and_then(|a| {
+ keys.set_use(&a.app, a.env.as_deref().map(|e| (e, a.slot.as_deref())))
+ })
+ .and_then(|_| keys.report()),
+ ),
"agent_keys.shell" => serde_json::to_value(ShellReport {
names: shell_names(shell),
})
@@ -2258,4 +2586,174 @@ mod tests {
assert!(!allowed.contains(&n), "{n}");
}
}
+
+ #[test]
+ fn more_keys_for_one_provider_are_named_listed_without_values_and_kept_apart() {
+ let (keys, dir) = temp_keys();
+ let f = BTreeMap::new();
+ keys.set("anthropic", None, "sk-ant-api03-first-aaaa")
+ .unwrap();
+ let work = keys
+ .set_slot(
+ "anthropic",
+ None,
+ "sk-ant-api03-work-bbbb",
+ None,
+ &f,
+ Some("Work key"),
+ true,
+ )
+ .unwrap();
+ assert!(work.slot.is_some());
+ assert_eq!(work.label.as_deref(), Some("Work key"));
+ // Adding with no first key saves it as the first.
+ let first = keys
+ .set_slot(
+ "openai",
+ None,
+ "sk-openai-first-cccc",
+ None,
+ &f,
+ Some("Mine"),
+ true,
+ )
+ .unwrap();
+ assert!(first.slot.is_none());
+ // A name must be one short line.
+ assert!(
+ keys.set_slot(
+ "openai",
+ None,
+ "sk-openai-x-dddd",
+ None,
+ &f,
+ Some("a\nb"),
+ true
+ )
+ .is_err()
+ );
+ assert!(
+ keys.set_slot(
+ "openai",
+ None,
+ "sk-openai-x-dddd",
+ None,
+ &f,
+ Some(&"n".repeat(41)),
+ true
+ )
+ .is_err()
+ );
+ // A Claude sign-in token is never added as another key.
+ let token = format!("sk-ant-oat01-{}", "y".repeat(40));
+ assert!(
+ keys.set_slot("anthropic", None, &token, None, &f, None, true)
+ .is_err()
+ );
+ // The report names both Anthropic keys and carries no value.
+ let report = serde_json::to_string(&keys.report().unwrap()).unwrap();
+ assert!(report.contains("Work key") && report.contains("bbbb") && report.contains("aaaa"));
+ assert!(
+ !report.contains("sk-ant-api03") && !report.contains("sk-openai"),
+ "{report}"
+ );
+ // Only the first key is what runs, readiness and the connection list see.
+ assert_eq!(
+ keys.values(&["ANTHROPIC_API_KEY"]),
+ BTreeMap::from([("ANTHROPIC_API_KEY".into(), "sk-ant-api03-first-aaaa".into())])
+ );
+ assert_eq!(
+ keys.names()
+ .iter()
+ .filter(|n| *n == "ANTHROPIC_API_KEY")
+ .count(),
+ 1
+ );
+ assert_eq!(keys.connections().len(), 2);
+ // Saving the first again replaces only it.
+ keys.set("anthropic", None, "sk-ant-api03-first-zzzz")
+ .unwrap();
+ let listed = keys.list().unwrap();
+ assert_eq!(
+ listed
+ .iter()
+ .filter(|k| k.env == "ANTHROPIC_API_KEY")
+ .count(),
+ 2
+ );
+ assert!(listed.iter().any(|k| k.slot.is_some() && k.last4 == "bbbb"));
+ // Disconnecting the provider removes every key saved for it.
+ assert!(keys.remove("ANTHROPIC_API_KEY").unwrap());
+ assert!(
+ keys.list()
+ .unwrap()
+ .iter()
+ .all(|k| k.env != "ANTHROPIC_API_KEY")
+ );
+ // A fresh handle reads the same store.
+ let again = AgentKeys::new(cua_auth::Store::TestKeychain(dir.clone()));
+ assert_eq!(again.list().unwrap().len(), 1);
+ let _ = std::fs::remove_dir_all(&dir);
+ }
+
+ #[test]
+ fn which_key_an_app_uses_is_kept_beside_the_keys_and_shown_without_values() {
+ let (keys, dir) = temp_keys();
+ let f = BTreeMap::new();
+ keys.set("anthropic", None, "sk-ant-api03-first-aaaa")
+ .unwrap();
+ let slot = keys
+ .set_slot(
+ "anthropic",
+ None,
+ "sk-ant-api03-work-bbbb",
+ None,
+ &f,
+ None,
+ true,
+ )
+ .unwrap()
+ .slot
+ .unwrap();
+ keys.set_use("hermes", Some(("ANTHROPIC_API_KEY", Some(&slot))))
+ .unwrap();
+ let report = keys.report().unwrap();
+ assert_eq!(report.uses["hermes"].slot.as_deref(), Some(slot.as_str()));
+ assert_eq!(report.uses["hermes"].provider, "anthropic");
+ // It outlives the handle, and clearing it removes it.
+ let again = AgentKeys::new(cua_auth::Store::TestKeychain(dir.clone()));
+ assert_eq!(again.uses().len(), 1);
+ again.set_use("hermes", None).unwrap();
+ assert!(again.uses().is_empty());
+ // A key refused by a run is the chosen one, not the first.
+ keys.set_use("hermes", Some(("ANTHROPIC_API_KEY", Some(&slot))))
+ .unwrap();
+ keys.mark_slot_rejected("ANTHROPIC_API_KEY", &slot).unwrap();
+ let listed = keys.list().unwrap();
+ assert!(listed.iter().find(|k| k.slot.is_some()).unwrap().expired);
+ assert!(!listed.iter().find(|k| k.slot.is_none()).unwrap().expired);
+ assert_eq!(keys.chosen("hermes"), Chosen::Gone);
+ // Drives through the app method as well.
+ let shell = std::path::Path::new("/bin/sh");
+ let out = app_call(
+ &keys,
+ "agent_keys.use",
+ serde_json::json!({"app": "hermes"}),
+ shell,
+ )
+ .unwrap()
+ .unwrap();
+ assert!(out["uses"].as_object().unwrap().is_empty());
+ assert!(
+ app_call(
+ &keys,
+ "agent_keys.use",
+ serde_json::json!({"app": "codex", "env": "ANTHROPIC_API_KEY"}),
+ shell
+ )
+ .unwrap()
+ .is_err()
+ );
+ let _ = std::fs::remove_dir_all(&dir);
+ }
}
diff --git a/libs/cua/crates/cua-spaces/src/agents/mod.rs b/libs/cua/crates/cua-spaces/src/agents/mod.rs
index 2081e6b9ae..d133d09c31 100644
--- a/libs/cua/crates/cua-spaces/src/agents/mod.rs
+++ b/libs/cua/crates/cua-spaces/src/agents/mod.rs
@@ -203,13 +203,10 @@ pub fn capabilities() -> CapabilitiesReport {
protocol: "Agent Client Protocol (agentclientprotocol.com), normalized to event kinds",
statuses: vec!["running", "idle", "failed", "crashed", "unknown"],
event_kinds: events::KINDS,
- harnesses: {
- let saved = keys::global().names();
- harness::HARNESSES
- .iter()
- .map(|h| h.info_with_host_key(host_key_with(h, &saved)))
- .collect()
- },
+ harnesses: harness::HARNESSES
+ .iter()
+ .map(|h| h.info_with_host_key(host_key(h)))
+ .collect(),
forwardable_env: forwardable_env(),
runner: "a detached, tagged cua-spacesd process per run; state in ~/.cua/agents/<run> \
in the Space, so runs survive disconnects and server restarts",
@@ -220,7 +217,17 @@ pub fn capabilities() -> CapabilitiesReport {
/// Spaces (Settings → Connections), or one set in this process's environment
/// (`env_from_host` forwards it).
pub fn host_key(h: &harness::Harness) -> Option<&'static str> {
- host_key_with(h, &keys::global().names())
+ host_key_with(h, &saved_names_for(keys::global(), h))
+}
+
+/// The names of the saved keys a run of `h` can be given: all of them, or only the one
+/// credential the app was told to use (none, when that one is gone).
+fn saved_names_for(saved: &keys::AgentKeys, h: &harness::Harness) -> Vec<String> {
+ match saved.chosen(h.id) {
+ keys::Chosen::NoChoice => saved.names(),
+ keys::Chosen::Gone => vec![],
+ keys::Chosen::Found { env, .. } => vec![env],
+ }
}
/// [`host_key`] given the names of the saved keys.
@@ -324,8 +331,26 @@ pub fn run_env_with(
// Every saved credential the app can use, by the registry's delivery
// rules (a sign-in scoped to another app is never among them).
let names = keys::registry::all_env_names();
- let saved_values = saved.values(&names);
- let delivered = keys::registry::deliver(harness, &|n| saved_values.get(n).cloned());
+ let mut saved_values = saved.values(&names);
+ // An app told which credential to use gets that one alone; if it is gone it gets
+ // none (never another one in its place).
+ let delivered = match saved.chosen(harness) {
+ keys::Chosen::NoChoice => {
+ keys::registry::deliver(harness, &|n| saved_values.get(n).cloned())
+ }
+ keys::Chosen::Gone => BTreeMap::new(),
+ keys::Chosen::Found {
+ provider,
+ env,
+ value,
+ ..
+ } => {
+ saved_values.insert(env, value);
+ keys::registry::deliver_from(harness, Some(&provider), &|n| {
+ saved_values.get(n).cloned()
+ })
+ }
+ };
for (dest, value) in delivered {
if out.get(&dest).is_none_or(|v| v.is_empty()) {
out.insert(dest, value);
@@ -382,14 +407,33 @@ pub fn connection_plan(
return plan;
}
let names = reg::all_env_names();
- let saved_values = saved.values(&names);
+ let mut saved_values = saved.values(&names);
+ // What is connected: the saved connections (or the one credential the app was told
+ // to use, or none when that one is gone), and the providers whose key the caller
+ // passed in the run's env (never a sign-in scoped to another app).
+ let mut connected = match saved.chosen(harness) {
+ keys::Chosen::NoChoice => saved.connections(),
+ keys::Chosen::Gone => vec![],
+ keys::Chosen::Found {
+ provider,
+ env,
+ value,
+ region,
+ fields,
+ } => {
+ saved_values.insert(env, value);
+ vec![reg::Connected {
+ provider,
+ region,
+ fields,
+ }]
+ }
+ };
+ let saved_values = saved_values;
let has = |n: &str| {
env.get(n).is_some_and(|v| !v.is_empty())
|| saved_values.get(n).is_some_and(|v| !v.is_empty())
};
- // What is connected: the saved connections, and the providers whose key the
- // caller passed in the run's env (never a sign-in scoped to another app).
- let mut connected = saved.connections();
for name in env.keys() {
if let Some(def) = reg::provider_of_env(name)
&& def.scope_of(name).is_none()
@@ -1048,4 +1092,158 @@ mod tests {
assert!(k.set("xai-oauth", None, "x-key-0000-aaaa").is_err());
let _ = std::fs::remove_dir_all(&dir);
}
+
+ const SWITCHABLE: [&str; 5] = ["hermes", "opencode", "goose", "pi", "openclaw"];
+
+ /// An app told which credential to use gets that one alone, in each place a run reads it.
+ #[test]
+ fn an_app_told_which_key_to_use_gets_that_key_and_nothing_else() {
+ for app in SWITCHABLE {
+ let (k, dir) = saved(&[
+ ("anthropic", None, "sk-ant-api03-first-aaaa"),
+ ("openai", None, "sk-openai-first-bbbb"),
+ ]);
+ let no_env = BTreeMap::new();
+ // Nothing chosen: every key the app reads, as before.
+ let (env, _) = run_env_with(&k, app, &no_env, &[], false).unwrap();
+ assert_eq!(env["ANTHROPIC_API_KEY"], "sk-ant-api03-first-aaaa", "{app}");
+ assert_eq!(env["OPENAI_API_KEY"], "sk-openai-first-bbbb", "{app}");
+ // Another Anthropic key beside the first, and the app told to use it.
+ let f = BTreeMap::new();
+ let info = k
+ .set_slot(
+ "anthropic",
+ None,
+ "sk-ant-api03-work-cccc",
+ None,
+ &f,
+ Some("Work key"),
+ true,
+ )
+ .unwrap();
+ let slot = info.slot.clone().unwrap();
+ // Saving another key never replaces the first, and the first is what rows and runs see.
+ let (env, _) = run_env_with(&k, app, &no_env, &[], false).unwrap();
+ assert_eq!(env["ANTHROPIC_API_KEY"], "sk-ant-api03-first-aaaa", "{app}");
+ k.set_use(app, Some(("ANTHROPIC_API_KEY", Some(&slot))))
+ .unwrap();
+ let (env, _) = run_env_with(&k, app, &no_env, &[], false).unwrap();
+ assert_eq!(env["ANTHROPIC_API_KEY"], "sk-ant-api03-work-cccc", "{app}");
+ assert!(
+ !env.contains_key("OPENAI_API_KEY"),
+ "{app}: only the chosen provider"
+ );
+ // The whole run options carry it too (the plan Hermes starts from names the choice).
+ let plan = connection_plan(&k, app, &env, false);
+ if app == "hermes" {
+ let y = plan.hermes_config.unwrap();
+ assert!(y.contains("anthropic") && !y.contains("openai"), "{y}");
+ }
+ // Pointed at OpenAI instead: that key alone.
+ k.set_use(app, Some(("OPENAI_API_KEY", None))).unwrap();
+ let (env, _) = run_env_with(&k, app, &no_env, &[], false).unwrap();
+ assert_eq!(env["OPENAI_API_KEY"], "sk-openai-first-bbbb", "{app}");
+ assert!(!env.contains_key("ANTHROPIC_API_KEY"), "{app}");
+ // Choosing again with nothing goes back to every key.
+ k.set_use(app, None).unwrap();
+ let (env, _) = run_env_with(&k, app, &no_env, &[], false).unwrap();
+ assert!(env.contains_key("ANTHROPIC_API_KEY") && env.contains_key("OPENAI_API_KEY"));
+ let _ = std::fs::remove_dir_all(&dir);
+ }
+ }
+
+ /// The key an app was told to use is removed: the app gets no credential from the keys
+ /// and is not ready, and the other keys are not used in its place.
+ #[test]
+ fn a_removed_key_gives_the_app_nothing_rather_than_another_key() {
+ for app in SWITCHABLE {
+ let (k, dir) = saved(&[
+ ("anthropic", None, "sk-ant-api03-first-aaaa"),
+ ("openai", None, "sk-openai-first-bbbb"),
+ ]);
+ let f = BTreeMap::new();
+ let slot = k
+ .set_slot(
+ "anthropic",
+ None,
+ "sk-ant-api03-work-cccc",
+ None,
+ &f,
+ None,
+ true,
+ )
+ .unwrap()
+ .slot
+ .unwrap();
+ k.set_use(app, Some(("ANTHROPIC_API_KEY", Some(&slot))))
+ .unwrap();
+ assert!(k.remove_slot("ANTHROPIC_API_KEY", &slot).unwrap());
+ assert_eq!(k.chosen(app), keys::Chosen::Gone);
+ let (env, _) = run_env_with(&k, app, &BTreeMap::new(), &[], false).unwrap();
+ assert!(env.is_empty(), "{app}: {env:?}");
+ let plan = connection_plan(&k, app, &env, false);
+ assert!(
+ plan.hermes_config.is_none() && plan.endpoint.is_none(),
+ "{app}"
+ );
+ assert!(saved_names_for(&k, harness::harness(app).unwrap()).is_empty());
+ // The first key removed while another stays: the app does not move onto the one
+ // that takes its place.
+ let first_slot = k
+ .set_slot("openai", None, "sk-openai-work-dddd", None, &f, None, true)
+ .unwrap()
+ .slot
+ .unwrap();
+ k.set_use(app, Some(("OPENAI_API_KEY", None))).unwrap();
+ assert!(k.remove_first("OPENAI_API_KEY").unwrap());
+ assert_eq!(k.chosen(app), keys::Chosen::Gone, "{app}");
+ let (env, _) = run_env_with(&k, app, &BTreeMap::new(), &[], false).unwrap();
+ assert!(env.is_empty(), "{app}");
+ // The one that took its place is still saved, under the first slot, and can be chosen.
+ let _ = first_slot;
+ k.set_use(app, Some(("OPENAI_API_KEY", None))).unwrap();
+ let (env, _) = run_env_with(&k, app, &BTreeMap::new(), &[], false).unwrap();
+ assert_eq!(env["OPENAI_API_KEY"], "sk-openai-work-dddd", "{app}");
+ let _ = std::fs::remove_dir_all(&dir);
+ }
+ }
+
+ /// Fixed sign-in apps have nothing to choose, and the Claude token reaches no switchable app
+ /// whatever was chosen.
+ #[test]
+ fn only_apps_that_take_any_provider_can_be_told_which_key() {
+ let (k, dir) = saved(&[("anthropic", None, "sk-ant-api03-first-aaaa")]);
+ for app in [
+ "claude-code",
+ "openai-codex",
+ "codex",
+ "gemini-cli",
+ "google-antigravity",
+ ] {
+ assert!(
+ k.set_use(app, Some(("ANTHROPIC_API_KEY", None))).is_err(),
+ "{app}"
+ );
+ }
+ // An app can't be pointed at a credential it can't read (the Claude token, a key that isn't saved).
+ let token = format!("sk-ant-oat01-{}", "x".repeat(40));
+ let _ = k.set("anthropic", None, &token);
+ for app in SWITCHABLE {
+ assert!(
+ k.set_use(app, Some(("CLAUDE_CODE_OAUTH_TOKEN", None)))
+ .is_err(),
+ "{app}"
+ );
+ assert!(
+ k.set_use(app, Some(("OPENAI_API_KEY", None))).is_err(),
+ "{app}"
+ );
+ assert!(
+ k.set_use(app, Some(("ANTHROPIC_API_KEY", Some("nope"))))
+ .is_err(),
+ "{app}"
+ );
+ }
+ let _ = std::fs::remove_dir_all(&dir);
+ }
}