{"_id":"@badliveware/pi-rich-output","_rev":"2-766ff6640e8afeb47c53d642ecd5b439","name":"@badliveware/pi-rich-output","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@badliveware/pi-rich-output","version":"0.1.0","keywords":["pi-package","pi-extension","rich-output","timeline","terminal"],"author":{"name":"BadLiveware"},"license":"MIT","_id":"@badliveware/pi-rich-output@0.1.0","maintainers":[{"name":"doz3r","email":"flarsson93@gmail.com"}],"homepage":"https://github.com/BadLiveware/pi/tree/main/agent/extensions/public/rich-output#readme","bugs":{"url":"https://github.com/BadLiveware/pi/issues"},"pi":{"extensions":["./index.ts"]},"dist":{"shasum":"e65afd64bfb22ca8e95e8010638d86a1c186a459","tarball":"https://registry.npmjs.org/@badliveware/pi-rich-output/-/pi-rich-output-0.1.0.tgz","fileCount":10,"integrity":"sha512-l63gHM86UPFUYtYJLv4Z1Js43DKm8IlF37koF3IF7hEyYAqOSTfkB9my9GLuU+83YRUNhxM9/2i8VfYFfFEn9A==","signatures":[{"sig":"MEQCIH3e+5zR+ZJ1PWni6WNq3i90m75AzPj84DAgS+cydR96AiBd3iu5GI3UJC/PTagbEife+KRjojI7jwVHFwxnxV2MRQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":193532},"type":"module","engines":{"node":">=20"},"gitHead":"dc9cd6fbf74f3ca9dc097b33e29632d4e242bc81","_npmUser":{"name":"doz3r","email":"flarsson93@gmail.com"},"repository":{"url":"git+https://github.com/BadLiveware/pi.git","type":"git","directory":"agent/extensions/public/rich-output"},"_npmVersion":"10.9.7","description":"Terminal-friendly structured timeline cards for Pi.","directories":{},"_nodeVersion":"22.22.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@mariozechner/pi-tui":"*","@mariozechner/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-rich-output_0.1.0_1777679663789_0.7433250540470622","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@badliveware/pi-rich-output","version":"0.1.1","description":"Terminal-friendly structured timeline cards for Pi.","type":"module","keywords":["pi-package","pi-extension","rich-output","timeline","terminal"],"license":"MIT","author":{"name":"BadLiveware"},"repository":{"type":"git","url":"git+https://github.com/BadLiveware/pi.git","directory":"agent/extensions/public/rich-output"},"bugs":{"url":"https://github.com/BadLiveware/pi/issues"},"homepage":"https://github.com/BadLiveware/pi/tree/main/agent/extensions/public/rich-output#readme","publishConfig":{"access":"public"},"pi":{"extensions":["./index.ts"]},"peerDependencies":{"@mariozechner/pi-coding-agent":"*","@mariozechner/pi-tui":"*"},"engines":{"node":">=20"},"gitHead":"6ec68783503ae1653da691937196bc830f3de94c","_id":"@badliveware/pi-rich-output@0.1.1","_nodeVersion":"24.14.1","_npmVersion":"11.13.0","dist":{"integrity":"sha512-CjVjRPijiEnFd1XSon2MbBd4R2ksm+MsJ3pOIFeEwreHurZjwvKIb4IMFf+SWIIje192usvwIFocx+55VF9iig==","shasum":"0d74540205f9ed93314c99008e5131ff2d4fa2e9","tarball":"https://registry.npmjs.org/@badliveware/pi-rich-output/-/pi-rich-output-0.1.1.tgz","fileCount":10,"unpackedSize":193763,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@badliveware%2fpi-rich-output@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGQszBXLKfeMS1oVnae0+uCxUlebckeoZVNfCEOInBrjAiEAjI4TFvacWfyikgfOp5uU+VvIBO1/D777EfwcFOoFujM="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:6e5d9621-94d8-46e0-8438-00840407a025"}},"directories":{},"maintainers":[{"name":"doz3r","email":"flarsson93@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-rich-output_0.1.1_1777680278408_0.8274602643895597"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-01T23:54:23.722Z","modified":"2026-05-02T00:04:38.835Z","0.1.0":"2026-05-01T23:54:23.972Z","0.1.1":"2026-05-02T00:04:38.569Z"},"bugs":{"url":"https://github.com/BadLiveware/pi/issues"},"author":{"name":"BadLiveware"},"license":"MIT","homepage":"https://github.com/BadLiveware/pi/tree/main/agent/extensions/public/rich-output#readme","keywords":["pi-package","pi-extension","rich-output","timeline","terminal"],"repository":{"type":"git","url":"git+https://github.com/BadLiveware/pi.git","directory":"agent/extensions/public/rich-output"},"description":"Terminal-friendly structured timeline cards for Pi.","maintainers":[{"name":"doz3r","email":"flarsson93@gmail.com"}],"readme":"# Pi Rich Output\n\nRich Output adds terminal-friendly structured cards to the Pi timeline. It can show validation summaries, review findings, diagrams, charts, artifact links, progress, and small visual status blocks without turning the conversation into a wall of text.\n\nThis extension is working, but it is still WIP. I am publishing it while I evaluate whether rich timeline output is useful enough to keep and expand.\n\n![Rich output prototype showing terminal-native blocks, Mermaid rendering, sparklines, image previews, links, progress, and callouts.](assets/rich-output-prototype.png)\n\n## Why use it\n\nUse Rich Output when a result is easier to understand as a compact card than as prose:\n\n| Content | What readers get |\n| --- | --- |\n| Validation summaries | Commands, results, durations, and skipped checks in one compact entry |\n| Review findings | Severity, location, evidence, impact, and suggested fixes |\n| Benchmark notes | Tables, sparklines, and charts for comparisons or trends |\n| Diagrams | Small flow diagrams or rendered Mermaid architecture/sequence diagrams |\n| Artifact links | Visible file paths with terminal hyperlinks when supported |\n| Status snapshots | Badges, progress bars, key/value rows, and callouts |\n\nFor simple answers, normal text is still better.\n\n## Install\n\nFrom npm:\n\n```bash\npi install @badliveware/pi-rich-output\n```\n\nFrom this repository workspace:\n\n```bash\npi install ./agent/extensions/public/rich-output\n```\n\n## Try it\n\nRun the demo command in Pi:\n\n```text\n/rich-output-demo\n```\n\nThe demo shows the main rendering surfaces in one timeline entry: terminal capabilities, badges, a formula, a simple flow diagram, a Mermaid diagram, a sparkline, an inline image preview, an artifact link, progress, and a callout.\n\n## Tool and command\n\n### `/rich-output-demo`\n\nShows a sample rich timeline entry so you can see how the extension renders in your terminal.\n\n### `rich_output_present`\n\nStructured Pi tool used to add a rich card to the timeline. It accepts a card kind, title, optional summary/markdown/payload, and optional blocks such as tables, links, diagrams, charts, images, badges, progress bars, and callouts.\n\nMost users do not need to call the tool directly; the point is to give Pi agents a better display surface when structured output helps.\n\n## Terminal behavior\n\nRich Output is designed to degrade safely across terminals:\n\n- **Text first:** visual blocks keep readable text fallbacks.\n- **Images when available:** Kitty-compatible terminals can show inline PNG previews.\n- **Links when available:** OSC 8 hyperlinks are used when supported; the file path or URL is still printed visibly.\n- **Safe failures:** missing files, invalid image data, oversized artifacts, and failed renders show a short fallback message instead of breaking the timeline.\n\n## Optional render tools\n\nMermaid diagrams and Vega-Lite charts are rendered before they reach the timeline. If the optional renderer is installed, the card shows an inline preview when possible and prints artifact paths for external viewing.\n\n| Feature | Optional tool | If missing |\n| --- | --- | --- |\n| Mermaid diagrams | `mmdc` | Shows source text or a short render error |\n| Vega-Lite charts | `vl-convert` | Shows source/spec fallback or a short render error |\n\nArtifact directories:\n\n- Mermaid: `.pi/rich-output/mermaid/`\n- Vega-Lite charts: `.pi/rich-output/charts/`\n- If the project directory cannot be written, temporary fallback directories under `/tmp` are used.\n\n## Built-in limits\n\nThe renderer keeps entries bounded so large output does not freeze the UI.\n\n| Limit | Value |\n| --- | ---: |\n| Mermaid diagrams rendered per entry | 4 |\n| Vega-Lite charts rendered per entry | 4 |\n| Mermaid source before text fallback | 12,000 characters |\n| Vega-Lite spec before text fallback | 80,000 characters |\n| Artifact image read limit | 5 MB |\n\n## Development\n\nFrom `agent/extensions`:\n\n```bash\nnpm run typecheck\nnpm test\n```\n","readmeFilename":"README.md"}