sovereign_inspect_archive
Inspect archive containers in-memory with zero disk extraction, slice sections by heading or character offset, and relocate or purge indexed corpus prefixes without reindexing.
Instructions
Streams and inspects .hdx, .hwics, .zip, .xlsx, .docx, .tar.zst, or .epub containers purely in-memory (O_RDONLY, zero disk extraction) per ADR-07. Also supports section/offset slicing (section_filter, char_offset) and zero-reindex corpus path relocation / stale relationship cleanup (action='relocate_prefix' | 'purge_prefix' | 'corpus_stats').
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Optional keyword or alarm code filter to match against archive entries | |
| action | No | Operation mode: 'inspect' (default), 'relocate_prefix' (re-point archive:// URIs & rebuild clean graph edges without re-indexing), 'purge_prefix' (delete records & relationships for an old prefix), or 'corpus_stats' | inspect |
| ingest | No | Whether to ingest matched archive entries into the knowledge graph | |
| max_chars | No | Maximum characters to return from the resolved archive entry | |
| new_prefix | No | New directory/URI prefix to point existing indexed records and graph relationships to (e.g. '/home/tlima/Enterprise_Hub/docs/Hua_Docs') | |
| old_prefix | No | Old directory/URI prefix to relocate or purge (e.g. '/tmp/docs_rag_gemini') | |
| char_offset | No | Optional character start offset when reading a long archive entry | |
| virtual_uri | No | Optional canonical virtual URI (archive://<archive_path>#<entry_name>) to resolve directly in-memory | |
| archive_path | No | Path to the archive container (.hdx, .hwics, .zip, .tar.zst, .epub) to inspect | |
| section_filter | No | Optional section heading filter (e.g. 'Possible Causes', 'Procedure', 'Parameters') to extract that exact section without Python slicing | |
| enrich_deep_alarms | No | When relocating Huawei .hwics packages, stream resources/alarms/*.html in-memory from new_prefix to persist full 18k-char Possible Causes & Procedures | |
| artifact_output_dir | No | Optional directory path to save extracted PNG diagrams (defaults to dev/aegis-sovereign-appliance/data/extracted_diagrams) | |
| clear_stale_relationships | No | When relocating or purging, clear orphaned/stale GraphStore edges referencing the old path | |
| extract_diagram_to_artifact | No | When true, extracts embedded PNG signaling ladder / root-alarm diagrams (class='vsd' or direct .png virtual_uri) from the .hwics/.zip container in-memory and saves them to artifact_output_dir |