@wrongstack/acp 0.286.0 → 0.287.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/sdk.js CHANGED
@@ -880,7 +880,7 @@ var ACPSession = class _ACPSession {
880
880
  fs: { readTextFile: true, writeTextFile: true },
881
881
  terminal: true
882
882
  },
883
- clientInfo: { name: "wrongstack", title: "WrongStack", version: "0.263.0" }
883
+ clientInfo: { name: "wrongstack", title: "WrongStack", version: "0.287.0" }
884
884
  });
885
885
  if (isJsonRpcError(result)) {
886
886
  throw new ACPSessionError("init_failed", `initialize failed: ${result.message}`, result);
@@ -1578,12 +1578,17 @@ var ACPSession = class _ACPSession {
1578
1578
  return;
1579
1579
  }
1580
1580
  const policyAbort = new AbortController();
1581
- const outcome = await this.permissionPolicy({
1582
- toolCall,
1583
- options,
1584
- signal: policyAbort.signal
1585
- });
1586
- await this.sendResult(id, { outcome });
1581
+ try {
1582
+ const outcome = await this.permissionPolicy({
1583
+ toolCall,
1584
+ options,
1585
+ signal: policyAbort.signal
1586
+ });
1587
+ await this.sendResult(id, { outcome });
1588
+ } catch (err) {
1589
+ const message = err instanceof Error ? err.message : String(err);
1590
+ await this.sendErrorResponse(id, -32603, `permission policy failed: ${message}`);
1591
+ }
1587
1592
  }
1588
1593
  async handleFsRequest(msg) {
1589
1594
  const id = msg.id;