@yinaoxiong/paseo-plugin 0.13.0-personal.2 → 0.15.0-personal.2

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.
package/build-info.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "upstreamVersion": "0.13.0",
3
+ "upstreamVersion": "0.15.0",
4
4
  "revision": 2,
5
- "version": "0.13.0-personal.2",
6
- "appVersion": "0.13.0",
7
- "androidVersionCode": 13000002,
8
- "iosBuildNumber": "13000999",
9
- "sourceSha": "304eddd9f5faeb73a95849016fab679cddaaac81",
10
- "lockSha256": "2d01603a5d066050920eab87b32b03edb45bb3e450e46c12b3f7979c586be277",
5
+ "version": "0.15.0-personal.2",
6
+ "appVersion": "0.15.0",
7
+ "androidVersionCode": 15000002,
8
+ "iosBuildNumber": "15000999",
9
+ "sourceSha": "b9dd9b77815dace5f3d6918a67698c75a077e734",
10
+ "lockSha256": "74e66d2038e8b2f93ceddae21db1ff21e87938d8ebcf13f569902ff4ee903a8e",
11
11
  "nodeVersion": "v24.21.0",
12
12
  "npmVersion": "11.19.0",
13
13
  "platform": "linux",
14
14
  "arch": "x64",
15
15
  "signature": "unsigned",
16
16
  "packageName": "@yinaoxiong/paseo-plugin",
17
- "desktopVersion": "0.13.0+personal.2"
17
+ "desktopVersion": "0.15.0+personal.2"
18
18
  }
@@ -13,6 +13,8 @@ export interface PluginHostProps {
13
13
  host: {
14
14
  id: string;
15
15
  label: string;
16
+ /** Panel writes are gated until the connected host has revalidated its plugin catalog. */
17
+ connected?: boolean;
16
18
  };
17
19
  layout: {
18
20
  compact: boolean;
@@ -81,6 +83,8 @@ export interface PluginOpenPanelOptions {
81
83
  location?: PluginPanelLocation;
82
84
  }
83
85
  interface PluginWorkspacePanelBase<Text extends PluginText = string> {
86
+ /** Keep this mounted panel read-only across transport loss; real removal/revocation still disposes it. */
87
+ retainOnDisconnect?: boolean;
84
88
  id: string;
85
89
  title: Text;
86
90
  icon: PluginIcon;
@@ -1,3 +1,4 @@
1
+ export type { PaseoSideChatActions } from "@getpaseo/client";
1
2
  export type { PluginHostProps, PluginTab, PluginPanelProps, PluginWorkspacePanelParams, PluginAgentPanelParams, PluginFilePanelParams, PluginAgentPanelContribution, PluginFilePanelContribution, PluginFilePanelProps, PluginSurfaceProps, PluginScreenProps, PluginPopoverProps, PluginScreenParams, PluginOpenScreenInput, PluginScreenLocation, PluginSidebarItemProps, 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";
2
3
  export type { PluginButton, PluginButtonBehavior, PluginButtonContentProps, PluginButtonContext, PluginButtonIcon, PluginButtonIconProps, PluginButtonMenuEntry, PluginButtonRegistration, PluginComposerPillContribution, PluginHeaderButtonContribution, } from "./buttons.js";
3
4
  export type { PluginIconProps, PluginSerializableIcon, PluginSvgIcon } from "../icons.js";
@@ -157,4 +157,52 @@ export interface MarkdownProps {
157
157
  }
158
158
  /** Renders Markdown using Paseo’s theme, selection, and link behavior. */
159
159
  export declare const Markdown: ComponentType<MarkdownProps>;
160
+ export interface ConversationProps {
161
+ snapshot: import("@getpaseo/protocol/messages").SideChatSnapshot | null;
162
+ busy: boolean;
163
+ connected: boolean;
164
+ pending: boolean;
165
+ onRespond(permissionId: string, response: import("@getpaseo/protocol/agent-types").AgentPermissionResponse): Promise<void>;
166
+ }
167
+ /** The same production conversation layout, scrolling, messages, tools and permissions as agent streams. */
168
+ export declare const Conversation: ComponentType<ConversationProps>;
169
+ export interface ConversationInputProps {
170
+ value: string;
171
+ onChangeText(text: string): void;
172
+ onSend(): void;
173
+ onStop(): void;
174
+ busy: boolean;
175
+ pending: boolean;
176
+ connected: boolean;
177
+ label: string;
178
+ placeholder: string;
179
+ snapshot: import("@getpaseo/protocol/messages").SideChatSnapshot | null;
180
+ }
181
+ /** Production composer input/layout with explicit text-only side capabilities and read-only runtime footer. */
182
+ export declare const ConversationInput: ComponentType<ConversationInputProps>;
183
+ export interface ActionMenuAction {
184
+ id: string;
185
+ label: string;
186
+ onPress(): void;
187
+ disabled?: boolean;
188
+ destructive?: boolean;
189
+ }
190
+ export interface ActionMenuProps {
191
+ label: string;
192
+ actions: readonly ActionMenuAction[];
193
+ }
194
+ export declare const ActionMenu: ComponentType<ActionMenuProps>;
195
+ export declare const Button: ComponentType<{
196
+ children: ReactNode;
197
+ onPress(): void;
198
+ disabled?: boolean;
199
+ variant?: "default" | "secondary" | "outline" | "ghost" | "destructive";
200
+ size?: "xs" | "sm" | "md" | "lg";
201
+ }>;
202
+ export declare function confirmDialog(input: {
203
+ title: string;
204
+ message: string;
205
+ confirmLabel?: string;
206
+ destructive?: boolean;
207
+ }): Promise<boolean>;
160
208
  //# sourceMappingURL=ui.d.ts.map
@@ -823,7 +823,9 @@ class AcpRuntime {
823
823
  resolveChunkId(kind, messageId) {
824
824
  if (messageId) {
825
825
  this.fallbackChunkIds.delete(kind);
826
- return messageId;
826
+ // Native IDs identify a message within its chunk kind. Timeline IDs must
827
+ // also distinguish reasoning from replies and from generated fallback IDs.
828
+ return JSON.stringify([kind, messageId]);
827
829
  }
828
830
  let id = this.fallbackChunkIds.get(kind);
829
831
  if (!id) {
@@ -0,0 +1,28 @@
1
+ import type { PaseoApi } from "@getpaseo/client";
2
+ import type { z } from "zod";
3
+ import type { PluginHookAgent } from "./lifecycle.js";
4
+ export interface AgentToolContext {
5
+ agent: PluginHookAgent;
6
+ paseo: PaseoApi;
7
+ signal: AbortSignal;
8
+ }
9
+ export interface AgentToolResult {
10
+ text?: string;
11
+ structuredContent?: unknown;
12
+ isError?: boolean;
13
+ }
14
+ export interface AgentToolDefinition {
15
+ name: string;
16
+ title?: string;
17
+ description: string;
18
+ input: z.ZodType;
19
+ execute(input: unknown, context: AgentToolContext): AgentToolResult | Promise<AgentToolResult>;
20
+ }
21
+ export declare function defineAgentTool<Input extends z.ZodType>(tool: {
22
+ name: string;
23
+ title?: string;
24
+ description: string;
25
+ input: Input;
26
+ execute(input: z.output<Input>, context: AgentToolContext): AgentToolResult | Promise<AgentToolResult>;
27
+ }): AgentToolDefinition;
28
+ //# sourceMappingURL=agent-tools.d.ts.map
@@ -0,0 +1,7 @@
1
+ export function defineAgentTool(tool) {
2
+ if (!/^[a-z][a-z0-9_]*$/.test(tool.name) || tool.name.length > 64) {
3
+ throw new Error(`Invalid agent tool name: ${tool.name}`);
4
+ }
5
+ return tool;
6
+ }
7
+ //# sourceMappingURL=agent-tools.js.map
@@ -1,5 +1,7 @@
1
1
  export type { UsageSourceRegistration, UsageReport, UsageWindow, UsageBalance, UsageDetail, } from "./usage.js";
2
2
  export type { PluginHandlerContext, PluginServerContext, PluginServerContribution, PluginSettings, PluginSettingsState, } from "./contracts.js";
3
- export type { PluginHookContext, PluginHookWorkspace, PluginHookAgent, PluginSessionOpenRequest, PluginTurnOutcome, PluginLifecycleEvents, PluginBeforeRequests, PluginLifecycleRegistration, } from "./lifecycle.js";
3
+ export type { PluginHooks, PluginHookEvents, PluginHookRequests, PluginHookPayload, PluginHookResult, PluginHookContext, PluginHookWorkspace, PluginHookWorktree, PluginWorktreeCreateRequest, PluginHookAgent, PluginSessionOpenRequest, PluginTurnOutcome, PluginLifecycleEvents, PluginBeforeRequests, PluginLifecycleRegistration, } from "./lifecycle.js";
4
4
  export { spawnProcess, execCommand, terminateProcess } from "./process.js";
5
+ export { defineAgentTool } from "./agent-tools.js";
6
+ export type { AgentToolDefinition, AgentToolResult, AgentToolContext } from "./agent-tools.js";
5
7
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,3 @@
1
1
  export { spawnProcess, execCommand, terminateProcess } from "./process.js";
2
+ export { defineAgentTool } from "./agent-tools.js";
2
3
  //# sourceMappingURL=index.js.map
@@ -1,3 +1,4 @@
1
+ import type { AgentToolDefinition } from "./agent-tools.js";
1
2
  import type { AgentPermissionRequest, AgentPermissionResponse, AgentTimelineItem, AgentSessionConfig } from "@getpaseo/protocol/agent-types";
2
3
  import type { PaseoApi } from "@getpaseo/client";
3
4
  import type { WorkspaceCreateRequest } from "@getpaseo/protocol/messages";
@@ -12,6 +13,50 @@ export interface PluginHookWorkspace {
12
13
  name: string | null;
13
14
  archivedAt: string | null;
14
15
  }
16
+ export interface PluginHookWorktree {
17
+ path: string;
18
+ branch: string;
19
+ sourceCheckout: string;
20
+ }
21
+ /** Resolved creation options before Git fetches refs or chooses a unique branch name. */
22
+ export type PluginWorktreeCreateRequest = {
23
+ readonly repoRoot: string;
24
+ readonly sourceCheckout: string;
25
+ branch: string;
26
+ slug: string;
27
+ path: string;
28
+ } & ({
29
+ kind: "branch-off";
30
+ baseRef: string;
31
+ } | {
32
+ kind: "checkout-branch";
33
+ } | {
34
+ kind: "checkout-change-request";
35
+ baseRef: string;
36
+ forge: string;
37
+ changeRequestNumber: number;
38
+ headRef: string;
39
+ headRepositoryOwner?: string;
40
+ headRepository?: string;
41
+ checkoutRefs?: {
42
+ remoteName?: string;
43
+ remoteRef: string;
44
+ }[];
45
+ pushRemoteUrl?: string;
46
+ trackOriginHead?: boolean;
47
+ } | {
48
+ kind: "checkout-github-pr";
49
+ baseRef: string;
50
+ githubPrNumber: number;
51
+ headRef: string;
52
+ headRepositoryOwner?: string;
53
+ checkoutRefs?: {
54
+ remoteName?: string;
55
+ remoteRef: string;
56
+ }[];
57
+ pushRemoteUrl?: string;
58
+ trackOriginHead?: boolean;
59
+ });
15
60
  export interface PluginHookAgent {
16
61
  id: string;
17
62
  workspaceId: string | null;
@@ -27,7 +72,11 @@ export interface PluginSessionOpenRequest {
27
72
  cwd: string;
28
73
  reason: "create" | "resume" | "refresh" | "import";
29
74
  purpose: "interactive" | "history";
75
+ readonly title: string | null;
76
+ readonly labels: Readonly<Record<string, string>>;
77
+ tools: AgentToolDefinition[];
30
78
  env: Record<string, string>;
79
+ mcpServers: NonNullable<AgentSessionConfig["mcpServers"]>;
31
80
  }
32
81
  export type PluginTurnOutcome = {
33
82
  kind: "completed";
@@ -41,12 +90,12 @@ export type PluginTurnOutcome = {
41
90
  kind: "canceled";
42
91
  reason: string;
43
92
  };
44
- export interface PluginLifecycleEvents {
45
- "agent.turn_started": {
93
+ export interface PluginHookEvents {
94
+ "agent.turn.before": {
46
95
  agent: PluginHookAgent;
47
96
  turnId: string | null;
48
97
  };
49
- "agent.turn_ended": {
98
+ "agent.turn.after": {
50
99
  agent: PluginHookAgent;
51
100
  turnId: string | null;
52
101
  outcome: PluginTurnOutcome;
@@ -56,44 +105,151 @@ export interface PluginLifecycleEvents {
56
105
  */
57
106
  timeline: readonly AgentTimelineItem[];
58
107
  };
59
- "agent.permission_requested": {
108
+ "agent.permission.before": {
60
109
  agent: PluginHookAgent;
61
110
  request: AgentPermissionRequest;
62
111
  };
63
- "agent.permission_resolved": {
112
+ "agent.permission.after": {
64
113
  agent: PluginHookAgent;
65
114
  requestId: string;
66
115
  resolution: AgentPermissionResponse;
67
116
  };
68
- "agent.archived": {
117
+ "agent.archive.after": {
69
118
  agent: PluginHookAgent;
70
119
  archivedAt: string;
71
120
  };
72
- "agent.created": {
121
+ "agent.create.after": {
73
122
  agent: PluginHookAgent;
74
123
  };
75
- "agent.closed": {
124
+ "agent.close.after": {
76
125
  agent: PluginHookAgent;
77
126
  };
78
- "workspace.created": {
127
+ "workspace.create.after": {
79
128
  workspace: PluginHookWorkspace;
80
129
  };
81
- "workspace.archived": {
130
+ "workspace.archive.after": {
82
131
  workspace: PluginHookWorkspace;
83
132
  };
84
133
  }
85
- export interface PluginBeforeRequests {
86
- "agent.create": {
134
+ export interface PluginHookRequests {
135
+ "worktree.create.before": PluginWorktreeCreateRequest;
136
+ "agent.create.before": {
87
137
  config: AgentSessionConfig;
88
138
  env?: Record<string, string>;
89
139
  };
90
- "agent.session_open": PluginSessionOpenRequest;
91
- "workspace.create": Omit<WorkspaceCreateRequest, "type" | "requestId">;
140
+ "agent.open.before": PluginSessionOpenRequest;
141
+ "workspace.create.before": Omit<WorkspaceCreateRequest, "type" | "requestId">;
92
142
  }
143
+ export type PluginHooks = {
144
+ [Name in keyof PluginHookRequests]: {
145
+ request: PluginHookRequests[Name];
146
+ result: PluginHookRequests[Name];
147
+ };
148
+ } & {
149
+ [Name in keyof PluginHookEvents]: {
150
+ payload: PluginHookEvents[Name];
151
+ };
152
+ } & {
153
+ "worktree.create.after": {
154
+ payload: {
155
+ worktree: PluginHookWorktree;
156
+ };
157
+ };
158
+ };
159
+ export type PluginHookPayload<Name extends keyof PluginHooks> = {
160
+ [Key in keyof PluginHooks]: PluginHooks[Key] extends {
161
+ request: infer Request;
162
+ } ? {
163
+ request: Request;
164
+ } : PluginHooks[Key] extends {
165
+ payload: infer Payload;
166
+ } ? Payload : never;
167
+ }[Name];
168
+ export type PluginHookResult<Name extends keyof PluginHooks> = {
169
+ [Key in keyof PluginHooks]: PluginHooks[Key] extends {
170
+ result: infer Result;
171
+ } ? Result | void : void;
172
+ }[Name];
173
+ type HookHandlers = {
174
+ [Name in keyof PluginHooks]: (payload: PluginHookPayload<Name>, context: PluginHookContext) => Promise<PluginHookResult<Name>>;
175
+ };
93
176
  export interface PluginLifecycleRegistration {
177
+ addHook<Name extends keyof PluginHooks>(name: Name, handler: HookHandlers[Name]): () => void;
178
+ /** @deprecated Use addHook with the renamed hook. Removed after 2027-04-30. */
94
179
  on<Name extends keyof PluginLifecycleEvents>(name: Name, handler: (event: PluginLifecycleEvents[Name], context: PluginHookContext) => void | Promise<void>): () => void;
180
+ /** @deprecated Use addHook with the renamed hook. Removed after 2027-04-30. */
95
181
  before<Name extends keyof PluginBeforeRequests>(name: Name, handler: (input: {
96
182
  request: PluginBeforeRequests[Name];
97
183
  }, context: PluginHookContext) => PluginBeforeRequests[Name] | void | Promise<PluginBeforeRequests[Name] | void>): () => void;
98
184
  }
185
+ /** @internal Lifecycle policy shared by the daemon and plugin process. */
186
+ export declare const pluginHookRegistry: {
187
+ readonly "workspace.create.before": {
188
+ readonly waits: true;
189
+ };
190
+ readonly "workspace.create.after": {
191
+ readonly waits: false;
192
+ };
193
+ readonly "workspace.archive.after": {
194
+ readonly waits: false;
195
+ };
196
+ readonly "worktree.create.before": {
197
+ readonly waits: true;
198
+ };
199
+ readonly "worktree.create.after": {
200
+ readonly waits: true;
201
+ };
202
+ readonly "agent.create.before": {
203
+ readonly waits: true;
204
+ };
205
+ readonly "agent.create.after": {
206
+ readonly waits: false;
207
+ };
208
+ readonly "agent.open.before": {
209
+ readonly waits: true;
210
+ };
211
+ readonly "agent.close.after": {
212
+ readonly waits: false;
213
+ };
214
+ readonly "agent.archive.after": {
215
+ readonly waits: false;
216
+ };
217
+ readonly "agent.turn.before": {
218
+ readonly waits: false;
219
+ };
220
+ readonly "agent.turn.after": {
221
+ readonly waits: false;
222
+ };
223
+ readonly "agent.permission.before": {
224
+ readonly waits: false;
225
+ };
226
+ readonly "agent.permission.after": {
227
+ readonly waits: false;
228
+ };
229
+ };
230
+ declare const legacyEvents: {
231
+ readonly "workspace.created": "workspace.create.after";
232
+ readonly "workspace.archived": "workspace.archive.after";
233
+ readonly "agent.created": "agent.create.after";
234
+ readonly "agent.closed": "agent.close.after";
235
+ readonly "agent.archived": "agent.archive.after";
236
+ readonly "agent.turn_started": "agent.turn.before";
237
+ readonly "agent.turn_ended": "agent.turn.after";
238
+ readonly "agent.permission_requested": "agent.permission.before";
239
+ readonly "agent.permission_resolved": "agent.permission.after";
240
+ };
241
+ declare const legacyRequests: {
242
+ readonly "workspace.create": "workspace.create.before";
243
+ readonly "agent.create": "agent.create.before";
244
+ readonly "agent.session_open": "agent.open.before";
245
+ };
246
+ export type PluginLifecycleEvents = {
247
+ [Name in keyof typeof legacyEvents]: PluginHookEvents[(typeof legacyEvents)[Name]];
248
+ };
249
+ export type PluginBeforeRequests = {
250
+ [Name in keyof typeof legacyRequests]: PluginHookRequests[(typeof legacyRequests)[Name]];
251
+ };
252
+ /** @internal SDK adapter for the daemon's hook registry. */
253
+ export declare function createLifecycleRegistration(register: (name: keyof PluginHooks, handler: (input: never, context: PluginHookContext) => unknown) => () => void): PluginLifecycleRegistration;
254
+ export {};
99
255
  //# sourceMappingURL=lifecycle.d.ts.map
@@ -1,2 +1,56 @@
1
- export {};
1
+ /** @internal Lifecycle policy shared by the daemon and plugin process. */
2
+ export const pluginHookRegistry = {
3
+ "workspace.create.before": { waits: true },
4
+ "workspace.create.after": { waits: false },
5
+ "workspace.archive.after": { waits: false },
6
+ "worktree.create.before": { waits: true },
7
+ "worktree.create.after": { waits: true },
8
+ "agent.create.before": { waits: true },
9
+ "agent.create.after": { waits: false },
10
+ "agent.open.before": { waits: true },
11
+ "agent.close.after": { waits: false },
12
+ "agent.archive.after": { waits: false },
13
+ "agent.turn.before": { waits: false },
14
+ "agent.turn.after": { waits: false },
15
+ "agent.permission.before": { waits: false },
16
+ "agent.permission.after": { waits: false },
17
+ };
18
+ // COMPAT(pluginHookNames): added in v0.14, remove after 2027-04-30
19
+ const legacyEvents = {
20
+ "workspace.created": "workspace.create.after",
21
+ "workspace.archived": "workspace.archive.after",
22
+ "agent.created": "agent.create.after",
23
+ "agent.closed": "agent.close.after",
24
+ "agent.archived": "agent.archive.after",
25
+ "agent.turn_started": "agent.turn.before",
26
+ "agent.turn_ended": "agent.turn.after",
27
+ "agent.permission_requested": "agent.permission.before",
28
+ "agent.permission_resolved": "agent.permission.after",
29
+ };
30
+ const legacyRequests = {
31
+ "workspace.create": "workspace.create.before",
32
+ "agent.create": "agent.create.before",
33
+ "agent.session_open": "agent.open.before",
34
+ };
35
+ /** @internal SDK adapter for the daemon's hook registry. */
36
+ export function createLifecycleRegistration(register) {
37
+ const names = new Set(Object.keys(pluginHookRegistry));
38
+ return {
39
+ addHook(name, handler) {
40
+ if (!names.has(name))
41
+ throw new Error(`Unknown lifecycle hook: ${name}`);
42
+ return register(name, handler);
43
+ },
44
+ on(name, handler) {
45
+ if (!Object.hasOwn(legacyEvents, name))
46
+ throw new Error(`Unknown lifecycle event: ${name}`);
47
+ return register(legacyEvents[name], handler);
48
+ },
49
+ before(name, handler) {
50
+ if (!Object.hasOwn(legacyRequests, name))
51
+ throw new Error(`Unknown before hook: ${name}`);
52
+ return register(legacyRequests[name], handler);
53
+ },
54
+ };
55
+ }
2
56
  //# sourceMappingURL=lifecycle.js.map
@@ -1,7 +1,7 @@
1
1
  import type { JsonValue } from "@getpaseo/protocol/agent-types";
2
2
  import { z } from "zod";
3
3
  export declare const PROVIDER_PROTOCOL_VERSION: 1;
4
- export declare const PROVIDER_CAPABILITIES: readonly ["prompt.message", "prompt.command", "prompt.image", "prompt.output_schema", "prompt.steer", "session.archive", "session.configure", "session.list", "session.persistence", "session.revert.both", "session.revert.conversation", "session.revert.files", "session.subsession", "session.unarchive", "permission", "permission.tool_policy", "timeline.plugin"];
4
+ export declare const PROVIDER_CAPABILITIES: readonly ["prompt.message", "prompt.command", "prompt.image", "prompt.output_schema", "prompt.steer", "session.can_stop_runtime", "session.archive", "session.configure", "session.list", "session.persistence", "session.revert.both", "session.revert.conversation", "session.revert.files", "session.subsession", "session.unarchive", "permission", "permission.tool_policy", "timeline.plugin"];
5
5
  export type ProviderCapability = (typeof PROVIDER_CAPABILITIES)[number];
6
6
  export interface ProviderRegistration {
7
7
  /** Activate only while agents.providers contains this provider ID, independently of enabled. */
@@ -258,6 +258,10 @@ export type ProviderInput = {
258
258
  type: "session.unarchive";
259
259
  requestId: string;
260
260
  persistence: ProviderPersistence;
261
+ } | {
262
+ type: "session.can_stop_runtime";
263
+ requestId: string;
264
+ sessionId: string;
261
265
  } | {
262
266
  type: "session.close";
263
267
  requestId: string;
@@ -531,6 +535,11 @@ export type ProviderTimelineItem = (ProviderTimelineIdentity & {
531
535
  data: JsonValue;
532
536
  });
533
537
  export type ProviderEvent = {
538
+ type: "session.can_stop_runtime";
539
+ requestId: string;
540
+ sessionId: string;
541
+ canStop: boolean;
542
+ } | {
534
543
  type: "catalog";
535
544
  requestId: string;
536
545
  catalog: ProviderCatalog;
@@ -6,6 +6,7 @@ export const PROVIDER_CAPABILITIES = [
6
6
  "prompt.image",
7
7
  "prompt.output_schema",
8
8
  "prompt.steer",
9
+ "session.can_stop_runtime",
9
10
  "session.archive",
10
11
  "session.configure",
11
12
  "session.list",
@@ -60,6 +61,8 @@ function requiredPromptCapabilities(prompt) {
60
61
  }
61
62
  export function requiredProviderCapabilities(input) {
62
63
  switch (input.type) {
64
+ case "session.can_stop_runtime":
65
+ return ["session.can_stop_runtime"];
63
66
  case "catalog":
64
67
  case "session.interrupt":
65
68
  case "session.close":
@@ -372,6 +375,13 @@ export const ProviderInputSchema = z.discriminatedUnion("type", [
372
375
  persistence: persistenceSchema,
373
376
  })
374
377
  .strict(),
378
+ z
379
+ .object({
380
+ type: z.literal("session.can_stop_runtime"),
381
+ requestId: idSchema,
382
+ sessionId: idSchema,
383
+ })
384
+ .strict(),
375
385
  z.object({ type: z.literal("session.close"), requestId: idSchema, sessionId: idSchema }).strict(),
376
386
  ]);
377
387
  const modeSchema = z
@@ -735,6 +745,14 @@ export const ProviderEventSchema = z.discriminatedUnion("type", [
735
745
  sessionId: idSchema,
736
746
  })
737
747
  .strip(),
748
+ z
749
+ .object({
750
+ type: z.literal("session.can_stop_runtime"),
751
+ requestId: idSchema,
752
+ sessionId: idSchema,
753
+ canStop: z.boolean(),
754
+ })
755
+ .strip(),
738
756
  z
739
757
  .object({
740
758
  type: z.literal("session.closed"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yinaoxiong/paseo-plugin",
3
- "version": "0.13.0-personal.2",
3
+ "version": "0.15.0-personal.2",
4
4
  "description": "Paseo plugin SDK package",
5
5
  "files": [
6
6
  "dist",
@@ -53,6 +53,11 @@
53
53
  "types": "./dist/client/index.d.ts",
54
54
  "source": "./src/client/index.ts",
55
55
  "default": "./dist/client/index.js"
56
+ },
57
+ "./internal/lifecycle": {
58
+ "types": "./dist/server/lifecycle.d.ts",
59
+ "source": "./src/server/lifecycle.ts",
60
+ "default": "./dist/server/lifecycle.js"
56
61
  }
57
62
  },
58
63
  "publishConfig": {
@@ -64,8 +69,8 @@
64
69
  "@agentclientprotocol/sdk": "1.4.0",
65
70
  "i18next": "26.3.0",
66
71
  "use-sync-external-store": "1.6.0",
67
- "@getpaseo/client": "npm:@yinaoxiong/paseo-client@0.13.0-personal.2",
68
- "@getpaseo/protocol": "npm:@yinaoxiong/paseo-protocol@0.13.0-personal.2"
72
+ "@getpaseo/client": "npm:@yinaoxiong/paseo-client@0.15.0-personal.2",
73
+ "@getpaseo/protocol": "npm:@yinaoxiong/paseo-protocol@0.15.0-personal.2"
69
74
  },
70
75
  "peerDependencies": {
71
76
  "react": ">=19.1.0 <20",