diff --git a/packages/cli/.gitignore b/packages/cli/.gitignore index 8d5a2ff4..f3db4b86 100644 --- a/packages/cli/.gitignore +++ b/packages/cli/.gitignore @@ -1,4 +1,5 @@ .vscode .internals launch.json -oclif.manifest.json \ No newline at end of file +oclif.manifest.json +profiling/ \ No newline at end of file diff --git a/packages/cli/.npmignore b/packages/cli/.npmignore new file mode 100644 index 00000000..2698efa5 --- /dev/null +++ b/packages/cli/.npmignore @@ -0,0 +1,56 @@ +# Source code +src/ +tests/ +*.ts +*.tsx +tsconfig*.json +rollup.config.js + +# Build tools and dependencies +node_modules/ +.pnpm-lock.yaml +package-lock.json +yarn.lock + +# Development files +.env* +.vscode/ +.idea/ +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# OS generated files +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db + +# Development configs +knip.json +typedoc.json +.eslintrc* +.prettierrc* + +# Distribution files (we only want the built ones) +dist/types/ +dist/**/*.map + +# Source maps (optional - remove if you want to include them) +*.map + +# Build artifacts we don't need +profiling/ + +# Only include what's necessary: +# - dist/*.cjs files (bundled CLI) +# - dist/commands/*.cjs (bundled commands) +# - dist/hooks/*.cjs (bundled hooks) +# - oclif.manifest.json +# - theme.json +# - README.md +# - CHANGELOG.md \ No newline at end of file diff --git a/packages/cli/package.json b/packages/cli/package.json index 28bfa21d..c6f6c0f9 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@smythos/cli", - "version": "0.2.20", + "version": "0.2.21", "description": "SmythOS SRE Command Line Interface", "keywords": [ "smythos", @@ -13,14 +13,14 @@ ], "author": "Alaa-eddine KADDOURI", "license": "MIT", - "main": "dist/index.js", + "main": "dist/index.cjs", "types": "dist/types/index.d.ts", "bin": { - "sre": "dist/index.js" + "sre": "dist/index.cjs" }, "exports": { ".": { - "import": "./dist/index.js", + "import": "./dist/index.cjs", "types": "./dist/types/index.d.ts" } }, @@ -47,7 +47,7 @@ "scripts": { "build:types": "tsc --emitDeclarationOnly --declaration --outDir dist/types -p tsconfig.dts.json", "build:bundle": "cross-env BUILD=dev rollup -c", - "build": "pnpm run build:bundle && pnpm run oclif:manifest && pnpm run build:types", + "build": "pnpm run build:bundle && pnpm run oclif:manifest", "dev": "rollup -c -w", "lint": "echo 'Lint script not implemented'", "test": "echo 'Test script not implemented'", @@ -62,9 +62,8 @@ "commands": "./dist/commands", "topicSeparator": " ", "theme": "theme.json", - "helpClass": "./dist/help", "hooks": { - "preparse": "./dist/hooks/preparse.js" + "preparse": "./dist/hooks/preparse.cjs" }, "topics": { "agent": { @@ -79,7 +78,10 @@ } }, "dependencies": { - "@modelcontextprotocol/sdk": "^1.12.1", + + }, + "devDependencies": { + "@modelcontextprotocol/sdk": "^1.14.0", "@oclif/core": "^4.3.3", "@smythos/sdk": "workspace:*", "@smythos/sre": "workspace:*", @@ -91,9 +93,7 @@ "inquirer": "^9.2.15", "log-update": "^6.1.0", "ora": "^8.2.0", - "update-notifier": "^7.0.0" - }, - "devDependencies": { + "update-notifier": "^7.0.0", "@oclif/plugin-help": "^6.2.21", "@oclif/test": "^3.1.9", "@rollup/plugin-commonjs": "^28.0.3", diff --git a/packages/cli/rollup.config.js b/packages/cli/rollup.config.js index 27b45b66..41ef6553 100644 --- a/packages/cli/rollup.config.js +++ b/packages/cli/rollup.config.js @@ -7,6 +7,7 @@ import { typescriptPaths } from 'rollup-plugin-typescript-paths'; import commonjs from '@rollup/plugin-commonjs'; import resolve from '@rollup/plugin-node-resolve'; +import fs from 'fs'; const isProduction = process.env.BUILD === 'prod'; @@ -52,54 +53,38 @@ const config = { ], }; -const devConfig = { - input: './src/index.ts', +const isCJS = true; +// Zero-dependency standalone bundle configuration (No optimizations) +const zeroDepConfig = { + input: { + index: 'src/index.ts', + 'commands/agent': 'src/commands/agent/agent.index.ts', + 'commands/create': 'src/commands/create/create.index.ts', + 'commands/update': 'src/commands/update.ts', + 'hooks/preparse': 'src/hooks/preparse.ts', + }, output: { - file: './dist/cli.cjs', // CommonJS output - format: 'cjs', // Specify the CommonJS format - sourcemap: true, - inlineDynamicImports: true, // Inline all dynamic imports into one file + dir: 'dist', + format: isCJS ? 'cjs' : 'es', + sourcemap: false, // Enable sourcemaps for debugging banner: '#!/usr/bin/env node', + entryFileNames: isCJS ? '[name].cjs' : '[name].js', + chunkFileNames: isCJS ? 'chunks/[name].cjs' : 'chunks/[name].js', // Use predictable chunk names + inlineDynamicImports: false, // Keep separate files + exports: 'auto', // Handle mixed exports + // manualChunks: (id) => { + // if (id.includes('node_modules')) { + // return 'vendor'; + // } + // }, }, - plugins: [ - resolve({ - browser: false, // Explicitly disable browser field resolution - preferBuiltins: true, // Prefer Node.js built-in modules - mainFields: ['main', 'module'], // Prioritize 'main' field for Node.js packages - extensions: ['.js', '.ts', '.json'], // Resolve these extensions - exportConditions: ['node'], // Use Node.js export conditions - }), - commonjs({ - // Handle mixed ES modules and CommonJS - transformMixedEsModules: true, - // Ignore browser-specific globals - ignore: ['electron'], - }), - json(), - - typescriptPaths({ - tsconfig: './tsconfig.json', - preserveExtensions: true, - nonRelative: false, - }), - esbuild({ - sourceMap: true, - minify: false, - treeShaking: false, - target: 'node18', - platform: 'node', // Explicitly set platform to node - define: { - // Define Node.js environment - 'process.env.NODE_ENV': '"development"', - global: 'globalThis', - }, - }), - sourcemaps(), - ], + // Only keep essential Node.js built-ins external external: [ - // Keep Node.js built-ins external 'fs', + 'fs/promises', 'path', + 'path/posix', + 'path/win32', 'os', 'util', 'crypto', @@ -128,10 +113,53 @@ const devConfig = { 'worker_threads', 'perf_hooks', 'async_hooks', + 'inspector', + 'v8', + 'constants', + 'assert', + 'process', + ], + plugins: [ + deleteFolder('dist'), + colorfulLogs('CLI Zero-Dep Builder'), + resolve({ + browser: false, + preferBuiltins: true, + mainFields: ['module', 'main'], + extensions: ['.js', '.ts', '.json'], + exportConditions: isCJS ? ['node'] : ['node', 'import'], + }), + commonjs({ + transformMixedEsModules: true, + ignore: ['electron'], + requireReturnsDefault: 'auto', + ignoreDynamicRequires: isCJS, // Handle dynamic requires properly + dynamicRequireTargets: ['node_modules/**/*.js'], + }), + json(), + typescriptPaths({ + tsconfig: './tsconfig.json', + preserveExtensions: true, + nonRelative: false, + }), + esbuild({ + sourceMap: false, + minify: true, // No minification + treeShaking: true, // No tree-shaking + target: 'node18', + platform: 'node', + format: isCJS ? undefined : 'esm', + define: { + 'process.env.NODE_ENV': '"development"', + global: 'globalThis', + }, + keepNames: true, // Keep all names + }), + // No terser plugin - no compression at all ], }; -export default config; +export default zeroDepConfig; //#region [Custom Plugins] ===================================================== @@ -151,6 +179,12 @@ const colors = { bgBlue: '\x1b[44m', }; +function deleteFolder(folderPath) { + if (fs.existsSync(folderPath)) { + fs.rmSync(folderPath, { recursive: true }); + } +} + // Custom colorful logging plugin function colorfulLogs(title = 'CLI Builder') { function formatBytes(bytes, decimals = 2) { @@ -214,8 +248,8 @@ function colorfulLogs(title = 'CLI Builder') { return null; }, transform(code, id) { + processedFiles++; if (!id.includes('node_modules')) { - processedFiles++; const relativePath = path.relative(process.cwd(), id); currentFile = relativePath; } diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts index 239aab59..8a406fa6 100644 --- a/packages/cli/src/index.ts +++ b/packages/cli/src/index.ts @@ -2,6 +2,9 @@ * SRE CLI Entry Point * Oclif CLI runner with better error handling */ +import { suppressWarnings } from './warnings-override'; + +suppressWarnings(); import { run } from '@oclif/core'; import chalk from 'chalk'; diff --git a/packages/cli/src/warnings-override.ts b/packages/cli/src/warnings-override.ts new file mode 100644 index 00000000..1813c9b9 --- /dev/null +++ b/packages/cli/src/warnings-override.ts @@ -0,0 +1,53 @@ +// Suppress runtime warnings +process.env.NODE_NO_WARNINGS = '1'; +process.env.OCLIF_SKIP_TYPESCRIPT = '1'; +process.env.OCLIF_COMPILATION = 'false'; + +// Override console methods to suppress warnings +const originalConsoleWarn = console.warn; +const originalConsoleError = console.error; +const originalConsoleLog = console.log; + +export function suppressWarnings() { + console.warn = (...args: any[]) => { + const message = args.join(' '); + if (message.includes('Could not find typescript') || message.includes('punycode') || message.includes('DEP0040')) { + return; + } + originalConsoleWarn.apply(console, args); + }; + + console.error = (...args: any[]) => { + const message = args.join(' '); + if (message.includes('Could not find typescript') || message.includes('punycode') || message.includes('DEP0040')) { + return; + } + originalConsoleError.apply(console, args); + }; + + console.log = (...args: any[]) => { + const message = args.join(' '); + if (message.includes('Could not find typescript') || message.includes('punycode') || message.includes('DEP0040')) { + return; + } + originalConsoleLog.apply(console, args); + }; + + // Override stdout.write to suppress TypeScript warnings + const originalStdoutWrite = process.stdout.write; + process.stdout.write = function (chunk: any, encoding?: any, callback?: any): boolean { + if (typeof chunk === 'string' && chunk.includes('Could not find typescript')) { + return true; + } + return originalStdoutWrite.call(this, chunk, encoding, callback); + }; + + // Override stderr.write to suppress punycode warnings + const originalStderrWrite = process.stderr.write; + process.stderr.write = function (chunk: any, encoding?: any, callback?: any): boolean { + if (typeof chunk === 'string' && (chunk.includes('punycode') || chunk.includes('DEP0040'))) { + return true; + } + return originalStderrWrite.call(this, chunk, encoding, callback); + }; +} diff --git a/packages/core/package.json b/packages/core/package.json index eb4bd716..b7f6ac09 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@smythos/sre", - "version": "1.5.24", + "version": "1.5.25", "description": "Smyth Runtime Environment", "author": "Alaa-eddine KADDOURI", "license": "MIT", @@ -30,7 +30,9 @@ }, "devDependencies": { "@istanbuljs/nyc-config-typescript": "^1.0.2", + "@rollup/plugin-commonjs": "^28.0.3", "@rollup/plugin-json": "^6.1.0", + "@rollup/plugin-node-resolve": "^15.3.1", "@rollup/pluginutils": "^5.1.0", "@types/express": "^4.17.23", "@types/lodash": "^4.17.10", diff --git a/packages/core/rollup.config.js b/packages/core/rollup.config.js index 45c7053d..fa6961b5 100644 --- a/packages/core/rollup.config.js +++ b/packages/core/rollup.config.js @@ -1,5 +1,7 @@ import json from '@rollup/plugin-json'; import { createFilter } from '@rollup/pluginutils'; +import nodeResolve from '@rollup/plugin-node-resolve'; +import commonjs from '@rollup/plugin-commonjs'; import path from 'path'; import esbuild from 'rollup-plugin-esbuild'; import sourcemaps from 'rollup-plugin-sourcemaps'; @@ -21,6 +23,13 @@ const isExternal = (id, ...overArgs) => { return _isExternal; }; +// Function for zero-deps build - only mark Node.js built-ins as external +const isExternalBuiltinsOnly = (id) => { + const builtins = ['fs', 'path', 'crypto', 'os', 'stream', 'events', 'child_process', 'querystring', 'process', 'fs/promises', 'readline-sync']; + const problematicPackages = ['pkce-challenge']; // Packages that cause bundling issues + return builtins.includes(id) || id.startsWith('node:') || problematicPackages.includes(id); +}; + const config = { input: 'src/index.ts', output: { @@ -46,7 +55,52 @@ const config = { minifySyntax: true, minifyIdentifiers: false, treeShaking: true, - sourcesContent: true, + sourcesContent: false, + }), + + // typescript({ + // tsconfig: 'tsconfig.json', + // clean: true, + // }), + //terser(), + ], +}; + +// Zero dependencies config - bundles all dependencies into the output +const zeroDepConfig = { + input: 'src/index.ts', + output: { + file: 'dist/index.js', + format: 'es', + sourcemap: true, + inlineDynamicImports: true, // Inline dynamic imports to create a single bundle + }, + external: isExternalBuiltinsOnly, // Only mark Node.js built-ins as external + plugins: [ + colorfulLogs('SmythOS Runtime Builder (Zero Deps)'), // Add our custom logging plugin + //SDKGenPlugin(), + ctixPlugin(), // Add ctix plugin as first plugin + nodeResolve({ + preferBuiltins: true, + browser: false, + exportConditions: ['node'], + skip: ['pkce-challenge'], // Skip problematic packages + }), + commonjs(), + json(), + typescriptPaths({ + tsconfig: './tsconfig.json', // Ensure this points to your tsconfig file + preserveExtensions: true, + nonRelative: false, + }), + sourcemaps(), + esbuild({ + sourceMap: true, + minifyWhitespace: true, + minifySyntax: true, + minifyIdentifiers: false, + treeShaking: true, + sourcesContent: false, }), // typescript({ diff --git a/packages/core/src/Components/ServerlessCode.class.ts b/packages/core/src/Components/ServerlessCode.class.ts index 7bb8973d..d2772475 100644 --- a/packages/core/src/Components/ServerlessCode.class.ts +++ b/packages/core/src/Components/ServerlessCode.class.ts @@ -2,6 +2,8 @@ import { IAgent as Agent } from '@sre/types/Agent.types'; import { Component } from './Component.class'; import Joi from 'joi'; import { ConnectorService } from '@sre/Core/ConnectorsService'; +import { AWSCredentials, AWSRegionConfig } from '@sre/types/AWS.types'; +import { calculateExecutionCost, getLambdaCredentials, reportUsage } from '@sre/helpers/AWSLambdaCode.helper'; export class ServerlessCode extends Component { @@ -56,9 +58,18 @@ export class ServerlessCode extends Component { } logger.debug(`\nInput Variables: \n${JSON.stringify(codeInputs, null, 2)}\n`); - + let codeConnector = ConnectorService.getCodeConnector(); + let codeCredentials: AWSCredentials & AWSRegionConfig & { isUserProvidedKeys: boolean } = + await getLambdaCredentials(agent, config); + if (codeCredentials.isUserProvidedKeys) { + codeConnector = codeConnector.instance({ + region: codeCredentials.region, + accessKeyId: codeCredentials.accessKeyId, + secretAccessKey: codeCredentials.secretAccessKey, + }) + } // Deploy lambda function if it doesn't exist or the code hash is different await codeConnector.agent(agent.id) .deploy(config.id, { @@ -78,6 +89,13 @@ export class ServerlessCode extends Component { ); logger.debug(`Execution time: ${executionTime}ms\n`); + const cost = calculateExecutionCost(executionTime); + if (!codeCredentials.isUserProvidedKeys) { + const accountConnector = ConnectorService.getAccountConnector(); + const agentTeam = await accountConnector.getCandidateTeam(agent.id); + reportUsage({ cost, agentId: agent.id, teamId: agentTeam }); + } + if (executionResponse.success) { Output = executionResponse.output; } else { diff --git a/packages/core/src/helpers/AWSLambdaCode.helper.ts b/packages/core/src/helpers/AWSLambdaCode.helper.ts index 85bf7dcd..178bdfb6 100644 --- a/packages/core/src/helpers/AWSLambdaCode.helper.ts +++ b/packages/core/src/helpers/AWSLambdaCode.helper.ts @@ -5,9 +5,13 @@ import zl from 'zip-lib'; import { InvokeCommand, Runtime, LambdaClient, UpdateFunctionCodeCommand, CreateFunctionCommand, GetFunctionCommand, GetFunctionCommandOutput, InvokeCommandOutput } from '@aws-sdk/client-lambda'; import { GetRoleCommand, CreateRoleCommand, IAMClient, GetRoleCommandOutput, CreateRoleCommandOutput } from '@aws-sdk/client-iam'; import fs from 'fs'; -import { AWSCredentials, AWSRegionConfig } from '@sre/types/AWS.types'; +import { AWSConfig, AWSCredentials, AWSRegionConfig } from '@sre/types/AWS.types'; +import { VaultHelper } from '@sre/Security/Vault.service/Vault.helper'; +import { IAgent } from '@sre/types/Agent.types'; +import { SystemEvents } from '@sre/Core/SystemEvents'; export const cachePrefix = 'serverless_code'; export const cacheTTL = 60 * 60 * 24 * 16; // 16 days +const PER_SECOND_COST = 0.0001; export function getLambdaFunctionName(agentId: string, componentId: string) { return `${agentId}-${componentId}`; @@ -340,8 +344,45 @@ export async function getDeployedFunction(functionName: string, awsConfigs: AWSC } } +export async function getLambdaCredentials(agent: IAgent, config: any): Promise { + let awsAccessKeyId = null; + let awsSecretAccessKey = null; + let awsRegion = null; + let userProvidedKeys = false; + if (config.data.accessKeyId && config.data.secretAccessKey && config.data.region && config.data.use_own_keys) { + userProvidedKeys = true; + [awsAccessKeyId, awsSecretAccessKey] = await Promise.all([ + VaultHelper.getTeamKey(extractKeyFromTemplateVar(config.data.accessKeyId), agent?.teamId), + VaultHelper.getTeamKey(extractKeyFromTemplateVar(config.data.secretAccessKey), agent?.teamId), + ]); + awsRegion = config.data.region; + } + const awsCredentials = { + accessKeyId: awsAccessKeyId, + secretAccessKey: awsSecretAccessKey, + region: awsRegion, + isUserProvidedKeys: userProvidedKeys, + }; + return awsCredentials; +} + +export function calculateExecutionCost(executionTime: number) { + // executionTime in milliseconds + const cost = (executionTime / 1000) * Number(PER_SECOND_COST); + return cost; +} + export function extractKeyFromTemplateVar(input: string) { const regex = /\{\{KEY\((.*?)\)\}\}/; const match = input.match(regex); return match ? match[1] : input; +} + +export function reportUsage({ cost, agentId, teamId }: { cost: number; agentId: string; teamId: string }) { + SystemEvents.emit('USAGE:API', { + sourceId: 'api:serverless_code.smyth', + cost, + agentId, + teamId, + }); } \ No newline at end of file diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json index 53eaaf88..5c224d26 100644 --- a/packages/core/tsconfig.json +++ b/packages/core/tsconfig.json @@ -22,6 +22,8 @@ "@sre/Core/*": ["Core/*"], + "pkce-challenge": ["./node_modules/pkce-challenge/dist/index.node.cjs"], + "@sre/sdk": ["sdk/sdk.index.ts"], "@sre/sdk/*": ["sdk/*"], diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 126f3cc6..7bc6ee65 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -53,47 +53,13 @@ importers: version: 5.8.3 packages/cli: - dependencies: + devDependencies: '@modelcontextprotocol/sdk': - specifier: ^1.12.1 - version: 1.12.1 + specifier: ^1.14.0 + version: 1.14.0 '@oclif/core': specifier: ^4.3.3 version: 4.3.3 - '@smythos/sdk': - specifier: workspace:* - version: link:../sdk - '@smythos/sre': - specifier: workspace:* - version: link:../core - boxen: - specifier: ^7.1.1 - version: 7.1.1 - chalk: - specifier: ^5.3.0 - version: 5.4.1 - dotenv: - specifier: ^16.5.0 - version: 16.5.0 - express: - specifier: ^4.21.2 - version: 4.21.2 - extract-zip: - specifier: ^2.0.1 - version: 2.0.1 - inquirer: - specifier: ^9.2.15 - version: 9.3.7 - log-update: - specifier: ^6.1.0 - version: 6.1.0 - ora: - specifier: ^8.2.0 - version: 8.2.0 - update-notifier: - specifier: ^7.0.0 - version: 7.3.1 - devDependencies: '@oclif/plugin-help': specifier: ^6.2.21 version: 6.2.29 @@ -112,6 +78,12 @@ importers: '@rollup/pluginutils': specifier: ^5.1.0 version: 5.1.4(rollup@4.42.0) + '@smythos/sdk': + specifier: workspace:* + version: link:../sdk + '@smythos/sre': + specifier: workspace:* + version: link:../core '@types/extract-zip': specifier: ^2.0.3 version: 2.0.3 @@ -124,21 +96,45 @@ importers: '@types/update-notifier': specifier: ^6.0.8 version: 6.0.8 + boxen: + specifier: ^7.1.1 + version: 7.1.1 + chalk: + specifier: ^5.3.0 + version: 5.4.1 cross-env: specifier: ^7.0.3 version: 7.0.3 + dotenv: + specifier: ^16.5.0 + version: 16.5.0 esbuild: specifier: ^0.25.0 version: 0.25.5 + express: + specifier: ^4.21.2 + version: 4.21.2 + extract-zip: + specifier: ^2.0.1 + version: 2.0.1 glob: specifier: ^11.0.3 version: 11.0.3 + inquirer: + specifier: ^9.2.15 + version: 9.3.7 knip: specifier: ^5.61.1 version: 5.61.1(@types/node@20.19.0)(typescript@5.8.3) + log-update: + specifier: ^6.1.0 + version: 6.1.0 oclif: specifier: ^4.19.0 version: 4.19.0(@types/node@20.19.0) + ora: + specifier: ^8.2.0 + version: 8.2.0 rollup-plugin-esbuild: specifier: ^6.1.1 version: 6.2.1(esbuild@0.25.5)(rollup@4.42.0) @@ -160,6 +156,9 @@ importers: typescript: specifier: ^5.4.5 version: 5.8.3 + update-notifier: + specifier: ^7.0.0 + version: 7.3.1 packages/core: dependencies: @@ -302,9 +301,15 @@ importers: '@istanbuljs/nyc-config-typescript': specifier: ^1.0.2 version: 1.0.2(nyc@17.1.0) + '@rollup/plugin-commonjs': + specifier: ^28.0.3 + version: 28.0.3(rollup@4.42.0) '@rollup/plugin-json': specifier: ^6.1.0 version: 6.1.0(rollup@4.42.0) + '@rollup/plugin-node-resolve': + specifier: ^15.3.1 + version: 15.3.1(rollup@4.42.0) '@rollup/pluginutils': specifier: ^5.1.0 version: 5.1.4(rollup@4.42.0) @@ -1198,6 +1203,10 @@ packages: resolution: {integrity: sha512-P5FZsXU0kY881F6Hbk9GhsYx02/KgWK1DYf7/tyE/1lcFKhDYPQR9iYjhQXJn+Sg6hQleMo3DB7h7+p4wgp2Lw==} engines: {node: '>=18'} + '@modelcontextprotocol/sdk@1.14.0': + resolution: {integrity: sha512-f43SYQVRPGQcYDQMiL7T2qND4v9xCkBpunIVPhNT/K2vUe+R3kYw2FyOIlbPxZJIYnhBNjeaHFeKv/cOZZErNg==} + engines: {node: '>=18'} + '@napi-rs/canvas-android-arm64@0.1.71': resolution: {integrity: sha512-cxi3VCotIOS9kNFQI7dcysbVJi106pxryVY1Hi85pX+ZeqahRyeqc/NsLaZ998Ae99+F3HI5X/39G1Y/Byrf0A==} engines: {node: '>= 10'} @@ -2794,6 +2803,10 @@ packages: resolution: {integrity: sha512-6RxOBZ/cYgd8usLwsEl+EC09Au/9BcmCKYF2/xbml6DNczf7nv0MQb+7BA2F+li6//I+28VNlQR37XfQtcAJuA==} engines: {node: '>=18.0.0'} + eventsource-parser@3.0.3: + resolution: {integrity: sha512-nVpZkTMM9rF6AQ9gPJpFsNAMt48wIzB5TQgiTLdHiuO8XEDhUgZEhqKlZWXbIzo9VmJ/HvysHqEaVeD5v9TPvA==} + engines: {node: '>=20.0.0'} + eventsource@3.0.7: resolution: {integrity: sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==} engines: {node: '>=18.0.0'} @@ -6817,6 +6830,23 @@ snapshots: transitivePeerDependencies: - supports-color + '@modelcontextprotocol/sdk@1.14.0': + dependencies: + ajv: 6.12.6 + content-type: 1.0.5 + cors: 2.8.5 + cross-spawn: 7.0.6 + eventsource: 3.0.7 + eventsource-parser: 3.0.3 + express: 5.1.0 + express-rate-limit: 7.5.0(express@5.1.0) + pkce-challenge: 5.0.0 + raw-body: 3.0.0 + zod: 3.25.56 + zod-to-json-schema: 3.24.5(zod@3.25.56) + transitivePeerDependencies: + - supports-color + '@napi-rs/canvas-android-arm64@0.1.71': optional: true @@ -7784,7 +7814,7 @@ snapshots: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 1.0.2 ast-v8-to-istanbul: 0.3.3 - debug: 4.4.1 + debug: 4.4.1(supports-color@8.1.1) istanbul-lib-coverage: 3.2.2 istanbul-lib-report: 3.0.1 istanbul-lib-source-maps: 5.0.6 @@ -8414,10 +8444,6 @@ snapshots: dependencies: ms: 2.0.0 - debug@4.4.1: - dependencies: - ms: 2.1.3 - debug@4.4.1(supports-color@8.1.1): dependencies: ms: 2.1.3 @@ -8646,6 +8672,8 @@ snapshots: eventsource-parser@3.0.2: {} + eventsource-parser@3.0.3: {} + eventsource@3.0.7: dependencies: eventsource-parser: 3.0.2 @@ -9396,7 +9424,7 @@ snapshots: istanbul-lib-source-maps@5.0.6: dependencies: '@jridgewell/trace-mapping': 0.3.25 - debug: 4.4.1 + debug: 4.4.1(supports-color@8.1.1) istanbul-lib-coverage: 3.2.2 transitivePeerDependencies: - supports-color @@ -11017,7 +11045,7 @@ snapshots: vite-node@3.2.3(@types/node@22.15.31)(jiti@2.4.2)(terser@5.41.0)(tsx@4.19.4)(yaml@2.8.0): dependencies: cac: 6.7.14 - debug: 4.4.1 + debug: 4.4.1(supports-color@8.1.1) es-module-lexer: 1.7.0 pathe: 2.0.3 vite: 6.3.5(@types/node@22.15.31)(jiti@2.4.2)(terser@5.41.0)(tsx@4.19.4)(yaml@2.8.0) @@ -11037,7 +11065,7 @@ snapshots: vite-tsconfig-paths@4.3.2(typescript@5.8.3)(vite@6.3.5(@types/node@22.15.31)(jiti@2.4.2)(terser@5.41.0)(tsx@4.19.4)(yaml@2.8.0)): dependencies: - debug: 4.4.1 + debug: 4.4.1(supports-color@8.1.1) globrex: 0.1.2 tsconfck: 3.1.6(typescript@5.8.3) optionalDependencies: @@ -11073,7 +11101,7 @@ snapshots: '@vitest/spy': 3.2.3 '@vitest/utils': 3.2.3 chai: 5.2.0 - debug: 4.4.1 + debug: 4.4.1(supports-color@8.1.1) expect-type: 1.2.1 magic-string: 0.30.17 pathe: 2.0.3