Files
Netcatty/electron/mcp/netcattyMcpInstructions.test.cjs
T
Ryanisgoodandbincxz 3738565b1b feat(mcp): improve external agent discovery and setup (#3407)
* fix(ai): expose renamed terminal session labels

* feat(mcp): guide agents toward Netcatty tools

* feat(mcp): load Netcatty toolsets on demand

* feat(codex): install Netcatty skill with external MCP

* feat(mcp): install skills for Claude Code and Grok

* feat(mcp): add universal client setup prompt

* fix(mcp): keep Cursor in client setup tabs

* chore(ai): refresh generated tool specs

* fix(mcp): honor Claude skill config root and run MCP tests in CI

---------

Co-authored-by: bincxz <16399091+binaricat@users.noreply.github.com>
2026-09-18 14:10:20 +08:00

30 lines
1.2 KiB
JavaScript

"use strict";
const test = require("node:test");
const assert = require("node:assert/strict");
const fs = require("node:fs");
const path = require("node:path");
const {
NETCATTY_MCP_SERVER_INSTRUCTIONS,
} = require("./netcattyMcpInstructions.cjs");
test("MCP server instructions route Netcatty terminal work through environment discovery", () => {
assert.ok(NETCATTY_MCP_SERVER_INSTRUCTIONS.length <= 512);
assert.match(NETCATTY_MCP_SERVER_INSTRUCTIONS, /call get_environment first/i);
assert.match(NETCATTY_MCP_SERVER_INSTRUCTIONS, /label or hostname/i);
assert.match(NETCATTY_MCP_SERVER_INSTRUCTIONS, /sessionId/);
assert.match(NETCATTY_MCP_SERVER_INSTRUCTIONS, /Never use the local shell/i);
assert.match(NETCATTY_MCP_SERVER_INSTRUCTIONS, /vault_hosts_list and host_open/);
assert.match(NETCATTY_MCP_SERVER_INSTRUCTIONS, /load_netcatty_tools/);
assert.match(NETCATTY_MCP_SERVER_INSTRUCTIONS, /15 core tools/);
});
test("stdio MCP server publishes the routing instructions during initialization", () => {
const source = fs.readFileSync(
path.join(__dirname, "netcatty-mcp-server.cjs"),
"utf8",
);
assert.match(source, /instructions:\s*NETCATTY_MCP_SERVER_INSTRUCTIONS/);
});