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

observatory.replay

Observatory replay

What it is

The recording of the mesh scenes the repository carries at .ai/repo/observatory/recording.json, which the Observatory draws, labelled as a replay, where no mesh runs. Absent is present: false; a file that cannot be read is an error.

Descriptor

Canonical id
observatory.replay
Module
observatory
Kind
query
Stability
behaviorallyverified
Provenance
declared
Source
apps/majordomus-cli/src/capability/builtin/observatory.rs
Cache
disabled
Benchmark
required
Tags
observatorymeshui

Run

query
A query. It reads and changes nothing.

This capability takes no input.

GET /api/v1/observatory/replay

Projections

InterfaceAsWhere
MCP toolmajordomus_observatory_replay-
MCP resourcenot exposed-
HTTPGET /api/v1/observatory/replaySwagger
Command linenot exposed-

Schemas

Input · Empty
{
  "type": "object",
  "additionalProperties": false,
  "description": "No input.",
  "title": "Empty"
}
Output · ObservatoryReplay
{
  "type": "object",
  "properties": {
    "present": {
      "type": "boolean",
      "description": "Whether the repository carries a recording."
    },
    "path": {
      "type": "string",
      "description": "The file it is read from."
    },
    "recording": {
      "anyOf": [
        {
          "$ref": "#/$defs/ObservatoryRecording"
        },
        {
          "type": "null"
        }
      ],
      "description": "The recording."
    }
  },
  "required": [
    "present",
    "path"
  ],
  "description": "The recording the repository carries, or that it carries none.\n\n```\nuse majordomus_cli::capability::builtin::observatory::{replay_at, ObservatoryReplay, RECORDING};\nlet dir = tempfile::tempdir().unwrap();\nlet none: ObservatoryReplay = replay_at(dir.path()).unwrap();\nassert!(!none.present && none.recording.is_none());\nassert_eq!(none.path, RECORDING);\n```",
  "title": "ObservatoryReplay",
  "$defs": {
    "ObservatoryRecording": {
      "type": "object",
      "properties": {
        "schema": {
          "type": "string",
          "description": "`RECORDING_SCHEMA`."
        },
        "recorded_at": {
          "type": "string",
          "description": "When the scenes were read."
        },
        "revision": {
          "type": [
            "string",
            "null"
          ],
          "description": "The commit the recording process stood at, short; absent when it could not say."
        },
        "scenes": {
          "type": "object",
          "additionalProperties": true,
          "description": "Each recorded scene's model, by scene id; a scene the process had nothing live for is\nabsent, never empty."
        },
        "manifest": {
          "$ref": "#/$defs/RecordingManifest",
          "description": "What the recording is a record of, and what it leaves out."
        }
      },
      "required": [
        "schema",
        "recorded_at",
        "scenes",
        "manifest"
      ],
      "description": "The mesh scenes of one process at one moment, fit for publication.\n\n```\nuse majordomus_cli::capability::builtin::observatory::ObservatoryRecording;\nlet r: ObservatoryRecording = serde_json::from_value(serde_json::json!({\n    \"schema\": \"observatory-recording/v1\", \"recorded_at\": \"2026-10-14T05:00:00Z\", \"scenes\": {},\n    \"manifest\": { \"sources\": [], \"removed\": [] },\n})).unwrap();\nassert!(r.scenes.is_empty() && r.revision.is_none());\n```"
    },
    "RecordingManifest": {
      "type": "object",
      "properties": {
        "sources": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The capabilities whose answers the recorded scenes were projected from."
        },
        "window": {
          "anyOf": [
            {
              "$ref": "#/$defs/RecordingWindow"
            },
            {
              "type": "null"
            }
          ],
          "description": "The first and last event the recording holds, by time and by logical clock; absent\nwhen it holds none."
        },
        "removed": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Every kind of thing removed before publication, and why."
        }
      },
      "required": [
        "sources",
        "removed"
      ],
      "description": "What a recording is a record of: the capabilities read, the window of events it holds,\nand what was removed from what they answered, with the reason.\n\n```\nuse majordomus_cli::capability::builtin::observatory::RecordingManifest;\nlet m: RecordingManifest = serde_json::from_value(serde_json::json!({\n    \"sources\": [\"mesh.events\"], \"removed\": [\"event bodies\"],\n})).unwrap();\nassert!(m.window.is_none(), \"a recording that holds no event has no window\");\n```"
    },
    "RecordingWindow": {
      "type": "object",
      "properties": {
        "events": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "How many events."
        },
        "from_at": {
          "type": [
            "integer",
            "null"
          ],
          "format": "uint64",
          "minimum": 0,
          "description": "The earliest event's time, in seconds since the epoch."
        },
        "to_at": {
          "type": [
            "integer",
            "null"
          ],
          "format": "uint64",
          "minimum": 0,
          "description": "The latest event's time, in seconds since the epoch."
        },
        "from_lamport": {
          "type": [
            "integer",
            "null"
          ],
          "format": "uint64",
          "minimum": 0,
          "description": "The smallest logical clock."
        },
        "to_lamport": {
          "type": [
            "integer",
            "null"
          ],
          "format": "uint64",
          "minimum": 0,
          "description": "The largest logical clock."
        }
      },
      "required": [
        "events"
      ],
      "description": "The events a recording holds, from first to last.\n\n```\nuse majordomus_cli::capability::builtin::observatory::RecordingWindow;\nlet w = RecordingWindow { events: 2, from_at: Some(100), to_at: Some(160), from_lamport: Some(9), to_lamport: Some(10) };\nassert_eq!(w.to_at.unwrap() - w.from_at.unwrap(), 60, \"a minute of the journal\");\n```"
    }
  }
}

Examples

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

default
{}