@curio-data/mcp-intelli-search 0.17.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-605%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
 
@@ -474,7 +474,11 @@ const result = await runtime.execute("intelli_research", {
474
474
  console.log(result.text);
475
475
  ```
476
476
 
477
- This example incurs inference and search charges when run with a real credential. `execute()` also accepts `intelli_search`, `intelli_extract` and `intelli_collate`, with the canonical tool parameters. Its optional third argument supplies `signal` and `onProgress`. Results contain `text`, `details` and `outcome`; execution failures throw. Degraded research remains a result. Standalone validation rejects unknown argument keys, empty queries, nonpositive or fractional `maxUrls`, arrays exceeding 100 entries, strings exceeding 2,000,000 characters and unsupported extraction statuses. Native schemas are unchanged. For manual extraction followed by collation, construct each collation item from the original `url` and `title`, `result.details.extraction` and `result.details.sourceType`, plus an explicit `status` such as `success`. Do not forward the entire extraction `details` object: its `currentness` field is not a collation input.
477
+ This example incurs inference and search charges when run with a real credential. `execute()` also accepts `intelli_search`, `intelli_extract` and `intelli_collate`, with the canonical tool parameters. Its optional third argument supplies `signal` and `onProgress`. Results contain `text`, `details` and `outcome`; execution failures throw. Degraded research remains a result.
478
+
479
+ Standalone validation rejects unknown argument keys, empty queries, nonpositive or fractional `maxUrls`, arrays exceeding 100 entries, strings exceeding 2,000,000 characters and unsupported extraction statuses. Most of these standalone validation rules are separate from the native tool schemas; the exception is the rejection of `maxUrls` values below 1, which the shared core schema also declares as `minimum: 1`, so it fails schema validation before the runtime's specific message. Positive fractional values at or above 1 still fail the standalone integer check.
480
+
481
+ For manual extraction followed by collation, construct each collation item from the original `url` and `title`, `result.details.extraction` and `result.details.sourceType`, plus an explicit `status` such as `success`. Do not forward the entire extraction `details` object: its `currentness` field is not a collation input.
478
482
 
479
483
  `mcp-intelli-search --help` and `--version` need no configuration. `--check-config` validates explicit configuration and workspace syntax without credentials or inference, returning exit status 0 for valid configuration and 1 for invalid input. Neither starts a protocol connection. `loadConfig()` throws an exported `ConfigurationError` for file defects, with a `reason` of `missing`, `unreadable`, `invalid-json` or `invalid`; workspace failures remain separate. JSON syntax diagnostics include a location without echoing file contents. The runtime entrypoint is experimental and has no published TypeScript declaration contract. Execution failures expose a safe `StandaloneError.code`: `INVALID_ARGUMENTS`, `CONFIGURATION`, `WORKSPACE`, `PROVIDER`, `OPERATION` or `CANCELLED`. Cancellation uses the `AbortError` name. Raw provider causes are deliberately not retained. Some shared operations wrap provider exceptions, which become `OPERATION` errors; protocol mapping must not depend on exact diagnostic strings.
480
484
 
@@ -569,6 +573,8 @@ For the standalone MCP server and host plugins, including exact tested versions
569
573
 
570
574
  Weekly npm downloads for both packages, stacked by package and refreshed every Monday by a scheduled GitHub Action. The native extension is the lower segment of each bar and the MCP server is the upper segment. The chart is rendered with [rough.js](https://roughjs.com) from daily caches in `data/downloads.json` and `data/downloads-mcp.json` (see `scripts/plot-downloads.mts`); the caches are append-only with a short trailing re-fetch window so npm's revisions of recent days are picked up. Only complete Monday-to-Sunday weeks are drawn, so a package's segment appears from the first refresh after its first complete week.
571
575
 
576
+ Daily counts come from npm's downloads API and are summed into weeks without additional filtering. [npm's counting documentation](https://blog.npmjs.org/post/92574016600/numeric-precision-matters-how-npm-download-counts-work.html) describes these totals as naïve by design: every served package tarball counts, including automation and mirrors, so read the bars as relative uptake, not unique-user counts. Verification runs that fetch the published tarballs from the registry, such as the registry-pin plugin checks, also count toward release-week totals.
577
+
572
578
  <p align="center">
573
579
  <picture>
574
580
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/Curio-Data/pi-intelli-search/main/docs/images/downloads-dark.svg">
@@ -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;
@@ -2242,7 +2348,16 @@ var collateSchema = Type.Object({
2242
2348
  var researchSchema = Type.Object({
2243
2349
  query: Type.String({ description: "What to research" }),
2244
2350
  maxUrls: Type.Optional(
2245
- Type.Number({ description: "Max URLs to fetch (default: 8, capped by settings.maxUrls)" })
2351
+ Type.Number({
2352
+ // Rendered by codemode as an @minimum tag since Pi 1.2.0. The MCP
2353
+ // runtime already requires a positive integer independently
2354
+ // (packages/mcp/src/runtime.ts), so the keyword formalises existing
2355
+ // behaviour there rather than adding enforcement. No "default":
2356
+ // strict-mode schema samplers reject it and the runtime default
2357
+ // lives in settings, not the schema.
2358
+ minimum: 1,
2359
+ description: "Max URLs to fetch (default: 10, capped by settings.maxUrls)"
2360
+ })
2246
2361
  ),
2247
2362
  domains: Type.Optional(
2248
2363
  Type.Array(Type.String(), { description: "Restrict search to these domains" })
package/dist/runtime.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  StandaloneError,
3
3
  createRuntime
4
- } from "./chunk-D6KE4KHG.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-D6KE4KHG.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.17.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",