Add shared types for agent hiring, config revisions, costs breakdown, and sidebar badges
Add AgentConfigRevision, CostByAgent, SidebarBadges types. Add createAgentHireSchema with source issue linking and linkIssueApprovalSchema. Extend approval validator with issueIds. Update cost summary to generic period naming. Add sidebar badges API path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -25,9 +25,18 @@ export const createAgentSchema = z.object({
|
||||
|
||||
export type CreateAgent = z.infer<typeof createAgentSchema>;
|
||||
|
||||
export const createAgentHireSchema = createAgentSchema.extend({
|
||||
sourceIssueId: z.string().uuid().optional().nullable(),
|
||||
sourceIssueIds: z.array(z.string().uuid()).optional(),
|
||||
});
|
||||
|
||||
export type CreateAgentHire = z.infer<typeof createAgentHireSchema>;
|
||||
|
||||
export const updateAgentSchema = createAgentSchema
|
||||
.omit({ permissions: true })
|
||||
.partial()
|
||||
.extend({
|
||||
permissions: z.never().optional(),
|
||||
status: z.enum(AGENT_STATUSES).optional(),
|
||||
spentMonthlyCents: z.number().int().nonnegative().optional(),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user