Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
438 commits
Select commit Hold shift + click to select a range
f4c5fe0
fix(providers): the layer 6 transcription models refuse URL audio
claude Oct 13, 2026
87544a5
fix(core)!: file content parts are the AI SDK FilePart (#232 C35)
claude Oct 13, 2026
c3846ba
test(anthropic): an unparsable stream chunk is an error part
claude Oct 13, 2026
ac0d061
fix(providers): Cohere, Open Responses and xAI Responses declare thei…
claude Oct 13, 2026
19a9a3c
fix(core)!: generated files are {base64, mediaType} (#232 C46)
claude Oct 13, 2026
317ebcd
test: restore the hand-written unit tests 48a92aaf deleted that still…
claude Oct 13, 2026
d062be3
fix(codex): Codex models declare the OpenAI Responses supported URLs
claude Oct 13, 2026
3f389ba
fix(huggingface): pin @ai-sdk/huggingface 2.0.62 and declare its supp…
claude Oct 13, 2026
97c6fbc
fix(core)!: timestamps are toISOString() strings (#232 C48)
claude Oct 13, 2026
bc013ad
chore(node): export the generated Timestamp type (#232 C48)
claude Oct 13, 2026
c71fae0
Merge [6/8] into [7/8]: layer 6 with layers 2-5 (V4 types, operation …
claude Oct 13, 2026
21719b5
fix(core)!: text and reasoning stream deltas carry text (#229 B9)
claude Oct 13, 2026
e8279c4
fix: layer 7 code takes layers 2-6's types
claude Oct 13, 2026
635a3f4
test(providers): the layer 7 transcription models refuse URL audio
claude Oct 13, 2026
f94eadb
fix(core): decide runs its model call in the operation settings
claude Oct 13, 2026
3d78123
refactor(core)!: provider namespace maps keep insertion order (#229 N…
claude Oct 13, 2026
efd10d6
test(kotlin): the OpenAI decision test sends the fixture's options in…
claude Oct 13, 2026
6aa327d
docs(node): regenerate index.d.ts for applyToolCallRepair's doc
claude Oct 13, 2026
35711cb
test(node): the reasoning replay test gives its tool call a result
claude Oct 13, 2026
dcc11f8
Merge [3/8] into [4/8]: the reasoning replay test gives its tool call…
claude Oct 13, 2026
18e3e0e
test(bindings): the DeepSeek usage.raw tests read the step usage
claude Oct 13, 2026
4ce9aa0
docs(node): regenerate index.d.ts for applyToolCallRepair's doc
claude Oct 13, 2026
cfe290a
Merge [4/8] into [5/8]: binding tests follow layers 3 and 4
claude Oct 13, 2026
8bef2c9
Merge [5/8] into [6/8]: binding tests follow layers 3 and 4
claude Oct 13, 2026
1602ed8
Merge [6/8] into [7/8]: binding tests follow layers 3 and 4
claude Oct 13, 2026
5415fea
test(swift): the OpenAI decision test sends the fixture's options in …
claude Oct 13, 2026
f69a33f
fix(core)!: standalone tool calls and sources carry their type tag (#…
claude Oct 13, 2026
af252bb
fix(core)!: integral tool input numbers are written as JavaScript wri…
claude Oct 13, 2026
f42526b
docs(rfc): RFC-0035 shows the final repair wire and upstream's contro…
claude Oct 13, 2026
4b200a5
test(node,python): decision usage omits unknown totals, never null
claude Oct 13, 2026
38770b5
fix(core): keep recording schema 2 and read the recordings master writes
claude Oct 13, 2026
9d01eb5
chore(core): keep the removed key-source field name out of code
claude Oct 13, 2026
a382242
Merge [5/8] into [6/8]: recording schema 2, master recordings load
claude Oct 13, 2026
7294e13
Merge [6/8] into [7/8]: recording schema 2, master recordings load
claude Oct 13, 2026
370f077
docs(changelog): legacy vertex and bedrock keys are still read and wr…
claude Oct 13, 2026
4cb1e53
Merge [5/8] into [6/8]: CHANGELOG wording for legacy namespace keys
claude Oct 13, 2026
9fcc401
Merge [6/8] into [7/8]: CHANGELOG wording for legacy namespace keys
claude Oct 13, 2026
3bae669
docs(changelog): decision recordings carry no capability snapshot
claude Oct 13, 2026
3949042
Merge [7/8] into [8/8]: layer 7 (decisions, speech usage, layers 2-6)…
claude Oct 13, 2026
2da6fa9
fix(go)!: Error.Data keeps a null API call error data apart from none
claude Oct 13, 2026
7a9a4e7
docs: RFC-0035 names the tests that pin repair; RFC-0026 deltas carry…
claude Oct 13, 2026
c9d99c9
refactor!: text results' usage, steps, tool outputs and Output follow…
claude Oct 13, 2026
1f6d61e
docs(rfc): RFC-0036's stream example writes the public JSON
claude Oct 13, 2026
a8fb12f
Merge [7/8] into [8/8]: recording schema 2, master recordings load
claude Oct 13, 2026
6b214ac
refactor!: decisions follow the public JSON
claude Oct 13, 2026
87e652c
docs: fix two rustdoc links that fail cargo doc -D warnings
claude Oct 13, 2026
ee60e4e
Merge [6/8] into [7/8]: rustdoc link fixes
claude Oct 13, 2026
58572b3
Merge [5/8] into [6/8]: rustdoc link fixes
claude Oct 13, 2026
48083ff
docs: plain code spans for the private stream_transcription methods
claude Oct 13, 2026
6d51fe7
Merge [7/8] into [8/8]: rustdoc link fixes
claude Oct 13, 2026
e2e9ca4
Merge branch 'v4/8-public-json-equals-the-ai-sdk-json' into v4/9-rewr…
claude Oct 14, 2026
75cfef6
Merge branch 'v4/9-rewrite-json-repair-in-idiomatic-rust' into v4/10-…
claude Oct 14, 2026
2b42899
Merge branch 'v4/10-tool-call-repair-is-a-trait' into v4/11-provider-…
claude Oct 14, 2026
c94e8d7
Merge branch 'v4/11-provider-config-is-plain-data' into v4/12-vendor-…
claude Oct 14, 2026
03b43b7
ci: speed up test builds, deduplicate caches, and use prebuilt cargo-ndk
cunninghamcard-bit Oct 14, 2026
f755c28
test(flutter): typed stream fixtures are JSON maps; the chat mock is …
claude Oct 14, 2026
5590fa3
Merge branch 'v4/12-vendor-streams-are-transformer-structs' into v4/1…
claude Oct 14, 2026
9ab9dff
ci: keep uploaded artifacts unchanged and stop PR runs from evicting …
claude Oct 14, 2026
c75e37f
test(swift): the plain-text result's content part is type-tagged
claude Oct 14, 2026
c9ade5f
ci: fewer jobs per run so pull requests stop queueing for runners
claude Oct 14, 2026
6bced34
docs(agents): update the differential probe for the new public JSON
claude Oct 14, 2026
e27c13c
Merge branch 'v4/8-public-json-equals-the-ai-sdk-json' into v4/9-rewr…
claude Oct 14, 2026
ba3f923
Merge branch 'v4/9-rewrite-json-repair-in-idiomatic-rust' into v4/10-…
claude Oct 14, 2026
fc67f42
Merge branch 'v4/10-tool-call-repair-is-a-trait' into v4/11-provider-…
claude Oct 14, 2026
defa5ab
Merge branch 'v4/12-vendor-streams-are-transformer-structs' into v4/1…
claude Oct 14, 2026
8656cd0
Merge branch 'v4/11-provider-config-is-plain-data' into v4/12-vendor-…
claude Oct 14, 2026
2e746cd
docs(alignment): the first-chunk timer start is a registered difference
claude Oct 14, 2026
df7a67c
Merge the CI speed-up (#262) into [1/8]
claude Oct 14, 2026
4e0bfe2
Merge [1/8] into [2/8]: the CI speed-up (#262)
claude Oct 14, 2026
0fe1a89
Merge [2/8] into [3/8]: the CI speed-up (#262)
claude Oct 14, 2026
2af8255
Merge [3/8] into [4/8]: the CI speed-up (#262)
claude Oct 14, 2026
8ecea4e
Merge [4/8] into [5/8]: the CI speed-up (#262)
claude Oct 14, 2026
777e358
Merge [5/8] into [6/8]: the CI speed-up (#262)
claude Oct 14, 2026
008859c
Merge [7/8] into [8/8]: the CI speed-up (#262)
claude Oct 14, 2026
f80fff2
Merge [6/8] into [7/8]: the CI speed-up (#262)
claude Oct 14, 2026
ee0b00e
Merge branch 'v4/8-public-json-equals-the-ai-sdk-json' into v4/9-rewr…
claude Oct 14, 2026
ecbfc3e
Merge branch 'v4/9-rewrite-json-repair-in-idiomatic-rust' into v4/10-…
claude Oct 14, 2026
c5c84f2
Merge branch 'v4/10-tool-call-repair-is-a-trait' into v4/11-provider-…
claude Oct 14, 2026
7a5c97e
Merge branch 'v4/12-vendor-streams-are-transformer-structs' into v4/1…
claude Oct 14, 2026
f371112
Merge branch 'v4/11-provider-config-is-plain-data' into v4/12-vendor-…
claude Oct 14, 2026
8ab9abb
ci: restore the Flutter SDK cache everywhere, save it from master only
claude Oct 14, 2026
753b61b
ci: build test-only FFI libraries at opt-level 1, not 0
claude Oct 14, 2026
19b9e9f
Merge the CI fix (#262) into [1/8]: test libraries at opt-level 1
claude Oct 14, 2026
824f948
Merge [1/8] into [2/8]: the CI fix (#262)
claude Oct 14, 2026
515fb3d
Merge [2/8] into [3/8]: the CI fix (#262)
claude Oct 14, 2026
75e96c2
Merge [3/8] into [4/8]: the CI fix (#262)
claude Oct 14, 2026
5aadb1c
Merge [4/8] into [5/8]: the CI fix (#262)
claude Oct 14, 2026
dd13b04
Merge [5/8] into [6/8]: the CI fix (#262)
claude Oct 14, 2026
ca181dd
Merge [7/8] into [8/8]: the CI fix (#262)
claude Oct 14, 2026
22db086
Merge [6/8] into [7/8]: the CI fix (#262)
claude Oct 14, 2026
540fef5
Merge branch 'v4/8-public-json-equals-the-ai-sdk-json' into v4/9-rewr…
claude Oct 14, 2026
4166bf0
Merge branch 'v4/9-rewrite-json-repair-in-idiomatic-rust' into v4/10-…
claude Oct 14, 2026
cdf678a
Merge branch 'v4/10-tool-call-repair-is-a-trait' into v4/11-provider-…
claude Oct 14, 2026
70c8fff
Merge branch 'v4/12-vendor-streams-are-transformer-structs' into v4/1…
claude Oct 14, 2026
430eb5d
Merge branch 'v4/11-provider-config-is-plain-data' into v4/12-vendor-…
claude Oct 14, 2026
8ccd560
Merge branch 'master' into ci/optimize-ci-speed-and-cache
claude Oct 15, 2026
e084dc9
docs(agents): trim the native-Rust skills and profile to what stays true
claude Oct 14, 2026
7914f80
docs(agents): drop the preset count from the profile
claude Oct 15, 2026
ca886c1
ci: pin cargo-ndk and keep pull requests from saving two more caches
claude Oct 15, 2026
7c5ded7
Merge branch 'master' into ci/optimize-ci-speed-and-cache
claude Oct 15, 2026
3fcf1da
Merge master into the ProviderName removal: Bedrock SigV4 and secret …
claude Oct 15, 2026
ec7ab7c
chore: delete the web console's generated ProviderName copy
claude Oct 15, 2026
ea0384a
Merge master into the web wire types: tiered CI (#263), Bedrock SigV4…
claude Oct 15, 2026
1bd6a55
ci: type-check the web console against the generated types
claude Oct 15, 2026
d1005cf
Merge the CI speed-up branch (with master) into [1/8]: tiered CI (#26…
claude Oct 15, 2026
d482975
docs: size and performance gates follow RFC-0043
claude Oct 15, 2026
c1d10b5
docs: the alignment doc links back to RFC-0036 §12.2 and names the me…
claude Oct 15, 2026
b32dc0a
ci: run the AI SDK pin script tests
claude Oct 15, 2026
710fcd7
docs: note the retired contract fixtures in the RFCs and the changelog
claude Oct 15, 2026
be87f81
docs(web): note that cargo test rewrites the tracked node types
claude Oct 15, 2026
d30833d
Merge [1/8] into [2/8]: master (#205-#212, #248, #263), the RFC-0043 …
claude Oct 15, 2026
d005871
test(openai): tool calls are flushed after an error frame
claude Oct 15, 2026
f0ee302
refactor(provider-utils): bound the tracker's id suffix search
claude Oct 15, 2026
fb2f23f
Merge [2/8] into [3/8]: master (#205-#212, #248, #263), the RFC-0043 …
claude Oct 15, 2026
7a726e3
test(core): restore the OpenAI output tool-argument tests
claude Oct 15, 2026
88ce267
test(core): part metadata replays whole into providerOptions
claude Oct 15, 2026
750f9a0
test(ffi): restore the composite, frame-error and session-input tests
claude Oct 15, 2026
4b21206
fix(core): a stream that ends with Finish is traced as completed
claude Oct 15, 2026
bfd9fdd
test(core): restore the TraceLayer suite
claude Oct 15, 2026
6faea33
test(core): a traced call keeps the id of its recording
claude Oct 15, 2026
62e2967
test(google): restore the inlineData-to-file tests
claude Oct 15, 2026
9fd8905
test(core): restore the replay_with_model tests
claude Oct 15, 2026
95d9a3a
Merge [3/8] into [4/8]: master (#205-#212, #248, #263), the RFC-0043 …
claude Oct 15, 2026
a7efac0
test(core): pin an abort after a finished step and repeated tool-call…
claude Oct 15, 2026
d989330
docs(alignment): register recording_context and deferred provider res…
claude Oct 15, 2026
1aead53
refactor(stream_text): the chunk loop has no arm that cannot run
claude Oct 16, 2026
73626fe
Merge [4/8] into [5/8]: master (#205-#212, #248, #263), #262's CI fol…
claude Oct 16, 2026
5fa4045
test(provider-utils): the default-transport test keeps 127.0.0.1 off …
claude Oct 15, 2026
e03b5f1
docs(web): a blank key at a custom base_url goes out as an empty key
claude Oct 15, 2026
20a0ee5
test(provider-utils): pin the redirect cap and re-signing on a same-o…
claude Oct 15, 2026
b7f1b7f
docs(rfc): RFC-0040 §3.2 follows the implemented redirect rule
claude Oct 15, 2026
a2ba419
test(providers): a preset's base-URL and optional-key variables
claude Oct 15, 2026
636b4ca
Merge [5/8] into [6/8]: master (#205-#212, #248, #263), #262's CI fol…
claude Oct 16, 2026
a693548
test(mistral): model_length is a length finish
claude Oct 15, 2026
bd2d041
test(providers): non-object input of a past tool call
claude Oct 15, 2026
007ad30
fix(anthropic): toolset member calls go back as upstream sends them
claude Oct 16, 2026
ed69b7e
test(preset): the registry checks run on any input
claude Oct 16, 2026
a9a97fd
fix(anthropic): provider tool args are checked as upstream checks them
claude Oct 16, 2026
78d7b90
Merge [7/8] into [8/8]: master (#205-#212, #248, #263), #262's CI fol…
claude Oct 16, 2026
13845e1
test(provider-utils): say how the botocore SigV4 pins were made
claude Oct 15, 2026
9db6427
Merge [6/8] into [7/8]: master (#205-#212, #248, #263), #262's CI fol…
claude Oct 16, 2026
272a70b
docs(core): a tool result carries only output
claude Oct 15, 2026
e899de9
feat(anthropic): decision_model is upstream's evaluationModel
claude Oct 15, 2026
8f1eaf4
test(google): restore the thought-signature replay tests
claude Oct 15, 2026
7511ff4
test(providers): a failed decision is recorded and replays as the fai…
claude Oct 15, 2026
f275cdf
fix(core): request options reject unknown keys
claude Oct 15, 2026
7c3bb6a
docs(core): replay's question types and the video status key
claude Oct 15, 2026
d365388
fix(core): a prompt part with an unknown type names it
claude Oct 15, 2026
72e4fb9
docs(core): cite upstream for the snake_case video frame type
claude Oct 15, 2026
586235f
test(anthropic): compare usage JSON with what the AI SDK wrote
claude Oct 15, 2026
0e2ffc3
Merge branch 'v4/8-public-json-equals-the-ai-sdk-json' into v4/9-rewr…
claude Oct 16, 2026
1e60857
test(aimux-core): replace the in-test legacy json_repair port with re…
claude Oct 14, 2026
f0b17f6
docs(core): say why json_repair stays public
claude Oct 15, 2026
b1fd1b3
Merge branch 'v4/9-rewrite-json-repair-in-idiomatic-rust' into v4/10-…
claude Oct 16, 2026
0eeb671
refactor(providers): keep vendor endpoints out of shared and openai_c…
claude Oct 14, 2026
bd6c67e
test(searxng): the instance URL comes from SEARXNG_URL per request
claude Oct 15, 2026
8676f29
Merge branch 'v4/10-tool-call-repair-is-a-trait' into v4/11-provider-…
claude Oct 16, 2026
b21d9ed
refactor(provider-utils): PipeThrough is a Stream over one reused queue
claude Oct 14, 2026
f04c217
refactor(providers): chat streams share ChatToolCalls, no tracker type
claude Oct 14, 2026
faf5c0f
refactor(providers): vendor streams share StreamContext and Emit
claude Oct 14, 2026
ae1437d
test(providers): drive chat and Anthropic stream transformers synchro…
claude Oct 14, 2026
a6d890c
Merge branch 'v4/11-provider-config-is-plain-data' into v4/12-vendor-…
claude Oct 16, 2026
70abded
chore(providers): let shared layers use the stream module in the boun…
claude Oct 14, 2026
da607da
docs: say where the chat streams keep their tool-call state
claude Oct 15, 2026
0c69d2e
Merge branch 'v4/12-vendor-streams-are-transformer-structs' into v4/1…
claude Oct 16, 2026
8e6a597
test(provider-utils): nothing is emitted after a transform stream ended
claude Oct 15, 2026
2574772
fix(core): fix_json steps through UTF-16 code units like upstream
claude Oct 16, 2026
563d65c
test(dataforseo): the login comes from DATAFORSEO_LOGIN per request
cunninghamcard-bit Oct 16, 2026
8f90ad6
feat(core): the recording context has an operation scope
claude Oct 16, 2026
aa050b0
docs(contributing): say what .agents/ holds and in which language
cunninghamcard-bit Oct 16, 2026
13131b8
refactor(core)!: the recording context is an operation value, not a c…
claude Oct 16, 2026
2c86792
Merge the ProviderName removal (#246) into the web wire types
claude Oct 16, 2026
c749bf5
fix(core)!: a deferred tool result needs a provider tool that support…
claude Oct 16, 2026
9432c71
docs(core): the replay key and input record no longer name a recordin…
claude Oct 16, 2026
36b91bc
Merge [4/8] into [5/8]: deferred tool results and the recording scope
claude Oct 16, 2026
46e974a
Merge [5/8] into [6/8]: deferred tool results and the recording scope
claude Oct 16, 2026
aad72e8
Merge [6/8] into [7/8]: deferred tool results and the recording scope
claude Oct 16, 2026
67c7f1d
Merge [7/8] into [8/8]: deferred tool results and the recording scope
claude Oct 16, 2026
0b78344
build(core): ts-rs exports run only from the generator
claude Oct 16, 2026
e4104aa
fix(provider-utils): the tool call tracker generates ids as upstream
claude Oct 16, 2026
2f51e47
feat(bindings): typed provider tools carry supportsDeferredResults
claude Oct 16, 2026
79ea814
chore(node): regenerate InputRecord.ts for the corrected options comment
claude Oct 16, 2026
af67cb8
Merge [2/8] into [3/8]: the tracker generates ids as upstream
claude Oct 16, 2026
1e0a04d
Merge [3/8] into [4/8]: the tracker generates ids as upstream
claude Oct 16, 2026
85e65d8
Merge [4/8] into [5/8]: tracker ids, binding provider tools, InputRec…
claude Oct 16, 2026
2eef03b
Merge [5/8] into [6/8]: tracker ids, binding provider tools, InputRec…
claude Oct 16, 2026
31fb8fe
Merge [6/8] into [7/8]: tracker ids, binding provider tools, InputRec…
claude Oct 16, 2026
eb24c62
Merge [7/8] into [8/8]: tracker ids, binding provider tools, InputRec…
claude Oct 16, 2026
c6382f1
fix(core)!: MoA failMode and the recording operation are kebab-case
claude Oct 16, 2026
c525525
Merge #247 into [1/8]: gated ts-rs exports and the ProviderName removal
claude Oct 16, 2026
020688d
Merge [1/8] into [2/8]: gated ts-rs exports and the ProviderName removal
claude Oct 16, 2026
21a4b2f
Merge [2/8] into [3/8]: gated ts-rs exports and the ProviderName removal
claude Oct 16, 2026
36a9e5c
Merge [3/8] into [4/8]: gated ts-rs exports and the ProviderName removal
claude Oct 16, 2026
2c477ce
Merge [4/8] into [5/8]: gated ts-rs exports and the ProviderName removal
claude Oct 16, 2026
4ba56b0
Merge [5/8] into [6/8]: gated ts-rs exports and the ProviderName removal
claude Oct 16, 2026
e661f11
Merge [6/8] into [7/8]: gated ts-rs exports and the ProviderName removal
claude Oct 16, 2026
564cfff
Merge [7/8] into [8/8]: gated ts-rs exports and the ProviderName removal
claude Oct 16, 2026
b0dc009
docs(changelog): the deferred tool result rule is generate_text's
claude Oct 16, 2026
e347e8c
feat(go): provider tools carry supportsDeferredResults
claude Oct 16, 2026
6422a37
Merge [4/8] into [5/8]: the deferred tool result rule is generate_text's
claude Oct 16, 2026
7da96b4
Merge [5/8] into [6/8]: the deferred tool result rule is generate_text's
claude Oct 16, 2026
de9e9a0
Merge [6/8] into [7/8]: the deferred tool result rule is generate_text's
claude Oct 16, 2026
095ee27
Merge [7/8] into [8/8]: the deferred tool result rule is generate_text's
claude Oct 16, 2026
7a4b023
Merge master into #246: the #266 docs wording
claude Oct 16, 2026
453f611
Merge #246 into #247: master's #266 docs wording
claude Oct 16, 2026
796bd99
Merge #247 into [1/8]: master's #266 docs wording
claude Oct 16, 2026
36c8823
Merge [1/8] into [2/8]: master's #266 docs wording
claude Oct 16, 2026
59d9005
Merge [2/8] into [3/8]: master's #266 docs wording
claude Oct 16, 2026
2997346
Merge [3/8] into [4/8]: master's #266 docs wording
claude Oct 16, 2026
857b29d
Merge [4/8] into [5/8]: master's #266 docs wording
claude Oct 16, 2026
bed5ca7
Merge [5/8] into [6/8]: master's #266 docs wording
claude Oct 16, 2026
cd55182
Merge [6/8] into [7/8]: master's #266 docs wording
claude Oct 16, 2026
8eaa63d
Merge [7/8] into [8/8]: master's #266 docs wording
claude Oct 16, 2026
f390ff4
Merge branch 'v4/8-public-json-equals-the-ai-sdk-json' into v4/9-rewr…
claude Oct 16, 2026
adec25f
Merge branch 'v4/9-rewrite-json-repair-in-idiomatic-rust' into v4/10-…
claude Oct 16, 2026
5330a48
Merge branch 'v4/10-tool-call-repair-is-a-trait' into v4/11-provider-…
claude Oct 16, 2026
e2f2e46
Merge branch 'v4/11-provider-config-is-plain-data' into v4/12-vendor-…
claude Oct 16, 2026
bd5418b
Merge branch 'v4/12-vendor-streams-are-transformer-structs' into v4/1…
claude Oct 16, 2026
6ca248e
test(scripts): give the pin fetch test its own user and global npmrc
claude Oct 16, 2026
e572504
Merge [3/8] into [4/8]: the pin fetch test fix
claude Oct 16, 2026
7790a2b
Merge [1/8] into [2/8]: the pin fetch test fix
claude Oct 16, 2026
be39004
Merge [2/8] into [3/8]: the pin fetch test fix
claude Oct 16, 2026
9a9056c
Merge [4/8] into [5/8]: the pin fetch test fix
claude Oct 16, 2026
f88bd61
Merge [5/8] into [6/8]: the pin fetch test fix
claude Oct 16, 2026
dc656f8
Merge [6/8] into [7/8]: the pin fetch test fix
claude Oct 16, 2026
5ee53e2
Merge [7/8] into [8/8]: the pin fetch test fix
claude Oct 16, 2026
f89c989
Merge branch 'v4/8-public-json-equals-the-ai-sdk-json' into v4/9-rewr…
claude Oct 16, 2026
27901f1
Merge branch 'v4/9-rewrite-json-repair-in-idiomatic-rust' into v4/10-…
claude Oct 16, 2026
6e2b132
Merge branch 'v4/10-tool-call-repair-is-a-trait' into v4/11-provider-…
claude Oct 16, 2026
a4e5267
Merge branch 'v4/11-provider-config-is-plain-data' into v4/12-vendor-…
claude Oct 16, 2026
b88f3a2
Merge branch 'v4/12-vendor-streams-are-transformer-structs' into v4/1…
claude Oct 16, 2026
38b6cde
docs(rfc): the retry count, timeout and session id are operation sett…
claude Oct 16, 2026
f039e50
Merge [4/8] into [5/8]: RFC text for the operation settings
claude Oct 16, 2026
7be67e6
Merge [5/8] into [6/8]: RFC text for the operation settings
claude Oct 16, 2026
593b5e5
Merge [6/8] into [7/8]: RFC text for the operation settings
claude Oct 16, 2026
9cef9bf
Merge [7/8] into [8/8]: RFC text for the operation settings
claude Oct 16, 2026
2a0b02b
Merge master into [1/8]: keep this layer ci.yml/CHANGELOG/local-ci
eric8810 Oct 17, 2026
057453e
Merge [1/8] into [2/8]: #262, #246 and #247 as eric merged them
claude Oct 17, 2026
bdeebad
Merge [2/8] into [3/8]: #262, #246 and #247 as eric merged them
claude Oct 17, 2026
6fec783
Merge [3/8] into [4/8]: #262, #246 and #247 as eric merged them
claude Oct 17, 2026
79c2efc
Merge [4/8] into [5/8]: #262, #246 and #247 as eric merged them
claude Oct 17, 2026
dbf852f
Merge [5/8] into [6/8]: #262, #246 and #247 as eric merged them
claude Oct 17, 2026
fa3d877
Merge [6/8] into [7/8]: #262, #246 and #247 as eric merged them
claude Oct 17, 2026
f8a4287
Merge [7/8] into [8/8]: #262, #246 and #247 as eric merged them
claude Oct 17, 2026
8c8eb61
Merge branch 'v4/8-public-json-equals-the-ai-sdk-json' into v4/9-rewr…
claude Oct 17, 2026
50a6fb7
Merge branch 'v4/9-rewrite-json-repair-in-idiomatic-rust' into v4/10-…
claude Oct 17, 2026
4e7afd8
Merge branch 'v4/10-tool-call-repair-is-a-trait' into v4/11-provider-…
claude Oct 17, 2026
a510dda
Merge branch 'v4/11-provider-config-is-plain-data' into v4/12-vendor-…
claude Oct 17, 2026
5641211
Merge branch 'v4/12-vendor-streams-are-transformer-structs' into v4/1…
claude Oct 17, 2026
ef3afee
Merge master into [13/13]: converge to the layer tree
eric8810 Oct 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions .agents/native-rust/PROFILE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# aimux 配置(native-rust profile)

`ts-rust-port` 和 `rust-native-rewrite` 共用。只写不看仓库就不知道、又不会很快过期的事:不写行号、提交号和待办清单,那些放 issue 和 PR。

## 上游和映射

- vercel/ai monorepo;锁定版本以 `fixtures/aisdk/VERSIONS.json` 为准,不在里面的包用 `docs/aisdk-architecture-alignment.md` 头部的版本,再没有就先问。
- 源码:`https://raw.githubusercontent.com/vercel/ai/<URL 编码的 包名@版本>/packages/<目录>/src/<文件>`;测试是同目录的 `*.test.ts`。

| 上游 | aimux |
|---|---|
| `ai` | `aimux-core/src`(如 `json_repair.rs` ← `util/fix-json.ts` + `parse-partial-json.ts`) |
| `@ai-sdk/provider` | `aimux-core/src` 的 V4 类型 |
| `@ai-sdk/provider-utils` | `aimux-provider-utils/src`,kebab → snake |
| `@ai-sdk/<vendor>` | `aimux-providers/src/<vendor>/`;`google-vertex` → `vertex/`,`amazon-bedrock` → `bedrock/`;按模块头注释的 `packages/<pkg>/src/<file>.ts` 找 |
| 无上游 | `aimux-ffi`、`bindings/`、`recording.rs`/`replay.rs`、`decision_*`:只能新旧差分 |

OpenAI-compatible preset 来自 `provider_registry.json` 的运行时 descriptor 表(D12),没有逐厂商代码。

## 设计文档

`docs/aisdk-architecture-alignment.md`:决策记录 D1–D31,§0.4–0.5,§5(定下来的不像 Rust 的写法),§9.2–9.3(构建检查、行为验收)。碰到消息类型或 wire 再读第二部分。

## 不能动的面

| 面 | 守护 |
|---|---|
| 公开 JSON:camelCase、kebab-case `type`、base64 字节、缺失省略、null 保留 | 绑定测试、`cargo test --workspace` |
| ts-rs 生成的 d.ts(不新增 `#[derive(TS)]`,要退役) | `python3 scripts/gen_ts_types.py --check` |
| C ABI(`aimux-ffi`,各语言绑定依赖) | `aimux-ffi/tests`、`scripts/local-ci.sh` |
| Node 绑定 | 构建后 `git diff --exit-code -- bindings/node/index.js bindings/node/index.d.ts` |
| 录制格式、cassette 回放 | 回放测试 |
| 错误 JSON(AI SDK 的 `name` 标签) | 原生化不改 |
| `docs/api/providers.md` | `python3 scripts/gen_providers_doc.py --check` |

## 预言机

1. 上游录制:`fixtures/aisdk/<pkg>/*.json`,`aimux-providers/tests/*_factory_test.rs` 回放(URL、headers、body、结果、流事件、错误分类)。
2. 搬来的上游单元测试,例如 `aimux-core/tests/util_test.rs` 的 fix-json 用例。
3. node 跑锁定版本上游(Node 22 `--experimental-strip-types`),读写 JSONL。
4. cassette 回放:`aimux-providers/tests/cassettes/`,不联网。
5. 新旧差分只在改动期间存在;入库的是它记下的结果(例:`aimux-core/tests/fixtures/json_repair_cases.jsonl`),不是旧实现。跨构建差分的探针不入库,PR 描述写位置和命令。进程级计数器(`source-{n}` 之类)比较前归一化。

## 检查(CI 对每个 PR 跑)

```sh
cargo fmt --all -- --check
cargo clippy --workspace --all-targets -- -D warnings
RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps
cargo test --workspace # 会改写 bindings/node/src/types/*.ts,跑完 checkout 回去
python3 scripts/gen_ts_types.py --check
python3 scripts/gen_providers_doc.py --check
bash scripts/check_provider_boundaries.sh
```

碰到 napi、FFI 时加跑 `scripts/local-ci.sh` 对应的节。每个 worktree 用自己的 `CARGO_TARGET_DIR`。

## 项目决定

- wire 跟 AI SDK 的 JSON 形态;wire 变化单独成 PR,同步所有绑定。
- 可选方法用 `Option<Result<…>>`(§5、D22);provider 可调用 `call(model_id)`;默认 provider 访问不可失败,显式工厂返回 `Result`。
- 设置求值时机(工厂、取模型、请求)逐包跟上游(D10);headers 每次请求求值。
- 不用 provider 名字判断厂商(D8);providerOptions 的键在各包 `options.rs` 只写一次(D9);retry 只在调用层(D14);core 单步,不跑 agent loop(D25)。
- `do_generate`/`do_stream` 保持 `async_trait`(registry、FFI 要 `dyn`)。
- 分层单向:`shared/`、`openai_compatible/` 不引用具体厂商模块。跨模块扩展点由共享层定义 trait,厂商用自己的纯数据 struct 实现;包内有限几种情况用包内 enum(`check_provider_boundaries.sh` 守)。
- 流:每个厂商的流是一个实现 `Transformer` 的具名 struct;工具调用的累积是流 struct 自己的字段,没有共享的 tracker 类型(和上游 provider-utils 结构不同,行为照上游)。
- 保留 openai-compatible 的 `transformRequestBody`、`metadataExtractor`、`supportsMultiPartToolContent` 和 `specification_version`。
- 栈内 breaking 直接替换,不留 deprecated 别名,同一 PR 改完调用方和绑定(D31)。
- 范围只做结构清理、行为对齐和缺陷修复,不新增对外能力(§0.4)。

## 陷阱

- 数字:上游是 JS number,用量、价格、max_tokens 用整数解析;写回 JSON 的 `f64` 会把 `12` 变成 `12.0`,加 golden 测试。
- null 和缺失:上游区分,`Option` + `skip_serializing_if` 会合并;wire DTO 保留 null。
- SSE 和 event-stream 可以在任意字节切开;重写分帧时用同一字节流的所有切法差分。
- headers:settings → 单次调用 → 鉴权,后层覆盖;`None` 删除;名字小写。
- JS promise 创建就跑,Rust future 不 poll 不跑;不 await 的 promise 移植时改成 spawn 或删掉。
- UTF-16:JS 的长度和下标按码元;截断、长度校验用 emoji 和中文对一次上游。

## 工作约束

- 每个 PR 一个方向:一个模块或一种模式。标题 `[n/m] refactor: …`,分支名和标题一致,开 PR 前定好。
- 不改写别人已推送的分支;PR 先 Draft,CI 绿了再 Ready。
- 生产代码不新增 `unwrap`/`expect`/`panic`(§9.2);凭据类型的 `Debug` 脱敏。
- 参照库:rig(`0xPlaygrounds/rig`)、async-openai(`64bit/async-openai`)。
8 changes: 8 additions & 0 deletions .agents/native-rust/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Agent notes for native-Rust work

For coding agents (and people) doing two kinds of work on aimux:

- aligning a Rust module with its pinned AI SDK upstream: `../skills/ts-rust-port/SKILL.md`;
- rewriting TS-shaped Rust into native Rust without changing behaviour: `../skills/rust-native-rewrite/SKILL.md`.

`PROFILE.md` holds the repository facts both read. Nothing here is built or run by CI. The skills and profile are written in Chinese.
79 changes: 79 additions & 0 deletions .agents/skills/rust-native-rewrite/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
name: rust-native-rewrite
description: Rewrite TS-shaped Rust into native Rust within one repo, keeping behaviour and wire format, proven by an old-vs-new differential (in-process for one module, cross-build for a cross-cutting refactor).
---

# 把 TS 味的 Rust 改成原生 Rust

单仓库,不需要上游源码;行为由新旧差分证明。要和上游本身对比,用 `ts-rust-port`。
仓库事实在 `.agents/native-rust/PROFILE.md`(下称配置);本文只写流程、纪律和写法对照。

用法:给一个文件或模块;或 `pattern <模式>`(跨模块,如“回调改成 trait”);或 `review [ref]`(只审查)。

## 纪律

1. 只改结构,不改行为;看到的 bug 记下来,另开 PR。
2. 一个 PR 一种模式或一个模块。配置“项目决定”里的写法不改。
3. 动手前在基线上跑一遍配置的检查,记下每个测试二进制的通过数;改完逐个比,多出来的只能是新测试,改过的已有测试逐个说明。
4. 差分报告写分母和覆盖面:“比较 N 个,M 处差异;没比的是 X,因为 Y”。失败一次修一个,到 0 为止;0 之后做变异检查。
5. 先测稳定性:同一构建跑两次,会变的值(计数器、UUID、时间、签名)先屏蔽。
6. 改完要比原来短或一样长。为了“原生”多出来的样板(字段写两遍、套一层通用框架)不算改进。
7. 去掉闭包时不能颠倒依赖:共享层不为了一个闭合 enum 去 import 具体模块;跨模块扩展点用共享层的 trait,具体模块用纯数据 struct 实现。
8. 跑完看 `git status`;临时拷进去的探针和生成器改写的文件不进提交。不自动推送。

## 流程

1. **选目标**:对目标跑下面的痕迹扫描,剔除“项目决定”和“不能动的面”挡住的;剩下为空就报告并停下。目标没有测试先补测试,单独提交。
2. **契约**(commit body 或 PR 描述):改哪些、不能变什么、允许的差异、怎么测、是否 breaking。只有要 breaking、要动“不能动的面”或违背“项目决定”时先等用户回复。
3. **差分**:
- 一个模块、纯函数或状态机:进程内差分。改动期间把旧实现复制进测试,随机生成器默认 2 万、可放大到 10^6;到 0 后,把有代表性的输入和旧实现的结果录成 fixture 入库,删掉旧实现副本。
- 跨很多文件(配置、流、请求构造):跨构建差分。新旧两个 worktree 各用自己的 target;同一个探针测试文件放两边,在最底层传输(`fetch`)注入一个按录制回答、记录请求的传输,加一个死代理防联网;每个操作一行 JSONL,脚本逐 key 比较。探针不入库,PR 描述写位置和命令。
4. **实现**:先把新 API 的调用写成 doc test,再按写法对照改。公开名字不变,除非契约允许 breaking。
5. **审查**(子 agent,有“本次引入”的问题就回第 4 步):
- BEHAVIOUR:输出、错误、边界情况和旧实现一致。
- WIRE:“不能动的面”没变。
- DECISION:没违背“项目决定”和工作约束;没顺手修 bug。
- LAYERING:没有新增 `shared → 具体模块` 之类的反向依赖。
- SIZE:行数没有无故增加;没有为编译而加的 clone/unwrap。
- ORACLE:差分可复现,数字带分母;变异检查做了。
- SECURITY:Debug 不打印密钥;读环境变量不 panic。
6. **提交和汇报**:`refactor(<crate>)[!]: …`,body 写契约、差分 N/M、变异检查。PR 描述最后放一张 Verification 表:基线和改后测试数、测试改动、差分、变异检查、各项检查。

## 写法对照

| TS 形状 | 原生写法 |
|---|---|
| 一个 `kind`/`role`/`state` 字段,其余字段随它变 | enum,每个变体带自己的数据 |
| 几个 `bool` 组成的状态;`finished` 标志 | enum 变体;终结操作取 `self` |
| `-1`、空字符串哨兵;`isize` 下标;`Vec<char>` 扫描 | `Option`、`usize`、`char_indices()` |
| 和字符串字面量比较的 `kind: String` | enum + serde rename |
| `extra: Value`、`.get("x")` | 有类型字段;开放部分用 `#[serde(flatten)]` |
| `Option<Vec<_>>`,缺失和空无区别 | `Vec` + `Default` |
| `expect("never empty")` 维持的不变量 | 让非法状态构造不出来 |
| options 里的 `Box<dyn Fn>` 钩子 | trait + 给闭包的 blanket impl,`new(closure)` 照常能用 |
| 包内有限几种配置闭包(`url()`、`headers()`) | 包内纯数据 enum,请求时求值 |
| 共享层给各具体模块开的扩展点 | 共享层的 trait,具体模块的纯数据 struct 实现 |
| `new TransformStream({ start, transform, flush })`、靠一堆局部变量维持的流状态 | 实现 `Transformer` 的具名 struct;只读上下文和 `#[derive(Default)]` 的累积状态分开;同步驱动入口方便无 I/O 单测 |
| 外面套一个通用的 tracker/accumulator 对象 | 状态直接作为使用者 struct 的字段,逻辑是它的私有方法 |
| 把 `Transformer` 接到流上的 `async_stream!` + 每帧新 `Vec` | 直接实现 `futures::Stream` 的 struct,复用一个 `VecDeque` |
| 每次调用返回新 `Vec` | 写进调用方给的 `&mut Vec` |
| 小集合配 `HashMap` 索引 | `Vec` 线性扫描 |
| `createX(settings)`,settings 全 `Option` | `X::new(必填)` + consuming setter |
| `Result<_, ()>`、`Other(String)` 错误 | `thiserror` enum,`#[from]` 保留 source |
| 只有一个实现的 trait | struct |
| 插入顺序有意义却用 `HashMap` | `IndexMap` |
| 凭据类型 `derive(Debug)` | 手写脱敏 `Debug` |

## 痕迹扫描

```sh
P=path/to/module.rs # 只扫目标
rg -n '\w+: bool\b|let mut \w+ = (true|false);|isize|-1\b|Vec<char>' "$P"
rg -n '\.expect\(|\.unwrap\(|unreachable!|panic!' "$P"
rg -n 'Option<(Vec|HashMap)<|(type|kind|role)\w*: (String|&str)|== "\w+"' "$P"
rg -n 'pub \w+: (serde_json::)?Value|as_object\(\)|\.get\("|#\[serde\(untagged\)\]|Other\(String\)' "$P"
rg -n '(Box|Arc)<dyn Fn|pub fn create_\w+\(|pub stream:|AbortSignal|: Option<f64>' "$P"
rg -n 'use crate::(vertex|bedrock|google|anthropic|openai|aws_polly)' aimux-providers/src/shared # 反向依赖
```

rig(`0xPlaygrounds/rig`)里可对照的:按角色的消息 enum(`completion/message.rs`)、请求 `new` + setter + `#[non_exhaustive]`(`completion/request.rs`)、纯数据 provider 配置和 `Secret`(`providers/openai/wire.rs`)、流的 `finish(self)`(`streaming/mod.rs`)、钩子 trait(`agent/hook.rs`)。
47 changes: 47 additions & 0 deletions .agents/skills/ts-rust-port/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: ts-rust-port
description: Port a TypeScript module to Rust, fix one place where a Rust port disagrees with its pinned TS upstream, or check a Rust module against that upstream, using upstream tests, recorded fixtures and running upstream TS.
---

# TS 上游和它的 Rust 移植

两个仓库:锁定版本的 TS 上游和 Rust 仓库,目标是 Rust 的行为和上游一致。把移植来的代码改成原生写法是另一件事,用 `rust-native-rewrite`。
仓库事实在 `.agents/native-rust/PROFILE.md`(下称配置)。

| 用法 | 做什么 |
|---|---|
| 上游文件,或还没移植的模块 | 移植 |
| `fix <一处不一致>` | 把一处行为改成和上游一样(最常见) |
| `parity <Rust 模块>` | 和上游对比,只报告 |
| `review [ref]` | 只审查 |

## 纪律

1. 移植时结构跟上游走(文件、类型、函数一一对应),不改进、不修 bug;已经移植过的代码只走 `fix` 或 `parity`。
2. 说“上游是这样”要给锁定版本的文件和行号。
3. 上游测试逐个用例搬,只改 harness,不改场景。
4. 报告写分母:“比较 N 个,M 处差异”。失败一次修一个,到 0 为止。
5. 上游源码下载到新的空目录,当数据用:路径作参数传给 node,不在那个目录里执行东西。
6. 配置“项目决定”里和上游刻意不同的地方,不改回上游。
7. 不自动推送。

## fix

1. 找到锁定版本的上游文件和行号;在“项目决定”里的就不改,报告并停下。
2. 先写一个在当前代码上失败的测试:优先回放上游录制的 fixture,其次搬上游用例,再其次用 node 跑上游拿期望值。
3. 改到通过,只改这一处;顺带看到的其他差异记下来。
4. 跑配置的检查,基线和改后逐个测试二进制比。
5. 提交 `fix(<crate>): <行为> matches <包>@<版本>`,body 写上游出处、改前改后、新测试名。同一层的几条可以同一个 PR,每条一个提交。

## 移植

1. 用配置的映射把目标解析成“Rust 文件 + 上游文件 + 版本”;查清碰到哪些“不能动的面”和“项目决定”。
2. 契约:上游文件和版本、不能变的、允许的差异、怎么测、是否 breaking。只有要 breaking 或违背配置时先等用户回复。
3. 实现(子 agent):按上游结构写,只在所有权模型要求时偏离;上游测试逐个搬;循环到 0 失败;再做一次对比上游。常见失败:缺 match 分支、迭代顺序、null 和缺失混同、数字类型、UTF-16 下标、JSON 键顺序、错误文本。
4. 审查(子 agent,循环):对每个改动的文件读完对应的上游文件,查 FIDELITY(数据流、边界、错误分类和上游一致)、WIRE、DECISION、ORACLE(用例搬全、引用带版本行号)、ERROR(错误名和消息保留,不新增 panic)、SCOPE。
5. 提交 `feat(<crate>): port <upstream file>`,body 写搬了多少用例、对比上游的 N/M。

## 对比上游

按能用的顺序:上游录制的 fixture 回放;node 跑锁定版本上游、读同一份 JSONL 语料逐条比;搬来的上游测试(最弱)。
语料覆盖空输入、截断、乱序、重复、深嵌套、错误路径、非 ASCII 和辅助平面字符,以及配置“陷阱”里的每一项。每类差异给一个最小复现,标明是已知的还是新发现的。runner 不入库,commit body 写位置和命令。
7 changes: 7 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,19 @@ aimux/
├── bindings/ # Node, Python, Swift, Kotlin, Flutter, Go, C — share one Rust core
├── rfc/ # Design docs (RFCs)
├── docs/ # Public product docs (see docs/README.md)
├── .agents/ # Skills for coding agents (see below)
└── scripts/ # Code-generation and maintenance scripts
```

`docs/internal/` contains historical research and audit notes; it is not part
of the public surface and generally does not need changes.

`.agents/` holds skills for coding agents and their maintainers (porting from
the AI SDK, native-Rust rewrites) and the PROFILE of repository facts they share
(`.agents/native-rust/PROFILE.md`). The skills and profile are written in
Chinese, like the recent RFCs. They hold only what stays true, and change in
the same PR as the code they describe.

## Prerequisites

- **Rust**: stable toolchain (see `rust-toolchain.toml`). The workspace targets
Expand Down
Loading