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
7 changes: 5 additions & 2 deletions .agents/docs/agent-adapters.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Every provider is a folder under `src/supervisor/agents/<kind>/` with the same i

Opening two provider folders side-by-side answers "what does this provider do differently" by file-name alignment alone.

Model/effort lists below are the **statically declared defaults**. Several providers ship `models: []` / `efforts: []` and fill them at runtime from a capabilities probe (Codex/Gemini/Copilot/Grok/OpenCode, and Cursor via its CLI `--list-models`) — the listed values are illustrative, not authoritative. Read the provider's `detection.ts` for the live source of truth.
Model/effort lists below are the **statically declared defaults**. Several providers ship `models: []` / `efforts: []` and fill them at runtime from a capabilities probe (Codex/Gemini/Copilot/Grok/OpenCode/Pi, and Cursor via its CLI `--list-models`) — the listed values are illustrative, not authoritative. Read the provider's `detection.ts` for the live source of truth.

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.

Expand All @@ -62,6 +62,7 @@ The **Structured Session** column reflects whether the adapter implements `creat
| 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 |

Expand Down Expand Up @@ -147,7 +148,9 @@ most often forgotten.
### 5. Tests & verification

- [ ] `tests/integration/providers-lifecycle.integration.test.ts` — add a
`PREFERRED_MODEL` entry (auto-skips when the CLI is not installed).
`PREFERRED_MODEL` entry, or explicitly use its detected-model fallback when
the provider has no universally available model (auto-skips when the CLI is
not installed).
- [ ] Run green: `pnpm run typecheck`, `pnpm run lint`, targeted `pnpm exec vitest run`,
and `pnpm exec oxfmt --check <changed paths>`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1344,6 +1344,7 @@ async function runMockGate(client, gate, fixture) {
cursor: "slash",
grok: "slash",
antigravity: "prompt",
pi: "skill",
};
for (const [agentKind, invocation] of Object.entries(expected)) {
const result = await bridgeInvoke(client, "scanSkills", {
Expand Down
1 change: 1 addition & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ packages:
enableGlobalVirtualStore: true

allowBuilds:
"@google/genai": false
"@sentry/cli": true
better-sqlite3: true
electron: true
Expand Down
1 change: 1 addition & 0 deletions scripts/build-desktop-artifact.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const { supportEmail } = requireFromHere("../branding/contact.json");
const RUNTIME_DEPS = [
"@agentclientprotocol/sdk",
"@anthropic-ai/claude-agent-sdk",
"@earendil-works/pi-coding-agent",
"@modelcontextprotocol/sdk",
"@opencode-ai/sdk",
"@sentry/electron",
Expand Down
14 changes: 14 additions & 0 deletions src/renderer/components/providers/pi/PiIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { createProviderIcon } from "../common/createProviderIcon";

// Official compact Pi badge mark from https://pi.dev/press-kit.
const PI_MAIN_PATH =
"M165.29 165.29H517.36V400H400V517.36H282.65V634.72H165.29ZM282.65 282.65V400H400V282.65Z";
const PI_DOT_PATH = "M517.36 400H634.72V634.72H517.36Z";

export const PiIcon = createProviderIcon({
cssPrefix: "poracode-pi-icon",
path: PI_MAIN_PATH,
secondaryPath: PI_DOT_PATH,
fillRule: "evenodd",
viewBox: "0 0 800 800",
});
22 changes: 22 additions & 0 deletions src/renderer/components/providers/pi/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
export * from "./PiIcon";

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

// Pi intentionally has no core plan mode or permission policy. Model and
// thinking controls come from the dynamically detected capabilities; optional
// extension commands are published by the live SDK session.
registerProviderIcon(providerManifest.kind, PiIcon);
// Pi has no universal model: its catalog is the authenticated providers in the
// user's ModelRegistry. Empty defaults intentionally select the first detected
// model at runtime instead of advertising a model that may not be configured.
const utilityDefaults = { label: "Pi", model: "", effort: "" };
registerCommitGenDefaults(providerManifest.kind, utilityDefaults);
registerTitleGenDefaults(providerManifest.kind, utilityDefaults);
registerConflictResolverDefaults(providerManifest.kind, utilityDefaults);
registerComposerControls(providerManifest.kind, () => []);
8 changes: 8 additions & 0 deletions src/renderer/components/providers/pi/manifest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { msg } from "@lingui/core/macro";
import type { RendererProviderManifest } from "../providerManifest";

export default {
kind: "pi",
label: msg`Pi`,
order: 75,
} satisfies RendererProviderManifest;
2 changes: 2 additions & 0 deletions src/renderer/components/providers/providerManifest.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const EXPECTED_PROVIDER_ORDER = [
"antigravity",
"commandcode",
"opencode",
"pi",
"cursor",
"copilot",
"factory",
Expand All @@ -47,6 +48,7 @@ describe("renderer provider manifests", () => {
expect(getProviderManifest("zai")).toBeUndefined();
expect(i18n._(getProviderManifest("copilot")!.label)).toBe("GitHub Copilot");
expect(i18n._(getProviderManifest("factory")!.label)).toBe("Factory Droid");
expect(i18n._(getProviderManifest("pi")!.label)).toBe("Pi");
});

it("inherits base-provider ranks for scoped kinds and leaves unknown providers at the tail", () => {
Expand Down
9 changes: 6 additions & 3 deletions src/renderer/components/skills/useSkills.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const invocationByProvider = {
cursor: "slash",
grok: "slash",
antigravity: "prompt",
pi: "skill",
} as const;

function emptyScan(): SkillScanResult {
Expand Down Expand Up @@ -101,9 +102,11 @@ describe("buildSkillSlashCommands", () => {
skillInvocation:
invocation === "dollar"
? "$unique-managed-skill"
: invocation === "prompt"
? "Use the unique-managed-skill skill."
: "/unique-managed-skill",
: invocation === "skill"
? "/skill:unique-managed-skill"
: invocation === "prompt"
? "Use the unique-managed-skill skill."
: "/unique-managed-skill",
}),
]);
expect(provider).toBeTruthy();
Expand Down
8 changes: 5 additions & 3 deletions src/renderer/components/skills/useSkills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,11 @@ export function buildSkillSlashCommands(scan: SkillScanResult | null): AgentSlas
const invocation =
scan.invocation === "dollar"
? `$${skill.name}`
: scan.invocation === "prompt"
? `Use the ${skill.name} skill.`
: `/${skill.name}`;
: scan.invocation === "skill"
? `/skill:${skill.name}`
: scan.invocation === "prompt"
? `Use the ${skill.name} skill.`
: `/${skill.name}`;
return [
{
id: skill.name,
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 @@ -4172,6 +4172,10 @@ msgstr "Erstklassige Kimi Code CLI-Integration mit der nativen Laufzeit von Pora
msgid "First-class OpenCode integration using Poracode's native SDK runtime."
msgstr "Erstklassige OpenCode-Integration mithilfe der nativen SDK-Laufzeitumgebung von Poracode."

#: src/renderer/views/SettingsOverlay/parts/agentRegistryNative.ts
msgid "First-class Pi integration using a real terminal and Pi's native SDK runtime."
msgstr "Erstklassige Pi-Integration mit einem echten Terminal und Pis nativer SDK-Laufzeit."

#: src/renderer/views/SettingsOverlay/parts/agentRegistryNative.ts
msgid "First-class Qwen Code integration using Poracode's native terminal and ACP runtimes."
msgstr "Erstklassige Qwen Code-Integration mit Poracodes nativen Terminal- und ACP-Laufzeiten."
Expand Down Expand Up @@ -7050,6 +7054,10 @@ msgstr "Ausstehende Lenkung"
msgid "permission"
msgstr "Berechtigung"

#: src/renderer/components/providers/pi/manifest.ts
msgid "Pi"
msgstr "Pi"

#: src/mobile/routeComponents.tsx
#: src/mobile/views/ThreadView.tsx
msgid "Pick a thread from the list to follow the agent from here."
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 @@ -4172,6 +4172,10 @@ msgstr "First-class Kimi Code CLI integration using Poracode's native runtime."
msgid "First-class OpenCode integration using Poracode's native SDK runtime."
msgstr "First-class OpenCode integration using Poracode's native SDK runtime."

#: src/renderer/views/SettingsOverlay/parts/agentRegistryNative.ts
msgid "First-class Pi integration using a real terminal and Pi's native SDK runtime."
msgstr "First-class Pi integration using a real terminal and Pi's native SDK runtime."

#: src/renderer/views/SettingsOverlay/parts/agentRegistryNative.ts
msgid "First-class Qwen Code integration using Poracode's native terminal and ACP runtimes."
msgstr "First-class Qwen Code integration using Poracode's native terminal and ACP runtimes."
Expand Down Expand Up @@ -7050,6 +7054,10 @@ msgstr "Pending steer"
msgid "permission"
msgstr "permission"

#: src/renderer/components/providers/pi/manifest.ts
msgid "Pi"
msgstr "Pi"

#: src/mobile/routeComponents.tsx
#: src/mobile/views/ThreadView.tsx
msgid "Pick a thread from the list to follow the agent from here."
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 @@ -4172,6 +4172,10 @@ msgstr "Integración de primera clase de Kimi Code CLI usando el runtime nativo
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."

#: src/renderer/views/SettingsOverlay/parts/agentRegistryNative.ts
msgid "First-class Pi integration using a real terminal and Pi's native SDK runtime."
msgstr "Integración Pi de primera clase con un terminal real y el entorno de ejecución SDK nativo de Pi."

#: src/renderer/views/SettingsOverlay/parts/agentRegistryNative.ts
msgid "First-class Qwen Code integration using Poracode's native terminal and ACP runtimes."
msgstr "Integración de primera clase con Qwen Code mediante los entornos de ejecución nativos de terminal y ACP de Poracode."
Expand Down Expand Up @@ -7050,6 +7054,10 @@ msgstr "Dirección pendiente"
msgid "permission"
msgstr "permiso"

#: src/renderer/components/providers/pi/manifest.ts
msgid "Pi"
msgstr "Pi"

#: src/mobile/routeComponents.tsx
#: src/mobile/views/ThreadView.tsx
msgid "Pick a thread from the list to follow the agent from here."
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 @@ -4172,6 +4172,10 @@ msgstr "Intégration CLI Kimi Code de première classe à l'aide du runtime nati
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."

#: src/renderer/views/SettingsOverlay/parts/agentRegistryNative.ts
msgid "First-class Pi integration using a real terminal and Pi's native SDK runtime."
msgstr "Intégration Pi de premier ordre avec un véritable terminal et l’environnement d’exécution SDK natif de Pi."

#: src/renderer/views/SettingsOverlay/parts/agentRegistryNative.ts
msgid "First-class Qwen Code integration using Poracode's native terminal and ACP runtimes."
msgstr "Intégration de premier ordre de Qwen Code utilisant les environnements d’exécution natifs de terminal et ACP de Poracode."
Expand Down Expand Up @@ -7049,6 +7053,10 @@ msgstr "En attente de direction"
msgid "permission"
msgstr "autorisation"

#: src/renderer/components/providers/pi/manifest.ts
msgid "Pi"
msgstr "Pi"

#: src/mobile/routeComponents.tsx
#: src/mobile/views/ThreadView.tsx
msgid "Pick a thread from the list to follow the agent from here."
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 @@ -4171,6 +4171,10 @@ msgstr "Poracode のネイティブ ランタイムを使用したファース
msgid "First-class OpenCode integration using Poracode's native SDK runtime."
msgstr "Poracode のネイティブ SDK ランタイムを使用したファーストクラスの OpenCode 統合。"

#: src/renderer/views/SettingsOverlay/parts/agentRegistryNative.ts
msgid "First-class Pi integration using a real terminal and Pi's native SDK runtime."
msgstr "実際のターミナルと Pi のネイティブ SDK ランタイムを使用する、完全な Pi 統合です。"

#: src/renderer/views/SettingsOverlay/parts/agentRegistryNative.ts
msgid "First-class Qwen Code integration using Poracode's native terminal and ACP runtimes."
msgstr "Poracode のネイティブなターミナルおよび ACP ランタイムを使用する、Qwen Code のファーストクラス統合です。"
Expand Down Expand Up @@ -7048,6 +7052,10 @@ msgstr "保留中のステアリング"
msgid "permission"
msgstr "許可"

#: src/renderer/components/providers/pi/manifest.ts
msgid "Pi"
msgstr "Pi"

#: src/mobile/routeComponents.tsx
#: src/mobile/views/ThreadView.tsx
msgid "Pick a thread from the list to follow the agent from here."
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 @@ -4172,6 +4172,10 @@ msgstr "Poracode의 기본 런타임을 사용하는 최고 수준의 Kimi Code
msgid "First-class OpenCode integration using Poracode's native SDK runtime."
msgstr "Poracode의 기본 SDK 런타임을 사용한 최고 수준의 OpenCode 통합."

#: src/renderer/views/SettingsOverlay/parts/agentRegistryNative.ts
msgid "First-class Pi integration using a real terminal and Pi's native SDK runtime."
msgstr "실제 터미널과 Pi의 네이티브 SDK 런타임을 사용하는 완전한 Pi 통합입니다."

#: src/renderer/views/SettingsOverlay/parts/agentRegistryNative.ts
msgid "First-class Qwen Code integration using Poracode's native terminal and ACP runtimes."
msgstr "Poracode의 네이티브 터미널 및 ACP 런타임을 사용하는 Qwen Code의 일급 통합입니다."
Expand Down Expand Up @@ -7050,6 +7054,10 @@ msgstr "조정 대기 중"
msgid "permission"
msgstr "권한"

#: src/renderer/components/providers/pi/manifest.ts
msgid "Pi"
msgstr "Pi"

#: src/mobile/routeComponents.tsx
#: src/mobile/views/ThreadView.tsx
msgid "Pick a thread from the list to follow the agent from here."
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 @@ -4172,6 +4172,10 @@ msgstr "Pierwszorzędna integracja Kimi Code CLI przy użyciu natywnego środowi
msgid "First-class OpenCode integration using Poracode's native SDK runtime."
msgstr "Pierwszorzędna integracja OpenCode z wykorzystaniem natywnego środowiska wykonawczego SDK Poracode."

#: src/renderer/views/SettingsOverlay/parts/agentRegistryNative.ts
msgid "First-class Pi integration using a real terminal and Pi's native SDK runtime."
msgstr "Pełna integracja Pi korzystająca z prawdziwego terminala i natywnego środowiska uruchomieniowego SDK Pi."

#: src/renderer/views/SettingsOverlay/parts/agentRegistryNative.ts
msgid "First-class Qwen Code integration using Poracode's native terminal and ACP runtimes."
msgstr "Pierwszorzędna integracja z Qwen Code korzystająca z natywnych środowisk uruchomieniowych terminala i ACP w Poracode."
Expand Down Expand Up @@ -7050,6 +7054,10 @@ msgstr "Oczekujące sterowanie"
msgid "permission"
msgstr "pozwolenie"

#: src/renderer/components/providers/pi/manifest.ts
msgid "Pi"
msgstr "Pi"

#: src/mobile/routeComponents.tsx
#: src/mobile/views/ThreadView.tsx
msgid "Pick a thread from the list to follow the agent from here."
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 @@ -4172,6 +4172,10 @@ msgstr "Integração Kimi Code CLI de primeira classe usando o tempo de execuç
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."

#: src/renderer/views/SettingsOverlay/parts/agentRegistryNative.ts
msgid "First-class Pi integration using a real terminal and Pi's native SDK runtime."
msgstr "Integração Pi de primeira classe com um terminal real e o ambiente de execução SDK nativo do Pi."

#: src/renderer/views/SettingsOverlay/parts/agentRegistryNative.ts
msgid "First-class Qwen Code integration using Poracode's native terminal and ACP runtimes."
msgstr "Integração nativa com o Qwen Code usando os runtimes de terminal e ACP do Poracode."
Expand Down Expand Up @@ -7050,6 +7054,10 @@ msgstr "Orientação pendente"
msgid "permission"
msgstr "permissão"

#: src/renderer/components/providers/pi/manifest.ts
msgid "Pi"
msgstr "Pi"

#: src/mobile/routeComponents.tsx
#: src/mobile/views/ThreadView.tsx
msgid "Pick a thread from the list to follow the agent from here."
Expand Down
8 changes: 8 additions & 0 deletions src/renderer/locales/ru/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -4172,6 +4172,10 @@ msgstr "Первоклассная интеграция Kimi Code CLI с исп
msgid "First-class OpenCode integration using Poracode's native SDK runtime."
msgstr "Первоклассная интеграция OpenCode с использованием нативной среды выполнения SDK Poracode."

#: src/renderer/views/SettingsOverlay/parts/agentRegistryNative.ts
msgid "First-class Pi integration using a real terminal and Pi's native SDK runtime."
msgstr "Полноценная интеграция Pi с настоящим терминалом и нативной средой выполнения SDK Pi."

#: src/renderer/views/SettingsOverlay/parts/agentRegistryNative.ts
msgid "First-class Qwen Code integration using Poracode's native terminal and ACP runtimes."
msgstr "Первоклассная интеграция Qwen Code с использованием встроенных сред терминала и ACP в Poracode."
Expand Down Expand Up @@ -7050,6 +7054,10 @@ msgstr "Ожидающее направление"
msgid "permission"
msgstr "разрешение"

#: src/renderer/components/providers/pi/manifest.ts
msgid "Pi"
msgstr "Pi"

#: src/mobile/routeComponents.tsx
#: src/mobile/views/ThreadView.tsx
msgid "Pick a thread from the list to follow the agent from here."
Expand Down
8 changes: 8 additions & 0 deletions src/renderer/locales/tr/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -4172,6 +4172,10 @@ msgstr "Poracode'un yerel çalışma zamanını kullanan birinci sınıf Kimi Co
msgid "First-class OpenCode integration using Poracode's native SDK runtime."
msgstr "Poracode'un yerel SDK çalışma zamanını kullanan birinci sınıf OpenCode entegrasyonu."

#: src/renderer/views/SettingsOverlay/parts/agentRegistryNative.ts
msgid "First-class Pi integration using a real terminal and Pi's native SDK runtime."
msgstr "Gerçek bir terminal ve Pi'nin yerel SDK çalışma zamanı ile birinci sınıf Pi entegrasyonu."

#: src/renderer/views/SettingsOverlay/parts/agentRegistryNative.ts
msgid "First-class Qwen Code integration using Poracode's native terminal and ACP runtimes."
msgstr "Poracode'un yerel terminal ve ACP çalışma zamanlarını kullanan birinci sınıf Qwen Code entegrasyonu."
Expand Down Expand Up @@ -7050,6 +7054,10 @@ msgstr "Yönlendirme bekleniyor"
msgid "permission"
msgstr "izin"

#: src/renderer/components/providers/pi/manifest.ts
msgid "Pi"
msgstr "Pi"

#: src/mobile/routeComponents.tsx
#: src/mobile/views/ThreadView.tsx
msgid "Pick a thread from the list to follow the agent from here."
Expand Down
Loading