Package Exports
- @codebolt/git-worktree-production
- @codebolt/git-worktree-production/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@codebolt/git-worktree-production) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Git Worktree Production Provider
A production-ready implementation of the Git Worktree Provider for CodeBolt.
Overview
This provider enables CodeBolt to work with Git worktrees, creating isolated environments for development tasks while maintaining synchronization with the main repository.
Features
- Creates isolated Git worktrees for each environment
- Manages agent server lifecycle for each worktree
- Provides diff functionality to track changes
- Handles cleanup of worktrees and branches when done
- WebSocket-based communication with the agent server
Installation
pnpm installBuilding
pnpm buildUsage
The provider can be started with:
pnpm startOr directly with:
node dist/index.jsConfiguration
The provider accepts the following configuration options:
agentServerPort: Port for the agent server (default: 3001)agentServerHost: Host for the agent server (default: 'localhost')worktreeBaseDir: Base directory for worktrees (default: '.worktree')timeouts: Timeout configuration for various operations
API
The provider implements the following methods:
onProviderStart: Initialize the provider and create worktreeonProviderAgentStart: Start the agent server for the worktreeonGetDiffFiles: Get diff information for changed filesonCloseSignal: Clean up resources when provider is closedonUserMessage: Handle messages from the usercreateWorktree: Create a new Git worktreeremoveWorktree: Remove a Git worktree and its branch
Development
To run tests:
pnpm testTo run in development mode with hot reloading:
pnpm devLicense
MIT