Skip to content

continuity.state

The open episode, the active task, the handover and checkpoint that resolve for this worktree and branch, each with its divergence label, the unresolved questions that refuse completion, and the record tallies. Selection is two-tiered and never repository-wide: a record from an unrelated worktree or branch is not offered, because a briefing that is quietly about somebody else is worse than none. Absence is reported as absence.

The open episode, the active task, the handover and checkpoint that resolve for this worktree and branch, each with its divergence label, the unresolved questions that refuse completion, and the record tallies. Selection is two-tiered and never repository-wide: a record from an unrelated worktree or branch is not offered, because a briefing that is quietly about somebody else is worse than none. Absence is reported as absence.

Exposure

Where this one definition is reachable. Absence is explicit: a surface not listed does not carry it.

surfaceas
MCPtool majordomus_continuity
resource majordomus://continuity
HTTPGET /api/v1/continuity operationId continuity.state
command line

Schemas

The canonical input and output, from the Rust types; the MCP tool schema and the OpenAPI parameters and responses are derived from these.

input · Empty

No input.

No properties: the capability takes no input.

JSON Schema
{
  "additionalProperties": false,
  "description": "No input.",
  "title": "Empty",
  "type": "object"
}

output · Continuity

What the lifecycle of this checkout is holding.

propertytyperequireddescription
blockers array no Unresolved questions on this branch. Every one refuses `finish --outcome completed`, whichever task opened it.
branch string yes The branch, or `DETACHED`.
checkpoint one of 2 no The newest progress note for this worktree and branch, or `None`.
findings array no What a reader should know before trusting any of the above: a diverged record, a foreign open session, a malformed file that was skipped. Empty is the good case.
handover one of 2 no The record the next worker would resume from, or `None` when nothing resolves here.
head string no The commit this checkout is on.
present boolean yes Whether this checkout's lifecycle has ever run: a ledger line, a task, an episode or a record. False in a fresh clone, which is not a fault. It is not "the directory exists". Several things create that directory before anything has been recorded in it, so a reader that took its presence for evidence would be told the lifecycle had run in a checkout where it never had.
session one of 2 no The open episode, or `None`.
tallies object yes How many records of each kind this checkout holds, against the policy's caps.
task one of 2 no The active task, or `None`.
working_tree string no `clean` or `dirty`.
worktree string yes The worktree this answer is about. Every selection below is scoped to it.
JSON Schema
{
  "$defs": {
    "ActiveTask": {
      "description": "The active task of this checkout, when there is one.",
      "properties": {
        "head": {
          "description": "The commit it started at.",
          "type": "string"
        },
        "id": {
          "description": "The task id.",
          "type": "string"
        },
        "outcome": {
          "description": "Its typed outcome so far: `active`, `handed_over`, or a finished one.",
          "type": "string"
        },
        "profile": {
          "description": "The execution profile it runs under.",
          "type": "string"
        },
        "requires": {
          "description": "The obligations it owes before the outcome `completed` is available.\n\nBeside `scope` and not inside it, because the two are different promises: scope is\ncontainment — where a worker may write — and this is delivery. A change can sit\nentirely inside its scope and still be uncommitted on a laptop (ADR 0030).\n[`super::obligations`] is what judges each of these against its evidence; here it\nis reported as declared.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "scope": {
          "description": "The paths it claims.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "started_at": {
          "description": "When it started.",
          "type": "string"
        },
        "task": {
          "description": "What is being worked on.",
          "type": "string"
        }
      },
      "required": [
        "id",
        "task",
        "profile",
        "outcome"
      ],
      "type": "object"
    },
    "Divergence": {
      "description": "How far a record's recorded commit is from the commit this checkout is on.\n\nThe four words are the shell tool's, deliberately. A reader that met `advanced` from one\nsurface and `stale` from another would have to learn the same four facts twice.",
      "oneOf": [
        {
          "const": "exact",
          "description": "Written at this commit. Trust it.",
          "type": "string"
        },
        {
          "const": "advanced",
          "description": "Git has moved forward since. Trust it, and expect some of it to be done.",
          "type": "string"
        },
        {
          "const": "diverged",
          "description": "The recorded commit is not an ancestor: history was rewritten. Trust git, not this.",
          "type": "string"
        },
        {
          "const": "different_context",
          "description": "Another branch or another worktree. This record is not about your work.",
          "type": "string"
        },
        {
          "const": "unknown",
          "description": "Git could not answer, so this process says so rather than guessing `exact`.",
          "type": "string"
        }
      ]
    },
    "Match": {
      "description": "Which tier of the resolution rule matched. There is no third tier on purpose: a record\nfrom an unrelated worktree or branch is never offered.",
      "oneOf": [
        {
          "const": "same_worktree_same_branch",
          "description": "Same repository, same worktree, same branch.",
          "type": "string"
        },
        {
          "const": "same_branch",
          "description": "Same repository, same branch, another worktree of it.",
          "type": "string"
        }
      ]
    },
    "OpenSession": {
      "description": "The open episode this checkout points at, when there is one.\n\nOne execution episode belongs to one provider session, and several can be open in one\ncheckout at once — two windows of the same provider are two workers. What is read here\nis `state/session-current.yaml`, the pointer to the episode of this checkout; a worker\nthat knows its own provider session resolves its own episode instead, which is what\n`mj_session_here_file` in `lib/common.sh` does and what stamps each ledger line.",
      "properties": {
        "branch": {
          "description": "The branch it opened on.",
          "type": "string"
        },
        "foreign": {
          "description": "True when the open record here belongs to another checkout. Such a record is\nreported and never treated as this checkout's episode.",
          "type": "boolean"
        },
        "owner": {
          "description": "Who opened it.",
          "type": "string"
        },
        "provider": {
          "description": "The provider whose event opened it, when one did.",
          "type": "string"
        },
        "provider_session": {
          "description": "That provider's own session identity — the string the prompt archive stamps on the\nsame worker's records, and the name this episode is keyed by. Empty for an episode\nopened by hand, which is the one episode no provider session owns.",
          "type": "string"
        },
        "session_id": {
          "description": "The episode's id.",
          "type": "string"
        },
        "start_head": {
          "description": "The commit it opened at.",
          "type": "string"
        },
        "started_at": {
          "description": "When it opened.",
          "type": "string"
        },
        "worker": {
          "description": "The worker identity, when one was supplied. Never inferred.",
          "type": "string"
        }
      },
      "required": [
        "session_id",
        "started_at",
        "foreign"
      ],
      "type": "object"
    },
    "Record": {
      "description": "One durable record of the local half, as much of it as a reader needs to decide whether\nto open the file.",
      "properties": {
        "branch": {
          "description": "The branch it was written on.",
          "type": "string"
        },
        "created_at": {
          "description": "When the record says it was written.",
          "type": "string"
        },
        "divergence": {
          "$ref": "#/$defs/Divergence",
          "description": "How far its commit is from this one."
        },
        "head": {
          "description": "The commit it was written at.",
          "type": "string"
        },
        "matched": {
          "$ref": "#/$defs/Match",
          "description": "Which tier of the resolution rule matched."
        },
        "next_action": {
          "description": "The section a resuming worker acts on, when the record has one. A handover's `Next\nAction`; empty for a record that carries no sections.",
          "type": "string"
        },
        "path": {
          "description": "Repository-relative path. The body is at the path; it is not copied here.",
          "type": "string"
        },
        "task_id": {
          "description": "The task it belongs to, or `none`.",
          "type": "string"
        },
        "working_tree": {
          "description": "Whether the working tree was clean or dirty then.",
          "type": "string"
        }
      },
      "required": [
        "path",
        "created_at",
        "task_id",
        "branch",
        "head",
        "working_tree",
        "matched",
        "divergence"
      ],
      "type": "object"
    }
  },
  "description": "What the lifecycle of this checkout is holding.",
  "properties": {
    "blockers": {
      "description": "Unresolved questions on this branch. Every one refuses `finish --outcome completed`,\nwhichever task opened it.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "branch": {
      "description": "The branch, or `DETACHED`.",
      "type": "string"
    },
    "checkpoint": {
      "anyOf": [
        {
          "$ref": "#/$defs/Record"
        },
        {
          "type": "null"
        }
      ],
      "description": "The newest progress note for this worktree and branch, or `None`."
    },
    "findings": {
      "description": "What a reader should know before trusting any of the above: a diverged record, a\nforeign open session, a malformed file that was skipped. Empty is the good case.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "handover": {
      "anyOf": [
        {
          "$ref": "#/$defs/Record"
        },
        {
          "type": "null"
        }
      ],
      "description": "The record the next worker would resume from, or `None` when nothing resolves here."
    },
    "head": {
      "description": "The commit this checkout is on.",
      "type": "string"
    },
    "present": {
      "description": "Whether this checkout's lifecycle has ever run: a ledger line, a task, an episode or\na record. False in a fresh clone, which is not a fault.\n\nIt is not \"the directory exists\". Several things create that directory before\nanything has been recorded in it, so a reader that took its presence for evidence\nwould be told the lifecycle had run in a checkout where it never had.",
      "type": "boolean"
    },
    "session": {
      "anyOf": [
        {
          "$ref": "#/$defs/OpenSession"
        },
        {
          "type": "null"
        }
      ],
      "description": "The open episode, or `None`."
    },
    "tallies": {
      "additionalProperties": {
        "format": "uint",
        "minimum": 0,
        "type": "integer"
      },
      "description": "How many records of each kind this checkout holds, against the policy's caps.",
      "type": "object"
    },
    "task": {
      "anyOf": [
        {
          "$ref": "#/$defs/ActiveTask"
        },
        {
          "type": "null"
        }
      ],
      "description": "The active task, or `None`."
    },
    "working_tree": {
      "description": "`clean` or `dirty`.",
      "type": "string"
    },
    "worktree": {
      "description": "The worktree this answer is about. Every selection below is scoped to it.",
      "type": "string"
    }
  },
  "required": [
    "present",
    "worktree",
    "branch",
    "tallies"
  ],
  "title": "Continuity",
  "type": "object"
}

Policies

benchmark
required — a target on every transport the exposure declares; the cases are the input type's
cache
process — up to 2 entries in the process, 2s each, scoped by the registry fingerprint

Benchmark targets

Derived from the registry for this repository: one requirement per transport, and the cases the input type provides. The whole matrix is on the benchmarks page.

transportstatecasestargets
directcovered1default cold+warm
mcpcovered1default cold+warm
httpcovered1default cold+warm