claude-spotter 1.1.0 → 1.1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.1.1
4
+
5
+ **既 install プロジェクトで `spotter install` が refresh を skip してしまう bug の hot-fix**。v1.1.0 で追加した tool-db 自動構築が、hook 登録済みの場合に [install.mjs](src/cli/install.mjs) の早期 return に引っかかって走らない穴があった。これでは「既に install 済みのプロジェクトで tool-db.json が作られない」という v1.1.0 が解決すべき症状がそのまま残る。
6
+
7
+ ### 変更点
8
+
9
+ - **編集 [src/cli/install.mjs](src/cli/install.mjs)**: hook 登録不要時の早期 return を削除、if/else 構造に組み直して **settings.json の差分有無に関わらず refresh が走る** ようにした。v1.1.0 升級後の既 install プロジェクトでも `spotter install` 再実行で tool-db.json が seed される。副次効果として `spotter install` 再実行が「hook 登録 + tool-db drift 補正」の標準オペレーションとして使える
10
+
3
11
  ## 1.1.0
4
12
 
5
13
  **`spotter install` が tool-db を自動構築 + SessionStart hook がバックグラウンド refresh**。install 直後から audit 対象が揃うようになり、以降の session でも MCP / スキル / サブエージェントの追加・削除が自動追従する。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-spotter",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Audit agent running alongside Claude Code that catches missed tool calls — 気づく役と実行する役の分離",
5
5
  "type": "module",
6
6
  "bin": {
@@ -79,28 +79,30 @@ export async function runInstall({ target = 'project', autoYes = false, cwd = pr
79
79
 
80
80
  if (diff === null) {
81
81
  console.log(' hooks already registered — nothing to change');
82
- return;
83
- }
84
-
85
- console.log('\n--- proposed .claude/settings.json changes ---');
86
- console.log(diff);
87
- console.log('---------------------------------------------\n');
88
-
89
- if (!autoYes) {
90
- const rl = createInterface({ input: process.stdin, output: process.stdout });
91
- const answer = await rl.question('apply these changes? [y/N] ');
92
- rl.close();
93
- if (!/^y(es)?$/i.test(answer.trim())) {
94
- console.log('aborted.');
95
- return;
82
+ } else {
83
+ console.log('\n--- proposed .claude/settings.json changes ---');
84
+ console.log(diff);
85
+ console.log('---------------------------------------------\n');
86
+
87
+ if (!autoYes) {
88
+ const rl = createInterface({ input: process.stdin, output: process.stdout });
89
+ const answer = await rl.question('apply these changes? [y/N] ');
90
+ rl.close();
91
+ if (!/^y(es)?$/i.test(answer.trim())) {
92
+ console.log('aborted.');
93
+ return;
94
+ }
96
95
  }
97
- }
98
96
 
99
- await mkdir(dirname(settingsPath), { recursive: true });
100
- await writeFile(settingsPath, JSON.stringify(updated, null, 2) + '\n', 'utf8');
101
- console.log(`wrote ${settingsPath}`);
97
+ await mkdir(dirname(settingsPath), { recursive: true });
98
+ await writeFile(settingsPath, JSON.stringify(updated, null, 2) + '\n', 'utf8');
99
+ console.log(`wrote ${settingsPath}`);
100
+ }
102
101
 
103
102
  // Seed the tool-db so the first session has something to audit against.
103
+ // Runs regardless of whether settings.json changed — re-running `spotter install`
104
+ // on an already-installed project is the canonical way to refresh tool-db drift
105
+ // (skills added, MCP servers registered, etc.) alongside upgrades.
104
106
  // Skipped for user-mode (deprecated — no projectRoot) and when caller opts out
105
107
  // (tests set skipRefresh=true to avoid scanning the real user environment).
106
108
  if (target === 'project' && !skipRefresh) {