hub_context
Resolve which hub project your working directory belongs to, returning project state, tasks, and presence to resume after context compaction.
Instructions
Where am I — the first call of a session and the first call after a context compaction. Resolves which hub project YOUR working directory belongs to, most to least certain: a .hubd marker file (repo root, first line = project slug) · a project card's recorded sync path · the repo folder name as a last-resort guess (guessed:true, with the one-line fix in hint). Returns {project, via, root, guessed, digest, digestSetAt, digestSetBy, digestAgeDays, digestStale?, openTasks, activeClaims, presenceHere, journalTail}. digestStale is the same verdict hub_status gives — a digest can be four months behind its own journal and still read as current; presenceHere lists live heartbeats whose cwd is under this root — who else is editing this checkout right now; journalTail is the last few entries of the project, so resuming reads state, not a summary. project is null with a hint if nothing matched.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | Yes | Absolute path to YOUR OWN current working directory — this cannot be inferred by the server (it may serve many agents in many directories), so pass it explicitly. | |
| agent | No | you — so `claimsTouched` (live claims whose glob covers a file changed here in the last recentMinutes) leaves your own claims out | |
| staleDays | No | digest counts as stale after N days of journal it does not reflect (same rule as hub_status), default 7 | |
| journalTail | No | how many recent journal entries of the project to include, default 5 | |
| recentMinutes | No | window for claimsTouched, default 30 |