codenib.integrations
¶
Compatibility providers for external coding-agent runtimes.
Modules:
| Name | Description |
|---|---|
locagent |
LocAgent/OpenHands-compatible tools over CodeNib repository views. |
orcaloca |
OrcaLoca search-manager compatibility over CodeNib repository views. |
Classes:
| Name | Description |
|---|---|
IntegrationCapabilityError |
A required manifest view is missing, stale, or failed to load. |
RepositoryAdapter |
Read-only repository facts backed by one |
RepositoryEntity |
A stable adapter-local view of one graph vertex. |
RepositoryPathError |
A requested path is invalid or escapes the manifest repository. |
IntegrationCapabilityError
¶
Bases: RuntimeError
A required manifest view is missing, stale, or failed to load.
RepositoryAdapter
¶
Read-only repository facts backed by one ServerContext.
Methods:
| Name | Description |
|---|---|
from_manifest |
Load one |
require_view |
Return a loaded view or raise with manifest-aware diagnostics. |
normalize_path |
Return a safe repository-relative POSIX path. |
read_range |
Read an inclusive 0-based range and return its actual bounds. |
containing_entity |
Return the narrowest symbol containing a 0-based source line. |
distance |
Return the shorter directed distance, or |
file_tree |
Render a deterministic tree from files represented in the graph. |
skeleton |
Render a language-neutral signature skeleton from graph ranges. |
Source code in codenib/integrations/_repository.py
from_manifest
classmethod
¶
Load one ServerContext and bind an adapter to it.
Source code in codenib/integrations/_repository.py
require_view
¶
Return a loaded view or raise with manifest-aware diagnostics.
Source code in codenib/integrations/_repository.py
normalize_path
¶
Return a safe repository-relative POSIX path.
Source code in codenib/integrations/_repository.py
read_range
¶
read_range(
file_path: str, start_line: int | None = None, end_line: int | None = None
) -> tuple[str, int, int]
Read an inclusive 0-based range and return its actual bounds.
Source code in codenib/integrations/_repository.py
containing_entity
¶
containing_entity(file_path: str, line: int) -> RepositoryEntity | None
Return the narrowest symbol containing a 0-based source line.
Source code in codenib/integrations/_repository.py
distance
¶
Return the shorter directed distance, or -1 if unresolved.
Source code in codenib/integrations/_repository.py
file_tree
¶
Render a deterministic tree from files represented in the graph.
Source code in codenib/integrations/_repository.py
skeleton
¶
skeleton(entity: RepositoryEntity) -> str
Render a language-neutral signature skeleton from graph ranges.
Source code in codenib/integrations/_repository.py
RepositoryEntity
dataclass
¶
RepositoryEntity(
vertex_id: int,
canonical_name: str,
display_name: str,
kind: str,
file_path: str,
qualified_name: str,
simple_name: str,
start_line: int | None,
end_line: int | None,
parent_name: str | None = None,
class_name: str | None = None,
)
A stable adapter-local view of one graph vertex.
Lines remain 0-based internally. Integrations convert them exactly once while formatting results for their external agent contract.
RepositoryPathError
¶
Bases: ValueError
A requested path is invalid or escapes the manifest repository.