@botbuddy/cli 1.64.3 → 1.64.6
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/daemon/bin/darwin-arm64/botbuddy-daemon +0 -0
- package/daemon/bin/linux-x64/botbuddy-daemon +0 -0
- package/daemon-release/darwin-arm64.json +4 -4
- package/daemon-release/linux-x64.json +4 -4
- package/daemon-release/manifest.json +5 -5
- package/package.json +1 -1
- package/src/staging-pool/errors.mjs +6 -2
- package/src/staging-pool/signin-gotrue-totp.mjs +10 -2
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"release_version": "1.64.
|
|
3
|
-
"source_commit": "
|
|
4
|
-
"source_sha256": "
|
|
2
|
+
"release_version": "1.64.6",
|
|
3
|
+
"source_commit": "22c3be9ffc20b3c25bcd76247bee9d12ed8a8aeb",
|
|
4
|
+
"source_sha256": "4f95dec7b3bda9bf9675eeec92008d8bdb1b7e1df792b6dbe90a645890a53a3e",
|
|
5
5
|
"target": "darwin-arm64",
|
|
6
|
-
"sha256": "
|
|
6
|
+
"sha256": "80a7d10d04aa260664b35db1774c33a7a5263e039a5c40c1b434db9cf24f419e"
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"release_version": "1.64.
|
|
3
|
-
"source_commit": "
|
|
4
|
-
"source_sha256": "
|
|
2
|
+
"release_version": "1.64.6",
|
|
3
|
+
"source_commit": "22c3be9ffc20b3c25bcd76247bee9d12ed8a8aeb",
|
|
4
|
+
"source_sha256": "4f95dec7b3bda9bf9675eeec92008d8bdb1b7e1df792b6dbe90a645890a53a3e",
|
|
5
5
|
"target": "linux-x64",
|
|
6
|
-
"sha256": "
|
|
6
|
+
"sha256": "cfbd912f8d720cae1061e2fd69933e00f714713def6065cf7e3de84c8c649286"
|
|
7
7
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": 1,
|
|
3
|
-
"release_version": "1.64.
|
|
4
|
-
"source_commit": "
|
|
5
|
-
"source_sha256": "
|
|
3
|
+
"release_version": "1.64.6",
|
|
4
|
+
"source_commit": "22c3be9ffc20b3c25bcd76247bee9d12ed8a8aeb",
|
|
5
|
+
"source_sha256": "4f95dec7b3bda9bf9675eeec92008d8bdb1b7e1df792b6dbe90a645890a53a3e",
|
|
6
6
|
"targets": {
|
|
7
7
|
"darwin-arm64": {
|
|
8
8
|
"goos": "darwin",
|
|
9
9
|
"goarch": "arm64",
|
|
10
10
|
"binary": "daemon/bin/darwin-arm64/botbuddy-daemon",
|
|
11
|
-
"sha256": "
|
|
11
|
+
"sha256": "80a7d10d04aa260664b35db1774c33a7a5263e039a5c40c1b434db9cf24f419e",
|
|
12
12
|
"mode": "0755"
|
|
13
13
|
},
|
|
14
14
|
"linux-x64": {
|
|
15
15
|
"goos": "linux",
|
|
16
16
|
"goarch": "amd64",
|
|
17
17
|
"binary": "daemon/bin/linux-x64/botbuddy-daemon",
|
|
18
|
-
"sha256": "
|
|
18
|
+
"sha256": "cfbd912f8d720cae1061e2fd69933e00f714713def6065cf7e3de84c8c649286",
|
|
19
19
|
"mode": "0755"
|
|
20
20
|
}
|
|
21
21
|
}
|
package/package.json
CHANGED
|
@@ -155,7 +155,7 @@ export const ERROR_CODES = Object.freeze({
|
|
|
155
155
|
"launchctl kickstart -k gui/$(id -u)/{label}"),
|
|
156
156
|
mint_backing_off: entry("human", "repair",
|
|
157
157
|
"Staging sign-in for {persona} keeps failing, so the job is backing off.",
|
|
158
|
-
"The last mint_failed line in {log} names it: password_rejected or no_verified_totp_factor = seed drift; password_source_* = the password env file; totp_source_failed = the botbuddy CLI login.",
|
|
158
|
+
"The last mint_failed line in {log} names it: password_rejected or no_verified_totp_factor = seed drift; mint_retries_exhausted = a staging Auth outage, so wait for the next attempt; password_source_* = the password env file; totp_source_failed = the botbuddy CLI login.",
|
|
159
159
|
"grep mint_failed {log} | tail -1 # then run bb help symptom with the code that line names"),
|
|
160
160
|
last_tick_failed: entry("human", "repair",
|
|
161
161
|
"The pool job's last tick had sign-in (mint) failures.",
|
|
@@ -285,6 +285,10 @@ export const ERROR_CODES = Object.freeze({
|
|
|
285
285
|
"Staging Auth rejected the persona password.",
|
|
286
286
|
"Seed drift: the staging persona was re-seeded with another password, or the env file is stale.",
|
|
287
287
|
"bb staging-pool mint-one --persona {persona} # after re-running the staging persona seed or updating the env file"),
|
|
288
|
+
password_grant_failed: entry("human", "repair",
|
|
289
|
+
"Staging Auth answered the first sign-in step with an unexpected status, which is not a credential refusal.",
|
|
290
|
+
"A blocked request, a banned or unconfirmed user, or a GoTrue change; {log} has the status and error code.",
|
|
291
|
+
"grep mint_failed {log} | tail -1 # then: bb staging-pool mint-one --persona {persona}"),
|
|
288
292
|
no_verified_totp_factor: entry("human", "repair",
|
|
289
293
|
"The persona has no verified TOTP factor on staging.",
|
|
290
294
|
"Seed drift: the staging seed job has not enrolled the factor.",
|
|
@@ -303,7 +307,7 @@ export const ERROR_CODES = Object.freeze({
|
|
|
303
307
|
"grep mint_failed {log} | tail -1 # report this code"),
|
|
304
308
|
mint_retries_exhausted: entry("human", "repair",
|
|
305
309
|
"The sign-in gave up after its retries.",
|
|
306
|
-
"
|
|
310
|
+
"A staging Auth outage (for example a Cloudflare 52x while staging restarts) or network failures; {log} names the last one.",
|
|
307
311
|
"grep mint_failed {log} | tail -1 # then: bb staging-pool mint-one --persona {persona}"),
|
|
308
312
|
not_aal2: entry("human", "repair",
|
|
309
313
|
"MFA verify returned a session that is not AAL2.",
|
|
@@ -25,7 +25,9 @@ export class SignInError extends Error {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
// 520-524 are Cloudflare's own answers while the origin is down or unreachable (BOT-2947):
|
|
29
|
+
// Auth never saw the request or never answered it, so they say nothing about the credentials.
|
|
30
|
+
const RETRYABLE_STATUSES = new Set([408, 429, 500, 502, 503, 504, 520, 521, 522, 523, 524]);
|
|
29
31
|
const REVOKED_ERROR_CODES = new Set(["session_not_found", "bad_jwt", "refresh_token_not_found"]);
|
|
30
32
|
|
|
31
33
|
function describeFailure(response) {
|
|
@@ -75,6 +77,7 @@ export function createGoTrueTotpSignIn({
|
|
|
75
77
|
const isTransient = (response) => response.status === 0 || RETRYABLE_STATUSES.has(response.status);
|
|
76
78
|
const isRevoked = (response) =>
|
|
77
79
|
(response.status === 401 || response.status === 403) && REVOKED_ERROR_CODES.has(response.body?.error_code);
|
|
80
|
+
const isCredentialRefusal = (response) => response.status === 400 && response.body?.error_code === "invalid_credentials";
|
|
78
81
|
|
|
79
82
|
function assertAal2ForPersona(storedSession, persona) {
|
|
80
83
|
const claims = decodeJwtClaims(storedSession.access_token);
|
|
@@ -108,7 +111,12 @@ export function createGoTrueTotpSignIn({
|
|
|
108
111
|
await retry(`password grant ${describeFailure(password)}`);
|
|
109
112
|
continue;
|
|
110
113
|
}
|
|
111
|
-
|
|
114
|
+
if (isCredentialRefusal(password)) {
|
|
115
|
+
throw new SignInError("password_rejected", `Password grant refused: ${describeFailure(password)}.`, {
|
|
116
|
+
status: password.status,
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
throw new SignInError("password_grant_failed", `Password grant failed: ${describeFailure(password)}.`, {
|
|
112
120
|
status: password.status,
|
|
113
121
|
});
|
|
114
122
|
}
|