Skip to content

Commit fa500d8

Browse files
authored
Merge pull request #16 from DRYCodeWorks/dy/wire-swift-client
[client] Wire the installer to the Swift agent, delete Hammerspoon
2 parents bb5d3e8 + c786fb9 commit fa500d8

9 files changed

Lines changed: 1339 additions & 1839 deletions

File tree

.github/workflows/ci.yml

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,6 @@ jobs:
3838
- name: pytest
3939
run: uv run --locked pytest -q
4040

41-
- name: Install Lua
42-
run: |
43-
if [ "$RUNNER_OS" = "macOS" ]; then
44-
brew install lua
45-
else
46-
sudo apt-get update && sudo apt-get install -y lua5.4
47-
sudo ln -sf "$(command -v lua5.4)" /usr/local/bin/lua
48-
fi
49-
50-
# The client-side suite. It has never been wired into anything, so it
51-
# only ran when someone remembered it existed.
52-
- name: Lua client tests
53-
run: lua tests/test_client_record.lua
5441

5542
shellcheck:
5643
runs-on: ubuntu-latest
@@ -60,3 +47,27 @@ jobs:
6047
# Preinstalled on the Ubuntu runner image.
6148
- name: shellcheck
6249
run: shellcheck install-server.sh install-client.sh
50+
51+
# The client is macOS-only and needs a real Swift toolchain, so it cannot
52+
# join the portable matrix above. Builds the bundle and asserts the signature
53+
# verifies — an unsigned or broken-signature bundle is exactly the state in
54+
# which TCC grants stop surviving a rebuild.
55+
swift:
56+
runs-on: macos-latest
57+
steps:
58+
- uses: actions/checkout@v7
59+
60+
- name: Test
61+
run: cd swift && swift test
62+
63+
- name: Build Hark.app
64+
run: cd swift && swift build -c release && bash Packaging/build-app.sh
65+
66+
- name: Verify the signature
67+
run: codesign --verify --strict --verbose=2 swift/Packaging/Hark.app
68+
69+
- name: Verify the microphone entitlement survived signing
70+
run: |
71+
codesign -d --entitlements - --xml swift/Packaging/Hark.app 2>/dev/null \
72+
| grep -q 'com.apple.security.device.audio-input' \
73+
|| { echo "missing audio-input entitlement — TCC will refuse to prompt"; exit 1; }

README.md

Lines changed: 154 additions & 96 deletions
Large diffs are not rendered by default.

client/hark-config.example.lua

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)