@burdenoff/mcp-libs 2026.1112.1 → 2026.1118.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.
Files changed (159) hide show
  1. package/dist/{core-zmkvPNsI.js → context-CNN-D9dE.js} +78 -606
  2. package/dist/context-CNN-D9dE.js.map +1 -0
  3. package/dist/{core-BKgeqlnN.cjs → context-DE1SuHyv.cjs} +87 -741
  4. package/dist/context-DE1SuHyv.cjs.map +1 -0
  5. package/dist/core/auth/memory-store.d.ts +2 -0
  6. package/dist/core/auth/store.d.ts +1 -0
  7. package/dist/core/context.d.ts +2 -1
  8. package/dist/core/index.cjs +19 -16
  9. package/dist/core/index.d.ts +2 -1
  10. package/dist/core/index.js +3 -2
  11. package/dist/core/tool-governance.d.ts +1 -1
  12. package/dist/core-AqyC7YJc.js +605 -0
  13. package/dist/core-AqyC7YJc.js.map +1 -0
  14. package/dist/core-Es_IX0FS.cjs +748 -0
  15. package/dist/core-Es_IX0FS.cjs.map +1 -0
  16. package/dist/index.cjs +4 -3
  17. package/dist/index.js +3 -2
  18. package/dist/{legacy-auth-BdSPFaEf.js → legacy-auth-DK_-m6hi.js} +2 -2
  19. package/dist/{legacy-auth-BdSPFaEf.js.map → legacy-auth-DK_-m6hi.js.map} +1 -1
  20. package/dist/{legacy-auth-C66oObd-.cjs → legacy-auth-Sk9KJHLW.cjs} +4 -4
  21. package/dist/{legacy-auth-C66oObd-.cjs.map → legacy-auth-Sk9KJHLW.cjs.map} +1 -1
  22. package/dist/modules/adaptercloud/index.cjs +1 -1
  23. package/dist/modules/adaptercloud/index.js +1 -1
  24. package/dist/modules/artistrybase/index.cjs +1 -1
  25. package/dist/modules/artistrybase/index.js +1 -1
  26. package/dist/modules/assethandler/index.cjs +1 -1
  27. package/dist/modules/assethandler/index.js +1 -1
  28. package/dist/modules/atheletebridge/index.cjs +1 -1
  29. package/dist/modules/atheletebridge/index.js +1 -1
  30. package/dist/modules/auth/index.cjs +4 -3
  31. package/dist/modules/auth/index.cjs.map +1 -1
  32. package/dist/modules/auth/index.js +3 -2
  33. package/dist/modules/auth/index.js.map +1 -1
  34. package/dist/modules/bigconsole/index.cjs +1 -1
  35. package/dist/modules/bigconsole/index.js +1 -1
  36. package/dist/modules/billing/index.cjs +1 -1
  37. package/dist/modules/billing/index.js +1 -1
  38. package/dist/modules/botmanor/index.cjs +1 -1
  39. package/dist/modules/botmanor/index.js +1 -1
  40. package/dist/modules/brainyrich/index.cjs +1 -1
  41. package/dist/modules/brainyrich/index.js +1 -1
  42. package/dist/modules/buildmyiq/index.cjs +1 -1
  43. package/dist/modules/buildmyiq/index.js +1 -1
  44. package/dist/modules/channels/index.cjs +1 -1
  45. package/dist/modules/channels/index.js +1 -1
  46. package/dist/modules/collabkin/index.cjs +1 -1
  47. package/dist/modules/collabkin/index.js +1 -1
  48. package/dist/modules/comradecircle/index.cjs +1 -1
  49. package/dist/modules/comradecircle/index.js +1 -1
  50. package/dist/modules/conversations/index.cjs +1 -1
  51. package/dist/modules/conversations/index.js +1 -1
  52. package/dist/modules/coolandlovely/index.cjs +1 -1
  53. package/dist/modules/coolandlovely/index.js +1 -1
  54. package/dist/modules/cosmicintersection/index.cjs +1 -1
  55. package/dist/modules/cosmicintersection/index.js +1 -1
  56. package/dist/modules/crewfoundry/index.cjs +1 -1
  57. package/dist/modules/crewfoundry/index.js +1 -1
  58. package/dist/modules/devportal/index.cjs +1 -1
  59. package/dist/modules/devportal/index.js +1 -1
  60. package/dist/modules/ecoimpacthub/index.cjs +1 -1
  61. package/dist/modules/ecoimpacthub/index.js +1 -1
  62. package/dist/modules/eventfullymanaged/index.cjs +1 -1
  63. package/dist/modules/eventfullymanaged/index.js +1 -1
  64. package/dist/modules/export/index.cjs +1 -1
  65. package/dist/modules/export/index.js +1 -1
  66. package/dist/modules/files/index.cjs +1 -1
  67. package/dist/modules/files/index.js +1 -1
  68. package/dist/modules/fluidgrids/extended-operations.d.ts +1 -1
  69. package/dist/modules/fluidgrids/index.cjs +6 -7
  70. package/dist/modules/fluidgrids/index.cjs.map +1 -1
  71. package/dist/modules/fluidgrids/index.js +6 -7
  72. package/dist/modules/fluidgrids/index.js.map +1 -1
  73. package/dist/modules/ggnomad/index.cjs +1 -1
  74. package/dist/modules/ggnomad/index.js +1 -1
  75. package/dist/modules/govcitizenhub/index.cjs +1 -1
  76. package/dist/modules/govcitizenhub/index.js +1 -1
  77. package/dist/modules/groups/index.cjs +1 -1
  78. package/dist/modules/groups/index.js +1 -1
  79. package/dist/modules/headshotmarketing/index.cjs +1 -1
  80. package/dist/modules/headshotmarketing/index.js +1 -1
  81. package/dist/modules/health/index.cjs +1 -1
  82. package/dist/modules/health/index.js +1 -1
  83. package/dist/modules/healthybowl/index.cjs +1 -1
  84. package/dist/modules/healthybowl/index.js +1 -1
  85. package/dist/modules/hookmovies/index.cjs +1 -1
  86. package/dist/modules/hookmovies/index.js +1 -1
  87. package/dist/modules/housingvista/index.cjs +1 -1
  88. package/dist/modules/housingvista/index.js +1 -1
  89. package/dist/modules/integrations/index.cjs +1 -1
  90. package/dist/modules/integrations/index.js +1 -1
  91. package/dist/modules/intelwatchtower/index.cjs +1 -1
  92. package/dist/modules/intelwatchtower/index.js +1 -1
  93. package/dist/modules/kadaikodi/index.cjs +1 -1
  94. package/dist/modules/kadaikodi/index.js +1 -1
  95. package/dist/modules/labsofscience/index.cjs +1 -1
  96. package/dist/modules/labsofscience/index.js +1 -1
  97. package/dist/modules/manufacturedops/index.cjs +1 -1
  98. package/dist/modules/manufacturedops/index.js +1 -1
  99. package/dist/modules/movethewheels/index.cjs +1 -1
  100. package/dist/modules/movethewheels/index.js +1 -1
  101. package/dist/modules/mybodyshield/index.cjs +1 -1
  102. package/dist/modules/mybodyshield/index.js +1 -1
  103. package/dist/modules/notifications/index.cjs +1 -1
  104. package/dist/modules/notifications/index.js +1 -1
  105. package/dist/modules/organizations/index.cjs +1 -1
  106. package/dist/modules/organizations/index.js +1 -1
  107. package/dist/modules/planmagnet/index.cjs +1 -1
  108. package/dist/modules/planmagnet/index.js +1 -1
  109. package/dist/modules/products/index.cjs +1 -1
  110. package/dist/modules/products/index.js +1 -1
  111. package/dist/modules/proserviceworld/index.cjs +1 -1
  112. package/dist/modules/proserviceworld/index.js +1 -1
  113. package/dist/modules/rbac/index.cjs +1 -1
  114. package/dist/modules/rbac/index.js +1 -1
  115. package/dist/modules/sandbox/index.cjs +1 -1
  116. package/dist/modules/sandbox/index.js +1 -1
  117. package/dist/modules/scheduler/index.cjs +1 -1
  118. package/dist/modules/scheduler/index.js +1 -1
  119. package/dist/modules/security/index.cjs +1 -1
  120. package/dist/modules/security/index.js +1 -1
  121. package/dist/modules/semanticfed/index.cjs +1 -1
  122. package/dist/modules/semanticfed/index.js +1 -1
  123. package/dist/modules/store/index.cjs +1 -1
  124. package/dist/modules/store/index.js +1 -1
  125. package/dist/modules/subscriberbot/index.cjs +1 -1
  126. package/dist/modules/subscriberbot/index.js +1 -1
  127. package/dist/modules/support/index.cjs +1 -1
  128. package/dist/modules/support/index.js +1 -1
  129. package/dist/modules/tags/index.cjs +1 -1
  130. package/dist/modules/tags/index.js +1 -1
  131. package/dist/modules/technospam/index.cjs +1 -1
  132. package/dist/modules/technospam/index.js +1 -1
  133. package/dist/modules/theculturepost/index.cjs +1 -1
  134. package/dist/modules/theculturepost/index.js +1 -1
  135. package/dist/modules/theglobalfuel/index.cjs +1 -1
  136. package/dist/modules/theglobalfuel/index.js +1 -1
  137. package/dist/modules/timecampus/index.cjs +1 -1
  138. package/dist/modules/timecampus/index.js +1 -1
  139. package/dist/modules/tours/index.cjs +1 -1
  140. package/dist/modules/tours/index.js +1 -1
  141. package/dist/modules/vibecontrols/index.cjs +2 -2
  142. package/dist/modules/vibecontrols/index.js +2 -2
  143. package/dist/modules/workspaces/index.cjs +1 -1
  144. package/dist/modules/workspaces/index.js +1 -1
  145. package/dist/transports/hosted.d.ts +33 -0
  146. package/dist/transports/index.cjs +3 -1
  147. package/dist/transports/index.d.ts +1 -0
  148. package/dist/transports/index.js +2 -2
  149. package/dist/transports-CWPyypes.js +478 -0
  150. package/dist/transports-CWPyypes.js.map +1 -0
  151. package/dist/transports-LHVn9JhI.cjs +537 -0
  152. package/dist/transports-LHVn9JhI.cjs.map +1 -0
  153. package/package.json +4 -3
  154. package/dist/core-BKgeqlnN.cjs.map +0 -1
  155. package/dist/core-zmkvPNsI.js.map +0 -1
  156. package/dist/transports-BUwYHMg1.js +0 -206
  157. package/dist/transports-BUwYHMg1.js.map +0 -1
  158. package/dist/transports-Cz4PCHmm.cjs +0 -253
  159. package/dist/transports-Cz4PCHmm.cjs.map +0 -1
@@ -30,10 +30,6 @@ let os = require("os");
30
30
  let graphql_request = require("graphql-request");
31
31
  let cross_fetch = require("cross-fetch");
32
32
  cross_fetch = __toESM(cross_fetch, 1);
33
- let _modelcontextprotocol_sdk_server_mcp_js = require("@modelcontextprotocol/sdk/server/mcp.js");
34
- let _modelcontextprotocol_sdk_types_js = require("@modelcontextprotocol/sdk/types.js");
35
- let node_crypto = require("node:crypto");
36
- let zod = require("zod");
37
33
 
38
34
  // src/core/auth/store.ts
39
35
  /**
@@ -46,7 +42,7 @@ let zod = require("zod");
46
42
  * keeps the field set in sync with cli-sdk so a shared token store path
47
43
  * (vibecontrols-cli/auth.json) works for both consumers.
48
44
  */
49
- const TOKEN_BUFFER_MS = 3e5;
45
+ const TOKEN_BUFFER_MS$1 = 3e5;
50
46
  /** Decode a JWT payload without verifying it. Returns null for anything that is not a JWT. */
51
47
  function decodeJwtPayload(token) {
52
48
  if (!token) return null;
@@ -121,7 +117,7 @@ function createAuthStore(configDir, authFileName = "auth.json") {
121
117
  function isTokenExpiringSoon() {
122
118
  const expiresAt = accessTokenExpiry(read());
123
119
  if (!expiresAt) return false;
124
- return Date.now() + TOKEN_BUFFER_MS >= expiresAt;
120
+ return Date.now() + TOKEN_BUFFER_MS$1 >= expiresAt;
125
121
  }
126
122
  function isWorkspaceTokenExpired() {
127
123
  const expiresAt = workspaceTokenExpiry(read());
@@ -131,7 +127,7 @@ function createAuthStore(configDir, authFileName = "auth.json") {
131
127
  function isWorkspaceTokenExpiringSoon() {
132
128
  const expiresAt = workspaceTokenExpiry(read());
133
129
  if (!expiresAt) return false;
134
- return Date.now() + TOKEN_BUFFER_MS >= expiresAt;
130
+ return Date.now() + TOKEN_BUFFER_MS$1 >= expiresAt;
135
131
  }
136
132
  function isAuthenticated() {
137
133
  const auth = read();
@@ -156,6 +152,60 @@ function createAuthStore(configDir, authFileName = "auth.json") {
156
152
  };
157
153
  }
158
154
 
155
+ // src/core/auth/memory-store.ts
156
+ /**
157
+ * In-memory AuthStore for one hosted request (BOFF-15144).
158
+ *
159
+ * A hosted MCP server serves many users at once. Each request carries the
160
+ * user's own bearer token (minted by the platform's OAuth server for one
161
+ * connector and one workspace), so every request gets its own store instead
162
+ * of the process-wide auth.json store. Nothing is written to disk and nothing
163
+ * outlives the request.
164
+ *
165
+ * Refresh is the connector's job (it holds the refresh token, not us): the
166
+ * store never carries a refresh token, client credentials or an organization
167
+ * id, so the GraphQL client's refresh paths are no-ops.
168
+ */
169
+ const TOKEN_BUFFER_MS = 3e5;
170
+ function createMemoryAuthStore(initial) {
171
+ let current = initial ? { ...initial } : null;
172
+ const expiry = () => current ? current.expiresAt ?? jwtExpiryMs(current.accessToken) : null;
173
+ const workspaceExpiry = () => {
174
+ if (!current?.workspaceToken) return current?.workspaceTokenExpiresAt ?? null;
175
+ return current.workspaceTokenExpiresAt ?? jwtExpiryMs(current.workspaceToken);
176
+ };
177
+ return {
178
+ read: () => current ? { ...current } : null,
179
+ write: (auth) => {
180
+ current = { ...auth };
181
+ },
182
+ clear: () => {
183
+ current = null;
184
+ },
185
+ isTokenExpired: () => {
186
+ const at = expiry();
187
+ return at !== null && Date.now() >= at;
188
+ },
189
+ isTokenExpiringSoon: () => {
190
+ const at = expiry();
191
+ return at !== null && Date.now() >= at - TOKEN_BUFFER_MS;
192
+ },
193
+ isWorkspaceTokenExpired: () => {
194
+ const at = workspaceExpiry();
195
+ return at !== null && Date.now() >= at;
196
+ },
197
+ isWorkspaceTokenExpiringSoon: () => {
198
+ const at = workspaceExpiry();
199
+ return at !== null && Date.now() >= at - TOKEN_BUFFER_MS;
200
+ },
201
+ isAuthenticated: () => !!current?.accessToken,
202
+ getActorUserId: () => {
203
+ const sub = decodeJwtPayload(current?.accessToken)?.sub;
204
+ return typeof sub === "string" && sub ? sub : null;
205
+ }
206
+ };
207
+ }
208
+
159
209
  // src/core/config/store.ts
160
210
  /**
161
211
  * Config store — parameterised on configDirName + product defaults.
@@ -779,6 +829,25 @@ function buildContext(opts) {
779
829
  _internal: { serverRef }
780
830
  };
781
831
  }
832
+ /**
833
+ * A context for one hosted request (BOFF-15144): same configuration, logger
834
+ * and product identity as `base`, but its own in-memory auth store, GraphQL
835
+ * clients and progress channel. Tool handlers capture the context they were
836
+ * registered with, so a hosted server builds one of these per request and a
837
+ * fresh server around it; two users' requests can never share credentials or
838
+ * progress notifications.
839
+ */
840
+ function contextForRequest(base, auth) {
841
+ const store = createMemoryAuthStore(auth);
842
+ const serverRef = { current: null };
843
+ return {
844
+ ...base,
845
+ auth: store,
846
+ gql: createGqlClients(base.config, store),
847
+ progress: createProgress(serverRef),
848
+ _internal: { serverRef }
849
+ };
850
+ }
782
851
  function dirOf(p) {
783
852
  const lastSlash = p.lastIndexOf("/");
784
853
  return lastSlash > 0 ? p.slice(0, lastSlash) : p;
@@ -789,651 +858,12 @@ function authFileName(p) {
789
858
  return lastSlash >= 0 ? p.slice(lastSlash + 1) : p;
790
859
  }
791
860
 
792
- // src/core/errors.ts
793
- /**
794
- * Error classes for MCP SDK.
795
- *
796
- * Modules MUST throw these instead of throwing raw Errors. The registerTool
797
- * wrapper in result.ts catches and maps them to MCP-protocol-compliant
798
- * `{ isError: true, content: [...] }` responses.
799
- *
800
- * Throwing past the wrapper to the protocol surfaces as JSON-RPC -32603 to
801
- * the client and is a protocol bug.
802
- */
803
- var McpUserError = class extends Error {
804
- hint;
805
- constructor(message, opts) {
806
- super(message);
807
- this.name = "McpUserError";
808
- this.hint = opts?.hint;
809
- }
810
- };
811
- var McpAuthError = class extends McpUserError {
812
- constructor(message, opts) {
813
- super(message, { hint: opts?.hint ?? "Run the auth_login tool to authenticate." });
814
- this.name = "McpAuthError";
815
- }
816
- };
817
- var McpInternalError = class extends Error {
818
- cause;
819
- constructor(message, cause) {
820
- super(message);
821
- this.name = "McpInternalError";
822
- this.cause = cause;
823
- }
824
- };
825
-
826
- // src/core/module.ts
827
- var MissingDependencyError = class extends McpInternalError {
828
- constructor(moduleId, missingDep) {
829
- super(`Module '${moduleId}' declares dependency on '${missingDep}', but '${missingDep}' is not in the module list.`);
830
- this.name = "MissingDependencyError";
831
- }
832
- };
833
- var CircularDependencyError = class extends McpInternalError {
834
- constructor(cycle) {
835
- super(`Circular dependency detected among modules: ${cycle.join(" -> ")}`);
836
- this.name = "CircularDependencyError";
837
- }
838
- };
839
- /**
840
- * Topologically sort modules by their `dependsOn` declarations.
841
- * Throws MissingDependencyError or CircularDependencyError on bad input.
842
- */
843
- function sortModules(modules) {
844
- const byId = /* @__PURE__ */ new Map();
845
- for (const m of modules) {
846
- if (byId.has(m.id)) throw new McpInternalError(`Duplicate module id: '${m.id}'`);
847
- byId.set(m.id, m);
848
- }
849
- for (const m of modules) for (const dep of m.dependsOn ?? []) if (!byId.has(dep)) throw new MissingDependencyError(m.id, dep);
850
- const sorted = [];
851
- const visiting = /* @__PURE__ */ new Set();
852
- const visited = /* @__PURE__ */ new Set();
853
- function visit(m, path) {
854
- if (visited.has(m.id)) return;
855
- if (visiting.has(m.id)) throw new CircularDependencyError([...path, m.id]);
856
- visiting.add(m.id);
857
- for (const dep of m.dependsOn ?? []) {
858
- const depModule = byId.get(dep);
859
- if (depModule) visit(depModule, [...path, m.id]);
860
- }
861
- visiting.delete(m.id);
862
- visited.add(m.id);
863
- sorted.push(m);
864
- }
865
- for (const m of modules) visit(m, []);
866
- return sorted;
867
- }
868
-
869
- // src/core/capabilities.ts
870
- /**
871
- * Union an array of capability declarations. Boolean unions on logging /
872
- * completions; OR on every nested boolean.
873
- */
874
- function unionCapabilities(caps) {
875
- const out = {};
876
- for (const cap of caps) {
877
- if (!cap) continue;
878
- if (cap.resources) {
879
- out.resources ??= {};
880
- if (cap.resources.subscribe) out.resources.subscribe = true;
881
- if (cap.resources.listChanged) out.resources.listChanged = true;
882
- }
883
- if (cap.prompts) {
884
- out.prompts ??= {};
885
- if (cap.prompts.listChanged) out.prompts.listChanged = true;
886
- }
887
- if (cap.tools) {
888
- out.tools ??= {};
889
- if (cap.tools.listChanged) out.tools.listChanged = true;
890
- }
891
- if (cap.logging) out.logging = true;
892
- if (cap.completions) out.completions = true;
893
- }
894
- return out;
895
- }
896
- /**
897
- * Convert capability declaration into the shape the MCP SDK accepts at
898
- * `new McpServer({ capabilities })`. The SDK uses `{}` as truthy markers.
899
- */
900
- function toServerCapabilities(caps) {
901
- const out = {};
902
- if (caps.tools) out.tools = caps.tools;
903
- if (caps.resources) out.resources = caps.resources;
904
- if (caps.prompts) out.prompts = caps.prompts;
905
- if (caps.logging) out.logging = {};
906
- if (caps.completions) out.completions = {};
907
- return out;
908
- }
909
-
910
- // src/core/tool-name.ts
911
- /**
912
- * Tool / resource / prompt naming helpers.
913
- *
914
- * Mandatory product prefix avoids collisions when Claude Desktop runs
915
- * multiple MCP servers concurrently (typical setup is ~6).
916
- *
917
- * Tool names are capped at 63 characters — Claude Desktop pre-1.x
918
- * truncated at 64 in some versions.
919
- */
920
- const MAX_TOOL_NAME_LENGTH = 63;
921
- function assertSafeName(name, kind) {
922
- 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).`);
923
- return name;
924
- }
925
- /**
926
- * Build a tool name. Format: `<productName>_<...parts>` (snake_case).
927
- * Example: mcpToolName('vibecontrols', 'vibes', 'list') -> 'vibecontrols_vibes_list'
928
- */
929
- function mcpToolName(productName, ...parts) {
930
- if (!productName) throw new McpInternalError("mcpToolName: productName is required");
931
- return assertSafeName([productName, ...parts].filter(Boolean).join("_"), "tool");
932
- }
933
- /**
934
- * Build a resource URI. Format: `<productName>://<...parts>`.
935
- * Example: mcpResourceUri('vibecontrols', 'schema') -> 'vibecontrols://schema'
936
- */
937
- function mcpResourceUri(productName, ...parts) {
938
- if (!productName) throw new McpInternalError("mcpResourceUri: productName is required");
939
- return `${productName}://${parts.filter(Boolean).join("/")}`;
940
- }
941
- /**
942
- * Build a prompt name. Format: `<productName>-<...parts>` (kebab-case).
943
- * Example: mcpPromptName('vibecontrols', 'setup') -> 'vibecontrols-setup'
944
- */
945
- function mcpPromptName(productName, ...parts) {
946
- if (!productName) throw new McpInternalError("mcpPromptName: productName is required");
947
- return [productName, ...parts].filter(Boolean).join("-");
948
- }
949
- const TOOL_NAME_LIMIT = MAX_TOOL_NAME_LENGTH;
950
- /**
951
- * Name-based hint heuristics for MCP `annotations` (readOnlyHint /
952
- * destructiveHint). Used by tool-governance.ts to auto-fill annotations for
953
- * the fleet of product modules that call `server.registerTool` directly
954
- * (bypassing the `registerTool()` core helper) and so never set them
955
- * explicitly today (BOFF-3903). Deliberately conservative — matched against
956
- * whole `_`-delimited segments so e.g. `timeentries_delete` and
957
- * `pomodoro_delete_goal` match, but a hypothetical `undeletable_check`
958
- * would not.
959
- *
960
- * The destructive verb set covers more than `delete`: stopping, killing or
961
- * terminating a running process, revoking or rotating a credential/share,
962
- * resetting settings and removing/purging/uninstalling are all actions an
963
- * MCP client must not auto-run without the user's intent (VC/FG parity G57 —
964
- * e.g. `vibecontrols_sessions_kill`, `vibecontrols_tunnels_rotate_credentials`
965
- * were previously reported as non-destructive).
966
- *
967
- * A module can always override the inference by passing an explicit
968
- * `annotations` object to `registerTool()` / `server.registerTool()` — do
969
- * that for the rare verb match that is harmless (e.g. a typing indicator's
970
- * `typing_stop`).
971
- */
972
- const DESTRUCTIVE_NAME_VERBS = [
973
- "delete",
974
- "destroy",
975
- "erase",
976
- "kill",
977
- "purge",
978
- "remove",
979
- "reset",
980
- "revoke",
981
- "rotate",
982
- "stop",
983
- "terminate",
984
- "uninstall",
985
- "wipe"
986
- ];
987
- const DESTRUCTIVE_NAME_SEGMENT = new RegExp(`(?:^|_)(?:${DESTRUCTIVE_NAME_VERBS.join("|")})(?:_|$)`, "i");
988
- const READ_ONLY_NAME_SEGMENT = /(?:^|_)(?:list|get|search|check|read|count|stats|by_date)(?:_|$)/i;
989
- /** True when a tool name looks destructive (irreversibly deletes data) by naming convention. */
990
- function inferDestructiveHint(toolName) {
991
- return DESTRUCTIVE_NAME_SEGMENT.test(toolName);
992
- }
993
- /**
994
- * True when a tool name looks read-only by naming convention. Never true for
995
- * a name that also looks destructive (a tool can't be both).
996
- */
997
- function inferReadOnlyHint(toolName) {
998
- return !inferDestructiveHint(toolName) && READ_ONLY_NAME_SEGMENT.test(toolName);
999
- }
1000
-
1001
- // src/core/tool-governance.ts
1002
- /**
1003
- * Fleet-wide tool governance: MCP `annotations` inference + an opt-in
1004
- * confirmation gate on destructive tools.
1005
- *
1006
- * BOFF-3903: an audit of mcp-libs/src/modules/timecampus/tools/ found 163
1007
- * registered tools, ~35 of them destructive (delete/bulk-delete), with ZERO
1008
- * `annotations.destructiveHint`/`readOnlyHint` anywhere and no confirmation
1009
- * step before a destructive call executes. The same is true fleet-wide —
1010
- * every product module calls `server.registerTool` directly (bypassing the
1011
- * `registerTool()` central wrapper in result.ts), so a per-module fix would
1012
- * have to be re-applied ~54 times.
1013
- *
1014
- * `wrapServerWithToolGovernance` fixes this ONCE, at the McpServer boundary
1015
- * inside `createMcpServer`, by monkey-patching `registerTool` before any
1016
- * module receives the server reference. Every subsequent `registerTool`
1017
- * call — whether it goes through result.ts's `registerTool()` helper or
1018
- * calls `server.registerTool` directly — passes through this wrapper:
1019
- *
1020
- * 1. `annotations.readOnlyHint` / `destructiveHint` are filled in from the
1021
- * tool name (see tool-name.ts's inferDestructiveHint/inferReadOnlyHint)
1022
- * whenever a module didn't declare them explicitly. This is pure
1023
- * metadata — it never changes a tool's input schema or behavior, so it
1024
- * is always safe to apply and every consumer gets it automatically.
1025
- * 2. Only when `enforceDestructiveConfirmation` is true (opt-in,
1026
- * defaults to false) does a resolved-destructive tool additionally get
1027
- * a `confirm` input field and a hard gate: the tool's real handler is
1028
- * never invoked unless the caller passes `confirm: true`. This is
1029
- * deliberately opt-in — flipping it on is a real behavior change for
1030
- * any existing MCP client automation calling that tool, so each product
1031
- * shell (starting with timecampus-mcp for BOFF-3903) turns it on
1032
- * explicitly via `createMcpServer`'s options once it's ready, rather
1033
- * than every one of the ~54 modules' existing destructive-tool callers
1034
- * breaking the moment this ships.
1035
- */
1036
- /**
1037
- * The tool filter for a token's scopes, with the same grammar as the hosted MCP gateway:
1038
- * `mcp:*` allows every tool, `mcp:tool:<name>` one tool; no MCP scope allows nothing.
1039
- */
1040
- function scopeToolFilter(scopes) {
1041
- if (scopes.includes("mcp:*")) return () => true;
1042
- const allowed = new Set(scopes.filter((scope) => scope.startsWith("mcp:tool:")).map((scope) => scope.slice(9)));
1043
- return (toolName) => allowed.has(toolName);
1044
- }
1045
- function canonicalJson(value, seen = /* @__PURE__ */ new Set()) {
1046
- if (value === null || value === void 0) return "null";
1047
- if (typeof value === "number") return Number.isFinite(value) ? JSON.stringify(value) : "null";
1048
- if (typeof value === "string" || typeof value === "boolean") return JSON.stringify(value);
1049
- if (typeof value === "bigint") return JSON.stringify(value.toString());
1050
- if (typeof value !== "object") return "null";
1051
- if (seen.has(value)) return "null";
1052
- seen.add(value);
1053
- try {
1054
- if (Array.isArray(value)) return `[${value.map((item) => canonicalJson(item, seen)).join(",")}]`;
1055
- const record = value;
1056
- return `{${Object.keys(record).filter((key) => record[key] !== void 0).sort().map((key) => `${JSON.stringify(key)}:${canonicalJson(record[key], seen)}`).join(",")}}`;
1057
- } finally {
1058
- seen.delete(value);
1059
- }
1060
- }
1061
- /** sha256 of the canonical JSON of tool arguments, so an audit row never stores the arguments. */
1062
- function toolArgsSha256(args) {
1063
- return (0, node_crypto.createHash)("sha256").update(canonicalJson(args), "utf8").digest("hex");
1064
- }
1065
- /**
1066
- * Results the confirmation gate returned instead of running a tool, so the
1067
- * audit hook can report them as `refused` rather than as a tool `error`.
1068
- */
1069
- const refusedResults = /* @__PURE__ */ new WeakSet();
1070
- function isRefusedResult(result) {
1071
- return typeof result === "object" && result !== null && refusedResults.has(result);
1072
- }
1073
- function isErrorResult(result) {
1074
- return typeof result === "object" && result !== null && result.isError === true;
1075
- }
1076
- function wrapAuditedHandler(name, handler, onToolCall) {
1077
- return async (...callbackArgs) => {
1078
- const started = Date.now();
1079
- const args = callbackArgs.length === 2 ? callbackArgs[0] : {};
1080
- const report = (status, error) => {
1081
- try {
1082
- onToolCall({
1083
- name,
1084
- argsSha256: toolArgsSha256(args),
1085
- status,
1086
- durationMs: Date.now() - started,
1087
- ...error ? { error } : {}
1088
- });
1089
- } catch {}
1090
- };
1091
- try {
1092
- const result = await handler(...callbackArgs);
1093
- report(isRefusedResult(result) ? "refused" : isErrorResult(result) ? "error" : "ok");
1094
- return result;
1095
- } catch (error) {
1096
- report("error", error instanceof Error ? error.message : String(error));
1097
- throw error;
1098
- }
1099
- };
1100
- }
1101
- const CONFIRM_FIELD_DESCRIPTION = "Must be true to execute this destructive tool. The call is rejected (no changes made) if omitted or false.";
1102
- function resolveAnnotations(name, declared) {
1103
- const destructiveHint = declared?.destructiveHint ?? inferDestructiveHint(name);
1104
- const readOnlyHint = declared?.readOnlyHint ?? (destructiveHint ? false : inferReadOnlyHint(name));
1105
- return {
1106
- ...declared,
1107
- destructiveHint,
1108
- readOnlyHint
1109
- };
1110
- }
1111
- /** Rejection result forwarded to the MCP client without invoking the real handler. */
1112
- function unconfirmedDestructiveResult(name) {
1113
- const result = {
1114
- content: [{
1115
- type: "text",
1116
- text: `'${name}' is a destructive action and was NOT executed. Re-call with confirm: true once you intend to proceed.`
1117
- }],
1118
- isError: true
1119
- };
1120
- refusedResults.add(result);
1121
- return result;
1122
- }
1123
- function wrapDestructiveHandler(name, handler) {
1124
- return async (...callbackArgs) => {
1125
- const hasArgs = callbackArgs.length === 2;
1126
- const rawArgs = hasArgs ? callbackArgs[0] : {};
1127
- if (rawArgs["confirm"] !== true) return unconfirmedDestructiveResult(name);
1128
- const forwardedArgs = { ...rawArgs };
1129
- delete forwardedArgs["confirm"];
1130
- return handler(...hasArgs ? [forwardedArgs, callbackArgs[1]] : callbackArgs);
1131
- };
1132
- }
1133
- /**
1134
- * Monkey-patch `server.registerTool` so every tool registered afterward
1135
- * (by any module, through any call path) gets annotations inference and,
1136
- * when enabled, the destructive-confirmation gate. Returns the same server
1137
- * instance (mutated in place) for convenient chaining.
1138
- */
1139
- function wrapServerWithToolGovernance(server, options = {}) {
1140
- const enforceConfirmation = options.enforceDestructiveConfirmation ?? false;
1141
- const target = server;
1142
- const originalRegisterTool = target.registerTool.bind(target);
1143
- const register = (name, config, handler) => {
1144
- const annotations = resolveAnnotations(name, config.annotations);
1145
- const audit = (inner) => options.onToolCall ? wrapAuditedHandler(name, inner, options.onToolCall) : inner;
1146
- if (!enforceConfirmation || !annotations.destructiveHint) return originalRegisterTool(name, {
1147
- ...config,
1148
- annotations
1149
- }, audit(handler));
1150
- const gatedInputSchema = {
1151
- ...config.inputSchema ?? {},
1152
- confirm: zod.z.boolean().optional().describe(CONFIRM_FIELD_DESCRIPTION)
1153
- };
1154
- return originalRegisterTool(name, {
1155
- ...config,
1156
- inputSchema: gatedInputSchema,
1157
- annotations
1158
- }, audit(wrapDestructiveHandler(name, handler)));
1159
- };
1160
- target.registerTool = (name, config, handler) => {
1161
- const registered = register(name, config, handler);
1162
- if (options.toolFilter && !options.toolFilter(name)) registered?.disable?.();
1163
- return registered;
1164
- };
1165
- return server;
1166
- }
1167
- /**
1168
- * Run `register` with every `server.registerTool` call it makes carrying
1169
- * the annotations `resolve` returns for that tool name. Lets a large module
1170
- * keep its annotations in one reviewed table (VC/FG parity G57: the
1171
- * vibecontrols module registers ~280 tools) instead of scattering them over
1172
- * every call site, while still going through the governance wrapper — the
1173
- * table counts as an *explicit* declaration, so it wins over name
1174
- * inference and drives the confirmation gate.
1175
- *
1176
- * Annotations a call site passes inline take precedence over the table.
1177
- * `server.registerTool` is restored when `register` returns or throws, so
1178
- * resource/prompt registration and later modules are unaffected.
1179
- */
1180
- function withToolAnnotations(server, resolve, register) {
1181
- const target = server;
1182
- const governedRegisterTool = target.registerTool;
1183
- target.registerTool = (name, config, handler) => {
1184
- const declared = resolve(name);
1185
- const annotations = declared === void 0 ? config.annotations : {
1186
- ...declared,
1187
- ...config.annotations
1188
- };
1189
- return governedRegisterTool.call(target, name, {
1190
- ...config,
1191
- annotations
1192
- }, handler);
1193
- };
1194
- try {
1195
- return register();
1196
- } finally {
1197
- target.registerTool = governedRegisterTool;
1198
- }
1199
- }
1200
-
1201
- // src/core/server.ts
1202
- /**
1203
- * createMcpServer — McpServer factory + module loader + central wiring.
1204
- *
1205
- * Sorts modules by dependsOn, unions their capabilities, constructs an
1206
- * McpServer with declared capabilities, calls register() on each module in
1207
- * topo order, threads the server into ctx for progress notifications, and
1208
- * returns both the server + the merged registration manifest.
1209
- *
1210
- * The `logging/setLevel` request handler is wired to ctx.logger.setLevel
1211
- * so MCP clients can dynamically control verbosity.
1212
- */
1213
- const MCP_TO_LOGGER_LEVEL = {
1214
- debug: "debug",
1215
- info: "info",
1216
- notice: "info",
1217
- warning: "warn",
1218
- error: "error",
1219
- critical: "error",
1220
- alert: "error",
1221
- emergency: "error"
1222
- };
1223
- function createMcpServer(ctx, modules, opts) {
1224
- const sorted = sortModules(modules);
1225
- const capabilities = unionCapabilities([
1226
- { logging: true },
1227
- ...sorted.map((m) => m.capabilities),
1228
- opts.extraCapabilities
1229
- ]);
1230
- const server = new _modelcontextprotocol_sdk_server_mcp_js.McpServer({
1231
- name: opts.name,
1232
- version: opts.version
1233
- }, { capabilities: toServerCapabilities(capabilities) });
1234
- wrapServerWithToolGovernance(server, {
1235
- enforceDestructiveConfirmation: opts.enforceDestructiveConfirmation,
1236
- toolFilter: opts.toolFilter,
1237
- onToolCall: opts.onToolCall
1238
- });
1239
- ctx._internal.serverRef.current = server;
1240
- const inner = server.server ?? server;
1241
- if (typeof inner.setRequestHandler === "function") inner.setRequestHandler(_modelcontextprotocol_sdk_types_js.SetLevelRequestSchema, async (req) => {
1242
- const target = MCP_TO_LOGGER_LEVEL[req.params.level] ?? "info";
1243
- ctx.logger.setLevel(target);
1244
- ctx.logger.info("MCP logging level set", {
1245
- level: req.params.level,
1246
- mapped: target
1247
- });
1248
- return {};
1249
- });
1250
- const tools = [];
1251
- const resources = [];
1252
- const prompts = [];
1253
- const moduleManifest = [];
1254
- for (const mod of sorted) try {
1255
- const reg = mod.register(server, ctx);
1256
- tools.push(...reg.tools);
1257
- resources.push(...reg.resources);
1258
- prompts.push(...reg.prompts);
1259
- moduleManifest.push({
1260
- id: mod.id,
1261
- version: mod.version
1262
- });
1263
- ctx.logger.debug(`Registered module: ${mod.id}`, {
1264
- tools: reg.tools.length,
1265
- resources: reg.resources.length,
1266
- prompts: reg.prompts.length
1267
- });
1268
- } catch (error) {
1269
- ctx.logger.error(`Failed to register module: ${mod.id}`, { error: error instanceof Error ? error.message : String(error) });
1270
- throw error;
1271
- }
1272
- const manifest = {
1273
- modules: moduleManifest,
1274
- tools,
1275
- resources,
1276
- prompts
1277
- };
1278
- ctx.logger.info(`MCP server ready: ${opts.name}@${opts.version}`, {
1279
- modules: manifest.modules.length,
1280
- tools: manifest.tools.length,
1281
- resources: manifest.resources.length,
1282
- prompts: manifest.prompts.length
1283
- });
1284
- return {
1285
- server,
1286
- manifest
1287
- };
1288
- }
1289
-
1290
- // src/core/result.ts
1291
- /**
1292
- * Build a successful tool result with JSON content (pretty-printed).
1293
- */
1294
- function jsonResult(data, structured) {
1295
- const result = { content: [{
1296
- type: "text",
1297
- text: JSON.stringify(data, null, 2)
1298
- }] };
1299
- if (structured !== void 0) result.structuredContent = structured;
1300
- return result;
1301
- }
1302
- /**
1303
- * Build a successful tool result with plain text content.
1304
- */
1305
- function textResult(text) {
1306
- return { content: [{
1307
- type: "text",
1308
- text
1309
- }] };
1310
- }
1311
- /**
1312
- * Build an error tool result. Honors MCP's `{ isError: true, content }` shape.
1313
- * Optional hint is appended on a new line so the LLM can react.
1314
- */
1315
- function errorResult(message, hint) {
1316
- return {
1317
- content: [{
1318
- type: "text",
1319
- text: hint ? `${message}\n\nHint: ${hint}` : message
1320
- }],
1321
- isError: true
1322
- };
1323
- }
1324
- /**
1325
- * Register a tool with the central error wrapper.
1326
- *
1327
- * The handler returns a plain value or void. The wrapper:
1328
- * - wraps non-undefined returns in jsonResult()
1329
- * - if the value already looks like a ToolResult (has `content`), passes through
1330
- * - catches McpAuthError / McpUserError / McpInternalError / generic Error
1331
- * - logs every error via ctx.logger.error
1332
- */
1333
- function registerTool(server, ctx, name, metadata, handler) {
1334
- const sdkConfig = {
1335
- title: metadata.title,
1336
- description: metadata.description,
1337
- ...metadata.inputSchema ? { inputSchema: metadata.inputSchema } : {},
1338
- ...metadata.annotations ? { annotations: metadata.annotations } : {}
1339
- };
1340
- const wrapped = async (...callbackArgs) => {
1341
- const hasArgs = callbackArgs.length === 2;
1342
- const args = hasArgs ? callbackArgs[0] : {};
1343
- const progressToken = (hasArgs ? callbackArgs[1] : callbackArgs[0])?._meta?.progressToken;
1344
- const meta = progressToken !== void 0 ? { progressToken } : {};
1345
- try {
1346
- const result = await handler(args, ctx, meta);
1347
- if (isToolResult(result)) return result;
1348
- if (result === void 0) return textResult("OK");
1349
- return jsonResult(result);
1350
- } catch (error) {
1351
- return mapErrorToResult(error, ctx, name);
1352
- }
1353
- };
1354
- server.registerTool(name, sdkConfig, wrapped);
1355
- }
1356
- function isToolResult(value) {
1357
- return !!value && typeof value === "object" && "content" in value && Array.isArray(value.content);
1358
- }
1359
- function mapErrorToResult(error, ctx, toolName) {
1360
- if (error instanceof McpAuthError) {
1361
- ctx.logger.warn(`${toolName}: auth required`, { message: error.message });
1362
- return errorResult(error.message, error.hint);
1363
- }
1364
- if (error instanceof McpUserError) {
1365
- ctx.logger.info(`${toolName}: user error`, { message: error.message });
1366
- return errorResult(error.message, error.hint);
1367
- }
1368
- if (error instanceof McpInternalError) {
1369
- ctx.logger.error(`${toolName}: internal error`, {
1370
- message: error.message,
1371
- cause: stringifyCause(error.cause)
1372
- });
1373
- return errorResult(`Internal error in ${toolName}.`);
1374
- }
1375
- const message = error instanceof Error ? error.message : String(error);
1376
- ctx.logger.error(`${toolName}: unhandled error`, { message });
1377
- return errorResult(`${toolName}: ${message}`);
1378
- }
1379
- function stringifyCause(cause) {
1380
- if (cause === void 0 || cause === null) return void 0;
1381
- if (cause instanceof Error) return cause.message;
1382
- try {
1383
- return JSON.stringify(cause);
1384
- } catch {
1385
- return String(cause);
1386
- }
1387
- }
1388
-
1389
- Object.defineProperty(exports, "CircularDependencyError", {
1390
- enumerable: true,
1391
- get: function () {
1392
- return CircularDependencyError;
1393
- }
1394
- });
1395
- Object.defineProperty(exports, "DESTRUCTIVE_NAME_VERBS", {
1396
- enumerable: true,
1397
- get: function () {
1398
- return DESTRUCTIVE_NAME_VERBS;
1399
- }
1400
- });
1401
861
  Object.defineProperty(exports, "GqlRequestError", {
1402
862
  enumerable: true,
1403
863
  get: function () {
1404
864
  return GqlRequestError;
1405
865
  }
1406
866
  });
1407
- Object.defineProperty(exports, "McpAuthError", {
1408
- enumerable: true,
1409
- get: function () {
1410
- return McpAuthError;
1411
- }
1412
- });
1413
- Object.defineProperty(exports, "McpInternalError", {
1414
- enumerable: true,
1415
- get: function () {
1416
- return McpInternalError;
1417
- }
1418
- });
1419
- Object.defineProperty(exports, "McpUserError", {
1420
- enumerable: true,
1421
- get: function () {
1422
- return McpUserError;
1423
- }
1424
- });
1425
- Object.defineProperty(exports, "MissingDependencyError", {
1426
- enumerable: true,
1427
- get: function () {
1428
- return MissingDependencyError;
1429
- }
1430
- });
1431
- Object.defineProperty(exports, "TOOL_NAME_LIMIT", {
1432
- enumerable: true,
1433
- get: function () {
1434
- return TOOL_NAME_LIMIT;
1435
- }
1436
- });
1437
867
  Object.defineProperty(exports, "buildContext", {
1438
868
  enumerable: true,
1439
869
  get: function () {
@@ -1446,6 +876,12 @@ Object.defineProperty(exports, "clientCredentialsFlow", {
1446
876
  return clientCredentialsFlow;
1447
877
  }
1448
878
  });
879
+ Object.defineProperty(exports, "contextForRequest", {
880
+ enumerable: true,
881
+ get: function () {
882
+ return contextForRequest;
883
+ }
884
+ });
1449
885
  Object.defineProperty(exports, "createAuthStore", {
1450
886
  enumerable: true,
1451
887
  get: function () {
@@ -1470,10 +906,10 @@ Object.defineProperty(exports, "createLogger", {
1470
906
  return createLogger;
1471
907
  }
1472
908
  });
1473
- Object.defineProperty(exports, "createMcpServer", {
909
+ Object.defineProperty(exports, "createMemoryAuthStore", {
1474
910
  enumerable: true,
1475
911
  get: function () {
1476
- return createMcpServer;
912
+ return createMemoryAuthStore;
1477
913
  }
1478
914
  });
1479
915
  Object.defineProperty(exports, "createProgress", {
@@ -1482,10 +918,10 @@ Object.defineProperty(exports, "createProgress", {
1482
918
  return createProgress;
1483
919
  }
1484
920
  });
1485
- Object.defineProperty(exports, "errorResult", {
921
+ Object.defineProperty(exports, "decodeJwtPayload", {
1486
922
  enumerable: true,
1487
923
  get: function () {
1488
- return errorResult;
924
+ return decodeJwtPayload;
1489
925
  }
1490
926
  });
1491
927
  Object.defineProperty(exports, "extractGqlErrorMessage", {
@@ -1500,18 +936,6 @@ Object.defineProperty(exports, "fetchWorkspaces", {
1500
936
  return fetchWorkspaces;
1501
937
  }
1502
938
  });
1503
- Object.defineProperty(exports, "inferDestructiveHint", {
1504
- enumerable: true,
1505
- get: function () {
1506
- return inferDestructiveHint;
1507
- }
1508
- });
1509
- Object.defineProperty(exports, "inferReadOnlyHint", {
1510
- enumerable: true,
1511
- get: function () {
1512
- return inferReadOnlyHint;
1513
- }
1514
- });
1515
939
  Object.defineProperty(exports, "isExpiredCredentialError", {
1516
940
  enumerable: true,
1517
941
  get: function () {
@@ -1524,100 +948,22 @@ Object.defineProperty(exports, "issueWorkspaceToken", {
1524
948
  return issueWorkspaceToken;
1525
949
  }
1526
950
  });
1527
- Object.defineProperty(exports, "jsonResult", {
1528
- enumerable: true,
1529
- get: function () {
1530
- return jsonResult;
1531
- }
1532
- });
1533
951
  Object.defineProperty(exports, "jwtExpiryMs", {
1534
952
  enumerable: true,
1535
953
  get: function () {
1536
954
  return jwtExpiryMs;
1537
955
  }
1538
956
  });
1539
- Object.defineProperty(exports, "mcpPromptName", {
1540
- enumerable: true,
1541
- get: function () {
1542
- return mcpPromptName;
1543
- }
1544
- });
1545
- Object.defineProperty(exports, "mcpResourceUri", {
1546
- enumerable: true,
1547
- get: function () {
1548
- return mcpResourceUri;
1549
- }
1550
- });
1551
- Object.defineProperty(exports, "mcpToolName", {
1552
- enumerable: true,
1553
- get: function () {
1554
- return mcpToolName;
1555
- }
1556
- });
1557
957
  Object.defineProperty(exports, "pollDeviceTokenOnce", {
1558
958
  enumerable: true,
1559
959
  get: function () {
1560
960
  return pollDeviceTokenOnce;
1561
961
  }
1562
962
  });
1563
- Object.defineProperty(exports, "registerTool", {
1564
- enumerable: true,
1565
- get: function () {
1566
- return registerTool;
1567
- }
1568
- });
1569
- Object.defineProperty(exports, "scopeToolFilter", {
1570
- enumerable: true,
1571
- get: function () {
1572
- return scopeToolFilter;
1573
- }
1574
- });
1575
- Object.defineProperty(exports, "sortModules", {
1576
- enumerable: true,
1577
- get: function () {
1578
- return sortModules;
1579
- }
1580
- });
1581
963
  Object.defineProperty(exports, "startDeviceCodeFlow", {
1582
964
  enumerable: true,
1583
965
  get: function () {
1584
966
  return startDeviceCodeFlow;
1585
967
  }
1586
968
  });
1587
- Object.defineProperty(exports, "textResult", {
1588
- enumerable: true,
1589
- get: function () {
1590
- return textResult;
1591
- }
1592
- });
1593
- Object.defineProperty(exports, "toServerCapabilities", {
1594
- enumerable: true,
1595
- get: function () {
1596
- return toServerCapabilities;
1597
- }
1598
- });
1599
- Object.defineProperty(exports, "toolArgsSha256", {
1600
- enumerable: true,
1601
- get: function () {
1602
- return toolArgsSha256;
1603
- }
1604
- });
1605
- Object.defineProperty(exports, "unionCapabilities", {
1606
- enumerable: true,
1607
- get: function () {
1608
- return unionCapabilities;
1609
- }
1610
- });
1611
- Object.defineProperty(exports, "withToolAnnotations", {
1612
- enumerable: true,
1613
- get: function () {
1614
- return withToolAnnotations;
1615
- }
1616
- });
1617
- Object.defineProperty(exports, "wrapServerWithToolGovernance", {
1618
- enumerable: true,
1619
- get: function () {
1620
- return wrapServerWithToolGovernance;
1621
- }
1622
- });
1623
- //# sourceMappingURL=core-BKgeqlnN.cjs.map
969
+ //# sourceMappingURL=context-DE1SuHyv.cjs.map