octwin-cli 0.8.10 → 0.8.11
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 +16 -0
- package/dist/index.js +9 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,22 @@ Format: [Keep a Changelog](https://keepachangelog.com/) — newest first, bucket
|
|
|
5
5
|
**Added · Changed · Deprecated · Removed · Fixed · Security**. The platform-wide view lives in the
|
|
6
6
|
repo root [`CHANGELOG.md`](../../CHANGELOG.md); this file is the CLI-only cut that ships with the package.
|
|
7
7
|
|
|
8
|
+
## [0.8.11] - 2026-09-07
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **`octwin login` erased your own tooling report — the CLI was blanking what it had just
|
|
12
|
+
told the platform.** Two calls built their `authorization` header by hand instead of going
|
|
13
|
+
through `authHeaders`: `login`'s post-save "here's what your token reaches" echo, and
|
|
14
|
+
`chat`'s tenant/project derivation. Both authenticate, so both stamp the token's client
|
|
15
|
+
report (added in 0.8.9) — and a hand-built header stamps **NULL**, wiping the CLI version
|
|
16
|
+
and reference hash the platform had recorded.
|
|
17
|
+
|
|
18
|
+
Caught within an hour of 0.8.9 reaching staging: a workspace reported `0.8.9 · reference
|
|
19
|
+
current` at 12:16 and read `not reported` at 12:34. That looked exactly like the documented
|
|
20
|
+
"the column holds what ran LAST" behaviour and was really the CLI erasing its own row.
|
|
21
|
+
`cli-routes.test.ts` now fails on any hand-built bearer header, with a non-vacuity floor —
|
|
22
|
+
this package sits outside the repo's eslint scope, so a text guard is the only rung available.
|
|
23
|
+
|
|
8
24
|
## [0.8.10] - 2026-09-07
|
|
9
25
|
|
|
10
26
|
### Fixed
|
package/dist/index.js
CHANGED
|
@@ -1297,7 +1297,11 @@ async function saveLogin(url, token) {
|
|
|
1297
1297
|
// so a fresh token self-identifies without a second `octwin whoami`. A network
|
|
1298
1298
|
// failure never fails the save — the token is stored regardless.
|
|
1299
1299
|
try {
|
|
1300
|
-
|
|
1300
|
+
// `authHeaders`, not a hand-built `authorization` — this call authenticates, so it
|
|
1301
|
+
// STAMPS the token's client report (migration 055), and a hand-built header stamps
|
|
1302
|
+
// NULL. Measured 2026-09-07: that blanked a caller who was on a reporting CLI, so
|
|
1303
|
+
// `octwin login` erased the author's own tooling row. Guarded in `cli-routes.test.ts`.
|
|
1304
|
+
const res = await fetch(`${url}/api/self/t/whoami`, { headers: authHeaders({ url, token }) });
|
|
1301
1305
|
if (res.ok) {
|
|
1302
1306
|
const j = await res.json();
|
|
1303
1307
|
const scopes = Array.isArray(j.scopes) && j.scopes.length ? ` · scopes: ${j.scopes.join(', ')}` : '';
|
|
@@ -3053,8 +3057,11 @@ async function cmdChat(flags) {
|
|
|
3053
3057
|
const token = raw.token;
|
|
3054
3058
|
if (token) {
|
|
3055
3059
|
try {
|
|
3060
|
+
// `authHeaders` carries the tenant override itself, and — the reason this is not
|
|
3061
|
+
// hand-built — it carries the client report. An authenticating call that skips it
|
|
3062
|
+
// stamps NULL over the token's reported CLI + reference. See `cli-routes.test.ts`.
|
|
3056
3063
|
const who = await fetch(`${url}/api/self/t/whoami`, {
|
|
3057
|
-
headers: {
|
|
3064
|
+
headers: authHeaders({ url, token, ...(tenant ? { tenant } : {}) }),
|
|
3058
3065
|
});
|
|
3059
3066
|
if (who.ok) {
|
|
3060
3067
|
const j = await who.json();
|
package/package.json
CHANGED