# `orchestrator.registry.api.capabilities`
<!-- generated by `orchestrator understand`; the PKG is source of truth, edits here are advisory -->

[← Episteme](../README.md) · [Architecture](../architecture.md)

**Source:** [`src/orchestrator/registry/api/capabilities.py`](../../src/orchestrator/registry/api/capabilities.py)

11 types · 11 functions · python

## Changing this safely

**No test module imports this.**

**Most depended-upon here** — a change to these reaches the most code (call graph, ≤4 hops):

- [`_source`](../../src/orchestrator/registry/api/capabilities.py#L46) — reaches **7** symbols · **no test path visible**
- [`JobStartResponse`](../../src/orchestrator/registry/api/capabilities.py#L194) — reaches **5** symbols · **no test path visible**
- [`_started`](../../src/orchestrator/registry/api/capabilities.py#L201) — reaches **4** symbols · **no test path visible**
- [`_in_repo`](../../src/orchestrator/registry/api/capabilities.py#L55) — reaches **3** symbols · **no test path visible**
- [`CapabilityInfo`](../../src/orchestrator/registry/api/capabilities.py#L96) — reaches **1** symbol · **no test path visible**
- [`CatalogResponse`](../../src/orchestrator/registry/api/capabilities.py#L104) — reaches **1** symbol · **no test path visible**
- [`MemoryBankFile`](../../src/orchestrator/registry/api/capabilities.py#L145) — reaches **1** symbol · **no test path visible**
- [`MemoryBankResponse`](../../src/orchestrator/registry/api/capabilities.py#L152) — reaches **1** symbol · **no test path visible**

_10 of the symbols other code depends on here have no test path the graph can see — worth a second look before changing them. Absence of a path is not proof of absence of a test: calls through an attribute chain (`obj.method()`) are skipped rather than guessed at, so indirect coverage is invisible._

## Types

### `CapabilityInfo`

[`src/orchestrator/registry/api/capabilities.py:96`](../../src/orchestrator/registry/api/capabilities.py#L96)

- **Extends** (1): `pydantic.BaseModel`
- **Called by** (1): [`catalog`](../../src/orchestrator/registry/api/capabilities.py#L111)
- **Fields**: `id`, `kind`, `model_config`, `summary`

### `CatalogResponse`

[`src/orchestrator/registry/api/capabilities.py:104`](../../src/orchestrator/registry/api/capabilities.py#L104)

- **Extends** (1): `pydantic.BaseModel`
- **Called by** (1): [`catalog`](../../src/orchestrator/registry/api/capabilities.py#L111)
- **Fields**: `items`, `model_config`

### `JobStartResponse`

[`src/orchestrator/registry/api/capabilities.py:194`](../../src/orchestrator/registry/api/capabilities.py#L194)

- **Extends** (1): `pydantic.BaseModel`
- **Called by** (1): [`_started`](../../src/orchestrator/registry/api/capabilities.py#L201)
- **Fields**: `job_id`, `model_config`, `stream`

### `MemoryBankFile`

[`src/orchestrator/registry/api/capabilities.py:145`](../../src/orchestrator/registry/api/capabilities.py#L145)

- **Extends** (1): `pydantic.BaseModel`
- **Called by** (1): [`memory_bank`](../../src/orchestrator/registry/api/capabilities.py#L160)
- **Fields**: `markdown`, `model_config`, `name`

### `MemoryBankResponse`

[`src/orchestrator/registry/api/capabilities.py:152`](../../src/orchestrator/registry/api/capabilities.py#L152)

- **Extends** (1): `pydantic.BaseModel`
- **Called by** (1): [`memory_bank`](../../src/orchestrator/registry/api/capabilities.py#L160)
- **Fields**: `exists`, `files`, `model_config`

### `PkgRequest`

[`src/orchestrator/registry/api/capabilities.py:283`](../../src/orchestrator/registry/api/capabilities.py#L283)

- **Extends** (1): `pydantic.BaseModel`
- **Fields**: `dialect`, `model_config`, `repo`

### `PlanResponse`

[`src/orchestrator/registry/api/capabilities.py:121`](../../src/orchestrator/registry/api/capabilities.py#L121)

- **Extends** (1): `pydantic.BaseModel`
- **Called by** (1): [`plan`](../../src/orchestrator/registry/api/capabilities.py#L129)
- **Fields**: `model_config`, `plan`, `summary_lines`

### `ProfileRequest`

[`src/orchestrator/registry/api/capabilities.py:72`](../../src/orchestrator/registry/api/capabilities.py#L72)

- **Extends** (1): `pydantic.BaseModel`
- **Fields**: `intent`, `model_config`, `repo`

### `ProfileResponse`

[`src/orchestrator/registry/api/capabilities.py:79`](../../src/orchestrator/registry/api/capabilities.py#L79)

- **Extends** (1): `pydantic.BaseModel`
- **Called by** (1): [`profile`](../../src/orchestrator/registry/api/capabilities.py#L86)
- **Fields**: `model_config`, `profile`

### `StateRequest`

[`src/orchestrator/registry/api/capabilities.py:243`](../../src/orchestrator/registry/api/capabilities.py#L243)

- **Extends** (1): `pydantic.BaseModel`
- **Fields**: `dialect`, `lens`, `model_config`, `refresh`, `repo`

### `UnderstandRequest`

[`src/orchestrator/registry/api/capabilities.py:205`](../../src/orchestrator/registry/api/capabilities.py#L205)

- **Extends** (1): `pydantic.BaseModel`
- **Fields**: `dialect`, `model_config`, `refresh`, `repo`

## Functions

### `_in_repo`

[`src/orchestrator/registry/api/capabilities.py:55`](../../src/orchestrator/registry/api/capabilities.py#L55)

- **Called by** (3): [`memory_bank`](../../src/orchestrator/registry/api/capabilities.py#L160), [`plan`](../../src/orchestrator/registry/api/capabilities.py#L129), [`profile`](../../src/orchestrator/registry/api/capabilities.py#L86)
- **Calls** (2): `fastapi.HTTPException`, `to_thread`

### `_source`

[`src/orchestrator/registry/api/capabilities.py:46`](../../src/orchestrator/registry/api/capabilities.py#L46)

- **Called by** (7): [`memory_bank`](../../src/orchestrator/registry/api/capabilities.py#L160), [`pkg_export`](../../src/orchestrator/registry/api/capabilities.py#L321), [`pkg_extract`](../../src/orchestrator/registry/api/capabilities.py#L291), [`plan`](../../src/orchestrator/registry/api/capabilities.py#L129), [`profile`](../../src/orchestrator/registry/api/capabilities.py#L86), [`state`](../../src/orchestrator/registry/api/capabilities.py#L253), [`understand`](../../src/orchestrator/registry/api/capabilities.py#L214)
- **Calls** (2): `fastapi.HTTPException`, [`resolve_repo_source`](../../src/orchestrator/registry/api/workspace.py#L166)

### `_started`

[`src/orchestrator/registry/api/capabilities.py:201`](../../src/orchestrator/registry/api/capabilities.py#L201)

- **Called by** (4): [`pkg_export`](../../src/orchestrator/registry/api/capabilities.py#L321), [`pkg_extract`](../../src/orchestrator/registry/api/capabilities.py#L291), [`state`](../../src/orchestrator/registry/api/capabilities.py#L253), [`understand`](../../src/orchestrator/registry/api/capabilities.py#L214)
- **Calls** (1): [`JobStartResponse`](../../src/orchestrator/registry/api/capabilities.py#L194)

### `catalog`

[`src/orchestrator/registry/api/capabilities.py:111`](../../src/orchestrator/registry/api/capabilities.py#L111)

- **Calls** (3): [`CapabilityInfo`](../../src/orchestrator/registry/api/capabilities.py#L96), [`CatalogResponse`](../../src/orchestrator/registry/api/capabilities.py#L104), [`default_catalog`](../../src/orchestrator/catalog/catalog.py#L129)

### `memory_bank`

[`src/orchestrator/registry/api/capabilities.py:160`](../../src/orchestrator/registry/api/capabilities.py#L160)

- **Calls** (4): [`MemoryBankFile`](../../src/orchestrator/registry/api/capabilities.py#L145), [`MemoryBankResponse`](../../src/orchestrator/registry/api/capabilities.py#L152), [`_in_repo`](../../src/orchestrator/registry/api/capabilities.py#L55), [`_source`](../../src/orchestrator/registry/api/capabilities.py#L46)

### `pkg_export`

[`src/orchestrator/registry/api/capabilities.py:321`](../../src/orchestrator/registry/api/capabilities.py#L321)

- **Calls** (3): [`_source`](../../src/orchestrator/registry/api/capabilities.py#L46), [`_started`](../../src/orchestrator/registry/api/capabilities.py#L201), [`start_capability_job`](../../src/orchestrator/registry/api/jobs.py#L90)

### `pkg_extract`

[`src/orchestrator/registry/api/capabilities.py:291`](../../src/orchestrator/registry/api/capabilities.py#L291)

- **Calls** (3): [`_source`](../../src/orchestrator/registry/api/capabilities.py#L46), [`_started`](../../src/orchestrator/registry/api/capabilities.py#L201), [`start_capability_job`](../../src/orchestrator/registry/api/jobs.py#L90)

### `plan`

[`src/orchestrator/registry/api/capabilities.py:129`](../../src/orchestrator/registry/api/capabilities.py#L129)

- **Calls** (3): [`PlanResponse`](../../src/orchestrator/registry/api/capabilities.py#L121), [`_in_repo`](../../src/orchestrator/registry/api/capabilities.py#L55), [`_source`](../../src/orchestrator/registry/api/capabilities.py#L46)

### `profile`

[`src/orchestrator/registry/api/capabilities.py:86`](../../src/orchestrator/registry/api/capabilities.py#L86)

- **Calls** (4): [`ProfileResponse`](../../src/orchestrator/registry/api/capabilities.py#L79), [`_in_repo`](../../src/orchestrator/registry/api/capabilities.py#L55), [`_source`](../../src/orchestrator/registry/api/capabilities.py#L46), [`from_repo`](../../src/orchestrator/catalog/profile.py#L62)

### `state`

[`src/orchestrator/registry/api/capabilities.py:253`](../../src/orchestrator/registry/api/capabilities.py#L253)

- **Calls** (4): [`_source`](../../src/orchestrator/registry/api/capabilities.py#L46), [`_started`](../../src/orchestrator/registry/api/capabilities.py#L201), `fastapi.HTTPException`, [`start_capability_job`](../../src/orchestrator/registry/api/jobs.py#L90)

### `understand`

[`src/orchestrator/registry/api/capabilities.py:214`](../../src/orchestrator/registry/api/capabilities.py#L214)

- **Calls** (3): [`_source`](../../src/orchestrator/registry/api/capabilities.py#L46), [`_started`](../../src/orchestrator/registry/api/capabilities.py#L201), [`start_capability_job`](../../src/orchestrator/registry/api/jobs.py#L90)

## Imports

`__future__.annotations`, `asyncio`, `fastapi.APIRouter`, `fastapi.HTTPException`, `fastapi.Request`, `fastapi.status`, `json`, [`orchestrator.catalog.catalog`](../../src/orchestrator/catalog/catalog.py#L1), [`orchestrator.catalog.planner`](../../src/orchestrator/catalog/planner.py#L1), [`orchestrator.catalog.profile`](../../src/orchestrator/catalog/profile.py#L1), [`orchestrator.knowledge`](../../src/orchestrator/knowledge/__init__.py#L1), [`orchestrator.knowledge.current_state`](orchestrator.knowledge.current_state.md), [`orchestrator.knowledge.understand`](../../src/orchestrator/knowledge/understand.py#L1), [`orchestrator.pkg`](../../src/orchestrator/pkg/__init__.py#L1), [`orchestrator.pkg.overview`](../../src/orchestrator/pkg/overview.py#L1), [`orchestrator.registry.api.deps`](../../src/orchestrator/registry/api/deps.py#L1), [`orchestrator.registry.api.jobs`](orchestrator.registry.api.jobs.md), [`orchestrator.registry.api.workspace`](orchestrator.registry.api.workspace.md), `pathlib.Path`, `pydantic.BaseModel`, `pydantic.ConfigDict`, `pydantic.Field`, `tempfile`, `typing.Any`

## Imported by

[`orchestrator.registry.api.app`](../../src/orchestrator/registry/api/app.py#L1)
