Resolve the mesh target by precedence (first match wins):
--space selects a registered space or identifies this project's matching stopped space.
--server — registry entry on that server (for creds/personas), else the local project.
The current selected by cotal use, except inside a project whose root has one RUNNING space
other than it, where step 4 applies. A space this folder prepared and never started, and one
whose stack here is stopped, does not take the selection's place; a folder holding the records
of a stack that runs from another folder or under another Cotal home refuses at step 4 and
names where it runs (recordsRunElsewhere), and one whose own stack is half started or
half stopped is the target at step 4 (unfinishedStackSpace). The selection stays the
target when its own broker is down, and a selection that names no registration refuses rather
than reaching another mesh. Inside a project whose root has several running spaces, none of
them the selection, the run warns first.
A genuine local project (cwd walks up to a real .cotal/).
The registry's running meshes: 0 ⇒ error; 1 ⇒ use it; N ⇒ error naming
each + its root. flags.offline (from a sweep) is excluded here; a named --space and
the selected current are not filtered.
A space cotal space create prepared and no up started, named by --space, selected, or
prepared at the local project, refuses as not-started. So does a local project with no
registration whose stack journal recorded a broker; only a project with neither gets the default.
No silent fallback — an unresolved target throws one human sentence.
Resolve the mesh target by precedence (first match wins):
--spaceselects a registered space or identifies this project's matching stopped space.--server— registry entry on that server (for creds/personas), else the local project.currentselected bycotal use, except inside a project whose root has one RUNNING space other than it, where step 4 applies. A space this folder prepared and never started, and one whose stack here is stopped, does not take the selection's place; a folder holding the records of a stack that runs from another folder or under another Cotal home refuses at step 4 and names where it runs (recordsRunElsewhere), and one whose own stack is half started or half stopped is the target at step 4 (unfinishedStackSpace). The selection stays the target when its own broker is down, and a selection that names no registration refuses rather than reaching another mesh. Inside a project whose root has several running spaces, none of them the selection, the run warns first.cwdwalks up to a real.cotal/).flags.offline(from a sweep) is excluded here; a named--spaceand the selectedcurrentare not filtered. A spacecotal space createprepared and noupstarted, named by--space, selected, or prepared at the local project, refuses asnot-started. So does a local project with no registration whose stack journal recorded a broker; only a project with neither gets the default. No silent fallback — an unresolved target throws one human sentence.