spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

claude-code / mods / diff / hooks / backend / installed-backend-probes.ts
15 lines · 1016 BRaw
1import type { BackendProbe } from './types'
2
3/**
4 * Where a host adds backends to the plugin: probes for version-control systems
5 * other than git, consulted in insertion order before git (backendOf); a
6 * probe answers null wherever git should govern. Empty as shipped, so the
7 * plugin reads git alone. A host
8 * that compiles the module in may add a probe once, before the plugin
9 * registers; the module runs natively, so that probe is what
10 * `session.start` sees. The module contract offers no other channel: the
11 * options `register` receives are the manifest's userConfig, and the
12 * shipped scan requires `register` itself to be a plain exported function.
13 */
14// module-state-allow: module-evaluation code wiring — a compiling host adds its probe functions (code references, not runtime input) once before registration and never removes or rebinds them; tests pass probes to backendOf directly; a per-Host copy would hold the same functions
15export const INSTALLED_BACKEND_PROBES = new Set<BackendProbe>()