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

lifecycle.providers

What each provider's adapter declares

What it is

Per provider: the lifecycle events its adapter declares in the provider's own vocabulary, whether it can archive prompts, and which of this repository's enforcement entries name its hook. Declared in share/providers.yaml and in the policy; never inferred from whether a shim happens to be on disk.

Descriptor

Canonical id
lifecycle.providers
Module
lifecycle
Kind
query
Stability
behaviorallyverified
Provenance
declaredcached
Source
apps/majordomus-cli/src/capability/builtin/lifecycle.rs
Cache
process, 2 entries, no expiry
Benchmark
required
Tags
continuitysessionprovider

Run

query
A query. It reads and changes nothing.

This capability takes no input.

GET /api/v1/lifecycle/providers

Projections

InterfaceAsWhere
MCP toolmajordomus_lifecycle_providers-
MCP resourcenot exposed-
HTTPGET /api/v1/lifecycle/providersSwagger
Command linenot exposed-

Schemas

Input · Empty
{
  "type": "object",
  "additionalProperties": false,
  "description": "No input.",
  "title": "Empty"
}
Output · ProviderLifecycles
{
  "type": "object",
  "properties": {
    "providers": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ProviderLifecycle"
      },
      "description": "The providers, in declaration order."
    },
    "with_lifecycle": {
      "type": "integer",
      "format": "uint",
      "minimum": 0,
      "description": "How many of them declare a lifecycle adapter."
    },
    "findings": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "What a reader should know: a provider this repository wires but the distribution\ndeclares no lifecycle for, and the like."
    }
  },
  "required": [
    "providers",
    "with_lifecycle"
  ],
  "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```",
  "title": "ProviderLifecycles",
  "$defs": {
    "ProviderLifecycle": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The provider id: the bootstrap template's file stem."
        },
        "title": {
          "type": "string",
          "description": "The name a person knows it by."
        },
        "lifecycle": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "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."
        },
        "prompt_capture": {
          "type": "boolean",
          "description": "Whether its adapter can archive the worker's prompts."
        },
        "client_config": {
          "type": "string",
          "description": "The file it reads a project-scoped MCP client configuration from, when it has one."
        },
        "wired": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "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."
        },
        "note": {
          "type": "string",
          "description": "What the two together mean."
        }
      },
      "required": [
        "id",
        "title",
        "prompt_capture",
        "note"
      ],
      "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```"
    }
  }
}

Examples

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

default
{}