Local adapters
Local durable and ephemeral adapters for filesystem-backed workflows.
Package:
@gittrix/[email protected]Imports:
import { LocalDurableAdapter, LocalEphemeralAdapter } from '@gittrix/adapter-local'Options
Section titled “Options”interface LocalDurableAdapterOptions { path: string branch?: string}
interface LocalEphemeralAdapterOptions { sessionsRootDir: string}Capabilities
Section titled “Capabilities”Local durable:
{ git: true, push: false, fetch: false, history: true, ttl: false, latencyClass: 'local' }Local ephemeral:
{ git: true, push: false, fetch: false, history: true, ttl: false, latencyClass: 'local' }import { GitTrix } from '@gittrix/core'import { LocalDurableAdapter, LocalEphemeralAdapter } from '@gittrix/adapter-local'
const gittrix = new GitTrix({ durable: new LocalDurableAdapter({ path: '/path/to/repo', branch: 'main' }), ephemeral: new LocalEphemeralAdapter({ sessionsRootDir: '/tmp/gittrix-sessions' }),})Ephemeral behavior
Section titled “Ephemeral behavior”- Creates a
git worktreeat<sessionsRootDir>/<session-id>/workspacewhen possible. - Falls back to a clone checked out at the baseline SHA.
- Tracks API writes and git working-tree changes.
- Excludes
.git,.gittrix-touched.json, and.glibfrom touched files. - Removes worktrees cleanly on destroy and prunes stale worktree metadata best-effort.
LocalFsAdapter is removed and throws immediately. Use LocalDurableAdapter and LocalEphemeralAdapter instead.