@rynfar/meridian 1.57.1 → 1.58.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/README.md +2 -2
- package/dist/{cli-aq5zz92m.js → cli-khhjyk04.js} +62 -3
- package/dist/{cli-wszp24mg.js → cli-ndsqa67x.js} +38 -17
- 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/query.d.ts +25 -0
- package/dist/proxy/query.d.ts.map +1 -1
- package/dist/proxy/sanitize.d.ts +4 -0
- package/dist/proxy/sanitize.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.
|
|
@@ -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 };
|
|
@@ -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,
|
|
@@ -18622,15 +18624,21 @@ function buildCwdNote(sdkCwd, clientCwd) {
|
|
|
18622
18624
|
` + `You are reached through a proxy. The subprocess running you resides at ` + `"${sdkCwd}" on the proxy host, but that is not the user's working directory. ` + `Always treat "${clientCwd}" as the working directory when referring to files or paths.
|
|
18623
18625
|
` + `</meridian-note>`;
|
|
18624
18626
|
}
|
|
18627
|
+
var GIT_STATUS_PROVENANCE_NOTE = `
|
|
18628
|
+
|
|
18629
|
+
<meridian-note>
|
|
18630
|
+
` + `You are reached through a proxy that issues a separate request per turn, so ` + `the \`gitStatus\` block in your system prompt is recomputed at the start of ` + `every turn — despite its claim to describe "the start of the conversation". ` + `Read it as the working tree as of this turn and nothing more. It is not ` + `evidence that a file predates the conversation: files you yourself created or ` + `edited in earlier turns appear in it exactly like pre-existing changes. To ` + `judge whether something predates the conversation, rely on the conversation ` + `history and your own prior tool calls, and run \`git status\` when you need ` + `the current tree.
|
|
18631
|
+
` + `</meridian-note>`;
|
|
18625
18632
|
function resolveSystemPrompt(systemContext, passthrough, settingSources, codeSystemPrompt, clientSystemPrompt, cwdNote) {
|
|
18626
18633
|
const hasSettings = settingSources != null && settingSources.length > 0;
|
|
18627
18634
|
const usePreset = codeSystemPrompt ?? (hasSettings || !passthrough && !!systemContext);
|
|
18628
18635
|
const includeClient = clientSystemPrompt ?? true;
|
|
18629
18636
|
const clientContext = includeClient ? systemContext : undefined;
|
|
18630
|
-
const append = [clientContext, cwdNote].filter(Boolean).join("") || undefined;
|
|
18631
18637
|
if (usePreset) {
|
|
18632
|
-
|
|
18638
|
+
const append2 = [clientContext, cwdNote, GIT_STATUS_PROVENANCE_NOTE].filter(Boolean).join("");
|
|
18639
|
+
return { systemPrompt: { type: "preset", preset: "claude_code", append: append2 } };
|
|
18633
18640
|
}
|
|
18641
|
+
const append = [clientContext, cwdNote].filter(Boolean).join("") || undefined;
|
|
18634
18642
|
if (append)
|
|
18635
18643
|
return { systemPrompt: append };
|
|
18636
18644
|
if (codeSystemPrompt === false)
|
|
@@ -19116,11 +19124,16 @@ var ORCHESTRATION_TAGS = [
|
|
|
19116
19124
|
"skill_content",
|
|
19117
19125
|
"skill_files",
|
|
19118
19126
|
"directories",
|
|
19119
|
-
"available_skills"
|
|
19120
|
-
"thinking"
|
|
19127
|
+
"available_skills"
|
|
19121
19128
|
];
|
|
19122
|
-
|
|
19123
|
-
|
|
19129
|
+
function tagPatterns(tag) {
|
|
19130
|
+
return [
|
|
19131
|
+
new RegExp(`<${tag}\\b[^>]*>[\\s\\S]*?<\\/${tag}>`, "gi"),
|
|
19132
|
+
new RegExp(`<${tag}\\b[^>]*\\/>`, "gi")
|
|
19133
|
+
];
|
|
19134
|
+
}
|
|
19135
|
+
var PAIRED_TAG_PATTERNS = ORCHESTRATION_TAGS.map((tag) => tagPatterns(tag)[0]);
|
|
19136
|
+
var SELF_CLOSING_TAG_PATTERNS = ORCHESTRATION_TAGS.map((tag) => tagPatterns(tag)[1]);
|
|
19124
19137
|
var NON_XML_PATTERNS = [
|
|
19125
19138
|
/<!--\s*OMO_INTERNAL_INITIATOR\s*-->/gi,
|
|
19126
19139
|
/\[SYSTEM DIRECTIVE: OH-MY-OPENCODE[^\]]*\]/gi,
|
|
@@ -19132,13 +19145,15 @@ var ALL_PATTERNS = [
|
|
|
19132
19145
|
...SELF_CLOSING_TAG_PATTERNS,
|
|
19133
19146
|
...NON_XML_PATTERNS
|
|
19134
19147
|
];
|
|
19135
|
-
var SYSTEM_REMINDER_PATTERNS =
|
|
19136
|
-
|
|
19137
|
-
/<system-reminder\b[^>]*\/>/gi
|
|
19138
|
-
];
|
|
19148
|
+
var SYSTEM_REMINDER_PATTERNS = tagPatterns("system-reminder");
|
|
19149
|
+
var THINKING_TAG_PATTERNS = tagPatterns("thinking");
|
|
19139
19150
|
function sanitizeTextContent(text, opts = {}) {
|
|
19140
19151
|
let result = text;
|
|
19141
|
-
const patterns =
|
|
19152
|
+
const patterns = [...ALL_PATTERNS];
|
|
19153
|
+
if (opts.stripSystemReminder)
|
|
19154
|
+
patterns.push(...SYSTEM_REMINDER_PATTERNS);
|
|
19155
|
+
if (opts.stripThinking)
|
|
19156
|
+
patterns.push(...THINKING_TAG_PATTERNS);
|
|
19142
19157
|
for (const pattern of patterns) {
|
|
19143
19158
|
pattern.lastIndex = 0;
|
|
19144
19159
|
result = result.replace(pattern, "");
|
|
@@ -19244,11 +19259,12 @@ function verifyLineage(cached, messages) {
|
|
|
19244
19259
|
const suffixOverlap = measureSuffixOverlap(cached.messageHashes, incomingHashes);
|
|
19245
19260
|
const MIN_STORED_FOR_COMPACTION = 6;
|
|
19246
19261
|
const suffixStartInIncoming = incomingHashes.length - suffixOverlap >= 0 ? findSuffixAnchorStart(cached.messageHashes, incomingHashes, suffixOverlap) : -1;
|
|
19247
|
-
|
|
19262
|
+
const compactionResumeFrom = suffixStartInIncoming + suffixOverlap;
|
|
19263
|
+
if (suffixOverlap >= MIN_SUFFIX_FOR_COMPACTION && cached.messageHashes.length >= MIN_STORED_FOR_COMPACTION && suffixStartInIncoming > 0 && compactionResumeFrom < messages.length) {
|
|
19248
19264
|
return {
|
|
19249
19265
|
type: "compaction",
|
|
19250
19266
|
session: cached,
|
|
19251
|
-
resumeFrom:
|
|
19267
|
+
resumeFrom: compactionResumeFrom,
|
|
19252
19268
|
suffixOverlap
|
|
19253
19269
|
};
|
|
19254
19270
|
}
|
|
@@ -20325,7 +20341,8 @@ data: ${JSON.stringify(lastError)}
|
|
|
20325
20341
|
}
|
|
20326
20342
|
systemContext = pipelineCtx.systemContext ?? systemContext;
|
|
20327
20343
|
const sanitizeOpts = {
|
|
20328
|
-
stripSystemReminder: pipelineCtx.leaksCwdViaSystemReminder
|
|
20344
|
+
stripSystemReminder: pipelineCtx.leaksCwdViaSystemReminder,
|
|
20345
|
+
stripThinking: env("STRIP_THINKING") === "1"
|
|
20329
20346
|
};
|
|
20330
20347
|
const allMessages = body.messages || [];
|
|
20331
20348
|
let messagesToConvert;
|
|
@@ -22287,13 +22304,17 @@ data: ${JSON.stringify({
|
|
|
22287
22304
|
}, 503);
|
|
22288
22305
|
}
|
|
22289
22306
|
const claudeExecutableInfo = getResolvedClaudeExecutableInfo();
|
|
22307
|
+
const warnDays = resolveRenewalWarnDays(process.env.MERIDIAN_AUTH_RENEWAL_WARN_DAYS);
|
|
22308
|
+
const renewalConfigDir = profileEnvOverrides?.CLAUDE_CONFIG_DIR;
|
|
22309
|
+
const renewal = await getAuthRenewalStatus(renewalConfigDir ? createPlatformCredentialStore({ claudeConfigDir: renewalConfigDir }) : undefined, warnDays).catch(() => ({ renewalRequiredSoon: false }));
|
|
22290
22310
|
return c.json({
|
|
22291
22311
|
status: "healthy",
|
|
22292
22312
|
version: serverVersion,
|
|
22293
22313
|
auth: {
|
|
22294
22314
|
loggedIn: true,
|
|
22295
22315
|
email: auth.email,
|
|
22296
|
-
subscriptionType: auth.subscriptionType
|
|
22316
|
+
subscriptionType: auth.subscriptionType,
|
|
22317
|
+
...renewal
|
|
22297
22318
|
},
|
|
22298
22319
|
mode: envBool("PASSTHROUGH") ? "passthrough" : "internal",
|
|
22299
22320
|
...claudeExecutableInfo ? { claudeExecutable: claudeExecutableInfo } : {},
|
|
@@ -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-ndsqa67x.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,MAA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,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAClD,cAAc,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAA;IAC7C,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAA;IAC5C,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAA;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,OAAO,CAAA;CACf,CAAA;AA4HD;;;;;;;;;GASG;AACH,wBAAsB,iCAAiC,CACrD,IAAI,GAAE,YAA2B,GAChC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAYtC;AAED;;;;GAIG;AACH,wBAAsB,uBAAuB,CAAC,IAAI,GAAE,YAA2B,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAGvG;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,2BAA2B,CACzC,IAAI,GAAE,YAA2B,GAChC,oBAAoB,GAAG,IAAI,CAQ7B;AAED;;;;;GAKG;AACH,wBAAgB,+BAA+B,IAAI,oBAAoB,GAAG,IAAI,CAE7E;AAED,wBAAsB,4BAA4B,IAAI,OAAO,CAAC,MAAM,CAAC,CAqBpE;AAED,2CAA2C;AAC3C,wBAAgB,qBAAqB,IAAI,IAAI,CAG5C;AAED,kDAAkD;AAClD,wBAAgB,2BAA2B,IAAI,IAAI,CAOlD;AAED;;6DAE6D;AAC7D,wBAAgB,qBAAqB,IAAI,IAAI,CAO5C;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAG/D"}
|
package/dist/proxy/query.d.ts
CHANGED
|
@@ -121,5 +121,30 @@ export interface BuildQueryResult {
|
|
|
121
121
|
* reports that as its working directory.
|
|
122
122
|
*/
|
|
123
123
|
export declare function buildCwdNote(sdkCwd: string, clientCwd?: string): string;
|
|
124
|
+
/**
|
|
125
|
+
* Correct the provenance claim on the preset's `gitStatus` block.
|
|
126
|
+
*
|
|
127
|
+
* The `claude_code` preset injects a `gitStatus:` section stating verbatim that
|
|
128
|
+
* it is "the git status at the start of the conversation" and "will not update
|
|
129
|
+
* during the conversation". In the real Claude Code CLI that holds: one
|
|
130
|
+
* long-lived process serves the whole conversation, so the snapshot really is
|
|
131
|
+
* from its start.
|
|
132
|
+
*
|
|
133
|
+
* Meridian breaks that invariant. Every turn is a separate HTTP request and a
|
|
134
|
+
* separate `query()`, so the SDK recomputes the block each time while it keeps
|
|
135
|
+
* asserting it is the conversation's starting state. Files the model created in
|
|
136
|
+
* earlier turns therefore reappear as apparently pre-existing work, and the
|
|
137
|
+
* model concludes it overwrote the user's uncommitted changes — #694, where it
|
|
138
|
+
* reported destroying two work-in-progress files it had written itself.
|
|
139
|
+
*
|
|
140
|
+
* Verified live: a file created by a third party after session start appears in
|
|
141
|
+
* the block under the "start of the conversation" caveat, on a session whose
|
|
142
|
+
* lineage is an unbroken continuation chain. This is not a history-loss bug, so
|
|
143
|
+
* the resume fixes (#705, #719) do not address it.
|
|
144
|
+
*
|
|
145
|
+
* Only meaningful alongside the preset — it is the preset that injects the block
|
|
146
|
+
* being corrected — so it is appended in that branch only.
|
|
147
|
+
*/
|
|
148
|
+
export declare const GIT_STATUS_PROVENANCE_NOTE: string;
|
|
124
149
|
export declare function buildQueryOptions(ctx: QueryContext, abortController?: AbortController): BuildQueryResult;
|
|
125
150
|
//# sourceMappingURL=query.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/proxy/query.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAW,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAEnG,OAAO,EAAE,0BAA0B,EAAwB,MAAM,oBAAoB,CAAA;AAErF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAsBtC,M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AC,EAAE,OAAO,CAAA;IAChB,wDAAwD;IACxD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,0DAA0D;IAC1D,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,kCAAkC;IAClC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,wCAAwC;IACxC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,+CAA+C;IAC/C,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAA;IAChC,yDAAyD;IACzD,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAA;IAC9B,OAAO,EAAE,OAAO,CAAA;CACjB;AA2CD;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAkBvE;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,0BAA0B,QAWnB,CAAA;AAiCpB,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,YAAY,EAAE,eAAe,CAAC,EAAE,eAAe,GAAG,gBAAgB,CA2HxG"}
|
package/dist/proxy/sanitize.d.ts
CHANGED
|
@@ -20,6 +20,10 @@ export interface SanitizeOptions {
|
|
|
20
20
|
/** Strip `<system-reminder>` blocks. Enable for adapters (Droid) that leak
|
|
21
21
|
* CWD/env through this tag. */
|
|
22
22
|
stripSystemReminder?: boolean;
|
|
23
|
+
/** Strip raw `<thinking>` tags. Off by default: the tag is a common
|
|
24
|
+
* chain-of-thought convention in user-authored prompts (#720). Enable only
|
|
25
|
+
* for an adapter observed leaking it. */
|
|
26
|
+
stripThinking?: boolean;
|
|
23
27
|
}
|
|
24
28
|
/**
|
|
25
29
|
* Strip orchestration wrappers from a single text string.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sanitize.d.ts","sourceRoot":"","sources":["../../src/proxy/sanitize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;
|
|
1
|
+
{"version":3,"file":"sanitize.d.ts","sourceRoot":"","sources":["../../src/proxy/sanitize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAiGH,MAAM,WAAW,eAAe;IAC9B;oCACgC;IAChC,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B;;8CAE0C;IAC1C,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,eAAoB,GAAG,MAAM,CAapF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,iBAAi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AAE,GAAG,CAAA;CAAE,CAAC,GAC9C,aAAa,CA4Gf"}
|
|
@@ -29,6 +29,16 @@ interface OAuthCredentials {
|
|
|
29
29
|
accessToken: string;
|
|
30
30
|
refreshToken: string;
|
|
31
31
|
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,CA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B,CAAC,EAAE,MAAM,CAAA;IACzB,gFAAgF;IAChF,mBAAmB,EAAE,OAAO,CAAA;CAC7B;AA6BD,4EAA4E;AAC5E,wBAAgB,qBAAqB,IAAI,IAAI,CAG5C;AA2CD,wBAAsB,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-ndsqa67x.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