squad-kit 0.12.0 → 0.12.1
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/CHANGELOG.md +24 -0
- package/dist/cli.js +32 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.12.1] — 2026-08-24
|
|
11
|
+
|
|
12
|
+
### Bug fixes
|
|
13
|
+
|
|
14
|
+
- `squad auth login` ended a **successful** browser login with
|
|
15
|
+
`could not verify the login (unknown)` and a warning that the credential "may
|
|
16
|
+
be invalid or expired". The token was fine. `accountInfo()` resolves from the
|
|
17
|
+
Agent SDK's `initialize` response, and for `CLAUDE_CODE_OAUTH_TOKEN` auth that
|
|
18
|
+
response carries `{tokenSource, apiProvider}` and **never** an account — for a
|
|
19
|
+
valid token exactly as much as for a bogus one. 0.12.0 treated a missing
|
|
20
|
+
account as a failed credential, which flagged every healthy login through the
|
|
21
|
+
primary documented flow.
|
|
22
|
+
|
|
23
|
+
The probe now separates three outcomes instead of two: an account came back
|
|
24
|
+
(verified, shown); a credential *source* came back without an account
|
|
25
|
+
(reported as resolved, with the honest caveat that token validity can only be
|
|
26
|
+
confirmed by an actual planning run); or nothing came back at all (still
|
|
27
|
+
treated as unverified). `squad auth login`'s summary and `squad doctor`'s
|
|
28
|
+
planner credential row both reflect which applies, and neither claims a
|
|
29
|
+
verification the SDK cannot perform.
|
|
30
|
+
|
|
31
|
+
Workspaces that authenticate through the OS credential store are unaffected —
|
|
32
|
+
those do report an account and are still verified as before.
|
|
33
|
+
|
|
10
34
|
## [0.12.0] — 2026-08-24
|
|
11
35
|
|
|
12
36
|
### What's new
|
package/dist/cli.js
CHANGED
|
@@ -1456,9 +1456,13 @@ function readAccount(raw) {
|
|
|
1456
1456
|
if (typeof o.organization === "string") account.organization = o.organization;
|
|
1457
1457
|
if (typeof o.subscriptionType === "string") account.subscriptionType = o.subscriptionType;
|
|
1458
1458
|
const apiKeySource = typeof o.apiKeySource === "string" ? o.apiKeySource : void 0;
|
|
1459
|
+
const tokenSource = typeof o.tokenSource === "string" ? o.tokenSource : void 0;
|
|
1460
|
+
const apiProvider = typeof o.apiProvider === "string" ? o.apiProvider : void 0;
|
|
1459
1461
|
return {
|
|
1460
1462
|
account: Object.keys(account).length > 0 ? account : void 0,
|
|
1461
|
-
apiKeySource
|
|
1463
|
+
apiKeySource,
|
|
1464
|
+
tokenSource,
|
|
1465
|
+
apiProvider
|
|
1462
1466
|
};
|
|
1463
1467
|
}
|
|
1464
1468
|
var EXPIRED_HINT = /expire|refresh|revoked|no longer valid/i;
|
|
@@ -1535,15 +1539,23 @@ async function probeClaudeAuth(auth2, opts = {}) {
|
|
|
1535
1539
|
detail: `The Claude auth check did not answer within ${timeoutMs}ms.`
|
|
1536
1540
|
};
|
|
1537
1541
|
}
|
|
1538
|
-
const { account, apiKeySource } = readAccount(info2);
|
|
1539
|
-
|
|
1542
|
+
const { account, apiKeySource, tokenSource, apiProvider } = readAccount(info2);
|
|
1543
|
+
const base = { ...apiKeySource ? { apiKeySource } : {}, ...account ? { account } : {} };
|
|
1544
|
+
if (auth2.mode !== "subscription") return { ok: true, ...base };
|
|
1545
|
+
if (account) return { ok: true, ...base };
|
|
1546
|
+
if (tokenSource || apiProvider) {
|
|
1540
1547
|
return {
|
|
1541
|
-
ok:
|
|
1542
|
-
|
|
1543
|
-
|
|
1548
|
+
ok: true,
|
|
1549
|
+
...base,
|
|
1550
|
+
...tokenSource ? { credentialSource: tokenSource } : {},
|
|
1551
|
+
unverifiable: `The Agent SDK resolved ${tokenSource ?? "a credential"}, but token auth reports no account, so its validity can only be confirmed by an actual planning run.`
|
|
1544
1552
|
};
|
|
1545
1553
|
}
|
|
1546
|
-
return {
|
|
1554
|
+
return {
|
|
1555
|
+
ok: false,
|
|
1556
|
+
kind: "unknown",
|
|
1557
|
+
detail: "The Claude login reported neither an account nor a credential source, so it could not be verified. Run `squad auth login` to sign in again."
|
|
1558
|
+
};
|
|
1547
1559
|
} catch (err2) {
|
|
1548
1560
|
return mapProbeFailure(err2, auth2);
|
|
1549
1561
|
} finally {
|
|
@@ -1894,6 +1906,12 @@ async function verifyAndSummarise(planner) {
|
|
|
1894
1906
|
warning(probe.detail);
|
|
1895
1907
|
return;
|
|
1896
1908
|
}
|
|
1909
|
+
if (probe.unverifiable) {
|
|
1910
|
+
spin.succeed("login stored");
|
|
1911
|
+
if (probe.credentialSource) kv("credential", probe.credentialSource, 15);
|
|
1912
|
+
info(probe.unverifiable);
|
|
1913
|
+
return;
|
|
1914
|
+
}
|
|
1897
1915
|
spin.succeed("login verified");
|
|
1898
1916
|
const account = [probe.account?.email, probe.account?.organization, probe.account?.subscriptionType].filter(Boolean).join(" \xB7 ");
|
|
1899
1917
|
if (account) kv("account", account, 15);
|
|
@@ -9064,7 +9082,13 @@ function describeProbeAccount(probe) {
|
|
|
9064
9082
|
const bits = [];
|
|
9065
9083
|
const email = probe.account?.email;
|
|
9066
9084
|
const plan = probe.account?.subscriptionType;
|
|
9067
|
-
|
|
9085
|
+
if (email) {
|
|
9086
|
+
bits.push(`signed in as ${email}${plan ? ` (${plan})` : ""}`);
|
|
9087
|
+
} else if (probe.unverifiable) {
|
|
9088
|
+
bits.push(`credential resolved (${probe.credentialSource ?? "token auth"}) \xB7 not verifiable without a run`);
|
|
9089
|
+
} else {
|
|
9090
|
+
bits.push("Claude login verified");
|
|
9091
|
+
}
|
|
9068
9092
|
if (probe.account?.organization) bits.push(probe.account.organization);
|
|
9069
9093
|
if (probe.apiKeySource) bits.push(`apiKeySource=${probe.apiKeySource}`);
|
|
9070
9094
|
return bits.join(" \xB7 ");
|
package/package.json
CHANGED