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.

lifecycle.providers

Na providera: události životního cyklu, které jeho adaptér deklaruje ve vlastním slovníku providera, zda umí archivovat prompty a které záznamy vynucování tohoto repozitáře pojmenovávají jeho hook. Deklarováno v share/providers.yaml a v politice; nikdy se nehádá z toho, zda je na disku shim.

Na providera: události životního cyklu, které jeho adaptér deklaruje ve vlastním slovníku providera, zda umí archivovat prompty a které záznamy vynucování tohoto repozitáře pojmenovávají jeho hook. Deklarováno v share/providers.yaml a v politice; nikdy se nehádá z toho, zda je na disku shim.

Zpřístupnění

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

povrchjako
MCPnástroj majordomus_lifecycle_providers
HTTPGET /api/v1/lifecycle/providers operationId lifecycle.providers
příkazová řádka—

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 · Prázdné

Žádný vstup.

Žádné vlastnosti: schopnost nebere žádný vstup.

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

výstup · ProviderLifecycles

Každý provider, pro nějž distribuce dodává bootstrap, s polovinou životního cyklu každého z nich.

with_lifecycle je počet nad providers, a ne druhý seznam, takže se oba nemohou rozejít; je tu proto, že „kolik z providerů, které podporujeme, skutečně dostane automatizaci“ je otázka, na kterou tato schopnost existuje, a čtenář by neměl muset skládat seznam, aby to zjistil.

use majordomus_cli::capability::builtin::lifecycle::ProviderLifecycles;
use serde_json::json;

let p: ProviderLifecycles = serde_json::from_value(json!({
    "providers": [
        {"id": "claude", "title": "Claude Code", "lifecycle": ["SessionStart"],
         "prompt_capture": true, "note": "adapted"},
        {"id": "plain", "title": "Plain", "prompt_capture": false, "note": "not adapted"},
    ],
    "with_lifecycle": 1,
})).unwrap();

// the count is over the list, so it is checkable against it
let counted = p.providers.iter().filter(|x| !x.lifecycle.is_empty()).count();
assert_eq!(p.with_lifecycle, counted);
assert_eq!(p.providers.len(), 2, "a provider with no adapter is still reported");
assert!(p.findings.is_empty());
vlastnosttyppovinnépopis
zjištění array ne Co by čtenář měl vědět: poskytovatel, kterého tento repozitář zapojuje, ale distribuce pro něj nedeklaruje žádný životní cyklus, a podobně.
providers array ano Poskytovatelé v pořadí deklarace.
with_lifecycle integer ano Kolik z nich deklaruje adaptér životního cyklu.
JSON Schema
{
  "$defs": {
    "ProviderLifecycle": {
      "description": "One provider's lifecycle surface: what its adapter declares it can do, and what this\nrepository has wired to it.\n\nThe two halves come from different places and must not be confused. `lifecycle` and\n`prompt_capture` are the *distribution's* declaration — what the shipped adapter can do\nfor this provider at all — while `wired` is *this repository's* policy naming that\nprovider's hook in `wired_by`. Either can be empty with the other full, and that pairing\nis the interesting finding: a provider this repository wires but the tool ships no\nlifecycle for is a hook that will never fire.\n\nNeither half is inferred from a file on disk. Whether a shim is actually installed is\n`majordomus capture status`'s question, and this type deliberately does not answer it.\n\n```\nuse majordomus_cli::capability::builtin::lifecycle::ProviderLifecycle;\nuse serde_json::json;\n\n// a provider the tool adapts and this repository wires: both halves present\nlet full: ProviderLifecycle = serde_json::from_value(json!({\n    \"id\": \"claude\",\n    \"title\": \"Claude Code\",\n    \"lifecycle\": [\"SessionStart\", \"SessionEnd\", \"PreCompact\"],\n    \"prompt_capture\": true,\n    \"client_config\": \".mcp.json\",\n    \"wired\": [\"session.start\", \"session.close\"],\n    \"note\": \"adapted and wired\",\n})).unwrap();\nassert!(!full.lifecycle.is_empty() && !full.wired.is_empty());\nassert!(full.prompt_capture);\n\n// and one the tool ships no adapter for: it loses the automation and none of the model,\n// because every command remains the same\nlet unadapted: ProviderLifecycle = serde_json::from_value(json!({\n    \"id\": \"some-editor\",\n    \"title\": \"Some Editor\",\n    \"prompt_capture\": false,\n    \"note\": \"no lifecycle adapter ships for it\",\n})).unwrap();\nassert!(unadapted.lifecycle.is_empty(), \"nothing will fire for it\");\nassert!(unadapted.client_config.is_empty(), \"and it reads no project-scoped config\");\n```",
      "properties": {
        "client_config": {
          "description": "The file it reads a project-scoped MCP client configuration from, when it has one.",
          "type": "string"
        },
        "id": {
          "description": "The provider id: the bootstrap template's file stem.",
          "type": "string"
        },
        "lifecycle": {
          "description": "The lifecycle events its adapter declares, in the provider's own vocabulary\n(`SessionStart`, `SessionEnd`, `PreCompact`). Empty means the tool ships no\nlifecycle adapter for it: such a provider loses the automation and none of the\nmodel, because every command remains the same.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "note": {
          "description": "What the two together mean.",
          "type": "string"
        },
        "prompt_capture": {
          "description": "Whether its adapter can archive the worker's prompts.",
          "type": "boolean"
        },
        "title": {
          "description": "The name a person knows it by.",
          "type": "string"
        },
        "wired": {
          "description": "The enforcement entries of *this repository's* policy that name this provider's hook\nin `wired_by`. Declared wiring, not a file on disk: whether a shim is installed is a\nquestion for `majordomus capture status`, which is the command that owns it.",
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": [
        "id",
        "title",
        "prompt_capture",
        "note"
      ],
      "type": "object"
    }
  },
  "description": "Every provider the distribution ships a bootstrap for, with the lifecycle half of each.\n\n`with_lifecycle` is a count over `providers` rather than a second list, so the two\ncannot disagree; it is there because \"how many of the providers we support actually get\nthe automation\" is the question this capability exists to answer, and a reader should not\nhave to fold the list to find out.\n\n```\nuse majordomus_cli::capability::builtin::lifecycle::ProviderLifecycles;\nuse serde_json::json;\n\nlet p: ProviderLifecycles = serde_json::from_value(json!({\n    \"providers\": [\n        {\"id\": \"claude\", \"title\": \"Claude Code\", \"lifecycle\": [\"SessionStart\"],\n         \"prompt_capture\": true, \"note\": \"adapted\"},\n        {\"id\": \"plain\", \"title\": \"Plain\", \"prompt_capture\": false, \"note\": \"not adapted\"},\n    ],\n    \"with_lifecycle\": 1,\n})).unwrap();\n\n// the count is over the list, so it is checkable against it\nlet counted = p.providers.iter().filter(|x| !x.lifecycle.is_empty()).count();\nassert_eq!(p.with_lifecycle, counted);\nassert_eq!(p.providers.len(), 2, \"a provider with no adapter is still reported\");\nassert!(p.findings.is_empty());\n```",
  "properties": {
    "findings": {
      "description": "What a reader should know: a provider this repository wires but the distribution\ndeclares no lifecycle for, and the like.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "providers": {
      "description": "The providers, in declaration order.",
      "items": {
        "$ref": "#/$defs/ProviderLifecycle"
      },
      "type": "array"
    },
    "with_lifecycle": {
      "description": "How many of them declare a lifecycle adapter.",
      "format": "uint",
      "minimum": 0,
      "type": "integer"
    }
  },
  "required": [
    "providers",
    "with_lifecycle"
  ],
  "title": "ProviderLifecycles",
  "type": "object"
}

Politiky

benchmark
povinné — cíl na každém transportu, který expozice deklaruje; případy jsou ty ze vstupního typu
cache
process — až 2 záznamy v procesu, vymezené otiskem registru

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
directpokryto1výchozí studený+teplý
mcppokryto1výchozí studený+teplý
httppokryto1výchozí studený+teplý

Tvrzení implementovaná vedle ní

Připojeno souborem, který každé tvrzení implementuje; každé odkazuje na svou stránku s implementací a testem, který je dokazuje.

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