mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-04 06:12:10 +03:00
* fix(ci): add the auto-enqueue pull_request_rule to the Mergify config (queue_conditions alone are eligibility-only) (#7179) * fix(ci): migrate Mergify auto-enqueue to merge_protections_settings.auto_merge_conditions (rules-based path is EOL 2026-07-16) (#7216) * fix(ci): drop Mergify batch settings (batching is a paid-tier feature; free plan queue is serial) (#7220) * fix(ci): merge queue tolerates the advisory dast-smoke failure (its GH-hosted build hang dequeued every attempt) (#7225) * feat: add protobuf+WS helpers and tests for muse-spark-web Co-Authored-By: Claude <noreply@anthropic.com> * fix: remove 50ms auto-close timer from wsChat, fix test mock to respond properly The 50ms setTimeout in wsChat sent a close signal before the server could respond. Tests now trigger a response event from the mock's send() and then close naturally. wsChat waits indefinitely (or until timeout) for real server data. Co-Authored-By: Claude <noreply@anthropic.com> * fix(provider): migrate muse-spark-web from GraphQL to WebSocket protocol Meta AI retired the persisted query (doc_id 29ae946c...) that OmniRoute used for message sending. The AttachmentInput type was removed from Meta's GraphQL schema, causing 502 errors on every request. Replace the old GraphQL POST approach with Meta's current protocol: 1. GraphQL warmup (doc_id e7f80258...) — init conversation 2. GraphQL mode switch (doc_id c32bbe99...) — set think_fast/think_hard 3. WebSocket (wss://gateway.meta.ai/ws/clippy) — protobuf-framed messaging All frame encoding uses inline protobuf helpers (no new deps). The existing continuation cache, model mapping, and response formatters are preserved. Fixes #7267 Co-Authored-By: Claude <noreply@anthropic.com> * fix: add warmup+mode-switch GraphQL calls and Buffer ESM import Also moves modelInfo extraction earlier so mode-switch can use it. Co-Authored-By: Claude <noreply@anthropic.com> * fix: share requestId between WS URL and prompt frame, add auth fallback - Pass requestId from wsChat into buildWsPromptFrame so both the WS URL and the prompt frame use the same identifier, matching Meta's protocol. - Add fallback to extract the ecto1:... authorization token from the apiKey cookie string when providerSpecificData.authorization is not set. This lets users paste both the cookie and auth token in OmniRouter's single input field (e.g. 'ecto_1_sess=...; ecto1:...'). Co-Authored-By: Claude <noreply@anthropic.com> * fix: address Gemini Code Review findings on PR #7528 - AbortSignal: graphqlPost now accepts and propagates signal to fetch, warmup and mode-switch calls pass the caller's signal. - GraphQL errors: parse response body for errors array on HTTP 200. - Abort listener leak: store handler reference and removeEventListener on settle, instead of relying solely on { once: true }. - Binary WS frames: decode Buffer/ArrayBuffer/Uint8Array to UTF-8. - Test: add test for GraphQL error-in-200 detection. Co-Authored-By: Claude <noreply@anthropic.com> * fix: narrow ProtoField value before BigInt in serializeProtoFields setBigUint64(0, BigInt(f.value)) failed tsc TS2345 because f.value's union includes Uint8Array. Wire type 1 always carries a numeric value; guard the Uint8Array case with a clear throw instead of coercing. Co-Authored-By: Claude <noreply@anthropic.com> * refactor: remove dead readTextResponse from muse-spark-web Unused since the WebSocket migration dropped body-streaming reads. The identically named live copy in blackbox-web.ts is untouched. Co-Authored-By: Claude <noreply@anthropic.com> * refactor: remove dead postMetaAiRequest from muse-spark-web Replaced by the WebSocket send path; no remaining call sites. Co-Authored-By: Claude <noreply@anthropic.com> * refactor: remove dead buildHttpErrorResult/buildParsedErrorResult Both were part of the retired GraphQL-POST error path; the WebSocket path builds errors via errorResult directly. No remaining call sites. Co-Authored-By: Claude <noreply@anthropic.com> * test: nest connectionId overrides into credentials Four tests passed connectionId at the top level of makeBaseInput, where the spread never reached credentials.connectionId that execute reads -- so they silently ran against the default conn-test-1 instead of their named ids. Add a withConnection helper and route them through it. Co-Authored-By: Claude <noreply@anthropic.com> * docs: document template fingerprint fields verified STATIC vs live capture Live WS captures from two independent meta.ai accounts confirm the 64-hex session token, actor numeric ID, locale, and app ID are app-level constants — identical in Meta's own client. No fingerprint randomization warranted. Co-Authored-By: Claude <noreply@anthropic.com> * fix: address code review — NaN uniqueMsgId, varint truncation, cache eviction, empty WS 502 - uniqueMessageId: use Math.random() decimal suffix instead of crypto.randomUUID().slice(0,4) which produced NaN ~80% of the time (UUID hex chars like 'a'-'f' break Number()). - encodeVarint: use BigInt arithmetic instead of >>> bitwise operators that truncated 41-bit Date.now() timestamps to 32 bits (lost minutes). - submittedMs: use ?? instead of || so valid zero timestamps are accepted. - Cache eviction: add evictContinuationIfNeeded on WS error path (was missing, letting stale conversation entries survive WS failures). - Empty WS response: return 502 instead of 200 when WS closes with no content, matching the old parseMetaAiResponseText behavior. Co-Authored-By: Claude <noreply@anthropic.com> * chore(7528): keep .mergify.yml at release tip (maintainer CI config lands via its own PRs, not this provider fix) Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --------- Co-authored-by: Diego Rodrigues de Sa e Souza <8016841+diegosouzapw@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Diego Rodrigues de Sa e Souza <diegosouza.pw@gmail.com>