@getpaseo/plugin 0.16.0-beta.2 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -93,6 +93,20 @@ export interface PluginSidebarViewContribution<Text extends PluginText = string>
93
93
  description?: Text;
94
94
  Component: ComponentType<PluginSidebarViewProps>;
95
95
  }
96
+ export interface PluginWorkspaceRowBadgeItemProps extends PluginHostProps {
97
+ workspaceId: string;
98
+ }
99
+ /**
100
+ * Part of the line under a workspace's title in the sidebar, on every workspace of the plugin's host.
101
+ * Render `WorkspaceRowBadge`, or nothing when there is nothing to say about this workspace.
102
+ */
103
+ export interface PluginWorkspaceRowBadgeItemContribution<Text extends PluginText = string> {
104
+ id: string;
105
+ /** The item's toggle in the sidebar's Show menu. */
106
+ title: Text;
107
+ icon: PluginIcon;
108
+ Component: ComponentType<PluginWorkspaceRowBadgeItemProps>;
109
+ }
96
110
  /**
97
111
  * A Lucide icon name, inline SVG markup, or a component. Components receive the surface's size
98
112
  * and color; buttons widen the props with their host and target context.
@@ -178,6 +192,7 @@ export interface PluginClientContext extends PluginCommandCapabilities, PluginCl
178
192
  addSidebarHeaderItem(contribution: PluginSidebarItemContribution<PluginText>): PluginCleanup;
179
193
  addSidebarFooterItem(contribution: PluginSidebarItemContribution<PluginText>): PluginCleanup;
180
194
  addAgentPanel(contribution: PluginAgentPanelContribution<PluginText>): PluginCleanup;
195
+ addWorkspaceRowBadgeItem(contribution: PluginWorkspaceRowBadgeItemContribution<PluginText>): PluginCleanup;
181
196
  addWorkspacePanel(contribution: PluginWorkspacePanelContribution<PluginText>): PluginCleanup;
182
197
  addCommandCenterItem(contribution: PluginCommandCenterItemContribution<PluginText>): PluginCleanup;
183
198
  addSlashCommand(contribution: PluginClientSlashCommandContribution<PluginText>): PluginCleanup;
@@ -1,4 +1,4 @@
1
- export type { PluginHostProps, PluginTab, PluginPanelProps, PluginWorkspacePanelParams, PluginAgentPanelParams, PluginFilePanelParams, PluginAgentPanelContribution, PluginFilePanelContribution, PluginFilePanelProps, PluginSurfaceProps, PluginScreenProps, PluginPopoverProps, PluginScreenParams, PluginOpenScreenInput, PluginScreenLocation, PluginSidebarItemProps, PluginSidebarViewProps, PluginSidebarViewContribution, PluginSidebarItemContribution, PluginIcon, PluginPanelLocation, PluginOpenPanelOptions, PluginWorkspacePanelProps, PluginAgentPanelProps, PluginClientOpenPanelOptions, PluginClientContext, PluginClientContribution, PluginWorkspacePanelContribution, PluginSettingsScreenContribution, PluginSurfaceContribution, PluginScreenContribution, PluginScreenTitle, PluginSidebarContribution, PluginTimelineTransformerContribution, PluginTimelineItemProps, PluginTimelineRendererContribution, PluginCommandCapabilities, PluginGlobalCommandContext, PluginWorkspaceCommandContext, PluginAgentCommandContext, PluginCommandCenterItemContribution, PluginClientSlashCommandContribution, SettingsState, } from "./contracts.js";
1
+ export type { PluginHostProps, PluginTab, PluginPanelProps, PluginWorkspacePanelParams, PluginAgentPanelParams, PluginFilePanelParams, PluginAgentPanelContribution, PluginFilePanelContribution, PluginFilePanelProps, PluginSurfaceProps, PluginScreenProps, PluginPopoverProps, PluginScreenParams, PluginOpenScreenInput, PluginScreenLocation, PluginSidebarItemProps, PluginSidebarViewProps, PluginSidebarViewContribution, PluginSidebarItemContribution, PluginWorkspaceRowBadgeItemProps, PluginWorkspaceRowBadgeItemContribution, PluginIcon, PluginPanelLocation, PluginOpenPanelOptions, PluginWorkspacePanelProps, PluginAgentPanelProps, PluginClientOpenPanelOptions, PluginClientContext, PluginClientContribution, PluginWorkspacePanelContribution, PluginSettingsScreenContribution, PluginSurfaceContribution, PluginScreenContribution, PluginScreenTitle, PluginSidebarContribution, PluginTimelineTransformerContribution, PluginTimelineItemProps, PluginTimelineRendererContribution, PluginCommandCapabilities, PluginGlobalCommandContext, PluginWorkspaceCommandContext, PluginAgentCommandContext, PluginCommandCenterItemContribution, PluginClientSlashCommandContribution, SettingsState, } from "./contracts.js";
2
2
  export type { PluginButton, PluginButtonBehavior, PluginButtonContentProps, PluginButtonContext, PluginButtonIcon, PluginButtonIconProps, PluginButtonMenuEntry, PluginButtonRegistration, PluginComposerPillContribution, PluginHeaderButtonContribution, } from "./buttons.js";
3
3
  export type { PluginIconProps, PluginSerializableIcon, PluginSvgIcon } from "../icons.js";
4
4
  export type { PluginFile, PluginFileBytesState, PluginFileEvent, PluginFileTextState, PluginFileUrlState, PluginFileWriteOptions, } from "./file.js";
@@ -144,6 +144,18 @@ export interface SidebarRowProps {
144
144
  export declare const SidebarRow: ComponentType<SidebarRowProps>;
145
145
  /** A line between groups of rows. Render it from a sidebar item's `Component`. */
146
146
  export declare const SidebarSeparator: ComponentType;
147
+ export type WorkspaceRowBadgeTone = "muted" | "success" | "warning" | "danger" | "info";
148
+ export interface WorkspaceRowBadgeProps {
149
+ /** A Lucide icon name, inline SVG, or a component. */
150
+ icon?: SidebarIcon;
151
+ label?: string;
152
+ /** Default "muted". */
153
+ tone?: WorkspaceRowBadgeTone;
154
+ /** Defaults to `label`, then the item's `title`. */
155
+ accessibilityLabel?: string;
156
+ }
157
+ /** One item on a sidebar workspace row's meta line. Render it from a workspace row badge item's `Component`. */
158
+ export declare const WorkspaceRowBadge: ComponentType<WorkspaceRowBadgeProps>;
147
159
  /** Paseo's loading state. Fills the panel; the panel decides when to show it. */
148
160
  export declare const Loading: ComponentType;
149
161
  /** Render a local document URL in an isolated frame. */
@@ -90,6 +90,12 @@ export interface PluginThemeColors {
90
90
  accent?: string;
91
91
  mutedForeground: string;
92
92
  ring: string;
93
+ sidebar?: string;
94
+ sidebarHover?: string;
95
+ sidebarSelected?: string;
96
+ surface3?: string;
97
+ surface4?: string;
98
+ foregroundExtraMuted?: string;
93
99
  }
94
100
  export interface PluginThemeContribution<Text extends PluginText = string> {
95
101
  id: string;
@@ -1302,8 +1302,9 @@ function toolTimelineItem(snapshot) {
1302
1302
  name: snapshot.name ?? snapshot.title,
1303
1303
  detail,
1304
1304
  };
1305
- if (status === "failed")
1306
- return { ...base, status, error: snapshot.output };
1305
+ if (status === "failed") {
1306
+ return { ...base, status, error: snapshot.output ?? { message: "Tool failed" } };
1307
+ }
1307
1308
  return { ...base, status, error: null };
1308
1309
  }
1309
1310
  // A row the turn left open ends with the turn. The wire contract requires a non-null error on a
@@ -1,5 +1,5 @@
1
1
  import type { AgentToolDefinition } from "./agent-tools.js";
2
- import type { AgentPermissionRequest, AgentPermissionResponse, AgentTimelineItem, AgentSessionConfig, JsonValue } from "@getpaseo/protocol/agent-types";
2
+ import type { AgentPermissionRequest, AgentPermissionResponse, AgentSessionConfig, JsonValue } from "@getpaseo/protocol/agent-types";
3
3
  import type { PaseoApi } from "@getpaseo/client";
4
4
  import type { WorkspaceCreateRequest } from "@getpaseo/protocol/messages";
5
5
  export interface PluginHookContext {
@@ -107,12 +107,13 @@ export interface PluginHookEvents {
107
107
  "agent.turn.after": {
108
108
  agent: PluginHookAgent;
109
109
  turnId: string | null;
110
- outcome: PluginTurnOutcome;
111
110
  /**
112
- * @deprecated Always empty. Fetch history on demand with
113
- * context.paseo.agents.ref(agent.id).timeline.refetch({ direction: "tail", limit: 20 }).
111
+ * The payload carries no history. Read the turn with
112
+ * `paseo.agents.ref(agent.id).timeline.refetch({ direction: "tail", limit: 1, wholeTurns: true })`
113
+ * and keep the entries whose `turnId` equals this `turnId`. The result is empty when a newer turn
114
+ * started before the read, or when `turnId` is `null`.
114
115
  */
115
- timeline: readonly AgentTimelineItem[];
116
+ outcome: PluginTurnOutcome;
116
117
  };
117
118
  "agent.permission.before": {
118
119
  agent: PluginHookAgent;
@@ -183,7 +183,7 @@ interface ProviderReviewAttachment {
183
183
  type: "review";
184
184
  mimeType: "application/paseo-review";
185
185
  cwd: string;
186
- mode: "uncommitted" | "base";
186
+ mode: "uncommitted" | "base" | "all";
187
187
  baseRef?: string | null;
188
188
  comments: Array<{
189
189
  filePath: string;
@@ -257,7 +257,7 @@ const providerContentSchema = z.union([
257
257
  type: z.literal("review"),
258
258
  mimeType: z.literal("application/paseo-review"),
259
259
  cwd: z.string(),
260
- mode: z.enum(["uncommitted", "base"]),
260
+ mode: z.enum(["uncommitted", "base", "all"]),
261
261
  baseRef: z.string().nullable().optional(),
262
262
  comments: z.array(z
263
263
  .object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpaseo/plugin",
3
- "version": "0.16.0-beta.2",
3
+ "version": "0.16.0",
4
4
  "description": "Paseo plugin SDK package",
5
5
  "license": "Apache-2.0",
6
6
  "files": [
@@ -78,8 +78,8 @@
78
78
  "use-sync-external-store": "^1.6.0"
79
79
  },
80
80
  "devDependencies": {
81
- "@getpaseo/client": "0.16.0-beta.2",
82
- "@getpaseo/protocol": "0.16.0-beta.2",
81
+ "@getpaseo/client": "0.16.0",
82
+ "@getpaseo/protocol": "0.16.0",
83
83
  "@types/node": "^20.9.0",
84
84
  "@types/react": "~19.2.0",
85
85
  "react": "19.2.3",
@@ -89,8 +89,8 @@
89
89
  "zod": "^4.4.3"
90
90
  },
91
91
  "peerDependencies": {
92
- "@getpaseo/client": "0.16.0-beta.2",
93
- "@getpaseo/protocol": "0.16.0-beta.2",
92
+ "@getpaseo/client": "0.16.0",
93
+ "@getpaseo/protocol": "0.16.0",
94
94
  "react": ">=19.1.0 <20",
95
95
  "react-native": ">=0.81.5",
96
96
  "zod": "^4.4.3"