{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/5cover/leanprint/main/packages/work/src/schemas/SourceConfig.json", "title": "SourceConfig", "description": "Configures optional workflow settings and the language transformations used for formatting and statistics.", "allOf": [{ "$ref": "#/$defs/config" }, { "not": { "type": "object", "required": ["workspace"] } }], "$defs": { "config": { "type": "object", "properties": { "$schema": { "type": "string", "description": "JSON Schema URL used by editors." }, "leandir": { "type": "string", "minLength": 1, "description": "Leandir path, resolved relative to this config file's directory.", "examples": ["../project.lean", "/tmp/project.lean"] }, "languages": { "description": "Enabled language domains and their settings. When omitted or empty, every registered language is enabled with its defaults.", "type": "object", "default": {}, "additionalProperties": { "type": "object" }, "properties": { "ecmascript": { "$ref": "../../../leanprint/src/ecmascript/EcmascriptConfig.json" }, "json": { "$ref": "../../../leanprint/src/json/JsonConfig.json" } } }, "ignore": { "description": "Gitignore-compatible rules applied after ignoreFile rules. Paths are source-root-relative and use forward slashes.", "type": "array", "items": { "type": "string" }, "examples": [[".git/", "node_modules/", "!vendor/kept.js"]] }, "ignoreFile": { "description": "One or more gitignore-compatible files. Relative paths are resolved from this config file; files are loaded in array order.", "oneOf": [ { "type": "string", "minLength": 1 }, { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } } ], "examples": [".gitignore", [".gitignore", ".leanprintignore"]] }, "humanFormatter": { "description": "Formatter used when pulling supported AI-edited source. Type one uses stdin/stdout for one file per process; type all runs once and edits all supplied leandir files in place. Processes run in the source root with shell:false.", "type": "object", "required": ["command"], "properties": { "type": { "type": "string", "enum": ["one", "all"], "default": "one", "description": "Whether to format one file through stdin/stdout or all changed files in place with one process." }, "command": { "type": "string", "minLength": 1, "description": "Executable name or path; it is invoked directly with shell:false.", "examples": ["pnpm"] }, "args": { "type": "array", "items": { "type": "string" }, "default": [], "description": "Arguments passed directly to the formatter. A standalone {file} is required for type one; a standalone {files} is required for type all and expands to separate argv entries.", "examples": [["exec", "prettier", "--stdin-filepath", "{file}"]] } } } } } } }