tools capa

tools-demo-shopping

The recorded end-to-end shopping demo (ported from scripts/demo-shopping{,-full}.sh via the script-scan pipeline), rebuilt on infrastructure-screencast: cold Chrome start, humanized Amazon+eBay search through the extension bridge, streaming ingest telemetry, first-pass analysis, top-5 enrichment, dual-AI recommendations, buy links — all while recording the screen with terminal-left/browser-right choreography. The four inline python formatters of the bash originals are absorbed into unit-tested Rust.

The recorded end-to-end shopping demo (ported from scripts/demo-shopping{,-full}.sh via the script-scan pipeline), rebuilt on infrastructure-screencast: cold Chrome start, humanized Amazon+eBay search through the extension bridge, streaming ingest telemetry, first-pass analysis, top-5 enrichment, dual-AI recommendations, buy links — all while recording the screen with terminal-left/browser-right choreography. The four inline python formatters of the bash originals are absorbed into unit-tested Rust.

Tiertools
Roleunclassified (baselined)
Pathcrates/tools/demo-shopping
Edition2021
Targetstools-demo-shopping, tools_demo_shopping
Public items11 across 0 modules
Tests9

What it is for

Pure logic for the shopping demo: product parsing/sorting/formatting and journal-signal classification. Ports (and unit-tests) the four inline python blobs from demo-shopping-full.sh.

Capabilities

crate root

Pure logic for the shopping demo: product parsing/sorting/formatting and

Item
fn extract_db_query(query : & str) -> String
fn search_command(query : & str) -> Value
fn enrich_command(urls : Value) -> Value

JournalSignal

Pure logic for the shopping demo: product parsing/sorting/formatting and

Item
pub enum JournalSignal
fn classify_journal(recent : & str) -> JournalSignal

Product

Pure logic for the shopping demo: product parsing/sorting/formatting and

Item
pub struct Product
fn parse_compare(json : & str) -> Vec <Product>
fn format_top(products : & Product, k : usize) -> String
fn top5_urls(products : & Product) -> Value
fn comparison_lines(products : & Product, k : usize) -> String
fn buy_links(products : & Product, k : usize) -> 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

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

Public surface

`crate root`

ItemWhat it is
pub struct ProductOne product row from /api/shopping/compare, reduced to what the demo renders
fn parse_compare(json : & str) -> Vec <Product>Parse the compare-endpoint JSON into price-sorted products (pure)
fn format_top(products : & Product, k : usize) -> StringThe "Found N products
fn top5_urls(products : & Product) -> ValueTop-5 enrichment targets as the bridge's urls JSON (python blob #1 tail — in memory now, no /tmp/demo_top5_urls.json side file).
fn comparison_lines(products : & Product, k : usize) -> StringThe AI-prompt comparison lines (python blob #3).
fn buy_links(products : & Product, k : usize) -> StringThe buy-links box body (python blob #4).
fn extract_db_query(query : & str) -> StringExtract the DB-search noun from the spoken query (the bash grep list): prefer a known product noun, else the first two words
pub enum JournalSignalWhat the recent service journal says about an in-flight search.
fn classify_journal(recent : & str) -> JournalSignalClassify recent journal output (pure)
fn search_command(query : & str) -> ValueThe shopping_search bridge command body (typed, never string-spliced).
fn enrich_command(urls : Value) -> ValueThe enrich_products bridge command body.

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

Boundary

Reaches into 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)
Locationcrates/tools/demo-shopping
Vocabulary in force (lexicon)current

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

flowchart LR
  n_tools["tools"] --> n_infrastructure["infrastructure"]

Dependencies

Runtime, in this workspace.

CrateTierOptionalOnly on
`infrastructure-screencast`infrastructurenoalways

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
anyhow^1noalways
serde_json^1noalways

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-demo-shopping"]
  SELF -->|runtime| n_infrastructure_screencast["infrastructure-screencast"]
  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
bintools-demo-shopping`src/main.rs`
libtools_demo_shopping`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 surfacenone detected
async runtimenone detected
database accessnone detected
network I/Onone detected
unsafe codenone detected
environment variablesyes

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

Configuration

VariableRead in
API_KEYsrc/main.rs
HOMEsrc/main.rs

No workspace crate depends on this one.

Verification

KindCount
Unit tests9
Integration tests0
Examples0
Doctests0

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

ModuleTestsExamplesConsumers
crate root1100

What the tests establish, by name:

Documentation coverage

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

Metrics

MetricValue
Rust source files2
Source lines716
Code lines617
Public API items11
Public modules0
Tests9
Examples0
Cargo features0
Direct runtime dependencies3
Workspace reverse dependencies0
pie showData
    title Public API by kind
    "enum" : 1
    "function" : 9
    "struct" : 1
pie showData
    title Rust source composition
    "Code" : 617
    "Blank or comment" : 99

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.

Todas las tools · Manual