Development
Conventions for contributors and coding agents are in AGENTS.md.
Requirements
- A Mac with Apple Silicon running macOS 12 or later (the only supported platform)
- Rust 1.85 or later (edition 2024)
git, andpython3for the provider adapter tests- For a live run: at least one agent CLI (Providers)
Build and run
cargo run --release # run the app
scripts/bundle-macos.sh # -> target/release/bundle/Elyra Workspace.app
The bundle is signed ad hoc unless CODESIGN_IDENTITY="Developer ID Application: …"
is set. With an identity it is signed with the hardened runtime and a secure
timestamp, as notarization requires. Bundle id: com.gets.elyra-workspace. The
script refuses to build on anything other than Apple Silicon.
Checks
cargo fmt --all
cargo clippy --workspace --all-targets # zero warnings
cargo test --workspace
For UI changes, also run the app with an isolated data directory and look at it.
Scenarios
cargo build -p elyra-app && scripts/scenarios/run.py [scenario …]
End-to-end tests of the real app: it runs headless (ELYRA_HEADLESS=1, no
window, Dock icon or update checks) in a throwaway ELYRA_HOME, and
scripts/scenarios/run.py drives it through the
agent gateway. The agent is agent.py, an ACP
agent whose behaviour a tag in the prompt picks: change a file, change nothing,
crash mid-turn, fail the turn, or wait to be stopped. The app's login shell
during the scenarios is scripts/scenarios/login-shell, which puts fake tools
from scripts/scenarios/bin (such as a gh answering from a JSON file) first on
its PATH. Scenarios cover the turn
lifecycle, checks after each turn and stopping. Add one when you change how
sessions, providers or the gateway behave. The [stream N] tag has the agent
write N lines slowly, which is handy for trying the thread view by hand while an
agent writes.
Performance
cargo test -p elyra-core --release --test large_store -- --ignored --nocapture
Times the store with a lot of history (200 threads, 20 of them with about 2,000 entries): opening it, loading a long thread, appending, search and statistics. A few rules keep the app fast while agents stream, which redraws the window many times a second:
- Don't read the database, the disk or start processes in
render; keep the value in a field, or load it in the background (Store::open_read_onlygives a second connection for slow reads off the main thread). - The thread view draws only the visible rows (
listwithListState); the heavy views are drawn from cache (cachedinworkspace/render.rs) and mustcx.notify()when what they show changes. - Streamed text is a
SessionEvent::Streamedfor the thread's own view, not a notify that wakes every observer of the session.
Layout check
cargo build -p elyra-app && scripts/layout-check/check.py [--review] [scene …]
scripts/layout-check/check.py takes
screenshots of the app in states that tend to break the layout: a dozen open
tabs in narrow and wide windows, long project and thread names, a conversation
with every kind of row, no sidebar or tools panel, the light theme, the Files
sheet, each panel and the first launch. Each scene runs in a throwaway
ELYRA_HOME with ELYRA_NO_ACTIVATE (it never takes focus) and is captured
from its first frame into target/layout-check/<time>/. With --review,
Claude Code (claude -p, if installed) reads the screenshots and writes
review.md against rubric.md: overlap,
clipping, overflow, alignment, contrast. The review is advice; look at the
screenshots before fixing. Run it after layout changes.
The scenes include Settings at the After each turn page
(ELYRA_OPEN_PANEL=settings:<page> opens Settings at a page, counted from 0).
Browser check
cargo build -p elyra-app && scripts/browser-check/check.py
The scenarios run headless, so they have no web pages.
scripts/browser-check/check.py starts
the app with a window (ELYRA_NO_ACTIVATE, so it never takes focus), serves
small pages from this Mac and checks what the thread's browser does with
them, with its Browser tab on screen and out of sight (as after a turn):
- journeys: the first replay saves a clean layout measured at 1280 px and 390 px, a page broken only on a phone fails at 390 px and one broken on a desktop at 1280 px, and the page gets its own width back;
- pictures of the page before and after a turn are taken, the same size, also when the project replays its journeys after the turn;
- agents read the page's console errors and failed requests.
BROWSER_CHECK_KEEP=1 keeps the app's home, with the pictures. Run it after
changes to journeys, the layout guard, page pictures or the web view.
GitHub Actions runs the same checks and the scenarios
(.github/workflows/ci.yml) on every push to
main and every pull request; clippy runs with -D warnings.
Environment variables
| Variable | Effect |
|---|---|
ELYRA_HOME=<dir> |
Use <dir> instead of ~/.elyra (isolated instances; never test against your real data) |
ELYRA_NO_ACTIVATE=1 |
Open the window in the background without taking focus |
ELYRA_HEADLESS=1 |
No window, Dock icon or update checks; for the scenarios, driven through the gateway |
ELYRA_OPEN_PANEL=tasks|automations|stats|review|race|search|walkthrough|away|files[:<path>]|settings[:<page>] |
Open that panel (or the large file editor, with a file; or Settings at a page, from 0) at launch (screenshots without input) |
ELYRA_BROWSER_URL=<url> |
Open <url> in the active thread's browser at launch |
ELYRA_UPDATE_RESTART_WHEN_READY=1 |
Restart into a staged update as soon as it is ready (end-to-end update tests) |
RUST_LOG=debug |
More logging |
elyra mcp-bridge <url> <token> runs the stdio bridge for external MCP clients
instead of the app.
Tools for checking providers
# A real turn through any adapter, printing the neutral events
cargo run -p elyra-provider --example smoke -- claude <dir> "<prompt>"
cargo run -p elyra-provider --example smoke -- codex <dir> "<prompt>"
# Any ACP agent (ACP_COMMAND overrides the executable and arguments)
ACP_COMMAND="npx -y @agentclientprotocol/claude-agent-acp" \
cargo run -p elyra-provider --example smoke -- acp <dir> "<prompt>"
# Sessions that can be imported
cargo run -p elyra-provider --example claude_history
cargo run -p elyra-provider --example codex_history [path/to/codex]
# GitHub integration (read-only)
cargo run -p elyra-git --example gh_smoke
The ACP and Codex adapters are tested against small stand-in agents in
crates/elyra-provider/tests/ (mock_acp_agent.py, mock_codex_app_server.py).
Extend these when an adapter handles new messages.
Architecture
crates/
├── elyra-core domain model, SQLite store and migrations, orchestration records
│ (automations, tasks, MCP clients, audit log), schedules, data paths
├── elyra-agent-types provider kinds, permission modes, questions and approvals,
│ shared by elyra-core and elyra-provider (re-exported by elyra-core)
├── elyra-provider AgentSession trait and provider-neutral events; adapters for
│ Claude Code, Codex (app-server), Elyra/Pi (RPC) and ACP agents;
│ optional launcher, clean environment and extra arguments per
│ session; Claude Code and Codex history import (feature `history`,
│ on by default, the only part that needs elyra-core).
│ Also used by Huskarl, so it must not depend on elyra-core or GPUI
├── elyra-git git and gh CLI wrappers: status, diffs, staging, branches, sync,
│ worktrees, checkpoints, pull requests, review inbox
├── elyra-terminal PTY and VT emulation (alacritty_terminal): snapshots, keys, mouse,
│ selection, scrollback search
├── elyra-mcp minimal MCP server (JSON-RPC over local HTTP) and stdio bridge
├── elyra-index tree-sitter symbol index (definitions, references) in a SQLite
│ cache, from Elyra Desktop; behind the gateway's `symbols` tool
└── elyra-app the GPUI application (binary `elyra`)
Main modules of elyra-app:
| Module | Responsibility |
|---|---|
app_state |
Store, project and thread lists, live sessions, fork, handoff, import |
thread_session |
One thread's agent process, transcript and queue; what happens around a turn is in its submodules: checks (and the automatic fixes), journeys, lines (the line record, intent guard and board), kept_tests, mutation_gate, cross_examination, stuck (the thrash guard), proposals and goals (and the budget) |
workspace |
Window layout, tabs, panels, actions |
thread_view, transcript, composer |
The conversation and the message box |
sidebar, dialogs, palette, shortcuts |
Navigation and dialogs |
changes_view, pr_view, review_inbox |
Git, pull requests, code review |
files_view, search, editors |
Files tab, search, external editors |
terminal_view |
Terminal rendering, input and panel |
context_view |
Notes, pinned messages, recap, instructions, servers, goal |
gateway |
Agent gateway tools on top of elyra-mcp |
automations, tasks, stats, export |
Automations, task board, statistics, ZIP export |
preferences, themes, settings_window |
Settings |
updates, updater |
Self-update: download, verify, stage, install |
lifecycle, onboarding, about, app_icon |
Crash log, single instance, first run, About, Dock |
Schema changes are new entries at the end of MIGRATIONS in
elyra-core/src/store.rs. Never edit a released migration: a test compares each one
with its fingerprint in RELEASED, and a new migration adds its own (the test
prints it). Another test upgrades a database from every earlier version.
Releasing
Releases are built by GitHub Actions (.github/workflows/release.yml)
when a version tag is pushed:
- Bump
versioninCargo.tomland add a## <version>section to CHANGELOG.md. Commit and push. - Tag and push:
git tag -a v0.1.4 -m "Elyra Workspace 0.1.4" && git push origin v0.1.4
The workflow:
- checks that the tag matches
Cargo.tomland that the changelog has the section - runs the tests on an Apple Silicon runner
- builds the app, signs it with the Developer ID, and notarizes and staples the app and the DMG
- publishes the GitHub release with the DMG, its SHA-256 and the changelog section as notes
Installed copies from 0.1.2 on update themselves. Run workflow builds and notarizes without publishing; the DMG is attached to the run.
The in-app updater looks for exactly these release assets:
Elyra-Workspace-<version>-arm64.dmg and Elyra-Workspace-<version>-arm64.dmg.sha256.
Keep the names.
Secrets
| Secret | Value |
|---|---|
MACOS_CERTIFICATE_P12 |
The Developer ID Application certificate with its private key, exported from Keychain Access (My Certificates) as .p12, base64-encoded |
MACOS_CERTIFICATE_PASSWORD |
The password chosen when exporting the .p12 |
NOTARY_APPLE_ID |
The Apple ID used for notarization |
NOTARY_PASSWORD |
An app-specific password for that Apple ID |
base64 -i ~/Desktop/DeveloperID.p12 | gh secret set MACOS_CERTIFICATE_P12 --repo kwhorne/elyra-workspace
gh secret set MACOS_CERTIFICATE_PASSWORD --repo kwhorne/elyra-workspace
gh secret set NOTARY_APPLE_ID --repo kwhorne/elyra-workspace
gh secret set NOTARY_PASSWORD --repo kwhorne/elyra-workspace
Check with gh secret list --repo kwhorne/elyra-workspace, and delete the exported
.p12 afterwards.
Releasing from a Mac
xcrun notarytool store-credentials "Knut Horne" --apple-id <apple id> --team-id 52AT44QFCM # once
scripts/release-macos.sh # -> target/release/dist/Elyra-Workspace-<version>-arm64.dmg
This signs and notarizes with Knut Horne's team (52AT44QFCM). To use GETS AS instead, as the release workflow does:
CODESIGN_IDENTITY="Developer ID Application: GETS AS (7G383N3VY7)" \
NOTARY_PROFILE=elyra-workspace scripts/release-macos.sh
Official copies accept updates signed by either team (RELEASE_TEAMS in
crates/elyra-app/src/updates.rs). Then publish the DMG and its .sha256 with
gh release create v<version> … --verify-tag and the notes the workflow would
write.
SKIP_NOTARIZE=1 signs without notarizing. In CI the script takes
NOTARY_APPLE_ID, NOTARY_PASSWORD and NOTARY_TEAM_ID instead of a keychain
profile.
App icon
The icon is Elyra Conductor's Lyra constellation recolored to Elyra yellow
(#fbd22d). Regenerate assets/icon/ from the Conductor icon with
python3 scripts/recolor-icon.py [path/to/icon.icns] (needs Pillow).