Skip to content

armgit / ECC

Public Imported from GitHub
0

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

feat: scaffold ECC 2.0 Rust TUI — agentic IDE control plane

Affaan Mustafa00dce30d3bfb
diff --git a/.gitignore b/.gitignore
index ac43c27bc..68de41d15 100644
--- a/.gitignore
+++ b/.gitignore
@@ -83,6 +83,9 @@ temp/
*.bak
*.backup
+# Rust build artifacts
+ecc2/target/
+
# Bootstrap pipeline outputs
# Generated lock files in tool subdirectories
.opencode/package-lock.json
diff --git a/ecc2/Cargo.lock b/ecc2/Cargo.lock
new file mode 100644
index 000000000..59a060d32
--- /dev/null
+++ b/ecc2/Cargo.lock
@@ -0,0 +1,2016 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 4
+
+[[package]]
+name = "ahash"
+version = "0.8.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75"
+dependencies = [
+ "cfg-if",
+ "once_cell",
+ "version_check",
+ "zerocopy",
+]
+
+[[package]]
+name = "aho-corasick"
+version = "1.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "allocator-api2"
+version = "0.2.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
+
+[[package]]
+name = "android_system_properties"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "anstream"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d"
+dependencies = [
+ "anstyle",
+ "anstyle-parse",
+ "anstyle-query",
+ "anstyle-wincon",
+ "colorchoice",
+ "is_terminal_polyfill",
+ "utf8parse",
+]
+
+[[package]]
+name = "anstyle"
+version = "1.0.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000"
+
+[[package]]
+name = "anstyle-parse"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e"
+dependencies = [
+ "utf8parse",
+]
+
+[[package]]
+name = "anstyle-query"
+version = "1.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
+dependencies = [
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "anstyle-wincon"
+version = "3.0.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
+dependencies = [
+ "anstyle",
+ "once_cell_polyfill",
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "anyhow"
+version = "1.0.102"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c"
+
+[[package]]
+name = "autocfg"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
+
+[[package]]
+name = "bitflags"
+version = "2.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af"
+
+[[package]]
+name = "bumpalo"
+version = "3.20.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb"
+
+[[package]]
+name = "bytes"
+version = "1.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33"
+
+[[package]]
+name = "cassowary"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53"
+
+[[package]]
+name = "castaway"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dec551ab6e7578819132c713a93c022a05d60159dc86e7a7050223577484c55a"
+dependencies = [
+ "rustversion",
+]
+
+[[package]]
+name = "cc"
+version = "1.2.57"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a0dd1ca384932ff3641c8718a02769f1698e7563dc6974ffd03346116310423"
+dependencies = [
+ "find-msvc-tools",
+ "jobserver",
+ "libc",
+ "shlex",
+]
+
+[[package]]
+name = "cfg-if"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
+
+[[package]]
+name = "chrono"
+version = "0.4.44"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0"
+dependencies = [
+ "iana-time-zone",
+ "js-sys",
+ "num-traits",
+ "serde",
+ "wasm-bindgen",
+ "windows-link",
+]
+
+[[package]]
+name = "clap"
+version = "4.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b193af5b67834b676abd72466a96c1024e6a6ad978a1f484bd90b85c94041351"
+dependencies = [
+ "clap_builder",
+ "clap_derive",
+]
+
+[[package]]
+name = "clap_builder"
+version = "4.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f"
+dependencies = [
+ "anstream",
+ "anstyle",
+ "clap_lex",
+ "strsim",
+]
+
+[[package]]
+name = "clap_derive"
+version = "4.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1110bd8a634a1ab8cb04345d8d878267d57c3cf1b38d91b71af6686408bbca6a"
+dependencies = [
+ "heck",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "clap_lex"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9"
+
+[[package]]
+name = "colorchoice"
+version = "1.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570"
+
+[[package]]
+name = "compact_str"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3b79c4069c6cad78e2e0cdfcbd26275770669fb39fd308a752dc110e83b9af32"
+dependencies = [
+ "castaway",
+ "cfg-if",
+ "itoa",
+ "rustversion",
+ "ryu",
+ "static_assertions",
+]
+
+[[package]]
+name = "core-foundation-sys"
+version = "0.8.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
+
+[[package]]
+name = "crossterm"
+version = "0.28.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6"
+dependencies = [
+ "bitflags",
+ "crossterm_winapi",
+ "mio",
+ "parking_lot",
+ "rustix",
+ "signal-hook",
+ "signal-hook-mio",
+ "winapi",
+]
+
+[[package]]
+name = "crossterm_winapi"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "darling"
+version = "0.23.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d"
+dependencies = [
+ "darling_core",
+ "darling_macro",
+]
+
+[[package]]
+name = "darling_core"
+version = "0.23.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0"
+dependencies = [
+ "ident_case",
+ "proc-macro2",
+ "quote",
+ "strsim",
+ "syn",
+]
+
+[[package]]
+name = "darling_macro"
+version = "0.23.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d"
+dependencies = [
+ "darling_core",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "dirs"
+version = "6.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e"
+dependencies = [
+ "dirs-sys",
+]
+
+[[package]]
+name = "dirs-sys"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab"
+dependencies = [
+ "libc",
+ "option-ext",
+ "redox_users",
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "displaydoc"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "ecc-tui"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "chrono",
+ "clap",
+ "crossterm",
+ "dirs",
+ "git2",
+ "ratatui",
+ "rusqlite",
+ "serde",
+ "serde_json",
+ "thiserror",
+ "tokio",
+ "toml",
+ "tracing",
+ "tracing-subscriber",
+ "uuid",
+]
+
+[[package]]
+name = "either"
+version = "1.15.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
+
+[[package]]
+name = "equivalent"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
+
+[[package]]
+name = "errno"
+version = "0.3.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
+dependencies = [
+ "libc",
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "fallible-iterator"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649"
+
+[[package]]
+name = "fallible-streaming-iterator"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a"
+
+[[package]]
+name = "find-msvc-tools"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582"
+
+[[package]]
+name = "foldhash"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
+
+[[package]]
+name = "form_urlencoded"
+version = "1.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf"
+dependencies = [
+ "percent-encoding",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.2.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "wasi",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "r-efi 5.3.0",
+ "wasip2",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "r-efi 6.0.0",
+ "wasip2",
+ "wasip3",
+]
+
+[[package]]
+name = "git2"
+version = "0.19.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724"
+dependencies = [
+ "bitflags",
+ "libc",
+ "libgit2-sys",
+ "log",
+ "openssl-probe",
+ "openssl-sys",
+ "url",
+]
+
+[[package]]
+name = "hashbrown"
+version = "0.14.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
+dependencies = [
+ "ahash",
+]
+
+[[package]]
+name = "hashbrown"
+version = "0.15.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1"
+dependencies = [
+ "allocator-api2",
+ "equivalent",
+ "foldhash",
+]
+
+[[package]]
+name = "hashbrown"
+version = "0.16.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"
+
+[[package]]
+name = "hashlink"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af"
+dependencies = [
+ "hashbrown 0.14.5",
+]
+
+[[package]]
+name = "heck"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
+
+[[package]]
+name = "iana-time-zone"
+version = "0.1.65"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470"
+dependencies = [
+ "android_system_properties",
+ "core-foundation-sys",
+ "iana-time-zone-haiku",
+ "js-sys",
+ "log",
+ "wasm-bindgen",
+ "windows-core",
+]
+
+[[package]]
+name = "iana-time-zone-haiku"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "icu_collections"
+version = "2.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43"
+dependencies = [
+ "displaydoc",
+ "potential_utf",
+ "yoke",
+ "zerofrom",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_locale_core"
+version = "2.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6"
+dependencies = [
+ "displaydoc",
+ "litemap",
+ "tinystr",
+ "writeable",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_normalizer"
+version = "2.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599"
+dependencies = [
+ "icu_collections",
+ "icu_normalizer_data",
+ "icu_properties",
+ "icu_provider",
+ "smallvec",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_normalizer_data"
+version = "2.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a"
+
+[[package]]
+name = "icu_properties"
+version = "2.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec"
+dependencies = [
+ "icu_collections",
+ "icu_locale_core",
+ "icu_properties_data",
+ "icu_provider",
+ "zerotrie",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_properties_data"
+version = "2.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af"
+
+[[package]]
+name = "icu_provider"
+version = "2.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614"
+dependencies = [
+ "displaydoc",
+ "icu_locale_core",
+ "writeable",
+ "yoke",
+ "zerofrom",
+ "zerotrie",
+ "zerovec",
+]
+
+[[package]]
+name = "id-arena"
+version = "2.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954"
+
+[[package]]
+name = "ident_case"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
+
+[[package]]
+name = "idna"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de"
+dependencies = [
+ "idna_adapter",
+ "smallvec",
+ "utf8_iter",
+]
+
+[[package]]
+name = "idna_adapter"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344"
+dependencies = [
+ "icu_normalizer",
+ "icu_properties",
+]
+
+[[package]]
+name = "indexmap"
+version = "2.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017"
+dependencies = [
+ "equivalent",
+ "hashbrown 0.16.1",
+ "serde",
+ "serde_core",
+]
+
+[[package]]
+name = "indoc"
+version = "2.0.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
+dependencies = [
+ "rustversion",
+]
+
+[[package]]
+name = "instability"
+version = "0.3.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5eb2d60ef19920a3a9193c3e371f726ec1dafc045dac788d0fb3704272458971"
+dependencies = [
+ "darling",
+ "indoc",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "is_terminal_polyfill"
+version = "1.70.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
+
+[[package]]
+name = "itertools"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186"
+dependencies = [
+ "either",
+]
+
+[[package]]
+name = "itoa"
+version = "1.0.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
+
+[[package]]
+name = "jobserver"
+version = "0.1.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33"
+dependencies = [
+ "getrandom 0.3.4",
+ "libc",
+]
+
+[[package]]
+name = "js-sys"
+version = "0.3.91"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b49715b7073f385ba4bc528e5747d02e66cb39c6146efb66b781f131f0fb399c"
+dependencies = [
+ "once_cell",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "lazy_static"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
+
+[[package]]
+name = "leb128fmt"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2"
+
+[[package]]
+name = "libc"
+version = "0.2.183"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d"
+
+[[package]]
+name = "libgit2-sys"
+version = "0.17.0+1.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "10472326a8a6477c3c20a64547b0059e4b0d086869eee31e6d7da728a8eb7224"
+dependencies = [
+ "cc",
+ "libc",
+ "libssh2-sys",
+ "libz-sys",
+ "openssl-sys",
+ "pkg-config",
+]
+
+[[package]]
+name = "libredox"
+version = "0.1.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1744e39d1d6a9948f4f388969627434e31128196de472883b39f148769bfe30a"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "libsqlite3-sys"
+version = "0.30.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149"
+dependencies = [
+ "cc",
+ "pkg-config",
+ "vcpkg",
+]
+
+[[package]]
+name = "libssh2-sys"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "220e4f05ad4a218192533b300327f5150e809b54c4ec83b5a1d91833601811b9"
+dependencies = [
+ "cc",
+ "libc",
+ "libz-sys",
+ "openssl-sys",
+ "pkg-config",
+ "vcpkg",
+]
+
+[[package]]
+name = "libz-sys"
+version = "1.1.25"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d52f4c29e2a68ac30c9087e1b772dc9f44a2b66ed44edf2266cf2be9b03dafc1"
+dependencies = [
+ "cc",
+ "libc",
+ "pkg-config",
+ "vcpkg",
+]
+
+[[package]]
+name = "linux-raw-sys"
+version = "0.4.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab"
+
+[[package]]
+name = "litemap"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77"
+
+[[package]]
+name = "lock_api"
+version = "0.4.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965"
+dependencies = [
+ "scopeguard",
+]
+
+[[package]]
+name = "log"
+version = "0.4.29"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
+
+[[package]]
+name = "lru"
+version = "0.12.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38"
+dependencies = [
+ "hashbrown 0.15.5",
+]
+
+[[package]]
+name = "matchers"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9"
+dependencies = [
+ "regex-automata",
+]
+
+[[package]]
+name = "memchr"
+version = "2.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
+
+[[package]]
+name = "mio"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc"
+dependencies = [
+ "libc",
+ "log",
+ "wasi",
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "nu-ansi-term"
+version = "0.50.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5"
+dependencies = [
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "num-traits"
+version = "0.2.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "once_cell"
+version = "1.21.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
+
+[[package]]
+name = "once_cell_polyfill"
+version = "1.70.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
+
+[[package]]
+name = "openssl-probe"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e"
+
+[[package]]
+name = "openssl-sys"
+version = "0.9.112"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "57d55af3b3e226502be1526dfdba67ab0e9c96fc293004e79576b2b9edb0dbdb"
+dependencies = [
+ "cc",
+ "libc",
+ "pkg-config",
+ "vcpkg",
+]
+
+[[package]]
+name = "option-ext"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
+
+[[package]]
+name = "parking_lot"
+version = "0.12.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a"
+dependencies = [
+ "lock_api",
+ "parking_lot_core",
+]
+
+[[package]]
+name = "parking_lot_core"
+version = "0.9.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "redox_syscall",
+ "smallvec",
+ "windows-link",
+]
+
+[[package]]
+name = "paste"
+version = "1.0.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
+
+[[package]]
+name = "percent-encoding"
+version = "2.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
+
+[[package]]
+name = "pin-project-lite"
+version = "0.2.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
+
+[[package]]
+name = "pkg-config"
+version = "0.3.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c"
+
+[[package]]
+name = "potential_utf"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77"
+dependencies = [
+ "zerovec",
+]
+
+[[package]]
+name = "prettyplease"
+version = "0.2.37"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b"
+dependencies = [
+ "proc-macro2",
+ "syn",
+]
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.106"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.45"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "r-efi"
+version = "5.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
+
+[[package]]
+name = "r-efi"
+version = "6.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
+
+[[package]]
+name = "ratatui"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eabd94c2f37801c20583fc49dd5cd6b0ba68c716787c2dd6ed18571e1e63117b"
+dependencies = [
+ "bitflags",
+ "cassowary",
+ "compact_str",
+ "crossterm",
+ "indoc",
+ "instability",
+ "itertools",
+ "lru",
+ "paste",
+ "strum",
+ "unicode-segmentation",
+ "unicode-truncate",
+ "unicode-width 0.2.0",
+]
+
+[[package]]
+name = "redox_syscall"
+version = "0.5.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d"
+dependencies = [
+ "bitflags",
+]
+
+[[package]]
+name = "redox_users"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac"
+dependencies = [
+ "getrandom 0.2.17",
+ "libredox",
+ "thiserror",
+]
+
+[[package]]
+name = "regex-automata"
+version = "0.4.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-syntax"
+version = "0.8.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a"
+
+[[package]]
+name = "rusqlite"
+version = "0.32.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7753b721174eb8ff87a9a0e799e2d7bc3749323e773db92e0984debb00019d6e"
+dependencies = [
+ "bitflags",
+ "fallible-iterator",
+ "fallible-streaming-iterator",
+ "hashlink",
+ "libsqlite3-sys",
+ "smallvec",
+]
+
+[[package]]
+name = "rustix"
+version = "0.38.44"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154"
+dependencies = [
+ "bitflags",
+ "errno",
+ "libc",
+ "linux-raw-sys",
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "rustversion"
+version = "1.0.22"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
+
+[[package]]
+name = "ryu"
+version = "1.0.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f"
+
+[[package]]
+name = "scopeguard"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
+
+[[package]]
+name = "semver"
+version = "1.0.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2"
+
+[[package]]
+name = "serde"
+version = "1.0.228"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
+dependencies = [
+ "serde_core",
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_core"
+version = "1.0.228"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.228"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "serde_json"
+version = "1.0.149"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86"
+dependencies = [
+ "itoa",
+ "memchr",
+ "serde",
+ "serde_core",
+ "zmij",
+]
+
+[[package]]
+name = "serde_spanned"
+version = "0.6.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "sharded-slab"
+version = "0.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6"
+dependencies = [
+ "lazy_static",
+]
+
+[[package]]
+name = "shlex"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
+
+[[package]]
+name = "signal-hook"
+version = "0.3.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d881a16cf4426aa584979d30bd82cb33429027e42122b169753d6ef1085ed6e2"
+dependencies = [
+ "libc",
+ "signal-hook-registry",
+]
+
+[[package]]
+name = "signal-hook-mio"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b75a19a7a740b25bc7944bdee6172368f988763b744e3d4dfe753f6b4ece40cc"
+dependencies = [
+ "libc",
+ "mio",
+ "signal-hook",
+]
+
+[[package]]
+name = "signal-hook-registry"
+version = "1.4.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b"
+dependencies = [
+ "errno",
+ "libc",
+]
+
+[[package]]
+name = "smallvec"
+version = "1.15.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
+
+[[package]]
+name = "socket2"
+version = "0.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e"
+dependencies = [
+ "libc",
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "stable_deref_trait"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"
+
+[[package]]
+name = "static_assertions"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
+
+[[package]]
+name = "strsim"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
+
+[[package]]
+name = "strum"
+version = "0.26.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06"
+dependencies = [
+ "strum_macros",
+]
+
+[[package]]
+name = "strum_macros"
+version = "0.26.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be"
+dependencies = [
+ "heck",
+ "proc-macro2",
+ "quote",
+ "rustversion",
+ "syn",
+]
+
+[[package]]
+name = "syn"
+version = "2.0.117"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "synstructure"
+version = "0.13.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "thiserror"
+version = "2.0.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4"
+dependencies = [
+ "thiserror-impl",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "2.0.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "thread_local"
+version = "1.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "tinystr"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869"
+dependencies = [
+ "displaydoc",
+ "zerovec",
+]
+
+[[package]]
+name = "tokio"
+version = "1.50.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "27ad5e34374e03cfffefc301becb44e9dc3c17584f414349ebe29ed26661822d"
+dependencies = [
+ "bytes",
+ "libc",
+ "mio",
+ "parking_lot",
+ "pin-project-lite",
+ "signal-hook-registry",
+ "socket2",
+ "tokio-macros",
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "tokio-macros"
+version = "2.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c55a2eff8b69ce66c84f85e1da1c233edc36ceb85a2058d11b0d6a3c7e7569c"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "toml"
+version = "0.8.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362"
+dependencies = [
+ "serde",
+ "serde_spanned",
+ "toml_datetime",
+ "toml_edit",
+]
+
+[[package]]
+name = "toml_datetime"
+version = "0.6.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "toml_edit"
+version = "0.22.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a"
+dependencies = [
+ "indexmap",
+ "serde",
+ "serde_spanned",
+ "toml_datetime",
+ "toml_write",
+ "winnow",
+]
+
+[[package]]
+name = "toml_write"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801"
+
+[[package]]
+name = "tracing"
+version = "0.1.44"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100"
+dependencies = [
+ "pin-project-lite",
+ "tracing-attributes",
+ "tracing-core",
+]
+
+[[package]]
+name = "tracing-attributes"
+version = "0.1.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "tracing-core"
+version = "0.1.36"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a"
+dependencies = [
+ "once_cell",
+ "valuable",
+]
+
+[[package]]
+name = "tracing-log"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3"
+dependencies = [
+ "log",
+ "once_cell",
+ "tracing-core",
+]
+
+[[package]]
+name = "tracing-subscriber"
+version = "0.3.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319"
+dependencies = [
+ "matchers",
+ "nu-ansi-term",
+ "once_cell",
+ "regex-automata",
+ "sharded-slab",
+ "smallvec",
+ "thread_local",
+ "tracing",
+ "tracing-core",
+ "tracing-log",
+]
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
+
+[[package]]
+name = "unicode-segmentation"
+version = "1.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493"
+
+[[package]]
+name = "unicode-truncate"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b3644627a5af5fa321c95b9b235a72fd24cd29c648c2c379431e6628655627bf"
+dependencies = [
+ "itertools",
+ "unicode-segmentation",
+ "unicode-width 0.1.14",
+]
+
+[[package]]
+name = "unicode-width"
+version = "0.1.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af"
+
+[[package]]
+name = "unicode-width"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd"
+
+[[package]]
+name = "unicode-xid"
+version = "0.2.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853"
+
+[[package]]
+name = "url"
+version = "2.5.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed"
+dependencies = [
+ "form_urlencoded",
+ "idna",
+ "percent-encoding",
+ "serde",
+]
+
+[[package]]
+name = "utf8_iter"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
+
+[[package]]
+name = "utf8parse"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
+
+[[package]]
+name = "uuid"
+version = "1.22.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a68d3c8f01c0cfa54a75291d83601161799e4a89a39e0929f4b0354d88757a37"
+dependencies = [
+ "getrandom 0.4.2",
+ "js-sys",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "valuable"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65"
+
+[[package]]
+name = "vcpkg"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
+
+[[package]]
+name = "version_check"
+version = "0.9.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
+
+[[package]]
+name = "wasi"
+version = "0.11.1+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
+
+[[package]]
+name = "wasip2"
+version = "1.0.2+wasi-0.2.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5"
+dependencies = [
+ "wit-bindgen",
+]
+
+[[package]]
+name = "wasip3"
+version = "0.4.0+wasi-0.3.0-rc-2026-01-06"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5"
+dependencies = [
+ "wit-bindgen",
+]
+
+[[package]]
+name = "wasm-bindgen"
+version = "0.2.114"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6532f9a5c1ece3798cb1c2cfdba640b9b3ba884f5db45973a6f442510a87d38e"
+dependencies = [
+ "cfg-if",
+ "once_cell",
+ "rustversion",
+ "wasm-bindgen-macro",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-macro"
+version = "0.2.114"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "18a2d50fcf105fb33bb15f00e7a77b772945a2ee45dcf454961fd843e74c18e6"
+dependencies = [
+ "quote",
+ "wasm-bindgen-macro-support",
+]
+
+[[package]]
+name = "wasm-bindgen-macro-support"
+version = "0.2.114"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "03ce4caeaac547cdf713d280eda22a730824dd11e6b8c3ca9e42247b25c631e3"
+dependencies = [
+ "bumpalo",
+ "proc-macro2",
+ "quote",
+ "syn",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-shared"
+version = "0.2.114"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "75a326b8c223ee17883a4251907455a2431acc2791c98c26279376490c378c16"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "wasm-encoder"
+version = "0.244.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319"
+dependencies = [
+ "leb128fmt",
+ "wasmparser",
+]
+
+[[package]]
+name = "wasm-metadata"
+version = "0.244.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909"
+dependencies = [
+ "anyhow",
+ "indexmap",
+ "wasm-encoder",
+ "wasmparser",
+]
+
+[[package]]
+name = "wasmparser"
+version = "0.244.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe"
+dependencies = [
+ "bitflags",
+ "hashbrown 0.15.5",
+ "indexmap",
+ "semver",
+]
+
+[[package]]
+name = "winapi"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
+dependencies = [
+ "winapi-i686-pc-windows-gnu",
+ "winapi-x86_64-pc-windows-gnu",
+]
+
+[[package]]
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+
+[[package]]
+name = "windows-core"
+version = "0.62.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb"
+dependencies = [
+ "windows-implement",
+ "windows-interface",
+ "windows-link",
+ "windows-result",
+ "windows-strings",
+]
+
+[[package]]
+name = "windows-implement"
+version = "0.60.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "windows-interface"
+version = "0.59.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "windows-link"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
+
+[[package]]
+name = "windows-result"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5"
+dependencies = [
+ "windows-link",
+]
+
+[[package]]
+name = "windows-strings"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091"
+dependencies = [
+ "windows-link",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.59.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
+dependencies = [
+ "windows-targets",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.61.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
+dependencies = [
+ "windows-link",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
+dependencies = [
+ "windows_aarch64_gnullvm",
+ "windows_aarch64_msvc",
+ "windows_i686_gnu",
+ "windows_i686_gnullvm",
+ "windows_i686_msvc",
+ "windows_x86_64_gnu",
+ "windows_x86_64_gnullvm",
+ "windows_x86_64_msvc",
+]
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
+
+[[package]]
+name = "windows_i686_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
+
+[[package]]
+name = "winnow"
+version = "0.7.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "wit-bindgen"
+version = "0.51.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5"
+dependencies = [
+ "wit-bindgen-rust-macro",
+]
+
+[[package]]
+name = "wit-bindgen-core"
+version = "0.51.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc"
+dependencies = [
+ "anyhow",
+ "heck",
+ "wit-parser",
+]
+
+[[package]]
+name = "wit-bindgen-rust"
+version = "0.51.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21"
+dependencies = [
+ "anyhow",
+ "heck",
+ "indexmap",
+ "prettyplease",
+ "syn",
+ "wasm-metadata",
+ "wit-bindgen-core",
+ "wit-component",
+]
+
+[[package]]
+name = "wit-bindgen-rust-macro"
+version = "0.51.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a"
+dependencies = [
+ "anyhow",
+ "prettyplease",
+ "proc-macro2",
+ "quote",
+ "syn",
+ "wit-bindgen-core",
+ "wit-bindgen-rust",
+]
+
+[[package]]
+name = "wit-component"
+version = "0.244.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2"
+dependencies = [
+ "anyhow",
+ "bitflags",
+ "indexmap",
+ "log",
+ "serde",
+ "serde_derive",
+ "serde_json",
+ "wasm-encoder",
+ "wasm-metadata",
+ "wasmparser",
+ "wit-parser",
+]
+
+[[package]]
+name = "wit-parser"
+version = "0.244.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736"
+dependencies = [
+ "anyhow",
+ "id-arena",
+ "indexmap",
+ "log",
+ "semver",
+ "serde",
+ "serde_derive",
+ "serde_json",
+ "unicode-xid",
+ "wasmparser",
+]
+
+[[package]]
+name = "writeable"
+version = "0.6.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9"
+
+[[package]]
+name = "yoke"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954"
+dependencies = [
+ "stable_deref_trait",
+ "yoke-derive",
+ "zerofrom",
+]
+
+[[package]]
+name = "yoke-derive"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+ "synstructure",
+]
+
+[[package]]
+name = "zerocopy"
+version = "0.8.47"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "efbb2a062be311f2ba113ce66f697a4dc589f85e78a4aea276200804cea0ed87"
+dependencies = [
+ "zerocopy-derive",
+]
+
+[[package]]
+name = "zerocopy-derive"
+version = "0.8.47"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0e8bc7269b54418e7aeeef514aa68f8690b8c0489a06b0136e5f57c4c5ccab89"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "zerofrom"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5"
+dependencies = [
+ "zerofrom-derive",
+]
+
+[[package]]
+name = "zerofrom-derive"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+ "synstructure",
+]
+
+[[package]]
+name = "zerotrie"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851"
+dependencies = [
+ "displaydoc",
+ "yoke",
+ "zerofrom",
+]
+
+[[package]]
+name = "zerovec"
+version = "0.11.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002"
+dependencies = [
+ "yoke",
+ "zerofrom",
+ "zerovec-derive",
+]
+
+[[package]]
+name = "zerovec-derive"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "zmij"
+version = "1.0.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
diff --git a/ecc2/Cargo.toml b/ecc2/Cargo.toml
new file mode 100644
index 000000000..88265f97f
--- /dev/null
+++ b/ecc2/Cargo.toml
@@ -0,0 +1,52 @@
+[package]
+name = "ecc-tui"
+version = "0.1.0"
+edition = "2021"
+description = "ECC 2.0 — Agentic IDE control plane with TUI dashboard"
+license = "MIT"
+authors = ["Affaan Mustafa <[email protected]>"]
+repository = "https://github.com/affaan-m/everything-claude-code"
+
+[dependencies]
+# TUI
+ratatui = "0.29"
+crossterm = "0.28"
+
+# Async runtime
+tokio = { version = "1", features = ["full"] }
+
+# State store
+rusqlite = { version = "0.32", features = ["bundled"] }
+
+# Git integration
+git2 = "0.19"
+
+# Serialization
+serde = { version = "1", features = ["derive"] }
+serde_json = "1"
+toml = "0.8"
+
+# CLI
+clap = { version = "4", features = ["derive"] }
+
+# Logging & tracing
+tracing = "0.1"
+tracing-subscriber = { version = "0.3", features = ["env-filter"] }
+
+# Error handling
+anyhow = "1"
+thiserror = "2"
+
+# Time
+chrono = { version = "0.4", features = ["serde"] }
+
+# UUID for session IDs
+uuid = { version = "1", features = ["v4"] }
+
+# Directory paths
+dirs = "6"
+
+[profile.release]
+lto = true
+codegen-units = 1
+strip = true
diff --git a/ecc2/src/comms/mod.rs b/ecc2/src/comms/mod.rs
new file mode 100644
index 000000000..be176e963
--- /dev/null
+++ b/ecc2/src/comms/mod.rs
@@ -0,0 +1,33 @@
+use anyhow::Result;
+use serde::{Deserialize, Serialize};
+
+use crate::session::store::StateStore;
+
+/// Message types for inter-agent communication.
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub enum MessageType {
+ /// Task handoff from one agent to another
+ TaskHandoff { task: String, context: String },
+ /// Agent requesting information from another
+ Query { question: String },
+ /// Response to a query
+ Response { answer: String },
+ /// Notification of completion
+ Completed { summary: String, files_changed: Vec<String> },
+ /// Conflict detected (e.g., two agents editing the same file)
+ Conflict { file: String, description: String },
+}
+
+/// Send a structured message between sessions.
+pub fn send(db: &StateStore, from: &str, to: &str, msg: &MessageType) -> Result<()> {
+ let content = serde_json::to_string(msg)?;
+ let msg_type = match msg {
+ MessageType::TaskHandoff { .. } => "task_handoff",
+ MessageType::Query { .. } => "query",
+ MessageType::Response { .. } => "response",
+ MessageType::Completed { .. } => "completed",
+ MessageType::Conflict { .. } => "conflict",
+ };
+ db.send_message(from, to, &content, msg_type)?;
+ Ok(())
+}
diff --git a/ecc2/src/config/mod.rs b/ecc2/src/config/mod.rs
new file mode 100644
index 000000000..1e7eeab7c
--- /dev/null
+++ b/ecc2/src/config/mod.rs
@@ -0,0 +1,54 @@
+use anyhow::Result;
+use serde::{Deserialize, Serialize};
+use std::path::PathBuf;
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct Config {
+ pub db_path: PathBuf,
+ pub worktree_root: PathBuf,
+ pub max_parallel_sessions: usize,
+ pub max_parallel_worktrees: usize,
+ pub session_timeout_secs: u64,
+ pub heartbeat_interval_secs: u64,
+ pub default_agent: String,
+ pub theme: Theme,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub enum Theme {
+ Dark,
+ Light,
+}
+
+impl Default for Config {
+ fn default() -> Self {
+ let home = dirs::home_dir().unwrap_or_else(|| PathBuf::from("."));
+ Self {
+ db_path: home.join(".claude").join("ecc2.db"),
+ worktree_root: PathBuf::from("/tmp/ecc-worktrees"),
+ max_parallel_sessions: 8,
+ max_parallel_worktrees: 6,
+ session_timeout_secs: 3600,
+ heartbeat_interval_secs: 30,
+ default_agent: "claude".to_string(),
+ theme: Theme::Dark,
+ }
+ }
+}
+
+impl Config {
+ pub fn load() -> Result<Self> {
+ let config_path = dirs::home_dir()
+ .unwrap_or_else(|| PathBuf::from("."))
+ .join(".claude")
+ .join("ecc2.toml");
+
+ if config_path.exists() {
+ let content = std::fs::read_to_string(&config_path)?;
+ let config: Config = toml::from_str(&content)?;
+ Ok(config)
+ } else {
+ Ok(Config::default())
+ }
+ }
+}
diff --git a/ecc2/src/main.rs b/ecc2/src/main.rs
new file mode 100644
index 000000000..850b7b498
--- /dev/null
+++ b/ecc2/src/main.rs
@@ -0,0 +1,94 @@
+mod config;
+mod session;
+mod tui;
+mod worktree;
+mod observability;
+mod comms;
+
+use anyhow::Result;
+use clap::Parser;
+use tracing_subscriber::EnvFilter;
+
+#[derive(Parser, Debug)]
+#[command(name = "ecc", version, about = "ECC 2.0 — Agentic IDE control plane")]
+struct Cli {
+ #[command(subcommand)]
+ command: Option<Commands>,
+}
+
+#[derive(clap::Subcommand, Debug)]
+enum Commands {
+ /// Launch the TUI dashboard
+ Dashboard,
+ /// Start a new agent session
+ Start {
+ /// Task description for the agent
+ #[arg(short, long)]
+ task: String,
+ /// Agent type (claude, codex, custom)
+ #[arg(short, long, default_value = "claude")]
+ agent: String,
+ /// Create a dedicated worktree for this session
+ #[arg(short, long)]
+ worktree: bool,
+ },
+ /// List active sessions
+ Sessions,
+ /// Show session details
+ Status {
+ /// Session ID or alias
+ session_id: Option<String>,
+ },
+ /// Stop a running session
+ Stop {
+ /// Session ID or alias
+ session_id: String,
+ },
+ /// Run as background daemon
+ Daemon,
+}
+
+#[tokio::main]
+async fn main() -> Result<()> {
+ tracing_subscriber::fmt()
+ .with_env_filter(EnvFilter::from_default_env())
+ .init();
+
+ let cli = Cli::parse();
+
+ let cfg = config::Config::load()?;
+ let db = session::store::StateStore::open(&cfg.db_path)?;
+
+ match cli.command {
+ Some(Commands::Dashboard) | None => {
+ tui::app::run(db, cfg).await?;
+ }
+ Some(Commands::Start { task, agent, worktree: use_worktree }) => {
+ let session_id = session::manager::create_session(
+ &db, &cfg, &task, &agent, use_worktree,
+ ).await?;
+ println!("Session started: {session_id}");
+ }
+ Some(Commands::Sessions) => {
+ let sessions = session::manager::list_sessions(&db)?;
+ for s in sessions {
+ println!("{} [{}] {}", s.id, s.state, s.task);
+ }
+ }
+ Some(Commands::Status { session_id }) => {
+ let id = session_id.unwrap_or_else(|| "latest".to_string());
+ let status = session::manager::get_status(&db, &id)?;
+ println!("{status}");
+ }
+ Some(Commands::Stop { session_id }) => {
+ session::manager::stop_session(&db, &session_id).await?;
+ println!("Session stopped: {session_id}");
+ }
+ Some(Commands::Daemon) => {
+ println!("Starting ECC daemon...");
+ session::daemon::run(db, cfg).await?;
+ }
+ }
+
+ Ok(())
+}
diff --git a/ecc2/src/observability/mod.rs b/ecc2/src/observability/mod.rs
new file mode 100644
index 000000000..5f7a9645d
--- /dev/null
+++ b/ecc2/src/observability/mod.rs
@@ -0,0 +1,54 @@
+use anyhow::Result;
+use serde::{Deserialize, Serialize};
+
+use crate::session::store::StateStore;
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct ToolCallEvent {
+ pub session_id: String,
+ pub tool_name: String,
+ pub input_summary: String,
+ pub output_summary: String,
+ pub duration_ms: u64,
+ pub risk_score: f64,
+}
+
+impl ToolCallEvent {
+ /// Compute risk score based on tool type and input patterns.
+ pub fn compute_risk(tool_name: &str, input: &str) -> f64 {
+ let mut score: f64 = 0.0;
+
+ // Destructive tools get higher base risk
+ match tool_name {
+ "Bash" => score += 0.3,
+ "Write" => score += 0.2,
+ "Edit" => score += 0.1,
+ _ => score += 0.05,
+ }
+
+ // Dangerous patterns in bash commands
+ if tool_name == "Bash" {
+ if input.contains("rm -rf") || input.contains("--force") {
+ score += 0.4;
+ }
+ if input.contains("git push") || input.contains("git reset") {
+ score += 0.3;
+ }
+ if input.contains("sudo") || input.contains("chmod 777") {
+ score += 0.5;
+ }
+ }
+
+ score.min(1.0)
+ }
+}
+
+pub fn log_tool_call(db: &StateStore, event: &ToolCallEvent) -> Result<()> {
+ db.send_message(
+ &event.session_id,
+ "observability",
+ &serde_json::to_string(event)?,
+ "tool_call",
+ )?;
+ Ok(())
+}
diff --git a/ecc2/src/session/daemon.rs b/ecc2/src/session/daemon.rs
new file mode 100644
index 000000000..08969ca29
--- /dev/null
+++ b/ecc2/src/session/daemon.rs
@@ -0,0 +1,46 @@
+use anyhow::Result;
+use std::time::Duration;
+use tokio::time;
+
+use super::store::StateStore;
+use super::SessionState;
+use crate::config::Config;
+
+/// Background daemon that monitors sessions, handles heartbeats,
+/// and cleans up stale resources.
+pub async fn run(db: StateStore, cfg: Config) -> Result<()> {
+ tracing::info!("ECC daemon started");
+
+ let heartbeat_interval = Duration::from_secs(cfg.heartbeat_interval_secs);
+ let timeout = Duration::from_secs(cfg.session_timeout_secs);
+
+ loop {
+ if let Err(e) = check_sessions(&db, timeout) {
+ tracing::error!("Session check failed: {e}");
+ }
+
+ time::sleep(heartbeat_interval).await;
+ }
+}
+
+fn check_sessions(db: &StateStore, timeout: Duration) -> Result<()> {
+ let sessions = db.list_sessions()?;
+
+ for session in sessions {
+ if session.state != SessionState::Running {
+ continue;
+ }
+
+ let elapsed = chrono::Utc::now()
+ .signed_duration_since(session.updated_at)
+ .to_std()
+ .unwrap_or(Duration::ZERO);
+
+ if elapsed > timeout {
+ tracing::warn!("Session {} timed out after {:?}", session.id, elapsed);
+ db.update_state(&session.id, &SessionState::Failed)?;
+ }
+ }
+
+ Ok(())
+}
diff --git a/ecc2/src/session/manager.rs b/ecc2/src/session/manager.rs
new file mode 100644
index 000000000..c08c5f0df
--- /dev/null
+++ b/ecc2/src/session/manager.rs
@@ -0,0 +1,76 @@
+use anyhow::Result;
+use std::fmt;
+
+use super::{Session, SessionMetrics, SessionState};
+use super::store::StateStore;
+use crate::config::Config;
+use crate::worktree;
+
+pub async fn create_session(
+ db: &StateStore,
+ cfg: &Config,
+ task: &str,
+ agent_type: &str,
+ use_worktree: bool,
+) -> Result<String> {
+ let id = uuid::Uuid::new_v4().to_string()[..8].to_string();
+ let now = chrono::Utc::now();
+
+ let wt = if use_worktree {
+ Some(worktree::create_for_session(&id, cfg)?)
+ } else {
+ None
+ };
+
+ let session = Session {
+ id: id.clone(),
+ task: task.to_string(),
+ agent_type: agent_type.to_string(),
+ state: SessionState::Pending,
+ worktree: wt,
+ created_at: now,
+ updated_at: now,
+ metrics: SessionMetrics::default(),
+ };
+
+ db.insert_session(&session)?;
+ Ok(id)
+}
+
+pub fn list_sessions(db: &StateStore) -> Result<Vec<Session>> {
+ db.list_sessions()
+}
+
+pub fn get_status(db: &StateStore, id: &str) -> Result<SessionStatus> {
+ let session = db
+ .get_session(id)?
+ .ok_or_else(|| anyhow::anyhow!("Session not found: {id}"))?;
+ Ok(SessionStatus(session))
+}
+
+pub async fn stop_session(db: &StateStore, id: &str) -> Result<()> {
+ db.update_state(id, &SessionState::Stopped)?;
+ Ok(())
+}
+
+pub struct SessionStatus(Session);
+
+impl fmt::Display for SessionStatus {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+ let s = &self.0;
+ writeln!(f, "Session: {}", s.id)?;
+ writeln!(f, "Task: {}", s.task)?;
+ writeln!(f, "Agent: {}", s.agent_type)?;
+ writeln!(f, "State: {}", s.state)?;
+ if let Some(ref wt) = s.worktree {
+ writeln!(f, "Branch: {}", wt.branch)?;
+ writeln!(f, "Worktree: {}", wt.path.display())?;
+ }
+ writeln!(f, "Tokens: {}", s.metrics.tokens_used)?;
+ writeln!(f, "Tools: {}", s.metrics.tool_calls)?;
+ writeln!(f, "Files: {}", s.metrics.files_changed)?;
+ writeln!(f, "Cost: ${:.4}", s.metrics.cost_usd)?;
+ writeln!(f, "Created: {}", s.created_at)?;
+ write!(f, "Updated: {}", s.updated_at)
+ }
+}
diff --git a/ecc2/src/session/mod.rs b/ecc2/src/session/mod.rs
new file mode 100644
index 000000000..67aeb05a0
--- /dev/null
+++ b/ecc2/src/session/mod.rs
@@ -0,0 +1,59 @@
+pub mod daemon;
+pub mod manager;
+pub mod store;
+
+use chrono::{DateTime, Utc};
+use serde::{Deserialize, Serialize};
+use std::fmt;
+use std::path::PathBuf;
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct Session {
+ pub id: String,
+ pub task: String,
+ pub agent_type: String,
+ pub state: SessionState,
+ pub worktree: Option<WorktreeInfo>,
+ pub created_at: DateTime<Utc>,
+ pub updated_at: DateTime<Utc>,
+ pub metrics: SessionMetrics,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
+pub enum SessionState {
+ Pending,
+ Running,
+ Idle,
+ Completed,
+ Failed,
+ Stopped,
+}
+
+impl fmt::Display for SessionState {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+ match self {
+ SessionState::Pending => write!(f, "pending"),
+ SessionState::Running => write!(f, "running"),
+ SessionState::Idle => write!(f, "idle"),
+ SessionState::Completed => write!(f, "completed"),
+ SessionState::Failed => write!(f, "failed"),
+ SessionState::Stopped => write!(f, "stopped"),
+ }
+ }
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct WorktreeInfo {
+ pub path: PathBuf,
+ pub branch: String,
+ pub base_branch: String,
+}
+
+#[derive(Debug, Clone, Default, Serialize, Deserialize)]
+pub struct SessionMetrics {
+ pub tokens_used: u64,
+ pub tool_calls: u64,
+ pub files_changed: u32,
+ pub duration_secs: u64,
+ pub cost_usd: f64,
+}
diff --git a/ecc2/src/session/store.rs b/ecc2/src/session/store.rs
new file mode 100644
index 000000000..b412f1882
--- /dev/null
+++ b/ecc2/src/session/store.rs
@@ -0,0 +1,190 @@
+use anyhow::Result;
+use rusqlite::Connection;
+use std::path::Path;
+
+use super::{Session, SessionMetrics, SessionState};
+
+pub struct StateStore {
+ conn: Connection,
+}
+
+impl StateStore {
+ pub fn open(path: &Path) -> Result<Self> {
+ let conn = Connection::open(path)?;
+ let store = Self { conn };
+ store.init_schema()?;
+ Ok(store)
+ }
+
+ fn init_schema(&self) -> Result<()> {
+ self.conn.execute_batch(
+ "
+ CREATE TABLE IF NOT EXISTS sessions (
+ id TEXT PRIMARY KEY,
+ task TEXT NOT NULL,
+ agent_type TEXT NOT NULL,
+ state TEXT NOT NULL DEFAULT 'pending',
+ worktree_path TEXT,
+ worktree_branch TEXT,
+ worktree_base TEXT,
+ tokens_used INTEGER DEFAULT 0,
+ tool_calls INTEGER DEFAULT 0,
+ files_changed INTEGER DEFAULT 0,
+ duration_secs INTEGER DEFAULT 0,
+ cost_usd REAL DEFAULT 0.0,
+ created_at TEXT NOT NULL,
+ updated_at TEXT NOT NULL
+ );
+
+ CREATE TABLE IF NOT EXISTS tool_log (
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
+ session_id TEXT NOT NULL REFERENCES sessions(id),
+ tool_name TEXT NOT NULL,
+ input_summary TEXT,
+ output_summary TEXT,
+ duration_ms INTEGER,
+ risk_score REAL DEFAULT 0.0,
+ timestamp TEXT NOT NULL
+ );
+
+ CREATE TABLE IF NOT EXISTS messages (
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
+ from_session TEXT NOT NULL,
+ to_session TEXT NOT NULL,
+ content TEXT NOT NULL,
+ msg_type TEXT NOT NULL DEFAULT 'info',
+ read INTEGER DEFAULT 0,
+ timestamp TEXT NOT NULL
+ );
+
+ CREATE INDEX IF NOT EXISTS idx_sessions_state ON sessions(state);
+ CREATE INDEX IF NOT EXISTS idx_tool_log_session ON tool_log(session_id);
+ CREATE INDEX IF NOT EXISTS idx_messages_to ON messages(to_session, read);
+ ",
+ )?;
+ Ok(())
+ }
+
+ pub fn insert_session(&self, session: &Session) -> Result<()> {
+ self.conn.execute(
+ "INSERT INTO sessions (id, task, agent_type, state, worktree_path, worktree_branch, worktree_base, created_at, updated_at)
+ VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9)",
+ rusqlite::params![
+ session.id,
+ session.task,
+ session.agent_type,
+ session.state.to_string(),
+ session.worktree.as_ref().map(|w| w.path.to_string_lossy().to_string()),
+ session.worktree.as_ref().map(|w| w.branch.clone()),
+ session.worktree.as_ref().map(|w| w.base_branch.clone()),
+ session.created_at.to_rfc3339(),
+ session.updated_at.to_rfc3339(),
+ ],
+ )?;
+ Ok(())
+ }
+
+ pub fn update_state(&self, session_id: &str, state: &SessionState) -> Result<()> {
+ self.conn.execute(
+ "UPDATE sessions SET state = ?1, updated_at = ?2 WHERE id = ?3",
+ rusqlite::params![
+ state.to_string(),
+ chrono::Utc::now().to_rfc3339(),
+ session_id,
+ ],
+ )?;
+ Ok(())
+ }
+
+ pub fn update_metrics(&self, session_id: &str, metrics: &SessionMetrics) -> Result<()> {
+ self.conn.execute(
+ "UPDATE sessions SET tokens_used = ?1, tool_calls = ?2, files_changed = ?3, duration_secs = ?4, cost_usd = ?5, updated_at = ?6 WHERE id = ?7",
+ rusqlite::params![
+ metrics.tokens_used,
+ metrics.tool_calls,
+ metrics.files_changed,
+ metrics.duration_secs,
+ metrics.cost_usd,
+ chrono::Utc::now().to_rfc3339(),
+ session_id,
+ ],
+ )?;
+ Ok(())
+ }
+
+ pub fn list_sessions(&self) -> Result<Vec<Session>> {
+ let mut stmt = self.conn.prepare(
+ "SELECT id, task, agent_type, state, worktree_path, worktree_branch, worktree_base,
+ tokens_used, tool_calls, files_changed, duration_secs, cost_usd,
+ created_at, updated_at
+ FROM sessions ORDER BY updated_at DESC",
+ )?;
+
+ let sessions = stmt
+ .query_map([], |row| {
+ let state_str: String = row.get(3)?;
+ let state = match state_str.as_str() {
+ "running" => SessionState::Running,
+ "idle" => SessionState::Idle,
+ "completed" => SessionState::Completed,
+ "failed" => SessionState::Failed,
+ "stopped" => SessionState::Stopped,
+ _ => SessionState::Pending,
+ };
+
+ let worktree_path: Option<String> = row.get(4)?;
+ let worktree = worktree_path.map(|p| super::WorktreeInfo {
+ path: std::path::PathBuf::from(p),
+ branch: row.get::<_, String>(5).unwrap_or_default(),
+ base_branch: row.get::<_, String>(6).unwrap_or_default(),
+ });
+
+ let created_str: String = row.get(12)?;
+ let updated_str: String = row.get(13)?;
+
+ Ok(Session {
+ id: row.get(0)?,
+ task: row.get(1)?,
+ agent_type: row.get(2)?,
+ state,
+ worktree,
+ created_at: chrono::DateTime::parse_from_rfc3339(&created_str)
+ .unwrap_or_default()
+ .with_timezone(&chrono::Utc),
+ updated_at: chrono::DateTime::parse_from_rfc3339(&updated_str)
+ .unwrap_or_default()
+ .with_timezone(&chrono::Utc),
+ metrics: SessionMetrics {
+ tokens_used: row.get(7)?,
+ tool_calls: row.get(8)?,
+ files_changed: row.get(9)?,
+ duration_secs: row.get(10)?,
+ cost_usd: row.get(11)?,
+ },
+ })
+ })?
+ .collect::<Result<Vec<_>, _>>()?;
+
+ Ok(sessions)
+ }
+
+ pub fn get_session(&self, id: &str) -> Result<Option<Session>> {
+ let sessions = self.list_sessions()?;
+ Ok(sessions.into_iter().find(|s| s.id == id || s.id.starts_with(id)))
+ }
+
+ pub fn send_message(
+ &self,
+ from: &str,
+ to: &str,
+ content: &str,
+ msg_type: &str,
+ ) -> Result<()> {
+ self.conn.execute(
+ "INSERT INTO messages (from_session, to_session, content, msg_type, timestamp)
+ VALUES (?1, ?2, ?3, ?4, ?5)",
+ rusqlite::params![from, to, content, msg_type, chrono::Utc::now().to_rfc3339()],
+ )?;
+ Ok(())
+ }
+}
diff --git a/ecc2/src/tui/app.rs b/ecc2/src/tui/app.rs
new file mode 100644
index 000000000..6ad11a5f1
--- /dev/null
+++ b/ecc2/src/tui/app.rs
@@ -0,0 +1,52 @@
+use anyhow::Result;
+use crossterm::{
+ event::{self, Event, KeyCode, KeyModifiers},
+ execute,
+ terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
+};
+use ratatui::prelude::*;
+use std::io;
+use std::time::Duration;
+
+use super::dashboard::Dashboard;
+use crate::config::Config;
+use crate::session::store::StateStore;
+
+pub async fn run(db: StateStore, cfg: Config) -> Result<()> {
+ enable_raw_mode()?;
+ let mut stdout = io::stdout();
+ execute!(stdout, EnterAlternateScreen)?;
+
+ let backend = CrosstermBackend::new(stdout);
+ let mut terminal = Terminal::new(backend)?;
+
+ let mut dashboard = Dashboard::new(db, cfg);
+
+ loop {
+ terminal.draw(|frame| dashboard.render(frame))?;
+
+ if event::poll(Duration::from_millis(250))? {
+ if let Event::Key(key) = event::read()? {
+ match (key.modifiers, key.code) {
+ (KeyModifiers::CONTROL, KeyCode::Char('c')) => break,
+ (_, KeyCode::Char('q')) => break,
+ (_, KeyCode::Tab) => dashboard.next_pane(),
+ (KeyModifiers::SHIFT, KeyCode::BackTab) => dashboard.prev_pane(),
+ (_, KeyCode::Char('j')) | (_, KeyCode::Down) => dashboard.scroll_down(),
+ (_, KeyCode::Char('k')) | (_, KeyCode::Up) => dashboard.scroll_up(),
+ (_, KeyCode::Char('n')) => dashboard.new_session(),
+ (_, KeyCode::Char('s')) => dashboard.stop_selected(),
+ (_, KeyCode::Char('r')) => dashboard.refresh(),
+ (_, KeyCode::Char('?')) => dashboard.toggle_help(),
+ _ => {}
+ }
+ }
+ }
+
+ dashboard.tick().await;
+ }
+
+ disable_raw_mode()?;
+ execute!(terminal.backend_mut(), LeaveAlternateScreen)?;
+ Ok(())
+}
diff --git a/ecc2/src/tui/dashboard.rs b/ecc2/src/tui/dashboard.rs
new file mode 100644
index 000000000..aca1e9958
--- /dev/null
+++ b/ecc2/src/tui/dashboard.rs
@@ -0,0 +1,273 @@
+use ratatui::{
+ prelude::*,
+ widgets::{Block, Borders, List, ListItem, Paragraph, Tabs},
+};
+
+use crate::config::Config;
+use crate::session::{Session, SessionState};
+use crate::session::store::StateStore;
+
+pub struct Dashboard {
+ db: StateStore,
+ cfg: Config,
+ sessions: Vec<Session>,
+ selected_pane: Pane,
+ selected_session: usize,
+ show_help: bool,
+ scroll_offset: usize,
+}
+
+#[derive(Debug, Clone, Copy, PartialEq)]
+enum Pane {
+ Sessions,
+ Output,
+ Metrics,
+}
+
+impl Dashboard {
+ pub fn new(db: StateStore, cfg: Config) -> Self {
+ let sessions = db.list_sessions().unwrap_or_default();
+ Self {
+ db,
+ cfg,
+ sessions,
+ selected_pane: Pane::Sessions,
+ selected_session: 0,
+ show_help: false,
+ scroll_offset: 0,
+ }
+ }
+
+ pub fn render(&self, frame: &mut Frame) {
+ let chunks = Layout::default()
+ .direction(Direction::Vertical)
+ .constraints([
+ Constraint::Length(3), // Header
+ Constraint::Min(10), // Main content
+ Constraint::Length(3), // Status bar
+ ])
+ .split(frame.area());
+
+ self.render_header(frame, chunks[0]);
+
+ if self.show_help {
+ self.render_help(frame, chunks[1]);
+ } else {
+ let main_chunks = Layout::default()
+ .direction(Direction::Horizontal)
+ .constraints([
+ Constraint::Percentage(35), // Session list
+ Constraint::Percentage(65), // Output/details
+ ])
+ .split(chunks[1]);
+
+ self.render_sessions(frame, main_chunks[0]);
+
+ let right_chunks = Layout::default()
+ .direction(Direction::Vertical)
+ .constraints([
+ Constraint::Percentage(70), // Output
+ Constraint::Percentage(30), // Metrics
+ ])
+ .split(main_chunks[1]);
+
+ self.render_output(frame, right_chunks[0]);
+ self.render_metrics(frame, right_chunks[1]);
+ }
+
+ self.render_status_bar(frame, chunks[2]);
+ }
+
+ fn render_header(&self, frame: &mut Frame, area: Rect) {
+ let running = self.sessions.iter().filter(|s| s.state == SessionState::Running).count();
+ let total = self.sessions.len();
+
+ let title = format!(" ECC 2.0 | {running} running / {total} total ");
+ let tabs = Tabs::new(vec!["Sessions", "Output", "Metrics"])
+ .block(Block::default().borders(Borders::ALL).title(title))
+ .select(match self.selected_pane {
+ Pane::Sessions => 0,
+ Pane::Output => 1,
+ Pane::Metrics => 2,
+ })
+ .highlight_style(Style::default().fg(Color::Cyan).add_modifier(Modifier::BOLD));
+
+ frame.render_widget(tabs, area);
+ }
+
+ fn render_sessions(&self, frame: &mut Frame, area: Rect) {
+ let items: Vec<ListItem> = self
+ .sessions
+ .iter()
+ .enumerate()
+ .map(|(i, s)| {
+ let state_icon = match s.state {
+ SessionState::Running => "●",
+ SessionState::Idle => "○",
+ SessionState::Completed => "✓",
+ SessionState::Failed => "✗",
+ SessionState::Stopped => "■",
+ SessionState::Pending => "◌",
+ };
+ let style = if i == self.selected_session {
+ Style::default().fg(Color::Cyan).add_modifier(Modifier::BOLD)
+ } else {
+ Style::default()
+ };
+ let text = format!("{state_icon} {} [{}] {}", &s.id[..8.min(s.id.len())], s.agent_type, s.task);
+ ListItem::new(text).style(style)
+ })
+ .collect();
+
+ let border_style = if self.selected_pane == Pane::Sessions {
+ Style::default().fg(Color::Cyan)
+ } else {
+ Style::default()
+ };
+
+ let list = List::new(items).block(
+ Block::default()
+ .borders(Borders::ALL)
+ .title(" Sessions ")
+ .border_style(border_style),
+ );
+ frame.render_widget(list, area);
+ }
+
+ fn render_output(&self, frame: &mut Frame, area: Rect) {
+ let content = if let Some(session) = self.sessions.get(self.selected_session) {
+ format!("Agent output for session {}...\n\n(Live streaming coming soon)", session.id)
+ } else {
+ "No sessions. Press 'n' to start one.".to_string()
+ };
+
+ let border_style = if self.selected_pane == Pane::Output {
+ Style::default().fg(Color::Cyan)
+ } else {
+ Style::default()
+ };
+
+ let paragraph = Paragraph::new(content).block(
+ Block::default()
+ .borders(Borders::ALL)
+ .title(" Output ")
+ .border_style(border_style),
+ );
+ frame.render_widget(paragraph, area);
+ }
+
+ fn render_metrics(&self, frame: &mut Frame, area: Rect) {
+ let content = if let Some(session) = self.sessions.get(self.selected_session) {
+ let m = &session.metrics;
+ format!(
+ "Tokens: {} | Tools: {} | Files: {} | Cost: ${:.4} | Duration: {}s",
+ m.tokens_used, m.tool_calls, m.files_changed, m.cost_usd, m.duration_secs
+ )
+ } else {
+ "No metrics available".to_string()
+ };
+
+ let border_style = if self.selected_pane == Pane::Metrics {
+ Style::default().fg(Color::Cyan)
+ } else {
+ Style::default()
+ };
+
+ let paragraph = Paragraph::new(content).block(
+ Block::default()
+ .borders(Borders::ALL)
+ .title(" Metrics ")
+ .border_style(border_style),
+ );
+ frame.render_widget(paragraph, area);
+ }
+
+ fn render_status_bar(&self, frame: &mut Frame, area: Rect) {
+ let text = " [n]ew session [s]top [Tab] switch pane [j/k] scroll [?] help [q]uit ";
+ let paragraph = Paragraph::new(text)
+ .style(Style::default().fg(Color::DarkGray))
+ .block(Block::default().borders(Borders::ALL));
+ frame.render_widget(paragraph, area);
+ }
+
+ fn render_help(&self, frame: &mut Frame, area: Rect) {
+ let help = vec![
+ "Keyboard Shortcuts:",
+ "",
+ " n New session",
+ " s Stop selected session",
+ " Tab Next pane",
+ " S-Tab Previous pane",
+ " j/↓ Scroll down",
+ " k/↑ Scroll up",
+ " r Refresh",
+ " ? Toggle help",
+ " q/C-c Quit",
+ ];
+
+ let paragraph = Paragraph::new(help.join("\n")).block(
+ Block::default()
+ .borders(Borders::ALL)
+ .title(" Help ")
+ .border_style(Style::default().fg(Color::Yellow)),
+ );
+ frame.render_widget(paragraph, area);
+ }
+
+ pub fn next_pane(&mut self) {
+ self.selected_pane = match self.selected_pane {
+ Pane::Sessions => Pane::Output,
+ Pane::Output => Pane::Metrics,
+ Pane::Metrics => Pane::Sessions,
+ };
+ }
+
+ pub fn prev_pane(&mut self) {
+ self.selected_pane = match self.selected_pane {
+ Pane::Sessions => Pane::Metrics,
+ Pane::Output => Pane::Sessions,
+ Pane::Metrics => Pane::Output,
+ };
+ }
+
+ pub fn scroll_down(&mut self) {
+ if self.selected_pane == Pane::Sessions && !self.sessions.is_empty() {
+ self.selected_session = (self.selected_session + 1).min(self.sessions.len() - 1);
+ } else {
+ self.scroll_offset = self.scroll_offset.saturating_add(1);
+ }
+ }
+
+ pub fn scroll_up(&mut self) {
+ if self.selected_pane == Pane::Sessions {
+ self.selected_session = self.selected_session.saturating_sub(1);
+ } else {
+ self.scroll_offset = self.scroll_offset.saturating_sub(1);
+ }
+ }
+
+ pub fn new_session(&mut self) {
+ // TODO: Open a dialog to create a new session
+ tracing::info!("New session dialog requested");
+ }
+
+ pub fn stop_selected(&mut self) {
+ if let Some(session) = self.sessions.get(self.selected_session) {
+ let _ = self.db.update_state(&session.id, &SessionState::Stopped);
+ self.refresh();
+ }
+ }
+
+ pub fn refresh(&mut self) {
+ self.sessions = self.db.list_sessions().unwrap_or_default();
+ }
+
+ pub fn toggle_help(&mut self) {
+ self.show_help = !self.show_help;
+ }
+
+ pub async fn tick(&mut self) {
+ // Periodic refresh every few ticks
+ self.sessions = self.db.list_sessions().unwrap_or_default();
+ }
+}
diff --git a/ecc2/src/tui/mod.rs b/ecc2/src/tui/mod.rs
new file mode 100644
index 000000000..d6a75a7d0
--- /dev/null
+++ b/ecc2/src/tui/mod.rs
@@ -0,0 +1,3 @@
+pub mod app;
+mod dashboard;
+mod widgets;
diff --git a/ecc2/src/tui/widgets.rs b/ecc2/src/tui/widgets.rs
new file mode 100644
index 000000000..604d6a0ee
--- /dev/null
+++ b/ecc2/src/tui/widgets.rs
@@ -0,0 +1,6 @@
+// Custom TUI widgets for ECC 2.0
+// TODO: Implement custom widgets:
+// - TokenMeter: visual token usage bar with budget threshold
+// - DiffViewer: side-by-side syntax-highlighted diff display
+// - ProgressTimeline: session timeline with tool call markers
+// - AgentTree: hierarchical view of parent/child agent sessions
diff --git a/ecc2/src/worktree/mod.rs b/ecc2/src/worktree/mod.rs
new file mode 100644
index 000000000..50306f2ac
--- /dev/null
+++ b/ecc2/src/worktree/mod.rs
@@ -0,0 +1,80 @@
+use anyhow::{Context, Result};
+use std::path::PathBuf;
+use std::process::Command;
+
+use crate::config::Config;
+use crate::session::WorktreeInfo;
+
+/// Create a new git worktree for an agent session.
+pub fn create_for_session(session_id: &str, cfg: &Config) -> Result<WorktreeInfo> {
+ let branch = format!("ecc/{session_id}");
+ let path = cfg.worktree_root.join(session_id);
+
+ // Get current branch as base
+ let base = get_current_branch()?;
+
+ std::fs::create_dir_all(&cfg.worktree_root)
+ .context("Failed to create worktree root directory")?;
+
+ let output = Command::new("git")
+ .args(["worktree", "add", "-b", &branch])
+ .arg(&path)
+ .arg("HEAD")
+ .output()
+ .context("Failed to run git worktree add")?;
+
+ if !output.status.success() {
+ let stderr = String::from_utf8_lossy(&output.stderr);
+ anyhow::bail!("git worktree add failed: {stderr}");
+ }
+
+ tracing::info!("Created worktree at {} on branch {}", path.display(), branch);
+
+ Ok(WorktreeInfo {
+ path,
+ branch,
+ base_branch: base,
+ })
+}
+
+/// Remove a worktree and its branch.
+pub fn remove(path: &PathBuf) -> Result<()> {
+ let output = Command::new("git")
+ .args(["worktree", "remove", "--force"])
+ .arg(path)
+ .output()
+ .context("Failed to remove worktree")?;
+
+ if !output.status.success() {
+ let stderr = String::from_utf8_lossy(&output.stderr);
+ tracing::warn!("Worktree removal warning: {stderr}");
+ }
+
+ Ok(())
+}
+
+/// List all active worktrees.
+pub fn list() -> Result<Vec<String>> {
+ let output = Command::new("git")
+ .args(["worktree", "list", "--porcelain"])
+ .output()
+ .context("Failed to list worktrees")?;
+
+ let stdout = String::from_utf8_lossy(&output.stdout);
+ let worktrees: Vec<String> = stdout
+ .lines()
+ .filter(|l| l.starts_with("worktree "))
+ .map(|l| l.trim_start_matches("worktree ").to_string())
+ .collect();
+
+ Ok(worktrees)
+}
+
+fn get_current_branch() -> Result<String> {
+ let output = Command::new("git")
+ .args(["rev-parse", "--abbrev-ref", "HEAD"])
+ .output()
+ .context("Failed to get current branch")?;
+
+ Ok(String::from_utf8_lossy(&output.stdout).trim().to_string())
+}