{
  "apiKeyEnv": "TYPESAFE_API_KEY",
  "model": "jev-latest",
  "baseUrl": "https://api.typesafe.ai",

  "budget": {
    "maxRequestsPerSession": 200,
    "maxTokensPerSession": 400000,
    "onBreach": "disable",
    "inputPricePerMTok": 0.042,
    "outputPricePerMTok": 0
  },

  "residency": {
    "enabled": false,
    "allowedModels": [],
    "allowedRepos": []
  },

  "redaction": {
    "patterns": "default",
    "maxStateChars": 120000,
    "maxStateTokens": 32000
  },

  "modules": {
    "router": {
      "enabled": true,
      "shadow": true,
      "timeoutMs": 2500,
      "confidenceFloor": 0.4,
      "clarifyThreshold": 0.7,
      "readOnlyThreshold": 0.2,
      "sensitiveThreshold": 0.6,
      "reasoningBumpScore": 1.6,
      "reasoningDropScore": 0,
      "reasoningConfidenceFloor": 0,
      "skillRouting": false,
      "skillSuggestion": false,
      "skillsDirs": [],
      "thinkingBands": [
        { "max": 0.75, "level": "off" },
        { "max": 1.5, "level": "low" },
        { "max": 3, "level": "high" }
      ],
      "tiers": {
        "cheap": { "provider": "anthropic", "model": "claude-haiku-4-5", "thinking": "off" },
        "standard": { "provider": "anthropic", "model": "claude-sonnet-5", "thinking": "low" },
        "strong": { "provider": "anthropic", "model": "claude-opus-5", "thinking": "high" }
      }
    },

    "gate": {
      "enabled": true,
      "shadow": true,
      "timeoutMs": 2000,
      "allowBlock": false,
      "onFailure": "allow",
      "withoutUi": "deny",
      "confirmMode": "ask",
      "fastPath": { "enabled": true, "block": false },
      "rules": {
        "enabled": false,
        "files": ["AGENTS.md", "CLAUDE.md", ".pi/rules.md", "pi-jev.md"],
        "maxRules": 10,
        "violationThreshold": 0.6,
        "onViolation": "steer"
      },
      "thresholds": {
        "blockBlastRadius": 3.0,
        "blockReversible": 0.3,
        "blockUnverifiedCode": 0.8,
        "confirmBlastRadius": 2.0,
        "confirmIrreversibleBlastRadius": 1.0,
        "confirmReversibleFloor": 0.75,
        "confirmDriftBlastRadius": 1.0,
        "confirmRegenerableThreshold": 0.6,
        "confirmInstallsSoftware": 0.6,
        "confirmPrivilegedOrRemote": 0.6,
        "confirmIntentDrift": 0.4,
        "confirmSecrets": 0.6,
        "confirmExfiltration": 0.6,
        "confidenceFloor": 0.5
      },
      "skipTools": ["read", "ls", "grep", "find"],
      "skipCommands": "default",
      "diskCache": true
    },

    "shield": {
      "enabled": true,
      "shadow": true,
      "timeoutMs": 3000,
      "injectionThreshold": 0.7,
      "secretThreshold": 0.6,
      "personalDataThreshold": 0.6,
      "deterministicInjection": true
    },

    "prune": {
      "enabled": false,
      "shadow": true,
      "timeoutMs": 3000,
      "minLines": 150,
      "relevanceThreshold": 0.6
    },

    "watchdog": {
      "enabled": false,
      "shadow": true,
      "timeoutMs": 2000,
      "everyNTurns": 3,
      "minTurns": 6,
      "loopThreshold": 0.75,
      "falseDoneThreshold": 0.7,
      "requireEvidence": true
    }
  },

  "telemetry": {
    "enabled": true,
    "dir": ".pi/jev-log",
    "logProbabilities": true,
    "logStateHash": true,
    "logStateContent": false
  }
}
