diff --git a/src/config/schema.test.ts b/src/config/schema.test.ts index 2d151ec53..bc1448eb7 100644 --- a/src/config/schema.test.ts +++ b/src/config/schema.test.ts @@ -649,7 +649,21 @@ describe("ExperimentalConfigSchema feature flags", () => { } }) - test("both fields are optional", () => { + test("accepts team_system as boolean", () => { + //#given + const config = { team_system: true } + + //#when + const result = ExperimentalConfigSchema.safeParse(config) + + //#then + expect(result.success).toBe(true) + if (result.success) { + expect(result.data.team_system).toBe(true) + } + }) + + test("defaults team_system to false when not provided", () => { //#given const config = {} @@ -659,10 +673,34 @@ describe("ExperimentalConfigSchema feature flags", () => { //#then expect(result.success).toBe(true) if (result.success) { - expect(result.data.plugin_load_timeout_ms).toBeUndefined() - expect(result.data.safe_hook_creation).toBeUndefined() + expect(result.data.team_system).toBe(false) } }) + + test("accepts team_system as false", () => { + //#given + const config = { team_system: false } + + //#when + const result = ExperimentalConfigSchema.safeParse(config) + + //#then + expect(result.success).toBe(true) + if (result.success) { + expect(result.data.team_system).toBe(false) + } + }) + + test("rejects non-boolean team_system", () => { + //#given + const config = { team_system: "true" } + + //#when + const result = ExperimentalConfigSchema.safeParse(config) + + //#then + expect(result.success).toBe(false) + }) }) describe("GitMasterConfigSchema", () => { diff --git a/src/config/schema/experimental.ts b/src/config/schema/experimental.ts index 774cbba70..c9b784f8f 100644 --- a/src/config/schema/experimental.ts +++ b/src/config/schema/experimental.ts @@ -17,6 +17,8 @@ export const ExperimentalConfigSchema = z.object({ safe_hook_creation: z.boolean().optional(), /** Enable experimental agent teams toolset (default: false) */ agent_teams: z.boolean().optional(), + /** Enable experimental team system (default: false) */ + team_system: z.boolean().default(false), }) export type ExperimentalConfig = z.infer