From c97ff21e6a63360c152a75a4a3c2c8223f26dee3 Mon Sep 17 00:00:00 2001 From: cunninghamcard-bit Date: Wed, 25 Nov 2026 10:46:08 +0800 Subject: [PATCH] feat(ops): add manifest per-type schema hashes, HandleExhausted checks, and DTO vectors (#274) --- README.md | 3 +- aimux-core/src/trace/store.rs | 54 +- aimux-ffi/include/aimux.h | 4 +- aimux-ops/README.md | 16 +- aimux-ops/src/dto_vectors.rs | 12 +- aimux-ops/src/handle.rs | 70 +- aimux-ops/src/lib.rs | 1 + aimux-ops/src/manifest.digest | 2 +- aimux-ops/src/manifest.json.zlib | Bin 61457 -> 68776 bytes aimux-ops/src/manifest.rs | 170 +- aimux-ops/src/ops/operation.rs | 8 +- aimux-ops/src/ops/recording.rs | 27 +- aimux-ops/src/ops/registry.rs | 3 +- aimux-ops/src/ops/trace.rs | 24 +- aimux-ops/src/sources.rs | 115 + aimux-ops/tests/manifest_contract.rs | 298 +- aimux-ops/tests/ops_matrix.rs | 593 + aimux-ops/tests/trace.rs | 3 + bindings/flutter/README.md | 4 +- bindings/flutter/lib/generated/ops.dart | 108 +- bindings/flutter/lib/src/generated/types.dart | 528 + bindings/flutter/lib/src/native.dart | 33 +- bindings/flutter/native/aimux_ops.h | 4 +- bindings/flutter/test/aimux_test.dart | 29 + bindings/go/README.md | 7 +- bindings/go/abi_test.go | 150 + bindings/go/aimux.go | 58 +- bindings/go/generated/ops.go | 109 +- bindings/go/types_gen.go | 3128 ++- bindings/go/wire_test.go | 39 + bindings/java/README.md | 8 +- bindings/java/generated/AimuxOps.java | 111 +- .../ai/arcships/aimux/types/DtoJson.java | 12 +- .../arcships/aimux/types/ErrorEnvelope.java | 2 +- .../ai/arcships/aimux/types/HandleId.java | 2 +- .../arcships/aimux/types/HandleIdInput.java | 2 +- .../main/java/ai/arcships/aimux/Aimux.java | 55 +- .../ai/arcships/aimux/AbiContractTest.java | 53 + bindings/kotlin/generated/AimuxOps.kt | 108 +- bindings/node/README.md | 11 +- bindings/node/__test__/dto.test.ts | 24 + bindings/node/__test__/dto_vectors.ts | 40 +- bindings/node/__test__/facade.test.ts | 81 + bindings/node/src/generated/dto_vectors.ts | 145 + bindings/node/src/generated/ops.ts | 108 +- bindings/node/src/native.ts | 77 +- bindings/python/README.md | 6 +- bindings/python/python/aimux/__init__.py | 58 +- bindings/python/python/aimux/_manifest.py | 73 + bindings/python/python/aimux/_types.py | 1 - bindings/python/python/aimux/ops.py | 108 +- bindings/python/tests/test_dto_types.py | 8 + .../python/tests/test_manifest_negotiation.py | 138 + bindings/python/tests/test_ops_native.py | 40 + bindings/swift/README.md | 5 +- bindings/swift/Sources/Aimux/Aimux.swift | 41 +- .../Tests/AimuxTests/ContractTests.swift | 79 + .../swift/Tests/AimuxTests/WireTests.swift | 8 + bindings/swift/Tests/Standalone/Runner.swift | 3 + bindings/swift/generated/AimuxOps.swift | 108 +- bindings/swift/generated/Types.swift | 2057 +- .../dto/FinishReasonUnified/003.negative.json | 1 + .../dto/GenerateContent/010.negative.json | 3 + contract-tests/dto/HandleId/003.negative.json | 1 + contract-tests/dto/HandleId/004.negative.json | 1 + contract-tests/dto/HandleId/005.negative.json | 1 + .../dto/OperationNextParams/001.json | 3 + .../dto/OperationNextParams/002.negative.json | 4 + .../dto/OperationNextParams/003.negative.json | 1 + .../dto/OperationNextParams/004.negative.json | 3 + contract-tests/dto/RawToolCall/002.json | 5 + contract-tests/dto/RawToolCall/003.json | 5 + contract-tests/dto/RawToolCall/004.json | 5 + contract-tests/dto/RawToolCall/005.json | 5 + contract-tests/dto/RawToolCall/006.json | 5 + contract-tests/dto/RawToolCall/007.json | 5 + contract-tests/dto/RawToolCall/008.json | 5 + contract-tests/dto/RawToolCall/009.json | 5 + contract-tests/dto/RawToolCall/010.json | 5 + contract-tests/dto/ToolCall/003.json | 5 + contract-tests/dto/ToolCall/004.json | 5 + contract-tests/dto/ToolCall/005.json | 5 + contract-tests/dto/ToolCall/006.json | 5 + contract-tests/dto/ToolCall/007.json | 7 + contract-tests/dto/ToolCall/008.json | 5 + contract-tests/dto/ToolCall/009.json | 15 + contract-tests/dto/ToolCall/010.json | 8 + contract-tests/dto/ToolCall/011.negative.json | 1 + contract-tests/dto/index.json | 117 + docs/aisdk-architecture-alignment.md | 2 +- docs/api/c.md | 9 +- docs/api/flutter.md | 6 +- docs/api/node.md | 2 +- docs/api/reference.md | 10 +- docs/api/swift.md | 2 +- docs/error-model.md | 2 +- docs/release-matrix.md | 40 + docs/rfc-0039-conformance.md | 40 +- docs/rfc-0039-coverage-ledger.md | 9 +- docs/rfc-0039-implementation.md | 32 +- docs/upgrading-to-0.6.md | 10 +- docs/upgrading-to-0.7.md | 4 +- docs/upgrading-to-ops-abi.md | 21 +- rfc/0039-ops-bindings-contract.md | 2 +- schema/manifest.json | 20647 ++++++++++++++++ schema/types/TraceCreateParams.json | 5 +- scripts/check_dto_vectors.py | 21 +- tools/aimux-codegen/generated-files.json | 4 +- tools/aimux-codegen/src/emit/dart.rs | 23 +- tools/aimux-codegen/src/emit/go.rs | 110 +- tools/aimux-codegen/src/emit/java.rs | 31 +- tools/aimux-codegen/src/emit/node.rs | 206 +- tools/aimux-codegen/src/emit/python.rs | 9 +- tools/aimux-codegen/src/emit/swift.rs | 41 +- tools/aimux-codegen/src/lib.rs | 287 +- tools/aimux-codegen/src/main.rs | 50 +- tools/aimux-codegen/tests/generation.rs | 199 + 117 files changed, 30974 insertions(+), 258 deletions(-) create mode 100644 aimux-ops/src/sources.rs create mode 100644 bindings/python/python/aimux/_manifest.py create mode 100644 bindings/python/tests/test_manifest_negotiation.py create mode 100644 contract-tests/dto/FinishReasonUnified/003.negative.json create mode 100644 contract-tests/dto/GenerateContent/010.negative.json create mode 100644 contract-tests/dto/HandleId/003.negative.json create mode 100644 contract-tests/dto/HandleId/004.negative.json create mode 100644 contract-tests/dto/HandleId/005.negative.json create mode 100644 contract-tests/dto/OperationNextParams/001.json create mode 100644 contract-tests/dto/OperationNextParams/002.negative.json create mode 100644 contract-tests/dto/OperationNextParams/003.negative.json create mode 100644 contract-tests/dto/OperationNextParams/004.negative.json create mode 100644 contract-tests/dto/RawToolCall/002.json create mode 100644 contract-tests/dto/RawToolCall/003.json create mode 100644 contract-tests/dto/RawToolCall/004.json create mode 100644 contract-tests/dto/RawToolCall/005.json create mode 100644 contract-tests/dto/RawToolCall/006.json create mode 100644 contract-tests/dto/RawToolCall/007.json create mode 100644 contract-tests/dto/RawToolCall/008.json create mode 100644 contract-tests/dto/RawToolCall/009.json create mode 100644 contract-tests/dto/RawToolCall/010.json create mode 100644 contract-tests/dto/ToolCall/003.json create mode 100644 contract-tests/dto/ToolCall/004.json create mode 100644 contract-tests/dto/ToolCall/005.json create mode 100644 contract-tests/dto/ToolCall/006.json create mode 100644 contract-tests/dto/ToolCall/007.json create mode 100644 contract-tests/dto/ToolCall/008.json create mode 100644 contract-tests/dto/ToolCall/009.json create mode 100644 contract-tests/dto/ToolCall/010.json create mode 100644 contract-tests/dto/ToolCall/011.negative.json create mode 100644 docs/release-matrix.md create mode 100644 schema/manifest.json diff --git a/README.md b/README.md index 8b9831271..99ed4ca2a 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,8 @@ changes: the native `cause` chain; retry delays are read from `responseHeaders`, not `retryMs`. - **DTOs are generated.** Hand-written 0.5 wire types are removed; ABI 1 / - ops 1.0 and the manifest digest must match the native library. + ops 1.0 and manifest compatibility (`MANIFEST_DIGEST` fast-path or full + `TYPE_SCHEMA_HASHES` `schemaHash` fallback) are checked against the native library. - **Recording stays on schema 2.** Schema 3 and transport replay are a follow-up. diff --git a/aimux-core/src/trace/store.rs b/aimux-core/src/trace/store.rs index b37310a65..5dfe57ee9 100644 --- a/aimux-core/src/trace/store.rs +++ b/aimux-core/src/trace/store.rs @@ -90,17 +90,36 @@ pub(crate) struct TraceStore { } impl TraceStore { + #[cfg(test)] pub fn new(cap: usize, per_scope_cap: usize) -> Self { - assert!(cap > 0); - TraceStore { + Self::try_new(cap, per_scope_cap).expect("trace store capacity allocation") + } + + pub fn try_new(cap: usize, per_scope_cap: usize) -> Result { + if cap == 0 { + return Err("trace store capacity must be greater than zero"); + } + let mut ring = Vec::new(); + ring.try_reserve_exact(cap) + .map_err(|_| "trace store capacity exceeds available memory")?; + ring.resize_with(cap, RingSlot::default); + Ok(TraceStore { cap, per_scope_cap, - ring: (0..cap).map(|_| RingSlot::default()).collect(), + ring, next: 0, index: HashMap::new(), scope_count: HashMap::new(), tombstone_hits: 0, - } + }) + } + + pub fn clear(&mut self) { + self.ring.fill_with(RingSlot::default); + self.next = 0; + self.index.clear(); + self.scope_count.clear(); + self.tombstone_hits = 0; } pub fn records_in_scope(&self, scope: u64) -> u64 { @@ -421,15 +440,30 @@ impl RingTraceStore { #[must_use] pub fn with_capacity(cap: usize, per_scope_cap: usize) -> Self { - assert!(cap > 0 && per_scope_cap > 0); - Self { + Self::try_with_capacity(cap, per_scope_cap).expect("ring trace store capacity allocation") + } + + /// Create a bounded ring trace store without aborting on allocation failure. + /// + /// # Errors + /// Returns an error if either capacity is zero or memory allocation fails. + pub fn try_with_capacity(cap: usize, per_scope_cap: usize) -> Result { + if cap == 0 || per_scope_cap == 0 { + return Err("trace store capacities must be greater than zero"); + } + let store = TraceStore::try_new(cap, per_scope_cap)?; + let mut records = VecDeque::new(); + records + .try_reserve_exact(cap) + .map_err(|_| "trace store capacity exceeds available memory")?; + Ok(Self { audit_mode: TraceAuditMode::Off, inner: Mutex::new(Inner { - store: TraceStore::new(cap, per_scope_cap), - records: VecDeque::with_capacity(cap), + store, + records, by_session: HashMap::new(), }), - } + }) } /// Audit policy inherited by trace decorators created for this store. @@ -446,7 +480,7 @@ impl RingTraceStore { pub fn clear(&self) { let mut inner = self.inner.lock().unwrap(); - inner.store = TraceStore::new(inner.store.cap, inner.store.per_scope_cap); + inner.store.clear(); inner.records.clear(); inner.by_session.clear(); } diff --git a/aimux-ffi/include/aimux.h b/aimux-ffi/include/aimux.h index 622093eec..4d5c1c15f 100644 --- a/aimux-ffi/include/aimux.h +++ b/aimux-ffi/include/aimux.h @@ -1,4 +1,4 @@ -/* Generated by aimux-codegen. Do not edit. Manifest SHA-256: 9c7f306459ec0009f6bca66c0abbb36fc3740b5fc6330c47a6fd73a6bc16caae */ +/* Generated by aimux-codegen. Do not edit. Manifest SHA-256: cd147fa9595ede3951744fa261da98cc18c204e65b4081073ad3a3c1b68bfd92 */ #ifndef AIMUX_H #define AIMUX_H @@ -11,7 +11,7 @@ extern "C" { #define AIMUX_ABI_VERSION UINT32_C(65536) #define AIMUX_OPS_VERSION "1.0" -#define AIMUX_MANIFEST_DIGEST "9c7f306459ec0009f6bca66c0abbb36fc3740b5fc6330c47a6fd73a6bc16caae" +#define AIMUX_MANIFEST_DIGEST "cd147fa9595ede3951744fa261da98cc18c204e65b4081073ad3a3c1b68bfd92" #define AIMUX_OP_ABORT_CREATE "abort.create" #define AIMUX_OP_ABORT_SIGNAL "abort.signal" diff --git a/aimux-ops/README.md b/aimux-ops/README.md index b15da7765..239a0aab8 100644 --- a/aimux-ops/README.md +++ b/aimux-ops/README.md @@ -83,12 +83,16 @@ finalizers enqueue cleanup. `manifest::manifest()` exports all 76 operations, including two Decision operations and four provider/registry management operations (`provider.descriptors`, `registry.fromConfig`, `registry.list`, -`registry.update`) beyond RFC-0039's original 70, 23 handle kinds, error codes -and a `types` catalogue. Ops controls and result wrappers carry schemas; canonical -business fields retain explicit type references. Codegen publishes the C header, -language constants and schemas. Its `--check` detects missing, stale and changed -outputs. The manifest's `digest` field equals `manifest_digest()`; hashing sorts -object keys and operation names and excludes the `digest` field itself. +`registry.update`) beyond RFC-0039's original 70, 23 handle kinds, error codes, +`generatorVersion`, `sources` (pinned upstream SDK versions/integrity), and a +`types` catalogue carrying per-type `revision` and transitive `schemaHash`. +Codegen publishes the C header, `schema/manifest.json` (which records `inputHash` +alongside `digest`), per-language `TYPE_SCHEMA_HASHES` constants, and JSON +schemas. Its `--check` detects missing, stale and changed outputs. The +manifest's `digest` field equals `manifest_digest()`; self-verifying either the +runtime manifest or `schema/manifest.json` removes both `digest` and `inputHash` +from the top-level object, sorts `ops` by `name`, recursively sorts all object +keys, and hashes the compact JSON with SHA-256. Registered differences from RFC-0039 include the Decision kind and operations, BinaryPush-only JSON rejection for operation.push, and the native finalizer diff --git a/aimux-ops/src/dto_vectors.rs b/aimux-ops/src/dto_vectors.rs index 86ffe539e..87ad8f825 100644 --- a/aimux-ops/src/dto_vectors.rs +++ b/aimux-ops/src/dto_vectors.rs @@ -143,6 +143,9 @@ fn dto_vectors_round_trip_through_rust() { } "ModelPrompt" => round_trip::(value.clone()), "NamespacedKind" => round_trip::(value.clone()), + "OperationNextParams" => { + round_trip::(value.clone()) + } "Output" => round_trip::(value.clone()), "OutputTokenDetails" => { round_trip::(value.clone()) @@ -241,8 +244,15 @@ fn dto_vectors_round_trip_through_rust() { "VideoResult" => round_trip::(value.clone()), "Warning" => round_trip::(value.clone()), name => panic!("unregistered vector type {name}: {file}"), + }; + if entry["expectError"].as_bool().unwrap_or(false) { + assert!( + result.is_err(), + "{file}: expected error on negative vector, got {result:?}" + ); + continue; } - .unwrap_or_else(|error| panic!("{file}: {error}")); + let result = result.unwrap_or_else(|error| panic!("{file}: {error}")); let expected = entry["expect"].as_str().map_or(value, |file| { assert!( std::path::Path::new(file) diff --git a/aimux-ops/src/handle.rs b/aimux-ops/src/handle.rs index c8df908ca..39fb9e532 100644 --- a/aimux-ops/src/handle.rs +++ b/aimux-ops/src/handle.rs @@ -241,17 +241,34 @@ impl HandleRegistry { REGISTRY.get_or_init(Self::default) } - /// Insert a resource, failing permanently rather than wrapping the allocator. + /// Reserve a live handle ID before performing pre-registration setup. + /// + /// Dropping the returned reservation without committing discards the unused ID + /// without leaking an entry or reusing IDs. /// /// # Errors /// Returns HandleExhausted on overflow. - pub fn insert(&self, owner: Owner, entry: Entry) -> Result { + pub fn reserve(&self) -> Result { let id = allocate(&NEXT_ID)?; + Ok(HandleReservation { id }) + } + + /// Commit a reserved handle ID into the registry. + pub fn commit(&self, owner: Owner, reservation: HandleReservation, entry: Entry) -> HandleId { self.entries .lock() .unwrap_or_else(std::sync::PoisonError::into_inner) - .insert(id, (owner, entry)); - Ok(HandleId(id)) + .insert(reservation.id, (owner, entry)); + HandleId(reservation.id) + } + + /// Insert a resource, failing permanently rather than wrapping the allocator. + /// + /// # Errors + /// Returns HandleExhausted on overflow. + pub fn insert(&self, owner: Owner, entry: Entry) -> Result { + let reservation = self.reserve()?; + Ok(self.commit(owner, reservation, entry)) } /// Clone a live resource after checking its owner and kind. @@ -317,6 +334,51 @@ pub fn allocate(next: &AtomicU64) -> Result { } } +/// Pre-allocated handle ID waiting to be committed into [`HandleRegistry`]. +pub struct HandleReservation { + id: u64, +} + +struct ExhaustionState { + active_guards: usize, + saved_next_id: u64, +} + +static EXHAUSTION_STATE: Mutex = Mutex::new(ExhaustionState { + active_guards: 0, + saved_next_id: 0, +}); + +#[doc(hidden)] +pub struct ExhaustionGuard { + _private: (), +} + +impl Drop for ExhaustionGuard { + fn drop(&mut self) { + let mut state = EXHAUSTION_STATE + .lock() + .unwrap_or_else(std::sync::PoisonError::into_inner); + state.active_guards = state.active_guards.saturating_sub(1); + if state.active_guards == 0 { + NEXT_ID.store(state.saved_next_id, Ordering::SeqCst); + } + } +} + +#[doc(hidden)] +#[must_use] +pub fn test_exhaust_process_handle_allocator() -> ExhaustionGuard { + let mut state = EXHAUSTION_STATE + .lock() + .unwrap_or_else(std::sync::PoisonError::into_inner); + if state.active_guards == 0 { + state.saved_next_id = NEXT_ID.swap(0, Ordering::SeqCst); + } + state.active_guards += 1; + ExhaustionGuard { _private: () } +} + #[cfg(test)] mod tests { use super::*; diff --git a/aimux-ops/src/lib.rs b/aimux-ops/src/lib.rs index e9ff66588..701795892 100644 --- a/aimux-ops/src/lib.rs +++ b/aimux-ops/src/lib.rs @@ -9,6 +9,7 @@ pub mod manifest; pub mod op; pub mod operation; mod request; +mod sources; pub mod ops { pub mod composite; diff --git a/aimux-ops/src/manifest.digest b/aimux-ops/src/manifest.digest index 076887083..e7c08e9a4 100644 --- a/aimux-ops/src/manifest.digest +++ b/aimux-ops/src/manifest.digest @@ -1 +1 @@ -9c7f306459ec0009f6bca66c0abbb36fc3740b5fc6330c47a6fd73a6bc16caae +cd147fa9595ede3951744fa261da98cc18c204e65b4081073ad3a3c1b68bfd92 diff --git a/aimux-ops/src/manifest.json.zlib b/aimux-ops/src/manifest.json.zlib index 3d005883d683bd57448e41680c3b05c37bee9410..4bb4a68b5b601d72e8800e416348a6e99d8a6cb7 100644 GIT binary patch literal 68776 zcmV(sK<&SH+U)%acNR8=B}NB{{UMIaN( zOmI=P&S`tRv^~?^_PA}&__eor^^)y@g(Xx!Ni-2@vXVMx9*3&w_yjNlX`Pv z-8+O&?M){f_+IF&+K~-!ZTo(2#qRYU`_UbL=(X?o!SY}b`0%X!wd=br=b7vG>V?C>zz-s)eP`&kkg)K2bduN5&Af&l z`&+|S_YpkQ%X@crrub!;|DoH?=e^lnmR%mW$V|B}=5p<}+jsn7F3o3iS!=mTG|PQ) zA@9XaCkk?@JG)p+A!MuEcSo@ozP#=Y3T9itV!T^7oq_G*ZqLbo zeXi*Bt$}^y<-a>$^zQS(jhx`F?-g{uP}IPk-Z1Qr+9NZIBgc@xWHHs7@K55+$HQK4 z!*{)?;55=mpLt)f{nMy(Bme!mk?%hTxr&EdejD>6+qh?Y?Op*D7V=xzbl}tpY%eMj zaC6!k7+Sz{Xv+y)c=I)%ow@BS<+p!2D!7D*VYsc^vG}dy$nH~4Dw%} z9sN2e8g@U-Z(^>X3GKvtG6<#Kl-tyNK~pQf*BS-^ED-z^f_@O>x3e&MR$GxB6_9nY zpaocCe;Bl!hi*S#P|a(rn{9%5bnUon4?~jB@ZLVlYd=ux<-|Y>eAy6pf%Ei z)Y)BuvFy7c9&(k5hqkvrwD%qObFJTW+Jd3h`~2P3z;Rk#)a-!4!&cx9gr>I%y?O`y z@H1%E$A=v|podqTmK*YOC|5)H7i4T8wM06Z@i!-;$DcdREx&c(;CHM3k=K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mtTBdMYGV6x~&d+MdC^1cO8rLta{%I@HY;0uBH$`z{oU)0dmSbs~(-0ZF9 zlh(8a@j7SG>T-9!ZA($pY6oSpv`rj2wdJmNHB|U2Y@op1cFR`7+9SUm^cmVeKNlyb zYf*S!*O5?DZxAt_<>`7CNJiLlG)wT(aT8H~8Ayd)tVD)_vk>-u9dDzohqgmYu_WS+&XS=7vWOsMiPfkxyw|38lTYKC6)19;7?$%a+xV@L`o{jdl S67ki>?l4KjK>Z)tkpa2z&S=j7 diff --git a/aimux-ops/src/manifest.rs b/aimux-ops/src/manifest.rs index 1aa62d6e9..daca64f74 100644 --- a/aimux-ops/src/manifest.rs +++ b/aimux-ops/src/manifest.rs @@ -1,15 +1,18 @@ +#[cfg(feature = "runtime-manifest")] +use std::collections::{BTreeMap, BTreeSet, VecDeque}; use std::sync::OnceLock; use serde_json::Value; #[cfg(feature = "runtime-manifest")] -use serde_json::json; -#[cfg(any(feature = "runtime-manifest", test))] +use serde_json::{Map, json}; use sha2::{Digest, Sha256}; #[cfg(feature = "runtime-manifest")] use crate::{ABI_VERSION, HandleKind, OPS_VERSION}; pub(crate) const MANIFEST_REVISION: &str = "1"; +#[cfg(feature = "runtime-manifest")] +const TYPE_REVISION: &str = "1"; const EMBEDDED_MANIFEST_ZLIB: &[u8] = include_bytes!("manifest.json.zlib"); const EMBEDDED_MANIFEST_DIGEST: &str = include_str!("manifest.digest"); @@ -59,15 +62,32 @@ pub fn manifest_digest() -> String { pub fn generate_manifest() -> (Box, String) { let (input_types, input) = type_contract(false); let (output_types, output) = type_contract(true); - let mut types = std::collections::BTreeMap::new(); + let type_defs = json!({"input": input, "output": output}); + let mut types = BTreeMap::new(); for ty in input_types.into_iter().chain(output_types) { let id = ty["id"].as_str().unwrap().to_owned(); let entry = types .entry(id.clone()) - .or_insert_with(|| json!({"id": id, "rustPath": id})); + .or_insert_with(|| json!({"id": id, "rustPath": id, "revision": TYPE_REVISION})); entry[ty["direction"].as_str().unwrap()] = ty["name"].clone(); } - let types: Vec<_> = types.into_values().collect(); + let types: Vec<_> = types + .into_values() + .map(|mut entry| { + entry["schemaHash"] = json!(compute_type_schema_hash(&entry, &type_defs)); + entry + }) + .collect(); + let sources: Vec<_> = crate::sources::UPSTREAM_SOURCES + .iter() + .map(|(package, version, integrity)| { + json!({ + "package": package, + "version": version, + "integrity": integrity, + }) + }) + .collect(); let ops: Vec<_> = crate::dispatch::registrations() .iter() .map(|(descriptor, _)| json!(descriptor)) @@ -84,12 +104,14 @@ pub fn generate_manifest() -> (Box, String) { "abiVersion": ABI_VERSION, "opsVersion": OPS_VERSION, "manifestRevision": MANIFEST_REVISION, + "generatorVersion": env!("CARGO_PKG_VERSION"), + "sources": sources, "ops": ops, "handleKinds": HandleKind::ALL, "packages": crate::ops::provider::packages(), "errorCodes": error_codes, "types": types, - "typeDefs": {"input": input, "output": output}, + "typeDefs": type_defs, "registeredGaps": [ "G-a: recording/session/infer state remains process-wide", "G-b: recording schema migration belongs to RFC-0041", @@ -100,11 +122,147 @@ pub fn generate_manifest() -> (Box, String) { canonicalize(&mut value); let digest_str = format!("{:x}", Sha256::digest(value.to_string().as_bytes())); value["digest"] = json!(digest_str.clone()); + // `inputHash` is what the bindings verify before trusting a runtime: it + // equals `digest` on the compact snapshot and is stripped by + // `canonical_digest` together with `digest`. + value["inputHash"] = json!(digest_str.clone()); let compact_json = value.to_string().into_boxed_str(); (compact_json, digest_str) } #[cfg(any(feature = "runtime-manifest", test))] +#[cfg(feature = "runtime-manifest")] +fn compute_type_schema_hash(entry: &Value, type_defs: &Value) -> String { + let mut visited = BTreeSet::new(); + let mut queue = VecDeque::new(); + for direction in ["input", "output"] { + if let Some(name) = entry.get(direction).and_then(Value::as_str) { + let key = (direction.to_owned(), name.to_owned()); + if visited.insert(key.clone()) { + queue.push_back(key); + } + } + } + + let mut reachable_input = Map::new(); + let mut reachable_output = Map::new(); + while let Some((direction, name)) = queue.pop_front() { + let Some(def) = type_defs + .get(&direction) + .and_then(|defs| defs.get(&name)) + .cloned() + else { + continue; + }; + collect_type_refs(&def, &mut visited, &mut queue); + if direction == "input" { + reachable_input.insert(name, def); + } else { + reachable_output.insert(name, def); + } + } + + let mut spec = json!({ + "id": entry["id"], + "revision": entry["revision"], + "typeDefs": { + "input": Value::Object(reachable_input), + "output": Value::Object(reachable_output), + }, + }); + if let Some(input_name) = entry.get("input") { + spec["input"] = input_name.clone(); + } + if let Some(output_name) = entry.get("output") { + spec["output"] = output_name.clone(); + } + canonicalize(&mut spec); + format!("{:x}", Sha256::digest(spec.to_string().as_bytes())) +} + +#[cfg(feature = "runtime-manifest")] +fn collect_type_refs( + value: &Value, + visited: &mut BTreeSet<(String, String)>, + queue: &mut VecDeque<(String, String)>, +) { + match value { + Value::Object(object) => { + if let Some(reference) = object.get("$ref").and_then(Value::as_str) + && let Some((direction, name)) = parse_type_def_ref(reference) + { + let key = (direction, name); + if visited.insert(key.clone()) { + queue.push_back(key); + } + } + for child in object.values() { + collect_type_refs(child, visited, queue); + } + } + Value::Array(items) => { + for item in items { + collect_type_refs(item, visited, queue); + } + } + _ => {} + } +} + +#[cfg(feature = "runtime-manifest")] +fn parse_type_def_ref(reference: &str) -> Option<(String, String)> { + let rest = reference.strip_prefix("#/typeDefs/")?; + let (direction, tail) = rest.split_once('/')?; + if !matches!(direction, "input" | "output") { + return None; + } + let raw_name = tail.split('/').next()?; + if raw_name.is_empty() { + return None; + } + Some((direction.to_owned(), unescape_json_pointer(raw_name))) +} + +#[cfg(feature = "runtime-manifest")] +fn unescape_json_pointer(segment: &str) -> String { + let mut out = String::with_capacity(segment.len()); + let mut chars = segment.chars(); + while let Some(ch) = chars.next() { + if ch == '~' { + match chars.next() { + Some('0') => out.push('~'), + Some('1') => out.push('/'), + Some(other) => { + out.push('~'); + out.push(other); + } + None => out.push('~'), + } + } else { + out.push(ch); + } + } + out +} + +/// Compute the canonical manifest digest from a parsed manifest JSON value. +/// +/// Strips top-level `"digest"` and `"inputHash"` (added by `aimux-codegen` to +/// `schema/manifest.json`), sorts `"ops"` by `"name"`, recursively sorts all +/// JSON object keys, and returns lowercase hex SHA-256 of the compact JSON. +#[must_use] +pub fn canonical_digest(mut value: Value) -> String { + if let Some(object) = value.as_object_mut() { + object.remove("digest"); + object.remove("inputHash"); + } + if let Some(ops) = value.get_mut("ops").and_then(Value::as_array_mut) { + ops.sort_by(|a, b| a["name"].as_str().cmp(&b["name"].as_str())); + } + canonicalize(&mut value); + format!("{:x}", Sha256::digest(value.to_string().as_bytes())) +} + fn canonicalize(value: &mut Value) { match value { Value::Object(object) => { diff --git a/aimux-ops/src/ops/operation.rs b/aimux-ops/src/ops/operation.rs index 6cbebf90f..9d5e2e1df 100644 --- a/aimux-ops/src/ops/operation.rs +++ b/aimux-ops/src/ops/operation.rs @@ -13,9 +13,9 @@ use std::time::Duration; #[serde(deny_unknown_fields)] pub(crate) struct EmptyParams {} -#[derive(Deserialize, schemars::JsonSchema)] +#[derive(Deserialize, Serialize, schemars::JsonSchema)] #[serde(rename_all = "camelCase", deny_unknown_fields)] -struct OperationNextParams { +pub(crate) struct OperationNextParams { #[serde(default)] pub timeout_ms: u64, } @@ -192,8 +192,10 @@ fn start(ctx: Ctx, target: Target, params: Params<'_>) -> CallFuture<'_> { timeout: request.timeout, ..Default::default() }; + let reservation = HandleRegistry::global().reserve()?; let operation = Operation::start(model, options, ctx.abort).await?; - let id = HandleRegistry::global().insert(ctx.owner, Entry::Operation(operation))?; + let id = + HandleRegistry::global().commit(ctx.owner, reservation, Entry::Operation(operation)); serialize(id) }) } diff --git a/aimux-ops/src/ops/recording.rs b/aimux-ops/src/ops/recording.rs index db9a8b049..f89179a94 100644 --- a/aimux-ops/src/ops/recording.rs +++ b/aimux-ops/src/ops/recording.rs @@ -59,7 +59,24 @@ struct RecorderHandle { } impl RecorderHandle { + fn validate(params: &CreateRecorderParams) -> Result<(), OpsError> { + let CreateRecorderParams { + backend, + capture_policy: CapturePolicy::Full, + } = params; + if let BackendConfig::Ring { capacity } = backend { + let capacity = capacity.unwrap_or(recording::DEFAULT_RING_CAPACITY); + if capacity == 0 + || capacity > isize::MAX as usize / std::mem::size_of::() + { + return Err(invalid("ring capacity must be positive and fit in memory")); + } + } + Ok(()) + } + fn new(params: CreateRecorderParams) -> Result { + Self::validate(¶ms)?; let CreateRecorderParams { backend, capture_policy: CapturePolicy::Full, @@ -67,11 +84,6 @@ impl RecorderHandle { let backend = match backend { BackendConfig::Ring { capacity } => { let capacity = capacity.unwrap_or(recording::DEFAULT_RING_CAPACITY); - if capacity == 0 - || capacity > isize::MAX as usize / std::mem::size_of::() - { - return Err(invalid("ring capacity must be positive and fit in memory")); - } Backend::Ring(RingRecorder::with_capacity(capacity)) } BackendConfig::Jsonl { directory } => { @@ -261,9 +273,12 @@ async fn blocking( fn create(ctx: Ctx, _target: Target, value: Params<'_>) -> CallFuture<'_> { Box::pin(async move { let params = params(value)?; + RecorderHandle::validate(¶ms)?; + let reservation = HandleRegistry::global().reserve()?; blocking(move || { let recorder = Arc::new(RecorderHandle::new(params)?); - let handle = HandleRegistry::global().insert(ctx.owner, Entry::Recorder(recorder))?; + let handle = + HandleRegistry::global().commit(ctx.owner, reservation, Entry::Recorder(recorder)); result(RecorderHandleResult { handle }) }) .await diff --git a/aimux-ops/src/ops/registry.rs b/aimux-ops/src/ops/registry.rs index 3469b1c2a..a971536b7 100644 --- a/aimux-ops/src/ops/registry.rs +++ b/aimux-ops/src/ops/registry.rs @@ -604,6 +604,7 @@ fn update(ctx: Ctx, target: Target, params: Params<'_>) -> CallFuture<'_> { }); } + let reservation = HandleRegistry::global().reserve()?; let derived = registry.with_updated_providers(¶ms.remove, resolved_set, params.replace); let keys = derived.provider_ids(); let namespace = match metadata(ctx.owner, &entry, None) { @@ -613,7 +614,7 @@ fn update(ctx: Ctx, target: Target, params: Params<'_>) -> CallFuture<'_> { let new_entry = Entry::Registry(Arc::new(derived)); metadata(ctx.owner, &new_entry, Some(Metadata::Namespace(namespace))); let kind = new_entry.kind(); - let id = HandleRegistry::global().insert(ctx.owner, new_entry)?; + let id = HandleRegistry::global().commit(ctx.owner, reservation, new_entry); serialize_result(RegistryUpdateResult { keys, handle: Some(id), diff --git a/aimux-ops/src/ops/trace.rs b/aimux-ops/src/ops/trace.rs index cb9dce25d..89b079042 100644 --- a/aimux-ops/src/ops/trace.rs +++ b/aimux-ops/src/ops/trace.rs @@ -31,8 +31,10 @@ pub enum AuditMode { #[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct TraceCreateParams { #[serde(default = "default_capacity")] + #[schemars(range(min = 1, max = 1_048_576))] capacity: usize, #[serde(default = "default_scope_capacity")] + #[schemars(range(min = 1))] per_scope_capacity: usize, #[serde(default)] audit_mode: AuditMode, @@ -102,23 +104,35 @@ fn store(target: Target) -> Result, OpsError> { } } +const MAX_TRACE_CAPACITY: usize = 1 << 20; + fn create(ctx: Ctx, _target: Target, value: Params<'_>) -> CallFuture<'_> { Box::pin(async move { let p: TraceCreateParams = decode(value)?; - if p.capacity == 0 || p.per_scope_capacity == 0 { + if p.capacity == 0 || p.capacity > MAX_TRACE_CAPACITY { + return Err(OpsError::Protocol(ProtocolError::invalid_params( + "trace capacity must be between 1 and 1048576", + ))); + } + if p.per_scope_capacity == 0 { return Err(OpsError::Protocol(ProtocolError::invalid_params( - "trace capacities must be greater than zero", + "trace perScopeCapacity must be greater than zero", ))); } + let reservation = HandleRegistry::global().reserve()?; let mode = match p.audit_mode { AuditMode::Off => TraceAuditMode::Off, AuditMode::Shared => TraceAuditMode::Shared, AuditMode::Strict => TraceAuditMode::Strict, }; - let trace = Arc::new( - RingTraceStore::with_capacity(p.capacity, p.per_scope_capacity).with_audit_mode(mode), + let trace = RingTraceStore::try_with_capacity(p.capacity, p.per_scope_capacity) + .map_err(|msg| OpsError::Protocol(ProtocolError::invalid_params(msg)))? + .with_audit_mode(mode); + let id = HandleRegistry::global().commit( + ctx.owner, + reservation, + Entry::TraceStore(Arc::new(trace)), ); - let id = HandleRegistry::global().insert(ctx.owner, Entry::TraceStore(trace))?; result(id) }) } diff --git a/aimux-ops/src/sources.rs b/aimux-ops/src/sources.rs new file mode 100644 index 000000000..82bf3b772 --- /dev/null +++ b/aimux-ops/src/sources.rs @@ -0,0 +1,115 @@ +//! Kept inside `aimux-ops/src/` so `cargo package -p aimux-ops` remains self-contained. + +#[cfg(feature = "runtime-manifest")] +pub(crate) const UPSTREAM_SOURCES: &[(&str, &str, &str)] = &[ + ( + "@ai-sdk/amazon-bedrock", + "5.0.100", + "sha512-lu4qObueHsPzOkaPoXOU4U55waGY8M35y/AqpRawV8AqhWxQoKloejyS8Z8beeGeoHldUnq0bdDhv/Yl5FttmA==", + ), + ( + "@ai-sdk/anthropic", + "4.0.71", + "sha512-wiv3jhUH0RrvGzSolJMZfZ2cI9As45LhwYmcAoWvNivXjC7wzJ4W/Udq9/u7EGnGsT8lpmFKEKBrMXVeUO97Dg==", + ), + ( + "@ai-sdk/anthropic-aws", + "2.0.63", + "sha512-IrTFCzHiNnQ4Gns9+tLuQBolU0B8qLOwkgya3ztAZuvnMHQyoChPBe0JWav5Dhm0WWW4o1AtQ5GfKTaHeYMRfQ==", + ), + ( + "@ai-sdk/azure", + "4.0.84", + "sha512-7sDolS6K+qbKB4CPixFM4p5rVWB3KdmLmjLQ2HMHgTHfPHD+Tf33R8zzy7cHLv+xOfsceXHl9m855thcV9H6sA==", + ), + ( + "@ai-sdk/cohere", + "4.0.52", + "sha512-JVIjabzIuaebEX4lFx6CsSJFjH/PCaZfhnIHHBscXbs+MktqoqJPJIa/6tHFgK2JOdkORE7Ktlx7PmlDtGRfpw==", + ), + ( + "@ai-sdk/deepgram", + "3.1.24", + "sha512-IXLbfLD69uGr6wKBvuc7eR4M1gpqm/OTIfYM6dVmV8jypHnNt3JIWjhH2wpBGaqPcpJpjQ0swiJOIlMjbOsjyA==", + ), + ( + "@ai-sdk/deepseek", + "3.0.56", + "sha512-ZBmtMofJqRzJK1JoPhz7EwcboJgsA7CCZDQ4Ld6SyHoONN29Sb3Pvnrq6YsK4gE3InnTx/cjjE+GJhL0Z/G+lw==", + ), + ( + "@ai-sdk/elevenlabs", + "3.0.54", + "sha512-f2riLaRgLRAPq8OZzxkHj7M3YtQpm64sUpTQGtAXnPfCXKchx+Ev+St+zX7t2XZJ272ENGmeYBV2OnaT7TdOng==", + ), + ( + "@ai-sdk/fal", + "3.0.54", + "sha512-hEyQBnG5UDUX0VFAhP6nvAj+6E49mnBegCEdZP7cNV9xL+p4tOVtTywV7jK6GSxI5LfIqUS5sPeXcupgD7+pfA==", + ), + ( + "@ai-sdk/google", + "4.0.87", + "sha512-s0tWc+QeSce7O2ZLm+VWSRQy16dGfqEcMIUxEWh+LFvXX3h0TLH8jxCQ2H1qhiBgTta+6A97eHPhBlRFu1xy+g==", + ), + ( + "@ai-sdk/google-vertex", + "5.0.100", + "sha512-SWwmL+DHBPSrlLjEDmiSSSoJ5Y3VHvh4qPYb4c/R5Dxl04HkgPn0yffQh3NdmrRVv1b940ZqHERbqoTKnPzj1Q==", + ), + ( + "@ai-sdk/groq", + "4.0.52", + "sha512-Vmgr4GDtZRd/eKGVSfCYvWLEPpVJyxbE4PI5OWPmnu/uHHvCOQU/6jRP7z2Rn4S+GGR64p3QvSHqeTRuj2bfQA==", + ), + ( + "@ai-sdk/huggingface", + "2.0.62", + "sha512-FCjGyrLhnV2nh6euHleq4/d6ZD/7d5g+2XnxUjjJx7SVp/PT1ICLG2kJ3zBiveMG6i5FfUN+7sj5377o8w/jFw==", + ), + ( + "@ai-sdk/luma", + "3.0.54", + "sha512-ZdBncHjP07kMf4eNSFKVMHOjAKNfHjQ821zpvI5l51lVrXjrlHmz4efoBF8T/oQBhhQQ7u9Eb5ANCwNmcyZ9vw==", + ), + ( + "@ai-sdk/mistral", + "4.0.55", + "sha512-5A9A4ojjKM9BccqS7JP/oZmTjLKc0l357p17tHgtTeJtq8vRqR53TwLYa1ifxie6tpLSCdl+Y7eUYB1II/vk5w==", + ), + ( + "@ai-sdk/open-responses", + "2.0.58", + "sha512-VF48lchWrMzQV0DFsaO5IrIMj6hiDFWiqhBOTxrfMKtDxrTEBNnlrns30wma79w08uKHQoi7RetPJlLdSlFwEA==", + ), + ( + "@ai-sdk/openai", + "4.0.83", + "sha512-NgqZVWoya7hfmtLkWyIjX9THbyYMLfxFqpShdAmvMnkoT+R9AZbdULGan8+4BiBWIZ1aHiAsc90l3SL8QU/0+Q==", + ), + ( + "@ai-sdk/openai-compatible", + "3.0.62", + "sha512-IAz1xv8zot4KLGa8kN7UfAA6H5+ARzAgAKLsoKxHPBzZuOc2E3ohaELg0x/JR9HVTbMbiftb0dPyCb8cT2KBRg==", + ), + ( + "@ai-sdk/provider", + "4.0.22", + "sha512-1Jtmn36VNMOBo9CMUQrPqsR744qtqRloEiXpWCYS8ffPlhS2CrSNmoho5lPjp3R7EnkzBsGI6p51TA7fQJQZdA==", + ), + ( + "@ai-sdk/provider-utils", + "5.0.55", + "sha512-VeY9IqwJGcHSmezQTZknaYUT3sRcaXpuIt5VWyGOlJtoc5wkpDPstXZtfa41bGUsbQwCijvN6ASbggUCeTcMkw==", + ), + ( + "@ai-sdk/xai", + "5.0.12", + "sha512-Vkgwm/p0LHlz6JUE3VLrPooYg2FoJdrQ6OdPFDcn86nUJfJYDkQPrRSRaxzdA3T2fjBrsOeKJeNi9iqZxCOdag==", + ), + ( + "ai", + "7.0.127", + "sha512-JNsNPk4ZvRGEJuqdVo2lYFkm7uAuf3p/RwKFWn1Wh/+IK3U1RyFWw2GXoFnhzqNfxEuj7XJB4WpIUhl1sHToWg==", + ), +]; diff --git a/aimux-ops/tests/manifest_contract.rs b/aimux-ops/tests/manifest_contract.rs index 38acdf2e6..cd76554fa 100644 --- a/aimux-ops/tests/manifest_contract.rs +++ b/aimux-ops/tests/manifest_contract.rs @@ -1,9 +1,10 @@ //! Frozen RFC-0039 §3.2 inventory, independent of the implementation table. -use std::collections::{BTreeMap, BTreeSet}; +use std::collections::{BTreeMap, BTreeSet, VecDeque}; +use std::path::Path; use aimux_ops::dispatch::descriptor; -use aimux_ops::manifest::{manifest, manifest_digest}; +use aimux_ops::manifest::{canonical_digest, manifest, manifest_digest}; use aimux_ops::op::{ABI_VERSION, OPS_VERSION}; use serde_json::Value; use sha2::{Digest, Sha256}; @@ -287,7 +288,10 @@ fn digest_is_stable_and_hashes_the_complete_canonical_manifest() { let mut bytes = String::new(); assert_eq!(first["digest"], digest); let mut unsigned = first.clone(); + // The emitted snapshot carries `digest` and (for binding self-verification) + // `inputHash`; neither is part of the hashed document. unsigned.as_object_mut().unwrap().remove("digest"); + unsigned.as_object_mut().unwrap().remove("inputHash"); canonical(&unsigned, &mut bytes); assert_eq!(digest, format!("{:x}", Sha256::digest(bytes.as_bytes()))); for _ in 0..8 { @@ -296,6 +300,21 @@ fn digest_is_stable_and_hashes_the_complete_canonical_manifest() { } } +#[test] +fn canonical_digest_self_verifies_emitted_schema_manifest_with_input_hash() { + // The emitted manifest is the compressed snapshot served by + // `aimux_manifest_json`; it carries both `digest` and `inputHash`. + let emitted: Value = serde_json::from_str(aimux_ops::manifest::manifest_json()).unwrap(); + let expected = manifest_digest(); + assert_eq!(emitted["digest"], expected); + assert_eq!(emitted["inputHash"], expected); + assert_eq!(canonical_digest(emitted.clone()), expected); + + let mut reversed_ops = emitted; + reversed_ops["ops"].as_array_mut().unwrap().reverse(); + assert_eq!(canonical_digest(reversed_ops), expected); +} + #[test] fn every_descriptor_type_reference_names_an_existing_type() { let manifest = manifest(); @@ -688,3 +707,278 @@ fn trusted_caller_and_env_allowlist_boundaries_are_published_in_manifest_schemas ); } } + +fn collect_refs_for_hash( + value: &Value, + seen: &mut BTreeSet<(String, String)>, + queue: &mut VecDeque<(String, String)>, +) { + match value { + Value::Object(object) => { + if let Some(reference) = object.get("$ref").and_then(Value::as_str) + && let Some(rest) = reference.strip_prefix("#/typeDefs/") + && let Some((dir, tail)) = rest.split_once('/') + && matches!(dir, "input" | "output") + && let Some(raw_name) = tail.split('/').next() + && !raw_name.is_empty() + { + let decoded = raw_name.replace("~1", "/").replace("~0", "~"); + let key = (dir.to_owned(), decoded); + if seen.insert(key.clone()) { + queue.push_back(key); + } + } + for child in object.values() { + collect_refs_for_hash(child, seen, queue); + } + } + Value::Array(items) => { + for item in items { + collect_refs_for_hash(item, seen, queue); + } + } + _ => {} + } +} + +fn independent_schema_hash(entry: &Value, type_defs: &Value) -> String { + let mut seen = BTreeSet::new(); + let mut queue = VecDeque::new(); + for dir in ["input", "output"] { + if let Some(name) = entry.get(dir).and_then(Value::as_str) { + let key = (dir.to_owned(), name.to_owned()); + if seen.insert(key.clone()) { + queue.push_back(key); + } + } + } + let mut input_defs = serde_json::Map::new(); + let mut output_defs = serde_json::Map::new(); + while let Some((dir, name)) = queue.pop_front() { + if let Some(def) = type_defs.get(&dir).and_then(|defs| defs.get(&name)) { + collect_refs_for_hash(def, &mut seen, &mut queue); + if dir == "input" { + input_defs.insert(name, def.clone()); + } else { + output_defs.insert(name, def.clone()); + } + } + } + let mut spec = serde_json::json!({ + "id": entry["id"], + "revision": entry["revision"], + "typeDefs": { + "input": Value::Object(input_defs), + "output": Value::Object(output_defs), + }, + }); + if let Some(input_name) = entry.get("input") { + spec["input"] = input_name.clone(); + } + if let Some(output_name) = entry.get("output") { + spec["output"] = output_name.clone(); + } + let mut encoded = String::new(); + canonical(&spec, &mut encoded); + format!("{:x}", Sha256::digest(encoded.as_bytes())) +} + +#[test] +fn type_entries_include_revision_and_independent_canonical_schema_hash() { + let manifest = manifest(); + let types = manifest["types"].as_array().expect("manifest.types"); + assert!(!types.is_empty()); + let type_defs = &manifest["typeDefs"]; + + for entry in types { + let id = entry["id"].as_str().expect("type id"); + assert_eq!(entry["revision"], "1", "{id}"); + let hash = entry["schemaHash"].as_str().expect("schemaHash"); + assert_eq!(hash.len(), 64, "{id}"); + assert!( + hash.bytes() + .all(|b| b.is_ascii_digit() || (b'a'..=b'f').contains(&b)), + "{id}: non-lowercase-hex hash {hash}" + ); + assert_eq!(hash, independent_schema_hash(entry, type_defs), "{id}"); + } +} + +#[test] +fn unrelated_type_def_mutation_keeps_schema_hash_stable() { + let manifest = manifest(); + let types = manifest["types"].as_array().expect("manifest.types"); + let generate_entry = types + .iter() + .find(|entry| entry["id"] == "aimux_core::generate::GenerateTextResult") + .expect("GenerateTextResult type entry"); + let mut mutated = manifest.clone(); + mutated["typeDefs"]["output"]["UnrelatedSyntheticType"] = serde_json::json!({"type": "string"}); + assert_eq!( + generate_entry["schemaHash"], + independent_schema_hash(generate_entry, &mutated["typeDefs"]) + ); +} + +#[test] +fn transitive_type_def_mutation_changes_schema_hash() { + let manifest = manifest(); + let types = manifest["types"].as_array().expect("manifest.types"); + let generate_entry = types + .iter() + .find(|entry| entry["id"] == "aimux_core::generate::GenerateTextResult") + .expect("GenerateTextResult type entry"); + let mut transitive_mutated = manifest["typeDefs"].clone(); + transitive_mutated["output"]["LanguageModelUsage"] = serde_json::json!({"type": "null"}); + assert_ne!( + generate_entry["schemaHash"], + independent_schema_hash(generate_entry, &transitive_mutated) + ); +} + +#[test] +fn manifest_records_generator_version_and_upstream_sources() { + let manifest = manifest(); + assert_eq!(manifest["generatorVersion"], env!("CARGO_PKG_VERSION")); + let versions_path = + Path::new(env!("CARGO_MANIFEST_DIR")).join("../fixtures/aisdk/VERSIONS.json"); + let raw = std::fs::read_to_string(&versions_path).expect("read VERSIONS.json"); + let expected_map: BTreeMap = + serde_json::from_str(&raw).expect("parse VERSIONS.json"); + let actual_sources = manifest["sources"].as_array().expect("manifest.sources"); + assert_eq!(actual_sources.len(), expected_map.len()); + let expected_sources: Vec = expected_map + .into_iter() + .map(|(package, info)| { + serde_json::json!({ + "package": package, + "version": info["version"], + "integrity": info["integrity"], + }) + }) + .collect(); + assert_eq!(actual_sources, &expected_sources); +} + +#[test] +fn encoded_positive_dto_vectors_decode_through_rust() { + fn round_trip_json( + encoded: &str, + expected: &Value, + label: &str, + ) { + let decoded: T = serde_json::from_str(encoded) + .unwrap_or_else(|error| panic!("{label}: initial Rust decode failed: {error}")); + let reencoded = serde_json::to_string(&decoded) + .unwrap_or_else(|error| panic!("{label}: Rust re-encode failed: {error}")); + let redecoded: T = serde_json::from_str(&reencoded) + .unwrap_or_else(|error| panic!("{label}: second Rust decode failed: {error}")); + let actual_value = serde_json::to_value(&redecoded).unwrap(); + assert_eq!(&actual_value, expected, "{label}"); + } + + let root = Path::new(env!("CARGO_MANIFEST_DIR")).join("../contract-tests/dto"); + let index: Vec = + serde_json::from_str(&std::fs::read_to_string(root.join("index.json")).unwrap()).unwrap(); + + let mut tool_inputs_checked = 0usize; + let mut positive_checked = 0usize; + for entry in &index { + if entry["expectError"].as_bool().unwrap_or(false) { + continue; + } + let kind = entry["type"].as_str().unwrap(); + let file = entry["file"].as_str().unwrap(); + let raw_json = std::fs::read_to_string(root.join(file)).unwrap(); + let expected_path = entry["expect"] + .as_str() + .map_or_else(|| root.join(file), |expect_file| root.join(expect_file)); + let expected: Value = + serde_json::from_str(&std::fs::read_to_string(&expected_path).unwrap()).unwrap(); + + match kind { + "RawToolCall" => { + round_trip_json::(&raw_json, &expected, file); + tool_inputs_checked += 1; + positive_checked += 1; + } + "ToolCall" | "ToolCallInput" => { + round_trip_json::(&raw_json, &expected, file); + tool_inputs_checked += 1; + positive_checked += 1; + } + "AiMuxError" | "AiMuxErrorInput" => { + round_trip_json::(&raw_json, &expected, file); + positive_checked += 1; + } + "ErrorEnvelope" => { + round_trip_json::(&raw_json, &expected, file); + positive_checked += 1; + } + "FinishReasonUnified" => { + round_trip_json::( + &raw_json, &expected, file, + ); + positive_checked += 1; + } + "GenerateContent" => { + round_trip_json::(&raw_json, &expected, file); + positive_checked += 1; + } + "GenerateTextResult" => { + round_trip_json::( + &raw_json, &expected, file, + ); + positive_checked += 1; + } + "HandleId" | "HandleIdInput" => { + round_trip_json::(&raw_json, &expected, file); + positive_checked += 1; + } + "ModelLimits" => { + round_trip_json::( + &raw_json, &expected, file, + ); + positive_checked += 1; + } + "Recording" => { + round_trip_json::(&raw_json, &expected, file); + positive_checked += 1; + } + "ContentPart" | "ContentPartInput" => { + round_trip_json::(&raw_json, &expected, file); + positive_checked += 1; + } + "TextStreamPart" => { + round_trip_json::( + &raw_json, &expected, file, + ); + positive_checked += 1; + } + "TraceRecord" => { + round_trip_json::(&raw_json, &expected, file); + positive_checked += 1; + } + _ => {} + } + } + assert!( + tool_inputs_checked >= 19, + "tool_inputs_checked={tool_inputs_checked}" + ); + assert!( + positive_checked >= 60, + "positive_checked={positive_checked}" + ); +} + +#[test] +fn scientific_notation_tool_inputs_decode_through_rust() { + let raw_sci: aimux_core::tool::RawToolCall = + serde_json::from_str(r#"{"toolCallId":"call-sci","toolName":"calc","input":" 1e2 "}"#) + .unwrap(); + assert_eq!(raw_sci.input, " 1e2 "); + let parsed_sci: aimux_core::tool::ToolCall = + serde_json::from_str(r#"{"toolCallId":"call-sci","toolName":"calc","input":1e2}"#).unwrap(); + assert_eq!(parsed_sci.input.as_f64(), Some(100.0)); +} diff --git a/aimux-ops/tests/ops_matrix.rs b/aimux-ops/tests/ops_matrix.rs index 02bcc9061..e81fb3e92 100644 --- a/aimux-ops/tests/ops_matrix.rs +++ b/aimux-ops/tests/ops_matrix.rs @@ -308,3 +308,596 @@ async fn production_dispatch_rejects_invalid_handles_before_acceptance() { registry.release_owner(owner); registry.release_owner(other); } + +#[tokio::test] +async fn handle_exhausted_negative_state_behaves_per_contract() { + use std::collections::BTreeSet; + use std::future::Future; + use std::pin::Pin; + use std::sync::Arc; + use std::sync::atomic::{AtomicUsize, Ordering}; + + use aimux_core::AbortSignal; + use aimux_core::error::AiMuxError; + use aimux_core::files_model::{Files, UploadFileCallOptions, UploadFileResult}; + use aimux_core::language_model::LanguageModel; + use aimux_core::options::CallOptions; + use aimux_core::provider::Provider; + use aimux_core::recording::{InputRecord, ProviderRecord, Recording}; + use aimux_core::result::{GenerateResult, StreamResult}; + use aimux_core::transcription_model::{ + TranscriptionCallOptions, TranscriptionModel, TranscriptionResult, + TranscriptionStreamOptions, TranscriptionStreamPart, TranscriptionStreamResult, + }; + use aimux_ops::dispatch; + use aimux_ops::envelope::{OpsError, ProtocolError}; + use aimux_ops::handle::{ + Entry, HandleId, HandleKind, HandleRegistry, Owner, test_exhaust_process_handle_allocator, + }; + use aimux_ops::op::OpMode; + use serde_json::json; + + if std::env::var_os("AIMUX_HANDLE_EXHAUSTED_CHILD").is_none() { + let status = std::process::Command::new(std::env::current_exe().unwrap()) + .env("AIMUX_HANDLE_EXHAUSTED_CHILD", "1") + .args([ + "--exact", + "handle_exhausted_negative_state_behaves_per_contract", + "--nocapture", + ]) + .status() + .expect("spawn HandleExhausted matrix subprocess"); + assert!( + status.success(), + "HandleExhausted matrix subprocess failed: {status}" + ); + return; + } + + struct StubLanguage(Arc); + impl LanguageModel for StubLanguage { + fn provider(&self) -> &str { + "stub" + } + fn model_id(&self) -> &str { + "stub-model" + } + fn do_generate<'a, 'b, 'f>( + &'a self, + _: &'b CallOptions, + ) -> Pin> + Send + 'f>> + where + 'a: 'f, + 'b: 'f, + Self: 'f, + { + self.0.fetch_add(1, Ordering::SeqCst); + Box::pin(async { Err(AiMuxError::other("stub must not be reached")) }) + } + fn do_stream<'a, 'b, 'f>( + &'a self, + _: &'b CallOptions, + ) -> Pin> + Send + 'f>> + where + 'a: 'f, + 'b: 'f, + Self: 'f, + { + self.0.fetch_add(1, Ordering::SeqCst); + Box::pin(async { Err(AiMuxError::other("stub must not be reached")) }) + } + } + + struct StubFiles(Arc); + impl Files for StubFiles { + fn provider(&self) -> &str { + "stub" + } + fn upload_file<'a, 'b, 'f>( + &'a self, + _: &'b UploadFileCallOptions, + ) -> Pin> + Send + 'f>> + where + 'a: 'f, + 'b: 'f, + Self: 'f, + { + self.0.fetch_add(1, Ordering::SeqCst); + Box::pin(async { Err(AiMuxError::other("stub files must not be reached")) }) + } + } + + struct StubTranscription(Arc); + impl TranscriptionModel for StubTranscription { + fn provider(&self) -> &str { + "stub" + } + fn model_id(&self) -> &str { + "stub-realtime" + } + fn do_generate<'a, 'b, 'f>( + &'a self, + _: &'b TranscriptionCallOptions, + ) -> Pin> + Send + 'f>> + where + 'a: 'f, + 'b: 'f, + Self: 'f, + { + self.0.fetch_add(1, Ordering::SeqCst); + Box::pin(async { Err(AiMuxError::other("stub transcription generate unused")) }) + } + fn do_stream( + &self, + _: TranscriptionStreamOptions, + ) -> Option< + Pin< + Box> + Send + '_>, + >, + > { + self.0.fetch_add(1, Ordering::SeqCst); + Some(Box::pin(async { + let empty: Pin< + Box< + dyn futures::Stream> + + Send, + >, + > = Box::pin(futures::stream::empty()); + Ok(TranscriptionStreamResult { + stream: empty, + request: None, + response: None, + }) + })) + } + } + + struct StubProvider { + language: Arc, + files: Arc, + } + impl Provider for StubProvider { + fn language_model(&self, _: &str) -> Result, AiMuxError> { + Ok(Arc::clone(&self.language)) + } + fn embedding_model( + &self, + _: &str, + ) -> Result, AiMuxError> { + Err(AiMuxError::UnsupportedFunctionality( + "stub embedding unused".into(), + )) + } + fn image_model(&self, _: &str) -> Result, AiMuxError> { + Err(AiMuxError::UnsupportedFunctionality( + "stub image unused".into(), + )) + } + fn files(&self) -> Option> { + Some(Arc::clone(&self.files)) + } + } + + let provider_calls = Arc::new(AtomicUsize::new(0)); + let stub_language: Arc = Arc::new(StubLanguage(Arc::clone(&provider_calls))); + let stub_files: Arc = Arc::new(StubFiles(Arc::clone(&provider_calls))); + let stub_provider: Arc = Arc::new(StubProvider { + language: Arc::clone(&stub_language), + files: Arc::clone(&stub_files), + }); + + let registry = HandleRegistry::global(); + let owner = Owner::new_node().unwrap(); + let other = Owner::new_node().unwrap(); + + let abort_id = registry + .insert(owner, Entry::Abort(Arc::new(AbortSignal::new()))) + .unwrap(); + let lang_id = registry + .insert(owner, Entry::Language(Arc::clone(&stub_language))) + .unwrap(); + let provider_id = registry + .insert(owner, Entry::Provider(Arc::clone(&stub_provider))) + .unwrap(); + let files_id = registry + .insert(owner, Entry::Files(Arc::clone(&stub_files))) + .unwrap(); + let transcription_id = registry + .insert( + owner, + Entry::Transcription(Arc::new(StubTranscription(Arc::clone(&provider_calls)))), + ) + .unwrap(); + let trace_created = dispatch::call(ctx(owner), HandleId(0), "trace.create", json!({})) + .await + .unwrap(); + let trace_id = HandleId(trace_created.as_str().unwrap().parse().unwrap()); + let middleware_created = dispatch::call( + ctx(owner), + HandleId(0), + "middleware.create", + json!({"kind": "trace", "traceStore": trace_id.0.to_string()}), + ) + .await + .unwrap(); + let middleware_id = HandleId( + middleware_created["handle"] + .as_str() + .unwrap() + .parse() + .unwrap(), + ); + let registry_created = dispatch::call( + ctx(owner), + HandleId(0), + "registry.create", + json!({"entries": [{"key": "k", "provider": provider_id.0.to_string()}]}), + ) + .await + .unwrap(); + let registry_id = HandleId( + registry_created["handle"] + .as_str() + .unwrap() + .parse() + .unwrap(), + ); + let recorder_created = dispatch::call( + ctx(owner), + HandleId(0), + "recorder.create", + json!({"backend": {"type": "ring"}, "capturePolicy": "full"}), + ) + .await + .unwrap(); + let recorder_id = HandleId( + recorder_created["handle"] + .as_str() + .unwrap() + .parse() + .unwrap(), + ); + let session_created = dispatch::call( + ctx(owner), + HandleId(0), + "sessionStore.create", + json!({"infer": false}), + ) + .await + .unwrap(); + let session_id = HandleId(session_created["handle"].as_str().unwrap().parse().unwrap()); + let mut recording = Recording::new( + "exhaust-replay", + InputRecord::from_call_options(&CallOptions::default()), + ProviderRecord::new("openai", "openai.chat", "gpt-4o"), + ); + recording.complete = true; + recording.transport_closed = true; + let recording_jsonl = serde_json::to_string(&recording).unwrap(); + let replay_created = dispatch::call( + ctx(owner), + HandleId(0), + "replay.create", + json!({"recordingsJsonl": &recording_jsonl}), + ) + .await + .unwrap(); + let replay_id = HandleId(replay_created["handle"].as_str().unwrap().parse().unwrap()); + + let dropped = registry + .insert(owner, Entry::Abort(Arc::new(AbortSignal::new()))) + .unwrap(); + drop(registry.remove(owner, dropped)); + let foreign = registry + .insert(other, Entry::Abort(Arc::new(AbortSignal::new()))) + .unwrap(); + + fn manifest_allocating_ops(manifest: &Value) -> BTreeSet<&str> { + let output_defs = manifest["typeDefs"]["output"].as_object().unwrap(); + let types = manifest["types"].as_array().unwrap(); + let allocating_result_types: BTreeSet<&str> = types + .iter() + .filter_map(|ty| { + let id = ty["id"].as_str()?; + let output_name = ty["output"].as_str()?; + let has_handle_prop = output_defs + .get(output_name) + .and_then(|schema| schema.get("properties")) + .and_then(Value::as_object) + .is_some_and(|props| props.contains_key("handle")); + (id.contains("Handle") || has_handle_prop).then_some(id) + }) + .collect(); + manifest["ops"] + .as_array() + .unwrap() + .iter() + .filter(|op| { + op["scope"] != "future" + && op["resultType"] + .as_str() + .is_some_and(|ty| allocating_result_types.contains(ty)) + }) + .map(|op| op["name"].as_str().unwrap()) + .collect() + } + + async fn assert_allocating_ops_fail_with_handle_exhausted( + owner: Owner, + expected_allocating: &BTreeSet<&str>, + cases: Vec<(&str, HandleId, Value)>, + ) { + let mut tested_allocating = BTreeSet::new(); + for (op_name, target, params) in cases { + let err = dispatch::call(ctx(owner), target, op_name, params) + .await + .expect_err(&format!("{op_name} must fail with HandleExhausted")); + assert!( + matches!(err, OpsError::Protocol(ProtocolError::HandleExhausted)), + "{op_name} returned {err:?} instead of HandleExhausted" + ); + assert_eq!(err.code(), 306, "{op_name}"); + tested_allocating.insert(op_name); + } + assert_eq!(&tested_allocating, expected_allocating); + } + + async fn assert_jsonl_recorder_avoids_disk_side_effects_when_exhausted(owner: Owner) { + let jsonl_parent = + std::env::temp_dir().join(format!("aimux-exhausted-jsonl-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&jsonl_parent); + let jsonl_dir = jsonl_parent.join("must-not-exist"); + let jsonl_err = dispatch::call( + ctx(owner), + HandleId(0), + "recorder.create", + json!({"backend": {"type": "jsonl", "directory": jsonl_dir.to_string_lossy()}, "capturePolicy": "full"}), + ) + .await + .expect_err("jsonl recorder.create must fail with HandleExhausted"); + assert_eq!(jsonl_err.code(), 306); + assert!( + !jsonl_dir.exists(), + "jsonl recorder.create must not create {} when handles are exhausted", + jsonl_dir.display() + ); + let _ = std::fs::remove_dir_all(&jsonl_parent); + } + + async fn assert_negative_and_secondary_handles_fail_under_exhaustion( + owner: Owner, + manifest_ops: &[Value], + abort_id: HandleId, + dropped: HandleId, + foreign: HandleId, + ) { + let future_err = dispatch::call( + ctx(owner), + HandleId(0), + "credential.create", + json!({"kind": "bearer"}), + ) + .await + .unwrap_err(); + assert_eq!(future_err.code(), 8); + + for op in manifest_ops { + let name = op["name"].as_str().unwrap(); + if name == "handle.drop" { + continue; + } + let descriptor = dispatch::descriptor(name).unwrap(); + let expected = descriptor.allowed_handle_kinds; + if expected.is_empty() { + continue; + } + let mut cases = vec![ + (HandleId(u64::MAX), None), + (dropped, None), + (foreign, None), + (HandleId(0), None), + ]; + if !expected.contains(&HandleKind::Abort) { + cases.push((abort_id, Some(HandleKind::Abort))); + } + for (handle, actual) in cases { + let result = if descriptor.mode == OpMode::Stream { + dispatch::stream(ctx(owner), handle, name, json!({})).map(|_| ()) + } else if descriptor.mode == OpMode::BinaryPush { + dispatch::operation_push(&ctx(owner), handle, &[]) + } else { + dispatch::call(ctx(owner), handle, name, json!({})) + .await + .map(|_| ()) + }; + invalid(result, expected, actual, &format!("{name} x exhausted")); + } + } + + let bad_id = HandleId(u64::MAX).0.to_string(); + let bad_secondary_err = dispatch::call( + ctx(owner), + HandleId(0), + "middleware.create", + json!({"kind": "trace", "traceStore": bad_id}), + ) + .await + .unwrap_err(); + assert_eq!(bad_secondary_err.code(), 203); + } + + async fn assert_non_allocating_ops_succeed_under_exhaustion( + owner: Owner, + cases: Vec<(&str, HandleId, Value)>, + ) { + for (op_name, target, params) in cases { + dispatch::call(ctx(owner), target, op_name, params) + .await + .unwrap_or_else(|e| { + panic!("{op_name} should succeed under HandleExhausted: {e:?}") + }); + } + } + + async fn assert_exhaustion_guard_recovers_after_last_drop(owner: Owner) { + let recovered = dispatch::call(ctx(owner), HandleId(0), "abort.create", json!({})) + .await + .expect("allocator recovers after ExhaustionGuard drop"); + let recovered_id = HandleId(recovered["handle"].as_str().unwrap().parse().unwrap()); + assert_ne!(recovered_id.0, 0); + + let guard_outer = test_exhaust_process_handle_allocator(); + let guard_inner = test_exhaust_process_handle_allocator(); + drop(guard_outer); + let still_exhausted = dispatch::call(ctx(owner), HandleId(0), "abort.create", json!({})) + .await + .unwrap_err(); + assert_eq!(still_exhausted.code(), 306); + drop(guard_inner); + let recovered_after_overlap = + dispatch::call(ctx(owner), HandleId(0), "abort.create", json!({})) + .await + .expect("allocator recovers after all overlapping ExhaustionGuards drop"); + assert_ne!( + recovered_after_overlap["handle"] + .as_str() + .unwrap() + .parse::() + .unwrap(), + 0 + ); + } + + let manifest = aimux_ops::manifest::manifest(); + let manifest_ops = manifest["ops"].as_array().unwrap(); + let expected_allocating = manifest_allocating_ops(&manifest); + + let guard = test_exhaust_process_handle_allocator(); + provider_calls.store(0, Ordering::SeqCst); + + let lang_s = lang_id.0.to_string(); + let provider_s = provider_id.0.to_string(); + let trace_s = trace_id.0.to_string(); + let middleware_s = middleware_id.0.to_string(); + + assert_allocating_ops_fail_with_handle_exhausted( + owner, + &expected_allocating, + vec![ + ("abort.create", HandleId(0), json!({})), + ("transport.create", HandleId(0), json!({"kind": "fetch"})), + ( + "middleware.create", + HandleId(0), + json!({"kind": "trace", "traceStore": trace_s}), + ), + ( + "provider.create", + HandleId(0), + json!({"package": "openai", "settings": {"apiKey": "k"}}), + ), + ( + "provider.default", + HandleId(0), + json!({"package": "openai"}), + ), + ( + "provider.custom", + HandleId(0), + json!({"languageModels": {"m": lang_s}}), + ), + ( + "provider.model", + provider_id, + json!({"method": "languageModel", "modelId": "gpt-4o"}), + ), + ("provider.wrap", provider_id, json!({})), + ("provider.files", provider_id, json!({})), + ( + "registry.create", + HandleId(0), + json!({"entries": [{"key": "k", "provider": provider_s}]}), + ), + ( + "registry.fromConfig", + HandleId(0), + json!({"config": {"providers": {}}}), + ), + ("registry.provider", registry_id, json!({"key": "k"})), + ("registry.update", registry_id, json!({"derive": true})), + ( + "model.resolve", + registry_id, + json!({ + "modelRef": { + "namespace": "", + "key": "k", + "method": "languageModel", + "modelId": "gpt-4o" + } + }), + ), + ("model.wrap", lang_id, json!({"middleware": [middleware_s]})), + ( + "composite.router", + HandleId(0), + json!({"children": [lang_s], "strategy": {"type": "rule"}}), + ), + ( + "composite.moa", + HandleId(0), + json!({"references": [lang_s], "aggregator": lang_s}), + ), + ("transcription.start", transcription_id, json!({})), + ("trace.create", HandleId(0), json!({})), + ( + "recorder.create", + HandleId(0), + json!({"backend": {"type": "ring"}, "capturePolicy": "full"}), + ), + ("sessionStore.create", HandleId(0), json!({"infer": false})), + ( + "replay.create", + HandleId(0), + json!({"recordingsJsonl": recording_jsonl}), + ), + ], + ) + .await; + + assert_jsonl_recorder_avoids_disk_side_effects_when_exhausted(owner).await; + assert_negative_and_secondary_handles_fail_under_exhaustion( + owner, + manifest_ops, + abort_id, + dropped, + foreign, + ) + .await; + assert_non_allocating_ops_succeed_under_exhaustion( + owner, + vec![ + ("abort.signal", abort_id, json!({})), + ("model.info", lang_id, json!({})), + ("registry.update", registry_id, json!({"derive": false})), + ("trace.aggregate", trace_id, json!({})), + ("trace.export", trace_id, json!({})), + ("trace.clear", trace_id, json!({})), + ("sessionStore.list", session_id, json!({})), + ("recorder.stats", recorder_id, json!({})), + ("recorder.export", recorder_id, json!({})), + ("replay.inspect", replay_id, json!({})), + ("replay.dryRun", replay_id, json!({})), + ], + ) + .await; + + assert_eq!(provider_calls.load(Ordering::SeqCst), 0); + let _ = files_id; + drop(guard); + + assert_exhaustion_guard_recovers_after_last_drop(owner).await; + + registry.release_owner(owner); + registry.release_owner(other); +} diff --git a/aimux-ops/tests/trace.rs b/aimux-ops/tests/trace.rs index a2f94c259..d17a9eee0 100644 --- a/aimux-ops/tests/trace.rs +++ b/aimux-ops/tests/trace.rs @@ -196,6 +196,9 @@ async fn invalid_controls_fail_before_mutation() { trace.store.record(record("a", "s", "p", 1)); for (op, params) in [ ("trace.create", json!({"capacity":0})), + ("trace.create", json!({"capacity":1_048_577})), + ("trace.create", json!({"capacity":u32::MAX})), + ("trace.create", json!({"capacity":u64::MAX})), ("trace.create", json!({"perScopeCapacity":0})), ("trace.create", json!({"capacity":-1})), ("trace.create", json!({"capacity":1.5})), diff --git a/bindings/flutter/README.md b/bindings/flutter/README.md index 20c03111d..6866f2e36 100644 --- a/bindings/flutter/README.md +++ b/bindings/flutter/README.md @@ -5,7 +5,9 @@ > [Upgrading to 0.6](../../docs/upgrading-to-0.6.md). The binding uses the versioned C ops ABI. `Aimux.open()` checks the ABI -major, ops major, manifest structure and any required operations before use. +major, exact ops version, manifest compatibility (`MANIFEST_DIGEST` fast-path or +full `TYPE_SCHEMA_HASHES` `schemaHash` fallback), and any required operations +before use. The previous unversioned constructors and per-feature native exports are removed. ```dart diff --git a/bindings/flutter/lib/generated/ops.dart b/bindings/flutter/lib/generated/ops.dart index 344e73866..2fde0c5dd 100644 --- a/bindings/flutter/lib/generated/ops.dart +++ b/bindings/flutter/lib/generated/ops.dart @@ -1,7 +1,7 @@ -// Generated by aimux-codegen. Do not edit. Manifest SHA-256: 9c7f306459ec0009f6bca66c0abbb36fc3740b5fc6330c47a6fd73a6bc16caae +// Generated by aimux-codegen. Do not edit. Manifest SHA-256: cd147fa9595ede3951744fa261da98cc18c204e65b4081073ad3a3c1b68bfd92 const int ABI_VERSION = 65536; const String OPS_VERSION = "1.0"; -const String MANIFEST_DIGEST = "9c7f306459ec0009f6bca66c0abbb36fc3740b5fc6330c47a6fd73a6bc16caae"; +const String MANIFEST_DIGEST = "cd147fa9595ede3951744fa261da98cc18c204e65b4081073ad3a3c1b68bfd92"; const String OP_ABORT_CREATE = "abort.create"; const String OP_ABORT_SIGNAL = "abort.signal"; const String OP_AUTH_CODEX_REFRESH = "auth.codexRefresh"; @@ -78,3 +78,107 @@ const String OP_TRANSCRIPTION_GENERATE = "transcription.generate"; const String OP_TRANSCRIPTION_START = "transcription.start"; const String OP_TRANSPORT_CREATE = "transport.create"; const String OP_VIDEO_GENERATE = "video.generate"; +const Map TYPE_SCHEMA_HASHES = { + "AnyValue": "1277ba3a7f8d8ac87c32098666e636d643b6b12d05eb3929a9f018bcc4aa124d", + "[aimux_core::model_catalogue::RuntimeModel]": "aa1da3dbae5d9c830298d255a2cd3bf3b539865ec0324018abcbe555f964f086", + "[aimux_core::session::SessionCall]": "21e259cac0528023d45be7860ea838fcc6a785c0b26ebfe84f7e40b9b861458e", + "[aimux_core::session::SessionView]": "61ad43e852b0e490ab586cd27d25eeb97b00bbfce8808dde6b6252a4aeb367af", + "[aimux_core::trace::store::SessionStepStat]": "ad678575594f65b07dfcb9305b3360fa248d2a05acd3f1059a8cae039ad452cb", + "[aimux_core::trace::store::TraceStats]": "03eb93cd7b38050c6e3be7e47f3c7ac13e617b26f03f03011d58d9d8dfd273aa", + "[aimux_provider_utils::package_descriptor::PackageDescriptor]": "3a98399f69d62320aa747123ec3ede231cd955ced29e36dc401ccc9a82fedc8a", + "[uint8]": "7c82b8345d5b5e8e5c561ac91d6d94e05d221e5c52f729fdde3a6e3e3b6af77d", + "aimux_core::decision_model::DecideResult": "3d50c7ec8e3cce59ea94e9555c93965d03d50d5581e5c3cf214dfe1fdaac0053", + "aimux_core::embedding_model::EmbeddingCallOptions": "1f6db6e963bb7d969a1cb8da125ba836fe8711635d34902b674033e0aefa934d", + "aimux_core::embedding_model::EmbeddingResult": "af3ce0787db6208be114613c78dc02f038cb5dc2f7abcf6a4ade2be79085342e", + "aimux_core::files_model::UploadFileResult": "0d17fd3dbfa601e45c9fabf62f9bb1e5028591443eafccd4eecacef0dcda0368", + "aimux_core::generate::GenerateObjectResult": "21cca82de06d366b0f47d781bd49141bb63215accdd1133bb360113a60b7cc00", + "aimux_core::generate::GenerateTextResult": "c5c6016de2c926c85144959d9436c9d2214a27a9724e75d68393e933ef7263f5", + "aimux_core::image_model::ImageCallOptions": "ddacb8970cef4590bcdcc572ced361b181d501d3b474a2d6c50a9c0c02af3eb2", + "aimux_core::image_model::ImageResult": "a9d2d939f3dc153a5b5ebc8083bea1226ff63ff2e54e4e275c9ab2b136b9e880", + "aimux_core::openai_output::ChatCompletion": "503195cbe7fe458d9403a9de20b93bd17c20bbee0de40a8088bf3847ee835ad9", + "aimux_core::openai_output::ChatCompletionChunk": "b15bd0f02f12fa4e220a1b8e5d82ca24c7486557a04c550d30b90a297b372311", + "aimux_core::recording::Recording": "56fa358fb2023da68837722ed573e00fc997506403d7c7aa516c586c45b4fd54", + "aimux_core::reranking_model::RerankingCallOptions": "c481b6e7c4d5e71ea7db00166ab2952c8a893443f786a61374c7398b4e475e4c", + "aimux_core::reranking_model::RerankingResult": "d757826963b3ce836e4d76fca8f42455a3a3146c20f3fb74f58cabe465348d01", + "aimux_core::search_model::SearchCallOptions": "3b963a871e6f1858db03b68adc74c5f898d4a2c3c0506e4e359b8d8198d30b22", + "aimux_core::search_model::SearchResult": "61075439fcb4276085a11113195dd13220b710cc0c2199ceefa4ec3d07d0195f", + "aimux_core::speech_model::SpeechCallOptions": "418be167c89bca652fb0a9dd52a1da359c1ecc2b069b9d2a0859ab76a7f7f431", + "aimux_core::speech_model::SpeechResult": "8d32e22e24d7ee19a7c2f6cedaf909b6952aa76d635aa4e568e333ed5b45ce07", + "aimux_core::stream_part::TextStreamPart": "c3e035afcbb44740877b943b8ce19e5ac855fd3eaa9ee3d17a936cf7521d7ffc", + "aimux_core::tool::ToolCall": "ea7bd676d207cc40ac1d64442d114b041b7ac60db5420e1f200cc6a8af88d48c", + "aimux_core::trace::record::TraceRecord": "29acdf296b3cd896422357ec1c829fddef38a0455afd825cb7a49f0cb9a8b74d", + "aimux_core::trace::store::SessionChainView": "f5f242da28123fec7907b886dc1debfb4099cfa415074db3476f09712a6c34ca", + "aimux_core::transcription_model::TranscriptionCallOptions": "2a5cf741b2362497e51d0f33b275e01a9dcd336c08623c8617062b83f958aa10", + "aimux_core::transcription_model::TranscriptionResult": "80f153139ed0a65101df69711f15972bfee3154d5452ee8db11585376f31b5fc", + "aimux_core::video_model::VideoCallOptions": "d474a1301928fac38b4d5f06950a91285fc039a7910b51cda8b6ec84cbde9252", + "aimux_core::video_model::VideoResult": "b6fbefd485c75a364d0230349c85d9e222efad481dfde42d35332cbe14d2e09d", + "aimux_ops::envelope::ErrorEnvelope": "48e1305879bb316b0ab5a77b866d6a2dd5c9c2af7f4d9c39f31656d5e7150ce6", + "aimux_ops::frame::StreamFrame": "ce40166decce7b747c1ce7d8f887c5b820577e682df4568e06653de6d3e0c40c", + "aimux_ops::handle::HandleId": "1847d76248c899504e814a58f8771ef59f77fb8b1cca2090193a272bdbd0d6b8", + "aimux_ops::operation::CancelResult": "f166988845b50fd6ae7913505cff98100de52447ba7e297e79f7c6c9b569d02f", + "aimux_ops::operation::OperationStatus": "abeda07e7224a93d1dce678575101d846d68c0c6b24482fb0408b19cb0f52e6b", + "aimux_ops::ops::composite::MoaParams": "2510e5a1226e6f5742ba6f8331a6a1dc6ee48144c88143db25d1d213a842e4c3", + "aimux_ops::ops::composite::RouterParams": "a7db760e7a4e1b6624433d6609408a9136d869bf415c4f5a462011ac3164c3cb", + "aimux_ops::ops::decision::DecisionDecideRequest": "e2a9893b9dfa971db96e94eaf7b853f0daebeb152500d9c4851127abfde5802d", + "aimux_ops::ops::files::UploadFileParams": "136396c0be1014277cef6f30633f16d3ecc08d5392f1f53fa5ebbc2af0eba17c", + "aimux_ops::ops::handles::CredentialParams": "2a3ded4003c2d3257653c6ef4613f9defff748954cd9325c6aa98674cb080894", + "aimux_ops::ops::handles::HandleResult": "01fe7a49695da49143a48c0c53ec9b1ff4099dbc108770194430c38fe71f01c2", + "aimux_ops::ops::handles::MiddlewareParams": "f2789f63feb7b414d3f867c2a84dc298a53ace8d84082367e989161b769ec6ce", + "aimux_ops::ops::handles::TransportParams": "86e40584fcc21dab8f0017f8e892b776ac24aaa9afc943ba805828cecc6e1a4c", + "aimux_ops::ops::misc::CatalogueFetchRequest": "2ceed496996ec6cf32d3e3115ab6a4346a1bb201dc8a970eefbd46eb700a310e", + "aimux_ops::ops::misc::CodexRefreshRequest": "59f1075ed68cb79896d4bac1d0ab32d21fb5855012c6336652bea0c4969ac926", + "aimux_ops::ops::misc::OpenAiOutputRequest": "b0c6acc344f0b23b9ea3b693aeadf7aed7eb4fbdfce4b957be83af1154b842b4", + "aimux_ops::ops::misc::ToolRepairApplyRequest": "0f430fdb223759ef7c48c4d7f824e7be74d29295a6b4f7caaf82b5acba25e538", + "aimux_ops::ops::misc::ToolRepairApplyResultRequest": "fa092862004654e065233b2df2abdbec3befe88d9d734d494679968a5b6e954a", + "aimux_ops::ops::misc::ToolRepairContextRequest": "81bae04c56aac3380b75de639d162f819a2dd5717147a53cf1a75281727d78a1", + "aimux_ops::ops::misc::ToolRepairContextResult": "fd8173e6ec40724fa4207e3571e290ac12e4db1fed08a709273e2982a82b504f", + "aimux_ops::ops::operation::EmptyParams": "1612408252a424283a43a92193bb8ea24f72c08b9f0d2117b4ef7f5a090e37f8", + "aimux_ops::ops::operation::OperationNextParams": "127fea618826e51576ae488dcccaca03c04b774a847a33ec9c47565396862bb7", + "aimux_ops::ops::operation::OperationPollResult": "ec9af646d9b26de004871b4427201b8185677bbbeaf48a1dd489e72e1b126ea1", + "aimux_ops::ops::operation::TranscriptionStartParams": "c863c6f84c5715193078c914c25a5c575c625d77cf3b64ad4029253268d56226", + "aimux_ops::ops::provider::HandleResult": "cea9958b3ff5c8896bab683db36a396bef563c35ec0121b77d51e9475d5d8df5", + "aimux_ops::ops::provider::ProviderCreateParams": "e65cb5322863a2d16af50745cca82873cd03fa2578320c1796570b37efd2c1bb", + "aimux_ops::ops::provider::ProviderCustomParams": "bc40024b5e1794bc8e2bd52bfa9b661b90ad9aa8ba94639ba9120b46bbbf0f90", + "aimux_ops::ops::provider::ProviderDefaultParams": "bb2aff39ad05a28afcc9f4fd8e7e7b30cf3c7ac7b5bd483e002f78f6db737299", + "aimux_ops::ops::provider::ProviderDescriptorsParams": "fa195301dd402853e4cca7cf0ba2843c550c96ef0dc179ec50516394a9435dc0", + "aimux_ops::ops::provider::ProviderInvokeParams": "b33bb79b85db5289152f563021ba9c4285538122d70fe16333b64c94a011fc78", + "aimux_ops::ops::provider::ProviderModelParams": "a9db30c0dc6c71594875748792ddce9f46707696842e45beaceaf474856fbcad", + "aimux_ops::ops::provider::ProviderWrapParams": "a7f59ed924a355d14ad795b37993983fc5c2f2125f9c813ce4b561a0fca7fd62", + "aimux_ops::ops::recording::CreateRecorderParams": "a951e5dde168e1621d21834415cac68c793244158e1fb0f5171dfda8b0bf71c5", + "aimux_ops::ops::recording::EmptyParams": "58802ed68aeb4b87ba67d24b728037be53e63706a4f29055005f14ad068c8777", + "aimux_ops::ops::recording::RecorderExport": "6d3226d3859134361f1dec0429a87c28342d7c5548ea175d535b92d4a49ee8e5", + "aimux_ops::ops::recording::RecorderHandleResult": "f16095d906b62f7fbf86800f6e39e3e89bd6ef1bc65776569795b3555e9025cc", + "aimux_ops::ops::recording::RecorderStats": "5f842b6b1bd0816d07e6f179890f79dddae8815c180824405a9e5ad9dd7871a0", + "aimux_ops::ops::registry::HandleResult": "5f78b2970033052ccdef6827004094c65e9ee35ddc6f80d6c8a619c4db63b05a", + "aimux_ops::ops::registry::ModelInfo": "291dc73d80dbe44be78b15e9deaa60ba253f0c47fc5cfdbffef3bd5cf4b94f36", + "aimux_ops::ops::registry::ModelInfoParams": "c357f2b2342be3bf5f680e816188a4d7b3758a399975eb77a599a82f633d8974", + "aimux_ops::ops::registry::ModelResolveParams": "cfcd1fab460d33db7141f397064edf1481f0024248a7a6f256f8cbfbd3c6eaee", + "aimux_ops::ops::registry::ModelWrapParams": "c5f9703fca04c72df6f3c1c76dea3a130c3e84e37dbc3f18ef58fcf9745f4781", + "aimux_ops::ops::registry::RegistryCreateParams": "6df3075b2b59076de76283d00d4853a4c0da0345c7396cee4a4ad69240290573", + "aimux_ops::ops::registry::RegistryFromConfigParams": "26872ba0751baac107c59a0aa962fa102cc778c661b7bd7b8bd1ccd4226b97ae", + "aimux_ops::ops::registry::RegistryListParams": "c1c477df7aefa646daf05cd316526138109cadd655dd219200531d72eff3260c", + "aimux_ops::ops::registry::RegistryListResult": "26049e7c68ea45b9e322f693c49755e0db476d91631f2a1aa864659b9b87a773", + "aimux_ops::ops::registry::RegistryProviderParams": "d6379c789feb67435e795d0213dfd2fd74d9276465a8f13622327864cb025fb4", + "aimux_ops::ops::registry::RegistryUpdateParams": "9cde136591d14543027538bfa38331059c9865efa2cb89cbf6b2866bdcd21e9e", + "aimux_ops::ops::registry::RegistryUpdateResult": "3e2738ff293183afb575f47bd75daa8afd330f09e43cb4a39de975d97ba16c5b", + "aimux_ops::ops::replay::ReplayCreateParams": "ee64b5b5843103f76ca2166aed2f58995e472be93cb7bb18dea8238c8a2d9e44", + "aimux_ops::ops::replay::ReplayInspection": "7ac2af62f3421f8c7c50867a838f0aff90f35b6a4f192f6c0d5347ab4699108c", + "aimux_ops::ops::replay::ReplayLiveParams": "e99c7d51fb194def185f5a03d84bfc226eb1b101eade0b885216332605318a4d", + "aimux_ops::ops::replay::ReplayLiveResult": "bd9959dd7e0300cb57e6929b2ed29b7e07dcb5aaf65be16b96e34bf8d6577a7f", + "aimux_ops::ops::replay::ReplayPlan": "5cc6667b9fac6de173bf5b55c1a76a491255f89f0fa7a27c0fd33fd790259799", + "aimux_ops::ops::replay::ReplaySessionHandle": "5e779b71ce2a54e59948c605cdfc48797d0760027ad5f44966df958fe9781d11", + "aimux_ops::ops::runtime::RuntimeConfigureParams": "e3b24b9f1fbdf2be7da210f15060803cf8bfdef77c8b2ad330a5b501263dfb0f", + "aimux_ops::ops::runtime::RuntimeDescribeParams": "c3db9b36a42e2bfda8823a35aadc8f6b183dcb46fd7256aeb66505289874b96d", + "aimux_ops::ops::session::SessionStoreCallsParams": "ddd482204fdd305bbfd28d43ae829d8c286f3f8906302ca6679743ea680fedda", + "aimux_ops::ops::session::SessionStoreCreateParams": "080d865c349ec86553f72b99ab1c65ddbb72d0c348a96dc17135a934d787cd86", + "aimux_ops::ops::session::SessionStoreHandle": "755d437d47d362474942fc4a09f5f8c80b75cf362ac16b25b262e33a760b4c6a", + "aimux_ops::ops::text::OpenAiTextRequest": "59293b18b6124a9a394113b8f94f637c65dc35ac44a30f7e0df70855e885f8e4", + "aimux_ops::ops::text::TextRequest": "3a6f59c1f0c3b7ded5f5509d93afe9bddd2b80a8a3cd752d79f97edadae40c3d", + "aimux_ops::ops::trace::TraceAggregateParams": "1b207f0bbe1b7ce7e9b8b0beb9334cf3cc4f9f05382911aaacfe0425dc8ff2c8", + "aimux_ops::ops::trace::TraceCreateParams": "59fef52f382800570e861ae9ca92433dcae8807679d914a89ce99705713301d9", + "aimux_ops::ops::trace::TraceSessionParams": "3e2300f6c65f6dcd52a016eba648a29abeff3a9d67c3b04a95617aa66832f810", + "aimux_providers::catalogue::Catalogue": "6e0128414c8cce09930fea4c68daf7739f9c79072f240bcb9d786eabeaf53b41", + "aimux_providers::codex::CodexTokens": "0925e12b12a645e10306277a7d46fad9d646ce829acef378d223d53800256321", + "null": "0b04deb4d538ba0de2ab6920bc3b185241775a867937e5875a50ff54be3b9d56", + "string": "0d6cbdd2f60c1f2f337739faaafd28ef3e743416ad7a52645a808613733dcab5", +}; diff --git a/bindings/flutter/lib/src/generated/types.dart b/bindings/flutter/lib/src/generated/types.dart index cb0784912..ec8c0aec4 100644 --- a/bindings/flutter/lib/src/generated/types.dart +++ b/bindings/flutter/lib/src/generated/types.dart @@ -2433,6 +2433,12 @@ final class BackendConfigRing extends BackendConfig { @override String get type => 'ring'; factory BackendConfigRing.fromJson(Map json) { + const allowedKeys = {'capacity', 'type'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for BackendConfigRing'); + } + } return BackendConfigRing( capacity: json['capacity'] as int?, ); @@ -2452,6 +2458,12 @@ final class BackendConfigJsonl extends BackendConfig { @override String get type => 'jsonl'; factory BackendConfigJsonl.fromJson(Map json) { + const allowedKeys = {'directory', 'type'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for BackendConfigJsonl'); + } + } return BackendConfigJsonl( directory: json['directory'] as String, ); @@ -2547,6 +2559,12 @@ final class CatalogueFetchRequest { this.sourceUrl, }); factory CatalogueFetchRequest.fromJson(Map json) { + const allowedKeys = {'abort', 'sourceUrl'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for CatalogueFetchRequest'); + } + } return CatalogueFetchRequest( abort: json['abort'] == null ? null : HandleIdInput.fromJson(json['abort']), @@ -2960,6 +2978,12 @@ final class CodexModeSpecApiKey extends CodexModeSpec { @override String get type => 'apiKey'; factory CodexModeSpecApiKey.fromJson(Map json) { + const allowedKeys = {'apiKey', 'type'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for CodexModeSpecApiKey'); + } + } return CodexModeSpecApiKey( apiKey: json['apiKey'] == null ? null : StringOrEnv.fromJson(json['apiKey']), @@ -2982,6 +3006,12 @@ final class CodexModeSpecChatGptAccount extends CodexModeSpec { @override String get type => 'chatGptAccount'; factory CodexModeSpecChatGptAccount.fromJson(Map json) { + const allowedKeys = {'accountId', 'token', 'type'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for CodexModeSpecChatGptAccount'); + } + } return CodexModeSpecChatGptAccount( accountId: json['accountId'] as String?, token: StringOrEnv.fromJson(json['token']), @@ -3003,6 +3033,12 @@ final class CodexRefreshRequest { required this.refreshToken, }); factory CodexRefreshRequest.fromJson(Map json) { + const allowedKeys = {'clientId', 'refreshToken'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for CodexRefreshRequest'); + } + } return CodexRefreshRequest( clientId: json['clientId'] as String, refreshToken: json['refreshToken'] as String, @@ -4097,6 +4133,12 @@ final class CreateRecorderParams { required this.capturePolicy, }); factory CreateRecorderParams.fromJson(Map json) { + const allowedKeys = {'backend', 'capturePolicy'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for CreateRecorderParams'); + } + } return CreateRecorderParams( backend: BackendConfig.fromJson(json['backend'] as Map), capturePolicy: CapturePolicy.fromJson(json['capturePolicy']), @@ -4115,6 +4157,12 @@ final class CredentialParams { required this.kind, }); factory CredentialParams.fromJson(Map json) { + const allowedKeys = {'kind'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for CredentialParams'); + } + } return CredentialParams( kind: json['kind'] as String, ); @@ -4171,6 +4219,12 @@ final class DecideOptions { this.timeout, }); factory DecideOptions.fromJson(Map json) { + const allowedKeys = {'headers', 'maxRetries', 'providerOptions', 'questions', 'state', 'timeout'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for DecideOptions'); + } + } return DecideOptions( headers: json['headers'] == null ? null @@ -4391,6 +4445,12 @@ final class DecisionBooleanCriteria { this.true_ = const Field.absent(), }); factory DecisionBooleanCriteria.fromJson(Map json) { + const allowedKeys = {'false', 'true'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for DecisionBooleanCriteria'); + } + } return DecisionBooleanCriteria( false_: json.containsKey('false') ? Field.of(json['false'] == null @@ -4422,6 +4482,12 @@ final class DecisionDecideRequest { required this.options, }); factory DecisionDecideRequest.fromJson(Map json) { + const allowedKeys = {'abort', 'options'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for DecisionDecideRequest'); + } + } return DecisionDecideRequest( abort: json['abort'] == null ? null : HandleIdInput.fromJson(json['abort']), @@ -4630,6 +4696,12 @@ final class EmbeddingCallOptions { required this.values_, }); factory EmbeddingCallOptions.fromJson(Map json) { + const allowedKeys = {'headers', 'maxRetries', 'providerOptions', 'timeout', 'values'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for EmbeddingCallOptions'); + } + } return EmbeddingCallOptions( headers: json['headers'] == null ? null @@ -4762,6 +4834,12 @@ final class EmbeddingUsage { final class EmptyParams { const EmptyParams(); factory EmptyParams.fromJson(Map json) { + const allowedKeys = {}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for EmptyParams'); + } + } return EmptyParams(); } @@ -4775,6 +4853,12 @@ final class EnvVarRef { required this.env, }); factory EnvVarRef.fromJson(Map json) { + const allowedKeys = {'env'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for EnvVarRef'); + } + } return EnvVarRef( env: json['env'] as String, ); @@ -5827,6 +5911,12 @@ final class GenerateTextOptions { this.topP, }); factory GenerateTextOptions.fromJson(Map json) { + const allowedKeys = {'frequencyPenalty', 'headers', 'includeRawChunks', 'instructions', 'maxOutputTokens', 'maxRetries', 'output', 'presencePenalty', 'providerOptions', 'reasoning', 'seed', 'sessionId', 'stopSequences', 'strictStream', 'temperature', 'timeout', 'toolChoice', 'tools', 'topK', 'topP'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for GenerateTextOptions'); + } + } return GenerateTextOptions( frequencyPenalty: json['frequencyPenalty'] == null ? null @@ -6422,6 +6512,12 @@ final class ImageCallOptions { this.timeout, }); factory ImageCallOptions.fromJson(Map json) { + const allowedKeys = {'aspectRatio', 'files', 'headers', 'mask', 'maxRetries', 'n', 'prompt', 'providerOptions', 'seed', 'size', 'timeout'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for ImageCallOptions'); + } + } return ImageCallOptions( aspectRatio: json['aspectRatio'] == null ? null @@ -6692,6 +6788,12 @@ final class InputAudioFormat { this.rate, }); factory InputAudioFormat.fromJson(Map json) { + const allowedKeys = {'formatType', 'rate'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for InputAudioFormat'); + } + } return InputAudioFormat( formatType: json['formatType'] as String, rate: json['rate'] as int?, @@ -7448,6 +7550,12 @@ final class LiveTargetModel extends LiveTarget { @override String get kind => 'model'; factory LiveTargetModel.fromJson(Map json) { + const allowedKeys = {'handle', 'kind'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for LiveTargetModel'); + } + } return LiveTargetModel( handle: HandleIdInput.fromJson(json['handle']), ); @@ -7467,6 +7575,12 @@ final class LiveTargetRegistry extends LiveTarget { @override String get kind => 'registry'; factory LiveTargetRegistry.fromJson(Map json) { + const allowedKeys = {'handle', 'kind'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for LiveTargetRegistry'); + } + } return LiveTargetRegistry( handle: HandleIdInput.fromJson(json['handle']), ); @@ -7499,6 +7613,12 @@ final class LoggingConfig { required this.level, }); factory LoggingConfig.fromJson(Map json) { + const allowedKeys = {'level'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for LoggingConfig'); + } + } return LoggingConfig( level: LogLevel.fromJson(json['level']), ); @@ -7533,6 +7653,12 @@ final class MiddlewareParams { this.traceStore, }); factory MiddlewareParams.fromJson(Map json) { + const allowedKeys = {'auditMode', 'kind', 'scopeName', 'traceStore'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for MiddlewareParams'); + } + } return MiddlewareParams( auditMode: json['auditMode'] == null ? null @@ -7598,6 +7724,12 @@ final class MoaParams { this.stripReferenceTools, }); factory MoaParams.fromJson(Map json) { + const allowedKeys = {'aggregator', 'aggregatorInstructions', 'failMode', 'modelId', 'providerName', 'references', 'stripReferenceTools'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for MoaParams'); + } + } return MoaParams( aggregator: json['aggregator'] as String, aggregatorInstructions: json['aggregatorInstructions'] as String?, @@ -7767,6 +7899,12 @@ final class ModelInfo { final class ModelInfoParams { const ModelInfoParams(); factory ModelInfoParams.fromJson(Map json) { + const allowedKeys = {}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for ModelInfoParams'); + } + } return ModelInfoParams(); } @@ -8032,6 +8170,12 @@ final class ModelRef { required this.namespace, }); factory ModelRef.fromJson(Map json) { + const allowedKeys = {'key', 'method', 'modelId', 'namespace'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for ModelRef'); + } + } return ModelRef( key: json['key'] as String, method: ModelMethod.fromJson(json['method']), @@ -8054,6 +8198,12 @@ final class ModelResolveParams { required this.modelRef, }); factory ModelResolveParams.fromJson(Map json) { + const allowedKeys = {'modelRef'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for ModelResolveParams'); + } + } return ModelResolveParams( modelRef: ModelRef.fromJson(json['modelRef'] as Map), ); @@ -8155,6 +8305,12 @@ final class ModelWrapParams { required this.middleware, }); factory ModelWrapParams.fromJson(Map json) { + const allowedKeys = {'middleware'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for ModelWrapParams'); + } + } return ModelWrapParams( middleware: (json['middleware'] as List).cast(), ); @@ -8189,6 +8345,12 @@ final class OpenAiOutputRequest { required this.result, }); factory OpenAiOutputRequest.fromJson(Map json) { + const allowedKeys = {'metadataNamespace', 'result'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for OpenAiOutputRequest'); + } + } return OpenAiOutputRequest( metadataNamespace: json['metadataNamespace'] as String, result: GenerateTextResultInput.fromJson( @@ -8214,6 +8376,12 @@ final class OpenAiTextRequest { this.streamOptions, }); factory OpenAiTextRequest.fromJson(Map json) { + const allowedKeys = {'abort', 'options', 'prompt', 'streamOptions'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for OpenAiTextRequest'); + } + } return OpenAiTextRequest( abort: json['abort'] == null ? null : HandleIdInput.fromJson(json['abort']), @@ -8270,6 +8438,12 @@ final class OperationNextParams { this.timeoutMs, }); factory OperationNextParams.fromJson(Map json) { + const allowedKeys = {'timeoutMs'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for OperationNextParams'); + } + } return OperationNextParams( timeoutMs: json['timeoutMs'] as int?, ); @@ -8511,6 +8685,12 @@ final class Options { this.topP, }); factory Options.fromJson(Map json) { + const allowedKeys = {'frequencyPenalty', 'headers', 'includeRawChunks', 'instructions', 'maxOutputTokens', 'maxRetries', 'output', 'presencePenalty', 'providerOptions', 'reasoning', 'seed', 'sessionId', 'stopSequences', 'strictStream', 'temperature', 'timeout', 'toolChoice', 'tools', 'topK', 'topP'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for Options'); + } + } return Options( frequencyPenalty: json['frequencyPenalty'] == null ? null @@ -8932,6 +9112,12 @@ final class PackageDescriptor { required this.templateParams, }); factory PackageDescriptor.fromJson(Map json) { + const allowedKeys = {'apiKeyEnv', 'authKind', 'baseUrlEnv', 'defaultBaseUrl', 'defaultMethod', 'id', 'kind', 'languageApis', 'modalities', 'settings', 'supportsDefaultInstance', 'supportsDiscovery', 'supportsFiles', 'supportsSkills', 'templateParams'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for PackageDescriptor'); + } + } return PackageDescriptor( apiKeyEnv: json['apiKeyEnv'] as String?, authKind: PackageAuthKind.fromJson(json['authKind']), @@ -9056,6 +9242,12 @@ final class ProviderConfigDocument { required this.providers, }); factory ProviderConfigDocument.fromJson(Map json) { + const allowedKeys = {'providers'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for ProviderConfigDocument'); + } + } return ProviderConfigDocument( providers: (json['providers'] as Map).map((key, item) => MapEntry( key as String, @@ -9133,6 +9325,12 @@ final class ProviderConfigSettings { this.workspaceId, }); factory ProviderConfigSettings.fromJson(Map json) { + const allowedKeys = {'accessKeyId', 'accessToken', 'apiKey', 'apiVersion', 'authToken', 'baseUrl', 'codexMode', 'cx', 'endpoint', 'headers', 'includeUsage', 'location', 'login', 'name', 'organization', 'originator', 'params', 'password', 'probabilitySource', 'project', 'queryParams', 'region', 'resourceName', 'secretAccessKey', 'sessionToken', 'speechBaseUrl', 'supportsMultiPartToolContent', 'supportsStructuredOutputs', 'useDeploymentBasedUrls', 'workspaceId'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for ProviderConfigSettings'); + } + } return ProviderConfigSettings( accessKeyId: json['accessKeyId'] == null ? null @@ -9244,6 +9442,12 @@ final class ProviderCreateParams { this.settings, }); factory ProviderCreateParams.fromJson(Map json) { + const allowedKeys = {'envAllowlist', 'package', 'settings'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for ProviderCreateParams'); + } + } return ProviderCreateParams( envAllowlist: json['envAllowlist'] == null ? null @@ -9302,6 +9506,12 @@ final class ProviderCustomParams { this.videoModels, }); factory ProviderCustomParams.fromJson(Map json) { + const allowedKeys = {'chatModels', 'completionModels', 'decisionModels', 'defaultMethod', 'embeddingModels', 'fallbackProvider', 'files', 'imageModelMiddleware', 'imageModels', 'languageModelMiddleware', 'languageModels', 'messagesModels', 'rerankingModels', 'responsesModels', 'searchModels', 'speechModels', 'transcriptionModels', 'videoModels'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for ProviderCustomParams'); + } + } return ProviderCustomParams( chatModels: json['chatModels'] == null ? null @@ -9433,6 +9643,12 @@ final class ProviderDefaultParams { required this.package, }); factory ProviderDefaultParams.fromJson(Map json) { + const allowedKeys = {'package'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for ProviderDefaultParams'); + } + } return ProviderDefaultParams( package: json['package'] as String, ); @@ -9449,6 +9665,12 @@ final class ProviderDescriptorsParams { this.package, }); factory ProviderDescriptorsParams.fromJson(Map json) { + const allowedKeys = {'package'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for ProviderDescriptorsParams'); + } + } return ProviderDescriptorsParams( package: json['package'] as String?, ); @@ -9468,6 +9690,12 @@ final class ProviderEntrySpec { this.settings, }); factory ProviderEntrySpec.fromJson(Map json) { + const allowedKeys = {'package', 'settings'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for ProviderEntrySpec'); + } + } return ProviderEntrySpec( package: json['package'] as String, settings: json['settings'] == null @@ -9491,6 +9719,12 @@ final class ProviderInvokeParams { required this.method, }); factory ProviderInvokeParams.fromJson(Map json) { + const allowedKeys = {'abort', 'method'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for ProviderInvokeParams'); + } + } return ProviderInvokeParams( abort: json['abort'] == null ? null : HandleIdInput.fromJson(json['abort']), @@ -9512,6 +9746,12 @@ final class ProviderModelParams { required this.modelId, }); factory ProviderModelParams.fromJson(Map json) { + const allowedKeys = {'method', 'modelId'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for ProviderModelParams'); + } + } return ProviderModelParams( method: json['method'] as String?, modelId: json['modelId'] as String, @@ -9629,6 +9869,12 @@ final class ProviderSettings { this.workspaceId, }); factory ProviderSettings.fromJson(Map json) { + const allowedKeys = {'accessKeyId', 'accessToken', 'apiKey', 'apiVersion', 'authToken', 'baseUrl', 'codexMode', 'credentialResolver', 'cx', 'endpoint', 'fetch', 'headers', 'includeUsage', 'location', 'login', 'name', 'organization', 'originator', 'params', 'password', 'probabilitySource', 'project', 'queryParams', 'region', 'resourceName', 'secretAccessKey', 'sessionToken', 'speechBaseUrl', 'supportsMultiPartToolContent', 'supportsStructuredOutputs', 'useDeploymentBasedUrls', 'webSocket', 'workspaceId'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for ProviderSettings'); + } + } return ProviderSettings( accessKeyId: json['accessKeyId'] == null ? null @@ -9792,6 +10038,12 @@ final class ProviderWrapParams { this.languageModelMiddleware, }); factory ProviderWrapParams.fromJson(Map json) { + const allowedKeys = {'imageModelMiddleware', 'languageModelMiddleware'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for ProviderWrapParams'); + } + } return ProviderWrapParams( imageModelMiddleware: json['imageModelMiddleware'] == null ? null @@ -10395,6 +10647,12 @@ final class RegistryCreateParams { this.separator, }); factory RegistryCreateParams.fromJson(Map json) { + const allowedKeys = {'entries', 'namespace', 'separator'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for RegistryCreateParams'); + } + } return RegistryCreateParams( entries: (json['entries'] as List) .map((item) => RegistryEntry.fromJson(item as Map)) @@ -10419,6 +10677,12 @@ final class RegistryEntry { required this.provider, }); factory RegistryEntry.fromJson(Map json) { + const allowedKeys = {'key', 'provider'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for RegistryEntry'); + } + } return RegistryEntry( key: json['key'] as String, provider: json['provider'] as String, @@ -10452,6 +10716,12 @@ final class RegistryFromConfigParams { this.separator, }); factory RegistryFromConfigParams.fromJson(Map json) { + const allowedKeys = {'config', 'envAllowlist', 'namespace', 'separator'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for RegistryFromConfigParams'); + } + } return RegistryFromConfigParams( config: ProviderConfigDocument.fromJson( json['config'] as Map), @@ -10474,6 +10744,12 @@ final class RegistryFromConfigParams { final class RegistryListParams { const RegistryListParams(); factory RegistryListParams.fromJson(Map json) { + const allowedKeys = {}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for RegistryListParams'); + } + } return RegistryListParams(); } @@ -10510,6 +10786,12 @@ final class RegistryProviderParams { required this.key, }); factory RegistryProviderParams.fromJson(Map json) { + const allowedKeys = {'key'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for RegistryProviderParams'); + } + } return RegistryProviderParams( key: json['key'] as String, ); @@ -10532,6 +10814,12 @@ final class RegistryUpdateParams { this.set_, }); factory RegistryUpdateParams.fromJson(Map json) { + const allowedKeys = {'derive', 'remove', 'replace', 'set'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for RegistryUpdateParams'); + } + } return RegistryUpdateParams( derive: json['derive'] as bool?, remove: json['remove'] == null @@ -10633,6 +10921,12 @@ final class ReplayCreateParams { required this.recordingsJsonl, }); factory ReplayCreateParams.fromJson(Map json) { + const allowedKeys = {'recordingsJsonl'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for ReplayCreateParams'); + } + } return ReplayCreateParams( recordingsJsonl: json['recordingsJsonl'] as String, ); @@ -10672,6 +10966,12 @@ final class ReplayLiveParams { required this.target, }); factory ReplayLiveParams.fromJson(Map json) { + const allowedKeys = {'abort', 'callId', 'target'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for ReplayLiveParams'); + } + } return ReplayLiveParams( abort: json['abort'] == null ? null : HandleIdInput.fromJson(json['abort']), @@ -10899,6 +11199,12 @@ final class RerankingCallOptions { this.topN, }); factory RerankingCallOptions.fromJson(Map json) { + const allowedKeys = {'documents', 'headers', 'maxRetries', 'providerOptions', 'query', 'timeout', 'topN'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for RerankingCallOptions'); + } + } return RerankingCallOptions( documents: RerankingDocuments.fromJson( json['documents'] as Map), @@ -11277,6 +11583,12 @@ final class RouterParams { required this.strategy, }); factory RouterParams.fromJson(Map json) { + const allowedKeys = {'children', 'fallback', 'modelId', 'providerName', 'strategy'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for RouterParams'); + } + } return RouterParams( children: (json['children'] as List).cast(), fallback: @@ -11304,6 +11616,12 @@ final class RuntimeConfigureParams { this.proxy, }); factory RuntimeConfigureParams.fromJson(Map json) { + const allowedKeys = {'logging', 'proxy'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for RuntimeConfigureParams'); + } + } return RuntimeConfigureParams( logging: json['logging'] == null ? null @@ -11323,6 +11641,12 @@ final class RuntimeConfigureParams { final class RuntimeDescribeParams { const RuntimeDescribeParams(); factory RuntimeDescribeParams.fromJson(Map json) { + const allowedKeys = {}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for RuntimeDescribeParams'); + } + } return RuntimeDescribeParams(); } @@ -11426,6 +11750,12 @@ final class SearchCallOptions { this.timeout, }); factory SearchCallOptions.fromJson(Map json) { + const allowedKeys = {'excludeDomains', 'headers', 'includeDomains', 'includeRawContent', 'maxResults', 'maxRetries', 'providerOptions', 'query', 'timeRange', 'timeout'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for SearchCallOptions'); + } + } return SearchCallOptions( excludeDomains: json['excludeDomains'] == null ? null @@ -11727,6 +12057,12 @@ final class SessionStoreCallsParams { required this.sessionId, }); factory SessionStoreCallsParams.fromJson(Map json) { + const allowedKeys = {'sessionId'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for SessionStoreCallsParams'); + } + } return SessionStoreCallsParams( sessionId: json['sessionId'] as String, ); @@ -11743,6 +12079,12 @@ final class SessionStoreCreateParams { required this.infer, }); factory SessionStoreCreateParams.fromJson(Map json) { + const allowedKeys = {'infer'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for SessionStoreCreateParams'); + } + } return SessionStoreCreateParams( infer: json['infer'] as bool, ); @@ -11830,6 +12172,12 @@ final class SettingFieldSpec { required this.required_, }); factory SettingFieldSpec.fromJson(Map json) { + const allowedKeys = {'credential', 'envVar', 'kind', 'name', 'required'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for SettingFieldSpec'); + } + } return SettingFieldSpec( credential: json['credential'] as bool, envVar: json['envVar'] as String?, @@ -12034,6 +12382,12 @@ final class SpeechCallOptions { this.voice, }); factory SpeechCallOptions.fromJson(Map json) { + const allowedKeys = {'headers', 'instructions', 'language', 'maxRetries', 'outputFormat', 'providerOptions', 'speed', 'text', 'timeout', 'voice'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for SpeechCallOptions'); + } + } return SpeechCallOptions( headers: json['headers'] == null ? null @@ -12751,6 +13105,12 @@ final class StrategyRule extends Strategy { @override String get type => 'rule'; factory StrategyRule.fromJson(Map json) { + const allowedKeys = {'type'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for StrategyRule'); + } + } return StrategyRule(); } @@ -12767,6 +13127,12 @@ final class StrategyWeighted extends Strategy { @override String get type => 'weighted'; factory StrategyWeighted.fromJson(Map json) { + const allowedKeys = {'weights', 'type'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for StrategyWeighted'); + } + } return StrategyWeighted( weights: (json['weights'] as List) .map((item) => (item as num).toDouble()) @@ -12841,6 +13207,12 @@ final class StreamFrameEvent extends StreamFrame { @override String get type => 'event'; factory StreamFrameEvent.fromJson(Map json) { + const allowedKeys = {'event', 'seq', 'type'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for StreamFrameEvent'); + } + } return StreamFrameEvent( event: StreamEvent.fromJson(json['event']), seq: _u64String(json['seq'] as String), @@ -12866,6 +13238,12 @@ final class StreamFrameEnd extends StreamFrame { @override String get type => 'end'; factory StreamFrameEnd.fromJson(Map json) { + const allowedKeys = {'error', 'outcome', 'seq', 'type'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for StreamFrameEnd'); + } + } return StreamFrameEnd( error: json['error'] == null ? null @@ -12891,6 +13269,12 @@ final class StreamOptions { this.includeUsage, }); factory StreamOptions.fromJson(Map json) { + const allowedKeys = {'includeReasoning', 'includeUsage'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for StreamOptions'); + } + } return StreamOptions( includeReasoning: json['includeReasoning'] as bool?, includeUsage: json['includeUsage'] as bool?, @@ -13051,6 +13435,12 @@ final class TemplateParamDescriptor { required this.name, }); factory TemplateParamDescriptor.fromJson(Map json) { + const allowedKeys = {'envVar', 'name'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for TemplateParamDescriptor'); + } + } return TemplateParamDescriptor( envVar: json['envVar'] as String, name: json['name'] as String, @@ -13119,6 +13509,12 @@ final class TextRequest { required this.prompt, }); factory TextRequest.fromJson(Map json) { + const allowedKeys = {'abort', 'options', 'prompt'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for TextRequest'); + } + } return TextRequest( abort: json['abort'] == null ? null : HandleIdInput.fromJson(json['abort']), @@ -14145,6 +14541,12 @@ final class TimeoutConfiguration { this.totalMs, }); factory TimeoutConfiguration.fromJson(Map json) { + const allowedKeys = {'chunkMs', 'firstChunkMs', 'stepMs', 'totalMs'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for TimeoutConfiguration'); + } + } return TimeoutConfiguration( chunkMs: json['chunkMs'] as int?, firstChunkMs: json['firstChunkMs'] as int?, @@ -14714,6 +15116,12 @@ final class ToolCallRepairReplyRepaired extends ToolCallRepairReply { @override String get type => 'repaired'; factory ToolCallRepairReplyRepaired.fromJson(Map json) { + const allowedKeys = {'toolCall', 'type'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for ToolCallRepairReplyRepaired'); + } + } return ToolCallRepairReplyRepaired( toolCall: RepairedToolCall.fromJson(json['toolCall'] as Map), @@ -14731,6 +15139,12 @@ final class ToolCallRepairReplyUnchanged extends ToolCallRepairReply { @override String get type => 'unchanged'; factory ToolCallRepairReplyUnchanged.fromJson(Map json) { + const allowedKeys = {'type'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for ToolCallRepairReplyUnchanged'); + } + } return ToolCallRepairReplyUnchanged(); } @@ -14747,6 +15161,12 @@ final class ToolCallRepairReplyFailed extends ToolCallRepairReply { @override String get type => 'failed'; factory ToolCallRepairReplyFailed.fromJson(Map json) { + const allowedKeys = {'message', 'type'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for ToolCallRepairReplyFailed'); + } + } return ToolCallRepairReplyFailed( message: json['message'] as String, ); @@ -15100,6 +15520,12 @@ final class ToolRepairApplyRequest { required this.toolCall, }); factory ToolRepairApplyRequest.fromJson(Map json) { + const allowedKeys = {'options', 'reply', 'toolCall'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for ToolRepairApplyRequest'); + } + } return ToolRepairApplyRequest( options: json['options'] == null ? null @@ -15131,6 +15557,12 @@ final class ToolRepairApplyResultRequest { required this.toolCallId, }); factory ToolRepairApplyResultRequest.fromJson(Map json) { + const allowedKeys = {'options', 'reply', 'result', 'toolCallId'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for ToolRepairApplyResultRequest'); + } + } return ToolRepairApplyResultRequest( options: json['options'] == null ? null @@ -15162,6 +15594,12 @@ final class ToolRepairContextRequest { required this.toolCall, }); factory ToolRepairContextRequest.fromJson(Map json) { + const allowedKeys = {'options', 'prompt', 'toolCall'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for ToolRepairContextRequest'); + } + } return ToolRepairContextRequest( options: json['options'] == null ? null @@ -16010,6 +16448,12 @@ final class TraceAggregateFilter { this.sinceUnixMs, }); factory TraceAggregateFilter.fromJson(Map json) { + const allowedKeys = {'model', 'provider', 'sessionId', 'sinceUnixMs'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for TraceAggregateFilter'); + } + } return TraceAggregateFilter( model: json['model'] as String?, provider: json['provider'] as String?, @@ -16032,6 +16476,12 @@ final class TraceAggregateParams { this.filter, }); factory TraceAggregateParams.fromJson(Map json) { + const allowedKeys = {'filter'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for TraceAggregateParams'); + } + } return TraceAggregateParams( filter: json['filter'] == null ? null @@ -16067,6 +16517,12 @@ final class TraceCreateParams { this.perScopeCapacity, }); factory TraceCreateParams.fromJson(Map json) { + const allowedKeys = {'auditMode', 'capacity', 'perScopeCapacity'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for TraceCreateParams'); + } + } return TraceCreateParams( auditMode: json['auditMode'] == null ? null @@ -16188,6 +16644,12 @@ final class TraceSessionParams { required this.sessionId, }); factory TraceSessionParams.fromJson(Map json) { + const allowedKeys = {'sessionId'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for TraceSessionParams'); + } + } return TraceSessionParams( sessionId: json['sessionId'] as String, ); @@ -16299,6 +16761,12 @@ final class TranscriptionCallOptions { this.timeout, }); factory TranscriptionCallOptions.fromJson(Map json) { + const allowedKeys = {'audio', 'headers', 'maxRetries', 'mediaType', 'providerOptions', 'timeout'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for TranscriptionCallOptions'); + } + } return TranscriptionCallOptions( audio: AudioInput.fromJson(json['audio']), headers: json['headers'] == null @@ -16509,6 +16977,12 @@ final class TranscriptionStartParams { this.timeout, }); factory TranscriptionStartParams.fromJson(Map json) { + const allowedKeys = {'abort', 'headers', 'includeRawChunks', 'inputAudioFormat', 'providerOptions', 'timeout'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for TranscriptionStartParams'); + } + } return TranscriptionStartParams( abort: json['abort'] == null ? null : HandleIdInput.fromJson(json['abort']), @@ -16872,6 +17346,12 @@ final class TransportParamsFetch extends TransportParams { @override String get kind => 'fetch'; factory TransportParamsFetch.fromJson(Map json) { + const allowedKeys = {'proxy', 'kind'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for TransportParamsFetch'); + } + } return TransportParamsFetch( proxy: json['proxy'] == null ? null @@ -16893,6 +17373,12 @@ final class TransportParamsWs extends TransportParams { @override String get kind => 'ws'; factory TransportParamsWs.fromJson(Map json) { + const allowedKeys = {'proxy', 'kind'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for TransportParamsWs'); + } + } return TransportParamsWs( proxy: json['proxy'] == null ? null @@ -16914,6 +17400,12 @@ final class TransportParamsDownload extends TransportParams { @override String get kind => 'download'; factory TransportParamsDownload.fromJson(Map json) { + const allowedKeys = {'maxBytes', 'kind'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for TransportParamsDownload'); + } + } return TransportParamsDownload( maxBytes: json['maxBytes'] as int?, ); @@ -16941,6 +17433,12 @@ final class TransportProxy { this.noProxy, }); factory TransportProxy.fromJson(Map json) { + const allowedKeys = {'all_url', 'http_url', 'https_url', 'no_proxy'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for TransportProxy'); + } + } return TransportProxy( allUrl: json['all_url'] as String?, httpUrl: json['http_url'] as String?, @@ -17356,6 +17854,12 @@ final class UploadFileDataData extends UploadFileData { @override String get type => 'data'; factory UploadFileDataData.fromJson(Map json) { + const allowedKeys = {'data', 'type'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for UploadFileDataData'); + } + } return UploadFileDataData( data: FileBytes.fromJson(json['data']), ); @@ -17375,6 +17879,12 @@ final class UploadFileDataText extends UploadFileData { @override String get type => 'text'; factory UploadFileDataText.fromJson(Map json) { + const allowedKeys = {'text', 'type'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for UploadFileDataText'); + } + } return UploadFileDataText( text: json['text'] as String, ); @@ -17409,6 +17919,12 @@ final class UploadFileParams { this.providerOptions, }); factory UploadFileParams.fromJson(Map json) { + const allowedKeys = {'abort', 'data', 'filename', 'mediaType', 'providerOptions'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for UploadFileParams'); + } + } return UploadFileParams( abort: json['abort'] == null ? null : HandleIdInput.fromJson(json['abort']), @@ -17903,6 +18419,12 @@ final class VideoCallOptions { this.timeout, }); factory VideoCallOptions.fromJson(Map json) { + const allowedKeys = {'aspectRatio', 'duration', 'fps', 'frameImages', 'generateAudio', 'headers', 'image', 'inputReferences', 'maxRetries', 'n', 'poll', 'prompt', 'providerOptions', 'resolution', 'seed', 'timeout'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for VideoCallOptions'); + } + } return VideoCallOptions( aspectRatio: json['aspectRatio'] == null ? null @@ -18203,6 +18725,12 @@ final class VideoPollOptions { this.timeoutMs, }); factory VideoPollOptions.fromJson(Map json) { + const allowedKeys = {'intervalMs', 'timeoutMs'}; + for (final key in json.keys) { + if (!allowedKeys.contains(key)) { + throw FormatException('Unknown field $key for VideoPollOptions'); + } + } return VideoPollOptions( intervalMs: json['intervalMs'] as int?, timeoutMs: json['timeoutMs'] as int?, diff --git a/bindings/flutter/lib/src/native.dart b/bindings/flutter/lib/src/native.dart index f18adcd4c..97647ef7d 100644 --- a/bindings/flutter/lib/src/native.dart +++ b/bindings/flutter/lib/src/native.dart @@ -227,19 +227,48 @@ Object? _execute(NativeRequest r) { } } +List? _findMismatchedTypes(Object? types) { + if (ops.TYPE_SCHEMA_HASHES.isEmpty || types is! List || types.isEmpty) { + return null; + } + final actual = {}; + for (final entry in types) { + if (entry is Map) { + final id = entry['id']; + final schemaHash = entry['schemaHash']; + if (id is String && schemaHash is String) { + actual[id] = schemaHash; + } + } + } + final mismatches = []; + for (final expected in ops.TYPE_SCHEMA_HASHES.entries) { + if (actual[expected.key] != expected.value) { + mismatches.add(expected.key); + } + } + return mismatches; +} + void validateManifest(int version, Map manifest) { final opsVersion = manifest['opsVersion']; + final digestMatches = manifest['digest'] == ops.MANIFEST_DIGEST; + final mismatches = digestMatches ? const [] : _findMismatchedTypes(manifest['types']); + final negotiated = mismatches != null && mismatches.isEmpty; if (manifest['abiVersion'] != version || opsVersion != ops.OPS_VERSION || - manifest['digest'] != ops.MANIFEST_DIGEST || + (!digestMatches && !negotiated) || manifest['manifestRevision'] == null || manifest['ops'] is! List || manifest['handleKinds'] is! List || manifest['errorCodes'] is! List) { + final detail = mismatches != null && mismatches.isNotEmpty + ? ' (incompatible types: ${mismatches.take(5).join(', ')})' + : ''; throw StateError( 'Incompatible aimux manifest: opsVersion $opsVersion ' '(expected ${ops.OPS_VERSION}), digest ${manifest['digest']} ' - '(expected ${ops.MANIFEST_DIGEST})', + '(expected ${ops.MANIFEST_DIGEST})$detail', ); } final names = {}; diff --git a/bindings/flutter/native/aimux_ops.h b/bindings/flutter/native/aimux_ops.h index 622093eec..4d5c1c15f 100644 --- a/bindings/flutter/native/aimux_ops.h +++ b/bindings/flutter/native/aimux_ops.h @@ -1,4 +1,4 @@ -/* Generated by aimux-codegen. Do not edit. Manifest SHA-256: 9c7f306459ec0009f6bca66c0abbb36fc3740b5fc6330c47a6fd73a6bc16caae */ +/* Generated by aimux-codegen. Do not edit. Manifest SHA-256: cd147fa9595ede3951744fa261da98cc18c204e65b4081073ad3a3c1b68bfd92 */ #ifndef AIMUX_H #define AIMUX_H @@ -11,7 +11,7 @@ extern "C" { #define AIMUX_ABI_VERSION UINT32_C(65536) #define AIMUX_OPS_VERSION "1.0" -#define AIMUX_MANIFEST_DIGEST "9c7f306459ec0009f6bca66c0abbb36fc3740b5fc6330c47a6fd73a6bc16caae" +#define AIMUX_MANIFEST_DIGEST "cd147fa9595ede3951744fa261da98cc18c204e65b4081073ad3a3c1b68bfd92" #define AIMUX_OP_ABORT_CREATE "abort.create" #define AIMUX_OP_ABORT_SIGNAL "abort.signal" diff --git a/bindings/flutter/test/aimux_test.dart b/bindings/flutter/test/aimux_test.dart index 83262a88f..d9edd4198 100644 --- a/bindings/flutter/test/aimux_test.dart +++ b/bindings/flutter/test/aimux_test.dart @@ -70,6 +70,35 @@ void main() { } }); + test('negotiates manifest via type schema hashes when packages/digest change', () { + expect(ops.TYPE_SCHEMA_HASHES, isNotEmpty); + final types = [ + for (final entry in ops.TYPE_SCHEMA_HASHES.entries) + {'id': entry.key, 'revision': '1', 'schemaHash': entry.value}, + ]; + final negotiated = { + ...client.manifest, + 'digest': 'changed-digest-from-new-package', + 'packages': ['openai', 'extra-package'], + 'types': types, + }; + validateManifest(ops.ABI_VERSION, negotiated); + + final targetType = types.first['id'] as String; + final brokenTypes = [ + {...types.first, 'schemaHash': '0' * 64}, + ...types.skip(1), + ]; + expect( + () => validateManifest(ops.ABI_VERSION, {...negotiated, 'types': brokenTypes}), + throwsA( + isA() + .having((e) => e.message, 'expected digest', contains(ops.MANIFEST_DIGEST)) + .having((e) => e.message, 'mismatched type', contains(targetType)), + ), + ); + }); + test('load validates ABI, manifest and required ops', () async { expect(client.manifest['opsVersion'], ops.OPS_VERSION); await expectLater( diff --git a/bindings/go/README.md b/bindings/go/README.md index 69b26fadf..bc418fabe 100644 --- a/bindings/go/README.md +++ b/bindings/go/README.md @@ -32,9 +32,10 @@ fmt.Println(result.Text) `Call` invokes a global operation; `Handle.Call` invokes one on an owned handle. `Create` owns the returned entry, whether the operation returns a decimal handle string or an object containing `handle`. Names are available -in `generated/ops.go` and `Manifest()`. The first operation checks ABI major -and the exact generated operation version. Manifest metadata remains available -to callers; per-type schema revision/hash metadata is not currently generated. +in `generated/ops.go` and `Manifest()`. The first operation checks ABI major, +the exact generated operation version, and manifest compatibility (`MANIFEST_DIGEST` +fast-path with full `generated.TYPE_SCHEMA_HASHES` `schemaHash` fallback). Per-type `revision` +and transitive `schemaHash` metadata are generated in `schema/manifest.json` and `generated.TYPE_SCHEMA_HASHES`. Calls accept typed values or `json.RawMessage` and return canonical raw JSON. `CallInto[T]` decodes a typed result. `Params` preserves absent keys versus diff --git a/bindings/go/abi_test.go b/bindings/go/abi_test.go index 5b6972e0d..aceff52af 100644 --- a/bindings/go/abi_test.go +++ b/bindings/go/abi_test.go @@ -1,12 +1,18 @@ package aimux import ( + "bytes" "context" + "crypto/sha256" + "encoding/hex" "encoding/json" "errors" "fmt" "os" + "path/filepath" "runtime" + "sort" + "strconv" "strings" "sync" "testing" @@ -100,6 +106,50 @@ func TestManifestRequiresExactGeneratedVersionAndDigest(t *testing.T) { } } +func TestManifestNegotiatesByTypeSchemaHashesWhenDigestChanges(t *testing.T) { + if len(generated.TYPE_SCHEMA_HASHES) == 0 { + t.Fatal("expected generated.TYPE_SCHEMA_HASHES to be populated") + } + types := make([]map[string]any, 0, len(generated.TYPE_SCHEMA_HASHES)) + var firstID string + for id, hash := range generated.TYPE_SCHEMA_HASHES { + if firstID == "" { + firstID = id + } + types = append(types, map[string]any{"id": id, "revision": "1", "schemaHash": hash}) + } + raw, err := json.Marshal(map[string]any{ + "abiVersion": ABIVersion, + "opsVersion": generated.OPS_VERSION, + "digest": "changed-digest-from-new-package", + "packages": []string{"openai", "extra-package"}, + "types": types, + }) + if err != nil { + t.Fatal(err) + } + if err := validateManifest(ABIVersion, raw); err != nil { + t.Fatalf("expected matching types[].schemaHash to negotiate across changed digest: %v", err) + } + + types[0]["schemaHash"] = strings.Repeat("0", 64) + brokenID := types[0]["id"].(string) + brokenRaw, err := json.Marshal(map[string]any{ + "abiVersion": ABIVersion, + "opsVersion": generated.OPS_VERSION, + "digest": "changed-digest-from-new-package", + "types": types, + }) + if err != nil { + t.Fatal(err) + } + err = validateManifest(ABIVersion, brokenRaw) + checkCode(t, err, "protocol", 302) + if !strings.Contains(err.Error(), generated.MANIFEST_DIGEST) || !strings.Contains(err.Error(), brokenID) { + t.Fatalf("expected error containing MANIFEST_DIGEST and %q, got: %v", brokenID, err) + } +} + func TestRuntimeManifest(t *testing.T) { raw, err := Manifest() if err != nil { @@ -539,3 +589,103 @@ func TestStreamSingleEventLimitIncludesFrameOverhead(t *testing.T) { t.Fatalf("event count = %d", count) } } + +func writeCanonicalJSONString(buf *bytes.Buffer, s string) error { + var raw bytes.Buffer + enc := json.NewEncoder(&raw) + enc.SetEscapeHTML(false) + if err := enc.Encode(s); err != nil { + return err + } + buf.Write(bytes.TrimSuffix(raw.Bytes(), []byte{'\n'})) + return nil +} + +func writeCanonicalManifestJSON(buf *bytes.Buffer, v any) error { + switch x := v.(type) { + case map[string]any: + keys := make([]string, 0, len(x)) + for k := range x { + keys = append(keys, k) + } + sort.Strings(keys) + buf.WriteByte('{') + for i, k := range keys { + if i > 0 { + buf.WriteByte(',') + } + if err := writeCanonicalJSONString(buf, k); err != nil { + return err + } + buf.WriteByte(':') + if err := writeCanonicalManifestJSON(buf, x[k]); err != nil { + return err + } + } + buf.WriteByte('}') + return nil + case []any: + buf.WriteByte('[') + for i, elem := range x { + if i > 0 { + buf.WriteByte(',') + } + if err := writeCanonicalManifestJSON(buf, elem); err != nil { + return err + } + } + buf.WriteByte(']') + return nil + case json.Number: + buf.WriteString(x.String()) + return nil + case string: + return writeCanonicalJSONString(buf, x) + case bool: + buf.WriteString(strconv.FormatBool(x)) + return nil + case nil: + buf.WriteString("null") + return nil + default: + return fmt.Errorf("unexpected JSON value type %T", v) + } +} + +func TestSchemaManifestSelfVerifiesAfterStrippingDigestAndInputHash(t *testing.T) { + raw, err := os.ReadFile(filepath.Join("..", "..", "schema", "manifest.json")) + if err != nil { + t.Fatal(err) + } + dec := json.NewDecoder(bytes.NewReader(raw)) + dec.UseNumber() + var emitted map[string]any + if err := dec.Decode(&emitted); err != nil { + t.Fatal(err) + } + if emitted["digest"] != generated.MANIFEST_DIGEST { + t.Fatalf("manifest digest = %v, want %s", emitted["digest"], generated.MANIFEST_DIGEST) + } + if emitted["inputHash"] != generated.MANIFEST_DIGEST { + t.Fatalf("manifest inputHash = %v, want %s", emitted["inputHash"], generated.MANIFEST_DIGEST) + } + delete(emitted, "digest") + delete(emitted, "inputHash") + opsSlice, ok := emitted["ops"].([]any) + if !ok { + t.Fatalf("expected ops array, got %T", emitted["ops"]) + } + sort.Slice(opsSlice, func(i, j int) bool { + a := opsSlice[i].(map[string]any)["name"].(string) + b := opsSlice[j].(map[string]any)["name"].(string) + return a < b + }) + var canonical bytes.Buffer + if err := writeCanonicalManifestJSON(&canonical, emitted); err != nil { + t.Fatal(err) + } + sum := sha256.Sum256(canonical.Bytes()) + if got := hex.EncodeToString(sum[:]); got != generated.MANIFEST_DIGEST { + t.Fatalf("self-verified manifest digest = %s, want %s", got, generated.MANIFEST_DIGEST) + } +} diff --git a/bindings/go/aimux.go b/bindings/go/aimux.go index 3b7010e68..14b49273f 100644 --- a/bindings/go/aimux.go +++ b/bindings/go/aimux.go @@ -8,6 +8,8 @@ import ( "encoding/json" "fmt" "runtime" + "sort" + "strings" "sync" "sync/atomic" @@ -64,8 +66,9 @@ func (h *Handle) ID() (HandleID, error) { return 0, ErrClosed } -// CheckABI checks the ABI major and exact generated operation version and digest once, -// before any operation is executed. +// CheckABI checks the ABI major, exact generated operation version, and manifest +// compatibility (MANIFEST_DIGEST fast-path or full generated.TYPE_SCHEMA_HASHES fallback) +// once, before any operation is executed. func CheckABI() error { abiCheck.Do(func() { actual := nativeABIVersion() @@ -83,18 +86,59 @@ func CheckABI() error { return abiCheck.err } +type manifestTypeEntry struct { + ID string `json:"id"` + SchemaHash string `json:"schemaHash"` +} + +func mismatchedTypeSchemas(entries []manifestTypeEntry) ([]string, bool) { + if len(generated.TYPE_SCHEMA_HASHES) == 0 || len(entries) == 0 { + return nil, false + } + actual := make(map[string]string, len(entries)) + for _, entry := range entries { + if entry.ID != "" && entry.SchemaHash != "" { + actual[entry.ID] = entry.SchemaHash + } + } + var mismatches []string + for id, expectedHash := range generated.TYPE_SCHEMA_HASHES { + if actual[id] != expectedHash { + mismatches = append(mismatches, id) + } + } + sort.Strings(mismatches) + return mismatches, true +} + func validateManifest(actual uint32, raw []byte) error { var manifest struct { - ABI uint32 `json:"abiVersion"` - Ops string `json:"opsVersion"` - Digest string `json:"digest"` + ABI uint32 `json:"abiVersion"` + Ops string `json:"opsVersion"` + Digest string `json:"digest"` + Types []manifestTypeEntry `json:"types"` } if err := json.Unmarshal(raw, &manifest); err != nil { return localError("binding", 205, "ResultSerialization", err.Error()) - } else if manifest.ABI != actual || manifest.Ops != generated.OPS_VERSION || manifest.Digest != generated.MANIFEST_DIGEST { + } else if manifest.ABI != actual || manifest.Ops != generated.OPS_VERSION { return localError("protocol", 302, "UnsupportedOpsVersion", fmt.Sprintf("incompatible runtime manifest: opsVersion %q (expected %q), digest %q (expected %q)", manifest.Ops, generated.OPS_VERSION, manifest.Digest, generated.MANIFEST_DIGEST)) } - return nil + if manifest.Digest == generated.MANIFEST_DIGEST { + return nil + } + mismatches, hasTypes := mismatchedTypeSchemas(manifest.Types) + if hasTypes && len(mismatches) == 0 { + return nil + } + detail := "" + if len(mismatches) > 0 { + limit := len(mismatches) + if limit > 5 { + limit = 5 + } + detail = fmt.Sprintf(" (incompatible types: %s)", strings.Join(mismatches[:limit], ", ")) + } + return localError("protocol", 302, "UnsupportedOpsVersion", fmt.Sprintf("incompatible runtime manifest: opsVersion %q (expected %q), digest %q (expected %q)%s", manifest.Ops, generated.OPS_VERSION, manifest.Digest, generated.MANIFEST_DIGEST, detail)) } func Manifest() (json.RawMessage, error) { diff --git a/bindings/go/generated/ops.go b/bindings/go/generated/ops.go index c5807c73e..c4717b2e9 100644 --- a/bindings/go/generated/ops.go +++ b/bindings/go/generated/ops.go @@ -1,10 +1,10 @@ -// Generated by aimux-codegen. Do not edit. Manifest SHA-256: 9c7f306459ec0009f6bca66c0abbb36fc3740b5fc6330c47a6fd73a6bc16caae +// Generated by aimux-codegen. Do not edit. Manifest SHA-256: cd147fa9595ede3951744fa261da98cc18c204e65b4081073ad3a3c1b68bfd92 package generated const ( ABI_VERSION = 65536 OPS_VERSION = "1.0" - MANIFEST_DIGEST = "9c7f306459ec0009f6bca66c0abbb36fc3740b5fc6330c47a6fd73a6bc16caae" + MANIFEST_DIGEST = "cd147fa9595ede3951744fa261da98cc18c204e65b4081073ad3a3c1b68bfd92" OP_ABORT_CREATE = "abort.create" OP_ABORT_SIGNAL = "abort.signal" OP_AUTH_CODEX_REFRESH = "auth.codexRefresh" @@ -82,3 +82,108 @@ const ( OP_TRANSPORT_CREATE = "transport.create" OP_VIDEO_GENERATE = "video.generate" ) + +var TYPE_SCHEMA_HASHES = map[string]string{ + "AnyValue": "1277ba3a7f8d8ac87c32098666e636d643b6b12d05eb3929a9f018bcc4aa124d", + "[aimux_core::model_catalogue::RuntimeModel]": "aa1da3dbae5d9c830298d255a2cd3bf3b539865ec0324018abcbe555f964f086", + "[aimux_core::session::SessionCall]": "21e259cac0528023d45be7860ea838fcc6a785c0b26ebfe84f7e40b9b861458e", + "[aimux_core::session::SessionView]": "61ad43e852b0e490ab586cd27d25eeb97b00bbfce8808dde6b6252a4aeb367af", + "[aimux_core::trace::store::SessionStepStat]": "ad678575594f65b07dfcb9305b3360fa248d2a05acd3f1059a8cae039ad452cb", + "[aimux_core::trace::store::TraceStats]": "03eb93cd7b38050c6e3be7e47f3c7ac13e617b26f03f03011d58d9d8dfd273aa", + "[aimux_provider_utils::package_descriptor::PackageDescriptor]": "3a98399f69d62320aa747123ec3ede231cd955ced29e36dc401ccc9a82fedc8a", + "[uint8]": "7c82b8345d5b5e8e5c561ac91d6d94e05d221e5c52f729fdde3a6e3e3b6af77d", + "aimux_core::decision_model::DecideResult": "3d50c7ec8e3cce59ea94e9555c93965d03d50d5581e5c3cf214dfe1fdaac0053", + "aimux_core::embedding_model::EmbeddingCallOptions": "1f6db6e963bb7d969a1cb8da125ba836fe8711635d34902b674033e0aefa934d", + "aimux_core::embedding_model::EmbeddingResult": "af3ce0787db6208be114613c78dc02f038cb5dc2f7abcf6a4ade2be79085342e", + "aimux_core::files_model::UploadFileResult": "0d17fd3dbfa601e45c9fabf62f9bb1e5028591443eafccd4eecacef0dcda0368", + "aimux_core::generate::GenerateObjectResult": "21cca82de06d366b0f47d781bd49141bb63215accdd1133bb360113a60b7cc00", + "aimux_core::generate::GenerateTextResult": "c5c6016de2c926c85144959d9436c9d2214a27a9724e75d68393e933ef7263f5", + "aimux_core::image_model::ImageCallOptions": "ddacb8970cef4590bcdcc572ced361b181d501d3b474a2d6c50a9c0c02af3eb2", + "aimux_core::image_model::ImageResult": "a9d2d939f3dc153a5b5ebc8083bea1226ff63ff2e54e4e275c9ab2b136b9e880", + "aimux_core::openai_output::ChatCompletion": "503195cbe7fe458d9403a9de20b93bd17c20bbee0de40a8088bf3847ee835ad9", + "aimux_core::openai_output::ChatCompletionChunk": "b15bd0f02f12fa4e220a1b8e5d82ca24c7486557a04c550d30b90a297b372311", + "aimux_core::recording::Recording": "56fa358fb2023da68837722ed573e00fc997506403d7c7aa516c586c45b4fd54", + "aimux_core::reranking_model::RerankingCallOptions": "c481b6e7c4d5e71ea7db00166ab2952c8a893443f786a61374c7398b4e475e4c", + "aimux_core::reranking_model::RerankingResult": "d757826963b3ce836e4d76fca8f42455a3a3146c20f3fb74f58cabe465348d01", + "aimux_core::search_model::SearchCallOptions": "3b963a871e6f1858db03b68adc74c5f898d4a2c3c0506e4e359b8d8198d30b22", + "aimux_core::search_model::SearchResult": "61075439fcb4276085a11113195dd13220b710cc0c2199ceefa4ec3d07d0195f", + "aimux_core::speech_model::SpeechCallOptions": "418be167c89bca652fb0a9dd52a1da359c1ecc2b069b9d2a0859ab76a7f7f431", + "aimux_core::speech_model::SpeechResult": "8d32e22e24d7ee19a7c2f6cedaf909b6952aa76d635aa4e568e333ed5b45ce07", + "aimux_core::stream_part::TextStreamPart": "c3e035afcbb44740877b943b8ce19e5ac855fd3eaa9ee3d17a936cf7521d7ffc", + "aimux_core::tool::ToolCall": "ea7bd676d207cc40ac1d64442d114b041b7ac60db5420e1f200cc6a8af88d48c", + "aimux_core::trace::record::TraceRecord": "29acdf296b3cd896422357ec1c829fddef38a0455afd825cb7a49f0cb9a8b74d", + "aimux_core::trace::store::SessionChainView": "f5f242da28123fec7907b886dc1debfb4099cfa415074db3476f09712a6c34ca", + "aimux_core::transcription_model::TranscriptionCallOptions": "2a5cf741b2362497e51d0f33b275e01a9dcd336c08623c8617062b83f958aa10", + "aimux_core::transcription_model::TranscriptionResult": "80f153139ed0a65101df69711f15972bfee3154d5452ee8db11585376f31b5fc", + "aimux_core::video_model::VideoCallOptions": "d474a1301928fac38b4d5f06950a91285fc039a7910b51cda8b6ec84cbde9252", + "aimux_core::video_model::VideoResult": "b6fbefd485c75a364d0230349c85d9e222efad481dfde42d35332cbe14d2e09d", + "aimux_ops::envelope::ErrorEnvelope": "48e1305879bb316b0ab5a77b866d6a2dd5c9c2af7f4d9c39f31656d5e7150ce6", + "aimux_ops::frame::StreamFrame": "ce40166decce7b747c1ce7d8f887c5b820577e682df4568e06653de6d3e0c40c", + "aimux_ops::handle::HandleId": "1847d76248c899504e814a58f8771ef59f77fb8b1cca2090193a272bdbd0d6b8", + "aimux_ops::operation::CancelResult": "f166988845b50fd6ae7913505cff98100de52447ba7e297e79f7c6c9b569d02f", + "aimux_ops::operation::OperationStatus": "abeda07e7224a93d1dce678575101d846d68c0c6b24482fb0408b19cb0f52e6b", + "aimux_ops::ops::composite::MoaParams": "2510e5a1226e6f5742ba6f8331a6a1dc6ee48144c88143db25d1d213a842e4c3", + "aimux_ops::ops::composite::RouterParams": "a7db760e7a4e1b6624433d6609408a9136d869bf415c4f5a462011ac3164c3cb", + "aimux_ops::ops::decision::DecisionDecideRequest": "e2a9893b9dfa971db96e94eaf7b853f0daebeb152500d9c4851127abfde5802d", + "aimux_ops::ops::files::UploadFileParams": "136396c0be1014277cef6f30633f16d3ecc08d5392f1f53fa5ebbc2af0eba17c", + "aimux_ops::ops::handles::CredentialParams": "2a3ded4003c2d3257653c6ef4613f9defff748954cd9325c6aa98674cb080894", + "aimux_ops::ops::handles::HandleResult": "01fe7a49695da49143a48c0c53ec9b1ff4099dbc108770194430c38fe71f01c2", + "aimux_ops::ops::handles::MiddlewareParams": "f2789f63feb7b414d3f867c2a84dc298a53ace8d84082367e989161b769ec6ce", + "aimux_ops::ops::handles::TransportParams": "86e40584fcc21dab8f0017f8e892b776ac24aaa9afc943ba805828cecc6e1a4c", + "aimux_ops::ops::misc::CatalogueFetchRequest": "2ceed496996ec6cf32d3e3115ab6a4346a1bb201dc8a970eefbd46eb700a310e", + "aimux_ops::ops::misc::CodexRefreshRequest": "59f1075ed68cb79896d4bac1d0ab32d21fb5855012c6336652bea0c4969ac926", + "aimux_ops::ops::misc::OpenAiOutputRequest": "b0c6acc344f0b23b9ea3b693aeadf7aed7eb4fbdfce4b957be83af1154b842b4", + "aimux_ops::ops::misc::ToolRepairApplyRequest": "0f430fdb223759ef7c48c4d7f824e7be74d29295a6b4f7caaf82b5acba25e538", + "aimux_ops::ops::misc::ToolRepairApplyResultRequest": "fa092862004654e065233b2df2abdbec3befe88d9d734d494679968a5b6e954a", + "aimux_ops::ops::misc::ToolRepairContextRequest": "81bae04c56aac3380b75de639d162f819a2dd5717147a53cf1a75281727d78a1", + "aimux_ops::ops::misc::ToolRepairContextResult": "fd8173e6ec40724fa4207e3571e290ac12e4db1fed08a709273e2982a82b504f", + "aimux_ops::ops::operation::EmptyParams": "1612408252a424283a43a92193bb8ea24f72c08b9f0d2117b4ef7f5a090e37f8", + "aimux_ops::ops::operation::OperationNextParams": "127fea618826e51576ae488dcccaca03c04b774a847a33ec9c47565396862bb7", + "aimux_ops::ops::operation::OperationPollResult": "ec9af646d9b26de004871b4427201b8185677bbbeaf48a1dd489e72e1b126ea1", + "aimux_ops::ops::operation::TranscriptionStartParams": "c863c6f84c5715193078c914c25a5c575c625d77cf3b64ad4029253268d56226", + "aimux_ops::ops::provider::HandleResult": "cea9958b3ff5c8896bab683db36a396bef563c35ec0121b77d51e9475d5d8df5", + "aimux_ops::ops::provider::ProviderCreateParams": "e65cb5322863a2d16af50745cca82873cd03fa2578320c1796570b37efd2c1bb", + "aimux_ops::ops::provider::ProviderCustomParams": "bc40024b5e1794bc8e2bd52bfa9b661b90ad9aa8ba94639ba9120b46bbbf0f90", + "aimux_ops::ops::provider::ProviderDefaultParams": "bb2aff39ad05a28afcc9f4fd8e7e7b30cf3c7ac7b5bd483e002f78f6db737299", + "aimux_ops::ops::provider::ProviderDescriptorsParams": "fa195301dd402853e4cca7cf0ba2843c550c96ef0dc179ec50516394a9435dc0", + "aimux_ops::ops::provider::ProviderInvokeParams": "b33bb79b85db5289152f563021ba9c4285538122d70fe16333b64c94a011fc78", + "aimux_ops::ops::provider::ProviderModelParams": "a9db30c0dc6c71594875748792ddce9f46707696842e45beaceaf474856fbcad", + "aimux_ops::ops::provider::ProviderWrapParams": "a7f59ed924a355d14ad795b37993983fc5c2f2125f9c813ce4b561a0fca7fd62", + "aimux_ops::ops::recording::CreateRecorderParams": "a951e5dde168e1621d21834415cac68c793244158e1fb0f5171dfda8b0bf71c5", + "aimux_ops::ops::recording::EmptyParams": "58802ed68aeb4b87ba67d24b728037be53e63706a4f29055005f14ad068c8777", + "aimux_ops::ops::recording::RecorderExport": "6d3226d3859134361f1dec0429a87c28342d7c5548ea175d535b92d4a49ee8e5", + "aimux_ops::ops::recording::RecorderHandleResult": "f16095d906b62f7fbf86800f6e39e3e89bd6ef1bc65776569795b3555e9025cc", + "aimux_ops::ops::recording::RecorderStats": "5f842b6b1bd0816d07e6f179890f79dddae8815c180824405a9e5ad9dd7871a0", + "aimux_ops::ops::registry::HandleResult": "5f78b2970033052ccdef6827004094c65e9ee35ddc6f80d6c8a619c4db63b05a", + "aimux_ops::ops::registry::ModelInfo": "291dc73d80dbe44be78b15e9deaa60ba253f0c47fc5cfdbffef3bd5cf4b94f36", + "aimux_ops::ops::registry::ModelInfoParams": "c357f2b2342be3bf5f680e816188a4d7b3758a399975eb77a599a82f633d8974", + "aimux_ops::ops::registry::ModelResolveParams": "cfcd1fab460d33db7141f397064edf1481f0024248a7a6f256f8cbfbd3c6eaee", + "aimux_ops::ops::registry::ModelWrapParams": "c5f9703fca04c72df6f3c1c76dea3a130c3e84e37dbc3f18ef58fcf9745f4781", + "aimux_ops::ops::registry::RegistryCreateParams": "6df3075b2b59076de76283d00d4853a4c0da0345c7396cee4a4ad69240290573", + "aimux_ops::ops::registry::RegistryFromConfigParams": "26872ba0751baac107c59a0aa962fa102cc778c661b7bd7b8bd1ccd4226b97ae", + "aimux_ops::ops::registry::RegistryListParams": "c1c477df7aefa646daf05cd316526138109cadd655dd219200531d72eff3260c", + "aimux_ops::ops::registry::RegistryListResult": "26049e7c68ea45b9e322f693c49755e0db476d91631f2a1aa864659b9b87a773", + "aimux_ops::ops::registry::RegistryProviderParams": "d6379c789feb67435e795d0213dfd2fd74d9276465a8f13622327864cb025fb4", + "aimux_ops::ops::registry::RegistryUpdateParams": "9cde136591d14543027538bfa38331059c9865efa2cb89cbf6b2866bdcd21e9e", + "aimux_ops::ops::registry::RegistryUpdateResult": "3e2738ff293183afb575f47bd75daa8afd330f09e43cb4a39de975d97ba16c5b", + "aimux_ops::ops::replay::ReplayCreateParams": "ee64b5b5843103f76ca2166aed2f58995e472be93cb7bb18dea8238c8a2d9e44", + "aimux_ops::ops::replay::ReplayInspection": "7ac2af62f3421f8c7c50867a838f0aff90f35b6a4f192f6c0d5347ab4699108c", + "aimux_ops::ops::replay::ReplayLiveParams": "e99c7d51fb194def185f5a03d84bfc226eb1b101eade0b885216332605318a4d", + "aimux_ops::ops::replay::ReplayLiveResult": "bd9959dd7e0300cb57e6929b2ed29b7e07dcb5aaf65be16b96e34bf8d6577a7f", + "aimux_ops::ops::replay::ReplayPlan": "5cc6667b9fac6de173bf5b55c1a76a491255f89f0fa7a27c0fd33fd790259799", + "aimux_ops::ops::replay::ReplaySessionHandle": "5e779b71ce2a54e59948c605cdfc48797d0760027ad5f44966df958fe9781d11", + "aimux_ops::ops::runtime::RuntimeConfigureParams": "e3b24b9f1fbdf2be7da210f15060803cf8bfdef77c8b2ad330a5b501263dfb0f", + "aimux_ops::ops::runtime::RuntimeDescribeParams": "c3db9b36a42e2bfda8823a35aadc8f6b183dcb46fd7256aeb66505289874b96d", + "aimux_ops::ops::session::SessionStoreCallsParams": "ddd482204fdd305bbfd28d43ae829d8c286f3f8906302ca6679743ea680fedda", + "aimux_ops::ops::session::SessionStoreCreateParams": "080d865c349ec86553f72b99ab1c65ddbb72d0c348a96dc17135a934d787cd86", + "aimux_ops::ops::session::SessionStoreHandle": "755d437d47d362474942fc4a09f5f8c80b75cf362ac16b25b262e33a760b4c6a", + "aimux_ops::ops::text::OpenAiTextRequest": "59293b18b6124a9a394113b8f94f637c65dc35ac44a30f7e0df70855e885f8e4", + "aimux_ops::ops::text::TextRequest": "3a6f59c1f0c3b7ded5f5509d93afe9bddd2b80a8a3cd752d79f97edadae40c3d", + "aimux_ops::ops::trace::TraceAggregateParams": "1b207f0bbe1b7ce7e9b8b0beb9334cf3cc4f9f05382911aaacfe0425dc8ff2c8", + "aimux_ops::ops::trace::TraceCreateParams": "59fef52f382800570e861ae9ca92433dcae8807679d914a89ce99705713301d9", + "aimux_ops::ops::trace::TraceSessionParams": "3e2300f6c65f6dcd52a016eba648a29abeff3a9d67c3b04a95617aa66832f810", + "aimux_providers::catalogue::Catalogue": "6e0128414c8cce09930fea4c68daf7739f9c79072f240bcb9d786eabeaf53b41", + "aimux_providers::codex::CodexTokens": "0925e12b12a645e10306277a7d46fad9d646ce829acef378d223d53800256321", + "null": "0b04deb4d538ba0de2ab6920bc3b185241775a867937e5875a50ff54be3b9d56", + "string": "0d6cbdd2f60c1f2f337739faaafd28ef3e743416ad7a52645a808613733dcab5", +} diff --git a/bindings/go/types_gen.go b/bindings/go/types_gen.go index 546d19fb6..0335342fe 100644 --- a/bindings/go/types_gen.go +++ b/bindings/go/types_gen.go @@ -1410,6 +1410,20 @@ const ( APICallErrorOriginUnknown APICallErrorOrigin = "unknown" ) +func (v *APICallErrorOrigin) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return err + } + switch APICallErrorOrigin(s) { + case APICallErrorOriginTransport, APICallErrorOriginHTTPResponse, APICallErrorOriginStreamEvent, APICallErrorOriginLocal, APICallErrorOriginUnknown: + *v = APICallErrorOrigin(s) + return nil + default: + return fmt.Errorf("invalid APICallErrorOrigin: %q", s) + } +} + // Aspect ratio in `{width}:{height}` format (e.g. `"16:9"`). // // Newtype that enforces the `W:H` format used by V4 image and video @@ -1927,6 +1941,30 @@ type BackendConfigVariantRing struct { Capacity *uint64 `json:"capacity,omitzero"` } +func (v *BackendConfigVariantRing) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for BackendConfigVariantRing, got null") + } + for key := range raw { + switch key { + case "capacity", "type": + default: + return fmt.Errorf("unknown field %q in BackendConfigVariantRing", key) + } + } + type alias BackendConfigVariantRing + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = BackendConfigVariantRing(tmp) + return nil +} + func (BackendConfigVariantRing) isBackendConfig() {} func (v BackendConfigVariantRing) MarshalJSON() ([]byte, error) { @@ -1941,6 +1979,40 @@ type BackendConfigVariantJsonl struct { Directory string `json:"directory"` } +func (v *BackendConfigVariantJsonl) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for BackendConfigVariantJsonl, got null") + } + for key := range raw { + switch key { + case "directory", "type": + default: + return fmt.Errorf("unknown field %q in BackendConfigVariantJsonl", key) + } + } + for _, req := range []string{"directory"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in BackendConfigVariantJsonl", req) + } + } + for _, req := range []string{"directory"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in BackendConfigVariantJsonl must not be null", req) + } + } + type alias BackendConfigVariantJsonl + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = BackendConfigVariantJsonl(tmp) + return nil +} + func (BackendConfigVariantJsonl) isBackendConfig() {} func (v BackendConfigVariantJsonl) MarshalJSON() ([]byte, error) { @@ -1960,6 +2032,20 @@ const ( BreakKindUnknown BreakKind = "Unknown" ) +func (v *BreakKind) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return err + } + switch BreakKind(s) { + case BreakKindSystemChanged, BreakKindToolsChanged, BreakKindConversationReset, BreakKindUnknown: + *v = BreakKind(s) + return nil + default: + return fmt.Errorf("invalid BreakKind: %q", s) + } +} + type CancelResult string const ( @@ -1968,12 +2054,40 @@ const ( CancelResultAlreadyTerminal CancelResult = "alreadyTerminal" ) +func (v *CancelResult) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return err + } + switch CancelResult(s) { + case CancelResultFirst, CancelResultAlreadyRequested, CancelResultAlreadyTerminal: + *v = CancelResult(s) + return nil + default: + return fmt.Errorf("invalid CancelResult: %q", s) + } +} + type CapturePolicy string const ( CapturePolicyFull CapturePolicy = "full" ) +func (v *CapturePolicy) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return err + } + switch CapturePolicy(s) { + case CapturePolicyFull: + *v = CapturePolicy(s) + return nil + default: + return fmt.Errorf("invalid CapturePolicy: %q", s) + } +} + // In-memory catalogue: per-provider model specs, keyed by aimux provider // name then model id. type Catalogue struct { @@ -1990,6 +2104,30 @@ type CatalogueFetchRequest struct { SourceURL *string `json:"sourceUrl,omitzero"` } +func (v *CatalogueFetchRequest) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for CatalogueFetchRequest, got null") + } + for key := range raw { + switch key { + case "abort", "sourceUrl": + default: + return fmt.Errorf("unknown field %q in CatalogueFetchRequest", key) + } + } + type alias CatalogueFetchRequest + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = CatalogueFetchRequest(tmp) + return nil +} + // Where a [`ModelSpec`] came from. type CatalogueSource string @@ -1999,6 +2137,20 @@ const ( CatalogueSourceManual CatalogueSource = "Manual" ) +func (v *CatalogueSource) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return err + } + switch CatalogueSource(s) { + case CatalogueSourceAnya2a, CatalogueSourceModelsDev, CatalogueSourceManual: + *v = CatalogueSource(s) + return nil + default: + return fmt.Errorf("invalid CatalogueSource: %q", s) + } +} + // A complete Chat Completion response (non-streaming). // // Mirrors the OpenAI `chat.completion` object. @@ -2127,6 +2279,30 @@ type CodexModeSpecVariantAPIKey struct { APIKey *StringOrEnv `json:"apiKey,omitzero"` } +func (v *CodexModeSpecVariantAPIKey) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for CodexModeSpecVariantAPIKey, got null") + } + for key := range raw { + switch key { + case "apiKey", "type": + default: + return fmt.Errorf("unknown field %q in CodexModeSpecVariantAPIKey", key) + } + } + type alias CodexModeSpecVariantAPIKey + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = CodexModeSpecVariantAPIKey(tmp) + return nil +} + func (CodexModeSpecVariantAPIKey) isCodexModeSpec() {} func (v CodexModeSpecVariantAPIKey) MarshalJSON() ([]byte, error) { @@ -2142,6 +2318,40 @@ type CodexModeSpecVariantChatGptAccount struct { Token StringOrEnv `json:"token"` } +func (v *CodexModeSpecVariantChatGptAccount) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for CodexModeSpecVariantChatGptAccount, got null") + } + for key := range raw { + switch key { + case "accountId", "token", "type": + default: + return fmt.Errorf("unknown field %q in CodexModeSpecVariantChatGptAccount", key) + } + } + for _, req := range []string{"token"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in CodexModeSpecVariantChatGptAccount", req) + } + } + for _, req := range []string{"token"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in CodexModeSpecVariantChatGptAccount must not be null", req) + } + } + type alias CodexModeSpecVariantChatGptAccount + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = CodexModeSpecVariantChatGptAccount(tmp) + return nil +} + func (CodexModeSpecVariantChatGptAccount) isCodexModeSpec() {} func (v CodexModeSpecVariantChatGptAccount) MarshalJSON() ([]byte, error) { @@ -2157,6 +2367,40 @@ type CodexRefreshRequest struct { RefreshToken string `json:"refreshToken"` } +func (v *CodexRefreshRequest) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for CodexRefreshRequest, got null") + } + for key := range raw { + switch key { + case "clientId", "refreshToken": + default: + return fmt.Errorf("unknown field %q in CodexRefreshRequest", key) + } + } + for _, req := range []string{"clientId", "refreshToken"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in CodexRefreshRequest", req) + } + } + for _, req := range []string{"clientId", "refreshToken"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in CodexRefreshRequest must not be null", req) + } + } + type alias CodexRefreshRequest + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = CodexRefreshRequest(tmp) + return nil +} + // Tokens returned by the Codex OAuth token endpoint (RFC-0018 §2 V3). // // `Debug` is hand-written so both tokens are redacted from logs and error @@ -2886,10 +3130,78 @@ type CreateRecorderParams struct { CapturePolicy CapturePolicy `json:"capturePolicy"` } +func (v *CreateRecorderParams) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for CreateRecorderParams, got null") + } + for key := range raw { + switch key { + case "backend", "capturePolicy": + default: + return fmt.Errorf("unknown field %q in CreateRecorderParams", key) + } + } + for _, req := range []string{"backend", "capturePolicy"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in CreateRecorderParams", req) + } + } + for _, req := range []string{"backend", "capturePolicy"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in CreateRecorderParams must not be null", req) + } + } + type alias CreateRecorderParams + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = CreateRecorderParams(tmp) + return nil +} + type CredentialParams struct { Kind string `json:"kind"` } +func (v *CredentialParams) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for CredentialParams, got null") + } + for key := range raw { + switch key { + case "kind": + default: + return fmt.Errorf("unknown field %q in CredentialParams", key) + } + } + for _, req := range []string{"kind"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in CredentialParams", req) + } + } + for _, req := range []string{"kind"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in CredentialParams must not be null", req) + } + } + type alias CredentialParams + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = CredentialParams(tmp) + return nil +} + // Provider-specific content identified by its provider and kind. type CustomPart struct { Kind NamespacedKind `json:"kind"` @@ -2909,6 +3221,40 @@ type DecideOptions struct { Timeout *TimeoutConfiguration `json:"timeout,omitzero"` } +func (v *DecideOptions) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for DecideOptions, got null") + } + for key := range raw { + switch key { + case "headers", "maxRetries", "providerOptions", "questions", "state", "timeout": + default: + return fmt.Errorf("unknown field %q in DecideOptions", key) + } + } + for _, req := range []string{"questions", "state"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in DecideOptions", req) + } + } + for _, req := range []string{"questions", "state"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in DecideOptions must not be null", req) + } + } + type alias DecideOptions + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = DecideOptions(tmp) + return nil +} + // The result of [`decide`] (`DecisionResult` of // `ai@7.0.128 src/decide/decision-result.ts:22-39`). type DecideResult struct { @@ -3035,6 +3381,30 @@ type DecisionBooleanCriteria struct { True Field[*DecisionInput] `json:"true,omitzero"` } +func (v *DecisionBooleanCriteria) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for DecisionBooleanCriteria, got null") + } + for key := range raw { + switch key { + case "false", "true": + default: + return fmt.Errorf("unknown field %q in DecisionBooleanCriteria", key) + } + } + type alias DecisionBooleanCriteria + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = DecisionBooleanCriteria(tmp) + return nil +} + // Runtime controls surround the canonical business options; only the control // object rejects unknown fields. Dispatch resolves `abort` with the caller's // owner before entering the handler and supplies its signal in `Ctx`. @@ -3043,6 +3413,40 @@ type DecisionDecideRequest struct { Options DecideOptions `json:"options"` } +func (v *DecisionDecideRequest) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for DecisionDecideRequest, got null") + } + for key := range raw { + switch key { + case "abort", "options": + default: + return fmt.Errorf("unknown field %q in DecisionDecideRequest", key) + } + } + for _, req := range []string{"options"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in DecisionDecideRequest", req) + } + } + for _, req := range []string{"options"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in DecisionDecideRequest must not be null", req) + } + } + type alias DecisionDecideRequest + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = DecisionDecideRequest(tmp) + return nil +} + // Shared state or structured instructions for a decision // (`DecisionModelV4Input`: a string, a JSON object or a JSON array). type DecisionInputVariant interface{ isDecisionInput() } @@ -3220,6 +3624,40 @@ type EmbeddingCallOptions struct { Values []string `json:"values"` } +func (v *EmbeddingCallOptions) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for EmbeddingCallOptions, got null") + } + for key := range raw { + switch key { + case "headers", "maxRetries", "providerOptions", "timeout", "values": + default: + return fmt.Errorf("unknown field %q in EmbeddingCallOptions", key) + } + } + for _, req := range []string{"values"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in EmbeddingCallOptions", req) + } + } + for _, req := range []string{"values"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in EmbeddingCallOptions must not be null", req) + } + } + type alias EmbeddingCallOptions + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = EmbeddingCallOptions(tmp) + return nil +} + // Debugging response info specific to embedding calls. type EmbeddingResponse struct { // The response body (opaque JSON). @@ -3252,11 +3690,59 @@ type EmbeddingUsage struct { type EmptyParams struct{} +func (v *EmptyParams) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for EmptyParams, got null") + } + if len(raw) > 0 { + return fmt.Errorf("unknown field in EmptyParams") + } + return nil +} + // Reference to an environment variable carrying a credential or secret. type EnvVarRef struct { Env string `json:"env"` } +func (v *EnvVarRef) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for EnvVarRef, got null") + } + for key := range raw { + switch key { + case "env": + default: + return fmt.Errorf("unknown field %q in EnvVarRef", key) + } + } + for _, req := range []string{"env"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in EnvVarRef", req) + } + } + for _, req := range []string{"env"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in EnvVarRef must not be null", req) + } + } + type alias EnvVarRef + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = EnvVarRef(tmp) + return nil +} + // The error another error was built from: the AI SDK's `cause`. // // An aimux error stays whole, as the AI SDK nests a `JSONParseError` in an @@ -3364,6 +3850,20 @@ const ( ErrorDomainProtocol ErrorDomain = "protocol" ) +func (v *ErrorDomain) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return err + } + switch ErrorDomain(s) { + case ErrorDomainAimux, ErrorDomainRecording, ErrorDomainBinding, ErrorDomainProtocol: + *v = ErrorDomain(s) + return nil + default: + return fmt.Errorf("invalid ErrorDomain: %q", s) + } +} + // Keep the payload open so newer error variants, provider data, and explicit // JSON nulls survive decoding and re-encoding by an older adapter. type ErrorEnvelope struct { @@ -3380,6 +3880,20 @@ const ( FallbackNone Fallback = "none" ) +func (v *Fallback) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return err + } + switch Fallback(s) { + case FallbackOnError, FallbackNone: + *v = Fallback(s) + return nil + default: + return fmt.Errorf("invalid Fallback: %q", s) + } +} + // Either raw bytes or a base64-encoded string (the AI SDK's // `Uint8Array | string`). // @@ -3601,6 +4115,20 @@ const ( FinishReasonUnifiedOther FinishReasonUnified = "other" ) +func (v *FinishReasonUnified) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return err + } + switch FinishReasonUnified(s) { + case FinishReasonUnifiedStop, FinishReasonUnifiedLength, FinishReasonUnifiedContentFilter, FinishReasonUnifiedToolCalls, FinishReasonUnifiedError, FinishReasonUnifiedOther: + *v = FinishReasonUnified(s) + return nil + default: + return fmt.Errorf("invalid FinishReasonUnified: %q", s) + } +} + // A tool definition passed to the model in `CallOptions.tools`. type FunctionTool struct { // Human-readable description. @@ -3990,6 +4518,30 @@ type GenerateTextOptions struct { TopP *float64 `json:"topP,omitzero"` } +func (v *GenerateTextOptions) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for GenerateTextOptions, got null") + } + for key := range raw { + switch key { + case "frequencyPenalty", "headers", "includeRawChunks", "instructions", "maxOutputTokens", "maxRetries", "output", "presencePenalty", "providerOptions", "reasoning", "seed", "sessionId", "stopSequences", "strictStream", "temperature", "timeout", "toolChoice", "tools", "topK", "topP": + default: + return fmt.Errorf("unknown field %q in GenerateTextOptions", key) + } + } + type alias GenerateTextOptions + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = GenerateTextOptions(tmp) + return nil +} + // Result of `generate_text` and of a consumed `stream_text`: the AI SDK's // `GenerateTextResult` (ai@7.0.127 `generate-text/generate-text-result.ts`). // @@ -4169,6 +4721,20 @@ const ( HandleKindReplaySession HandleKind = "ReplaySession" ) +func (v *HandleKind) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return err + } + switch HandleKind(s) { + case HandleKindProvider, HandleKindRegistry, HandleKindLanguage, HandleKindEmbedding, HandleKindImage, HandleKindSpeech, HandleKindTranscription, HandleKindReranking, HandleKindVideo, HandleKindSearch, HandleKindDecision, HandleKindFiles, HandleKindOperation, HandleKindAbort, HandleKindFetch, HandleKindWebSocket, HandleKindDownload, HandleKindCredentialResolver, HandleKindMiddleware, HandleKindTraceStore, HandleKindRecorder, HandleKindSessionStore, HandleKindReplaySession: + *v = HandleKind(s) + return nil + default: + return fmt.Errorf("invalid HandleKind: %q", s) + } +} + type HandleResult struct { Handle HandleID `json:"handle"` Kind HandleKind `json:"kind"` @@ -4235,6 +4801,40 @@ type ImageCallOptions struct { Timeout *TimeoutConfiguration `json:"timeout,omitzero"` } +func (v *ImageCallOptions) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for ImageCallOptions, got null") + } + for key := range raw { + switch key { + case "aspectRatio", "files", "headers", "mask", "maxRetries", "n", "prompt", "providerOptions", "seed", "size", "timeout": + default: + return fmt.Errorf("unknown field %q in ImageCallOptions", key) + } + } + for _, req := range []string{"n", "providerOptions"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in ImageCallOptions", req) + } + } + for _, req := range []string{"n", "providerOptions"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in ImageCallOptions must not be null", req) + } + } + type alias ImageCallOptions + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = ImageCallOptions(tmp) + return nil +} + // An image file used for image editing or variation generation. // // Aligned with V4 `ImageModelV4File`. @@ -4368,11 +4968,45 @@ type InputAudioFormat struct { Rate *uint32 `json:"rate,omitzero"` } -// ① 输入侧:完整调用参数,足以重建 generate_text 调用。 -type InputRecord struct { - Operation *RecordingOperation `json:"operation,omitzero"` - // 序列化的 CallOptions(abort_signal 已 serde skip), - // 加上所在操作的 `max_retries` / `timeout` / `session_id` +func (v *InputAudioFormat) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for InputAudioFormat, got null") + } + for key := range raw { + switch key { + case "formatType", "rate": + default: + return fmt.Errorf("unknown field %q in InputAudioFormat", key) + } + } + for _, req := range []string{"formatType"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in InputAudioFormat", req) + } + } + for _, req := range []string{"formatType"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in InputAudioFormat must not be null", req) + } + } + type alias InputAudioFormat + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = InputAudioFormat(tmp) + return nil +} + +// ① 输入侧:完整调用参数,足以重建 generate_text 调用。 +type InputRecord struct { + Operation *RecordingOperation `json:"operation,omitzero"` + // 序列化的 CallOptions(abort_signal 已 serde skip), + // 加上所在操作的 `max_retries` / `timeout` / `session_id` // (`OperationSettings`);headers/provider_options 已递归脱敏。 Options json.RawMessage `json:"options"` // 完整 prompt(消息数组,含 ContentPart::Image 等多模态)。Loads as @@ -4401,6 +5035,20 @@ const ( LanguageAPIMessages LanguageAPI = "messages" ) +func (v *LanguageAPI) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return err + } + switch LanguageAPI(s) { + case LanguageAPIChat, LanguageAPIResponses, LanguageAPICompletion, LanguageAPIMessages: + *v = LanguageAPI(s) + return nil + default: + return fmt.Errorf("invalid LanguageAPI: %q", s) + } +} + // A file in a provider's output: `LanguageModelV4File` / // `LanguageModelV4ReasoningFile` (`provider` // `language-model/v4/language-model-v4-file.ts`), whose `data` is base64 @@ -4886,6 +5534,40 @@ type LiveTargetVariantModel struct { Handle HandleIdInput `json:"handle"` } +func (v *LiveTargetVariantModel) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for LiveTargetVariantModel, got null") + } + for key := range raw { + switch key { + case "handle", "kind": + default: + return fmt.Errorf("unknown field %q in LiveTargetVariantModel", key) + } + } + for _, req := range []string{"handle"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in LiveTargetVariantModel", req) + } + } + for _, req := range []string{"handle"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in LiveTargetVariantModel must not be null", req) + } + } + type alias LiveTargetVariantModel + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = LiveTargetVariantModel(tmp) + return nil +} + func (LiveTargetVariantModel) isLiveTarget() {} func (v LiveTargetVariantModel) MarshalJSON() ([]byte, error) { @@ -4900,6 +5582,40 @@ type LiveTargetVariantRegistry struct { Handle HandleIdInput `json:"handle"` } +func (v *LiveTargetVariantRegistry) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for LiveTargetVariantRegistry, got null") + } + for key := range raw { + switch key { + case "handle", "kind": + default: + return fmt.Errorf("unknown field %q in LiveTargetVariantRegistry", key) + } + } + for _, req := range []string{"handle"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in LiveTargetVariantRegistry", req) + } + } + for _, req := range []string{"handle"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in LiveTargetVariantRegistry must not be null", req) + } + } + type alias LiveTargetVariantRegistry + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = LiveTargetVariantRegistry(tmp) + return nil +} + func (LiveTargetVariantRegistry) isLiveTarget() {} func (v LiveTargetVariantRegistry) MarshalJSON() ([]byte, error) { @@ -4921,10 +5637,58 @@ const ( LogLevelTrace LogLevel = "trace" ) +func (v *LogLevel) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return err + } + switch LogLevel(s) { + case LogLevelOff, LogLevelError, LogLevelWarn, LogLevelInfo, LogLevelDebug, LogLevelTrace: + *v = LogLevel(s) + return nil + default: + return fmt.Errorf("invalid LogLevel: %q", s) + } +} + type LoggingConfig struct { Level LogLevel `json:"level"` } +func (v *LoggingConfig) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for LoggingConfig, got null") + } + for key := range raw { + switch key { + case "level": + default: + return fmt.Errorf("unknown field %q in LoggingConfig", key) + } + } + for _, req := range []string{"level"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in LoggingConfig", req) + } + } + for _, req := range []string{"level"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in LoggingConfig must not be null", req) + } + } + type alias LoggingConfig + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = LoggingConfig(tmp) + return nil +} + type MiddlewareAuditMode string const ( @@ -4933,6 +5697,20 @@ const ( MiddlewareAuditModeStrict MiddlewareAuditMode = "strict" ) +func (v *MiddlewareAuditMode) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return err + } + switch MiddlewareAuditMode(s) { + case MiddlewareAuditModeDisabled, MiddlewareAuditModeShared, MiddlewareAuditModeStrict: + *v = MiddlewareAuditMode(s) + return nil + default: + return fmt.Errorf("invalid MiddlewareAuditMode: %q", s) + } +} + type MiddlewareParams struct { AuditMode *MiddlewareAuditMode `json:"auditMode,omitzero"` Kind string `json:"kind"` @@ -4940,6 +5718,40 @@ type MiddlewareParams struct { TraceStore *HandleIdInput `json:"traceStore,omitzero"` } +func (v *MiddlewareParams) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for MiddlewareParams, got null") + } + for key := range raw { + switch key { + case "auditMode", "kind", "scopeName", "traceStore": + default: + return fmt.Errorf("unknown field %q in MiddlewareParams", key) + } + } + for _, req := range []string{"kind"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in MiddlewareParams", req) + } + } + for _, req := range []string{"kind"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in MiddlewareParams must not be null", req) + } + } + type alias MiddlewareParams + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = MiddlewareParams(tmp) + return nil +} + // Reference-failure policy. type MoaFailMode string @@ -4948,6 +5760,20 @@ const ( MoaFailModeFailFast MoaFailMode = "fail-fast" ) +func (v *MoaFailMode) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return err + } + switch MoaFailMode(s) { + case MoaFailModeBestEffort, MoaFailModeFailFast: + *v = MoaFailMode(s) + return nil + default: + return fmt.Errorf("invalid MoaFailMode: %q", s) + } +} + // MoA configuration, camelCase JSON with every field optional. Unknown keys // are rejected, so aimux 0.5's `fail_mode` is an error naming it rather than // the default policy. @@ -4968,6 +5794,40 @@ type MoaParams struct { StripReferenceTools *bool `json:"stripReferenceTools,omitzero"` } +func (v *MoaParams) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for MoaParams, got null") + } + for key := range raw { + switch key { + case "aggregator", "aggregatorInstructions", "failMode", "modelId", "providerName", "references", "stripReferenceTools": + default: + return fmt.Errorf("unknown field %q in MoaParams", key) + } + } + for _, req := range []string{"aggregator", "references"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in MoaParams", req) + } + } + for _, req := range []string{"aggregator", "references"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in MoaParams must not be null", req) + } + } + type alias MoaParams + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = MoaParams(tmp) + return nil +} + // A single input or output modality. type Modality string @@ -4982,6 +5842,20 @@ const ( ModalityScore Modality = "Score" ) +func (v *Modality) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return err + } + switch Modality(s) { + case ModalityText, ModalityImage, ModalityAudio, ModalityVideo, ModalityPdf, ModalityOther, ModalityEmbedding, ModalityScore: + *v = Modality(s) + return nil + default: + return fmt.Errorf("invalid Modality: %q", s) + } +} + // Model modality supported by a provider package or registry resolution call. type ModalityKind string @@ -4997,6 +5871,20 @@ const ( ModalityKindDecision ModalityKind = "decision" ) +func (v *ModalityKind) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return err + } + switch ModalityKind(s) { + case ModalityKindLanguageModel, ModalityKindEmbeddingModel, ModalityKindImageModel, ModalityKindSpeechModel, ModalityKindTranscriptionModel, ModalityKindRerankingModel, ModalityKindVideoModel, ModalityKindSearchModel, ModalityKindDecision: + *v = ModalityKind(s) + return nil + default: + return fmt.Errorf("invalid ModalityKind: %q", s) + } +} + // Model-level capability flags (more precise than provider-level `supports_*`). type ModelCapabilities struct { // Accepts multimodal attachments (image/audio/pdf input). @@ -5028,6 +5916,20 @@ type ModelInfo struct { type ModelInfoParams struct{} +func (v *ModelInfoParams) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for ModelInfoParams, got null") + } + if len(raw) > 0 { + return fmt.Errorf("unknown field in ModelInfoParams") + } + return nil +} + // Token / request limits for a model. type ModelLimits struct { // Maximum total context window (input + output), in tokens. @@ -5166,6 +6068,20 @@ const ( ModelMethodDecision ModelMethod = "decision" ) +func (v *ModelMethod) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return err + } + switch ModelMethod(s) { + case ModelMethodLanguageModel, ModelMethodChat, ModelMethodResponses, ModelMethodCompletion, ModelMethodMessages, ModelMethodEmbeddingModel, ModelMethodImageModel, ModelMethodSpeechModel, ModelMethodTranscriptionModel, ModelMethodRerankingModel, ModelMethodVideoModel, ModelMethodSearchModel, ModelMethodDecision: + *v = ModelMethod(s) + return nil + default: + return fmt.Errorf("invalid ModelMethod: %q", s) + } +} + // Input/output modality sets. type ModelModalities struct { Input []Modality `json:"input,omitzero"` @@ -5226,10 +6142,78 @@ type ModelRef struct { Namespace string `json:"namespace"` } +func (v *ModelRef) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for ModelRef, got null") + } + for key := range raw { + switch key { + case "key", "method", "modelId", "namespace": + default: + return fmt.Errorf("unknown field %q in ModelRef", key) + } + } + for _, req := range []string{"key", "method", "modelId", "namespace"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in ModelRef", req) + } + } + for _, req := range []string{"key", "method", "modelId", "namespace"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in ModelRef must not be null", req) + } + } + type alias ModelRef + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = ModelRef(tmp) + return nil +} + type ModelResolveParams struct { ModelRef ModelRef `json:"modelRef"` } +func (v *ModelResolveParams) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for ModelResolveParams, got null") + } + for key := range raw { + switch key { + case "modelRef": + default: + return fmt.Errorf("unknown field %q in ModelResolveParams", key) + } + } + for _, req := range []string{"modelRef"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in ModelResolveParams", req) + } + } + for _, req := range []string{"modelRef"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in ModelResolveParams must not be null", req) + } + } + type alias ModelResolveParams + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = ModelResolveParams(tmp) + return nil +} + // The full static portrait for a model, supplemented from community knowledge. // // All fields are advisory — aimux never auto-applies them in the request path. @@ -5264,10 +6248,58 @@ const ( ModelTypeOther ModelType = "Other" ) +func (v *ModelType) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return err + } + switch ModelType(s) { + case ModelTypeChat, ModelTypeCompletion, ModelTypeEmbedding, ModelTypeRerank, ModelTypeImageGen, ModelTypeImageEdit, ModelTypeVideo, ModelTypeAudio, ModelTypeOther: + *v = ModelType(s) + return nil + default: + return fmt.Errorf("invalid ModelType: %q", s) + } +} + type ModelWrapParams struct { Middleware []string `json:"middleware"` } +func (v *ModelWrapParams) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for ModelWrapParams, got null") + } + for key := range raw { + switch key { + case "middleware": + default: + return fmt.Errorf("unknown field %q in ModelWrapParams", key) + } + } + for _, req := range []string{"middleware"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in ModelWrapParams", req) + } + } + for _, req := range []string{"middleware"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in ModelWrapParams must not be null", req) + } + } + type alias ModelWrapParams + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = ModelWrapParams(tmp) + return nil +} + // A `${string}.${string}` identifier, `.`: the V4 // provider tool `id` (`@ai-sdk/provider@4.0.21 // src/language-model/v4/language-model-v4-provider-tool.ts:17`) and custom @@ -5283,6 +6315,40 @@ type OpenAiOutputRequest struct { Result GenerateTextResultInput `json:"result"` } +func (v *OpenAiOutputRequest) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for OpenAiOutputRequest, got null") + } + for key := range raw { + switch key { + case "metadataNamespace", "result": + default: + return fmt.Errorf("unknown field %q in OpenAiOutputRequest", key) + } + } + for _, req := range []string{"metadataNamespace", "result"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in OpenAiOutputRequest", req) + } + } + for _, req := range []string{"metadataNamespace", "result"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in OpenAiOutputRequest must not be null", req) + } + } + type alias OpenAiOutputRequest + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = OpenAiOutputRequest(tmp) + return nil +} + type OpenAiTextRequest struct { Abort *HandleIdInput `json:"abort,omitzero"` Options *Options `json:"options,omitzero"` @@ -5290,6 +6356,40 @@ type OpenAiTextRequest struct { StreamOptions *StreamOptions `json:"streamOptions,omitzero"` } +func (v *OpenAiTextRequest) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for OpenAiTextRequest, got null") + } + for key := range raw { + switch key { + case "abort", "options", "prompt", "streamOptions": + default: + return fmt.Errorf("unknown field %q in OpenAiTextRequest", key) + } + } + for _, req := range []string{"prompt"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in OpenAiTextRequest", req) + } + } + for _, req := range []string{"prompt"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in OpenAiTextRequest must not be null", req) + } + } + type alias OpenAiTextRequest + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = OpenAiTextRequest(tmp) + return nil +} + type OperationCapabilities struct { Cancel bool `json:"cancel"` InputDone bool `json:"inputDone"` @@ -5301,6 +6401,30 @@ type OperationNextParams struct { TimeoutMs *uint64 `json:"timeoutMs,omitzero"` } +func (v *OperationNextParams) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for OperationNextParams, got null") + } + for key := range raw { + switch key { + case "timeoutMs": + default: + return fmt.Errorf("unknown field %q in OperationNextParams", key) + } + } + type alias OperationNextParams + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = OperationNextParams(tmp) + return nil +} + type OperationOutcome string const ( @@ -5309,6 +6433,20 @@ const ( OperationOutcomeCancelled OperationOutcome = "cancelled" ) +func (v *OperationOutcome) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return err + } + switch OperationOutcome(s) { + case OperationOutcomeSuccess, OperationOutcomeError, OperationOutcomeCancelled: + *v = OperationOutcome(s) + return nil + default: + return fmt.Errorf("invalid OperationOutcome: %q", s) + } +} + type OperationPollResultVariant interface{ isOperationPollResult() } type OperationPollResult struct { Value OperationPollResultVariant @@ -5397,6 +6535,20 @@ const ( OperationStateTerminal OperationState = "terminal" ) +func (v *OperationState) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return err + } + switch OperationState(s) { + case OperationStateRunning, OperationStateInputClosed, OperationStateTerminal: + *v = OperationState(s) + return nil + default: + return fmt.Errorf("invalid OperationState: %q", s) + } +} + type OperationStatus struct { Capabilities OperationCapabilities `json:"capabilities"` CleanupFailure *string `json:"cleanupFailure,omitzero"` @@ -5463,6 +6615,30 @@ type Options struct { TopP *float64 `json:"topP,omitzero"` } +func (v *Options) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for Options, got null") + } + for key := range raw { + switch key { + case "frequencyPenalty", "headers", "includeRawChunks", "instructions", "maxOutputTokens", "maxRetries", "output", "presencePenalty", "providerOptions", "reasoning", "seed", "sessionId", "stopSequences", "strictStream", "temperature", "timeout", "toolChoice", "tools", "topK", "topP": + default: + return fmt.Errorf("unknown field %q in Options", key) + } + } + type alias Options + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = Options(tmp) + return nil +} + type Outcome string const ( @@ -5471,6 +6647,20 @@ const ( OutcomeCancelled Outcome = "cancelled" ) +func (v *Outcome) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return err + } + switch Outcome(s) { + case OutcomeSuccess, OutcomeError, OutcomeCancelled: + *v = Outcome(s) + return nil + default: + return fmt.Errorf("invalid Outcome: %q", s) + } +} + // 最终结果摘要。 type OutcomeRecord struct { // The result `decide` returned (`DecideResult`), independent of a @@ -5497,10 +6687,24 @@ const ( OutcomeStatusCancelled OutcomeStatus = "cancelled" ) -// What the final text of a generation is parsed into. -// -// Upstream's `Output` is a JavaScript object with functions and has no JSON -// form; aimux's JSON follows the public JSON rules: tagged by `type` with the +func (v *OutcomeStatus) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return err + } + switch OutcomeStatus(s) { + case OutcomeStatusSuccess, OutcomeStatusPending, OutcomeStatusError, OutcomeStatusIncomplete, OutcomeStatusCancelled: + *v = OutcomeStatus(s) + return nil + default: + return fmt.Errorf("invalid OutcomeStatus: %q", s) + } +} + +// What the final text of a generation is parsed into. +// +// Upstream's `Output` is a JavaScript object with functions and has no JSON +// form; aimux's JSON follows the public JSON rules: tagged by `type` with the // output kind (upstream's mode `name`, `output.ts:68`, `:114`, `:241`, `:520`, `:657`; // the field `name` stays the schema name), and the arguments of // `Output.object()` / `array()` / `choice()` / `json()` camelCase @@ -5675,6 +6879,20 @@ const ( PackageAuthKindNone PackageAuthKind = "none" ) +func (v *PackageAuthKind) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return err + } + switch PackageAuthKind(s) { + case PackageAuthKindBearer, PackageAuthKindHeader, PackageAuthKindQueryParam, PackageAuthKindBasic, PackageAuthKindAwsSigV4, PackageAuthKindAwsBearerOrSigV4, PackageAuthKindAnthropicAws, PackageAuthKindGoogleVertex, PackageAuthKindAzureApiKeyOrToken, PackageAuthKindCodexChannel, PackageAuthKindOptionalBearer, PackageAuthKindNone: + *v = PackageAuthKind(s) + return nil + default: + return fmt.Errorf("invalid PackageAuthKind: %q", s) + } +} + // Secret-free static metadata describing a provider package. type PackageDescriptor struct { APIKeyEnv *string `json:"apiKeyEnv,omitzero"` @@ -5694,6 +6912,40 @@ type PackageDescriptor struct { TemplateParams []TemplateParamDescriptor `json:"templateParams"` } +func (v *PackageDescriptor) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for PackageDescriptor, got null") + } + for key := range raw { + switch key { + case "apiKeyEnv", "authKind", "baseUrlEnv", "defaultBaseUrl", "defaultMethod", "id", "kind", "languageApis", "modalities", "settings", "supportsDefaultInstance", "supportsDiscovery", "supportsFiles", "supportsSkills", "templateParams": + default: + return fmt.Errorf("unknown field %q in PackageDescriptor", key) + } + } + for _, req := range []string{"authKind", "id", "kind", "languageApis", "modalities", "settings", "supportsDefaultInstance", "supportsDiscovery", "supportsFiles", "supportsSkills", "templateParams"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in PackageDescriptor", req) + } + } + for _, req := range []string{"authKind", "id", "kind", "languageApis", "modalities", "settings", "supportsDefaultInstance", "supportsDiscovery", "supportsFiles", "supportsSkills", "templateParams"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in PackageDescriptor must not be null", req) + } + } + type alias PackageDescriptor + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = PackageDescriptor(tmp) + return nil +} + // Architectural category of a provider package. type PackageKind string @@ -5704,6 +6956,20 @@ const ( PackageKindSpecialized PackageKind = "specialized" ) +func (v *PackageKind) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return err + } + switch PackageKind(s) { + case PackageKindNative, PackageKindProtocol, PackageKindPreset, PackageKindSpecialized: + *v = PackageKind(s) + return nil + default: + return fmt.Errorf("invalid PackageKind: %q", s) + } +} + // A prefix break between two consecutive records of a session. type PrefixBreak struct { AtRecordID string `json:"atRecordId"` @@ -5723,6 +6989,40 @@ type ProviderConfigDocument struct { Providers map[string]ProviderEntrySpec `json:"providers"` } +func (v *ProviderConfigDocument) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for ProviderConfigDocument, got null") + } + for key := range raw { + switch key { + case "providers": + default: + return fmt.Errorf("unknown field %q in ProviderConfigDocument", key) + } + } + for _, req := range []string{"providers"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in ProviderConfigDocument", req) + } + } + for _, req := range []string{"providers"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in ProviderConfigDocument must not be null", req) + } + } + type alias ProviderConfigDocument + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = ProviderConfigDocument(tmp) + return nil +} + // Secret-safe declarative settings shared across provider packages. type ProviderConfigSettings struct { AccessKeyID *StringOrEnv `json:"accessKeyId,omitzero"` @@ -5757,6 +7057,30 @@ type ProviderConfigSettings struct { WorkspaceID *string `json:"workspaceId,omitzero"` } +func (v *ProviderConfigSettings) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for ProviderConfigSettings, got null") + } + for key := range raw { + switch key { + case "accessKeyId", "accessToken", "apiKey", "apiVersion", "authToken", "baseUrl", "codexMode", "cx", "endpoint", "headers", "includeUsage", "location", "login", "name", "organization", "originator", "params", "password", "probabilitySource", "project", "queryParams", "region", "resourceName", "secretAccessKey", "sessionToken", "speechBaseUrl", "supportsMultiPartToolContent", "supportsStructuredOutputs", "useDeploymentBasedUrls", "workspaceId": + default: + return fmt.Errorf("unknown field %q in ProviderConfigSettings", key) + } + } + type alias ProviderConfigSettings + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = ProviderConfigSettings(tmp) + return nil +} + // Trusted-caller operation: constructs a provider handle from package settings // and optional `{ "env": ... }` references. Untrusted callers must not be // permitted to supply arbitrary `baseUrl` values with omitted credentials. @@ -5770,6 +7094,40 @@ type ProviderCreateParams struct { Settings *ProviderSettings `json:"settings,omitzero"` } +func (v *ProviderCreateParams) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for ProviderCreateParams, got null") + } + for key := range raw { + switch key { + case "envAllowlist", "package", "settings": + default: + return fmt.Errorf("unknown field %q in ProviderCreateParams", key) + } + } + for _, req := range []string{"package"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in ProviderCreateParams", req) + } + } + for _, req := range []string{"package"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in ProviderCreateParams must not be null", req) + } + } + type alias ProviderCreateParams + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = ProviderCreateParams(tmp) + return nil +} + type ProviderCustomParams struct { ChatModels map[string]HandleIdInput `json:"chatModels,omitzero"` CompletionModels map[string]HandleIdInput `json:"completionModels,omitzero"` @@ -5791,30 +7149,214 @@ type ProviderCustomParams struct { VideoModels map[string]HandleIdInput `json:"videoModels,omitzero"` } +func (v *ProviderCustomParams) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for ProviderCustomParams, got null") + } + for key := range raw { + switch key { + case "chatModels", "completionModels", "decisionModels", "defaultMethod", "embeddingModels", "fallbackProvider", "files", "imageModelMiddleware", "imageModels", "languageModelMiddleware", "languageModels", "messagesModels", "rerankingModels", "responsesModels", "searchModels", "speechModels", "transcriptionModels", "videoModels": + default: + return fmt.Errorf("unknown field %q in ProviderCustomParams", key) + } + } + type alias ProviderCustomParams + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = ProviderCustomParams(tmp) + return nil +} + type ProviderDefaultParams struct { Package string `json:"package"` } +func (v *ProviderDefaultParams) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for ProviderDefaultParams, got null") + } + for key := range raw { + switch key { + case "package": + default: + return fmt.Errorf("unknown field %q in ProviderDefaultParams", key) + } + } + for _, req := range []string{"package"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in ProviderDefaultParams", req) + } + } + for _, req := range []string{"package"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in ProviderDefaultParams must not be null", req) + } + } + type alias ProviderDefaultParams + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = ProviderDefaultParams(tmp) + return nil +} + type ProviderDescriptorsParams struct { Package *string `json:"package,omitzero"` } +func (v *ProviderDescriptorsParams) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for ProviderDescriptorsParams, got null") + } + for key := range raw { + switch key { + case "package": + default: + return fmt.Errorf("unknown field %q in ProviderDescriptorsParams", key) + } + } + type alias ProviderDescriptorsParams + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = ProviderDescriptorsParams(tmp) + return nil +} + // Configuration for a single provider entry (`package` + typed `settings`). type ProviderEntrySpec struct { Package string `json:"package"` Settings *ProviderConfigSettings `json:"settings,omitzero"` } +func (v *ProviderEntrySpec) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for ProviderEntrySpec, got null") + } + for key := range raw { + switch key { + case "package", "settings": + default: + return fmt.Errorf("unknown field %q in ProviderEntrySpec", key) + } + } + for _, req := range []string{"package"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in ProviderEntrySpec", req) + } + } + for _, req := range []string{"package"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in ProviderEntrySpec must not be null", req) + } + } + type alias ProviderEntrySpec + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = ProviderEntrySpec(tmp) + return nil +} + type ProviderInvokeParams struct { Abort *HandleIdInput `json:"abort,omitzero"` Method string `json:"method"` } +func (v *ProviderInvokeParams) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for ProviderInvokeParams, got null") + } + for key := range raw { + switch key { + case "abort", "method": + default: + return fmt.Errorf("unknown field %q in ProviderInvokeParams", key) + } + } + for _, req := range []string{"method"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in ProviderInvokeParams", req) + } + } + for _, req := range []string{"method"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in ProviderInvokeParams must not be null", req) + } + } + type alias ProviderInvokeParams + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = ProviderInvokeParams(tmp) + return nil +} + type ProviderModelParams struct { Method *string `json:"method,omitzero"` ModelID string `json:"modelId"` } +func (v *ProviderModelParams) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for ProviderModelParams, got null") + } + for key := range raw { + switch key { + case "method", "modelId": + default: + return fmt.Errorf("unknown field %q in ProviderModelParams", key) + } + } + for _, req := range []string{"modelId"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in ProviderModelParams", req) + } + } + for _, req := range []string{"modelId"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in ProviderModelParams must not be null", req) + } + } + type alias ProviderModelParams + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = ProviderModelParams(tmp) + return nil +} + // ② 配置侧:provider 身份(请求回放重建用)。 // // 只记身份,不记配置:回放时按 `provider_id` + `model_id` 重新构建 model, @@ -5866,6 +7408,30 @@ type ProviderSettings struct { WorkspaceID *string `json:"workspaceId,omitzero"` } +func (v *ProviderSettings) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for ProviderSettings, got null") + } + for key := range raw { + switch key { + case "accessKeyId", "accessToken", "apiKey", "apiVersion", "authToken", "baseUrl", "codexMode", "credentialResolver", "cx", "endpoint", "fetch", "headers", "includeUsage", "location", "login", "name", "organization", "originator", "params", "password", "probabilitySource", "project", "queryParams", "region", "resourceName", "secretAccessKey", "sessionToken", "speechBaseUrl", "supportsMultiPartToolContent", "supportsStructuredOutputs", "useDeploymentBasedUrls", "webSocket", "workspaceId": + default: + return fmt.Errorf("unknown field %q in ProviderSettings", key) + } + } + type alias ProviderSettings + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = ProviderSettings(tmp) + return nil +} + // A provider-defined tool (e.g. `anthropic.web_search_20250305`, // `google.googleSearch`). Mirrors the V4 `LanguageModelV4ProviderTool` // (`@ai-sdk/provider@4.0.21 @@ -5895,6 +7461,30 @@ type ProviderWrapParams struct { LanguageModelMiddleware []HandleIdInput `json:"languageModelMiddleware,omitzero"` } +func (v *ProviderWrapParams) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for ProviderWrapParams, got null") + } + for key := range raw { + switch key { + case "imageModelMiddleware", "languageModelMiddleware": + default: + return fmt.Errorf("unknown field %q in ProviderWrapParams", key) + } + } + type alias ProviderWrapParams + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = ProviderWrapParams(tmp) + return nil +} + // Provider approval request for a provider-executed call. type RawToolApprovalRequest struct { ApprovalID string `json:"approvalId"` @@ -5931,6 +7521,20 @@ const ( ReasoningEffortXhigh ReasoningEffort = "xhigh" ) +func (v *ReasoningEffort) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return err + } + switch ReasoningEffort(s) { + case ReasoningEffortProviderDefault, ReasoningEffortNone, ReasoningEffortMinimal, ReasoningEffortLow, ReasoningEffortMedium, ReasoningEffortHigh, ReasoningEffortXhigh: + *v = ReasoningEffort(s) + return nil + default: + return fmt.Errorf("invalid ReasoningEffort: %q", s) + } +} + // A file generated as part of reasoning. type ReasoningFilePart struct { Data GeneratedFileData `json:"data"` @@ -5998,6 +7602,20 @@ const ( ReasoningModeToggle ReasoningMode = "Toggle" ) +func (v *ReasoningMode) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return err + } + switch ReasoningMode(s) { + case ReasoningModeOther, ReasoningModeBudget, ReasoningModeEffort, ReasoningModeLevel, ReasoningModeFixed, ReasoningModeMixed, ReasoningModeToggle: + *v = ReasoningMode(s) + return nil + default: + return fmt.Errorf("invalid ReasoningMode: %q", s) + } +} + // A reasoning / thinking segment produced by the model. Mirrors the Vercel AI // SDK `reasoning` content type; `provider_metadata` carries provider-specific // data such as the Anthropic thinking-block signature @@ -6106,6 +7724,20 @@ const ( ReasoningVisibilityOther ReasoningVisibility = "Other" ) +func (v *ReasoningVisibility) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return err + } + switch ReasoningVisibility(s) { + case ReasoningVisibilityHidden, ReasoningVisibilitySummary, ReasoningVisibilityFull, ReasoningVisibilityMixed, ReasoningVisibilityOmitted, ReasoningVisibilityOther: + *v = ReasoningVisibility(s) + return nil + default: + return fmt.Errorf("invalid ReasoningVisibility: %q", s) + } +} + type RecorderExport struct { Jsonl string `json:"jsonl"` } @@ -6228,17 +7860,99 @@ const ( RecordingOperationDecision RecordingOperation = "decision" ) +func (v *RecordingOperation) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return err + } + switch RecordingOperation(s) { + case RecordingOperationLanguageModel, RecordingOperationDecision: + *v = RecordingOperation(s) + return nil + default: + return fmt.Errorf("invalid RecordingOperation: %q", s) + } +} + type RegistryCreateParams struct { Entries []RegistryEntry `json:"entries"` Namespace *string `json:"namespace,omitzero"` Separator *string `json:"separator,omitzero"` } +func (v *RegistryCreateParams) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for RegistryCreateParams, got null") + } + for key := range raw { + switch key { + case "entries", "namespace", "separator": + default: + return fmt.Errorf("unknown field %q in RegistryCreateParams", key) + } + } + for _, req := range []string{"entries"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in RegistryCreateParams", req) + } + } + for _, req := range []string{"entries"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in RegistryCreateParams must not be null", req) + } + } + type alias RegistryCreateParams + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = RegistryCreateParams(tmp) + return nil +} + type RegistryEntry struct { Key string `json:"key"` Provider string `json:"provider"` } +func (v *RegistryEntry) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for RegistryEntry, got null") + } + for key := range raw { + switch key { + case "key", "provider": + default: + return fmt.Errorf("unknown field %q in RegistryEntry", key) + } + } + for _, req := range []string{"key", "provider"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in RegistryEntry", req) + } + } + for _, req := range []string{"key", "provider"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in RegistryEntry must not be null", req) + } + } + type alias RegistryEntry + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = RegistryEntry(tmp) + return nil +} + // Trusted-caller operation: constructs a provider registry from a declarative // configuration document and optional `{ "env": ... }` references. Untrusted // callers must not be permitted to supply arbitrary `baseUrl` values with @@ -6254,8 +7968,56 @@ type RegistryFromConfigParams struct { Separator *string `json:"separator,omitzero"` } +func (v *RegistryFromConfigParams) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for RegistryFromConfigParams, got null") + } + for key := range raw { + switch key { + case "config", "envAllowlist", "namespace", "separator": + default: + return fmt.Errorf("unknown field %q in RegistryFromConfigParams", key) + } + } + for _, req := range []string{"config"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in RegistryFromConfigParams", req) + } + } + for _, req := range []string{"config"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in RegistryFromConfigParams must not be null", req) + } + } + type alias RegistryFromConfigParams + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = RegistryFromConfigParams(tmp) + return nil +} + type RegistryListParams struct{} +func (v *RegistryListParams) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for RegistryListParams, got null") + } + if len(raw) > 0 { + return fmt.Errorf("unknown field in RegistryListParams") + } + return nil +} + type RegistryListResult struct { Keys []string `json:"keys"` Namespace string `json:"namespace"` @@ -6266,6 +8028,40 @@ type RegistryProviderParams struct { Key string `json:"key"` } +func (v *RegistryProviderParams) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for RegistryProviderParams, got null") + } + for key := range raw { + switch key { + case "key": + default: + return fmt.Errorf("unknown field %q in RegistryProviderParams", key) + } + } + for _, req := range []string{"key"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in RegistryProviderParams", req) + } + } + for _, req := range []string{"key"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in RegistryProviderParams must not be null", req) + } + } + type alias RegistryProviderParams + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = RegistryProviderParams(tmp) + return nil +} + type RegistryUpdateParams struct { Derive *bool `json:"derive,omitzero"` Remove []string `json:"remove,omitzero"` @@ -6273,6 +8069,30 @@ type RegistryUpdateParams struct { Set []RegistryEntry `json:"set,omitzero"` } +func (v *RegistryUpdateParams) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for RegistryUpdateParams, got null") + } + for key := range raw { + switch key { + case "derive", "remove", "replace", "set": + default: + return fmt.Errorf("unknown field %q in RegistryUpdateParams", key) + } + } + type alias RegistryUpdateParams + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = RegistryUpdateParams(tmp) + return nil +} + type RegistryUpdateResult struct { Handle *HandleID `json:"handle,omitzero"` Keys []string `json:"keys"` @@ -6295,6 +8115,40 @@ type ReplayCreateParams struct { RecordingsJsonl string `json:"recordingsJsonl"` } +func (v *ReplayCreateParams) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for ReplayCreateParams, got null") + } + for key := range raw { + switch key { + case "recordingsJsonl": + default: + return fmt.Errorf("unknown field %q in ReplayCreateParams", key) + } + } + for _, req := range []string{"recordingsJsonl"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in ReplayCreateParams", req) + } + } + for _, req := range []string{"recordingsJsonl"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in ReplayCreateParams must not be null", req) + } + } + type alias ReplayCreateParams + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = ReplayCreateParams(tmp) + return nil +} + type ReplayInspection struct { Recordings []ReplayRecordingInfo `json:"recordings"` } @@ -6305,6 +8159,40 @@ type ReplayLiveParams struct { Target LiveTarget `json:"target"` } +func (v *ReplayLiveParams) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for ReplayLiveParams, got null") + } + for key := range raw { + switch key { + case "abort", "callId", "target": + default: + return fmt.Errorf("unknown field %q in ReplayLiveParams", key) + } + } + for _, req := range []string{"callId", "target"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in ReplayLiveParams", req) + } + } + for _, req := range []string{"callId", "target"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in ReplayLiveParams must not be null", req) + } + } + type alias ReplayLiveParams + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = ReplayLiveParams(tmp) + return nil +} + type ReplayLiveResultVariant interface{ isReplayLiveResult() } type ReplayLiveResult struct { Value ReplayLiveResultVariant @@ -6409,6 +8297,40 @@ type RerankingCallOptions struct { TopN *uint32 `json:"topN,omitzero"` } +func (v *RerankingCallOptions) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for RerankingCallOptions, got null") + } + for key := range raw { + switch key { + case "documents", "headers", "maxRetries", "providerOptions", "query", "timeout", "topN": + default: + return fmt.Errorf("unknown field %q in RerankingCallOptions", key) + } + } + for _, req := range []string{"documents", "query"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in RerankingCallOptions", req) + } + } + for _, req := range []string{"documents", "query"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in RerankingCallOptions must not be null", req) + } + } + type alias RerankingCallOptions + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = RerankingCallOptions(tmp) + return nil +} + // Documents to rerank: either a list of texts or a list of JSON objects. // // Aligned with V4 `RerankingModelV4CallOptions.documents`. @@ -6563,6 +8485,20 @@ const ( RetryErrorReasonErrorNotRetryable RetryErrorReason = "errorNotRetryable" ) +func (v *RetryErrorReason) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return err + } + switch RetryErrorReason(s) { + case RetryErrorReasonMaxRetriesExceeded, RetryErrorReasonErrorNotRetryable: + *v = RetryErrorReason(s) + return nil + default: + return fmt.Errorf("invalid RetryErrorReason: %q", s) + } +} + type RouterParams struct { Children []string `json:"children"` Fallback *Fallback `json:"fallback,omitzero"` @@ -6571,13 +8507,85 @@ type RouterParams struct { Strategy Strategy `json:"strategy"` } +func (v *RouterParams) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for RouterParams, got null") + } + for key := range raw { + switch key { + case "children", "fallback", "modelId", "providerName", "strategy": + default: + return fmt.Errorf("unknown field %q in RouterParams", key) + } + } + for _, req := range []string{"children", "strategy"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in RouterParams", req) + } + } + for _, req := range []string{"children", "strategy"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in RouterParams must not be null", req) + } + } + type alias RouterParams + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = RouterParams(tmp) + return nil +} + type RuntimeConfigureParams struct { Logging *LoggingConfig `json:"logging,omitzero"` Proxy *TransportProxy `json:"proxy,omitzero"` } +func (v *RuntimeConfigureParams) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for RuntimeConfigureParams, got null") + } + for key := range raw { + switch key { + case "logging", "proxy": + default: + return fmt.Errorf("unknown field %q in RuntimeConfigureParams", key) + } + } + type alias RuntimeConfigureParams + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = RuntimeConfigureParams(tmp) + return nil +} + type RuntimeDescribeParams struct{} +func (v *RuntimeDescribeParams) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for RuntimeDescribeParams, got null") + } + if len(raw) > 0 { + return fmt.Errorf("unknown field in RuntimeDescribeParams") + } + return nil +} + // A model entry returned by a provider's `/models` endpoint (the sparse, // account-level truth of "what this key can call"). // @@ -6629,6 +8637,40 @@ type SearchCallOptions struct { Timeout *TimeoutConfiguration `json:"timeout,omitzero"` } +func (v *SearchCallOptions) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for SearchCallOptions, got null") + } + for key := range raw { + switch key { + case "excludeDomains", "headers", "includeDomains", "includeRawContent", "maxResults", "maxRetries", "providerOptions", "query", "timeRange", "timeout": + default: + return fmt.Errorf("unknown field %q in SearchCallOptions", key) + } + } + for _, req := range []string{"query"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in SearchCallOptions", req) + } + } + for _, req := range []string{"query"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in SearchCallOptions must not be null", req) + } + } + type alias SearchCallOptions + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = SearchCallOptions(tmp) + return nil +} + // Optional response information for a search call. type SearchResponse struct { // The response body (opaque JSON). @@ -6698,6 +8740,20 @@ const ( SessionSourceInferred SessionSource = "Inferred" ) +func (v *SessionSource) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return err + } + switch SessionSource(s) { + case SessionSourceExplicit, SessionSourceInferred: + *v = SessionSource(s) + return nil + default: + return fmt.Errorf("invalid SessionSource: %q", s) + } +} + // One step of a session's cache-hit trajectory (RFC-0024 §4.3). type SessionStepStat struct { // The call's id (association key into Recording / replay, RFC-0023). @@ -6717,10 +8773,78 @@ type SessionStoreCallsParams struct { SessionID string `json:"sessionId"` } +func (v *SessionStoreCallsParams) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for SessionStoreCallsParams, got null") + } + for key := range raw { + switch key { + case "sessionId": + default: + return fmt.Errorf("unknown field %q in SessionStoreCallsParams", key) + } + } + for _, req := range []string{"sessionId"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in SessionStoreCallsParams", req) + } + } + for _, req := range []string{"sessionId"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in SessionStoreCallsParams must not be null", req) + } + } + type alias SessionStoreCallsParams + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = SessionStoreCallsParams(tmp) + return nil +} + type SessionStoreCreateParams struct { Infer bool `json:"infer"` } +func (v *SessionStoreCreateParams) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for SessionStoreCreateParams, got null") + } + for key := range raw { + switch key { + case "infer": + default: + return fmt.Errorf("unknown field %q in SessionStoreCreateParams", key) + } + } + for _, req := range []string{"infer"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in SessionStoreCreateParams", req) + } + } + for _, req := range []string{"infer"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in SessionStoreCreateParams must not be null", req) + } + } + type alias SessionStoreCreateParams + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = SessionStoreCreateParams(tmp) + return nil +} + type SessionStoreHandle struct { Handle HandleID `json:"handle"` } @@ -6746,6 +8870,20 @@ const ( SettingFieldKindCodexMode SettingFieldKind = "codexMode" ) +func (v *SettingFieldKind) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return err + } + switch SettingFieldKind(s) { + case SettingFieldKindString, SettingFieldKindCredential, SettingFieldKindBoolean, SettingFieldKindHeaderMap, SettingFieldKindStringMap, SettingFieldKindCodexMode: + *v = SettingFieldKind(s) + return nil + default: + return fmt.Errorf("invalid SettingFieldKind: %q", s) + } +} + // Static description of one setting accepted when constructing a provider package. type SettingFieldSpec struct { Credential bool `json:"credential"` @@ -6755,6 +8893,40 @@ type SettingFieldSpec struct { Required bool `json:"required"` } +func (v *SettingFieldSpec) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for SettingFieldSpec, got null") + } + for key := range raw { + switch key { + case "credential", "envVar", "kind", "name", "required": + default: + return fmt.Errorf("unknown field %q in SettingFieldSpec", key) + } + } + for _, req := range []string{"credential", "kind", "name", "required"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in SettingFieldSpec", req) + } + } + for _, req := range []string{"credential", "kind", "name", "required"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in SettingFieldSpec must not be null", req) + } + } + type alias SettingFieldSpec + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = SettingFieldSpec(tmp) + return nil +} + // Image/video size in `{width}x{height}` format (e.g. `"1024x1024"`). // // Newtype that enforces the `WxH` format used by V4 image `size` and video @@ -6877,6 +9049,40 @@ type SpeechCallOptions struct { Voice *string `json:"voice,omitzero"` } +func (v *SpeechCallOptions) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for SpeechCallOptions, got null") + } + for key := range raw { + switch key { + case "headers", "instructions", "language", "maxRetries", "outputFormat", "providerOptions", "speed", "text", "timeout", "voice": + default: + return fmt.Errorf("unknown field %q in SpeechCallOptions", key) + } + } + for _, req := range []string{"text"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in SpeechCallOptions", req) + } + } + for _, req := range []string{"text"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in SpeechCallOptions must not be null", req) + } + } + type alias SpeechCallOptions + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = SpeechCallOptions(tmp) + return nil +} + // Optional request information for a speech call. type SpeechRequest struct { // Response body (HTTP providers only). @@ -7116,6 +9322,24 @@ func (v *Strategy) UnmarshalJSON(data []byte) error { type StrategyVariantRule struct{} +func (v *StrategyVariantRule) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for StrategyVariantRule, got null") + } + for key := range raw { + switch key { + case "type": + default: + return fmt.Errorf("unknown field %q in StrategyVariantRule", key) + } + } + return nil +} + func (StrategyVariantRule) isStrategy() {} func (v StrategyVariantRule) MarshalJSON() ([]byte, error) { @@ -7130,6 +9354,40 @@ type StrategyVariantWeighted struct { Weights []float64 `json:"weights"` } +func (v *StrategyVariantWeighted) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for StrategyVariantWeighted, got null") + } + for key := range raw { + switch key { + case "weights", "type": + default: + return fmt.Errorf("unknown field %q in StrategyVariantWeighted", key) + } + } + for _, req := range []string{"weights"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in StrategyVariantWeighted", req) + } + } + for _, req := range []string{"weights"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in StrategyVariantWeighted must not be null", req) + } + } + type alias StrategyVariantWeighted + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = StrategyVariantWeighted(tmp) + return nil +} + func (StrategyVariantWeighted) isStrategy() {} func (v StrategyVariantWeighted) MarshalJSON() ([]byte, error) { @@ -7225,6 +9483,40 @@ type StreamFrameVariantEvent struct { Seq Uint64String `json:"seq"` } +func (v *StreamFrameVariantEvent) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for StreamFrameVariantEvent, got null") + } + for key := range raw { + switch key { + case "event", "seq", "type": + default: + return fmt.Errorf("unknown field %q in StreamFrameVariantEvent", key) + } + } + for _, req := range []string{"event", "seq"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in StreamFrameVariantEvent", req) + } + } + for _, req := range []string{"event", "seq"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in StreamFrameVariantEvent must not be null", req) + } + } + type alias StreamFrameVariantEvent + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = StreamFrameVariantEvent(tmp) + return nil +} + func (StreamFrameVariantEvent) isStreamFrame() {} func (v StreamFrameVariantEvent) MarshalJSON() ([]byte, error) { @@ -7241,6 +9533,40 @@ type StreamFrameVariantEnd struct { Seq Uint64String `json:"seq"` } +func (v *StreamFrameVariantEnd) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for StreamFrameVariantEnd, got null") + } + for key := range raw { + switch key { + case "error", "outcome", "seq", "type": + default: + return fmt.Errorf("unknown field %q in StreamFrameVariantEnd", key) + } + } + for _, req := range []string{"outcome", "seq"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in StreamFrameVariantEnd", req) + } + } + for _, req := range []string{"outcome", "seq"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in StreamFrameVariantEnd must not be null", req) + } + } + type alias StreamFrameVariantEnd + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = StreamFrameVariantEnd(tmp) + return nil +} + func (StreamFrameVariantEnd) isStreamFrame() {} func (v StreamFrameVariantEnd) MarshalJSON() ([]byte, error) { @@ -7256,6 +9582,30 @@ type StreamOptions struct { IncludeUsage *bool `json:"includeUsage,omitzero"` } +func (v *StreamOptions) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for StreamOptions, got null") + } + for key := range raw { + switch key { + case "includeReasoning", "includeUsage": + default: + return fmt.Errorf("unknown field %q in StreamOptions", key) + } + } + type alias StreamOptions + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = StreamOptions(tmp) + return nil +} + // Configuration string accepting either a literal secret/value or an `{ "env": "VAR" }` reference. type StringOrEnvVariant interface{ isStringOrEnv() } type StringOrEnv struct { @@ -7339,6 +9689,40 @@ type TemplateParamDescriptor struct { Name string `json:"name"` } +func (v *TemplateParamDescriptor) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for TemplateParamDescriptor, got null") + } + for key := range raw { + switch key { + case "envVar", "name": + default: + return fmt.Errorf("unknown field %q in TemplateParamDescriptor", key) + } + } + for _, req := range []string{"envVar", "name"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in TemplateParamDescriptor", req) + } + } + for _, req := range []string{"envVar", "name"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in TemplateParamDescriptor must not be null", req) + } + } + type alias TemplateParamDescriptor + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = TemplateParamDescriptor(tmp) + return nil +} + type TerminalSummary struct { Error *ErrorEnvelope `json:"error,omitzero"` Outcome OperationOutcome `json:"outcome"` @@ -7356,6 +9740,40 @@ type TextRequest struct { Prompt ModelPrompt `json:"prompt"` } +func (v *TextRequest) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for TextRequest, got null") + } + for key := range raw { + switch key { + case "abort", "options", "prompt": + default: + return fmt.Errorf("unknown field %q in TextRequest", key) + } + } + for _, req := range []string{"prompt"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in TextRequest", req) + } + } + for _, req := range []string{"prompt"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in TextRequest must not be null", req) + } + } + type alias TextRequest + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = TextRequest(tmp) + return nil +} + // A public call-layer stream chunk: the AI SDK's `TextStreamPart` // (ai@7.0.127 `generate-text/stream-text-result.ts:581-607`). // @@ -8093,6 +10511,30 @@ type TimeoutConfiguration struct { TotalMs *uint64 `json:"totalMs,omitzero"` } +func (v *TimeoutConfiguration) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for TimeoutConfiguration, got null") + } + for key := range raw { + switch key { + case "chunkMs", "firstChunkMs", "stepMs", "totalMs": + default: + return fmt.Errorf("unknown field %q in TimeoutConfiguration", key) + } + } + type alias TimeoutConfiguration + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = TimeoutConfiguration(tmp) + return nil +} + // A point in time: a `Date` in the AI SDK, whose JSON is // `Date.prototype.toISOString()` (`2024-03-01T12:00:00.000Z`). // @@ -8363,6 +10805,40 @@ type ToolCallRepairReplyVariantRepaired struct { ToolCall RepairedToolCall `json:"toolCall"` } +func (v *ToolCallRepairReplyVariantRepaired) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for ToolCallRepairReplyVariantRepaired, got null") + } + for key := range raw { + switch key { + case "toolCall", "type": + default: + return fmt.Errorf("unknown field %q in ToolCallRepairReplyVariantRepaired", key) + } + } + for _, req := range []string{"toolCall"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in ToolCallRepairReplyVariantRepaired", req) + } + } + for _, req := range []string{"toolCall"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in ToolCallRepairReplyVariantRepaired must not be null", req) + } + } + type alias ToolCallRepairReplyVariantRepaired + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = ToolCallRepairReplyVariantRepaired(tmp) + return nil +} + func (ToolCallRepairReplyVariantRepaired) isToolCallRepairReply() {} func (v ToolCallRepairReplyVariantRepaired) MarshalJSON() ([]byte, error) { @@ -8375,6 +10851,24 @@ func (v ToolCallRepairReplyVariantRepaired) MarshalJSON() ([]byte, error) { type ToolCallRepairReplyVariantUnchanged struct{} +func (v *ToolCallRepairReplyVariantUnchanged) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for ToolCallRepairReplyVariantUnchanged, got null") + } + for key := range raw { + switch key { + case "type": + default: + return fmt.Errorf("unknown field %q in ToolCallRepairReplyVariantUnchanged", key) + } + } + return nil +} + func (ToolCallRepairReplyVariantUnchanged) isToolCallRepairReply() {} func (v ToolCallRepairReplyVariantUnchanged) MarshalJSON() ([]byte, error) { @@ -8389,6 +10883,40 @@ type ToolCallRepairReplyVariantFailed struct { Message string `json:"message"` } +func (v *ToolCallRepairReplyVariantFailed) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for ToolCallRepairReplyVariantFailed, got null") + } + for key := range raw { + switch key { + case "message", "type": + default: + return fmt.Errorf("unknown field %q in ToolCallRepairReplyVariantFailed", key) + } + } + for _, req := range []string{"message"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in ToolCallRepairReplyVariantFailed", req) + } + } + for _, req := range []string{"message"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in ToolCallRepairReplyVariantFailed must not be null", req) + } + } + type alias ToolCallRepairReplyVariantFailed + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = ToolCallRepairReplyVariantFailed(tmp) + return nil +} + func (ToolCallRepairReplyVariantFailed) isToolCallRepairReply() {} func (v ToolCallRepairReplyVariantFailed) MarshalJSON() ([]byte, error) { @@ -8462,6 +10990,20 @@ const ( ToolChoiceModeRequired ToolChoiceMode = "required" ) +func (v *ToolChoiceMode) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return err + } + switch ToolChoiceMode(s) { + case ToolChoiceModeAuto, ToolChoiceModeNone, ToolChoiceModeRequired: + *v = ToolChoiceMode(s) + return nil + default: + return fmt.Errorf("invalid ToolChoiceMode: %q", s) + } +} + // The named-tool form of a user's tool choice. type ToolChoiceTool struct { ToolName string `json:"toolName"` @@ -8644,6 +11186,40 @@ type ToolRepairApplyRequest struct { ToolCall ToolCallInput `json:"toolCall"` } +func (v *ToolRepairApplyRequest) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for ToolRepairApplyRequest, got null") + } + for key := range raw { + switch key { + case "options", "reply", "toolCall": + default: + return fmt.Errorf("unknown field %q in ToolRepairApplyRequest", key) + } + } + for _, req := range []string{"reply", "toolCall"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in ToolRepairApplyRequest", req) + } + } + for _, req := range []string{"reply", "toolCall"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in ToolRepairApplyRequest must not be null", req) + } + } + type alias ToolRepairApplyRequest + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = ToolRepairApplyRequest(tmp) + return nil +} + type ToolRepairApplyResultRequest struct { Options *GenerateTextOptions `json:"options,omitzero"` Reply ToolCallRepairReply `json:"reply"` @@ -8651,12 +11227,80 @@ type ToolRepairApplyResultRequest struct { ToolCallID string `json:"toolCallId"` } +func (v *ToolRepairApplyResultRequest) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for ToolRepairApplyResultRequest, got null") + } + for key := range raw { + switch key { + case "options", "reply", "result", "toolCallId": + default: + return fmt.Errorf("unknown field %q in ToolRepairApplyResultRequest", key) + } + } + for _, req := range []string{"reply", "result", "toolCallId"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in ToolRepairApplyResultRequest", req) + } + } + for _, req := range []string{"reply", "result", "toolCallId"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in ToolRepairApplyResultRequest must not be null", req) + } + } + type alias ToolRepairApplyResultRequest + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = ToolRepairApplyResultRequest(tmp) + return nil +} + type ToolRepairContextRequest struct { Options *GenerateTextOptions `json:"options,omitzero"` Prompt ModelPrompt `json:"prompt"` ToolCall ToolCallInput `json:"toolCall"` } +func (v *ToolRepairContextRequest) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for ToolRepairContextRequest, got null") + } + for key := range raw { + switch key { + case "options", "prompt", "toolCall": + default: + return fmt.Errorf("unknown field %q in ToolRepairContextRequest", key) + } + } + for _, req := range []string{"prompt", "toolCall"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in ToolRepairContextRequest", req) + } + } + for _, req := range []string{"prompt", "toolCall"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in ToolRepairContextRequest must not be null", req) + } + } + type alias ToolRepairContextRequest + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = ToolRepairContextRequest(tmp) + return nil +} + type ToolRepairContextResult = *ToolRepairContextSchema type ToolRepairContextSchema struct { @@ -9273,10 +11917,58 @@ type TraceAggregateFilter struct { SinceUnixMs *int64 `json:"sinceUnixMs,omitzero"` } +func (v *TraceAggregateFilter) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for TraceAggregateFilter, got null") + } + for key := range raw { + switch key { + case "model", "provider", "sessionId", "sinceUnixMs": + default: + return fmt.Errorf("unknown field %q in TraceAggregateFilter", key) + } + } + type alias TraceAggregateFilter + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = TraceAggregateFilter(tmp) + return nil +} + type TraceAggregateParams struct { Filter *TraceAggregateFilter `json:"filter,omitzero"` } +func (v *TraceAggregateParams) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for TraceAggregateParams, got null") + } + for key := range raw { + switch key { + case "filter": + default: + return fmt.Errorf("unknown field %q in TraceAggregateParams", key) + } + } + type alias TraceAggregateParams + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = TraceAggregateParams(tmp) + return nil +} + type TraceAuditMode string const ( @@ -9285,12 +11977,50 @@ const ( TraceAuditModeStrict TraceAuditMode = "strict" ) +func (v *TraceAuditMode) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return err + } + switch TraceAuditMode(s) { + case TraceAuditModeOff, TraceAuditModeShared, TraceAuditModeStrict: + *v = TraceAuditMode(s) + return nil + default: + return fmt.Errorf("invalid TraceAuditMode: %q", s) + } +} + type TraceCreateParams struct { AuditMode *TraceAuditMode `json:"auditMode,omitzero"` Capacity *uint64 `json:"capacity,omitzero"` PerScopeCapacity *uint64 `json:"perScopeCapacity,omitzero"` } +func (v *TraceCreateParams) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for TraceCreateParams, got null") + } + for key := range raw { + switch key { + case "auditMode", "capacity", "perScopeCapacity": + default: + return fmt.Errorf("unknown field %q in TraceCreateParams", key) + } + } + type alias TraceCreateParams + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = TraceCreateParams(tmp) + return nil +} + // One probed call. Plaintext never persists — fingerprints only. type TraceRecord struct { // Call-level unique id (association key for Recording / replay, @@ -9326,6 +12056,40 @@ type TraceSessionParams struct { SessionID string `json:"sessionId"` } +func (v *TraceSessionParams) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for TraceSessionParams, got null") + } + for key := range raw { + switch key { + case "sessionId": + default: + return fmt.Errorf("unknown field %q in TraceSessionParams", key) + } + } + for _, req := range []string{"sessionId"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in TraceSessionParams", req) + } + } + for _, req := range []string{"sessionId"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in TraceSessionParams must not be null", req) + } + } + type alias TraceSessionParams + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = TraceSessionParams(tmp) + return nil +} + // Aggregated statistics (RFC-0015 §5.2 — the two hit rates are reported // side by side, never merged into a single number). type TraceStats struct { @@ -9365,6 +12129,40 @@ type TranscriptionCallOptions struct { Timeout *TimeoutConfiguration `json:"timeout,omitzero"` } +func (v *TranscriptionCallOptions) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for TranscriptionCallOptions, got null") + } + for key := range raw { + switch key { + case "audio", "headers", "maxRetries", "mediaType", "providerOptions", "timeout": + default: + return fmt.Errorf("unknown field %q in TranscriptionCallOptions", key) + } + } + for _, req := range []string{"audio", "mediaType"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in TranscriptionCallOptions", req) + } + } + for _, req := range []string{"audio", "mediaType"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in TranscriptionCallOptions must not be null", req) + } + } + type alias TranscriptionCallOptions + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = TranscriptionCallOptions(tmp) + return nil +} + // Optional request information for a transcription call. type TranscriptionRequest struct { // Raw request HTTP body that was sent (JSON stringified). @@ -9424,6 +12222,30 @@ type TranscriptionStartParams struct { Timeout *TimeoutConfiguration `json:"timeout,omitzero"` } +func (v *TranscriptionStartParams) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for TranscriptionStartParams, got null") + } + for key := range raw { + switch key { + case "abort", "headers", "includeRawChunks", "inputAudioFormat", "providerOptions", "timeout": + default: + return fmt.Errorf("unknown field %q in TranscriptionStartParams", key) + } + } + type alias TranscriptionStartParams + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = TranscriptionStartParams(tmp) + return nil +} + // A single chunk in the stream returned by `do_stream`. // // Aligned with V4 `TranscriptionModelV4StreamPart`. @@ -9681,6 +12503,30 @@ type TransportParamsVariantFetch struct { Proxy *TransportProxy `json:"proxy,omitzero"` } +func (v *TransportParamsVariantFetch) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for TransportParamsVariantFetch, got null") + } + for key := range raw { + switch key { + case "proxy", "kind": + default: + return fmt.Errorf("unknown field %q in TransportParamsVariantFetch", key) + } + } + type alias TransportParamsVariantFetch + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = TransportParamsVariantFetch(tmp) + return nil +} + func (TransportParamsVariantFetch) isTransportParams() {} func (v TransportParamsVariantFetch) MarshalJSON() ([]byte, error) { @@ -9695,6 +12541,30 @@ type TransportParamsVariantWs struct { Proxy *TransportProxy `json:"proxy,omitzero"` } +func (v *TransportParamsVariantWs) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for TransportParamsVariantWs, got null") + } + for key := range raw { + switch key { + case "proxy", "kind": + default: + return fmt.Errorf("unknown field %q in TransportParamsVariantWs", key) + } + } + type alias TransportParamsVariantWs + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = TransportParamsVariantWs(tmp) + return nil +} + func (TransportParamsVariantWs) isTransportParams() {} func (v TransportParamsVariantWs) MarshalJSON() ([]byte, error) { @@ -9709,6 +12579,30 @@ type TransportParamsVariantDownload struct { MaxBytes *uint64 `json:"maxBytes,omitzero"` } +func (v *TransportParamsVariantDownload) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for TransportParamsVariantDownload, got null") + } + for key := range raw { + switch key { + case "maxBytes", "kind": + default: + return fmt.Errorf("unknown field %q in TransportParamsVariantDownload", key) + } + } + type alias TransportParamsVariantDownload + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = TransportParamsVariantDownload(tmp) + return nil +} + func (TransportParamsVariantDownload) isTransportParams() {} func (v TransportParamsVariantDownload) MarshalJSON() ([]byte, error) { @@ -9730,6 +12624,30 @@ type TransportProxy struct { NoProxy *string `json:"no_proxy,omitzero"` } +func (v *TransportProxy) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for TransportProxy, got null") + } + for key := range raw { + switch key { + case "all_url", "http_url", "https_url", "no_proxy": + default: + return fmt.Errorf("unknown field %q in TransportProxy", key) + } + } + type alias TransportProxy + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = TransportProxy(tmp) + return nil +} + // A source in a text result's `sources`: a [`Source`] with its `type` tag, // the AI SDK's `Source` (`ai` `generate-text/generate-text-result.ts:73`). // @@ -9960,6 +12878,40 @@ type UploadFileDataVariantData struct { Data FileBytes `json:"data"` } +func (v *UploadFileDataVariantData) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for UploadFileDataVariantData, got null") + } + for key := range raw { + switch key { + case "data", "type": + default: + return fmt.Errorf("unknown field %q in UploadFileDataVariantData", key) + } + } + for _, req := range []string{"data"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in UploadFileDataVariantData", req) + } + } + for _, req := range []string{"data"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in UploadFileDataVariantData must not be null", req) + } + } + type alias UploadFileDataVariantData + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = UploadFileDataVariantData(tmp) + return nil +} + func (UploadFileDataVariantData) isUploadFileData() {} func (v UploadFileDataVariantData) MarshalJSON() ([]byte, error) { @@ -9974,6 +12926,40 @@ type UploadFileDataVariantText struct { Text string `json:"text"` } +func (v *UploadFileDataVariantText) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for UploadFileDataVariantText, got null") + } + for key := range raw { + switch key { + case "text", "type": + default: + return fmt.Errorf("unknown field %q in UploadFileDataVariantText", key) + } + } + for _, req := range []string{"text"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in UploadFileDataVariantText", req) + } + } + for _, req := range []string{"text"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in UploadFileDataVariantText must not be null", req) + } + } + type alias UploadFileDataVariantText + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = UploadFileDataVariantText(tmp) + return nil +} + func (UploadFileDataVariantText) isUploadFileData() {} func (v UploadFileDataVariantText) MarshalJSON() ([]byte, error) { @@ -9997,6 +12983,40 @@ type UploadFileParams struct { ProviderOptions map[string]map[string]json.RawMessage `json:"providerOptions,omitzero"` } +func (v *UploadFileParams) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for UploadFileParams, got null") + } + for key := range raw { + switch key { + case "abort", "data", "filename", "mediaType", "providerOptions": + default: + return fmt.Errorf("unknown field %q in UploadFileParams", key) + } + } + for _, req := range []string{"data", "mediaType"} { + if _, ok := raw[req]; !ok { + return fmt.Errorf("missing required field %q in UploadFileParams", req) + } + } + for _, req := range []string{"data", "mediaType"} { + if bytes.Equal(bytes.TrimSpace(raw[req]), []byte("null")) { + return fmt.Errorf("required field %q in UploadFileParams must not be null", req) + } + } + type alias UploadFileParams + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = UploadFileParams(tmp) + return nil +} + // Result of [`Files::upload_file`]. // // Aligned with V4 `FilesV4UploadFileResult`. @@ -10257,6 +13277,20 @@ const ( VerdictConfidenceLow VerdictConfidence = "Low" ) +func (v *VerdictConfidence) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return err + } + switch VerdictConfidence(s) { + case VerdictConfidenceHigh, VerdictConfidenceMedium, VerdictConfidenceLow: + *v = VerdictConfidence(s) + return nil + default: + return fmt.Errorf("invalid VerdictConfidence: %q", s) + } +} + // Verdict kinds (RFC-0015 §4.1). type VerdictKind string @@ -10267,6 +13301,20 @@ const ( VerdictKindUnknown VerdictKind = "Unknown" ) +func (v *VerdictKind) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return err + } + switch VerdictKind(s) { + case VerdictKindTrusted, VerdictKindSuspectOverclaim, VerdictKindSuspectUnderclaim, VerdictKindUnknown: + *v = VerdictKind(s) + return nil + default: + return fmt.Errorf("invalid VerdictKind: %q", s) + } +} + // Options passed to [`VideoModel::do_start`] and [`VideoModel::do_status`]. // // Aligned with V4 `VideoModelV4CallOptions`. @@ -10309,6 +13357,30 @@ type VideoCallOptions struct { Timeout *TimeoutConfiguration `json:"timeout,omitzero"` } +func (v *VideoCallOptions) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for VideoCallOptions, got null") + } + for key := range raw { + switch key { + case "aspectRatio", "duration", "fps", "frameImages", "generateAudio", "headers", "image", "inputReferences", "maxRetries", "n", "poll", "prompt", "providerOptions", "resolution", "seed", "timeout": + default: + return fmt.Errorf("unknown field %q in VideoCallOptions", key) + } + } + type alias VideoCallOptions + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = VideoCallOptions(tmp) + return nil +} + // Generated video data: a URL, base64-encoded string, or binary data. // // Aligned with V4 `VideoModelV4VideoData`. Most providers return URLs due to @@ -10500,6 +13572,20 @@ const ( VideoFrameTypeLastFrame VideoFrameType = "last_frame" ) +func (v *VideoFrameType) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return err + } + switch VideoFrameType(s) { + case VideoFrameTypeFirstFrame, VideoFrameTypeLastFrame: + *v = VideoFrameType(s) + return nil + default: + return fmt.Errorf("invalid VideoFrameType: %q", s) + } +} + // Per-call poll pacing for video generation (AI SDK `generateVideo` `poll`, // ai@7.0.127 `generate-video/generate-video.ts:55-80`). The poll settings // belong to the operation, as upstream: a video model has none of its own. @@ -10510,6 +13596,30 @@ type VideoPollOptions struct { TimeoutMs *uint64 `json:"timeoutMs,omitzero"` } +func (v *VideoPollOptions) UnmarshalJSON(data []byte) error { + var raw map[string]json.RawMessage + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + if raw == nil { + return fmt.Errorf("expected object for VideoPollOptions, got null") + } + for key := range raw { + switch key { + case "intervalMs", "timeoutMs": + default: + return fmt.Errorf("unknown field %q in VideoPollOptions", key) + } + } + type alias VideoPollOptions + var tmp alias + if err := json.Unmarshal(data, &tmp); err != nil { + return err + } + *v = VideoPollOptions(tmp) + return nil +} + // Response information for a video generation call. type VideoResponse struct { // Response headers. diff --git a/bindings/go/wire_test.go b/bindings/go/wire_test.go index 508bd5527..2689d5323 100644 --- a/bindings/go/wire_test.go +++ b/bindings/go/wire_test.go @@ -228,3 +228,42 @@ func TestUnionIgnoresUnrelatedSecondaryTag(t *testing.T) { } } } + +func TestClosedParentsKeepNestedOpenStructsAndClosedVariantsRejectUnknown(t *testing.T) { + var outputReq OpenAiOutputRequest + if err := json.Unmarshal([]byte(`{"metadataNamespace":"openai","result":{"steps":[],"totalUsage":{"inputTokens":1,"outputTokens":2,"totalTokens":3,"inputTokenDetails":{},"outputTokenDetails":{}},"futureField":true}}`), &outputReq); err != nil { + t.Fatalf("closed OpenAiOutputRequest rejected open field in nested GenerateTextResultInput: %v", err) + } + if err := json.Unmarshal([]byte(`{"metadataNamespace":"openai","result":{"steps":[],"totalUsage":{"inputTokens":1,"outputTokens":2,"totalTokens":3,"inputTokenDetails":{},"outputTokenDetails":{}}},"extraParent":1}`), &outputReq); err == nil { + t.Fatal("closed OpenAiOutputRequest accepted unknown parent field") + } + + var repairReq ToolRepairApplyRequest + if err := json.Unmarshal([]byte(`{"reply":{"type":"repaired","toolCall":{"toolCallId":"c1","toolName":"t","input":"{}"}},"toolCall":{"toolCallId":"c1","toolName":"t","input":{},"futureCallField":1}}`), &repairReq); err != nil { + t.Fatalf("closed ToolRepairApplyRequest rejected open field in nested ToolCallInput: %v", err) + } + + var videoOpts VideoCallOptions + if err := json.Unmarshal([]byte(`{"frameImages":[{"frameType":"first_frame","image":{"type":"url","url":"https://example.com/a.png"},"futureFrame":1}]}`), &videoOpts); err != nil { + t.Fatalf("closed VideoCallOptions rejected open field in nested VideoFrameImage: %v", err) + } + + var backend BackendConfig + if err := json.Unmarshal([]byte(`{"type":"ring","capacity":4}`), &backend); err != nil { + t.Fatalf("valid closed tagged variant rejected: %v", err) + } + if err := json.Unmarshal([]byte(`{"type":"ring","capacity":4,"extra":true}`), &backend); err == nil { + t.Fatal("closed tagged variant BackendConfigVariantRing accepted unknown field") + } + var recorder CreateRecorderParams + if err := json.Unmarshal([]byte(`{"backend":{"type":"jsonl"},"capturePolicy":"full"}`), &recorder); err == nil { + t.Fatal("closed tagged variant BackendConfigVariantJsonl accepted missing required directory") + } + if err := json.Unmarshal([]byte(`{"backend":{"type":"jsonl","directory":null},"capturePolicy":"full"}`), &recorder); err == nil { + t.Fatal("closed tagged variant BackendConfigVariantJsonl accepted null required directory") + } + var frame StreamFrame + if err := json.Unmarshal([]byte(`{"type":"end","seq":"0","outcome":"success","extra":true}`), &frame); err == nil { + t.Fatal("closed tagged variant StreamFrameVariantEnd accepted unknown field") + } +} diff --git a/bindings/java/README.md b/bindings/java/README.md index 522d639e2..0a72e8280 100644 --- a/bindings/java/README.md +++ b/bindings/java/README.md @@ -88,10 +88,10 @@ nonnegative. Operation failures throw exceptions. Cancel through Removed APIs include implicit recording helpers, lock-lending repair hooks and the unbounded Java Stream adapter. Use explicit recorder resources and the pure `ToolCallRepairs` DTO operations. Core recorder/session/infer state remains -process-wide. Recording schema migration and business DTO schema generation are -separate work. Replay transport capabilities and credential creation currently -report UnsupportedFunctionality. Per-platform release asset installation is not -verified by this binding's tests. +process-wide. Per-type DTO schemas (`schema/types/*.json`), `TYPE_SCHEMA_HASHES`, +and DTO vector parity checks are generated; recording schema migration and +per-platform release asset installation remain separate work. Replay transport +capabilities and credential creation currently report UnsupportedFunctionality. ## Tests diff --git a/bindings/java/generated/AimuxOps.java b/bindings/java/generated/AimuxOps.java index 07d733a3d..c1a5df588 100644 --- a/bindings/java/generated/AimuxOps.java +++ b/bindings/java/generated/AimuxOps.java @@ -1,11 +1,11 @@ -// Generated by aimux-codegen. Do not edit. Manifest SHA-256: 9c7f306459ec0009f6bca66c0abbb36fc3740b5fc6330c47a6fd73a6bc16caae +// Generated by aimux-codegen. Do not edit. Manifest SHA-256: cd147fa9595ede3951744fa261da98cc18c204e65b4081073ad3a3c1b68bfd92 package ai.arcships.aimux.generated; public final class AimuxOps { private AimuxOps() {} public static final long ABI_VERSION = 65536L; public static final String OPS_VERSION = "1.0"; - public static final String MANIFEST_DIGEST = "9c7f306459ec0009f6bca66c0abbb36fc3740b5fc6330c47a6fd73a6bc16caae"; + public static final String MANIFEST_DIGEST = "cd147fa9595ede3951744fa261da98cc18c204e65b4081073ad3a3c1b68bfd92"; public static final String OP_ABORT_CREATE = "abort.create"; public static final String OP_ABORT_SIGNAL = "abort.signal"; public static final String OP_AUTH_CODEX_REFRESH = "auth.codexRefresh"; @@ -82,4 +82,111 @@ private AimuxOps() {} public static final String OP_TRANSCRIPTION_START = "transcription.start"; public static final String OP_TRANSPORT_CREATE = "transport.create"; public static final String OP_VIDEO_GENERATE = "video.generate"; + public static final java.util.Map TYPE_SCHEMA_HASHES; + static { + java.util.Map hashes = new java.util.LinkedHashMap<>(); + hashes.put("AnyValue", "1277ba3a7f8d8ac87c32098666e636d643b6b12d05eb3929a9f018bcc4aa124d"); + hashes.put("[aimux_core::model_catalogue::RuntimeModel]", "aa1da3dbae5d9c830298d255a2cd3bf3b539865ec0324018abcbe555f964f086"); + hashes.put("[aimux_core::session::SessionCall]", "21e259cac0528023d45be7860ea838fcc6a785c0b26ebfe84f7e40b9b861458e"); + hashes.put("[aimux_core::session::SessionView]", "61ad43e852b0e490ab586cd27d25eeb97b00bbfce8808dde6b6252a4aeb367af"); + hashes.put("[aimux_core::trace::store::SessionStepStat]", "ad678575594f65b07dfcb9305b3360fa248d2a05acd3f1059a8cae039ad452cb"); + hashes.put("[aimux_core::trace::store::TraceStats]", "03eb93cd7b38050c6e3be7e47f3c7ac13e617b26f03f03011d58d9d8dfd273aa"); + hashes.put("[aimux_provider_utils::package_descriptor::PackageDescriptor]", "3a98399f69d62320aa747123ec3ede231cd955ced29e36dc401ccc9a82fedc8a"); + hashes.put("[uint8]", "7c82b8345d5b5e8e5c561ac91d6d94e05d221e5c52f729fdde3a6e3e3b6af77d"); + hashes.put("aimux_core::decision_model::DecideResult", "3d50c7ec8e3cce59ea94e9555c93965d03d50d5581e5c3cf214dfe1fdaac0053"); + hashes.put("aimux_core::embedding_model::EmbeddingCallOptions", "1f6db6e963bb7d969a1cb8da125ba836fe8711635d34902b674033e0aefa934d"); + hashes.put("aimux_core::embedding_model::EmbeddingResult", "af3ce0787db6208be114613c78dc02f038cb5dc2f7abcf6a4ade2be79085342e"); + hashes.put("aimux_core::files_model::UploadFileResult", "0d17fd3dbfa601e45c9fabf62f9bb1e5028591443eafccd4eecacef0dcda0368"); + hashes.put("aimux_core::generate::GenerateObjectResult", "21cca82de06d366b0f47d781bd49141bb63215accdd1133bb360113a60b7cc00"); + hashes.put("aimux_core::generate::GenerateTextResult", "c5c6016de2c926c85144959d9436c9d2214a27a9724e75d68393e933ef7263f5"); + hashes.put("aimux_core::image_model::ImageCallOptions", "ddacb8970cef4590bcdcc572ced361b181d501d3b474a2d6c50a9c0c02af3eb2"); + hashes.put("aimux_core::image_model::ImageResult", "a9d2d939f3dc153a5b5ebc8083bea1226ff63ff2e54e4e275c9ab2b136b9e880"); + hashes.put("aimux_core::openai_output::ChatCompletion", "503195cbe7fe458d9403a9de20b93bd17c20bbee0de40a8088bf3847ee835ad9"); + hashes.put("aimux_core::openai_output::ChatCompletionChunk", "b15bd0f02f12fa4e220a1b8e5d82ca24c7486557a04c550d30b90a297b372311"); + hashes.put("aimux_core::recording::Recording", "56fa358fb2023da68837722ed573e00fc997506403d7c7aa516c586c45b4fd54"); + hashes.put("aimux_core::reranking_model::RerankingCallOptions", "c481b6e7c4d5e71ea7db00166ab2952c8a893443f786a61374c7398b4e475e4c"); + hashes.put("aimux_core::reranking_model::RerankingResult", "d757826963b3ce836e4d76fca8f42455a3a3146c20f3fb74f58cabe465348d01"); + hashes.put("aimux_core::search_model::SearchCallOptions", "3b963a871e6f1858db03b68adc74c5f898d4a2c3c0506e4e359b8d8198d30b22"); + hashes.put("aimux_core::search_model::SearchResult", "61075439fcb4276085a11113195dd13220b710cc0c2199ceefa4ec3d07d0195f"); + hashes.put("aimux_core::speech_model::SpeechCallOptions", "418be167c89bca652fb0a9dd52a1da359c1ecc2b069b9d2a0859ab76a7f7f431"); + hashes.put("aimux_core::speech_model::SpeechResult", "8d32e22e24d7ee19a7c2f6cedaf909b6952aa76d635aa4e568e333ed5b45ce07"); + hashes.put("aimux_core::stream_part::TextStreamPart", "c3e035afcbb44740877b943b8ce19e5ac855fd3eaa9ee3d17a936cf7521d7ffc"); + hashes.put("aimux_core::tool::ToolCall", "ea7bd676d207cc40ac1d64442d114b041b7ac60db5420e1f200cc6a8af88d48c"); + hashes.put("aimux_core::trace::record::TraceRecord", "29acdf296b3cd896422357ec1c829fddef38a0455afd825cb7a49f0cb9a8b74d"); + hashes.put("aimux_core::trace::store::SessionChainView", "f5f242da28123fec7907b886dc1debfb4099cfa415074db3476f09712a6c34ca"); + hashes.put("aimux_core::transcription_model::TranscriptionCallOptions", "2a5cf741b2362497e51d0f33b275e01a9dcd336c08623c8617062b83f958aa10"); + hashes.put("aimux_core::transcription_model::TranscriptionResult", "80f153139ed0a65101df69711f15972bfee3154d5452ee8db11585376f31b5fc"); + hashes.put("aimux_core::video_model::VideoCallOptions", "d474a1301928fac38b4d5f06950a91285fc039a7910b51cda8b6ec84cbde9252"); + hashes.put("aimux_core::video_model::VideoResult", "b6fbefd485c75a364d0230349c85d9e222efad481dfde42d35332cbe14d2e09d"); + hashes.put("aimux_ops::envelope::ErrorEnvelope", "48e1305879bb316b0ab5a77b866d6a2dd5c9c2af7f4d9c39f31656d5e7150ce6"); + hashes.put("aimux_ops::frame::StreamFrame", "ce40166decce7b747c1ce7d8f887c5b820577e682df4568e06653de6d3e0c40c"); + hashes.put("aimux_ops::handle::HandleId", "1847d76248c899504e814a58f8771ef59f77fb8b1cca2090193a272bdbd0d6b8"); + hashes.put("aimux_ops::operation::CancelResult", "f166988845b50fd6ae7913505cff98100de52447ba7e297e79f7c6c9b569d02f"); + hashes.put("aimux_ops::operation::OperationStatus", "abeda07e7224a93d1dce678575101d846d68c0c6b24482fb0408b19cb0f52e6b"); + hashes.put("aimux_ops::ops::composite::MoaParams", "2510e5a1226e6f5742ba6f8331a6a1dc6ee48144c88143db25d1d213a842e4c3"); + hashes.put("aimux_ops::ops::composite::RouterParams", "a7db760e7a4e1b6624433d6609408a9136d869bf415c4f5a462011ac3164c3cb"); + hashes.put("aimux_ops::ops::decision::DecisionDecideRequest", "e2a9893b9dfa971db96e94eaf7b853f0daebeb152500d9c4851127abfde5802d"); + hashes.put("aimux_ops::ops::files::UploadFileParams", "136396c0be1014277cef6f30633f16d3ecc08d5392f1f53fa5ebbc2af0eba17c"); + hashes.put("aimux_ops::ops::handles::CredentialParams", "2a3ded4003c2d3257653c6ef4613f9defff748954cd9325c6aa98674cb080894"); + hashes.put("aimux_ops::ops::handles::HandleResult", "01fe7a49695da49143a48c0c53ec9b1ff4099dbc108770194430c38fe71f01c2"); + hashes.put("aimux_ops::ops::handles::MiddlewareParams", "f2789f63feb7b414d3f867c2a84dc298a53ace8d84082367e989161b769ec6ce"); + hashes.put("aimux_ops::ops::handles::TransportParams", "86e40584fcc21dab8f0017f8e892b776ac24aaa9afc943ba805828cecc6e1a4c"); + hashes.put("aimux_ops::ops::misc::CatalogueFetchRequest", "2ceed496996ec6cf32d3e3115ab6a4346a1bb201dc8a970eefbd46eb700a310e"); + hashes.put("aimux_ops::ops::misc::CodexRefreshRequest", "59f1075ed68cb79896d4bac1d0ab32d21fb5855012c6336652bea0c4969ac926"); + hashes.put("aimux_ops::ops::misc::OpenAiOutputRequest", "b0c6acc344f0b23b9ea3b693aeadf7aed7eb4fbdfce4b957be83af1154b842b4"); + hashes.put("aimux_ops::ops::misc::ToolRepairApplyRequest", "0f430fdb223759ef7c48c4d7f824e7be74d29295a6b4f7caaf82b5acba25e538"); + hashes.put("aimux_ops::ops::misc::ToolRepairApplyResultRequest", "fa092862004654e065233b2df2abdbec3befe88d9d734d494679968a5b6e954a"); + hashes.put("aimux_ops::ops::misc::ToolRepairContextRequest", "81bae04c56aac3380b75de639d162f819a2dd5717147a53cf1a75281727d78a1"); + hashes.put("aimux_ops::ops::misc::ToolRepairContextResult", "fd8173e6ec40724fa4207e3571e290ac12e4db1fed08a709273e2982a82b504f"); + hashes.put("aimux_ops::ops::operation::EmptyParams", "1612408252a424283a43a92193bb8ea24f72c08b9f0d2117b4ef7f5a090e37f8"); + hashes.put("aimux_ops::ops::operation::OperationNextParams", "127fea618826e51576ae488dcccaca03c04b774a847a33ec9c47565396862bb7"); + hashes.put("aimux_ops::ops::operation::OperationPollResult", "ec9af646d9b26de004871b4427201b8185677bbbeaf48a1dd489e72e1b126ea1"); + hashes.put("aimux_ops::ops::operation::TranscriptionStartParams", "c863c6f84c5715193078c914c25a5c575c625d77cf3b64ad4029253268d56226"); + hashes.put("aimux_ops::ops::provider::HandleResult", "cea9958b3ff5c8896bab683db36a396bef563c35ec0121b77d51e9475d5d8df5"); + hashes.put("aimux_ops::ops::provider::ProviderCreateParams", "e65cb5322863a2d16af50745cca82873cd03fa2578320c1796570b37efd2c1bb"); + hashes.put("aimux_ops::ops::provider::ProviderCustomParams", "bc40024b5e1794bc8e2bd52bfa9b661b90ad9aa8ba94639ba9120b46bbbf0f90"); + hashes.put("aimux_ops::ops::provider::ProviderDefaultParams", "bb2aff39ad05a28afcc9f4fd8e7e7b30cf3c7ac7b5bd483e002f78f6db737299"); + hashes.put("aimux_ops::ops::provider::ProviderDescriptorsParams", "fa195301dd402853e4cca7cf0ba2843c550c96ef0dc179ec50516394a9435dc0"); + hashes.put("aimux_ops::ops::provider::ProviderInvokeParams", "b33bb79b85db5289152f563021ba9c4285538122d70fe16333b64c94a011fc78"); + hashes.put("aimux_ops::ops::provider::ProviderModelParams", "a9db30c0dc6c71594875748792ddce9f46707696842e45beaceaf474856fbcad"); + hashes.put("aimux_ops::ops::provider::ProviderWrapParams", "a7f59ed924a355d14ad795b37993983fc5c2f2125f9c813ce4b561a0fca7fd62"); + hashes.put("aimux_ops::ops::recording::CreateRecorderParams", "a951e5dde168e1621d21834415cac68c793244158e1fb0f5171dfda8b0bf71c5"); + hashes.put("aimux_ops::ops::recording::EmptyParams", "58802ed68aeb4b87ba67d24b728037be53e63706a4f29055005f14ad068c8777"); + hashes.put("aimux_ops::ops::recording::RecorderExport", "6d3226d3859134361f1dec0429a87c28342d7c5548ea175d535b92d4a49ee8e5"); + hashes.put("aimux_ops::ops::recording::RecorderHandleResult", "f16095d906b62f7fbf86800f6e39e3e89bd6ef1bc65776569795b3555e9025cc"); + hashes.put("aimux_ops::ops::recording::RecorderStats", "5f842b6b1bd0816d07e6f179890f79dddae8815c180824405a9e5ad9dd7871a0"); + hashes.put("aimux_ops::ops::registry::HandleResult", "5f78b2970033052ccdef6827004094c65e9ee35ddc6f80d6c8a619c4db63b05a"); + hashes.put("aimux_ops::ops::registry::ModelInfo", "291dc73d80dbe44be78b15e9deaa60ba253f0c47fc5cfdbffef3bd5cf4b94f36"); + hashes.put("aimux_ops::ops::registry::ModelInfoParams", "c357f2b2342be3bf5f680e816188a4d7b3758a399975eb77a599a82f633d8974"); + hashes.put("aimux_ops::ops::registry::ModelResolveParams", "cfcd1fab460d33db7141f397064edf1481f0024248a7a6f256f8cbfbd3c6eaee"); + hashes.put("aimux_ops::ops::registry::ModelWrapParams", "c5f9703fca04c72df6f3c1c76dea3a130c3e84e37dbc3f18ef58fcf9745f4781"); + hashes.put("aimux_ops::ops::registry::RegistryCreateParams", "6df3075b2b59076de76283d00d4853a4c0da0345c7396cee4a4ad69240290573"); + hashes.put("aimux_ops::ops::registry::RegistryFromConfigParams", "26872ba0751baac107c59a0aa962fa102cc778c661b7bd7b8bd1ccd4226b97ae"); + hashes.put("aimux_ops::ops::registry::RegistryListParams", "c1c477df7aefa646daf05cd316526138109cadd655dd219200531d72eff3260c"); + hashes.put("aimux_ops::ops::registry::RegistryListResult", "26049e7c68ea45b9e322f693c49755e0db476d91631f2a1aa864659b9b87a773"); + hashes.put("aimux_ops::ops::registry::RegistryProviderParams", "d6379c789feb67435e795d0213dfd2fd74d9276465a8f13622327864cb025fb4"); + hashes.put("aimux_ops::ops::registry::RegistryUpdateParams", "9cde136591d14543027538bfa38331059c9865efa2cb89cbf6b2866bdcd21e9e"); + hashes.put("aimux_ops::ops::registry::RegistryUpdateResult", "3e2738ff293183afb575f47bd75daa8afd330f09e43cb4a39de975d97ba16c5b"); + hashes.put("aimux_ops::ops::replay::ReplayCreateParams", "ee64b5b5843103f76ca2166aed2f58995e472be93cb7bb18dea8238c8a2d9e44"); + hashes.put("aimux_ops::ops::replay::ReplayInspection", "7ac2af62f3421f8c7c50867a838f0aff90f35b6a4f192f6c0d5347ab4699108c"); + hashes.put("aimux_ops::ops::replay::ReplayLiveParams", "e99c7d51fb194def185f5a03d84bfc226eb1b101eade0b885216332605318a4d"); + hashes.put("aimux_ops::ops::replay::ReplayLiveResult", "bd9959dd7e0300cb57e6929b2ed29b7e07dcb5aaf65be16b96e34bf8d6577a7f"); + hashes.put("aimux_ops::ops::replay::ReplayPlan", "5cc6667b9fac6de173bf5b55c1a76a491255f89f0fa7a27c0fd33fd790259799"); + hashes.put("aimux_ops::ops::replay::ReplaySessionHandle", "5e779b71ce2a54e59948c605cdfc48797d0760027ad5f44966df958fe9781d11"); + hashes.put("aimux_ops::ops::runtime::RuntimeConfigureParams", "e3b24b9f1fbdf2be7da210f15060803cf8bfdef77c8b2ad330a5b501263dfb0f"); + hashes.put("aimux_ops::ops::runtime::RuntimeDescribeParams", "c3db9b36a42e2bfda8823a35aadc8f6b183dcb46fd7256aeb66505289874b96d"); + hashes.put("aimux_ops::ops::session::SessionStoreCallsParams", "ddd482204fdd305bbfd28d43ae829d8c286f3f8906302ca6679743ea680fedda"); + hashes.put("aimux_ops::ops::session::SessionStoreCreateParams", "080d865c349ec86553f72b99ab1c65ddbb72d0c348a96dc17135a934d787cd86"); + hashes.put("aimux_ops::ops::session::SessionStoreHandle", "755d437d47d362474942fc4a09f5f8c80b75cf362ac16b25b262e33a760b4c6a"); + hashes.put("aimux_ops::ops::text::OpenAiTextRequest", "59293b18b6124a9a394113b8f94f637c65dc35ac44a30f7e0df70855e885f8e4"); + hashes.put("aimux_ops::ops::text::TextRequest", "3a6f59c1f0c3b7ded5f5509d93afe9bddd2b80a8a3cd752d79f97edadae40c3d"); + hashes.put("aimux_ops::ops::trace::TraceAggregateParams", "1b207f0bbe1b7ce7e9b8b0beb9334cf3cc4f9f05382911aaacfe0425dc8ff2c8"); + hashes.put("aimux_ops::ops::trace::TraceCreateParams", "59fef52f382800570e861ae9ca92433dcae8807679d914a89ce99705713301d9"); + hashes.put("aimux_ops::ops::trace::TraceSessionParams", "3e2300f6c65f6dcd52a016eba648a29abeff3a9d67c3b04a95617aa66832f810"); + hashes.put("aimux_providers::catalogue::Catalogue", "6e0128414c8cce09930fea4c68daf7739f9c79072f240bcb9d786eabeaf53b41"); + hashes.put("aimux_providers::codex::CodexTokens", "0925e12b12a645e10306277a7d46fad9d646ce829acef378d223d53800256321"); + hashes.put("null", "0b04deb4d538ba0de2ab6920bc3b185241775a867937e5875a50ff54be3b9d56"); + hashes.put("string", "0d6cbdd2f60c1f2f337739faaafd28ef3e743416ad7a52645a808613733dcab5"); + TYPE_SCHEMA_HASHES = java.util.Collections.unmodifiableMap(hashes); + } } diff --git a/bindings/java/generated/ai/arcships/aimux/types/DtoJson.java b/bindings/java/generated/ai/arcships/aimux/types/DtoJson.java index 7e609de54..aaa545de3 100644 --- a/bindings/java/generated/ai/arcships/aimux/types/DtoJson.java +++ b/bindings/java/generated/ai/arcships/aimux/types/DtoJson.java @@ -54,9 +54,17 @@ public static String stringify(Object value) { } } - /** Checked unsigned identifier; its wire form remains a string. */ + /** Checked unsigned identifier; its wire form remains a canonical decimal string. */ public static long u64(String value) { - if (!value.matches("0|[1-9][0-9]*")) { + if (value == null || !value.matches("0|[1-9][0-9]*")) { + throw new IllegalArgumentException("Invalid uint64 string: " + value); + } + return Long.parseUnsignedLong(value); + } + + /** Checked unsigned input identifier accepting leading zeroes per HandleIdInput schema. */ + public static long u64Input(String value) { + if (value == null || !value.matches("[0-9]+")) { throw new IllegalArgumentException("Invalid uint64 string: " + value); } return Long.parseUnsignedLong(value); diff --git a/bindings/java/generated/ai/arcships/aimux/types/ErrorEnvelope.java b/bindings/java/generated/ai/arcships/aimux/types/ErrorEnvelope.java index 5755ddd95..90a0afc03 100644 --- a/bindings/java/generated/ai/arcships/aimux/types/ErrorEnvelope.java +++ b/bindings/java/generated/ai/arcships/aimux/types/ErrorEnvelope.java @@ -11,7 +11,7 @@ * Keep the payload open so newer error variants, provider data, and explicit * JSON nulls survive decoding and re-encoding by an older adapter. */ -@JsonIgnoreProperties(ignoreUnknown = false) +@JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonAutoDetect(getterVisibility = JsonAutoDetect.Visibility.NONE, isGetterVisibility = JsonAutoDetect.Visibility.NONE) public final class ErrorEnvelope { diff --git a/bindings/java/generated/ai/arcships/aimux/types/HandleId.java b/bindings/java/generated/ai/arcships/aimux/types/HandleId.java index 57a50208a..0a25ed169 100644 --- a/bindings/java/generated/ai/arcships/aimux/types/HandleId.java +++ b/bindings/java/generated/ai/arcships/aimux/types/HandleId.java @@ -16,7 +16,7 @@ public final class HandleId { private final String value; @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public HandleId(String value) { this.value = value; } + public HandleId(String value) { DtoJson.u64(value); this.value = value; } public String getValue() { return value; } } diff --git a/bindings/java/generated/ai/arcships/aimux/types/HandleIdInput.java b/bindings/java/generated/ai/arcships/aimux/types/HandleIdInput.java index 7886a6b56..255df8338 100644 --- a/bindings/java/generated/ai/arcships/aimux/types/HandleIdInput.java +++ b/bindings/java/generated/ai/arcships/aimux/types/HandleIdInput.java @@ -16,7 +16,7 @@ public final class HandleIdInput { private final String value; @JsonCreator(mode = JsonCreator.Mode.DELEGATING) - public HandleIdInput(String value) { this.value = value; } + public HandleIdInput(String value) { DtoJson.u64Input(value); this.value = value; } public String getValue() { return value; } } diff --git a/bindings/java/src/main/java/ai/arcships/aimux/Aimux.java b/bindings/java/src/main/java/ai/arcships/aimux/Aimux.java index c61130254..0135cf552 100644 --- a/bindings/java/src/main/java/ai/arcships/aimux/Aimux.java +++ b/bindings/java/src/main/java/ai/arcships/aimux/Aimux.java @@ -10,7 +10,11 @@ import com.sun.jna.Native; import com.sun.jna.Pointer; import com.sun.jna.ptr.PointerByReference; +import java.util.ArrayList; import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; @@ -42,16 +46,55 @@ public final class Aimux { if (abi != ABI_VERSION) throw new IllegalStateException("Incompatible aimux ABI: " + abi); PointerByReference out = new PointerByReference(); manifest = AimuxResult.result(ffi, ffi.aimux_manifest_json(out), out); + validateManifest(ABI_VERSION, manifest); + } + + static void validateManifest(int expectedAbi, JsonNode manifest) { if (!manifest.path("abiVersion").isIntegralNumber() - || manifest.path("abiVersion").asLong() != ABI_VERSION + || manifest.path("abiVersion").asLong() != expectedAbi || !manifest.path("opsVersion").isTextual() || !manifest.path("digest").isTextual() - || !OPS_VERSION.equals(manifest.path("opsVersion").asText()) - || !AimuxOps.MANIFEST_DIGEST.equals(manifest.path("digest").asText())) { - throw new IllegalStateException("Incompatible aimux ABI/ops manifest: opsVersion " - + manifest.path("opsVersion") + " (expected " + OPS_VERSION + "), digest " - + manifest.path("digest") + " (expected " + AimuxOps.MANIFEST_DIGEST + ")"); + || !OPS_VERSION.equals(manifest.path("opsVersion").asText())) { + throw incompatibilityError(manifest, Collections.emptyList()); + } + if (AimuxOps.MANIFEST_DIGEST.equals(manifest.path("digest").asText())) { + return; + } + List mismatches = findMismatchedTypes(manifest.path("types")); + if (mismatches != null && mismatches.isEmpty()) { + return; + } + throw incompatibilityError(manifest, mismatches == null ? Collections.emptyList() : mismatches); + } + + private static List findMismatchedTypes(JsonNode types) { + if (AimuxOps.TYPE_SCHEMA_HASHES.isEmpty() || !types.isArray() || types.size() == 0) { + return null; } + Map actual = new HashMap<>(); + for (JsonNode entry : types) { + JsonNode id = entry.path("id"); + JsonNode hash = entry.path("schemaHash"); + if (id.isTextual() && hash.isTextual()) { + actual.put(id.asText(), hash.asText()); + } + } + List mismatches = new ArrayList<>(); + for (Map.Entry entry : AimuxOps.TYPE_SCHEMA_HASHES.entrySet()) { + if (!entry.getValue().equals(actual.get(entry.getKey()))) { + mismatches.add(entry.getKey()); + } + } + return mismatches; + } + + private static IllegalStateException incompatibilityError(JsonNode manifest, List mismatches) { + String detail = mismatches.isEmpty() + ? "" + : " (incompatible types: " + String.join(", ", mismatches.subList(0, Math.min(5, mismatches.size()))) + ")"; + return new IllegalStateException("Incompatible aimux ABI/ops manifest: opsVersion " + + manifest.path("opsVersion") + " (expected " + OPS_VERSION + "), digest " + + manifest.path("digest") + " (expected " + AimuxOps.MANIFEST_DIGEST + ")" + detail); } public static Aimux load() { return load("aimux_ffi"); } diff --git a/bindings/java/src/test/java/ai/arcships/aimux/AbiContractTest.java b/bindings/java/src/test/java/ai/arcships/aimux/AbiContractTest.java index c7e164b61..6691f7e71 100644 --- a/bindings/java/src/test/java/ai/arcships/aimux/AbiContractTest.java +++ b/bindings/java/src/test/java/ai/arcships/aimux/AbiContractTest.java @@ -6,6 +6,9 @@ import ai.arcships.aimux.generated.AimuxOps; import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.node.ArrayNode; +import com.fasterxml.jackson.databind.node.ObjectNode; import com.sun.jna.Library; import com.sun.jna.Native; import org.junit.jupiter.api.AfterEach; @@ -104,6 +107,56 @@ private static void await(BooleanSupplier condition) throws InterruptedException assertThat(fixture.fixture_provider_calls()).isZero(); } + @Test void negotiatesManifestViaTypeSchemaHashesWhenDigestChanges() { + assertThat(AimuxOps.TYPE_SCHEMA_HASHES).isNotEmpty(); + ObjectMapper mapper = new ObjectMapper(); + ArrayNode types = mapper.createArrayNode(); + String targetType = null; + for (java.util.Map.Entry entry : AimuxOps.TYPE_SCHEMA_HASHES.entrySet()) { + if (targetType == null) { + targetType = entry.getKey(); + } + ObjectNode item = mapper.createObjectNode(); + item.put("id", entry.getKey()); + item.put("revision", "1"); + item.put("schemaHash", entry.getValue()); + types.add(item); + } + ObjectNode negotiated = mapper.createObjectNode(); + negotiated.put("abiVersion", Aimux.ABI_VERSION); + negotiated.put("opsVersion", Aimux.OPS_VERSION); + negotiated.put("digest", "changed-digest-from-new-package"); + negotiated.putArray("packages").add("openai").add("extra-package"); + negotiated.set("types", types); + Aimux.validateManifest(Aimux.ABI_VERSION, negotiated); + + ObjectNode broken = negotiated.deepCopy(); + ((ObjectNode) broken.get("types").get(0)).put("schemaHash", "0000000000000000000000000000000000000000000000000000000000000000"); + final String expectedTarget = targetType; + assertThatThrownBy(() -> Aimux.validateManifest(Aimux.ABI_VERSION, broken)) + .isInstanceOf(IllegalStateException.class) + .hasMessageContainingAll(AimuxOps.MANIFEST_DIGEST, expectedTarget); + } + + @Test void errorEnvelopeRemainsOpenForForwardCompatibility() { + JsonNode envelope = DtoJson.parse( + "{\"kind\":\"protocol\",\"code\":302,\"message\":\"future\",\"error\":{\"name\":\"UnsupportedOpsVersion\"},\"futureField\":true}" + ); + NativeException decoded = AimuxResult.decode(envelope); + assertThat(decoded).isInstanceOf(ProtocolException.class); + assertThat(decoded.getCode()).isEqualTo(302); + } + + @Test void handleIdInputAcceptsLeadingZerosWhileHandleIdRemainsCanonical() { + ai.arcships.aimux.types.HandleIdInput input = DtoJson.decode( + DtoJson.parse("\"0001\""), + ai.arcships.aimux.types.HandleIdInput.class + ); + assertThat(input.getValue()).isEqualTo("0001"); + assertThatThrownBy(() -> DtoJson.decode(DtoJson.parse("\"0001\""), ai.arcships.aimux.types.HandleId.class)) + .isInstanceOf(IllegalArgumentException.class); + } + private java.lang.ref.WeakReference abandon(int id, boolean close) { Resource resource = aimux.own(Integer.toString(id)); if (close) { resource.close(); resource.close(); } diff --git a/bindings/kotlin/generated/AimuxOps.kt b/bindings/kotlin/generated/AimuxOps.kt index ce9aecab7..ea67af67b 100644 --- a/bindings/kotlin/generated/AimuxOps.kt +++ b/bindings/kotlin/generated/AimuxOps.kt @@ -1,10 +1,10 @@ -// Generated by aimux-codegen. Do not edit. Manifest SHA-256: 9c7f306459ec0009f6bca66c0abbb36fc3740b5fc6330c47a6fd73a6bc16caae +// Generated by aimux-codegen. Do not edit. Manifest SHA-256: cd147fa9595ede3951744fa261da98cc18c204e65b4081073ad3a3c1b68bfd92 package ai.arcships.aimux.generated object AimuxKotlinOps { const val ABI_VERSION: Long = 65536 const val OPS_VERSION = "1.0" - const val MANIFEST_DIGEST = "9c7f306459ec0009f6bca66c0abbb36fc3740b5fc6330c47a6fd73a6bc16caae" + const val MANIFEST_DIGEST = "cd147fa9595ede3951744fa261da98cc18c204e65b4081073ad3a3c1b68bfd92" const val OP_ABORT_CREATE = "abort.create" const val OP_ABORT_SIGNAL = "abort.signal" const val OP_AUTH_CODEX_REFRESH = "auth.codexRefresh" @@ -81,4 +81,108 @@ object AimuxKotlinOps { const val OP_TRANSCRIPTION_START = "transcription.start" const val OP_TRANSPORT_CREATE = "transport.create" const val OP_VIDEO_GENERATE = "video.generate" + val TYPE_SCHEMA_HASHES: Map = mapOf( + "AnyValue" to "1277ba3a7f8d8ac87c32098666e636d643b6b12d05eb3929a9f018bcc4aa124d", + "[aimux_core::model_catalogue::RuntimeModel]" to "aa1da3dbae5d9c830298d255a2cd3bf3b539865ec0324018abcbe555f964f086", + "[aimux_core::session::SessionCall]" to "21e259cac0528023d45be7860ea838fcc6a785c0b26ebfe84f7e40b9b861458e", + "[aimux_core::session::SessionView]" to "61ad43e852b0e490ab586cd27d25eeb97b00bbfce8808dde6b6252a4aeb367af", + "[aimux_core::trace::store::SessionStepStat]" to "ad678575594f65b07dfcb9305b3360fa248d2a05acd3f1059a8cae039ad452cb", + "[aimux_core::trace::store::TraceStats]" to "03eb93cd7b38050c6e3be7e47f3c7ac13e617b26f03f03011d58d9d8dfd273aa", + "[aimux_provider_utils::package_descriptor::PackageDescriptor]" to "3a98399f69d62320aa747123ec3ede231cd955ced29e36dc401ccc9a82fedc8a", + "[uint8]" to "7c82b8345d5b5e8e5c561ac91d6d94e05d221e5c52f729fdde3a6e3e3b6af77d", + "aimux_core::decision_model::DecideResult" to "3d50c7ec8e3cce59ea94e9555c93965d03d50d5581e5c3cf214dfe1fdaac0053", + "aimux_core::embedding_model::EmbeddingCallOptions" to "1f6db6e963bb7d969a1cb8da125ba836fe8711635d34902b674033e0aefa934d", + "aimux_core::embedding_model::EmbeddingResult" to "af3ce0787db6208be114613c78dc02f038cb5dc2f7abcf6a4ade2be79085342e", + "aimux_core::files_model::UploadFileResult" to "0d17fd3dbfa601e45c9fabf62f9bb1e5028591443eafccd4eecacef0dcda0368", + "aimux_core::generate::GenerateObjectResult" to "21cca82de06d366b0f47d781bd49141bb63215accdd1133bb360113a60b7cc00", + "aimux_core::generate::GenerateTextResult" to "c5c6016de2c926c85144959d9436c9d2214a27a9724e75d68393e933ef7263f5", + "aimux_core::image_model::ImageCallOptions" to "ddacb8970cef4590bcdcc572ced361b181d501d3b474a2d6c50a9c0c02af3eb2", + "aimux_core::image_model::ImageResult" to "a9d2d939f3dc153a5b5ebc8083bea1226ff63ff2e54e4e275c9ab2b136b9e880", + "aimux_core::openai_output::ChatCompletion" to "503195cbe7fe458d9403a9de20b93bd17c20bbee0de40a8088bf3847ee835ad9", + "aimux_core::openai_output::ChatCompletionChunk" to "b15bd0f02f12fa4e220a1b8e5d82ca24c7486557a04c550d30b90a297b372311", + "aimux_core::recording::Recording" to "56fa358fb2023da68837722ed573e00fc997506403d7c7aa516c586c45b4fd54", + "aimux_core::reranking_model::RerankingCallOptions" to "c481b6e7c4d5e71ea7db00166ab2952c8a893443f786a61374c7398b4e475e4c", + "aimux_core::reranking_model::RerankingResult" to "d757826963b3ce836e4d76fca8f42455a3a3146c20f3fb74f58cabe465348d01", + "aimux_core::search_model::SearchCallOptions" to "3b963a871e6f1858db03b68adc74c5f898d4a2c3c0506e4e359b8d8198d30b22", + "aimux_core::search_model::SearchResult" to "61075439fcb4276085a11113195dd13220b710cc0c2199ceefa4ec3d07d0195f", + "aimux_core::speech_model::SpeechCallOptions" to "418be167c89bca652fb0a9dd52a1da359c1ecc2b069b9d2a0859ab76a7f7f431", + "aimux_core::speech_model::SpeechResult" to "8d32e22e24d7ee19a7c2f6cedaf909b6952aa76d635aa4e568e333ed5b45ce07", + "aimux_core::stream_part::TextStreamPart" to "c3e035afcbb44740877b943b8ce19e5ac855fd3eaa9ee3d17a936cf7521d7ffc", + "aimux_core::tool::ToolCall" to "ea7bd676d207cc40ac1d64442d114b041b7ac60db5420e1f200cc6a8af88d48c", + "aimux_core::trace::record::TraceRecord" to "29acdf296b3cd896422357ec1c829fddef38a0455afd825cb7a49f0cb9a8b74d", + "aimux_core::trace::store::SessionChainView" to "f5f242da28123fec7907b886dc1debfb4099cfa415074db3476f09712a6c34ca", + "aimux_core::transcription_model::TranscriptionCallOptions" to "2a5cf741b2362497e51d0f33b275e01a9dcd336c08623c8617062b83f958aa10", + "aimux_core::transcription_model::TranscriptionResult" to "80f153139ed0a65101df69711f15972bfee3154d5452ee8db11585376f31b5fc", + "aimux_core::video_model::VideoCallOptions" to "d474a1301928fac38b4d5f06950a91285fc039a7910b51cda8b6ec84cbde9252", + "aimux_core::video_model::VideoResult" to "b6fbefd485c75a364d0230349c85d9e222efad481dfde42d35332cbe14d2e09d", + "aimux_ops::envelope::ErrorEnvelope" to "48e1305879bb316b0ab5a77b866d6a2dd5c9c2af7f4d9c39f31656d5e7150ce6", + "aimux_ops::frame::StreamFrame" to "ce40166decce7b747c1ce7d8f887c5b820577e682df4568e06653de6d3e0c40c", + "aimux_ops::handle::HandleId" to "1847d76248c899504e814a58f8771ef59f77fb8b1cca2090193a272bdbd0d6b8", + "aimux_ops::operation::CancelResult" to "f166988845b50fd6ae7913505cff98100de52447ba7e297e79f7c6c9b569d02f", + "aimux_ops::operation::OperationStatus" to "abeda07e7224a93d1dce678575101d846d68c0c6b24482fb0408b19cb0f52e6b", + "aimux_ops::ops::composite::MoaParams" to "2510e5a1226e6f5742ba6f8331a6a1dc6ee48144c88143db25d1d213a842e4c3", + "aimux_ops::ops::composite::RouterParams" to "a7db760e7a4e1b6624433d6609408a9136d869bf415c4f5a462011ac3164c3cb", + "aimux_ops::ops::decision::DecisionDecideRequest" to "e2a9893b9dfa971db96e94eaf7b853f0daebeb152500d9c4851127abfde5802d", + "aimux_ops::ops::files::UploadFileParams" to "136396c0be1014277cef6f30633f16d3ecc08d5392f1f53fa5ebbc2af0eba17c", + "aimux_ops::ops::handles::CredentialParams" to "2a3ded4003c2d3257653c6ef4613f9defff748954cd9325c6aa98674cb080894", + "aimux_ops::ops::handles::HandleResult" to "01fe7a49695da49143a48c0c53ec9b1ff4099dbc108770194430c38fe71f01c2", + "aimux_ops::ops::handles::MiddlewareParams" to "f2789f63feb7b414d3f867c2a84dc298a53ace8d84082367e989161b769ec6ce", + "aimux_ops::ops::handles::TransportParams" to "86e40584fcc21dab8f0017f8e892b776ac24aaa9afc943ba805828cecc6e1a4c", + "aimux_ops::ops::misc::CatalogueFetchRequest" to "2ceed496996ec6cf32d3e3115ab6a4346a1bb201dc8a970eefbd46eb700a310e", + "aimux_ops::ops::misc::CodexRefreshRequest" to "59f1075ed68cb79896d4bac1d0ab32d21fb5855012c6336652bea0c4969ac926", + "aimux_ops::ops::misc::OpenAiOutputRequest" to "b0c6acc344f0b23b9ea3b693aeadf7aed7eb4fbdfce4b957be83af1154b842b4", + "aimux_ops::ops::misc::ToolRepairApplyRequest" to "0f430fdb223759ef7c48c4d7f824e7be74d29295a6b4f7caaf82b5acba25e538", + "aimux_ops::ops::misc::ToolRepairApplyResultRequest" to "fa092862004654e065233b2df2abdbec3befe88d9d734d494679968a5b6e954a", + "aimux_ops::ops::misc::ToolRepairContextRequest" to "81bae04c56aac3380b75de639d162f819a2dd5717147a53cf1a75281727d78a1", + "aimux_ops::ops::misc::ToolRepairContextResult" to "fd8173e6ec40724fa4207e3571e290ac12e4db1fed08a709273e2982a82b504f", + "aimux_ops::ops::operation::EmptyParams" to "1612408252a424283a43a92193bb8ea24f72c08b9f0d2117b4ef7f5a090e37f8", + "aimux_ops::ops::operation::OperationNextParams" to "127fea618826e51576ae488dcccaca03c04b774a847a33ec9c47565396862bb7", + "aimux_ops::ops::operation::OperationPollResult" to "ec9af646d9b26de004871b4427201b8185677bbbeaf48a1dd489e72e1b126ea1", + "aimux_ops::ops::operation::TranscriptionStartParams" to "c863c6f84c5715193078c914c25a5c575c625d77cf3b64ad4029253268d56226", + "aimux_ops::ops::provider::HandleResult" to "cea9958b3ff5c8896bab683db36a396bef563c35ec0121b77d51e9475d5d8df5", + "aimux_ops::ops::provider::ProviderCreateParams" to "e65cb5322863a2d16af50745cca82873cd03fa2578320c1796570b37efd2c1bb", + "aimux_ops::ops::provider::ProviderCustomParams" to "bc40024b5e1794bc8e2bd52bfa9b661b90ad9aa8ba94639ba9120b46bbbf0f90", + "aimux_ops::ops::provider::ProviderDefaultParams" to "bb2aff39ad05a28afcc9f4fd8e7e7b30cf3c7ac7b5bd483e002f78f6db737299", + "aimux_ops::ops::provider::ProviderDescriptorsParams" to "fa195301dd402853e4cca7cf0ba2843c550c96ef0dc179ec50516394a9435dc0", + "aimux_ops::ops::provider::ProviderInvokeParams" to "b33bb79b85db5289152f563021ba9c4285538122d70fe16333b64c94a011fc78", + "aimux_ops::ops::provider::ProviderModelParams" to "a9db30c0dc6c71594875748792ddce9f46707696842e45beaceaf474856fbcad", + "aimux_ops::ops::provider::ProviderWrapParams" to "a7f59ed924a355d14ad795b37993983fc5c2f2125f9c813ce4b561a0fca7fd62", + "aimux_ops::ops::recording::CreateRecorderParams" to "a951e5dde168e1621d21834415cac68c793244158e1fb0f5171dfda8b0bf71c5", + "aimux_ops::ops::recording::EmptyParams" to "58802ed68aeb4b87ba67d24b728037be53e63706a4f29055005f14ad068c8777", + "aimux_ops::ops::recording::RecorderExport" to "6d3226d3859134361f1dec0429a87c28342d7c5548ea175d535b92d4a49ee8e5", + "aimux_ops::ops::recording::RecorderHandleResult" to "f16095d906b62f7fbf86800f6e39e3e89bd6ef1bc65776569795b3555e9025cc", + "aimux_ops::ops::recording::RecorderStats" to "5f842b6b1bd0816d07e6f179890f79dddae8815c180824405a9e5ad9dd7871a0", + "aimux_ops::ops::registry::HandleResult" to "5f78b2970033052ccdef6827004094c65e9ee35ddc6f80d6c8a619c4db63b05a", + "aimux_ops::ops::registry::ModelInfo" to "291dc73d80dbe44be78b15e9deaa60ba253f0c47fc5cfdbffef3bd5cf4b94f36", + "aimux_ops::ops::registry::ModelInfoParams" to "c357f2b2342be3bf5f680e816188a4d7b3758a399975eb77a599a82f633d8974", + "aimux_ops::ops::registry::ModelResolveParams" to "cfcd1fab460d33db7141f397064edf1481f0024248a7a6f256f8cbfbd3c6eaee", + "aimux_ops::ops::registry::ModelWrapParams" to "c5f9703fca04c72df6f3c1c76dea3a130c3e84e37dbc3f18ef58fcf9745f4781", + "aimux_ops::ops::registry::RegistryCreateParams" to "6df3075b2b59076de76283d00d4853a4c0da0345c7396cee4a4ad69240290573", + "aimux_ops::ops::registry::RegistryFromConfigParams" to "26872ba0751baac107c59a0aa962fa102cc778c661b7bd7b8bd1ccd4226b97ae", + "aimux_ops::ops::registry::RegistryListParams" to "c1c477df7aefa646daf05cd316526138109cadd655dd219200531d72eff3260c", + "aimux_ops::ops::registry::RegistryListResult" to "26049e7c68ea45b9e322f693c49755e0db476d91631f2a1aa864659b9b87a773", + "aimux_ops::ops::registry::RegistryProviderParams" to "d6379c789feb67435e795d0213dfd2fd74d9276465a8f13622327864cb025fb4", + "aimux_ops::ops::registry::RegistryUpdateParams" to "9cde136591d14543027538bfa38331059c9865efa2cb89cbf6b2866bdcd21e9e", + "aimux_ops::ops::registry::RegistryUpdateResult" to "3e2738ff293183afb575f47bd75daa8afd330f09e43cb4a39de975d97ba16c5b", + "aimux_ops::ops::replay::ReplayCreateParams" to "ee64b5b5843103f76ca2166aed2f58995e472be93cb7bb18dea8238c8a2d9e44", + "aimux_ops::ops::replay::ReplayInspection" to "7ac2af62f3421f8c7c50867a838f0aff90f35b6a4f192f6c0d5347ab4699108c", + "aimux_ops::ops::replay::ReplayLiveParams" to "e99c7d51fb194def185f5a03d84bfc226eb1b101eade0b885216332605318a4d", + "aimux_ops::ops::replay::ReplayLiveResult" to "bd9959dd7e0300cb57e6929b2ed29b7e07dcb5aaf65be16b96e34bf8d6577a7f", + "aimux_ops::ops::replay::ReplayPlan" to "5cc6667b9fac6de173bf5b55c1a76a491255f89f0fa7a27c0fd33fd790259799", + "aimux_ops::ops::replay::ReplaySessionHandle" to "5e779b71ce2a54e59948c605cdfc48797d0760027ad5f44966df958fe9781d11", + "aimux_ops::ops::runtime::RuntimeConfigureParams" to "e3b24b9f1fbdf2be7da210f15060803cf8bfdef77c8b2ad330a5b501263dfb0f", + "aimux_ops::ops::runtime::RuntimeDescribeParams" to "c3db9b36a42e2bfda8823a35aadc8f6b183dcb46fd7256aeb66505289874b96d", + "aimux_ops::ops::session::SessionStoreCallsParams" to "ddd482204fdd305bbfd28d43ae829d8c286f3f8906302ca6679743ea680fedda", + "aimux_ops::ops::session::SessionStoreCreateParams" to "080d865c349ec86553f72b99ab1c65ddbb72d0c348a96dc17135a934d787cd86", + "aimux_ops::ops::session::SessionStoreHandle" to "755d437d47d362474942fc4a09f5f8c80b75cf362ac16b25b262e33a760b4c6a", + "aimux_ops::ops::text::OpenAiTextRequest" to "59293b18b6124a9a394113b8f94f637c65dc35ac44a30f7e0df70855e885f8e4", + "aimux_ops::ops::text::TextRequest" to "3a6f59c1f0c3b7ded5f5509d93afe9bddd2b80a8a3cd752d79f97edadae40c3d", + "aimux_ops::ops::trace::TraceAggregateParams" to "1b207f0bbe1b7ce7e9b8b0beb9334cf3cc4f9f05382911aaacfe0425dc8ff2c8", + "aimux_ops::ops::trace::TraceCreateParams" to "59fef52f382800570e861ae9ca92433dcae8807679d914a89ce99705713301d9", + "aimux_ops::ops::trace::TraceSessionParams" to "3e2300f6c65f6dcd52a016eba648a29abeff3a9d67c3b04a95617aa66832f810", + "aimux_providers::catalogue::Catalogue" to "6e0128414c8cce09930fea4c68daf7739f9c79072f240bcb9d786eabeaf53b41", + "aimux_providers::codex::CodexTokens" to "0925e12b12a645e10306277a7d46fad9d646ce829acef378d223d53800256321", + "null" to "0b04deb4d538ba0de2ab6920bc3b185241775a867937e5875a50ff54be3b9d56", + "string" to "0d6cbdd2f60c1f2f337739faaafd28ef3e743416ad7a52645a808613733dcab5" + ) } diff --git a/bindings/node/README.md b/bindings/node/README.md index 6711d14f4..1855c4468 100644 --- a/bindings/node/README.md +++ b/bindings/node/README.md @@ -62,8 +62,9 @@ inspect its result before closing; finalization does not flush. Dropping a provider does not revoke a model's strong reference. Dropping an Operation cancels it; dropping an Abort releases the handle without signalling shared work. -The binding requires the exact generated ABI version, ops version and manifest -`digest` at load, and exposes the verified manifest and digest. +The binding checks the generated ABI version, ops version, and manifest +compatibility (`MANIFEST_DIGEST` fast-path with full `TYPE_SCHEMA_HASHES` +`schemaHash` fallback) at load, and exposes `manifest` and `manifestDigest` on `Client` and raw `Runtime`. Run `npm run test:facade` for the JSON-transport facade tests (Node with TypeScript stripping, 22.18+). These tests use a transport double. Run `npm run test:native` after @@ -87,6 +88,6 @@ same provider, registry, trace, recorder, session, replay and error vectors. Recorder, session storage and inference state are process-wide. Trace middleware wraps language models using a TraceStore. Credential resolver creation and replay -transport capabilities report UnsupportedFunctionality. Recording schemas -are unchanged; business type schema generation and per-platform installation -verification are separate release work. +transport capabilities report UnsupportedFunctionality. Recording schemas and +per-type DTO schemas/hashes (`schema/types/*.json`, `TYPE_SCHEMA_HASHES`) are +generated; per-platform installation verification remains separate release work. diff --git a/bindings/node/__test__/dto.test.ts b/bindings/node/__test__/dto.test.ts index b3040745c..a6590a1c3 100644 --- a/bindings/node/__test__/dto.test.ts +++ b/bindings/node/__test__/dto.test.ts @@ -15,3 +15,27 @@ test('DTO vectors preserve decimal handle strings and optional nulls', () => { assert.deepEqual(roundTrip('StreamFrame', JSON.stringify(frame)), frame) assert.equal(roundTrip('HandleId', '"18446744073709551615"'), '18446744073709551615') }) + +test('DTO vectors reject strict unknown keys, bad enums, non-objects, and invalid handles', () => { + assert.throws(() => roundTrip('OperationNextParams', '{"timeoutMs":50,"extra":true}'), /Unknown field extra/) + assert.throws(() => roundTrip('OperationNextParams', '"not-an-object"'), /Expected object/) + assert.throws(() => roundTrip('FinishReasonUnified', '"future-reason"'), /Invalid FinishReasonUnified/) + assert.throws(() => roundTrip('HandleId', '"18446744073709551616"'), /Expected u64 string/) + assert.throws(() => roundTrip('HandleId', '123'), /Expected u64 string/) + assert.throws(() => roundTrip('OperationNextParams', '{"timeoutMs":-1}'), /Expected integer/) + assert.throws(() => roundTrip('OperationNextParams', '{"timeoutMs":1.00000000000000001}'), /Expected integer/) + assert.throws(() => roundTrip('OperationNextParams', '{"timeoutMs":18446744073709551616}'), /Expected integer/) + assert.deepEqual(roundTrip('OperationNextParams', '{"timeoutMs":18446744073709551615}'), { timeoutMs: 18446744073709551616 }) + assert.throws(() => roundTrip('TraceAggregateFilter', '{"sinceUnixMs":9223372036854775808}'), /Expected integer/) + assert.throws(() => roundTrip('TraceAggregateFilter', '{"sinceUnixMs":-9223372036854775809}'), /Expected integer/) + assert.throws(() => roundTrip('TraceAggregateFilter', '{"sinceUnixMs":-9223372036854775809e0}'), /Expected integer/) + assert.throws(() => roundTrip('TraceAggregateFilter', '{"sinceUnixMs":-9223372036854775808.1}'), /Expected integer/) + assert.throws(() => roundTrip('GenerateTextOptions', `{"temperature":1${'0'.repeat(309)}}`), /Expected number/) + assert.deepEqual(roundTrip('GenerateTextOptions', '{"temperature":1.00000000000000001}'), { temperature: 1 }) + assert.deepEqual(roundTrip('TraceAggregateFilter', '{"sinceUnixMs":9223372036854775807}'), { sinceUnixMs: 9223372036854775808 }) + assert.deepEqual(roundTrip('TraceAggregateFilter', '{"sinceUnixMs":-9223372036854775808}'), { sinceUnixMs: -9223372036854775808 }) + assert.throws(() => roundTrip('BackendConfig', '{"type":"ring","capacity":1,"extra":true}'), /Unknown field extra/) + assert.throws(() => roundTrip('StreamFrame', '{"type":"end","seq":"0","outcome":"success","extra":true}'), /Unknown field extra/) + assert.equal(roundTrip('HandleId', '"0001"'), '0001') + assert.deepEqual(roundTrip('BackendConfig', '{"type":"ring","capacity":1}'), { type: 'ring', capacity: 1 }) +}) diff --git a/bindings/node/__test__/dto_vectors.ts b/bindings/node/__test__/dto_vectors.ts index bbc4a63a9..6e8f32763 100644 --- a/bindings/node/__test__/dto_vectors.ts +++ b/bindings/node/__test__/dto_vectors.ts @@ -1,22 +1,54 @@ import { readFileSync } from 'node:fs' import { fileURLToPath } from 'node:url' -import { dtoTags, dtoTypeNames } from '../src/generated/dto_vectors.ts' +import { NonIntegerNumber, dtoTags, dtoTypeNames, validateDto } from '../src/generated/dto_vectors.ts' import type { DtoTypes } from '../src/generated/dto_vectors.ts' function isDtoType(type: string): type is keyof DtoTypes { return (dtoTypeNames as readonly string[]).includes(type) } +function parseExactInteger(source: string): bigint | null { + const match = /^(-?)([0-9]+)(?:\.([0-9]+))?(?:[eE]([+-]?[0-9]+))?$/.exec(source) + if (!match) return null + const frac = match[3] ?? '' + const digits = match[2] + frac + if (/^0+$/.test(digits)) return 0n + const exp = match[4] ? Number(match[4]) : 0 + if (!Number.isSafeInteger(exp)) return null + const shift = exp - frac.length + if (shift < 0) { + const cut = Math.max(0, digits.length + shift) + if (!/^0*$/.test(digits.slice(cut))) return null + const value = BigInt(digits.slice(0, cut) || '0') + return match[1] === '-' ? -value : value + } + if (shift > 30) return null + const value = BigInt(digits) * (10n ** BigInt(shift)) + return match[1] === '-' ? -value : value +} + +function parseForValidation(json: string): unknown { + return JSON.parse(json, (_key: string, value: unknown, context?: { source?: string }) => { + if (typeof value === 'number' && Number.isFinite(value) && typeof context?.source === 'string') { + const exact = parseExactInteger(context.source) + return exact !== null ? exact : new NonIntegerNumber(value) + } + return value + }) +} + export function roundTrip(type: K, json: string): DtoTypes[K] { - const value = JSON.parse(json) as DtoTypes[K] + const exact = parseForValidation(json) const tagged = dtoTags[type] if (tagged) { - const tag: unknown = value !== null && typeof value === 'object' - ? (value as Record)[tagged.tag] : undefined + const tag: unknown = exact !== null && typeof exact === 'object' + ? (exact as Record)[tagged.tag] : undefined if (typeof tag !== 'string' || !tagged.values.includes(tag)) { throw new Error(`Unknown ${type} tag: ${String(tag)}`) } } + validateDto(type, exact) + const value = JSON.parse(json) as DtoTypes[K] return JSON.parse(JSON.stringify(value)) as DtoTypes[K] } diff --git a/bindings/node/__test__/facade.test.ts b/bindings/node/__test__/facade.test.ts index 1c9db0891..dd813f4aa 100644 --- a/bindings/node/__test__/facade.test.ts +++ b/bindings/node/__test__/facade.test.ts @@ -1,6 +1,10 @@ import test from 'node:test' import assert from 'node:assert/strict' +import { createHash } from 'node:crypto' +import { readFileSync } from 'node:fs' import { createRequire } from 'node:module' +import { dirname, resolve } from 'node:path' +import { fileURLToPath } from 'node:url' import * as ops from '../src/generated/ops.ts' // Install the test transport before loading either public entrypoint. @@ -216,12 +220,33 @@ test('client pins the native contract before lazily reading and caching its mani const { Runtime } = require('./fixtures/native.cjs') const read = Runtime.prototype.manifestJson const digest = Runtime.prototype.manifestDigest + const abi = Runtime.prototype.abiVersion let reads = 0 Runtime.prototype.manifestJson = function () { reads++; return read.call(this) } try { Runtime.prototype.manifestDigest = () => 'stale' assert.throws(() => new Client(), error => error instanceof AimuxError && error.code === 302) + + Runtime.prototype.abiVersion = () => ops.ABI_VERSION + 1 + Runtime.prototype.manifestJson = () => { reads++; return '{invalid-json' } + reads = 0 + assert.throws(() => new Client(), error => error instanceof AimuxError && error.code === 302) + assert.equal(reads, 0) + + Runtime.prototype.abiVersion = abi + const validTypes = Object.entries(ops.TYPE_SCHEMA_HASHES).map(([id, schemaHash]) => ({ id, revision: '1', schemaHash })) + Runtime.prototype.manifestDigest = () => 'digest-a' + Runtime.prototype.manifestJson = () => JSON.stringify({ + abiVersion: ops.ABI_VERSION, + opsVersion: ops.OPS_VERSION, + digest: 'digest-b', + types: validTypes, + }) + assert.throws(() => new Client(), error => error instanceof AimuxError && error.code === 302) + + Runtime.prototype.manifestJson = function () { reads++; return read.call(this) } Runtime.prototype.manifestDigest = digest + reads = 0 const client = new Client() assert.equal(client.manifestDigest, ops.MANIFEST_DIGEST) assert.equal(reads, 0) @@ -231,9 +256,41 @@ test('client pins the native contract before lazily reading and caching its mani } finally { Runtime.prototype.manifestJson = read Runtime.prototype.manifestDigest = digest + Runtime.prototype.abiVersion = abi } }) +test('manifest handshake negotiates via per-type schema hashes when packages/digest change', () => { + const types = Object.entries(ops.TYPE_SCHEMA_HASHES).map(([id, schemaHash]) => ({ id, revision: '1', schemaHash })) + assert.ok(types.length > 0) + const negotiated = { + abiVersion: ops.ABI_VERSION, + opsVersion: ops.OPS_VERSION, + digest: 'changed-digest-from-new-package', + packages: ['openai', 'synthetic-extra-package'], + types, + } as unknown as rawApi.Manifest + rawApi.verifyManifest(negotiated) + + const targetType = types[0].id + const brokenTypes = types.map((entry, idx) => idx === 0 ? { ...entry, schemaHash: '0'.repeat(64) } : entry) + assert.throws(() => rawApi.verifyManifest({ ...negotiated, types: brokenTypes }), (error: unknown) => { + assert.ok(error instanceof AimuxError) + assert.equal(error.code, 302) + assert.ok(error.message.includes(ops.MANIFEST_DIGEST)) + assert.ok(error.message.includes(targetType)) + return true + }) + + assert.throws(() => rawApi.verifyManifest({ ...negotiated, types: types.slice(1) }), (error: unknown) => { + assert.ok(error instanceof AimuxError) + assert.equal(error.code, 302) + assert.ok(error.message.includes(ops.MANIFEST_DIGEST)) + assert.ok(error.message.includes(targetType)) + return true + }) +}) + test('typed serialization preserves plain options and nested handle references', async () => { const client = new Client() const provider = await client.provider({ package: 'openai', settings: { apiKey: 'test' } }) @@ -281,3 +338,27 @@ test('host callbacks are rejected instead of silently disappearing from settings const client = new Client() await assert.rejects(client.provider({ package: 'openai', settings: { fetch: async () => {} } }), error => error instanceof AimuxError && error.kind === 'binding' && error.code === 202) }) + +function canonicalManifestJson(value: unknown): string { + if (Array.isArray(value)) return `[${value.map(canonicalManifestJson).join(',')}]` + if (value !== null && typeof value === 'object') { + const record = value as Record + const keys = Object.keys(record).sort() + return `{${keys.map(key => `${JSON.stringify(key)}:${canonicalManifestJson(record[key])}`).join(',')}}` + } + return JSON.stringify(value) +} + +test('schema/manifest.json self-verifies after stripping digest and inputHash', () => { + const repoRoot = resolve(dirname(fileURLToPath(import.meta.url)), '../../..') + const emitted = JSON.parse(readFileSync(resolve(repoRoot, 'schema/manifest.json'), 'utf8')) as Record + assert.equal(emitted.digest, ops.MANIFEST_DIGEST) + assert.equal(emitted.inputHash, ops.MANIFEST_DIGEST) + const { digest: _digest, inputHash: _inputHash, ...unsigned } = emitted + const canonical = { + ...unsigned, + ops: [...(unsigned.ops as Array<{ name: string }>)].sort((a, b) => (a.name < b.name ? -1 : a.name > b.name ? 1 : 0)), + } + const actual = createHash('sha256').update(canonicalManifestJson(canonical)).digest('hex') + assert.equal(actual, ops.MANIFEST_DIGEST) +}) diff --git a/bindings/node/src/generated/dto_vectors.ts b/bindings/node/src/generated/dto_vectors.ts index e49e5f70c..0d07e2adc 100644 --- a/bindings/node/src/generated/dto_vectors.ts +++ b/bindings/node/src/generated/dto_vectors.ts @@ -689,3 +689,148 @@ export const dtoTypeNames = [ "VideoResult", "Warning", ] as const satisfies readonly (keyof DtoTypes)[] + +const dtoSchemas: Record = {"AiMuxError":{"k":"t","g":"name","v":[{"tv":"AI_APICallError","c":false,"f":{"cause":[false,["n",["r","ErrorCause"]]],"data":[false,"j"],"isRetryable":[true,"b"],"message":[true,"s"],"origin":[false,["r","ApiCallErrorOrigin"]],"providerCode":[false,["n","s"]],"requestBodyValues":[true,"j"],"responseBody":[false,["n","s"]],"responseHeaders":[false,["n",["m","s"]]],"statusCode":[false,["n",["i",true,16]]],"url":[true,"s"]}},{"tv":"AI_RetryError","c":false,"f":{"errors":[true,["a",["r","AiMuxError"]]],"reason":[true,["r","RetryErrorReason"]]}},{"tv":"AI_JSONParseError","c":false,"f":{"cause":[false,["n",["r","ErrorCause"]]],"message":[true,"s"]}},{"tv":"AI_NoOutputGeneratedError","c":false,"f":{"cause":[false,["n",["r","ErrorCause"]]],"message":[true,"s"]}},{"tv":"AI_InvalidResponseDataError","c":false,"f":{"cause":[false,["n",["r","ErrorCause"]]],"message":[true,"s"]}},{"tv":"AI_TypeValidationError","c":false,"f":{"cause":[false,["n",["r","ErrorCause"]]],"message":[true,"s"],"value":[true,"j"]}},{"tv":"AI_ToolCallNotFoundForApprovalError","c":false,"f":{"approvalId":[true,"s"],"toolCallId":[true,"s"]}},{"tv":"AI_NoSuchToolError","c":false,"f":{"availableTools":[false,["n",["a","s"]]],"toolInput":[false,["n","s"]],"toolName":[true,"s"]}},{"tv":"AI_InvalidToolInputError","c":false,"f":{"cause":[true,["r","ErrorCause"]],"toolInput":[true,"s"],"toolName":[true,"s"]}},{"tv":"AI_ToolCallRepairError","c":false,"f":{"cause":[true,["r","AiMuxError"]],"originalError":[true,["r","AiMuxError"]]}},{"tv":"AI_InvalidArgumentError","c":false,"f":{"cause":[false,["n",["r","ErrorCause"]]],"message":[true,"s"]}},{"tv":"AI_InvalidPromptError","c":false,"f":{"cause":[false,["n",["r","ErrorCause"]]],"message":[true,"s"]}},{"tv":"AI_LoadAPIKeyError","c":false,"f":{"description":[true,"s"],"envVar":[true,"s"]}},{"tv":"AI_LoadSettingError","c":false,"f":{"envVar":[true,"s"],"settingName":[true,"s"]}},{"tv":"AI_TokenExpiredError","c":false,"f":{"message":[true,"s"]}},{"tv":"AI_UnsupportedFunctionalityError","c":false,"f":{"message":[true,"s"]}},{"tv":"AI_NoSuchModelError","c":false,"f":{"modelId":[true,"s"],"modelType":[true,"s"]}},{"tv":"AI_NoSuchProviderError","c":false,"f":{"availableProviders":[true,["a","s"]],"modelId":[true,"s"],"modelType":[true,"s"],"providerId":[true,"s"]}},{"tv":"AI_MissingToolResultsError","c":false,"f":{"toolCallIds":[true,["a","s"]]}},{"tv":"AI_ToolChoiceViolationError","c":false,"f":{"content":[true,["a",["r","GenerateContent"]]],"finishReason":[true,["r","FinishReasonUnified"]],"modelId":[true,"s"],"provider":[true,"s"],"toolChoice":[true,["r","LanguageModelV4ToolChoice"]]}},{"tv":"TimeoutError","c":false,"f":{"message":[true,"s"]}},{"tv":"AbortError","c":false,"f":{"message":[true,"s"]}},{"tv":"AI_Error","c":false,"f":{"cause":[false,["n",["r","ErrorCause"]]],"message":[true,"s"]}}]},"AiMuxErrorInput":{"k":"t","g":"name","v":[{"tv":"AI_APICallError","c":false,"f":{"cause":[false,["n",["r","ErrorCauseInput"]]],"data":[false,"j"],"isRetryable":[false,"b"],"message":[true,"s"],"origin":[false,["r","ApiCallErrorOrigin"]],"providerCode":[false,["n","s"]],"requestBodyValues":[true,"j"],"responseBody":[false,["n","s"]],"responseHeaders":[false,["n",["m","s"]]],"statusCode":[false,["n",["i",true,16]]],"url":[true,"s"]}},{"tv":"AI_RetryError","c":false,"f":{"errors":[true,["a",["r","AiMuxErrorInput"]]],"reason":[true,["r","RetryErrorReason"]]}},{"tv":"AI_JSONParseError","c":false,"f":{"cause":[false,["n",["r","ErrorCauseInput"]]],"message":[true,"s"]}},{"tv":"AI_NoOutputGeneratedError","c":false,"f":{"cause":[false,["n",["r","ErrorCauseInput"]]],"message":[true,"s"]}},{"tv":"AI_InvalidResponseDataError","c":false,"f":{"cause":[false,["n",["r","ErrorCauseInput"]]],"message":[true,"s"]}},{"tv":"AI_TypeValidationError","c":false,"f":{"cause":[false,["n",["r","ErrorCauseInput"]]],"message":[true,"s"],"value":[true,"j"]}},{"tv":"AI_ToolCallNotFoundForApprovalError","c":false,"f":{"approvalId":[true,"s"],"toolCallId":[true,"s"]}},{"tv":"AI_NoSuchToolError","c":false,"f":{"availableTools":[false,["n",["a","s"]]],"toolInput":[false,["n","s"]],"toolName":[true,"s"]}},{"tv":"AI_InvalidToolInputError","c":false,"f":{"cause":[true,["r","ErrorCauseInput"]],"toolInput":[true,"s"],"toolName":[true,"s"]}},{"tv":"AI_ToolCallRepairError","c":false,"f":{"cause":[true,["r","AiMuxErrorInput"]],"originalError":[true,["r","AiMuxErrorInput"]]}},{"tv":"AI_InvalidArgumentError","c":false,"f":{"cause":[false,["n",["r","ErrorCauseInput"]]],"message":[true,"s"]}},{"tv":"AI_InvalidPromptError","c":false,"f":{"cause":[false,["n",["r","ErrorCauseInput"]]],"message":[true,"s"]}},{"tv":"AI_LoadAPIKeyError","c":false,"f":{"description":[true,"s"],"envVar":[true,"s"]}},{"tv":"AI_LoadSettingError","c":false,"f":{"envVar":[true,"s"],"settingName":[true,"s"]}},{"tv":"AI_TokenExpiredError","c":false,"f":{"message":[true,"s"]}},{"tv":"AI_UnsupportedFunctionalityError","c":false,"f":{"message":[true,"s"]}},{"tv":"AI_NoSuchModelError","c":false,"f":{"modelId":[true,"s"],"modelType":[false,"s"]}},{"tv":"AI_NoSuchProviderError","c":false,"f":{"availableProviders":[true,["a","s"]],"modelId":[true,"s"],"modelType":[true,"s"],"providerId":[true,"s"]}},{"tv":"AI_MissingToolResultsError","c":false,"f":{"toolCallIds":[true,["a","s"]]}},{"tv":"AI_ToolChoiceViolationError","c":false,"f":{"content":[true,["a",["r","GenerateContent"]]],"finishReason":[true,["r","FinishReasonUnified"]],"modelId":[true,"s"],"provider":[true,"s"],"toolChoice":[true,["r","LanguageModelV4ToolChoice"]]}},{"tv":"TimeoutError","c":false,"f":{"message":[true,"s"]}},{"tv":"AbortError","c":false,"f":{"message":[true,"s"]}},{"tv":"AI_Error","c":false,"f":{"cause":[false,["n",["r","ErrorCauseInput"]]],"message":[true,"s"]}}]},"ApiCallError":{"k":"s","c":false,"f":{"cause":[false,["n",["r","ErrorCause"]]],"data":[false,"j"],"isRetryable":[true,"b"],"message":[true,"s"],"origin":[false,["r","ApiCallErrorOrigin"]],"providerCode":[false,["n","s"]],"requestBodyValues":[true,"j"],"responseBody":[false,["n","s"]],"responseHeaders":[false,["n",["m","s"]]],"statusCode":[false,["n",["i",true,16]]],"url":[true,"s"]}},"ApiCallErrorInput":{"k":"s","c":false,"f":{"cause":[false,["n",["r","ErrorCauseInput"]]],"data":[false,"j"],"isRetryable":[false,"b"],"message":[true,"s"],"origin":[false,["r","ApiCallErrorOrigin"]],"providerCode":[false,["n","s"]],"requestBodyValues":[true,"j"],"responseBody":[false,["n","s"]],"responseHeaders":[false,["n",["m","s"]]],"statusCode":[false,["n",["i",true,16]]],"url":[true,"s"]}},"ApiCallErrorOrigin":{"k":"e","v":["transport","httpResponse","streamEvent","local","unknown"]},"AspectRatio":{"k":"a","t":"s"},"AssistantContent":{"k":"u","b":["s",["a",["r","AssistantContentPart"]]]},"AssistantContentPart":{"k":"t","g":"type","v":[{"tv":"text","c":false,"f":{"providerOptions":[false,["n",["m",["m","j"]]]],"text":[true,"s"]}},{"tv":"custom","c":false,"f":{"kind":[true,["r","NamespacedKind"]],"providerOptions":[false,["n",["m",["m","j"]]]]}},{"tv":"file","c":false,"f":{"data":[true,["r","FilePartData"]],"filename":[false,["n","s"]],"mediaType":[true,"s"],"providerOptions":[false,["n",["m",["m","j"]]]]}},{"tv":"reasoning","c":false,"f":{"providerOptions":[false,["n",["m",["m","j"]]]],"text":[true,"s"]}},{"tv":"reasoning-file","c":false,"f":{"data":[true,["r","ReasoningFilePartData"]],"mediaType":[true,"s"],"providerOptions":[false,["n",["m",["m","j"]]]]}},{"tv":"tool-call","c":false,"f":{"input":[true,"j"],"providerExecuted":[false,["n","b"]],"providerOptions":[false,["n",["m",["m","j"]]]],"toolCallId":[true,"s"],"toolName":[true,"s"]}},{"tv":"tool-result","c":false,"f":{"output":[true,["r","ToolResultOutput"]],"providerOptions":[false,["n",["m",["m","j"]]]],"toolCallId":[true,"s"],"toolName":[false,["n","s"]]}},{"tv":"tool-approval-request","c":false,"f":{"approvalId":[true,"s"],"inputSchemaInput":[false,"j"],"isAutomatic":[false,["n","b"]],"reason":[false,["n","s"]],"signature":[false,["n","s"]],"toolCallId":[true,"s"]}}]},"AssistantPart":{"k":"t","g":"type","v":[{"tv":"text","c":false,"f":{"providerOptions":[false,["n",["m",["m","j"]]]],"text":[true,"s"]}},{"tv":"file","c":false,"f":{"data":[true,["r","FileData"]],"filename":[false,["n","s"]],"mediaType":[true,"s"],"providerOptions":[false,["n",["m",["m","j"]]]]}},{"tv":"reasoning","c":false,"f":{"providerOptions":[false,["n",["m",["m","j"]]]],"text":[true,"s"]}},{"tv":"reasoning-file","c":false,"f":{"data":[true,["r","GeneratedFileData"]],"mediaType":[true,"s"],"providerOptions":[false,["n",["m",["m","j"]]]]}},{"tv":"custom","c":false,"f":{"kind":[true,["r","NamespacedKind"]],"providerOptions":[false,["n",["m",["m","j"]]]]}},{"tv":"tool-call","c":false,"f":{"input":[true,"j"],"providerExecuted":[false,["n","b"]],"providerOptions":[false,["n",["m",["m","j"]]]],"toolCallId":[true,"s"],"toolName":[true,"s"]}},{"tv":"tool-result","c":false,"f":{"output":[true,["r","LanguageModelToolResultOutput"]],"providerOptions":[false,["n",["m",["m","j"]]]],"toolCallId":[true,"s"],"toolName":[true,"s"]}}]},"AudioData":{"k":"a","t":"s"},"AudioInput":{"k":"a","t":"s"},"BackendConfig":{"k":"t","g":"type","v":[{"tv":"ring","c":true,"f":{"capacity":[false,["n",["i",true,64]]]}},{"tv":"jsonl","c":true,"f":{"directory":[true,"s"]}}]},"BreakKind":{"k":"e","v":["SystemChanged","ToolsChanged","ConversationReset","Unknown"]},"CancelResult":{"k":"e","v":["first","alreadyRequested","alreadyTerminal"]},"CapturePolicy":{"k":"e","v":["full"]},"Catalogue":{"k":"s","c":false,"f":{"specs":[true,["m",["m",["r","ModelSpec"]]]],"unmapped":[false,["m",["m",["r","ModelSpec"]]]],"updatedAt":[true,["i",true,64]]}},"CatalogueFetchRequest":{"k":"s","c":true,"f":{"abort":[false,["n",["r","HandleIdInput"]]],"sourceUrl":[false,["n","s"]]}},"CatalogueSource":{"k":"e","v":["Anya2a","ModelsDev","Manual"]},"ChatCompletion":{"k":"s","c":false,"f":{"choices":[true,["a",["r","ChatCompletionChoice"]]],"created":[true,["i",true,64]],"id":[true,"s"],"model":[true,"s"],"object":[true,"s"],"system_fingerprint":[false,["n","s"]],"usage":[true,["r","ChatCompletionUsage"]]}},"ChatCompletionChoice":{"k":"s","c":false,"f":{"finish_reason":[true,["n","s"]],"index":[true,["i",true,32]],"logprobs":[false,"j"],"message":[true,["r","ChatCompletionMessage"]]}},"ChatCompletionChunk":{"k":"s","c":false,"f":{"choices":[true,["a",["r","ChatCompletionChunkChoice"]]],"created":[true,["i",true,64]],"id":[true,"s"],"model":[true,"s"],"object":[true,"s"],"usage":[false,["n",["r","ChatCompletionUsage"]]]}},"ChatCompletionChunkChoice":{"k":"s","c":false,"f":{"delta":[true,["r","ChatCompletionDelta"]],"finish_reason":[true,["n","s"]],"index":[true,["i",true,32]],"logprobs":[false,"j"]}},"ChatCompletionChunkFunction":{"k":"s","c":false,"f":{"arguments":[false,["n","s"]],"name":[false,["n","s"]]}},"ChatCompletionChunkToolCall":{"k":"s","c":false,"f":{"function":[true,["r","ChatCompletionChunkFunction"]],"id":[false,["n","s"]],"index":[true,["i",true,32]],"type":[false,["n","s"]]}},"ChatCompletionDelta":{"k":"s","c":false,"f":{"content":[false,["n","s"]],"reasoning_content":[false,["n","s"]],"role":[false,["n","s"]],"tool_calls":[false,["n",["a",["r","ChatCompletionChunkToolCall"]]]]}},"ChatCompletionFunction":{"k":"s","c":false,"f":{"arguments":[true,"s"],"name":[true,"s"]}},"ChatCompletionMessage":{"k":"s","c":false,"f":{"annotations":[false,["n",["a","j"]]],"content":[true,["n","s"]],"reasoning_content":[false,["n","s"]],"role":[true,"s"],"tool_calls":[false,["n",["a",["r","ChatCompletionToolCall"]]]]}},"ChatCompletionToolCall":{"k":"s","c":false,"f":{"function":[true,["r","ChatCompletionFunction"]],"id":[true,"s"],"type":[true,"s"]}},"ChatCompletionUsage":{"k":"s","c":false,"f":{"completion_tokens":[true,["i",true,32]],"completion_tokens_details":[false,["n",["r","CompletionTokensDetails"]]],"prompt_tokens":[true,["i",true,32]],"prompt_tokens_details":[false,["n",["r","PromptTokensDetails"]]],"total_tokens":[true,["i",true,32]]}},"CodexModeSpec":{"k":"t","g":"type","v":[{"tv":"apiKey","c":true,"f":{"apiKey":[false,["n",["r","StringOrEnv"]]]}},{"tv":"chatGptAccount","c":true,"f":{"accountId":[false,["n","s"]],"token":[true,["r","StringOrEnv"]]}}]},"CodexRefreshRequest":{"k":"s","c":true,"f":{"clientId":[true,"s"],"refreshToken":[true,"s"]}},"CodexTokens":{"k":"s","c":false,"f":{"access_token":[true,"s"],"expires_in_secs":[true,["n",["i",true,64]]],"refresh_token":[true,["n","s"]]}},"CompletionTokensDetails":{"k":"s","c":false,"f":{"reasoning_tokens":[false,["n",["i",true,32]]]}},"ContentPart":{"k":"t","g":"type","v":[{"tv":"text","c":false,"f":{"providerMetadata":[false,["n",["m",["m","j"]]]],"text":[true,"s"]}},{"tv":"custom","c":false,"f":{"kind":[true,["r","NamespacedKind"]],"providerMetadata":[false,["n",["m",["m","j"]]]]}},{"tv":"reasoning","c":false,"f":{"providerMetadata":[false,["n",["m",["m","j"]]]],"text":[true,"s"]}},{"tv":"reasoning-file","c":false,"f":{"file":[true,["r","GeneratedFile"]],"providerMetadata":[false,["n",["m",["m","j"]]]]}},{"tv":"source","c":false,"f":{"id":[true,"s"],"providerMetadata":[false,["n",["m",["m","j"]]]],"sourceType":[true,["l","url"]],"title":[false,["n","s"]],"url":[true,"s"]}},{"tv":"source","c":false,"f":{"filename":[false,["n","s"]],"id":[true,"s"],"mediaType":[true,"s"],"providerMetadata":[false,["n",["m",["m","j"]]]],"sourceType":[true,["l","document"]],"title":[true,"s"]}},{"tv":"file","c":false,"f":{"file":[true,["r","GeneratedFile"]],"providerMetadata":[false,["n",["m",["m","j"]]]]}},{"tv":"tool-call","c":false,"f":{"dynamic":[false,["n","b"]],"error":[false,["n",["r","AiMuxError"]]],"input":[true,"j"],"invalid":[false,["n","b"]],"providerExecuted":[false,["n","b"]],"providerMetadata":[false,["n",["m",["m","j"]]]],"toolCallId":[true,"s"],"toolName":[true,"s"]}},{"tv":"tool-result","c":false,"f":{"dynamic":[false,["n","b"]],"input":[false,"j"],"output":[true,"j"],"preliminary":[false,["n","b"]],"providerExecuted":[false,["n","b"]],"providerMetadata":[false,["n",["m",["m","j"]]]],"toolCallId":[true,"s"],"toolName":[true,"s"]}},{"tv":"tool-error","c":false,"f":{"dynamic":[false,["n","b"]],"error":[true,"j"],"input":[false,"j"],"providerExecuted":[false,["n","b"]],"providerMetadata":[false,["n",["m",["m","j"]]]],"toolCallId":[true,"s"],"toolName":[true,"s"]}},{"tv":"tool-approval-request","c":false,"f":{"approvalId":[true,"s"],"isAutomatic":[false,["n","b"]],"reason":[false,["n","s"]],"signature":[false,["n","s"]],"toolCall":[true,["r","TypedToolCall"]]}},{"tv":"tool-approval-response","c":false,"f":{"approvalId":[true,"s"],"approved":[true,"b"],"providerExecuted":[false,["n","b"]],"reason":[false,["n","s"]],"toolCall":[true,["r","TypedToolCall"]]}}]},"ContentPartInput":{"k":"t","g":"type","v":[{"tv":"text","c":false,"f":{"providerMetadata":[false,["n",["m",["m","j"]]]],"text":[true,"s"]}},{"tv":"custom","c":false,"f":{"kind":[true,["r","NamespacedKind"]],"providerMetadata":[false,["n",["m",["m","j"]]]]}},{"tv":"reasoning","c":false,"f":{"providerMetadata":[false,["n",["m",["m","j"]]]],"text":[true,"s"]}},{"tv":"reasoning-file","c":false,"f":{"file":[true,["r","GeneratedFile"]],"providerMetadata":[false,["n",["m",["m","j"]]]]}},{"tv":"source","c":false,"f":{"id":[true,"s"],"providerMetadata":[false,["n",["m",["m","j"]]]],"sourceType":[true,["l","url"]],"title":[false,["n","s"]],"url":[true,"s"]}},{"tv":"source","c":false,"f":{"filename":[false,["n","s"]],"id":[true,"s"],"mediaType":[true,"s"],"providerMetadata":[false,["n",["m",["m","j"]]]],"sourceType":[true,["l","document"]],"title":[true,"s"]}},{"tv":"file","c":false,"f":{"file":[true,["r","GeneratedFile"]],"providerMetadata":[false,["n",["m",["m","j"]]]]}},{"tv":"tool-call","c":false,"f":{"dynamic":[false,["n","b"]],"error":[false,["n",["r","AiMuxErrorInput"]]],"input":[true,"j"],"invalid":[false,["n","b"]],"providerExecuted":[false,["n","b"]],"providerMetadata":[false,["n",["m",["m","j"]]]],"toolCallId":[true,"s"],"toolName":[true,"s"]}},{"tv":"tool-result","c":false,"f":{"dynamic":[false,["n","b"]],"input":[false,"j"],"output":[true,"j"],"preliminary":[false,["n","b"]],"providerExecuted":[false,["n","b"]],"providerMetadata":[false,["n",["m",["m","j"]]]],"toolCallId":[true,"s"],"toolName":[true,"s"]}},{"tv":"tool-error","c":false,"f":{"dynamic":[false,["n","b"]],"error":[true,"j"],"input":[false,"j"],"providerExecuted":[false,["n","b"]],"providerMetadata":[false,["n",["m",["m","j"]]]],"toolCallId":[true,"s"],"toolName":[true,"s"]}},{"tv":"tool-approval-request","c":false,"f":{"approvalId":[true,"s"],"isAutomatic":[false,["n","b"]],"reason":[false,["n","s"]],"signature":[false,["n","s"]],"toolCall":[true,["r","TypedToolCallInput"]]}},{"tv":"tool-approval-response","c":false,"f":{"approvalId":[true,"s"],"approved":[true,"b"],"providerExecuted":[false,["n","b"]],"reason":[false,["n","s"]],"toolCall":[true,["r","TypedToolCallInput"]]}}]},"CreateRecorderParams":{"k":"s","c":true,"f":{"backend":[true,["r","BackendConfig"]],"capturePolicy":[true,["r","CapturePolicy"]]}},"CredentialParams":{"k":"s","c":true,"f":{"kind":[true,"s"]}},"CustomPart":{"k":"s","c":false,"f":{"kind":[true,["r","NamespacedKind"]],"providerOptions":[false,["n",["m",["m","j"]]]]}},"DecideOptions":{"k":"s","c":true,"f":{"headers":[false,["n",["m","s"]]],"maxRetries":[false,["n",["i",true,32]]],"providerOptions":[false,["n",["m",["m","j"]]]],"questions":[true,["m",["r","DecisionQuestion"]]],"state":[true,["r","DecisionInput"]],"timeout":[false,["n",["r","TimeoutConfiguration"]]]}},"DecideResult":{"k":"s","c":false,"f":{"answers":[true,["m",["r","DecisionAnswer"]]],"providerMetadata":[false,["n",["m",["m","j"]]]],"response":[true,["r","ResponseInfo"]],"rounding":[false,["n",["r","DecisionRounding"]]],"usage":[true,["r","DecideUsage"]],"warnings":[true,["a",["r","Warning"]]]}},"DecideUsage":{"k":"s","c":false,"f":{"inputTokens":[false,["n",["i",true,32]]],"outputTokens":[false,["n",["i",true,32]]],"totalTokens":[false,["n",["i",true,32]]]}},"DecisionAnswer":{"k":"t","g":"type","v":[{"tv":"choice","c":false,"f":{"choice":[true,"s"],"probabilities":[false,["n",["m","f"]]]}},{"tv":"score","c":false,"f":{"probabilities":[false,["n",["m","f"]]],"score":[true,"f"]}},{"tv":"boolean","c":false,"f":{"probability":[true,"f"]}}]},"DecisionBooleanCriteria":{"k":"s","c":true,"f":{"false":[false,["n",["r","DecisionInput"]]],"true":[false,["n",["r","DecisionInput"]]]}},"DecisionDecideRequest":{"k":"s","c":true,"f":{"abort":[false,["n",["r","HandleIdInput"]]],"options":[true,["r","DecideOptions"]]}},"DecisionInput":{"k":"u","b":["s",["m","j"],["a","j"]]},"DecisionQuestion":{"k":"t","g":"type","v":[{"tv":"choice","c":false,"f":{"criteria":[true,["m",["n",["r","DecisionInput"]]]],"instructions":[true,["r","DecisionInput"]]}},{"tv":"score","c":false,"f":{"criteria":[true,["a",["n",["r","DecisionInput"]]]],"instructions":[true,["r","DecisionInput"]]}},{"tv":"boolean","c":false,"f":{"criteria":[false,["n",["r","DecisionBooleanCriteria"]]],"instructions":[true,["r","DecisionInput"]]}}]},"DecisionRounding":{"k":"s","c":false,"f":{"probabilityDecimals":[false,["n",["i",true,32]]],"scoreDecimals":[false,["n",["i",true,32]]]}},"EmbeddingCallOptions":{"k":"s","c":true,"f":{"headers":[false,["n",["m","s"]]],"maxRetries":[false,["n",["i",true,32]]],"providerOptions":[false,["n",["m",["m","j"]]]],"timeout":[false,["n",["r","TimeoutConfiguration"]]],"values":[true,["a","s"]]}},"EmbeddingResponse":{"k":"s","c":false,"f":{"body":[false,"j"],"headers":[false,["n",["m","s"]]]}},"EmbeddingResult":{"k":"s","c":false,"f":{"embeddings":[true,["a",["a","f"]]],"providerMetadata":[false,["n",["m",["m","j"]]]],"response":[false,["n",["r","EmbeddingResponse"]]],"usage":[false,["n",["r","EmbeddingUsage"]]],"warnings":[true,["a",["r","Warning"]]]}},"EmbeddingUsage":{"k":"s","c":false,"f":{"tokens":[true,["i",true,32]]}},"EmptyParams":{"k":"s","c":true,"f":{}},"EnvVarRef":{"k":"s","c":true,"f":{"env":[true,"s"]}},"ErrorCause":{"k":"u","b":[["r","AiMuxError"],["r","SourceError"]]},"ErrorCauseInput":{"k":"u","b":[["r","AiMuxErrorInput"],["r","SourceError"]]},"ErrorDomain":{"k":"e","v":["aimux","recording","binding","protocol"]},"ErrorEnvelope":{"k":"s","c":false,"f":{"code":[true,["i",false,32]],"error":[true,"j"],"kind":[true,["r","ErrorDomain"]],"message":[true,"s"]}},"Fallback":{"k":"e","v":["on-error","none"]},"FileBytes":{"k":"a","t":"s"},"FileData":{"k":"t","g":"type","v":[{"tv":"data","c":false,"f":{"data":[true,["r","FileBytes"]]}},{"tv":"url","c":false,"f":{"originalUrl":[false,["n","s"]],"url":[true,"s"]}},{"tv":"reference","c":false,"f":{"reference":[true,["m","s"]]}},{"tv":"text","c":false,"f":{"text":[true,"s"]}}]},"FilePart":{"k":"s","c":false,"f":{"data":[true,["r","FileData"]],"filename":[false,["n","s"]],"mediaType":[true,"s"],"providerOptions":[false,["n",["m",["m","j"]]]]}},"FilePartData":{"k":"u","b":[["r","FileData"],"s",["m","s"]]},"Fingerprint":{"k":"s","c":false,"f":{"blockHashes":[true,["a","s"]],"blockSize":[true,["i",true,64]],"bodyHash":[true,"s"],"lenBytes":[true,["i",true,64]],"tokenEstimate":[true,["i",true,64]]}},"FinishReasonUnified":{"k":"e","v":["stop","length","content-filter","tool-calls","error","other"]},"FunctionTool":{"k":"s","c":false,"f":{"description":[false,["n","s"]],"inputExamples":[false,["n",["a",["r","FunctionToolInputExample"]]]],"inputSchema":[true,"j"],"name":[true,"s"],"providerOptions":[false,["n",["m",["m","j"]]]],"strict":[false,["n","b"]]}},"FunctionToolInputExample":{"k":"s","c":false,"f":{"input":[true,["m","j"]]}},"GenerateContent":{"k":"t","g":"type","v":[{"tv":"text","c":false,"f":{"providerMetadata":[false,["n",["m",["m","j"]]]],"text":[true,"s"]}},{"tv":"tool-call","c":false,"f":{"dynamic":[false,["n","b"]],"input":[true,"s"],"providerExecuted":[false,["n","b"]],"providerMetadata":[false,["n",["m",["m","j"]]]],"toolCallId":[true,"s"],"toolName":[true,"s"]}},{"tv":"source","c":false,"f":{"id":[true,"s"],"providerMetadata":[false,["n",["m",["m","j"]]]],"sourceType":[true,["l","url"]],"title":[false,["n","s"]],"url":[true,"s"]}},{"tv":"source","c":false,"f":{"filename":[false,["n","s"]],"id":[true,"s"],"mediaType":[true,"s"],"providerMetadata":[false,["n",["m",["m","j"]]]],"sourceType":[true,["l","document"]],"title":[true,"s"]}},{"tv":"reasoning","c":false,"f":{"providerMetadata":[false,["n",["m",["m","j"]]]],"text":[true,"s"]}},{"tv":"file","c":false,"f":{"data":[true,["r","GeneratedFileData"]],"mediaType":[true,"s"],"providerMetadata":[false,["n",["m",["m","j"]]]]}},{"tv":"reasoning-file","c":false,"f":{"data":[true,["r","GeneratedFileData"]],"mediaType":[true,"s"],"providerMetadata":[false,["n",["m",["m","j"]]]]}},{"tv":"custom","c":false,"f":{"kind":[true,["r","NamespacedKind"]],"providerMetadata":[false,["n",["m",["m","j"]]]]}},{"tv":"tool-approval-request","c":false,"f":{"approvalId":[true,"s"],"providerMetadata":[false,["n",["m",["m","j"]]]],"toolCallId":[true,"s"]}},{"tv":"tool-result","c":false,"f":{"dynamic":[false,["n","b"]],"isError":[false,["n","b"]],"preliminary":[false,["n","b"]],"providerMetadata":[false,["n",["m",["m","j"]]]],"result":[true,"j"],"toolCallId":[true,"s"],"toolName":[true,"s"]}}]},"GenerateObjectResponse":{"k":"s","c":false,"f":{"body":[false,"j"],"headers":[false,["n",["m","s"]]],"id":[true,"s"],"modelId":[true,"s"],"timestamp":[true,["r","Timestamp"]]}},"GenerateObjectResult":{"k":"s","c":false,"f":{"finishReason":[true,["r","FinishReasonUnified"]],"object":[true,"j"],"providerMetadata":[false,["n",["m",["m","j"]]]],"reasoning":[false,["n","s"]],"request":[true,["r","RequestInfo"]],"response":[true,["r","GenerateObjectResponse"]],"usage":[true,["r","LanguageModelUsage"]],"warnings":[true,["a",["r","Warning"]]]}},"GenerateTextOptions":{"k":"s","c":true,"f":{"frequencyPenalty":[false,["n","f"]],"headers":[false,["n",["m","s"]]],"includeRawChunks":[false,["n","b"]],"instructions":[false,["n","s"]],"maxOutputTokens":[false,["n",["i",true,32]]],"maxRetries":[false,["n",["i",true,32]]],"output":[false,["n",["r","Output"]]],"presencePenalty":[false,["n","f"]],"providerOptions":[false,["n",["m",["m","j"]]]],"reasoning":[false,["n",["r","ReasoningEffort"]]],"seed":[false,["n",["i",true,64]]],"sessionId":[false,["n","s"]],"stopSequences":[false,["n",["a","s"]]],"strictStream":[false,["n","b"]],"temperature":[false,["n","f"]],"timeout":[false,["n",["r","TimeoutConfiguration"]]],"toolChoice":[false,["n",["r","ToolChoice"]]],"tools":[false,["n",["a",["r","Tool"]]]],"topK":[false,["n","f"]],"topP":[false,["n","f"]]}},"GenerateTextResult":{"k":"s","c":false,"f":{"content":[true,["a",["r","ContentPart"]]],"files":[true,["a",["r","GeneratedFile"]]],"finishReason":[true,["r","FinishReasonUnified"]],"output":[false,"j"],"providerMetadata":[false,["n",["m",["m","j"]]]],"rawFinishReason":[false,["n","s"]],"reasoning":[true,["a",["r","ReasoningPart"]]],"reasoningText":[false,["n","s"]],"request":[true,["r","RequestInfo"]],"response":[true,["r","StepResponse"]],"responseMessages":[true,["a",["r","ModelMessage"]]],"sources":[true,["a",["r","TypedSource"]]],"steps":[true,["a",["r","StepResult"]]],"text":[true,"s"],"toolCalls":[true,["a",["r","TypedToolCall"]]],"toolResults":[true,["a",["r","TaggedToolResult"]]],"totalUsage":[true,["r","LanguageModelUsage"]],"usage":[true,["r","LanguageModelUsage"]],"warnings":[true,["a",["r","Warning"]]]}},"GenerateTextResultInput":{"k":"s","c":false,"f":{"output":[false,"j"],"steps":[true,["a",["r","StepResultInput"]]],"totalUsage":[true,["r","LanguageModelUsageInput"]]}},"GeneratedFile":{"k":"s","c":false,"f":{"base64":[true,["r","FileBytes"]],"mediaType":[true,"s"],"providerMetadata":[false,["n",["m",["m","j"]]]]}},"GeneratedFileData":{"k":"t","g":"type","v":[{"tv":"data","c":false,"f":{"data":[true,["r","FileBytes"]]}},{"tv":"url","c":false,"f":{"originalUrl":[false,["n","s"]],"url":[true,"s"]}}]},"GeneratedFileOutput":{"k":"s","c":false,"f":{"file":[true,["r","GeneratedFile"]],"providerMetadata":[false,["n",["m",["m","j"]]]]}},"HandleId":{"k":"a","t":"u64"},"HandleIdInput":{"k":"a","t":"u64"},"HandleKind":{"k":"e","v":["Provider","Registry","Language","Embedding","Image","Speech","Transcription","Reranking","Video","Search","Decision","Files","Operation","Abort","Fetch","WebSocket","Download","CredentialResolver","Middleware","TraceStore","Recorder","SessionStore","ReplaySession"]},"HandleResult":{"k":"s","c":false,"f":{"handle":[true,["r","HandleId"]],"kind":[true,["r","HandleKind"]]}},"HttpExchange":{"k":"s","c":false,"f":{"attempt":[true,["i",true,32]],"error":[false,["n","s"]],"exchangeIndex":[true,["i",true,32]],"finalized":[true,"b"],"request":[true,["r","HttpRecord"]],"response":[false,["n",["r","ResponseRecord"]]],"step":[false,["n","s"]],"timing":[true,["r","TimingRecord"]]}},"HttpRecord":{"k":"s","c":false,"f":{"body":[false,["n","s"]],"headers":[true,["a",["a","s"]]],"method":[true,"s"],"url":[true,"s"]}},"ImageCallOptions":{"k":"s","c":true,"f":{"aspectRatio":[false,["n",["r","AspectRatio"]]],"files":[false,["n",["a",["r","ImageFile"]]]],"headers":[false,["n",["m","s"]]],"mask":[false,["n",["r","ImageFile"]]],"maxRetries":[false,["n",["i",true,32]]],"n":[true,["i",true,32]],"prompt":[false,["n","s"]],"providerOptions":[true,["m",["m","j"]]],"seed":[false,["n",["i",true,64]]],"size":[false,["n",["r","Size"]]],"timeout":[false,["n",["r","TimeoutConfiguration"]]]}},"ImageFile":{"k":"t","g":"type","v":[{"tv":"file","c":false,"f":{"data":[true,["r","ImageFileData"]],"mediaType":[true,"s"]}},{"tv":"url","c":false,"f":{"url":[true,"s"]}}]},"ImageFileData":{"k":"a","t":"s"},"ImageOutputs":{"k":"a","t":["a","s"]},"ImageResponse":{"k":"s","c":false,"f":{"headers":[false,["n",["m","s"]]],"modelId":[false,["n","s"]],"timestamp":[false,["n",["r","Timestamp"]]]}},"ImageResult":{"k":"s","c":false,"f":{"images":[true,["r","ImageOutputs"]],"providerMetadata":[false,["n",["m",["m","j"]]]],"response":[true,["r","ImageResponse"]],"usage":[false,["n",["r","ImageUsage"]]],"warnings":[true,["a",["r","Warning"]]]}},"ImageUsage":{"k":"s","c":false,"f":{"inputTokens":[false,["n",["i",true,32]]],"outputTokens":[false,["n",["i",true,32]]],"totalTokens":[false,["n",["i",true,32]]]}},"InputAudioFormat":{"k":"s","c":true,"f":{"formatType":[true,"s"],"rate":[false,["n",["i",true,32]]]}},"InputRecord":{"k":"s","c":false,"f":{"operation":[false,["r","RecordingOperation"]],"options":[true,"j"],"prompt":[true,["a",["r","LanguageModelMessage"]]]}},"InputTokenDetails":{"k":"s","c":false,"f":{"cacheReadTokens":[false,["n",["i",true,32]]],"cacheWriteTokens":[false,["n",["i",true,32]]],"noCacheTokens":[false,["n",["i",true,32]]]}},"LanguageApi":{"k":"e","v":["chat","responses","completion","messages"]},"LanguageModelFile":{"k":"s","c":false,"f":{"data":[true,["r","GeneratedFileData"]],"mediaType":[true,"s"],"providerMetadata":[false,["n",["m",["m","j"]]]]}},"LanguageModelMessage":{"k":"t","g":"role","v":[{"tv":"system","c":false,"f":{"content":[true,"s"],"providerOptions":[false,["n",["m",["m","j"]]]]}},{"tv":"user","c":false,"f":{"content":[true,["a",["r","UserPart"]]],"providerOptions":[false,["n",["m",["m","j"]]]]}},{"tv":"assistant","c":false,"f":{"content":[true,["a",["r","AssistantPart"]]],"providerOptions":[false,["n",["m",["m","j"]]]]}},{"tv":"tool","c":false,"f":{"content":[true,["a",["r","ToolPart"]]],"providerOptions":[false,["n",["m",["m","j"]]]]}}]},"LanguageModelReasoningPart":{"k":"s","c":false,"f":{"providerOptions":[false,["n",["m",["m","j"]]]],"text":[true,"s"]}},"LanguageModelToolResultOutput":{"k":"t","g":"type","v":[{"tv":"text","c":false,"f":{"providerOptions":[false,["n",["m",["m","j"]]]],"value":[true,"s"]}},{"tv":"json","c":false,"f":{"providerOptions":[false,["n",["m",["m","j"]]]],"value":[true,"j"]}},{"tv":"execution-denied","c":false,"f":{"providerOptions":[false,["n",["m",["m","j"]]]],"reason":[false,["n","s"]]}},{"tv":"error-text","c":false,"f":{"providerOptions":[false,["n",["m",["m","j"]]]],"value":[true,"s"]}},{"tv":"error-json","c":false,"f":{"providerOptions":[false,["n",["m",["m","j"]]]],"value":[true,"j"]}},{"tv":"content","c":false,"f":{"isError":[false,["n","b"]],"value":[true,["a",["r","ToolResultContent"]]]}}]},"LanguageModelToolResultPart":{"k":"s","c":false,"f":{"output":[true,["r","LanguageModelToolResultOutput"]],"providerOptions":[false,["n",["m",["m","j"]]]],"toolCallId":[true,"s"],"toolName":[true,"s"]}},"LanguageModelUsage":{"k":"s","c":false,"f":{"inputTokenDetails":[true,["r","InputTokenDetails"]],"inputTokens":[false,["n",["i",true,32]]],"outputTokenDetails":[true,["r","OutputTokenDetails"]],"outputTokens":[false,["n",["i",true,32]]],"raw":[false,["n",["m","j"]]],"totalTokens":[false,["n",["i",true,32]]]}},"LanguageModelUsageInput":{"k":"s","c":false,"f":{"inputTokenDetails":[false,["r","InputTokenDetails"]],"inputTokens":[false,["n",["i",true,32]]],"outputTokenDetails":[false,["r","OutputTokenDetails"]],"outputTokens":[false,["n",["i",true,32]]],"raw":[false,["n",["m","j"]]],"totalTokens":[false,["n",["i",true,32]]]}},"LanguageModelV4ToolChoice":{"k":"t","g":"type","v":[{"tv":"auto","c":false,"f":{}},{"tv":"none","c":false,"f":{}},{"tv":"required","c":false,"f":{}},{"tv":"tool","c":false,"f":{"toolName":[true,"s"]}}]},"LiveTarget":{"k":"t","g":"kind","v":[{"tv":"model","c":true,"f":{"handle":[true,["r","HandleIdInput"]]}},{"tv":"registry","c":true,"f":{"handle":[true,["r","HandleIdInput"]]}}]},"LogLevel":{"k":"e","v":["off","error","warn","info","debug","trace"]},"LoggingConfig":{"k":"s","c":true,"f":{"level":[true,["r","LogLevel"]]}},"MiddlewareAuditMode":{"k":"e","v":["disabled","shared","strict"]},"MiddlewareParams":{"k":"s","c":true,"f":{"auditMode":[false,["n",["r","MiddlewareAuditMode"]]],"kind":[true,"s"],"scopeName":[false,["n","s"]],"traceStore":[false,["n",["r","HandleIdInput"]]]}},"MoaFailMode":{"k":"e","v":["best-effort","fail-fast"]},"MoaParams":{"k":"s","c":true,"f":{"aggregator":[true,"s"],"aggregatorInstructions":[false,["n","s"]],"failMode":[false,["r","MoaFailMode"]],"modelId":[false,"s"],"providerName":[false,"s"],"references":[true,["a","s"]],"stripReferenceTools":[false,"b"]}},"Modality":{"k":"e","v":["Text","Image","Audio","Video","Pdf","Other","Embedding","Score"]},"ModalityKind":{"k":"e","v":["languageModel","embeddingModel","imageModel","speechModel","transcriptionModel","rerankingModel","videoModel","searchModel","decision"]},"ModelCapabilities":{"k":"s","c":false,"f":{"attachment":[true,"b"],"structuredOutput":[true,"b"],"temperature":[true,"b"],"toolCall":[true,"b"]}},"ModelCost":{"k":"s","c":false,"f":{"cacheRead":[false,["n","f"]],"cacheWrite":[false,["n","f"]],"input":[false,["n","f"]],"output":[false,["n","f"]]}},"ModelInfo":{"k":"s","c":false,"f":{"capabilities":[true,"j"],"modality":[true,"s"],"modelId":[true,"s"],"provider":[true,"s"],"source":[true,"j"]}},"ModelInfoParams":{"k":"s","c":true,"f":{}},"ModelLimits":{"k":"s","c":false,"f":{"context":[false,["n",["i",true,64]]],"input":[false,["n",["i",true,64]]],"output":[false,["n",["i",true,64]]]}},"ModelMessage":{"k":"t","g":"role","v":[{"tv":"system","c":false,"f":{"content":[true,"s"],"providerOptions":[false,["n",["m",["m","j"]]]]}},{"tv":"user","c":false,"f":{"content":[true,["r","UserContent"]],"providerOptions":[false,["n",["m",["m","j"]]]]}},{"tv":"assistant","c":false,"f":{"content":[true,["r","AssistantContent"]],"providerOptions":[false,["n",["m",["m","j"]]]]}},{"tv":"tool","c":false,"f":{"content":[true,["a",["r","ToolContentPart"]]],"providerOptions":[false,["n",["m",["m","j"]]]]}}]},"ModelMethod":{"k":"e","v":["languageModel","chat","responses","completion","messages","embeddingModel","imageModel","speechModel","transcriptionModel","rerankingModel","videoModel","searchModel","decision"]},"ModelModalities":{"k":"s","c":false,"f":{"input":[false,["a",["r","Modality"]]],"output":[false,["a",["r","Modality"]]]}},"ModelPrompt":{"k":"u","b":["s",["a",["r","ModelMessage"]]]},"ModelRef":{"k":"s","c":true,"f":{"key":[true,"s"],"method":[true,["r","ModelMethod"]],"modelId":[true,"s"],"namespace":[true,"s"]}},"ModelResolveParams":{"k":"s","c":true,"f":{"modelRef":[true,["r","ModelRef"]]}},"ModelSpec":{"k":"s","c":false,"f":{"capabilities":[true,["r","ModelCapabilities"]],"cost":[false,["n",["r","ModelCost"]]],"displayName":[false,["n","s"]],"limits":[true,["r","ModelLimits"]],"modalities":[true,["r","ModelModalities"]],"provider":[false,["n","s"]],"raw":[false,"j"],"reasoning":[false,["n",["r","ReasoningSpec"]]],"source":[true,["r","CatalogueSource"]],"type":[true,["r","ModelType"]]}},"ModelType":{"k":"e","v":["Chat","Completion","Embedding","Rerank","ImageGen","ImageEdit","Video","Audio","Other"]},"ModelWrapParams":{"k":"s","c":true,"f":{"middleware":[true,["a","s"]]}},"NamespacedKind":{"k":"a","t":"s"},"OpenAiOutputRequest":{"k":"s","c":true,"f":{"metadataNamespace":[true,"s"],"result":[true,["r","GenerateTextResultInput"]]}},"OpenAiTextRequest":{"k":"s","c":true,"f":{"abort":[false,["n",["r","HandleIdInput"]]],"options":[false,["r","Options"]],"prompt":[true,["r","ModelPrompt"]],"streamOptions":[false,["r","StreamOptions"]]}},"OperationCapabilities":{"k":"s","c":false,"f":{"cancel":[true,"b"],"inputDone":[true,"b"],"next":[true,"b"],"push":[true,"b"]}},"OperationNextParams":{"k":"s","c":true,"f":{"timeoutMs":[false,["i",true,64]]}},"OperationOutcome":{"k":"e","v":["success","error","cancelled"]},"OperationPollResult":{"k":"t","g":"type","v":[{"tv":"part","c":false,"f":{"part":[true,["r","TranscriptionStreamPart"]]}},{"tv":"ended","c":false,"f":{}},{"tv":"timeout","c":false,"f":{}}]},"OperationState":{"k":"e","v":["running","inputClosed","terminal"]},"OperationStatus":{"k":"s","c":false,"f":{"capabilities":[true,["r","OperationCapabilities"]],"cleanupFailure":[false,["n","s"]],"consumerClosed":[true,"b"],"inputDoneSequence":[false,["n","s"]],"queuedInputBytes":[true,["i",true,64]],"queuedInputItems":[true,["i",true,64]],"queuedOutputBytes":[true,["i",true,64]],"queuedOutputItems":[true,["i",true,64]],"state":[true,["r","OperationState"]],"subkind":[true,"s"],"terminal":[false,["n",["r","TerminalSummary"]]]}},"Options":{"k":"s","c":true,"f":{"frequencyPenalty":[false,["n","f"]],"headers":[false,["n",["m","s"]]],"includeRawChunks":[false,["n","b"]],"instructions":[false,["n","s"]],"maxOutputTokens":[false,["n",["i",true,32]]],"maxRetries":[false,["n",["i",true,32]]],"output":[false,["n",["r","Output"]]],"presencePenalty":[false,["n","f"]],"providerOptions":[false,["n",["m",["m","j"]]]],"reasoning":[false,["n",["r","ReasoningEffort"]]],"seed":[false,["n",["i",true,64]]],"sessionId":[false,["n","s"]],"stopSequences":[false,["n",["a","s"]]],"strictStream":[false,["n","b"]],"temperature":[false,["n","f"]],"timeout":[false,["n",["r","TimeoutConfiguration"]]],"toolChoice":[false,["n",["r","ToolChoice"]]],"tools":[false,["n",["a",["r","Tool"]]]],"topK":[false,["n","f"]],"topP":[false,["n","f"]]}},"Outcome":{"k":"e","v":["success","error","cancelled"]},"OutcomeRecord":{"k":"s","c":false,"f":{"decisionResult":[false,"j"],"error":[false,["n","s"]],"errorValue":[false,"j"],"finishReason":[false,["n","s"]],"status":[true,["r","OutcomeStatus"]],"usage":[false,"j"]}},"OutcomeStatus":{"k":"e","v":["success","pending","error","incomplete","cancelled"]},"Output":{"k":"t","g":"type","v":[{"tv":"text","c":false,"f":{}},{"tv":"object","c":false,"f":{"description":[false,["n","s"]],"name":[false,["n","s"]],"schema":[true,"j"]}},{"tv":"array","c":false,"f":{"description":[false,["n","s"]],"element":[true,"j"],"maxItems":[false,["n",["i",true,32]]],"minItems":[false,["n",["i",true,32]]],"name":[false,["n","s"]]}},{"tv":"choice","c":false,"f":{"description":[false,["n","s"]],"name":[false,["n","s"]],"options":[true,["a","s"]]}},{"tv":"json","c":false,"f":{"description":[false,["n","s"]],"name":[false,["n","s"]]}}]},"OutputChunkTimingStats":{"k":"s","c":false,"f":{"avg":[true,"f"],"max":[true,"f"],"median":[true,"f"],"min":[true,"f"],"p10":[true,"f"],"p90":[true,"f"]}},"OutputTokenDetails":{"k":"s","c":false,"f":{"reasoningTokens":[false,["n",["i",true,32]]],"textTokens":[false,["n",["i",true,32]]]}},"PackageAuthKind":{"k":"e","v":["bearer","header","queryParam","basic","awsSigV4","awsBearerOrSigV4","anthropicAws","googleVertex","azureApiKeyOrToken","codexChannel","optionalBearer","none"]},"PackageDescriptor":{"k":"s","c":true,"f":{"apiKeyEnv":[false,["n","s"]],"authKind":[true,["r","PackageAuthKind"]],"baseUrlEnv":[false,["n","s"]],"defaultBaseUrl":[false,["n","s"]],"defaultMethod":[false,["n",["r","ModalityKind"]]],"id":[true,"s"],"kind":[true,["r","PackageKind"]],"languageApis":[true,["a",["r","LanguageApi"]]],"modalities":[true,["a",["r","ModalityKind"]]],"settings":[true,["a",["r","SettingFieldSpec"]]],"supportsDefaultInstance":[true,"b"],"supportsDiscovery":[true,"b"],"supportsFiles":[true,"b"],"supportsSkills":[true,"b"],"templateParams":[true,["a",["r","TemplateParamDescriptor"]]]}},"PackageKind":{"k":"e","v":["native","protocol","preset","specialized"]},"PrefixBreak":{"k":"s","c":false,"f":{"atRecordId":[true,"s"],"expectedBreak":[true,"b"],"kind":[true,["r","BreakKind"]],"lcpBytes":[true,["i",true,64]],"prevRecordId":[true,"s"]}},"PromptTokensDetails":{"k":"s","c":false,"f":{"cache_write_tokens":[false,["n",["i",true,32]]],"cached_tokens":[true,["i",true,32]]}},"ProviderConfigDocument":{"k":"s","c":true,"f":{"providers":[true,["m",["r","ProviderEntrySpec"]]]}},"ProviderConfigSettings":{"k":"s","c":true,"f":{"accessKeyId":[false,["n",["r","StringOrEnv"]]],"accessToken":[false,["n",["r","StringOrEnv"]]],"apiKey":[false,["n",["r","StringOrEnv"]]],"apiVersion":[false,["n","s"]],"authToken":[false,["n",["r","StringOrEnv"]]],"baseUrl":[false,["n","s"]],"codexMode":[false,["n",["r","CodexModeSpec"]]],"cx":[false,["n","s"]],"endpoint":[false,["n","s"]],"headers":[false,["m",["n","s"]]],"includeUsage":[false,["n","b"]],"location":[false,["n","s"]],"login":[false,["n",["r","StringOrEnv"]]],"name":[false,["n","s"]],"organization":[false,["n","s"]],"originator":[false,["n","s"]],"params":[false,["m","s"]],"password":[false,["n",["r","StringOrEnv"]]],"probabilitySource":[false,["n","s"]],"project":[false,["n","s"]],"queryParams":[false,["m","s"]],"region":[false,["n","s"]],"resourceName":[false,["n","s"]],"secretAccessKey":[false,["n",["r","StringOrEnv"]]],"sessionToken":[false,["n",["r","StringOrEnv"]]],"speechBaseUrl":[false,["n","s"]],"supportsMultiPartToolContent":[false,["n","b"]],"supportsStructuredOutputs":[false,["n","b"]],"useDeploymentBasedUrls":[false,["n","b"]],"workspaceId":[false,["n","s"]]}},"ProviderCreateParams":{"k":"s","c":true,"f":{"envAllowlist":[false,["n",["a","s"]]],"package":[true,"s"],"settings":[false,["r","ProviderSettings"]]}},"ProviderCustomParams":{"k":"s","c":true,"f":{"chatModels":[false,["m",["r","HandleIdInput"]]],"completionModels":[false,["m",["r","HandleIdInput"]]],"decisionModels":[false,["m",["r","HandleIdInput"]]],"defaultMethod":[false,["n","s"]],"embeddingModels":[false,["m",["r","HandleIdInput"]]],"fallbackProvider":[false,["n",["r","HandleIdInput"]]],"files":[false,["n",["r","HandleIdInput"]]],"imageModelMiddleware":[false,["a",["r","HandleIdInput"]]],"imageModels":[false,["m",["r","HandleIdInput"]]],"languageModelMiddleware":[false,["a",["r","HandleIdInput"]]],"languageModels":[false,["m",["r","HandleIdInput"]]],"messagesModels":[false,["m",["r","HandleIdInput"]]],"rerankingModels":[false,["m",["r","HandleIdInput"]]],"responsesModels":[false,["m",["r","HandleIdInput"]]],"searchModels":[false,["m",["r","HandleIdInput"]]],"speechModels":[false,["m",["r","HandleIdInput"]]],"transcriptionModels":[false,["m",["r","HandleIdInput"]]],"videoModels":[false,["m",["r","HandleIdInput"]]]}},"ProviderDefaultParams":{"k":"s","c":true,"f":{"package":[true,"s"]}},"ProviderDescriptorsParams":{"k":"s","c":true,"f":{"package":[false,["n","s"]]}},"ProviderEntrySpec":{"k":"s","c":true,"f":{"package":[true,"s"],"settings":[false,["r","ProviderConfigSettings"]]}},"ProviderInvokeParams":{"k":"s","c":true,"f":{"abort":[false,["n",["r","HandleIdInput"]]],"method":[true,"s"]}},"ProviderModelParams":{"k":"s","c":true,"f":{"method":[false,["n","s"]],"modelId":[true,"s"]}},"ProviderRecord":{"k":"s","c":false,"f":{"modelId":[true,"s"],"provider":[true,"s"],"providerId":[true,"s"]}},"ProviderSettings":{"k":"s","c":true,"f":{"accessKeyId":[false,["n",["r","StringOrEnv"]]],"accessToken":[false,["n",["r","StringOrEnv"]]],"apiKey":[false,["n",["r","StringOrEnv"]]],"apiVersion":[false,["n","s"]],"authToken":[false,["n",["r","StringOrEnv"]]],"baseUrl":[false,["n","s"]],"codexMode":[false,["n",["r","CodexModeSpec"]]],"credentialResolver":[false,["n",["r","HandleIdInput"]]],"cx":[false,["n","s"]],"endpoint":[false,["n","s"]],"fetch":[false,["n",["r","HandleIdInput"]]],"headers":[false,["m",["n","s"]]],"includeUsage":[false,["n","b"]],"location":[false,["n","s"]],"login":[false,["n",["r","StringOrEnv"]]],"name":[false,["n","s"]],"organization":[false,["n","s"]],"originator":[false,["n","s"]],"params":[false,["m","s"]],"password":[false,["n",["r","StringOrEnv"]]],"probabilitySource":[false,["n","s"]],"project":[false,["n","s"]],"queryParams":[false,["m","s"]],"region":[false,["n","s"]],"resourceName":[false,["n","s"]],"secretAccessKey":[false,["n",["r","StringOrEnv"]]],"sessionToken":[false,["n",["r","StringOrEnv"]]],"speechBaseUrl":[false,["n","s"]],"supportsMultiPartToolContent":[false,["n","b"]],"supportsStructuredOutputs":[false,["n","b"]],"useDeploymentBasedUrls":[false,["n","b"]],"webSocket":[false,["n",["r","HandleIdInput"]]],"workspaceId":[false,["n","s"]]}},"ProviderTool":{"k":"s","c":false,"f":{"args":[true,["m","j"]],"id":[true,["r","NamespacedKind"]],"name":[true,"s"],"supportsDeferredResults":[false,["n","b"]]}},"ProviderWrapParams":{"k":"s","c":true,"f":{"imageModelMiddleware":[false,["a",["r","HandleIdInput"]]],"languageModelMiddleware":[false,["a",["r","HandleIdInput"]]]}},"RawToolApprovalRequest":{"k":"s","c":false,"f":{"approvalId":[true,"s"],"providerMetadata":[false,["n",["m",["m","j"]]]],"toolCallId":[true,"s"]}},"RawToolCall":{"k":"s","c":false,"f":{"dynamic":[false,["n","b"]],"input":[true,"s"],"providerExecuted":[false,["n","b"]],"providerMetadata":[false,["n",["m",["m","j"]]]],"toolCallId":[true,"s"],"toolName":[true,"s"]}},"ReasoningEffort":{"k":"e","v":["provider-default","none","minimal","low","medium","high","xhigh"]},"ReasoningFilePart":{"k":"s","c":false,"f":{"data":[true,["r","GeneratedFileData"]],"mediaType":[true,"s"],"providerOptions":[false,["n",["m",["m","j"]]]]}},"ReasoningFilePartData":{"k":"u","b":[["r","GeneratedFileData"],"s"]},"ReasoningMode":{"k":"e","v":["Other","Budget","Effort","Level","Fixed","Mixed","Toggle"]},"ReasoningOutput":{"k":"s","c":false,"f":{"providerMetadata":[false,["n",["m",["m","j"]]]],"text":[true,"s"]}},"ReasoningPart":{"k":"t","g":"type","v":[{"tv":"reasoning","c":false,"f":{"providerMetadata":[false,["n",["m",["m","j"]]]],"text":[true,"s"]}},{"tv":"reasoning-file","c":false,"f":{"file":[true,["r","GeneratedFile"]],"providerMetadata":[false,["n",["m",["m","j"]]]]}}]},"ReasoningSpec":{"k":"s","c":false,"f":{"budgetMin":[false,["n",["i",true,64]]],"defaultEnabled":[true,"b"],"effortDefault":[false,["n","s"]],"effortOptions":[false,["a","s"]],"interleaved":[true,"b"],"mode":[false,["n",["r","ReasoningMode"]]],"supported":[true,"b"],"visibility":[false,["n",["r","ReasoningVisibility"]]]}},"ReasoningVisibility":{"k":"e","v":["Hidden","Summary","Full","Mixed","Omitted","Other"]},"RecorderExport":{"k":"s","c":false,"f":{"jsonl":[true,"s"]}},"RecorderHandleResult":{"k":"s","c":false,"f":{"handle":[true,["r","HandleId"]]}},"RecorderStats":{"k":"t","g":"type","v":[{"tv":"ring","c":false,"f":{"completed":[true,["i",true,64]],"dropped":[true,["i",true,64]],"inconsistentCallIds":[true,["a","s"]],"pending":[true,["i",true,64]],"pendingEvicted":[true,["i",true,64]]}},{"tv":"jsonl","c":false,"f":{"dropped":[true,["i",true,64]],"inconsistentCallIds":[true,["a","s"]],"lastWriteError":[true,["n","s"]],"path":[true,"s"]}}]},"Recording":{"k":"s","c":false,"f":{"callId":[true,"s"],"complete":[true,"b"],"exchanges":[true,["a",["r","HttpExchange"]]],"input":[true,["r","InputRecord"]],"outcome":[true,["r","OutcomeRecord"]],"provider":[true,["r","ProviderRecord"]],"recordedAt":[true,"s"],"schema":[true,["i",true,32]],"sessionId":[false,["n","s"]],"step":[false,["n",["i",true,32]]],"transportClosed":[true,"b"]}},"RecordingOperation":{"k":"e","v":["language-model","decision"]},"RegistryCreateParams":{"k":"s","c":true,"f":{"entries":[true,["a",["r","RegistryEntry"]]],"namespace":[false,"s"],"separator":[false,["n","s"]]}},"RegistryEntry":{"k":"s","c":true,"f":{"key":[true,"s"],"provider":[true,"s"]}},"RegistryFromConfigParams":{"k":"s","c":true,"f":{"config":[true,["r","ProviderConfigDocument"]],"envAllowlist":[false,["n",["a","s"]]],"namespace":[false,"s"],"separator":[false,["n","s"]]}},"RegistryListParams":{"k":"s","c":true,"f":{}},"RegistryListResult":{"k":"s","c":false,"f":{"keys":[true,["a","s"]],"namespace":[true,"s"],"separator":[true,"s"]}},"RegistryProviderParams":{"k":"s","c":true,"f":{"key":[true,"s"]}},"RegistryUpdateParams":{"k":"s","c":true,"f":{"derive":[false,"b"],"remove":[false,["a","s"]],"replace":[false,"b"],"set":[false,["a",["r","RegistryEntry"]]]}},"RegistryUpdateResult":{"k":"s","c":false,"f":{"handle":[false,["n",["r","HandleId"]]],"keys":[true,["a","s"]],"kind":[false,["n",["r","HandleKind"]]]}},"RepairedToolCall":{"k":"s","c":false,"f":{"dynamic":[false,["n","b"]],"input":[true,"s"],"providerExecuted":[false,["n","b"]],"providerMetadata":[false,["n",["m",["m","j"]]]],"toolCallId":[true,"s"],"toolName":[true,"s"],"type":[false,["l","tool-call"]]}},"ReplayCreateParams":{"k":"s","c":true,"f":{"recordingsJsonl":[true,"s"]}},"ReplayInspection":{"k":"s","c":false,"f":{"recordings":[true,["a",["r","ReplayRecordingInfo"]]]}},"ReplayLiveParams":{"k":"s","c":true,"f":{"abort":[false,["n",["r","HandleIdInput"]]],"callId":[true,"s"],"target":[true,["r","LiveTarget"]]}},"ReplayLiveResult":{"k":"u","b":[["r","GenerateTextResult"],["r","DecideResult"]]},"ReplayPlan":{"k":"s","c":false,"f":{"calls":[true,["a",["r","ReplayPlannedCall"]]]}},"ReplayPlannedCall":{"k":"s","c":false,"f":{"callId":[true,"s"],"liveSupported":[true,"b"],"operation":[true,["r","RecordingOperation"]],"provider":[true,["r","ProviderRecord"]],"requiresTarget":[true,"b"]}},"ReplayRecordingInfo":{"k":"s","c":false,"f":{"callId":[true,"s"],"complete":[true,"b"],"exchangeCount":[true,["i",true,64]],"operation":[true,["r","RecordingOperation"]],"provider":[true,["r","ProviderRecord"]],"transportClosed":[true,"b"]}},"ReplaySessionHandle":{"k":"s","c":false,"f":{"handle":[true,["r","HandleId"]]}},"RequestCacheHints":{"k":"s","c":false,"f":{"requestedWrite":[true,"b"]}},"RequestInfo":{"k":"s","c":false,"f":{"body":[false,"j"]}},"RerankingCallOptions":{"k":"s","c":true,"f":{"documents":[true,["r","RerankingDocuments"]],"headers":[false,["n",["m","s"]]],"maxRetries":[false,["n",["i",true,32]]],"providerOptions":[false,["n",["m",["m","j"]]]],"query":[true,"s"],"timeout":[false,["n",["r","TimeoutConfiguration"]]],"topN":[false,["n",["i",true,32]]]}},"RerankingDocuments":{"k":"t","g":"type","v":[{"tv":"text","c":false,"f":{"values":[true,["a","s"]]}},{"tv":"object","c":false,"f":{"values":[true,["a","j"]]}}]},"RerankingRank":{"k":"s","c":false,"f":{"index":[true,["i",true,32]],"relevanceScore":[true,"f"]}},"RerankingResponse":{"k":"s","c":false,"f":{"body":[false,"j"],"headers":[false,["n",["m","s"]]],"id":[false,["n","s"]],"modelId":[false,["n","s"]],"timestamp":[false,["n",["r","Timestamp"]]]}},"RerankingResult":{"k":"s","c":false,"f":{"providerMetadata":[false,["n",["m",["m","j"]]]],"ranking":[true,["a",["r","RerankingRank"]]],"response":[false,["n",["r","RerankingResponse"]]],"warnings":[false,["n",["a",["r","Warning"]]]]}},"ResponseInfo":{"k":"s","c":false,"f":{"body":[false,"j"],"headers":[false,["n",["m","s"]]],"id":[false,["n","s"]],"modelId":[false,["n","s"]],"timestamp":[false,["n",["r","Timestamp"]]]}},"ResponseRecord":{"k":"s","c":false,"f":{"body":[false,["n","s"]],"headers":[true,["a",["a","s"]]],"status":[true,["i",true,16]],"streamChunks":[false,["n",["i",true,64]]],"ttfbMs":[false,["n",["i",true,64]]]}},"RetryError":{"k":"s","c":false,"f":{"errors":[true,["a",["r","AiMuxError"]]],"reason":[true,["r","RetryErrorReason"]]}},"RetryErrorInput":{"k":"s","c":false,"f":{"errors":[true,["a",["r","AiMuxErrorInput"]]],"reason":[true,["r","RetryErrorReason"]]}},"RetryErrorReason":{"k":"e","v":["maxRetriesExceeded","errorNotRetryable"]},"RouterParams":{"k":"s","c":true,"f":{"children":[true,["a","s"]],"fallback":[false,["r","Fallback"]],"modelId":[false,["n","s"]],"providerName":[false,["n","s"]],"strategy":[true,["r","Strategy"]]}},"RuntimeConfigureParams":{"k":"s","c":true,"f":{"logging":[false,["n",["r","LoggingConfig"]]],"proxy":[false,["n",["r","TransportProxy"]]]}},"RuntimeDescribeParams":{"k":"s","c":true,"f":{}},"RuntimeModel":{"k":"s","c":false,"f":{"created":[false,["n",["i",true,64]]],"id":[true,"s"],"limits":[false,["n",["r","ModelLimits"]]],"ownedBy":[false,["n","s"]]}},"SearchCallOptions":{"k":"s","c":true,"f":{"excludeDomains":[false,["n",["a","s"]]],"headers":[false,["n",["m","s"]]],"includeDomains":[false,["n",["a","s"]]],"includeRawContent":[false,["n","b"]],"maxResults":[false,["n",["i",true,32]]],"maxRetries":[false,["n",["i",true,32]]],"providerOptions":[false,["n",["m",["m","j"]]]],"query":[true,"s"],"timeRange":[false,["n","s"]],"timeout":[false,["n",["r","TimeoutConfiguration"]]]}},"SearchResponse":{"k":"s","c":false,"f":{"body":[false,"j"],"headers":[false,["n",["m","s"]]]}},"SearchResult":{"k":"s","c":false,"f":{"answer":[false,["n","s"]],"providerMetadata":[false,["n",["m",["m","j"]]]],"response":[false,["n",["r","SearchResponse"]]],"results":[true,["a",["r","SearchResultItem"]]],"warnings":[true,["a",["r","Warning"]]]}},"SearchResultItem":{"k":"s","c":false,"f":{"content":[false,["n","s"]],"providerMetadata":[false,["n",["m",["m","j"]]]],"rawContent":[false,["n","s"]],"score":[false,["n","f"]],"title":[false,["n","s"]],"url":[false,["n","s"]]}},"SessionCall":{"k":"s","c":false,"f":{"callId":[true,"s"],"recordedAt":[true,"s"],"step":[true,["i",true,32]]}},"SessionChainView":{"k":"s","c":false,"f":{"breaks":[true,["a",["r","PrefixBreak"]]],"prefixStability":[true,"f"],"recordIds":[true,["a","s"]],"sessionId":[true,"s"]}},"SessionSource":{"k":"e","v":["Explicit","Inferred"]},"SessionStepStat":{"k":"s","c":false,"f":{"callId":[true,"s"],"error":[false,["n","s"]],"hitRate":[false,["n","f"]],"step":[true,["i",true,32]],"verdict":[false,["n",["r","Verdict"]]]}},"SessionStoreCallsParams":{"k":"s","c":true,"f":{"sessionId":[true,"s"]}},"SessionStoreCreateParams":{"k":"s","c":true,"f":{"infer":[true,"b"]}},"SessionStoreHandle":{"k":"s","c":false,"f":{"handle":[true,["r","HandleId"]]}},"SessionView":{"k":"s","c":false,"f":{"calls":[true,["a",["r","SessionCall"]]],"sessionId":[true,"s"],"source":[true,["r","SessionSource"]]}},"SettingFieldKind":{"k":"e","v":["string","credential","boolean","headerMap","stringMap","codexMode"]},"SettingFieldSpec":{"k":"s","c":true,"f":{"credential":[true,"b"],"envVar":[false,["n","s"]],"kind":[true,["r","SettingFieldKind"]],"name":[true,"s"],"required":[true,"b"]}},"Size":{"k":"a","t":"s"},"Source":{"k":"t","g":"sourceType","v":[{"tv":"url","c":false,"f":{"id":[true,"s"],"providerMetadata":[false,["n",["m",["m","j"]]]],"title":[false,["n","s"]],"url":[true,"s"]}},{"tv":"document","c":false,"f":{"filename":[false,["n","s"]],"id":[true,"s"],"mediaType":[true,"s"],"providerMetadata":[false,["n",["m",["m","j"]]]],"title":[true,"s"]}}]},"SourceError":{"k":"s","c":false,"f":{"cause":[false,["n",["r","SourceError"]]],"message":[true,"s"]}},"SpeechCallOptions":{"k":"s","c":true,"f":{"headers":[false,["n",["m","s"]]],"instructions":[false,["n","s"]],"language":[false,["n","s"]],"maxRetries":[false,["n",["i",true,32]]],"outputFormat":[false,["n","s"]],"providerOptions":[false,["n",["m",["m","j"]]]],"speed":[false,["n","f"]],"text":[true,"s"],"timeout":[false,["n",["r","TimeoutConfiguration"]]],"voice":[false,["n","s"]]}},"SpeechRequest":{"k":"s","c":false,"f":{"body":[false,"j"]}},"SpeechResponse":{"k":"s","c":false,"f":{"body":[false,"j"],"headers":[false,["n",["m","s"]]],"modelId":[false,["n","s"]],"timestamp":[false,["n",["r","Timestamp"]]]}},"SpeechResult":{"k":"s","c":false,"f":{"audio":[true,["r","AudioData"]],"providerMetadata":[false,["n",["m",["m","j"]]]],"request":[false,["n",["r","SpeechRequest"]]],"response":[true,["r","SpeechResponse"]],"usage":[true,["n",["m","j"]]],"warnings":[true,["a",["r","Warning"]]]}},"StepModel":{"k":"s","c":false,"f":{"modelId":[true,"s"],"provider":[true,"s"]}},"StepResponse":{"k":"s","c":false,"f":{"body":[false,"j"],"headers":[false,["n",["m","s"]]],"id":[true,"s"],"messages":[true,["a",["r","ModelMessage"]]],"modelId":[true,"s"],"timestamp":[true,["r","Timestamp"]]}},"StepResponseInput":{"k":"s","c":false,"f":{"body":[false,"j"],"headers":[false,["n",["m","s"]]],"id":[true,"s"],"messages":[false,["a",["r","ModelMessage"]]],"modelId":[true,"s"],"timestamp":[true,["r","Timestamp"]]}},"StepResponseMetadata":{"k":"s","c":false,"f":{"headers":[false,["n",["m","s"]]],"id":[true,"s"],"modelId":[true,"s"],"timestamp":[true,["r","Timestamp"]]}},"StepResult":{"k":"s","c":false,"f":{"callId":[true,"s"],"content":[true,["a",["r","ContentPart"]]],"finishReason":[true,["r","FinishReasonUnified"]],"model":[true,["r","StepModel"]],"performance":[true,["r","StepResultPerformance"]],"providerMetadata":[false,["n",["m",["m","j"]]]],"rawFinishReason":[false,["n","s"]],"request":[true,["r","RequestInfo"]],"response":[true,["r","StepResponse"]],"stepNumber":[true,["i",true,32]],"usage":[true,["r","LanguageModelUsage"]],"warnings":[true,["a",["r","Warning"]]]}},"StepResultInput":{"k":"s","c":false,"f":{"callId":[true,"s"],"content":[true,["a",["r","ContentPartInput"]]],"finishReason":[true,["r","FinishReasonUnified"]],"model":[true,["r","StepModel"]],"performance":[true,["r","StepResultPerformanceInput"]],"providerMetadata":[false,["n",["m",["m","j"]]]],"rawFinishReason":[false,["n","s"]],"request":[false,["r","RequestInfo"]],"response":[true,["r","StepResponseInput"]],"stepNumber":[true,["i",true,32]],"usage":[true,["r","LanguageModelUsageInput"]],"warnings":[false,["a",["r","Warning"]]]}},"StepResultPerformance":{"k":"s","c":false,"f":{"effectiveOutputTokensPerSecond":[true,"f"],"effectiveTotalTokensPerSecond":[true,"f"],"inputTokensPerSecond":[false,["n","f"]],"outputTokensPerSecond":[false,["n","f"]],"responseTimeMs":[true,"f"],"stepTimeMs":[true,"f"],"timeBetweenOutputChunksMs":[false,["n",["r","OutputChunkTimingStats"]]],"timeToFirstOutputMs":[false,["n","f"]],"toolExecutionMs":[true,["m","f"]]}},"StepResultPerformanceInput":{"k":"s","c":false,"f":{"effectiveOutputTokensPerSecond":[true,"f"],"effectiveTotalTokensPerSecond":[true,"f"],"inputTokensPerSecond":[false,["n","f"]],"outputTokensPerSecond":[false,["n","f"]],"responseTimeMs":[true,"f"],"stepTimeMs":[true,"f"],"timeBetweenOutputChunksMs":[false,["n",["r","OutputChunkTimingStats"]]],"timeToFirstOutputMs":[false,["n","f"]],"toolExecutionMs":[false,["m","f"]]}},"Strategy":{"k":"t","g":"type","v":[{"tv":"rule","c":true,"f":{}},{"tv":"weighted","c":true,"f":{"weights":[true,["a","f"]]}}]},"StreamEvent":{"k":"u","b":[["r","TextStreamPart"],["r","ChatCompletionChunk"]]},"StreamFrame":{"k":"t","g":"type","v":[{"tv":"event","c":true,"f":{"event":[true,["r","StreamEvent"]],"seq":[true,"u64"]}},{"tv":"end","c":true,"f":{"error":[false,["n",["r","ErrorEnvelope"]]],"outcome":[true,["r","Outcome"]],"seq":[true,"u64"]}}]},"StreamOptions":{"k":"s","c":true,"f":{"includeReasoning":[false,"b"],"includeUsage":[false,"b"]}},"StringOrEnv":{"k":"u","b":["s",["r","EnvVarRef"]]},"TaggedRawToolCall":{"k":"s","c":false,"f":{"dynamic":[false,["n","b"]],"input":[true,"s"],"providerExecuted":[false,["n","b"]],"providerMetadata":[false,["n",["m",["m","j"]]]],"toolCallId":[true,"s"],"toolName":[true,"s"],"type":[true,["l","tool-call"]]}},"TaggedToolResult":{"k":"s","c":false,"f":{"dynamic":[false,["n","b"]],"input":[false,"j"],"output":[true,"j"],"preliminary":[false,["n","b"]],"providerExecuted":[false,["n","b"]],"providerMetadata":[false,["n",["m",["m","j"]]]],"toolCallId":[true,"s"],"toolName":[true,"s"],"type":[true,["l","tool-result"]]}},"TemplateParamDescriptor":{"k":"s","c":true,"f":{"envVar":[true,"s"],"name":[true,"s"]}},"TerminalSummary":{"k":"s","c":false,"f":{"error":[false,["n",["r","ErrorEnvelope"]]],"outcome":[true,["r","OperationOutcome"]]}},"TextPart":{"k":"s","c":false,"f":{"providerOptions":[false,["n",["m",["m","j"]]]],"text":[true,"s"]}},"TextRequest":{"k":"s","c":true,"f":{"abort":[false,["n",["r","HandleIdInput"]]],"options":[false,["r","Options"]],"prompt":[true,["r","ModelPrompt"]]}},"TextStreamPart":{"k":"t","g":"type","v":[{"tv":"text-start","c":false,"f":{"id":[true,"s"],"providerMetadata":[false,["n",["m",["m","j"]]]]}},{"tv":"text-end","c":false,"f":{"id":[true,"s"],"providerMetadata":[false,["n",["m",["m","j"]]]]}},{"tv":"text-delta","c":false,"f":{"id":[true,"s"],"providerMetadata":[false,["n",["m",["m","j"]]]],"text":[true,"s"]}},{"tv":"reasoning-start","c":false,"f":{"id":[true,"s"],"providerMetadata":[false,["n",["m",["m","j"]]]]}},{"tv":"reasoning-end","c":false,"f":{"id":[true,"s"],"providerMetadata":[false,["n",["m",["m","j"]]]]}},{"tv":"reasoning-delta","c":false,"f":{"id":[true,"s"],"providerMetadata":[false,["n",["m",["m","j"]]]],"text":[true,"s"]}},{"tv":"custom","c":false,"f":{"kind":[true,["r","NamespacedKind"]],"providerMetadata":[false,["n",["m",["m","j"]]]]}},{"tv":"tool-input-start","c":false,"f":{"dynamic":[false,["n","b"]],"id":[true,"s"],"providerExecuted":[false,["n","b"]],"providerMetadata":[false,["n",["m",["m","j"]]]],"title":[false,["n","s"]],"toolName":[true,"s"]}},{"tv":"tool-input-end","c":false,"f":{"id":[true,"s"],"providerMetadata":[false,["n",["m",["m","j"]]]]}},{"tv":"tool-input-delta","c":false,"f":{"delta":[true,"s"],"id":[true,"s"],"providerMetadata":[false,["n",["m",["m","j"]]]]}},{"tv":"source","c":false,"f":{"id":[true,"s"],"providerMetadata":[false,["n",["m",["m","j"]]]],"sourceType":[true,["l","url"]],"title":[false,["n","s"]],"url":[true,"s"]}},{"tv":"source","c":false,"f":{"filename":[false,["n","s"]],"id":[true,"s"],"mediaType":[true,"s"],"providerMetadata":[false,["n",["m",["m","j"]]]],"sourceType":[true,["l","document"]],"title":[true,"s"]}},{"tv":"file","c":false,"f":{"file":[true,["r","GeneratedFile"]],"providerMetadata":[false,["n",["m",["m","j"]]]]}},{"tv":"reasoning-file","c":false,"f":{"file":[true,["r","GeneratedFile"]],"providerMetadata":[false,["n",["m",["m","j"]]]]}},{"tv":"tool-call","c":false,"f":{"dynamic":[false,["n","b"]],"error":[false,["n",["r","AiMuxError"]]],"input":[true,"j"],"invalid":[false,["n","b"]],"providerExecuted":[false,["n","b"]],"providerMetadata":[false,["n",["m",["m","j"]]]],"toolCallId":[true,"s"],"toolName":[true,"s"]}},{"tv":"tool-result","c":false,"f":{"dynamic":[false,["n","b"]],"input":[false,"j"],"output":[true,"j"],"preliminary":[false,["n","b"]],"providerExecuted":[false,["n","b"]],"providerMetadata":[false,["n",["m",["m","j"]]]],"toolCallId":[true,"s"],"toolName":[true,"s"]}},{"tv":"tool-error","c":false,"f":{"dynamic":[false,["n","b"]],"error":[true,"j"],"input":[false,"j"],"providerExecuted":[false,["n","b"]],"providerMetadata":[false,["n",["m",["m","j"]]]],"toolCallId":[true,"s"],"toolName":[true,"s"]}},{"tv":"tool-output-denied","c":false,"f":{"dynamic":[false,["n","b"]],"providerExecuted":[false,["n","b"]],"toolCallId":[true,"s"],"toolName":[true,"s"]}},{"tv":"tool-approval-request","c":false,"f":{"approvalId":[true,"s"],"isAutomatic":[false,["n","b"]],"reason":[false,["n","s"]],"signature":[false,["n","s"]],"toolCall":[true,["r","TypedToolCall"]]}},{"tv":"tool-approval-response","c":false,"f":{"approvalId":[true,"s"],"approved":[true,"b"],"providerExecuted":[false,["n","b"]],"reason":[false,["n","s"]],"toolCall":[true,["r","TypedToolCall"]]}},{"tv":"start-step","c":false,"f":{"request":[true,["r","RequestInfo"]],"warnings":[true,["a",["r","Warning"]]]}},{"tv":"finish-step","c":false,"f":{"finishReason":[true,["r","FinishReasonUnified"]],"performance":[true,["r","StepResultPerformance"]],"providerMetadata":[false,["n",["m",["m","j"]]]],"rawFinishReason":[false,["n","s"]],"response":[true,["r","StepResponseMetadata"]],"usage":[true,["r","LanguageModelUsage"]]}},{"tv":"start","c":false,"f":{}},{"tv":"finish","c":false,"f":{"finishReason":[true,["r","FinishReasonUnified"]],"rawFinishReason":[false,["n","s"]],"totalUsage":[true,["r","LanguageModelUsage"]]}},{"tv":"abort","c":false,"f":{"reason":[false,["n","s"]]}},{"tv":"error","c":false,"f":{"error":[true,["r","AiMuxError"]]}},{"tv":"raw","c":false,"f":{"rawValue":[true,"j"]}}]},"TimeoutConfiguration":{"k":"s","c":true,"f":{"chunkMs":[false,["n",["i",true,64]]],"firstChunkMs":[false,["n",["i",true,64]]],"stepMs":[false,["n",["i",true,64]]],"totalMs":[false,["n",["i",true,64]]]}},"Timestamp":{"k":"a","t":"s"},"TimingRecord":{"k":"s","c":false,"f":{"latencyMs":[true,["i",true,64]],"ttfbMs":[false,["n",["i",true,64]]]}},"Tool":{"k":"t","g":"type","v":[{"tv":"function","c":false,"f":{"description":[false,["n","s"]],"inputExamples":[false,["n",["a",["r","FunctionToolInputExample"]]]],"inputSchema":[true,"j"],"name":[true,"s"],"providerOptions":[false,["n",["m",["m","j"]]]],"strict":[false,["n","b"]]}},{"tv":"provider","c":false,"f":{"args":[true,["m","j"]],"id":[true,["r","NamespacedKind"]],"name":[true,"s"],"supportsDeferredResults":[false,["n","b"]]}}]},"ToolApprovalRequestOutput":{"k":"s","c":false,"f":{"approvalId":[true,"s"],"isAutomatic":[false,["n","b"]],"reason":[false,["n","s"]],"signature":[false,["n","s"]],"toolCall":[true,["r","TypedToolCall"]]}},"ToolApprovalRequestOutputInput":{"k":"s","c":false,"f":{"approvalId":[true,"s"],"isAutomatic":[false,["n","b"]],"reason":[false,["n","s"]],"signature":[false,["n","s"]],"toolCall":[true,["r","TypedToolCallInput"]]}},"ToolApprovalResponseOutput":{"k":"s","c":false,"f":{"approvalId":[true,"s"],"approved":[true,"b"],"providerExecuted":[false,["n","b"]],"reason":[false,["n","s"]],"toolCall":[true,["r","TypedToolCall"]]}},"ToolApprovalResponseOutputInput":{"k":"s","c":false,"f":{"approvalId":[true,"s"],"approved":[true,"b"],"providerExecuted":[false,["n","b"]],"reason":[false,["n","s"]],"toolCall":[true,["r","TypedToolCallInput"]]}},"ToolApprovalResponsePart":{"k":"s","c":false,"f":{"approvalId":[true,"s"],"approved":[true,"b"],"providerOptions":[false,["n",["m",["m","j"]]]],"reason":[false,["n","s"]]}},"ToolCall":{"k":"s","c":false,"f":{"dynamic":[false,["n","b"]],"error":[false,["n",["r","AiMuxError"]]],"input":[true,"j"],"invalid":[false,["n","b"]],"providerExecuted":[false,["n","b"]],"providerMetadata":[false,["n",["m",["m","j"]]]],"toolCallId":[true,"s"],"toolName":[true,"s"]}},"ToolCallInput":{"k":"s","c":false,"f":{"dynamic":[false,["n","b"]],"error":[false,["n",["r","AiMuxErrorInput"]]],"input":[true,"j"],"invalid":[false,["n","b"]],"providerExecuted":[false,["n","b"]],"providerMetadata":[false,["n",["m",["m","j"]]]],"toolCallId":[true,"s"],"toolName":[true,"s"]}},"ToolCallPart":{"k":"s","c":false,"f":{"input":[true,"j"],"providerExecuted":[false,["n","b"]],"providerOptions":[false,["n",["m",["m","j"]]]],"toolCallId":[true,"s"],"toolName":[true,"s"]}},"ToolCallRepairReply":{"k":"t","g":"type","v":[{"tv":"repaired","c":true,"f":{"toolCall":[true,["r","RepairedToolCall"]]}},{"tv":"unchanged","c":true,"f":{}},{"tv":"failed","c":true,"f":{"message":[true,"s"]}}]},"ToolChoice":{"k":"u","b":[["r","ToolChoiceMode"],["r","ToolChoiceTool"]]},"ToolChoiceMode":{"k":"e","v":["auto","none","required"]},"ToolChoiceTool":{"k":"s","c":false,"f":{"toolName":[true,"s"],"type":[true,["l","tool"]]}},"ToolChoiceViolationError":{"k":"s","c":false,"f":{"content":[true,["a",["r","GenerateContent"]]],"finishReason":[true,["r","FinishReasonUnified"]],"modelId":[true,"s"],"provider":[true,"s"],"toolChoice":[true,["r","LanguageModelV4ToolChoice"]]}},"ToolContentPart":{"k":"t","g":"type","v":[{"tv":"tool-result","c":false,"f":{"output":[true,["r","ToolResultOutput"]],"providerOptions":[false,["n",["m",["m","j"]]]],"toolCallId":[true,"s"],"toolName":[false,["n","s"]]}},{"tv":"tool-approval-response","c":false,"f":{"approvalId":[true,"s"],"approved":[true,"b"],"providerExecuted":[false,["n","b"]],"reason":[false,["n","s"]]}}]},"ToolOutputDenied":{"k":"s","c":false,"f":{"dynamic":[false,["n","b"]],"providerExecuted":[false,["n","b"]],"toolCallId":[true,"s"],"toolName":[true,"s"]}},"ToolPart":{"k":"t","g":"type","v":[{"tv":"tool-result","c":false,"f":{"output":[true,["r","LanguageModelToolResultOutput"]],"providerOptions":[false,["n",["m",["m","j"]]]],"toolCallId":[true,"s"],"toolName":[true,"s"]}},{"tv":"tool-approval-response","c":false,"f":{"approvalId":[true,"s"],"approved":[true,"b"],"providerOptions":[false,["n",["m",["m","j"]]]],"reason":[false,["n","s"]]}}]},"ToolRepairApplyRequest":{"k":"s","c":true,"f":{"options":[false,["r","GenerateTextOptions"]],"reply":[true,["r","ToolCallRepairReply"]],"toolCall":[true,["r","ToolCallInput"]]}},"ToolRepairApplyResultRequest":{"k":"s","c":true,"f":{"options":[false,["r","GenerateTextOptions"]],"reply":[true,["r","ToolCallRepairReply"]],"result":[true,["r","GenerateTextResultInput"]],"toolCallId":[true,"s"]}},"ToolRepairContextRequest":{"k":"s","c":true,"f":{"options":[false,["r","GenerateTextOptions"]],"prompt":[true,["r","ModelPrompt"]],"toolCall":[true,["r","ToolCallInput"]]}},"ToolRepairContextResult":{"k":"a","t":["n",["r","ToolRepairContextSchema"]]},"ToolRepairContextSchema":{"k":"s","c":false,"f":{"error":[true,["r","AiMuxError"]],"inputSchema":[true,"j"],"instructions":[true,["n","s"]],"messages":[true,["a",["r","ModelMessage"]]],"toolCall":[true,["r","TaggedRawToolCall"]],"tools":[true,["a",["r","Tool"]]]}},"ToolResult":{"k":"s","c":false,"f":{"dynamic":[false,["n","b"]],"isError":[false,["n","b"]],"preliminary":[false,["n","b"]],"providerMetadata":[false,["n",["m",["m","j"]]]],"result":[true,"j"],"toolCallId":[true,"s"],"toolName":[true,"s"]}},"ToolResultContent":{"k":"t","g":"type","v":[{"tv":"text","c":false,"f":{"providerOptions":[false,["n",["m",["m","j"]]]],"text":[true,"s"]}},{"tv":"file","c":false,"f":{"data":[true,["r","FileData"]],"filename":[false,["n","s"]],"mediaType":[true,"s"],"providerOptions":[false,["n",["m",["m","j"]]]]}},{"tv":"custom","c":false,"f":{"providerOptions":[false,["n",["m",["m","j"]]]]}}]},"ToolResultContentPart":{"k":"t","g":"type","v":[{"tv":"text","c":false,"f":{"providerOptions":[false,["n",["m",["m","j"]]]],"text":[true,"s"]}},{"tv":"file","c":false,"f":{"data":[true,["r","FileData"]],"filename":[false,["n","s"]],"mediaType":[true,"s"],"providerOptions":[false,["n",["m",["m","j"]]]]}},{"tv":"file-data","c":false,"f":{"data":[true,"s"],"filename":[false,["n","s"]],"mediaType":[true,"s"],"providerOptions":[false,["n",["m",["m","j"]]]]}},{"tv":"file-url","c":false,"f":{"mediaType":[false,["n","s"]],"providerOptions":[false,["n",["m",["m","j"]]]],"url":[true,"s"]}},{"tv":"file-id","c":false,"f":{"fileId":[true,["r","ToolResultFileId"]],"providerOptions":[false,["n",["m",["m","j"]]]]}},{"tv":"file-reference","c":false,"f":{"providerOptions":[false,["n",["m",["m","j"]]]],"providerReference":[true,["m","s"]]}},{"tv":"image-data","c":false,"f":{"data":[true,"s"],"mediaType":[true,"s"],"providerOptions":[false,["n",["m",["m","j"]]]]}},{"tv":"image-url","c":false,"f":{"providerOptions":[false,["n",["m",["m","j"]]]],"url":[true,"s"]}},{"tv":"image-file-id","c":false,"f":{"fileId":[true,["r","ToolResultFileId"]],"providerOptions":[false,["n",["m",["m","j"]]]]}},{"tv":"image-file-reference","c":false,"f":{"providerOptions":[false,["n",["m",["m","j"]]]],"providerReference":[true,["m","s"]]}},{"tv":"custom","c":false,"f":{"providerOptions":[false,["n",["m",["m","j"]]]]}}]},"ToolResultFileId":{"k":"u","b":["s",["m","s"]]},"ToolResultOutput":{"k":"t","g":"type","v":[{"tv":"text","c":false,"f":{"providerOptions":[false,["n",["m",["m","j"]]]],"value":[true,"s"]}},{"tv":"json","c":false,"f":{"providerOptions":[false,["n",["m",["m","j"]]]],"value":[true,"j"]}},{"tv":"execution-denied","c":false,"f":{"providerOptions":[false,["n",["m",["m","j"]]]],"reason":[false,["n","s"]]}},{"tv":"error-text","c":false,"f":{"providerOptions":[false,["n",["m",["m","j"]]]],"value":[true,"s"]}},{"tv":"error-json","c":false,"f":{"providerOptions":[false,["n",["m",["m","j"]]]],"value":[true,"j"]}},{"tv":"content","c":false,"f":{"value":[true,["a",["r","ToolResultContentPart"]]]}}]},"ToolResultPart":{"k":"s","c":false,"f":{"output":[true,["r","ToolResultOutput"]],"providerOptions":[false,["n",["m",["m","j"]]]],"toolCallId":[true,"s"],"toolName":[false,["n","s"]]}},"TraceAggregateFilter":{"k":"s","c":true,"f":{"model":[false,["n","s"]],"provider":[false,["n","s"]],"sessionId":[false,["n","s"]],"sinceUnixMs":[false,["n",["i",false,64]]]}},"TraceAggregateParams":{"k":"s","c":true,"f":{"filter":[false,["r","TraceAggregateFilter"]]}},"TraceAuditMode":{"k":"e","v":["off","shared","strict"]},"TraceCreateParams":{"k":"s","c":true,"f":{"auditMode":[false,["r","TraceAuditMode"]],"capacity":[false,["i",true,64]],"perScopeCapacity":[false,["i",true,64]]}},"TraceRecord":{"k":"s","c":false,"f":{"callId":[true,"s"],"error":[false,["n","s"]],"fingerprint":[true,["r","Fingerprint"]],"lcpTokenUpper":[false,["n",["i",true,64]]],"model":[true,"s"],"provider":[true,"s"],"requestCacheHints":[false,["n",["r","RequestCacheHints"]]],"requestId":[false,["n","s"]],"responseCacheHeaders":[false,["n",["m","s"]]],"sentAtUnixMs":[true,["i",false,64]],"sessionId":[false,["n","s"]],"ttftMs":[false,["n",["i",true,64]]],"usage":[true,["r","UsageSnapshot"]],"verdict":[false,["n",["r","Verdict"]]]}},"TraceSessionParams":{"k":"s","c":true,"f":{"sessionId":[true,"s"]}},"TraceStats":{"k":"s","c":false,"f":{"claimedCacheReadTotal":[true,["i",true,64]],"claimedCacheWriteTotal":[true,["i",true,64]],"clientUpperBoundHitRate":[false,["n","f"]],"errors":[true,["i",true,64]],"inputTokensTotal":[true,["i",true,64]],"model":[true,"s"],"provider":[true,"s"],"reportedHitRate":[false,["n","f"]],"requests":[true,["i",true,64]],"ttftP50Ms":[false,["n",["i",true,64]]],"ttftP95Ms":[false,["n",["i",true,64]]],"verdictCounts":[true,["m",["i",true,64]]]}},"TranscriptionCallOptions":{"k":"s","c":true,"f":{"audio":[true,["r","AudioInput"]],"headers":[false,["n",["m","s"]]],"maxRetries":[false,["n",["i",true,32]]],"mediaType":[true,"s"],"providerOptions":[false,["n",["m",["m","j"]]]],"timeout":[false,["n",["r","TimeoutConfiguration"]]]}},"TranscriptionRequest":{"k":"s","c":false,"f":{"body":[false,["n","s"]]}},"TranscriptionResponse":{"k":"s","c":false,"f":{"body":[false,"j"],"headers":[false,["n",["m","s"]]],"modelId":[false,["n","s"]],"timestamp":[false,["n",["r","Timestamp"]]]}},"TranscriptionResult":{"k":"s","c":false,"f":{"durationInSeconds":[false,["n","f"]],"language":[false,["n","s"]],"providerMetadata":[false,["n",["m",["m","j"]]]],"request":[false,["n",["r","TranscriptionRequest"]]],"response":[true,["r","TranscriptionResponse"]],"segments":[true,["a",["r","TranscriptionSegment"]]],"text":[true,"s"],"warnings":[true,["a",["r","Warning"]]]}},"TranscriptionSegment":{"k":"s","c":false,"f":{"endSecond":[true,"f"],"startSecond":[true,"f"],"text":[true,"s"]}},"TranscriptionStartParams":{"k":"s","c":true,"f":{"abort":[false,["n",["r","HandleIdInput"]]],"headers":[false,["n",["m","s"]]],"includeRawChunks":[false,"b"],"inputAudioFormat":[false,["n",["r","InputAudioFormat"]]],"providerOptions":[false,["n",["m",["m","j"]]]],"timeout":[false,["n",["r","TimeoutConfiguration"]]]}},"TranscriptionStreamPart":{"k":"t","g":"type","v":[{"tv":"stream-start","c":false,"f":{"warnings":[true,["a",["r","Warning"]]]}},{"tv":"transcript-delta","c":false,"f":{"delta":[true,"s"],"id":[false,["n","s"]],"providerMetadata":[false,["n",["m",["m","j"]]]]}},{"tv":"transcript-partial","c":false,"f":{"channelIndex":[false,["n",["i",true,32]]],"durationInSeconds":[false,["n","f"]],"id":[false,["n","s"]],"providerMetadata":[false,["n",["m",["m","j"]]]],"startSecond":[false,["n","f"]],"text":[true,"s"]}},{"tv":"transcript-final","c":false,"f":{"channelIndex":[false,["n",["i",true,32]]],"endSecond":[false,["n","f"]],"id":[false,["n","s"]],"providerMetadata":[false,["n",["m",["m","j"]]]],"startSecond":[false,["n","f"]],"text":[true,"s"]}},{"tv":"response-metadata","c":false,"f":{"body":[false,"j"],"headers":[false,["n",["m","s"]]],"modelId":[false,["n","s"]],"timestamp":[false,["n",["r","Timestamp"]]]}},{"tv":"finish","c":false,"f":{"durationInSeconds":[false,["n","f"]],"language":[false,["n","s"]],"providerMetadata":[false,["n",["m",["m","j"]]]],"segments":[true,["a",["r","TranscriptionSegment"]]],"text":[true,"s"]}},{"tv":"raw","c":false,"f":{"rawValue":[true,"j"]}},{"tv":"error","c":false,"f":{"error":[true,"j"]}}]},"TransportParams":{"k":"t","g":"kind","v":[{"tv":"fetch","c":true,"f":{"proxy":[false,["r","TransportProxy"]]}},{"tv":"ws","c":true,"f":{"proxy":[false,["r","TransportProxy"]]}},{"tv":"download","c":true,"f":{"maxBytes":[false,["n",["i",true,64]]]}}]},"TransportProxy":{"k":"s","c":true,"f":{"all_url":[false,["n","s"]],"http_url":[false,["n","s"]],"https_url":[false,["n","s"]],"no_proxy":[false,["n","s"]]}},"TypedSource":{"k":"t","g":"sourceType","v":[{"tv":"url","c":false,"f":{"id":[true,"s"],"providerMetadata":[false,["n",["m",["m","j"]]]],"title":[false,["n","s"]],"type":[true,["l","source"]],"url":[true,"s"]}},{"tv":"document","c":false,"f":{"filename":[false,["n","s"]],"id":[true,"s"],"mediaType":[true,"s"],"providerMetadata":[false,["n",["m",["m","j"]]]],"title":[true,"s"],"type":[true,["l","source"]]}}]},"TypedToolCall":{"k":"s","c":false,"f":{"dynamic":[false,["n","b"]],"error":[false,["n",["r","AiMuxError"]]],"input":[true,"j"],"invalid":[false,["n","b"]],"providerExecuted":[false,["n","b"]],"providerMetadata":[false,["n",["m",["m","j"]]]],"toolCallId":[true,"s"],"toolName":[true,"s"],"type":[true,["l","tool-call"]]}},"TypedToolCallInput":{"k":"s","c":false,"f":{"dynamic":[false,["n","b"]],"error":[false,["n",["r","AiMuxErrorInput"]]],"input":[true,"j"],"invalid":[false,["n","b"]],"providerExecuted":[false,["n","b"]],"providerMetadata":[false,["n",["m",["m","j"]]]],"toolCallId":[true,"s"],"toolName":[true,"s"],"type":[false,["l","tool-call"]]}},"TypedToolError":{"k":"s","c":false,"f":{"dynamic":[false,["n","b"]],"error":[true,"j"],"input":[false,"j"],"providerExecuted":[false,["n","b"]],"providerMetadata":[false,["n",["m",["m","j"]]]],"toolCallId":[true,"s"],"toolName":[true,"s"]}},"TypedToolResult":{"k":"s","c":false,"f":{"dynamic":[false,["n","b"]],"input":[false,"j"],"output":[true,"j"],"preliminary":[false,["n","b"]],"providerExecuted":[false,["n","b"]],"providerMetadata":[false,["n",["m",["m","j"]]]],"toolCallId":[true,"s"],"toolName":[true,"s"]}},"UploadFileData":{"k":"t","g":"type","v":[{"tv":"data","c":true,"f":{"data":[true,["r","FileBytes"]]}},{"tv":"text","c":true,"f":{"text":[true,"s"]}}]},"UploadFileParams":{"k":"s","c":true,"f":{"abort":[false,["n",["r","HandleIdInput"]]],"data":[true,["r","UploadFileData"]],"filename":[false,["n","s"]],"mediaType":[true,"s"],"providerOptions":[false,["n",["m",["m","j"]]]]}},"UploadFileResult":{"k":"s","c":false,"f":{"filename":[false,["n","s"]],"mediaType":[false,["n","s"]],"providerMetadata":[false,["n",["m",["m","j"]]]],"providerReference":[true,["m","s"]],"warnings":[true,["a",["r","Warning"]]]}},"UsageSnapshot":{"k":"s","c":false,"f":{"cacheRead":[false,["n",["i",true,64]]],"cacheWrite":[false,["n",["i",true,64]]],"inputNoCache":[false,["n",["i",true,64]]],"inputTotal":[false,["n",["i",true,64]]],"outputReasoning":[false,["n",["i",true,64]]],"outputText":[false,["n",["i",true,64]]],"outputTotal":[false,["n",["i",true,64]]],"raw":[false,"j"]}},"UserContent":{"k":"u","b":["s",["a",["r","UserContentPart"]]]},"UserContentPart":{"k":"t","g":"type","v":[{"tv":"text","c":false,"f":{"providerOptions":[false,["n",["m",["m","j"]]]],"text":[true,"s"]}},{"tv":"image","c":false,"f":{"image":[true,"s"],"mediaType":[true,"s"],"providerOptions":[false,["n",["m",["m","j"]]]]}},{"tv":"file","c":false,"f":{"data":[true,["r","FilePartData"]],"filename":[false,["n","s"]],"mediaType":[true,"s"],"providerOptions":[false,["n",["m",["m","j"]]]]}}]},"UserPart":{"k":"t","g":"type","v":[{"tv":"text","c":false,"f":{"providerOptions":[false,["n",["m",["m","j"]]]],"text":[true,"s"]}},{"tv":"file","c":false,"f":{"data":[true,["r","FileData"]],"filename":[false,["n","s"]],"mediaType":[true,"s"],"providerOptions":[false,["n",["m",["m","j"]]]]}}]},"Verdict":{"k":"s","c":false,"f":{"claimed":[true,["i",true,64]],"confidence":[true,["r","VerdictConfidence"]],"expectedMax":[true,["i",true,64]],"kind":[true,["r","VerdictKind"]],"lcpBytes":[true,["i",true,64]],"notes":[true,["a","s"]],"violated":[true,["a","s"]]}},"VerdictConfidence":{"k":"e","v":["High","Medium","Low"]},"VerdictKind":{"k":"e","v":["Trusted","SuspectOverclaim","SuspectUnderclaim","Unknown"]},"VideoCallOptions":{"k":"s","c":true,"f":{"aspectRatio":[false,["n",["r","AspectRatio"]]],"duration":[false,["n",["i",true,32]]],"fps":[false,["n",["i",true,32]]],"frameImages":[false,["n",["a",["r","VideoFrameImage"]]]],"generateAudio":[false,["n","b"]],"headers":[false,["n",["m","s"]]],"image":[false,["n",["r","VideoFile"]]],"inputReferences":[false,["n",["a",["r","VideoFile"]]]],"maxRetries":[false,["n",["i",true,32]]],"n":[false,["i",true,32]],"poll":[false,["n",["r","VideoPollOptions"]]],"prompt":[false,["n","s"]],"providerOptions":[false,["m",["m","j"]]],"resolution":[false,["n",["r","Size"]]],"seed":[false,["n",["i",true,64]]],"timeout":[false,["n",["r","TimeoutConfiguration"]]]}},"VideoData":{"k":"t","g":"type","v":[{"tv":"url","c":false,"f":{"mediaType":[true,"s"],"url":[true,"s"]}},{"tv":"base64","c":false,"f":{"data":[true,"s"],"mediaType":[true,"s"]}},{"tv":"binary","c":false,"f":{"data":[true,"s"],"mediaType":[true,"s"]}}]},"VideoFile":{"k":"t","g":"type","v":[{"tv":"file","c":false,"f":{"data":[true,["r","VideoFileData"]],"mediaType":[true,"s"]}},{"tv":"url","c":false,"f":{"mediaType":[false,["n","s"]],"url":[true,"s"]}}]},"VideoFileData":{"k":"a","t":"s"},"VideoFrameImage":{"k":"s","c":false,"f":{"frameType":[true,["r","VideoFrameType"]],"image":[true,["r","VideoFile"]]}},"VideoFrameType":{"k":"e","v":["first_frame","last_frame"]},"VideoPollOptions":{"k":"s","c":true,"f":{"intervalMs":[false,["n",["i",true,64]]],"timeoutMs":[false,["n",["i",true,64]]]}},"VideoResponse":{"k":"s","c":false,"f":{"headers":[false,["n",["m","s"]]],"modelId":[false,["n","s"]],"timestamp":[false,["n",["r","Timestamp"]]]}},"VideoResult":{"k":"s","c":false,"f":{"providerMetadata":[false,["n",["m",["m","j"]]]],"response":[true,["r","VideoResponse"]],"videos":[true,["a",["r","VideoData"]]],"warnings":[true,["a",["r","Warning"]]]}},"Warning":{"k":"t","g":"type","v":[{"tv":"unsupported","c":false,"f":{"details":[false,["n","s"]],"feature":[true,"s"]}},{"tv":"compatibility","c":false,"f":{"details":[false,["n","s"]],"feature":[true,"s"]}},{"tv":"deprecated","c":false,"f":{"message":[true,"s"],"setting":[true,"s"]}},{"tv":"other","c":false,"f":{"message":[true,"s"]}}]}} + +type SchemaTy = + | 's' | 'b' | 'f' | 'j' | 'u64' + | ['i', boolean, number] + | ['r', string] | ['l', string] | ['a', SchemaTy] | ['m', SchemaTy] | ['n', SchemaTy] + +type FieldSpec = readonly [boolean, SchemaTy] + +type TypeSpec = + | { k: 's'; c: boolean; f: Record } + | { k: 'e'; v: readonly string[] } + | { k: 't'; g: string; v: ReadonlyArray<{ tv: string; c: boolean; f: Record }> } + | { k: 'u'; b: readonly SchemaTy[] } + | { k: 'a'; t: SchemaTy } + +export class NonIntegerNumber { + readonly value: number + constructor(value: number) { this.value = value } +} + +function isPlainObject(value: unknown): value is Record { + return typeof value === 'object' && value !== null && !Array.isArray(value) && !(value instanceof NonIntegerNumber) +} + +function isU64String(value: unknown): boolean { + if (typeof value !== 'string' || !/^[0-9]+$/.test(value)) return false + const digits = value.replace(/^0+/, '') + return digits.length < 20 || (digits.length === 20 && digits <= '18446744073709551615') +} + +function isIntInRange(value: unknown, unsigned: boolean, bits: number): boolean { + if (typeof value === 'bigint') { + if (unsigned) { + if (value < 0n) return false + return value <= (1n << BigInt(bits)) - 1n + } + const bound = 1n << BigInt(bits - 1) + return value >= -bound && value <= bound - 1n + } + if (typeof value !== 'number' || !Number.isInteger(value)) return false + if (unsigned) { + if (value < 0) return false + if (bits <= 32) return value <= (bits === 32 ? 4294967295 : (1 << bits) - 1) + return value < 2 ** 64 + } + if (bits <= 32) { + const bound = 2 ** (bits - 1) + return value >= -bound && value <= bound - 1 + } + return value >= -(2 ** 63) && value < 2 ** 63 +} + +function checkFields(name: string, obj: Record, fields: Record, closed: boolean, tag?: string): void { + if (closed) { + for (const k of Object.keys(obj)) { + if (k !== tag && !Object.prototype.hasOwnProperty.call(fields, k)) { + throw new Error(`Unknown field ${k} for ${name}`) + } + } + } + for (const [k, [required, ty]] of Object.entries(fields)) { + if (Object.prototype.hasOwnProperty.call(obj, k)) { + checkTy(`${name}.${k}`, obj[k], ty) + } else if (required) { + throw new Error(`Missing required field ${name}.${k}`) + } + } +} + +function checkTy(path: string, value: unknown, ty: SchemaTy): void { + if (typeof ty === 'string') { + switch (ty) { + case 's': if (typeof value !== 'string') throw new Error(`Expected string at ${path}`); return + case 'b': if (typeof value !== 'boolean') throw new Error(`Expected boolean at ${path}`); return + case 'f': if (value instanceof NonIntegerNumber ? !Number.isFinite(value.value) : typeof value === 'bigint' ? !Number.isFinite(Number(value)) : typeof value !== 'number' || !Number.isFinite(value)) throw new Error(`Expected number at ${path}`); return + case 'j': if (value === undefined) throw new Error(`Expected JSON value at ${path}`); return + case 'u64': if (!isU64String(value)) throw new Error(`Expected u64 string at ${path}`); return + } + } + switch (ty[0]) { + case 'i': if (!isIntInRange(value, ty[1], ty[2])) throw new Error(`Expected integer at ${path}`); return + case 'r': validateDto(ty[1], value); return + case 'l': if (value !== ty[1]) throw new Error(`Expected literal ${ty[1]} at ${path}`); return + case 'a': + if (!Array.isArray(value)) throw new Error(`Expected array at ${path}`) + for (let i = 0; i < value.length; i++) checkTy(`${path}[${i}]`, value[i], ty[1]) + return + case 'm': + if (!isPlainObject(value)) throw new Error(`Expected map object at ${path}`) + for (const [k, v] of Object.entries(value)) checkTy(`${path}.${k}`, v, ty[1]) + return + case 'n': + if (value !== null) checkTy(path, value, ty[1]) + return + } +} + +export function validateDto(type: string, value: unknown): void { + const spec = dtoSchemas[type] as TypeSpec | undefined + if (!spec) throw new Error(`Unknown DTO type: ${type}`) + switch (spec.k) { + case 's': + if (!isPlainObject(value)) throw new Error(`Expected object for ${type}`) + checkFields(type, value, spec.f, spec.c) + return + case 'e': + if (typeof value !== 'string' || !spec.v.includes(value)) { + throw new Error(`Invalid ${type} enum value: ${String(value)}`) + } + return + case 't': { + if (!isPlainObject(value)) throw new Error(`Expected object for ${type}`) + const tag = value[spec.g] + const candidates = typeof tag === 'string' ? spec.v.filter(v => v.tv === tag) : [] + if (candidates.length === 0) throw new Error(`Unknown ${type} tag: ${String(tag)}`) + let lastError: unknown + for (const candidate of candidates) { + try { + checkFields(type, value, candidate.f, candidate.c, spec.g) + return + } catch (error) { + lastError = error + } + } + throw lastError + } + case 'u': { + let lastError: unknown + for (const branch of spec.b) { + try { + checkTy(type, value, branch) + return + } catch (error) { + lastError = error + } + } + throw lastError ?? new Error(`No matching ${type} branch`) + } + case 'a': + checkTy(type, value, spec.t) + return + } +} diff --git a/bindings/node/src/generated/ops.ts b/bindings/node/src/generated/ops.ts index 3736e803f..f833a62f2 100644 --- a/bindings/node/src/generated/ops.ts +++ b/bindings/node/src/generated/ops.ts @@ -1,7 +1,7 @@ -// Generated by aimux-codegen. Do not edit. Manifest SHA-256: 9c7f306459ec0009f6bca66c0abbb36fc3740b5fc6330c47a6fd73a6bc16caae +// Generated by aimux-codegen. Do not edit. Manifest SHA-256: cd147fa9595ede3951744fa261da98cc18c204e65b4081073ad3a3c1b68bfd92 export const ABI_VERSION = 65536 as const; export const OPS_VERSION = "1.0" as const; -export const MANIFEST_DIGEST = "9c7f306459ec0009f6bca66c0abbb36fc3740b5fc6330c47a6fd73a6bc16caae" as const; +export const MANIFEST_DIGEST = "cd147fa9595ede3951744fa261da98cc18c204e65b4081073ad3a3c1b68bfd92" as const; export const OP_ABORT_CREATE = "abort.create" as const; export const OP_ABORT_SIGNAL = "abort.signal" as const; export const OP_AUTH_CODEX_REFRESH = "auth.codexRefresh" as const; @@ -78,3 +78,107 @@ export const OP_TRANSCRIPTION_GENERATE = "transcription.generate" as const; export const OP_TRANSCRIPTION_START = "transcription.start" as const; export const OP_TRANSPORT_CREATE = "transport.create" as const; export const OP_VIDEO_GENERATE = "video.generate" as const; +export const TYPE_SCHEMA_HASHES: Readonly> = { + "AnyValue": "1277ba3a7f8d8ac87c32098666e636d643b6b12d05eb3929a9f018bcc4aa124d", + "[aimux_core::model_catalogue::RuntimeModel]": "aa1da3dbae5d9c830298d255a2cd3bf3b539865ec0324018abcbe555f964f086", + "[aimux_core::session::SessionCall]": "21e259cac0528023d45be7860ea838fcc6a785c0b26ebfe84f7e40b9b861458e", + "[aimux_core::session::SessionView]": "61ad43e852b0e490ab586cd27d25eeb97b00bbfce8808dde6b6252a4aeb367af", + "[aimux_core::trace::store::SessionStepStat]": "ad678575594f65b07dfcb9305b3360fa248d2a05acd3f1059a8cae039ad452cb", + "[aimux_core::trace::store::TraceStats]": "03eb93cd7b38050c6e3be7e47f3c7ac13e617b26f03f03011d58d9d8dfd273aa", + "[aimux_provider_utils::package_descriptor::PackageDescriptor]": "3a98399f69d62320aa747123ec3ede231cd955ced29e36dc401ccc9a82fedc8a", + "[uint8]": "7c82b8345d5b5e8e5c561ac91d6d94e05d221e5c52f729fdde3a6e3e3b6af77d", + "aimux_core::decision_model::DecideResult": "3d50c7ec8e3cce59ea94e9555c93965d03d50d5581e5c3cf214dfe1fdaac0053", + "aimux_core::embedding_model::EmbeddingCallOptions": "1f6db6e963bb7d969a1cb8da125ba836fe8711635d34902b674033e0aefa934d", + "aimux_core::embedding_model::EmbeddingResult": "af3ce0787db6208be114613c78dc02f038cb5dc2f7abcf6a4ade2be79085342e", + "aimux_core::files_model::UploadFileResult": "0d17fd3dbfa601e45c9fabf62f9bb1e5028591443eafccd4eecacef0dcda0368", + "aimux_core::generate::GenerateObjectResult": "21cca82de06d366b0f47d781bd49141bb63215accdd1133bb360113a60b7cc00", + "aimux_core::generate::GenerateTextResult": "c5c6016de2c926c85144959d9436c9d2214a27a9724e75d68393e933ef7263f5", + "aimux_core::image_model::ImageCallOptions": "ddacb8970cef4590bcdcc572ced361b181d501d3b474a2d6c50a9c0c02af3eb2", + "aimux_core::image_model::ImageResult": "a9d2d939f3dc153a5b5ebc8083bea1226ff63ff2e54e4e275c9ab2b136b9e880", + "aimux_core::openai_output::ChatCompletion": "503195cbe7fe458d9403a9de20b93bd17c20bbee0de40a8088bf3847ee835ad9", + "aimux_core::openai_output::ChatCompletionChunk": "b15bd0f02f12fa4e220a1b8e5d82ca24c7486557a04c550d30b90a297b372311", + "aimux_core::recording::Recording": "56fa358fb2023da68837722ed573e00fc997506403d7c7aa516c586c45b4fd54", + "aimux_core::reranking_model::RerankingCallOptions": "c481b6e7c4d5e71ea7db00166ab2952c8a893443f786a61374c7398b4e475e4c", + "aimux_core::reranking_model::RerankingResult": "d757826963b3ce836e4d76fca8f42455a3a3146c20f3fb74f58cabe465348d01", + "aimux_core::search_model::SearchCallOptions": "3b963a871e6f1858db03b68adc74c5f898d4a2c3c0506e4e359b8d8198d30b22", + "aimux_core::search_model::SearchResult": "61075439fcb4276085a11113195dd13220b710cc0c2199ceefa4ec3d07d0195f", + "aimux_core::speech_model::SpeechCallOptions": "418be167c89bca652fb0a9dd52a1da359c1ecc2b069b9d2a0859ab76a7f7f431", + "aimux_core::speech_model::SpeechResult": "8d32e22e24d7ee19a7c2f6cedaf909b6952aa76d635aa4e568e333ed5b45ce07", + "aimux_core::stream_part::TextStreamPart": "c3e035afcbb44740877b943b8ce19e5ac855fd3eaa9ee3d17a936cf7521d7ffc", + "aimux_core::tool::ToolCall": "ea7bd676d207cc40ac1d64442d114b041b7ac60db5420e1f200cc6a8af88d48c", + "aimux_core::trace::record::TraceRecord": "29acdf296b3cd896422357ec1c829fddef38a0455afd825cb7a49f0cb9a8b74d", + "aimux_core::trace::store::SessionChainView": "f5f242da28123fec7907b886dc1debfb4099cfa415074db3476f09712a6c34ca", + "aimux_core::transcription_model::TranscriptionCallOptions": "2a5cf741b2362497e51d0f33b275e01a9dcd336c08623c8617062b83f958aa10", + "aimux_core::transcription_model::TranscriptionResult": "80f153139ed0a65101df69711f15972bfee3154d5452ee8db11585376f31b5fc", + "aimux_core::video_model::VideoCallOptions": "d474a1301928fac38b4d5f06950a91285fc039a7910b51cda8b6ec84cbde9252", + "aimux_core::video_model::VideoResult": "b6fbefd485c75a364d0230349c85d9e222efad481dfde42d35332cbe14d2e09d", + "aimux_ops::envelope::ErrorEnvelope": "48e1305879bb316b0ab5a77b866d6a2dd5c9c2af7f4d9c39f31656d5e7150ce6", + "aimux_ops::frame::StreamFrame": "ce40166decce7b747c1ce7d8f887c5b820577e682df4568e06653de6d3e0c40c", + "aimux_ops::handle::HandleId": "1847d76248c899504e814a58f8771ef59f77fb8b1cca2090193a272bdbd0d6b8", + "aimux_ops::operation::CancelResult": "f166988845b50fd6ae7913505cff98100de52447ba7e297e79f7c6c9b569d02f", + "aimux_ops::operation::OperationStatus": "abeda07e7224a93d1dce678575101d846d68c0c6b24482fb0408b19cb0f52e6b", + "aimux_ops::ops::composite::MoaParams": "2510e5a1226e6f5742ba6f8331a6a1dc6ee48144c88143db25d1d213a842e4c3", + "aimux_ops::ops::composite::RouterParams": "a7db760e7a4e1b6624433d6609408a9136d869bf415c4f5a462011ac3164c3cb", + "aimux_ops::ops::decision::DecisionDecideRequest": "e2a9893b9dfa971db96e94eaf7b853f0daebeb152500d9c4851127abfde5802d", + "aimux_ops::ops::files::UploadFileParams": "136396c0be1014277cef6f30633f16d3ecc08d5392f1f53fa5ebbc2af0eba17c", + "aimux_ops::ops::handles::CredentialParams": "2a3ded4003c2d3257653c6ef4613f9defff748954cd9325c6aa98674cb080894", + "aimux_ops::ops::handles::HandleResult": "01fe7a49695da49143a48c0c53ec9b1ff4099dbc108770194430c38fe71f01c2", + "aimux_ops::ops::handles::MiddlewareParams": "f2789f63feb7b414d3f867c2a84dc298a53ace8d84082367e989161b769ec6ce", + "aimux_ops::ops::handles::TransportParams": "86e40584fcc21dab8f0017f8e892b776ac24aaa9afc943ba805828cecc6e1a4c", + "aimux_ops::ops::misc::CatalogueFetchRequest": "2ceed496996ec6cf32d3e3115ab6a4346a1bb201dc8a970eefbd46eb700a310e", + "aimux_ops::ops::misc::CodexRefreshRequest": "59f1075ed68cb79896d4bac1d0ab32d21fb5855012c6336652bea0c4969ac926", + "aimux_ops::ops::misc::OpenAiOutputRequest": "b0c6acc344f0b23b9ea3b693aeadf7aed7eb4fbdfce4b957be83af1154b842b4", + "aimux_ops::ops::misc::ToolRepairApplyRequest": "0f430fdb223759ef7c48c4d7f824e7be74d29295a6b4f7caaf82b5acba25e538", + "aimux_ops::ops::misc::ToolRepairApplyResultRequest": "fa092862004654e065233b2df2abdbec3befe88d9d734d494679968a5b6e954a", + "aimux_ops::ops::misc::ToolRepairContextRequest": "81bae04c56aac3380b75de639d162f819a2dd5717147a53cf1a75281727d78a1", + "aimux_ops::ops::misc::ToolRepairContextResult": "fd8173e6ec40724fa4207e3571e290ac12e4db1fed08a709273e2982a82b504f", + "aimux_ops::ops::operation::EmptyParams": "1612408252a424283a43a92193bb8ea24f72c08b9f0d2117b4ef7f5a090e37f8", + "aimux_ops::ops::operation::OperationNextParams": "127fea618826e51576ae488dcccaca03c04b774a847a33ec9c47565396862bb7", + "aimux_ops::ops::operation::OperationPollResult": "ec9af646d9b26de004871b4427201b8185677bbbeaf48a1dd489e72e1b126ea1", + "aimux_ops::ops::operation::TranscriptionStartParams": "c863c6f84c5715193078c914c25a5c575c625d77cf3b64ad4029253268d56226", + "aimux_ops::ops::provider::HandleResult": "cea9958b3ff5c8896bab683db36a396bef563c35ec0121b77d51e9475d5d8df5", + "aimux_ops::ops::provider::ProviderCreateParams": "e65cb5322863a2d16af50745cca82873cd03fa2578320c1796570b37efd2c1bb", + "aimux_ops::ops::provider::ProviderCustomParams": "bc40024b5e1794bc8e2bd52bfa9b661b90ad9aa8ba94639ba9120b46bbbf0f90", + "aimux_ops::ops::provider::ProviderDefaultParams": "bb2aff39ad05a28afcc9f4fd8e7e7b30cf3c7ac7b5bd483e002f78f6db737299", + "aimux_ops::ops::provider::ProviderDescriptorsParams": "fa195301dd402853e4cca7cf0ba2843c550c96ef0dc179ec50516394a9435dc0", + "aimux_ops::ops::provider::ProviderInvokeParams": "b33bb79b85db5289152f563021ba9c4285538122d70fe16333b64c94a011fc78", + "aimux_ops::ops::provider::ProviderModelParams": "a9db30c0dc6c71594875748792ddce9f46707696842e45beaceaf474856fbcad", + "aimux_ops::ops::provider::ProviderWrapParams": "a7f59ed924a355d14ad795b37993983fc5c2f2125f9c813ce4b561a0fca7fd62", + "aimux_ops::ops::recording::CreateRecorderParams": "a951e5dde168e1621d21834415cac68c793244158e1fb0f5171dfda8b0bf71c5", + "aimux_ops::ops::recording::EmptyParams": "58802ed68aeb4b87ba67d24b728037be53e63706a4f29055005f14ad068c8777", + "aimux_ops::ops::recording::RecorderExport": "6d3226d3859134361f1dec0429a87c28342d7c5548ea175d535b92d4a49ee8e5", + "aimux_ops::ops::recording::RecorderHandleResult": "f16095d906b62f7fbf86800f6e39e3e89bd6ef1bc65776569795b3555e9025cc", + "aimux_ops::ops::recording::RecorderStats": "5f842b6b1bd0816d07e6f179890f79dddae8815c180824405a9e5ad9dd7871a0", + "aimux_ops::ops::registry::HandleResult": "5f78b2970033052ccdef6827004094c65e9ee35ddc6f80d6c8a619c4db63b05a", + "aimux_ops::ops::registry::ModelInfo": "291dc73d80dbe44be78b15e9deaa60ba253f0c47fc5cfdbffef3bd5cf4b94f36", + "aimux_ops::ops::registry::ModelInfoParams": "c357f2b2342be3bf5f680e816188a4d7b3758a399975eb77a599a82f633d8974", + "aimux_ops::ops::registry::ModelResolveParams": "cfcd1fab460d33db7141f397064edf1481f0024248a7a6f256f8cbfbd3c6eaee", + "aimux_ops::ops::registry::ModelWrapParams": "c5f9703fca04c72df6f3c1c76dea3a130c3e84e37dbc3f18ef58fcf9745f4781", + "aimux_ops::ops::registry::RegistryCreateParams": "6df3075b2b59076de76283d00d4853a4c0da0345c7396cee4a4ad69240290573", + "aimux_ops::ops::registry::RegistryFromConfigParams": "26872ba0751baac107c59a0aa962fa102cc778c661b7bd7b8bd1ccd4226b97ae", + "aimux_ops::ops::registry::RegistryListParams": "c1c477df7aefa646daf05cd316526138109cadd655dd219200531d72eff3260c", + "aimux_ops::ops::registry::RegistryListResult": "26049e7c68ea45b9e322f693c49755e0db476d91631f2a1aa864659b9b87a773", + "aimux_ops::ops::registry::RegistryProviderParams": "d6379c789feb67435e795d0213dfd2fd74d9276465a8f13622327864cb025fb4", + "aimux_ops::ops::registry::RegistryUpdateParams": "9cde136591d14543027538bfa38331059c9865efa2cb89cbf6b2866bdcd21e9e", + "aimux_ops::ops::registry::RegistryUpdateResult": "3e2738ff293183afb575f47bd75daa8afd330f09e43cb4a39de975d97ba16c5b", + "aimux_ops::ops::replay::ReplayCreateParams": "ee64b5b5843103f76ca2166aed2f58995e472be93cb7bb18dea8238c8a2d9e44", + "aimux_ops::ops::replay::ReplayInspection": "7ac2af62f3421f8c7c50867a838f0aff90f35b6a4f192f6c0d5347ab4699108c", + "aimux_ops::ops::replay::ReplayLiveParams": "e99c7d51fb194def185f5a03d84bfc226eb1b101eade0b885216332605318a4d", + "aimux_ops::ops::replay::ReplayLiveResult": "bd9959dd7e0300cb57e6929b2ed29b7e07dcb5aaf65be16b96e34bf8d6577a7f", + "aimux_ops::ops::replay::ReplayPlan": "5cc6667b9fac6de173bf5b55c1a76a491255f89f0fa7a27c0fd33fd790259799", + "aimux_ops::ops::replay::ReplaySessionHandle": "5e779b71ce2a54e59948c605cdfc48797d0760027ad5f44966df958fe9781d11", + "aimux_ops::ops::runtime::RuntimeConfigureParams": "e3b24b9f1fbdf2be7da210f15060803cf8bfdef77c8b2ad330a5b501263dfb0f", + "aimux_ops::ops::runtime::RuntimeDescribeParams": "c3db9b36a42e2bfda8823a35aadc8f6b183dcb46fd7256aeb66505289874b96d", + "aimux_ops::ops::session::SessionStoreCallsParams": "ddd482204fdd305bbfd28d43ae829d8c286f3f8906302ca6679743ea680fedda", + "aimux_ops::ops::session::SessionStoreCreateParams": "080d865c349ec86553f72b99ab1c65ddbb72d0c348a96dc17135a934d787cd86", + "aimux_ops::ops::session::SessionStoreHandle": "755d437d47d362474942fc4a09f5f8c80b75cf362ac16b25b262e33a760b4c6a", + "aimux_ops::ops::text::OpenAiTextRequest": "59293b18b6124a9a394113b8f94f637c65dc35ac44a30f7e0df70855e885f8e4", + "aimux_ops::ops::text::TextRequest": "3a6f59c1f0c3b7ded5f5509d93afe9bddd2b80a8a3cd752d79f97edadae40c3d", + "aimux_ops::ops::trace::TraceAggregateParams": "1b207f0bbe1b7ce7e9b8b0beb9334cf3cc4f9f05382911aaacfe0425dc8ff2c8", + "aimux_ops::ops::trace::TraceCreateParams": "59fef52f382800570e861ae9ca92433dcae8807679d914a89ce99705713301d9", + "aimux_ops::ops::trace::TraceSessionParams": "3e2300f6c65f6dcd52a016eba648a29abeff3a9d67c3b04a95617aa66832f810", + "aimux_providers::catalogue::Catalogue": "6e0128414c8cce09930fea4c68daf7739f9c79072f240bcb9d786eabeaf53b41", + "aimux_providers::codex::CodexTokens": "0925e12b12a645e10306277a7d46fad9d646ce829acef378d223d53800256321", + "null": "0b04deb4d538ba0de2ab6920bc3b185241775a867937e5875a50ff54be3b9d56", + "string": "0d6cbdd2f60c1f2f337739faaafd28ef3e743416ad7a52645a808613733dcab5", +}; diff --git a/bindings/node/src/native.ts b/bindings/node/src/native.ts index d1c4747dc..dd1ae2efa 100644 --- a/bindings/node/src/native.ts +++ b/bindings/node/src/native.ts @@ -1,6 +1,6 @@ // Raw JSON entrypoint. The adapter is asynchronous and never calls the C ABI. import { Runtime as NativeRuntime, Abort as NativeAbort } from '../index.js' -import { ABI_VERSION, OPS_VERSION, MANIFEST_DIGEST } from './generated/ops.ts' +import { ABI_VERSION, OPS_VERSION, MANIFEST_DIGEST, TYPE_SCHEMA_HASHES } from './generated/ops.ts' import { rethrow, protocolError } from './error.ts' export * from './error.ts' export type { FrameIterator } from '../index.js' @@ -14,18 +14,56 @@ export interface Manifest { ops: ReadonlyArray<{ name: string; mode: string; [key: string]: unknown }> handleKinds: ReadonlyArray errorCodes: ReadonlyArray + types?: ReadonlyArray<{ id?: unknown; schemaHash?: unknown; [key: string]: unknown }> [key: string]: unknown } -export function verifyManifest(manifest: Pick): void { - const expected = { abiVersion: ABI_VERSION, opsVersion: OPS_VERSION, digest: MANIFEST_DIGEST } - for (const field of ['abiVersion', 'opsVersion', 'digest'] as const) { - if (manifest[field] !== expected[field]) { - throw protocolError(302, 'UnsupportedOpsVersion', `Incompatible manifest ${field}: expected ${expected[field]}, received ${String(manifest[field])}`) +function findMismatchedTypes(types: unknown): string[] | null { + const expectedEntries = Object.entries(TYPE_SCHEMA_HASHES) + if (expectedEntries.length === 0 || !Array.isArray(types) || types.length === 0) { + return null + } + const actual = new Map() + for (const entry of types) { + if (entry !== null && typeof entry === 'object') { + const record = entry as { id?: unknown; schemaHash?: unknown } + if (typeof record.id === 'string' && typeof record.schemaHash === 'string') { + actual.set(record.id, record.schemaHash) + } + } + } + const mismatches: string[] = [] + for (const [id, expectedHash] of expectedEntries) { + if (actual.get(id) !== expectedHash) { + mismatches.push(id) + } + } + return mismatches +} + +function verifyVersions(abiVersion: unknown, opsVersion: unknown): void { + const expected = { abiVersion: ABI_VERSION, opsVersion: OPS_VERSION } + const actual = { abiVersion, opsVersion } + for (const field of ['abiVersion', 'opsVersion'] as const) { + if (actual[field] !== expected[field]) { + throw protocolError(302, 'UnsupportedOpsVersion', `Incompatible manifest ${field}: expected ${expected[field]}, received ${String(actual[field])}`) } } } +export function verifyManifest(manifest: Pick & Partial>): void { + verifyVersions(manifest.abiVersion, manifest.opsVersion) + if (manifest.digest === MANIFEST_DIGEST) { + return + } + const mismatches = findMismatchedTypes(manifest.types) + if (mismatches !== null && mismatches.length === 0) { + return + } + const detail = mismatches && mismatches.length > 0 ? ` (incompatible types: ${mismatches.slice(0, 5).join(', ')})` : '' + throw protocolError(302, 'UnsupportedOpsVersion', `Incompatible manifest digest: expected ${MANIFEST_DIGEST}, received ${String(manifest.digest)}${detail}`) +} + export class Runtime { readonly #inner: NativeRuntime readonly manifest!: Manifest @@ -36,18 +74,29 @@ export class Runtime { this.#inner = new NativeRuntime() Object.defineProperty(this, 'manifest', { enumerable: true, get: () => this.readManifest() }) this.manifestDigest = this.#inner.manifestDigest() - verifyManifest({ - abiVersion: this.#inner.abiVersion(), - opsVersion: this.#inner.opsVersion(), - digest: this.manifestDigest, - }) + const abiVersion = this.#inner.abiVersion() + const opsVersion = this.#inner.opsVersion() + verifyVersions(abiVersion, opsVersion) + if (this.manifestDigest !== MANIFEST_DIGEST) { + this.#manifest = this.parseAndVerifyManifest(abiVersion, opsVersion) + } + } + + private parseAndVerifyManifest(expectedAbi: number, expectedOps: string): Manifest { + const manifest = JSON.parse(this.#inner.manifestJson()) as Manifest + if (manifest.abiVersion !== expectedAbi || manifest.opsVersion !== expectedOps) { + verifyVersions(manifest.abiVersion, manifest.opsVersion) + } + if (manifest.digest !== this.manifestDigest) { + throw protocolError(302, 'UnsupportedOpsVersion', `Incompatible manifest digest: expected ${this.manifestDigest}, received ${String(manifest.digest)}`) + } + verifyManifest(manifest) + return manifest } private readManifest(): Manifest { if (this.#manifest === undefined) { - const manifest = JSON.parse(this.#inner.manifestJson()) as Manifest - verifyManifest(manifest) - this.#manifest = manifest + this.#manifest = this.parseAndVerifyManifest(ABI_VERSION, OPS_VERSION) } return this.#manifest } diff --git a/bindings/python/README.md b/bindings/python/README.md index 636e5dddf..1b093f38b 100644 --- a/bindings/python/README.md +++ b/bindings/python/README.md @@ -87,9 +87,9 @@ subclass, an underlying OS, TLS or parser error as `SourceError`, each with its own `__cause__` down the chain. Recording, binding and protocol errors have separate bases. Python never performs retries. -`ABI_VERSION`, `OPS_VERSION`, `manifest` and `manifest_digest()` are public. -Import checks the exact ABI/ops versions and digest pinned in the generated -metadata. `verify_contract(other_digest)` checks an additional consumer pin. +`ABI_VERSION`, `OPS_VERSION`, `manifest`, and `manifest_digest()` are public on `aimux`; `aimux.ops` exposes `MANIFEST_DIGEST` and `TYPE_SCHEMA_HASHES`. +Import checks the ABI/ops versions and manifest compatibility (`MANIFEST_DIGEST` fast-path with +full `TYPE_SCHEMA_HASHES` `schemaHash` fallback). `verify_contract(other_digest)` checks an additional consumer pin. Recorder/session/infer state is process-wide. Recording schema migration, transport replay, credential creation and complete platform install verification are outside this package's current guarantees. diff --git a/bindings/python/python/aimux/__init__.py b/bindings/python/python/aimux/__init__.py index 298f60ff7..e0ccc5f06 100644 --- a/bindings/python/python/aimux/__init__.py +++ b/bindings/python/python/aimux/__init__.py @@ -7,6 +7,7 @@ import weakref from . import ops +from ._manifest import DEFAULT_PIN as _DEFAULT_PIN, verify_manifest_contract from .aimux import ( ABI_VERSION, OPS_VERSION, EXPECTED_ABI_VERSION, EXPECTED_OPS_VERSION, EXPECTED_MANIFEST_DIGEST, Abort, Client as _NativeClient, StreamIterator, @@ -16,13 +17,6 @@ from ._errors import __all__ as _error_names, from_envelope as _from_envelope -def _verify_runtime(expected_digest): - if ABI_VERSION != EXPECTED_ABI_VERSION or OPS_VERSION != EXPECTED_OPS_VERSION: - raise ImportError("aimux ABI/ops version differs from the Python binding") - if expected_digest is not None and manifest_digest() != expected_digest: - raise ImportError("aimux manifest digest differs from the consumer's pinned contract") - - def _read_manifest(): description = json.loads(manifest_json()) if description["abiVersion"] != ABI_VERSION or description["opsVersion"] != OPS_VERSION: @@ -30,13 +24,49 @@ def _read_manifest(): return description -def verify_contract(expected_digest=EXPECTED_MANIFEST_DIGEST): - """Check runtime version and, when supplied, the consumer's pinned digest.""" - _verify_runtime(expected_digest) - return _read_manifest() - - -_verify_runtime(EXPECTED_MANIFEST_DIGEST) +def _verify_runtime(expected_digest=_DEFAULT_PIN): + actual_digest = manifest_digest() + if ( + ABI_VERSION != EXPECTED_ABI_VERSION + or OPS_VERSION != EXPECTED_OPS_VERSION + or ABI_VERSION != ops.ABI_VERSION + or OPS_VERSION != ops.OPS_VERSION + ): + raise ImportError("aimux ABI/ops version differs from the Python binding") + if expected_digest is None: + return None + if expected_digest is not _DEFAULT_PIN: + if actual_digest != expected_digest: + raise ImportError( + f"aimux manifest digest {actual_digest!r} differs from consumer pin {expected_digest!r}" + ) + return None + if actual_digest == EXPECTED_MANIFEST_DIGEST and actual_digest == ops.MANIFEST_DIGEST: + return None + description = _read_manifest() + return verify_manifest_contract( + description, + actual_digest=actual_digest, + expected_abi=ABI_VERSION, + expected_ops=OPS_VERSION, + expected_digest=expected_digest, + compile_time_abi=EXPECTED_ABI_VERSION, + compile_time_ops=EXPECTED_OPS_VERSION, + compile_time_digest=EXPECTED_MANIFEST_DIGEST, + python_abi=ops.ABI_VERSION, + python_ops=ops.OPS_VERSION, + python_digest=ops.MANIFEST_DIGEST, + type_hashes=ops.TYPE_SCHEMA_HASHES, + ) + + +def verify_contract(expected_digest=_DEFAULT_PIN): + """Check runtime version, explicit digest pin, or per-type schema hash compatibility.""" + verified = _verify_runtime(expected_digest) + return verified if verified is not None else _read_manifest() + + +_verify_runtime() def __getattr__(name): diff --git a/bindings/python/python/aimux/_manifest.py b/bindings/python/python/aimux/_manifest.py new file mode 100644 index 000000000..969ecf2a7 --- /dev/null +++ b/bindings/python/python/aimux/_manifest.py @@ -0,0 +1,73 @@ +DEFAULT_PIN = object() + + +def _mismatched_types(types, expected_hashes): + if not expected_hashes or not isinstance(types, list) or not types: + return None + actual = {} + for entry in types: + if isinstance(entry, dict): + type_id = entry.get("id") + schema_hash = entry.get("schemaHash") + if isinstance(type_id, str) and isinstance(schema_hash, str): + actual[type_id] = schema_hash + return [ + type_id + for type_id, expected_hash in expected_hashes.items() + if actual.get(type_id) != expected_hash + ] + + +def verify_manifest_contract( + description, + *, + actual_digest, + expected_abi, + expected_ops, + expected_digest=DEFAULT_PIN, + compile_time_abi, + compile_time_ops, + compile_time_digest, + python_abi=None, + python_ops=None, + python_digest=None, + type_hashes, +): + if python_abi is None: + python_abi = compile_time_abi + if python_ops is None: + python_ops = compile_time_ops + if python_digest is None: + python_digest = compile_time_digest + if ( + expected_abi != compile_time_abi + or expected_ops != compile_time_ops + or expected_abi != python_abi + or expected_ops != python_ops + ): + raise ImportError("aimux ABI/ops version differs from the Python binding") + if description.get("abiVersion") != expected_abi or description.get("opsVersion") != expected_ops: + raise ImportError("aimux manifest version differs from the native module") + manifest_field_digest = description.get("digest") + if manifest_field_digest is not None and manifest_field_digest != actual_digest: + raise ImportError("aimux manifest digest differs from the native module") + if expected_digest is None: + return description + if expected_digest is not DEFAULT_PIN: + if actual_digest != expected_digest: + raise ImportError( + f"aimux manifest digest {actual_digest!r} differs from consumer pin {expected_digest!r}" + ) + return description + if actual_digest == compile_time_digest and actual_digest == python_digest: + return description + mismatches = _mismatched_types(description.get("types"), type_hashes) + if mismatches is not None and not mismatches: + return description + target_digest = python_digest if actual_digest != python_digest else compile_time_digest + detail = "" + if mismatches: + detail = f" (incompatible types: {', '.join(mismatches[:5])})" + raise ImportError( + f"aimux manifest digest {actual_digest!r} differs from expected {target_digest!r}{detail}" + ) diff --git a/bindings/python/python/aimux/_types.py b/bindings/python/python/aimux/_types.py index 8855b5200..bcf50d570 100644 --- a/bindings/python/python/aimux/_types.py +++ b/bindings/python/python/aimux/_types.py @@ -1512,7 +1512,6 @@ class EnvVarRef(_Wire): #: Keep the payload open so newer error variants, provider data, and explicit #: JSON nulls survive decoding and re-encoding by an older adapter. class ErrorEnvelope(_Wire): - model_config = ConfigDict(extra="forbid") code: I32 = Field(alias="code") error: Any = Field(alias="error") kind: "_dto.ErrorDomain" = Field(alias="kind") diff --git a/bindings/python/python/aimux/ops.py b/bindings/python/python/aimux/ops.py index a91c4f448..732da9317 100644 --- a/bindings/python/python/aimux/ops.py +++ b/bindings/python/python/aimux/ops.py @@ -1,7 +1,7 @@ -# Generated by aimux-codegen. Do not edit. Manifest SHA-256: 9c7f306459ec0009f6bca66c0abbb36fc3740b5fc6330c47a6fd73a6bc16caae +# Generated by aimux-codegen. Do not edit. Manifest SHA-256: cd147fa9595ede3951744fa261da98cc18c204e65b4081073ad3a3c1b68bfd92 ABI_VERSION = 65536 OPS_VERSION = "1.0" -MANIFEST_DIGEST = "9c7f306459ec0009f6bca66c0abbb36fc3740b5fc6330c47a6fd73a6bc16caae" +MANIFEST_DIGEST = "cd147fa9595ede3951744fa261da98cc18c204e65b4081073ad3a3c1b68bfd92" OP_ABORT_CREATE = "abort.create" OP_ABORT_SIGNAL = "abort.signal" OP_AUTH_CODEX_REFRESH = "auth.codexRefresh" @@ -78,3 +78,107 @@ OP_TRANSCRIPTION_START = "transcription.start" OP_TRANSPORT_CREATE = "transport.create" OP_VIDEO_GENERATE = "video.generate" +TYPE_SCHEMA_HASHES = { + "AnyValue": "1277ba3a7f8d8ac87c32098666e636d643b6b12d05eb3929a9f018bcc4aa124d", + "[aimux_core::model_catalogue::RuntimeModel]": "aa1da3dbae5d9c830298d255a2cd3bf3b539865ec0324018abcbe555f964f086", + "[aimux_core::session::SessionCall]": "21e259cac0528023d45be7860ea838fcc6a785c0b26ebfe84f7e40b9b861458e", + "[aimux_core::session::SessionView]": "61ad43e852b0e490ab586cd27d25eeb97b00bbfce8808dde6b6252a4aeb367af", + "[aimux_core::trace::store::SessionStepStat]": "ad678575594f65b07dfcb9305b3360fa248d2a05acd3f1059a8cae039ad452cb", + "[aimux_core::trace::store::TraceStats]": "03eb93cd7b38050c6e3be7e47f3c7ac13e617b26f03f03011d58d9d8dfd273aa", + "[aimux_provider_utils::package_descriptor::PackageDescriptor]": "3a98399f69d62320aa747123ec3ede231cd955ced29e36dc401ccc9a82fedc8a", + "[uint8]": "7c82b8345d5b5e8e5c561ac91d6d94e05d221e5c52f729fdde3a6e3e3b6af77d", + "aimux_core::decision_model::DecideResult": "3d50c7ec8e3cce59ea94e9555c93965d03d50d5581e5c3cf214dfe1fdaac0053", + "aimux_core::embedding_model::EmbeddingCallOptions": "1f6db6e963bb7d969a1cb8da125ba836fe8711635d34902b674033e0aefa934d", + "aimux_core::embedding_model::EmbeddingResult": "af3ce0787db6208be114613c78dc02f038cb5dc2f7abcf6a4ade2be79085342e", + "aimux_core::files_model::UploadFileResult": "0d17fd3dbfa601e45c9fabf62f9bb1e5028591443eafccd4eecacef0dcda0368", + "aimux_core::generate::GenerateObjectResult": "21cca82de06d366b0f47d781bd49141bb63215accdd1133bb360113a60b7cc00", + "aimux_core::generate::GenerateTextResult": "c5c6016de2c926c85144959d9436c9d2214a27a9724e75d68393e933ef7263f5", + "aimux_core::image_model::ImageCallOptions": "ddacb8970cef4590bcdcc572ced361b181d501d3b474a2d6c50a9c0c02af3eb2", + "aimux_core::image_model::ImageResult": "a9d2d939f3dc153a5b5ebc8083bea1226ff63ff2e54e4e275c9ab2b136b9e880", + "aimux_core::openai_output::ChatCompletion": "503195cbe7fe458d9403a9de20b93bd17c20bbee0de40a8088bf3847ee835ad9", + "aimux_core::openai_output::ChatCompletionChunk": "b15bd0f02f12fa4e220a1b8e5d82ca24c7486557a04c550d30b90a297b372311", + "aimux_core::recording::Recording": "56fa358fb2023da68837722ed573e00fc997506403d7c7aa516c586c45b4fd54", + "aimux_core::reranking_model::RerankingCallOptions": "c481b6e7c4d5e71ea7db00166ab2952c8a893443f786a61374c7398b4e475e4c", + "aimux_core::reranking_model::RerankingResult": "d757826963b3ce836e4d76fca8f42455a3a3146c20f3fb74f58cabe465348d01", + "aimux_core::search_model::SearchCallOptions": "3b963a871e6f1858db03b68adc74c5f898d4a2c3c0506e4e359b8d8198d30b22", + "aimux_core::search_model::SearchResult": "61075439fcb4276085a11113195dd13220b710cc0c2199ceefa4ec3d07d0195f", + "aimux_core::speech_model::SpeechCallOptions": "418be167c89bca652fb0a9dd52a1da359c1ecc2b069b9d2a0859ab76a7f7f431", + "aimux_core::speech_model::SpeechResult": "8d32e22e24d7ee19a7c2f6cedaf909b6952aa76d635aa4e568e333ed5b45ce07", + "aimux_core::stream_part::TextStreamPart": "c3e035afcbb44740877b943b8ce19e5ac855fd3eaa9ee3d17a936cf7521d7ffc", + "aimux_core::tool::ToolCall": "ea7bd676d207cc40ac1d64442d114b041b7ac60db5420e1f200cc6a8af88d48c", + "aimux_core::trace::record::TraceRecord": "29acdf296b3cd896422357ec1c829fddef38a0455afd825cb7a49f0cb9a8b74d", + "aimux_core::trace::store::SessionChainView": "f5f242da28123fec7907b886dc1debfb4099cfa415074db3476f09712a6c34ca", + "aimux_core::transcription_model::TranscriptionCallOptions": "2a5cf741b2362497e51d0f33b275e01a9dcd336c08623c8617062b83f958aa10", + "aimux_core::transcription_model::TranscriptionResult": "80f153139ed0a65101df69711f15972bfee3154d5452ee8db11585376f31b5fc", + "aimux_core::video_model::VideoCallOptions": "d474a1301928fac38b4d5f06950a91285fc039a7910b51cda8b6ec84cbde9252", + "aimux_core::video_model::VideoResult": "b6fbefd485c75a364d0230349c85d9e222efad481dfde42d35332cbe14d2e09d", + "aimux_ops::envelope::ErrorEnvelope": "48e1305879bb316b0ab5a77b866d6a2dd5c9c2af7f4d9c39f31656d5e7150ce6", + "aimux_ops::frame::StreamFrame": "ce40166decce7b747c1ce7d8f887c5b820577e682df4568e06653de6d3e0c40c", + "aimux_ops::handle::HandleId": "1847d76248c899504e814a58f8771ef59f77fb8b1cca2090193a272bdbd0d6b8", + "aimux_ops::operation::CancelResult": "f166988845b50fd6ae7913505cff98100de52447ba7e297e79f7c6c9b569d02f", + "aimux_ops::operation::OperationStatus": "abeda07e7224a93d1dce678575101d846d68c0c6b24482fb0408b19cb0f52e6b", + "aimux_ops::ops::composite::MoaParams": "2510e5a1226e6f5742ba6f8331a6a1dc6ee48144c88143db25d1d213a842e4c3", + "aimux_ops::ops::composite::RouterParams": "a7db760e7a4e1b6624433d6609408a9136d869bf415c4f5a462011ac3164c3cb", + "aimux_ops::ops::decision::DecisionDecideRequest": "e2a9893b9dfa971db96e94eaf7b853f0daebeb152500d9c4851127abfde5802d", + "aimux_ops::ops::files::UploadFileParams": "136396c0be1014277cef6f30633f16d3ecc08d5392f1f53fa5ebbc2af0eba17c", + "aimux_ops::ops::handles::CredentialParams": "2a3ded4003c2d3257653c6ef4613f9defff748954cd9325c6aa98674cb080894", + "aimux_ops::ops::handles::HandleResult": "01fe7a49695da49143a48c0c53ec9b1ff4099dbc108770194430c38fe71f01c2", + "aimux_ops::ops::handles::MiddlewareParams": "f2789f63feb7b414d3f867c2a84dc298a53ace8d84082367e989161b769ec6ce", + "aimux_ops::ops::handles::TransportParams": "86e40584fcc21dab8f0017f8e892b776ac24aaa9afc943ba805828cecc6e1a4c", + "aimux_ops::ops::misc::CatalogueFetchRequest": "2ceed496996ec6cf32d3e3115ab6a4346a1bb201dc8a970eefbd46eb700a310e", + "aimux_ops::ops::misc::CodexRefreshRequest": "59f1075ed68cb79896d4bac1d0ab32d21fb5855012c6336652bea0c4969ac926", + "aimux_ops::ops::misc::OpenAiOutputRequest": "b0c6acc344f0b23b9ea3b693aeadf7aed7eb4fbdfce4b957be83af1154b842b4", + "aimux_ops::ops::misc::ToolRepairApplyRequest": "0f430fdb223759ef7c48c4d7f824e7be74d29295a6b4f7caaf82b5acba25e538", + "aimux_ops::ops::misc::ToolRepairApplyResultRequest": "fa092862004654e065233b2df2abdbec3befe88d9d734d494679968a5b6e954a", + "aimux_ops::ops::misc::ToolRepairContextRequest": "81bae04c56aac3380b75de639d162f819a2dd5717147a53cf1a75281727d78a1", + "aimux_ops::ops::misc::ToolRepairContextResult": "fd8173e6ec40724fa4207e3571e290ac12e4db1fed08a709273e2982a82b504f", + "aimux_ops::ops::operation::EmptyParams": "1612408252a424283a43a92193bb8ea24f72c08b9f0d2117b4ef7f5a090e37f8", + "aimux_ops::ops::operation::OperationNextParams": "127fea618826e51576ae488dcccaca03c04b774a847a33ec9c47565396862bb7", + "aimux_ops::ops::operation::OperationPollResult": "ec9af646d9b26de004871b4427201b8185677bbbeaf48a1dd489e72e1b126ea1", + "aimux_ops::ops::operation::TranscriptionStartParams": "c863c6f84c5715193078c914c25a5c575c625d77cf3b64ad4029253268d56226", + "aimux_ops::ops::provider::HandleResult": "cea9958b3ff5c8896bab683db36a396bef563c35ec0121b77d51e9475d5d8df5", + "aimux_ops::ops::provider::ProviderCreateParams": "e65cb5322863a2d16af50745cca82873cd03fa2578320c1796570b37efd2c1bb", + "aimux_ops::ops::provider::ProviderCustomParams": "bc40024b5e1794bc8e2bd52bfa9b661b90ad9aa8ba94639ba9120b46bbbf0f90", + "aimux_ops::ops::provider::ProviderDefaultParams": "bb2aff39ad05a28afcc9f4fd8e7e7b30cf3c7ac7b5bd483e002f78f6db737299", + "aimux_ops::ops::provider::ProviderDescriptorsParams": "fa195301dd402853e4cca7cf0ba2843c550c96ef0dc179ec50516394a9435dc0", + "aimux_ops::ops::provider::ProviderInvokeParams": "b33bb79b85db5289152f563021ba9c4285538122d70fe16333b64c94a011fc78", + "aimux_ops::ops::provider::ProviderModelParams": "a9db30c0dc6c71594875748792ddce9f46707696842e45beaceaf474856fbcad", + "aimux_ops::ops::provider::ProviderWrapParams": "a7f59ed924a355d14ad795b37993983fc5c2f2125f9c813ce4b561a0fca7fd62", + "aimux_ops::ops::recording::CreateRecorderParams": "a951e5dde168e1621d21834415cac68c793244158e1fb0f5171dfda8b0bf71c5", + "aimux_ops::ops::recording::EmptyParams": "58802ed68aeb4b87ba67d24b728037be53e63706a4f29055005f14ad068c8777", + "aimux_ops::ops::recording::RecorderExport": "6d3226d3859134361f1dec0429a87c28342d7c5548ea175d535b92d4a49ee8e5", + "aimux_ops::ops::recording::RecorderHandleResult": "f16095d906b62f7fbf86800f6e39e3e89bd6ef1bc65776569795b3555e9025cc", + "aimux_ops::ops::recording::RecorderStats": "5f842b6b1bd0816d07e6f179890f79dddae8815c180824405a9e5ad9dd7871a0", + "aimux_ops::ops::registry::HandleResult": "5f78b2970033052ccdef6827004094c65e9ee35ddc6f80d6c8a619c4db63b05a", + "aimux_ops::ops::registry::ModelInfo": "291dc73d80dbe44be78b15e9deaa60ba253f0c47fc5cfdbffef3bd5cf4b94f36", + "aimux_ops::ops::registry::ModelInfoParams": "c357f2b2342be3bf5f680e816188a4d7b3758a399975eb77a599a82f633d8974", + "aimux_ops::ops::registry::ModelResolveParams": "cfcd1fab460d33db7141f397064edf1481f0024248a7a6f256f8cbfbd3c6eaee", + "aimux_ops::ops::registry::ModelWrapParams": "c5f9703fca04c72df6f3c1c76dea3a130c3e84e37dbc3f18ef58fcf9745f4781", + "aimux_ops::ops::registry::RegistryCreateParams": "6df3075b2b59076de76283d00d4853a4c0da0345c7396cee4a4ad69240290573", + "aimux_ops::ops::registry::RegistryFromConfigParams": "26872ba0751baac107c59a0aa962fa102cc778c661b7bd7b8bd1ccd4226b97ae", + "aimux_ops::ops::registry::RegistryListParams": "c1c477df7aefa646daf05cd316526138109cadd655dd219200531d72eff3260c", + "aimux_ops::ops::registry::RegistryListResult": "26049e7c68ea45b9e322f693c49755e0db476d91631f2a1aa864659b9b87a773", + "aimux_ops::ops::registry::RegistryProviderParams": "d6379c789feb67435e795d0213dfd2fd74d9276465a8f13622327864cb025fb4", + "aimux_ops::ops::registry::RegistryUpdateParams": "9cde136591d14543027538bfa38331059c9865efa2cb89cbf6b2866bdcd21e9e", + "aimux_ops::ops::registry::RegistryUpdateResult": "3e2738ff293183afb575f47bd75daa8afd330f09e43cb4a39de975d97ba16c5b", + "aimux_ops::ops::replay::ReplayCreateParams": "ee64b5b5843103f76ca2166aed2f58995e472be93cb7bb18dea8238c8a2d9e44", + "aimux_ops::ops::replay::ReplayInspection": "7ac2af62f3421f8c7c50867a838f0aff90f35b6a4f192f6c0d5347ab4699108c", + "aimux_ops::ops::replay::ReplayLiveParams": "e99c7d51fb194def185f5a03d84bfc226eb1b101eade0b885216332605318a4d", + "aimux_ops::ops::replay::ReplayLiveResult": "bd9959dd7e0300cb57e6929b2ed29b7e07dcb5aaf65be16b96e34bf8d6577a7f", + "aimux_ops::ops::replay::ReplayPlan": "5cc6667b9fac6de173bf5b55c1a76a491255f89f0fa7a27c0fd33fd790259799", + "aimux_ops::ops::replay::ReplaySessionHandle": "5e779b71ce2a54e59948c605cdfc48797d0760027ad5f44966df958fe9781d11", + "aimux_ops::ops::runtime::RuntimeConfigureParams": "e3b24b9f1fbdf2be7da210f15060803cf8bfdef77c8b2ad330a5b501263dfb0f", + "aimux_ops::ops::runtime::RuntimeDescribeParams": "c3db9b36a42e2bfda8823a35aadc8f6b183dcb46fd7256aeb66505289874b96d", + "aimux_ops::ops::session::SessionStoreCallsParams": "ddd482204fdd305bbfd28d43ae829d8c286f3f8906302ca6679743ea680fedda", + "aimux_ops::ops::session::SessionStoreCreateParams": "080d865c349ec86553f72b99ab1c65ddbb72d0c348a96dc17135a934d787cd86", + "aimux_ops::ops::session::SessionStoreHandle": "755d437d47d362474942fc4a09f5f8c80b75cf362ac16b25b262e33a760b4c6a", + "aimux_ops::ops::text::OpenAiTextRequest": "59293b18b6124a9a394113b8f94f637c65dc35ac44a30f7e0df70855e885f8e4", + "aimux_ops::ops::text::TextRequest": "3a6f59c1f0c3b7ded5f5509d93afe9bddd2b80a8a3cd752d79f97edadae40c3d", + "aimux_ops::ops::trace::TraceAggregateParams": "1b207f0bbe1b7ce7e9b8b0beb9334cf3cc4f9f05382911aaacfe0425dc8ff2c8", + "aimux_ops::ops::trace::TraceCreateParams": "59fef52f382800570e861ae9ca92433dcae8807679d914a89ce99705713301d9", + "aimux_ops::ops::trace::TraceSessionParams": "3e2300f6c65f6dcd52a016eba648a29abeff3a9d67c3b04a95617aa66832f810", + "aimux_providers::catalogue::Catalogue": "6e0128414c8cce09930fea4c68daf7739f9c79072f240bcb9d786eabeaf53b41", + "aimux_providers::codex::CodexTokens": "0925e12b12a645e10306277a7d46fad9d646ce829acef378d223d53800256321", + "null": "0b04deb4d538ba0de2ab6920bc3b185241775a867937e5875a50ff54be3b9d56", + "string": "0d6cbdd2f60c1f2f337739faaafd28ef3e743416ad7a52645a808613733dcab5", +} diff --git a/bindings/python/tests/test_dto_types.py b/bindings/python/tests/test_dto_types.py index f00f5ad87..fb101151b 100644 --- a/bindings/python/tests/test_dto_types.py +++ b/bindings/python/tests/test_dto_types.py @@ -12,6 +12,14 @@ def test_closed_and_open_objects(): with pytest.raises(ValidationError, match='extra_forbidden'): dto.TextRequest.model_validate({'prompt': 'hello', 'unknown': True}) assert dto.RequestInfo.model_validate({'unknown': True}).model_dump(by_alias=True) == {} + envelope = dto.ErrorEnvelope.model_validate({ + 'kind': 'protocol', + 'code': 302, + 'message': 'future', + 'error': {'name': 'UnsupportedOpsVersion'}, + 'futureField': True, + }) + assert envelope.code == 302 def test_presence_and_nested_large_integers(): diff --git a/bindings/python/tests/test_manifest_negotiation.py b/bindings/python/tests/test_manifest_negotiation.py new file mode 100644 index 000000000..42a00e40d --- /dev/null +++ b/bindings/python/tests/test_manifest_negotiation.py @@ -0,0 +1,138 @@ +import hashlib +import importlib.util +import json +from pathlib import Path +import unittest + + +def _load(name, relative_path): + path = Path(__file__).resolve().parents[1] / relative_path + spec = importlib.util.spec_from_file_location(name, path) + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + return module + + +_manifest = _load("aimux_manifest_helper", "python/aimux/_manifest.py") +_ops = _load("aimux_generated_ops", "python/aimux/ops.py") + + +class ManifestNegotiationTests(unittest.TestCase): + def _base_kwargs(self, *, actual_digest, expected_digest=_manifest.DEFAULT_PIN, python_digest=None, python_abi=None): + return dict( + actual_digest=actual_digest, + expected_abi=_ops.ABI_VERSION, + expected_ops=_ops.OPS_VERSION, + expected_digest=expected_digest, + compile_time_abi=_ops.ABI_VERSION, + compile_time_ops=_ops.OPS_VERSION, + compile_time_digest=_ops.MANIFEST_DIGEST, + python_abi=_ops.ABI_VERSION if python_abi is None else python_abi, + python_ops=_ops.OPS_VERSION, + python_digest=_ops.MANIFEST_DIGEST if python_digest is None else python_digest, + type_hashes=_ops.TYPE_SCHEMA_HASHES, + ) + + def test_accepts_altered_packages_and_digest_with_intact_type_hashes(self): + types = [ + {"id": type_id, "revision": "1", "schemaHash": schema_hash} + for type_id, schema_hash in _ops.TYPE_SCHEMA_HASHES.items() + ] + self.assertGreater(len(types), 0) + description = { + "abiVersion": _ops.ABI_VERSION, + "opsVersion": _ops.OPS_VERSION, + "digest": "changed-digest-after-package-addition", + "packages": ["openai", "synthetic-package"], + "types": types, + } + result = _manifest.verify_manifest_contract( + description, + **self._base_kwargs(actual_digest=description["digest"]), + ) + self.assertEqual(result, description) + + def test_rejects_mismatched_schema_hash(self): + types = [ + {"id": type_id, "revision": "1", "schemaHash": schema_hash} + for type_id, schema_hash in _ops.TYPE_SCHEMA_HASHES.items() + ] + target_id = types[0]["id"] + broken = [dict(types[0], schemaHash="0" * 64), *types[1:]] + description = { + "abiVersion": _ops.ABI_VERSION, + "opsVersion": _ops.OPS_VERSION, + "digest": "changed-digest", + "types": broken, + } + with self.assertRaises(ImportError) as ctx: + _manifest.verify_manifest_contract( + description, + **self._base_kwargs(actual_digest="changed-digest"), + ) + self.assertIn(_ops.MANIFEST_DIGEST, str(ctx.exception)) + self.assertIn(target_id, str(ctx.exception)) + + def test_rejects_explicit_consumer_pin_even_with_matching_type_hashes(self): + types = [ + {"id": type_id, "revision": "1", "schemaHash": schema_hash} + for type_id, schema_hash in _ops.TYPE_SCHEMA_HASHES.items() + ] + intact = { + "abiVersion": _ops.ABI_VERSION, + "opsVersion": _ops.OPS_VERSION, + "digest": "changed-digest", + "types": types, + } + for pin in ("explicit-consumer-pin", _ops.MANIFEST_DIGEST): + with self.assertRaises(ImportError): + _manifest.verify_manifest_contract( + intact, + **self._base_kwargs( + actual_digest="changed-digest", + expected_digest=pin, + ), + ) + + def test_detects_stale_python_ops_metadata_even_when_native_is_self_consistent(self): + description = { + "abiVersion": _ops.ABI_VERSION, + "opsVersion": _ops.OPS_VERSION, + "digest": _ops.MANIFEST_DIGEST, + "types": [], + } + with self.assertRaises(ImportError): + _manifest.verify_manifest_contract( + description, + **self._base_kwargs( + actual_digest=_ops.MANIFEST_DIGEST, + python_digest="stale-python-ops-digest", + ), + ) + with self.assertRaises(ImportError): + _manifest.verify_manifest_contract( + description, + **self._base_kwargs( + actual_digest=_ops.MANIFEST_DIGEST, + python_abi=_ops.ABI_VERSION + 1, + ), + ) + + def test_schema_manifest_self_verifies_after_stripping_digest_and_input_hash(self): + manifest_path = Path(__file__).resolve().parents[3] / "schema" / "manifest.json" + emitted = json.loads(manifest_path.read_text(encoding="utf-8")) + self.assertEqual(emitted["digest"], _ops.MANIFEST_DIGEST) + self.assertEqual(emitted["inputHash"], _ops.MANIFEST_DIGEST) + unsigned = {k: v for k, v in emitted.items() if k not in ("digest", "inputHash")} + unsigned["ops"] = sorted(unsigned["ops"], key=lambda op: op["name"]) + canonical = json.dumps( + unsigned, + ensure_ascii=False, + separators=(",", ":"), + sort_keys=True, + ).encode("utf-8") + self.assertEqual(hashlib.sha256(canonical).hexdigest(), _ops.MANIFEST_DIGEST) + + +if __name__ == "__main__": + unittest.main() diff --git a/bindings/python/tests/test_ops_native.py b/bindings/python/tests/test_ops_native.py index 7d99efb31..809fb6a41 100644 --- a/bindings/python/tests/test_ops_native.py +++ b/bindings/python/tests/test_ops_native.py @@ -359,6 +359,46 @@ def test_manifest_checks(self): with self.assertRaises(ImportError): aimux.verify_contract('a different consumer digest') aimux.verify_contract(aimux.manifest_digest()) + types = [ + {'id': type_id, 'revision': '1', 'schemaHash': schema_hash} + for type_id, schema_hash in ops.TYPE_SCHEMA_HASHES.items() + ] + negotiated = { + 'abiVersion': aimux.ABI_VERSION, + 'opsVersion': ops.OPS_VERSION, + 'digest': 'changed-digest', + 'packages': ['openai', 'extra'], + 'types': types, + } + aimux._manifest.verify_manifest_contract( + negotiated, + actual_digest='changed-digest', + expected_abi=aimux.ABI_VERSION, + expected_ops=ops.OPS_VERSION, + compile_time_abi=aimux.EXPECTED_ABI_VERSION, + compile_time_ops=aimux.EXPECTED_OPS_VERSION, + compile_time_digest=aimux.EXPECTED_MANIFEST_DIGEST, + python_abi=ops.ABI_VERSION, + python_ops=ops.OPS_VERSION, + python_digest=ops.MANIFEST_DIGEST, + type_hashes=ops.TYPE_SCHEMA_HASHES, + ) + broken_types = [dict(types[0], schemaHash='0' * 64), *types[1:]] + with self.assertRaises(ImportError) as error: + aimux._manifest.verify_manifest_contract( + dict(negotiated, types=broken_types), + actual_digest='changed-digest', + expected_abi=aimux.ABI_VERSION, + expected_ops=ops.OPS_VERSION, + compile_time_abi=aimux.EXPECTED_ABI_VERSION, + compile_time_ops=aimux.EXPECTED_OPS_VERSION, + compile_time_digest=aimux.EXPECTED_MANIFEST_DIGEST, + python_abi=ops.ABI_VERSION, + python_ops=ops.OPS_VERSION, + python_digest=ops.MANIFEST_DIGEST, + type_hashes=ops.TYPE_SCHEMA_HASHES, + ) + self.assertIn(types[0]['id'], str(error.exception)) if __name__ == '__main__': diff --git a/bindings/swift/README.md b/bindings/swift/README.md index 03fd90c95..2ea617f38 100644 --- a/bindings/swift/README.md +++ b/bindings/swift/README.md @@ -82,8 +82,9 @@ push/poll validation. These native checks require no provider credentials or network. Successful provider requests and realtime audio require a configured provider. Recorder, session-store and inference configuration remain process wide. Transport replay and credential-resolver creation are reserved native -capabilities; business-type schemas and per-platform packaging verification -are separate from this package's tests. +capabilities; per-type DTO schemas (`schema/types/*.json`), `AimuxOps.TYPE_SCHEMA_HASHES`, +and cross-language DTO vector parity tests are included alongside the contract +suite, while per-platform packaging verification remains separate. The synthetic C backend separately exercises callback/lifecycle races: diff --git a/bindings/swift/Sources/Aimux/Aimux.swift b/bindings/swift/Sources/Aimux/Aimux.swift index ca872dd3b..bba683fab 100644 --- a/bindings/swift/Sources/Aimux/Aimux.swift +++ b/bindings/swift/Sources/Aimux/Aimux.swift @@ -91,12 +91,49 @@ private func nativeManifest() throws -> JSONValue { return value } +private func findMismatchedTypes(_ types: JSONValue?) -> [String]? { + guard !AimuxOps.TYPE_SCHEMA_HASHES.isEmpty, + case .array(let entries) = types, + !entries.isEmpty else { + return nil + } + var actual: [String: String] = [:] + actual.reserveCapacity(entries.count) + for entry in entries { + if case .string(let id) = entry["id"], + case .string(let schemaHash) = entry["schemaHash"] { + actual[id] = schemaHash + } + } + var mismatches: [String] = [] + for (id, expectedHash) in AimuxOps.TYPE_SCHEMA_HASHES { + if actual[id] != expectedHash { + mismatches.append(id) + } + } + mismatches.sort() + return mismatches +} + func validateManifest(_ value: JSONValue, version: UInt32) throws { guard value["opsVersion"] == .string(AimuxOps.OPS_VERSION), - value["abiVersion"] == .integer(Int64(version)), - value["digest"] == .string(AimuxOps.MANIFEST_DIGEST) else { + value["abiVersion"] == .integer(Int64(version)) else { throw AimuxError.state("Incompatible manifest: opsVersion \(String(describing: value["opsVersion"])) (expected \(AimuxOps.OPS_VERSION)), digest \(String(describing: value["digest"])) (expected \(AimuxOps.MANIFEST_DIGEST))", code: 302) } + if value["digest"] == .string(AimuxOps.MANIFEST_DIGEST) { + return + } + let mismatches = findMismatchedTypes(value["types"]) + if let mismatches, mismatches.isEmpty { + return + } + let detail: String + if let mismatches, !mismatches.isEmpty { + detail = " (incompatible types: \(mismatches.prefix(5).joined(separator: ", ")))" + } else { + detail = "" + } + throw AimuxError.state("Incompatible manifest: opsVersion \(String(describing: value["opsVersion"])) (expected \(AimuxOps.OPS_VERSION)), digest \(String(describing: value["digest"])) (expected \(AimuxOps.MANIFEST_DIGEST))\(detail)", code: 302) } private enum RuntimeMetadata { diff --git a/bindings/swift/Tests/AimuxTests/ContractTests.swift b/bindings/swift/Tests/AimuxTests/ContractTests.swift index 5c3a41fb9..18221ba32 100644 --- a/bindings/swift/Tests/AimuxTests/ContractTests.swift +++ b/bindings/swift/Tests/AimuxTests/ContractTests.swift @@ -1,4 +1,7 @@ import Foundation +#if canImport(CommonCrypto) +import CommonCrypto +#endif @testable import Aimux #if canImport(CAimuxTestABI) import CAimuxTestABI @@ -62,6 +65,82 @@ struct ContractTests { } #if !AIMUX_STANDALONE @Test +#endif + static func manifestNegotiatesByTypeSchemaHashesWhenDigestChanges() throws { + try require(!AimuxOps.TYPE_SCHEMA_HASHES.isEmpty) + let sortedEntries = AimuxOps.TYPE_SCHEMA_HASHES.sorted { $0.key < $1.key } + let types: [JSONValue] = sortedEntries.map { id, hash in + .object(["id": .string(id), "revision": .string("1"), "schemaHash": .string(hash)]) + } + let negotiated: [String: JSONValue] = [ + "abiVersion": .integer(Int64(AimuxOps.ABI_VERSION)), + "opsVersion": .string(AimuxOps.OPS_VERSION), + "digest": .string("changed-digest-from-new-package"), + "packages": .array([.string("openai"), .string("extra-package")]), + "types": .array(types), + ] + try validateManifest(.object(negotiated), version: AimuxOps.ABI_VERSION) + + let targetType = sortedEntries[0].key + var brokenTypes = types + brokenTypes[0] = .object([ + "id": .string(targetType), + "revision": .string("1"), + "schemaHash": .string(String(repeating: "0", count: 64)), + ]) + var invalid = negotiated + invalid["types"] = .array(brokenTypes) + do { + try validateManifest(.object(invalid), version: AimuxOps.ABI_VERSION) + throw CheckFailure(description: "Accepted manifest with altered type schemaHash") + } catch let error as AimuxError { + try require(error.code == 302) + try require(error.message.contains(AimuxOps.MANIFEST_DIGEST)) + try require(error.message.contains(targetType)) + } + } +#if !AIMUX_STANDALONE + @Test +#endif + static func schemaManifestSelfVerifiesAfterStrippingDigestAndInputHash() throws { +#if canImport(CommonCrypto) + let manifestURL = URL(fileURLWithPath: #filePath) + .deletingLastPathComponent() + .deletingLastPathComponent() + .deletingLastPathComponent() + .deletingLastPathComponent() + .deletingLastPathComponent() + .appendingPathComponent("schema/manifest.json") + let data = try Data(contentsOf: manifestURL) + guard case .object(var root) = try JSONDecoder().decode(JSONValue.self, from: data) else { + throw CheckFailure(description: "Expected JSON object in schema/manifest.json") + } + try require(root["digest"] == .string(AimuxOps.MANIFEST_DIGEST)) + try require(root["inputHash"] == .string(AimuxOps.MANIFEST_DIGEST)) + root.removeValue(forKey: "digest") + root.removeValue(forKey: "inputHash") + if case .array(let opsArray) = root["ops"] { + let sortedOps = opsArray.sorted { lhs, rhs in + guard case .object(let a) = lhs, case .object(let b) = rhs, + case .string(let nameA) = a["name"], case .string(let nameB) = b["name"] + else { return false } + return nameA < nameB + } + root["ops"] = .array(sortedOps) + } + let encoder = JSONEncoder() + encoder.outputFormatting = [.sortedKeys, .withoutEscapingSlashes] + let canonical = try encoder.encode(JSONValue.object(root)) + var hash = [UInt8](repeating: 0, count: Int(CC_SHA256_DIGEST_LENGTH)) + canonical.withUnsafeBytes { ptr in + _ = CC_SHA256(ptr.baseAddress, CC_LONG(canonical.count), &hash) + } + let hex = hash.map { String(format: "%02x", $0) }.joined() + try require(hex == AimuxOps.MANIFEST_DIGEST, "Self-verified digest \(hex) != \(AimuxOps.MANIFEST_DIGEST)") +#endif + } +#if !AIMUX_STANDALONE + @Test #endif static func manifestAndHandles() async throws { let manifest = try await AimuxRuntime.manifest() diff --git a/bindings/swift/Tests/AimuxTests/WireTests.swift b/bindings/swift/Tests/AimuxTests/WireTests.swift index f40968e3f..074dce15d 100644 --- a/bindings/swift/Tests/AimuxTests/WireTests.swift +++ b/bindings/swift/Tests/AimuxTests/WireTests.swift @@ -216,6 +216,14 @@ struct WireTests { let decoded = try JSONDecoder().decode(GenerateTextResult.self, from: reencoded) try assertEqual(original, decoded) } +#if !AIMUX_STANDALONE + @Test +#endif + static func testClosedTaggedVariantsRejectUnknownFields() throws { + _ = try JSONDecoder().decode(BackendConfig.self, from: Data(#"{"type":"ring","capacity":1}"#.utf8)) + try assertThrows(try JSONDecoder().decode(BackendConfig.self, from: Data(#"{"type":"ring","capacity":1,"extra":true}"#.utf8))) + try assertThrows(try JSONDecoder().decode(StreamFrame.self, from: Data(#"{"type":"end","seq":"0","outcome":"success","extra":true}"#.utf8))) + } } private func assertEqual(_ lhs: T, _ rhs: T) throws { try require(lhs == rhs, "Values differ: \(lhs) versus \(rhs)") diff --git a/bindings/swift/Tests/Standalone/Runner.swift b/bindings/swift/Tests/Standalone/Runner.swift index e7db7199d..4f045f9ca 100644 --- a/bindings/swift/Tests/Standalone/Runner.swift +++ b/bindings/swift/Tests/Standalone/Runner.swift @@ -6,6 +6,8 @@ import Foundation // The same checks used by swift test, runnable when SwiftPM cannot load. let checks: [(String, @Sendable () async throws -> Void)] = [ ("manifestRequiresExactVersionAndDigest", { try ContractTests.manifestRequiresExactVersionAndDigest() }), + ("manifestNegotiatesByTypeSchemaHashesWhenDigestChanges", { try ContractTests.manifestNegotiatesByTypeSchemaHashesWhenDigestChanges() }), + ("schemaManifestSelfVerifiesAfterStrippingDigestAndInputHash", { try ContractTests.schemaManifestSelfVerifiesAfterStrippingDigestAndInputHash() }), ("manifestAndHandles", { try await ContractTests.manifestAndHandles() }), ("versionMismatch", { try await ContractTests.versionMismatch() }), ("mainActorHeartbeat", { try await ContractTests.mainActorHeartbeat() }), @@ -37,6 +39,7 @@ import Foundation ("testFilePartsAreTheAiSdkFilePart", { try WireTests.testFilePartsAreTheAiSdkFilePart() }), ("testToolChoiceCodableWire", { try WireTests.testToolChoiceCodableWire() }), ("testGenerateTextResultRoundTrip", { try WireTests.testGenerateTextResultRoundTrip() }), + ("testClosedTaggedVariantsRejectUnknownFields", { try WireTests.testClosedTaggedVariantsRejectUnknownFields() }), ] for (name, check) in checks { try await check() diff --git a/bindings/swift/generated/AimuxOps.swift b/bindings/swift/generated/AimuxOps.swift index b6abe49cf..b8b2e8975 100644 --- a/bindings/swift/generated/AimuxOps.swift +++ b/bindings/swift/generated/AimuxOps.swift @@ -1,8 +1,8 @@ -// Generated by aimux-codegen. Do not edit. Manifest SHA-256: 9c7f306459ec0009f6bca66c0abbb36fc3740b5fc6330c47a6fd73a6bc16caae +// Generated by aimux-codegen. Do not edit. Manifest SHA-256: cd147fa9595ede3951744fa261da98cc18c204e65b4081073ad3a3c1b68bfd92 public enum AimuxOps { public static let ABI_VERSION: UInt32 = 65536 public static let OPS_VERSION = "1.0" - public static let MANIFEST_DIGEST = "9c7f306459ec0009f6bca66c0abbb36fc3740b5fc6330c47a6fd73a6bc16caae" + public static let MANIFEST_DIGEST = "cd147fa9595ede3951744fa261da98cc18c204e65b4081073ad3a3c1b68bfd92" public static let OP_ABORT_CREATE = "abort.create" public static let OP_ABORT_SIGNAL = "abort.signal" public static let OP_AUTH_CODEX_REFRESH = "auth.codexRefresh" @@ -79,4 +79,108 @@ public enum AimuxOps { public static let OP_TRANSCRIPTION_START = "transcription.start" public static let OP_TRANSPORT_CREATE = "transport.create" public static let OP_VIDEO_GENERATE = "video.generate" + public static let TYPE_SCHEMA_HASHES: [String: String] = [ + "AnyValue": "1277ba3a7f8d8ac87c32098666e636d643b6b12d05eb3929a9f018bcc4aa124d", + "[aimux_core::model_catalogue::RuntimeModel]": "aa1da3dbae5d9c830298d255a2cd3bf3b539865ec0324018abcbe555f964f086", + "[aimux_core::session::SessionCall]": "21e259cac0528023d45be7860ea838fcc6a785c0b26ebfe84f7e40b9b861458e", + "[aimux_core::session::SessionView]": "61ad43e852b0e490ab586cd27d25eeb97b00bbfce8808dde6b6252a4aeb367af", + "[aimux_core::trace::store::SessionStepStat]": "ad678575594f65b07dfcb9305b3360fa248d2a05acd3f1059a8cae039ad452cb", + "[aimux_core::trace::store::TraceStats]": "03eb93cd7b38050c6e3be7e47f3c7ac13e617b26f03f03011d58d9d8dfd273aa", + "[aimux_provider_utils::package_descriptor::PackageDescriptor]": "3a98399f69d62320aa747123ec3ede231cd955ced29e36dc401ccc9a82fedc8a", + "[uint8]": "7c82b8345d5b5e8e5c561ac91d6d94e05d221e5c52f729fdde3a6e3e3b6af77d", + "aimux_core::decision_model::DecideResult": "3d50c7ec8e3cce59ea94e9555c93965d03d50d5581e5c3cf214dfe1fdaac0053", + "aimux_core::embedding_model::EmbeddingCallOptions": "1f6db6e963bb7d969a1cb8da125ba836fe8711635d34902b674033e0aefa934d", + "aimux_core::embedding_model::EmbeddingResult": "af3ce0787db6208be114613c78dc02f038cb5dc2f7abcf6a4ade2be79085342e", + "aimux_core::files_model::UploadFileResult": "0d17fd3dbfa601e45c9fabf62f9bb1e5028591443eafccd4eecacef0dcda0368", + "aimux_core::generate::GenerateObjectResult": "21cca82de06d366b0f47d781bd49141bb63215accdd1133bb360113a60b7cc00", + "aimux_core::generate::GenerateTextResult": "c5c6016de2c926c85144959d9436c9d2214a27a9724e75d68393e933ef7263f5", + "aimux_core::image_model::ImageCallOptions": "ddacb8970cef4590bcdcc572ced361b181d501d3b474a2d6c50a9c0c02af3eb2", + "aimux_core::image_model::ImageResult": "a9d2d939f3dc153a5b5ebc8083bea1226ff63ff2e54e4e275c9ab2b136b9e880", + "aimux_core::openai_output::ChatCompletion": "503195cbe7fe458d9403a9de20b93bd17c20bbee0de40a8088bf3847ee835ad9", + "aimux_core::openai_output::ChatCompletionChunk": "b15bd0f02f12fa4e220a1b8e5d82ca24c7486557a04c550d30b90a297b372311", + "aimux_core::recording::Recording": "56fa358fb2023da68837722ed573e00fc997506403d7c7aa516c586c45b4fd54", + "aimux_core::reranking_model::RerankingCallOptions": "c481b6e7c4d5e71ea7db00166ab2952c8a893443f786a61374c7398b4e475e4c", + "aimux_core::reranking_model::RerankingResult": "d757826963b3ce836e4d76fca8f42455a3a3146c20f3fb74f58cabe465348d01", + "aimux_core::search_model::SearchCallOptions": "3b963a871e6f1858db03b68adc74c5f898d4a2c3c0506e4e359b8d8198d30b22", + "aimux_core::search_model::SearchResult": "61075439fcb4276085a11113195dd13220b710cc0c2199ceefa4ec3d07d0195f", + "aimux_core::speech_model::SpeechCallOptions": "418be167c89bca652fb0a9dd52a1da359c1ecc2b069b9d2a0859ab76a7f7f431", + "aimux_core::speech_model::SpeechResult": "8d32e22e24d7ee19a7c2f6cedaf909b6952aa76d635aa4e568e333ed5b45ce07", + "aimux_core::stream_part::TextStreamPart": "c3e035afcbb44740877b943b8ce19e5ac855fd3eaa9ee3d17a936cf7521d7ffc", + "aimux_core::tool::ToolCall": "ea7bd676d207cc40ac1d64442d114b041b7ac60db5420e1f200cc6a8af88d48c", + "aimux_core::trace::record::TraceRecord": "29acdf296b3cd896422357ec1c829fddef38a0455afd825cb7a49f0cb9a8b74d", + "aimux_core::trace::store::SessionChainView": "f5f242da28123fec7907b886dc1debfb4099cfa415074db3476f09712a6c34ca", + "aimux_core::transcription_model::TranscriptionCallOptions": "2a5cf741b2362497e51d0f33b275e01a9dcd336c08623c8617062b83f958aa10", + "aimux_core::transcription_model::TranscriptionResult": "80f153139ed0a65101df69711f15972bfee3154d5452ee8db11585376f31b5fc", + "aimux_core::video_model::VideoCallOptions": "d474a1301928fac38b4d5f06950a91285fc039a7910b51cda8b6ec84cbde9252", + "aimux_core::video_model::VideoResult": "b6fbefd485c75a364d0230349c85d9e222efad481dfde42d35332cbe14d2e09d", + "aimux_ops::envelope::ErrorEnvelope": "48e1305879bb316b0ab5a77b866d6a2dd5c9c2af7f4d9c39f31656d5e7150ce6", + "aimux_ops::frame::StreamFrame": "ce40166decce7b747c1ce7d8f887c5b820577e682df4568e06653de6d3e0c40c", + "aimux_ops::handle::HandleId": "1847d76248c899504e814a58f8771ef59f77fb8b1cca2090193a272bdbd0d6b8", + "aimux_ops::operation::CancelResult": "f166988845b50fd6ae7913505cff98100de52447ba7e297e79f7c6c9b569d02f", + "aimux_ops::operation::OperationStatus": "abeda07e7224a93d1dce678575101d846d68c0c6b24482fb0408b19cb0f52e6b", + "aimux_ops::ops::composite::MoaParams": "2510e5a1226e6f5742ba6f8331a6a1dc6ee48144c88143db25d1d213a842e4c3", + "aimux_ops::ops::composite::RouterParams": "a7db760e7a4e1b6624433d6609408a9136d869bf415c4f5a462011ac3164c3cb", + "aimux_ops::ops::decision::DecisionDecideRequest": "e2a9893b9dfa971db96e94eaf7b853f0daebeb152500d9c4851127abfde5802d", + "aimux_ops::ops::files::UploadFileParams": "136396c0be1014277cef6f30633f16d3ecc08d5392f1f53fa5ebbc2af0eba17c", + "aimux_ops::ops::handles::CredentialParams": "2a3ded4003c2d3257653c6ef4613f9defff748954cd9325c6aa98674cb080894", + "aimux_ops::ops::handles::HandleResult": "01fe7a49695da49143a48c0c53ec9b1ff4099dbc108770194430c38fe71f01c2", + "aimux_ops::ops::handles::MiddlewareParams": "f2789f63feb7b414d3f867c2a84dc298a53ace8d84082367e989161b769ec6ce", + "aimux_ops::ops::handles::TransportParams": "86e40584fcc21dab8f0017f8e892b776ac24aaa9afc943ba805828cecc6e1a4c", + "aimux_ops::ops::misc::CatalogueFetchRequest": "2ceed496996ec6cf32d3e3115ab6a4346a1bb201dc8a970eefbd46eb700a310e", + "aimux_ops::ops::misc::CodexRefreshRequest": "59f1075ed68cb79896d4bac1d0ab32d21fb5855012c6336652bea0c4969ac926", + "aimux_ops::ops::misc::OpenAiOutputRequest": "b0c6acc344f0b23b9ea3b693aeadf7aed7eb4fbdfce4b957be83af1154b842b4", + "aimux_ops::ops::misc::ToolRepairApplyRequest": "0f430fdb223759ef7c48c4d7f824e7be74d29295a6b4f7caaf82b5acba25e538", + "aimux_ops::ops::misc::ToolRepairApplyResultRequest": "fa092862004654e065233b2df2abdbec3befe88d9d734d494679968a5b6e954a", + "aimux_ops::ops::misc::ToolRepairContextRequest": "81bae04c56aac3380b75de639d162f819a2dd5717147a53cf1a75281727d78a1", + "aimux_ops::ops::misc::ToolRepairContextResult": "fd8173e6ec40724fa4207e3571e290ac12e4db1fed08a709273e2982a82b504f", + "aimux_ops::ops::operation::EmptyParams": "1612408252a424283a43a92193bb8ea24f72c08b9f0d2117b4ef7f5a090e37f8", + "aimux_ops::ops::operation::OperationNextParams": "127fea618826e51576ae488dcccaca03c04b774a847a33ec9c47565396862bb7", + "aimux_ops::ops::operation::OperationPollResult": "ec9af646d9b26de004871b4427201b8185677bbbeaf48a1dd489e72e1b126ea1", + "aimux_ops::ops::operation::TranscriptionStartParams": "c863c6f84c5715193078c914c25a5c575c625d77cf3b64ad4029253268d56226", + "aimux_ops::ops::provider::HandleResult": "cea9958b3ff5c8896bab683db36a396bef563c35ec0121b77d51e9475d5d8df5", + "aimux_ops::ops::provider::ProviderCreateParams": "e65cb5322863a2d16af50745cca82873cd03fa2578320c1796570b37efd2c1bb", + "aimux_ops::ops::provider::ProviderCustomParams": "bc40024b5e1794bc8e2bd52bfa9b661b90ad9aa8ba94639ba9120b46bbbf0f90", + "aimux_ops::ops::provider::ProviderDefaultParams": "bb2aff39ad05a28afcc9f4fd8e7e7b30cf3c7ac7b5bd483e002f78f6db737299", + "aimux_ops::ops::provider::ProviderDescriptorsParams": "fa195301dd402853e4cca7cf0ba2843c550c96ef0dc179ec50516394a9435dc0", + "aimux_ops::ops::provider::ProviderInvokeParams": "b33bb79b85db5289152f563021ba9c4285538122d70fe16333b64c94a011fc78", + "aimux_ops::ops::provider::ProviderModelParams": "a9db30c0dc6c71594875748792ddce9f46707696842e45beaceaf474856fbcad", + "aimux_ops::ops::provider::ProviderWrapParams": "a7f59ed924a355d14ad795b37993983fc5c2f2125f9c813ce4b561a0fca7fd62", + "aimux_ops::ops::recording::CreateRecorderParams": "a951e5dde168e1621d21834415cac68c793244158e1fb0f5171dfda8b0bf71c5", + "aimux_ops::ops::recording::EmptyParams": "58802ed68aeb4b87ba67d24b728037be53e63706a4f29055005f14ad068c8777", + "aimux_ops::ops::recording::RecorderExport": "6d3226d3859134361f1dec0429a87c28342d7c5548ea175d535b92d4a49ee8e5", + "aimux_ops::ops::recording::RecorderHandleResult": "f16095d906b62f7fbf86800f6e39e3e89bd6ef1bc65776569795b3555e9025cc", + "aimux_ops::ops::recording::RecorderStats": "5f842b6b1bd0816d07e6f179890f79dddae8815c180824405a9e5ad9dd7871a0", + "aimux_ops::ops::registry::HandleResult": "5f78b2970033052ccdef6827004094c65e9ee35ddc6f80d6c8a619c4db63b05a", + "aimux_ops::ops::registry::ModelInfo": "291dc73d80dbe44be78b15e9deaa60ba253f0c47fc5cfdbffef3bd5cf4b94f36", + "aimux_ops::ops::registry::ModelInfoParams": "c357f2b2342be3bf5f680e816188a4d7b3758a399975eb77a599a82f633d8974", + "aimux_ops::ops::registry::ModelResolveParams": "cfcd1fab460d33db7141f397064edf1481f0024248a7a6f256f8cbfbd3c6eaee", + "aimux_ops::ops::registry::ModelWrapParams": "c5f9703fca04c72df6f3c1c76dea3a130c3e84e37dbc3f18ef58fcf9745f4781", + "aimux_ops::ops::registry::RegistryCreateParams": "6df3075b2b59076de76283d00d4853a4c0da0345c7396cee4a4ad69240290573", + "aimux_ops::ops::registry::RegistryFromConfigParams": "26872ba0751baac107c59a0aa962fa102cc778c661b7bd7b8bd1ccd4226b97ae", + "aimux_ops::ops::registry::RegistryListParams": "c1c477df7aefa646daf05cd316526138109cadd655dd219200531d72eff3260c", + "aimux_ops::ops::registry::RegistryListResult": "26049e7c68ea45b9e322f693c49755e0db476d91631f2a1aa864659b9b87a773", + "aimux_ops::ops::registry::RegistryProviderParams": "d6379c789feb67435e795d0213dfd2fd74d9276465a8f13622327864cb025fb4", + "aimux_ops::ops::registry::RegistryUpdateParams": "9cde136591d14543027538bfa38331059c9865efa2cb89cbf6b2866bdcd21e9e", + "aimux_ops::ops::registry::RegistryUpdateResult": "3e2738ff293183afb575f47bd75daa8afd330f09e43cb4a39de975d97ba16c5b", + "aimux_ops::ops::replay::ReplayCreateParams": "ee64b5b5843103f76ca2166aed2f58995e472be93cb7bb18dea8238c8a2d9e44", + "aimux_ops::ops::replay::ReplayInspection": "7ac2af62f3421f8c7c50867a838f0aff90f35b6a4f192f6c0d5347ab4699108c", + "aimux_ops::ops::replay::ReplayLiveParams": "e99c7d51fb194def185f5a03d84bfc226eb1b101eade0b885216332605318a4d", + "aimux_ops::ops::replay::ReplayLiveResult": "bd9959dd7e0300cb57e6929b2ed29b7e07dcb5aaf65be16b96e34bf8d6577a7f", + "aimux_ops::ops::replay::ReplayPlan": "5cc6667b9fac6de173bf5b55c1a76a491255f89f0fa7a27c0fd33fd790259799", + "aimux_ops::ops::replay::ReplaySessionHandle": "5e779b71ce2a54e59948c605cdfc48797d0760027ad5f44966df958fe9781d11", + "aimux_ops::ops::runtime::RuntimeConfigureParams": "e3b24b9f1fbdf2be7da210f15060803cf8bfdef77c8b2ad330a5b501263dfb0f", + "aimux_ops::ops::runtime::RuntimeDescribeParams": "c3db9b36a42e2bfda8823a35aadc8f6b183dcb46fd7256aeb66505289874b96d", + "aimux_ops::ops::session::SessionStoreCallsParams": "ddd482204fdd305bbfd28d43ae829d8c286f3f8906302ca6679743ea680fedda", + "aimux_ops::ops::session::SessionStoreCreateParams": "080d865c349ec86553f72b99ab1c65ddbb72d0c348a96dc17135a934d787cd86", + "aimux_ops::ops::session::SessionStoreHandle": "755d437d47d362474942fc4a09f5f8c80b75cf362ac16b25b262e33a760b4c6a", + "aimux_ops::ops::text::OpenAiTextRequest": "59293b18b6124a9a394113b8f94f637c65dc35ac44a30f7e0df70855e885f8e4", + "aimux_ops::ops::text::TextRequest": "3a6f59c1f0c3b7ded5f5509d93afe9bddd2b80a8a3cd752d79f97edadae40c3d", + "aimux_ops::ops::trace::TraceAggregateParams": "1b207f0bbe1b7ce7e9b8b0beb9334cf3cc4f9f05382911aaacfe0425dc8ff2c8", + "aimux_ops::ops::trace::TraceCreateParams": "59fef52f382800570e861ae9ca92433dcae8807679d914a89ce99705713301d9", + "aimux_ops::ops::trace::TraceSessionParams": "3e2300f6c65f6dcd52a016eba648a29abeff3a9d67c3b04a95617aa66832f810", + "aimux_providers::catalogue::Catalogue": "6e0128414c8cce09930fea4c68daf7739f9c79072f240bcb9d786eabeaf53b41", + "aimux_providers::codex::CodexTokens": "0925e12b12a645e10306277a7d46fad9d646ce829acef378d223d53800256321", + "null": "0b04deb4d538ba0de2ab6920bc3b185241775a867937e5875a50ff54be3b9d56", + "string": "0d6cbdd2f60c1f2f337739faaafd28ef3e743416ad7a52645a808613733dcab5", + ] } diff --git a/bindings/swift/generated/Types.swift b/bindings/swift/generated/Types.swift index 0751b000a..d6e704455 100644 --- a/bindings/swift/generated/Types.swift +++ b/bindings/swift/generated/Types.swift @@ -1267,12 +1267,25 @@ public indirect enum BackendConfig: Codable, Equatable, Sendable { } public init(from decoder: any Decoder) throws { let c = try decoder.container(keyedBy: CodingKeys.self) + let raw = try decoder.container(keyedBy: WireKey.self) let tag = try c.decode(String.self, forKey: .type) switch tag { case "jsonl": + let allowed: Set = ["directory", "type"] + for key in raw.allKeys { + if !allowed.contains(key.stringValue) { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } self = .jsonl(directory: try c.decode(String.self, forKey: .directory)) return case "ring": + let allowed: Set = ["capacity", "type"] + for key in raw.allKeys { + if !allowed.contains(key.stringValue) { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } self = .ring(capacity: try c.decodeIfPresent(UInt64.self, forKey: .capacity)) return default: throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath, debugDescription: "Unknown BackendConfig tag \(tag)")) @@ -1333,6 +1346,26 @@ public struct CatalogueFetchRequest: Codable, Equatable, Sendable { self.abort = abort self.sourceUrl = sourceUrl } + private enum CodingKeys: String, CodingKey { + case abort = "abort" + case sourceUrl = "sourceUrl" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.abort = try c.decodeIfPresent(HandleIdInput.self, forKey: .abort) + self.sourceUrl = try c.decodeIfPresent(String.self, forKey: .sourceUrl) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.abort, forKey: .abort) + try c.encodeIfPresent(self.sourceUrl, forKey: .sourceUrl) + } } /// Where a [`ModelSpec`] came from. @@ -1606,12 +1639,25 @@ public indirect enum CodexModeSpec: Codable, Equatable, Sendable { } public init(from decoder: any Decoder) throws { let c = try decoder.container(keyedBy: CodingKeys.self) + let raw = try decoder.container(keyedBy: WireKey.self) let tag = try c.decode(String.self, forKey: .type) switch tag { case "apiKey": + let allowed: Set = ["apiKey", "type"] + for key in raw.allKeys { + if !allowed.contains(key.stringValue) { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } self = .apiKey(apiKey: try c.decodeIfPresent(StringOrEnv.self, forKey: .apiKey)) return case "chatGptAccount": + let allowed: Set = ["accountId", "token", "type"] + for key in raw.allKeys { + if !allowed.contains(key.stringValue) { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } self = .chatGptAccount(accountId: try c.decodeIfPresent(String.self, forKey: .accountId), token: try c.decode(StringOrEnv.self, forKey: .token)) return default: throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath, debugDescription: "Unknown CodexModeSpec tag \(tag)")) @@ -1639,6 +1685,26 @@ public struct CodexRefreshRequest: Codable, Equatable, Sendable { self.clientId = clientId self.refreshToken = refreshToken } + private enum CodingKeys: String, CodingKey { + case clientId = "clientId" + case refreshToken = "refreshToken" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.clientId = try c.decode(String.self, forKey: .clientId) + self.refreshToken = try c.decode(String.self, forKey: .refreshToken) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encode(self.clientId, forKey: .clientId) + try c.encode(self.refreshToken, forKey: .refreshToken) + } } /// Tokens returned by the Codex OAuth token endpoint (RFC-0018 §2 V3). @@ -2097,6 +2163,26 @@ public struct CreateRecorderParams: Codable, Equatable, Sendable { self.backend = backend self.capturePolicy = capturePolicy } + private enum CodingKeys: String, CodingKey { + case backend = "backend" + case capturePolicy = "capturePolicy" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.backend = try c.decode(BackendConfig.self, forKey: .backend) + self.capturePolicy = try c.decode(CapturePolicy.self, forKey: .capturePolicy) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encode(self.backend, forKey: .backend) + try c.encode(self.capturePolicy, forKey: .capturePolicy) + } } public struct CredentialParams: Codable, Equatable, Sendable { @@ -2105,6 +2191,23 @@ public struct CredentialParams: Codable, Equatable, Sendable { public init(kind: String) { self.kind = kind } + private enum CodingKeys: String, CodingKey { + case kind = "kind" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.kind = try c.decode(String.self, forKey: .kind) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encode(self.kind, forKey: .kind) + } } /// Provider-specific content identified by its provider and kind. @@ -2138,6 +2241,38 @@ public struct DecideOptions: Codable, Equatable, Sendable { self.state = state self.timeout = timeout } + private enum CodingKeys: String, CodingKey { + case headers = "headers" + case maxRetries = "maxRetries" + case providerOptions = "providerOptions" + case questions = "questions" + case state = "state" + case timeout = "timeout" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.headers = try c.decodeIfPresent([String: String].self, forKey: .headers) + self.maxRetries = try c.decodeIfPresent(UInt32.self, forKey: .maxRetries) + self.providerOptions = try c.decodeIfPresent([String: [String: JSONValue]].self, forKey: .providerOptions) + self.questions = try c.decode([String: DecisionQuestion].self, forKey: .questions) + self.state = try c.decode(DecisionInput.self, forKey: .state) + self.timeout = try c.decodeIfPresent(TimeoutConfiguration.self, forKey: .timeout) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.headers, forKey: .headers) + try c.encodeIfPresent(self.maxRetries, forKey: .maxRetries) + try c.encodeIfPresent(self.providerOptions, forKey: .providerOptions) + try c.encode(self.questions, forKey: .questions) + try c.encode(self.state, forKey: .state) + try c.encodeIfPresent(self.timeout, forKey: .timeout) + } } /// The result of [`decide`] (`DecisionResult` of @@ -2248,6 +2383,12 @@ public struct DecisionBooleanCriteria: Codable, Equatable, Sendable { case `true` = "true" } public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } let c = try decoder.container(keyedBy: CodingKeys.self) self.`false` = try c.decodePresence(DecisionInput.self, forKey: .`false`) self.`true` = try c.decodePresence(DecisionInput.self, forKey: .`true`) @@ -2270,6 +2411,26 @@ public struct DecisionDecideRequest: Codable, Equatable, Sendable { self.abort = abort self.options = options } + private enum CodingKeys: String, CodingKey { + case abort = "abort" + case options = "options" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.abort = try c.decodeIfPresent(HandleIdInput.self, forKey: .abort) + self.options = try c.decode(DecideOptions.self, forKey: .options) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.abort, forKey: .abort) + try c.encode(self.options, forKey: .options) + } } /// Shared state or structured instructions for a decision @@ -2378,6 +2539,35 @@ public struct EmbeddingCallOptions: Codable, Equatable, Sendable { self.timeout = timeout self.values = values } + private enum CodingKeys: String, CodingKey { + case headers = "headers" + case maxRetries = "maxRetries" + case providerOptions = "providerOptions" + case timeout = "timeout" + case values = "values" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.headers = try c.decodeIfPresent([String: String].self, forKey: .headers) + self.maxRetries = try c.decodeIfPresent(UInt32.self, forKey: .maxRetries) + self.providerOptions = try c.decodeIfPresent([String: [String: JSONValue]].self, forKey: .providerOptions) + self.timeout = try c.decodeIfPresent(TimeoutConfiguration.self, forKey: .timeout) + self.values = try c.decode([String].self, forKey: .values) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.headers, forKey: .headers) + try c.encodeIfPresent(self.maxRetries, forKey: .maxRetries) + try c.encodeIfPresent(self.providerOptions, forKey: .providerOptions) + try c.encodeIfPresent(self.timeout, forKey: .timeout) + try c.encode(self.values, forKey: .values) + } } /// Debugging response info specific to embedding calls. @@ -2446,7 +2636,10 @@ public struct EmptyParams: Codable, Equatable, Sendable { public init() { } public init(from decoder: any Decoder) throws { - _ = try decoder.container(keyedBy: WireKey.self) + let raw = try decoder.container(keyedBy: WireKey.self) + if let unexpected = raw.allKeys.first { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [unexpected], debugDescription: "Unknown field \(unexpected.stringValue)")) + } } public func encode(to encoder: any Encoder) throws { _ = encoder.container(keyedBy: WireKey.self) @@ -2460,6 +2653,23 @@ public struct EnvVarRef: Codable, Equatable, Sendable { public init(env: String) { self.env = env } + private enum CodingKeys: String, CodingKey { + case env = "env" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.env = try c.decode(String.self, forKey: .env) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encode(self.env, forKey: .env) + } } /// The error another error was built from: the AI SDK's `cause`. @@ -2986,6 +3196,80 @@ public struct GenerateTextOptions: Codable, Equatable, Sendable { self.topK = topK self.topP = topP } + private enum CodingKeys: String, CodingKey { + case frequencyPenalty = "frequencyPenalty" + case headers = "headers" + case includeRawChunks = "includeRawChunks" + case instructions = "instructions" + case maxOutputTokens = "maxOutputTokens" + case maxRetries = "maxRetries" + case output = "output" + case presencePenalty = "presencePenalty" + case providerOptions = "providerOptions" + case reasoning = "reasoning" + case seed = "seed" + case sessionId = "sessionId" + case stopSequences = "stopSequences" + case strictStream = "strictStream" + case temperature = "temperature" + case timeout = "timeout" + case toolChoice = "toolChoice" + case tools = "tools" + case topK = "topK" + case topP = "topP" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.frequencyPenalty = try c.decodeIfPresent(Double.self, forKey: .frequencyPenalty) + self.headers = try c.decodeIfPresent([String: String].self, forKey: .headers) + self.includeRawChunks = try c.decodeIfPresent(Bool.self, forKey: .includeRawChunks) + self.instructions = try c.decodeIfPresent(String.self, forKey: .instructions) + self.maxOutputTokens = try c.decodeIfPresent(UInt32.self, forKey: .maxOutputTokens) + self.maxRetries = try c.decodeIfPresent(UInt32.self, forKey: .maxRetries) + self.output = try c.decodeIfPresent(Output.self, forKey: .output) + self.presencePenalty = try c.decodeIfPresent(Double.self, forKey: .presencePenalty) + self.providerOptions = try c.decodeIfPresent([String: [String: JSONValue]].self, forKey: .providerOptions) + self.reasoning = try c.decodeIfPresent(ReasoningEffort.self, forKey: .reasoning) + self.seed = try c.decodeIfPresent(UInt64.self, forKey: .seed) + self.sessionId = try c.decodeIfPresent(String.self, forKey: .sessionId) + self.stopSequences = try c.decodeIfPresent([String].self, forKey: .stopSequences) + self.strictStream = try c.decodeIfPresent(Bool.self, forKey: .strictStream) + self.temperature = try c.decodeIfPresent(Double.self, forKey: .temperature) + self.timeout = try c.decodeIfPresent(TimeoutConfiguration.self, forKey: .timeout) + self.toolChoice = try c.decodeIfPresent(ToolChoice.self, forKey: .toolChoice) + self.tools = try c.decodeIfPresent([Tool].self, forKey: .tools) + self.topK = try c.decodeIfPresent(Double.self, forKey: .topK) + self.topP = try c.decodeIfPresent(Double.self, forKey: .topP) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.frequencyPenalty, forKey: .frequencyPenalty) + try c.encodeIfPresent(self.headers, forKey: .headers) + try c.encodeIfPresent(self.includeRawChunks, forKey: .includeRawChunks) + try c.encodeIfPresent(self.instructions, forKey: .instructions) + try c.encodeIfPresent(self.maxOutputTokens, forKey: .maxOutputTokens) + try c.encodeIfPresent(self.maxRetries, forKey: .maxRetries) + try c.encodeIfPresent(self.output, forKey: .output) + try c.encodeIfPresent(self.presencePenalty, forKey: .presencePenalty) + try c.encodeIfPresent(self.providerOptions, forKey: .providerOptions) + try c.encodeIfPresent(self.reasoning, forKey: .reasoning) + try c.encodeIfPresent(self.seed, forKey: .seed) + try c.encodeIfPresent(self.sessionId, forKey: .sessionId) + try c.encodeIfPresent(self.stopSequences, forKey: .stopSequences) + try c.encodeIfPresent(self.strictStream, forKey: .strictStream) + try c.encodeIfPresent(self.temperature, forKey: .temperature) + try c.encodeIfPresent(self.timeout, forKey: .timeout) + try c.encodeIfPresent(self.toolChoice, forKey: .toolChoice) + try c.encodeIfPresent(self.tools, forKey: .tools) + try c.encodeIfPresent(self.topK, forKey: .topK) + try c.encodeIfPresent(self.topP, forKey: .topP) + } } /// Result of `generate_text` and of a consumed `stream_text`: the AI SDK's @@ -3359,6 +3643,53 @@ public struct ImageCallOptions: Codable, Equatable, Sendable { self.size = size self.timeout = timeout } + private enum CodingKeys: String, CodingKey { + case aspectRatio = "aspectRatio" + case files = "files" + case headers = "headers" + case mask = "mask" + case maxRetries = "maxRetries" + case n = "n" + case prompt = "prompt" + case providerOptions = "providerOptions" + case seed = "seed" + case size = "size" + case timeout = "timeout" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.aspectRatio = try c.decodeIfPresent(AspectRatio.self, forKey: .aspectRatio) + self.files = try c.decodeIfPresent([ImageFile].self, forKey: .files) + self.headers = try c.decodeIfPresent([String: String].self, forKey: .headers) + self.mask = try c.decodeIfPresent(ImageFile.self, forKey: .mask) + self.maxRetries = try c.decodeIfPresent(UInt32.self, forKey: .maxRetries) + self.n = try c.decode(UInt32.self, forKey: .n) + self.prompt = try c.decodeIfPresent(String.self, forKey: .prompt) + self.providerOptions = try c.decode([String: [String: JSONValue]].self, forKey: .providerOptions) + self.seed = try c.decodeIfPresent(UInt64.self, forKey: .seed) + self.size = try c.decodeIfPresent(Size.self, forKey: .size) + self.timeout = try c.decodeIfPresent(TimeoutConfiguration.self, forKey: .timeout) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.aspectRatio, forKey: .aspectRatio) + try c.encodeIfPresent(self.files, forKey: .files) + try c.encodeIfPresent(self.headers, forKey: .headers) + try c.encodeIfPresent(self.mask, forKey: .mask) + try c.encodeIfPresent(self.maxRetries, forKey: .maxRetries) + try c.encode(self.n, forKey: .n) + try c.encodeIfPresent(self.prompt, forKey: .prompt) + try c.encode(self.providerOptions, forKey: .providerOptions) + try c.encodeIfPresent(self.seed, forKey: .seed) + try c.encodeIfPresent(self.size, forKey: .size) + try c.encodeIfPresent(self.timeout, forKey: .timeout) + } } /// An image file used for image editing or variation generation. @@ -3489,6 +3820,26 @@ public struct InputAudioFormat: Codable, Equatable, Sendable { self.formatType = formatType self.rate = rate } + private enum CodingKeys: String, CodingKey { + case formatType = "formatType" + case rate = "rate" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.formatType = try c.decode(String.self, forKey: .formatType) + self.rate = try c.decodeIfPresent(UInt32.self, forKey: .rate) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encode(self.formatType, forKey: .formatType) + try c.encodeIfPresent(self.rate, forKey: .rate) + } } /// ① 输入侧:完整调用参数,足以重建 generate_text 调用。 @@ -3830,12 +4181,25 @@ public indirect enum LiveTarget: Codable, Equatable, Sendable { } public init(from decoder: any Decoder) throws { let c = try decoder.container(keyedBy: CodingKeys.self) + let raw = try decoder.container(keyedBy: WireKey.self) let tag = try c.decode(String.self, forKey: .kind) switch tag { case "model": + let allowed: Set = ["handle", "kind"] + for key in raw.allKeys { + if !allowed.contains(key.stringValue) { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } self = .model(handle: try c.decode(HandleIdInput.self, forKey: .handle)) return case "registry": + let allowed: Set = ["handle", "kind"] + for key in raw.allKeys { + if !allowed.contains(key.stringValue) { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } self = .registry(handle: try c.decode(HandleIdInput.self, forKey: .handle)) return default: throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath, debugDescription: "Unknown LiveTarget tag \(tag)")) @@ -3869,6 +4233,23 @@ public struct LoggingConfig: Codable, Equatable, Sendable { public init(level: LogLevel) { self.level = level } + private enum CodingKeys: String, CodingKey { + case level = "level" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.level = try c.decode(LogLevel.self, forKey: .level) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encode(self.level, forKey: .level) + } } public enum MiddlewareAuditMode: String, Codable, Equatable, Sendable { @@ -3889,6 +4270,32 @@ public struct MiddlewareParams: Codable, Equatable, Sendable { self.scopeName = scopeName self.traceStore = traceStore } + private enum CodingKeys: String, CodingKey { + case auditMode = "auditMode" + case kind = "kind" + case scopeName = "scopeName" + case traceStore = "traceStore" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.auditMode = try c.decodeIfPresent(MiddlewareAuditMode.self, forKey: .auditMode) + self.kind = try c.decode(String.self, forKey: .kind) + self.scopeName = try c.decodeIfPresent(String.self, forKey: .scopeName) + self.traceStore = try c.decodeIfPresent(HandleIdInput.self, forKey: .traceStore) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.auditMode, forKey: .auditMode) + try c.encode(self.kind, forKey: .kind) + try c.encodeIfPresent(self.scopeName, forKey: .scopeName) + try c.encodeIfPresent(self.traceStore, forKey: .traceStore) + } } /// Reference-failure policy. @@ -3925,6 +4332,41 @@ public struct MoaParams: Codable, Equatable, Sendable { self.references = references self.stripReferenceTools = stripReferenceTools } + private enum CodingKeys: String, CodingKey { + case aggregator = "aggregator" + case aggregatorInstructions = "aggregatorInstructions" + case failMode = "failMode" + case modelId = "modelId" + case providerName = "providerName" + case references = "references" + case stripReferenceTools = "stripReferenceTools" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.aggregator = try c.decode(String.self, forKey: .aggregator) + self.aggregatorInstructions = try c.decodeIfPresent(String.self, forKey: .aggregatorInstructions) + self.failMode = try c.decodeIfPresent(MoaFailMode.self, forKey: .failMode) + self.modelId = try c.decodeIfPresent(String.self, forKey: .modelId) + self.providerName = try c.decodeIfPresent(String.self, forKey: .providerName) + self.references = try c.decode([String].self, forKey: .references) + self.stripReferenceTools = try c.decodeIfPresent(Bool.self, forKey: .stripReferenceTools) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encode(self.aggregator, forKey: .aggregator) + try c.encodeIfPresent(self.aggregatorInstructions, forKey: .aggregatorInstructions) + try c.encodeIfPresent(self.failMode, forKey: .failMode) + try c.encodeIfPresent(self.modelId, forKey: .modelId) + try c.encodeIfPresent(self.providerName, forKey: .providerName) + try c.encode(self.references, forKey: .references) + try c.encodeIfPresent(self.stripReferenceTools, forKey: .stripReferenceTools) + } } /// A single input or output modality. @@ -4008,7 +4450,10 @@ public struct ModelInfoParams: Codable, Equatable, Sendable { public init() { } public init(from decoder: any Decoder) throws { - _ = try decoder.container(keyedBy: WireKey.self) + let raw = try decoder.container(keyedBy: WireKey.self) + if let unexpected = raw.allKeys.first { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [unexpected], debugDescription: "Unknown field \(unexpected.stringValue)")) + } } public func encode(to encoder: any Encoder) throws { _ = encoder.container(keyedBy: WireKey.self) @@ -4143,6 +4588,32 @@ public struct ModelRef: Codable, Equatable, Sendable { self.modelId = modelId self.namespace = namespace } + private enum CodingKeys: String, CodingKey { + case key = "key" + case method = "method" + case modelId = "modelId" + case namespace = "namespace" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.key = try c.decode(String.self, forKey: .key) + self.method = try c.decode(ModelMethod.self, forKey: .method) + self.modelId = try c.decode(String.self, forKey: .modelId) + self.namespace = try c.decode(String.self, forKey: .namespace) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encode(self.key, forKey: .key) + try c.encode(self.method, forKey: .method) + try c.encode(self.modelId, forKey: .modelId) + try c.encode(self.namespace, forKey: .namespace) + } } public struct ModelResolveParams: Codable, Equatable, Sendable { @@ -4151,6 +4622,23 @@ public struct ModelResolveParams: Codable, Equatable, Sendable { public init(modelRef: ModelRef) { self.modelRef = modelRef } + private enum CodingKeys: String, CodingKey { + case modelRef = "modelRef" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.modelRef = try c.decode(ModelRef.self, forKey: .modelRef) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encode(self.modelRef, forKey: .modelRef) + } } /// The full static portrait for a model, supplemented from community knowledge. @@ -4204,6 +4692,23 @@ public struct ModelWrapParams: Codable, Equatable, Sendable { public init(middleware: [String]) { self.middleware = middleware } + private enum CodingKeys: String, CodingKey { + case middleware = "middleware" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.middleware = try c.decode([String].self, forKey: .middleware) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encode(self.middleware, forKey: .middleware) + } } /// A `${string}.${string}` identifier, `.`: the V4 @@ -4224,6 +4729,26 @@ public struct OpenAiOutputRequest: Codable, Equatable, Sendable { self.metadataNamespace = metadataNamespace self.result = result } + private enum CodingKeys: String, CodingKey { + case metadataNamespace = "metadataNamespace" + case result = "result" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.metadataNamespace = try c.decode(String.self, forKey: .metadataNamespace) + self.result = try c.decode(GenerateTextResultInput.self, forKey: .result) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encode(self.metadataNamespace, forKey: .metadataNamespace) + try c.encode(self.result, forKey: .result) + } } public struct OpenAiTextRequest: Codable, Equatable, Sendable { @@ -4238,6 +4763,32 @@ public struct OpenAiTextRequest: Codable, Equatable, Sendable { self.prompt = prompt self.streamOptions = streamOptions } + private enum CodingKeys: String, CodingKey { + case abort = "abort" + case options = "options" + case prompt = "prompt" + case streamOptions = "streamOptions" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.abort = try c.decodeIfPresent(HandleIdInput.self, forKey: .abort) + self.options = try c.decodeIfPresent(Options.self, forKey: .options) + self.prompt = try c.decode(ModelPrompt.self, forKey: .prompt) + self.streamOptions = try c.decodeIfPresent(StreamOptions.self, forKey: .streamOptions) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.abort, forKey: .abort) + try c.encodeIfPresent(self.options, forKey: .options) + try c.encode(self.prompt, forKey: .prompt) + try c.encodeIfPresent(self.streamOptions, forKey: .streamOptions) + } } public struct OperationCapabilities: Codable, Equatable, Sendable { @@ -4260,6 +4811,23 @@ public struct OperationNextParams: Codable, Equatable, Sendable { public init(timeoutMs: UInt64? = nil) { self.timeoutMs = timeoutMs } + private enum CodingKeys: String, CodingKey { + case timeoutMs = "timeoutMs" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.timeoutMs = try c.decodeIfPresent(UInt64.self, forKey: .timeoutMs) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.timeoutMs, forKey: .timeoutMs) + } } public enum OperationOutcome: String, Codable, Equatable, Sendable { @@ -4413,6 +4981,80 @@ public struct Options: Codable, Equatable, Sendable { self.topK = topK self.topP = topP } + private enum CodingKeys: String, CodingKey { + case frequencyPenalty = "frequencyPenalty" + case headers = "headers" + case includeRawChunks = "includeRawChunks" + case instructions = "instructions" + case maxOutputTokens = "maxOutputTokens" + case maxRetries = "maxRetries" + case output = "output" + case presencePenalty = "presencePenalty" + case providerOptions = "providerOptions" + case reasoning = "reasoning" + case seed = "seed" + case sessionId = "sessionId" + case stopSequences = "stopSequences" + case strictStream = "strictStream" + case temperature = "temperature" + case timeout = "timeout" + case toolChoice = "toolChoice" + case tools = "tools" + case topK = "topK" + case topP = "topP" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.frequencyPenalty = try c.decodeIfPresent(Double.self, forKey: .frequencyPenalty) + self.headers = try c.decodeIfPresent([String: String].self, forKey: .headers) + self.includeRawChunks = try c.decodeIfPresent(Bool.self, forKey: .includeRawChunks) + self.instructions = try c.decodeIfPresent(String.self, forKey: .instructions) + self.maxOutputTokens = try c.decodeIfPresent(UInt32.self, forKey: .maxOutputTokens) + self.maxRetries = try c.decodeIfPresent(UInt32.self, forKey: .maxRetries) + self.output = try c.decodeIfPresent(Output.self, forKey: .output) + self.presencePenalty = try c.decodeIfPresent(Double.self, forKey: .presencePenalty) + self.providerOptions = try c.decodeIfPresent([String: [String: JSONValue]].self, forKey: .providerOptions) + self.reasoning = try c.decodeIfPresent(ReasoningEffort.self, forKey: .reasoning) + self.seed = try c.decodeIfPresent(UInt64.self, forKey: .seed) + self.sessionId = try c.decodeIfPresent(String.self, forKey: .sessionId) + self.stopSequences = try c.decodeIfPresent([String].self, forKey: .stopSequences) + self.strictStream = try c.decodeIfPresent(Bool.self, forKey: .strictStream) + self.temperature = try c.decodeIfPresent(Double.self, forKey: .temperature) + self.timeout = try c.decodeIfPresent(TimeoutConfiguration.self, forKey: .timeout) + self.toolChoice = try c.decodeIfPresent(ToolChoice.self, forKey: .toolChoice) + self.tools = try c.decodeIfPresent([Tool].self, forKey: .tools) + self.topK = try c.decodeIfPresent(Double.self, forKey: .topK) + self.topP = try c.decodeIfPresent(Double.self, forKey: .topP) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.frequencyPenalty, forKey: .frequencyPenalty) + try c.encodeIfPresent(self.headers, forKey: .headers) + try c.encodeIfPresent(self.includeRawChunks, forKey: .includeRawChunks) + try c.encodeIfPresent(self.instructions, forKey: .instructions) + try c.encodeIfPresent(self.maxOutputTokens, forKey: .maxOutputTokens) + try c.encodeIfPresent(self.maxRetries, forKey: .maxRetries) + try c.encodeIfPresent(self.output, forKey: .output) + try c.encodeIfPresent(self.presencePenalty, forKey: .presencePenalty) + try c.encodeIfPresent(self.providerOptions, forKey: .providerOptions) + try c.encodeIfPresent(self.reasoning, forKey: .reasoning) + try c.encodeIfPresent(self.seed, forKey: .seed) + try c.encodeIfPresent(self.sessionId, forKey: .sessionId) + try c.encodeIfPresent(self.stopSequences, forKey: .stopSequences) + try c.encodeIfPresent(self.strictStream, forKey: .strictStream) + try c.encodeIfPresent(self.temperature, forKey: .temperature) + try c.encodeIfPresent(self.timeout, forKey: .timeout) + try c.encodeIfPresent(self.toolChoice, forKey: .toolChoice) + try c.encodeIfPresent(self.tools, forKey: .tools) + try c.encodeIfPresent(self.topK, forKey: .topK) + try c.encodeIfPresent(self.topP, forKey: .topP) + } } public enum Outcome: String, Codable, Equatable, Sendable { @@ -4614,6 +5256,65 @@ public struct PackageDescriptor: Codable, Equatable, Sendable { self.supportsSkills = supportsSkills self.templateParams = templateParams } + private enum CodingKeys: String, CodingKey { + case apiKeyEnv = "apiKeyEnv" + case authKind = "authKind" + case baseUrlEnv = "baseUrlEnv" + case defaultBaseUrl = "defaultBaseUrl" + case defaultMethod = "defaultMethod" + case id = "id" + case kind = "kind" + case languageApis = "languageApis" + case modalities = "modalities" + case settings = "settings" + case supportsDefaultInstance = "supportsDefaultInstance" + case supportsDiscovery = "supportsDiscovery" + case supportsFiles = "supportsFiles" + case supportsSkills = "supportsSkills" + case templateParams = "templateParams" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.apiKeyEnv = try c.decodeIfPresent(String.self, forKey: .apiKeyEnv) + self.authKind = try c.decode(PackageAuthKind.self, forKey: .authKind) + self.baseUrlEnv = try c.decodeIfPresent(String.self, forKey: .baseUrlEnv) + self.defaultBaseUrl = try c.decodeIfPresent(String.self, forKey: .defaultBaseUrl) + self.defaultMethod = try c.decodeIfPresent(ModalityKind.self, forKey: .defaultMethod) + self.id = try c.decode(String.self, forKey: .id) + self.kind = try c.decode(PackageKind.self, forKey: .kind) + self.languageApis = try c.decode([LanguageApi].self, forKey: .languageApis) + self.modalities = try c.decode([ModalityKind].self, forKey: .modalities) + self.settings = try c.decode([SettingFieldSpec].self, forKey: .settings) + self.supportsDefaultInstance = try c.decode(Bool.self, forKey: .supportsDefaultInstance) + self.supportsDiscovery = try c.decode(Bool.self, forKey: .supportsDiscovery) + self.supportsFiles = try c.decode(Bool.self, forKey: .supportsFiles) + self.supportsSkills = try c.decode(Bool.self, forKey: .supportsSkills) + self.templateParams = try c.decode([TemplateParamDescriptor].self, forKey: .templateParams) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.apiKeyEnv, forKey: .apiKeyEnv) + try c.encode(self.authKind, forKey: .authKind) + try c.encodeIfPresent(self.baseUrlEnv, forKey: .baseUrlEnv) + try c.encodeIfPresent(self.defaultBaseUrl, forKey: .defaultBaseUrl) + try c.encodeIfPresent(self.defaultMethod, forKey: .defaultMethod) + try c.encode(self.id, forKey: .id) + try c.encode(self.kind, forKey: .kind) + try c.encode(self.languageApis, forKey: .languageApis) + try c.encode(self.modalities, forKey: .modalities) + try c.encode(self.settings, forKey: .settings) + try c.encode(self.supportsDefaultInstance, forKey: .supportsDefaultInstance) + try c.encode(self.supportsDiscovery, forKey: .supportsDiscovery) + try c.encode(self.supportsFiles, forKey: .supportsFiles) + try c.encode(self.supportsSkills, forKey: .supportsSkills) + try c.encode(self.templateParams, forKey: .templateParams) + } } /// Architectural category of a provider package. @@ -4662,6 +5363,23 @@ public struct ProviderConfigDocument: Codable, Equatable, Sendable { public init(providers: [String: ProviderEntrySpec]) { self.providers = providers } + private enum CodingKeys: String, CodingKey { + case providers = "providers" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.providers = try c.decode([String: ProviderEntrySpec].self, forKey: .providers) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encode(self.providers, forKey: .providers) + } } /// Secret-safe declarative settings shared across provider packages. @@ -4729,6 +5447,110 @@ public struct ProviderConfigSettings: Codable, Equatable, Sendable { self.useDeploymentBasedUrls = useDeploymentBasedUrls self.workspaceId = workspaceId } + private enum CodingKeys: String, CodingKey { + case accessKeyId = "accessKeyId" + case accessToken = "accessToken" + case apiKey = "apiKey" + case apiVersion = "apiVersion" + case authToken = "authToken" + case baseUrl = "baseUrl" + case codexMode = "codexMode" + case cx = "cx" + case endpoint = "endpoint" + case headers = "headers" + case includeUsage = "includeUsage" + case location = "location" + case login = "login" + case name = "name" + case organization = "organization" + case originator = "originator" + case params = "params" + case password = "password" + case probabilitySource = "probabilitySource" + case project = "project" + case queryParams = "queryParams" + case region = "region" + case resourceName = "resourceName" + case secretAccessKey = "secretAccessKey" + case sessionToken = "sessionToken" + case speechBaseUrl = "speechBaseUrl" + case supportsMultiPartToolContent = "supportsMultiPartToolContent" + case supportsStructuredOutputs = "supportsStructuredOutputs" + case useDeploymentBasedUrls = "useDeploymentBasedUrls" + case workspaceId = "workspaceId" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.accessKeyId = try c.decodeIfPresent(StringOrEnv.self, forKey: .accessKeyId) + self.accessToken = try c.decodeIfPresent(StringOrEnv.self, forKey: .accessToken) + self.apiKey = try c.decodeIfPresent(StringOrEnv.self, forKey: .apiKey) + self.apiVersion = try c.decodeIfPresent(String.self, forKey: .apiVersion) + self.authToken = try c.decodeIfPresent(StringOrEnv.self, forKey: .authToken) + self.baseUrl = try c.decodeIfPresent(String.self, forKey: .baseUrl) + self.codexMode = try c.decodeIfPresent(CodexModeSpec.self, forKey: .codexMode) + self.cx = try c.decodeIfPresent(String.self, forKey: .cx) + self.endpoint = try c.decodeIfPresent(String.self, forKey: .endpoint) + self.headers = try c.decodeIfPresent([String: String?].self, forKey: .headers) + self.includeUsage = try c.decodeIfPresent(Bool.self, forKey: .includeUsage) + self.location = try c.decodeIfPresent(String.self, forKey: .location) + self.login = try c.decodeIfPresent(StringOrEnv.self, forKey: .login) + self.name = try c.decodeIfPresent(String.self, forKey: .name) + self.organization = try c.decodeIfPresent(String.self, forKey: .organization) + self.originator = try c.decodeIfPresent(String.self, forKey: .originator) + self.params = try c.decodeIfPresent([String: String].self, forKey: .params) + self.password = try c.decodeIfPresent(StringOrEnv.self, forKey: .password) + self.probabilitySource = try c.decodeIfPresent(String.self, forKey: .probabilitySource) + self.project = try c.decodeIfPresent(String.self, forKey: .project) + self.queryParams = try c.decodeIfPresent([String: String].self, forKey: .queryParams) + self.region = try c.decodeIfPresent(String.self, forKey: .region) + self.resourceName = try c.decodeIfPresent(String.self, forKey: .resourceName) + self.secretAccessKey = try c.decodeIfPresent(StringOrEnv.self, forKey: .secretAccessKey) + self.sessionToken = try c.decodeIfPresent(StringOrEnv.self, forKey: .sessionToken) + self.speechBaseUrl = try c.decodeIfPresent(String.self, forKey: .speechBaseUrl) + self.supportsMultiPartToolContent = try c.decodeIfPresent(Bool.self, forKey: .supportsMultiPartToolContent) + self.supportsStructuredOutputs = try c.decodeIfPresent(Bool.self, forKey: .supportsStructuredOutputs) + self.useDeploymentBasedUrls = try c.decodeIfPresent(Bool.self, forKey: .useDeploymentBasedUrls) + self.workspaceId = try c.decodeIfPresent(String.self, forKey: .workspaceId) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.accessKeyId, forKey: .accessKeyId) + try c.encodeIfPresent(self.accessToken, forKey: .accessToken) + try c.encodeIfPresent(self.apiKey, forKey: .apiKey) + try c.encodeIfPresent(self.apiVersion, forKey: .apiVersion) + try c.encodeIfPresent(self.authToken, forKey: .authToken) + try c.encodeIfPresent(self.baseUrl, forKey: .baseUrl) + try c.encodeIfPresent(self.codexMode, forKey: .codexMode) + try c.encodeIfPresent(self.cx, forKey: .cx) + try c.encodeIfPresent(self.endpoint, forKey: .endpoint) + try c.encodeIfPresent(self.headers, forKey: .headers) + try c.encodeIfPresent(self.includeUsage, forKey: .includeUsage) + try c.encodeIfPresent(self.location, forKey: .location) + try c.encodeIfPresent(self.login, forKey: .login) + try c.encodeIfPresent(self.name, forKey: .name) + try c.encodeIfPresent(self.organization, forKey: .organization) + try c.encodeIfPresent(self.originator, forKey: .originator) + try c.encodeIfPresent(self.params, forKey: .params) + try c.encodeIfPresent(self.password, forKey: .password) + try c.encodeIfPresent(self.probabilitySource, forKey: .probabilitySource) + try c.encodeIfPresent(self.project, forKey: .project) + try c.encodeIfPresent(self.queryParams, forKey: .queryParams) + try c.encodeIfPresent(self.region, forKey: .region) + try c.encodeIfPresent(self.resourceName, forKey: .resourceName) + try c.encodeIfPresent(self.secretAccessKey, forKey: .secretAccessKey) + try c.encodeIfPresent(self.sessionToken, forKey: .sessionToken) + try c.encodeIfPresent(self.speechBaseUrl, forKey: .speechBaseUrl) + try c.encodeIfPresent(self.supportsMultiPartToolContent, forKey: .supportsMultiPartToolContent) + try c.encodeIfPresent(self.supportsStructuredOutputs, forKey: .supportsStructuredOutputs) + try c.encodeIfPresent(self.useDeploymentBasedUrls, forKey: .useDeploymentBasedUrls) + try c.encodeIfPresent(self.workspaceId, forKey: .workspaceId) + } } /// Trusted-caller operation: constructs a provider handle from package settings @@ -4748,6 +5570,29 @@ public struct ProviderCreateParams: Codable, Equatable, Sendable { self.package = package self.settings = settings } + private enum CodingKeys: String, CodingKey { + case envAllowlist = "envAllowlist" + case package = "package" + case settings = "settings" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.envAllowlist = try c.decodeIfPresent([String].self, forKey: .envAllowlist) + self.package = try c.decode(String.self, forKey: .package) + self.settings = try c.decodeIfPresent(ProviderSettings.self, forKey: .settings) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.envAllowlist, forKey: .envAllowlist) + try c.encode(self.package, forKey: .package) + try c.encodeIfPresent(self.settings, forKey: .settings) + } } public struct ProviderCustomParams: Codable, Equatable, Sendable { @@ -4790,6 +5635,74 @@ public struct ProviderCustomParams: Codable, Equatable, Sendable { self.transcriptionModels = transcriptionModels self.videoModels = videoModels } + private enum CodingKeys: String, CodingKey { + case chatModels = "chatModels" + case completionModels = "completionModels" + case decisionModels = "decisionModels" + case defaultMethod = "defaultMethod" + case embeddingModels = "embeddingModels" + case fallbackProvider = "fallbackProvider" + case files = "files" + case imageModelMiddleware = "imageModelMiddleware" + case imageModels = "imageModels" + case languageModelMiddleware = "languageModelMiddleware" + case languageModels = "languageModels" + case messagesModels = "messagesModels" + case rerankingModels = "rerankingModels" + case responsesModels = "responsesModels" + case searchModels = "searchModels" + case speechModels = "speechModels" + case transcriptionModels = "transcriptionModels" + case videoModels = "videoModels" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.chatModels = try c.decodeIfPresent([String: HandleIdInput].self, forKey: .chatModels) + self.completionModels = try c.decodeIfPresent([String: HandleIdInput].self, forKey: .completionModels) + self.decisionModels = try c.decodeIfPresent([String: HandleIdInput].self, forKey: .decisionModels) + self.defaultMethod = try c.decodeIfPresent(String.self, forKey: .defaultMethod) + self.embeddingModels = try c.decodeIfPresent([String: HandleIdInput].self, forKey: .embeddingModels) + self.fallbackProvider = try c.decodeIfPresent(HandleIdInput.self, forKey: .fallbackProvider) + self.files = try c.decodeIfPresent(HandleIdInput.self, forKey: .files) + self.imageModelMiddleware = try c.decodeIfPresent([HandleIdInput].self, forKey: .imageModelMiddleware) + self.imageModels = try c.decodeIfPresent([String: HandleIdInput].self, forKey: .imageModels) + self.languageModelMiddleware = try c.decodeIfPresent([HandleIdInput].self, forKey: .languageModelMiddleware) + self.languageModels = try c.decodeIfPresent([String: HandleIdInput].self, forKey: .languageModels) + self.messagesModels = try c.decodeIfPresent([String: HandleIdInput].self, forKey: .messagesModels) + self.rerankingModels = try c.decodeIfPresent([String: HandleIdInput].self, forKey: .rerankingModels) + self.responsesModels = try c.decodeIfPresent([String: HandleIdInput].self, forKey: .responsesModels) + self.searchModels = try c.decodeIfPresent([String: HandleIdInput].self, forKey: .searchModels) + self.speechModels = try c.decodeIfPresent([String: HandleIdInput].self, forKey: .speechModels) + self.transcriptionModels = try c.decodeIfPresent([String: HandleIdInput].self, forKey: .transcriptionModels) + self.videoModels = try c.decodeIfPresent([String: HandleIdInput].self, forKey: .videoModels) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.chatModels, forKey: .chatModels) + try c.encodeIfPresent(self.completionModels, forKey: .completionModels) + try c.encodeIfPresent(self.decisionModels, forKey: .decisionModels) + try c.encodeIfPresent(self.defaultMethod, forKey: .defaultMethod) + try c.encodeIfPresent(self.embeddingModels, forKey: .embeddingModels) + try c.encodeIfPresent(self.fallbackProvider, forKey: .fallbackProvider) + try c.encodeIfPresent(self.files, forKey: .files) + try c.encodeIfPresent(self.imageModelMiddleware, forKey: .imageModelMiddleware) + try c.encodeIfPresent(self.imageModels, forKey: .imageModels) + try c.encodeIfPresent(self.languageModelMiddleware, forKey: .languageModelMiddleware) + try c.encodeIfPresent(self.languageModels, forKey: .languageModels) + try c.encodeIfPresent(self.messagesModels, forKey: .messagesModels) + try c.encodeIfPresent(self.rerankingModels, forKey: .rerankingModels) + try c.encodeIfPresent(self.responsesModels, forKey: .responsesModels) + try c.encodeIfPresent(self.searchModels, forKey: .searchModels) + try c.encodeIfPresent(self.speechModels, forKey: .speechModels) + try c.encodeIfPresent(self.transcriptionModels, forKey: .transcriptionModels) + try c.encodeIfPresent(self.videoModels, forKey: .videoModels) + } } public struct ProviderDefaultParams: Codable, Equatable, Sendable { @@ -4798,6 +5711,23 @@ public struct ProviderDefaultParams: Codable, Equatable, Sendable { public init(package: String) { self.package = package } + private enum CodingKeys: String, CodingKey { + case package = "package" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.package = try c.decode(String.self, forKey: .package) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encode(self.package, forKey: .package) + } } public struct ProviderDescriptorsParams: Codable, Equatable, Sendable { @@ -4806,6 +5736,23 @@ public struct ProviderDescriptorsParams: Codable, Equatable, Sendable { public init(package: String? = nil) { self.package = package } + private enum CodingKeys: String, CodingKey { + case package = "package" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.package = try c.decodeIfPresent(String.self, forKey: .package) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.package, forKey: .package) + } } /// Configuration for a single provider entry (`package` + typed `settings`). @@ -4817,6 +5764,26 @@ public struct ProviderEntrySpec: Codable, Equatable, Sendable { self.package = package self.settings = settings } + private enum CodingKeys: String, CodingKey { + case package = "package" + case settings = "settings" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.package = try c.decode(String.self, forKey: .package) + self.settings = try c.decodeIfPresent(ProviderConfigSettings.self, forKey: .settings) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encode(self.package, forKey: .package) + try c.encodeIfPresent(self.settings, forKey: .settings) + } } public struct ProviderInvokeParams: Codable, Equatable, Sendable { @@ -4827,6 +5794,26 @@ public struct ProviderInvokeParams: Codable, Equatable, Sendable { self.abort = abort self.method = method } + private enum CodingKeys: String, CodingKey { + case abort = "abort" + case method = "method" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.abort = try c.decodeIfPresent(HandleIdInput.self, forKey: .abort) + self.method = try c.decode(String.self, forKey: .method) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.abort, forKey: .abort) + try c.encode(self.method, forKey: .method) + } } public struct ProviderModelParams: Codable, Equatable, Sendable { @@ -4837,6 +5824,26 @@ public struct ProviderModelParams: Codable, Equatable, Sendable { self.method = method self.modelId = modelId } + private enum CodingKeys: String, CodingKey { + case method = "method" + case modelId = "modelId" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.method = try c.decodeIfPresent(String.self, forKey: .method) + self.modelId = try c.decode(String.self, forKey: .modelId) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.method, forKey: .method) + try c.encode(self.modelId, forKey: .modelId) + } } /// ② 配置侧:provider 身份(请求回放重建用)。 @@ -4930,6 +5937,119 @@ public struct ProviderSettings: Codable, Equatable, Sendable { self.webSocket = webSocket self.workspaceId = workspaceId } + private enum CodingKeys: String, CodingKey { + case accessKeyId = "accessKeyId" + case accessToken = "accessToken" + case apiKey = "apiKey" + case apiVersion = "apiVersion" + case authToken = "authToken" + case baseUrl = "baseUrl" + case codexMode = "codexMode" + case credentialResolver = "credentialResolver" + case cx = "cx" + case endpoint = "endpoint" + case fetch = "fetch" + case headers = "headers" + case includeUsage = "includeUsage" + case location = "location" + case login = "login" + case name = "name" + case organization = "organization" + case originator = "originator" + case params = "params" + case password = "password" + case probabilitySource = "probabilitySource" + case project = "project" + case queryParams = "queryParams" + case region = "region" + case resourceName = "resourceName" + case secretAccessKey = "secretAccessKey" + case sessionToken = "sessionToken" + case speechBaseUrl = "speechBaseUrl" + case supportsMultiPartToolContent = "supportsMultiPartToolContent" + case supportsStructuredOutputs = "supportsStructuredOutputs" + case useDeploymentBasedUrls = "useDeploymentBasedUrls" + case webSocket = "webSocket" + case workspaceId = "workspaceId" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.accessKeyId = try c.decodeIfPresent(StringOrEnv.self, forKey: .accessKeyId) + self.accessToken = try c.decodeIfPresent(StringOrEnv.self, forKey: .accessToken) + self.apiKey = try c.decodeIfPresent(StringOrEnv.self, forKey: .apiKey) + self.apiVersion = try c.decodeIfPresent(String.self, forKey: .apiVersion) + self.authToken = try c.decodeIfPresent(StringOrEnv.self, forKey: .authToken) + self.baseUrl = try c.decodeIfPresent(String.self, forKey: .baseUrl) + self.codexMode = try c.decodeIfPresent(CodexModeSpec.self, forKey: .codexMode) + self.credentialResolver = try c.decodeIfPresent(HandleIdInput.self, forKey: .credentialResolver) + self.cx = try c.decodeIfPresent(String.self, forKey: .cx) + self.endpoint = try c.decodeIfPresent(String.self, forKey: .endpoint) + self.fetch = try c.decodeIfPresent(HandleIdInput.self, forKey: .fetch) + self.headers = try c.decodeIfPresent([String: String?].self, forKey: .headers) + self.includeUsage = try c.decodeIfPresent(Bool.self, forKey: .includeUsage) + self.location = try c.decodeIfPresent(String.self, forKey: .location) + self.login = try c.decodeIfPresent(StringOrEnv.self, forKey: .login) + self.name = try c.decodeIfPresent(String.self, forKey: .name) + self.organization = try c.decodeIfPresent(String.self, forKey: .organization) + self.originator = try c.decodeIfPresent(String.self, forKey: .originator) + self.params = try c.decodeIfPresent([String: String].self, forKey: .params) + self.password = try c.decodeIfPresent(StringOrEnv.self, forKey: .password) + self.probabilitySource = try c.decodeIfPresent(String.self, forKey: .probabilitySource) + self.project = try c.decodeIfPresent(String.self, forKey: .project) + self.queryParams = try c.decodeIfPresent([String: String].self, forKey: .queryParams) + self.region = try c.decodeIfPresent(String.self, forKey: .region) + self.resourceName = try c.decodeIfPresent(String.self, forKey: .resourceName) + self.secretAccessKey = try c.decodeIfPresent(StringOrEnv.self, forKey: .secretAccessKey) + self.sessionToken = try c.decodeIfPresent(StringOrEnv.self, forKey: .sessionToken) + self.speechBaseUrl = try c.decodeIfPresent(String.self, forKey: .speechBaseUrl) + self.supportsMultiPartToolContent = try c.decodeIfPresent(Bool.self, forKey: .supportsMultiPartToolContent) + self.supportsStructuredOutputs = try c.decodeIfPresent(Bool.self, forKey: .supportsStructuredOutputs) + self.useDeploymentBasedUrls = try c.decodeIfPresent(Bool.self, forKey: .useDeploymentBasedUrls) + self.webSocket = try c.decodeIfPresent(HandleIdInput.self, forKey: .webSocket) + self.workspaceId = try c.decodeIfPresent(String.self, forKey: .workspaceId) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.accessKeyId, forKey: .accessKeyId) + try c.encodeIfPresent(self.accessToken, forKey: .accessToken) + try c.encodeIfPresent(self.apiKey, forKey: .apiKey) + try c.encodeIfPresent(self.apiVersion, forKey: .apiVersion) + try c.encodeIfPresent(self.authToken, forKey: .authToken) + try c.encodeIfPresent(self.baseUrl, forKey: .baseUrl) + try c.encodeIfPresent(self.codexMode, forKey: .codexMode) + try c.encodeIfPresent(self.credentialResolver, forKey: .credentialResolver) + try c.encodeIfPresent(self.cx, forKey: .cx) + try c.encodeIfPresent(self.endpoint, forKey: .endpoint) + try c.encodeIfPresent(self.fetch, forKey: .fetch) + try c.encodeIfPresent(self.headers, forKey: .headers) + try c.encodeIfPresent(self.includeUsage, forKey: .includeUsage) + try c.encodeIfPresent(self.location, forKey: .location) + try c.encodeIfPresent(self.login, forKey: .login) + try c.encodeIfPresent(self.name, forKey: .name) + try c.encodeIfPresent(self.organization, forKey: .organization) + try c.encodeIfPresent(self.originator, forKey: .originator) + try c.encodeIfPresent(self.params, forKey: .params) + try c.encodeIfPresent(self.password, forKey: .password) + try c.encodeIfPresent(self.probabilitySource, forKey: .probabilitySource) + try c.encodeIfPresent(self.project, forKey: .project) + try c.encodeIfPresent(self.queryParams, forKey: .queryParams) + try c.encodeIfPresent(self.region, forKey: .region) + try c.encodeIfPresent(self.resourceName, forKey: .resourceName) + try c.encodeIfPresent(self.secretAccessKey, forKey: .secretAccessKey) + try c.encodeIfPresent(self.sessionToken, forKey: .sessionToken) + try c.encodeIfPresent(self.speechBaseUrl, forKey: .speechBaseUrl) + try c.encodeIfPresent(self.supportsMultiPartToolContent, forKey: .supportsMultiPartToolContent) + try c.encodeIfPresent(self.supportsStructuredOutputs, forKey: .supportsStructuredOutputs) + try c.encodeIfPresent(self.useDeploymentBasedUrls, forKey: .useDeploymentBasedUrls) + try c.encodeIfPresent(self.webSocket, forKey: .webSocket) + try c.encodeIfPresent(self.workspaceId, forKey: .workspaceId) + } } /// A provider-defined tool (e.g. `anthropic.web_search_20250305`, @@ -4971,6 +6091,26 @@ public struct ProviderWrapParams: Codable, Equatable, Sendable { self.imageModelMiddleware = imageModelMiddleware self.languageModelMiddleware = languageModelMiddleware } + private enum CodingKeys: String, CodingKey { + case imageModelMiddleware = "imageModelMiddleware" + case languageModelMiddleware = "languageModelMiddleware" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.imageModelMiddleware = try c.decodeIfPresent([HandleIdInput].self, forKey: .imageModelMiddleware) + self.languageModelMiddleware = try c.decodeIfPresent([HandleIdInput].self, forKey: .languageModelMiddleware) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.imageModelMiddleware, forKey: .imageModelMiddleware) + try c.encodeIfPresent(self.languageModelMiddleware, forKey: .languageModelMiddleware) + } } /// Provider approval request for a provider-executed call. @@ -5288,6 +6428,29 @@ public struct RegistryCreateParams: Codable, Equatable, Sendable { self.namespace = namespace self.separator = separator } + private enum CodingKeys: String, CodingKey { + case entries = "entries" + case namespace = "namespace" + case separator = "separator" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.entries = try c.decode([RegistryEntry].self, forKey: .entries) + self.namespace = try c.decodeIfPresent(String.self, forKey: .namespace) + self.separator = try c.decodeIfPresent(String.self, forKey: .separator) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encode(self.entries, forKey: .entries) + try c.encodeIfPresent(self.namespace, forKey: .namespace) + try c.encodeIfPresent(self.separator, forKey: .separator) + } } public struct RegistryEntry: Codable, Equatable, Sendable { @@ -5298,6 +6461,26 @@ public struct RegistryEntry: Codable, Equatable, Sendable { self.key = key self.provider = provider } + private enum CodingKeys: String, CodingKey { + case key = "key" + case provider = "provider" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.key = try c.decode(String.self, forKey: .key) + self.provider = try c.decode(String.self, forKey: .provider) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encode(self.key, forKey: .key) + try c.encode(self.provider, forKey: .provider) + } } /// Trusted-caller operation: constructs a provider registry from a declarative @@ -5320,6 +6503,32 @@ public struct RegistryFromConfigParams: Codable, Equatable, Sendable { self.namespace = namespace self.separator = separator } + private enum CodingKeys: String, CodingKey { + case config = "config" + case envAllowlist = "envAllowlist" + case namespace = "namespace" + case separator = "separator" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.config = try c.decode(ProviderConfigDocument.self, forKey: .config) + self.envAllowlist = try c.decodeIfPresent([String].self, forKey: .envAllowlist) + self.namespace = try c.decodeIfPresent(String.self, forKey: .namespace) + self.separator = try c.decodeIfPresent(String.self, forKey: .separator) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encode(self.config, forKey: .config) + try c.encodeIfPresent(self.envAllowlist, forKey: .envAllowlist) + try c.encodeIfPresent(self.namespace, forKey: .namespace) + try c.encodeIfPresent(self.separator, forKey: .separator) + } } public struct RegistryListParams: Codable, Equatable, Sendable { @@ -5327,7 +6536,10 @@ public struct RegistryListParams: Codable, Equatable, Sendable { public init() { } public init(from decoder: any Decoder) throws { - _ = try decoder.container(keyedBy: WireKey.self) + let raw = try decoder.container(keyedBy: WireKey.self) + if let unexpected = raw.allKeys.first { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [unexpected], debugDescription: "Unknown field \(unexpected.stringValue)")) + } } public func encode(to encoder: any Encoder) throws { _ = encoder.container(keyedBy: WireKey.self) @@ -5352,6 +6564,23 @@ public struct RegistryProviderParams: Codable, Equatable, Sendable { public init(key: String) { self.key = key } + private enum CodingKeys: String, CodingKey { + case key = "key" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.key = try c.decode(String.self, forKey: .key) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encode(self.key, forKey: .key) + } } public struct RegistryUpdateParams: Codable, Equatable, Sendable { @@ -5366,6 +6595,32 @@ public struct RegistryUpdateParams: Codable, Equatable, Sendable { self.replace = replace self.set = set } + private enum CodingKeys: String, CodingKey { + case derive = "derive" + case remove = "remove" + case replace = "replace" + case set = "set" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.derive = try c.decodeIfPresent(Bool.self, forKey: .derive) + self.remove = try c.decodeIfPresent([String].self, forKey: .remove) + self.replace = try c.decodeIfPresent(Bool.self, forKey: .replace) + self.set = try c.decodeIfPresent([RegistryEntry].self, forKey: .set) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.derive, forKey: .derive) + try c.encodeIfPresent(self.remove, forKey: .remove) + try c.encodeIfPresent(self.replace, forKey: .replace) + try c.encodeIfPresent(self.set, forKey: .set) + } } public struct RegistryUpdateResult: Codable, Equatable, Sendable { @@ -5437,6 +6692,23 @@ public struct ReplayCreateParams: Codable, Equatable, Sendable { public init(recordingsJsonl: String) { self.recordingsJsonl = recordingsJsonl } + private enum CodingKeys: String, CodingKey { + case recordingsJsonl = "recordingsJsonl" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.recordingsJsonl = try c.decode(String.self, forKey: .recordingsJsonl) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encode(self.recordingsJsonl, forKey: .recordingsJsonl) + } } public struct ReplayInspection: Codable, Equatable, Sendable { @@ -5457,6 +6729,29 @@ public struct ReplayLiveParams: Codable, Equatable, Sendable { self.callId = callId self.target = target } + private enum CodingKeys: String, CodingKey { + case abort = "abort" + case callId = "callId" + case target = "target" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.abort = try c.decodeIfPresent(HandleIdInput.self, forKey: .abort) + self.callId = try c.decode(String.self, forKey: .callId) + self.target = try c.decode(LiveTarget.self, forKey: .target) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.abort, forKey: .abort) + try c.encode(self.callId, forKey: .callId) + try c.encode(self.target, forKey: .target) + } } public indirect enum ReplayLiveResult: Codable, Equatable, Sendable { @@ -5588,6 +6883,41 @@ public struct RerankingCallOptions: Codable, Equatable, Sendable { self.timeout = timeout self.topN = topN } + private enum CodingKeys: String, CodingKey { + case documents = "documents" + case headers = "headers" + case maxRetries = "maxRetries" + case providerOptions = "providerOptions" + case query = "query" + case timeout = "timeout" + case topN = "topN" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.documents = try c.decode(RerankingDocuments.self, forKey: .documents) + self.headers = try c.decodeIfPresent([String: String].self, forKey: .headers) + self.maxRetries = try c.decodeIfPresent(UInt32.self, forKey: .maxRetries) + self.providerOptions = try c.decodeIfPresent([String: [String: JSONValue]].self, forKey: .providerOptions) + self.query = try c.decode(String.self, forKey: .query) + self.timeout = try c.decodeIfPresent(TimeoutConfiguration.self, forKey: .timeout) + self.topN = try c.decodeIfPresent(UInt32.self, forKey: .topN) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encode(self.documents, forKey: .documents) + try c.encodeIfPresent(self.headers, forKey: .headers) + try c.encodeIfPresent(self.maxRetries, forKey: .maxRetries) + try c.encodeIfPresent(self.providerOptions, forKey: .providerOptions) + try c.encode(self.query, forKey: .query) + try c.encodeIfPresent(self.timeout, forKey: .timeout) + try c.encodeIfPresent(self.topN, forKey: .topN) + } } /// Documents to rerank: either a list of texts or a list of JSON objects. @@ -5818,6 +7148,35 @@ public struct RouterParams: Codable, Equatable, Sendable { self.providerName = providerName self.strategy = strategy } + private enum CodingKeys: String, CodingKey { + case children = "children" + case fallback = "fallback" + case modelId = "modelId" + case providerName = "providerName" + case strategy = "strategy" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.children = try c.decode([String].self, forKey: .children) + self.fallback = try c.decodeIfPresent(Fallback.self, forKey: .fallback) + self.modelId = try c.decodeIfPresent(String.self, forKey: .modelId) + self.providerName = try c.decodeIfPresent(String.self, forKey: .providerName) + self.strategy = try c.decode(Strategy.self, forKey: .strategy) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encode(self.children, forKey: .children) + try c.encodeIfPresent(self.fallback, forKey: .fallback) + try c.encodeIfPresent(self.modelId, forKey: .modelId) + try c.encodeIfPresent(self.providerName, forKey: .providerName) + try c.encode(self.strategy, forKey: .strategy) + } } public struct RuntimeConfigureParams: Codable, Equatable, Sendable { @@ -5828,6 +7187,26 @@ public struct RuntimeConfigureParams: Codable, Equatable, Sendable { self.logging = logging self.proxy = proxy } + private enum CodingKeys: String, CodingKey { + case logging = "logging" + case proxy = "proxy" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.logging = try c.decodeIfPresent(LoggingConfig.self, forKey: .logging) + self.proxy = try c.decodeIfPresent(TransportProxy.self, forKey: .proxy) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.logging, forKey: .logging) + try c.encodeIfPresent(self.proxy, forKey: .proxy) + } } public struct RuntimeDescribeParams: Codable, Equatable, Sendable { @@ -5835,7 +7214,10 @@ public struct RuntimeDescribeParams: Codable, Equatable, Sendable { public init() { } public init(from decoder: any Decoder) throws { - _ = try decoder.container(keyedBy: WireKey.self) + let raw = try decoder.container(keyedBy: WireKey.self) + if let unexpected = raw.allKeys.first { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [unexpected], debugDescription: "Unknown field \(unexpected.stringValue)")) + } } public func encode(to encoder: any Encoder) throws { _ = encoder.container(keyedBy: WireKey.self) @@ -5911,6 +7293,50 @@ public struct SearchCallOptions: Codable, Equatable, Sendable { self.timeRange = timeRange self.timeout = timeout } + private enum CodingKeys: String, CodingKey { + case excludeDomains = "excludeDomains" + case headers = "headers" + case includeDomains = "includeDomains" + case includeRawContent = "includeRawContent" + case maxResults = "maxResults" + case maxRetries = "maxRetries" + case providerOptions = "providerOptions" + case query = "query" + case timeRange = "timeRange" + case timeout = "timeout" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.excludeDomains = try c.decodeIfPresent([String].self, forKey: .excludeDomains) + self.headers = try c.decodeIfPresent([String: String].self, forKey: .headers) + self.includeDomains = try c.decodeIfPresent([String].self, forKey: .includeDomains) + self.includeRawContent = try c.decodeIfPresent(Bool.self, forKey: .includeRawContent) + self.maxResults = try c.decodeIfPresent(UInt32.self, forKey: .maxResults) + self.maxRetries = try c.decodeIfPresent(UInt32.self, forKey: .maxRetries) + self.providerOptions = try c.decodeIfPresent([String: [String: JSONValue]].self, forKey: .providerOptions) + self.query = try c.decode(String.self, forKey: .query) + self.timeRange = try c.decodeIfPresent(String.self, forKey: .timeRange) + self.timeout = try c.decodeIfPresent(TimeoutConfiguration.self, forKey: .timeout) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.excludeDomains, forKey: .excludeDomains) + try c.encodeIfPresent(self.headers, forKey: .headers) + try c.encodeIfPresent(self.includeDomains, forKey: .includeDomains) + try c.encodeIfPresent(self.includeRawContent, forKey: .includeRawContent) + try c.encodeIfPresent(self.maxResults, forKey: .maxResults) + try c.encodeIfPresent(self.maxRetries, forKey: .maxRetries) + try c.encodeIfPresent(self.providerOptions, forKey: .providerOptions) + try c.encode(self.query, forKey: .query) + try c.encodeIfPresent(self.timeRange, forKey: .timeRange) + try c.encodeIfPresent(self.timeout, forKey: .timeout) + } } /// Optional response information for a search call. @@ -6058,6 +7484,23 @@ public struct SessionStoreCallsParams: Codable, Equatable, Sendable { public init(sessionId: String) { self.sessionId = sessionId } + private enum CodingKeys: String, CodingKey { + case sessionId = "sessionId" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.sessionId = try c.decode(String.self, forKey: .sessionId) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encode(self.sessionId, forKey: .sessionId) + } } public struct SessionStoreCreateParams: Codable, Equatable, Sendable { @@ -6066,6 +7509,23 @@ public struct SessionStoreCreateParams: Codable, Equatable, Sendable { public init(infer: Bool) { self.infer = infer } + private enum CodingKeys: String, CodingKey { + case infer = "infer" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.infer = try c.decode(Bool.self, forKey: .infer) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encode(self.infer, forKey: .infer) + } } public struct SessionStoreHandle: Codable, Equatable, Sendable { @@ -6116,6 +7576,35 @@ public struct SettingFieldSpec: Codable, Equatable, Sendable { self.name = name self.required = required } + private enum CodingKeys: String, CodingKey { + case credential = "credential" + case envVar = "envVar" + case kind = "kind" + case name = "name" + case required = "required" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.credential = try c.decode(Bool.self, forKey: .credential) + self.envVar = try c.decodeIfPresent(String.self, forKey: .envVar) + self.kind = try c.decode(SettingFieldKind.self, forKey: .kind) + self.name = try c.decode(String.self, forKey: .name) + self.required = try c.decode(Bool.self, forKey: .required) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encode(self.credential, forKey: .credential) + try c.encodeIfPresent(self.envVar, forKey: .envVar) + try c.encode(self.kind, forKey: .kind) + try c.encode(self.name, forKey: .name) + try c.encode(self.required, forKey: .required) + } } /// Image/video size in `{width}x{height}` format (e.g. `"1024x1024"`). @@ -6249,6 +7738,50 @@ public struct SpeechCallOptions: Codable, Equatable, Sendable { self.timeout = timeout self.voice = voice } + private enum CodingKeys: String, CodingKey { + case headers = "headers" + case instructions = "instructions" + case language = "language" + case maxRetries = "maxRetries" + case outputFormat = "outputFormat" + case providerOptions = "providerOptions" + case speed = "speed" + case text = "text" + case timeout = "timeout" + case voice = "voice" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.headers = try c.decodeIfPresent([String: String].self, forKey: .headers) + self.instructions = try c.decodeIfPresent(String.self, forKey: .instructions) + self.language = try c.decodeIfPresent(String.self, forKey: .language) + self.maxRetries = try c.decodeIfPresent(UInt32.self, forKey: .maxRetries) + self.outputFormat = try c.decodeIfPresent(String.self, forKey: .outputFormat) + self.providerOptions = try c.decodeIfPresent([String: [String: JSONValue]].self, forKey: .providerOptions) + self.speed = try c.decodeIfPresent(Double.self, forKey: .speed) + self.text = try c.decode(String.self, forKey: .text) + self.timeout = try c.decodeIfPresent(TimeoutConfiguration.self, forKey: .timeout) + self.voice = try c.decodeIfPresent(String.self, forKey: .voice) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.headers, forKey: .headers) + try c.encodeIfPresent(self.instructions, forKey: .instructions) + try c.encodeIfPresent(self.language, forKey: .language) + try c.encodeIfPresent(self.maxRetries, forKey: .maxRetries) + try c.encodeIfPresent(self.outputFormat, forKey: .outputFormat) + try c.encodeIfPresent(self.providerOptions, forKey: .providerOptions) + try c.encodeIfPresent(self.speed, forKey: .speed) + try c.encode(self.text, forKey: .text) + try c.encodeIfPresent(self.timeout, forKey: .timeout) + try c.encodeIfPresent(self.voice, forKey: .voice) + } } /// Optional request information for a speech call. @@ -6675,12 +8208,25 @@ public indirect enum Strategy: Codable, Equatable, Sendable { } public init(from decoder: any Decoder) throws { let c = try decoder.container(keyedBy: CodingKeys.self) + let raw = try decoder.container(keyedBy: WireKey.self) let tag = try c.decode(String.self, forKey: .type) switch tag { case "rule": + let allowed: Set = ["type"] + for key in raw.allKeys { + if !allowed.contains(key.stringValue) { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } self = .rule return case "weighted": + let allowed: Set = ["weights", "type"] + for key in raw.allKeys { + if !allowed.contains(key.stringValue) { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } self = .weighted(weights: try c.decode([Double].self, forKey: .weights)) return default: throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath, debugDescription: "Unknown Strategy tag \(tag)")) @@ -6728,12 +8274,25 @@ public indirect enum StreamFrame: Codable, Equatable, Sendable { } public init(from decoder: any Decoder) throws { let c = try decoder.container(keyedBy: CodingKeys.self) + let raw = try decoder.container(keyedBy: WireKey.self) let tag = try c.decode(String.self, forKey: .type) switch tag { case "end": + let allowed: Set = ["error", "outcome", "seq", "type"] + for key in raw.allKeys { + if !allowed.contains(key.stringValue) { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } self = .end(error: try c.decodeIfPresent(ErrorEnvelope.self, forKey: .error), outcome: try c.decode(Outcome.self, forKey: .outcome), seq: try c.decode(WireUInt64.self, forKey: .seq)) return case "event": + let allowed: Set = ["event", "seq", "type"] + for key in raw.allKeys { + if !allowed.contains(key.stringValue) { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } self = .event(event: try c.decode(StreamEvent.self, forKey: .event), seq: try c.decode(WireUInt64.self, forKey: .seq)) return default: throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath, debugDescription: "Unknown StreamFrame tag \(tag)")) @@ -6763,6 +8322,26 @@ public struct StreamOptions: Codable, Equatable, Sendable { self.includeReasoning = includeReasoning self.includeUsage = includeUsage } + private enum CodingKeys: String, CodingKey { + case includeReasoning = "includeReasoning" + case includeUsage = "includeUsage" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.includeReasoning = try c.decodeIfPresent(Bool.self, forKey: .includeReasoning) + self.includeUsage = try c.decodeIfPresent(Bool.self, forKey: .includeUsage) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.includeReasoning, forKey: .includeReasoning) + try c.encodeIfPresent(self.includeUsage, forKey: .includeUsage) + } } /// Configuration string accepting either a literal secret/value or an `{ "env": "VAR" }` reference. @@ -6910,6 +8489,26 @@ public struct TemplateParamDescriptor: Codable, Equatable, Sendable { self.envVar = envVar self.name = name } + private enum CodingKeys: String, CodingKey { + case envVar = "envVar" + case name = "name" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.envVar = try c.decode(String.self, forKey: .envVar) + self.name = try c.decode(String.self, forKey: .name) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encode(self.envVar, forKey: .envVar) + try c.encode(self.name, forKey: .name) + } } public struct TerminalSummary: Codable, Equatable, Sendable { @@ -6943,6 +8542,29 @@ public struct TextRequest: Codable, Equatable, Sendable { self.options = options self.prompt = prompt } + private enum CodingKeys: String, CodingKey { + case abort = "abort" + case options = "options" + case prompt = "prompt" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.abort = try c.decodeIfPresent(HandleIdInput.self, forKey: .abort) + self.options = try c.decodeIfPresent(Options.self, forKey: .options) + self.prompt = try c.decode(ModelPrompt.self, forKey: .prompt) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.abort, forKey: .abort) + try c.encodeIfPresent(self.options, forKey: .options) + try c.encode(self.prompt, forKey: .prompt) + } } /// A public call-layer stream chunk: the AI SDK's `TextStreamPart` @@ -7335,6 +8957,32 @@ public struct TimeoutConfiguration: Codable, Equatable, Sendable { self.stepMs = stepMs self.totalMs = totalMs } + private enum CodingKeys: String, CodingKey { + case chunkMs = "chunkMs" + case firstChunkMs = "firstChunkMs" + case stepMs = "stepMs" + case totalMs = "totalMs" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.chunkMs = try c.decodeIfPresent(UInt64.self, forKey: .chunkMs) + self.firstChunkMs = try c.decodeIfPresent(UInt64.self, forKey: .firstChunkMs) + self.stepMs = try c.decodeIfPresent(UInt64.self, forKey: .stepMs) + self.totalMs = try c.decodeIfPresent(UInt64.self, forKey: .totalMs) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.chunkMs, forKey: .chunkMs) + try c.encodeIfPresent(self.firstChunkMs, forKey: .firstChunkMs) + try c.encodeIfPresent(self.stepMs, forKey: .stepMs) + try c.encodeIfPresent(self.totalMs, forKey: .totalMs) + } } /// A point in time: a `Date` in the AI SDK, whose JSON is @@ -7624,15 +9272,34 @@ public indirect enum ToolCallRepairReply: Codable, Equatable, Sendable { } public init(from decoder: any Decoder) throws { let c = try decoder.container(keyedBy: CodingKeys.self) + let raw = try decoder.container(keyedBy: WireKey.self) let tag = try c.decode(String.self, forKey: .type) switch tag { case "failed": + let allowed: Set = ["message", "type"] + for key in raw.allKeys { + if !allowed.contains(key.stringValue) { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } self = .failed(message: try c.decode(String.self, forKey: .message)) return case "repaired": + let allowed: Set = ["toolCall", "type"] + for key in raw.allKeys { + if !allowed.contains(key.stringValue) { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } self = .repaired(toolCall: try c.decode(RepairedToolCall.self, forKey: .toolCall)) return case "unchanged": + let allowed: Set = ["type"] + for key in raw.allKeys { + if !allowed.contains(key.stringValue) { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } self = .unchanged return default: throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath, debugDescription: "Unknown ToolCallRepairReply tag \(tag)")) @@ -7860,6 +9527,29 @@ public struct ToolRepairApplyRequest: Codable, Equatable, Sendable { self.reply = reply self.toolCall = toolCall } + private enum CodingKeys: String, CodingKey { + case options = "options" + case reply = "reply" + case toolCall = "toolCall" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.options = try c.decodeIfPresent(GenerateTextOptions.self, forKey: .options) + self.reply = try c.decode(ToolCallRepairReply.self, forKey: .reply) + self.toolCall = try c.decode(ToolCallInput.self, forKey: .toolCall) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.options, forKey: .options) + try c.encode(self.reply, forKey: .reply) + try c.encode(self.toolCall, forKey: .toolCall) + } } public struct ToolRepairApplyResultRequest: Codable, Equatable, Sendable { @@ -7874,6 +9564,32 @@ public struct ToolRepairApplyResultRequest: Codable, Equatable, Sendable { self.result = result self.toolCallId = toolCallId } + private enum CodingKeys: String, CodingKey { + case options = "options" + case reply = "reply" + case result = "result" + case toolCallId = "toolCallId" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.options = try c.decodeIfPresent(GenerateTextOptions.self, forKey: .options) + self.reply = try c.decode(ToolCallRepairReply.self, forKey: .reply) + self.result = try c.decode(GenerateTextResultInput.self, forKey: .result) + self.toolCallId = try c.decode(String.self, forKey: .toolCallId) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.options, forKey: .options) + try c.encode(self.reply, forKey: .reply) + try c.encode(self.result, forKey: .result) + try c.encode(self.toolCallId, forKey: .toolCallId) + } } public struct ToolRepairContextRequest: Codable, Equatable, Sendable { @@ -7886,6 +9602,29 @@ public struct ToolRepairContextRequest: Codable, Equatable, Sendable { self.prompt = prompt self.toolCall = toolCall } + private enum CodingKeys: String, CodingKey { + case options = "options" + case prompt = "prompt" + case toolCall = "toolCall" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.options = try c.decodeIfPresent(GenerateTextOptions.self, forKey: .options) + self.prompt = try c.decode(ModelPrompt.self, forKey: .prompt) + self.toolCall = try c.decode(ToolCallInput.self, forKey: .toolCall) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.options, forKey: .options) + try c.encode(self.prompt, forKey: .prompt) + try c.encode(self.toolCall, forKey: .toolCall) + } } public typealias ToolRepairContextResult = ToolRepairContextSchema? @@ -8261,6 +10000,32 @@ public struct TraceAggregateFilter: Codable, Equatable, Sendable { self.sessionId = sessionId self.sinceUnixMs = sinceUnixMs } + private enum CodingKeys: String, CodingKey { + case model = "model" + case provider = "provider" + case sessionId = "sessionId" + case sinceUnixMs = "sinceUnixMs" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.model = try c.decodeIfPresent(String.self, forKey: .model) + self.provider = try c.decodeIfPresent(String.self, forKey: .provider) + self.sessionId = try c.decodeIfPresent(String.self, forKey: .sessionId) + self.sinceUnixMs = try c.decodeIfPresent(Int64.self, forKey: .sinceUnixMs) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.model, forKey: .model) + try c.encodeIfPresent(self.provider, forKey: .provider) + try c.encodeIfPresent(self.sessionId, forKey: .sessionId) + try c.encodeIfPresent(self.sinceUnixMs, forKey: .sinceUnixMs) + } } public struct TraceAggregateParams: Codable, Equatable, Sendable { @@ -8269,6 +10034,23 @@ public struct TraceAggregateParams: Codable, Equatable, Sendable { public init(filter: TraceAggregateFilter? = nil) { self.filter = filter } + private enum CodingKeys: String, CodingKey { + case filter = "filter" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.filter = try c.decodeIfPresent(TraceAggregateFilter.self, forKey: .filter) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.filter, forKey: .filter) + } } public enum TraceAuditMode: String, Codable, Equatable, Sendable { @@ -8287,6 +10069,29 @@ public struct TraceCreateParams: Codable, Equatable, Sendable { self.capacity = capacity self.perScopeCapacity = perScopeCapacity } + private enum CodingKeys: String, CodingKey { + case auditMode = "auditMode" + case capacity = "capacity" + case perScopeCapacity = "perScopeCapacity" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.auditMode = try c.decodeIfPresent(TraceAuditMode.self, forKey: .auditMode) + self.capacity = try c.decodeIfPresent(UInt64.self, forKey: .capacity) + self.perScopeCapacity = try c.decodeIfPresent(UInt64.self, forKey: .perScopeCapacity) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.auditMode, forKey: .auditMode) + try c.encodeIfPresent(self.capacity, forKey: .capacity) + try c.encodeIfPresent(self.perScopeCapacity, forKey: .perScopeCapacity) + } } /// One probed call. Plaintext never persists — fingerprints only. @@ -8343,6 +10148,23 @@ public struct TraceSessionParams: Codable, Equatable, Sendable { public init(sessionId: String) { self.sessionId = sessionId } + private enum CodingKeys: String, CodingKey { + case sessionId = "sessionId" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.sessionId = try c.decode(String.self, forKey: .sessionId) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encode(self.sessionId, forKey: .sessionId) + } } /// Aggregated statistics (RFC-0015 §5.2 — the two hit rates are reported @@ -8406,6 +10228,38 @@ public struct TranscriptionCallOptions: Codable, Equatable, Sendable { self.providerOptions = providerOptions self.timeout = timeout } + private enum CodingKeys: String, CodingKey { + case audio = "audio" + case headers = "headers" + case maxRetries = "maxRetries" + case mediaType = "mediaType" + case providerOptions = "providerOptions" + case timeout = "timeout" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.audio = try c.decode(AudioInput.self, forKey: .audio) + self.headers = try c.decodeIfPresent([String: String].self, forKey: .headers) + self.maxRetries = try c.decodeIfPresent(UInt32.self, forKey: .maxRetries) + self.mediaType = try c.decode(String.self, forKey: .mediaType) + self.providerOptions = try c.decodeIfPresent([String: [String: JSONValue]].self, forKey: .providerOptions) + self.timeout = try c.decodeIfPresent(TimeoutConfiguration.self, forKey: .timeout) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encode(self.audio, forKey: .audio) + try c.encodeIfPresent(self.headers, forKey: .headers) + try c.encodeIfPresent(self.maxRetries, forKey: .maxRetries) + try c.encode(self.mediaType, forKey: .mediaType) + try c.encodeIfPresent(self.providerOptions, forKey: .providerOptions) + try c.encodeIfPresent(self.timeout, forKey: .timeout) + } } /// Optional request information for a transcription call. @@ -8522,6 +10376,38 @@ public struct TranscriptionStartParams: Codable, Equatable, Sendable { self.providerOptions = providerOptions self.timeout = timeout } + private enum CodingKeys: String, CodingKey { + case abort = "abort" + case headers = "headers" + case includeRawChunks = "includeRawChunks" + case inputAudioFormat = "inputAudioFormat" + case providerOptions = "providerOptions" + case timeout = "timeout" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.abort = try c.decodeIfPresent(HandleIdInput.self, forKey: .abort) + self.headers = try c.decodeIfPresent([String: String].self, forKey: .headers) + self.includeRawChunks = try c.decodeIfPresent(Bool.self, forKey: .includeRawChunks) + self.inputAudioFormat = try c.decodeIfPresent(InputAudioFormat.self, forKey: .inputAudioFormat) + self.providerOptions = try c.decodeIfPresent([String: [String: JSONValue]].self, forKey: .providerOptions) + self.timeout = try c.decodeIfPresent(TimeoutConfiguration.self, forKey: .timeout) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.abort, forKey: .abort) + try c.encodeIfPresent(self.headers, forKey: .headers) + try c.encodeIfPresent(self.includeRawChunks, forKey: .includeRawChunks) + try c.encodeIfPresent(self.inputAudioFormat, forKey: .inputAudioFormat) + try c.encodeIfPresent(self.providerOptions, forKey: .providerOptions) + try c.encodeIfPresent(self.timeout, forKey: .timeout) + } } /// A single chunk in the stream returned by `do_stream`. @@ -8648,15 +10534,34 @@ public indirect enum TransportParams: Codable, Equatable, Sendable { } public init(from decoder: any Decoder) throws { let c = try decoder.container(keyedBy: CodingKeys.self) + let raw = try decoder.container(keyedBy: WireKey.self) let tag = try c.decode(String.self, forKey: .kind) switch tag { case "download": + let allowed: Set = ["maxBytes", "kind"] + for key in raw.allKeys { + if !allowed.contains(key.stringValue) { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } self = .download(maxBytes: try c.decodeIfPresent(UInt64.self, forKey: .maxBytes)) return case "fetch": + let allowed: Set = ["proxy", "kind"] + for key in raw.allKeys { + if !allowed.contains(key.stringValue) { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } self = .fetch(proxy: try c.decodeIfPresent(TransportProxy.self, forKey: .proxy)) return case "ws": + let allowed: Set = ["proxy", "kind"] + for key in raw.allKeys { + if !allowed.contains(key.stringValue) { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } self = .ws(proxy: try c.decodeIfPresent(TransportProxy.self, forKey: .proxy)) return default: throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath, debugDescription: "Unknown TransportParams tag \(tag)")) @@ -8700,6 +10605,26 @@ public struct TransportProxy: Codable, Equatable, Sendable { case httpsUrl = "https_url" case noProxy = "no_proxy" } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.allUrl = try c.decodeIfPresent(String.self, forKey: .allUrl) + self.httpUrl = try c.decodeIfPresent(String.self, forKey: .httpUrl) + self.httpsUrl = try c.decodeIfPresent(String.self, forKey: .httpsUrl) + self.noProxy = try c.decodeIfPresent(String.self, forKey: .noProxy) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.allUrl, forKey: .allUrl) + try c.encodeIfPresent(self.httpUrl, forKey: .httpUrl) + try c.encodeIfPresent(self.httpsUrl, forKey: .httpsUrl) + try c.encodeIfPresent(self.noProxy, forKey: .noProxy) + } } /// A source in a text result's `sources`: a [`Source`] with its `type` tag, @@ -8976,12 +10901,25 @@ public indirect enum UploadFileData: Codable, Equatable, Sendable { } public init(from decoder: any Decoder) throws { let c = try decoder.container(keyedBy: CodingKeys.self) + let raw = try decoder.container(keyedBy: WireKey.self) let tag = try c.decode(String.self, forKey: .type) switch tag { case "data": + let allowed: Set = ["data", "type"] + for key in raw.allKeys { + if !allowed.contains(key.stringValue) { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } self = .data(data: try c.decode(FileBytes.self, forKey: .data)) return case "text": + let allowed: Set = ["text", "type"] + for key in raw.allKeys { + if !allowed.contains(key.stringValue) { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } self = .text(text: try c.decode(String.self, forKey: .text)) return default: throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath, debugDescription: "Unknown UploadFileData tag \(tag)")) @@ -9019,6 +10957,35 @@ public struct UploadFileParams: Codable, Equatable, Sendable { self.mediaType = mediaType self.providerOptions = providerOptions } + private enum CodingKeys: String, CodingKey { + case abort = "abort" + case data = "data" + case filename = "filename" + case mediaType = "mediaType" + case providerOptions = "providerOptions" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.abort = try c.decodeIfPresent(HandleIdInput.self, forKey: .abort) + self.data = try c.decode(UploadFileData.self, forKey: .data) + self.filename = try c.decodeIfPresent(String.self, forKey: .filename) + self.mediaType = try c.decode(String.self, forKey: .mediaType) + self.providerOptions = try c.decodeIfPresent([String: [String: JSONValue]].self, forKey: .providerOptions) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.abort, forKey: .abort) + try c.encode(self.data, forKey: .data) + try c.encodeIfPresent(self.filename, forKey: .filename) + try c.encode(self.mediaType, forKey: .mediaType) + try c.encodeIfPresent(self.providerOptions, forKey: .providerOptions) + } } /// Result of [`Files::upload_file`]. @@ -9283,6 +11250,68 @@ public struct VideoCallOptions: Codable, Equatable, Sendable { self.seed = seed self.timeout = timeout } + private enum CodingKeys: String, CodingKey { + case aspectRatio = "aspectRatio" + case duration = "duration" + case fps = "fps" + case frameImages = "frameImages" + case generateAudio = "generateAudio" + case headers = "headers" + case image = "image" + case inputReferences = "inputReferences" + case maxRetries = "maxRetries" + case n = "n" + case poll = "poll" + case prompt = "prompt" + case providerOptions = "providerOptions" + case resolution = "resolution" + case seed = "seed" + case timeout = "timeout" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.aspectRatio = try c.decodeIfPresent(AspectRatio.self, forKey: .aspectRatio) + self.duration = try c.decodeIfPresent(UInt32.self, forKey: .duration) + self.fps = try c.decodeIfPresent(UInt32.self, forKey: .fps) + self.frameImages = try c.decodeIfPresent([VideoFrameImage].self, forKey: .frameImages) + self.generateAudio = try c.decodeIfPresent(Bool.self, forKey: .generateAudio) + self.headers = try c.decodeIfPresent([String: String].self, forKey: .headers) + self.image = try c.decodeIfPresent(VideoFile.self, forKey: .image) + self.inputReferences = try c.decodeIfPresent([VideoFile].self, forKey: .inputReferences) + self.maxRetries = try c.decodeIfPresent(UInt32.self, forKey: .maxRetries) + self.n = try c.decodeIfPresent(UInt32.self, forKey: .n) + self.poll = try c.decodeIfPresent(VideoPollOptions.self, forKey: .poll) + self.prompt = try c.decodeIfPresent(String.self, forKey: .prompt) + self.providerOptions = try c.decodeIfPresent([String: [String: JSONValue]].self, forKey: .providerOptions) + self.resolution = try c.decodeIfPresent(Size.self, forKey: .resolution) + self.seed = try c.decodeIfPresent(UInt64.self, forKey: .seed) + self.timeout = try c.decodeIfPresent(TimeoutConfiguration.self, forKey: .timeout) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.aspectRatio, forKey: .aspectRatio) + try c.encodeIfPresent(self.duration, forKey: .duration) + try c.encodeIfPresent(self.fps, forKey: .fps) + try c.encodeIfPresent(self.frameImages, forKey: .frameImages) + try c.encodeIfPresent(self.generateAudio, forKey: .generateAudio) + try c.encodeIfPresent(self.headers, forKey: .headers) + try c.encodeIfPresent(self.image, forKey: .image) + try c.encodeIfPresent(self.inputReferences, forKey: .inputReferences) + try c.encodeIfPresent(self.maxRetries, forKey: .maxRetries) + try c.encodeIfPresent(self.n, forKey: .n) + try c.encodeIfPresent(self.poll, forKey: .poll) + try c.encodeIfPresent(self.prompt, forKey: .prompt) + try c.encodeIfPresent(self.providerOptions, forKey: .providerOptions) + try c.encodeIfPresent(self.resolution, forKey: .resolution) + try c.encodeIfPresent(self.seed, forKey: .seed) + try c.encodeIfPresent(self.timeout, forKey: .timeout) + } } /// Generated video data: a URL, base64-encoded string, or binary data. @@ -9422,6 +11451,26 @@ public struct VideoPollOptions: Codable, Equatable, Sendable { self.intervalMs = intervalMs self.timeoutMs = timeoutMs } + private enum CodingKeys: String, CodingKey { + case intervalMs = "intervalMs" + case timeoutMs = "timeoutMs" + } + public init(from decoder: any Decoder) throws { + let raw = try decoder.container(keyedBy: WireKey.self) + for key in raw.allKeys { + if CodingKeys(stringValue: key.stringValue) == nil { + throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath + [key], debugDescription: "Unknown field \(key.stringValue)")) + } + } + let c = try decoder.container(keyedBy: CodingKeys.self) + self.intervalMs = try c.decodeIfPresent(UInt64.self, forKey: .intervalMs) + self.timeoutMs = try c.decodeIfPresent(UInt64.self, forKey: .timeoutMs) + } + public func encode(to encoder: any Encoder) throws { + var c = encoder.container(keyedBy: CodingKeys.self) + try c.encodeIfPresent(self.intervalMs, forKey: .intervalMs) + try c.encodeIfPresent(self.timeoutMs, forKey: .timeoutMs) + } } /// Response information for a video generation call. diff --git a/contract-tests/dto/FinishReasonUnified/003.negative.json b/contract-tests/dto/FinishReasonUnified/003.negative.json new file mode 100644 index 000000000..7f3952533 --- /dev/null +++ b/contract-tests/dto/FinishReasonUnified/003.negative.json @@ -0,0 +1 @@ +"future-finish-reason" diff --git a/contract-tests/dto/GenerateContent/010.negative.json b/contract-tests/dto/GenerateContent/010.negative.json new file mode 100644 index 000000000..7fa64b631 --- /dev/null +++ b/contract-tests/dto/GenerateContent/010.negative.json @@ -0,0 +1,3 @@ +{ + "type": "unknown-content-tag" +} diff --git a/contract-tests/dto/HandleId/003.negative.json b/contract-tests/dto/HandleId/003.negative.json new file mode 100644 index 000000000..4751e6445 --- /dev/null +++ b/contract-tests/dto/HandleId/003.negative.json @@ -0,0 +1 @@ +"not-a-handle" diff --git a/contract-tests/dto/HandleId/004.negative.json b/contract-tests/dto/HandleId/004.negative.json new file mode 100644 index 000000000..fb540152b --- /dev/null +++ b/contract-tests/dto/HandleId/004.negative.json @@ -0,0 +1 @@ +"18446744073709551616" diff --git a/contract-tests/dto/HandleId/005.negative.json b/contract-tests/dto/HandleId/005.negative.json new file mode 100644 index 000000000..190a18037 --- /dev/null +++ b/contract-tests/dto/HandleId/005.negative.json @@ -0,0 +1 @@ +123 diff --git a/contract-tests/dto/OperationNextParams/001.json b/contract-tests/dto/OperationNextParams/001.json new file mode 100644 index 000000000..89a67b7f6 --- /dev/null +++ b/contract-tests/dto/OperationNextParams/001.json @@ -0,0 +1,3 @@ +{ + "timeoutMs": 50 +} diff --git a/contract-tests/dto/OperationNextParams/002.negative.json b/contract-tests/dto/OperationNextParams/002.negative.json new file mode 100644 index 000000000..d1e82f295 --- /dev/null +++ b/contract-tests/dto/OperationNextParams/002.negative.json @@ -0,0 +1,4 @@ +{ + "timeoutMs": 50, + "unexpectedField": true +} diff --git a/contract-tests/dto/OperationNextParams/003.negative.json b/contract-tests/dto/OperationNextParams/003.negative.json new file mode 100644 index 000000000..0195a2c0a --- /dev/null +++ b/contract-tests/dto/OperationNextParams/003.negative.json @@ -0,0 +1 @@ +"not-an-object" diff --git a/contract-tests/dto/OperationNextParams/004.negative.json b/contract-tests/dto/OperationNextParams/004.negative.json new file mode 100644 index 000000000..d1f1c846e --- /dev/null +++ b/contract-tests/dto/OperationNextParams/004.negative.json @@ -0,0 +1,3 @@ +{ + "timeoutMs": "wrong-type" +} diff --git a/contract-tests/dto/RawToolCall/002.json b/contract-tests/dto/RawToolCall/002.json new file mode 100644 index 000000000..b9cab28b7 --- /dev/null +++ b/contract-tests/dto/RawToolCall/002.json @@ -0,0 +1,5 @@ +{ + "toolCallId": "call-2", + "toolName": "city", + "input": "\"Tokyo\"" +} diff --git a/contract-tests/dto/RawToolCall/003.json b/contract-tests/dto/RawToolCall/003.json new file mode 100644 index 000000000..ab87771fa --- /dev/null +++ b/contract-tests/dto/RawToolCall/003.json @@ -0,0 +1,5 @@ +{ + "toolCallId": "call-3", + "toolName": "jsonString", + "input": "\"{\\\"x\\\":1}\"" +} diff --git a/contract-tests/dto/RawToolCall/004.json b/contract-tests/dto/RawToolCall/004.json new file mode 100644 index 000000000..935537450 --- /dev/null +++ b/contract-tests/dto/RawToolCall/004.json @@ -0,0 +1,5 @@ +{ + "toolCallId": "call-4", + "toolName": "num", + "input": "123" +} diff --git a/contract-tests/dto/RawToolCall/005.json b/contract-tests/dto/RawToolCall/005.json new file mode 100644 index 000000000..3fb071322 --- /dev/null +++ b/contract-tests/dto/RawToolCall/005.json @@ -0,0 +1,5 @@ +{ + "toolCallId": "call-5", + "toolName": "flag", + "input": "true" +} diff --git a/contract-tests/dto/RawToolCall/006.json b/contract-tests/dto/RawToolCall/006.json new file mode 100644 index 000000000..bfc5b11c6 --- /dev/null +++ b/contract-tests/dto/RawToolCall/006.json @@ -0,0 +1,5 @@ +{ + "toolCallId": "call-6", + "toolName": "empty", + "input": "null" +} diff --git a/contract-tests/dto/RawToolCall/007.json b/contract-tests/dto/RawToolCall/007.json new file mode 100644 index 000000000..b830a28f7 --- /dev/null +++ b/contract-tests/dto/RawToolCall/007.json @@ -0,0 +1,5 @@ +{ + "toolCallId": "call-7", + "toolName": "dup", + "input": "{\"a\":1,\"a\":2}" +} diff --git a/contract-tests/dto/RawToolCall/008.json b/contract-tests/dto/RawToolCall/008.json new file mode 100644 index 000000000..f9bc9792a --- /dev/null +++ b/contract-tests/dto/RawToolCall/008.json @@ -0,0 +1,5 @@ +{ + "toolCallId": "call-8", + "toolName": "sci", + "input": " 1e2 " +} diff --git a/contract-tests/dto/RawToolCall/009.json b/contract-tests/dto/RawToolCall/009.json new file mode 100644 index 000000000..e7de69c01 --- /dev/null +++ b/contract-tests/dto/RawToolCall/009.json @@ -0,0 +1,5 @@ +{ + "toolCallId": "call-9", + "toolName": "broken", + "input": "{\"a\":" +} diff --git a/contract-tests/dto/RawToolCall/010.json b/contract-tests/dto/RawToolCall/010.json new file mode 100644 index 000000000..1f1101a04 --- /dev/null +++ b/contract-tests/dto/RawToolCall/010.json @@ -0,0 +1,5 @@ +{ + "toolCallId": "call-10", + "toolName": "safeInt", + "input": "{\"maxSafe\":9007199254740991,\"minSafe\":-9007199254740991}" +} diff --git a/contract-tests/dto/ToolCall/003.json b/contract-tests/dto/ToolCall/003.json new file mode 100644 index 000000000..34bd04568 --- /dev/null +++ b/contract-tests/dto/ToolCall/003.json @@ -0,0 +1,5 @@ +{ + "toolCallId": "call-2", + "toolName": "city", + "input": "Tokyo" +} diff --git a/contract-tests/dto/ToolCall/004.json b/contract-tests/dto/ToolCall/004.json new file mode 100644 index 000000000..e21d0f7ba --- /dev/null +++ b/contract-tests/dto/ToolCall/004.json @@ -0,0 +1,5 @@ +{ + "toolCallId": "call-3", + "toolName": "jsonString", + "input": "{\"x\":1}" +} diff --git a/contract-tests/dto/ToolCall/005.json b/contract-tests/dto/ToolCall/005.json new file mode 100644 index 000000000..c22a199b6 --- /dev/null +++ b/contract-tests/dto/ToolCall/005.json @@ -0,0 +1,5 @@ +{ + "toolCallId": "call-4", + "toolName": "num", + "input": 123 +} diff --git a/contract-tests/dto/ToolCall/006.json b/contract-tests/dto/ToolCall/006.json new file mode 100644 index 000000000..aa4242dc7 --- /dev/null +++ b/contract-tests/dto/ToolCall/006.json @@ -0,0 +1,5 @@ +{ + "toolCallId": "call-5", + "toolName": "flag", + "input": true +} diff --git a/contract-tests/dto/ToolCall/007.json b/contract-tests/dto/ToolCall/007.json new file mode 100644 index 000000000..6f64952c2 --- /dev/null +++ b/contract-tests/dto/ToolCall/007.json @@ -0,0 +1,7 @@ +{ + "toolCallId": "call-7", + "toolName": "dup", + "input": { + "a": 2 + } +} diff --git a/contract-tests/dto/ToolCall/008.json b/contract-tests/dto/ToolCall/008.json new file mode 100644 index 000000000..4a275f106 --- /dev/null +++ b/contract-tests/dto/ToolCall/008.json @@ -0,0 +1,5 @@ +{ + "toolCallId": "call-8", + "toolName": "sci", + "input": 100 +} diff --git a/contract-tests/dto/ToolCall/009.json b/contract-tests/dto/ToolCall/009.json new file mode 100644 index 000000000..cbcddb4f6 --- /dev/null +++ b/contract-tests/dto/ToolCall/009.json @@ -0,0 +1,15 @@ +{ + "toolCallId": "call-9", + "toolName": "broken", + "input": "{\"a\":", + "invalid": true, + "error": { + "name": "AI_InvalidToolInputError", + "toolName": "broken", + "toolInput": "{\"a\":", + "cause": { + "name": "AI_JSONParseError", + "message": "Unexpected end of JSON input" + } + } +} diff --git a/contract-tests/dto/ToolCall/010.json b/contract-tests/dto/ToolCall/010.json new file mode 100644 index 000000000..6fe68255b --- /dev/null +++ b/contract-tests/dto/ToolCall/010.json @@ -0,0 +1,8 @@ +{ + "toolCallId": "call-10", + "toolName": "safeInt", + "input": { + "maxSafe": 9007199254740991, + "minSafe": -9007199254740991 + } +} diff --git a/contract-tests/dto/ToolCall/011.negative.json b/contract-tests/dto/ToolCall/011.negative.json new file mode 100644 index 000000000..fe51488c7 --- /dev/null +++ b/contract-tests/dto/ToolCall/011.negative.json @@ -0,0 +1 @@ +[] diff --git a/contract-tests/dto/index.json b/contract-tests/dto/index.json index 88b9bd677..7c09438c5 100644 --- a/contract-tests/dto/index.json +++ b/contract-tests/dto/index.json @@ -355,6 +355,11 @@ "type": "FinishReasonUnified", "file": "FinishReasonUnified/002.json" }, + { + "type": "FinishReasonUnified", + "file": "FinishReasonUnified/003.negative.json", + "expectError": true + }, { "type": "GenerateContent", "file": "GenerateContent/001.json" @@ -391,6 +396,11 @@ "type": "GenerateContent", "file": "GenerateContent/009.json" }, + { + "type": "GenerateContent", + "file": "GenerateContent/010.negative.json", + "expectError": true + }, { "type": "GenerateObjectResponse", "file": "GenerateObjectResponse/001.json" @@ -427,6 +437,21 @@ "type": "HandleId", "file": "HandleId/002.json" }, + { + "type": "HandleId", + "file": "HandleId/003.negative.json", + "expectError": true + }, + { + "type": "HandleId", + "file": "HandleId/004.negative.json", + "expectError": true + }, + { + "type": "HandleId", + "file": "HandleId/005.negative.json", + "expectError": true + }, { "type": "HandleIdInput", "file": "HandleIdInput/001.json" @@ -552,6 +577,25 @@ "type": "NamespacedKind", "file": "NamespacedKind/002.json" }, + { + "type": "OperationNextParams", + "file": "OperationNextParams/001.json" + }, + { + "type": "OperationNextParams", + "file": "OperationNextParams/002.negative.json", + "expectError": true + }, + { + "type": "OperationNextParams", + "file": "OperationNextParams/003.negative.json", + "expectError": true + }, + { + "type": "OperationNextParams", + "file": "OperationNextParams/004.negative.json", + "expectError": true + }, { "type": "Output", "file": "Output/001.json" @@ -564,6 +608,42 @@ "type": "RawToolCall", "file": "RawToolCall/001.json" }, + { + "type": "RawToolCall", + "file": "RawToolCall/002.json" + }, + { + "type": "RawToolCall", + "file": "RawToolCall/003.json" + }, + { + "type": "RawToolCall", + "file": "RawToolCall/004.json" + }, + { + "type": "RawToolCall", + "file": "RawToolCall/005.json" + }, + { + "type": "RawToolCall", + "file": "RawToolCall/006.json" + }, + { + "type": "RawToolCall", + "file": "RawToolCall/007.json" + }, + { + "type": "RawToolCall", + "file": "RawToolCall/008.json" + }, + { + "type": "RawToolCall", + "file": "RawToolCall/009.json" + }, + { + "type": "RawToolCall", + "file": "RawToolCall/010.json" + }, { "type": "ReasoningFilePartData", "file": "ReasoningFilePartData/001.json" @@ -824,6 +904,43 @@ "type": "ToolCall", "file": "ToolCall/002.json" }, + { + "type": "ToolCall", + "file": "ToolCall/003.json" + }, + { + "type": "ToolCall", + "file": "ToolCall/004.json" + }, + { + "type": "ToolCall", + "file": "ToolCall/005.json" + }, + { + "type": "ToolCall", + "file": "ToolCall/006.json" + }, + { + "type": "ToolCall", + "file": "ToolCall/007.json" + }, + { + "type": "ToolCall", + "file": "ToolCall/008.json" + }, + { + "type": "ToolCall", + "file": "ToolCall/009.json" + }, + { + "type": "ToolCall", + "file": "ToolCall/010.json" + }, + { + "type": "ToolCall", + "file": "ToolCall/011.negative.json", + "expectError": true + }, { "type": "ToolCallInput", "file": "ToolCallInput/001.json" diff --git a/docs/aisdk-architecture-alignment.md b/docs/aisdk-architecture-alignment.md index d5fba6abc..cdf06f607 100644 --- a/docs/aisdk-architecture-alignment.md +++ b/docs/aisdk-architecture-alignment.md @@ -1527,7 +1527,7 @@ providerOptions 的 namespace 不跟随 registry alias。将 `openai` 注册为 - RFC-0039 G-e:发布配置已将 ops 排在 FFI 前并打包头文件,但本文尚未提供所有平台产物的安装和运行验证,因为构建与打包定义不能证明发布验收完成([实现说明](rfc-0039-implementation.md#registered-gaps))。 - RFC-0039 G-f(部分关闭):静态包描述(`provider.descriptors`)、全部 329 个包的权威默认方法以及直接语言子方法分发(`Provider::language_model_with_api`、`provider.model`、`model.resolve`)均已交付;句柄粒度的完整构造来源、非语言类厂商扩展方法(`provider.invoke` 仍只接受 `listModels`)以及文本请求直接传字符串/registry 模型提升仍未提供,因为注册项仍保留规范 Arc 且文本请求仍要求已解析的模型句柄([实现说明](rfc-0039-implementation.md#registered-gaps))。 - RFC-0039 G-g:队列和线格式限制尚不能约束所有 provider 分配及 core 现有的无界文本转发队列,因为本层只控制已准入的数据,不改写 core 的流式内部实现([实现说明](rfc-0039-implementation.md#registered-gaps))。 -- RFC-0039 G-h:尚无逐业务类型的版本或哈希校验,因为消费类型元数据尚未完整实现;各绑定加载时已精确校验 ABI 版本、ops 版本和 manifest 摘要([实现说明](rfc-0039-implementation.md#registered-gaps))。 +- RFC-0039 G-h:已为全部清单类型生成逐类型 `revision` 与传递 `schemaHash`、`TYPE_SCHEMA_HASHES` 及绑定 load fallback 协商(`MANIFEST_DIGEST` 快速路径 + 校验 `TYPE_SCHEMA_HASHES` 全部类型匹配 `manifest.types[].schemaHash`),并补齐 DTO Schema 与跨语言 parity vectors;G-h 剩余范围包括原生 C 逐类型校验辅助函数(R116)、`hello`/`requiredTypeCapabilities` 消费类型子集协商(随 D10 延后),以及各平台安装产物与分发打包验证([实现说明](rfc-0039-implementation.md#registered-gaps))。 - RFC-0039 G-i:本文尚未建立八种语言的完整业务向量、同源发布、已安装 wheel 及全部平台 sanitizer/链接/安装验证证据,Dart Windows 流式调用也明确不支持,因为局部和替身测试不能证明完整矩阵通过([实现说明](rfc-0039-implementation.md#registered-gaps))。 - RFC-0039 G-k:旧 MockReplayModel 构造器尚无暴露给离线文本生成的替代入口,因为 `replay.create` 返回 ReplaySession、文本操作只接受 Language,而 `replay.live` 还需要调用者另行提供目标([实现说明](rfc-0039-implementation.md#registered-gaps))。 diff --git a/docs/api/c.md b/docs/api/c.md index fd32bb153..af9e7a3cf 100644 --- a/docs/api/c.md +++ b/docs/api/c.md @@ -6,7 +6,7 @@ > [ops ABI migration](../upgrading-to-ops-abi.md). The C ABI is shared by Swift, Kotlin, Flutter, Go, Java and C/C++. It exposes -14 primitives; operation names, versions and the manifest digest come from the +16 primitives (including `aimux_call_async` and `aimux_stream_async`); operation names, versions and the manifest digest come from the generated header. Results are JSON strings in a trailing out-parameter. Errors are one owned `aimux_error_t *` (`NULL` means success). @@ -115,7 +115,7 @@ if (err) { - `aimux_error_json` returns the full envelope, including `error.cause`. - Every output JSON string and error getter string is freed with `aimux_free_string`. -- Do not free callback JSON. +- Do not free stream callback frames (`aimux_stream`, `aimux_stream_async`); they are borrowed for the callback call. `aimux_call_async` completion callbacks own their `result_json` or `error` and must release it once with `aimux_free_string` or `aimux_error_free`. - `aimux_abi_version()` and `AIMUX_MANIFEST_DIGEST` let a consumer verify the loaded library before use. @@ -129,7 +129,10 @@ if (err) { are gone. Read the envelope with `aimux_error_json`. - Provider/model creation is `aimux_call(..., AIMUX_OP_PROVIDER_CREATE, ...)` followed by `AIMUX_OP_PROVIDER_MODEL`. -- The generated header and manifest digest must match the library. +- The generated header's `AIMUX_ABI_VERSION`, `AIMUX_OPS_VERSION`, and + `AIMUX_MANIFEST_DIGEST` match the native library (`aimux_abi_version()` and + `aimux_manifest_json()`, which also exposes `types[].schemaHash` if a C + consumer implements custom per-type schema hash checks; see RFC-0039 R116). ## See also diff --git a/docs/api/flutter.md b/docs/api/flutter.md index f9a081508..92353ee0d 100644 --- a/docs/api/flutter.md +++ b/docs/api/flutter.md @@ -56,8 +56,10 @@ await providerHandle.close(); ``` `call(op, handle:, params:, abort:)` accepts the canonical request DTO from the -manifest. Global operations omit `handle`. `Aimux.open()` checks the ABI major, -ops major, manifest structure and required operations before use. +manifest. Global operations omit `handle`. `Aimux.open()` checks ABI major +compatibility, the exact generated `opsVersion`, manifest compatibility +(`MANIFEST_DIGEST` fast-path or every `TYPE_SCHEMA_HASHES` entry against +`manifest.types[].schemaHash`), and any required operations before use. ## Handles and streams diff --git a/docs/api/node.md b/docs/api/node.md index bb2855641..0d5cc696e 100644 --- a/docs/api/node.md +++ b/docs/api/node.md @@ -103,7 +103,7 @@ try { are gone. - DTOs are generated from the Rust types; hand-written 0.5 wire types are removed. -- The runtime requires the exact ABI, ops version and manifest digest. +- The runtime requires the exact `ABI_VERSION`, exact `opsVersion`, and manifest compatibility (`MANIFEST_DIGEST` fast-path or full `TYPE_SCHEMA_HASHES` `schemaHash` fallback). ## See also diff --git a/docs/api/reference.md b/docs/api/reference.md index 74748160b..5de9d13e5 100644 --- a/docs/api/reference.md +++ b/docs/api/reference.md @@ -45,9 +45,13 @@ names. A typical sequence is: provider.create → provider.model → text.generate / text.stream / ... ``` -`runtime.describe` returns the manifest, ABI/ops versions, manifest digest and -the operation names available in the loaded native library. A binding must -reject a mismatched ABI, ops version or digest before any call. +`runtime.describe` returns the runtime version, ABI/ops versions, manifest +revision and digest, and the operation names, handle kinds, and provider +packages available in the loaded native library (full `types[].schemaHash` +metadata lives in the manifest JSON). Bindings reject an incompatible ABI (`ABI_VERSION` exact in +Node/Python/Java+Kotlin; major `>> 16` in Go/Swift/Flutter), mismatched exact +`opsVersion`, or incompatible manifest (`MANIFEST_DIGEST` fast-path with full +`TYPE_SCHEMA_HASHES` `schemaHash` fallback) before any call. ## Errors diff --git a/docs/api/swift.md b/docs/api/swift.md index 76914ef9e..24da8b6b2 100644 --- a/docs/api/swift.md +++ b/docs/api/swift.md @@ -102,7 +102,7 @@ delay from `error.responseHeaders`, not from a dedicated retry field. - Provider constructors such as `Model.openai(...)` and `Aimux.openai(...)` are removed; use `AimuxRuntime.open` / `AimuxHandle.open` with operation names. -- The binding requires the exact ABI, ops version and manifest digest. +- The binding checks ABI major compatibility, exact ops version, and manifest compatibility (`MANIFEST_DIGEST` fast-path or full `TYPE_SCHEMA_HASHES` `schemaHash` fallback). - Generated DTOs replace the 0.5 hand-written types. - Errors are the shared envelope with a native `cause` chain. diff --git a/docs/error-model.md b/docs/error-model.md index f998e0699..09d3980a1 100644 --- a/docs/error-model.md +++ b/docs/error-model.md @@ -28,7 +28,7 @@ |---|---|---| | `300` | `InvalidOp` | 操作名不存在或不在当前 manifest | | `301` | `InvalidParams` | 请求参数不是该操作的合法 DTO | -| `302` | `UnsupportedOpsVersion` | ABI、ops 版本或 manifest digest 不匹配 | +| `302` | `UnsupportedOpsVersion` | ABI、ops 版本、manifest digest 或 `TYPE_SCHEMA_HASHES` `schemaHash` 不匹配 | | `303` | `ConcurrentConsumer` | 同一 stream/operation 出现第二个消费者 | | `304` | `InvalidState` | 操作或 handle 当前状态不允许该调用 | | `305` | `ResourceLimit` | 队列、字节数或 admission 超过限制 | diff --git a/docs/release-matrix.md b/docs/release-matrix.md new file mode 100644 index 000000000..17ad0e598 --- /dev/null +++ b/docs/release-matrix.md @@ -0,0 +1,40 @@ +# Release & CI Platform Matrix + +This matrix records the exact build, test, packaging, and installation coverage +defined in [`.github/workflows/ci.yml`](../.github/workflows/ci.yml) and +[`.github/workflows/release.yml`](../.github/workflows/release.yml). +Cells that are cross-compiled without native execution, omitted from CI/release +workflows, or not installed from the published artifact are explicitly marked +`not run` (see [RFC-0039 registered gap G-e](rfc-0039-implementation.md#registered-gaps)). + +| Binding / Artifact | OS / Arch (Target) | Build | Test | Package | Install | +| --- | --- | --- | --- | --- | --- | +| Rust workspace crates (`aimux-stream`, `aimux-core`, `aimux-provider-utils`, `aimux-providers`, `aimux-ops`, `aimux-ffi`) | Linux `x86_64` (`ubuntu-latest`) | CI `rust-test` (`cargo clippy`, `cargo doc`, `cargo test --workspace`) | CI `rust-test` (`cargo test --workspace`) | Release `rust-publish` (`cargo publish -p ...`) | `not run` | +| `aimux-ffi` (`cdylib` + static archive) | Linux `x86_64` (`x86_64-unknown-linux-gnu`) | CI `ffi-build`, `c-abi-bindings`; Release `ffi-build` (`libaimux_ffi.so`) | CI `ffi-build` (C11/C++17), `c-abi-bindings` (ASan + LSan) | Release `ffi-build` (GitHub Release upload `libaimux_ffi.so`) | `not run` | +| `aimux-ffi` (`cdylib`) | Linux `aarch64` (`aarch64-unknown-linux-gnu`) | CI `ffi-linux-arm` (`cargo build --release`) | `not run` | `not run` (not in `release.yml` `ffi-build` matrix) | `not run` | +| `aimux-ffi` (`cdylib` + static archive) | macOS `aarch64` (`aarch64-apple-darwin`) | CI `ffi-build`; Release `ffi-build` (`libaimux_ffi.dylib`) | CI `ffi-build` (C11/C++17 ABI tests) | Release `ffi-build` (GitHub Release upload `libaimux_ffi.dylib`) | `not run` | +| `aimux-ffi` (`cdylib` + static archive) | Windows `x86_64` (`x86_64-pc-windows-msvc` / `-gnu` staticlib) | CI `ffi-build`; Release `ffi-build` (`aimux_ffi.dll`) | CI `ffi-build` (C11/C++17 ABI tests) | Release `ffi-build` (GitHub Release upload `aimux_ffi.dll`) | `not run` | +| Node (`aimux`) | Windows `x86_64` (`x86_64-pc-windows-msvc`) | CI `node-binding`; Release `node-build` (`napi build --release`) | CI `node-binding` (`npm test`, `npm run build:typed`, `check_dto_vectors.py node`) | Release `node-build` + `node-publish` (`npm publish`) | `not run` | +| Node (`aimux`) | Windows `aarch64` (`aarch64-pc-windows-msvc`) | CI `node-binding`; Release `node-build` (cross-compiled) | `not run` (`test: false` in CI `node-legs`) | Release `node-build` + `node-publish` (`npm publish`) | `not run` | +| Node (`aimux`) | macOS `x86_64` (`x86_64-apple-darwin`) | CI `node-binding`; Release `node-build` (cross-compiled on `macos-latest`) | CI `node-binding` under Rosetta (`npm test`, `npm run build:typed`, `check_dto_vectors.py node`) | Release `node-build` + `node-publish` (`npm publish`) | `not run` | +| Node (`aimux`) | macOS `aarch64` (`aarch64-apple-darwin`) | CI `node-binding`; Release `node-build` | CI `node-binding` (`npm test`, `npm run build:typed`, `check_dto_vectors.py node`) | Release `node-build` + `node-publish` (`npm publish`) | `not run` | +| Node (`aimux`) | Linux `x86_64` (`x86_64-unknown-linux-gnu`) | CI `node-binding`; Release `node-build` (glibc 2.17 `--use-napi-cross`) | CI `node-binding` (`cargo test --lib`, `npm test`, `build:typed`, `check_dto_vectors.py node`) | Release `node-build` + `node-publish` (`npm publish`) | `not run` | +| Node (`aimux`) | Linux `aarch64` (`aarch64-unknown-linux-gnu`) | CI `node-binding`; Release `node-build` (glibc 2.17 `--use-napi-cross`) | `not run` (`test: false` in CI `node-legs`) | Release `node-build` + `node-publish` (`npm publish`) | `not run` | +| Python (`aimux`) | Linux `x86_64` (`ubuntu-latest`) | CI `python-binding`; Release `python-release` (`maturin build --release`) | CI `python-binding` (`cargo test --lib`, `unittest`, `pytest`, `check_dto_vectors.py python`) | CI `maturin build` / Release `PyO3/maturin-action` (`publish`) | CI `python-binding` (`pip install --force-reinstall target/wheels/*.whl`; PyPI install `not run`) | +| Python (`aimux`) | macOS (`macos-latest`) | Release `python-release` (`PyO3/maturin-action`) | `not run` in CI (`python-binding` runs only on `ubuntu-latest`) | Release `python-release` (`publish`) | `not run` | +| Python (`aimux`) | Windows (`windows-latest`) | Release `python-release` (`PyO3/maturin-action`) | `not run` in CI (`python-binding` runs only on `ubuntu-latest`) | Release `python-release` (`publish`) | `not run` | +| Go (`bindings/go`) | Linux `x86_64` (`x86_64-unknown-linux-gnu`) | CI `ffi-build`; Release `go-build` (`staticlib-release`) | CI `ffi-build` (`go vet`, `go test ./...`, `go test -race ./...`, `check_dto_vectors.py go`) | Release `go-build` (`libaimux_ffi-x86_64-unknown-linux-gnu.a`) | `not run` | +| Go (`bindings/go`) | macOS `aarch64` (`aarch64-apple-darwin`) | CI `ffi-build`; Release `go-build` (`staticlib-release`) | CI `ffi-build` + Release `go-build` (`go vet`, `go test ./...`) | Release `go-build` (`libaimux_ffi-aarch64-apple-darwin.a`) | `not run` | +| Go (`bindings/go`) | macOS `x86_64` (`x86_64-apple-darwin`) | CI `ffi-build` (rehearsal on `macos-latest`); Release `go-build` (`staticlib-release` on `macos-15-intel`) | CI `ffi-build` (Rosetta smoke) + Release `go-build` (`go test ./...`) | Release `go-build` (`libaimux_ffi-x86_64-apple-darwin.a`) | `not run` | +| Go (`bindings/go`) | Windows `x86_64` (`x86_64-pc-windows-gnu`) | CI `ffi-build`; Release `go-build` (`staticlib-release`) | CI `ffi-build` + Release `go-build` (`go test ./...`) | Release `go-build` (`libaimux_ffi-x86_64-pc-windows-gnu.a`) | `not run` | +| Java (`bindings/java`, JDK 8/11/17/21) | Linux `x86_64` (`ubuntu-latest`) | CI `c-abi-bindings`; Release `jvm-publish` | CI `c-abi-bindings` (`gradle test` on JDK 8/11/17/21, `check_dto_vectors.py java`) | Release `jvm-publish` (`gradle publish` to Maven Central) | `not run` | +| Java (`bindings/java`) | macOS / Windows | `not run` | `not run` | `not run` | `not run` | +| Kotlin (`bindings/kotlin`, JDK 17/21) | Linux `x86_64` (`ubuntu-latest`) | CI `c-abi-bindings`; Release `jvm-publish` | CI `c-abi-bindings` (`gradle test` on JDK 17/21) | Release `jvm-publish` (`gradle publish` to Maven Central) | `not run` | +| Kotlin (`bindings/kotlin`) | macOS / Windows | `not run` | `not run` | `not run` | `not run` | +| Swift (`bindings/swift`) | macOS `aarch64` (`macos-latest`) | CI `swift-contract-tests` (`cargo build -p aimux-ffi --release`) | CI `swift-contract-tests` (`swift test`, `check_dto_vectors.py swift`) | `not run` (no Swift package release job in `release.yml`) | `not run` | +| Swift (`bindings/swift`) | Linux / macOS `x86_64` | `not run` | `not run` | `not run` | `not run` | +| Flutter / Dart (`bindings/flutter`) | Linux `x86_64` (`ubuntu-latest`) | CI `c-abi-bindings`; Release `flutter-publish` | CI `c-abi-bindings` + Release `flutter-publish` (`flutter test`, `flutter analyze`, `check_dto_vectors.py dart`) | Release `flutter-publish` (`flutter pub publish --force`) | `not run` | +| Flutter / Dart (`bindings/flutter` mobile) | Android (`arm64-v8a`, `armeabi-v7a`, `x86_64` on `ubuntu-latest`) | CI `flutter-example-build`; Release `flutter-ffi-mobile` (`cargo-ndk`, `flutter build apk`) | CI `flutter-example-build` (`flutter test` example widget/unit on host; on-device Android `not run`) | Release `flutter-ffi-mobile` + `flutter-publish` (embeds `.so` in pub.dev package) | `not run` | +| Flutter / Dart (`bindings/flutter` mobile) | iOS (`aarch64-apple-ios`, `aarch64-apple-ios-sim`, `x86_64-apple-ios` on `macos-latest`) | CI `flutter-example-build`; Release `flutter-ffi-mobile` (`build-ios-xcframework.sh`, `flutter build ios`) | CI `flutter-example-build` (`flutter test` example on host; on-device iOS `not run`) | Release `flutter-ffi-mobile` + `flutter-publish` (embeds `.xcframework` in pub.dev package) | `not run` | +| Flutter / Dart (`bindings/flutter` desktop) | macOS / Windows desktop | `not run` (Dart Windows streaming explicitly unsupported per G-i) | `not run` | `not run` | `not run` | +| Console / CLI (`aimux-web`, `aimux-cli`, `aimux-replay`) | Linux `x86_64`, macOS `aarch64`, Windows `x86_64` | CI `contract-tests` (`vue-tsc`); Release `console-build` (`npm run build`, `cargo build --release`) | CI `contract-tests` (`vue-tsc --noEmit`; Rust tests in `rust-test`; runtime binary execution `not run`) | Release `console-build` + `github-release` | `not run` | diff --git a/docs/rfc-0039-conformance.md b/docs/rfc-0039-conformance.md index 953cad019..28fc5aa94 100644 --- a/docs/rfc-0039-conformance.md +++ b/docs/rfc-0039-conformance.md @@ -18,7 +18,7 @@ only evidence of the narrower behavior its name describes. All `path#test` references below name tests present in this tree, including macro-emitted tests. Paths into source modules identify embedded unit tests. The [implementation document](rfc-0039-implementation.md#registered-differences-from-rfc-0039) -defines D1–D19, G-a–G-i and G-k; these are not waivers declaring release readiness. +defines D1–D21, G-a–G-i and G-k; these are not waivers declaring release readiness. The [coverage ledger](rfc-0039-coverage-ledger.md) covers old APIs separately. Generated-output tests exist; this documentation audit does not claim they @@ -246,26 +246,26 @@ unless explicitly labelled as a file-level reference. | R106 | §6.3 | Redact default errors, trace and recordings; refresh-token/credential payloads never enter generic debug dumps; capture policy follows RFC-0041. | trace | gap — [G-b](rfc-0039-implementation.md#registered-gaps): Current canonical redaction remains; full future recording policy and secret-path audit are not established by the cited test. | | R107 | §6.3 | For future stdio disconnect/write failure, expose transport failure/unknown outcome rather than success or redelivery; cancel unterminated operations and record incomplete reason. | stream | gap — [D10](rfc-0039-implementation.md#registered-differences-from-rfc-0039): Stdio disconnect/write-failure behavior is deferred. | | R108 | §7.1 | Reject ABI major mismatch at load; minor additions cannot alter existing layout/calling convention/ownership. | java | met | -| R109 | §7.1 | opsVersion is major.minor with explicit supported type revisions/capabilities; same major is required; highest-common-minor selection applies only to future hello negotiation. | metadata | gap — [G-h](rfc-0039-implementation.md#registered-gaps): opsVersion exists; consumed-business-type revision/capability negotiation metadata does not. | -| R110 | §7.1 | Manifest revision/digest identify canonical sorted-key JSON SHA-256, not another protocol version or proof of binary equality. | digest | met | +| R109 | §7.1 | opsVersion is major.minor with explicit supported type revisions/capabilities; same major is required; highest-common-minor selection applies only to future hello negotiation. | metadata | gap — [D10/G-h](rfc-0039-implementation.md#registered-gaps): `opsVersion` (`1.0`) and per-type `revision` (`"1"`) / transitive `schemaHash` metadata exist in `manifest.types[]` and generated `TYPE_SCHEMA_HASHES`, while explicit `hello` `requiredTypeCapabilities` and multi-minor selection remain deferred (D10). | +| R110 | §7.1 | Manifest revision/digest identify canonical sorted-key JSON SHA-256, not another protocol version or proof of binary equality. | digest | met — Self-verification of `schema/manifest.json` strips both `digest` and `inputHash` and sorts `ops` by `name` and all object keys before computing compact-JSON SHA-256 (`aimux_ops::manifest::canonical_digest`). | | R111 | §7.1 | Recording schema is independently owned by RFC-0041; only new recordings are readable; no extra live-ops handshake version. | recordingschema | gap — [G-b](rfc-0039-implementation.md#registered-gaps): Writers use schema 2 and readers accept schemas 1 and 2; schema 3 and removal of old-schema reading are scheduled for a separate follow-up PR after #268, before the release, under RFC-0041. | -| R112 | §7.1 | Manifest records RFC-0042 schema/type revision and pinned SDK baseline; no dataFormatVersion/data_format_version handshake; JSON parseability does not establish variant compatibility. | types | gap — [G-h](rfc-0039-implementation.md#registered-gaps): The manifest carries `manifestRevision` and a digest, and every adapter pins the ABI version, ops version and digest at load, but it records no RFC-0042 type revision or hash and no pinned SDK baseline; G-h owns the missing per-type metadata. | +| R112 | §7.1 | Manifest records RFC-0042 schema/type revision and pinned SDK baseline; no dataFormatVersion/data_format_version handshake; JSON parseability does not establish variant compatibility. | types | met — The manifest carries `manifestRevision`, `generatorVersion`, `sources` (pinned upstream SDK versions/integrity from `fixtures/aisdk/VERSIONS.json` via `aimux-ops/src/sources.rs`), and per-type `revision` + transitive `schemaHash` in `manifest.types[]` (and `inputHash` in `schema/manifest.json`); no `dataFormatVersion` handshake exists. | | R113 | §7.2 | Future stdio starts with hello and decimal-string request ID; examples do not claim implementation. | schema | gap — [D10](rfc-0039-implementation.md#registered-differences-from-rfc-0039): Stdio hello/request-ID transport is deferred. | | R114 | §7.2 | Future hello returns chosen version/type capabilities/digest/supportedOps/flags/minimum limits and projects exact negotiated control schema; never ignore unknown controls. | schema | gap — [D10](rfc-0039-implementation.md#registered-differences-from-rfc-0039): Stdio negotiation and negotiated schema projection are deferred. | | R115 | §7.2 | Future hello rejects/closes on no common version, missing requiredOp or unavailable type capability; no legacy downgrade and no provider work before handshake. | schema | gap — [D10](rfc-0039-implementation.md#registered-differences-from-rfc-0039): No stdio handshake implementation exists. | -| R116 | §7.2 | FFI bindings and raw C initialize by checking ABI then manifest, exact current/expected ops version and consumed schema revision/hash; reject mismatch with no implicit minor negotiation. | gen | gap — [G-h](rfc-0039-implementation.md#registered-gaps): ABI/ops loaders exist; consumed-business-type revision/hash checks are unavailable. | -| R117 | §7.2 | Bundled Node/Python also check generated-product consistency and expose version/digest; co-packaging does not waive drift checks. | gen | met — Node and Python require the exact generated ABI version, ops version and manifest digest at load. | -| R118 | §7.2 | Unconsumed package/catalogue metadata changes need not change consumed type hash; only explicit future stdio hello offers minor projection. | gen | gap — [G-h](rfc-0039-implementation.md#registered-gaps): No per-consumed-business-type hashes exist; metadata independence is not testable yet. | +| R116 | §7.2 | FFI bindings and raw C initialize by checking ABI then manifest, exact current/expected ops version and consumed schema revision/hash; reject mismatch with no implicit minor negotiation. | gen | gap — [G-h](rfc-0039-implementation.md#registered-gaps): Node, Python, Go, Java (+ Kotlin), Swift and Flutter all check `abiVersion`, exact `opsVersion`, and either exact `MANIFEST_DIGEST` or every generated `TYPE_SCHEMA_HASHES` entry against `manifest.types[].schemaHash`, rejecting mismatches with no minor projection; raw C callers (`aimux-ffi/include/aimux.h`) still only receive `AIMUX_ABI_VERSION`, `AIMUX_OPS_VERSION`, and `AIMUX_MANIFEST_DIGEST` without a built-in per-type JSON hash helper. | +| R117 | §7.2 | Bundled Node/Python also check generated-product consistency and expose version/digest; co-packaging does not waive drift checks. | gen | met — Node and Python check exact ABI/ops versions and either `MANIFEST_DIGEST` or all generated `TYPE_SCHEMA_HASHES` against `manifest.types[].schemaHash` at load (and Python's `verify_contract(expected_digest)` preserves explicit digest pinning). | +| R118 | §7.2 | Unconsumed package/catalogue metadata changes need not change consumed type hash; only explicit future stdio hello offers minor projection. | gen | gap — [D10/G-h](rfc-0039-implementation.md#registered-gaps): Each `manifest.types[]` `schemaHash` hashes only transitively reachable `typeDefs`, and all six binding negotiation suites verify load succeeds when `packages`/`digest` change while `types[].schemaHash` matches; bindings check the full `TYPE_SCHEMA_HASHES` table rather than an individual consumed-type subset, and stdio `hello` minor projection remains deferred (D10). | | R119 | §7.3 | Generate JSON Schema 2020-12 from manifest with stable resolving $id/type-ID refs and disjoint oneOf discriminators. | schema, controls, typeschemas | met — [D17](rfc-0039-implementation.md#registered-differences-from-rfc-0039): Generation and resolution are met; untagged unions are ordered rather than disjoint by design. `aimux-codegen` emits `schema/ops/*.json` and one `schema/types/.json` per business type (300 files, listed in `tools/aimux-codegen/generated-files.json`), each with a stable `$id` under `https://aimux.dev/schema/` and relative `$ref`s that resolve locally; drift fails the CI step "Ops manifest and generated artifact drift". Tagged unions are `oneOf` branches with a literal string `type` tag, and the generator rejects a tagged union whose branches lack one (`tools/aimux-codegen/src/model.rs`). Untagged unions are `anyOf` marked `x-aimux-codec: ordered-untagged` and decode by first match (`TestUntaggedObjectBranchSelection`), so their branches are ordered, not disjoint. | | R120 | §7.3 | Controls set additionalProperties:false; explicitly open providerOptions/metadata/JSON values; never globally strip private provider data. | schema, controls | met | -| R121 | §7.3 | Provide schemas and positive/negative vectors for requests/results/events/end/errors, all handles/options missing/null, integer ranges, base64 bytes, time strings and modalities. | schema, controls, dtovectors, dtocheck | gap — [G-i](rfc-0039-implementation.md#registered-gaps): Schemas exist for all 300 business types and the control schemas. `contract-tests/dto` holds 240 positive round-trip vectors for 101 types, covering request, result, event, end and error shapes (for example `StreamFrame`, `ErrorEnvelope`, the modality results, `HandleId`, `Timestamp`, base64 bytes). The other types have no vector, and the corpus has no negative vectors; rejections are covered by per-binding unit tests and the schema tests in `tools/aimux-codegen/tests/generation.rs`. | +| R121 | §7.3 | Provide schemas and positive/negative vectors for requests/results/events/end/errors, all handles/options missing/null, integer ranges, base64 bytes, time strings and modalities. | schema, controls, dtovectors, dtocheck | gap — [G-i](rfc-0039-implementation.md#registered-gaps): Schemas exist for all 300 business types and the control schemas. `contract-tests/dto` holds 270 vectors across 102 types (261 positive round trips plus 9 `expectError` negative vectors covering `OperationNextParams`, `HandleId`, `FinishReasonUnified`, `GenerateContent`, and `ToolCall`, as well as `RawToolCall`/`ToolCall` tool inputs); the remaining types lack corpus vectors and negative coverage relies partly on per-binding unit tests and `tools/aimux-codegen/tests/generation.rs`. | | R122 | §7.3 | Schema validation does not replace live-handle, capability, state-machine or reentrancy runtime validation; duplicate request-ID checks belong to future request transport. | matrix | met | -| R123 | §7.3 | Unknown business unions fail explicitly rather than decode to empty content; unknown-error projections preserve raw values without executing unknown behavior. | unknown, schema, pydto, dartdto | gap — [G-i](rfc-0039-implementation.md#registered-gaps): Generated Go decoders (`bindings/go/types_gen.go`), Python (`test_dto_types.py`), Dart (`dto_codec_test.dart`) reject unknown union tags, Swift rejects retired ones (`WireTests.swift`), and shared unknown errors survive. Node exposes declarations without a codec, so it does not reject them ([D16](rfc-0039-implementation.md#registered-differences-from-rfc-0039)). No common unknown-error class or per-language evidence for every business union is supplied, and the vectors contain no unknown-tag cases. | -| R124 | §7.3 | Different major, unsupported type capability or changed meaning of the same op must fail compatibility tests. | unknown, schema | gap — [G-h](rfc-0039-implementation.md#registered-gaps): ABI/ops mismatch tests exist; unsupported business-type capability checks cannot run without metadata. | +| R123 | §7.3 | Unknown business unions fail explicitly rather than decode to empty content; unknown-error projections preserve raw values without executing unknown behavior. | unknown, schema, pydto, dartdto | gap — [G-i](rfc-0039-implementation.md#registered-gaps): Generated Go (`bindings/go/types_gen.go`), Python (`test_dto_types.py`), Dart (`dto_codec_test.dart`), Java (`DtoTypes`), Swift (`WireTests.swift`), and Node's vector validator (`NODE_VALIDATOR` in `bindings/node/src/generated/dto_vectors.ts`) reject unknown union tags (covered by `GenerateContent/010.negative.json` and `FinishReasonUnified/003.negative.json`), while Node's runtime facade exposes declarations without a codec ([D16](rfc-0039-implementation.md#registered-differences-from-rfc-0039)). No common unknown-error class or per-language evidence for every business union is supplied. | +| R124 | §7.3 | Different major, unsupported type capability or changed meaning of the same op must fail compatibility tests. | unknown, schema | gap — [D10/G-h](rfc-0039-implementation.md#registered-gaps): ABI/ops mismatch and per-type `schemaHash` mismatch tests exist across all six bindings; `requiredTypeCapabilities` remains deferred until stdio `hello` (D10). | | R125 | §7.3 | Future negotiated old minor sends exactly that control schema; missing requiredOps fails. | unknown, schema | gap — [D10](rfc-0039-implementation.md#registered-differences-from-rfc-0039): Negotiated old-minor stdio projection is deferred. | -| R126 | §9 | Expose Provider, Registry, typed models, Operation/stream, Abort, devtools and structured errors; typed and raw JSON layers behave identically. | inventory, dtovectors | gap — [G-i](rfc-0039-implementation.md#registered-gaps): Current resources expose the ops and every binding has generated typed DTOs, but typed/raw equivalence is checked only for the 101 vector types (positive round trips), not for every business DTO or modality. | +| R126 | §9 | Expose Provider, Registry, typed models, Operation/stream, Abort, devtools and structured errors; typed and raw JSON layers behave identically. | inventory, dtovectors | gap — [G-i](rfc-0039-implementation.md#registered-gaps): Current resources expose the ops and every binding has generated typed DTOs, but typed/raw equivalence is checked only for the 102 vector types (261 positive + 9 negative vectors), not for every business DTO or modality. | | R127 | §9.1 | Generate aimux.h/op constants/opaque error and ownership comments; C++ examples use RAII for owned strings/errors/handles with no exception crossing ABI. | gen, exports | met | -| R128 | §9.1 | Named provider/model convenience APIs implement the new contract; old aimux_openai_new-style symbols disappear and exact export allowlist is published. | gen, exports | met | +| R128 | §9.1 | Named provider/model convenience APIs implement the new contract; old aimux_openai_new-style symbols disappear and exact export allowlist is published. | gen, exports | gap — [G-c/D10](rfc-0039-implementation.md#registered-differences-from-rfc-0039): Legacy `aimux_openai_new`-style exports are removed and the exact 16-symbol export allowlist is enforced (`aimux-ffi/tests/exports_smoke_test.rs`), while `aimux-ffi/include/aimux.h` intentionally exports only the 16 C ABI primitives and `AIMUX_OP_*` constants per §0.1.3 rather than named provider/model C convenience wrappers. | | R129 | §9.1 | Run C11/C++ compile/link/runtime, every error free, NULL output sentinels, invalid UTF-8, oversized length, callback lifetime, drop races, full wrong-kind matrix and ASan/LSan; distinguish cross-compile from executed targets. | abi, callback | gap — [G-e/G-i](rfc-0039-implementation.md#registered-gaps): Native tests exist; all-platform runtime/ASan/LSan and accepted live callback coverage are incomplete. | | R130 | §9.2 | Keep cgo; explicit Close and runtime.KeepAlive guard native resources; context cancellation aborts; cgo.Handle stores only callback context and no retained Go pointers in Rust. | goclose | met | | R131 | §9.2 | Use bounded Go channel, producer as only closer, Err readable only after close, and cancellation-select on full-queue callback send. | go | met | @@ -315,12 +315,12 @@ unless explicitly labelled as a file-level reference. | R175 | §11.1 | Consumer migration requires full provider/runtime/devtools/C/eight-binding/CLI/Web/replay dependency closure, successful builds and zero old direct paths. | exports, gencheck | gap — [G-e/G-i](rfc-0039-implementation.md#registered-gaps): Consumer source migration is not an all-platform build/install result; the obsolete Node benchmark package has been removed. | | R176 | §11.1 | Behavior verification requires same-SHA behavior and performance evidence for errors/terminal/cancel/backpressure/ownership/all-modalities/devtools; known failures have fixes, never hidden skips. | exports, gencheck | gap — [G-e/G-i](rfc-0039-implementation.md#registered-gaps): Complete same-source behavior/performance evidence is absent. | | R177 | §11.1 | Final cutover removes old exports/headers/getters/constructors/old-only tests atomically with replacement coverage, symbol diff, installed-package smoke and asset manifest. | exports, gencheck | gap — [G-e/G-i/G-k](rfc-0039-implementation.md#registered-gaps): Export deletion is tested; installed assets, complete replacement coverage and offline mock-model migration remain incomplete. | -| R178 | §11.1 | Release packaging builds all packages/binaries from one SHA with breaking guide and per-asset checksums/ABI/ops/type/manifest identity. | exports, gencheck | gap — [G-e/G-h](rfc-0039-implementation.md#registered-gaps): No complete published asset manifest with verified type identity/install results is supplied. | +| R178 | §11.1 | Release packaging builds all packages/binaries from one SHA with breaking guide and per-asset checksums/ABI/ops/type/manifest identity. | exports, gencheck | gap — [G-e/G-h](rfc-0039-implementation.md#registered-gaps): Per-type `revision`/`schemaHash` and `TYPE_SCHEMA_HASHES` exist in the manifest and generated bindings, while a complete published asset manifest with per-platform checksums and install evidence is not supplied. | | R179 | §11.1 | Schema, consumer, behavior and cutover changes may be separate integration commits, never per-language compatibility releases; merge/replay parallel mainline changes and rerun all gates before publication. | exports, gencheck | gap — [G-e/G-i](rfc-0039-implementation.md#registered-gaps): No final publication/rebase gate record is supplied. | | R180 | §11.2 | Maintain coverage ledger for every old public capability → new op/type/facade/test; deleting provider symbols cannot delete trace/session/recording capabilities. | exports, gencheck | gap — [G-i/G-k](rfc-0039-implementation.md#registered-gaps): The ledger maps all old declarations but explicitly records partial equivalence and offline replay gaps. Business DTOs are now generated, but per-DTO raw/typed equivalence is not exhaustive (G-i) and the old mock-model constructor has no replacement (G-k). | | R181 | §11.2 | Maintain automated deletion ledger for old symbols/headers/imports/dependency edges; name replacement test before deleting old-only test; line-count reduction is not acceptance. | exports, gencheck | gap — [G-i](rfc-0039-implementation.md#registered-gaps): Symbol/file deletion tests exist; exhaustive old-only-test equivalence and dependency-edge deletion are not proved. | | R182 | §11.2 | Release matrix records build/test/package/install separately for every supported OS/arch/library/package, including C/C++, Swift modulemap, Flutter iOS force-link, JNA native, Go linking, Node prebuild and Python wheel. | exports, gencheck | gap — [G-e](rfc-0039-implementation.md#registered-gaps): Build/test/package/install results are incomplete for the full release matrix. | -| R183 | §11.2 | Every asset carries identical source SHA, ABI/ops/type revision, recording schema and manifest digest; Kotlin pins same-series Java; reject accidental old native loads. | exports, gencheck | gap — [G-e/G-h](rfc-0039-implementation.md#registered-gaps): Kotlin pins Java; all asset/type-revision identity and install evidence are incomplete. | +| R183 | §11.2 | Every asset carries identical source SHA, ABI/ops/type revision, recording schema and manifest digest; Kotlin pins same-series Java; reject accidental old native loads. | exports, gencheck | gap — [G-e/G-h](rfc-0039-implementation.md#registered-gaps): Kotlin pins Java, and all seven binding constant files carry `ABI_VERSION`, `OPS_VERSION`, `MANIFEST_DIGEST`, and `TYPE_SCHEMA_HASHES`; source-SHA asset/install evidence across every release platform remains incomplete. | | R184 | §11.2 | Regression evidence contains shared vectors, wrong-kind tables, terminal/full-queue cancel, GIL/event-loop/UI heartbeats, resource counts and RFC-0038 reports. | exports, gencheck | gap — [G-e/G-i](rfc-0039-implementation.md#registered-gaps): Narrow local tests do not provide the full same-source platform/performance bundle. | | R185 | §11.2 | Breaking guide states removed one-shot factories/settings/aliases/old wire/recording readers, new provider→model examples and upgraded calls; do not add compatibility adapter or data migrator. | recordingschema | gap — [G-b](rfc-0039-implementation.md#registered-gaps): The guide states schema-2 writing and schema-1/2 reading; schema 3 and removal of old-schema reading are scheduled for a separate follow-up PR after #268, before the release, under RFC-0041. | | R186 | §11.2 | Never declare cutover complete while a required language is unmigrated, a supported platform is build-only, or an asset is unverified; support reduction needs separate accepted product decision, never automatic skip. | exports | gap — [G-e](rfc-0039-implementation.md#registered-gaps): No complete release/cutover acceptance is claimed. | @@ -335,7 +335,7 @@ unless explicitly labelled as a file-level reference. | R195 | §11.5 | Before 1.0, obtain separate signoff on every freeze criterion below; elapsed stability alone is insufficient. | inventory, exports | gap — [G-e](rfc-0039-implementation.md#registered-gaps): No 1.0 per-criterion signoff is supplied. | | R196 | §11.5 | Freeze requires ops-v1 golden semantics for op/kind/ownership/thread/reentrancy/error code/cancel/terminal/backpressure/version rules. | inventory, exports | gap — [G-e/G-i](rfc-0039-implementation.md#registered-gaps): Local golden semantics are not full candidate freeze approval. | | R197 | §11.5 | Freeze requires ABI-v1 header/exports/calling-convention/loader-mismatch tests and installed verification on every publicly supported platform. | inventory, exports | gap — [G-e](rfc-0039-implementation.md#registered-gaps): Every public platform still needs ABI install verification. | -| R198 | §11.5 | Freeze registers RFC-0042 V4 schema/type revision in manifest; never silently replace V4/V5 business shapes via ops minor; recording schema is independent with documented upgrade impact. | inventory, exports | gap — [G-h](rfc-0039-implementation.md#registered-gaps): The manifest has `manifestRevision` and a digest, but no RFC-0042 V4 type revision or per-type hash; G-h records the missing metadata. | +| R198 | §11.5 | Freeze registers RFC-0042 V4 schema/type revision in manifest; never silently replace V4/V5 business shapes via ops minor; recording schema is independent with documented upgrade impact. | inventory, exports | met — The manifest records `manifestRevision`, `generatorVersion`, `sources` (pinned AI SDK baseline), and per-type `revision` + transitive `schemaHash` in `manifest.types[]` (with `inputHash` in `schema/manifest.json`), while recording schema remains independently managed under RFC-0041. | | R199 | §11.5 | If 1.0 promises stdio, its acceptance checks must pass first; otherwise record accepted reduced 1.0 scope before release; schema files alone cannot prove stdio support. | inventory, exports | gap — [D10/G-e](rfc-0039-implementation.md#registered-gaps): No accepted stdio/reduced-1.0 release scope is certified. | | R200 | §11.5 | L0/L1 stable boundaries come from RFC-0040/#200 decisions; do not freeze unapproved passthrough or host injection. | inventory, exports | gap — [G-f/G-e](rfc-0039-implementation.md#registered-gaps): No full stable-boundary freeze approval is supplied. | | R201 | §11.5 | Native cutover must already be atomically complete; no shadow old exports, compatibility aliases or dual generator chains. | inventory, exports | gap — [G-e/G-k](rfc-0039-implementation.md#registered-gaps): The dual generator chain is gone (ts-rs and `scripts/gen_ts_types.py` removed; one `aimux-codegen`), and export deletion is covered by the exports tests. Release installation of every platform asset (G-e) and the offline mock-model replacement (G-k) remain. | @@ -346,9 +346,13 @@ unless explicitly labelled as a file-level reference. Run the named suites on the candidate source, record fixture versus actual native-library execution, and retain failures/skips as gaps. G-d is closed by -#268 (generated business schemas and DTOs); G-h needs per-type revision -metadata and loader checks, and cannot be closed by renaming type IDs. G-e/G-i need separate build/test/package/install records for -each supported OS/architecture/package, plus the RFC-0038 reports. Stdio needs +#268 (generated business schemas and DTOs); G-h is narrowed by #517 (which adds +per-type `revision` and transitive `schemaHash`, `generatorVersion`, `sources`, +`schema/manifest.json` with `inputHash`, and `TYPE_SCHEMA_HASHES` load +negotiation across the six bindings) and still requires raw C per-type helper +checks or explicit `hello` `requiredTypeCapabilities` if advertised. G-e/G-i +need separate build/test/package/install records for each supported +OS/architecture/package, plus the RFC-0038 reports. Stdio needs its separate transport implementation and tests. G-k needs an exposed offline mock Language generation path with replacement tests, or an accepted explicit capability removal; replay.live is not an equivalent offline path. diff --git a/docs/rfc-0039-coverage-ledger.md b/docs/rfc-0039-coverage-ledger.md index c086f537c..8e45e075d 100644 --- a/docs/rfc-0039-coverage-ledger.md +++ b/docs/rfc-0039-coverage-ledger.md @@ -290,9 +290,12 @@ a workaround because replay.capabilities currently fails (G-c). Writers use schema 2 and readers accept schemas 1 and 2; migration to schema 3 and removal of old-schema reading are scheduled for a separate follow-up PR after -#268, before the release, under RFC-0041 (G-b). Process-wide capture remains G-a. Generated-output tests -exist, but this audit does not claim a successful run; per-business-type hash -checks remain G-h. Installed assets, platform +#268, before the release, under RFC-0041 (G-b). Process-wide capture remains G-a. Generated-output tests, +per-type `revision`/`schemaHash` emission (`TYPE_SCHEMA_HASHES` + fallback +negotiation), and DTO schema/vector suites exist; remaining G-h scope covers +a raw C per-type helper (R116), `hello`/`requiredTypeCapabilities` subset +negotiation (deferred under D10), and installed-asset/platform-packaging +verification. Installed assets, platform execution, successful token refresh, exhaustive eight-language wire vectors and old-only-test equivalence are not proved by this inventory (G-d/G-e/G-i). See the [registered gaps](rfc-0039-implementation.md#registered-gaps) and diff --git a/docs/rfc-0039-implementation.md b/docs/rfc-0039-implementation.md index 9609fd466..12e37c2f6 100644 --- a/docs/rfc-0039-implementation.md +++ b/docs/rfc-0039-implementation.md @@ -214,7 +214,7 @@ Recording requires explicit `capturePolicy: "full"`; there is no audit-only recording format. Trace stores support off/shared/strict audit policy; trace middleware inherits it unless disabled/shared/strict is supplied explicitly. -## C ABI: fourteen exports +## C ABI: sixteen exports The generated authority is [aimux.h](../aimux-ffi/include/aimux.h); implementations are in `aimux-ffi/src/abi.rs`. All fallible functions return NULL on success or @@ -226,6 +226,8 @@ an owned `aimux_error_t*` on failure. Outputs are reset before validation. | `aimux_manifest_json(char **out_json)` | Allocates manifest JSON. | | `aimux_call(uint64_t, const char*, const char*, uint64_t, char**)` | Blocking call; last handle is optional Abort (0 = none). | | `aimux_stream(uint64_t, const char*, const char*, uint64_t, aimux_event_cb, void*)` | Blocking stream; callback receives borrowed frame JSON and context. | +| `aimux_call_async(uint64_t, const char*, const char*, uint64_t, aimux_call_callback_t, void*)` | Non-blocking call; invokes callback once on a runtime thread with owned result JSON or error. | +| `aimux_stream_async(uint64_t, const char*, const char*, uint64_t, aimux_event_batch_callback_t, void*)` | Non-blocking stream; validates acceptance synchronously and delivers ordered borrowed frame batches ending with a standalone End frame. | | `aimux_operation_push(uint64_t, const uint8_t*, size_t)` | Validates and copies/consumes input before return; NULL is valid only with length 0. | | `aimux_operation_next_part(uint64_t, int64_t, char**, int32_t*)` | Nonnegative timeout; PART=1 allocates JSON; ENDED=2/TIMEOUT=3 allocate none; errors clear both outputs. | | `aimux_abort(uint64_t)` | Callback-safe signal without block_on; invalid handles are ignored. | @@ -241,10 +243,12 @@ The pointer-encoded finalizer token is limited to uintptr_t width. Dart uses its own allocated uint64 token and native queue trampoline on 32-bit targets. Inputs are borrowed NUL-terminated UTF-8. Do not pass invalid owned pointers, -double-free, or omit terminators: these are caller violations. Free every owned -JSON/getter string with aimux_free_string and every owned error with -aimux_error_free; never free callback JSON. Copy callback bytes before return -and retain context until aimux_stream returns. Blocking reentry, including from +double-free, or omit terminators: these are caller violations. Free every owned JSON/getter string with `aimux_free_string` and every owned error with +`aimux_error_free`. Stream callbacks (`aimux_stream` and `aimux_stream_async`) receive +borrowed frames that must never be freed; copy any retained bytes before return. +`aimux_call_async` completion callbacks receive an owned `result_json` or `error` and +must release it once with `aimux_free_string` or `aimux_error_free`. Retain context until +the stream finishes or the final async callback returns. Blocking reentry, including from a Tokio caller, returns ReentrantCall. Abort is safe inside a callback. Host exceptions must be latched by adapters and raised after native return; a callback that never returns cannot be forcibly interrupted. @@ -334,7 +338,10 @@ Recorder I/O uses spawn_blocking, and registry locks do not cross await/join. ⑤ language loaders/bridges + handwritten facades consume shared dispatch/ABI ``` -The digest excludes its own digest field; array order is preserved. Each type +The digest removes top-level `digest` (and `inputHash` in emitted +`schema/manifest.json`), sorts `ops` by `name`, and recursively sorts all +object keys before hashing compact UTF-8 JSON with SHA-256 (non-`ops` arrays +preserve their order). Each type entry has an ID and Rust path; ops-owned controls/wrappers carry schemas and embedded business fields have x-aimux-type references. Schema IDs use JSON Schema 2020-12 with local resolvable refs. Strict controls reject unknown keys while @@ -358,9 +365,13 @@ and tested against the primitive signatures, not emitted by aimux-codegen. The generated file set is checked against the live manifest by the commands below; this documentation audit does not claim a successful generator run. -Every adapter requires the exact generated ABI version, ops version and manifest -digest at load. No adapter can claim per-consumed-business-type hash validation -until that metadata exists. Schema presence does not validate live handles, +At load, Node, Python, and Java (+ Kotlin) check the exact `ABI_VERSION` while Go, +Swift, and Flutter check ABI major compatibility (`>> 16`), and every adapter checks exact +`opsVersion`. For +manifest compatibility, adapters prefer an exact generated `MANIFEST_DIGEST` +match and fall back to verifying every entry in the generated `TYPE_SCHEMA_HASHES` +table against `manifest.types[].schemaHash` (per-type `revision` and transitive +`schemaHash` metadata live in `schema/manifest.json`). Schema presence does not validate live handles, owner isolation, capabilities or state transitions. ## Verification gates @@ -417,6 +428,7 @@ inventory; the canonical business error union remains owned by RFC-0042. - **D18 — JNA declarations (§9.3):** The Java binding's JNA declarations for the 14 C ABI primitives (`bindings/java/src/main/java/ai/arcships/aimux/AimuxFFI.java`) are written by hand; `AbiContractTest` pins the exact set of 14 primitives and the portable `size_t` width and exercises them against the C fixture library; the generator owns the header, constants and DTOs. The primitive set is small and frozen with the ABI version, so a generated copy would add an emitter without removing a source of drift. - **D19 — Reference docs (§10.1, §10.2):** API reference pages under `docs/api/` are handwritten prose that links to the generated type files; only `docs/api/providers.md` is generated, by `scripts/gen_providers_doc.py`, and checked by the CI step "Providers doc generator drift". `aimux-codegen --check` therefore covers every generated code, schema and constant file but no document table. - **D20 — Provider descriptors and config-driven registry operations:** Four additional operations (`provider.descriptors`, `registry.fromConfig`, `registry.list`, `registry.update`) extend the runtime manifest beyond the Decision addition (`D2`, 72 operations) to 76 operations so callers can inspect static `PackageDescriptor` metadata for all 329 packages, build `Registry` handles directly from declarative configuration documents, enumerate registered keys, and apply in-place or derived registry updates. +- **D21 — Hand-authored registrations and language facades (§10.1):** Operation descriptors and dispatch registrations in `aimux-ops/src/ops/` as well as each binding's idiomatic wrapper/facade layer (`bindings/node/src/native.ts`, `bindings/python/python/aimux/__init__.py`, `bindings/go/aimux.go`, `bindings/java/src/main/java/ai/arcships/aimux/Aimux.java`, `bindings/swift/Sources/Aimux/Aimux.swift`, `bindings/flutter/lib/src/native.dart`) are hand-authored rather than generated. The runtime manifest (`aimux-ops/src/manifest.rs` / `schema/manifest.json`) is projected from the Rust registrations, and `aimux-codegen` derives headers, op constants, JSON schemas, and DTO types/codecs from that manifest (see also D18 and R160). ## Registered gaps @@ -427,6 +439,6 @@ inventory; the canonical business error union remains owned by RFC-0042. - **G-e — Release installation evidence:** Release publishing orders ops before FFI and packages the header, but installation and execution of every platform asset are not established here because build and packaging definitions alone do not establish release closure. - **G-f — Provider metadata (partially closed):** Static package descriptors (`provider.descriptors`), authoritative default methods for all 329 packages, and direct language-model method dispatch (`Provider::language_model_with_api`, `provider.model`, `model.resolve`) are now delivered; per-handle construction provenance beyond owner-scoped model reference summaries, non-language vendor extension methods (`provider.invoke` accepts only `listModels`), and direct string/registry model lifting in `text.*` requests remain absent because entries retain canonical Arcs and text requests still require resolved model handles. - **G-g — End-to-end memory bound:** Queue and wire limits do not bound every provider allocation or the existing unbounded core text pump because this layer controls admitted payloads rather than rewriting core streaming internals. -- **G-h — Generated-product consistency:** Per-business-type revision/hash checks are unavailable because consumed-type metadata is incomplete; every adapter already pins the exact ABI version, ops version and manifest digest. +- **G-h — Generated-product consistency:** Partially closed for schema metadata and load negotiation: `schema/manifest.json` emits per-type `revision` and transitive `schemaHash` for every manifest type, generated bindings emit `TYPE_SCHEMA_HASHES` and fall back to checking every generated `TYPE_SCHEMA_HASHES` entry against `manifest.types[].schemaHash` on whole-manifest digest mismatch (consumed-type subset negotiation via `hello` remains deferred with D10), and `aimux-codegen` generates DTO schemas and parity vectors across bindings. Remaining G-h scope covers a raw C per-type hash helper (R116), optional `hello`/`requiredTypeCapabilities` subset negotiation (D10), and per-platform installed-asset and distribution verification. - **G-i — Cross-language and platform conformance:** Exhaustive eight-language business-vector execution, same-source release evidence, installed-wheel checks and all platform sanitizer/link/install results are not established here because narrower local and fixture suites do not prove the full matrix; Dart Windows streaming is explicitly unsupported. - **G-k — Offline mock-model migration:** The old MockReplayModel constructor has no exposed replacement for offline text generation because replay.create returns ReplaySession, text operations admit only Language, and replay.live requires a separate caller-supplied target. diff --git a/docs/upgrading-to-0.6.md b/docs/upgrading-to-0.6.md index 433e0bbf1..3baa5cf00 100644 --- a/docs/upgrading-to-0.6.md +++ b/docs/upgrading-to-0.6.md @@ -21,10 +21,10 @@ packages. Do not mix 0.5 and 0.6 artifacts: | C ABI | ABI major `1` (`AIMUX_ABI_VERSION == 65536`) | | Ops protocol | `1.0` (`AIMUX_OPS_VERSION`) | | C header | `aimux-ffi/include/aimux.h` generated from the same commit | -| Manifest | the runtime's manifest `digest` must equal the generated `MANIFEST_DIGEST` | -| Bindings | Node/Python/Go/Java/Kotlin/Swift/Flutter/C from the same release | +| Manifest | runtime's manifest `digest` equals `MANIFEST_DIGEST` (fast path), or every entry in `TYPE_SCHEMA_HASHES` matches `manifest.types[].schemaHash` | +| Bindings | Node/Python/Go/Java/Kotlin/Swift/Flutter/C from the same release (or compatible `TYPE_SCHEMA_HASHES` set) | -A native load fails fast on an ABI, ops-version or manifest-digest mismatch. +A native load fails fast on an ABI, ops-version, or incompatible manifest/`TYPE_SCHEMA_HASHES` mismatch. Ops calls report protocol error `302` (`UnsupportedOpsVersion`); Java and Kotlin surface the same failure as `IllegalStateException` while `Aimux.load()` validates the manifest. Rebuild native consumers against the @@ -339,8 +339,8 @@ See [bindings/c/README.md](../bindings/c/README.md) and the - [ ] Update recording fixtures that stored 0.5 JSON; schema 2 itself is unchanged, but the business JSON inside a recording follows the new AI SDK shapes. -- [ ] Run the binding's native contract tests and your own integration tests - against the new header and manifest digest. +- [ ] Run the binding's native contract tests, self-verification checks, and your own + integration tests against the new header, `TYPE_SCHEMA_HASHES`, and manifest digest. ## Rollback diff --git a/docs/upgrading-to-0.7.md b/docs/upgrading-to-0.7.md index 04e46ffc5..ed4285c31 100644 --- a/docs/upgrading-to-0.7.md +++ b/docs/upgrading-to-0.7.md @@ -22,8 +22,8 @@ the manifest digest changes even though the ops version does not. | C ABI | ABI major `1` (`AIMUX_ABI_VERSION == 65536`), now 16 exports | | Ops protocol | `1.0`, 76 operations (72 in 0.6) | | C header | `aimux-ffi/include/aimux.h` generated from the same commit | -| Manifest | the runtime's manifest `digest` must equal the generated `MANIFEST_DIGEST` | -| Bindings | Node/Python/Go/Java/Kotlin/Swift/Flutter/C from the same release | +| Manifest | runtime's manifest `digest` equals `MANIFEST_DIGEST` (fast path), or every entry in `TYPE_SCHEMA_HASHES` matches `manifest.types[].schemaHash` | +| Bindings | Node/Python/Go/Java/Kotlin/Swift/Flutter/C from the same release (or compatible `TYPE_SCHEMA_HASHES` set) | | iOS | `aimux_ffi.xcframework` now ships a **dynamic** framework; the podspec no longer uses `-force_load` | ## Shared: `provider.create` validates settings diff --git a/docs/upgrading-to-ops-abi.md b/docs/upgrading-to-ops-abi.md index cac08af64..11aa94d69 100644 --- a/docs/upgrading-to-ops-abi.md +++ b/docs/upgrading-to-ops-abi.md @@ -44,12 +44,19 @@ the ABI major, their required ABI minor, exact expected opsVersion, required operations and kinds. There is no FFI minor negotiation or stdio hello. The manifest digest identifies canonical metadata, not binary identity. -Python verifies its generated ABI/ops/digest at import. Node checks -ABI/ops/digest at load and exposes the verified manifest and digest. Go, Java, -Swift and Dart enforce their implemented ABI/ops checks, and Dart can require -operation names. Per-business-type schema revisions/hashes are not yet -available. Use one coherent release set; these current checks do not replace -the missing per-type compatibility gate. +All generated bindings verify ABI compatibility (`ABI_VERSION` exact in Node, Python, +and Java/Kotlin; ABI major `>> 16` in Go, Swift, and Dart), exact `opsVersion`, and +manifest compatibility at load (using `MANIFEST_DIGEST` fast-path with full +`TYPE_SCHEMA_HASHES` fallback verifying every entry against `manifest.types[].schemaHash`). +Python verifies ABI/ops/manifest at import and exposes `manifest`, `manifest_digest()`, +and `verify_contract(...)` on `aimux` (with `MANIFEST_DIGEST` and `TYPE_SCHEMA_HASHES` +on `aimux.ops`); Node verifies at load and exposes `manifest` and `manifestDigest` on +`Client` and raw `Runtime`; Go, Java, Kotlin, Swift, and Dart enforce ABI/ops/manifest +checks on load/first use, and Dart can require operation names. Use one coherent release +set when possible; +older or newer runtimes remain compatible on whole-manifest digest changes when every +type in the generated `TYPE_SCHEMA_HASHES` table matches `manifest.types[].schemaHash` +(per-operation consumed-type subset filtering remains deferred with D10). ## Provider → model in eight interfaces @@ -60,7 +67,7 @@ snippets demonstrate calls and do not claim a successful provider network run. ### C / C++ -C has only the fourteen primitives; use your JSON library to extract the +C has only the sixteen primitives; use your JSON library to extract the decimal `handle` field from resource results. The calls are: ```c diff --git a/rfc/0039-ops-bindings-contract.md b/rfc/0039-ops-bindings-contract.md index 5b6fa7948..2f841b272 100644 --- a/rfc/0039-ops-bindings-contract.md +++ b/rfc/0039-ops-bindings-contract.md @@ -358,7 +358,7 @@ RFC-0042 的 schema/type revision 与固定 SDK 基线记录在 manifest,由 o 本次切换保留现有 schema-2 写入以及 schema-1/schema-2 读取,作为系列内过渡,不视为长期兼容承诺。#268 之后单独的后续 PR 必须在发版前完成 schema-3 迁移并删除 schema-2(及更早 schema)读取路径;不能在本次切换提前删除,也不能在该 PR 之后继续保留。 -manifest JSON 的 `digest` 为 canonical manifest 的 SHA-256,计算时排除 `digest` 字段自身;生成常量继续命名为 `MANIFEST_DIGEST`。 +manifest JSON 的 `digest` 为 canonical manifest 的 SHA-256,计算与自校验时需从顶层对象同时排除 `digest` 与生成器写入 `schema/manifest.json` 的 `inputHash`(并将 `ops` 按 `name` 排序、递归按 key 排序后取 compact JSON 的 SHA-256);生成常量继续命名为 `MANIFEST_DIGEST`。 ### 7.2 握手 diff --git a/schema/manifest.json b/schema/manifest.json new file mode 100644 index 000000000..6d6815fd7 --- /dev/null +++ b/schema/manifest.json @@ -0,0 +1,20647 @@ +{ + "abiVersion": 65536, + "digest": "cd147fa9595ede3951744fa261da98cc18c204e65b4081073ad3a3c1b68bfd92", + "errorCodes": [ + { + "aliases": [], + "code": 1, + "kind": "aimux", + "name": "Other" + }, + { + "aliases": [], + "code": 2, + "kind": "aimux", + "name": "JsonParse" + }, + { + "aliases": [ + "InvalidResponseData", + "ToolCallNotFoundForApproval", + "ToolChoiceViolation", + "TypeValidation" + ], + "code": 3, + "kind": "aimux", + "name": "InvalidResponseData" + }, + { + "aliases": [], + "code": 5, + "kind": "aimux", + "name": "InvalidArgument" + }, + { + "aliases": [ + "InvalidPrompt", + "MissingToolResults" + ], + "code": 6, + "kind": "aimux", + "name": "InvalidPrompt" + }, + { + "aliases": [], + "code": 7, + "kind": "aimux", + "name": "TokenExpired" + }, + { + "aliases": [], + "code": 8, + "kind": "aimux", + "name": "UnsupportedFunctionality" + }, + { + "aliases": [], + "code": 9, + "kind": "aimux", + "name": "NoSuchModel" + }, + { + "aliases": [], + "code": 10, + "kind": "aimux", + "name": "NoSuchProvider" + }, + { + "aliases": [], + "code": 11, + "kind": "aimux", + "name": "ApiCall" + }, + { + "aliases": [], + "code": 12, + "kind": "aimux", + "name": "Timeout" + }, + { + "aliases": [], + "code": 13, + "kind": "aimux", + "name": "Aborted" + }, + { + "aliases": [], + "code": 14, + "kind": "aimux", + "name": "Retry" + }, + { + "aliases": [], + "code": 15, + "kind": "aimux", + "name": "NoSuchTool" + }, + { + "aliases": [], + "code": 16, + "kind": "aimux", + "name": "InvalidToolInput" + }, + { + "aliases": [], + "code": 17, + "kind": "aimux", + "name": "ToolCallRepair" + }, + { + "aliases": [], + "code": 18, + "kind": "aimux", + "name": "NoOutputGenerated" + }, + { + "aliases": [], + "code": 19, + "kind": "aimux", + "name": "LoadApiKey" + }, + { + "aliases": [], + "code": 20, + "kind": "aimux", + "name": "LoadSetting" + }, + { + "aliases": [], + "code": 100, + "kind": "recording", + "name": "Init" + }, + { + "aliases": [], + "code": 101, + "kind": "recording", + "name": "OpenFile" + }, + { + "aliases": [], + "code": 102, + "kind": "recording", + "name": "Spawn" + }, + { + "aliases": [], + "code": 103, + "kind": "recording", + "name": "WriterGone" + }, + { + "aliases": [], + "code": 104, + "kind": "recording", + "name": "FlushTimeout" + }, + { + "aliases": [], + "code": 105, + "kind": "recording", + "name": "Write" + }, + { + "aliases": [], + "code": 200, + "kind": "binding", + "name": "NullPointer" + }, + { + "aliases": [], + "code": 201, + "kind": "binding", + "name": "InvalidUtf8" + }, + { + "aliases": [], + "code": 202, + "kind": "binding", + "name": "InvalidWireJson" + }, + { + "aliases": [], + "code": 203, + "kind": "binding", + "name": "InvalidHandle" + }, + { + "aliases": [], + "code": 204, + "kind": "binding", + "name": "ReentrantCall" + }, + { + "aliases": [], + "code": 205, + "kind": "binding", + "name": "ResultSerialization" + }, + { + "aliases": [], + "code": 206, + "kind": "binding", + "name": "CallbackFailure" + }, + { + "aliases": [], + "code": 300, + "kind": "protocol", + "name": "InvalidOp" + }, + { + "aliases": [], + "code": 301, + "kind": "protocol", + "name": "InvalidParams" + }, + { + "aliases": [], + "code": 302, + "kind": "protocol", + "name": "UnsupportedOpsVersion" + }, + { + "aliases": [], + "code": 303, + "kind": "protocol", + "name": "ConcurrentConsumer" + }, + { + "aliases": [], + "code": 304, + "kind": "protocol", + "name": "InvalidState" + }, + { + "aliases": [], + "code": 305, + "kind": "protocol", + "name": "ResourceLimit" + }, + { + "aliases": [], + "code": 306, + "kind": "protocol", + "name": "HandleExhausted" + } + ], + "generatorVersion": "0.7.0", + "handleKinds": [ + "Provider", + "Registry", + "Language", + "Embedding", + "Image", + "Speech", + "Transcription", + "Reranking", + "Video", + "Search", + "Decision", + "Files", + "Operation", + "Abort", + "Fetch", + "WebSocket", + "Download", + "CredentialResolver", + "Middleware", + "TraceStore", + "Recorder", + "SessionStore", + "ReplaySession" + ], + "inputHash": "cd147fa9595ede3951744fa261da98cc18c204e65b4081073ad3a3c1b68bfd92", + "manifestRevision": "1", + "ops": [ + { + "allowedHandleKinds": [], + "cancellation": "none", + "mode": "call", + "name": "abort.create", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::operation::EmptyParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_ops::ops::handles::HandleResult", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_core::abort_signal::AbortSignal::new" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Abort" + ], + "cancellation": "none", + "mode": "call", + "name": "abort.signal", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::operation::EmptyParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "null", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_core::abort_signal::AbortSignal::abort" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [], + "cancellation": "none", + "mode": "call", + "name": "auth.codexRefresh", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::misc::CodexRefreshRequest", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_providers::codex::CodexTokens", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_providers::codex_refresh" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [], + "cancellation": "abort", + "mode": "call", + "name": "catalogue.fetch", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::misc::CatalogueFetchRequest", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_providers::catalogue::Catalogue", + "retryOwner": "none", + "runtimeHandleFields": [ + [ + "abort", + [ + "Abort" + ] + ] + ], + "scope": "current", + "sideEffects": false, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_providers::get_model_specs" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [], + "cancellation": "none", + "mode": "call", + "name": "composite.moa", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::composite::MoaParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_ops::handle::HandleId", + "retryOwner": "operation", + "runtimeHandleFields": [ + [ + "references.*", + [ + "Language" + ] + ], + [ + "aggregator", + [ + "Language" + ] + ] + ], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_moa_new", + "MoaModel::new" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [], + "cancellation": "none", + "mode": "call", + "name": "composite.router", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::composite::RouterParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_ops::handle::HandleId", + "retryOwner": "operation", + "runtimeHandleFields": [ + [ + "children.*", + [ + "Language" + ] + ] + ], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_router_new", + "RouterModel::new" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [], + "cancellation": "none", + "mode": "call", + "name": "credential.create", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::handles::CredentialParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_ops::ops::handles::HandleResult", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "future", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Decision" + ], + "cancellation": "none", + "mode": "call", + "name": "decision.capabilities", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::operation::EmptyParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "AnyValue", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": false, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_decision_capabilities", + "aimux_core::decision_model::decision_model_properties" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Decision" + ], + "cancellation": "abort", + "mode": "call", + "name": "decision.decide", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::decision::DecisionDecideRequest", + "requiredCapabilities": [ + "doDecide" + ], + "resultOwnership": "owned", + "resultType": "aimux_core::decision_model::DecideResult", + "retryOwner": "core", + "runtimeHandleFields": [ + [ + "abort", + [ + "Abort" + ] + ] + ], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_decide", + "aimux_decide_with_abort", + "aimux_core::decision_model::decide" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Embedding" + ], + "cancellation": "abort", + "mode": "call", + "name": "embedding.embed", + "requestBytePolicy": "json", + "requestType": "aimux_core::embedding_model::EmbeddingCallOptions", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_core::embedding_model::EmbeddingResult", + "retryOwner": "core", + "runtimeHandleFields": [ + [ + "abort", + [ + "Abort" + ] + ] + ], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_embed", + "aimux_core::embedding_model::embed" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Embedding" + ], + "cancellation": "abort", + "mode": "call", + "name": "embedding.embedMany", + "requestBytePolicy": "json", + "requestType": "aimux_core::embedding_model::EmbeddingCallOptions", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_core::embedding_model::EmbeddingResult", + "retryOwner": "core", + "runtimeHandleFields": [ + [ + "abort", + [ + "Abort" + ] + ] + ], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_embed", + "aimux_core::embedding_model::embed" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Files" + ], + "cancellation": "abort", + "mode": "call", + "name": "files.upload", + "requestBytePolicy": "jsonWithBase64", + "requestType": "aimux_ops::ops::files::UploadFileParams", + "requiredCapabilities": [ + "uploadFile" + ], + "resultOwnership": "owned", + "resultType": "aimux_core::files_model::UploadFileResult", + "retryOwner": "none", + "runtimeHandleFields": [ + [ + "abort", + [ + "Abort" + ] + ] + ], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_core::files_model::Files::upload_file", + "aimux_ffi::aimux_file_upload" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Provider", + "Registry", + "Language", + "Embedding", + "Image", + "Speech", + "Transcription", + "Reranking", + "Video", + "Search", + "Files", + "Operation", + "Abort", + "Fetch", + "WebSocket", + "Download", + "CredentialResolver", + "Middleware", + "TraceStore", + "Recorder", + "SessionStore", + "ReplaySession", + "Decision" + ], + "cancellation": "none", + "mode": "call", + "name": "handle.drop", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::operation::EmptyParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "null", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_ops::handle::HandleRegistry::remove" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Image" + ], + "cancellation": "abort", + "mode": "call", + "name": "image.generate", + "requestBytePolicy": "jsonWithBase64", + "requestType": "aimux_core::image_model::ImageCallOptions", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_core::image_model::ImageResult", + "retryOwner": "core", + "runtimeHandleFields": [ + [ + "abort", + [ + "Abort" + ] + ] + ], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_image_generate", + "aimux_core::image_model::generate_image" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [], + "cancellation": "none", + "mode": "call", + "name": "middleware.create", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::handles::MiddlewareParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_ops::ops::handles::HandleResult", + "retryOwner": "none", + "runtimeHandleFields": [ + [ + "traceStore", + [ + "TraceStore" + ] + ] + ], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_core::trace::TraceLayer::new" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Language", + "Embedding", + "Image", + "Speech", + "Transcription", + "Reranking", + "Video", + "Search", + "Decision" + ], + "cancellation": "none", + "mode": "call", + "name": "model.info", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::registry::ModelInfoParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_ops::ops::registry::ModelInfo", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": false, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_core::language_model::LanguageModel::provider" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Registry" + ], + "cancellation": "none", + "mode": "call", + "name": "model.resolve", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::registry::ModelResolveParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_ops::ops::registry::HandleResult", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": false, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_core::provider_registry::ProviderRegistry" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Language", + "Embedding", + "Image", + "Speech", + "Transcription", + "Reranking", + "Video", + "Search", + "Decision" + ], + "cancellation": "none", + "mode": "call", + "name": "model.wrap", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::registry::ModelWrapParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_ops::ops::registry::HandleResult", + "retryOwner": "none", + "runtimeHandleFields": [ + [ + "middleware.*", + [ + "Middleware" + ] + ] + ], + "scope": "current", + "sideEffects": false, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_core::language_model_middleware::wrap_language_model", + "aimux_core::image_model_middleware::wrap_image_model" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Operation" + ], + "cancellation": "operation", + "mode": "call", + "name": "operation.cancel", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::operation::EmptyParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_ops::operation::CancelResult", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_ops::operation::Operation" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Operation" + ], + "cancellation": "operation", + "mode": "call", + "name": "operation.inputDone", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::operation::EmptyParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "null", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_ops::operation::Operation" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Operation" + ], + "cancellation": "operation", + "mode": "poll", + "name": "operation.next", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::operation::OperationNextParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_ops::ops::operation::OperationPollResult", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_ops::operation::Operation" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Operation" + ], + "cancellation": "operation", + "mode": "binaryPush", + "name": "operation.push", + "requestBytePolicy": "binary", + "requestType": "[uint8]", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "null", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_ops::operation::Operation" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Operation" + ], + "cancellation": "none", + "mode": "call", + "name": "operation.status", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::operation::EmptyParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_ops::operation::OperationStatus", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": false, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_ops::operation::Operation" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Language" + ], + "cancellation": "none", + "mode": "call", + "name": "output.toOpenAI", + "requestBytePolicy": "jsonWithBase64", + "requestType": "aimux_ops::ops::misc::OpenAiOutputRequest", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_core::openai_output::ChatCompletion", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": false, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_core::generate::generate_text_result_to_chat_completion" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [], + "cancellation": "none", + "mode": "call", + "name": "provider.create", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::provider::ProviderCreateParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_ops::ops::provider::HandleResult", + "retryOwner": "none", + "runtimeHandleFields": [ + [ + "settings.fetch", + [ + "Fetch" + ] + ], + [ + "settings.webSocket", + [ + "WebSocket" + ] + ], + [ + "settings.credentialResolver", + [ + "CredentialResolver" + ] + ] + ], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_providers::create_provider", + "aimux_providers::JevProvider::new" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [], + "cancellation": "none", + "mode": "call", + "name": "provider.custom", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::provider::ProviderCustomParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_ops::ops::provider::HandleResult", + "retryOwner": "none", + "runtimeHandleFields": [ + [ + "languageModels.*", + [ + "Language" + ] + ], + [ + "chatModels.*", + [ + "Language" + ] + ], + [ + "responsesModels.*", + [ + "Language" + ] + ], + [ + "completionModels.*", + [ + "Language" + ] + ], + [ + "messagesModels.*", + [ + "Language" + ] + ], + [ + "embeddingModels.*", + [ + "Embedding" + ] + ], + [ + "imageModels.*", + [ + "Image" + ] + ], + [ + "speechModels.*", + [ + "Speech" + ] + ], + [ + "transcriptionModels.*", + [ + "Transcription" + ] + ], + [ + "rerankingModels.*", + [ + "Reranking" + ] + ], + [ + "videoModels.*", + [ + "Video" + ] + ], + [ + "searchModels.*", + [ + "Search" + ] + ], + [ + "decisionModels.*", + [ + "Decision" + ] + ], + [ + "files", + [ + "Files" + ] + ], + [ + "fallbackProvider", + [ + "Provider" + ] + ], + [ + "languageModelMiddleware.*", + [ + "Middleware" + ] + ], + [ + "imageModelMiddleware.*", + [ + "Middleware" + ] + ] + ], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_core::custom_provider::custom_provider" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [], + "cancellation": "none", + "mode": "call", + "name": "provider.default", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::provider::ProviderDefaultParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_ops::ops::provider::HandleResult", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_providers::create_provider", + "aimux_providers::JevProvider::new" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [], + "cancellation": "none", + "mode": "call", + "name": "provider.descriptors", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::provider::ProviderDescriptorsParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "[aimux_provider_utils::package_descriptor::PackageDescriptor]", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": false, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_providers::package_descriptors", + "aimux_providers::package_descriptor" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Provider" + ], + "cancellation": "none", + "mode": "call", + "name": "provider.files", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::operation::EmptyParams", + "requiredCapabilities": [ + "files" + ], + "resultOwnership": "owned", + "resultType": "aimux_ops::handle::HandleId", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": false, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_core::provider::Provider::files", + "aimux_ffi::aimux_openai_files_new", + "aimux_ffi::aimux_openai_files_new_with_base" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Provider" + ], + "cancellation": "abort", + "mode": "call", + "name": "provider.invoke", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::provider::ProviderInvokeParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "[aimux_core::model_catalogue::RuntimeModel]", + "retryOwner": "none", + "runtimeHandleFields": [ + [ + "abort", + [ + "Abort" + ] + ] + ], + "scope": "current", + "sideEffects": false, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_core::provider::ProviderDiscovery::list_models" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Provider" + ], + "cancellation": "none", + "mode": "call", + "name": "provider.model", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::provider::ProviderModelParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_ops::ops::provider::HandleResult", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_core::provider::Provider" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Provider" + ], + "cancellation": "none", + "mode": "call", + "name": "provider.wrap", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::provider::ProviderWrapParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_ops::ops::provider::HandleResult", + "retryOwner": "none", + "runtimeHandleFields": [ + [ + "languageModelMiddleware.*", + [ + "Middleware" + ] + ], + [ + "imageModelMiddleware.*", + [ + "Middleware" + ] + ] + ], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_core::wrap_provider::wrap_provider" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Recorder" + ], + "cancellation": "none", + "mode": "call", + "name": "recorder.attach", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::recording::EmptyParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "null", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_init_recording" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [], + "cancellation": "none", + "mode": "call", + "name": "recorder.create", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::recording::CreateRecorderParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_ops::ops::recording::RecorderHandleResult", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_init_recording", + "aimux_init_recording_ring", + "aimux_init_recording_ring_default" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Recorder" + ], + "cancellation": "none", + "mode": "call", + "name": "recorder.export", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::recording::EmptyParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_ops::ops::recording::RecorderExport", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "RingRecorder::export_jsonl", + "JsonlRecorder::path" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Recorder" + ], + "cancellation": "none", + "mode": "call", + "name": "recorder.flush", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::recording::EmptyParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "null", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_recording_flush", + "aimux_recording_try_flush" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Recorder" + ], + "cancellation": "none", + "mode": "call", + "name": "recorder.stats", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::recording::EmptyParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_ops::ops::recording::RecorderStats", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": false, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "RingRecorder::len", + "RingRecorder::dropped_count", + "JsonlRecorder::last_write_error" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Recorder" + ], + "cancellation": "none", + "mode": "call", + "name": "recorder.stop", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::recording::EmptyParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "null", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_recording_stop" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [], + "cancellation": "none", + "mode": "call", + "name": "registry.create", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::registry::RegistryCreateParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_ops::ops::registry::HandleResult", + "retryOwner": "none", + "runtimeHandleFields": [ + [ + "entries.*.provider", + [ + "Provider" + ] + ] + ], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_core::provider_registry::create_provider_registry" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [], + "cancellation": "none", + "mode": "call", + "name": "registry.fromConfig", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::registry::RegistryFromConfigParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_ops::ops::registry::HandleResult", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_providers::providers_from_config_with_policy", + "aimux_core::provider_registry::create_provider_registry" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Registry" + ], + "cancellation": "none", + "mode": "call", + "name": "registry.list", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::registry::RegistryListParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_ops::ops::registry::RegistryListResult", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": false, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_core::provider_registry::ProviderRegistry::provider_ids" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Registry" + ], + "cancellation": "none", + "mode": "call", + "name": "registry.provider", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::registry::RegistryProviderParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_ops::ops::registry::HandleResult", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": false, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_core::provider_registry::ProviderRegistry::provider" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Registry" + ], + "cancellation": "none", + "mode": "call", + "name": "registry.update", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::registry::RegistryUpdateParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_ops::ops::registry::RegistryUpdateResult", + "retryOwner": "none", + "runtimeHandleFields": [ + [ + "set.*.provider", + [ + "Provider" + ] + ] + ], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_core::provider_registry::ProviderRegistry::update_providers", + "aimux_core::provider_registry::ProviderRegistry::with_updated_providers" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "ReplaySession" + ], + "cancellation": "none", + "mode": "call", + "name": "replay.capabilities", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::operation::EmptyParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "null", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "future", + "sideEffects": false, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_provider_utils::fetch::Fetch" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [], + "cancellation": "none", + "mode": "call", + "name": "replay.create", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::replay::ReplayCreateParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_ops::ops::replay::ReplaySessionHandle", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_mock_replay_new" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "ReplaySession" + ], + "cancellation": "none", + "mode": "call", + "name": "replay.dryRun", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::operation::EmptyParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_ops::ops::replay::ReplayPlan", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": false, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_core::recording::Recording" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "ReplaySession" + ], + "cancellation": "none", + "mode": "call", + "name": "replay.inspect", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::operation::EmptyParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_ops::ops::replay::ReplayInspection", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": false, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_core::replay::MockReplayModel::recordings" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "ReplaySession" + ], + "cancellation": "abort", + "mode": "call", + "name": "replay.live", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::replay::ReplayLiveParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_ops::ops::replay::ReplayLiveResult", + "retryOwner": "core", + "runtimeHandleFields": [ + [ + "target.handle", + [ + "Language", + "Decision", + "Registry" + ] + ], + [ + "abort", + [ + "Abort" + ] + ] + ], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_core::replay::replay_with_model" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Reranking" + ], + "cancellation": "abort", + "mode": "call", + "name": "reranking.rerank", + "requestBytePolicy": "json", + "requestType": "aimux_core::reranking_model::RerankingCallOptions", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_core::reranking_model::RerankingResult", + "retryOwner": "core", + "runtimeHandleFields": [ + [ + "abort", + [ + "Abort" + ] + ] + ], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_rerank", + "aimux_core::reranking_model::rerank" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [], + "cancellation": "none", + "mode": "call", + "name": "runtime.configure", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::runtime::RuntimeConfigureParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "AnyValue", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_provider_utils::logging::configure_logging", + "aimux_provider_utils::fetch::configure_startup_proxy" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [], + "cancellation": "none", + "mode": "call", + "name": "runtime.describe", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::runtime::RuntimeDescribeParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "AnyValue", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": false, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_ops::manifest::manifest", + "aimux_ops::manifest::manifest_digest" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Search" + ], + "cancellation": "abort", + "mode": "call", + "name": "search.search", + "requestBytePolicy": "json", + "requestType": "aimux_core::search_model::SearchCallOptions", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_core::search_model::SearchResult", + "retryOwner": "core", + "runtimeHandleFields": [ + [ + "abort", + [ + "Abort" + ] + ] + ], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_search", + "aimux_core::search_model::search" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "SessionStore" + ], + "cancellation": "none", + "mode": "call", + "name": "sessionStore.attach", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::operation::EmptyParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "null", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_core::session::init_session_store" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "SessionStore" + ], + "cancellation": "none", + "mode": "call", + "name": "sessionStore.calls", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::session::SessionStoreCallsParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "[aimux_core::session::SessionCall]", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": false, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_session_calls" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [], + "cancellation": "none", + "mode": "call", + "name": "sessionStore.create", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::session::SessionStoreCreateParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_ops::ops::session::SessionStoreHandle", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_session_store_init", + "aimux_session_infer_init" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "SessionStore" + ], + "cancellation": "none", + "mode": "call", + "name": "sessionStore.list", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::operation::EmptyParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "[aimux_core::session::SessionView]", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": false, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_list_sessions" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Speech" + ], + "cancellation": "abort", + "mode": "call", + "name": "speech.generate", + "requestBytePolicy": "json", + "requestType": "aimux_core::speech_model::SpeechCallOptions", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_core::speech_model::SpeechResult", + "retryOwner": "core", + "runtimeHandleFields": [ + [ + "abort", + [ + "Abort" + ] + ] + ], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_speech_generate", + "aimux_core::speech_model::generate_speech" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Language" + ], + "cancellation": "abort", + "mode": "call", + "name": "text.consume", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::text::TextRequest", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_core::generate::GenerateTextResult", + "retryOwner": "core", + "runtimeHandleFields": [ + [ + "abort", + [ + "Abort" + ] + ] + ], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_consume_stream_text" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Language" + ], + "cancellation": "abort", + "mode": "call", + "name": "text.generate", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::text::TextRequest", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_core::generate::GenerateTextResult", + "retryOwner": "core", + "runtimeHandleFields": [ + [ + "abort", + [ + "Abort" + ] + ] + ], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_generate_text" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Language" + ], + "cancellation": "abort", + "mode": "call", + "name": "text.generateObject", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::text::TextRequest", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_core::generate::GenerateObjectResult", + "retryOwner": "core", + "runtimeHandleFields": [ + [ + "abort", + [ + "Abort" + ] + ] + ], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_generate_object" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Language" + ], + "cancellation": "abort", + "mode": "call", + "name": "text.generateOpenAI", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::text::TextRequest", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_core::openai_output::ChatCompletion", + "retryOwner": "core", + "runtimeHandleFields": [ + [ + "abort", + [ + "Abort" + ] + ] + ], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_generate_text_as_openai" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Language" + ], + "cancellation": "abort", + "eventType": "aimux_core::stream_part::TextStreamPart", + "mode": "stream", + "name": "text.stream", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::text::TextRequest", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_ops::frame::StreamFrame", + "retryOwner": "core", + "runtimeHandleFields": [ + [ + "abort", + [ + "Abort" + ] + ] + ], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_stream_text", + "aimux_stream_text_with_abort" + ], + "terminalType": "aimux_ops::frame::StreamFrame" + }, + { + "allowedHandleKinds": [ + "Language" + ], + "cancellation": "abort", + "eventType": "aimux_core::openai_output::ChatCompletionChunk", + "mode": "stream", + "name": "text.streamOpenAI", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::text::OpenAiTextRequest", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_ops::frame::StreamFrame", + "retryOwner": "core", + "runtimeHandleFields": [ + [ + "abort", + [ + "Abort" + ] + ] + ], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_stream_text_as_openai", + "aimux_stream_text_as_openai_with_abort" + ], + "terminalType": "aimux_ops::frame::StreamFrame" + }, + { + "allowedHandleKinds": [], + "cancellation": "none", + "mode": "call", + "name": "toolRepair.apply", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::misc::ToolRepairApplyRequest", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_core::tool::ToolCall", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": false, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_core::parse_tool_call::apply_tool_call_repair" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [], + "cancellation": "none", + "mode": "call", + "name": "toolRepair.applyResult", + "requestBytePolicy": "jsonWithBase64", + "requestType": "aimux_ops::ops::misc::ToolRepairApplyResultRequest", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_core::generate::GenerateTextResult", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": false, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_core::parse_tool_call::apply_tool_call_repair_to_result" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [], + "cancellation": "none", + "mode": "call", + "name": "toolRepair.context", + "requestBytePolicy": "jsonWithBase64", + "requestType": "aimux_ops::ops::misc::ToolRepairContextRequest", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_ops::ops::misc::ToolRepairContextResult", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": false, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_core::parse_tool_call::tool_call_repair_context" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "TraceStore" + ], + "cancellation": "none", + "mode": "call", + "name": "trace.aggregate", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::trace::TraceAggregateParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "[aimux_core::trace::store::TraceStats]", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": false, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_trace_aggregate", + "aimux_core::trace::RingTraceStore::aggregate" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "TraceStore" + ], + "cancellation": "none", + "mode": "call", + "name": "trace.clear", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::operation::EmptyParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "null", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_trace_clear", + "aimux_core::trace::RingTraceStore::clear" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [], + "cancellation": "none", + "mode": "call", + "name": "trace.create", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::trace::TraceCreateParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_ops::handle::HandleId", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_core::trace::RingTraceStore::with_capacity" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "TraceStore" + ], + "cancellation": "none", + "mode": "call", + "name": "trace.export", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::operation::EmptyParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "string", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": false, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_trace_export_jsonl", + "aimux_core::trace::RingTraceStore::export_jsonl" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "TraceStore" + ], + "cancellation": "none", + "mode": "call", + "name": "trace.sessionChain", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::trace::TraceSessionParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_core::trace::store::SessionChainView", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": false, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_trace_session_chain", + "aimux_core::trace::RingTraceStore::session_chain" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "TraceStore" + ], + "cancellation": "none", + "mode": "call", + "name": "trace.sessionTrajectory", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::trace::TraceSessionParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "[aimux_core::trace::store::SessionStepStat]", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": false, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_trace_session_trajectory", + "aimux_core::trace::RingTraceStore::session_cache_trajectory" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Transcription" + ], + "cancellation": "abort", + "mode": "call", + "name": "transcription.generate", + "requestBytePolicy": "jsonWithBase64", + "requestType": "aimux_core::transcription_model::TranscriptionCallOptions", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_core::transcription_model::TranscriptionResult", + "retryOwner": "core", + "runtimeHandleFields": [ + [ + "abort", + [ + "Abort" + ] + ] + ], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_transcription_generate", + "aimux_core::transcription_model::transcribe" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Transcription" + ], + "cancellation": "abort", + "mode": "call", + "name": "transcription.start", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::operation::TranscriptionStartParams", + "requiredCapabilities": [ + "doStream" + ], + "resultOwnership": "owned", + "resultType": "aimux_ops::handle::HandleId", + "retryOwner": "none", + "runtimeHandleFields": [ + [ + "abort", + [ + "Abort" + ] + ] + ], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_ops::operation::Operation" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [], + "cancellation": "none", + "mode": "call", + "name": "transport.create", + "requestBytePolicy": "json", + "requestType": "aimux_ops::ops::handles::TransportParams", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_ops::ops::handles::HandleResult", + "retryOwner": "none", + "runtimeHandleFields": [], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_provider_utils::fetch::ReqwestFetch::new", + "aimux_provider_utils::ws::TungsteniteConnector::new", + "aimux_core::download::create_download", + "aimux_core::download::create_default_download_function" + ], + "terminalType": null + }, + { + "allowedHandleKinds": [ + "Video" + ], + "cancellation": "abort", + "mode": "call", + "name": "video.generate", + "requestBytePolicy": "jsonWithBase64", + "requestType": "aimux_core::video_model::VideoCallOptions", + "requiredCapabilities": [], + "resultOwnership": "owned", + "resultType": "aimux_core::video_model::VideoResult", + "retryOwner": "core", + "runtimeHandleFields": [ + [ + "abort", + [ + "Abort" + ] + ] + ], + "scope": "current", + "sideEffects": true, + "sinceOpsVersion": "1.0", + "sourceSymbolInventory": [ + "aimux_video_generate", + "aimux_core::video_model::generate_video" + ], + "terminalType": null + } + ], + "opsVersion": "1.0", + "packages": [ + "abacus", + "abliteration_ai", + "ai21", + "ai302", + "ai_router", + "aiand", + "aibadgr", + "aigc2d", + "aihubmix", + "ails", + "aiml", + "aki_io", + "albert", + "alibaba", + "alibaba_coding_plan", + "alibaba_coding_plan_cn", + "alibaba_token_plan", + "alibaba_token_plan_cn", + "amazon_bedrock", + "ambient", + "anthropic", + "anthropic_aws", + "anyapi", + "anyscale", + "apertis", + "api2d", + "api2gpt", + "apiserpent", + "assemblyai", + "atlascloud", + "atomic_chat", + "auriko", + "aws_polly", + "azure", + "azure_ai", + "baichuan", + "baidu", + "baidu_v2", + "bailing", + "baseten", + "bedrock_mantle", + "berget", + "bigmodel", + "black_forest_labs", + "blueclaw", + "bytedance", + "byteplus", + "bytez", + "canopywave", + "cartesia", + "cerebras", + "chatgpt", + "cherryin", + "chutes", + "clarifai", + "claudinio", + "cline_pass", + "closeai", + "cloudferro_sherlock", + "cloudflare", + "cloudflare_workers_ai", + "codestral", + "codex", + "cohere", + "cometapi", + "commandcode", + "compactifai", + "copilot", + "cortecs", + "coze", + "crof", + "crossmodel", + "crusoe", + "cybertron", + "daoxe", + "darkbloom", + "databricks", + "dataforseo", + "datarobot", + "deepbricks", + "deepgram", + "deepinfra", + "deepseek", + "digitalocean", + "dinference", + "docker_model_runner", + "doubao", + "doubleword", + "drun", + "ebcloud", + "elevenlabs", + "embercloud", + "empiriolabs", + "evroc", + "exa_ai", + "fal", + "fastcrw", + "fastgpt", + "fastrouter", + "featherless_ai", + "firecrawl", + "firepass", + "fireworks", + "freemodel", + "friendliai", + "frogbot", + "galadriel", + "gaudi", + "gdc", + "gigachat", + "github", + "gladia", + "gmi", + "gmicloud", + "gonka24", + "google", + "google_pse", + "google_vertex", + "gradient_ai", + "groq", + "helicone", + "heroku", + "hetzner", + "hosted_vllm", + "hpc_ai", + "huggingface", + "hume", + "hyperbolic", + "iflowcn", + "inception", + "inceptron", + "inference_net", + "inferencehub", + "inferx", + "infinity", + "io_net", + "jev", + "jiekou", + "jina_ai", + "jlama", + "kenari", + "kilo", + "kimi", + "kimi_for_coding", + "kiro", + "klingai", + "kluster_ai", + "krutrim", + "kuae_cloud_coding_plan", + "lambda_ai", + "laya", + "lemonade", + "lemonfox_ai", + "libertai", + "lilac", + "lingyiwanwu", + "linkup", + "litellm_proxy", + "llama", + "llamacpp", + "llamafile", + "llamagate", + "llmgateway", + "llmtr", + "lmnt", + "lmstudio", + "local", + "localai", + "longcat", + "lucidquery", + "luma", + "lynkr", + "matterai", + "meganova", + "merge_gateway", + "meta", + "meta_llama", + "mimo", + "minimax", + "minimax_cn", + "minimax_cn_coding_plan", + "minimax_coding_plan", + "mira", + "mistral", + "mistralrs", + "mixlayer", + "mlx", + "moark", + "modal", + "model_oracle_ai", + "modelscope", + "moonshotai", + "moonshotai_cn", + "morph", + "nanogpt", + "ncompass", + "nearai", + "nebius", + "neon", + "neuralwatt", + "nextbit", + "nlp_cloud", + "nous_research", + "novita", + "nscale", + "nvidia_nim", + "oci", + "ofox", + "ohmygpt", + "ollama", + "ollama_cloud", + "omlx", + "onnx", + "oobabooba", + "openai", + "openai_compatible", + "openaimax", + "openaisb", + "opencode", + "opencode_go", + "opencode_zen", + "openrouter", + "openvino", + "orcarouter", + "ovhcloud", + "parallel_ai", + "parasail", + "perfxcloud", + "perplexity", + "perplexity_agent", + "petals", + "pinstripes", + "pioneer", + "poe", + "poolside", + "portkey", + "ppinfra", + "predibase", + "privatemode_ai", + "prodia", + "publicai", + "qihang_ai", + "qihoo360", + "qiniu_ai", + "recraft", + "regolo_ai", + "reka_ai", + "replicate", + "requesty", + "revai", + "reve", + "routing_run", + "runwayml", + "sakana", + "sambanova", + "sarvam", + "scaleway", + "scx_ai", + "searxng", + "serper", + "sglang", + "siliconflow", + "snowflake", + "snowflake_cortex", + "stability", + "stackit", + "stepfun", + "stepfun_ai_step_plan", + "stepfun_step_plan", + "subconscious", + "submodel", + "synthetic", + "tavily", + "tencent", + "tencent_coding_plan", + "tencent_token_plan", + "tencent_token_plan_enterprise_auto", + "tencent_token_plan_enterprise_pro", + "tencent_token_plan_general_personal", + "tencent_token_plan_hy_personal", + "tencent_tokenhub", + "tensormesh", + "the_grid_ai", + "thinkingmachines", + "tinfoil", + "tinyfish", + "togetherai", + "tokenflux", + "tokenpony", + "trustedrouter", + "tundra", + "umans_ai", + "unorouter", + "upstage", + "v0", + "venice", + "vercel", + "vertex_ai_ai21_models", + "vertex_ai_anthropic_models", + "vertex_ai_deepseek_models", + "vertex_ai_llama_models", + "vertex_ai_minimax_models", + "vertex_ai_mistral_models", + "vertex_ai_moonshot_models", + "vertex_ai_openai_models", + "vertex_ai_qwen_models", + "vertex_ai_zai_models", + "vivgrid", + "vllm", + "volc_engine", + "voyage", + "vultr", + "wafer", + "wandb", + "xai", + "xiaomi_token_plan_ams", + "xiaomi_token_plan_cn", + "xiaomi_token_plan_sgp", + "xiaomimimo", + "xinference", + "xpersona", + "xunfei", + "you_com", + "zai", + "zai_coding_plan", + "zeldoc", + "zenmux", + "zhipu_v4", + "zhipuai_coding_plan" + ], + "registeredGaps": [ + "G-a: recording/session/infer state remains process-wide", + "G-b: recording schema migration belongs to RFC-0041", + "G-c: replay transport capabilities and credential creation are future", + "G-e: per-asset platform install verification is not claimed" + ], + "sources": [ + { + "integrity": "sha512-lu4qObueHsPzOkaPoXOU4U55waGY8M35y/AqpRawV8AqhWxQoKloejyS8Z8beeGeoHldUnq0bdDhv/Yl5FttmA==", + "package": "@ai-sdk/amazon-bedrock", + "version": "5.0.100" + }, + { + "integrity": "sha512-wiv3jhUH0RrvGzSolJMZfZ2cI9As45LhwYmcAoWvNivXjC7wzJ4W/Udq9/u7EGnGsT8lpmFKEKBrMXVeUO97Dg==", + "package": "@ai-sdk/anthropic", + "version": "4.0.71" + }, + { + "integrity": "sha512-IrTFCzHiNnQ4Gns9+tLuQBolU0B8qLOwkgya3ztAZuvnMHQyoChPBe0JWav5Dhm0WWW4o1AtQ5GfKTaHeYMRfQ==", + "package": "@ai-sdk/anthropic-aws", + "version": "2.0.63" + }, + { + "integrity": "sha512-7sDolS6K+qbKB4CPixFM4p5rVWB3KdmLmjLQ2HMHgTHfPHD+Tf33R8zzy7cHLv+xOfsceXHl9m855thcV9H6sA==", + "package": "@ai-sdk/azure", + "version": "4.0.84" + }, + { + "integrity": "sha512-JVIjabzIuaebEX4lFx6CsSJFjH/PCaZfhnIHHBscXbs+MktqoqJPJIa/6tHFgK2JOdkORE7Ktlx7PmlDtGRfpw==", + "package": "@ai-sdk/cohere", + "version": "4.0.52" + }, + { + "integrity": "sha512-IXLbfLD69uGr6wKBvuc7eR4M1gpqm/OTIfYM6dVmV8jypHnNt3JIWjhH2wpBGaqPcpJpjQ0swiJOIlMjbOsjyA==", + "package": "@ai-sdk/deepgram", + "version": "3.1.24" + }, + { + "integrity": "sha512-ZBmtMofJqRzJK1JoPhz7EwcboJgsA7CCZDQ4Ld6SyHoONN29Sb3Pvnrq6YsK4gE3InnTx/cjjE+GJhL0Z/G+lw==", + "package": "@ai-sdk/deepseek", + "version": "3.0.56" + }, + { + "integrity": "sha512-f2riLaRgLRAPq8OZzxkHj7M3YtQpm64sUpTQGtAXnPfCXKchx+Ev+St+zX7t2XZJ272ENGmeYBV2OnaT7TdOng==", + "package": "@ai-sdk/elevenlabs", + "version": "3.0.54" + }, + { + "integrity": "sha512-hEyQBnG5UDUX0VFAhP6nvAj+6E49mnBegCEdZP7cNV9xL+p4tOVtTywV7jK6GSxI5LfIqUS5sPeXcupgD7+pfA==", + "package": "@ai-sdk/fal", + "version": "3.0.54" + }, + { + "integrity": "sha512-s0tWc+QeSce7O2ZLm+VWSRQy16dGfqEcMIUxEWh+LFvXX3h0TLH8jxCQ2H1qhiBgTta+6A97eHPhBlRFu1xy+g==", + "package": "@ai-sdk/google", + "version": "4.0.87" + }, + { + "integrity": "sha512-SWwmL+DHBPSrlLjEDmiSSSoJ5Y3VHvh4qPYb4c/R5Dxl04HkgPn0yffQh3NdmrRVv1b940ZqHERbqoTKnPzj1Q==", + "package": "@ai-sdk/google-vertex", + "version": "5.0.100" + }, + { + "integrity": "sha512-Vmgr4GDtZRd/eKGVSfCYvWLEPpVJyxbE4PI5OWPmnu/uHHvCOQU/6jRP7z2Rn4S+GGR64p3QvSHqeTRuj2bfQA==", + "package": "@ai-sdk/groq", + "version": "4.0.52" + }, + { + "integrity": "sha512-FCjGyrLhnV2nh6euHleq4/d6ZD/7d5g+2XnxUjjJx7SVp/PT1ICLG2kJ3zBiveMG6i5FfUN+7sj5377o8w/jFw==", + "package": "@ai-sdk/huggingface", + "version": "2.0.62" + }, + { + "integrity": "sha512-ZdBncHjP07kMf4eNSFKVMHOjAKNfHjQ821zpvI5l51lVrXjrlHmz4efoBF8T/oQBhhQQ7u9Eb5ANCwNmcyZ9vw==", + "package": "@ai-sdk/luma", + "version": "3.0.54" + }, + { + "integrity": "sha512-5A9A4ojjKM9BccqS7JP/oZmTjLKc0l357p17tHgtTeJtq8vRqR53TwLYa1ifxie6tpLSCdl+Y7eUYB1II/vk5w==", + "package": "@ai-sdk/mistral", + "version": "4.0.55" + }, + { + "integrity": "sha512-VF48lchWrMzQV0DFsaO5IrIMj6hiDFWiqhBOTxrfMKtDxrTEBNnlrns30wma79w08uKHQoi7RetPJlLdSlFwEA==", + "package": "@ai-sdk/open-responses", + "version": "2.0.58" + }, + { + "integrity": "sha512-NgqZVWoya7hfmtLkWyIjX9THbyYMLfxFqpShdAmvMnkoT+R9AZbdULGan8+4BiBWIZ1aHiAsc90l3SL8QU/0+Q==", + "package": "@ai-sdk/openai", + "version": "4.0.83" + }, + { + "integrity": "sha512-IAz1xv8zot4KLGa8kN7UfAA6H5+ARzAgAKLsoKxHPBzZuOc2E3ohaELg0x/JR9HVTbMbiftb0dPyCb8cT2KBRg==", + "package": "@ai-sdk/openai-compatible", + "version": "3.0.62" + }, + { + "integrity": "sha512-1Jtmn36VNMOBo9CMUQrPqsR744qtqRloEiXpWCYS8ffPlhS2CrSNmoho5lPjp3R7EnkzBsGI6p51TA7fQJQZdA==", + "package": "@ai-sdk/provider", + "version": "4.0.22" + }, + { + "integrity": "sha512-VeY9IqwJGcHSmezQTZknaYUT3sRcaXpuIt5VWyGOlJtoc5wkpDPstXZtfa41bGUsbQwCijvN6ASbggUCeTcMkw==", + "package": "@ai-sdk/provider-utils", + "version": "5.0.55" + }, + { + "integrity": "sha512-Vkgwm/p0LHlz6JUE3VLrPooYg2FoJdrQ6OdPFDcn86nUJfJYDkQPrRSRaxzdA3T2fjBrsOeKJeNi9iqZxCOdag==", + "package": "@ai-sdk/xai", + "version": "5.0.12" + }, + { + "integrity": "sha512-JNsNPk4ZvRGEJuqdVo2lYFkm7uAuf3p/RwKFWn1Wh/+IK3U1RyFWw2GXoFnhzqNfxEuj7XJB4WpIUhl1sHToWg==", + "package": "ai", + "version": "7.0.127" + } + ], + "typeDefs": { + "input": { + "AiMuxError": { + "description": "Unified error type for all aimux operations.\n\nVariants are cut by *what the caller does about it*, not by where the\nfailure came from. `ApiCallError` is boxed only to keep the Rust enum\ncompact; serde and every binding still observe the same object shape.\n\nA variant has a `cause` exactly where its AI SDK class takes one; it is\nwhat `source()` returns. `Retry` reports its\nlast attempt and `ToolCallRepair` its `cause` the same way.", + "oneOf": [ + { + "$ref": "#/typeDefs/input/ApiCallError", + "properties": { + "name": { + "const": "AI_APICallError", + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + { + "$ref": "#/typeDefs/input/RetryError", + "properties": { + "name": { + "const": "AI_RetryError", + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + { + "properties": { + "cause": { + "anyOf": [ + { + "$ref": "#/typeDefs/input/ErrorCause" + }, + { + "type": "null" + } + ] + }, + "message": { + "type": "string" + }, + "name": { + "const": "AI_JSONParseError", + "type": "string" + } + }, + "required": [ + "name", + "message" + ], + "type": "object" + }, + { + "properties": { + "cause": { + "anyOf": [ + { + "$ref": "#/typeDefs/input/ErrorCause" + }, + { + "type": "null" + } + ] + }, + "message": { + "type": "string" + }, + "name": { + "const": "AI_NoOutputGeneratedError", + "type": "string" + } + }, + "required": [ + "name", + "message" + ], + "type": "object" + }, + { + "properties": { + "cause": { + "anyOf": [ + { + "$ref": "#/typeDefs/input/ErrorCause" + }, + { + "type": "null" + } + ] + }, + "message": { + "type": "string" + }, + "name": { + "const": "AI_InvalidResponseDataError", + "type": "string" + } + }, + "required": [ + "name", + "message" + ], + "type": "object" + }, + { + "properties": { + "cause": { + "anyOf": [ + { + "$ref": "#/typeDefs/input/ErrorCause" + }, + { + "type": "null" + } + ] + }, + "message": { + "type": "string" + }, + "name": { + "const": "AI_TypeValidationError", + "type": "string" + }, + "value": true + }, + "required": [ + "name", + "message", + "value" + ], + "type": "object" + }, + { + "properties": { + "approvalId": { + "type": "string" + }, + "name": { + "const": "AI_ToolCallNotFoundForApprovalError", + "type": "string" + }, + "toolCallId": { + "type": "string" + } + }, + "required": [ + "name", + "toolCallId", + "approvalId" + ], + "type": "object" + }, + { + "properties": { + "availableTools": { + "items": { + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "name": { + "const": "AI_NoSuchToolError", + "type": "string" + }, + "toolInput": { + "type": [ + "string", + "null" + ] + }, + "toolName": { + "type": "string" + } + }, + "required": [ + "name", + "toolName" + ], + "type": "object" + }, + { + "properties": { + "cause": { + "$ref": "#/typeDefs/input/ErrorCause" + }, + "name": { + "const": "AI_InvalidToolInputError", + "type": "string" + }, + "toolInput": { + "type": "string" + }, + "toolName": { + "type": "string" + } + }, + "required": [ + "name", + "toolName", + "toolInput", + "cause" + ], + "type": "object" + }, + { + "properties": { + "cause": { + "$ref": "#/typeDefs/input/AiMuxError" + }, + "name": { + "const": "AI_ToolCallRepairError", + "type": "string" + }, + "originalError": { + "$ref": "#/typeDefs/input/AiMuxError" + } + }, + "required": [ + "name", + "originalError", + "cause" + ], + "type": "object" + }, + { + "properties": { + "cause": { + "anyOf": [ + { + "$ref": "#/typeDefs/input/ErrorCause" + }, + { + "type": "null" + } + ] + }, + "message": { + "type": "string" + }, + "name": { + "const": "AI_InvalidArgumentError", + "type": "string" + } + }, + "required": [ + "name", + "message" + ], + "type": "object" + }, + { + "properties": { + "cause": { + "anyOf": [ + { + "$ref": "#/typeDefs/input/ErrorCause" + }, + { + "type": "null" + } + ] + }, + "message": { + "type": "string" + }, + "name": { + "const": "AI_InvalidPromptError", + "type": "string" + } + }, + "required": [ + "name", + "message" + ], + "type": "object" + }, + { + "properties": { + "description": { + "type": "string" + }, + "envVar": { + "type": "string" + }, + "name": { + "const": "AI_LoadAPIKeyError", + "type": "string" + } + }, + "required": [ + "name", + "envVar", + "description" + ], + "type": "object" + }, + { + "properties": { + "envVar": { + "type": "string" + }, + "name": { + "const": "AI_LoadSettingError", + "type": "string" + }, + "settingName": { + "description": "`name` is the union's tag key, so the setting's name is `settingName`.", + "type": "string" + } + }, + "required": [ + "name", + "envVar", + "settingName" + ], + "type": "object" + }, + { + "properties": { + "message": { + "type": "string" + }, + "name": { + "const": "AI_TokenExpiredError", + "type": "string" + } + }, + "required": [ + "name", + "message" + ], + "type": "object" + }, + { + "properties": { + "message": { + "type": "string" + }, + "name": { + "const": "AI_UnsupportedFunctionalityError", + "type": "string" + } + }, + "required": [ + "name", + "message" + ], + "type": "object" + }, + { + "properties": { + "modelId": { + "type": "string" + }, + "modelType": { + "default": "", + "type": "string" + }, + "name": { + "const": "AI_NoSuchModelError", + "type": "string" + } + }, + "required": [ + "name", + "modelId" + ], + "type": "object" + }, + { + "properties": { + "availableProviders": { + "items": { + "type": "string" + }, + "type": "array" + }, + "modelId": { + "type": "string" + }, + "modelType": { + "type": "string" + }, + "name": { + "const": "AI_NoSuchProviderError", + "type": "string" + }, + "providerId": { + "type": "string" + } + }, + "required": [ + "name", + "providerId", + "modelId", + "modelType", + "availableProviders" + ], + "type": "object" + }, + { + "properties": { + "name": { + "const": "AI_MissingToolResultsError", + "type": "string" + }, + "toolCallIds": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "name", + "toolCallIds" + ], + "type": "object" + }, + { + "$ref": "#/typeDefs/input/ToolChoiceViolationError", + "properties": { + "name": { + "const": "AI_ToolChoiceViolationError", + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + { + "properties": { + "message": { + "type": "string" + }, + "name": { + "const": "TimeoutError", + "type": "string" + } + }, + "required": [ + "name", + "message" + ], + "type": "object" + }, + { + "properties": { + "message": { + "type": "string" + }, + "name": { + "const": "AbortError", + "type": "string" + } + }, + "required": [ + "name", + "message" + ], + "type": "object" + }, + { + "properties": { + "cause": { + "anyOf": [ + { + "$ref": "#/typeDefs/input/ErrorCause" + }, + { + "type": "null" + } + ] + }, + "message": { + "type": "string" + }, + "name": { + "const": "AI_Error", + "type": "string" + } + }, + "required": [ + "name", + "message" + ], + "type": "object" + } + ] + }, + "ApiCallError": { + "description": "What a failed API call observed — the field set of the AI SDK's\n`APICallError` (`statusCode` / `responseBody`), which this project's error\ntaxonomy mirrors (docs/internal/vercel-research/07-kernel-infrastructure.md).\n\nCarried by [`AiMuxError::ApiCall`] alone. There are no per-status\nvariants: a 401, 404 or 429 is an `ApiCall` error whose classification is\nread from `status_code`, exactly as the AI SDK reads\n`APICallError.statusCode`. Transport failures (connection reset, DNS,\nbody read) are `ApiCall` errors too — no response arrived, so\n`status_code` is `None` and `is_retryable` is `true`, exactly as the AI\nSDK's `handleFetchError` builds an `APICallError` with no `statusCode`\nand `isRetryable: true`. `message` holds the provider's text verbatim when\none is available; transport and parsing failures use a library message\nwith the source detail appended. The HTTP status is always a field, never\nbaked into the string; `Display` composes the human-readable form from the\nfields at print time, so nothing downstream has to parse it back out.\n\nEvery producer must provide the sanitized request URL and request values.\nThis keeps transport and response failures self-contained and matches the\nAI SDK's `APICallError` contract.", + "properties": { + "cause": { + "anyOf": [ + { + "$ref": "#/typeDefs/input/ErrorCause" + }, + { + "type": "null" + } + ], + "description": "The error this failure was built from (`APICallError.cause`): the\ntransport error with its source chain, the body parse error, or the\naimux error a response handler returned." + }, + "data": { + "description": "Parsed provider error data.", + "x-aimux-codec": "presence" + }, + "isRetryable": { + "default": false, + "description": "Whether retrying can help (`APICallError.isRetryable`) — stored at\nconstruction, exactly like the AI SDK: the response path computes it\nfrom the status (408/409/429 or 5xx), and the transport path (no response, so\nno status to compute from) sets it to `true` explicitly.", + "type": "boolean" + }, + "message": { + "description": "Human-readable failure text. Provider text is verbatim when available;\nlocally detected transport/parse failures include their source detail.\nNever includes an HTTP status prefix.", + "type": "string" + }, + "origin": { + "$ref": "#/typeDefs/input/ApiCallErrorOrigin", + "description": "The boundary this error was built at: before a response arrived, from\nan HTTP response, from an event inside an accepted stream, or locally.\nNot in the AI SDK's `APICallError`: a host deciding whether a retry\ncould replay output it already delivered cannot tell an HTTP 429 from\nan in-stream 429 frame by the status and response body. Omitted from\nthe JSON when `unknown`, which is also what an error serialized\nwithout the field reads back as." + }, + "providerCode": { + "description": "Provider's machine-readable code (OpenAI's `code`/`type`,\ne.g. `\"rate_limit_exceeded\"` vs `\"insufficient_quota\"`). Never an HTTP\nstatus. Our normalized take on `APICallError.data`.", + "type": [ + "string", + "null" + ] + }, + "requestBodyValues": { + "description": "Sanitized request values used to create the API request." + }, + "responseBody": { + "description": "The raw response body, verbatim (`APICallError.responseBody`) — the\nlossless evidence when `message`/`provider_code` are extractions.\n`None` when the error did not come from a response body.", + "type": [ + "string", + "null" + ] + }, + "responseHeaders": { + "additionalProperties": { + "type": "string" + }, + "description": "Sanitized response headers.", + "type": [ + "object", + "null" + ] + }, + "statusCode": { + "description": "HTTP status of the response, when it came from one\n(`APICallError.statusCode`). The HTTP layer fills the observed status\nfor every response-derived error. An error frame inside a stream\ncarries the status its provider maps it to, as upstream's provider\nstream errors do (OpenAI infers one from the frame's `code`/`type`,\nAnthropic from its error type); errors built without an HTTP exchange\nleave it `None`.", + "format": "uint16", + "maximum": 65535, + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "url": { + "description": "Sanitized request URL. Required for every API-derived failure.", + "type": "string" + } + }, + "required": [ + "url", + "requestBodyValues", + "message" + ], + "type": "object" + }, + "ApiCallErrorOrigin": { + "description": "Where an [`ApiCallError`] was built. Orthogonal to its `cause`, which\nsays what the underlying error was.", + "oneOf": [ + { + "const": "transport", + "description": "No complete response: connecting, sending, or reading the response\nbody failed (connection refused or reset, DNS, TLS, a broken body\nstream, a proxy that refused the tunnel). `status_code` is `None`\nunless the body broke after the status line arrived.", + "type": "string" + }, + { + "const": "httpResponse", + "description": "Built from an HTTP response before any stream output: a non-2xx\nstatus, a 2xx body that was too large or did not parse, an error the\nprovider reported in a 2xx body (a failed job when polling), or a\nredirect that could not be followed.", + "type": "string" + }, + { + "const": "streamEvent", + "description": "Built from an event inside an accepted stream: a provider error frame\n(SSE, AWS event stream, WebSocket) or a frame that could not be\ndecoded. The stream's HTTP status was 2xx; `status_code` is the one\nthe provider maps the event to.", + "type": "string" + }, + { + "const": "local", + "description": "Built by aimux with no response to point at, such as the exchange\nresponse timeout.", + "type": "string" + }, + { + "const": "unknown", + "description": "Not recorded: an error deserialized from input that predates the\nfield, or built by code that did not set it. Never inferred from the\nother fields.", + "type": "string" + } + ] + }, + "AspectRatio": { + "description": "Aspect ratio in `{width}:{height}` format (e.g. `\"16:9\"`).\n\nNewtype that enforces the `W:H` format used by V4 image and video\n`aspectRatio` options. Aligned with the TS template-literal type\n`` `${number}:${number}` ``.", + "type": "string" + }, + "AssistantContent": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "$ref": "#/typeDefs/input/AssistantContentPart" + }, + "type": "array" + } + ], + "description": "The content of an assistant message: a string or parts (upstream\n`AssistantContent`).", + "x-aimux-codec": "ordered-untagged" + }, + "AssistantContentPart": { + "description": "A part of an assistant message: upstream's `TextPart | CustomPart |\nFilePart | ReasoningPart | ReasoningFilePart | ToolCallPart |\nToolResultPart | ToolApprovalRequest`.", + "oneOf": [ + { + "description": "A text segment.", + "properties": { + "providerOptions": { + "additionalProperties": { + "additionalProperties": true, + "type": "object" + }, + "description": "Provider-specific options for this part.", + "type": [ + "object", + "null" + ] + }, + "text": { + "type": "string" + }, + "type": { + "const": "text", + "type": "string" + } + }, + "required": [ + "type", + "text" + ], + "type": "object" + }, + { + "description": "Provider-specific custom content.", + "properties": { + "kind": { + "$ref": "#/typeDefs/input/NamespacedKind" + }, + "providerOptions": { + "additionalProperties": { + "additionalProperties": true, + "type": "object" + }, + "type": [ + "object", + "null" + ] + }, + "type": { + "const": "custom", + "type": "string" + } + }, + "required": [ + "type", + "kind" + ], + "type": "object" + }, + { + "description": "A file (upstream `FilePart`, `provider-utils` `types/content-part.ts:62-102`):\n`data` is tagged `FileData` or a bare base64 string, URL string or\nprovider reference, and a `data:` URL's media type wins over\n`media_type` when the prompt is converted.", + "properties": { + "data": { + "$ref": "#/typeDefs/input/FilePartData" + }, + "filename": { + "type": [ + "string", + "null" + ] + }, + "mediaType": { + "type": "string" + }, + "providerOptions": { + "additionalProperties": { + "additionalProperties": true, + "type": "object" + }, + "type": [ + "object", + "null" + ] + }, + "type": { + "const": "file", + "type": "string" + } + }, + "required": [ + "type", + "data", + "mediaType" + ], + "type": "object" + }, + { + "description": "A reasoning / thinking segment produced by the model.\n\nThe AI SDK `ReasoningPart` has only `text` and `providerOptions`: a\nprovider's reasoning signature travels in its namespace (e.g.\n`anthropic.signature`, `bedrock.signature`), as the provider wrote it\ninto the response's provider metadata.", + "properties": { + "providerOptions": { + "additionalProperties": { + "additionalProperties": true, + "type": "object" + }, + "description": "Provider-specific options for this part (e.g.\n`anthropic.signature`, `anthropic.redactedData`,\n`anthropic.cacheControl`).", + "type": [ + "object", + "null" + ] + }, + "text": { + "type": "string" + }, + "type": { + "const": "reasoning", + "type": "string" + } + }, + "required": [ + "type", + "text" + ], + "type": "object" + }, + { + "description": "A file generated during reasoning (upstream `ReasoningFilePart`,\n`types/content-part.ts:146-180`).", + "properties": { + "data": { + "$ref": "#/typeDefs/input/ReasoningFilePartData" + }, + "mediaType": { + "type": "string" + }, + "providerOptions": { + "additionalProperties": { + "additionalProperties": true, + "type": "object" + }, + "type": [ + "object", + "null" + ] + }, + "type": { + "const": "reasoning-file", + "type": "string" + } + }, + "required": [ + "type", + "data", + "mediaType" + ], + "type": "object" + }, + { + "description": "A tool call requested by the model.", + "properties": { + "input": { + "description": "Arguments as a JSON value (usually an object)." + }, + "providerExecuted": { + "description": "Whether the tool call is executed by the provider rather than by\nthe client. Providers need it to replay server tool calls on a\nlater turn.", + "type": [ + "boolean", + "null" + ] + }, + "providerOptions": { + "additionalProperties": { + "additionalProperties": true, + "type": "object" + }, + "description": "Provider-specific options for this part (e.g.\n`anthropic.cacheControl`).", + "type": [ + "object", + "null" + ] + }, + "toolCallId": { + "type": "string" + }, + "toolName": { + "type": "string" + }, + "type": { + "const": "tool-call", + "type": "string" + } + }, + "required": [ + "type", + "toolCallId", + "toolName", + "input" + ], + "type": "object" + }, + { + "$ref": "#/typeDefs/input/ToolResultPart", + "description": "The result of a provider-executed tool call.", + "properties": { + "type": { + "const": "tool-result", + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "description": "A request to approve a tool call (upstream `ToolApprovalRequest`).\nNever sent to a provider: the conversion drops it and uses it to match\nthe user's [`ToolContentPart::ToolApprovalResponse`] to its tool call.", + "properties": { + "approvalId": { + "type": "string" + }, + "inputSchemaInput": { + "x-aimux-codec": "presence" + }, + "isAutomatic": { + "type": [ + "boolean", + "null" + ] + }, + "reason": { + "type": [ + "string", + "null" + ] + }, + "signature": { + "type": [ + "string", + "null" + ] + }, + "toolCallId": { + "type": "string" + }, + "type": { + "const": "tool-approval-request", + "type": "string" + } + }, + "required": [ + "type", + "approvalId", + "toolCallId" + ], + "type": "object" + } + ] + }, + "AudioInput": { + "description": "Audio input: raw bytes, a base64-encoded string, or a URL.\n\nThe JSON is a string, as in the AI SDK's JSON: base64 for bytes, the URL\ntext for a URL. Reading takes a string that parses as a URL as a URL and\nany other string as base64 (base64 has no `:`), as a file part's string\ndata is read (ai@7.0.127 `prompt/file-part-data.ts:89-141`).", + "type": "string" + }, + "BackendConfig": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "capacity": { + "format": "uint", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "type": { + "const": "ring", + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "directory": { + "type": "string" + }, + "type": { + "const": "jsonl", + "type": "string" + } + }, + "required": [ + "type", + "directory" + ], + "type": "object" + } + ] + }, + "CapturePolicy": { + "enum": [ + "full" + ], + "type": "string" + }, + "CatalogueFetchRequest": { + "additionalProperties": false, + "properties": { + "abort": { + "anyOf": [ + { + "$ref": "#/typeDefs/input/HandleId" + }, + { + "type": "null" + } + ], + "default": null + }, + "sourceUrl": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "CodexModeSpec": { + "description": "Access mode for the `codex` package in declarative configuration.", + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "apiKey": { + "anyOf": [ + { + "$ref": "#/typeDefs/input/StringOrEnv" + }, + { + "type": "null" + } + ] + }, + "type": { + "const": "apiKey", + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "accountId": { + "type": [ + "string", + "null" + ] + }, + "token": { + "$ref": "#/typeDefs/input/StringOrEnv" + }, + "type": { + "const": "chatGptAccount", + "type": "string" + } + }, + "required": [ + "type", + "token" + ], + "type": "object" + } + ] + }, + "CodexRefreshRequest": { + "additionalProperties": false, + "properties": { + "clientId": { + "type": "string" + }, + "refreshToken": { + "type": "string" + } + }, + "required": [ + "refreshToken", + "clientId" + ], + "type": "object" + }, + "ContentPart": { + "description": "A part of the content text generation returns: the AI SDK's core\n`ContentPart` (`ai` `generate-text/content-part.ts:12-33`), eleven kinds,\nseparate from the provider's [`GenerateContent`].\n\nTool calls are parsed, a provider tool result is a [`TypedToolResult`]\nor, when the provider marks it as an error, a [`TypedToolError`], and a\ngenerated file is wrapped as `{ file, providerMetadata }`, as upstream's\n`convertLanguageModelContent` builds them\n(`generate-text/convert-language-model-content.ts`).", + "oneOf": [ + { + "description": "Generated text.", + "properties": { + "providerMetadata": { + "additionalProperties": { + "additionalProperties": true, + "type": "object" + }, + "type": [ + "object", + "null" + ] + }, + "text": { + "type": "string" + }, + "type": { + "const": "text", + "type": "string" + } + }, + "required": [ + "type", + "text" + ], + "type": "object" + }, + { + "description": "Provider-specific content.", + "properties": { + "kind": { + "$ref": "#/typeDefs/input/NamespacedKind" + }, + "providerMetadata": { + "additionalProperties": { + "additionalProperties": true, + "type": "object" + }, + "type": [ + "object", + "null" + ] + }, + "type": { + "const": "custom", + "type": "string" + } + }, + "required": [ + "type", + "kind" + ], + "type": "object" + }, + { + "$ref": "#/typeDefs/input/ReasoningOutput", + "description": "A reasoning segment.", + "properties": { + "type": { + "const": "reasoning", + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "$ref": "#/typeDefs/input/GeneratedFileOutput", + "description": "A file generated as part of reasoning.", + "properties": { + "type": { + "const": "reasoning-file", + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "$ref": "#/typeDefs/input/Source", + "description": "A source / citation.", + "properties": { + "type": { + "const": "source", + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "description": "A generated file.", + "properties": { + "file": { + "$ref": "#/typeDefs/input/GeneratedFile" + }, + "providerMetadata": { + "additionalProperties": { + "additionalProperties": true, + "type": "object" + }, + "type": [ + "object", + "null" + ] + }, + "type": { + "const": "file", + "type": "string" + } + }, + "required": [ + "type", + "file" + ], + "type": "object" + }, + { + "$ref": "#/typeDefs/input/ToolCall", + "description": "A parsed tool call.", + "properties": { + "type": { + "const": "tool-call", + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "$ref": "#/typeDefs/input/TypedToolResult", + "description": "A tool result.", + "properties": { + "type": { + "const": "tool-result", + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "$ref": "#/typeDefs/input/TypedToolError", + "description": "A tool error: a provider tool result marked as an error, or the\nfailure of a tool call that could not be parsed.", + "properties": { + "type": { + "const": "tool-error", + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "$ref": "#/typeDefs/input/ToolApprovalRequestOutput", + "description": "A tool call that needs approval.", + "properties": { + "type": { + "const": "tool-approval-request", + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "$ref": "#/typeDefs/input/ToolApprovalResponseOutput", + "description": "The answer to a tool approval request.", + "properties": { + "type": { + "const": "tool-approval-response", + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + } + ] + }, + "CreateRecorderParams": { + "additionalProperties": false, + "properties": { + "backend": { + "$ref": "#/typeDefs/input/BackendConfig" + }, + "capturePolicy": { + "$ref": "#/typeDefs/input/CapturePolicy" + } + }, + "required": [ + "backend", + "capturePolicy" + ], + "type": "object" + }, + "CredentialParams": { + "additionalProperties": false, + "properties": { + "kind": { + "type": "string" + } + }, + "required": [ + "kind" + ], + "type": "object" + }, + "DecideOptions": { + "additionalProperties": false, + "description": "Options of [`decide`]: the call options plus the operation settings\n(`ai@7.0.128 src/decide/decide.ts:53-61`).", + "properties": { + "headers": { + "additionalProperties": { + "type": "string" + }, + "type": [ + "object", + "null" + ] + }, + "maxRetries": { + "description": "Maximum retries for transient provider failures. Defaults to 2.", + "format": "uint32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "providerOptions": { + "additionalProperties": { + "additionalProperties": true, + "type": "object" + }, + "type": [ + "object", + "null" + ] + }, + "questions": { + "additionalProperties": { + "$ref": "#/typeDefs/input/DecisionQuestion" + }, + "type": "object" + }, + "state": { + "$ref": "#/typeDefs/input/DecisionInput" + }, + "timeout": { + "anyOf": [ + { + "$ref": "#/typeDefs/input/TimeoutConfiguration" + }, + { + "type": "null" + } + ], + "description": "Operation deadline (aimux extension)." + } + }, + "required": [ + "state", + "questions" + ], + "type": "object" + }, + "DecisionBooleanCriteria": { + "additionalProperties": false, + "description": "The optional descriptions of a Boolean question's outcomes. An absent key\nand an explicit `null` differ: `Some(None)` is `null` (no description).\nOther keys are rejected: Boolean criteria may only describe `true` and\n`false` (`ai@7.0.128 src/decide/validate-decision.ts:94-105`).", + "properties": { + "false": { + "anyOf": [ + { + "$ref": "#/typeDefs/input/DecisionInput" + }, + { + "type": "null" + } + ], + "x-aimux-codec": "presence" + }, + "true": { + "anyOf": [ + { + "$ref": "#/typeDefs/input/DecisionInput" + }, + { + "type": "null" + } + ], + "x-aimux-codec": "presence" + } + }, + "type": "object" + }, + "DecisionDecideRequest": { + "additionalProperties": false, + "description": "Runtime controls surround the canonical business options; only the control\nobject rejects unknown fields. Dispatch resolves `abort` with the caller's\nowner before entering the handler and supplies its signal in `Ctx`.", + "properties": { + "abort": { + "anyOf": [ + { + "$ref": "#/typeDefs/input/HandleId" + }, + { + "type": "null" + } + ] + }, + "options": { + "$ref": "#/typeDefs/input/DecideOptions" + } + }, + "required": [ + "options" + ], + "type": "object" + }, + "DecisionInput": { + "anyOf": [ + { + "type": "string" + }, + { + "additionalProperties": true, + "type": "object" + }, + { + "items": true, + "type": "array" + } + ], + "description": "Shared state or structured instructions for a decision\n(`DecisionModelV4Input`: a string, a JSON object or a JSON array).", + "x-aimux-codec": "ordered-untagged" + }, + "DecisionQuestion": { + "description": "A judgment to make about the shared state (`DecisionModelV4Question`).", + "oneOf": [ + { + "properties": { + "criteria": { + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/typeDefs/input/DecisionInput" + }, + { + "type": "null" + } + ] + }, + "description": "Nonempty map of option names to descriptions; `None` means no\ndescription. Insertion order is the option order.", + "type": "object" + }, + "instructions": { + "$ref": "#/typeDefs/input/DecisionInput" + }, + "type": { + "const": "choice", + "type": "string" + } + }, + "required": [ + "type", + "instructions", + "criteria" + ], + "type": "object" + }, + { + "properties": { + "criteria": { + "description": "At least two ordered levels, indexed from zero.", + "items": { + "anyOf": [ + { + "$ref": "#/typeDefs/input/DecisionInput" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + "instructions": { + "$ref": "#/typeDefs/input/DecisionInput" + }, + "type": { + "const": "score", + "type": "string" + } + }, + "required": [ + "type", + "instructions", + "criteria" + ], + "type": "object" + }, + { + "properties": { + "criteria": { + "anyOf": [ + { + "$ref": "#/typeDefs/input/DecisionBooleanCriteria" + }, + { + "type": "null" + } + ] + }, + "instructions": { + "$ref": "#/typeDefs/input/DecisionInput" + }, + "type": { + "const": "boolean", + "type": "string" + } + }, + "required": [ + "type", + "instructions" + ], + "type": "object" + } + ] + }, + "EmbeddingCallOptions": { + "additionalProperties": false, + "description": "Options passed to [`EmbeddingModel::do_embed`].\n\nAligned with V4 `EmbeddingModelV4CallOptions`.", + "properties": { + "headers": { + "additionalProperties": { + "type": "string" + }, + "description": "Additional HTTP headers to send with the request.", + "type": [ + "object", + "null" + ] + }, + "maxRetries": { + "description": "Maximum number of retries, the AI SDK's `maxRetries`; `Some(0)` disables\nretrying. `None` uses 2, the AI SDK default.", + "format": "uint32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "providerOptions": { + "additionalProperties": { + "additionalProperties": true, + "type": "object" + }, + "description": "Additional provider-specific options, keyed by provider name.", + "type": [ + "object", + "null" + ] + }, + "timeout": { + "anyOf": [ + { + "$ref": "#/typeDefs/input/TimeoutConfiguration" + }, + { + "type": "null" + } + ], + "description": "Per-call operation timeout." + }, + "values": { + "description": "List of text values to generate embeddings for.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "values" + ], + "type": "object" + }, + "EmptyParams": { + "additionalProperties": false, + "type": "object" + }, + "EmptyParams2": { + "additionalProperties": false, + "type": "object" + }, + "EnvVarRef": { + "additionalProperties": false, + "description": "Reference to an environment variable carrying a credential or secret.", + "properties": { + "env": { + "type": "string" + } + }, + "required": [ + "env" + ], + "type": "object" + }, + "ErrorCause": { + "anyOf": [ + { + "$ref": "#/typeDefs/input/AiMuxError" + }, + { + "$ref": "#/typeDefs/input/SourceError" + } + ], + "description": "The error another error was built from: the AI SDK's `cause`.\n\nAn aimux error stays whole, as the AI SDK nests a `JSONParseError` in an\n`APICallError`; any other error is a [`SourceError`]. The JSON form is the\nnested error itself: a `name`-tagged aimux error, or `{ message, cause }`.", + "x-aimux-codec": "ordered-untagged" + }, + "Fallback": { + "enum": [ + "on-error", + "none" + ], + "type": "string" + }, + "FileBytes": { + "description": "Either raw bytes or a base64-encoded string (the AI SDK's\n`Uint8Array | string`).\n\nProviders should pass file data through without unnecessary conversion: if\nthe upstream API returns base64, return [`FileBytes::Base64`]; if it\nreturns binary, return [`FileBytes::Binary`].\n\nThe JSON is a base64 string either way, as in the AI SDK's JSON: `Binary`\nis written as base64 and parsing yields `Base64`. Two values are equal when\nthey hold the same bytes, whatever their form.", + "type": "string", + "x-aimux-codec": "base64" + }, + "FileData": { + "description": "File data as a tagged discriminated union.\n\nAligned with V4 `SharedV4FileData`.", + "oneOf": [ + { + "description": "Raw bytes (`Uint8Array`) or a base64-encoded string.", + "properties": { + "data": { + "$ref": "#/typeDefs/input/FileBytes" + }, + "type": { + "const": "data", + "type": "string" + } + }, + "required": [ + "type", + "data" + ], + "type": "object" + }, + { + "description": "A URL that points to the file.", + "properties": { + "originalUrl": { + "type": [ + "string", + "null" + ] + }, + "type": { + "const": "url", + "type": "string" + }, + "url": { + "type": "string" + } + }, + "required": [ + "type", + "url" + ], + "type": "object" + }, + { + "description": "A provider reference (`{ [provider]: id }`).", + "properties": { + "reference": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "type": { + "const": "reference", + "type": "string" + } + }, + "required": [ + "type", + "reference" + ], + "type": "object" + }, + { + "description": "Inline text content (e.g. an inline text document).", + "properties": { + "text": { + "type": "string" + }, + "type": { + "const": "text", + "type": "string" + } + }, + "required": [ + "type", + "text" + ], + "type": "object" + } + ] + }, + "FilePartData": { + "anyOf": [ + { + "$ref": "#/typeDefs/input/FileData", + "description": "`{ type: 'data' | 'url' | 'reference' | 'text', ... }`." + }, + { + "description": "A base64 string or a URL string.", + "type": "string" + }, + { + "additionalProperties": { + "type": "string" + }, + "description": "A bare provider reference.", + "type": "object" + } + ], + "description": "`FilePart.data` (`provider-utils` `types/content-part.ts:75`):\n`FileData | DataContent | URL | ProviderReference`, in JSON a tagged\n`FileData`, a string (base64 or a URL) or a bare `{ [provider]: id }`.\n\nA string is read as the AI SDK reads it when it converts the prompt\n(`ai` `prompt/file-part-data.ts:125-131`): a URL when it parses as one\n(a `data:` URL becomes inline data), base64 otherwise.", + "x-aimux-codec": "ordered-untagged" + }, + "FinishReasonUnified": { + "description": "Unified finish reason enum (aligned with V4 `LanguageModelV4FinishReason`).", + "enum": [ + "stop", + "length", + "content-filter", + "tool-calls", + "error", + "other" + ], + "type": "string" + }, + "FunctionTool": { + "description": "A tool definition passed to the model in `CallOptions.tools`.", + "properties": { + "description": { + "description": "Human-readable description.", + "type": [ + "string", + "null" + ] + }, + "inputExamples": { + "description": "Example inputs for the tool (V4 `inputExamples`), used by some providers\nto emit `input_examples` in the request body.", + "items": { + "$ref": "#/typeDefs/input/FunctionToolInputExample" + }, + "type": [ + "array", + "null" + ] + }, + "inputSchema": { + "description": "JSON Schema describing the tool's parameters." + }, + "name": { + "description": "Unique tool name.", + "type": "string" + }, + "providerOptions": { + "additionalProperties": { + "additionalProperties": true, + "type": "object" + }, + "description": "Provider-specific options, keyed by provider name\n(e.g. `{\"anthropic\": {\"eagerInputStreaming\": true}}`). Aligned with the\nV4 `providerOptions` field on function tools.", + "type": [ + "object", + "null" + ] + }, + "strict": { + "description": "Whether the tool supports strict schema enforcement (OpenAI strict mode).", + "type": [ + "boolean", + "null" + ] + } + }, + "required": [ + "name", + "inputSchema" + ], + "type": "object" + }, + "FunctionToolInputExample": { + "description": "An example input for a function tool.", + "properties": { + "input": { + "additionalProperties": true, + "type": "object" + } + }, + "required": [ + "input" + ], + "type": "object" + }, + "GenerateContent": { + "description": "A content item a provider returns (V4 `LanguageModelV4Content`). Text\ngeneration turns it into the core [`ContentPart`].", + "oneOf": [ + { + "description": "Generated text.", + "properties": { + "providerMetadata": { + "additionalProperties": { + "additionalProperties": true, + "type": "object" + }, + "type": [ + "object", + "null" + ] + }, + "text": { + "type": "string" + }, + "type": { + "const": "text", + "type": "string" + } + }, + "required": [ + "type", + "text" + ], + "type": "object" + }, + { + "$ref": "#/typeDefs/input/RawToolCall", + "description": "A tool call requested by the model. `input` is the provider's raw\nargument text; `generate_text` owns parsing, validation, and repair.", + "properties": { + "type": { + "const": "tool-call", + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "$ref": "#/typeDefs/input/Source", + "description": "A source / citation (e.g. URL citation from search-preview models).", + "properties": { + "type": { + "const": "source", + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "$ref": "#/typeDefs/input/ReasoningOutput", + "description": "A reasoning / thinking segment produced by the model.", + "properties": { + "type": { + "const": "reasoning", + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "$ref": "#/typeDefs/input/LanguageModelFile", + "description": "A file generated by the model (e.g. an image or document): the\nprovider's [`LanguageModelFile`].", + "properties": { + "type": { + "const": "file", + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "$ref": "#/typeDefs/input/LanguageModelFile", + "description": "A file generated as part of reasoning, with the same payload as `File`.", + "properties": { + "type": { + "const": "reasoning-file", + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "description": "Provider-specific content.", + "properties": { + "kind": { + "$ref": "#/typeDefs/input/NamespacedKind" + }, + "providerMetadata": { + "additionalProperties": { + "additionalProperties": true, + "type": "object" + }, + "type": [ + "object", + "null" + ] + }, + "type": { + "const": "custom", + "type": "string" + } + }, + "required": [ + "type", + "kind" + ], + "type": "object" + }, + { + "$ref": "#/typeDefs/input/RawToolApprovalRequest", + "description": "Approval required for a provider-executed tool call.", + "properties": { + "type": { + "const": "tool-approval-request", + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "$ref": "#/typeDefs/input/ToolResult", + "description": "A tool result from a provider-executed tool (e.g. xAI file_search,\nweb_search). Emitted alongside the preceding `ToolCall` when the\nprovider executes the tool server-side.", + "properties": { + "type": { + "const": "tool-result", + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + } + ] + }, + "GenerateTextOptions": { + "additionalProperties": false, + "description": "User-facing options for `generate_text` and `stream_text`.\n\nUnlike `CallOptions` (provider-facing), this does not include `prompt`\n(passed separately) and defaults are more ergonomic.\n\nUnknown keys are rejected (RFC-0042 §7.2): a host still writing aimux\n0.5's snake_case keys (`max_retries`, `timeout.total_ms`) gets an error\nnaming the key instead of the default it would silently fall back to.", + "properties": { + "frequencyPenalty": { + "format": "double", + "type": [ + "number", + "null" + ] + }, + "headers": { + "additionalProperties": { + "type": "string" + }, + "type": [ + "object", + "null" + ] + }, + "includeRawChunks": { + "description": "Emit raw provider stream chunks as `StreamPart::Raw` (debugging aid).", + "type": [ + "boolean", + "null" + ] + }, + "instructions": { + "description": "System instructions prepended to the prompt.", + "type": [ + "string", + "null" + ] + }, + "maxOutputTokens": { + "format": "uint32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "maxRetries": { + "description": "Maximum number of retries, the AI SDK's `maxRetries`; `Some(0)` disables\nretrying. `None` uses 2, the AI SDK default.", + "format": "uint32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "output": { + "anyOf": [ + { + "$ref": "#/typeDefs/input/Output" + }, + { + "type": "null" + } + ], + "description": "The structured output to generate, the AI SDK's `output`\n(`generate-text/output.ts`). It sets the model call's\n`response_format` and parses the final text into\n[`GenerateTextResult::output`]. `None` sends no response format and\ntakes the text as the output." + }, + "presencePenalty": { + "format": "double", + "type": [ + "number", + "null" + ] + }, + "providerOptions": { + "additionalProperties": { + "additionalProperties": true, + "type": "object" + }, + "type": [ + "object", + "null" + ] + }, + "reasoning": { + "anyOf": [ + { + "$ref": "#/typeDefs/input/ReasoningEffort" + }, + { + "type": "null" + } + ], + "description": "Top-level reasoning effort." + }, + "seed": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "sessionId": { + "description": "Session identifier, for grouping consecutive calls into a session\n(observability, see RFC-0024). Orthogonal to RFC-0019 session-affinity\nheaders. When `None` and the optional session inferer is enabled, one\nmay be inferred from prompt-prefix continuation.", + "type": [ + "string", + "null" + ] + }, + "stopSequences": { + "items": { + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "strictStream": { + "description": "Strict stream mode: end the stream with a terminal error when\nthe protocol's evidence of a complete reply is missing (the stream\nends without its terminal event, a block delta arrives outside a\nstarted block, a block starts twice). Client tool calls are delivered\nonly right before the finish. Off by default, as in the AI SDK.", + "type": [ + "boolean", + "null" + ] + }, + "temperature": { + "format": "double", + "type": [ + "number", + "null" + ] + }, + "timeout": { + "anyOf": [ + { + "$ref": "#/typeDefs/input/TimeoutConfiguration" + }, + { + "type": "null" + } + ], + "description": "Per-call timeout configuration (total / first-chunk / chunk idle)." + }, + "toolChoice": { + "anyOf": [ + { + "$ref": "#/typeDefs/input/ToolChoice" + }, + { + "type": "null" + } + ] + }, + "tools": { + "items": { + "$ref": "#/typeDefs/input/Tool" + }, + "type": [ + "array", + "null" + ] + }, + "topK": { + "format": "double", + "type": [ + "number", + "null" + ] + }, + "topP": { + "format": "double", + "type": [ + "number", + "null" + ] + } + }, + "type": "object" + }, + "GenerateTextResult": { + "description": "Result of `generate_text` and of a consumed `stream_text`: the AI SDK's\n`GenerateTextResult` (ai@7.0.127 `generate-text/generate-text-result.ts`).\n\nIt stores the steps, the usage summed over them and the parsed output, as\n`DefaultGenerateTextResult` does (`generate-text.ts:1691-1808`); every\nother value is derived from the steps by an accessor. The serialized form\nis a snapshot that writes the derived values next to the stored ones, so\na binding reads `text`, `tool_calls`, `usage` and the rest directly. Only\n`steps`, `total_usage` and `output` are read back.", + "properties": { + "output": { + "default": null, + "x-aimux-codec": "presence" + }, + "steps": { + "items": { + "$ref": "#/typeDefs/input/StepResult" + }, + "minItems": 1, + "type": "array" + }, + "totalUsage": { + "$ref": "#/typeDefs/input/LanguageModelUsage" + } + }, + "required": [ + "steps", + "totalUsage" + ], + "type": "object" + }, + "GeneratedFile": { + "description": "A generated file (`ai` `generate-text/generated-file.ts:10-32`), the\nelement of the text results' `files`.\n\nIts JSON is `{ base64, mediaType, providerMetadata? }`: the AI SDK's\n`GeneratedFile` exposes the bytes as `base64` and as `uint8Array`, and the\nJSON carries them once, as the base64 string. Text generation downloads a\nprovider's URL file before it builds one (`resolve-generated-file-data.ts`).", + "properties": { + "base64": { + "$ref": "#/typeDefs/input/FileBytes", + "description": "The file's bytes, `base64` in the JSON." + }, + "mediaType": { + "type": "string" + }, + "providerMetadata": { + "additionalProperties": { + "additionalProperties": true, + "type": "object" + }, + "type": [ + "object", + "null" + ] + } + }, + "required": [ + "base64", + "mediaType" + ], + "type": "object" + }, + "GeneratedFileData": { + "description": "Data or a URL returned for a generated file.", + "oneOf": [ + { + "properties": { + "data": { + "$ref": "#/typeDefs/input/FileBytes" + }, + "type": { + "const": "data", + "type": "string" + } + }, + "required": [ + "type", + "data" + ], + "type": "object" + }, + { + "properties": { + "originalUrl": { + "type": [ + "string", + "null" + ] + }, + "type": { + "const": "url", + "type": "string" + }, + "url": { + "type": "string" + } + }, + "required": [ + "type", + "url" + ], + "type": "object" + } + ] + }, + "GeneratedFileOutput": { + "description": "A file part of text generation, `{ file, providerMetadata? }` under the\n`file` or `reasoning-file` tag (`ai`\n`generate-text/convert-language-model-content.ts:55-70`,\n`stream-language-model-call.ts:569-590`). The part carries the provider\nmetadata; the file itself has none.", + "properties": { + "file": { + "$ref": "#/typeDefs/input/GeneratedFile" + }, + "providerMetadata": { + "additionalProperties": { + "additionalProperties": true, + "type": "object" + }, + "type": [ + "object", + "null" + ] + } + }, + "required": [ + "file" + ], + "type": "object" + }, + "HandleId": { + "description": "Global scope is 0; live resource identifiers are never reused.", + "minLength": 1, + "not": { + "pattern": "[^0-9]" + }, + "pattern": "^0*(0|[1-9][0-9]{0,18}|1[0-7][0-9]{18}|18[0-3][0-9]{17}|184[0-3][0-9]{16}|1844[0-5][0-9]{15}|18446[0-6][0-9]{14}|184467[0-3][0-9]{13}|1844674[0-3][0-9]{12}|184467440[0-6][0-9]{10}|1844674407[0-2][0-9]{9}|18446744073[0-6][0-9]{8}|1844674407370[0-8][0-9]{6}|18446744073709[0-4][0-9]{5}|184467440737095[0-4][0-9]{4}|1844674407370955[0-0][0-9]{3}|18446744073709551[0-5][0-9]{2}|184467440737095516[0-0][0-9]{1}|1844674407370955161[0-4][0-9]{0}|18446744073709551615)$", + "type": "string", + "x-aimux-codec": "u64-string" + }, + "ImageCallOptions": { + "additionalProperties": false, + "description": "Options passed to [`ImageModel::do_generate`].\n\nAligned with V4 `ImageModelV4CallOptions`.", + "properties": { + "aspectRatio": { + "anyOf": [ + { + "$ref": "#/typeDefs/input/AspectRatio" + }, + { + "type": "null" + } + ], + "description": "Aspect ratio of the images, in `{width}:{height}` format.\n`None` uses the provider's default aspect ratio." + }, + "files": { + "description": "Images for image editing or variation generation.", + "items": { + "$ref": "#/typeDefs/input/ImageFile" + }, + "type": [ + "array", + "null" + ] + }, + "headers": { + "additionalProperties": { + "type": "string" + }, + "description": "Additional HTTP headers to send with the request.", + "type": [ + "object", + "null" + ] + }, + "mask": { + "anyOf": [ + { + "$ref": "#/typeDefs/input/ImageFile" + }, + { + "type": "null" + } + ], + "description": "Mask image for inpainting operations." + }, + "maxRetries": { + "description": "Maximum number of retries, the AI SDK's `maxRetries`; `Some(0)` disables\nretrying. `None` uses 2, the AI SDK default.", + "format": "uint32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "n": { + "description": "Number of images to generate.", + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "prompt": { + "description": "Prompt for the image generation. `None` for operations (e.g. upscaling)\nthat do not require a prompt.", + "type": [ + "string", + "null" + ] + }, + "providerOptions": { + "additionalProperties": { + "additionalProperties": true, + "type": "object" + }, + "description": "Additional provider-specific options, keyed by provider name.", + "type": "object" + }, + "seed": { + "description": "Seed for deterministic generation. `None` uses the provider's default.", + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "size": { + "anyOf": [ + { + "$ref": "#/typeDefs/input/Size" + }, + { + "type": "null" + } + ], + "description": "Size of the images, in `{width}x{height}` format.\n`None` uses the provider's default size." + }, + "timeout": { + "anyOf": [ + { + "$ref": "#/typeDefs/input/TimeoutConfiguration" + }, + { + "type": "null" + } + ], + "description": "Per-call operation timeout." + } + }, + "required": [ + "n", + "providerOptions" + ], + "type": "object" + }, + "ImageFile": { + "description": "An image file used for image editing or variation generation.\n\nAligned with V4 `ImageModelV4File`.", + "oneOf": [ + { + "description": "Inline file data (base64 or binary) with an explicit media type.", + "properties": { + "data": { + "$ref": "#/typeDefs/input/ImageFileData", + "description": "File data as base64 string or binary bytes." + }, + "mediaType": { + "description": "IANA media type, e.g. `\"image/png\"`.", + "type": "string" + }, + "type": { + "const": "file", + "type": "string" + } + }, + "required": [ + "type", + "mediaType", + "data" + ], + "type": "object" + }, + { + "description": "A URL pointing to the image.", + "properties": { + "type": { + "const": "url", + "type": "string" + }, + "url": { + "description": "The URL of the image file.", + "type": "string" + } + }, + "required": [ + "type", + "url" + ], + "type": "object" + } + ] + }, + "ImageFileData": { + "description": "File payload for an [`ImageFile::File`]: base64 string or raw bytes.\n\nThe JSON is a base64 string either way, as in the AI SDK's JSON.", + "type": "string", + "x-aimux-codec": "base64" + }, + "InputAudioFormat": { + "additionalProperties": false, + "description": "The input audio format for a streaming transcription request.", + "properties": { + "formatType": { + "description": "Audio format type, e.g. `\"audio/pcm\"`, `\"audio/pcmu\"`, `\"audio/pcma\"`.", + "type": "string" + }, + "rate": { + "description": "Sample rate in Hz. Only applicable for formats that require a rate.", + "format": "uint32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "formatType" + ], + "type": "object" + }, + "InputTokenDetails": { + "description": "`LanguageModelUsage.inputTokenDetails`.", + "properties": { + "cacheReadTokens": { + "description": "Input tokens read from a cache.", + "format": "uint32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "cacheWriteTokens": { + "description": "Input tokens written to a cache.", + "format": "uint32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "noCacheTokens": { + "description": "Input tokens that were not read from or written to a cache.", + "format": "uint32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + } + }, + "type": "object" + }, + "LanguageModelFile": { + "description": "A file in a provider's output: `LanguageModelV4File` /\n`LanguageModelV4ReasoningFile` (`provider`\n`language-model/v4/language-model-v4-file.ts`), whose `data` is base64\ndata or a URL. The payload of the provider-level `GenerateContent::File` /\n`ReasoningFile` and `StreamPart::File` / `ReasoningFile`.", + "properties": { + "data": { + "$ref": "#/typeDefs/input/GeneratedFileData" + }, + "mediaType": { + "type": "string" + }, + "providerMetadata": { + "additionalProperties": { + "additionalProperties": true, + "type": "object" + }, + "type": [ + "object", + "null" + ] + } + }, + "required": [ + "data", + "mediaType" + ], + "type": "object" + }, + "LanguageModelUsage": { + "description": "Token usage of a generation step or a whole call: the AI SDK's\n`LanguageModelUsage` (ai@7.0.127 `types/usage.ts:10-68`).\n\nThe user-facing counterpart of the provider-level [`Usage`]: flat totals\nplus detail objects, converted with [`as_language_model_usage`] and summed\nacross steps with [`add_language_model_usage`]. Unknown counts stay `None`,\nnever zero, and are absent from the JSON, as `JSON.stringify` drops an\n`undefined` count; the detail objects are always present.", + "properties": { + "inputTokenDetails": { + "$ref": "#/typeDefs/input/InputTokenDetails", + "default": {}, + "description": "Breakdown of the input tokens." + }, + "inputTokens": { + "description": "Total input (prompt) tokens.", + "format": "uint32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "outputTokenDetails": { + "$ref": "#/typeDefs/input/OutputTokenDetails", + "default": {}, + "description": "Breakdown of the output tokens." + }, + "outputTokens": { + "description": "Total output (completion) tokens.", + "format": "uint32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "raw": { + "additionalProperties": true, + "description": "The provider's raw usage object, passed through unchanged.", + "type": [ + "object", + "null" + ] + }, + "totalTokens": { + "description": "Input plus output tokens, when either is known.", + "format": "uint32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + } + }, + "type": "object" + }, + "LanguageModelV4ToolChoice": { + "description": "How a model call should choose tools: the V4 `LanguageModelV4ToolChoice`\n(`@ai-sdk/provider@4.0.21\nsrc/language-model/v4/language-model-v4-tool-choice.ts:1-5`), carried by\n[`CallOptions::tool_choice`](crate::options::CallOptions::tool_choice).\n\nAlways an object tagged by `type`, unlike the user-level [`ToolChoice`].", + "oneOf": [ + { + "description": "The model decides whether to call a tool.", + "properties": { + "type": { + "const": "auto", + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "description": "The model must not call a tool.", + "properties": { + "type": { + "const": "none", + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "description": "The model must call one of the available tools.", + "properties": { + "type": { + "const": "required", + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "description": "The model must call the named tool.", + "properties": { + "toolName": { + "type": "string" + }, + "type": { + "const": "tool", + "type": "string" + } + }, + "required": [ + "type", + "toolName" + ], + "type": "object" + } + ] + }, + "LiveTarget": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "handle": { + "$ref": "#/typeDefs/input/HandleId" + }, + "kind": { + "const": "model", + "type": "string" + } + }, + "required": [ + "kind", + "handle" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "handle": { + "$ref": "#/typeDefs/input/HandleId" + }, + "kind": { + "const": "registry", + "type": "string" + } + }, + "required": [ + "kind", + "handle" + ], + "type": "object" + } + ] + }, + "LogLevel": { + "enum": [ + "off", + "error", + "warn", + "info", + "debug", + "trace" + ], + "type": "string" + }, + "LoggingConfig": { + "additionalProperties": false, + "properties": { + "level": { + "$ref": "#/typeDefs/input/LogLevel" + } + }, + "required": [ + "level" + ], + "type": "object" + }, + "MiddlewareAuditMode": { + "enum": [ + "disabled", + "shared", + "strict" + ], + "type": "string" + }, + "MiddlewareParams": { + "additionalProperties": false, + "properties": { + "auditMode": { + "anyOf": [ + { + "$ref": "#/typeDefs/input/MiddlewareAuditMode" + }, + { + "type": "null" + } + ] + }, + "kind": { + "type": "string" + }, + "scopeName": { + "type": [ + "string", + "null" + ] + }, + "traceStore": { + "anyOf": [ + { + "$ref": "#/typeDefs/input/HandleId" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "kind" + ], + "type": "object" + }, + "MoaFailMode": { + "description": "Reference-failure policy.", + "oneOf": [ + { + "const": "best-effort", + "description": "Drop a failed reference + emit a `Warning::Other`; keep going (default).", + "type": "string" + }, + { + "const": "fail-fast", + "description": "Fail the whole call as soon as any reference errors.", + "type": "string" + } + ] + }, + "MoaParams": { + "additionalProperties": false, + "description": "MoA configuration, camelCase JSON with every field optional. Unknown keys\nare rejected, so aimux 0.5's `fail_mode` is an error naming it rather than\nthe default policy.", + "properties": { + "aggregator": { + "type": "string" + }, + "aggregatorInstructions": { + "default": null, + "description": "Optional aggregator system instruction prepended to the reference user\nmessage. `None` uses a built-in default.", + "type": [ + "string", + "null" + ] + }, + "failMode": { + "$ref": "#/typeDefs/input/MoaFailMode", + "description": "Reference-failure policy." + }, + "modelId": { + "default": "moa", + "description": "`model_id()` value (default `\"moa\"`).", + "type": "string" + }, + "providerName": { + "default": "moa", + "description": "`provider()` value (default `\"moa\"`).", + "type": "string" + }, + "references": { + "items": { + "type": "string" + }, + "type": "array" + }, + "stripReferenceTools": { + "default": true, + "description": "Strip `tools` / `tool_choice` from reference calls so references stay\ncheap (Hermes: references don't carry tool schemas). Default `true`.", + "type": "boolean" + } + }, + "required": [ + "references", + "aggregator" + ], + "type": "object" + }, + "ModelInfoParams": { + "additionalProperties": false, + "type": "object" + }, + "ModelMessage": { + "description": "A single user-facing chat message, a union by role.", + "oneOf": [ + { + "description": "Upstream `SystemModelMessage`.", + "properties": { + "content": { + "type": "string" + }, + "providerOptions": { + "additionalProperties": { + "additionalProperties": true, + "type": "object" + }, + "type": [ + "object", + "null" + ] + }, + "role": { + "const": "system", + "type": "string" + } + }, + "required": [ + "role", + "content" + ], + "type": "object" + }, + { + "description": "Upstream `UserModelMessage`.", + "properties": { + "content": { + "$ref": "#/typeDefs/input/UserContent" + }, + "providerOptions": { + "additionalProperties": { + "additionalProperties": true, + "type": "object" + }, + "type": [ + "object", + "null" + ] + }, + "role": { + "const": "user", + "type": "string" + } + }, + "required": [ + "role", + "content" + ], + "type": "object" + }, + { + "description": "Upstream `AssistantModelMessage`.", + "properties": { + "content": { + "$ref": "#/typeDefs/input/AssistantContent" + }, + "providerOptions": { + "additionalProperties": { + "additionalProperties": true, + "type": "object" + }, + "type": [ + "object", + "null" + ] + }, + "role": { + "const": "assistant", + "type": "string" + } + }, + "required": [ + "role", + "content" + ], + "type": "object" + }, + { + "description": "Upstream `ToolModelMessage`.", + "properties": { + "content": { + "items": { + "$ref": "#/typeDefs/input/ToolContentPart" + }, + "type": "array" + }, + "providerOptions": { + "additionalProperties": { + "additionalProperties": true, + "type": "object" + }, + "type": [ + "object", + "null" + ] + }, + "role": { + "const": "tool", + "type": "string" + } + }, + "required": [ + "role", + "content" + ], + "type": "object" + } + ] + }, + "ModelMethod": { + "enum": [ + "languageModel", + "chat", + "responses", + "completion", + "messages", + "embeddingModel", + "imageModel", + "speechModel", + "transcriptionModel", + "rerankingModel", + "videoModel", + "searchModel", + "decision" + ], + "type": "string" + }, + "ModelPrompt": { + "anyOf": [ + { + "description": "A plain string prompt — equivalent to a single user message.", + "type": "string" + }, + { + "description": "A list of chat messages.", + "items": { + "$ref": "#/typeDefs/input/ModelMessage" + }, + "type": "array" + } + ], + "description": "What the user passes as `prompt` to `generate_text` / `stream_text`.\n\nCan be a simple string (converted to a single user message) or a list of messages.", + "x-aimux-codec": "ordered-untagged" + }, + "ModelRef": { + "additionalProperties": false, + "properties": { + "key": { + "type": "string" + }, + "method": { + "$ref": "#/typeDefs/input/ModelMethod" + }, + "modelId": { + "type": "string" + }, + "namespace": { + "type": "string" + } + }, + "required": [ + "namespace", + "key", + "method", + "modelId" + ], + "type": "object" + }, + "ModelResolveParams": { + "additionalProperties": false, + "properties": { + "modelRef": { + "$ref": "#/typeDefs/input/ModelRef" + } + }, + "required": [ + "modelRef" + ], + "type": "object" + }, + "ModelWrapParams": { + "additionalProperties": false, + "properties": { + "middleware": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "middleware" + ], + "type": "object" + }, + "NamespacedKind": { + "description": "A `${string}.${string}` identifier, `.`: the V4\nprovider tool `id` (`@ai-sdk/provider@4.0.21\nsrc/language-model/v4/language-model-v4-provider-tool.ts:17`) and custom\ncontent `kind` (`language-model-v4-custom-content.ts:13`,\n`language-model-v4-prompt.ts:138`).\n\nThe TypeScript type admits any string with a `.`; a value without one\ndoes not construct or deserialize.", + "pattern": "\\.", + "type": "string" + }, + "OpenAiOutputRequest": { + "additionalProperties": false, + "properties": { + "metadataNamespace": { + "type": "string" + }, + "result": { + "$ref": "#/typeDefs/input/GenerateTextResult" + } + }, + "required": [ + "result", + "metadataNamespace" + ], + "type": "object" + }, + "OpenAiTextRequest": { + "additionalProperties": false, + "properties": { + "abort": { + "anyOf": [ + { + "$ref": "#/typeDefs/input/HandleId" + }, + { + "type": "null" + } + ], + "default": null + }, + "options": { + "$ref": "#/typeDefs/input/Options" + }, + "prompt": { + "$ref": "#/typeDefs/input/ModelPrompt" + }, + "streamOptions": { + "$ref": "#/typeDefs/input/StreamOptions" + } + }, + "required": [ + "prompt" + ], + "type": "object" + }, + "OperationNextParams": { + "additionalProperties": false, + "properties": { + "timeoutMs": { + "default": 0, + "format": "uint64", + "minimum": 0, + "type": "integer" + } + }, + "type": "object" + }, + "Options": { + "additionalProperties": false, + "description": "User-facing options for `generate_text` and `stream_text`.\n\nUnlike `CallOptions` (provider-facing), this does not include `prompt`\n(passed separately) and defaults are more ergonomic.\n\nUnknown keys are rejected (RFC-0042 §7.2): a host still writing aimux\n0.5's snake_case keys (`max_retries`, `timeout.total_ms`) gets an error\nnaming the key instead of the default it would silently fall back to.", + "properties": { + "frequencyPenalty": { + "format": "double", + "type": [ + "number", + "null" + ] + }, + "headers": { + "additionalProperties": { + "type": "string" + }, + "type": [ + "object", + "null" + ] + }, + "includeRawChunks": { + "description": "Emit raw provider stream chunks as `StreamPart::Raw` (debugging aid).", + "type": [ + "boolean", + "null" + ] + }, + "instructions": { + "description": "System instructions prepended to the prompt.", + "type": [ + "string", + "null" + ] + }, + "maxOutputTokens": { + "format": "uint32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "maxRetries": { + "description": "Maximum number of retries, the AI SDK's `maxRetries`; `Some(0)` disables\nretrying. `None` uses 2, the AI SDK default.", + "format": "uint32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "output": { + "anyOf": [ + { + "$ref": "#/typeDefs/input/Output" + }, + { + "type": "null" + } + ], + "description": "The structured output to generate, the AI SDK's `output`\n(`generate-text/output.ts`). It sets the model call's\n`response_format` and parses the final text into\n[`GenerateTextResult::output`]. `None` sends no response format and\ntakes the text as the output." + }, + "presencePenalty": { + "format": "double", + "type": [ + "number", + "null" + ] + }, + "providerOptions": { + "additionalProperties": { + "additionalProperties": true, + "type": "object" + }, + "type": [ + "object", + "null" + ] + }, + "reasoning": { + "anyOf": [ + { + "$ref": "#/typeDefs/input/ReasoningEffort" + }, + { + "type": "null" + } + ], + "description": "Top-level reasoning effort." + }, + "seed": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "sessionId": { + "description": "Session identifier, for grouping consecutive calls into a session\n(observability, see RFC-0024). Orthogonal to RFC-0019 session-affinity\nheaders. When `None` and the optional session inferer is enabled, one\nmay be inferred from prompt-prefix continuation.", + "type": [ + "string", + "null" + ] + }, + "stopSequences": { + "items": { + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "strictStream": { + "description": "Strict stream mode: end the stream with a terminal error when\nthe protocol's evidence of a complete reply is missing (the stream\nends without its terminal event, a block delta arrives outside a\nstarted block, a block starts twice). Client tool calls are delivered\nonly right before the finish. Off by default, as in the AI SDK.", + "type": [ + "boolean", + "null" + ] + }, + "temperature": { + "format": "double", + "type": [ + "number", + "null" + ] + }, + "timeout": { + "anyOf": [ + { + "$ref": "#/typeDefs/input/TimeoutConfiguration" + }, + { + "type": "null" + } + ], + "description": "Per-call timeout configuration (total / first-chunk / chunk idle)." + }, + "toolChoice": { + "anyOf": [ + { + "$ref": "#/typeDefs/input/ToolChoice" + }, + { + "type": "null" + } + ] + }, + "tools": { + "items": { + "$ref": "#/typeDefs/input/Tool" + }, + "type": [ + "array", + "null" + ] + }, + "topK": { + "format": "double", + "type": [ + "number", + "null" + ] + }, + "topP": { + "format": "double", + "type": [ + "number", + "null" + ] + } + }, + "type": "object" + }, + "Output": { + "description": "What the final text of a generation is parsed into.\n\nUpstream's `Output` is a JavaScript object with functions and has no JSON\nform; aimux's JSON follows the public JSON rules: tagged by `type` with the\noutput kind (upstream's mode `name`, `output.ts:68`, `:114`, `:241`, `:520`, `:657`;\nthe field `name` stays the schema name), and the arguments of\n`Output.object()` / `array()` / `choice()` / `json()` camelCase\n(`{\"type\":\"array\",\"element\":{...},\"minItems\":1}`).", + "oneOf": [ + { + "description": "The text itself (`Output.text()`).", + "properties": { + "type": { + "const": "text", + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "description": "A JSON object matching `schema` (`Output.object()`).", + "properties": { + "description": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": [ + "string", + "null" + ] + }, + "schema": true, + "type": { + "const": "object", + "type": "string" + } + }, + "required": [ + "type", + "schema" + ], + "type": "object" + }, + { + "description": "An array of elements matching `element` (`Output.array()`). The model\nis asked for `{\"elements\": [...]}`.", + "properties": { + "description": { + "type": [ + "string", + "null" + ] + }, + "element": true, + "maxItems": { + "format": "uint32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "minItems": { + "format": "uint32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "name": { + "type": [ + "string", + "null" + ] + }, + "type": { + "const": "array", + "type": "string" + } + }, + "required": [ + "type", + "element" + ], + "type": "object" + }, + { + "description": "One of `options` (`Output.choice()`). The model is asked for\n`{\"result\": \"