Restore maxTurnsPerRun field, add config schema tests

Keep adapter-specific maxTurnsPerRun (default 1000) in the config
schema since the platform UI does not provide it for external adapters.
Platform-provided fields (model, effort, instructionsFilePath,
timeoutSec, graceSec) remain excluded to avoid duplication.

Add config-schema.test.ts with assertions that platform-provided
fields are absent and adapter-specific fields have correct defaults.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
2026-04-12 18:32:49 +00:00
parent c8d883d409
commit ac2fe20294
2 changed files with 65 additions and 0 deletions
+9
View File
@@ -23,8 +23,17 @@ interface AdapterConfigSchema {
}
export function getConfigSchema(): AdapterConfigSchema {
// model, effort, instructionsFilePath, timeoutSec, graceSec are provided
// by the platform UI and must not be duplicated here.
const fields: ConfigFieldSchema[] = [
// Core Claude fields
{
type: "number",
key: "maxTurnsPerRun",
label: "Max Turns Per Run",
hint: "Maximum number of agentic turns (tool calls) per heartbeat run. 0 means unlimited.",
default: 1000,
},
{
type: "toggle",
key: "dangerouslySkipPermissions",