Skip to content
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
244bbdd
Make Swift SDK real and exercise it in examples
i386 May 22, 2026
a7ddebc
Remove fake SDK fallback behavior
i386 May 22, 2026
2f2ed86
Merge main into SDK improvements
i386 May 22, 2026
6540213
Fix SDK review blockers
i386 May 22, 2026
5c46f32
Enable embedded serving in Swift SDK
i386 May 22, 2026
ee61892
Build embedded SDK runtime across platforms
i386 May 22, 2026
60568a3
Fix SDK smoke CI paths
i386 May 22, 2026
9faf903
Define SDK contract gates
i386 May 22, 2026
fe6a4fa
Guard SDK contract parity
i386 May 22, 2026
6e457fe
Add native SDK runtime packaging
i386 May 22, 2026
7f7415e
Verify native SDK runtime artifacts
i386 May 22, 2026
730bad1
Package native SDK runtimes as crates
i386 May 22, 2026
6a75e3f
Resolve packaged native SDK runtimes
i386 May 22, 2026
1dcc520
Package Kotlin SDK smoke native runtime
i386 May 22, 2026
3a2c197
Generate SDK bindings during builds
i386 May 22, 2026
93d1dad
Preserve SDK crate publish chain
i386 May 22, 2026
77fa883
Make SDK docs a usage guide
i386 May 22, 2026
f909ebc
Use one native SDK library name
i386 May 22, 2026
5eb31a1
Add Node.js SDK addon
i386 May 22, 2026
0be237c
Fix SDK CI failures
i386 May 22, 2026
8b62831
Fix SDK CI consistency check
i386 May 23, 2026
a982ab9
Run SDK crate tests after ABI setup
i386 May 23, 2026
d55f6bc
Relax client auto CI timeout
i386 May 23, 2026
bf46456
Split client and node SDK surfaces
i386 May 23, 2026
7571ac8
Rename node SDK crate to api server
i386 May 23, 2026
e5e678e
Fix SDK crate CI consistency check
i386 May 23, 2026
31e50a0
Document CI consistency checks for agents
i386 May 23, 2026
a2b3d43
Make PR quality sccache setup non-fatal
i386 May 23, 2026
8f30cfa
Route SDK node inference to remote models when needed
i386 May 23, 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
14 changes: 7 additions & 7 deletions .github/actions/compute-changes/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ runs:
echo "Unknown event type: ${{ inputs.event_name }}" >&2
exit 1
fi

cat /tmp/changed_files.txt

- name: Run affected-crates.sh
Expand All @@ -82,7 +82,7 @@ runs:
else
cat /tmp/changed_files.txt | bash scripts/affected-crates.sh --stdin > /tmp/crates_output.json
fi

cat /tmp/crates_output.json

- name: Derive outputs
Expand All @@ -91,7 +91,7 @@ runs:
run: |
# Read the JSON output from affected-crates.sh
CRATES_JSON=$(cat /tmp/crates_output.json)

# Extract fields from JSON
AFFECTED_CRATES=$(echo "$CRATES_JSON" | jq -c '.affected // []')
TEST_CRATES=$(echo "$CRATES_JSON" | jq -c '.test_crates // []')
Expand All @@ -104,10 +104,10 @@ runs:
else
CLIPPY_BATCHES=$(bash scripts/plan-clippy-batches.sh --crates-json "$AFFECTED_CRATES")
fi

# Read changed files for docs_only and rust_changed logic
CHANGED_FILES=$(cat /tmp/changed_files.txt | grep -v "^__force_all__$" || true)

# Determine docs_only: true if all_rust=false AND ui_changed=false AND all files match docs patterns
DOCS_ONLY="false"
if [[ "$ALL_RUST" == "false" ]] && [[ "$UI_CHANGED" == "false" ]]; then
Expand All @@ -119,7 +119,7 @@ runs:
fi
fi
fi

# Determine rust_changed: true if all_rust=true OR affected_crates is non-empty
RUST_CHANGED="false"
if [[ "$ALL_RUST" == "true" ]]; then
Expand Down Expand Up @@ -149,7 +149,7 @@ runs:
DIRECT_SDK_INPUTS=$(echo "$CHANGED_FILES" | grep -E '(^sdk/|^Package\.swift$|^scripts/ci-(native|kotlin|swift)-sdk-smoke\.sh$|^scripts/ci-sdk-fixture\.sh$|^\.github/workflows/sdk-smoke\.yml$)' || true)
if [[ -n "$DIRECT_SDK_INPUTS" ]]; then
SDK_SMOKE_REQUIRED="true"
elif echo "$AFFECTED_CRATES" | jq -e 'index("mesh-llm-client") or index("mesh-api") or index("mesh-api-ffi") or index("mesh-llm-protocol") or index("mesh-llm-routing") or index("mesh-llm-types")' >/dev/null; then
elif echo "$AFFECTED_CRATES" | jq -e 'index("mesh-llm-client") or index("mesh-llm-api") or index("mesh-llm-ffi") or index("mesh-llm-protocol") or index("mesh-llm-routing") or index("mesh-llm-types")' >/dev/null; then
SDK_SMOKE_REQUIRED="true"
fi
fi
Expand Down
51 changes: 30 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ jobs:
- 'crates/mesh-llm-gpu-bench/**'
- '.github/workflows/ci.yml'
sdk:
- 'crates/mesh-api/**'
- 'crates/mesh-api-ffi/**'
- 'crates/mesh-llm-api/**'
- 'crates/mesh-llm-ffi/**'
- 'crates/mesh-llm-nodejs/**'
- 'crates/mesh-client/**'
- 'crates/mesh-llm-identity/**'
- 'crates/mesh-llm-protocol/**'
Expand All @@ -90,6 +91,7 @@ jobs:
- 'Cargo.lock'
- '.github/workflows/docker.yml'
windows_cpu:
- 'crates/mesh-llm-nodejs/**'
- 'crates/skippy-ffi/**'
- 'scripts/build-windows.ps1'
- 'third_party/llama.cpp/**'
Expand Down Expand Up @@ -217,25 +219,6 @@ jobs:
exit 1
fi

- name: SDK and API crate tests
if: ${{ needs.changes.outputs.all_rust == 'true' || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-client') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-api') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-api-ffi') }}
env:
AFFECTED: ${{ needs.changes.outputs.affected_crates }}
ALL_RUST: ${{ needs.changes.outputs.all_rust }}
run: |
should_test() {
local crate="$1"
[ "$ALL_RUST" = "true" ] || jq -e --arg crate "$crate" 'index($crate) != null' <<<"$AFFECTED" >/dev/null
}

for c in mesh-llm-client mesh-api mesh-api-ffi; do
if should_test "$c"; then
cargo test -p "$c"
else
echo "Skipping $c; not affected"
fi
done

- name: Ensure ABI cache directory
run: mkdir -p "$LLAMA_STAGE_BUILD_DIR"

Expand All @@ -254,6 +237,25 @@ jobs:
if: steps.llama_cache.outputs.cache-hit != 'true'
run: scripts/build-llama.sh

- name: SDK and API crate tests
if: ${{ needs.changes.outputs.all_rust == 'true' || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-client') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-api') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-ffi') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-nodejs') }}
env:
AFFECTED: ${{ needs.changes.outputs.affected_crates }}
ALL_RUST: ${{ needs.changes.outputs.all_rust }}
run: |
should_test() {
local crate="$1"
[ "$ALL_RUST" = "true" ] || jq -e --arg crate "$crate" 'index($crate) != null' <<<"$AFFECTED" >/dev/null
}

for c in mesh-llm-client mesh-llm-api mesh-llm-ffi mesh-llm-nodejs; do
if should_test "$c"; then
cargo test -p "$c"
else
echo "Skipping $c; not affected"
fi
done

- name: Skippy crate tests
if: ${{ needs.changes.outputs.all_rust == 'true' || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'skippy-protocol') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'skippy-server') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'openai-frontend') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'skippy-runtime') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'skippy-topology') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'skippy-model-package') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'skippy-prompt') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'metrics-server') }}
env:
Expand Down Expand Up @@ -785,6 +787,13 @@ jobs:
if: ${{ env.RUN_WINDOWS_CPU_FULL != 'true' }}
shell: pwsh
run: cargo check --locked -p mesh-llm --bin mesh-llm
- name: Check Node SDK addon on Windows
shell: pwsh
run: cargo check --locked -p mesh-llm-nodejs
- name: Build Node SDK addon on Windows
if: ${{ env.RUN_WINDOWS_CPU_FULL == 'true' }}
shell: pwsh
run: cargo build --release --locked -p mesh-llm-nodejs
- name: CLI smoke test
if: ${{ env.RUN_WINDOWS_CPU_FULL == 'true' }}
shell: pwsh
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker-precheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ jobs:
crates/mesh-llm-types/ \
crates/mesh-llm-plugin/ \
crates/mesh-client/ \
crates/mesh-api/ \
crates/mesh-host-core/ \
crates/mesh-api-ffi/ \
crates/mesh-llm-api/ \
crates/mesh-llm-node/ \
crates/mesh-llm-ffi/ \
crates/mesh-llm-test-harness/ \
crates/model-ref/ \
crates/model-artifact/ \
Expand Down
52 changes: 31 additions & 21 deletions .github/workflows/pr_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ jobs:
- 'crates/mesh-llm-gpu-bench/**'
- '.github/workflows/pr_builds.yml'
sdk:
- 'crates/mesh-api/**'
- 'crates/mesh-api-ffi/**'
- 'crates/mesh-llm-api/**'
- 'crates/mesh-llm-ffi/**'
- 'crates/mesh-llm-nodejs/**'
- 'crates/mesh-client/**'
- 'crates/mesh-llm-identity/**'
- 'crates/mesh-llm-protocol/**'
Expand All @@ -95,6 +96,7 @@ jobs:
- 'Cargo.lock'
- '.github/workflows/pr_docker.yml'
windows_cpu:
- 'crates/mesh-llm-nodejs/**'
- 'crates/skippy-ffi/**'
- 'scripts/build-windows.ps1'
- 'third_party/llama.cpp/**'
Expand Down Expand Up @@ -276,25 +278,6 @@ jobs:
exit 1
fi

- name: SDK and API crate tests
if: ${{ matrix.backend == 'cpu' && env.RUN_LINUX_CPU == 'true' && (needs.changes.outputs.all_rust == 'true' || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-client') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-api') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-api-ffi')) }}
env:
AFFECTED: ${{ needs.changes.outputs.affected_crates }}
ALL_RUST: ${{ needs.changes.outputs.all_rust }}
run: |
should_test() {
local crate="$1"
[ "$ALL_RUST" = "true" ] || jq -e --arg crate "$crate" 'index($crate) != null' <<<"$AFFECTED" >/dev/null
}

for c in mesh-llm-client mesh-api mesh-api-ffi; do
if should_test "$c"; then
cargo test -p "$c"
else
echo "Skipping $c; not affected"
fi
done

- name: Ensure ABI cache directory
if: ${{ matrix.backend == 'cpu' && env.RUN_LINUX_CPU == 'true' }}
run: mkdir -p "$LLAMA_STAGE_BUILD_DIR"
Expand All @@ -315,6 +298,25 @@ jobs:
if: ${{ matrix.backend == 'cpu' && env.RUN_LINUX_CPU == 'true' && (steps.llama_cache.outputs.cache-hit != 'true') }}
run: scripts/build-llama.sh

- name: SDK and API crate tests
if: ${{ matrix.backend == 'cpu' && env.RUN_LINUX_CPU == 'true' && (needs.changes.outputs.all_rust == 'true' || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-client') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-api') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-ffi') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'mesh-llm-nodejs')) }}
env:
AFFECTED: ${{ needs.changes.outputs.affected_crates }}
ALL_RUST: ${{ needs.changes.outputs.all_rust }}
run: |
should_test() {
local crate="$1"
[ "$ALL_RUST" = "true" ] || jq -e --arg crate "$crate" 'index($crate) != null' <<<"$AFFECTED" >/dev/null
}

for c in mesh-llm-client mesh-llm-api mesh-llm-ffi mesh-llm-nodejs; do
if should_test "$c"; then
cargo test -p "$c"
else
echo "Skipping $c; not affected"
fi
done

- name: Skippy crate tests
if: ${{ matrix.backend == 'cpu' && env.RUN_LINUX_CPU == 'true' && (needs.changes.outputs.all_rust == 'true' || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'skippy-protocol') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'skippy-server') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'openai-frontend') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'skippy-runtime') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'skippy-topology') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'skippy-model-package') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'skippy-prompt') || contains(fromJson(needs.changes.outputs.affected_crates || '[]'), 'metrics-server')) }}
env:
Expand Down Expand Up @@ -900,6 +902,14 @@ jobs:
if: ${{ matrix.backend == 'cpu' && env.RUN_WINDOWS_CPU_FULL != 'true' }}
shell: pwsh
run: cargo check --locked -p mesh-llm --bin mesh-llm
- name: Check Node SDK addon on Windows
if: ${{ matrix.backend == 'cpu' }}
shell: pwsh
run: cargo check --locked -p mesh-llm-nodejs
- name: Build Node SDK addon on Windows
if: ${{ matrix.backend == 'cpu' && env.RUN_WINDOWS_CPU_FULL == 'true' }}
shell: pwsh
run: cargo build --release --locked -p mesh-llm-nodejs
- name: Build Windows GPU backend
if: ${{ env.RUN_WINDOWS_GPU == 'true' && steps.llama_cache.outputs.cache-hit != 'true' }}
shell: pwsh
Expand Down
63 changes: 62 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,66 @@ jobs:
mesh_binary_target: target/release/mesh-llm
cache_key_prefix: release-

build_native_sdk_runtime:
name: Build native SDK runtime ${{ matrix.name }}
needs: metadata
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: macOS aarch64 Metal
os: macos-14
backend: metal
target: aarch64-apple-darwin
artifact_suffix: darwin-aarch64-metal
- name: Linux x86_64 CPU
os: ubuntu-latest
backend: cpu
target: x86_64-unknown-linux-gnu
artifact_suffix: linux-x86_64-cpu
env:
LLAMA_STAGE_BACKEND: ${{ matrix.backend }}
MESH_NATIVE_SDK_TARGET: ${{ matrix.target }}
steps:
- uses: actions/checkout@v5

- uses: dtolnay/rust-toolchain@stable

- uses: mozilla-actions/sccache-action@v0.0.9

- name: Install Linux dependencies
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y build-essential cmake ninja-build pkg-config libssl-dev libdbus-1-dev curl lld

- name: Install macOS dependencies
if: runner.os == 'macOS'
run: brew install cmake ninja lld

- name: Package native SDK runtime
run: |
scripts/package-native-sdk.sh \
--build \
--backend "${{ matrix.backend }}" \
--target "${{ matrix.target }}" \
--out dist/native-sdk

- name: Verify native SDK runtime artifact
run: scripts/verify-native-sdk-package.sh dist/native-sdk/*.tar.gz

- name: Package native SDK runtime crate
run: scripts/package-native-sdk-crate.sh --out dist/native-sdk-crates dist/native-sdk/*.tar.gz

- name: Upload native SDK runtime
uses: actions/upload-artifact@v6
with:
name: release-native-sdk-${{ matrix.artifact_suffix }}
path: |
dist/native-sdk/*.tar.gz
dist/native-sdk/*.sha256
dist/native-sdk-crates/*/target/package/*.crate
if-no-files-found: error

build_linux_arm64:
name: Build Linux ARM64 CPU
needs: metadata
Expand Down Expand Up @@ -493,14 +553,15 @@ jobs:
- metadata
- build
- inference_smoke_tests
- build_native_sdk_runtime
- build_linux_arm64
- build_linux_cuda
- build_linux_cuda_blackwell
- build_linux_rocm
- build_linux_vulkan
- build_windows_cpu
- build_windows_gpu
if: ${{ always() && needs.metadata.result == 'success' && needs.build.result == 'success' && needs.inference_smoke_tests.result == 'success' && needs.build_linux_arm64.result == 'success' && (needs.build_linux_cuda.result == 'success' || needs.build_linux_cuda.result == 'skipped') && (needs.build_linux_cuda_blackwell.result == 'success' || needs.build_linux_cuda_blackwell.result == 'skipped') && (needs.build_linux_rocm.result == 'success' || needs.build_linux_rocm.result == 'skipped') && (needs.build_linux_vulkan.result == 'success' || needs.build_linux_vulkan.result == 'skipped') && needs.build_windows_cpu.result == 'success' && (needs.build_windows_gpu.result == 'success' || needs.build_windows_gpu.result == 'skipped') }}
if: ${{ always() && needs.metadata.result == 'success' && needs.build.result == 'success' && needs.inference_smoke_tests.result == 'success' && needs.build_native_sdk_runtime.result == 'success' && needs.build_linux_arm64.result == 'success' && (needs.build_linux_cuda.result == 'success' || needs.build_linux_cuda.result == 'skipped') && (needs.build_linux_cuda_blackwell.result == 'success' || needs.build_linux_cuda_blackwell.result == 'skipped') && (needs.build_linux_rocm.result == 'success' || needs.build_linux_rocm.result == 'skipped') && (needs.build_linux_vulkan.result == 'success' || needs.build_linux_vulkan.result == 'skipped') && needs.build_windows_cpu.result == 'success' && (needs.build_windows_gpu.result == 'success' || needs.build_windows_gpu.result == 'skipped') }}
runs-on: ubuntu-latest
steps:
- name: Download release artifacts
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,10 @@ __pycache__/
.venv/
.pytest_cache/
dist/MeshLLMFFI.xcframework.zip
sdk/kotlin/src/main/kotlin/uniffi/
sdk/kotlin/example/example-jvm/src/main/kotlin/uniffi/
sdk/node/native/
sdk/swift/Sources/MeshLLM/Generated/
sdk/swift/Generated/FFI/
sdk/swift/Generated/MeshLLMFFI.xcframework/
.impeccable.md
Loading
Loading