@rynfar/meridian 1.62.0 → 1.62.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.
@@ -6337,6 +6337,7 @@ var serve = (options, listeningListener) => {
6337
6337
  };
6338
6338
 
6339
6339
  // src/proxy/server.ts
6340
+ import { AsyncLocalStorage } from "node:async_hooks";
6340
6341
  import { homedir as homedir7 } from "node:os";
6341
6342
  import { join as join8 } from "node:path";
6342
6343
  import { query } from "@anthropic-ai/claude-agent-sdk";
@@ -12202,11 +12203,18 @@ function isExpiredTokenError(errMsg) {
12202
12203
  return true;
12203
12204
  return false;
12204
12205
  }
12205
- function isStaleSessionError(error) {
12206
+ function classifyResumeRefusal(error, stderr) {
12207
+ if (isBusySessionError(error, stderr))
12208
+ return "busy";
12206
12209
  if (!(error instanceof Error))
12207
- return false;
12210
+ return;
12208
12211
  const msg = error.message;
12209
- return msg.includes("No message found with message.uuid") || msg.includes("No conversation found with session ID") || msg.includes("No conversation found to continue") || msg.includes("No conversations found to resume");
12212
+ if (msg.includes("No message found with message.uuid"))
12213
+ return "missing-message";
12214
+ if (msg.includes("No conversation found with session ID") || msg.includes("No conversation found to continue") || msg.includes("No conversations found to resume")) {
12215
+ return "unresumable";
12216
+ }
12217
+ return;
12210
12218
  }
12211
12219
  function isBusySessionError(error, stderr) {
12212
12220
  const needle = "is currently running as a background agent";
@@ -12251,11 +12259,34 @@ function makeRawTail(errMsg) {
12251
12259
  return;
12252
12260
  return head.length > RAW_TAIL_MAX ? head.slice(0, RAW_TAIL_MAX) : head;
12253
12261
  }
12262
+ function canRecoverCapturedToolUses(input) {
12263
+ if (!input.passthrough)
12264
+ return false;
12265
+ if (input.capturedToolUses <= 0)
12266
+ return false;
12267
+ switch (input.reason) {
12268
+ case "max_turns":
12269
+ case "upstream_idle":
12270
+ return true;
12271
+ case "aborted":
12272
+ return input.abortIsOurs;
12273
+ default:
12274
+ return false;
12275
+ }
12276
+ }
12254
12277
  function extractSdkTermination(errMsg) {
12255
12278
  const stderrTail = extractStderrTail(errMsg);
12256
12279
  const haystack = `${errMsg}
12257
12280
  ${stderrTail ?? ""}`;
12258
12281
  const lower = haystack.toLowerCase();
12282
+ if (lower.includes("upstream idle for")) {
12283
+ const m = haystack.match(/upstream idle for (\d+)ms/i);
12284
+ return {
12285
+ reason: "upstream_idle",
12286
+ ...m ? { idleMs: Number(m[1]) } : {},
12287
+ ...stderrTail ? { stderrTail } : {}
12288
+ };
12289
+ }
12259
12290
  if (lower.includes("reached maximum number of turns")) {
12260
12291
  const m = haystack.match(/Reached maximum number of turns \((\d+)\)/i);
12261
12292
  return {
@@ -19459,7 +19490,7 @@ import { join as join5, isAbsolute as isAbsolute2, extname } from "path";
19459
19490
  import { pathToFileURL } from "url";
19460
19491
 
19461
19492
  // src/proxy/plugins/validation.ts
19462
- var KNOWN_ADAPTERS = ["opencode", "openai", "jcode", "crush", "droid", "pi", "forgecode", "passthrough"];
19493
+ init_detect();
19463
19494
  var KNOWN_HOOKS = ["onRequest", "onResponse", "onTelemetry", "onSession", "onToolUse", "onToolResult", "onError"];
19464
19495
  function validateTransform(exported) {
19465
19496
  if (exported == null || typeof exported !== "object") {
@@ -19480,8 +19511,9 @@ function validateTransform(exported) {
19480
19511
  }
19481
19512
  const warnings = [];
19482
19513
  if (Array.isArray(obj.adapters)) {
19514
+ const known = listAdapterNames();
19483
19515
  for (const adapter of obj.adapters) {
19484
- if (typeof adapter === "string" && !KNOWN_ADAPTERS.includes(adapter)) {
19516
+ if (typeof adapter === "string" && !known.includes(adapter)) {
19485
19517
  warnings.push(adapter);
19486
19518
  }
19487
19519
  }
@@ -20663,8 +20695,8 @@ function createProxyServer(config = {}) {
20663
20695
  const sessionMcpCache = new LRUMap(getMaxSessionsLimit());
20664
20696
  const PENDING_STORE_WAIT_MS = 3000;
20665
20697
  const PENDING_STORE_AUTO_RESOLVE_MS = 1e4;
20666
- const BUSY_SESSION_MAX_RETRIES = 3;
20667
- const BUSY_SESSION_RETRY_DELAY_MS = parseInt(process.env.MERIDIAN_BUSY_RETRY_DELAY_MS ?? "500", 10);
20698
+ const RESUME_REFUSAL_MAX_RETRIES = 3;
20699
+ const RESUME_REFUSAL_RETRY_DELAY_MS = parseInt(process.env.MERIDIAN_BUSY_RETRY_DELAY_MS ?? "500", 10);
20668
20700
  const pendingSessionStores = new Map;
20669
20701
  const registerPendingStore = (key) => {
20670
20702
  let resolveFn = () => {};
@@ -20868,6 +20900,7 @@ data: ${JSON.stringify(lastError)}
20868
20900
  const MAX_CONCURRENT_SESSIONS = parseInt((process.env.MERIDIAN_MAX_CONCURRENT ?? process.env.CLAUDE_PROXY_MAX_CONCURRENT) || "10", 10);
20869
20901
  let activeSessions = 0;
20870
20902
  const sessionQueue = [];
20903
+ const insideSessionSlot = new AsyncLocalStorage;
20871
20904
  async function acquireSession() {
20872
20905
  if (activeSessions < MAX_CONCURRENT_SESSIONS) {
20873
20906
  activeSessions++;
@@ -21380,8 +21413,9 @@ data: ${JSON.stringify(lastError)}
21380
21413
  }
21381
21414
  let tokenRefreshed = false;
21382
21415
  let didFreshBaseRetry = false;
21383
- let busySessionRetries = 0;
21416
+ let resumeRefusalRetries = 0;
21384
21417
  let busySessionFork = false;
21418
+ let sawUnresumableRefusal = false;
21385
21419
  while (true) {
21386
21420
  let didYieldContent = false;
21387
21421
  const attemptStderrStart = stderrLines.length;
@@ -21444,29 +21478,33 @@ data: ${JSON.stringify(lastError)}
21444
21478
  releaseHeldDenies("non_stream_attempt_error");
21445
21479
  if (didYieldContent)
21446
21480
  throw error;
21447
- if (resumeSessionId && isBusySessionError(error, stderrLines.slice(attemptStderrStart).join(`
21448
- `))) {
21449
- if (busySessionRetries < BUSY_SESSION_MAX_RETRIES) {
21450
- busySessionRetries++;
21451
- claudeLog("session.busy_retry", { mode: "non_stream", attempt: busySessionRetries, resumeSessionId });
21452
- plog(`[PROXY] ${requestMeta.requestId} session busy (bg agent), retrying resume ${busySessionRetries}/${BUSY_SESSION_MAX_RETRIES}`);
21453
- await new Promise((resolve3) => setTimeout(resolve3, BUSY_SESSION_RETRY_DELAY_MS * busySessionRetries));
21481
+ const refusal = classifyResumeRefusal(error, resumeSessionId ? stderrLines.slice(attemptStderrStart).join(`
21482
+ `) : undefined);
21483
+ if (refusal === "unresumable")
21484
+ sawUnresumableRefusal = true;
21485
+ if (resumeSessionId && (refusal === "busy" || refusal === "unresumable")) {
21486
+ if (resumeRefusalRetries < RESUME_REFUSAL_MAX_RETRIES) {
21487
+ resumeRefusalRetries++;
21488
+ claudeLog("session.resume_retry", { mode: "non_stream", refusal, attempt: resumeRefusalRetries, resumeSessionId });
21489
+ plog(`[PROXY] ${requestMeta.requestId} resume refused (${refusal}), retrying ${resumeRefusalRetries}/${RESUME_REFUSAL_MAX_RETRIES}`);
21490
+ await new Promise((resolve3) => setTimeout(resolve3, RESUME_REFUSAL_RETRY_DELAY_MS * resumeRefusalRetries));
21454
21491
  continue;
21455
21492
  }
21456
- if (!busySessionFork) {
21493
+ if (refusal === "busy" && !busySessionFork) {
21457
21494
  busySessionFork = true;
21458
21495
  claudeLog("session.busy_fork", { mode: "non_stream", resumeSessionId });
21459
- plog(`[PROXY] ${requestMeta.requestId} session still busy after ${BUSY_SESSION_MAX_RETRIES} retries — forking session`);
21496
+ plog(`[PROXY] ${requestMeta.requestId} session still busy after ${RESUME_REFUSAL_MAX_RETRIES} retries — forking session`);
21460
21497
  continue;
21461
21498
  }
21462
21499
  }
21463
- if (isStaleSessionError(error)) {
21464
- claudeLog("session.stale_uuid_retry", {
21500
+ if (refusal === "missing-message" || sawUnresumableRefusal) {
21501
+ claudeLog("session.resume_replay", {
21465
21502
  mode: "non_stream",
21503
+ refusal,
21466
21504
  rollbackUuid: undoRollbackUuid,
21467
21505
  resumeSessionId
21468
21506
  });
21469
- plog(`[PROXY] Stale session UUID, evicting and retrying as fresh session`);
21507
+ plog(`[PROXY] ${requestMeta.requestId} session unusable (${refusal}), evicting and replaying as fresh session`);
21470
21508
  evictSession(profileSessionId, profileScopedCwd, allMessages);
21471
21509
  sdkUuidMap.length = 0;
21472
21510
  for (let i = 0;i < allMessages.length; i++)
@@ -21737,7 +21775,12 @@ data: ${JSON.stringify(lastError)}
21737
21775
  Subprocess stderr: ${stderrOutput}`;
21738
21776
  }
21739
21777
  const sdkTerm = extractSdkTermination(error instanceof Error ? error.message : String(error));
21740
- const canRecoverAsToolUse = passthrough && capturedToolUses.length > 0 && (sdkTerm.reason === "max_turns" || sdkTerm.reason === "aborted");
21778
+ const canRecoverAsToolUse = canRecoverCapturedToolUses({
21779
+ reason: sdkTerm.reason,
21780
+ passthrough,
21781
+ capturedToolUses: capturedToolUses.length,
21782
+ abortIsOurs: true
21783
+ });
21741
21784
  if (canRecoverAsToolUse) {
21742
21785
  diagnosticLog2.session(`${requestMeta.requestId} sdk_termination_recovered ${formatSdkTermination(sdkTerm, {
21743
21786
  model,
@@ -22021,8 +22064,9 @@ data: ${JSON.stringify({ type: "content_block_stop", index: idx })}
22021
22064
  }
22022
22065
  let tokenRefreshed = false;
22023
22066
  let didFreshBaseRetry = false;
22024
- let busySessionRetries = 0;
22067
+ let resumeRefusalRetries = 0;
22025
22068
  let busySessionFork = false;
22069
+ let sawUnresumableRefusal = false;
22026
22070
  while (true) {
22027
22071
  let didYieldClientEvent = false;
22028
22072
  const attemptStderrStart = stderrLines.length;
@@ -22083,29 +22127,33 @@ data: ${JSON.stringify({ type: "content_block_stop", index: idx })}
22083
22127
  const errMsg = error instanceof Error ? error.message : String(error);
22084
22128
  if (didYieldClientEvent)
22085
22129
  throw error;
22086
- if (resumeSessionId && isBusySessionError(error, stderrLines.slice(attemptStderrStart).join(`
22087
- `))) {
22088
- if (busySessionRetries < BUSY_SESSION_MAX_RETRIES) {
22089
- busySessionRetries++;
22090
- claudeLog("session.busy_retry", { mode: "stream", attempt: busySessionRetries, resumeSessionId });
22091
- plog(`[PROXY] ${requestMeta.requestId} session busy (bg agent), retrying resume ${busySessionRetries}/${BUSY_SESSION_MAX_RETRIES}`);
22092
- await new Promise((resolve3) => setTimeout(resolve3, BUSY_SESSION_RETRY_DELAY_MS * busySessionRetries));
22130
+ const refusal = classifyResumeRefusal(error, resumeSessionId ? stderrLines.slice(attemptStderrStart).join(`
22131
+ `) : undefined);
22132
+ if (refusal === "unresumable")
22133
+ sawUnresumableRefusal = true;
22134
+ if (resumeSessionId && (refusal === "busy" || refusal === "unresumable")) {
22135
+ if (resumeRefusalRetries < RESUME_REFUSAL_MAX_RETRIES) {
22136
+ resumeRefusalRetries++;
22137
+ claudeLog("session.resume_retry", { mode: "stream", refusal, attempt: resumeRefusalRetries, resumeSessionId });
22138
+ plog(`[PROXY] ${requestMeta.requestId} resume refused (${refusal}), retrying ${resumeRefusalRetries}/${RESUME_REFUSAL_MAX_RETRIES}`);
22139
+ await new Promise((resolve3) => setTimeout(resolve3, RESUME_REFUSAL_RETRY_DELAY_MS * resumeRefusalRetries));
22093
22140
  continue;
22094
22141
  }
22095
- if (!busySessionFork) {
22142
+ if (refusal === "busy" && !busySessionFork) {
22096
22143
  busySessionFork = true;
22097
22144
  claudeLog("session.busy_fork", { mode: "stream", resumeSessionId });
22098
- plog(`[PROXY] ${requestMeta.requestId} session still busy after ${BUSY_SESSION_MAX_RETRIES} retries — forking session`);
22145
+ plog(`[PROXY] ${requestMeta.requestId} session still busy after ${RESUME_REFUSAL_MAX_RETRIES} retries — forking session`);
22099
22146
  continue;
22100
22147
  }
22101
22148
  }
22102
- if (isStaleSessionError(error)) {
22103
- claudeLog("session.stale_uuid_retry", {
22149
+ if (refusal === "missing-message" || sawUnresumableRefusal) {
22150
+ claudeLog("session.resume_replay", {
22104
22151
  mode: "stream",
22152
+ refusal,
22105
22153
  rollbackUuid: undoRollbackUuid,
22106
22154
  resumeSessionId
22107
22155
  });
22108
- plog(`[PROXY] Stale session UUID, evicting and retrying as fresh session`);
22156
+ plog(`[PROXY] ${requestMeta.requestId} session unusable (${refusal}), evicting and replaying as fresh session`);
22109
22157
  evictSession(profileSessionId, profileScopedCwd, allMessages);
22110
22158
  sdkUuidMap.length = 0;
22111
22159
  for (let i = 0;i < allMessages.length; i++)
@@ -22943,7 +22991,12 @@ Subprocess stderr: ${stderrOutput}`;
22943
22991
  } : classifyError(errMsg, model);
22944
22992
  claudeLog("proxy.anthropic.error", { error: errMsg, classified: streamErr.type });
22945
22993
  const sdkTerm = extractSdkTermination(errMsg);
22946
- const canRecoverAsToolUse = (sdkTerm.reason === "max_turns" || sdkTerm.reason === "aborted" && (sawDuplicateToolUse || earlyStopFired)) && passthrough && capturedToolUses.length > 0 && messageStartEmitted;
22994
+ const canRecoverAsToolUse = canRecoverCapturedToolUses({
22995
+ reason: sdkTerm.reason,
22996
+ passthrough,
22997
+ capturedToolUses: capturedToolUses.length,
22998
+ abortIsOurs: sawDuplicateToolUse || earlyStopFired
22999
+ }) && messageStartEmitted;
22947
23000
  if (canRecoverAsToolUse) {
22948
23001
  diagnosticLog2.session(`${requestMeta.requestId} sdk_termination_recovered ${formatSdkTermination(sdkTerm, {
22949
23002
  model,
@@ -23070,7 +23123,7 @@ data: {"type":"message_stop"}
23070
23123
  error: streamErr.type
23071
23124
  });
23072
23125
  if (messageStartEmitted) {
23073
- const errorStopReason = textEventsForwarded > 0 ? "end_turn" : "max_tokens";
23126
+ const errorStopReason = "max_tokens";
23074
23127
  claudeLog("response.error_envelope", {
23075
23128
  mode: "stream",
23076
23129
  stopReason: errorStopReason,
@@ -23179,10 +23232,14 @@ data: ${JSON.stringify({
23179
23232
  const requestId = c.req.header("x-request-id") || randomUUID();
23180
23233
  const queueEnteredAt = Date.now();
23181
23234
  claudeLog("request.enter", { requestId, endpoint });
23235
+ const held = insideSessionSlot.getStore();
23236
+ if (held) {
23237
+ return handleMessages(c, { requestId, endpoint, ...held });
23238
+ }
23182
23239
  await acquireSession();
23183
23240
  const queueStartedAt = Date.now();
23184
23241
  try {
23185
- return await handleMessages(c, { requestId, endpoint, queueEnteredAt, queueStartedAt });
23242
+ return await insideSessionSlot.run({ queueEnteredAt, queueStartedAt }, () => handleMessages(c, { requestId, endpoint, queueEnteredAt, queueStartedAt }));
23186
23243
  } finally {
23187
23244
  releaseSession();
23188
23245
  }
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  startProxyServer
4
- } from "./cli-k36dddkm.js";
4
+ } from "./cli-fyhd8np7.js";
5
5
  import"./cli-h6hfkg3s.js";
6
6
  import"./cli-sry5aqdj.js";
7
7
  import"./cli-xmweegb1.js";
@@ -54,11 +54,30 @@ export declare function classifyError(errMsg: string, model?: string): Classifie
54
54
  */
55
55
  export declare function isExpiredTokenError(errMsg: string): boolean;
56
56
  /**
57
- * Detect errors caused by stale session/message UUIDs.
58
- * These happen when the upstream Claude session no longer contains
59
- * the referenced message or conversation (expired, evicted server-side, etc.).
57
+ * Why the CLI refused a --resume, as far as the refusal itself can tell:
58
+ *
59
+ * - "busy": the session exists and is registered as a running agent. It can
60
+ * be branched, so a caller out of retries may fork it.
61
+ * - "unresumable": the session as a whole could not be opened. This is not
62
+ * proof that it is gone — a --resume landing while the session's previous
63
+ * subprocess is still exiting is refused although the session is intact —
64
+ * so a caller must retry before giving up on it, and has nothing to fork.
65
+ * - "missing-message": one message inside the session is gone, so an
66
+ * identical attempt fails identically. Retrying is pointless.
67
+ *
68
+ * The three carry different recoveries, which is the whole reason they are
69
+ * one verdict rather than scattered text matches at each call site.
70
+ */
71
+ export type ResumeRefusal = "busy" | "unresumable" | "missing-message";
72
+ /**
73
+ * Classify a resume failure. Returns undefined for anything that is not a
74
+ * refusal of the resume itself (rate limits, auth, upstream faults), which
75
+ * the caller handles on its own paths.
76
+ *
77
+ * The busy refusal text arrives on stderr — the SDK error itself only carries
78
+ * the exit code — so captured stderr is part of the input.
60
79
  */
61
- export declare function isStaleSessionError(error: unknown): boolean;
80
+ export declare function classifyResumeRefusal(error: unknown, stderr?: string): ResumeRefusal | undefined;
62
81
  /**
63
82
  * Detect the CLI's bg-agent resume refusal (#630). With
64
83
  * CLAUDE_CODE_SESSION_KIND=bg (#628 scratchpad suppression) every SDK
@@ -100,11 +119,13 @@ export declare function isExtraUsageRequiredError(errMsg: string): boolean;
100
119
  * collapses into a generic api_error.
101
120
  */
102
121
  export interface SdkTermination {
103
- reason: "max_turns" | "process_exit" | "aborted" | "unknown";
122
+ reason: "max_turns" | "process_exit" | "aborted" | "upstream_idle" | "unknown";
104
123
  /** Turn count when reason=max_turns and parseable. */
105
124
  turns?: number;
106
125
  /** Exit code when reason=process_exit and parseable. */
107
126
  exitCode?: number;
127
+ /** Milliseconds the upstream was silent, when reason=upstream_idle. */
128
+ idleMs?: number;
108
129
  /** Captured "Subprocess stderr: …" tail (truncated). */
109
130
  stderrTail?: string;
110
131
  /** Truncated raw error message — set only when reason="unknown" so the log
@@ -119,6 +140,31 @@ export interface SdkTermination {
119
140
  * Returns reason="unknown" when the message doesn't match any recognized
120
141
  * pattern; callers can still log it with whatever surrounding context they have.
121
142
  */
143
+ /**
144
+ * Can a failed passthrough turn still be delivered as a tool-use response?
145
+ *
146
+ * When the PreToolUse hook already captured tool calls, the client has
147
+ * everything it needs to run them and drive the next turn — so a terminated
148
+ * turn can end as a normal `stop_reason: "tool_use"` instead of a 500 with the
149
+ * calls thrown away.
150
+ *
151
+ * `upstream_idle` qualifies for exactly the same reason as `max_turns` (#770):
152
+ * the stall killed the stream, not the work already captured. Dropping those
153
+ * calls is what leaves the model resuming against its own unfulfilled promise
154
+ * and reporting that it "forgot".
155
+ *
156
+ * `abortIsOurs` exists because the two call sites disagree, deliberately: the
157
+ * streaming path accepts an abort only when meridian raised it (a duplicate
158
+ * tool_use or an early stop), since a client disconnect must never be recorded
159
+ * as a recovered success. The non-streaming path has no client-disconnect abort
160
+ * to distinguish and passes true.
161
+ */
162
+ export declare function canRecoverCapturedToolUses(input: {
163
+ reason: SdkTermination["reason"];
164
+ passthrough: boolean;
165
+ capturedToolUses: number;
166
+ abortIsOurs: boolean;
167
+ }): boolean;
122
168
  export declare function extractSdkTermination(errMsg: string): SdkTermination;
123
169
  /**
124
170
  * Render an SdkTermination plus request context as a single greppable log line.
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/proxy/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAc1D;AAsBD;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,eAAe,CAiI7E;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAM3D;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAO3D;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAI3E;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAGxD;AAuBD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,SAAS,IAAI,MAAM,CAEhG;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAE5E;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAGjE;AAED;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IA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IACxB,WAAW,EAAE,OAAO,CAAA;CACrB,GAAG,OAAO,CAYV;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc,CAuDpE;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,CAAC,EAAE,cAAc,EACjB,GAAG,EAAE;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,GACA,MAAM,CAYR"}
@@ -1 +1 @@
1
- {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/proxy/plugins/validation.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,OAAO,CAAA;IACd,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;CACpB;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,OAAO,GAAG,gBAAgB,CAmCrE"}
1
+ {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/proxy/plugins/validation.ts"],"names":[],"mappings":"AAmBA,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,OAAO,CAAA;IACd,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;CACpB;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,OAAO,GAAG,gBAAgB,CAoCrE"}
@@ -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,S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a,CAAA;AAKpB,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAoDnG,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;AA+R7B,wBAAgB,iBAAiB,CAAC,MAAM,GAAE,OAAO,CAAC,WAAW,CAAM,GAAG,WAAW,CA2lJhF;AAWD,wBAAgB,gCAAgC,IAAI,IAAI,CAavD;AAED,wBAAsB,gBAAgB,CAAC,MAAM,GAAE,OAAO,CAAC,WAAW,CAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAmGhG"}
package/dist/server.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  runObserveHook,
12
12
  runTransformHook,
13
13
  startProxyServer
14
- } from "./cli-k36dddkm.js";
14
+ } from "./cli-fyhd8np7.js";
15
15
  import"./cli-h6hfkg3s.js";
16
16
  import"./cli-sry5aqdj.js";
17
17
  import"./cli-xmweegb1.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rynfar/meridian",
3
- "version": "1.62.0",
3
+ "version": "1.62.1",
4
4
  "description": "Local Anthropic API powered by your Claude Max subscription. One subscription, every agent.",
5
5
  "type": "module",
6
6
  "main": "./dist/server.js",