Repository navigation
feat(ui): Guardrails tab on Agent Detail (#967) - #992
Merged
Merged
Conversation
Adds owner-only Guardrails tab wiring the existing GUARD-001 endpoint
(GET/PUT /api/agents/{name}/guardrails) into AgentDetail.vue. Owners can
set max_turns_chat / max_turns_task (1-500) from the UI instead of curl.
- stores/agents.js: getGuardrails / setGuardrails actions
- components/GuardrailsPanel.vue: owner-only form, blank = inherit
platform default (placeholder 50), restart-required toast matching the
Read-Only / Resource-limit pattern, light + dark themes. Preserves
out-of-scope override keys (execution_timeout_sec, *_deny lists) so the
whole-config PUT doesn't wipe API-set values.
- AgentDetail.vue: import, owner-gated tab + content block, p-6 wrapper
(panel-width stability set, #954)
Related to #967
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Resolve by running |
vybe
approved these changes
Jun 2, 2026
vybe
left a comment
Contributor
There was a problem hiding this comment.
Validated: backend contract parity (keys + 1-500 range match _GUARDRAILS_NUMBER_BOUNDS), owner-gating correct, symbols resolve, security clean. APPROVE.
vybe
pushed a commit
that referenced
this pull request
Jun 2, 2026
Document the end-to-end guardrails safety layer: backend router/service/DB, owner-only Guardrails tab in Agent Detail (GuardrailsPanel.vue, #967/#992), AGENT_GUARDRAILS env injection on create/restart, root-owned runtime config merge at boot, and Claude Code PreToolUse/PostToolUse hook enforcement plus --max-turns/--disallowedTools CLI budgets. Register in feature-flows index (Recent Updates + Configuration & Settings). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
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
Adds the missing UI for GUARD-001 per-agent guardrails (#967). The backend endpoint (
GET/PUT /api/agents/{name}/guardrails) shipped without a frontend, so owners could only setmax_turns_chat/max_turns_taskvia curl,/docs, or MCP. This adds an owner-only Guardrails tab toAgentDetail.vue.Changes
stores/agents.js—getGuardrails(name)/setGuardrails(name, guardrails)actions (mirror the resource-limits pattern).components/GuardrailsPanel.vue(new) — owner-only form:max_turns_chat,max_turns_tasknumber inputs, range 1–50050 (default))"Guardrails saved — restart agent to apply", matching the Read-Only / Resource-limit restart patternp-6root wrapper (participates in the Agent Detail: Chat tab content width jumps when switching to/from any other tab #954 panel-width stability set)execution_timeout_sec,*_denylists) so the whole-config PUT doesn't wipe values set via APIviews/AgentDetail.vue— import, owner-gated tab (can_share && !is_system) + content block.Acceptance criteria
GET/PUT /api/agents/{name}/guardrailsmax_turns_chat/max_turns_task(1–500), defaults shown as placeholder when unsetp-6wrapper)Out of scope (per issue)
Verification
vite buildtransforms all modules without error.Related to #967
🤖 Generated with Claude Code