11import fs from "node:fs/promises" ;
22import path from "node:path" ;
33import { afterEach , beforeEach , describe , expect , it , vi } from "vitest" ;
4+ import { DEFAULT_AGENT_MAX_CONCURRENT , DEFAULT_SUBAGENT_MAX_CONCURRENT } from "./agent-limits.js" ;
45import { withTempHome } from "./test-helpers.js" ;
56
67describe ( "config identity defaults" , ( ) => {
@@ -284,7 +285,7 @@ describe("config identity defaults", () => {
284285 } ) ;
285286 } ) ;
286287
287- it ( "does not synthesize agent/session when absent" , async ( ) => {
288+ it ( "does not synthesize agent list /session when absent" , async ( ) => {
288289 await withTempHome ( async ( home ) => {
289290 const configDir = path . join ( home , ".clawdbot" ) ;
290291 await fs . mkdir ( configDir , { recursive : true } ) ;
@@ -306,7 +307,9 @@ describe("config identity defaults", () => {
306307
307308 expect ( cfg . messages ?. responsePrefix ) . toBeUndefined ( ) ;
308309 expect ( cfg . messages ?. groupChat ?. mentionPatterns ) . toBeUndefined ( ) ;
309- expect ( cfg . agents ) . toBeUndefined ( ) ;
310+ expect ( cfg . agents ?. list ) . toBeUndefined ( ) ;
311+ expect ( cfg . agents ?. defaults ?. maxConcurrent ) . toBe ( DEFAULT_AGENT_MAX_CONCURRENT ) ;
312+ expect ( cfg . agents ?. defaults ?. subagents ?. maxConcurrent ) . toBe ( DEFAULT_SUBAGENT_MAX_CONCURRENT ) ;
310313 expect ( cfg . session ) . toBeUndefined ( ) ;
311314 } ) ;
312315 } ) ;
0 commit comments