@@ -2396,6 +2396,235 @@ VerificationTest[
23962396 TestID -> "InstallMCPServer-Zed-PreserveExisting-Cleanup@@Tests/InstallMCPServer.wlt:2392,1-2397,2"
23972397]
23982398
2399+ (* ::**************************************************************************************************************:: *)
2400+ (* ::Section::Closed:: *)
2401+ (*Junie Support*)
2402+
2403+ (* ::**************************************************************************************************************:: *)
2404+ (* ::Subsection::Closed:: *)
2405+ (*Install Location for Junie*)
2406+ VerificationTest [
2407+ Wolfram ` AgentTools ` Common ` installLocation [ "Junie" , "Windows" ],
2408+ _ File ,
2409+ SameTest -> MatchQ ,
2410+ TestID -> "InstallLocation-Junie-Windows"
2411+ ]
2412+
2413+ VerificationTest [
2414+ Wolfram ` AgentTools ` Common ` installLocation [ "Junie" , "MacOSX" ],
2415+ _ File ,
2416+ SameTest -> MatchQ ,
2417+ TestID -> "InstallLocation-Junie-MacOSX"
2418+ ]
2419+
2420+ VerificationTest [
2421+ Wolfram ` AgentTools ` Common ` installLocation [ "Junie" , "Unix" ],
2422+ _ File ,
2423+ SameTest -> MatchQ ,
2424+ TestID -> "InstallLocation-Junie-Unix"
2425+ ]
2426+
2427+ (* Junie's user-scope path is .junie/mcp/mcp.json under $HomeDirectory on every OS *)
2428+ VerificationTest [
2429+ Module [ { file , split },
2430+ file = Wolfram ` AgentTools ` Common ` installLocation [ "Junie" , $OperatingSystem ];
2431+ split = FileNameSplit @ First @ file ;
2432+ Take [ split , - 3 ]
2433+ ],
2434+ { ".junie" , "mcp" , "mcp.json" },
2435+ SameTest -> Equal ,
2436+ TestID -> "InstallLocation-Junie-PathShape"
2437+ ]
2438+
2439+ (* ::**************************************************************************************************************:: *)
2440+ (* ::Subsection::Closed:: *)
2441+ (*Name Normalization*)
2442+ VerificationTest [
2443+ Wolfram ` AgentTools ` Common ` toInstallName [ "Junie" ],
2444+ "Junie" ,
2445+ SameTest -> Equal ,
2446+ TestID -> "ToInstallName-Junie"
2447+ ]
2448+
2449+ VerificationTest [
2450+ Wolfram ` AgentTools ` Common ` toInstallName [ "JetBrainsJunie" ],
2451+ "Junie" ,
2452+ SameTest -> Equal ,
2453+ TestID -> "ToInstallName-JetBrainsJunie"
2454+ ]
2455+
2456+ VerificationTest [
2457+ Wolfram ` AgentTools ` InstallMCPServer ` Private ` installDisplayName [ "Junie" ],
2458+ "Junie" ,
2459+ SameTest -> Equal ,
2460+ TestID -> "InstallDisplayName-Junie"
2461+ ]
2462+
2463+ (* ::**************************************************************************************************************:: *)
2464+ (* ::Subsection::Closed:: *)
2465+ (*Junie Install and Uninstall*)
2466+ VerificationTest [
2467+ junieConfigFile = testConfigFile [];
2468+ installResult = InstallMCPServer [ junieConfigFile , "WolframLanguage" , "VerifyLLMKit" -> False , "ApplicationName" -> "Junie" ],
2469+ _ Success ,
2470+ SameTest -> MatchQ ,
2471+ TestID -> "InstallMCPServer-Junie-Basic"
2472+ ]
2473+
2474+ VerificationTest [
2475+ FileExistsQ [ junieConfigFile ],
2476+ True ,
2477+ SameTest -> Equal ,
2478+ TestID -> "InstallMCPServer-Junie-FileExists"
2479+ ]
2480+
2481+ VerificationTest [
2482+ Module [ { content },
2483+ content = Import [ junieConfigFile , "RawJSON" ];
2484+ KeyExistsQ [ content , "mcpServers" ] && KeyExistsQ [ content [ "mcpServers" ], "Wolfram" ]
2485+ ],
2486+ True ,
2487+ SameTest -> Equal ,
2488+ TestID -> "InstallMCPServer-Junie-VerifyContent"
2489+ ]
2490+
2491+ (* Junie uses the standard mcpServers format: no Cline-style disabled/autoApprove fields,
2492+ no Copilot-style tools field, no OpenCode-style top-level "mcp" key *)
2493+ VerificationTest [
2494+ Module [ { content , server },
2495+ content = Import [ junieConfigFile , "RawJSON" ];
2496+ server = content [ "mcpServers" , "Wolfram" ];
2497+ AssociationQ @ server &&
2498+ KeyExistsQ [ server , "command" ] &&
2499+ ! KeyExistsQ [ server , "disabled" ] &&
2500+ ! KeyExistsQ [ server , "autoApprove" ] &&
2501+ ! KeyExistsQ [ server , "tools" ]
2502+ ],
2503+ True ,
2504+ SameTest -> Equal ,
2505+ TestID -> "InstallMCPServer-Junie-StandardFormat"
2506+ ]
2507+
2508+ VerificationTest [
2509+ uninstallResult = UninstallMCPServer [ junieConfigFile , "WolframLanguage" , "ApplicationName" -> "Junie" ],
2510+ _ Success ,
2511+ SameTest -> MatchQ ,
2512+ TestID -> "UninstallMCPServer-Junie-Basic"
2513+ ]
2514+
2515+ VerificationTest [
2516+ Module [ { content },
2517+ content = Import [ junieConfigFile , "RawJSON" ];
2518+ KeyExistsQ [ content , "mcpServers" ] && ! KeyExistsQ [ content [ "mcpServers" ], "Wolfram" ]
2519+ ],
2520+ True ,
2521+ SameTest -> Equal ,
2522+ TestID -> "UninstallMCPServer-Junie-VerifyRemoval"
2523+ ]
2524+
2525+ VerificationTest [
2526+ cleanupTestFiles [ junieConfigFile ],
2527+ { Null },
2528+ SameTest -> MatchQ ,
2529+ TestID -> "InstallMCPServer-Junie-Cleanup"
2530+ ]
2531+
2532+ (* ::**************************************************************************************************************:: *)
2533+ (* ::Subsection::Closed:: *)
2534+ (*Junie Project-Level Install*)
2535+ VerificationTest [
2536+ Module [ { dir , projectFile , result },
2537+ dir = FileNameJoin @ { $TemporaryDirectory , "junie_proj_" <> CreateUUID [] };
2538+ CreateDirectory @ dir ;
2539+ WithCleanup [
2540+ result = InstallMCPServer [ { "Junie" , dir }, "WolframLanguage" , "VerifyLLMKit" -> False ];
2541+ projectFile = FileNameJoin @ { dir , ".junie" , "mcp" , "mcp.json" };
2542+ { MatchQ [ result , _ Success ], FileExistsQ @ projectFile },
2543+ Quiet @ DeleteDirectory [ dir , DeleteContents -> True ]
2544+ ]
2545+ ],
2546+ { True , True },
2547+ SameTest -> Equal ,
2548+ TestID -> "InstallMCPServer-Junie-ProjectLevel"
2549+ ]
2550+
2551+ (* ::**************************************************************************************************************:: *)
2552+ (* ::Subsection::Closed:: *)
2553+ (*Auto-Detection from Path*)
2554+
2555+ (* File at .junie/mcp/mcp.json under any directory should be detected as Junie when
2556+ installing without an explicit ApplicationName. *)
2557+ VerificationTest [
2558+ Module [ { dir , file , result },
2559+ dir = FileNameJoin @ { $TemporaryDirectory , "junie_guess_" <> CreateUUID [], ".junie" , "mcp" };
2560+ CreateDirectory [ dir , CreateIntermediateDirectories -> True ];
2561+ file = FileNameJoin @ { dir , "mcp.json" };
2562+ WithCleanup [
2563+ InstallMCPServer [ File @ file , "WolframLanguage" , "VerifyLLMKit" -> False ];
2564+ result = Import [ file , "RawJSON" ],
2565+ Quiet @ DeleteDirectory [ dir , DeleteContents -> True ];
2566+ Quiet @ DeleteDirectory [ DirectoryName [ dir , 2 ], DeleteContents -> True ]
2567+ ];
2568+ AssociationQ @ result && KeyExistsQ [ result , "mcpServers" ]
2569+ ],
2570+ True ,
2571+ SameTest -> Equal ,
2572+ TestID -> "GuessClientName-Junie-PathMatch"
2573+ ]
2574+
2575+ (* ::**************************************************************************************************************:: *)
2576+ (* ::Subsection::Closed:: *)
2577+ (*$SupportedMCPClients metadata for Junie*)
2578+ VerificationTest [
2579+ $SupportedMCPClients [ "Junie" , "DisplayName" ],
2580+ "Junie" ,
2581+ SameTest -> Equal ,
2582+ TestID -> "SupportedMCPClients-JunieDisplayName"
2583+ ]
2584+
2585+ VerificationTest [
2586+ $SupportedMCPClients [ "Junie" , "Aliases" ],
2587+ { "JetBrainsJunie" },
2588+ SameTest -> Equal ,
2589+ TestID -> "SupportedMCPClients-JunieAliases"
2590+ ]
2591+
2592+ VerificationTest [
2593+ $SupportedMCPClients [ "Junie" , "ConfigFormat" ],
2594+ "JSON" ,
2595+ SameTest -> Equal ,
2596+ TestID -> "SupportedMCPClients-JunieConfigFormat"
2597+ ]
2598+
2599+ VerificationTest [
2600+ $SupportedMCPClients [ "Junie" , "ConfigKey" ],
2601+ { "mcpServers" },
2602+ SameTest -> Equal ,
2603+ TestID -> "SupportedMCPClients-JunieConfigKey"
2604+ ]
2605+
2606+ VerificationTest [
2607+ $SupportedMCPClients [ "Junie" , "ProjectSupport" ],
2608+ True ,
2609+ SameTest -> Equal ,
2610+ TestID -> "SupportedMCPClients-JunieProjectSupport"
2611+ ]
2612+
2613+ VerificationTest [
2614+ StringStartsQ [ $SupportedMCPClients [ "Junie" , "URL" ], "https://" ],
2615+ True ,
2616+ SameTest -> Equal ,
2617+ TestID -> "SupportedMCPClients-JunieURL"
2618+ ]
2619+
2620+ (* Junie is a coding agent — default toolset is WolframLanguage (matches Cursor, ClaudeCode, etc.) *)
2621+ VerificationTest [
2622+ $SupportedMCPClients [ "Junie" , "DefaultToolset" ],
2623+ "WolframLanguage" ,
2624+ SameTest -> Equal ,
2625+ TestID -> "SupportedMCPClients-JunieDefaultToolset"
2626+ ]
2627+
23992628(* ::**************************************************************************************************************:: *)
24002629(* ::Section::Closed:: *)
24012630(*Kiro Support*)
@@ -2761,14 +2990,14 @@ VerificationTest[
27612990
27622991VerificationTest [
27632992 Length @ $SupportedMCPClients ,
2764- 17 ,
2993+ 18 ,
27652994 SameTest -> Equal ,
2766- TestID -> "SupportedMCPClients-Has17Clients @@Tests/InstallMCPServer.wlt:2762,1-2767,2"
2995+ TestID -> "SupportedMCPClients-Has18Clients @@Tests/InstallMCPServer.wlt:2762,1-2767,2"
27672996]
27682997
27692998VerificationTest [
27702999 Keys @ $SupportedMCPClients ,
2771- { "AmazonQ" , "Antigravity" , "AugmentCode" , "AugmentCodeIDE" , "ClaudeCode" , "ClaudeDesktop" , "Cline" , "Codex" , "CopilotCLI" , "Cursor" , "GeminiCLI" , "Goose" , "Kiro" , "OpenCode" , "VisualStudioCode" , "Windsurf" , "Zed" },
3000+ { "AmazonQ" , "Antigravity" , "AugmentCode" , "AugmentCodeIDE" , "ClaudeCode" , "ClaudeDesktop" , "Cline" , "Codex" , "CopilotCLI" , "Cursor" , "GeminiCLI" , "Goose" , "Junie" , " Kiro" , "OpenCode" , "VisualStudioCode" , "Windsurf" , "Zed" },
27723001 SameTest -> Equal ,
27733002 TestID -> "SupportedMCPClients-KeysSorted@@Tests/InstallMCPServer.wlt:2769,1-2774,2"
27743003]
@@ -3627,6 +3856,30 @@ VerificationTest[
36273856 TestID -> "DefaultToolsetForTarget-Cursor@@Tests/InstallMCPServer.wlt:3623,1-3628,2"
36283857]
36293858
3859+ (* Junie is a coding agent (covers JetBrains IDE plugin and Junie CLI), so it defaults to WolframLanguage *)
3860+ VerificationTest [
3861+ defaultToolsetForTarget [ "Junie" ],
3862+ "WolframLanguage" ,
3863+ SameTest -> Equal ,
3864+ TestID -> "DefaultToolsetForTarget-Junie"
3865+ ]
3866+
3867+ (* Junie alias resolves to the canonical client's default *)
3868+ VerificationTest [
3869+ defaultToolsetForTarget [ "JetBrainsJunie" ],
3870+ "WolframLanguage" ,
3871+ SameTest -> Equal ,
3872+ TestID -> "DefaultToolsetForTarget-Alias-JetBrainsJunie"
3873+ ]
3874+
3875+ (* {Junie, dir} project-install form *)
3876+ VerificationTest [
3877+ defaultToolsetForTarget [ { "Junie" , "/some/dir" } ],
3878+ "WolframLanguage" ,
3879+ SameTest -> Equal ,
3880+ TestID -> "DefaultToolsetForTarget-NameDir-Junie"
3881+ ]
3882+
36303883(* Aliases resolve to their canonical client's default *)
36313884VerificationTest [
36323885 defaultToolsetForTarget [ "Claude" ],
0 commit comments