@wrongstack/acp 0.298.3 → 0.299.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.
package/dist/agent.js CHANGED
@@ -933,10 +933,16 @@ var ACPProtocolHandler = class {
933
933
  }
934
934
  };
935
935
  let result;
936
+ const pendingNotifications = [];
937
+ const emit = (update) => {
938
+ const p2 = this.sendNotification({ sessionId, update });
939
+ pendingNotifications.push(p2.catch(() => {
940
+ }));
941
+ };
936
942
  try {
937
943
  result = await this.runTurn(
938
944
  { sessionId, prompt: p.prompt, signal: turnSignal.signal },
939
- (update) => this.sendNotification({ sessionId, update }),
945
+ emit,
940
946
  api
941
947
  );
942
948
  } catch (err) {
@@ -945,6 +951,7 @@ var ACPProtocolHandler = class {
945
951
  await this.sendError(id, code, message, data);
946
952
  return false;
947
953
  }
954
+ await Promise.all(pendingNotifications);
948
955
  session.abort.signal.removeEventListener("abort", onCancel);
949
956
  session.updatedAt = (/* @__PURE__ */ new Date()).toISOString();
950
957
  await this.persist(session);
package/dist/index.js CHANGED
@@ -652,10 +652,16 @@ var ACPProtocolHandler = class {
652
652
  }
653
653
  };
654
654
  let result;
655
+ const pendingNotifications = [];
656
+ const emit = (update) => {
657
+ const p2 = this.sendNotification({ sessionId, update });
658
+ pendingNotifications.push(p2.catch(() => {
659
+ }));
660
+ };
655
661
  try {
656
662
  result = await this.runTurn(
657
663
  { sessionId, prompt: p.prompt, signal: turnSignal.signal },
658
- (update) => this.sendNotification({ sessionId, update }),
664
+ emit,
659
665
  api
660
666
  );
661
667
  } catch (err) {
@@ -664,6 +670,7 @@ var ACPProtocolHandler = class {
664
670
  await this.sendError(id, code, message, data);
665
671
  return false;
666
672
  }
673
+ await Promise.all(pendingNotifications);
667
674
  session.abort.signal.removeEventListener("abort", onCancel);
668
675
  session.updatedAt = (/* @__PURE__ */ new Date()).toISOString();
669
676
  await this.persist(session);
@@ -653,10 +653,16 @@ var ACPProtocolHandler = class {
653
653
  }
654
654
  };
655
655
  let result;
656
+ const pendingNotifications = [];
657
+ const emit = (update) => {
658
+ const p2 = this.sendNotification({ sessionId, update });
659
+ pendingNotifications.push(p2.catch(() => {
660
+ }));
661
+ };
656
662
  try {
657
663
  result = await this.runTurn(
658
664
  { sessionId, prompt: p.prompt, signal: turnSignal.signal },
659
- (update) => this.sendNotification({ sessionId, update }),
665
+ emit,
660
666
  api
661
667
  );
662
668
  } catch (err) {
@@ -665,6 +671,7 @@ var ACPProtocolHandler = class {
665
671
  await this.sendError(id, code, message, data);
666
672
  return false;
667
673
  }
674
+ await Promise.all(pendingNotifications);
668
675
  session.abort.signal.removeEventListener("abort", onCancel);
669
676
  session.updatedAt = (/* @__PURE__ */ new Date()).toISOString();
670
677
  await this.persist(session);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrongstack/acp",
3
- "version": "0.298.3",
3
+ "version": "0.299.0",
4
4
  "license": "MIT",
5
5
  "description": "ACP (Agent Client Protocol) integration for WrongStack — client + agent support",
6
6
  "keywords": [
@@ -52,7 +52,7 @@
52
52
  ],
53
53
  "dependencies": {
54
54
  "@agentclientprotocol/sdk": "^1.3.0",
55
- "@wrongstack/core": "0.298.3"
55
+ "@wrongstack/core": "0.299.0"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@types/node": "^26.1.2",