Luigit
repositories / pi-ext

pi-ext

bugabingas pi extensions

owned by admin

extensions/autopsy/README.md

Raw
Rendered preview
autopsy

autopsy

Inspect your current Pi session and captured system prompts in a local browser viewer.

Use it in Pi

Run /autopsy or press Ctrl+Alt+A. Scroll through history, search complete stored text and JSON, or open Filters for role, type, branch, provider, model, time, and ordering controls. History loads automatically in both directions, including when the first page does not fill the viewport. The compact totals cover the selected scope, not just loaded rows. Collapsed entries show compact previews; open an entry to stream its complete stored readable content incrementally. The transcript uses Nugu light/dark colors, follows the browser's preference, and offers a theme toggle. Complete content includes system sections, tool arguments, and original image references; it is not reconstructed request context. Loading and error states keep the preview available, with explicit retry for interrupted streams. Closing an entry stops unfinished loading. Closed rows outside the scrolling window release their cached views; open, focused, or selected readers remain available. Open an image preview to load its bytes locally, then use Show original size to inspect it at native resolution. Closing the preview or entry releases the displayed image. Entry JSON + provider metadata stays collapsed by default and independently loads complete stored JSON, including signatures and ordinary tool fields. Large details have no preview-sized cutoff; syntax coloring is bounded to a prefix, while the remaining text stays available. Loading complete entries uses browser memory proportional to the content you open. Use Refresh to fetch changes; the page is a snapshot, not a live request monitor.

Open Insights to load the full selected scope's detailed usage metrics, graphs, and breakdowns. The dashboard shows stored cost, current catalog estimates, tokens, measured durations, and content sizes, with coverage for unknown values. Provider, model, search, role, type, history, and inclusive local-time filters apply across the entire selected history, independently of loaded transcript pages. Select cost, cumulative known cost, tokens, measured duration, or size in Graph; activate a plotted point or table entry to open its matching entry. Timelines plot up to 200 sampled values per chart against recorded entry timestamps, with an accessible data table. Expand detailed totals for cost breakdowns and provider/model attribution.

Stored costs are not necessarily provider quotes or invoices; current catalog estimates use Pi's available prices now, including price tiers and recorded one-hour cache writes. Missing or invalid fields remain unknown, but Pi/provider adapters may already have recorded unsupported values as zero. Duration sums can overlap; timestamp spans and gaps are not model latency or inferred idle time. Size measurements count original UTF-8 text, thinking, sections, summaries, shell command/output, and decoded image bytes, not tool arguments, metadata, or provider wire payloads. Sizes and image counts become unknown when bounded measurement scans cannot complete, rather than presenting partial counts as exact totals.

Open Session for session metadata and Runtime prompt captures, loaded only when expanded. Captures show exact Pi system-prompt text alongside grouped sections for rules, tools, project context, and skills. Send a prompt first to populate captures; System instructions instead finds recorded system entries across session history. Captures include modifications made before the agent starts, but are not provider wire payloads or proof of the context sent for any particular request. Session history alone cannot reconstruct that context.

Captures exist only since startup or reload: up to 32 recent snapshots within a combined 4 Mi-character budget, always retaining the latest one unchanged. Older session entries remain inspectable after resume, even when no fresh capture exists. History has no aggregate preview-budget or entry-count omission limit. Each fetched page contains bounded previews, with text and JSON limited to about 2 KiB each; opening an entry bypasses those preview limits. Literal truncation markers already present in history are retained as content, not interpreted as viewer warnings. Unrepresentable ephemeral data such as cyclic objects or accessors reports a detail-loading error rather than pretending to be complete. Image base64 is represented by a placeholder in JSON and served separately on demand. Previews support PNG, JPEG, GIF, and WebP up to 4 MiB, with declared dimensions limited to 16 Mi-pixels and 16384 pixels per side. Unsupported, invalid, or oversized images show an unavailable notice rather than loading into the browser. Page responses above 32 MiB fail explicitly; on-demand entry details and full-scope metrics stream separately. Detailed Insights retain metric records for the selected scope in browser memory.

The viewer serves only on 127.0.0.1, requires its private URL, and loads no external assets. It exposes sensitive session text and instructions to anyone holding that URL while the server runs. Do not share the URL or screenshots containing private data. Reloading, switching sessions, or exiting Pi stops the server and clears captures; browser tabs can retain already displayed text until closed. If browser launch fails, Pi shows the URL to open manually. No prompt export files are written.

Install through Installation.

Reference

Commands

Command Purpose
/autopsy Inspect session history, usage, and captured prompts in your browser
<img src="assets/banner.svg" alt="autopsy" height="70">

# autopsy

Inspect your current Pi session and captured system prompts in a local browser viewer.

## Use it in Pi

Run `/autopsy` or press `Ctrl+Alt+A`.
Scroll through history, search complete stored text and JSON, or open **Filters** for role, type, branch, provider, model, time, and ordering controls.
History loads automatically in both directions, including when the first page does not fill the viewport.
The compact totals cover the selected scope, not just loaded rows.
Collapsed entries show compact previews; open an entry to stream its complete stored readable content incrementally.
The transcript uses Nugu light/dark colors, follows the browser's preference, and offers a theme toggle.
Complete content includes system sections, tool arguments, and original image references; it is not reconstructed request context.
Loading and error states keep the preview available, with explicit retry for interrupted streams.
Closing an entry stops unfinished loading.
Closed rows outside the scrolling window release their cached views; open, focused, or selected readers remain available.
Open an image preview to load its bytes locally, then use **Show original size** to inspect it at native resolution.
Closing the preview or entry releases the displayed image.
**Entry JSON + provider metadata** stays collapsed by default and independently loads complete stored JSON, including signatures and ordinary tool fields.
Large details have no preview-sized cutoff; syntax coloring is bounded to a prefix, while the remaining text stays available.
Loading complete entries uses browser memory proportional to the content you open.
Use **Refresh** to fetch changes; the page is a snapshot, not a live request monitor.

Open **Insights** to load the full selected scope's detailed usage metrics, graphs, and breakdowns.
The dashboard shows stored cost, current catalog estimates, tokens, measured durations, and content sizes, with coverage for unknown values.
Provider, model, search, role, type, history, and inclusive local-time filters apply across the entire selected history, independently of loaded transcript pages.
Select cost, cumulative known cost, tokens, measured duration, or size in **Graph**; activate a plotted point or table entry to open its matching entry.
Timelines plot up to 200 sampled values per chart against recorded entry timestamps, with an accessible data table.
Expand detailed totals for cost breakdowns and provider/model attribution.

Stored costs are not necessarily provider quotes or invoices; current catalog estimates use Pi's available prices now, including price tiers and recorded one-hour cache writes.
Missing or invalid fields remain unknown, but Pi/provider adapters may already have recorded unsupported values as zero.
Duration sums can overlap; timestamp spans and gaps are not model latency or inferred idle time.
Size measurements count original UTF-8 text, thinking, sections, summaries, shell command/output, and decoded image bytes, not tool arguments, metadata, or provider wire payloads.
Sizes and image counts become unknown when bounded measurement scans cannot complete, rather than presenting partial counts as exact totals.

Open **Session** for session metadata and **Runtime prompt captures**, loaded only when expanded.
Captures show exact Pi system-prompt text alongside grouped sections for rules, tools, project context, and skills.
Send a prompt first to populate captures; **System instructions** instead finds recorded system entries across session history.
Captures include modifications made before the agent starts, but are not provider wire payloads or proof of the context sent for any particular request.
Session history alone cannot reconstruct that context.

Captures exist only since startup or reload: up to 32 recent snapshots within a combined 4 Mi-character budget, always retaining the latest one unchanged.
Older session entries remain inspectable after resume, even when no fresh capture exists.
History has no aggregate preview-budget or entry-count omission limit.
Each fetched page contains bounded previews, with text and JSON limited to about 2 KiB each; opening an entry bypasses those preview limits.
Literal truncation markers already present in history are retained as content, not interpreted as viewer warnings.
Unrepresentable ephemeral data such as cyclic objects or accessors reports a detail-loading error rather than pretending to be complete.
Image base64 is represented by a placeholder in JSON and served separately on demand.
Previews support PNG, JPEG, GIF, and WebP up to 4 MiB, with declared dimensions limited to 16 Mi-pixels and 16384 pixels per side.
Unsupported, invalid, or oversized images show an unavailable notice rather than loading into the browser.
Page responses above 32 MiB fail explicitly; on-demand entry details and full-scope metrics stream separately.
Detailed Insights retain metric records for the selected scope in browser memory.

The viewer serves only on `127.0.0.1`, requires its private URL, and loads no external assets.
It exposes sensitive session text and instructions to anyone holding that URL while the server runs.
Do not share the URL or screenshots containing private data.
Reloading, switching sessions, or exiting Pi stops the server and clears captures; browser tabs can retain already displayed text until closed.
If browser launch fails, Pi shows the URL to open manually.
No prompt export files are written.

Install through [Installation](../../README.md#install).

## Reference

<!-- config:start -->
### Commands

| Command | Purpose |
| --- | --- |
| `/autopsy` | Inspect session history, usage, and captured prompts in your browser |
<!-- config:end -->