This app is developed against a self-hosted hermes-webui server exposed over real HTTPS. See PROJECT_SPEC.md for the full product and API plan.
Sections covering TestFlight and App Store Connect are maintainer-only ops — they require the maintainer's Apple Developer account and App Store Connect access. Contributors never need them to build, test, or run the app.
Use:
https://<your-server>
Point this at your own hermes-webui server exposed through an HTTPS tunnel or reverse proxy (e.g. Cloudflare Tunnel). Real HTTPS works from both the iOS simulator and physical devices without an App Transport Security exception. If the server sets HERMES_WEBUI_PASSWORD, you need that password to sign in.
Before debugging the app, verify the server is reachable:
curl https://<your-server>/healthThe app is currently tested against hermes-webui tag v0.51.85, peeled commit f1d399b437c1ca7fe4b6d2093aebe334c32f34a3. The root UPSTREAM_TESTED_SHA file is the machine-readable pin for future drift checks and contract tests.
The pin was last verified against the upstream GitHub tag source during the 2026-05-05 audit slice; authenticated settings/version checks require server credentials.
Contract test readiness is documented in CONTRACT_TESTS.md. Current coverage verifies the app's endpoint matrix and native POST header shape with URLProtocol-backed tests; the full Docker-backed upstream contract target remains future hardening.
The server/API pin above is intentionally separate from the upstream Hermex iOS source. The personal release branch records its app-source integration state in:
HERMEX_APP_UPSTREAM_TRIAGED_SHA: latest upstream app commit whose changes were reviewed and routed.HERMEX_APP_UPSTREAM_TESTED_SHA: latest upstream app commit contained inpersonal/mainand validated with the full suite and simulator smoke.
The daily Hermex App Upstream Watch
compares those pins with the read-only upstream/master ref and maintains a
standing needs-triage issue while they lag.
To integrate new upstream app work:
- Fetch
upstream/master; never push or open a pull request againstupstream. - Create a
sync/upstream-<short-sha>branch frompersonal/main. - Merge the fetched upstream ref into that sync branch.
- Review every upstream commit and conflict, preserving the behaviors in
Config/PersonalReleaseBaseline.json. - Run the complete XCTest suite and a signed simulator build/smoke.
- Advance both app-upstream pin files to the validated upstream SHA in the same
reviewed pull request into
personal/main.
Do not advance a pin merely to silence the watcher. The personal release guard requires the pinned upstream commit to be an ancestor of the release and refuses to archive if the latest fetched upstream tip remains unreviewed or untested.
Phase 4 streaming uses GET /api/chat/stream?stream_id=... over Server-Sent Events. Current upstream source confirms the stream response uses Content-Type: text/event-stream; charset=utf-8, X-Accel-Buffering: no, Connection: keep-alive, and sends : heartbeat comments every 30 seconds while no app event is ready.
Cloudflare can still close long-lived responses if the origin does not send data for long enough. The expected healthy behavior for Hermex is:
- streams longer than 2 minutes continue delivering tokens, tool events, reasoning events, title events,
done, andstream_endwhen the server emits them; - quiet periods under normal heartbeat behavior stay connected because the server writes
: heartbeatabout every 30 seconds; - if the connection is cut while the upstream stream is still active, returning to the foreground or reconnecting should use
GET /api/chat/stream/status?stream_id=...and reattach to the same stream instead of resending the user message.
Manual verification before closing Phase 4:
- Sign in to
https://<your-server>from the simulator. - Start a prompt that naturally runs for more than 2 minutes.
- Keep the app foregrounded and verify streamed content continues past the 2 minute mark.
- During another long response, background the app for at least 30 seconds, foreground it, and verify the app either reattaches to the active stream or reloads the completed transcript without duplicating the user message.
- If a stream drops after a quiet gap, record whether the server emitted no tokens/tool/reasoning events for more than roughly 100 seconds. That is a known Cloudflare risk even with normal SSE support.
For contributors without access to the tunnel:
- Clone the upstream server:
git clone https://github.com/nesquena/hermes-webui.git
cd hermes-webui- Run it with Docker or directly with Python, following the upstream README.
For simulator-only testing, http://localhost:8787 can work when the server is running on the same Mac. For physical-device testing, use HTTPS or a Tailscale 100.64.0.0/10 IP; TestFlight builds include a scoped ATS exception for that Tailscale range.
One proven way to run the server natively on macOS is through launchd:
- LaunchAgent:
~/Library/LaunchAgents/com.hermes.webui.plist - Server script:
server.pyin yourhermes-webuicheckout - Local bind:
127.0.0.1:8787 - Public hostname:
https://<your-server> - Tunnel target:
http://127.0.0.1:8787
Useful commands for this setup:
launchctl load ~/Library/LaunchAgents/com.hermes.webui.plist
launchctl unload ~/Library/LaunchAgents/com.hermes.webui.plist
launchctl kickstart -k gui/$(id -u)/com.hermes.webui
cloudflared tunnel info <tunnel-name>
launchctl list | grep cloudflared
curl https://<your-server>/healthIf the server appears down, check in this order:
- launchd job status
- local port
8787 - Cloudflare Tunnel status
For local port inspection:
lsof -i :8787XcodeBuildMCP is the preferred local validation path for feature and bug-fix slices. The repo config lives in .xcodebuildmcp/config.yaml and sets:
- Project:
HermesMobile.xcodeproj - Scheme:
HermesMobile - Configuration:
Debug - Simulator:
iPhone 17 - Bundle ID:
com.uzairansar.hermesmobile
After each completed implementation slice:
- Confirm XcodeBuildMCP sees the repo defaults.
- Run focused tests for the changed behavior when available.
- Run the full XCTest suite before asking for review or committing.
- Build and launch the app in Simulator when UI or runtime behavior changed.
- Capture a screenshot or logs if the slice needs visual/runtime evidence.
- Let the owner run the manual simulator checklist for the slice.
Agent/MCP flow:
- Call
session_show_defaultsbefore the first local build/run/test. - If defaults are missing, set project
HermesMobile.xcodeproj, schemeHermesMobile, configurationDebug, simulatoriPhone 17, and bundle IDcom.uzairansar.hermesmobile. - Use
test_simfor XCTest validation. - Use
build_run_simto build, install, launch, and open Simulator for manual testing. - Use
screenshot, UI inspection, and log capture only when they help validate the slice.
Human/CLI equivalents:
xcodebuildmcp simulator list --enabledxcodebuildmcp simulator test --output jsonlxcodebuildmcp simulator build-and-run --output jsonlIf iPhone 17 is not installed, choose a nearby available iPhone simulator and update .xcodebuildmcp/config.yaml only if that should become the shared repo default.
The repo keeps the project style target of small Swift files, but file-size enforcement is warning-only while the large code-audit refactors continue.
Run:
scripts/check-swift-file-sizesPolicy:
- Warn on production app Swift files over 500 LOC.
- Exit successfully even when warnings are present.
- Scope the check to
HermesMobile/production app files. - Exempt tests, generated files, preview files, the share extension, and the live activity widget for now.
- Use warnings to make future drift visible; do not block current work on known oversized files.
You can override the warning threshold for local experiments:
HERMES_SWIFT_FILE_SIZE_LIMIT=300 scripts/check-swift-file-sizesUse raw xcodebuild when XcodeBuildMCP is unavailable, when validating lower-level build failures, or when matching the GitHub Actions release/archive commands exactly. The TestFlight workflows continue to use raw xcodebuild and are not replaced by XcodeBuildMCP.
List available simulators:
xcrun simctl list devices availableBuild for an available iPhone simulator:
xcodebuild -project HermesMobile.xcodeproj -scheme HermesMobile -destination 'platform=iOS Simulator,name=iPhone 15' buildIf iPhone 15 is not installed, choose a nearby available iPhone simulator.
Current status:
- App Store Connect app name:
Hermex. - Xcode target/scheme name:
HermesMobile. - iPhone home-screen display name:
Hermex. - Bundle ID:
com.uzairansar.hermesmobile. - Test bundle ID:
com.uzairansar.hermesmobile.tests. - SKU:
hermes-mobile-ios. - Apple Developer Team ID:
6GYD9C9N6R. - Signing uses Xcode automatic signing.
- Export compliance is declared in
Info.plistwithITSAppUsesNonExemptEncryption = NO; the app does not implement custom/proprietary encryption and uses normal Apple/platform networking security. - App icon uses owner-supplied light and dark assets in
AppIcon.appiconset. - Launch screen uses the plist-based
UILaunchScreenplaceholder fromInfo.plist, which is acceptable for internal TestFlight validation. PrivacyInfo.xcprivacyis bundled with the app target. It declares no tracking, no developer-collected data, and app-onlyUserDefaultsaccess for local preferences.- Camera capture is deferred and is not declared. Add
NSCameraUsageDescriptionand update the privacy review only if camera capture is implemented later. - The current GitHub Actions upload path is intentionally internal-only. External TestFlight readiness and Beta App Review sequencing are tracked in
TESTFLIGHT.md.
After merging the repo rebrand slice, update App Store Connect metadata separately:
- Production app (
com.uzairansar.hermesmobile): rename listing fromHermes Agent Mobile→Hermex. - Branch TestFlight app (
com.uzairansar.hermesmobile.branch): rename listing fromHermes Agent Branch→Hermex Branch. - Update TestFlight/review notes and any metadata copy that still says the old app name.
- Upload a build and confirm TestFlight shows Hermex / Hermex Branch on the home screen after processing.
The personal TestFlight app is separate from the production and branch apps
documented below. Its bundle, team, App Store Connect app, and beta-group
identity remain in local-only CURRENT.md.
Personal TestFlight is the owner's fast iteration channel — the goal is the
shortest path from a merged personal/main to their phone. Never archive it
with a raw xcodebuild command from the active worktree; create a
build-specific archive from the immutable remote personal/main snapshot:
scripts/personal-release archive \
--build-number <unique-build-number> \
--xcconfig /absolute/path/to/Personal.xcconfig \
--archive-path build/HermexPersonal-<unique-build-number>.xcarchive \
--expected-bundle-id <personal-bundle-id-from-CURRENT.md> \
--expected-team-id <personal-team-id-from-CURRENT.md>The archive command always:
- fetches
origin/personal/mainand the read-only appupstream/master; - verifies every required personal baseline commit (broken lineage blocks);
- warns — without blocking — when app-upstream pins are stale; sync upstream in free time, it is never a release gate;
- exports a clean Git snapshot instead of reading the active worktree;
- embeds the source branch, source SHA, upstream SHA, and clean state;
- verifies the archive's bundle, team, build number, and embedded identity;
- writes a sibling
.source.jsonmanifest for the delivery record.
It does not rerun the XCTest suite by default: personal/main only advances
through the required CI Gate, so the snapshot already passed the full suite
on merge. Pass --run-tests to revalidate when a build warrants it.
Only export/upload the archive that passed this command. After upload, follow the
personal completion rule in CURRENT.md: wait for the exact build to become
valid and ready for internal testing, add it to the recorded internal group,
and read the group-build relationship back. Upload success alone is incomplete.
For the scheduled app-upstream watcher to run, the fork's GitHub default branch
must be personal/main. Protect master from feature merges and require the
CI Gate check on personal/main.
When the owner says "push to branch testflight", upload the current feature branch
to the side-by-side Hermex Branch internal TestFlight app. This is a TestFlight
upload, not a Git push. Never merge, Git push, or upload the production
com.uzairansar.hermesmobile TestFlight app unless the owner explicitly asks.
Branch TestFlight app identity:
- App Store Connect app name:
Hermex Branch - Main bundle ID:
com.uzairansar.hermesmobile.branch - Share extension bundle ID:
com.uzairansar.hermesmobile.branch.shareextension - Live Activity widget bundle ID:
com.uzairansar.hermesmobile.branch.liveactivitywidget - Display name:
Hermex Branch - App group:
group.com.uzairansar.hermesmobile.branch - URL scheme:
hermes-agent-branch - SKU:
hermes-mobile-ios-branch
Steps:
-
Validate the branch first: at minimum
git diff --checkplus a simulator build; run focused or full tests based on the branch's risk. -
Use a unique
CURRENT_PROJECT_VERSIONfor every upload — prefer a timestamp-like number such asYYYYMMDDHHMM. -
Archive with the reusable branch build config
Config/BranchTestFlight.xcconfig:xcodebuild -project HermesMobile.xcodeproj -scheme HermesMobile -configuration Release \ -destination 'generic/platform=iOS' -archivePath build/HermesAgentBranch.xcarchive \ -xcconfig Config/BranchTestFlight.xcconfig CURRENT_PROJECT_VERSION=<unique-build-number> \ archive -allowProvisioningUpdates
-
Upload with the reusable export config
Config/BranchTestFlightExportOptions.plist:xcodebuild -exportArchive -archivePath build/HermesAgentBranch.xcarchive \ -exportOptionsPlist Config/BranchTestFlightExportOptions.plist \ -exportPath build/HermesAgentBranchExport -allowProvisioningUpdates
-
After upload succeeds, tell the owner the version/build number and that App Store Connect/TestFlight may need processing time before it appears on the phone.
Manual internal TestFlight release flow:
- Confirm
masteris clean and validated with the current simulator build/tests. - Increment
CURRENT_PROJECT_VERSIONbefore every upload.MARKETING_VERSIONcan remain1.0while internal builds iterate. - In Xcode, select
Any iOS Deviceand runProduct > Archive. - In Organizer, choose
Distribute App > App Store Connect > Upload. - Wait for App Store Connect processing to complete.
- Add the build to the internal TestFlight group first and test on the owner's iPhone.
- Promote only owner-verified builds to external testers later. The first external build requires Beta App Review.
GitHub Actions internal TestFlight flow:
- Configure a GitHub environment named
internal-testflight. Require manual approval on that environment if available for the repository plan. - Add these environment secrets:
APP_STORE_CONNECT_KEY_ID: the App Store Connect API key ID.APP_STORE_CONNECT_ISSUER_ID: the App Store Connect issuer ID.APP_STORE_CONNECT_PRIVATE_KEY: the full.p8private key contents. A one-line value with escaped\nseparators also works.
- Use an App Store Connect team API key with enough access to upload builds and let
xcodebuild -allowProvisioningUpdatesmanage automatic signing for Team ID6GYD9C9N6R. If provisioning fails in CI, check the API key role, Apple Developer agreements, and App Store Connect access before changing the project to manual signing. - Run the
Internal TestFlightworkflow manually from the GitHub Actions tab after the workflow file exists on the default branch. - Select
masteras the workflow ref, setconfirm_internal_onlytoINTERNAL, and leavebuild_numberblank so the workflow selects the next App Store Connect build number for the current marketing version. - The workflow archives the Release build, uploads directly to App Store Connect, and uses
testFlightInternalTestingOnly = trueso uploaded builds cannot be promoted to external TestFlight or App Store distribution. - Wait for App Store Connect processing to complete, then add the processed build to the internal TestFlight group and test on the owner's iPhone.
CI upload guardrails and likely failure modes:
- The workflow only runs on manual
workflow_dispatch, fails unless the selected ref ismaster, and serializes uploads with a single concurrency group. - The workflow detects
MARKETING_VERSIONfrom Xcode build settings, queries App Store Connect for existing uploaded builds for that version, selects the next build number, and overridesCURRENT_PROJECT_VERSIONwithout editing the Xcode project. Ifbuild_numberis provided manually, the workflow still fails before archiving unless that value is greater than the latest App Store Connect build. - Missing or malformed secrets fail before archiving. The private key must remain a secret and must never be committed.
- Automatic signing can fail if the API key lacks Developer Portal/provisioning access, the Apple Developer Program agreements are pending, or App Store Connect has not finished recognizing the app record.
- GitHub macOS runner image or Xcode changes can break archive behavior; the workflow logs
xcodebuild -versionto make that visible. - Upload success only means Apple accepted delivery. Processing, TestFlight group assignment, and later external tester promotion remain manual App Store Connect steps.
- Builds uploaded through this workflow are marked internal-only. They cannot be used for external TestFlight, Beta App Review, or App Store distribution; use the separate external-capable path described in
TESTFLIGHT.mdfor external review builds.
GitHub Actions external-capable TestFlight flow:
- Use this only after the intended RC commit has passed local validation, been pushed to
origin/master, and passed owner internal TestFlight smoke on a physical iPhone. - Configure a GitHub environment named
external-testflight. Require manual approval on that environment if available for the repository plan. - Add the same App Store Connect secrets used by the internal workflow to the
external-testflightenvironment. - Run the
External TestFlightworkflow manually from the GitHub Actions tab. - Select
masteras the workflow ref, setconfirm_external_reviewtoEXTERNAL_REVIEW, and leavebuild_numberblank so the workflow selects the next App Store Connect build number for the current marketing version. - The workflow archives the Release build, uploads directly to App Store Connect, and uses
ci/ExternalTestFlightExportOptions.plist, which intentionally does not settestFlightInternalTestingOnly. - Wait for App Store Connect processing to complete. Adding the build to an external group and submitting it to Beta App Review remain manual App Store Connect steps; the workflow does not invite testers.
Use this before internal TestFlight smoke builds and again before adding external testers. Capture bugs, polish notes, and follow-up ideas in GitHub Issues.
- Fresh install opens onboarding.
- Valid server URL + password logs in.
- Wrong password shows clear error.
- Server/tunnel down shows useful error.
- Sign out and reconfigure returns to onboarding.
- Load sessions online.
- Pull to refresh.
- Search sessions.
- Create new session.
- Pin/unpin.
- Archive/restore.
- Move to project and back to no project.
- Duplicate/fork.
- Delete disposable session only.
- Offline cached session list displays clearly.
- Open existing session at latest message.
- Send normal message.
- Watch response stream.
- Stop response.
- Send while streaming using each configured behavior.
- Background/foreground during active stream.
- Long response over 2 minutes.
- Network interruption recovery.
- Offline cached transcript is read-only.
- User message: edit, fork, copy.
- Assistant message: listen, stop listening, select text, regenerate, fork, copy.
- Older edit/regenerate shows discard warning.
- Local assistant command cards do not expose destructive message actions.
- Model picker and favorites/recents.
- Reasoning picker.
- Workspace picker.
- Profile switch, including new-session confirmation.
- Attach file.
- Attach one photo.
- Attach multiple photos.
- Paste image/file.
- Failed upload preserves draft.
- Voice input allowed, denied, stopped, and sent.
- Haptics on send/response completion on device.
/help/new/model/workspace/reasoning/title/personality/skills- Direct skill slash shortcut.
/queue/steer/interrupt/status/btw/backgroundand/bg/branchand/fork/undo/retry/compressand/compact- Unsupported commands show friendly local message.
- Files list/search.
- Text file preview.
- Image preview.
- Unsupported binary preview.
- Tasks list/detail/output.
- Skills list/search/detail/linked file.
- Memory notes/profile.
- Usage analytics timeframe switching.
- Light and dark mode.
- Portrait and landscape.
- Largest Dynamic Type.
- VoiceOver core path.
- App icon visible.
- Launch screen acceptable.
- Privacy permission prompts readable.
- TestFlight install path documented.
Preferred Git workflow before CI automation:
- Create one short branch per work item, such as
issue/<n>-slug. - Build and test on that branch.
- Merge to
masteronly after validation passes. - Treat
masteras the source for internal TestFlight candidates.