@b3os/mcp 0.2.1 → 0.2.3
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 +31 -6
- package/dist/handlers/_common.d.ts +27 -0
- package/dist/handlers/_common.js +39 -0
- package/dist/handlers/_common.js.map +1 -1
- package/dist/handlers/actions.d.ts +12 -1
- package/dist/handlers/actions.js +51 -2
- package/dist/handlers/actions.js.map +1 -1
- package/dist/handlers/agents.d.ts +2 -0
- package/dist/handlers/agents.js +41 -0
- package/dist/handlers/agents.js.map +1 -0
- package/dist/handlers/platform.d.ts +32 -0
- package/dist/handlers/platform.js +675 -0
- package/dist/handlers/platform.js.map +1 -0
- package/dist/handlers/render.d.ts +13 -0
- package/dist/handlers/render.js +170 -18
- package/dist/handlers/render.js.map +1 -1
- package/dist/handlers/routines.d.ts +8 -2
- package/dist/handlers/routines.js +175 -15
- package/dist/handlers/routines.js.map +1 -1
- package/dist/handlers/sandboxes.js +232 -15
- package/dist/handlers/sandboxes.js.map +1 -1
- package/dist/handlers/vision.d.ts +1 -6
- package/dist/handlers/vision.js +1 -13
- package/dist/handlers/vision.js.map +1 -1
- package/dist/server.d.ts +4 -0
- package/dist/server.js +4 -1
- package/dist/server.js.map +1 -1
- package/dist/stdio.d.ts +8 -0
- package/dist/stdio.js +18 -1
- package/dist/stdio.js.map +1 -1
- package/dist/table.gen.js +4868 -701
- package/dist/table.gen.js.map +1 -1
- package/dist/table.js +4 -0
- package/dist/table.js.map +1 -1
- package/dist/tools.js +3 -0
- package/dist/tools.js.map +1 -1
- package/package.json +2 -2
- package/src/handlers/_common.ts +53 -0
- package/src/handlers/actions.ts +50 -2
- package/src/handlers/agents.ts +50 -0
- package/src/handlers/platform.ts +728 -0
- package/src/handlers/render.ts +173 -16
- package/src/handlers/routines.ts +186 -14
- package/src/handlers/sandboxes.ts +259 -11
- package/src/handlers/vision.ts +1 -11
- package/src/server.ts +7 -1
- package/src/stdio.ts +21 -1
- package/src/table.gen.ts +4952 -707
- package/src/table.ts +4 -0
- package/src/tools.ts +3 -0
- package/table/core.mjs +13 -2
- package/table/node-toolsets.json +668 -0
- package/table/requests.json +1008 -10
- package/table/table.json +4869 -680
- package/table/tools/agents.mjs +232 -0
- package/table/tools/listeners.mjs +124 -0
- package/table/tools/platform.mjs +136 -3
- package/table/tools/render.mjs +196 -3
- package/table/tools/routines.mjs +55 -0
- package/table/tools/sandboxes.mjs +236 -1
- package/table/tools.mjs +3 -1
package/src/table.ts
CHANGED
|
@@ -23,6 +23,8 @@ import {
|
|
|
23
23
|
toolError,
|
|
24
24
|
} from "./handlers/_common.ts";
|
|
25
25
|
import { RUNNERS as actionRunners } from "./handlers/actions.ts";
|
|
26
|
+
import { RUNNERS as agentRunners } from "./handlers/agents.ts";
|
|
27
|
+
import { RUNNERS as platformRunners } from "./handlers/platform.ts";
|
|
26
28
|
import { RUNNERS as renderRunners } from "./handlers/render.ts";
|
|
27
29
|
import { type RoutineTool, RUNNERS as routineRunners } from "./handlers/routines.ts";
|
|
28
30
|
import { RUNNERS as sandboxRunners } from "./handlers/sandboxes.ts";
|
|
@@ -189,6 +191,8 @@ const RUNNERS: Record<string, Runner> = mergeRunners({
|
|
|
189
191
|
sandboxes: sandboxRunners,
|
|
190
192
|
routines: routineRunners,
|
|
191
193
|
actions: actionRunners,
|
|
194
|
+
platform: platformRunners,
|
|
195
|
+
agents: agentRunners,
|
|
192
196
|
});
|
|
193
197
|
|
|
194
198
|
// ---------------------------------------------------------------------------------------------------------------
|
package/src/tools.ts
CHANGED
|
@@ -107,10 +107,13 @@ export function sdkIO(b3: B3OS, traceparent?: string): ToolIO {
|
|
|
107
107
|
return events;
|
|
108
108
|
}
|
|
109
109
|
if (!op) {
|
|
110
|
+
// An operation no SDK namespace wraps (the trace route, the model call log): by path, to the edge when the
|
|
111
|
+
// edge serves it (platformGetTrace), else where the SDK sends node operations.
|
|
110
112
|
return b3.request(
|
|
111
113
|
{
|
|
112
114
|
method: req.method as Op["method"],
|
|
113
115
|
path: req.path,
|
|
116
|
+
...(req.servedBy === "edge" ? { edge: true } : {}),
|
|
114
117
|
query: req.query,
|
|
115
118
|
...(req.bodyKind === "none" ? {} : { body: req.body }),
|
|
116
119
|
...(req.bodyKind === "raw" ? { bodyType: "bytes" as const } : {}),
|
package/table/core.mjs
CHANGED
|
@@ -11,7 +11,8 @@ export const INSTRUCTIONS = [
|
|
|
11
11
|
"site, and vision_act to click, type or sign in on a page. Run code, shell commands, package installs and file",
|
|
12
12
|
"processing in a sandbox rather than on the user's machine: sandbox_create starts an isolated microVM that stops",
|
|
13
13
|
"by itself after timeout_s; then use sandbox_exec, sandbox_write_file and sandbox_read_file on its id, and",
|
|
14
|
-
"sandbox_delete when you are done. render_screenshot captures a page as an image
|
|
14
|
+
"sandbox_delete when you are done. render_screenshot captures a page as an image; render_video takes a goal",
|
|
15
|
+
"instead of beats; the render toolset restyles, shares and lists presets. To use a third-party service",
|
|
15
16
|
"(GitHub, Slack, Linear, Notion and others) call actions_search, then actions_describe for the input schema, then",
|
|
16
17
|
"actions_call; credentials come from the user's stored connections, never from tool arguments. Tools that start",
|
|
17
18
|
"long jobs (vision_crawl, render_video, routine_run) wait up to wait_s seconds, then return the job id: call the",
|
|
@@ -45,7 +46,17 @@ export const CORE = [
|
|
|
45
46
|
export const CORE_BUDGET = 15;
|
|
46
47
|
|
|
47
48
|
/** Product modules (tools/<product>.mjs) in the order their opt-in tools follow the core group. */
|
|
48
|
-
export const PRODUCTS = [
|
|
49
|
+
export const PRODUCTS = [
|
|
50
|
+
"sandboxes",
|
|
51
|
+
"vision",
|
|
52
|
+
"routines",
|
|
53
|
+
"infer",
|
|
54
|
+
"platform",
|
|
55
|
+
"render",
|
|
56
|
+
"actions",
|
|
57
|
+
"listeners",
|
|
58
|
+
"agents",
|
|
59
|
+
];
|
|
49
60
|
|
|
50
61
|
/**
|
|
51
62
|
* Claude Code's per-tool `_meta` (PD6, its MCP docs): it saves a text result over 50,000 characters to a file
|