infrastructure tier

infrastructure-ocr-ai

AI-vision OCR engine for infrastructure-ocr-engine: adapts any infrastructure-ai AiProvider (Anthropic vision, Claude CLI, ...) into an OcrEngine. REMOTE by nature — deliberately does NOT implement LocalOcrEngine, so it cannot be used on the DLP screen path.

AI-vision OCR engine for infrastructure-ocr-engine: adapts any infrastructure-ai AiProvider (Anthropic vision, Claude CLI, ...) into an OcrEngine. REMOTE by nature — deliberately does NOT implement LocalOcrEngine, so it cannot be used on the DLP screen path.

Tierinfrastructure
Roleunclassified (baselined)
Pathcrates/infrastructure/ocr-ai
Edition2021
Targetsinfrastructure_ocr_ai
Public items6 across 0 modules
Tests3

What it is for

infrastructure-ocr-ai — an AI-vision OcrEngine that adapts any infrastructure-ai AiProvider (Anthropic vision, Claude CLI vision, …) into text recognition.

It sends the image to the provider with an OCR system prompt and returns the provider's transcription.

Deliberately REMOTE — no LocalOcrEngine

This adapter transmits the image to a provider (network API, or a CLI that reads a file). It therefore intentionally does NOT implement `infrastructure_ocr_engine::LocalOcrEngine` — so it cannot be constructed into a DLP consumer bounded on E: LocalOcrEngine. That is the whole point of the split: the "never exfiltrate screen pixels" guarantee is enforced by the type system, not a runtime flag. Use this engine for general OCR (documents, catalog scans), never for the DLP screen sensor.

Capabilities

crate root

infrastructure-ocr-ai — an AI-vision OcrEngine that adapts any infrastructure-ai

Item
pub const DEFAULT_OCR_PROMPT: & str

AiVisionEngine

infrastructure-ocr-ai — an AI-vision OcrEngine that adapts any infrastructure-ai

Item
pub struct AiVisionEngine
AiVisionEngine :: fn new(provider : Arc <dyn AiProvider>) -> Self
AiVisionEngine :: fn with_prompt(mut self, prompt : impl Into <String>) -> Self
AiVisionEngine :: fn provider_id(& self) -> & 'static str
AiVisionEngine :: async fn recognize(& self, input : & OcrInput <'_>) -> Result <OcrText, OcrError>

How to use it

No examples/ target and no doctest in this crate's rustdoc. The tests listed under Verification are the closest executable usage.

Module structure

No public modules: the crate root is its whole surface.

Public surface

`crate root`

ItemWhat it is
pub const DEFAULT_OCR_PROMPT: & strThe default OCR instruction sent as the system prompt.
pub struct AiVisionEngineAn OcrEngine backed by a infrastructure-ai vision provider.
AiVisionEngine :: fn new(provider : Arc <dyn AiProvider>) -> SelfWrap a provider (from AiProviderFactory or constructed directly) with the default OCR prompt.
AiVisionEngine :: fn with_prompt(mut self, prompt : impl Into <String>) -> SelfOverride the OCR system prompt.
AiVisionEngine :: fn provider_id(& self) -> & 'static str
AiVisionEngine :: async fn recognize(& self, input : & OcrInput <'_>) -> Result <OcrText, OcrError>

No pub use re-exports: every item above is declared in this crate.

Boundary

Depends on no other workspace tier.

Shares tier infrastructure with 82 other crates: infrastructure-acquire, infrastructure-adapters-google-calendar, infrastructure-adapters-google-gmail, infrastructure-adapters-google-places, infrastructure-adapters-google-trends, infrastructure-adapters-shodan, infrastructure-adapters-yelp, infrastructure-agent, … (82 total).

_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._

Where it sits

Tier (ontology)infrastructure
Architectural role (taxonomy)unclassified (baselined)
Locationcrates/infrastructure/ocr-ai
Vocabulary in force (lexicon)current

Dependencies

Runtime, in this workspace.

CrateTierOptionalOnly on
`infrastructure-ai`infrastructurenoalways
`infrastructure-ocr-engine`infrastructurenoalways

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
async-trait^0.1noalways

Development, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
tokio^1full, macros, rt-multi-threadnoalways

Build. None.

Depended on by. 1 workspace crate.

Signal flow — what reaches this crate, and what it reaches.

flowchart LR
  n_infrastructure_ocr_provider["infrastructure-ocr-provider"] -->|uses| SELF
  SELF["infrastructure-ocr-ai"]
  SELF -->|runtime| n_infrastructure_ai["infrastructure-ai"]
  SELF -->|runtime| n_infrastructure_ocr_engine["infrastructure-ocr-engine"]
  classDef self fill:#1f883d,stroke:#1f883d,color:#fff;
  class SELF self;

Feature flags

No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.

Targets

KindNameSource
libinfrastructure_ocr_ai`src/lib.rs`

Error model

No public error type was detected: no public item declares a type named *Error, and no public signature returns one.

Operational characteristics

PropertyEvidence
async public surfaceyes
async runtimenone detected
database accessnone detected
network I/Onone detected
unsafe codenone detected
environment variablesnone detected

No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.

Configuration

No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.

1 workspace crate depends on this one: infrastructure-ocr-provider.

Verification

KindCount
Unit tests3
Integration tests0
Examples0
Doctests0

Evidence by module. How often each public module is named by something executable.

ModuleTestsExamplesConsumers
crate root201

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc46
Public modules with a //! block00
pie showData
    title Public items with rustdoc
    "Documented" : 4
    "No rustdoc detected" : 2

Metrics

MetricValue
Rust source files1
Source lines132
Code lines84
Public API items6
Public modules0
Tests3
Examples0
Cargo features0
Direct runtime dependencies3
Workspace reverse dependencies1
pie showData
    title Public API by kind
    "constant" : 1
    "method" : 4
    "struct" : 1
pie showData
    title Rust source composition
    "Code" : 84
    "Blank or comment" : 48

Generation

Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.

All infrastructure · Manual