@enactprotocol/mcp-server 1.2.1 → 1.2.3
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/index.js +34 -41
- package/dist/index.js.bak +34 -41
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -35969,7 +35969,7 @@ var require_high_level_opt = __commonJS((exports, module) => {
|
|
|
35969
35969
|
]).reduce((set2, kv) => (set2[kv[0]] = kv[1], set2), Object.create(null)) : {};
|
|
35970
35970
|
});
|
|
35971
35971
|
|
|
35972
|
-
// ../../node_modules/
|
|
35972
|
+
// ../../node_modules/minipass/index.js
|
|
35973
35973
|
var require_minipass = __commonJS((exports) => {
|
|
35974
35974
|
var proc = typeof process === "object" && process ? process : {
|
|
35975
35975
|
stdout: null,
|
|
@@ -223121,8 +223121,16 @@ var ResourceContentsSchema = exports_external.object({
|
|
|
223121
223121
|
var TextResourceContentsSchema = ResourceContentsSchema.extend({
|
|
223122
223122
|
text: exports_external.string()
|
|
223123
223123
|
});
|
|
223124
|
+
var Base64Schema = exports_external.string().refine((val) => {
|
|
223125
|
+
try {
|
|
223126
|
+
atob(val);
|
|
223127
|
+
return true;
|
|
223128
|
+
} catch (_a) {
|
|
223129
|
+
return false;
|
|
223130
|
+
}
|
|
223131
|
+
}, { message: "Invalid Base64 string" });
|
|
223124
223132
|
var BlobResourceContentsSchema = ResourceContentsSchema.extend({
|
|
223125
|
-
blob:
|
|
223133
|
+
blob: Base64Schema
|
|
223126
223134
|
});
|
|
223127
223135
|
var ResourceSchema = BaseMetadataSchema.extend({
|
|
223128
223136
|
uri: exports_external.string(),
|
|
@@ -223208,13 +223216,13 @@ var TextContentSchema = exports_external.object({
|
|
|
223208
223216
|
}).passthrough();
|
|
223209
223217
|
var ImageContentSchema = exports_external.object({
|
|
223210
223218
|
type: exports_external.literal("image"),
|
|
223211
|
-
data:
|
|
223219
|
+
data: Base64Schema,
|
|
223212
223220
|
mimeType: exports_external.string(),
|
|
223213
223221
|
_meta: exports_external.optional(exports_external.object({}).passthrough())
|
|
223214
223222
|
}).passthrough();
|
|
223215
223223
|
var AudioContentSchema = exports_external.object({
|
|
223216
223224
|
type: exports_external.literal("audio"),
|
|
223217
|
-
data:
|
|
223225
|
+
data: Base64Schema,
|
|
223218
223226
|
mimeType: exports_external.string(),
|
|
223219
223227
|
_meta: exports_external.optional(exports_external.object({}).passthrough())
|
|
223220
223228
|
}).passthrough();
|
|
@@ -225965,7 +225973,7 @@ class StdioServerTransport {
|
|
|
225965
225973
|
}
|
|
225966
225974
|
}
|
|
225967
225975
|
|
|
225968
|
-
//
|
|
225976
|
+
// ../shared/dist/api/enact-api.js
|
|
225969
225977
|
class EnactApiClient {
|
|
225970
225978
|
constructor(baseUrl = "https://enact.tools", supabaseUrl = "https://xjnhhxwxovjifdxdwzih.supabase.co") {
|
|
225971
225979
|
this.baseUrl = baseUrl.replace(/\/$/, "");
|
|
@@ -226263,7 +226271,7 @@ class EnactApiError extends Error {
|
|
|
226263
226271
|
}
|
|
226264
226272
|
}
|
|
226265
226273
|
|
|
226266
|
-
//
|
|
226274
|
+
// ../shared/dist/exec/validate.js
|
|
226267
226275
|
function validateAgainstSchema(value, schema, fieldName) {
|
|
226268
226276
|
const { type, format, enum: enumValues, minimum, maximum, pattern, required } = schema;
|
|
226269
226277
|
if (type) {
|
|
@@ -226389,14 +226397,14 @@ function validateInputs(tool, inputs) {
|
|
|
226389
226397
|
return validatedInputs;
|
|
226390
226398
|
}
|
|
226391
226399
|
|
|
226392
|
-
//
|
|
226400
|
+
// ../shared/dist/core/DirectExecutionProvider.js
|
|
226393
226401
|
import { spawn } from "child_process";
|
|
226394
226402
|
|
|
226395
|
-
//
|
|
226403
|
+
// ../shared/dist/types.js
|
|
226396
226404
|
class ExecutionProvider {
|
|
226397
226405
|
}
|
|
226398
226406
|
|
|
226399
|
-
//
|
|
226407
|
+
// ../shared/dist/exec/logger.js
|
|
226400
226408
|
var import_pino = __toESM(require_pino(), 1);
|
|
226401
226409
|
var isSilentMode = () => process.env.CI === "true" || false || process.env.ENACT_SILENT === "true" || process.env.ENACT_SKIP_INTERACTIVE === "true";
|
|
226402
226410
|
var logger = import_pino.default({
|
|
@@ -226444,7 +226452,7 @@ var wrappedLogger = {
|
|
|
226444
226452
|
};
|
|
226445
226453
|
var logger_default = wrappedLogger;
|
|
226446
226454
|
|
|
226447
|
-
//
|
|
226455
|
+
// ../shared/dist/utils/timeout.js
|
|
226448
226456
|
function parseTimeout(timeout) {
|
|
226449
226457
|
const match = timeout.match(/^(\d+)([smh])$/);
|
|
226450
226458
|
if (!match) {
|
|
@@ -226464,7 +226472,7 @@ function parseTimeout(timeout) {
|
|
|
226464
226472
|
}
|
|
226465
226473
|
}
|
|
226466
226474
|
|
|
226467
|
-
//
|
|
226475
|
+
// ../shared/dist/core/DirectExecutionProvider.js
|
|
226468
226476
|
class DirectExecutionProvider extends ExecutionProvider {
|
|
226469
226477
|
async resolveEnvironmentVariables(envConfig, namespace) {
|
|
226470
226478
|
const resolved = {};
|
|
@@ -235037,7 +235045,7 @@ var import_typescript = __toESM(require_typescript(), 1);
|
|
|
235037
235045
|
var __filename2 = fileURLToPath3(import.meta.url);
|
|
235038
235046
|
var __dirname2 = path5.dirname(__filename2);
|
|
235039
235047
|
var moduleSrcDirectory = `${__dirname2}/../../src/`;
|
|
235040
|
-
//
|
|
235048
|
+
// ../shared/dist/core/DaggerExecutionProvider.js
|
|
235041
235049
|
import fs3 from "fs/promises";
|
|
235042
235050
|
import path6 from "path";
|
|
235043
235051
|
import crypto3 from "crypto";
|
|
@@ -235832,7 +235840,7 @@ class DaggerExecutionProvider extends ExecutionProvider {
|
|
|
235832
235840
|
}
|
|
235833
235841
|
}
|
|
235834
235842
|
|
|
235835
|
-
//
|
|
235843
|
+
// ../shared/dist/utils/env-loader.js
|
|
235836
235844
|
var import_dotenv = __toESM(require_main(), 1);
|
|
235837
235845
|
import { join as join2 } from "path";
|
|
235838
235846
|
import { homedir as homedir2 } from "os";
|
|
@@ -235994,7 +236002,7 @@ function generateConfigLink(missingVars, toolName) {
|
|
|
235994
236002
|
return `${webUrl}/?vars=${encodedVars}&package=${encodedPackage}`;
|
|
235995
236003
|
}
|
|
235996
236004
|
|
|
235997
|
-
//
|
|
236005
|
+
// ../shared/dist/core/EnactCore.js
|
|
235998
236006
|
var import_yaml = __toESM(require_dist3(), 1);
|
|
235999
236007
|
|
|
236000
236008
|
// ../../node_modules/@enactprotocol/security/dist/index.js
|
|
@@ -238709,7 +238717,7 @@ class SigningService {
|
|
|
238709
238717
|
}
|
|
238710
238718
|
}
|
|
238711
238719
|
|
|
238712
|
-
//
|
|
238720
|
+
// ../shared/dist/core/EnactCore.js
|
|
238713
238721
|
class EnactCore {
|
|
238714
238722
|
constructor(options = {}) {
|
|
238715
238723
|
this.options = {
|
|
@@ -238908,7 +238916,6 @@ class EnactCore {
|
|
|
238908
238916
|
}
|
|
238909
238917
|
}
|
|
238910
238918
|
async verifyTool(tool, dangerouslySkipVerification = false) {
|
|
238911
|
-
console.log("=== VERIFY TOOL CALLED ===", tool.name, "skipVerification:", dangerouslySkipVerification);
|
|
238912
238919
|
if (dangerouslySkipVerification) {
|
|
238913
238920
|
logger_default.warn(`Skipping signature verification for tool: ${tool.name}`);
|
|
238914
238921
|
return;
|
|
@@ -238917,9 +238924,6 @@ class EnactCore {
|
|
|
238917
238924
|
if (!tool.signatures || tool.signatures.length === 0) {
|
|
238918
238925
|
throw new Error(`Tool ${tool.name} does not have any signatures`);
|
|
238919
238926
|
}
|
|
238920
|
-
console.log("=== TOOL SIGNATURE DATA ===");
|
|
238921
|
-
console.log("Tool signatures from database:", JSON.stringify(tool.signatures, null, 2));
|
|
238922
|
-
console.log("Tool command:", tool.command);
|
|
238923
238927
|
const documentForVerification = {
|
|
238924
238928
|
command: tool.command
|
|
238925
238929
|
};
|
|
@@ -238930,20 +238934,9 @@ class EnactCore {
|
|
|
238930
238934
|
timestamp: new Date(tool.signatures[0].created).getTime()
|
|
238931
238935
|
};
|
|
238932
238936
|
const canonicalDoc = SigningService.getCanonicalDocument(documentForVerification, { includeFields: ["command"] });
|
|
238933
|
-
console.log("=== SIGNATURE VERIFICATION DEBUG ===");
|
|
238934
|
-
console.log("Original document for verification:", JSON.stringify(documentForVerification, null, 2));
|
|
238935
|
-
console.log("Canonical document:", JSON.stringify(canonicalDoc, null, 2));
|
|
238936
238937
|
const docString = JSON.stringify(canonicalDoc);
|
|
238937
238938
|
const messageHash = CryptoUtils.hash(docString);
|
|
238938
|
-
console.log("Document string:", docString);
|
|
238939
|
-
console.log("Message hash:", messageHash);
|
|
238940
|
-
console.log("Reference signature object:", JSON.stringify(referenceSignature, null, 2));
|
|
238941
238939
|
const directVerify = CryptoUtils.verify(referenceSignature.publicKey, messageHash, referenceSignature.signature);
|
|
238942
|
-
console.log("KEITH DEBUG - Direct crypto verification result:", directVerify, "publicKey:", referenceSignature.publicKey);
|
|
238943
|
-
const trustedKeys = KeyManager.getAllTrustedPublicKeys();
|
|
238944
|
-
console.log("Trusted keys:", trustedKeys);
|
|
238945
|
-
console.log("Our referenceSignature.publicKey:", JSON.stringify(referenceSignature.publicKey));
|
|
238946
|
-
console.log("Is our public key trusted?", trustedKeys.includes(referenceSignature.publicKey));
|
|
238947
238940
|
const isValid2 = SigningService.verifyDocument(documentForVerification, referenceSignature, { includeFields: ["command"] });
|
|
238948
238941
|
console.log("Final verification result:", isValid2);
|
|
238949
238942
|
if (!isValid2) {
|
|
@@ -239131,14 +239124,14 @@ class EnactCore {
|
|
|
239131
239124
|
return `exec_${Date.now()}_${Math.random().toString(36).substring(2, 9)}`;
|
|
239132
239125
|
}
|
|
239133
239126
|
}
|
|
239134
|
-
//
|
|
239127
|
+
// ../shared/dist/utils/config.js
|
|
239135
239128
|
import { homedir as homedir3 } from "os";
|
|
239136
239129
|
import { join as join3 } from "path";
|
|
239137
239130
|
var CONFIG_DIR2 = join3(homedir3(), ".enact");
|
|
239138
239131
|
var CONFIG_FILE = join3(CONFIG_DIR2, "config.json");
|
|
239139
|
-
//
|
|
239140
|
-
var __dirname = "/Users/keithgroves/projects/enact/enact-cli/packages/
|
|
239141
|
-
//
|
|
239132
|
+
// ../shared/dist/utils/help.js
|
|
239133
|
+
var __dirname = "/Users/keithgroves/projects/enact/enact-cli/packages/shared/dist/utils";
|
|
239134
|
+
// ../shared/dist/utils/logger.js
|
|
239142
239135
|
var LogLevel;
|
|
239143
239136
|
(function(LogLevel2) {
|
|
239144
239137
|
LogLevel2[LogLevel2["DEBUG"] = 0] = "DEBUG";
|
|
@@ -239148,7 +239141,7 @@ var LogLevel;
|
|
|
239148
239141
|
LogLevel2[LogLevel2["ERROR"] = 4] = "ERROR";
|
|
239149
239142
|
})(LogLevel || (LogLevel = {}));
|
|
239150
239143
|
var currentLogLevel = LogLevel.INFO;
|
|
239151
|
-
//
|
|
239144
|
+
// ../shared/dist/utils/silent-monitor.js
|
|
239152
239145
|
class McpSilentOperationMonitor {
|
|
239153
239146
|
getOriginalConsoleError() {
|
|
239154
239147
|
return this.originalConsoleError;
|
|
@@ -239276,9 +239269,9 @@ function validateSilentEnvironment() {
|
|
|
239276
239269
|
issues
|
|
239277
239270
|
};
|
|
239278
239271
|
}
|
|
239279
|
-
//
|
|
239280
|
-
var __filename = "/Users/keithgroves/projects/enact/enact-cli/packages/
|
|
239281
|
-
//
|
|
239272
|
+
// ../shared/dist/utils/version.js
|
|
239273
|
+
var __filename = "/Users/keithgroves/projects/enact/enact-cli/packages/shared/dist/utils/version.js";
|
|
239274
|
+
// ../shared/dist/web/env-manager-server.js
|
|
239282
239275
|
import { createServer } from "http";
|
|
239283
239276
|
import { parse as parse3 } from "url";
|
|
239284
239277
|
import { readFile as readFile2, writeFile, mkdir, readdir, stat as stat2 } from "fs/promises";
|
|
@@ -239559,7 +239552,7 @@ function startEnvManagerServer(port = 5555) {
|
|
|
239559
239552
|
});
|
|
239560
239553
|
});
|
|
239561
239554
|
}
|
|
239562
|
-
//
|
|
239555
|
+
// ../shared/dist/LocalToolResolver.js
|
|
239563
239556
|
var yaml2 = __toESM(require_dist3(), 1);
|
|
239564
239557
|
import { promises as fs5, readFileSync as readFileSync3, writeFileSync } from "fs";
|
|
239565
239558
|
import { join as join5, resolve, basename as basename2 } from "path";
|
|
@@ -239845,7 +239838,7 @@ Use the MCP tools to manage this directory programmatically.
|
|
|
239845
239838
|
}
|
|
239846
239839
|
}
|
|
239847
239840
|
var LocalToolResolver_default = LocalToolResolver;
|
|
239848
|
-
//
|
|
239841
|
+
// ../shared/dist/services/McpCoreService.js
|
|
239849
239842
|
class McpCoreService {
|
|
239850
239843
|
constructor(options) {
|
|
239851
239844
|
this.core = new EnactCore({
|
|
@@ -239915,7 +239908,7 @@ class McpCoreService {
|
|
|
239915
239908
|
}
|
|
239916
239909
|
}
|
|
239917
239910
|
var mcpCoreService = new McpCoreService;
|
|
239918
|
-
//
|
|
239911
|
+
// ../shared/dist/lib/enact-direct.js
|
|
239919
239912
|
class EnactDirect {
|
|
239920
239913
|
constructor(options = {}) {
|
|
239921
239914
|
this.core = new EnactCore({
|
package/dist/index.js.bak
CHANGED
|
@@ -35968,7 +35968,7 @@ var require_high_level_opt = __commonJS((exports, module) => {
|
|
|
35968
35968
|
]).reduce((set2, kv) => (set2[kv[0]] = kv[1], set2), Object.create(null)) : {};
|
|
35969
35969
|
});
|
|
35970
35970
|
|
|
35971
|
-
// ../../node_modules/
|
|
35971
|
+
// ../../node_modules/minipass/index.js
|
|
35972
35972
|
var require_minipass = __commonJS((exports) => {
|
|
35973
35973
|
var proc = typeof process === "object" && process ? process : {
|
|
35974
35974
|
stdout: null,
|
|
@@ -223120,8 +223120,16 @@ var ResourceContentsSchema = exports_external.object({
|
|
|
223120
223120
|
var TextResourceContentsSchema = ResourceContentsSchema.extend({
|
|
223121
223121
|
text: exports_external.string()
|
|
223122
223122
|
});
|
|
223123
|
+
var Base64Schema = exports_external.string().refine((val) => {
|
|
223124
|
+
try {
|
|
223125
|
+
atob(val);
|
|
223126
|
+
return true;
|
|
223127
|
+
} catch (_a) {
|
|
223128
|
+
return false;
|
|
223129
|
+
}
|
|
223130
|
+
}, { message: "Invalid Base64 string" });
|
|
223123
223131
|
var BlobResourceContentsSchema = ResourceContentsSchema.extend({
|
|
223124
|
-
blob:
|
|
223132
|
+
blob: Base64Schema
|
|
223125
223133
|
});
|
|
223126
223134
|
var ResourceSchema = BaseMetadataSchema.extend({
|
|
223127
223135
|
uri: exports_external.string(),
|
|
@@ -223207,13 +223215,13 @@ var TextContentSchema = exports_external.object({
|
|
|
223207
223215
|
}).passthrough();
|
|
223208
223216
|
var ImageContentSchema = exports_external.object({
|
|
223209
223217
|
type: exports_external.literal("image"),
|
|
223210
|
-
data:
|
|
223218
|
+
data: Base64Schema,
|
|
223211
223219
|
mimeType: exports_external.string(),
|
|
223212
223220
|
_meta: exports_external.optional(exports_external.object({}).passthrough())
|
|
223213
223221
|
}).passthrough();
|
|
223214
223222
|
var AudioContentSchema = exports_external.object({
|
|
223215
223223
|
type: exports_external.literal("audio"),
|
|
223216
|
-
data:
|
|
223224
|
+
data: Base64Schema,
|
|
223217
223225
|
mimeType: exports_external.string(),
|
|
223218
223226
|
_meta: exports_external.optional(exports_external.object({}).passthrough())
|
|
223219
223227
|
}).passthrough();
|
|
@@ -225964,7 +225972,7 @@ class StdioServerTransport {
|
|
|
225964
225972
|
}
|
|
225965
225973
|
}
|
|
225966
225974
|
|
|
225967
|
-
//
|
|
225975
|
+
// ../shared/dist/api/enact-api.js
|
|
225968
225976
|
class EnactApiClient {
|
|
225969
225977
|
constructor(baseUrl = "https://enact.tools", supabaseUrl = "https://xjnhhxwxovjifdxdwzih.supabase.co") {
|
|
225970
225978
|
this.baseUrl = baseUrl.replace(/\/$/, "");
|
|
@@ -226262,7 +226270,7 @@ class EnactApiError extends Error {
|
|
|
226262
226270
|
}
|
|
226263
226271
|
}
|
|
226264
226272
|
|
|
226265
|
-
//
|
|
226273
|
+
// ../shared/dist/exec/validate.js
|
|
226266
226274
|
function validateAgainstSchema(value, schema, fieldName) {
|
|
226267
226275
|
const { type, format, enum: enumValues, minimum, maximum, pattern, required } = schema;
|
|
226268
226276
|
if (type) {
|
|
@@ -226388,14 +226396,14 @@ function validateInputs(tool, inputs) {
|
|
|
226388
226396
|
return validatedInputs;
|
|
226389
226397
|
}
|
|
226390
226398
|
|
|
226391
|
-
//
|
|
226399
|
+
// ../shared/dist/core/DirectExecutionProvider.js
|
|
226392
226400
|
import { spawn } from "child_process";
|
|
226393
226401
|
|
|
226394
|
-
//
|
|
226402
|
+
// ../shared/dist/types.js
|
|
226395
226403
|
class ExecutionProvider {
|
|
226396
226404
|
}
|
|
226397
226405
|
|
|
226398
|
-
//
|
|
226406
|
+
// ../shared/dist/exec/logger.js
|
|
226399
226407
|
var import_pino = __toESM(require_pino(), 1);
|
|
226400
226408
|
var isSilentMode = () => process.env.CI === "true" || false || process.env.ENACT_SILENT === "true" || process.env.ENACT_SKIP_INTERACTIVE === "true";
|
|
226401
226409
|
var logger = import_pino.default({
|
|
@@ -226443,7 +226451,7 @@ var wrappedLogger = {
|
|
|
226443
226451
|
};
|
|
226444
226452
|
var logger_default = wrappedLogger;
|
|
226445
226453
|
|
|
226446
|
-
//
|
|
226454
|
+
// ../shared/dist/utils/timeout.js
|
|
226447
226455
|
function parseTimeout(timeout) {
|
|
226448
226456
|
const match = timeout.match(/^(\d+)([smh])$/);
|
|
226449
226457
|
if (!match) {
|
|
@@ -226463,7 +226471,7 @@ function parseTimeout(timeout) {
|
|
|
226463
226471
|
}
|
|
226464
226472
|
}
|
|
226465
226473
|
|
|
226466
|
-
//
|
|
226474
|
+
// ../shared/dist/core/DirectExecutionProvider.js
|
|
226467
226475
|
class DirectExecutionProvider extends ExecutionProvider {
|
|
226468
226476
|
async resolveEnvironmentVariables(envConfig, namespace) {
|
|
226469
226477
|
const resolved = {};
|
|
@@ -235036,7 +235044,7 @@ var import_typescript = __toESM(require_typescript(), 1);
|
|
|
235036
235044
|
var __filename2 = fileURLToPath3(import.meta.url);
|
|
235037
235045
|
var __dirname2 = path5.dirname(__filename2);
|
|
235038
235046
|
var moduleSrcDirectory = `${__dirname2}/../../src/`;
|
|
235039
|
-
//
|
|
235047
|
+
// ../shared/dist/core/DaggerExecutionProvider.js
|
|
235040
235048
|
import fs3 from "fs/promises";
|
|
235041
235049
|
import path6 from "path";
|
|
235042
235050
|
import crypto3 from "crypto";
|
|
@@ -235831,7 +235839,7 @@ class DaggerExecutionProvider extends ExecutionProvider {
|
|
|
235831
235839
|
}
|
|
235832
235840
|
}
|
|
235833
235841
|
|
|
235834
|
-
//
|
|
235842
|
+
// ../shared/dist/utils/env-loader.js
|
|
235835
235843
|
var import_dotenv = __toESM(require_main(), 1);
|
|
235836
235844
|
import { join as join2 } from "path";
|
|
235837
235845
|
import { homedir as homedir2 } from "os";
|
|
@@ -235993,7 +236001,7 @@ function generateConfigLink(missingVars, toolName) {
|
|
|
235993
236001
|
return `${webUrl}/?vars=${encodedVars}&package=${encodedPackage}`;
|
|
235994
236002
|
}
|
|
235995
236003
|
|
|
235996
|
-
//
|
|
236004
|
+
// ../shared/dist/core/EnactCore.js
|
|
235997
236005
|
var import_yaml = __toESM(require_dist3(), 1);
|
|
235998
236006
|
|
|
235999
236007
|
// ../../node_modules/@enactprotocol/security/dist/index.js
|
|
@@ -238708,7 +238716,7 @@ class SigningService {
|
|
|
238708
238716
|
}
|
|
238709
238717
|
}
|
|
238710
238718
|
|
|
238711
|
-
//
|
|
238719
|
+
// ../shared/dist/core/EnactCore.js
|
|
238712
238720
|
class EnactCore {
|
|
238713
238721
|
constructor(options = {}) {
|
|
238714
238722
|
this.options = {
|
|
@@ -238907,7 +238915,6 @@ class EnactCore {
|
|
|
238907
238915
|
}
|
|
238908
238916
|
}
|
|
238909
238917
|
async verifyTool(tool, dangerouslySkipVerification = false) {
|
|
238910
|
-
console.log("=== VERIFY TOOL CALLED ===", tool.name, "skipVerification:", dangerouslySkipVerification);
|
|
238911
238918
|
if (dangerouslySkipVerification) {
|
|
238912
238919
|
logger_default.warn(`Skipping signature verification for tool: ${tool.name}`);
|
|
238913
238920
|
return;
|
|
@@ -238916,9 +238923,6 @@ class EnactCore {
|
|
|
238916
238923
|
if (!tool.signatures || tool.signatures.length === 0) {
|
|
238917
238924
|
throw new Error(`Tool ${tool.name} does not have any signatures`);
|
|
238918
238925
|
}
|
|
238919
|
-
console.log("=== TOOL SIGNATURE DATA ===");
|
|
238920
|
-
console.log("Tool signatures from database:", JSON.stringify(tool.signatures, null, 2));
|
|
238921
|
-
console.log("Tool command:", tool.command);
|
|
238922
238926
|
const documentForVerification = {
|
|
238923
238927
|
command: tool.command
|
|
238924
238928
|
};
|
|
@@ -238929,20 +238933,9 @@ class EnactCore {
|
|
|
238929
238933
|
timestamp: new Date(tool.signatures[0].created).getTime()
|
|
238930
238934
|
};
|
|
238931
238935
|
const canonicalDoc = SigningService.getCanonicalDocument(documentForVerification, { includeFields: ["command"] });
|
|
238932
|
-
console.log("=== SIGNATURE VERIFICATION DEBUG ===");
|
|
238933
|
-
console.log("Original document for verification:", JSON.stringify(documentForVerification, null, 2));
|
|
238934
|
-
console.log("Canonical document:", JSON.stringify(canonicalDoc, null, 2));
|
|
238935
238936
|
const docString = JSON.stringify(canonicalDoc);
|
|
238936
238937
|
const messageHash = CryptoUtils.hash(docString);
|
|
238937
|
-
console.log("Document string:", docString);
|
|
238938
|
-
console.log("Message hash:", messageHash);
|
|
238939
|
-
console.log("Reference signature object:", JSON.stringify(referenceSignature, null, 2));
|
|
238940
238938
|
const directVerify = CryptoUtils.verify(referenceSignature.publicKey, messageHash, referenceSignature.signature);
|
|
238941
|
-
console.log("KEITH DEBUG - Direct crypto verification result:", directVerify, "publicKey:", referenceSignature.publicKey);
|
|
238942
|
-
const trustedKeys = KeyManager.getAllTrustedPublicKeys();
|
|
238943
|
-
console.log("Trusted keys:", trustedKeys);
|
|
238944
|
-
console.log("Our referenceSignature.publicKey:", JSON.stringify(referenceSignature.publicKey));
|
|
238945
|
-
console.log("Is our public key trusted?", trustedKeys.includes(referenceSignature.publicKey));
|
|
238946
238939
|
const isValid2 = SigningService.verifyDocument(documentForVerification, referenceSignature, { includeFields: ["command"] });
|
|
238947
238940
|
console.log("Final verification result:", isValid2);
|
|
238948
238941
|
if (!isValid2) {
|
|
@@ -239130,14 +239123,14 @@ class EnactCore {
|
|
|
239130
239123
|
return `exec_${Date.now()}_${Math.random().toString(36).substring(2, 9)}`;
|
|
239131
239124
|
}
|
|
239132
239125
|
}
|
|
239133
|
-
//
|
|
239126
|
+
// ../shared/dist/utils/config.js
|
|
239134
239127
|
import { homedir as homedir3 } from "os";
|
|
239135
239128
|
import { join as join3 } from "path";
|
|
239136
239129
|
var CONFIG_DIR2 = join3(homedir3(), ".enact");
|
|
239137
239130
|
var CONFIG_FILE = join3(CONFIG_DIR2, "config.json");
|
|
239138
|
-
//
|
|
239139
|
-
var __dirname = "/Users/keithgroves/projects/enact/enact-cli/packages/
|
|
239140
|
-
//
|
|
239131
|
+
// ../shared/dist/utils/help.js
|
|
239132
|
+
var __dirname = "/Users/keithgroves/projects/enact/enact-cli/packages/shared/dist/utils";
|
|
239133
|
+
// ../shared/dist/utils/logger.js
|
|
239141
239134
|
var LogLevel;
|
|
239142
239135
|
(function(LogLevel2) {
|
|
239143
239136
|
LogLevel2[LogLevel2["DEBUG"] = 0] = "DEBUG";
|
|
@@ -239147,7 +239140,7 @@ var LogLevel;
|
|
|
239147
239140
|
LogLevel2[LogLevel2["ERROR"] = 4] = "ERROR";
|
|
239148
239141
|
})(LogLevel || (LogLevel = {}));
|
|
239149
239142
|
var currentLogLevel = LogLevel.INFO;
|
|
239150
|
-
//
|
|
239143
|
+
// ../shared/dist/utils/silent-monitor.js
|
|
239151
239144
|
class McpSilentOperationMonitor {
|
|
239152
239145
|
getOriginalConsoleError() {
|
|
239153
239146
|
return this.originalConsoleError;
|
|
@@ -239275,9 +239268,9 @@ function validateSilentEnvironment() {
|
|
|
239275
239268
|
issues
|
|
239276
239269
|
};
|
|
239277
239270
|
}
|
|
239278
|
-
//
|
|
239279
|
-
var __filename = "/Users/keithgroves/projects/enact/enact-cli/packages/
|
|
239280
|
-
//
|
|
239271
|
+
// ../shared/dist/utils/version.js
|
|
239272
|
+
var __filename = "/Users/keithgroves/projects/enact/enact-cli/packages/shared/dist/utils/version.js";
|
|
239273
|
+
// ../shared/dist/web/env-manager-server.js
|
|
239281
239274
|
import { createServer } from "http";
|
|
239282
239275
|
import { parse as parse3 } from "url";
|
|
239283
239276
|
import { readFile as readFile2, writeFile, mkdir, readdir, stat as stat2 } from "fs/promises";
|
|
@@ -239558,7 +239551,7 @@ function startEnvManagerServer(port = 5555) {
|
|
|
239558
239551
|
});
|
|
239559
239552
|
});
|
|
239560
239553
|
}
|
|
239561
|
-
//
|
|
239554
|
+
// ../shared/dist/LocalToolResolver.js
|
|
239562
239555
|
var yaml2 = __toESM(require_dist3(), 1);
|
|
239563
239556
|
import { promises as fs5, readFileSync as readFileSync3, writeFileSync } from "fs";
|
|
239564
239557
|
import { join as join5, resolve, basename as basename2 } from "path";
|
|
@@ -239844,7 +239837,7 @@ Use the MCP tools to manage this directory programmatically.
|
|
|
239844
239837
|
}
|
|
239845
239838
|
}
|
|
239846
239839
|
var LocalToolResolver_default = LocalToolResolver;
|
|
239847
|
-
//
|
|
239840
|
+
// ../shared/dist/services/McpCoreService.js
|
|
239848
239841
|
class McpCoreService {
|
|
239849
239842
|
constructor(options) {
|
|
239850
239843
|
this.core = new EnactCore({
|
|
@@ -239914,7 +239907,7 @@ class McpCoreService {
|
|
|
239914
239907
|
}
|
|
239915
239908
|
}
|
|
239916
239909
|
var mcpCoreService = new McpCoreService;
|
|
239917
|
-
//
|
|
239910
|
+
// ../shared/dist/lib/enact-direct.js
|
|
239918
239911
|
class EnactDirect {
|
|
239919
239912
|
constructor(options = {}) {
|
|
239920
239913
|
this.core = new EnactCore({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enactprotocol/mcp-server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"description": "MCP server for the Enact Protocol - enables AI tools integration via Model Context Protocol",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"node": ">=18.0.0"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@enactprotocol/shared": "1.2.
|
|
44
|
+
"@enactprotocol/shared": "1.2.3",
|
|
45
45
|
"@modelcontextprotocol/sdk": "^1.13.0",
|
|
46
46
|
"zod": "^3.25.67"
|
|
47
47
|
},
|