View as markdown

Plugin reference

For the upcoming Paseo v0.8 release. Return to the v0.8 quickstart.

Migrating an existing plugin? Follow the standalone runtime-entry migration guide.

Local plugins are directory sources installed into one Paseo daemon. A plugin can contribute:

  • React Native surfaces and sidebar items to Paseo clients;
  • workspace and agent panels opened as workspace tabs;
  • global, workspace, and agent actions in the Command Center;
  • slash commands in the message composer;
  • transformed and daemon-pushed agent timeline rows;
  • light and dark themes in Settings → Appearance;
  • schema-validated RPC handlers running beside the daemon;
  • normal Paseo operations through the TypeScript SDK;
  • searchable external resources in the message composer.

Plugin code is trusted and unsandboxed. Client surfaces run in the Paseo app. Backend contributions run in a subprocess with access to the daemon machine, including its files, processes, credentials, and network.

Project files

paseo plugin init /absolute/path/to/my-plugin creates:

my-plugin/
  paseo-plugin.json
  index.client.tsx
  index.server.ts
  client/greeting.tsx
  server/greeting.ts
  shared/greeting.ts
  package.json
  tsconfig.json

The required root manifest is paseo-plugin.json. It contains the default plugin ID:

{ "id": "my-plugin" }
EntryRuntimeReceivesRequired
index.client.tsxPaseo app, per clientPluginClientContextWhen the plugin has any UI, callback, theme, or attachment source
index.server.tsDaemon subprocessPluginServerContextWhen the plugin handles RPCs

At least one entry is required; both accept .ts or .tsx. A directory that still has only the old index.ts fails to load and points at the migration guide.

Plugin, surface, sidebar-item, workspace-panel, Command Center item, attachment-source, and slash-command IDs start with a lowercase letter and contain lowercase letters, numbers, or hyphens.

The generated package.json installs @getpaseo/plugin and the other host modules as development dependencies for local typechecking and tests. Paseo supplies their runtime instances. Consumers do not install them when adding the plugin.

Every other module lives in one of three directories. Nesting inside them is fine; a module at the plugin root is a compile error.

DirectoryCompiled intoUse it for
client/App bundle onlyReact, React Native, hooks, styles, surfaces, panels, and callbacks.
server/Daemon bundle onlyNode APIs, local resources, credentials, and RPC handlers.
shared/BothZod RPC contracts and plain values imported by both runtimes.

Runtime modules

Paseo builds each bundle from its matching entry. An import from client/ into the daemon bundle, from server/ into the app bundle, or of a node: module anywhere in the app bundle is a compile error. Keep shared/ free of Node and React Native runtime code.

Client runtime

Paseo provides these modules to client code:

ModuleUse it for
@getpaseo/pluginContribution contracts, defineRpc, defineAttachmentSource, RpcInput, RpcOutput, and data hooks
@getpaseo/plugin/react-nativePaseo UI components and UI hooks
@getpaseo/plugin/serverHandler-only types such as PluginHandlerContext
@tanstack/react-queryRequest state and caching
reactComponents and hooks
react/jsx-runtimeCompiled JSX
react-nativeCross-platform UI
zodShared schemas

These exact module specifiers use the host's runtime instances. A client bundle that requests another host module fails with Module "<name>" is not available in plugin client code.

Do not import lucide-react-native, react-native-svg, or DOM libraries. Set contribution icon fields to a Lucide icon name; Paseo validates the name and renders the icon.

Cross-platform rules

Client code runs on iOS, Android, and in browsers through React Native Web. A component that works in your browser and crashes on a phone is the most common plugin bug. The rules:

DoDo not
View, Text, Pressable, ScrollView, TextInput from react-native<div>, <span>, <button>, or any HTML element
style objects built from theme.colors and layout.compactclassName, CSS strings, or hardcoded colors
onPressonClick, onMouseEnter, or other DOM handlers
Linking, Clipboard-style React Native APIswindow, document, localStorage, navigator, location in components

The scaffold's tsconfig.json omits the DOM library, so document and window are type errors everywhere by default. The one place browser APIs are allowed is client/web.ts. It declares the narrow shape of each global it uses, gates every export on Platform.OS, and gives native the alternative:

client/web.ts:

import { Linking, Platform } from "react-native";

// This plugin typechecks without the DOM library. Declare only what this module uses.
declare const window: { open(url: string, target: string, features: string): unknown };

export async function openExternal(url: string): Promise<void> {
  if (Platform.OS === "web") {
    window.open(url, "_blank", "noopener,noreferrer");
    return;
  }
  await Linking.openURL(url);
}

Do not add /// <reference lib="dom" /> or "DOM" to lib; either one turns DOM types back on for the whole project and hides the next mistake. Components import openExternal and never touch window themselves. layout.platform on surface and panel props carries the same value as Platform.OS for rendering decisions.

There is no plugin storage API. Browser storage does not persist settings across Paseo clients. There is also no general host navigation API: plugin code cannot open native Paseo routes. Command Center callbacks can only open surfaces and panels registered by the same plugin.

Server runtime

Paseo provides @getpaseo/plugin, @getpaseo/plugin/server, and zod to server code. Backend contributions run in a daemon subprocess with Node access to the host machine. Keep filesystem, process, credential, and other machine-local work under server/. A plugin without index.server.ts starts no subprocess.

Entry point and cleanup

Each present entry default-exports one contribution function and returns cleanup. Client entries receive PluginClientContext; server entries receive PluginServerContext. Every client add* returns an idempotent remover. The entry cleanup runs before Paseo removes remaining registrations.

import type { PluginClientContext } from "@getpaseo/plugin";
import { Main } from "./client/main";

export default function contribute(client: PluginClientContext) {
  client.addSurface("main", Main);
  return () => {};
}

Cleanup can be async. Release timers, watchers, sockets, and other resources created by the plugin. Paseo also removes registrations, unmounts surfaces, rejects pending RPCs, closes the plugin's daemon session, and stops its subprocess on reload, disable, removal, disconnect, or daemon shutdown.

Surfaces and sidebar items

Register a component, then point a sidebar item at its surface ID:

client/main.tsx:

import type { PluginSurfaceProps } from "@getpaseo/plugin";
import { useMemo } from "react";
import { Text, View } from "react-native";

export function Main({ theme, host, layout }: PluginSurfaceProps) {
  const styles = useMemo(
    () => ({
      screen: {
        flex: 1,
        padding: layout.compact ? 16 : 24,
        backgroundColor: theme.colors.surface0,
      },
      title: { color: theme.colors.foreground },
      detail: { color: theme.colors.foregroundMuted },
    }),
    [theme, layout.compact],
  );
  return (
    <View style={styles.screen}>
      <Text style={styles.title}>{host.label}</Text>
      <Text style={styles.detail}>{layout.platform}</Text>
    </View>
  );
}

index.client.tsx:

import type { PluginClientContext } from "@getpaseo/plugin";
import { Main } from "./client/main";

export default function contribute(client: PluginClientContext) {
  client.addSurface("main", Main);
  client.addSidebarItem({
    id: "main",
    title: "My plugin",
    icon: "Blocks",
    surface: "main",
  });
  return () => {};
}

PluginSurfaceProps contains:

FieldMeaning
themeTyped PluginTheme color tokens for the active Paseo theme.
hostSelected host id and display label.
layoutcompact and the ios, android, or web platform.
navigationOptional client navigation. openAgent({ agentId }) and openWorkspace({ workspaceId }) open targets on the selected host.

Paseo owns the route, header, close action, host picker, error boundary, and query client. The plugin owns the surface body.

Host UI

Import Paseo-owned UI from @getpaseo/plugin/react-native in client code. This example opens a controlled modal, renders a host icon, and confirms the action with a toast:

import type { PluginSurfaceProps } from "@getpaseo/plugin";
import { Icon, Modal, useToast } from "@getpaseo/plugin/react-native";
import { useState } from "react";
import { Pressable, Text, View } from "react-native";

export function IssueActions({ theme }: PluginSurfaceProps) {
  const [open, setOpen] = useState(false);
  const toast = useToast();

  function saveIssue() {
    toast.show("Issue saved", { variant: "success" });
    setOpen(false);
  }

  return (
    <View>
      <Pressable accessibilityRole="button" onPress={() => setOpen(true)}>
        <View style={{ flexDirection: "row", alignItems: "center", gap: 8 }}>
          <Icon name="Pencil" size={18} color={theme.colors.foreground} />
          <Text style={{ color: theme.colors.foreground }}>Edit issue</Text>
        </View>
      </Pressable>

      <Modal
        title="Edit issue"
        icon={<Icon name="Pencil" size={18} color={theme.colors.foreground} />}
        open={open}
        onOpenChange={setOpen}
      >
        <Modal.Content>
          <Pressable accessibilityRole="button" onPress={saveIssue}>
            <Text style={{ color: theme.colors.foreground }}>Save</Text>
          </Pressable>
        </Modal.Content>
      </Modal>
    </View>
  );
}

Modal uses a bottom sheet on compact layouts and a centered dialog otherwise. The plugin owns the open state.

PropTypeRequiredBehavior
titlestringYesLabels the modal and its visible header.
iconReactNodeNoRenders before the title in the header.
openbooleanYesShows the modal content when true.
onOpenChange(open: boolean) => voidYesReceives false when the user dismisses it.
childrenReactNodeYesContains Modal.Content.

Modal.Content owns the body below the host-rendered header:

PropTypeRequiredBehavior
childrenReactNodeYesRenders the plugin's React Native UI content.

The close button, backdrop, platform back action, web Escape key, and compact sheet gesture dismiss the modal. Dismissal calls onOpenChange(false); the plugin must update open to close it.

Modal children keep the plugin runtime context. usePaseo, useRpc, useWorkspace, and useAgent work inside them.

Toasts

useToast() returns two methods:

MethodBehavior
show(message, options?)Shows a toast for 2,200 ms unless durationMs is supplied.
error(message)Shows an error toast for 3,200 ms.

show accepts these options:

OptionTypeDefault
variant"default" | "info" | "success" | "warning" | "error""default"
durationMsnumber2200

Showing another toast replaces the currently visible toast. An empty message is ignored.

Icons

Icon renders a Lucide icon from Paseo's installed icon set. Plugin bundles do not import lucide-react-native or react-native-svg.

PropTypeRequiredBehavior
namestringYesLucide icon name. Unknown names render nothing.
sizenumberNoIcon width and height.
colorstringNoIcon color. Use a plugin theme token.

Timeline items

A plugin can replace an agent timeline entry with its own data and React Native renderer. Both registrations are client contributions. Paseo applies the transformer while building the render model, including every live streaming update.

import type { PluginClientContext, PluginTimelineItemProps } from "@getpaseo/plugin";
import { Text } from "react-native";
import { z } from "zod";

const schema = z.object({ label: z.string() });

function Card({ item, theme }: PluginTimelineItemProps<z.output<typeof schema>>) {
  return <Text style={{ color: theme.colors.foreground }}>{item.data.label}</Text>;
}

export default function contribute(client: PluginClientContext) {
  client.addTimelineTransformer({
    id: "command-card",
    query: { itemType: "tool_call" },
    transform({ item, phase }) {
      return {
        items: [
          {
            type: "plugin",
            kind: "command-card",
            version: 1,
            data: { label: item.name, phase },
          },
        ],
      };
    },
  });
  client.addTimelineRenderer({
    kind: "command-card",
    version: 1,
    schema,
    Component: Card,
  });
  return () => {};
}

query.itemType is the stable, coarse selector. Inspect the selected item inside transform for provider- or tool-specific recognition. Returning undefined keeps the original entry. Returning items replaces it; an empty array removes it. Item data must be JSON-compatible. The phase input is "streaming" for running tool calls and loading reasoning, and "complete" otherwise. Each replacement may set an optional plugin-local id; otherwise Paseo uses its index within that source item's output.

Renderers receive agentId, item, timestamp, theme, host, and layout. Paseo validates item.data with the registered schema before rendering. Keep transformers synchronous and deterministic. Paseo memoizes results by source-item reference and derives replacement identity from the source row, so updates to one streaming item do not remount its renderer. Use the exported useRevealedText(text, phase) hook when a renderer should pace streaming text like Paseo's built-in assistant rows.

Append a timeline row from the daemon

A server handler can add a plugin-owned row to canonical history:

import type { PluginHandlerContext } from "@getpaseo/plugin";

async function publishReview(agentId: string, { paseo }: PluginHandlerContext) {
  await paseo.agents.ref(agentId).timeline.append({
    type: "plugin",
    id: "review",
    kind: "review-result",
    version: 1,
    data: { verdict: "ready" },
  });
}
FieldTypeRequiredBehavior
type"plugin"YesSelects the plugin timeline variant.
idstringYesStable plugin-local identity. Reusing it replaces the old row.
kindstringYesSelects the registered renderer.
versionpositive integerYesSelects the renderer contract version.
dataJSON-compatibleYesRenderer payload, at most 64 KiB after JSON serialization.

The daemon stamps pluginId from the calling plugin session and rejects this RPC from non-plugin sessions. The row appears live, survives timeline refetches, and keeps only the latest value for the same plugin and id. If its renderer is missing, Paseo shows the existing unavailable row. Daemons reject data over the limit rather than truncating it. Daemons that support this operation advertise server_info.features.pluginTimelineItems.

Theme and layout

Plugin UI runs on desktop, browser, iOS, and Android, across every Paseo theme. theme is a typed PluginTheme mapped from the active host theme. Color and spacing must come from those props. Hardcoded colors and unstyled Text break when the host theme changes.

Recreate styles when theme or layout.compact changes.

KeyRequired forUse it for
theme.colors.foregroundEvery primary TextTitles and body copy
theme.colors.foregroundMutedSecondary TextLabels and supporting copy
theme.colors.surface0Root viewPanel background
theme.colors.surface1Raised surfacesCards and panels
theme.colors.surface2Control surfacesInputs and secondary controls
theme.colors.borderSurface boundariesBorders and dividers
theme.colors.accentPrimary action fillsButtons and selected states
theme.colors.accentForegroundText on an accent fillButton labels
theme.colors.statusSuccessSuccess feedbackSuccess messages and indicators
theme.colors.statusWarningWarning feedbackWarning messages and indicators
theme.colors.statusDangerFailure copyError messages and destructive text
layout.compactPadding and stackingtrue on mobile and narrow windows
layout.platformPlatform-specific behaviorios, android, or web

Do not hardcode #000, #fff, or React Native's default text color. Primary copy uses foreground. Labels use foregroundMuted. Tighten padding when layout.compact is true.

Workspace and agent panels receive the same theme, layout, and optional navigation fields.

Contribute a theme

addTheme adds a light or dark theme to Settings → Appearance, listed under the built-ins by its name. A theme is data, so it needs no component file:

import type { PluginClientContext } from "@getpaseo/plugin";

export default function contribute(client: PluginClientContext) {
  client.addTheme({
    id: "mocha",
    name: "Catppuccin Mocha",
    appearance: "dark",
    colors: {
      background: "#1e1e2e",
      foreground: "#cdd6f4",
      raised: "#313244",
      control: "#45475a",
      border: "#45475a",
      accent: "#cba6f7",
      mutedForeground: "#a6adc8",
      ring: "#6c7086",
    },
  });
  return () => {};
}

Every color is a hex string; anything else fails to load. Paseo expands the palette into the full token set the built-in dark themes use, so a contributed theme covers panels, menus, diffs, status colors, and the terminal without listing them.

ColorBecomes
backgroundApp, workspace, and terminal background
foregroundPrimary text, terminal foreground and cursor
raisedCards, popovers, and hovered rows
controlInputs, secondary fills, and the light-theme sidebar
borderBorders and the highest raised-surface tint
accentButtons, selection, and focus. Optional; foreground if omitted.
mutedForegroundSecondary text
ringFocus rings, scrollbars, and terminal bright black

appearance is "light" or "dark". Paseo uses it to select the matching surface, status, diff, syntax, terminal, and shadow derivation.

Only one contributed theme is active at a time. Selecting one persists the choice; if the plugin is later disabled or removed, Paseo falls back to the default theme rather than leaving the app unpainted.

Themes need a host that supports them. A client released before addTheme cannot evaluate that client entry and reports client.addTheme is not a function. Update the client.

Workspace panels

Register one panel for workspace or agent context:

client/review.tsx:

import { type PluginAgentPanelProps, useAgent, useWorkspace } from "@getpaseo/plugin";
import { useMemo } from "react";
import { Text, View } from "react-native";

export function ReviewPanel({ theme, layout, workspaceId, agentId }: PluginAgentPanelProps) {
  const workspaceName = useWorkspace(workspaceId, (workspace) => workspace.name);
  const agent = useAgent(agentId, ({ id, title }) => ({ id, title }));
  const styles = useMemo(
    () => ({
      screen: {
        flex: 1,
        padding: layout.compact ? 16 : 24,
        backgroundColor: theme.colors.surface0,
      },
      title: { color: theme.colors.foreground },
      detail: { color: theme.colors.foregroundMuted },
    }),
    [theme, layout.compact],
  );
  return (
    <View style={styles.screen}>
      <Text style={styles.title}>{workspaceName}</Text>
      <Text style={styles.detail}>{agent?.title ?? agent?.id}</Text>
    </View>
  );
}

index.client.tsx:

import type { PluginClientContext } from "@getpaseo/plugin";
import { ReviewPanel } from "./client/review";

export default function contribute(client: PluginClientContext) {
  client.addWorkspacePanel({
    id: "review",
    title: "Review",
    icon: "Scan",
    context: "agent",
    locations: ["workspace", "explorer"],
    Component: ReviewPanel,
  });
  return () => {};
}

addWorkspacePanel fields:

FieldRequiredMeaning
idYesPlugin-local panel ID.
titleYesWorkspace-tab title.
iconYesLucide icon name.
contextYesworkspace or agent.
locationsNoworkspace and/or explorer. Defaults to workspace.
ComponentYesReact Native component matching the selected context's props.

A workspace panel receives PluginWorkspacePanelProps: context: "workspace", theme, host, layout, and workspaceId. An agent panel receives PluginAgentPanelProps: context: "agent", the same common fields and workspaceId, plus agentId.

Read cached state with useWorkspace(workspaceId, selector) and useAgent(agentId, selector). A selector is required. Paseo compares its result shallowly, so selecting { name, status } does not re-render when unrelated fields change. Select every field the component renders in one call; do not select the whole snapshot.

Both hooks return null when the record is unavailable. Otherwise they run synchronously against normalized client state. Snapshot DTOs and their nested values are deeply readonly and frozen at runtime. Do not call plugin RPC to discover the current workspace or agent. Fetch optional or vendor-specific enrichment after the component renders.

Workspace snapshot fields:

FieldType
idstring
projectIdstring
projectDisplayNamestring
projectRootPathstring
directorystring
projectKind"git" | "non_git" | "directory"
kind"directory" | "local_checkout" | "checkout" | "worktree"
namestring
titlestring | null
status"needs_input" | "failed" | "running" | "attention" | "done"
statusEnteredAtISO timestamp or null
archivingAtISO timestamp or null
diffStat{ additions: number; deletions: number } | null

Agent snapshot fields:

FieldType
idstring
workspaceIdstring
providerstring
status"initializing" | "idle" | "running" | "error" | "closed"
createdAtISO timestamp
updatedAtISO timestamp
lastActivityAtISO timestamp
titlestring | null
cwdstring
modelstring | null
currentModeIdstring | null
thinkingOptionIdstring | null
requiresAttentionboolean
attentionReason"finished" | "error" | "permission" | null
parentAgentIdstring | null
labelsRecord<string, string>

Paseo owns tab focus, splitting, closing, persistence, query state, the API/RPC providers, and the render error boundary. A restored tab whose plugin, panel, context, workspace, or agent is unavailable stays open with an unavailable message instead of crashing the workspace.

Command Center items

Open the Command Center with ⌘K on macOS or Ctrl+K on Windows and Linux, then search for the item title.

Register an action and open a panel from the callback:

import { defineRpc } from "@getpaseo/plugin";
import { z } from "zod";

const refreshReview = defineRpc({
  name: "review.refresh",
  input: z.object({ agentId: z.string() }),
  output: z.object({ refreshed: z.boolean() }),
});

client.addCommandCenterItem({
  id: "open-review",
  title: "Open review",
  icon: "Scan",
  keywords: ["inspect"],
  context: "agent",
  async onSelect({ paseo, rpc, workspace, agent, openPanel }) {
    await paseo.workspaces.ref(workspace.id).setTitle(`Review ${agent.id}`);
    await rpc(refreshReview, { agentId: agent.id });
    openPanel("review");
  },
});

addCommandCenterItem fields:

FieldRequiredMeaning
idYesPlugin-local item ID.
titleYesSearch result title.
iconYesLucide icon name.
keywordsNoAdditional Command Center search terms.
contextYesglobal, workspace, or agent.
onSelectYesClient-side callback for the matching context.

Global items appear on the installation's selected host. Workspace items appear only when that host has an active cached workspace. Agent items appear only when the focused workspace tab is an agent or an agent-context plugin panel whose cached record belongs to that workspace. Missing context removes the item rather than calling the plugin to discover it.

Every callback receives:

FieldContextMeaning
contextAllMatching discriminator.
paseoAllSelected host's existing PaseoApi.
rpc(contract, input)AllTyped call to this installation's daemon-side plugin handler.
openSurface(id)AllOpens one of this plugin's registered global surfaces.
workspaceWorkspace and agentSynchronous workspace snapshot.
agentAgentSynchronous matching agent snapshot.
openPanel(id, options?)Workspace and agentOpens a registered panel in the callback's current context. Pass { location: "explorer" } to target Explorer.

An agent callback may open either an agent panel or a workspace panel. A workspace callback may open only a workspace panel. Unknown surface and panel IDs fail visibly. Use paseo for normal workspace, agent, provider, and daemon-config operations. Use rpc for plugin-specific filesystem, credential, vendor, or daemon-local work.

Slash commands

Register a command that runs in the Paseo client when the user submits /name args from the message composer. The text is never sent to the agent:

client.addSlashCommand({
  name: "review",
  description: "Run the review bot",
  argumentHint: "[scope]",
  context: "agent",
  async onSubmit({ args, agent, rpc, openPanel }) {
    await rpc(refreshReview, { agentId: agent.id, scope: args });
    openPanel("review");
  },
});
FieldRequiredMeaning
nameYesCommand name without the leading slash.
descriptionYesComposer autocomplete description.
argumentHintYesShort usage hint shown after the command name.
contextYes"workspace" or "agent".
onSubmitYesClient callback for the matching context.

onSubmit receives the matching Command Center callback context plus args. For /review src, args is "src"; Paseo trims only the remainder's leading and trailing whitespace and leaves parsing to the plugin. Paseo owns the autocomplete row, input clearing, and the error toast. It does not wait for onSubmit or show a pending state; use a composer pill or panel for that.

Precedence is built-in client commands, plugin commands, then provider commands. A lower-precedence collision is omitted. Built-in aliases also reserve their names. The first plugin in stable catalog order wins a collision between plugins. Commands do not run while the composer has attachments.

Composer pills

The client entry owns pill creation and removal. This can live directly in index.client.tsx or in a function it imports from client/:

import {
  Icon,
  type PluginClientContext,
  type PluginComposerPillProps,
  useAgent,
} from "@getpaseo/plugin";
import { Text } from "react-native";

function ReviewPill({ theme, agentId }: PluginComposerPillProps) {
  const agent = useAgent(agentId, ({ title }) => ({ title }));
  return (
    <>
      <Icon name="Scan" size={14} color={theme.colors.foregroundMuted} />
      <Text numberOfLines={1} style={{ color: theme.colors.foregroundMuted, flexShrink: 1 }}>
        {agent?.title ?? "Review"}
      </Text>
    </>
  );
}

export default function contribute(client: PluginClientContext) {
  const pills = new Map<string, () => void>();
  const unsubscribe = client.paseo.agents.subscribe((update) => {
    if (update.kind !== "upsert" || !update.agent.workspaceId) return;
    const { id: agentId, workspaceId } = update.agent;
    pills.get(agentId)?.();
    pills.set(
      agentId,
      client.addComposerPill({
        id: "review",
        title: "Open review",
        workspaceId,
        agentId,
        Component: ReviewPill,
        async onPress() {
          await client.rpc(refreshReview, { agentId });
          client.openPanel("review", { workspaceId, agentId });
        },
      }),
    );
  });
  return () => {
    unsubscribe();
    for (const remove of pills.values()) remove();
  };
}

addComposerPill fields:

FieldRequiredMeaning
idYesPlugin-local ID within the target agent.
titleYesAccessible button label.
workspaceIdYesWorkspace whose composer track owns the pill.
agentIdYesAgent whose composer track owns the pill.
ComponentYesReact Native component rendering the pill's icon and text.
onPressYesClient-side callback.

The client entry runs once per plugin installation in each connected app. Its context exposes paseo, typed rpc, openSurface, explicit-context openPanel, and every client registration. addComposerPill returns an idempotent removal function. Paseo also removes every outstanding pill when the plugin installation or host connection is torn down.

Paseo owns the pressable, shared pill chrome, pending state, error reporting, and track-bar placement. The component receives theme, host, layout, workspaceId, and agentId. Read current values with useWorkspace and useAgent. The plugin owns when the pill exists, its icon and text, and the callback. openPanel(id, { workspaceId, agentId? }) opens or focuses a panel registered by the same plugin.

Use the Paseo SDK

Use usePaseo() for ordinary Paseo operations from a surface. It borrows the selected host's existing connection; do not create another client.

import { usePaseo } from "@getpaseo/plugin";
import { Pressable, Text } from "react-native";

function PullRequestAction() {
  const paseo = usePaseo();

  async function createReviewWorkspace() {
    const workspace = await paseo.workspaces.create({
      title: "Review PR 42",
      source: {
        kind: "worktree",
        cwd: "/absolute/path/to/repository",
        action: "checkout",
        checkoutSource: { kind: "change_request", forge: "github", number: 42 },
      },
    });
    await workspace.agents.create({
      config: { provider: "codex/gpt-5.5" },
      prompt: "Review PR #42.",
    });
  }

  return (
    <Pressable accessibilityRole="button" onPress={() => void createReviewWorkspace()}>
      <Text>Create review workspace</Text>
    </Pressable>
  );
}

The returned API covers projects, workspaces, agents, providers, and daemon config. See the SDK API reference for its methods. Connection lifecycle methods are intentionally absent because Paseo owns the connection.

Add plugin-specific backend behavior

Use plugin RPC only for work that is not a normal Paseo operation: reading a vendor API, accessing daemon-local resources, or keeping credentials off the client.

Define one contract with Zod, handle it in the subprocess, and call it from the surface:

shared/greeting.ts:

import { defineRpc } from "@getpaseo/plugin";
import { z } from "zod";

export const greeting = defineRpc({
  name: "greeting.create",
  input: z.object({ name: z.string() }),
  output: z.object({ message: z.string() }),
});

client/greeting.tsx:

import { useRpc } from "@getpaseo/plugin";
import { greeting } from "../shared/greeting";

export function GreetingButton() {
  const createGreeting = useRpc(greeting);
  // Call createGreeting({ name: "Ada" }) from an event or query.
  return null;
}

server/greeting.ts:

import type { RpcInput } from "@getpaseo/plugin";
import { greeting } from "../shared/greeting";

export function createGreeting({ name }: RpcInput<typeof greeting>) {
  return { message: `Hello, ${name}` };
}

index.client.tsx:

import type { PluginClientContext } from "@getpaseo/plugin";
import { GreetingButton } from "./client/greeting";

export default function contribute(client: PluginClientContext) {
  client.addSurface("main", GreetingButton);
  return () => {};
}

index.server.ts:

import type { PluginServerContext } from "@getpaseo/plugin";
import { createGreeting } from "./server/greeting";
import { greeting } from "./shared/greeting";

export default function contribute(server: PluginServerContext) {
  server.handle(greeting, createGreeting);
  return () => {};
}

Inputs and outputs are validated on both sides. RPC names start with a lowercase letter and contain lowercase letters, numbers, dots, hyphens, or underscores. useRpc() returns a typed async function. Use TanStack Query for request state, caching, and mutations.

Backend handlers receive the same PaseoApi as { paseo }. Their connection belongs to the subprocess and closes when the plugin stops. Backend code can use Node APIs and dependencies installed in the plugin directory.

Debug backend output

Backend contributions can write to stdout and stderr with normal Node logging:

console.log("Refreshing issues");
console.error("Issue refresh failed", error);

Paseo adds [paseo] entries when the plugin starts loading, becomes ready, starts stopping, and has stopped. It records compilation and load failures as stderr entries, including failures that happen before the plugin subprocess starts. Paseo also captures output emitted during initialization, RPC handlers, cleanup, and process failure. Protocol traffic uses a separate channel, so console.log() cannot corrupt plugin RPCs.

Open Settings → Plugins → Logs for the plugin, or inspect the same recent tail from the daemon CLI:

paseo plugin logs my-plugin
paseo plugin logs my-plugin --json
paseo --host <url> plugin logs my-plugin

The command returns a snapshot rather than following live output. Refresh the settings view or run the command again for newer entries. Each entry includes its timestamp, stdout or stderr stream, sequence, and message.

Paseo retains up to 500 entries and 256 KiB per plugin in memory. Individual lines are capped at 16 KiB. Reload, disable, compilation failure, initialization failure, and process failure retain the tail. Removing the plugin clears it, and a daemon restart starts a new tail. Structured copies are also written to the daemon log at $PASEO_HOME/daemon.log.

Only daemon-side output is captured. Logs from client surfaces remain in the app runtime. Do not log credentials, access tokens, or other secrets: connected users can read the retained tail, and the daemon log persists it.

Add a composer attachment source

An attachment source searches external resources and returns a stable text snapshot for an agent prompt. Keep credentials and vendor calls in the backend handler.

shared/issues.ts:

import { defineAttachmentSource, defineRpc } from "@getpaseo/plugin";
import { z } from "zod";

export const searchIssues = defineRpc({
  name: "issues.search",
  input: z.object({ query: z.string() }),
  output: z.object({
    items: z.array(
      z.object({
        id: z.string(),
        identifier: z.string(),
        title: z.string(),
        subtitle: z.string().optional(),
        url: z.string().url(),
        text: z.string(),
        resourceType: z.string(),
      }),
    ),
  }),
});

export const issues = defineAttachmentSource({
  id: "issues",
  title: "Acme issue",
  icon: "CircleDot",
  pickerTitle: "Attach Acme issue",
  searchPlaceholder: "Search by identifier or title",
  search: searchIssues,
});

server/issues.ts:

import type { RpcInput } from "@getpaseo/plugin";
import { searchIssues } from "../shared/issues";

export function search({ query }: RpcInput<typeof searchIssues>) {
  return searchAcmeIssues(query);
}

index.client.tsx:

import type { PluginClientContext } from "@getpaseo/plugin";
import { issues } from "./shared/issues";

export default function contribute(client: PluginClientContext) {
  client.addAttachmentSource(issues);
  return () => {};
}

index.server.ts:

import type { PluginServerContext } from "@getpaseo/plugin";
import { search } from "./server/issues";
import { searchIssues } from "./shared/issues";

export default function contribute(server: PluginServerContext) {
  server.handle(searchIssues, search);
  return () => {};
}

Paseo owns the composer menu, search picker, selected pill, draft state, and submission. The text value is the complete snapshot sent to the agent.

Hosts and lifecycle

Plugins are installed per daemon. When the same contribution exists on several connected hosts, Paseo shows one sidebar item and adds a host picker. The selected host supplies the bundle, Paseo API, RPC transport, and query cache. Calls never fall through to another host when the selected host is offline.

Attachment sources remain scoped to each composer's host.

Workspace panels and Command Center items stay scoped to the active host and exact cached context. Reload replaces their registrations. Disable, removal, host disconnect, and evaluation failure remove Command Center items and clear the installation's query state. An already-restored panel tab remains as unavailable until its matching contribution returns or the user closes it. Panel render failures stay inside the plugin error boundary.

CLI reference

paseo plugin init /absolute/path/to/plugin
paseo plugin install /absolute/path/to/plugin
paseo plugin install /absolute/path/to/plugin --id another-runtime-id
paseo plugin add owner/repository
paseo plugin add https://git.example.com/owner/repository.git --ref main
paseo plugin add owner/monorepo:plugins/review
paseo plugin ls [id]
paseo plugin update <id>
paseo plugin update --all
paseo plugin reload my-plugin
paseo plugin logs my-plugin
paseo plugin disable my-plugin
paseo plugin enable my-plugin
paseo plugin remove my-plugin

ls reports runtime state, source details, and the installed commit without contacting the remote. Use update when you want Paseo to contact a tracked Git remote and install an available update.

Put --host <url> before a management command when the target is not the CLI's default daemon. remove never deletes a directory source; it deletes the managed checkout for a Git source. The install-time --id is the runtime ID and allows the same directory or repository to be installed more than once.

Trust every plugin you add. paseo plugin add and paseo plugin install mean “I trust this codebase.” Server code and Git preparation commands run unsandboxed with the daemon user's access on the daemon host; client contributions run inside Paseo. Dependencies and future updates are part of that decision. With the global --host option, commands run on the remote daemon host.

An existing directory wins over owner/repository GitHub shorthand. Append :relative/path when the plugin lives below the repository root. Omit --ref to track the default branch. Explicit branches track updates; tags and commits stay pinned.

Most plugins should omit build. Use it only when the staged checkout must install a dependency that Paseo does not provide, generate source or assets, or perform another required preparation step:

{
  "id": "review",
  "build": [
    ["npm", "ci"],
    ["npm", "run", "build"]
  ]
}

build is a list of non-empty argv arrays. Paseo runs each executable directly, without a shell, from the staged plugin directory after resolving the exact commit and manifest. It never infers a package manager or commands from lockfiles. Install and update both run build before validation, compilation, activation, or replacement. A failing command reports its output, discards the candidate, and leaves the installed/running version intact. The daemon log records each command and output; with the global --host option, execution is on that daemon host.

Run npm run typecheck before install or reload. Never edit the daemon config directly.

The daemon-wide Enable plugins switch lives under Settings → Plugins. A configured plugin remains disabled until that switch and the plugin's own enabled state are both on.

The switch is the root pluginsEnabled field in config.json. After changing it, run paseo reload --json. Enabling starts every configured plugin whose own enabled value is not false; disabling tears down all plugins. No daemon restart is required. Manual edits to plugin source entries are not reloaded; use the plugin lifecycle commands for those.

Load failures

Use paseo plugin ls to read the current status and error.

SymptomCheck
This plugin was made for an older version of PaseoThe directory has only an index.ts entry. Follow the migration guide.
Plugin entry points are missingNeither index.client.tsx nor index.server.ts exists with that exact name.
server-only module cannot be imported into the plugin client bundleClient code imports server/ or a *.server.* file. Move the work behind an RPC and import its contract from shared/.
client-only module cannot be imported into the plugin server bundleServer code imports client/ or a *.client.* file. Register that contribution from index.client.tsx instead.
Node module cannot be imported into the plugin client bundleClient code imports node:*. Move the operation to server/ and call it through an RPC.
Sidebar item is missingThe plugin is running, the item references an existing surface, the icon name is valid, and the client is on the installation's host.
Client module is unavailableImport only the host-provided client modules listed above.
RPC rejectsCheck both Zod schemas and the daemon-side handler error.
Edited code does not appearRun npm run typecheck, then paseo plugin reload <id>.
Reload failsRead paseo plugin ls and paseo plugin logs <id>, fix the source error, then reload; Paseo does not restore the previous bundle.
Plugin exits unexpectedlyRead paseo plugin logs <id> for retained initialization, cleanup, stderr, and final crash output.