@sigitcodereview-old / sigit / commits / 97a5784
Fork 0

A modular local inference LLM coding agent. Core component of siGit Factory.

Remove unused dependencies and update onde to 1.0.0

Delay ACP model loading until first prompt for cleaner startup Lazily load the default model in ACP mode to keep initialize/session/new lightweight and avoid startup diagnostics on stdout. Add a guard to ensure the model loads only once. Remove unused Unix stdout redirection.

paydii committed Apr 30, 2026 at 10:24 UTC 97a57847b10ddd79b4257658856a69119c470da4
3 files changed +447 -694
Cargo.lock
+363 -668
@@ -78,24 +78,6 @@ version = "0.4.0"
78 source = "registry+https://github.com/rust-lang/crates.io-index"
79 checksum = "1763692fc1416554cf051efc56a3de5595eca47299d731cc5c2b583adf8b4d2f"
80
81 -[[package]]
82 -name = "aligned"
83 -version = "0.4.3"
84 -source = "registry+https://github.com/rust-lang/crates.io-index"
85 -checksum = "ee4508988c62edf04abd8d92897fca0c2995d907ce1dfeaf369dac3716a40685"
86 -dependencies = [
87 - "as-slice",
88 -]
89 -
90 -[[package]]
91 -name = "aligned-vec"
92 -version = "0.6.4"
93 -source = "registry+https://github.com/rust-lang/crates.io-index"
94 -checksum = "dc890384c8602f339876ded803c97ad529f3842aba97f6392b3dba0dd171769b"
95 -dependencies = [
96 - "equator",
97 -]
98 -
81 [[package]]
82 name = "allocator-api2"
83 version = "0.2.21"
@@ -201,23 +183,6 @@ dependencies = [
183 "num-traits",
184 ]
185
204 -[[package]]
205 -name = "arbitrary"
206 -version = "1.4.2"
207 -source = "registry+https://github.com/rust-lang/crates.io-index"
208 -checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1"
209 -
210 -[[package]]
211 -name = "arg_enum_proc_macro"
212 -version = "0.3.4"
213 -source = "registry+https://github.com/rust-lang/crates.io-index"
214 -checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea"
215 -dependencies = [
216 - "proc-macro2",
217 - "quote",
218 - "syn 2.0.117",
219 -]
220 -
186 [[package]]
187 name = "arraydeque"
188 version = "0.5.1"
@@ -236,15 +201,6 @@ version = "0.3.2"
201 source = "registry+https://github.com/rust-lang/crates.io-index"
202 checksum = "b0f477b951e452a0b6b4a10b53ccd569042d1d01729b519e02074a9c0958a063"
203
239 -[[package]]
240 -name = "as-slice"
241 -version = "0.2.1"
242 -source = "registry+https://github.com/rust-lang/crates.io-index"
243 -checksum = "516b6b4f0e40d50dcda9365d53964ec74560ad4284da2e7fc97122cd83174516"
244 -dependencies = [
245 - "stable_deref_trait",
246 -]
247 -
204 [[package]]
205 name = "askama"
206 version = "0.14.0"
@@ -346,49 +302,6 @@ version = "1.5.0"
302 source = "registry+https://github.com/rust-lang/crates.io-index"
303 checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
304
349 -[[package]]
350 -name = "av-scenechange"
351 -version = "0.14.1"
352 -source = "registry+https://github.com/rust-lang/crates.io-index"
353 -checksum = "0f321d77c20e19b92c39e7471cf986812cbb46659d2af674adc4331ef3f18394"
354 -dependencies = [
355 - "aligned",
356 - "anyhow",
357 - "arg_enum_proc_macro",
358 - "arrayvec",
359 - "log",
360 - "num-rational",
361 - "num-traits",
362 - "pastey",
363 - "rayon",
364 - "thiserror 2.0.18",
365 - "v_frame",
366 - "y4m",
367 -]
368 -
369 -[[package]]
370 -name = "av1-grain"
371 -version = "0.2.5"
372 -source = "registry+https://github.com/rust-lang/crates.io-index"
373 -checksum = "8cfddb07216410377231960af4fcab838eaa12e013417781b78bd95ee22077f8"
374 -dependencies = [
375 - "anyhow",
376 - "arrayvec",
377 - "log",
378 - "nom 8.0.0",
379 - "num-rational",
380 - "v_frame",
381 -]
382 -
383 -[[package]]
384 -name = "avif-serialize"
385 -version = "0.8.8"
386 -source = "registry+https://github.com/rust-lang/crates.io-index"
387 -checksum = "375082f007bd67184fb9c0374614b29f9aaa604ec301635f72338bb65386a53d"
388 -dependencies = [
389 - "arrayvec",
390 -]
391 -
305 [[package]]
306 name = "aws-lc-rs"
307 version = "1.16.3"
@@ -480,15 +393,6 @@ version = "2.11.1"
393 source = "registry+https://github.com/rust-lang/crates.io-index"
394 checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3"
395
483 -[[package]]
484 -name = "bitstream-io"
485 -version = "4.10.0"
486 -source = "registry+https://github.com/rust-lang/crates.io-index"
487 -checksum = "7eff00be299a18769011411c9def0d827e8f2d7bf0c3dbf53633147a8867fd1f"
488 -dependencies = [
489 - "no_std_io2",
490 -]
491 -
396 [[package]]
397 name = "block"
398 version = "0.1.6"
@@ -538,12 +442,6 @@ dependencies = [
442 "serde",
443 ]
444
541 -[[package]]
542 -name = "built"
543 -version = "0.8.0"
544 -source = "registry+https://github.com/rust-lang/crates.io-index"
545 -checksum = "f4ad8f11f288f48ca24471bbd51ac257aaeaaa07adae295591266b792902ae64"
546 -
445 [[package]]
446 name = "bumpalo"
447 version = "3.20.2"
@@ -1543,26 +1441,6 @@ dependencies = [
1441 "syn 2.0.117",
1442 ]
1443
1546 -[[package]]
1547 -name = "equator"
1548 -version = "0.4.2"
1549 -source = "registry+https://github.com/rust-lang/crates.io-index"
1550 -checksum = "4711b213838dfee0117e3be6ac926007d7f433d7bbe33595975d4190cb07e6fc"
1551 -dependencies = [
1552 - "equator-macro",
1553 -]
1554 -
1555 -[[package]]
1556 -name = "equator-macro"
1557 -version = "0.4.2"
1558 -source = "registry+https://github.com/rust-lang/crates.io-index"
1559 -checksum = "44f23cf4b44bfce11a86ace86f8a73ffdec849c9fd00a386a53d278bd9e81fb3"
1560 -dependencies = [
1561 - "proc-macro2",
1562 - "quote",
1563 - "syn 2.0.117",
1564 -]
1565 -
1444 [[package]]
1445 name = "equivalent"
1446 version = "1.0.2"
@@ -1616,7 +1494,6 @@ dependencies = [
1494 "half",
1495 "lebe",
1496 "miniz_oxide",
1619 - "rayon-core",
1497 "smallvec 1.15.1",
1498 "zune-inflate",
1499 ]
@@ -2674,9 +2551,6 @@ dependencies = [
2551 "num-traits",
2552 "png",
2553 "qoi",
2677 - "ravif",
2678 - "rayon",
2679 - "rgb",
2554 "tiff",
2555 "zune-core",
2556 "zune-jpeg",
@@ -2692,12 +2566,6 @@ dependencies = [
2566 "quick-error",
2567 ]
2568
2695 -[[package]]
2696 -name = "imgref"
2697 -version = "1.12.0"
2698 -source = "registry+https://github.com/rust-lang/crates.io-index"
2699 -checksum = "e7c5cedc30da3a610cac6b4ba17597bdf7152cf974e8aab3afb3d54455e371c8"
2700 -
2569 [[package]]
2570 name = "indexmap"
2571 version = "1.9.3"
@@ -2770,17 +2638,6 @@ dependencies = [
2638 "syn 2.0.117",
2639 ]
2640
2773 -[[package]]
2774 -name = "interpolate_name"
2775 -version = "0.2.4"
2776 -source = "registry+https://github.com/rust-lang/crates.io-index"
2777 -checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60"
2778 -dependencies = [
2779 - "proc-macro2",
2780 - "quote",
2781 - "syn 2.0.117",
2782 -]
2783 -
2641 [[package]]
2642 name = "interprocess"
2643 version = "2.4.2"
@@ -2930,16 +2787,6 @@ version = "0.2.186"
2787 source = "registry+https://github.com/rust-lang/crates.io-index"
2788 checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"
2789
2933 -[[package]]
2934 -name = "libfuzzer-sys"
2935 -version = "0.4.12"
2936 -source = "registry+https://github.com/rust-lang/crates.io-index"
2937 -checksum = "f12a681b7dd8ce12bff52488013ba614b869148d54dd79836ab85aafdd53f08d"
2938 -dependencies = [
2939 - "arbitrary",
2940 - "cc",
2941 -]
2942 -
2790 [[package]]
2791 name = "libloading"
2792 version = "0.8.9"
@@ -3034,15 +2881,6 @@ dependencies = [
2881 "tracing-subscriber",
2882 ]
2883
3037 -[[package]]
3038 -name = "loop9"
3039 -version = "0.1.5"
3040 -source = "registry+https://github.com/rust-lang/crates.io-index"
3041 -checksum = "0fae87c125b03c1d2c0150c90365d7d6bcc53fb73a9acaef207d2d065860f062"
3042 -dependencies = [
3043 - "imgref",
3044 -]
3045 -
2884 [[package]]
2885 name = "lrtable"
2886 version = "0.14.1"
@@ -3149,16 +2987,6 @@ dependencies = [
2987 "rawpointer",
2988 ]
2989
3152 -[[package]]
3153 -name = "maybe-rayon"
3154 -version = "0.1.1"
3155 -source = "registry+https://github.com/rust-lang/crates.io-index"
3156 -checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519"
3157 -dependencies = [
3158 - "cfg-if",
3159 - "rayon",
3160 -]
3161 -
2990 [[package]]
2991 name = "memchr"
2992 version = "2.8.0"
@@ -3262,263 +3090,42 @@ dependencies = [
3090 ]
3091
3092 [[package]]
3265 -name = "mistralrs"
3266 -version = "0.8.1"
3267 -source = "git+https://github.com/setoelkahfi/mistral.rs?branch=fix%2Fall-platform-fixes#e53956bcd1b40c8221f79b919d78c1e496aba634"
3093 +name = "monostate"
3094 +version = "0.1.18"
3095 +source = "registry+https://github.com/rust-lang/crates.io-index"
3096 +checksum = "3341a273f6c9d5bef1908f17b7267bbab0e95c9bf69a0d4dcf8e9e1b2c76ef67"
3097 dependencies = [
3269 - "anyhow",
3270 - "candle-core",
3271 - "candle-nn",
3272 - "clap 4.6.1",
3273 - "either",
3274 - "futures",
3275 - "image",
3276 - "indexmap 2.14.0",
3277 - "mistralrs-core",
3278 - "mistralrs-macros",
3279 - "rand 0.9.4",
3280 - "reqwest 0.13.2",
3281 - "schemars 1.2.1",
3098 + "monostate-impl",
3099 "serde",
3283 - "serde_json",
3284 - "thiserror 2.0.18",
3285 - "tokio",
3286 - "tracing",
3287 - "tracing-subscriber",
3288 - "walkdir",
3100 + "serde_core",
3101 ]
3102
3103 [[package]]
3292 -name = "mistralrs-audio"
3293 -version = "0.8.1"
3294 -source = "git+https://github.com/setoelkahfi/mistral.rs?branch=fix%2Fall-platform-fixes#e53956bcd1b40c8221f79b919d78c1e496aba634"
3104 +name = "monostate-impl"
3105 +version = "0.1.18"
3106 +source = "registry+https://github.com/rust-lang/crates.io-index"
3107 +checksum = "e4db6d5580af57bf992f59068d4ea26fd518574ff48d7639b255a36f9de6e7e9"
3108 dependencies = [
3296 - "anyhow",
3297 - "apodize",
3298 - "hound",
3299 - "symphonia",
3109 + "proc-macro2",
3110 + "quote",
3111 + "syn 2.0.117",
3112 ]
3113
3114 [[package]]
3303 -name = "mistralrs-core"
3115 +name = "moxcms"
3116 version = "0.8.1"
3305 -source = "git+https://github.com/setoelkahfi/mistral.rs?branch=fix%2Fall-platform-fixes#e53956bcd1b40c8221f79b919d78c1e496aba634"
3117 +source = "registry+https://github.com/rust-lang/crates.io-index"
3118 +checksum = "bb85c154ba489f01b25c0d36ae69a87e4a1c73a72631fc6c0eb6dde34a73e44b"
3119 dependencies = [
3307 - "ahash",
3308 - "akin",
3309 - "anyhow",
3310 - "apodize",
3311 - "as-any",
3312 - "async-trait",
3313 - "base64 0.22.1",
3314 - "bm25",
3315 - "bytemuck",
3316 - "bytemuck_derive",
3317 - "candle-core",
3318 - "candle-metal-kernels",
3319 - "candle-nn",
3320 - "cfgrammar",
3321 - "chrono",
3322 - "clap 4.6.1",
3323 - "csv",
3324 - "derive-new",
3325 - "derive_more",
3326 - "dirs",
3327 - "either",
3328 - "float8",
3329 - "futures",
3330 - "galil-seiferas",
3331 - "half",
3332 - "hashbrown 0.16.1",
3333 - "hf-hub",
3334 - "hound",
3335 - "html2text",
3336 - "http",
3337 - "image",
3338 - "indexmap 2.14.0",
3339 - "indicatif 0.18.4",
3340 - "interprocess",
3341 - "itertools 0.14.0",
3342 - "libc",
3343 - "llguidance",
3344 - "lrtable",
3345 - "minijinja",
3346 - "minijinja-contrib",
3347 - "mistralrs-audio",
3348 - "mistralrs-mcp",
3349 - "mistralrs-paged-attn",
3350 - "mistralrs-quant",
3351 - "mistralrs-vision",
3120 "num-traits",
3353 - "objc",
3354 - "objc2-metal",
3355 - "openai-harmony",
3356 - "ordered-float",
3357 - "parking_lot",
3358 - "radix_trie",
3359 - "rand 0.9.4",
3360 - "rand_distr 0.5.1",
3361 - "rand_isaac",
3362 - "rayon",
3363 - "regex",
3364 - "regex-automata",
3365 - "reqwest 0.13.2",
3366 - "rubato",
3367 - "rust-mcp-schema",
3368 - "rustc-hash 2.1.2",
3369 - "rustfft",
3370 - "safetensors 0.7.0",
3371 - "schemars 1.2.1",
3372 - "scraper",
3373 - "serde",
3374 - "serde-big-array",
3375 - "serde-saphyr",
3376 - "serde_json",
3377 - "serde_plain",
3378 - "statrs",
3379 - "strum 0.27.2",
3380 - "symphonia",
3381 - "sysinfo",
3382 - "thiserror 2.0.18",
3383 - "tokenizers 0.21.4",
3384 - "tokio",
3385 - "tokio-rayon",
3386 - "tokio-tungstenite",
3387 - "toktrie",
3388 - "toktrie_hf_tokenizers",
3389 - "toml",
3390 - "tqdm",
3391 - "tracing",
3392 - "tracing-subscriber",
3393 - "urlencoding",
3394 - "uuid 1.23.1",
3395 - "variantly",
3396 - "vob",
3397 -]
3398 -
3399 -[[package]]
3400 -name = "mistralrs-macros"
3401 -version = "0.8.1"
3402 -source = "git+https://github.com/setoelkahfi/mistral.rs?branch=fix%2Fall-platform-fixes#e53956bcd1b40c8221f79b919d78c1e496aba634"
3403 -dependencies = [
3404 - "darling 0.23.0",
3405 - "proc-macro2",
3406 - "quote",
3407 - "syn 2.0.117",
3121 + "pxfm",
3122 ]
3123
3124 [[package]]
3411 -name = "mistralrs-mcp"
3412 -version = "0.8.1"
3413 -source = "git+https://github.com/setoelkahfi/mistral.rs?branch=fix%2Fall-platform-fixes#e53956bcd1b40c8221f79b919d78c1e496aba634"
3414 -dependencies = [
3415 - "anyhow",
3416 - "async-trait",
3417 - "futures-util",
3418 - "http",
3419 - "reqwest 0.13.2",
3420 - "rust-mcp-schema",
3421 - "serde",
3422 - "serde_json",
3423 - "tokio",
3424 - "tokio-tungstenite",
3425 - "tracing",
3426 - "utoipa",
3427 - "uuid 1.23.1",
3428 -]
3429 -
3430 -[[package]]
3431 -name = "mistralrs-paged-attn"
3432 -version = "0.8.1"
3433 -source = "git+https://github.com/setoelkahfi/mistral.rs?branch=fix%2Fall-platform-fixes#e53956bcd1b40c8221f79b919d78c1e496aba634"
3434 -dependencies = [
3435 - "anyhow",
3436 - "candle-core",
3437 - "candle-metal-kernels",
3438 - "dispatch2",
3439 - "float8",
3440 - "half",
3441 - "objc2-foundation",
3442 - "objc2-metal",
3443 - "thiserror 2.0.18",
3444 -]
3445 -
3446 -[[package]]
3447 -name = "mistralrs-quant"
3448 -version = "0.8.1"
3449 -source = "git+https://github.com/setoelkahfi/mistral.rs?branch=fix%2Fall-platform-fixes#e53956bcd1b40c8221f79b919d78c1e496aba634"
3450 -dependencies = [
3451 - "byteorder",
3452 - "candle-core",
3453 - "candle-metal-kernels",
3454 - "candle-nn",
3455 - "dispatch2",
3456 - "float8",
3457 - "half",
3458 - "hf-hub",
3459 - "lazy_static",
3460 - "memmap2",
3461 - "objc2-foundation",
3462 - "objc2-metal",
3463 - "paste",
3464 - "rayon",
3465 - "regex",
3466 - "safetensors 0.7.0",
3467 - "serde",
3468 - "serde_json",
3469 - "thiserror 2.0.18",
3470 - "tokio",
3471 - "tracing",
3472 - "yoke 0.8.2",
3473 -]
3474 -
3475 -[[package]]
3476 -name = "mistralrs-vision"
3477 -version = "0.8.1"
3478 -source = "git+https://github.com/setoelkahfi/mistral.rs?branch=fix%2Fall-platform-fixes#e53956bcd1b40c8221f79b919d78c1e496aba634"
3479 -dependencies = [
3480 - "candle-core",
3481 - "image",
3482 - "rayon",
3483 -]
3484 -
3485 -[[package]]
3486 -name = "monostate"
3487 -version = "0.1.18"
3488 -source = "registry+https://github.com/rust-lang/crates.io-index"
3489 -checksum = "3341a273f6c9d5bef1908f17b7267bbab0e95c9bf69a0d4dcf8e9e1b2c76ef67"
3490 -dependencies = [
3491 - "monostate-impl",
3492 - "serde",
3493 - "serde_core",
3494 -]
3495 -
3496 -[[package]]
3497 -name = "monostate-impl"
3498 -version = "0.1.18"
3499 -source = "registry+https://github.com/rust-lang/crates.io-index"
3500 -checksum = "e4db6d5580af57bf992f59068d4ea26fd518574ff48d7639b255a36f9de6e7e9"
3501 -dependencies = [
3502 - "proc-macro2",
3503 - "quote",
3504 - "syn 2.0.117",
3505 -]
3506 -
3507 -[[package]]
3508 -name = "moxcms"
3509 -version = "0.8.1"
3510 -source = "registry+https://github.com/rust-lang/crates.io-index"
3511 -checksum = "bb85c154ba489f01b25c0d36ae69a87e4a1c73a72631fc6c0eb6dde34a73e44b"
3512 -dependencies = [
3513 - "num-traits",
3514 - "pxfm",
3515 -]
3516 -
3517 -[[package]]
3518 -name = "nalgebra"
3519 -version = "0.33.3"
3520 -source = "registry+https://github.com/rust-lang/crates.io-index"
3521 -checksum = "9d43ddcacf343185dfd6de2ee786d9e8b1c2301622afab66b6c73baf9882abfd"
3125 +name = "nalgebra"
3126 +version = "0.33.3"
3127 +source = "registry+https://github.com/rust-lang/crates.io-index"
3128 +checksum = "9d43ddcacf343185dfd6de2ee786d9e8b1c2301622afab66b6c73baf9882abfd"
3129 dependencies = [
3130 "approx",
3131 "matrixmultiply",
@@ -3546,15 +3153,6 @@ dependencies = [
3153 "smallvec 1.15.1",
3154 ]
3155
3549 -[[package]]
3550 -name = "no_std_io2"
3551 -version = "0.9.3"
3552 -source = "registry+https://github.com/rust-lang/crates.io-index"
3553 -checksum = "b51ed7824b6e07d354605f4abb3d9d300350701299da96642ee084f5ce631550"
3554 -dependencies = [
3555 - "memchr",
3556 -]
3557 -
3156 [[package]]
3157 name = "nohash-hasher"
3158 version = "0.2.0"
@@ -3571,21 +3169,6 @@ dependencies = [
3169 "minimal-lexical",
3170 ]
3171
3574 -[[package]]
3575 -name = "nom"
3576 -version = "8.0.0"
3577 -source = "registry+https://github.com/rust-lang/crates.io-index"
3578 -checksum = "df9761775871bdef83bee530e60050f7e54b1105350d6884eb0fb4f46c2f9405"
3579 -dependencies = [
3580 - "memchr",
3581 -]
3582 -
3583 -[[package]]
3584 -name = "noop_proc_macro"
3585 -version = "0.3.0"
3586 -source = "registry+https://github.com/rust-lang/crates.io-index"
3587 -checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8"
3588 -
3172 [[package]]
3173 name = "ntapi"
3174 version = "0.4.3"
@@ -3644,17 +3227,6 @@ version = "0.2.1"
3227 source = "registry+https://github.com/rust-lang/crates.io-index"
3228 checksum = "c6673768db2d862beb9b39a78fdcb1a69439615d5794a1be50caa9bc92c81967"
3229
3647 -[[package]]
3648 -name = "num-derive"
3649 -version = "0.4.2"
3650 -source = "registry+https://github.com/rust-lang/crates.io-index"
3651 -checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202"
3652 -dependencies = [
3653 - "proc-macro2",
3654 - "quote",
3655 - "syn 2.0.117",
3656 -]
3657 -
3230 [[package]]
3231 name = "num-integer"
3232 version = "0.1.46"
@@ -3707,116 +3279,380 @@ dependencies = [
3279 ]
3280
3281 [[package]]
3710 -name = "number_prefix"
3711 -version = "0.4.0"
3712 -source = "registry+https://github.com/rust-lang/crates.io-index"
3713 -checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3"
3714 -
3715 -[[package]]
3716 -name = "objc"
3717 -version = "0.2.7"
3282 +name = "number_prefix"
3283 +version = "0.4.0"
3284 +source = "registry+https://github.com/rust-lang/crates.io-index"
3285 +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3"
3286 +
3287 +[[package]]
3288 +name = "objc"
3289 +version = "0.2.7"
3290 +source = "registry+https://github.com/rust-lang/crates.io-index"
3291 +checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1"
3292 +dependencies = [
3293 + "malloc_buf",
3294 +]
3295 +
3296 +[[package]]
3297 +name = "objc2"
3298 +version = "0.6.4"
3299 +source = "registry+https://github.com/rust-lang/crates.io-index"
3300 +checksum = "3a12a8ed07aefc768292f076dc3ac8c48f3781c8f2d5851dd3d98950e8c5a89f"
3301 +dependencies = [
3302 + "objc2-encode",
3303 +]
3304 +
3305 +[[package]]
3306 +name = "objc2-core-foundation"
3307 +version = "0.3.2"
3308 +source = "registry+https://github.com/rust-lang/crates.io-index"
3309 +checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536"
3310 +dependencies = [
3311 + "bitflags 2.11.1",
3312 + "dispatch2",
3313 + "objc2",
3314 +]
3315 +
3316 +[[package]]
3317 +name = "objc2-encode"
3318 +version = "4.1.0"
3319 +source = "registry+https://github.com/rust-lang/crates.io-index"
3320 +checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33"
3321 +
3322 +[[package]]
3323 +name = "objc2-foundation"
3324 +version = "0.3.2"
3325 +source = "registry+https://github.com/rust-lang/crates.io-index"
3326 +checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272"
3327 +dependencies = [
3328 + "bitflags 2.11.1",
3329 + "block2",
3330 + "libc",
3331 + "objc2",
3332 + "objc2-core-foundation",
3333 +]
3334 +
3335 +[[package]]
3336 +name = "objc2-io-kit"
3337 +version = "0.3.2"
3338 +source = "registry+https://github.com/rust-lang/crates.io-index"
3339 +checksum = "33fafba39597d6dc1fb709123dfa8289d39406734be322956a69f0931c73bb15"
3340 +dependencies = [
3341 + "libc",
3342 + "objc2-core-foundation",
3343 +]
3344 +
3345 +[[package]]
3346 +name = "objc2-metal"
3347 +version = "0.3.2"
3348 +source = "registry+https://github.com/rust-lang/crates.io-index"
3349 +checksum = "a0125f776a10d00af4152d74616409f0d4a2053a6f57fa5b7d6aa2854ac04794"
3350 +dependencies = [
3351 + "bitflags 2.11.1",
3352 + "block2",
3353 + "dispatch2",
3354 + "objc2",
3355 + "objc2-core-foundation",
3356 + "objc2-foundation",
3357 +]
3358 +
3359 +[[package]]
3360 +name = "once_cell"
3361 +version = "1.21.4"
3362 +source = "registry+https://github.com/rust-lang/crates.io-index"
3363 +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
3364 +
3365 +[[package]]
3366 +name = "once_cell_polyfill"
3367 +version = "1.70.2"
3368 +source = "registry+https://github.com/rust-lang/crates.io-index"
3369 +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
3370 +
3371 +[[package]]
3372 +name = "onde"
3373 +version = "1.0.0"
3374 +source = "registry+https://github.com/rust-lang/crates.io-index"
3375 +checksum = "33f675186adc948026c62e4e20efde5665ac11c7d44249d3d4afabc59a156c6f"
3376 +dependencies = [
3377 + "anyhow",
3378 + "cc",
3379 + "dotenvy",
3380 + "hf-hub",
3381 + "home",
3382 + "log",
3383 + "onde-mistralrs",
3384 + "onde-mistralrs-core",
3385 + "reqwest 0.12.28",
3386 + "serde",
3387 + "serde_json",
3388 + "smbcloud-gresiq-sdk",
3389 + "thiserror 2.0.18",
3390 + "tokio",
3391 + "tsync",
3392 + "uniffi",
3393 +]
3394 +
3395 +[[package]]
3396 +name = "onde-mistralrs"
3397 +version = "0.8.2"
3398 +source = "registry+https://github.com/rust-lang/crates.io-index"
3399 +checksum = "f4b5589da2ed82d3962ab4d8278cc8a93fea7c758eb1230894ffadb926c3c16c"
3400 +dependencies = [
3401 + "anyhow",
3402 + "candle-core",
3403 + "candle-nn",
3404 + "clap 4.6.1",
3405 + "either",
3406 + "futures",
3407 + "image",
3408 + "indexmap 2.14.0",
3409 + "onde-mistralrs-core",
3410 + "onde-mistralrs-macros",
3411 + "rand 0.9.4",
3412 + "reqwest 0.13.2",
3413 + "schemars 1.2.1",
3414 + "serde",
3415 + "serde_json",
3416 + "thiserror 2.0.18",
3417 + "tokio",
3418 + "tracing",
3419 + "tracing-subscriber",
3420 + "walkdir",
3421 +]
3422 +
3423 +[[package]]
3424 +name = "onde-mistralrs-audio"
3425 +version = "0.8.2"
3426 +source = "registry+https://github.com/rust-lang/crates.io-index"
3427 +checksum = "ed88aa277c613327f393ff5816fed55609a7a93b87ace505d70a6b3438b12dd2"
3428 +dependencies = [
3429 + "anyhow",
3430 + "apodize",
3431 + "hound",
3432 + "symphonia",
3433 +]
3434 +
3435 +[[package]]
3436 +name = "onde-mistralrs-core"
3437 +version = "0.8.2"
3438 +source = "registry+https://github.com/rust-lang/crates.io-index"
3439 +checksum = "7872456b7db2d8aaf39da83269dbf77e2503d6d398010f3b9a17eebec3da8dee"
3440 +dependencies = [
3441 + "ahash",
3442 + "akin",
3443 + "anyhow",
3444 + "apodize",
3445 + "as-any",
3446 + "async-trait",
3447 + "base64 0.22.1",
3448 + "bm25",
3449 + "bytemuck",
3450 + "bytemuck_derive",
3451 + "candle-core",
3452 + "candle-metal-kernels",
3453 + "candle-nn",
3454 + "cfgrammar",
3455 + "chrono",
3456 + "clap 4.6.1",
3457 + "csv",
3458 + "derive-new",
3459 + "derive_more",
3460 + "dirs",
3461 + "either",
3462 + "float8",
3463 + "futures",
3464 + "galil-seiferas",
3465 + "half",
3466 + "hashbrown 0.16.1",
3467 + "hf-hub",
3468 + "hound",
3469 + "html2text",
3470 + "http",
3471 + "image",
3472 + "indexmap 2.14.0",
3473 + "indicatif 0.18.4",
3474 + "interprocess",
3475 + "itertools 0.14.0",
3476 + "libc",
3477 + "llguidance",
3478 + "lrtable",
3479 + "minijinja",
3480 + "minijinja-contrib",
3481 + "num-traits",
3482 + "objc",
3483 + "objc2-metal",
3484 + "onde-mistralrs-audio",
3485 + "onde-mistralrs-mcp",
3486 + "onde-mistralrs-paged-attn",
3487 + "onde-mistralrs-quant",
3488 + "onde-mistralrs-vision",
3489 + "onde-openai-harmony",
3490 + "onde-tqdm",
3491 + "ordered-float",
3492 + "parking_lot",
3493 + "radix_trie",
3494 + "rand 0.9.4",
3495 + "rand_distr 0.5.1",
3496 + "rand_isaac",
3497 + "rayon",
3498 + "regex",
3499 + "regex-automata",
3500 + "reqwest 0.13.2",
3501 + "rubato",
3502 + "rust-mcp-schema",
3503 + "rustc-hash 2.1.2",
3504 + "rustfft",
3505 + "safetensors 0.7.0",
3506 + "schemars 1.2.1",
3507 + "scraper",
3508 + "serde",
3509 + "serde-big-array",
3510 + "serde-saphyr",
3511 + "serde_json",
3512 + "serde_plain",
3513 + "statrs",
3514 + "strum 0.27.2",
3515 + "symphonia",
3516 + "sysinfo",
3517 + "thiserror 2.0.18",
3518 + "tokenizers 0.21.4",
3519 + "tokio",
3520 + "tokio-rayon",
3521 + "tokio-tungstenite",
3522 + "toktrie",
3523 + "toktrie_hf_tokenizers",
3524 + "toml",
3525 + "tracing",
3526 + "tracing-subscriber",
3527 + "urlencoding",
3528 + "uuid 1.23.1",
3529 + "variantly",
3530 + "vob",
3531 +]
3532 +
3533 +[[package]]
3534 +name = "onde-mistralrs-macros"
3535 +version = "0.8.2"
3536 source = "registry+https://github.com/rust-lang/crates.io-index"
3719 -checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1"
3537 +checksum = "ed7a88fcf59377469c00a355065f3ad9723e00c1870c8b3717b0649f86c77bde"
3538 dependencies = [
3721 - "malloc_buf",
3539 + "darling 0.23.0",
3540 + "proc-macro2",
3541 + "quote",
3542 + "syn 2.0.117",
3543 ]
3544
3545 [[package]]
3725 -name = "objc2"
3726 -version = "0.6.4"
3546 +name = "onde-mistralrs-mcp"
3547 +version = "0.8.2"
3548 source = "registry+https://github.com/rust-lang/crates.io-index"
3728 -checksum = "3a12a8ed07aefc768292f076dc3ac8c48f3781c8f2d5851dd3d98950e8c5a89f"
3549 +checksum = "f708829672943371b2a14cceaa8c09182d11c9049ec6d3a9c303a74ae65dfc1f"
3550 dependencies = [
3730 - "objc2-encode",
3551 + "anyhow",
3552 + "async-trait",
3553 + "futures-util",
3554 + "http",
3555 + "reqwest 0.13.2",
3556 + "rust-mcp-schema",
3557 + "serde",
3558 + "serde_json",
3559 + "tokio",
3560 + "tokio-tungstenite",
3561 + "tracing",
3562 + "utoipa",
3563 + "uuid 1.23.1",
3564 ]
3565
3566 [[package]]
3734 -name = "objc2-core-foundation"
3735 -version = "0.3.2"
3567 +name = "onde-mistralrs-paged-attn"
3568 +version = "0.8.2"
3569 source = "registry+https://github.com/rust-lang/crates.io-index"
3737 -checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536"
3570 +checksum = "bdd14bcbee553325d640609504117a2a49db166417bd7883329c6d39971b28c2"
3571 dependencies = [
3739 - "bitflags 2.11.1",
3572 + "anyhow",
3573 + "candle-core",
3574 + "candle-metal-kernels",
3575 "dispatch2",
3741 - "objc2",
3576 + "float8",
3577 + "half",
3578 + "objc2-foundation",
3579 + "objc2-metal",
3580 + "thiserror 2.0.18",
3581 ]
3582
3583 [[package]]
3745 -name = "objc2-encode"
3746 -version = "4.1.0"
3747 -source = "registry+https://github.com/rust-lang/crates.io-index"
3748 -checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33"
3749 -
3750 -[[package]]
3751 -name = "objc2-foundation"
3752 -version = "0.3.2"
3584 +name = "onde-mistralrs-quant"
3585 +version = "0.8.2"
3586 source = "registry+https://github.com/rust-lang/crates.io-index"
3754 -checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272"
3587 +checksum = "36928bb1eec1138ca7b36ee1f4d370e4e374f0874f378915ff0ff34f927c4daf"
3588 dependencies = [
3756 - "bitflags 2.11.1",
3757 - "block2",
3758 - "libc",
3759 - "objc2",
3760 - "objc2-core-foundation",
3589 + "byteorder",
3590 + "candle-core",
3591 + "candle-metal-kernels",
3592 + "candle-nn",
3593 + "dispatch2",
3594 + "float8",
3595 + "half",
3596 + "hf-hub",
3597 + "lazy_static",
3598 + "memmap2",
3599 + "objc2-foundation",
3600 + "objc2-metal",
3601 + "paste",
3602 + "rayon",
3603 + "regex",
3604 + "safetensors 0.7.0",
3605 + "serde",
3606 + "serde_json",
3607 + "thiserror 2.0.18",
3608 + "tokio",
3609 + "tracing",
3610 + "yoke 0.8.2",
3611 ]
3612
3613 [[package]]
3764 -name = "objc2-io-kit"
3765 -version = "0.3.2"
3614 +name = "onde-mistralrs-vision"
3615 +version = "0.8.2"
3616 source = "registry+https://github.com/rust-lang/crates.io-index"
3767 -checksum = "33fafba39597d6dc1fb709123dfa8289d39406734be322956a69f0931c73bb15"
3617 +checksum = "2670a611890bfddc7964902f253626cd2b3fd0b7df13f84a779180f35e2a79e9"
3618 dependencies = [
3769 - "libc",
3770 - "objc2-core-foundation",
3619 + "candle-core",
3620 + "image",
3621 + "rayon",
3622 ]
3623
3624 [[package]]
3774 -name = "objc2-metal"
3775 -version = "0.3.2"
3625 +name = "onde-openai-harmony"
3626 +version = "0.0.9"
3627 source = "registry+https://github.com/rust-lang/crates.io-index"
3777 -checksum = "a0125f776a10d00af4152d74616409f0d4a2053a6f57fa5b7d6aa2854ac04794"
3628 +checksum = "f0f73e12b7378937cb8aaf832bed02b2afa1687581f73c3298c5af0cca9df5e6"
3629 dependencies = [
3779 - "bitflags 2.11.1",
3780 - "block2",
3781 - "dispatch2",
3782 - "objc2",
3783 - "objc2-core-foundation",
3784 - "objc2-foundation",
3630 + "anyhow",
3631 + "base64 0.22.1",
3632 + "bstr",
3633 + "clap 4.6.1",
3634 + "fancy-regex 0.13.0",
3635 + "futures",
3636 + "regex",
3637 + "reqwest 0.12.28",
3638 + "rustc-hash 1.1.0",
3639 + "serde",
3640 + "serde_json",
3641 + "serde_with",
3642 + "sha1",
3643 + "sha2",
3644 + "thiserror 2.0.18",
3645 ]
3646
3647 [[package]]
3788 -name = "once_cell"
3789 -version = "1.21.4"
3790 -source = "registry+https://github.com/rust-lang/crates.io-index"
3791 -checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
3792 -
3793 -[[package]]
3794 -name = "once_cell_polyfill"
3795 -version = "1.70.2"
3648 +name = "onde-tqdm"
3649 +version = "0.8.2"
3650 source = "registry+https://github.com/rust-lang/crates.io-index"
3797 -checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
3798 -
3799 -[[package]]
3800 -name = "onde"
3801 -version = "0.1.8"
3802 -source = "git+https://github.com/ondeinference/onde?branch=development#dfcc6ecfa74ac965af6c33ba0bd06d9cf241fc12"
3651 +checksum = "2d96f4fcb4af06959bf9c9b81ace0502e2be2d11d7e037c94f3f7851bde720ea"
3652 dependencies = [
3653 "anyhow",
3805 - "cc",
3806 - "dotenvy",
3807 - "hf-hub",
3808 - "home",
3809 - "log",
3810 - "mistralrs",
3811 - "mistralrs-core",
3812 - "reqwest 0.12.28",
3813 - "serde",
3814 - "serde_json",
3815 - "smbcloud-gresiq-sdk",
3816 - "thiserror 2.0.18",
3817 - "tokio",
3818 - "tsync",
3819 - "uniffi",
3654 + "crossterm 0.29.0",
3655 + "once_cell",
3656 ]
3657
3658 [[package]]
@@ -3841,30 +3677,6 @@ dependencies = [
3677 "pkg-config",
3678 ]
3679
3844 -[[package]]
3845 -name = "openai-harmony"
3846 -version = "0.0.8"
3847 -source = "registry+https://github.com/rust-lang/crates.io-index"
3848 -checksum = "e77e82af451fc95deeb728a40b84db8ee82d341e136c268de415123a560b9b72"
3849 -dependencies = [
3850 - "anyhow",
3851 - "base64 0.22.1",
3852 - "bstr",
3853 - "clap 4.6.1",
3854 - "fancy-regex 0.13.0",
3855 - "futures",
3856 - "image",
3857 - "regex",
3858 - "reqwest 0.12.28",
3859 - "rustc-hash 1.1.0",
3860 - "serde",
3861 - "serde_json",
3862 - "serde_with",
3863 - "sha1",
3864 - "sha2",
3865 - "thiserror 2.0.18",
3866 -]
3867 -
3680 [[package]]
3681 name = "openssl-probe"
3682 version = "0.2.1"
@@ -3930,12 +3742,6 @@ version = "1.0.15"
3742 source = "registry+https://github.com/rust-lang/crates.io-index"
3743 checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
3744
3933 -[[package]]
3934 -name = "pastey"
3935 -version = "0.1.1"
3936 -source = "registry+https://github.com/rust-lang/crates.io-index"
3937 -checksum = "35fb2e5f958ec131621fdd531e9fc186ed768cbe395337403ae56c17a74c68ec"
3938 -
3745 [[package]]
3746 name = "percent-encoding"
3747 version = "2.3.2"
@@ -4114,25 +3920,6 @@ dependencies = [
3920 "unicode-ident",
3921 ]
3922
4117 -[[package]]
4118 -name = "profiling"
4119 -version = "1.0.17"
4120 -source = "registry+https://github.com/rust-lang/crates.io-index"
4121 -checksum = "3eb8486b569e12e2c32ad3e204dbaba5e4b5b216e9367044f25f1dba42341773"
4122 -dependencies = [
4123 - "profiling-procmacros",
4124 -]
4125 -
4126 -[[package]]
4127 -name = "profiling-procmacros"
4128 -version = "1.0.17"
4129 -source = "registry+https://github.com/rust-lang/crates.io-index"
4130 -checksum = "52717f9a02b6965224f95ca2a81e2e0c5c43baacd28ca057577988930b6c3d5b"
4131 -dependencies = [
4132 - "quote",
4133 - "syn 2.0.117",
4134 -]
4135 -
3923 [[package]]
3924 name = "pulp"
3925 version = "0.21.5"
@@ -4387,56 +4174,6 @@ dependencies = [
4174 "unicode-width 0.2.0",
4175 ]
4176
4390 -[[package]]
4391 -name = "rav1e"
4392 -version = "0.8.1"
4393 -source = "registry+https://github.com/rust-lang/crates.io-index"
4394 -checksum = "43b6dd56e85d9483277cde964fd1bdb0428de4fec5ebba7540995639a21cb32b"
4395 -dependencies = [
4396 - "aligned-vec",
4397 - "arbitrary",
4398 - "arg_enum_proc_macro",
4399 - "arrayvec",
4400 - "av-scenechange",
4401 - "av1-grain",
4402 - "bitstream-io",
4403 - "built",
4404 - "cfg-if",
4405 - "interpolate_name",
4406 - "itertools 0.14.0",
4407 - "libc",
4408 - "libfuzzer-sys",
4409 - "log",
4410 - "maybe-rayon",
4411 - "new_debug_unreachable",
4412 - "noop_proc_macro",
4413 - "num-derive",
4414 - "num-traits",
4415 - "paste",
4416 - "profiling",
4417 - "rand 0.9.4",
4418 - "rand_chacha 0.9.0",
4419 - "simd_helpers",
4420 - "thiserror 2.0.18",
4421 - "v_frame",
4422 - "wasm-bindgen",
4423 -]
4424 -
4425 -[[package]]
4426 -name = "ravif"
4427 -version = "0.13.0"
4428 -source = "registry+https://github.com/rust-lang/crates.io-index"
4429 -checksum = "e52310197d971b0f5be7fe6b57530dcd27beb35c1b013f29d66c1ad73fbbcc45"
4430 -dependencies = [
4431 - "avif-serialize",
4432 - "imgref",
4433 - "loop9",
4434 - "quick-error",
4435 - "rav1e",
4436 - "rayon",
4437 - "rgb",
4438 -]
4439 -
4177 [[package]]
4178 name = "raw-cpuid"
4179 version = "11.6.0"
@@ -4664,12 +4401,6 @@ dependencies = [
4401 "web-sys",
4402 ]
4403
4667 -[[package]]
4668 -name = "rgb"
4669 -version = "0.8.53"
4670 -source = "registry+https://github.com/rust-lang/crates.io-index"
4671 -checksum = "47b34b781b31e5d73e9fbc8689c70551fd1ade9a19e3e28cfec8580a79290cc4"
4672 -
4404 [[package]]
4405 name = "ring"
4406 version = "0.17.14"
@@ -5341,15 +5072,6 @@ version = "0.3.9"
5072 source = "registry+https://github.com/rust-lang/crates.io-index"
5073 checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214"
5074
5344 -[[package]]
5345 -name = "simd_helpers"
5346 -version = "0.1.0"
5347 -source = "registry+https://github.com/rust-lang/crates.io-index"
5348 -checksum = "95890f873bec569a0362c235787f3aca6e1e887302ba4840839bcc6459c42da6"
5349 -dependencies = [
5350 - "quote",
5351 -]
5352 -
5075 [[package]]
5076 name = "siphasher"
5077 version = "1.0.2"
@@ -5479,7 +5201,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
5201 checksum = "5851699c4033c63636f7ea4cf7b7c1f1bf06d0cc03cfb42e711de5a5c46cf326"
5202 dependencies = [
5203 "base64 0.13.1",
5482 - "nom 7.1.3",
5204 + "nom",
5205 "serde",
5206 "unicode-segmentation",
5207 ]
@@ -6348,16 +6070,6 @@ version = "0.3.3"
6070 source = "registry+https://github.com/rust-lang/crates.io-index"
6071 checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3"
6072
6351 -[[package]]
6352 -name = "tqdm"
6353 -version = "0.8.0"
6354 -source = "git+https://github.com/setoelkahfi/tqdm?branch=deps%2Fbump-crossterm#41e4182829136e6dadbdd1c36af824d19219147a"
6355 -dependencies = [
6356 - "anyhow",
6357 - "crossterm 0.29.0",
6358 - "once_cell",
6359 -]
6360 -
6073 [[package]]
6074 name = "tracing"
6075 version = "0.1.44"
@@ -6832,17 +6544,6 @@ dependencies = [
6544 "wasm-bindgen",
6545 ]
6546
6835 -[[package]]
6836 -name = "v_frame"
6837 -version = "0.3.9"
6838 -source = "registry+https://github.com/rust-lang/crates.io-index"
6839 -checksum = "666b7727c8875d6ab5db9533418d7c764233ac9c0cff1d469aec8fa127597be2"
6840 -dependencies = [
6841 - "aligned-vec",
6842 - "num-traits",
6843 - "wasm-bindgen",
6844 -]
6845 -
6547 [[package]]
6548 name = "valuable"
6549 version = "0.1.1"
@@ -7107,7 +6808,7 @@ version = "5.0.0"
6808 source = "registry+https://github.com/rust-lang/crates.io-index"
6809 checksum = "998d2c24ec099a87daf9467808859f9d82b61f1d9c9701251aea037f514eae0e"
6810 dependencies = [
7110 - "nom 7.1.3",
6811 + "nom",
6812 ]
6813
6814 [[package]]
@@ -7734,12 +7435,6 @@ version = "0.6.3"
7435 source = "registry+https://github.com/rust-lang/crates.io-index"
7436 checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4"
7437
7737 -[[package]]
7738 -name = "y4m"
7739 -version = "0.8.0"
7740 -source = "registry+https://github.com/rust-lang/crates.io-index"
7741 -checksum = "7a5a4b21e1a62b67a2970e6831bc091d7b87e119e7f9791aef9702e3bef04448"
7742 -
7438 [[package]]
7439 name = "yoke"
7440 version = "0.7.5"
Cargo.toml
+1 -1
@@ -22,7 +22,7 @@ agent-client-protocol = { version = "0.10.4", features = ["unstable_session_fork
22
23 # Onde Inference engine (local LLM)
24 # onde = { path = "../onde" }
25 -onde = { version = "0.1.8", git = "https://github.com/ondeinference/onde", branch = "development" }
25 +onde = "1.0.0"
26
27 # Async runtime
28 async-trait = "0.1"
src/main.rs
+83 -25
@@ -273,6 +273,8 @@ struct SiGitAgent {
273 current_model: std::sync::Mutex<GgufModelConfig>,
274 /// flipped once the startup model finishes (success or failure)
275 model_ready: Arc<AtomicBool>,
276 + /// guards the one-time lazy startup load for ACP mode
277 + startup_model_load_started: Arc<AtomicBool>,
278 /// set if the startup load failed
279 model_load_error: Arc<std::sync::Mutex<Option<String>>>,
280 /// true when the startup model isn't cached yet
@@ -289,6 +291,7 @@ impl SiGitAgent {
291 notification_tx: mpsc::Sender<SessionNotification>,
292 initial_model: GgufModelConfig,
293 model_ready: Arc<AtomicBool>,
294 + startup_model_load_started: Arc<AtomicBool>,
295 model_load_error: Arc<std::sync::Mutex<Option<String>>>,
296 startup_needs_download: bool,
297 ) -> Self {
@@ -300,6 +303,7 @@ impl SiGitAgent {
303 session_cwd: std::sync::Mutex::new(None),
304 current_model: std::sync::Mutex::new(initial_model),
305 model_ready,
306 + startup_model_load_started,
307 model_load_error,
308 startup_needs_download,
309 startup_model_name,
@@ -307,6 +311,66 @@ impl SiGitAgent {
311 }
312 }
313
314 + fn start_startup_model_load_if_needed(&self) {
315 + if self
316 + .startup_model_load_started
317 + .compare_exchange(false, true, Ordering::AcqRel, Ordering::Acquire)
318 + .is_err()
319 + {
320 + return;
321 + }
322 +
323 + self.model_ready.store(false, Ordering::Release);
324 + if let Ok(mut guard) = self.model_load_error.lock() {
325 + *guard = None;
326 + }
327 +
328 + let startup_config = self.current_model.lock().unwrap().clone();
329 + let (max_tokens, tool_calling) = models::build_model_picker_items()
330 + .into_iter()
331 + .find(|item| {
332 + item.config.model_id == startup_config.model_id
333 + && item
334 + .config
335 + .files
336 + .first()
337 + .zip(startup_config.files.first())
338 + .map(|(left, right)| left == right)
339 + .unwrap_or(false)
340 + })
341 + .map(|item| (item.max_tokens, item.tool_calling))
342 + .unwrap_or((4096, false));
343 +
344 + let sampling = SamplingConfig {
345 + max_tokens: Some(max_tokens),
346 + ..SamplingConfig::default()
347 + };
348 +
349 + let loader_engine = Arc::clone(&self.engine);
350 + let loader_system_prompt = system_prompt_for_model(tool_calling).to_string();
351 + let model_ready = Arc::clone(&self.model_ready);
352 + let model_load_error = Arc::clone(&self.model_load_error);
353 +
354 + std::thread::spawn(move || {
355 + let result = tokio::runtime::Runtime::new()
356 + .map_err(|error| error.to_string())
357 + .and_then(|rt| {
358 + rt.block_on(loader_engine.load_gguf_model(
359 + startup_config,
360 + Some(loader_system_prompt),
361 + Some(sampling),
362 + ))
363 + .map(|_| ())
364 + .map_err(|error| error.to_string())
365 + });
366 +
367 + if let Ok(mut guard) = model_load_error.lock() {
368 + *guard = result.err();
369 + }
370 + model_ready.store(true, Ordering::Release);
371 + });
372 + }
373 +
374 /// block until the startup model is ready, showing progress in the session.
375 async fn await_model_ready(&self, session_id: &SessionId) -> agent_client_protocol::Result<()> {
376 if self.model_ready.load(Ordering::Acquire) {
@@ -544,6 +608,13 @@ impl SiGitAgent {
608 agent_client_protocol::Error::new(-32603, format!("model switch failed: {error}"))
609 })?;
610
611 + self.startup_model_load_started
612 + .store(true, Ordering::Release);
613 + self.model_ready.store(true, Ordering::Release);
614 + if let Ok(mut guard) = self.model_load_error.lock() {
615 + *guard = None;
616 + }
617 +
618 if let Some(item) = models::build_model_picker_items()
619 .iter()
620 .find(|item| item.config.model_id == new_config.model_id)
@@ -1193,7 +1264,9 @@ impl Agent for SiGitAgent {
1264 user_text.chars().take(80).collect::<String>()
1265 );
1266
1196 - // wait for the startup model if it's still loading/downloading
1267 + // load the default ACP model lazily so initialize/session/new stay clean
1268 + // for registry validation and editor startup.
1269 + self.start_startup_model_load_if_needed();
1270 self.await_model_ready(&session_id).await?;
1271
1272 // ── tool-calling loop ────────────────────────────────────────────
@@ -1318,7 +1391,9 @@ impl Agent for SiGitAgent {
1391
1392 // can't switch while the startup model is still loading — the old
1393 // weights are in GPU memory and the new load gets "does not fit"
1321 - if !self.model_ready.load(Ordering::Acquire) {
1394 + if self.startup_model_load_started.load(Ordering::Acquire)
1395 + && !self.model_ready.load(Ordering::Acquire)
1396 + {
1397 log::info!("set_session_config_option: waiting for startup model to finish loading");
1398 while !self.model_ready.load(Ordering::Acquire) {
1399 tokio::time::sleep(std::time::Duration::from_millis(200)).await;
@@ -1676,23 +1751,6 @@ fn init_logging(is_tty: bool) {
1751 .try_init();
1752 }
1753
1679 -#[cfg(unix)]
1680 -fn redirect_stdout_to_stderr() -> anyhow::Result<()> {
1681 - let stderr_dup = unsafe { libc::dup(libc::STDERR_FILENO) };
1682 - anyhow::ensure!(
1683 - stderr_dup >= 0,
1684 - "dup(stderr) failed: {}",
1685 - std::io::Error::last_os_error()
1686 - );
1687 -
1688 - unsafe {
1689 - libc::dup2(stderr_dup, libc::STDOUT_FILENO);
1690 - libc::close(stderr_dup);
1691 - }
1692 -
1693 - Ok(())
1694 -}
1695 -
1754 // ── Interactive TUI mode ──────────────────────────────────────────────────────
1755
1756 /// boot the TUI and load the model on a background thread.
@@ -1822,9 +1880,10 @@ async fn run_acp_server() -> anyhow::Result<()> {
1880
1881 let engine = Arc::new(ChatEngine::new());
1882
1825 - // Delay model loading until after initialize/auth so ACP stdout stays clean
1826 - // even if model libraries emit startup diagnostics.
1883 + // Delay model loading until the first real prompt so initialize/session/new
1884 + // stay lightweight and registry auth checks don't trip over model startup.
1885 let model_ready = Arc::new(AtomicBool::new(true));
1886 + let startup_model_load_started = Arc::new(AtomicBool::new(false));
1887 let model_load_error: Arc<std::sync::Mutex<Option<String>>> =
1888 Arc::new(std::sync::Mutex::new(None));
1889
@@ -1834,6 +1893,7 @@ async fn run_acp_server() -> anyhow::Result<()> {
1893 notification_tx,
1894 config,
1895 model_ready,
1896 + startup_model_load_started,
1897 model_load_error,
1898 needs_download,
1899 );
@@ -1894,10 +1954,8 @@ async fn main() -> anyhow::Result<()> {
1954 anyhow::bail!("interactive mode requires Unix (macOS / Linux)");
1955 }
1956 } else {
1897 - // ACP mode: stdout must contain only ACP JSON messages.
1898 - #[cfg(unix)]
1899 - redirect_stdout_to_stderr()?;
1900 -
1957 + // ACP mode: keep stdout untouched for protocol JSON only.
1958 + // Logs already go to stderr via `init_logging(false)`.
1959 init_logging(false);
1960 setup::setup_shared_model_cache();
1961 log::info!("siGit v{} starting (ACP mode)", env!("CARGO_PKG_VERSION"));