diff --git a/.github/workflows/prompty-rust.yml b/.github/workflows/prompty-rust.yml index 844be314d..9773cc7eb 100644 --- a/.github/workflows/prompty-rust.yml +++ b/.github/workflows/prompty-rust.yml @@ -4,6 +4,11 @@ on: push: tags: - 'rust/*' + pull_request: + types: [closed] + paths: + - 'runtime/rust/**' + - '.github/workflows/prompty-rust.yml' workflow_dispatch: permissions: @@ -11,38 +16,80 @@ permissions: jobs: test: + if: | + github.event_name != 'pull_request' || + (github.event.pull_request.merged == true && + contains(github.event.pull_request.labels.*.name, 'release: rust')) uses: ./.github/workflows/prompty-rust-check.yml publish: name: publish to crates.io runs-on: ubuntu-latest needs: test - if: startsWith(github.ref, 'refs/tags/rust/') + if: | + startsWith(github.ref, 'refs/tags/rust/') || + (github.event_name == 'pull_request' && + github.event.pull_request.merged == true && + contains(github.event.pull_request.labels.*.name, 'release: rust')) permissions: - contents: read + contents: write defaults: run: working-directory: runtime/rust steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.merge_commit_sha || github.ref }} - name: Install Rust toolchain uses: dtolnay/rust-toolchain@stable - - name: Verify tag matches source version + - name: Resolve release version run: | - TAG_VERSION="${GITHUB_REF_NAME#rust/}" SOURCE_VERSION=$(grep '^version' prompty/Cargo.toml | head -1 | sed 's/.*"\(.*\)".*/\1/') - echo "tag=$TAG_VERSION source=$SOURCE_VERSION" - if [ "$TAG_VERSION" != "$SOURCE_VERSION" ]; then - echo "::error::Tag version ($TAG_VERSION) does not match source version ($SOURCE_VERSION). Run the release script to bump versions before tagging." - exit 1 + + if [[ "$GITHUB_REF" == refs/tags/rust/* ]]; then + TAG_VERSION="${GITHUB_REF_NAME#rust/}" + echo "tag=$TAG_VERSION source=$SOURCE_VERSION" + if [ "$TAG_VERSION" != "$SOURCE_VERSION" ]; then + echo "::error::Tag version ($TAG_VERSION) does not match source version ($SOURCE_VERSION). Run the release script to bump versions before tagging." + exit 1 + fi + else + TAG_VERSION="$SOURCE_VERSION" + echo "release-pr-version=$TAG_VERSION" fi + echo "VERSION=$TAG_VERSION" >> "$GITHUB_ENV" + echo "TAG_NAME=rust/$TAG_VERSION" >> "$GITHUB_ENV" - name: Verify build run: cargo build --workspace + - name: Verify package contents + run: cargo package --workspace --locked + + - name: Create release tag from merged PR + if: github.event_name == 'pull_request' + working-directory: . + run: | + if git ls-remote --exit-code --tags origin "refs/tags/$TAG_NAME" >/dev/null 2>&1; then + git fetch --depth=1 origin "refs/tags/$TAG_NAME:refs/tags/$TAG_NAME" + TAG_SHA=$(git rev-list -n 1 "$TAG_NAME") + HEAD_SHA=$(git rev-parse HEAD) + if [ "$TAG_SHA" != "$HEAD_SHA" ]; then + echo "::error::Tag $TAG_NAME already exists at $TAG_SHA, not current release commit $HEAD_SHA." + exit 1 + fi + echo "$TAG_NAME already exists on this commit; continuing." + else + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git tag -a "$TAG_NAME" -m "$TAG_NAME" + git push origin "refs/tags/$TAG_NAME" + fi + # Publish in dependency order — each crate must be available before its dependents. # publish_crate helper: skips if already published, retries on index lag. - name: Publish crates diff --git a/runtime/go/prompty/model/model_capabilities.json b/runtime/go/prompty/model/model_capabilities.json index 7c7f6db19..6951f344f 100644 --- a/runtime/go/prompty/model/model_capabilities.json +++ b/runtime/go/prompty/model/model_capabilities.json @@ -45,6 +45,11 @@ "inputModalities": ["text"], "outputModalities": [] }, + { + "prefix": "gpt-image-1", + "inputModalities": ["text", "image"], + "outputModalities": ["image"] + }, { "prefix": "dall-e-3", "inputModalities": ["text"], diff --git a/runtime/java/prompty/src/main/resources/com/microsoft/prompty/model_capabilities.json b/runtime/java/prompty/src/main/resources/com/microsoft/prompty/model_capabilities.json index 7c7f6db19..6951f344f 100644 --- a/runtime/java/prompty/src/main/resources/com/microsoft/prompty/model_capabilities.json +++ b/runtime/java/prompty/src/main/resources/com/microsoft/prompty/model_capabilities.json @@ -45,6 +45,11 @@ "inputModalities": ["text"], "outputModalities": [] }, + { + "prefix": "gpt-image-1", + "inputModalities": ["text", "image"], + "outputModalities": ["image"] + }, { "prefix": "dall-e-3", "inputModalities": ["text"], diff --git a/runtime/python/prompty/prompty/providers/model_capabilities.json b/runtime/python/prompty/prompty/providers/model_capabilities.json index 7c7f6db19..6951f344f 100644 --- a/runtime/python/prompty/prompty/providers/model_capabilities.json +++ b/runtime/python/prompty/prompty/providers/model_capabilities.json @@ -45,6 +45,11 @@ "inputModalities": ["text"], "outputModalities": [] }, + { + "prefix": "gpt-image-1", + "inputModalities": ["text", "image"], + "outputModalities": ["image"] + }, { "prefix": "dall-e-3", "inputModalities": ["text"], diff --git a/runtime/rust/.env.example b/runtime/rust/.env.example index 217667051..dcb0b35d7 100644 --- a/runtime/rust/.env.example +++ b/runtime/rust/.env.example @@ -2,7 +2,7 @@ OPENAI_API_KEY= OPENAI_MODEL=gpt-4o-mini OPENAI_EMBEDDING_MODEL=text-embedding-3-small -OPENAI_IMAGE_MODEL=dall-e-2 +OPENAI_IMAGE_MODEL=gpt-image-1 # Azure OpenAI / Foundry AZURE_OPENAI_API_KEY= diff --git a/runtime/rust/Cargo.lock b/runtime/rust/Cargo.lock index 41362bf0b..5a26c84fb 100644 --- a/runtime/rust/Cargo.lock +++ b/runtime/rust/Cargo.lock @@ -10,27 +10,27 @@ checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "aho-corasick" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" +checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba" dependencies = [ "memchr", ] [[package]] name = "android_system_properties" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc" dependencies = [ "libc", ] [[package]] name = "async-compression" -version = "0.4.42" +version = "0.4.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79b3f8a79cccc2898f31920fc69f304859b3bd567490f75ebf51ae1c792a9ac" +checksum = "4f10dafd0c8d2e51ae9a748805777613ed0bbe17bf586b76c8311f45c020a32f" dependencies = [ "compression-codecs", "compression-core", @@ -57,7 +57,7 @@ checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667" dependencies = [ "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.5", ] [[package]] @@ -72,41 +72,77 @@ version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" +[[package]] +name = "aws-lc-rs" +version = "1.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b281d307588d634de920874890732659e2e7672f72b5e10e81badc1a8a83621e" +dependencies = [ + "aws-lc-sys", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bff6c3b54fad79a2e60b8102caf565819711497c1f5f092f49508e2f5c31b27" +dependencies = [ + "cc", + "cmake", + "dunce", + "fs_extra", + "pkg-config", +] + [[package]] name = "azure_core" -version = "0.23.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0435fd24f90b870a2b5010a0431ba69b316b6cdf880ae1cf7701671b465ddca" +checksum = "4e41cbd819986ba41904c207d8ffc4106f8f8352a548d773e9554906379bb2fb" dependencies = [ "async-lock", "async-trait", + "azure_core_macros", "bytes", "futures", "pin-project", "rustc_version", "serde", "serde_json", + "tokio", "tracing", "typespec", "typespec_client_core", ] +[[package]] +name = "azure_core_macros" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9b52dba6a345f3ad2d42ff8d0d63df9d0994cfa29657bf18ffdbf149f78a4f5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", + "tracing", +] + [[package]] name = "azure_identity" -version = "0.23.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "236e688ca5a4a5cb44b39292776d780694c977d563cd8e6c0f4dde6dee596197" +checksum = "32edf96b356ca7c51d7590c4925cc36efc3947a5da4468e8e0b25c56ecbb3de5" dependencies = [ "async-lock", "async-trait", "azure_core", "futures", - "oauth2", "pin-project", "serde", + "serde_json", "time", "tracing", - "typespec_client_core", "url", ] @@ -116,19 +152,25 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "base64" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5" + [[package]] name = "bitflags" -version = "2.13.0" +version = "2.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4388bee8683e3d04af747c73422af53102d2bd24d9eadb6cbc100baef4b43f8" +checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06" [[package]] name = "block-buffer" -version = "0.10.4" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +checksum = "d2f6c7dbe95a6ed67ad9f18e57daf93a2f034c524b99fd2b76d18fdfeb6660aa" dependencies = [ - "generic-array", + "hybrid-array", ] [[package]] @@ -145,11 +187,13 @@ checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" [[package]] name = "cc" -version = "1.2.65" +version = "1.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e228eec9be7c17ccb640b59b36a5cd805ea2a564a4c5e162c2f659fea30d3b96" +checksum = "005ec2760ca554fae18df7a11195552ec576cd665632a881bc011d5bb2fd4d80" dependencies = [ "find-msvc-tools", + "jobserver", + "libc", "shlex", ] @@ -159,6 +203,23 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" +[[package]] +name = "cfg_aliases" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" + +[[package]] +name = "chacha20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06" +dependencies = [ + "cfg-if", + "cpufeatures", + "rand_core 0.10.1", +] + [[package]] name = "chrono" version = "0.4.45" @@ -168,16 +229,34 @@ dependencies = [ "iana-time-zone", "js-sys", "num-traits", - "serde", "wasm-bindgen", "windows-link", ] +[[package]] +name = "cmake" +version = "0.1.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0f78a02292a74a88ac736019ab962ece0bc380e3f977bf72e376c5d78ff0678" +dependencies = [ + "cc", +] + +[[package]] +name = "combine" +version = "4.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfc320937d09e6de266b31b9afb480f197d7a861be86be7cb2ea7e5d1bfffc5e" +dependencies = [ + "bytes", + "memchr", +] + [[package]] name = "compression-codecs" -version = "0.4.38" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce2548391e9c1929c21bf6aa2680af86fe4c1b33e6cea9ac1cfeec0bd11218cf" +checksum = "58a6d0db8759036a783bc7c3f7a07f8cef3bf9470eb1db3bc86e8bcd1c5d0fe8" dependencies = [ "compression-core", "flate2", @@ -186,9 +265,15 @@ dependencies = [ [[package]] name = "compression-core" -version = "0.4.32" +version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc14f565cf027a105f7a44ccf9e5b424348421a1d8952a8fc9d499d313107789" +checksum = "6e8ccc4ea9f6acc32d102c0f6d471d11d913ad15f20c04de743374861fa1d414" + +[[package]] +name = "const-oid" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c" [[package]] name = "core-foundation" @@ -216,32 +301,37 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +[[package]] +name = "core_detect" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f8f80099a98041a3d1622845c271458a2d73e688351bf3cb999266764b81d48" + [[package]] name = "cpufeatures" -version = "0.2.17" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +checksum = "5ca28b0ae3115b884660db4118d803791fd6756b6e88f39c0f3f7859060d7566" dependencies = [ "libc", ] [[package]] name = "crc32fast" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +checksum = "8498c871161e1742aaa9d52551b2d6ebdd4c3d45a3be423e3728f33b955be550" dependencies = [ "cfg-if", ] [[package]] name = "crypto-common" -version = "0.1.7" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453" dependencies = [ - "generic-array", - "typenum", + "hybrid-array", ] [[package]] @@ -255,14 +345,32 @@ dependencies = [ [[package]] name = "digest" -version = "0.10.7" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" dependencies = [ "block-buffer", + "const-oid", "crypto-common", ] +[[package]] +name = "displaydoc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.5", +] + +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + [[package]] name = "dyn-clone" version = "1.0.20" @@ -271,11 +379,17 @@ checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" [[package]] name = "encoding_rs" -version = "0.8.35" +version = "0.8.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +checksum = "7b5ef0006ac9ab233c38522f5ae99cae3625151de8f706cacee1cba4b8e2832a" dependencies = [ "cfg-if", + "core_detect", + "multiversion", + "multiversion_no_op", + "rustversion", + "scopeguard", + "simdutf8", ] [[package]] @@ -291,7 +405,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -314,26 +428,21 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "fastrand" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" - [[package]] name = "find-msvc-tools" -version = "0.1.9" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" +checksum = "3e0f1c7c3a72c66fd80abe965175f7523475c0489a87d3ff9d6e8c87d87a9d2d" [[package]] name = "flate2" -version = "1.1.9" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" +checksum = "6e634e2e0ebac1ee034020da1ca582e17ffe4e0f5e985823721e168928136dcb" dependencies = [ "crc32fast", "miniz_oxide", + "zlib-rs", ] [[package]] @@ -342,21 +451,6 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - [[package]] name = "form_urlencoded" version = "1.2.2" @@ -366,6 +460,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + [[package]] name = "futures" version = "0.3.34" @@ -422,7 +522,7 @@ checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44" dependencies = [ "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.5", ] [[package]] @@ -454,16 +554,6 @@ dependencies = [ "slab", ] -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - [[package]] name = "getrandom" version = "0.2.17" @@ -496,15 +586,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" dependencies = [ "cfg-if", + "js-sys", "libc", "r-efi 6.0.0", + "rand_core 0.10.1", + "wasm-bindgen", ] [[package]] name = "h2" -version = "0.4.15" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cb093c84e8bd9b188d4c4a8cb6579fc016968d14c99882163cd3ff402a4f155" +checksum = "ef8e5e5a340588f4452631496976cf8636d4a7ecf600239fdc27615d2530bc16" dependencies = [ "atomic-waker", "bytes", @@ -527,18 +620,15 @@ checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" [[package]] name = "html-escape" -version = "0.2.13" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d1ad449764d627e22bfd7cd5e8868264fc9236e07c752972b4080cd351cb476" -dependencies = [ - "utf8-width", -] +checksum = "c9356095b4b41197bba32173600e1582792cda618f65d12f68e2e77d273413c5" [[package]] name = "http" -version = "1.4.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6970f50e31d6fc17d3fa27329444bfa74e196cf62e95052a3f6fee181dba6425" +checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0" dependencies = [ "bytes", "itoa", @@ -546,9 +636,9 @@ dependencies = [ [[package]] name = "http-body" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c" dependencies = [ "bytes", "http", @@ -556,9 +646,9 @@ dependencies = [ [[package]] name = "http-body-util" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +checksum = "23169fe34a5fbcdd3f3862e78fb9b6fccd5f02a6dc6f732547005d45631ce71c" dependencies = [ "bytes", "futures-core", @@ -573,11 +663,20 @@ version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" +[[package]] +name = "hybrid-array" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27f864f10dfb56725ce5ce5472bc52252c8f93a4ab86327122cebf62c5f59a17" +dependencies = [ + "typenum", +] + [[package]] name = "hyper" -version = "1.10.1" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55281c53a1894c864990125767da440a4e630446785086f52523b20033b74498" +checksum = "27b501faa50e7a26c3d3560ca625132f4078a17771f4810baf70475ae48cbe43" dependencies = [ "atomic-waker", "bytes", @@ -609,29 +708,13 @@ dependencies = [ "tower-service", ] -[[package]] -name = "hyper-tls" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" -dependencies = [ - "bytes", - "http-body-util", - "hyper", - "hyper-util", - "native-tls", - "tokio", - "tokio-native-tls", - "tower-service", -] - [[package]] name = "hyper-util" version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" dependencies = [ - "base64", + "base64 0.22.1", "bytes", "futures-channel", "futures-util", @@ -675,41 +758,114 @@ dependencies = [ ] [[package]] -name = "idna" -version = "1.1.0" +name = "icu_collections" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +checksum = "fa68d21081c4a05d5a901a1c62add574c77048b6a1c67be3b50ce0b60d4ca513" dependencies = [ - "idna_adapter", - "smallvec", + "displaydoc", + "potential_utf", "utf8_iter", + "yoke", + "zerofrom", + "zerovec", ] [[package]] -name = "idna_adapter" -version = "1.1.0" +name = "icu_locale_core" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "279259b0ac81c89d11c290495fdcfa96ea3643b7df311c138b6fe8ca5237f0f8" +checksum = "d56e28588da92eee5c3201a6eff33fabdd49b62269c8938d4ff050ce4d900deb" dependencies = [ - "idna_mapping", - "unicode-bidi", - "unicode-normalization", + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", ] [[package]] -name = "idna_mapping" +name = "icu_normalizer" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f9cf5f235641ed274641dd81c3f28d870e276763d0797aeeab72317b1c646f" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1563da1ed3e0b3bf3d74c9b85917ac9c56464d2f57242270c09c9e752f8021a0" + +[[package]] +name = "icu_properties" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e7ca276ad3145661a65914e6daf131ca5120cd3dcee8f8f3214b8875184a148" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e590f038c1464a96894fd6d10127e90a8be4509f56ff7ecef851b15cee0b7caa" + +[[package]] +name = "icu_provider" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d27bbb9d3abbefac45d55f647c9de1d44aafcd1186eb91879afef17c396c3e73" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "idna" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11c13906586a4b339310541a274dd927aff6fcbb5b8e3af90634c4b31681c792" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" dependencies = [ - "unicode-joining-type", + "icu_normalizer", + "icu_properties", ] [[package]] name = "indexmap" -version = "2.14.0" +version = "2.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" +checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855" dependencies = [ "equivalent", "hashbrown", @@ -717,9 +873,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.12.0" +version = "2.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" +checksum = "791930b43c0d5973160d90a8f3894509f2b273430f5c5c73b668636d0287c5c0" [[package]] name = "itoa" @@ -727,11 +883,70 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" +[[package]] +name = "jni" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498" +dependencies = [ + "cfg-if", + "combine", + "jni-macros", + "jni-sys", + "log", + "simd_cesu8", + "thiserror", + "walkdir", + "windows-link", +] + +[[package]] +name = "jni-macros" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "simd_cesu8", + "syn 2.0.119", +] + +[[package]] +name = "jni-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn 2.0.119", +] + +[[package]] +name = "jobserver" +version = "0.1.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3" +dependencies = [ + "getrandom 0.4.3", + "libc", +] + [[package]] name = "js-sys" -version = "0.3.103" +version = "0.3.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b44bfcdb3f8d5837a46dae1ca9660a837176eee74a28b229bc626816589102" +checksum = "ce57d20d1ea864ce2ac172ab472d409214f4fd359f0b2a2775abdf522e2af99e" dependencies = [ "cfg-if", "futures-util", @@ -740,15 +955,15 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.186" +version = "0.2.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" +checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" [[package]] -name = "linux-raw-sys" -version = "0.12.1" +name = "litemap" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" +checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae" [[package]] name = "lock_api" @@ -761,21 +976,27 @@ dependencies = [ [[package]] name = "log" -version = "0.4.33" +version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad" +checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6" + +[[package]] +name = "lru-slab" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" [[package]] name = "memchr" -version = "2.8.2" +version = "2.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88904434abc2901f197fe8cc55f0445e7ded921dba5911dad2e2b39b48e663c4" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" [[package]] name = "memo-map" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d1115007560874e373613744c6fba374c17688327a71c1476d1a5954cc857b" +checksum = "5449c8c750f1a07ea702bbd212bd999fceece9b3d1508b17023b3e174583124b" [[package]] name = "mime" @@ -795,9 +1016,9 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.8.9" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +checksum = "b63fbc4a50860e98e7b2aa7804ded1db5cbc3aff9193adaff57a6931bf7c4b4c" dependencies = [ "adler2", "simd-adler32", @@ -805,9 +1026,9 @@ dependencies = [ [[package]] name = "mio" -version = "1.2.1" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02bd0af71c67b473010cbbc60715ee815645a4dc942899111f494b4b737d6fda" +checksum = "4b18443e9c262bfe8fa82f51666e2642c53393f7e5c27b3e1aeab922cff5b9d8" dependencies = [ "libc", "wasi", @@ -815,22 +1036,32 @@ dependencies = [ ] [[package]] -name = "native-tls" -version = "0.2.18" +name = "multiversion" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "465500e14ea162429d264d44189adc38b199b62b1c21eea9f69e4b73cb03bbf2" +checksum = "b4ca4bea16ffc3f443cf7d866912118196bfef4c6a1556ca00f9f9b00bb43f7c" dependencies = [ - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", + "multiversion-macros", ] +[[package]] +name = "multiversion-macros" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d416831a7317ef4b08bee00b69cbbb9c8763da7959a7026244d6266869f9c83" +dependencies = [ + "proc-macro2", + "quote", + "rustversion", + "syn 3.0.5", +] + +[[package]] +name = "multiversion_no_op" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "743fb55ba31b18fb1ecef6bdc9aa2743314978ac084044301a7eee33fb99a20d" + [[package]] name = "num-conv" version = "0.2.2" @@ -846,74 +1077,18 @@ dependencies = [ "autocfg", ] -[[package]] -name = "oauth2" -version = "5.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51e219e79014df21a225b1860a479e2dcd7cbd9130f4defd4bd0e191ea31d67d" -dependencies = [ - "base64", - "chrono", - "getrandom 0.2.17", - "http", - "rand 0.8.6", - "serde", - "serde_json", - "serde_path_to_error", - "sha2", - "thiserror 1.0.69", - "url", -] - [[package]] name = "once_cell" version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" -[[package]] -name = "openssl" -version = "0.10.81" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77823a27f0babb03091cb9ed9ef80af3b39dbc82f97e8fa530374b7dafd87a45" -dependencies = [ - "bitflags", - "cfg-if", - "foreign-types", - "libc", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.118", -] - [[package]] name = "openssl-probe" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" -[[package]] -name = "openssl-sys" -version = "0.9.117" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b47e7e6bb2c38cd930d25a23b40fa52e068c10e85f3e03a7f5ba5aaca5713695" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - [[package]] name = "opentelemetry" version = "0.32.0" @@ -924,7 +1099,7 @@ dependencies = [ "futures-sink", "js-sys", "pin-project-lite", - "thiserror 2.0.20", + "thiserror", "tracing", ] @@ -951,8 +1126,8 @@ dependencies = [ "opentelemetry", "percent-encoding", "portable-atomic", - "rand 0.9.4", - "thiserror 2.0.20", + "rand 0.9.5", + "thiserror", ] [[package]] @@ -1007,7 +1182,7 @@ checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -1018,9 +1193,9 @@ checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" [[package]] name = "pkg-config" -version = "0.3.33" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e" +checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548" [[package]] name = "portable-atomic" @@ -1028,6 +1203,15 @@ version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85" +[[package]] +name = "potential_utf" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d83eb9bc6d8e5cf568e7a1101d60ee05e81ed50ea106026f3d18deeb046d7661" +dependencies = [ + "zerovec", +] + [[package]] name = "powerfmt" version = "0.2.0" @@ -1045,16 +1229,16 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.106" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" dependencies = [ "unicode-ident", ] [[package]] name = "prompty" -version = "2.0.0-beta.4" +version = "2.0.0" dependencies = [ "async-trait", "chrono", @@ -1065,20 +1249,20 @@ dependencies = [ "opentelemetry_sdk", "prompty-anthropic", "prompty-openai", - "rand 0.9.4", + "rand 0.9.5", "regex", "ribboncurls", "serde", "serde_json", "serde_yaml", "serial_test", - "thiserror 2.0.20", + "thiserror", "tokio", ] [[package]] name = "prompty-anthropic" -version = "2.0.0-beta.4" +version = "2.0.0" dependencies = [ "async-trait", "bytes", @@ -1093,17 +1277,17 @@ dependencies = [ [[package]] name = "prompty-foundry" -version = "2.0.0-beta.4" +version = "2.0.0" dependencies = [ "async-trait", "azure_core", "azure_identity", - "base64", + "base64 0.23.1", "bytes", "futures", "prompty", "prompty-openai", - "rand 0.9.4", + "rand 0.9.5", "reqwest", "serde", "serde_json", @@ -1114,7 +1298,7 @@ dependencies = [ [[package]] name = "prompty-openai" -version = "2.0.0-beta.4" +version = "2.0.0" dependencies = [ "async-trait", "bytes", @@ -1127,11 +1311,68 @@ dependencies = [ "tokio", ] +[[package]] +name = "quinn" +version = "0.11.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c1a41e437b6bbd489372cd4971de128e85c855f56c57f283d20ff016cf7c0a8" +dependencies = [ + "bytes", + "cfg_aliases", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "socket2", + "thiserror", + "tokio", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-proto" +version = "0.11.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04759210543be93709136e28212294a659ef5001836ff4eab4d663e4529bba83" +dependencies = [ + "aws-lc-rs", + "bytes", + "getrandom 0.4.3", + "lru-slab", + "rand 0.10.2", + "rand_pcg", + "ring", + "rustc-hash", + "rustls", + "rustls-pki-types", + "slab", + "thiserror", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35a133f956daabe89a61a685c2649f13d82d5aa4bd5d12d1277e1072a21c0694" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.61.2", +] + [[package]] name = "quote" -version = "1.0.46" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbc457d0c7a0759a614551b11a6409e5951f6c7537be1f1b7682b9ae9230368" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" dependencies = [ "proc-macro2", ] @@ -1150,33 +1391,23 @@ checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" [[package]] name = "rand" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a" -dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - -[[package]] -name = "rand" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea" +checksum = "b9ef1d0d795eb7d84685bca4f72f3649f064e6641543d3a8c415898726a57b41" dependencies = [ - "rand_chacha 0.9.0", + "rand_chacha", "rand_core 0.9.5", ] [[package]] -name = "rand_chacha" -version = "0.3.1" +name = "rand" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80" dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", + "chacha20", + "getrandom 0.4.3", + "rand_core 0.10.1", ] [[package]] @@ -1191,20 +1422,26 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.6.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" dependencies = [ - "getrandom 0.2.17", + "getrandom 0.3.4", ] [[package]] name = "rand_core" -version = "0.9.5" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" + +[[package]] +name = "rand_pcg" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caa0f4137e1c0a72f4c651489402276c8e8e1cf081f3b0ba156d2cbeef09e86a" dependencies = [ - "getrandom 0.3.4", + "rand_core 0.10.1", ] [[package]] @@ -1247,11 +1484,11 @@ checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" [[package]] name = "reqwest" -version = "0.12.28" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" +checksum = "16a1cfa75cc186dd73d5818e510e042e40927bccc9c236b061cea97e1eb08029" dependencies = [ - "base64", + "base64 0.23.1", "bytes", "encoding_rs", "futures-core", @@ -1262,21 +1499,22 @@ dependencies = [ "http-body-util", "hyper", "hyper-rustls", - "hyper-tls", "hyper-util", "js-sys", "log", "mime", - "native-tls", "percent-encoding", "pin-project-lite", + "quinn", + "rustls", "rustls-pki-types", + "rustls-platform-verifier", "serde", "serde_json", "serde_urlencoded", "sync_wrapper", "tokio", - "tokio-native-tls", + "tokio-rustls", "tokio-util", "tower", "tower-http", @@ -1290,15 +1528,15 @@ dependencies = [ [[package]] name = "ribboncurls" -version = "0.2.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0159faf91aa68fbc9798280fdda9f704871561156ffd0f1f49cee80b6000c828" +checksum = "3a84d7c7e7d7997bc0d08d5f9a2cc8beed62b23848705fd27daea02301c78bc5" dependencies = [ "html-escape", "regex", "serde", "serde_yaml", - "thiserror 1.0.69", + "thiserror", ] [[package]] @@ -1315,6 +1553,12 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "rustc-hash" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d" + [[package]] name = "rustc_version" version = "0.4.1" @@ -1324,25 +1568,13 @@ dependencies = [ "semver", ] -[[package]] -name = "rustix" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" -dependencies = [ - "bitflags", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.52.0", -] - [[package]] name = "rustls" -version = "0.23.41" +version = "0.23.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b92b125634d9b795e7beca796cc790df15a7fb38323bf3196fda83292d06b1f" +checksum = "6725596c3f2c3a0aef021139e145d4eafe314a6623e4680ca83852b2c67ab2ba" dependencies = [ + "aws-lc-rs", "once_cell", "rustls-pki-types", "rustls-webpki", @@ -1350,21 +1582,62 @@ dependencies = [ "zeroize", ] +[[package]] +name = "rustls-native-certs" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dab5152771c58876a2146916e53e35057e1a4dfa2b9df0f0305b07f611fdea4d" +dependencies = [ + "openssl-probe", + "rustls-pki-types", + "schannel", + "security-framework", +] + [[package]] name = "rustls-pki-types" -version = "1.15.0" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "764899a24af3980067ee14bc143654f297b22eaebfe3c7b6b211920a5a59b046" +checksum = "2f4925028c7eb5d1fcdaf196971378ed9d2c1c4efc7dc5d011256f76c99c0a96" dependencies = [ + "web-time", "zeroize", ] +[[package]] +name = "rustls-platform-verifier" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d1e2536ce4f35f4846aa13bff16bd0ff40157cdb14cc056c7b14ba41233ba0" +dependencies = [ + "core-foundation 0.10.1", + "core-foundation-sys", + "jni", + "log", + "once_cell", + "rustls", + "rustls-native-certs", + "rustls-platform-verifier-android", + "rustls-webpki", + "security-framework", + "security-framework-sys", + "webpki-root-certs", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls-platform-verifier-android" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" + [[package]] name = "rustls-webpki" -version = "0.103.13" +version = "0.103.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" +checksum = "f3c3cf1d8b1e7d4927e2d154c3fcb02979afb9939629c62cd9048d4f07b60ac2" dependencies = [ + "aws-lc-rs", "ring", "rustls-pki-types", "untrusted", @@ -1372,9 +1645,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" [[package]] name = "ryu" @@ -1382,6 +1655,15 @@ version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + [[package]] name = "schannel" version = "0.1.29" @@ -1453,7 +1735,7 @@ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" dependencies = [ "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.5", ] [[package]] @@ -1469,17 +1751,6 @@ dependencies = [ "zmij", ] -[[package]] -name = "serde_path_to_error" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10a9ff822e371bb5403e391ecd83e182e0e77ba7f6fe0160b795797109d1b457" -dependencies = [ - "itoa", - "serde", - "serde_core", -] - [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -1507,9 +1778,9 @@ dependencies = [ [[package]] name = "serial_test" -version = "3.5.0" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "699f4197115b8a7e7ff19c9a315a4bd6fffec26cc4626ef45ecaea389e081c6d" +checksum = "a6df5ed973ad8d834e09f824f9e9f449af6b9a3745f78dec7cc752770bd3bf11" dependencies = [ "futures-executor", "futures-util", @@ -1521,20 +1792,20 @@ dependencies = [ [[package]] name = "serial_test_derive" -version = "3.5.0" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94e153fc76e1c6a068703d6d29c508a0b15c061c4b7e43da59cc097bc342673c" +checksum = "a22144e767da4ddd8416dbf383700542ffd8a5dc493dfecedfe1fe3ad03c98ae" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 3.0.5", ] [[package]] name = "sha2" -version = "0.10.9" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4" dependencies = [ "cfg-if", "cpufeatures", @@ -1559,9 +1830,25 @@ dependencies = [ [[package]] name = "simd-adler32" -version = "0.3.9" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" + +[[package]] +name = "simd_cesu8" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11031e251abf8611c80f460e19dbdeb54a66db918e49c65a7065b46ac7aec520" +dependencies = [ + "rustc_version", + "simdutf8", +] + +[[package]] +name = "simdutf8" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" [[package]] name = "slab" @@ -1571,20 +1858,26 @@ checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" [[package]] name = "smallvec" -version = "1.15.2" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" +checksum = "b9be42f50aa861c555654aa3a37f52f4b1074bacf4e48fe0ef7fa584e80f1f0f" [[package]] name = "socket2" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52d1cfed4120b4d927bf7c0f86d2087a4a7d6027c906d9f9d525a80573b9be51" +checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" dependencies = [ "libc", "windows-sys 0.61.2", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + [[package]] name = "subtle" version = "2.6.1" @@ -1593,9 +1886,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.118" +version = "2.0.119" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ae57f904213ebb649ce6895b8a66c66f0203b9319718f69a5612a065b1422" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" dependencies = [ "proc-macro2", "quote", @@ -1604,9 +1897,9 @@ dependencies = [ [[package]] name = "syn" -version = "3.0.3" +version = "3.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3" +checksum = "12df2e0110f65b775f769bb17ef989067a1d931b2eb822bd4346631eeada89f9" dependencies = [ "proc-macro2", "quote", @@ -1622,6 +1915,17 @@ dependencies = [ "futures-core", ] +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + [[package]] name = "system-configuration" version = "0.7.0" @@ -1643,46 +1947,13 @@ dependencies = [ "libc", ] -[[package]] -name = "tempfile" -version = "3.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" -dependencies = [ - "fastrand", - "getrandom 0.4.3", - "once_cell", - "rustix", - "windows-sys 0.52.0", -] - -[[package]] -name = "thiserror" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" -dependencies = [ - "thiserror-impl 1.0.69", -] - [[package]] name = "thiserror" version = "2.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec86235f5fcc2a73650310756d2ac5b138a5780bbbdfae3eeccec992c435ba4f" dependencies = [ - "thiserror-impl 2.0.20", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.118", + "thiserror-impl", ] [[package]] @@ -1693,17 +1964,16 @@ checksum = "bc04cd3e1236dd4a98afca4569f2deb3f120e5422a4023be2cb683f8486292af" dependencies = [ "proc-macro2", "quote", - "syn 3.0.3", + "syn 3.0.5", ] [[package]] name = "time" -version = "0.3.52" +version = "0.3.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e48db7b415311b615f910b3dcaa4557bcd4bf1982379c95c223fd8c2a20e210" +checksum = "cdb87b95ec50ddfa440816d227a17b2ccbdda963a316a727fda0fc4334f7d134" dependencies = [ "deranged", - "js-sys", "num-conv", "powerfmt", "serde_core", @@ -1719,19 +1989,29 @@ checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" [[package]] name = "time-macros" -version = "0.2.31" +version = "0.2.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c431b87111666e491a90baa837f914fb45cd5dc3c268591b0220ff5057f2085f" +checksum = "7e689342a48d2ea927c87ea50cabf8594854bf940e9310208848d680d668ed85" dependencies = [ "num-conv", "time-core", ] +[[package]] +name = "tinystr" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1e27c91459209c2986af3dcf603a5a74a4368754ce37414f59acc971167f643" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinyvec" -version = "1.12.0" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb4ebadaa0af04fab11ae01eb5f9fdb5f9c5b875506e210e71c07873528baa7f" +checksum = "4cf0ded5c4e56918d8f8a339e1bb67d038d3bc6d144ac407904015ba2e4cde9b" dependencies = [ "tinyvec_macros", ] @@ -1761,30 +2041,20 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.7.0" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" +checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", -] - -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", + "syn 3.0.5", ] [[package]] name = "tokio-rustls" -version = "0.26.4" +version = "0.26.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" +checksum = "b0c85f2c3ef0b1cd58b36682f4b17aaa995f0e5db534d85692b4903abce21f67" dependencies = [ "rustls", "tokio", @@ -1792,13 +2062,14 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.18" +version = "0.7.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" +checksum = "494815d09bf52b5548659851081238f0ca39ff638363907596da739561c62c52" dependencies = [ "bytes", "futures-core", "futures-sink", + "libc", "pin-project-lite", "tokio", ] @@ -1872,7 +2143,7 @@ checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -1898,11 +2169,13 @@ checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" [[package]] name = "typespec" -version = "0.3.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859b9d83198115b1db96c1bad5c53b684bdaae7cc8bb00a03f2e03549fe59ad5" +checksum = "753a2fe021e407d4fc9ee6f4f0a33403cc306d5c54c4e4ebe1b8cbde0ca052b9" dependencies = [ - "base64", + "base64 0.22.1", + "bytes", + "futures", "serde", "serde_json", "url", @@ -1910,18 +2183,17 @@ dependencies = [ [[package]] name = "typespec_client_core" -version = "0.2.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2da9e6e81b951c2b53f0ea513b441f39a43d740190f05a80f4a3fcc5ed7596e" +checksum = "0373af0f9d4f580b3a1a9d9639cedaabe015ed262b35bfbe13941bfb14fe1ea6" dependencies = [ "async-trait", - "base64", + "base64 0.22.1", "bytes", "dyn-clone", "futures", - "getrandom 0.2.17", "pin-project", - "rand 0.8.6", + "rand 0.10.2", "reqwest", "serde", "serde_json", @@ -1936,42 +2208,22 @@ dependencies = [ [[package]] name = "typespec_macros" -version = "0.2.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6a0ba07066b3e2226f04261d2fba4976959ebe373ec1d34ed85d2e391f51d3e" +checksum = "2c608f4427943f8adb211abc95c87672b1b98847152783507d54e3246e502f60" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "rustc_version", + "syn 2.0.119", ] -[[package]] -name = "unicode-bidi" -version = "0.3.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" - [[package]] name = "unicode-ident" version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" -[[package]] -name = "unicode-joining-type" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8d00a78170970967fdb83f9d49b92f959ab2bb829186b113e4f4604ad98e180" - -[[package]] -name = "unicode-normalization" -version = "0.1.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd4f6878c9cb28d874b009da9e8d183b5abc80117c40bbd187a1fde336be6e8" -dependencies = [ - "tinyvec", -] - [[package]] name = "unsafe-libyaml" version = "0.2.11" @@ -1994,15 +2246,8 @@ dependencies = [ "idna", "percent-encoding", "serde", - "serde_derive", ] -[[package]] -name = "utf8-width" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1292c0d970b54115d14f2492fe0170adf21d68a1de108eebc51c1df4f346a091" - [[package]] name = "utf8_iter" version = "1.0.4" @@ -2011,9 +2256,9 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] name = "uuid" -version = "1.23.4" +version = "1.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf80a72845275afea99e7f2b434723d3bc7e38470fcd1c7ed39a599c73319a53" +checksum = "2ef6dac1e96601b4fb3acccccff2139741fcb757cb9a36089bf5be91cfb285ce" dependencies = [ "getrandom 0.4.3", "js-sys", @@ -2021,16 +2266,14 @@ dependencies = [ ] [[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "version_check" -version = "0.9.5" +name = "walkdir" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] [[package]] name = "want" @@ -2058,9 +2301,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.126" +version = "0.2.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b067c0c11094aef6b7a801c1e34a26affafdf3d051dba08456b868789aaf9a4" +checksum = "aecb87a33d3b0c5e3b7aa46336eaf486cffafbd281b195e4c8b80d50df2351bf" dependencies = [ "cfg-if", "once_cell", @@ -2071,9 +2314,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.76" +version = "0.4.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62df1340f32221cb9c54d6a27b030e3dba64361d4a95bed55f9aacb44da291d" +checksum = "6ef4c5d3d2cdf5c54f4231181768f5510842e350db025faf1f7163b1030ed928" dependencies = [ "js-sys", "wasm-bindgen", @@ -2081,9 +2324,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.126" +version = "0.2.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167ce5e579f6bcf889c4f7175a8a5a585de84e8ff93976ce393efa5f2837aab1" +checksum = "a690d511e3c1a8b3a55e33511e3c2c00c78415cd23650f32b808627f5696b9ed" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2091,31 +2334,31 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.126" +version = "0.2.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3997c7839262f4ef12cf90b818d6340c18e80f263f1a94bf157d0ec4420380e" +checksum = "411e4887f0071ef2d2164a9d5fdf2d20efbef78fccd3a78b0c10a1dc5295e48a" dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 2.0.118", + "syn 3.0.5", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.126" +version = "0.2.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc1b4cb0cc549fcf58d7dfc081778139b3d283a081644e833e84682ad71cea24" +checksum = "81941cd78d0c92026c33e5e01312845a4cb1e9af3407f9134b100dd03144103e" dependencies = [ "unicode-ident", ] [[package]] name = "wasm-streams" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" +checksum = "9d1ec4f6517c9e11ae630e200b2b65d193279042e28edd4a2cda233e46670bbb" dependencies = [ "futures-util", "js-sys", @@ -2126,14 +2369,42 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.103" +version = "0.3.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fbddc4a036f00ec4f18c83445bd3115cb306a91da554919a099d9222fe4a7f8" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8622dcb61c0bcc9fffa6938bed81210af2da9a7e4a1a834b2e37a59b6dfb6141" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" dependencies = [ "js-sys", "wasm-bindgen", ] +[[package]] +name = "webpki-root-certs" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b96554aa2acc8ccdb7e1c9a58a7a68dd5d13bccc69cd124cb09406db612a1c9b" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + [[package]] name = "windows-core" version = "0.62.2" @@ -2155,7 +2426,7 @@ checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -2166,7 +2437,7 @@ checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", ] [[package]] @@ -2292,24 +2563,74 @@ version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" +[[package]] +name = "writeable" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc" + +[[package]] +name = "yoke" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", + "synstructure", +] + [[package]] name = "zerocopy" -version = "0.8.52" +version = "0.8.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce1022995ff5ff5d841ad7d994facc23098cd40152f2c1d11cd607c6f530653f" +checksum = "d35102a9f36d089ccae9e4c6802bc118be4487b80aaffc0ab4e0cf5ce92d2873" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.52" +version = "0.8.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "146c01f5ab44258da43cf276c74a2763db2ff3969c9c652c3f2de07041d0b2bc" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "zerofrom" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ae7f38b72ec2a254e2b87ef277cf2cd4fb97cbebf944faa6f33354da0867930" +checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 2.0.119", + "synstructure", ] [[package]] @@ -2318,8 +2639,47 @@ version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e" +[[package]] +name = "zerotrie" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ea269c3bd32f0a32c321907a2ae912ba6f4649bb0fc764a15627e99a7095a3f" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0464e17806c1d976d5cba29399c7f08e516e279e2ba493f63123b5fca67dd8" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34df6fc39dbd26ddc9c10e6a2984476e13acce22e64e4487636ef494369225da" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.5", +] + +[[package]] +name = "zlib-rs" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34b31d188d9d685a4f9c7b46d6e36631b07058d2cfe190267adce54dc230bf12" + [[package]] name = "zmij" -version = "1.0.21" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" diff --git a/runtime/rust/prompty-anthropic/Cargo.toml b/runtime/rust/prompty-anthropic/Cargo.toml index 2db25cc78..38a45f9bc 100644 --- a/runtime/rust/prompty-anthropic/Cargo.toml +++ b/runtime/rust/prompty-anthropic/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "prompty-anthropic" -version = "2.0.0-beta.4" +version = "2.0.0" edition = "2024" rust-version = "1.85" description = "Anthropic provider for Prompty — Claude Messages API executor and processor" @@ -12,14 +12,14 @@ keywords = ["llm", "prompt", "anthropic", "claude", "ai"] categories = ["development-tools"] [dependencies] -prompty = { version = "2.0.0-beta.4", path = "../prompty" } +prompty = { version = "2.0.0", path = "../prompty" } async-trait = "0.1" bytes = "1" futures = "0.3" -reqwest = { version = "0.12", features = ["json", "stream"] } +reqwest = { version = "0.13", features = ["json", "stream"] } serde = { version = "1", features = ["derive"] } serde_json = "1" tokio = { version = "1", features = ["full"] } [dev-dependencies] -serial_test = "3" +serial_test = "4" diff --git a/runtime/rust/prompty-anthropic/src/processor.rs b/runtime/rust/prompty-anthropic/src/processor.rs index 36a2eede6..b8d44efd7 100644 --- a/runtime/rust/prompty-anthropic/src/processor.rs +++ b/runtime/rust/prompty-anthropic/src/processor.rs @@ -616,7 +616,7 @@ mod tests { state .delegated_state .as_ref() - .map_or(true, |state| state.is_empty()) + .is_none_or(|state| state.is_empty()) ); let assistant_messages = result.assistant_messages.as_ref().unwrap(); assert_eq!(assistant_messages.len(), 1); diff --git a/runtime/rust/prompty-anthropic/tests/integration.rs b/runtime/rust/prompty-anthropic/tests/integration.rs index 089112fde..fd30e9e81 100644 --- a/runtime/rust/prompty-anthropic/tests/integration.rs +++ b/runtime/rust/prompty-anthropic/tests/integration.rs @@ -199,11 +199,9 @@ async fn test_anthropic_agent_tool_calling() { "name": "get_weather", "kind": "function", "description": "Get the current weather for a city", - "parameters": { - "properties": [ - { "name": "city", "kind": "string", "description": "The city name", "required": true } - ] - }, + "parameters": [ + { "name": "city", "kind": "string", "description": "The city name", "required": true } + ], } ], "instructions": "system:\nYou are a helpful assistant with weather tools. Use the get_weather tool when asked about weather. Be brief.\nuser:\nWhat is the weather in Seattle?", diff --git a/runtime/rust/prompty-foundry/Cargo.toml b/runtime/rust/prompty-foundry/Cargo.toml index 637d0cff5..304617f32 100644 --- a/runtime/rust/prompty-foundry/Cargo.toml +++ b/runtime/rust/prompty-foundry/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "prompty-foundry" -version = "2.0.0-beta.4" +version = "2.0.0" edition = "2024" rust-version = "1.85" description = "Azure OpenAI / Foundry provider for Prompty" @@ -12,19 +12,19 @@ keywords = ["llm", "prompt", "azure", "openai", "foundry"] categories = ["development-tools"] [dependencies] -prompty = { version = "2.0.0-beta.4", path = "../prompty" } -prompty-openai = { version = "2.0.0-beta.4", path = "../prompty-openai" } +prompty = { version = "2.0.0", path = "../prompty" } +prompty-openai = { version = "2.0.0", path = "../prompty-openai" } async-trait = "0.1" -azure_identity = { version = "0.23", optional = true } -azure_core = { version = "0.23", optional = true } -base64 = "0.22" +azure_identity = { version = "1.0", optional = true } +azure_core = { version = "1.1", optional = true } +base64 = "0.23" bytes = "1" futures = "0.3" rand = "0.9" -reqwest = { version = "0.12", features = ["json", "stream"] } +reqwest = { version = "0.13", features = ["json", "stream", "form"] } serde = { version = "1", features = ["derive"] } serde_json = "1" -sha2 = "0.10" +sha2 = "0.11" tokio = { version = "1", features = ["full"] } [features] @@ -33,4 +33,4 @@ entra_id = ["azure_identity", "azure_core"] [dev-dependencies] tokio = { version = "1", features = ["full", "test-util"] } -serial_test = "3" +serial_test = "4" diff --git a/runtime/rust/prompty-foundry/src/executor.rs b/runtime/rust/prompty-foundry/src/executor.rs index 6556bb218..bec38e478 100644 --- a/runtime/rust/prompty-foundry/src/executor.rs +++ b/runtime/rust/prompty-foundry/src/executor.rs @@ -357,17 +357,17 @@ async fn get_auth_header(agent: &Agent) -> Result<(&'static str, String), Invoke #[cfg(feature = "entra_id")] const FOUNDRY_TOKEN_SCOPE: &str = "https://ai.azure.com/.default"; -/// Get a bearer token via DefaultAzureCredential (requires `entra_id` feature). +/// Get a bearer token via DeveloperToolsCredential (requires `entra_id` feature). #[cfg(feature = "entra_id")] async fn get_entra_token() -> Result<(&'static str, String), InvokerError> { use azure_core::credentials::TokenCredential; - use azure_identity::DefaultAzureCredential; + use azure_identity::DeveloperToolsCredential; - let credential = DefaultAzureCredential::new().map_err(|e| { - InvokerError::Execute(format!("Failed to create DefaultAzureCredential: {e}").into()) + let credential = DeveloperToolsCredential::new(None).map_err(|e| { + InvokerError::Execute(format!("Failed to create DeveloperToolsCredential: {e}").into()) })?; let token = credential - .get_token(&[FOUNDRY_TOKEN_SCOPE]) + .get_token(&[FOUNDRY_TOKEN_SCOPE], None) .await .map_err(|e| { InvokerError::Execute(format!("Failed to acquire Entra ID token: {e}").into()) @@ -767,6 +767,7 @@ mod tests { #[tokio::test] #[serial] + #[cfg(not(feature = "entra_id"))] async fn test_auth_header_foundry_no_key_no_entra() { prompty::connections::clear_connections(); // Remove env var to ensure no fallback @@ -780,10 +781,8 @@ mod tests { "endpoint": "https://resource.services.ai.azure.com/api/projects/proj" } })); - let result = get_auth_header(&agent).await; - // Without entra_id feature: should error (can't get token) - // With entra_id feature: would attempt DefaultAzureCredential (would also fail in CI) + // Without entra_id feature: should error (can't get token). assert!(result.is_err()); } } diff --git a/runtime/rust/prompty-foundry/src/models.rs b/runtime/rust/prompty-foundry/src/models.rs index 55c2fe6b0..17805825d 100644 --- a/runtime/rust/prompty-foundry/src/models.rs +++ b/runtime/rust/prompty-foundry/src/models.rs @@ -313,7 +313,7 @@ fn get_string_vec(obj: &Value, keys: &[&str]) -> Option> { /// Prefers a caller-supplied token on the connection (`apiKey`/`api_key`/ /// `bearerToken`/`bearer_token`) so hosts that already hold an interactive /// Entra token (e.g. browser OAuth/PKCE) can list deployments without the -/// ambient `DefaultAzureCredential`. Falls back to [`get_ai_token`] when no +/// ambient `DeveloperToolsCredential`. Falls back to [`get_ai_token`] when no /// caller token is present. async fn resolve_foundry_token(connection: &Value) -> Result { match connection_bearer_token(connection) { @@ -325,13 +325,13 @@ async fn resolve_foundry_token(connection: &Value) -> Result Result { use azure_core::credentials::TokenCredential; - use azure_identity::DefaultAzureCredential; + use azure_identity::DeveloperToolsCredential; - let credential = DefaultAzureCredential::new().map_err(|e| { - InvokerError::Execute(format!("Failed to create DefaultAzureCredential: {e}").into()) + let credential = DeveloperToolsCredential::new(None).map_err(|e| { + InvokerError::Execute(format!("Failed to create DeveloperToolsCredential: {e}").into()) })?; let token = credential - .get_token(&["https://ai.azure.com/.default"]) + .get_token(&["https://ai.azure.com/.default"], None) .await .map_err(|e| { InvokerError::Execute(format!("Failed to acquire Entra ID token: {e}").into()) diff --git a/runtime/rust/prompty-foundry/src/oauth.rs b/runtime/rust/prompty-foundry/src/oauth.rs index 6fdefb219..6cb05de05 100644 --- a/runtime/rust/prompty-foundry/src/oauth.rs +++ b/runtime/rust/prompty-foundry/src/oauth.rs @@ -9,7 +9,7 @@ //! //! These complement the non-interactive auth already in [`crate::executor`] //! (`api-key` header, `AZURE_INFERENCE_CREDENTIAL` bearer, and -//! `DefaultAzureCredential`/Entra ID via `get_entra_token`). `DefaultAzureCredential` +//! `DeveloperToolsCredential`/Entra ID via `get_entra_token`). `DeveloperToolsCredential` //! does not perform interactive browser sign-in, which is what this module adds. //! //! # Boundary (mirrors the `MemoryPort` data-vs-behavior split) diff --git a/runtime/rust/prompty-foundry/src/processor.rs b/runtime/rust/prompty-foundry/src/processor.rs index 74da6c49c..24c74f619 100644 --- a/runtime/rust/prompty-foundry/src/processor.rs +++ b/runtime/rust/prompty-foundry/src/processor.rs @@ -138,7 +138,7 @@ mod tests { state .delegated_state .as_ref() - .map_or(true, |state| state.is_empty()) + .is_none_or(|state| state.is_empty()) ); } } diff --git a/runtime/rust/prompty-foundry/tests/entra_id.rs b/runtime/rust/prompty-foundry/tests/entra_id.rs index e9310f49f..227f75a04 100644 --- a/runtime/rust/prompty-foundry/tests/entra_id.rs +++ b/runtime/rust/prompty-foundry/tests/entra_id.rs @@ -1,10 +1,10 @@ -//! Integration tests for Entra ID (keyless / DefaultAzureCredential) auth. +//! Integration tests for Entra ID (keyless / DeveloperToolsCredential) auth. //! //! These tests verify that the Foundry executor can authenticate via -//! `DefaultAzureCredential` when no API key is provided. They require: +//! `DeveloperToolsCredential` when no API key is provided. They require: //! - `AZURE_OPENAI_ENDPOINT` //! - `AZURE_OPENAI_CHAT_DEPLOYMENT` -//! - `AZURE_TENANT_ID` (so DefaultAzureCredential picks the right tenant) +//! - `AZURE_TENANT_ID` (so local Azure developer tools pick the right tenant) //! - A valid Azure identity (e.g. Azure CLI login, managed identity, etc.) //! //! Run with: @@ -116,7 +116,7 @@ fn build_foundry_chat_agent(question: &str, options: Value) -> Agent { // Tests // --------------------------------------------------------------------------- -/// Verify that `DefaultAzureCredential` can acquire a token for the +/// Verify that `DeveloperToolsCredential` can acquire a token for the /// Azure Cognitive Services scope. #[tokio::test] #[ignore] @@ -125,13 +125,13 @@ async fn test_entra_id_token_acquisition() { skip_if_no_env!("AZURE_OPENAI_ENDPOINT"); use azure_core::credentials::TokenCredential; - use azure_identity::DefaultAzureCredential; + use azure_identity::DeveloperToolsCredential; let credential = - DefaultAzureCredential::new().expect("DefaultAzureCredential should be created"); + DeveloperToolsCredential::new(None).expect("DeveloperToolsCredential should be created"); let token = credential - .get_token(&["https://cognitiveservices.azure.com/.default"]) + .get_token(&["https://cognitiveservices.azure.com/.default"], None) .await .expect("Should acquire Entra ID token for Cognitive Services scope"); @@ -286,11 +286,9 @@ async fn test_entra_id_agent_tool_calling() { "name": "get_weather", "kind": "function", "description": "Get the current weather for a city", - "parameters": { - "properties": [ - { "name": "city", "kind": "string", "description": "The city name", "required": true } - ] - }, + "parameters": [ + { "name": "city", "kind": "string", "description": "The city name", "required": true } + ], } ], "instructions": "system:\nYou are a helpful assistant with weather tools. Use the get_weather tool when asked about weather. Be brief.\nuser:\nWhat is the weather in Seattle?", diff --git a/runtime/rust/prompty-foundry/tests/integration.rs b/runtime/rust/prompty-foundry/tests/integration.rs index 788df4205..c3cf02a59 100644 --- a/runtime/rust/prompty-foundry/tests/integration.rs +++ b/runtime/rust/prompty-foundry/tests/integration.rs @@ -264,11 +264,9 @@ async fn test_azure_agent_tool_calling() { "name": "get_weather", "kind": "function", "description": "Get the current weather for a city", - "parameters": { - "properties": [ - { "name": "city", "kind": "string", "description": "The city name", "required": true } - ] - }, + "parameters": [ + { "name": "city", "kind": "string", "description": "The city name", "required": true } + ], } ], "instructions": "system:\nYou are a helpful assistant with weather tools. Use the get_weather tool when asked about weather. Be brief.\nuser:\nWhat is the weather in Seattle?", @@ -357,9 +355,14 @@ async fn test_foundry_list_deployments_with_cli_token() { "apiKey": token, }); - let models = prompty_foundry::list_models_async(&connection) - .await - .expect("foundry deployment listing should succeed"); + let models = match prompty_foundry::list_models_async(&connection).await { + Ok(models) => models, + Err(error) if error.to_string().contains("Token tenant") => { + eprintln!("Skipping: Azure CLI token tenant does not match FOUNDRY_PROJECT_ENDPOINT"); + return; + } + Err(error) => panic!("foundry deployment listing should succeed: {error}"), + }; assert!(!models.is_empty(), "expected at least one deployment"); let first = &models[0]; diff --git a/runtime/rust/prompty-openai/Cargo.toml b/runtime/rust/prompty-openai/Cargo.toml index bf2156944..c95b325d4 100644 --- a/runtime/rust/prompty-openai/Cargo.toml +++ b/runtime/rust/prompty-openai/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "prompty-openai" -version = "2.0.0-beta.4" +version = "2.0.0" edition = "2024" rust-version = "1.85" description = "OpenAI provider for Prompty" @@ -12,15 +12,15 @@ keywords = ["llm", "prompt", "openai", "ai"] categories = ["development-tools"] [dependencies] -prompty = { version = "2.0.0-beta.4", path = "../prompty" } +prompty = { version = "2.0.0", path = "../prompty" } serde = { version = "1", features = ["derive"] } serde_json = "1" async-trait = "0.1" tokio = { version = "1", features = ["rt-multi-thread", "sync"] } -reqwest = { version = "0.12", features = ["json", "stream"] } +reqwest = { version = "0.13", features = ["json", "stream"] } futures = "0.3" bytes = "1" [dev-dependencies] tokio = { version = "1", features = ["full"] } -serial_test = "3" +serial_test = "4" diff --git a/runtime/rust/prompty-openai/README.md b/runtime/rust/prompty-openai/README.md index b47941f98..55b0b2b56 100644 --- a/runtime/rust/prompty-openai/README.md +++ b/runtime/rust/prompty-openai/README.md @@ -21,7 +21,7 @@ let result = turn(&agent, Some(&inputs), None).await?; |-----------|-----|-------------| | `chat` | Chat Completions | Text generation and tool calling | | `embedding` | Embeddings | Vector embeddings | -| `image` | Images | DALL-E image generation | +| `image` | Images | GPT image generation | ## Connection diff --git a/runtime/rust/prompty-openai/src/models.rs b/runtime/rust/prompty-openai/src/models.rs index cda6d6d56..907fa179e 100644 --- a/runtime/rust/prompty-openai/src/models.rs +++ b/runtime/rust/prompty-openai/src/models.rs @@ -342,9 +342,13 @@ mod tests { } #[test] - fn test_shared_dataset_lookup_dalle3() { - let caps = prompty::discovery::lookup("openai", "dall-e-3").unwrap(); + fn test_shared_dataset_lookup_gpt_image() { + let caps = prompty::discovery::lookup("openai", "gpt-image-1").unwrap(); assert!(caps.context_window.is_none()); + assert_eq!( + caps.input_modalities.as_deref(), + Some(["text".to_string(), "image".to_string()].as_slice()) + ); assert_eq!( caps.output_modalities.as_deref(), Some(["image".to_string()].as_slice()) diff --git a/runtime/rust/prompty-openai/src/processor.rs b/runtime/rust/prompty-openai/src/processor.rs index 597ecd479..15c64833e 100644 --- a/runtime/rust/prompty-openai/src/processor.rs +++ b/runtime/rust/prompty-openai/src/processor.rs @@ -881,7 +881,7 @@ mod tests { state .delegated_state .as_ref() - .map_or(true, |state| state.is_empty()) + .is_none_or(|state| state.is_empty()) ); let assistant_messages = result.assistant_messages.as_ref().unwrap(); assert_eq!(assistant_messages.len(), 1); diff --git a/runtime/rust/prompty-openai/src/wire.rs b/runtime/rust/prompty-openai/src/wire.rs index 1c69968d5..09cd3964d 100644 --- a/runtime/rust/prompty-openai/src/wire.rs +++ b/runtime/rust/prompty-openai/src/wire.rs @@ -208,7 +208,7 @@ pub fn build_embedding_args(agent: &Agent, messages: &[Message]) -> Value { pub fn build_image_args(agent: &Agent, messages: &[Message]) -> Value { let model_id = prompty::model_access::model_id(&agent.model); let model = if model_id.is_empty() { - "dall-e-3".to_string() + "gpt-image-1".to_string() } else { model_id.to_string() }; diff --git a/runtime/rust/prompty-openai/tests/integration.rs b/runtime/rust/prompty-openai/tests/integration.rs index 095c2542c..5832bc908 100644 --- a/runtime/rust/prompty-openai/tests/integration.rs +++ b/runtime/rust/prompty-openai/tests/integration.rs @@ -238,9 +238,8 @@ async fn test_embedding() { async fn test_image_generation() { setup(); skip_if_no_env!("OPENAI_API_KEY"); - skip_if_no_env!("OPENAI_IMAGE_MODEL"); - let image_model = std::env::var("OPENAI_IMAGE_MODEL").unwrap_or_else(|_| "dall-e-2".into()); + let image_model = std::env::var("OPENAI_IMAGE_MODEL").unwrap_or_else(|_| "gpt-image-1".into()); let data = json!({ "name": "integration-image", @@ -269,27 +268,25 @@ async fn test_image_generation() { .await .expect("image generation should succeed"); - // Result is typically a URL string or object with url field + // GPT image models return base64-encoded image data. let text = match result { Value::String(ref s) => s.clone(), Value::Object(ref obj) => obj - .get("url") + .get("b64_json") + .or_else(|| obj.get("url")) + .and_then(|u| u.as_str()) + .unwrap_or("") + .to_string(), + Value::Array(ref arr) if !arr.is_empty() => arr[0] + .as_object() + .and_then(|o| o.get("b64_json").or_else(|| o.get("url"))) .and_then(|u| u.as_str()) .unwrap_or("") .to_string(), - Value::Array(ref arr) if !arr.is_empty() => { - // Could be [{ url: "..." }] - arr[0] - .as_object() - .and_then(|o| o.get("url")) - .and_then(|u| u.as_str()) - .unwrap_or("") - .to_string() - } other => format!("{other:?}"), }; assert!(!text.is_empty(), "image result should not be empty"); - eprintln!("Image result: {text}"); + eprintln!("Image result length: {}", text.len()); } #[tokio::test] @@ -383,11 +380,9 @@ async fn test_agent_tool_calling() { "name": "get_weather", "kind": "function", "description": "Get the current weather for a city", - "parameters": { - "properties": [ - { "name": "city", "kind": "string", "description": "The city name", "required": true } - ] - }, + "parameters": [ + { "name": "city", "kind": "string", "description": "The city name", "required": true } + ], } ], "instructions": "system:\nYou are a helpful assistant with weather tools. Use the get_weather tool when asked about weather. Be brief.\nuser:\nWhat is the weather in Seattle?", diff --git a/runtime/rust/prompty/Cargo.toml b/runtime/rust/prompty/Cargo.toml index 0dc447142..5d252c4d5 100644 --- a/runtime/rust/prompty/Cargo.toml +++ b/runtime/rust/prompty/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "prompty" -version = "2.0.0-beta.4" +version = "2.0.0" edition = "2024" rust-version = "1.85" description = "Prompty is an asset class and format for LLM prompts" @@ -22,7 +22,7 @@ minijinja = "2" rand = "0.9" regex = "1" chrono = "0.4" -ribboncurls = "0.2" +ribboncurls = "0.5" futures = "0.3" # OTel (optional) @@ -40,7 +40,7 @@ otel = ["opentelemetry", "opentelemetry_sdk", "opentelemetry-stdout"] [dev-dependencies] tokio = { version = "1", features = ["full"] } -serial_test = "3" +serial_test = "4" # Dev-only cycle (allowed by Cargo): the model conformance harness drives the # `Processor.processStream` vectors through the real OpenAI stream classifier # (`prompty_openai::processor::process_stream`) before reconciling with the diff --git a/runtime/rust/prompty/data/model_capabilities.json b/runtime/rust/prompty/data/model_capabilities.json index 7c7f6db19..6951f344f 100644 --- a/runtime/rust/prompty/data/model_capabilities.json +++ b/runtime/rust/prompty/data/model_capabilities.json @@ -45,6 +45,11 @@ "inputModalities": ["text"], "outputModalities": [] }, + { + "prefix": "gpt-image-1", + "inputModalities": ["text", "image"], + "outputModalities": ["image"] + }, { "prefix": "dall-e-3", "inputModalities": ["text"], diff --git a/runtime/rust/prompty/src/model_capabilities.json b/runtime/rust/prompty/src/model_capabilities.json index 7c7f6db19..6951f344f 100644 --- a/runtime/rust/prompty/src/model_capabilities.json +++ b/runtime/rust/prompty/src/model_capabilities.json @@ -45,6 +45,11 @@ "inputModalities": ["text"], "outputModalities": [] }, + { + "prefix": "gpt-image-1", + "inputModalities": ["text", "image"], + "outputModalities": ["image"] + }, { "prefix": "dall-e-3", "inputModalities": ["text"], diff --git a/runtime/rust/prompty/tests/harness_replay_verifier.rs b/runtime/rust/prompty/tests/harness_replay_verifier.rs index b8c7cc806..0e089d3ba 100644 --- a/runtime/rust/prompty/tests/harness_replay_verifier.rs +++ b/runtime/rust/prompty/tests/harness_replay_verifier.rs @@ -22,7 +22,7 @@ fn reference_replay_verifier_passes_identical_records() { }); assert_eq!(result.status, ReplayVerificationStatus::Passed); - assert!(result.mismatches.as_ref().map_or(true, |m| m.is_empty())); + assert!(result.mismatches.as_ref().is_none_or(|m| m.is_empty())); assert_eq!(result.expected_count, 1); assert_eq!(result.actual_count, 1); } diff --git a/runtime/rust/prompty/tests/harness_turn_runner.rs b/runtime/rust/prompty/tests/harness_turn_runner.rs index e457632ab..6c92f369b 100644 --- a/runtime/rust/prompty/tests/harness_turn_runner.rs +++ b/runtime/rust/prompty/tests/harness_turn_runner.rs @@ -661,7 +661,7 @@ async fn reference_turn_runner_preserves_zero_iteration_behavior() { result .checkpoints .as_ref() - .map_or(true, |checkpoints| checkpoints.is_empty()) + .is_none_or(|checkpoints| checkpoints.is_empty()) ); assert_eq!(*calls.lock().unwrap(), 0); assert_eq!( diff --git a/runtime/rust/prompty/tests/turn_engine.rs b/runtime/rust/prompty/tests/turn_engine.rs index 1b51e8a67..e85487a29 100644 --- a/runtime/rust/prompty/tests/turn_engine.rs +++ b/runtime/rust/prompty/tests/turn_engine.rs @@ -2803,7 +2803,7 @@ async fn conversation_failure_occurs_after_the_tool_result_is_durable() { checkpoint .pending_tool_requests .as_ref() - .map_or(true, |requests| requests.is_empty()) + .is_none_or(|requests| requests.is_empty()) && checkpoint.pending_model_response.is_some() && checkpoint .completed_tool_results @@ -2967,7 +2967,7 @@ async fn conversation_port_formats_a_complete_ordered_tool_batch_once() { checkpoint .pending_tool_requests .as_ref() - .map_or(true, |requests| requests.is_empty()) + .is_none_or(|requests| requests.is_empty()) && checkpoint.pending_model_response.is_some() && checkpoint .completed_tool_results diff --git a/runtime/rust/scripts/release.py b/runtime/rust/scripts/release.py index 9f1249299..b272d64c5 100644 --- a/runtime/rust/scripts/release.py +++ b/runtime/rust/scripts/release.py @@ -14,6 +14,12 @@ 3. Commits the version bump 4. Creates a git tag: rust/{version} 5. Pushes commit + tag to origin (triggers CI publish) + +Preferred release flow: + Open a PR containing the version bump, add the `release: rust` label, and + merge it. The prompty Rust publish workflow creates the rust/{version} tag + from the merged commit and publishes the crates. This script remains useful + for manual tag-driven releases. """ from __future__ import annotations @@ -31,6 +37,14 @@ CRATES = ["prompty", "prompty-openai", "prompty-anthropic", "prompty-foundry"] +def configure_output_encoding() -> None: + """Prefer UTF-8 for release status output on Windows consoles.""" + if hasattr(sys.stdout, "reconfigure"): + sys.stdout.reconfigure(encoding="utf-8") + if hasattr(sys.stderr, "reconfigure"): + sys.stderr.reconfigure(encoding="utf-8") + + def get_current_version() -> str: toml = (ROOT / "prompty" / "Cargo.toml").read_text() match = re.search(r'^version\s*=\s*"(.+?)"', toml, re.MULTILINE) @@ -73,6 +87,8 @@ def run(cmd: str) -> None: def main() -> None: + configure_output_encoding() + parser = argparse.ArgumentParser(description="Release the prompty Rust crates") parser.add_argument("--bump", choices=["patch", "minor", "major"], default="patch") parser.add_argument("--version", dest="explicit_version", help="Explicit version (e.g., 2.0.0)") diff --git a/runtime/swift/prompty-model/Sources/PromptyModel/Resources/model_capabilities.json b/runtime/swift/prompty-model/Sources/PromptyModel/Resources/model_capabilities.json index 7c7f6db19..6951f344f 100644 --- a/runtime/swift/prompty-model/Sources/PromptyModel/Resources/model_capabilities.json +++ b/runtime/swift/prompty-model/Sources/PromptyModel/Resources/model_capabilities.json @@ -45,6 +45,11 @@ "inputModalities": ["text"], "outputModalities": [] }, + { + "prefix": "gpt-image-1", + "inputModalities": ["text", "image"], + "outputModalities": ["image"] + }, { "prefix": "dall-e-3", "inputModalities": ["text"], diff --git a/runtime/swift/prompty/Sources/Prompty/Resources/model_capabilities.json b/runtime/swift/prompty/Sources/Prompty/Resources/model_capabilities.json index 7c7f6db19..6951f344f 100644 --- a/runtime/swift/prompty/Sources/Prompty/Resources/model_capabilities.json +++ b/runtime/swift/prompty/Sources/Prompty/Resources/model_capabilities.json @@ -45,6 +45,11 @@ "inputModalities": ["text"], "outputModalities": [] }, + { + "prefix": "gpt-image-1", + "inputModalities": ["text", "image"], + "outputModalities": ["image"] + }, { "prefix": "dall-e-3", "inputModalities": ["text"], diff --git a/runtime/typescript/packages/core/src/model/model_capabilities.json b/runtime/typescript/packages/core/src/model/model_capabilities.json index 7c7f6db19..6951f344f 100644 --- a/runtime/typescript/packages/core/src/model/model_capabilities.json +++ b/runtime/typescript/packages/core/src/model/model_capabilities.json @@ -45,6 +45,11 @@ "inputModalities": ["text"], "outputModalities": [] }, + { + "prefix": "gpt-image-1", + "inputModalities": ["text", "image"], + "outputModalities": ["image"] + }, { "prefix": "dall-e-3", "inputModalities": ["text"], diff --git a/spec/data/model_capabilities.json b/spec/data/model_capabilities.json index 7c7f6db19..6951f344f 100644 --- a/spec/data/model_capabilities.json +++ b/spec/data/model_capabilities.json @@ -45,6 +45,11 @@ "inputModalities": ["text"], "outputModalities": [] }, + { + "prefix": "gpt-image-1", + "inputModalities": ["text", "image"], + "outputModalities": ["image"] + }, { "prefix": "dall-e-3", "inputModalities": ["text"],