diff --git a/Cargo.lock b/Cargo.lock index 8014cbae0776..886368e9e5c5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -65,6 +65,24 @@ dependencies = [ "memchr", ] +[[package]] +name = "aligned" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee4508988c62edf04abd8d92897fca0c2995d907ce1dfeaf369dac3716a40685" +dependencies = [ + "as-slice", +] + +[[package]] +name = "aligned-vec" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc890384c8602f339876ded803c97ad529f3842aba97f6392b3dba0dd171769b" +dependencies = [ + "equator", +] + [[package]] name = "alloc-no-stdlib" version = "2.0.4" @@ -209,7 +227,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0348a1c054491f4bfe6ab86a7b6ab1e44e45d899005de92f58b3df180b36ddaf" dependencies = [ "clipboard-win", - "image 0.25.10", + "image", "log", "objc2", "objc2-app-kit", @@ -231,6 +249,17 @@ dependencies = [ "rustversion", ] +[[package]] +name = "arg_enum_proc_macro" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + [[package]] name = "arraydeque" version = "0.5.1" @@ -249,6 +278,15 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" +[[package]] +name = "as-slice" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "516b6b4f0e40d50dcda9365d53964ec74560ad4284da2e7fc97122cd83174516" +dependencies = [ + "stable_deref_trait", +] + [[package]] name = "ascii" version = "1.1.0" @@ -348,6 +386,49 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" +[[package]] +name = "av-scenechange" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f321d77c20e19b92c39e7471cf986812cbb46659d2af674adc4331ef3f18394" +dependencies = [ + "aligned", + "anyhow", + "arg_enum_proc_macro", + "arrayvec", + "log", + "num-rational", + "num-traits", + "pastey 0.1.1", + "rayon", + "thiserror 2.0.18", + "v_frame", + "y4m", +] + +[[package]] +name = "av1-grain" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cfddb07216410377231960af4fcab838eaa12e013417781b78bd95ee22077f8" +dependencies = [ + "anyhow", + "arrayvec", + "log", + "nom 8.0.0", + "num-rational", + "v_frame", +] + +[[package]] +name = "avif-serialize" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "375082f007bd67184fb9c0374614b29f9aaa604ec301635f72338bb65386a53d" +dependencies = [ + "arrayvec", +] + [[package]] name = "aws-config" version = "1.8.12" @@ -1325,6 +1406,15 @@ dependencies = [ "serde_core", ] +[[package]] +name = "bitstream-io" +version = "4.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60d4bd9d1db2c6bdf285e223a7fa369d5ce98ec767dec949c6ca62863ce61757" +dependencies = [ + "core2", +] + [[package]] name = "bitvec" version = "1.0.1" @@ -1458,6 +1548,12 @@ dependencies = [ "serde", ] +[[package]] +name = "built" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4ad8f11f288f48ca24471bbd51ac257aaeaaa07adae295591266b792902ae64" + [[package]] name = "bumpalo" version = "3.20.2" @@ -1879,11 +1975,11 @@ dependencies = [ [[package]] name = "cliclack" -version = "0.3.8" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa510b739c618c679375ea9c5af44ce9f591289546e874ad5910e7ce7df79844" +checksum = "e00298c57c88d24e4491d4f2153c9afd91076865ab38f274a709d5c5f7e112aa" dependencies = [ - "console 0.15.11", + "console 0.16.3", "indicatif", "once_cell", "strsim", @@ -2062,7 +2158,6 @@ dependencies = [ "encode_unicode", "libc", "once_cell", - "unicode-width 0.2.2", "windows-sys 0.59.0", ] @@ -2209,6 +2304,15 @@ dependencies = [ "libc", ] +[[package]] +name = "core2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505" +dependencies = [ + "memchr", +] + [[package]] name = "core_maths" version = "0.1.1" @@ -3104,34 +3208,13 @@ dependencies = [ "syn 2.0.117", ] -[[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 0.5.0", -] - -[[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", + "dirs-sys", ] [[package]] @@ -3142,7 +3225,7 @@ checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" dependencies = [ "libc", "option-ext", - "redox_users 0.5.2", + "redox_users", "windows-sys 0.61.2", ] @@ -3204,7 +3287,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70395eb132dcc1761533e62c54878a9deb2b637863ecb52e9c5f66148616398e" dependencies = [ "base64 0.22.1", - "image 0.25.10", + "image", "serde", "serde_json", "thiserror 2.0.18", @@ -3428,6 +3511,26 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bcb71a32ab9582e2756554e84b24aee90d7187034049c35921ec3296b70c13ad" +[[package]] +name = "equator" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4711b213838dfee0117e3be6ac926007d7f433d7bbe33595975d4190cb07e6fc" +dependencies = [ + "equator-macro", +] + +[[package]] +name = "equator-macro" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44f23cf4b44bfce11a86ace86f8a73ffdec849c9fd00a386a53d278bd9e81fb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + [[package]] name = "equivalent" version = "1.0.2" @@ -4279,16 +4382,6 @@ dependencies = [ "wasip3", ] -[[package]] -name = "gif" -version = "0.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae047235e33e2829703574b54fdec96bfbad892062d97fed2f76022287de61b" -dependencies = [ - "color_quant", - "weezl", -] - [[package]] name = "gif" version = "0.14.1" @@ -4350,7 +4443,7 @@ dependencies = [ "clap", "ctor", "dashmap 6.1.0", - "dirs 5.0.1", + "dirs", "dotenvy", "encoding_rs", "env-lock", @@ -4381,13 +4474,13 @@ dependencies = [ "opentelemetry-otlp", "opentelemetry-stdout", "opentelemetry_sdk", - "pastey", + "pastey 0.2.1", "pctx_code_mode", "pem", "pkcs1", "pkcs8", "pulldown-cmark", - "rand 0.8.5", + "rand 0.10.0", "rayon", "regex", "reqwest 0.13.2", @@ -4410,7 +4503,7 @@ dependencies = [ "sys-info", "tempfile", "test-case", - "thiserror 1.0.69", + "thiserror 2.0.18", "tiktoken-rs", "tokenizers", "tokio", @@ -4434,7 +4527,7 @@ dependencies = [ "unicode-normalization", "url", "urlencoding", - "utoipa 4.2.3", + "utoipa", "uuid", "v_htmlescape", "webbrowser", @@ -4514,7 +4607,7 @@ dependencies = [ "goose-mcp", "indicatif", "open", - "rand 0.8.5", + "rand 0.10.0", "regex", "reqwest 0.13.2", "rmcp", @@ -4550,7 +4643,7 @@ dependencies = [ "chrono", "docx-rs", "etcetera 0.11.0", - "image 0.24.9", + "image", "include_dir", "indoc", "lopdf", @@ -4590,7 +4683,7 @@ dependencies = [ "hex", "http 1.4.0", "openssl", - "rand 0.8.5", + "rand 0.10.0", "rcgen", "reqwest 0.13.2", "rmcp", @@ -4601,7 +4694,7 @@ dependencies = [ "serde_yaml", "socket2", "subtle", - "thiserror 1.0.69", + "thiserror 2.0.18", "tokio", "tokio-stream", "tokio-tungstenite", @@ -4612,7 +4705,7 @@ dependencies = [ "tracing-appender", "tracing-subscriber", "url", - "utoipa 4.2.3", + "utoipa", "uuid", "winreg", ] @@ -5233,38 +5326,36 @@ dependencies = [ [[package]] name = "image" -version = "0.24.9" +version = "0.25.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5690139d2f55868e080017335e4b94cb7414274c74f1669c84fb5feba2c9f69d" +checksum = "85ab80394333c02fe689eaf900ab500fbd0c2213da414687ebf995a65d5a6104" dependencies = [ "bytemuck", - "byteorder", + "byteorder-lite", "color_quant", "exr", - "gif 0.13.3", - "jpeg-decoder", + "gif", + "image-webp", + "moxcms", "num-traits", - "png 0.17.16", + "png", "qoi", - "tiff 0.9.1", + "ravif", + "rayon", + "rgb", + "tiff", + "zune-core", + "zune-jpeg", ] [[package]] -name = "image" -version = "0.25.10" +name = "image-webp" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85ab80394333c02fe689eaf900ab500fbd0c2213da414687ebf995a65d5a6104" +checksum = "525e9ff3e1a4be2fbea1fdf0e98686a6d98b4d8f937e1bf7402245af1909e8c3" dependencies = [ - "bytemuck", "byteorder-lite", - "color_quant", - "gif 0.14.1", - "moxcms", - "num-traits", - "png 0.18.1", - "tiff 0.11.3", - "zune-core", - "zune-jpeg", + "quick-error", ] [[package]] @@ -5273,6 +5364,12 @@ version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09e54e57b4c48b40f7aec75635392b12b3421fa26fe8b4332e63138ed278459c" +[[package]] +name = "imgref" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c5cedc30da3a610cac6b4ba17597bdf7152cf974e8aab3afb3d54455e371c8" + [[package]] name = "import_map" version = "0.24.0" @@ -5376,6 +5473,17 @@ dependencies = [ "tempfile", ] +[[package]] +name = "interpolate_name" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + [[package]] name = "ipnet" version = "2.12.0" @@ -5584,15 +5692,6 @@ dependencies = [ "libc", ] -[[package]] -name = "jpeg-decoder" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00810f1d8b74be64b13dbf3db89ac67740615d6c891f0e7b6179326533011a07" -dependencies = [ - "rayon", -] - [[package]] name = "js-sys" version = "0.3.91" @@ -5761,6 +5860,16 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "libfuzzer-sys" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f12a681b7dd8ce12bff52488013ba614b869148d54dd79836ab85aafdd53f08d" +dependencies = [ + "arbitrary", + "cc", +] + [[package]] name = "libloading" version = "0.8.9" @@ -5887,6 +5996,15 @@ version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" +[[package]] +name = "loop9" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fae87c125b03c1d2c0150c90365d7d6bcc53fb73a9acaef207d2d065860f062" +dependencies = [ + "imgref", +] + [[package]] name = "lopdf" version = "0.36.0" @@ -5972,6 +6090,16 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" +[[package]] +name = "maybe-rayon" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519" +dependencies = [ + "cfg-if", + "rayon", +] + [[package]] name = "md-5" version = "0.10.6" @@ -6277,6 +6405,12 @@ dependencies = [ "nom 8.0.0", ] +[[package]] +name = "noop_proc_macro" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8" + [[package]] name = "nu-ansi-term" version = "0.50.3" @@ -6835,6 +6969,12 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +[[package]] +name = "pastey" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35fb2e5f958ec131621fdd531e9fc186ed768cbe395337403ae56c17a74c68ec" + [[package]] name = "pastey" version = "0.2.1" @@ -6899,7 +7039,7 @@ dependencies = [ "thiserror 2.0.18", "tokio", "tracing", - "utoipa 5.4.0", + "utoipa", ] [[package]] @@ -7203,19 +7343,6 @@ dependencies = [ "time", ] -[[package]] -name = "png" -version = "0.17.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526" -dependencies = [ - "bitflags 1.3.2", - "crc32fast", - "fdeflate", - "flate2", - "miniz_oxide", -] - [[package]] name = "png" version = "0.18.1" @@ -7343,7 +7470,6 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", - "syn 1.0.109", "version_check", ] @@ -7381,6 +7507,25 @@ dependencies = [ "windows 0.62.2", ] +[[package]] +name = "profiling" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3eb8486b569e12e2c32ad3e204dbaba5e4b5b216e9367044f25f1dba42341773" +dependencies = [ + "profiling-procmacros", +] + +[[package]] +name = "profiling-procmacros" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52717f9a02b6965224f95ca2a81e2e0c5c43baacd28ca057577988930b6c3d5b" +dependencies = [ + "quote", + "syn 2.0.117", +] + [[package]] name = "prost" version = "0.14.3" @@ -7720,6 +7865,56 @@ version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "973443cf09a9c8656b574a866ab68dfa19f0867d0340648c7d2f6a71b8a8ea68" +[[package]] +name = "rav1e" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43b6dd56e85d9483277cde964fd1bdb0428de4fec5ebba7540995639a21cb32b" +dependencies = [ + "aligned-vec", + "arbitrary", + "arg_enum_proc_macro", + "arrayvec", + "av-scenechange", + "av1-grain", + "bitstream-io", + "built", + "cfg-if", + "interpolate_name", + "itertools 0.14.0", + "libc", + "libfuzzer-sys", + "log", + "maybe-rayon", + "new_debug_unreachable", + "noop_proc_macro", + "num-derive", + "num-traits", + "paste", + "profiling", + "rand 0.9.2", + "rand_chacha 0.9.0", + "simd_helpers", + "thiserror 2.0.18", + "v_frame", + "wasm-bindgen", +] + +[[package]] +name = "ravif" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e52310197d971b0f5be7fe6b57530dcd27beb35c1b013f29d66c1ad73fbbcc45" +dependencies = [ + "avif-serialize", + "imgref", + "loop9", + "quick-error", + "rav1e", + "rayon", + "rgb", +] + [[package]] name = "raw-cpuid" version = "11.6.0" @@ -7806,17 +8001,6 @@ dependencies = [ "bitflags 2.11.0", ] -[[package]] -name = "redox_users" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" -dependencies = [ - "getrandom 0.2.17", - "libredox", - "thiserror 1.0.69", -] - [[package]] name = "redox_users" version = "0.5.2" @@ -8049,7 +8233,7 @@ dependencies = [ "http-body 1.0.1", "http-body-util", "oauth2", - "pastey", + "pastey 0.2.1", "pin-project-lite", "process-wrap", "rand 0.10.0", @@ -8788,7 +8972,7 @@ version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32824fab5e16e6c4d86dc1ba84489390419a39f97699852b66480bb87d297ed8" dependencies = [ - "dirs 6.0.0", + "dirs", ] [[package]] @@ -8993,6 +9177,15 @@ dependencies = [ "simdutf8", ] +[[package]] +name = "simd_helpers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95890f873bec569a0362c235787f3aca6e1e887302ba4840839bcc6459c42da6" +dependencies = [ + "quote", +] + [[package]] name = "simdutf8" version = "0.1.5" @@ -10402,17 +10595,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "tiff" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba1310fcea54c6a9a4fd1aad794ecc02c31682f6bfbecdf460bf19533eed1e3e" -dependencies = [ - "flate2", - "jpeg-decoder", - "weezl", -] - [[package]] name = "tiff" version = "0.11.3" @@ -10429,16 +10611,15 @@ dependencies = [ [[package]] name = "tiktoken-rs" -version = "0.6.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44075987ee2486402f0808505dd65692163d243a337fc54363d49afac41087f6" +checksum = "3a19830747d9034cd9da43a60eaa8e552dfda7712424aebf187b7a60126bae0d" dependencies = [ "anyhow", - "base64 0.21.7", + "base64 0.22.1", "bstr", "fancy-regex 0.13.0", "lazy_static", - "parking_lot", "regex", "rustc-hash 1.1.0", ] @@ -11389,18 +11570,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" -[[package]] -name = "utoipa" -version = "4.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5afb1a60e207dca502682537fefcfd9921e71d0b83e9576060f09abc6efab23" -dependencies = [ - "indexmap 2.13.0", - "serde", - "serde_json", - "utoipa-gen 4.3.1", -] - [[package]] name = "utoipa" version = "5.4.0" @@ -11410,20 +11579,7 @@ dependencies = [ "indexmap 2.13.0", "serde", "serde_json", - "utoipa-gen 5.4.0", -] - -[[package]] -name = "utoipa-gen" -version = "4.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20c24e8ab68ff9ee746aad22d39b5535601e6416d1b0feeabf78be986a5c4392" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "regex", - "syn 2.0.117", + "utoipa-gen", ] [[package]] @@ -11434,6 +11590,7 @@ checksum = "6d79d08d92ab8af4c5e8a6da20c47ae3f61a0f1dabc1997cdf2d082b757ca08b" dependencies = [ "proc-macro2", "quote", + "regex", "syn 2.0.117", ] @@ -11483,6 +11640,17 @@ dependencies = [ "which 6.0.3", ] +[[package]] +name = "v_frame" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "666b7727c8875d6ab5db9533418d7c764233ac9c0cff1d469aec8fa127597be2" +dependencies = [ + "aligned-vec", + "num-traits", + "wasm-bindgen", +] + [[package]] name = "v_htmlescape" version = "0.15.8" @@ -12507,6 +12675,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7008a9d8ba97a7e47d9b2df63fcdb8dade303010c5a7cd5bf2469d4da6eba673" +[[package]] +name = "y4m" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5a4b21e1a62b67a2970e6831bc091d7b87e119e7f9791aef9702e3bef04448" + [[package]] name = "yaml-rust2" version = "0.10.4" diff --git a/Cargo.toml b/Cargo.toml index 697cd514950f..9d2d2f446ee6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,7 +31,7 @@ base64 = "0.22.1" bytes = "1" chrono = { version = "0.4", features = ["serde"] } clap = { version = "4", features = ["derive"] } -dirs = "5.0" +dirs = "6.0" dotenvy = "0.15" env-lock = "1.0.1" etcetera = "0.11.0" @@ -43,7 +43,7 @@ include_dir = "0.7.4" indoc = "2.0" lru = "0.16" once_cell = "1.20" -rand = "0.8" +rand = "0.10" regex = "1.12" reqwest = { version = "0.13", default-features = false, features = ["multipart", "form"] } schemars = { default-features = false, version = "1.0" } @@ -53,7 +53,7 @@ serde_yaml = "0.9" shellexpand = "3.1" strum = { version = "0.27", features = ["derive"] } tempfile = "3" -thiserror = "1.0" +thiserror = "2.0" tokio = { version = "1.49", features = ["full"] } tokio-stream = "0.1" tokio-util = "0.7" @@ -62,13 +62,13 @@ tracing = "0.1" tracing-appender = "0.2" tracing-subscriber = "0.3" urlencoding = "2.1" -utoipa = "4.1" +utoipa = "5" uuid = { version = "1.11", features = ["v4"] } webbrowser = "1.0" which = "8.0.0" winapi = { version = "0.3", features = ["wincred"] } wiremock = "0.6" -zip = { version = "^8.0", default-features = false, features = ["deflate"] } +zip = { version = "8", default-features = false, features = ["deflate"] } serial_test = "3.2.0" sha2 = "0.10" shell-words = "1.1.1" diff --git a/crates/goose-cli/Cargo.toml b/crates/goose-cli/Cargo.toml index 42d894fd3d49..ed005a49c1b1 100644 --- a/crates/goose-cli/Cargo.toml +++ b/crates/goose-cli/Cargo.toml @@ -25,7 +25,7 @@ goose-acp = { path = "../goose-acp", default-features = false } goose-mcp = { path = "../goose-mcp" } rmcp = { workspace = true } clap = { workspace = true } -cliclack = "0.3.5" +cliclack = "0.4.0" console = "0.16.1" dotenvy = { workspace = true } bat = { version = "0.26.1", default-features = false, features = ["regex-onig"] } @@ -48,9 +48,9 @@ shlex = "1.3.0" async-trait = { workspace = true } base64 = { workspace = true } regex = { workspace = true } -tar = "0.4.45" -reqwest = { workspace = true, features = ["blocking"], default-features = false } -zip = { workspace = true } +tar = "0.4" +reqwest = { workspace = true, features = ["blocking", "rustls"], default-features = false } +zip = { workspace = true, features = ["deflate"] } bzip2 = "0.5" webbrowser = { workspace = true } indicatif = "0.18.1" diff --git a/crates/goose-cli/src/session/thinking.rs b/crates/goose-cli/src/session/thinking.rs index 6b36c756bc0a..d4948b55c943 100644 --- a/crates/goose-cli/src/session/thinking.rs +++ b/crates/goose-cli/src/session/thinking.rs @@ -1,4 +1,4 @@ -use rand::seq::SliceRandom; +use rand::seq::IndexedRandom; /// Extended list of playful thinking messages including both goose and general AI actions const THINKING_MESSAGES: &[&str] = &[ @@ -215,6 +215,6 @@ const THINKING_MESSAGES: &[&str] = &[ /// Returns a random thinking message from the extended list pub fn get_random_thinking_message() -> &'static str { THINKING_MESSAGES - .choose(&mut rand::thread_rng()) + .choose(&mut rand::rng()) .unwrap_or(&THINKING_MESSAGES[0]) } diff --git a/crates/goose-mcp/Cargo.toml b/crates/goose-mcp/Cargo.toml index f1e5dfc9287b..44a4fcca1e2e 100644 --- a/crates/goose-mcp/Cargo.toml +++ b/crates/goose-mcp/Cargo.toml @@ -35,6 +35,6 @@ include_dir = { workspace = true } once_cell = { workspace = true } lopdf = "0.36.0" docx-rs = "0.4.7" -image = { version = "0.24.9", features = ["jpeg"] } +image = "0.25" umya-spreadsheet = "2.2.3" shell-words = { workspace = true } diff --git a/crates/goose-server/src/openapi.rs b/crates/goose-server/src/openapi.rs index 288aa9cbb1b5..aef93a60c84e 100644 --- a/crates/goose-server/src/openapi.rs +++ b/crates/goose-server/src/openapi.rs @@ -14,7 +14,7 @@ use rmcp::model::{ RawContent, RawEmbeddedResource, RawImageContent, RawResource, RawTextContent, ResourceContents, Role, TaskSupport, TextContent, Tool, ToolAnnotations, ToolExecution, }; -use utoipa::{OpenApi, ToSchema}; +use utoipa::{Modify, OpenApi, PartialSchema, ToSchema}; use goose::config::declarative_providers::{ DeclarativeProviderConfig, EnvVarConfig, LoadedProvider, ProviderEngine, @@ -29,7 +29,7 @@ use crate::routes::recipe_utils::RecipeManifest; use crate::routes::reply::MessageEvent; use utoipa::openapi::schema::{ AdditionalProperties, AnyOfBuilder, ArrayBuilder, ObjectBuilder, OneOfBuilder, Schema, - SchemaFormat, SchemaType, + SchemaFormat, SchemaType, Type, }; use utoipa::openapi::{AllOfBuilder, Ref, RefOr}; @@ -37,34 +37,36 @@ macro_rules! derive_utoipa { ($inner_type:ident as $schema_name:ident) => { pub struct $schema_name {} - impl<'__s> ToSchema<'__s> for $schema_name { - fn schema() -> (&'__s str, utoipa::openapi::RefOr) { + impl utoipa::PartialSchema for $schema_name { + fn schema() -> utoipa::openapi::RefOr { let settings = rmcp::schemars::generate::SchemaSettings::openapi3(); let generator = settings.into_generator(); let schema = generator.into_root_schema_for::<$inner_type>(); - let schema = convert_schemars_to_utoipa(schema); - (stringify!($inner_type), schema) + convert_schemars_to_utoipa(schema) } + } - fn aliases() -> Vec<(&'__s str, utoipa::openapi::schema::Schema)> { - Vec::new() + impl ToSchema for $schema_name { + fn name() -> std::borrow::Cow<'static, str> { + std::borrow::Cow::Borrowed(stringify!($inner_type)) } } }; ($inner_type:ident as $schema_name:ident => $output_name:expr) => { pub struct $schema_name {} - impl<'__s> ToSchema<'__s> for $schema_name { - fn schema() -> (&'__s str, utoipa::openapi::RefOr) { + impl utoipa::PartialSchema for $schema_name { + fn schema() -> utoipa::openapi::RefOr { let settings = rmcp::schemars::generate::SchemaSettings::openapi3(); let generator = settings.into_generator(); let schema = generator.into_root_schema_for::<$inner_type>(); - let schema = convert_schemars_to_utoipa(schema); - ($output_name, schema) + convert_schemars_to_utoipa(schema) } + } - fn aliases() -> Vec<(&'__s str, utoipa::openapi::schema::Schema)> { - Vec::new() + impl ToSchema for $schema_name { + fn name() -> std::borrow::Cow<'static, str> { + std::borrow::Cow::Borrowed($output_name) } } }; @@ -248,7 +250,8 @@ fn convert_typed_schema( RefOr::T(Schema::Array(array_builder.build())) } "string" => { - let mut object_builder = ObjectBuilder::new().schema_type(SchemaType::String); + let mut object_builder = + ObjectBuilder::new().schema_type(SchemaType::Type(Type::String)); if let Some(Value::Array(enum_values)) = obj.get("enum") { let values: Vec = enum_values @@ -286,7 +289,8 @@ fn convert_typed_schema( RefOr::T(Schema::Object(object_builder.build())) } "number" => { - let mut object_builder = ObjectBuilder::new().schema_type(SchemaType::Number); + let mut object_builder = + ObjectBuilder::new().schema_type(SchemaType::Type(Type::Number)); if let Some(Value::Number(minimum)) = obj.get("minimum") { if let Some(min) = minimum.as_f64() { @@ -317,7 +321,8 @@ fn convert_typed_schema( RefOr::T(Schema::Object(object_builder.build())) } "integer" => { - let mut object_builder = ObjectBuilder::new().schema_type(SchemaType::Integer); + let mut object_builder = + ObjectBuilder::new().schema_type(SchemaType::Type(Type::Integer)); if let Some(Value::Number(minimum)) = obj.get("minimum") { if let Some(min) = minimum.as_f64() { @@ -349,11 +354,13 @@ fn convert_typed_schema( } "boolean" => RefOr::T(Schema::Object( ObjectBuilder::new() - .schema_type(SchemaType::Boolean) + .schema_type(SchemaType::Type(Type::Boolean)) .build(), )), "null" => RefOr::T(Schema::Object( - ObjectBuilder::new().schema_type(SchemaType::String).build(), + ObjectBuilder::new() + .schema_type(SchemaType::Type(Type::String)) + .build(), )), _ => RefOr::T(Schema::Object(ObjectBuilder::new().build())), } @@ -379,8 +386,61 @@ derive_utoipa!(ResourceContents as ResourceContentsSchema); derive_utoipa!(JsonObject as JsonObjectSchema); derive_utoipa!(Icon as IconSchema); +struct OpenApiFixups; + +impl Modify for OpenApiFixups { + fn modify(&self, openapi: &mut utoipa::openapi::OpenApi) { + use utoipa::openapi::schema::{Discriminator, Schema}; + use utoipa::openapi::RefOr; + + // Fix diagnostics endpoint: Vec renders as array but we need binary + if let Some(path) = openapi.paths.paths.get_mut("/diagnostics/{session_id}") { + if let Some(op) = &mut path.get { + if let Some(RefOr::T(resp)) = op.responses.responses.get_mut("200") { + if let Some(content) = resp.content.get_mut("application/zip") { + content.schema = Some(RefOr::T(Schema::Object( + ObjectBuilder::new() + .schema_type(SchemaType::new(Type::String)) + .format(Some(SchemaFormat::KnownFormat( + utoipa::openapi::schema::KnownFormat::Binary, + ))) + .build(), + ))); + } + } + } + } + + if let Some(components) = &mut openapi.components { + // Proxy types used via value_type overwrite real schemas with self-refs. + // Re-insert the authoritative schemas from derive_utoipa! macros. + let real_schemas: Vec<(&str, RefOr)> = vec![ + ("TextContent", TextContentSchema::schema()), + ("ImageContent", ImageContentSchema::schema()), + ("Role", RoleSchema::schema()), + ("ContentBlock", ContentBlockSchema::schema()), + ]; + for (name, schema) in real_schemas { + components.schemas.insert(name.to_string(), schema); + } + + // Restore discriminators for tagged enums (utoipa 5 drops them) + for (name, property_name) in [ + ("MessageContent", "type"), + ("ActionRequiredData", "actionType"), + ("ExtensionConfig", "type"), + ] { + if let Some(RefOr::T(Schema::OneOf(one_of))) = components.schemas.get_mut(name) { + one_of.discriminator = Some(Discriminator::new(property_name)); + } + } + } + } +} + #[derive(OpenApi)] #[openapi( + modifiers(&OpenApiFixups), paths( super::routes::status::status, super::routes::status::system_info, diff --git a/crates/goose-server/src/routes/agent.rs b/crates/goose-server/src/routes/agent.rs index 09b1d361cfbd..9051337706a6 100644 --- a/crates/goose-server/src/routes/agent.rs +++ b/crates/goose-server/src/routes/agent.rs @@ -141,25 +141,25 @@ pub struct CallToolRequest { arguments: Value, } -/// Ref-only alias so utoipa emits `$ref: "#/components/schemas/ContentBlock"`. -/// The actual schema is registered via `derive_utoipa!(RawContent as ContentBlockSchema => "ContentBlock")`. #[allow(dead_code)] -pub enum ContentBlock {} - -impl<'s> utoipa::ToSchema<'s> for ContentBlock { - fn schema() -> ( - &'s str, - utoipa::openapi::RefOr, - ) { - // Delegate to the auto-generated schema - crate::openapi::ContentBlockSchema::schema() +pub enum ContentBlockRef {} + +impl utoipa::PartialSchema for ContentBlockRef { + fn schema() -> utoipa::openapi::RefOr { + utoipa::openapi::RefOr::Ref(utoipa::openapi::Ref::from_schema_name("ContentBlock")) + } +} + +impl utoipa::ToSchema for ContentBlockRef { + fn name() -> std::borrow::Cow<'static, str> { + std::borrow::Cow::Borrowed("ContentBlock") } } #[derive(Serialize, utoipa::ToSchema)] #[serde(rename_all = "camelCase")] pub struct CallToolResponse { - #[schema(value_type = Vec)] + #[schema(value_type = Vec)] content: Vec, #[serde(skip_serializing_if = "Option::is_none")] structured_content: Option, diff --git a/crates/goose-server/src/routes/tunnel.rs b/crates/goose-server/src/routes/tunnel.rs index d84aff4afe53..43091e569497 100644 --- a/crates/goose-server/src/routes/tunnel.rs +++ b/crates/goose-server/src/routes/tunnel.rs @@ -1,4 +1,6 @@ +use crate::routes::errors::ErrorResponse; use crate::state::AppState; +use crate::tunnel::TunnelInfo; use axum::{ extract::State, http::StatusCode, @@ -6,14 +8,7 @@ use axum::{ routing::{get, post}, Json, Router, }; -use serde::Serialize; use std::sync::Arc; -use utoipa::ToSchema; - -#[derive(Debug, Serialize, ToSchema)] -pub struct ErrorResponse { - pub error: String, -} /// Start the tunnel #[utoipa::path( @@ -31,13 +26,7 @@ pub async fn start_tunnel(State(state): State>) -> Response { Ok(info) => (StatusCode::OK, Json(info)).into_response(), Err(e) => { tracing::error!("Failed to start tunnel: {}", e); - ( - StatusCode::INTERNAL_SERVER_ERROR, - Json(ErrorResponse { - error: e.to_string(), - }), - ) - .into_response() + ErrorResponse::internal(e.to_string()).into_response() } } } diff --git a/crates/goose/Cargo.toml b/crates/goose/Cargo.toml index 5df8168fd843..415835efd094 100644 --- a/crates/goose/Cargo.toml +++ b/crates/goose/Cargo.toml @@ -86,7 +86,7 @@ async-trait = { workspace = true } async-stream = { workspace = true } minijinja = { version = "2.12.0", features = ["loader"] } include_dir = { workspace = true } -tiktoken-rs = "0.6.0" +tiktoken-rs = "0.9.1" chrono = { workspace = true } clap = { workspace = true } indoc = { workspace = true } @@ -152,7 +152,6 @@ agent-client-protocol-schema = { workspace = true } sacp = { workspace = true, features = ["unstable"] } unicode-normalization = "0.1" -# For local Whisper transcription (optional, behind "local-inference" feature) candle-core = { version = "0.9", default-features = false, optional = true } candle-nn = { version = "0.9", default-features = false, optional = true } candle-transformers = { version = "0.9", default-features = false, optional = true } @@ -160,7 +159,7 @@ byteorder = { version = "1.5.0", optional = true } tokenizers = { version = "0.21.0", default-features = false, features = ["onig"], optional = true } symphonia = { version = "0.5", features = ["all"], optional = true } rubato = { version = "0.16", optional = true } -zip = { workspace = true } +zip = { workspace = true, features = ["deflate"] } sys-info = "0.9" schemars = { workspace = true, features = [ diff --git a/crates/goose/src/agents/extension.rs b/crates/goose/src/agents/extension.rs index e30bdb334de6..fd672195f419 100644 --- a/crates/goose/src/agents/extension.rs +++ b/crates/goose/src/agents/extension.rs @@ -13,6 +13,12 @@ use thiserror::Error; use tracing::warn; use utoipa::ToSchema; +fn tool_vec_schema() -> utoipa::openapi::schema::Array { + utoipa::openapi::schema::ArrayBuilder::new() + .items(utoipa::openapi::Ref::from_schema_name("Tool")) + .build() +} + pub use crate::agents::platform_extensions::{ PlatformExtensionContext, PlatformExtensionDef, PLATFORM_EXTENSIONS, }; @@ -250,6 +256,7 @@ pub enum ExtensionConfig { #[schema(required)] description: String, /// The tools provided by the frontend + #[schema(schema_with = tool_vec_schema)] tools: Vec, /// Instructions for how to use these tools instructions: Option, diff --git a/crates/goose/src/config/signup_openrouter/mod.rs b/crates/goose/src/config/signup_openrouter/mod.rs index 0423727079ec..71abe85335b1 100644 --- a/crates/goose/src/config/signup_openrouter/mod.rs +++ b/crates/goose/src/config/signup_openrouter/mod.rs @@ -5,7 +5,8 @@ mod tests; use anyhow::{anyhow, Result}; use base64::{engine::general_purpose::URL_SAFE_NO_PAD, Engine}; -use rand::{distributions::Alphanumeric, Rng}; +use rand::distr::Alphanumeric; +use rand::RngExt; use reqwest::Client; use serde::{Deserialize, Serialize}; use sha2::{Digest, Sha256}; @@ -42,7 +43,7 @@ struct TokenRequest { impl PkceAuthFlow { pub fn new() -> Result { - let code_verifier: String = rand::thread_rng() + let code_verifier: String = rand::rng() .sample_iter(&Alphanumeric) .take(128) .map(char::from) diff --git a/crates/goose/src/config/signup_tetrate/mod.rs b/crates/goose/src/config/signup_tetrate/mod.rs index 58508ca30925..687c22049f4b 100644 --- a/crates/goose/src/config/signup_tetrate/mod.rs +++ b/crates/goose/src/config/signup_tetrate/mod.rs @@ -5,7 +5,8 @@ mod tests; use anyhow::{anyhow, Result}; use base64::{engine::general_purpose::URL_SAFE_NO_PAD, Engine}; -use rand::{distributions::Alphanumeric, Rng}; +use rand::distr::Alphanumeric; +use rand::RngExt; use reqwest::Client; use serde::{Deserialize, Serialize}; use sha2::{Digest, Sha256}; @@ -42,7 +43,7 @@ struct TokenRequest { impl PkceAuthFlow { pub fn new() -> Result { - let code_verifier: String = rand::thread_rng() + let code_verifier: String = rand::rng() .sample_iter(&Alphanumeric) .take(128) .map(char::from) diff --git a/crates/goose/src/conversation/message.rs b/crates/goose/src/conversation/message.rs index db5ef206837d..7c8a8653f340 100644 --- a/crates/goose/src/conversation/message.rs +++ b/crates/goose/src/conversation/message.rs @@ -10,9 +10,50 @@ use rmcp::model::{ use serde::{Deserialize, Deserializer, Serialize}; use std::collections::HashSet; use std::fmt; +use utoipa::openapi::RefOr; use utoipa::ToSchema; use uuid::Uuid; +fn json_object_schema() -> RefOr { + RefOr::Ref(utoipa::openapi::Ref::from_schema_name("JsonObject")) +} + +struct TextContentSchemaRef; +impl utoipa::PartialSchema for TextContentSchemaRef { + fn schema() -> RefOr { + RefOr::Ref(utoipa::openapi::Ref::from_schema_name("TextContent")) + } +} +impl utoipa::ToSchema for TextContentSchemaRef { + fn name() -> std::borrow::Cow<'static, str> { + std::borrow::Cow::Borrowed("TextContent") + } +} + +struct RoleSchemaRef; +impl utoipa::PartialSchema for RoleSchemaRef { + fn schema() -> RefOr { + RefOr::Ref(utoipa::openapi::Ref::from_schema_name("Role")) + } +} +impl utoipa::ToSchema for RoleSchemaRef { + fn name() -> std::borrow::Cow<'static, str> { + std::borrow::Cow::Borrowed("Role") + } +} + +struct ImageContentSchemaRef; +impl utoipa::PartialSchema for ImageContentSchemaRef { + fn schema() -> RefOr { + RefOr::Ref(utoipa::openapi::Ref::from_schema_name("ImageContent")) + } +} +impl utoipa::ToSchema for ImageContentSchemaRef { + fn name() -> std::borrow::Cow<'static, str> { + std::borrow::Cow::Borrowed("ImageContent") + } +} + #[derive(ToSchema)] pub enum ToolCallResult { Success { value: T }, @@ -126,6 +167,7 @@ pub struct ToolResponse { pub struct ToolConfirmationRequest { pub id: String, pub tool_name: String, + #[schema(schema_with = json_object_schema)] pub arguments: JsonObject, pub prompt: Option, } @@ -137,6 +179,7 @@ pub enum ActionRequiredData { ToolConfirmation { id: String, tool_name: String, + #[schema(schema_with = json_object_schema)] arguments: JsonObject, prompt: Option, }, @@ -198,7 +241,9 @@ pub struct SystemNotificationContent { /// Content passed inside a message, which can be both simple content and tool content #[serde(tag = "type", rename_all = "camelCase")] pub enum MessageContent { + #[schema(value_type = TextContentSchemaRef)] Text(TextContent), + #[schema(value_type = ImageContentSchemaRef)] Image(ImageContent), ToolRequest(ToolRequest), ToolResponse(ToolResponse), @@ -660,6 +705,7 @@ impl MessageMetadata { #[serde(rename_all = "camelCase")] pub struct Message { pub id: Option, + #[schema(value_type = RoleSchemaRef)] pub role: Role, pub created: i64, #[serde(deserialize_with = "deserialize_sanitized_content")] diff --git a/crates/goose/src/gateway/pairing.rs b/crates/goose/src/gateway/pairing.rs index 6ae272436aa0..70c8eac0c272 100644 --- a/crates/goose/src/gateway/pairing.rs +++ b/crates/goose/src/gateway/pairing.rs @@ -136,11 +136,11 @@ impl PairingStore { } pub fn generate_code() -> String { - use rand::Rng; + use rand::RngExt; let chars: &[u8] = b"ABCDEFGHJKLMNPQRSTUVWXYZ23456789"; - let mut rng = rand::thread_rng(); + let mut rng = rand::rng(); (0..6) - .map(|_| chars[rng.gen_range(0..chars.len())] as char) + .map(|_| chars[rng.random_range(0..chars.len())] as char) .collect() } diff --git a/ui/desktop/openapi.json b/ui/desktop/openapi.json index bbbd8f572769..97e7767584ed 100644 --- a/ui/desktop/openapi.json +++ b/ui/desktop/openapi.json @@ -1,5 +1,5 @@ { - "openapi": "3.0.3", + "openapi": "3.1.0", "info": { "title": "goose-server", "description": "An AI agent", @@ -8,7 +8,8 @@ "email": "ai-oss-tools@block.xyz" }, "license": { - "name": "Apache-2.0" + "name": "Apache-2.0", + "identifier": "Apache-2.0" }, "version": "1.29.0" }, @@ -251,8 +252,10 @@ "in": "query", "required": false, "schema": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] } } ], @@ -559,8 +562,7 @@ "description": "Optional extension name to filter tools", "required": false, "schema": { - "type": "string", - "nullable": true + "type": "string" } }, { @@ -1268,8 +1270,7 @@ "description": "Filter by provider format (openai, anthropic, ollama)", "required": false, "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -1688,6 +1689,9 @@ "type": "object", "additionalProperties": { "$ref": "#/components/schemas/DictationProviderStatus" + }, + "propertyNames": { + "type": "string" } } } @@ -2246,7 +2250,6 @@ "required": false, "schema": { "type": "integer", - "nullable": true, "minimum": 0 } } @@ -2290,7 +2293,10 @@ ], "responses": { "200": { - "description": "MCP UI proxy HTML page" + "description": "MCP UI proxy HTML page", + "content": { + "text/html": {} + } }, "401": { "description": "Unauthorized - invalid or missing secret" @@ -3212,7 +3218,6 @@ "required": false, "schema": { "type": "integer", - "nullable": true, "minimum": 0 } }, @@ -3222,8 +3227,7 @@ "description": "Filter after date (ISO 8601)", "required": false, "schema": { - "type": "string", - "nullable": true + "type": "string" } }, { @@ -3232,8 +3236,7 @@ "description": "Filter before date (ISO 8601)", "required": false, "schema": { - "type": "string", - "nullable": true + "type": "string" } } ], @@ -3925,8 +3928,10 @@ "type": "string" }, "prompt": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "toolName": { "type": "string" @@ -4019,12 +4024,16 @@ "type": "object", "properties": { "contact": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "metadata": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] } } }, @@ -4032,12 +4041,16 @@ "type": "object", "properties": { "contact": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "metadata": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] } } }, @@ -4065,9 +4078,7 @@ "isError" ], "properties": { - "_meta": { - "nullable": true - }, + "_meta": {}, "content": { "type": "array", "items": { @@ -4077,9 +4088,7 @@ "isError": { "type": "boolean" }, - "structuredContent": { - "nullable": true - } + "structuredContent": {} } }, "CancelRequest": { @@ -4101,20 +4110,26 @@ ], "properties": { "override_conversation": { - "type": "array", + "type": [ + "array", + "null" + ], "items": { "$ref": "#/components/schemas/Message" }, - "description": "Override the server's conversation history. Only use this when you need absolute control\nover the conversation state (e.g., administrative tools). For normal operations, the server\nis the source of truth - use truncate/fork endpoints to modify conversation history instead.", - "nullable": true + "description": "Override the server's conversation history. Only use this when you need absolute control\nover the conversation state (e.g., administrative tools). For normal operations, the server\nis the source of truth - use truncate/fork endpoints to modify conversation history instead." }, "recipe_name": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "recipe_version": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "session_id": { "type": "string" @@ -4153,9 +4168,11 @@ ], "properties": { "default": { - "type": "string", - "description": "Optional default value for the key", - "nullable": true + "type": [ + "string", + "null" + ], + "description": "Optional default value for the key" }, "device_code_flow": { "type": "boolean", @@ -4206,7 +4223,10 @@ "properties": { "config": { "type": "object", - "additionalProperties": {} + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } } } }, @@ -4474,12 +4494,14 @@ ], "properties": { "author": { - "allOf": [ + "oneOf": [ + { + "type": "null" + }, { "$ref": "#/components/schemas/AuthorRequest" } - ], - "nullable": true + ] }, "session_id": { "type": "string" @@ -4490,16 +4512,20 @@ "type": "object", "properties": { "error": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "recipe": { - "allOf": [ + "oneOf": [ + { + "type": "null" + }, { "$ref": "#/components/schemas/Recipe" } - ], - "nullable": true + ] } } }, @@ -4527,36 +4553,44 @@ "description": "Content Security Policy metadata for MCP Apps\nSpecifies allowed domains for network connections and resource loading", "properties": { "baseUriDomains": { - "type": "array", + "type": [ + "array", + "null" + ], "items": { "type": "string" }, - "description": "Domains allowed for base-uri", - "nullable": true + "description": "Domains allowed for base-uri" }, "connectDomains": { - "type": "array", + "type": [ + "array", + "null" + ], "items": { "type": "string" }, - "description": "Domains allowed for connect-src (fetch, XHR, WebSocket)", - "nullable": true + "description": "Domains allowed for connect-src (fetch, XHR, WebSocket)" }, "frameDomains": { - "type": "array", + "type": [ + "array", + "null" + ], "items": { "type": "string" }, - "description": "Domains allowed for frame-src (nested iframes)", - "nullable": true + "description": "Domains allowed for frame-src (nested iframes)" }, "resourceDomains": { - "type": "array", + "type": [ + "array", + "null" + ], "items": { "type": "string" }, - "description": "Domains allowed for resource loading (scripts, styles, images, fonts, media)", - "nullable": true + "description": "Domains allowed for resource loading (scripts, styles, images, fonts, media)" } } }, @@ -4574,43 +4608,58 @@ "type": "string" }, "base_path": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "base_url": { "type": "string" }, "catalog_provider_id": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "description": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "display_name": { "type": "string" }, "dynamic_models": { - "type": "boolean", - "nullable": true + "type": [ + "boolean", + "null" + ] }, "engine": { "$ref": "#/components/schemas/ProviderEngine" }, "env_vars": { - "type": "array", + "type": [ + "array", + "null" + ], "items": { "$ref": "#/components/schemas/EnvVarConfig" - }, - "nullable": true + } }, "headers": { - "type": "object", + "type": [ + "object", + "null" + ], "additionalProperties": { "type": "string" }, - "nullable": true + "propertyNames": { + "type": "string" + } }, "models": { "type": "array", @@ -4628,13 +4677,17 @@ "type": "boolean" }, "supports_streaming": { - "type": "boolean", - "nullable": true + "type": [ + "boolean", + "null" + ] }, "timeout_seconds": { - "type": "integer", + "type": [ + "integer", + "null" + ], "format": "int64", - "nullable": true, "minimum": 0 } } @@ -4690,9 +4743,11 @@ ], "properties": { "config_key": { - "type": "string", - "description": "Config key name if uses_provider_config is false", - "nullable": true + "type": [ + "string", + "null" + ], + "description": "Config key name if uses_provider_config is false" }, "configured": { "type": "boolean", @@ -4703,14 +4758,18 @@ "description": "Description of what this provider does" }, "host": { - "type": "string", - "description": "Custom host URL if configured (only for providers that support it)", - "nullable": true + "type": [ + "string", + "null" + ], + "description": "Custom host URL if configured (only for providers that support it)" }, "settings_path": { - "type": "string", - "description": "Path to settings if uses_provider_config is true", - "nullable": true + "type": [ + "string", + "null" + ], + "description": "Path to settings if uses_provider_config is true" }, "uses_provider_config": { "type": "boolean", @@ -4747,15 +4806,19 @@ "minimum": 0 }, "error": { - "type": "string", - "description": "Error message if failed", - "nullable": true + "type": [ + "string", + "null" + ], + "description": "Error message if failed" }, "eta_seconds": { - "type": "integer", + "type": [ + "integer", + "null" + ], "format": "int64", "description": "Estimated time remaining in seconds", - "nullable": true, "minimum": 0 }, "model_id": { @@ -4768,14 +4831,17 @@ "description": "Download progress percentage (0-100)" }, "speed_bps": { - "type": "integer", + "type": [ + "integer", + "null" + ], "format": "int64", "description": "Download speed in bytes per second", - "nullable": true, "minimum": 0 }, "status": { - "$ref": "#/components/schemas/DownloadStatus" + "$ref": "#/components/schemas/DownloadStatus", + "description": "Download status" }, "total_bytes": { "type": "integer", @@ -4848,20 +4914,26 @@ ], "properties": { "default": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "description": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "name": { "type": "string" }, "primary": { - "type": "boolean", - "description": "When true, the field is shown prominently in the UI (not collapsed).\nDefaults to the value of `required` if not specified.", - "nullable": true + "type": [ + "boolean", + "null" + ], + "description": "When true, the field is shown prominently in the UI (not collapsed).\nDefaults to the value of `required` if not specified." }, "required": { "type": "boolean" @@ -4913,8 +4985,10 @@ ] }, "uri": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] } } }, @@ -4942,8 +5016,10 @@ } }, "bundled": { - "type": "boolean", - "nullable": true + "type": [ + "boolean", + "null" + ] }, "cmd": { "type": "string" @@ -4965,9 +5041,11 @@ "description": "The name used to identify this extension" }, "timeout": { - "type": "integer", + "type": [ + "integer", + "null" + ], "format": "int64", - "nullable": true, "minimum": 0 }, "type": { @@ -4994,24 +5072,30 @@ } }, "bundled": { - "type": "boolean", - "nullable": true + "type": [ + "boolean", + "null" + ] }, "description": { "type": "string" }, "display_name": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "name": { "type": "string", "description": "The name used to identify this extension" }, "timeout": { - "type": "integer", + "type": [ + "integer", + "null" + ], "format": "int64", - "nullable": true, "minimum": 0 }, "type": { @@ -5038,15 +5122,19 @@ } }, "bundled": { - "type": "boolean", - "nullable": true + "type": [ + "boolean", + "null" + ] }, "description": { "type": "string" }, "display_name": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "name": { "type": "string", @@ -5077,8 +5165,10 @@ } }, "bundled": { - "type": "boolean", - "nullable": true + "type": [ + "boolean", + "null" + ] }, "description": { "type": "string" @@ -5096,6 +5186,9 @@ "type": "object", "additionalProperties": { "type": "string" + }, + "propertyNames": { + "type": "string" } }, "name": { @@ -5103,9 +5196,11 @@ "description": "The name used to identify this extension" }, "timeout": { - "type": "integer", + "type": [ + "integer", + "null" + ], "format": "int64", - "nullable": true, "minimum": 0 }, "type": { @@ -5136,16 +5231,20 @@ } }, "bundled": { - "type": "boolean", - "nullable": true + "type": [ + "boolean", + "null" + ] }, "description": { "type": "string" }, "instructions": { - "type": "string", - "description": "Instructions for how to use these tools", - "nullable": true + "type": [ + "string", + "null" + ], + "description": "Instructions for how to use these tools" }, "name": { "type": "string", @@ -5155,8 +5254,7 @@ "type": "array", "items": { "$ref": "#/components/schemas/Tool" - }, - "description": "The tools provided by the frontend" + } }, "type": { "type": "string", @@ -5187,12 +5285,14 @@ "description": "The Python code to execute" }, "dependencies": { - "type": "array", + "type": [ + "array", + "null" + ], "items": { "type": "string" }, - "description": "Python package dependencies required by this extension", - "nullable": true + "description": "Python package dependencies required by this extension" }, "description": { "type": "string" @@ -5202,10 +5302,12 @@ "description": "The name used to identify this extension" }, "timeout": { - "type": "integer", + "type": [ + "integer", + "null" + ], "format": "int64", "description": "Timeout in seconds", - "nullable": true, "minimum": 0 }, "type": { @@ -5253,8 +5355,10 @@ ], "properties": { "error": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "name": { "type": "string" @@ -5314,6 +5418,9 @@ "description": "Map of feature name to enabled status", "additionalProperties": { "type": "boolean" + }, + "propertyNames": { + "type": "string" } } } @@ -5329,9 +5436,11 @@ "type": "boolean" }, "timestamp": { - "type": "integer", - "format": "int64", - "nullable": true + "type": [ + "integer", + "null" + ], + "format": "int64" }, "truncate": { "type": "boolean" @@ -5371,8 +5480,10 @@ ], "properties": { "extension_name": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "session_id": { "type": "string" @@ -5385,12 +5496,14 @@ "$ref": "#/components/schemas/McpAppResource" }, { - "allOf": [ + "oneOf": [ + { + "type": "null" + }, { "$ref": "#/components/schemas/WindowProps" } - ], - "nullable": true + ] }, { "type": "object", @@ -5402,8 +5515,10 @@ } }, "prd": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] } } } @@ -5602,17 +5717,23 @@ "type": "object", "properties": { "processStartTime": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "runningDurationSeconds": { - "type": "integer", - "format": "int64", - "nullable": true + "type": [ + "integer", + "null" + ], + "format": "int64" }, "sessionId": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] } } }, @@ -5635,8 +5756,10 @@ "type": "object", "properties": { "session_id": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] } } }, @@ -5748,22 +5871,29 @@ ], "properties": { "_meta": { - "allOf": [ + "oneOf": [ + { + "type": "null" + }, { - "$ref": "#/components/schemas/ResourceMetadata" + "$ref": "#/components/schemas/ResourceMetadata", + "description": "Resource metadata including UI configuration" } - ], - "nullable": true + ] }, "blob": { - "type": "string", - "description": "Base64-encoded binary content (alternative to text)", - "nullable": true + "type": [ + "string", + "null" + ], + "description": "Base64-encoded binary content (alternative to text)" }, "description": { - "type": "string", - "description": "Optional description of what this resource does", - "nullable": true + "type": [ + "string", + "null" + ], + "description": "Optional description of what this resource does" }, "mimeType": { "type": "string", @@ -5774,9 +5904,11 @@ "description": "Human-readable name of the resource" }, "text": { - "type": "string", - "description": "Text content of the resource (HTML for MCP Apps)", - "nullable": true + "type": [ + "string", + "null" + ], + "description": "Text content of the resource (HTML for MCP Apps)" }, "uri": { "type": "string", @@ -5805,8 +5937,10 @@ "format": "int64" }, "id": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "metadata": { "$ref": "#/components/schemas/MessageMetadata" @@ -6174,10 +6308,7 @@ } } } - ], - "discriminator": { - "propertyName": "type" - } + ] }, "MessageMetadata": { "type": "object", @@ -6228,39 +6359,54 @@ ], "properties": { "context_limit": { - "type": "integer", - "nullable": true, + "type": [ + "integer", + "null" + ], "minimum": 0 }, "max_tokens": { - "type": "integer", - "format": "int32", - "nullable": true + "type": [ + "integer", + "null" + ], + "format": "int32" }, "model_name": { "type": "string" }, "reasoning": { - "type": "boolean", - "nullable": true + "type": [ + "boolean", + "null" + ] }, "request_params": { - "type": "object", + "type": [ + "object", + "null" + ], "description": "Provider-specific request parameters (e.g., anthropic_beta headers)", "additionalProperties": {}, - "nullable": true + "propertyNames": { + "type": "string" + } }, "temperature": { - "type": "number", - "format": "float", - "nullable": true + "type": [ + "number", + "null" + ], + "format": "float" }, "toolshim": { "type": "boolean" }, "toolshim_model": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] } } }, @@ -6299,9 +6445,11 @@ "format": "float" }, "speed_bps": { - "type": "integer", + "type": [ + "integer", + "null" + ], "format": "int64", - "nullable": true, "minimum": 0 }, "state": { @@ -6331,10 +6479,7 @@ } } } - ], - "discriminator": { - "propertyName": "state" - } + ] }, "ModelInfo": { "type": "object", @@ -6350,30 +6495,38 @@ "minimum": 0 }, "currency": { - "type": "string", - "description": "Currency for the costs (default: \"$\")", - "nullable": true + "type": [ + "string", + "null" + ], + "description": "Currency for the costs (default: \"$\")" }, "input_token_cost": { - "type": "number", + "type": [ + "number", + "null" + ], "format": "double", - "description": "Cost per token for input in USD (optional)", - "nullable": true + "description": "Cost per token for input in USD (optional)" }, "name": { "type": "string", "description": "The name of the model" }, "output_token_cost": { - "type": "number", + "type": [ + "number", + "null" + ], "format": "double", - "description": "Cost per token for output in USD (optional)", - "nullable": true + "description": "Cost per token for output in USD (optional)" }, "supports_cache_control": { - "type": "boolean", - "description": "Whether this model supports cache control", - "nullable": true + "type": [ + "boolean", + "null" + ], + "description": "Whether this model supports cache control" } } }, @@ -6387,14 +6540,18 @@ ], "properties": { "cache_read_token_cost": { - "type": "number", - "format": "double", - "nullable": true + "type": [ + "number", + "null" + ], + "format": "double" }, "cache_write_token_cost": { - "type": "number", - "format": "double", - "nullable": true + "type": [ + "number", + "null" + ], + "format": "double" }, "context_limit": { "type": "integer", @@ -6404,22 +6561,28 @@ "type": "string" }, "input_token_cost": { - "type": "number", - "format": "double", - "nullable": true + "type": [ + "number", + "null" + ], + "format": "double" }, "max_output_tokens": { - "type": "integer", - "nullable": true, + "type": [ + "integer", + "null" + ], "minimum": 0 }, "model": { "type": "string" }, "output_token_cost": { - "type": "number", - "format": "double", - "nullable": true + "type": [ + "number", + "null" + ], + "format": "double" }, "provider": { "type": "string" @@ -6448,12 +6611,14 @@ ], "properties": { "model_info": { - "allOf": [ + "oneOf": [ + { + "type": "null" + }, { "$ref": "#/components/schemas/ModelInfoData" } - ], - "nullable": true + ] }, "source": { "type": "string" @@ -6464,40 +6629,52 @@ "type": "object", "properties": { "context_size": { - "type": "integer", + "type": [ + "integer", + "null" + ], "format": "int32", - "nullable": true, "minimum": 0 }, "flash_attention": { - "type": "boolean", - "nullable": true + "type": [ + "boolean", + "null" + ] }, "frequency_penalty": { "type": "number", "format": "float" }, "max_output_tokens": { - "type": "integer", - "nullable": true, + "type": [ + "integer", + "null" + ], "minimum": 0 }, "n_batch": { - "type": "integer", + "type": [ + "integer", + "null" + ], "format": "int32", - "nullable": true, "minimum": 0 }, "n_gpu_layers": { - "type": "integer", + "type": [ + "integer", + "null" + ], "format": "int32", - "nullable": true, "minimum": 0 }, "n_threads": { - "type": "integer", - "format": "int32", - "nullable": true + "type": [ + "integer", + "null" + ], + "format": "int32" }, "native_tool_calling": { "type": "boolean" @@ -6977,13 +7154,20 @@ ], "properties": { "_meta": { - "type": "object", + "type": [ + "object", + "null" + ], "additionalProperties": {}, - "nullable": true + "propertyNames": { + "type": "string" + } }, "mimeType": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "text": { "type": "string" @@ -7001,75 +7185,95 @@ ], "properties": { "activities": { - "type": "array", + "type": [ + "array", + "null" + ], "items": { "type": "string" - }, - "nullable": true + } }, "author": { - "allOf": [ + "oneOf": [ + { + "type": "null" + }, { "$ref": "#/components/schemas/Author" } - ], - "nullable": true + ] }, "description": { "type": "string" }, "extensions": { - "type": "array", + "type": [ + "array", + "null" + ], "items": { "$ref": "#/components/schemas/ExtensionConfig" - }, - "nullable": true + } }, "instructions": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "parameters": { - "type": "array", + "type": [ + "array", + "null" + ], "items": { "$ref": "#/components/schemas/RecipeParameter" - }, - "nullable": true + } }, "prompt": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "response": { - "allOf": [ + "oneOf": [ + { + "type": "null" + }, { "$ref": "#/components/schemas/Response" } - ], - "nullable": true + ] }, "retry": { - "allOf": [ + "oneOf": [ + { + "type": "null" + }, { "$ref": "#/components/schemas/RetryConfig" } - ], - "nullable": true + ] }, "settings": { - "allOf": [ + "oneOf": [ + { + "type": "null" + }, { "$ref": "#/components/schemas/Settings" } - ], - "nullable": true + ] }, "sub_recipes": { - "type": "array", + "type": [ + "array", + "null" + ], "items": { "$ref": "#/components/schemas/SubRecipe" - }, - "nullable": true + } }, "title": { "type": "string" @@ -7101,12 +7305,16 @@ "$ref": "#/components/schemas/Recipe" }, "schedule_cron": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "slash_command": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] } } }, @@ -7120,8 +7328,10 @@ ], "properties": { "default": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "description": { "type": "string" @@ -7133,11 +7343,13 @@ "type": "string" }, "options": { - "type": "array", + "type": [ + "array", + "null" + ], "items": { "type": "string" - }, - "nullable": true + } }, "requirement": { "$ref": "#/components/schemas/RecipeParameterRequirement" @@ -7218,8 +7430,10 @@ ], "properties": { "recommended_index": { - "type": "integer", - "nullable": true, + "type": [ + "integer", + "null" + ], "minimum": 0 }, "variants": { @@ -7283,21 +7497,22 @@ "description": "Resource metadata containing UI configuration", "properties": { "ui": { - "allOf": [ + "oneOf": [ { - "$ref": "#/components/schemas/UiMetadata" + "type": "null" + }, + { + "$ref": "#/components/schemas/UiMetadata", + "description": "UI-specific configuration" } - ], - "nullable": true + ] } } }, "Response": { "type": "object", "properties": { - "json_schema": { - "nullable": true - } + "json_schema": {} } }, "RestartAgentRequest": { @@ -7347,11 +7562,13 @@ ], "properties": { "extension_results": { - "type": "array", + "type": [ + "array", + "null" + ], "items": { "$ref": "#/components/schemas/ExtensionLoadResult" - }, - "nullable": true + } }, "session": { "$ref": "#/components/schemas/Session" @@ -7380,22 +7597,28 @@ "minimum": 0 }, "on_failure": { - "type": "string", - "description": "Optional shell command to run on failure for cleanup", - "nullable": true + "type": [ + "string", + "null" + ], + "description": "Optional shell command to run on failure for cleanup" }, "on_failure_timeout_seconds": { - "type": "integer", + "type": [ + "integer", + "null" + ], "format": "int64", "description": "Timeout in seconds for on_failure commands (default: 600 seconds)", - "nullable": true, "minimum": 0 }, "timeout_seconds": { - "type": "integer", + "type": [ + "integer", + "null" + ], "format": "int64", "description": "Timeout in seconds for individual shell commands (default: 300 seconds)", - "nullable": true, "minimum": 0 } } @@ -7458,9 +7681,11 @@ "format": "float" }, "seed": { - "type": "integer", + "type": [ + "integer", + "null" + ], "format": "int32", - "nullable": true, "minimum": 0 }, "temperature": { @@ -7496,9 +7721,11 @@ "format": "float" }, "seed": { - "type": "integer", + "type": [ + "integer", + "null" + ], "format": "int32", - "nullable": true, "minimum": 0 }, "tau": { @@ -7513,10 +7740,7 @@ } } } - ], - "discriminator": { - "propertyName": "type" - } + ] }, "SavePromptRequest": { "type": "object", @@ -7536,8 +7760,10 @@ ], "properties": { "id": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "recipe": { "$ref": "#/components/schemas/Recipe" @@ -7592,8 +7818,10 @@ ], "properties": { "cron_schedule": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "id": { "type": "string" @@ -7612,8 +7840,10 @@ "type": "string" }, "current_session_id": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "currently_running": { "type": "boolean" @@ -7622,17 +7852,21 @@ "type": "string" }, "last_run": { - "type": "string", - "format": "date-time", - "nullable": true + "type": [ + "string", + "null" + ], + "format": "date-time" }, "paused": { "type": "boolean" }, "process_start_time": { - "type": "string", - "format": "date-time", - "nullable": true + "type": [ + "string", + "null" + ], + "format": "date-time" }, "source": { "type": "string" @@ -7652,27 +7886,35 @@ ], "properties": { "accumulated_input_tokens": { - "type": "integer", - "format": "int32", - "nullable": true + "type": [ + "integer", + "null" + ], + "format": "int32" }, "accumulated_output_tokens": { - "type": "integer", - "format": "int32", - "nullable": true + "type": [ + "integer", + "null" + ], + "format": "int32" }, "accumulated_total_tokens": { - "type": "integer", - "format": "int32", - "nullable": true + "type": [ + "integer", + "null" + ], + "format": "int32" }, "conversation": { - "allOf": [ + "oneOf": [ + { + "type": "null" + }, { "$ref": "#/components/schemas/Conversation" } - ], - "nullable": true + ] }, "created_at": { "type": "string", @@ -7688,64 +7930,83 @@ "type": "string" }, "input_tokens": { - "type": "integer", - "format": "int32", - "nullable": true + "type": [ + "integer", + "null" + ], + "format": "int32" }, "message_count": { "type": "integer", "minimum": 0 }, "model_config": { - "allOf": [ + "oneOf": [ + { + "type": "null" + }, { "$ref": "#/components/schemas/ModelConfig" } - ], - "nullable": true + ] }, "name": { "type": "string" }, "output_tokens": { - "type": "integer", - "format": "int32", - "nullable": true + "type": [ + "integer", + "null" + ], + "format": "int32" }, "provider_name": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "recipe": { - "allOf": [ + "oneOf": [ + { + "type": "null" + }, { "$ref": "#/components/schemas/Recipe" } - ], - "nullable": true + ] }, "schedule_id": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "session_type": { "$ref": "#/components/schemas/SessionType" }, "total_tokens": { - "type": "integer", - "format": "int32", - "nullable": true + "type": [ + "integer", + "null" + ], + "format": "int32" }, "updated_at": { "type": "string", "format": "date-time" }, "user_recipe_values": { - "type": "object", + "type": [ + "object", + "null" + ], "additionalProperties": { "type": "string" }, - "nullable": true + "propertyNames": { + "type": "string" + } }, "user_set_name": { "type": "boolean" @@ -7766,19 +8027,25 @@ ], "properties": { "accumulatedInputTokens": { - "type": "integer", - "format": "int32", - "nullable": true + "type": [ + "integer", + "null" + ], + "format": "int32" }, "accumulatedOutputTokens": { - "type": "integer", - "format": "int32", - "nullable": true + "type": [ + "integer", + "null" + ], + "format": "int32" }, "accumulatedTotalTokens": { - "type": "integer", - "format": "int32", - "nullable": true + "type": [ + "integer", + "null" + ], + "format": "int32" }, "createdAt": { "type": "string" @@ -7787,9 +8054,11 @@ "type": "string" }, "inputTokens": { - "type": "integer", - "format": "int32", - "nullable": true + "type": [ + "integer", + "null" + ], + "format": "int32" }, "messageCount": { "type": "integer", @@ -7799,18 +8068,24 @@ "type": "string" }, "outputTokens": { - "type": "integer", - "format": "int32", - "nullable": true + "type": [ + "integer", + "null" + ], + "format": "int32" }, "scheduleId": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "totalTokens": { - "type": "integer", - "format": "int32", - "nullable": true + "type": [ + "integer", + "null" + ], + "format": "int32" }, "workingDir": { "type": "string" @@ -7871,19 +8146,25 @@ ], "properties": { "override_conversation": { - "type": "array", + "type": [ + "array", + "null" + ], "items": { "$ref": "#/components/schemas/Message" - }, - "nullable": true + } }, "recipe_name": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "recipe_version": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "request_id": { "type": "string", @@ -7954,8 +8235,10 @@ "type": "string" }, "slash_command": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] } } }, @@ -7963,22 +8246,30 @@ "type": "object", "properties": { "goose_model": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "goose_provider": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "max_turns": { - "type": "integer", - "nullable": true, + "type": [ + "integer", + "null" + ], "minimum": 0 }, "temperature": { - "type": "number", - "format": "float", - "nullable": true + "type": [ + "number", + "null" + ], + "format": "float" } } }, @@ -8037,27 +8328,35 @@ ], "properties": { "extension_overrides": { - "type": "array", + "type": [ + "array", + "null" + ], "items": { "$ref": "#/components/schemas/ExtensionConfig" - }, - "nullable": true + } }, "recipe": { - "allOf": [ + "oneOf": [ + { + "type": "null" + }, { "$ref": "#/components/schemas/Recipe" } - ], - "nullable": true + ] }, "recipe_deeplink": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "recipe_id": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "working_dir": { "type": "string" @@ -8083,8 +8382,10 @@ ], "properties": { "description": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "name": { "type": "string" @@ -8096,11 +8397,16 @@ "type": "boolean" }, "values": { - "type": "object", + "type": [ + "object", + "null" + ], "additionalProperties": { "type": "string" }, - "nullable": true + "propertyNames": { + "type": "string" + } } } }, @@ -8127,10 +8433,7 @@ } } ], - "description": "A single success check to validate recipe completion", - "discriminator": { - "propertyName": "type" - } + "description": "A single success check to validate recipe completion" }, "SystemInfo": { "type": "object", @@ -8155,8 +8458,10 @@ } }, "model": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "os": { "type": "string" @@ -8165,8 +8470,10 @@ "type": "string" }, "provider": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] } } }, @@ -8177,9 +8484,7 @@ "msg" ], "properties": { - "data": { - "nullable": true - }, + "data": {}, "msg": { "type": "string" }, @@ -8229,7 +8534,10 @@ }, "properties": { "type": "object", - "additionalProperties": {} + "additionalProperties": {}, + "propertyNames": { + "type": "string" + } } } }, @@ -8256,8 +8564,10 @@ "type": "string" }, "user_content": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] } } }, @@ -8429,8 +8739,10 @@ "type": "string" }, "prompt": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "toolName": { "type": "string" @@ -8477,12 +8789,14 @@ } }, "permission": { - "allOf": [ + "oneOf": [ + { + "type": "null" + }, { "$ref": "#/components/schemas/PermissionLevel" } - ], - "nullable": true + ] } } }, @@ -8557,7 +8871,8 @@ "description": "MIME type of the audio (e.g., \"audio/webm\", \"audio/wav\")" }, "provider": { - "$ref": "#/components/schemas/DictationProvider" + "$ref": "#/components/schemas/DictationProvider", + "description": "Transcription provider to use" } } }, @@ -8611,25 +8926,33 @@ "description": "UI-specific metadata for MCP resources", "properties": { "csp": { - "allOf": [ + "oneOf": [ { - "$ref": "#/components/schemas/CspMetadata" + "type": "null" + }, + { + "$ref": "#/components/schemas/CspMetadata", + "description": "Content Security Policy configuration" } - ], - "nullable": true + ] }, "domain": { - "type": "string", - "description": "Preferred domain for the app (used for CORS)", - "nullable": true + "type": [ + "string", + "null" + ], + "description": "Preferred domain for the app (used for CORS)" }, "permissions": { - "$ref": "#/components/schemas/PermissionsMetadata" + "$ref": "#/components/schemas/PermissionsMetadata", + "description": "Sandbox permissions requested by the UI" }, "prefersBorder": { - "type": "boolean", - "description": "Whether the app prefers to have a border around it", - "nullable": true + "type": [ + "boolean", + "null" + ], + "description": "Whether the app prefers to have a border around it" } } }, @@ -8650,12 +8973,16 @@ "type": "string" }, "base_path": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "catalog_provider_id": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "display_name": { "type": "string" @@ -8664,11 +8991,16 @@ "type": "string" }, "headers": { - "type": "object", + "type": [ + "object", + "null" + ], "additionalProperties": { "type": "string" }, - "nullable": true + "propertyNames": { + "type": "string" + } }, "models": { "type": "array", @@ -8680,8 +9012,10 @@ "type": "boolean" }, "supports_streaming": { - "type": "boolean", - "nullable": true + "type": [ + "boolean", + "null" + ] } } }, @@ -8704,21 +9038,30 @@ ], "properties": { "context_limit": { - "type": "integer", - "nullable": true, + "type": [ + "integer", + "null" + ], "minimum": 0 }, "model": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "provider": { "type": "string" }, "request_params": { - "type": "object", + "type": [ + "object", + "null" + ], "additionalProperties": {}, - "nullable": true + "propertyNames": { + "type": "string" + } }, "session_id": { "type": "string" @@ -8755,8 +9098,10 @@ ], "properties": { "goose_mode": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "session_id": { "type": "string" @@ -8774,6 +9119,9 @@ "description": "Recipe parameter values entered by the user", "additionalProperties": { "type": "string" + }, + "propertyNames": { + "type": "string" } } } diff --git a/ui/desktop/src/api/client.gen.ts b/ui/desktop/src/api/client.gen.ts index d81ce3f8f717..cab3c70195b3 100644 --- a/ui/desktop/src/api/client.gen.ts +++ b/ui/desktop/src/api/client.gen.ts @@ -11,6 +11,6 @@ import type { ClientOptions as ClientOptions2 } from './types.gen'; * `setConfig()`. This is useful for example if you're using Next.js * to ensure your client always has the correct values. */ -export type CreateClientConfig = (override?: Config) => Config & T> | Promise & T>>; +export type CreateClientConfig = (override?: Config) => Config & T>; export const client = createClient(createConfig()); diff --git a/ui/desktop/src/api/client/types.gen.ts b/ui/desktop/src/api/client/types.gen.ts index 8c0df2321e82..a3f86165116b 100644 --- a/ui/desktop/src/api/client/types.gen.ts +++ b/ui/desktop/src/api/client/types.gen.ts @@ -190,7 +190,7 @@ export type Client = CoreClient */ export type CreateClientConfig = ( override?: Config, -) => Config & T> | Promise & T>>; +) => Config & T>; export interface TDataShape { body?: unknown; diff --git a/ui/desktop/src/api/core/params.gen.ts b/ui/desktop/src/api/core/params.gen.ts index 7955601a5cc0..6099cab1b428 100644 --- a/ui/desktop/src/api/core/params.gen.ts +++ b/ui/desktop/src/api/core/params.gen.ts @@ -96,7 +96,7 @@ interface Params { const stripEmptySlots = (params: Params) => { for (const [slot, value] of Object.entries(params)) { - if (value && typeof value === 'object' && !Array.isArray(value) && !Object.keys(value).length) { + if (value && typeof value === 'object' && !Object.keys(value).length) { delete params[slot as Slot]; } } diff --git a/ui/desktop/src/api/types.gen.ts b/ui/desktop/src/api/types.gen.ts index e88a973686eb..48b26c03a6b2 100644 --- a/ui/desktop/src/api/types.gen.ts +++ b/ui/desktop/src/api/types.gen.ts @@ -168,13 +168,13 @@ export type CreateCustomProviderResponse = { }; export type CreateRecipeRequest = { - author?: AuthorRequest | null; + author?: null | AuthorRequest; session_id: string; }; export type CreateRecipeResponse = { error?: string | null; - recipe?: Recipe | null; + recipe?: null | Recipe; }; export type CreateScheduleRequest = { @@ -300,6 +300,9 @@ export type DownloadProgress = { * Download speed in bytes per second */ speed_bps?: number | null; + /** + * Download status + */ status: DownloadStatus; /** * Total bytes to download @@ -419,9 +422,6 @@ export type ExtensionConfig = { * The name used to identify this extension */ name: string; - /** - * The tools provided by the frontend - */ tools: Array; type: 'frontend'; } | { @@ -506,7 +506,7 @@ export type GetToolsQuery = { session_id: string; }; -export type GooseApp = McpAppResource & (WindowProps | null) & { +export type GooseApp = McpAppResource & (null | WindowProps) & { mcpServers?: Array; prd?: string | null; }; @@ -624,7 +624,7 @@ export type LocalModelResponse = { * Represents a UI resource that can be rendered in an MCP App */ export type McpAppResource = { - _meta?: ResourceMetadata | null; + _meta?: null | ResourceMetadata; /** * Base64-encoded binary content (alternative to text) */ @@ -811,7 +811,7 @@ export type ModelInfoQuery = { }; export type ModelInfoResponse = { - model_info?: ModelInfoData | null; + model_info?: null | ModelInfoData; source: string; }; @@ -1023,15 +1023,15 @@ export type ReadResourceResponse = { export type Recipe = { activities?: Array | null; - author?: Author | null; + author?: null | Author; description: string; extensions?: Array | null; instructions?: string | null; parameters?: Array | null; prompt?: string | null; - response?: Response | null; - retry?: RetryConfig | null; - settings?: Settings | null; + response?: null | Response; + retry?: null | RetryConfig; + settings?: null | Settings; sub_recipes?: Array | null; title: string; version?: string; @@ -1101,7 +1101,7 @@ export type ResourceContents = { * Resource metadata containing UI configuration */ export type ResourceMetadata = { - ui?: UiMetadata | null; + ui?: null | UiMetadata; }; export type Response = { @@ -1217,18 +1217,18 @@ export type Session = { accumulated_input_tokens?: number | null; accumulated_output_tokens?: number | null; accumulated_total_tokens?: number | null; - conversation?: Conversation | null; + conversation?: null | Conversation; created_at: string; extension_data: ExtensionData; goose_mode?: GooseMode; id: string; input_tokens?: number | null; message_count: number; - model_config?: ModelConfig | null; + model_config?: null | ModelConfig; name: string; output_tokens?: number | null; provider_name?: string | null; - recipe?: Recipe | null; + recipe?: null | Recipe; schedule_id?: string | null; session_type?: SessionType; total_tokens?: number | null; @@ -1326,7 +1326,7 @@ export type SlashCommandsResponse = { export type StartAgentRequest = { extension_overrides?: Array | null; - recipe?: Recipe | null; + recipe?: null | Recipe; recipe_deeplink?: string | null; recipe_id?: string | null; working_dir: string; @@ -1472,7 +1472,7 @@ export type ToolInfo = { }; name: string; parameters: Array; - permission?: PermissionLevel | null; + permission?: null | PermissionLevel; }; export type ToolPermission = { @@ -1512,6 +1512,9 @@ export type TranscribeRequest = { * MIME type of the audio (e.g., "audio/webm", "audio/wav") */ mime_type: string; + /** + * Transcription provider to use + */ provider: DictationProvider; }; @@ -1535,11 +1538,14 @@ export type TunnelState = 'idle' | 'starting' | 'running' | 'error' | 'disabled' * UI-specific metadata for MCP resources */ export type UiMetadata = { - csp?: CspMetadata | null; + csp?: null | CspMetadata; /** * Preferred domain for the app (used for CORS) */ domain?: string | null; + /** + * Sandbox permissions requested by the UI + */ permissions?: PermissionsMetadata; /** * Whether the app prefers to have a border around it @@ -2032,7 +2038,7 @@ export type GetToolsData = { /** * Optional extension name to filter tools */ - extension_name?: string | null; + extension_name?: string; /** * Required session ID to scope tools to a specific session */ @@ -2601,7 +2607,7 @@ export type GetProviderCatalogData = { /** * Filter by provider format (openai, anthropic, ollama) */ - format?: string | null; + format?: string; }; url: '/config/provider-catalog'; }; @@ -3361,7 +3367,7 @@ export type SearchHfModelsData = { /** * Max results */ - limit?: number | null; + limit?: number; }; url: '/local-inference/search'; }; @@ -4119,15 +4125,15 @@ export type SearchSessionsData = { /** * Maximum results (default: 10, max: 50) */ - limit?: number | null; + limit?: number; /** * Filter after date (ISO 8601) */ - after_date?: string | null; + after_date?: string; /** * Filter before date (ISO 8601) */ - before_date?: string | null; + before_date?: string; }; url: '/sessions/search'; };