feat(config): add experimental.team_system flag

- Add team_system boolean flag to ExperimentalConfigSchema
- Defaults to false
- Enables experimental agent teams toolset
- Added comprehensive BDD-style tests

Task 1/25 complete
This commit is contained in:
YeonGyu-Kim
2026-02-11 19:13:05 +09:00
parent 4282de139b
commit 5e06db0c60
2 changed files with 43 additions and 3 deletions

View File

@@ -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", () => {

View File

@@ -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<typeof ExperimentalConfigSchema>