{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "appearance": {
      "default": {
        "preview": {
          "autoOpen": true
        }
      },
      "type": "object",
      "properties": {
        "theme": {
          "type": "string",
          "enum": [
            "light",
            "dark",
            "system"
          ],
          "scope": "user",
          "agentSettable": false,
          "reload": "live",
          "defaultScope": "user",
          "description": "Editor color theme: 'light', 'dark', or 'system' (follow the OS). A personal preference (user scope) — not shared with the project."
        },
        "language": {
          "type": "string",
          "enum": [
            "system",
            "en",
            "zh-Hans",
            "zh-Hant",
            "hi",
            "es",
            "ar",
            "fr",
            "bn",
            "pt-BR",
            "id",
            "ur",
            "ko"
          ],
          "scope": "user",
          "agentSettable": false,
          "reload": "live",
          "defaultScope": "user",
          "description": "Interface language. 'system' follows the operating system. A personal preference (user scope) — not shared with the project, and never applied to document content."
        },
        "colorThemeLight": {
          "type": "string",
          "pattern": "^[a-z0-9-]{1,32}$",
          "scope": "user",
          "agentSettable": false,
          "reload": "live",
          "defaultScope": "user",
          "description": "IDE color palette applied in light mode: 'default' (no palette), 'custom' (your own colors from appearance.customTheme), one of 'dracula', 'catppuccin-frappe', 'catppuccin-latte', 'monokai', 'gruvbox', 'solarized', or the id of a saved theme. A short id of lowercase letters, digits, and hyphens (max 32 characters); an id no palette matches falls back to 'default' for this mode only, leaving the rest of your config untouched. A personal preference (user scope) — not shared with the project."
        },
        "colorThemeDark": {
          "type": "string",
          "pattern": "^[a-z0-9-]{1,32}$",
          "scope": "user",
          "agentSettable": false,
          "reload": "live",
          "defaultScope": "user",
          "description": "IDE color palette applied in dark mode: 'default' (no palette), 'custom' (your own colors from appearance.customTheme), one of 'dracula', 'catppuccin-frappe', 'catppuccin-latte', 'monokai', 'gruvbox', 'solarized', or the id of a saved theme. A short id of lowercase letters, digits, and hyphens (max 32 characters); an id no palette matches falls back to 'default' for this mode only, leaving the rest of your config untouched. A personal preference (user scope) — not shared with the project."
        },
        "colorTheme": {
          "type": "string",
          "pattern": "^[a-z0-9-]{1,32}$",
          "scope": "user",
          "agentSettable": false,
          "reload": "live",
          "defaultScope": "user",
          "description": "Superseded by appearance.colorThemeLight / appearance.colorThemeDark. Read as the palette for both modes while neither of those is set. A short theme id (lowercase letters, digits, and hyphens; max 32 characters); an id no palette matches falls back to 'default'. A personal preference (user scope) — not shared with the project."
        },
        "colorThemeEnabled": {
          "type": "boolean",
          "scope": "user",
          "agentSettable": false,
          "reload": "live",
          "defaultScope": "user",
          "description": "Whether the Themes plugin appears in Settings → Plugins. A personal preference (user scope). Default on."
        },
        "customTheme": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "scope": "user",
              "agentSettable": false,
              "reload": "live",
              "defaultScope": "user",
              "description": "Custom theme: the scheme's display name."
            },
            "author": {
              "type": "string",
              "scope": "user",
              "agentSettable": false,
              "reload": "live",
              "defaultScope": "user",
              "description": "Custom theme: the scheme's author credit, carried through from an imported base16 scheme."
            },
            "variant": {
              "type": "string",
              "enum": [
                "dark",
                "light"
              ],
              "scope": "user",
              "agentSettable": false,
              "reload": "live",
              "defaultScope": "user",
              "description": "Custom theme: whether the scheme is 'dark' or 'light'. Auto-detected from the palette when omitted."
            },
            "base00": {
              "type": "string",
              "scope": "user",
              "agentSettable": false,
              "reload": "live",
              "defaultScope": "user",
              "description": "Custom theme: base16 base00 — default background, as a #rrggbb hex string."
            },
            "base01": {
              "type": "string",
              "scope": "user",
              "agentSettable": false,
              "reload": "live",
              "defaultScope": "user",
              "description": "Custom theme: base16 base01 — alt background — cards, popovers, sidebar, as a #rrggbb hex string."
            },
            "base02": {
              "type": "string",
              "scope": "user",
              "agentSettable": false,
              "reload": "live",
              "defaultScope": "user",
              "description": "Custom theme: base16 base02 — selection background, borders, as a #rrggbb hex string."
            },
            "base03": {
              "type": "string",
              "scope": "user",
              "agentSettable": false,
              "reload": "live",
              "defaultScope": "user",
              "description": "Custom theme: base16 base03 — comments, invisibles, as a #rrggbb hex string."
            },
            "base04": {
              "type": "string",
              "scope": "user",
              "agentSettable": false,
              "reload": "live",
              "defaultScope": "user",
              "description": "Custom theme: base16 base04 — secondary text, as a #rrggbb hex string."
            },
            "base05": {
              "type": "string",
              "scope": "user",
              "agentSettable": false,
              "reload": "live",
              "defaultScope": "user",
              "description": "Custom theme: base16 base05 — default foreground, as a #rrggbb hex string."
            },
            "base06": {
              "type": "string",
              "scope": "user",
              "agentSettable": false,
              "reload": "live",
              "defaultScope": "user",
              "description": "Custom theme: base16 base06 — light foreground, as a #rrggbb hex string."
            },
            "base07": {
              "type": "string",
              "scope": "user",
              "agentSettable": false,
              "reload": "live",
              "defaultScope": "user",
              "description": "Custom theme: base16 base07 — lightest foreground, as a #rrggbb hex string."
            },
            "base08": {
              "type": "string",
              "scope": "user",
              "agentSettable": false,
              "reload": "live",
              "defaultScope": "user",
              "description": "Custom theme: base16 base08 — red — variables, tags, diff deleted, as a #rrggbb hex string."
            },
            "base09": {
              "type": "string",
              "scope": "user",
              "agentSettable": false,
              "reload": "live",
              "defaultScope": "user",
              "description": "Custom theme: base16 base09 — orange — numbers, constants, as a #rrggbb hex string."
            },
            "base0A": {
              "type": "string",
              "scope": "user",
              "agentSettable": false,
              "reload": "live",
              "defaultScope": "user",
              "description": "Custom theme: base16 base0A — yellow — classes, search highlight, as a #rrggbb hex string."
            },
            "base0B": {
              "type": "string",
              "scope": "user",
              "agentSettable": false,
              "reload": "live",
              "defaultScope": "user",
              "description": "Custom theme: base16 base0B — green — strings, diff inserted, as a #rrggbb hex string."
            },
            "base0C": {
              "type": "string",
              "scope": "user",
              "agentSettable": false,
              "reload": "live",
              "defaultScope": "user",
              "description": "Custom theme: base16 base0C — cyan — support, escapes, quotes, as a #rrggbb hex string."
            },
            "base0D": {
              "type": "string",
              "scope": "user",
              "agentSettable": false,
              "reload": "live",
              "defaultScope": "user",
              "description": "Custom theme: base16 base0D — blue — functions, headings, accent, as a #rrggbb hex string."
            },
            "base0E": {
              "type": "string",
              "scope": "user",
              "agentSettable": false,
              "reload": "live",
              "defaultScope": "user",
              "description": "Custom theme: base16 base0E — magenta — keywords, storage, as a #rrggbb hex string."
            },
            "base0F": {
              "type": "string",
              "scope": "user",
              "agentSettable": false,
              "reload": "live",
              "defaultScope": "user",
              "description": "Custom theme: base16 base0F — deprecated markers, embedded tags, as a #rrggbb hex string."
            }
          },
          "additionalProperties": {}
        },
        "preview": {
          "default": {
            "autoOpen": true
          },
          "type": "object",
          "properties": {
            "autoOpen": {
              "default": true,
              "type": "boolean",
              "scope": "user",
              "agentSettable": false,
              "reload": "live",
              "defaultScope": "user",
              "description": "When on, the agent opens or refreshes the live preview after each edit. Turn off if you manage your own preview window. A personal preference (user scope)."
            }
          },
          "additionalProperties": {}
        },
        "sidebar": {
          "type": "object",
          "properties": {
            "pinnedGlobalSkills": {
              "default": [],
              "type": "array",
              "items": {
                "type": "string"
              },
              "scope": "user",
              "agentSettable": false,
              "reload": "live",
              "defaultScope": "user",
              "description": "Global-scope skills pinned to the top of the Skills sidebar, by name. Stored per USER rather than per project, so a pinned global skill follows you into every project."
            }
          },
          "additionalProperties": {}
        }
      },
      "additionalProperties": {}
    },
    "editor": {
      "default": {
        "wordWrap": true,
        "previewTabs": true
      },
      "type": "object",
      "properties": {
        "wordWrap": {
          "default": true,
          "type": "boolean",
          "scope": "user",
          "agentSettable": false,
          "reload": "live",
          "defaultScope": "user",
          "description": "Soft-wrap long lines in the source (CodeMirror) editor. A personal preference (user scope)."
        },
        "previewTabs": {
          "default": true,
          "type": "boolean",
          "scope": "user",
          "agentSettable": false,
          "reload": "live",
          "defaultScope": "user",
          "description": "Reuse one tab when clicking through the Files and Skills sidebars, the way an editor preview tab works. Turn off to open every click in its own tab. Pinned tabs keep their own tab either way. A personal preference (user scope)."
        }
      },
      "additionalProperties": {}
    },
    "agents": {
      "default": {
        "autoApproveOkTools": true
      },
      "type": "object",
      "properties": {
        "autoApproveOkTools": {
          "default": true,
          "type": "boolean",
          "scope": "user",
          "agentSettable": false,
          "reload": "live",
          "defaultScope": "user",
          "description": "Auto-approve OpenKnowledge's own tools (and `ok open` on Claude) for agents launched from the built-in terminal. Destructive tools (delete/move/share/install) still prompt. Per-machine personal preference (user scope)."
        }
      },
      "additionalProperties": {}
    },
    "autoSync": {
      "default": {
        "mode": null,
        "enabled": null,
        "default": null
      },
      "type": "object",
      "properties": {
        "mode": {
          "default": null,
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "off",
                "follow",
                "full",
                "pull"
              ],
              "scope": "project-local",
              "agentSettable": false,
              "reload": "live",
              "defaultScope": "project-local",
              "description": "How this machine syncs this project with its git remote: 'off' (no sync), 'follow' (one-directional — pull remote changes, never push your own; 'pull' is accepted as a legacy alias), or 'full' (bidirectional pull and push). null = not chosen yet (onboarding asks). Per-machine (project-local) — not shared. Supersedes the legacy autoSync.enabled boolean."
            },
            {
              "type": "null"
            }
          ]
        },
        "enabled": {
          "default": null,
          "anyOf": [
            {
              "type": "boolean",
              "scope": "project-local",
              "agentSettable": false,
              "reload": "live",
              "defaultScope": "project-local",
              "description": "Legacy per-machine sync toggle, superseded by autoSync.mode. Read only when mode is absent (true = full, false = off). null = not chosen yet. Per-machine (project-local) — not shared."
            },
            {
              "type": "null"
            }
          ]
        },
        "default": {
          "default": null,
          "anyOf": [
            {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "string",
                  "enum": [
                    "off",
                    "follow",
                    "full",
                    "pull"
                  ]
                }
              ],
              "scope": "project",
              "agentSettable": false,
              "reload": "live",
              "defaultScope": "project",
              "description": "Committed project default for a machine's sync mode on first open: 'off' | 'follow' | 'full', or the legacy boolean (true = full, false = off). null = ask (show the onboarding prompt). Shared via git. A per-machine autoSync.mode choice overrides it."
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": {}
    },
    "terminal": {
      "default": {
        "enabled": null
      },
      "type": "object",
      "properties": {
        "enabled": {
          "default": null,
          "anyOf": [
            {
              "type": "boolean",
              "scope": "project-local",
              "agentSettable": false,
              "reload": "live",
              "defaultScope": "project-local",
              "description": "Opt-out for the in-app terminal (a real OS shell at full user privilege). The terminal is on by default; set false to disable it for this project on this machine. Per-machine (project-local) — never shared via git, clone, or sync."
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": {}
    },
    "slides": {
      "default": {
        "enabled": false
      },
      "type": "object",
      "properties": {
        "enabled": {
          "default": false,
          "type": "boolean",
          "scope": "user",
          "agentSettable": false,
          "reload": "live",
          "defaultScope": "user",
          "description": "Whether the Slides plugin appears in Settings → Plugins. When on, a document whose frontmatter has `slides: true` offers an action that opens the deck in a dedicated window (desktop only, requires a resolvable slidev). A personal preference (user scope). Default off."
        }
      },
      "additionalProperties": {}
    },
    "telemetry": {
      "default": {
        "localSink": {
          "enabled": true,
          "spans": {
            "maxBytes": 52428800
          },
          "logs": {
            "maxBytes": 26214400
          },
          "attributeDenylist": [
            "authorization",
            "auth.token",
            "auth.bearer",
            "cookie",
            "set-cookie",
            "x-api-key",
            "password",
            "secret"
          ]
        },
        "skillInstallReports": {
          "enabled": true
        }
      },
      "type": "object",
      "properties": {
        "skillInstallReports": {
          "default": {
            "enabled": true
          },
          "type": "object",
          "properties": {
            "enabled": {
              "default": true,
              "type": "boolean",
              "scope": "user",
              "agentSettable": false,
              "reload": "live",
              "defaultScope": "user",
              "description": "Report skill installs to skills.sh so a published skill shows an accurate install count. Sends the skill name, its source repo, and which agent tools it was installed for — never file contents, and never for a private or local source. One report per skill per machine. Default on; the DO_NOT_TRACK and DISABLE_TELEMETRY environment variables also turn it off."
            }
          },
          "additionalProperties": {}
        }
      },
      "additionalProperties": {}
    }
  },
  "additionalProperties": {}
}
