{
  "id": "model",
  "runtimeRequirements": [
    "Pi setModel/getThinkingLevel/setThinkingLevel APIs",
    "Pi model registry with reasoning/thinkingLevelMap capability metadata",
    "Pi custom UI",
    "Global user model role config",
    "Locus model-settings role resolver",
    "the shared inline interaction slot fences Pi's own close callback by slot ownership: a component the host silently replaced can no longer run the host's editor-restore path, so a late timeout, abort, or queued key from a superseded prompt cannot blank the interaction that replaced it, and the incumbent is retired only once the newcomer's factory has produced a component, so a request that never appears cannot take the slot; when a factory rejects, Pi restores the editor over the live component anyway, so the incumbent is explicitly retired on that path too and its owner is told rather than left awaiting a surface that is off the screen; a retired caller sees the typed stale error and reports benign replacement rather than failure — /model-roles closes benignly and keeps any applied route"
  ],
  "stateUsed": [
    "Pi defaultProvider/defaultModel",
    "global ~/.pi/agent/model-roles/config.json",
    "optional project .locus/runtime/session-state.jsonl runtime event",
    "optional session custom entry evidence"
  ],
  "provides": {
    "tools": [],
    "commands": ["model-roles"],
    "hooks": ["session_start", "input"]
  },
  "uiLifecycle": {
    "commands": [
      {
        "name": "model-roles",
        "taxonomy": ["overlay-selector", "transient-widget", "persistent-state", "status"],
        "transient": ["widget:model-roles"],
        "persistent": [
          "status:locus contribution model.roles",
          "~/.pi/agent/model-roles/config.json",
          ".locus/runtime/session-state.jsonl"
        ]
      }
    ]
  },
  "permissions": {
    "filesystem": {
      "read": ["~/.pi/agent/model-roles/config.json"],
      "write": [
        "~/.pi/agent/model-roles/config.json",
        "~/.pi/agent/model-roles/config.json.lock",
        "~/.pi/agent/model-roles/config.json.*.tmp",
        ".locus/runtime/session-state.jsonl"
      ]
    },
    "subprocess": [],
    "network": [],
    "browser": false,
    "models": true,
    "ui": ["custom", "setStatus", "setWidget"]
  },
  "risk": "medium",
  "docsPath": "extensions/model/README.md",
  "tests": [
    "tests/extensions/model/model.test.ts",
    "tests/extensions/model/model-persistence.test.ts",
    "tests/contracts/extensions/runtime-registration.test.ts",
    "tests/shared/operator/operator-interaction-slot.test.ts"
  ]
}
