{
	"$schema": "http://json-schema.org/draft-07/schema#",
	"type": "object",
	"properties": {
		"$schema": {
			"description": "The address of this file's JSON Schema, for editors.",
			"type": "string"
		},
		"defaultProject": {
			"description": "The project key used to scope results to the specificed project board when no explicit key is given. Local setting overrides the global one. An explicitly given key in a command overrides both.",
			"type": "string",
			"pattern": "^[A-Za-z][A-Za-z0-9]*$"
		},
		"busyTimeoutMs": {
			"description": "How many milliseconds a command waits for another Zinn process to finish writing before it fails as busy. 0 fails at once. Defaults to 30000. Local setting overrides the global one.",
			"type": "integer",
			"minimum": 0,
			"maximum": 2147483647
		},
		"storage": {
			"description": "Where Zinn keeps its data.",
			"type": "object",
			"properties": {
				"directory": {
					"type": "string",
					"description": "The Zinn directory, which holds data/zinn.sqlite and backups/. A relative path is relative to the folder of this file, and a leading ~ means your home folder. ZINN_DIR, when set, takes precedence."
				}
			},
			"required": ["directory"],
			"additionalProperties": false
		},
		"telemetry": {
			"description": "Whether Zinn records local usage measurements, how much space they may use and how long they are kept.",
			"type": "object",
			"properties": {
				"mode": {
					"description": "off collects nothing. local records command usage in the telemetry folder of the Zinn directory and sends nothing off this machine. Defaults to local, or to off when the DO_NOT_TRACK environment variable is 1. A value here overrides DO_NOT_TRACK.",
					"type": "string",
					"enum": ["off", "local"]
				},
				"maxMegabytes": {
					"description": "The total size of telemetry record files, in whole megabytes of 1,048,576 bytes. A run that starts a new file deletes the oldest ones to bring the total under this limit. Defaults to 100. Read only from the global settings file. zinn.local.json cannot set it.",
					"type": "integer",
					"exclusiveMinimum": 0,
					"maximum": 9007199254740991
				},
				"maxAgeDays": {
					"description": "How many days Zinn keeps telemetry records. Defaults to 90. Read only from the global settings file. zinn.local.json cannot set it.",
					"type": "integer",
					"exclusiveMinimum": 0,
					"maximum": 9007199254740991
				}
			},
			"additionalProperties": false
		},
		"hooks": {
			"description": "Commands Zinn runs after each saved change, one after another in the order listed. Read only from the global settings file. zinn.local.json cannot set them.",
			"type": "object",
			"propertyNames": {
				"type": "string",
				"minLength": 1
			},
			"additionalProperties": {
				"type": "object",
				"properties": {
					"command": {
						"type": "string",
						"minLength": 1,
						"description": "The command to run through the platform shell after each saved change. It gets the change's activity records on stdin, one JSON object per line."
					},
					"timeout": {
						"description": "Seconds the hook may run before it is stopped with a warning. Defaults to 30.",
						"type": "number",
						"exclusiveMinimum": 0
					}
				},
				"required": ["command"],
				"additionalProperties": false,
				"description": "One hook, named by its key."
			}
		}
	},
	"additionalProperties": false,
	"title": "Zinn settings"
}
