@enactprotocol/cli 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 +271 -58
- package/dist/index.js.bak +271 -58
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -29,7 +29,7 @@ var __export = (target, all) => {
|
|
|
29
29
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
30
30
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
31
31
|
|
|
32
|
-
//
|
|
32
|
+
// node_modules/picocolors/picocolors.js
|
|
33
33
|
var require_picocolors = __commonJS((exports, module) => {
|
|
34
34
|
var p = process || {};
|
|
35
35
|
var argv = p.argv || [];
|
|
@@ -99,7 +99,7 @@ var require_picocolors = __commonJS((exports, module) => {
|
|
|
99
99
|
module.exports.createColors = createColors;
|
|
100
100
|
});
|
|
101
101
|
|
|
102
|
-
//
|
|
102
|
+
// node_modules/sisteransi/src/index.js
|
|
103
103
|
var require_src = __commonJS((exports, module) => {
|
|
104
104
|
var ESC = "\x1B";
|
|
105
105
|
var CSI = `${ESC}[`;
|
|
@@ -748,6 +748,76 @@ var init_env_loader = __esm(() => {
|
|
|
748
748
|
import_dotenv.config();
|
|
749
749
|
});
|
|
750
750
|
|
|
751
|
+
// ../../node_modules/picocolors/picocolors.js
|
|
752
|
+
var require_picocolors2 = __commonJS((exports, module) => {
|
|
753
|
+
var p2 = process || {};
|
|
754
|
+
var argv = p2.argv || [];
|
|
755
|
+
var env = p2.env || {};
|
|
756
|
+
var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p2.platform === "win32" || (p2.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
757
|
+
var formatter = (open, close, replace = open) => (input) => {
|
|
758
|
+
let string = "" + input, index = string.indexOf(close, open.length);
|
|
759
|
+
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
760
|
+
};
|
|
761
|
+
var replaceClose = (string, close, replace, index) => {
|
|
762
|
+
let result = "", cursor = 0;
|
|
763
|
+
do {
|
|
764
|
+
result += string.substring(cursor, index) + replace;
|
|
765
|
+
cursor = index + close.length;
|
|
766
|
+
index = string.indexOf(close, cursor);
|
|
767
|
+
} while (~index);
|
|
768
|
+
return result + string.substring(cursor);
|
|
769
|
+
};
|
|
770
|
+
var createColors = (enabled = isColorSupported) => {
|
|
771
|
+
let f = enabled ? formatter : () => String;
|
|
772
|
+
return {
|
|
773
|
+
isColorSupported: enabled,
|
|
774
|
+
reset: f("\x1B[0m", "\x1B[0m"),
|
|
775
|
+
bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
776
|
+
dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
777
|
+
italic: f("\x1B[3m", "\x1B[23m"),
|
|
778
|
+
underline: f("\x1B[4m", "\x1B[24m"),
|
|
779
|
+
inverse: f("\x1B[7m", "\x1B[27m"),
|
|
780
|
+
hidden: f("\x1B[8m", "\x1B[28m"),
|
|
781
|
+
strikethrough: f("\x1B[9m", "\x1B[29m"),
|
|
782
|
+
black: f("\x1B[30m", "\x1B[39m"),
|
|
783
|
+
red: f("\x1B[31m", "\x1B[39m"),
|
|
784
|
+
green: f("\x1B[32m", "\x1B[39m"),
|
|
785
|
+
yellow: f("\x1B[33m", "\x1B[39m"),
|
|
786
|
+
blue: f("\x1B[34m", "\x1B[39m"),
|
|
787
|
+
magenta: f("\x1B[35m", "\x1B[39m"),
|
|
788
|
+
cyan: f("\x1B[36m", "\x1B[39m"),
|
|
789
|
+
white: f("\x1B[37m", "\x1B[39m"),
|
|
790
|
+
gray: f("\x1B[90m", "\x1B[39m"),
|
|
791
|
+
bgBlack: f("\x1B[40m", "\x1B[49m"),
|
|
792
|
+
bgRed: f("\x1B[41m", "\x1B[49m"),
|
|
793
|
+
bgGreen: f("\x1B[42m", "\x1B[49m"),
|
|
794
|
+
bgYellow: f("\x1B[43m", "\x1B[49m"),
|
|
795
|
+
bgBlue: f("\x1B[44m", "\x1B[49m"),
|
|
796
|
+
bgMagenta: f("\x1B[45m", "\x1B[49m"),
|
|
797
|
+
bgCyan: f("\x1B[46m", "\x1B[49m"),
|
|
798
|
+
bgWhite: f("\x1B[47m", "\x1B[49m"),
|
|
799
|
+
blackBright: f("\x1B[90m", "\x1B[39m"),
|
|
800
|
+
redBright: f("\x1B[91m", "\x1B[39m"),
|
|
801
|
+
greenBright: f("\x1B[92m", "\x1B[39m"),
|
|
802
|
+
yellowBright: f("\x1B[93m", "\x1B[39m"),
|
|
803
|
+
blueBright: f("\x1B[94m", "\x1B[39m"),
|
|
804
|
+
magentaBright: f("\x1B[95m", "\x1B[39m"),
|
|
805
|
+
cyanBright: f("\x1B[96m", "\x1B[39m"),
|
|
806
|
+
whiteBright: f("\x1B[97m", "\x1B[39m"),
|
|
807
|
+
bgBlackBright: f("\x1B[100m", "\x1B[49m"),
|
|
808
|
+
bgRedBright: f("\x1B[101m", "\x1B[49m"),
|
|
809
|
+
bgGreenBright: f("\x1B[102m", "\x1B[49m"),
|
|
810
|
+
bgYellowBright: f("\x1B[103m", "\x1B[49m"),
|
|
811
|
+
bgBlueBright: f("\x1B[104m", "\x1B[49m"),
|
|
812
|
+
bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
|
|
813
|
+
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
|
|
814
|
+
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
|
815
|
+
};
|
|
816
|
+
};
|
|
817
|
+
module.exports = createColors();
|
|
818
|
+
module.exports.createColors = createColors;
|
|
819
|
+
});
|
|
820
|
+
|
|
751
821
|
// ../shared/dist/utils/help.js
|
|
752
822
|
import { readFileSync } from "fs";
|
|
753
823
|
import { join as join4 } from "path";
|
|
@@ -803,7 +873,7 @@ ${import_picocolors4.default.bold("More Help:")}
|
|
|
803
873
|
}
|
|
804
874
|
var import_picocolors4, __dirname = "/Users/keithgroves/projects/enact/enact-cli/packages/shared/dist/utils";
|
|
805
875
|
var init_help = __esm(() => {
|
|
806
|
-
import_picocolors4 = __toESM(
|
|
876
|
+
import_picocolors4 = __toESM(require_picocolors2(), 1);
|
|
807
877
|
});
|
|
808
878
|
|
|
809
879
|
// ../shared/dist/utils/logger.js
|
|
@@ -850,7 +920,7 @@ function table(data, columns) {
|
|
|
850
920
|
}
|
|
851
921
|
var import_picocolors5, LogLevel, currentLogLevel;
|
|
852
922
|
var init_logger = __esm(() => {
|
|
853
|
-
import_picocolors5 = __toESM(
|
|
923
|
+
import_picocolors5 = __toESM(require_picocolors2(), 1);
|
|
854
924
|
(function(LogLevel2) {
|
|
855
925
|
LogLevel2[LogLevel2["DEBUG"] = 0] = "DEBUG";
|
|
856
926
|
LogLevel2[LogLevel2["INFO"] = 1] = "INFO";
|
|
@@ -1111,7 +1181,7 @@ ${import_picocolors6.default.dim("A tool to create and publish enact documents."
|
|
|
1111
1181
|
}
|
|
1112
1182
|
var import_picocolors6, __filename = "/Users/keithgroves/projects/enact/enact-cli/packages/shared/dist/utils/version.js";
|
|
1113
1183
|
var init_version = __esm(() => {
|
|
1114
|
-
import_picocolors6 = __toESM(
|
|
1184
|
+
import_picocolors6 = __toESM(require_picocolors2(), 1);
|
|
1115
1185
|
});
|
|
1116
1186
|
|
|
1117
1187
|
// ../shared/dist/utils/index.js
|
|
@@ -12327,13 +12397,71 @@ var require_pino = __commonJS((exports, module) => {
|
|
|
12327
12397
|
module.exports.pino = pino;
|
|
12328
12398
|
});
|
|
12329
12399
|
|
|
12400
|
+
// ../../node_modules/sisteransi/src/index.js
|
|
12401
|
+
var require_src2 = __commonJS((exports, module) => {
|
|
12402
|
+
var ESC = "\x1B";
|
|
12403
|
+
var CSI = `${ESC}[`;
|
|
12404
|
+
var beep = "\x07";
|
|
12405
|
+
var cursor = {
|
|
12406
|
+
to(x2, y3) {
|
|
12407
|
+
if (!y3)
|
|
12408
|
+
return `${CSI}${x2 + 1}G`;
|
|
12409
|
+
return `${CSI}${y3 + 1};${x2 + 1}H`;
|
|
12410
|
+
},
|
|
12411
|
+
move(x2, y3) {
|
|
12412
|
+
let ret = "";
|
|
12413
|
+
if (x2 < 0)
|
|
12414
|
+
ret += `${CSI}${-x2}D`;
|
|
12415
|
+
else if (x2 > 0)
|
|
12416
|
+
ret += `${CSI}${x2}C`;
|
|
12417
|
+
if (y3 < 0)
|
|
12418
|
+
ret += `${CSI}${-y3}A`;
|
|
12419
|
+
else if (y3 > 0)
|
|
12420
|
+
ret += `${CSI}${y3}B`;
|
|
12421
|
+
return ret;
|
|
12422
|
+
},
|
|
12423
|
+
up: (count = 1) => `${CSI}${count}A`,
|
|
12424
|
+
down: (count = 1) => `${CSI}${count}B`,
|
|
12425
|
+
forward: (count = 1) => `${CSI}${count}C`,
|
|
12426
|
+
backward: (count = 1) => `${CSI}${count}D`,
|
|
12427
|
+
nextLine: (count = 1) => `${CSI}E`.repeat(count),
|
|
12428
|
+
prevLine: (count = 1) => `${CSI}F`.repeat(count),
|
|
12429
|
+
left: `${CSI}G`,
|
|
12430
|
+
hide: `${CSI}?25l`,
|
|
12431
|
+
show: `${CSI}?25h`,
|
|
12432
|
+
save: `${ESC}7`,
|
|
12433
|
+
restore: `${ESC}8`
|
|
12434
|
+
};
|
|
12435
|
+
var scroll = {
|
|
12436
|
+
up: (count = 1) => `${CSI}S`.repeat(count),
|
|
12437
|
+
down: (count = 1) => `${CSI}T`.repeat(count)
|
|
12438
|
+
};
|
|
12439
|
+
var erase = {
|
|
12440
|
+
screen: `${CSI}2J`,
|
|
12441
|
+
up: (count = 1) => `${CSI}1J`.repeat(count),
|
|
12442
|
+
down: (count = 1) => `${CSI}J`.repeat(count),
|
|
12443
|
+
line: `${CSI}2K`,
|
|
12444
|
+
lineEnd: `${CSI}K`,
|
|
12445
|
+
lineStart: `${CSI}1K`,
|
|
12446
|
+
lines(count) {
|
|
12447
|
+
let clear = "";
|
|
12448
|
+
for (let i = 0;i < count; i++)
|
|
12449
|
+
clear += this.line + (i < count - 1 ? cursor.up() : "");
|
|
12450
|
+
if (count)
|
|
12451
|
+
clear += cursor.left;
|
|
12452
|
+
return clear;
|
|
12453
|
+
}
|
|
12454
|
+
};
|
|
12455
|
+
module.exports = { cursor, scroll, erase, beep };
|
|
12456
|
+
});
|
|
12457
|
+
|
|
12330
12458
|
// ../../node_modules/@clack/core/dist/index.cjs
|
|
12331
12459
|
var require_dist2 = __commonJS((exports) => {
|
|
12332
|
-
var sisteransi =
|
|
12460
|
+
var sisteransi = require_src2();
|
|
12333
12461
|
var node_process = __require("node:process");
|
|
12334
12462
|
var s$2 = __require("node:readline");
|
|
12335
12463
|
var node_stream = __require("node:stream");
|
|
12336
|
-
var i$1 =
|
|
12464
|
+
var i$1 = require_picocolors2();
|
|
12337
12465
|
function _interopDefaultCompat(C3) {
|
|
12338
12466
|
return C3 && typeof C3 == "object" && "default" in C3 ? C3.default : C3;
|
|
12339
12467
|
}
|
|
@@ -12920,8 +13048,8 @@ var require_dist3 = __commonJS((exports) => {
|
|
|
12920
13048
|
var node_util = __require("node:util");
|
|
12921
13049
|
var core = require_dist2();
|
|
12922
13050
|
var process$1 = __require("node:process");
|
|
12923
|
-
var e2 =
|
|
12924
|
-
var sisteransi =
|
|
13051
|
+
var e2 = require_picocolors2();
|
|
13052
|
+
var sisteransi = require_src2();
|
|
12925
13053
|
function _interopDefaultCompat(t) {
|
|
12926
13054
|
return t && typeof t == "object" && "default" in t ? t.default : t;
|
|
12927
13055
|
}
|
|
@@ -37754,7 +37882,7 @@ var require_high_level_opt = __commonJS((exports, module) => {
|
|
|
37754
37882
|
]).reduce((set, kv) => (set[kv[0]] = kv[1], set), Object.create(null)) : {};
|
|
37755
37883
|
});
|
|
37756
37884
|
|
|
37757
|
-
// ../../node_modules/
|
|
37885
|
+
// ../../node_modules/minipass/index.js
|
|
37758
37886
|
var require_minipass = __commonJS((exports) => {
|
|
37759
37887
|
var proc = typeof process === "object" && process ? process : {
|
|
37760
37888
|
stdout: null,
|
|
@@ -213472,10 +213600,10 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
|
213472
213600
|
var import_picocolors14 = __toESM(require_picocolors(), 1);
|
|
213473
213601
|
import { parseArgs } from "util";
|
|
213474
213602
|
|
|
213475
|
-
//
|
|
213603
|
+
// node_modules/@clack/prompts/dist/index.mjs
|
|
213476
213604
|
import { stripVTControlCharacters as S2 } from "node:util";
|
|
213477
213605
|
|
|
213478
|
-
//
|
|
213606
|
+
// node_modules/@clack/core/dist/index.mjs
|
|
213479
213607
|
var import_sisteransi = __toESM(require_src(), 1);
|
|
213480
213608
|
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
213481
213609
|
import { stdin as j, stdout as M } from "node:process";
|
|
@@ -213922,7 +214050,7 @@ class RD extends x {
|
|
|
213922
214050
|
}
|
|
213923
214051
|
}
|
|
213924
214052
|
|
|
213925
|
-
//
|
|
214053
|
+
// node_modules/@clack/prompts/dist/index.mjs
|
|
213926
214054
|
var import_picocolors2 = __toESM(require_picocolors(), 1);
|
|
213927
214055
|
var import_sisteransi2 = __toESM(require_src(), 1);
|
|
213928
214056
|
import y2 from "node:process";
|
|
@@ -216058,6 +216186,23 @@ var MCP_CLIENTS = {
|
|
|
216058
216186
|
}
|
|
216059
216187
|
}
|
|
216060
216188
|
};
|
|
216189
|
+
var MCP_SERVERS = {
|
|
216190
|
+
main: {
|
|
216191
|
+
name: "Enact MCP Server",
|
|
216192
|
+
description: "Main server for tool execution, search, and environment management",
|
|
216193
|
+
package: "@enactprotocol/mcp-server"
|
|
216194
|
+
},
|
|
216195
|
+
dev: {
|
|
216196
|
+
name: "Enact MCP Dev Server",
|
|
216197
|
+
description: "Development server for creating, testing, validating, and publishing tools",
|
|
216198
|
+
package: "@enactprotocol/mcp-dev-server"
|
|
216199
|
+
},
|
|
216200
|
+
both: {
|
|
216201
|
+
name: "Both Servers",
|
|
216202
|
+
description: "Install both main and development servers",
|
|
216203
|
+
package: "both"
|
|
216204
|
+
}
|
|
216205
|
+
};
|
|
216061
216206
|
async function handleMcpCommand(args, options) {
|
|
216062
216207
|
if (options.help || !args[0]) {
|
|
216063
216208
|
console.error(`
|
|
@@ -216066,13 +216211,14 @@ Usage: enact mcp <subcommand> [options]
|
|
|
216066
216211
|
Manages MCP (Model Context Protocol) client integrations.
|
|
216067
216212
|
|
|
216068
216213
|
Subcommands:
|
|
216069
|
-
install Install Enact MCP server to MCP clients
|
|
216214
|
+
install Install Enact MCP server(s) to MCP clients
|
|
216070
216215
|
list List detected MCP clients
|
|
216071
216216
|
status Show MCP integration status
|
|
216072
216217
|
|
|
216073
216218
|
Options:
|
|
216074
216219
|
--help, -h Show this help message
|
|
216075
216220
|
--client <name> Target specific client (claude-desktop, claude-code, vscode, goose, gemini)
|
|
216221
|
+
--server <type> Choose server type (main, dev, both) - default: main
|
|
216076
216222
|
`);
|
|
216077
216223
|
return;
|
|
216078
216224
|
}
|
|
@@ -216110,6 +216256,20 @@ Supported clients:
|
|
|
216110
216256
|
return;
|
|
216111
216257
|
}
|
|
216112
216258
|
let targetClient = options.client;
|
|
216259
|
+
let serverType = options.server || "main";
|
|
216260
|
+
if (!MCP_SERVERS[serverType]) {
|
|
216261
|
+
console.error(import_picocolors11.default.red(`Invalid server type: ${serverType}. Valid options: main, dev, both`));
|
|
216262
|
+
process.exit(1);
|
|
216263
|
+
}
|
|
216264
|
+
if (!options.server) {
|
|
216265
|
+
serverType = await ve({
|
|
216266
|
+
message: "Which MCP server(s) would you like to install?",
|
|
216267
|
+
options: Object.entries(MCP_SERVERS).map(([key, config2]) => ({
|
|
216268
|
+
value: key,
|
|
216269
|
+
label: `${config2.name} - ${config2.description}`
|
|
216270
|
+
}))
|
|
216271
|
+
});
|
|
216272
|
+
}
|
|
216113
216273
|
if (!targetClient) {
|
|
216114
216274
|
if (detectedClients.length === 1) {
|
|
216115
216275
|
targetClient = detectedClients[0].id;
|
|
@@ -216133,10 +216293,11 @@ Supported clients:
|
|
|
216133
216293
|
console.error(import_picocolors11.default.red(`Client "${targetClient}" not found or not detected.`));
|
|
216134
216294
|
process.exit(1);
|
|
216135
216295
|
}
|
|
216136
|
-
const isAlreadyInstalled = await checkMcpServerInstalled(selectedClient);
|
|
216296
|
+
const isAlreadyInstalled = await checkMcpServerInstalled(selectedClient, serverType);
|
|
216137
216297
|
if (isAlreadyInstalled) {
|
|
216298
|
+
const serverConfig2 = MCP_SERVERS[serverType];
|
|
216138
216299
|
const shouldReinstall = await ye({
|
|
216139
|
-
message:
|
|
216300
|
+
message: `${serverConfig2.name} is already installed in ${selectedClient.name}. Do you want to reinstall it?`
|
|
216140
216301
|
});
|
|
216141
216302
|
if (!shouldReinstall) {
|
|
216142
216303
|
Se("Installation cancelled.");
|
|
@@ -216144,11 +216305,14 @@ Supported clients:
|
|
|
216144
216305
|
}
|
|
216145
216306
|
}
|
|
216146
216307
|
const s = Y2();
|
|
216147
|
-
|
|
216148
|
-
|
|
216149
|
-
|
|
216150
|
-
|
|
216151
|
-
|
|
216308
|
+
const serverConfig = MCP_SERVERS[serverType];
|
|
216309
|
+
s.start(`Installing ${serverConfig.name}...`);
|
|
216310
|
+
await installMcpServer(selectedClient, serverType);
|
|
216311
|
+
s.stop(`✓ ${serverConfig.name} installation process completed`);
|
|
216312
|
+
const successMessage = serverType === "both" ? `✓ Added both 'enact' and 'enact-dev' MCP servers to ${selectedClient.name}
|
|
216313
|
+
` : `✓ Added '${serverType === "main" ? "enact" : "enact-dev"}' MCP server to ${selectedClient.name}
|
|
216314
|
+
`;
|
|
216315
|
+
Me(import_picocolors11.default.green(successMessage) + import_picocolors11.default.cyan(`→ Please restart ${selectedClient.name} to enable the MCP server(s)
|
|
216152
216316
|
`) + import_picocolors11.default.cyan(`→ Look for the MCP tools icon in the chat interface`), "Installation complete");
|
|
216153
216317
|
Se("MCP server installation completed!");
|
|
216154
216318
|
} catch (error2) {
|
|
@@ -216179,8 +216343,18 @@ async function handleStatusCommand() {
|
|
|
216179
216343
|
return;
|
|
216180
216344
|
}
|
|
216181
216345
|
for (const client of detectedClients) {
|
|
216182
|
-
const
|
|
216183
|
-
const
|
|
216346
|
+
const mainInstalled = await checkMcpServerInstalled(client, "main");
|
|
216347
|
+
const devInstalled = await checkMcpServerInstalled(client, "dev");
|
|
216348
|
+
let status = "";
|
|
216349
|
+
if (mainInstalled && devInstalled) {
|
|
216350
|
+
status = import_picocolors11.default.green("✓ Main + Dev servers");
|
|
216351
|
+
} else if (mainInstalled) {
|
|
216352
|
+
status = import_picocolors11.default.green("✓ Main server") + import_picocolors11.default.yellow(" (Dev server not installed)");
|
|
216353
|
+
} else if (devInstalled) {
|
|
216354
|
+
status = import_picocolors11.default.green("✓ Dev server") + import_picocolors11.default.yellow(" (Main server not installed)");
|
|
216355
|
+
} else {
|
|
216356
|
+
status = import_picocolors11.default.yellow("○ Not installed");
|
|
216357
|
+
}
|
|
216184
216358
|
Me(`${status}
|
|
216185
216359
|
Config: ${client.configPath}`, client.name);
|
|
216186
216360
|
}
|
|
@@ -216222,10 +216396,9 @@ async function detectMcpClients() {
|
|
|
216222
216396
|
}
|
|
216223
216397
|
return detected;
|
|
216224
216398
|
}
|
|
216225
|
-
async function installMcpServer(client) {
|
|
216399
|
+
async function installMcpServer(client, serverType = "main") {
|
|
216226
216400
|
if (client.id === "goose") {
|
|
216227
216401
|
try {
|
|
216228
|
-
const extensionName = "Enact Tools";
|
|
216229
216402
|
const yaml = await Promise.resolve().then(() => __toESM(require_dist(), 1));
|
|
216230
216403
|
const configPath2 = client.configPath;
|
|
216231
216404
|
const configDir2 = join8(configPath2, "..");
|
|
@@ -216242,16 +216415,29 @@ async function installMcpServer(client) {
|
|
|
216242
216415
|
if (!config3.extensions) {
|
|
216243
216416
|
config3.extensions = {};
|
|
216244
216417
|
}
|
|
216245
|
-
|
|
216246
|
-
|
|
216247
|
-
|
|
216248
|
-
|
|
216249
|
-
|
|
216250
|
-
|
|
216251
|
-
|
|
216252
|
-
|
|
216418
|
+
if (serverType === "main" || serverType === "both") {
|
|
216419
|
+
config3.extensions.enact = {
|
|
216420
|
+
name: "enact",
|
|
216421
|
+
cmd: "npx",
|
|
216422
|
+
args: ["-y", "@enactprotocol/mcp-server"],
|
|
216423
|
+
enabled: true,
|
|
216424
|
+
type: "stdio",
|
|
216425
|
+
timeout: 300
|
|
216426
|
+
};
|
|
216427
|
+
}
|
|
216428
|
+
if (serverType === "dev" || serverType === "both") {
|
|
216429
|
+
config3.extensions["enact-dev"] = {
|
|
216430
|
+
name: "enact-dev",
|
|
216431
|
+
cmd: "npx",
|
|
216432
|
+
args: ["-y", "@enactprotocol/mcp-dev-server"],
|
|
216433
|
+
enabled: true,
|
|
216434
|
+
type: "stdio",
|
|
216435
|
+
timeout: 300
|
|
216436
|
+
};
|
|
216437
|
+
}
|
|
216253
216438
|
await writeFile6(configPath2, yaml.stringify(config3), "utf-8");
|
|
216254
|
-
|
|
216439
|
+
const serverConfig = MCP_SERVERS[serverType];
|
|
216440
|
+
Me(import_picocolors11.default.green(`✓ Successfully added '${serverConfig.name}' extension to Goose configuration
|
|
216255
216441
|
`) + import_picocolors11.default.cyan(`→ The extension is now available in your Goose AI sessions
|
|
216256
216442
|
`) + import_picocolors11.default.cyan(`→ Restart Goose if it's currently running`), "Installation complete");
|
|
216257
216443
|
} catch (error2) {
|
|
@@ -216271,24 +216457,33 @@ async function installMcpServer(client) {
|
|
|
216271
216457
|
console.warn(import_picocolors11.default.yellow(`Warning: Could not parse existing config at ${configPath}. Creating new config.`));
|
|
216272
216458
|
}
|
|
216273
216459
|
}
|
|
216274
|
-
const
|
|
216275
|
-
|
|
216276
|
-
|
|
216277
|
-
|
|
216460
|
+
const serverConfigs = {};
|
|
216461
|
+
if (serverType === "main" || serverType === "both") {
|
|
216462
|
+
serverConfigs.enact = {
|
|
216463
|
+
command: "npx",
|
|
216464
|
+
args: ["-y", "@enactprotocol/mcp-server"]
|
|
216465
|
+
};
|
|
216466
|
+
}
|
|
216467
|
+
if (serverType === "dev" || serverType === "both") {
|
|
216468
|
+
serverConfigs["enact-dev"] = {
|
|
216469
|
+
command: "npx",
|
|
216470
|
+
args: ["-y", "@enactprotocol/mcp-dev-server"]
|
|
216471
|
+
};
|
|
216472
|
+
}
|
|
216278
216473
|
if (client.id === "claude-desktop" || client.id === "claude-code" || client.id === "gemini") {
|
|
216279
216474
|
if (!config2.mcpServers) {
|
|
216280
216475
|
config2.mcpServers = {};
|
|
216281
216476
|
}
|
|
216282
|
-
config2.mcpServers
|
|
216477
|
+
Object.assign(config2.mcpServers, serverConfigs);
|
|
216283
216478
|
} else if (client.id === "vscode") {
|
|
216284
216479
|
if (!config2["mcp.servers"]) {
|
|
216285
216480
|
config2["mcp.servers"] = {};
|
|
216286
216481
|
}
|
|
216287
|
-
config2["mcp.servers"]
|
|
216482
|
+
Object.assign(config2["mcp.servers"], serverConfigs);
|
|
216288
216483
|
}
|
|
216289
216484
|
await writeFile6(configPath, JSON.stringify(config2, null, 2), "utf-8");
|
|
216290
216485
|
}
|
|
216291
|
-
async function checkMcpServerInstalled(client) {
|
|
216486
|
+
async function checkMcpServerInstalled(client, serverType = "main") {
|
|
216292
216487
|
if (client.id === "goose") {
|
|
216293
216488
|
try {
|
|
216294
216489
|
const yaml = await Promise.resolve().then(() => __toESM(require_dist(), 1));
|
|
@@ -216297,7 +216492,14 @@ async function checkMcpServerInstalled(client) {
|
|
|
216297
216492
|
}
|
|
216298
216493
|
const configContent = await readFile6(client.configPath, "utf-8");
|
|
216299
216494
|
const config2 = yaml.parse(configContent);
|
|
216300
|
-
|
|
216495
|
+
if (serverType === "main") {
|
|
216496
|
+
return config2?.extensions?.enact?.enabled === true;
|
|
216497
|
+
} else if (serverType === "dev") {
|
|
216498
|
+
return config2?.extensions?.["enact-dev"]?.enabled === true;
|
|
216499
|
+
} else if (serverType === "both") {
|
|
216500
|
+
return config2?.extensions?.enact?.enabled === true && config2?.extensions?.["enact-dev"]?.enabled === true;
|
|
216501
|
+
}
|
|
216502
|
+
return false;
|
|
216301
216503
|
} catch (error2) {
|
|
216302
216504
|
return false;
|
|
216303
216505
|
}
|
|
@@ -216309,9 +216511,23 @@ async function checkMcpServerInstalled(client) {
|
|
|
216309
216511
|
const configContent = await readFile6(client.configPath, "utf-8");
|
|
216310
216512
|
const config2 = JSON.parse(configContent);
|
|
216311
216513
|
if (client.id === "claude-desktop" || client.id === "claude-code" || client.id === "gemini") {
|
|
216312
|
-
|
|
216514
|
+
const servers = config2.mcpServers || {};
|
|
216515
|
+
if (serverType === "main") {
|
|
216516
|
+
return Boolean(servers.enact);
|
|
216517
|
+
} else if (serverType === "dev") {
|
|
216518
|
+
return Boolean(servers["enact-dev"]);
|
|
216519
|
+
} else if (serverType === "both") {
|
|
216520
|
+
return Boolean(servers.enact) && Boolean(servers["enact-dev"]);
|
|
216521
|
+
}
|
|
216313
216522
|
} else if (client.id === "vscode") {
|
|
216314
|
-
|
|
216523
|
+
const servers = config2["mcp.servers"] || {};
|
|
216524
|
+
if (serverType === "main") {
|
|
216525
|
+
return Boolean(servers.enact);
|
|
216526
|
+
} else if (serverType === "dev") {
|
|
216527
|
+
return Boolean(servers["enact-dev"]);
|
|
216528
|
+
} else if (serverType === "both") {
|
|
216529
|
+
return Boolean(servers.enact) && Boolean(servers["enact-dev"]);
|
|
216530
|
+
}
|
|
216315
216531
|
}
|
|
216316
216532
|
return false;
|
|
216317
216533
|
} catch (error2) {
|
|
@@ -216803,7 +217019,7 @@ class DirectExecutionProvider extends ExecutionProvider {
|
|
|
216803
217019
|
}
|
|
216804
217020
|
if (verbose) {
|
|
216805
217021
|
try {
|
|
216806
|
-
const pc11 =
|
|
217022
|
+
const pc11 = require_picocolors2();
|
|
216807
217023
|
console.error(pc11.cyan(`
|
|
216808
217024
|
\uD83D\uDE80 Executing command:`));
|
|
216809
217025
|
console.error(pc11.white(command));
|
|
@@ -216897,7 +217113,7 @@ class DirectExecutionProvider extends ExecutionProvider {
|
|
|
216897
217113
|
if (code === 0) {
|
|
216898
217114
|
if (showSpinner || verbose) {
|
|
216899
217115
|
try {
|
|
216900
|
-
const pc11 =
|
|
217116
|
+
const pc11 = require_picocolors2();
|
|
216901
217117
|
console.error(pc11.green(`
|
|
216902
217118
|
✅ Tool executed successfully`));
|
|
216903
217119
|
if (stdout.trim() && !streamOutput) {
|
|
@@ -216918,7 +217134,7 @@ class DirectExecutionProvider extends ExecutionProvider {
|
|
|
216918
217134
|
} else {
|
|
216919
217135
|
if (showSpinner || verbose) {
|
|
216920
217136
|
try {
|
|
216921
|
-
const pc11 =
|
|
217137
|
+
const pc11 = require_picocolors2();
|
|
216922
217138
|
console.error(pc11.red(`
|
|
216923
217139
|
❌ Tool execution failed (exit code: ${code})`));
|
|
216924
217140
|
if (stderr.trim() && !streamOutput) {
|
|
@@ -216960,7 +217176,7 @@ class DirectExecutionProvider extends ExecutionProvider {
|
|
|
216960
217176
|
}
|
|
216961
217177
|
if (showSpinner || verbose) {
|
|
216962
217178
|
try {
|
|
216963
|
-
const pc11 =
|
|
217179
|
+
const pc11 = require_picocolors2();
|
|
216964
217180
|
console.error(pc11.red(`
|
|
216965
217181
|
❌ Failed to execute command: ${error2.message}`));
|
|
216966
217182
|
} catch (e2) {
|
|
@@ -225677,7 +225893,7 @@ class DaggerExecutionProvider extends ExecutionProvider {
|
|
|
225677
225893
|
if (verbose) {
|
|
225678
225894
|
const containerImage = tool?.from || this.options.baseImage;
|
|
225679
225895
|
try {
|
|
225680
|
-
const pc11 =
|
|
225896
|
+
const pc11 = require_picocolors2();
|
|
225681
225897
|
console.error(pc11.cyan(`
|
|
225682
225898
|
\uD83D\uDC33 Executing Enact command in Dagger container:`));
|
|
225683
225899
|
console.error(pc11.white(substitutedCommand));
|
|
@@ -228517,7 +228733,7 @@ class KeyManager {
|
|
|
228517
228733
|
static getAllTrustedPublicKeys() {
|
|
228518
228734
|
try {
|
|
228519
228735
|
this.ensureDirectories();
|
|
228520
|
-
return fs5.readdirSync(this.TRUSTED_KEYS_DIR).filter((file) => file.endsWith("
|
|
228736
|
+
return fs5.readdirSync(this.TRUSTED_KEYS_DIR).filter((file) => file.endsWith(".pem")).map((file) => {
|
|
228521
228737
|
try {
|
|
228522
228738
|
const publicKeyPem = fs5.readFileSync(path8.join(this.TRUSTED_KEYS_DIR, file), "utf8").trim();
|
|
228523
228739
|
return CryptoUtils.pemToHex(publicKeyPem, "PUBLIC");
|
|
@@ -229058,7 +229274,7 @@ class EnactCore {
|
|
|
229058
229274
|
};
|
|
229059
229275
|
const referenceSignature = {
|
|
229060
229276
|
signature: tool.signatures[0].value,
|
|
229061
|
-
publicKey:
|
|
229277
|
+
publicKey: "",
|
|
229062
229278
|
algorithm: tool.signatures[0].algorithm,
|
|
229063
229279
|
timestamp: new Date(tool.signatures[0].created).getTime()
|
|
229064
229280
|
};
|
|
@@ -229066,10 +229282,6 @@ class EnactCore {
|
|
|
229066
229282
|
const docString = JSON.stringify(canonicalDoc);
|
|
229067
229283
|
const messageHash = CryptoUtils.hash(docString);
|
|
229068
229284
|
const directVerify = CryptoUtils.verify(referenceSignature.publicKey, messageHash, referenceSignature.signature);
|
|
229069
|
-
console.log("Direct crypto verification result:", directVerify);
|
|
229070
|
-
const trustedKeys = KeyManager.getAllTrustedPublicKeys();
|
|
229071
|
-
console.log("Trusted keys:", trustedKeys);
|
|
229072
|
-
console.log("Is our public key trusted?", trustedKeys.includes(referenceSignature.publicKey));
|
|
229073
229285
|
const isValid = SigningService.verifyDocument(documentForVerification, referenceSignature, { includeFields: ["command"] });
|
|
229074
229286
|
console.log("Final verification result:", isValid);
|
|
229075
229287
|
if (!isValid) {
|
|
@@ -230104,8 +230316,8 @@ function displayResultsTable(results) {
|
|
|
230104
230316
|
console.error(`
|
|
230105
230317
|
` + import_picocolors13.default.bold("Search Results:"));
|
|
230106
230318
|
console.error("═".repeat(100));
|
|
230107
|
-
const nameWidth =
|
|
230108
|
-
const descWidth =
|
|
230319
|
+
const nameWidth = 40;
|
|
230320
|
+
const descWidth = 45;
|
|
230109
230321
|
const tagsWidth = 20;
|
|
230110
230322
|
console.error(import_picocolors13.default.bold(import_picocolors13.default.cyan("NAME".padEnd(nameWidth))) + " │ " + import_picocolors13.default.bold(import_picocolors13.default.cyan("DESCRIPTION".padEnd(descWidth))) + " │ " + import_picocolors13.default.bold(import_picocolors13.default.cyan("TAGS".padEnd(tagsWidth))));
|
|
230111
230323
|
console.error("─".repeat(nameWidth) + "─┼─" + "─".repeat(descWidth) + "─┼─" + "─".repeat(tagsWidth));
|
|
@@ -230576,7 +230788,8 @@ async function main() {
|
|
|
230576
230788
|
case "mcp":
|
|
230577
230789
|
await handleMcpCommand(commandArgs, {
|
|
230578
230790
|
help: values.help,
|
|
230579
|
-
client: values.client
|
|
230791
|
+
client: values.client,
|
|
230792
|
+
server: values.server
|
|
230580
230793
|
});
|
|
230581
230794
|
break;
|
|
230582
230795
|
case "config":
|
package/dist/index.js.bak
CHANGED
|
@@ -28,7 +28,7 @@ var __export = (target, all) => {
|
|
|
28
28
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
29
29
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
30
30
|
|
|
31
|
-
//
|
|
31
|
+
// node_modules/picocolors/picocolors.js
|
|
32
32
|
var require_picocolors = __commonJS((exports, module) => {
|
|
33
33
|
var p = process || {};
|
|
34
34
|
var argv = p.argv || [];
|
|
@@ -98,7 +98,7 @@ var require_picocolors = __commonJS((exports, module) => {
|
|
|
98
98
|
module.exports.createColors = createColors;
|
|
99
99
|
});
|
|
100
100
|
|
|
101
|
-
//
|
|
101
|
+
// node_modules/sisteransi/src/index.js
|
|
102
102
|
var require_src = __commonJS((exports, module) => {
|
|
103
103
|
var ESC = "\x1B";
|
|
104
104
|
var CSI = `${ESC}[`;
|
|
@@ -747,6 +747,76 @@ var init_env_loader = __esm(() => {
|
|
|
747
747
|
import_dotenv.config();
|
|
748
748
|
});
|
|
749
749
|
|
|
750
|
+
// ../../node_modules/picocolors/picocolors.js
|
|
751
|
+
var require_picocolors2 = __commonJS((exports, module) => {
|
|
752
|
+
var p2 = process || {};
|
|
753
|
+
var argv = p2.argv || [];
|
|
754
|
+
var env = p2.env || {};
|
|
755
|
+
var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p2.platform === "win32" || (p2.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
756
|
+
var formatter = (open, close, replace = open) => (input) => {
|
|
757
|
+
let string = "" + input, index = string.indexOf(close, open.length);
|
|
758
|
+
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
759
|
+
};
|
|
760
|
+
var replaceClose = (string, close, replace, index) => {
|
|
761
|
+
let result = "", cursor = 0;
|
|
762
|
+
do {
|
|
763
|
+
result += string.substring(cursor, index) + replace;
|
|
764
|
+
cursor = index + close.length;
|
|
765
|
+
index = string.indexOf(close, cursor);
|
|
766
|
+
} while (~index);
|
|
767
|
+
return result + string.substring(cursor);
|
|
768
|
+
};
|
|
769
|
+
var createColors = (enabled = isColorSupported) => {
|
|
770
|
+
let f = enabled ? formatter : () => String;
|
|
771
|
+
return {
|
|
772
|
+
isColorSupported: enabled,
|
|
773
|
+
reset: f("\x1B[0m", "\x1B[0m"),
|
|
774
|
+
bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
775
|
+
dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
776
|
+
italic: f("\x1B[3m", "\x1B[23m"),
|
|
777
|
+
underline: f("\x1B[4m", "\x1B[24m"),
|
|
778
|
+
inverse: f("\x1B[7m", "\x1B[27m"),
|
|
779
|
+
hidden: f("\x1B[8m", "\x1B[28m"),
|
|
780
|
+
strikethrough: f("\x1B[9m", "\x1B[29m"),
|
|
781
|
+
black: f("\x1B[30m", "\x1B[39m"),
|
|
782
|
+
red: f("\x1B[31m", "\x1B[39m"),
|
|
783
|
+
green: f("\x1B[32m", "\x1B[39m"),
|
|
784
|
+
yellow: f("\x1B[33m", "\x1B[39m"),
|
|
785
|
+
blue: f("\x1B[34m", "\x1B[39m"),
|
|
786
|
+
magenta: f("\x1B[35m", "\x1B[39m"),
|
|
787
|
+
cyan: f("\x1B[36m", "\x1B[39m"),
|
|
788
|
+
white: f("\x1B[37m", "\x1B[39m"),
|
|
789
|
+
gray: f("\x1B[90m", "\x1B[39m"),
|
|
790
|
+
bgBlack: f("\x1B[40m", "\x1B[49m"),
|
|
791
|
+
bgRed: f("\x1B[41m", "\x1B[49m"),
|
|
792
|
+
bgGreen: f("\x1B[42m", "\x1B[49m"),
|
|
793
|
+
bgYellow: f("\x1B[43m", "\x1B[49m"),
|
|
794
|
+
bgBlue: f("\x1B[44m", "\x1B[49m"),
|
|
795
|
+
bgMagenta: f("\x1B[45m", "\x1B[49m"),
|
|
796
|
+
bgCyan: f("\x1B[46m", "\x1B[49m"),
|
|
797
|
+
bgWhite: f("\x1B[47m", "\x1B[49m"),
|
|
798
|
+
blackBright: f("\x1B[90m", "\x1B[39m"),
|
|
799
|
+
redBright: f("\x1B[91m", "\x1B[39m"),
|
|
800
|
+
greenBright: f("\x1B[92m", "\x1B[39m"),
|
|
801
|
+
yellowBright: f("\x1B[93m", "\x1B[39m"),
|
|
802
|
+
blueBright: f("\x1B[94m", "\x1B[39m"),
|
|
803
|
+
magentaBright: f("\x1B[95m", "\x1B[39m"),
|
|
804
|
+
cyanBright: f("\x1B[96m", "\x1B[39m"),
|
|
805
|
+
whiteBright: f("\x1B[97m", "\x1B[39m"),
|
|
806
|
+
bgBlackBright: f("\x1B[100m", "\x1B[49m"),
|
|
807
|
+
bgRedBright: f("\x1B[101m", "\x1B[49m"),
|
|
808
|
+
bgGreenBright: f("\x1B[102m", "\x1B[49m"),
|
|
809
|
+
bgYellowBright: f("\x1B[103m", "\x1B[49m"),
|
|
810
|
+
bgBlueBright: f("\x1B[104m", "\x1B[49m"),
|
|
811
|
+
bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
|
|
812
|
+
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
|
|
813
|
+
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
|
814
|
+
};
|
|
815
|
+
};
|
|
816
|
+
module.exports = createColors();
|
|
817
|
+
module.exports.createColors = createColors;
|
|
818
|
+
});
|
|
819
|
+
|
|
750
820
|
// ../shared/dist/utils/help.js
|
|
751
821
|
import { readFileSync } from "fs";
|
|
752
822
|
import { join as join4 } from "path";
|
|
@@ -802,7 +872,7 @@ ${import_picocolors4.default.bold("More Help:")}
|
|
|
802
872
|
}
|
|
803
873
|
var import_picocolors4, __dirname = "/Users/keithgroves/projects/enact/enact-cli/packages/shared/dist/utils";
|
|
804
874
|
var init_help = __esm(() => {
|
|
805
|
-
import_picocolors4 = __toESM(
|
|
875
|
+
import_picocolors4 = __toESM(require_picocolors2(), 1);
|
|
806
876
|
});
|
|
807
877
|
|
|
808
878
|
// ../shared/dist/utils/logger.js
|
|
@@ -849,7 +919,7 @@ function table(data, columns) {
|
|
|
849
919
|
}
|
|
850
920
|
var import_picocolors5, LogLevel, currentLogLevel;
|
|
851
921
|
var init_logger = __esm(() => {
|
|
852
|
-
import_picocolors5 = __toESM(
|
|
922
|
+
import_picocolors5 = __toESM(require_picocolors2(), 1);
|
|
853
923
|
(function(LogLevel2) {
|
|
854
924
|
LogLevel2[LogLevel2["DEBUG"] = 0] = "DEBUG";
|
|
855
925
|
LogLevel2[LogLevel2["INFO"] = 1] = "INFO";
|
|
@@ -1110,7 +1180,7 @@ ${import_picocolors6.default.dim("A tool to create and publish enact documents."
|
|
|
1110
1180
|
}
|
|
1111
1181
|
var import_picocolors6, __filename = "/Users/keithgroves/projects/enact/enact-cli/packages/shared/dist/utils/version.js";
|
|
1112
1182
|
var init_version = __esm(() => {
|
|
1113
|
-
import_picocolors6 = __toESM(
|
|
1183
|
+
import_picocolors6 = __toESM(require_picocolors2(), 1);
|
|
1114
1184
|
});
|
|
1115
1185
|
|
|
1116
1186
|
// ../shared/dist/utils/index.js
|
|
@@ -12326,13 +12396,71 @@ var require_pino = __commonJS((exports, module) => {
|
|
|
12326
12396
|
module.exports.pino = pino;
|
|
12327
12397
|
});
|
|
12328
12398
|
|
|
12399
|
+
// ../../node_modules/sisteransi/src/index.js
|
|
12400
|
+
var require_src2 = __commonJS((exports, module) => {
|
|
12401
|
+
var ESC = "\x1B";
|
|
12402
|
+
var CSI = `${ESC}[`;
|
|
12403
|
+
var beep = "\x07";
|
|
12404
|
+
var cursor = {
|
|
12405
|
+
to(x2, y3) {
|
|
12406
|
+
if (!y3)
|
|
12407
|
+
return `${CSI}${x2 + 1}G`;
|
|
12408
|
+
return `${CSI}${y3 + 1};${x2 + 1}H`;
|
|
12409
|
+
},
|
|
12410
|
+
move(x2, y3) {
|
|
12411
|
+
let ret = "";
|
|
12412
|
+
if (x2 < 0)
|
|
12413
|
+
ret += `${CSI}${-x2}D`;
|
|
12414
|
+
else if (x2 > 0)
|
|
12415
|
+
ret += `${CSI}${x2}C`;
|
|
12416
|
+
if (y3 < 0)
|
|
12417
|
+
ret += `${CSI}${-y3}A`;
|
|
12418
|
+
else if (y3 > 0)
|
|
12419
|
+
ret += `${CSI}${y3}B`;
|
|
12420
|
+
return ret;
|
|
12421
|
+
},
|
|
12422
|
+
up: (count = 1) => `${CSI}${count}A`,
|
|
12423
|
+
down: (count = 1) => `${CSI}${count}B`,
|
|
12424
|
+
forward: (count = 1) => `${CSI}${count}C`,
|
|
12425
|
+
backward: (count = 1) => `${CSI}${count}D`,
|
|
12426
|
+
nextLine: (count = 1) => `${CSI}E`.repeat(count),
|
|
12427
|
+
prevLine: (count = 1) => `${CSI}F`.repeat(count),
|
|
12428
|
+
left: `${CSI}G`,
|
|
12429
|
+
hide: `${CSI}?25l`,
|
|
12430
|
+
show: `${CSI}?25h`,
|
|
12431
|
+
save: `${ESC}7`,
|
|
12432
|
+
restore: `${ESC}8`
|
|
12433
|
+
};
|
|
12434
|
+
var scroll = {
|
|
12435
|
+
up: (count = 1) => `${CSI}S`.repeat(count),
|
|
12436
|
+
down: (count = 1) => `${CSI}T`.repeat(count)
|
|
12437
|
+
};
|
|
12438
|
+
var erase = {
|
|
12439
|
+
screen: `${CSI}2J`,
|
|
12440
|
+
up: (count = 1) => `${CSI}1J`.repeat(count),
|
|
12441
|
+
down: (count = 1) => `${CSI}J`.repeat(count),
|
|
12442
|
+
line: `${CSI}2K`,
|
|
12443
|
+
lineEnd: `${CSI}K`,
|
|
12444
|
+
lineStart: `${CSI}1K`,
|
|
12445
|
+
lines(count) {
|
|
12446
|
+
let clear = "";
|
|
12447
|
+
for (let i = 0;i < count; i++)
|
|
12448
|
+
clear += this.line + (i < count - 1 ? cursor.up() : "");
|
|
12449
|
+
if (count)
|
|
12450
|
+
clear += cursor.left;
|
|
12451
|
+
return clear;
|
|
12452
|
+
}
|
|
12453
|
+
};
|
|
12454
|
+
module.exports = { cursor, scroll, erase, beep };
|
|
12455
|
+
});
|
|
12456
|
+
|
|
12329
12457
|
// ../../node_modules/@clack/core/dist/index.cjs
|
|
12330
12458
|
var require_dist2 = __commonJS((exports) => {
|
|
12331
|
-
var sisteransi =
|
|
12459
|
+
var sisteransi = require_src2();
|
|
12332
12460
|
var node_process = __require("node:process");
|
|
12333
12461
|
var s$2 = __require("node:readline");
|
|
12334
12462
|
var node_stream = __require("node:stream");
|
|
12335
|
-
var i$1 =
|
|
12463
|
+
var i$1 = require_picocolors2();
|
|
12336
12464
|
function _interopDefaultCompat(C3) {
|
|
12337
12465
|
return C3 && typeof C3 == "object" && "default" in C3 ? C3.default : C3;
|
|
12338
12466
|
}
|
|
@@ -12919,8 +13047,8 @@ var require_dist3 = __commonJS((exports) => {
|
|
|
12919
13047
|
var node_util = __require("node:util");
|
|
12920
13048
|
var core = require_dist2();
|
|
12921
13049
|
var process$1 = __require("node:process");
|
|
12922
|
-
var e2 =
|
|
12923
|
-
var sisteransi =
|
|
13050
|
+
var e2 = require_picocolors2();
|
|
13051
|
+
var sisteransi = require_src2();
|
|
12924
13052
|
function _interopDefaultCompat(t) {
|
|
12925
13053
|
return t && typeof t == "object" && "default" in t ? t.default : t;
|
|
12926
13054
|
}
|
|
@@ -37753,7 +37881,7 @@ var require_high_level_opt = __commonJS((exports, module) => {
|
|
|
37753
37881
|
]).reduce((set, kv) => (set[kv[0]] = kv[1], set), Object.create(null)) : {};
|
|
37754
37882
|
});
|
|
37755
37883
|
|
|
37756
|
-
// ../../node_modules/
|
|
37884
|
+
// ../../node_modules/minipass/index.js
|
|
37757
37885
|
var require_minipass = __commonJS((exports) => {
|
|
37758
37886
|
var proc = typeof process === "object" && process ? process : {
|
|
37759
37887
|
stdout: null,
|
|
@@ -213471,10 +213599,10 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
|
213471
213599
|
var import_picocolors14 = __toESM(require_picocolors(), 1);
|
|
213472
213600
|
import { parseArgs } from "util";
|
|
213473
213601
|
|
|
213474
|
-
//
|
|
213602
|
+
// node_modules/@clack/prompts/dist/index.mjs
|
|
213475
213603
|
import { stripVTControlCharacters as S2 } from "node:util";
|
|
213476
213604
|
|
|
213477
|
-
//
|
|
213605
|
+
// node_modules/@clack/core/dist/index.mjs
|
|
213478
213606
|
var import_sisteransi = __toESM(require_src(), 1);
|
|
213479
213607
|
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
213480
213608
|
import { stdin as j, stdout as M } from "node:process";
|
|
@@ -213921,7 +214049,7 @@ class RD extends x {
|
|
|
213921
214049
|
}
|
|
213922
214050
|
}
|
|
213923
214051
|
|
|
213924
|
-
//
|
|
214052
|
+
// node_modules/@clack/prompts/dist/index.mjs
|
|
213925
214053
|
var import_picocolors2 = __toESM(require_picocolors(), 1);
|
|
213926
214054
|
var import_sisteransi2 = __toESM(require_src(), 1);
|
|
213927
214055
|
import y2 from "node:process";
|
|
@@ -216057,6 +216185,23 @@ var MCP_CLIENTS = {
|
|
|
216057
216185
|
}
|
|
216058
216186
|
}
|
|
216059
216187
|
};
|
|
216188
|
+
var MCP_SERVERS = {
|
|
216189
|
+
main: {
|
|
216190
|
+
name: "Enact MCP Server",
|
|
216191
|
+
description: "Main server for tool execution, search, and environment management",
|
|
216192
|
+
package: "@enactprotocol/mcp-server"
|
|
216193
|
+
},
|
|
216194
|
+
dev: {
|
|
216195
|
+
name: "Enact MCP Dev Server",
|
|
216196
|
+
description: "Development server for creating, testing, validating, and publishing tools",
|
|
216197
|
+
package: "@enactprotocol/mcp-dev-server"
|
|
216198
|
+
},
|
|
216199
|
+
both: {
|
|
216200
|
+
name: "Both Servers",
|
|
216201
|
+
description: "Install both main and development servers",
|
|
216202
|
+
package: "both"
|
|
216203
|
+
}
|
|
216204
|
+
};
|
|
216060
216205
|
async function handleMcpCommand(args, options) {
|
|
216061
216206
|
if (options.help || !args[0]) {
|
|
216062
216207
|
console.error(`
|
|
@@ -216065,13 +216210,14 @@ Usage: enact mcp <subcommand> [options]
|
|
|
216065
216210
|
Manages MCP (Model Context Protocol) client integrations.
|
|
216066
216211
|
|
|
216067
216212
|
Subcommands:
|
|
216068
|
-
install Install Enact MCP server to MCP clients
|
|
216213
|
+
install Install Enact MCP server(s) to MCP clients
|
|
216069
216214
|
list List detected MCP clients
|
|
216070
216215
|
status Show MCP integration status
|
|
216071
216216
|
|
|
216072
216217
|
Options:
|
|
216073
216218
|
--help, -h Show this help message
|
|
216074
216219
|
--client <name> Target specific client (claude-desktop, claude-code, vscode, goose, gemini)
|
|
216220
|
+
--server <type> Choose server type (main, dev, both) - default: main
|
|
216075
216221
|
`);
|
|
216076
216222
|
return;
|
|
216077
216223
|
}
|
|
@@ -216109,6 +216255,20 @@ Supported clients:
|
|
|
216109
216255
|
return;
|
|
216110
216256
|
}
|
|
216111
216257
|
let targetClient = options.client;
|
|
216258
|
+
let serverType = options.server || "main";
|
|
216259
|
+
if (!MCP_SERVERS[serverType]) {
|
|
216260
|
+
console.error(import_picocolors11.default.red(`Invalid server type: ${serverType}. Valid options: main, dev, both`));
|
|
216261
|
+
process.exit(1);
|
|
216262
|
+
}
|
|
216263
|
+
if (!options.server) {
|
|
216264
|
+
serverType = await ve({
|
|
216265
|
+
message: "Which MCP server(s) would you like to install?",
|
|
216266
|
+
options: Object.entries(MCP_SERVERS).map(([key, config2]) => ({
|
|
216267
|
+
value: key,
|
|
216268
|
+
label: `${config2.name} - ${config2.description}`
|
|
216269
|
+
}))
|
|
216270
|
+
});
|
|
216271
|
+
}
|
|
216112
216272
|
if (!targetClient) {
|
|
216113
216273
|
if (detectedClients.length === 1) {
|
|
216114
216274
|
targetClient = detectedClients[0].id;
|
|
@@ -216132,10 +216292,11 @@ Supported clients:
|
|
|
216132
216292
|
console.error(import_picocolors11.default.red(`Client "${targetClient}" not found or not detected.`));
|
|
216133
216293
|
process.exit(1);
|
|
216134
216294
|
}
|
|
216135
|
-
const isAlreadyInstalled = await checkMcpServerInstalled(selectedClient);
|
|
216295
|
+
const isAlreadyInstalled = await checkMcpServerInstalled(selectedClient, serverType);
|
|
216136
216296
|
if (isAlreadyInstalled) {
|
|
216297
|
+
const serverConfig2 = MCP_SERVERS[serverType];
|
|
216137
216298
|
const shouldReinstall = await ye({
|
|
216138
|
-
message:
|
|
216299
|
+
message: `${serverConfig2.name} is already installed in ${selectedClient.name}. Do you want to reinstall it?`
|
|
216139
216300
|
});
|
|
216140
216301
|
if (!shouldReinstall) {
|
|
216141
216302
|
Se("Installation cancelled.");
|
|
@@ -216143,11 +216304,14 @@ Supported clients:
|
|
|
216143
216304
|
}
|
|
216144
216305
|
}
|
|
216145
216306
|
const s = Y2();
|
|
216146
|
-
|
|
216147
|
-
|
|
216148
|
-
|
|
216149
|
-
|
|
216150
|
-
|
|
216307
|
+
const serverConfig = MCP_SERVERS[serverType];
|
|
216308
|
+
s.start(`Installing ${serverConfig.name}...`);
|
|
216309
|
+
await installMcpServer(selectedClient, serverType);
|
|
216310
|
+
s.stop(`✓ ${serverConfig.name} installation process completed`);
|
|
216311
|
+
const successMessage = serverType === "both" ? `✓ Added both 'enact' and 'enact-dev' MCP servers to ${selectedClient.name}
|
|
216312
|
+
` : `✓ Added '${serverType === "main" ? "enact" : "enact-dev"}' MCP server to ${selectedClient.name}
|
|
216313
|
+
`;
|
|
216314
|
+
Me(import_picocolors11.default.green(successMessage) + import_picocolors11.default.cyan(`→ Please restart ${selectedClient.name} to enable the MCP server(s)
|
|
216151
216315
|
`) + import_picocolors11.default.cyan(`→ Look for the MCP tools icon in the chat interface`), "Installation complete");
|
|
216152
216316
|
Se("MCP server installation completed!");
|
|
216153
216317
|
} catch (error2) {
|
|
@@ -216178,8 +216342,18 @@ async function handleStatusCommand() {
|
|
|
216178
216342
|
return;
|
|
216179
216343
|
}
|
|
216180
216344
|
for (const client of detectedClients) {
|
|
216181
|
-
const
|
|
216182
|
-
const
|
|
216345
|
+
const mainInstalled = await checkMcpServerInstalled(client, "main");
|
|
216346
|
+
const devInstalled = await checkMcpServerInstalled(client, "dev");
|
|
216347
|
+
let status = "";
|
|
216348
|
+
if (mainInstalled && devInstalled) {
|
|
216349
|
+
status = import_picocolors11.default.green("✓ Main + Dev servers");
|
|
216350
|
+
} else if (mainInstalled) {
|
|
216351
|
+
status = import_picocolors11.default.green("✓ Main server") + import_picocolors11.default.yellow(" (Dev server not installed)");
|
|
216352
|
+
} else if (devInstalled) {
|
|
216353
|
+
status = import_picocolors11.default.green("✓ Dev server") + import_picocolors11.default.yellow(" (Main server not installed)");
|
|
216354
|
+
} else {
|
|
216355
|
+
status = import_picocolors11.default.yellow("○ Not installed");
|
|
216356
|
+
}
|
|
216183
216357
|
Me(`${status}
|
|
216184
216358
|
Config: ${client.configPath}`, client.name);
|
|
216185
216359
|
}
|
|
@@ -216221,10 +216395,9 @@ async function detectMcpClients() {
|
|
|
216221
216395
|
}
|
|
216222
216396
|
return detected;
|
|
216223
216397
|
}
|
|
216224
|
-
async function installMcpServer(client) {
|
|
216398
|
+
async function installMcpServer(client, serverType = "main") {
|
|
216225
216399
|
if (client.id === "goose") {
|
|
216226
216400
|
try {
|
|
216227
|
-
const extensionName = "Enact Tools";
|
|
216228
216401
|
const yaml = await Promise.resolve().then(() => __toESM(require_dist(), 1));
|
|
216229
216402
|
const configPath2 = client.configPath;
|
|
216230
216403
|
const configDir2 = join8(configPath2, "..");
|
|
@@ -216241,16 +216414,29 @@ async function installMcpServer(client) {
|
|
|
216241
216414
|
if (!config3.extensions) {
|
|
216242
216415
|
config3.extensions = {};
|
|
216243
216416
|
}
|
|
216244
|
-
|
|
216245
|
-
|
|
216246
|
-
|
|
216247
|
-
|
|
216248
|
-
|
|
216249
|
-
|
|
216250
|
-
|
|
216251
|
-
|
|
216417
|
+
if (serverType === "main" || serverType === "both") {
|
|
216418
|
+
config3.extensions.enact = {
|
|
216419
|
+
name: "enact",
|
|
216420
|
+
cmd: "npx",
|
|
216421
|
+
args: ["-y", "@enactprotocol/mcp-server"],
|
|
216422
|
+
enabled: true,
|
|
216423
|
+
type: "stdio",
|
|
216424
|
+
timeout: 300
|
|
216425
|
+
};
|
|
216426
|
+
}
|
|
216427
|
+
if (serverType === "dev" || serverType === "both") {
|
|
216428
|
+
config3.extensions["enact-dev"] = {
|
|
216429
|
+
name: "enact-dev",
|
|
216430
|
+
cmd: "npx",
|
|
216431
|
+
args: ["-y", "@enactprotocol/mcp-dev-server"],
|
|
216432
|
+
enabled: true,
|
|
216433
|
+
type: "stdio",
|
|
216434
|
+
timeout: 300
|
|
216435
|
+
};
|
|
216436
|
+
}
|
|
216252
216437
|
await writeFile6(configPath2, yaml.stringify(config3), "utf-8");
|
|
216253
|
-
|
|
216438
|
+
const serverConfig = MCP_SERVERS[serverType];
|
|
216439
|
+
Me(import_picocolors11.default.green(`✓ Successfully added '${serverConfig.name}' extension to Goose configuration
|
|
216254
216440
|
`) + import_picocolors11.default.cyan(`→ The extension is now available in your Goose AI sessions
|
|
216255
216441
|
`) + import_picocolors11.default.cyan(`→ Restart Goose if it's currently running`), "Installation complete");
|
|
216256
216442
|
} catch (error2) {
|
|
@@ -216270,24 +216456,33 @@ async function installMcpServer(client) {
|
|
|
216270
216456
|
console.warn(import_picocolors11.default.yellow(`Warning: Could not parse existing config at ${configPath}. Creating new config.`));
|
|
216271
216457
|
}
|
|
216272
216458
|
}
|
|
216273
|
-
const
|
|
216274
|
-
|
|
216275
|
-
|
|
216276
|
-
|
|
216459
|
+
const serverConfigs = {};
|
|
216460
|
+
if (serverType === "main" || serverType === "both") {
|
|
216461
|
+
serverConfigs.enact = {
|
|
216462
|
+
command: "npx",
|
|
216463
|
+
args: ["-y", "@enactprotocol/mcp-server"]
|
|
216464
|
+
};
|
|
216465
|
+
}
|
|
216466
|
+
if (serverType === "dev" || serverType === "both") {
|
|
216467
|
+
serverConfigs["enact-dev"] = {
|
|
216468
|
+
command: "npx",
|
|
216469
|
+
args: ["-y", "@enactprotocol/mcp-dev-server"]
|
|
216470
|
+
};
|
|
216471
|
+
}
|
|
216277
216472
|
if (client.id === "claude-desktop" || client.id === "claude-code" || client.id === "gemini") {
|
|
216278
216473
|
if (!config2.mcpServers) {
|
|
216279
216474
|
config2.mcpServers = {};
|
|
216280
216475
|
}
|
|
216281
|
-
config2.mcpServers
|
|
216476
|
+
Object.assign(config2.mcpServers, serverConfigs);
|
|
216282
216477
|
} else if (client.id === "vscode") {
|
|
216283
216478
|
if (!config2["mcp.servers"]) {
|
|
216284
216479
|
config2["mcp.servers"] = {};
|
|
216285
216480
|
}
|
|
216286
|
-
config2["mcp.servers"]
|
|
216481
|
+
Object.assign(config2["mcp.servers"], serverConfigs);
|
|
216287
216482
|
}
|
|
216288
216483
|
await writeFile6(configPath, JSON.stringify(config2, null, 2), "utf-8");
|
|
216289
216484
|
}
|
|
216290
|
-
async function checkMcpServerInstalled(client) {
|
|
216485
|
+
async function checkMcpServerInstalled(client, serverType = "main") {
|
|
216291
216486
|
if (client.id === "goose") {
|
|
216292
216487
|
try {
|
|
216293
216488
|
const yaml = await Promise.resolve().then(() => __toESM(require_dist(), 1));
|
|
@@ -216296,7 +216491,14 @@ async function checkMcpServerInstalled(client) {
|
|
|
216296
216491
|
}
|
|
216297
216492
|
const configContent = await readFile6(client.configPath, "utf-8");
|
|
216298
216493
|
const config2 = yaml.parse(configContent);
|
|
216299
|
-
|
|
216494
|
+
if (serverType === "main") {
|
|
216495
|
+
return config2?.extensions?.enact?.enabled === true;
|
|
216496
|
+
} else if (serverType === "dev") {
|
|
216497
|
+
return config2?.extensions?.["enact-dev"]?.enabled === true;
|
|
216498
|
+
} else if (serverType === "both") {
|
|
216499
|
+
return config2?.extensions?.enact?.enabled === true && config2?.extensions?.["enact-dev"]?.enabled === true;
|
|
216500
|
+
}
|
|
216501
|
+
return false;
|
|
216300
216502
|
} catch (error2) {
|
|
216301
216503
|
return false;
|
|
216302
216504
|
}
|
|
@@ -216308,9 +216510,23 @@ async function checkMcpServerInstalled(client) {
|
|
|
216308
216510
|
const configContent = await readFile6(client.configPath, "utf-8");
|
|
216309
216511
|
const config2 = JSON.parse(configContent);
|
|
216310
216512
|
if (client.id === "claude-desktop" || client.id === "claude-code" || client.id === "gemini") {
|
|
216311
|
-
|
|
216513
|
+
const servers = config2.mcpServers || {};
|
|
216514
|
+
if (serverType === "main") {
|
|
216515
|
+
return Boolean(servers.enact);
|
|
216516
|
+
} else if (serverType === "dev") {
|
|
216517
|
+
return Boolean(servers["enact-dev"]);
|
|
216518
|
+
} else if (serverType === "both") {
|
|
216519
|
+
return Boolean(servers.enact) && Boolean(servers["enact-dev"]);
|
|
216520
|
+
}
|
|
216312
216521
|
} else if (client.id === "vscode") {
|
|
216313
|
-
|
|
216522
|
+
const servers = config2["mcp.servers"] || {};
|
|
216523
|
+
if (serverType === "main") {
|
|
216524
|
+
return Boolean(servers.enact);
|
|
216525
|
+
} else if (serverType === "dev") {
|
|
216526
|
+
return Boolean(servers["enact-dev"]);
|
|
216527
|
+
} else if (serverType === "both") {
|
|
216528
|
+
return Boolean(servers.enact) && Boolean(servers["enact-dev"]);
|
|
216529
|
+
}
|
|
216314
216530
|
}
|
|
216315
216531
|
return false;
|
|
216316
216532
|
} catch (error2) {
|
|
@@ -216802,7 +217018,7 @@ class DirectExecutionProvider extends ExecutionProvider {
|
|
|
216802
217018
|
}
|
|
216803
217019
|
if (verbose) {
|
|
216804
217020
|
try {
|
|
216805
|
-
const pc11 =
|
|
217021
|
+
const pc11 = require_picocolors2();
|
|
216806
217022
|
console.error(pc11.cyan(`
|
|
216807
217023
|
\uD83D\uDE80 Executing command:`));
|
|
216808
217024
|
console.error(pc11.white(command));
|
|
@@ -216896,7 +217112,7 @@ class DirectExecutionProvider extends ExecutionProvider {
|
|
|
216896
217112
|
if (code === 0) {
|
|
216897
217113
|
if (showSpinner || verbose) {
|
|
216898
217114
|
try {
|
|
216899
|
-
const pc11 =
|
|
217115
|
+
const pc11 = require_picocolors2();
|
|
216900
217116
|
console.error(pc11.green(`
|
|
216901
217117
|
✅ Tool executed successfully`));
|
|
216902
217118
|
if (stdout.trim() && !streamOutput) {
|
|
@@ -216917,7 +217133,7 @@ class DirectExecutionProvider extends ExecutionProvider {
|
|
|
216917
217133
|
} else {
|
|
216918
217134
|
if (showSpinner || verbose) {
|
|
216919
217135
|
try {
|
|
216920
|
-
const pc11 =
|
|
217136
|
+
const pc11 = require_picocolors2();
|
|
216921
217137
|
console.error(pc11.red(`
|
|
216922
217138
|
❌ Tool execution failed (exit code: ${code})`));
|
|
216923
217139
|
if (stderr.trim() && !streamOutput) {
|
|
@@ -216959,7 +217175,7 @@ class DirectExecutionProvider extends ExecutionProvider {
|
|
|
216959
217175
|
}
|
|
216960
217176
|
if (showSpinner || verbose) {
|
|
216961
217177
|
try {
|
|
216962
|
-
const pc11 =
|
|
217178
|
+
const pc11 = require_picocolors2();
|
|
216963
217179
|
console.error(pc11.red(`
|
|
216964
217180
|
❌ Failed to execute command: ${error2.message}`));
|
|
216965
217181
|
} catch (e2) {
|
|
@@ -225676,7 +225892,7 @@ class DaggerExecutionProvider extends ExecutionProvider {
|
|
|
225676
225892
|
if (verbose) {
|
|
225677
225893
|
const containerImage = tool?.from || this.options.baseImage;
|
|
225678
225894
|
try {
|
|
225679
|
-
const pc11 =
|
|
225895
|
+
const pc11 = require_picocolors2();
|
|
225680
225896
|
console.error(pc11.cyan(`
|
|
225681
225897
|
\uD83D\uDC33 Executing Enact command in Dagger container:`));
|
|
225682
225898
|
console.error(pc11.white(substitutedCommand));
|
|
@@ -228516,7 +228732,7 @@ class KeyManager {
|
|
|
228516
228732
|
static getAllTrustedPublicKeys() {
|
|
228517
228733
|
try {
|
|
228518
228734
|
this.ensureDirectories();
|
|
228519
|
-
return fs5.readdirSync(this.TRUSTED_KEYS_DIR).filter((file) => file.endsWith("
|
|
228735
|
+
return fs5.readdirSync(this.TRUSTED_KEYS_DIR).filter((file) => file.endsWith(".pem")).map((file) => {
|
|
228520
228736
|
try {
|
|
228521
228737
|
const publicKeyPem = fs5.readFileSync(path8.join(this.TRUSTED_KEYS_DIR, file), "utf8").trim();
|
|
228522
228738
|
return CryptoUtils.pemToHex(publicKeyPem, "PUBLIC");
|
|
@@ -229057,7 +229273,7 @@ class EnactCore {
|
|
|
229057
229273
|
};
|
|
229058
229274
|
const referenceSignature = {
|
|
229059
229275
|
signature: tool.signatures[0].value,
|
|
229060
|
-
publicKey:
|
|
229276
|
+
publicKey: "",
|
|
229061
229277
|
algorithm: tool.signatures[0].algorithm,
|
|
229062
229278
|
timestamp: new Date(tool.signatures[0].created).getTime()
|
|
229063
229279
|
};
|
|
@@ -229065,10 +229281,6 @@ class EnactCore {
|
|
|
229065
229281
|
const docString = JSON.stringify(canonicalDoc);
|
|
229066
229282
|
const messageHash = CryptoUtils.hash(docString);
|
|
229067
229283
|
const directVerify = CryptoUtils.verify(referenceSignature.publicKey, messageHash, referenceSignature.signature);
|
|
229068
|
-
console.log("Direct crypto verification result:", directVerify);
|
|
229069
|
-
const trustedKeys = KeyManager.getAllTrustedPublicKeys();
|
|
229070
|
-
console.log("Trusted keys:", trustedKeys);
|
|
229071
|
-
console.log("Is our public key trusted?", trustedKeys.includes(referenceSignature.publicKey));
|
|
229072
229284
|
const isValid = SigningService.verifyDocument(documentForVerification, referenceSignature, { includeFields: ["command"] });
|
|
229073
229285
|
console.log("Final verification result:", isValid);
|
|
229074
229286
|
if (!isValid) {
|
|
@@ -230103,8 +230315,8 @@ function displayResultsTable(results) {
|
|
|
230103
230315
|
console.error(`
|
|
230104
230316
|
` + import_picocolors13.default.bold("Search Results:"));
|
|
230105
230317
|
console.error("═".repeat(100));
|
|
230106
|
-
const nameWidth =
|
|
230107
|
-
const descWidth =
|
|
230318
|
+
const nameWidth = 40;
|
|
230319
|
+
const descWidth = 45;
|
|
230108
230320
|
const tagsWidth = 20;
|
|
230109
230321
|
console.error(import_picocolors13.default.bold(import_picocolors13.default.cyan("NAME".padEnd(nameWidth))) + " │ " + import_picocolors13.default.bold(import_picocolors13.default.cyan("DESCRIPTION".padEnd(descWidth))) + " │ " + import_picocolors13.default.bold(import_picocolors13.default.cyan("TAGS".padEnd(tagsWidth))));
|
|
230110
230322
|
console.error("─".repeat(nameWidth) + "─┼─" + "─".repeat(descWidth) + "─┼─" + "─".repeat(tagsWidth));
|
|
@@ -230575,7 +230787,8 @@ async function main() {
|
|
|
230575
230787
|
case "mcp":
|
|
230576
230788
|
await handleMcpCommand(commandArgs, {
|
|
230577
230789
|
help: values.help,
|
|
230578
|
-
client: values.client
|
|
230790
|
+
client: values.client,
|
|
230791
|
+
server: values.server
|
|
230579
230792
|
});
|
|
230580
230793
|
break;
|
|
230581
230794
|
case "config":
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enactprotocol/cli",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"description": "Official CLI for the Enact Protocol - package, secure, and discover AI tools",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"node": ">=18.0.0"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@enactprotocol/shared": "1.2.
|
|
45
|
+
"@enactprotocol/shared": "1.2.3",
|
|
46
46
|
"@clack/core": "^0.4.2",
|
|
47
47
|
"@clack/prompts": "^0.10.1",
|
|
48
48
|
"picocolors": "^1.1.1"
|