planState() serves the /plan command, prompt assembly, the tool
admission predicate, and the service methods, so its readiness failure
is PlanModeError PLAN_STATE_UNAVAILABLE instead of the tool-only
ToolContextUnavailableError. The code set is a literal union documented
in place rather than a link to a module-local array.
Refs #7869
PlanModeError is the only base-class use this stack adds to plan-mode,
so the package depends on the dependency-free dsh-error instead of
reaching the base through dsh-llm; the user-questions test that builds
a foreign HarnessError imports it from dsh-error as a dev dependency.
Refs #7869
The plugin entry exports only the PlanModeError class and its code type;
the code list stays module-local in src/error.ts, so the entry adds no
value export that verify-plugin-entry-exports would reject.
Refs #7869
exit_plan_mode threw plain Errors, so its most common failure, the user
choosing to keep planning, reached tool/result without an error.code.
PlanModeError carries PLAN_NOT_ACTIVE, PLAN_REVIEW_INTERRUPTED, and
PLAN_REVISION_REQUESTED. A plan without a leading heading is a
ToolArgsError, and a missing caller, user-questions channel, or
projection reader is a ToolContextUnavailableError.
Refs #7869