mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-14 01:50:39 +09:00
feat: agent instructions path API with chain-of-command authz
Add PATCH /agents/:id/instructions-path endpoint for setting or clearing an agent's instructions file path. Supports relative path resolution against adapterConfig.cwd. Enforce chain-of-command authorization — only the agent itself, board members, or ancestor managers can update. Guard instructions path keys in the general agent update endpoint too. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
633885b57a
commit
bcc64f6533
4 changed files with 142 additions and 1 deletions
|
|
@ -59,6 +59,13 @@ export const updateAgentSchema = createAgentSchema
|
|||
|
||||
export type UpdateAgent = z.infer<typeof updateAgentSchema>;
|
||||
|
||||
export const updateAgentInstructionsPathSchema = z.object({
|
||||
path: z.string().trim().min(1).nullable(),
|
||||
adapterConfigKey: z.string().trim().min(1).optional(),
|
||||
});
|
||||
|
||||
export type UpdateAgentInstructionsPath = z.infer<typeof updateAgentInstructionsPathSchema>;
|
||||
|
||||
export const createAgentKeySchema = z.object({
|
||||
name: z.string().min(1).default("default"),
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue