luckiest-co 1.0.6 → 1.0.7

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.
@@ -9,7 +9,7 @@
9
9
  "name": "luckiest",
10
10
  "source": "./",
11
11
  "description": "Plan, go, finish, plus bundled free Luckiest skills that work in Claude Code, web chat, and Cowork.",
12
- "version": "0.1.7",
12
+ "version": "0.1.8",
13
13
  "author": { "name": "Luckiest" }
14
14
  }
15
15
  ]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "luckiest",
3
3
  "description": "Plan, go, finish. Guided planning, progress dashboards, and your luckiest.co tribe inside Claude Code.",
4
- "version": "0.1.7",
4
+ "version": "0.1.8",
5
5
  "author": { "name": "Luckiest" }
6
6
  }
package/bin/install.js CHANGED
@@ -299,15 +299,42 @@ async function syncSkills() {
299
299
  }
300
300
 
301
301
  /**
302
- * True when the luckiest plugin is already installed through the Claude Code
303
- * plugin marketplace (which registers commands itself).
302
+ * True when the luckiest plugin is installed AND enabled through the Claude
303
+ * Code plugin marketplace (which registers commands itself). A disabled
304
+ * plugin still appears in installed_plugins.json but registers nothing, so
305
+ * treating it as present would delete the user's commands/luckiest copy and
306
+ * leave them with no /luckiest:* commands at all.
304
307
  */
305
308
  function hasMarketplacePlugin(globalClaudeDir) {
306
309
  try {
307
310
  const manifest = JSON.parse(
308
311
  fs.readFileSync(path.join(globalClaudeDir, 'plugins', 'installed_plugins.json'), 'utf8')
309
312
  );
310
- return Object.keys(manifest.plugins || {}).some((k) => k.startsWith('luckiest@'));
313
+ const entries = Object.entries(manifest.plugins || {}).filter(([k]) => k.startsWith('luckiest@'));
314
+ if (entries.length === 0) return false;
315
+
316
+ // Some Claude Code versions record enabled state on the install entry itself.
317
+ const entryDisabled = entries.every(([, v]) => {
318
+ const items = Array.isArray(v) ? v : [v];
319
+ return items.every((item) => item && typeof item === 'object' && item.enabled === false);
320
+ });
321
+ if (entryDisabled) return false;
322
+
323
+ // Others track it in settings.json under enabledPlugins ("name@marketplace": bool).
324
+ try {
325
+ const settings = JSON.parse(
326
+ fs.readFileSync(path.join(globalClaudeDir, 'settings.json'), 'utf8')
327
+ );
328
+ const enabledMap = settings.enabledPlugins || {};
329
+ const flags = entries
330
+ .map(([k]) => enabledMap[k])
331
+ .filter((flag) => typeof flag === 'boolean');
332
+ if (flags.length > 0 && flags.every((flag) => flag === false)) return false;
333
+ } catch {
334
+ // No readable settings.json — fall through to "installed means enabled".
335
+ }
336
+
337
+ return true;
311
338
  } catch {
312
339
  return false;
313
340
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "luckiest-co",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "Luckiest for Claude Code: plan, go, finish. Your luckiest.co skills and tribe, inside Claude.",
5
5
  "bin": {
6
6
  "luckiest-co": "./bin/install.js"