Add security to agent role taxonomy

This commit is contained in:
Dotta committed 2026-04-26 07:41:39 -05:00
1 parent ecdb43b64f
commit 45071742fb
2 files changed
+15 -1

No files matched your search

+13 -1
View File
@@ -1,5 +1,5 @@
import { describe, expect, it } from "vitest";
import { acceptInviteSchema, createAgentSchema, updateAgentSchema } from "./index.js";
import { AGENT_ROLE_LABELS, acceptInviteSchema, createAgentSchema, updateAgentSchema } from "./index.js";
describe("dynamic adapter type validation schemas", () => {
it("accepts external adapter types in create/update agent schemas", () => {
@@ -35,4 +35,16 @@ describe("dynamic adapter type validation schemas", () => {
}).adapterType,
).toBe("external_adapter");
});
it("accepts the security agent role and exposes its UI label", () => {
expect(
createAgentSchema.parse({
name: "Security Engineer",
role: "security",
adapterType: "codex_local",
}).role,
).toBe("security");
expect(AGENT_ROLE_LABELS.security).toBe("Security");
});
});
+2
View File
@@ -42,6 +42,7 @@ export const AGENT_ROLES = [
"cto",
"cmo",
"cfo",
"security",
"engineer",
"designer",
"pm",
@@ -57,6 +58,7 @@ export const AGENT_ROLE_LABELS: Record<AgentRole, string> = {
cto: "CTO",
cmo: "CMO",
cfo: "CFO",
security: "Security",
engineer: "Engineer",
designer: "Designer",
pm: "PM",