Expand description
Pure thread create/start planning.
Owns decision logic shared by heddle start, heddle thread start, and
heddle thread create:
- name validation (safe shell-token / reserved structure rules)
- default base selection rules
- path isolation requirements (pure checks on normalized paths/options)
- workspace mode planning from request + host facts
Materialization, checkout, registry writes, and repository I/O stay CLI-owned. Callers resolve states/paths first, then invoke these helpers.
Structs§
- Thread
Create Options - Caller-supplied create inputs for pure preflight planning.
- Thread
Create Plan - Pure plan for
heddle thread createafter name validation. - Thread
Start Options - Caller-supplied start inputs for pure preflight planning.
- Thread
Start Plan - Pure plan for
heddle start/heddle thread startafter option preflight.
Enums§
- Auto
Workspace Default - Config default used when
--workspace autoand no explicit path forces a bytes-on-disk mode. - Explicit
Path Placement - Where an explicit
--pathsits relative to the repository. - Thread
Base Error - Failures from pure base selection once states are resolved.
- Thread
Base Selection - Outcome of pure base selection after
--from/ existing tip are resolved. - Thread
Path Isolation Error - Failures from pure path isolation checks.
- Thread
Plan Error - Failures from pure thread create/start planning.
- Workspace
Mode Request - Workspace mode as requested by the caller (maps from CLI
--workspace).
Functions§
- active_
reservation_ blocks_ start - Whether an active writer reservation blocks starting the same thread name.
- active_
reservation_ path_ matches - Whether a requested path matches the path held by an active reservation.
- check_
explicit_ path_ isolation - Pure path-isolation check for an explicit start path.
- classify_
explicit_ path_ placement - Classify an explicit start path relative to repo root / heddle dir.
- explicit_
path_ allowed_ for_ git_ overlay - Whether an explicit path placement is allowed for a git-overlay repo.
- mode_
honors_ explicit_ path - Whether the planned mode honors an explicit
--pathfor checkout placement. - path_
isolation_ enforced - Whether path isolation is enforced for this capability.
- plan_
thread_ create - Pure preflight for
heddle thread create. - plan_
thread_ mode - Plan the concrete
ThreadModefrom the caller request and host facts. - plan_
thread_ start - Pure option preflight for
heddle start/heddle thread start. - select_
thread_ base - Select the base state for a new or resumed thread start.
- start_
requires_ clean_ worktree - Whether
heddle startmust refuse a dirty worktree for these options. - validate_
thread_ name - Validate a thread name against the shared safe-slug rule.