Release v0.3.0 - Strongly-Typed Hooks & Production-Grade Quality
Description
**Release Date**: 2025-10-21 **Type**: Major Release (Breaking Changes) **Status**: ✅ Ready for Release ---
Installation
claude install-skill https://github.com/ZhangHanDong/claude-code-api-rs README
Release v0.3.0 - Strongly-Typed Hooks & Production-Grade Quality
**Release Date**: 2025-10-21 **Type**: Major Release (Breaking Changes) **Status**: ✅ Ready for Release
🎯 Overview
Version 0.3.0 is a **major release** that introduces a complete strongly-typed hooks system, eliminates all compiler warnings, and achieves production-grade code quality through modern Rust patterns.
Key Highlights
- undefined
⚠️ Breaking Changes
HookCallback Trait Signature Change
**This is a breaking change that requires code updates.**
Before (v0.2.0)
#[async_trait]
impl HookCallback for MyHook {
async fn execute(
&self,
input: &serde_json::Value, // Untyped JSON
tool_use_id: Option<&str>,
context: &HookContext,
) -> Result { // Untyped JSON
// Manual JSON parsing required
let tool_name = input.get("tool_name")
.and_then(|v| v.as_str())
.unwrap_or("");
Ok(serde_json::json!({
"continue": true
}))
}
}
After (v0.3.0)
use cc_sdk::{HookInput, HookJSONOutput, SyncHookJSONOutput};
#[async_trait]
impl HookCallback for MyHook {
async fn execute(
&self,
input: &HookInput, // Strongly typed enum
tool_use_id: Option<&str>,
context: &HookContext,
) -> Result { // Strongly typed output
match input {
HookInput::PreToolUse(pre_tool_use) => {
// Type-safe field access
println!("Tool: {}", pre_tool_use.tool_name);
Ok(HookJSONOutput::Sync(SyncHookJSONOutput {
continue_: Some(true), // Field name conversion handled
..Default::default()
}))
}
_ => Ok(HookJSONOutput::Sync(SyncHookJSONOutput::default()))
}
}
}
Hook Event Names Must Be PascalCase
**Critical**: The Claude CLI only recognizes PascalCase event names.
// ❌ Wrong - Will not work
hooks.insert("pre_tool_use".to_string(), vec![...]);
// ✅ Correct
hooks.insert("PreToolUse".to_string(), vec![...]);
**All Valid Event Names**:
- undefined
See [`docs/HOOK_EVENT_NAMES.md`](docs/HOOK_EVENT_NAMES.md) for complete reference.
✨ New Features
Strongly-Typed Hook Input Types
pub enum HookInput {
#[serde(rename = "PreToolUse")]
PreToolUse(PreToolUseHookInpu
Related Agents
Openai Codex CLI
(55.8k ⭐) - Lightweight coding agent that runs in your terminal.
Development community src/agents/ — 11 Agent Definitions
**Generated:** 2026-04-11
Development community Cavecrew Builder
>
Development community Cavecrew Investigator
>
Development community Cavecrew Reviewer
>
Development community Gitnexus Branch Hygiene Reviewer
GitNexus branch hygiene and mergeability reviewer. Use to classify merge state, conflicts, stale branches, merge-from-main commits, unrelated churn, mixed domains, and whether rebase or split is requi
Development community