{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$ref": "#/$defs/Config",
  "$defs": {
    "LogLevel": {
      "type": "string",
      "enum": [
        "DEBUG",
        "INFO",
        "WARN",
        "ERROR"
      ],
      "description": "Log level"
    },
    "ServerConfig": {
      "type": "object",
      "properties": {
        "port": {
          "exclusiveMinimum": 0,
          "type": "integer",
          "maximum": 9007199254740991,
          "description": "Port to listen on"
        },
        "hostname": {
          "type": "string",
          "description": "Hostname to listen on"
        },
        "mdns": {
          "type": "boolean",
          "description": "Enable mDNS service discovery"
        },
        "mdnsDomain": {
          "type": "string",
          "description": "Custom domain name for mDNS service (default: opencode.local)"
        },
        "cors": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Additional domains to allow for CORS"
        }
      },
      "additionalProperties": false
    },
    "ConfigV2.Hooks.Matcher": {
      "type": "object",
      "properties": {
        "tool": {
          "type": "string",
          "description": "Glob matched against the tool name, e.g. `edit` or `bash`. Omit to match every tool."
        },
        "file": {
          "type": "string",
          "description": "Glob matched against the file path a tool touched, e.g. `**/*.ts`. Only meaningful for tools that act on a file."
        }
      },
      "additionalProperties": false
    },
    "ConfigV2.Hooks.Entry": {
      "type": "object",
      "properties": {
        "command": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Command and arguments to run, as an array — not passed through a shell, so no quoting or injection concerns."
        },
        "matcher": {
          "$ref": "#/$defs/ConfigV2.Hooks.Matcher",
          "description": "Restricts which events fire this hook. Omit to fire on every occurrence of the event."
        },
        "environment": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Extra environment variables for the command, on top of the inherited environment."
        },
        "timeout": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "enum": [
                "NaN"
              ]
            },
            {
              "type": "string",
              "enum": [
                "Infinity"
              ]
            },
            {
              "type": "string",
              "enum": [
                "-Infinity"
              ]
            }
          ],
          "description": "Milliseconds before the command is killed. Defaults to 30000."
        },
        "disabled": {
          "type": "boolean",
          "description": "Set true to keep the hook configured but inactive."
        }
      },
      "required": [
        "command"
      ],
      "additionalProperties": false
    },
    "MemorySourceConfig": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "A unique name for the source, e.g. \"platform-kg\". Shown as the label on everything it returns"
        },
        "type": {
          "type": "string",
          "enum": [
            "graph",
            "mcp"
          ],
          "description": "\"graph\": a read-only query against a Neo4j knowledge graph. \"mcp\": a search tool on an MCP server configured under \"mcp\""
        },
        "jurisdiction": {
          "type": "string",
          "description": "Where the source runs, e.g. \"EU-DE\", \"EU\" or \"US\". Required: checked against the residency policy before the source is first contacted. A source without one is never queried"
        },
        "enabled": {
          "type": "boolean",
          "description": "Set to false to keep the source configured but never query it (default true)"
        },
        "max_tokens": {
          "exclusiveMinimum": 0,
          "type": "integer",
          "maximum": 9007199254740991,
          "description": "Most tokens this source may add to a turn (default 500), within memory.retrieval.max_tokens overall"
        },
        "timeout_ms": {
          "exclusiveMinimum": 0,
          "type": "integer",
          "maximum": 9007199254740991,
          "description": "How long a query may take before the source is skipped for that turn (default 2000)"
        },
        "trusted": {
          "type": "boolean",
          "description": "Honoured only in managed config: results are labelled as organisation-managed and skip the instruction-pattern screen (secret screening and size caps still apply). Ignored anywhere else"
        },
        "url": {
          "type": "string",
          "description": "graph: the Neo4j URL, e.g. \"bolt+s://kg.internal:7687\". Plain bolt:// or neo4j:// only to this machine"
        },
        "database": {
          "type": "string",
          "description": "graph: the database to read (default: the server's default database)"
        },
        "query": {
          "type": "string",
          "enum": [
            "fulltext",
            "contains"
          ],
          "description": "graph: how nodes are found. \"fulltext\" (the default) uses a full-text index; \"contains\" matches node names containing a word of the question"
        },
        "index": {
          "type": "string",
          "description": "graph, \"fulltext\": the full-text index to search (default: the first one the database has)"
        },
        "username": {
          "type": "string",
          "description": "graph: the user to connect as, e.g. \"{env:KG_USER}\". Give it read-only rights"
        },
        "password": {
          "type": "string",
          "description": "graph: the password, e.g. \"{env:KG_PASS}\""
        },
        "server": {
          "type": "string",
          "description": "mcp: the name of a server under \"mcp\". Memory opens its own connection to it, after the residency check; set that server's \"enabled\" to false so the agent is not also given its tools"
        },
        "tool": {
          "type": "string",
          "description": "mcp: the search tool to call, e.g. \"search_memory_facts\". Only this tool is ever called"
        },
        "argument": {
          "type": "string",
          "description": "mcp: the tool argument that takes the query (default \"query\")"
        }
      },
      "required": [
        "name",
        "type"
      ],
      "additionalProperties": false
    },
    "MemoryBackendConfig": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "embedded",
            "neo4j",
            "memgraph"
          ],
          "description": "\"embedded\" (the default: memory on this machine), \"neo4j\", or \"memgraph\" (experimental, not supported yet: refused when memory starts)"
        },
        "url": {
          "type": "string",
          "description": "The database's Bolt URL, e.g. bolt+s://graph.internal:7687. Plain bolt:// or neo4j:// is only allowed to localhost, unless allow_insecure is set"
        },
        "database": {
          "type": "string",
          "description": "Database name. Default: the server's default database (Neo4j Community has only one). Project and user memory are kept apart inside it"
        },
        "username": {
          "type": "string",
          "description": "Database user, as \"{env:VAR}\" or \"{file:path}\""
        },
        "password": {
          "type": "string",
          "description": "Database password, as \"{env:VAR}\" or \"{file:path}\". A literal password is refused"
        },
        "jurisdiction": {
          "type": "string",
          "description": "Where the database runs, e.g. \"EU-DE\" or \"US\". Required for an external database; checked against the residency policy before any connection"
        },
        "read_only": {
          "type": "boolean",
          "description": "Recall only: nothing is written, and the remember tool isn't offered to the model"
        },
        "allow_insecure": {
          "type": "boolean",
          "description": "Allow an unencrypted bolt:// or neo4j:// connection to a host that isn't localhost. Credentials and facts then cross the network in clear text"
        },
        "user": {
          "type": "string",
          "description": "Who you are in a shared database, for user memory (stored only as a hash). Default: a random id kept in the Lunos data directory, so user memory is per machine unless you set this"
        }
      },
      "additionalProperties": false
    },
    "MemoryConfig": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Turn on long-term memory (off by default). LUNOS_DISABLE_MEMORY=1 turns it off regardless of this setting"
        },
        "scope": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "project",
              "user"
            ]
          },
          "description": "Where memory is kept: \"project\" (.opencode/memory/graph/ in the project) and/or \"user\" (the Lunos data directory). Default [\"project\"]"
        },
        "model": {
          "type": "string",
          "description": "Model that extracts facts and relationships when something is remembered: \"inherit\" (the main agent's model), \"small\" (small_model, the default) or \"provider/model\". Checked against the residency policy before memory starts",
          "$ref": "https://models.dev/model-schema.json#/$defs/Model"
        },
        "embedding": {
          "type": "string",
          "description": "Embedding model: \"local\" (the default; computed on this machine, no network call after the one-time model download). Provider embeddings are not supported yet"
        },
        "retrieval": {
          "type": "object",
          "properties": {
            "max_tokens": {
              "exclusiveMinimum": 0,
              "type": "integer",
              "maximum": 9007199254740991,
              "description": "Most tokens of recalled memory added to a turn (default 1500)"
            }
          },
          "additionalProperties": false,
          "description": "How much memory is recalled into a turn"
        },
        "limits": {
          "type": "object",
          "properties": {
            "max_facts": {
              "exclusiveMinimum": 0,
              "type": "integer",
              "maximum": 9007199254740991,
              "description": "Most facts kept per scope (default 5000). Remembering more is refused"
            },
            "max_fact_chars": {
              "exclusiveMinimum": 0,
              "type": "integer",
              "maximum": 9007199254740991,
              "description": "Longest single fact, in characters (default 2000)"
            }
          },
          "additionalProperties": false,
          "description": "Size caps"
        },
        "sources": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MemorySourceConfig"
          },
          "description": "External, read-only memory sources (XCOD-135): a knowledge graph or an MCP memory server recalled alongside local memory. Their results are untrusted reference, labelled with the source and never stored locally"
        },
        "retention": {
          "type": "object",
          "properties": {
            "days": {
              "exclusiveMinimum": 0,
              "type": "integer",
              "maximum": 9007199254740991,
              "description": "Facts expire this many days after they were saved (default: never). Hand-written notes never expire. Expired facts are not recalled, and are deleted after grace_days"
            },
            "grace_days": {
              "minimum": 0,
              "type": "integer",
              "maximum": 9007199254740991,
              "description": "Days an expired fact is kept, not recalled, before it is deleted (default 7)"
            }
          },
          "additionalProperties": false,
          "description": "How long facts are kept"
        },
        "encryption": {
          "type": "string",
          "enum": [
            "off",
            "os-keychain"
          ],
          "description": "Encrypt the provenance ledger (facts.jsonl) with a key kept in the OS keychain: \"os-keychain\", or \"off\" (the default). The memory engine's own database files are not encrypted; use full-disk encryption for those"
        },
        "backend": {
          "$ref": "#/$defs/MemoryBackendConfig",
          "description": "Where memory is stored (XCOD-134): \"embedded\" (the default; on this machine) or an external graph database your team runs"
        }
      },
      "additionalProperties": false
    },
    "ConfigV2.Residency": {
      "type": "object",
      "properties": {
        "allow": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "eu",
              "us",
              "other",
              "configurable",
              "unknown"
            ]
          },
          "description": "Regions this deployment may send model requests to, e.g. [\"eu\"]. Providers outside this list are blocked before any request is made. Providers with no recorded jurisdiction are always denied. \"configurable\" providers (Azure, Bedrock, Vertex) are denied unless explicitly listed, because their region cannot be verified from here."
        },
        "audit": {
          "type": "boolean",
          "description": "Write an audit log of outbound model calls. Defaults to true whenever a residency policy is set; set false to opt out."
        },
        "auditPath": {
          "type": "string",
          "description": "Path of the audit log. Defaults to residency-egress.log in the Lunos data directory."
        },
        "endpoints": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "properties": {
              "region": {
                "type": "string",
                "enum": [
                  "eu",
                  "us",
                  "other"
                ],
                "description": "Where this endpoint processes data. Your declaration: Lunos can't verify it."
              },
              "note": {
                "type": "string",
                "description": "What the declaration rests on, recorded for reviewers, e.g. \"vLLM on our Frankfurt servers\""
              }
            },
            "required": [
              "region"
            ],
            "additionalProperties": false
          },
          "description": "Jurisdictions this deployment declares for endpoints Lunos can't assess, keyed by provider id: self-hosted models (vLLM, Ollama) or a built-in provider pointed at another host. A declaration never changes a built-in provider's claim for its own API. Recorded in the audit log with basis \"declared\". Lock it with managed config ($locked: [\"residency\"])."
        }
      },
      "required": [
        "allow"
      ],
      "additionalProperties": false
    },
    "ConfigV2.Reference.Git": {
      "type": "object",
      "properties": {
        "repository": {
          "type": "string"
        },
        "branch": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "hidden": {
          "type": "boolean"
        }
      },
      "required": [
        "repository"
      ],
      "additionalProperties": false
    },
    "ConfigV2.Reference.Local": {
      "type": "object",
      "properties": {
        "path": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "hidden": {
          "type": "boolean"
        }
      },
      "required": [
        "path"
      ],
      "additionalProperties": false
    },
    "SubagentConfig": {
      "type": "object",
      "properties": {
        "background": {
          "type": "boolean",
          "description": "Allow subagents to run in the background while the main agent keeps working (off by default). Replaces OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS, which still works"
        },
        "model": {
          "type": "string",
          "description": "Default model for every subagent without its own agent.<name>.model: \"inherit\" (the main agent's model, the default), \"small\" (small_model) or \"provider/model\"",
          "$ref": "https://models.dev/model-schema.json#/$defs/Model"
        },
        "variant": {
          "type": "string",
          "description": "Reasoning variant for subagents whose model is overridden: \"inherit\" or a variant name"
        },
        "dynamic": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean",
              "description": "Let the main agent choose a model per task call, from `allow` only"
            },
            "allow": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Models the main agent may choose per task call (\"provider/model\")"
            }
          },
          "additionalProperties": false,
          "description": "Per-task model selection by the main agent"
        }
      },
      "additionalProperties": false
    },
    "PermissionActionConfig": {
      "type": "string",
      "enum": [
        "ask",
        "allow",
        "deny"
      ]
    },
    "PermissionObjectConfig": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/PermissionActionConfig"
      }
    },
    "PermissionRuleConfig": {
      "anyOf": [
        {
          "$ref": "#/$defs/PermissionActionConfig"
        },
        {
          "$ref": "#/$defs/PermissionObjectConfig"
        }
      ]
    },
    "PermissionConfig": {
      "anyOf": [
        {
          "$ref": "#/$defs/PermissionActionConfig"
        },
        {
          "type": "object",
          "properties": {
            "read": {
              "$ref": "#/$defs/PermissionRuleConfig"
            },
            "edit": {
              "$ref": "#/$defs/PermissionRuleConfig"
            },
            "glob": {
              "$ref": "#/$defs/PermissionRuleConfig"
            },
            "grep": {
              "$ref": "#/$defs/PermissionRuleConfig"
            },
            "list": {
              "$ref": "#/$defs/PermissionRuleConfig"
            },
            "bash": {
              "$ref": "#/$defs/PermissionRuleConfig"
            },
            "task": {
              "$ref": "#/$defs/PermissionRuleConfig"
            },
            "external_directory": {
              "$ref": "#/$defs/PermissionRuleConfig"
            },
            "todowrite": {
              "$ref": "#/$defs/PermissionActionConfig"
            },
            "question": {
              "$ref": "#/$defs/PermissionActionConfig"
            },
            "webfetch": {
              "$ref": "#/$defs/PermissionActionConfig"
            },
            "websearch": {
              "$ref": "#/$defs/PermissionActionConfig"
            },
            "lsp": {
              "$ref": "#/$defs/PermissionRuleConfig"
            },
            "doom_loop": {
              "$ref": "#/$defs/PermissionActionConfig"
            },
            "skill": {
              "$ref": "#/$defs/PermissionRuleConfig"
            }
          },
          "additionalProperties": {
            "$ref": "#/$defs/PermissionRuleConfig"
          }
        }
      ]
    },
    "AgentConfig": {
      "type": "object",
      "properties": {
        "model": {
          "type": "string",
          "$ref": "https://models.dev/model-schema.json#/$defs/Model"
        },
        "variant": {
          "type": "string",
          "description": "Default model variant for this agent (applies only when using the agent's configured model)."
        },
        "temperature": {
          "type": "number"
        },
        "top_p": {
          "type": "number"
        },
        "prompt": {
          "type": "string"
        },
        "tools": {
          "type": "object",
          "additionalProperties": {
            "type": "boolean"
          },
          "description": "@deprecated Use 'permission' field instead"
        },
        "disable": {
          "type": "boolean"
        },
        "description": {
          "type": "string",
          "description": "Description of when to use the agent"
        },
        "mode": {
          "type": "string",
          "enum": [
            "subagent",
            "primary",
            "all"
          ]
        },
        "hidden": {
          "type": "boolean",
          "description": "Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)"
        },
        "options": {
          "type": "object"
        },
        "color": {
          "anyOf": [
            {
              "pattern": "^#[0-9a-fA-F]{6}$",
              "type": "string"
            },
            {
              "type": "string",
              "enum": [
                "primary",
                "secondary",
                "accent",
                "success",
                "warning",
                "error",
                "info"
              ]
            }
          ],
          "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
        },
        "steps": {
          "exclusiveMinimum": 0,
          "type": "integer",
          "maximum": 9007199254740991,
          "description": "Maximum number of agentic iterations before forcing text-only response"
        },
        "maxSteps": {
          "exclusiveMinimum": 0,
          "type": "integer",
          "maximum": 9007199254740991,
          "description": "@deprecated Use 'steps' field instead."
        },
        "permission": {
          "$ref": "#/$defs/PermissionConfig"
        }
      }
    },
    "ProviderConfig": {
      "type": "object",
      "properties": {
        "api": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "env": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "id": {
          "type": "string"
        },
        "npm": {
          "type": "string"
        },
        "whitelist": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "blacklist": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "options": {
          "type": "object",
          "properties": {
            "apiKey": {
              "type": "string"
            },
            "baseURL": {
              "type": "string"
            },
            "enterpriseUrl": {
              "type": "string",
              "description": "GitHub Enterprise URL for copilot authentication"
            },
            "setCacheKey": {
              "type": "boolean",
              "description": "Enable promptCacheKey for this provider (default false)"
            },
            "timeout": {
              "anyOf": [
                {
                  "exclusiveMinimum": 0,
                  "type": "integer",
                  "maximum": 9007199254740991
                },
                {
                  "type": "boolean",
                  "enum": [
                    false
                  ]
                }
              ],
              "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
            },
            "headerTimeout": {
              "anyOf": [
                {
                  "exclusiveMinimum": 0,
                  "type": "integer",
                  "maximum": 9007199254740991
                },
                {
                  "type": "boolean",
                  "enum": [
                    false
                  ]
                }
              ],
              "description": "Timeout in milliseconds to wait for response headers (default: 300000). Set to false to disable timeout."
            },
            "chunkTimeout": {
              "anyOf": [
                {
                  "exclusiveMinimum": 0,
                  "type": "integer",
                  "maximum": 9007199254740991
                },
                {
                  "type": "boolean",
                  "enum": [
                    false
                  ]
                }
              ],
              "description": "Timeout in milliseconds between streamed SSE chunks for this provider (default: 300000). If no chunk arrives within this window, the request is aborted. Set to false to disable timeout."
            }
          }
        },
        "models": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "family": {
                "type": "string"
              },
              "release_date": {
                "type": "string"
              },
              "attachment": {
                "type": "boolean"
              },
              "reasoning": {
                "type": "boolean"
              },
              "temperature": {
                "type": "boolean"
              },
              "tool_call": {
                "type": "boolean"
              },
              "interleaved": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "reasoning",
                          "reasoning_content",
                          "reasoning_text"
                        ]
                      },
                      {
                        "type": "string"
                      }
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "field": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "reasoning",
                              "reasoning_content",
                              "reasoning_text"
                            ]
                          },
                          {
                            "type": "string"
                          }
                        ]
                      }
                    },
                    "required": [
                      "field"
                    ],
                    "additionalProperties": false
                  }
                ]
              },
              "cost": {
                "type": "object",
                "properties": {
                  "input": {
                    "type": "number"
                  },
                  "output": {
                    "type": "number"
                  },
                  "cache_read": {
                    "type": "number"
                  },
                  "cache_write": {
                    "type": "number"
                  },
                  "context_over_200k": {
                    "type": "object",
                    "properties": {
                      "input": {
                        "type": "number"
                      },
                      "output": {
                        "type": "number"
                      },
                      "cache_read": {
                        "type": "number"
                      },
                      "cache_write": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "input",
                      "output"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "input",
                  "output"
                ],
                "additionalProperties": false
              },
              "limit": {
                "type": "object",
                "properties": {
                  "context": {
                    "type": "number"
                  },
                  "input": {
                    "type": "number"
                  },
                  "output": {
                    "type": "number"
                  }
                },
                "required": [
                  "context",
                  "output"
                ],
                "additionalProperties": false
              },
              "modalities": {
                "type": "object",
                "properties": {
                  "input": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "text",
                        "audio",
                        "image",
                        "video",
                        "pdf"
                      ]
                    }
                  },
                  "output": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "text",
                        "audio",
                        "image",
                        "video",
                        "pdf"
                      ]
                    }
                  }
                },
                "additionalProperties": false
              },
              "experimental": {
                "type": "boolean"
              },
              "status": {
                "type": "string",
                "enum": [
                  "alpha",
                  "beta",
                  "deprecated",
                  "active"
                ]
              },
              "provider": {
                "type": "object",
                "properties": {
                  "npm": {
                    "type": "string"
                  },
                  "api": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              },
              "options": {
                "type": "object"
              },
              "headers": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              },
              "variants": {
                "type": "object",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "disabled": {
                      "type": "boolean",
                      "description": "Disable this variant for the model"
                    }
                  }
                },
                "description": "Variant-specific configuration"
              }
            },
            "additionalProperties": false
          }
        }
      },
      "additionalProperties": false
    },
    "McpLocalConfig": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "local"
          ],
          "description": "Type of MCP server connection"
        },
        "command": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Command and arguments to run the MCP server"
        },
        "cwd": {
          "type": "string",
          "description": "Working directory for the MCP server process. Relative paths resolve from the workspace directory."
        },
        "environment": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Environment variables to set when running the MCP server"
        },
        "enabled": {
          "type": "boolean",
          "description": "Enable or disable the MCP server on startup"
        },
        "timeout": {
          "exclusiveMinimum": 0,
          "type": "integer",
          "maximum": 9007199254740991,
          "description": "Timeout in ms for MCP server requests. Defaults to 5000 (5 seconds) if not specified."
        }
      },
      "required": [
        "type",
        "command"
      ],
      "additionalProperties": false
    },
    "McpOAuthConfig": {
      "type": "object",
      "properties": {
        "clientId": {
          "type": "string",
          "description": "OAuth client ID. If not provided, dynamic client registration (RFC 7591) will be attempted."
        },
        "clientSecret": {
          "type": "string",
          "description": "OAuth client secret (if required by the authorization server)"
        },
        "scope": {
          "type": "string",
          "description": "OAuth scopes to request during authorization"
        },
        "callbackPort": {
          "minimum": 1,
          "maximum": 65535,
          "type": "integer",
          "description": "Port for the local OAuth callback server (default: 19876). Shorthand for redirectUri when only the port needs changing. Ignored if redirectUri is set."
        },
        "redirectUri": {
          "type": "string",
          "description": "OAuth redirect URI (default: http://127.0.0.1:19876/mcp/oauth/callback)."
        }
      },
      "additionalProperties": false
    },
    "McpRemoteConfig": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "remote"
          ],
          "description": "Type of MCP server connection"
        },
        "url": {
          "type": "string",
          "description": "URL of the remote MCP server"
        },
        "enabled": {
          "type": "boolean",
          "description": "Enable or disable the MCP server on startup"
        },
        "headers": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Headers to send with the request"
        },
        "oauth": {
          "anyOf": [
            {
              "$ref": "#/$defs/McpOAuthConfig"
            },
            {
              "type": "boolean",
              "enum": [
                false
              ]
            }
          ],
          "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
        },
        "timeout": {
          "exclusiveMinimum": 0,
          "type": "integer",
          "maximum": 9007199254740991,
          "description": "Timeout in ms for MCP server requests. Defaults to 5000 (5 seconds) if not specified."
        }
      },
      "required": [
        "type",
        "url"
      ],
      "additionalProperties": false
    },
    "LayoutConfig": {
      "type": "string",
      "enum": [
        "auto",
        "stretch"
      ]
    },
    "ImageAttachmentConfig": {
      "type": "object",
      "properties": {
        "auto_resize": {
          "type": "boolean",
          "description": "Resize images before sending them to the model when they exceed configured limits (default: true)"
        },
        "max_width": {
          "exclusiveMinimum": 0,
          "type": "integer",
          "maximum": 9007199254740991,
          "description": "Maximum image width before resizing or rejecting the attachment (default: 2000)"
        },
        "max_height": {
          "exclusiveMinimum": 0,
          "type": "integer",
          "maximum": 9007199254740991,
          "description": "Maximum image height before resizing or rejecting the attachment (default: 2000)"
        },
        "max_base64_bytes": {
          "exclusiveMinimum": 0,
          "type": "integer",
          "maximum": 9007199254740991,
          "description": "Maximum base64 payload bytes for an image attachment (default: 5242880)"
        }
      },
      "additionalProperties": false
    },
    "AttachmentConfig": {
      "type": "object",
      "properties": {
        "image": {
          "$ref": "#/$defs/ImageAttachmentConfig",
          "description": "Image attachment configuration"
        }
      },
      "additionalProperties": false
    },
    "Policy.Effect": {
      "type": "string",
      "enum": [
        "allow",
        "deny"
      ]
    },
    "ConfigV2.Experimental.Policy": {
      "type": "object",
      "properties": {
        "action": {
          "anyOf": [
            {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "provider.use"
                  ]
                }
              ]
            }
          ]
        },
        "effect": {
          "$ref": "#/$defs/Policy.Effect"
        },
        "resource": {
          "type": "string"
        }
      },
      "required": [
        "action",
        "effect",
        "resource"
      ],
      "additionalProperties": false
    },
    "Config": {
      "type": "object",
      "properties": {
        "$schema": {
          "type": "string",
          "description": "JSON schema reference for configuration validation"
        },
        "$locked": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Organisation policy: keys that user and project config, environment variables, CLI flags and in-session commands can't change. Only read from managed config (system directory or MDM profile)"
        },
        "shell": {
          "type": "string",
          "description": "Default shell to use for terminal and bash tool"
        },
        "logLevel": {
          "$ref": "#/$defs/LogLevel",
          "description": "Log level"
        },
        "server": {
          "$ref": "#/$defs/ServerConfig",
          "description": "Server configuration for opencode serve and web commands"
        },
        "command": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "properties": {
              "template": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "agent": {
                "type": "string"
              },
              "model": {
                "type": "string",
                "$ref": "https://models.dev/model-schema.json#/$defs/Model"
              },
              "variant": {
                "type": "string"
              },
              "subtask": {
                "type": "boolean"
              }
            },
            "required": [
              "template"
            ],
            "additionalProperties": false
          },
          "description": "Command configuration, see https://docs.lunos.tech/docs/commands/"
        },
        "skills": {
          "type": "object",
          "properties": {
            "paths": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Additional paths to skill folders"
            },
            "urls": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "URLs to fetch skills from (e.g., https://example.com/.well-known/skills/)"
            }
          },
          "additionalProperties": false,
          "description": "Additional skill folder paths"
        },
        "hooks": {
          "type": "object",
          "properties": {
            "tool.execute.before": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/ConfigV2.Hooks.Entry"
              }
            },
            "tool.execute.after": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/ConfigV2.Hooks.Entry"
              }
            },
            "command.execute.before": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/ConfigV2.Hooks.Entry"
              }
            },
            "session.created": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/ConfigV2.Hooks.Entry"
              }
            },
            "session.idle": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/ConfigV2.Hooks.Entry"
              }
            },
            "session.compacted": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/ConfigV2.Hooks.Entry"
              }
            },
            "session.deleted": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/ConfigV2.Hooks.Entry"
              }
            },
            "session.error": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/ConfigV2.Hooks.Entry"
              }
            }
          },
          "additionalProperties": false,
          "description": "Shell commands to run on tool, command, and session lifecycle events, without writing a plugin"
        },
        "audit": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean",
              "description": "Write the organisation audit trail: model calls, tool runs, permission decisions, MCP connections, marketplace installs, policy refusals and upgrades. Also on whenever a residency policy is set with audit on"
            },
            "path": {
              "type": "string",
              "description": "Audit log path. Takes precedence over residency.auditPath. Default: residency-egress.log in the Lunos log directory"
            },
            "redact": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Regular expressions whose matches are masked in recorded paths and command lines, on top of the built-in secret patterns"
            },
            "max_bytes": {
              "exclusiveMinimum": 0,
              "type": "integer",
              "maximum": 9007199254740991,
              "description": "Rotate the log when it reaches this size (default 10 MB)"
            },
            "max_age_days": {
              "exclusiveMinimum": 0,
              "type": "integer",
              "maximum": 9007199254740991,
              "description": "Delete rotated log files older than this (default 90)"
            },
            "forward": {
              "type": "object",
              "properties": {
                "syslog": {
                  "type": "string",
                  "description": "Forward every line to a syslog receiver, e.g. udp://siem.internal:514"
                },
                "otlp": {
                  "type": "string",
                  "description": "Forward every line as an OTLP log record, e.g. https://collector.internal:4318"
                }
              },
              "additionalProperties": false
            }
          },
          "additionalProperties": false
        },
        "memory": {
          "$ref": "#/$defs/MemoryConfig",
          "description": "Graph-based long-term memory, off by default"
        },
        "sandbox": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean",
              "description": "Run `lunos` and `lunos run` in a sandbox, as if --sandbox were passed (--no-sandbox overrides it for one run). Any config layer turning it on wins. Other commands, such as serve, web and acp, still run on the host. Off by default"
            },
            "required": {
              "type": "boolean",
              "description": "Nothing runs on this machine except in a sandbox: `lunos` and `lunos run` always start one, --no-sandbox is refused, `lunos serve`, `web`, `acp`, `github` and `pr` refuse to start, and any agent tool call outside a sandbox is refused. Meant for managed config, locked with \"$locked\": [\"sandbox.required\"]. Off by default"
            },
            "image": {
              "type": "string",
              "description": "Container image with Lunos as its entry point. Default ghcr.io/axsiondev/lunos:<the CLI's version>. The image is pinned by digest when the sandbox is created"
            },
            "workspace": {
              "type": "string",
              "enum": [
                "copy",
                "mount"
              ],
              "description": "How the project gets into the sandbox. \"copy\" (default): cloned into a container volume at the current commit, with uncommitted changes applied; the host working tree is never mounted. \"mount\": your working tree itself, bind-mounted read-write, so the agent's changes are in it as they happen (no branch or patch); .git and Lunos's own config stay read-only. Reduced isolation, and a warning is shown. Read from your global and managed config only, never a repository's"
            },
            "devcontainer": {
              "type": "string",
              "enum": [
                "off",
                "image",
                "build"
              ],
              "description": "Use the project's .devcontainer/devcontainer.json for the sandbox's toolchain, unless the project's own config sets sandbox.image. A sandbox.image in your global or managed config is the Lunos image the devcontainer gets Lunos from. \"image\" (default): its `image`, with Lunos added (nothing of the image runs on this machine). \"build\": also its `build` (Dockerfile), which runs the repository's build steps on this machine, with the network open; only your global or managed config can choose it. \"off\": ignore it. A repository's config can only turn it off"
            },
            "mounts": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "source": {
                    "type": "string",
                    "description": "Absolute path on this machine"
                  },
                  "target": {
                    "type": "string",
                    "description": "Absolute path in the sandbox. Default: the same as source"
                  }
                },
                "required": [
                  "source"
                ],
                "additionalProperties": false
              },
              "description": "Extra directories mounted read-only into the sandbox, e.g. a package cache. Read from your global and managed config only, never a repository's. Your home directory itself, /, SSH keys and container runtime sockets are refused"
            },
            "on_finish": {
              "type": "string",
              "enum": [
                "destroy",
                "retain",
                "destroy_on_success"
              ],
              "description": "What happens once the results are back on the host: \"destroy\" (default) removes the container and its volume, \"retain\" stops it so `lunos sandbox attach` can reopen it, \"destroy_on_success\" keeps it only when the task failed. --keep and --rm override it for one run. A failed handoff always retains"
            },
            "retain_for": {
              "pattern": "^\\d+[mhd]$",
              "type": "string",
              "description": "How long a retained sandbox is kept, e.g. \"72h\", \"30m\" or \"7d\". Once it has expired, `lunos sandbox prune` removes it, and so does the next sandboxed run or `lunos sandbox` command. Unset: kept until destroyed"
            },
            "network": {
              "type": "string",
              "enum": [
                "policy",
                "none",
                "open"
              ],
              "description": "What the sandbox can reach. \"policy\" (default): only the model endpoints the residency policy allows, remote MCP servers, the npm registry and sandbox.allow, enforced by an egress proxy outside the container. \"none\": nothing. \"open\": anything this machine can reach (a warning is shown). A repository's config can only make it stricter"
            },
            "allow": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Extra hosts the sandbox may reach under network \"policy\", as \"host\" (port 443) or \"host:port\". Read from your global and managed config only, never a repository's"
            },
            "results": {
              "type": "string",
              "enum": [
                "branch",
                "patch",
                "none"
              ],
              "description": "How the agent's changes come back: \"branch\" (default) as branch lunos/sandbox/<id>, \"patch\" as .opencode/sandbox/<id>/changes.patch (only the agent's changes, for `git apply`), \"none\" not at all. The transcript and summary always come back"
            },
            "runtime": {
              "type": "string",
              "enum": [
                "docker",
                "podman"
              ],
              "description": "The container runtime. Unset: Docker if it's available, else Podman"
            },
            "resources": {
              "type": "object",
              "properties": {
                "cpus": {
                  "exclusiveMinimum": 0,
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "string",
                      "enum": [
                        "NaN"
                      ]
                    },
                    {
                      "type": "string",
                      "enum": [
                        "Infinity"
                      ]
                    },
                    {
                      "type": "string",
                      "enum": [
                        "-Infinity"
                      ]
                    }
                  ],
                  "description": "CPUs the sandbox may use (docker --cpus). Default 2"
                },
                "memory": {
                  "type": "string",
                  "description": "Memory limit (docker --memory), e.g. \"4g\". Default \"4g\""
                },
                "pids": {
                  "exclusiveMinimum": 0,
                  "type": "integer",
                  "maximum": 9007199254740991,
                  "description": "Most processes the sandbox may run at once (docker --pids-limit). Default 512"
                },
                "tmp": {
                  "type": "string",
                  "description": "Size of the in-memory /tmp (the only writable path besides the workspace), e.g. \"1g\". Default \"1g\""
                }
              },
              "additionalProperties": false,
              "description": "CPU, memory, process and /tmp limits for the sandbox container"
            }
          },
          "additionalProperties": false,
          "description": "Sandboxed runs: the Lunos server and everything it spawns run in a Docker container"
        },
        "residency": {
          "$ref": "#/$defs/ConfigV2.Residency",
          "description": "Data-residency policy restricting which provider jurisdictions this deployment may use, with an audit log of outbound model calls"
        },
        "references": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "$ref": "#/$defs/ConfigV2.Reference.Git"
              },
              {
                "$ref": "#/$defs/ConfigV2.Reference.Local"
              }
            ]
          },
          "description": "Named git or local directory references"
        },
        "reference": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "$ref": "#/$defs/ConfigV2.Reference.Git"
              },
              {
                "$ref": "#/$defs/ConfigV2.Reference.Local"
              }
            ]
          },
          "description": "@deprecated Use 'references' field instead. Named git or local directory references"
        },
        "watcher": {
          "type": "object",
          "properties": {
            "ignore": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "additionalProperties": false
        },
        "snapshot": {
          "type": "boolean",
          "description": "Enable or disable snapshot tracking. When false, filesystem snapshots are not recorded and undoing or reverting will not undo/redo file changes. Defaults to true."
        },
        "plugin": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "prefixItems": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "object"
                  }
                ],
                "maxItems": 2,
                "minItems": 2
              }
            ]
          }
        },
        "share": {
          "type": "string",
          "enum": [
            "manual",
            "auto",
            "disabled"
          ],
          "description": "Control sharing behavior:'manual' allows manual sharing via commands, 'auto' enables automatic sharing, 'disabled' disables all sharing"
        },
        "autoshare": {
          "type": "boolean",
          "description": "@deprecated Use 'share' field instead. Share newly created sessions automatically"
        },
        "autoupdate": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "string",
              "enum": [
                "notify"
              ]
            }
          ],
          "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
        },
        "disabled_providers": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Disable providers that are loaded automatically"
        },
        "enabled_providers": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "When set, ONLY these providers will be enabled. All other providers will be ignored"
        },
        "model": {
          "type": "string",
          "description": "Model to use in the format of provider/model, eg anthropic/claude-2",
          "$ref": "https://models.dev/model-schema.json#/$defs/Model"
        },
        "small_model": {
          "type": "string",
          "description": "Small model to use for tasks like title generation in the format of provider/model",
          "$ref": "https://models.dev/model-schema.json#/$defs/Model"
        },
        "default_agent": {
          "type": "string",
          "description": "Default agent to use when none is specified. Must be a primary agent. Falls back to 'build' if not set or if the specified agent is invalid."
        },
        "subagent": {
          "$ref": "#/$defs/SubagentConfig",
          "description": "How subagents choose their model: inherit, small_model, a fixed model, or per task"
        },
        "subagent_depth": {
          "minimum": 0,
          "type": "integer",
          "maximum": 9007199254740991,
          "description": "Maximum subagent nesting depth. Defaults to 1, which prevents subagents from launching subagents."
        },
        "username": {
          "type": "string",
          "description": "Custom username to display in conversations instead of system username"
        },
        "mode": {
          "type": "object",
          "properties": {
            "build": {
              "$ref": "#/$defs/AgentConfig"
            },
            "plan": {
              "$ref": "#/$defs/AgentConfig"
            }
          },
          "additionalProperties": {
            "$ref": "#/$defs/AgentConfig"
          },
          "description": "@deprecated Use `agent` field instead."
        },
        "agent": {
          "type": "object",
          "properties": {
            "plan": {
              "$ref": "#/$defs/AgentConfig"
            },
            "build": {
              "$ref": "#/$defs/AgentConfig"
            },
            "general": {
              "$ref": "#/$defs/AgentConfig"
            },
            "explore": {
              "$ref": "#/$defs/AgentConfig"
            },
            "title": {
              "$ref": "#/$defs/AgentConfig"
            },
            "summary": {
              "$ref": "#/$defs/AgentConfig"
            },
            "compaction": {
              "$ref": "#/$defs/AgentConfig"
            }
          },
          "additionalProperties": {
            "$ref": "#/$defs/AgentConfig"
          },
          "description": "Agent configuration, see https://docs.lunos.tech/docs/agents/"
        },
        "provider": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/ProviderConfig"
          },
          "description": "Custom provider configurations and model overrides"
        },
        "mcp": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "$ref": "#/$defs/McpLocalConfig"
                  },
                  {
                    "$ref": "#/$defs/McpRemoteConfig"
                  }
                ]
              },
              {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "enabled"
                ],
                "additionalProperties": false
              }
            ]
          },
          "description": "MCP (Model Context Protocol) server configurations"
        },
        "formatter": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "object",
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "disabled": {
                    "type": "boolean"
                  },
                  "command": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "environment": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "extensions": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": false
              }
            }
          ],
          "description": "Enable or configure formatters. Omit or set to false to disable, true to enable built-ins, or an object to enable built-ins with overrides."
        },
        "lsp": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "object",
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "disabled": {
                        "type": "boolean",
                        "enum": [
                          true
                        ]
                      }
                    },
                    "required": [
                      "disabled"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "command": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "extensions": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "disabled": {
                        "type": "boolean"
                      },
                      "env": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "string"
                        }
                      },
                      "initialization": {
                        "type": "object"
                      }
                    },
                    "required": [
                      "command"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          ],
          "description": "Enable or configure LSP servers. Omit or set to false to disable, true to enable built-ins, or an object to enable built-ins with overrides."
        },
        "instructions": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Additional instruction files or patterns to include"
        },
        "layout": {
          "$ref": "#/$defs/LayoutConfig",
          "description": "@deprecated Always uses stretch layout."
        },
        "permission": {
          "$ref": "#/$defs/PermissionConfig"
        },
        "tools": {
          "type": "object",
          "additionalProperties": {
            "type": "boolean"
          }
        },
        "attachment": {
          "$ref": "#/$defs/AttachmentConfig",
          "description": "Attachment processing configuration, including image size limits and resizing behavior"
        },
        "marketplace": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Marketplace sources (manifest URL, owner/repo or path) to list and install from"
        },
        "marketplace_default": {
          "type": "boolean",
          "description": "Whether the built-in lunos-community marketplace is used (default: true)"
        },
        "marketplace_unreviewed": {
          "type": "boolean",
          "description": "Organisation policy: false forbids installing marketplace entries that aren't verified (--allow-unreviewed), when locked in managed config"
        },
        "marketplace_allow": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Organisation policy: the only marketplace sources that may be listed and installed from, when locked in managed config"
        },
        "enterprise": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "description": "Enterprise URL"
            }
          },
          "additionalProperties": false
        },
        "tool_output": {
          "type": "object",
          "properties": {
            "max_lines": {
              "exclusiveMinimum": 0,
              "type": "integer",
              "maximum": 9007199254740991,
              "description": "Maximum lines of tool output before it is truncated and saved to disk (default: 2000)"
            },
            "max_bytes": {
              "exclusiveMinimum": 0,
              "type": "integer",
              "maximum": 9007199254740991,
              "description": "Maximum bytes of tool output before it is truncated and saved to disk (default: 51200)"
            }
          },
          "additionalProperties": false,
          "description": "Thresholds for truncating tool output. When output exceeds either limit, the full text is written to the truncation directory and a preview is returned."
        },
        "compaction": {
          "type": "object",
          "properties": {
            "auto": {
              "type": "boolean",
              "description": "Enable automatic compaction when context is full (default: true)"
            },
            "prune": {
              "type": "boolean",
              "description": "Enable pruning of old tool outputs (default: false)"
            },
            "tail_turns": {
              "minimum": 0,
              "type": "integer",
              "maximum": 9007199254740991,
              "description": "Maximum number of recent user turns, including their following assistant/tool responses, to keep verbatim during compaction. By default retention is limited only by the preserved token budget."
            },
            "preserve_recent_tokens": {
              "minimum": 0,
              "type": "integer",
              "maximum": 9007199254740991,
              "description": "Maximum number of tokens from recent turns to preserve verbatim after compaction"
            },
            "reserved": {
              "minimum": 0,
              "type": "integer",
              "maximum": 9007199254740991,
              "description": "Token buffer for compaction. Leaves enough window to avoid overflow during compaction."
            }
          },
          "additionalProperties": false
        },
        "experimental": {
          "type": "object",
          "properties": {
            "disable_paste_summary": {
              "type": "boolean"
            },
            "batch_tool": {
              "type": "boolean",
              "description": "Enable the batch tool"
            },
            "openTelemetry": {
              "type": "boolean",
              "description": "Enable OpenTelemetry spans for AI SDK calls (using the 'experimental_telemetry' flag)"
            },
            "primary_tools": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Tools that should only be available to primary agents."
            },
            "continue_loop_on_deny": {
              "type": "boolean",
              "description": "Continue the agent loop when a tool call is denied"
            },
            "mcp_timeout": {
              "exclusiveMinimum": 0,
              "type": "integer",
              "maximum": 9007199254740991,
              "description": "Timeout in milliseconds for model context protocol (MCP) requests"
            },
            "policies": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/ConfigV2.Experimental.Policy"
              },
              "description": "Policy statements applied to supported resources, such as provider access"
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    }
  },
  "allowComments": true,
  "allowTrailingCommas": true,
  "$id": "https://lunos.tech/config.json"
}
