Skip to content
Cockpit0.29.0
A snapshot: read at commit 707a04c7ce8 on 2026-10-18T00:06:01Z by majordomus 0.29.0. Nothing on this page is read again. See it live

continuity.publish

Publish this checkout's newest handover for another machine

What it is

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.

Descriptor

Canonical id
continuity.publish
Module
continuity
Kind
command
Stability
experimental
Provenance
declared
Source
apps/majordomus-cli/src/capability/builtin/continuity.rs
Cache
disabled
Benchmark
waived: destructive
Tags
continuityhandoverdevices

Run

command
A command that writes the repository. It changes tracked files a commit will carry, and is sent as a POST from this page's origin.

The file name of a handover record under `.ai/local/state/handovers/`; the newest when absent.

The issue the work belongs to (`#184`, `I0042`).

The milestone it belongs to.

POST /api/v1/continuity/publish

Projections

InterfaceAsWhere
MCP toolmajordomus_continuity_publish-
MCP resourcenot exposed-
HTTPPOST /api/v1/continuity/publishSwagger
Command linemajordomus continuity publish-

Schemas

Input · PublishInput
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "handover": {
      "type": [
        "string",
        "null"
      ],
      "description": "The file name of a handover record under `.ai/local/state/handovers/`; the newest\nwhen absent."
    },
    "issue": {
      "type": [
        "string",
        "null"
      ],
      "description": "The issue the work belongs to (`#184`, `I0042`)."
    },
    "milestone": {
      "type": [
        "string",
        "null"
      ],
      "description": "The milestone it belongs to."
    }
  },
  "description": "The input of `continuity.publish`.",
  "title": "PublishInput"
}
Output · Published
{
  "type": "object",
  "properties": {
    "record": {
      "$ref": "#/$defs/RecordView",
      "description": "The record."
    },
    "written": {
      "type": "boolean",
      "description": "False when the same handover at the same source state was already the record this\ncheckout stands on: nothing new was written."
    },
    "tip": {
      "type": "string",
      "description": "The local ref's commit."
    },
    "handover": {
      "type": "string",
      "description": "The handover record it was read from, relative to the checkout."
    },
    "next": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "What is next: the record reaches another machine only through a sync."
    }
  },
  "required": [
    "record",
    "written",
    "tip",
    "handover",
    "next"
  ],
  "description": "The answer of `continuity publish`.",
  "title": "Published",
  "$defs": {
    "RecordView": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The record id."
        },
        "line": {
          "type": "string",
          "description": "Its line."
        },
        "parent": {
          "type": [
            "string",
            "null"
          ],
          "description": "The record it continues."
        },
        "device": {
          "$ref": "#/$defs/Device",
          "description": "The device that published it."
        },
        "this_device": {
          "type": "boolean",
          "description": "Whether that device is this one."
        },
        "trust": {
          "$ref": "#/$defs/Trust",
          "description": "Whether its signer is trusted here."
        },
        "session": {
          "type": [
            "string",
            "null"
          ],
          "description": "The episode it was published from."
        },
        "branch": {
          "type": [
            "string",
            "null"
          ],
          "description": "The branch it was written on."
        },
        "head": {
          "type": [
            "string",
            "null"
          ],
          "description": "The commit it was written at."
        },
        "working_tree": {
          "$ref": "#/$defs/WorkingTree",
          "description": "Clean or dirty at the origin."
        },
        "changed_total": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "How many paths differed from HEAD at the origin."
        },
        "published_at": {
          "type": "string",
          "description": "When it was published, by the publisher's clock."
        },
        "age_minutes": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int64",
          "description": "Minutes since then, by this machine's clock; absent when either clock's reading is\nunusable."
        },
        "task": {
          "type": [
            "string",
            "null"
          ],
          "description": "The task's title: the intent."
        },
        "issue": {
          "type": [
            "string",
            "null"
          ],
          "description": "The issue."
        },
        "objective": {
          "type": "string",
          "description": "The handover's `# Objective`, first line."
        }
      },
      "required": [
        "id",
        "line",
        "device",
        "this_device",
        "trust",
        "working_tree",
        "changed_total",
        "published_at"
      ],
      "description": "One record as every surface shows it."
    },
    "Device": {
      "type": "object",
      "properties": {
        "node": {
          "type": "string",
          "description": "The node id: the first 32 hex of the SHA-256 of the device's Ed25519 public key."
        },
        "label": {
          "type": "string",
          "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."
        }
      },
      "required": [
        "node",
        "label"
      ],
      "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."
    },
    "Trust": {
      "oneOf": [
        {
          "type": "string",
          "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."
        }
      ],
      "description": "Whether the device that signed a record is one this repository trusts."
    },
    "WorkingTree": {
      "oneOf": [
        {
          "type": "string",
          "const": "clean",
          "description": "Nothing outside HEAD."
        },
        {
          "type": "string",
          "const": "dirty",
          "description": "Modified, staged or untracked files that HEAD does not hold."
        }
      ],
      "description": "Whether the working tree had changes git does not hold in a commit."
    }
  }
}

Examples

These are the capability's own benchmark cases: the same inputs the benchmark runs and the OpenAPI document shows.

default
{}