Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ parking_lot = "0.12"
# 内部 crates (workspace split)
cc-keybindings = { path = "crates/cc-keybindings" }
cc-observability = { path = "crates/cc-observability" }
cc-types = { path = "crates/cc-types" }

# Daemon HTTP server
axum = { version = "0.8", features = ["ws"] }
Expand Down
11 changes: 11 additions & 0 deletions crates/cc-types/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[package]
name = "cc-types"
version = "0.1.0"
edition = "2021"
description = "Pure leaf types for cc-rust: message, state, transitions (no runtime deps on root crate)"

[dependencies]
serde = { workspace = true }
serde_json = { workspace = true }
uuid = { workspace = true }
chrono = { workspace = true }
12 changes: 12 additions & 0 deletions crates/cc-types/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//! Pure leaf types extracted from `claude-code-rs::types`.
//!
//! This crate holds the subset of `src/types/` with no cross-module dependencies
//! on the main crate (teams / ui / config / ipc). The three modules below are
//! the truly pure leaves; `app_state`, `tool`, and `config` remain in the root
//! crate because they still reach into the not-yet-extracted subsystems.
//!
//! See issue #70 (`[workspace-split] Phase 1`) for the rationale behind this
//! partial split.
pub mod message;
pub mod state;
pub mod transitions;
File renamed without changes.
1 change: 1 addition & 0 deletions crates/claude-code-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ parking_lot = { workspace = true }
# 内部 workspace crates (P1)
cc-keybindings = { workspace = true }
cc-observability = { workspace = true }
cc-types = { workspace = true }

# Daemon
axum = { workspace = true }
Expand Down
13 changes: 10 additions & 3 deletions crates/claude-code-rs/src/types/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
// `message`, `state`, `transitions` now live in the `cc-types` workspace crate
// (issue #70 — Phase 1 leaf extraction). Re-export them here so existing
// `crate::types::message::*` paths keep resolving across the ~100 call sites
// in this crate.
//
// `app_state`, `tool`, and `config` still depend on teams / ui / config / ipc
// and stay local to the root crate until those subsystems move out. Once they
// do, this file can collapse to a single `pub use cc_types::*;`.
pub use cc_types::{message, state, transitions};

pub mod app_state;
pub mod config;
pub mod message;
pub mod state;
pub mod tool;
pub mod transitions;
Loading