@transcend-io/mcp-server-admin 0.3.7 → 0.3.10

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/cli.mjs CHANGED
@@ -1,14 +1,15 @@
1
1
  #!/usr/bin/env node
2
- import { n as getAdminTools, t as AdminMixin } from "./graphql-BraOKkHm.mjs";
2
+ import { n as getAdminTools, t as AdminMixin } from "./graphql-BVMDAAxF.mjs";
3
3
  import { TranscendRestClient, createMCPServer } from "@transcend-io/mcp-server-base";
4
4
  //#region src/cli.ts
5
5
  createMCPServer({
6
6
  name: "transcend-mcp-admin",
7
7
  version: "1.0.0",
8
8
  getTools: getAdminTools,
9
- createClients: (auth, sombraUrl, graphqlUrl) => ({
9
+ createClients: ({ auth, sombraUrl, graphqlUrl, dashboardUrl }) => ({
10
10
  rest: new TranscendRestClient(auth, sombraUrl),
11
- graphql: new AdminMixin(auth, graphqlUrl)
11
+ graphql: new AdminMixin(auth, graphqlUrl),
12
+ dashboardUrl
12
13
  })
13
14
  });
14
15
  //#endregion
package/dist/cli.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.mjs","names":[],"sources":["../src/cli.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { createMCPServer, TranscendRestClient } from '@transcend-io/mcp-server-base';\n\nimport { AdminMixin } from './graphql.js';\nimport { getAdminTools } from './tools/index.js';\n\ncreateMCPServer({\n name: 'transcend-mcp-admin',\n version: '1.0.0',\n getTools: getAdminTools,\n createClients: (auth, sombraUrl, graphqlUrl) => ({\n rest: new TranscendRestClient(auth, sombraUrl),\n graphql: new AdminMixin(auth, graphqlUrl),\n }),\n});\n"],"mappings":";;;;AAMA,gBAAgB;CACd,MAAM;CACN,SAAS;CACT,UAAU;CACV,gBAAgB,MAAM,WAAW,gBAAgB;EAC/C,MAAM,IAAI,oBAAoB,MAAM,UAAU;EAC9C,SAAS,IAAI,WAAW,MAAM,WAAW;EAC1C;CACF,CAAC"}
1
+ {"version":3,"file":"cli.mjs","names":[],"sources":["../src/cli.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { createMCPServer, TranscendRestClient } from '@transcend-io/mcp-server-base';\n\nimport { AdminMixin } from './graphql.js';\nimport { getAdminTools } from './tools/index.js';\n\ncreateMCPServer({\n name: 'transcend-mcp-admin',\n version: '1.0.0',\n getTools: getAdminTools,\n createClients: ({ auth, sombraUrl, graphqlUrl, dashboardUrl }) => ({\n rest: new TranscendRestClient(auth, sombraUrl),\n graphql: new AdminMixin(auth, graphqlUrl),\n dashboardUrl,\n }),\n});\n"],"mappings":";;;;AAMA,gBAAgB;CACd,MAAM;CACN,SAAS;CACT,UAAU;CACV,gBAAgB,EAAE,MAAM,WAAW,YAAY,oBAAoB;EACjE,MAAM,IAAI,oBAAoB,MAAM,UAAU;EAC9C,SAAS,IAAI,WAAW,MAAM,WAAW;EACzC;EACD;CACF,CAAC"}
@@ -355,19 +355,26 @@ var AdminMixin = class extends TranscendGraphQLBase {
355
355
  };
356
356
  }
357
357
  async createApiKey(input) {
358
- return (await this.makeRequest(`
358
+ const { apiKey: token, ...apiKey } = (await this.makeRequest(`
359
359
  mutation CreateApiKey($input: ApiKeyInput!) {
360
360
  createApiKey(input: $input) {
361
361
  apiKey {
362
362
  id
363
363
  title
364
- scopes
364
+ apiKey
365
+ scopes {
366
+ id
367
+ name
368
+ }
365
369
  createdAt
366
370
  }
367
- token
368
371
  }
369
372
  }
370
- `, { input })).createApiKey;
373
+ `, { input })).createApiKey.apiKey;
374
+ return {
375
+ apiKey,
376
+ token
377
+ };
371
378
  }
372
379
  async getPrivacyCenter(lookup) {
373
380
  const query = `
@@ -396,4 +403,4 @@ var AdminMixin = class extends TranscendGraphQLBase {
396
403
  //#endregion
397
404
  export { ListApiKeysSchema as a, ListTeamsSchema as i, getAdminTools as n, CreateApiKeySchema as o, ListUsersSchema as r, AdminMixin as t };
398
405
 
399
- //# sourceMappingURL=graphql-BraOKkHm.mjs.map
406
+ //# sourceMappingURL=graphql-BVMDAAxF.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"graphql-BraOKkHm.mjs","names":[],"sources":["../src/tools/admin_create_api_key.ts","../src/tools/admin_get_current_user.ts","../src/tools/admin_get_organization.ts","../src/tools/admin_get_privacy_center.ts","../src/tools/admin_list_api_keys.ts","../src/tools/admin_list_teams.ts","../src/tools/admin_list_users.ts","../src/tools/admin_test_connection.ts","../src/tools/index.ts","../src/graphql.ts"],"sourcesContent":["import { createToolResult, defineTool, z, type ToolClients } from '@transcend-io/mcp-server-base';\nimport { ScopeName, TRANSCEND_SCOPES } from '@transcend-io/privacy-types';\n\nimport type { AdminMixin } from '../graphql.js';\n\nconst scopeSummary = Object.entries(TRANSCEND_SCOPES)\n .map(([name, def]) => {\n const deps = def.dependencies.length > 0 ? ` (requires: ${def.dependencies.join(', ')})` : '';\n return `- ${name}: ${def.title} — ${def.description}${deps}`;\n })\n .join('\\n');\n\nexport const CreateApiKeySchema = z.object({\n title: z.string().describe('Name/title for the API key'),\n scopes: z.array(z.nativeEnum(ScopeName)).describe('Array of permission scopes for the key'),\n data_silos: z\n .array(z.string())\n .optional()\n .describe('Array of data silo IDs to assign the key to (optional)'),\n});\nexport type CreateApiKeyInput = z.infer<typeof CreateApiKeySchema>;\n\nexport function createAdminCreateApiKeyTool(clients: ToolClients) {\n const graphql = clients.graphql as AdminMixin;\n return defineTool({\n name: 'admin_create_api_key',\n description:\n 'Create a new API key with specified scopes. WARNING: The token is only shown once! ' +\n 'Scopes control what the key can access. Some scopes inherit dependencies — ' +\n 'for example, manageDataMap requires viewDataMap. ' +\n 'Use \"readOnly\" for view-only access to all resources, or \"fullAdmin\" for unrestricted access. ' +\n 'Common scopes: manageApiKeys, manageDataMap, manageConsentManager, makeDataSubjectRequest, ' +\n 'connectDataSilos, manageAssessments, manageDataInventory.\\n\\n' +\n 'Available scopes:\\n' +\n scopeSummary,\n category: 'Admin',\n readOnly: false,\n confirmationHint: 'Creates a new API key with the specified scopes',\n annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false },\n zodSchema: CreateApiKeySchema,\n handler: async ({ title, scopes, data_silos }) => {\n const result = await graphql.createApiKey({\n title,\n scopes,\n dataSilos: data_silos,\n });\n return createToolResult(true, {\n apiKey: result.apiKey,\n token: result.token,\n warning: 'IMPORTANT: Save this token now! It will not be shown again.',\n message: `API key \"${title}\" created successfully`,\n });\n },\n });\n}\n","import {\n createToolResult,\n defineTool,\n EmptySchema,\n type ToolClients,\n} from '@transcend-io/mcp-server-base';\n\nimport type { AdminMixin } from '../graphql.js';\n\nexport function createAdminGetCurrentUserTool(clients: ToolClients) {\n const graphql = clients.graphql as AdminMixin;\n return defineTool({\n name: 'admin_get_current_user',\n description: 'Get information about the currently authenticated user (the API key owner)',\n category: 'Admin',\n readOnly: true,\n annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },\n zodSchema: EmptySchema,\n handler: async (_args) => {\n const result = await graphql.getCurrentUser();\n return createToolResult(true, result);\n },\n });\n}\n","import {\n createToolResult,\n defineTool,\n EmptySchema,\n type ToolClients,\n} from '@transcend-io/mcp-server-base';\n\nimport type { AdminMixin } from '../graphql.js';\n\nexport function createAdminGetOrganizationTool(clients: ToolClients) {\n const graphql = clients.graphql as AdminMixin;\n return defineTool({\n name: 'admin_get_organization',\n description: 'Get information about your Transcend organization',\n category: 'Admin',\n readOnly: true,\n annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },\n zodSchema: EmptySchema,\n handler: async (_args) => {\n const result = await graphql.getOrganization();\n return createToolResult(true, result);\n },\n });\n}\n","import {\n createToolResult,\n defineTool,\n EmptySchema,\n type ToolClients,\n} from '@transcend-io/mcp-server-base';\n\nimport type { AdminMixin } from '../graphql.js';\n\nexport function createAdminGetPrivacyCenterTool(clients: ToolClients) {\n const graphql = clients.graphql as AdminMixin;\n return defineTool({\n name: 'admin_get_privacy_center',\n description: 'Get privacy center configuration for your organization',\n category: 'Admin',\n readOnly: true,\n annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },\n zodSchema: EmptySchema,\n handler: async (_args) => {\n const result = await graphql.getPrivacyCenter();\n if (!result) {\n return createToolResult(true, {\n found: false,\n message: 'No privacy center configured for this organization',\n });\n }\n return createToolResult(true, { found: true, privacyCenter: result });\n },\n });\n}\n","import { createListResult, defineTool, z, type ToolClients } from '@transcend-io/mcp-server-base';\n\nimport type { AdminMixin } from '../graphql.js';\n\nexport const ListApiKeysSchema = z.object({\n limit: z.coerce\n .number()\n .min(1)\n .max(100)\n .optional()\n .default(50)\n .describe('Results per page (1-100, default: 50)'),\n cursor: z\n .string()\n .optional()\n .describe('Pagination cursor from previous response (where supported)'),\n offset: z.coerce\n .number()\n .min(0)\n .optional()\n .default(0)\n .describe('Number of results to skip (default: 0)'),\n});\nexport type ListApiKeysInput = z.infer<typeof ListApiKeysSchema>;\n\nexport function createAdminListApiKeysTool(clients: ToolClients) {\n const graphql = clients.graphql as AdminMixin;\n return defineTool({\n name: 'admin_list_api_keys',\n description:\n 'List all API keys configured for your organization (tokens are not shown). Note: API does not support cursor pagination (max ~100 results).',\n category: 'Admin',\n readOnly: true,\n annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },\n zodSchema: ListApiKeysSchema,\n handler: async ({ limit, offset }) => {\n const result = await graphql.listApiKeys({\n first: limit,\n offset,\n });\n return createListResult(result.nodes, {\n totalCount: result.totalCount,\n hasNextPage: result.pageInfo?.hasNextPage,\n });\n },\n });\n}\n","import { createListResult, defineTool, z, type ToolClients } from '@transcend-io/mcp-server-base';\n\nimport type { AdminMixin } from '../graphql.js';\n\nexport const ListTeamsSchema = z.object({\n limit: z.coerce\n .number()\n .min(1)\n .max(100)\n .optional()\n .default(50)\n .describe('Results per page (1-100, default: 50)'),\n cursor: z\n .string()\n .optional()\n .describe('Pagination cursor from previous response (where supported)'),\n});\nexport type ListTeamsInput = z.infer<typeof ListTeamsSchema>;\n\nexport function createAdminListTeamsTool(clients: ToolClients) {\n const graphql = clients.graphql as AdminMixin;\n return defineTool({\n name: 'admin_list_teams',\n description:\n 'List all teams in your Transcend organization. Note: API does not support cursor pagination (max ~100 results).',\n category: 'Admin',\n readOnly: true,\n annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },\n zodSchema: ListTeamsSchema,\n handler: async ({ limit, cursor }) => {\n const result = await graphql.listTeams({\n first: limit,\n after: cursor,\n });\n return createListResult(result.nodes, {\n totalCount: result.totalCount,\n hasNextPage: result.pageInfo?.hasNextPage,\n });\n },\n });\n}\n","import { createListResult, defineTool, z, type ToolClients } from '@transcend-io/mcp-server-base';\n\nimport type { AdminMixin } from '../graphql.js';\n\nexport const ListUsersSchema = z.object({\n limit: z.coerce\n .number()\n .min(1)\n .max(100)\n .optional()\n .default(50)\n .describe('Results per page (1-100, default: 50)'),\n cursor: z\n .string()\n .optional()\n .describe('Pagination cursor from previous response (where supported)'),\n});\nexport type ListUsersInput = z.infer<typeof ListUsersSchema>;\n\nexport function createAdminListUsersTool(clients: ToolClients) {\n const graphql = clients.graphql as AdminMixin;\n return defineTool({\n name: 'admin_list_users',\n description:\n 'List all users in your Transcend organization. Note: API does not support cursor pagination (max ~100 results).',\n category: 'Admin',\n readOnly: true,\n annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },\n zodSchema: ListUsersSchema,\n handler: async ({ limit, cursor }) => {\n const result = await graphql.listUsers({\n first: limit,\n after: cursor,\n });\n return createListResult(result.nodes, {\n totalCount: result.totalCount,\n hasNextPage: result.pageInfo?.hasNextPage,\n });\n },\n });\n}\n","import {\n createToolResult,\n defineTool,\n EmptySchema,\n type ToolClients,\n} from '@transcend-io/mcp-server-base';\n\nimport type { AdminMixin } from '../graphql.js';\n\nexport function createAdminTestConnectionTool(clients: ToolClients) {\n const { rest } = clients;\n const graphql = clients.graphql as AdminMixin;\n return defineTool({\n name: 'admin_test_connection',\n description: 'Test connectivity to both Transcend REST and GraphQL APIs',\n category: 'Admin',\n readOnly: true,\n annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },\n zodSchema: EmptySchema,\n handler: async (_args) => {\n const [graphqlConnected, restConnected] = await Promise.all([\n graphql.testConnection(),\n rest.testConnection(),\n ]);\n const allConnected = graphqlConnected && restConnected;\n return createToolResult(true, {\n connected: allConnected,\n details: {\n graphql: { connected: graphqlConnected, url: graphql.getBaseUrl() },\n rest: { connected: restConnected, url: rest.getBaseUrl() },\n },\n message: allConnected\n ? 'Successfully connected to all Transcend APIs'\n : 'Some API connections failed - check details',\n timestamp: new Date().toISOString(),\n });\n },\n });\n}\n","import type { ToolDefinition, ToolClients } from '@transcend-io/mcp-server-base';\n\nimport { createAdminCreateApiKeyTool } from './admin_create_api_key.js';\nimport { createAdminGetCurrentUserTool } from './admin_get_current_user.js';\nimport { createAdminGetOrganizationTool } from './admin_get_organization.js';\nimport { createAdminGetPrivacyCenterTool } from './admin_get_privacy_center.js';\nimport { createAdminListApiKeysTool } from './admin_list_api_keys.js';\nimport { createAdminListTeamsTool } from './admin_list_teams.js';\nimport { createAdminListUsersTool } from './admin_list_users.js';\nimport { createAdminTestConnectionTool } from './admin_test_connection.js';\n\nexport function getAdminTools(clients: ToolClients): ToolDefinition[] {\n return [\n createAdminGetOrganizationTool(clients),\n createAdminGetCurrentUserTool(clients),\n createAdminListUsersTool(clients),\n createAdminListTeamsTool(clients),\n createAdminListApiKeysTool(clients),\n createAdminCreateApiKeyTool(clients),\n createAdminGetPrivacyCenterTool(clients),\n createAdminTestConnectionTool(clients),\n ];\n}\n","import {\n TranscendGraphQLBase,\n type ApiKey,\n type ApiKeyCreateInput,\n type ListOptions,\n type Organization,\n type PaginatedResponse,\n type PrivacyCenter,\n type Team,\n type User,\n} from '@transcend-io/mcp-server-base';\n\nexport class AdminMixin extends TranscendGraphQLBase {\n async getOrganization(): Promise<Organization> {\n const query = `\n query {\n organization {\n id\n name\n createdAt\n }\n }\n `;\n const data = await this.makeRequest<{ organization: Organization }>(query);\n return data.organization;\n }\n\n async getCurrentUser(): Promise<User> {\n const query = `\n query {\n user {\n id\n email\n name\n createdAt\n }\n }\n `;\n const data = await this.makeRequest<{ user: User }>(query);\n return data.user;\n }\n\n async listUsers(\n options?: ListOptions & { filterBy?: { text?: string } },\n ): Promise<PaginatedResponse<User>> {\n const query = `\n query ListUsers($first: Int, $filterBy: UserFiltersInput) {\n users(first: $first, filterBy: $filterBy) {\n nodes {\n id\n email\n name\n }\n totalCount\n }\n }\n `;\n const data = await this.makeRequest<{ users: { nodes: User[]; totalCount: number } }>(query, {\n first: Math.min(options?.first || 50, 100),\n ...(options?.filterBy ? { filterBy: options.filterBy } : {}),\n });\n return {\n nodes: data.users.nodes,\n pageInfo: {\n hasNextPage: data.users.nodes.length < data.users.totalCount,\n hasPreviousPage: false,\n },\n totalCount: data.users.totalCount,\n };\n }\n\n async listTeams(options?: ListOptions): Promise<PaginatedResponse<Team>> {\n const query = `\n query ListTeams($first: Int) {\n teams(first: $first) {\n nodes {\n id\n name\n }\n totalCount\n }\n }\n `;\n const data = await this.makeRequest<{ teams: { nodes: Team[]; totalCount: number } }>(query, {\n first: Math.min(options?.first || 50, 100),\n });\n return {\n nodes: data.teams.nodes,\n pageInfo: {\n hasNextPage: data.teams.nodes.length < data.teams.totalCount,\n hasPreviousPage: false,\n },\n totalCount: data.teams.totalCount,\n };\n }\n\n async listApiKeys(options?: ListOptions): Promise<PaginatedResponse<ApiKey>> {\n const query = `\n query ListApiKeys($first: Int, $offset: Int) {\n apiKeys(first: $first, offset: $offset) {\n nodes {\n id\n title\n scopes {\n id\n name\n }\n lastUsedAt\n createdAt\n }\n totalCount\n }\n }\n `;\n const data = await this.makeRequest<{ apiKeys: { nodes: ApiKey[]; totalCount: number } }>(\n query,\n {\n first: Math.min(options?.first || 50, 100),\n offset: options?.offset || 0,\n },\n );\n return {\n nodes: data.apiKeys.nodes,\n pageInfo: {\n hasNextPage: data.apiKeys.nodes.length < data.apiKeys.totalCount,\n hasPreviousPage: false,\n },\n totalCount: data.apiKeys.totalCount,\n };\n }\n\n async createApiKey(input: ApiKeyCreateInput): Promise<{ apiKey: ApiKey; token: string }> {\n const mutation = `\n mutation CreateApiKey($input: ApiKeyInput!) {\n createApiKey(input: $input) {\n apiKey {\n id\n title\n scopes\n createdAt\n }\n token\n }\n }\n `;\n const data = await this.makeRequest<{ createApiKey: { apiKey: ApiKey; token: string } }>(\n mutation,\n { input },\n );\n return data.createApiKey;\n }\n\n async getPrivacyCenter(lookup?: { url?: string }): Promise<PrivacyCenter | null> {\n const query = `\n query GetPrivacyCenter($lookup: PrivacyCenterLookupInput) {\n privacyCenter(lookup: $lookup) {\n id\n }\n }\n `;\n try {\n const data = await this.makeRequest<{ privacyCenter: { id: string } | null }>(query, {\n lookup: lookup || undefined,\n });\n if (data.privacyCenter) {\n return {\n id: data.privacyCenter.id,\n name: 'Privacy Center',\n url: lookup?.url || '',\n isActive: true,\n createdAt: new Date().toISOString(),\n updatedAt: new Date().toISOString(),\n };\n }\n return null;\n } catch {\n return null;\n }\n }\n}\n"],"mappings":";;;AAKA,MAAM,eAAe,OAAO,QAAQ,iBAAiB,CAClD,KAAK,CAAC,MAAM,SAAS;CACpB,MAAM,OAAO,IAAI,aAAa,SAAS,IAAI,eAAe,IAAI,aAAa,KAAK,KAAK,CAAC,KAAK;AAC3F,QAAO,KAAK,KAAK,IAAI,IAAI,MAAM,KAAK,IAAI,cAAc;EACtD,CACD,KAAK,KAAK;AAEb,MAAa,qBAAqB,EAAE,OAAO;CACzC,OAAO,EAAE,QAAQ,CAAC,SAAS,6BAA6B;CACxD,QAAQ,EAAE,MAAM,EAAE,WAAW,UAAU,CAAC,CAAC,SAAS,yCAAyC;CAC3F,YAAY,EACT,MAAM,EAAE,QAAQ,CAAC,CACjB,UAAU,CACV,SAAS,yDAAyD;CACtE,CAAC;AAGF,SAAgB,4BAA4B,SAAsB;CAChE,MAAM,UAAU,QAAQ;AACxB,QAAO,WAAW;EAChB,MAAM;EACN,aACE,ieAOA;EACF,UAAU;EACV,UAAU;EACV,kBA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KAAK,YAjBV;;;;;;;;;;;;;;;;OAmBZ;GACE,OAAO,KAAK,IAAI,SAAS,SAAS,IAAI,IAAI;GAC1C,QAAQ,SAAS,UAAU;GAC5B,CACF;AACD,SAAO;GACL,OAAO,KAAK,QAAQ;GACpB,UAAU;IACR,aAAa,KAAK,QAAQ,MAAM,SAAS,KAAK,QAAQ;IACtD,iBAAiB;IAClB;GACD,YAAY,KAAK,QAAQ;GAC1B;;CAGH,MAAM,aAAa,OAAsE;AAkBvF,UAJa,MAAM,KAAK,YAbP;;;;;;;;;;;;OAef,EAAE,OAAO,CACV,EACW;;CAGd,MAAM,iBAAiB,QAA0D;EAC/E,MAAM,QAAQ;;;;;;;AAOd,MAAI;GACF,MAAM,OAAO,MAAM,KAAK,YAAsD,OAAO,EACnF,QAAQ,UAAU,KAAA,GACnB,CAAC;AACF,OAAI,KAAK,cACP,QAAO;IACL,IAAI,KAAK,cAAc;IACvB,MAAM;IACN,KAAK,QAAQ,OAAO;IACpB,UAAU;IACV,4BAAW,IAAI,MAAM,EAAC,aAAa;IACnC,4BAAW,IAAI,MAAM,EAAC,aAAa;IACpC;AAEH,UAAO;UACD;AACN,UAAO"}
1
+ {"version":3,"file":"graphql-BVMDAAxF.mjs","names":[],"sources":["../src/tools/admin_create_api_key.ts","../src/tools/admin_get_current_user.ts","../src/tools/admin_get_organization.ts","../src/tools/admin_get_privacy_center.ts","../src/tools/admin_list_api_keys.ts","../src/tools/admin_list_teams.ts","../src/tools/admin_list_users.ts","../src/tools/admin_test_connection.ts","../src/tools/index.ts","../src/graphql.ts"],"sourcesContent":["import { createToolResult, defineTool, z, type ToolClients } from '@transcend-io/mcp-server-base';\nimport { ScopeName, TRANSCEND_SCOPES } from '@transcend-io/privacy-types';\n\nimport type { AdminMixin } from '../graphql.js';\n\nconst scopeSummary = Object.entries(TRANSCEND_SCOPES)\n .map(([name, def]) => {\n const deps = def.dependencies.length > 0 ? ` (requires: ${def.dependencies.join(', ')})` : '';\n return `- ${name}: ${def.title} — ${def.description}${deps}`;\n })\n .join('\\n');\n\nexport const CreateApiKeySchema = z.object({\n title: z.string().describe('Name/title for the API key'),\n scopes: z.array(z.nativeEnum(ScopeName)).describe('Array of permission scopes for the key'),\n data_silos: z\n .array(z.string())\n .optional()\n .describe('Array of data silo IDs to assign the key to (optional)'),\n});\nexport type CreateApiKeyInput = z.infer<typeof CreateApiKeySchema>;\n\nexport function createAdminCreateApiKeyTool(clients: ToolClients) {\n const graphql = clients.graphql as AdminMixin;\n return defineTool({\n name: 'admin_create_api_key',\n description:\n 'Create a new API key with specified scopes. WARNING: The token is only shown once! ' +\n 'Scopes control what the key can access. Some scopes inherit dependencies — ' +\n 'for example, manageDataMap requires viewDataMap. ' +\n 'Use \"readOnly\" for view-only access to all resources, or \"fullAdmin\" for unrestricted access. ' +\n 'Common scopes: manageApiKeys, manageDataMap, manageConsentManager, makeDataSubjectRequest, ' +\n 'connectDataSilos, manageAssessments, manageDataInventory.\\n\\n' +\n 'Available scopes:\\n' +\n scopeSummary,\n category: 'Admin',\n readOnly: false,\n confirmationHint: 'Creates a new API key with the specified scopes',\n annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false },\n zodSchema: CreateApiKeySchema,\n handler: async ({ title, scopes, data_silos }) => {\n const result = await graphql.createApiKey({\n title,\n scopes,\n dataSilos: data_silos,\n });\n return createToolResult(true, {\n apiKey: result.apiKey,\n token: result.token,\n warning: 'IMPORTANT: Save this token now! It will not be shown again.',\n message: `API key \"${title}\" created successfully`,\n });\n },\n });\n}\n","import {\n createToolResult,\n defineTool,\n EmptySchema,\n type ToolClients,\n} from '@transcend-io/mcp-server-base';\n\nimport type { AdminMixin } from '../graphql.js';\n\nexport function createAdminGetCurrentUserTool(clients: ToolClients) {\n const graphql = clients.graphql as AdminMixin;\n return defineTool({\n name: 'admin_get_current_user',\n description: 'Get information about the currently authenticated user (the API key owner)',\n category: 'Admin',\n readOnly: true,\n annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },\n zodSchema: EmptySchema,\n handler: async (_args) => {\n const result = await graphql.getCurrentUser();\n return createToolResult(true, result);\n },\n });\n}\n","import {\n createToolResult,\n defineTool,\n EmptySchema,\n type ToolClients,\n} from '@transcend-io/mcp-server-base';\n\nimport type { AdminMixin } from '../graphql.js';\n\nexport function createAdminGetOrganizationTool(clients: ToolClients) {\n const graphql = clients.graphql as AdminMixin;\n return defineTool({\n name: 'admin_get_organization',\n description: 'Get information about your Transcend organization',\n category: 'Admin',\n readOnly: true,\n annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },\n zodSchema: EmptySchema,\n handler: async (_args) => {\n const result = await graphql.getOrganization();\n return createToolResult(true, result);\n },\n });\n}\n","import {\n createToolResult,\n defineTool,\n EmptySchema,\n type ToolClients,\n} from '@transcend-io/mcp-server-base';\n\nimport type { AdminMixin } from '../graphql.js';\n\nexport function createAdminGetPrivacyCenterTool(clients: ToolClients) {\n const graphql = clients.graphql as AdminMixin;\n return defineTool({\n name: 'admin_get_privacy_center',\n description: 'Get privacy center configuration for your organization',\n category: 'Admin',\n readOnly: true,\n annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },\n zodSchema: EmptySchema,\n handler: async (_args) => {\n const result = await graphql.getPrivacyCenter();\n if (!result) {\n return createToolResult(true, {\n found: false,\n message: 'No privacy center configured for this organization',\n });\n }\n return createToolResult(true, { found: true, privacyCenter: result });\n },\n });\n}\n","import { createListResult, defineTool, z, type ToolClients } from '@transcend-io/mcp-server-base';\n\nimport type { AdminMixin } from '../graphql.js';\n\nexport const ListApiKeysSchema = z.object({\n limit: z.coerce\n .number()\n .min(1)\n .max(100)\n .optional()\n .default(50)\n .describe('Results per page (1-100, default: 50)'),\n cursor: z\n .string()\n .optional()\n .describe('Pagination cursor from previous response (where supported)'),\n offset: z.coerce\n .number()\n .min(0)\n .optional()\n .default(0)\n .describe('Number of results to skip (default: 0)'),\n});\nexport type ListApiKeysInput = z.infer<typeof ListApiKeysSchema>;\n\nexport function createAdminListApiKeysTool(clients: ToolClients) {\n const graphql = clients.graphql as AdminMixin;\n return defineTool({\n name: 'admin_list_api_keys',\n description:\n 'List all API keys configured for your organization (tokens are not shown). Note: API does not support cursor pagination (max ~100 results).',\n category: 'Admin',\n readOnly: true,\n annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },\n zodSchema: ListApiKeysSchema,\n handler: async ({ limit, offset }) => {\n const result = await graphql.listApiKeys({\n first: limit,\n offset,\n });\n return createListResult(result.nodes, {\n totalCount: result.totalCount,\n hasNextPage: result.pageInfo?.hasNextPage,\n });\n },\n });\n}\n","import { createListResult, defineTool, z, type ToolClients } from '@transcend-io/mcp-server-base';\n\nimport type { AdminMixin } from '../graphql.js';\n\nexport const ListTeamsSchema = z.object({\n limit: z.coerce\n .number()\n .min(1)\n .max(100)\n .optional()\n .default(50)\n .describe('Results per page (1-100, default: 50)'),\n cursor: z\n .string()\n .optional()\n .describe('Pagination cursor from previous response (where supported)'),\n});\nexport type ListTeamsInput = z.infer<typeof ListTeamsSchema>;\n\nexport function createAdminListTeamsTool(clients: ToolClients) {\n const graphql = clients.graphql as AdminMixin;\n return defineTool({\n name: 'admin_list_teams',\n description:\n 'List all teams in your Transcend organization. Note: API does not support cursor pagination (max ~100 results).',\n category: 'Admin',\n readOnly: true,\n annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },\n zodSchema: ListTeamsSchema,\n handler: async ({ limit, cursor }) => {\n const result = await graphql.listTeams({\n first: limit,\n after: cursor,\n });\n return createListResult(result.nodes, {\n totalCount: result.totalCount,\n hasNextPage: result.pageInfo?.hasNextPage,\n });\n },\n });\n}\n","import { createListResult, defineTool, z, type ToolClients } from '@transcend-io/mcp-server-base';\n\nimport type { AdminMixin } from '../graphql.js';\n\nexport const ListUsersSchema = z.object({\n limit: z.coerce\n .number()\n .min(1)\n .max(100)\n .optional()\n .default(50)\n .describe('Results per page (1-100, default: 50)'),\n cursor: z\n .string()\n .optional()\n .describe('Pagination cursor from previous response (where supported)'),\n});\nexport type ListUsersInput = z.infer<typeof ListUsersSchema>;\n\nexport function createAdminListUsersTool(clients: ToolClients) {\n const graphql = clients.graphql as AdminMixin;\n return defineTool({\n name: 'admin_list_users',\n description:\n 'List all users in your Transcend organization. Note: API does not support cursor pagination (max ~100 results).',\n category: 'Admin',\n readOnly: true,\n annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },\n zodSchema: ListUsersSchema,\n handler: async ({ limit, cursor }) => {\n const result = await graphql.listUsers({\n first: limit,\n after: cursor,\n });\n return createListResult(result.nodes, {\n totalCount: result.totalCount,\n hasNextPage: result.pageInfo?.hasNextPage,\n });\n },\n });\n}\n","import {\n createToolResult,\n defineTool,\n EmptySchema,\n type ToolClients,\n} from '@transcend-io/mcp-server-base';\n\nimport type { AdminMixin } from '../graphql.js';\n\nexport function createAdminTestConnectionTool(clients: ToolClients) {\n const { rest } = clients;\n const graphql = clients.graphql as AdminMixin;\n return defineTool({\n name: 'admin_test_connection',\n description: 'Test connectivity to both Transcend REST and GraphQL APIs',\n category: 'Admin',\n readOnly: true,\n annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },\n zodSchema: EmptySchema,\n handler: async (_args) => {\n const [graphqlConnected, restConnected] = await Promise.all([\n graphql.testConnection(),\n rest.testConnection(),\n ]);\n const allConnected = graphqlConnected && restConnected;\n return createToolResult(true, {\n connected: allConnected,\n details: {\n graphql: { connected: graphqlConnected, url: graphql.getBaseUrl() },\n rest: { connected: restConnected, url: rest.getBaseUrl() },\n },\n message: allConnected\n ? 'Successfully connected to all Transcend APIs'\n : 'Some API connections failed - check details',\n timestamp: new Date().toISOString(),\n });\n },\n });\n}\n","import type { ToolDefinition, ToolClients } from '@transcend-io/mcp-server-base';\n\nimport { createAdminCreateApiKeyTool } from './admin_create_api_key.js';\nimport { createAdminGetCurrentUserTool } from './admin_get_current_user.js';\nimport { createAdminGetOrganizationTool } from './admin_get_organization.js';\nimport { createAdminGetPrivacyCenterTool } from './admin_get_privacy_center.js';\nimport { createAdminListApiKeysTool } from './admin_list_api_keys.js';\nimport { createAdminListTeamsTool } from './admin_list_teams.js';\nimport { createAdminListUsersTool } from './admin_list_users.js';\nimport { createAdminTestConnectionTool } from './admin_test_connection.js';\n\nexport function getAdminTools(clients: ToolClients): ToolDefinition[] {\n return [\n createAdminGetOrganizationTool(clients),\n createAdminGetCurrentUserTool(clients),\n createAdminListUsersTool(clients),\n createAdminListTeamsTool(clients),\n createAdminListApiKeysTool(clients),\n createAdminCreateApiKeyTool(clients),\n createAdminGetPrivacyCenterTool(clients),\n createAdminTestConnectionTool(clients),\n ];\n}\n","import {\n TranscendGraphQLBase,\n type ApiKey,\n type ApiKeyCreateInput,\n type ListOptions,\n type Organization,\n type PaginatedResponse,\n type PrivacyCenter,\n type Team,\n type User,\n} from '@transcend-io/mcp-server-base';\n\nexport class AdminMixin extends TranscendGraphQLBase {\n async getOrganization(): Promise<Organization> {\n const query = `\n query {\n organization {\n id\n name\n createdAt\n }\n }\n `;\n const data = await this.makeRequest<{ organization: Organization }>(query);\n return data.organization;\n }\n\n async getCurrentUser(): Promise<User> {\n const query = `\n query {\n user {\n id\n email\n name\n createdAt\n }\n }\n `;\n const data = await this.makeRequest<{ user: User }>(query);\n return data.user;\n }\n\n async listUsers(\n options?: ListOptions & { filterBy?: { text?: string } },\n ): Promise<PaginatedResponse<User>> {\n const query = `\n query ListUsers($first: Int, $filterBy: UserFiltersInput) {\n users(first: $first, filterBy: $filterBy) {\n nodes {\n id\n email\n name\n }\n totalCount\n }\n }\n `;\n const data = await this.makeRequest<{ users: { nodes: User[]; totalCount: number } }>(query, {\n first: Math.min(options?.first || 50, 100),\n ...(options?.filterBy ? { filterBy: options.filterBy } : {}),\n });\n return {\n nodes: data.users.nodes,\n pageInfo: {\n hasNextPage: data.users.nodes.length < data.users.totalCount,\n hasPreviousPage: false,\n },\n totalCount: data.users.totalCount,\n };\n }\n\n async listTeams(options?: ListOptions): Promise<PaginatedResponse<Team>> {\n const query = `\n query ListTeams($first: Int) {\n teams(first: $first) {\n nodes {\n id\n name\n }\n totalCount\n }\n }\n `;\n const data = await this.makeRequest<{ teams: { nodes: Team[]; totalCount: number } }>(query, {\n first: Math.min(options?.first || 50, 100),\n });\n return {\n nodes: data.teams.nodes,\n pageInfo: {\n hasNextPage: data.teams.nodes.length < data.teams.totalCount,\n hasPreviousPage: false,\n },\n totalCount: data.teams.totalCount,\n };\n }\n\n async listApiKeys(options?: ListOptions): Promise<PaginatedResponse<ApiKey>> {\n const query = `\n query ListApiKeys($first: Int, $offset: Int) {\n apiKeys(first: $first, offset: $offset) {\n nodes {\n id\n title\n scopes {\n id\n name\n }\n lastUsedAt\n createdAt\n }\n totalCount\n }\n }\n `;\n const data = await this.makeRequest<{ apiKeys: { nodes: ApiKey[]; totalCount: number } }>(\n query,\n {\n first: Math.min(options?.first || 50, 100),\n offset: options?.offset || 0,\n },\n );\n return {\n nodes: data.apiKeys.nodes,\n pageInfo: {\n hasNextPage: data.apiKeys.nodes.length < data.apiKeys.totalCount,\n hasPreviousPage: false,\n },\n totalCount: data.apiKeys.totalCount,\n };\n }\n\n async createApiKey(input: ApiKeyCreateInput): Promise<{ apiKey: ApiKey; token: string }> {\n const mutation = `\n mutation CreateApiKey($input: ApiKeyInput!) {\n createApiKey(input: $input) {\n apiKey {\n id\n title\n apiKey\n scopes {\n id\n name\n }\n createdAt\n }\n }\n }\n `;\n const data = await this.makeRequest<{\n createApiKey: { apiKey: ApiKey & { apiKey: string } };\n }>(mutation, { input });\n const { apiKey: token, ...apiKey } = data.createApiKey.apiKey;\n return { apiKey, token };\n }\n\n async getPrivacyCenter(lookup?: { url?: string }): Promise<PrivacyCenter | null> {\n const query = `\n query GetPrivacyCenter($lookup: PrivacyCenterLookupInput) {\n privacyCenter(lookup: $lookup) {\n id\n }\n }\n `;\n try {\n const data = await this.makeRequest<{ privacyCenter: { id: string } | null }>(query, {\n lookup: lookup || undefined,\n });\n if (data.privacyCenter) {\n return {\n id: data.privacyCenter.id,\n name: 'Privacy Center',\n url: lookup?.url || '',\n isActive: true,\n createdAt: new Date().toISOString(),\n updatedAt: new Date().toISOString(),\n };\n }\n return null;\n } catch {\n return null;\n }\n }\n}\n"],"mappings":";;;AAKA,MAAM,eAAe,OAAO,QAAQ,iBAAiB,CAClD,KAAK,CAAC,MAAM,SAAS;CACpB,MAAM,OAAO,IAAI,aAAa,SAAS,IAAI,eAAe,IAAI,aAAa,KAAK,KAAK,CAAC,KAAK;AAC3F,QAAO,KAAK,KAAK,IAAI,IAAI,MAAM,KAAK,IAAI,cAAc;EACtD,CACD,KAAK,KAAK;AAEb,MAAa,qBAAqB,EAAE,OAAO;CACzC,OAAO,EAAE,QAAQ,CAAC,SAAS,6BAA6B;CACxD,QAAQ,EAAE,MAAM,EAAE,WAAW,UAAU,CAAC,CAAC,SAAS,yCAAyC;CAC3F,YAAY,EACT,MAAM,EAAE,QAAQ,CAAC,CACjB,UAAU,CACV,SAAS,yDAAyD;CACtE,CAAC;AAGF,SAAgB,4BAA4B,SAAsB;CAChE,MAAM,UAAU,QAAQ;AACxB,QAAO,WAAW;EAChB,MAAM;EACN,aACE,ieAOA;EACF,UAAU;EACV,UAAU;EACV,kBAAkB;EAClB,aAAa;GAAE,cAAc;GAAO,iBAAiB;GAAM,gBAAgB;GAAO;EAClF,WAAW;EACX,SAAS,OAAO,EAAE,OAAO,QAAQ,iBAAiB;GAChD,MAAM,SAAS,MAAM,QAAQ,aAAa;IACxC;IACA;IACA,WAAW;IACZ,CAAC;AACF,UAAO,iBAAiB,MAAM;IAC5B,QAAQ,OAAO;IACf,OAAO,OAAO;IACd,SAAS;IACT,SAAS,YAAY,MAAM;IAC5B,CAAC;;EAEL,CAAC;;;;AC5CJ,SAAgB,8BAA8B,SAAsB;CAClE,MAAM,UAAU,QAAQ;AACxB,QAAO,WAAW;EAChB,MAAM;EACN,aAAa;EACb,UAAU;EACV,UAAU;EACV,aAAa;GAAE,cAAc;GAAM,iBAAiB;GAAO,gBAAgB;G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AAM,QAAQ;;;;;;;AAOd,MAAI;GACF,MAAM,OAAO,MAAM,KAAK,YAAsD,OAAO,EACnF,QAAQ,UAAU,KAAA,GACnB,CAAC;AACF,OAAI,KAAK,cACP,QAAO;IACL,IAAI,KAAK,cAAc;IACvB,MAAM;IACN,KAAK,QAAQ,OAAO;IACpB,UAAU;IACV,4BAAW,IAAI,MAAM,EAAC,aAAa;IACnC,4BAAW,IAAI,MAAM,EAAC,aAAa;IACpC;AAEH,UAAO;UACD;AACN,UAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/tools/index.ts","../src/graphql.ts","../src/tools/admin_create_api_key.ts","../src/tools/admin_list_api_keys.ts","../src/tools/admin_list_teams.ts","../src/tools/admin_list_users.ts"],"mappings":";;;;iBAWgB,aAAA,CAAc,OAAA,EAAS,WAAA,GAAc,cAAA;;;cCCxC,UAAA,SAAmB,oBAAA;EACxB,eAAA,CAAA,GAAmB,OAAA,CAAQ,YAAA;EAc3B,cAAA,CAAA,GAAkB,OAAA,CAAQ,IAAA;EAe1B,SAAA,CACJ,OAAA,GAAU,WAAA;IAAgB,QAAA;MAAa,IAAA;IAAA;EAAA,IACtC,OAAA,CAAQ,iBAAA,CAAkB,IAAA;EA2BvB,SAAA,CAAU,OAAA,GAAU,WAAA,GAAc,OAAA,CAAQ,iBAAA,CAAkB,IAAA;EAyB5D,WAAA,CAAY,OAAA,GAAU,WAAA,GAAc,OAAA,CAAQ,iBAAA,CAAkB,MAAA;EAmC9D,YAAA,CAAa,KAAA,EAAO,iBAAA,GAAoB,OAAA;IAAU,MAAA,EAAQ,MAAA;IAAQ,KAAA;EAAA;EAqBlE,gBAAA,CAAiB,MAAA;IAAW,GAAA;EAAA,IAAiB,OAAA,CAAQ,aAAA;AAAA;;;cC5IhD,kBAAA,EAAkB,CAAA,CAAA,SAAA;;;;;KAQnB,iBAAA,GAAoB,CAAA,CAAE,KAAA,QAAa,kBAAA;;;cChBlC,iBAAA,EAAiB,CAAA,CAAA,SAAA;;;;;KAmBlB,gBAAA,GAAmB,CAAA,CAAE,KAAA,QAAa,iBAAA;;;cCnBjC,eAAA,EAAe,CAAA,CAAA,SAAA;;;;KAahB,cAAA,GAAiB,CAAA,CAAE,KAAA,QAAa,eAAA;;;cCb/B,eAAA,EAAe,CAAA,CAAA,SAAA;;;;KAahB,cAAA,GAAiB,CAAA,CAAE,KAAA,QAAa,eAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/tools/index.ts","../src/graphql.ts","../src/tools/admin_create_api_key.ts","../src/tools/admin_list_api_keys.ts","../src/tools/admin_list_teams.ts","../src/tools/admin_list_users.ts"],"mappings":";;;;iBAWgB,aAAA,CAAc,OAAA,EAAS,WAAA,GAAc,cAAA;;;cCCxC,UAAA,SAAmB,oBAAA;EACxB,eAAA,CAAA,GAAmB,OAAA,CAAQ,YAAA;EAc3B,cAAA,CAAA,GAAkB,OAAA,CAAQ,IAAA;EAe1B,SAAA,CACJ,OAAA,GAAU,WAAA;IAAgB,QAAA;MAAa,IAAA;IAAA;EAAA,IACtC,OAAA,CAAQ,iBAAA,CAAkB,IAAA;EA2BvB,SAAA,CAAU,OAAA,GAAU,WAAA,GAAc,OAAA,CAAQ,iBAAA,CAAkB,IAAA;EAyB5D,WAAA,CAAY,OAAA,GAAU,WAAA,GAAc,OAAA,CAAQ,iBAAA,CAAkB,MAAA;EAmC9D,YAAA,CAAa,KAAA,EAAO,iBAAA,GAAoB,OAAA;IAAU,MAAA,EAAQ,MAAA;IAAQ,KAAA;EAAA;EAwBlE,gBAAA,CAAiB,MAAA;IAAW,GAAA;EAAA,IAAiB,OAAA,CAAQ,aAAA;AAAA;;;cC/IhD,kBAAA,EAAkB,CAAA,CAAA,SAAA;;;;;KAQnB,iBAAA,GAAoB,CAAA,CAAE,KAAA,QAAa,kBAAA;;;cChBlC,iBAAA,EAAiB,CAAA,CAAA,SAAA;;;;;KAmBlB,gBAAA,GAAmB,CAAA,CAAE,KAAA,QAAa,iBAAA;;;cCnBjC,eAAA,EAAe,CAAA,CAAA,SAAA;;;;KAahB,cAAA,GAAiB,CAAA,CAAE,KAAA,QAAa,eAAA;;;cCb/B,eAAA,EAAe,CAAA,CAAA,SAAA;;;;KAahB,cAAA,GAAiB,CAAA,CAAE,KAAA,QAAa,eAAA"}
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { a as ListApiKeysSchema, i as ListTeamsSchema, n as getAdminTools, o as CreateApiKeySchema, r as ListUsersSchema, t as AdminMixin } from "./graphql-BraOKkHm.mjs";
1
+ import { a as ListApiKeysSchema, i as ListTeamsSchema, n as getAdminTools, o as CreateApiKeySchema, r as ListUsersSchema, t as AdminMixin } from "./graphql-BVMDAAxF.mjs";
2
2
  export { AdminMixin, CreateApiKeySchema, ListApiKeysSchema, ListTeamsSchema, ListUsersSchema, getAdminTools };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transcend-io/mcp-server-admin",
3
- "version": "0.3.7",
3
+ "version": "0.3.10",
4
4
  "description": "Transcend MCP Server — Admin tools.",
5
5
  "homepage": "https://github.com/transcend-io/tools/tree/main/packages/mcp/mcp-server-admin",
6
6
  "license": "Apache-2.0",
@@ -32,15 +32,15 @@
32
32
  "dependencies": {
33
33
  "@modelcontextprotocol/sdk": "^1.29.0",
34
34
  "zod": "^4.3.6",
35
- "@transcend-io/mcp-server-base": "0.4.3",
36
- "@transcend-io/privacy-types": "5.1.6"
35
+ "@transcend-io/mcp-server-base": "0.4.5",
36
+ "@transcend-io/privacy-types": "5.1.8"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@arethetypeswrong/cli": "^0.18.2",
40
40
  "@types/node": "^22.19.15",
41
41
  "publint": "^0.3.18",
42
42
  "tsdown": "^0.21.2",
43
- "typescript": "^5.9.3",
43
+ "typescript": "^6.0.0",
44
44
  "vitest": "^4.0.18"
45
45
  },
46
46
  "engines": {