approval-box 0.1.7 → 0.1.8

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.
Files changed (2) hide show
  1. package/dist/cli.mjs +10 -2
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -11795,7 +11795,15 @@ var Api = class {
11795
11795
  throw new ServerError(0, "network", `Approval Box\u30B5\u30FC\u30D0\u30FC\uFF08${this.server}\uFF09\u306B\u3064\u306A\u304C\u308A\u307E\u305B\u3093: ${error.message}`, {});
11796
11796
  }
11797
11797
  const text2 = await response.text();
11798
- const json = text2 ? JSON.parse(text2) : {};
11798
+ let json;
11799
+ try {
11800
+ json = text2 ? JSON.parse(text2) : {};
11801
+ } catch {
11802
+ const contentType = response.headers.get("content-type") ?? "";
11803
+ const head = `Approval Box\u30B5\u30FC\u30D0\u30FC\u304B\u3089\u3001JSON\u3067\u306A\u3044\u5FDC\u7B54\u304C\u8FD4\u308A\u307E\u3057\u305F\uFF08HTTP ${response.status}\u3001Content-Type: ${contentType || "\u306A\u3057"}\uFF09\u3002\u524D\u6BB5\uFF08Cloudflare\u306A\u3069\uFF09\u306E\u30A8\u30E9\u30FC\u30DA\u30FC\u30B8\u3067\u3001\u30B5\u30FC\u30D0\u30FC\u304C\u4E00\u6642\u7684\u306B\u6B62\u307E\u3063\u3066\u3044\u305F\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002`;
11804
+ const tail = method === "GET" ? "\u5C11\u3057\u5F85\u3063\u3066\u304B\u3089\u3001\u540C\u3058\u64CD\u4F5C\u3092\u3084\u308A\u76F4\u3057\u3066\u304F\u3060\u3055\u3044\u3002" : "\u3053\u306E\u64CD\u4F5C\u304C\u30B5\u30FC\u30D0\u30FC\u3067\u884C\u308F\u308C\u305F\u304B\u306F\u5206\u304B\u308A\u307E\u305B\u3093\u3002\u3084\u308A\u76F4\u3059\u524D\u306B list_my_decisions \u3067\u78BA\u304B\u3081\u3066\u304F\u3060\u3055\u3044\u3002\u7533\u8ACB\u306A\u3089\u3001\u4E00\u89A7\u306B\u7121\u3051\u308C\u3070\u51FA\u3057\u76F4\u3057\u3001\u3042\u308C\u3070\u305D\u308C\u3092\u4F7F\u3063\u3066\u304F\u3060\u3055\u3044\u3002";
11805
+ throw new ServerError(response.status, "non_json_response", `${head}${tail}`, { http_status: response.status, content_type: contentType, outcome: method === "GET" ? "not_applied" : "unknown" });
11806
+ }
11799
11807
  if (!response.ok) {
11800
11808
  const error = json.error ?? {};
11801
11809
  throw new ServerError(response.status, error.code ?? "internal", error.message ?? `HTTP ${response.status}`, error);
@@ -15641,7 +15649,7 @@ import { existsSync as existsSync5, readFileSync as readFileSync5 } from "node:f
15641
15649
  import { basename as basename2, join as join5 } from "node:path";
15642
15650
 
15643
15651
  // src/version.ts
15644
- var VERSION = true ? "0.1.7" : "0.0.0-dev";
15652
+ var VERSION = true ? "0.1.8" : "0.0.0-dev";
15645
15653
  function osName() {
15646
15654
  return process.platform === "darwin" ? "macos" : process.platform === "win32" ? "windows" : process.platform;
15647
15655
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "approval-box",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Approval Box connector: lets Claude Code, Codex, Cursor and Grok ask you for a decision, and steers your answer back into the same session.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://approval-box.kitepon.dev",