claude-spotter 0.5.0 → 0.5.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 +17 -0
- package/package.json +1 -1
- package/src/daemon/haiku-caller.mjs +7 -5
- package/src/version.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.1
|
|
4
|
+
|
|
5
|
+
**v0.5.0 の Haiku spawn が初呼び出し時点で落ちていたバグの hot-fix**。
|
|
6
|
+
|
|
7
|
+
### 事の発端
|
|
8
|
+
|
|
9
|
+
v0.5.0 リリース直後の実セッションで、Stop hook の Haiku 判定が毎回失敗して daemon ログに `--session-id cannot be used with --resume unless --fork-session is also passed` が出ていた。claude CLI は `--session-id` と `--resume` の併用を `--fork-session` なしでは拒否する仕様で、v0.5.0 の `buildSpawnArgs` が resume 時に両方渡していたのが原因。v0.5.0 は起動はするが監査は 1 度も成立していなかった (role collapse 回復も永遠に triggering しない状態)。
|
|
10
|
+
|
|
11
|
+
### 変更点
|
|
12
|
+
|
|
13
|
+
- **[src/daemon/haiku-caller.mjs](src/daemon/haiku-caller.mjs)**: resume 時は `--session-id` を外して `--resume <uuid>` のみを渡す形に修正。初回は従来どおり `--session-id <uuid>` で新規セッション確立。
|
|
14
|
+
- **[test/haiku-caller.test.mjs](test/haiku-caller.test.mjs)**: `buildSpawnArgs: subsequent call` のアサーションを「`--session-id` が含まれない / `--resume <uuid>` が正しく渡る」に書き換え。
|
|
15
|
+
|
|
16
|
+
### 残る既知課題
|
|
17
|
+
|
|
18
|
+
v0.5.0 の既知課題 (resume の spawn 削減量未検証、カタログ毎ターン再送コスト、role collapse 実発生頻度の観測) は引き続き持ち越し。v0.5.1 でようやく session-scoped の効果測定が可能になる。
|
|
19
|
+
|
|
3
20
|
## 0.5.0
|
|
4
21
|
|
|
5
22
|
**Session-scoped Haiku 復活 + role-collapse 回復機構 (UX 改善)**。
|
package/package.json
CHANGED
|
@@ -168,12 +168,14 @@ function truncate(s, n = 300) {
|
|
|
168
168
|
// without going through the shell. We use cmd.exe /c explicitly rather than spawn({ shell:
|
|
169
169
|
// true }) because the latter triggers DEP0190 on Node 24+.
|
|
170
170
|
//
|
|
171
|
-
// v0.5.
|
|
172
|
-
//
|
|
173
|
-
//
|
|
171
|
+
// v0.5.1: claude CLI rejects `--session-id` together with `--resume` unless `--fork-session`
|
|
172
|
+
// is present (fork would create a new id, defeating the point). So first call uses
|
|
173
|
+
// `--session-id <uuid>` to pin the id; every subsequent call uses `--resume <uuid>` alone to
|
|
174
|
+
// re-attach. buildSpawnArgs is exported so tests can assert flag wiring without spawning.
|
|
174
175
|
export function buildSpawnArgs({ claudeBin, model, sessionId, resume }) {
|
|
175
|
-
const args =
|
|
176
|
-
|
|
176
|
+
const args = resume
|
|
177
|
+
? ['-p', '--resume', sessionId, '--model', model]
|
|
178
|
+
: ['-p', '--session-id', sessionId, '--model', model];
|
|
177
179
|
if (process.platform === 'win32') {
|
|
178
180
|
return { cmd: 'cmd.exe', cmdArgs: ['/c', claudeBin, ...args] };
|
|
179
181
|
}
|
package/src/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '0.5.
|
|
1
|
+
export const version = '0.5.1';
|