@commandable/mcp 0.2.0 → 0.3.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/.output/nitro.json +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/51e7fb48-64de-429f-9375-7d1b1e5b5f80.json +1 -0
- package/.output/server/chunks/nitro/nitro.mjs +270 -78
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
- package/.output/server/chunks/routes/mcp/static.mjs +56 -0
- package/.output/server/chunks/routes/mcp/static.mjs.map +1 -0
- package/.output/server/chunks/routes/mcp.mjs +1 -1
- package/.output/server/chunks/routes/mcp.mjs.map +1 -1
- package/.output/server/package.json +1 -1
- package/README.md +8 -1
- package/bin/cli.mjs +5 -4
- package/package.json +2 -2
- package/.output/public/_nuxt/builds/meta/ee5097c4-b785-4b77-92d6-c16a7396d677.json +0 -1
package/.output/nitro.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"51e7fb48-64de-429f-9375-7d1b1e5b5f80","timestamp":1773690423756}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"51e7fb48-64de-429f-9375-7d1b1e5b5f80","timestamp":1773690423756,"prerendered":[]}
|
|
@@ -4428,7 +4428,7 @@ function _expandFromEnv(value) {
|
|
|
4428
4428
|
const _inlineRuntimeConfig = {
|
|
4429
4429
|
"app": {
|
|
4430
4430
|
"baseURL": "/",
|
|
4431
|
-
"buildId": "
|
|
4431
|
+
"buildId": "51e7fb48-64de-429f-9375-7d1b1e5b5f80",
|
|
4432
4432
|
"buildAssetsDir": "/_nuxt/",
|
|
4433
4433
|
"cdnURL": ""
|
|
4434
4434
|
},
|
|
@@ -7028,10 +7028,13 @@ class AbilityCatalog {
|
|
|
7028
7028
|
__publicField$2(this, "byId");
|
|
7029
7029
|
__publicField$2(this, "toolIndex");
|
|
7030
7030
|
__publicField$2(this, "extraToolDefinitions");
|
|
7031
|
+
__publicField$2(this, "includeBuilderAbility");
|
|
7032
|
+
var _a;
|
|
7031
7033
|
this.toolIndex = params.toolIndex;
|
|
7032
7034
|
this.extraToolDefinitions = params.extraToolDefinitions || /* @__PURE__ */ new Map();
|
|
7035
|
+
this.includeBuilderAbility = (_a = params.includeBuilderAbility) != null ? _a : true;
|
|
7033
7036
|
this.abilities = [
|
|
7034
|
-
{
|
|
7037
|
+
...this.includeBuilderAbility ? [{
|
|
7035
7038
|
id: BUILDER_ABILITY_ID,
|
|
7036
7039
|
integrationtype: "commandable",
|
|
7037
7040
|
integrationLabel: "Commandable",
|
|
@@ -7039,7 +7042,7 @@ class AbilityCatalog {
|
|
|
7039
7042
|
label: "Commandable Builder",
|
|
7040
7043
|
description: "Add integrations and vibe-code new tools (custom actions) against them.",
|
|
7041
7044
|
toolNames: [...BUILDER_TOOL_NAMES]
|
|
7042
|
-
},
|
|
7045
|
+
}] : [],
|
|
7043
7046
|
...this.buildAbilities(params.integrations)
|
|
7044
7047
|
];
|
|
7045
7048
|
this.byId = new Map(this.abilities.map((a) => [a.id, a]));
|
|
@@ -7304,10 +7307,16 @@ const META_TOOL_NAMES = {
|
|
|
7304
7307
|
function normalizeHintMarkdown(value) {
|
|
7305
7308
|
return value.replace(/\r\n/g, "\n").replace(/\\r\\n/g, "\n").replace(/\\n/g, "\n");
|
|
7306
7309
|
}
|
|
7307
|
-
function
|
|
7308
|
-
const path = fileURLToPath(new URL(
|
|
7310
|
+
function buildReadme(filename) {
|
|
7311
|
+
const path = fileURLToPath(new URL(`./${filename}`, globalThis._importMeta_.url));
|
|
7309
7312
|
return readFileSync(path, "utf8");
|
|
7310
7313
|
}
|
|
7314
|
+
function buildCommandableReadme(hasBuilderCtx) {
|
|
7315
|
+
return hasBuilderCtx ? buildReadme("commandable_readme_create.md") : buildReadme("commandable_readme_dynamic.md");
|
|
7316
|
+
}
|
|
7317
|
+
function buildStaticReadme() {
|
|
7318
|
+
return buildReadme("commandable_readme_static.md");
|
|
7319
|
+
}
|
|
7311
7320
|
function buildBuilderGuide() {
|
|
7312
7321
|
const path = fileURLToPath(new URL("./builder_guide.md", globalThis._importMeta_.url));
|
|
7313
7322
|
return readFileSync(path, "utf8");
|
|
@@ -7329,13 +7338,21 @@ function requireBuilderEnabled(sessionState, sessionId, toolName) {
|
|
|
7329
7338
|
throw new Error(`Tool not enabled in this session: ${toolName}. Enable the builder toolset (${BUILDER_ABILITY_ID}) via commandable_search_tools \u2192 commandable_enable_toolset first.`);
|
|
7330
7339
|
}
|
|
7331
7340
|
}
|
|
7341
|
+
function getReadmeToolDefinition() {
|
|
7342
|
+
return {
|
|
7343
|
+
name: META_TOOL_NAMES.readme,
|
|
7344
|
+
description: "Read this first. Returns a guide explaining how Commandable works and how to use the tools available in this session.",
|
|
7345
|
+
inputSchema: { type: "object", additionalProperties: false, properties: {}, required: [] }
|
|
7346
|
+
};
|
|
7347
|
+
}
|
|
7348
|
+
function handleStaticReadmeCall(name) {
|
|
7349
|
+
if (name === META_TOOL_NAMES.readme)
|
|
7350
|
+
return { handled: true, listChanged: false, result: { markdown: buildStaticReadme() } };
|
|
7351
|
+
return { handled: false };
|
|
7352
|
+
}
|
|
7332
7353
|
function getMetaToolDefinitions() {
|
|
7333
7354
|
return [
|
|
7334
|
-
|
|
7335
|
-
name: META_TOOL_NAMES.readme,
|
|
7336
|
-
description: "Read this first. Returns a guide explaining how Commandable works and how to discover/add integrations safely.",
|
|
7337
|
-
inputSchema: { type: "object", additionalProperties: false, properties: {}, required: [] }
|
|
7338
|
-
},
|
|
7355
|
+
getReadmeToolDefinition(),
|
|
7339
7356
|
{
|
|
7340
7357
|
name: META_TOOL_NAMES.searchTools,
|
|
7341
7358
|
description: `Search available toolsets (integration/toolset bundles) you can enable in this session. Call \`${META_TOOL_NAMES.readme}\` first if you haven't yet.`,
|
|
@@ -7375,11 +7392,149 @@ function getMetaToolDefinitions() {
|
|
|
7375
7392
|
}
|
|
7376
7393
|
];
|
|
7377
7394
|
}
|
|
7395
|
+
function getBuilderToolDefinitions() {
|
|
7396
|
+
return [
|
|
7397
|
+
{
|
|
7398
|
+
name: META_TOOL_NAMES.listPrebuiltIntegrations,
|
|
7399
|
+
description: `Builder tool. List available pre-built integrations you can add (from the integration catalog) and show which are already configured.`,
|
|
7400
|
+
inputSchema: {
|
|
7401
|
+
type: "object",
|
|
7402
|
+
additionalProperties: false,
|
|
7403
|
+
properties: {
|
|
7404
|
+
query: { type: "string" },
|
|
7405
|
+
limit: { type: "number", minimum: 1, maximum: 100 }
|
|
7406
|
+
},
|
|
7407
|
+
required: []
|
|
7408
|
+
}
|
|
7409
|
+
},
|
|
7410
|
+
{
|
|
7411
|
+
name: META_TOOL_NAMES.addPrebuiltIntegration,
|
|
7412
|
+
description: `Builder tool. Add a pre-built integration from the catalog to this Commandable instance (credentials are entered out-of-band).`,
|
|
7413
|
+
inputSchema: {
|
|
7414
|
+
type: "object",
|
|
7415
|
+
additionalProperties: false,
|
|
7416
|
+
properties: {
|
|
7417
|
+
type: { type: "string", minLength: 1 },
|
|
7418
|
+
label: { type: "string" },
|
|
7419
|
+
credential_variant: { type: "string" },
|
|
7420
|
+
max_scope: { type: "string", enum: ["read", "write"] },
|
|
7421
|
+
enabled_toolsets: { type: "array", items: { type: "string" } },
|
|
7422
|
+
disabled_tools: { type: "array", items: { type: "string" } }
|
|
7423
|
+
},
|
|
7424
|
+
required: ["type"]
|
|
7425
|
+
}
|
|
7426
|
+
},
|
|
7427
|
+
{
|
|
7428
|
+
name: META_TOOL_NAMES.upsertCustomIntegration,
|
|
7429
|
+
description: "Builder tool. Create or update a custom integration type (base URL + credential schema + auth injection rules). Omit type_slug to create a new one.",
|
|
7430
|
+
inputSchema: {
|
|
7431
|
+
type: "object",
|
|
7432
|
+
additionalProperties: false,
|
|
7433
|
+
properties: {
|
|
7434
|
+
type_slug: { type: "string", minLength: 1 },
|
|
7435
|
+
label: { type: "string", minLength: 1 },
|
|
7436
|
+
base_url: { type: "string", minLength: 1 },
|
|
7437
|
+
auth_type: { type: "string", enum: ["basic", "custom"] },
|
|
7438
|
+
credential_fields: {
|
|
7439
|
+
type: "array",
|
|
7440
|
+
minItems: 1,
|
|
7441
|
+
items: {
|
|
7442
|
+
type: "object",
|
|
7443
|
+
additionalProperties: false,
|
|
7444
|
+
properties: {
|
|
7445
|
+
name: { type: "string", minLength: 1 },
|
|
7446
|
+
label: { type: "string", minLength: 1 },
|
|
7447
|
+
description: { type: "string" },
|
|
7448
|
+
sensitive: { type: "boolean" }
|
|
7449
|
+
},
|
|
7450
|
+
required: ["name", "label"]
|
|
7451
|
+
}
|
|
7452
|
+
},
|
|
7453
|
+
credential_injection: {
|
|
7454
|
+
type: "object",
|
|
7455
|
+
additionalProperties: false,
|
|
7456
|
+
properties: {
|
|
7457
|
+
headers: { type: "object", additionalProperties: { type: "string" } },
|
|
7458
|
+
query: { type: "object", additionalProperties: { type: "string" } }
|
|
7459
|
+
},
|
|
7460
|
+
required: []
|
|
7461
|
+
},
|
|
7462
|
+
basic_username_field: { type: "string" },
|
|
7463
|
+
basic_password_field: { type: "string" },
|
|
7464
|
+
health_check_path: { type: "string" },
|
|
7465
|
+
connection_hint: {
|
|
7466
|
+
type: "string",
|
|
7467
|
+
description: "Markdown shown in the credential form. Must be a numbered list of every step the user needs to follow to obtain the credentials \u2014 starting from navigating to the correct web page.."
|
|
7468
|
+
}
|
|
7469
|
+
},
|
|
7470
|
+
required: ["label", "base_url", "auth_type", "credential_fields"]
|
|
7471
|
+
}
|
|
7472
|
+
},
|
|
7473
|
+
{
|
|
7474
|
+
name: META_TOOL_NAMES.testCustomTool,
|
|
7475
|
+
description: "Builder tool. Run a sandboxed tool handler with a test input (does not persist). Use this to iterate before saving a tool.",
|
|
7476
|
+
inputSchema: {
|
|
7477
|
+
type: "object",
|
|
7478
|
+
additionalProperties: false,
|
|
7479
|
+
properties: {
|
|
7480
|
+
integration_id: { type: "string", minLength: 1 },
|
|
7481
|
+
handler_code: { type: "string", minLength: 1 },
|
|
7482
|
+
input_schema: { type: "object" },
|
|
7483
|
+
test_input: { type: "object" }
|
|
7484
|
+
},
|
|
7485
|
+
required: ["integration_id", "handler_code"]
|
|
7486
|
+
}
|
|
7487
|
+
},
|
|
7488
|
+
{
|
|
7489
|
+
name: META_TOOL_NAMES.upsertCustomTool,
|
|
7490
|
+
description: "Builder tool. Upsert a custom tool on an existing integration, and register it so it can be used immediately.",
|
|
7491
|
+
inputSchema: {
|
|
7492
|
+
type: "object",
|
|
7493
|
+
additionalProperties: false,
|
|
7494
|
+
properties: {
|
|
7495
|
+
integration_id: { type: "string", minLength: 1 },
|
|
7496
|
+
name: { type: "string", minLength: 1 },
|
|
7497
|
+
label: { type: "string" },
|
|
7498
|
+
description: { type: "string" },
|
|
7499
|
+
scope: { type: "string", enum: ["read", "write", "admin"] },
|
|
7500
|
+
input_schema: { type: "object" },
|
|
7501
|
+
handler_code: { type: "string", minLength: 1 }
|
|
7502
|
+
},
|
|
7503
|
+
required: ["integration_id", "name", "handler_code"]
|
|
7504
|
+
}
|
|
7505
|
+
},
|
|
7506
|
+
{
|
|
7507
|
+
name: META_TOOL_NAMES.deleteCustomTool,
|
|
7508
|
+
description: "Builder tool. Hard delete a custom tool from an integration by raw tool name (not the MCP materialized name).",
|
|
7509
|
+
inputSchema: {
|
|
7510
|
+
type: "object",
|
|
7511
|
+
additionalProperties: false,
|
|
7512
|
+
properties: {
|
|
7513
|
+
integration_id: { type: "string", minLength: 1 },
|
|
7514
|
+
name: { type: "string", minLength: 1 }
|
|
7515
|
+
},
|
|
7516
|
+
required: ["integration_id", "name"]
|
|
7517
|
+
}
|
|
7518
|
+
},
|
|
7519
|
+
{
|
|
7520
|
+
name: META_TOOL_NAMES.deleteCustomIntegration,
|
|
7521
|
+
description: "Builder tool. Hard delete a custom integration instance, including its custom tools and linked credentials.",
|
|
7522
|
+
inputSchema: {
|
|
7523
|
+
type: "object",
|
|
7524
|
+
additionalProperties: false,
|
|
7525
|
+
properties: {
|
|
7526
|
+
integration_id: { type: "string", minLength: 1 }
|
|
7527
|
+
},
|
|
7528
|
+
required: ["integration_id"]
|
|
7529
|
+
}
|
|
7530
|
+
}
|
|
7531
|
+
];
|
|
7532
|
+
}
|
|
7378
7533
|
async function handleMetaToolCall(params) {
|
|
7379
7534
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
7380
7535
|
const { name, args, sessionId, catalog, sessionState, ctx } = params;
|
|
7381
7536
|
if (name === META_TOOL_NAMES.readme) {
|
|
7382
|
-
return { handled: true, listChanged: false, result: { markdown: buildCommandableReadme() } };
|
|
7537
|
+
return { handled: true, listChanged: false, result: { markdown: buildCommandableReadme(!!ctx) } };
|
|
7383
7538
|
}
|
|
7384
7539
|
if (name === META_TOOL_NAMES.searchTools) {
|
|
7385
7540
|
const query = String((args == null ? void 0 : args.query) || "").trim();
|
|
@@ -8012,14 +8167,20 @@ function formatAsText(value) {
|
|
|
8012
8167
|
return String(value);
|
|
8013
8168
|
}
|
|
8014
8169
|
}
|
|
8015
|
-
function registerToolHandlers(server, tools,
|
|
8170
|
+
function registerToolHandlers(server, tools, options = { mode: "static" }) {
|
|
8016
8171
|
const metaToolDefs = getMetaToolDefinitions();
|
|
8172
|
+
const { mode, dynamicMode } = options;
|
|
8173
|
+
const usesDynamicToolLoading = mode !== "static";
|
|
8174
|
+
if (usesDynamicToolLoading && !dynamicMode)
|
|
8175
|
+
throw new Error(`Dynamic MCP mode requires dynamicMode context. Received mode: ${mode}`);
|
|
8176
|
+
const resolvedDynamicMode = dynamicMode;
|
|
8177
|
+
const readmeToolDef = getReadmeToolDefinition();
|
|
8017
8178
|
server.setRequestHandler(ListToolsRequestSchema, async (_req, extra) => {
|
|
8018
|
-
if (!
|
|
8019
|
-
return { tools: tools.list };
|
|
8179
|
+
if (!usesDynamicToolLoading)
|
|
8180
|
+
return { tools: [readmeToolDef, ...tools.list] };
|
|
8020
8181
|
const sessionId = extra == null ? void 0 : extra.sessionId;
|
|
8021
|
-
const active =
|
|
8022
|
-
const toolDefs =
|
|
8182
|
+
const active = resolvedDynamicMode.sessionState.getActiveToolNames(sessionId);
|
|
8183
|
+
const toolDefs = resolvedDynamicMode.catalogRef.current.getToolDefinitions([...active]);
|
|
8023
8184
|
return { tools: [...metaToolDefs, ...toolDefs] };
|
|
8024
8185
|
});
|
|
8025
8186
|
server.setRequestHandler(CallToolRequestSchema, async (req, extra) => {
|
|
@@ -8027,14 +8188,14 @@ function registerToolHandlers(server, tools, createMode) {
|
|
|
8027
8188
|
const name = req.params.name;
|
|
8028
8189
|
const args = (_a = req.params.arguments) != null ? _a : {};
|
|
8029
8190
|
const sessionId = extra == null ? void 0 : extra.sessionId;
|
|
8030
|
-
if (
|
|
8191
|
+
if (usesDynamicToolLoading) {
|
|
8031
8192
|
const metaRes = await handleMetaToolCall({
|
|
8032
8193
|
name,
|
|
8033
8194
|
args,
|
|
8034
8195
|
sessionId,
|
|
8035
|
-
catalog:
|
|
8036
|
-
sessionState:
|
|
8037
|
-
ctx:
|
|
8196
|
+
catalog: resolvedDynamicMode.catalogRef.current,
|
|
8197
|
+
sessionState: resolvedDynamicMode.sessionState,
|
|
8198
|
+
ctx: resolvedDynamicMode.ctx
|
|
8038
8199
|
});
|
|
8039
8200
|
if (metaRes.handled) {
|
|
8040
8201
|
if (metaRes.listChanged) {
|
|
@@ -8044,10 +8205,10 @@ function registerToolHandlers(server, tools, createMode) {
|
|
|
8044
8205
|
content: [{ type: "text", text: formatAsText(metaRes.result) }]
|
|
8045
8206
|
};
|
|
8046
8207
|
}
|
|
8047
|
-
if (!
|
|
8208
|
+
if (!resolvedDynamicMode.sessionState.isToolActive(sessionId, name)) {
|
|
8048
8209
|
throw new Error(`Tool not enabled in this session: ${name}. Use ${metaToolDefs[0].name} + ${metaToolDefs[1].name} to enable a toolset first.`);
|
|
8049
8210
|
}
|
|
8050
|
-
const tool2 =
|
|
8211
|
+
const tool2 = resolvedDynamicMode.catalogRef.current.getExecutableTool(name);
|
|
8051
8212
|
if (!tool2)
|
|
8052
8213
|
throw new Error(`Unknown tool: ${name}`);
|
|
8053
8214
|
const res2 = await tool2.run(args);
|
|
@@ -8068,6 +8229,12 @@ ${res2.logs.join("\n")}` }] : []
|
|
|
8068
8229
|
]
|
|
8069
8230
|
};
|
|
8070
8231
|
}
|
|
8232
|
+
const staticMeta = handleStaticReadmeCall(name);
|
|
8233
|
+
if (staticMeta.handled) {
|
|
8234
|
+
return {
|
|
8235
|
+
content: [{ type: "text", text: formatAsText(staticMeta.result) }]
|
|
8236
|
+
};
|
|
8237
|
+
}
|
|
8071
8238
|
const tool = tools.byName.get(name);
|
|
8072
8239
|
if (!tool)
|
|
8073
8240
|
throw new Error(`Unknown tool: ${name}`);
|
|
@@ -8459,142 +8626,142 @@ const assets = {
|
|
|
8459
8626
|
"/favicon.ico": {
|
|
8460
8627
|
"type": "image/vnd.microsoft.icon",
|
|
8461
8628
|
"etag": "\"10be-n8egyE9tcb7sKGr/pYCaQ4uWqxI\"",
|
|
8462
|
-
"mtime": "2026-03-
|
|
8629
|
+
"mtime": "2026-03-16T19:47:09.032Z",
|
|
8463
8630
|
"size": 4286,
|
|
8464
8631
|
"path": "../public/favicon.ico"
|
|
8465
8632
|
},
|
|
8466
8633
|
"/_fonts/57NSSoFy1VLVs2gqly8Ls9awBnZMFyXGrefpmqvdqmc-zJfbBtpgM4cDmcXBsqZNW79_kFnlpPd62b48glgdydA.woff2": {
|
|
8467
8634
|
"type": "font/woff2",
|
|
8468
8635
|
"etag": "\"4b5c-TAo9mx7r3xQs52+HbHcHJ52z8Qo\"",
|
|
8469
|
-
"mtime": "2026-03-
|
|
8636
|
+
"mtime": "2026-03-16T19:47:09.027Z",
|
|
8470
8637
|
"size": 19292,
|
|
8471
8638
|
"path": "../public/_fonts/57NSSoFy1VLVs2gqly8Ls9awBnZMFyXGrefpmqvdqmc-zJfbBtpgM4cDmcXBsqZNW79_kFnlpPd62b48glgdydA.woff2"
|
|
8472
8639
|
},
|
|
8473
8640
|
"/_fonts/8VR2wSMN-3U4NbWAVYXlkRV6hA0jFBXP-0RtL3X7fko-x2gYI4qfmkRdxyQQUPaBZdZdgl1TeVrquF_TxHeM4lM.woff2": {
|
|
8474
8641
|
"type": "font/woff2",
|
|
8475
8642
|
"etag": "\"212c-FshXJibFzNhd2HEIMP8C3JR5PYg\"",
|
|
8476
|
-
"mtime": "2026-03-
|
|
8643
|
+
"mtime": "2026-03-16T19:47:09.027Z",
|
|
8477
8644
|
"size": 8492,
|
|
8478
8645
|
"path": "../public/_fonts/8VR2wSMN-3U4NbWAVYXlkRV6hA0jFBXP-0RtL3X7fko-x2gYI4qfmkRdxyQQUPaBZdZdgl1TeVrquF_TxHeM4lM.woff2"
|
|
8479
8646
|
},
|
|
8480
|
-
"/_fonts/GsKUclqeNLJ96g5AU593ug6yanivOiwjW_7zESNPChw-jHA4tBeM1bjF7LATGUpfBuSTyomIFrWBTzjF7txVYfg.woff2": {
|
|
8481
|
-
"type": "font/woff2",
|
|
8482
|
-
"etag": "\"680c-mJtsV33lkTAKSmfq5k3lKHSllcU\"",
|
|
8483
|
-
"mtime": "2026-03-08T16:28:20.549Z",
|
|
8484
|
-
"size": 26636,
|
|
8485
|
-
"path": "../public/_fonts/GsKUclqeNLJ96g5AU593ug6yanivOiwjW_7zESNPChw-jHA4tBeM1bjF7LATGUpfBuSTyomIFrWBTzjF7txVYfg.woff2"
|
|
8486
|
-
},
|
|
8487
8647
|
"/_fonts/Ld1FnTo3yTIwDyGfTQ5-Fws9AWsCbKfMvgxduXr7JcY-W25bL8NF1fjpLRSOgJb7RoZPHqGQNwMTM7S9tHVoxx8.woff2": {
|
|
8488
8648
|
"type": "font/woff2",
|
|
8489
8649
|
"etag": "\"6ec4-8OoFFPZKF1grqmfGVjh5JDE6DOU\"",
|
|
8490
|
-
"mtime": "2026-03-
|
|
8650
|
+
"mtime": "2026-03-16T19:47:09.027Z",
|
|
8491
8651
|
"size": 28356,
|
|
8492
8652
|
"path": "../public/_fonts/Ld1FnTo3yTIwDyGfTQ5-Fws9AWsCbKfMvgxduXr7JcY-W25bL8NF1fjpLRSOgJb7RoZPHqGQNwMTM7S9tHVoxx8.woff2"
|
|
8493
8653
|
},
|
|
8654
|
+
"/_fonts/GsKUclqeNLJ96g5AU593ug6yanivOiwjW_7zESNPChw-jHA4tBeM1bjF7LATGUpfBuSTyomIFrWBTzjF7txVYfg.woff2": {
|
|
8655
|
+
"type": "font/woff2",
|
|
8656
|
+
"etag": "\"680c-mJtsV33lkTAKSmfq5k3lKHSllcU\"",
|
|
8657
|
+
"mtime": "2026-03-16T19:47:09.027Z",
|
|
8658
|
+
"size": 26636,
|
|
8659
|
+
"path": "../public/_fonts/GsKUclqeNLJ96g5AU593ug6yanivOiwjW_7zESNPChw-jHA4tBeM1bjF7LATGUpfBuSTyomIFrWBTzjF7txVYfg.woff2"
|
|
8660
|
+
},
|
|
8494
8661
|
"/_fonts/NdzqRASp2bovDUhQT1IRE_EMqKJ2KYQdTCfFcBvL8yw-KhwZiS86o3fErOe5GGMExHUemmI_dBfaEFxjISZrBd0.woff2": {
|
|
8495
8662
|
"type": "font/woff2",
|
|
8496
8663
|
"etag": "\"1d98-cDZfMibtk4T04FTTAmlfhWDpkN0\"",
|
|
8497
|
-
"mtime": "2026-03-
|
|
8664
|
+
"mtime": "2026-03-16T19:47:09.027Z",
|
|
8498
8665
|
"size": 7576,
|
|
8499
8666
|
"path": "../public/_fonts/NdzqRASp2bovDUhQT1IRE_EMqKJ2KYQdTCfFcBvL8yw-KhwZiS86o3fErOe5GGMExHUemmI_dBfaEFxjISZrBd0.woff2"
|
|
8500
8667
|
},
|
|
8501
8668
|
"/_fonts/iTkrULNFJJkTvihIg1Vqi5IODRH_9btXCioVF5l98I8-AndUyau2HR2felA_ra8V2mutQgschhasE5FD1dXGJX8.woff2": {
|
|
8502
8669
|
"type": "font/woff2",
|
|
8503
8670
|
"etag": "\"47c4-5xyngHnzzhetUee74tMx9OTgqNQ\"",
|
|
8504
|
-
"mtime": "2026-03-
|
|
8671
|
+
"mtime": "2026-03-16T19:47:09.027Z",
|
|
8505
8672
|
"size": 18372,
|
|
8506
8673
|
"path": "../public/_fonts/iTkrULNFJJkTvihIg1Vqi5IODRH_9btXCioVF5l98I8-AndUyau2HR2felA_ra8V2mutQgschhasE5FD1dXGJX8.woff2"
|
|
8507
8674
|
},
|
|
8508
8675
|
"/_nuxt/B2dAlp_u.js": {
|
|
8509
8676
|
"type": "text/javascript; charset=utf-8",
|
|
8510
8677
|
"etag": "\"eba0-wf6kssOw4eNs97QyNojAg32DloY\"",
|
|
8511
|
-
"mtime": "2026-03-
|
|
8678
|
+
"mtime": "2026-03-16T19:47:09.030Z",
|
|
8512
8679
|
"size": 60320,
|
|
8513
8680
|
"path": "../public/_nuxt/B2dAlp_u.js"
|
|
8514
8681
|
},
|
|
8682
|
+
"/_nuxt/Ba0BY0O0.js": {
|
|
8683
|
+
"type": "text/javascript; charset=utf-8",
|
|
8684
|
+
"etag": "\"19215-vDS/v7twXUEHmC7Vwb8hpHtOY10\"",
|
|
8685
|
+
"mtime": "2026-03-16T19:47:09.030Z",
|
|
8686
|
+
"size": 102933,
|
|
8687
|
+
"path": "../public/_nuxt/Ba0BY0O0.js"
|
|
8688
|
+
},
|
|
8515
8689
|
"/_nuxt/BvFUCPqA.js": {
|
|
8516
8690
|
"type": "text/javascript; charset=utf-8",
|
|
8517
8691
|
"etag": "\"1def-GjWsOK4crVgdvsvob4q4AcQU3eE\"",
|
|
8518
|
-
"mtime": "2026-03-
|
|
8692
|
+
"mtime": "2026-03-16T19:47:09.030Z",
|
|
8519
8693
|
"size": 7663,
|
|
8520
8694
|
"path": "../public/_nuxt/BvFUCPqA.js"
|
|
8521
8695
|
},
|
|
8522
8696
|
"/_nuxt/Dm_hd4at.js": {
|
|
8523
8697
|
"type": "text/javascript; charset=utf-8",
|
|
8524
8698
|
"etag": "\"ab-krq+bSQAVNARAnmcr6pb3p09JGM\"",
|
|
8525
|
-
"mtime": "2026-03-
|
|
8699
|
+
"mtime": "2026-03-16T19:47:09.030Z",
|
|
8526
8700
|
"size": 171,
|
|
8527
8701
|
"path": "../public/_nuxt/Dm_hd4at.js"
|
|
8528
8702
|
},
|
|
8529
8703
|
"/_nuxt/S2P9sd4n.js": {
|
|
8530
8704
|
"type": "text/javascript; charset=utf-8",
|
|
8531
8705
|
"etag": "\"e99-6ab7sqCWIEbGMF8iRCoX06GCU6M\"",
|
|
8532
|
-
"mtime": "2026-03-
|
|
8706
|
+
"mtime": "2026-03-16T19:47:09.030Z",
|
|
8533
8707
|
"size": 3737,
|
|
8534
8708
|
"path": "../public/_nuxt/S2P9sd4n.js"
|
|
8535
8709
|
},
|
|
8536
8710
|
"/_nuxt/_id_.BKAjWkoP.css": {
|
|
8537
8711
|
"type": "text/css; charset=utf-8",
|
|
8538
8712
|
"etag": "\"2f4-WvSreXC5yG1/cIV/f4qFH6C3ROw\"",
|
|
8539
|
-
"mtime": "2026-03-
|
|
8713
|
+
"mtime": "2026-03-16T19:47:09.030Z",
|
|
8540
8714
|
"size": 756,
|
|
8541
8715
|
"path": "../public/_nuxt/_id_.BKAjWkoP.css"
|
|
8542
8716
|
},
|
|
8543
|
-
"/_nuxt/Ba0BY0O0.js": {
|
|
8544
|
-
"type": "text/javascript; charset=utf-8",
|
|
8545
|
-
"etag": "\"19215-vDS/v7twXUEHmC7Vwb8hpHtOY10\"",
|
|
8546
|
-
"mtime": "2026-03-08T16:28:20.552Z",
|
|
8547
|
-
"size": 102933,
|
|
8548
|
-
"path": "../public/_nuxt/Ba0BY0O0.js"
|
|
8549
|
-
},
|
|
8550
8717
|
"/_nuxt/d2XTSFt9.js": {
|
|
8551
8718
|
"type": "text/javascript; charset=utf-8",
|
|
8552
8719
|
"etag": "\"d7b-8ryX9kOW13aLMnbzFyfd6FPpcQQ\"",
|
|
8553
|
-
"mtime": "2026-03-
|
|
8720
|
+
"mtime": "2026-03-16T19:47:09.030Z",
|
|
8554
8721
|
"size": 3451,
|
|
8555
8722
|
"path": "../public/_nuxt/d2XTSFt9.js"
|
|
8556
8723
|
},
|
|
8724
|
+
"/_nuxt/B04gGCnx.js": {
|
|
8725
|
+
"type": "text/javascript; charset=utf-8",
|
|
8726
|
+
"etag": "\"66cba-KFKixdFAdkdkbCxucEEHBnimIKw\"",
|
|
8727
|
+
"mtime": "2026-03-16T19:47:09.030Z",
|
|
8728
|
+
"size": 421050,
|
|
8729
|
+
"path": "../public/_nuxt/B04gGCnx.js"
|
|
8730
|
+
},
|
|
8557
8731
|
"/_nuxt/error-404.C7fg894-.css": {
|
|
8558
8732
|
"type": "text/css; charset=utf-8",
|
|
8559
8733
|
"etag": "\"97e-fiQ3o7A11L9BuXRBr0GJldkx0AU\"",
|
|
8560
|
-
"mtime": "2026-03-
|
|
8734
|
+
"mtime": "2026-03-16T19:47:09.030Z",
|
|
8561
8735
|
"size": 2430,
|
|
8562
8736
|
"path": "../public/_nuxt/error-404.C7fg894-.css"
|
|
8563
8737
|
},
|
|
8564
|
-
"/_nuxt/
|
|
8738
|
+
"/_nuxt/entry.Y3mA4bzA.css": {
|
|
8565
8739
|
"type": "text/css; charset=utf-8",
|
|
8566
|
-
"etag": "\"
|
|
8567
|
-
"mtime": "2026-03-
|
|
8568
|
-
"size":
|
|
8569
|
-
"path": "../public/_nuxt/
|
|
8740
|
+
"etag": "\"2d46b-zfrD3Ny9WW6qm4fCXAfX5eIAxPA\"",
|
|
8741
|
+
"mtime": "2026-03-16T19:47:09.030Z",
|
|
8742
|
+
"size": 185451,
|
|
8743
|
+
"path": "../public/_nuxt/entry.Y3mA4bzA.css"
|
|
8570
8744
|
},
|
|
8571
8745
|
"/_nuxt/builds/latest.json": {
|
|
8572
8746
|
"type": "application/json",
|
|
8573
|
-
"etag": "\"47-
|
|
8574
|
-
"mtime": "2026-03-
|
|
8747
|
+
"etag": "\"47-6XOqara+m35JUBeuk66glIMkNBM\"",
|
|
8748
|
+
"mtime": "2026-03-16T19:47:09.026Z",
|
|
8575
8749
|
"size": 71,
|
|
8576
8750
|
"path": "../public/_nuxt/builds/latest.json"
|
|
8577
8751
|
},
|
|
8578
|
-
"/_nuxt/builds/meta/
|
|
8752
|
+
"/_nuxt/builds/meta/51e7fb48-64de-429f-9375-7d1b1e5b5f80.json": {
|
|
8579
8753
|
"type": "application/json",
|
|
8580
|
-
"etag": "\"58-
|
|
8581
|
-
"mtime": "2026-03-
|
|
8754
|
+
"etag": "\"58-LmGFczmMXYN2JGd8xrpqmUPWlTA\"",
|
|
8755
|
+
"mtime": "2026-03-16T19:47:09.023Z",
|
|
8582
8756
|
"size": 88,
|
|
8583
|
-
"path": "../public/_nuxt/builds/meta/
|
|
8757
|
+
"path": "../public/_nuxt/builds/meta/51e7fb48-64de-429f-9375-7d1b1e5b5f80.json"
|
|
8584
8758
|
},
|
|
8585
|
-
"/_nuxt/
|
|
8586
|
-
"type": "text/javascript; charset=utf-8",
|
|
8587
|
-
"etag": "\"66cba-KFKixdFAdkdkbCxucEEHBnimIKw\"",
|
|
8588
|
-
"mtime": "2026-03-08T16:28:20.553Z",
|
|
8589
|
-
"size": 421050,
|
|
8590
|
-
"path": "../public/_nuxt/B04gGCnx.js"
|
|
8591
|
-
},
|
|
8592
|
-
"/_nuxt/entry.Y3mA4bzA.css": {
|
|
8759
|
+
"/_nuxt/error-500.DjUK_N2Y.css": {
|
|
8593
8760
|
"type": "text/css; charset=utf-8",
|
|
8594
|
-
"etag": "\"
|
|
8595
|
-
"mtime": "2026-03-
|
|
8596
|
-
"size":
|
|
8597
|
-
"path": "../public/_nuxt/
|
|
8761
|
+
"etag": "\"773-Qf61bSDos4KtmZDaA06FmZyUYNo\"",
|
|
8762
|
+
"mtime": "2026-03-16T19:47:09.030Z",
|
|
8763
|
+
"size": 1907,
|
|
8764
|
+
"path": "../public/_nuxt/error-500.DjUK_N2Y.css"
|
|
8598
8765
|
}
|
|
8599
8766
|
};
|
|
8600
8767
|
|
|
@@ -8902,7 +9069,10 @@ function getServerInfo() {
|
|
|
8902
9069
|
version: (process.env.COMMANDABLE_VERSION || "").trim() || "0.0.0"
|
|
8903
9070
|
};
|
|
8904
9071
|
}
|
|
8905
|
-
function
|
|
9072
|
+
function usesDynamicToolLoading(endpoint) {
|
|
9073
|
+
return endpoint !== "static";
|
|
9074
|
+
}
|
|
9075
|
+
function allowsBuilderTools(endpoint) {
|
|
8906
9076
|
return endpoint === "create";
|
|
8907
9077
|
}
|
|
8908
9078
|
function getOrCreateStore() {
|
|
@@ -8910,7 +9080,8 @@ function getOrCreateStore() {
|
|
|
8910
9080
|
return globalThis.__commandableMcpHttpState;
|
|
8911
9081
|
}
|
|
8912
9082
|
async function buildState(endpoint) {
|
|
8913
|
-
const
|
|
9083
|
+
const dynamicMode = usesDynamicToolLoading(endpoint);
|
|
9084
|
+
const includeBuilderAbility = allowsBuilderTools(endpoint);
|
|
8914
9085
|
const db = await getDb();
|
|
8915
9086
|
const secret = getOrCreateEncryptionSecret();
|
|
8916
9087
|
const credentialStore = new SqlCredentialStore(db, secret);
|
|
@@ -8930,9 +9101,19 @@ async function buildState(endpoint) {
|
|
|
8930
9101
|
const port = (process.env.PORT || "").trim() || "23432";
|
|
8931
9102
|
const host = (process.env.HOST || "").trim() || "127.0.0.1";
|
|
8932
9103
|
const credentialSetupBaseUrl = `http://${host}:${port}`;
|
|
8933
|
-
const sessionState =
|
|
8934
|
-
const
|
|
8935
|
-
|
|
9104
|
+
const sessionState = dynamicMode ? new SessionAbilityState() : void 0;
|
|
9105
|
+
const extraToolDefinitions = new Map(
|
|
9106
|
+
(includeBuilderAbility ? getBuilderToolDefinitions() : []).map((definition) => [definition.name, definition])
|
|
9107
|
+
);
|
|
9108
|
+
const catalogRef = dynamicMode ? {
|
|
9109
|
+
current: new AbilityCatalog({
|
|
9110
|
+
integrations: integrationsRef.current,
|
|
9111
|
+
toolIndex: toolIndexRef.byName,
|
|
9112
|
+
extraToolDefinitions,
|
|
9113
|
+
includeBuilderAbility
|
|
9114
|
+
})
|
|
9115
|
+
} : void 0;
|
|
9116
|
+
const ctx = includeBuilderAbility ? {
|
|
8936
9117
|
spaceId,
|
|
8937
9118
|
db,
|
|
8938
9119
|
credentialStore,
|
|
@@ -9032,7 +9213,16 @@ async function handleMcpHttp(args) {
|
|
|
9032
9213
|
registerToolHandlers(
|
|
9033
9214
|
server,
|
|
9034
9215
|
shared.toolIndexRef,
|
|
9035
|
-
|
|
9216
|
+
{
|
|
9217
|
+
mode: args.endpoint,
|
|
9218
|
+
...usesDynamicToolLoading(args.endpoint) && shared.sessionState && shared.catalogRef ? {
|
|
9219
|
+
dynamicMode: {
|
|
9220
|
+
catalogRef: shared.catalogRef,
|
|
9221
|
+
sessionState: shared.sessionState,
|
|
9222
|
+
ctx: shared.ctx
|
|
9223
|
+
}
|
|
9224
|
+
} : {}
|
|
9225
|
+
}
|
|
9036
9226
|
);
|
|
9037
9227
|
transport.onclose = () => {
|
|
9038
9228
|
var _a2;
|
|
@@ -9125,6 +9315,7 @@ const _lazy_uOi51L = () => import('../routes/api/index.post.mjs');
|
|
|
9125
9315
|
const _lazy_VAd2p_ = () => import('../routes/health.get.mjs');
|
|
9126
9316
|
const _lazy_HJq566 = () => import('../routes/mcp.mjs');
|
|
9127
9317
|
const _lazy_9rhiQU = () => import('../routes/mcp/create.mjs');
|
|
9318
|
+
const _lazy_TrB1E_ = () => import('../routes/mcp/static.mjs');
|
|
9128
9319
|
const _lazy_cIv6cD = () => import('../routes/renderer.mjs').then(function (n) { return n.r; });
|
|
9129
9320
|
|
|
9130
9321
|
const handlers = [
|
|
@@ -9149,6 +9340,7 @@ const handlers = [
|
|
|
9149
9340
|
{ route: '/health', handler: _lazy_VAd2p_, lazy: true, middleware: false, method: "get" },
|
|
9150
9341
|
{ route: '/mcp', handler: _lazy_HJq566, lazy: true, middleware: false, method: undefined },
|
|
9151
9342
|
{ route: '/mcp/create', handler: _lazy_9rhiQU, lazy: true, middleware: false, method: undefined },
|
|
9343
|
+
{ route: '/mcp/static', handler: _lazy_TrB1E_, lazy: true, middleware: false, method: undefined },
|
|
9152
9344
|
{ route: '/__nuxt_error', handler: _lazy_cIv6cD, lazy: true, middleware: false, method: undefined },
|
|
9153
9345
|
{ route: '/__nuxt_island/**', handler: _SxA8c9, lazy: false, middleware: false, method: undefined },
|
|
9154
9346
|
{ route: '/api/_nuxt_icon/:collection', handler: _qecTrU, lazy: false, middleware: false, method: undefined },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nitro.mjs","sources":["../../../../../node_modules/destr/dist/index.mjs","../../../../../node_modules/ufo/dist/index.mjs","../../../../../node_modules/radix3/dist/index.mjs","../../../../../node_modules/defu/dist/defu.mjs","../../../../../node_modules/node-mock-http/dist/index.mjs","../../../../../node_modules/h3/dist/index.mjs","../../../../../node_modules/hookable/dist/index.mjs","../../../../../node_modules/node-fetch-native/dist/native.mjs","../../../../../node_modules/ofetch/dist/shared/ofetch.CWycOUEr.mjs","../../../../../node_modules/ofetch/dist/node.mjs","../../../../../node_modules/unstorage/dist/shared/unstorage.zVDD2mZo.mjs","../../../../../node_modules/unstorage/dist/index.mjs","../../../../../node_modules/unstorage/drivers/utils/index.mjs","../../../../../node_modules/unstorage/drivers/utils/node-fs.mjs","../../../../../node_modules/unstorage/drivers/fs-lite.mjs","../../../../../node_modules/nitropack/dist/runtime/internal/storage.mjs","../../../../../node_modules/ohash/dist/shared/ohash.D__AXeF1.mjs","../../../../../node_modules/ohash/dist/crypto/node/index.mjs","../../../../../node_modules/ohash/dist/index.mjs","../../../../../node_modules/nitropack/dist/runtime/internal/hash.mjs","../../../../../node_modules/nitropack/dist/runtime/internal/cache.mjs","../../../../../node_modules/klona/dist/index.mjs","../../../../../node_modules/@nuxt/nitro-server/dist/runtime/utils/config.mjs","../../../../app/app.config.ts","../../../../../node_modules/scule/dist/index.mjs","../../../../../node_modules/nitropack/dist/runtime/internal/utils.env.mjs","../../../../../node_modules/nitropack/dist/runtime/internal/config.mjs","../../../../../node_modules/unctx/dist/index.mjs","../../../../../node_modules/nitropack/dist/runtime/internal/context.mjs","../../../../../node_modules/nitropack/dist/runtime/internal/route-rules.mjs","../../../../../node_modules/nitropack/dist/runtime/internal/utils.mjs","../../../../../node_modules/@nuxt/nitro-server/dist/runtime/utils/error.mjs","../../../../../node_modules/@nuxt/nitro-server/dist/runtime/handlers/error.mjs","../../../../../node_modules/nitropack/dist/runtime/internal/error/utils.mjs","../../../../../node_modules/nitropack/dist/runtime/internal/error/prod.mjs","../../../../../node_modules/@nuxtjs/color-mode/dist/runtime/nitro-plugin.js","../../../../../packages/core/dist/errors/httpError.js","../../../../../packages/core/dist/crypto/encryption.js","../../../../../packages/integration-data/dist/loader.js","../../../../../packages/core/dist/integrations/tools.js","../../../../../packages/core/dist/integrations/providerRegistry.js","../../../../../packages/core/dist/integrations/sandbox.js","../../../../../packages/core/dist/integrations/getIntegration.js","../../../../../packages/core/dist/integrations/sandboxUtils.js","../../../../../packages/core/dist/integrations/
|
|
1
|
+
{"version":3,"file":"nitro.mjs","sources":["../../../../../node_modules/destr/dist/index.mjs","../../../../../node_modules/ufo/dist/index.mjs","../../../../../node_modules/radix3/dist/index.mjs","../../../../../node_modules/defu/dist/defu.mjs","../../../../../node_modules/node-mock-http/dist/index.mjs","../../../../../node_modules/h3/dist/index.mjs","../../../../../node_modules/hookable/dist/index.mjs","../../../../../node_modules/node-fetch-native/dist/native.mjs","../../../../../node_modules/ofetch/dist/shared/ofetch.CWycOUEr.mjs","../../../../../node_modules/ofetch/dist/node.mjs","../../../../../node_modules/unstorage/dist/shared/unstorage.zVDD2mZo.mjs","../../../../../node_modules/unstorage/dist/index.mjs","../../../../../node_modules/unstorage/drivers/utils/index.mjs","../../../../../node_modules/unstorage/drivers/utils/node-fs.mjs","../../../../../node_modules/unstorage/drivers/fs-lite.mjs","../../../../../node_modules/nitropack/dist/runtime/internal/storage.mjs","../../../../../node_modules/ohash/dist/shared/ohash.D__AXeF1.mjs","../../../../../node_modules/ohash/dist/crypto/node/index.mjs","../../../../../node_modules/ohash/dist/index.mjs","../../../../../node_modules/nitropack/dist/runtime/internal/hash.mjs","../../../../../node_modules/nitropack/dist/runtime/internal/cache.mjs","../../../../../node_modules/klona/dist/index.mjs","../../../../../node_modules/@nuxt/nitro-server/dist/runtime/utils/config.mjs","../../../../app/app.config.ts","../../../../../node_modules/scule/dist/index.mjs","../../../../../node_modules/nitropack/dist/runtime/internal/utils.env.mjs","../../../../../node_modules/nitropack/dist/runtime/internal/config.mjs","../../../../../node_modules/unctx/dist/index.mjs","../../../../../node_modules/nitropack/dist/runtime/internal/context.mjs","../../../../../node_modules/nitropack/dist/runtime/internal/route-rules.mjs","../../../../../node_modules/nitropack/dist/runtime/internal/utils.mjs","../../../../../node_modules/@nuxt/nitro-server/dist/runtime/utils/error.mjs","../../../../../node_modules/@nuxt/nitro-server/dist/runtime/handlers/error.mjs","../../../../../node_modules/nitropack/dist/runtime/internal/error/utils.mjs","../../../../../node_modules/nitropack/dist/runtime/internal/error/prod.mjs","../../../../../node_modules/@nuxtjs/color-mode/dist/runtime/nitro-plugin.js","../../../../../packages/core/dist/errors/httpError.js","../../../../../packages/core/dist/crypto/encryption.js","../../../../../packages/integration-data/dist/loader.js","../../../../../packages/core/dist/integrations/tools.js","../../../../../packages/core/dist/integrations/providerRegistry.js","../../../../../packages/core/dist/integrations/sandbox.js","../../../../../packages/core/dist/integrations/getIntegration.js","../../../../../packages/core/dist/integrations/sandboxUtils.js","../../../../../packages/core/dist/integrations/executableToolFactory.js","../../../../../packages/core/dist/integrations/fileIntegrationTypeConfigStore.js","../../../../../packages/core/dist/integrations/googleServiceAccount.js","../../../../../packages/core/dist/integrations/proxy.js","../../../../../packages/core/dist/db/schema.js","../../../../../packages/core/dist/db/integrationTypeConfigStore.js","../../../../../packages/core/dist/integrations/health.js","../../../../../packages/core/dist/integrations/integrationTypeConfigLookup.js","../../../../../packages/core/dist/db/client.js","../../../../../packages/core/dist/db/credentialStore.js","../../../../../packages/core/dist/db/integrationStore.js","../../../../../packages/core/dist/db/toolDefinitionStore.js","../../../../../packages/core/dist/mcp/toolAdapter.js","../../../../../packages/core/dist/mcp/abilityCatalog.js","../../../../../packages/core/dist/integrations/customToolFactory.js","../../../../../packages/core/dist/mcp/metaTools.js","../../../../../packages/core/dist/mcp/handlers.js","../../../../../packages/core/dist/mcp/sessionState.js","../../../../../packages/core/dist/mcp/auth.js","../../../../../packages/core/dist/config/configSchema.js","../../../../../packages/core/dist/config/configLoader.js","../../../../../packages/core/dist/config/configApply.js","../../../../../packages/core/dist/runtime/credentialManager.js","../../../../server/utils/db.ts","../../../../server/plugins/configApply.ts","../../../../server/plugins/requireEncryptionSecret.ts","../../../../../node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs","../../../../../node_modules/nitropack/dist/runtime/internal/static.mjs","../../../../server/middleware/mcpAuth.ts","../../../../../node_modules/nitropack/dist/runtime/internal/plugin.mjs","../../../../../node_modules/nitropack/dist/runtime/internal/renderer.mjs","../../../../../node_modules/@nuxt/nitro-server/dist/runtime/utils/paths.mjs","../../../../server/utils/mcp.ts","../../../../node_modules/.cache/nuxt/.nuxt/nuxt-icon-server-bundle.mjs","../../../../../node_modules/@nuxt/icon/dist/runtime/server/api.js","../../../../../node_modules/nitropack/dist/runtime/internal/app.mjs","../../../../../node_modules/nitropack/dist/runtime/internal/lib/http-graceful-shutdown.mjs","../../../../../node_modules/nitropack/dist/runtime/internal/shutdown.mjs","../../../../../node_modules/nitropack/dist/presets/node/runtime/node-server.mjs"],"names":["getQuery","createRouter","f","h","c","i","l","createError","getHeader","mergeHeaders","s","nodeFetch","fetch","Headers","Headers$1","AbortController$1","$fetch","normalizeKey","defineDriver","DRIVER_NAME","dirname","fsPromises","resolve","fsp","serialize","hash","getKey","_inlineAppConfig","createRadixRouter","__publicField","SCOPE_RANK","URL","URLSearchParams","baseUrl","creds","v","Buffer","providerCfg","finalUrl","response","sqlitePrimaryKey","pgText","pgInteger","pgPrimaryKey","t","db","parseJson","normalizeHintMarkdown","drizzlePg","drizzleSqlite","humanize","levenshtein","_a","_b","_c","name","tool","res","cwd","sid","nitroApp","callNodeRequestHandler","fetchNodeRequestHandler","gracefulShutdown","HttpsServer","HttpServer"],"mappings":"","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,24,25,26,27,28,29,30,31,32,33,34,35,70,71,73,74,75,77,78,79,80,81,82]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { d as defineEventHandler, t as readBody, z as handleMcpHttp, A as setResponseStatus } from '../../nitro/nitro.mjs';
|
|
2
|
+
import '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import '@modelcontextprotocol/sdk/server/index.js';
|
|
4
|
+
import '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
5
|
+
import 'node:crypto';
|
|
6
|
+
import 'fastest-levenshtein';
|
|
7
|
+
import 'node:fs';
|
|
8
|
+
import 'node:path';
|
|
9
|
+
import 'node:url';
|
|
10
|
+
import 'node:vm';
|
|
11
|
+
import 'turndown';
|
|
12
|
+
import 'marked';
|
|
13
|
+
import 'drizzle-orm';
|
|
14
|
+
import 'node:buffer';
|
|
15
|
+
import 'google-auth-library';
|
|
16
|
+
import 'node:http';
|
|
17
|
+
import 'node:https';
|
|
18
|
+
import 'node:events';
|
|
19
|
+
import 'node:os';
|
|
20
|
+
import 'better-sqlite3';
|
|
21
|
+
import 'drizzle-orm/better-sqlite3';
|
|
22
|
+
import 'drizzle-orm/node-postgres';
|
|
23
|
+
import 'pg';
|
|
24
|
+
import 'node:process';
|
|
25
|
+
import 'js-yaml';
|
|
26
|
+
import 'zod';
|
|
27
|
+
import 'drizzle-orm/sqlite-core';
|
|
28
|
+
import 'drizzle-orm/pg-core';
|
|
29
|
+
import '@iconify/utils';
|
|
30
|
+
import 'consola';
|
|
31
|
+
|
|
32
|
+
const _static = defineEventHandler(async (event) => {
|
|
33
|
+
var _a, _b;
|
|
34
|
+
const method = event.node.req.method || "GET";
|
|
35
|
+
const body = method === "POST" ? await readBody(event) : void 0;
|
|
36
|
+
const result = await handleMcpHttp({
|
|
37
|
+
nodeReq: event.node.req,
|
|
38
|
+
nodeRes: event.node.res,
|
|
39
|
+
body,
|
|
40
|
+
endpoint: "static",
|
|
41
|
+
authApiKeyId: (_b = (_a = event.context.auth) == null ? void 0 : _a.apiKeyId) != null ? _b : null
|
|
42
|
+
});
|
|
43
|
+
if (result.kind === "handled") {
|
|
44
|
+
event._handled = true;
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
setResponseStatus(event, result.statusCode);
|
|
48
|
+
return {
|
|
49
|
+
jsonrpc: "2.0",
|
|
50
|
+
error: { code: -32e3, message: result.message },
|
|
51
|
+
id: null
|
|
52
|
+
};
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
export { _static as default };
|
|
56
|
+
//# sourceMappingURL=static.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static.mjs","sources":["../../../../../server/routes/mcp/static.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,gBAAe,kBAAA,CAAmB,OAAO,KAAA,KAAU;AAHnD,EAAA,IAAA,EAAA,EAAA,EAAA;AAIE,EAAA,MAAM,MAAA,GAAS,KAAA,CAAM,IAAA,CAAK,GAAA,CAAI,MAAA,IAAU,KAAA;AACxC,EAAA,MAAM,OAAO,MAAA,KAAW,MAAA,GAAS,MAAM,QAAA,CAAS,KAAK,CAAA,GAAI,MAAA;AAEzD,EAAA,MAAM,MAAA,GAAS,MAAM,aAAA,CAAc;AAAA,IACjC,OAAA,EAAS,MAAM,IAAA,CAAK,GAAA;AAAA,IACpB,OAAA,EAAS,MAAM,IAAA,CAAK,GAAA;AAAA,IACpB,IAAA;AAAA,IACA,QAAA,EAAU,QAAA;AAAA,IACV,eAAc,EAAA,GAAA,CAAA,EAAA,GAAA,KAAA,CAAM,OAAA,CAAQ,IAAA,KAAd,IAAA,GAAA,MAAA,GAAA,EAAA,CAAoB,aAApB,IAAA,GAAA,EAAA,GAAgC;AAAA,GAC/C,CAAA;AAED,EAAA,IAAI,MAAA,CAAO,SAAS,SAAA,EAAW;AAC7B,IAAA,KAAA,CAAM,QAAA,GAAW,IAAA;AACjB,IAAA;AAAA,EACF;AAEA,EAAA,iBAAA,CAAkB,KAAA,EAAO,OAAO,UAAU,CAAA;AAC1C,EAAA,OAAO;AAAA,IACL,OAAA,EAAS,KAAA;AAAA,IACT,OAAO,EAAE,IAAA,EAAM,KAAA,EAAQ,OAAA,EAAS,OAAO,OAAA,EAAQ;AAAA,IAC/C,EAAA,EAAI;AAAA,GACN;AACF,CAAC,CAAA;;;;"}
|
|
@@ -37,7 +37,7 @@ const mcp = defineEventHandler(async (event) => {
|
|
|
37
37
|
nodeReq: event.node.req,
|
|
38
38
|
nodeRes: event.node.res,
|
|
39
39
|
body,
|
|
40
|
-
endpoint: "
|
|
40
|
+
endpoint: "dynamic",
|
|
41
41
|
authApiKeyId: (_b = (_a = event.context.auth) == null ? void 0 : _a.apiKeyId) != null ? _b : null
|
|
42
42
|
});
|
|
43
43
|
if (result.kind === "handled") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.mjs","sources":["../../../../server/routes/mcp.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,YAAe,kBAAA,CAAmB,OAAO,KAAA,KAAU;AAHnD,EAAA,IAAA,EAAA,EAAA,EAAA;AAIE,EAAA,MAAM,MAAA,GAAS,KAAA,CAAM,IAAA,CAAK,GAAA,CAAI,MAAA,IAAU,KAAA;AACxC,EAAA,MAAM,OAAO,MAAA,KAAW,MAAA,GAAS,MAAM,QAAA,CAAS,KAAK,CAAA,GAAI,MAAA;AAEzD,EAAA,MAAM,MAAA,GAAS,MAAM,aAAA,CAAc;AAAA,IACjC,OAAA,EAAS,MAAM,IAAA,CAAK,GAAA;AAAA,IACpB,OAAA,EAAS,MAAM,IAAA,CAAK,GAAA;AAAA,IACpB,IAAA;AAAA,IACA,QAAA,EAAU,
|
|
1
|
+
{"version":3,"file":"mcp.mjs","sources":["../../../../server/routes/mcp.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,YAAe,kBAAA,CAAmB,OAAO,KAAA,KAAU;AAHnD,EAAA,IAAA,EAAA,EAAA,EAAA;AAIE,EAAA,MAAM,MAAA,GAAS,KAAA,CAAM,IAAA,CAAK,GAAA,CAAI,MAAA,IAAU,KAAA;AACxC,EAAA,MAAM,OAAO,MAAA,KAAW,MAAA,GAAS,MAAM,QAAA,CAAS,KAAK,CAAA,GAAI,MAAA;AAEzD,EAAA,MAAM,MAAA,GAAS,MAAM,aAAA,CAAc;AAAA,IACjC,OAAA,EAAS,MAAM,IAAA,CAAK,GAAA;AAAA,IACpB,OAAA,EAAS,MAAM,IAAA,CAAK,GAAA;AAAA,IACpB,IAAA;AAAA,IACA,QAAA,EAAU,SAAA;AAAA,IACV,eAAc,EAAA,GAAA,CAAA,EAAA,GAAA,KAAA,CAAM,OAAA,CAAQ,IAAA,KAAd,IAAA,GAAA,MAAA,GAAA,EAAA,CAAoB,aAApB,IAAA,GAAA,EAAA,GAAgC;AAAA,GAC/C,CAAA;AAED,EAAA,IAAI,MAAA,CAAO,SAAS,SAAA,EAAW;AAC7B,IAAA,KAAA,CAAM,QAAA,GAAW,IAAA;AACjB,IAAA;AAAA,EACF;AAEA,EAAA,iBAAA,CAAkB,KAAA,EAAO,OAAO,UAAU,CAAA;AAC1C,EAAA,OAAO;AAAA,IACL,OAAA,EAAS,KAAA;AAAA,IACT,OAAO,EAAE,IAAA,EAAM,KAAA,EAAQ,OAAA,EAAS,OAAO,OAAA,EAAQ;AAAA,IAC/C,EAAA,EAAI;AAAA,GACN;AACF,CAAC,CAAA;;;;"}
|
package/README.md
CHANGED
|
@@ -5,7 +5,8 @@ This workspace is the published `@commandable/mcp` package.
|
|
|
5
5
|
It owns:
|
|
6
6
|
|
|
7
7
|
- the Nuxt management UI
|
|
8
|
-
- the `/mcp`
|
|
8
|
+
- the `/mcp` dynamic endpoint
|
|
9
|
+
- the `/mcp/static` compatibility endpoint
|
|
9
10
|
- the `/mcp/create` create endpoint
|
|
10
11
|
- the local server lifecycle CLI
|
|
11
12
|
- the human-facing `create` and `connect` commands
|
|
@@ -46,6 +47,12 @@ npx -y @commandable/mcp create --transport http --url <create-url> --api-key <ap
|
|
|
46
47
|
npx -y @commandable/mcp connect --transport http --url <read-url> --api-key <api-key>
|
|
47
48
|
```
|
|
48
49
|
|
|
50
|
+
Recommended URLs:
|
|
51
|
+
|
|
52
|
+
- dynamic: `<base-url>/mcp`
|
|
53
|
+
- static: `<base-url>/mcp/static`
|
|
54
|
+
- create: `<base-url>/mcp/create`
|
|
55
|
+
|
|
49
56
|
## Notes
|
|
50
57
|
|
|
51
58
|
- The old embedded-bundle-in-another-package model is gone.
|
package/bin/cli.mjs
CHANGED
|
@@ -176,7 +176,7 @@ function makeReadModeConfig() {
|
|
|
176
176
|
mcpServers: {
|
|
177
177
|
commandable: {
|
|
178
178
|
command: 'npx',
|
|
179
|
-
args: ['-y', '@commandable/mcp-connect'],
|
|
179
|
+
args: ['-y', '@commandable/mcp-connect', 'static-mode'],
|
|
180
180
|
},
|
|
181
181
|
},
|
|
182
182
|
}
|
|
@@ -308,7 +308,8 @@ async function runServe() {
|
|
|
308
308
|
console.error(picocolors.green(`Commandable local instance ${ui.reused ? 'ready' : 'running'}.`))
|
|
309
309
|
console.error(`${picocolors.dim('Base URL:')} ${baseUrl}`)
|
|
310
310
|
console.error(`${picocolors.dim('Management UI:')} ${baseUrl}/`)
|
|
311
|
-
console.error(`${picocolors.dim('MCP endpoint:')} ${baseUrl}/mcp`)
|
|
311
|
+
console.error(`${picocolors.dim('Dynamic MCP endpoint:')} ${baseUrl}/mcp`)
|
|
312
|
+
console.error(`${picocolors.dim('Static MCP endpoint:')} ${baseUrl}/mcp/static`)
|
|
312
313
|
console.error(`${picocolors.dim('Create endpoint:')} ${baseUrl}/mcp/create`)
|
|
313
314
|
console.error(`${picocolors.dim('Data dir:')} ${getCommandableDir()}`)
|
|
314
315
|
console.error(`${picocolors.dim('SQLite:')} ${getSqlitePathForLocalState()}`)
|
|
@@ -515,8 +516,8 @@ function help(exitCode = 0) {
|
|
|
515
516
|
'',
|
|
516
517
|
picocolors.bold('Notes'),
|
|
517
518
|
`- ${picocolors.bold('Serve')}: starts or reuses the local Commandable instance.`,
|
|
518
|
-
`- ${picocolors.bold('Create')}: Claude Code authoring flow. Prints or applies ${picocolors.cyan('claude mcp add')}.`,
|
|
519
|
-
`- ${picocolors.bold('Connect')}: prints
|
|
519
|
+
`- ${picocolors.bold('Create')}: Claude Code authoring flow. Prints or applies ${picocolors.cyan('claude mcp add')} for builder mode.`,
|
|
520
|
+
`- ${picocolors.bold('Connect')}: prints compatibility client connection details (stdio static-mode or HTTP /mcp by default).`,
|
|
520
521
|
'',
|
|
521
522
|
].join('\n'))
|
|
522
523
|
process.exit(exitCode)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commandable/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Commandable app/server package for local management UI, HTTP endpoints, and human-facing CLI flows.",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"prepack": "npm run build"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@commandable/mcp-core": "0.2.0",
|
|
37
36
|
"@clack/prompts": "^1.0.1",
|
|
37
|
+
"@commandable/mcp-core": "0.3.0",
|
|
38
38
|
"@iconify-json/lucide": "^1.2.90",
|
|
39
39
|
"@iconify-json/simple-icons": "^1.2.70",
|
|
40
40
|
"@nuxt/ui": "^4.4.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"ee5097c4-b785-4b77-92d6-c16a7396d677","timestamp":1772987295320,"prerendered":[]}
|