@burdenoff/mcp-libs 2026.704.1 → 2026.719.1
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/{chunk-WWFVD7BO.js → chunk-RHWHUY5Y.js} +3 -3
- package/dist/{chunk-WWFVD7BO.js.map → chunk-RHWHUY5Y.js.map} +1 -1
- package/dist/{chunk-H2OYWLOA.js → chunk-YOSQUY3M.js} +101 -35
- package/dist/chunk-YOSQUY3M.js.map +1 -0
- package/dist/core/index.cjs +101 -32
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +1 -1
- package/dist/index.cjs +97 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/modules/adaptercloud/index.cjs +14 -14
- package/dist/modules/adaptercloud/index.cjs.map +1 -1
- package/dist/modules/adaptercloud/index.js +1 -1
- package/dist/modules/artistrybase/index.cjs +14 -14
- package/dist/modules/artistrybase/index.cjs.map +1 -1
- package/dist/modules/artistrybase/index.js +1 -1
- package/dist/modules/assethandler/index.cjs +14 -14
- package/dist/modules/assethandler/index.cjs.map +1 -1
- package/dist/modules/assethandler/index.js +1 -1
- package/dist/modules/atheletebridge/index.cjs +14 -14
- package/dist/modules/atheletebridge/index.cjs.map +1 -1
- package/dist/modules/atheletebridge/index.js +1 -1
- package/dist/modules/auth/index.cjs +14 -14
- package/dist/modules/auth/index.cjs.map +1 -1
- package/dist/modules/auth/index.js +3 -3
- package/dist/modules/billing/index.cjs +14 -14
- package/dist/modules/billing/index.cjs.map +1 -1
- package/dist/modules/billing/index.js +1 -1
- package/dist/modules/brainyrich/index.cjs +14 -14
- package/dist/modules/brainyrich/index.cjs.map +1 -1
- package/dist/modules/brainyrich/index.js +1 -1
- package/dist/modules/buildmyiq/index.cjs +14 -14
- package/dist/modules/buildmyiq/index.cjs.map +1 -1
- package/dist/modules/buildmyiq/index.js +1 -1
- package/dist/modules/channels/index.cjs +14 -14
- package/dist/modules/channels/index.cjs.map +1 -1
- package/dist/modules/channels/index.js +1 -1
- package/dist/modules/collabkin/index.cjs +14 -14
- package/dist/modules/collabkin/index.cjs.map +1 -1
- package/dist/modules/collabkin/index.js +1 -1
- package/dist/modules/comradecircle/index.cjs +14 -14
- package/dist/modules/comradecircle/index.cjs.map +1 -1
- package/dist/modules/comradecircle/index.js +1 -1
- package/dist/modules/conversations/index.cjs +14 -14
- package/dist/modules/conversations/index.cjs.map +1 -1
- package/dist/modules/conversations/index.js +1 -1
- package/dist/modules/coolandlovely/index.cjs +14 -14
- package/dist/modules/coolandlovely/index.cjs.map +1 -1
- package/dist/modules/coolandlovely/index.js +1 -1
- package/dist/modules/cosmicintersection/index.cjs +14 -14
- package/dist/modules/cosmicintersection/index.cjs.map +1 -1
- package/dist/modules/cosmicintersection/index.js +1 -1
- package/dist/modules/crewfoundry/index.cjs +14 -14
- package/dist/modules/crewfoundry/index.cjs.map +1 -1
- package/dist/modules/crewfoundry/index.js +1 -1
- package/dist/modules/devportal/index.cjs +14 -14
- package/dist/modules/devportal/index.cjs.map +1 -1
- package/dist/modules/devportal/index.js +1 -1
- package/dist/modules/ecoimpacthub/index.cjs +14 -14
- package/dist/modules/ecoimpacthub/index.cjs.map +1 -1
- package/dist/modules/ecoimpacthub/index.js +1 -1
- package/dist/modules/eventfullymanaged/index.cjs +14 -14
- package/dist/modules/eventfullymanaged/index.cjs.map +1 -1
- package/dist/modules/eventfullymanaged/index.js +1 -1
- package/dist/modules/export/index.cjs +14 -14
- package/dist/modules/export/index.cjs.map +1 -1
- package/dist/modules/export/index.js +1 -1
- package/dist/modules/files/index.cjs +14 -14
- package/dist/modules/files/index.cjs.map +1 -1
- package/dist/modules/files/index.js +1 -1
- package/dist/modules/ggnomad/index.cjs +14 -14
- package/dist/modules/ggnomad/index.cjs.map +1 -1
- package/dist/modules/ggnomad/index.js +1 -1
- package/dist/modules/govcitizenhub/index.cjs +14 -14
- package/dist/modules/govcitizenhub/index.cjs.map +1 -1
- package/dist/modules/govcitizenhub/index.js +1 -1
- package/dist/modules/groups/index.cjs +14 -14
- package/dist/modules/groups/index.cjs.map +1 -1
- package/dist/modules/groups/index.js +1 -1
- package/dist/modules/headshotmarketing/index.cjs +14 -14
- package/dist/modules/headshotmarketing/index.cjs.map +1 -1
- package/dist/modules/headshotmarketing/index.js +1 -1
- package/dist/modules/health/index.cjs +21 -19
- package/dist/modules/health/index.cjs.map +1 -1
- package/dist/modules/health/index.js +1 -1
- package/dist/modules/hookmovies/index.cjs +14 -14
- package/dist/modules/hookmovies/index.cjs.map +1 -1
- package/dist/modules/hookmovies/index.js +1 -1
- package/dist/modules/housingvista/index.cjs +14 -14
- package/dist/modules/housingvista/index.cjs.map +1 -1
- package/dist/modules/housingvista/index.js +1 -1
- package/dist/modules/integrations/index.cjs +14 -14
- package/dist/modules/integrations/index.cjs.map +1 -1
- package/dist/modules/integrations/index.js +1 -1
- package/dist/modules/intelwatchtower/index.cjs +14 -14
- package/dist/modules/intelwatchtower/index.cjs.map +1 -1
- package/dist/modules/intelwatchtower/index.js +1 -1
- package/dist/modules/kadaikodi/index.cjs +14 -14
- package/dist/modules/kadaikodi/index.cjs.map +1 -1
- package/dist/modules/kadaikodi/index.js +1 -1
- package/dist/modules/labsofscience/index.cjs +14 -14
- package/dist/modules/labsofscience/index.cjs.map +1 -1
- package/dist/modules/labsofscience/index.js +1 -1
- package/dist/modules/manufacturedops/index.cjs +14 -14
- package/dist/modules/manufacturedops/index.cjs.map +1 -1
- package/dist/modules/manufacturedops/index.js +1 -1
- package/dist/modules/movethewheels/index.cjs +14 -14
- package/dist/modules/movethewheels/index.cjs.map +1 -1
- package/dist/modules/movethewheels/index.js +1 -1
- package/dist/modules/mybodyshield/index.cjs +14 -14
- package/dist/modules/mybodyshield/index.cjs.map +1 -1
- package/dist/modules/mybodyshield/index.js +1 -1
- package/dist/modules/notifications/index.cjs +14 -14
- package/dist/modules/notifications/index.cjs.map +1 -1
- package/dist/modules/notifications/index.js +1 -1
- package/dist/modules/organizations/index.cjs +14 -14
- package/dist/modules/organizations/index.cjs.map +1 -1
- package/dist/modules/organizations/index.js +1 -1
- package/dist/modules/planmagnet/index.cjs +14 -14
- package/dist/modules/planmagnet/index.cjs.map +1 -1
- package/dist/modules/planmagnet/index.js +1 -1
- package/dist/modules/products/index.cjs +14 -14
- package/dist/modules/products/index.cjs.map +1 -1
- package/dist/modules/products/index.js +1 -1
- package/dist/modules/proserviceworld/index.cjs +14 -14
- package/dist/modules/proserviceworld/index.cjs.map +1 -1
- package/dist/modules/proserviceworld/index.js +1 -1
- package/dist/modules/rbac/index.cjs +14 -14
- package/dist/modules/rbac/index.cjs.map +1 -1
- package/dist/modules/rbac/index.js +1 -1
- package/dist/modules/sandbox/index.cjs +14 -14
- package/dist/modules/sandbox/index.cjs.map +1 -1
- package/dist/modules/sandbox/index.js +1 -1
- package/dist/modules/scheduler/index.cjs +14 -14
- package/dist/modules/scheduler/index.cjs.map +1 -1
- package/dist/modules/scheduler/index.js +1 -1
- package/dist/modules/security/index.cjs +14 -14
- package/dist/modules/security/index.cjs.map +1 -1
- package/dist/modules/security/index.js +1 -1
- package/dist/modules/semanticfed/index.cjs +14 -14
- package/dist/modules/semanticfed/index.cjs.map +1 -1
- package/dist/modules/semanticfed/index.js +1 -1
- package/dist/modules/store/index.cjs +14 -14
- package/dist/modules/store/index.cjs.map +1 -1
- package/dist/modules/store/index.js +1 -1
- package/dist/modules/subscriberbot/index.cjs +14 -14
- package/dist/modules/subscriberbot/index.cjs.map +1 -1
- package/dist/modules/subscriberbot/index.js +1 -1
- package/dist/modules/support/index.cjs +14 -14
- package/dist/modules/support/index.cjs.map +1 -1
- package/dist/modules/support/index.js +1 -1
- package/dist/modules/tags/index.cjs +14 -14
- package/dist/modules/tags/index.cjs.map +1 -1
- package/dist/modules/tags/index.js +1 -1
- package/dist/modules/technospam/index.cjs +14 -14
- package/dist/modules/technospam/index.cjs.map +1 -1
- package/dist/modules/technospam/index.js +1 -1
- package/dist/modules/theculturepost/index.cjs +14 -14
- package/dist/modules/theculturepost/index.cjs.map +1 -1
- package/dist/modules/theculturepost/index.js +1 -1
- package/dist/modules/theglobalfuel/index.cjs +14 -14
- package/dist/modules/theglobalfuel/index.cjs.map +1 -1
- package/dist/modules/theglobalfuel/index.js +1 -1
- package/dist/modules/timecampus/index.cjs +21 -16
- package/dist/modules/timecampus/index.cjs.map +1 -1
- package/dist/modules/timecampus/index.js +8 -3
- package/dist/modules/timecampus/index.js.map +1 -1
- package/dist/modules/tours/index.cjs +14 -14
- package/dist/modules/tours/index.cjs.map +1 -1
- package/dist/modules/tours/index.js +1 -1
- package/dist/modules/vibecontrols/index.cjs +14 -14
- package/dist/modules/vibecontrols/index.cjs.map +1 -1
- package/dist/modules/vibecontrols/index.js +2 -2
- package/dist/modules/workspaces/index.cjs +14 -14
- package/dist/modules/workspaces/index.cjs.map +1 -1
- package/dist/modules/workspaces/index.js +1 -1
- package/dist/{tool-name-DlnrBsZ6.d.ts → tool-name-BaPNMZdj.d.ts} +17 -1
- package/dist/{tool-name-CQf_IqAj.d.cts → tool-name-Bvb36qmq.d.cts} +17 -1
- package/package.json +1 -1
- package/dist/chunk-H2OYWLOA.js.map +0 -1
package/dist/core/index.cjs
CHANGED
|
@@ -7,6 +7,7 @@ var graphqlRequest = require('graphql-request');
|
|
|
7
7
|
var fetch = require('cross-fetch');
|
|
8
8
|
var mcp_js = require('@modelcontextprotocol/sdk/server/mcp.js');
|
|
9
9
|
var types_js = require('@modelcontextprotocol/sdk/types.js');
|
|
10
|
+
var zod = require('zod');
|
|
10
11
|
|
|
11
12
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
13
|
|
|
@@ -740,6 +741,98 @@ function toServerCapabilities(caps) {
|
|
|
740
741
|
return out;
|
|
741
742
|
}
|
|
742
743
|
|
|
744
|
+
// src/core/tool-name.ts
|
|
745
|
+
var MAX_TOOL_NAME_LENGTH = 63;
|
|
746
|
+
function assertSafeName(name, kind) {
|
|
747
|
+
if (name.length > MAX_TOOL_NAME_LENGTH) {
|
|
748
|
+
throw new McpInternalError(
|
|
749
|
+
`Tool name '${name}' exceeds ${MAX_TOOL_NAME_LENGTH} characters (some MCP clients truncate at 64).`
|
|
750
|
+
);
|
|
751
|
+
}
|
|
752
|
+
return name;
|
|
753
|
+
}
|
|
754
|
+
function mcpToolName(productName, ...parts) {
|
|
755
|
+
if (!productName) {
|
|
756
|
+
throw new McpInternalError("mcpToolName: productName is required");
|
|
757
|
+
}
|
|
758
|
+
const name = [productName, ...parts].filter(Boolean).join("_");
|
|
759
|
+
return assertSafeName(name);
|
|
760
|
+
}
|
|
761
|
+
function mcpResourceUri(productName, ...parts) {
|
|
762
|
+
if (!productName) {
|
|
763
|
+
throw new McpInternalError("mcpResourceUri: productName is required");
|
|
764
|
+
}
|
|
765
|
+
return `${productName}://${parts.filter(Boolean).join("/")}`;
|
|
766
|
+
}
|
|
767
|
+
function mcpPromptName(productName, ...parts) {
|
|
768
|
+
if (!productName) {
|
|
769
|
+
throw new McpInternalError("mcpPromptName: productName is required");
|
|
770
|
+
}
|
|
771
|
+
return [productName, ...parts].filter(Boolean).join("-");
|
|
772
|
+
}
|
|
773
|
+
var TOOL_NAME_LIMIT = MAX_TOOL_NAME_LENGTH;
|
|
774
|
+
var DESTRUCTIVE_NAME_SEGMENT = /(?:^|_)delete(?:_|$)/i;
|
|
775
|
+
var READ_ONLY_NAME_SEGMENT = /(?:^|_)(?:list|get|search|check|read|count|stats|by_date)(?:_|$)/i;
|
|
776
|
+
function inferDestructiveHint(toolName) {
|
|
777
|
+
return DESTRUCTIVE_NAME_SEGMENT.test(toolName);
|
|
778
|
+
}
|
|
779
|
+
function inferReadOnlyHint(toolName) {
|
|
780
|
+
return !inferDestructiveHint(toolName) && READ_ONLY_NAME_SEGMENT.test(toolName);
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
// src/core/tool-governance.ts
|
|
784
|
+
var CONFIRM_FIELD_DESCRIPTION = "Must be true to execute this destructive tool. The call is rejected (no changes made) if omitted or false.";
|
|
785
|
+
function resolveAnnotations(name, declared) {
|
|
786
|
+
const destructiveHint = declared?.destructiveHint ?? inferDestructiveHint(name);
|
|
787
|
+
const readOnlyHint = declared?.readOnlyHint ?? (destructiveHint ? false : inferReadOnlyHint(name));
|
|
788
|
+
return { ...declared, destructiveHint, readOnlyHint };
|
|
789
|
+
}
|
|
790
|
+
function unconfirmedDestructiveResult(name) {
|
|
791
|
+
return {
|
|
792
|
+
content: [
|
|
793
|
+
{
|
|
794
|
+
type: "text",
|
|
795
|
+
text: `'${name}' is a destructive action and was NOT executed. Re-call with confirm: true once you intend to proceed.`
|
|
796
|
+
}
|
|
797
|
+
],
|
|
798
|
+
isError: true
|
|
799
|
+
};
|
|
800
|
+
}
|
|
801
|
+
function wrapDestructiveHandler(name, handler) {
|
|
802
|
+
return async (...callbackArgs) => {
|
|
803
|
+
const hasArgs = callbackArgs.length === 2;
|
|
804
|
+
const rawArgs = hasArgs ? callbackArgs[0] : {};
|
|
805
|
+
if (rawArgs["confirm"] !== true) {
|
|
806
|
+
return unconfirmedDestructiveResult(name);
|
|
807
|
+
}
|
|
808
|
+
const forwardedArgs = { ...rawArgs };
|
|
809
|
+
delete forwardedArgs["confirm"];
|
|
810
|
+
const forwardedCallbackArgs = hasArgs ? [forwardedArgs, callbackArgs[1]] : callbackArgs;
|
|
811
|
+
return handler(...forwardedCallbackArgs);
|
|
812
|
+
};
|
|
813
|
+
}
|
|
814
|
+
function wrapServerWithToolGovernance(server, options = {}) {
|
|
815
|
+
const enforceConfirmation = options.enforceDestructiveConfirmation ?? false;
|
|
816
|
+
const target = server;
|
|
817
|
+
const originalRegisterTool = target.registerTool.bind(target);
|
|
818
|
+
target.registerTool = (name, config, handler) => {
|
|
819
|
+
const annotations = resolveAnnotations(name, config.annotations);
|
|
820
|
+
if (!enforceConfirmation || !annotations.destructiveHint) {
|
|
821
|
+
return originalRegisterTool(name, { ...config, annotations }, handler);
|
|
822
|
+
}
|
|
823
|
+
const gatedInputSchema = {
|
|
824
|
+
...config.inputSchema ?? {},
|
|
825
|
+
confirm: zod.z.boolean().optional().describe(CONFIRM_FIELD_DESCRIPTION)
|
|
826
|
+
};
|
|
827
|
+
return originalRegisterTool(
|
|
828
|
+
name,
|
|
829
|
+
{ ...config, inputSchema: gatedInputSchema, annotations },
|
|
830
|
+
wrapDestructiveHandler(name, handler)
|
|
831
|
+
);
|
|
832
|
+
};
|
|
833
|
+
return server;
|
|
834
|
+
}
|
|
835
|
+
|
|
743
836
|
// src/core/server.ts
|
|
744
837
|
var MCP_TO_LOGGER_LEVEL = {
|
|
745
838
|
debug: "debug",
|
|
@@ -763,6 +856,9 @@ function createMcpServer(ctx, modules, opts) {
|
|
|
763
856
|
{ name: opts.name, version: opts.version },
|
|
764
857
|
{ capabilities: toServerCapabilities(capabilities) }
|
|
765
858
|
);
|
|
859
|
+
wrapServerWithToolGovernance(server, {
|
|
860
|
+
enforceDestructiveConfirmation: opts.enforceDestructiveConfirmation
|
|
861
|
+
});
|
|
766
862
|
ctx._internal.serverRef.current = server;
|
|
767
863
|
const inner = server.server ?? server;
|
|
768
864
|
if (typeof inner.setRequestHandler === "function") {
|
|
@@ -837,7 +933,8 @@ function registerTool(server, ctx, name, metadata, handler) {
|
|
|
837
933
|
const sdkConfig = {
|
|
838
934
|
title: metadata.title,
|
|
839
935
|
description: metadata.description,
|
|
840
|
-
...metadata.inputSchema ? { inputSchema: metadata.inputSchema } : {}
|
|
936
|
+
...metadata.inputSchema ? { inputSchema: metadata.inputSchema } : {},
|
|
937
|
+
...metadata.annotations ? { annotations: metadata.annotations } : {}
|
|
841
938
|
};
|
|
842
939
|
const wrapped = async (...callbackArgs) => {
|
|
843
940
|
const hasArgs = callbackArgs.length === 2;
|
|
@@ -889,37 +986,6 @@ function stringifyCause(cause) {
|
|
|
889
986
|
}
|
|
890
987
|
}
|
|
891
988
|
|
|
892
|
-
// src/core/tool-name.ts
|
|
893
|
-
var MAX_TOOL_NAME_LENGTH = 63;
|
|
894
|
-
function assertSafeName(name, kind) {
|
|
895
|
-
if (name.length > MAX_TOOL_NAME_LENGTH) {
|
|
896
|
-
throw new McpInternalError(
|
|
897
|
-
`Tool name '${name}' exceeds ${MAX_TOOL_NAME_LENGTH} characters (some MCP clients truncate at 64).`
|
|
898
|
-
);
|
|
899
|
-
}
|
|
900
|
-
return name;
|
|
901
|
-
}
|
|
902
|
-
function mcpToolName(productName, ...parts) {
|
|
903
|
-
if (!productName) {
|
|
904
|
-
throw new McpInternalError("mcpToolName: productName is required");
|
|
905
|
-
}
|
|
906
|
-
const name = [productName, ...parts].filter(Boolean).join("_");
|
|
907
|
-
return assertSafeName(name);
|
|
908
|
-
}
|
|
909
|
-
function mcpResourceUri(productName, ...parts) {
|
|
910
|
-
if (!productName) {
|
|
911
|
-
throw new McpInternalError("mcpResourceUri: productName is required");
|
|
912
|
-
}
|
|
913
|
-
return `${productName}://${parts.filter(Boolean).join("/")}`;
|
|
914
|
-
}
|
|
915
|
-
function mcpPromptName(productName, ...parts) {
|
|
916
|
-
if (!productName) {
|
|
917
|
-
throw new McpInternalError("mcpPromptName: productName is required");
|
|
918
|
-
}
|
|
919
|
-
return [productName, ...parts].filter(Boolean).join("-");
|
|
920
|
-
}
|
|
921
|
-
var TOOL_NAME_LIMIT = MAX_TOOL_NAME_LENGTH;
|
|
922
|
-
|
|
923
989
|
exports.CircularDependencyError = CircularDependencyError;
|
|
924
990
|
exports.McpAuthError = McpAuthError;
|
|
925
991
|
exports.McpInternalError = McpInternalError;
|
|
@@ -937,6 +1003,8 @@ exports.createProgress = createProgress;
|
|
|
937
1003
|
exports.errorResult = errorResult;
|
|
938
1004
|
exports.extractGqlErrorMessage = extractGqlErrorMessage;
|
|
939
1005
|
exports.fetchWorkspaces = fetchWorkspaces;
|
|
1006
|
+
exports.inferDestructiveHint = inferDestructiveHint;
|
|
1007
|
+
exports.inferReadOnlyHint = inferReadOnlyHint;
|
|
940
1008
|
exports.issueWorkspaceToken = issueWorkspaceToken;
|
|
941
1009
|
exports.jsonResult = jsonResult;
|
|
942
1010
|
exports.mcpPromptName = mcpPromptName;
|
|
@@ -949,5 +1017,6 @@ exports.startDeviceCodeFlow = startDeviceCodeFlow;
|
|
|
949
1017
|
exports.textResult = textResult;
|
|
950
1018
|
exports.toServerCapabilities = toServerCapabilities;
|
|
951
1019
|
exports.unionCapabilities = unionCapabilities;
|
|
1020
|
+
exports.wrapServerWithToolGovernance = wrapServerWithToolGovernance;
|
|
952
1021
|
//# sourceMappingURL=index.cjs.map
|
|
953
1022
|
//# sourceMappingURL=index.cjs.map
|