{"_id":"@anthodev/pi-tools-style","_rev":"3-e7b6ecc93178f9b9c37b153a33708f6b","name":"@anthodev/pi-tools-style","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.0":{"name":"@anthodev/pi-tools-style","version":"0.1.0","keywords":["pi-package","pi-extension","tui","tools"],"license":"MIT","_id":"@anthodev/pi-tools-style@0.1.0","maintainers":[{"name":"anthodev","email":"npmjs@antho.dev"}],"homepage":"https://github.com/Anthodev/pi-tools-style#readme","bugs":{"url":"https://github.com/Anthodev/pi-tools-style/issues"},"pi":{"extensions":["./index.ts"]},"dist":{"shasum":"752acb9f8d294bbcd6f25eae2f9cc4073309459c","tarball":"https://registry.npmjs.org/@anthodev/pi-tools-style/-/pi-tools-style-0.1.0.tgz","fileCount":10,"integrity":"sha512-uJzPVuGaoRwo9lKPvai1NpG1HbyMGYNaOJlWvUzEVjAqUQlgudYLto9VbnAbXgAOvtzhHoNEYBPSaeYurt7WaQ==","signatures":[{"sig":"MEUCIQDiouo0C7FVPAkEfwhonIIFvd5eINGBNMR4TxA+0olAVAIgeUzlZhRwbWwJm2K8n99Iq5JZaI0v4uXa9UoimMj/31Q=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":34802},"type":"module","engines":{"node":">=22.19.0"},"scripts":{"test":"vitest run","check":"npm run typecheck && npm test","typecheck":"tsc --noEmit","pack:check":"npm pack --dry-run --json","prepublishOnly":"npm run check"},"_npmUser":{"name":"anthodev","email":"npmjs@antho.dev"},"repository":{"url":"git+https://github.com/Anthodev/pi-tools-style.git","type":"git"},"_npmVersion":"11.16.0","description":"Presentation-only boxes for Pi tool calls and shell commands","directories":{},"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"4.1.9","typescript":"5.9.3","@types/node":"24.12.0","@earendil-works/pi-tui":"0.84.1","@earendil-works/pi-coding-agent":"0.84.1"},"peerDependencies":{"@earendil-works/pi-tui":"0.84.x","@earendil-works/pi-coding-agent":"0.84.x"},"_npmOperationalInternal":{"tmp":"tmp/pi-tools-style_0.1.0_1786274535243_0.5773283299284155","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@anthodev/pi-tools-style","version":"0.1.2","keywords":["pi-package","pi-extension","tui","tools"],"license":"MIT","_id":"@anthodev/pi-tools-style@0.1.2","maintainers":[{"name":"anthodev","email":"npmjs@antho.dev"}],"homepage":"https://github.com/Anthodev/pi-tools-style#readme","bugs":{"url":"https://github.com/Anthodev/pi-tools-style/issues"},"pi":{"extensions":["./index.ts"]},"dist":{"shasum":"63361b1c0c7b132c8bff4091814f8682fc9df858","tarball":"https://registry.npmjs.org/@anthodev/pi-tools-style/-/pi-tools-style-0.1.2.tgz","fileCount":10,"integrity":"sha512-lNISxj3grtZDd20I3m0qUlHmKeRs0Bv6t6C1iW1FClaH4nuNt+qvPulHkn+0HOWZi0JsZ8Q4VL0BHsUaJNf6XA==","signatures":[{"sig":"MEUCIAwK4yvaZjAwfLIIwKHyeSH9KZ+MHicA/iB81qExvGPvAiEApsxUcYlGcKwpet8Oa1gcjRt0sG3MTgz+ejN7q1iBDmo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@anthodev%2fpi-tools-style@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":35342},"type":"module","_from":"file:package/anthodev-pi-tools-style-0.1.2.tgz","engines":{"node":">=22.19.0"},"scripts":{"test":"vitest run","check":"npm run typecheck && npm test","typecheck":"tsc --noEmit","pack:check":"npm pack --dry-run --json","prepublishOnly":"npm run check"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c6806275-c312-4592-9f36-01abdf75febf"}},"_resolved":"/home/runner/work/pi-tools-style/pi-tools-style/package/anthodev-pi-tools-style-0.1.2.tgz","_integrity":"sha512-lNISxj3grtZDd20I3m0qUlHmKeRs0Bv6t6C1iW1FClaH4nuNt+qvPulHkn+0HOWZi0JsZ8Q4VL0BHsUaJNf6XA==","repository":{"url":"git+https://github.com/Anthodev/pi-tools-style.git","type":"git"},"_npmVersion":"11.16.0","description":"Presentation-only boxes for Pi tool calls and shell commands","directories":{},"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"4.1.9","typescript":"5.9.3","@types/node":"24.12.0","@earendil-works/pi-tui":"0.84.1","@earendil-works/pi-coding-agent":"0.84.1"},"peerDependencies":{"@earendil-works/pi-tui":"0.84.x","@earendil-works/pi-coding-agent":"0.84.x"},"_npmOperationalInternal":{"tmp":"tmp/pi-tools-style_0.1.2_1786277128594_0.4634096088269992","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@anthodev/pi-tools-style","version":"0.1.3","description":"Presentation-only boxes for Pi tool calls and shell commands","keywords":["pi-package","pi-extension","tui","tools"],"type":"module","license":"MIT","repository":{"type":"git","url":"git+https://github.com/Anthodev/pi-tools-style.git"},"homepage":"https://github.com/Anthodev/pi-tools-style#readme","bugs":{"url":"https://github.com/Anthodev/pi-tools-style/issues"},"scripts":{"test":"vitest run","typecheck":"tsc --noEmit","check":"npm run typecheck && npm test","pack:check":"npm pack --dry-run --json","prepublishOnly":"npm run check"},"pi":{"extensions":["./index.ts"]},"publishConfig":{"access":"public"},"peerDependencies":{"@earendil-works/pi-coding-agent":"0.84.x","@earendil-works/pi-tui":"0.84.x"},"devDependencies":{"@earendil-works/pi-coding-agent":"0.84.1","@earendil-works/pi-tui":"0.84.1","@types/node":"24.12.0","typescript":"5.9.3","vitest":"4.1.9"},"engines":{"node":">=22.19.0"},"_id":"@anthodev/pi-tools-style@0.1.3","_integrity":"sha512-x135stnvxuKrZtN7XgnQZSVuP5POjPyUyExsvWh8Kiwr27IYitMDzSlkTWvYknGonH4mIVnXnpAEp9DLUl09jQ==","_resolved":"/home/runner/work/pi-tools-style/pi-tools-style/package/anthodev-pi-tools-style-0.1.3.tgz","_from":"file:package/anthodev-pi-tools-style-0.1.3.tgz","_nodeVersion":"24.18.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-x135stnvxuKrZtN7XgnQZSVuP5POjPyUyExsvWh8Kiwr27IYitMDzSlkTWvYknGonH4mIVnXnpAEp9DLUl09jQ==","shasum":"64439f1a1531a0ff51f2a9f91d9adf0198775967","tarball":"https://registry.npmjs.org/@anthodev/pi-tools-style/-/pi-tools-style-0.1.3.tgz","fileCount":10,"unpackedSize":36799,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@anthodev%2fpi-tools-style@0.1.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAG8brTpUPRlz4jgeyjdbFhtXcGG8122sXu0BEQv87FDAiEA7BBmTlSppWusod96TFgsihGFyDf0rZJaE3EsqhFLpGg="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c6806275-c312-4592-9f36-01abdf75febf"}},"directories":{},"maintainers":[{"name":"anthodev","email":"npmjs@antho.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-tools-style_0.1.3_1786279298212_0.6562334547951694"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-09T11:22:15.086Z","modified":"2026-08-09T12:41:38.730Z","0.1.0":"2026-08-09T11:22:15.378Z","0.1.2":"2026-08-09T12:05:28.760Z","0.1.3":"2026-08-09T12:41:38.370Z"},"bugs":{"url":"https://github.com/Anthodev/pi-tools-style/issues"},"license":"MIT","homepage":"https://github.com/Anthodev/pi-tools-style#readme","keywords":["pi-package","pi-extension","tui","tools"],"repository":{"type":"git","url":"git+https://github.com/Anthodev/pi-tools-style.git"},"description":"Presentation-only boxes for Pi tool calls and shell commands","maintainers":[{"name":"anthodev","email":"npmjs@antho.dev"}],"readme":"<h1 align=\"center\">pi-tools-style</h1>\n\n<p align=\"center\"><strong>Give Pi tool activity clear, theme-aware structure without changing how tools run.</strong></p>\n\n<p align=\"center\">\n  <a href=\"https://github.com/Anthodev/pi-tools-style/actions/workflows/ci.yml?query=branch%3Adevelop\"><img alt=\"Tests\" src=\"https://img.shields.io/github/actions/workflow/status/Anthodev/pi-tools-style/ci.yml?branch=develop&amp;style=for-the-badge&amp;label=tests&amp;labelColor=101418\"></a>\n  <a href=\"https://github.com/Anthodev/pi-tools-style/releases/latest\"><img alt=\"Latest stable release\" src=\"https://img.shields.io/github/v/release/Anthodev/pi-tools-style?style=for-the-badge&amp;label=release&amp;labelColor=101418&amp;color=9ccbfb\"></a>\n  <a href=\"https://github.com/Anthodev/pi-tools-style/blob/develop/LICENSE\"><img alt=\"MIT License\" src=\"https://img.shields.io/github/license/Anthodev/pi-tools-style?style=for-the-badge&amp;labelColor=101418&amp;color=b9c8da\"></a>\n</p>\n\n`pi-tools-style` adds rounded frames, tool-specific icons, and live running indicators to Pi tool calls and direct shell commands. It decorates the output Pi already produces instead of replacing tool definitions or renderers.\n\nBuilt-in tools, MCP integrations, AFT, and third-party extensions keep control of their schemas, permissions, prompts, execution backends, and rendered content. When an output cannot be framed safely, the extension leaves it untouched.\n\n## Highlights\n\n- **Presentation without ownership** — wraps existing TUI output and never registers or replaces a tool.\n- **Theme-aware borders** — assigns semantic Pi theme colors by tool category and follows theme changes live.\n- **Three icon modes** — uses portable ASCII labels by default, richer Nerd Font glyphs when enabled, or icon-free titles.\n- **Live running state** — animates the title while a model tool call is still executing, then removes the spinner on completion.\n- **Terminal-correct sizing** — measures visible ANSI width before padding, truncating, or drawing borders.\n- **Renderer-friendly composition** — preserves Pi, AFT, MCP, and extension-provided output inside the frame.\n- **Image-safe fallback** — skips Kitty, iTerm2, and Sixel rows instead of corrupting terminal image sequences.\n- **Reload-safe state** — keeps wrappers and runtime configuration idempotent across `/reload`.\n\n## Installation\n\nThe current release targets Pi `0.84.x` and requires Node.js 22 or newer.2\n\nTo install it, use the following command:\n\n```bash\npi install npm:@anthodev/pi-tools-style\n```\n\nTo install this checkout as a local Pi package:\n\n```bash\ncd /absolute/path/to/pi-tools-style\nnpm install --legacy-peer-deps\npi install \"$(pwd)\"\n```\n\nPi stores the package in user settings and references the directory directly, so local changes become available after `/reload` or a restart.\n\n## What it looks like\n\nASCII mode stays readable in any terminal:\n\n```text\n╭─ [F] | read / ───────────────────────╮\n│ Reading README.md                    │\n╰──────────────────────────────────────╯\n```\n\nNerd Font mode uses tool-specific glyphs and Braille spinner frames:\n\n```text\n╭─  | read ⠹ ─────────────────────────╮\n│ Reading README.md                    │\n╰──────────────────────────────────────╯\n```\n\nOnce execution finishes, the spinner disappears and the title remains stable:\n\n```text\n╭─  | read ───────────────────────────╮\n│ README content                       │\n╰──────────────────────────────────────╯\n```\n\nDirect `!` and `!!` commands use the same frame with a `shell` title. Slash-command output remains unchanged because Pi does not expose one uniform transcript component for slash commands.\n\n## Usage\n\nBoxes start enabled. Manage them from Pi with:\n\n```text\n/tools-style\n/tools-style on\n/tools-style off\n/tools-style icons ascii\n/tools-style icons nerd-font\n/tools-style icons off\n/tstyle\n```\n\n`/tools-style` toggles framing. `/tstyle` is a short alias with the same arguments. The explicit `on` and `off` forms set the desired state without depending on its current value.\n\nIcon mode persists in `~/.pi/agent/config/tools-style.json`. ASCII remains the package default; Nerd Font mode can be enabled once for terminals that provide the required glyphs. `icons off` keeps frames and the ASCII running spinner, but removes the static icon and its `|` separator from titles.\n\n```json\n{\n  \"iconMode\": \"nerd-font\"\n}\n```\n\nSet `PI_TOOLS_STYLE=0` before startup to load the extension with framing disabled.\n\n## Icons and running indicators\n\nCommon tools receive dedicated icons, while unknown tools fall back to their semantic category.\n\n| Purpose | ASCII | Nerd Font | Examples |\n| --- | --- | --- | --- |\n| Read a file | `[F]` | `` | `read`, `read_symbol` |\n| Write a file | `[W]` | `` | `write` |\n| Edit content | `[E]` | `` | `replace`, `apply_patch` |\n| Run a command | `[$]` | `` | `bash`, shell tools |\n| Search | `[?]` | `` | `symbol_search`, `grep` |\n| Use the web | `[@]` | `` | `web_search`, browser tools |\n| Fetch content | `[v]` | `` | `fetch_content` |\n| Call MCP | `[M]` | `` | `mcp`, `mcpScript` |\n| Orchestrate work | `[*]` | `` | `workflow`, `subagent` |\n| Track tasks | `[#]` | `` | `todo` |\n| Ask the user | `[!]` | `` | `ask_user`, confirmation tools |\n| Show diagnostics | `[D]` | `` | `lsp_diagnostics`, `lens_diagnostics` |\n| Unknown tool | `[T]` | `` | third-party fallback |\n\nWhile a model tool call is active, ASCII mode cycles through `| / - \\` and Nerd Font mode cycles through `⠋ ⠙ ⠹ ⠸ ⠼ ⠴ ⠦ ⠧ ⠇ ⠏`. One shared timer drives all active titles and stops after completion, interruption, box disablement, stale transcript removal, or session shutdown.\n\n## Theme-aware palette\n\nBorders resolve their color from the active Pi theme on every render. Switching themes therefore updates existing tool categories without reloading the extension.\n\n| Category | Typical tools | Pi theme token |\n| --- | --- | --- |\n| Inspect | reads, searches, reports, diagnostics | `mdLink` |\n| Mutate | writes, edits, create/update/delete operations | `warning` |\n| Execute | bash, shell, tests, terminal commands | `bashMode` |\n| External | web, fetch, MCP, browser, GitHub, Slack | `syntaxType` |\n| Orchestrate | workflow, subagent, Ralph, todo | `customMessageLabel` |\n| Interact | ask, question, confirm, select | `accent` |\n| Other | unknown third-party tools | `borderMuted` |\n\n## How it works\n\nPi `0.84.x` does not expose public render middleware around `ToolExecutionComponent` and `BashExecutionComponent`. `pi-tools-style` therefore installs a narrow wrapper around their existing `render()` methods.\n\nThe wrapper asks the previous renderer to draw at the frame's inner width, removes only paired outer horizontal rules, and then adds ANSI-aware chrome. It does not call `pi.registerTool()`, replace tool definitions, or intercept execution.\n\nConfiguration and animation state live behind `Symbol.for()` keys. Reloading updates the active configuration without stacking wrappers or leaving duplicate timers behind. Any incompatibility or decoration error falls back to Pi's original full-width renderer.\n\n## Compatibility and limits\n\n- Pi `0.84.x` is the supported target. Private TUI internals may change in later releases.\n- The render wrapper is necessarily unsupported until Pi exposes public, composable render middleware.\n- Kitty, iTerm2, and Sixel image output remains unboxed by design.\n- Slash commands remain outside the current scope because their transcript output has no uniform component.\n- Another extension can replace this wrapper if it overwrites component rendering without composing with the previous renderer.\n- Unsupported renderer shapes fail open rather than affecting tool execution.\n\n## Development\n\nInstall dependencies and run the complete verification suite with:\n\n```bash\nnpm install --legacy-peer-deps\nnpm run check\nnpm pack --dry-run --json\n```\n\n`npm run check` runs TypeScript validation and the Vitest suite. Tests cover frame width, ANSI output, terminal images, native and AFT rule removal, category colors, icon modes, persisted settings, spinner lifecycle, real `ToolExecutionComponent` integration, render composition, reload idempotence, fail-open behavior, and the no-`registerTool()` contract.\n\n`--legacy-peer-deps` avoids an npm 10.9.8 Arborist failure observed while resolving the development peer dependency graph.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}