Skip to content

AMPR-170 #499: wire AMPR-169 bridge into CLI, add --headless flag#520

Merged
wow-miley merged 1 commit into
mainfrom
miley/ampr-170-ampere-cli-with-lumos-terminal-layout-frame-loop-agent
May 31, 2026
Merged

AMPR-170 #499: wire AMPR-169 bridge into CLI, add --headless flag#520
wow-miley merged 1 commit into
mainfrom
miley/ampr-170-ampere-cli-with-lumos-terminal-layout-frame-loop-agent

Conversation

@wow-miley
Copy link
Copy Markdown
Contributor

Summary

Authored by Claude (Opus 4.7) on Miley's direction. Implements AMPR-170 against the current ampere-cli architecture — the Lumos TUI is already the default, so the original ticket's opt-in --with-lumos flag is replaced by an inverse --headless flag with auto-fallback when stdout is not a TTY or the terminal is smaller than 40×15. 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 bridge's public types. Note: the bridge queues glyphs through 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

Test plan

  • ./gradlew :ampere-cli:jvmTest :ampere-phosphor:jvmTest (passes)
  • ./gradlew ktlintFormat (clean)
  • Manual: ./ampere-cli/ampere --goal "..." and observe the waveform pane responds to PROPEL phase transitions
  • Manual: ./ampere-cli/ampere --goal "..." --headless and confirm plain-text event stream
  • Manual: ./ampere-cli/ampere --goal "..." | tee log.txt and confirm auto-fallback to headless with stderr notice

🤖 Generated with Claude Code

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>
@github-actions
Copy link
Copy Markdown

Concept staleness check — clean. No tracked-source changes need a concept update.

@wow-miley wow-miley merged commit 583e9b6 into main May 31, 2026
3 checks passed
@wow-miley wow-miley deleted the miley/ampr-170-ampere-cli-with-lumos-terminal-layout-frame-loop-agent branch May 31, 2026 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ampere-cli --with-lumos: terminal layout, frame loop, agent output redirection

1 participant