@laststance/claude-plugin-dashboard 0.1.1 → 0.2.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.
Files changed (35) hide show
  1. package/README.md +70 -32
  2. package/dist/app.d.ts +29 -0
  3. package/dist/app.js +496 -69
  4. package/dist/components/AddMarketplaceDialog.d.ts +20 -0
  5. package/dist/components/AddMarketplaceDialog.js +18 -0
  6. package/dist/components/ComponentBadges.d.ts +32 -0
  7. package/dist/components/ComponentBadges.js +82 -0
  8. package/dist/components/HelpOverlay.d.ts +15 -0
  9. package/dist/components/HelpOverlay.js +51 -0
  10. package/dist/components/KeyHints.d.ts +6 -3
  11. package/dist/components/KeyHints.js +39 -10
  12. package/dist/components/MarketplaceList.d.ts +4 -2
  13. package/dist/components/MarketplaceList.js +7 -3
  14. package/dist/components/PluginDetail.js +2 -1
  15. package/dist/components/PluginList.d.ts +29 -2
  16. package/dist/components/PluginList.js +26 -5
  17. package/dist/components/SearchInput.js +1 -1
  18. package/dist/components/TabBar.d.ts +5 -3
  19. package/dist/components/TabBar.js +20 -8
  20. package/dist/services/componentService.d.ts +35 -0
  21. package/dist/services/componentService.js +178 -0
  22. package/dist/services/marketplaceActionsService.d.ts +44 -0
  23. package/dist/services/marketplaceActionsService.js +92 -0
  24. package/dist/services/pluginService.d.ts +10 -0
  25. package/dist/services/pluginService.js +22 -0
  26. package/dist/tabs/DiscoverTab.d.ts +5 -3
  27. package/dist/tabs/DiscoverTab.js +3 -2
  28. package/dist/tabs/EnabledTab.d.ts +24 -0
  29. package/dist/tabs/EnabledTab.js +26 -0
  30. package/dist/tabs/InstalledTab.d.ts +10 -3
  31. package/dist/tabs/InstalledTab.js +14 -10
  32. package/dist/tabs/MarketplacesTab.d.ts +10 -3
  33. package/dist/tabs/MarketplacesTab.js +12 -3
  34. package/dist/types/index.d.ts +71 -1
  35. package/package.json +11 -3
@@ -2,6 +2,26 @@
2
2
  * TypeScript interfaces for Claude Code Plugin Dashboard
3
3
  * These types aggregate data from multiple Claude Code configuration files
4
4
  */
5
+ /**
6
+ * Component types provided by a plugin
7
+ * Detected by scanning plugin directory structure and plugin.json
8
+ * @example
9
+ * { skills: 5, commands: 2, mcpServers: 1 } // Plugin with skills, commands, and MCP
10
+ */
11
+ export interface PluginComponents {
12
+ /** Count of skill directories in skills/ */
13
+ skills?: number;
14
+ /** Count of slash command .md files in commands/ */
15
+ commands?: number;
16
+ /** Count of subagent .md files in agents/ */
17
+ agents?: number;
18
+ /** Whether hooks are configured (hooks/ dir or hooks.json exists) */
19
+ hooks?: boolean;
20
+ /** Count of MCP server configurations in plugin.json mcpServers field */
21
+ mcpServers?: number;
22
+ /** Count of LSP server configurations in .lsp.json */
23
+ lspServers?: number;
24
+ }
5
25
  /**
6
26
  * Aggregated plugin data from multiple sources
7
27
  * Combines data from settings.json, installed_plugins.json, marketplace.json, etc.
@@ -42,6 +62,8 @@ export interface Plugin {
42
62
  isLocal?: boolean;
43
63
  /** Git commit SHA (if installed) */
44
64
  gitCommitSha?: string;
65
+ /** Component types provided by this plugin (skills, commands, MCP, etc.) */
66
+ components?: PluginComponents;
45
67
  }
46
68
  /**
47
69
  * Raw installed plugin data from installed_plugins.json
@@ -152,12 +174,23 @@ export interface Settings {
152
174
  enabledPlugins?: Record<string, boolean>;
153
175
  [key: string]: unknown;
154
176
  }
177
+ /**
178
+ * Focus zones for keyboard navigation
179
+ * Defines which UI area currently has keyboard focus
180
+ */
181
+ export type FocusZone = 'tabbar' | 'search' | 'list';
182
+ /**
183
+ * Marketplace operation types
184
+ */
185
+ export type MarketplaceOperation = 'idle' | 'adding' | 'removing' | 'updating';
155
186
  /**
156
187
  * Application state for useReducer
157
188
  */
158
189
  export interface AppState {
159
190
  /** Current active tab */
160
- activeTab: 'discover' | 'installed' | 'marketplaces' | 'errors';
191
+ activeTab: 'enabled' | 'installed' | 'discover' | 'marketplaces' | 'errors';
192
+ /** Current focus zone for keyboard navigation */
193
+ focusZone: FocusZone;
161
194
  /** All plugins from all marketplaces */
162
195
  plugins: Plugin[];
163
196
  /** All marketplaces */
@@ -184,6 +217,18 @@ export interface AppState {
184
217
  operationPluginId: string | null;
185
218
  /** Whether confirmation dialog is showing */
186
219
  confirmUninstall: boolean;
220
+ /** Whether help overlay is showing */
221
+ showHelp: boolean;
222
+ /** Current marketplace operation */
223
+ marketplaceOperation: MarketplaceOperation;
224
+ /** Marketplace ID being operated on */
225
+ operationMarketplaceId: string | null;
226
+ /** Whether remove marketplace confirmation dialog is showing */
227
+ confirmRemoveMarketplace: boolean;
228
+ /** Whether add marketplace dialog is showing */
229
+ showAddMarketplaceDialog: boolean;
230
+ /** Error message for add marketplace dialog */
231
+ addMarketplaceError: string | null;
187
232
  }
188
233
  /**
189
234
  * Action types for useReducer
@@ -247,4 +292,29 @@ export type Action = {
247
292
  payload: string;
248
293
  } | {
249
294
  type: 'HIDE_CONFIRM_UNINSTALL';
295
+ } | {
296
+ type: 'TOGGLE_HELP';
297
+ } | {
298
+ type: 'SET_FOCUS_ZONE';
299
+ payload: FocusZone;
300
+ } | {
301
+ type: 'SHOW_CONFIRM_REMOVE_MARKETPLACE';
302
+ payload: string;
303
+ } | {
304
+ type: 'HIDE_CONFIRM_REMOVE_MARKETPLACE';
305
+ } | {
306
+ type: 'SHOW_ADD_MARKETPLACE_DIALOG';
307
+ } | {
308
+ type: 'HIDE_ADD_MARKETPLACE_DIALOG';
309
+ } | {
310
+ type: 'START_MARKETPLACE_OPERATION';
311
+ payload: {
312
+ operation: MarketplaceOperation;
313
+ marketplaceId?: string;
314
+ };
315
+ } | {
316
+ type: 'END_MARKETPLACE_OPERATION';
317
+ } | {
318
+ type: 'SET_ADD_MARKETPLACE_ERROR';
319
+ payload: string | null;
250
320
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@laststance/claude-plugin-dashboard",
3
- "version": "0.1.1",
3
+ "version": "0.2.1",
4
4
  "description": "Interactive CLI dashboard to manage Claude Code plugins",
5
5
  "license": "MIT",
6
6
  "author": "Ryota Murakami <ryota.murakami@laststance.io> (https://github.com/ryota-murakami)",
@@ -24,6 +24,8 @@
24
24
  "bin": {
25
25
  "claude-plugin-dashboard": "./dist/cli.js"
26
26
  },
27
+ "main": "./dist/app.js",
28
+ "types": "./dist/app.d.ts",
27
29
  "type": "module",
28
30
  "engines": {
29
31
  "node": ">=20"
@@ -42,7 +44,10 @@
42
44
  "link": "pnpm build && pnpm link --global",
43
45
  "prepublishOnly": "pnpm build",
44
46
  "prepare": "husky",
45
- "prettier": "prettier --ignore-unknown --write ."
47
+ "prettier": "prettier --ignore-unknown --write .",
48
+ "test": "vitest",
49
+ "test:run": "vitest run",
50
+ "test:coverage": "vitest run --coverage"
46
51
  },
47
52
  "dependencies": {
48
53
  "ink": "^5.1.0",
@@ -52,9 +57,12 @@
52
57
  "@sindresorhus/tsconfig": "^6.0.0",
53
58
  "@types/node": "^22.10.2",
54
59
  "@types/react": "^18.3.18",
60
+ "@vitest/coverage-v8": "^4.0.16",
55
61
  "husky": "^9.1.7",
62
+ "ink-testing-library": "^4.0.0",
56
63
  "lint-staged": "^16.2.7",
57
64
  "prettier": "^3.7.4",
58
- "typescript": "^5.7.2"
65
+ "typescript": "^5.7.2",
66
+ "vitest": "^4.0.16"
59
67
  }
60
68
  }