magus-cli 7.8.0 → 7.9.1
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/README.md +1 -1
- package/package.json +4 -4
- package/src/__tests__/blackbox-parity.test.ts +16 -11
- package/src/__tests__/blind/plugin-deps/doctor.test.ts +622 -0
- package/src/__tests__/blind/plugin-deps/helpers.ts +340 -0
- package/src/__tests__/blind/plugin-deps/hook.test.ts +328 -0
- package/src/__tests__/blind/plugin-deps/probe.test.ts +694 -0
- package/src/__tests__/blind/plugin-deps/read-only.test.ts +96 -0
- package/src/__tests__/blind/plugin-deps/schema.test.ts +390 -0
- package/src/__tests__/blind/review-followups/bun-install-path.test.ts +57 -0
- package/src/__tests__/blind/review-followups/d1-empty-lock.test.ts +94 -0
- package/src/__tests__/blind/review-followups/d2-disappearing-lock.test.ts +90 -0
- package/src/__tests__/blind/review-followups/d3-release-temp-cleanup.test.ts +83 -0
- package/src/__tests__/blind/review-followups/d4-tool-stdout.test.ts +152 -0
- package/src/__tests__/blind/review-followups/installer-redirect.test.ts +74 -0
- package/src/__tests__/blind/review-followups/ledger-permissions.test.ts +78 -0
- package/src/__tests__/blind/review-followups/ledger-pruning.test.ts +79 -0
- package/src/__tests__/blind/review-followups/path-advice.test.ts +46 -0
- package/src/__tests__/blind/review-followups/stats-requires.test.ts +16 -0
- package/src/__tests__/blind-780-cli-tools.test.ts +36 -48
- package/src/__tests__/blind-780-review2.test.ts +0 -25
- package/src/__tests__/cli-apply-seams.test.ts +2 -67
- package/src/__tests__/cli-tool-commands.test.ts +131 -6
- package/src/__tests__/cli-tools-adapter.test.ts +52 -2
- package/src/__tests__/cli-tools-plugin-managed.test.tsx +83 -0
- package/src/__tests__/deps-adapter.test.ts +191 -0
- package/src/__tests__/deps-check-hook.test.ts +220 -0
- package/src/__tests__/deps-plan.test.ts +897 -0
- package/src/__tests__/deps-report.test.ts +197 -0
- package/src/__tests__/doctor-bins.test.ts +134 -36
- package/src/__tests__/doctor-json.test.ts +261 -0
- package/src/__tests__/failure-popup-review2.test.tsx +1 -25
- package/src/__tests__/final-fixes-780.test.tsx +25 -9
- package/src/__tests__/fixtures/bins.ts +55 -0
- package/src/__tests__/install-plan.test.ts +15 -1
- package/src/__tests__/marketplace-refresh.test.ts +9 -3
- package/src/__tests__/no-shell-spawn.test.ts +77 -0
- package/src/__tests__/npm-package-name.test.ts +6 -9
- package/src/__tests__/plugin-requires.test.ts +138 -153
- package/src/__tests__/requires-probe.test.ts +858 -0
- package/src/__tests__/resolver.test.ts +129 -52
- package/src/__tests__/run.test.ts +108 -0
- package/src/__tests__/tool-probe.test.ts +1 -1
- package/src/__tests__/toolchain.test.ts +123 -52
- package/src/__tests__/update-plan.test.ts +1 -1
- package/src/cli/ansi.ts +2 -7
- package/src/cli/deps-view.ts +213 -0
- package/src/cli/doctor.ts +169 -24
- package/src/cli/install.ts +51 -66
- package/src/cli/profile.ts +20 -2
- package/src/cli/router.ts +6 -2
- package/src/cli/update.ts +28 -7
- package/src/data/cli-tools.ts +24 -9
- package/src/services/active-closure.ts +3 -3
- package/src/services/claude-settings.ts +4 -348
- package/src/services/cli-tool-commands.ts +104 -3
- package/src/services/deps-plan.ts +1154 -0
- package/src/services/deps-report.ts +265 -0
- package/src/services/doctor-bins.ts +115 -43
- package/src/services/install-plan.ts +11 -1
- package/src/services/local-marketplace.ts +12 -206
- package/src/services/marketplace-refresh.ts +4 -4
- package/src/services/plugin-manager.ts +4 -18
- package/src/services/plugin-requires.ts +93 -162
- package/src/services/resolver.ts +168 -58
- package/src/services/tool-probe.ts +18 -25
- package/src/services/toolchain.ts +117 -111
- package/src/services/update-engine.ts +19 -14
- package/src/services/update-plan.ts +3 -3
- package/src/shared/plugin/hooks/bun-missing.sh +64 -0
- package/src/shared/plugin/hooks/deps-check.ts +240 -0
- package/src/shared/plugin/hooks/lib/requires-probe.ts +1279 -0
- package/src/types/index.ts +53 -16
- package/src/ui/App.tsx +6 -40
- package/src/ui/adapters/cliToolsAdapter.ts +75 -37
- package/src/ui/adapters/depsAdapter.ts +129 -0
- package/src/ui/adapters/startupReports.ts +0 -22
- package/src/ui/renderers/cliToolRenderers.tsx +135 -2
- package/src/ui/screens/CliToolsScreen.tsx +141 -51
- package/src/ui/screens/PluginsScreen.tsx +12 -48
- package/src/utils/command-utils.ts +4 -5
- package/src/utils/run.ts +143 -52
- package/src/utils/string-utils.ts +9 -0
- package/src/__tests__/go-module.test.ts +0 -43
- package/src/__tests__/plugin-setup.test.ts +0 -1016
- package/src/__tests__/shell-script-callers.test.ts +0 -92
- package/src/services/plugin-setup.ts +0 -965
- package/src/utils/go-module.ts +0 -36
package/README.md
CHANGED
|
@@ -155,7 +155,7 @@ check. So does `magus install --check`.
|
|
|
155
155
|
| MCP | Add MCP servers from a curated catalog |
|
|
156
156
|
| Settings | Claude Code settings, from a catalog of known keys |
|
|
157
157
|
| Profiles | Saved plugin sets (the TUI's own, older profile concept) |
|
|
158
|
-
| CLI Tools | Install
|
|
158
|
+
| CLI Tools | Install and update CLI tools via the right package manager; a tool a plugin installs from a release shows as managed by that plugin |
|
|
159
159
|
| Git State | Gitignore conventions and repo hygiene |
|
|
160
160
|
| Alias | Shell alias + flag management for launching `claude` |
|
|
161
161
|
| Styles | Communication style presets, composed into one native output style |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "magus-cli",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.9.1",
|
|
4
4
|
"description": "TUI tool for managing Claude Code plugins, MCPs, and configuration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/main.tsx",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"typescript": "^5.6.3"
|
|
66
66
|
},
|
|
67
67
|
"optionalDependencies": {
|
|
68
|
-
"magus-cli-darwin-arm64": "7.
|
|
69
|
-
"magus-cli-darwin-x64": "7.
|
|
70
|
-
"magus-cli-linux-x64": "7.
|
|
68
|
+
"magus-cli-darwin-arm64": "7.9.1",
|
|
69
|
+
"magus-cli-darwin-x64": "7.9.1",
|
|
70
|
+
"magus-cli-linux-x64": "7.9.1"
|
|
71
71
|
}
|
|
72
72
|
}
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
* _synthetic exist only to reach states the real data lacks.
|
|
18
18
|
*/
|
|
19
19
|
import { describe, expect, test } from "bun:test";
|
|
20
|
-
import { cliTools } from "../data/cli-tools.js";
|
|
21
20
|
import { selectProfileId } from "../services/active-closure.js";
|
|
22
21
|
import type { PluginInfo } from "../services/plugin-manager.js";
|
|
23
22
|
import { resolveProfile } from "../services/resolver.js";
|
|
24
23
|
import { type ToolFacts, specForCatalogTool } from "../services/tool-probe.js";
|
|
24
|
+
import { managedBins, managedTool } from "../services/toolchain.js";
|
|
25
25
|
import {
|
|
26
26
|
type BinUpdateItem,
|
|
27
27
|
type PluginUpdateItem,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
planPluginUpdates,
|
|
32
32
|
} from "../services/update-plan.js";
|
|
33
33
|
import type {
|
|
34
|
-
|
|
34
|
+
ManagedTool,
|
|
35
35
|
Marketplace,
|
|
36
36
|
ProfileManifest,
|
|
37
37
|
ResolvedClosure,
|
|
@@ -42,6 +42,7 @@ import {
|
|
|
42
42
|
buildPluginBrowserItems,
|
|
43
43
|
} from "../ui/adapters/pluginsAdapter.js";
|
|
44
44
|
import { pluginRowText } from "../ui/renderers/pluginRowText.js";
|
|
45
|
+
import { ownedAsDeclared, selected, testCatalogue } from "./fixtures/bins.js";
|
|
45
46
|
|
|
46
47
|
// ── fixture ────────────────────────────────────────────────────────────────
|
|
47
48
|
|
|
@@ -199,7 +200,7 @@ function makeManifest(): ProfileManifest {
|
|
|
199
200
|
};
|
|
200
201
|
}
|
|
201
202
|
|
|
202
|
-
const PLUGIN_BINS: Record<string,
|
|
203
|
+
const PLUGIN_BINS: Record<string, ManagedTool[]> = {
|
|
203
204
|
"terminal@magus": [
|
|
204
205
|
{ name: "tmux", via: "brew", check: "tmux -V" },
|
|
205
206
|
{
|
|
@@ -215,8 +216,8 @@ const PLUGIN_BINS: Record<string, BinRequirement[]> = {
|
|
|
215
216
|
],
|
|
216
217
|
};
|
|
217
218
|
|
|
218
|
-
async function fixtureBins(pluginId: string)
|
|
219
|
-
return (PLUGIN_BINS[pluginId] ?? []).map((b) => (
|
|
219
|
+
async function fixtureBins(pluginId: string) {
|
|
220
|
+
return (PLUGIN_BINS[pluginId] ?? []).map((b) => selected(b));
|
|
220
221
|
}
|
|
221
222
|
|
|
222
223
|
function facts(name: string, over: Partial<ToolFacts>): ToolFacts {
|
|
@@ -330,7 +331,9 @@ async function runBothPaths(): Promise<Paths> {
|
|
|
330
331
|
if (profileId === null) throw new Error("fixture: no profile selected");
|
|
331
332
|
const closure = await resolveProfile(manifest, profileId, {
|
|
332
333
|
binResolver: fixtureBins,
|
|
334
|
+
ownedResolver: ownedAsDeclared,
|
|
333
335
|
});
|
|
336
|
+
const tools = managedBins(closure.bins);
|
|
334
337
|
|
|
335
338
|
// CLI path
|
|
336
339
|
const cliPluginList = planPluginUpdates(
|
|
@@ -359,18 +362,18 @@ async function runBothPaths(): Promise<Paths> {
|
|
|
359
362
|
// tools
|
|
360
363
|
const factList = makeFacts();
|
|
361
364
|
const cliBins = new Map(
|
|
362
|
-
planBinUpdates(
|
|
365
|
+
planBinUpdates(tools, factList).map((b) => [b.name, b]),
|
|
363
366
|
);
|
|
364
367
|
const factsByName = new Map(factList.map((f) => [f.name, f]));
|
|
365
|
-
const declared = new Set(
|
|
368
|
+
const declared = new Set(tools.map((b) => b.name));
|
|
366
369
|
const tuiTools = new Map<string, ReturnType<typeof buildToolRow>>();
|
|
367
|
-
for (const tool of
|
|
370
|
+
for (const tool of testCatalogue()) {
|
|
368
371
|
if (!declared.has(tool.name)) continue;
|
|
369
372
|
tuiTools.set(
|
|
370
373
|
tool.name,
|
|
371
374
|
buildToolRow(
|
|
372
375
|
tool,
|
|
373
|
-
specForCatalogTool(tool,
|
|
376
|
+
specForCatalogTool(tool, tools, undefined),
|
|
374
377
|
factsByName.get(tool.name),
|
|
375
378
|
),
|
|
376
379
|
);
|
|
@@ -624,7 +627,8 @@ describe("R7 parity: one fixture through the CLI path and the TUI path", () => {
|
|
|
624
627
|
target: cli?.target,
|
|
625
628
|
});
|
|
626
629
|
// the TUI judges a declared tool against the closure's own spec
|
|
627
|
-
const
|
|
630
|
+
const bin = p.closure.bins.find((b) => b.name === name);
|
|
631
|
+
const declared = bin ? managedTool(bin) : null;
|
|
628
632
|
expect({ name, via: tui?.spec.via, version: tui?.spec.version }).toEqual({
|
|
629
633
|
name,
|
|
630
634
|
via: declared?.via,
|
|
@@ -697,7 +701,8 @@ describe("fixture discriminates the pre-change logic", () => {
|
|
|
697
701
|
const p = await runBothPaths();
|
|
698
702
|
|
|
699
703
|
for (const name of ["tmux", "browser-use", "mcp"]) {
|
|
700
|
-
const
|
|
704
|
+
const bin = p.closure.bins.find((b) => b.name === name);
|
|
705
|
+
const spec = bin ? managedTool(bin) : null;
|
|
701
706
|
expect(legacyPlanBin(true, Boolean(spec?.version))).toBe("upgrade");
|
|
702
707
|
expect(p.cliBins.get(name)?.action).toBe("current");
|
|
703
708
|
}
|