@rynfar/meridian 1.67.0 → 1.69.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.
Files changed (63) hide show
  1. package/dist/{cli-35jx6vmy.js → cli-x1sv3bqf.js} +2445 -1070
  2. package/dist/{cli-n8t34zmq.js → cli-zdbv40d5.js} +45 -10
  3. package/dist/cli.js +7 -7
  4. package/dist/meridian/index.js +252 -0
  5. package/dist/meridian/package.json +6 -0
  6. package/dist/meridian-v2/index.js +334 -0
  7. package/dist/meridian-v2/package.json +6 -0
  8. package/dist/proxy/adapter.d.ts +35 -0
  9. package/dist/proxy/adapter.d.ts.map +1 -1
  10. package/dist/proxy/adapters/claudecode.d.ts +23 -0
  11. package/dist/proxy/adapters/claudecode.d.ts.map +1 -1
  12. package/dist/proxy/adapters/opencode.d.ts.map +1 -1
  13. package/dist/proxy/adapters/passthrough.d.ts.map +1 -1
  14. package/dist/proxy/adapters/pi.d.ts.map +1 -1
  15. package/dist/proxy/errors.d.ts +2 -0
  16. package/dist/proxy/errors.d.ts.map +1 -1
  17. package/dist/proxy/idleStallCeiling.d.ts +74 -0
  18. package/dist/proxy/idleStallCeiling.d.ts.map +1 -0
  19. package/dist/proxy/messages.d.ts +7 -4
  20. package/dist/proxy/messages.d.ts.map +1 -1
  21. package/dist/proxy/openai.d.ts +12 -0
  22. package/dist/proxy/openai.d.ts.map +1 -1
  23. package/dist/proxy/openaiResponses.d.ts +106 -3
  24. package/dist/proxy/openaiResponses.d.ts.map +1 -1
  25. package/dist/proxy/passthroughEarlyStop.d.ts +20 -5
  26. package/dist/proxy/passthroughEarlyStop.d.ts.map +1 -1
  27. package/dist/proxy/passthroughTools.d.ts +82 -3
  28. package/dist/proxy/passthroughTools.d.ts.map +1 -1
  29. package/dist/proxy/query.d.ts +43 -10
  30. package/dist/proxy/query.d.ts.map +1 -1
  31. package/dist/proxy/replay.d.ts +24 -0
  32. package/dist/proxy/replay.d.ts.map +1 -0
  33. package/dist/proxy/sdkFeatures.d.ts +1 -1
  34. package/dist/proxy/sdkFeatures.d.ts.map +1 -1
  35. package/dist/proxy/server.d.ts.map +1 -1
  36. package/dist/proxy/session/cache.d.ts +20 -3
  37. package/dist/proxy/session/cache.d.ts.map +1 -1
  38. package/dist/proxy/session/lineage.d.ts +73 -3
  39. package/dist/proxy/session/lineage.d.ts.map +1 -1
  40. package/dist/proxy/session/processIncarnation.d.ts +55 -0
  41. package/dist/proxy/session/processIncarnation.d.ts.map +1 -1
  42. package/dist/proxy/sessionLifecycle.d.ts +6 -0
  43. package/dist/proxy/sessionLifecycle.d.ts.map +1 -1
  44. package/dist/proxy/setup.d.ts +14 -4
  45. package/dist/proxy/setup.d.ts.map +1 -1
  46. package/dist/proxy/streamIdleGuard.d.ts +7 -3
  47. package/dist/proxy/streamIdleGuard.d.ts.map +1 -1
  48. package/dist/proxy/structuredOutput.d.ts +6 -1
  49. package/dist/proxy/structuredOutput.d.ts.map +1 -1
  50. package/dist/proxy/transforms/codex.d.ts +12 -0
  51. package/dist/proxy/transforms/codex.d.ts.map +1 -1
  52. package/dist/proxy/turnOutcome.d.ts +2 -0
  53. package/dist/proxy/turnOutcome.d.ts.map +1 -1
  54. package/dist/server.js +2 -2
  55. package/dist/{setup-8fwgwhqh.js → setup-b3ymd9z8.js} +5 -3
  56. package/dist/telemetry/index.d.ts.map +1 -1
  57. package/package.json +7 -7
  58. package/plugin/meridian/index.js +1 -0
  59. package/plugin/meridian/package.json +6 -0
  60. package/plugin/meridian-v2/index.js +1 -0
  61. package/plugin/meridian-v2/package.json +6 -0
  62. package/plugin/meridian-v2.ts +1 -1
  63. package/plugin/meridian.ts +1 -1
@@ -101,11 +101,11 @@ export type LineageResult = {
101
101
  type: "diverged";
102
102
  reason: LineageDivergenceReason;
103
103
  prefixOverlap?: number;
104
- /** Which message stopped matching. Present for modified-history, the
105
- * only divergence where the answer is both knowable and useful. */
104
+ /** Which message stopped matching, when available for a history rewrite
105
+ * or an unsafe undo boundary. */
106
106
  mismatch?: LineageMismatch;
107
107
  };
108
- export type LineageDivergenceReason = "unverifiable" | "replayed-request" | "modified-history" | "unrelated-history" | "not-found" | "independent-request" | "priority-failback" | "missing-session-header";
108
+ export type LineageDivergenceReason = "unverifiable" | "replayed-request" | "modified-history" | "undo-gap" | "unrelated-history" | "not-found" | "independent-request" | "priority-failback" | "missing-session-header" | "concurrent-race";
109
109
  /**
110
110
  * Compute a lineage hash of an ordered message array.
111
111
  * Used as a fast-path check: if the aggregate hash matches, the messages
@@ -115,6 +115,14 @@ export declare function computeLineageHash(messages: Array<{
115
115
  role: string;
116
116
  content: any;
117
117
  }>): string;
118
+ /** Matching tool IDs do not prove that the history before them is unchanged. */
119
+ export declare function matchesStoredLineagePrefix(stored: {
120
+ messageCount?: number;
121
+ lineageHash?: string;
122
+ }, messages: Array<{
123
+ role: string;
124
+ content: unknown;
125
+ }>): boolean;
118
126
  /**
119
127
  * Compute a content hash for a single message (role + normalised content).
120
128
  * Used to build per-message hash arrays for precise diff-based verification.
@@ -149,6 +157,17 @@ export interface LineageMismatch {
149
157
  previousDigest?: string;
150
158
  storedCount: number;
151
159
  incomingCount: number;
160
+ /** How many blocks the STORED message had at this index. Undefined for a
161
+ * session cached before block hashes were recorded (pre-1.61.0). */
162
+ storedBlockCount?: number;
163
+ /** Blocks the incoming message has at this index, counted over the same
164
+ * hashable domain as the stored side so the two are comparable. */
165
+ incomingBlockCount?: number;
166
+ /** What the client did to this message, when the stored block hashes make it
167
+ * decidable. Appended/dropped/rewritten are three different client bugs and
168
+ * the log could not tell them apart (#886) — which is precisely the question
169
+ * #767 turns on. */
170
+ blockChange?: "appended" | "dropped" | "rewritten" | "reordered" | "unknown";
152
171
  }
153
172
  /**
154
173
  * Locate the first message whose hash differs between a stored session and an
@@ -178,6 +197,51 @@ precomputedIncomingHashes?: string[]): LineageMismatch;
178
197
  * into a public issue.
179
198
  */
180
199
  export declare function formatLineageMismatch(mismatch: LineageMismatch): string | undefined;
200
+ /**
201
+ * Why a request skipped session lookup entirely.
202
+ *
203
+ * `independent-request` is assigned in server.ts before `classifyLineage` runs,
204
+ * so it is the one divergence that emits no diagnostic at all — and four
205
+ * unrelated causes collapse into that single silent outcome. #820 was a log
206
+ * full of `lineage=new` with zero explanatory lines; the reporter could only
207
+ * identify the bypass by reading server.ts.
208
+ *
209
+ * Naming the cause is log-only. The `LineageDivergenceReason` handed to the
210
+ * `onSession` transform hook is unchanged, so plugins switching on it are
211
+ * unaffected.
212
+ */
213
+ export type IndependentRequestCause = "fork-source" | "subagent" | "headerless-tool-result" | "no-cache-identity";
214
+ /**
215
+ * Decide whether a request bypasses session lookup, and say which rule did it.
216
+ *
217
+ * The caller derives `isIndependentSession` from this result rather than
218
+ * computing it separately, so the reported cause cannot drift away from the
219
+ * decision it explains. Evaluation order mirrors the guards' own precedence.
220
+ */
221
+ export declare function independentRequestCause(input: {
222
+ /** An explicit session key. Distinct flows carry distinct keys, so a keyed
223
+ * request cannot collide and never needs the independence guard. */
224
+ hasSessionKey: boolean;
225
+ /** `x-meridian-source: fork-*` — a declared independent sub-request flow. */
226
+ forkSource: boolean;
227
+ isSubagent: boolean;
228
+ /** The last message carries a tool_result and the request has no session
229
+ * key, so it is a self-contained round of the client's own tool loop. */
230
+ clientDrivenLoop: boolean;
231
+ /** Whether a session key or a conversation fingerprint could be derived.
232
+ * Image-only and otherwise text-free headerless requests have neither. */
233
+ hasDurableKey: boolean;
234
+ }): IndependentRequestCause | undefined;
235
+ /**
236
+ * The `diverged=` field for the request log line.
237
+ *
238
+ * The line renders `lineage=new` for every divergence without a cached
239
+ * session, so a key that never resolved, a history that did not match and a
240
+ * request that never looked are indistinguishable (#820). The reason is
241
+ * already in memory on every request; it was only reachable by writing a
242
+ * plugin. Reasons are fixed identifiers, never message content.
243
+ */
244
+ export declare function formatDivergence(result: LineageResult, cause?: IndependentRequestCause): string | undefined;
181
245
  /**
182
246
  * Compute per-message hashes for an entire message array.
183
247
  */
@@ -233,9 +297,15 @@ export declare function measureSuffixOverlap(storedHashes: string[], incomingHas
233
297
  * Decision matrix:
234
298
  * Full prefix match (fast-path) → continuation (resume from stored count)
235
299
  * Suffix overlap >= MIN_SUFFIX → compaction (resume after matched suffix)
300
+ * Trailing user slot gained blocks → continuation (resume mid-message)
236
301
  * Prefix overlap > 0, no suffix, shrank → undo (fork at rollback point)
237
302
  * Cached prefix changed while growing → diverged (fresh full-history replay)
238
303
  * No overlap → diverged (fresh full-history replay)
304
+ *
305
+ * Appended content is admissible only when the complete stored prefix is
306
+ * unchanged and the new content is delivered. Removed content is a history
307
+ * rewrite: retaining a superset can preserve instructions the client revoked.
308
+ * Known transient metadata is canonicalized by the owning agent adapter.
239
309
  */
240
310
  export declare function verifyLineage(cached: SessionState, messages: Array<{
241
311
  role: string;
@@ -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,CAAC,EAAE,MAAM,CAAA;IACtB,uBAAuB,CAAC,EAAE,MAAM,CAAA;IAChC,2BAA2B,CAAC,EAAE,MAAM,CAAA;IACpC,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,kFAAkF;AAClF,MAAM,WAAW,UAAW,SAAQ,mBAAmB;IACrD,UAAU,CAAC,EAAE,mBAAmB,EAAE,CAAA;CACnC;AAED;;6DAE6D;AAC7D,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,UAAU,GAAG,mBAAmB,CAG5E;AAED;0EAC0E;AAC1E,eAAO,MAAM,yBAAyB,IAAI,CAAA;AAE1C,MAAM,WAAW,YAAY;IAC3B,eAAe,EAAE,MAAM,CAAA;IACvB,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,EAAE,MAAM,CAAA;IACpB;;qDAEiD;IACjD,WAAW,EAAE,MAAM,CA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AAM,GAAG,SAAS,CAKpB;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,GAAG,CAAA;CAAE,CAAC,GAAG,MAAM,EAAE,CAG9F;AAOD,uEAAuE;AACvE,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,GAAG,CAAA;CAAE,CAAC,GAAG,MAAM,EAAE,EAAE,CAIrG;AAID;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,MAAM,EAAE,EAAE,cAAc,EAAE,MAAM,EAAE,GAAG,MAAM,CAQ7F;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,MAAM,EAAE,EAAE,cAAc,EAAE,MAAM,EAAE,GAAG,MAAM,CA6B7F;AAyBD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,GAAG,CAAA;CAAE,CAAC,GAC9C,aAAa,CAqLf"}
@@ -36,6 +36,61 @@ export declare function parseProcessIncarnationJson(raw: string): ProcessIncarna
36
36
  * Unknown hosts and every unavailable or malformed observation fail closed.
37
37
  */
38
38
  export declare function evaluateProcessIncarnation(owner: ProcessIncarnation, localBoot: LocalBootIdentity | undefined, observedStart: ProcessStartObservation | undefined): ProcessIncarnationProbe;
39
+ /**
40
+ * Operator-pinned host identity (#905).
41
+ *
42
+ * The derived `hostId` is wrong in both directions inside a container:
43
+ *
44
+ * - NOT STABLE. It mixes in the pid-namespace inode, which changes on every
45
+ * `docker restart`. The session store lives in the writable layer and
46
+ * survives that restart, so a proxy SIGKILLed while holding a store lock
47
+ * comes back with a different `hostId`; `probeProcessIncarnation` then
48
+ * returns `indeterminate` rather than `dead`, `retireStaleLock` refuses to
49
+ * retire it, and every request fails with `timed out waiting for lock`
50
+ * until the container is recreated. It fails toward a permanent hang.
51
+ * - NOT UNIQUE. Every container from a given image tag has a byte-identical
52
+ * `/etc/machine-id`, so `hostId` reduces to that pid-namespace inode, which
53
+ * is allocated from a fixed base at boot. Two freshly-booted hosts sharing
54
+ * a session directory can each read the other's LIVE lock as `dead` and
55
+ * retire it, deleting session resources under a running owner.
56
+ *
57
+ * Pinning it — the container ID works — fixes both. Unset outside containers,
58
+ * where the derived value is genuinely stable and unique, so nothing changes.
59
+ *
60
+ * Hashed like the derived value rather than used raw: `hostId` is compared for
61
+ * equality only, and hashing keeps a pinned value from leaking an operator's
62
+ * hostname into a lock file that is read cross-host.
63
+ */
64
+ export declare function pinnedHostIdFor(pin: string | undefined): string | undefined;
65
+ /**
66
+ * Whether this host can produce a boot identity, and what to do if it cannot.
67
+ *
68
+ * Every session-store write takes a lock stamped with a process incarnation,
69
+ * and `captureProcessIncarnation` returns undefined without a boot identity —
70
+ * so `acquireLock` throws and EVERY request that touches a session fails with a
71
+ * 500. `/health` never probed this, so a container missing `/etc/machine-id`
72
+ * reported healthy to Docker and to any orchestrator while serving nothing,
73
+ * which is why the original occurrence took three days to find (#906, split
74
+ * from #903).
75
+ *
76
+ * Exported so both the startup check and `/health` read the same source rather
77
+ * than each inferring it.
78
+ */
79
+ export interface BootIdentityStatus {
80
+ available: boolean;
81
+ platform: string;
82
+ /** Actionable next step, present only when unavailable. */
83
+ hint?: string;
84
+ }
85
+ /**
86
+ * What to tell an operator when this platform produced no boot identity.
87
+ *
88
+ * Pure and exported separately so every branch is testable without breaking the
89
+ * host it runs on. "cannot capture lock owner process incarnation" is what the
90
+ * original failure said, and it names nothing an operator can act on.
91
+ */
92
+ export declare function bootIdentityHint(platform: string): string;
93
+ export declare function describeLocalBootIdentity(): BootIdentityStatus;
39
94
  /** Parse field 22 (`starttime`) without assuming that comm contains no `)`. */
40
95
  export declare function parseLinuxProcStatStartId(raw: string, expectedPid: number): string | undefined;
41
96
  /** Capture metadata for a lock created by `pid` (normally the current process). */
@@ -1 +1 @@
1
- {"version":3,"file":"processIncarnation.d.ts","sourceRoot":"","sources":["../../../src/proxy/session/processIncarnation.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,2BAA2B,IAAI,CAAA;AAE5C,MAAM,MAAM,kBAAkB,GAC1B,wBAAwB,GACxB,kBAAkB,GAClB,qBAAqB,CAAA;AAEzB;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,2BAA2B,CAAA;IAC3C,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,kBAAkB,CAAA;CAChC;AAED,MAAM,MAAM,uBAAuB,GAAG,OAAO,GAAG,MAAM,GAAG,eAAe,CAAA;AAExE,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,MAAM,uBAAuB,GAC/B;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,kBAAkB,CAAA;CAAE,GACrE;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,GACrB;IAAE,MAAM,EAAE,eAAe,CAAA;CAAE,CAAA;AAkC/B,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,GAAG,SAAS,CAqBtF;AAED,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS,CAMvF;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,kBAAkB,EACzB,SAAS,EAAE,iBAAiB,GAAG,SAAS,EACxC,aAAa,EAAE,uBAA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,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,GAAG,SAAS,CAqBtF;AAED,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS,CAMvF;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,kBAAkB,EACzB,SAAS,EAAE,iBAAiB,GAAG,SAAS,EACxC,aAAa,EAAE,uBAAuB,GAAG,SAAS,GACjD,uBAAuB,CAsBzB;AAkGD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAG3E;AA2BD;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,OAAO,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,2DAA2D;IAC3D,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAazD;AAED,wBAAgB,yBAAyB,IAAI,kBAAkB,CAI9D;AAYD,+EAA+E;AAC/E,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAQ9F;AAsDD,mFAAmF;AACnF,wBAAgB,yBAAyB,CAAC,GAAG,SAAc,GAAG,kBAAkB,GAAG,SAAS,CAkB3F;AAED,wEAAwE;AACxE,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,kBAAkB,GAAG,uBAAuB,CAS1F;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAE3E"}
@@ -70,6 +70,12 @@ export declare function attachActiveTranscriptExecutor(lease: ActiveTranscriptLe
70
70
  export declare function releaseActiveTranscriptLease(lease: ActiveTranscriptLease, options?: SessionLifecycleOptions): Promise<void>;
71
71
  /** Persist ownership before the SDK process which can create the transcript starts. */
72
72
  export declare function prepareFork(locator: TranscriptLocator, options?: SessionLifecycleOptions): Promise<TranscriptLocator>;
73
+ /**
74
+ * Keep a new request's target alive through SDK shutdown and mapping publication.
75
+ * This is separate from the exclusive physical-writer lease. Storing it as an
76
+ * unarmed active lease also makes older collectors retain it until owner death.
77
+ */
78
+ export declare function prepareForkForPublication(locator: TranscriptLocator, options?: SessionLifecycleOptions): Promise<TranscriptLocator>;
73
79
  /** Ensure a legacy/direct-resume locator is journaled without promoting a prepared target. */
74
80
  export declare function ensureTranscriptJournaled(locator: TranscriptLocator, options?: SessionLifecycleOptions): Promise<TranscriptLocator>;
75
81
  /** Register an existing SDK transcript as Meridian-owned without a fork intent. */
@@ -1 +1 @@
1
- {"version":3,"file":"sessionLifecycle.d.ts","sourceRoot":"","sources":["../../src/proxy/sessionLifecycle.ts"],"names":[],"mappings":"AA+BA,OAAO,EAIL,KAAK,kBAAkB,EACxB,MAAM,8BAA8B,CAAA;AAiBrC,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAA;IACjB,iEAAiE;IACjE,SAAS,EAAE,MAAM,CAAA;IACjB,oEAAoE;IACpE,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,8EAA8E;IAC9E,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B;AAED,MAAM,MAAM,uBAAuB,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAA;AAmC9F,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;AAE1E,MAAM,WAAW,uBAAuB;IACtC,qEAAqE;IACrE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,cAAc,CAAA;IACxB,GAAG,CAAC,EAAE,MAAM,MAAM,CAAA;IAClB,sEAAsE;IACtE,UAAU,CAAC,EAA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B;AAED,gEAAgE;AAChE,wBAAsB,UAAU,CAC9B,OAAO,EAAE,iBAAiB,EAC1B,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,IAAI,CAAC,CAqBf;AAED;;;;;;GAMG;AACH,wBAAsB,uBAAuB,CAAC,CAAC,SAAS,OAAO,GAAG,MAAM,EACtE,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,MAAM,CAAC,EAChB,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,CAAC,CAAC,CAEZ;AAED;;;;GAIG;AACH,wBAAsB,sBAAsB,CAAC,CAAC,SAAS,OAAO,GAAG,MAAM,EACrE,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,MAAM,CAAC,EAChB,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,CAAC,CAAC,CAEZ;AA0ED,yFAAyF;AACzF,wBAAsB,WAAW,CAC/B,OAAO,EAAE,iBAAiB,EAC1B,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,IAAI,CAAC,CAsBf;AAED;;;GAGG;AACH,wBAAsB,SAAS,CAC7B,IAAI,EAAE,SAAS,iBAAiB,EAAE,EAClC,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,eAAe,CAAC,CAkG1B;AAED,4FAA4F;AAC5F,wBAAsB,KAAK,CACzB,IAAI,EAAE,SAAS,iBAAiB,EAAE,EAClC,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,QAAQ,CAAC,CAwEnB;AAw3BD,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,iBAAiB,GAAG,iBAAiB,CAQ3F;AAoDD,kFAAkF;AAClF,wBAAgB,0BAA0B,IAAI,MAAM,CAEnD"}
@@ -18,6 +18,10 @@ export declare class UnparseableConfigError extends Error {
18
18
  readonly configPath: string;
19
19
  constructor(configPath: string);
20
20
  }
21
+ export declare class MissingV1PluginError extends Error {
22
+ readonly expectedPath: string;
23
+ constructor(expectedPath: string);
24
+ }
21
25
  export declare class MissingV2PluginError extends Error {
22
26
  readonly expectedPath: string;
23
27
  constructor(expectedPath: string);
@@ -29,8 +33,14 @@ export declare class DuplicateMeridianConfigError extends Error {
29
33
  }
30
34
  export declare function findOpencodeConfigPath(): string;
31
35
  /**
32
- * Resolve the absolute path to plugin/meridian.ts from any entry point.
33
- * Works whether called from bin/cli.ts (dev) or dist/cli.js (installed).
36
+ * Resolve the V1 plugin package from any entry point. Works whether called from
37
+ * bin/cli.ts (dev) or dist/cli.js (installed).
38
+ *
39
+ * NOTE: an installed CLI must select the compiled package, not TypeScript.
40
+ * OpenCode Desktop runs its server inside Electron's Node rather than Bun, and
41
+ * Node refuses to strip types for files under node_modules
42
+ * (ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING), so a published install that
43
+ * points at plugin/meridian.ts cannot load the plugin at all.
34
44
  */
35
45
  export declare function findPluginPath(fromUrl: string): string;
36
46
  export type OpenCodeGeneration = "v1" | "v2";
@@ -39,8 +49,8 @@ export interface OpenCodeDetection {
39
49
  version?: string;
40
50
  command?: string;
41
51
  }
42
- export declare const SUPPORTED_OPENCODE_V2_VERSION = "0.0.0-beta-18314";
43
- /** Resolve the V2 plugin without selecting stale or incomplete artifacts. */
52
+ export declare const SUPPORTED_OPENCODE_V2_VERSIONS: Set<string>;
53
+ /** Resolve the V2 plugin package without selecting stale or missing entries. */
44
54
  export declare function findV2PluginPath(fromUrl: string): string;
45
55
  /** Parse the public V1 and beta V2 version formats without guessing. */
46
56
  export declare function classifyOpenCodeVersion(output: string): OpenCodeDetection | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/proxy/setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAWH;;;;GAIG;AACH,qBAAa,sBAAuB,SAAQ,KAAK;aACnB,UAAU,EAAE,MAAM;gBAAlB,UAAU,EAAE,MAAM;CAI/C;AAED,qBAAa,oBAAqB,SAAQ,KAAK;aACjB,YAAY,EAAE,MAA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B,EAAE,OAAO,CAAA;IAC1B,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,OAAO,EAAE,OAAO,CAAA;CACjB;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CACtB,UAAU,EAAE,MAAM,EAClB,UAAU,CAAC,EAAE,MAAM,EACnB,UAAU,GAAE,kBAAyB,GACpC,WAAW,CAiFb"}
@@ -14,9 +14,13 @@
14
14
  * COORDINATION CONTRACT (Pylon Orchestrator): this guard owns *model-stream*
15
15
  * liveness. Pylon's runtime stall watchdog is only a BACKSTOP for the
16
16
  * model-wait gap with no tool in flight, and keeps its abort threshold above
17
- * this guard's idle limit (default MERIDIAN_IDLE_TIMEOUT_SECONDS = 120s) so the
18
- * two layers never race to abort the same hung model. If this default rises,
19
- * re-check Pylon's STALL_ABORT_MS. See
17
+ * this guard's idle limit so the two layers never race to abort the same hung
18
+ * model. The limit is `MERIDIAN_UPSTREAM_IDLE_MS` (default 90s, set in
19
+ * server.ts); Pylon warns at 120s and aborts at 180s. Any override must stay
20
+ * BELOW Pylon's STALL_ABORT_MS; raising it past 180s requires changing Pylon
21
+ * first.
22
+ * Note `MERIDIAN_IDLE_TIMEOUT_SECONDS` is a different knob — the HTTP
23
+ * keep-alive timeout — and has no bearing on this contract. See
20
24
  * pylon-orchestrator/docs/circuit/specs/stall-watchdog-tool-exempt.md.
21
25
  */
22
26
  export declare class UpstreamIdleError extends Error {
@@ -1 +1 @@
1
- {"version":3,"file":"streamIdleGuard.d.ts","sourceRoot":"","sources":["../../src/proxy/streamIdleGuard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;gBAChB,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM;CAMhD;AAED,2DAA2D;AAC3D,KAAK,eAAe,GAAG,U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,EAAE,MAAM,KAAK,IAAI,EACvC,KAAK,GAAE,cAA0B,GAChC,cAAc,CAAC,CAAC,CAAC,CA4CnB"}
@@ -15,7 +15,12 @@ export type OutputFormatParseResult = {
15
15
  * mode buffers the SDK's wire events and replaces the response content with the
16
16
  * validated result, so a tool_use turn would be swallowed and the client-driven
17
17
  * tool loop would never see it.
18
+ *
19
+ * `dialect` selects which spelling errors name. The OpenAI endpoint translates
20
+ * `response_format` into this shape before validating, so it asks for its own
21
+ * field paths and errors point at what the client actually sent.
18
22
  */
19
- export declare function parseOutputFormat(outputConfig: unknown, tools?: unknown): OutputFormatParseResult;
23
+ export type OutputFormatDialect = "anthropic" | "openai";
24
+ export declare function parseOutputFormat(outputConfig: unknown, tools?: unknown, dialect?: OutputFormatDialect): OutputFormatParseResult;
20
25
  export declare function structuredOutputText(value: unknown): string;
21
26
  //# sourceMappingURL=structuredOutput.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"structuredOutput.d.ts","sourceRoot":"","sources":["../../src/proxy/structuredOutput.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAA;AAElE,MAAM,MAAM,uBAAuB,GAC/B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,YAAY,GAAG,SAAS,CAAA;CAAE,GAC7C;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAA;AAMlC;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,YAAY,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,uBAAuB,CAyBjG;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAE3D"}
1
+ {"version":3,"file":"structuredOutput.d.ts","sourceRoot":"","sources":["../../src/proxy/structuredOutput.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAA;AAElE,MAAM,MAAM,uBAAuB,GAC/B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,YAAY,GAAG,SAAS,CAAA;CAAE,GAC7C;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAA;AAMlC;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,mBAAmB,GAAG,WAAW,GAAG,QAAQ,CAAA;AAexD,wBAAgB,iBAAiB,CAC/B,YAAY,EAAE,OAAO,EACrB,KAAK,CAAC,EAAE,OAAO,EACf,OAAO,GAAE,mBAAiC,GACzC,uBAAuB,CA0BzB;AAuBD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAE3D"}
@@ -8,5 +8,17 @@ import type { Transform } from "../transform";
8
8
  * global MERIDIAN_PASSTHROUGH setting. Internal mode (SDK executes tools) would
9
9
  * leave Codex waiting for tool calls that never come back.
10
10
  */
11
+ /**
12
+ * Codex sends every MCP server as a `namespace` entry with the tool
13
+ * definitions inline, so a desktop session easily carries 250+ tools and
14
+ * crosses the auto-defer threshold. Deferring them is a net loss here: the
15
+ * deferred budget lifts the single-turn cap (see computePassthroughMaxTurns),
16
+ * so every tool-calling turn also generates the SDK's discarded digest turn —
17
+ * one or two extra reads of the full context, measured 2-3x cache reads per
18
+ * turn on a 680k-token session — while the alternative, loading the schemas,
19
+ * costs ~125k cached tokens once. Codex never sets `defer_loading` itself, so
20
+ * with no core set auto-defer stays off, the cap stays at 1, and a tool turn
21
+ * is one model call again.
22
+ */
11
23
  export declare const codexTransforms: Transform[];
12
24
  //# sourceMappingURL=codex.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"codex.d.ts","sourceRoot":"","sources":["../../../src/proxy/transforms/codex.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAkB,MAAM,cAAc,CAAA;AAE7D;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,EAQtC,CAAA"}
1
+ {"version":3,"file":"codex.d.ts","sourceRoot":"","sources":["../../../src/proxy/transforms/codex.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAkB,MAAM,cAAc,CAAA;AAE7D;;;;;;;;GAQG;AACH;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,EAQtC,CAAA"}
@@ -68,6 +68,8 @@ export declare function classifyTurnOutcome(input: {
68
68
  /** Blocks forwarded in total, including thinking. */
69
69
  blocksForwarded: number;
70
70
  }): TurnOutcome;
71
+ /** A capped response can retain prose, but cannot authorize an uncaptured call. */
72
+ export declare function hasTruncatableText(blocks: readonly unknown[]): boolean;
71
73
  /**
72
74
  * The nudge sent to recover a silent turn, in the same SDK session.
73
75
  *
@@ -1 +1 @@
1
- {"version":3,"file":"turnOutcome.d.ts","sourceRoot":"","sources":["../../src/proxy/turnOutcome.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,qDAAqD;AACrD,MAAM,MAAM,WAAW,GACnB;IAAE,IAAI,EAAE,YAAY,CAAA;CAAE,GACtB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,YAAY,CAAA;CAAE,CAAA;AAE5C;;;;GAIG;AACH,MAAM,MAAM,YAAY;AACtB,iDAAiD;AAC/C,WAAW;AACb,2EAA2E;GACzE,uBAAuB,CAAA;AAE3B;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE;IACzC,gFAAgF;IAChF,UAAU,EAAE,MAAM,CAAA;IAClB,0EAA0E;IAC1E,QAAQ,EAAE,MAAM,CAAA;IAChB,qDAAqD;IACrD,eAAe,EAAE,MAAM,CAAA;CACxB,GAAG,WAAW,CAOd;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,QAIuC,CAAA;AAErE;;;;;;;;;;;;;;;;;;;;;;GAsBG;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rG,GACD;IACE,IAAI,EAAE,YAAY,CAAA;IAClB,KAAK,EAAE;QAAE,IAAI,EAAE,qBAAqB,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE;YAAE,IAAI,EAAE,YAAY,CAAC;YAAC,IAAI,EAAE,OAAO,CAAA;SAAE,CAAA;KAAE,CAAA;IACnG,yEAAyE;IACzE,SAAS,EAAE,MAAM,CAAA;CAClB,GACD;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,KAAK,EAAE;QAAE,IAAI,EAAE,oBAAoB,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAAA;AAEhF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,CAAC,kBAAkB,EAAE,MAAM,MAAM,GAAG;IACtE,IAAI,CAAC,UAAU,EAAE,OAAO,GAAG,YAAY,GAAG,SAAS,CAAA;CACpD,CAgCA;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE;IAC3C,OAAO,EAAE,WAAW,CAAA;IACpB,gBAAgB,EAAE,OAAO,CAAA;IACzB,UAAU,EAAE,OAAO,CAAA;IACnB,+EAA+E;IAC/E,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,OAAO,CAAA;CACjB,GAAG,OAAO,CAMV"}
package/dist/server.js CHANGED
@@ -11,14 +11,14 @@ import {
11
11
  runObserveHook,
12
12
  runTransformHook,
13
13
  startProxyServer
14
- } from "./cli-35jx6vmy.js";
14
+ } from "./cli-x1sv3bqf.js";
15
15
  import"./cli-5jxyma6z.js";
16
16
  import"./cli-sry5aqdj.js";
17
17
  import"./cli-8yp89fan.js";
18
18
  import"./cli-9e5cxp89.js";
19
19
  import"./cli-khhjyk04.js";
20
20
  import"./cli-vj9cv18n.js";
21
- import"./cli-n8t34zmq.js";
21
+ import"./cli-zdbv40d5.js";
22
22
  import"./cli-p9swy5t3.js";
23
23
  export {
24
24
  startProxyServer,
@@ -1,7 +1,8 @@
1
1
  import {
2
2
  DuplicateMeridianConfigError,
3
+ MissingV1PluginError,
3
4
  MissingV2PluginError,
4
- SUPPORTED_OPENCODE_V2_VERSION,
5
+ SUPPORTED_OPENCODE_V2_VERSIONS,
5
6
  UnparseableConfigError,
6
7
  checkPluginConfigured,
7
8
  classifyOpenCodeVersion,
@@ -13,7 +14,7 @@ import {
13
14
  notePluginlessOpenCodeRequest,
14
15
  pluginPathForGeneration,
15
16
  runSetup
16
- } from "./cli-n8t34zmq.js";
17
+ } from "./cli-zdbv40d5.js";
17
18
  import"./cli-p9swy5t3.js";
18
19
  export {
19
20
  runSetup,
@@ -27,7 +28,8 @@ export {
27
28
  classifyOpenCodeVersion,
28
29
  checkPluginConfigured,
29
30
  UnparseableConfigError,
30
- SUPPORTED_OPENCODE_V2_VERSION,
31
+ SUPPORTED_OPENCODE_V2_VERSIONS,
31
32
  MissingV2PluginError,
33
+ MissingV1PluginError,
32
34
  DuplicateMeridianConfigError
33
35
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/telemetry/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAgCnE,eAAO,MAAM,cAAc,EAAE,eAAkC,CAAA;AAC/D,eAAO,MAAM,aAAa,EAAE,mBAAwC,CAAA;AAEpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAC9C,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAC7C,YAAY,EACV,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,eAAe,EACf,mBAAmB,EACnB,aAAa,GACd,MAAM,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/telemetry/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AA2CnE,eAAO,MAAM,cAAc,EAAE,eAAkC,CAAA;AAC/D,eAAO,MAAM,aAAa,EAAE,mBAAwC,CAAA;AAEpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAC9C,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAC7C,YAAY,EACV,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,eAAe,EACf,mBAAmB,EACnB,aAAa,GACd,MAAM,SAAS,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rynfar/meridian",
3
- "version": "1.67.0",
3
+ "version": "1.69.0",
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",
@@ -21,17 +21,17 @@
21
21
  "scripts": {
22
22
  "start": "./bin/claude-proxy-supervisor.sh",
23
23
  "proxy": "./bin/claude-proxy-supervisor.sh",
24
- "build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && bun build bin/cli.ts src/proxy/server.ts plugin/meridian-v2.ts --outdir dist --target node --splitting --external @anthropic-ai/claude-agent-sdk --external jsonc-parser --entry-naming \"[name].js\" && tsc -p tsconfig.build.json",
25
- "postbuild": "node scripts/fix-bun-exports.mjs && node --check dist/cli.js && node --check dist/server.js && node --check dist/meridian-v2.js && node -e \"if(!require('fs').existsSync('dist/proxy/server.d.ts'))process.exit(1)\"",
24
+ "build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && bun build bin/cli.ts src/proxy/server.ts plugin/meridian-v2.ts --outdir dist --target node --splitting --external @anthropic-ai/claude-agent-sdk --external jsonc-parser --entry-naming \"[name].js\" && bun build plugin/meridian/index.js --outdir dist/meridian --target node --splitting --external @anthropic-ai/claude-agent-sdk --external jsonc-parser --entry-naming \"[name].js\" && bun build plugin/meridian-v2/index.js --outdir dist/meridian-v2 --target node --splitting --external @anthropic-ai/claude-agent-sdk --external jsonc-parser --entry-naming \"[name].js\" && node scripts/package-opencode-plugins.mjs && tsc -p tsconfig.build.json",
25
+ "postbuild": "node scripts/fix-bun-exports.mjs && node --check dist/cli.js && node --check dist/server.js && node --check dist/meridian-v2.js && node --check dist/meridian/index.js && node --check dist/meridian-v2/index.js && node -e \"if(!require('fs').existsSync('dist/proxy/server.d.ts'))process.exit(1)\"",
26
26
  "postinstall": "node -e \"try{require('child_process').spawnSync(process.execPath,[require.resolve('@anthropic-ai/claude-code/install.cjs')],{stdio:'inherit'})}catch(e){console.error('[meridian] claude-code postinstall skipped:',e.message)}\"",
27
27
  "prepublishOnly": "bun run build",
28
- "test": "bun test --path-ignore-patterns '**/*session-store*' --path-ignore-patterns '**/*priority-routing-integration*' --path-ignore-patterns '**/*proxy-async-ops*' --path-ignore-patterns '**/*models-auth-status*' --path-ignore-patterns '**/*proxy-context-usage-store*' --path-ignore-patterns '**/*proxy-passthrough-thinking*' --path-ignore-patterns '**/*proxy-thinking-setting*' --path-ignore-patterns '**/*session-recovery*' --path-ignore-patterns '**/*models.test*' --path-ignore-patterns '**/*proxy-health-build*' && bun test src/__tests__/proxy-async-ops.test.ts && bun test src/__tests__/proxy-session-store.test.ts && bun test src/__tests__/session-store-pruning.test.ts && bun test src/__tests__/proxy-session-store-locking.test.ts && bun test src/__tests__/proxy-context-usage-store.test.ts && bun test src/__tests__/models-auth-status.test.ts && bun test src/__tests__/proxy-passthrough-thinking.test.ts && bun test src/__tests__/proxy-session-recovery.test.ts && bun test src/__tests__/proxy-thinking-setting.test.ts && bun test src/__tests__/models.test.ts && bun test src/__tests__/proxy-health-build.test.ts && bun test src/__tests__/priority-routing-integration.test.ts",
28
+ "test": "bun test --timeout 30000 --path-ignore-patterns '**/*session-store*' --path-ignore-patterns '**/*session-fingerprint-context*' --path-ignore-patterns '**/*priority-routing-integration*' --path-ignore-patterns '**/*proxy-async-ops*' --path-ignore-patterns '**/*models-auth-status*' --path-ignore-patterns '**/*proxy-context-usage-store*' --path-ignore-patterns '**/*proxy-passthrough-thinking*' --path-ignore-patterns '**/*proxy-thinking-setting*' --path-ignore-patterns '**/*session-recovery*' --path-ignore-patterns '**/*models.test*' --path-ignore-patterns '**/*proxy-health-build*' && bun test --timeout 30000 src/__tests__/proxy-async-ops.test.ts && bun test --timeout 30000 src/__tests__/proxy-session-store.test.ts && bun test --timeout 30000 src/__tests__/session-store-pruning.test.ts && bun test --timeout 30000 src/__tests__/proxy-session-store-locking.test.ts && bun test --timeout 30000 src/__tests__/session-fingerprint-context.test.ts && bun test --timeout 30000 src/__tests__/proxy-context-usage-store.test.ts && bun test --timeout 30000 src/__tests__/models-auth-status.test.ts && bun test --timeout 30000 src/__tests__/proxy-passthrough-thinking.test.ts && bun test --timeout 30000 src/__tests__/proxy-session-recovery.test.ts && bun test --timeout 30000 src/__tests__/proxy-thinking-setting.test.ts && bun test --timeout 30000 src/__tests__/models.test.ts && bun test --timeout 30000 src/__tests__/proxy-health-build.test.ts && bun test --timeout 30000 src/__tests__/priority-routing-integration.test.ts",
29
29
  "nix:lock": "bun2nix -o bun.nix",
30
30
  "typecheck": "tsc --noEmit",
31
31
  "proxy:direct": "bun run ./bin/cli.ts"
32
32
  },
33
33
  "dependencies": {
34
- "@anthropic-ai/claude-agent-sdk": "^0.2.117",
34
+ "@anthropic-ai/claude-agent-sdk": "^0.2.141",
35
35
  "@anthropic-ai/claude-code": "^2.1.257",
36
36
  "cross-spawn": "7.0.6",
37
37
  "jsonc-parser": "^3.3.1",
@@ -39,14 +39,14 @@
39
39
  "zod": "4.4.3"
40
40
  },
41
41
  "devDependencies": {
42
- "@hono/node-server": "^1.19.11",
42
+ "@hono/node-server": "^1.19.15",
43
43
  "@opencode-ai/plugin": "0.0.0-beta-18314",
44
44
  "@types/bun": "^1.3.11",
45
45
  "@types/cross-spawn": "6.0.6",
46
46
  "@types/node": "^22.0.0",
47
47
  "bun2nix": "^2.0.8",
48
48
  "glob": "^13.0.0",
49
- "hono": "^4.11.4",
49
+ "hono": "^4.12.34",
50
50
  "typescript": "^5.8.2"
51
51
  },
52
52
  "files": [
@@ -0,0 +1 @@
1
+ export { default } from "../meridian.ts"
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "@rynfar/meridian-opencode-v1-plugin",
3
+ "private": true,
4
+ "type": "module",
5
+ "main": "./index.js"
6
+ }
@@ -0,0 +1 @@
1
+ export { default } from "../meridian-v2.ts"
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "@rynfar/meridian-opencode-v2-plugin",
3
+ "private": true,
4
+ "type": "module",
5
+ "main": "./index.js"
6
+ }
@@ -25,7 +25,7 @@ import {
25
25
  type MutableHeaders,
26
26
  } from "./priority-attestation"
27
27
 
28
- /** Exact V2 host used to compile and validate this beta-only integration. */
28
+ /** SDK contract used to compile this plugin; setup gates separately validated host versions. */
29
29
  export const SUPPORTED_OPENCODE_V2_VERSION = "0.0.0-beta-18314"
30
30
 
31
31
  const MERIDIAN_PROVIDERS = new Set(["anthropic", "meridian"])
@@ -11,7 +11,7 @@
11
11
  * meridian setup
12
12
  *
13
13
  * Or manually add to ~/.config/opencode/opencode.json:
14
- * { "plugin": ["/absolute/path/to/plugin/meridian.ts"] }
14
+ * { "plugin": ["/absolute/path/to/dist/meridian"] }
15
15
  */
16
16
 
17
17
  import {