Compare commits

...
1 Commits
3 changed files with 16 additions and 3 deletions

No files matched your search

+6 -2
View File
@@ -12,14 +12,18 @@ if not defined APP_EXE if exist "%SCRIPT_DIR%..\..\..\..\netcatty.exe" set "APP_
if defined APP_EXE (
set "ELECTRON_RUN_AS_NODE=1"
"%APP_EXE%" "%SERVER_SCRIPT%" %*
exit /b %ERRORLEVEL%
goto :runtime_exit
)
where node >nul 2>nul
if not errorlevel 1 (
node "%SERVER_SCRIPT%" %*
exit /b %ERRORLEVEL%
goto :runtime_exit
)
echo Failed to locate the bundled Netcatty runtime for netcatty-external-mcp. 1>&2
exit /b 1
:runtime_exit
rem Read ERRORLEVEL outside the IF blocks to avoid expansion before the runtime runs.
exit /b %ERRORLEVEL%
+4 -1
View File
@@ -40,6 +40,9 @@ const DEFERRED_MCP_TOOLSETS = Object.freeze({
"list_attachments",
"read_attachment",
]),
remote_desktop: Object.freeze([
"remote_desktop_read_screen",
]),
sftp_advanced: Object.freeze([
"sftp_stat",
"sftp_home",
@@ -154,7 +157,7 @@ function registerProgressiveMcpTools(server, deps, toolDefs = listMcpTools()) {
server.tool(
MCP_TOOL_LOADER_NAME,
"Load more Netcatty tools by category. Choose terminal_bulk, sessions, attachments, sftp_advanced, vault_hosts, vault_notes, snippets, scripts, portforward, or all. Newly loaded tools appear immediately without restarting the MCP server.",
"Load more Netcatty tools by category. Choose terminal_bulk, sessions, attachments, remote_desktop, sftp_advanced, vault_hosts, vault_notes, snippets, scripts, portforward, or all. Newly loaded tools appear immediately without restarting the MCP server.",
{
toolset: z.enum(LOADABLE_MCP_TOOLSET_NAMES).describe("Netcatty tool category to load"),
},
@@ -74,6 +74,11 @@ test("progressive MCP catalog assigns every non-core catalog tool exactly once",
assert.doesNotThrow(() => buildProgressiveMcpCatalog());
});
test("remote desktop screen reading is deferred rather than core", () => {
assert.deepEqual(DEFERRED_MCP_TOOLSETS.remote_desktop, ["remote_desktop_read_screen"]);
assert.equal(CORE_MCP_TOOL_NAMES.includes("remote_desktop_read_screen"), false);
});
test("progressive MCP registration initially exposes exactly 15 core tools", () => {
const server = createFakeServer();
const result = registerProgressiveMcpTools(server, createDeps());
@@ -116,6 +121,7 @@ test("loading all makes every catalog MCP tool available", async () => {
assert.equal(result.loadedCatalogToolCount, catalogNames.length);
assert.equal(result.visibleToolCount, catalogNames.length + 1);
assert.equal(result.remainingCatalogToolCount, 0);
assert.equal(server.handlers.has("remote_desktop_read_screen"), true);
assert.deepEqual(
new Set(server.registrations),
new Set([MCP_TOOL_LOADER_NAME, ...catalogNames]),