jeeves-watcher
    Preparing search index...

    Per-root VCS manager: batches file changes and commits them under the root's RootGitLock; failed batches are always retained (#249).

    Index
    • Parameters

      • rootPath: string
      • config: {
            author?: { email: string; name: string };
            branch: string;
            circuitBreakerCooldownMs: number;
            commitMessage?: {
                apiKey?: string;
                enabled: boolean;
                model: string;
                provider: string;
            };
            commitThrottleMs: number;
            defaultAccessToken?: string;
            enabled: boolean;
            maxBatchSize: number;
            maxConsecutiveFailures: number;
            maxFileBytes?: string
            | number;
            retention?: { maxAgeDays: number; maxVersions: number; squashCron: string };
            staleLockThresholdMs: number;
        }
        • Optionalauthor?: { email: string; name: string }

          Git commit author identity. Set per-repo during init.

          • email: string

            Author email for git commits.

          • name: string

            Author name for git commits.

        • branch: string

          Git branch name for VCS operations. Squash and the startup branch check use this instead of dynamic detection.

        • circuitBreakerCooldownMs: number

          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?: string

            API key for commit message provider. Supports env var substitution.

          • enabled: boolean

            Whether AI-generated commit messages are enabled.

          • model: string

            AI model for commit message generation.

          • provider: string

            AI provider for commit message generation.

        • commitThrottleMs: number

          Throttle interval in milliseconds for batching commits.

        • OptionaldefaultAccessToken?: string

          Default git access token for all roots. Supports env var substitution.

        • enabled: boolean

          Whether VCS is enabled globally.

        • maxBatchSize: number

          Maximum number of files per commit batch.

        • maxConsecutiveFailures: number

          Circuit breaker: trip after this many consecutive commit failures.

        • OptionalmaxFileBytes?: string | number

          Size cap for versioned files (D80). A new file over it is not staged; a tracked file that grows past it is untracked in its own commit. 0 disables the cap. Read at each staging (no restart needed).

        • Optionalretention?: { maxAgeDays: number; maxVersions: number; squashCron: string }

          Retention policy configuration.

          • maxAgeDays: number

            Maximum age in days for retained versions.

          • maxVersions: number

            Maximum number of versions to retain per file.

          • squashCron: string

            Cron expression for squash schedule.

        • staleLockThresholdMs: number

          Age in ms after which an index.lock is considered stale and force-removed.

      • logger: Logger
      • OptionalcommitMessageGenerator: CommitMessageGenerator
      • OptionalremoteUrl: string
      • OptionalaccessToken: string
      • options: VcsManagerOptions = {}

      Returns VcsManager

    config: {
        author?: { email: string; name: string };
        branch: string;
        circuitBreakerCooldownMs: number;
        commitMessage?: {
            apiKey?: string;
            enabled: boolean;
            model: string;
            provider: string;
        };
        commitThrottleMs: number;
        defaultAccessToken?: string;
        enabled: boolean;
        maxBatchSize: number;
        maxConsecutiveFailures: number;
        maxFileBytes?: string
        | number;
        retention?: { maxAgeDays: number; maxVersions: number; squashCron: string };
        staleLockThresholdMs: number;
    }

    Type Declaration

    • Optionalauthor?: { email: string; name: string }

      Git commit author identity. Set per-repo during init.

      • email: string

        Author email for git commits.

      • name: string

        Author name for git commits.

    • branch: string

      Git branch name for VCS operations. Squash and the startup branch check use this instead of dynamic detection.

    • circuitBreakerCooldownMs: number

      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?: string

        API key for commit message provider. Supports env var substitution.

      • enabled: boolean

        Whether AI-generated commit messages are enabled.

      • model: string

        AI model for commit message generation.

      • provider: string

        AI provider for commit message generation.

    • commitThrottleMs: number

      Throttle interval in milliseconds for batching commits.

    • OptionaldefaultAccessToken?: string

      Default git access token for all roots. Supports env var substitution.

    • enabled: boolean

      Whether VCS is enabled globally.

    • maxBatchSize: number

      Maximum number of files per commit batch.

    • maxConsecutiveFailures: number

      Circuit breaker: trip after this many consecutive commit failures.

    • OptionalmaxFileBytes?: string | number

      Size cap for versioned files (D80). A new file over it is not staged; a tracked file that grows past it is untracked in its own commit. 0 disables the cap. Read at each staging (no restart needed).

    • Optionalretention?: { maxAgeDays: number; maxVersions: number; squashCron: string }

      Retention policy configuration.

      • maxAgeDays: number

        Maximum age in days for retained versions.

      • maxVersions: number

        Maximum number of versions to retain per file.

      • squashCron: string

        Cron expression for squash schedule.

    • staleLockThresholdMs: number

      Age in ms after which an index.lock is considered stale and force-removed.

    Serialises this root's git work (D66, D81).

    remoteUrl: string | undefined
    rootPath: string
    • Add a file to the pending set and start the throttle timer; a full set commits at once. The breaker is intentionally not reset here: recovery is time-based, so a busy root cannot hammer a deterministic failure.

      Parameters

      • filePath: string

        Absolute path of the changed file.

      Returns void

    • Queue a deleted file. Staging records the deletion if git tracks it.

      Parameters

      • filePath: string

        Absolute path of the deleted file.

      Returns void

    • 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 made while nothing was watching (#249).

      Parameters

      • isInScope: (absolutePath: string) => boolean

        Returns true if the absolute path routes to this manager (the coordinator's routing and watch-scope logic).

      Returns Promise<void>