feat(agents): Agent Templates edit/clone flow + dialog polish + security hoist - #2269
Closed
qh2244 wants to merge 2 commits into
Closed
feat(agents): Agent Templates edit/clone flow + dialog polish + security hoist#2269qh2244 wants to merge 2 commits into
qh2244 wants to merge 2 commits into
Conversation
The Agent Templates surface could inspect installed templates and edit
their model and skill mappings, but could not create one — a user who
needed a different capability set had to hand-edit ~/.kiro/agents/.
Backend: POST /api/agents/installed validates the complete template
(name charset doubling as the file stem, reserved/duplicate identity by
spec name across all specs, shape-validated tools/allowedTools/
mcpServers/resources/deniedCommands with an allowlist per MCP server
entry), maps catalog skill keys to skill:// resources through the
enumerated catalog (never by joining caller strings onto a path), and
writes ~/.kiro/agents/{name}.json atomically under the config lock. The
written stem equals the spec name, so discovery classifies it as
user-owned; framework and package ownership rules are untouched. Every
rejection names the offending field alongside the error-code contract.
Frontend: a Create template action on Agent Capabilities → Agent
Templates (plus an empty-state entry point) opens a structured
authoring dialog — identity, model, system prompt, skill catalog
toggles, tool chips with per-tool auto-approve, inline MCP server rows,
and advanced resources/guardrails. Nothing saves until Create; a server
rejection highlights the named field without discarding the draft. The
created template is selected in the inspector and appears in the Crew
template selector immediately.
…e, security hoist (kirodotdev#2255)
Contributor
Author
|
Closing: the branch was based on the unmerged #2023 and cannot cleanly rebase onto current main (AgentsPage.tsx was heavily refactored upstream). Will re-implement from scratch on fresh main. |
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
Addresses all 5 items from #2255 (fast-follow to #2023):
Backend
PUT /api/agents/installed/{name}- full-replace a user-owned templateFrontend
AgentTemplateCreator.tsxgainseditTarget+cloneModepropsAgentsPage.tsxadds Edit/Clone buttons (user-owned only)api/client.tsaddsagentUpdate(PUT)Testing
test_agent_template_create.py- 106 passedtest_security.py- 320 passedtest_redaction_mirror_parity.py- 6 passedAgentTemplateCreator.test.tsx- 19 passedtsc --noEmitclean,isort/flake8cleanScreenshots
Inspector with Edit/Clone buttons
Edit dialog (name disabled, pre-filled)
Clone dialog (name empty, rest pre-filled)
Create dialog with shield hint + suggestions
Closes #2255