Skip to content

Latest commit

 

History

History
199 lines (110 loc) · 10.9 KB

status-model.md

File metadata and controls

199 lines (110 loc) · 10.9 KB

Status Model

How the engine's raw agent state becomes a group in the sidebar and a count on a checkout row.

The state of an agent is five axes, not one word. What it needs from the operator, whether it is running, whether it has reported a completion, whether the operator has looked at it, and whose work it is are independent, and mixing them into one string is what made the same agent read differently in different views.

  • Demand: question, approval, error (shown as Blocked, see below), none.
  • Activity: working, stopped, unknown.
  • Completion: reported, not reported.
  • Read: read, unread.
  • Ownership: operator, delegated, Hide AI's, for work a Hide-started agent does for a screen that owns it, or a Hide Bot thread's, for a session a thread started under itself; a bot's (Tool) stays in the types and nothing sets it since PRD external-connections D-12.

hide-core/src/agent_state/axes.rs is the single owner of all five. agent_state/turn.rs derives the group, request verb, close and rest gates from them; sidebar.rs assembles the snapshot rows. It also derives everything a view draws from them - the group, the mark, whether the row is emphasized, the status word, the descendant mark, and whether closing the pane needs a confirmation or a fresh status check - so no surface decides any of it a second time.

Ownership is not stored anywhere. It is read back off the row: a row whose lineage depth is greater than zero is delegated, a root whose Hide AI snapshot names a home is Hide AI's, a root whose tool mark says its tool keeps it is that tool's, and every other row, including an orphan whose parent is gone, is the operator's. ownership_of is the only function that makes that judgement, and apply_lineage reapplies every derived value once the lineage is known.

This guide is kept as pieces under docs/status-model/, one file per subject, each naming the code it covers. Read this table, then the pieces whose Code paths cover what you change. The headings after the table keep every section name and anchor this file had, so a reference such as docs/status-model.md, <section> still lands here and names its piece.

Piece Code
Ownership: work Hide AI, a tool, a Hide Bot thread or a mission keeps hide-core/src/agent_state/axes.rs, hide-core/src/runtime/tests/tool_work.rs, hide-core/src/runtime/memory_promotion.rs, hide-core/src/coordination/started.rs, hide-core/src/agent_state/tally/scope.rs, hide-core/src/runtime/desk/parent.rs
Questions and a person's turn hide-core/src/links/agent_asks.rs, hide-core/src/labels/context_label.rs, hide-core/src/runtime/tests/open_asks.rs, hide-core/src/runtime/tests/agent_asks.rs, hide-core/src/runtime/tests/human_turn.rs, web/src/components/folded-asks.tsx, web/src/missions.ts
The read axis, completion and a View to look at hide-core/src/runtime/look.rs, hide-core/src/sidebar.rs, hided/src/demand.rs, web/src/windowScreen.ts, web/src/windowThread.ts, web/src/agentRow.ts, hide-core/src/runtime/tests/read_on_look.rs
A quiet row, where each axis comes from and the four groups hide-core/src/agent_state/turn.rs, hide-core/src/agent_state/sessions.rs, hide-core/src/runtime/checks_wait.rs, hide-session/src/turns.rs, hide-session/src/turns/wake.rs, hide-core/src/agent_state/tally/lineage.rs
The mark, close protection and where a parent comes from web/src/agentRow.ts, hide-core/src/coordination/lineage.rs, hide-core/src/agent_state/turn.rs, web/src/sidebarTree.ts, web/src/components/agent-tree-popover.tsx, hide-core/src/runtime/tests/tree_close.rs
The shared status contract and uninstrumented agents web/src/components/status-mark.tsx, hide-core/src/agent_sleep.rs, hide-core/src/agent_sleep/dormant.rs, hide-core/src/pane_reopen.rs, web/src/paneConnectionRules.ts, web/src/errorNotice.ts
GitHub and GitLab status in a Workspace row hide-core/src/github.rs, hide-host/src/gh.rs, hide-core/src/gitlab.rs, hide-node-link/src/glab.rs, hide-core/src/runtime/github_poll.rs, web/src/githubLook.ts, web/src/prMark.ts, hide-core/src/agent_state/work/board.rs
How rows are drawn and what reaches the phone hide-core/src/agent_state/notice_table.rs, hided/src/desktop_notices.rs, hided/src/mobile/push.rs, hided/src/mobile/mod.rs, hide-core/src/agent_state/turn.rs

Work Hide AI does for a home

Moved to Ownership: work Hide AI, a tool, a Hide Bot thread or a mission keeps.

Work an external tool keeps

Moved to Ownership: work Hide AI, a tool, a Hide Bot thread or a mission keeps.

A held Memory card is no status

Moved to Ownership: work Hide AI, a tool, a Hide Bot thread or a mission keeps.

A mission adds no status

Moved to Ownership: work Hide AI, a tool, a Hide Bot thread or a mission keeps.

A handed plan step adds no status

Moved to Ownership: work Hide AI, a tool, a Hide Bot thread or a mission keeps.

A plan waiting for review is a question

Moved to Questions and a person's turn.

A question laid on a row stays read

Moved to Questions and a person's turn.

A question still waiting

Moved to Questions and a person's turn.

A person's turn an agent declares

Moved to Questions and a person's turn.

agent_status provenance and background waits

Moved to Questions and a person's turn.

Hide owns the read axis, at pane level

Moved to The read axis, completion and a View to look at.

Across an engine restart

Moved to The read axis, completion and a View to look at.

Completion is separate from stopped

Moved to The read axis, completion and a View to look at.

A descendant's change turns its ancestors unread

Moved to The read axis, completion and a View to look at.

A View to look at

Moved to The read axis, completion and a View to look at.

A quiet row that waits

Moved to A quiet row, where each axis comes from and the four groups.

A row waiting on its checks

Moved to A quiet row, where each axis comes from and the four groups.

Where each axis comes from

Moved to A quiet row, where each axis comes from and the four groups.

The four groups

Moved to A quiet row, where each axis comes from and the four groups.

The mark

Moved to The mark, close protection and where a parent comes from.

Close protection is separate from read state

Moved to The mark, close protection and where a parent comes from.

Where a parent comes from

Moved to The mark, close protection and where a parent comes from.

The descendant mark and the tree popover

Moved to The mark, close protection and where a parent comes from.

Shared agent and Workspace status contract

Moved to The shared status contract and uninstrumented agents.

One meaning across surfaces

Moved to The shared status contract and uninstrumented agents.

Workspace aggregation

Moved to The shared status contract and uninstrumented agents.

Disclosure and selection

Moved to The shared status contract and uninstrumented agents.

Verification ownership

Moved to The shared status contract and uninstrumented agents.

Uninstrumented is not an unknown activity

Moved to The shared status contract and uninstrumented agents.

Not connected, and what fixes it

Moved to The shared status contract and uninstrumented agents.

GitHub status in the Workspace row

Moved to GitHub and GitLab status in a Workspace row.

Checks of a head commit

Moved to GitHub and GitLab status in a Workspace row.

A gitlab.com merge request

Moved to GitHub and GitLab status in a Workspace row.

Pull request visual states

Moved to GitHub and GitLab status in a Workspace row.

Pull request groups

Moved to GitHub and GitLab status in a Workspace row.

A task's stage

Moved to GitHub and GitLab status in a Workspace row.

Task identity

Moved to GitHub and GitLab status in a Workspace row.

Row presentation and phone notifications

Moved to How rows are drawn and what reaches the phone.

Phone notices

Moved to How rows are drawn and what reaches the phone.

With and without Hide AI

Moved to How rows are drawn and what reaches the phone.

Scope projections

Moved to How rows are drawn and what reaches the phone.