Skip to content

armgit / orca

Public Imported from GitHub
0

Orca is the place for working with a fleet of agents (e.g. Grok Bot, Claude Code). Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

689 B
Raw Blame
import type { ExecutionHostId } from './execution-host'

export type PreservedBranchCleanup = {
  worktreeId: string
  branchName: string
  expectedHead?: string
  hostId?: ExecutionHostId
  runtimeEnvironmentId?: string
}

export function preservedBranchCleanupScopeKey(
  cleanup: Pick<PreservedBranchCleanup, 'worktreeId' | 'hostId' | 'runtimeEnvironmentId'>
): string {
  return [cleanup.hostId ?? '', cleanup.runtimeEnvironmentId ?? '', cleanup.worktreeId].join('\0')
}

export function preservedBranchCleanupKey(cleanup: PreservedBranchCleanup): string {
  return [
    preservedBranchCleanupScopeKey(cleanup),
    cleanup.branchName,
    cleanup.expectedHead ?? ''
  ].join('\0')
}