Skip to content

continuity.publish

Projects the newest handover record into a portable record — the handover body, the repository and device identity, the episode, the source state (branch, commit, and for a dirty tree the changed paths and a fingerprint, never their content), the task and its decisions, and the record it continues — refuses it when any value carries a credential, a secret environment value or a path of this machine's disk, signs it with the device's mesh key and adds it to refs/majordomus/continuity. Touches no branch, index or working tree, and no network: a sync publishes it.

Projects the newest handover record into a portable record — the handover body, the repository and device identity, the episode, the source state (branch, commit, and for a dirty tree the changed paths and a fingerprint, never their content), the task and its decisions, and the record it continues — refuses it when any value carries a credential, a secret environment value or a path of this machine's disk, signs it with the device's mesh key and adds it to refs/majordomus/continuity. Touches no branch, index or working tree, and no network: a sync publishes it.

Exposure

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

surfaceas
MCPtool majordomus_continuity_publish
HTTPPOST /api/v1/continuity/publish operationId continuity.publish
command linemajordomus continuity publish

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 · PublishInput

The input of continuity.publish.
propertytyperequireddescription
handover string | null no The file name of a handover record under .ai/local/state/handovers/; the newest when absent.
issue string | null no The issue the work belongs to (#184, I0042).
milestone string | null no The milestone it belongs to.
JSON Schema
{
  "additionalProperties": false,
  "description": "The input of `continuity.publish`.",
  "properties": {
    "handover": {
      "description": "The file name of a handover record under `.ai/local/state/handovers/`; the newest\nwhen absent.",
      "type": [
        "string",
        "null"
      ]
    },
    "issue": {
      "description": "The issue the work belongs to (`#184`, `I0042`).",
      "type": [
        "string",
        "null"
      ]
    },
    "milestone": {
      "description": "The milestone it belongs to.",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "title": "PublishInput",
  "type": "object"
}

output · Published

The answer of continuity publish.
propertytyperequireddescription
handover string yes The handover record it was read from, relative to the checkout.
next array yes What is next: the record reaches another machine only through a sync.
record reference yes The record.
tip string yes The local ref's commit.
written boolean yes False when the same handover at the same source state was already the record this checkout stands on: nothing new was written.
JSON Schema
{
  "$defs": {
    "Device": {
      "description": "The device a record was written on: the mesh node key's id and the label its identity\nfile carries. The label is presentation; the node id is identity.",
      "properties": {
        "label": {
          "description": "The display label of the device's identity file (`macbook-pro`), or the first eight\nhex of its node id when it has none.",
          "type": "string"
        },
        "node": {
          "description": "The node id: the first 32 hex of the SHA-256 of the device's Ed25519 public key.",
          "type": "string"
        }
      },
      "required": [
        "node",
        "label"
      ],
      "type": "object"
    },
    "RecordView": {
      "description": "One record as every surface shows it.",
      "properties": {
        "age_minutes": {
          "description": "Minutes since then, by this machine's clock; absent when either clock's reading is\nunusable.",
          "format": "int64",
          "type": [
            "integer",
            "null"
          ]
        },
        "branch": {
          "description": "The branch it was written on.",
          "type": [
            "string",
            "null"
          ]
        },
        "changed_total": {
          "description": "How many paths differed from HEAD at the origin.",
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        },
        "device": {
          "$ref": "#/$defs/Device",
          "description": "The device that published it."
        },
        "head": {
          "description": "The commit it was written at.",
          "type": [
            "string",
            "null"
          ]
        },
        "id": {
          "description": "The record id.",
          "type": "string"
        },
        "issue": {
          "description": "The issue.",
          "type": [
            "string",
            "null"
          ]
        },
        "line": {
          "description": "Its line.",
          "type": "string"
        },
        "objective": {
          "description": "The handover's `# Objective`, first line.",
          "type": "string"
        },
        "parent": {
          "description": "The record it continues.",
          "type": [
            "string",
            "null"
          ]
        },
        "published_at": {
          "description": "When it was published, by the publisher's clock.",
          "type": "string"
        },
        "session": {
          "description": "The episode it was published from.",
          "type": [
            "string",
            "null"
          ]
        },
        "task": {
          "description": "The task's title: the intent.",
          "type": [
            "string",
            "null"
          ]
        },
        "this_device": {
          "description": "Whether that device is this one.",
          "type": "boolean"
        },
        "trust": {
          "$ref": "#/$defs/Trust",
          "description": "Whether its signer is trusted here."
        },
        "working_tree": {
          "$ref": "#/$defs/WorkingTree",
          "description": "Clean or dirty at the origin."
        }
      },
      "required": [
        "id",
        "line",
        "device",
        "this_device",
        "trust",
        "working_tree",
        "changed_total",
        "published_at"
      ],
      "type": "object"
    },
    "Trust": {
      "description": "Whether the device that signed a record is one this repository trusts.",
      "oneOf": [
        {
          "const": "this_device",
          "description": "This device signed it.",
          "type": "string"
        },
        {
          "const": "trusted",
          "description": "The mesh declaration's trust list admits the key.",
          "type": "string"
        },
        {
          "const": "untrusted",
          "description": "The mesh declaration exists and does not admit the key: never resumed from.",
          "type": "string"
        },
        {
          "const": "undeclared",
          "description": "The repository declares no mesh, so no list exists to check the key against. The\nsignature still binds the record to its key; the plan warns.",
          "type": "string"
        }
      ]
    },
    "WorkingTree": {
      "description": "Whether the working tree had changes git does not hold in a commit.",
      "oneOf": [
        {
          "const": "clean",
          "description": "Nothing outside HEAD.",
          "type": "string"
        },
        {
          "const": "dirty",
          "description": "Modified, staged or untracked files that HEAD does not hold.",
          "type": "string"
        }
      ]
    }
  },
  "description": "The answer of `continuity publish`.",
  "properties": {
    "handover": {
      "description": "The handover record it was read from, relative to the checkout.",
      "type": "string"
    },
    "next": {
      "description": "What is next: the record reaches another machine only through a sync.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "record": {
      "$ref": "#/$defs/RecordView",
      "description": "The record."
    },
    "tip": {
      "description": "The local ref's commit.",
      "type": "string"
    },
    "written": {
      "description": "False when the same handover at the same source state was already the record this\ncheckout stands on: nothing new was written.",
      "type": "boolean"
    }
  },
  "required": [
    "record",
    "written",
    "tip",
    "handover",
    "next"
  ],
  "title": "Published",
  "type": "object"
}

Policies

benchmark
waived — waived: destructive
cache
disabled — every call runs the handler

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
directwaived (destructive)0
mcpwaived (destructive)0
httpwaived (destructive)0

Searches the titles and descriptions of every page this site publishes.