holon-ui 0.0.1-dev.25 → 0.0.1-dev.27
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/dist/runtime.web.js +3 -2
- package/package.json +4 -1
package/dist/runtime.web.js
CHANGED
|
@@ -17,13 +17,14 @@ export const connect = async ({ identity, contracts, own, endpoint }, { tools =
|
|
|
17
17
|
const register = (tool) => context.registerTool(tool, { signal }).then(() => true, error => console.warn(`WebMCP did not accept the tool ${tool.name}:`, error));
|
|
18
18
|
const offer = async (tool) => await register(tool) && offered.set(tool.name, tool);
|
|
19
19
|
const offers = Object.entries(tools).map(([name, tool]) => offer(pageTool(name, tool)));
|
|
20
|
-
const contracted = (name) => !contracts[own] || contracts[own].tools.some(tool => tool.name === name);
|
|
21
20
|
const listed = client.listTools({ signal }).then(({ tools: listed }) => {
|
|
21
|
+
const contract = contracts[own];
|
|
22
|
+
const contractedNames = contract && new Set(contract.tools.map(tool => tool.name));
|
|
22
23
|
for (const tool of listed) {
|
|
23
24
|
// MCP Apps: a tool whose visibility omits "model" must not reach the agent; absent means ["model", "app"].
|
|
24
25
|
// https://github.com/modelcontextprotocol/ext-apps/blob/main/specification/2026-01-26/apps.mdx#resource-discovery
|
|
25
26
|
// A typed client calls only its contract's tools, and an agent cannot write a file argument.
|
|
26
|
-
if (!visibleToModel(tool) || !
|
|
27
|
+
if (!visibleToModel(tool) || (contractedNames && !contractedNames.has(tool.name)))
|
|
27
28
|
continue;
|
|
28
29
|
const inputSchema = withoutFiles(tool.inputSchema);
|
|
29
30
|
if (typeof inputSchema === "object" && inputSchema !== null)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "holon-ui",
|
|
3
|
-
"version": "0.0.1-dev.
|
|
3
|
+
"version": "0.0.1-dev.27",
|
|
4
4
|
"description": "Typed MCP clients for browser pages: one connect() for MCP Apps views and WebMCP pages.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
},
|
|
9
9
|
"license": "Apache-2.0",
|
|
10
10
|
"type": "module",
|
|
11
|
+
"engines": {
|
|
12
|
+
"node": ">=22"
|
|
13
|
+
},
|
|
11
14
|
"sideEffects": false,
|
|
12
15
|
"publishConfig": {
|
|
13
16
|
"access": "public"
|