Standalone home for a reusable simulator broker plus macOS app surface.
Simulator Broker is available under the MIT License. See LICENSE.
Current status:
- a first extracted file-backed
broker-coreslice exists underbroker-core/ - a real
simctladapter boundary now exists underbroker-core/simctl.mjsfor provisioning, lifecycle control, and drift observation - a first
simbrokerCLI exists underclient/bin/simbroker.mjs - a first
brokerdlocal service exists underclient/bin/brokerd.mjsandclient/service/ - broker-mediated lifecycle controls for
boot,shutdown,erase, andrepairnow exist in the CLI and service contracts - direct and service-backed broker failures now expose stable exit codes for invalid requests, unavailable capacity, repair-needed aliases, override-required flows, and internal failures
host init --bootstrap-confignow provisions real simulator devices, including dual iPhone UI aliases (ui-1,ui-2), a second dedicatedbuild-fastalias for overlapping build-test demand, and records their actual IDs and runtime versions in host configerase-on-acquireleases now run behind a dedicated reset lock and roll back cleanly if reset fails before a lease is handed out- a macOS operator app now exists under
app/with Overview, Simulators, Projects, and Events screens plus broker-backed actions for pinning, release, and lifecycle control - the macOS app overview, empty-state, simulator-detail, destructive-confirmation, and override-required remediation flows now have captured operator-facing evidence; the app also supports alternate broker roots with
--state-root,--host-config, optional--cli-path, and direct deep-link review targeting - the broker now publishes a canonical
app-snapshot.jsonread model under the broker state root for the app and smoke tooling - the app can issue broker commands over the local
brokerdUnix socket without bypassing broker policy - the app now classifies first-run setup state, can bootstrap host config and start
brokerdthrough the installed CLI, and shows per-repo onboarding commands when the machine is ready but no repo has been registered yet - a local install flow now exists through
npm run install:localorscripts/install_local.sh - a local-debug portable bundle now exists through
npm run package:localfor local development convenience, and a separate signed distribution path now exists throughnpm run package:distribution - first-run host setup can now bootstrap a starter host config through
simbroker host init --bootstrap-config - fresh repos can now scaffold
.simulator-broker/project.jsonthroughsimbroker project init - repo capacity can now be diagnosed with
simbroker capacity check; missing broker-managed capacity can be previewed with non-mutatingcapacity reconcileand applied only with exact human confirmation of the current plan - broker-aware sample consumer repo artifacts now cover manual human, interactive agent, unattended agent, and CI patterns under
examples/harness-adoption/ - a guide-aligned
broker-harness-adoptionskill lives under.agents/skills/broker-harness-adoption/ - the repo is ready for continued implementation on top of the active specs
Before running any local build, install, or app test command from this repo:
- macOS with Xcode and iOS Simulator support installed
xcodegenavailable onPATH- Node.js LTS available on
PATH
The repo-owned macOS entrypoints now fail fast with actionable errors when xcodegen or xcodebuild is missing or misconfigured.
- expand happy-path operator-control evidence beyond the current destructive and override-required remediation flows
- preserve deterministic broker behavior across repos
- preserve repo-owned policy instead of moving policy authority into the app
Use this path when you already have repo access on the machine and want the quickest contributor setup.
- Run
npm run install:local. - Run
source "$HOME/Library/Application Support/SimulatorBroker/install/env.sh". - Verify the shell resolves the installed CLI with
command -v simbroker. - Launch
Simulator Broker.app. - If the app shows
Set Up This Mac, clickComplete first-time setup. - When the dashboard shows the broker is ready, onboard each repo with
simbroker project init --repo-root /path/to/repoandsimbroker project validate --repo-root /path/to/repo. - For agent-first repos, apply the
broker-harness-adoptionskill or follow spec/harness-integration.md.
Canonical contributor flow:
npm run install:local
source "$HOME/Library/Application Support/SimulatorBroker/install/env.sh"
command -v simbroker
open "$HOME/Applications/Simulator Broker.app"
mkdir -p /tmp/sample-broker-repo && cd /tmp/sample-broker-repo
simbroker project init
simbroker project validate
simbroker capacity check --purpose agent-ui-session --json
simbroker lease explain --purpose agent-ui-sessionThe app is the preferred first-run host setup surface. Use simbroker host init --bootstrap-config as the CLI fallback if you are not using the app UI.
Use this sequence when replacing an existing local install. Do not take the broker offline while it has an active lease.
- Check that there are no active leases with
simbroker host status --json. - Stop the running service with
simbroker service stop. - Quit
Simulator Broker.appbefore replacing its bundle. - Run
npm run install:local, then reload the installed environment helper. - Start the replacement service with
simbroker service startand relaunchSimulator Broker.app.
The installer preserves the host config and broker state. It can stop and restart a service when the existing wrapper is intact, but stopping the service and quitting the app first avoids leaving an old daemon or app process attached to a replaced runtime.
If a repository has been moved or deleted, remove only its local broker registration with an explicit project ID:
simbroker project forget --project-id <project-id> --jsonThe command is idempotent, updates the broker-owned app snapshot, and preserves the repository itself and historical audit events. It refuses to remove a project that still has an active lease or pin; release or clear those first instead of editing known-projects.json by hand.
Troubleshooting a broken local install:
- if
command -v simbrokerresolves to a repo checkout such as.../Projects/simulator-broker/client/bin/simbroker.mjs, the machine is still using a dev wrapper rather than the installed runtime - if
"$HOME/Library/Application Support/SimulatorBroker/install/env.sh"is missing after a prior setup attempt, treat the machine as partially installed - if
simbrokeris still available, runsimbroker service stopand quitSimulator Broker.appbefore manually removing the install paths - remove
"$HOME/.local/bin/simbroker","$HOME/Applications/Simulator Broker.app", and"$HOME/Library/Application Support/SimulatorBroker/install", then rerunnpm run install:local, reloadenv.sh, and runsimbroker service start - preserve
"$HOME/Library/Application Support/SimulatorBroker/state"unless you intentionally want to reset the live broker host state
Use this only for local development convenience when you want a zipped Debug bundle. It is not the primary quick-start path for repo contributors and it is not Gatekeeper-ready.
npm run package:local
npm run test:package-smokeUse this path for operator validation or shipping work. It is separate from the contributor install flow and requires operator-supplied signing inputs.
SIMBROKER_DISTRIBUTION_TEAM_ID=<team-id> \
SIMBROKER_DISTRIBUTION_SIGNING_IDENTITY='Developer ID Application: Example (TEAMID)' \
npm run package:distributionnpm test
npm run test:install-smoke
npm run test:app
npm run test:client
node client/bin/simbroker.mjs service start --host-config "$HOME/Library/Application Support/SimulatorBroker/host-config.json"
node client/bin/simbroker.mjs service status
node client/bin/simbroker.mjs app snapshot
node client/bin/simbroker.mjs capacity check --repo-root "$PWD" --purpose agent-ui-session --json
node client/bin/simbroker.mjs capacity reconcile --repo-root "$PWD" --purpose agent-ui-session --json
node client/bin/simbroker.mjs capacity reconcile --repo-root "$PWD" --purpose agent-ui-session --apply --confirm <plan-id> --actor-type human --actor-id <operator-id> --json
node client/bin/simbroker.mjs pin create --repo-root "$PWD" --purpose manual-testing --alias manual-1
node client/bin/simbroker.mjs lease release --lease-file /tmp/simbroker-lease.json
node client/bin/simbroker.mjs simulators boot --alias ui-1
node client/bin/simbroker.mjs simulators repair --alias ui-1 --actor-type human --force-override --override-reason "recover unhealthy alias" --expected-alias ui-1 --expected-lease-id <lease-id>
npm run agent:catalog -- --format md
npm run agent:context -- --paths spec/README.md --session-dir "$HOME/.codex/agent-harness/simulator-broker-app/bootstrap"
npm run agent:verify -- --profile spec-only --paths spec/README.md --session-dir "$HOME/.codex/agent-harness/simulator-broker-app/bootstrap"Please report security issues privately through GitHub Security Advisories when available. See SECURITY.md for supported reporting paths and the data that should not be posted publicly.
Contributor setup, verification, and PR expectations are documented in CONTRIBUTING.md.