Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
103d23a
refactor(providers): remove generated provider name types
cunninghamcard-bit Sep 29, 2026
837aaaf
docs(changelog): record removal of generated ProviderName as breaking
cunninghamcard-bit Sep 29, 2026
9523030
fix(providers): drop the redundant #[must_use] on provider_names()
claude Oct 11, 2026
94c48ab
chore: drop stale provider_name references left after the ProviderNam…
cunninghamcard-bit Oct 1, 2026
1434ae1
docs(roadmap): Node drops the ProviderName string-literal union too
claude Oct 3, 2026
06db6c7
ci: run checks on every pull request and cancel superseded PR runs
claude Oct 12, 2026
7e9b5c2
test: delete self-generated contract fixtures and hand-written tests …
claude Oct 11, 2026
94630bf
refactor(web): consume generated core types directly
cunninghamcard-bit Sep 29, 2026
2f66709
refactor(web): generate wire types with ts-rs and import core types v…
cunninghamcard-bit Sep 29, 2026
043f88f
fix: address review findings on provider_names and wire export
cunninghamcard-bit Sep 29, 2026
87c1b37
chore(fixtures): pin the AI SDK packages with sha512 integrity
claude Oct 13, 2026
7978920
chore(scripts): fetch the pinned AI SDK sources into target/aisdk
claude Oct 13, 2026
53b3dbe
chore(scripts): fetch all-or-nothing and keep the pinned integrity
claude Oct 13, 2026
6f97d4b
docs: merge the migration into master layer by layer
claude Oct 13, 2026
ca19e38
docs: drop never-built aimux-only designs, move size gates to ROADMAP
claude Oct 13, 2026
03b43b7
ci: speed up test builds, deduplicate caches, and use prebuilt cargo-ndk
cunninghamcard-bit Oct 14, 2026
9ab9dff
ci: keep uploaded artifacts unchanged and stop PR runs from evicting …
claude Oct 14, 2026
c9ade5f
ci: fewer jobs per run so pull requests stop queueing for runners
claude Oct 14, 2026
df7a67c
Merge the CI speed-up (#262) into [1/8]
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
8ccd560
Merge branch 'master' into ci/optimize-ci-speed-and-cache
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
2c86792
Merge the ProviderName removal (#246) into the web wire types
claude Oct 16, 2026
0b78344
build(core): ts-rs exports run only from the generator
claude Oct 16, 2026
c525525
Merge #247 into [1/8]: gated ts-rs exports and the ProviderName removal
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
6ca248e
test(scripts): give the pin fetch test its own user and global npmrc
claude Oct 16, 2026
2a0b02b
Merge master into [1/8]: keep this layer ci.yml/CHANGELOG/local-ci
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
43 changes: 17 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ jobs:
# inside ffi-build, Java and Kotlin share one job.
# - Anything else (the Rust crates, tools, scripts, contract fixtures,
# Cargo manifests, workflows): every job.
# Contract tests run for any code change: they check generated files that
# live in every binding.
# Generator drift checks run for any code change: they check generated
# files that live in every binding.
#
# Where it runs, on a pull request: the Rust code is platform-neutral
# (rustls, no platform cfg outside tools/), so jobs run on Linux, and the
Expand All @@ -60,7 +60,7 @@ jobs:
# manifest (dependencies), a build script, line-ending rules
# (.gitattributes), the toolchain or the workflows.
# Shared Rust changes still get one Windows leg (Node x64 tests); Swift
# contract tests are macOS-only and run whenever they are needed: they
# tests are macOS-only and run whenever they are needed: they
# drive the C ABI from async Swift, which caught a stack overflow no Linux
# job hit.
#
Expand Down Expand Up @@ -158,7 +158,7 @@ jobs:
# except the Windows x64 Node test leg, which also runs whenever the
# shared Rust code changed: it is the only job that runs that code on
# Windows, where I/O errors and refused connections behave differently
# (Swift contract tests cover macOS).
# (Swift tests cover macOS).
- id: legs
env:
PLATFORMS: ${{ steps.diff.outputs.platforms }}
Expand Down Expand Up @@ -632,9 +632,9 @@ jobs:
path: ${{ steps.flutter-key.outputs.CACHE-PATH }}
key: ${{ steps.flutter-key.outputs.CACHE-KEY }}

# ── Contract tests: shared JSON fixtures (catches cross-language type drift) ──
# Generated files must match their generators.
contract-tests:
name: Contract tests
name: Generator drift checks
runs-on: ubuntu-latest
needs: changes
if: fromJSON(needs.changes.outputs.run)['contract-tests']
Expand All @@ -646,29 +646,20 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/master' }}
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Run Rust contract tests
run: cargo test --test contract_test -p aimux-core
- name: ts-rs export drift (checked-in types must match generator output)
run: python3 scripts/gen_ts_types.py --check
- name: Build Node binding
working-directory: bindings/node
run: |
npm ci
npx napi build --platform
- name: Run Node contract tests
working-directory: contract-tests
run: |
node --experimental-strip-types run-node.ts
# The AI SDK pin tooling: VERSIONS.json format and integrity rules, and
# fetch-aisdk.sh against a registry served on 127.0.0.1 (no network).
- uses: actions/setup-node@v4
with:
node-version: 24
- name: AI SDK pin scripts (fetch-aisdk.sh, VERSIONS.json helpers)
run: node --test scripts/fetch-aisdk.test.mjs scripts/aisdk-fixtures/versions.test.mjs

# ── Swift contract tests: the eighth binding joins the shared fixtures ─────
# Needs macOS (XCTest) and the FFI cdylib, which the Swift package links via
# the CAimuxFFI system module. The Dart side needs no job here: flutter-binding
# already runs `flutter test`, which picks up bindings/flutter/test/contract_test.dart.
# Swift tests need macOS (XCTest) and the FFI cdylib, which the Swift package
# links via the CAimuxFFI system module.
swift-contract-tests:
name: Swift contract tests
name: Swift tests
runs-on: macos-latest
needs: changes
if: fromJSON(needs.changes.outputs.run)['swift-contract-tests']
Expand All @@ -680,7 +671,7 @@ jobs:
save-if: ${{ github.ref == 'refs/heads/master' }}
- name: Build the FFI library the Swift package links against
run: cargo build -p aimux-ffi --release
- name: Run Swift contract tests
- name: Run Swift tests
working-directory: bindings/swift
env:
DYLD_LIBRARY_PATH: ${{ github.workspace }}/target/release
Expand Down
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
no longer rewrites tracked TypeScript types. `scripts/gen_ts_types.py`
enables exports and rejects ungated export attributes with `--check`.

### Removed

- The cross-language contract fixtures are retired (#249):
`contract-tests/fixtures/wire-format.json` (a record of Rust's own serde
output, not of the AI SDK), `tool-call-repair.json`, the Node runner
`contract-tests/run-node.ts`, `aimux-core/tests/contract_test.rs` and the
bindings' contract and repair tests are deleted. Wire behaviour is pinned
instead by fixtures recorded from the pinned AI SDK packages under
`fixtures/aisdk/` (versions and sha512 integrity in
`fixtures/aisdk/VERSIONS.json`, fetched by `scripts/fetch-aisdk.sh`) and by
tests ported from upstream. The two decision fixtures stay in
`contract-tests/fixtures/`.

### RFCs

- `docs/aisdk-architecture-alignment.md`: the V4 migration now lands on
master layer by layer, each layer CI-green with all its consumers updated,
instead of one atomic cutover through an integration branch (§0.4 Q3, D31,
§9.1). The new C ABI, codegen, the full recording schema 3 and the binding
migration come last; until then the existing C constructors keep their
signatures and call the new factories, and ts-rs stays as the interim
generator. No release is cut from master until every layer is merged;
fixes for released versions ship from a maintenance branch. `ROADMAP.md`
defers the ops protocol schema and L0 passthrough and no longer fixes C1
at nine exports.

## [0.5.0] - 2026-09-27

**Breaking release.** 13 PRs since 0.3.0: the cross-language error model
Expand Down
7 changes: 1 addition & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ aimux/
├── aimux-provider-utils/ # HTTP utilities: retry, backoff, error parsing, API-key loading
├── aimux-ffi/ # C ABI (opaque handle + JSON + push callback) for non-native bindings
├── bindings/ # Node, Python, Swift, Kotlin, Flutter, Go, C — share one Rust core
├── contract-tests/ # Shared JSON fixtures exercised across languages
├── rfc/ # Design docs (RFCs)
├── docs/ # Public product docs (see docs/README.md)
└── scripts/ # Code-generation and maintenance scripts
Expand Down Expand Up @@ -50,9 +49,6 @@ cargo test --workspace

# A single crate
cargo test -p aimux-providers --tests

# Contract tests (cross-language shared fixtures)
cargo test --test contract_test -p aimux-core
```

If you add or change a provider's request/response shapes, record a new
Expand Down Expand Up @@ -108,8 +104,7 @@ Keep the subject line imperative and ≤ 72 characters.
2. Make your change with focused commits.
3. Ensure `cargo fmt`, `cargo clippy -D warnings`, and `cargo test --workspace`
all pass locally. CI runs the same.
4. If you add a provider or binding, include cassette tests or contract
fixtures as appropriate.
4. If you add a provider or binding, include cassette tests.
5. Update the relevant doc (README, `docs/`, or `rfc/`) if your change affects
the public surface.
6. Open a PR against `master` and fill in the template.
Expand Down
10 changes: 6 additions & 4 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ aimux 是 **provider 接入与治理的运行时**:
| #185 | `ToolInput{Raw,Parsed}`;tracker 不删,改为对齐 `@ai-sdk/provider-utils` 并移入 aimux-provider-utils(#204);调整:见 [docs/aisdk-architecture-alignment.md §0.7](docs/aisdk-architecture-alignment.md#07-与-roadmap--rfc-0036-既有承诺的关系) |
| #170 / #171 前半 | sync/probe 脚本 + scheduled Action;27 个 base_url 分歧 triage |
| **B1 + C2** | 解锁项:protocol 列 + `from_resolved`;40 个 FFI 构造器转发 shim(B1 形式由 descriptor 数据源 + `create_xxx` 工厂替代,C2 shim 已取消;调整:见 [docs/aisdk-architecture-alignment.md §0.7](docs/aisdk-architecture-alignment.md#07-与-roadmap--rfc-0036-既有承诺的关系)) |
| **ops 协议 schema** | op 表、消息与错误信封、二进制帧、版本协商——先以文档 + 测试落地(RFC-0036 §4) |
| **L0 passthrough** | 原样调用任意 provider 端点,享受 auth / 重试 / 录制 |
| **ops 协议 schema** | op 表、消息与错误信封、二进制帧、版本协商——先以文档 + 测试落地(RFC-0036 §4);后置到全链路对齐切换之后,设计由 RFC-0039 承接(调整:见 [docs/aisdk-architecture-alignment.md §0.7](docs/aisdk-architecture-alignment.md#07-与-roadmap--rfc-0036-既有承诺的关系)) |
| **L0 passthrough** | 原样调用任意 provider 端点,享受 auth / 重试 / 录制;后置到全链路对齐切换之后,作为新增能力单独评审(调整:见 [docs/aisdk-architecture-alignment.md §0.7](docs/aisdk-architecture-alignment.md#07-与-roadmap--rfc-0036-既有承诺的关系)) |

版本语义:
- **Rust 层 breaking**:A2 删枚举、#185 换类型。
Expand All @@ -86,7 +86,7 @@ aimux 是 **provider 接入与治理的运行时**:

| 项 | 内容 |
|---|---|
| C1 | 9 个导出 + `dispatch`,**同一 dispatch 同时服务 FFI 与 stdio CLI**;旧导出保留共存 |
| C1 | ops 协议入口 + `dispatch`,**同一 dispatch 同时服务 FFI 与 stdio CLI**;导出数量不再固定为 9 个,按对齐文档 §6.2–§6.3 的函数组设计;旧符号按切换门一次替换,不共存(调整:见 [docs/aisdk-architecture-alignment.md §0.7](docs/aisdk-architecture-alignment.md#07-与-roadmap--rfc-0036-既有承诺的关系)) |
| C3 | `aimux_error_*` 访问器 → 错误 JSON 信封(含派生 `retry_after_ms`) |
| D1–D7 | 8 种绑定迁到 ops 薄封装。D1 Kotlin(只依赖 Java artifact)与 D5 Flutter ffigen 过渡版不依赖 C1,可在 0.6/0.7 提前做 |
| D8 | 类型镜像生成:serde → JSON Schema → 各语言,`--check` 门禁扩到全部输出 |
Expand All @@ -100,7 +100,7 @@ aimux 是 **provider 接入与治理的运行时**:
|---|---|
| #167 | transport-level replay:mock 挂 HTTP 层跑真协议代码,覆盖全协议 / 全模态;`ProviderRecord` = registry 行 + protocol |
| 漂移检测 | #170 扩展:定期重录,与 cassette 字节级 diff |
| 能力矩阵 | provider × 能力,每格由探测或录制支撑 |
| 能力矩阵 | provider × 能力,每格由探测或录制支撑;后置到全链路对齐迁移之后(见 §6.1) |
| CLI | `aimux probe / replay / diff`(#179 replay 子命令并入);#181 debug CLI 并入 |

### 1.0 ——「冻结」(~1-2 周)
Expand Down Expand Up @@ -149,6 +149,8 @@ aimux 是 **provider 接入与治理的运行时**:

### 6.1 产物体积与性能(硬门禁)

> 2026-10-13 调整:全链路对齐迁移按 [docs/aisdk-architecture-alignment.md §9.1](docs/aisdk-architecture-alignment.md#91-集成原则) 逐层合入主线,每个迁移层的 PR 描述列出产物改前改后的体积;0.9 能力矩阵排在迁移之后。2026-10-15 修订:体积与性能门禁的计量、预算与判定按 [RFC-0043](rfc/0043-size-performance-budgets.md)(#208),不以迁移完成为前提。

| 产物 | v0.5.0 | 目标 | 手段 |
|---|---|---|---|
| 桌面 `.a` ×5 | 117–139 MB | ≤ 70 MB | S1(只改 staticlib job) |
Expand Down
Loading
Loading