Skip to content

armgit / chums

Public Imported from GitHub
0

Talk to Claude Code and Codex agents from an Apple Watch and an iPhone. Each agent is a character on the watch.

CI shows the compiler's errors; the hub test doesn't need Claude Code installed

Lucas Couto7c113b39b6f9
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b9dce9c..51d5b5d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -13,8 +13,7 @@ concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
-# "shell: bash" runs steps with -eo pipefail (the default shell has no pipefail): an xcodebuild that fails before
-# "| tail" fails its step
+# "shell: bash" runs steps with -eo pipefail (the default shell has no pipefail)
defaults:
run:
shell: bash
@@ -69,14 +68,18 @@ jobs:
tools/gen-config.sh
cd app && CHUMS_BUNDLE=dev.chums.ci xcodegen generate
- name: Build ChumsWatch for the Simulator
- # pipefail (defaults above): a failed build fails the step
+ # the whole log in a file; on a failure, the compiler's errors first (with the lines after them), then its end
run: |
cd app
xcodebuild -project Chums.xcodeproj -target ChumsWatch -sdk watchsimulator -configuration Debug \
- CODE_SIGNING_ALLOWED=NO SYMROOT="$PWD/build/sym" build | tail -40
+ CODE_SIGNING_ALLOWED=NO SYMROOT="$PWD/build/sym" build > build-watch.log 2>&1 ||
+ { grep -A3 -E "error:" build-watch.log | head -120; tail -30 build-watch.log; exit 1; }
+ tail -5 build-watch.log
- name: Build the iPhone app, its widgets and the watch app inside it, for the Simulator
# the scheme, not -target with -sdk: -sdk would build the embedded watch widget against the iOS SDK
run: |
cd app
xcodebuild -project Chums.xcodeproj -scheme Chums -destination 'generic/platform=iOS Simulator' \
- -configuration Debug -derivedDataPath "$PWD/build/dd" CODE_SIGNING_ALLOWED=NO build | tail -40
+ -configuration Debug -derivedDataPath "$PWD/build/dd" CODE_SIGNING_ALLOWED=NO build > build-phone.log 2>&1 ||
+ { grep -A3 -E "error:" build-phone.log | head -120; tail -30 build-phone.log; exit 1; }
+ tail -5 build-phone.log
diff --git a/tools/test-hub.mjs b/tools/test-hub.mjs
index 891da91..d0f5cda 100644
--- a/tools/test-hub.mjs
+++ b/tools/test-hub.mjs
@@ -85,7 +85,8 @@ ok(st2.spoken.some(l => l.kind === 'echo' && l.agent === MAC), 'so is the echo o
const ag = Object.fromEntries(st2.agents.map(a => [a.id, a]))
ok(ag[MAC]?.status === 'idle' && ag[DESIGN]?.status === 'offline', `the agents list says who's running (${st2.agents.map(a => a.id + ':' + a.status).join(', ')})`)
ok(st2.agents.length >= 8 && st2.agents.every(a => a.character === a.id && a.runtime === 'claude'), `one agent per character, each on Claude Code by default (${st2.agents.length})`)
-ok(Array.isArray(st2.runtimes) && st2.runtimes.includes('claude'), `the state says what an agent can switch to (${st2.runtimes})`)
+// the runtimes installed on this Mac (none on a machine without Claude Code or Codex, like CI)
+ok(Array.isArray(st2.runtimes) && st2.runtimes.every(r => ['claude', 'codex'].includes(r)), `the state says what an agent can switch to (${st2.runtimes})`)
ok((await call(H, `/v1/agents/${MAC}/runtime`, { runtime: 'gemini' })).status === 400, 'an unknown runtime is refused')
// its permission mode, from the watch or the iPhone: kept in agents.json, and its session restarts in it (the private
// hub's bin/chums-agents is a stand-in that notes what it's asked)