-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Summary
Add first-class filtering for Agents control-plane resources (label selector + AgentRun phase/runtime) across the API, agentctl, and UI so operators can quickly slice large fleets without client-side polling or manual kubectl.
Codex Metadata (Optional)
version: 1
iterations:
mode: fixed
count: 1
min: 1
max: 5
stop_on:
- success
- needs_human
reason: "single-pass feature implementation"
Context
services/jangar/src/routes/api/agents/control-plane/resources.tsalready supportsphase/runtimefilters for AgentRun, but no label selectors.agentctllist commands do not expose label selector filtering.- Agents control-plane UI lists are static and require full scans for filtering.
Desired Outcome
- API:
/api/agents/control-plane/resourcesacceptslabelSelector(and preservesphase/runtimefor AgentRun), applying the selector server-side. - agentctl: every
listcommand accepts--selector(alias-l) and passes through to gRPC list endpoints. - UI: Agents control-plane list pages expose a filter bar with namespace + label selector + phase/runtime (AgentRun only) and use server-side filtering.
Scope
- In scope:
services/jangar/src/routes/api/agents/control-plane/resources.tsservices/jangar/src/server/agentctl-grpc.tsservices/jangar/agentctl/src/index.tsservices/jangar/src/data/agents-control-plane.tsservices/jangar/src/components/agents-control-plane-primitives.tsx- Route pages under
services/jangar/src/routes/agents-control-plane/**for list views - Docs:
docs/agents/agentctl.md(document selector flag)
- Out of scope:
- Any infra/Argo changes
- Controller runtime logic
- CRD schema changes
Constraints & Risks
- No polling loops in UI; rely on existing fetch + SSE updates.
- Preserve current output formats and defaults (namespace defaults to
agents).
Rollout / Ops Notes
- No rollout sequencing; standard Jangar image deploy.
Validation
-
bun run --filter @proompteng/jangar lint -
bun run --filter @proompteng/agentctl lint
Codex Prompt
Implement server-side filtering for the Agents control-plane list endpoints and propagate selectors through agentctl + UI.
Requirements (must all be met):
- API: add
labelSelectorquery param to/api/agents/control-plane/resourcesand apply it when listing from Kubernetes; preservephase/runtimefilters for AgentRun. Update any relevant types. - gRPC: extend list requests to accept
label_selectorand pass it to the underlying list calls; update agentctl to pass--selector/-lthrough for all list commands. - UI: add a filter bar on list views (namespace + label selector, plus phase/runtime for AgentRuns) and wire it into the data fetcher; ensure it reuses existing SSE stream updates instead of polling.
- Docs: update
docs/agents/agentctl.mdto mention--selector/-lfor list commands. - Keep all changes inside the repo; do not touch infra or CRDs.
Files to touch (expected):
services/jangar/src/routes/api/agents/control-plane/resources.tsservices/jangar/src/server/agentctl-grpc.tsservices/jangar/agentctl/src/index.tsservices/jangar/src/data/agents-control-plane.tsservices/jangar/src/components/agents-control-plane-primitives.tsxservices/jangar/src/routes/agents-control-plane/**/index.tsxdocs/agents/agentctl.md
Output:
- Commit changes and open a PR against
mainwith a Conventional Commit title. - Include a short PR summary and testing notes.
Do not stop until all requirements are satisfied.
Additional Context
None
gregkonush