{
	"$schema": "http://json-schema.org/draft-07/schema#",
	"type": "object",
	"properties": {
		"$schema": {
			"type": "string",
			"description": "Schema reference for editors, ignored."
		},
		"plugins": {
			"default": {},
			"type": "object",
			"propertyNames": {
				"type": "string"
			},
			"additionalProperties": {
				"anyOf": [
					{
						"type": "object",
						"properties": {
							"path": {
								"type": "string",
								"minLength": 1,
								"description": "Local plugin: a .ts or .js file relative to the repository root that exports a plugin of this name."
							},
							"package": {
								"type": "string",
								"pattern": "^(?:@[a-z0-9~-][a-z0-9._~-]*\\/)?[a-z0-9~-][a-z0-9._~-]*$",
								"description": "Plugin package resolved from the repository root's node_modules that exports a plugin of this name. Excludes path."
							}
						},
						"additionalProperties": {}
					},
					{
						"type": "null"
					}
				]
			},
			"description": "Enabled plugins and their options, run in the listed order. Only listed plugins run."
		},
		"defaults": {
			"type": "object",
			"properties": {
				"release": {
					"type": "boolean",
					"description": "Release all units unless a unit sets release: false. Default false."
				},
				"tagFormat": {
					"type": "string",
					"description": "Tag template. Defaults to {id}-v{version}, or v{version} for the root unit."
				},
				"propagate": {
					"type": "string",
					"enum": [
						"auto",
						"patch",
						"rebuild"
					],
					"description": "Policy for this unit when a dependency is released: patch (at least a patch bump), rebuild (rebuild only) or auto (patch if the edge is pinned, else rebuild)."
				},
				"initialVersion": {
					"type": "string",
					"description": "Version of the first release, parsed by the unit's scheme. Defaults to the scheme's initial version (semver: 1.0.0)."
				},
				"releasePr": {
					"type": "string",
					"enum": [
						"shared",
						"separate"
					],
					"description": "Release PR of every release item: shared (default) or separate."
				}
			},
			"additionalProperties": false,
			"description": "Defaults applied to every unit."
		},
		"units": {
			"type": "object",
			"propertyNames": {
				"type": "string"
			},
			"additionalProperties": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"description": "Unit id (letters, digits, dot, underscore, dash). Defaults to the discovered id, or the repo name for the root unit."
					},
					"include": {
						"description": "Globs of files owned by the unit. Replaces the default (the unit root).",
						"type": "array",
						"items": {
							"type": "string"
						}
					},
					"exclude": {
						"description": "Globs excluded from the unit, appended to the default (roots of nested units).",
						"type": "array",
						"items": {
							"type": "string"
						}
					},
					"release": {
						"type": "boolean",
						"description": "Whether the unit is versioned and tagged. Default false (build-only)."
					},
					"version": {
						"type": "string",
						"enum": [
							"file",
							"tag"
						],
						"description": "Where a released unit's version lives. file: version file written by the plugin. tag: git tags only. Defaults to the plugin's version source."
					},
					"scheme": {
						"type": "string",
						"description": "Versioning scheme. Defaults to semver."
					},
					"tagFormat": {
						"type": "string",
						"description": "Tag template. Defaults to {id}-v{version}, or v{version} for the root unit."
					},
					"propagate": {
						"type": "string",
						"enum": [
							"auto",
							"patch",
							"rebuild"
						],
						"description": "Policy for this unit when a dependency is released: patch (at least a patch bump), rebuild (rebuild only) or auto (patch if the edge is pinned, else rebuild)."
					},
					"tags": {
						"type": "array",
						"items": {
							"type": "string",
							"pattern": "^[A-Za-z0-9._-]+$"
						},
						"description": "Labels for filtering with affected --tag (letters, digits, dot, underscore, dash), for example docker or npm."
					},
					"initialVersion": {
						"type": "string",
						"description": "Version of the first release, parsed by the unit's scheme. Defaults to the scheme's initial version (semver: 1.0.0)."
					},
					"releasePr": {
						"type": "string",
						"enum": [
							"shared",
							"separate"
						],
						"description": "Release PR of this ungrouped unit; set it on the group for grouped units. Glob keys may set it. Defaults to defaults.releasePr."
					},
					"absorbedKinds": {
						"type": "array",
						"items": {
							"type": "string",
							"enum": [
								"runtime",
								"peer",
								"dev"
							]
						},
						"description": "Dependency kinds of this unit's own dependencies that count as part of it for absorption and propagation through unreleased units, for example runtime, peer and dev for a bundled app that ships its dev dependencies. Glob keys may set it. An empty list absorbs nothing. Defaults to bumps.absorbedKinds."
					},
					"versionFiles": {
						"type": "array",
						"items": {
							"type": "object",
							"properties": {
								"file": {
									"type": "string",
									"description": "File relative to the repository root."
								},
								"pattern": {
									"type": "string",
									"description": "Text holding the version, with {id}, {version}, {major}, {minor} and {patch}; needs a version token and literal text. Without pattern, the file uses version markers."
								}
							},
							"required": [
								"file"
							],
							"additionalProperties": false
						},
						"description": "Text files updated on release: matches of pattern rendering a version from the previous release up to the next are replaced with the next version. Without pattern, the first version on each line marked `# x-tallyrelease-version` or `<!-- x-tallyrelease-version -->` is replaced with the next version, also on a first release."
					},
					"buildNumber": {
						"type": "object",
						"properties": {
							"offset": {
								"type": "integer",
								"minimum": 0,
								"maximum": 9007199254740991,
								"description": "Added to the first-parent commit count. Default 0."
							}
						},
						"additionalProperties": false,
						"description": "Emits buildNumber in the release list of run --github-output: the first-parent commit count of the release sha plus offset. Never part of the version. An exact key replaces the whole value of a glob key."
					}
				},
				"additionalProperties": false
			},
			"description": "Unit overlays keyed by root path or glob. A root without a discovered unit becomes a config-only unit. In a glob key, * matches one path segment and skips dot directories; globs never create units, cannot set id, include, exclude or versionFiles, and exact keys win over them per field."
		},
		"deps": {
			"type": "array",
			"items": {
				"type": "object",
				"properties": {
					"from": {
						"type": "string",
						"description": "Id of the dependency."
					},
					"to": {
						"type": "string",
						"description": "Id of the dependent unit."
					},
					"pinned": {
						"type": "boolean",
						"description": "Whether the dependent pins an exact version."
					},
					"kind": {
						"type": "string",
						"enum": [
							"runtime",
							"peer",
							"dev"
						],
						"description": "Dependency kind: runtime (default), peer or dev."
					},
					"reason": {
						"type": "string",
						"description": "Why the edge exists."
					}
				},
				"required": [
					"from",
					"to"
				],
				"additionalProperties": false
			},
			"description": "Extra dependency edges between units."
		},
		"ignore": {
			"description": "Globs of files that never affect any unit, for example docs.",
			"type": "array",
			"items": {
				"type": "string"
			}
		},
		"globalInputs": {
			"description": "Globs of files whose change affects all units, unioned with plugin defaults.",
			"type": "array",
			"items": {
				"type": "string"
			}
		},
		"attribution": {
			"type": "object",
			"properties": {
				"mode": {
					"type": "string",
					"enum": [
						"paths",
						"narrow"
					],
					"description": "paths (default) adds the units mapped by a commit's scope to the owners of its files. narrow attributes a scoped commit only to its mapped units, in the release set and the build set, so it can leave out the owners of files that really changed, including unreleased dependencies."
				},
				"scopes": {
					"type": "object",
					"propertyNames": {
						"type": "string",
						"pattern": "^[^\\s(),]+$"
					},
					"additionalProperties": {
						"minItems": 1,
						"type": "array",
						"items": {
							"type": "string",
							"pattern": "^(?!\\.\\.?$)[A-Za-z0-9._-]+$"
						}
					},
					"description": "Conventional commit scope to unit ids. The header scope is split on commas and each part is trimmed; a commit maps to the union of its mapped parts, and a commit without a mapped part is attributed by path. Matching is exact and case-sensitive."
				}
			},
			"additionalProperties": false,
			"description": "Attribution of conventional commits to units by their header scope."
		},
		"branches": {
			"type": "array",
			"items": {
				"type": "object",
				"properties": {
					"name": {
						"type": "string",
						"description": "Branch name pattern; supports * and the captures {major} and {minor}."
					},
					"line": {
						"type": "string",
						"enum": [
							"default",
							"maintenance"
						],
						"description": "Release line of matching branches."
					},
					"channel": {
						"type": "string",
						"description": "Deprecated alias of channels.build; cannot be set together with channels.build.",
						"deprecated": true
					},
					"channels": {
						"type": "object",
						"properties": {
							"build": {
								"type": "string",
								"description": "Build channel: labels the untagged prerelease version of every push."
							},
							"cut": {
								"type": "string",
								"description": "Cut channel: labels the tagged prereleases that prerelease PRs cut."
							},
							"nightly": {
								"type": "string",
								"description": "Nightly channel: labels the untagged prerelease version of scheduled runs and of runs selecting the nightly channel."
							}
						},
						"additionalProperties": false,
						"description": "Prerelease channels (letters, digits, dash); may use {major} and {minor} captured by name. Set at least one.",
						"minProperties": 1
					},
					"unit": {
						"type": "string",
						"description": "Maintenance rules: ungrouped released unit whose version must be on the line captured by name. Excludes group."
					},
					"group": {
						"type": "string",
						"description": "Maintenance rules: fixed group whose version must be on the line captured by name. Excludes unit."
					}
				},
				"required": [
					"name",
					"line"
				],
				"additionalProperties": false
			},
			"description": "Branch rules; the first rule matching the branch wins."
		},
		"bumps": {
			"type": "object",
			"properties": {
				"types": {
					"type": "object",
					"propertyNames": {
						"type": "string"
					},
					"additionalProperties": {
						"type": "string",
						"enum": [
							"major",
							"minor",
							"patch"
						]
					},
					"description": "Commit type to bump level, merged over feat: minor, fix: patch, perf: patch, revert: patch. Breaking changes bump major."
				},
				"preMajor": {
					"type": "object",
					"properties": {
						"breaking": {
							"type": "string",
							"enum": [
								"major",
								"minor",
								"patch"
							],
							"description": "Bump level for breaking changes. Default minor."
						},
						"feat": {
							"type": "string",
							"enum": [
								"major",
								"minor",
								"patch"
							],
							"description": "Bump level for feat. Default minor."
						}
					},
					"additionalProperties": false,
					"description": "Bump levels for breaking changes and feat while the major version is 0. Default minor for both."
				},
				"absorbed": {
					"type": "string",
					"enum": [
						"patch",
						"minor"
					],
					"description": "Level a released unit gets from bump-producing changes absorbed from unreleased dependencies: patch (default) or minor (feat and breaking give minor, fix gives patch)."
				},
				"absorbedKinds": {
					"type": "array",
					"items": {
						"type": "string",
						"enum": [
							"runtime",
							"peer",
							"dev"
						]
					},
					"description": "Dependency kinds that count as part of a unit for absorption and propagation through unreleased units. Default runtime and peer; an empty list absorbs nothing. units.<root>.absorbedKinds overrides it per unit."
				}
			},
			"additionalProperties": false,
			"description": "How commits map to bump levels."
		},
		"groups": {
			"type": "object",
			"propertyNames": {
				"type": "string",
				"pattern": "^(?!\\.\\.?$)[A-Za-z0-9._-]+$"
			},
			"additionalProperties": {
				"anyOf": [
					{
						"type": "object",
						"properties": {
							"units": {
								"type": "array",
								"items": {
									"type": "string",
									"pattern": "^(?!\\.\\.?$)[A-Za-z0-9._-]+$"
								},
								"description": "Member unit ids."
							},
							"tags": {
								"type": "array",
								"items": {
									"type": "string"
								},
								"description": "Selects released units with any of these tags."
							},
							"releasePr": {
								"type": "string",
								"enum": [
									"shared",
									"separate"
								],
								"description": "Release PR of the release item: shared (one PR for all shared items) or separate (its own PR)."
							},
							"releaseTag": {
								"type": "string",
								"description": "Tag format of one GitHub release for the whole group, pushed at the release commit next to the member tags; tokens {id} (the group name) and {version}. Default: one release per member tag."
							},
							"tagFormat": {
								"type": "string",
								"description": "Tag format shared by all members in place of their own tags: one tag, and one GitHub release, per group version; tokens {id} (the group name) and {version}. Members keep their own tags as candidates, so the first release continues from the highest of them. Not for Go modules. Exclusive with releaseTag. Default: member tags."
							}
						},
						"required": [
							"units"
						],
						"additionalProperties": false
					},
					{
						"type": "object",
						"properties": {
							"units": {
								"type": "array",
								"items": {
									"type": "string",
									"pattern": "^(?!\\.\\.?$)[A-Za-z0-9._-]+$"
								},
								"description": "Member unit ids."
							},
							"tags": {
								"type": "array",
								"items": {
									"type": "string"
								},
								"description": "Selects released units with any of these tags."
							},
							"releasePr": {
								"type": "string",
								"enum": [
									"shared",
									"separate"
								],
								"description": "Release PR of the release item: shared (one PR for all shared items) or separate (its own PR)."
							},
							"releaseTag": {
								"type": "string",
								"description": "Tag format of one GitHub release for the whole group, pushed at the release commit next to the member tags; tokens {id} (the group name) and {version}. Default: one release per member tag."
							},
							"tagFormat": {
								"type": "string",
								"description": "Tag format shared by all members in place of their own tags: one tag, and one GitHub release, per group version; tokens {id} (the group name) and {version}. Members keep their own tags as candidates, so the first release continues from the highest of them. Not for Go modules. Exclusive with releaseTag. Default: member tags."
							}
						},
						"required": [
							"tags"
						],
						"additionalProperties": false
					}
				]
			},
			"description": "Fixed groups by name (unit id characters): members release together with one version. Each group needs units, tags or both.",
			"minProperties": 1
		},
		"tags": {
			"type": "object",
			"properties": {
				"floating": {
					"type": "array",
					"items": {
						"type": "string"
					},
					"description": "Floating tag formats moved to the highest stable release they render for; tokens {id}, {major} and {minor}."
				}
			},
			"additionalProperties": false,
			"description": "Tags beyond the version tag of each release."
		}
	},
	"additionalProperties": false,
	"$id": "https://cdn.jsdelivr.net/npm/@tallyrelease/cli@0/dist/tallyrelease.schema.json",
	"title": "tallyrelease.yaml"
}
