Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

toolception

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

toolception - npm Package Compare versions

Comparing version
0.6.0
to
0.6.1
+259
-249
dist/index.js

@@ -1,15 +0,15 @@

var se = Object.defineProperty;
var L = (o) => {
var re = Object.defineProperty;
var j = (o) => {
throw TypeError(o);
};
var oe = (o, e, t) => e in o ? se(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
var d = (o, e, t) => oe(o, typeof e != "symbol" ? e + "" : e, t), re = (o, e, t) => e.has(o) || L("Cannot " + t);
var S = (o, e, t) => e.has(o) ? L("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(o) : e.set(o, t);
var m = (o, e, t) => (re(o, e, "access private method"), t);
var ie = (o, e, t) => e in o ? re(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
var d = (o, e, t) => ie(o, typeof e != "symbol" ? e + "" : e, t), ne = (o, e, t) => e.has(o) || j("Cannot " + t);
var A = (o, e, t) => e.has(o) ? j("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(o) : e.set(o, t);
var m = (o, e, t) => (ne(o, e, "access private method"), t);
import { z as v } from "zod";
import N from "fastify";
import k from "@fastify/cors";
import { randomUUID as b, createHash as ie } from "node:crypto";
import { StreamableHTTPServerTransport as O } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
import { isInitializeRequest as D } from "@modelcontextprotocol/sdk/types.js";
import D from "@fastify/cors";
import { randomUUID as S, createHash as ae } from "node:crypto";
import { StreamableHTTPServerTransport as z } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
import { isInitializeRequest as _ } from "@modelcontextprotocol/sdk/types.js";
const R = {

@@ -23,3 +23,3 @@ dynamic: [

};
class ne {
class le {
constructor(e = {}) {

@@ -116,6 +116,12 @@ d(this, "keys");

}
class ae {
const k = ["_meta"];
class ce {
constructor(e) {
d(this, "catalog");
d(this, "moduleLoaders");
for (const t of k)
if (t in e.catalog)
throw new Error(
`Toolset key '${t}' is reserved for internal use and cannot be used in the catalog`
);
this.catalog = e.catalog, this.moduleLoaders = e.moduleLoaders ?? {};

@@ -143,2 +149,5 @@ }

)}`
} : k.includes(t) ? {
isValid: !1,
error: `Toolset key '${t}' is reserved for internal use`
} : this.catalog[t] ? { isValid: !0, sanitized: t } : {

@@ -157,6 +166,6 @@ isValid: !1,

for (const n of i.modules) {
const a = this.moduleLoaders[n];
if (a)
const l = this.moduleLoaders[n];
if (l)
try {
const c = await a(t);
const c = await l(t);
Array.isArray(c) && c.length > 0 && s.push(...c);

@@ -174,3 +183,3 @@ } catch (c) {

}
class j extends Error {
class O extends Error {
constructor(t, s, r, i) {

@@ -183,3 +192,3 @@ super(t);

}
class z {
class q {
constructor(e = {}) {

@@ -201,3 +210,3 @@ d(this, "options");

if (this.names.has(e))
throw new j(
throw new O(
`Tool name collision: '${e}' already registered`,

@@ -217,3 +226,3 @@ "E_TOOL_NAME_CONFLICT"

if (this.has(r))
throw new j(
throw new O(
`Tool name collision for '${r}'`,

@@ -235,3 +244,3 @@ "E_TOOL_NAME_CONFLICT"

}
class le {
class de {
constructor(e) {

@@ -245,3 +254,3 @@ d(this, "server");

d(this, "activeToolsets", /* @__PURE__ */ new Set());
this.server = e.server, this.resolver = e.resolver, this.context = e.context, this.onToolsListChanged = e.onToolsListChanged, this.exposurePolicy = e.exposurePolicy, this.toolRegistry = e.toolRegistry ?? new z({ namespaceWithToolset: !0 });
this.server = e.server, this.resolver = e.resolver, this.context = e.context, this.onToolsListChanged = e.onToolsListChanged, this.exposurePolicy = e.exposurePolicy, this.toolRegistry = e.toolRegistry ?? new q({ namespaceWithToolset: !0 });
}

@@ -299,19 +308,19 @@ /**

try {
const a = await this.resolver.resolveToolsForToolsets(
const l = await this.resolver.resolveToolsForToolsets(
[r],
this.context
);
if (a && a.length > 0) {
if (l && l.length > 0) {
const c = this.toolRegistry.mapAndValidate(
r,
a
l
);
for (const l of c)
this.registerSingleTool(l, r), n.push(l.name);
for (const a of c)
this.registerSingleTool(a, r), n.push(a.name);
}
return this.activeToolsets.add(r), t || await this.notifyToolsChanged(), {
success: !0,
message: `Toolset '${r}' enabled successfully. Registered ${a?.length ?? 0} tools.`
message: `Toolset '${r}' enabled successfully. Registered ${l?.length ?? 0} tools.`
};
} catch (a) {
} catch (l) {
return n.length > 0 && console.warn(

@@ -321,3 +330,3 @@ `Partial failure enabling toolset '${r}'. ${n.length} tools were registered but toolset activation failed. Tools remain registered due to MCP limitations: ${n.join(", ")}`

success: !1,
message: `Failed to enable toolset '${r}': ${a instanceof Error ? a.message : "Unknown error"}`
message: `Failed to enable toolset '${r}': ${l instanceof Error ? l.message : "Unknown error"}`
};

@@ -412,9 +421,9 @@ }

try {
const a = await this.enableToolset(n, !0);
t.push({ name: n, ...a });
} catch (a) {
const l = await this.enableToolset(n, !0);
t.push({ name: n, ...l });
} catch (l) {
t.push({
name: n,
success: !1,
message: a instanceof Error ? a.message : "Unknown error",
message: l instanceof Error ? l.message : "Unknown error",
code: "E_INTERNAL"

@@ -435,4 +444,5 @@ });

}
function ce(o, e, t) {
(t?.mode ?? "DYNAMIC") === "DYNAMIC" && (o.tool(
const b = "_meta";
function ue(o, e, t, s) {
(s?.mode ?? "DYNAMIC") === "DYNAMIC" && (t.addForToolset(b, "enable_toolset"), o.tool(
"enable_toolset",

@@ -442,9 +452,9 @@ "Enable a toolset by name",

{ destructiveHint: !0, idempotentHint: !0 },
async (r) => {
const i = await e.enableToolset(r.name);
async (i) => {
const n = await e.enableToolset(i.name);
return {
content: [{ type: "text", text: JSON.stringify(i) }]
content: [{ type: "text", text: JSON.stringify(n) }]
};
}
), o.tool(
), t.addForToolset(b, "disable_toolset"), o.tool(
"disable_toolset",

@@ -454,9 +464,9 @@ "Disable a toolset by name (state only)",

{ destructiveHint: !0, idempotentHint: !0 },
async (r) => {
const i = await e.disableToolset(r.name);
async (i) => {
const n = await e.disableToolset(i.name);
return {
content: [{ type: "text", text: JSON.stringify(i) }]
content: [{ type: "text", text: JSON.stringify(n) }]
};
}
), o.tool(
), t.addForToolset(b, "list_toolsets"), o.tool(
"list_toolsets",

@@ -467,14 +477,14 @@ "List available toolsets with active status and definitions",

async () => {
const r = e.getAvailableToolsets(), i = e.getStatus().toolsetToTools, n = r.map((a) => {
const c = e.getToolsetDefinition(a);
const i = e.getAvailableToolsets(), n = e.getStatus().toolsetToTools, l = i.map((c) => {
const a = e.getToolsetDefinition(c);
return {
key: a,
active: e.isActive(a),
definition: c ? {
name: c.name,
description: c.description,
modules: c.modules ?? [],
decisionCriteria: c.decisionCriteria ?? void 0
key: c,
active: e.isActive(c),
definition: a ? {
name: a.name,
description: a.description,
modules: a.modules ?? [],
decisionCriteria: a.decisionCriteria ?? void 0
} : null,
tools: i[a] ?? []
tools: n[c] ?? []
};

@@ -484,7 +494,7 @@ });

content: [
{ type: "text", text: JSON.stringify({ toolsets: n }) }
{ type: "text", text: JSON.stringify({ toolsets: l }) }
]
};
}
), o.tool(
), t.addForToolset(b, "describe_toolset"), o.tool(
"describe_toolset",

@@ -494,5 +504,5 @@ "Describe a toolset with definition, active status and tools",

{ readOnlyHint: !0, idempotentHint: !0 },
async (r) => {
const i = e.getToolsetDefinition(r.name), n = e.getStatus().toolsetToTools;
if (!i)
async (i) => {
const n = e.getToolsetDefinition(i.name), l = e.getStatus().toolsetToTools;
if (!n)
return {

@@ -502,22 +512,22 @@ content: [

type: "text",
text: JSON.stringify({ error: `Unknown toolset '${r.name}'` })
text: JSON.stringify({ error: `Unknown toolset '${i.name}'` })
}
]
};
const a = {
key: r.name,
active: e.isActive(r.name),
const c = {
key: i.name,
active: e.isActive(i.name),
definition: {
name: i.name,
description: i.description,
modules: i.modules ?? [],
decisionCriteria: i.decisionCriteria ?? void 0
name: n.name,
description: n.description,
modules: n.modules ?? [],
decisionCriteria: n.decisionCriteria ?? void 0
},
tools: n[r.name] ?? []
tools: l[i.name] ?? []
};
return {
content: [{ type: "text", text: JSON.stringify(a) }]
content: [{ type: "text", text: JSON.stringify(c) }]
};
}
)), o.tool(
)), t.addForToolset(b, "list_tools"), o.tool(
"list_tools",

@@ -528,8 +538,8 @@ "List currently registered tool names (best effort)",

async () => {
const r = e.getStatus(), i = {
tools: r.tools,
toolsetToTools: r.toolsetToTools
const i = e.getStatus(), n = {
tools: i.tools,
toolsetToTools: i.toolsetToTools
};
return {
content: [{ type: "text", text: JSON.stringify(i) }]
content: [{ type: "text", text: JSON.stringify(n) }]
};

@@ -539,3 +549,3 @@ }

}
class A {
class C {
constructor(e) {

@@ -548,12 +558,12 @@ d(this, "mode");

d(this, "initError", null);
this.toolsetValidator = new ne();
this.toolsetValidator = new le();
const t = e.startup ?? {}, s = this.resolveStartupConfig(t, e.catalog);
this.mode = s.mode, this.resolver = new ae({
this.mode = s.mode, this.resolver = new ce({
catalog: e.catalog,
moduleLoaders: e.moduleLoaders
});
const r = new z({
const r = new q({
namespaceWithToolset: e.exposurePolicy?.namespaceToolsWithSetKey ?? !0
});
this.manager = new le({
this.manager = new de({
server: e.server,

@@ -565,3 +575,3 @@ resolver: this.resolver,

toolRegistry: r
}), e.registerMetaTools !== !1 && ce(e.server, this.manager, { mode: this.mode });
}), e.registerMetaTools !== !1 && ue(e.server, this.manager, r, { mode: this.mode });
const i = s.toolsets;

@@ -610,4 +620,4 @@ this.initPromise = this.initializeToolsets(i);

for (const i of s) {
const { isValid: n, sanitized: a, error: c } = this.toolsetValidator.validateToolsetName(i, t);
n && a ? r.push(a) : c && console.warn(c);
const { isValid: n, sanitized: l, error: c } = this.toolsetValidator.validateToolsetName(i, t);
n && l ? r.push(l) : c && console.warn(c);
}

@@ -626,4 +636,4 @@ if (s.length > 0 && r.length === 0)

for (const r of e.toolsets) {
const { isValid: i, sanitized: n, error: a } = this.toolsetValidator.validateToolsetName(r, t);
i && n ? s.push(n) : a && console.warn(a);
const { isValid: i, sanitized: n, error: l } = this.toolsetValidator.validateToolsetName(r, t);
i && n ? s.push(n) : l && console.warn(l);
}

@@ -645,6 +655,6 @@ if (s.length === 0)

}
var x, E;
class q {
var x, P;
class F {
constructor(e = {}) {
S(this, x);
A(this, x);
d(this, "storage", /* @__PURE__ */ new Map());

@@ -685,3 +695,3 @@ d(this, "maxSize");

const t = this.storage.get(e);
t && (this.storage.delete(e), m(this, x, E).call(this, e, t.resource));
t && (this.storage.delete(e), m(this, x, P).call(this, e, t.resource));
}

@@ -703,3 +713,3 @@ /**

for (const [t, s] of e)
m(this, x, E).call(this, t, s.resource);
m(this, x, P).call(this, t, s.resource);
}

@@ -732,3 +742,3 @@ /**

*/
E = function(e, t) {
P = function(e, t) {
if (this.onEvict)

@@ -749,3 +759,3 @@ try {

if (r.some(
(l) => n.startsWith(`${e}${l}`)
(a) => n.startsWith(`${e}${a}`)
)) {

@@ -758,10 +768,10 @@ console.warn(

const c = i.method.toLowerCase();
o[c](n, async (l, u) => {
o[c](n, async (a, u) => {
try {
const h = l.headers["mcp-client-id"]?.trim(), g = h && h.length > 0 ? h : `anon-${b()}`;
const h = a.headers["mcp-client-id"]?.trim(), g = h && h.length > 0 ? h : `anon-${S()}`;
let w;
if (i.bodySchema) {
const y = i.bodySchema.safeParse(l.body);
const y = i.bodySchema.safeParse(a.body);
if (!y.success)
return C(u, "body", y.error);
return E(u, "body", y.error);
w = y.data;

@@ -771,28 +781,28 @@ }

if (i.querySchema) {
const y = i.querySchema.safeParse(l.query);
const y = i.querySchema.safeParse(a.query);
if (!y.success)
return C(u, "query", y.error);
return E(u, "query", y.error);
T = y.data;
}
let M = {};
let I = {};
if (i.paramsSchema) {
const y = i.paramsSchema.safeParse(l.params);
const y = i.paramsSchema.safeParse(a.params);
if (!y.success)
return C(u, "params", y.error);
M = y.data;
return E(u, "params", y.error);
I = y.data;
}
const I = {
const $ = {
body: w,
query: T,
params: M,
headers: l.headers,
params: I,
headers: a.headers,
clientId: g
};
if (s?.contextExtractor) {
const y = await s.contextExtractor(l);
Object.assign(I, y);
const y = await s.contextExtractor(a);
Object.assign($, y);
}
const $ = await i.handler(I);
const L = await i.handler($);
if (i.responseSchema) {
const y = i.responseSchema.safeParse($);
const y = i.responseSchema.safeParse(L);
return y.success ? y.data : (console.error(

@@ -808,3 +818,3 @@ `Response validation failed for ${i.method} ${i.path}:`,

}
return $;
return L;
} catch (h) {

@@ -824,3 +834,3 @@ return console.error(

}
function C(o, e, t) {
function E(o, e, t) {
return o.code(400), {

@@ -834,3 +844,3 @@ error: {

}
class de {
class he {
constructor(e, t, s = {}, r, i, n) {

@@ -845,3 +855,3 @@ d(this, "options");

// Per-client server bundles and per-client session transports
d(this, "clientCache", new q({
d(this, "clientCache", new F({
onEvict: (e, t) => {

@@ -864,3 +874,3 @@ this.cleanupBundle(t);

const e = this.options.app ?? N({ logger: this.options.logger });
this.options.cors && await e.register(k, { origin: !0 });
this.options.cors && await e.register(D, { origin: !0 });
const t = this.options.basePath.endsWith("/") ? this.options.basePath.slice(0, -1) : this.options.basePath;

@@ -879,9 +889,9 @@ e.get(`${t}/healthz`, async () => ({ ok: !0 })), e.get(`${t}/tools`, async () => this.defaultManager.getStatus()), e.get(`${t}/.well-known/mcp-config`, async (s, r) => (r.header("Content-Type", "application/schema+json; charset=utf-8"), this.configSchema ?? {

async (s, r) => {
const i = s.headers["mcp-client-id"]?.trim(), n = i && i.length > 0 ? i : `anon-${b()}`, a = !n.startsWith("anon-"), { cacheKey: c, mergedContext: l } = this.resolveSessionContext(
const i = s.headers["mcp-client-id"]?.trim(), n = i && i.length > 0 ? i : `anon-${S()}`, l = !n.startsWith("anon-"), { cacheKey: c, mergedContext: a } = this.resolveSessionContext(
s,
n
);
let u = a ? this.clientCache.get(c) : null;
let u = l ? this.clientCache.get(c) : null;
if (!u) {
const w = this.createBundle(l);
const w = this.createBundle(a);
u = {

@@ -891,3 +901,3 @@ server: w.server,

sessions: /* @__PURE__ */ new Map()
}, a && this.clientCache.set(c, u);
}, l && this.clientCache.set(c, u);
}

@@ -898,5 +908,5 @@ const h = s.headers["mcp-session-id"];

g = u.sessions.get(h);
else if (!h && D(s.body)) {
const w = b();
g = new O({
else if (!h && _(s.body)) {
const w = S();
g = new z({
sessionIdGenerator: () => w,

@@ -935,4 +945,4 @@ onsessioninitialized: (T) => {

return r.code(400), "Missing mcp-client-id";
const a = this.clientCache.get(n);
if (!a)
const l = this.clientCache.get(n);
if (!l)
return r.code(400), "Invalid or expired client";

@@ -942,9 +952,9 @@ const c = s.headers["mcp-session-id"];

return r.code(400), "Missing mcp-session-id";
const l = a.sessions.get(c);
return l ? (await l.handleRequest(s.raw, r.raw), r) : (r.code(400), "Invalid or expired session ID");
const a = l.sessions.get(c);
return a ? (await a.handleRequest(s.raw, r.raw), r) : (r.code(400), "Invalid or expired session ID");
}), e.delete(
`${t}/mcp`,
async (s, r) => {
const i = s.headers["mcp-client-id"]?.trim(), n = i && i.length > 0 ? i : "", a = s.headers["mcp-session-id"];
if (!n || !a)
const i = s.headers["mcp-client-id"]?.trim(), n = i && i.length > 0 ? i : "", l = s.headers["mcp-session-id"];
if (!n || !l)
return r.code(400), {

@@ -958,4 +968,4 @@ jsonrpc: "2.0",

};
const c = this.clientCache.get(n), l = c?.sessions.get(a);
if (!c || !l)
const c = this.clientCache.get(n), a = c?.sessions.get(l);
if (!c || !a)
return r.code(404), {

@@ -967,9 +977,9 @@ jsonrpc: "2.0",

try {
if (typeof l.close == "function")
if (typeof a.close == "function")
try {
await l.close();
await a.close();
} catch {
}
} finally {
l?.sessionId ? c.sessions.delete(l.sessionId) : c.sessions.delete(a);
a?.sessionId ? c.sessions.delete(a.sessionId) : c.sessions.delete(l);
}

@@ -1062,3 +1072,3 @@ return r.code(204).send(), r;

}
class ue {
class fe {
constructor(e) {

@@ -1196,9 +1206,9 @@ d(this, "config");

const r = JSON.stringify(s);
return ie("sha256").update(r).digest("hex").slice(0, 16);
return ae("sha256").update(r).digest("hex").slice(0, 16);
}
}
function K(o) {
he(o), fe(o), me(o), ye(o), ge(o);
me(o), ye(o), ge(o), pe(o), ve(o);
}
function he(o) {
function me(o) {
if (!o || typeof o != "object")

@@ -1209,3 +1219,3 @@ throw new Error(

}
function fe(o) {
function ye(o) {
if (o.enabled !== void 0 && typeof o.enabled != "boolean")

@@ -1216,3 +1226,3 @@ throw new Error(

}
function me(o) {
function ge(o) {
if (o.queryParam !== void 0) {

@@ -1240,3 +1250,3 @@ if (typeof o.queryParam != "object" || o.queryParam === null)

}
function ye(o) {
function pe(o) {
if (o.contextResolver !== void 0 && typeof o.contextResolver != "function")

@@ -1247,3 +1257,3 @@ throw new Error(

}
function ge(o) {
function ve(o) {
if (o.merge !== void 0 && o.merge !== "shallow" && o.merge !== "deep")

@@ -1254,13 +1264,13 @@ throw new Error(

}
const pe = v.object({
const we = v.object({
mode: v.enum(["DYNAMIC", "STATIC"]).optional(),
toolsets: v.union([v.array(v.string()), v.literal("ALL")]).optional()
}).strict();
async function ke(o) {
async function De(o) {
if (o.startup)
try {
pe.parse(o.startup);
} catch (l) {
if (l instanceof v.ZodError) {
const u = l.format();
we.parse(o.startup);
} catch (a) {
if (a instanceof v.ZodError) {
const u = a.format();
throw new Error(

@@ -1273,14 +1283,14 @@ `Invalid startup configuration:

}
throw l;
throw a;
}
const e = o.startup?.mode ?? "DYNAMIC";
let t;
if (o.sessionContext && (K(o.sessionContext), t = new ue(o.sessionContext), e === "STATIC" && o.sessionContext.enabled !== !1 && console.warn(
if (o.sessionContext && (K(o.sessionContext), t = new fe(o.sessionContext), e === "STATIC" && o.sessionContext.enabled !== !1 && console.warn(
"sessionContext has limited effect in STATIC mode: all clients share the same server instance with base context. Use DYNAMIC mode for per-session context isolation."
)), typeof o.createServer != "function")
throw new Error("createMcpServer: `createServer` (factory) is required");
const s = o.createServer(), r = (l) => typeof l?.server?.notification == "function", i = (l) => typeof l?.notifyToolsListChanged == "function", n = async (l) => {
const s = o.createServer(), r = (a) => typeof a?.server?.notification == "function", i = (a) => typeof a?.notifyToolsListChanged == "function", n = async (a) => {
try {
if (r(l)) {
await l.server.notification({
if (r(a)) {
await a.server.notification({
method: "notifications/tools/list_changed"

@@ -1290,3 +1300,3 @@ });

}
i(l) && await l.notifyToolsListChanged();
i(a) && await a.notifyToolsListChanged();
} catch (u) {

@@ -1297,3 +1307,3 @@ if ((u instanceof Error ? u.message : String(u)) === "Not connected")

}
}, a = new A({
}, l = new C({
server: s,

@@ -1308,10 +1318,10 @@ catalog: o.catalog,

});
e === "STATIC" && await a.ensureReady();
const c = new de(
a.getManager(),
(l) => {
const u = l ?? o.context;
e === "STATIC" && await l.ensureReady();
const c = new he(
l.getManager(),
(a) => {
const u = a ?? o.context;
if (e === "STATIC")
return { server: s, orchestrator: a };
const h = o.createServer(), g = new A({
return { server: s, orchestrator: l };
const h = o.createServer(), g = new C({
server: h,

@@ -1343,6 +1353,6 @@ catalog: o.catalog,

}
function ve(o) {
we(o), Te(o), be(o), xe(o);
function Te(o) {
be(o), Se(o), xe(o), Ae(o);
}
function we(o) {
function be(o) {
if (!o || typeof o != "object")

@@ -1353,3 +1363,3 @@ throw new Error(

}
function Te(o) {
function Se(o) {
if (!o.source)

@@ -1362,3 +1372,3 @@ throw new Error('Permission source must be either "headers" or "config"');

}
function be(o) {
function xe(o) {
if (o.source === "config" && !o.staticMap && !o.resolver)

@@ -1369,3 +1379,3 @@ throw new Error(

}
function xe(o) {
function Ae(o) {
if (o.staticMap !== void 0) {

@@ -1376,3 +1386,3 @@ if (typeof o.staticMap != "object" || o.staticMap === null)

);
Se(o.staticMap);
Ce(o.staticMap);
}

@@ -1388,3 +1398,3 @@ if (o.resolver !== void 0 && typeof o.resolver != "function")

}
function Se(o) {
function Ce(o) {
for (const [e, t] of Object.entries(o))

@@ -1396,4 +1406,4 @@ if (!Array.isArray(t))

}
var p, H, F, _, B, Y;
class Ae {
var p, H, B, Y, U, W;
class Ee {
/**

@@ -1404,3 +1414,3 @@ * Creates a new PermissionResolver instance.

constructor(e) {
S(this, p);
A(this, p);
d(this, "cache", /* @__PURE__ */ new Map());

@@ -1428,3 +1438,3 @@ d(this, "normalizedHeaderName");

try {
this.config.source === "headers" ? s = m(this, p, H).call(this, t) : s = m(this, p, _).call(this, e), Array.isArray(s) || (console.warn(
this.config.source === "headers" ? s = m(this, p, H).call(this, t) : s = m(this, p, Y).call(this, e), Array.isArray(s) || (console.warn(
`Permission resolution returned non-array for client ${e}, using empty permissions`

@@ -1470,3 +1480,3 @@ ), s = []), s = s.filter(

return [];
const t = m(this, p, F).call(this, e, this.normalizedHeaderName);
const t = m(this, p, B).call(this, e, this.normalizedHeaderName);
if (!t)

@@ -1490,3 +1500,3 @@ return [];

*/
F = function(e, t) {
B = function(e, t) {
if (e[t] !== void 0)

@@ -1505,5 +1515,5 @@ return e[t];

*/
_ = function(e) {
Y = function(e) {
if (this.config.resolver) {
const t = m(this, p, B).call(this, e);
const t = m(this, p, U).call(this, e);
if (t !== null)

@@ -1513,3 +1523,3 @@ return t;

if (this.config.staticMap) {
const t = m(this, p, Y).call(this, e);
const t = m(this, p, W).call(this, e);
if (t !== null)

@@ -1526,3 +1536,3 @@ return t;

*/
B = function(e) {
U = function(e) {
try {

@@ -1546,7 +1556,7 @@ const t = this.config.resolver(e);

*/
Y = function(e) {
W = function(e) {
const t = this.config.staticMap[e];
return t !== void 0 ? Array.isArray(t) ? t : [] : null;
};
function Ce(o, e) {
function Pe(o, e) {
return async (t) => {

@@ -1556,10 +1566,10 @@ const s = e.resolvePermissions(

t.headers
), r = o(s), i = r.orchestrator.getManager(), n = [], a = [];
), r = o(s), i = r.orchestrator.getManager(), n = [], l = [];
if (s.length > 0) {
const c = await i.enableToolsets(s);
for (const l of c.results)
l.success ? n.push(l.name) : (a.push(l.name), console.warn(
`Failed to enable toolset '${l.name}' for client '${t.clientId}': ${l.message}`
for (const a of c.results)
a.success ? n.push(a.name) : (l.push(a.name), console.warn(
`Failed to enable toolset '${a.name}' for client '${t.clientId}': ${a.message}`
));
if (n.length === 0 && a.length > 0)
if (n.length === 0 && l.length > 0)
throw new Error(

@@ -1573,8 +1583,8 @@ `All requested toolsets failed to enable for client '${t.clientId}'. Requested: [${s.join(", ")}]. Check that toolset names in permissions match the catalog.`

allowedToolsets: n,
failedToolsets: a
failedToolsets: l
};
};
}
var f, U, W, J, Q, G, Z, X, ee, P, te;
class Ee {
var f, J, Q, G, Z, X, ee, te, se, M, oe;
class Me {
/**

@@ -1588,3 +1598,3 @@ * Creates a new PermissionAwareFastifyTransport instance.

constructor(e, t, s = {}, r) {
S(this, f);
A(this, f);
d(this, "options");

@@ -1596,5 +1606,5 @@ d(this, "defaultManager");

// Per-client server bundles and per-client session transports
d(this, "clientCache", new q({
d(this, "clientCache", new F({
onEvict: (e, t) => {
m(this, f, U).call(this, t);
m(this, f, J).call(this, t);
}

@@ -1619,7 +1629,7 @@ }));

const e = this.options.app ?? N({ logger: this.options.logger });
this.options.cors && await e.register(k, { origin: !0 });
const t = m(this, f, W).call(this, this.options.basePath);
m(this, f, J).call(this, e, t), m(this, f, Q).call(this, e, t), m(this, f, G).call(this, e, t), m(this, f, Z).call(this, e, t), m(this, f, X).call(this, e, t), m(this, f, ee).call(this, e, t), this.options.customEndpoints && this.options.customEndpoints.length > 0 && V(e, t, this.options.customEndpoints, {
this.options.cors && await e.register(D, { origin: !0 });
const t = m(this, f, Q).call(this, this.options.basePath);
m(this, f, G).call(this, e, t), m(this, f, Z).call(this, e, t), m(this, f, X).call(this, e, t), m(this, f, ee).call(this, e, t), m(this, f, te).call(this, e, t), m(this, f, se).call(this, e, t), this.options.customEndpoints && this.options.customEndpoints.length > 0 && V(e, t, this.options.customEndpoints, {
contextExtractor: async (s) => {
const r = m(this, f, P).call(this, s);
const r = m(this, f, M).call(this, s);
try {

@@ -1656,3 +1666,3 @@ const i = await this.createPermissionAwareBundle(r);

*/
U = function(e) {
J = function(e) {
for (const [t, s] of e.sessions.entries())

@@ -1673,3 +1683,3 @@ try {

*/
W = function(e) {
Q = function(e) {
return e.endsWith("/") ? e.slice(0, -1) : e;

@@ -1682,3 +1692,3 @@ }, /**

*/
J = function(e, t) {
G = function(e, t) {
e.get(`${t}/healthz`, async () => ({ ok: !0 }));

@@ -1691,3 +1701,3 @@ }, /**

*/
Q = function(e, t) {
Z = function(e, t) {
e.get(`${t}/tools`, async () => this.defaultManager.getStatus());

@@ -1700,3 +1710,3 @@ }, /**

*/
G = function(e, t) {
X = function(e, t) {
e.get(`${t}/.well-known/mcp-config`, async (s, r) => (r.header("Content-Type", "application/schema+json; charset=utf-8"), this.configSchema ?? {

@@ -1719,9 +1729,9 @@ $schema: "https://json-schema.org/draft/2020-12/schema",

*/
Z = function(e, t) {
ee = function(e, t) {
e.post(
`${t}/mcp`,
async (s, r) => {
const i = m(this, f, P).call(this, s), n = !i.clientId.startsWith("anon-");
let a = n ? this.clientCache.get(i.clientId) : null;
if (!a)
const i = m(this, f, M).call(this, s), n = !i.clientId.startsWith("anon-");
let l = n ? this.clientCache.get(i.clientId) : null;
if (!l)
try {

@@ -1733,3 +1743,3 @@ const u = await this.createPermissionAwareBundle(i);

const h = u.sessions;
a = {
l = {
server: u.server,

@@ -1740,3 +1750,3 @@ orchestrator: u.orchestrator,

sessions: h instanceof Map ? h : /* @__PURE__ */ new Map()
}, n && this.clientCache.set(i.clientId, a);
}, n && this.clientCache.set(i.clientId, l);
} catch (u) {

@@ -1746,18 +1756,18 @@ return console.error(

u
), r.code(403), m(this, f, te).call(this, "Access denied");
), r.code(403), m(this, f, oe).call(this, "Access denied");
}
const c = s.headers["mcp-session-id"];
let l;
if (c && a.sessions.get(c))
l = a.sessions.get(c);
else if (!c && D(s.body)) {
const u = b();
l = new O({
let a;
if (c && l.sessions.get(c))
a = l.sessions.get(c);
else if (!c && _(s.body)) {
const u = S();
a = new z({
sessionIdGenerator: () => u,
onsessioninitialized: (h) => {
a.sessions.set(h, l);
l.sessions.set(h, a);
}
});
try {
await a.server.connect(l);
await l.server.connect(a);
} catch {

@@ -1770,4 +1780,4 @@ return r.code(500), {

}
l.onclose = () => {
l?.sessionId && a.sessions.delete(l.sessionId);
a.onclose = () => {
a?.sessionId && l.sessions.delete(a.sessionId);
};

@@ -1780,3 +1790,3 @@ } else

};
return await l.handleRequest(
return await a.handleRequest(
s.raw,

@@ -1794,3 +1804,3 @@ r.raw,

*/
X = function(e, t) {
te = function(e, t) {
e.get(`${t}/mcp`, async (s, r) => {

@@ -1800,4 +1810,4 @@ const i = s.headers["mcp-client-id"]?.trim(), n = i && i.length > 0 ? i : "";

return r.code(400), "Missing mcp-client-id";
const a = this.clientCache.get(n);
if (!a)
const l = this.clientCache.get(n);
if (!l)
return r.code(400), "Invalid or expired client";

@@ -1807,4 +1817,4 @@ const c = s.headers["mcp-session-id"];

return r.code(400), "Missing mcp-session-id";
const l = a.sessions.get(c);
return l ? (await l.handleRequest(s.raw, r.raw), r) : (r.code(400), "Invalid or expired session ID");
const a = l.sessions.get(c);
return a ? (await a.handleRequest(s.raw, r.raw), r) : (r.code(400), "Invalid or expired session ID");
});

@@ -1817,8 +1827,8 @@ }, /**

*/
ee = function(e, t) {
se = function(e, t) {
e.delete(
`${t}/mcp`,
async (s, r) => {
const i = s.headers["mcp-client-id"]?.trim(), n = i && i.length > 0 ? i : "", a = s.headers["mcp-session-id"];
if (!n || !a)
const i = s.headers["mcp-client-id"]?.trim(), n = i && i.length > 0 ? i : "", l = s.headers["mcp-session-id"];
if (!n || !l)
return r.code(400), {

@@ -1832,4 +1842,4 @@ jsonrpc: "2.0",

};
const c = this.clientCache.get(n), l = c?.sessions.get(a);
if (!c || !l)
const c = this.clientCache.get(n), a = c?.sessions.get(l);
if (!c || !a)
return r.code(404), {

@@ -1841,9 +1851,9 @@ jsonrpc: "2.0",

try {
if (typeof l.close == "function")
if (typeof a.close == "function")
try {
await l.close();
await a.close();
} catch {
}
} finally {
l?.sessionId ? c.sessions.delete(l.sessionId) : c.sessions.delete(a);
a?.sessionId ? c.sessions.delete(a.sessionId) : c.sessions.delete(l);
}

@@ -1860,4 +1870,4 @@ return r.code(204).send(), r;

*/
P = function(e) {
const t = e.headers["mcp-client-id"]?.trim(), s = t && t.length > 0 ? t : `anon-${b()}`, r = {};
M = function(e) {
const t = e.headers["mcp-client-id"]?.trim(), s = t && t.length > 0 ? t : `anon-${S()}`, r = {};
for (const [i, n] of Object.entries(e.headers))

@@ -1874,3 +1884,3 @@ typeof n == "string" && (r[i] = n);

*/
te = function(e = "Access denied", t = -32e3) {
oe = function(e = "Access denied", t = -32e3) {
return {

@@ -1885,3 +1895,3 @@ jsonrpc: "2.0",

};
function Pe(o) {
function Ie(o) {
if (!o) return;

@@ -1901,3 +1911,3 @@ const e = {

}
async function Oe(o) {
async function ze(o) {
if (!o.permissions)

@@ -1907,3 +1917,3 @@ throw new Error(

);
if (ve(o.permissions), o.sessionContext && (K(o.sessionContext), console.warn(
if (Te(o.permissions), o.sessionContext && (K(o.sessionContext), console.warn(
"Session context support for permission-based servers is limited. The base context will be used for module loaders."

@@ -1918,5 +1928,5 @@ )), o.startup)

);
const e = Pe(
const e = Ie(
o.exposurePolicy
), t = new Ae(o.permissions), s = o.createServer(), r = new A({
), t = new Ee(o.permissions), s = o.createServer(), r = new C({
server: s,

@@ -1931,5 +1941,5 @@ catalog: o.catalog,

registerMetaTools: !1
}), i = Ce(
(a) => {
const c = o.createServer(), l = new A({
}), i = Pe(
(l) => {
const c = o.createServer(), a = new C({
server: c,

@@ -1947,6 +1957,6 @@ catalog: o.catalog,

});
return { server: c, orchestrator: l };
return { server: c, orchestrator: a };
},
t
), n = new Ee(
), n = new Me(
r.getManager(),

@@ -1971,15 +1981,15 @@ i,

}
function De(o) {
function _e(o) {
return o;
}
function ze(o) {
function qe(o) {
return o;
}
export {
ue as SessionContextResolver,
ke as createMcpServer,
Oe as createPermissionBasedMcpServer,
De as defineEndpoint,
ze as definePermissionAwareEndpoint
fe as SessionContextResolver,
De as createMcpServer,
ze as createPermissionBasedMcpServer,
_e as defineEndpoint,
qe as definePermissionAwareEndpoint
};
//# sourceMappingURL=index.js.map
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import { Mode } from '../types/index.js';
import { DynamicToolManager } from '../core/DynamicToolManager.js';
import { ToolRegistry } from '../core/ToolRegistry.js';
/**
* Reserved toolset key for meta-tools.
* Meta-tools are registered under this key to enable collision detection
* and tracking via the ToolRegistry.
*/
export declare const META_TOOLSET_KEY = "_meta";
/**
* Registers meta-tools on the MCP server for toolset management.

@@ -14,9 +21,13 @@ *

*
* Meta-tools are registered with the ToolRegistry under the reserved "_meta" toolset key
* to enable collision detection with user-defined tools.
*
* @param server - The MCP server to register tools on
* @param manager - The DynamicToolManager instance
* @param toolRegistry - The ToolRegistry for collision detection
* @param options - Configuration options including the mode
*/
export declare function registerMetaTools(server: McpServer, manager: DynamicToolManager, options?: {
export declare function registerMetaTools(server: McpServer, manager: DynamicToolManager, toolRegistry: ToolRegistry, options?: {
mode?: Exclude<Mode, "ALL">;
}): void;
//# sourceMappingURL=registerMetaTools.d.ts.map

@@ -1,1 +0,1 @@

{"version":3,"file":"registerMetaTools.d.ts","sourceRoot":"","sources":["../../src/meta/registerMetaTools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,kBAAkB,EAC3B,OAAO,CAAC,EAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;CAAE,GACxC,IAAI,CAoHN"}
{"version":3,"file":"registerMetaTools.d.ts","sourceRoot":"","sources":["../../src/meta/registerMetaTools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAA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B,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,iBAAiB,EAAE,CAAC;CA4BhC"}
{"version":3,"file":"ModuleResolver.d.ts","sourceRoot":"","sources":["../../src/mode/ModuleResolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACb,MAAM,mBAAmB,CAAC;AAQ3B,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,cAAc,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;CAC9C;AAED,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAiB;IACzC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA+B;gBAEjD,OAAO,EAAE,qBAAqB;IAanC,oBAAoB,IAAI,MAAM,EAAE;IAIhC,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS;IAIjE,mBAAmB,CAAC,IAAI,EAAE,OAAO,GAAG;QACzC,OAAO,EAAE,OAAO,CAAC;QACjB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB;IAoCY,uBAAuB,CAClC,QAAQ,EAAE,MAAM,EAAE,EAClB,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,iBAAiB,EAAE,CAAC;CA4BhC"}

@@ -1,1 +0,1 @@

{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAI3E,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC,OAAO,EAAE,CAAC,IAAI,EAAE,GAA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EAAE,CAAC;CAC/B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,UAAU,CAAC,EAAE;QACX;;;WAGG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QAEd;;;;;WAKG;QACH,QAAQ,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;QAE7B;;;;WAIG;QACH,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;KACxB,CAAC;IAEF;;;;;;;;OAQG;IACH,eAAe,CAAC,EAAE,CAChB,OAAO,EAAE,qBAAqB,EAC9B,WAAW,EAAE,OAAO,EACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KACxC,OAAO,CAAC;IAEb;;;;;OAKG;IACH,KAAK,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEhC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/B;AAED,MAAM,MAAM,qCAAqC,GAAG,IAAI,CACtD,sBAAsB,EACtB,SAAS,CACV,GAAG;IACF;;;;;;;;OAQG;IACH,WAAW,EAAE,gBAAgB,CAAC;IAE9B;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC;CACjB,CAAC"}
{
"name": "toolception",
"version": "0.6.0",
"version": "0.6.1",
"private": false,

@@ -5,0 +5,0 @@ "type": "module",

Sorry, the diff of this file is too big to display