mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-11 05:11:49 +01:00
Add security to agent role taxonomy
This commit is contained in:
1 parent
ecdb43b64f
commit
45071742fb
2 files changed
+15
-1
No files matched your search
@@ -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");
|
||||
});
|
||||
});
|
||||
@@ -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",
|
||||
|
||||
Reference in new issue
Block a user