gsd-lite 0.5.7 → 0.5.9

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.
@@ -13,7 +13,7 @@
13
13
  "name": "gsd",
14
14
  "source": "./",
15
15
  "description": "AI orchestration tool — GSD management shell + Superpowers quality core. 5 commands, 4 agents, 5 workflows, MCP server, context monitoring.",
16
- "version": "0.5.7",
16
+ "version": "0.5.9",
17
17
  "keywords": [
18
18
  "orchestration",
19
19
  "mcp",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gsd",
3
- "version": "0.5.7",
3
+ "version": "0.5.9",
4
4
  "description": "AI orchestration tool for Claude Code — GSD management shell + Superpowers quality core",
5
5
  "author": {
6
6
  "name": "sdsrss",
@@ -28,7 +28,10 @@ Call the `health` MCP tool:
28
28
 
29
29
  Check if GSD hooks are registered in Claude settings:
30
30
  - Read `~/.claude/settings.json` (or `~/.claude/settings.local.json`)
31
- - Check for `statusLine` entry containing `gsd-statusline`
31
+ - StatusLine check (check BOTH paths):
32
+ 1. Direct: `statusLine` entry containing `gsd-statusline`
33
+ 2. Composite: read `~/.cache/code-graph/statusline-registry.json` — if any entry's `command` contains `gsd-statusline`, it is registered through the composite statusline system
34
+ - Either path present: StatusLine = registered
32
35
  - Check for `PostToolUse` hook entry containing `gsd-context-monitor`
33
36
  - Both present: record PASS
34
37
  - Partial: record WARN with which hook is missing
@@ -50,10 +53,14 @@ Check if `.gsd/.state-lock` exists:
50
53
  ## STEP 5: Auto-Update Status
51
54
 
52
55
  Check for update-related information:
53
- - Read `~/.claude/gsd/package.json` for installed version
54
- - Compare with the version from `health` tool response
55
- - If versions match: record PASS with version number
56
- - If mismatch: record WARN "Version mismatch: installed={x}, server={y}"
56
+ - Read the `health` tool response for running server version
57
+ - Read `package.json` in the current project root for source version (if in a dev repo with `.git`)
58
+ - Read `~/.claude/gsd/package.json` for runtime version (if exists)
59
+ - Compare all available versions:
60
+ - All match: record PASS with version number
61
+ - Server version < source version: record WARN "MCP server running v{x} but source is v{y}. Run /mcp to restart"
62
+ - Runtime < server: record WARN "Runtime dir outdated: v{x} vs server v{y}"
63
+ - Any mismatch: record WARN with details
57
64
  - If `~/.claude/gsd/.update-pending` exists: record INFO "Update pending, will apply on next session"
58
65
  - If cannot determine: record INFO "Update status unavailable"
59
66
 
@@ -227,6 +227,14 @@ function isDevMode() {
227
227
 
228
228
  function getInstallMode() {
229
229
  if (isDevMode()) return 'dev';
230
+ // Check if installed as a Claude Code plugin (installed_plugins.json has gsd entry)
231
+ // Hook files live at ~/.claude/hooks/ so pluginRoot (=__dirname/..) equals claudeDir,
232
+ // but that doesn't mean it's a manual install — check the plugin registry first.
233
+ try {
234
+ const pluginsFile = path.join(claudeDir, 'plugins', 'installed_plugins.json');
235
+ const plugins = JSON.parse(fs.readFileSync(pluginsFile, 'utf8'));
236
+ if (plugins.plugins?.['gsd@gsd']?.[0]) return 'plugin';
237
+ } catch { /* fall through */ }
230
238
  return path.resolve(pluginRoot) === path.resolve(claudeDir)
231
239
  ? 'manual'
232
240
  : 'plugin';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gsd-lite",
3
- "version": "0.5.7",
3
+ "version": "0.5.9",
4
4
  "description": "AI orchestration tool for Claude Code — GSD management shell + Superpowers quality core",
5
5
  "type": "module",
6
6
  "bin": {
package/src/server.js CHANGED
@@ -8,20 +8,30 @@ import { init, read, update, phaseComplete } from './tools/state.js';
8
8
  const _require = createRequire(import.meta.url);
9
9
  const PKG_VERSION = _require('../package.json').version;
10
10
 
11
- // Dev-mode version drift detection: warn when running code differs from disk
12
- const _isDevMode = (() => {
13
- try { return _require('node:fs').existsSync(new URL('../.git', import.meta.url)); } catch { return false; }
14
- })();
11
+ // Version drift detection: warn when running code differs from disk or plugin cache
12
+ const _fs = _require('node:fs');
13
+ const _path = _require('node:path');
14
+ const _os = _require('node:os');
15
15
  function _checkVersionDrift() {
16
- if (!_isDevMode) return null;
17
16
  try {
18
- // Clear require cache to read fresh package.json
17
+ // Strategy 1: Check package.json on disk (dev mode)
19
18
  const pkgPath = _require.resolve('../package.json');
20
19
  delete _require.cache[pkgPath];
21
20
  const diskVersion = _require('../package.json').version;
22
21
  if (diskVersion !== PKG_VERSION) {
23
22
  return `⚠️ GSD server running v${PKG_VERSION} but code on disk is v${diskVersion}. Run /mcp to restart.`;
24
23
  }
24
+
25
+ // Strategy 2: Check plugin cache registry (plugin mode)
26
+ const claudeDir = process.env.CLAUDE_CONFIG_DIR || _path.join(_os.homedir(), '.claude');
27
+ const pluginsFile = _path.join(claudeDir, 'plugins', 'installed_plugins.json');
28
+ if (_fs.existsSync(pluginsFile)) {
29
+ const plugins = JSON.parse(_fs.readFileSync(pluginsFile, 'utf8'));
30
+ const gsdEntry = plugins.plugins?.['gsd@gsd']?.[0];
31
+ if (gsdEntry?.version && gsdEntry.version !== PKG_VERSION) {
32
+ return `⚠️ GSD server running v${PKG_VERSION} but plugin registry has v${gsdEntry.version}. Run /mcp to restart.`;
33
+ }
34
+ }
25
35
  } catch { /* ignore */ }
26
36
  return null;
27
37
  }