claude-spotter 1.5.8 → 1.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,19 @@
3
3
  各節はそのversion公開時点の変更記録であり、後続versionにより置換された仕様を含む。
4
4
  現行runtime契約は[`docs/00_overview.md`](docs/00_overview.md)から辿る。
5
5
 
6
+ ## 1.5.9 — 2026-08-14
7
+
8
+ - **Codex side conversationのStopを正常終了させる。** Codex公式Hook契約でnullableな
9
+ `transcript_path`が欠落または`null`の場合と、互換payloadが空文字の場合、未処理例外とexit 2を出さず、
10
+ `transcript_unavailable`の構造Hook eventを記録してexit 0で終了する。
11
+ - **不完全な利用観測を監査成功へ偽装しない。** transcriptが無いturnはauditorを呼ばず、
12
+ 対応する評価turnを`usageStatus: incomplete`で閉じる。非空pathのENOENT・transcript anomaly・
13
+ 通常taskの監査経路は変更せず、非string値はmalformed envelopeとしてexit 2を維持する。
14
+ - **4環境CIを工場共通workflowへ統合。** macOS native、Linux native、Windows native、WSL2の
15
+ reusable workflowへ移行し、依存導入、文書検証、full testの時間を分離する。
16
+ - **Windows CLI試験を端末PATHから分離。** Codex CLI検出・診断のWindows shim解決へ明示envを渡し、
17
+ 開発端末の実PATHに左右されない回帰testへ固定する。
18
+
6
19
  ## 1.5.8 — 2026-08-05
7
20
 
8
21
  - **コードから全ドキュメントを再照合。** 47 Markdownを現行contract、ADR、完了計画、
@@ -1,6 +1,6 @@
1
1
  # Spotter評価dashboard運用
2
2
 
3
- 現行npm配布版: **v1.5.8**(2026-08-05)。v1.5.8は文書整合releaseであり、
3
+ 現行npm配布版: **v1.5.9**(2026-08-14)。v1.5.9はCodex StopとCIの修正releaseであり、
4
4
  dashboard routing構成はv1.5.3から変更していない。
5
5
 
6
6
  この文書はservice設定の正本であり、各端末に現在installされているnpm versionの台帳ではない。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-spotter",
3
- "version": "1.5.8",
3
+ "version": "1.5.9",
4
4
  "description": "Audit agent running alongside Claude Code that catches missed tool calls — 気づく役と実行する役の分離",
5
5
  "type": "module",
6
6
  "bin": {
@@ -15,6 +15,7 @@ import {
15
15
  die,
16
16
  findSpotterMarker,
17
17
  isChildCall,
18
+ optionalString,
18
19
  readStdinJson,
19
20
  requireString,
20
21
  } from '../hooks/lib.mjs';
@@ -286,7 +287,27 @@ export async function runCodexStopHook({
286
287
  });
287
288
  return;
288
289
  }
289
- const transcriptPath = requireString(input, 'transcript_path');
290
+ const transcriptPath = optionalString(input, 'transcript_path');
291
+ if (!transcriptPath) {
292
+ await closeCodexEvaluationTurn({
293
+ createEvaluationStoreFn,
294
+ sessionId: codexSessionId(input),
295
+ usageStatus: 'incomplete',
296
+ completedAtMs: now(),
297
+ writeError: reportError,
298
+ });
299
+ await recordCodexHookEventSafe(recordHookEventFn, {
300
+ projectRoot,
301
+ event: {
302
+ hook: 'Stop',
303
+ status: 'skipped',
304
+ reason: 'transcript_unavailable',
305
+ usedToolCount: 0,
306
+ durationMs: Date.now() - startedAt,
307
+ },
308
+ }, reportError);
309
+ return;
310
+ }
290
311
  const finalResponse = codexLastAssistantMessage(input) ?? '(no final response available)';
291
312
  let toolUsage;
292
313
  try {
@@ -561,6 +582,7 @@ export async function codexHookDiagnostics({
561
582
  command: 'codex',
562
583
  args: ['features', 'list'],
563
584
  platform,
585
+ env,
564
586
  });
565
587
  const features = spawnSyncFn(invocation.command, invocation.args, {
566
588
  encoding: 'utf8',
@@ -123,12 +123,14 @@ export function isSupportedNodeVersion(value) {
123
123
  export async function inspectCodexCliVersion({
124
124
  codexBin = 'codex',
125
125
  platform = process.platform,
126
+ env = process.env,
126
127
  execFileFn = execFileP,
127
128
  } = {}) {
128
129
  const invocation = buildWindowsCompatibleInvocation({
129
130
  command: codexBin,
130
131
  args: ['--version'],
131
132
  platform,
133
+ env,
132
134
  });
133
135
  const { stdout } = await execFileFn(invocation.command, invocation.args, {
134
136
  timeout: 5_000,
@@ -281,6 +281,7 @@ async function exists(path) {
281
281
 
282
282
  export function isCodexCliPresent({
283
283
  platform = process.platform,
284
+ env = process.env,
284
285
  spawnSyncFn = spawnSync,
285
286
  codexBin = 'codex',
286
287
  } = {}) {
@@ -288,6 +289,7 @@ export function isCodexCliPresent({
288
289
  command: codexBin,
289
290
  args: ['--version'],
290
291
  platform,
292
+ env,
291
293
  });
292
294
  const result = spawnSyncFn(invocation.command, invocation.args, {
293
295
  encoding: 'utf8',