Přeskočit na obsah

Tato stránka byla automaticky přeložena z angličtiny, jediného jazyka, ve kterém se tento web píše. Číst originál.

worktree.trunk

`HEAD` checkoutu a lokální větev trunku, každé započítané proti vzdálenému sledovacímu trunku — commity pozadu a napřed, přičemž probíhající merge počítá, co přináší — k poslednímu fetchi, jehož čas je součástí odpovědi; posuzováno proti `checkout.trunk_distance` politiky jako `current`, `lagging`, `stale`, `unjudged` (není deklarován práh) nebo `unmeasured` (není vzdálený trunk), s příkazy, které ho aktualizují. Co vykresluje doctor a co o stromu, který server poskytuje, říkají `server.status` a instrukce MCP (`project.a-checkout-serves-the-current-trunk`). Nic nestahuje a nic nezapisuje.

`HEAD` checkoutu a lokální větev trunku, každé započítané proti vzdálenému sledovacímu trunku — commity pozadu a napřed, přičemž probíhající merge počítá, co přináší — k poslednímu fetchi, jehož čas je součástí odpovědi; posuzováno proti `checkout.trunk_distance` politiky jako `current`, `lagging`, `stale`, `unjudged` (není deklarován práh) nebo `unmeasured` (není vzdálený trunk), s příkazy, které ho aktualizují. Co vykresluje doctor a co o stromu, který server poskytuje, říkají `server.status` a instrukce MCP (`project.a-checkout-serves-the-current-trunk`). Nic nestahuje a nic nezapisuje.

  • query
  • behaviorally_verified
  • module worktree
  • #worktree
  • #git
  • #freshness
  • #introspection

Zpřístupnění

Kde je tato jedna definice dosažitelná. Absence je explicitní: povrch, který není uveden, ji nenese.

povrchjako
MCPnástroj majordomus_worktree_trunk
HTTPGET /api/v1/worktrees/trunk operationId worktree.trunk
příkazová řádkamajordomus worktree trunk

Schémata

Kanonický vstup a výstup z typů Rustu; schéma nástroje MCP a parametry a odpovědi OpenAPI se odvozují z nich.

vstup · StatusInput

Odkud odpovídat.
vlastnosttyppovinnépopis
path string | null ne Adresář uvnitř jednoho z worktree tohoto repozitáře; odpověď se týká tohoto worktree. Je-li relativní, je relativní k primárnímu checkoutu (. je samotný primární checkout). Výchozí: repozitář, pro který byl server spuštěn. Cesta v jiném repozitáři se odmítne: topologie odpovídá jen o své vlastní.
JSON Schema
{
  "additionalProperties": false,
  "description": "Where to answer from.",
  "properties": {
    "path": {
      "description": "A directory inside one of this repository's worktrees; the answer is about that\nworktree. Relative to the primary checkout when relative (`.` is the primary\ncheckout itself). Default: the repository the server was started for. A path in\nanother repository is refused: the topology answers only about its own.",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "title": "StatusInput",
  "type": "object"
}

výstup · TrunkDistance

Vzdálenost checkoutu od vzdáleného trunku, posouzená.

use majordomus_cli::worktree::trunk::{Distance, TrunkDistance, TrunkStanding};
let d: TrunkDistance = serde_json::from_value(serde_json::json!({
    "standing": "stale", "local_trunk_standing": "stale",
    "worktree": "/repo", "on_trunk": true,
    "checkout": {"behind": 779, "ahead": 0},
    "thresholds": {"warn_behind": 50, "fail_behind": 300},
    "message": "779 commits behind origin/master",
})).unwrap();
assert_eq!(d.standing, TrunkStanding::Stale);
assert_eq!(d.checkout, Some(Distance { behind: 779, ahead: 0 }));
// what is absent stays absent in the answer
assert!(serde_json::to_value(&d).unwrap().get("remedy").is_none());
vlastnosttyppovinnépopis
checkout jedno ze 2 ne HEAD checkoutu vůči vzdálenému trunku. Zatímco probíhá merge, commity, které přináší, se počítají jako přítomné: vytvářený commit je bude obsahovat, takže merge, který přivádí checkout do aktuálního stavu, se nikdy neposuzuje podle stromu, který nahrazuje.
fetched_at string | null ne Kdy repozitář naposledy provedl fetch (čas FETCH_HEAD), RFC 3339: okamžik, k němuž je tato odpověď pravdivá. Chybí, pokud fetch nikdy neproběhl.
local_trunk jedno ze 2 ne Lokální větev trunku proti vzdálenému trunku: z čeho vychází větev vytvořená z lokálního trunku.
local_trunk_standing reference ano Kde stojí místní větev trunku, posuzováno stejným způsobem: z čeho vychází větev z ní vytvořená. Totéž jako standing, když checkout drží trunk.
zpráva string ano Co postavení znamená zde, v jednom řádku.
on_trunk boolean ano Pracovní strom drží samotnou hlavní větev.
náprava string | null ne Příkazy, které přivedou checkout a lokální trunk na aktuální stav, když je kterýkoli pozadu. Navrhované, nikdy nespouštěné.
remote_head string | null ne Commit, který pojmenovává sledovací trunk na remotu.
remote_trunk string | null ne Remote-tracking kmen, proti němuž se počítá (origin/master).
postavení reference ano Kde checkout stojí: jeho HEAD — s commitem, který přináší probíhající merge — posouzeno podle prahových hodnot. To je to, co jeho server poskytuje.
prahy reference ano Prahy, vůči nimž se posuzovalo, tak jak je deklaruje checkout.trunk_distance.
trunk string | null ne Větev kmene, zkráceně.
worktree string ano Změřený pracovní strom.
JSON Schema
{
  "$defs": {
    "Distance": {
      "description": "How many commits two refs have that the other lacks.\n\n```\nuse majordomus_cli::worktree::trunk::Distance;\nlet d = Distance { behind: 779, ahead: 0 };\nassert_eq!(serde_json::to_value(d).unwrap(), serde_json::json!({\"behind\": 779, \"ahead\": 0}));\n```",
      "properties": {
        "ahead": {
          "description": "Commits of this ref the remote trunk lacks.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "behind": {
          "description": "Commits of the remote trunk this ref lacks.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "behind",
        "ahead"
      ],
      "type": "object"
    },
    "TrunkStanding": {
      "description": "Where a checkout stands against the remote trunk.\n\n```\nuse majordomus_cli::worktree::trunk::TrunkStanding;\nlet s: TrunkStanding = serde_json::from_str(r#\"\"lagging\"\"#).unwrap();\nassert_eq!(s, TrunkStanding::Lagging);\nassert_eq!(serde_json::to_value(TrunkStanding::Unmeasured).unwrap(), \"unmeasured\");\n```",
      "oneOf": [
        {
          "const": "current",
          "description": "Behind by less than the warn threshold, or not behind at all.",
          "type": "string"
        },
        {
          "const": "lagging",
          "description": "At or past the warn threshold: what it serves is old enough to mislead.",
          "type": "string"
        },
        {
          "const": "stale",
          "description": "At or past the fail threshold: what it serves is the wrong tree.",
          "type": "string"
        },
        {
          "const": "unjudged",
          "description": "Behind, and the policy declares no threshold to judge the distance by.",
          "type": "string"
        },
        {
          "const": "unmeasured",
          "description": "The distance could not be measured: no trunk, no remote-tracking trunk, no `HEAD`.",
          "type": "string"
        }
      ]
    },
    "TrunkThresholds": {
      "description": "The thresholds `checkout.trunk_distance` declares, in commits behind the remote trunk.\nAbsent is absent: the reader supplies no default, and a distance with nothing to judge\nit against is reported as `unjudged`.\n\n```\nuse majordomus_cli::worktree::trunk::TrunkThresholds;\nlet t: TrunkThresholds = serde_json::from_str(r#\"{\"warn_behind\": 50, \"fail_behind\": 300}\"#).unwrap();\nassert_eq!((t.warn_behind, t.fail_behind), (Some(50), Some(300)));\nassert_eq!(TrunkThresholds::default().warn_behind, None, \"absent is not a default\");\n```",
      "properties": {
        "fail_behind": {
          "description": "At or past this many commits behind, the checkout is `stale`: a failure.",
          "format": "uint64",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "warn_behind": {
          "description": "At or past this many commits behind, the checkout is `lagging`: a warning.",
          "format": "uint64",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "type": "object"
    }
  },
  "description": "A checkout's distance from the remote trunk, judged.\n\n```\nuse majordomus_cli::worktree::trunk::{Distance, TrunkDistance, TrunkStanding};\nlet d: TrunkDistance = serde_json::from_value(serde_json::json!({\n    \"standing\": \"stale\", \"local_trunk_standing\": \"stale\",\n    \"worktree\": \"/repo\", \"on_trunk\": true,\n    \"checkout\": {\"behind\": 779, \"ahead\": 0},\n    \"thresholds\": {\"warn_behind\": 50, \"fail_behind\": 300},\n    \"message\": \"779 commits behind origin/master\",\n})).unwrap();\nassert_eq!(d.standing, TrunkStanding::Stale);\nassert_eq!(d.checkout, Some(Distance { behind: 779, ahead: 0 }));\n// what is absent stays absent in the answer\nassert!(serde_json::to_value(&d).unwrap().get(\"remedy\").is_none());\n```",
  "properties": {
    "checkout": {
      "anyOf": [
        {
          "$ref": "#/$defs/Distance"
        },
        {
          "type": "null"
        }
      ],
      "description": "The checkout's `HEAD` against the remote trunk. While a merge is in progress, the\ncommits it brings in count as present: the commit being made will hold them, so the\nmerge that brings a checkout current is never judged by the tree it is replacing."
    },
    "fetched_at": {
      "description": "When the repository last fetched (the time of `FETCH_HEAD`), RFC 3339: the moment\nthis answer is true as of. Absent when it never fetched.",
      "type": [
        "string",
        "null"
      ]
    },
    "local_trunk": {
      "anyOf": [
        {
          "$ref": "#/$defs/Distance"
        },
        {
          "type": "null"
        }
      ],
      "description": "The local trunk branch against the remote trunk: what a branch made from the local\ntrunk starts from."
    },
    "local_trunk_standing": {
      "$ref": "#/$defs/TrunkStanding",
      "description": "Where the local trunk branch stands, judged the same way: what a branch made from it\nstarts from. The same as `standing` when the checkout holds the trunk."
    },
    "message": {
      "description": "What the standing means here, in one line.",
      "type": "string"
    },
    "on_trunk": {
      "description": "The work tree holds the trunk branch itself.",
      "type": "boolean"
    },
    "remedy": {
      "description": "The commands that bring the checkout and the local trunk current, when either is\nbehind. Suggested, never run.",
      "type": [
        "string",
        "null"
      ]
    },
    "remote_head": {
      "description": "The commit the remote-tracking trunk names.",
      "type": [
        "string",
        "null"
      ]
    },
    "remote_trunk": {
      "description": "The remote-tracking trunk counted against (`origin/master`).",
      "type": [
        "string",
        "null"
      ]
    },
    "standing": {
      "$ref": "#/$defs/TrunkStanding",
      "description": "Where the checkout stands: its `HEAD` — with the commit a merge in progress brings\nin — judged against the thresholds. This is what its server serves."
    },
    "thresholds": {
      "$ref": "#/$defs/TrunkThresholds",
      "description": "The thresholds judged against, as `checkout.trunk_distance` declares them."
    },
    "trunk": {
      "description": "The trunk branch, short.",
      "type": [
        "string",
        "null"
      ]
    },
    "worktree": {
      "description": "The work tree measured.",
      "type": "string"
    }
  },
  "required": [
    "standing",
    "local_trunk_standing",
    "worktree",
    "on_trunk",
    "thresholds",
    "message"
  ],
  "title": "TrunkDistance",
  "type": "object"
}

Politiky

benchmark
povinné — cíl na každém transportu, který expozice deklaruje; případy jsou ty ze vstupního typu
cache
vypnuto — každé volání spustí handler

Cíle benchmarku

Odvozeno z registru pro tento repozitář: jeden požadavek na transport a případy, které poskytuje typ vstupu. Celá matice je na stránce měření výkonu.

transportstatepřípadytargets
directpokryto2výchozí
primary-checkout
mcppokryto2výchozí
primary-checkout
httppokryto2výchozí
primary-checkout

Prohledává názvy a popisy všech stránek, které tento web publikuje.