@isoloop/webmcp 0.1.0-next.8 → 0.1.0
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 +2 -2
- package/dist/index.d.ts +6 -5
- package/dist/index.js +6 -5
- package/package.json +13 -3
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# @isoloop/webmcp
|
|
2
2
|
|
|
3
|
-
**Experimental.** Registers the tools an [Isoloop](https://github.com/isoloop/isoloop) app exposes (`agents.expose`) with the browser's [WebMCP](https://webmachinelearning.github.io/webmcp/) API, so an agent built into the browser can call them
|
|
3
|
+
**Experimental.** Registers the tools an [Isoloop](https://github.com/isoloop/isoloop) app exposes (`agents.expose`) with the browser's [WebMCP](https://webmachinelearning.github.io/webmcp/) API, so an agent built into the browser can call them.
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
|
-
npm install @isoloop/webmcp
|
|
6
|
+
npm install @isoloop/webmcp @isoloop/host
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
```ts
|
package/dist/index.d.ts
CHANGED
|
@@ -32,16 +32,17 @@ import { Kernel } from "@isoloop/host";
|
|
|
32
32
|
* what it does; asking the user before a consequential call is the agent's
|
|
33
33
|
* job.
|
|
34
34
|
*
|
|
35
|
-
* ```ts
|
|
36
|
-
* import { connectWebMCP } from '@isoloop/webmcp';
|
|
37
|
-
* const disconnect = connectWebMCP(kernel);
|
|
38
|
-
* ```
|
|
39
|
-
*
|
|
40
35
|
* @param kernel A kernel created with `agents.expose` (only `tools()` and
|
|
41
36
|
* `request()` are used).
|
|
42
37
|
* @returns A function that unregisters the tools.
|
|
43
38
|
* @throws {KernelError} `invalid_config` when one of the tools is already
|
|
44
39
|
* registered by an earlier `connectWebMCP` on this page.
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* import { connectWebMCP } from '@isoloop/webmcp';
|
|
43
|
+
*
|
|
44
|
+
* const disconnect = connectWebMCP(kernel);
|
|
45
|
+
* ```
|
|
45
46
|
* @experimental
|
|
46
47
|
*/
|
|
47
48
|
export declare function connectWebMCP(kernel: Pick<Kernel, "tools" | "request">): () => void;
|
package/dist/index.js
CHANGED
|
@@ -64,16 +64,17 @@ function follow(target, signals) {
|
|
|
64
64
|
* what it does; asking the user before a consequential call is the agent's
|
|
65
65
|
* job.
|
|
66
66
|
*
|
|
67
|
-
* ```ts
|
|
68
|
-
* import { connectWebMCP } from '@isoloop/webmcp';
|
|
69
|
-
* const disconnect = connectWebMCP(kernel);
|
|
70
|
-
* ```
|
|
71
|
-
*
|
|
72
67
|
* @param kernel A kernel created with `agents.expose` (only `tools()` and
|
|
73
68
|
* `request()` are used).
|
|
74
69
|
* @returns A function that unregisters the tools.
|
|
75
70
|
* @throws {KernelError} `invalid_config` when one of the tools is already
|
|
76
71
|
* registered by an earlier `connectWebMCP` on this page.
|
|
72
|
+
* @example
|
|
73
|
+
* ```ts
|
|
74
|
+
* import { connectWebMCP } from '@isoloop/webmcp';
|
|
75
|
+
*
|
|
76
|
+
* const disconnect = connectWebMCP(kernel);
|
|
77
|
+
* ```
|
|
77
78
|
* @experimental
|
|
78
79
|
*/
|
|
79
80
|
function connectWebMCP(kernel) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@isoloop/webmcp",
|
|
3
|
-
"version": "0.1.0
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Experimental: registers an Isoloop app's exposed tools with the browser's WebMCP API, for AI agents.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"isoloop",
|
|
7
|
+
"web-workers",
|
|
8
|
+
"event-loop",
|
|
9
|
+
"isolation",
|
|
10
|
+
"webmcp",
|
|
11
|
+
"mcp",
|
|
12
|
+
"ai-agents"
|
|
13
|
+
],
|
|
14
|
+
"homepage": "https://isoloop.dev/docs/api/webmcp/",
|
|
5
15
|
"license": "MIT",
|
|
6
16
|
"type": "module",
|
|
7
17
|
"sideEffects": false,
|
|
@@ -20,7 +30,7 @@
|
|
|
20
30
|
}
|
|
21
31
|
},
|
|
22
32
|
"dependencies": {
|
|
23
|
-
"@isoloop/host": "0.1.0
|
|
33
|
+
"@isoloop/host": "0.1.0"
|
|
24
34
|
},
|
|
25
35
|
"devDependencies": {
|
|
26
36
|
"typescript": "7.0.2"
|