Skip to content

Commit 5c01051

Browse files
committed
update(ci): check documentation for all products
1 parent f975cee commit 5c01051

7 files changed

Lines changed: 148 additions & 7 deletions

File tree

.github/workflows/ci.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ name: CI
33
on:
44
push:
55
branches: [main]
6-
paths-ignore: ['**.md']
76
pull_request:
8-
paths-ignore: ['**.md']
97

108
permissions:
119
contents: read
@@ -51,18 +49,35 @@ jobs:
5149
- name: Run tests
5250
run: swift test --parallel -Xswiftc -warnings-as-errors
5351

52+
docs:
53+
runs-on: macos-26
54+
timeout-minutes: 20
55+
steps:
56+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
57+
with:
58+
persist-credentials: false
59+
- uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
60+
with:
61+
path: .build
62+
key: macos-docs-spm-${{ hashFiles('Package.resolved', 'Package.swift') }}
63+
restore-keys: macos-docs-spm-
64+
- name: Generate documentation
65+
run: make docs
66+
5467
check:
5568
if: always()
56-
needs: [lint, test-macos]
69+
needs: [lint, test-macos, docs]
5770
runs-on: ubuntu-latest
5871
timeout-minutes: 5
5972
steps:
6073
- name: Verify all jobs passed
6174
run: |
6275
if [[ "${{ needs.lint.result }}" != "success" || \
63-
"${{ needs.test-macos.result }}" != "success" ]]; then
76+
"${{ needs.test-macos.result }}" != "success" || \
77+
"${{ needs.docs.result }}" != "success" ]]; then
6478
echo "Required jobs failed:"
6579
echo " lint: ${{ needs.lint.result }}"
6680
echo " test-macos: ${{ needs.test-macos.result }}"
81+
echo " docs: ${{ needs.docs.result }}"
6782
exit 1
6883
fi

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@
44
xcuserdata/
55
DerivedData/
66
.DS_Store
7-
Package.resolved
87
.env

.spi.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
version: 1
22
builder:
33
configs:
4-
- documentation_targets: [AgentRunKit, AgentRunKitTesting]
4+
- documentation_targets:
5+
- AgentRunKit
6+
- AgentRunKitTesting
7+
- AgentRunKitFoundationModels
8+
- AgentRunKitMLX

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ check: format lint test
2020

2121
docs:
2222
swift package generate-documentation --target AgentRunKit
23+
swift package generate-documentation --target AgentRunKitTesting
24+
swift package generate-documentation --target AgentRunKitFoundationModels
25+
swift package generate-documentation --target AgentRunKitMLX
2326

2427
docs-preview:
2528
swift package --disable-sandbox preview-documentation --target AgentRunKit

Package.resolved

Lines changed: 105 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Sources/AgentRunKitFoundationModels/Documentation.docc/AgentRunKitFoundationModels.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ On-device LLM inference via Apple's Foundation Models framework.
66

77
AgentRunKitFoundationModels bridges AgentRunKit to Apple's on-device foundation model. Use `Agent.onDevice(tools:context:instructions:)` as the primary entry point, or construct a ``FoundationModelsClient`` directly. The same tools, agent loop, and streaming API work on-device with no network access required. Requires macOS 26+ or iOS 26+ with Apple Intelligence enabled.
88

9-
``Chat`` and direct ``FoundationModelsClient`` usage are supported for single-turn interactions: `Chat.send()` returns an `AssistantMessage` with text in `content`, and `Chat.stream()` terminates on content-only iterations the same way it does for cloud clients. Multi-turn conversations are currently limited: only the most recent user turn is forwarded to the on-device session, so prior assistant and tool messages are not yet preserved across turns. Full history linearization is tracked as a follow-up.
9+
`Chat` and direct ``FoundationModelsClient`` usage are supported for single-turn interactions: `Chat.send()` returns an `AssistantMessage` with text in `content`, and `Chat.stream()` terminates on content-only iterations the same way it does for cloud clients. Multi-turn conversations are currently limited: only the most recent user turn is forwarded to the on-device session, so prior assistant and tool messages are not yet preserved across turns. Full history linearization is tracked as a follow-up.
1010

1111
## Topics
1212

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# ``AgentRunKitMLX``
2+
3+
On-device LLM inference via MLX.
4+
5+
## Overview
6+
7+
AgentRunKitMLX bridges AgentRunKit to `mlx-swift-lm` through ``MLXClient``. Use it when an app wants local generation with the same AgentRunKit messages, tools, streaming deltas, and agent loop used by cloud clients.
8+
9+
MLX generation supports tool calls, streaming, request parameter overrides through `RequestContext.extraFields`, and reasoning extraction from `<think>` tags. Structured output via `ResponseFormat` is not supported by this client.
10+
11+
## Topics
12+
13+
### Client
14+
15+
- ``MLXClient``

0 commit comments

Comments
 (0)