{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/harness/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErE,eAAO,MAAM,oBAAoB,EAAE,WAAkE,CAAC;AAEtG,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,SAAS;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,IAAI,CAM1E;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,CAU7D;AAED,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,kBAAkB,GAAG,IAAI,CAS7E","sourcesContent":["import type { RetryPolicy } from \"@earendil-works/pi-ai\";\nimport type { CompactionSettings } from \"./compaction/compaction.ts\";\n\nexport const DEFAULT_RETRY_POLICY: RetryPolicy = { enabled: true, maxRetries: 3, baseDelayMs: 1_000 };\n\nexport function validateToolNames(tools: readonly { name: string }[]): void {\n\tconst names = new Set<string>();\n\tfor (const tool of tools) {\n\t\tif (names.has(tool.name)) throw new TypeError(`Duplicate tool name: ${JSON.stringify(tool.name)}`);\n\t\tnames.add(tool.name);\n\t}\n}\n\nexport function validateRetryPolicy(policy: RetryPolicy): void {\n\tif (\n\t\t!Number.isSafeInteger(policy.maxRetries) ||\n\t\tpolicy.maxRetries < 0 ||\n\t\tpolicy.maxRetries === Number.MAX_SAFE_INTEGER ||\n\t\t!Number.isSafeInteger(policy.baseDelayMs) ||\n\t\tpolicy.baseDelayMs < 0\n\t) {\n\t\tthrow new RangeError(\"Retry policy values must be finite non-negative safe integers\");\n\t}\n}\n\nexport function validateCompactionSettings(settings: CompactionSettings): void {\n\tif (\n\t\t!Number.isSafeInteger(settings.reserveTokens) ||\n\t\tsettings.reserveTokens < 0 ||\n\t\t!Number.isSafeInteger(settings.keepRecentTokens) ||\n\t\tsettings.keepRecentTokens < 0\n\t) {\n\t\tthrow new RangeError(\"Compaction token counts must be finite non-negative safe integers\");\n\t}\n}\n"]}