PreToolUse hook: deny Bash routes that read the session transcript archive. Complements the settings.json permissions.deny rules, which cover Read/Glob/Grep only.
| Tier | tools |
| Role | unclassified (baselined) |
| Path | crates/tools/archive-guard |
| Edition | 2021 |
| Targets | tools-archive-guard, tools_archive_guard, oracle |
| Public items | 2 across 0 modules |
| Tests | 8 |
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`
| Item | What 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) |
| Location | crates/tools/archive-guard |
| Vocabulary in force (lexicon) | current |
Dependencies
Runtime, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
serde | ^1 | derive | no | always |
serde_json | ^1 | — | no | always |
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
| Kind | Name | Source |
|---|---|---|
| bin | tools-archive-guard | `src/main.rs` |
| lib | tools_archive_guard | `src/lib.rs` |
| test | oracle | `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
| Property | Evidence |
|---|---|
| async public surface | none detected |
| async runtime | none detected |
| database access | none detected |
| network I/O | none detected |
| unsafe code | none detected |
| environment variables | none 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.
Related capabilities
No workspace crate depends on this one.
Verification
| Kind | Count |
|---|---|
| Unit tests | 0 |
| Integration tests | 8 |
| Examples | 0 |
| Doctests | 0 |
Evidence by module. How often each public module is named by something executable.
| Module | Tests | Examples | Consumers |
|---|---|---|---|
crate root | 2 | 0 | 0 |
What the tests establish, by name:
deny_reason_names_the_rule_and_the_sanctioned_path—tests/oracle.rsdirect_reads_of_the_archive_are_denied—tests/oracle.rsindirect_routes_are_denied_too—tests/oracle.rsnon_bash_tools_are_not_this_guards_business—tests/oracle.rsthe_renamed_harness_binary_is_the_same_carve_out—tests/oracle.rsthe_screening_harness_is_the_only_carve_out—tests/oracle.rsthe_transcript_ingest_reader_is_a_sanctioned_carve_out—tests/oracle.rsunrelated_commands_pass—tests/oracle.rs
Documentation coverage
| Measure | Documented | Total |
|---|---|---|
| Public items with rustdoc | 0 | 2 |
Public modules with a //! block | 0 | 0 |
pie showData
title Public items with rustdoc
"Documented" : 0
"No rustdoc detected" : 2
Metrics
| Metric | Value |
|---|---|
| Rust source files | 2 |
| Source lines | 131 |
| Code lines | 87 |
| Public API items | 2 |
| Public modules | 0 |
| Tests | 8 |
| Examples | 0 |
| Cargo features | 0 |
| Direct runtime dependencies | 2 |
| Workspace reverse dependencies | 0 |
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.