feat: web terminal + Headlamp-style K8s browser#1
Open
fropa wants to merge 1 commit into
Open
Conversation
Web terminal (browser PTY, self-hosted, no third party): - backend relay over Redis pub/sub (worker-safe), 2 WS endpoints, TerminalSession audit row, first-message API-key auth (key off URL) - agent: stdlib RFC6455 WS client + pty.fork, hooked into exec poll - frontend: xterm.js TerminalPanel, Terminal tab on nodes - security borrowed from DirectGate: tenant/node scoped, concurrency cap, idle + max-duration timeouts, audited; shell runs as restricted agent user K8s resource browser (Headlamp-style, read-only): - agent collects extended kinds (services/configmaps/statefulsets/ingresses/ pvcs/events/...), secret values stripped on host; tags push with agent_node - frontend Resources tab + YAML drawer (js-yaml), pod Shell + YAML actions - shell into pods via kubectl exec, reusing terminal infra (argv generalized, k8s names regex-validated against injection) Review fixes from earlier pass: - traces background task uses its own DB session (was reusing closed request session) - datetime.utcnow() -> datetime.now(timezone.utc) across routes - Claude model tiering: RCA->opus, chat/topology->haiku, balanced default Chore: add missing vite-env.d.ts, fix Dashboard generic-index type; tsc clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
Self-hosted browser terminal (PTY to nodes and pods) plus a Headlamp-style read-only K8s resource browser. Fully self-hosted — no third-party SaaS. Also folds in correctness/cost fixes from the earlier review pass.
Web terminal
TerminalSessionaudit row, first-message API-key auth (key kept off the URL).pty.fork, driven off the existing exec poll.TerminalPanel, Terminal tab on nodes.K8s browser (read-only)
kubectl exec, reusing the terminal infra. K8s names regex-validated against argv injection.Review fixes
datetime.utcnow()→datetime.now(timezone.utc)across routes.vite-env.d.ts; fixed a pre-existing Dashboard type error →tscclean.Status / caveats
py_compile, agentpy_compile, and frontendtsc --noEmitall pass.pty.fork, and large-cluster Redis payload size.🤖 Generated with Claude Code