Skip to content

rtz: capacity, Maintain and add-on workspaces; interactive UI menu, group tabs and loader; MCP bridge - #1

Merged
pvishwa3 merged 7 commits into
mainfrom
feat/eac-sync-capacity-maintain-addons
Oct 18, 2026
Merged

pvishwa3 merged 7 commits into
mainfrom
feat/eac-sync-capacity-maintain-addons

Conversation

@pvishwa3

Copy link
Copy Markdown
Contributor

Brings the CLI up to date with the eac features shipped since v0.1.2. This branch is stacked on feat/mcp-bridge and feat/tui-restyle-pod-describe, so this one PR carries all 7 commits.

New commands

  • rtz capacity: headroom per axis, node pools, nodes, pending pods, storage, network, batch and special resources (--section). Subcommands:
    • trend --days N: growth and days until each pool is full.
    • cost: node cost per pool and the levers that change it.
    • namespaces: requests, quota and pending pods per namespace.
    • fleet: every cluster, soonest-full first.
  • rtz maintain:
    • items: support deadlines across the org. --within N limits the window. --fail-on-days N is a CI gate: exit 4 when a deadline is N days away or less. Platform items are hidden unless --platform.
    • packages: running packages with their end-of-life status.
    • dependents and impact <ns>/<kind>/<name> --target V: the workloads that connect to a data service, and what an upgrade means for each.
  • rtz addons: nodepools (Karpenter), cluster-autoscaler, ingress (Traefik), mesh (Istio), gitops (Argo CD), vpc-cni, ebs-csi.
    • Without an argument: a list of objects with the worst finding.
    • With an object: its findings, each with the command that verifies it.
    • --fail-on <severity> gates CI on add-on findings.
  • rtz upgrade check now also shows the add-ons that must move with Kubernetes, how many patches the cluster is behind, and an Applications section: per namespace, what must change and what is only affected.
  • rtz mcp: a stdio bridge to the hosted Runtimez MCP endpoint.
  • -o json / -o yaml print the full server document, not just the table columns. Integers stay exact, so byte counts don't turn into 1.07e+09.
  • Data we could not read is never shown as healthy. Each of these prints a warning and never shows as 0 or an empty table:
    • an add-on that is not installed, not synced or has its rules off;
    • truncated rows;
    • nodes with no usage samples;
    • unpriced nodes;
    • quotas that were not collected.

Interactive UI (rtz)

  • New screens: :capacity, :pending, :storage, :maintain, :upgrade, :karpenter, :ca, :traefik, :istio, :argocd, :cni, :ebs. Enter on a row opens its findings with the verify commands.
  • Command menu: : lists every screen, grouped, and narrows as you type. ↑↓ selects, tab completes, enter opens. A typo gets a "did you mean".
  • Group tabs: keys 1–5 switch between Resources, Reliability, Observability, Capacity and Add-ons, returning to the screen last used in that group. tab / shift+tab move between the group's screens.
  • Loader: an animated spinner for every API call.
    • Opening a screen shows Loading <screen>…, with the elapsed time after 2s.
    • A refresh keeps the rows and shows refreshing in the corner; a describe shows describing ns/name.
    • A response for a screen already left is dropped. Before this, switching screens quickly could draw the old screen's rows under the new title.
  • Also included: the k9s-style restyle, pod describe, and narrow-window fixes (the top bar and hint line no longer run past the edge).

Testing

  • go vet and gofmt are clean, and go test -race ./... passes 279/279.
  • Mutation checks:
    • the row pane follows sort and filter;
    • enter opens the highlighted menu entry;
    • the group remembers the last screen used;
    • the stale-response guard;
    • old rows are cleared when switching screens.
  • The real binary was run in a pseudo-terminal against a deliberately slow fake API: the spinner animates, and Loading Karpenter NodePools… 3s was seen.
  • Not yet verified against a live backend. The response shapes were traced from the eac DTOs. Please run the new commands against a backend that has the capacity, Maintain and add-on endpoints before tagging v0.2.0.

After merge

Tag v0.2.0 to publish to Homebrew, Scoop and install.sh (see RELEASING.md). Note that GitHub Actions may be blocked by the spending limit.

🤖 Generated with Claude Code

https://claude.ai/code/session_0178ctkmt3CJYuTzySDeSgSe

pvishwa3 and others added 7 commits September 20, 2026 11:14
Forwards newline-delimited JSON-RPC from stdin to POST /eac/mcp with the CLI's
credential (bearer + the same JWT refresh path as Do), writes the answers to stdout,
acknowledges notifications silently (202), echoes the negotiated MCP-Protocol-Version
after initialize, injects the context/--cluster as the default `cluster` argument of
tools/call when the client passed none, and turns 401/403 into a JSON-RPC error that
names `rtz login`. No tool logic lives here — the catalog is the server's.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- Tab strip, titled rounded panels, semantic cell colour, type-aware column sort,
  and real s/i/w/0/[/] bindings so the hint bar only advertises keys that exist.
- describe covers Pods (k8s.ParsePodDetail + view.podDetail).
- Correlated events: type/reason/message/count/lastTimestamp/involvedObject live
  inside the spec JSON; decode them with k8s.ParseEvent instead of top-level keys
  (every describe rendered blank event rows before).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0178ctkmt3CJYuTzySDeSgSe
Brings the CLI up to the eac features merged since September.

- rtz capacity [--section pools|nodes|blocked|storage|network|batch|special],
  capacity trend|cost|namespaces|fleet. Section names match the MCP
  runtimez_capacity_summary tool.
- rtz maintain items (--within, --fail-on-days → exit 4, --platform),
  maintain packages, maintain dependents|impact <ns>/<kind>/<name>.
  readFailed exits 1: an incomplete list never reads as "nothing due".
- rtz addons nodepools|cluster-autoscaler|ingress|mesh|gitops|vpc-cni|ebs-csi
  [object] with --fail-on. A non-OK workspace status (not detected, never
  synced, rules off) is stated, and never passes a gate.
- upgrade check: add-ons that must move, patch currency, per-application impact.
- -o json|yaml on all of these (and upgrade check) print the full server
  document via api.GetPayload; integers stay exact in YAML.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0178ctkmt3CJYuTzySDeSgSe
New command-bar views over the same view-package tables as the flag commands:
:capacity (:cap), :pending, :storage (:pvc), :maintain (:eol), :upgrade,
:nodepools/:karpenter, :ca, :routes/:traefik, :mesh/:istio, :gitops/:argocd,
:vpccni/:cni, :ebscsi/:ebs. `:ing` stays the Kubernetes Ingress listing.

- enter/d on a row of these screens opens its detail — an add-on object's
  findings with fix and verify command, a pending pod's scheduler message, a
  Maintain item, an upgrade item's objects — from dataset.rowText, built from
  the list response (no extra request) and indexed through the filter/sort.
- A non-OK workspace status (not detected, never synced, rules off) is the
  on-screen notice and the empty state, never a bare empty table.
- :upgrade is no longer a planned-view stub; :shield takes its place.
- view.SortMaintainItems / SortBlocked / sortReasons: one order shared by the
  table and its row text; api.BlockedPod named.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0178ctkmt3CJYuTzySDeSgSe
An empty `:` prompt asked the operator to already know the vocabulary. The command bar
now opens a grouped menu of every screen with its aliases and a one-line description,
ranked as you type (exact, prefix, alias, description, then subsequence for typos);
↑↓ select, tab completes, enter opens the highlighted entry, and an argument (`ns <name>`)
runs as typed. An unknown command gets a "did you mean". The menu and the help screen
render from one catalog, and a test keeps it in step with the view registry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0178ctkmt3CJYuTzySDeSgSe
The top of every screen is now two tab lines: the catalog's groups (Resources,
Reliability, Observability, Capacity, Add-ons), numbered for the 1–5 keys, and the
current group's screens, walked with tab / shift+tab. A number returns to the screen
last used in that group; aliases and [ ] history light the right tabs. On a narrow
window the labels shorten and a long group drops leading tabs, never the active one;
the footer hints drop the least useful ones instead of running past the edge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0178ctkmt3CJYuTzySDeSgSe
…creen already left

Opening a screen (menu, 1–5, tab, [ ], :ns, 0, scope clear) now clears the old rows and
shows a spinner naming the screen, with the wait once it passes 2s. Auto-refresh and
ctrl+r keep the rows and show the spinner with "refreshing" in the corner; describe shows
"describing ns/name"; the ask pane's "working…" spins too. The spinner ticks only while
something is loading.

Each screen load carries a sequence number, and a response for an older one is dropped:
before, switching quickly could draw the previous screen's rows under the new title.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0178ctkmt3CJYuTzySDeSgSe
@pvishwa3
pvishwa3 merged commit ee8604e into main Oct 18, 2026
3 of 5 checks passed
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