Skip to content

Commit 22e7823

Browse files
authored
chore(release): 6.2.0 (#162)
Bump to 6.2.0 (TUI email masking #160, workspace-aware usage dedupe + test isolation #161) with review polish and manifest sync.
1 parent 15988d2 commit 22e7823

7 files changed

Lines changed: 35 additions & 16 deletions

File tree

.codex-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "oc-codex-multi-auth",
3-
"version": "6.1.10",
3+
"version": "6.2.0",
44
"description": "Install and operate oc-codex-multi-auth for OpenCode with ChatGPT Plus/Pro OAuth, Codex/GPT-5 routing, multi-account rotation, account switching, health checks, diagnostics, quota status, and recovery tools.",
55
"skills": "./skills/",
66
"interface": {

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "6.0.0"
2+
".": "6.2.0"
33
}

lib/tools/codex-limits.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,12 @@ export function createCodexLimitsTool(ctx: ToolContext): ToolDefinition {
119119
const activeUsageKey = activeAccount
120120
? getUsageAccountDedupeKey(activeAccount)
121121
: undefined;
122-
// If the active account was deduplicated out of uniqueIndices (e.g. it
123-
// is a later occurrence of a workspace whose first occurrence carries a
124-
// re-issued refresh token), warn so the missing `[active]` marker is
125-
// diagnosable. The key-based match below still recovers the marker.
122+
// If the active account index isn't in uniqueIndices, the active
123+
// account was dropped from the usage list — e.g. it is an earlier
124+
// occurrence of a workspace whose freshest (last) occurrence was kept,
125+
// or it is disabled. Warn so the missing `[active]` marker is
126+
// diagnosable. The key-based match below recovers the marker onto the
127+
// surviving workspace entry.
126128
if (
127129
typeof activeIndex === "number" &&
128130
activeIndex >= 0 &&

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "oc-codex-multi-auth",
3-
"version": "6.1.10",
3+
"version": "6.2.0",
44
"description": "OpenCode plugin for ChatGPT Plus/Pro OAuth with Codex/GPT-5 routing, multi-account rotation, account switching, health checks, diagnostics, and recovery tools",
55
"main": "./dist/index.js",
66
"types": "./dist/index.d.ts",

test/index.test.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,10 +1156,11 @@ describe("OpenAIOAuthPlugin", () => {
11561156
});
11571157

11581158
it("keeps the active marker when the active account was deduped out by a re-issued token", async () => {
1159-
// Two entries for the same workspace (acc-1/org-1). The active entry is
1160-
// the later duplicate carrying a re-issued refresh token, so dedupe keeps
1161-
// the first occurrence (older token). The active marker must still attach
1162-
// to that surviving entry via workspace-identity match, not token match.
1159+
// Two entries for the same workspace (acc-1/org-1). Dedupe keeps the
1160+
// freshest (last) occurrence — index 1, carrying the re-issued token.
1161+
// The active index points at the earlier occurrence (index 0), which is
1162+
// deduped out, so the [active] marker must be recovered onto the
1163+
// surviving entry via workspace-identity match, not refresh-token match.
11631164
mockStorage.accounts = [
11641165
{
11651166
refreshToken: "rt_old",
@@ -1178,8 +1179,8 @@ describe("OpenAIOAuthPlugin", () => {
11781179
expiresAt: Date.now() + 3600_000,
11791180
},
11801181
];
1181-
mockStorage.activeIndex = 1;
1182-
mockStorage.activeIndexByFamily = { codex: 1 };
1182+
mockStorage.activeIndex = 0;
1183+
mockStorage.activeIndexByFamily = { codex: 0 };
11831184
globalThis.fetch = vi.fn().mockImplementation(async () =>
11841185
new Response(
11851186
JSON.stringify({
@@ -1194,7 +1195,8 @@ describe("OpenAIOAuthPlugin", () => {
11941195

11951196
const result = await plugin.tool["codex-limits"].execute();
11961197

1197-
// Only the first occurrence survives dedupe, and it still shows [active].
1198+
// The active occurrence (index 0) was deduped out, but the surviving
1199+
// freshest workspace entry still shows [active] via identity match.
11981200
expect(result).toContain("1 account");
11991201
expect(result).toContain("[active]");
12001202
});

test/tui-status.test.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,21 @@ describe("TUI prompt status helpers", () => {
133133
).toBe(`[*****]${sep}5h 88%${sep}7d 83%`);
134134
});
135135

136+
it("preserves account email in prompt status when masking is disabled", () => {
137+
expect(
138+
formatPromptStatusText({
139+
quota: {
140+
...quota,
141+
accountIndex: 2,
142+
accountCount: 3,
143+
accountEmail: "user2@example.com",
144+
},
145+
width: 120,
146+
maskEmail: false,
147+
}),
148+
).toBe(`[user2@example.com]${sep}5h 88%${sep}7d 83%`);
149+
});
150+
136151
it("prefers quota over variant when status space is tight", () => {
137152
expect(
138153
formatPromptStatusText({

0 commit comments

Comments
 (0)