Skip to content

Add Velaria Agent TUI#58

Merged
ashione merged 2 commits into
mainfrom
auto/velaria-agent-tui
Jun 21, 2026
Merged

Add Velaria Agent TUI#58
ashione merged 2 commits into
mainfrom
auto/velaria-agent-tui

Conversation

@ashione

@ashione ashione commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add Velaria-owned Agent CLI/TUI entry points with Textual, including default no-args Agent mode, -i compatibility, headless --print/--stream-json, and --model overrides.
  • Add a responsive TUI shell with streaming Markdown rendering, running/queued state, history scrolling, keyboard shortcuts, and model switching for Codex/Claude runtimes.
  • Remove the old prompt-toolkit REPL path and update docs, skills, dependencies, and tests around the new Agent-first CLI flow.
  • Preserve existing finance CLI registration from main while rebasing the PR to TUI-only scope.

Scope

  • This PR now contains a single commit: cfefb13 Add Velaria Agent TUI.
  • The previous Float32 / SIMD / C++ core commit has been removed from this PR branch and preserved locally as auto/velaria-agent-tui-with-float32.

Validation

  • uv run --project python python -m unittest python.tests.test_agent_cli python.tests.test_python_cli_contract python.tests.test_ai_runtime_agent
  • bazel test //python:agent_cli_test //python:python_cli_contract_test //python:ai_runtime_agent_test
  • uv run --project python python python/velaria_cli.py --help
  • uv run --project python python python/velaria_cli.py agent --help
  • uv run --project python python python/velaria_cli.py (non-TTY structured error path)
  • git diff --check origin/main...HEAD
  • legacy REPL/prompt-toolkit residual scan
  • changed-file secret pattern scan (only placeholders, test keys, variable names, and lockfile package names)

Note

  • python.tests.test_claude_runtime was not included in the final validation because it currently fails on this checkout with a pre-existing fake claude_agent_sdk module lacking __file__; this is outside the TUI-only diff.

@ashione ashione changed the title Add Velaria Agent TUI Add Agent TUI and Float32 engine updates Jun 13, 2026
@ashione ashione force-pushed the auto/velaria-agent-tui branch from 678e96a to cfefb13 Compare June 14, 2026 14:42
@ashione ashione changed the title Add Agent TUI and Float32 engine updates Add Velaria Agent TUI Jun 14, 2026
@ashione ashione force-pushed the auto/velaria-agent-tui branch from c657112 to b247f1b Compare June 15, 2026 01:55
@ashione ashione marked this pull request as ready for review June 21, 2026 14:51
@ashione ashione merged commit 1a53db8 into main Jun 21, 2026
4 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b247f1b12f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +154 to +157
async for event in controller.send_turn(args.print_prompt or ""):
if event.type == "assistant_text" and event.content:
chunks.append(event.content)
return "".join(chunks)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Propagate failed agent turns from --print

When the Codex or Claude adapter reports a runtime/auth/tool failure, it yields an error or turn.failed event instead of raising; this loop only collects assistant_text, then run_agent_print always prints the accumulated text and returns 0. In scripted velaria_cli.py agent --print ... usage, a failed turn can therefore appear as a successful empty or partial answer, so callers cannot detect or retry the failure.

Useful? React with 👍 / 👎.

pass


class ModelSelectScreen(ModalScreen[str | None]):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Make the missing-Textual fallback importable

If a user has not run the updated Python dependency sync yet, importing Textual raises ModuleNotFoundError, the fallback assigns ModalScreen = _MissingWidget, and this class definition immediately evaluates ModalScreen[str | None]. _MissingWidget is not subscriptable, so tui_app raises TypeError during import before run_tui can show its intended “requires Textual” message, causing the new default CLI entry to crash in exactly the unsynced environment this fallback is meant to handle.

Useful? React with 👍 / 👎.

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.

1 participant