Compare commits

...
Author SHA1 Message Date
Mohamed Boudra 7eec266f50 fix(usage): keep window shorthands visible in sidebar usage row (#10274)
* fix(usage): keep window shorthands visible in sidebar usage row

Antigravity usage windows emitted full group names and raw period strings (for example "Gemini Models weekly") in shortLabel, which pushed the measured labels row past the maximum sidebar width. On the app side, choosePinnedUsageLayout dropped every window on the row straight to bare percentages whenever any scoped short label overflowed the row.

Normalize Antigravity shortLabel periods (weekly -> wk, monthly -> mo) and shorten group prefixes, and add a compact period-shorthand tier between full labels and bare percentages in PinnedUsageTrigger so tight sidebar rows keep shorthands like 5h and wk visible instead of collapsing to percentages alone.

* test(usage): expect compact shorthands in usage modal sidebar summary

With the compact period-shorthand tier between full labels and bare percentages, three Weekly windows now render as "31% wk", "20% wk", "12% wk" in the 320px sidebar instead of dropping to bare percentages.
2026-11-20 13:58:45 +07:00
Mohamed Boudra b3d860cce2 feat(website): apply new Paseo and Paseo Hub branding (#10271)
Replace the website's legacy Paseo mark and plain-text headers with the canonical Paseo butterfly and Paseo Hub flower marks and Plus Jakarta Sans SemiBold lockups from assets/brand/.

Sourcing the website SVG components directly from assets/brand/ keeps mark proportions, 94% butterfly optical balance, and outlined wordmarks aligned with the canonical assets without shipping an extra webfont or duplicating paths across components.
2026-11-20 13:04:59 +07:00
James DumayandJames Dumay 7b9c6a7d4a feat(providers): bundle goose plugin with multi-provider model selection (#9719)
Moves goose into a built-in opt-in provider plugin (`plugins/goose-provider`) and lists models from every provider configured in goose.

- Bundles `plugins/goose-provider` with `server_info.features.gooseProvider`, legacy host catalog fallback, legacy `extends: "acp"` config migration, and legacy session handle decoding (`COMPAT(gooseProvider)`).
- Adds `context.request(method, params)` and synchronous `config(state, context)` hooks to `@getpaseo/plugin/server/acp`.
- Queries goose's provider inventory RPC during discovery to expose `<provider>/<model>` entries (falling back to the base catalog if unavailable), switches provider before model on selection, and namespaces session config snapshots.

Co-authored-by: James Dumay <james@generalinference.xyz>
2026-11-20 12:35:11 +07:00
48 changed files with 1324 additions and 93 deletions
@@ -29,7 +29,12 @@ const ACP_PROVIDER = {
interface ProviderCatalogDaemonClient {
getLastServerInfoMessage(): {
features?: { fxProvider?: boolean; hopliteProvider?: boolean; plugins?: boolean };
features?: {
gooseProvider?: boolean;
fxProvider?: boolean;
hopliteProvider?: boolean;
plugins?: boolean;
};
} | null;
connect(): Promise<void>;
close(): Promise<void>;
@@ -204,3 +209,47 @@ test("model selector excludes Hoplite before opt-in", async ({ page }, testInfo)
await client.close();
}
});
test("adds bundled goose from the catalog", async ({ page }) => {
const client = await connectDaemonClient<ProviderCatalogDaemonClient>({
clientIdPrefix: "goose-catalog-e2e",
});
try {
expect(client.getLastServerInfoMessage()?.features?.gooseProvider).toBe(true);
await client.patchDaemonConfig({ removeProviders: ["goose"] });
await gotoAppShell(page);
await addGooseFromSettings(page, getServerId());
expect((await client.getDaemonConfig()).config.providers?.goose).toEqual({ enabled: true });
} finally {
await client.patchDaemonConfig({ removeProviders: ["goose"] });
await client.close();
}
});
test("adds goose through ACP on an older host", async ({ page, outdatedDaemon }) => {
const client = await connectDaemonClient<ProviderCatalogDaemonClient>({
clientIdPrefix: "goose-catalog-old-host",
port: Number(new URL(`http://${outdatedDaemon.endpoint}`).port),
});
try {
expect(client.getLastServerInfoMessage()?.features?.gooseProvider).toBe(false);
await seedSavedSettingsHosts(page, [outdatedDaemon]);
await page.reload();
await addGooseFromSettings(page, outdatedDaemon.serverId);
expect((await client.getDaemonConfig()).config.providers?.goose).toMatchObject({
extends: "acp",
command: ["goose", "acp"],
});
} finally {
await client.close();
}
});
async function addGooseFromSettings(page: import("@playwright/test").Page, serverId: string) {
await openSettings(page);
await openSettingsHost(page, serverId);
await openSettingsHostSection(page, serverId, "providers");
await openAddProvider(page);
await installAcpCatalogProvider(page, "goose");
await expectProviderInstalledInSettings(page, "goose");
}
+2 -2
View File
@@ -233,8 +233,8 @@ test.describe("usage modal", () => {
],
});
await gotoAppShell(page);
// Three windows leave no room for labels in the summary, so it reads percents.
await expectPinnedUsage(page, ["31%", "20%", "12%"]);
// Three Weekly labels overflow the summary, so it falls back to compact shorthands.
await expectPinnedUsage(page, ["31% wk", "20% wk", "12% wk"]);
await openUsageFromItem(page);
await expectUsageCardOrder(page, ["alpha:a", "beta:home", "beta:work"]);
@@ -40,6 +40,7 @@ import {
usageModal,
installTallUsageSource,
} from "../support/helpers/usage-sidebar-item";
import { seedDockedSidebarWidth } from "../support/helpers/sidebar-footer-overflow";
import { seedSidebarFooterPreferences } from "../support/helpers/sidebar-nav-settings";
import { waitForSettledPosition } from "../support/helpers/sheet-layout";
import { createTempGitRepo } from "../support/helpers/workspace";
@@ -577,3 +578,97 @@ test("visible usage summary requests reports on load", async ({ page }) => {
await expectPinnedUsage(page, ["31% 5h", "54% wk", "7% 5h", "12% wk"]);
expect(usage.listRequests()).toHaveLength(1);
});
test("sidebar usage falls back to period shorthands before dropping all labels", async ({
page,
}) => {
test.setTimeout(120_000);
const [claude, codex] = claudeAndCodexReports();
const fetchedAt = new Date().toISOString();
await installUsageReportsFixture(page, {
lists: [
() => [
{
...codex!,
report: {
status: "available",
windows: [
{ id: "weekly", label: "Weekly", shortLabel: "wk", summary: true, usedPct: 97 },
],
},
},
{
...claude!,
report: {
status: "available",
windows: [
{ id: "five_hour", label: "Session", shortLabel: "5h", summary: true, usedPct: 100 },
{ id: "weekly", label: "Weekly", shortLabel: "wk", summary: true, usedPct: 14 },
{
id: "weekly_model_opus",
label: "Weekly · Opus",
shortLabel: "wk Opus",
summary: true,
usedPct: 22,
},
],
},
},
{
id: "antigravity:default",
account: {},
fetchedAt,
sourceId: "antigravity",
sourceLabel: "Antigravity",
report: {
status: "available",
windows: [
{
id: "gemini-weekly",
label: "Gemini Models · Weekly",
shortLabel: "Gemini wk",
summary: true,
usedPct: 6,
},
{
id: "gemini-5h",
label: "Gemini Models · 5h",
shortLabel: "Gemini 5h",
summary: true,
usedPct: 20,
},
],
},
},
],
],
});
await seedSidebarFooterPreferences(page, [{ key: "usage", visible: true }]);
await seedDockedSidebarWidth(page, 432);
await page.setViewportSize(WIDE);
await gotoAppShell(page);
await expectPinnedUsage(page, ["6% wk", "20% 5h", "100% 5h", "14% wk", "22% wk", "97% wk"]);
const handle = page.getByTestId("left-sidebar-resize-handle");
const dragSidebarTo = async (targetX: number) => {
const box = (await handle.boundingBox())!;
await page.mouse.move(box.x + box.width / 2, box.y + box.height / 2);
await page.mouse.down();
await page.mouse.move(targetX, box.y + box.height / 2, { steps: 10 });
await page.mouse.up();
};
await dragSidebarTo(600);
await expectPinnedUsage(page, [
"6% Gemini wk",
"20% Gemini 5h",
"100% 5h",
"14% wk",
"22% wk Opus",
"97% wk",
]);
await dragSidebarTo(300);
await expectPinnedUsage(page, ["6%", "20%", "100%", "14%", "22%", "97%"]);
});
@@ -224,6 +224,7 @@ const CATALOG_DATA = [
},
{
id: "goose",
bundledProvider: { hostFeature: "gooseProvider" },
title: "goose",
description: "A local, extensible, open source AI agent that automates engineering tasks",
version: "1.33.1",
@@ -150,3 +150,21 @@ describe("ACP provider catalog", () => {
});
});
});
it("adds bundled goose on capable hosts and uses the ACP config on older hosts", () => {
const goose = findProvider("goose");
expect(buildAcpProviderConfigPatch(goose, (feature) => feature === "gooseProvider")).toEqual({
providers: { goose: { enabled: true } },
});
expect(buildAcpProviderConfigPatch(goose)).toEqual({
providers: {
goose: {
extends: "acp",
label: "goose",
description: goose.description,
command: ["goose", "acp"],
env: {},
},
},
});
});
@@ -19,12 +19,16 @@ export function buildAcpProviderConfigPatch(
hostSupports: (feature: HostFeatureName) => boolean = () => false,
): MutableDaemonConfigPatch {
if (entry.bundledProvider) {
const feature = entry.bundledProvider.hostFeature;
if (hostSupports(feature)) {
return { providers: { [entry.id]: { enabled: true } } };
}
// COMPAT(gooseProvider): added in v0.17.0, remove after 2027-05-20 once host floor includes the bundled adapter.
// COMPAT(hopliteProvider): added after v0.11.2, remove after 2027-04-15 once host floor includes the bundled adapter.
// COMPAT(fxProvider): added after v0.15.3, remove after 2027-05-09 once host floor includes the bundled adapter.
if (!hostSupports(entry.bundledProvider.hostFeature)) {
if (feature !== "gooseProvider") {
throw new Error(`Update the host to add ${entry.title}.`);
}
return { providers: { [entry.id]: { enabled: true } } };
}
return {
providers: {
+65 -1
View File
@@ -53,7 +53,7 @@ function preferences(
}
describe("choosePinnedUsageLayout", () => {
const widths = { labelsWidth: 200, percentsWidth: 120, windowCount: 2 };
const widths = { labelsWidth: 200, compactWidth: 200, percentsWidth: 120, windowCount: 2 };
it("shows meters only when every window's meter fits beside the labels", () => {
expect(choosePinnedUsageLayout({ ...widths, available: 240 })).toBe("meters");
@@ -64,11 +64,27 @@ describe("choosePinnedUsageLayout", () => {
expect(choosePinnedUsageLayout({ ...widths, available: 199 })).toBe("percents");
});
it("uses compact period shorthands when full labels overflow but compact labels fit", () => {
const scoped = { labelsWidth: 485, compactWidth: 388, percentsWidth: 268, windowCount: 6 };
expect(choosePinnedUsageLayout({ ...scoped, available: 485 })).toBe("labels");
expect(choosePinnedUsageLayout({ ...scoped, available: 399 })).toBe("compact");
expect(choosePinnedUsageLayout({ ...scoped, available: 388 })).toBe("compact");
expect(choosePinnedUsageLayout({ ...scoped, available: 387 })).toBe("percents");
});
it("skips compact mode when no window has a compact label", () => {
const noPeriod = { labelsWidth: 220, compactWidth: 120, percentsWidth: 120, windowCount: 2 };
expect(choosePinnedUsageLayout({ ...noPeriod, available: 180 })).toBe("percents");
});
it("shows labels until the widths are measured", () => {
expect(choosePinnedUsageLayout({ ...widths, available: null })).toBe("labels");
expect(choosePinnedUsageLayout({ ...widths, available: 999, labelsWidth: null })).toBe(
"labels",
);
expect(choosePinnedUsageLayout({ ...widths, available: 999, compactWidth: null })).toBe(
"labels",
);
});
});
@@ -145,6 +161,7 @@ describe("resolvePinnedUsage", () => {
key: "claude:default/five-hour",
label: "Claude Session 31% used",
shortLabel: "5h",
compactLabel: "5h",
percent: 31,
percentText: "31%",
tone: "default",
@@ -153,6 +170,7 @@ describe("resolvePinnedUsage", () => {
key: "claude:default/weekly",
label: "Claude Weekly 80% used",
shortLabel: "wk",
compactLabel: "wk",
percent: 80,
percentText: "80%",
tone: "warning",
@@ -216,6 +234,52 @@ describe("resolvePinnedUsage", () => {
const items = windows([opencode], preferences(null));
expect(items.map((item) => item.shortLabel)).toEqual([""]);
expect(items.map((item) => item.compactLabel)).toEqual([""]);
});
it("extracts bare period tokens as compact labels for scoped or verbose short labels", () => {
const mixed = report({
sourceId: "mixed",
sourceLabel: "Mixed",
windows: [
{ id: "a", label: "Session", shortLabel: "5h", summary: true, usedPct: 10 },
{ id: "b", label: "Weekly · Opus", shortLabel: "wk Opus", summary: true, usedPct: 20 },
{
id: "c",
label: "Code review · Weekly",
shortLabel: "Code review wk",
summary: true,
usedPct: 30,
},
{
id: "d",
label: "Gemini Models · Weekly",
shortLabel: "Gemini Models weekly",
summary: true,
usedPct: 40,
},
{
id: "e",
label: "Gemini Models · 5h",
shortLabel: "Gemini Models 5h",
summary: true,
usedPct: 50,
},
{ id: "f", label: "Monthly", shortLabel: "Monthly", summary: true, usedPct: 60 },
{ id: "g", label: "Premium requests", summary: true, usedPct: 70 },
],
});
const items = windows([mixed], preferences(null));
expect(items.map((item) => [item.shortLabel, item.compactLabel])).toEqual([
["5h", "5h"],
["wk Opus", "wk"],
["Code review wk", "wk"],
["Gemini Models weekly", "wk"],
["Gemini Models 5h", "5h"],
["Monthly", "mo"],
["Premium requests", ""],
]);
});
it("formats the share left when the user reads usage as remaining", () => {
+49 -6
View File
@@ -18,6 +18,8 @@ export interface PinnedUsageWindow {
label: string;
/** The window's short name ("5h"), empty for none, or its label when the source sends none. */
shortLabel: string;
/** Bare period token ("5h", "wk", "mo") used when full short labels overflow the sidebar row. */
compactLabel: string;
/** The share shown, under the user's used/remaining preference. */
percent: number;
percentText: string;
@@ -34,28 +36,66 @@ export interface PinnedUsageSource {
}
/** How much of each window the one-line summary has room for. */
export type PinnedUsageLayout = "meters" | "labels" | "percents";
export type PinnedUsageLayout = "meters" | "labels" | "compact" | "percents";
// A meter narrower than this is a sliver that reads as noise rather than a share.
export const MIN_METER_WIDTH = 16;
/** The space between a meter and its text. */
export const METER_GAP = 4;
const DURATION_TOKEN_PATTERN = /^\d+[smhd]$/i;
function normalizePeriodToken(token: string): string | null {
const lower = token.toLowerCase();
if (lower === "wk" || lower === "weekly") return "wk";
if (lower === "mo" || lower === "monthly") return "mo";
if (DURATION_TOKEN_PATTERN.test(token)) return lower;
return null;
}
/**
* Extracts a bare period token ("5h", "wk", "mo") from a window's short label so tight sidebar
* rows can keep shorthands visible instead of dropping every label when one window is scoped.
*/
function compactShortLabel(shortLabel: string): string {
const trimmed = shortLabel.trim();
if (trimmed === "") return "";
const exact = normalizePeriodToken(trimmed);
if (exact !== null) return exact;
const parts = trimmed.split(/\s+/);
if (parts.length > 1) {
const first = normalizePeriodToken(parts[0]!);
if (first !== null) return first;
const last = normalizePeriodToken(parts[parts.length - 1]!);
if (last !== null) return last;
}
return "";
}
/**
* The richest layout that fits on one line: every window's meter, else its short label, else its
* percent alone. Meters are all or none; a line never mixes them. Until the widths are known it
* shows labels, which never flashes meters that turn out not to fit.
* bare period shorthand, else its percent alone. Meters are all or none; a line never mixes them.
* Until the widths are known it shows labels, which never flashes meters that turn out not to fit.
*/
export function choosePinnedUsageLayout(input: {
available: number | null;
labelsWidth: number | null;
compactWidth: number | null;
percentsWidth: number | null;
windowCount: number;
}): PinnedUsageLayout {
const { available, labelsWidth, percentsWidth, windowCount } = input;
if (available === null || labelsWidth === null || percentsWidth === null) return "labels";
const { available, labelsWidth, compactWidth, percentsWidth, windowCount } = input;
if (
available === null ||
labelsWidth === null ||
compactWidth === null ||
percentsWidth === null
) {
return "labels";
}
if (labelsWidth + windowCount * (MIN_METER_WIDTH + METER_GAP) <= available) return "meters";
if (labelsWidth <= available) return "labels";
if (compactWidth <= available && compactWidth > percentsWidth) return "compact";
return percentsWidth < labelsWidth ? "percents" : "labels";
}
@@ -85,10 +125,13 @@ export function resolvePinnedUsage(
.map((window) => {
const percent = displayPercent(window, preferences.displayAs) ?? 0;
const percentText = formatPct(percent);
const shortLabel =
window.shortLabel ?? formatProviderUsageLabel(window.id, window.label, t);
return {
key: `${entry.id}/${window.id}`,
label: `${describe(entry, formatProviderUsageLabel(window.id, window.label, t))} ${formatDisplayPct(percent, preferences.displayAs, undefined, t)}`,
shortLabel: window.shortLabel ?? formatProviderUsageLabel(window.id, window.label, t),
shortLabel,
compactLabel: compactShortLabel(shortLabel),
percent,
percentText,
tone: windowTone(window),
+19 -5
View File
@@ -29,6 +29,7 @@ import {
resolvePinnedUsage,
type PinnedUsageLayout,
type PinnedUsageSource,
type PinnedUsageWindow,
} from "./pinned";
import { UsageModal } from "./usage-modal";
@@ -123,8 +124,8 @@ function layoutWidth(event: LayoutChangeEvent): number {
/**
* One line: each account's icon, then per window a meter and "31% 5h". Off-screen copies measure
* the line with labels and with percents alone; the richest layout that fits is shown, and what
* it leaves out takes no space at all.
* the line with full labels, bare period shorthands, and percents alone; the richest layout that
* fits is shown, and what it leaves out takes no space at all.
*/
function PinnedUsageTrigger({
label,
@@ -139,6 +140,7 @@ function PinnedUsageTrigger({
}) {
const [available, setAvailable] = useState<number | null>(null);
const [labelsWidth, setLabelsWidth] = useState<number | null>(null);
const [compactWidth, setCompactWidth] = useState<number | null>(null);
const [percentsWidth, setPercentsWidth] = useState<number | null>(null);
const handleAvailableLayout = useCallback((event: LayoutChangeEvent) => {
setAvailable(layoutWidth(event));
@@ -146,12 +148,16 @@ function PinnedUsageTrigger({
const handleLabelsLayout = useCallback((event: LayoutChangeEvent) => {
setLabelsWidth(layoutWidth(event));
}, []);
const handleCompactLayout = useCallback((event: LayoutChangeEvent) => {
setCompactWidth(layoutWidth(event));
}, []);
const handlePercentsLayout = useCallback((event: LayoutChangeEvent) => {
setPercentsWidth(layoutWidth(event));
}, []);
const layout = choosePinnedUsageLayout({
available,
labelsWidth,
compactWidth,
percentsWidth,
windowCount: sources.reduce((count, source) => count + source.windows.length, 0),
});
@@ -177,6 +183,9 @@ function PinnedUsageTrigger({
<View style={styles.measured} onLayout={handleLabelsLayout}>
<PinnedUsageLine sources={sources} layout="labels" measuring />
</View>
<View style={styles.measured} onLayout={handleCompactLayout}>
<PinnedUsageLine sources={sources} layout="compact" measuring />
</View>
<View style={styles.measured} onLayout={handlePercentsLayout}>
<PinnedUsageLine sources={sources} layout="percents" measuring />
</View>
@@ -185,6 +194,12 @@ function PinnedUsageTrigger({
);
}
function windowSuffix(window: PinnedUsageWindow, layout: PinnedUsageLayout): string {
if (layout === "percents") return "";
if (layout === "compact") return window.compactLabel;
return window.shortLabel;
}
/**
* The line's items as direct children of one row, so every meter shares the leftover width
* equally.
@@ -215,6 +230,7 @@ function PinnedUsageLine({
</View>
{source.windows.map((window, windowIndex) => {
const leadStyle = windowIndex === 0 ? styles.iconGap : styles.windowGap;
const suffix = windowSuffix(window, layout);
return (
<Fragment key={window.key}>
{layout === "meters" ? (
@@ -228,9 +244,7 @@ function PinnedUsageLine({
testID={measuring ? undefined : "sidebar-usage-pinned-window"}
>
{window.percentText}
{layout === "percents" || window.shortLabel === "" ? null : (
<Text style={styles.windowLabel}>{` ${window.shortLabel}`}</Text>
)}
{suffix === "" ? null : <Text style={styles.windowLabel}>{` ${suffix}`}</Text>}
</Text>
</Fragment>
);
@@ -23,6 +23,8 @@ import { z } from "zod";
import type {
AcpConfigAccess,
AcpConfigChange,
AcpConfigureContext,
AcpRequest,
AcpToolCallSnapshot,
AcpTransformer,
AcpVendorUpdate,
@@ -261,10 +263,10 @@ async function discover(
});
try {
let catalog = await runtime.discover(input.cwd);
const config = runtime.configAccess();
const context = runtime.configContext();
for (const transformer of state.options.transformers ?? []) {
if (transformer.discover) {
catalog = await transformer.discover(catalog, { sessionId: "catalog", config });
catalog = await transformer.discover(catalog, context);
}
}
state.emit({ type: "catalog", requestId: input.requestId, catalog });
@@ -902,16 +904,13 @@ class AcpRuntime {
this.autoAccept = enableAutoAccept;
return;
}
const access = this.configAccess();
const context: AcpConfigureContext = {
...this.configContext(),
catalog: () => toProviderCatalog(this.modes, this.configOptions),
apply: (nativeChange) => this.applyNativeConfigChange(nativeChange),
};
for (const transformer of this.transformers) {
if (
(await transformer.configure?.(change, {
sessionId: this.options.boundarySessionId,
config: access,
catalog: () => toProviderCatalog(this.modes, this.configOptions),
apply: (nativeChange) => this.applyNativeConfigChange(nativeChange),
})) === "handled"
) {
if ((await transformer.configure?.(change, context)) === "handled") {
return;
}
}
@@ -951,7 +950,20 @@ class AcpRuntime {
this.configOptions = response.configOptions;
}
configAccess(): AcpConfigAccess {
configContext() {
return {
sessionId: this.options.boundarySessionId,
config: this.configAccess(),
request: this.request,
};
}
private readonly request: AcpRequest = async (method, params) =>
jsonValue(
await this.call(this.connection.extMethod(method, params as Record<string, unknown>)),
);
private configAccess(): AcpConfigAccess {
return {
read: async () => configValues(this.configOptions),
set: async (id, value) => {
@@ -989,6 +1001,10 @@ class AcpRuntime {
modes: [...config.modes, { ...autoAcceptMode.mode, isUnattended: true }],
};
}
const context = { sessionId: this.options.boundarySessionId };
for (const transformer of this.transformers) {
config = transformer.config?.(config, context) ?? config;
}
this.emit({
type: "session.config",
sessionId: this.options.boundarySessionId,
+132
View File
@@ -2320,3 +2320,135 @@ describe("ACP session history replay", () => {
}
});
});
it("sends extension requests from discovery and configure and preserves JSON-RPC errors", async () => {
const { connector, instances } = connectorHarness({
handleRequest(instance, request) {
if (request.method === "_example/catalog") {
instance.respond(request, { model: "vendor-model" });
return true;
}
if (request.method === "_example/select") {
instance.reject(request, "Vendor rejected the selection");
return true;
}
return false;
},
});
const registration = runAcpProvider({
id: "extensions",
label: "Extensions",
connector,
transformers: [
{
async discover(catalog, { request }) {
expect(await request("_example/catalog", { scope: "all" })).toEqual({
model: "vendor-model",
});
return { ...catalog, defaultModel: "vendor-model" };
},
async configure(change, { request }) {
await expect(request("_example/select", { model: change.value })).rejects.toMatchObject({
code: -32603,
message: "Vendor rejected the selection",
});
return "handled";
},
},
],
});
const connection = await registration.connect({
versions: [1],
capabilities: ["session.configure"],
});
const events: ProviderEvent[] = [];
connection.onEvent((event) => events.push(event));
try {
await connection.send({ type: "catalog", requestId: "catalog" });
expect(
await waitForEvent(
events,
(event) => event.type === "catalog" || event.type === "request.failed",
),
).toMatchObject({ type: "catalog", catalog: { defaultModel: "vendor-model" } });
expect(instances[1].requests).toContainEqual(
expect.objectContaining({
method: "_example/catalog",
params: { scope: "all" },
}),
);
const input = openInput();
await connection.send({ ...input, config: { ...input.config, model: "vendor-model" } });
expect(
await waitForEvent(
events,
(event) => event.type === "session.ready" || event.type === "request.failed",
),
).toMatchObject({ type: "session.ready" });
expect(instances[2].requests).toContainEqual(
expect.objectContaining({
method: "_example/select",
params: { model: "vendor-model" },
}),
);
} finally {
await connection.close();
}
});
it("rewrites the session-ready, notification and configure-commit config snapshots", async () => {
const modelOption = {
id: "model",
name: "Model",
category: "model",
type: "select",
currentValue: "first",
options: ["first", "second", "third"].map((value) => ({ name: value, value })),
};
const { connector, instances } = connectorHarness({ configOptions: [modelOption] });
const registration = runAcpProvider({
id: "config-transformer",
label: "Config Transformer",
connector,
transformers: [
{
config(state, { sessionId }) {
return { ...state, model: `${sessionId}/${state.model}` };
},
},
],
});
const connection = await registration.connect({
versions: [1],
capabilities: ["session.configure"],
});
const events: ProviderEvent[] = [];
connection.onEvent((event) => events.push(event));
const models = () =>
events.flatMap((event) => (event.type === "session.config" ? [event.config.model] : []));
try {
await connection.send(openInput());
await waitForEvent(events, (event) => event.type === "session.ready");
expect(models()).toEqual(["session-1/first"]);
instances[1].notify("session/update", {
sessionId: "connector-session",
update: {
sessionUpdate: "config_option_update",
configOptions: [{ ...modelOption, currentValue: "second" }],
},
});
await expect.poll(models).toEqual(["session-1/first", "session-1/second"]);
await connection.send({
type: "session.configure",
requestId: "configure",
sessionId: "session-1",
changes: { model: "third" },
});
await expect.poll(models).toEqual(["session-1/first", "session-1/second", "session-1/third"]);
} finally {
await connection.close();
}
});
+7
View File
@@ -70,12 +70,17 @@ export interface AcpConfigAccess {
set(id: string, value: JsonValue): Promise<void>;
}
/** Sends an ACP extension request to the agent. Rejects with the agent's JSON-RPC error. */
export type AcpRequest = (method: string, params: JsonValue) => Promise<JsonValue>;
export interface AcpDiscoveryContext extends AcpContext {
config: AcpConfigAccess;
request: AcpRequest;
}
export interface AcpConfigureContext extends AcpContext {
config: AcpConfigAccess;
request: AcpRequest;
catalog(): ProviderCatalog;
apply(change: AcpConfigChange): Promise<void>;
}
@@ -117,6 +122,8 @@ export interface AcpTransformer {
context: AcpDiscoveryContext,
): Promise<ProviderCatalog> | ProviderCatalog;
configure?(change: AcpConfigChange, context: AcpConfigureContext): Promise<"handled" | "pass">;
/** Rewrites every session config snapshot before Paseo sees it. */
config?(state: ProviderConfigState, context: AcpContext): ProviderConfigState;
notification?(
notification: { method: string; params: JsonValue },
context: AcpContext,
@@ -814,7 +814,7 @@ describe("checkout PR schemas", () => {
});
test.each(
["hopliteProvider", "fxProvider"].flatMap((name) =>
["hopliteProvider", "fxProvider", "gooseProvider"].flatMap((name) =>
[undefined, false, true].map((value) => [name, value] as const),
),
)("accepts optional bundled provider capability (%s: %s)", (name, value) => {
+2
View File
@@ -4151,6 +4151,8 @@ export const ServerInfoStatusPayloadSchema = z
hopliteProvider: z.boolean().optional(),
// COMPAT(fxProvider): added after v0.15.3, remove after 2027-05-09 once host floor includes the bundled adapter.
fxProvider: z.boolean().optional(),
// COMPAT(gooseProvider): added in v0.17.0, remove after 2027-05-20 once host floor includes the bundled adapter.
gooseProvider: z.boolean().optional(),
// COMPAT(importSessionWorkspaceTarget): added in v0.1.110, remove gate after 2027-01-16.
importSessionWorkspaceTarget: z.boolean().optional(),
// COMPAT(importSessionSearch): added in v0.8.0, remove gate after 2027-03-02.
@@ -2788,3 +2788,29 @@ test("plugin provider import launches with runtime MCP servers and returns only
await registry.shutdown();
}
});
test("resumes a goose session saved by the generic ACP provider", async () => {
const logger = createTestLogger();
const harness = createProviderHarness();
const plugins = new PluginAgentClientRegistry(logger);
plugins.replace([{ ...harness.registration, id: "goose" }]);
const registry = buildProviderRegistry(logger, { pluginProviders: plugins.definitions() });
const client = registry.goose.createClient(logger);
try {
const session = await client.resumeSession(
{
provider: "goose",
sessionId: "native-goose-session",
nativeHandle: "native-goose-session",
},
{ provider: "goose", cwd: "/tmp" },
);
expect(harness.inputs.findLast((input) => input.type === "session.open")).toMatchObject({
persistence: { version: 1, data: { sessionId: "native-goose-session" } },
});
await session.close();
} finally {
await plugins.shutdown();
}
});
@@ -2174,6 +2174,10 @@ function decodePersistence(handle: AgentPersistenceHandle): ProviderPersistence
if (fromMetadata !== undefined) {
return ProviderPersistenceSchema.parse(fromMetadata);
}
// COMPAT(gooseProvider): added in v0.17.0, remove after 2027-05-20 once legacy handles have migrated.
if (handle.provider === "goose" && !handle.sessionId.startsWith("plugin:")) {
return { version: 1, data: { sessionId: handle.sessionId } };
}
return decodePersistenceId(handle.sessionId);
}
@@ -0,0 +1,88 @@
// Local ACP peer shaped like `goose acp`.
const readline = require("node:readline");
const inventory = {
openrouter: { name: "OpenRouter", model: "anthropic/claude-sonnet-4.5" },
openai: { name: "OpenAI", model: "gpt-4o" },
anthropic: { name: "Anthropic", model: "sonnet" },
};
let provider = "goose";
let model = inventory.openrouter.model;
const select = (id, currentValue, values) => ({
id,
name: id,
...(id === "model" ? { category: "model" } : {}),
type: "select",
currentValue,
options: values.map((value) => ({ value, name: value })),
});
const configOptions = () => [
select("provider", provider, ["goose", ...Object.keys(inventory)]),
select("model", model, [inventory[provider === "goose" ? "openrouter" : provider].model]),
];
const send = (message) =>
process.stdout.write(JSON.stringify({ jsonrpc: "2.0", ...message }) + "\n");
readline.createInterface({ input: process.stdin }).on("line", (line) => {
const { id, method, params } = JSON.parse(line);
if (id === undefined) return;
let result;
switch (method) {
case "initialize":
result = { protocolVersion: 1, agentCapabilities: { loadSession: true }, authMethods: [] };
break;
case "session/new":
case "session/load":
result = { sessionId: "goose-fixture", configOptions: configOptions() };
break;
case "_goose/unstable/providers/list":
result = {
entries: Object.entries(inventory).map(([providerId, entry]) => ({
providerId,
providerName: entry.name,
configured: providerId !== "anthropic",
models: [{ id: entry.model, name: entry.model }],
})),
};
break;
case "_goose/unstable/config/read":
result = {
value: params.key === "GOOSE_PROVIDER" ? "openrouter" : inventory.openrouter.model,
};
break;
case "session/set_config_option":
if (params.configId === "provider") {
provider = params.value;
model = inventory[provider === "goose" ? "openrouter" : provider].model;
} else if (params.configId === "model") {
if (params.value !== inventory[provider === "goose" ? "openrouter" : provider].model) {
send({ id, error: { code: -32602, message: "Model unavailable for selected provider" } });
return;
}
model = params.value;
}
result = { configOptions: configOptions() };
break;
case "session/prompt":
send({
method: "session/update",
params: {
sessionId: params.sessionId,
update: {
sessionUpdate: "agent_message_chunk",
content: { type: "text", text: `${provider}/${model}` },
},
},
});
result = { stopReason: "end_turn" };
break;
case "session/close":
result = {};
break;
default:
send({ id, error: { code: -32601, message: "Method not found" } });
return;
}
send({ id, result });
});
@@ -519,3 +519,60 @@ test("a provider update outlives the client that started it and a new client rea
await daemon.close();
}
}, 60000);
test("bundled goose lists configured providers and switches models across providers", async () => {
const root = await mkdtemp(path.join(os.tmpdir(), "paseo-goose-models-"));
const daemon = await createTestPaseoDaemon({
paseoHomeRoot: root,
cleanup: false,
mcpEnabled: false,
builtinPlugins: new BuiltinPluginLoader(undefined, ["goose-provider"]),
});
const client = new DaemonClient({
url: `ws://127.0.0.1:${daemon.port}/ws`,
appVersion: "0.16.0",
});
const openRouterModel = "openrouter/anthropic/claude-sonnet-4.5";
const openAiModel = "openai/gpt-4o";
try {
await client.connect();
await client.fetchAgents({ subscribe: {} });
expect(client.getLastServerInfoMessage()?.features?.gooseProvider).toBe(true);
expect(
(await client.getProvidersSnapshot()).entries.some((entry) => entry.provider === "goose"),
).toBe(false);
await client.patchDaemonConfig({
providers: {
goose: {
enabled: true,
command: [process.execPath, path.resolve(import.meta.dirname, "goose-fixture.cjs")],
},
},
});
const catalog = await client.listProviderModels("goose", { cwd: root });
expect(catalog.error).toBeNull();
expect(catalog.models.map((model) => [model.id, model.isDefault === true])).toEqual([
[openRouterModel, true],
[openAiModel, false],
]);
const agent = await client.createAgent({ provider: "goose", cwd: root, model: openAiModel });
await client.sendMessage(agent.id, "Which provider and model are you running?");
expect((await client.waitForFinish(agent.id, 10_000)).status).toBe("idle");
await client.setAgentModel(agent.id, openRouterModel);
await client.sendMessage(agent.id, "Which provider and model are you running now?");
expect((await client.waitForFinish(agent.id, 10_000)).status).toBe("idle");
expect((await client.fetchAgent(agent.id))?.agent.model).toBe(openRouterModel);
const timeline = await client.fetchAgentTimeline(agent.id, { limit: 100 });
expect(
timeline.entries.flatMap(({ item }) =>
item.type === "assistant_message" ? [item.text] : [],
),
).toEqual([openAiModel, openRouterModel]);
} finally {
await client.close();
await daemon.close();
await rm(root, { recursive: true, force: true });
}
}, 60_000);
@@ -1089,3 +1089,31 @@ describe("speech provider config normalization", () => {
}
});
});
test.each([
["goose", "acp"],
["/opt/bin/goose", "acp"],
])(
"migrates the legacy goose entry and preserves command overrides (%s %s)",
(binary, subcommand) => {
const command = [binary, subcommand];
const overrides = {
enabled: false,
label: "My goose",
env: { GOOSE_PROVIDER: "openai" },
models: [{ id: "primary", label: "Primary" }],
additionalModels: [{ id: "secondary", label: "Secondary" }],
};
const parsed = PersistedConfigSchema.parse({
agents: {
providers: {
goose: { ...overrides, extends: "acp", description: "Old description", command },
},
},
});
expect(parsed.agents?.providers?.goose).toEqual({
...overrides,
...(command[0] === "goose" ? {} : { command }),
});
},
);
+21 -5
View File
@@ -199,16 +199,32 @@ function isLegacyProviderEntry(value: unknown): boolean {
}
function normalizeAgentProviders(value: unknown): unknown {
if (!value || typeof value !== "object" || Array.isArray(value)) {
return value;
if (!isConfigRecord(value)) return value;
let rawProviders = value;
const goose = configRecord(value.goose);
// COMPAT(gooseProvider): added in v0.17.0, remove after 2027-05-20 once legacy configs have migrated.
if (goose?.extends === "acp") {
const { extends: _base, description: _description, command, ...overrides } = goose;
const usesDefaultCommand =
Array.isArray(command) &&
command.length === 2 &&
command[0] === "goose" &&
command[1] === "acp";
rawProviders = {
...value,
goose: {
...overrides,
...(command !== undefined && !usesDefaultCommand ? { command } : {}),
},
};
}
const rawProviders = value as Record<string, unknown>;
const hasLegacyEntries = Object.values(rawProviders).some((entry) =>
isLegacyProviderEntry(entry),
);
if (!hasLegacyEntries) {
return value;
return rawProviders;
}
const legacyEntries: Record<string, unknown> = {};
@@ -224,7 +240,7 @@ function normalizeAgentProviders(value: unknown): unknown {
const parsedLegacyEntries = AgentProviderRuntimeSettingsMapSchema.safeParse(legacyEntries);
if (!parsedLegacyEntries.success) {
return value;
return rawProviders;
}
return {
@@ -9,6 +9,7 @@ export const builtinPlugins = [
"copilot-usage-source",
"cursor-usage-source",
"fx-provider",
"goose-provider",
"grok-usage-source",
"hoplite-provider",
"kimi-usage-source",
@@ -2214,6 +2214,8 @@ export class VoiceAssistantWebSocketServer {
hopliteProvider: this.providerSnapshotManager.supportsConfigRequiredProvider("hoplite"),
// COMPAT(fxProvider): added after v0.15.3, remove after 2027-05-09 once host floor includes the bundled adapter.
fxProvider: this.providerSnapshotManager.supportsConfigRequiredProvider("fx"),
// COMPAT(gooseProvider): added in v0.17.0, remove after 2027-05-20 once host floor includes the bundled adapter.
gooseProvider: this.providerSnapshotManager.supportsConfigRequiredProvider("goose"),
// COMPAT(importSessionWorkspaceTarget): added in v0.1.110, remove gate after 2027-01-16.
importSessionWorkspaceTarget: true,
// COMPAT(importSessionSearch): added in v0.7.3, remove gate after 2027-03-02.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

@@ -89,6 +89,7 @@ import {
PiIcon,
} from "~/components/agent-icons";
import { DiscordIcon, GitHubIcon, SlackIcon } from "~/components/brand-icons";
import { PaseoHubMark } from "~/components/paseo-brand";
import {
MobileChat,
MobileDiff,
@@ -515,6 +516,7 @@ function TurnkeySection() {
description={t("landing.runAnywhere.teamsDescription")}
ctaHref={localize("/hub")}
ctaLabel={t("landing.runAnywhere.teamsCta")}
ctaIcon={PASEO_HUB_CTA_ICON}
showIntegrationIcons
/>
</div>
@@ -523,12 +525,15 @@ function TurnkeySection() {
);
}
const PASEO_HUB_CTA_ICON = <PaseoHubMark className="h-4 w-4 shrink-0" />;
function TurnkeyExtensionCard({
icon: Icon,
title,
description,
ctaHref,
ctaLabel,
ctaIcon,
showIntegrationIcons = false,
}: {
icon: LucideIcon;
@@ -536,6 +541,7 @@ function TurnkeyExtensionCard({
description: string;
ctaHref: string;
ctaLabel: string;
ctaIcon?: React.ReactNode;
showIntegrationIcons?: boolean;
}) {
return (
@@ -545,6 +551,7 @@ function TurnkeyExtensionCard({
href={ctaHref}
className="inline-flex items-center gap-1.5 rounded-full bg-foreground px-2.5 py-1.5 text-xs text-background transition-colors hover:bg-foreground/90"
>
{ctaIcon}
{ctaLabel}
<ArrowRight className="h-3.5 w-3.5" />
</a>
@@ -1,21 +1,11 @@
// Exact SVG paths from packages/app/src/components/icons/
import { OpenCodeIcon as OpenCodeBrandIcon, PiIcon as PiBrandIcon } from "../agent-icons";
import { PaseoMark as CanonicalPaseoMark } from "../paseo-brand";
/** The Paseo brand swirl — public/logo.svg, drawn as a small sidebar avatar mark. */
/** The Paseo butterfly mark, drawn as a small sidebar avatar or tool-call mark. */
export function PaseoMark({ size = 13, className }: { size?: number; className?: string }) {
return (
<svg
width={size}
height={size}
viewBox="0 0 700 700"
fill="currentColor"
aria-hidden="true"
className={className}
>
<path d="M291.495 91.399C333.897 104.892 379.155 135.075 416.229 173.191C453.389 211.394 484.429 259.725 495.708 311.251C497.555 319.693 498.865 328.216 499.586 336.776C509.755 326.554 519.867 317.815 529.89 311.547C540.647 304.821 553.808 299.297 568.641 299.785C584.29 300.299 597.395 307.326 607.747 317.632C632.173 341.947 629.612 372.898 619.872 397.936C610.185 422.833 591.557 447.826 572.732 469.124C553.591 490.78 532.713 510.308 516.779 524.318C508.775 531.355 501.936 537.073 497.07 541.052C494.635 543.043 492.689 544.603 491.334 545.679C490.657 546.217 490.126 546.635 489.756 546.926C489.571 547.071 489.425 547.184 489.321 547.265C489.269 547.305 489.227 547.338 489.196 547.362C489.181 547.374 489.168 547.385 489.157 547.393C489.153 547.397 489.147 547.401 489.144 547.403C489.134 547.4 488.837 547.06 473.001 528.499L489.135 547.411C478.157 555.911 462.033 554.334 453.122 543.89C444.213 533.448 445.887 518.094 456.861 509.592C456.863 509.591 456.865 509.588 456.869 509.586C456.88 509.577 456.902 509.561 456.933 509.536C456.997 509.487 457.101 509.404 457.245 509.292C457.533 509.066 457.979 508.715 458.569 508.247C459.749 507.31 461.506 505.901 463.742 504.073C468.216 500.414 474.589 495.088 482.073 488.508C497.114 475.284 516.315 457.282 533.578 437.75C551.157 417.862 565.26 398.01 571.859 381.048C578.403 364.227 575.681 356.302 570.724 351.367C568.928 349.579 567.744 348.902 567.267 348.676C566.888 348.496 566.811 348.52 566.804 348.52C566.605 348.513 563.971 348.537 557.953 352.3C545.161 360.299 528.815 377.492 506.807 403.867C494.927 418.106 481.871 434.435 467.547 451.957C463.709 457.28 459.503 462.538 454.91 467.717L454.702 467.549C420.808 508.347 380.37 553.856 332.335 593.848C301.853 619.226 262.656 622.597 228.642 614.743C194.834 606.936 162.658 587.448 142.217 561.686C108.054 518.631 100.57 469.801 108.223 427.836C115.56 387.606 137.391 351.005 166.502 331.557C161.248 315.813 156.813 299.49 153.519 283.013C142.593 228.368 143.239 167.031 174.28 119.619C186.922 100.31 205.846 89.1535 227.387 85.2773C248.1 81.5504 270.278 84.648 291.495 91.399ZM378.642 206.356C345.773 172.563 307.463 147.917 275.208 137.654C259.096 132.527 246.171 131.514 236.828 133.195C228.314 134.727 222.227 138.497 217.721 145.38C196.712 177.468 193.858 224.004 203.82 273.827C206.532 287.394 210.127 300.834 214.345 313.817C236.45 310.276 260.156 311.463 281.22 317.11C319.621 327.403 357.501 355.419 357.501 405.654C357.501 435.255 339.111 465.136 307.278 473.815C273.211 483.103 238.854 464.822 213.105 427.541C203.716 413.947 194.443 397.766 185.947 379.89C174.028 392.223 163.08 411.953 158.673 436.118C153.128 466.518 158.514 501.286 183.085 532.253C195.993 548.522 217.742 562.031 240.771 567.349C263.594 572.619 284.147 569.24 298.664 557.154C349.383 514.927 390.709 466.547 426.366 422.952C448.879 390.86 453.195 356.06 445.578 321.265C436.703 280.718 411.425 240.06 378.642 206.356ZM306.296 405.722C306.296 384.769 292.223 370.736 267.284 364.051C256.012 361.03 244.156 360.087 233.095 360.771C240.361 375.935 248.168 389.513 255.897 400.704C275.647 429.298 289.989 427.822 293.247 426.934C298.737 425.437 306.296 418.161 306.296 405.722Z" />
</svg>
);
return <CanonicalPaseoMark width={size} height={size} className={className} />;
}
/** GitHub mark for the toolbar and PR panel. */
@@ -1,25 +1,11 @@
// Small shared bits for the mobile mockups. The Paseo butterfly mark is the
// app icon (packages/website/public/favicon.svg) with the black plate dropped,
// so it can be tinted and placed on any tile. Tile fills are the app's identity
// Small shared bits for the mobile mockups. Tile fills are the app's identity
// palette — packages/app/src/styles/identity-colors.ts — surfaced as
// `--color-mock-tile-*` tokens in styles.css.
const BUTTERFLY_D =
"M291.495 91.399C333.897 104.892 379.155 135.075 416.229 173.191C453.389 211.394 484.429 259.725 495.708 311.251C497.555 319.693 498.865 328.216 499.586 336.776C509.755 326.554 519.867 317.815 529.89 311.547C540.647 304.821 553.808 299.297 568.641 299.785C584.29 300.299 597.395 307.326 607.747 317.632C632.173 341.947 629.612 372.898 619.872 397.936C610.185 422.833 591.557 447.826 572.732 469.124C553.591 490.78 532.713 510.308 516.779 524.318C508.775 531.355 501.936 537.073 497.07 541.052C494.635 543.043 492.689 544.603 491.334 545.679C490.657 546.217 490.126 546.635 489.756 546.926C489.571 547.071 489.425 547.184 489.321 547.265C489.269 547.305 489.227 547.338 489.196 547.362C489.181 547.374 489.168 547.385 489.157 547.393C489.153 547.397 489.147 547.401 489.144 547.403C489.134 547.4 488.837 547.06 473.001 528.499L489.135 547.411C478.157 555.911 462.033 554.334 453.122 543.89C444.213 533.448 445.887 518.094 456.861 509.592C456.863 509.591 456.865 509.588 456.869 509.586C456.88 509.577 456.902 509.561 456.933 509.536C456.997 509.487 457.101 509.404 457.245 509.292C457.533 509.066 457.979 508.715 458.569 508.247C459.749 507.31 461.506 505.901 463.742 504.073C468.216 500.414 474.589 495.088 482.073 488.508C497.114 475.284 516.315 457.282 533.578 437.75C551.157 417.862 565.26 398.01 571.859 381.048C578.403 364.227 575.681 356.302 570.724 351.367C568.928 349.579 567.744 348.902 567.267 348.676C566.888 348.496 566.811 348.52 566.804 348.52C566.605 348.513 563.971 348.537 557.953 352.3C545.161 360.299 528.815 377.492 506.807 403.867C494.927 418.106 481.871 434.435 467.547 451.957C463.709 457.28 459.503 462.538 454.91 467.717L454.702 467.549C420.808 508.347 380.37 553.856 332.335 593.848C301.853 619.226 262.656 622.597 228.642 614.743C194.834 606.936 162.658 587.448 142.217 561.686C108.054 518.631 100.57 469.801 108.223 427.836C115.56 387.606 137.391 351.005 166.502 331.557C161.248 315.813 156.813 299.49 153.519 283.013C142.593 228.368 143.239 167.031 174.28 119.619C186.922 100.31 205.846 89.1535 227.387 85.2773C248.1 81.5504 270.278 84.648 291.495 91.399ZM378.642 206.356C345.773 172.563 307.463 147.917 275.208 137.654C259.096 132.527 246.171 131.514 236.828 133.195C228.314 134.727 222.227 138.497 217.721 145.38C196.712 177.468 193.858 224.004 203.82 273.827C206.532 287.394 210.127 300.834 214.345 313.817C236.45 310.276 260.156 311.463 281.22 317.11C319.621 327.403 357.501 355.419 357.501 405.654C357.501 435.255 339.111 465.136 307.278 473.815C273.211 483.103 238.854 464.822 213.105 427.541C203.716 413.947 194.443 397.766 185.947 379.89C174.028 392.223 163.08 411.953 158.673 436.118C153.128 466.518 158.514 501.286 183.085 532.253C195.993 548.522 217.742 562.031 240.771 567.349C263.594 572.619 284.147 569.24 298.664 557.154C349.383 514.927 390.709 466.547 426.366 422.952C448.879 390.86 453.195 356.06 445.578 321.265C436.703 280.718 411.425 240.06 378.642 206.356ZM306.296 405.722C306.296 384.769 292.223 370.736 267.284 364.051C256.012 361.03 244.156 360.087 233.095 360.771C240.361 375.935 248.168 389.513 255.897 400.704C275.647 429.298 289.989 427.822 293.247 426.934C298.737 425.437 306.296 418.161 306.296 405.722Z";
import { PaseoMark as CanonicalPaseoMark } from "../../paseo-brand";
export function PaseoMark({ size = 20, className }: { size?: number; className?: string }) {
return (
<svg
width={size}
height={size}
viewBox="0 0 700 700"
fill="currentColor"
className={className}
aria-hidden="true"
>
<path transform="translate(350,350) scale(1.05) translate(-350,-350)" d={BUTTERFLY_D} />
</svg>
);
return <CanonicalPaseoMark width={size} height={size} className={className} />;
}
/** A hashed identity tile — one letter on a muted identity fill. */
@@ -0,0 +1,74 @@
import { readFileSync } from "node:fs";
import path from "node:path";
import { renderToStaticMarkup } from "react-dom/server";
import { describe, expect, it } from "vitest";
import { HubLockup, PaseoHubLockup, PaseoHubMark, PaseoLockup, PaseoMark } from "./paseo-brand";
const REPO_ROOT = path.resolve(import.meta.dirname, "../../../..");
const BRAND_ROOT = path.join(REPO_ROOT, "assets/brand");
const WEBSITE_PUBLIC = path.join(REPO_ROOT, "packages/website/public");
function extractPathData(svg: string): string[] {
return [...svg.matchAll(/\bd="([^"]+)"/g)].map((m) => m[1]);
}
describe("paseo brand assets", () => {
it("renders canonical Paseo and Paseo Hub marks with currentColor", () => {
const paseoHtml = renderToStaticMarkup(<PaseoMark className="h-6 w-6" />);
const hubHtml = renderToStaticMarkup(<PaseoHubMark className="h-6 w-6" />);
const canonicalPaseo = readFileSync(path.join(BRAND_ROOT, "marks/paseo-white.svg"), "utf8");
const canonicalHub = readFileSync(path.join(BRAND_ROOT, "marks/paseo-hub-white.svg"), "utf8");
expect(paseoHtml).toContain('viewBox="0 0 700 700"');
expect(paseoHtml).toContain('stroke="currentColor"');
expect(paseoHtml).toContain('stroke-width="50"');
expect(extractPathData(paseoHtml)).toEqual(extractPathData(canonicalPaseo));
expect(hubHtml).toContain('viewBox="0 0 700 700"');
expect(hubHtml).toContain('stroke="currentColor"');
expect(hubHtml).toContain('stroke-width="50"');
expect(extractPathData(hubHtml)).toEqual(extractPathData(canonicalHub));
});
it("renders canonical Paseo, Paseo Hub, and Hub lockups at shared 144-unit height", () => {
const cases = [
{ Component: PaseoLockup, file: "lockups/paseo-white.svg", width: 580 },
{ Component: PaseoHubLockup, file: "lockups/paseo-hub-white.svg", width: 842 },
{ Component: HubLockup, file: "lockups/hub-white.svg", width: 461 },
];
for (const { Component, file, width } of cases) {
const html = renderToStaticMarkup(<Component className="h-6 w-auto" />);
const canonical = readFileSync(path.join(BRAND_ROOT, file), "utf8");
expect(html).toContain(`viewBox="0 0 ${width} 144"`);
expect(html).toContain(`width="${width}"`);
expect(html).toContain('height="144"');
expect(html).toContain('stroke="currentColor"');
expect(html).toContain('fill="currentColor"');
expect(extractPathData(html)).toEqual(extractPathData(canonical));
}
});
it("keeps public/logo.svg and public/favicon.svg aligned with assets/brand", () => {
const canonicalPaseo = readFileSync(path.join(BRAND_ROOT, "marks/paseo-white.svg"), "utf8");
const publicLogo = readFileSync(path.join(WEBSITE_PUBLIC, "logo.svg"), "utf8");
const publicFavicon = readFileSync(path.join(WEBSITE_PUBLIC, "favicon.svg"), "utf8");
expect(publicLogo).toBe(canonicalPaseo);
expect(publicFavicon).toContain('<rect width="700" height="700" rx="156" fill="#000000"');
expect(extractPathData(publicFavicon)).toEqual(extractPathData(canonicalPaseo));
});
it("ships a multi-size favicon.ico with 48, 32, and 16px entries", () => {
const ico = readFileSync(path.join(WEBSITE_PUBLIC, "favicon.ico"));
expect(ico.readUInt16LE(0)).toBe(0);
expect(ico.readUInt16LE(2)).toBe(1);
const count = ico.readUInt16LE(4);
const sizes: number[] = [];
for (let i = 0; i < count; i += 1) {
sizes.push(ico[6 + i * 16] || 256);
}
expect(sizes).toEqual([48, 32, 16]);
});
});
@@ -0,0 +1,154 @@
// Canonical Paseo and Paseo Hub brand marks and lockups, sourced directly from
// `assets/brand/` (see `assets/brand/README.md`).
import type * as React from "react";
import hubLockupSvg from "../../../../assets/brand/lockups/hub-white.svg?raw";
import paseoHubLockupSvg from "../../../../assets/brand/lockups/paseo-hub-white.svg?raw";
import paseoLockupSvg from "../../../../assets/brand/lockups/paseo-white.svg?raw";
import paseoHubMarkSvg from "../../../../assets/brand/marks/paseo-hub-white.svg?raw";
import paseoMarkSvg from "../../../../assets/brand/marks/paseo-white.svg?raw";
interface ParsedMark {
width: number;
height: number;
viewBox: string;
path: string;
strokeWidth: number;
}
interface ParsedLockup extends ParsedMark {
wordmarkPath: string;
}
function readAttr(tag: string, name: string, source: string): string {
const match = tag.match(new RegExp(`${name}="([^"]+)"`));
if (!match) {
throw new Error(`Missing ${name} attribute in canonical brand SVG (${source})`);
}
return match[1];
}
function parseSvgHeader(svg: string, source: string) {
const svgTag = svg.match(/<svg\b[^>]*>/)?.[0];
if (!svgTag) {
throw new Error(`Missing <svg> root in canonical brand SVG (${source})`);
}
const paths = [...svg.matchAll(/<path\b[^>]*\/?>/g)].map((m) => m[0]);
return {
width: Number(readAttr(svgTag, "width", source)),
height: Number(readAttr(svgTag, "height", source)),
viewBox: readAttr(svgTag, "viewBox", source),
paths,
};
}
function parseMark(svg: string, source: string): ParsedMark {
const { width, height, viewBox, paths } = parseSvgHeader(svg, source);
if (paths.length !== 1) {
throw new Error(`Expected 1 path in brand mark SVG (${source}), found ${paths.length}`);
}
return {
width,
height,
viewBox,
path: readAttr(paths[0], "d", source),
strokeWidth: Number(readAttr(paths[0], "stroke-width", source)),
};
}
function parseLockup(svg: string, source: string): ParsedLockup {
const { width, height, viewBox, paths } = parseSvgHeader(svg, source);
if (paths.length !== 2) {
throw new Error(`Expected 2 paths in brand lockup SVG (${source}), found ${paths.length}`);
}
return {
width,
height,
viewBox,
path: readAttr(paths[0], "d", source),
strokeWidth: Number(readAttr(paths[0], "stroke-width", source)),
wordmarkPath: readAttr(paths[1], "d", source),
};
}
const PASEO_MARK = parseMark(paseoMarkSvg, "marks/paseo-white.svg");
const PASEO_HUB_MARK = parseMark(paseoHubMarkSvg, "marks/paseo-hub-white.svg");
const PASEO_LOCKUP = parseLockup(paseoLockupSvg, "lockups/paseo-white.svg");
const PASEO_HUB_LOCKUP = parseLockup(paseoHubLockupSvg, "lockups/paseo-hub-white.svg");
const HUB_LOCKUP = parseLockup(hubLockupSvg, "lockups/hub-white.svg");
function BrandMark({ asset, props }: { asset: ParsedMark; props: React.SVGProps<SVGSVGElement> }) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width={asset.width}
height={asset.height}
viewBox={asset.viewBox}
fill="none"
aria-hidden="true"
{...props}
>
<path
d={asset.path}
stroke="currentColor"
strokeWidth={asset.strokeWidth}
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
);
}
function BrandLockup({
asset,
props,
}: {
asset: ParsedLockup;
props: React.SVGProps<SVGSVGElement>;
}) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width={asset.width}
height={asset.height}
viewBox={asset.viewBox}
fill="none"
aria-hidden="true"
{...props}
>
<path
d={asset.path}
stroke="currentColor"
strokeWidth={asset.strokeWidth}
strokeLinecap="round"
strokeLinejoin="round"
/>
<path d={asset.wordmarkPath} fill="currentColor" />
</svg>
);
}
/** Canonical Paseo butterfly mark (700x700 viewBox, stroked with currentColor). */
export function PaseoMark(props: React.SVGProps<SVGSVGElement>) {
return <BrandMark asset={PASEO_MARK} props={props} />;
}
/** Canonical Paseo Hub five-petal flower mark (700x700 viewBox, stroked with currentColor). */
export function PaseoHubMark(props: React.SVGProps<SVGSVGElement>) {
return <BrandMark asset={PASEO_HUB_MARK} props={props} />;
}
/** Canonical Paseo lockup (butterfly mark at 94% optical scale + Plus Jakarta Sans SemiBold). */
export function PaseoLockup(props: React.SVGProps<SVGSVGElement>) {
return <BrandLockup asset={PASEO_LOCKUP} props={props} />;
}
/** Canonical Paseo Hub lockup (flower mark + Plus Jakarta Sans SemiBold). */
export function PaseoHubLockup(props: React.SVGProps<SVGSVGElement>) {
return <BrandLockup asset={PASEO_HUB_LOCKUP} props={props} />;
}
/** Canonical Hub lockup (flower mark + "Hub"), used where Paseo is already on screen. */
export function HubLockup(props: React.SVGProps<SVGSVGElement>) {
return <BrandLockup asset={HUB_LOCKUP} props={props} />;
}
@@ -3,6 +3,7 @@ import { PLUGINS_LINKED } from "~/plugins/launch";
import "~/styles.css";
import { DiscordIcon, GitHubIcon } from "~/components/brand-icons";
import { LanguageSelector } from "~/components/language-selector";
import { PaseoLockup } from "~/components/paseo-brand";
import { useLocalizePath } from "~/i18n";
import { useStars } from "~/routes/__root";
@@ -14,9 +15,12 @@ export function SiteHeader() {
const { stars } = useStars();
return (
<header className="flex flex-col items-center gap-4 md:flex-row md:justify-between">
<a href={localize("/")} className="flex items-center gap-3">
<img src="/logo.svg" alt="Paseo" className="w-6 h-6" />
<span className="text-lg font-medium">Paseo</span>
<a
href={localize("/")}
aria-label="Paseo"
className="inline-flex items-center text-foreground"
>
<PaseoLockup className="h-[22px] w-auto" />
</a>
<div className="flex flex-wrap items-center justify-center gap-4">
{PLUGINS_LINKED && (
@@ -9,6 +9,7 @@ import { useTranslation } from "react-i18next";
import { buildDocsNavTree, getDoc, getDocs } from "~/docs";
import { splitLocalePath, useLocale, useLocalizePath } from "~/i18n";
import { LanguageSelector } from "~/components/language-selector";
import { PaseoLockup } from "~/components/paseo-brand";
import "~/styles.css";
export const Route = createFileRoute("/{-$locale}/docs")({
@@ -35,9 +36,12 @@ function DocsLayout() {
{/* Mobile header */}
<header className="lg:hidden sticky top-0 z-50 bg-background border-b border-border">
<div className="flex items-center justify-between p-4">
<Link to={localize("/")} className="flex items-center gap-3">
<img src="/logo.svg" alt="Paseo" className="w-6 h-6" />
<span className="text-lg font-medium">Paseo</span>
<Link
to={localize("/")}
aria-label="Paseo"
className="inline-flex items-center text-foreground"
>
<PaseoLockup className="h-[22px] w-auto" />
</Link>
<div className="flex items-center gap-3">
<LanguageSelector />
@@ -63,9 +67,12 @@ function DocsLayout() {
{/* Desktop sidebar */}
<aside className="hidden lg:block sticky top-0 h-screen w-60 shrink-0 border-r border-border p-6 overflow-y-auto">
<div className="flex items-center justify-between gap-3 mb-8">
<Link to={localize("/")} className="flex items-center gap-3">
<img src="/logo.svg" alt="Paseo" className="w-6 h-6" />
<span className="text-lg font-medium">Paseo</span>
<Link
to={localize("/")}
aria-label="Paseo"
className="inline-flex items-center text-foreground"
>
<PaseoLockup className="h-[22px] w-auto" />
</Link>
<LanguageSelector />
</div>
+11 -4
View File
@@ -12,6 +12,7 @@ import {
PiIcon,
} from "~/components/agent-icons";
import { DiscordIcon, GitHubIcon, SlackIcon } from "~/components/brand-icons";
import { HubLockup, PaseoHubLockup, PaseoHubMark } from "~/components/paseo-brand";
import { AGENT_PAGES } from "~/data/agent-pages";
import { FAQItem } from "~/components/faq-item";
import { SiteShell } from "~/components/site-shell";
@@ -63,7 +64,10 @@ function Hub() {
const { plans } = Route.useLoaderData();
return (
<SiteShell width="default">
<h1 className="text-3xl font-medium tracking-tight mb-4">{t("hub.title")}</h1>
<h1 className="mb-5">
<PaseoHubLockup className="h-9 md:h-10 w-auto text-foreground" />
<span className="sr-only">{t("hub.title")}</span>
</h1>
<p className="text-lg text-white/70 leading-relaxed max-w-2xl">{t("hub.intro")}</p>
<p className="text-white/40 text-sm mt-3">{t("hub.runIt")}</p>
@@ -379,7 +383,7 @@ function DemoMessage({
<div className="flex gap-3">
<div className="flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full border border-white/10 bg-white/[0.06]">
{bot ? (
<img src="/logo.svg" alt="" className="h-4 w-4" />
<PaseoHubMark className="h-5 w-5 text-white" />
) : (
<span className="text-xs font-medium text-white/60">M</span>
)}
@@ -478,8 +482,11 @@ function Shape() {
<Connector label={t("hub.shape.webhooks")} />
<div className="w-full max-w-xs rounded-xl border border-white/20 bg-white/[0.06] px-6 py-5 text-center">
<p className="font-medium">{t("hub.shape.hub")}</p>
<p className="text-xs text-muted-foreground mt-1">{t("hub.shape.hubHosting")}</p>
<p className="flex justify-center">
<HubLockup className="h-[22px] w-auto text-foreground" />
<span className="sr-only">{t("hub.shape.hub")}</span>
</p>
<p className="text-xs text-muted-foreground mt-1.5">{t("hub.shape.hubHosting")}</p>
</div>
<Connector label={t("hub.shape.sameRpcs")} />
+5
View File
@@ -2,3 +2,8 @@ declare module "*.md?raw" {
const content: string;
export default content;
}
declare module "*.svg?raw" {
const content: string;
export default content;
}
@@ -65,9 +65,46 @@ it("discovers the resolved account and maps the CLI's quota buckets", async () =
expect(await source.fetch(accounts[0]!.input)).toMatchObject({
status: "available",
windows: [
{ id: "gemini-5h", usedPct: 75, remainingPct: 25, resetsAt: "2026-11-19T14:25:08Z" },
{ id: "gemini-weekly", usedPct: expect.closeTo(30), summary: true },
{ id: "disabled", usedPct: null, remainingPct: null },
{
id: "gemini-5h",
shortLabel: "5h",
usedPct: 75,
remainingPct: 25,
resetsAt: "2026-11-19T14:25:08Z",
},
{ id: "gemini-weekly", shortLabel: "wk", usedPct: expect.closeTo(30), summary: true },
{ id: "disabled", shortLabel: "wk", usedPct: null, remainingPct: null },
],
});
});
it("uses compact group and period shorthands when multiple groups are reported", async () => {
const directory = await mkdtemp(path.join(tmpdir(), "paseo-antigravity-usage-"));
directories.push(directory);
const cli = path.join(directory, "cli.cjs");
await writeFile(
cli,
`
console.log(JSON.stringify({ status: 'SUCCESS', command: { name: 'usage', data: { groups: [
{ name: 'Gemini Models', buckets: [
{ id: 'gemini-weekly', name: 'Weekly Limit Remaining', window: 'weekly', remaining_fraction: 0.9 },
{ id: 'gemini-5h', name: 'Five Hour Limit Remaining', window: '5h', remaining_fraction: 0.8 }
] },
{ name: 'Claude and GPT models', buckets: [
{ id: '3p-weekly', name: 'Weekly Limit Remaining', window: 'weekly', remaining_fraction: 1 }
] }
] } } }));
`,
);
const launch = { command: process.execPath, args: [cli, "acp"], env: { HOME: directory } };
const source = new Usage().registration();
const [account] = await source.discover({ kind: "global", launch });
expect(await source.fetch(account!.input)).toMatchObject({
status: "available",
windows: [
{ id: "gemini-weekly", shortLabel: "Gemini wk" },
{ id: "gemini-5h", shortLabel: "Gemini 5h" },
{ id: "3p-weekly", shortLabel: "Claude and GPT wk" },
],
});
});
+26 -2
View File
@@ -48,6 +48,28 @@ function accountKey(env: ProviderLaunch["env"]): string {
);
}
function shortWindow(window: string): string {
const trimmed = window.trim();
const normalized = trimmed.toLowerCase();
if (normalized === "weekly") return "wk";
if (normalized === "monthly") return "mo";
return trimmed;
}
function shortGroupName(name: string): string {
return name
.trim()
.replace(/\s+models$/i, "")
.trim();
}
function formatShortLabel(groupName: string, window: string, includeGroup: boolean): string {
const period = shortWindow(window);
if (!includeGroup) return period;
const scope = shortGroupName(groupName);
return scope ? `${scope} ${period}` : period;
}
export class Usage {
private readonly launches = new Map<string, ProviderLaunch>();
@@ -94,7 +116,9 @@ export class Usage {
throw new Error(data.error || data.response || `agy usage returned ${data.status}`);
}
if (!data.command) throw new Error("agy did not return usage data");
const windows = data.command.data.groups.flatMap((group) =>
const groups = data.command.data.groups;
const includeGroup = groups.length > 1;
const windows = groups.flatMap((group) =>
group.buckets.flatMap((bucket) => {
if (!bucket.disabled && bucket.remaining_fraction == null) return [];
const used = bucket.disabled ? null : (1 - bucket.remaining_fraction!) * 100;
@@ -102,7 +126,7 @@ export class Usage {
windowFromUsedPct({
id: bucket.id,
label: `${group.name} · ${bucket.name}${bucket.disabled ? " · Disabled" : ""}`,
shortLabel: `${group.name} ${bucket.window}`,
shortLabel: formatShortLabel(group.name, bucket.window, includeGroup),
summary: !bucket.disabled && bucket.window === "weekly",
utilizationPct: used,
resetsAt: bucket.disabled ? null : bucket.reset_time,
+3
View File
@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24">
<path fill="currentColor" d="M20.9093 19.3861L19.5185 18.2413C18.7624 17.619 18.1189 16.8713 17.6157 16.0313C16.9205 14.8706 15.9599 13.8912 14.8133 13.1735L14.2533 12.8475C14.0614 12.7141 13.9276 12.5062 13.9086 12.2716C13.8963 12.1204 13.9326 11.9852 14.0171 11.8662C14.3087 11.4553 15.896 9.74698 16.1722 9.51845C16.528 9.22442 16.9243 8.97987 17.2921 8.69986C17.3443 8.66 17.3968 8.62035 17.4485 8.57989C17.4503 8.57808 17.4529 8.57668 17.4545 8.57508C17.5725 8.48195 17.6838 8.383 17.7724 8.26563C18.2036 7.76631 18.195 7.3443 18.195 7.3443C18.195 7.3443 18.1954 7.3439 18.1956 7.3437C18.1497 7.23133 17.9847 6.88163 17.6492 6.71759C17.9458 6.71178 18.2805 6.82294 18.4323 6.97156C18.6148 6.68534 18.7328 6.49967 18.9162 6.18762C18.9599 6.11352 18.9831 5.97652 18.8996 5.89981C18.8996 5.89981 18.8992 5.89981 18.8988 5.89981C18.8988 5.89981 18.8988 5.8994 18.8988 5.899C18.8972 5.8974 18.8952 5.8962 18.8936 5.8946C18.892 5.893 18.891 5.89119 18.8892 5.88939C18.8892 5.88939 18.8888 5.88939 18.8884 5.88939C18.8884 5.88939 18.8884 5.88899 18.8884 5.88859C18.885 5.88518 18.8812 5.88258 18.8776 5.87938C18.8754 5.87717 18.8736 5.87457 18.8716 5.87217C18.8692 5.87016 18.8665 5.86836 18.8643 5.86616C18.8609 5.86275 18.8587 5.85855 18.8551 5.85534C18.8551 5.85534 18.8545 5.85514 18.8543 5.85534C18.8543 5.85534 18.8543 5.85494 18.8543 5.85454C18.8527 5.85294 18.8507 5.85174 18.8491 5.85013C18.8475 5.84853 18.8463 5.84653 18.8447 5.84493C18.8447 5.84493 18.8441 5.84473 18.8439 5.84493C18.8439 5.84493 18.8439 5.84453 18.8439 5.84413C18.7672 5.7606 18.6302 5.78384 18.5561 5.8275C18.1503 6.06625 17.7555 6.32322 17.3996 6.54855C17.3996 6.54855 16.9778 6.53973 16.4783 6.97116C16.3607 7.05989 16.2618 7.17125 16.1688 7.28902C16.167 7.29082 16.1654 7.29322 16.164 7.29503C16.1234 7.3465 16.0837 7.39898 16.0441 7.45145C15.7639 7.81939 15.5195 8.21556 15.2255 8.57128C14.9971 8.84768 13.2887 10.4348 12.8777 10.7264C12.7587 10.8109 12.6237 10.8474 12.4723 10.835C12.2379 10.8161 12.0298 10.6821 11.8965 10.4903L11.5704 9.93024C10.8527 8.78318 9.87332 7.82299 8.71264 7.12778C7.87262 6.62466 7.12514 5.98092 6.50264 5.22503L5.35778 3.83421C5.3013 3.76571 5.19314 3.77693 5.15268 3.85585C5.02249 4.10941 4.77393 4.64479 4.58346 5.36483C4.57885 5.38186 4.58286 5.39988 4.59407 5.4135C4.83082 5.69952 5.37901 6.32983 6.03196 6.863C6.07742 6.90005 6.04017 6.97336 5.98369 6.95774C5.42047 6.80432 4.87288 6.55796 4.46308 6.34805C4.42964 6.33103 4.38918 6.35226 4.38437 6.38951C4.32068 6.89985 4.30425 7.46027 4.37155 8.05112C4.37355 8.07035 4.38577 8.08697 4.4036 8.09479C4.87088 8.29808 5.61816 8.59311 6.40269 8.78078C6.45958 8.7944 6.45777 8.87632 6.40029 8.88733C5.78941 9.0023 5.14968 9.02794 4.62973 9.02113C4.59327 9.02073 4.56643 9.05518 4.57625 9.09023C4.6806 9.45896 4.822 9.8339 5.00847 10.2115C5.08559 10.3811 5.16951 10.5475 5.25944 10.7104C5.27486 10.7382 5.3047 10.7548 5.33655 10.7534C5.76577 10.7324 6.28452 10.6871 6.80608 10.595C6.89501 10.5794 6.94268 10.6964 6.86757 10.7466C6.51345 10.9834 6.13571 11.1873 5.7844 11.3551C5.73733 11.3777 5.72211 11.4378 5.75315 11.4797C5.96186 11.7625 6.19139 12.0301 6.44075 12.2794C6.44075 12.2794 7.66853 13.5441 7.70198 13.6432C8.41841 12.9096 9.59612 12.0964 10.8966 11.3864C9.15488 12.8036 8.18387 13.8499 7.69517 14.4444L7.35447 14.9225C7.17742 15.1708 7.02379 15.4346 6.89541 15.7112C6.46579 16.6356 5.75756 18.5051 5.75756 18.5051C5.70328 18.6515 5.74754 18.7959 5.84168 18.89C5.84388 18.8922 5.84609 18.8944 5.84849 18.8964C5.85069 18.8986 5.8527 18.901 5.8549 18.9032C5.94924 18.9976 6.09345 19.0416 6.23986 18.9874C6.23986 18.9874 8.10897 18.2791 9.03371 17.8495C9.31031 17.7211 9.57429 17.5673 9.82245 17.3905L10.349 17.0153C10.6278 16.8166 11.0096 16.8483 11.2517 17.0904L12.4655 18.3042C12.7148 18.5535 12.9824 18.7831 13.2652 18.9918C13.3073 19.0226 13.3672 19.0076 13.3898 18.9605C13.5579 18.6094 13.7618 18.2313 13.9983 17.8774C14.0486 17.8022 14.1657 17.8501 14.1499 17.9388C14.0576 18.4606 14.0127 18.9794 13.9915 19.4084C13.9899 19.44 14.0067 19.4701 14.0345 19.4855C14.1972 19.5756 14.3636 19.6595 14.5335 19.7364C14.911 19.9229 15.2862 20.0645 15.6547 20.1687C15.6897 20.1785 15.7242 20.1516 15.7238 20.1152C15.7168 19.595 15.7424 18.9553 15.8576 18.3446C15.8684 18.2869 15.9503 18.2851 15.9641 18.3422C16.1516 19.127 16.4466 19.8742 16.6501 20.3413C16.6579 20.3591 16.6744 20.3712 16.6938 20.3734C17.2847 20.4407 17.8451 20.4242 18.3554 20.3606C18.3929 20.3559 18.4141 20.3155 18.3969 20.2818C18.187 19.872 17.9406 19.3241 17.7872 18.7612C17.7718 18.7046 17.8449 18.6675 17.8819 18.713C18.4151 19.3659 19.0454 19.9141 19.3314 20.1508C19.345 20.1621 19.3633 20.1659 19.3801 20.1615C20.1003 19.9712 20.6357 19.7226 20.8891 19.5922C20.968 19.5518 20.9792 19.4436 20.9107 19.3871L20.9093 19.3861Z"/>
</svg>

After

Width:  |  Height:  |  Size: 4.8 KiB

+7
View File
@@ -0,0 +1,7 @@
import type { PluginServerContext } from "@getpaseo/plugin/server";
import { createGooseProvider } from "./server/provider.js";
export default function contribute(server: PluginServerContext) {
server.registerProvider(createGooseProvider());
return () => {};
}
+1
View File
@@ -0,0 +1 @@
{ "id": "goose-provider", "requirements": { "paseo": ">=0.17.0" } }
@@ -0,0 +1,135 @@
import type { AcpConfigureContext, AcpRequest } from "@getpaseo/plugin/server/acp";
import type { ProviderCatalog, ProviderConfigState } from "@getpaseo/plugin/server/provider";
import { describe, expect, it } from "vitest";
import { gooseModels } from "./models.js";
const routerModel = "anthropic/claude-sonnet-4.5";
const baseCatalog: ProviderCatalog = {
models: [{ id: routerModel, label: "Sonnet" }],
modes: [],
defaultModel: routerModel,
};
const configuredProviders: AcpRequest = async (method, params) => {
if (method === "_goose/unstable/providers/list") {
expect(params).toEqual({ providerIds: [] });
return {
entries: [
{
providerId: "openrouter",
providerName: "OpenRouter",
configured: true,
models: [{ id: routerModel, name: "Sonnet" }],
},
{
providerId: "openai",
providerName: "OpenAI",
configured: true,
models: [{ id: "gpt-4o", name: "GPT-4o" }],
},
{
providerId: "anthropic",
providerName: "Anthropic",
configured: false,
models: [{ id: "sonnet", name: "Sonnet" }],
},
],
};
}
expect(method).toBe("_goose/unstable/config/read");
if (params && typeof params === "object" && "key" in params) {
if (params.key === "GOOSE_PROVIDER") return { value: "openrouter" };
if (params.key === "GOOSE_MODEL") return { value: routerModel };
}
throw new Error("Unexpected config key");
};
function configContext(request = configuredProviders) {
const writes: Array<[string, unknown]> = [];
const context: AcpConfigureContext = {
sessionId: "goose-session",
request,
config: {
async read() {
return {};
},
async set(id, value) {
writes.push([id, value]);
},
},
catalog: () => baseCatalog,
apply: async () => {},
};
return { context, writes };
}
describe("goose model transformer", () => {
it("lists configured providers and keeps slash-delimited model IDs intact", async () => {
const { context } = configContext();
expect(await gooseModels.discover(baseCatalog, context)).toEqual({
...baseCatalog,
models: [
{ id: `openrouter/${routerModel}`, label: "Sonnet", description: "OpenRouter" },
{ id: "openai/gpt-4o", label: "GPT-4o", description: "OpenAI" },
],
defaultModel: `openrouter/${routerModel}`,
});
});
it("keeps the base catalog when the RPC is unavailable", async () => {
const { context } = configContext(async () => {
throw new Error("Method not found");
});
expect(await gooseModels.discover(baseCatalog, context)).toBe(baseCatalog);
});
it("keeps the base catalog when no providers are configured", async () => {
const { context } = configContext(async () => ({ entries: [] }));
expect(await gooseModels.discover(baseCatalog, context)).toBe(baseCatalog);
});
it("sets the provider before the model and preserves slashes in the model", async () => {
const { context, writes } = configContext();
const result = await gooseModels.configure(
{ target: "model", value: `openrouter/${routerModel}` },
context,
);
expect(result).toBe("handled");
expect(writes).toEqual([
["provider", "openrouter"],
["model", routerModel],
]);
});
it.each(["gpt-4o", routerModel])("passes the legacy model %s through", async (value) => {
const { context, writes } = configContext();
expect(await gooseModels.configure({ target: "model", value }, context)).toBe("pass");
expect(writes).toEqual([]);
});
function snapshotFor(provider: string): ProviderConfigState {
return {
model: routerModel,
models: baseCatalog.models,
modes: [],
thinkingOptions: [],
settings: [
{ type: "select", id: "provider", label: "Provider", value: provider, options: [] },
],
};
}
it("namespaces models in a snapshot for an explicit provider", () => {
const snapshot = snapshotFor("openrouter");
expect(gooseModels.config(snapshot)).toEqual({
...snapshot,
model: `openrouter/${routerModel}`,
models: [{ id: `openrouter/${routerModel}`, label: "Sonnet" }],
});
});
it("keeps the snapshot unchanged while goose Default is selected", () => {
const snapshot = snapshotFor("goose");
expect(gooseModels.config(snapshot)).toBe(snapshot);
});
});
+82
View File
@@ -0,0 +1,82 @@
import type { AcpRequest, AcpTransformer } from "@getpaseo/plugin/server/acp";
import { z } from "zod";
const inventorySchema = z.object({
entries: z.array(
z.object({
providerId: z.string(),
providerName: z.string(),
configured: z.boolean(),
models: z.array(z.object({ id: z.string(), name: z.string() })),
}),
),
});
const configValueSchema = z.object({ value: z.string().min(1) });
async function configuredProviders(request: AcpRequest) {
// COMPAT(gooseProvider): added in v0.17.0, remove after 2027-05-20 once supported goose versions have this RPC.
const response = await request("_goose/unstable/providers/list", { providerIds: [] }).catch(
() => null,
);
const inventory = inventorySchema.safeParse(response);
return inventory.success ? inventory.data.entries.filter((entry) => entry.configured) : [];
}
async function readDefault(request: AcpRequest, key: "GOOSE_PROVIDER" | "GOOSE_MODEL") {
const response = await request("_goose/unstable/config/read", { key }).catch(() => null);
const parsed = configValueSchema.safeParse(response);
return parsed.success ? parsed.data.value : undefined;
}
export const gooseModels = {
async discover(catalog, { request }) {
const providers = await configuredProviders(request);
if (providers.length === 0) return catalog;
const models = providers.flatMap((provider) =>
provider.models.map((model) => ({
id: `${provider.providerId}/${model.id}`,
label: model.name,
description: provider.providerName,
})),
);
if (models.length === 0) return catalog;
const [providerId, modelId] = await Promise.all([
readDefault(request, "GOOSE_PROVIDER"),
readDefault(request, "GOOSE_MODEL"),
]);
return {
...catalog,
models,
defaultModel: providerId && modelId ? `${providerId}/${modelId}` : undefined,
};
},
async configure(change, { config, request }) {
if (change.target !== "model" || !change.value) return "pass";
const separator = change.value.indexOf("/");
if (separator <= 0) return "pass";
const providerId = change.value.slice(0, separator);
const providers = await configuredProviders(request);
if (!providers.some((provider) => provider.providerId === providerId)) return "pass";
await config.set("provider", providerId);
await config.set("model", change.value.slice(separator + 1));
return "handled";
},
config(state) {
const provider = state.settings?.find((setting) => setting.id === "provider");
if (provider?.type !== "select" || !provider.value || provider.value === "goose") {
return state;
}
const namespace = (modelId: string) => `${provider.value}/${modelId}`;
return {
...state,
model: state.model === undefined ? undefined : namespace(state.model),
models: state.models.map((model) => ({ ...model, id: namespace(model.id) })),
};
},
} satisfies AcpTransformer;
+17
View File
@@ -0,0 +1,17 @@
import { runAcpProvider } from "@getpaseo/plugin/server/acp";
import type { ProviderRegistration } from "@getpaseo/plugin/server/provider";
import { gooseModels } from "./models.js";
export function createGooseProvider(): ProviderRegistration {
return {
requiresConfiguration: true,
...runAcpProvider({
id: "goose",
label: "goose",
description: "A local, extensible, open source AI agent that automates engineering tasks",
icon: "icon.svg",
command: ["goose", "acp"],
transformers: [gooseModels],
}),
};
}
+6 -1
View File
@@ -572,7 +572,12 @@ export default function contribute(server: PluginServerContext) {
The shim owns the ACP process, capability mapping, session lifecycle, prompts, permissions, and
timeline conversion. Do not copy that machinery into the plugin.
Use `transformers` only for vendor differences ACP cannot describe. Validate vendor payloads with
Use `transformers` for vendor differences ACP cannot describe. The
[goose model transformer](https://github.com/getpaseo/paseo/blob/main/plugins/goose-provider/server/models.ts)
uses `context.request` to read the agent's model inventory and `config` to prefix session model IDs
with the active provider. See the [ACP adapter reference](/docs/plugins/reference#providers).
Validate vendor payloads with
Zod and leave malformed or unrelated values unchanged:
```ts
+6 -1
View File
@@ -472,7 +472,12 @@ export default function contribute(server: PluginServerContext) {
适配层负责 ACP 进程、能力映射、会话生命周期、提示词、权限和时间线转换。不要把这些机制复制到插件中。
只在 ACP 无法描述厂商差异时使用 `transformers`。用 Zod 校验厂商负载,并让格式错误或无关的值保持不变:
使用 `transformers` 处理 ACP 无法描述的厂商差异。
[goose 模型转换器](https://github.com/getpaseo/paseo/blob/main/plugins/goose-provider/server/models.ts)
使用 `context.request` 读取 Agent 的模型列表,并使用 `config` 为会话的模型 ID 添加当前 Provider 前缀。
参见 [ACP 适配器参考](/docs/plugins/reference#providers)。
用 Zod 校验厂商负载,并让格式错误或无关的值保持不变:
```ts
import type { AcpTransformer } from "@getpaseo/plugin/server/acp";
+8 -1
View File
@@ -433,7 +433,14 @@ Paseo refreshes an agent by closing its current provider session and opening it
configuration and persistence. Providers re-read external state during `session.open`.
Use `runAcpProvider()` from `@getpaseo/plugin/server/acp` to adapt a command-backed ACP. Add transformer
hooks only for a vendor's discovery, configuration, notification, or tool-call differences.
hooks for vendor behavior. See [Adapt an ACP agent](/docs/plugins/providers#adapt-an-acp-agent).
In `discover` and `configure`, call `context.request(method, params)` to send an ACP extension
request. The promise returns a JSON value or rejects with the agent's JSON-RPC error.
Use `config(state, context)` to return the configuration snapshot that Paseo displays.
Paseo calls this synchronous hook for initial, notification, and committed configuration snapshots.
Use `configure` to send changes to the agent.
`ProviderRegistration.icon` is a file path relative to the plugin directory, such as `icon.svg`.
It must resolve inside that directory to a regular file that follows the
+8 -1
View File
@@ -363,7 +363,14 @@ Provider 选项是一个记录,即 `session.open` 中的 `ProviderSessionConfi
Paseo 刷新 Agent 的方式是关闭它当前的 Provider 会话,再用当前的配置和持久化值打开它。Provider 在 `session.open` 期间重新读取外部状态。
使用 `@getpaseo/plugin/server/acp` 中的 `runAcpProvider()` 适配一个基于命令的 ACP。只针对厂商在发现、配置、通知或工具调用方面的差异添加转换器钩子。
使用 `@getpaseo/plugin/server/acp` 中的 `runAcpProvider()` 适配一个基于命令的 ACP。使用转换器钩子处理厂商特有的行为。参见[适配 ACP Agent](/docs/plugins/providers#adapt-an-acp-agent)。
在 `discover` 和 `configure` 中,调用 `context.request(method, params)` 发送 ACP 扩展请求。
Promise 返回 JSON 值,或以 Agent 的 JSON-RPC 错误拒绝。
使用 `config(state, context)` 返回 Paseo 显示的配置快照。
Paseo 在会话就绪、收到配置通知或提交配置更改时调用此同步钩子。
使用 `configure` 向 Agent 发送更改。
`ProviderRegistration.icon` 是相对于插件目录的文件路径,例如 `icon.svg`。它必须解析到该目录内一个遵循 [SVG 图标规则](#svg-rules)的普通文件。Paseo 在插件启动时读取并校验该文件;这个字符串从不是内联 SVG 或 URL。
+1 -1
View File
@@ -51,7 +51,7 @@ To add one, open **Settings → Hosts → your host → Providers**, select **+
- [Gajae Code](https://gajae-code.com), subscription-based coding agent with plan-before-mutation workflows.
- [Gemini CLI](https://geminicli.com), Google's official Gemini CLI.
- [GLM Agent](https://github.com/stefandevo/glm-acp-agent), Zhipu AI's GLM coding agent.
- [goose](https://block.github.io/goose/), Block's local open-source AI agent.
- [goose](https://block.github.io/goose/), Block's local open-source AI agent. Paseo lists models from all providers configured in goose when goose supports model inventory discovery.
- [Grok](https://docs.x.ai/build/overview), xAI's Grok Build agentic coding CLI.
- [Hermes Agent](https://hermes-agent.nousresearch.com/docs/user-guide/features/acp), Nous Research's self-improving agent.
- [Junie](https://junie.jetbrains.com/docs/junie-cli-acp.html), JetBrains' coding agent.
@@ -49,7 +49,7 @@ Paseo 可以运行任何使用 [Agent Client Protocol](https://agentclientprotoc
- [Gajae Code](https://gajae-code.com):订阅制编程 Agent,采用先规划再修改的工作流。
- [Gemini CLI](https://geminicli.com):Google 官方的 Gemini CLI。
- [GLM Agent](https://github.com/stefandevo/glm-acp-agent):智谱 AI 的 GLM 编程 Agent。
- [goose](https://block.github.io/goose/):Block 的本地开源 AI Agent。
- [goose](https://block.github.io/goose/):Block 的本地开源 AI Agent。如果 goose 支持发现模型清单,Paseo 会列出 goose 中所有已配置 Provider 的模型。
- [Grok](https://docs.x.ai/build/overview):xAI 的 Grok Build Agent 编程 CLI。
- [Hermes Agent](https://hermes-agent.nousresearch.com/docs/user-guide/features/acp):Nous Research 的自我改进型 Agent。
- [Junie](https://junie.jetbrains.com/docs/junie-cli-acp.html):JetBrains 的编程 Agent。