@wrongstack/acp 0.285.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/index.js CHANGED
@@ -1862,7 +1862,7 @@ var ACPSession = class _ACPSession {
1862
1862
  fs: { readTextFile: true, writeTextFile: true },
1863
1863
  terminal: true
1864
1864
  },
1865
- clientInfo: { name: "wrongstack", title: "WrongStack", version: "0.263.0" }
1865
+ clientInfo: { name: "wrongstack", title: "WrongStack", version: "0.287.0" }
1866
1866
  });
1867
1867
  if (isJsonRpcError(result)) {
1868
1868
  throw new ACPSessionError("init_failed", `initialize failed: ${result.message}`, result);
@@ -2560,12 +2560,17 @@ var ACPSession = class _ACPSession {
2560
2560
  return;
2561
2561
  }
2562
2562
  const policyAbort = new AbortController();
2563
- const outcome = await this.permissionPolicy({
2564
- toolCall,
2565
- options,
2566
- signal: policyAbort.signal
2567
- });
2568
- await this.sendResult(id, { outcome });
2563
+ try {
2564
+ const outcome = await this.permissionPolicy({
2565
+ toolCall,
2566
+ options,
2567
+ signal: policyAbort.signal
2568
+ });
2569
+ await this.sendResult(id, { outcome });
2570
+ } catch (err) {
2571
+ const message = err instanceof Error ? err.message : String(err);
2572
+ await this.sendErrorResponse(id, -32603, `permission policy failed: ${message}`);
2573
+ }
2569
2574
  }
2570
2575
  async handleFsRequest(msg) {
2571
2576
  const id = msg.id;