@getpaseo/plugin 0.11.2 → 0.11.3

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.
@@ -308,6 +308,8 @@ class AcpRuntime {
308
308
  this.nativeSessionId = "";
309
309
  this.messages = new Map();
310
310
  this.toolCalls = new Map();
311
+ // Running tool rows published by transformers; the turn's terminal closes any left open.
312
+ this.vendorToolCalls = new Map();
311
313
  this.pendingCompactions = new Set();
312
314
  this.permissions = new Map();
313
315
  this.configOptions = [];
@@ -462,7 +464,10 @@ class AcpRuntime {
462
464
  turnId,
463
465
  state: "started",
464
466
  });
465
- const settled = this.call(this.connection.prompt({ sessionId: this.nativeSessionId, prompt })).then((response) => {
467
+ // The SDK dispatches notifications without awaiting them, so the prompt response can resolve
468
+ // while earlier session updates are still queued. Apply them before the turn ends.
469
+ const settled = this.call(this.connection.prompt({ sessionId: this.nativeSessionId, prompt })).then(async (response) => {
470
+ await this.drainNotifications();
466
471
  const state = response.stopReason === "cancelled" ? "canceled" : "completed";
467
472
  this.fallbackChunkIds.clear();
468
473
  this.terminalizeTransientItems(state);
@@ -473,7 +478,8 @@ class AcpRuntime {
473
478
  state,
474
479
  });
475
480
  return undefined;
476
- }, (error) => {
481
+ }, async (error) => {
482
+ await this.drainNotifications();
477
483
  this.fallbackChunkIds.clear();
478
484
  this.terminalizeTransientItems("failed");
479
485
  this.emit({
@@ -859,9 +865,17 @@ class AcpRuntime {
859
865
  this.emit({
860
866
  type: "timeline.item",
861
867
  sessionId: this.options.boundarySessionId,
862
- item: toolTimelineItem(completed),
868
+ item: terminalToolItem(toolTimelineItem(snapshot), state),
869
+ });
870
+ }
871
+ for (const item of this.vendorToolCalls.values()) {
872
+ this.emit({
873
+ type: "timeline.item",
874
+ sessionId: this.options.boundarySessionId,
875
+ item: terminalToolItem(item, state),
863
876
  });
864
877
  }
878
+ this.vendorToolCalls.clear();
865
879
  for (const id of this.pendingCompactions) {
866
880
  this.emit({
867
881
  type: "timeline.item",
@@ -911,6 +925,12 @@ class AcpRuntime {
911
925
  this.emitConfigSnapshot(update.config);
912
926
  }
913
927
  else if (update.type === "timeline") {
928
+ if (update.item.type === "tool_call") {
929
+ if (update.item.status === "running")
930
+ this.vendorToolCalls.set(update.item.id, update.item);
931
+ else
932
+ this.vendorToolCalls.delete(update.item.id);
933
+ }
914
934
  this.emit({
915
935
  type: "timeline.item",
916
936
  sessionId: this.options.boundarySessionId,
@@ -1195,6 +1215,14 @@ function toolTimelineItem(snapshot) {
1195
1215
  return { ...base, status, error: snapshot.output };
1196
1216
  return { ...base, status, error: null };
1197
1217
  }
1218
+ // A row the turn left open ends with the turn. The wire contract requires a non-null error on a
1219
+ // failed tool call, so a canceled turn cancels its rows instead of failing them.
1220
+ function terminalToolItem(item, state) {
1221
+ if (state === "failed") {
1222
+ return { ...item, status: "failed", error: item.error ?? { message: "Turn failed" } };
1223
+ }
1224
+ return { ...item, status: state, error: null };
1225
+ }
1198
1226
  function jsonValue(value) {
1199
1227
  return z.json().parse(value);
1200
1228
  }
@@ -4,6 +4,8 @@ export declare const PROVIDER_PROTOCOL_VERSION: 1;
4
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"];
5
5
  export type ProviderCapability = (typeof PROVIDER_CAPABILITIES)[number];
6
6
  export interface ProviderRegistration {
7
+ /** Activate only while agents.providers contains this provider ID, independently of enabled. */
8
+ requiresConfiguration?: boolean;
7
9
  /** Equal keys share discovery within this provider. Include effective configuration and execution environment. */
8
10
  getCatalogCacheKey?(options: ProviderCatalogOptions): Promise<string | undefined>;
9
11
  /** Default executable and arguments; the daemon resolves overrides before status/connect. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpaseo/plugin",
3
- "version": "0.11.2",
3
+ "version": "0.11.3",
4
4
  "description": "Paseo plugin SDK package",
5
5
  "files": [
6
6
  "dist",
@@ -70,8 +70,8 @@
70
70
  "use-sync-external-store": "^1.6.0"
71
71
  },
72
72
  "devDependencies": {
73
- "@getpaseo/client": "0.11.2",
74
- "@getpaseo/protocol": "0.11.2",
73
+ "@getpaseo/client": "0.11.3",
74
+ "@getpaseo/protocol": "0.11.3",
75
75
  "@types/node": "^20.9.0",
76
76
  "@types/react": "~19.2.0",
77
77
  "react": "19.1.0",
@@ -81,8 +81,8 @@
81
81
  "zod": "^4.4.3"
82
82
  },
83
83
  "peerDependencies": {
84
- "@getpaseo/client": "0.11.2",
85
- "@getpaseo/protocol": "0.11.2",
84
+ "@getpaseo/client": "0.11.3",
85
+ "@getpaseo/protocol": "0.11.3",
86
86
  "react": "~19.1.0",
87
87
  "react-native": ">=0.81.5",
88
88
  "zod": "^4.4.3"