{ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "title": "SourcebotConfig", "definitions": { "Settings": { "type": "object", "description": "Defines the globabl settings for Sourcebot.", "properties": { "maxFileSize": { "type": "number", "description": "The maximum size of a file (in bytes) to be indexed. Files that exceed this maximum will not be indexed. Defaults to 2MB.", "minimum": 1 }, "maxTrigramCount": { "type": "number", "description": "The maximum number of trigrams per document. Files that exceed this maximum will not be indexed. Default to 20000.", "minimum": 1 }, "reindexIntervalMs": { "type": "number", "description": "The interval (in milliseconds) at which the indexer should re-index all repositories. Defaults to 1 hour.", "minimum": 1 }, "resyncConnectionIntervalMs": { "type": "number", "description": "The interval (in milliseconds) at which the connection manager should check for connections that need to be re-synced. Defaults to 24 hours.", "minimum": 1 }, "resyncConnectionPollingIntervalMs": { "type": "number", "description": "The polling rate (in milliseconds) at which the db should be checked for connections that need to be re-synced. Defaults to 1 second.", "minimum": 1 }, "reindexRepoPollingIntervalMs": { "type": "number", "description": "The polling rate (in milliseconds) at which the db should be checked for repos that should be re-indexed. Defaults to 1 second.", "minimum": 1 }, "maxConnectionSyncJobConcurrency": { "type": "number", "description": "The number of connection sync jobs to run concurrently. Defaults to 8.", "minimum": 1 }, "maxRepoIndexingJobConcurrency": { "type": "number", "description": "The number of repo indexing jobs to run concurrently. Defaults to 8.", "minimum": 1 }, "maxRepoGarbageCollectionJobConcurrency": { "type": "number", "description": "The number of repo GC jobs to run concurrently. Defaults to 8.", "minimum": 1 }, "repoGarbageCollectionGracePeriodMs": { "type": "number", "description": "The grace period (in milliseconds) for garbage collection. Used to prevent deleting shards while they're being loaded. Defaults to 10 seconds.", "minimum": 1 }, "repoIndexTimeoutMs": { "type": "number", "description": "The timeout (in milliseconds) for a repo indexing to timeout. Defaults to 2 hours.", "minimum": 1 } }, "additionalProperties": false }, "SearchContext": { "type": "object", "description": "Search context", "properties": { "include": { "type": "array", "description": "List of repositories to include in the search context. Expected to be formatted as a URL without any leading http(s):// prefix (e.g., 'github.com/sourcebot-dev/sourcebot'). Glob patterns are supported.", "items": { "type": "string" }, "examples": [ [ "github.com/sourcebot-dev/**", "gerrit.example.org/sub/path/**" ] ] }, "exclude": { "type": "array", "description": "List of repositories to exclude from the search context. Expected to be formatted as a URL without any leading http(s):// prefix (e.g., 'github.com/sourcebot-dev/sourcebot'). Glob patterns are supported.", "items": { "type": "string" }, "examples": [ [ "github.com/sourcebot-dev/sourcebot", "gerrit.example.org/sub/path/**" ] ] }, "description": { "type": "string", "description": "Optional description of the search context that surfaces in the UI." } }, "required": [ "include" ], "additionalProperties": false } }, "properties": { "$schema": { "type": "string" }, "settings": { "$ref": "#/definitions/Settings" }, "contexts": { "type": "object", "description": "[Sourcebot EE] Defines a collection of search contexts. This is only available in single-tenancy mode. See: https://docs.sourcebot.dev/self-hosting/more/search-contexts", "patternProperties": { "^[a-zA-Z0-9_-]+$": { "$ref": "#/definitions/SearchContext" } }, "additionalProperties": false }, "connections": { "type": "object", "description": "Defines a collection of connections from varying code hosts that Sourcebot should sync with. This is only available in single-tenancy mode.", "patternProperties": { "^[a-zA-Z0-9_-]+$": { "$ref": "./connection.json" } }, "additionalProperties": false } }, "additionalProperties": false }