hugging-bay-mcp 0.1.17 → 0.1.18
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 +60 -54
- package/RECEIPTS.md +8 -6
- package/agent-answer-contract.mjs +10 -1
- package/agent-download.mjs +71 -15
- package/hosted-discovery-contracts.mjs +12 -0
- package/hosted-mcp-manifest.mjs +26 -1
- package/mcp-download-via.mjs +13 -4
- package/package.json +2 -1
- package/profile-manifest.mjs +15 -14
- package/public-note-copy.mjs +5 -0
- package/registry-directory-metadata.mjs +28 -21
- package/run-plan.mjs +49 -6
- package/server.json +33 -24
- package/tool-descriptions.mjs +4 -4
- package/tool-discovery.mjs +3 -3
package/README.md
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
# hugging-bay-mcp [](https://www.npmjs.com/package/hugging-bay-mcp) [](https://www.npmjs.com/package/hugging-bay-mcp) [](https://huggingbay.xyz/.well-known/mcp.json)
|
|
2
2
|
|
|
3
3
|
**Promise:** Find open model files with recorded SHA-256 and license labels. Public reads need no account.<br>
|
|
4
|
-
**Install:** `npx -y hugging-bay-mcp@0.1.
|
|
4
|
+
**Install:** `npx -y hugging-bay-mcp@0.1.17`<br>
|
|
5
5
|
**MCP config (remote):** `claude mcp add --transport http hugging-bay https://huggingbay.xyz/api/mcp`<br>
|
|
6
|
-
**MCP config (stdio):** `{"mcpServers":{"hugging-bay":{"command":"npx","args":["-y","hugging-bay-mcp@0.1.
|
|
6
|
+
**MCP config (stdio):** `{"mcpServers":{"hugging-bay":{"command":"npx","args":["-y","hugging-bay-mcp@0.1.17"],"env":{"HUGGING_BAY_API":"https://huggingbay.xyz"}}}}`<br>
|
|
7
7
|
**First call:** `search_artifacts({ "q": "Qwen3 0.6B GGUF" })`<br>
|
|
8
|
-
**Ask:** Missing a model, file, tool or feature?
|
|
8
|
+
**Ask:** Missing a model, file, tool or feature? Select `?profile=discovery` to call `request_feature`, or POST https://huggingbay.xyz/api/v1/requests. No account. You get an id and can check its status. What shipped: https://huggingbay.xyz/changelog<br>
|
|
9
9
|
[Changelog](https://huggingbay.xyz/changelog?ref=npm) · [MCP docs](https://huggingbay.xyz/agents?ref=npm)<br>
|
|
10
10
|
**Keywords:** `gguf`, `local-llm`, `huggingface-alternative`, `mcp`
|
|
11
11
|
|
|
12
12
|
## Claude Code, Codex CLI and Cursor
|
|
13
13
|
|
|
14
|
-
**Current npm release:** `0.1.
|
|
14
|
+
**Current npm release:** `0.1.17`, published on 13 Nov 2026. It includes `get_download`, `verify_lock`, file resources and hb.lock v2. Hosted MCP exposes six core tools, 10 agent tools and 30 discovery tools. npm 0.1.17 stdio lists seven default tools: the six core tools plus local-only `ask_url`. Call `tools/list` for the selected transport and profile. Use `https://huggingbay.xyz/api/mcp?profile=agent` for `deployment_plan`, `report_run`, `write_receipt` and `verify_lock`. Tug and native hbay use separate version numbers.
|
|
15
15
|
|
|
16
16
|
Public reads use no bearer token and need no OAuth login. Configure one transport
|
|
17
17
|
per server name. For Claude Code:
|
|
@@ -20,7 +20,7 @@ per server name. For Claude Code:
|
|
|
20
20
|
claude mcp add --transport http hugging-bay https://huggingbay.xyz/api/mcp
|
|
21
21
|
claude mcp list
|
|
22
22
|
# Or use stdio under a separate name:
|
|
23
|
-
claude mcp add hugging-bay-stdio -- npx -y hugging-bay-mcp@0.1.
|
|
23
|
+
claude mcp add hugging-bay-stdio -- npx -y hugging-bay-mcp@0.1.17
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
For Codex CLI:
|
|
@@ -38,7 +38,7 @@ url = "https://huggingbay.xyz/api/mcp"
|
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
For stdio, replace `url` with `command = "npx"` and
|
|
41
|
-
`args = ["-y", "hugging-bay-mcp@0.1.
|
|
41
|
+
`args = ["-y", "hugging-bay-mcp@0.1.17"]`. Codex's MCP list reports configuration;
|
|
42
42
|
it does not prove a tool call succeeded. `auth_status: "unsupported"` describes
|
|
43
43
|
OAuth support, not a requirement to sign in for public reads.
|
|
44
44
|
|
|
@@ -48,6 +48,25 @@ For Cursor, merge this into `.cursor/mcp.json` (project) or `~/.cursor/mcp.json`
|
|
|
48
48
|
{"mcpServers":{"hugging-bay":{"url":"https://huggingbay.xyz/api/mcp"}}}
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
+
### Optional API key
|
|
52
|
+
|
|
53
|
+
For hosted MCP, configure your client to supply an `Authorization: Bearer`
|
|
54
|
+
header from its secret store. For the Codex CLI example above, add
|
|
55
|
+
`bearer_token_env_var = "HUGGING_BAY_TOKEN"` to the server entry and set that
|
|
56
|
+
environment variable outside the configuration file. For stdio, pass
|
|
57
|
+
`HUGGING_BAY_TOKEN` to the child process. Public tools work with either
|
|
58
|
+
transport without a key. Authenticated calls use the scopes on the key.
|
|
59
|
+
Keep keys out of URLs, tool arguments, and checked-in files.
|
|
60
|
+
|
|
61
|
+
### Optional hardware estimate
|
|
62
|
+
|
|
63
|
+
Under **Set my machine**, copy the hardware code to your other browser or
|
|
64
|
+
send it as `params._meta["huggingbay.xyz/hardwareProfile"]` with a hosted
|
|
65
|
+
`get_model`, `search_artifacts`, or `find_runnable` call. Read the estimate
|
|
66
|
+
from `result._meta["huggingbay.xyz/personalizedFit"]` when it fits the response
|
|
67
|
+
budget. The code contains the memory choice and its confirmation date, and
|
|
68
|
+
expires after 90 days. Omit it or pass `"off"` to skip the estimate.
|
|
69
|
+
|
|
51
70
|
Use `tools/list` before calling a tool. The explicit discovery profile includes
|
|
52
71
|
`deployment_plan({"artifact":"<returned id>"})` for current file links and
|
|
53
72
|
hashes. `plan_local_deployment` belongs to the full profile. A successful search
|
|
@@ -62,7 +81,7 @@ For Claude Desktop, open Settings → Developer → Edit Config and merge this i
|
|
|
62
81
|
`claude_desktop_config.json`. Restart Claude Desktop after saving:
|
|
63
82
|
|
|
64
83
|
```json
|
|
65
|
-
{"mcpServers":{"hugging-bay":{"command":"npx","args":["-y","hugging-bay-mcp@0.1.
|
|
84
|
+
{"mcpServers":{"hugging-bay":{"command":"npx","args":["-y","hugging-bay-mcp@0.1.17"],"env":{"HUGGING_BAY_API":"https://huggingbay.xyz"}}}}
|
|
66
85
|
```
|
|
67
86
|
|
|
68
87
|
## First live MCP call
|
|
@@ -80,7 +99,7 @@ A JSON-RPC result without `isError` confirms the search was handled. Results may
|
|
|
80
99
|
`get_download` gives an agent one exact file in one call:
|
|
81
100
|
|
|
82
101
|
```sh
|
|
83
|
-
curl -fsS 'https://huggingbay.xyz/api/mcp' -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_download","arguments":{"id":"
|
|
102
|
+
curl -fsS 'https://huggingbay.xyz/api/mcp' -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_download","arguments":{"id":"hf-model-qwen-qwen3-0-6b-gguf"}}}'
|
|
84
103
|
```
|
|
85
104
|
|
|
86
105
|
- Arguments: `id` (artifact id or owner/repo) and optional `path` (default: the recommended file).
|
|
@@ -88,26 +107,26 @@ curl -fsS 'https://huggingbay.xyz/api/mcp' -H 'Content-Type: application/json' -
|
|
|
88
107
|
- The link comes from the same live checks as a browser download of `downloadUrl`. Errors name the reason: `file_not_downloadable` (with the file list), `license_acceptance_required`, `busy`, `file_gone`.
|
|
89
108
|
- The result also carries a `resource_link` to `huggingbay://artifact/{id}/file/{path}` with `sha256` and `sizeBytes` in `_meta["xyz.huggingbay/file"]`. `resources/read` on that URI returns the file record, not the bytes.
|
|
90
109
|
|
|
91
|
-
Save `hbLock.text` as `hb.lock` in the repo root. The v2 format (`hugging-bay.hb-lock.v2`) lists `files` with `repo`, `revision`, `path`, `sha256`, `size`, `downloadUrl`, `license`, `artifactId` and `format`. `
|
|
110
|
+
Save `hbLock.text` as `hb.lock` in the repo root. The v2 format (`hugging-bay.hb-lock.v2`) lists `files` with `repo`, `revision`, `path`, `sha256`, `size`, `downloadUrl`, `license`, `artifactId` and `format`. Agent-pack source 0.1.3 has `pin`, `fetch` and `verify`; as observed on 2026-11-13, npm's latest `hugging-bay-agents` is 0.1.2 and predates those commands. From this repository checkout, run `node packages/agent-pack/cli.mjs fetch [hb.lock] [--dir <folder>]` to download every pinned file, check SHA-256 and size, and resume after a drop. MCP `verify_lock` on the agent profile checks a lock against the current catalog. v1 locks from `write_receipt` still read.
|
|
92
111
|
|
|
93
|
-
|
|
112
|
+
In agent-pack source 0.1.3, `answer --pin` writes an exact file to `hb.lock` only after a signed answer verifies against a trusted key: `node packages/agent-pack/cli.mjs answer coding --ram 32 --pin`. npm 0.1.2 does not include this source flow. As observed on 2026-11-13, the production answer endpoint returned `state: timeout` and the key endpoint listed no signing keys, so there was no live answer to pin.
|
|
94
113
|
|
|
95
|
-
|
|
114
|
+
## Profiles: stdio and hosted
|
|
96
115
|
|
|
97
|
-
|
|
98
|
-
the broader catalog available, but a client must opt into it explicitly:
|
|
116
|
+
The hosted core profile observed on 2026-11-13 has six read-only tools. npm 0.1.17 stdio lists those six core tools plus local-only `ask_url`, for seven tools total. Its bounded discovery profile and the hosted 30-tool discovery profile can differ; call `tools/list` on the selected transport for its exact contract.
|
|
99
117
|
|
|
100
118
|
| Transport/profile | `tools/list` | What it is |
|
|
101
119
|
| --- | --- | --- |
|
|
102
|
-
| hosted `?profile=core`
|
|
103
|
-
|
|
|
104
|
-
|
|
|
105
|
-
|
|
|
106
|
-
|
|
|
120
|
+
| hosted `?profile=core` | **6 tools** | `find_runnable`, `search_artifacts`, `get_model`, `get_download`, `get_serve_decision`, `hb_run_plan`; all read-only |
|
|
121
|
+
| hosted `?profile=agent` | **10 tools** | the six core tools plus `deployment_plan`, `report_run`, `write_receipt`, `verify_lock` |
|
|
122
|
+
| hosted `?profile=discovery` | **30 tools** | broader public catalog, request and board tools, including `request_feature` and `request_missing` |
|
|
123
|
+
| hosted `?profile=directory` | **3 tools** | connector subset: `search`, `fetch`, `find_runnable` |
|
|
124
|
+
| npm 0.1.17 and current source stdio default / `--profile core` | **7 tools** | six read-only core tools plus local-only `ask_url` |
|
|
125
|
+
| hosted `?profile=verify` | inspect `tools/list` | hosted public verification list; it does not include `get_accepted_run_proof` |
|
|
126
|
+
| npm 0.1.17 and source stdio `--profile verify` | inspect `tools/list` | `get_accepted_run_proof` is listed only when `HUGGING_BAY_MCP_ENABLE_UNRELEASED_RUN_PROOF=1` |
|
|
107
127
|
|
|
108
128
|
The default is also selected when `HUGGING_BAY_MCP_PROFILE` is empty.
|
|
109
|
-
Use
|
|
110
|
-
`--profile core` or `HUGGING_BAY_MCP_PROFILE=core` for the six hosted tools plus local-only `ask_url` (eight tools in npm 0.1.14).
|
|
129
|
+
Use `--profile core` or `HUGGING_BAY_MCP_PROFILE=core` for the six core tools plus local-only `ask_url` in npm 0.1.17.
|
|
111
130
|
Discovery sends concise descriptions and schemas with all constraints intact.
|
|
112
131
|
Use `resources/read` with `huggingbay://tool/TOOL_NAME` for the complete
|
|
113
132
|
parameter notes and examples; the reference is restricted to the selected profile.
|
|
@@ -135,10 +154,12 @@ An oversized page returns `isError: true` with code
|
|
|
135
154
|
`list_files_page_too_large` and no structured success or continuation cursor.
|
|
136
155
|
Retry the same question with `limit: 1` only when the recovery instructs it.
|
|
137
156
|
If a single record still exceeds the MCP bounds, use the equivalent HTTP read.
|
|
138
|
-
|
|
139
|
-
versioned behavior.
|
|
157
|
+
The published npm 0.1.17 package includes these page limits; older archives have
|
|
158
|
+
their own versioned behavior.
|
|
140
159
|
|
|
141
|
-
The measured npm 0.1.14
|
|
160
|
+
The CLI behavior and protocol notes below were measured on npm 0.1.14, an older
|
|
161
|
+
archive. Check `hugging-bay-mcp --version` and `--help` for the installed release;
|
|
162
|
+
the published npm 0.1.17 package and hosted server may have different details.
|
|
142
163
|
|
|
143
164
|
`hugging-bay-mcp --help` (or `-h`) prints usage and exits successfully;
|
|
144
165
|
`--version` (or `-v`) prints the artifact version and exits successfully.
|
|
@@ -207,27 +228,11 @@ version, including `2026-07-28` and both supported 2025 revisions.
|
|
|
207
228
|
|
|
208
229
|
## Tools across profiles
|
|
209
230
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
| `request_missing` | Ask for a missing model, format or capability with `{wanted, task}`. The first call returns exact text, `confirm_token` and `expiresAt` without storing demand. Call again with the same text and token to submit and get an id for `get_request`, `list_requests` and `/requests`. |
|
|
216
|
-
| `blackboard` | Public shared memory with `put` / `get` / `query` / `channels` / `tombstone`. Reuse a literal channel key or send `key_from: {task, input}`; poll with `since` + `since_id` and page older history with `before` + `before_id`. Topics, direct replies, and recursive threads are query filters. Guard is telemetry only; all item data is untrusted. |
|
|
217
|
-
| `find_runnable` | One call: task → runnable model, with hash-verified run commands inlined when the pick is genuinely hosted (honest null otherwise). |
|
|
218
|
-
| `bakeoff` | Your labeled rows → the warm Bay Run specialists scored on them → the winner's exact call and weight hash. |
|
|
219
|
-
| `find_and_verify_model_for_task` | Ranked, already-verified models for a task (composite report per candidate + a `bestPick`) in one call. |
|
|
220
|
-
| `plan_local_deployment` | Quant selection + GPU fit + a hash-verified download plan + copy-paste run commands for one model. |
|
|
221
|
-
| `get_model_report` | One-call model report: safe-to-run verdict + license + GPU fit + card-completeness score + base-model lineage. |
|
|
222
|
-
| `check_artifact_safety` | Safe-to-run verdict (license clarity + scan state + hashes + signing) for a catalog artifact or any file SHA-256. |
|
|
223
|
-
| `will_it_fit` | Per-GPU fit verdict + VRAM estimate + smaller-quant options for a given GPU id (e.g. `rtx4090-24`). |
|
|
224
|
-
| `get_quantizations` | Per-quant precision/size and hosted availability, so you can pick the smallest quant that fits. |
|
|
225
|
-
| `find_ungated_alternatives` | Ungated, commercially-usable alternatives to a gated or restricted model. |
|
|
226
|
-
| `get_model_bom` | Signed AI Bill of Materials (CycloneDX-compatible): hashed files + license + base-model dependency chain + scan state. |
|
|
227
|
-
| `inspect_model_binary` | Byte-level safetensors/GGUF header inspection compared against the declared model card (catches mislabeled sizes and custom-code architectures). |
|
|
228
|
-
| `diff_manifests` | Structural diff between two artifacts' (or versions') signed file manifests — added/removed/changed files by hash. |
|
|
229
|
-
|
|
230
|
-
The full, always-current tool list (names, descriptions, input schemas) is published at <https://huggingbay.xyz/.well-known/mcp.json> and via `tools/list` on `https://huggingbay.xyz/api/mcp`.
|
|
231
|
+
The table above lists the current hosted profiles. Older npm releases had
|
|
232
|
+
different full-profile tools; do not use names from an older tool list with a
|
|
233
|
+
current server. Call `tools/list` on the selected endpoint for the exact names,
|
|
234
|
+
descriptions and input schemas it accepts. The server profile manifest is at
|
|
235
|
+
<https://huggingbay.xyz/.well-known/mcp.json>.
|
|
231
236
|
|
|
232
237
|
## Blackboard contract
|
|
233
238
|
|
|
@@ -297,7 +302,7 @@ Curl-only clients can read the contract at `GET https://huggingbay.xyz/api/v1/bl
|
|
|
297
302
|
|
|
298
303
|
## Advanced run-proof opt-in
|
|
299
304
|
|
|
300
|
-
Accepted-run-proof MCP access is excluded from the
|
|
305
|
+
Accepted-run-proof MCP access is excluded from the hosted discovery profile
|
|
301
306
|
and explicit `full` profile. The stdio launcher exposes only exact
|
|
302
307
|
`get_accepted_run_proof` and `huggingbay://run-proof/{proofId}` reads, and only
|
|
303
308
|
when started with both `HUGGING_BAY_MCP_PROFILE=verify` and
|
|
@@ -349,18 +354,15 @@ Downloadable doesn't mean tested: this record says whether the exact file can be
|
|
|
349
354
|
|
|
350
355
|
## Release dependency
|
|
351
356
|
|
|
352
|
-
The request-and-status sentence above is approved copy held on the c29 AEO-72/AEO-73 deployment gate. Verify the deployed `request_feature`, `get_request`, and public changelog/status path before package publication or directory copy uses it.
|
|
353
|
-
|
|
354
|
-
|
|
355
357
|
### Run a model on your computer (optional, default off)
|
|
356
358
|
|
|
357
|
-
|
|
359
|
+
The optional `run_local` path requires native hbay 0.2.4 and the local MCP package, then `HUGGING_BAY_MCP_ENABLE_RUN_LOCAL=1`. The qualified release manifest now selects published hbay 0.2.5. This feature runs on your computer; the hosted MCP does not start a model.
|
|
358
360
|
|
|
359
361
|
#### 1. Set up the local tools
|
|
360
362
|
|
|
361
363
|
Use a terminal on your own computer. You need both the native hbay program and the local MCP package before calling your assistant.
|
|
362
364
|
|
|
363
|
-
Install the hbay
|
|
365
|
+
Install the published hbay release, then start the local npm stdio package with `HUGGING_BAY_MCP_ENABLE_RUN_LOCAL=1`. The flag defaults off. `HBAY_BINARY` may name a trusted local executable; `HBAY_DATA_DIR` may select an isolated data directory.
|
|
364
366
|
|
|
365
367
|
#### 2. Start one model
|
|
366
368
|
|
|
@@ -374,7 +376,7 @@ Prompts stay on your machine.
|
|
|
374
376
|
|
|
375
377
|
## Complete tool reference for agent builders
|
|
376
378
|
|
|
377
|
-
The expanded [MCP reference](https://huggingbay.xyz/
|
|
379
|
+
The expanded [MCP reference](https://huggingbay.xyz/developers/mcp) is staged behind
|
|
378
380
|
`HUGGING_BAY_AGENT_BUILDER_DOCS=1` (default off). With
|
|
379
381
|
`HUGGING_BAY_AGENT_GUARDRAILS=1`, the `verify-before-finish` MCP prompt is also
|
|
380
382
|
listed. It lists each hosted tool and
|
|
@@ -413,7 +415,11 @@ stays unchanged. See [the quickstart](../../docs/swarm-quickstart.md).
|
|
|
413
415
|
|
|
414
416
|
## Portable receipts and local Ask links
|
|
415
417
|
|
|
416
|
-
|
|
418
|
+
Published npm 0.1.17 includes `write_receipt`, digest receipt links and the stdio-only `ask_url` draft builder. Its default stdio list has seven tools: the six core tools plus `ask_url`. See [RECEIPTS.md](RECEIPTS.md) for hb.lock and authority limits. Native hbay 0.2.5 is published as recorded in the release manifest and its checksum receipt. The hosted installer defaults to that release. Check `hbay --version` and `hbay help pin` before using these commands:
|
|
417
419
|
|
|
420
|
+
```sh
|
|
421
|
+
hbay pin hf-model-qwen-qwen3-0-6b-gguf
|
|
422
|
+
hbay fetch hb.lock --dir models --connections 8
|
|
423
|
+
```
|
|
418
424
|
|
|
419
|
-
|
|
425
|
+
`hbay pin` writes a v2 `hb.lock` entry for the exact selected file. `hbay fetch` downloads the pinned file and checks its SHA-256 and size. Windows `install.ps1` refuses by default while signature verification is pending. These native commands are separate from the Node package CLI.
|
package/RECEIPTS.md
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
# Portable MCP receipts (
|
|
1
|
+
# Portable MCP receipts (npm 0.1.17)
|
|
2
2
|
|
|
3
|
-
The
|
|
3
|
+
The published package starts in one command:
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
|
-
npx -y hugging-bay-mcp@0.1.
|
|
6
|
+
npx -y hugging-bay-mcp@0.1.17
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
As observed on 2026-11-13, npm's latest published `hugging-bay-mcp` is 0.1.17.
|
|
10
|
+
The hosted default core profile has six read-only tools; hosted discovery has 30
|
|
11
|
+
tools. npm 0.1.17 stdio lists those six core tools plus local-only `ask_url`, for
|
|
12
|
+
seven default tools. Hosted and stdio profile names or counts can differ. Call
|
|
13
|
+
`tools/list` for the exact selected transport and profile.
|
|
12
14
|
|
|
13
15
|
Every `tools/call` result, including a tool-level error, carries a receipt URL in
|
|
14
16
|
`_meta["xyz.huggingbay/receipt"].url` and a `resource_link` content block. JSON-RPC
|
|
@@ -61,12 +61,21 @@ export function conciseDeploymentPlan(payload, sourceUrl = '') {
|
|
|
61
61
|
return out;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
export function hostedInventoryPendingText(payload) {
|
|
65
|
+
if (payload?.loading !== true || payload.warning !== 'hosted_inventory_pending') return '';
|
|
66
|
+
const seconds = payload.retryAfterSeconds;
|
|
67
|
+
const delay = Number.isSafeInteger(seconds) && seconds > 0 ? ` in ${seconds} second${seconds === 1 ? '' : 's'}` : ' shortly';
|
|
68
|
+
return `Hosted inventory is still loading. Retry the same search${delay}.`;
|
|
69
|
+
}
|
|
70
|
+
|
|
64
71
|
export function conciseToolText(payload) {
|
|
65
72
|
if (!payload || typeof payload !== 'object') return String(payload ?? '');
|
|
66
73
|
if (payload.error) return payload.message || String(payload.error);
|
|
67
74
|
const id = payload.repo || payload.artifact?.repo || payload.id || payload.artifactId || payload.artifact?.id;
|
|
68
75
|
const rows = payload.rows || payload.files;
|
|
69
|
-
|
|
76
|
+
const resultCount = Array.isArray(rows) ? `${rows.length} ${payload.files ? 'file' : 'result'}${rows.length === 1 ? '' : 's'}.` : '';
|
|
77
|
+
const resultText = hostedInventoryPendingText(payload) || resultCount;
|
|
78
|
+
return [id ? `Model: ${id}.` : '', resultText,
|
|
70
79
|
payload.available === false ? 'No confirmed download plan is available.' : '',
|
|
71
80
|
payload.stale || payload.degraded ? 'This answer is dated or incomplete. Check its freshness before downloading.' : '',
|
|
72
81
|
// Text-only clients retain the public note exactly once.
|
package/agent-download.mjs
CHANGED
|
@@ -19,7 +19,7 @@ const shellSingleQuote = value => `'${String(value).replace(/'/g, "'\\''")}'`;
|
|
|
19
19
|
export const GET_DOWNLOAD_TOOL = Object.freeze({
|
|
20
20
|
name: "get_download",
|
|
21
21
|
title: "Get one exact file",
|
|
22
|
-
description: "One call for one exact model file: a
|
|
22
|
+
description: "One call for one exact model file: a pinned upstream or short-lived signed download link with its SHA-256, size, revision, license label, an hb.lock entry and start commands for llama.cpp, Ollama, LM Studio, MLX and vLLM. Omit path for the recommended file.",
|
|
23
23
|
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
24
24
|
inputSchema: { type: "object", required: ["id"], additionalProperties: false, properties: {
|
|
25
25
|
id: { type: "string", minLength: 1, maxLength: 300, description: "Artifact id or owner/repo.", examples: ["Qwen/Qwen3-4B-GGUF"] },
|
|
@@ -137,29 +137,47 @@ export async function getDownload(args, io, { now = () => Date.now() } = {}) {
|
|
|
137
137
|
: "The download plan did not load. Retry in a few seconds.", { status, retryable: status !== 404 });
|
|
138
138
|
}
|
|
139
139
|
if (!ARTIFACT_ID.test(plan?.artifactId || "")) return toolError("plan_unavailable", "The download plan had no artifact id. Retry in a few seconds.", { retryable: true });
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
140
|
+
const stalePlanError = () => toolError("plan_unavailable", "The download plan is stale or degraded right now, so no file is pinned. Retry in a few seconds.", { artifactId: plan.artifactId, retryable: true });
|
|
141
|
+
if (plan.error) return stalePlanError();
|
|
142
|
+
// prod-e2e-health 27 Nov: a stale/degraded plan (its authority read could not
|
|
143
|
+
// finish) may still name the file, but it grants nothing. The live byte route
|
|
144
|
+
// re-checks admission on every open; accept only its success, and only when
|
|
145
|
+
// its SHA-256 header equals the plan's recorded SHA-256. Anything else is the
|
|
146
|
+
// unchanged plan_unavailable answer.
|
|
147
|
+
const provisional = plan.degraded === true || plan.stale === true;
|
|
148
|
+
// Only the plan-level stale/degraded marks are lifted, and only to name the
|
|
149
|
+
// candidate file. Denials (downloadReady false, row stale/blocked/unknown)
|
|
150
|
+
// still refuse; the pin below is issued only after the live SHA-256 match.
|
|
151
|
+
const selectable = provisional ? { ...plan, degraded: false, stale: false } : plan;
|
|
152
|
+
const row = selectPlanFile(selectable, path);
|
|
153
|
+
const entry = row ? lockEntryFromPlan(selectable, row) : null;
|
|
154
|
+
if (!entry && provisional) return stalePlanError();
|
|
143
155
|
if (!entry) {
|
|
144
156
|
return toolError("file_not_downloadable", path
|
|
145
157
|
? `${path} is not a downloadable file with a recorded SHA-256 and size. Pick one of files.`
|
|
146
158
|
: "This model has no single recommended downloadable file. Pick one of files and pass its path.",
|
|
147
159
|
{ artifactId: plan.artifactId, files: fileChoices(plan), retryable: false });
|
|
148
160
|
}
|
|
149
|
-
const executionBlocked = row.executionPolicy === "blocked" || row.authorityMode === "private-download-only" || plan.authorityMode === "private-download-only";
|
|
161
|
+
const executionBlocked = provisional || row.executionPolicy === "blocked" || row.authorityMode === "private-download-only" || plan.authorityMode === "private-download-only";
|
|
150
162
|
const route = new URL(entry.downloadUrl);
|
|
151
163
|
let link;
|
|
152
164
|
try { link = await io.openDownload(`${route.pathname}${route.search}`); } catch {
|
|
153
165
|
link = { status: 0 };
|
|
154
166
|
}
|
|
167
|
+
if (provisional && !liveLinkConfirmsFile(link, entry.sha256)) return stalePlanError();
|
|
168
|
+
const freshnessNote = provisional ? " The download plan was stale, so this link and its SHA-256 were confirmed by a live re-check. The license label and hb.lock are omitted until a fresh plan; no tested run is claimed." : "";
|
|
155
169
|
const issuedAt = now();
|
|
156
170
|
const base = { schema: DOWNLOAD_LINK_SCHEMA, artifactId: entry.artifactId, repo: entry.repo, revision: entry.revision, path: entry.path,
|
|
157
|
-
sha256: entry.sha256, sizeBytes: entry.size, license: entry.license, format: entry.format, downloadUrl: entry.downloadUrl
|
|
158
|
-
|
|
171
|
+
sha256: entry.sha256, sizeBytes: entry.size, license: entry.license, format: entry.format, downloadUrl: entry.downloadUrl,
|
|
172
|
+
// The live SHA-256 match covers the bytes, not plan labels: a stale plan's
|
|
173
|
+
// license may come from a failed evidence read, so it is not repeated, and
|
|
174
|
+
// no hb.lock pin (which embeds it) is issued.
|
|
175
|
+
...(provisional ? { license: null, licenseVerified: false, planFreshness: "stale", authority: "live-download-route" } : {}) };
|
|
176
|
+
const lock = provisional ? null : buildLockV2([entry]);
|
|
159
177
|
const filename = entry.path.split("/").pop();
|
|
160
178
|
const shared = {
|
|
161
179
|
verify: { algorithm: "sha256", sha256: entry.sha256, sizeBytes: entry.size, command: `shasum -a 256 ${filename}` },
|
|
162
|
-
hbLock: { filename: "hb.lock", text: lock.text, fetch: "npx hugging-bay-agents fetch hb.lock" },
|
|
180
|
+
...(lock ? { hbLock: { filename: "hb.lock", text: lock.text, fetch: "npx hugging-bay-agents fetch hb.lock" } } : {}),
|
|
163
181
|
run: { ...runRecipesForFile(entry), ...(executionBlocked ? { executionBlocked: true, note: "Hugging Bay has not tested this file in a run. The commands only show how each runtime loads this file type." } : {}) },
|
|
164
182
|
resource: fileResourceUri(entry.artifactId, entry.path),
|
|
165
183
|
};
|
|
@@ -168,17 +186,39 @@ export async function getDownload(args, io, { now = () => Date.now() } = {}) {
|
|
|
168
186
|
if (etagDigest && etagDigest.toLowerCase() !== entry.sha256) {
|
|
169
187
|
return { ...base, url: null, ...toolError("file_changed", "The file changed while the link was issued. Call get_download again.", { retryable: true }), ...shared };
|
|
170
188
|
}
|
|
189
|
+
const verifiedCurl = url => `(tmp=$(mktemp ./.hb-download.XXXXXX) && trap 'rm -f -- "$tmp"' EXIT && curl -fL --proto '=https' --proto-redir '=https' -o "$tmp" ${shellSingleQuote(url)} && printf '%s %s\\n' ${shellSingleQuote(entry.sha256)} "$tmp" | shasum -a 256 -c - && mv -f -- "$tmp" ${shellSingleQuote(`./${filename}`)})`;
|
|
190
|
+
const verifyNote = `The command verifies SHA-256 before moving the file into place.${freshnessNote}`;
|
|
171
191
|
if ([301, 302, 303, 307, 308].includes(link.status) && signedLinkAllowed(link.location)) {
|
|
192
|
+
const mode = link.header?.("x-hugging-bay-download-mode");
|
|
193
|
+
const target = new URL(link.location);
|
|
172
194
|
const ttl = linkTtlSeconds(link.header?.("x-hugging-bay-capability-ttl"));
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
195
|
+
if (mode === "huggingface-pinned" || mode === "huggingface-cdn") {
|
|
196
|
+
const commit = target.pathname.split("/resolve/")[1]?.split("/")[0];
|
|
197
|
+
const pinned = target.origin === "https://huggingface.co" && /^[a-f0-9]{40}$/.test(commit || "") && commit === entry.revision;
|
|
198
|
+
const cdn = !target.port && !target.hash && /^(?:cas-bridge\.xethub\.hf\.co|(?:[a-z0-9-]+\.)?aws\.cdn\.hf\.co|cdn-lfs(?:-[a-z0-9-]+)?\.(?:hf\.co|huggingface\.co))$/.test(target.hostname);
|
|
199
|
+
if (!(mode === "huggingface-pinned" ? pinned : cdn) || !liveLinkConfirmsFile(link, entry.sha256)) {
|
|
200
|
+
return { ...base, url: null, ...toolError("file_changed", "The upstream link did not match the recorded file. Call get_download again.", { retryable: true }) };
|
|
201
|
+
}
|
|
202
|
+
const expiry = mode === "huggingface-cdn" ? ttl : null;
|
|
203
|
+
return { ...base, url: target.href, source: mode, expiresInSeconds: expiry,
|
|
204
|
+
expiresAt: expiry ? new Date(issuedAt + expiry * 1000).toISOString() : null,
|
|
205
|
+
curl: verifiedCurl(target.href), ...shared, note: verifyNote };
|
|
206
|
+
}
|
|
207
|
+
return { ...base, url: target.href, expiresInSeconds: ttl, expiresAt: new Date(issuedAt + ttl * 1000).toISOString(),
|
|
208
|
+
curl: verifiedCurl(target.href), ...shared, note: verifyNote };
|
|
176
209
|
}
|
|
177
210
|
if (link.status === 200 || link.status === 206) {
|
|
178
|
-
// Some files stream through the site instead of a signed storage link.
|
|
179
211
|
return { ...base, url: entry.downloadUrl, expiresInSeconds: null, expiresAt: null, streamed: true,
|
|
180
|
-
curl:
|
|
181
|
-
|
|
212
|
+
curl: verifiedCurl(entry.downloadUrl), ...shared, note: verifyNote };
|
|
213
|
+
}
|
|
214
|
+
const sourceError = link.header?.("x-hugging-bay-download-error");
|
|
215
|
+
if (["upstream_download_access_unavailable", "upstream_download_restricted", "upstream_download_license_unresolved"].includes(sourceError)) {
|
|
216
|
+
return { ...base, url: null, linkStatus: link.status, ...toolError("source_withheld",
|
|
217
|
+
"The verified source is unavailable under its current access or license settings.", { retryable: false }), ...shared };
|
|
218
|
+
}
|
|
219
|
+
if (["upstream_download_integrity_mismatch", "upstream_download_binding_unverified"].includes(sourceError)) {
|
|
220
|
+
return { ...base, url: null, linkStatus: link.status, ...toolError("file_changed",
|
|
221
|
+
"The verified source did not match the file pin. Call get_download again before downloading.", { retryable: true }), ...shared };
|
|
182
222
|
}
|
|
183
223
|
const reason = link.status === 403 || link.status === 451 ? "license_acceptance_required"
|
|
184
224
|
: link.status === 404 || link.status === 410 ? "file_gone"
|
|
@@ -187,7 +227,23 @@ export async function getDownload(args, io, { now = () => Date.now() } = {}) {
|
|
|
187
227
|
: reason === "file_gone" ? "This file is no longer served. Call get_model for current files."
|
|
188
228
|
: reason === "busy" ? "Downloads are busy. Retry after a few seconds."
|
|
189
229
|
: "No download link right now. Retry, or open downloadUrl directly.";
|
|
190
|
-
|
|
230
|
+
const retryAfter = Number(link.header?.("retry-after"));
|
|
231
|
+
return { ...base, url: null, linkStatus: link.status || null, ...toolError(reason, message, { retryable: reason === "busy" || reason === "link_unavailable",
|
|
232
|
+
...(reason === "busy" && Number.isSafeInteger(retryAfter) && retryAfter > 0 ? { retryAfterSeconds: retryAfter } : {}) }), ...shared };
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// The live byte route's own identity for the bytes it just admitted: an ETag
|
|
236
|
+
// "sha256-<hex>" and/or X-Hugging-Bay-Sha256. Every present value must match
|
|
237
|
+
// and at least one must be present; only a success status counts.
|
|
238
|
+
export function liveLinkConfirmsFile(link, sha256) {
|
|
239
|
+
const want = String(sha256 || "").toLowerCase();
|
|
240
|
+
if (!/^[a-f0-9]{64}$/.test(want) || typeof link?.header !== "function") return false;
|
|
241
|
+
const ok = ([301, 302, 303, 307, 308].includes(link.status) && signedLinkAllowed(link.location)) || link.status === 200 || link.status === 206;
|
|
242
|
+
if (!ok) return false;
|
|
243
|
+
const etag = (String(link.header("etag") || "").match(/sha256-([a-f0-9]{64})/i) || [])[1];
|
|
244
|
+
const direct = String(link.header("x-hugging-bay-sha256") || "").trim();
|
|
245
|
+
const seen = [etag, direct].filter(Boolean).map(value => value.toLowerCase());
|
|
246
|
+
return seen.length > 0 && seen.every(value => value === want);
|
|
191
247
|
}
|
|
192
248
|
|
|
193
249
|
// Checks every lock entry against the current download plan of its artifact.
|
|
@@ -776,6 +776,18 @@ export const HOSTED_DISCOVERY_EXTRA_TOOLS = [
|
|
|
776
776
|
"lastChecked": {
|
|
777
777
|
"type": "string"
|
|
778
778
|
},
|
|
779
|
+
"upstream_status": {
|
|
780
|
+
"type": "string",
|
|
781
|
+
"enum": [
|
|
782
|
+
"removed"
|
|
783
|
+
],
|
|
784
|
+
"description": "Verified removal of the source repository. This is separate from Hugging Bay serving eligibility."
|
|
785
|
+
},
|
|
786
|
+
"upstream_removed_observed_on": {
|
|
787
|
+
"type": "string",
|
|
788
|
+
"format": "date",
|
|
789
|
+
"description": "UTC date the upstream removal was observed."
|
|
790
|
+
},
|
|
779
791
|
"mainFile": {
|
|
780
792
|
"anyOf": [
|
|
781
793
|
{
|
package/hosted-mcp-manifest.mjs
CHANGED
|
@@ -45,6 +45,8 @@ export async function fetchHostedMcpManifest({
|
|
|
45
45
|
fetchImpl = globalThis.fetch,
|
|
46
46
|
timeoutMs = 10_000,
|
|
47
47
|
now = () => new Date().toISOString(),
|
|
48
|
+
wait = (ms) => new Promise((resolve) => setTimeout(resolve, ms)),
|
|
49
|
+
minRequestIntervalMs = 1_250,
|
|
48
50
|
} = {}) {
|
|
49
51
|
const sourceUrl = new URL(url);
|
|
50
52
|
if (sourceUrl.protocol !== "https:") throw new Error("hosted_manifest_url_must_use_https");
|
|
@@ -54,5 +56,28 @@ export async function fetchHostedMcpManifest({
|
|
|
54
56
|
signal: AbortSignal.timeout(Math.max(1_000, Number(timeoutMs) || 10_000)),
|
|
55
57
|
});
|
|
56
58
|
if (!response.ok) throw new Error(`hosted_manifest_http_${response.status}`);
|
|
57
|
-
|
|
59
|
+
const document = await response.json();
|
|
60
|
+
const discoveryEndpoint = document?.profiles?.discovery?.endpoint;
|
|
61
|
+
if (typeof discoveryEndpoint !== "string" || !discoveryEndpoint.trim()) throw new Error("hosted_manifest_discovery_endpoint_missing");
|
|
62
|
+
const profileUrl = new URL(discoveryEndpoint, sourceUrl);
|
|
63
|
+
if (profileUrl.protocol !== "https:" || profileUrl.origin !== sourceUrl.origin || profileUrl.searchParams.get("profile") !== "discovery") {
|
|
64
|
+
throw new Error("hosted_manifest_discovery_endpoint_invalid");
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
await wait(Math.max(1_000, Number(minRequestIntervalMs) || 1_250));
|
|
68
|
+
const listed = await fetchImpl(profileUrl, {
|
|
69
|
+
method: "POST",
|
|
70
|
+
redirect: "error",
|
|
71
|
+
headers: { Accept: "application/json", "Content-Type": "application/json", "User-Agent": "HuggingBay-MCP-Listing-Generator/1.0" },
|
|
72
|
+
body: JSON.stringify({ jsonrpc: "2.0", id: "listing-generator", method: "tools/list", params: {} }),
|
|
73
|
+
signal: AbortSignal.timeout(Math.max(1_000, Number(timeoutMs) || 10_000)),
|
|
74
|
+
});
|
|
75
|
+
if (!listed.ok) throw new Error(`hosted_discovery_http_${listed.status}`);
|
|
76
|
+
const rpc = await listed.json();
|
|
77
|
+
if (rpc?.error || !Array.isArray(rpc?.result?.tools) || rpc.result.tools.some((tool) => typeof tool?.name !== "string" || !tool.name.trim())) {
|
|
78
|
+
throw new Error("hosted_discovery_tools_list_invalid");
|
|
79
|
+
}
|
|
80
|
+
const tools = rpc.result.tools.map(({ name }) => ({ name }));
|
|
81
|
+
const discoveryDocument = { ...document, toolNames: tools.map((tool) => tool.name), tools };
|
|
82
|
+
return snapshotHostedMcpManifest(discoveryDocument, { sourceUrl: profileUrl.toString(), expectedVersion, generatedAt: now() });
|
|
58
83
|
}
|
package/mcp-download-via.mjs
CHANGED
|
@@ -38,9 +38,15 @@ export function tagMcpDownloadUrl(url, via = "mcp") {
|
|
|
38
38
|
return `${base}${separator}via=${encodeURIComponent(via)}${hash}`;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
// Lock URLs are canonical inputs to real pin/fetch readers, not attribution links.
|
|
42
|
+
function isExactDocument(value) {
|
|
43
|
+
return value?.schemaVersion === "hugging-bay.one-answer.v1"
|
|
44
|
+
|| ["hugging-bay.hb-lock.v1", "hugging-bay.hb-lock.v2"].includes(value?.schema);
|
|
45
|
+
}
|
|
46
|
+
|
|
41
47
|
function collect(value, mapping, via, seen) {
|
|
42
48
|
if (!value || typeof value !== "object" || seen.has(value)) return;
|
|
43
|
-
if (value
|
|
49
|
+
if (isExactDocument(value)) return;
|
|
44
50
|
seen.add(value);
|
|
45
51
|
if (Array.isArray(value)) {
|
|
46
52
|
for (const item of value) collect(item, mapping, via, seen);
|
|
@@ -72,16 +78,19 @@ function replacer(mapping) {
|
|
|
72
78
|
|
|
73
79
|
function rewrite(value, replace, seen) {
|
|
74
80
|
if (typeof value === "string") {
|
|
75
|
-
if (value
|
|
81
|
+
if (/^\s*[\[{]/.test(value)) {
|
|
76
82
|
try {
|
|
77
83
|
const parsed = JSON.parse(value);
|
|
78
|
-
if (parsed
|
|
84
|
+
if (isExactDocument(parsed)) return value;
|
|
85
|
+
// Walk JSON text as a representation too: its nested lock strings must
|
|
86
|
+
// retain the same bytes as structuredContent and embedded resources.
|
|
87
|
+
return JSON.stringify(rewrite(parsed, replace, new WeakMap()));
|
|
79
88
|
} catch { /* Plain text keeps the ordinary attribution rewrite. */ }
|
|
80
89
|
}
|
|
81
90
|
return replace(value);
|
|
82
91
|
}
|
|
83
92
|
if (!value || typeof value !== "object") return value;
|
|
84
|
-
if (value
|
|
93
|
+
if (isExactDocument(value)) return value;
|
|
85
94
|
if (seen.has(value)) return seen.get(value);
|
|
86
95
|
if (Array.isArray(value)) {
|
|
87
96
|
const out = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hugging-bay-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.18",
|
|
4
4
|
"description": "Open model files with recorded SHA-256 and license labels. Ask for what's missing.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"provenance": true
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
|
+
"verify:package": "node --check index.mjs",
|
|
42
43
|
"generate:listings": "node bin/generate-listing-metadata.mjs",
|
|
43
44
|
"prepublishOnly": "npm run generate:listings"
|
|
44
45
|
},
|
package/profile-manifest.mjs
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { listedDiscoveryToolNames } from "./surface-diet.mjs";
|
|
2
|
-
// The
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
// surface. Tool names and order match remoteMcpProfileDefinitions.discovery in
|
|
6
|
-
// apps/web/server.mjs; the hosted endpoint remains the deployment authority.
|
|
2
|
+
// The stdio discovery profile is the package's bounded broad catalog contract.
|
|
3
|
+
// The hosted profile can add explicitly listed host-only tools. Keep this
|
|
4
|
+
// manifest separate from the six-tool core default and full local tool list.
|
|
7
5
|
const DISCOVERY_TOOL_NAMES = Object.freeze(listedDiscoveryToolNames([
|
|
8
6
|
"hb_run_plan",
|
|
9
7
|
"search_artifacts",
|
|
@@ -37,19 +35,22 @@ const DISCOVERY_TOOL_NAMES = Object.freeze(listedDiscoveryToolNames([
|
|
|
37
35
|
"request_crawl_access",
|
|
38
36
|
"write_receipt",
|
|
39
37
|
]));
|
|
38
|
+
export const HOSTED_ONLY_DISCOVERY_TOOL_NAMES = Object.freeze(["verify"]);
|
|
40
39
|
|
|
41
|
-
// The `verify` profile is the
|
|
42
|
-
// set plus the run-proof lookup
|
|
43
|
-
//
|
|
44
|
-
//
|
|
45
|
-
//
|
|
40
|
+
// The source stdio `verify` profile is the bounded verification surface: its
|
|
41
|
+
// discovery set plus the run-proof lookup when the separate unreleased opt-in
|
|
42
|
+
// is enabled. This manifest does not define the hosted ?profile=verify tool
|
|
43
|
+
// list. Its explicit allowlist prevents a stdio verify launcher from reaching
|
|
44
|
+
// privileged tools (create_publisher_api_key, approve_mirror_batch,
|
|
45
|
+
// run_mirror_batch, ...) even when it holds a publisher/admin token. `full`
|
|
46
|
+
// remains the only unbounded stdio profile.
|
|
46
47
|
const VERIFY_TOOL_NAMES = Object.freeze([...DISCOVERY_TOOL_NAMES, "get_accepted_run_proof"]);
|
|
47
48
|
|
|
48
|
-
// agent-contract-v1: the
|
|
49
|
+
// agent-contract-v1: the six-tool core profile (prior-art move 18). Find,
|
|
49
50
|
// fit, read one model, decide. Every core tool only reads and needs no key.
|
|
50
|
-
// This is the one source of truth for the core
|
|
51
|
-
//
|
|
52
|
-
// tests/agent-tool-parity-20261112 fails on drift. find_runnable leads because
|
|
51
|
+
// This is the one source of truth for the six-tool core. Stdio also lists its
|
|
52
|
+
// local-only ask_url draft builder. llms.txt derives the core list from here,
|
|
53
|
+
// and tests/agent-tool-parity-20261112 fails on drift. find_runnable leads because
|
|
53
54
|
// it always answers; hb_run_plan only answers for hardware with a fresh signed
|
|
54
55
|
// run, so it comes last (audit B5).
|
|
55
56
|
// get_download (agent-dist 2026-11-13) follows get_model: one call gives the
|
package/public-note-copy.mjs
CHANGED
|
@@ -188,6 +188,11 @@ export function projectMcpPublicNotes(payload, options = {}) {
|
|
|
188
188
|
const { result } = payload;
|
|
189
189
|
const toolName = options.toolName ?? result.metadata?.tool ?? result.structuredContent?.hb_result?.tool ?? null;
|
|
190
190
|
if (toolName != null) options = { ...options, toolName };
|
|
191
|
+
// These successful tool results carry exact lock text, signed links and
|
|
192
|
+
// commands. They already have the download module's note; prose projection
|
|
193
|
+
// would change protocol bytes. The hosted caller has applied its safety guards.
|
|
194
|
+
if (!result.isError && ((toolName === "get_download" && result.structuredContent.schema === "hugging-bay.download-link.v1")
|
|
195
|
+
|| (toolName === "verify_lock" && result.structuredContent.schema === "hugging-bay.lock-check.v1"))) return payload;
|
|
191
196
|
const structuredContent = projectPublicNote(result.structuredContent, { ...options, appendNote: true });
|
|
192
197
|
// Text-only clients read content[].text alone, so a plain-text pointer keeps
|
|
193
198
|
// the sentence whenever the structured representation carries the note.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CORE_TOOL_NAMES, MCP_PROFILE_MANIFEST } from "./profile-manifest.mjs";
|
|
1
|
+
import { CORE_TOOL_NAMES, HOSTED_ONLY_DISCOVERY_TOOL_NAMES, MCP_PROFILE_MANIFEST } from "./profile-manifest.mjs";
|
|
2
2
|
import { MCP_RELEASE_VERSION } from "./release-authority.mjs";
|
|
3
3
|
import { hostedDiscoveryToolNamesSha256 } from "./hosted-mcp-manifest.mjs";
|
|
4
4
|
|
|
@@ -6,25 +6,28 @@ export const REGISTRY_PUBLISHER_METADATA_KEY = "io.modelcontextprotocol.registry
|
|
|
6
6
|
export const HOSTED_MCP_MANIFEST_METADATA_KEY = "xyz.huggingbay/hosted-mcp-manifest";
|
|
7
7
|
|
|
8
8
|
export const STDIO_DISCOVERY_TOOL_NAMES = Object.freeze([...MCP_PROFILE_MANIFEST.profiles.discovery.toolNames, ...MCP_PROFILE_MANIFEST.stdioOnlyToolNames]);
|
|
9
|
-
export const HOSTED_DISCOVERY_TOOL_NAMES =
|
|
9
|
+
export const HOSTED_DISCOVERY_TOOL_NAMES = Object.freeze([
|
|
10
|
+
...MCP_PROFILE_MANIFEST.profiles.discovery.toolNames,
|
|
11
|
+
...HOSTED_ONLY_DISCOVERY_TOOL_NAMES,
|
|
12
|
+
]);
|
|
10
13
|
export const STDIO_DISCOVERY_TOOL_COUNT = STDIO_DISCOVERY_TOOL_NAMES.length;
|
|
11
14
|
export const STDIO_DEFAULT_TOOL_NAMES = Object.freeze([...MCP_PROFILE_MANIFEST.profiles[MCP_PROFILE_MANIFEST.defaultProfile].toolNames, ...MCP_PROFILE_MANIFEST.stdioOnlyToolNames]);
|
|
12
15
|
export const STDIO_DEFAULT_TOOL_COUNT = STDIO_DEFAULT_TOOL_NAMES.length;
|
|
13
16
|
|
|
14
|
-
// npm 0.1.
|
|
15
|
-
// This observation is independent of the next source candidate.
|
|
17
|
+
// npm 0.1.17 receipt, registry readback 2026-11-13 (sha1, sha256, sha512 and size of the registry tarball).
|
|
16
18
|
export const REGISTRY_PUBLISHED_OBSERVATION = Object.freeze({
|
|
17
19
|
"packageName": "hugging-bay-mcp",
|
|
18
|
-
"packageVersion": "0.1.
|
|
19
|
-
"date": "2026-11-
|
|
20
|
-
"registryUrl": "https://registry.npmjs.org/hugging-bay-mcp/0.1.
|
|
21
|
-
"tarballUrl": "https://registry.npmjs.org/hugging-bay-mcp/-/hugging-bay-mcp-0.1.
|
|
22
|
-
"integrity": "sha512-
|
|
23
|
-
"sha256": "
|
|
24
|
-
"shasum": "
|
|
25
|
-
"sizeBytes":
|
|
26
|
-
"defaultToolCount":
|
|
27
|
-
"
|
|
20
|
+
"packageVersion": "0.1.17",
|
|
21
|
+
"date": "2026-11-13",
|
|
22
|
+
"registryUrl": "https://registry.npmjs.org/hugging-bay-mcp/0.1.17",
|
|
23
|
+
"tarballUrl": "https://registry.npmjs.org/hugging-bay-mcp/-/hugging-bay-mcp-0.1.17.tgz",
|
|
24
|
+
"integrity": "sha512-VuoFWUxxkyOAZin2pv0Yqs9uUk0Ok+y/Fo2nPJrzRi29TS7f0eFt5X2t/DX86o+GfBpGS3nhSoBrMMb12+iUbQ==",
|
|
25
|
+
"sha256": "f9dd11110da2d6e7f26c0f28ef4d681394e8d87769d492b569c0267dd9c051a4",
|
|
26
|
+
"shasum": "7d2c201dc963c4a8740c6a64f085cd2c437c69dd",
|
|
27
|
+
"sizeBytes": 257157,
|
|
28
|
+
"defaultToolCount": 7,
|
|
29
|
+
"coreToolCount": 6,
|
|
30
|
+
"hostedDiscoveryToolCount": 30,
|
|
28
31
|
"status": "Observed published on npm; official MCP Registry is a separately dated channel.",
|
|
29
32
|
"defaultProfile": "core"
|
|
30
33
|
});
|
|
@@ -37,7 +40,7 @@ export const REGISTRY_VERSIONED_DESCRIPTIONS = Object.freeze([
|
|
|
37
40
|
hostedDiscoveryTools: HOSTED_DISCOVERY_TOOL_NAMES.length,
|
|
38
41
|
defaultStdioDiscoveryTools: STDIO_DEFAULT_TOOL_COUNT,
|
|
39
42
|
description:
|
|
40
|
-
`
|
|
43
|
+
`Version ${MCP_RELEASE_VERSION} stdio defaults to seven tools: the six-tool core profile plus local-only ask_url. Hosted core has six tools. Hosted discovery has ${HOSTED_DISCOVERY_TOOL_NAMES.length} tools; stdio discovery has ${STDIO_DISCOVERY_TOOL_COUNT}, including ask_url. request_missing returns an id; get_request reads status. run_local is stdio-only when HUGGING_BAY_MCP_ENABLE_RUN_LOCAL=1.`,
|
|
41
44
|
}),
|
|
42
45
|
Object.freeze({
|
|
43
46
|
packageVersion: "0.1.13",
|
|
@@ -72,7 +75,7 @@ export const REGISTRY_TOOL_FLOWS = Object.freeze({
|
|
|
72
75
|
}),
|
|
73
76
|
});
|
|
74
77
|
|
|
75
|
-
export function registryNpmEnvironmentVariables({ packageVersion = MCP_RELEASE_VERSION } = {}) {
|
|
78
|
+
export function registryNpmEnvironmentVariables({ packageVersion = MCP_RELEASE_VERSION, publishedObservation = false } = {}) {
|
|
76
79
|
if (![MCP_RELEASE_VERSION, REGISTRY_PUBLISHED_OBSERVATION.packageVersion, "0.1.8"].includes(packageVersion)) {
|
|
77
80
|
throw new Error("registry_package_version_unmeasured");
|
|
78
81
|
}
|
|
@@ -93,7 +96,11 @@ export function registryNpmEnvironmentVariables({ packageVersion = MCP_RELEASE_V
|
|
|
93
96
|
{
|
|
94
97
|
name: "HUGGING_BAY_MCP_PROFILE",
|
|
95
98
|
description:
|
|
96
|
-
|
|
99
|
+
`${packageVersion === MCP_RELEASE_VERSION && !publishedObservation
|
|
100
|
+
? `Source ${packageVersion} defaults to the six-tool read-only core: ${CORE_TOOL_NAMES.join(", ")}. Stdio also lists local-only ask_url (seven tools total). Hosted discovery has ${HOSTED_DISCOVERY_TOOL_NAMES.length} tools; source stdio discovery has ${STDIO_DISCOVERY_TOOL_COUNT}, including ask_url. `
|
|
101
|
+
: publishedObservation
|
|
102
|
+
? `Observed npm ${packageVersion} defaults to ${REGISTRY_PUBLISHED_OBSERVATION.defaultToolCount} stdio tools: six read-only core tools plus local-only ask_url. Current source stdio also lists ${STDIO_DEFAULT_TOOL_COUNT} tools. `
|
|
103
|
+
: `npm ${packageVersion} stdio defaults to seven tools: six read-only core tools plus local-only ask_url. Explicit discovery had ${REGISTRY_PUBLISHED_OBSERVATION.hostedDiscoveryToolCount} hosted tools when the npm release was observed. `}Full and verify are opt-in profiles; inspect tools/list for their schemas and counts. Accepted-run-proof access requires verify and HUGGING_BAY_MCP_ENABLE_UNRELEASED_RUN_PROOF=1.`,
|
|
97
104
|
isRequired: false,
|
|
98
105
|
default: coreDefault ? MCP_PROFILE_MANIFEST.defaultProfile : "discovery",
|
|
99
106
|
choices: Object.keys(MCP_PROFILE_MANIFEST.profiles).filter((name) => name !== "core" || packageVersion !== "0.1.8"),
|
|
@@ -144,8 +151,8 @@ export function registryPublisherProvidedMetadata({ hostedManifest = null } = {}
|
|
|
144
151
|
},
|
|
145
152
|
directoryListing: {
|
|
146
153
|
longDescription: hostedManifest
|
|
147
|
-
? `Find open model files with recorded SHA-256 hashes and license labels. Observed hosted discovery has ${discoveryToolCount} tools; source
|
|
148
|
-
: `
|
|
154
|
+
? `Find open model files with recorded SHA-256 hashes and license labels. Observed hosted discovery has ${discoveryToolCount} tools; its core profile has six read-only tools. npm 0.1.17 and current source stdio default to seven tools, including local-only ask_url. Source stdio discovery has ${STDIO_DISCOVERY_TOOL_COUNT} tools. Public reads need no account.`
|
|
155
|
+
: `Hugging Bay finds open model files with recorded SHA-256 hashes and license labels. npm 0.1.17 and current source stdio default to seven tools: six read-only core tools plus local-only ask_url. Hosted discovery has ${HOSTED_DISCOVERY_TOOL_NAMES.length} tools; stdio discovery has ${STDIO_DISCOVERY_TOOL_COUNT}. Public reads need no account.`,
|
|
149
156
|
categories: ["models", "search"],
|
|
150
157
|
tags: ["gguf", "local-llm", "huggingface-alternative", "sha256"],
|
|
151
158
|
},
|
|
@@ -156,8 +163,8 @@ export function registryPublisherProvidedMetadata({ hostedManifest = null } = {}
|
|
|
156
163
|
hostedDiscoveryTools: discoveryToolCount,
|
|
157
164
|
defaultStdioDiscoveryTools: REGISTRY_PUBLISHED_OBSERVATION.defaultToolCount,
|
|
158
165
|
description: `${hostedManifest.discoveryToolNamesSha256 === hostedDiscoveryToolNamesSha256(HOSTED_DISCOVERY_TOOL_NAMES)
|
|
159
|
-
? `npm ${REGISTRY_PUBLISHED_OBSERVATION.packageVersion} stdio
|
|
160
|
-
: `npm ${REGISTRY_PUBLISHED_OBSERVATION.packageVersion} defaults to
|
|
166
|
+
? `Observed npm ${REGISTRY_PUBLISHED_OBSERVATION.packageVersion} stdio defaults to seven tools: six read-only core tools plus local-only ask_url. Current source stdio also lists ${STDIO_DEFAULT_TOOL_COUNT} tools. Hosted /api/mcp ${hostedManifest.sourceVersion} has ${discoveryToolCount} discovery tools.`
|
|
167
|
+
: `Observed npm ${REGISTRY_PUBLISHED_OBSERVATION.packageVersion} stdio defaults to seven tools: six read-only core tools plus local-only ask_url. Current source stdio also lists ${STDIO_DEFAULT_TOOL_COUNT} tools. Hosted /api/mcp ${hostedManifest.sourceVersion} lists ${discoveryToolCount} discovery tools.`} request_missing returns an id; get_request reads status. run_local is stdio-only when HUGGING_BAY_MCP_ENABLE_RUN_LOCAL=1.`,
|
|
161
168
|
},
|
|
162
169
|
...REGISTRY_VERSIONED_DESCRIPTIONS.slice(1),
|
|
163
170
|
] : REGISTRY_VERSIONED_DESCRIPTIONS,
|
package/run-plan.mjs
CHANGED
|
@@ -19,22 +19,65 @@ export const RUN_PLAN_TOOL = Object.freeze({
|
|
|
19
19
|
} },
|
|
20
20
|
});
|
|
21
21
|
|
|
22
|
+
// Desktop card variants only; the memory size must match (laptop parts differ).
|
|
23
|
+
const RTX_DESKTOP_GB = Object.freeze({ 3060: 12, 4060: 8, 4090: 24 });
|
|
24
|
+
|
|
25
|
+
// Any explicitly named discrete GPU family or model. A description that names
|
|
26
|
+
// one of these besides the single mapped card names a second machine or card.
|
|
27
|
+
const GPU_FAMILY = /\b(?:rtx|gtx|gt[\s-]*\d{3,4}|geforce|nvidia|quadro|tesla|titan|radeon|rx[\s-]*\d{3,4}|vega|instinct|mi\d{2,3}|arc|a\d{3,4}m?|egpu)\b/;
|
|
28
|
+
|
|
22
29
|
export function normalizeRunHardware(value) {
|
|
23
30
|
const raw = String(value || '').trim().toLowerCase();
|
|
31
|
+
if (/^rtx(3060-12|4060-8|4090-24)$/.test(raw)) return raw;
|
|
32
|
+
// Exactly one memory size and at most one chip, or the text names several
|
|
33
|
+
// machines and must stay a conservative miss.
|
|
34
|
+
const memories = [...new Set([...raw.matchAll(/\b(\d+)\s*-?gb\b/g)].map(m => m[1]))];
|
|
35
|
+
if (memories.length !== 1) return raw;
|
|
36
|
+
const memory = memories[0];
|
|
37
|
+
// A chassis name ("MacBook Pro") is not a chip tier ("M2 Pro"): drop it first.
|
|
38
|
+
const chipText = raw.replace(/\b(?:macbook[\s-]*(?:pro|air)?|mac[\s-]*(?:mini|studio|pro)|imac(?:[\s-]*pro)?)\b/g, ' ');
|
|
24
39
|
// Only an explicit chip and memory amount can map to an Apple class.
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
if (
|
|
28
|
-
|
|
40
|
+
const chips = [...new Set([...chipText.matchAll(/\bm([1-5])\b/g)].map(m => m[1]))];
|
|
41
|
+
if (chips.length > 1) return raw;
|
|
42
|
+
if (chips.length) {
|
|
43
|
+
// An Apple chip next to any discrete GPU names two machines: never pick one.
|
|
44
|
+
if (GPU_FAMILY.test(raw) || /\b(pro|max|ultra)\b/.test(chipText)) return raw;
|
|
45
|
+
return `apple-m${chips[0]}-${memory}gb`;
|
|
46
|
+
}
|
|
47
|
+
// Exactly one complete base desktop card (vendor words before it are fine);
|
|
48
|
+
// the model number must end there (4090M, 40900, 4090x are not 4090). A suffix
|
|
49
|
+
// (Ti, Super, D), a laptop part, or any other GPU family or bare model number
|
|
50
|
+
// left after removing that one card keeps the miss.
|
|
51
|
+
const cards = [...raw.matchAll(/(?:\bnvidia[\s-]*)?(?:\bgeforce[\s-]*)?\brtx[\s-]*(\d{4})(?:([\s-]*(?:ti|super|d))\b|(?![\da-z]))/g)];
|
|
52
|
+
if (cards.length !== 1 || cards[0][2] || !RTX_DESKTOP_GB[cards[0][1]]) return raw;
|
|
53
|
+
const rest = raw.slice(0, cards[0].index) + ' ' + raw.slice(cards[0].index + cards[0][0].length);
|
|
54
|
+
if (GPU_FAMILY.test(rest) || /(?:^|[\s\/,(&+])\d{3,4}(?=$|[\s\/,)&+])/.test(rest.replace(/\b\d+\s*-?gb\b/g, ' ').replace(new RegExp(`\\b${cards[0][1]}\\b`, 'g'), ' '))) return raw;
|
|
55
|
+
if (Number(memory) !== RTX_DESKTOP_GB[cards[0][1]] || /\b(laptop|mobile|notebook|max-q)\b/.test(raw)) return raw;
|
|
56
|
+
return `rtx${cards[0][1]}-${memory}`;
|
|
29
57
|
}
|
|
30
58
|
|
|
31
|
-
|
|
59
|
+
const MISS_TEXT = Object.freeze({
|
|
60
|
+
exact_hardware_class_required: 'That hardware is not a tested class.',
|
|
61
|
+
no_recent_comparable_proof: 'No fresh signed run on this hardware class.',
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
export const runPlanMiss = (hardware, reason = 'no_recent_comparable_proof', hardwareClasses) => ({
|
|
32
65
|
state: 'no_proven_match', hardware, pick: null, command: null, hb_lock: null, reason,
|
|
33
66
|
// A no-match must still hand the agent a useful next call, not a guide URL:
|
|
34
67
|
// find_runnable answers the same task and hardware with an estimated pick.
|
|
35
68
|
next: 'Call find_runnable with the same task and hardware for an estimated fit (not a tested run).',
|
|
69
|
+
...(Array.isArray(hardwareClasses) && hardwareClasses.length ? { hardwareClasses: [...hardwareClasses] } : {}),
|
|
36
70
|
});
|
|
37
71
|
|
|
72
|
+
// Text-only clients get a sentence and the next call, never a bare reason code.
|
|
73
|
+
function runPlanMissText(payload) {
|
|
74
|
+
const parts = [`${payload.reason || 'no_proven_match'}.`];
|
|
75
|
+
if (MISS_TEXT[payload.reason]) parts.push(MISS_TEXT[payload.reason]);
|
|
76
|
+
if (payload.hardwareClasses?.length) parts.push(`Classes: ${payload.hardwareClasses.join(', ')}.`);
|
|
77
|
+
if (payload.next) parts.push(payload.next);
|
|
78
|
+
return parts.join(' ');
|
|
79
|
+
}
|
|
80
|
+
|
|
38
81
|
// The caller must verify the fresh signed proof against the canonical loader.
|
|
39
82
|
// It must also provide the reconciled plan from the SAME finder invocation.
|
|
40
83
|
export function projectRunPlan(doc, { hardware, verifyProof, now = Date.now() } = {}) {
|
|
@@ -75,7 +118,7 @@ export const runPlanMcpResult = input => {
|
|
|
75
118
|
content: [{ type: 'text', text: payload.state === 'tested_on_your_class' ? 'Recorded run and hb.lock in structuredContent.'
|
|
76
119
|
: payload.estimate?.repo && payload.estimate?.file
|
|
77
120
|
? `${payload.reason}. Untested estimate: ${payload.estimate.repo} ${payload.estimate.file} (${payload.estimate.sizeGb} GB).`
|
|
78
|
-
: payload.reason }],
|
|
121
|
+
: payload.state === 'no_proven_match' ? runPlanMissText(payload) : payload.reason }],
|
|
79
122
|
structuredContent: payload, isError: payload.state === 'unavailable',
|
|
80
123
|
};
|
|
81
124
|
};
|
package/server.json
CHANGED
|
@@ -9,12 +9,20 @@
|
|
|
9
9
|
"id": "1284199117",
|
|
10
10
|
"subfolder": "packages/mcp"
|
|
11
11
|
},
|
|
12
|
-
"version": "0.1.
|
|
12
|
+
"version": "0.1.18",
|
|
13
13
|
"websiteUrl": "https://huggingbay.xyz",
|
|
14
14
|
"remotes": [
|
|
15
15
|
{
|
|
16
16
|
"type": "streamable-http",
|
|
17
|
-
"url": "https://huggingbay.xyz/api/mcp"
|
|
17
|
+
"url": "https://huggingbay.xyz/api/mcp",
|
|
18
|
+
"headers": [
|
|
19
|
+
{
|
|
20
|
+
"name": "Authorization",
|
|
21
|
+
"description": "Optional Bearer credential from your client secret store. Public discovery needs no key.",
|
|
22
|
+
"isRequired": false,
|
|
23
|
+
"isSecret": true
|
|
24
|
+
}
|
|
25
|
+
]
|
|
18
26
|
}
|
|
19
27
|
],
|
|
20
28
|
"packages": [
|
|
@@ -22,7 +30,7 @@
|
|
|
22
30
|
"registryType": "npm",
|
|
23
31
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
24
32
|
"identifier": "hugging-bay-mcp",
|
|
25
|
-
"version": "0.1.
|
|
33
|
+
"version": "0.1.18",
|
|
26
34
|
"transport": {
|
|
27
35
|
"type": "stdio"
|
|
28
36
|
},
|
|
@@ -41,7 +49,7 @@
|
|
|
41
49
|
},
|
|
42
50
|
{
|
|
43
51
|
"name": "HUGGING_BAY_MCP_PROFILE",
|
|
44
|
-
"description": "
|
|
52
|
+
"description": "Source 0.1.18 defaults to the six-tool read-only core: find_runnable, search_artifacts, get_model, get_download, get_serve_decision, hb_run_plan. Stdio also lists local-only ask_url (seven tools total). Hosted discovery has 30 tools; source stdio discovery has 30, including ask_url. Full and verify are opt-in profiles; inspect tools/list for their schemas and counts. Accepted-run-proof access requires verify and HUGGING_BAY_MCP_ENABLE_UNRELEASED_RUN_PROOF=1.",
|
|
45
53
|
"isRequired": false,
|
|
46
54
|
"default": "core",
|
|
47
55
|
"choices": [
|
|
@@ -69,7 +77,7 @@
|
|
|
69
77
|
"defaultToolNamesSha256": "52c3d611991a6234c3f819411afc5af9dcbdbf757abd454aa275db319e0801e2",
|
|
70
78
|
"discoveryToolCount": 30,
|
|
71
79
|
"discoveryToolNamesSha256": "7f0094342fb0e13f82e64d6b028c4dee85d88c351b792dff9a60ef748ad55617",
|
|
72
|
-
"manifestVersion": "0.1.
|
|
80
|
+
"manifestVersion": "0.1.18",
|
|
73
81
|
"explicitOptIn": [
|
|
74
82
|
"agent",
|
|
75
83
|
"discovery",
|
|
@@ -83,16 +91,17 @@
|
|
|
83
91
|
},
|
|
84
92
|
"publishedObservation": {
|
|
85
93
|
"packageName": "hugging-bay-mcp",
|
|
86
|
-
"packageVersion": "0.1.
|
|
87
|
-
"date": "2026-11-
|
|
88
|
-
"registryUrl": "https://registry.npmjs.org/hugging-bay-mcp/0.1.
|
|
89
|
-
"tarballUrl": "https://registry.npmjs.org/hugging-bay-mcp/-/hugging-bay-mcp-0.1.
|
|
90
|
-
"integrity": "sha512-
|
|
91
|
-
"sha256": "
|
|
92
|
-
"shasum": "
|
|
93
|
-
"sizeBytes":
|
|
94
|
-
"defaultToolCount":
|
|
95
|
-
"
|
|
94
|
+
"packageVersion": "0.1.17",
|
|
95
|
+
"date": "2026-11-13",
|
|
96
|
+
"registryUrl": "https://registry.npmjs.org/hugging-bay-mcp/0.1.17",
|
|
97
|
+
"tarballUrl": "https://registry.npmjs.org/hugging-bay-mcp/-/hugging-bay-mcp-0.1.17.tgz",
|
|
98
|
+
"integrity": "sha512-VuoFWUxxkyOAZin2pv0Yqs9uUk0Ok+y/Fo2nPJrzRi29TS7f0eFt5X2t/DX86o+GfBpGS3nhSoBrMMb12+iUbQ==",
|
|
99
|
+
"sha256": "f9dd11110da2d6e7f26c0f28ef4d681394e8d87769d492b569c0267dd9c051a4",
|
|
100
|
+
"shasum": "7d2c201dc963c4a8740c6a64f085cd2c437c69dd",
|
|
101
|
+
"sizeBytes": 257157,
|
|
102
|
+
"defaultToolCount": 7,
|
|
103
|
+
"coreToolCount": 6,
|
|
104
|
+
"hostedDiscoveryToolCount": 30,
|
|
96
105
|
"status": "Observed published on npm; official MCP Registry is a separately dated channel.",
|
|
97
106
|
"defaultProfile": "core"
|
|
98
107
|
},
|
|
@@ -101,7 +110,7 @@
|
|
|
101
110
|
"description": "Hugging Bay hosts open model files with recorded SHA-256 hashes and license labels, and a public agent board. Agents can read any run reports for a file before downloading, and post one after they run it. Reading needs no account. Posts are public, screened, and shown to other agents as quoted data."
|
|
102
111
|
},
|
|
103
112
|
"directoryListing": {
|
|
104
|
-
"longDescription": "
|
|
113
|
+
"longDescription": "Hugging Bay finds open model files with recorded SHA-256 hashes and license labels. npm 0.1.17 and current source stdio default to seven tools: six read-only core tools plus local-only ask_url. Hosted discovery has 30 tools; stdio discovery has 30. Public reads need no account.",
|
|
105
114
|
"categories": [
|
|
106
115
|
"models",
|
|
107
116
|
"search"
|
|
@@ -115,10 +124,10 @@
|
|
|
115
124
|
},
|
|
116
125
|
"versionedDescriptions": [
|
|
117
126
|
{
|
|
118
|
-
"packageVersion": "0.1.
|
|
119
|
-
"hostedDiscoveryTools":
|
|
127
|
+
"packageVersion": "0.1.18",
|
|
128
|
+
"hostedDiscoveryTools": 30,
|
|
120
129
|
"defaultStdioDiscoveryTools": 7,
|
|
121
|
-
"description": "
|
|
130
|
+
"description": "Version 0.1.18 stdio defaults to seven tools: the six-tool core profile plus local-only ask_url. Hosted core has six tools. Hosted discovery has 30 tools; stdio discovery has 30, including ask_url. request_missing returns an id; get_request reads status. run_local is stdio-only when HUGGING_BAY_MCP_ENABLE_RUN_LOCAL=1."
|
|
122
131
|
},
|
|
123
132
|
{
|
|
124
133
|
"packageVersion": "0.1.13",
|
|
@@ -157,11 +166,11 @@
|
|
|
157
166
|
}
|
|
158
167
|
},
|
|
159
168
|
"xyz.huggingbay/hosted-mcp-manifest": {
|
|
160
|
-
"sourceUrl": "https://huggingbay.xyz
|
|
161
|
-
"sourceVersion": "0.1.
|
|
162
|
-
"discoveryToolCount":
|
|
163
|
-
"discoveryToolNamesSha256": "
|
|
164
|
-
"generatedAt": "2026-11-
|
|
169
|
+
"sourceUrl": "https://huggingbay.xyz/api/mcp?profile=discovery",
|
|
170
|
+
"sourceVersion": "0.1.17",
|
|
171
|
+
"discoveryToolCount": 30,
|
|
172
|
+
"discoveryToolNamesSha256": "f40c34db18cb0ca002e4b3002204f215a6af6027f89fe183adab8a85ecfafca3",
|
|
173
|
+
"generatedAt": "2026-11-13T16:48:19.084Z"
|
|
165
174
|
}
|
|
166
175
|
}
|
|
167
176
|
}
|
package/tool-descriptions.mjs
CHANGED
|
@@ -41,7 +41,7 @@ export const STDIO_TOOL_METADATA = {
|
|
|
41
41
|
},
|
|
42
42
|
"get_download": {
|
|
43
43
|
"title": "Get one exact file",
|
|
44
|
-
"description": "One call for one
|
|
44
|
+
"description": "One call for one ready file: a signed link (at most 300 s), SHA-256, size, revision, license label and hb.lock entry. Runner recipes, where supplied, are setup guidance. Use when you have picked a model and need the exact file to download and pin. Example: {\"id\":\"Qwen/Qwen3-4B-GGUF\",\"path\":\"Qwen3-4B-Q5_K_M.gguf\"}. The link lasts at most 300 s; call again for a fresh one. A matching SHA-256 proves the bytes, not that the model runs.",
|
|
45
45
|
"annotations": {
|
|
46
46
|
"title": "Get one exact file",
|
|
47
47
|
"readOnlyHint": true,
|
|
@@ -187,7 +187,7 @@ export const STDIO_TOOL_METADATA = {
|
|
|
187
187
|
},
|
|
188
188
|
"find_runnable": {
|
|
189
189
|
"title": "Find models for a machine",
|
|
190
|
-
"description": "
|
|
190
|
+
"description": "Estimate fit for a task and system RAM (ramGb) or hardware name or preset (hardware). provenOnly can return a signed run receipt and tested commands when enabled. Use when the user states RAM or VRAM and needs model recommendations, not fine-tuning. Example: {\"task\":\"chat\",\"hardware\":\"8gb-laptop\"}. Download is not run proof. provenOnly needs exact hardware and a run under 24 hours old. Follow retry guidance for pending results. Use detail=full for a budget miss where supported.",
|
|
191
191
|
"annotations": {
|
|
192
192
|
"title": "Find models for a machine",
|
|
193
193
|
"readOnlyHint": true,
|
|
@@ -1174,7 +1174,7 @@ export const STDIO_TOOL_METADATA = {
|
|
|
1174
1174
|
},
|
|
1175
1175
|
"search_artifacts": {
|
|
1176
1176
|
"title": "Search the catalog",
|
|
1177
|
-
"description": "Keyword search over model and dataset records, with task, license
|
|
1177
|
+
"description": "Keyword search over model and dataset records, with task, license and format filters, when you have no exact name. Returns ids and short summaries. Use when you need keyword or filtered catalog results without an exact model name. Example: {\"q\":\"embedding\",\"limit\":5}. Reads records; does not change files.",
|
|
1178
1178
|
"annotations": {
|
|
1179
1179
|
"title": "Search the catalog",
|
|
1180
1180
|
"readOnlyHint": true,
|
|
@@ -2951,7 +2951,7 @@ export const STDIO_TOOL_METADATA = {
|
|
|
2951
2951
|
},
|
|
2952
2952
|
"get_model": {
|
|
2953
2953
|
"title": "Model file and license",
|
|
2954
|
-
"description": "One model's license
|
|
2954
|
+
"description": "One model's license label and download readiness, with main file, SHA-256, size and RAM estimate when available. Tested runKit commands depend on evidence for that exact file. Use when you have a model id and need its short file, license and hardware summary. Example: {\"id\":\"hf-model-qwen-qwen3-0-6b-gguf\"}. If unavailable, read the retry guidance and the model's metadata or file-plan links.",
|
|
2955
2955
|
"annotations": {
|
|
2956
2956
|
"title": "Model file and license",
|
|
2957
2957
|
"readOnlyHint": true,
|
package/tool-discovery.mjs
CHANGED
|
@@ -235,10 +235,10 @@ const COMPACT_HINTS = Object.freeze({
|
|
|
235
235
|
const COMPACT_DESCRIPTIONS = Object.freeze({
|
|
236
236
|
hb_run_plan: 'Best model with a fresh signed run on your exact hardware class: a recorded command and hb.lock, or an explicit no-match. Most hardware has no run yet; call find_runnable first. Never downloads or runs. Example: {"task":"chat","hardware":"apple-m2-16gb"}.',
|
|
237
237
|
search_artifacts: 'Keyword search over model and dataset records with task, license and format filters, when you have no exact name. Returns ids and short summaries; detail=full adds the full record. Example: {"q":"embedding","limit":5}.',
|
|
238
|
-
find_runnable: '
|
|
239
|
-
get_model: 'One model by id: license, download readiness, main file, SHA-256, size, RAM estimate
|
|
238
|
+
find_runnable: 'Estimate fit for a task and system RAM (ramGb) or a hardware name or preset (hardware). Follow retry guidance if pending. If the compact answer exceeds its budget, use detail=full. provenOnly needs a signed run on the exact hardware in the last 24 hours. Example: {"task":"chat","hardware":"8gb-laptop"}.',
|
|
239
|
+
get_model: 'One model by id: license label, download readiness, main file, SHA-256, size, RAM estimate and tested runKit commands when available. For more files, read the catalog record or download plan. Follow retry guidance if unavailable.',
|
|
240
240
|
get_serve_decision: 'Whether a model\'s listed files are offered to download now, with the recorded reason. Runtime evidence is separate.',
|
|
241
|
-
get_download: '
|
|
241
|
+
get_download: 'For a ready file: signed link (at most 300 s), SHA-256, size, license label and hb.lock text. Runner recipes are setup guidance. Check the hash after download.',
|
|
242
242
|
});
|
|
243
243
|
const COMPACT_DESCRIPTION_DROP = [
|
|
244
244
|
/ ?Default answer is concise \(at most \d+ bytes\); use detail=full for the full record\./,
|