Skip to content

feat(cli): restore RuntimeAdapter interactive TUI - #129

Open
hunter-xue wants to merge 1 commit into
kingsoftcloud:mainfrom
hunter-xue:feat/runtime-adapter-tui
Open

hunter-xue wants to merge 1 commit into
kingsoftcloud:mainfrom
hunter-xue:feat/runtime-adapter-tui

Conversation

@hunter-xue

Copy link
Copy Markdown
Contributor

Summary

  • Restore agentengine run -i / ksadk run -i using the canonical RuntimeExecutor / RuntimeAdapter path instead of the previous placeholder error.
  • Share the local Runtime composition between the interactive and non-interactive CLI entrypoints; no loopback HTTP server or adapter._runner access is used.
  • Add a canonical TUI runner with semantic-event normalization, multi-turn sessions, real Runtime cancellation, cascading generator cleanup, and --no-stream rendering.
  • Preserve the non-interactive Web path and the legacy RemoteRunner TUI entrypoint.

Scope and limitations

This PR intentionally delivers the basic interactive TUI vertical slice, not the complete interaction-control design.

  • live_submit, durable_resume, and structured input are not implemented yet.
  • When an unsupported interaction requires a reply, the TUI reports the limitation and requests real Runtime cancellation rather than issuing a fake legacy resume=True request.
  • A real fixed-response LangGraph StateGraph was exercised through the full CLI. LangChain, DeepAgents, Google ADK, and Codex share the new canonical path but were not individually E2E-tested in this PR.
  • No version, packaging, release, or public UI changes are included.

Validation

Passed:

  • Focused Runtime/TUI/CLI/AG-UI regression suite after rebasing onto upstream/main (36eab144): 112 passed.
  • Ruff on changed/new modules and tests.
  • compileall, git diff --check, and targeted secret scanning.
  • make public-audit (5,168 paths checked, zero violations).
  • Real pseudo-terminal smoke: agentengine run -i --no-trace displayed the fixed LangGraph reply and exited normally with status 0.
  • Two consecutive turns in one in-memory Session both produced the expected text and final chunks.

Full CLI directory result:

  • 92 passed, 1 failed.
  • The failure is tests/cli/test_web_tracing.py::test_web_tracing_startup[dual-write], which misses the respond span. The same failure reproduces on an unmodified upstream/main (36eab144) worktree with the same environment, so it is documented here as a pre-existing baseline failure rather than a regression caused by this PR.

A complete make public-preflight was not run for this PR; no release or publish action was performed.

Follow-up work

  • Implement live interaction submission without closing the active event stream.
  • Implement framework-correct durable resume for LangGraph checkpoints and ADK invocations.
  • Add structured input and real E2E coverage for the remaining supported frameworks.

This branch has not been deployed

No deployments
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