feat(agent-config): HTTP routes for agent-config surface (SC-7) #642
No reviewers
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks!642
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "dev/629"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implement
/agent-config/*route surface for the five artifact kinds (skills, system-prompts, plugins, marketplaces, mcp).Test plan
just qaclean (typecheck + Biome lint + format)Closes #629
behavior
resolveEffectiveBodyignoresfromScopefor skills (agent-config-routes.ts ~L1455-1459).The code comment acknowledges it:
"apply a scope-ceiling: only consider rows at or below fromScope"— but the ceiling is never applied.resolveSkill(name, agent, db)picks the highest-priority override for the agent regardless of scope. SoPOST /agent-config/skills/X/forkwithfrom_scope: "builtin"copies the global (or agent_type) override when one exists, not the builtin body.All other kinds (plugins, marketplaces, mcp) correctly use
fetchRow(..., scope, ...). Fix: for skills, filter candidate rows to those whosescopeisfromScopebefore resolving, or just callfetchRowdirectly whenfromScopeis an exact scope rather than going through the layered resolver.The integration test only seeds a builtin row with no overrides, so the bug doesn't manifest there.
behavior
resolveEffectiveBodyignoresfromScopefor skills (agent-config-routes.ts ~L1455-1459).The code comment acknowledges it: "apply a scope-ceiling: only consider rows at or below fromScope" but the ceiling is never applied.
resolveSkill(name, agent, db)picks the highest-priority override for the agent regardless of scope. SoPOST /agent-config/skills/X/forkwithfrom_scope: "builtin"copies the global (or agent_type) override when one exists, not the builtin body.All other kinds (plugins, marketplaces, mcp) correctly use
fetchRow(..., scope, ...). Fix: callfetchRowdirectly for an exact-scope fork, or filter resolver candidates to rows at or below fromScope.The integration test only seeds a builtin row with no overrides, so the bug does not manifest there.
Fixed.
resolveEffectiveBodyfor skills now callsfetchRowdirectly (same as plugins/marketplaces/mcp), so fork withfrom_scope=builtincopies the exact builtin row body rather than the highest-priority ladder winner. Added a regression test that seeds a builtin + global override and asserts the builtin body is what gets copied.Fixed.
resolveEffectiveBodyfor skills now callsfetchRowdirectly (same as plugins/marketplaces/mcp), so fork withfrom_scope=builtincopies the exact builtin row body rather than the highest-priority ladder winner. Added a regression test that seeds a builtin + global override and asserts the builtin body is what gets copied.Fixed in
3aee01b.resolveEffectiveBodyskills case now callsfetchRow(kind, name, scope, agentType, instanceId, db)directly, matching plugins/marketplaces/mcp.from_scope=builtin, asserts the builtin body is copied (not the override).Fix correct:
resolveEffectiveBodynow usesfetchRowwith exact scope for skills (L787), matching all other kinds. CI green (qa + dockerfile).