Skip to content
2 changes: 1 addition & 1 deletion src/agents/antigravity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ impl AgentIntegration for AntigravityIntegration {
"Config:".bright_black(),
"not configured".bright_black()
);
false
true
Comment thread
fajarhide marked this conversation as resolved.
Outdated
}
}
}
2 changes: 1 addition & 1 deletion src/agents/cline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ impl AgentIntegration for ClineIntegration {
"Config:".bright_black(),
"not configured".bright_black()
);
false
true
Comment thread
fajarhide marked this conversation as resolved.
Outdated
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/agents/codex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ impl AgentIntegration for CodexIntegration {
"Config:".bright_black(),
"not configured".bright_black()
);
false
true
Comment thread
fajarhide marked this conversation as resolved.
Outdated
}
}
}
2 changes: 1 addition & 1 deletion src/agents/copilot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ impl AgentIntegration for CopilotIntegration {
"Config:".bright_black(),
"not configured".bright_black()
);
false
true
Comment thread
fajarhide marked this conversation as resolved.
Outdated
}
}
}
2 changes: 1 addition & 1 deletion src/agents/cursor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ impl AgentIntegration for CursorIntegration {
"Config:".bright_black(),
"not configured".bright_black()
);
false
true
Comment thread
fajarhide marked this conversation as resolved.
Outdated
}
}
}
2 changes: 1 addition & 1 deletion src/agents/gemini.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ impl AgentIntegration for GeminiIntegration {
"Config:".bright_black(),
"not configured".bright_black()
);
false
true
Comment thread
fajarhide marked this conversation as resolved.
Outdated
}
}
}
2 changes: 1 addition & 1 deletion src/agents/openclaw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ impl AgentIntegration for OpenClawIntegration {
"Plugin:".bright_black(),
"not installed".bright_black()
);
false
true
Comment thread
fajarhide marked this conversation as resolved.
Outdated
}
}
}
2 changes: 1 addition & 1 deletion src/agents/opencode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ impl AgentIntegration for OpenCodeIntegration {
"Config:".bright_black(),
"not configured".bright_black()
);
false
true
Comment thread
fajarhide marked this conversation as resolved.
Outdated
}
}
}
2 changes: 1 addition & 1 deletion src/agents/roo_code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ impl AgentIntegration for RooCodeIntegration {
"Config:".bright_black(),
"not configured".bright_black()
);
false
true
Comment thread
fajarhide marked this conversation as resolved.
Outdated
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/agents/vscode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ impl AgentIntegration for VscodeIntegration {
"Config:".bright_black(),
"not configured".bright_black()
);
false
true
Comment thread
fajarhide marked this conversation as resolved.
Outdated
}
}
}
2 changes: 1 addition & 1 deletion src/agents/zed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ impl AgentIntegration for ZedIntegration {
"Config:".bright_black(),
"not configured".bright_black()
);
false
true
Comment thread
fajarhide marked this conversation as resolved.
Outdated
}
}
}
26 changes: 26 additions & 0 deletions src/hooks/session_start.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ struct HookInput {
#[serde(rename = "sessionId", alias = "session_id")]
session_id: String,
#[serde(rename = "workingDirectory", alias = "working_directory")]
#[serde(alias = "cwd")]
working_directory: String,
}

Expand Down Expand Up @@ -432,6 +433,31 @@ mod tests {
assert!(out.is_none());
}

#[test]
fn test_claude_code_cwd_alias_accepted() {
// Claude Code sends "cwd" not "workingDirectory" — this must not produce a parse error
let (store, _dir) = get_store();
// Claude Code sends "cwd" and snake_case field names (from actual hook transcripts)
let input = json!({
"hook_event_name": "SessionStart",
"session_id": "4ba52c00-c43f-46ed-9e0e-9069d5294302",
"transcript_path": "/home/user/.claude/projects/test/session.jsonl",
"cwd": "/home/user/project",
"source": "startup",
"model": "claude-sonnet-4-6"
});

let out = process_payload(&input.to_string(), store.clone(), default_config());
// Fresh session with no toolchain → no watch_paths → None output is correct
// The important thing is: no "[omni] parse error", session IS written to DB
assert!(out.is_none());
// Verify the session was actually persisted
assert!(
store.find_latest_session().is_some(),
"session must be written to DB when cwd alias is used"
);
}

#[test]
fn test_session_summary_format_benar_no_sensitive_data() {
let (store, _dir) = get_store();
Expand Down
Loading