Expand description
Detached/workspace-mode repo resolution: turn a filesystem path into a
RepoBinding (via the path’s git remote + the server), and pick the
effective binding for an event/command from the precedence chain
(--path flag → subagent worktree override → session active → bound
.tracevault/config.toml). See design §2/§3/§4.
Structs§
- Project
Resolve Inputs - Inputs for the effective-project precedence chain.
project_flagandconfig_defaultare resolved by the caller;session/worktree_pathcome from the per-session state. - Resolve
Inputs - Inputs for the effective-binding precedence chain.
repo_flagandboundare resolved by the caller (the--pathoverride and the boundconfig.toml, respectively);session/worktree_pathcome from the per-session state.
Enums§
- Binding
Source - Which precedence tier produced the
effective_bindingresult. - Project
Source - Which precedence tier produced the
effective_projectresult.
Functions§
- binding_
from_ config - A RepoBinding from a pinned
.tracevault/config.toml(bound mode), if it has a repo_id. Pure — caller supplies the already-loaded config. Carries through theremote_id/codebase_nameinitpersisted (best-effort, display-only) so bound-modestatuscan print the codebase without an extra network round-trip;git_urlstaysNonehere — bound mode has no live origin URL to hand back (that’s the oldergit_urlfallback’s job, covering bindings that predatecodebase_name). - effective_
binding - The binding that applies, and which tier produced it:
--pathflag → subagent worktree override → session active → bound config → user default → none. - effective_
project - The project that applies, and which tier produced it:
--projectflag → subagent worktree override → session active → config default → none. Pure; covers only the local tiers (flag → subagent → session.active_project → config_default). Server-side deduction and the user-level default are applied afterward byresolve_effective_project, which calls this function first and only falls through to those tiers when it returnsNone. - resolve_
effective_ project - Full project-attribution precedence chain:
--projectflag → subagent override → session active → config default (all pure, viaeffective_project; no network call) → server-side deduction from the repo’s git remote → user-level default. Deduction outranks the user-level default — this falls out of the ordering below: the user default is only consulted once deduction has returnedNone. - resolve_
path_ to_ binding - Resolve a filesystem path to a registered-repo binding: read its origin
remote URL and ask the server.
Ok(None)when the path has no remote or the server has no matching codebase (pre-registered-only).