Compare commits

..
Author SHA1 Message Date
Mohamed Boudra 3914893aa1 Troubleshoot providers from their settings page, and tidy provider settings (#10487)
* feat(providers): add docs links, sign-in facts and a tidier provider page

A user whose Antigravity models looked stale had no way to find out why
without asking in chat. agy 1.5.14 picks its sign-in from the
environment: with SSH_CONNECTION, SSH_CLIENT or SSH_TTY set it reads a
token file, otherwise the OS keyring
(google-antigravity/antigravity-cli#1336). The daemon is often started
outside SSH while the user tests agy over SSH, so the two can be signed
in to different accounts and list different models.

- The Antigravity status reports whether agy runs in an SSH session, and
  the diagnostic report for plugin providers now includes the resolved
  command, path and version like built-in providers do.
- Providers carry an optional docsUrl (protocol field, plugin SDK
  registration, built-in definitions). The provider page links it from
  Troubleshooting, and the Antigravity page documents the sign-in
  mismatch.
- Provider and project settings get a breadcrumb title. Refresh moves to
  the Models header, the model list scrolls inside a fixed height with a
  full-width search, and section headers keep one spacing whether or not
  they hold an action.
- A switch no longer makes its row taller than the track, and every
  settings row is at least as tall as one with a switch, so a switch row
  and a text row line up.

* fix(providers): report Antigravity's sign-in when ACP does not start

A sign-in problem can be what stops agy's ACP server from starting, so
the diagnostic report now shows the SSH session rows in that case too.

The plugin provider diagnostic test no longer compares the daemon PATH
and shell rows, which differ per host (Windows reports ComSpec).

* fix(server): show the same provider version in the report and Installation

The plugin diagnostic read the version by calling the provider's
inspect itself with a 10s deadline, while the Installation row reads it
through the installation service with a 20s deadline and a cache. A
version check between 10 and 20 seconds showed in Installation and as
an error in the report.

The snapshot manager now hands getDiagnostic an inspectInstallation
that reads through the installation service, so both show one answer
and agy --version runs once for both.

* feat(app): give rows that open something the same height as other rows

Detail rows and collapsible row headers reserved a button's height so a
list where only some rows held a switch kept one height. Now that every
settings row is at least as tall as a switch row, that reserve only made
rows like Diagnostic report and Docs taller than their neighbours.

* test(app): compare rows that open something with text and switch rows

* feat(app): size the provider icon to the page title

* fix(app): scale the provider title icon with the interface size
2026-11-22 15:13:31 +07:00
76 changed files with 1315 additions and 512 deletions
+2 -2
View File
@@ -78,7 +78,7 @@ In the composer, the first glyph's ink starts on the text column's edge, and the
One gate, `resolveControlSizing`, picks touch or pointer sizing: touch when the layout is compact or touch is the primary input. An iPad with the sidebar docked is wide and touch-sized; a desktop is pointer-sized; a phone is both compact and touch. The primary input comes from `(pointer: coarse)` (`hasTouchPrimaryPointer` in `hooks/pointer-capabilities.ts`), not from whether a touch screen exists: WebKit keeps touch primary on an iPad with a trackpad attached, and Chromium reports a fine primary pointer for a laptop with a touch screen that its trackpad drives. The fact is read once at startup: attaching a pointer to a tablet does not shrink its controls, and a 2-in-1 launched with a pointer keeps pointer sizes after it switches to tablet mode until the app reloads. Stylesheets take sizes from `bySizing({ touch, pointer })`, which resolves to a breakpoint value, so a caller never sees which sizing it got. Rows, icon buttons and icon slots take theirs from `styles/density.ts`, which uses the same gate. An `{ xs, md }` literal for a hit target or glyph is wrong: on an iPad it yields the pointer size.
Buttons are pills (`borderRadius.full`) with medium-weight labels; an icon-only button is a circle. `<Switch>` follows the same two sizes: a 34×20 track by default and in `sm`, 44×26 where controls are touch-sized, and it reserves its size's control height so a row holding one lines up with a row holding a button. Buttons, text fields, dropdown triggers, and `<SegmentedControl>` (`packages/app/src/components/ui/segmented-control.tsx`) share the size contract — the same size name means the same height and label size on every control kind, so controls in one row line up. Segments run tighter than a button, because the gap between segments already reads as padding. The selected segment is a `surface3` fill with `foreground` text, not an inverted one — inverting it inside thin chrome puts a white slab in the toolbar. A settings row sizes the controls in its trailing slot itself, default in a card and `sm` when nested (`packages/app/src/components/ui/control-size.tsx`), so don't pass a size to a button, dropdown or field placed in a row. Code that computes with a control's height outside a stylesheet uses `controlHeightForLayout`. Never shrink a control's font or padding locally to fit a context — if the context needs a smaller control, the size tier is missing or the wrong one is in use.
Buttons are pills (`borderRadius.full`) with medium-weight labels; an icon-only button is a circle. `<Switch>` follows the same two sizes: a 34×20 track by default and in `sm`, 44×26 where controls are touch-sized, and it takes presses over its size's control height without adding that height to its row. Buttons, text fields, dropdown triggers, and `<SegmentedControl>` (`packages/app/src/components/ui/segmented-control.tsx`) share the size contract — the same size name means the same height and label size on every control kind, so controls in one row line up. Segments run tighter than a button, because the gap between segments already reads as padding. The selected segment is a `surface3` fill with `foreground` text, not an inverted one — inverting it inside thin chrome puts a white slab in the toolbar. A settings row sizes the controls in its trailing slot itself, default in a card and `sm` when nested (`packages/app/src/components/ui/control-size.tsx`), so don't pass a size to a button, dropdown or field placed in a row. Code that computes with a control's height outside a stylesheet uses `controlHeightForLayout`. Never shrink a control's font or padding locally to fit a context — if the context needs a smaller control, the size tier is missing or the wrong one is in use.
A `<Pressable>` wrapping a `<Text>` is a sixth variant. It is wrong. `<Button>` accepts `style`, `textStyle`, `leftIcon`, `disabled`, `size`, and `variant`.
@@ -134,7 +134,7 @@ A section or group explains itself through the `info` prop on `<SettingsSection>
Cards inside a section sit closer than sections. Rows inside a card touch — only the divider separates them. The rhythm is page → spacious; section → spacious; card → tight.
Rows have generous vertical padding: roughly 16px of content plus 16px of vertical padding for settings rows, 8–12px for sidebar list items where many rows must fit. A row that opens something (`<SettingsDetailRow>`, a collapsible row's header) is at least as tall as one holding a default control, so a list where only some of those rows carry a switch keeps one row height. Other rows take their content's height. Compressing rows below the established density to fit more on the screen is wrong. Too many rows means more cards or more sections, not smaller rows.
Rows have generous vertical padding: roughly 16px of content plus 16px of vertical padding for settings rows, 8–12px for sidebar list items where many rows must fit. Every row is at least as tall as one holding a switch, so text rows, switch rows and rows that open something (`<SettingsDetailRow>`, a collapsible row's header) line up. A row holding a button or a select is taller. Compressing rows below the established density to fit more on the screen is wrong. Too many rows means more cards or more sections, not smaller rows.
Rows revealed under a `<SettingsCollapsibleRow>` are nested rows, one step smaller than card rows: 8px of vertical padding, `fontSize.sm` text, `sm` controls, and one fixed height so rows with and without a trailing button line up. The collapsible row sets this for everything under it (`packages/app/src/components/settings/row-density.tsx`). Never pass a density to a row, and never pad or resize a nested row by hand. Settings rows that share a menu surface with menu rows, such as Usage's options, go inside `<MenuSettingsRows>`, which puts their labels on the menu rows' label rail (`menuRowContentInset`).
@@ -118,7 +118,8 @@ async function exerciseProviderSettingsStack(page: Page) {
await page.getByRole("button", { name: "Refresh", exact: true }).click();
await expectProviderSettingsVisible(page);
await expect(page.getByText("Checked just now", { exact: true })).toBeVisible({
// The Models header puts the model count before it: "12 · Checked just now".
await expect(page.getByText(/Checked just now$/)).toBeVisible({
timeout: 30_000,
});
}
+3 -1
View File
@@ -567,7 +567,9 @@ export async function expectProviderPageLoaded(page: Page, providerName: string)
await expect(page.getByTestId("provider-detail-title")).toHaveText(providerName, {
timeout: 30_000,
});
await expect(page.getByText("Provider status")).toBeVisible({ timeout: 30_000 });
await expect(page.getByRole("button", { name: "Diagnostic report" })).toBeVisible({
timeout: 30_000,
});
}
export async function expectProviderNotOnHost(page: Page): Promise<void> {
@@ -1,13 +1,15 @@
import { AppearanceText as Text } from "@/appearance/text";
import { ChevronRight } from "lucide-react-native";
import { useMemo, type ReactNode } from "react";
import { Platform, ScrollView, View } from "react-native";
import { Platform, ScrollView, View, type PressableStateCallbackType } from "react-native";
import { KeyboardAwareScrollView } from "react-native-keyboard-controller";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import { StyleSheet } from "react-native-unistyles";
import { StyleSheet, withUnistyles } from "react-native-unistyles";
import { BackHeader } from "@/components/headers/back-header";
import { MenuHeader } from "@/components/headers/menu-header";
import { PressHighlight } from "@/components/ui/press-highlight";
import { useIsCompactFormFactor } from "@/constants/layout";
import { SPACING } from "@/styles/theme";
import { ICON_SIZE, SPACING, type Theme } from "@/styles/theme";
const PageScrollView = Platform.OS === "android" ? KeyboardAwareScrollView : ScrollView;
@@ -58,14 +60,7 @@ export function PageLayout({
testID={testID}
>
<View style={width === "wide" ? styles.contentWide : styles.content}>
{showTitle ? (
<View style={styles.titleRow} testID={titleTestID}>
<Text style={styles.title} testID="page-title">
{title}
</Text>
{actions}
</View>
) : null}
{showTitle ? <PageTitle title={title} actions={actions} testID={titleTestID} /> : null}
{children}
</View>
</PageScrollView>
@@ -73,6 +68,77 @@ export function PageLayout({
);
}
/** The page that holds this one. Its name is the first part of the title and goes back to it. */
export interface PageTitleParent {
label: string;
/** What the press does, such as "Back to providers". */
accessibilityLabel: string;
onPress: () => void;
testID?: string;
}
interface PageTitleProps {
parent?: PageTitleParent;
/** Drawn before the title, such as the icon of the thing the page is about. */
icon?: ReactNode;
title?: string;
/** A control that belongs to the title, drawn right after it. */
adornment?: ReactNode;
/** Controls for the whole page, drawn at the trailing edge. */
actions?: ReactNode;
testID?: string;
titleTestID?: string;
}
/**
* The heading of a desktop page. A page that opens from another page, such as one provider from
* Providers, names that page first: "Providers > Antigravity".
*/
export function PageTitle({
parent,
icon,
title,
adornment,
actions,
testID,
titleTestID = "page-title",
}: PageTitleProps) {
return (
<View style={styles.titleRow} testID={testID}>
<View style={styles.titleParts}>
{parent ? (
<PressHighlight
accessibilityRole="button"
accessibilityLabel={parent.accessibilityLabel}
onPress={parent.onPress}
testID={parent.testID}
>
{({ hovered }: PressableStateCallbackType & { hovered?: boolean }) => (
<Text style={[styles.title, styles.parent, hovered && styles.parentHovered]}>
{parent.label}
</Text>
)}
</PressHighlight>
) : null}
{parent && title !== undefined ? (
<ThemedChevronRight size={ICON_SIZE.lg} uniProps={separatorColor} />
) : null}
{icon}
{title !== undefined ? (
<Text style={[styles.title, styles.titleLeaf]} numberOfLines={1} testID={titleTestID}>
{title}
</Text>
) : null}
{adornment}
</View>
{actions}
</View>
);
}
const ThemedChevronRight = withUnistyles(ChevronRight);
const separatorColor = (theme: Theme) => ({ color: theme.colors.foregroundMuted });
const styles = StyleSheet.create((theme) => ({
container: {
flex: 1,
@@ -102,11 +168,27 @@ const styles = StyleSheet.create((theme) => ({
gap: theme.spacing[4],
marginBottom: theme.spacing[6],
},
title: {
titleParts: {
// Line up with the section titles, which sit inset from their cards.
marginLeft: theme.spacing[1],
flexDirection: "row",
alignItems: "center",
gap: theme.spacing[2],
flexShrink: 1,
minWidth: 0,
},
title: {
fontSize: theme.fontSize["4xl"],
fontWeight: theme.fontWeight.medium,
color: theme.colors.foreground,
},
titleLeaf: {
flexShrink: 1,
},
parent: {
color: theme.colors.foregroundMuted,
},
parentHovered: {
color: theme.colors.foreground,
},
}));
@@ -2,7 +2,9 @@ import { ArrowLeft } from "lucide-react-native";
import type { ReactNode } from "react";
import { Text, View } from "react-native";
import { StyleSheet } from "react-native-unistyles";
import { PageTitle, type PageTitleParent } from "@/components/page-layout";
import { Button } from "@/components/ui/button";
import { useIsCompactFormFactor } from "@/constants/layout";
/**
* "Back to …" above a settings detail page on wide layouts, where the page has no header of its
@@ -32,32 +34,43 @@ export function SettingsBackLink({
}
/**
* The top of a settings detail page: "Back to …" when the page has no header of its own, then the
* icon and name the page is about, with an optional action after the name.
* The top of a settings detail page: the icon and name of the thing the page is about, with an
* optional action after the name. On wide layouts it is the page's title and names the parent page
* first, which goes back to it. On compact layouts the back header already names the parent.
*/
export function SettingsDetailHeader({
back,
parent,
icon,
title,
trailing,
titleTestID,
}: {
back?: { label: string; onPress: () => void; testID?: string };
icon: ReactNode;
title: string;
parent: PageTitleParent;
icon?: ReactNode;
/** Absent while the page has nothing to name, such as a project that no longer exists. */
title?: string;
trailing?: ReactNode;
titleTestID?: string;
}) {
const isCompact = useIsCompactFormFactor();
if (!isCompact)
return (
<PageTitle
parent={parent}
icon={icon}
title={title}
adornment={trailing}
titleTestID={titleTestID}
/>
);
if (title === undefined) return null;
return (
<View style={styles.header}>
{back ? <SettingsBackLink {...back} /> : null}
<View style={styles.titleRow}>
{icon}
<Text style={styles.title} numberOfLines={1} testID={titleTestID}>
{title}
</Text>
{trailing}
</View>
<View style={styles.titleRow}>
{icon}
<Text style={styles.title} numberOfLines={1} testID={titleTestID}>
{title}
</Text>
{trailing}
</View>
);
}
@@ -67,15 +80,13 @@ const styles = StyleSheet.create((theme) => ({
alignSelf: "flex-start",
paddingHorizontal: 0,
},
header: {
gap: theme.spacing[2],
marginBottom: theme.spacing[4],
},
titleRow: {
marginTop: theme.spacing[2],
// Line up with the section titles, which sit inset from their cards.
marginLeft: theme.spacing[1],
flexDirection: "row",
alignItems: "center",
gap: theme.spacing[3],
marginBottom: theme.spacing[4],
},
title: {
color: theme.colors.foreground,
@@ -0,0 +1,22 @@
import type { ReactNode } from "react";
import { View } from "react-native";
import { StyleSheet } from "react-native-unistyles";
/**
* The action at a heading's end. It adds no height, so a heading with a button is as tall as one
* without and both sit the same distance from their cards. The button stays centered on the title
* and its hit area grows past the heading.
*/
export function HeadingTrailing({ children }: { children: ReactNode }) {
if (children === null || children === undefined || children === false) return null;
return <View style={styles.trailing}>{children}</View>;
}
const styles = StyleSheet.create({
trailing: {
height: 0,
justifyContent: "center",
// A long trailing gives way to the title.
flexShrink: 1,
},
});
@@ -1,6 +1,7 @@
import { useMemo, type ReactNode } from "react";
import { Text, View, type StyleProp, type ViewStyle } from "react-native";
import { StyleSheet } from "react-native-unistyles";
import { HeadingTrailing } from "./heading-trailing";
import { SettingsInfoTip } from "./settings-info-tip";
interface SettingsGroupProps {
@@ -40,7 +41,7 @@ export function SettingsGroup({
/>
) : null}
</View>
{trailing}
<HeadingTrailing>{trailing}</HeadingTrailing>
</View>
{children}
</View>
@@ -3,6 +3,7 @@ import { useMemo, type ReactNode } from "react";
import { View, type StyleProp, type ViewStyle } from "react-native";
import { StyleSheet } from "react-native-unistyles";
import { ExternalLink, type ExternalLinkProps } from "@/components/ui/external-link";
import { HeadingTrailing } from "./heading-trailing";
import { SettingsInfoTip } from "./settings-info-tip";
import { settingsStyles } from "@/styles/settings";
@@ -67,7 +68,7 @@ export function SettingsSection({
<ExternalLink {...link} />
</View>
) : null}
{trailing}
<HeadingTrailing>{trailing}</HeadingTrailing>
</View>
<View style={styles.content}>{children}</View>
</View>
@@ -7,6 +7,7 @@ import {
SettingsCollapsibleRow,
SettingsDetailRow,
SettingsRow,
SettingsSwitch,
} from "@/components/settings";
let root: Root | null = null;
@@ -20,6 +21,7 @@ afterEach(() => {
});
function openNothing() {}
function toggleNothing() {}
function mountRows() {
container = document.createElement("div");
@@ -33,6 +35,13 @@ function mountRows() {
Download
</Button>
</SettingsRow>
<SettingsRow label="Text only" testID="text-row" />
<SettingsSwitch
label="Toggles"
value={false}
onValueChange={toggleNothing}
testID="switch-row"
/>
<SettingsDetailRow label="Opens a page" onPress={openNothing} testID="detail-row" />
<SettingsCollapsibleRow label="Group" defaultExpanded testID="group">
<SettingsRow label="Nested with a button" testID="nested-with-button">
@@ -74,11 +83,13 @@ describe("settings row density", () => {
expect(heightOf("group-toggle")).toBeGreaterThan(heightOf("nested-without-button"));
});
it("keeps a row that opens something as tall as a row holding a control", () => {
it("lines up text, switch, and opening rows below a row holding a button", () => {
mountRows();
expect(heightOf("detail-row")).toBe(heightOf("card-row"));
expect(heightOf("group-toggle")).toBe(heightOf("card-row"));
expect(heightOf("switch-row")).toBe(heightOf("text-row"));
expect(heightOf("detail-row")).toBe(heightOf("text-row"));
expect(heightOf("group-toggle")).toBe(heightOf("text-row"));
expect(heightOf("card-row")).toBeGreaterThan(heightOf("text-row"));
});
it("sizes nested text and controls one step below card rows", () => {
@@ -27,11 +27,6 @@ export function MenuSettingsRows({ children }: { children: ReactNode }) {
export interface SettingsRowLayout {
row: StyleProp<ViewStyle>;
/**
* A row as tall as one holding a control of `controlSize`, whether or not it holds one. In a menu
* it keeps the menu's row height.
*/
controlRow: StyleProp<ViewStyle>;
title: StyleProp<TextStyle>;
hint: StyleProp<TextStyle>;
/** The size of the controls in the row's trailing slot. */
@@ -43,7 +38,6 @@ function layoutFor(placement: RowPlacement): SettingsRowLayout {
case "nested":
return {
row: [settingsStyles.row, styles.nestedRow],
controlRow: [settingsStyles.row, styles.nestedRow],
title: [settingsStyles.rowTitle, styles.nestedText],
hint: [settingsStyles.rowHint, styles.nestedText],
controlSize: "sm",
@@ -51,7 +45,6 @@ function layoutFor(placement: RowPlacement): SettingsRowLayout {
case "menu":
return {
row: [settingsStyles.row, styles.menuRow],
controlRow: [settingsStyles.row, styles.menuRow],
title: settingsStyles.rowTitle,
hint: settingsStyles.rowHint,
controlSize: "md",
@@ -59,7 +52,6 @@ function layoutFor(placement: RowPlacement): SettingsRowLayout {
case "card":
return {
row: settingsStyles.row,
controlRow: [settingsStyles.row, styles.cardControlRow],
title: settingsStyles.rowTitle,
hint: settingsStyles.rowHint,
controlSize: "md",
@@ -74,9 +66,6 @@ export function useSettingsRowLayout(): SettingsRowLayout {
}
const styles = StyleSheet.create((theme) => ({
cardControlRow: {
minHeight: mapLayout(CONTROL_HEIGHTS.md, (height) => height + theme.spacing[4] * 2),
},
// Every nested row is as tall as one holding an `sm` control, so rows with and without a
// trailing button line up.
nestedRow: {
@@ -86,7 +86,7 @@ export function SettingsRowHeader({
const handlePointerEnter = useCallback(() => setPointerOver(true), []);
const handlePointerLeave = useCallback(() => setPointerOver(false), []);
const hovered = pointerOver && !disabled;
const rowStyle = useMemo(() => [layout.controlRow, hovered && styles.hovered], [hovered, layout]);
const rowStyle = useMemo(() => [layout.row, hovered && styles.hovered], [hovered, layout]);
const chevronStyle = useMemo(
() => [styles.chevron, expanded && styles.chevronExpanded],
[expanded],
@@ -302,23 +302,23 @@ describe("control geometry", () => {
trackHeight: 20,
thumbSize: 16,
thumbTravel: 14,
reservedHeight: 32,
hitHeight: 32,
});
expect(switchGeometryForLayout("md", true)).toEqual({
trackWidth: 44,
trackHeight: 26,
thumbSize: 22,
thumbTravel: 18,
reservedHeight: 44,
hitHeight: 44,
});
// Tight chrome keeps the pointer-sized track on every layout and reserves its row's height.
// Tight chrome keeps the pointer-sized track on every layout and takes presses over its row's control height.
expect(switchGeometryForLayout("sm", true)).toMatchObject({
trackWidth: 34,
reservedHeight: 32,
hitHeight: 32,
});
expect(switchGeometryForLayout("sm", false)).toMatchObject({
trackWidth: 34,
reservedHeight: 28,
hitHeight: 28,
});
});
@@ -223,8 +223,11 @@ export interface SwitchGeometry {
thumbSize: number;
/** How far the thumb slides between off and on. */
thumbTravel: number;
/** The control height the switch reserves, so its row lines up with one holding a button. */
reservedHeight: number;
/**
* The height of the area that takes the press: the control height of the switch's size. The
* switch itself is only as tall as its track, so it never makes a row taller.
*/
hitHeight: number;
}
function switchSize(trackWidth: number, trackHeight: number, thumbSize: number) {
@@ -235,6 +238,15 @@ function switchSize(trackWidth: number, trackHeight: number, thumbSize: number)
const SWITCH_POINTER = switchSize(34, 20, 16);
const SWITCH_TOUCH = switchSize(44, 26, 22);
/**
* The height of a default switch. Exported so a row can be as tall as one holding a switch whether
* or not it holds one. A breakpoint value, so it only works inside a Unistyles stylesheet.
*/
export const SWITCH_HEIGHT = bySizing({
touch: SWITCH_TOUCH.trackHeight,
pointer: SWITCH_POINTER.trackHeight,
});
/**
* A switch follows the same two sizes as every other control. Its thumb travel feeds an
* animation, so the size is resolved to plain numbers here instead of a stylesheet breakpoint.
@@ -242,7 +254,7 @@ const SWITCH_TOUCH = switchSize(44, 26, 22);
export function switchGeometryForLayout(size: ControlSize, isCompact: boolean): SwitchGeometry {
const touchSized = controlSizingForLayout(isCompact) === "touch";
const track = size === "md" && touchSized ? SWITCH_TOUCH : SWITCH_POINTER;
return { ...track, reservedHeight: controlHeightForLayout(size, isCompact) };
return { ...track, hitHeight: controlHeightForLayout(size, isCompact) };
}
function fieldLineHeight(fontSize: number): number {
@@ -25,6 +25,8 @@ export interface SearchFieldProps {
/** Falls back to `placeholder`, which already names the field. */
accessibilityLabel?: string;
clearAccessibilityLabel: string;
/** Fill the container, for a search that heads one list. Defaults to the filter rail's width. */
fullWidth?: boolean;
testID?: string;
clearTestID?: string;
}
@@ -42,6 +44,7 @@ export function SearchField({
placeholder,
accessibilityLabel,
clearAccessibilityLabel,
fullWidth = false,
testID,
clearTestID,
}: SearchFieldProps): ReactElement {
@@ -55,7 +58,9 @@ export function SearchField({
}, [onChangeText]);
return (
<View style={[styles.field, isFocused && styles.fieldFocused]}>
<View
style={[styles.field, fullWidth && styles.fieldFullWidth, isFocused && styles.fieldFocused]}
>
<ThemedSearch size={14} uniProps={mutedColorMapping} />
<ThemedTextInput
testID={testID}
@@ -103,6 +108,9 @@ const styles = StyleSheet.create((theme) => ({
borderWidth: theme.borderWidth[1],
borderColor: theme.colors.border,
},
fieldFullWidth: {
maxWidth: "100%",
},
fieldFocused: {
borderColor: theme.colors.borderAccent,
backgroundColor: theme.colors.surface2,
+7 -2
View File
@@ -123,11 +123,16 @@ export function Switch({
const pressableStyle = useMemo(
() => [
styles.switchControl,
{ minHeight: geometry.reservedHeight },
// The press area is a full control tall and grows out of the track; the layout only sees
// the track.
{
minHeight: geometry.hitHeight,
marginVertical: (geometry.trackHeight - geometry.hitHeight) / 2,
},
disabled ? styles.disabled : null,
style,
],
[disabled, geometry.reservedHeight, style],
[disabled, geometry.hitHeight, geometry.trackHeight, style],
);
return (
+2 -1
View File
@@ -3113,6 +3113,7 @@ export const ar: TranslationResources = {
status: "حالة المزود",
checked: "تم الفحص {{time}}",
diagnosticReport: "تقرير التشخيص",
docs: "الوثائق",
dangerZone: "منطقة الخطر",
removeHint: "يحذف هذا المزود من config.json",
},
@@ -3158,7 +3159,7 @@ export const ar: TranslationResources = {
noSearchMatches: "لا توجد نماذج تطابق بحثك",
noneDetected: "لم يتم اكتشاف أي نماذج",
noCustom: "لا توجد نماذج مخصصة",
discovered: "اكتشف",
title: "النماذج",
custom: "نماذج مخصصة",
updated: "تم تحديث{{time}}",
},
+2 -1
View File
@@ -3211,6 +3211,7 @@ export const en = {
status: "Provider status",
checked: "Checked {{time}}",
diagnosticReport: "Diagnostic report",
docs: "Docs",
dangerZone: "Danger zone",
removeHint: "Deletes this provider from config.json",
},
@@ -3256,7 +3257,7 @@ export const en = {
noSearchMatches: "No models match your search",
noneDetected: "No models detected",
noCustom: "No custom models",
discovered: "Discovered",
title: "Models",
custom: "Custom models",
updated: "Updated {{time}}",
},
+2 -1
View File
@@ -3141,6 +3141,7 @@ export const es: TranslationResources = {
status: "Estado del proveedor",
checked: "Comprobado {{time}}",
diagnosticReport: "Informe de diagnóstico",
docs: "Documentación",
dangerZone: "Zona de peligro",
removeHint: "Elimina este proveedor de config.json",
},
@@ -3186,7 +3187,7 @@ export const es: TranslationResources = {
noSearchMatches: "Ningún modelo coincide con tu búsqueda",
noneDetected: "No se detectaron modelos",
noCustom: "No hay modelos personalizados",
discovered: "descubierto",
title: "Modelos",
custom: "Modelos personalizados",
updated: "{{time}}actualizado",
},
+2 -1
View File
@@ -3147,6 +3147,7 @@ export const fr: TranslationResources = {
status: "État du fournisseur",
checked: "Vérifié {{time}}",
diagnosticReport: "Rapport de diagnostic",
docs: "Documentation",
dangerZone: "Zone de danger",
removeHint: "Supprime ce fournisseur de config.json",
},
@@ -3193,7 +3194,7 @@ export const fr: TranslationResources = {
noSearchMatches: "Aucun modèle ne correspond à votre recherche",
noneDetected: "Aucun modèle détecté",
noCustom: "Aucun modèle personnalisé",
discovered: "Détectés",
title: "Modèles",
custom: "Modèles personnalisés",
updated: "Mis à jour {{time}}",
},
+2 -1
View File
@@ -3109,6 +3109,7 @@ export const ja: TranslationResources = {
status: "プロバイダーの状態",
checked: "{{time}}に確認",
diagnosticReport: "診断レポート",
docs: "ドキュメント",
dangerZone: "危険な操作",
removeHint: "このプロバイダーを config.json から削除します",
},
@@ -3154,7 +3155,7 @@ export const ja: TranslationResources = {
noSearchMatches: "検索に一致するモデルがありません",
noneDetected: "モデルが検出されませんでした",
noCustom: "カスタムモデルはありません",
discovered: "検出済み",
title: "モデル",
custom: "カスタムモデル",
updated: "{{time}}に更新",
},
+2 -1
View File
@@ -3094,6 +3094,7 @@ export const ko: TranslationResources = {
status: "프로바이더 상태",
checked: "{{time}} 확인됨",
diagnosticReport: "진단 보고서",
docs: "문서",
dangerZone: "위험 구역",
removeHint: "config.json에서 이 프로바이더를 삭제합니다",
},
@@ -3140,7 +3141,7 @@ export const ko: TranslationResources = {
noSearchMatches: "검색과 일치하는 모델이 없습니다",
noneDetected: "감지된 모델이 없습니다",
noCustom: "사용자 지정 모델 없음",
discovered: "발견됨",
title: "모델",
custom: "사용자 지정 모델",
updated: "{{time}} 업데이트됨",
},
+2 -1
View File
@@ -3122,6 +3122,7 @@ export const ptBR: TranslationResources = {
status: "Status do provedor",
checked: "Verificado {{time}}",
diagnosticReport: "Relatório de diagnóstico",
docs: "Documentação",
dangerZone: "Zona de perigo",
removeHint: "Exclui este provedor do config.json",
},
@@ -3167,7 +3168,7 @@ export const ptBR: TranslationResources = {
noSearchMatches: "Nenhum modelo corresponde à sua busca",
noneDetected: "Nenhum modelo detectado",
noCustom: "Nenhum modelo personalizado",
discovered: "Descobertos",
title: "Modelos",
custom: "Modelos personalizados",
updated: "Atualizado {{time}}",
},
+2 -1
View File
@@ -3133,6 +3133,7 @@ export const ru: TranslationResources = {
status: "Состояние провайдера",
checked: "Проверено {{time}}",
diagnosticReport: "Диагностический отчёт",
docs: "Документация",
dangerZone: "Опасная зона",
removeHint: "Удаляет этого провайдера из config.json",
},
@@ -3179,7 +3180,7 @@ export const ru: TranslationResources = {
noSearchMatches: "Ни одна модель не соответствует вашему запросу",
noneDetected: "Модели не обнаружены",
noCustom: "Нет пользовательских моделей",
discovered: "Обнаруженные модели",
title: "Модели",
custom: "Пользовательские модели",
updated: "Обновлено {{time}}",
},
+2 -1
View File
@@ -3042,6 +3042,7 @@ export const zhCN: TranslationResources = {
status: "Provider 状态",
checked: "{{time}}检查",
diagnosticReport: "诊断报告",
docs: "文档",
dangerZone: "危险操作",
removeHint: "从 config.json 中删除此 Provider",
},
@@ -3087,7 +3088,7 @@ export const zhCN: TranslationResources = {
noSearchMatches: "没有匹配搜索的 Model",
noneDetected: "未检测到 Model",
noCustom: "没有自定义模型",
discovered: "已发现",
title: "Models",
custom: "自定义 Models",
updated: "已更新 {{time}}",
},
@@ -1,44 +1,53 @@
import { useMemo } from "react";
import { useTranslation } from "react-i18next";
import { View } from "react-native";
import { withUnistyles } from "react-native-unistyles";
import { SettingsDetailHeader } from "@/components/settings";
import { useIsCompactFormFactor } from "@/constants/layout";
import { ICON_SIZE, type Theme } from "@/styles/theme";
import { ProviderDetail, useProviderDetail } from "./provider-detail";
import { ProviderGlyph } from "./provider-glyph";
/**
* A provider's detail as a Settings page, shaped like a project's: the screen titles it
* "Providers", the page names the provider. On wide layouts the page has no back button of its
* own, so it draws "Back to providers".
* A provider's detail as a Settings page, shaped like a project's. On wide layouts the page is
* titled "Providers > name" and "Providers" goes back. On compact layouts the screen titles it
* "Providers" and the page names the provider.
*/
export function ProviderDetailPage({
serverId,
provider,
onBack,
showBack,
}: {
serverId: string;
provider: string;
onBack: () => void;
showBack: boolean;
}) {
const { t } = useTranslation();
const isCompact = useIsCompactFormFactor();
const detail = useProviderDetail({ serverId, provider, onRemoved: onBack });
const back = useMemo(
const parent = useMemo(
() => ({
label: t("settings.providers.detail.backToProviders"),
label: t("settings.hostSections.providers"),
accessibilityLabel: t("settings.providers.detail.backToProviders"),
onPress: onBack,
testID: "provider-detail-back",
}),
[onBack, t],
);
const icon = useMemo(
() => <ProviderGlyph serverId={serverId} provider={provider} />,
[provider, serverId],
() => (
<ThemedProviderGlyph
serverId={serverId}
provider={provider}
uniProps={isCompact ? rowTitleSize : pageTitleSize}
/>
),
[isCompact, provider, serverId],
);
return (
<View testID="provider-detail-page">
<SettingsDetailHeader
back={showBack ? back : undefined}
parent={parent}
icon={icon}
title={detail.label}
titleTestID="provider-detail-title"
@@ -47,3 +56,8 @@ export function ProviderDetailPage({
</View>
);
}
// The glyph is as large as the name beside it. The page title scales with the interface size.
const ThemedProviderGlyph = withUnistyles(ProviderGlyph);
const pageTitleSize = (theme: Theme) => ({ size: theme.fontSize["4xl"] });
const rowTitleSize = () => ({ size: ICON_SIZE.md });
@@ -14,9 +14,9 @@ import { Alert } from "@/components/ui/alert";
import { Button } from "@/components/ui/button";
import { readAcpProviderInstallGuide } from "@/hooks/use-acp-provider-catalog";
import { useProvidersSnapshot } from "@/hooks/use-providers-snapshot";
import { useTimeAgo } from "@/hooks/use-time-ago";
import { useHostRuntimeIsConnected } from "@/runtime/host-runtime";
import { settingsStyles } from "@/styles/settings";
import { openExternalUrl } from "@/utils/open-external-url";
import {
readDetailPresence,
readDetailSections,
@@ -27,6 +27,7 @@ import { DiagnosticSheet } from "./diagnostic-sheet";
import { useProviderConfigActions, type ProviderEntry } from "./provider-config";
import { ProviderModels } from "./provider-models";
import { ProviderNotice } from "./provider-notice";
import { ProviderRefreshButton, useCheckedLabel, type ProviderRefresh } from "./provider-refresh";
export interface ProviderDetailState {
provider: string;
@@ -81,6 +82,9 @@ export function useProviderDetail({
/**
* Everything about one provider, top to bottom: what is wrong, whether it runs, its installation,
* its models, then the rare actions. The page and the sheet frame the same body.
*
* Refresh sits with the model list, which is what it is most often pressed for. A provider that
* lists no models of its own keeps it under Troubleshooting.
*/
export function ProviderDetail({
serverId,
@@ -106,6 +110,13 @@ export function ProviderDetail({
installGuide: readAcpProviderInstallGuide(provider),
});
const sections = readDetailSections(entry, shownInstallation);
const listsModels = sections.models === "all";
const providerRefresh: ProviderRefresh = {
checkedAt: entry.fetchedAt,
// The probe running again is a refresh too, whoever asked for it.
busy: isRefreshing || installation.refreshing || entry.status === "loading",
run: handleRefresh,
};
return (
<View testID="provider-detail">
@@ -117,13 +128,16 @@ export function ProviderDetail({
action={installation.action}
/>
{sections.models ? (
<ProviderModels serverId={serverId} entry={entry} discovered={sections.models === "all"} />
<ProviderModels
serverId={serverId}
entry={entry}
refresh={listsModels ? providerRefresh : null}
/>
) : null}
<Troubleshooting
serverId={serverId}
entry={entry}
refreshing={isRefreshing || installation.refreshing}
onRefresh={handleRefresh}
refresh={listsModels ? null : providerRefresh}
/>
{/* Config no longer owns a provider whose removal has succeeded. */}
{detail.removing || detail.canRemove(entry) ? (
@@ -182,42 +196,39 @@ function EnabledCard({ serverId, entry }: { serverId: string; entry: ProviderEnt
function Troubleshooting({
serverId,
entry,
refreshing,
onRefresh,
refresh,
}: {
serverId: string;
entry: ProviderEntry;
refreshing: boolean;
onRefresh: () => void;
/** Null when the model list carries Refresh. */
refresh: ProviderRefresh | null;
}) {
const { t } = useTranslation();
const [diagnosticOpen, setDiagnosticOpen] = useState(false);
const openDiagnostic = useCallback(() => setDiagnosticOpen(true), []);
const closeDiagnostic = useCallback(() => setDiagnosticOpen(false), []);
const checked = useTimeAgo(entry.fetchedAt ? new Date(entry.fetchedAt) : null);
// The probe running again is a refresh too, whoever asked for it.
const busy = refreshing || entry.status === "loading";
const docsUrl = entry.docsUrl;
const openDocs = useCallback(() => {
if (docsUrl) void openExternalUrl(docsUrl);
}, [docsUrl]);
return (
<SettingsSection title={t("settings.providers.detail.troubleshooting")}>
<SettingsCard>
<SettingsRow
label={t("settings.providers.detail.status")}
hint={
entry.fetchedAt ? t("settings.providers.detail.checked", { time: checked }) : undefined
}
>
<Button variant="outline" onPress={onRefresh} loading={busy} testID="provider-refresh">
{busy
? t("settings.providers.diagnostic.refreshing")
: t("settings.providers.diagnostic.refresh")}
</Button>
</SettingsRow>
{refresh ? <ProviderStatusRow refresh={refresh} /> : null}
<SettingsDetailRow
label={t("settings.providers.detail.diagnosticReport")}
onPress={openDiagnostic}
testID="provider-diagnostic-report"
/>
{docsUrl ? (
<SettingsDetailRow
label={t("settings.providers.detail.docs")}
onPress={openDocs}
external
testID="provider-docs"
/>
) : null}
</SettingsCard>
<DiagnosticSheet
serverId={serverId}
@@ -229,6 +240,16 @@ function Troubleshooting({
);
}
function ProviderStatusRow({ refresh }: { refresh: ProviderRefresh }) {
const { t } = useTranslation();
const checked = useCheckedLabel(refresh);
return (
<SettingsRow label={t("settings.providers.detail.status")} hint={checked}>
<ProviderRefreshButton refresh={refresh} form="labelled" />
</SettingsRow>
);
}
function DangerZone({ removing, onRemove }: { removing: boolean; onRemove: () => void }) {
const { t } = useTranslation();
return (
@@ -2,10 +2,18 @@ import { StyleSheet } from "react-native-unistyles";
import { useProviderIcon } from "@/components/provider-icons";
import { ICON_SIZE } from "@/styles/theme";
/** A provider's icon at row size, drawn in the foreground colour. */
export function ProviderGlyph({ serverId, provider }: { serverId: string; provider: string }) {
/** A provider's icon in the foreground colour, at row size unless the caller names another. */
export function ProviderGlyph({
serverId,
provider,
size = ICON_SIZE.md,
}: {
serverId: string;
provider: string;
size?: number;
}) {
const Icon = useProviderIcon(provider, serverId);
return <Icon size={ICON_SIZE.md} color={styles.glyph.color} />;
return <Icon size={size} color={styles.glyph.color} />;
}
const styles = StyleSheet.create((theme) => ({
@@ -1,7 +1,7 @@
import { Plus, Trash2 } from "lucide-react-native";
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
import { useTranslation } from "react-i18next";
import { Text, View } from "react-native";
import { ScrollView, Text, View } from "react-native";
import { StyleSheet, withUnistyles } from "react-native-unistyles";
import type { AgentModelDefinition } from "@getpaseo/protocol/agent-types";
import type { ProviderProfileModel } from "@getpaseo/protocol/provider-config";
@@ -26,6 +26,7 @@ import {
type ProviderDiscoveredModelsCache,
} from "./discovered-models";
import type { ProviderEntry } from "./provider-config";
import { ProviderRefreshButton, useCheckedLabel, type ProviderRefresh } from "./provider-refresh";
const ThemedTrash = withUnistyles(Trash2);
const destructiveColorMapping = (theme: Theme) => ({ color: theme.colors.destructive });
@@ -51,15 +52,19 @@ function rankModels<T>(items: T[], query: string, fields: (item: T) => string[])
export function ProviderModels({
serverId,
entry,
discovered,
refresh,
}: {
serverId: string;
entry: ProviderEntry;
/** List the models the provider reports, with search. Only a running provider reports them. */
discovered: boolean;
/**
* Lists the models the provider reports, with search and the way to ask for them again. Null for
* a provider that is not running, which reports none.
*/
refresh: ProviderRefresh | null;
}) {
const { t } = useTranslation();
const provider = entry.provider;
const discovered = refresh !== null;
const { config, patchConfig } = useDaemonConfig(serverId);
const [query, setQuery] = useState("");
const [addSheetOpen, setAddSheetOpen] = useState(false);
@@ -130,10 +135,8 @@ export function ProviderModels({
const discoveredTrailing = useMemo(
() =>
discoveredModels.length > 0 ? (
<Text style={settingsStyles.sectionHeaderTitle}>{discoveredModels.length}</Text>
) : null,
[discoveredModels.length],
refresh ? <DiscoveredTrailing count={discoveredModels.length} refresh={refresh} /> : null,
[discoveredModels.length, refresh],
);
let discoveredBody: React.ReactNode;
@@ -173,23 +176,29 @@ export function ProviderModels({
return (
<View testID="provider-models">
{discovered ? (
<>
<View style={styles.searchRail}>
<SettingsSection title={t("settings.providers.models.title")} trailing={discoveredTrailing}>
<View style={styles.searchRow}>
<SearchField
value={query}
onChangeText={setQuery}
placeholder={t("settings.providers.models.searchPlaceholder")}
clearAccessibilityLabel={t("sessions.actions.clearSearch")}
fullWidth
testID="provider-settings-search"
/>
</View>
<SettingsSection
title={t("settings.providers.models.discovered")}
trailing={discoveredTrailing}
>
<View style={settingsStyles.card}>{discoveredBody}</View>
</SettingsSection>
</>
<View style={settingsStyles.card}>
{/* A provider can report hundreds of models; the rest of the page stays in reach. */}
<ScrollView
style={styles.discoveredList}
// Android scrolls a ScrollView nested in the page or the sheet only with this flag.
nestedScrollEnabled
testID="provider-discovered-models"
>
{discoveredBody}
</ScrollView>
</View>
</SettingsSection>
) : null}
<SettingsSection title={t("settings.providers.models.custom")} trailing={customTrailing}>
<View style={settingsStyles.card}>{customBody}</View>
@@ -205,6 +214,22 @@ export function ProviderModels({
);
}
/** How many models the provider reports, when it last reported them, and the way to ask again. */
function DiscoveredTrailing({ count, refresh }: { count: number; refresh: ProviderRefresh }) {
const checked = useCheckedLabel(refresh);
const facts = [count > 0 ? String(count) : null, checked].filter(Boolean).join(" · ");
return (
<View style={styles.headerTrailing}>
{facts ? (
<Text style={[settingsStyles.sectionHeaderTitle, styles.headerFacts]} numberOfLines={1}>
{facts}
</Text>
) : null}
<ProviderRefreshButton refresh={refresh} form="icon" />
</View>
);
}
function MutedRow({ children }: { children: string }) {
return (
<View style={styles.modelRow}>
@@ -367,15 +392,23 @@ function AddCustomModelSheet({
const ADD_SNAP_POINTS = ["40%"];
const styles = StyleSheet.create((theme) => ({
searchRail: {
// The search field sizes itself along a row.
searchRow: {
flexDirection: "row",
marginBottom: theme.spacing[3],
},
// Nine rows and part of a tenth, so a longer list visibly continues.
discoveredList: {
maxHeight: 320,
},
headerTrailing: {
flexDirection: "row",
alignItems: "center",
gap: theme.spacing[1],
},
// The facts give way before the button does.
headerFacts: {
flexShrink: 1,
},
modelRow: {
flexDirection: "row",
alignItems: "center",
@@ -0,0 +1,55 @@
import { RotateCw } from "lucide-react-native";
import { useTranslation } from "react-i18next";
import { Button } from "@/components/ui/button";
import { useTimeAgo } from "@/hooks/use-time-ago";
/** Asking the provider again for its status, version and models. */
export interface ProviderRefresh {
/** When the provider last answered. Absent before its first answer. */
checkedAt: string | undefined;
/** A check is running, whoever asked for it. */
busy: boolean;
run: () => void;
}
/** "Checked 5m ago", kept current, or nothing before the provider's first answer. */
export function useCheckedLabel(refresh: ProviderRefresh): string | undefined {
const { t } = useTranslation();
const time = useTimeAgo(refresh.checkedAt ? new Date(refresh.checkedAt) : null);
return refresh.checkedAt ? t("settings.providers.detail.checked", { time }) : undefined;
}
export function ProviderRefreshButton({
refresh,
form,
}: {
refresh: ProviderRefresh;
/** `icon` in a section header, `labelled` in a row. */
form: "icon" | "labelled";
}) {
const { t } = useTranslation();
const label = refresh.busy
? t("settings.providers.diagnostic.refreshing")
: t("settings.providers.diagnostic.refresh");
if (form === "icon")
return (
<Button
variant="ghost"
leftIcon={RotateCw}
onPress={refresh.run}
loading={refresh.busy}
accessibilityLabel={label}
testID="provider-refresh"
/>
);
return (
<Button
variant="outline"
onPress={refresh.run}
loading={refresh.busy}
testID="provider-refresh"
>
{label}
</Button>
);
}
@@ -29,7 +29,9 @@ import { EditingTextInput as TextInput } from "@/components/ui/text-input";
import { SettingsTextAreaCard } from "@/components/settings-textarea";
import { SettingsGroup } from "@/components/settings/headings/settings-group";
import { SettingsSection } from "@/components/settings/headings/settings-section";
import { SettingsBackLink, SettingsDetailHeader } from "@/components/settings";
import type { PageTitleParent } from "@/components/page-layout";
import { useIsCompactFormFactor } from "@/constants/layout";
import { SettingsDetailHeader } from "@/components/settings";
import { settingsStyles } from "@/styles/settings";
import { useProjects } from "@/hooks/use-projects";
import type { ProjectEditFormSnapshot } from "@/projects/edit-form";
@@ -95,14 +97,12 @@ export interface ProjectSettingsScreenProps {
serverId: string;
projectId: string;
onBackToProjects: () => void;
showBackToProjects: boolean;
}
export default function ProjectSettingsScreen({
serverId,
projectId,
onBackToProjects,
showBackToProjects,
}: ProjectSettingsScreenProps) {
const { projects } = useProjects();
const project = useMemo(
@@ -123,12 +123,7 @@ export default function ProjectSettingsScreen({
selectedHost.repoRoot.trim().length > 0;
if (!project || !selectedHost || !client || !canEdit) {
return (
<NoEditableTarget
onBackToProjects={onBackToProjects}
showBackToProjects={showBackToProjects}
/>
);
return <NoProject onBackToProjects={onBackToProjects} />;
}
return (
@@ -138,24 +133,29 @@ export default function ProjectSettingsScreen({
client={client}
isHostGone={isHostGone}
onBackToProjects={onBackToProjects}
showBackToProjects={showBackToProjects}
/>
);
}
function NoEditableTarget({
onBackToProjects,
showBackToProjects,
}: {
onBackToProjects: () => void;
showBackToProjects: boolean;
}) {
/** A project page with no project to name: the title is the way back to Projects. */
function NoProject({ onBackToProjects }: { onBackToProjects: () => void }) {
const parent = useProjectsParent(onBackToProjects);
return (
<>
<SettingsDetailHeader parent={parent} />
<NoEditableTarget onBackToProjects={onBackToProjects} />
</>
);
}
function NoEditableTarget({ onBackToProjects }: { onBackToProjects: () => void }) {
const { t } = useTranslation();
// The compact back header already goes back to Projects.
const isCompact = useIsCompactFormFactor();
return (
<View style={styles.noTargetContainer}>
{showBackToProjects ? <BackToProjectsButton onPress={onBackToProjects} /> : null}
<Text style={styles.noTargetText}>{t("settings.project.noEditableTarget")}</Text>
{showBackToProjects ? (
{isCompact ? null : (
<Button
testID="project-settings-back-button"
onPress={onBackToProjects}
@@ -163,19 +163,22 @@ function NoEditableTarget({
>
{t("settings.project.backToProjects")}
</Button>
) : null}
)}
</View>
);
}
function BackToProjectsButton({ onPress }: { onPress: () => void }) {
/** Projects as the first part of a project page's title, which goes back to the list. */
function useProjectsParent(onPress: () => void): PageTitleParent {
const { t } = useTranslation();
return (
<SettingsBackLink
label={t("settings.project.backToProjects")}
onPress={onPress}
testID="project-settings-back-link"
/>
return useMemo(
() => ({
label: t("settings.projects"),
accessibilityLabel: t("settings.project.backToProjects"),
onPress,
testID: "project-settings-back-link",
}),
[onPress, t],
);
}
@@ -185,7 +188,6 @@ interface ProjectSettingsBodyProps {
client: DaemonClient;
isHostGone: boolean;
onBackToProjects: () => void;
showBackToProjects: boolean;
}
function ProjectSettingsBody({
@@ -194,7 +196,6 @@ function ProjectSettingsBody({
client,
isHostGone,
onBackToProjects,
showBackToProjects,
}: ProjectSettingsBodyProps) {
const { t } = useTranslation();
const [isEditSheetOpen, setIsEditSheetOpen] = useState(false);
@@ -256,17 +257,7 @@ function ProjectSettingsBody({
const handleReload = useCallback(() => {
void readQuery.refetch();
}, [readQuery]);
const backLink = useMemo(
() =>
showBackToProjects
? {
label: t("settings.project.backToProjects"),
onPress: onBackToProjects,
testID: "project-settings-back-link",
}
: undefined,
[onBackToProjects, showBackToProjects, t],
);
const parent = useProjectsParent(onBackToProjects);
const titleIcon = useMemo(
() => (
<ProjectTitleIcon
@@ -294,9 +285,9 @@ function ProjectSettingsBody({
);
return (
<View role="main" style={styles.body}>
<View role="main">
<SettingsDetailHeader
back={backLink}
parent={parent}
icon={titleIcon}
title={selectedHost.projectName}
trailing={editButton}
@@ -327,7 +318,6 @@ function ProjectSettingsBody({
onReload: handleReload,
isHostGone,
onBackToProjects,
showBackToProjects,
})}
</View>
);
@@ -345,7 +335,6 @@ interface RenderContentInput {
onReload: () => void;
isHostGone: boolean;
onBackToProjects: () => void;
showBackToProjects: boolean;
}
function renderContent({
@@ -360,7 +349,6 @@ function renderContent({
onReload,
isHostGone,
onBackToProjects,
showBackToProjects,
}: RenderContentInput) {
if (readQuery.isLoading) {
return (
@@ -379,12 +367,7 @@ function renderContent({
}
if (isHostGone) {
return (
<NoEditableTarget
onBackToProjects={onBackToProjects}
showBackToProjects={showBackToProjects}
/>
);
return <NoEditableTarget onBackToProjects={onBackToProjects} />;
}
if (!loadedConfig) {
@@ -1118,10 +1101,6 @@ const styles = StyleSheet.create((theme) => ({
color: theme.colors.foregroundMuted,
fontSize: theme.fontSize.base,
},
body: {
padding: theme.spacing[4],
gap: theme.spacing[2],
},
editButton: {
padding: theme.spacing[1],
},
+2 -3
View File
@@ -1335,7 +1335,6 @@ export default function SettingsScreen({ view }: SettingsScreenProps) {
serverId={view.serverId}
projectId={view.projectId}
onBackToProjects={handleBackFromDetail}
showBackToProjects={!isCompactLayout}
/>
);
}
@@ -1345,7 +1344,6 @@ export default function SettingsScreen({ view }: SettingsScreenProps) {
serverId={view.serverId}
provider={view.providerId}
onBack={handleBackFromDetail}
showBack={!isCompactLayout}
/>
);
}
@@ -1450,7 +1448,8 @@ export default function SettingsScreen({ view }: SettingsScreenProps) {
<WindowChromeRegion corners="top-right">
<View style={desktopStyles.contentPane} testID="settings-detail-pane">
<PageLayout
title={detailTitle}
// A project or provider page draws its own title, which names the list it came from.
title={view.kind === "project" || view.kind === "provider" ? undefined : detailTitle}
actions={detailActions}
width={detailWidth}
titleTestID="settings-detail-header-title"
+3
View File
@@ -1,4 +1,5 @@
import { StyleSheet } from "react-native-unistyles";
import { mapLayout, SWITCH_HEIGHT } from "@/components/ui/control-geometry";
export const settingsStyles = StyleSheet.create((theme) => ({
section: {
@@ -34,6 +35,8 @@ export const settingsStyles = StyleSheet.create((theme) => ({
justifyContent: "space-between",
paddingVertical: theme.spacing[4],
paddingHorizontal: theme.spacing[4],
// As tall as a row holding a switch, so rows with and without one line up.
minHeight: mapLayout(SWITCH_HEIGHT, (height) => height + theme.spacing[4] * 2),
},
rowBorder: {
borderTopWidth: 1,
+2
View File
@@ -39,6 +39,8 @@ export interface ProviderRegistration {
description?: string;
/** Plugin-directory-relative path to a self-contained SVG file. */
icon?: string;
/** http(s) page that helps users set up and troubleshoot the provider. Paseo opens it. */
docsUrl?: string;
/** How users install the provider's CLI and which version they run. Every member is optional. */
installation?: ProviderInstallation;
connect(request: ProviderConnectRequest): Promise<ProviderConnection>;
+2
View File
@@ -133,6 +133,8 @@ export interface ProviderSnapshotEntry {
label?: string;
description?: string;
iconSvg?: string;
/** The page that helps users set up and troubleshoot this provider. */
docsUrl?: string;
defaultModeId?: string | null;
}
+1
View File
@@ -429,6 +429,7 @@ export const ProviderSnapshotEntrySchema = z.object({
label: z.string().optional(),
description: z.string().optional(),
iconSvg: z.string().optional(),
docsUrl: z.string().optional(),
defaultModeId: z.string().nullable().optional(),
});
@@ -25,6 +25,8 @@ export interface AgentProviderDefinition {
id: string;
label: string;
description: string;
/** The page that helps users set up and troubleshoot this provider. */
docsUrl?: string;
enabledByDefault?: boolean;
defaultModeId: string | null;
modes: AgentProviderModeDefinition[];
@@ -199,6 +201,7 @@ export const AGENT_PROVIDER_DEFINITIONS: AgentProviderDefinition[] = [
id: "claude",
label: "Claude",
description: "Anthropic's multi-tool assistant with MCP support, streaming, and deep reasoning",
docsUrl: "https://paseo.sh/docs/supported-providers/claude-code",
defaultModeId: "auto",
modes: CLAUDE_MODES,
voice: {
@@ -211,6 +214,7 @@ export const AGENT_PROVIDER_DEFINITIONS: AgentProviderDefinition[] = [
id: "codex",
label: "Codex",
description: "OpenAI's Codex workspace agent with sandbox controls and optional network access",
docsUrl: "https://paseo.sh/docs/supported-providers/codex",
defaultModeId: "auto-review",
modes: CODEX_MODES,
voice: {
@@ -223,6 +227,7 @@ export const AGENT_PROVIDER_DEFINITIONS: AgentProviderDefinition[] = [
id: "copilot",
label: "Copilot",
description: "GitHub Copilot via Agent Client Protocol with dynamic modes and session support",
docsUrl: "https://paseo.sh/docs/supported-providers/github-copilot",
defaultModeId: "https://agentclientprotocol.com/protocol/session-modes#agent",
modes: COPILOT_MODES,
},
@@ -230,6 +235,7 @@ export const AGENT_PROVIDER_DEFINITIONS: AgentProviderDefinition[] = [
id: "opencode",
label: "OpenCode",
description: "Open-source coding assistant with multi-provider model support",
docsUrl: "https://paseo.sh/docs/supported-providers/opencode",
// No static default: OpenCode users can rename or delete any agent,
// including "build". Leaving this unset means the daemon and OpenCode
// itself decide (see normalizeOpenCodeModeId in opencode-agent.ts).
@@ -244,6 +250,7 @@ export const AGENT_PROVIDER_DEFINITIONS: AgentProviderDefinition[] = [
id: "pi",
label: "Pi",
description: "Minimal terminal-based coding agent with multi-provider LLM support",
docsUrl: "https://paseo.sh/docs/supported-providers/pi",
defaultModeId: null,
modes: [],
},
@@ -251,6 +258,7 @@ export const AGENT_PROVIDER_DEFINITIONS: AgentProviderDefinition[] = [
id: "omp",
label: "Oh My Pi",
description: "Multi-provider coding agent with native approvals, host tools, and subagents",
docsUrl: "https://paseo.sh/docs/supported-providers/omp",
enabledByDefault: false,
defaultModeId: "full",
modes: OMP_MODES,
@@ -9,7 +9,7 @@ import type {
ToolPolicy,
} from "@getpaseo/protocol/agent-types";
import type { AgentMessage } from "@getpaseo/protocol/agent-message";
import type { AgentAttachment } from "@getpaseo/protocol/messages";
import type { AgentAttachment, ProviderInstallationInspection } from "@getpaseo/protocol/messages";
import type {
ProviderInspection,
ProviderUpdateCheck,
@@ -142,6 +142,8 @@ export interface ProviderSnapshotEntry {
label?: string;
description?: string;
iconSvg?: string;
/** The page that helps users set up and troubleshoot this provider. */
docsUrl?: string;
defaultModeId?: string | null;
}
@@ -851,6 +853,15 @@ export interface AgentClientUpdateContext extends AgentClientInstallationContext
report(event: ProviderUpdateReport): void;
}
/** What the daemon gives a provider's diagnostic report. */
export interface AgentClientDiagnosticContext {
/**
* The installation as the provider's Installation row shows it, under the same deadline and
* cache. Undefined when the provider does not report its installation.
*/
inspectInstallation(): Promise<ProviderInstallationInspection | undefined>;
}
export interface AgentClient {
resolveUsageLaunch?(): Promise<
import("@getpaseo/plugin/server/provider").ProviderLaunch | undefined
@@ -916,7 +927,7 @@ export interface AgentClient {
* Returns true if available, false otherwise.
*/
isAvailable(signal?: AbortSignal, options?: FetchCatalogOptions): Promise<boolean>;
getDiagnostic?(): Promise<{ diagnostic: string }>;
getDiagnostic?(context: AgentClientDiagnosticContext): Promise<{ diagnostic: string }>;
/**
* Installation links and the installed version. The same contract as plugin providers'
* `ProviderRegistration.installation`; built-ins resolve their own launch inside `inspect`.
@@ -2498,6 +2498,9 @@ describe("pending provider responses", () => {
);
});
/** A diagnostic context for a provider that does not report its installation. */
const NO_INSTALLATION = { inspectInstallation: async () => undefined };
describe("plugin provider launch and status", () => {
test("resolves the executable against the provider's PATH override", async () => {
const harness = createProviderHarness();
@@ -2509,7 +2512,13 @@ describe("plugin provider launch and status", () => {
const definition = registry.definitions()[registration.id]!;
const client = definition.createClient(logger, { env: { PATH: "/paseo-nonexistent-bin" } });
expect(await client.isAvailable()).toBe(false);
expect(await client.getDiagnostic!()).toEqual({ diagnostic: "node not found on PATH" });
const report = (await client.getDiagnostic!(NO_INSTALLATION)).diagnostic.split("\n");
expect(report[0]).toBe("Plugin direct");
expect(report).toContain(" Daemon PATH: /paseo-nonexistent-bin");
expect(report.slice(-2)).toEqual([
" Resolved path: not found",
" Error: node not found on PATH",
]);
} finally {
await registry.shutdown();
}
@@ -2589,6 +2598,51 @@ describe("plugin provider launch and status", () => {
}
});
test("the diagnostic reports the launch, the version and the provider's own rows", async () => {
const harness = createProviderHarness();
const registration: ProviderRegistration = {
...harness.registration,
command: [process.execPath, "agent"],
async status() {
return { available: true, diagnostic: "Sign-in: work account\nPlan: Pro" };
},
};
const registry = new PluginAgentClientRegistry(createTestLogger());
registry.replace([registration]);
try {
const client = registry.clients()[registration.id]!;
const { diagnostic } = await client.getDiagnostic!({
inspectInstallation: async () => ({ status: "installed", version: "1.2.3" }),
});
// The daemon's PATH and shell rows depend on the host; the formatter's own tests cover them.
const hostRows = /^ {2}Daemon (PATH|shell): /;
expect(diagnostic.split("\n").filter((row) => !hostRows.test(row))).toEqual([
"Plugin direct",
" Command source: default",
` Configured command: ${process.execPath} agent`,
" PATH matches: not checked",
` Resolved path: ${process.execPath}`,
" Version: 1.2.3",
" Sign-in: work account",
" Plan: Pro",
]);
} finally {
await registry.shutdown();
}
});
test("a provider without a command reports only its own rows", async () => {
const harness = createProviderHarness();
const registry = new PluginAgentClientRegistry(createTestLogger());
registry.replace([harness.registration]);
try {
const client = registry.clients()[harness.registration.id]!;
expect(await client.getDiagnostic!(NO_INSTALLATION)).toEqual({ diagnostic: "Plugin direct" });
} finally {
await registry.shutdown();
}
});
test("a missing executable is unavailable with a diagnostic without connecting", async () => {
const harness = createProviderHarness();
const registration: ProviderRegistration = {
@@ -2600,9 +2654,13 @@ describe("plugin provider launch and status", () => {
try {
const client = registry.clients()[registration.id]!;
expect(await client.isAvailable()).toBe(false);
expect(await client.getDiagnostic!()).toEqual({
diagnostic: "paseo-nonexistent-provider-executable not found on PATH",
});
const report = (await client.getDiagnostic!(NO_INSTALLATION)).diagnostic.split("\n");
expect(report).toContain(" Configured command: paseo-nonexistent-provider-executable");
expect(report).toContain(" PATH matches: none");
expect(report.slice(-2)).toEqual([
" Resolved path: not found",
" Error: paseo-nonexistent-provider-executable not found on PATH",
]);
expect(harness.inputs).toEqual([]);
} finally {
await registry.shutdown();
@@ -4,6 +4,7 @@ import { PluginSessionHistory } from "./plugin-session-history.js";
import { resolve as resolvePath } from "node:path";
import type { Logger } from "pino";
import type { JsonValue, ProviderOptions } from "@getpaseo/protocol/agent-types";
import type { ProviderInstallationInspection } from "@getpaseo/protocol/messages";
import { z } from "zod";
import {
PROVIDER_CAPABILITIES,
@@ -65,6 +66,7 @@ import type {
ProviderRefreshContext,
SteerActiveTurnOptions,
SteerResult,
AgentClientDiagnosticContext,
} from "./agent-sdk-types.js";
import {
resolveProviderLaunch,
@@ -73,6 +75,11 @@ import {
type ProviderRuntimeSettings,
} from "./provider-launch-config.js";
import { readPluginOptionState } from "./plugin-provider-options.js";
import {
buildCommandResolutionDiagnosticRows,
formatProviderDiagnostic,
type DiagnosticEntry,
} from "./providers/diagnostic-utils.js";
import type { RegisteredProviderDefinition } from "./provider-registry.js";
import { runProviderTurn } from "./providers/provider-runner.js";
import { StaleProviderSessionError } from "./stale-provider-session-error.js";
@@ -136,6 +143,12 @@ function isProviderRequestReply(
);
}
function describeVersion(inspection: ProviderInstallationInspection): string {
if (inspection.status === "not_installed") return "not installed";
if (inspection.status === "error") return `error: ${inspection.message}`;
return inspection.version?.trim() || "unknown";
}
class ProviderRuntime {
private connection: ProviderConnection | null = null;
connectedLaunch: ProviderLaunch | undefined;
@@ -165,8 +178,8 @@ class ProviderRuntime {
private readonly runtimeSettings?: ProviderRuntimeSettings,
) {}
/** The effective launch, including when its executable does not resolve. */
private async resolveEffectiveLaunch(): Promise<ProviderInstallationLaunch | undefined> {
/** The launch after overrides, and where its executable resolves. */
private async resolveConfiguredLaunch() {
const command = this.registration.command;
if (!command) return undefined;
const launch = await resolveProviderLaunch({
@@ -176,7 +189,14 @@ class ProviderRuntime {
if (launch.source !== "override") launch.args.unshift(...command.slice(1));
const env = createProviderEnv({ runtimeSettings: this.runtimeSettings });
launch.env = env;
const availability = await checkProviderLaunchAvailable(launch);
return { launch, env, availability: await checkProviderLaunchAvailable(launch) };
}
/** The effective launch, including when its executable does not resolve. */
private async resolveEffectiveLaunch(): Promise<ProviderInstallationLaunch | undefined> {
const configured = await this.resolveConfiguredLaunch();
if (!configured) return undefined;
const { launch, env, availability } = configured;
if (!availability.resolvedPath)
return { command: launch.command, args: launch.args, env, resolved: false };
return {
@@ -224,6 +244,24 @@ class ProviderRuntime {
return await update.call(this.registration.installation, { ...context, launch });
}
/** What the daemon launches, where it found the executable and which version it runs. */
async launchDiagnosticRows(context: AgentClientDiagnosticContext): Promise<DiagnosticEntry[]> {
const configured = await this.resolveConfiguredLaunch();
if (!configured) return [];
const { launch, env, availability } = configured;
const rows = [
...(await buildCommandResolutionDiagnosticRows(launch, {
knownBinaryNames: [launch.command],
pathValue: env.PATH,
})),
{ label: "Resolved path", value: availability.resolvedPath ?? "not found" },
];
if (!availability.resolvedPath) return rows;
const inspection = await context.inspectInstallation();
if (inspection) rows.push({ label: "Version", value: describeVersion(inspection) });
return rows;
}
async status(): Promise<ProviderStatus> {
try {
const launch = await this.resolveLaunch();
@@ -1000,6 +1038,7 @@ function createPluginProviderDefinition(
label: registration.label,
description: registration.description ?? `Plugin provider ${registration.label}`,
iconSvg: registration.icon,
docsUrl: registration.docsUrl,
requiresConfiguration: registration.requiresConfiguration,
defaultModeId: null,
modes: [],
@@ -1015,6 +1054,7 @@ interface PendingChild {
class PluginAgentClient implements AgentClient {
readonly provider: string;
private readonly label: string;
private readonly runtime: ProviderRuntime;
private readonly rootsBySession = new Map<string, PluginAgentSession>();
private readonly pendingChildren: PendingChild[] = [];
@@ -1024,6 +1064,7 @@ class PluginAgentClient implements AgentClient {
constructor(registration: ProviderRegistration, runtimeSettings?: ProviderRuntimeSettings) {
this.provider = registration.id;
this.label = registration.label;
this.runtime = new ProviderRuntime(registration, runtimeSettings);
if (registration.getCatalogCacheKey)
this.getCatalogCacheKey = (options) => this.runtime.catalogCacheKey(options);
@@ -1109,9 +1150,20 @@ class PluginAgentClient implements AgentClient {
return await this.runtime.isAvailable();
}
async getDiagnostic(): Promise<{ diagnostic: string }> {
const status = await this.runtime.status();
return { diagnostic: status.diagnostic ?? "Provider is available" };
async getDiagnostic(context: AgentClientDiagnosticContext): Promise<{ diagnostic: string }> {
const [rows, status] = await Promise.all([
this.runtime.launchDiagnosticRows(context),
this.runtime.status(),
]);
const report = [formatProviderDiagnostic(this.label, rows)];
if (!status.available) report.push(` Error: ${status.diagnostic}`);
// An available provider adds its own rows, one per line.
else if (status.diagnostic) {
for (const line of status.diagnostic.split("\n")) {
if (line.trim()) report.push(` ${line.trim()}`);
}
}
return { diagnostic: report.join("\n") };
}
async listImportableSessions(
@@ -217,12 +217,14 @@ describe("ProviderSnapshotManager public surface", () => {
}
});
test("carries a plugin provider icon in snapshot metadata", () => {
test("carries a plugin provider icon and docs link in snapshot metadata", () => {
const iconSvg = '<svg viewBox="0 0 24 24"><path d="M4 4h16v16H4z" /></svg>';
const docsUrl = "https://example.com/docs";
const registration: ProviderRegistration = {
id: "icon-provider",
label: "Icon Provider",
icon: iconSvg,
docsUrl,
async connect() {
throw new Error("not opened by this test");
},
@@ -233,7 +235,13 @@ describe("ProviderSnapshotManager public surface", () => {
manager.replacePluginProviders([registration]);
expect(manager.getSnapshot("/tmp/project").records.map(({ entry }) => entry)).toContainEqual(
expect.objectContaining({ provider: "icon-provider", iconSvg }),
expect.objectContaining({ provider: "icon-provider", iconSvg, docsUrl }),
);
expect(manager.getSnapshot("/tmp/project").records.map(({ entry }) => entry)).toContainEqual(
expect.objectContaining({
provider: "claude",
docsUrl: "https://paseo.sh/docs/supported-providers/claude-code",
}),
);
} finally {
manager.destroy();
@@ -1038,6 +1046,40 @@ describe("ProviderSnapshotManager public surface", () => {
}
});
test("getProviderDiagnostic gives the client the installation that the Installation row shows", async () => {
let inspections = 0;
const client = createExtraClient("codex", {
installation: {
async inspect() {
inspections += 1;
return { status: "installed", version: `1.0.${inspections}` };
},
},
async getDiagnostic(context) {
const inspection = await context.inspectInstallation();
return {
diagnostic: `codex ${inspection?.status === "installed" ? inspection.version : "?"}`,
};
},
});
const manager = new ProviderSnapshotManager({
logger: createTestLogger(),
extraClients: { codex: client },
});
try {
const { diagnostic } = await manager.getProviderDiagnostic("codex");
expect(diagnostic).toContain("codex 1.0.1");
// The report refreshed the installation, so the Installation row reads the same answer.
expect((await manager.installations.inspect("codex"))?.inspection).toEqual({
status: "installed",
version: "1.0.1",
});
expect(inspections).toBe(1);
} finally {
manager.destroy();
}
});
test("getProviderDiagnostic force-refreshes the snapshot and appends models/status", async () => {
const catalogModels: AgentModelDefinition[] = [
{ provider: "codex", id: "gpt-5.4-mini", label: "GPT 5.4 Mini" },
@@ -907,7 +907,11 @@ export class ProviderSnapshotManager {
if (client.getDiagnostic) {
return (
await withTimeout(
client.getDiagnostic(),
client.getDiagnostic({
// The report and the Installation row show one answer for the version.
inspectInstallation: async () =>
(await this.installations.inspect(provider, { refresh: true }))?.inspection,
}),
this.diagnosticTimeoutMs,
`Timed out collecting ${definition.label ?? provider} diagnostic after ${
this.diagnosticTimeoutMs
@@ -952,6 +956,7 @@ export class ProviderSnapshotManager {
label: definition.label,
description: definition.description,
iconSvg: definition.iconSvg,
docsUrl: definition.docsUrl,
defaultModeId: definition.defaultModeId ?? null,
}),
});
@@ -434,6 +434,7 @@ describe("PluginService", () => {
"provider-installation",
`export default function contribute(server) {
server.registerProvider({ id: "plugin-agent", label: "Plugin agent", command: ["agent"],
docsUrl: "https://example.com/docs",
installation: {
installUrl: "https://example.com/install",
updateUrl: "https://example.com/update",
@@ -472,6 +473,7 @@ describe("PluginService", () => {
try {
if (runtime === "subprocess") await service.installDirectory({ path: directory });
const [registration] = service.getProviderRegistrations();
expect(registration!.docsUrl).toBe("https://example.com/docs");
const installation = registration!.installation!;
expect(installation).toMatchObject({
installUrl: "https://example.com/install",
@@ -554,6 +556,33 @@ describe("PluginService", () => {
expect(await provider.getCatalogCacheKey!({ scope: "global" })).toBeUndefined();
});
it("fails a plugin whose provider docs link is not an http(s) page", async () => {
const home = await mkdtemp(path.join(tmpdir(), "paseo-plugin-home-"));
roots.push(home);
const directory = await createPlugin(
"provider-docs-link",
`export default function contribute(server) {
server.registerProvider({
id: "plugin-agent",
label: "Plugin agent",
docsUrl: "file:///etc/passwd",
async connect() { throw new Error("not opened by this test"); },
});
return () => {};
}`,
);
const service = createService(home);
await service.start();
await service.installDirectory({ path: directory }).catch(() => undefined);
expect(service.getProviderRegistrations()).toEqual([]);
expect(await service.listPlugins()).toMatchObject([
{ status: "failed", error: "Plugin provider plugin-agent docsUrl must be an http(s) URL" },
]);
await service.stopAllPlugins();
});
it("publishes provider registrations only while their plugin is running", async () => {
const home = await mkdtemp(path.join(tmpdir(), "paseo-plugin-home-"));
roots.push(home);
@@ -773,6 +773,7 @@ export class PluginService {
id: provider.id,
label: provider.label,
description: provider.description,
docsUrl: provider.docsUrl,
command: provider.command,
requiresConfiguration: provider.requiresConfiguration,
status: provider.hasStatus
@@ -28,6 +28,7 @@ export interface PluginProviderMetadata {
label: string;
description?: string;
iconPath?: string;
docsUrl?: string;
}
export interface PluginProviderInstallationMetadata {
@@ -176,6 +177,7 @@ const providerMetadataSchema = z
label: z.string().min(1),
description: z.string().optional(),
iconPath: z.string().optional(),
docsUrl: z.string().optional(),
requiresConfiguration: z.boolean().optional(),
hasCatalogCacheKey: z.boolean().optional(),
hasStatus: z.boolean().optional(),
@@ -207,6 +207,11 @@ export function createPluginWorker(options: {
}
if (provider.status !== undefined && typeof provider.status !== "function")
throw new Error(`Invalid status callback for plugin provider ${id}`);
if (
provider.docsUrl !== undefined &&
(typeof provider.docsUrl !== "string" || !isHttpUrl(provider.docsUrl))
)
throw new Error(`Plugin provider ${id} docsUrl must be an http(s) URL`);
validateProviderInstallation(id, provider.installation);
if (
provider.command !== undefined &&
@@ -270,6 +275,7 @@ export function createPluginWorker(options: {
label: provider.label,
description: provider.description,
iconPath: provider.icon,
docsUrl: provider.docsUrl,
requiresConfiguration: provider.requiresConfiguration,
hasCatalogCacheKey: provider.getCatalogCacheKey !== undefined,
hasStatus: provider.status !== undefined,
@@ -39,6 +39,50 @@ it("reports a CLI without the acp subcommand as unavailable", async () => {
});
});
const minimalAcpAgent = `
const { createInterface } = require("node:readline");
createInterface({ input: process.stdin }).on("line", (line) => {
const { id, method } = JSON.parse(line);
if (method === "initialize")
process.stdout.write(JSON.stringify({ jsonrpc: "2.0", id, result: { protocolVersion: 1, agentCapabilities: {} } }) + "\\n");
});
`;
describe("diagnostic", () => {
it("says agy runs outside an SSH session when the daemon has no SSH variables", async () => {
const { launch } = await launchAgent(minimalAcpAgent);
expect(await createAntigravityProvider().status!({ launch })).toEqual({
available: true,
diagnostic: "SSH session: no\nSign-in: can differ from agy over SSH",
});
});
it.each(["SSH_CONNECTION", "SSH_CLIENT", "SSH_TTY"])(
"says agy runs in an SSH session when the daemon has %s",
async (variable) => {
const { launch } = await launchAgent(minimalAcpAgent);
const env = { ...launch.env, [variable]: "set" };
expect(await createAntigravityProvider().status!({ launch: { ...launch, env } })).toEqual({
available: true,
diagnostic: `SSH session: yes (${variable})\nSign-in: can differ from agy outside SSH`,
});
},
);
it("says whether agy runs in an SSH session when ACP does not start", async () => {
const { launch } = await launchAgent(`process.exit(1);`);
const env = { ...launch.env, SSH_CONNECTION: "set" };
expect(await createAntigravityProvider().status!({ launch: { ...launch, env } })).toEqual({
available: false,
diagnostic: [
"Antigravity ACP did not start. Install Antigravity 1.5.0 or later. If you override the command, include the acp subcommand.",
"SSH session: yes (SSH_CONNECTION)",
"Sign-in: can differ from agy outside SSH",
].join("\n"),
});
});
});
it("publishes Antigravity skills separately from built-in commands", async () => {
const { directory, launch } = await launchAgent(`
const { createInterface } = require("node:readline");
@@ -154,7 +198,7 @@ it.each([true, false])(
});
`);
const provider = createAntigravityProvider();
expect(await provider.status!({ launch })).toEqual({ available: true });
expect(await provider.status!({ launch })).toMatchObject({ available: true });
const connection = await provider.connect({
launch,
versions: [1],
@@ -86,6 +86,21 @@ async function readAgyVersion(
return /\b\d+\.\d+\.\d+\S*/.exec(stdout)?.[0] ?? (firstLine || undefined);
}
// agy 1.5.14 reads its sign-in from a token file when any of these is set, and from the OS keyring
// otherwise. https://github.com/google-antigravity/antigravity-cli/issues/1336
const sshSessionVariables = ["SSH_CONNECTION", "SSH_CLIENT", "SSH_TTY"];
/**
* Report rows that say whether agy runs in an SSH session, because that decides which sign-in it
* uses. The report does not wrap, so each row stays short enough to read without scrolling.
*/
function describeSignIn(env: Readonly<Record<string, string>>): string {
const variable = sshSessionVariables.find((name) => env[name]);
return variable
? `SSH session: yes (${variable})\nSign-in: can differ from agy outside SSH`
: "SSH session: no\nSign-in: can differ from agy over SSH";
}
export function createAntigravityProvider(): ProviderRegistration {
const provider = runAcpProvider({
id: "antigravity",
@@ -127,6 +142,7 @@ export function createAntigravityProvider(): ProviderRegistration {
});
return {
...provider,
docsUrl: "https://paseo.sh/docs/supported-providers/antigravity#troubleshooting",
// agy documents no update command and no release source, so there is nothing to check or run.
installation: {
installUrl: "https://antigravity.google/docs/getting-started?tab=cli",
@@ -138,6 +154,8 @@ export function createAntigravityProvider(): ProviderRegistration {
},
async status({ launch }) {
if (!launch) return { available: false, diagnostic: "Install Antigravity 1.5.0 or later." };
// A sign-in problem can stop ACP from starting, so the report says which sign-in either way.
const signIn = describeSignIn(launch.env);
try {
const connection = await provider.connect({
launch,
@@ -145,12 +163,11 @@ export function createAntigravityProvider(): ProviderRegistration {
capabilities: [],
});
await connection.close();
return { available: true };
return { available: true, diagnostic: signIn };
} catch {
return {
available: false,
diagnostic:
"Antigravity ACP did not start. Install Antigravity 1.5.0 or later. If you override the command, include the acp subcommand.",
diagnostic: `Antigravity ACP did not start. Install Antigravity 1.5.0 or later. If you override the command, include the acp subcommand.\n${signIn}`,
};
}
},
+1
View File
@@ -13,5 +13,6 @@ export function createFxProvider(): ProviderRegistration {
command: ["fx", "acp"],
transformers: [fileToolTransformer],
}),
docsUrl: "https://paseo.sh/docs/supported-providers/fx",
};
}
@@ -15,6 +15,7 @@ export function createHopliteProvider(): ProviderRegistration {
acpOptions: { workspaceOnlyCatalog: true },
transformers: [runPhaseTransformer],
}),
docsUrl: "https://paseo.sh/docs/supported-providers/hoplite",
installation: createHopliteInstallation(),
};
}
+1
View File
@@ -48,6 +48,7 @@ export function createMuseProvider(
label: "Muse Code",
icon: "icon.svg",
command: ["muse"],
docsUrl: "https://paseo.sh/docs/supported-providers/muse-code",
installation: {
installUrl: "https://paseo.sh/docs/muse-code",
async inspect({ launch, signal }) {
+31
View File
@@ -548,6 +548,37 @@ version, so a CLI updated outside Paseo is checked again once the inspection exp
`update` has no deadline. `signal` aborts when Paseo stops waiting or the daemon stops.
See the [`installation` reference](/docs/plugins/reference#provider-installation) for every field.
## Help users fix problems
A user who gets a wrong result opens the provider's settings before they ask for help. Give that
page what they need: declare `docsUrl`, and return the facts that explain a wrong result from
`status`.
```ts
export function createProvider(): ProviderRegistration {
return {
id: "example-agent",
label: "Example Agent",
command: ["example-agent"],
docsUrl: "https://example.com/docs/paseo#troubleshooting",
async status({ launch }) {
if (!launch) return { available: false, diagnostic: "example-agent has no command" };
return { available: true, diagnostic: `Profile: ${launch.env.EXAMPLE_PROFILE ?? "default"}` };
},
async connect(request) {
// ...
},
};
}
```
**Docs** opens `docsUrl`. **Diagnostic report** shows the command, the path of the executable and
the version that Paseo found, then your `Profile` row. Report what the CLI reads from its
environment, such as the account, the profile, or the configuration file in use. Those differ
between the daemon and the user's terminal, and the user cannot see them from the app.
See the [troubleshooting reference](/docs/plugins/reference#provider-troubleshooting) for the rows
that Paseo writes and for the rules of `status`.
## Adapt an ACP agent
Use the ACP shim when the agent already speaks ACP:
+24
View File
@@ -449,6 +449,30 @@ Paseo 把版本当作文本。它按原样显示 `version` 和 `versions`,从
Paseo 在设置打开时调用 `inspect`,并把结果保留 30 秒。只要 `inspect` 报告的版本不变,它就把 `checkForUpdates` 的 `current` 或 `available` 结果保留一小时,所以在 Paseo 之外更新的 CLI 会在 `inspect` 的结果过期后重新检查。`inspect` 必须在 20 秒内回答,`checkForUpdates` 必须在 25 秒内回答。`update` 没有期限。当 Paseo 停止等待或 daemon 停止时,`signal` 会中止。每个字段见 [`installation` 参考](/docs/plugins/reference#provider-installation)。
## 帮助用户解决问题 {#help-users-fix-problems}
用户得到错误结果时,会先打开 Provider 的设置,然后才去寻求帮助。请在这个页面提供他们需要的内容:声明 `docsUrl`,并从 `status` 返回能解释错误结果的事实。
```ts
export function createProvider(): ProviderRegistration {
return {
id: "example-agent",
label: "Example Agent",
command: ["example-agent"],
docsUrl: "https://example.com/docs/paseo#troubleshooting",
async status({ launch }) {
if (!launch) return { available: false, diagnostic: "example-agent has no command" };
return { available: true, diagnostic: `Profile: ${launch.env.EXAMPLE_PROFILE ?? "default"}` };
},
async connect(request) {
// ...
},
};
}
```
**文档** 会打开 `docsUrl`。**诊断报告** 会显示命令、可执行文件的路径和 Paseo 找到的版本,然后是你的 `Profile` 行。请报告 CLI 从环境中读取的内容,例如账号、profile 或正在使用的配置文件。这些内容在 daemon 和用户的终端之间可能不同,用户在应用中也看不到。Paseo 写入的各行以及 `status` 的规则见[故障排查参考](/docs/plugins/reference#provider-troubleshooting)。
## 适配 ACP Agent {#adapt-an-acp-agent}
当 Agent 已经支持 ACP 时,使用 ACP 适配层:
+38
View File
@@ -518,6 +518,44 @@ shapes is an error. **Update** appears once `inspect` reports the CLI installed
`update`, whatever `checkForUpdates` answers and whether you declare it; without `update`, Paseo
offers `updateUrl` on the same terms.
#### Provider troubleshooting
**Requires Paseo 0.18.** Older versions ignore `docsUrl` and show only the `diagnostic` text.
The provider's settings have a **Troubleshooting** section with a **Diagnostic report** and
**Docs**. Users copy the report into a bug report, so put the facts
that explain a wrong result into it.
`ProviderRegistration.docsUrl` is the `http` or `https` page that **Docs** opens. Point it at the
page that says how to set up the provider and how to fix its common problems. The plugin fails to
start when it is another kind of URL. Paseo hides **Docs** when you declare none.
The report is your provider's `label` and one `Label: value` row per line. Paseo writes these rows:
| Row | Shown |
| -------------------------------------------------------------- | ---------------------------------------------------------------------- |
| `Command source`, `Configured command` | When you declare `command` |
| `Daemon PATH`, `Daemon shell`, `PATH matches`, `Resolved path` | When you declare `command` |
| `Version` | When Paseo found the executable and you declare `installation.inspect` |
| `Models`, `Status` | Always |
`status(request)` adds your rows after them. `request.launch` is the launch a session would use.
```ts
async status({ launch }) {
if (!launch) return { available: false, diagnostic: "example-agent has no command" };
const profile = launch.env.EXAMPLE_PROFILE ?? "default";
return { available: true, diagnostic: `Profile: ${profile}\nSign-in: ${signInSource(launch.env)}` };
}
```
| Answer | Result |
| ---------------------------------- | ------------------------------------------------------------------------------ |
| `{ available: true, diagnostic? }` | Each line of `diagnostic` is one row. Write each line as `Label: value`. |
| `{ available: false, diagnostic }` | The provider is unavailable. The report shows `diagnostic` in the `Error` row. |
Paseo calls `status` each time it checks whether the provider is available, not only for the
report. The report does not wrap lines, so write short rows.
### Usage sources
**Requires Paseo 0.11.** Register a source from your server entry with
+32
View File
@@ -422,6 +422,38 @@ Provider 设置中的 **刷新** 会跳过保留的结果,并清除失败的
Paseo 按原样显示 `version`、`versions` 和 `message`,不解析或排序它们。只要 `inspect` 报告的 `version` 不变,Paseo 会在最长一小时内复用 `current` 或 `available` 的结果。它保留 `report` 输出的最后 65,536 个字符。不符合这些结构的结果是错误。只要 `inspect` 报告 CLI 已安装且你声明了 `update`,就会出现 **更新**,与 `checkForUpdates` 的回答以及是否声明它无关;没有 `update` 时,Paseo 在同样条件下提供 `updateUrl`。
#### Provider 故障排查 {#provider-troubleshooting}
**需要 Paseo 0.18**。较旧的版本会忽略 `docsUrl`,并且只显示 `diagnostic` 文本。Provider 设置中有一个 **故障排查** 部分,其中包含 **诊断报告** 和 **文档**。用户会把报告复制到问题反馈中,所以请把能解释错误结果的事实写进报告。
`ProviderRegistration.docsUrl` 是 **文档** 打开的 `http` 或 `https` 页面。请让它指向说明如何设置该 Provider 以及如何解决常见问题的页面。它是其他类型的 URL 时,插件会启动失败。没有声明时,Paseo 会隐藏 **文档**。
报告由 Provider 的 `label` 和若干行组成,每行是一个 `Label: value`。Paseo 会写入以下各行:
| 行 | 显示条件 |
| -------------------------------------------------------------- | --------------------------------------------------------- |
| `Command source`、`Configured command` | 声明了 `command` |
| `Daemon PATH`、`Daemon shell`、`PATH matches`、`Resolved path` | 声明了 `command` |
| `Version` | Paseo 找到了可执行文件,且你声明了 `installation.inspect` |
| `Models`、`Status` | 始终显示 |
`status(request)` 会在这些行之后添加你的行。`request.launch` 是会话将使用的启动配置。
```ts
async status({ launch }) {
if (!launch) return { available: false, diagnostic: "example-agent has no command" };
const profile = launch.env.EXAMPLE_PROFILE ?? "default";
return { available: true, diagnostic: `Profile: ${profile}\nSign-in: ${signInSource(launch.env)}` };
}
```
| 结果 | 效果 |
| ---------------------------------- | ---------------------------------------------------------------- |
| `{ available: true, diagnostic? }` | `diagnostic` 的每一行是报告中的一行。每行请写成 `Label: value`。 |
| `{ available: false, diagnostic }` | Provider 不可用。报告在 `Error` 行中显示 `diagnostic`。 |
Paseo 每次检查 Provider 是否可用时都会调用 `status`,不只是在生成报告时。报告不会自动换行,所以每一行请写得简短。
### 用量来源 {#usage-sources}
**需要 Paseo 0.11**。在服务端入口中用 `server.registerUsageSource()` 注册一个来源。从 `@getpaseo/plugin/server/usage` 导入它的契约和辅助函数。
+74 -19
View File
@@ -1,6 +1,6 @@
---
title: Antigravity
description: Run Antigravity in Paseo through the official agy CLI over ACP.
description: Install and configure Antigravity for Paseo.
nav: Antigravity
order: 23
category: Providers
@@ -8,35 +8,90 @@ category: Providers
# Antigravity
Paseo runs Antigravity through the official Agent Client Protocol (`agy acp`) on your installed `agy` CLI. Paseo drives your local CLI with your existing sign-in instead of calling Google endpoints directly.
Run Antigravity in Paseo with your installed `agy` CLI and sign-in. This integration is not endorsed by Google.
## Getting started
Antigravity is built into Paseo and enabled by default. You do not need a plugin or extra configuration.
Install Antigravity CLI (`agy`) 1.5.0 or later on your daemon host, then run `agy` once to sign in. In Paseo, select **Antigravity**. The provider ships with Paseo, so you do not install a plugin.
1. Install the [Antigravity CLI](https://antigravity.google/docs/getting-started?tab=cli) (`agy`) version 1.5.0 or later on your daemon host.
2. Run `agy` in a terminal and sign in.
3. In Paseo, choose **Antigravity** when you start an agent.
If `agy` is outside your daemon's PATH, override its command in `~/.paseo/config.json`. Use `env` for provider-specific environment variables:
If `agy` is outside your daemon PATH, use a [command override](/docs/custom-providers#custom-binary) and keep `acp` in the arguments.
```json
{
"agents": {
"providers": {
"antigravity": {
"command": ["/absolute/path/to/agy", "acp", "--disable-telemetry"],
"env": { "EXAMPLE_VARIABLE": "value" }
}
}
}
}
```
If you already override the command, add `acp` to the command arguments. See [Custom providers](/docs/custom-providers) for command and environment overrides.
After the upgrade, a Hub trigger saved with an older model ID that includes the thinking level reports that its model is unavailable. In Hub, select the model and thinking level again.
## Permissions
Paseo connects to `agy acp` and shows the permission modes that the CLI provides. **Full access** is the default mode.
Paseo connects to `agy acp` and shows the permission modes the CLI offers. In **Default**, Paseo shows approval requests for edits and commands that Antigravity policy requires you to approve. In **Accept edits**, Antigravity approves workspace edits and still asks about commands that require approval. **Plan** lets Antigravity plan before it acts.
| Mode | Effect |
| ------------ | ----------------------------------------------------------------------------------------------------------------------- |
| Full access | Paseo approves tool requests that offer a single **Allow once** action. Antigravity still enforces its own tool policy. |
| Default | Paseo shows approval requests for edits and commands that Antigravity policy requires you to approve. |
| Accept edits | Antigravity approves workspace edits automatically and still asks about commands that require approval. |
| Plan | Antigravity plans before it acts. |
**Full access** is the default. Paseo approves tool requests that offer a single **Allow once** action. Antigravity still enforces its own tool policy. Existing chats saved in **Full access** keep that mode, and scheduled runs can use it without a person to approve each tool call.
Scheduled runs can use **Full access** without a person to approve each tool call. Finish or stop the current turn before you switch to or from **Full access**.
Finish or stop the current turn before you switch to or from **Full access**.
## Sessions and tools
- Paseo can import CLI sessions and restore conversation history when it reopens a chat.
- Antigravity publishes slash commands and skills, accepts image attachments, and receives the MCP servers configured for the agent.
- Send a follow-up after the current turn finishes, or interrupt the turn to change direction.
Paseo can import CLI sessions and restore conversation history when it reopens a chat. Antigravity publishes slash commands and accepts image attachments through ACP. It also receives the MCP servers configured for the agent.
After an upgrade, an older Hub trigger can report that its Antigravity model is unavailable. Open the trigger in Hub and select the model and thinking level again.
Send a follow-up after the current turn finishes, or interrupt the turn to change direction.
## Troubleshooting
In Paseo, open **Settings → Providers → Antigravity** and select **Diagnostic report**. The report shows the command that Paseo runs, where the daemon found `agy`, the `agy` version, the number of models, and whether `agy` runs in an SSH session.
### New models are missing
Paseo reads the model list from `agy` when the daemon starts and when you select **Refresh**. If your account gets new models after that, open **Settings → Providers → Antigravity** and select **Refresh**.
### Paseo shows different models than `agy models`
`agy` keeps two sign-ins on one machine. In an SSH session, `agy` reads its sign-in from a token file. Outside an SSH session, `agy` reads its sign-in from the keyring of the operating system. If the two sign-ins use different Google accounts, your terminal and Paseo show different models. [Antigravity CLI issue 1336](https://github.com/google-antigravity/antigravity-cli/issues/1336) tracks this behavior.
Paseo runs `agy` with the environment of the daemon. A daemon that you started from an SSH session runs `agy` in an SSH session. A daemon that a desktop session or a service manager started runs `agy` outside one. The `SSH session` row of the diagnostic report shows which one applies.
If the row shows `SSH session: no`, do these steps in a terminal on the daemon host:
1. List the models of the sign-in that Paseo uses:
```bash
env -u SSH_CONNECTION -u SSH_CLIENT -u SSH_TTY agy models
```
2. If the list is not the one you expect, start `agy` with the same sign-in:
```bash
env -u SSH_CONNECTION -u SSH_CLIENT -u SSH_TTY agy
```
3. Run `/logout`, then sign in with the account that has your plan.
4. In Paseo, open **Settings → Providers → Antigravity** and select **Refresh**.
If the row shows `SSH session: yes`, do the same steps in a terminal that is not an SSH session. Use `SSH_CONNECTION=1 agy models` in step 1 and `SSH_CONNECTION=1 agy` in step 2.
To keep both sign-ins and make Paseo use the one from your SSH terminal, set an SSH variable for the provider in `~/.paseo/config.json`:
```json
{
"agents": {
"providers": {
"antigravity": {
"env": { "SSH_CONNECTION": "paseo" }
}
}
}
}
```
Run `paseo reload`, then select **Refresh**. The row then shows `SSH session: yes (SSH_CONNECTION)`.
@@ -1,40 +1,95 @@
---
title: Antigravity
description: 通过官方 agy CLI 的 ACP 接口在 Paseo 中运行 Antigravity。
description: 为 Paseo 安装和配置 Antigravity。
nav: Antigravity
---
# Antigravity {#antigravity}
Paseo 通过你已安装的 `agy` CLI 提供的官方 Agent Client Protocol(`agy acp`)运行 Antigravity。Paseo 使用你现有的登录状态驱动本地 CLI,而不会直接调用 Google 端点。
使用你已安装的 `agy` CLI 和登录状态,在 Paseo 中运行 Antigravity。此集成未经 Google 认可。
## 开始使用 {#getting-started}
Antigravity 内置于 Paseo 且默认启用,无需安装插件或额外配置。
在 daemon 主机上安装 Antigravity CLI(`agy`)1.5.0 或更高版本,然后运行一次 `agy` 登录。在 Paseo 中选择 **Antigravity**。该 Provider 随 Paseo 一起提供,无需另外安装插件。
1. 在 daemon 主机上安装 1.5.0 或更高版本的 [Antigravity CLI](https://antigravity.google/docs/getting-started?tab=cli)(`agy`)。
2. 在终端中运行 `agy` 并登录。
3. 在 Paseo 中启动 Agent 时选择 **Antigravity**。
如果 `agy` 不在 daemon 的 PATH 中,请在 `~/.paseo/config.json` 中覆盖它的命令。使用 `env` 设置 Provider 专用的环境变量:
如果 `agy` 不在 daemon 的 PATH 中,请使用[命令覆盖](/docs/custom-providers#custom-binary),并在参数中保留 `acp`。
```json
{
"agents": {
"providers": {
"antigravity": {
"command": ["/absolute/path/to/agy", "acp", "--disable-telemetry"],
"env": { "EXAMPLE_VARIABLE": "value" }
}
}
}
}
```
如果你已覆盖命令,请在命令参数中加入 `acp`。命令和环境变量覆盖见[自定义 Provider](/docs/custom-providers)。
升级后,如果 Hub 中保存的触发器使用了包含思考级别的旧模型 ID,会提示模型不可用。请在 Hub 中重新选择模型和思考级别。
## 权限 {#permissions}
Paseo 连接到 `agy acp`,并显示 CLI 提供的权限模式。**Full access** 是默认模式。
Paseo 连接到 `agy acp`,并显示 CLI 提供的权限模式。在 **Default** 模式下,如果 Antigravity 的权限策略要求批准编辑或命令,Paseo 会显示审批请求。在 **Accept edits** 模式下,Antigravity 会自动批准工作区内的编辑,仍会询问是否批准需要审批的命令。**Plan** 模式让 Antigravity 先规划,再执行。
| 模式 | 效果 |
| ------------ | -------------------------------------------------------------------------------------------------- |
| Full access | 如果工具请求只提供一个 **Allow once** 操作,Paseo 会自动批准。Antigravity 仍会执行自己的工具策略。 |
| Default | 如果 Antigravity 的策略要求批准编辑或命令,Paseo 会显示审批请求。 |
| Accept edits | Antigravity 会自动批准工作区内的编辑,仍会询问需要审批的命令。 |
| Plan | Antigravity 先规划,再执行。 |
**Full access** 是默认模式。如果工具请求只提供一个 **Allow once** 操作,Paseo 会自动批准。Antigravity 仍会执行自己的工具策略。以前以 **Full access** 模式保存的聊天会保留该模式,计划任务也可以使用该模式,无需人为逐次审批。
定时任务可以使用 **Full access**,无需人为逐次审批工具调用。切换到 **Full access** 或从该模式切换到其他模式前,请先完成或停止当前轮次。
切换到 **Full access** 或从该模式切换到其他模式前,请先完成或停止当前轮次。
## 会话和工具 {#sessions-and-tools}
- Paseo 可以导入 CLI 会话,并在重新打开聊天时恢复对话历史。
- Antigravity 提供斜杠命令和技能、接收图片附件,也会使用为 Agent 配置的 MCP 服务器。
- 你可以在当前轮次结束后发送后续消息,也可以中断当前轮次来改变方向。
Paseo 可以导入 CLI 会话,并在重新打开聊天时恢复对话历史。Antigravity 通过 ACP 提供斜杠命令、接收图片附件,也会使用为 Agent 配置的 MCP 服务器。
升级 Paseo 后,较早的 Hub 触发器可能会提示其 Antigravity 模型不可用。请在 Hub 中打开该触发器,并重新选择模型和思考级别。
你可以在当前轮次结束后发送后续消息,也可以中断当前轮次来改变方向。
## 故障排查 {#troubleshooting}
在 Paseo 中打开 **设置 → Providers → Antigravity** 并选择 **诊断报告**。报告会显示 Paseo 运行的命令、daemon 找到 `agy` 的位置、`agy` 的版本、模型数量,以及 `agy` 是否在 SSH 会话中运行。
### 缺少新模型 {#new-models-are-missing}
Paseo 在 daemon 启动时和你选择 **刷新** 时从 `agy` 读取模型列表。如果你的账号在此之后获得了新模型,请打开 **设置 → Providers → Antigravity** 并选择 **刷新**。
### Paseo 显示的模型与 `agy models` 不同 {#paseo-shows-different-models-than-agy-models}
`agy` 在同一台机器上保存两份登录状态。在 SSH 会话中,`agy` 从 token 文件读取登录状态。在 SSH 会话之外,`agy` 从操作系统的密钥环读取登录状态。如果两份登录状态使用不同的 Google 账号,你的终端和 Paseo 会显示不同的模型。[Antigravity CLI issue 1336](https://github.com/google-antigravity/antigravity-cli/issues/1336) 跟踪此行为。
Paseo 使用 daemon 的环境运行 `agy`。从 SSH 会话启动的 daemon 会在 SSH 会话中运行 `agy`。由桌面会话或服务管理器启动的 daemon 会在 SSH 会话之外运行 `agy`。诊断报告中的 `SSH session` 行会显示当前属于哪种情况。
如果该行显示 `SSH session: no`,请在 daemon 主机的终端中执行以下步骤:
1. 列出 Paseo 所用登录状态下的模型:
```bash
env -u SSH_CONNECTION -u SSH_CLIENT -u SSH_TTY agy models
```
2. 如果列表与预期不符,请用同一份登录状态启动 `agy`:
```bash
env -u SSH_CONNECTION -u SSH_CLIENT -u SSH_TTY agy
```
3. 运行 `/logout`,然后用拥有你的订阅计划的账号登录。
4. 在 Paseo 中打开 **设置 → Providers → Antigravity** 并选择 **刷新**。
如果该行显示 `SSH session: yes`,请在非 SSH 会话的终端中执行相同步骤。第 1 步使用 `SSH_CONNECTION=1 agy models`,第 2 步使用 `SSH_CONNECTION=1 agy`。
如果想保留两份登录状态,并让 Paseo 使用 SSH 终端的那一份,请在 `~/.paseo/config.json` 中为该 Provider 设置一个 SSH 变量:
```json
{
"agents": {
"providers": {
"antigravity": {
"env": { "SSH_CONNECTION": "paseo" }
}
}
}
}
```
运行 `paseo reload`,然后选择 **刷新**。之后该行会显示 `SSH session: yes (SSH_CONNECTION)`。
+10 -16
View File
@@ -8,31 +8,25 @@ category: Providers
# Claude Code
Paseo runs Claude Code through the official `claude` CLI and the Claude Agent SDK. It uses your local installation and existing Claude account.
## Getting started
Claude Code is built into Paseo and enabled by default.
1. Install the [Claude Code CLI](https://code.claude.com/docs/en/setup#install-claude-code) on your daemon host.
2. Run `claude` in a terminal and sign in.
3. In Paseo, choose **Claude** when you start an agent.
If `claude` is outside your daemon PATH, use a [command override](/docs/custom-providers#custom-binary).
If your Claude login expires, sign in again in the Claude Code CLI and start a new session in Paseo. Running sessions keep the authentication they started with, so signing in again does not update an active session.
Paseo runs Claude Code through the official `claude` CLI using the Claude Agent SDK.
## Does Claude Code cost extra in Paseo?
No. Claude Code usage in Paseo counts against your normal Claude plan limits. It does not require a separate pool of Agent SDK credits.
You still need a Claude plan that includes Claude Code, and your plan's normal usage limits apply.
You still need a Claude plan that includes Claude Code, and your plan's usual usage limits apply.
## Getting started
Install and sign in to the Claude Code CLI on the machine running Paseo. Paseo uses that existing installation and account when you start a Claude Code agent.
If your Claude login expires, re-authenticate with the Claude Code CLI, then start a new Claude Code session in Paseo. Existing Paseo sessions keep the authentication they started with, so re-authenticating does not update a session that is already running.
## Use Claude Code in the Paseo terminal
Claude Code also works inside the Paseo terminal. Open a terminal in your workspace and run `claude` for the standard CLI experience.
Claude Code also works great inside the Paseo terminal. If you prefer the standard CLI experience, open a terminal in your workspace and run `claude` as usual.
You can use the terminal from Paseo's desktop, web, or mobile app. You keep access to your workspace, git changes, and other Paseo tools.
You can use the terminal from Paseo's desktop, web, or mobile app while keeping access to your workspace, git changes, and other Paseo tools.
## See also
@@ -6,19 +6,7 @@ nav: Claude Code
# Claude Code {#claude-code}
Paseo 通过官方的 `claude` CLI 和 Claude Agent SDK 运行 Claude Code。它使用你的本地安装和现有的 Claude 账号。
## 开始使用 {#getting-started}
Claude Code 内置于 Paseo 且默认启用。
1. 在 daemon 主机上安装 [Claude Code CLI](https://code.claude.com/docs/en/setup#install-claude-code)。
2. 在终端中运行 `claude` 并登录。
3. 在 Paseo 中启动 Agent 时选择 **Claude**。
如果 `claude` 不在 daemon 的 PATH 中,请使用[命令覆盖](/docs/custom-providers#custom-binary)。
如果 Claude 登录过期,请在 Claude Code CLI 中重新登录,然后在 Paseo 中启动新的会话。正在运行的会话会保留启动时的认证状态,重新登录不会更新已有的活跃会话。
Paseo 通过官方的 `claude` CLI,借助 Claude Agent SDK 运行 Claude Code。
## 在 Paseo 中使用 Claude Code 需要额外付费吗? {#does-claude-code-cost-extra-in-paseo}
@@ -26,9 +14,15 @@ Claude Code 内置于 Paseo 且默认启用。
你仍然需要一个包含 Claude Code 的 Claude 套餐,套餐原有的用量限制同样适用。
## 开始使用 {#getting-started}
在运行 Paseo 的机器上安装并登录 Claude Code CLI。你启动 Claude Code Agent 时,Paseo 会使用这份现有的安装和账号。
如果 Claude 登录过期,请用 Claude Code CLI 重新认证,然后在 Paseo 中启动新的 Claude Code 会话。已有的 Paseo 会话保留启动时的认证,因此重新认证不会更新已经在运行的会话。
## 在 Paseo 终端中使用 Claude Code {#use-claude-code-in-the-paseo-terminal}
Claude Code 也可以在 Paseo 终端中运行。在工作区中打开终端并运行 `claude`,即可获得标准的 CLI 体验。
Claude Code 在 Paseo 终端里也很好用。如果你更喜欢标准的 CLI 体验,在工作区中打开终端,像平常一样运行 `claude` 即可。
你可以在 Paseo 的桌面端、网页端或移动端使用终端,同时保留对工作区、git 改动和其他 Paseo 工具的访问。
+44 -34
View File
@@ -8,41 +8,53 @@ category: Providers
# Codex
Paseo runs Codex through the official `codex` CLI and its app-server interface. It uses your local installation and existing OpenAI sign-in.
## Getting started
Codex is built into Paseo and enabled by default.
1. Install the [Codex CLI](https://developers.openai.com/codex/cli) on your daemon host:
```bash
npm install -g @openai/codex
```
2. Sign in with ChatGPT for subscription access:
```bash
codex login
```
3. In Paseo, choose **Codex** when you start an agent.
To bill through an OpenAI Platform API key instead, pipe `OPENAI_API_KEY` into `codex login --with-api-key`. See [Codex authentication](https://learn.chatgpt.com/docs/auth) for platform-specific sign-in commands.
If `codex` is outside your daemon PATH, use a [command override](/docs/custom-providers#custom-binary).
Paseo runs Codex through the official `codex` CLI and its app-server interface.
## Does Codex cost extra in Paseo?
No. Paseo does not add a charge for Codex. Sign in with ChatGPT to use the access included in your ChatGPT plan. Or sign in with an API key to bill through your OpenAI Platform account.
No. Paseo does not add a charge for Codex. Sign in to the Codex CLI with ChatGPT to use the access included with your ChatGPT plan, or sign in with an API key for usage billed through your OpenAI Platform account.
Your plan's normal Codex limits and OpenAI's standard API pricing still apply.
## Getting started
Install the [Codex CLI](https://learn.chatgpt.com/docs/codex/cli) on the machine running Paseo:
```bash
npm install -g @openai/codex
```
Sign in with ChatGPT for subscription access:
```bash
codex login
```
Or sign in with an API key for usage billed through your OpenAI Platform account:
```bash
# macOS or Linux
printenv OPENAI_API_KEY | codex login --with-api-key
```
```powershell
# Windows PowerShell
$env:OPENAI_API_KEY | codex login --with-api-key
```
Then confirm the CLI starts:
```bash
codex
```
Paseo uses this installation and its existing authentication when you start a Codex agent.
## Codex is missing in Paseo
The ChatGPT desktop app and the Codex CLI are separate installs. Installing the desktop app does not add the `codex` command for Paseo.
The ChatGPT desktop app and the Codex CLI are separate installs. Installing the desktop app does not make the `codex` command available to Paseo.
Make sure that `codex` is on your `PATH`:
Check whether the CLI is on your `PATH`:
```bash
# macOS or Linux
@@ -54,18 +66,16 @@ where.exe codex
If the command is not found:
1. Install the [Codex CLI](https://developers.openai.com/codex/cli).
2. Sign in with `codex login` or an API key.
3. If the Paseo daemon was already running when you installed the CLI, restart Paseo.
4. In Paseo, open **Settings → Hosts → your host → Providers → Codex** and select **Refresh**.
1. Install the [Codex CLI](https://learn.chatgpt.com/docs/codex/cli).
2. Sign in with ChatGPT or an API key using the commands above. See [Codex authentication](https://learn.chatgpt.com/docs/auth).
3. Restart Paseo if its daemon was already running when you installed the CLI.
4. In Paseo, open **Settings → Providers → Codex** and select **Refresh**.
Codex becomes available once Paseo can find and start the `codex` command.
The provider should become available once Paseo can find and start the `codex` command.
## Use Codex in the Paseo terminal
Codex also works inside the Paseo terminal. Open a terminal in your workspace and run `codex` for the standard CLI experience.
You can use the terminal from Paseo's desktop, web, or mobile app. You keep access to your workspace, git changes, and other Paseo tools.
Codex also works inside the Paseo terminal. Open a terminal in your workspace and run `codex` for the standard CLI experience while keeping access to your workspace, git changes, and other Paseo tools.
## See also
+43 -33
View File
@@ -6,41 +6,53 @@ nav: Codex
# Codex {#codex}
Paseo 通过官方的 `codex` CLI 及其 app-server 接口运行 Codex。它使用你的本地安装和现有的 OpenAI 登录状态。
## 开始使用 {#getting-started}
Codex 内置于 Paseo 且默认启用。
1. 在 daemon 主机上安装 [Codex CLI](https://developers.openai.com/codex/cli):
```bash
npm install -g @openai/codex
```
2. 用 ChatGPT 登录以使用订阅额度:
```bash
codex login
```
3. 在 Paseo 中启动 Agent 时选择 **Codex**。
如需通过 OpenAI Platform API key 计费,请将 `OPENAI_API_KEY` 通过管道传给 `codex login --with-api-key`。各平台的登录命令见 [Codex 认证](https://learn.chatgpt.com/docs/auth)。
如果 `codex` 不在 daemon 的 PATH 中,请使用[命令覆盖](/docs/custom-providers#custom-binary)。
Paseo 通过官方的 `codex` CLI 及其 app-server 接口运行 Codex。
## 在 Paseo 中使用 Codex 需要额外付费吗? {#does-codex-cost-extra-in-paseo}
不需要。Paseo 不会为 Codex 额外收费。用 ChatGPT 登录可使用 ChatGPT 套餐包含的额度;用 API key 登录则通过你的 OpenAI Platform 账号计费。
不需要。Paseo 不会为 Codex 额外收费。用 ChatGPT 登录 Codex CLI,即可使用 ChatGPT 套餐包含的额度;或者用 API key 登录,用量通过你的 OpenAI Platform 账号计费。
你套餐中常规的 Codex 限额和 OpenAI 的标准 API 价格仍然适用。
## 开始使用 {#getting-started}
在运行 Paseo 的机器上安装 [Codex CLI](https://learn.chatgpt.com/docs/codex/cli):
```bash
npm install -g @openai/codex
```
用 ChatGPT 登录以使用订阅额度:
```bash
codex login
```
或者用 API key 登录,用量通过你的 OpenAI Platform 账号计费:
```bash
# macOS or Linux
printenv OPENAI_API_KEY | codex login --with-api-key
```
```powershell
# Windows PowerShell
$env:OPENAI_API_KEY | codex login --with-api-key
```
然后确认 CLI 能够启动:
```bash
codex
```
你启动 Codex Agent 时,Paseo 会使用这份安装及其现有的认证。
## Paseo 中找不到 Codex {#codex-is-missing-in-paseo}
ChatGPT 桌面应用和 Codex CLI 是分开安装的。安装桌面应用并不会为 Paseo 添加 `codex` 命令。
ChatGPT 桌面应用和 Codex CLI 是分开安装的。安装桌面应用并不会让 Paseo 找到 `codex` 命令。
确认 `codex` 在你的 `PATH` 中:
检查 CLI 是否在你的 `PATH` 中:
```bash
# macOS or Linux
@@ -52,18 +64,16 @@ where.exe codex
如果找不到该命令:
1. 安装 [Codex CLI](https://developers.openai.com/codex/cli)。
2. 使用 `codex login` 或 API key 登录。
1. 安装 [Codex CLI](https://learn.chatgpt.com/docs/codex/cli)。
2. 使用上面的命令通过 ChatGPT 或 API key 登录。参见 [Codex 认证](https://learn.chatgpt.com/docs/auth)。
3. 如果安装 CLI 时 Paseo 的 daemon 已在运行,请重启 Paseo。
4. 在 Paseo 中打开 **设置 → Hosts → 你的主机 → Providers → Codex**,然后选择 **刷新**。
4. 在 Paseo 中打开 **设置 → Providers → Codex** 并选择 **刷新**。
当 Paseo 能找到并启动 `codex` 命令后,Codex 就会变为可用。
当 Paseo 能找到并启动 `codex` 命令后,这个 Provider 就会变为可用。
## 在 Paseo 终端中使用 Codex {#use-codex-in-the-paseo-terminal}
Codex 也可以在 Paseo 终端中运行。在工作区中打开终端并运行 `codex`,即可获得标准的 CLI 体验。
你可以在 Paseo 的桌面端、网页端或移动端使用终端,同时保留对工作区、git 改动和其他 Paseo 工具的访问。
Codex 在 Paseo 终端里同样可用。在工作区中打开终端并运行 `codex`,即可获得标准的 CLI 体验,同时保留对工作区、git 改动和其他 Paseo 工具的访问。
## 另请参阅 {#see-also}
+10 -10
View File
@@ -1,6 +1,6 @@
---
title: fx
description: Install and add fx for Paseo.
description: Install and configure fx for Paseo.
nav: fx
order: 26
category: Providers
@@ -8,22 +8,22 @@ category: Providers
# fx
Paseo runs fx, the coding agent from Vercel Labs, through the Agent Client Protocol (`fx acp`) on your installed `fx` CLI. It uses your existing fx credentials and settings.
Run fx, the coding agent from Vercel Labs, in Paseo with your existing fx installation and credentials.
## Getting started
Add fx from Settings in Paseo before you start an agent.
1. [Install fx](https://fx.sh/docs/getting-started/installation) on your daemon host.
2. [Connect fx to a model provider](https://fx.sh/docs/getting-started/authentication), such as with `fx login`.
3. In Paseo, open **Settings → Hosts → your host → Providers**, select **+ Provider**, find **fx**, and select **Add**.
2. [Connect fx to a model provider](https://fx.sh/docs/getting-started/authentication), for example with `fx login`.
3. In Paseo, open **Settings → Hosts → your host → Providers**, select **+ Provider**, find **fx**, and choose **Add**.
Until fx has credentials, Paseo shows the sign-in message from fx. If `fx` is outside your daemon PATH, use a [command override](/docs/custom-providers#custom-binary) and keep `acp` in the arguments.
Paseo launches `fx acp` and uses your fx credentials and settings. Until fx has credentials, the provider reports the sign-in message from fx.
If `fx` is outside your daemon's PATH, use a [command override](/docs/custom-providers) and keep `acp` in the arguments.
## Models and permissions
The model list comes from the active model provider in fx. Run `fx provider` to change the list that new agents start from.
The model list comes from the model provider that is active in fx. Run `fx provider` to change the list that a new agent starts from.
When you change an agent's permission mode in Paseo, fx also updates its saved permission mode.
Changing an agent's permission mode in Paseo also changes fx's saved permission mode.
See [fx's ACP guide](https://fx.sh/docs/using-fx/acp) for supported features.
See [fx's ACP guide](https://fx.sh/docs/using-fx/acp) for what fx supports.
+7 -7
View File
@@ -1,27 +1,27 @@
---
title: fx
description: 为 Paseo 安装并添加 fx。
description: 为 Paseo 安装和配置 fx。
nav: fx
---
# fx {#fx}
Paseo 通过你已安装的 `fx` CLI 提供的 Agent Client Protocol(`fx acp`)运行 Vercel Labs 的编程 Agent fx。它使用你现有的 fx 凭据和设置。
使用你现有的 fx 安装和凭据,在 Paseo 中运行 Vercel Labs 的编程 Agent fx。
## 开始使用 {#getting-started}
启动 Agent 前,请先在 Paseo 设置中添加 fx。
1. 在 daemon 主机上[安装 fx](https://fx.sh/docs/getting-started/installation)。
2. [为 fx 连接一个模型提供方](https://fx.sh/docs/getting-started/authentication),例如运行 `fx login`。
3. 在 Paseo 中打开 **设置 → Hosts → 你的主机 → Providers**,选择 **+ Provider**,找到 **fx**,然后选择 **添加**。
3. 在 Paseo 中打开 **设置 → Hosts → 你的主机 → Providers**,选择 **+ Provider**,找到 **fx** 并选择 **添加**。
在 fx 拿到凭据之前,Paseo 会显示 fx 给出的登录提示。如果 `fx` 不在 daemon 的 PATH 中,请使用[命令覆盖](/docs/custom-providers#custom-binary),并在参数中保留 `acp`。
Paseo 会启动 `fx acp`,并使用你的 fx 凭据和设置。在 fx 拿到凭据之前,该 Provider 会显示 fx 给出的登录提示。
如果 `fx` 不在 daemon 的 PATH 中,请使用[命令覆盖](/docs/custom-providers),并在参数中保留 `acp`。
## 模型和权限 {#models-and-permissions}
模型列表来自 fx 中当前启用的模型提供方。运行 `fx provider` 可以更改新 Agent 使用的列表。
在 Paseo 中更改 Agent 的权限模式时,fx 也会更新它保存的权限模式。
在 Paseo 中更改 Agent 的权限模式,也会更改 fx 保存的权限模式。
fx 支持的功能见 [fx 的 ACP 指南](https://fx.sh/docs/using-fx/acp)。
@@ -8,24 +8,22 @@ category: Providers
# GitHub Copilot
Paseo runs GitHub Copilot through the official Agent Client Protocol (`copilot --acp`) on your installed `copilot` CLI. It uses your local CLI and existing GitHub sign-in.
Run GitHub Copilot in Paseo with your existing `copilot` CLI and GitHub account.
## Getting started
GitHub Copilot is built into Paseo and enabled by default.
1. Install the [GitHub Copilot CLI](https://github.com/features/copilot/cli/) on your daemon host.
2. Run `copilot` in a terminal and sign in to GitHub.
3. In Paseo, choose **Copilot** when you start an agent.
If `copilot` is outside your daemon PATH, use a [command override](/docs/custom-providers#custom-binary) and keep `--acp` in the arguments.
Paseo launches `copilot --acp` and uses the sign-in that the CLI already has. If `copilot` is outside your daemon's PATH, use a [command override](/docs/custom-providers#custom-binary) and keep `--acp` in the arguments.
## Modes
**Agent** is the default mode.
| Mode | Effect |
| --------- | ------------------------------------------------------------------ |
| Agent | The default mode for conversational work. |
| Plan | Copilot creates and runs multi-step plans. |
| Allow All | Copilot approves every tool, path, and URL request without asking. |
| Mode | Effect |
| --------- | ------------------------------------------------------------- |
| Agent | The default mode for conversational work. |
| Plan | Copilot creates multi-step plans and executes them. |
| Allow All | Copilot approves every tool, path, and URL request by itself. |
@@ -6,24 +6,22 @@ nav: GitHub Copilot
# GitHub Copilot {#github-copilot}
Paseo 通过你已安装的 `copilot` CLI 提供的官方 Agent Client Protocol(`copilot --acp`)运行 GitHub Copilot。它使用你的本地 CLI 和现有的 GitHub 登录状态。
使用你现有的 `copilot` CLI 和 GitHub 账号,在 Paseo 中运行 GitHub Copilot。
## 开始使用 {#getting-started}
GitHub Copilot 内置于 Paseo 且默认启用。
1. 在 daemon 主机上安装 [GitHub Copilot CLI](https://github.com/features/copilot/cli/)。
2. 在终端中运行 `copilot` 并登录 GitHub。
3. 在 Paseo 中启动 Agent 时选择 **Copilot**。
如果 `copilot` 不在 daemon 的 PATH 中,请使用[命令覆盖](/docs/custom-providers#custom-binary),并在参数中保留 `--acp`。
Paseo 会启动 `copilot --acp`,并使用 CLI 已有的登录状态。如果 `copilot` 不在 daemon 的 PATH 中,请使用[命令覆盖](/docs/custom-providers#custom-binary),并在参数中保留 `--acp`。
## 模式 {#modes}
**Agent** 是默认模式。
| 模式 | 效果 |
| --------- | ------------------------------------------------- |
| Agent | 用于对话式工作的默认模式。 |
| Plan | Copilot 创建并运行多步骤计划。 |
| Allow All | Copilot 无需询问即批准所有工具、路径和 URL 请求。 |
| 模式 | 效果 |
| --------- | ------------------------------------------- |
| Agent | 用于对话式工作的默认模式。 |
| Plan | Copilot 创建多步骤计划并执行。 |
| Allow All | Copilot 自行批准所有工具、路径和 URL 请求。 |
+8 -8
View File
@@ -1,6 +1,6 @@
---
title: Hoplite
description: Install and add Hoplite for Paseo.
description: Install and configure Hoplite for Paseo.
nav: Hoplite
order: 28
category: Providers
@@ -8,20 +8,20 @@ category: Providers
# Hoplite
Paseo runs Hoplite's cloud coding agent through the Agent Client Protocol (`hoplite acp`) on your installed `hoplite` CLI.
Run Hoplite's cloud coding agent in Paseo through the Hoplite CLI on your daemon host.
## Getting started
Add Hoplite from Settings in Paseo before you start an agent.
1. Install the [Hoplite CLI](https://hoplite.sh/docs/cli) on your daemon host.
2. Run `hoplite login` in a terminal.
3. In Paseo, open **Settings → Hosts → your host → Providers**, select **+ Provider**, find **Hoplite**, and select **Add**.
2. Run `hoplite login`.
3. In Paseo, open **Settings → Hosts → your host → Providers**, select **+ Provider**, find **Hoplite**, and choose **Add**.
See [Hoplite's ACP guide](https://hoplite.sh/docs/cli/acp) for authentication and project setup. If `hoplite` is outside your daemon PATH, use a [command override](/docs/custom-providers#custom-binary) and keep `acp` in the arguments.
Paseo launches `hoplite acp`. See [Hoplite's ACP guide](https://hoplite.sh/docs/cli/acp) for authentication and project setup.
If `hoplite` is outside your daemon's PATH, use a [command override](/docs/custom-providers) and keep `acp` in the arguments.
## Projects and the cloud workspace
Hoplite runs the agent in a cloud workspace. Your local files and Paseo's loopback MCP tools are not available there.
Hoplite runs the agent in a cloud workspace. Your local files and Paseo's loopback MCP tools are not available in that cloud workspace.
Open a repository that is linked to a Hoplite project, or set `agents.providers.hoplite.env.HOPLITE_PROJECT_ID` to use one project everywhere. Without a linked repository or a pinned project, discovery reports `No Hoplite project`.
@@ -1,25 +1,25 @@
---
title: Hoplite
description: 为 Paseo 安装并添加 Hoplite。
description: 为 Paseo 安装和配置 Hoplite。
nav: Hoplite
---
# Hoplite {#hoplite}
Paseo 通过你已安装的 `hoplite` CLI 提供的 Agent Client Protocol(`hoplite acp`)运行 Hoplite 的云端编程 Agent。
通过 daemon 主机上的 Hoplite CLI,在 Paseo 中运行 Hoplite 的云端编程 Agent。
## 开始使用 {#getting-started}
启动 Agent 前,请先在 Paseo 设置中添加 Hoplite。
1. 在 daemon 主机上安装 [Hoplite CLI](https://hoplite.sh/docs/cli)。
2. 在终端中运行 `hoplite login`。
3. 在 Paseo 中打开 **设置 → Hosts → 你的主机 → Providers**,选择 **+ Provider**,找到 **Hoplite**,然后选择 **添加**。
2. 运行 `hoplite login`。
3. 在 Paseo 中打开 **设置 → Hosts → 你的主机 → Providers**,选择 **+ Provider**,找到 **Hoplite** 并选择 **添加**。
认证和项目设置见 [Hoplite 的 ACP 指南](https://hoplite.sh/docs/cli/acp)。如果 `hoplite` 不在 daemon 的 PATH 中,请使用[命令覆盖](/docs/custom-providers#custom-binary),并在参数中保留 `acp`。
Paseo 会启动 `hoplite acp`。认证和项目设置见 [Hoplite 的 ACP 指南](https://hoplite.sh/docs/cli/acp)。
如果 `hoplite` 不在 daemon 的 PATH 中,请使用[命令覆盖](/docs/custom-providers),并在参数中保留 `acp`。
## 项目和云端工作区 {#projects-and-the-cloud-workspace}
Hoplite 在云端工作区中运行 Agent。你的本地文件和 Paseo 的回环 MCP 工具在那里不可用。
Hoplite 在云端工作区中运行 Agent。你的本地文件和 Paseo 的回环 MCP 工具在该云端工作区中不可用。
请打开一个关联了 Hoplite 项目的仓库,或者设置 `agents.providers.hoplite.env.HOPLITE_PROJECT_ID`,在所有地方使用同一个项目。如果既没有关联的仓库也没有固定的项目,发现过程会报告 `No Hoplite project`。
+7 -13
View File
@@ -12,30 +12,24 @@ Paseo runs coding agents that you install and sign in to on your daemon host. Fo
## Native support
Paseo ships an integration for each of these agents. Most appear in Paseo automatically after you install and sign in to the CLI. Open a provider page for setup steps and defaults.
Paseo ships an integration for each of these agents.
- [Antigravity](/docs/supported-providers/antigravity), runs through your installed `agy` CLI over ACP.
- [Antigravity](/docs/supported-providers/antigravity), runs through your installed `agy` CLI.
- [Claude Code](/docs/supported-providers/claude-code), Anthropic's coding agent.
- [Codex](/docs/supported-providers/codex), OpenAI's workspace agent.
- [fx](/docs/supported-providers/fx), Vercel Labs' coding agent (add from Settings).
- [fx](/docs/supported-providers/fx), Vercel Labs' coding agent.
- [GitHub Copilot](/docs/supported-providers/github-copilot), GitHub's AI pair programmer.
- [Hoplite](/docs/supported-providers/hoplite), cloud coding agent (add from Settings).
- [Hoplite](/docs/supported-providers/hoplite), cloud coding agent.
- [Muse Code](/docs/supported-providers/muse-code), Meta's terminal coding agent.
- [Oh My Pi](/docs/supported-providers/omp), multi-provider coding agent (off by default).
- [Oh My Pi](/docs/supported-providers/omp), multi-provider coding agent.
- [OpenCode](/docs/supported-providers/opencode), open-source coding assistant.
- [Pi](/docs/supported-providers/pi), minimal terminal coding agent.
## More agents through ACP
Paseo runs any agent that speaks the [Agent Client Protocol](https://agentclientprotocol.com) (ACP). The in-app catalog lists these agents.
Paseo runs any agent that speaks the [Agent Client Protocol](https://agentclientprotocol.com) (ACP). The in-app catalog lists the agents below.
To add one from the catalog:
1. If the agent does not launch through `npx` or `uvx`, install its CLI on your daemon host.
2. Open **Settings → Hosts → your host → Providers** in Paseo.
3. Select **+ Provider**, find the agent, and select **Add**.
Entries that launch through `npx` or `uvx` need only that tool on your daemon host. If a CLI is missing, the provider page shows **Not installed**, and **Install** opens its install instructions.
To add one, open **Settings → Hosts → your host → Providers**, select **+ Provider**, find the agent, and choose **Add**. Entries that launch through `npx` or `uvx` need only that tool on your daemon host. For the other entries, install the CLI of the agent first. If the CLI is missing, the page of the provider says **Not installed**, and **Install** opens its install instructions.
- [Agoragentic](https://agoragentic.com), agent marketplace with 174+ AI capabilities.
- [Amp](https://github.com/tao12345666333/amp-acp), frontier coding agent.
+6 -12
View File
@@ -10,16 +10,16 @@ Paseo 运行由你在 daemon 主机上安装并登录的编程 Agent。关于 Pa
## 原生支持 {#native-support}
Paseo 为以下每个 Agent 都提供了集成。大多数 Agent 在你安装并登录 CLI 后会自动出现在 Paseo 中。打开对应 Provider 的页面可查看安装步骤和默认设置。
Paseo 为以下每个 Agent 都提供了集成。
- [Antigravity](/docs/supported-providers/antigravity):通过你已安装的 `agy` CLI 经由 ACP 运行。
- [Antigravity](/docs/supported-providers/antigravity):通过你已安装的 `agy` CLI 运行。
- [Claude Code](/docs/supported-providers/claude-code):Anthropic 的编程 Agent。
- [Codex](/docs/supported-providers/codex):OpenAI 的工作区 Agent。
- [fx](/docs/supported-providers/fx):Vercel Labs 的编程 Agent(从设置中添加)。
- [fx](/docs/supported-providers/fx):Vercel Labs 的编程 Agent。
- [GitHub Copilot](/docs/supported-providers/github-copilot):GitHub 的 AI 结对编程助手。
- [Hoplite](/docs/supported-providers/hoplite):云端编程 Agent(从设置中添加)。
- [Hoplite](/docs/supported-providers/hoplite):云端编程 Agent。
- [Muse Code](/docs/supported-providers/muse-code):Meta 的终端编程 Agent。
- [Oh My Pi](/docs/supported-providers/omp):支持多家 Provider 的编程 Agent(默认关闭)。
- [Oh My Pi](/docs/supported-providers/omp):支持多家 Provider 的编程 Agent。
- [OpenCode](/docs/supported-providers/opencode):开源编程助手。
- [Pi](/docs/supported-providers/pi):极简的终端编程 Agent。
@@ -27,13 +27,7 @@ Paseo 为以下每个 Agent 都提供了集成。大多数 Agent 在你安装并
Paseo 可以运行任何使用 [Agent Client Protocol](https://agentclientprotocol.com)(ACP)的 Agent。应用内目录列出了以下 Agent。
从目录添加其中一个:
1. 如果该 Agent 不是通过 `npx` 或 `uvx` 启动的,请先在 daemon 主机上安装它的 CLI。
2. 在 Paseo 中打开 **设置 → Hosts → 你的主机 → Providers**。
3. 选择 **+ Provider**,找到该 Agent,然后选择 **添加**。
通过 `npx` 或 `uvx` 启动的条目只需要 daemon 主机上有该工具。如果缺少 CLI,Provider 页面会显示 **未安装**,选择 **安装** 会打开它的安装说明。
要添加其中一个,请打开 **设置 → Hosts → 你的主机 → Providers**,选择 **+ Provider**,找到该 Agent 并选择 **添加**。通过 `npx` 或 `uvx` 启动的条目只需要 daemon 主机上有该工具。其他条目请先安装该 Agent 的 CLI。如果缺少 CLI,该 provider 的页面会显示 **未安装**,**安装** 会打开它的安装说明。
- [Agoragentic](https://agoragentic.com):拥有 174 种以上 AI 能力的 Agent 市场。
- [Amp](https://github.com/tao12345666333/amp-acp):前沿的编程 Agent。
+47 -32
View File
@@ -1,6 +1,6 @@
---
title: Muse Code
description: Run Meta's Muse Code in Paseo with your installed muse CLI.
description: Install and configure Muse Code for Paseo.
nav: Muse Code
order: 29
category: Providers
@@ -8,42 +8,33 @@ category: Providers
# Muse Code
Paseo runs Meta's Muse Code through your installed `muse` CLI (`muse serve`) over the Muse Session Protocol (MSP). It uses your existing Muse credentials and configuration.
Run Meta's terminal coding agent in Paseo with your existing Muse installation and credentials.
## Getting started
Muse Code is built into Paseo and enabled by default. Use Muse 1.3.0 or later (verified with 1.4.1).
Install Muse Code on the machine running the Paseo daemon:
1. Install Muse Code on your daemon host:
```bash
curl -fsSL https://dev.meta.ai/install.sh | sh
muse login
```
```bash
curl -fsSL https://dev.meta.ai/install.sh | sh
```
Use Muse 1.3.0 or newer. This integration was verified with 1.4.1. For API access, set
`META_API_KEY` in the daemon's environment instead of logging in. See
[provider environment overrides](/docs/custom-providers).
2. Sign in with `muse login`, or set `META_API_KEY` in the daemon environment.
3. In Paseo, choose **Muse Code** when you start an agent.
Your Muse configuration determines the available models. If `muse` is outside your daemon PATH or you need custom environment variables, see [Custom providers](/docs/custom-providers) and configure `agents.providers.muse`.
## Modes and skills
Approval modes control tool decisions separately from provider options. **Default** is the default mode.
- Available modes are **Default**, **Ask**, **Strict**, and **Full access**.
- **Full access** approves escalated approval stages automatically and keeps your effective provider options.
- Muse skills appear in the slash-command menu alongside `/compact`.
In Paseo, select **Muse Code**, then choose a model, approval mode, and reasoning effort.
Paseo runs `muse serve` and communicates over the Muse Session Protocol (MSP). Your Muse
configuration determines the available models.
## Provider options
By default, Paseo launches Muse with the sandbox disabled (`--disable-sandbox`) and workspace trust enabled (`--trust-workspace`). Muse can install packages with your npm cache and load project rules, skills, and configuration.
Paseo launches Muse with the sandbox disabled (`--disable-sandbox`) and workspace trust
on (`--trust-workspace`). Muse can install packages using your npm cache and load project
rules, skills, and configuration.
| Option | Default | Effect |
| ----------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `sandbox.enabled` | `false` | Enables Muse's filesystem and network sandbox. Its read-only home directory prevents npm from writing the default cache. |
| `sandbox.network` | `"proxy-only"` | Sandbox network policy: `"proxy-only"`, `"restricted"`, or `"enabled"`. With sandbox disabled, Muse allows full network access. |
| `trustWorkspace` | `true` | Lets Muse load project rules, skills, and configuration. |
To change defaults for every Muse agent, configure `agents.providers.muse.options` in `~/.paseo/config.json` on your daemon host:
Set defaults for every Muse agent in `config.json` on the daemon machine under
`agents.providers.muse.options`:
```json
{
@@ -60,11 +51,35 @@ To change defaults for every Muse agent, configure `agents.providers.muse.option
}
```
You can also pass per-agent `providerOptions` when you create an agent. The daemon merges provider defaults with per-agent options and saves them with the agent for refresh or resume. Invalid values or unknown keys fail session creation with a `providerOptions` error. See [Provider options](/docs/sdk/provider-options) for details.
You can also supply per-agent `providerOptions` when creating an agent. The daemon merges
provider defaults with the per-agent options and delivers the effective `providerOptions`
to Muse. See [provider options](/docs/sdk/provider-options) for configuration and creation.
Per-agent options are saved with the agent and reapplied when its Muse host opens on refresh
or resume. Invalid values and unknown keys fail session creation with a `providerOptions`
error.
| Option | Default | Effect |
| ----------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `sandbox.enabled` | `false` | Enables Muse's filesystem and network sandbox. Its read-only home directory prevents npm from writing the default cache. |
| `sandbox.network` | `"proxy-only"` | Sandbox network policy: `"proxy-only"`, `"restricted"`, or `"enabled"`. With sandbox disabled, Muse allows full network access. |
| `trustWorkspace` | `true` | Lets Muse load project rules, skills, and configuration. |
Approval modes control tool decisions separately: **Default**, **Ask**, **Strict**, and
**Full access**. Full access automatically allows escalated approval stages; it preserves
the effective provider options. Skills appear in the slash-command menu, alongside `/compact`.
## Limitations in Muse 1.4.1
- Paseo MCP tools are unavailable because Muse drops the returned tool namespace before matching an MCP call. This upstream issue must be fixed in Muse before Muse agents can use Paseo tools.
- Compaction needs a model context limit. If your endpoint does not report one, configure `context_compaction.provider_context_limit_tokens` in Muse for the selected model.
- Usage windows appear only when Muse reports them. An empty `usage/read` response leaves subscription usage unavailable.
- If native subagent tools are missing, set `MUSE_EXPERIMENTAL_SDK_ENABLED=on` in the provider environment. Linked child sessions appear only when Muse supplies `childSessionId`.
- **Paseo MCP tools are unavailable.** Muse drops the returned tool namespace before matching
an MCP call. This upstream issue must be fixed in Muse before its agents can use Paseo tools.
- **Compaction needs a model context limit.** If your endpoint does not report one, configure
`context_compaction.provider_context_limit_tokens` in Muse for the selected model.
- **Usage windows appear only when Muse reports them.** An empty `usage/read` response
leaves subscription usage unavailable.
- **Native subagents may need Muse's experimental SDK flag.** Set
`MUSE_EXPERIMENTAL_SDK_ENABLED=on` in the provider environment if native subagent tools
are missing. Linked child sessions appear only when Muse supplies `childSessionId`.
See [custom providers](/docs/custom-providers) to override the binary or environment under
`agents.providers.muse`.
@@ -1,47 +1,31 @@
---
title: Muse Code
description: 使用已安装的 muse CLI 在 Paseo 中运行 Meta 的 Muse Code。
description: 为 Paseo 安装和配置 Muse Code。
nav: Muse Code
---
# Muse Code {#muse-code}
Paseo 通过你已安装的 `muse` CLI(`muse serve`)经由 Muse Session Protocol(MSP)运行 Meta 的 Muse Code。它使用你现有的 Muse 凭据和配置。
使用你现有的 Muse 安装和凭据,在 Paseo 中运行 Meta 的终端编程 Agent。
## 开始使用 {#getting-started}
Muse Code 内置于 Paseo 且默认启用。请使用 Muse 1.3.0 或更高版本(已在 1.4.1 上验证)。
在运行 Paseo daemon 的机器上安装 Muse Code:
1. 在 daemon 主机上安装 Muse Code:
```bash
curl -fsSL https://dev.meta.ai/install.sh | sh
muse login
```
```bash
curl -fsSL https://dev.meta.ai/install.sh | sh
```
请使用 Muse 1.3.0 或更高版本。此集成已在 1.4.1 上验证。如需 API 访问,请在 daemon 的环境中设置 `META_API_KEY`,而不是登录。参见 [Provider 环境变量覆盖](/docs/custom-providers)。
2. 运行 `muse login` 登录,或在 daemon 环境中设置 `META_API_KEY`。
3. 在 Paseo 中启动 Agent 时选择 **Muse Code**。
可用的模型由你的 Muse 配置决定。如果 `muse` 不在 daemon 的 PATH 中,或需要自定义环境变量,请参见[自定义 Provider](/docs/custom-providers)并配置 `agents.providers.muse`。
## 模式和技能 {#modes-and-skills}
审批模式与 Provider 选项分开控制工具决策。**Default** 是默认模式。
- 可用模式包括 **Default**、**Ask**、**Strict** 和 **Full access**。
- **Full access** 会自动批准升级的审批阶段,并保留生效的 Provider 选项。
- Muse 技能会和 `/compact` 一起出现在斜杠命令菜单中。
在 Paseo 中选择 **Muse Code**,然后选择模型、审批模式和推理强度。Paseo 运行 `muse serve`,并通过 Muse Session Protocol(MSP)通信。可用的模型由你的 Muse 配置决定。
## Provider 选项 {#provider-options}
默认情况下,Paseo 启动 Muse 时会禁用沙箱(`--disable-sandbox`)并启用工作区信任(`--trust-workspace`)。Muse 可以使用你的 npm 缓存安装软件包,并加载项目规则、技能和配置。
Paseo 启动 Muse 时会禁用沙箱(`--disable-sandbox`)并开启工作区信任(`--trust-workspace`)。Muse 可以使用你的 npm 缓存安装软件包,并加载项目规则、技能和配置。
| 选项 | 默认值 | 作用 |
| ----------------- | -------------- | -------------------------------------------------------------------------------------------------- |
| `sandbox.enabled` | `false` | 启用 Muse 的文件系统和网络沙箱。沙箱中的主目录是只读的,npm 无法写入默认缓存。 |
| `sandbox.network` | `"proxy-only"` | 沙箱网络策略:`"proxy-only"`、`"restricted"` 或 `"enabled"`。禁用沙箱时,Muse 允许完全的网络访问。 |
| `trustWorkspace` | `true` | 允许 Muse 加载项目规则、技能和配置。 |
要为所有 Muse Agent 更改默认值,请在 daemon 主机的 `~/.paseo/config.json` 中配置 `agents.providers.muse.options`:
在 daemon 所在机器的 `config.json` 中,于 `agents.providers.muse.options` 下为所有 Muse Agent 设置默认值:
```json
{
@@ -58,11 +42,23 @@ Muse Code 内置于 Paseo 且默认启用。请使用 Muse 1.3.0 或更高版本
}
```
创建 Agent 时,你也可以传入每个 Agent 各自的 `providerOptions`。daemon 会将 Provider 默认值与每个 Agent 的选项合并,并随 Agent 保存,以便刷新或恢复时使用。无效的值或未知的键会使会话创建失败,并报告 `providerOptions` 错误。详情见 [Provider 选项](/docs/sdk/provider-options)。
创建 Agent 时,你也可以提供每个 Agent 各自的 `providerOptions`。daemon 会把 Provider 默认值与每个 Agent 的选项合并,并把生效的 `providerOptions` 传给 Muse。配置和创建方法见 [Provider 选项](/docs/sdk/provider-options)。
每个 Agent 的选项会随 Agent 一起保存,并在刷新或恢复时打开其 Muse 主机时重新应用。无效的值和未知的键会使会话创建失败,并报告 `providerOptions` 错误。
| 选项 | 默认值 | 作用 |
| ----------------- | -------------- | -------------------------------------------------------------------------------------------------- |
| `sandbox.enabled` | `false` | 启用 Muse 的文件系统和网络沙箱。沙箱中的主目录是只读的,npm 无法写入默认缓存。 |
| `sandbox.network` | `"proxy-only"` | 沙箱网络策略:`"proxy-only"`、`"restricted"` 或 `"enabled"`。禁用沙箱时,Muse 允许完全的网络访问。 |
| `trustWorkspace` | `true` | 允许 Muse 加载项目规则、技能和配置。 |
审批模式单独控制工具决策:**Default**、**Ask**、**Strict** 和 **Full access**。Full access 会自动允许升级的审批阶段,并保留生效的 Provider 选项。技能会和 `/compact` 一起出现在斜杠命令菜单中。
## Muse 1.4.1 中的限制 {#limitations-in-muse-141}
- Paseo MCP 工具不可用,因为 Muse 在匹配 MCP 调用前会丢弃返回的工具命名空间。此上游问题必须先在 Muse 中修复,Muse Agent 才能使用 Paseo 工具。
- 上下文压缩需要模型的上下文上限。如果你的端点不报告上限,请在 Muse 中为所选模型配置 `context_compaction.provider_context_limit_tokens`。
- 只有 Muse 报告用量窗口时才会显示。`usage/read` 返回空响应时,订阅用量不可用。
- 如果缺少原生子 Agent 工具,请在 Provider 环境中设置 `MUSE_EXPERIMENTAL_SDK_ENABLED=on`。只有当 Muse 提供 `childSessionId` 时,关联的子会话才会出现。
- **Paseo MCP 工具不可用。** Muse 在匹配 MCP 调用之前丢弃了返回的工具命名空间。这是上游问题,必须先在 Muse 中修复,它的 Agent 才能使用 Paseo 工具。
- **上下文压缩需要模型的上下文上限。** 如果你的端点不报告上限,请在 Muse 中为所选模型配置 `context_compaction.provider_context_limit_tokens`。
- **只有 Muse 报告用量窗口时才会显示。** `usage/read` 返回空响应时,订阅用量将不可用。
- **原生子 Agent 可能需要 Muse 的实验性 SDK 开关。** 如果缺少原生子 Agent 工具,请在 Provider 环境中设置 `MUSE_EXPERIMENTAL_SDK_ENABLED=on`。只有当 Muse 提供 `childSessionId` 时,关联的子会话才会出现。
要在 `agents.providers.muse` 下覆盖二进制文件或环境变量,请参见[自定义 Provider](/docs/custom-providers)。
+15 -6
View File
@@ -8,17 +8,26 @@ category: Providers
# Oh My Pi
Paseo runs Oh My Pi (OMP) through your installed `omp` CLI. It uses your existing credentials and settings.
Run Oh My Pi (OMP) in Paseo with your existing `omp` installation and settings.
## Getting started
Oh My Pi is built into Paseo and off by default.
1. Install [Oh My Pi](https://github.com/can1357/oh-my-pi) on your daemon host, and make sure that `omp` runs in a terminal.
1. Install [Oh My Pi](https://github.com/can1357/oh-my-pi) on your daemon host and make sure that `omp` runs in a terminal.
2. In Paseo, open **Settings → Hosts → your host → Providers** and turn on **Oh My Pi**.
3. Choose **Oh My Pi** when you start an agent.
If `omp` is outside your daemon PATH, use a [command override](/docs/custom-providers#custom-binary). You can also enable `omp` in `~/.paseo/config.json` under `agents.providers.omp`. To run a second OMP profile with its own settings, see [OMP profiles](https://github.com/getpaseo/paseo/blob/main/docs/custom-providers.md#omp-profiles-and-pi-compatible-forks) on GitHub.
Oh My Pi is off by default. You can also turn it on in `~/.paseo/config.json`:
```json
{
"agents": {
"providers": {
"omp": { "enabled": true }
}
}
}
```
If `omp` is outside your daemon's PATH, use a [command override](/docs/custom-providers). To run a second OMP profile with its own settings, see [OMP profiles](https://github.com/getpaseo/paseo/blob/main/docs/custom-providers.md#omp-profiles-and-pi-compatible-forks) on GitHub.
## Permission modes
+15 -6
View File
@@ -6,17 +6,26 @@ nav: Oh My Pi
# Oh My Pi {#oh-my-pi}
Paseo 通过你已安装的 `omp` CLI 运行 Oh My Pi(OMP)。它使用你现有的凭据和设置。
使用你现有的 `omp` 安装和设置,在 Paseo 中运行 Oh My Pi(OMP)。
## 开始使用 {#getting-started}
Oh My Pi 内置于 Paseo,默认关闭。
1. 在 daemon 主机上安装 [Oh My Pi](https://github.com/can1357/oh-my-pi),并确认 `omp` 可以在终端中运行。
2. 在 Paseo 中打开 **设置 → Hosts → 你的主机 → Providers**,然后启用 **Oh My Pi**。
3. 启动 Agent 时选择 **Oh My Pi**。
2. 在 Paseo 中打开 **设置 → Hosts → 你的主机 → Providers**,启用 **Oh My Pi**。
如果 `omp` 不在 daemon 的 PATH 中,请使用[命令覆盖](/docs/custom-providers#custom-binary)。你也可以在 `~/.paseo/config.json` 的 `agents.providers.omp` 下启用 `omp`。如需运行带有独立设置的第二个 OMP 配置,请参见 GitHub 上的 [OMP profiles](https://github.com/getpaseo/paseo/blob/main/docs/custom-providers.md#omp-profiles-and-pi-compatible-forks)。
Oh My Pi 默认关闭。你也可以在 `~/.paseo/config.json` 中启用它:
```json
{
"agents": {
"providers": {
"omp": { "enabled": true }
}
}
}
```
如果 `omp` 不在 daemon 的 PATH 中,请使用[命令覆盖](/docs/custom-providers)。如需运行带有独立设置的第二个 OMP 配置,请参见 GitHub 上的 [OMP profiles](https://github.com/getpaseo/paseo/blob/main/docs/custom-providers.md#omp-profiles-and-pi-compatible-forks)。
## 权限模式 {#permission-modes}
+4 -6
View File
@@ -8,12 +8,10 @@ category: Providers
# OpenCode
Paseo runs OpenCode through your installed `opencode` CLI. It uses your existing credentials and configuration.
Run OpenCode in Paseo with your existing `opencode` installation, credentials, and configuration.
## Getting started
OpenCode is built into Paseo and enabled by default.
1. Install [OpenCode](https://opencode.ai/) on your daemon host:
```bash
@@ -23,13 +21,13 @@ OpenCode is built into Paseo and enabled by default.
2. Connect OpenCode to a model provider, and make sure that `opencode` runs in a terminal.
3. In Paseo, choose **OpenCode** when you start an agent.
If you use OpenCode v2, install version 2.0.10 or later. Paseo rejects older v2 versions.
If you use OpenCode v2, install version 2.0.10 or newer. Paseo rejects older v2 versions.
If `opencode` is outside your daemon PATH, use a [command override](/docs/custom-providers#custom-binary).
If `opencode` is outside your daemon's PATH, use a [command override](/docs/custom-providers#custom-binary).
## Modes
Paseo shows OpenCode agents as modes.
Paseo shows the agents of OpenCode as modes.
| Mode | Effect |
| ----- | ----------------------------------------------- |
@@ -6,12 +6,10 @@ nav: OpenCode
# OpenCode {#opencode}
Paseo 通过你已安装的 `opencode` CLI 运行 OpenCode。它使用你现有的凭据和配置。
使用你现有的 `opencode` 安装、凭据和配置,在 Paseo 中运行 OpenCode。
## 开始使用 {#getting-started}
OpenCode 内置于 Paseo 且默认启用。
1. 在 daemon 主机上安装 [OpenCode](https://opencode.ai/):
```bash
+7 -6
View File
@@ -8,23 +8,24 @@ category: Providers
# Pi
Paseo runs Pi through your installed `pi` CLI. It uses your existing credentials and settings.
Run Pi in Paseo with your existing `pi` installation, credentials, and settings.
## Getting started
Pi is built into Paseo and enabled by default.
1. Install [Pi](https://pi.dev) on your daemon host.
2. Connect Pi to a model provider, and make sure that `pi` runs in a terminal.
3. In Paseo, choose **Pi** when you start an agent.
Pi appears in Paseo when the daemon can launch `pi`. If `pi` is outside your daemon PATH, use a [command override](/docs/custom-providers#custom-binary).
Pi appears in Paseo when the daemon can launch `pi`. If `pi` is outside your daemon's PATH, use a [command override](/docs/custom-providers#custom-binary).
## Modes, sessions, and timeouts
## Modes and sessions
- Pi has no permission modes, so Paseo shows no mode selector for a Pi agent.
- Paseo can import sessions that you started in a terminal. It reads them from `~/.pi/agent/sessions`, or from the session directory that you configured in Pi.
- Paseo waits 60 seconds for Pi to answer a control request, such as a request for the model list. If Pi needs longer on your host, raise `rpcTimeoutMs` in [Provider options](/docs/custom-providers#provider-options).
## Timeouts
Paseo waits 60 seconds for Pi to answer a control request, such as a request for the model list. If Pi needs longer on your host, raise `rpcTimeoutMs` in [Provider options](/docs/custom-providers#provider-options).
## See also
+6 -5
View File
@@ -6,23 +6,24 @@ nav: Pi
# Pi {#pi}
Paseo 通过你已安装的 `pi` CLI 运行 Pi。它使用你现有的凭据和设置。
使用你现有的 `pi` 安装、凭据和设置,在 Paseo 中运行 Pi。
## 开始使用 {#getting-started}
Pi 内置于 Paseo 且默认启用。
1. 在 daemon 主机上安装 [Pi](https://pi.dev)。
2. 为 Pi 配置模型 Provider,并确认 `pi` 可以在终端中运行。
3. 在 Paseo 中启动 Agent 时选择 **Pi**。
daemon 能够启动 `pi` 时,Pi 就会出现在 Paseo 中。如果 `pi` 不在 daemon 的 PATH 中,请使用[命令覆盖](/docs/custom-providers#custom-binary)。
## 模式、会话和超时 {#modes-sessions-and-timeouts}
## 模式和会话 {#modes-and-sessions}
- Pi 没有权限模式,所以 Paseo 不会为 Pi Agent 显示模式选择器。
- Paseo 可以导入你在终端中启动的会话。它从 `~/.pi/agent/sessions` 读取,或者从你在 Pi 中配置的会话目录读取。
- Paseo 等待 Pi 响应控制请求(例如获取模型列表)的时间上限为 60 秒。如果 Pi 在你的主机上需要更长时间,请在 [Provider 选项](/docs/custom-providers#provider-options)中调高 `rpcTimeoutMs`。
## 超时 {#timeouts}
Paseo 等待 Pi 响应控制请求(例如获取模型列表)的时间上限为 60 秒。如果 Pi 在你的主机上需要更长时间,请在 [Provider 选项](/docs/custom-providers#provider-options)中调高 `rpcTimeoutMs`。
## 另请参阅 {#see-also}