Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
48 changes: 45 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
test "${{ inputs.release_tag }}" = "v${version}"
fi
- run: cargo fmt --all -- --check
- run: cargo test --workspace --all-features --locked
- run: cargo test --workspace --all-features --locked -- --test-threads=1
- run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings

binaries:
Expand Down Expand Up @@ -84,12 +84,13 @@ jobs:
version="${{ needs.validate.outputs.version }}"
archive="a3s-use-${version}-${{ matrix.name }}.tar.gz"
stage="${RUNNER_TEMP}/a3s-use-${version}-${{ matrix.name }}"
install -d "${stage}/skills" "${stage}/skill-data" "${stage}/office-skills" "${stage}/dashboard"
install -d "${stage}/skills" "${stage}/skill-data" "${stage}/office-skills" "${stage}/ocr-skills" "${stage}/dashboard"
install -m 0755 "target/${{ matrix.target }}/release/a3s-use" "${stage}/a3s-use"
install -m 0755 "target/${{ matrix.target }}/release/a3s-use-browser-driver" "${stage}/a3s-use-browser-driver"
cp -R crates/browser-driver/skills/. "${stage}/skills/"
cp -R crates/browser-driver/skill-data/. "${stage}/skill-data/"
cp -R crates/office/skills/. "${stage}/office-skills/"
cp -R crates/ocr/skills/. "${stage}/ocr-skills/"
cp -R crates/browser-driver/dashboard/out/. "${stage}/dashboard/"
install -m 0644 LICENSE README.md THIRD_PARTY_NOTICES.md "${stage}/"
install -m 0644 crates/browser-driver/LICENSE-APACHE-2.0 "${stage}/LICENSE-APACHE-2.0"
Expand All @@ -110,6 +111,7 @@ jobs:
Copy-Item -Recurse "crates/browser-driver/skills" "$stage/skills"
Copy-Item -Recurse "crates/browser-driver/skill-data" "$stage/skill-data"
Copy-Item -Recurse "crates/office/skills" "$stage/office-skills"
Copy-Item -Recurse "crates/ocr/skills" "$stage/ocr-skills"
Copy-Item -Recurse "crates/browser-driver/dashboard/out" "$stage/dashboard"
Copy-Item LICENSE,README.md,THIRD_PARTY_NOTICES.md $stage
Copy-Item crates/browser-driver/LICENSE-APACHE-2.0 "$stage/LICENSE-APACHE-2.0"
Expand All @@ -128,6 +130,7 @@ jobs:
test -x "${install_root}/a3s-use-browser-driver"
test -f "${install_root}/skill-data/core/SKILL.md"
test -f "${install_root}/office-skills/a3s-use-office/SKILL.md"
test -f "${install_root}/ocr-skills/a3s-use-ocr/SKILL.md"
test -f "${install_root}/dashboard/index.html"
test -f "${install_root}/LICENSE-APACHE-2.0"
test -f "${install_root}/UPSTREAM.md"
Expand All @@ -143,6 +146,29 @@ jobs:
"agentcore", "core", "dogfood", "electron", "slack", "vercel-sandbox"
}
PY
"${install_root}/a3s-use" ocr doctor --json > "${RUNNER_TEMP}/ocr-doctor.json"
python3 - "${RUNNER_TEMP}/ocr-doctor.json" <<'PY'
import json, pathlib, sys
value = json.loads(pathlib.Path(sys.argv[1]).read_text())
assert value["ok"] is True
assert value["data"]["readiness"] in {"ready", "missing", "broken", "unknown"}
PY
"${install_root}/a3s-use" capability snapshot --json > "${RUNNER_TEMP}/capabilities.json"
python3 - "${RUNNER_TEMP}/capabilities.json" "${install_root}" <<'PY'
import json, pathlib, sys
value = json.loads(pathlib.Path(sys.argv[1]).read_text())
root = pathlib.Path(sys.argv[2]).resolve()
ocr = next(
capability
for capability in value["data"]["registry"]["capabilities"]
if capability["id"] == "use/ocr"
)
assert ocr["mcp"]["target"] == "ocr-native"
assert len(ocr["skills"]) == 1
assert pathlib.Path(ocr["skills"][0]["path"]).resolve() == (
root / "ocr-skills" / "a3s-use-ocr" / "SKILL.md"
)
PY
A3S_OFFICECLI_EXECUTABLE="${install_root}/must-not-be-invoked" \
"${install_root}/a3s-use" office skills list --json > "${RUNNER_TEMP}/office-skills.json"
python3 - "${RUNNER_TEMP}/office-skills.json" <<'PY'
Expand Down Expand Up @@ -179,6 +205,7 @@ jobs:
"$root/a3s-use-browser-driver.exe",
"$root/skill-data/core/SKILL.md",
"$root/office-skills/a3s-use-office/SKILL.md",
"$root/ocr-skills/a3s-use-ocr/SKILL.md",
"$root/dashboard/index.html",
"$root/LICENSE-APACHE-2.0",
"$root/UPSTREAM.md",
Expand All @@ -194,6 +221,19 @@ jobs:
if (-not $officeSkills.ok -or $officeSkills.data.Count -ne 1 -or $officeSkills.data[0].name -ne "a3s-use-office") {
throw "Packaged Office Skill smoke failed"
}
$ocr = (& "$root/a3s-use.exe" ocr doctor --json | ConvertFrom-Json)
if (-not $ocr.ok -or -not $ocr.data.readiness) { throw "Built-in OCR doctor smoke failed" }
$capabilities = (& "$root/a3s-use.exe" capability snapshot --json | ConvertFrom-Json)
$ocrCapability = $capabilities.data.registry.capabilities |
Where-Object id -eq "use/ocr"
if ($ocrCapability.mcp.target -ne "ocr-native" -or $ocrCapability.skills.Count -ne 1) {
throw "Built-in OCR capability projection smoke failed"
}
$expectedOcrSkill = (Resolve-Path "$root/ocr-skills/a3s-use-ocr/SKILL.md").Path
$actualOcrSkill = (Resolve-Path $ocrCapability.skills[0].path).Path
if (-not [StringComparer]::OrdinalIgnoreCase.Equals($actualOcrSkill, $expectedOcrSkill)) {
throw "Built-in OCR Skill was not projected from the installed release"
}
$requests = @(
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"release-smoke","version":"1"}}}',
'{"jsonrpc":"2.0","method":"notifications/initialized","params":{}}',
Expand Down Expand Up @@ -223,7 +263,7 @@ jobs:
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.release_tag || github.ref }}
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Publish Core then Browser
- name: Publish Core, OCR, then Browser
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_TOKEN }}
VERSION: ${{ needs.validate.outputs.version }}
Expand Down Expand Up @@ -262,6 +302,8 @@ jobs:

publish_once a3s-use-core
wait_until_visible a3s-use-core
publish_once a3s-use-ocr
wait_until_visible a3s-use-ocr
publish_once a3s-use-browser

release:
Expand Down
20 changes: 20 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ members = [
"crates/browser-driver",
"crates/office",
"crates/extension",
"crates/ocr",
]
resolver = "2"

Expand Down Expand Up @@ -48,7 +49,7 @@ license.workspace = true
repository.workspace = true
authors.workspace = true
rust-version = "1.85"
description = "Typed Browser, Office, and external application capabilities for A3S"
description = "Typed Browser, Office, OCR, and external application capabilities for A3S"

[lib]
name = "a3s_use"
Expand All @@ -59,14 +60,15 @@ name = "a3s-use"
path = "src/main.rs"

[features]
default = ["browser", "office", "extensions", "mcp"]
default = ["browser", "office", "ocr", "extensions", "mcp"]
browser = ["dep:a3s-use-browser"]
office = [
"dep:a3s-use-office",
"dep:axum",
"dep:futures-util",
"dep:getrandom",
]
ocr = ["dep:a3s-use-ocr"]
extensions = ["dep:a3s-use-extension"]
mcp = [
"dep:axum",
Expand All @@ -84,6 +86,7 @@ lightpanda = ["browser", "a3s-use-browser/lightpanda"]
a3s-use-core = { version = "0.1.1", path = "crates/core" }
a3s-use-browser = { version = "0.1.1", path = "crates/browser", optional = true }
a3s-use-office = { version = "0.1.1", path = "crates/office", optional = true }
a3s-use-ocr = { version = "0.1.1", path = "crates/ocr", optional = true }
a3s-use-extension = { version = "0.1.1", path = "crates/extension", optional = true }
anyhow.workspace = true
axum = { workspace = true, optional = true }
Expand Down
Loading
Loading