Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions .agents/docs/agent-adapters.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,19 @@ Model/effort lists below are the **statically declared defaults**. Several provi

The **Structured Session** column reflects whether the adapter implements `createStructuredSession` (i.e. supports a `"gui"` presentation mode); it is not a model-list default and is authoritative.

| Provider | Models | Efforts | Live Input | Structured Session |
| ------------ | ------------------------------------------------------------------------ | ---------------------------------------- | --------------------- | ---------------------- |
| Claude | opus-4-8, fable-5, opus-4-7, opus-4-6, sonnet, haiku | low, medium, high, xHigh, max, ultracode | terminal | Yes (SDK) |
| Codex | (probed dynamically via app-server) | (probed dynamically) | terminal / GUI server | Yes (stdio app-server) |
| Gemini | (probed dynamically via ACP) | (probed dynamically) | terminal | Yes (ACP) |
| Copilot | (probed via ACP) | (probed via ACP) | terminal | Yes (ACP) |
| Cursor | auto, composer-\*, GPT/Opus/Sonnet variants (probed via `--list-models`) | (embedded in model name) | terminal | Yes (ACP) |
| Grok | grok-build (probed via ACP) | (none) | terminal | Yes (ACP) |
| OpenCode | (probed dynamically via SDK) | (probed dynamically) | terminal / GUI server | Yes (SDK server) |
| Pi | (authenticated models probed via SDK) | off…max, per model | terminal | Yes (native SDK) |
| Antigravity | auto (managed by `agy`) | (none) | terminal | No |
| Command Code | Kimi/Claude/GPT/Gemini/GLM/… (static, `--list-models`) | (none) | terminal | No |
| Provider | Models | Efforts | Live Input | Structured Session |
| ------------ | ------------------------------------------------------------------------ | ---------------------------------------- | --------------------- | ---------------------------------- |
| Claude | opus-4-8, fable-5, opus-4-7, opus-4-6, sonnet, haiku | low, medium, high, xHigh, max, ultracode | terminal | Yes (SDK) |
| Codex | (probed dynamically via app-server) | (probed dynamically) | terminal / GUI server | Yes (stdio app-server) |
| Gemini | (probed dynamically via ACP) | (probed dynamically) | terminal | Yes (ACP) |
| Copilot | (probed via ACP) | (probed via ACP) | terminal | Yes (ACP) |
| Cursor | auto, composer-\*, GPT/Opus/Sonnet variants (probed via `--list-models`) | (embedded in model name) | terminal | Yes (ACP) |
| Grok | grok-build (probed via ACP) | (none) | terminal | Yes (ACP) |
| OpenCode | (probed dynamically via SDK) | (probed dynamically) | terminal / GUI server | Yes (SDK server) |
| Pi | (authenticated models probed via SDK) | off…max, per model | terminal | Yes (native SDK) |
| Antigravity | auto (managed by `agy`) | (none) | terminal | No |
| Command Code | Kimi/Claude/GPT/Gemini/GLM/… (static, `--list-models`) | (none) | terminal | No |
| Muse Code | muse-spark-1.2 / 1.1 / 1.2-contributor | none…ultra | terminal | No (no ACP mode yet; GUI deferred) |

## Adding a New Provider — Full Checklist

Expand Down
12 changes: 12 additions & 0 deletions src/renderer/components/providers/muse/MuseIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { createProviderIcon } from "../common/createProviderIcon";

// Meta infinity mark (simple-icons) — a single currentColor path for
// status-tone tinting, matching the brand-glyph convention of other providers.
const MUSE_PATH =
"M6.915 4.03c-1.968 0-3.683 1.28-4.871 3.113C.704 9.208 0 11.883 0 14.449c0 .706.07 1.369.21 1.973a6.624 6.624 0 0 0 .265.86 5.297 5.297 0 0 0 .371.761c.696 1.159 1.818 1.927 3.593 1.927 1.497 0 2.633-.671 3.965-2.444.76-1.012 1.144-1.626 2.663-4.32l.756-1.339.186-.325c.061.1.121.196.183.3l2.152 3.595c.724 1.21 1.665 2.556 2.47 3.314 1.046.987 1.992 1.22 3.06 1.22 1.075 0 1.876-.355 2.455-.843a3.743 3.743 0 0 0 .81-.973c.542-.939.861-2.127.861-3.745 0-2.72-.681-5.357-2.084-7.45-1.282-1.912-2.957-2.93-4.716-2.93-1.047 0-2.088.467-3.053 1.308-.652.57-1.257 1.29-1.82 2.05-.69-.875-1.335-1.547-1.958-2.056-1.182-.966-2.315-1.303-3.454-1.303zm10.16 2.053c1.147 0 2.188.758 2.992 1.999 1.132 1.748 1.647 4.195 1.647 6.4 0 1.548-.368 2.9-1.839 2.9-.58 0-1.027-.23-1.664-1.004-.496-.601-1.343-1.878-2.832-4.358l-.617-1.028a44.908 44.908 0 0 0-1.255-1.98c.07-.109.141-.224.211-.327 1.12-1.667 2.118-2.602 3.358-2.602zm-10.201.553c1.265 0 2.058.791 2.675 1.446.307.327.737.871 1.234 1.579l-1.02 1.566c-.757 1.163-1.882 3.017-2.837 4.338-1.191 1.649-1.81 1.817-2.486 1.817-.524 0-1.038-.237-1.383-.794-.263-.426-.464-1.13-.464-2.046 0-2.221.63-4.535 1.66-6.088.454-.687.964-1.226 1.499-1.56a2.773 2.773 0 0 1 1.122-.258z";

export const MuseIcon = createProviderIcon({
cssPrefix: "poracode-muse-icon",
path: MUSE_PATH,
viewBox: "0 0 24 24",
});
67 changes: 67 additions & 0 deletions src/renderer/components/providers/muse/index.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// @vitest-environment node

import { describe, expect, it, vi } from "vitest";
import type { ComposerControl } from "@/renderer/components/thread/ThreadComposer";
import type { AgentCapability, ThreadConfig } from "@/shared/contracts";
import { getComposerControls } from "../providerComposer";
import "./index";

const capabilities: AgentCapability = {
models: [
{ id: "muse-spark-1.2", label: "Muse Spark 1.2" },
{ id: "muse-spark-1.1", label: "Muse Spark 1.1" },
],
efforts: ["none", "minimal", "low", "medium", "high", "xhigh", "ultra"],
defaultEffort: "high",
modelEfforts: {},
modes: ["agent"],
approvalPolicies: [
{ id: "untrusted", label: "Untrusted" },
{ id: "on-request", label: "On Request" },
{ id: "never", label: "Never Ask" },
{ id: "yolo", label: "Bypass Approvals" },
],
sandboxModes: [],
supportsResume: true,
supportsDirectInput: true,
liveInputMode: "terminal",
presentationMode: "terminal",
presentationModes: ["terminal"],
settingDefs: [],
};

function isMenuControl(
control: ComposerControl,
): control is Extract<ComposerControl, { kind?: "menu" }> {
return control.kind === undefined || control.kind === "menu";
}

function isPermissionMenuControl(
control: ComposerControl,
): control is Extract<ComposerControl, { kind?: "menu" }> {
return isMenuControl(control) && control.iconKind === "permission";
}

describe("Muse composer controls", () => {
it("exposes Muse approval policies on terminal without a plan/work toggle", () => {
const onConfigChange = vi.fn<(patch: Partial<ThreadConfig>) => void>();
const controls = getComposerControls("muse")?.({
capabilities,
config: { model: "muse-spark-1.2", mode: "agent", approvalPolicy: "on-request" },
isDisabled: false,
onConfigChange,
presentationMode: "terminal",
});

expect(controls?.some((c) => "iconKind" in c && c.iconKind === "mode")).toBe(false);

const permission = controls?.find(isPermissionMenuControl);
expect(permission).toMatchObject({
value: "on-request",
options: capabilities.approvalPolicies,
});

permission?.onChange?.("yolo");
expect(onConfigChange).toHaveBeenCalledWith({ approvalPolicy: "yolo" });
});
});
34 changes: 34 additions & 0 deletions src/renderer/components/providers/muse/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
export * from "./MuseIcon";

import { MuseIcon } from "./MuseIcon";
import providerManifest from "./manifest";
import { standardPlanApprovalControls } from "../composerControlBuilders";
import { registerProviderIcon } from "../ProviderIcon";
import { registerComposerControls } from "../providerComposer";
import { registerCommitGenDefaults } from "../commitGen";
import { registerConflictResolverDefaults } from "../conflictResolver";
import { registerTitleGenDefaults } from "../titleGen";

const PROVIDER_KIND = providerManifest.kind;

registerProviderIcon(PROVIDER_KIND, MuseIcon);

// Utility defaults for one-shot title/commit generation and full conflict-
// resolution threads. Muse's one-shot path passes the prompt positionally to
// `muse exec` because that command does not consume prompts from stdin.
const MUSE_UTILITY_DEFAULTS = {
label: "Muse Code",
hint: "Muse Spark 1.2",
model: "muse-spark-1.2",
effort: "high",
};

registerCommitGenDefaults(PROVIDER_KIND, MUSE_UTILITY_DEFAULTS);
registerTitleGenDefaults(PROVIDER_KIND, MUSE_UTILITY_DEFAULTS);
registerConflictResolverDefaults(PROVIDER_KIND, MUSE_UTILITY_DEFAULTS);

// Terminal-only provider (no ACP; GUI deferred until Muse ships one) — the
// TUI can prompt for approvals, so it gets the full policy selector. Effort
// selector is driven by capabilities.efforts in the shared model picker — no
// provider-specific registration needed. No plan mode (modes: ["agent"] only).
registerComposerControls(PROVIDER_KIND, (input) => standardPlanApprovalControls(input));
9 changes: 9 additions & 0 deletions src/renderer/components/providers/muse/manifest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { msg } from "@lingui/core/macro";
import type { RendererProviderManifest } from "../providerManifest";

export default {
kind: "muse",
label: msg`Muse Code`,
// Between kimi (45) and antigravity (50).
order: 47,
} satisfies RendererProviderManifest;
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const EXPECTED_PROVIDER_ORDER = [
"qoder",
"grok",
"kimi",
"muse",
"antigravity",
"commandcode",
"opencode",
Expand Down
8 changes: 8 additions & 0 deletions src/renderer/locales/de/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -4739,6 +4739,10 @@ msgstr "Erstklassige Grok Build CLI-Integration mit der nativen Laufzeit von Por
msgid "First-class Kimi Code CLI integration using Poracode's native runtime."
msgstr "Erstklassige Kimi Code CLI-Integration mit der nativen Laufzeit von Poracode."

#: src/renderer/views/SettingsOverlay/parts/agentRegistryNative.ts
msgid "First-class Muse Code CLI integration using Poracode's native terminal runtime."
msgstr "Erstklassige Muse Code CLI-Integration mit Poracodes nativer Terminal-Laufzeit."

#: src/renderer/views/SettingsOverlay/parts/agentRegistryNative.ts
msgid "First-class OpenCode integration using Poracode's native SDK runtime."
msgstr "Erstklassige OpenCode-Integration mithilfe der nativen SDK-Laufzeitumgebung von Poracode."
Expand Down Expand Up @@ -6654,6 +6658,10 @@ msgstr "Ihre Änderungen wurden in einen neuen Arbeitsbaum unter „{newBranch}
msgid "Moving changes…"
msgstr "Änderungen werden verschoben…"

#: src/renderer/components/providers/muse/manifest.ts
msgid "Muse Code"
msgstr "Muse Code"

#: src/renderer/components/mcp/McpServerEditor.tsx
msgid "my-mcp-server"
msgstr "my-mcp-server"
Expand Down
8 changes: 8 additions & 0 deletions src/renderer/locales/en/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -4744,6 +4744,10 @@ msgstr "First-class Grok Build CLI integration using Poracode's native runtime."
msgid "First-class Kimi Code CLI integration using Poracode's native runtime."
msgstr "First-class Kimi Code CLI integration using Poracode's native runtime."

#: src/renderer/views/SettingsOverlay/parts/agentRegistryNative.ts
msgid "First-class Muse Code CLI integration using Poracode's native terminal runtime."
msgstr "First-class Muse Code CLI integration using Poracode's native terminal runtime."

#: src/renderer/views/SettingsOverlay/parts/agentRegistryNative.ts
msgid "First-class OpenCode integration using Poracode's native SDK runtime."
msgstr "First-class OpenCode integration using Poracode's native SDK runtime."
Expand Down Expand Up @@ -6659,6 +6663,10 @@ msgstr "Moved your changes into a new worktree on \"{newBranch}\". \"{currentBra
msgid "Moving changes…"
msgstr "Moving changes…"

#: src/renderer/components/providers/muse/manifest.ts
msgid "Muse Code"
msgstr "Muse Code"

#: src/renderer/components/mcp/McpServerEditor.tsx
msgid "my-mcp-server"
msgstr "my-mcp-server"
Expand Down
8 changes: 8 additions & 0 deletions src/renderer/locales/es/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -4739,6 +4739,10 @@ msgstr "Integración de primera clase de Grok Build CLI usando el runtime nativo
msgid "First-class Kimi Code CLI integration using Poracode's native runtime."
msgstr "Integración de primera clase de Kimi Code CLI usando el runtime nativo de Poracode."

#: src/renderer/views/SettingsOverlay/parts/agentRegistryNative.ts
msgid "First-class Muse Code CLI integration using Poracode's native terminal runtime."
msgstr "Integración de primera clase de Muse Code CLI usando el runtime de terminal nativo de Poracode."

#: src/renderer/views/SettingsOverlay/parts/agentRegistryNative.ts
msgid "First-class OpenCode integration using Poracode's native SDK runtime."
msgstr "Integración de primera clase de OpenCode usando el runtime nativo del SDK de Poracode."
Expand Down Expand Up @@ -6654,6 +6658,10 @@ msgstr "Movió tus cambios a un nuevo worktree en \"{newBranch}\". \"{currentBra
msgid "Moving changes…"
msgstr "Moviendo cambios…"

#: src/renderer/components/providers/muse/manifest.ts
msgid "Muse Code"
msgstr "Muse Code"

#: src/renderer/components/mcp/McpServerEditor.tsx
msgid "my-mcp-server"
msgstr "my-mcp-server"
Expand Down
8 changes: 8 additions & 0 deletions src/renderer/locales/fr/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -4739,6 +4739,10 @@ msgstr "Intégration CLI Grok Build de première classe à l'aide du runtime nat
msgid "First-class Kimi Code CLI integration using Poracode's native runtime."
msgstr "Intégration CLI Kimi Code de première classe à l'aide du runtime natif de Poracode."

#: src/renderer/views/SettingsOverlay/parts/agentRegistryNative.ts
msgid "First-class Muse Code CLI integration using Poracode's native terminal runtime."
msgstr "Intégration CLI Muse Code de première classe à l'aide du runtime de terminal natif de Poracode."

#: src/renderer/views/SettingsOverlay/parts/agentRegistryNative.ts
msgid "First-class OpenCode integration using Poracode's native SDK runtime."
msgstr "Intégration OpenCode de première classe à l'aide du runtime SDK natif de Poracode."
Expand Down Expand Up @@ -6653,6 +6657,10 @@ msgstr "Vos modifications ont été déplacées vers un nouveau worktree sur \"{
msgid "Moving changes…"
msgstr "Déplacement des modifications…"

#: src/renderer/components/providers/muse/manifest.ts
msgid "Muse Code"
msgstr "Muse Code"

#: src/renderer/components/mcp/McpServerEditor.tsx
msgid "my-mcp-server"
msgstr "my-mcp-server"
Expand Down
8 changes: 8 additions & 0 deletions src/renderer/locales/ja/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -4738,6 +4738,10 @@ msgstr "Poracode のネイティブ ランタイムを使用したファース
msgid "First-class Kimi Code CLI integration using Poracode's native runtime."
msgstr "Poracode のネイティブ ランタイムを使用したファーストクラスの Kimi Code CLI 統合。"

#: src/renderer/views/SettingsOverlay/parts/agentRegistryNative.ts
msgid "First-class Muse Code CLI integration using Poracode's native terminal runtime."
msgstr "Poracode のネイティブなターミナル ランタイムを使用したファーストクラスの Muse Code CLI 統合。"

#: src/renderer/views/SettingsOverlay/parts/agentRegistryNative.ts
msgid "First-class OpenCode integration using Poracode's native SDK runtime."
msgstr "Poracode のネイティブ SDK ランタイムを使用したファーストクラスの OpenCode 統合。"
Expand Down Expand Up @@ -6652,6 +6656,10 @@ msgstr "変更内容を「{newBranch}」の新しいワークツリーに移動
msgid "Moving changes…"
msgstr "変更を移動中…"

#: src/renderer/components/providers/muse/manifest.ts
msgid "Muse Code"
msgstr "Muse Code"

#: src/renderer/components/mcp/McpServerEditor.tsx
msgid "my-mcp-server"
msgstr "my-mcp-server"
Expand Down
8 changes: 8 additions & 0 deletions src/renderer/locales/ko/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -4739,6 +4739,10 @@ msgstr "Poracode의 기본 런타임을 사용하는 최고 수준의 Grok Build
msgid "First-class Kimi Code CLI integration using Poracode's native runtime."
msgstr "Poracode의 기본 런타임을 사용하는 최고 수준의 Kimi Code CLI 통합."

#: src/renderer/views/SettingsOverlay/parts/agentRegistryNative.ts
msgid "First-class Muse Code CLI integration using Poracode's native terminal runtime."
msgstr "Poracode의 기본 터미널 런타임을 사용하는 최고 수준의 Muse Code CLI 통합."

#: src/renderer/views/SettingsOverlay/parts/agentRegistryNative.ts
msgid "First-class OpenCode integration using Poracode's native SDK runtime."
msgstr "Poracode의 기본 SDK 런타임을 사용한 최고 수준의 OpenCode 통합."
Expand Down Expand Up @@ -6654,6 +6658,10 @@ msgstr "변경 사항을 \"{newBranch}\"의 새 작업 트리로 옮겼습니다
msgid "Moving changes…"
msgstr "변경사항 이동 중…"

#: src/renderer/components/providers/muse/manifest.ts
msgid "Muse Code"
msgstr "Muse Code"

#: src/renderer/components/mcp/McpServerEditor.tsx
msgid "my-mcp-server"
msgstr "my-mcp-server"
Expand Down
8 changes: 8 additions & 0 deletions src/renderer/locales/pl/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -4739,6 +4739,10 @@ msgstr "Pierwszorzędna integracja Grok Build CLI przy użyciu natywnego środow
msgid "First-class Kimi Code CLI integration using Poracode's native runtime."
msgstr "Pierwszorzędna integracja Kimi Code CLI przy użyciu natywnego środowiska wykonawczego Poracode."

#: src/renderer/views/SettingsOverlay/parts/agentRegistryNative.ts
msgid "First-class Muse Code CLI integration using Poracode's native terminal runtime."
msgstr "Pierwszorzędna integracja Muse Code CLI przy użyciu natywnego środowiska wykonawczego terminala Poracode."

#: src/renderer/views/SettingsOverlay/parts/agentRegistryNative.ts
msgid "First-class OpenCode integration using Poracode's native SDK runtime."
msgstr "Pierwszorzędna integracja OpenCode z wykorzystaniem natywnego środowiska wykonawczego SDK Poracode."
Expand Down Expand Up @@ -6654,6 +6658,10 @@ msgstr "Przeniesiono zmiany do nowego drzewa roboczego na „{newBranch}”. „
msgid "Moving changes…"
msgstr "Przenoszenie zmian…"

#: src/renderer/components/providers/muse/manifest.ts
msgid "Muse Code"
msgstr "Muse Code"

#: src/renderer/components/mcp/McpServerEditor.tsx
msgid "my-mcp-server"
msgstr "my-mcp-server"
Expand Down
8 changes: 8 additions & 0 deletions src/renderer/locales/pt-BR/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -4739,6 +4739,10 @@ msgstr "Integração Grok Build CLI de primeira classe usando o tempo de execuç
msgid "First-class Kimi Code CLI integration using Poracode's native runtime."
msgstr "Integração Kimi Code CLI de primeira classe usando o tempo de execução nativo do Poracode."

#: src/renderer/views/SettingsOverlay/parts/agentRegistryNative.ts
msgid "First-class Muse Code CLI integration using Poracode's native terminal runtime."
msgstr "Integração Muse Code CLI de primeira classe usando o tempo de execução de terminal nativo do Poracode."

#: src/renderer/views/SettingsOverlay/parts/agentRegistryNative.ts
msgid "First-class OpenCode integration using Poracode's native SDK runtime."
msgstr "Integração OpenCode de primeira classe usando o tempo de execução SDK nativo do Poracode."
Expand Down Expand Up @@ -6654,6 +6658,10 @@ msgstr "Movemos suas alterações para uma nova árvore de trabalho em \"{newBra
msgid "Moving changes…"
msgstr "Movendo mudanças…"

#: src/renderer/components/providers/muse/manifest.ts
msgid "Muse Code"
msgstr "Muse Code"

#: src/renderer/components/mcp/McpServerEditor.tsx
msgid "my-mcp-server"
msgstr "my-mcp-server"
Expand Down
Loading