Optionalauthor?: { email: string; name: string }Git commit author identity. Set per-repo during init.
Author email for git commits.
Author name for git commits.
Git branch name for VCS operations. SquashManager and startup recovery use this instead of dynamic detection.
Circuit breaker cooldown in ms. Once tripped, pending files are retained (re-queued, never discarded) and a single half-open recovery attempt is allowed once this cooldown elapses — without requiring a new file-change event.
OptionalcommitMessage?: { apiKey?: string; enabled: boolean; model: string; provider: string }Commit message generation configuration.
OptionalapiKey?: stringAPI key for commit message provider. Supports env var substitution.
Whether AI-generated commit messages are enabled.
AI model for commit message generation.
AI provider for commit message generation.
Throttle interval in milliseconds for batching commits.
OptionaldefaultAccessToken?: stringDefault git access token for all roots. Supports env var substitution.
Whether VCS is enabled globally.
Maximum number of files per commit batch.
Circuit breaker: trip after this many consecutive commit failures.
Optionalretention?: { maxAgeDays: number; maxVersions: number; squashCron: string }Retention policy configuration.
Maximum age in days for retained versions.
Maximum number of versions to retain per file.
Cron expression for squash schedule.
Age in ms after which an index.lock is considered stale and force-removed.
OptionalcommitMessageGenerator: CommitMessageGeneratorOptionalremoteUrl: stringOptionalaccessToken: stringReadonlyconfigOptionalauthor?: { email: string; name: string }Git commit author identity. Set per-repo during init.
Author email for git commits.
Author name for git commits.
Git branch name for VCS operations. SquashManager and startup recovery use this instead of dynamic detection.
Circuit breaker cooldown in ms. Once tripped, pending files are retained (re-queued, never discarded) and a single half-open recovery attempt is allowed once this cooldown elapses — without requiring a new file-change event.
OptionalcommitMessage?: { apiKey?: string; enabled: boolean; model: string; provider: string }Commit message generation configuration.
OptionalapiKey?: stringAPI key for commit message provider. Supports env var substitution.
Whether AI-generated commit messages are enabled.
AI model for commit message generation.
AI provider for commit message generation.
Throttle interval in milliseconds for batching commits.
OptionaldefaultAccessToken?: stringDefault git access token for all roots. Supports env var substitution.
Whether VCS is enabled globally.
Maximum number of files per commit batch.
Circuit breaker: trip after this many consecutive commit failures.
Optionalretention?: { maxAgeDays: number; maxVersions: number; squashCron: string }Retention policy configuration.
Maximum age in days for retained versions.
Maximum number of versions to retain per file.
Cron expression for squash schedule.
Age in ms after which an index.lock is considered stale and force-removed.
ReadonlyremoteReadonlyrootCurrent circuit breaker state and backlog, for /vcs/status.
Record reversion metadata so the next commit uses a revert-prefixed message.
The reversion metadata to record.
Signal that the initial filesystem scan is complete. Clears the baseline flag so subsequent commits use normal "watcher: batch" messages.
Add a file to the pending set and start the throttle timer. If the pending set reaches maxBatchSize, commit a batch immediately.
The circuit breaker is intentionally not reset here: recovery is time-based, so a busy root cannot hammer a deterministic failure.
Absolute path of the changed file.
Commit all pending files now, in batches of at most maxBatchSize.
Queue a deleted file. Staging records the deletion if git tracks it.
Absolute path of the deleted file.
Pause the commit pipeline. Drains pending commits via flush(), then sets a flag that makes commitBatch queue instead of execute. Used by SquashManager to coordinate squash operations.
Add tracked-but-deleted paths (git ls-files --deleted) in this
manager's watch scope to pending, so the next commit (typically the
baseline) records deletions that happened while nothing was watching.
Called by the coordinator before flush/endBaseline on startup. See #249.
Returns true if the absolute path routes to this manager (the coordinator's routing and watch-scope logic).
Resume the commit pipeline after a pause. Re-enables normal commit operations and starts a throttle timer if there are pending files that accumulated during the pause.
Begin accepting file changes. Sets the manager to started state and starts the squash manager if configured.
Performs startup orphan detection/recovery before starting the squash manager, ensuring the repo is on the configured branch, and reports (never clears) an abandoned cherry-pick, rebase, or merge.
Baseline mode (commit prefix "baseline:") remains active until
endBaseline is called by the coordinator after the initial scan.
Stop accepting file changes, flush pending, and clean up timers.
Per-root VCS manager for git-backed content versioning.
Each VCS-enabled watch root gets its own VcsManager instance, which owns a throttled commit pipeline: file changes are batched, staged, committed (with optional AI-generated messages), and optionally pushed to a remote.
Concurrency: only one commit is in-flight at a time per root. Index.lock contention is handled with exponential backoff retries (D10). Failed batches are always retained; a circuit breaker spaces out retries of a persistently failing root (#249).