session_domain.identity
Repozitář, checkout, otevřená epizoda a relace providera, každé s kanonickou hodnotou, kterou tento spustitelný soubor vypočítá, a vedle ní zápisem každého úložiště. Úložiště zaznamenávají repozitář někdy jako absolutní cestu k .git, jindy jako URL remote, worktree jako cestu i jako digest a relaci jako id epizody i UUID providera; tento povrch to říká, aby čtenář nikdy neporovnával dva zápisy různých věcí a nedošel k závěru, že se neshodují.
Repozitář, checkout, otevřená epizoda a relace providera, každé s kanonickou hodnotou, kterou tento spustitelný soubor vypočítá, a vedle ní zápisem každého úložiště. Úložiště zaznamenávají repozitář někdy jako absolutní cestu k .git, jindy jako URL remote, worktree jako cestu i jako digest a relaci jako id epizody i UUID providera; tento povrch to říká, aby čtenář nikdy neporovnával dva zápisy různých věcí a nedošel k závěru, že se neshodují.
- query
- behaviorally_verified
- module session_domain
- #session
- #identity
- #continuity
Zpřístupnění
Kde je tato jedna definice dosažitelná. Absence je explicitní: povrch, který není uveden, ji nenese.
| povrch | jako |
|---|---|
| MCP | nástroj majordomus_session_identity zdroj majordomus://session/identity |
| HTTP | GET /api/v1/session/identity operationId session_domain.identity |
| 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é vlastnosti: schopnost nebere žádný vstup.
JSON Schema
{
"additionalProperties": false,
"description": "No input.",
"title": "Empty",
"type": "object"
}výstup · IdentityReport
use majordomus_cli::capability::builtin::IdentityReport;
use majordomus_cli::session::identities;
let dir = tempfile::tempdir().unwrap();
let report = IdentityReport {
checkout: dir.path().display().to_string(),
facets: identities(dir.path()),
findings: Vec::new(),
};
let subjects: Vec<&str> = report.facets.iter().map(|f| f.subject.as_str()).collect();
assert_eq!(subjects, ["repository", "checkout", "episode", "provider_session"]);| vlastnost | typ | povinné | popis |
|---|---|---|---|
| checkout | string | ano | Checkout, o kterém tato odpověď je. Absolutní cesta, protože tato schopnost se poskytuje pracovníkovi před tímto checkoutem a nikdy se nepublikuje — stejné pravidlo vystavení, které dodržuje continuity.state, ze stejného důvodu (ADR 0014). |
| fasety | array | ano | Jedna položka na subjekt, v pořadí, v jakém se s nimi čtenář setkává: repozitář, checkout, epizoda, relace poskytovatele. |
| zjištění | array | ano | Co by měl čtenář vědět dřív, než porovná kterékoli dvě z nich. Prázdné zde není dobrý případ — záměna je vlastností úložišť, ne tohoto checkoutu — takže stálá poznámka je přítomna vždy. |
JSON Schema
{
"$defs": {
"IdentityFacet": {
"description": "One identity of this checkout, as this executable computes it and as each store spells\nit. What `session.identity` answers, and the direct projection of the audit's table.\n\n```\nuse majordomus_cli::session::{identities, IdentityFacet};\n\nlet dir = tempfile::tempdir().unwrap();\nlet facets: Vec<IdentityFacet> = identities(dir.path());\nlet repository = facets.iter().find(|f| f.subject == \"repository\").expect(\"a facet\");\nassert!(repository.spellings.len() >= 2, \"one word, two writers, two values\");\n```",
"properties": {
"canonical": {
"description": "The canonical value this executable computes, when it can compute one.",
"type": "string"
},
"note": {
"description": "Why the subject needs its own type, in one line, for a reader meeting it in a\nprojection rather than in this module.",
"type": "string"
},
"spellings": {
"description": "How each store spells the same subject, in the order `crate::order` gives.",
"items": {
"$ref": "#/$defs/RecordedSpelling"
},
"type": "array"
},
"subject": {
"description": "What is being identified: `repository`, `checkout`, `episode`, `provider_session`.",
"type": "string"
}
},
"required": [
"subject",
"note"
],
"type": "object"
},
"RecordedSpelling": {
"description": "One store's spelling of one subject.\nWhich half of the layer wrote it, what wrote it, and the value it would have here.\n\n```\nuse majordomus_cli::session::{RecordedSpelling, Spelling};\n\nlet local = RecordedSpelling {\n spelling: Spelling::Local,\n writer: \"mj_git_repo_id (lib/common.sh)\".into(),\n value: \"/src/repo/.git\".into(),\n};\n// knowing which half a string came from is what stops a path being compared with a URL\nassert_eq!(local.spelling.as_str(), \"local\");\nassert!(local.value.starts_with('/'));\n```",
"properties": {
"spelling": {
"$ref": "#/$defs/Spelling",
"description": "Which half of the layer wrote it."
},
"value": {
"description": "The value, as this checkout would have it written. Empty when nothing has written\none here yet, which is a fresh clone and not a fault.",
"type": "string"
},
"writer": {
"description": "The writer, named so a reader can go and look at it.",
"type": "string"
}
},
"required": [
"spelling",
"writer"
],
"type": "object"
},
"Spelling": {
"description": "Which store a recorded identity was read from, kept beside the value.\n\nThe point is not to choose between `mj_git_repo_id` and `mj_repository_id`, or between\n`worktree:` and `worktree_id:`. It is to stop pretending they are one value. A reader\nthat knows a string is the *local* spelling can compare it with other local spellings\nand can refuse to compare it with a shared one, which is precisely the comparison that\nproduced \"these two records are about different repositories\" for records of the same\nrepository written four minutes apart.\n\n```\nuse majordomus_cli::session::Spelling;\n// the two halves are different answers to one question, and are never compared\nassert_ne!(Spelling::Local, Spelling::Shared);\nassert_eq!(Spelling::Canonical.as_str(), \"canonical\");\n```",
"oneOf": [
{
"const": "local",
"description": "The local half's spelling: a path, in `.ai/local/state/`. It names this disk and is\nnever published.",
"type": "string"
},
{
"const": "shared",
"description": "The shared half's spelling: a remote URL or a digest, in `.ai/repo/sessions/`. It\nnames the repository and travels with a clone (ADR 0014).",
"type": "string"
},
{
"const": "canonical",
"description": "This executable's own canonical digest, computed rather than read.",
"type": "string"
}
]
}
},
"description": "The identities of this checkout: one facet per subject, with a standing note about what\na reader must not do with them.\n\n```\nuse majordomus_cli::capability::builtin::IdentityReport;\nuse majordomus_cli::session::identities;\n\nlet dir = tempfile::tempdir().unwrap();\nlet report = IdentityReport {\n checkout: dir.path().display().to_string(),\n facets: identities(dir.path()),\n findings: Vec::new(),\n};\nlet subjects: Vec<&str> = report.facets.iter().map(|f| f.subject.as_str()).collect();\nassert_eq!(subjects, [\"repository\", \"checkout\", \"episode\", \"provider_session\"]);\n```",
"properties": {
"checkout": {
"description": "The checkout this answer is about. An absolute path, because this capability is\nserved to the worker in front of this checkout and never published — the same\nexposure rule `continuity.state` follows and for the same reason (ADR 0014).",
"type": "string"
},
"facets": {
"description": "One entry per subject, in the order a reader meets them: repository, checkout,\nepisode, provider session.",
"items": {
"$ref": "#/$defs/IdentityFacet"
},
"type": "array"
},
"findings": {
"description": "What a reader should know before comparing any two of these. Empty is not the good\ncase here — the conflation is a property of the stores, not of this checkout — so\nthe standing note is always present.",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"checkout",
"facets",
"findings"
],
"title": "IdentityReport",
"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, po 2 s každý, 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.