AMPR-170 #499: wire AMPR-169 bridge into CLI, add --headless flag#520
Merged
wow-miley merged 1 commit intoMay 31, 2026
Conversation
Authored by Claude (Opus 4.7) on Miley's direction. Implements AMPR-170 against the current ampere-cli architecture, where the Lumos TUI is already the default experience — so the opt-in `--with-lumos` flag from the original ticket is replaced by an inverse `--headless` flag with auto-fallback when stdout is not a TTY or the terminal is smaller than 40x15. Wires the AMPR-169 :ampere-phosphor bridge into the running CognitiveSceneRuntime via a new LumosBridgeController: lazy-starts once the scene exists, drives onFrameTick from the render loop, stops idempotently in finally. Bumps :ampere-cli to phosphor-core 0.5.0 to match :ampere-phosphor, and promotes :ampere-phosphor's phosphor deps to api so consumers see the types in the bridge's public constructor. A new runHeadless() path in AmpereCommand subscribes to the bus, prints every event as one text line, and stays resident until interrupted — except for true one-shots (`--issue N`, `--use-arc-phases`) which exit after the work returns. TuiAvailability is extracted as a pure function so each fallback branch (user-requested, non-TTY, too-small) is unit-testable. Test coverage: TuiAvailabilityTest (7 branches), LumosBridgeControllerTest (lazy-start, PROPEL phase event → atmosphere routing, idempotent stop), and a --headless flag-presence test. All :ampere-cli:jvmTest and :ampere-phosphor:jvmTest pass; ktlintFormat clean. Note: the bridge queues glyphs via VoxelFrameBuilder, but the existing waveform pane does not yet render VoxelFrame.glyph overlays. Atmosphere transitions are fully wired; glyph visuals are a documented follow-up. Closes #499 Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Concept staleness check — clean. No tracked-source changes need a concept update. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Authored by Claude (Opus 4.7) on Miley's direction. Implements AMPR-170 against the current
ampere-cliarchitecture — the Lumos TUI is already the default, so the original ticket's opt-in--with-lumosflag is replaced by an inverse--headlessflag with auto-fallback when stdout is not a TTY or the terminal is smaller than 40×15. Wires the AMPR-169:ampere-phosphorbridge into the runningCognitiveSceneRuntimevia a newLumosBridgeController(lazy-starts once the scene exists, drivesonFrameTickfrom the render loop, stops idempotently infinally), bumps:ampere-clitophosphor-core:0.5.0to match:ampere-phosphor, and promotes:ampere-phosphor's phosphor deps toapiso consumers see the bridge's public types. Note: the bridge queues glyphs throughVoxelFrameBuilder, but the existing waveform pane does not yet renderVoxelFrame.glyphoverlays — atmosphere transitions are fully wired; glyph visuals are a documented follow-up.Closes #499
Test plan
./gradlew :ampere-cli:jvmTest :ampere-phosphor:jvmTest(passes)./gradlew ktlintFormat(clean)./ampere-cli/ampere --goal "..."and observe the waveform pane responds to PROPEL phase transitions./ampere-cli/ampere --goal "..." --headlessand confirm plain-text event stream./ampere-cli/ampere --goal "..." | tee log.txtand confirm auto-fallback to headless with stderr notice🤖 Generated with Claude Code