@curio-data/mcp-intelli-search 0.18.0 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  [![npm downloads](https://img.shields.io/npm/dt/@curio-data/mcp-intelli-search?color=blue)](https://www.npmjs.com/package/@curio-data/mcp-intelli-search)
7
7
  [![node](https://img.shields.io/badge/node-%E2%89%A522-blue)](https://nodejs.org/)
8
8
  [![license](https://img.shields.io/badge/license-Apache--2.0-green)](https://github.com/Curio-Data/pi-intelli-search/blob/main/LICENSE)
9
- ![tests](https://img.shields.io/badge/test%3Aall-608%20passing-brightgreen)
9
+ ![tests](https://img.shields.io/badge/test%3Aall-653%20passing-brightgreen)
10
10
 
11
11
  Intelligent web research for coding agents: search, extract, collate, and cache grounded web context in one tool call.
12
12
 
@@ -250,9 +250,115 @@ async function withRetry(fn, classify, opts) {
250
250
  if (threw) throw lastError;
251
251
  return lastResult;
252
252
  }
253
- var RETRYABLE_RE = /\b(429|rate[ _-]?limited?|too many requests|overloaded|server error|server[ _-]?busy|currently busy|service unavailable|temporarily unavailable|500|502|503|504|timed? ?out|timeout|ETIMEDOUT|ECONNRESET|ECONNREFUSED|EAI_AGAIN)\b/i;
253
+ var NON_RETRYABLE_LIMIT_PATTERNS = [
254
+ // Subscription or account limits returned as 429 JSON error types. These are
255
+ // permanent for the purposes of a retry loop, not transient throttles.
256
+ "GoUsageLimitError",
257
+ "FreeUsageLimitError",
258
+ "Monthly usage limit reached",
259
+ "available balance",
260
+ // Generic quota/budget/billing exhaustion. `insufficient_quota` is OpenAI's
261
+ // quota/billing error code; the other strings cover common gateway wording.
262
+ "insufficient_quota",
263
+ "out of budget",
264
+ "quota exceeded",
265
+ "billing",
266
+ // Sign in with ChatGPT: the subscription's shared usage limit, which resets
267
+ // after hours rather than seconds.
268
+ "subscription_sharing_usage_limit_exceeded"
269
+ ];
270
+ var RETRYABLE_PATTERNS = [
271
+ // Generic provider load, HTTP status, and server-side transient failures.
272
+ "overloaded",
273
+ "server_busy",
274
+ "servers are currently busy",
275
+ "currently experiencing high demand",
276
+ "model is at capacity",
277
+ "rate.?limit",
278
+ "too many requests",
279
+ // Deliberate divergence from upstream: the bare status codes keep word
280
+ // boundaries. The host filters context-overflow errors before classifying,
281
+ // so upstream can match bare digits; this policy has no such pre-filter, and
282
+ // an unbounded "502" would retry a permanent context-length error whose
283
+ // token counts embed a matching run (for example "150293 tokens").
284
+ "\\b(?:429|500|502|503|504|520|524)\\b",
285
+ // Also matches "The service is temporarily unavailable" (pi #10965).
286
+ "service.?(?:is.?)?(?:temporarily.?)?unavailable",
287
+ "server.?error",
288
+ "internal.?error",
289
+ // Wrapper/provider text for transient upstream failures, including OpenRouter
290
+ // "Provider returned error" responses (pi #2264) and gateway wording such as
291
+ // "The upstream provider returned an error" (pi #10842).
292
+ "provider.?returned.?(?:an.?)?error",
293
+ "exceeded request buffer limit while retrying upstream",
294
+ // Gateway failure relaying the upstream response stream, sent as an OpenAI
295
+ // Responses `response.failed` event without an error code (pi #10920).
296
+ "unable to forward upstream",
297
+ // Network, proxy, and fetch transport failures, including raw-fetch failures
298
+ // such as "upstream connect", "connection refused", and "reset before
299
+ // headers" (pi #733), plus OpenRouter connection drops (pi #3317).
300
+ "network.?error",
301
+ "connection.?error",
302
+ "connection.?refused",
303
+ "connection.?lost",
304
+ "other side closed",
305
+ "fetch failed",
306
+ "getaddrinfo",
307
+ "ENOTFOUND",
308
+ "EAI_AGAIN",
309
+ "upstream.?connect",
310
+ "reset before headers",
311
+ "socket hang up",
312
+ "socket connection was closed",
313
+ "timed? out",
314
+ "timeout",
315
+ "terminated",
316
+ // Raw Node transport codes observed on the OpenRouter path; upstream matches
317
+ // the prose forms above but not these codes.
318
+ "ETIMEDOUT",
319
+ "ECONNRESET",
320
+ "ECONNREFUSED",
321
+ // Bare "temporarily unavailable" without a "service" prefix: the standalone
322
+ // OpenRouter adapter uses this wording for a 402 carrying a valid Retry-After
323
+ // header (in-flight spending budget), which is transient.
324
+ "temporarily.?unavailable",
325
+ // Separator-tolerant busy phrasings retained from the pre-alignment
326
+ // classifier; upstream lists only "server_busy" and
327
+ // "servers are currently busy".
328
+ "server[ _-]?busy",
329
+ "currently busy",
330
+ // WebSocket transports can report close/error text instead of HTTP/fetch text.
331
+ "websocket.?closed",
332
+ "websocket.?error",
333
+ // Premature stream endings from SDKs and transports (pi #4433, #3594).
334
+ "ended without",
335
+ "stream ended before message_stop",
336
+ "stream ended before a terminal response event",
337
+ "http2 request did not get a response",
338
+ // Node ERR_HTTP2_STREAM_CANCEL: the HTTP/2 session died before the request
339
+ // was sent, for example after the Bedrock SDK's session timeout (pi #10379).
340
+ "pending stream has been canceled",
341
+ // Provider-requested retry delay cap failures flow through the outer retry
342
+ // policy so callers can surface or abort the backoff (pi #1123).
343
+ "retry delay",
344
+ // Explicit retry guidance emitted mid-stream by OpenAI Responses and Bedrock
345
+ // stream exceptions (pi #6019).
346
+ "you can retry your request",
347
+ "try your request again",
348
+ "please retry your request",
349
+ // gRPC based providers (for example NVIDIA NIM).
350
+ "ResourceExhausted",
351
+ // Sign in with ChatGPT: usage or user data temporarily unavailable. Usage
352
+ // failures can arrive mid-stream without an HTTP 503 in the message.
353
+ "subscription_sharing_usage_unavailable",
354
+ "subscription_sharing_user_unavailable"
355
+ ];
356
+ var NON_RETRYABLE_LIMIT_RE = new RegExp(NON_RETRYABLE_LIMIT_PATTERNS.join("|"), "i");
357
+ var RETRYABLE_RE = new RegExp(RETRYABLE_PATTERNS.join("|"), "i");
254
358
  function isRetryableMessage(msg) {
255
- return !!msg && RETRYABLE_RE.test(msg);
359
+ if (!msg) return false;
360
+ if (NON_RETRYABLE_LIMIT_RE.test(msg)) return false;
361
+ return RETRYABLE_RE.test(msg);
256
362
  }
257
363
  function parseRetryAfterMs(msg) {
258
364
  if (!msg) return void 0;
package/dist/runtime.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  StandaloneError,
3
3
  createRuntime
4
- } from "./chunk-ZDA2NLLR.js";
4
+ } from "./chunk-XGQZ3IDP.js";
5
5
  import {
6
6
  ConfigurationError,
7
7
  identity,
package/dist/server.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  extractSchema,
9
9
  researchSchema,
10
10
  searchSchema
11
- } from "./chunk-ZDA2NLLR.js";
11
+ } from "./chunk-XGQZ3IDP.js";
12
12
  import {
13
13
  ConfigurationError,
14
14
  identity
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curio-data/mcp-intelli-search",
3
- "version": "0.18.0",
3
+ "version": "0.19.0",
4
4
  "description": "Standalone intelligent web research engine and Model Context Protocol stdio server.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",