diff --git a/.github/workflows/upgrade.yml b/.github/workflows/upgrade.yml index e5e10bace..15bcdfd74 100644 --- a/.github/workflows/upgrade.yml +++ b/.github/workflows/upgrade.yml @@ -25,6 +25,7 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Create Pull Request + id: cpr uses: peter-evans/create-pull-request@v8 with: token: ${{ secrets.PAT_TOKEN }} @@ -33,6 +34,11 @@ jobs: body: Automated overlay upgrade branch: chore/upgrade-overlays delete-branch: true + - name: Enable Auto-Merge + if: steps.cpr.outputs.pull-request-number + run: gh pr merge ${{ steps.cpr.outputs.pull-request-number }} --squash --auto + env: + GH_TOKEN: ${{ secrets.PAT_TOKEN }} upgrade-check: if: always() needs: diff --git a/Cargo.lock b/Cargo.lock index 084f00774..7442b92c9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,18 @@ # 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" @@ -11,6 +23,12 @@ 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" @@ -157,6 +175,171 @@ dependencies = [ "winnow", ] +[[package]] +name = "async-channel" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +dependencies = [ + "concurrent-queue", + "event-listener 2.5.3", + "futures-core", +] + +[[package]] +name = "async-channel" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2" +dependencies = [ + "concurrent-queue", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-executor" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "497c00e0fd83a72a79a39fcbd8e3e2f055d6f6c7e025f3b3d91f4f8e76527fb8" +dependencies = [ + "async-task", + "concurrent-queue", + "fastrand 2.3.0", + "futures-lite 2.6.1", + "pin-project-lite", + "slab", +] + +[[package]] +name = "async-fs" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" +dependencies = [ + "async-lock 2.8.0", + "autocfg", + "blocking", + "futures-lite 1.13.0", +] + +[[package]] +name = "async-io" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" +dependencies = [ + "async-lock 2.8.0", + "autocfg", + "cfg-if", + "concurrent-queue", + "futures-lite 1.13.0", + "log", + "parking", + "polling 2.8.0", + "rustix 0.37.28", + "slab", + "socket2", + "waker-fn", +] + +[[package]] +name = "async-io" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc" +dependencies = [ + "autocfg", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite 2.6.1", + "parking", + "polling 3.11.0", + "rustix 1.1.3", + "slab", + "windows-sys 0.61.2", +] + +[[package]] +name = "async-lock" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" +dependencies = [ + "event-listener 2.5.3", +] + +[[package]] +name = "async-lock" +version = "3.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311" +dependencies = [ + "event-listener 5.4.1", + "event-listener-strategy", + "pin-project-lite", +] + +[[package]] +name = "async-net" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0434b1ed18ce1cf5769b8ac540e33f01fa9471058b5e89da9e06f3c882a8c12f" +dependencies = [ + "async-io 1.13.0", + "blocking", + "futures-lite 1.13.0", +] + +[[package]] +name = "async-process" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" +dependencies = [ + "async-io 1.13.0", + "async-lock 2.8.0", + "async-signal", + "blocking", + "cfg-if", + "event-listener 3.1.0", + "futures-lite 1.13.0", + "rustix 0.38.44", + "windows-sys 0.48.0", +] + +[[package]] +name = "async-signal" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43c070bbf59cd3570b6b2dd54cd772527c7c3620fce8be898406dd3ed6adc64c" +dependencies = [ + "async-io 2.6.0", + "async-lock 3.4.2", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix 1.1.3", + "signal-hook-registry", + "slab", + "windows-sys 0.61.2", +] + +[[package]] +name = "async-task" +version = "4.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "autocfg" version = "1.5.0" @@ -184,6 +367,28 @@ dependencies = [ "serde_core", ] +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "blocking" +version = "1.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e83f8d02be6967315521be875afa792a316e28d57b5a2d401897e2a7921b7f21" +dependencies = [ + "async-channel 2.5.0", + "async-task", + "futures-io", + "futures-lite 2.6.1", + "piper", +] + [[package]] name = "bstr" version = "1.12.1" @@ -201,11 +406,26 @@ version = "3.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" +[[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.53" +version = "1.2.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "755d2fce177175ffca841e9a06afdb2c4ab0f593d53b4dee48147dfaade85932" +checksum = "6354c81bbfd62d9cfa9cb3c773c2b7b2a3a482d569de977fd0e961f6e7c00583" dependencies = [ "find-msvc-tools", "shlex", @@ -238,6 +458,7 @@ dependencies = [ "iana-time-zone", "js-sys", "num-traits", + "serde", "wasm-bindgen", "windows-link", ] @@ -324,6 +545,29 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" +[[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 = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "config" version = "0.15.19" @@ -340,6 +584,19 @@ dependencies = [ "winnow", ] +[[package]] +name = "console" +version = "0.15.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8" +dependencies = [ + "encode_unicode", + "libc", + "once_cell", + "unicode-width 0.2.2", + "windows-sys 0.59.0", +] + [[package]] name = "convert_case" version = "0.6.0" @@ -364,7 +621,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "980c2afde4af43d6a05c5be738f9eae595cff86dce1f38f88b95058a98c027f3" dependencies = [ - "crossterm", + "crossterm 0.29.0", ] [[package]] @@ -373,6 +630,15 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + [[package]] name = "crokey" version = "1.3.0" @@ -380,7 +646,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51360853ebbeb3df20c76c82aecf43d387a62860f1a59ba65ab51f00eea85aad" dependencies = [ "crokey-proc_macros", - "crossterm", + "crossterm 0.29.0", "once_cell", "serde", "strict", @@ -392,7 +658,7 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3bf1a727caeb5ee5e0a0826a97f205a9cf84ee964b0b48239fef5214a00ae439" dependencies = [ - "crossterm", + "crossterm 0.29.0", "proc-macro2", "quote", "strict", @@ -455,6 +721,22 @@ version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" +[[package]] +name = "crossterm" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6" +dependencies = [ + "bitflags 2.10.0", + "crossterm_winapi", + "mio", + "parking_lot", + "rustix 0.38.44", + "signal-hook 0.3.18", + "signal-hook-mio", + "winapi", +] + [[package]] name = "crossterm" version = "0.29.0" @@ -467,7 +749,7 @@ dependencies = [ "document-features", "mio", "parking_lot", - "rustix", + "rustix 1.1.3", "signal-hook 0.3.18", "signal-hook-mio", "winapi", @@ -482,14 +764,34 @@ dependencies = [ "winapi", ] +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + [[package]] name = "darling" version = "0.20.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" dependencies = [ - "darling_core", - "darling_macro", + "darling_core 0.20.11", + "darling_macro 0.20.11", +] + +[[package]] +name = "darling" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d" +dependencies = [ + "darling_core 0.23.0", + "darling_macro 0.23.0", ] [[package]] @@ -506,13 +808,37 @@ dependencies = [ "syn", ] +[[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.20.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ - "darling_core", + "darling_core 0.20.11", + "quote", + "syn", +] + +[[package]] +name = "darling_macro" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" +dependencies = [ + "darling_core 0.23.0", "quote", "syn", ] @@ -565,7 +891,7 @@ version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8" dependencies = [ - "darling", + "darling 0.20.11", "proc-macro2", "quote", "syn", @@ -603,13 +929,32 @@ dependencies = [ "syn", ] +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +dependencies = [ + "dirs-sys 0.4.1", +] + [[package]] name = "dirs" version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" dependencies = [ - "dirs-sys", + "dirs-sys 0.5.0", ] [[package]] @@ -622,6 +967,18 @@ dependencies = [ "dirs-sys-next", ] +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users 0.4.6", + "windows-sys 0.48.0", +] + [[package]] name = "dirs-sys" version = "0.5.0" @@ -645,6 +1002,17 @@ dependencies = [ "winapi", ] +[[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 = "document-features" version = "0.2.12" @@ -658,6 +1026,7 @@ dependencies = [ name = "dotfiles" version = "0.1.0" dependencies = [ + "git-ai", "worktrunk", ] @@ -679,6 +1048,12 @@ version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +[[package]] +name = "encode_unicode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" + [[package]] name = "env_filter" version = "0.1.4" @@ -708,6 +1083,15 @@ dependencies = [ "log", ] +[[package]] +name = "envy" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f47e0157f2cb54f5ae1bd371b30a2ae4311e1c028f575cd4e81de7353215965" +dependencies = [ + "serde", +] + [[package]] name = "equivalent" version = "1.0.2" @@ -735,52 +1119,259 @@ dependencies = [ ] [[package]] -name = "find-msvc-tools" -version = "0.1.8" +name = "event-listener" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8591b0bcc8a98a64310a2fae1bb3e9b8564dd10e381e6e28010fde8e8e8568db" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] -name = "fnv" -version = "1.0.7" +name = "event-listener" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] [[package]] -name = "fs2" -version = "0.4.3" +name = "event-listener" +version = "5.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" +checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" dependencies = [ - "libc", - "winapi", + "concurrent-queue", + "parking", + "pin-project-lite", ] [[package]] -name = "fuzzy-matcher" -version = "0.3.7" +name = "event-listener-strategy" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54614a3312934d066701a80f20f15fa3b56d67ac7722b39eea5b4c9dd1d66c94" +checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" dependencies = [ - "thread_local", + "event-listener 5.4.1", + "pin-project-lite", ] [[package]] -name = "getrandom" -version = "0.2.17" +name = "fallible-iterator" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +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 = "fastrand" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" dependencies = [ - "cfg-if", - "libc", - "wasi", + "instant", ] [[package]] -name = "getrandom" -version = "0.3.4" +name = "fastrand" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "find-msvc-tools" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8591b0bcc8a98a64310a2fae1bb3e9b8564dd10e381e6e28010fde8e8e8568db" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[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 = "fs2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-lite" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" +dependencies = [ + "fastrand 1.9.0", + "futures-core", + "futures-io", + "memchr", + "parking", + "pin-project-lite", + "waker-fn", +] + +[[package]] +name = "futures-lite" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" +dependencies = [ + "fastrand 2.3.0", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "fuzzy-matcher" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54614a3312934d066701a80f20f15fa3b56d67ac7722b39eea5b4c9dd1d66c94" +dependencies = [ + "thread_local", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[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", @@ -788,6 +1379,42 @@ dependencies = [ "wasip2", ] +[[package]] +name = "git-ai" +version = "1.0.38" +source = "git+https://github.com/git-ai-project/git-ai?branch=main#be15ad1b43dfa2febe643e3ed81be4e801df4d09" +dependencies = [ + "chrono", + "clap", + "crossterm 0.28.1", + "dirs 5.0.1", + "envy", + "futures", + "glob", + "humantime", + "imara-diff", + "indicatif", + "jsonc-parser", + "libc", + "minreq", + "once_cell", + "ratatui", + "rusqlite", + "serde", + "serde_json", + "serde_json_canonicalizer", + "sha2", + "smol", + "url", + "uuid", +] + +[[package]] +name = "glob" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" + [[package]] name = "globset" version = "0.4.18" @@ -806,6 +1433,20 @@ 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" @@ -813,12 +1454,33 @@ 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 = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + +[[package]] +name = "hermit-abi" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" + [[package]] name = "home" version = "0.5.12" @@ -828,6 +1490,12 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "humantime" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "135b12329e5e3ce057a9f972339ea52bc954fe1e9358ef27f95e89716fbc5424" + [[package]] name = "iana-time-zone" version = "0.1.64" @@ -852,12 +1520,114 @@ 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 = "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 = "if_chain" version = "1.0.3" @@ -880,6 +1650,16 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "imara-diff" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f01d462f766df78ab820dd06f5eb700233c51f0f4c2e846520eaf4ba6aa5c5c" +dependencies = [ + "hashbrown 0.15.5", + "memchr", +] + [[package]] name = "indexmap" version = "2.13.0" @@ -892,6 +1672,61 @@ dependencies = [ "serde_core", ] +[[package]] +name = "indicatif" +version = "0.17.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "183b3088984b400f4cfac3620d5e076c84da5364016b4f49473de574b2586235" +dependencies = [ + "console", + "number_prefix", + "portable-atomic", + "unicode-width 0.2.2", + "web-time", +] + +[[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.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357b7205c6cd18dd2c86ed312d1e70add149aea98e7ef72b9fdf0270e555c11d" +dependencies = [ + "darling 0.23.0", + "indoc", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "instant" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "io-lifetimes" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" +dependencies = [ + "hermit-abi 0.3.9", + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "is_executable" version = "1.0.5" @@ -907,6 +1742,15 @@ 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.17" @@ -947,6 +1791,12 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "jsonc-parser" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01958dcb05b69d9612853b47df8f7881810e4f61b5cedd8894be04291f28ccb9" + [[package]] name = "lazy-regex" version = "3.5.1" @@ -992,12 +1842,41 @@ dependencies = [ "libc", ] +[[package]] +name = "libsqlite3-sys" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c10584274047cb335c23d3e61bcef8e323adae7c5c8c760540f73610177fc3f" +dependencies = [ + "cc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "linux-raw-sys" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" + +[[package]] +name = "linux-raw-sys" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + [[package]] name = "linux-raw-sys" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" +[[package]] +name = "litemap" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" + [[package]] name = "litrs" version = "1.0.0" @@ -1019,6 +1898,15 @@ 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 = "memchr" version = "2.7.6" @@ -1049,6 +1937,17 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" +[[package]] +name = "minreq" +version = "2.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05015102dad0f7d61691ca347e9d9d9006685a64aefb3d79eecf62665de2153d" +dependencies = [ + "rustls", + "rustls-webpki", + "webpki-roots", +] + [[package]] name = "mio" version = "1.1.1" @@ -1131,6 +2030,12 @@ dependencies = [ "libc", ] +[[package]] +name = "number_prefix" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" + [[package]] name = "once_cell" version = "1.21.3" @@ -1155,6 +2060,12 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b2d2086a3a477709f0208181e65857a9c062064ab2b3bb9abaf64f17d148bf3" +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + [[package]] name = "parking_lot" version = "0.12.5" @@ -1178,6 +2089,12 @@ dependencies = [ "windows-link", ] +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + [[package]] name = "pathdiff" version = "0.2.3" @@ -1190,6 +2107,65 @@ version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "piper" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" +dependencies = [ + "atomic-waker", + "fastrand 2.3.0", + "futures-io", +] + +[[package]] +name = "pkg-config" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + +[[package]] +name = "polling" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" +dependencies = [ + "autocfg", + "bitflags 1.3.2", + "cfg-if", + "concurrent-queue", + "libc", + "log", + "pin-project-lite", + "windows-sys 0.48.0", +] + +[[package]] +name = "polling" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi 0.5.2", + "pin-project-lite", + "rustix 1.1.3", + "windows-sys 0.61.2", +] + [[package]] name = "portable-atomic" version = "1.13.0" @@ -1205,6 +2181,15 @@ dependencies = [ "portable-atomic", ] +[[package]] +name = "potential_utf" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +dependencies = [ + "zerovec", +] + [[package]] name = "powerfmt" version = "0.2.0" @@ -1242,9 +2227,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.43" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc74d9a594b72ae6656596548f56f667211f8a97b3d4c3d467150794690dc40a" +checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" dependencies = [ "proc-macro2", ] @@ -1284,6 +2269,27 @@ dependencies = [ "getrandom 0.3.4", ] +[[package]] +name = "ratatui" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdef7f9be5c0122f890d58bdf4d964349ba6a6161f705907526d891efabba57d" +dependencies = [ + "bitflags 2.10.0", + "cassowary", + "compact_str", + "crossterm 0.28.1", + "instability", + "itertools", + "lru", + "paste", + "strum 0.26.3", + "strum_macros 0.26.4", + "unicode-segmentation", + "unicode-truncate", + "unicode-width 0.1.14", +] + [[package]] name = "rayon" version = "1.11.0" @@ -1343,7 +2349,7 @@ checksum = "23bbed272e39c47a095a5242218a67412a220006842558b03fe2935e8f3d7b92" dependencies = [ "cfg-if", "libc", - "rustix", + "rustix 1.1.3", "windows", ] @@ -1376,6 +2382,20 @@ version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.17", + "libc", + "untrusted", + "windows-sys 0.52.0", +] + [[package]] name = "ron" version = "0.12.0" @@ -1391,6 +2411,20 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "rusqlite" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b838eba278d213a8beaf485bd313fd580ca4505a00d5871caeb1457c55322cae" +dependencies = [ + "bitflags 2.10.0", + "fallible-iterator", + "fallible-streaming-iterator", + "hashlink", + "libsqlite3-sys", + "smallvec", +] + [[package]] name = "rustc-hash" version = "2.1.1" @@ -1406,6 +2440,33 @@ dependencies = [ "semver", ] +[[package]] +name = "rustix" +version = "0.37.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "519165d378b97752ca44bbe15047d5d3409e875f39327546b42ac81d7e18c1b6" +dependencies = [ + "bitflags 1.3.2", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys 0.3.8", + "windows-sys 0.48.0", +] + +[[package]] +name = "rustix" +version = "0.38.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +dependencies = [ + "bitflags 2.10.0", + "errno", + "libc", + "linux-raw-sys 0.4.15", + "windows-sys 0.59.0", +] + [[package]] name = "rustix" version = "1.1.3" @@ -1415,16 +2476,50 @@ dependencies = [ "bitflags 2.10.0", "errno", "libc", - "linux-raw-sys", + "linux-raw-sys 0.11.0", "windows-sys 0.61.2", ] +[[package]] +name = "rustls" +version = "0.21.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" +dependencies = [ + "log", + "ring", + "rustls-webpki", + "sct", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring", + "untrusted", +] + [[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.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a50f4cf475b65d88e057964e0e9bb1f0aa9bbb2036dc65c64596b42932536984" + +[[package]] +name = "ryu-js" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd29631678d6fb0903b69223673e122c32e9ae559d0960a38d574695ebc0ea15" + [[package]] name = "same-file" version = "1.0.6" @@ -1440,6 +2535,16 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "semver" version = "1.0.27" @@ -1490,6 +2595,17 @@ dependencies = [ "zmij", ] +[[package]] +name = "serde_json_canonicalizer" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f777f77aeef456e47e75c2a4b16804b15395be5b344e2094a54965143ef1c31" +dependencies = [ + "ryu-js", + "serde", + "serde_json", +] + [[package]] name = "serde_spanned" version = "1.0.4" @@ -1499,6 +2615,17 @@ dependencies = [ "serde_core", ] +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + [[package]] name = "shell-escape" version = "0.1.5" @@ -1520,7 +2647,7 @@ version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b1fdf65dd6331831494dd616b30351c38e96e45921a27745cf98490458b90bb" dependencies = [ - "dirs", + "dirs 6.0.0", ] [[package]] @@ -1624,12 +2751,57 @@ dependencies = [ "unicode-width 0.2.2", ] +[[package]] +name = "slab" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" + [[package]] name = "smallvec" version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +[[package]] +name = "smol" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13f2b548cd8447f8de0fdf1c592929f70f4fc7039a05e47404b0d096ec6987a1" +dependencies = [ + "async-channel 1.9.0", + "async-executor", + "async-fs", + "async-io 1.13.0", + "async-lock 2.8.0", + "async-net", + "async-process", + "blocking", + "futures-lite 1.13.0", +] + +[[package]] +name = "socket2" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" +dependencies = [ + "libc", + "winapi", +] + +[[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 = "streaming-iterator" version = "0.1.9" @@ -1669,13 +2841,35 @@ 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 0.26.4", +] + [[package]] name = "strum" version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf" dependencies = [ - "strum_macros", + "strum_macros 0.27.2", +] + +[[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]] @@ -1720,6 +2914,17 @@ dependencies = [ "unicode-width 0.2.2", ] +[[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 = "term" version = "0.7.0" @@ -1753,7 +2958,7 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60b8cb979cb11c32ce1603f8137b22262a9d131aaa5c37b5678025f22b8becd0" dependencies = [ - "rustix", + "rustix 1.1.3", "windows-sys 0.60.2", ] @@ -1848,6 +3053,16 @@ dependencies = [ "chrono", ] +[[package]] +name = "tinystr" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "toml" version = "0.9.11+spec-1.1.0" @@ -1948,6 +3163,12 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" +[[package]] +name = "typenum" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" + [[package]] name = "unicase" version = "2.9.0" @@ -1966,6 +3187,17 @@ 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" @@ -1978,18 +3210,59 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[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 = "urlencoding" version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" +[[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.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2e054861b4bd027cd373e18e8d8d8e6548085000e41290d95ce0c373a654b4a" +dependencies = [ + "getrandom 0.3.4", + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + [[package]] name = "vergen" version = "9.1.0" @@ -2028,6 +3301,12 @@ dependencies = [ "rustversion", ] +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + [[package]] name = "vte" version = "0.14.1" @@ -2048,6 +3327,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "waker-fn" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" + [[package]] name = "walkdir" version = "2.5.0" @@ -2118,6 +3403,22 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-roots" +version = "0.25.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" + [[package]] name = "which" version = "7.0.3" @@ -2126,7 +3427,7 @@ checksum = "24d643ce3fd3e5b54854602a080f34fb10ab75e0b813ee32d00ca2b44fa74762" dependencies = [ "either", "env_home", - "rustix", + "rustix 1.1.3", "winsafe", ] @@ -2137,7 +3438,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3fabb953106c3c8eea8306e4393700d7657561cb43122571b172bbfb7c7ba1d" dependencies = [ "env_home", - "rustix", + "rustix 1.1.3", "winsafe", ] @@ -2273,13 +3574,40 @@ dependencies = [ "windows-link", ] +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-sys" version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" dependencies = [ - "windows-targets", + "windows-targets 0.53.5", ] [[package]] @@ -2291,6 +3619,37 @@ dependencies = [ "windows-link", ] +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + [[package]] name = "windows-targets" version = "0.53.5" @@ -2298,14 +3657,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" dependencies = [ "windows-link", - "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", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", ] [[package]] @@ -2317,48 +3676,138 @@ dependencies = [ "windows-link", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[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_gnullvm" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + [[package]] name = "windows_aarch64_msvc" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[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_gnu" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" +[[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_gnullvm" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + [[package]] name = "windows_i686_msvc" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[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_gnu" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[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_gnullvm" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + [[package]] name = "windows_x86_64_msvc" version = "0.53.1" @@ -2403,9 +3852,9 @@ dependencies = [ "color-print", "config", "crossbeam-channel", - "crossterm", + "crossterm 0.29.0", "dashmap", - "dirs", + "dirs 6.0.0", "dunce", "env_logger", "etcetera", @@ -2430,7 +3879,7 @@ dependencies = [ "shlex", "signal-hook 0.4.1", "skim", - "strum", + "strum 0.27.2", "supports-hyperlinks", "synoptic", "termimad", @@ -2459,6 +3908,35 @@ dependencies = [ "thiserror 2.0.18", ] +[[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.33" @@ -2479,6 +3957,60 @@ dependencies = [ "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.16" diff --git a/Cargo.toml b/Cargo.toml index 825b1acb1..db6c7e8d3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,4 +7,5 @@ edition = "2021" path = "lib.rs" [dependencies] +git-ai = { git = "https://github.com/git-ai-project/git-ai", branch = "main" } worktrunk = "0.18.2" diff --git a/config/ccs/config.template.yaml b/config/ccs/config.template.yaml index d21850425..dc6d1f79e 100644 --- a/config/ccs/config.template.yaml +++ b/config/ccs/config.template.yaml @@ -53,6 +53,29 @@ cliproxy_server: port: 8317 auto_start: false # ---------------------------------------------------------------------------- +# Quota Management: Automatic account failover when quota exhausted (AGY only) +# +# Modes: +# auto: Fully automatic failover based on quota percentage +# manual: User controls everything (no auto-switching) +# hybrid: Auto failover + manual pausing/forcing (default) +# +# Preflight check runs before each session to verify account health. +# Exhausted accounts enter cooldown period before being retried. +# ---------------------------------------------------------------------------- +quota_management: + mode: hybrid + auto: + preflight_check: true + exhaustion_threshold: 5 + tier_priority: + - paid + cooldown_minutes: 5 + manual: + paused_accounts: [] + forced_default: null + tier_lock: null +# ---------------------------------------------------------------------------- # Preferences: User settings # ---------------------------------------------------------------------------- preferences: diff --git a/config/claude/settings.json b/config/claude/settings.json index 5841da994..6ce25a035 100644 --- a/config/claude/settings.json +++ b/config/claude/settings.json @@ -185,6 +185,28 @@ "timeout": 10 } ] + }, + { + "matcher": "Write|Edit|MultiEdit", + "hooks": [ + { + "type": "command", + "command": "git-ai checkpoint 2>/dev/null || true", + "timeout": 5 + } + ] + } + ], + "PostToolUse": [ + { + "matcher": "Write|Edit|MultiEdit", + "hooks": [ + { + "type": "command", + "command": "git-ai checkpoint claude --hook-input \"$(cat)\" 2>/dev/null || true", + "timeout": 5 + } + ] } ], "Notification": [ diff --git a/config/clawdbot/clawdbot.template.json b/config/clawdbot/clawdbot.template.json new file mode 100644 index 000000000..b0578fb47 --- /dev/null +++ b/config/clawdbot/clawdbot.template.json @@ -0,0 +1,82 @@ +{ + "browser": { + "enabled": true, + "executablePath": "__CHROMIUM_PATH__", + "headless": true, + "noSandbox": true + }, + "models": { + "mode": "merge", + "providers": { + "cliproxy": { + "baseUrl": "http://localhost:8317/v1", + "apiKey": "__CLIPROXY_API_KEY__", + "api": "openai-completions", + "models": [ + {"id": "claude-opus-4-5-20251101", "name": "Claude Opus 4.5", "reasoning": false, "input": ["text"], "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}, "contextWindow": 200000, "maxTokens": 32000}, + {"id": "claude-opus-4-5-thinking", "name": "Claude Opus 4.5 Thinking", "reasoning": true, "input": ["text"], "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}, "contextWindow": 200000, "maxTokens": 32000}, + {"id": "claude-sonnet-4-5-20250929", "name": "Claude Sonnet 4.5", "reasoning": false, "input": ["text"], "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}, "contextWindow": 200000, "maxTokens": 32000}, + {"id": "claude-sonnet-4-5-thinking", "name": "Claude Sonnet 4.5 Thinking", "reasoning": true, "input": ["text"], "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}, "contextWindow": 200000, "maxTokens": 32000}, + {"id": "claude-sonnet-4-20250514", "name": "Claude Sonnet 4", "reasoning": false, "input": ["text"], "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}, "contextWindow": 200000, "maxTokens": 32000}, + {"id": "claude-opus-4-20250514", "name": "Claude Opus 4", "reasoning": false, "input": ["text"], "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}, "contextWindow": 200000, "maxTokens": 32000}, + {"id": "claude-haiku-4-5-20251001", "name": "Claude Haiku 4.5", "reasoning": false, "input": ["text"], "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}, "contextWindow": 200000, "maxTokens": 32000}, + {"id": "gpt-5.2", "name": "GPT-5.2", "reasoning": false, "input": ["text"], "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}, "contextWindow": 200000, "maxTokens": 32000}, + {"id": "gpt-5.2-codex", "name": "GPT-5.2 Codex", "reasoning": false, "input": ["text"], "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}, "contextWindow": 200000, "maxTokens": 32000}, + {"id": "gpt-5.1", "name": "GPT-5.1", "reasoning": false, "input": ["text"], "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}, "contextWindow": 200000, "maxTokens": 32000}, + {"id": "gpt-5", "name": "GPT-5", "reasoning": false, "input": ["text"], "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}, "contextWindow": 200000, "maxTokens": 32000}, + {"id": "gpt-5-codex", "name": "GPT-5 Codex", "reasoning": false, "input": ["text"], "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}, "contextWindow": 200000, "maxTokens": 32000}, + {"id": "gemini-3-pro-preview", "name": "Gemini 3 Pro", "reasoning": false, "input": ["text"], "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}, "contextWindow": 200000, "maxTokens": 32000}, + {"id": "gemini-3-flash-preview", "name": "Gemini 3 Flash", "reasoning": false, "input": ["text"], "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}, "contextWindow": 200000, "maxTokens": 32000}, + {"id": "gemini-2.5-pro", "name": "Gemini 2.5 Pro", "reasoning": false, "input": ["text"], "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}, "contextWindow": 200000, "maxTokens": 32000}, + {"id": "gemini-2.5-flash", "name": "Gemini 2.5 Flash", "reasoning": false, "input": ["text"], "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}, "contextWindow": 200000, "maxTokens": 32000}, + {"id": "glm-4.7", "name": "GLM 4.7", "reasoning": false, "input": ["text"], "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}, "contextWindow": 200000, "maxTokens": 32000} + ] + } + } + }, + "agents": { + "defaults": { + "model": {"primary": "anthropic/claude-opus-4-5"}, + "workspace": "__HOME__/.clawdbot/workspace", + "thinkingDefault": "high", + "maxConcurrent": 4, + "subagents": {"maxConcurrent": 8} + }, + "list": [{"id": "main", "default": true}] + }, + "messages": { + "queue": {"mode": "interrupt"}, + "ackReactionScope": "group-mentions" + }, + "commands": { + "native": "auto", + "nativeSkills": "auto" + }, + "channels": { + "telegram": { + "enabled": true, + "dmPolicy": "pairing", + "tokenFile": "__HOME__/.config/clawdbot/telegram-token", + "groups": { + "*": {"requireMention": false}, + "-1003612372477": {"requireMention": false, "enabled": true} + }, + "allowFrom": [983653361, 2104262990], + "groupPolicy": "allowlist", + "streamMode": "partial" + } + }, + "gateway": { + "mode": "local", + "bind": "lan", + "auth": { + "token": "__GATEWAY_TOKEN__" + } + }, + "plugins": { + "load": { + "paths": ["__HOME__/.clawdbot/plugins"] + }, + "slots": {"memory": ""} + } +} diff --git a/config/clawdbot/hydrate.sh b/config/clawdbot/hydrate.sh new file mode 100644 index 000000000..8acffa791 --- /dev/null +++ b/config/clawdbot/hydrate.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash +# Clawdbot gateway start script with runtime secret injection +# shellcheck source=/dev/null +set -euo pipefail + +STATE_DIR="${HOME}/.clawdbot" +CONFIG="${STATE_DIR}/clawdbot.json" +TEMPLATE="@template@" +SECRETS_DIR="${HOME}/.config/clawdbot" +ENV_FILE="${HOME}/dotfiles/.env" + +# Source .env if it exists +if [ -f "$ENV_FILE" ]; then + set -a + . "$ENV_FILE" + set +a +fi + +# Read secret from file, stripping whitespace +read_secret() { + local file="$1" + if [ -f "$file" ]; then + tr -d '\n\r' <"$file" + else + echo "" + fi +} + +# Load secrets from files or environment +CLIPROXY_API_KEY="${CLIPROXY_API_KEY:-$(read_secret "${SECRETS_DIR}/cliproxy-key")}" +TELEGRAM_TOKEN="${TELEGRAM_TOKEN:-$(read_secret "${SECRETS_DIR}/telegram-token")}" +GATEWAY_TOKEN="${GATEWAY_TOKEN:-$(read_secret "${SECRETS_DIR}/gateway-token")}" +ANTHROPIC_API_KEY="${ANTHROPIC_API_KEY:-$(read_secret "${SECRETS_DIR}/anthropic-key")}" + +# Chromium path (injected by nix) +CHROMIUM_PATH="@chromium@/bin/chromium" + +# Create state directory if needed +mkdir -p "$STATE_DIR" + +# Generate config from template with secret substitution +@sed@ \ + -e "s|__CLIPROXY_API_KEY__|${CLIPROXY_API_KEY}|g" \ + -e "s|__TELEGRAM_TOKEN__|${TELEGRAM_TOKEN}|g" \ + -e "s|__GATEWAY_TOKEN__|${GATEWAY_TOKEN}|g" \ + -e "s|__CHROMIUM_PATH__|${CHROMIUM_PATH}|g" \ + -e "s|__HOME__|${HOME}|g" \ + "$TEMPLATE" >"$CONFIG" + +echo "Generated clawdbot config at $CONFIG" >&2 + +# Export Anthropic API key for clawdbot +if [ -n "$ANTHROPIC_API_KEY" ]; then + export ANTHROPIC_API_KEY +fi + +# Start clawdbot gateway +exec @clawdbot@/bin/clawdbot gateway --port 18789 "$@" diff --git a/config/cliproxyapi/config.yaml b/config/cliproxyapi/config.yaml index 527ec807d..3329c0f7f 100644 --- a/config/cliproxyapi/config.yaml +++ b/config/cliproxyapi/config.yaml @@ -28,6 +28,9 @@ usage-statistics-enabled: true proxy-url: "" # Number of times to retry a request. Retries will occur if the HTTP response code is 403, 408, 500, 502, 503, or 504. request-retry: 3 +# Routing strategy: "round-robin" (default) or "fill-first" (tries first matching provider) +routing: + strategy: "fill-first" # Quota exceeded behavior quota-exceeded: switch-project: true # Whether to automatically switch to another project when a quota is exceeded @@ -83,15 +86,15 @@ openai-compatibility: api-key-entries: - api-key: "__OPENROUTER_API_KEY__" models: - - name: "z-ai/glm-4.6" - alias: "glm-4.6" + - name: "@preset/glm-4-7" + alias: "glm-4.7" - name: "z-ai" base-url: "https://api.z.ai/api/coding/paas/v4" api-key-entries: - api-key: "__ZAI_API_KEY__" models: - - name: "glm-4.6" - name: "glm-4.7" + alias: "glm-4.7" # payload: # Optional payload configuration # default: # Default rules only set parameters when they are missing in the payload. diff --git a/config/cursor/default.nix b/config/cursor/default.nix new file mode 100644 index 000000000..d79b9396e --- /dev/null +++ b/config/cursor/default.nix @@ -0,0 +1,7 @@ +{ config, ... }: +{ + home.file.".cursor/hooks.json" = { + source = ./hooks.json; + force = true; + }; +} diff --git a/config/cursor/hooks.json b/config/cursor/hooks.json new file mode 100644 index 000000000..9f48feb7b --- /dev/null +++ b/config/cursor/hooks.json @@ -0,0 +1,15 @@ +{ + "hooks": { + "afterFileEdit": [ + { + "command": "git-ai checkpoint cursor --hook-input stdin" + } + ], + "beforeSubmitPrompt": [ + { + "command": "git-ai checkpoint cursor --hook-input stdin" + } + ] + }, + "version": 1 +} diff --git a/config/default.nix b/config/default.nix index d760a017d..70d364deb 100644 --- a/config/default.nix +++ b/config/default.nix @@ -4,9 +4,11 @@ ./cliproxyapi ./codex ./crush + ./cursor ./claude ./direnv ./factory + ./gemini ./ghostty ./hammerspoon ./jj diff --git a/config/gemini/default.nix b/config/gemini/default.nix new file mode 100644 index 000000000..d9178849d --- /dev/null +++ b/config/gemini/default.nix @@ -0,0 +1,15 @@ +{ config, lib, pkgs, ... }: +let + geminiSettingsSource = ./settings.json; +in +{ + # Use activation script to copy settings.json instead of symlinking + # This allows ruler and other tools to modify the file + home.activation.geminiSettings = lib.hm.dag.entryAfter [ "writeBoundary" ] '' + mkdir -p "$HOME/.gemini" + if [ ! -f "$HOME/.gemini/settings.json" ]; then + $DRY_RUN_CMD cp ${geminiSettingsSource} "$HOME/.gemini/settings.json" + $DRY_RUN_CMD chmod 644 "$HOME/.gemini/settings.json" + fi + ''; +} diff --git a/config/gemini/settings.json b/config/gemini/settings.json new file mode 100644 index 000000000..4c1d29a66 --- /dev/null +++ b/config/gemini/settings.json @@ -0,0 +1,19 @@ +{ + "tools": { + "enableHooks": true + }, + "hooks": { + "BeforeTool": [ + { + "matcher": "write_file|replace", + "command": "git-ai checkpoint gemini --hook-input stdin" + } + ], + "AfterTool": [ + { + "matcher": "write_file|replace", + "command": "git-ai checkpoint gemini --hook-input stdin" + } + ] + } +} diff --git a/config/llm/default.nix b/config/llm/default.nix index 518bf4e6c..f81dcf0cc 100644 --- a/config/llm/default.nix +++ b/config/llm/default.nix @@ -6,9 +6,21 @@ force = true; }; + home.file."Library/Application Support/io.datasette.llm/default_model.txt" = { + enable = pkgs.stdenv.isDarwin; + source = config.lib.file.mkOutOfStoreSymlink ./default_model.txt; + force = true; + }; + home.file.".config/io.datasette.llm/extra-openai-models.yaml" = { enable = pkgs.stdenv.isLinux; source = config.lib.file.mkOutOfStoreSymlink ./extra-openai-models.yaml; force = true; }; + + home.file.".config/io.datasette.llm/default_model.txt" = { + enable = pkgs.stdenv.isLinux; + source = config.lib.file.mkOutOfStoreSymlink ./default_model.txt; + force = true; + }; } diff --git a/config/llm/default_model.txt b/config/llm/default_model.txt new file mode 100644 index 000000000..45ec933d0 --- /dev/null +++ b/config/llm/default_model.txt @@ -0,0 +1 @@ +glm-4.7 diff --git a/config/llm/extra-openai-models.yaml b/config/llm/extra-openai-models.yaml index 6255e696d..8536f7e2a 100644 --- a/config/llm/extra-openai-models.yaml +++ b/config/llm/extra-openai-models.yaml @@ -1,18 +1,17 @@ # Custom OpenAI-compatible models for llm -# Uses cliproxyapi as the backend (http://localhost:8317/v1) -- model_id: cliproxyapi - model_name: claude-sonnet-4-20250514 - api_base: http://localhost:8317/v1 - api_key_name: cliproxyapi - model_id: claude-sonnet - model_name: claude-sonnet-4-20250514 + model_name: claude-sonnet-4-5-20250929 api_base: http://localhost:8317/v1 api_key_name: cliproxyapi - model_id: claude-opus - model_name: claude-opus-4-20250514 + model_name: claude-opus-4-5-20251101 api_base: http://localhost:8317/v1 api_key_name: cliproxyapi - model_id: claude-haiku - model_name: claude-haiku-4-20250514 + model_name: claude-haiku-4-5-20251001 + api_base: http://localhost:8317/v1 + api_key_name: cliproxyapi +- model_id: glm-4.7 + model_name: glm-4.7 api_base: http://localhost:8317/v1 api_key_name: cliproxyapi diff --git a/config/opencode/opencode.jsonc b/config/opencode/opencode.jsonc index ea4e59a88..c870e5443 100644 --- a/config/opencode/opencode.jsonc +++ b/config/opencode/opencode.jsonc @@ -1,8 +1,8 @@ { "$schema": "https://opencode.ai/config.json", "theme": "opencode", - "model": "openrouter-preset/glm-4.7", - "small_model": "openrouter-preset/glm-4.7", + "model": "cliproxyapi/glm-4.7", + "small_model": "cliproxyapi/glm-4.7", "autoupdate": true, "agent": { "code-reviewer": { @@ -43,9 +43,6 @@ "claude-haiku-4-5-20251001": { "name": "Claude Haiku 4.5 (via shunkakinoki's CLIProxy)" }, - "z-ai/glm-4.6": { - "name": "GLM-4.6 (via shunkakinoki's CLIProxy)" - }, "z-ai/glm-4.7": { "name": "GLM-4.7 (via shunkakinoki's CLIProxy)" } @@ -55,38 +52,30 @@ "npm": "@ai-sdk/openai-compatible", "name": "CLIProxyAPI (local)", "options": { - "baseURL": "http://localhost:8317/v1" + "baseURL": "http://localhost:8317/v1", + "apiKey": "{env:CLIPROXY_API_KEY}" }, "models": { "gemini-3-pro-preview": { - "name": "Gemini 3.0 Pro (via CLIProxyAPI)" + "name": "Gemini 3.0 Pro (via local CLIProxyAPI)" }, "gpt-5.1": { - "name": "GPT-5.1 (via CLIProxyAPI)" + "name": "GPT-5.1 (via local CLIProxyAPI)" }, "gpt-5.1-codex": { - "name": "GPT-5.1 Codex (via CLIProxyAPI)" + "name": "GPT-5.1 Codex (via local CLIProxyAPI)" }, "gpt-5.1-codex-max": { - "name": "GPT-5.1 Codex Max (via CLIProxyAPI)" + "name": "GPT-5.1 Codex Max (via local CLIProxyAPI)" }, "claude-opus-4-5-20251101": { - "name": "Claude Opus 4.5 (via CLIProxyAPI)" + "name": "Claude Opus 4.5 (via local CLIProxyAPI)" }, "claude-haiku-4-5-20251001": { - "name": "Claude Haiku 4.5 (via CLIProxyAPI)" - }, - "z-ai/glm-4.6": { - "name": "GLM-4.6 (via CLIProxyAPI)", - "options": { - "stream": false - } + "name": "Claude Haiku 4.5 (via local CLIProxyAPI)" }, - "z-ai/glm-4.7": { - "name": "GLM-4.7 (via CLIProxyAPI)", - "options": { - "stream": false - } + "glm-4.7": { + "name": "GLM-4.7 (via local CLIProxyAPI)" } } }, @@ -196,7 +185,7 @@ "apiKey": "{env:OPENROUTER_API_KEY}" }, "models": { - "glm-4-7": { + "glm-4.7": { "id": "@preset/glm-4-7", "name": "Preset GLM-4.7 (via OpenRouter)" } @@ -266,9 +255,6 @@ }, "zai-coding-plan": { "models": { - "glm-4.6": { - "name": "GLM-4.6 Coding Plan (via Z-AI)" - }, "glm-4.7": { "name": "GLM-4.7 Coding Plan (via Z-AI)" } diff --git a/config/pi/models.json b/config/pi/models.json index 5e14172e5..1e9204b03 100644 --- a/config/pi/models.json +++ b/config/pi/models.json @@ -156,22 +156,6 @@ }, "contextWindow": 131072, "maxTokens": 16384 - }, - { - "id": "z-ai/glm-4.6", - "name": "GLM-4.6 (Z-AI)", - "reasoning": false, - "input": [ - "text" - ], - "cost": { - "input": 0, - "output": 0, - "cacheRead": 0, - "cacheWrite": 0 - }, - "contextWindow": 131072, - "maxTokens": 16384 } ] }, diff --git a/flake.lock b/flake.lock index 680fad304..a6250cfa3 100644 --- a/flake.lock +++ b/flake.lock @@ -218,24 +218,6 @@ "type": "github" } }, - "flake-utils": { - "inputs": { - "systems": "systems_2" - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "git-hooks": { "inputs": { "flake-compat": [ @@ -304,27 +286,6 @@ "type": "github" } }, - "home-manager_2": { - "inputs": { - "nixpkgs": [ - "nix-clawdbot", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1767909183, - "narHash": "sha256-u/bcU0xePi5bgNoRsiqSIwaGBwDilKKFTz3g0hqOBAo=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "cd6e96d56ed4b2a779ac73a1227e0bb1519b3509", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, "mk-shell-bin": { "locked": { "lastModified": 1677004959, @@ -418,29 +379,6 @@ "type": "github" } }, - "nix-clawdbot": { - "inputs": { - "flake-utils": "flake-utils", - "home-manager": "home-manager_2", - "nix-steipete-tools": "nix-steipete-tools", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1769045341, - "narHash": "sha256-3tmn4wU1XBmaL7VnZQrtBkQZcth3O+utruKCZ6xEUYc=", - "owner": "clawdbot", - "repo": "nix-clawdbot", - "rev": "fbbf80bc829180cc1e7c76bd2565de96e624d4e8", - "type": "github" - }, - "original": { - "owner": "clawdbot", - "repo": "nix-clawdbot", - "type": "github" - } - }, "nix-darwin": { "inputs": { "nixpkgs": [ @@ -461,24 +399,6 @@ "type": "github" } }, - "nix-steipete-tools": { - "inputs": { - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1768673601, - "narHash": "sha256-n5+aU505rTI1sJGd3PDhfvJS00lLjiARckqjLxdG+XA=", - "owner": "clawdbot", - "repo": "nix-steipete-tools", - "rev": "1ab855984e2581e35a76d57cbb97abf0693dad3b", - "type": "github" - }, - "original": { - "owner": "clawdbot", - "repo": "nix-steipete-tools", - "type": "github" - } - }, "nix2container": { "inputs": { "nixpkgs": [ @@ -528,11 +448,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1767364772, - "narHash": "sha256-fFUnEYMla8b7UKjijLnMe+oVFOz6HjijGGNS1l7dYaQ=", + "lastModified": 1768875095, + "narHash": "sha256-dYP3DjiL7oIiiq3H65tGIXXIT1Waiadmv93JS0sS+8A=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "16c7794d0a28b5a37904d55bcca36003b9109aaa", + "rev": "ed142ab1b3a092c4d149245d0c4126a5d7ea00b0", "type": "github" }, "original": { @@ -557,22 +477,6 @@ "type": "github" } }, - "nixpkgs_2": { - "locked": { - "lastModified": 1768875095, - "narHash": "sha256-dYP3DjiL7oIiiq3H65tGIXXIT1Waiadmv93JS0sS+8A=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "ed142ab1b3a092c4d149245d0c4126a5d7ea00b0", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nur": { "inputs": { "flake-parts": "flake-parts_4", @@ -602,10 +506,9 @@ "home-manager": "home-manager", "mk-shell-bin": "mk-shell-bin", "neovim-nightly-overlay": "neovim-nightly-overlay", - "nix-clawdbot": "nix-clawdbot", "nix-darwin": "nix-darwin", "nix2container": "nix2container", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs", "nur": "nur", "treefmt-nix": "treefmt-nix_2" } @@ -625,21 +528,6 @@ "type": "github" } }, - "systems_2": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "treefmt-nix": { "inputs": { "nixpkgs": [ diff --git a/flake.nix b/flake.nix index 820d95818..c0395089d 100644 --- a/flake.nix +++ b/flake.nix @@ -44,10 +44,6 @@ url = "github:nlewo/nix2container"; inputs.nixpkgs.follows = "nixpkgs"; }; - nix-clawdbot = { - url = "github:clawdbot/nix-clawdbot"; - inputs.nixpkgs.follows = "nixpkgs"; - }; }; outputs = diff --git a/home-manager/default.nix b/home-manager/default.nix index 697a78a8b..7425553a3 100644 --- a/home-manager/default.nix +++ b/home-manager/default.nix @@ -28,7 +28,6 @@ in ++ services ++ [ inputs.agenix.homeManagerModules.default - inputs.nix-clawdbot.homeManagerModules.clawdbot ]; home.username = username; diff --git a/home-manager/modules/cargo-globals/default.nix b/home-manager/modules/cargo-globals/default.nix index ecf2507f7..559deb480 100644 --- a/home-manager/modules/cargo-globals/default.nix +++ b/home-manager/modules/cargo-globals/default.nix @@ -1,13 +1,30 @@ -{ config, pkgs, ... }: +{ + config, + pkgs, + lib, + ... +}: +let + isDarwin = pkgs.stdenv.isDarwin; + libiconvPkgConfigPath = lib.optionalString isDarwin ":${pkgs.libiconv.dev}/lib/pkgconfig"; + libiconvLibraryPath = lib.optionalString isDarwin "${pkgs.libiconv.out}/lib"; + libiconvCPath = lib.optionalString isDarwin "${pkgs.libiconv.dev}/include"; + libiconvLdFlags = lib.optionalString isDarwin "-L${pkgs.libiconv.out}/lib "; + libiconvCppFlags = lib.optionalString isDarwin "-I${pkgs.libiconv.dev}/include "; +in { # Install cargo global packages from Cargo.toml using home-manager activation home.activation.installCargoGlobals = config.lib.dag.entryAfter [ "writeBoundary" ] '' export PATH=${pkgs.rustup}/bin:${pkgs.cargo}/bin:${pkgs.dasel}/bin:${pkgs.jq}/bin:${pkgs.gcc}/bin:${pkgs.pkg-config}/bin:$PATH export CARGO_HOME="$HOME/.cargo" - export PKG_CONFIG_PATH="${pkgs.openssl.dev}/lib/pkgconfig" + export PKG_CONFIG_PATH="${pkgs.openssl.dev}/lib/pkgconfig${libiconvPkgConfigPath}''${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}" export OPENSSL_DIR="${pkgs.openssl.dev}" export OPENSSL_LIB_DIR="${pkgs.openssl.out}/lib" export OPENSSL_INCLUDE_DIR="${pkgs.openssl.dev}/include" + ${lib.optionalString isDarwin ''export LIBRARY_PATH="${libiconvLibraryPath}''${LIBRARY_PATH:+:$LIBRARY_PATH}"''} + ${lib.optionalString isDarwin ''export CPATH="${libiconvCPath}''${CPATH:+:$CPATH}"''} + ${lib.optionalString isDarwin ''export LDFLAGS="${libiconvLdFlags}''${LDFLAGS:-}"''} + ${lib.optionalString isDarwin ''export CPPFLAGS="${libiconvCppFlags}''${CPPFLAGS:-}"''} $DRY_RUN_CMD ${pkgs.bash}/bin/bash ${./install-cargo-globals.sh} ''; diff --git a/home-manager/modules/cargo-globals/install-cargo-globals.sh b/home-manager/modules/cargo-globals/install-cargo-globals.sh index 22750af3e..c08436a53 100755 --- a/home-manager/modules/cargo-globals/install-cargo-globals.sh +++ b/home-manager/modules/cargo-globals/install-cargo-globals.sh @@ -2,6 +2,13 @@ set -euo pipefail +# Set macOS SDK path for linker (required in Nix environments) +if [[ $OSTYPE == "darwin"* ]]; then + if command -v xcrun &>/dev/null; then + export SDKROOT=$(xcrun --show-sdk-path 2>/dev/null || true) + fi +fi + # Install cargo global packages from Cargo.toml # Reads dependencies from ~/dotfiles/Cargo.toml and installs them globally @@ -29,8 +36,8 @@ if ! command -v jq &>/dev/null; then exit 0 fi -# Parse dependencies from standard Cargo.toml format -DEPS=$(dasel -f "$CARGO_TOML" -r toml -w json 'dependencies' 2>/dev/null | jq -r 'to_entries[] | "\(.key)@\(.value.version // .value)"' 2>/dev/null || true) +# Parse dependencies from Cargo.toml (supports version strings and git tables) +DEPS=$(dasel -f "$CARGO_TOML" -r toml -w json 'dependencies' 2>/dev/null | jq -c 'to_entries[]' 2>/dev/null || true) if [ -z "$DEPS" ]; then echo "No dependencies found in Cargo.toml" @@ -52,20 +59,60 @@ while read -r line; do esac done <<<"$INSTALLED" -while read -r pkg; do - CRATE=$(echo "$pkg" | cut -d'@' -f1) - VERSION=$(echo "$pkg" | cut -d'@' -f2) - if [ -n "$CRATE" ]; then - # Check if already installed at this version (format: "crate_name v1.2.3:") - if [ "${INSTALLED_MAP[$CRATE]:-}" = "$VERSION" ]; then - echo "$CRATE@$VERSION already installed, skipping" - continue +while read -r dep; do + [ -z "$dep" ] && continue + NAME=$(echo "$dep" | jq -r '.key') + KIND=$(echo "$dep" | jq -r 'if (.value|type)=="string" then "version" elif (.value.version) then "version" elif (.value.git) then "git" else "unknown" end') + + case "$KIND" in + version) + VERSION=$(echo "$dep" | jq -r 'if (.value|type)=="string" then .value else .value.version end') + if [ -n "$NAME" ] && [ -n "$VERSION" ] && [ "$VERSION" != "null" ]; then + # Check if already installed at this version (format: "crate_name v1.2.3:") + if [ "${INSTALLED_MAP[$NAME]:-}" = "$VERSION" ]; then + echo "$NAME@$VERSION already installed, skipping" + continue + fi + echo "Installing $NAME@$VERSION..." + if ! cargo install "$NAME" --version "$VERSION" --locked 2>&1; then + if ! cargo install "$NAME" --version "$VERSION" 2>&1; then + echo "Failed to install $NAME@$VERSION, skipping..." + fi + fi fi - echo "Installing $CRATE@$VERSION..." - cargo install "$CRATE" --version "$VERSION" --locked 2>/dev/null || - cargo install "$CRATE" --version "$VERSION" 2>/dev/null || - echo "Failed to install $CRATE@$VERSION, skipping..." - fi + ;; + git) + GIT_URL=$(echo "$dep" | jq -r '.value.git') + BRANCH=$(echo "$dep" | jq -r '.value.branch // empty') + TAG=$(echo "$dep" | jq -r '.value.tag // empty') + REV=$(echo "$dep" | jq -r '.value.rev // empty') + if [ -n "$NAME" ] && [ -n "$GIT_URL" ]; then + if [ -n "${INSTALLED_MAP[$NAME]:-}" ]; then + echo "$NAME already installed (git), skipping" + continue + fi + echo "Installing $NAME from $GIT_URL..." + INSTALL_ARGS=(--git "$GIT_URL") + if [ -n "$REV" ]; then + INSTALL_ARGS+=(--rev "$REV") + elif [ -n "$TAG" ]; then + INSTALL_ARGS+=(--tag "$TAG") + elif [ -n "$BRANCH" ]; then + INSTALL_ARGS+=(--branch "$BRANCH") + fi + if ! cargo install "$NAME" "${INSTALL_ARGS[@]}" --locked 2>&1; then + if ! cargo install "$NAME" "${INSTALL_ARGS[@]}" 2>&1; then + echo "Failed to install $NAME from git, skipping..." + fi + fi + fi + ;; + *) + if [ -n "$NAME" ]; then + echo "Skipping $NAME (unsupported dependency format)" + fi + ;; + esac done <<<"$DEPS" echo "cargo globals check complete" diff --git a/home-manager/modules/clawdbot/default.nix b/home-manager/modules/clawdbot/default.nix index 1a69ce4df..ac81b2807 100644 --- a/home-manager/modules/clawdbot/default.nix +++ b/home-manager/modules/clawdbot/default.nix @@ -1,378 +1,156 @@ { config, lib, - inputs, pkgs, + inputs, ... }: let inherit (inputs) env host; homeDir = config.home.homeDirectory; - clawdbotDir = "${homeDir}/.config/clawdbot"; - # Remote gateway URL for non-kyber machines (macOS nodes connect here) - # Using Tailscale MagicDNS for direct connectivity (bridge is TCP, not HTTP) - remoteGatewayUrl = "ws://kyber.tail950b36.ts.net:18789"; + # Build clawdbot from source using pnpm + clawdbotSrc = pkgs.fetchFromGitHub { + owner = "clawdbot"; + repo = "clawdbot"; + rev = "v2026.1.22"; + hash = "sha256-DJZulGqo2E7XvitR3kYKme9vqSfQyYs9I9fsBIpqQdQ="; + }; + + clawdbotPkg = pkgs.stdenv.mkDerivation rec { + pname = "clawdbot"; + version = "2026.1.22"; + src = clawdbotSrc; + + nativeBuildInputs = [ + pkgs.nodejs_22 + pkgs.pnpm_10 + pkgs.pnpm_10.configHook + pkgs.makeWrapper + ]; + + pnpmDeps = pkgs.pnpm_10.fetchDeps { + inherit pname version src; + hash = "sha256-LSqWBa2etVDA4CZSRsaVOEt9Hp2CfAmbnLoiqxjSjOY="; + fetcherVersion = 1; + }; - # Script to extract secrets from cliproxyapi auth and .env - # Uses pkgs.replaceVars to substitute tool paths at build time - extractSecretsScript = pkgs.replaceVars ./extract-secrets.sh { - grep = "${pkgs.gnugrep}/bin/grep"; - cut = "${pkgs.coreutils}/bin/cut"; - find = "${pkgs.findutils}/bin/find"; - head = "${pkgs.coreutils}/bin/head"; - jq = "${pkgs.jq}/bin/jq"; - tr = "${pkgs.coreutils}/bin/tr"; + buildPhase = '' + runHook preBuild + pnpm run build + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + mkdir -p $out/bin $out/lib/clawdbot + # Copy all relevant directories for the monorepo + cp -r dist node_modules package.json $out/lib/clawdbot/ + cp -r extensions ui apps tools $out/lib/clawdbot/ 2>/dev/null || true + # Remove broken symlinks + find $out -xtype l -delete + makeWrapper ${pkgs.nodejs_22}/bin/node $out/bin/clawdbot \ + --add-flags "$out/lib/clawdbot/dist/entry.js" + runHook postInstall + ''; + + meta = with lib; { + description = "Clawdbot gateway"; + homepage = "https://github.com/clawdbot/clawdbot"; + license = licenses.mit; + platforms = platforms.unix; + }; }; -in -# Disable clawdbot entirely in CI builds -lib.mkIf (!env.isCI) { - # Force overwrite clawdbot.json to prevent home-manager switch failures - # when the file already exists (e.g., modified by clawdbot at runtime) - home.file.".clawdbot/clawdbot.json".force = true; - # Prevent home-manager from auto-restarting clawdbot during activation - # Restart only happens via explicit `make switch` (which runs systemctl-clawdbot) - # Only applies on kyber where the gateway runs - systemd.user.services.clawdbot-gateway = lib.mkIf host.isKyber { - Unit.X-RestartIfChanged = "false"; + # Template config file + templateFile = ../../../config/clawdbot/clawdbot.template.json; + + # Hydrate script with injected paths + hydrateScript = pkgs.replaceVars ../../../config/clawdbot/hydrate.sh { + template = templateFile; + sed = "${pkgs.gnused}/bin/sed"; + chromium = pkgs.chromium; + clawdbot = clawdbotPkg; }; +in +# Only enable on kyber (gateway host) and outside CI +lib.mkIf (host.isKyber && !env.isCI) { + # Add clawdbot to PATH + home.packages = [ clawdbotPkg ]; - # Extract secrets from cliproxyapi auth and .env on home-manager activation - home.activation.clawdbotSecrets = lib.mkIf (lib ? hm && lib.hm ? dag) ( + # Ensure secrets directory exists + home.activation.clawdbotSecretsDir = lib.mkIf (lib ? hm && lib.hm ? dag) ( lib.hm.dag.entryAfter [ "writeBoundary" ] '' - run ${pkgs.bash}/bin/bash ${extractSecretsScript} + mkdir -p "${homeDir}/.config/clawdbot" + chmod 700 "${homeDir}/.config/clawdbot" '' ); - # Inject cliproxy API key into clawdbot.json (apiKeyFile not supported upstream) - home.activation.clawdbotCliproxyKey = lib.mkIf (lib ? hm && lib.hm ? dag && host.isKyber) ( - lib.hm.dag.entryAfter [ "clawdbotSecrets" "clawdbotConfigFiles" ] '' - KEY_FILE="${clawdbotDir}/cliproxy-key" - CONFIG_FILE="${homeDir}/.clawdbot/clawdbot.json" - if [ -f "$KEY_FILE" ] && [ -f "$CONFIG_FILE" ]; then - KEY=$(${pkgs.coreutils}/bin/cat "$KEY_FILE" | ${pkgs.coreutils}/bin/tr -d '\n') - # Inject apiKey into models.providers.cliproxy - ${pkgs.jq}/bin/jq --arg key "$KEY" \ - '.models.providers.cliproxy.apiKey = $key' \ - "$CONFIG_FILE" > "$CONFIG_FILE.tmp" && \ - ${pkgs.coreutils}/bin/mv "$CONFIG_FILE.tmp" "$CONFIG_FILE" - echo "Injected cliproxy API key into clawdbot config" + # Extract secrets from cliproxyapi auth + home.activation.clawdbotSecrets = lib.mkIf (lib ? hm && lib.hm ? dag) ( + lib.hm.dag.entryAfter [ "writeBoundary" "clawdbotSecretsDir" ] '' + SECRETS_DIR="${homeDir}/.config/clawdbot" + CCS_AUTH="${homeDir}/.ccs/cliproxy/auth" + + # Extract Anthropic key from ccs auth if available + if [ -d "$CCS_AUTH" ]; then + ANTHROPIC_FILE=$(find "$CCS_AUTH" -name "*.json" -exec grep -l "anthropic" {} \; 2>/dev/null | head -1) + if [ -n "$ANTHROPIC_FILE" ] && [ -f "$ANTHROPIC_FILE" ]; then + ${pkgs.jq}/bin/jq -r '.api_key // empty' "$ANTHROPIC_FILE" 2>/dev/null | tr -d '\n' > "$SECRETS_DIR/anthropic-key" || true + fi fi - '' - ); - # Inject gateway token into clawdbot.json for remote mode (tokenFile not supported upstream) - home.activation.clawdbotRemoteToken = lib.mkIf (lib ? hm && lib.hm ? dag && !host.isKyber) ( - lib.hm.dag.entryAfter [ "clawdbotSecrets" "clawdbotConfigFiles" ] '' - TOKEN_FILE="${clawdbotDir}/gateway-token" - CONFIG_FILE="${homeDir}/.clawdbot/clawdbot.json" - if [ -f "$TOKEN_FILE" ] && [ -f "$CONFIG_FILE" ]; then - TOKEN=$(${pkgs.coreutils}/bin/cat "$TOKEN_FILE" | ${pkgs.coreutils}/bin/tr -d '\n') - # Inject token into gateway.remote.token and remove tokenFile - ${pkgs.jq}/bin/jq --arg token "$TOKEN" \ - '.gateway.remote.token = $token | del(.gateway.remote.tokenFile)' \ - "$CONFIG_FILE" > "$CONFIG_FILE.tmp" && \ - ${pkgs.coreutils}/bin/mv "$CONFIG_FILE.tmp" "$CONFIG_FILE" - echo "Injected gateway token into clawdbot config" + # Extract cliproxy key from .env if available + ENV_FILE="${homeDir}/dotfiles/.env" + if [ -f "$ENV_FILE" ]; then + CLIPROXY_KEY=$(grep -E "^CLIPROXY_API_KEY=" "$ENV_FILE" 2>/dev/null | cut -d= -f2 | tr -d '"' | tr -d '\n' || true) + if [ -n "$CLIPROXY_KEY" ]; then + echo -n "$CLIPROXY_KEY" > "$SECRETS_DIR/cliproxy-key" + fi + + TELEGRAM_TOKEN=$(grep -E "^TELEGRAM_BOT_TOKEN=" "$ENV_FILE" 2>/dev/null | cut -d= -f2 | tr -d '"' | tr -d '\n' || true) + if [ -n "$TELEGRAM_TOKEN" ]; then + echo -n "$TELEGRAM_TOKEN" > "$SECRETS_DIR/telegram-token" + fi + + GATEWAY_TOKEN=$(grep -E "^CLAWDBOT_GATEWAY_TOKEN=" "$ENV_FILE" 2>/dev/null | cut -d= -f2 | tr -d '"' | tr -d '\n' || true) + if [ -n "$GATEWAY_TOKEN" ]; then + echo -n "$GATEWAY_TOKEN" > "$SECRETS_DIR/gateway-token" + fi fi + + # Ensure proper permissions + chmod 600 "$SECRETS_DIR"/*.key "$SECRETS_DIR"/*-token 2>/dev/null || true '' ); - # Clean stale port-guard entries on activation (macOS remote mode only) - # The Clawdbot.app has a bug where dead SSH tunnel PIDs remain in port-guard.json, - # preventing new tunnels from being created. This cleans up stale entries. - home.activation.clawdbotCleanPortGuard = - lib.mkIf (lib ? hm && lib.hm ? dag && pkgs.stdenv.isDarwin && !host.isKyber) - ( - lib.hm.dag.entryAfter [ "writeBoundary" ] '' - PORT_GUARD="${homeDir}/Library/Application Support/Clawdbot/port-guard.json" - if [ -f "$PORT_GUARD" ]; then - # Filter out entries for port 18789 (gateway) - our launchd tunnel handles this - ${pkgs.jq}/bin/jq '[.[] | select(.port != 18789)]' "$PORT_GUARD" > "$PORT_GUARD.tmp" && \ - ${pkgs.coreutils}/bin/mv "$PORT_GUARD.tmp" "$PORT_GUARD" - echo "Cleaned stale gateway entries from port-guard.json" - fi - '' - ); - - # Auto-start Clawdbot.app on login (galactica only) - # Use /usr/bin/open to launch the app properly with full bundle context, - # rather than running the binary directly which breaks Bundle.module lookups - launchd.agents.clawdbot-app = lib.mkIf (pkgs.stdenv.isDarwin && host.isGalactica) { - enable = true; - config = { - Label = "com.clawdbot.app"; - ProgramArguments = [ - "open" - "-a" - "/Applications/Clawdbot.app" - "--args" - "--launched-from-launchd" - ]; - RunAtLoad = true; - KeepAlive = false; - StandardOutPath = "/tmp/clawdbot-app.log"; - StandardErrorPath = "/tmp/clawdbot-app.error.log"; + # Systemd service for clawdbot gateway + systemd.user.services.clawdbot-gateway = { + Unit = { + Description = "Clawdbot gateway"; + After = [ "network.target" ]; }; - }; - - # SSH tunnel to kyber gateway for remote mode (non-kyber macOS only) - # The Clawdbot.app has a bug where it doesn't reliably create the gateway tunnel, - # so we maintain a persistent SSH tunnel via launchd as a workaround. - launchd.agents.clawdbot-tunnel = lib.mkIf (pkgs.stdenv.isDarwin && !host.isKyber) { - enable = true; - config = { - Label = "com.clawdbot.tunnel"; - ProgramArguments = [ - "/usr/bin/ssh" - "-N" - "-o" - "BatchMode=yes" - "-o" - "ExitOnForwardFailure=yes" - "-o" - "ServerAliveInterval=15" - "-o" - "ServerAliveCountMax=3" - "-L" - "18789:127.0.0.1:18789" - "-i" - "${homeDir}/.ssh/id_ed25519" - "ubuntu@kyber.tail950b36.ts.net" + Service = { + Type = "simple"; + ExecStart = "${pkgs.bash}/bin/bash ${hydrateScript}"; + Restart = "always"; + RestartSec = "5s"; + Environment = [ + "HOME=${homeDir}" ]; - RunAtLoad = true; - KeepAlive = true; - StandardErrorPath = "/tmp/clawdbot-tunnel.err.log"; + WorkingDirectory = "${homeDir}/.clawdbot"; + StandardOutput = "append:/tmp/clawdbot/clawdbot-gateway.log"; + StandardError = "append:/tmp/clawdbot/clawdbot-gateway.log"; }; - }; - - programs.clawdbot = { - # App installed via nix-darwin to /Applications/Nix Apps/ - installApp = false; - appPackage = null; - - # First-party plugins (all macOS-only) - firstParty = { - summarize.enable = pkgs.stdenv.isDarwin; # Link -> clean text -> summary (macOS only) - peekaboo.enable = pkgs.stdenv.isDarwin; # macOS screenshots with AI vision (macOS only) - oracle.enable = pkgs.stdenv.isDarwin; # Bundle prompts/files for AI queries (macOS only) - poltergeist.enable = pkgs.stdenv.isDarwin; # File watcher with auto-rebuild (macOS only) - sag.enable = pkgs.stdenv.isDarwin; # ElevenLabs TTS (macOS only) - camsnap.enable = pkgs.stdenv.isDarwin; # RTSP/ONVIF camera snapshots (macOS only) - gogcli.enable = pkgs.stdenv.isDarwin; # Google CLI (Gmail, Calendar, Drive) (macOS only) - bird.enable = pkgs.stdenv.isDarwin; # X/Twitter CLI (macOS only) - sonoscli.enable = pkgs.stdenv.isDarwin; # Sonos speaker control (macOS only) - imsg.enable = pkgs.stdenv.isDarwin; # iMessage/SMS CLI (macOS only) - }; - - # Default settings - defaults = { - model = "anthropic/claude-opus-4-5"; - thinkingDefault = "high"; - }; - - # Instance configuration - instances.default = { - enable = true; - - # Service configuration: - # - Kyber only: systemd runs the gateway daemon - # - All other hosts (macOS + non-kyber Linux): no local gateway - launchd.enable = false; # Remote mode, no local gateway - systemd.enable = host.isKyber; # Only kyber runs the gateway - - # Platform-specific config overrides - # NOTE: uses configOverrides because upstream nix-clawdbot doesn't merge `config` into output - configOverrides = - # Kyber only: Local gateway mode with browser + bridge for nodes - lib.optionalAttrs host.isKyber { - gateway = { - mode = "local"; - bind = "lan"; - auth = { - tokenFile = "${clawdbotDir}/gateway-token"; - }; - }; - bridge = { - enabled = true; - bind = "lan"; # Allow nodes to connect from LAN/ingress - }; - browser = { - enabled = true; - headless = true; - executablePath = "${pkgs.chromium}/bin/chromium"; - noSandbox = true; # SUID sandbox requires root-owned binary with mode 4755 - }; - # Route through cliproxyapi for access to all model providers - # cliproxyapi runs locally on port 8317 with OpenAI-compatible API - models = { - mode = "merge"; - providers = { - cliproxy = { - baseUrl = "http://localhost:8317/v1"; - apiKeyFile = "${clawdbotDir}/cliproxy-key"; - api = "openai-completions"; - models = - let - # Helper to create model entries with required fields - mkModel = - { - id, - name, - reasoning ? false, - contextWindow ? 200000, - maxTokens ? 32000, - }: - { - inherit - id - name - reasoning - contextWindow - maxTokens - ; - input = [ "text" ]; - cost = { - input = 0; - output = 0; - cacheRead = 0; - cacheWrite = 0; - }; - }; - in - [ - # Anthropic models - (mkModel { - id = "claude-opus-4-5-20251101"; - name = "Claude Opus 4.5"; - }) - (mkModel { - id = "claude-opus-4-5-thinking"; - name = "Claude Opus 4.5 Thinking"; - reasoning = true; - }) - (mkModel { - id = "claude-sonnet-4-5-20250929"; - name = "Claude Sonnet 4.5"; - }) - (mkModel { - id = "claude-sonnet-4-5-thinking"; - name = "Claude Sonnet 4.5 Thinking"; - reasoning = true; - }) - (mkModel { - id = "claude-sonnet-4-20250514"; - name = "Claude Sonnet 4"; - }) - (mkModel { - id = "claude-opus-4-20250514"; - name = "Claude Opus 4"; - }) - (mkModel { - id = "claude-haiku-4-5-20251001"; - name = "Claude Haiku 4.5"; - }) - # OpenAI models - (mkModel { - id = "gpt-5.2"; - name = "GPT-5.2"; - }) - (mkModel { - id = "gpt-5.2-codex"; - name = "GPT-5.2 Codex"; - }) - (mkModel { - id = "gpt-5.1"; - name = "GPT-5.1"; - }) - (mkModel { - id = "gpt-5"; - name = "GPT-5"; - }) - (mkModel { - id = "gpt-5-codex"; - name = "GPT-5 Codex"; - }) - # Google Gemini models - (mkModel { - id = "gemini-3-pro-preview"; - name = "Gemini 3 Pro"; - }) - (mkModel { - id = "gemini-3-flash-preview"; - name = "Gemini 3 Flash"; - }) - (mkModel { - id = "gemini-2.5-pro"; - name = "Gemini 2.5 Pro"; - }) - (mkModel { - id = "gemini-2.5-flash"; - name = "Gemini 2.5 Flash"; - }) - # Z-AI GLM models - (mkModel { - id = "glm-4.7"; - name = "GLM 4.7"; - }) - (mkModel { - id = "glm-4.6"; - name = "GLM 4.6"; - }) - ]; - }; - }; - }; - } - # All other hosts (macOS + non-kyber Linux): Remote mode - connect to kyber gateway - // lib.optionalAttrs (!host.isKyber) { - gateway = { - mode = "remote"; - # Remote gateway config with client identity and auth token - remote = { - url = remoteGatewayUrl; - tokenFile = "${clawdbotDir}/gateway-token"; - client = { - name = host.nodeName; - }; - }; - }; - browser = { - enabled = true; - headless = pkgs.stdenv.isLinux; # Headless on Linux, GUI on macOS - }; - }; - - # Anthropic API provider (reads from ~/.config/clawdbot/anthropic-key) - # Only needed on the gateway (Linux), but harmless to keep on nodes - providers.anthropic = { - apiKeyFile = "${clawdbotDir}/anthropic-key"; - }; - - # Telegram provider - kyber gateway only (reads from ~/.config/clawdbot/telegram-token) - providers.telegram = { - enable = host.isKyber; - botTokenFile = "${clawdbotDir}/telegram-token"; - allowFrom = [ - 983653361 - 2104262990 - ]; - groups = { - "*" = { - requireMention = false; - }; - "-1003612372477" = { - enabled = true; - requireMention = false; - }; - }; - }; - - # # iMessage provider - macOS only (reads messages from anyone) - # providers.imessage = { - # enable = pkgs.stdenv.isDarwin; - # }; + Install = { + WantedBy = [ "default.target" ]; }; }; + + # Create log directory + home.activation.clawdbotLogDir = lib.mkIf (lib ? hm && lib.hm ? dag) ( + lib.hm.dag.entryAfter [ "writeBoundary" ] '' + mkdir -p /tmp/clawdbot + '' + ); } diff --git a/home-manager/modules/clawdbot/extract-secrets.sh b/home-manager/modules/clawdbot/extract-secrets.sh deleted file mode 100755 index 4532c280e..000000000 --- a/home-manager/modules/clawdbot/extract-secrets.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -CLAWDBOT_DIR="$HOME/.config/clawdbot" -CLIPROXY_AUTH_DIR="$HOME/.cli-proxy-api/objectstore/auths" -DOTFILES_ENV="$HOME/dotfiles/.env" - -mkdir -p "$CLAWDBOT_DIR" -chmod 700 "$CLAWDBOT_DIR" - -# Extract secrets from .env -if [[ -f $DOTFILES_ENV ]]; then - # Telegram token (Linux gateway only) - @grep@ -E "^CLAWDBOT_TELEGRAM_TOKEN=" "$DOTFILES_ENV" 2>/dev/null | @cut@ -d= -f2- | @tr@ -d '"' >"$CLAWDBOT_DIR/telegram-token" || true - - # Gateway token (for remote mode clients / nodes) - @grep@ -E "^CLAWDBOT_GATEWAY_TOKEN=" "$DOTFILES_ENV" 2>/dev/null | @cut@ -d= -f2- | @tr@ -d '"' >"$CLAWDBOT_DIR/gateway-token" || true -fi - -# Read Claude OAuth access_token from cliproxyapi's synced auth (primary source) -CLAUDE_AUTH_FILE=$(@find@ "$CLIPROXY_AUTH_DIR" -name "claude-*.json" 2>/dev/null | @head@ -1) -if [[ -n $CLAUDE_AUTH_FILE ]] && [[ -f $CLAUDE_AUTH_FILE ]]; then - @jq@ -r '.access_token // empty' "$CLAUDE_AUTH_FILE" >"$CLAWDBOT_DIR/anthropic-key" 2>/dev/null || true - if [[ -s "$CLAWDBOT_DIR/anthropic-key" ]]; then - echo "Extracted Claude OAuth from cliproxyapi auth" >&2 - fi -fi - -# Fallback: if no cliproxyapi auth, try .env -if [[ ! -s "$CLAWDBOT_DIR/anthropic-key" ]] && [[ -f $DOTFILES_ENV ]]; then - @grep@ -E "^CLAWDBOT_ANTHROPIC_KEY=" "$DOTFILES_ENV" 2>/dev/null | @cut@ -d= -f2- | @tr@ -d '"' >"$CLAWDBOT_DIR/anthropic-key" || true -fi - -# Extract cliproxyapi API key from config.yaml -CLIPROXY_CONFIG="$HOME/.cli-proxy-api/config.yaml" -if [[ -f $CLIPROXY_CONFIG ]]; then - # Extract first api-key from api-keys list in config.yaml - @grep@ -E '^\s*-\s*"[^"]+"\s*$' "$CLIPROXY_CONFIG" 2>/dev/null | @head@ -1 | @tr@ -d '"-' | @tr@ -d ' ' >"$CLAWDBOT_DIR/cliproxy-key" || true - if [[ -s "$CLAWDBOT_DIR/cliproxy-key" ]]; then - echo "Extracted cliproxyapi key from config" >&2 - fi -fi - -# Set secure permissions -chmod 600 "$CLAWDBOT_DIR"/* 2>/dev/null || true diff --git a/home-manager/packages/default.nix b/home-manager/packages/default.nix index 04c6ff024..f41ce0562 100644 --- a/home-manager/packages/default.nix +++ b/home-manager/packages/default.nix @@ -105,6 +105,7 @@ with pkgs; gcc gemini-cli keychain + libiconv opencode openssl openssl.dev diff --git a/home-manager/programs/fish/default.nix b/home-manager/programs/fish/default.nix index b1c68a66a..cd429fed7 100644 --- a/home-manager/programs/fish/default.nix +++ b/home-manager/programs/fish/default.nix @@ -108,6 +108,7 @@ shortcuts = "_fish_shortcuts"; zdo = "_zdo_function"; zmo = "_zmo_function"; + zpo = "_zpo_function"; }; plugins = [ { @@ -164,17 +165,13 @@ "_coxel_function" "_coxelh_function" "_dev_function" - "_ocxe_function" - "_ocxeh_function" - "_pixe_function" - "_pixeh_function" "_fish_shortcuts" "_fzf_cmd_history" "_fzf_directory_picker" "_fzf_file_picker" + "_fzf_ghq_picker" "_fzf_git_branch" "_fzf_git_worktree" - "_fzf_ghq_picker" "_fzf_preview_cmd" "_fzf_preview_name" "_gco_function" @@ -184,9 +181,14 @@ "_kyber_function" "_kyberd_function" "_kyberm_function" + "_ocxe_function" + "_ocxeh_function" + "_pixe_function" + "_pixeh_function" + "_ssh_add_github" "_zdo_function" "_zmo_function" - "_ssh_add_github" + "_zpo_function" "fish_user_key_bindings" ] ); diff --git a/home-manager/programs/fish/functions/_ocxe_function.fish b/home-manager/programs/fish/functions/_ocxe_function.fish index fd3f85613..f75ff2ab6 100644 --- a/home-manager/programs/fish/functions/_ocxe_function.fish +++ b/home-manager/programs/fish/functions/_ocxe_function.fish @@ -3,9 +3,9 @@ function _ocxe_function --description "Run OpenCode with GLM-4.7 via OpenRouter" # Usage: ocxe [] if test (count $argv) -eq 0 - opencode -m 'openrouter-preset/glm-4-7' + opencode -m 'cliproxyapi/glm-4-7' else set -l prompt (string join " " -- $argv) - opencode run "$prompt" -m 'openrouter-preset/glm-4-7' + opencode run "$prompt" -m 'cliproxyapi/glm-4-7' end end diff --git a/home-manager/programs/fish/functions/_ocxeh_function.fish b/home-manager/programs/fish/functions/_ocxeh_function.fish index d49de00ce..e4748f59b 100644 --- a/home-manager/programs/fish/functions/_ocxeh_function.fish +++ b/home-manager/programs/fish/functions/_ocxeh_function.fish @@ -8,5 +8,5 @@ function _ocxeh_function --description "Run OpenCode headlessly with GLM-4.7" return 1 end - opencode run "$prompt" -m 'openrouter-preset/glm-4-7' + opencode run "$prompt" -m 'cliproxyapi/glm-4-7' end diff --git a/home-manager/programs/fish/functions/_zpo_function.fish b/home-manager/programs/fish/functions/_zpo_function.fish new file mode 100644 index 000000000..c61e51e55 --- /dev/null +++ b/home-manager/programs/fish/functions/_zpo_function.fish @@ -0,0 +1,3 @@ +function _zpo_function --description "Attach to zellij primary session" + zellij attach primary -c +end diff --git a/nix-darwin/default.nix b/nix-darwin/default.nix index bf42a4239..68858c164 100644 --- a/nix-darwin/default.nix +++ b/nix-darwin/default.nix @@ -29,12 +29,4 @@ in time ]; - # Clawdbot.app: Install to /Applications/ (galactica only) - # Use ditto instead of cp -R to preserve all macOS bundle attributes, - # extended attributes, and resource forks required for Bundle.module lookups - system.activationScripts.postActivation.text = lib.mkIf (!env.isCI && host.isGalactica) '' - echo "Installing Clawdbot.app to /Applications..." - rm -rf /Applications/Clawdbot.app - ditto "${pkgs.clawdbot-app}/Applications/Clawdbot.app" /Applications/Clawdbot.app - ''; } diff --git a/overlays/default.nix b/overlays/default.nix index 7f91defce..0bab21d52 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1,118 +1,7 @@ { inputs }: -let - # Override clawdbot source to v2026.1.21 - clawdbotSourceOverride = { - owner = "clawdbot"; - repo = "clawdbot"; - rev = "80c1edc3ff43b3bd3b7b545eed79f303d992f7dc"; - hash = "sha256-IsTNC79KXKL7ByBh7zUmH6qXx0YFdiQ4a4TI40C53U8="; - pnpmDepsHash = "sha256-tGzKcCiZNlWlKMNNFmxcFpIvO92G9myhM+OYaGea4hw="; - }; - # Override clawdbot-app to v2026.1.21 (fixes broken app package) - clawdbotAppOverride = { - version = "2026.1.21"; - url = "https://github.com/clawdbot/clawdbot/releases/download/v2026.1.21/Clawdbot-2026.1.21.zip"; - hash = "sha256-EhGRakuN0dhEkXvrOd21t79odf4T2jY7oKFRubLqGbI="; - }; -in [ inputs.nur.overlays.default inputs.neovim-nightly-overlay.overlays.default - # Custom clawdbot overlay with version override (replaces inputs.nix-clawdbot.overlays.default) - ( - final: prev: - let - clawdbotVersion = "2026.1.21"; - basePkgs = import "${inputs.nix-clawdbot}/nix/packages" { - pkgs = prev; - sourceInfo = clawdbotSourceOverride; - }; - # Override version in clawdbot-gateway (it's hardcoded in the derivation) - # src is already correct from sourceInfo, just need to update version string - clawdbot-gateway = basePkgs.clawdbot-gateway.overrideAttrs (old: { - version = clawdbotVersion; - __intentionallyOverridingVersion = true; - }); - # Build clawdbot-app with fixed version (upstream has broken app package) - clawdbot-app = - if prev.stdenv.isDarwin then - prev.stdenvNoCC.mkDerivation { - pname = "clawdbot-app"; - version = clawdbotAppOverride.version; - src = prev.fetchzip { - url = clawdbotAppOverride.url; - hash = clawdbotAppOverride.hash; - stripRoot = false; - }; - dontUnpack = true; - installPhase = '' - mkdir -p "$out/Applications" - app_path="$(find "$src" -maxdepth 2 -name '*.app' -print -quit)" - if [ -z "$app_path" ]; then - echo "Clawdbot.app not found in $src" >&2 - exit 1 - fi - cp -pR "$app_path" "$out/Applications/Clawdbot.app" - ''; - meta = with prev.lib; { - description = "Clawdbot macOS app bundle"; - homepage = "https://github.com/clawdbot/clawdbot"; - license = licenses.mit; - platforms = platforms.darwin; - }; - } - else - null; - # Rebuild batteries bundle with the overridden gateway and app - clawdbot = prev.callPackage "${inputs.nix-clawdbot}/nix/packages/clawdbot-batteries.nix" { - clawdbot-gateway = clawdbot-gateway; - inherit clawdbot-app; - extendedTools = (import "${inputs.nix-clawdbot}/nix/tools/extended.nix" { pkgs = prev; }).tools; - }; - toolNames = (import "${inputs.nix-clawdbot}/nix/tools/extended.nix" { pkgs = prev; }).toolNames; - withTools = - { - toolNamesOverride ? null, - excludeToolNames ? [ ], - }: - let - toolSets = import "${inputs.nix-clawdbot}/nix/tools/extended.nix" { - pkgs = prev; - inherit toolNamesOverride excludeToolNames; - }; - innerPkgs = import "${inputs.nix-clawdbot}/nix/packages" { - pkgs = prev; - sourceInfo = clawdbotSourceOverride; - inherit toolNamesOverride excludeToolNames; - }; - innerGateway = innerPkgs.clawdbot-gateway.overrideAttrs (old: { - version = clawdbotVersion; - __intentionallyOverridingVersion = true; - }); - in - innerPkgs - // { - clawdbot-gateway = innerGateway; - clawdbot = prev.callPackage "${inputs.nix-clawdbot}/nix/packages/clawdbot-batteries.nix" { - clawdbot-gateway = innerGateway; - inherit clawdbot-app; - extendedTools = toolSets.tools; - }; - }; - in - { - inherit clawdbot clawdbot-gateway; - clawdbotPackages = { - inherit - clawdbot - clawdbot-gateway - toolNames - withTools - ; - }; - } - // (if prev.stdenv.isDarwin then { inherit clawdbot-app; } else { }) - ) (final: prev: { # Ensure neovim-unwrapped exposes a lua attribute for wrapper consumers (e.g., home-manager) neovim-unwrapped = diff --git a/scripts/upgrade-overlays.sh b/scripts/upgrade-overlays.sh index 84e196417..a5f5e9577 100755 --- a/scripts/upgrade-overlays.sh +++ b/scripts/upgrade-overlays.sh @@ -95,9 +95,23 @@ compute_pnpm_deps_hash() { # Temporarily set fake hash sed_inplace "s|pnpmDepsHash = \"[^\"]*\";|pnpmDepsHash = \"$fake_hash\";|" "$OVERLAY_FILE" + # Detect platform and build configuration + local nix_config + if [[ $OSTYPE == "darwin"* ]]; then + local arch + arch=$(uname -m) + if [[ $arch == "arm64" ]]; then + nix_config=".#darwinConfigurations.aarch64-darwin.system" + else + nix_config=".#darwinConfigurations.x86_64-darwin.system" + fi + else + nix_config=".#homeConfigurations.$(whoami)@$(hostname).activationPackage" + fi + # Run nix build and capture the correct hash from error output local build_output correct_hash - build_output=$(nix build ".#darwinConfigurations.aarch64-darwin.system" --no-link 2>&1 || true) + build_output=$(nix build "$nix_config" --no-link 2>&1 || true) # Extract the correct hash from "got: sha256-..." line correct_hash=$(echo "$build_output" | grep -o 'got:[[:space:]]*sha256-[A-Za-z0-9+/=]*' | head -1 | sed 's/got:[[:space:]]*//') diff --git a/spec/cargo_globals_spec.sh b/spec/cargo_globals_spec.sh index 5b0b242be..9dbe772d5 100644 --- a/spec/cargo_globals_spec.sh +++ b/spec/cargo_globals_spec.sh @@ -54,8 +54,8 @@ The output should include 'dasel' End It 'supports table-style dependency versions' -When run bash -c "grep 'version // .value' '$SCRIPT'" -The output should include 'version // .value' +When run bash -c "grep -E '\\.value\\.version|type\\)\\s*==\"string\"' '$SCRIPT'" +The output should include '.value.version' End It 'uses cargo install with version' @@ -63,6 +63,11 @@ When run bash -c "grep 'cargo install' '$SCRIPT'" The output should include '--version' End +It 'supports git dependencies' +When run bash -c "grep -E '\\.value\\.git|--git' '$SCRIPT'" +The output should include '--git' +End + It 'tries --locked flag first' When run bash -c "grep -- '--locked' '$SCRIPT'" The output should include '--locked'