Goal tools exposed to the agent for persisted TUI goals.
Lifecycle status of a TUI-owned goal.
active and blocked are unfinished states; complete is terminal. A blocked
goal is still considered active (unfinished) by get_goal.
Where the active rubric criteria came from, as reported to the model.
Model-visible guidance injected before each request by GoalToolsMiddleware.
Goal/rubric state channels shared by every schema that touches them.
Declared once here so each schema that carries these channels —
ResumeState and goal_tools.GoalToolState — inherits the same
PrivateStateAttr-marked annotations. Middleware state schemas merge with
later entries winning, so an independent re-declaration that dropped the
PrivateStateAttr marker would override these and leak the field into the
public graph input/output schema. Inheriting from a single base makes that
drift unrepresentable.
Read-only rubric view returned by the get_rubric tool to the model.
Read-only goal view returned by the get_goal tool to the model.
A fixed-shape projection of goal state. Both construction branches in
_goal_snapshot must populate every key, so the type checker catches a
drift between them.
State fields used by goal tools.
Inherits the shared _goal_*/_sticky_rubric channels (with their
PrivateStateAttr markers) from GoalRubricChannels, so the goal tools and
ResumeState cannot drift apart. Adds only the public rubric graph input,
which is intentionally non-private — it is the RubricMiddleware input.
Expose constrained goal tools to the main agent.