tools tier

tools-imp

imp — the terminal client over the agent engine: a REPL that parses config, runs the loop and renders events, with every other behavior upstream (ADR 0044 §3)

imp — the terminal client over the agent engine: a REPL that parses config, runs the loop and renders events, with every other behavior upstream (ADR 0044 §3)

Tiertools
Roleunclassified (baselined)
Pathcrates/tools/imp
Edition2021
Targetsimp, cli_test
Public items0 across 0 modules
Tests187

What it is for

imp — thin terminal REPL over the infrastructure-agent engine (Sprint 02).

Thin-layer contract (Gate 4.5): this binary parses config, runs the REPL, and renders events. Every other behavior lives upstream in infrastructure-agent — if logic wants to live here, lift it instead.

Three modes: open (hosted model), private (local Ollama, no network) and research (local Ollama with network). Screening runs in both directions, attachments are read by local OCR before they reach a model, and the file tools are sandboxed to the launch directory plus each --add-dir.

Landed here by git subtree add from its own repository in sprint 4.46; that history is frozen under docs/archive/imp-cli.

Capabilities

No public items.

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

No public items.

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

Boundary

Reaches into foundation, infrastructure, operations.

Shares tier tools with 84 other crates: tools-advisory-reach, tools-archive-guard, tools-artifact-scaffold, tools-ask-ai-core, tools-ask-ais, tools-ask-gemini, tools-book, tools-book-report, … (84 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)tools
Architectural role (taxonomy)unclassified (baselined)
Locationcrates/tools/imp
Vocabulary in force (lexicon)current

Tier flow. Which tiers this crate's own edges cross.

flowchart LR
  n_tools["tools"] --> n_foundation["foundation"]
  n_tools["tools"] --> n_infrastructure["infrastructure"]
  n_tools["tools"] --> n_operations["operations"]

Dependencies

Runtime, in this workspace.

CrateTierOptionalOnly on
`foundation-audit-log`foundationnoalways
`foundation-bounded-io`foundationnoalways
`infrastructure-agent`infrastructurenoalways
`infrastructure-ai`infrastructurenoalways
`infrastructure-ocr-engine`infrastructurenoalways
`infrastructure-ocr-tesseract`infrastructurenoalways
`operations-control-plane`operationsnoalways
`tools-doc-read`toolsnoalways

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
anyhow^1noalways
async-trait^0.1noalways
base64^0.22noalways
libc^0.2noalways
serde^1derive, derivenoalways
serde_json^1noalways
sqlx^0.8runtime-tokio, postgres, chrono, uuid, json, runtime-tokio, … (11 total)noalways
ssh2^0.9noalways
thiserror^2noalways
tokio^1full, fullnoalways
uuid^1v4, v7, serde, js, v4, serdenoalways

Development. None.

Build. None.

Depended on by. Nothing in this workspace.

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

flowchart LR
  SELF["tools-imp"]
  SELF -->|runtime| n_foundation_audit_log["foundation-audit-log"]
  SELF -->|runtime| n_foundation_bounded_io["foundation-bounded-io"]
  SELF -->|runtime| n_infrastructure_agent["infrastructure-agent"]
  SELF -->|runtime| n_infrastructure_ai["infrastructure-ai"]
  SELF -->|runtime| n_infrastructure_ocr_engine["infrastructure-ocr-engine"]
  SELF -->|runtime| n_infrastructure_ocr_tesseract["infrastructure-ocr-tesseract"]
  SELF -->|runtime| n_operations_control_plane["operations-control-plane"]
  SELF -->|runtime| n_tools_doc_read["tools-doc-read"]
  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
binimp`src/main.rs`
testcli_test`tests/cli_test.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 surfacenone detected
async runtimeyes
database accessyes
network I/Onone detected
unsafe codeyes
environment variablesyes

Unsafe code.

SiteSource
unsafe blocksrc/main.rs
unsafe blocksrc/style.rs
unsafe blocksrc/style.rs
unsafe blocksrc/term.rs
unsafe blocksrc/term.rs
unsafe blocksrc/term.rs
unsafe blocksrc/term.rs
unsafe blocksrc/term.rs

Configuration

VariableRead in
CARGO_PKG_VERSIONsrc/control_plane.rs
COLUMNSsrc/style.rs
CORPUS_SOURCECODE_APP_DBsrc/control_plane.rs
HOMEsrc/main.rs
IMP_CLAUDE_ALLOWsrc/main.rs
IMP_CLAUDE_ARGSsrc/main.rs
IMP_CLAUDE_BINsrc/main.rs
NO_COLORsrc/main.rs
OLLAMA_ENDPOINTSsrc/main.rs
PATHsrc/main.rs

No workspace crate depends on this one.

Verification

KindCount
Unit tests167
Integration tests20
Examples0
Doctests0

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc00
Public modules with a //! block00

Metrics

MetricValue
Rust source files18
Source lines6818
Code lines5372
Public API items0
Public modules0
Tests187
Examples0
Cargo features0
Direct runtime dependencies19
Workspace reverse dependencies0
pie showData
    title Rust source composition
    "Code" : 5372
    "Blank or comment" : 1446

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 tools · Manual