isScratchBranch (sync/git-refs.ts)

madarco/agentbox · packages/core/src/sync/git-refs.ts · typescript · MIT
infra

* Pure git ref/branch decisions, shared by the relay host paths and the in-box ctl. Lives in `@agentbox/core` (not `sandbox-core`) because `@agentbox/ctl` depends only on core — same pattern as the pure engine in `../replace.ts`. No fs/exec: only string logic. The three git push-

// Source: https://github.com/madarco/agentbox | License: MIT | Copyright 2026 Marco D'Alia
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * Pure git ref/branch decisions, shared by the relay host paths and the in-box
 * ctl. Lives in `@agentbox/core` (not `sandbox-core`) because `@agentbox/ctl`
 * depends only on core — same pattern as the pure engine in `../replace.ts`.
 *
 * No fs/exec: only string logic. The three git push-back paths (docker relay,
 * cloud relay, in-box lease push) keep their divergent *mechanisms* but read
 * these *decisions* from here so the branch/refspec/remote/upstream spellings
 * can't drift apart.
 */

/** Prefix of the per-box scratch branch (`agentbox/<name>`). */
export const SCRATCH_BRANCH_PREFIX = 'agentbox/';

/**
 * True for a pe

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key