hugging-bay-mcp 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -11,16 +11,23 @@
11
11
 
12
12
  ## Profiles: stdio and hosted
13
13
 
14
+ **Source candidate:** `0.1.7` is not published on npm. Install commands above
15
+ remain pinned to the recorded `0.1.6` publication. Inspect this candidate with
16
+ `node packages/mcp/index.mjs` from the repository root.
17
+
18
+ **What's new in 0.1.7:** `request_missing` joins the 17-tool default profile,
19
+ and stdio tool descriptions match the hosted wording.
20
+
14
21
  The stdio launcher defaults to the bounded first-call profile; the hosted
15
22
  endpoint's discovery profile adds the board and request tools. The package keeps
16
23
  the broader catalog available, but a client must opt into it explicitly:
17
24
 
18
25
  | Transport/profile | `tools/list` | What it is |
19
26
  | --- | --- | --- |
20
- | stdio default (`npx -y hugging-bay-mcp@0.1.6`) | **16 tools** | the original discovery front door, in the hosted order: `recommend_specialist`, `get_agent_discovery`, `search_artifacts`, `resolve_artifact`, `get_artifact`, `list_files`, `get_artifact_card`, `deployment_plan`, `find_runnable`, `bakeoff`, `blackboard`, `get_source_coverage`, `get_ranking`, `get_citation_pack`, `list_topics`, `get_source_request_status` |
21
- | stdio `--profile full` | **105 tools** at this source baseline | the complete current stdio catalog; use `tools/list` as the authority rather than hard-coding the count |
27
+ | stdio candidate default (`node packages/mcp/index.mjs`) | **17 tools** | the discovery tools in the retained hosted order, followed by `request_missing`: `recommend_specialist`, `get_agent_discovery`, `search_artifacts`, `resolve_artifact`, `get_artifact`, `list_files`, `get_artifact_card`, `deployment_plan`, `find_runnable`, `bakeoff`, `blackboard`, `get_source_coverage`, `get_ranking`, `get_citation_pack`, `list_topics`, `get_source_request_status`, `request_missing` |
28
+ | stdio `--profile full` | **106 tools** at this source baseline | the complete current stdio catalog; use `tools/list` as the authority rather than hard-coding the count |
22
29
  | stdio `--profile verify` | advanced opt-in profile | the explicit verification surface; run-proof access still requires `HUGGING_BAY_MCP_ENABLE_UNRELEASED_RUN_PROOF=1` |
23
- | hosted `https://huggingbay.xyz/api/mcp` | **26 tools** on 2026-10-13 | the deployed discovery profile: the 16 stdio tools above plus the hosted board, request and compact-answer tools; `tools/list` is the authority. Other hosted profiles are selected with `?profile=` (see `https://huggingbay.xyz/.well-known/mcp.json`) |
30
+ | hosted `https://huggingbay.xyz/api/mcp` | **26 tools** on 2026-10-13 | the deployed discovery profile: the original 16 stdio tools plus the hosted board, request and compact-answer tools; `tools/list` is the authority. Other hosted profiles are selected with `?profile=` (see `https://huggingbay.xyz/.well-known/mcp.json`) |
24
31
 
25
32
  The default is also selected when `HUGGING_BAY_MCP_PROFILE` is empty. Use
26
33
  `--profile full` or `HUGGING_BAY_MCP_PROFILE=full` for the complete stdio
@@ -34,6 +41,7 @@ with `mcp_tool_not_in_profile`.
34
41
 
35
42
  | Tool | What it returns |
36
43
  | --- | --- |
44
+ | `request_missing` | Ask for a missing model, file format or capability with `{wanted, task}`. Stores demand and returns an id; does not promise a build. Input is checked and cleaned locally before any request. |
37
45
  | `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. |
38
46
  | `find_runnable` | One call: task → runnable model, with hash-verified run commands inlined when the pick is genuinely hosted (honest null otherwise). |
39
47
  | `bakeoff` | Your labeled rows → the warm Bay Run specialists scored on them → the winner's exact call and weight hash. |
package/index.mjs CHANGED
@@ -13,6 +13,8 @@ import {
13
13
  import { PUBLIC_NOTE_SENTENCE, projectPublicNote } from "./public-note-copy.mjs";
14
14
  import { MCP_PROFILE_MANIFEST } from "./profile-manifest.mjs";
15
15
  import { mcpStdioToolArgumentsValid } from "./tool-input-validation.mjs";
16
+ import { withStdioToolMetadata } from "./tool-descriptions.mjs";
17
+ import { REQUEST_MISSING_TOOL, validateRequestMissing } from "./request-missing.mjs";
16
18
  const apiBase = process.env.HUGGING_BAY_API || "https://huggingbay.xyz";
17
19
  const token =
18
20
  process.env.HUGGING_BAY_TOKEN ||
@@ -62,6 +64,7 @@ const RUN_PROOF_RESOURCE_TEMPLATE = {
62
64
  };
63
65
 
64
66
  const tools = [
67
+ REQUEST_MISSING_TOOL,
65
68
  {
66
69
  name: "blackboard",
67
70
  description: [
@@ -1494,7 +1497,7 @@ const tools = [
1494
1497
  },
1495
1498
  },
1496
1499
  ];
1497
- for (let i = 0; i < tools.length; i++) tools[i] = withCompactAnswerSchema(tools[i]);
1500
+ for (let i = 0; i < tools.length; i++) tools[i] = withStdioToolMetadata(withCompactAnswerSchema(tools[i]));
1498
1501
 
1499
1502
  // `deployment_plan` already exists in the hosted discovery profile, but is
1500
1503
  // served in-process by the catalog and therefore was never part of the older
@@ -1512,7 +1515,7 @@ const hostedProfileOnlyTools = Object.freeze([
1512
1515
  additionalProperties: false,
1513
1516
  },
1514
1517
  },
1515
- ]);
1518
+ ].map(withStdioToolMetadata));
1516
1519
  const runProofToolNames = new Set(["get_accepted_run_proof"]);
1517
1520
  const discoveryRank = new Map(HOSTED_DISCOVERY_TOOL_NAMES.map((name, index) => [name, index]));
1518
1521
  const orderedTools = [...tools].sort((a, b) => (discoveryRank.get(a.name) ?? HOSTED_DISCOVERY_TOOL_NAMES.length) - (discoveryRank.get(b.name) ?? HOSTED_DISCOVERY_TOOL_NAMES.length));
@@ -1796,7 +1799,8 @@ async function apiText(path, options = {}) {
1796
1799
 
1797
1800
  const mcpApiRequest = apiRequest;
1798
1801
  const mcpApiText = apiText;
1799
- async function callTool(name, input = {}, signal) {
1802
+ async function callTool(name, input, signal) {
1803
+ if (name !== "request_missing") input ||= {};
1800
1804
  const apiRequest = (path, options = {}) => mcpApiRequest(path, { ...options, ...(signal ? { signal } : {}) });
1801
1805
  const apiText = (path, options = {}) => mcpApiText(path, { ...options, ...(signal ? { signal } : {}) });
1802
1806
  if (runProofToolNames.has(name) && !runProofDiscoveryEnabled) throw runProofError("mcp_tool_not_in_profile");
@@ -1804,6 +1808,14 @@ async function callTool(name, input = {}, signal) {
1804
1808
  // verify/discovery launcher can never invoke a tool outside its profile.
1805
1809
  if (isBoundedProfile && !listedToolNames.has(name)) throw runProofError("mcp_tool_not_in_profile");
1806
1810
  if (name === "get_accepted_run_proof") return getAcceptedRunProof(input);
1811
+ if (name === "request_missing") {
1812
+ const checked = validateRequestMissing(input);
1813
+ if (!checked.ok) {
1814
+ const { ok, ...payload } = checked;
1815
+ throw Object.assign(new Error(checked.error), { rpcCode: -32602, payload });
1816
+ }
1817
+ return apiRequest("/api/v1/request-missing", { method: "POST", body: JSON.stringify(checked.value) });
1818
+ }
1807
1819
  if (name === "deployment_plan") {
1808
1820
  const params = paramsFrom(input, ["artifact"]);
1809
1821
  return apiRequest(`/api/agents/deployment-plan?${params}`);
@@ -2393,18 +2405,18 @@ async function handleMessage(message) {
2393
2405
  return;
2394
2406
  }
2395
2407
  if (message.method === "tools/list") {
2396
- result(id, mcpProfile === "full" ? { tools: listedTools } : projectPublicNote({ tools: listedTools }));
2408
+ result(id, mcpProfile === "full" ? { tools: listedTools } : projectPublicNote({ tools: listedTools }, { appendNote: true }));
2397
2409
  return;
2398
2410
  }
2399
2411
  if (message.method === "tools/call") {
2400
2412
  if (protocol.version !== "2025-06-18") {
2401
2413
  const tool = listedTools.find((tool) => tool.name === message.params?.name);
2402
2414
  if (!tool) { errorResult(id, -32602, "Unknown tool"); return; }
2403
- if (!mcpStdioToolArgumentsValid(tool.inputSchema, message.params?.arguments ?? {})) {
2415
+ if (tool.name !== "request_missing" && !mcpStdioToolArgumentsValid(tool.inputSchema, message.params?.arguments ?? {})) {
2404
2416
  result(id, { content: [{ type: "text", text: "Tool arguments do not match the input schema" }], isError: true }); return;
2405
2417
  }
2406
2418
  }
2407
- const output = await callTool(message.params?.name, message.params?.arguments || {}, controller?.signal);
2419
+ const output = await callTool(message.params?.name, message.params?.arguments, controller?.signal);
2408
2420
  const publicOutput = projectPublicNote(boundMcpAnswer(output, mcpAnswerSource(message.params?.name, message.params?.arguments || {}, output, apiBase)), { appendNote: true });
2409
2421
  // The note is said once in each representation: text and structured JSON are read independently.
2410
2422
  result(id, {
@@ -2440,7 +2452,12 @@ async function handleMessage(message) {
2440
2452
  } catch (error) {
2441
2453
  if (id !== undefined) {
2442
2454
  if (message.method === "tools/call" && protocol.version !== MCP_LEGACY_PROTOCOL_VERSIONS.at(-1) && listedTools.some((tool) => tool.name === message.params?.name)) {
2443
- result(id, { content: [{ type: "text", text: error instanceof Error ? error.message : "Tool failed" }], isError: true });
2455
+ const missingPayload = message.params?.name === "request_missing" && error?.payload;
2456
+ result(id, {
2457
+ content: [{ type: "text", text: missingPayload ? JSON.stringify(missingPayload) : error instanceof Error ? error.message : "Tool failed" }],
2458
+ ...(missingPayload ? { structuredContent: missingPayload } : {}),
2459
+ isError: true,
2460
+ });
2444
2461
  return;
2445
2462
  }
2446
2463
  errorResult(id, error?.rpcCode ?? -32000, error instanceof Error ? error.message : "Tool failed", error?.payload);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hugging-bay-mcp",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Open model files with recorded SHA-256 and licence labels. Ask for what's missing.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -40,6 +40,8 @@
40
40
  "compact-answers.mjs",
41
41
  "profile-manifest.mjs",
42
42
  "release-authority.mjs",
43
+ "tool-descriptions.mjs",
44
+ "request-missing.mjs",
43
45
  "tool-input-validation.mjs",
44
46
  "server.json",
45
47
  "README.md",
@@ -20,10 +20,11 @@ const DISCOVERY_TOOL_NAMES = Object.freeze([
20
20
  "get_citation_pack",
21
21
  "list_topics",
22
22
  "get_source_request_status",
23
+ "request_missing",
23
24
  ]);
24
25
 
25
26
  // The `verify` profile is the hosted VERIFICATION surface: the bounded discovery
26
- // read set plus the run-proof lookup. It is an explicit allowlist so a verify
27
+ // set plus the run-proof lookup. It is an explicit allowlist so a verify
27
28
  // launcher can NEVER reach privileged tools (create_publisher_api_key,
28
29
  // approve_mirror_batch, run_mirror_batch, ...) even when the launcher happens to
29
30
  // hold a publisher/admin token. `full` remains the only unbounded profile.
@@ -0,0 +1,32 @@
1
+ // Keep this contract aligned with apps/web/lib/agent-discovery.mjs.
2
+ // This shipped module has no dependency on the website.
3
+ export const REQUEST_MISSING_TOOL = Object.freeze({
4
+ name: "request_missing",
5
+ description: "Request a missing model and get an id to check its status. Same as request_feature with kind model for owner/name, otherwise feature, and public false. No contact details are collected; do not include secrets. A person reads every request; not every request gets built.",
6
+ inputSchema: Object.freeze({
7
+ type: "object",
8
+ required: ["wanted", "task"],
9
+ properties: {
10
+ wanted: { type: "string", minLength: 1, maxLength: 500, description: "What you were looking for (a model, dataset, tool, file, format, capability...)." },
11
+ task: { type: "string", minLength: 1, maxLength: 1000, description: "The job you were doing for your user when you needed it." },
12
+ },
13
+ additionalProperties: false,
14
+ }),
15
+ });
16
+
17
+ export function validateRequestMissing(input) {
18
+ if (!input || typeof input !== "object" || Array.isArray(input)) return { ok: false, error: "request_missing_arguments_invalid" };
19
+ const extra = Object.keys(input).filter((key) => key !== "wanted" && key !== "task");
20
+ if (extra.length) return { ok: false, error: "request_missing_arguments_invalid", details: { unexpected: extra.slice(0, 5) } };
21
+ const out = {};
22
+ for (const field of ["wanted", "task"]) {
23
+ const raw = input[field];
24
+ if (typeof raw !== "string") return { ok: false, error: "request_missing_arguments_invalid", details: { field, required: true } };
25
+ const value = raw.replace(/[\u0000-\u001f\u007f-\u009f]/g, " ").trim();
26
+ if (!value) return { ok: false, error: "request_missing_arguments_invalid", details: { field, required: true } };
27
+ const maxLength = field === "wanted" ? 500 : 1000;
28
+ if (value.length > maxLength) return { ok: false, error: "request_missing_too_long", details: { field, maxLength } };
29
+ out[field] = value;
30
+ }
31
+ return { ok: true, value: out };
32
+ }
package/server.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "url": "https://github.com/barneywohl/hugging-bay",
8
8
  "source": "github"
9
9
  },
10
- "version": "0.1.6",
10
+ "version": "0.1.7",
11
11
  "websiteUrl": "https://huggingbay.xyz",
12
12
  "remotes": [
13
13
  {
@@ -20,7 +20,7 @@
20
20
  "registryType": "npm",
21
21
  "registryBaseUrl": "https://registry.npmjs.org",
22
22
  "identifier": "hugging-bay-mcp",
23
- "version": "0.1.6",
23
+ "version": "0.1.7",
24
24
  "transport": {
25
25
  "type": "stdio"
26
26
  },
@@ -39,7 +39,7 @@
39
39
  },
40
40
  {
41
41
  "name": "HUGGING_BAY_MCP_PROFILE",
42
- "description": "Discovery defaults to the 16-tool stdio discovery front door; full explicitly selects the complete stdio catalog; verify is advanced opt-in. CLI --profile takes precedence. Accepted-run-proof access requires verify and HUGGING_BAY_MCP_ENABLE_UNRELEASED_RUN_PROOF=1.",
42
+ "description": "Discovery defaults to the 17-tool stdio discovery front door; full explicitly selects the complete stdio catalog; verify is advanced opt-in. CLI --profile takes precedence. Accepted-run-proof access requires verify and HUGGING_BAY_MCP_ENABLE_UNRELEASED_RUN_PROOF=1.",
43
43
  "isRequired": false,
44
44
  "default": "discovery",
45
45
  "choices": ["discovery", "full", "verify"]
@@ -51,7 +51,7 @@
51
51
  "io.modelcontextprotocol.registry/publisher-provided": {
52
52
  "sourceProfile": {
53
53
  "default": "discovery",
54
- "toolCount": 16,
54
+ "toolCount": 17,
55
55
  "explicitOptIn": [
56
56
  "full",
57
57
  "verify"