feat(relay): expand role roster to dev-a through dev-f (6 devs)
Adds dev-d, dev-e, dev-f to Role type, KNOWN_ROLES, RelayQueue map, and all three MCP tool enums in server.ts. Updates the isRole test to assert the new roles are valid and dev-g is still rejected. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -52,7 +52,10 @@ describe("RelayQueue", () => {
|
||||
assert.ok(isRole("dev-a"));
|
||||
assert.ok(isRole("dev-b"));
|
||||
assert.ok(isRole("dev-c"));
|
||||
assert.ok(!isRole("dev-d"));
|
||||
assert.ok(isRole("dev-d"));
|
||||
assert.ok(isRole("dev-e"));
|
||||
assert.ok(isRole("dev-f"));
|
||||
assert.ok(!isRole("dev-g"));
|
||||
assert.ok(!isRole(""));
|
||||
assert.ok(!isRole("PM"));
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { randomUUID } from "node:crypto";
|
||||
|
||||
export type Role = "pm" | "dev-a" | "dev-b" | "dev-c";
|
||||
export type Role = "pm" | "dev-a" | "dev-b" | "dev-c" | "dev-d" | "dev-e" | "dev-f";
|
||||
export type MessageKind = "status" | "question" | "directive" | "free";
|
||||
|
||||
export interface RelayMessage {
|
||||
@@ -12,7 +12,7 @@ export interface RelayMessage {
|
||||
ts: string;
|
||||
}
|
||||
|
||||
const KNOWN_ROLES = new Set<string>(["pm", "dev-a", "dev-b", "dev-c"]);
|
||||
const KNOWN_ROLES = new Set<string>(["pm", "dev-a", "dev-b", "dev-c", "dev-d", "dev-e", "dev-f"]);
|
||||
|
||||
export function isRole(s: string): s is Role {
|
||||
return KNOWN_ROLES.has(s);
|
||||
@@ -24,6 +24,9 @@ export class RelayQueue {
|
||||
["dev-a", []],
|
||||
["dev-b", []],
|
||||
["dev-c", []],
|
||||
["dev-d", []],
|
||||
["dev-e", []],
|
||||
["dev-f", []],
|
||||
]);
|
||||
|
||||
post(from: Role, to: Role, kind: MessageKind, body: string): RelayMessage {
|
||||
|
||||
@@ -20,12 +20,12 @@ const TOOLS = [
|
||||
properties: {
|
||||
from: {
|
||||
type: "string",
|
||||
enum: ["pm", "dev-a", "dev-b", "dev-c"],
|
||||
enum: ["pm", "dev-a", "dev-b", "dev-c", "dev-d", "dev-e", "dev-f"],
|
||||
description: "Your role name",
|
||||
},
|
||||
to: {
|
||||
type: "string",
|
||||
enum: ["pm", "dev-a", "dev-b", "dev-c"],
|
||||
enum: ["pm", "dev-a", "dev-b", "dev-c", "dev-d", "dev-e", "dev-f"],
|
||||
description: "Recipient role name",
|
||||
},
|
||||
kind: {
|
||||
@@ -50,7 +50,7 @@ const TOOLS = [
|
||||
properties: {
|
||||
for: {
|
||||
type: "string",
|
||||
enum: ["pm", "dev-a", "dev-b", "dev-c"],
|
||||
enum: ["pm", "dev-a", "dev-b", "dev-c", "dev-d", "dev-e", "dev-f"],
|
||||
description: "Your role name",
|
||||
},
|
||||
},
|
||||
@@ -66,7 +66,7 @@ const TOOLS = [
|
||||
properties: {
|
||||
for: {
|
||||
type: "string",
|
||||
enum: ["pm", "dev-a", "dev-b", "dev-c"],
|
||||
enum: ["pm", "dev-a", "dev-b", "dev-c", "dev-d", "dev-e", "dev-f"],
|
||||
description: "Your role name",
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user