tools tier

tools-archive-guard

PreToolUse hook: deny Bash routes that read the session transcript archive. Complements the settings.json permissions.deny rules, which cover Read/Glob/Grep only.

PreToolUse hook: deny Bash routes that read the session transcript archive. Complements the settings.json permissions.deny rules, which cover Read/Glob/Grep only.

Tiertools
Roleunclassified (baselined)
Pathcrates/tools/archive-guard
Edition2021
Targetstools-archive-guard, tools_archive_guard, oracle
Public items2 across 0 modules
Tests8

What it is for

Decision core for the archive guard. Pure, so every shell route to the archive is a unit test.

Why this exists: session transcripts hold whatever passed through a session — legal case files, medical detail, live credentials. permissions.deny in settings.json blocks Read/Glob/Grep on that path, but a shell command is opaque to it. This closes the shell routes.

Deliberately blunt: any Bash command mentioning the archive path is denied, regardless of what it would do with it. A guard that tries to parse shell semantics loses to the next quoting trick; a guard that refuses the whole path does not.

Capabilities

Decision

Decision core for the archive guard. Pure, so every shell route to the archive is a

Item
pub enum Decision
fn decide(tool_name : & str, command : & str) -> Decision

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 enum Decision
fn decide(tool_name : & str, command : & str) -> Decision

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

Boundary

Depends on no other workspace tier.

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

Dependencies

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
serde^1derivenoalways
serde_json^1noalways

Development. None.

Build. None.

Depended on by. Nothing in this workspace.

Feature flags

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

Targets

KindNameSource
bintools-archive-guard`src/main.rs`
libtools_archive_guard`src/lib.rs`
testoracle`tests/oracle.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 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.

No workspace crate depends on this one.

Verification

KindCount
Unit tests0
Integration tests8
Examples0
Doctests0

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

ModuleTestsExamplesConsumers
crate root200

What the tests establish, by name:

Documentation coverage

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

Metrics

MetricValue
Rust source files2
Source lines131
Code lines87
Public API items2
Public modules0
Tests8
Examples0
Cargo features0
Direct runtime dependencies2
Workspace reverse dependencies0
pie showData
    title Public API by kind
    "enum" : 1
    "function" : 1
pie showData
    title Rust source composition
    "Code" : 87
    "Blank or comment" : 44

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