You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace the v0.7.0-era hardcoded `--kind=Stop --text="Session ended"`
hook command with the same transcript-tail catch-up that PreCompact
already does. The old form queued one unclassifiable noise entry
per session end; v0.9.3 reads the JSONL session log and enqueues
user + assistant entries newer than the active task's last event
timestamp.
Implementation: rename precompact_enqueue_transcript_chunks →
enqueue_transcript_chunks_since_last_event with a new
`assistant_chunk_kind` parameter, then call from both PreCompact
(`PreCompactChunk`) and Stop (`StopChunk`) branches. Distinct kinds
let ops grep pending/ by source hook.
Mock test paths (`--mock-event-type` + `--mock-task-id`) bypass
the new Stop branch so existing test fixtures invoking
`--kind=Stop` with mock args still hit the mock-classifier
dispatch unchanged.
Plugin hooks.json Stop entry drops the explicit `--kind=Stop
--text="Session ended"` flags and reads the hook stdin payload
like PostToolUse and PreCompact.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
// v0.9.3: Stop hook does transcript catch-up (like PreCompact)
2563
+
// instead of injecting hardcoded "Session ended" noise.
2564
+
let dir = assert_fs::TempDir::new().unwrap();
2565
+
let workdir = dir.path().join("proj");
2566
+
std::fs::create_dir_all(&workdir).unwrap();
2567
+
2568
+
let _task_id = String::from_utf8(
2569
+
Command::cargo_bin("task-journal")
2570
+
.unwrap()
2571
+
.env("XDG_DATA_HOME", dir.path())
2572
+
.current_dir(&workdir)
2573
+
.args(["create","End-of-session catch-up"])
2574
+
.assert()
2575
+
.success()
2576
+
.get_output()
2577
+
.stdout
2578
+
.clone(),
2579
+
)
2580
+
.unwrap()
2581
+
.trim()
2582
+
.to_string();
2583
+
2584
+
let transcript = workdir.join("session.jsonl");
2585
+
let line_user = r#"{"type":"user","uuid":"u1","timestamp":"2099-01-01T00:00:00.000Z","sessionId":"s1","message":{"content":"the refund flow needs idempotency keys per payment provider"}}"#;
2586
+
let line_assistant = r#"{"type":"assistant","uuid":"a1","timestamp":"2099-01-01T00:00:05.000Z","sessionId":"s1","message":{"content":[{"type":"text","text":"Confirmed: dlocal returns 200 OK for duplicate calls when idempotency-key header is set."}]}}"#;
Copy file name to clipboardExpand all lines: plugin/.claude-plugin/plugin.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "task-journal",
3
-
"version": "0.9.2",
3
+
"version": "0.9.3",
4
4
"description": "Append-only journal of AI-coding task reasoning chains: hypotheses, decisions, rejections, evidence. Renders compact resume packs so an agent can pick up a 2-week-old task with full context.",
Copy file name to clipboardExpand all lines: plugin/package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "task-journal",
3
-
"version": "0.9.2",
3
+
"version": "0.9.3",
4
4
"description": "Append-only journal of AI-coding task reasoning chains. Captures hypotheses, decisions, rejections, evidence — renders compact resume packs so an agent can pick up a 2-week-old task with full context.",
0 commit comments