Repository navigation
feat(a4h): add breq a4h commands and a live session screen - #48
Merged
Merged
Conversation
breq a4h status | start [--wait] | extend | terminate [-y] | watch, over the new A4H session RPCs in trm-bff (GetA4HSession, StartA4HSession, ExtendA4HSession, TerminateA4HSession). Table, json and quiet output like the other commands, stdout stays data-only. start --wait follows startup until SAP is ready and fails if the session ends instead or after --timeout. terminate asks first, refuses without --yes when stdin is not a terminal, and treats end of input as no answer. watch is a Bubble Tea screen with the four startup steps, host / SAP GUI / ADT details, time remaining and keys to start, extend and end (end is confirmed), polling every 5s while in flight and 30s when ready, continuing after a failed poll. Proto: bff.proto synced with trm-bff and regenerated. Its go_package still named the old module (github.com/bluefunda/trm-cli/...), so make proto failed on main with "generated file does not match prefix"; fixed. Regenerating the unchanged proto reproduces the committed code byte for byte. Also: the "run 'trm login'" hints now say 'breq login'; README and AGENTS.md document the commands and that the CLI's x-user-id is not an identity the server may trust. Fixes #47 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F7rygZSCZuuTLw9LriyiHN
devops-bda
approved these changes
Oct 27, 2026
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
breq a4h status | start [--wait] | extend | terminate [-y] | watchto manage your own on-demand SAP ABAP trial (A4H) system from the terminal, over the new gRPC methods in trm-bff (bluefunda/trm-bff#51). Fixes #47.bffConn(),Printer, table /json/quiet, stdout data-only). Session RPCs sign in again once if the token was rejected.start --waitfollows startup on stderr (reports each state change once) until SAP is ready; fails if the session ends instead, or after--timeout(15 m).terminatedeletes the system, so it asks first, refuses without--yeswhen stdin isn't a terminal, and treats end-of-input as "no answer" (not consent).watchis a standalone Bubble Tea screen using the existing theme: the four startup steps, host / SAP GUI / ADT details, time remaining, keyssstart ·eextend ·xend (confirmed) ·rrefresh ·q. Polls every 5 s while in flight and 30 s when ready; a failed poll doesn't stop polling and keypresses can't stack timers. It is separate from the change-request dashboard; folding it into the dashboard is a possible follow-up.internal/a4h(states, steps, poll cadence, formatting) is used by both.Proto
bff.protois synced with trm-bff's (they differ only ingo_packageand one comment) and regenerated.make protowas already broken onmain:go_packagestill named the old modulegithub.com/bluefunda/trm-cli/...whilescripts/generate-proto.shexpectsgithub.com/bluefunda/bluerequests, so protoc failed with "generated file does not match prefix". Fixed. With only that fix, regenerating reproduced the committed code byte for byte, so the generated diff is just the new messages and methods (protoc 3.21.12, protoc-gen-go v1.36.11, protoc-gen-go-grpc 1.6.2, the versions in the existing headers).Also
run 'trm login'hints (7 places) now saybreq login; my commands print them when logged out.x-user-idis not an identity the server may trust (trm-bff's gRPC sits behind plain nginx, so its A4H methods verify the token with Keycloak; see trm-bff#51).Tests
make vetandmake testpass (first tests in this repo):internal/a4h(states, steps, poll cadence, remaining time, connection details),internal/cmd(rows, all three output formats, error text, confirmation, waiting: follows startup / session ends / timeout / poll error),internal/tui(each screen state, only valid actions per state, confirmation gate, stale-poll and failed-poll handling, auth-expired message). The JSON-format test parses the output becauseprotojsonrandomizes whitespace on purpose. Smoke-tested the built binary: help, completion,terminaterefusing without--yeson non-terminal stdin, logged-out hint.Not done: not run against a live trm-bff (the gRPC methods aren't deployed yet; this depends on bluefunda/trm-bff#51 being merged and released), and the TUI screen hasn't been looked at in a real terminal. Please try
breq a4h watchonce trm-bff is deployed.Type
Customer Impact
People who live in the terminal can start, watch, extend and end their own temporary SAP ABAP trial system with
breq a4h, including a live status screen.Metrics
terminateends it immediately.Marketing Notes
On-demand SAP ABAP trial (A4H) sessions from the BlueRequests CLI.
🤖 Generated with Claude Code
https://claude.ai/code/session_01F7rygZSCZuuTLw9LriyiHN