@burdenoff/mcp-libs 2026.1115.1 → 2026.1118.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{core-zmkvPNsI.js → context-Cbu15vXB.js} +93 -612
- package/dist/context-Cbu15vXB.js.map +1 -0
- package/dist/{core-BKgeqlnN.cjs → context-sFbFIOU0.cjs} +102 -747
- package/dist/context-sFbFIOU0.cjs.map +1 -0
- package/dist/core/auth/memory-store.d.ts +2 -0
- package/dist/core/auth/store.d.ts +1 -0
- package/dist/core/context.d.ts +2 -1
- package/dist/core/gql/client.d.ts +4 -1
- package/dist/core/index.cjs +19 -16
- package/dist/core/index.d.ts +3 -2
- package/dist/core/index.js +3 -2
- package/dist/core/tool-governance.d.ts +1 -1
- package/dist/core-CUNzoJRL.js +605 -0
- package/dist/core-CUNzoJRL.js.map +1 -0
- package/dist/core-Dt8jeF2q.cjs +748 -0
- package/dist/core-Dt8jeF2q.cjs.map +1 -0
- package/dist/index.cjs +4 -3
- package/dist/index.js +3 -2
- package/dist/{legacy-auth-C66oObd-.cjs → legacy-auth-C1iflzCh.cjs} +4 -4
- package/dist/{legacy-auth-C66oObd-.cjs.map → legacy-auth-C1iflzCh.cjs.map} +1 -1
- package/dist/{legacy-auth-BdSPFaEf.js → legacy-auth-CSjJJ4mW.js} +2 -2
- package/dist/{legacy-auth-BdSPFaEf.js.map → legacy-auth-CSjJJ4mW.js.map} +1 -1
- package/dist/modules/adaptercloud/index.cjs +1 -1
- package/dist/modules/adaptercloud/index.js +1 -1
- package/dist/modules/artistrybase/index.cjs +1 -1
- package/dist/modules/artistrybase/index.js +1 -1
- package/dist/modules/assethandler/index.cjs +1 -1
- package/dist/modules/assethandler/index.js +1 -1
- package/dist/modules/atheletebridge/index.cjs +1 -1
- package/dist/modules/atheletebridge/index.js +1 -1
- package/dist/modules/auth/index.cjs +4 -3
- package/dist/modules/auth/index.cjs.map +1 -1
- package/dist/modules/auth/index.js +3 -2
- package/dist/modules/auth/index.js.map +1 -1
- package/dist/modules/bigconsole/index.cjs +1 -1
- package/dist/modules/bigconsole/index.js +1 -1
- package/dist/modules/billing/index.cjs +1 -1
- package/dist/modules/billing/index.js +1 -1
- package/dist/modules/botmanor/index.cjs +1 -1
- package/dist/modules/botmanor/index.js +1 -1
- package/dist/modules/brainyrich/index.cjs +1 -1
- package/dist/modules/brainyrich/index.js +1 -1
- package/dist/modules/buildmyiq/index.cjs +1 -1
- package/dist/modules/buildmyiq/index.js +1 -1
- package/dist/modules/channels/index.cjs +1 -1
- package/dist/modules/channels/index.js +1 -1
- package/dist/modules/collabkin/index.cjs +1 -1
- package/dist/modules/collabkin/index.js +1 -1
- package/dist/modules/comradecircle/index.cjs +1 -1
- package/dist/modules/comradecircle/index.js +1 -1
- package/dist/modules/conversations/index.cjs +1 -1
- package/dist/modules/conversations/index.js +1 -1
- package/dist/modules/coolandlovely/index.cjs +1 -1
- package/dist/modules/coolandlovely/index.js +1 -1
- package/dist/modules/cosmicintersection/index.cjs +1 -1
- package/dist/modules/cosmicintersection/index.js +1 -1
- package/dist/modules/crewfoundry/index.cjs +1 -1
- package/dist/modules/crewfoundry/index.js +1 -1
- package/dist/modules/devportal/index.cjs +1 -1
- package/dist/modules/devportal/index.js +1 -1
- package/dist/modules/ecoimpacthub/index.cjs +1 -1
- package/dist/modules/ecoimpacthub/index.js +1 -1
- package/dist/modules/eventfullymanaged/index.cjs +1 -1
- package/dist/modules/eventfullymanaged/index.js +1 -1
- package/dist/modules/export/index.cjs +1 -1
- package/dist/modules/export/index.js +1 -1
- package/dist/modules/files/index.cjs +1 -1
- package/dist/modules/files/index.js +1 -1
- package/dist/modules/fluidgrids/index.cjs +1 -1
- package/dist/modules/fluidgrids/index.js +1 -1
- package/dist/modules/ggnomad/index.cjs +1 -1
- package/dist/modules/ggnomad/index.js +1 -1
- package/dist/modules/govcitizenhub/index.cjs +1 -1
- package/dist/modules/govcitizenhub/index.js +1 -1
- package/dist/modules/groups/index.cjs +1 -1
- package/dist/modules/groups/index.js +1 -1
- package/dist/modules/headshotmarketing/index.cjs +1 -1
- package/dist/modules/headshotmarketing/index.js +1 -1
- package/dist/modules/health/index.cjs +1 -1
- package/dist/modules/health/index.js +1 -1
- package/dist/modules/healthybowl/index.cjs +1 -1
- package/dist/modules/healthybowl/index.js +1 -1
- package/dist/modules/hookmovies/index.cjs +1 -1
- package/dist/modules/hookmovies/index.js +1 -1
- package/dist/modules/housingvista/index.cjs +1 -1
- package/dist/modules/housingvista/index.js +1 -1
- package/dist/modules/integrations/index.cjs +1 -1
- package/dist/modules/integrations/index.js +1 -1
- package/dist/modules/intelwatchtower/index.cjs +1 -1
- package/dist/modules/intelwatchtower/index.js +1 -1
- package/dist/modules/kadaikodi/index.cjs +1 -1
- package/dist/modules/kadaikodi/index.js +1 -1
- package/dist/modules/labsofscience/index.cjs +1 -1
- package/dist/modules/labsofscience/index.js +1 -1
- package/dist/modules/manufacturedops/index.cjs +1 -1
- package/dist/modules/manufacturedops/index.js +1 -1
- package/dist/modules/movethewheels/index.cjs +1 -1
- package/dist/modules/movethewheels/index.js +1 -1
- package/dist/modules/mybodyshield/index.cjs +1 -1
- package/dist/modules/mybodyshield/index.js +1 -1
- package/dist/modules/notifications/index.cjs +1 -1
- package/dist/modules/notifications/index.js +1 -1
- package/dist/modules/organizations/index.cjs +1 -1
- package/dist/modules/organizations/index.js +1 -1
- package/dist/modules/planmagnet/index.cjs +1 -1
- package/dist/modules/planmagnet/index.js +1 -1
- package/dist/modules/products/index.cjs +1 -1
- package/dist/modules/products/index.js +1 -1
- package/dist/modules/proserviceworld/index.cjs +1 -1
- package/dist/modules/proserviceworld/index.js +1 -1
- package/dist/modules/rbac/index.cjs +1 -1
- package/dist/modules/rbac/index.js +1 -1
- package/dist/modules/sandbox/index.cjs +1 -1
- package/dist/modules/sandbox/index.js +1 -1
- package/dist/modules/scheduler/index.cjs +1 -1
- package/dist/modules/scheduler/index.js +1 -1
- package/dist/modules/security/index.cjs +1 -1
- package/dist/modules/security/index.js +1 -1
- package/dist/modules/semanticfed/index.cjs +1 -1
- package/dist/modules/semanticfed/index.js +1 -1
- package/dist/modules/store/index.cjs +1 -1
- package/dist/modules/store/index.js +1 -1
- package/dist/modules/subscriberbot/index.cjs +1 -1
- package/dist/modules/subscriberbot/index.js +1 -1
- package/dist/modules/support/index.cjs +1 -1
- package/dist/modules/support/index.js +1 -1
- package/dist/modules/tags/index.cjs +1 -1
- package/dist/modules/tags/index.js +1 -1
- package/dist/modules/technospam/index.cjs +1 -1
- package/dist/modules/technospam/index.js +1 -1
- package/dist/modules/theculturepost/index.cjs +1 -1
- package/dist/modules/theculturepost/index.js +1 -1
- package/dist/modules/theglobalfuel/index.cjs +1 -1
- package/dist/modules/theglobalfuel/index.js +1 -1
- package/dist/modules/timecampus/index.cjs +1 -1
- package/dist/modules/timecampus/index.js +1 -1
- package/dist/modules/tours/index.cjs +1 -1
- package/dist/modules/tours/index.js +1 -1
- package/dist/modules/vibecontrols/index.cjs +2 -2
- package/dist/modules/vibecontrols/index.js +2 -2
- package/dist/modules/workspaces/index.cjs +1 -1
- package/dist/modules/workspaces/index.js +1 -1
- package/dist/transports/hosted.d.ts +33 -0
- package/dist/transports/index.cjs +3 -1
- package/dist/transports/index.d.ts +1 -0
- package/dist/transports/index.js +2 -2
- package/dist/transports-CtjQCloC.js +478 -0
- package/dist/transports-CtjQCloC.js.map +1 -0
- package/dist/transports-CvjsfNYw.cjs +537 -0
- package/dist/transports-CvjsfNYw.cjs.map +1 -0
- package/package.json +4 -3
- package/dist/core-BKgeqlnN.cjs.map +0 -1
- package/dist/core-zmkvPNsI.js.map +0 -1
- package/dist/transports-BUwYHMg1.js +0 -206
- package/dist/transports-BUwYHMg1.js.map +0 -1
- package/dist/transports-Cz4PCHmm.cjs +0 -253
- package/dist/transports-Cz4PCHmm.cjs.map +0 -1
|
@@ -0,0 +1,748 @@
|
|
|
1
|
+
require("./context-sFbFIOU0.cjs");
|
|
2
|
+
let _modelcontextprotocol_sdk_server_mcp_js = require("@modelcontextprotocol/sdk/server/mcp.js");
|
|
3
|
+
let _modelcontextprotocol_sdk_types_js = require("@modelcontextprotocol/sdk/types.js");
|
|
4
|
+
let node_crypto = require("node:crypto");
|
|
5
|
+
let zod = require("zod");
|
|
6
|
+
|
|
7
|
+
// src/core/errors.ts
|
|
8
|
+
/**
|
|
9
|
+
* Error classes for MCP SDK.
|
|
10
|
+
*
|
|
11
|
+
* Modules MUST throw these instead of throwing raw Errors. The registerTool
|
|
12
|
+
* wrapper in result.ts catches and maps them to MCP-protocol-compliant
|
|
13
|
+
* `{ isError: true, content: [...] }` responses.
|
|
14
|
+
*
|
|
15
|
+
* Throwing past the wrapper to the protocol surfaces as JSON-RPC -32603 to
|
|
16
|
+
* the client and is a protocol bug.
|
|
17
|
+
*/
|
|
18
|
+
var McpUserError = class extends Error {
|
|
19
|
+
hint;
|
|
20
|
+
constructor(message, opts) {
|
|
21
|
+
super(message);
|
|
22
|
+
this.name = "McpUserError";
|
|
23
|
+
this.hint = opts?.hint;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
var McpAuthError = class extends McpUserError {
|
|
27
|
+
constructor(message, opts) {
|
|
28
|
+
super(message, { hint: opts?.hint ?? "Run the auth_login tool to authenticate." });
|
|
29
|
+
this.name = "McpAuthError";
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
var McpInternalError = class extends Error {
|
|
33
|
+
cause;
|
|
34
|
+
constructor(message, cause) {
|
|
35
|
+
super(message);
|
|
36
|
+
this.name = "McpInternalError";
|
|
37
|
+
this.cause = cause;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
// src/core/module.ts
|
|
42
|
+
var MissingDependencyError = class extends McpInternalError {
|
|
43
|
+
constructor(moduleId, missingDep) {
|
|
44
|
+
super(`Module '${moduleId}' declares dependency on '${missingDep}', but '${missingDep}' is not in the module list.`);
|
|
45
|
+
this.name = "MissingDependencyError";
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
var CircularDependencyError = class extends McpInternalError {
|
|
49
|
+
constructor(cycle) {
|
|
50
|
+
super(`Circular dependency detected among modules: ${cycle.join(" -> ")}`);
|
|
51
|
+
this.name = "CircularDependencyError";
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Topologically sort modules by their `dependsOn` declarations.
|
|
56
|
+
* Throws MissingDependencyError or CircularDependencyError on bad input.
|
|
57
|
+
*/
|
|
58
|
+
function sortModules(modules) {
|
|
59
|
+
const byId = /* @__PURE__ */ new Map();
|
|
60
|
+
for (const m of modules) {
|
|
61
|
+
if (byId.has(m.id)) throw new McpInternalError(`Duplicate module id: '${m.id}'`);
|
|
62
|
+
byId.set(m.id, m);
|
|
63
|
+
}
|
|
64
|
+
for (const m of modules) for (const dep of m.dependsOn ?? []) if (!byId.has(dep)) throw new MissingDependencyError(m.id, dep);
|
|
65
|
+
const sorted = [];
|
|
66
|
+
const visiting = /* @__PURE__ */ new Set();
|
|
67
|
+
const visited = /* @__PURE__ */ new Set();
|
|
68
|
+
function visit(m, path) {
|
|
69
|
+
if (visited.has(m.id)) return;
|
|
70
|
+
if (visiting.has(m.id)) throw new CircularDependencyError([...path, m.id]);
|
|
71
|
+
visiting.add(m.id);
|
|
72
|
+
for (const dep of m.dependsOn ?? []) {
|
|
73
|
+
const depModule = byId.get(dep);
|
|
74
|
+
if (depModule) visit(depModule, [...path, m.id]);
|
|
75
|
+
}
|
|
76
|
+
visiting.delete(m.id);
|
|
77
|
+
visited.add(m.id);
|
|
78
|
+
sorted.push(m);
|
|
79
|
+
}
|
|
80
|
+
for (const m of modules) visit(m, []);
|
|
81
|
+
return sorted;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// src/core/capabilities.ts
|
|
85
|
+
/**
|
|
86
|
+
* Union an array of capability declarations. Boolean unions on logging /
|
|
87
|
+
* completions; OR on every nested boolean.
|
|
88
|
+
*/
|
|
89
|
+
function unionCapabilities(caps) {
|
|
90
|
+
const out = {};
|
|
91
|
+
for (const cap of caps) {
|
|
92
|
+
if (!cap) continue;
|
|
93
|
+
if (cap.resources) {
|
|
94
|
+
out.resources ??= {};
|
|
95
|
+
if (cap.resources.subscribe) out.resources.subscribe = true;
|
|
96
|
+
if (cap.resources.listChanged) out.resources.listChanged = true;
|
|
97
|
+
}
|
|
98
|
+
if (cap.prompts) {
|
|
99
|
+
out.prompts ??= {};
|
|
100
|
+
if (cap.prompts.listChanged) out.prompts.listChanged = true;
|
|
101
|
+
}
|
|
102
|
+
if (cap.tools) {
|
|
103
|
+
out.tools ??= {};
|
|
104
|
+
if (cap.tools.listChanged) out.tools.listChanged = true;
|
|
105
|
+
}
|
|
106
|
+
if (cap.logging) out.logging = true;
|
|
107
|
+
if (cap.completions) out.completions = true;
|
|
108
|
+
}
|
|
109
|
+
return out;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Convert capability declaration into the shape the MCP SDK accepts at
|
|
113
|
+
* `new McpServer({ capabilities })`. The SDK uses `{}` as truthy markers.
|
|
114
|
+
*/
|
|
115
|
+
function toServerCapabilities(caps) {
|
|
116
|
+
const out = {};
|
|
117
|
+
if (caps.tools) out.tools = caps.tools;
|
|
118
|
+
if (caps.resources) out.resources = caps.resources;
|
|
119
|
+
if (caps.prompts) out.prompts = caps.prompts;
|
|
120
|
+
if (caps.logging) out.logging = {};
|
|
121
|
+
if (caps.completions) out.completions = {};
|
|
122
|
+
return out;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// src/core/tool-name.ts
|
|
126
|
+
/**
|
|
127
|
+
* Tool / resource / prompt naming helpers.
|
|
128
|
+
*
|
|
129
|
+
* Mandatory product prefix avoids collisions when Claude Desktop runs
|
|
130
|
+
* multiple MCP servers concurrently (typical setup is ~6).
|
|
131
|
+
*
|
|
132
|
+
* Tool names are capped at 63 characters — Claude Desktop pre-1.x
|
|
133
|
+
* truncated at 64 in some versions.
|
|
134
|
+
*/
|
|
135
|
+
const MAX_TOOL_NAME_LENGTH = 63;
|
|
136
|
+
function assertSafeName(name, kind) {
|
|
137
|
+
if (kind === "tool" && name.length > MAX_TOOL_NAME_LENGTH) throw new McpInternalError(`Tool name '${name}' exceeds ${MAX_TOOL_NAME_LENGTH} characters (some MCP clients truncate at 64).`);
|
|
138
|
+
return name;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Build a tool name. Format: `<productName>_<...parts>` (snake_case).
|
|
142
|
+
* Example: mcpToolName('vibecontrols', 'vibes', 'list') -> 'vibecontrols_vibes_list'
|
|
143
|
+
*/
|
|
144
|
+
function mcpToolName(productName, ...parts) {
|
|
145
|
+
if (!productName) throw new McpInternalError("mcpToolName: productName is required");
|
|
146
|
+
return assertSafeName([productName, ...parts].filter(Boolean).join("_"), "tool");
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Build a resource URI. Format: `<productName>://<...parts>`.
|
|
150
|
+
* Example: mcpResourceUri('vibecontrols', 'schema') -> 'vibecontrols://schema'
|
|
151
|
+
*/
|
|
152
|
+
function mcpResourceUri(productName, ...parts) {
|
|
153
|
+
if (!productName) throw new McpInternalError("mcpResourceUri: productName is required");
|
|
154
|
+
return `${productName}://${parts.filter(Boolean).join("/")}`;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Build a prompt name. Format: `<productName>-<...parts>` (kebab-case).
|
|
158
|
+
* Example: mcpPromptName('vibecontrols', 'setup') -> 'vibecontrols-setup'
|
|
159
|
+
*/
|
|
160
|
+
function mcpPromptName(productName, ...parts) {
|
|
161
|
+
if (!productName) throw new McpInternalError("mcpPromptName: productName is required");
|
|
162
|
+
return [productName, ...parts].filter(Boolean).join("-");
|
|
163
|
+
}
|
|
164
|
+
const TOOL_NAME_LIMIT = MAX_TOOL_NAME_LENGTH;
|
|
165
|
+
/**
|
|
166
|
+
* Name-based hint heuristics for MCP `annotations` (readOnlyHint /
|
|
167
|
+
* destructiveHint). Used by tool-governance.ts to auto-fill annotations for
|
|
168
|
+
* the fleet of product modules that call `server.registerTool` directly
|
|
169
|
+
* (bypassing the `registerTool()` core helper) and so never set them
|
|
170
|
+
* explicitly today (BOFF-3903). Deliberately conservative — matched against
|
|
171
|
+
* whole `_`-delimited segments so e.g. `timeentries_delete` and
|
|
172
|
+
* `pomodoro_delete_goal` match, but a hypothetical `undeletable_check`
|
|
173
|
+
* would not.
|
|
174
|
+
*
|
|
175
|
+
* The destructive verb set covers more than `delete`: stopping, killing or
|
|
176
|
+
* terminating a running process, revoking or rotating a credential/share,
|
|
177
|
+
* resetting settings and removing/purging/uninstalling are all actions an
|
|
178
|
+
* MCP client must not auto-run without the user's intent (VC/FG parity G57 —
|
|
179
|
+
* e.g. `vibecontrols_sessions_kill`, `vibecontrols_tunnels_rotate_credentials`
|
|
180
|
+
* were previously reported as non-destructive).
|
|
181
|
+
*
|
|
182
|
+
* A module can always override the inference by passing an explicit
|
|
183
|
+
* `annotations` object to `registerTool()` / `server.registerTool()` — do
|
|
184
|
+
* that for the rare verb match that is harmless (e.g. a typing indicator's
|
|
185
|
+
* `typing_stop`).
|
|
186
|
+
*/
|
|
187
|
+
const DESTRUCTIVE_NAME_VERBS = [
|
|
188
|
+
"delete",
|
|
189
|
+
"destroy",
|
|
190
|
+
"erase",
|
|
191
|
+
"kill",
|
|
192
|
+
"purge",
|
|
193
|
+
"remove",
|
|
194
|
+
"reset",
|
|
195
|
+
"revoke",
|
|
196
|
+
"rotate",
|
|
197
|
+
"stop",
|
|
198
|
+
"terminate",
|
|
199
|
+
"uninstall",
|
|
200
|
+
"wipe"
|
|
201
|
+
];
|
|
202
|
+
const DESTRUCTIVE_NAME_SEGMENT = new RegExp(`(?:^|_)(?:${DESTRUCTIVE_NAME_VERBS.join("|")})(?:_|$)`, "i");
|
|
203
|
+
const READ_ONLY_NAME_SEGMENT = /(?:^|_)(?:list|get|search|check|read|count|stats|by_date)(?:_|$)/i;
|
|
204
|
+
/** True when a tool name looks destructive (irreversibly deletes data) by naming convention. */
|
|
205
|
+
function inferDestructiveHint(toolName) {
|
|
206
|
+
return DESTRUCTIVE_NAME_SEGMENT.test(toolName);
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* True when a tool name looks read-only by naming convention. Never true for
|
|
210
|
+
* a name that also looks destructive (a tool can't be both).
|
|
211
|
+
*/
|
|
212
|
+
function inferReadOnlyHint(toolName) {
|
|
213
|
+
return !inferDestructiveHint(toolName) && READ_ONLY_NAME_SEGMENT.test(toolName);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
// src/core/tool-governance.ts
|
|
217
|
+
/**
|
|
218
|
+
* Fleet-wide tool governance: MCP `annotations` inference + an opt-in
|
|
219
|
+
* confirmation gate on destructive tools.
|
|
220
|
+
*
|
|
221
|
+
* BOFF-3903: an audit of mcp-libs/src/modules/timecampus/tools/ found 163
|
|
222
|
+
* registered tools, ~35 of them destructive (delete/bulk-delete), with ZERO
|
|
223
|
+
* `annotations.destructiveHint`/`readOnlyHint` anywhere and no confirmation
|
|
224
|
+
* step before a destructive call executes. The same is true fleet-wide —
|
|
225
|
+
* every product module calls `server.registerTool` directly (bypassing the
|
|
226
|
+
* `registerTool()` central wrapper in result.ts), so a per-module fix would
|
|
227
|
+
* have to be re-applied ~54 times.
|
|
228
|
+
*
|
|
229
|
+
* `wrapServerWithToolGovernance` fixes this ONCE, at the McpServer boundary
|
|
230
|
+
* inside `createMcpServer`, by monkey-patching `registerTool` before any
|
|
231
|
+
* module receives the server reference. Every subsequent `registerTool`
|
|
232
|
+
* call — whether it goes through result.ts's `registerTool()` helper or
|
|
233
|
+
* calls `server.registerTool` directly — passes through this wrapper:
|
|
234
|
+
*
|
|
235
|
+
* 1. `annotations.readOnlyHint` / `destructiveHint` are filled in from the
|
|
236
|
+
* tool name (see tool-name.ts's inferDestructiveHint/inferReadOnlyHint)
|
|
237
|
+
* whenever a module didn't declare them explicitly. This is pure
|
|
238
|
+
* metadata — it never changes a tool's input schema or behavior, so it
|
|
239
|
+
* is always safe to apply and every consumer gets it automatically.
|
|
240
|
+
* 2. Only when `enforceDestructiveConfirmation` is true (opt-in,
|
|
241
|
+
* defaults to false) does a resolved-destructive tool additionally get
|
|
242
|
+
* a `confirm` input field and a hard gate: the tool's real handler is
|
|
243
|
+
* never invoked unless the caller passes `confirm: true`. This is
|
|
244
|
+
* deliberately opt-in — flipping it on is a real behavior change for
|
|
245
|
+
* any existing MCP client automation calling that tool, so each product
|
|
246
|
+
* shell (starting with timecampus-mcp for BOFF-3903) turns it on
|
|
247
|
+
* explicitly via `createMcpServer`'s options once it's ready, rather
|
|
248
|
+
* than every one of the ~54 modules' existing destructive-tool callers
|
|
249
|
+
* breaking the moment this ships.
|
|
250
|
+
*/
|
|
251
|
+
/**
|
|
252
|
+
* The tool filter for a token's scopes, with the same grammar as the hosted MCP gateway:
|
|
253
|
+
* `mcp:*` allows every tool, `mcp:tool:<name>` one tool; no MCP scope allows nothing.
|
|
254
|
+
*/
|
|
255
|
+
function scopeToolFilter(scopes) {
|
|
256
|
+
if (scopes.includes("mcp:*")) return () => true;
|
|
257
|
+
const allowed = new Set(scopes.filter((scope) => scope.startsWith("mcp:tool:")).map((scope) => scope.slice(9)));
|
|
258
|
+
return (toolName) => allowed.has(toolName);
|
|
259
|
+
}
|
|
260
|
+
function canonicalJson(value, seen = /* @__PURE__ */ new Set()) {
|
|
261
|
+
if (value === null || value === void 0) return "null";
|
|
262
|
+
if (typeof value === "number") return Number.isFinite(value) ? JSON.stringify(value) : "null";
|
|
263
|
+
if (typeof value === "string" || typeof value === "boolean") return JSON.stringify(value);
|
|
264
|
+
if (typeof value === "bigint") return JSON.stringify(value.toString());
|
|
265
|
+
if (typeof value !== "object") return "null";
|
|
266
|
+
if (seen.has(value)) return "null";
|
|
267
|
+
seen.add(value);
|
|
268
|
+
try {
|
|
269
|
+
if (Array.isArray(value)) return `[${value.map((item) => canonicalJson(item, seen)).join(",")}]`;
|
|
270
|
+
const record = value;
|
|
271
|
+
return `{${Object.keys(record).filter((key) => record[key] !== void 0).sort().map((key) => `${JSON.stringify(key)}:${canonicalJson(record[key], seen)}`).join(",")}}`;
|
|
272
|
+
} finally {
|
|
273
|
+
seen.delete(value);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
/** sha256 of the canonical JSON of tool arguments, so an audit row never stores the arguments. */
|
|
277
|
+
function toolArgsSha256(args) {
|
|
278
|
+
return (0, node_crypto.createHash)("sha256").update(canonicalJson(args), "utf8").digest("hex");
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Results the confirmation gate returned instead of running a tool, so the
|
|
282
|
+
* audit hook can report them as `refused` rather than as a tool `error`.
|
|
283
|
+
*/
|
|
284
|
+
const refusedResults = /* @__PURE__ */ new WeakSet();
|
|
285
|
+
function isRefusedResult(result) {
|
|
286
|
+
return typeof result === "object" && result !== null && refusedResults.has(result);
|
|
287
|
+
}
|
|
288
|
+
function isErrorResult(result) {
|
|
289
|
+
return typeof result === "object" && result !== null && result.isError === true;
|
|
290
|
+
}
|
|
291
|
+
function wrapAuditedHandler(name, handler, onToolCall) {
|
|
292
|
+
return async (...callbackArgs) => {
|
|
293
|
+
const started = Date.now();
|
|
294
|
+
const args = callbackArgs.length === 2 ? callbackArgs[0] : {};
|
|
295
|
+
const report = (status, error) => {
|
|
296
|
+
try {
|
|
297
|
+
onToolCall({
|
|
298
|
+
name,
|
|
299
|
+
argsSha256: toolArgsSha256(args),
|
|
300
|
+
status,
|
|
301
|
+
durationMs: Date.now() - started,
|
|
302
|
+
...error ? { error } : {}
|
|
303
|
+
});
|
|
304
|
+
} catch {}
|
|
305
|
+
};
|
|
306
|
+
try {
|
|
307
|
+
const result = await handler(...callbackArgs);
|
|
308
|
+
report(isRefusedResult(result) ? "refused" : isErrorResult(result) ? "error" : "ok");
|
|
309
|
+
return result;
|
|
310
|
+
} catch (error) {
|
|
311
|
+
report("error", error instanceof Error ? error.message : String(error));
|
|
312
|
+
throw error;
|
|
313
|
+
}
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
const CONFIRM_FIELD_DESCRIPTION = "Must be true to execute this destructive tool. The call is rejected (no changes made) if omitted or false.";
|
|
317
|
+
function resolveAnnotations(name, declared) {
|
|
318
|
+
const destructiveHint = declared?.destructiveHint ?? inferDestructiveHint(name);
|
|
319
|
+
const readOnlyHint = declared?.readOnlyHint ?? (destructiveHint ? false : inferReadOnlyHint(name));
|
|
320
|
+
return {
|
|
321
|
+
...declared,
|
|
322
|
+
destructiveHint,
|
|
323
|
+
readOnlyHint
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
/** Rejection result forwarded to the MCP client without invoking the real handler. */
|
|
327
|
+
function unconfirmedDestructiveResult(name) {
|
|
328
|
+
const result = {
|
|
329
|
+
content: [{
|
|
330
|
+
type: "text",
|
|
331
|
+
text: `'${name}' is a destructive action and was NOT executed. Re-call with confirm: true once you intend to proceed.`
|
|
332
|
+
}],
|
|
333
|
+
isError: true
|
|
334
|
+
};
|
|
335
|
+
refusedResults.add(result);
|
|
336
|
+
return result;
|
|
337
|
+
}
|
|
338
|
+
function wrapDestructiveHandler(name, handler) {
|
|
339
|
+
return async (...callbackArgs) => {
|
|
340
|
+
const hasArgs = callbackArgs.length === 2;
|
|
341
|
+
const rawArgs = hasArgs ? callbackArgs[0] : {};
|
|
342
|
+
if (rawArgs["confirm"] !== true) return unconfirmedDestructiveResult(name);
|
|
343
|
+
const forwardedArgs = { ...rawArgs };
|
|
344
|
+
delete forwardedArgs["confirm"];
|
|
345
|
+
return handler(...hasArgs ? [forwardedArgs, callbackArgs[1]] : callbackArgs);
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Monkey-patch `server.registerTool` so every tool registered afterward
|
|
350
|
+
* (by any module, through any call path) gets annotations inference and,
|
|
351
|
+
* when enabled, the destructive-confirmation gate. Returns the same server
|
|
352
|
+
* instance (mutated in place) for convenient chaining.
|
|
353
|
+
*/
|
|
354
|
+
function wrapServerWithToolGovernance(server, options = {}) {
|
|
355
|
+
const enforceConfirmation = options.enforceDestructiveConfirmation ?? false;
|
|
356
|
+
const target = server;
|
|
357
|
+
const originalRegisterTool = target.registerTool.bind(target);
|
|
358
|
+
const register = (name, config, handler) => {
|
|
359
|
+
const annotations = resolveAnnotations(name, config.annotations);
|
|
360
|
+
const audit = (inner) => options.onToolCall ? wrapAuditedHandler(name, inner, options.onToolCall) : inner;
|
|
361
|
+
if (!enforceConfirmation || !annotations.destructiveHint) return originalRegisterTool(name, {
|
|
362
|
+
...config,
|
|
363
|
+
annotations
|
|
364
|
+
}, audit(handler));
|
|
365
|
+
const gatedInputSchema = {
|
|
366
|
+
...config.inputSchema ?? {},
|
|
367
|
+
confirm: zod.z.boolean().optional().describe(CONFIRM_FIELD_DESCRIPTION)
|
|
368
|
+
};
|
|
369
|
+
return originalRegisterTool(name, {
|
|
370
|
+
...config,
|
|
371
|
+
inputSchema: gatedInputSchema,
|
|
372
|
+
annotations
|
|
373
|
+
}, audit(wrapDestructiveHandler(name, handler)));
|
|
374
|
+
};
|
|
375
|
+
target.registerTool = (name, config, handler) => {
|
|
376
|
+
const registered = register(name, config, handler);
|
|
377
|
+
if (options.toolFilter && !options.toolFilter(name, resolveAnnotations(name, config.annotations))) registered?.disable?.();
|
|
378
|
+
return registered;
|
|
379
|
+
};
|
|
380
|
+
return server;
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* Run `register` with every `server.registerTool` call it makes carrying
|
|
384
|
+
* the annotations `resolve` returns for that tool name. Lets a large module
|
|
385
|
+
* keep its annotations in one reviewed table (VC/FG parity G57: the
|
|
386
|
+
* vibecontrols module registers ~280 tools) instead of scattering them over
|
|
387
|
+
* every call site, while still going through the governance wrapper — the
|
|
388
|
+
* table counts as an *explicit* declaration, so it wins over name
|
|
389
|
+
* inference and drives the confirmation gate.
|
|
390
|
+
*
|
|
391
|
+
* Annotations a call site passes inline take precedence over the table.
|
|
392
|
+
* `server.registerTool` is restored when `register` returns or throws, so
|
|
393
|
+
* resource/prompt registration and later modules are unaffected.
|
|
394
|
+
*/
|
|
395
|
+
function withToolAnnotations(server, resolve, register) {
|
|
396
|
+
const target = server;
|
|
397
|
+
const governedRegisterTool = target.registerTool;
|
|
398
|
+
target.registerTool = (name, config, handler) => {
|
|
399
|
+
const declared = resolve(name);
|
|
400
|
+
const annotations = declared === void 0 ? config.annotations : {
|
|
401
|
+
...declared,
|
|
402
|
+
...config.annotations
|
|
403
|
+
};
|
|
404
|
+
return governedRegisterTool.call(target, name, {
|
|
405
|
+
...config,
|
|
406
|
+
annotations
|
|
407
|
+
}, handler);
|
|
408
|
+
};
|
|
409
|
+
try {
|
|
410
|
+
return register();
|
|
411
|
+
} finally {
|
|
412
|
+
target.registerTool = governedRegisterTool;
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
// src/core/server.ts
|
|
417
|
+
/**
|
|
418
|
+
* createMcpServer — McpServer factory + module loader + central wiring.
|
|
419
|
+
*
|
|
420
|
+
* Sorts modules by dependsOn, unions their capabilities, constructs an
|
|
421
|
+
* McpServer with declared capabilities, calls register() on each module in
|
|
422
|
+
* topo order, threads the server into ctx for progress notifications, and
|
|
423
|
+
* returns both the server + the merged registration manifest.
|
|
424
|
+
*
|
|
425
|
+
* The `logging/setLevel` request handler is wired to ctx.logger.setLevel
|
|
426
|
+
* so MCP clients can dynamically control verbosity.
|
|
427
|
+
*/
|
|
428
|
+
const MCP_TO_LOGGER_LEVEL = {
|
|
429
|
+
debug: "debug",
|
|
430
|
+
info: "info",
|
|
431
|
+
notice: "info",
|
|
432
|
+
warning: "warn",
|
|
433
|
+
error: "error",
|
|
434
|
+
critical: "error",
|
|
435
|
+
alert: "error",
|
|
436
|
+
emergency: "error"
|
|
437
|
+
};
|
|
438
|
+
function createMcpServer(ctx, modules, opts) {
|
|
439
|
+
const sorted = sortModules(modules);
|
|
440
|
+
const capabilities = unionCapabilities([
|
|
441
|
+
{ logging: true },
|
|
442
|
+
...sorted.map((m) => m.capabilities),
|
|
443
|
+
opts.extraCapabilities
|
|
444
|
+
]);
|
|
445
|
+
const server = new _modelcontextprotocol_sdk_server_mcp_js.McpServer({
|
|
446
|
+
name: opts.name,
|
|
447
|
+
version: opts.version
|
|
448
|
+
}, { capabilities: toServerCapabilities(capabilities) });
|
|
449
|
+
wrapServerWithToolGovernance(server, {
|
|
450
|
+
enforceDestructiveConfirmation: opts.enforceDestructiveConfirmation,
|
|
451
|
+
toolFilter: opts.toolFilter,
|
|
452
|
+
onToolCall: opts.onToolCall
|
|
453
|
+
});
|
|
454
|
+
ctx._internal.serverRef.current = server;
|
|
455
|
+
const inner = server.server ?? server;
|
|
456
|
+
if (typeof inner.setRequestHandler === "function") inner.setRequestHandler(_modelcontextprotocol_sdk_types_js.SetLevelRequestSchema, async (req) => {
|
|
457
|
+
const target = MCP_TO_LOGGER_LEVEL[req.params.level] ?? "info";
|
|
458
|
+
ctx.logger.setLevel(target);
|
|
459
|
+
ctx.logger.info("MCP logging level set", {
|
|
460
|
+
level: req.params.level,
|
|
461
|
+
mapped: target
|
|
462
|
+
});
|
|
463
|
+
return {};
|
|
464
|
+
});
|
|
465
|
+
const tools = [];
|
|
466
|
+
const resources = [];
|
|
467
|
+
const prompts = [];
|
|
468
|
+
const moduleManifest = [];
|
|
469
|
+
for (const mod of sorted) try {
|
|
470
|
+
const reg = mod.register(server, ctx);
|
|
471
|
+
tools.push(...reg.tools);
|
|
472
|
+
resources.push(...reg.resources);
|
|
473
|
+
prompts.push(...reg.prompts);
|
|
474
|
+
moduleManifest.push({
|
|
475
|
+
id: mod.id,
|
|
476
|
+
version: mod.version
|
|
477
|
+
});
|
|
478
|
+
ctx.logger.debug(`Registered module: ${mod.id}`, {
|
|
479
|
+
tools: reg.tools.length,
|
|
480
|
+
resources: reg.resources.length,
|
|
481
|
+
prompts: reg.prompts.length
|
|
482
|
+
});
|
|
483
|
+
} catch (error) {
|
|
484
|
+
ctx.logger.error(`Failed to register module: ${mod.id}`, { error: error instanceof Error ? error.message : String(error) });
|
|
485
|
+
throw error;
|
|
486
|
+
}
|
|
487
|
+
const manifest = {
|
|
488
|
+
modules: moduleManifest,
|
|
489
|
+
tools,
|
|
490
|
+
resources,
|
|
491
|
+
prompts
|
|
492
|
+
};
|
|
493
|
+
ctx.logger.info(`MCP server ready: ${opts.name}@${opts.version}`, {
|
|
494
|
+
modules: manifest.modules.length,
|
|
495
|
+
tools: manifest.tools.length,
|
|
496
|
+
resources: manifest.resources.length,
|
|
497
|
+
prompts: manifest.prompts.length
|
|
498
|
+
});
|
|
499
|
+
return {
|
|
500
|
+
server,
|
|
501
|
+
manifest
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
// src/core/result.ts
|
|
506
|
+
/**
|
|
507
|
+
* Build a successful tool result with JSON content (pretty-printed).
|
|
508
|
+
*/
|
|
509
|
+
function jsonResult(data, structured) {
|
|
510
|
+
const result = { content: [{
|
|
511
|
+
type: "text",
|
|
512
|
+
text: JSON.stringify(data, null, 2)
|
|
513
|
+
}] };
|
|
514
|
+
if (structured !== void 0) result.structuredContent = structured;
|
|
515
|
+
return result;
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* Build a successful tool result with plain text content.
|
|
519
|
+
*/
|
|
520
|
+
function textResult(text) {
|
|
521
|
+
return { content: [{
|
|
522
|
+
type: "text",
|
|
523
|
+
text
|
|
524
|
+
}] };
|
|
525
|
+
}
|
|
526
|
+
/**
|
|
527
|
+
* Build an error tool result. Honors MCP's `{ isError: true, content }` shape.
|
|
528
|
+
* Optional hint is appended on a new line so the LLM can react.
|
|
529
|
+
*/
|
|
530
|
+
function errorResult(message, hint) {
|
|
531
|
+
return {
|
|
532
|
+
content: [{
|
|
533
|
+
type: "text",
|
|
534
|
+
text: hint ? `${message}\n\nHint: ${hint}` : message
|
|
535
|
+
}],
|
|
536
|
+
isError: true
|
|
537
|
+
};
|
|
538
|
+
}
|
|
539
|
+
/**
|
|
540
|
+
* Register a tool with the central error wrapper.
|
|
541
|
+
*
|
|
542
|
+
* The handler returns a plain value or void. The wrapper:
|
|
543
|
+
* - wraps non-undefined returns in jsonResult()
|
|
544
|
+
* - if the value already looks like a ToolResult (has `content`), passes through
|
|
545
|
+
* - catches McpAuthError / McpUserError / McpInternalError / generic Error
|
|
546
|
+
* - logs every error via ctx.logger.error
|
|
547
|
+
*/
|
|
548
|
+
function registerTool(server, ctx, name, metadata, handler) {
|
|
549
|
+
const sdkConfig = {
|
|
550
|
+
title: metadata.title,
|
|
551
|
+
description: metadata.description,
|
|
552
|
+
...metadata.inputSchema ? { inputSchema: metadata.inputSchema } : {},
|
|
553
|
+
...metadata.annotations ? { annotations: metadata.annotations } : {}
|
|
554
|
+
};
|
|
555
|
+
const wrapped = async (...callbackArgs) => {
|
|
556
|
+
const hasArgs = callbackArgs.length === 2;
|
|
557
|
+
const args = hasArgs ? callbackArgs[0] : {};
|
|
558
|
+
const progressToken = (hasArgs ? callbackArgs[1] : callbackArgs[0])?._meta?.progressToken;
|
|
559
|
+
const meta = progressToken !== void 0 ? { progressToken } : {};
|
|
560
|
+
try {
|
|
561
|
+
const result = await handler(args, ctx, meta);
|
|
562
|
+
if (isToolResult(result)) return result;
|
|
563
|
+
if (result === void 0) return textResult("OK");
|
|
564
|
+
return jsonResult(result);
|
|
565
|
+
} catch (error) {
|
|
566
|
+
return mapErrorToResult(error, ctx, name);
|
|
567
|
+
}
|
|
568
|
+
};
|
|
569
|
+
server.registerTool(name, sdkConfig, wrapped);
|
|
570
|
+
}
|
|
571
|
+
function isToolResult(value) {
|
|
572
|
+
return !!value && typeof value === "object" && "content" in value && Array.isArray(value.content);
|
|
573
|
+
}
|
|
574
|
+
function mapErrorToResult(error, ctx, toolName) {
|
|
575
|
+
if (error instanceof McpAuthError) {
|
|
576
|
+
ctx.logger.warn(`${toolName}: auth required`, { message: error.message });
|
|
577
|
+
return errorResult(error.message, error.hint);
|
|
578
|
+
}
|
|
579
|
+
if (error instanceof McpUserError) {
|
|
580
|
+
ctx.logger.info(`${toolName}: user error`, { message: error.message });
|
|
581
|
+
return errorResult(error.message, error.hint);
|
|
582
|
+
}
|
|
583
|
+
if (error instanceof McpInternalError) {
|
|
584
|
+
ctx.logger.error(`${toolName}: internal error`, {
|
|
585
|
+
message: error.message,
|
|
586
|
+
cause: stringifyCause(error.cause)
|
|
587
|
+
});
|
|
588
|
+
return errorResult(`Internal error in ${toolName}.`);
|
|
589
|
+
}
|
|
590
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
591
|
+
ctx.logger.error(`${toolName}: unhandled error`, { message });
|
|
592
|
+
return errorResult(`${toolName}: ${message}`);
|
|
593
|
+
}
|
|
594
|
+
function stringifyCause(cause) {
|
|
595
|
+
if (cause === void 0 || cause === null) return void 0;
|
|
596
|
+
if (cause instanceof Error) return cause.message;
|
|
597
|
+
try {
|
|
598
|
+
return JSON.stringify(cause);
|
|
599
|
+
} catch {
|
|
600
|
+
return String(cause);
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
Object.defineProperty(exports, "CircularDependencyError", {
|
|
605
|
+
enumerable: true,
|
|
606
|
+
get: function () {
|
|
607
|
+
return CircularDependencyError;
|
|
608
|
+
}
|
|
609
|
+
});
|
|
610
|
+
Object.defineProperty(exports, "DESTRUCTIVE_NAME_VERBS", {
|
|
611
|
+
enumerable: true,
|
|
612
|
+
get: function () {
|
|
613
|
+
return DESTRUCTIVE_NAME_VERBS;
|
|
614
|
+
}
|
|
615
|
+
});
|
|
616
|
+
Object.defineProperty(exports, "McpAuthError", {
|
|
617
|
+
enumerable: true,
|
|
618
|
+
get: function () {
|
|
619
|
+
return McpAuthError;
|
|
620
|
+
}
|
|
621
|
+
});
|
|
622
|
+
Object.defineProperty(exports, "McpInternalError", {
|
|
623
|
+
enumerable: true,
|
|
624
|
+
get: function () {
|
|
625
|
+
return McpInternalError;
|
|
626
|
+
}
|
|
627
|
+
});
|
|
628
|
+
Object.defineProperty(exports, "McpUserError", {
|
|
629
|
+
enumerable: true,
|
|
630
|
+
get: function () {
|
|
631
|
+
return McpUserError;
|
|
632
|
+
}
|
|
633
|
+
});
|
|
634
|
+
Object.defineProperty(exports, "MissingDependencyError", {
|
|
635
|
+
enumerable: true,
|
|
636
|
+
get: function () {
|
|
637
|
+
return MissingDependencyError;
|
|
638
|
+
}
|
|
639
|
+
});
|
|
640
|
+
Object.defineProperty(exports, "TOOL_NAME_LIMIT", {
|
|
641
|
+
enumerable: true,
|
|
642
|
+
get: function () {
|
|
643
|
+
return TOOL_NAME_LIMIT;
|
|
644
|
+
}
|
|
645
|
+
});
|
|
646
|
+
Object.defineProperty(exports, "createMcpServer", {
|
|
647
|
+
enumerable: true,
|
|
648
|
+
get: function () {
|
|
649
|
+
return createMcpServer;
|
|
650
|
+
}
|
|
651
|
+
});
|
|
652
|
+
Object.defineProperty(exports, "errorResult", {
|
|
653
|
+
enumerable: true,
|
|
654
|
+
get: function () {
|
|
655
|
+
return errorResult;
|
|
656
|
+
}
|
|
657
|
+
});
|
|
658
|
+
Object.defineProperty(exports, "inferDestructiveHint", {
|
|
659
|
+
enumerable: true,
|
|
660
|
+
get: function () {
|
|
661
|
+
return inferDestructiveHint;
|
|
662
|
+
}
|
|
663
|
+
});
|
|
664
|
+
Object.defineProperty(exports, "inferReadOnlyHint", {
|
|
665
|
+
enumerable: true,
|
|
666
|
+
get: function () {
|
|
667
|
+
return inferReadOnlyHint;
|
|
668
|
+
}
|
|
669
|
+
});
|
|
670
|
+
Object.defineProperty(exports, "jsonResult", {
|
|
671
|
+
enumerable: true,
|
|
672
|
+
get: function () {
|
|
673
|
+
return jsonResult;
|
|
674
|
+
}
|
|
675
|
+
});
|
|
676
|
+
Object.defineProperty(exports, "mcpPromptName", {
|
|
677
|
+
enumerable: true,
|
|
678
|
+
get: function () {
|
|
679
|
+
return mcpPromptName;
|
|
680
|
+
}
|
|
681
|
+
});
|
|
682
|
+
Object.defineProperty(exports, "mcpResourceUri", {
|
|
683
|
+
enumerable: true,
|
|
684
|
+
get: function () {
|
|
685
|
+
return mcpResourceUri;
|
|
686
|
+
}
|
|
687
|
+
});
|
|
688
|
+
Object.defineProperty(exports, "mcpToolName", {
|
|
689
|
+
enumerable: true,
|
|
690
|
+
get: function () {
|
|
691
|
+
return mcpToolName;
|
|
692
|
+
}
|
|
693
|
+
});
|
|
694
|
+
Object.defineProperty(exports, "registerTool", {
|
|
695
|
+
enumerable: true,
|
|
696
|
+
get: function () {
|
|
697
|
+
return registerTool;
|
|
698
|
+
}
|
|
699
|
+
});
|
|
700
|
+
Object.defineProperty(exports, "scopeToolFilter", {
|
|
701
|
+
enumerable: true,
|
|
702
|
+
get: function () {
|
|
703
|
+
return scopeToolFilter;
|
|
704
|
+
}
|
|
705
|
+
});
|
|
706
|
+
Object.defineProperty(exports, "sortModules", {
|
|
707
|
+
enumerable: true,
|
|
708
|
+
get: function () {
|
|
709
|
+
return sortModules;
|
|
710
|
+
}
|
|
711
|
+
});
|
|
712
|
+
Object.defineProperty(exports, "textResult", {
|
|
713
|
+
enumerable: true,
|
|
714
|
+
get: function () {
|
|
715
|
+
return textResult;
|
|
716
|
+
}
|
|
717
|
+
});
|
|
718
|
+
Object.defineProperty(exports, "toServerCapabilities", {
|
|
719
|
+
enumerable: true,
|
|
720
|
+
get: function () {
|
|
721
|
+
return toServerCapabilities;
|
|
722
|
+
}
|
|
723
|
+
});
|
|
724
|
+
Object.defineProperty(exports, "toolArgsSha256", {
|
|
725
|
+
enumerable: true,
|
|
726
|
+
get: function () {
|
|
727
|
+
return toolArgsSha256;
|
|
728
|
+
}
|
|
729
|
+
});
|
|
730
|
+
Object.defineProperty(exports, "unionCapabilities", {
|
|
731
|
+
enumerable: true,
|
|
732
|
+
get: function () {
|
|
733
|
+
return unionCapabilities;
|
|
734
|
+
}
|
|
735
|
+
});
|
|
736
|
+
Object.defineProperty(exports, "withToolAnnotations", {
|
|
737
|
+
enumerable: true,
|
|
738
|
+
get: function () {
|
|
739
|
+
return withToolAnnotations;
|
|
740
|
+
}
|
|
741
|
+
});
|
|
742
|
+
Object.defineProperty(exports, "wrapServerWithToolGovernance", {
|
|
743
|
+
enumerable: true,
|
|
744
|
+
get: function () {
|
|
745
|
+
return wrapServerWithToolGovernance;
|
|
746
|
+
}
|
|
747
|
+
});
|
|
748
|
+
//# sourceMappingURL=core-Dt8jeF2q.cjs.map
|