claudeup 4.17.0 → 4.19.0
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/package.json +1 -1
- package/src/__tests__/alias-adopt.test.ts +364 -0
- package/src/__tests__/alias-parser.test.ts +409 -0
- package/src/__tests__/alias-shell-writer.test.ts +668 -0
- package/src/__tests__/alias-store.test.ts +163 -0
- package/src/__tests__/gitignore-fixer.test.ts +64 -1
- package/src/__tests__/gitignore-prerun.test.ts +2 -2
- package/src/__tests__/gitignore-service.test.ts +42 -0
- package/src/__tests__/marketplaces.test.ts +40 -0
- package/src/__tests__/plugin-manager-fallback.test.ts +120 -0
- package/src/__tests__/plugin-setup.test.ts +111 -0
- package/src/__tests__/useGitignoreModal.test.ts +2 -2
- package/src/data/alias-flags.js +205 -0
- package/src/data/alias-flags.ts +301 -0
- package/src/data/gitignore-reasons.js +97 -0
- package/src/data/gitignore-reasons.ts +103 -0
- package/src/data/marketplaces.js +5 -3
- package/src/data/marketplaces.ts +5 -4
- package/src/services/alias-settings.js +51 -0
- package/src/services/alias-settings.ts +63 -0
- package/src/services/alias-shell-writer.js +1018 -0
- package/src/services/alias-shell-writer.ts +1247 -0
- package/src/services/alias-store.js +129 -0
- package/src/services/alias-store.ts +172 -0
- package/src/services/gitignore-fixer.js +70 -10
- package/src/services/gitignore-fixer.ts +76 -9
- package/src/services/gitignore-prerun.js +3 -3
- package/src/services/gitignore-prerun.ts +3 -3
- package/src/services/gitignore-service.js +20 -2
- package/src/services/gitignore-service.ts +23 -1
- package/src/services/marketplace-fetcher.js +96 -0
- package/src/services/marketplace-fetcher.ts +137 -0
- package/src/services/plugin-manager.js +6 -59
- package/src/services/plugin-manager.ts +16 -91
- package/src/services/plugin-setup.js +59 -4
- package/src/services/plugin-setup.ts +61 -4
- package/src/services/skillsmp-client.js +29 -9
- package/src/services/skillsmp-client.ts +38 -8
- package/src/types/gitignore.ts +1 -1
- package/src/ui/App.js +26 -11
- package/src/ui/App.tsx +25 -10
- package/src/ui/components/FlagDetailEditor.js +0 -0
- package/src/ui/components/FlagDetailEditor.tsx +0 -0
- package/src/ui/components/TabBar.js +2 -1
- package/src/ui/components/TabBar.tsx +2 -1
- package/src/ui/components/layout/FooterHints.js +29 -0
- package/src/ui/components/layout/FooterHints.tsx +52 -0
- package/src/ui/components/layout/ScreenLayout.js +2 -1
- package/src/ui/components/layout/ScreenLayout.tsx +12 -3
- package/src/ui/components/layout/index.js +1 -0
- package/src/ui/components/layout/index.ts +5 -0
- package/src/ui/components/modals/ConfirmModal.js +1 -1
- package/src/ui/components/modals/ConfirmModal.tsx +1 -1
- package/src/ui/components/modals/SelectModal.js +8 -1
- package/src/ui/components/modals/SelectModal.tsx +12 -1
- package/src/ui/hooks/useGitignoreModal.js +7 -8
- package/src/ui/hooks/useGitignoreModal.ts +8 -9
- package/src/ui/renderers/gitignoreRenderers.js +36 -23
- package/src/ui/renderers/gitignoreRenderers.tsx +50 -41
- package/src/ui/screens/AliasScreen.js +1111 -0
- package/src/ui/screens/AliasScreen.tsx +1534 -0
- package/src/ui/screens/CliToolsScreen.js +6 -1
- package/src/ui/screens/CliToolsScreen.tsx +6 -1
- package/src/ui/screens/EnvVarsScreen.js +6 -1
- package/src/ui/screens/EnvVarsScreen.tsx +6 -1
- package/src/ui/screens/GitignoreScreen.js +189 -88
- package/src/ui/screens/GitignoreScreen.tsx +312 -132
- package/src/ui/screens/McpRegistryScreen.js +13 -2
- package/src/ui/screens/McpRegistryScreen.tsx +13 -2
- package/src/ui/screens/McpScreen.js +6 -1
- package/src/ui/screens/McpScreen.tsx +6 -1
- package/src/ui/screens/ModelSelectorScreen.js +8 -2
- package/src/ui/screens/ModelSelectorScreen.tsx +8 -2
- package/src/ui/screens/PluginsScreen.js +17 -3
- package/src/ui/screens/PluginsScreen.tsx +16 -3
- package/src/ui/screens/ProfilesScreen.js +8 -1
- package/src/ui/screens/ProfilesScreen.tsx +8 -1
- package/src/ui/screens/SkillsScreen.js +21 -4
- package/src/ui/screens/SkillsScreen.tsx +39 -5
- package/src/ui/screens/StatusLineScreen.js +7 -1
- package/src/ui/screens/StatusLineScreen.tsx +7 -1
- package/src/ui/screens/index.js +1 -0
- package/src/ui/screens/index.ts +1 -0
- package/src/ui/state/reducer.js +5 -1
- package/src/ui/state/reducer.ts +6 -1
- package/src/ui/state/types.ts +12 -2
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import type { RuleAction } from "../types/gitignore.js";
|
|
2
|
+
|
|
3
|
+
const RULE_REASONS = new Map<string, string>([
|
|
4
|
+
[
|
|
5
|
+
key("ignore", ".claude/settings.local.json"),
|
|
6
|
+
"Personal Claude settings belong to each developer and should not be shared.",
|
|
7
|
+
],
|
|
8
|
+
[
|
|
9
|
+
key("ignore", ".claude/scheduled_tasks.lock"),
|
|
10
|
+
"Runtime lock files are local process state and should be regenerated locally.",
|
|
11
|
+
],
|
|
12
|
+
[
|
|
13
|
+
key("ignore", ".claude/cache/"),
|
|
14
|
+
"Claude cache contents are local generated data and can grow quickly.",
|
|
15
|
+
],
|
|
16
|
+
[
|
|
17
|
+
key("ignore", ".claude/.statusline-worktree-*"),
|
|
18
|
+
"Statusline worktree markers are local runtime state.",
|
|
19
|
+
],
|
|
20
|
+
[
|
|
21
|
+
key("ignore", "ai-docs/sessions/"),
|
|
22
|
+
"Session transcripts and scratch notes are local working artifacts.",
|
|
23
|
+
],
|
|
24
|
+
[
|
|
25
|
+
key("ignore", ".mnemex/"),
|
|
26
|
+
"Local memory/index data is machine-specific and regenerated by tooling.",
|
|
27
|
+
],
|
|
28
|
+
[
|
|
29
|
+
key("ignore", ".claudemem/"),
|
|
30
|
+
"Local claudemem indexes are generated from the repo and should not be committed.",
|
|
31
|
+
],
|
|
32
|
+
[
|
|
33
|
+
key("ignore", "gtd/sessions/"),
|
|
34
|
+
"Local GTD session artifacts are personal workflow state.",
|
|
35
|
+
],
|
|
36
|
+
[
|
|
37
|
+
key("ignore", ".agents/"),
|
|
38
|
+
"Local agent workspaces and runtime artifacts should stay out of team history.",
|
|
39
|
+
],
|
|
40
|
+
[
|
|
41
|
+
key("ignore", "node_modules/"),
|
|
42
|
+
"Installed dependencies are restored from the package manager lockfile.",
|
|
43
|
+
],
|
|
44
|
+
[
|
|
45
|
+
key("ignore", ".env"),
|
|
46
|
+
"Environment files commonly contain local secrets and machine-specific values.",
|
|
47
|
+
],
|
|
48
|
+
[
|
|
49
|
+
key("ignore", ".env.local"),
|
|
50
|
+
"Local environment overrides commonly contain secrets or developer-specific values.",
|
|
51
|
+
],
|
|
52
|
+
[
|
|
53
|
+
key("ignore", ".DS_Store"),
|
|
54
|
+
"macOS Finder metadata is machine-generated noise.",
|
|
55
|
+
],
|
|
56
|
+
[
|
|
57
|
+
key("ignore", "dist/"),
|
|
58
|
+
"Distribution output is generated from source during builds.",
|
|
59
|
+
],
|
|
60
|
+
[
|
|
61
|
+
key("ignore", "build/"),
|
|
62
|
+
"Build output is generated from source during builds.",
|
|
63
|
+
],
|
|
64
|
+
[
|
|
65
|
+
key("ignore", "*.log"),
|
|
66
|
+
"Log files are runtime output and usually contain noisy local details.",
|
|
67
|
+
],
|
|
68
|
+
[
|
|
69
|
+
key("ignore", "coverage/"),
|
|
70
|
+
"Coverage reports are generated by test runs.",
|
|
71
|
+
],
|
|
72
|
+
[
|
|
73
|
+
key("ignore", ".cache/"),
|
|
74
|
+
"Tool cache contents are local generated data.",
|
|
75
|
+
],
|
|
76
|
+
[
|
|
77
|
+
key("track", ".claude/settings.json"),
|
|
78
|
+
"Team Claude settings should be committed so everyone gets the same project behavior.",
|
|
79
|
+
],
|
|
80
|
+
[
|
|
81
|
+
key("track", ".mcp.json"),
|
|
82
|
+
"Team MCP configuration should be committed so shared tools are discoverable.",
|
|
83
|
+
],
|
|
84
|
+
[
|
|
85
|
+
key("track", "plugin.json"),
|
|
86
|
+
"The plugin manifest is source metadata required by the plugin system.",
|
|
87
|
+
],
|
|
88
|
+
]);
|
|
89
|
+
|
|
90
|
+
export function getGitignoreRuleReason(
|
|
91
|
+
action: RuleAction,
|
|
92
|
+
pattern: string,
|
|
93
|
+
): string {
|
|
94
|
+
const reason = RULE_REASONS.get(key(action, pattern));
|
|
95
|
+
if (reason) return reason;
|
|
96
|
+
return action === "ignore"
|
|
97
|
+
? "A managed rule says this path should stay out of git."
|
|
98
|
+
: "A managed rule says this path should stay tracked in git.";
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function key(action: RuleAction, pattern: string): string {
|
|
102
|
+
return `${action}:${pattern}`;
|
|
103
|
+
}
|
package/src/data/marketplaces.js
CHANGED
|
@@ -18,6 +18,7 @@ function normalizeRepo(repo) {
|
|
|
18
18
|
export const deprecatedMarketplaces = {
|
|
19
19
|
"mag-claude-plugins": "magus",
|
|
20
20
|
"MadAppGang-claude-code": "magus",
|
|
21
|
+
superpowers: "superpowers-marketplace",
|
|
21
22
|
};
|
|
22
23
|
export const defaultMarketplaces = [
|
|
23
24
|
{
|
|
@@ -42,13 +43,14 @@ export const defaultMarketplaces = [
|
|
|
42
43
|
official: true,
|
|
43
44
|
},
|
|
44
45
|
{
|
|
45
|
-
name: "superpowers",
|
|
46
|
+
name: "superpowers-marketplace",
|
|
46
47
|
displayName: "Superpowers",
|
|
47
48
|
source: {
|
|
48
49
|
source: "github",
|
|
49
|
-
repo: "obra/superpowers",
|
|
50
|
+
repo: "obra/superpowers-marketplace",
|
|
50
51
|
},
|
|
51
|
-
description: "
|
|
52
|
+
description: "Curated Claude Code plugins for skills and workflows",
|
|
53
|
+
featured: true,
|
|
52
54
|
},
|
|
53
55
|
{
|
|
54
56
|
name: "claude-code-plugins",
|
package/src/data/marketplaces.ts
CHANGED
|
@@ -23,6 +23,7 @@ function normalizeRepo(repo: string): string {
|
|
|
23
23
|
export const deprecatedMarketplaces: Record<string, string> = {
|
|
24
24
|
"mag-claude-plugins": "magus",
|
|
25
25
|
"MadAppGang-claude-code": "magus",
|
|
26
|
+
superpowers: "superpowers-marketplace",
|
|
26
27
|
};
|
|
27
28
|
|
|
28
29
|
export const defaultMarketplaces: Marketplace[] = [
|
|
@@ -50,14 +51,14 @@ export const defaultMarketplaces: Marketplace[] = [
|
|
|
50
51
|
official: true,
|
|
51
52
|
},
|
|
52
53
|
{
|
|
53
|
-
name: "superpowers",
|
|
54
|
+
name: "superpowers-marketplace",
|
|
54
55
|
displayName: "Superpowers",
|
|
55
56
|
source: {
|
|
56
57
|
source: "github",
|
|
57
|
-
repo: "obra/superpowers",
|
|
58
|
+
repo: "obra/superpowers-marketplace",
|
|
58
59
|
},
|
|
59
|
-
description:
|
|
60
|
-
|
|
60
|
+
description: "Curated Claude Code plugins for skills and workflows",
|
|
61
|
+
featured: true,
|
|
61
62
|
},
|
|
62
63
|
{
|
|
63
64
|
name: "claude-code-plugins",
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read/write the managed-alias name in Claude Code's `settings.json`.
|
|
3
|
+
*
|
|
4
|
+
* The alias is computer-wide (one name per user), so it lives in
|
|
5
|
+
* `~/.claude/settings.json` only — no project scope. We store it under a
|
|
6
|
+
* `claudeup` namespace to avoid colliding with Claude Code's own keys:
|
|
7
|
+
*
|
|
8
|
+
* {
|
|
9
|
+
* "model": "sonnet",
|
|
10
|
+
* "claudeup": {
|
|
11
|
+
* "aliasName": "c"
|
|
12
|
+
* }
|
|
13
|
+
* }
|
|
14
|
+
*
|
|
15
|
+
* Flag values are NOT stored here. They live in the shell rc file's managed
|
|
16
|
+
* block and are read on screen mount via `parseAliasFromRc`.
|
|
17
|
+
*/
|
|
18
|
+
import { readGlobalSettings, writeGlobalSettings, } from "./claude-settings.js";
|
|
19
|
+
import { DEFAULT_ALIAS_NAME, validateAliasName } from "./alias-store.js";
|
|
20
|
+
/**
|
|
21
|
+
* Load the user's preferred alias name from `~/.claude/settings.json`.
|
|
22
|
+
* Returns the default `"c"` when the key is absent or invalid.
|
|
23
|
+
*/
|
|
24
|
+
export async function loadAliasName() {
|
|
25
|
+
const settings = (await readGlobalSettings());
|
|
26
|
+
const stored = settings.claudeup?.aliasName;
|
|
27
|
+
if (typeof stored !== "string")
|
|
28
|
+
return DEFAULT_ALIAS_NAME;
|
|
29
|
+
if (validateAliasName(stored) !== null)
|
|
30
|
+
return DEFAULT_ALIAS_NAME;
|
|
31
|
+
return stored;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Save the alias name to `~/.claude/settings.json`, preserving all other
|
|
35
|
+
* keys (including unrelated Claude Code settings). No-op without throwing
|
|
36
|
+
* if the name fails validation — caller should validate first.
|
|
37
|
+
*/
|
|
38
|
+
export async function saveAliasName(name) {
|
|
39
|
+
if (validateAliasName(name) !== null)
|
|
40
|
+
return;
|
|
41
|
+
const settings = (await readGlobalSettings());
|
|
42
|
+
const next = {
|
|
43
|
+
...settings,
|
|
44
|
+
claudeup: {
|
|
45
|
+
...(settings.claudeup ?? {}),
|
|
46
|
+
aliasName: name,
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
// claude-settings.writeGlobalSettings accepts the same shape we received.
|
|
50
|
+
await writeGlobalSettings(next);
|
|
51
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read/write the managed-alias name in Claude Code's `settings.json`.
|
|
3
|
+
*
|
|
4
|
+
* The alias is computer-wide (one name per user), so it lives in
|
|
5
|
+
* `~/.claude/settings.json` only — no project scope. We store it under a
|
|
6
|
+
* `claudeup` namespace to avoid colliding with Claude Code's own keys:
|
|
7
|
+
*
|
|
8
|
+
* {
|
|
9
|
+
* "model": "sonnet",
|
|
10
|
+
* "claudeup": {
|
|
11
|
+
* "aliasName": "c"
|
|
12
|
+
* }
|
|
13
|
+
* }
|
|
14
|
+
*
|
|
15
|
+
* Flag values are NOT stored here. They live in the shell rc file's managed
|
|
16
|
+
* block and are read on screen mount via `parseAliasFromRc`.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import {
|
|
20
|
+
readGlobalSettings,
|
|
21
|
+
writeGlobalSettings,
|
|
22
|
+
} from "./claude-settings.js";
|
|
23
|
+
import { DEFAULT_ALIAS_NAME, validateAliasName } from "./alias-store.js";
|
|
24
|
+
|
|
25
|
+
interface ClaudeupSettings {
|
|
26
|
+
aliasName?: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
interface SettingsWithClaudeup {
|
|
30
|
+
claudeup?: ClaudeupSettings;
|
|
31
|
+
[key: string]: unknown;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Load the user's preferred alias name from `~/.claude/settings.json`.
|
|
36
|
+
* Returns the default `"c"` when the key is absent or invalid.
|
|
37
|
+
*/
|
|
38
|
+
export async function loadAliasName(): Promise<string> {
|
|
39
|
+
const settings = (await readGlobalSettings()) as SettingsWithClaudeup;
|
|
40
|
+
const stored = settings.claudeup?.aliasName;
|
|
41
|
+
if (typeof stored !== "string") return DEFAULT_ALIAS_NAME;
|
|
42
|
+
if (validateAliasName(stored) !== null) return DEFAULT_ALIAS_NAME;
|
|
43
|
+
return stored;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Save the alias name to `~/.claude/settings.json`, preserving all other
|
|
48
|
+
* keys (including unrelated Claude Code settings). No-op without throwing
|
|
49
|
+
* if the name fails validation — caller should validate first.
|
|
50
|
+
*/
|
|
51
|
+
export async function saveAliasName(name: string): Promise<void> {
|
|
52
|
+
if (validateAliasName(name) !== null) return;
|
|
53
|
+
const settings = (await readGlobalSettings()) as SettingsWithClaudeup;
|
|
54
|
+
const next: SettingsWithClaudeup = {
|
|
55
|
+
...settings,
|
|
56
|
+
claudeup: {
|
|
57
|
+
...(settings.claudeup ?? {}),
|
|
58
|
+
aliasName: name,
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
// claude-settings.writeGlobalSettings accepts the same shape we received.
|
|
62
|
+
await writeGlobalSettings(next as Parameters<typeof writeGlobalSettings>[0]);
|
|
63
|
+
}
|