knowitall: per-host data-gathering daemon. v0 traverses the filesystem and catalogs its full structure + metadata (permissions, ownership, chflags, all four timestamps) into a local Postgres index (fs_path) -- a fast find/awk-over-SQL layer and the forensic record of FS state. Later: shard/promote to the knowledge base, black box, relay. See docs/planning/KNOWLEDGE-BASE-ROADMAP.md.
| Tier | tools |
| Role | unclassified (baselined) |
| Path | crates/tools/knowitall |
| Edition | 2021 |
| Targets | tools-knowitall, tools_knowitall, adversarial_fs, dlp_audit_worm, dlp_path_audit, e2e_catalog, scope_seam_guard |
| Public items | 81 across 9 modules |
| Tests | 61 |
What it is for
tools-knowitall v0 — filesystem traversal + catalog, and find/awk-style search over it.
Two capabilities, both here:
- ingestion:
walktraverses a root (read-only, symlinks not followed) and
catalog upserts every path — dirs and files — with full FS metadata into the fs_path table (sql/laptop-knowitall.sql).
- search:
findrunsfind-style predicates as indexed SQL overfs_path
(name substring via pg_trgm, path prefix, type, size, uid, mtime) — the fast query layer over the recorded structure. A live walk gives fresh data when the index might be stale.
tools-knowitall records state; it never mutates the filesystem.
Capabilities
crate root
tools-knowitall v0 — filesystem traversal + catalog, and find/awk-style search over it.
| Item |
|---|
fn skip_dir(name : & str) -> bool |
async fn catalog(pool : & PgPool, root : & Path) -> Result <CatalogReport, KnowitallError> |
async fn find(pool : & PgPool, f : & FsFilter) -> Result <Vec <FsEntry>, KnowitallError> |
CatalogReport
tools-knowitall v0 — filesystem traversal + catalog, and find/awk-style search over it.
| Item |
|---|
pub struct CatalogReport |
FsEntry
tools-knowitall v0 — filesystem traversal + catalog, and find/awk-style search over it.
| Item |
|---|
pub struct FsEntry |
fn entry_from_metadata(path : & Path, meta : & fs::Metadata) -> FsEntry |
FsFilter
tools-knowitall v0 — filesystem traversal + catalog, and find/awk-style search over it.
| Item |
|---|
pub struct FsFilter |
FsFilter :: fn default() -> Self |
KnowitallError
tools-knowitall v0 — filesystem traversal + catalog, and find/awk-style search over it.
| Item |
|---|
pub enum KnowitallError |
WalkOutcome
tools-knowitall v0 — filesystem traversal + catalog, and find/awk-style search over it.
| Item |
|---|
pub struct WalkOutcome |
fn walk(root : & Path) -> WalkOutcome |
ask (other)
ask: retrieve from the catalog, then have the local model answer over the retrieved
| Item |
|---|
fn build_context(items : & (String, String, String)) -> String |
Answer
ask: retrieve from the catalog, then have the local model answer over the retrieved
| Item |
|---|
pub struct Answer |
async fn ask(pool : & PgPool, question : & str, granted_scopes : & String, k : i64,) -> Result <Answer, KnowitallError> |
dlp (other)
DLP ingest router — slice 1 of the permissions/security core.
| Item |
|---|
fn route(verdict : & Verdict, scope : ScopeKind) -> RoutingDecision |
fn disposition(decision : & RoutingDecision) -> CatalogDisposition |
fn plan_general_write(content : & str, scope : ScopeKind, policy : & ScreenPolicy,) -> Result <CatalogDisposition, ScreenError> |
fn resolve_scope(path : & str, rules : & ScopeRule) -> ScopeKind |
fn findings_of(verdict : & Verdict) -> & Finding |
fn plan_general_write_audited(content : & str, scope : ScopeKind, policy : & ScreenPolicy,) -> Result <ScreenOutcome, ScreenError> |
CatalogDisposition
DLP ingest router — slice 1 of the permissions/security core.
| Item |
|---|
pub enum CatalogDisposition |
fn decision_label(d : & CatalogDisposition) -> & 'static str |
PathScreen
DLP ingest router — slice 1 of the permissions/security core.
| Item |
|---|
pub struct PathScreen |
fn screen_path(path : & str, policy : & ScreenPolicy) -> Result <PathScreen, ScreenError> |
RoutingDecision
DLP ingest router — slice 1 of the permissions/security core.
| Item |
|---|
pub enum RoutingDecision |
RoutingDecision :: fn writes_general_pool(& self) -> bool |
ScopeKind
DLP ingest router — slice 1 of the permissions/security core.
| Item |
|---|
pub enum ScopeKind |
ScopeRule
DLP ingest router — slice 1 of the permissions/security core.
| Item |
|---|
pub struct ScopeRule |
ScreenOutcome
DLP ingest router — slice 1 of the permissions/security core.
| Item |
|---|
pub struct ScreenOutcome |
extract (other)
Extract: turn a documentation or source-code file into a shard (opaque structure) +
| Item |
|---|
async fn load_scope_rules(pool : & PgPool) -> Result <Vec <ScopeRule>, KnowitallError> |
fn classify_kind(path : & Path) -> & 'static str |
pub const MAX_INGEST_BYTES: u64 |
fn within_ingest_cap(size_bytes : u64, cap : u64) -> bool |
ExtractReport
Extract: turn a documentation or source-code file into a shard (opaque structure) +
| Item |
|---|
pub struct ExtractReport |
async fn extract_tree(pool : & PgPool, root : & Path) -> Result <ExtractReport, KnowitallError> |
Extracted
Extract: turn a documentation or source-code file into a shard (opaque structure) +
| Item |
|---|
pub struct Extracted |
fn extract_text(path : & Path, content : & str) -> Extracted |
IngestOutcome
Extract: turn a documentation or source-code file into a shard (opaque structure) +
| Item |
|---|
pub enum IngestOutcome |
async fn extract_and_catalog(pool : & PgPool, path : & Path, scope : ScopeKind,) -> Result <IngestOutcome, KnowitallError> |
ReadOutcome
Extract: turn a documentation or source-code file into a shard (opaque structure) +
| Item |
|---|
pub enum ReadOutcome |
fn read_for_ingest(path : & Path, cap : u64) -> ReadOutcome |
job (other)
Load-aware job scheduler (roadmap KB-5, sprint 3.69).
| Item |
|---|
fn gate(weight : Weight, load : LoadSample, policy : LoadPolicy) -> Decision |
fn due_and_allowed(jobs : & Job, now : i64, load : LoadSample, policy : LoadPolicy) -> Vec <usize> |
async fn run_due(pool : & PgPool, jobs : & mut Job, now : i64, load : LoadSample, policy : LoadPolicy,) -> Result <Vec <String>, KnowitallError> |
async fn daemon(pool : & PgPool, mut jobs : Vec <Job>, policy : LoadPolicy, tick : Duration,) -> Result <(), KnowitallError> |
Decision
Load-aware job scheduler (roadmap KB-5, sprint 3.69).
| Item |
|---|
pub enum Decision |
Job
Load-aware job scheduler (roadmap KB-5, sprint 3.69).
| Item |
|---|
pub struct Job |
Job :: fn due(& self, now : i64) -> bool |
LoadPolicy
Load-aware job scheduler (roadmap KB-5, sprint 3.69).
| Item |
|---|
pub struct LoadPolicy |
LoadPolicy :: fn default() -> Self |
LoadSample
Load-aware job scheduler (roadmap KB-5, sprint 3.69).
| Item |
|---|
pub struct LoadSample |
async fn current_load() -> LoadSample |
Task
Load-aware job scheduler (roadmap KB-5, sprint 3.69).
| Item |
|---|
pub enum Task |
Weight
Load-aware job scheduler (roadmap KB-5, sprint 3.69).
| Item |
|---|
pub enum Weight |
metrics (other)
System-metrics collector for the laptop (Linux) endpoint: reads /proc + /sys,
| Item |
|---|
fn parse_thermal_millideg(temp : & str) -> Option <f64> |
async fn sample() -> Vec <(& 'static str, Value)> |
async fn collect(pool : & PgPool) -> Result <usize, KnowitallError> |
CpuTimes
System-metrics collector for the laptop (Linux) endpoint: reads /proc + /sys,
| Item |
|---|
pub struct CpuTimes |
fn parse_cpu_stat(proc_stat : & str) -> Option <CpuTimes> |
fn cpu_usage_pct(a : CpuTimes, b : CpuTimes) -> f64 |
DiskStat
System-metrics collector for the laptop (Linux) endpoint: reads /proc + /sys,
| Item |
|---|
pub struct DiskStat |
fn parse_diskstats(diskstats : & str) -> Vec <DiskStat> |
LoadAvg
System-metrics collector for the laptop (Linux) endpoint: reads /proc + /sys,
| Item |
|---|
pub struct LoadAvg |
fn parse_loadavg(loadavg : & str) -> Option <LoadAvg> |
MemInfo
System-metrics collector for the laptop (Linux) endpoint: reads /proc + /sys,
| Item |
|---|
pub struct MemInfo |
fn parse_meminfo(meminfo : & str) -> MemInfo |
provision (other)
Provisioning: ensure the tools-knowitall databases exist and carry the schema. A Rust program,
| Item |
|---|
pub const SCHEMA_SQL: & str |
fn split_dsn(dsn : & str) -> Option <(String, String)> |
fn is_safe_ident(s : & str) -> bool |
async fn provision_db(dsn : & str, schema : & str) -> Result <bool, KnowitallError> |
async fn provision_all(general_dsn : & str) -> Result <(), KnowitallError> |
search (other)
Content search over the catalog: lexical full-text (Postgres tsvector) with ranked,
| Item |
|---|
fn operator_scopes() -> Vec <String> |
SearchHit
Content search over the catalog: lexical full-text (Postgres tsvector) with ranked,
| Item |
|---|
pub struct SearchHit |
async fn search_content(pool : & PgPool, query : & str, granted_scopes : & String, limit : i64,) -> Result <Vec <SearchHit>, KnowitallError> |
serve (other)
HTTP search endpoint. tools-knowitall serve exposes the index over HTTP so staff-ui, peer
| Item |
|---|
fn router(pool : PgPool) -> Router |
async fn serve(pool : PgPool, bind : & str) -> Result <(), Box <dyn std::error::Error>> |
ApiError
HTTP search endpoint. tools-knowitall serve exposes the index over HTTP so staff-ui, peer
| Item |
|---|
ApiError :: fn from(e : KnowitallError) -> Self |
ApiError :: fn into_response(self) -> Response |
Stats
tools-knowitall stats — the cached answer to the recurring inspection questions (how many
| Item |
|---|
pub struct Stats |
async fn gather_stats(pool : & PgPool) -> Result <Stats, KnowitallError> |
fn render(s : & Stats) -> String |
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
tools_knowitall
askdlpextractjobmetricsprovisionsearchservestats
flowchart TD n_tools_knowitall["tools_knowitall"] n_tools_knowitall --> n_ask["ask"] n_tools_knowitall --> n_dlp["dlp"] n_tools_knowitall --> n_extract["extract"] n_tools_knowitall --> n_job["job"] n_tools_knowitall --> n_metrics["metrics"] n_tools_knowitall --> n_provision["provision"] n_tools_knowitall --> n_search["search"] n_tools_knowitall --> n_serve["serve"] n_tools_knowitall --> n_stats["stats"]
Public surface
`crate root`
| Item | What it is |
|---|---|
pub struct FsEntry | One filesystem path (dir or file) with the metadata we record |
fn entry_from_metadata(path : & Path, meta : & fs::Metadata) -> FsEntry | Map a path + its lstat metadata to an FsEntry |
fn skip_dir(name : & str) -> bool | Directories not worth cataloging — build artifacts and VCS internals |
pub struct WalkOutcome | Result of a traversal: the entries found and any paths that could not be read (e.g |
fn walk(root : & Path) -> WalkOutcome | Traverse root (inclusive), recording every dir and file |
pub enum KnowitallError | tools-knowitall failures. |
pub struct CatalogReport | What one catalog run did. |
async fn catalog(pool : & PgPool, root : & Path) -> Result <CatalogReport, KnowitallError> | Ingestion: traverse root and upsert every entry into fs_path (single writer, idempotent — re-cataloging an unchanged tree refreshes last_seen, adds no rows) |
pub struct FsFilter | find-style predicates over the recorded structure |
FsFilter :: fn default() -> Self | — |
async fn find(pool : & PgPool, f : & FsFilter) -> Result <Vec <FsEntry>, KnowitallError> | Search: run the filter as indexed SQL over fs_path |
`ask`
| Item | What it is |
|---|---|
pub struct Answer | A model answer plus the files it was grounded on. |
fn build_context(items : & (String, String, String)) -> String | Build the numbered, cited evidence block from (path, kind, body) items. |
async fn ask(pool : & PgPool, question : & str, granted_scopes : & String, k : i64,) -> Result <Answer, KnowitallError> | Ask the local model a question, grounded in the top-k catalog hits |
`dlp`
| Item | What it is |
|---|---|
pub enum ScopeKind | The security class of the tree a file was found under |
pub enum RoutingDecision | Where a file's content may be persisted, decided from its DLP verdict + scope. |
RoutingDecision :: fn writes_general_pool(& self) -> bool | Whether this decision causes any content to be written to the general knowledgebase pool |
fn route(verdict : & Verdict, scope : ScopeKind) -> RoutingDecision | Decide where a file's content may be persisted |
pub enum CatalogDisposition | How a file's content must be written to the general knowledgebase catalog, after screening + routing |
fn disposition(decision : & RoutingDecision) -> CatalogDisposition | Reduce a routing decision to the concrete general-pool write |
fn plan_general_write(content : & str, scope : ScopeKind, policy : & ScreenPolicy,) -> Result <CatalogDisposition, ScreenError> | "Policy before persist" for one file: screen the content, route it at scope, and reduce to the concrete general-pool write |
pub struct PathScreen | The result of screening a file path for a secret embedded in the name (KB-DLP-4) |
fn screen_path(path : & str, policy : & ScreenPolicy) -> Result <PathScreen, ScreenError> | Screen a file path for a secret embedded in the name, returning a rendering safe to store in a derived artifact (audit row, log line) |
pub struct ScopeRule | A per-tree scope assignment: files under prefix belong to scope |
fn resolve_scope(path : & str, rules : & ScopeRule) -> ScopeKind | Resolve a file path's scope from the host's rules |
fn findings_of(verdict : & Verdict) -> & Finding | The masked findings behind a verdict — the audit payload |
fn decision_label(d : & CatalogDisposition) -> & 'static str | The audit label for a disposition: what the gate decided to do with the content. |
pub struct ScreenOutcome | A screening result carrying both the general-pool write and the masked findings to audit. |
fn plan_general_write_audited(content : & str, scope : ScopeKind, policy : & ScreenPolicy,) -> Result <ScreenOutcome, ScreenError> | "Policy before persist" plus the audit payload: screen the content, route it, and return the concrete general-pool write together with the masked findings the decision rested on |
`extract`
| Item | What it is |
|---|---|
async fn load_scope_rules(pool : & PgPool) -> Result <Vec <ScopeRule>, KnowitallError> | Load the host's per-tree scope rules from gather_config (enabled rows only) |
fn classify_kind(path : & Path) -> & 'static str | Coarse kind by extension (v0 classifier) |
pub struct Extracted | The pieces one text file contributes to its catalog row. |
fn extract_text(path : & Path, content : & str) -> Extracted | Extract shard + search_text from a text file's content |
pub const MAX_INGEST_BYTES: u64 | Maximum bytes read into the DLP classifier / content extractor for one file (Gate 1.5.6 input limit) |
fn within_ingest_cap(size_bytes : u64, cap : u64) -> bool | Whether a file of size_bytes is small enough to read into the classifier |
pub enum ReadOutcome | The outcome of a safe ingest read. |
fn read_for_ingest(path : & Path, cap : u64) -> ReadOutcome | Read a file for ingestion, safely |
pub enum IngestOutcome | What the DLP gate did with one file's content on the general-pool path. |
async fn extract_and_catalog(pool : & PgPool, path : & Path, scope : ScopeKind,) -> Result <IngestOutcome, KnowitallError> | Read one file, screen it for DLP before any write, and persist the general-pool result per the routing decision |
pub struct ExtractReport | What one extract-tree run did. |
async fn extract_tree(pool : & PgPool, root : & Path) -> Result <ExtractReport, KnowitallError> | Walk root and extract every text/source file into catalog (binaries skipped) |
`job`
| Item | What it is |
|---|---|
pub enum Weight | A job's cost class |
pub struct LoadPolicy | Thresholds above which a heavy job holds off |
LoadPolicy :: fn default() -> Self | — |
pub struct LoadSample | A point-in-time load reading (from tools-knowitall's own metrics). |
pub enum Decision | Whether a job may start now. |
fn gate(weight : Weight, load : LoadSample, policy : LoadPolicy) -> Decision | The load-aware gate: light always runs; heavy runs only when load is under policy. |
pub enum Task | What a job actually does. |
pub struct Job | A scheduled job: its cadence, cost class, and last-run time (unix seconds). |
Job :: fn due(& self, now : i64) -> bool | — |
fn due_and_allowed(jobs : & Job, now : i64, load : LoadSample, policy : LoadPolicy) -> Vec <usize> | Indices of jobs that are both due and allowed by load at now |
async fn current_load() -> LoadSample | Sample current load: CPU busy % over a short interval + the 1-minute load average |
async fn run_due(pool : & PgPool, jobs : & mut Job, now : i64, load : LoadSample, policy : LoadPolicy,) -> Result <Vec <String>, KnowitallError> | Run one scheduling pass: execute every due-and-allowed job, stamp its last_run, and return the names of the jobs that ran |
async fn daemon(pool : & PgPool, mut jobs : Vec <Job>, policy : LoadPolicy, tick : Duration,) -> Result <(), KnowitallError> | Daemon loop: every tick, sample load and run whatever is due and allowed |
`metrics`
| Item | What it is |
|---|---|
pub struct CpuTimes | The ten counters on /proc/stat's cpu line (USER_HZ ticks, cumulative). |
fn parse_cpu_stat(proc_stat : & str) -> Option <CpuTimes> | Parse the aggregate cpu line from /proc/stat. |
fn cpu_usage_pct(a : CpuTimes, b : CpuTimes) -> f64 | CPU busy percentage between two samples (0.0–100.0) |
pub struct MemInfo | Selected fields from /proc/meminfo (all in kB, as the file reports). |
fn parse_meminfo(meminfo : & str) -> MemInfo | Parse /proc/meminfo (Key: N kB), taking the fields we record. |
pub struct LoadAvg | The three load averages from /proc/loadavg. |
fn parse_loadavg(loadavg : & str) -> Option <LoadAvg> | Parse /proc/loadavg (1m 5m 15m running/total lastpid). |
fn parse_thermal_millideg(temp : & str) -> Option <f64> | Convert a /sys/class/thermal/*/temp value (millidegrees C) to degrees C. |
pub struct DiskStat | One device row from /proc/diskstats (cumulative counters). |
fn parse_diskstats(diskstats : & str) -> Vec <DiskStat> | Parse /proc/diskstats |
async fn sample() -> Vec <(& 'static str, Value)> | Take one telemetry sample of every metric this endpoint reads: cpu (busy % over a short interval), memory, load, thermal (per zone), diskstats |
async fn collect(pool : & PgPool) -> Result <usize, KnowitallError> | Collect one sample of every metric and write the rows into telemetry |
`provision`
| Item | What it is |
|---|---|
pub const SCHEMA_SQL: & str | The embedded schema applied to a freshly created database. |
fn split_dsn(dsn : & str) -> Option <(String, String)> | Split a Postgres DSN into (admin_dsn, dbname) where admin_dsn targets the postgres maintenance database on the same server (you cannot CREATE DATABASE while connected to the database you are creating) |
fn is_safe_ident(s : & str) -> bool | Whether a string is a safe bare Postgres identifier for interpolation into CREATE DATABASE (which cannot be parameterized) |
async fn provision_db(dsn : & str, schema : & str) -> Result <bool, KnowitallError> | Ensure the database named in dsn exists and, if it had to be created, apply schema |
async fn provision_all(general_dsn : & str) -> Result <(), KnowitallError> | Provision the tools-knowitall index database (single DB, KB-DLP-5) |
`search`
| Item | What it is |
|---|---|
fn operator_scopes() -> Vec <String> | The local host operator's granted scopes for the direct CLI / loopback-daemon path |
pub struct SearchHit | One content-search hit: where it is, what kind, its lexical rank, and a snippet with the match highlighted («…»). |
async fn search_content(pool : & PgPool, query : & str, granted_scopes : & String, limit : i64,) -> Result <Vec <SearchHit>, KnowitallError> | Lexical full-text search over catalog.search_text |
`serve`
| Item | What it is |
|---|---|
ApiError :: fn from(e : KnowitallError) -> Self | — |
ApiError :: fn into_response(self) -> Response | — |
fn router(pool : PgPool) -> Router | The tools-knowitall HTTP router (state = the index pool). |
async fn serve(pool : PgPool, bind : & str) -> Result <(), Box <dyn std::error::Error>> | Bind and serve the router until the process is stopped |
`stats`
| Item | What it is |
|---|---|
pub struct Stats | Row-count + coverage snapshot of a tools-knowitall index. |
async fn gather_stats(pool : & PgPool) -> Result <Stats, KnowitallError> | Gather the stats in a few grouped queries |
fn render(s : & Stats) -> String | Render the stats as a readable report. |
Re-exports. Exported here, defined elsewhere.
| Export | Defined in |
|---|---|
foundation_fs_metadataasfsmeta | foundation_fs_metadataasfsmeta |
Boundary
Reaches into domain, foundation, infrastructure.
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) |
| Location | crates/tools/knowitall |
| Vocabulary in force (lexicon) | current |
Tier flow. Which tiers this crate's own edges cross.
flowchart LR n_tools["tools"] --> n_domain["domain"] n_tools["tools"] --> n_foundation["foundation"] n_tools["tools"] --> n_infrastructure["infrastructure"]
Dependencies
Runtime, in this workspace.
| Crate | Tier | Optional | Only on |
|---|---|---|---|
| `domain-prose-shard` | domain | no | always |
| `domain-table-shard` | domain | no | always |
| `domain-transcript-shard` | domain | no | always |
| `foundation-audit-log` | foundation | no | always |
| `foundation-fs-metadata` | foundation | no | always |
| `infrastructure-ai` | infrastructure | no | always |
| `infrastructure-dlp-detect` | infrastructure | no | always |
| `tools-doc-shape` | tools | no | always |
| `tools-local-ask` | tools | no | always |
Runtime, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
axum | ^0.7 | — | no | always |
chrono | ^0.4 | serde | no | always |
clap | ^4 | derive | no | always |
serde | ^1 | derive, derive | no | always |
serde_json | ^1 | — | no | always |
sqlx | ^0.8 | runtime-tokio, postgres, chrono, uuid, json | no | always |
thiserror | ^2 | — | no | always |
tokio | ^1 | full, macros, rt-multi-thread, net | no | always |
uuid | ^1 | v4, v7, serde, js, v4 | no | always |
uzers | ^0.12 | — | no | always |
Development, in this workspace.
| Crate | Tier | Optional | Only on |
|---|---|---|---|
| `tools-cli-conformance` | tools | no | always |
Build. None.
Depended on by. Nothing in this workspace.
Signal flow — what reaches this crate, and what it reaches.
flowchart LR SELF["tools-knowitall"] SELF -->|development| n_tools_cli_conformance["tools-cli-conformance"] SELF -->|runtime| n_domain_prose_shard["domain-prose-shard"] SELF -->|runtime| n_domain_table_shard["domain-table-shard"] SELF -->|runtime| n_domain_transcript_shard["domain-transcript-shard"] SELF -->|runtime| n_foundation_audit_log["foundation-audit-log"] SELF -->|runtime| n_foundation_fs_metadata["foundation-fs-metadata"] SELF -->|runtime| n_infrastructure_ai["infrastructure-ai"] SELF -->|runtime| n_infrastructure_dlp_detect["infrastructure-dlp-detect"] SELF -->|runtime| n_tools_doc_shape["tools-doc-shape"] SELF -->|runtime| n_tools_local_ask["tools-local-ask"] 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
| Kind | Name | Source |
|---|---|---|
| bin | tools-knowitall | `src/main.rs` |
| lib | tools_knowitall | `src/lib.rs` |
| test | adversarial_fs | `tests/adversarial_fs.rs` |
| test | dlp_audit_worm | `tests/dlp_audit_worm.rs` |
| test | dlp_path_audit | `tests/dlp_path_audit.rs` |
| test | e2e_catalog | `tests/e2e_catalog.rs` |
| test | scope_seam_guard | `tests/scope_seam_guard.rs` |
Error model
| Error type | Named by |
|---|---|
KnowitallError | ask, catalog, collect, daemon, extract_and_catalog, extract_tree, … (13 total) |
Operational characteristics
| Property | Evidence |
|---|---|
| async public surface | yes |
| async runtime | yes |
| database access | yes |
| network I/O | yes |
| unsafe code | none detected |
| environment variables | yes |
No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.
Configuration
| Variable | Read in |
|---|---|
KNOWITALL_INDEX_DSN | src/main.rs |
Related capabilities
No workspace crate depends on this one.
Verification
| Kind | Count |
|---|---|
| Unit tests | 56 |
| Integration tests | 5 |
| Examples | 0 |
| Doctests | 0 |
Evidence by module. How often each public module is named by something executable.
| Module | Tests | Examples | Consumers |
|---|---|---|---|
crate root | 10 | 0 | 0 |
ask | 3 | 0 | 0 |
dlp | 14 | 0 | 0 |
extract | 12 | 0 | 0 |
job | 11 | 0 | 0 |
metrics | 12 | 0 | 0 |
provision | 5 | 0 | 0 |
search | 3 | 0 | 0 |
serve | 2 | 0 | 0 |
stats | 3 | 0 | 0 |
What the tests establish, by name:
a_seeded_secret_never_reaches_general_content_or_the_audit_path—tests/adversarial_fs.rsdlp_decision_audit_trail_is_worm—tests/dlp_audit_worm.rsa_secret_in_a_filename_is_masked_in_the_dlp_decision_audit—tests/dlp_path_audit.rscatalog_a_tree_then_find_over_it—tests/e2e_catalog.rsevery_catalog_or_fs_path_read_is_scope_guarded—tests/scope_seam_guard.rscontext_lists_numbered_cited_items_with_bodies—src/ask.rsa_clean_path_passes_through_unmasked_and_is_not_sensitive—src/dlp.rsa_matching_vault_rule_makes_it_vault—src/dlp.rsa_secret_in_a_filename_is_masked_for_the_audit_and_flagged_sensitive—src/dlp.rsallow_on_general_includes—src/dlp.rsaudited_plan_carries_both_the_write_and_the_findings—src/dlp.rsblock_on_general_excludes_content—src/dlp.rsblock_on_vault_routes_to_vault—src/dlp.rsdecision_label_maps_each_disposition—src/dlp.rsdisposition_maps_each_decision—src/dlp.rsevery_vault_verdict_routes_to_vault_never_the_general_pool—src/dlp.rsfindings_of_yields_masked_findings_and_never_raw—src/dlp.rsgeneral_block_writes_no_general_content—src/dlp.rshigh_severity_tracks_the_primitive_default_block_table—src/dlp.rsno_rules_means_general—src/dlp.rsplan_excludes_a_policy_redacted_secret_on_general—src/dlp.rsplan_excludes_a_secret_on_a_general_tree—src/dlp.rsplan_indexes_clean_content_on_a_general_tree—src/dlp.rsplan_skips_the_general_pool_for_a_vault_tree—src/dlp.rsprefix_match_respects_path_boundaries—src/dlp.rsredact_carrying_a_secret_grade_finding_fails_closed_on_general—src/dlp.rsredact_mixing_pii_and_a_secret_fails_closed—src/dlp.rsredact_on_general_is_metadata_only_with_the_redacted_text—src/dlp.rsredact_with_a_secret_still_routes_to_vault_on_vault_scope—src/dlp.rsredact_with_only_pii_findings_stays_metadata_only—src/dlp.rs- _… 31 more_
Documentation coverage
| Measure | Documented | Total |
|---|---|---|
| Public items with rustdoc | 76 | 81 |
Public modules with a //! block | 9 | 9 |
pie showData
title Public items with rustdoc
"Documented" : 76
"No rustdoc detected" : 5
Metrics
| Metric | Value |
|---|---|
| Rust source files | 11 |
| Source lines | 3070 |
| Code lines | 2342 |
| Public API items | 81 |
| Public modules | 9 |
| Tests | 61 |
| Examples | 0 |
| Cargo features | 0 |
| Direct runtime dependencies | 19 |
| Workspace reverse dependencies | 0 |
pie showData
title Public API by kind
"constant" : 2
"enum" : 9
"function" : 45
"method" : 6
"struct" : 19
pie showData
title Rust source composition
"Code" : 2342
"Blank or comment" : 728
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.