feat(agents): bulk edit connections and default models (#17215)

Add harness-scoped bulk connection and default-model edits to the agent roster, with compatible choices, change previews, per-agent save results, and retries.

Use an icon-based harness filter, keep agent rows readable, remove the status selector and selection hint, and redirect legacy status URLs to the full roster.

Preserve authorization, audit history, unrelated settings, and optimistic concurrency checks through the existing agent update route.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip authored and GitHub committed 2026-10-22 18:47:06 -05:00
1 parent 46760cc588
commit 9bf7dc0c8f
28 files changed
+1245 -223

No files matched your search

+16
View File
@@ -151,12 +151,28 @@ export const createAgentHireSchema = createAgentSchema.omit({ setupId: true }).e
export type CreateAgentHire = z.infer<typeof createAgentHireSchema>;
// Narrow intent used by roster bulk edits. The server merges only these fields
// into the latest configuration and rejects stale previews.
export const agentRuntimeSettingsPatchSchema = z.object({
harness: z.string().min(1),
model: z.string().trim().min(1).max(512).optional(),
aiConnection: aiConnectionBindingSchema.optional(),
expected: z.object({
model: z.string().nullable(),
aiConnection: aiConnectionBindingSchema.nullable(),
}).strict(),
}).strict().refine(value => value.model !== undefined || value.aiConnection !== undefined, {
message: "Choose a connection or default model to change",
});
export type AgentRuntimeSettingsPatch = z.infer<typeof agentRuntimeSettingsPatchSchema>;
export const updateAgentSchema = objectWithoutDefaults(
createAgentSchema.omit({ permissions: true, onboardingFirstAgent: true, setupId: true }),
)
.partial()
.extend({
permissions: z.never().optional(),
runtimeSettings: agentRuntimeSettingsPatchSchema.optional(),
replaceAdapterConfig: z.boolean().optional(),
status: z.enum(["paused", "idle", "terminated"]).optional(),
spentMonthlyCents: z.never().optional(),
+2
View File
@@ -350,6 +350,8 @@ export {
builtInAgentResetSchema,
createAgentHireSchema,
updateAgentSchema,
agentRuntimeSettingsPatchSchema,
type AgentRuntimeSettingsPatch,
agentRuntimeConfigSchema,
agentInstructionsBundleModeSchema,
updateAgentInstructionsBundleSchema,