@great-arrow/cli 0.1.51 → 0.1.52
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 +17 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9327,6 +9327,7 @@ function mapErrorToExitCode(error) {
|
|
|
9327
9327
|
return 2 /* NETWORK_ERROR */;
|
|
9328
9328
|
}
|
|
9329
9329
|
var FAILURE_HINTS = {
|
|
9330
|
+
permission: "Review this connection's scopes and workspace permissions at /account/connections.",
|
|
9330
9331
|
auth: "Run `gad login`, then reconnect the client: /mcp \u2192 great-arrow \u2192 reconnect.",
|
|
9331
9332
|
network: "Check this machine's connectivity (VPN, proxy, DNS), then try again.",
|
|
9332
9333
|
timeout: "The request timed out. Check connectivity and retry; if it persists, see https://www.greatarrow.ai/status.",
|
|
@@ -9337,9 +9338,11 @@ var FAILURE_HINTS = {
|
|
|
9337
9338
|
function classifyRequestFailure(error) {
|
|
9338
9339
|
const message = error instanceof Error ? error.message : String(error ?? "unknown error");
|
|
9339
9340
|
let kind = "unknown";
|
|
9340
|
-
if (
|
|
9341
|
+
if (/\b403\b/.test(message)) {
|
|
9342
|
+
kind = "permission";
|
|
9343
|
+
} else if (error instanceof CliError && error.code === 1 /* AUTH_ERROR */) {
|
|
9341
9344
|
kind = "auth";
|
|
9342
|
-
} else if (/\
|
|
9345
|
+
} else if (/\b401\b/.test(message)) {
|
|
9343
9346
|
kind = "auth";
|
|
9344
9347
|
} else if (/HTTP 5\d\d|Server error/i.test(message)) {
|
|
9345
9348
|
kind = "server";
|
|
@@ -9399,7 +9402,7 @@ function isNodeError(value) {
|
|
|
9399
9402
|
|
|
9400
9403
|
// src/lib/version.ts
|
|
9401
9404
|
var CLI_PACKAGE_NAME = "@great-arrow/cli";
|
|
9402
|
-
var CLI_VERSION = "0.1.
|
|
9405
|
+
var CLI_VERSION = "0.1.52";
|
|
9403
9406
|
var GAD_INSTALL_VERSION = "2026.08.08";
|
|
9404
9407
|
var GAD_INSTALL_MIN_VERSION = "2026.06.22";
|
|
9405
9408
|
var GAD_INSTALL_HEADER = "X-GAD-Install-Version";
|
|
@@ -10921,7 +10924,14 @@ var GadClient = class {
|
|
|
10921
10924
|
}
|
|
10922
10925
|
const status = response.status;
|
|
10923
10926
|
const body = await response.text().catch(() => "");
|
|
10924
|
-
if (status ===
|
|
10927
|
+
if (status === 403) {
|
|
10928
|
+
throw new CliError(
|
|
10929
|
+
"Permission denied (HTTP 403).",
|
|
10930
|
+
1 /* AUTH_ERROR */,
|
|
10931
|
+
"Check this connection's scopes and workspace permissions at /account/connections."
|
|
10932
|
+
);
|
|
10933
|
+
}
|
|
10934
|
+
if (status === 401) {
|
|
10925
10935
|
throw authError(
|
|
10926
10936
|
`Authentication failed (HTTP ${status}).`,
|
|
10927
10937
|
"Run 'gad login' to re-authenticate, or check your GAD_TOKEN."
|
|
@@ -14210,7 +14220,8 @@ function codexTransportFields(body) {
|
|
|
14210
14220
|
|
|
14211
14221
|
// src/lib/mcp-doctor.ts
|
|
14212
14222
|
var MCP_FAILURE_MESSAGE = {
|
|
14213
|
-
auth: "MCP rejected this machine's credential (401
|
|
14223
|
+
auth: "MCP rejected this machine's credential (401)",
|
|
14224
|
+
permission: "MCP denied this connection's scopes or workspace access (403)",
|
|
14214
14225
|
network: "Could not reach the MCP endpoint",
|
|
14215
14226
|
timeout: "The MCP endpoint did not answer in time",
|
|
14216
14227
|
server: "The MCP endpoint returned a server error",
|
|
@@ -14219,6 +14230,7 @@ var MCP_FAILURE_MESSAGE = {
|
|
|
14219
14230
|
};
|
|
14220
14231
|
var MCP_STATUS_WORD = {
|
|
14221
14232
|
auth: "unauthenticated",
|
|
14233
|
+
permission: "forbidden",
|
|
14222
14234
|
network: "unreachable",
|
|
14223
14235
|
timeout: "timeout",
|
|
14224
14236
|
server: "server error",
|