swg_status
Reports coordinator state, per-path write holders, and the paths this session holds, letting you check for stale-write conflicts and handoff records before writing.
Instructions
Report coherence state: coordinator on|off|unknown (unknown is NOT off), per-path enforced|not_registered (with handoff: the path's handoff record -- giver, successor, version_at_transfer, hold_shape, status, live -- when it has one; per_path is null, not {}, when the coordinator's /status answer carries no list of tracked paths, as a degraded answer does when its registry was busy: retry shortly and do not treat it as nothing tracked; the text result then says per_path=unavailable. With coordinator=unknown, per_path is {} and says nothing about what is tracked), the write holder on each per_path entry someone holds for writing: holder_agent_id (the holder's attempt id, in the 32-hex spelling an other_holder refusal names; ids are per attempt, so it never equals session_agent_id) and held_by (this_attempt; earlier_attempt, an earlier attempt of this session whose grant still stands, which you release; or another_agent), neither key on an entry nobody holds, and this_attempt covering another caller sharing this server, since every caller of one server process is one agent to the coordinator; on_held (this server's mode: refuse when the operator set SWG_ON_HELD=refuse, else displace), held (the sorted paths this session holds for writing, either attempt; null when the coordinator cannot say who holds each path: null means cannot tell, never that nothing is held; the text result gives on_held, held, and a line per path held_by another_agent or earlier_attempt), is_attached/is_degraded/session_id, session_agent_id (this session's id as a handoff successor: the value another session passes to swg_transfer to hand this session a path; it does not change when this session reacquires, and it names this session as a successor only while principal_claim is bound), principal_claim (this session's caller-principal state: bound; unsupported = the coordinator issues none; unconfirmed = the last claim's answer was lost and the next call claims again by itself; refused = the session is bound under another nonce, so every later swg_read/swg_write/swg_gate answers the typed caller_principal_* deny with recover=restart_session while the coordinator stays on; not_attempted = nothing claimed yet), caller_principal_absent_total and caller_principal_refused_total (the coordinator's counters; null, never 0, when it is unreachable or does not report them), registry_schema_version (the schema version of the coordinator's store, an integer; an older release refuses a store at a newer version; null when the coordinator is unreachable (coordinator=unknown) or its answer carries no such field, as a coordinator built before the field does; report it to the user rather than act on it), and heterogeneous_scope_detectable=false (a multi-host or differently-scoped setup is NOT distinguishable in v1). SINGLE-HOST only. Out of guarantee and NOT detected in v1: writers on different hosts or across a synced/network mount, divergent-history reconciliation, semantic correctness, server-enforced auto-merge.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "swg_status"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||