@rynfar/meridian 1.57.1 → 1.58.0
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/README.md +2 -2
- package/dist/{cli-wszp24mg.js → cli-5rkcyzzm.js} +12 -5
- package/dist/{cli-aq5zz92m.js → cli-khhjyk04.js} +62 -3
- package/dist/{cli-kjd4cwcq.js → cli-p3ggjwgn.js} +22 -1
- package/dist/cli.js +5 -5
- package/dist/{profileCli-b1zmg2ad.js → profileCli-c8bejc7w.js} +2 -2
- package/dist/proxy/models.d.ts +2 -0
- package/dist/proxy/models.d.ts.map +1 -1
- package/dist/proxy/server.d.ts.map +1 -1
- package/dist/proxy/session/lineage.d.ts.map +1 -1
- package/dist/proxy/tokenRefresh.d.ts +41 -0
- package/dist/proxy/tokenRefresh.d.ts.map +1 -1
- package/dist/server.js +3 -3
- package/dist/{tokenRefresh-tkeg8wjq.js → tokenRefresh-kzz08kea.js} +10 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -141,9 +141,9 @@ This error class ([#516](https://github.com/rynfar/meridian/issues/516), histori
|
|
|
141
141
|
If you still hit the error on a current release, first check `GET /v1/usage/quota` to rule out genuinely exhausted quota, then try disabling the connecting client's system prompt for the affected adapter while keeping the Claude Code prompt enabled (in the `/settings` UI under **SDK Feature Toggles**, or `PATCH /settings/api/features/<adapter>` with `{"clientSystemPrompt":false,"codeSystemPrompt":true}`) — and please report it on [#516](https://github.com/rynfar/meridian/issues/516) with your plan type, since remaining occurrences are likely account-cohort specific (Team plans are treated differently by the API).
|
|
142
142
|
|
|
143
143
|
**I'm hitting rate limits on 1M context. What do I do?**
|
|
144
|
-
Meridian defaults Sonnet to 200k context because Sonnet 1M is always billed as Extra Usage on Max plans — even when regular usage isn't exhausted. This is [Anthropic's intended billing model](https://code.claude.com/docs/en/model-config#extended-context), not a bug. Set `MERIDIAN_SONNET_MODEL=sonnet[1m]` to opt in if you have Extra Usage enabled and understand the billing implications. Opus defaults to 1M context, which is included with Max/Team/Enterprise subscriptions at no extra cost. Note: there is a [known upstream bug](https://github.com/anthropics/claude-code/issues/39841) where Claude Code incorrectly gates Opus 1M behind Extra Usage on Max — this is Anthropic's to fix.
|
|
144
|
+
Meridian defaults Sonnet to 200k context because Sonnet 1M is always billed as Extra Usage on Max plans — even when regular usage isn't exhausted. This is [Anthropic's intended billing model](https://code.claude.com/docs/en/model-config#extended-context), not a bug. Set `MERIDIAN_SONNET_MODEL=sonnet[1m]` to opt in if you have Extra Usage enabled and understand the billing implications. Opus defaults to 1M context, which is included with Max/Team/Enterprise subscriptions at no extra cost. Fable defaults to 1M too — verified as included on Max and Team accounts at no Extra Usage cost — and Mythos, which rides the Fable tier, inherits the same default. Note: there is a [known upstream bug](https://github.com/anthropics/claude-code/issues/39841) where Claude Code incorrectly gates Opus 1M behind Extra Usage on Max — this is Anthropic's to fix.
|
|
145
145
|
|
|
146
|
-
To turn off 1M context entirely for **every** model (so Meridian never requests the extended window), set `MERIDIAN_1M_CONTEXT_SUPPORT=0`. Meridian also auto-detects the "out of extra usage" error, falls back to the 200k model, and skips 1M for an hour — so it self-heals after the first occurrence even without the env var.
|
|
146
|
+
To turn off 1M context entirely for **every** model (so Meridian never requests the extended window), set `MERIDIAN_1M_CONTEXT_SUPPORT=0`. To back off a single tier instead — without giving up the other tier's included 1M context — set `MERIDIAN_FABLE_MODEL=fable` or `MERIDIAN_OPUS_MODEL=opus` (both also accept the `CLAUDE_PROXY_` prefix). Meridian also auto-detects the "out of extra usage" error, falls back to the 200k model, and skips 1M for an hour — so it self-heals after the first occurrence even without the env var.
|
|
147
147
|
|
|
148
148
|
**Why does the health endpoint show `"plugin": "not-configured"`?**
|
|
149
149
|
You haven't run `meridian setup`. Without the plugin, OpenCode requests won't have session tracking or subagent model selection. Run `meridian setup` and restart OpenCode.
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
resolvePassthrough,
|
|
49
49
|
resolveSdkModelDefaults,
|
|
50
50
|
stripExtendedContext
|
|
51
|
-
} from "./cli-
|
|
51
|
+
} from "./cli-p3ggjwgn.js";
|
|
52
52
|
import {
|
|
53
53
|
getSetting,
|
|
54
54
|
setSetting
|
|
@@ -60,11 +60,13 @@ import {
|
|
|
60
60
|
claudeLog,
|
|
61
61
|
createPlatformCredentialStore,
|
|
62
62
|
ensureFreshToken,
|
|
63
|
+
getAuthRenewalStatus,
|
|
63
64
|
refreshOAuthToken,
|
|
65
|
+
resolveRenewalWarnDays,
|
|
64
66
|
startBackgroundRefresh,
|
|
65
67
|
stopBackgroundRefresh,
|
|
66
68
|
withClaudeLogContext
|
|
67
|
-
} from "./cli-
|
|
69
|
+
} from "./cli-khhjyk04.js";
|
|
68
70
|
import {
|
|
69
71
|
__commonJS,
|
|
70
72
|
__esm,
|
|
@@ -19244,11 +19246,12 @@ function verifyLineage(cached, messages) {
|
|
|
19244
19246
|
const suffixOverlap = measureSuffixOverlap(cached.messageHashes, incomingHashes);
|
|
19245
19247
|
const MIN_STORED_FOR_COMPACTION = 6;
|
|
19246
19248
|
const suffixStartInIncoming = incomingHashes.length - suffixOverlap >= 0 ? findSuffixAnchorStart(cached.messageHashes, incomingHashes, suffixOverlap) : -1;
|
|
19247
|
-
|
|
19249
|
+
const compactionResumeFrom = suffixStartInIncoming + suffixOverlap;
|
|
19250
|
+
if (suffixOverlap >= MIN_SUFFIX_FOR_COMPACTION && cached.messageHashes.length >= MIN_STORED_FOR_COMPACTION && suffixStartInIncoming > 0 && compactionResumeFrom < messages.length) {
|
|
19248
19251
|
return {
|
|
19249
19252
|
type: "compaction",
|
|
19250
19253
|
session: cached,
|
|
19251
|
-
resumeFrom:
|
|
19254
|
+
resumeFrom: compactionResumeFrom,
|
|
19252
19255
|
suffixOverlap
|
|
19253
19256
|
};
|
|
19254
19257
|
}
|
|
@@ -22287,13 +22290,17 @@ data: ${JSON.stringify({
|
|
|
22287
22290
|
}, 503);
|
|
22288
22291
|
}
|
|
22289
22292
|
const claudeExecutableInfo = getResolvedClaudeExecutableInfo();
|
|
22293
|
+
const warnDays = resolveRenewalWarnDays(process.env.MERIDIAN_AUTH_RENEWAL_WARN_DAYS);
|
|
22294
|
+
const renewalConfigDir = profileEnvOverrides?.CLAUDE_CONFIG_DIR;
|
|
22295
|
+
const renewal = await getAuthRenewalStatus(renewalConfigDir ? createPlatformCredentialStore({ claudeConfigDir: renewalConfigDir }) : undefined, warnDays).catch(() => ({ renewalRequiredSoon: false }));
|
|
22290
22296
|
return c.json({
|
|
22291
22297
|
status: "healthy",
|
|
22292
22298
|
version: serverVersion,
|
|
22293
22299
|
auth: {
|
|
22294
22300
|
loggedIn: true,
|
|
22295
22301
|
email: auth.email,
|
|
22296
|
-
subscriptionType: auth.subscriptionType
|
|
22302
|
+
subscriptionType: auth.subscriptionType,
|
|
22303
|
+
...renewal
|
|
22297
22304
|
},
|
|
22298
22305
|
mode: envBool("PASSTHROUGH") ? "passthrough" : "internal",
|
|
22299
22306
|
...claudeExecutableInfo ? { claudeExecutable: claudeExecutableInfo } : {},
|
|
@@ -235,16 +235,19 @@ async function doRefresh(store) {
|
|
|
235
235
|
}
|
|
236
236
|
const now = Date.now();
|
|
237
237
|
const expiresAt = tokenData.expires_at ?? (tokenData.expires_in ? now + tokenData.expires_in * 1000 : now + 8 * 60 * 60 * 1000);
|
|
238
|
+
const refreshTokenExpiresAtRaw = tokenData.refresh_token_expires_at ?? (tokenData.refresh_token_expires_in ? now + tokenData.refresh_token_expires_in * 1000 : undefined);
|
|
239
|
+
const refreshTokenExpiresAt = refreshTokenExpiresAtRaw && refreshTokenExpiresAtRaw > now ? refreshTokenExpiresAtRaw : undefined;
|
|
238
240
|
credentials.claudeAiOauth = {
|
|
239
241
|
...credentials.claudeAiOauth,
|
|
240
242
|
accessToken: tokenData.access_token,
|
|
241
243
|
refreshToken: tokenData.refresh_token ?? refreshToken,
|
|
242
|
-
expiresAt
|
|
244
|
+
expiresAt,
|
|
245
|
+
...refreshTokenExpiresAt ? { refreshTokenExpiresAt } : {}
|
|
243
246
|
};
|
|
244
247
|
const written = await store.write(credentials);
|
|
245
248
|
if (!written)
|
|
246
249
|
return false;
|
|
247
|
-
claudeLog("token_refresh.success", { expiresAt });
|
|
250
|
+
claudeLog("token_refresh.success", { expiresAt, refreshTokenExpiresAt });
|
|
248
251
|
return true;
|
|
249
252
|
}
|
|
250
253
|
async function ensureFreshToken(store, bufferMs = 5 * 60 * 1000) {
|
|
@@ -257,6 +260,62 @@ async function ensureFreshToken(store, bufferMs = 5 * 60 * 1000) {
|
|
|
257
260
|
return true;
|
|
258
261
|
return refreshOAuthToken(s);
|
|
259
262
|
}
|
|
263
|
+
var DEFAULT_RENEWAL_WARN_DAYS = 3;
|
|
264
|
+
function resolveRenewalWarnDays(raw) {
|
|
265
|
+
const parsed = raw ? Number(raw) : NaN;
|
|
266
|
+
return Number.isFinite(parsed) && parsed >= 0 ? parsed : DEFAULT_RENEWAL_WARN_DAYS;
|
|
267
|
+
}
|
|
268
|
+
var RENEWAL_EXPIRY_TTL_MS = 5 * 60000;
|
|
269
|
+
var renewalExpiryCache = new Map;
|
|
270
|
+
var renewalExpiryInflight = new Map;
|
|
271
|
+
function resetAuthRenewalCache() {
|
|
272
|
+
renewalExpiryCache.clear();
|
|
273
|
+
renewalExpiryInflight.clear();
|
|
274
|
+
}
|
|
275
|
+
async function readRefreshTokenExpiry(s) {
|
|
276
|
+
const key = s.refreshKey;
|
|
277
|
+
if (key) {
|
|
278
|
+
const cached = renewalExpiryCache.get(key);
|
|
279
|
+
if (cached && Date.now() - cached.at < RENEWAL_EXPIRY_TTL_MS)
|
|
280
|
+
return cached.value;
|
|
281
|
+
const inflight = renewalExpiryInflight.get(key);
|
|
282
|
+
if (inflight)
|
|
283
|
+
return inflight;
|
|
284
|
+
}
|
|
285
|
+
const read = (async () => {
|
|
286
|
+
let credentials = null;
|
|
287
|
+
try {
|
|
288
|
+
credentials = await s.read();
|
|
289
|
+
} catch {
|
|
290
|
+
return;
|
|
291
|
+
}
|
|
292
|
+
const value = credentials?.claudeAiOauth?.refreshTokenExpiresAt;
|
|
293
|
+
if (key)
|
|
294
|
+
renewalExpiryCache.set(key, { value, at: Date.now() });
|
|
295
|
+
return value;
|
|
296
|
+
})();
|
|
297
|
+
if (!key)
|
|
298
|
+
return read;
|
|
299
|
+
renewalExpiryInflight.set(key, read);
|
|
300
|
+
try {
|
|
301
|
+
return await read;
|
|
302
|
+
} finally {
|
|
303
|
+
renewalExpiryInflight.delete(key);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
async function getAuthRenewalStatus(store, warnDays = DEFAULT_RENEWAL_WARN_DAYS) {
|
|
307
|
+
const s = store ?? createPlatformCredentialStore();
|
|
308
|
+
const refreshTokenExpiresAt = await readRefreshTokenExpiry(s);
|
|
309
|
+
if (!refreshTokenExpiresAt)
|
|
310
|
+
return { renewalRequiredSoon: false };
|
|
311
|
+
const msRemaining = refreshTokenExpiresAt - Date.now();
|
|
312
|
+
const daysUntilRenewal = Math.ceil(msRemaining / 86400000);
|
|
313
|
+
return {
|
|
314
|
+
refreshTokenExpiresAt,
|
|
315
|
+
daysUntilRenewal,
|
|
316
|
+
renewalRequiredSoon: daysUntilRenewal <= warnDays
|
|
317
|
+
};
|
|
318
|
+
}
|
|
260
319
|
var scheduledRefreshTimer = null;
|
|
261
320
|
var scheduledRefreshActive = false;
|
|
262
321
|
var scheduledRefreshGeneration = 0;
|
|
@@ -315,4 +374,4 @@ function resetInflightRefresh() {
|
|
|
315
374
|
inflightRefreshByKey.clear();
|
|
316
375
|
}
|
|
317
376
|
|
|
318
|
-
export { withClaudeLogContext, claudeLog, configDirToKeychainService, configDirToCredentialsFile, serializeCredentials, createPlatformCredentialStore, credentialsFilePathForProfile, refreshOAuthToken, ensureFreshToken, startBackgroundRefresh, stopBackgroundRefresh, isBackgroundRefreshActive, resetInflightRefresh };
|
|
377
|
+
export { withClaudeLogContext, claudeLog, configDirToKeychainService, configDirToCredentialsFile, serializeCredentials, createPlatformCredentialStore, credentialsFilePathForProfile, refreshOAuthToken, ensureFreshToken, DEFAULT_RENEWAL_WARN_DAYS, resolveRenewalWarnDays, resetAuthRenewalCache, getAuthRenewalStatus, startBackgroundRefresh, stopBackgroundRefresh, isBackgroundRefreshActive, resetInflightRefresh };
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./cli-vj9cv18n.js";
|
|
4
4
|
import {
|
|
5
5
|
createPlatformCredentialStore
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-khhjyk04.js";
|
|
7
7
|
import {
|
|
8
8
|
__esm
|
|
9
9
|
} from "./cli-p9swy5t3.js";
|
|
@@ -77,6 +77,13 @@ var lastKnownGoodAuthStatus = null;
|
|
|
77
77
|
var cachedAuthStatusAt = 0;
|
|
78
78
|
var cachedAuthStatusIsFailure = false;
|
|
79
79
|
var cachedAuthStatusPromise = null;
|
|
80
|
+
var warnedTierOverrides = new Set;
|
|
81
|
+
function warnUnrecognizedTierOverride(varName, raw, tierBase) {
|
|
82
|
+
if (warnedTierOverrides.has(varName))
|
|
83
|
+
return;
|
|
84
|
+
warnedTierOverrides.add(varName);
|
|
85
|
+
console.warn(`[PROXY] Unrecognized MERIDIAN_${varName} value "${raw}"; expected "${tierBase}" or "${tierBase}[1m]" — ignoring, ${tierBase}[1m] remains the default`);
|
|
86
|
+
}
|
|
80
87
|
function supports1mContext(model) {
|
|
81
88
|
const override = env("1M_CONTEXT_SUPPORT");
|
|
82
89
|
if (override === "0" || override === "false" || override === "no")
|
|
@@ -91,11 +98,25 @@ function mapModelToClaudeModel(model, subscriptionType, agentMode) {
|
|
|
91
98
|
const use1m = supports1mContext(model);
|
|
92
99
|
const isSubagent = agentMode === "subagent";
|
|
93
100
|
if (model.includes("fable") || model.includes("mythos")) {
|
|
101
|
+
const fableOverrideRaw = env("FABLE_MODEL");
|
|
102
|
+
const fableOverride = fableOverrideRaw?.trim().toLowerCase();
|
|
103
|
+
if (fableOverride === "fable")
|
|
104
|
+
return "fable";
|
|
105
|
+
if (fableOverrideRaw && fableOverride !== "fable[1m]") {
|
|
106
|
+
warnUnrecognizedTierOverride("FABLE_MODEL", fableOverrideRaw, "fable");
|
|
107
|
+
}
|
|
94
108
|
if (use1m && !isSubagent && !isExtendedContextKnownUnavailable())
|
|
95
109
|
return "fable[1m]";
|
|
96
110
|
return "fable";
|
|
97
111
|
}
|
|
98
112
|
if (model.includes("opus")) {
|
|
113
|
+
const opusOverrideRaw = env("OPUS_MODEL");
|
|
114
|
+
const opusOverride = opusOverrideRaw?.trim().toLowerCase();
|
|
115
|
+
if (opusOverride === "opus")
|
|
116
|
+
return "opus";
|
|
117
|
+
if (opusOverrideRaw && opusOverride !== "opus[1m]") {
|
|
118
|
+
warnUnrecognizedTierOverride("OPUS_MODEL", opusOverrideRaw, "opus");
|
|
119
|
+
}
|
|
99
120
|
if (use1m && !isSubagent && !isExtendedContextKnownUnavailable())
|
|
100
121
|
return "opus[1m]";
|
|
101
122
|
return "opus";
|
package/dist/cli.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
startProxyServer
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-5rkcyzzm.js";
|
|
5
5
|
import"./cli-h6hfkg3s.js";
|
|
6
6
|
import"./cli-sry5aqdj.js";
|
|
7
7
|
import"./cli-xmweegb1.js";
|
|
8
8
|
import {
|
|
9
9
|
resolveClaudeExecutableAsync
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-p3ggjwgn.js";
|
|
11
11
|
import"./cli-vj9cv18n.js";
|
|
12
12
|
import"./cli-je60fevk.js";
|
|
13
|
-
import"./cli-
|
|
13
|
+
import"./cli-khhjyk04.js";
|
|
14
14
|
import {
|
|
15
15
|
__require
|
|
16
16
|
} from "./cli-p9swy5t3.js";
|
|
@@ -55,7 +55,7 @@ See https://github.com/rynfar/meridian for full documentation.`);
|
|
|
55
55
|
process.exit(0);
|
|
56
56
|
}
|
|
57
57
|
if (args[0] === "profile") {
|
|
58
|
-
const { profileAdd, profileAddOauthToken, profileList, profileRemove, profileSwitch, profileLogin, profileHelp } = await import("./profileCli-
|
|
58
|
+
const { profileAdd, profileAddOauthToken, profileList, profileRemove, profileSwitch, profileLogin, profileHelp } = await import("./profileCli-c8bejc7w.js");
|
|
59
59
|
const subcommand = args[1];
|
|
60
60
|
const profileId = args[2];
|
|
61
61
|
const headless = args.includes("--headless");
|
|
@@ -113,7 +113,7 @@ Restart OpenCode for the plugin to take effect.`);
|
|
|
113
113
|
process.exit(0);
|
|
114
114
|
}
|
|
115
115
|
if (args[0] === "refresh-token") {
|
|
116
|
-
const { refreshOAuthToken } = await import("./tokenRefresh-
|
|
116
|
+
const { refreshOAuthToken } = await import("./tokenRefresh-kzz08kea.js");
|
|
117
117
|
const success = await refreshOAuthToken();
|
|
118
118
|
if (success) {
|
|
119
119
|
console.log("Token refreshed successfully");
|
|
@@ -13,9 +13,9 @@ import {
|
|
|
13
13
|
profileLogin,
|
|
14
14
|
profileRemove,
|
|
15
15
|
profileSwitch
|
|
16
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-p3ggjwgn.js";
|
|
17
17
|
import"./cli-vj9cv18n.js";
|
|
18
|
-
import"./cli-
|
|
18
|
+
import"./cli-khhjyk04.js";
|
|
19
19
|
import"./cli-p9swy5t3.js";
|
|
20
20
|
export {
|
|
21
21
|
profileSwitch,
|
package/dist/proxy/models.d.ts
CHANGED
|
@@ -52,6 +52,8 @@ export interface ClaudeAuthStatus {
|
|
|
52
52
|
subscriptionType?: string;
|
|
53
53
|
email?: string;
|
|
54
54
|
}
|
|
55
|
+
/** Clear the per-variable warn-once tracking — for testing only. */
|
|
56
|
+
export declare function resetWarnedTierOverrides(): void;
|
|
55
57
|
export declare function mapModelToClaudeModel(model: string, subscriptionType?: string | null, agentMode?: string | null): ClaudeModel;
|
|
56
58
|
/**
|
|
57
59
|
* Record that Extra Usage is not enabled on this subscription.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/proxy/models.ts"],"names":[],"mappings":"AAAA;;GAEG;AAsBH,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,YAAY,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,OAAO,GAAG,WAAW,CAAA;AAEzG;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,qBAAqB,mBAAmB,CAAA;AACrD,eAAO,MAAM,oBAAoB,kBAAkB,CAAA;AACnD,eAAO,MAAM,sBAAsB,oBAAoB,CAAA;AACvD,eAAO,MAAM,qBAAqB,qBAAqB,CAAA;AAEvD;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAOxB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAM3F;AACD,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/proxy/models.ts"],"names":[],"mappings":"AAAA;;GAEG;AAsBH,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,YAAY,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,OAAO,GAAG,WAAW,CAAA;AAEzG;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,qBAAqB,mBAAmB,CAAA;AACrD,eAAO,MAAM,oBAAoB,kBAAkB,CAAA;AACnD,eAAO,MAAM,sBAAsB,oBAAoB,CAAA;AACvD,eAAO,MAAM,qBAAqB,qBAAqB,CAAA;AAEvD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
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/proxy/server.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AACtE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,CAAA;AAGvD,YAAY,EACV,SAAS,EACT,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,WAAW,GACZ,MAAM,aAAa,CAAA;AAKpB,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAkDnG,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,oBAAoB,EAEpB,KAAK,aAAa,EAGnB,MAAM,mBAAmB,CAAA;AAI1B,OAAO,EAA+B,iBAAiB,EAAE,mBAAmB,EAAsC,MAAM,iBAAiB,CAAA;AAGzI,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,oBAAoB,EAAE,CAAA;AAChE,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,CAAA;AACjD,YAAY,EAAE,aAAa,EAAE,CAAA;AAgR7B,wBAAgB,iBAAiB,CAAC,MAAM,GAAE,OAAO,CAAC,WAAW,CAAM,GAAG,WAAW,CA0/HhF;AAWD,wBAAgB,gCAAgC,IAAI,IAAI,CAavD;AAED,wBAAsB,gBAAgB,CAAC,MAAM,GAAE,OAAO,CAAC,WAAW,CAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAmGhG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lineage.d.ts","sourceRoot":"","sources":["../../../src/proxy/session/lineage.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,4EAA4E;AAC5E,MAAM,WAAW,mBAAmB;IAClC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,aAAa,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expiresAt: number;
|
|
32
|
+
/**
|
|
33
|
+
* When the *refresh* token itself stops working — i.e. when the login dies
|
|
34
|
+
* and an interactive `claude login` becomes mandatory. Written by the CLI at
|
|
35
|
+
* login; optional because nothing guarantees its presence.
|
|
36
|
+
*
|
|
37
|
+
* Distinct from `expiresAt`, which is the ~8h access-token lifetime that the
|
|
38
|
+
* background scheduler rolls on its own. No amount of refreshing extends
|
|
39
|
+
* this one unless Anthropic hands back a new value (see `doRefresh`).
|
|
40
|
+
*/
|
|
41
|
+
refreshTokenExpiresAt?: number;
|
|
32
42
|
scopes?: string[];
|
|
33
43
|
subscriptionType?: string;
|
|
34
44
|
rateLimitTier?: string;
|
|
@@ -94,6 +104,37 @@ export declare function refreshOAuthToken(store?: CredentialStore): Promise<bool
|
|
|
94
104
|
* refresh-on-401 path if Anthropic rejects it.
|
|
95
105
|
*/
|
|
96
106
|
export declare function ensureFreshToken(store?: CredentialStore, bufferMs?: number): Promise<boolean>;
|
|
107
|
+
/**
|
|
108
|
+
* Default warning window before the login dies, in days.
|
|
109
|
+
*
|
|
110
|
+
* Three, matching the CLI's own `tff` constant — the window outside which it
|
|
111
|
+
* suppresses the expiry tip entirely. The login only lasts 30 days, so a wider
|
|
112
|
+
* window would spend a tenth of every cycle in the alerting state and train
|
|
113
|
+
* the alert to be ignored. Override with MERIDIAN_AUTH_RENEWAL_WARN_DAYS.
|
|
114
|
+
*/
|
|
115
|
+
export declare const DEFAULT_RENEWAL_WARN_DAYS = 3;
|
|
116
|
+
/**
|
|
117
|
+
* Parse the MERIDIAN_AUTH_RENEWAL_WARN_DAYS window, falling back to the
|
|
118
|
+
* default for anything unusable.
|
|
119
|
+
*
|
|
120
|
+
* An explicit finite check rather than `Number(raw) || DEFAULT`: `0` is a
|
|
121
|
+
* legitimate setting — warn only once the login has actually lapsed — and the
|
|
122
|
+
* shortcut would swallow it as falsy. Negative windows are rejected too; they
|
|
123
|
+
* would mean "warn only after the login has been dead for N days", which no
|
|
124
|
+
* monitor wants.
|
|
125
|
+
*/
|
|
126
|
+
export declare function resolveRenewalWarnDays(raw: string | undefined): number;
|
|
127
|
+
export interface AuthRenewalStatus {
|
|
128
|
+
/** Epoch ms the refresh token stops working, when known. */
|
|
129
|
+
refreshTokenExpiresAt?: number;
|
|
130
|
+
/** Whole days until then. Negative once it has passed. */
|
|
131
|
+
daysUntilRenewal?: number;
|
|
132
|
+
/** True once inside the warning window — the field monitors should alert on. */
|
|
133
|
+
renewalRequiredSoon: boolean;
|
|
134
|
+
}
|
|
135
|
+
/** Drop cached refresh-token expiries — for tests, and after a re-login. */
|
|
136
|
+
export declare function resetAuthRenewalCache(): void;
|
|
137
|
+
export declare function getAuthRenewalStatus(store?: CredentialStore, warnDays?: number): Promise<AuthRenewalStatus>;
|
|
97
138
|
/**
|
|
98
139
|
* Start a self-rescheduling timer that refreshes the access token shortly
|
|
99
140
|
* before each expiry — regardless of incoming traffic.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokenRefresh.d.ts","sourceRoot":"","sources":["../../src/proxy/tokenRefresh.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAkBH;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAK1E;AAED,gEAAgE;AAChE,wBAAgB,0BAA0B,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAE1E;AAED,UAAU,gBAAgB;IACxB,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,UAAU,eAAe;IACvB,aAAa,EAAE,gBAAgB,CAAA;IAC/B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAMD,MAAM,WAAW,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AsB,oBAAoB,CACxC,KAAK,CAAC,EAAE,eAAe,EACvB,QAAQ,SAA4B,GACnC,OAAO,CAAC,iBAAiB,CAAC,CAkB5B;AAiBD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,CAAC,EAAE,eAAe,EACvB,QAAQ,SAAgB,EACxB,cAAc,SAAgB,GAC7B,IAAI,CAKN;AAED,iDAAiD;AACjD,wBAAgB,qBAAqB,IAAI,IAAI,CAK5C;AAoED,wBAAwB;AACxB,wBAAgB,yBAAyB,IAAI,OAAO,CAEnD;AAED,gDAAgD;AAChD,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C"}
|
package/dist/server.js
CHANGED
|
@@ -11,14 +11,14 @@ import {
|
|
|
11
11
|
runObserveHook,
|
|
12
12
|
runTransformHook,
|
|
13
13
|
startProxyServer
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-5rkcyzzm.js";
|
|
15
15
|
import"./cli-h6hfkg3s.js";
|
|
16
16
|
import"./cli-sry5aqdj.js";
|
|
17
17
|
import"./cli-xmweegb1.js";
|
|
18
|
-
import"./cli-
|
|
18
|
+
import"./cli-p3ggjwgn.js";
|
|
19
19
|
import"./cli-vj9cv18n.js";
|
|
20
20
|
import"./cli-je60fevk.js";
|
|
21
|
-
import"./cli-
|
|
21
|
+
import"./cli-khhjyk04.js";
|
|
22
22
|
import"./cli-p9swy5t3.js";
|
|
23
23
|
export {
|
|
24
24
|
startProxyServer,
|
|
@@ -1,27 +1,35 @@
|
|
|
1
1
|
import {
|
|
2
|
+
DEFAULT_RENEWAL_WARN_DAYS,
|
|
2
3
|
configDirToCredentialsFile,
|
|
3
4
|
configDirToKeychainService,
|
|
4
5
|
createPlatformCredentialStore,
|
|
5
6
|
credentialsFilePathForProfile,
|
|
6
7
|
ensureFreshToken,
|
|
8
|
+
getAuthRenewalStatus,
|
|
7
9
|
isBackgroundRefreshActive,
|
|
8
10
|
refreshOAuthToken,
|
|
11
|
+
resetAuthRenewalCache,
|
|
9
12
|
resetInflightRefresh,
|
|
13
|
+
resolveRenewalWarnDays,
|
|
10
14
|
serializeCredentials,
|
|
11
15
|
startBackgroundRefresh,
|
|
12
16
|
stopBackgroundRefresh
|
|
13
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-khhjyk04.js";
|
|
14
18
|
import"./cli-p9swy5t3.js";
|
|
15
19
|
export {
|
|
16
20
|
stopBackgroundRefresh,
|
|
17
21
|
startBackgroundRefresh,
|
|
18
22
|
serializeCredentials,
|
|
23
|
+
resolveRenewalWarnDays,
|
|
19
24
|
resetInflightRefresh,
|
|
25
|
+
resetAuthRenewalCache,
|
|
20
26
|
refreshOAuthToken,
|
|
21
27
|
isBackgroundRefreshActive,
|
|
28
|
+
getAuthRenewalStatus,
|
|
22
29
|
ensureFreshToken,
|
|
23
30
|
credentialsFilePathForProfile,
|
|
24
31
|
createPlatformCredentialStore,
|
|
25
32
|
configDirToKeychainService,
|
|
26
|
-
configDirToCredentialsFile
|
|
33
|
+
configDirToCredentialsFile,
|
|
34
|
+
DEFAULT_RENEWAL_WARN_DAYS
|
|
27
35
|
};
|
package/package.json
CHANGED