@hunt-labs/bytekit-mcp 0.2.3 → 0.2.5
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 +17 -0
- package/dist/client.d.ts +0 -7
- package/dist/client.js +29 -0
- package/package.json +1 -1
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.2.5] - 2026-08-11
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- Every outbound request now carries `X-ByteKit-Client: mcp/<package version>`, the
|
|
18
|
+
`client_surface` attribution marker defined by the Track A analytics contract (#2904),
|
|
19
|
+
so requests made by the published `@hunt-labs/bytekit-mcp` server can be told apart
|
|
20
|
+
from `api_direct` and the other published clients. Set once, unconditionally, at the
|
|
21
|
+
client's single header-construction site — it does not ride along with `Authorization`
|
|
22
|
+
and is not affected by the in-process gateway dispatch path (issue #1182). (#2907)
|
|
23
|
+
|
|
24
|
+
## [0.2.4] - 2026-08-10
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
|
|
28
|
+
- Version-alignment release after the 2026-08-10 publish rescue: the published 0.2.3 artifact was built from the `main` promotion HEAD, which already contained every change documented under the 0.2.3 heading — but that commit postdates the one that introduced the 0.2.3 version string, so the `check-release-drift` gate (#2680) correctly reported shipped drift on every subsequent CI run (#2829). 0.2.4 realigns manifest ↔ registry ↔ version-introducing commit. **No consumer-visible change relative to the published 0.2.3.**
|
|
29
|
+
|
|
13
30
|
## [0.2.3] - 2026-08-07
|
|
14
31
|
|
|
15
32
|
### Added
|
package/dist/client.d.ts
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ByteKit API client -- thin fetch wrapper used by all MCP tools.
|
|
3
|
-
* Uses native fetch (Node 18+). No external HTTP dependencies.
|
|
4
|
-
*
|
|
5
|
-
* The package's declared floor is Node >=18.3 (see package.json `engines`), set by
|
|
6
|
-
* `parseArgs` from node:util in src/cli.ts -- not by fetch, and not by anything requiring Node 22.
|
|
7
|
-
*/
|
|
8
1
|
import type { Format, ScrapeEnvelope } from './scrape-contract.generated.js';
|
|
9
2
|
export type ScrapeFormat = Format;
|
|
10
3
|
export interface ScrapeParams {
|
package/dist/client.js
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ByteKit API client -- thin fetch wrapper used by all MCP tools.
|
|
3
|
+
* Uses native fetch (Node 18+). No external HTTP dependencies.
|
|
4
|
+
*
|
|
5
|
+
* The package's declared floor is Node >=18.3 (see package.json `engines`), set by
|
|
6
|
+
* `parseArgs` from node:util in src/cli.ts -- not by fetch, and not by anything requiring Node 22.
|
|
7
|
+
*/
|
|
8
|
+
import { createRequire } from 'node:module';
|
|
9
|
+
// Resolve the version from package.json at runtime, same pattern as index.ts's
|
|
10
|
+
// `serverInfo` (issue #2419 -- a hand-maintained literal drifted from the manifest).
|
|
11
|
+
// `../package.json` resolves to the package root from both src/client.ts (dev/vitest)
|
|
12
|
+
// and dist/client.js (published tarball). Deliberately NOT imported from `./index.js`:
|
|
13
|
+
// index.ts imports BytekitClient only as `import type` today, and a value import back
|
|
14
|
+
// the other way would create a real runtime cycle (issue #2907 plan finding F3).
|
|
15
|
+
const require = createRequire(import.meta.url);
|
|
16
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
17
|
+
const pkg = require('../package.json');
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
19
|
+
const packageVersion = typeof pkg.version === 'string' ? pkg.version : '0.0.0';
|
|
20
|
+
/**
|
|
21
|
+
* The `client_surface` marker (issue #2907, slice 4 of 6 -- #2701 V6-006). Identifies
|
|
22
|
+
* requests made by the published `@hunt-labs/bytekit-mcp` server so an analytics
|
|
23
|
+
* reader can tell them apart from `api_direct` and the other client surfaces. The
|
|
24
|
+
* header name and `<surface>/<version>` value shape are defined by #2904 (slice 1);
|
|
25
|
+
* this package emits the `mcp` member of its closed CLIENT_SURFACES vocabulary.
|
|
26
|
+
*/
|
|
27
|
+
const CLIENT_SURFACE_MARKER_HEADER = 'X-ByteKit-Client';
|
|
28
|
+
const CLIENT_SURFACE_MARKER_VALUE = `mcp/${packageVersion}`;
|
|
1
29
|
// ============================================================
|
|
2
30
|
// Error
|
|
3
31
|
// ============================================================
|
|
@@ -222,6 +250,7 @@ export class BytekitClient {
|
|
|
222
250
|
const url = `${this.baseUrl}${path}`;
|
|
223
251
|
const headers = {
|
|
224
252
|
'Content-Type': 'application/json',
|
|
253
|
+
[CLIENT_SURFACE_MARKER_HEADER]: CLIENT_SURFACE_MARKER_VALUE,
|
|
225
254
|
};
|
|
226
255
|
// Only set the Authorization header when an apiKey is present. The
|
|
227
256
|
// in-process gateway path (issue #1182) omits the Bearer token because
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hunt-labs/bytekit-mcp",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
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",
|