@hunt-labs/bytekit-mcp 0.3.8 → 0.3.9

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/CHANGELOG.md CHANGED
@@ -10,6 +10,23 @@ today, see [README.md](./README.md), which remains the authoritative usage guide
10
10
 
11
11
  ## [Unreleased]
12
12
 
13
+ ## [0.3.9] - 2026-09-18
14
+
15
+ ### Changed
16
+
17
+ - Refreshed the bundled documentation snapshot after a `GET /v1/bulk/{id}/screenshots` item
18
+ started carrying `billing: null` while its `status` is not `completed` (#4582). Bundled content
19
+ only: no tool, schema or transport change.
20
+ - Refreshed the bundled documentation snapshot after `POST /v1/schema` started rejecting
21
+ slow-path rendering options with error code `unsupported_option` instead of `unsupported_url`
22
+ (#4584); the bundled `createschemaextraction` page names the new code. Bundled content only: no
23
+ tool, schema or transport change.
24
+ - Dropped the `changelog` page from the bundled documentation snapshot (#4675): the page
25
+ concatenated four package `CHANGELOG.md` files into one entry, making it the single most
26
+ merge-collided entry in the bundle. `search_docs`'s description no longer describes a bounded
27
+ window into release history; it now says release history isn't bundled at all and points to
28
+ the public changelog page instead.
29
+
13
30
  ## [0.3.8] - 2026-09-17
14
31
 
15
32
  ### Changed
@@ -7,7 +7,9 @@
7
7
  * caller's context, and the bundle itself ships inside the published `@hunt-labs/bytekit-mcp`
8
8
  * tarball and the gateway Docker image. Both costs are per-entry, so both are bounded per-entry.
9
9
  * At 96d5f3873 the generated `changelog` page was 135,687 bytes — 46.5% of the whole bundle and
10
- * 14× the largest other page — and `get_doc("changelog")` handed all of it back uncapped.
10
+ * 14× the largest other page — and `get_doc("changelog")` handed all of it back uncapped. Issue
11
+ * #4675 later dropped the changelog page from the bundle entirely; the bound stays as the
12
+ * general per-entry safeguard, sized against whatever page grows past it next.
11
13
  *
12
14
  * WHY 16 KiB, AND WHY PER-ENTRY
13
15
  * -----------------------------
@@ -7,7 +7,9 @@
7
7
  * caller's context, and the bundle itself ships inside the published `@hunt-labs/bytekit-mcp`
8
8
  * tarball and the gateway Docker image. Both costs are per-entry, so both are bounded per-entry.
9
9
  * At 96d5f3873 the generated `changelog` page was 135,687 bytes — 46.5% of the whole bundle and
10
- * 14× the largest other page — and `get_doc("changelog")` handed all of it back uncapped.
10
+ * 14× the largest other page — and `get_doc("changelog")` handed all of it back uncapped. Issue
11
+ * #4675 later dropped the changelog page from the bundle entirely; the bound stays as the
12
+ * general per-entry safeguard, sized against whatever page grows past it next.
11
13
  *
12
14
  * WHY 16 KiB, AND WHY PER-ENTRY
13
15
  * -----------------------------
@@ -137,7 +137,7 @@
137
137
  "api/schema/createschemaextraction": {
138
138
  "title": "Schema-driven structured extraction",
139
139
  "section": "API Reference",
140
- "body": "# Schema-driven structured extraction\n\nFetches `url` and extracts structured JSON conforming to the supplied\nJSON Schema (draft 2020-12) using an LLM. Fast-path only — slow-path\nrendering options (`wait_until=networkidle`, `delay_ms`,\n`wait_for_selector`) cause a `400 unsupported_url`.\n\nDual-axis billing: a fixed per-request credit charge **plus** the\nunderlying page's bandwidth, billed exactly like `/v1/scrape`. The\nbandwidth is still billed when the scrape succeeds but extraction later\nfails; both axes are refunded only when the scrape itself never runs.\n\nAvailability is gated by a server-side feature flag; when disabled the\nendpoint returns `404`.\n\n**POST** `/v1/schema`\n\n## Request Body\n\n- `url` (required)\n- `schema` (required)\n- `prompt`\n- `model`\n- `wait_for_selector`\n- `wait_until`\n- `delay_ms`\n- `country`\n- `language`\n\n## Responses\n\n### 200 — Extraction completed (success or graceful extract failure).\n- `data`\n- `model`\n- `validated`\n- `metrics`\n- `scrape`\n- `warnings`\n\n### 400 — Invalid URL (`invalid_url`), unsupported model (`unsupported_model`), or slow-path URL (`unsupported_url`).\n- `status`\n- `error`\n\n### 401 — Missing or invalid bearer key.\n- `status`\n- `error`\n\n### 402 — Payment required. The account cannot fund this request, and no work was\nperformed. The unified `Error` envelope carries one of the billing codes\nbelow in `error.code`; match on the code, never on the prose.\n\n- `quota_exceeded` — the enforced balance for this request's meter is\n exhausted. Capture endpoints (`/v1/scrape`, `/v1/fetch`,\n `/v1/screenshots`, `/v1/sitemap` and the bulk siblings) meter\n bandwidth; `/v1/search` meters credits.\n- `spending_cap_reached` — the request would push overage spend past the\n account's configured cap. Only reachable on a custom overage-enabled\n plan; standard plans stop at `quota_exceeded`.\n- `billing_entitlement_impaired` — the paid subscription is in a payment\n impairment (e.g. `past_due`). `error.message` names the reason.\n- `billing_entitlement_expired` — the paid subscription entitlement\n period has ended, or its dunning grace period has run out.\n\nNot retryable as-is: settle the balance, raise the cap, or restore the\nsubscription first. This response carries no `X-Quota-*` headers — they\ntravel with the 2xx responses of the operations that emit them.\n- `status`\n- `error`\n\n### 404 — Endpoint not available (feature flag disabled).\n- `status`\n- `error`\n\n### 422 — Validation error (`validation_error`) or non-normalizable schema (`schema_incompatible`).\n- `status`\n- `error`\n\n### 429 — Per-account rate limit (`rate_limited`) or upstream provider rate limit (`provider_rate_limited`); a `Retry-After` header may be present.\n- `status`\n- `error`\n\n### 502 — Underlying scrape failed (`scrape_failed`) or upstream provider error (`provider_error`).\n- `status`\n- `error`\n\n### 503 — Extraction provider unconfigured (`provider_unavailable`).\n- `status`\n- `error`\n\n### 504 — Upstream provider timed out (`provider_timeout`).\n- `status`\n- `error`"
140
+ "body": "# Schema-driven structured extraction\n\nFetches `url` and extracts structured JSON conforming to the supplied\nJSON Schema (draft 2020-12) using an LLM. Fast-path only — slow-path\nrendering options (`wait_until=networkidle`, `delay_ms`,\n`wait_for_selector`) cause a `400 unsupported_option`.\n\nDual-axis billing: a fixed per-request credit charge **plus** the\nunderlying page's bandwidth, billed exactly like `/v1/scrape`. The\nbandwidth is still billed when the scrape succeeds but extraction later\nfails; both axes are refunded only when the scrape itself never runs.\n\nAvailability is gated by a server-side feature flag; when disabled the\nendpoint returns `404`.\n\n**POST** `/v1/schema`\n\n## Request Body\n\n- `url` (required)\n- `schema` (required)\n- `prompt`\n- `model`\n- `wait_for_selector`\n- `wait_until`\n- `delay_ms`\n- `country`\n- `language`\n\n## Responses\n\n### 200 — Extraction completed (success or graceful extract failure).\n- `data`\n- `model`\n- `validated`\n- `metrics`\n- `scrape`\n- `warnings`\n\n### 400 — Invalid URL (`invalid_url`), unsupported model (`unsupported_model`), or unsupported slow-path option (`unsupported_option`).\n- `status`\n- `error`\n\n### 401 — Missing or invalid bearer key.\n- `status`\n- `error`\n\n### 402 — Payment required. The account cannot fund this request, and no work was\nperformed. The unified `Error` envelope carries one of the billing codes\nbelow in `error.code`; match on the code, never on the prose.\n\n- `quota_exceeded` — the enforced balance for this request's meter is\n exhausted. Capture endpoints (`/v1/scrape`, `/v1/fetch`,\n `/v1/screenshots`, `/v1/sitemap` and the bulk siblings) meter\n bandwidth; `/v1/search` meters credits.\n- `spending_cap_reached` — the request would push overage spend past the\n account's configured cap. Only reachable on a custom overage-enabled\n plan; standard plans stop at `quota_exceeded`.\n- `billing_entitlement_impaired` — the paid subscription is in a payment\n impairment (e.g. `past_due`). `error.message` names the reason.\n- `billing_entitlement_expired` — the paid subscription entitlement\n period has ended, or its dunning grace period has run out.\n\nNot retryable as-is: settle the balance, raise the cap, or restore the\nsubscription first. This response carries no `X-Quota-*` headers — they\ntravel with the 2xx responses of the operations that emit them.\n- `status`\n- `error`\n\n### 404 — Endpoint not available (feature flag disabled).\n- `status`\n- `error`\n\n### 422 — Validation error (`validation_error`) or non-normalizable schema (`schema_incompatible`).\n- `status`\n- `error`\n\n### 429 — Per-account rate limit (`rate_limited`) or upstream provider rate limit (`provider_rate_limited`); a `Retry-After` header may be present.\n- `status`\n- `error`\n\n### 502 — Underlying scrape failed (`scrape_failed`) or upstream provider error (`provider_error`).\n- `status`\n- `error`\n\n### 503 — Extraction provider unconfigured (`provider_unavailable`).\n- `status`\n- `error`\n\n### 504 — Upstream provider timed out (`provider_timeout`).\n- `status`\n- `error`"
141
141
  },
142
142
  "api/scrape": {
143
143
  "title": "Scrape",
@@ -274,11 +274,6 @@
274
274
  "section": "General",
275
275
  "body": "# Top-ups and rollover\n\nHow your USD balance is spent, why it never expires, and how plan allowance rolls over.\n\nTop-ups add dollars to your account's USD balance without changing your plan's included allowance. Value is spent in one order: your plan's included allowance, including any rollover from earlier periods, then the USD balance, then the one-time starter grant.\n\n## The USD balance\n\nYour USD balance never expires. It is not tied to the plan you were on when you added it: a cancellation or plan change does not freeze it, hold it, or reset its value. Usage beyond your included allowance draws from the balance at your current plan's top-up rate for the resource it uses — bandwidth or search credits — so the same dollars buy more on a plan with a lower rate. The bandwidth and credit amounts shown beside your balance are estimates at those current rates; the dollar figure is what you hold.\n\n## Billing-period rollover\n\nUnused bandwidth from your monthly plan allowance rolls over to the next billing period with no cap, for as long as the subscription stays on its plan or moves to a higher one. A downgrade or cancellation freezes it: the frozen balance stops being spendable, and resubscribing at the same tier or higher within 90 days restores it in full — after that it is permanently lost. The USD balance is separate from the billing period, so it is not reset when that period rolls over.\n\nCredits do not roll over — they reset every billing period. This does not affect your USD balance, which never expires.\n\nYour USD balance and rollover balances appear under **Dashboard → Settings → Billing**."
276
276
  },
277
- "changelog": {
278
- "title": "Changelog",
279
- "section": "General",
280
- "body": "# Changelog\n\nRelease history for the ByteKit SDKs, CLI, and MCP server\n\nEach section below is the `CHANGELOG.md` kept alongside that client’s source in the ByteKit\nrepository. Entries record what a release changed, including names and options it retired.\n\n## @hunt-labs/bytekit-sdk\n\nTypeScript SDK, published on npm.\n\n### [Unreleased]\n\n### [0.11.1] - 2026-09-17\n\n#### Changed\n\n- Regenerated `src/generated/api.d.ts` (#4563): the internal `listBulk` operation's `status`\n query parameter and list-item `status` now admit `cancelled`. Additive; no SDK method calls\n `listBulk`, so no published signature moves.\n\n### [0.11.0] - 2026-09-14\n\n#### Added\n\n- **`solve_challenge` on `scrape.create` (#4447).** `ScrapeOpts` now carries\n `solve_challenge?: boolean`, and the generated `ScrapeRequest` schema type carries the field\n with its server default `false`. When `true`,\n the scrape attempts to clear a Cloudflare challenge; success is not guaranteed. It is billed\n as a normal browser render. A scrape that omits the option sends no `solve_challenge` key,\n so existing calls are unchanged on the wire.\n- **`credits_scrape` on the usage response types (#4452).** The generated `GET /v1/usage`\n response type and each `GET /v1/usage/daily` data item now carry `credits_scrape: number`:\n credits drawn under the scrape usage source, such as `/v1/schema` extractions. The gateway\n always charged this bucket but never returned it, so the published per-source credit fields\n could not add up to `credits_used`.\n\n#### Changed\n\n- **Internal `GET /v1/bulk` is cursor-paginated and its 100-job cap is gone (#4508).** The\n generated `listBulk` types record a changed response shape: the operation used to return a\n bare array of at most the 100 newest jobs, and now returns the same page envelope\n `GET /v1/monitors` does, `{ data, next_cursor, has_more }`, plus `limit` and `cursor` query\n parameters (`limit` is 1 to 100, default 25). A `status` filter and a `cursor` combine in\n one request: `status` narrows the set and the cursor addresses a position inside it. The\n operation's summary also no longer says \"in-flight\", which was wrong — it has always\n returned jobs of every status, `cancelled` included. This is a breaking change to the wire\n shape of an `x-sdk-scope: internal` operation; no SDK method calls it, so no published\n method signature moves.\n- **`GET /v1/logs` `billing_multiplier` is the bandwidth factor, not a credit count (#4469).**\n The generated logs-row type records the changed meaning of a public field: the value is now\n `billable_bytes` / `raw_bytes` rounded to 2 decimal places — the factor the request settled\n at, carrying the endpoint, cache-hit and clean-markdown factors, and the flat 1.5 Phase-1\n factor on screenshots and recordings. It used to be the row's persisted `credits_charged`,\n an account credit count charged per capture option, so two screenshots billed at the same\n 1.5 factor reported `2` and `1`. The 2 decimal places are load-bearing rather than\n cosmetic: `billable_bytes` is itself rounded, so an odd byte basis would otherwise surface\n as `1.500001943158721` instead of `1.5` on roughly half of all such rows. Every factor the\n field can report is a multiple of 0.25, so 2 places is exact for any basis of 100 bytes or\n more, and `raw_bytes` × `billing_multiplier` rounded to the nearest byte still reproduces\n `billable_bytes`. The `billable_bytes` doc comment therefore no longer says it is NOT\n `raw_bytes` × `billing_multiplier`. The field is also null on more rows than before: a\n search or webhook row has no byte basis, a capture whose Phase 1 was skipped has a zero one,\n and a capture old enough to predate the Phase-1 basis being recorded has none at all. One\n residual is documented rather than fixed: a markdown `/v1/fetch` row completed before the\n billing decomposition was recorded reports 1.0 where settlement charged 1.5, because nothing\n on such a row distinguishes it. The type shapes are unchanged (`number | null`), and no SDK\n method calls this endpoint.\n- **An all-null `/v1/schema` extraction your schema allows is validated again (#4490).** The\n generated `/v1/schema` 200 response type records the exception to #4455's rule: an output\n whose every leaf is `null` still arrives `validated: true` with the object intact, and is\n charged, when the schema you sent declares `\"null\"` in the `type` union of every leaf the\n output returned as `null`. Only that form counts — `nullable: true`, an `enum` containing\n `null` and `const: null` do not, and a response that is itself `null` rather than an object is\n never accepted however the root is declared. Everything else stays the #4455 miss. The `data`\n doc comment now also states the other half: a `validated: true` response always carries an\n object, never `null`. The type shapes are unchanged; only their doc comments moved.\n- **An all-null `/v1/schema` extraction is reported, not validated (#4455).** The generated\n `/v1/schema` 200 response type documents a new additive warning code, `empty_extraction`: a\n schema-valid output whose every leaf is `null` now arrives with `data: null` and\n `validated: false`, and is not charged the per-request credits. Previously it arrived as\n `validated: true` with the all-null object and no warning. The `data` and `validated` doc\n comments now also say that every `validated: false` response carries `data: null`; the old\n comment claimed exhausted retries returned the last raw output, which the API never did. The\n type shapes are unchanged; only their doc comments moved.\n- **An inline `POST /v1/scrape` failure is documented with a persisted `id` (#4454).** The\n gateway now records a sync scrape that ends `upstream_error` or `blocked` as a failed scrape\n job, so its `failed` envelope carries that job's `sc_` id instead of `null`, `scrape.get(id)`\n returns the same envelope, and the request appears in the dashboard Logs. The generated\n `createScrape` 200 and `ScrapeErrorEnvelope` doc comments and the `scrape.create` doc comment\n no longer say `id: null`. The type shapes are unchanged (`id` stays `string | null`), and\n `scrape.create` still throws `ByteKitError` on that envelope exactly as before.\n- **Internal `GET /v1/logs` types list search and webhook rows (#4460).** Both `endpoint` enums\n add `search` and `webhook`; a row's `source` is now `string | null`. No SDK method calls it.\n\n### [0.10.0] - 2026-09-11\n\n#### Changed\n\n- **A terminal `POST /v1/scrape` failure now throws instead of resolving (#1870).** The\n gateway used to report an upstream fetch failure — unreachable host, refused connection,\n or bot protection that defeated every proxy tier — as HTTP 503; it now answers **HTTP 200**\n with the canonical `failed` envelope (`id: null`), because a definitive upstream outcome is\n a result, not a transport error. `!response.ok` was this SDK's only failure seam, so without\n this change that body would resolve like a success and silence every caller's `catch`.\n `scrape.create` (and any `request` / `requestWithResponse` call to `POST /v1/scrape`) now\n raises `ByteKitError` carrying the envelope's `code` and `message`, the **actual** status\n `200`, the response headers, and `error.details` when one is supplied. A legacy 503 from a\n not-yet-upgraded gateway still throws through the unchanged non-2xx decoder, so the SDK\n works against both. **Upgrade note:** if you inspected `result.status === 'failed'` after\n `scrape.create`, move that handling into a `catch`.\n- Everything else is untouched: `scrape.get(id)`, bulk item results, and every other endpoint\n still deliver `failed` as data; `requestRaw` (`/v1/fetch`) never parses JSON and is\n unaffected; 204 and empty-body handling are unchanged. `request()` now delegates to\n `requestWithResponse()` so the guard has a single application site — identical in every\n observable respect but the return value, as both were already documented.\n\n### [0.9.4] - 2026-09-06 [NEVER PUBLISHED]\n\n**This version was cut but NEVER PUBLISHED — npm `latest` goes from 0.9.3 straight to 0.10.0.**\nPublication is triggered by CI on `main` from the version the manifest declares, and 0.10.0\n(#1870) superseded 0.9.4 in the tree before any release reached `main`. Everything below\nreaches consumers in the **0.10.0** artifact, which contains all of it; nothing is installable\nat 0.9.4: `npm i @hunt-labs/bytekit-sdk@0.9.4` fails.\n\n#### Added\n\n- Bulk fetch, scrape, and mixed-result reads now accept optional cursor, limit, and status\n page parameters while preserving the existing `(id, requestOptions?)` call shape (#3717).\n Generated response types publish stable item identities, page cursors and completeness,\n whole-job counters, exact mixed artifact keys, artifact warnings, bounded webhook recovery\n metadata, and the `artifact_unavailable` error contract.\n\n#### Fixed\n\n- Corrected the artifact-URL fallback documentation on `GET /v1/bulk/{id}/screenshots`\n (`image_url`, `content_url`, `markdown_url`) and `GET /v1/logs` (`artifact_url`) (#3717).\n Those fields were documented as null-plus-`artifact_unavailable` when no signature can be\n minted; the servers have always returned the row's stored value unchanged instead — `null`\n while nothing is stored, and otherwise the private unsigned storage URL, which answers `401`\n — and raise no warning. `GET /v1/fetch/bulk/{id}` does null the field and report\n `artifact_unavailable`, and its documentation is unchanged. No server behaviour changed and\n no type moved; the descriptions now match what the endpoints return.\n\n#### Changed\n\n- Regenerated `src/generated/api.d.ts` against the corrected `topup_balance_bytes` description\n on `GET /v1/usage` (#4251). The description read \"Remaining purchased top-up bytes\", which\n contradicted its own \"Equal to `topup_bytes`\" clause: the value covers purchased top-up lots\n and the one-time starter grant, which is what the endpoint has always returned. The clause\n recording that the figure is already net of consumed overage, and the \"Present only in\n dual/bytes billing mode\" clause, are both unchanged and still true. Types are unchanged and\n no server value changed; only the documentation on them moved.\n- Regenerated `src/generated/api.d.ts` against the clarified `cache_age_s` description on\n `ScrapeSuccessEnvelope` (#4237). The description now records that `GET /v1/scrape/{id}`\n reports `cache: hit` without `cache_age_s`: the age is a property of the replay that happened\n at completion time, is not persisted on the row, and cannot be derived honestly afterwards.\n The one-directional \"Present only on `cache: hit`\" clause is unchanged and still true. Types\n are unchanged; only the documentation on them moved.\n- Regenerated `src/generated/api.d.ts` against the completed `cache` presence list on\n `ScrapeSuccessEnvelope` (#4203). The field's description now names `GET /v1/scrape/{id}` as a\n third delivery path, alongside the synchronous response and webhook delivery: a polled scrape\n now reports the cache disposition its row recorded, and omits the field — rather than\n defaulting it to `miss` — for a row that recorded none. Types are unchanged; only the\n documentation on them moved.\n- Regenerated `src/generated/api.d.ts` against the corrected `PUT /v1/billing/auto-topup`\n request body (#3984). `monthly_cap_cents` is now typed `number | null`: an explicit `null` is\n the wire representation of \"no monthly cap\", and it is what the endpoint has always accepted —\n the request schema simply never documented it, while the 200 response schema already did.\n Omitting the key while `enabled` is `true` is still rejected with `422`, so send `null`\n rather than dropping the field. No server behaviour changes; the type widens to match what\n the API already accepted.\n- Regenerated `src/generated/api.d.ts` against the corrected monitor `scrape_options`\n documentation (#4024). The description no longer lists `headers` among the accepted\n fields — `POST /v1/monitors` never honoured a caller-supplied `headers` option and now\n rejects it with the same 400 every other capture endpoint returns for the field. Types are\n unchanged; only the documentation on them moved.\n- Regenerated `src/generated/api.d.ts` against the completed `X-Scrape-Proxy-Tier-Label`\n omission list (#4030). The header's description now names a third case in which no tier is\n reported: a response replayed from stored bytes after this request's own cache lookup missed,\n which arrives as `X-Scrape-Cache: miss` and likewise ran no proxy tier. The two cases already\n documented — a cache hit, and responses the fast path did not serve — are unchanged. Types are\n unchanged; only the documentation on them moved.\n- Regenerated `src/generated/api.d.ts` against the qualified `X-Scrape-Proxy-Tier-Label`\n omission list (#4132). The third case that list records — a response replayed from stored bytes\n after this request's own cache lookup missed — is not reachable through this API: every caller\n of the internal fetch path closes the handler branch that produces it, and the branch survives\n only as a deploy-skew safeguard. The description now says so rather than presenting the case as\n ordinary behaviour. The two reachable cases — a cache hit, and responses the fast path did not\n serve — are unchanged. Types are unchanged; only the documentation on them moved.\n\n### [0.9.3] - 2026-09-04\n\n#### Changed\n\n- Regenerated `src/generated/api.d.ts` against the corrected queued-scrape `status_url`\n documentation (#3925). `status_url` is a root-relative path, never an absolute URI: join it\n onto the API base URL you called (`https://api.bytekit.com`, no trailing slash) to get the URL\n to poll. The spec had declared it `format: uri` with an absolute example, which no server has\n ever emitted; the emitted value is unchanged, so no client behaviour moves.\n- Regenerated `src/generated/api.d.ts` against the documented proxy-tier response headers\n (#3926). `X-Scrape-Proxy-Tier-Label` now documents that it reports the tier that ACTUALLY\n served a scrape — after any escalation, never the tier first attempted — that it is\n diagnostic only, and that it is omitted on a cache hit, which replayed stored bytes and ran\n no tier. The deprecated numeric `X-Scrape-Proxy-Tier` documents the legacy `1` datacenter /\n `2` residential / `3` mobile vocabulary and its omission for the lean-browser tier. Types are\n unchanged; only the documentation on them moved.\n\n### [0.9.2] - 2026-09-03\n\n#### Changed\n\n- **Breaking (API):** the scrape `formats` vocabulary is now `raw | markdown | links | images`\n (#3775). The unprocessed-source format is called `raw` — it has returned JSON, XML and plain\n text alongside HTML since #1853, so the old raw-HTML name misdescribed it — and the\n cleaned-article-HTML format is gone. The server accepts no alias for either retired value, so\n a request naming one now comes back `422` with the new set in the message. Update `formats`\n and read the content back from `formats.raw`:\n\n ```ts\n const result = await client.scrape.create({ url, formats: ['raw', 'markdown'] });\n console.log(result.formats.raw);\n ```\n\n- Regenerated `src/generated/api.d.ts` against the documented `402` contract (#3784). Every\n quota-enforced operation now declares `402` through one shared `PaymentRequired` response, and\n the `X-Quota-*` headers are referenced by the operations that actually emit them. Types only —\n no runtime behavior changed.\n\n- The generated `events` field description on the scrape request type now documents the\n widened server default (`queued`, `completed`, `failed`) and that a caller may send an\n explicit subset to receive fewer deliveries (#3777). Types/docs only — this regeneration\n followed a server-side default change; the SDK carried no logic tied to the old default.\n\n### [0.9.1] - 2026-08-25\n\n#### Fixed\n\n- The generated `paths` type for the `200` of `GET /v1/scrape/bulk/{id}` now declares `items`\n (#3632). The route builds one body and varies only the status code, so the terminal `200`\n\n---\n[Truncated to the 16384-byte per-page limit — this page is 193112 bytes in full. The text cut here is not searchable either: search_docs matches only the part kept above. Read all of it at https://bytekit.com/docs/changelog]"
281
- },
282
277
  "cli": {
283
278
  "title": "Install & Authenticate",
284
279
  "section": "CLI Reference",
@@ -15,8 +15,10 @@
15
15
  * invariant test in `src/__tests__/build-docs-bundle.test.ts`.
16
16
  *
17
17
  * `'General'` is the deliberate fallback for bare top-level pages
18
- * (`changelog`, `introduction`, `mcp`, `quickstart`) — not a catch-all for
19
- * unmapped directories (issue #2570).
18
+ * (`introduction`, `mcp`, `quickstart`) — not a catch-all for
19
+ * unmapped directories (issue #2570). `changelog` still maps here (a page can
20
+ * resolve a section without being bundled — see `isExcludedFromBundle`), but
21
+ * the bundle excludes it (issue #4675).
20
22
  */
21
23
  export declare const DOC_SECTIONS: readonly ["Guides", "API Reference", "SDK Reference", "CLI Reference", "Libraries", "General"];
22
24
  /** One of the section labels enumerated by {@link DOC_SECTIONS}. */
@@ -36,6 +38,19 @@ export declare function slugToSection(slug: string[]): DocSection;
36
38
  * The landing page is identified by an empty slug or a slug of ["index"].
37
39
  */
38
40
  export declare function isIndexPage(slug: string[]): boolean;
41
+ /**
42
+ * Returns true for a page the bundle must not harvest: the root landing page
43
+ * (see {@link isIndexPage}) and the `changelog` page.
44
+ *
45
+ * The `changelog` page concatenates four package changelogs (`CHANGELOG_SOURCES`
46
+ * in `packages/docs/scripts/generate-changelog.ts`), one of which is this
47
+ * package's own `CHANGELOG.md` — so a changelog entry added anywhere rewrites
48
+ * the one committed JSON string the bundle stores it as, making `changelog` the
49
+ * single most merge-collided entry in the bundle (issue #4675). An MCP client
50
+ * that wants release history is pointed at the public page
51
+ * (`https://bytekit.com/docs/changelog`) instead of being handed a copy.
52
+ */
53
+ export declare function isExcludedFromBundle(slug: string[]): boolean;
39
54
  /**
40
55
  * Joins slug segments into a URL path string.
41
56
  *
@@ -15,8 +15,10 @@
15
15
  * invariant test in `src/__tests__/build-docs-bundle.test.ts`.
16
16
  *
17
17
  * `'General'` is the deliberate fallback for bare top-level pages
18
- * (`changelog`, `introduction`, `mcp`, `quickstart`) — not a catch-all for
19
- * unmapped directories (issue #2570).
18
+ * (`introduction`, `mcp`, `quickstart`) — not a catch-all for
19
+ * unmapped directories (issue #2570). `changelog` still maps here (a page can
20
+ * resolve a section without being bundled — see `isExcludedFromBundle`), but
21
+ * the bundle excludes it (issue #4675).
20
22
  */
21
23
  export const DOC_SECTIONS = [
22
24
  'Guides',
@@ -56,6 +58,21 @@ export function slugToSection(slug) {
56
58
  export function isIndexPage(slug) {
57
59
  return slug.length === 0 || (slug.length === 1 && slug[0] === 'index');
58
60
  }
61
+ /**
62
+ * Returns true for a page the bundle must not harvest: the root landing page
63
+ * (see {@link isIndexPage}) and the `changelog` page.
64
+ *
65
+ * The `changelog` page concatenates four package changelogs (`CHANGELOG_SOURCES`
66
+ * in `packages/docs/scripts/generate-changelog.ts`), one of which is this
67
+ * package's own `CHANGELOG.md` — so a changelog entry added anywhere rewrites
68
+ * the one committed JSON string the bundle stores it as, making `changelog` the
69
+ * single most merge-collided entry in the bundle (issue #4675). An MCP client
70
+ * that wants release history is pointed at the public page
71
+ * (`https://bytekit.com/docs/changelog`) instead of being handed a copy.
72
+ */
73
+ export function isExcludedFromBundle(slug) {
74
+ return isIndexPage(slug) || (slug.length === 1 && slug[0] === 'changelog');
75
+ }
59
76
  /**
60
77
  * Joins slug segments into a URL path string.
61
78
  *
@@ -68,43 +68,25 @@ function extractSnippet(text, tokens) {
68
68
  /**
69
69
  * The advertised description of `search_docs`.
70
70
  *
71
- * The closing disclosure is #3307's. `scoreEntry` runs over the bundle's harvested bodies, and
72
- * those are bounded at {@link MAX_DOC_BODY_BYTES} — so search coverage is the bounded body, not
73
- * the published page. On the `changelog` entry that is 16 KB of a ~140 KB page, and a query for a
74
- * release below the cut returns nothing, with no way for the caller to tell an absent feature
75
- * from an unindexed one. Saying so in the schema is the part of the fix an agent meets BEFORE it
71
+ * The bounded-body disclosure is #3307's. `scoreEntry` runs over the bundle's harvested bodies,
72
+ * and those are bounded at {@link MAX_DOC_BODY_BYTES} — so search coverage is the bounded body,
73
+ * not the published page. Saying so in the schema is the part of the fix an agent meets BEFORE it
76
74
  * phrases a query; the per-page truncation notice (`body-bound.ts`) is the part it meets after.
77
75
  *
78
- * SAY WHICH TEXT IS MISSING, NOT JUST THAT SOME IS (#3307 review B1)
79
- * ------------------------------------------------------------------
80
- * The first wording called the missing part "every release older than the kept window". That was
81
- * false, and false in the direction that does damage: the cut is POSITIONAL — the leading
82
- * {@link MAX_DOC_BODY_BYTES} bytes in page order — and the changelog is ordered by distribution,
83
- * not by date. The window ends inside the FIRST of its four `##` package sections, so the Python
84
- * SDK, CLI and MCP-server histories are outside it entirely, newest releases included; the CLI's
85
- * `0.9.0` and the MCP server's `0.3.0` share a release date with the TypeScript SDK release that
86
- * IS inside the window. An agent told only older releases are missing, querying for the newest
87
- * CLI release and getting nothing, concludes the feature does not exist — which is this ticket's
88
- * own defect, recreated by the sentence meant to close it. A partial model is worse than none,
89
- * because the agent acts on it.
76
+ * The bound is interpolated rather than restated, so this text cannot name a limit the harvest
77
+ * step does not apply.
90
78
  *
91
- * Both the limit and the docs origin are interpolated rather than restated, so this text cannot
92
- * name a bound the harvest step does not apply or an origin the truncation notice does not use.
93
- * The page URL is named outright, not merely pointed at: a search that returns zero results hands
94
- * the agent no result to read, so routing it through `get_doc` first would cost a second call to
95
- * learn where to go. The claim about which sections survive is re-derived from the committed
96
- * bundle in `__tests__/search-coverage-disclosure.test.ts`, so prose and artifact are pinned to
97
- * each other.
79
+ * Release history is not bundled at all (issue #4675 dropped the `changelog` page from the
80
+ * harvest — the page concatenates four package `CHANGELOG.md` files into one entry, making it
81
+ * the bundle's most merge-collided page). The description names the public page outright, not
82
+ * merely points at it: a search for a release note returns zero results, and the agent needs a
83
+ * usable next step from that response alone rather than a second call to learn where to go.
98
84
  */
99
85
  const SEARCH_DOCS_DESCRIPTION = 'Search the ByteKit documentation bundle. Returns up to 10 results with a snippet showing ' +
100
86
  'context around the first match. Case-insensitive token match over title and body. Body ' +
101
87
  `matching covers only the bounded body get_doc returns — the leading ${MAX_DOC_BODY_BYTES} ` +
102
- 'bytes of a page — so text cut from a longer page is not searchable here. The cut is ' +
103
- 'positional, by page order, never by age. On the changelog page that window currently reaches ' +
104
- 'only part of the first of its four package histories (@hunt-labs/bytekit-sdk), so the ' +
105
- 'bytekit-sdk (Python), @hunt-labs/bytekit-cli and @hunt-labs/bytekit-mcp histories are not ' +
106
- 'searchable here at all, their newest releases included; read the whole page at ' +
107
- `${DOCS_BASE_URL}/changelog.`;
88
+ 'bytes of a page — so text cut from a longer page is not searchable here. Release history is ' +
89
+ `not in this bundle; read it at ${DOCS_BASE_URL}/changelog.`;
108
90
  export function searchDocsTool(server) {
109
91
  server.tool('search_docs', SEARCH_DOCS_DESCRIPTION, {
110
92
  query: z
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hunt-labs/bytekit-mcp",
3
- "version": "0.3.8",
3
+ "version": "0.3.9",
4
4
  "description": "ByteKit MCP server — exposes ByteKit web-data tools (scrape, screenshot, search, docs) to AI agents over the Model Context Protocol, hosted or as a local stdio server.",
5
5
  "license": "MIT",
6
6
  "type": "module",