# jackin-agent-status (https://jackin.tailrocks.com/reference/crates/jackin-agent-status/)



{/* GENERATED from crates/jackin-agent-status/README.md — edit the README, not this file */}

Agent runtime status authority. Owns all state-machine logic for determining what an agent is doing at any moment — replacing the old timer-based heuristics with an evidence-driven arbitration model consumed by the capsule daemon and operator surfaces.

## What this crate owns [#what-this-crate-owns]

* Evidence collection (`evidence`, `process`, `screen`) — the signals that feed a status decision.
* The status-decision state machine: rules (`rules`), policy (`policy`), gating (`gating`), and arbitration (`arbitrate`).

## Architecture tier and allowed dependencies [#architecture-tier-and-allowed-dependencies]

**Domain/status crate** above the leaf. Allowed workspace dependencies: `jackin-core`, `jackin-protocol`. No infrastructure or presentation dependencies — status logic is pure arbitration over evidence types.

## Structure [#structure]

| Module                                                                                                                                                                        | Owns                               | Tests                                                                                    |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- | ---------------------------------------------------------------------------------------- |
| <RepoFile path="crates/jackin-agent-status/src/lib.rs">`lib.rs`</RepoFile>                                                                                                    | crate root, re-exports             | —                                                                                        |
| <RepoFile path="crates/jackin-agent-status/src/evidence.rs">`evidence.rs`</RepoFile> · <RepoFile path="crates/jackin-agent-status/src/evidence.rs">`evidence/`</RepoFile>     | status evidence types + collection | <RepoFile path="crates/jackin-agent-status/src/evidence/tests.rs">`tests.rs`</RepoFile>  |
| <RepoFile path="crates/jackin-agent-status/src/process.rs">`process.rs`</RepoFile> · <RepoFile path="crates/jackin-agent-status/src/process.rs">`process/`</RepoFile>         | process sampling signals           | <RepoFile path="crates/jackin-agent-status/src/process/tests.rs">`tests.rs`</RepoFile>   |
| `screen/`                                                                                                                                                                     | screen-state signals               | —                                                                                        |
| <RepoFile path="crates/jackin-agent-status/src/rules.rs">`rules.rs`</RepoFile> · <RepoFile path="crates/jackin-agent-status/src/rules.rs">`rules/`</RepoFile>                 | decision rules                     | <RepoFile path="crates/jackin-agent-status/src/rules/tests.rs">`tests.rs`</RepoFile>     |
| <RepoFile path="crates/jackin-agent-status/src/policy.rs">`policy.rs`</RepoFile> · <RepoFile path="crates/jackin-agent-status/src/policy.rs">`policy/`</RepoFile>             | status policy                      | <RepoFile path="crates/jackin-agent-status/src/policy/tests.rs">`tests.rs`</RepoFile>    |
| <RepoFile path="crates/jackin-agent-status/src/gating.rs">`gating.rs`</RepoFile> · <RepoFile path="crates/jackin-agent-status/src/gating.rs">`gating/`</RepoFile>             | anti-flicker gating + debounce     | <RepoFile path="crates/jackin-agent-status/src/gating/tests.rs">`tests.rs`</RepoFile>    |
| <RepoFile path="crates/jackin-agent-status/src/arbitrate.rs">`arbitrate.rs`</RepoFile> · <RepoFile path="crates/jackin-agent-status/src/arbitrate.rs">`arbitrate/`</RepoFile> | final status arbitration           | <RepoFile path="crates/jackin-agent-status/src/arbitrate/tests.rs">`tests.rs`</RepoFile> |
| <RepoFile path="crates/jackin-agent-status/src/tests.rs">`tests.rs`</RepoFile>                                                                                                | integration tests                  | —                                                                                        |

## Public API [#public-api]

Status-decision types and the arbitration entry point consumed by `jackin-capsule` and surfaced to operators. Screen-detector tests and anti-flicker behavior are the regression anchors — keep them green.

## How to verify [#how-to-verify]

```sh
cargo nextest run -p jackin-agent-status
cargo clippy -p jackin-agent-status --all-targets -- -D warnings
```
