Skip to content

API Reference parrot.tools.optimizations.inspection_models

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.tools.optimizations.inspection_models

View source

Strict discriminated contracts for bounded independent inspections (FEAT-584).

Every request kind is validated before any I/O runs: a duplicate id, a malformed range, an abbreviated commit id or an out-of-shape cursor is rejected by Pydantic at admission time, never discovered mid-batch.

Class FilesRequest

List bounded repository-relative paths under validated roots.

Attributes:

Attribute Type Description
id str
kind Literal['files']
paths list[str]
continuation str | None

Class GitDiffNamesRequest

Compare immutable full Git commit ids.

Attributes:

Attribute Type Description
id str
kind Literal['git_diff_names']
base_sha str
head_sha str

Class GitStatusRequest

Read status without index refresh or writes.

Attributes:

Attribute Type Description
id str
kind Literal['git_status']

Class InfoRequest

Inspect metadata without returning unbounded source.

Attributes:

Attribute Type Description
id str
kind Literal['info']
path str

Class InspectionBatch

Ordered response with snapshot consistency and measured byte cost.

Attributes:

Attribute Type Description
schema_version Literal[1]
items list[InspectionItem]
partial bool
consistent bool
head_before str | None
head_after str | None
elapsed_ms int
sum_item_ms int
returned_bytes int

Class InspectionBatchArgs

Bound batch cardinality, admission and response size.

Attributes:

Attribute Type Description
requests list[InspectionRequest]
concurrency int
max_output_bytes int

Class InspectionItem

One stable item result even when peers fail.

Attributes:

Attribute Type Description
id str
kind str
status Literal['ok', 'error', 'cancelled']
data dict[str, object]
error_code str | None
elapsed_ms int
truncated bool
continuation str | None

Class InspectionModel

Reject undeclared arguments before effects.

Attribute InspectionRequest

Class ReadRequest

Read a bounded revision-checked line range.

Attributes:

Attribute Type Description
id str
kind Literal['read']
path str
start_line int | None
end_line int | None
expected_sha256 str | None

Class SearchRequest

Search literal text in confined paths.

Attributes:

Attribute Type Description
id str
kind Literal['search']
paths list[str]
text str
max_matches int
continuation str | None

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally