Skip to content

Releases: tranhoangnguyen03/pi-bro

pi-bro v0.23.1

Choose a tag to compare

@github-actions github-actions released this 15 Oct 13:00
9aae230

Highlights

  • Scroll Bro's explain, show, help and btw windows with the mouse wheel again on Pi 1.2.
  • See the save messages and key hints in /bro preferences, /bro advisor-steer and /bro config on normal-size terminals; they were cut off at the bottom.
  • btw keeps your place: it follows the newest answer while you are at the bottom and no longer jumps back to the top after each reply.

Fixed

  • Mouse-wheel scrolling in the explain/show/doctor/help and btw windows on Pi 1.2 fullscreen. Pi 1.2 stopped passing raw wheel input to windows without a mouse handler; both windows now handle Pi's mouse events and keep the raw path for Pi 0.84 and regular mode.
  • The wheel over the preferences, advisor-steer, config and Guided Review loading windows no longer scrolls the chat behind them on Pi 1.2.
  • /bro preferences, /bro advisor-steer and /bro config fit their windows: no blank padding rows, a shorter editor hint line, the editors' height limit raised from 60% to 78% like the other Bro windows, and the config list sized to the terminal. At 24 rows the preferences editor now draws 18 rows instead of 27. Very short terminals (under about 22 rows) can still clip the editors, because Pi's editor has a minimum height.
  • /bro config shows one key-hint line instead of two that disagreed, and its model picker shows its own hints.
  • btw's hint while a reply runs now says Esc closes the panel and stops the reply, which is what it does.
  • Guided Review saves once when you close it instead of twice; teardown without closing it (for example switching sessions) still saves.

Changed

  • Internal: src/bro.ts is split into feature and modal modules (#133). No behaviour change.

Full Changelog: v0.23.0...v0.23.1

pi-bro v0.23.0

Choose a tag to compare

@github-actions github-actions released this 13 Oct 15:51
64e11a2

Highlights

  • /bro show can draw a real sequence diagram when a conversation traces messages among three or more parts of a system. Press O to see it rendered in your browser.
  • Bro is now tested on Pi 1.2 as well as Pi 0.84.2, and the README says so.
  • pi-bro has a preview card in the pi.dev package gallery.

Added

  • /bro show can end a reply with one Mermaid sequenceDiagram for interactions among three or more participants (#108). The modal keeps the diagram's source readable and O opens a rendered version. Bro builds that page itself: it inlines a vendored Mermaid 12.1.0, allows only its own two scripts by hash, runs Mermaid with securityLevel: "strict" and no HTML labels, and inserts the model's text as escaped source. Any other Mermaid stays in the modal as plain text. If the diagram file cannot be written, the reply is kept and a warning is shown.

Changed

  • Tested on Pi 1.2.0 (development pin) with a CI job that keeps Pi 0.84.2 covered; the README's Pi range now reads >=0.84.2 (#130).
  • The package now bundles Mermaid 12.1.0 for sequence diagrams, so it grows from about 0.5 MB to 6 MB unpacked (#108).
  • Runtime source moved into src/; the extension entry is now src/bro.ts. Installs are unaffected. The package also sets a pi.dev gallery preview image (#116).

Full Changelog: v0.22.2...v0.23.0

pi-bro v0.22.2

Choose a tag to compare

@github-actions github-actions released this 13 Oct 07:45
14e7f12

Highlights

  • Get /bro show pages built from plain HTML and CSS, without Mermaid source that could never render; prose answers stay as text.
  • Get started from a short README, and find the full reference in docs/user-guide.md (linked from /bro help).
  • Stopping Bro while it reads a PDF or Word file now always stops cleanly.

Fixed

  • /bro show no longer invites Mermaid inside the HTML fence. Bro's HTML page blocks all scripts, so Mermaid could only appear as plain source text. The prompt now asks for hand-rolled HTML and CSS only and says prose subjects never use the HTML fence (#108).

  • Make cancellation consistent across synchronous reading and asynchronous parsing in extractDocumentText (#87).

Added

  • Reader benchmark: five real, maintainer-approved Explain fixtures and a brief-mode candidate arm for shipped-vs-candidate comparisons. Exact-text and Markdown-marker checks removed; meaning is checked by the yes/no questions (#101).

  • Reader benchmark for Explain modes, BTW answers, preferences and repeated samples (#110):

    • Fingerprinted live runs, narrow Jev binary checks, and per-check candidate comparisons.
    • Report-only reader-visible counts and source deltas, separate from preservation and formatting checks.
    • Committed synthetic baseline evidence with offline recomputation in CI.
    • Optional generation through existing Claude, Codex and Muse adapters alongside Agy.
    • Synthetic coverage and experimental judgments are decision support, not proof of full fidelity or comprehension; production prompts are unchanged.

Changed

  • The README is now a short overview (install, try it, requirements, what leaves your machine, limits). The full reference moved to docs/user-guide.md, and /bro help links there (#116).
  • Added SECURITY.md, CONTRIBUTING.md, issue forms and docs/PUBLIC-PRESENTATION.md, the presentation standard for pi-* repos (#116).
  • Refocus prompt tests on safety and structure rather than frozen wording or presentation order; identify fake-Agy Explain modes from current prompt builders instead of hardcoded phrases (#110).

Full Changelog: v0.22.1...v0.22.2

pi-bro v0.22.1

Choose a tag to compare

@github-actions github-actions released this 13 Oct 03:08
a9dc279

Security

  • Public-web transport safety boundaries and offline qualification (#86):
    • Block IPv4-compatible IPv6 (::/96) and Site-Local IPv6 (fec0::/10) in NON_PUBLIC_ADDRESSES to prevent SSRF bypasses via mapped loopback and cloud metadata targets on dual-stack hosts.
    • Disable HTTP socket connection pooling (agent: false) on web requests so keep-alive socket reuse cannot bypass address pinning (lookup).
    • Add offline test coverage in test/sources.test.ts for mixed DNS answers, address pinning, private redirects, HTTPS downgrade, loops, hop bounds, payload limits, encoding, and cancellation.

Fixed

  • Interrupt stalled DNS lookups immediately when an abort or timeout signal fires during web ingestion (#86).

Full Changelog: v0.22.0...v0.22.1

pi-bro v0.22.0

Choose a tag to compare

@github-actions github-actions released this 10 Oct 20:07
c5de62d

Fixed

  • Persist settings with atomic replacement and mode 0o600 (#84):
    • Replace direct writeFile with atomic sibling write (.tmp) and rename to prevent settings corruption on failure, crash, or disk full (ENOSPC).
    • Flush writes before replacement (flush: true) and clean up temporary files on failure.
    • Enforce mode: 0o600 on replaced settings files so permissions are never loosened.
    • Resolve symlinks via lstat and realpath before replacement to preserve dotfile-managed configuration symlinks, and reject if an existing symlink target cannot be resolved.
    • Align on-disk state with modal rollback behavior in /bro config.

Added

  • Guided Review (#104): open a PR by URL/number in local Pi to automatically get an explanation and quality assessment, captured Git evidence, findings with fix/check suggestions, diffs and optional private questions. Acquisition uses authenticated gh outside the active working tree. Findings remain model proposals, not approval or applied changes.

  • Automatic local remembering of questions/drafts/reading position; reopening the same PR restores the captured revision without a model call. Bare /bro guided-review lists saved reviews; resume remains an alias. Close saves automatically; Stop and close cancels first. Copy finding copies to the system clipboard without submission.

  • Confirmed same-revision regeneration replaces one current guide and preserves original private context; failed/cancelled generation retains it and save errors offer recovery. There is no guide-version UI or prototype-format migration. Review has its own backend override.

  • Bounded live checks demonstrated an unchanged-caller defect and successful regeneration; manual UX accepted. This is not a general accuracy guarantee, live five-backend matrix or complete #104 scope. Notes, examination tracking, branch/update review and feedback delivery are not implemented.

  • Durable advisor steering across sessions in ~/.pi/agent/bro-advisor.md (#97):

    • Ingest standing priorities from bro-advisor.md alongside session steering (/bro advisor-steer).
    • Labeled prompt composition in buildAdvisorPrompt: standing priorities appear under ### Standing priorities (durable across sessions) and session priorities under ### Session priorities (this session only).
    • Session-specific priorities take precedence over standing defaults where they conflict.
    • Fail-closed validation rejects files > 64 KB and > 4,000 characters before spawning any backend process.
    • Doctor reports both Advisor steering (session) and Advisor steering (durable).
    • Tool result context line and details track steeringSources: { durable, session } while preserving backwards-compatible steeringIncluded boolean.
    • Retries use a frozen prompt snapshot built prior to runAdvisorWithRetries.
    • Clearing session steering leaves durable steering intact.

Changed

  • Doctor treats an unsupported optional review backend as an informational override hint, not a broken installation; healthy Agy/Grok/Codex defaults still report ready.

  • Review is file-only on Claude/Muse: no shell, write or web tools; Agy/Grok/Codex review calls fail closed without switching backend. Other features retain their access behavior.

  • Capture uses depth-1 head/merge-base trees instead of full history; fetch gets a ten-minute bound while evidence stays offline. Interrupted-capture recovery remains.

  • Removed prototype record migrations after one-time backup/normalization of development records; split validation and formatted review modules/tests to the repository tab style.

  • Guided Review UX consistency pass: origin-preserving Back, focused-action Enter, topic-filtered findings, pane-aware paging, visible focus/overflow, selected-item previews and compact full-width 36×18 layout. Discussion follows conversation/composer/actions order; save errors have shared retry controls and failed questions have draft-safe explicit edit/resend. Request errors are separate from model answers, streaming follows again at the bottom, and acquisition/resume/close messages give clearer orientation. Current review behavior, controls, access/storage and recovery are documented in the user guide; developer/testing guidance records its implementation rules and verification limits. Review itself has no publication action.

  • Remove dead declarations and stale backend naming (#90):

    • Enable native TypeScript unused checks (noUnusedLocals, noUnusedParameters) in tsconfig.json.
    • Remove verified unused declarations across bro.ts, backend.test.ts, benchmark/run.ts, codex.test.ts, and release.test.ts.
    • Drop pass-through re-exports from bro.ts (agyFailureMessage, agySelection, advisorFlagErrorHint, parseBtwAgyLine); tests and consumers import them directly from backend.ts.
    • Rename multi-backend facilities with obsolete Agy prefixes: runAgyText -> runBackendText in bro.ts and killAgyGroup -> killProcessGroup in backend.ts.
    • Modernize outdated single-backend and pre-extraction comments.
  • Separate Bro responsibilities and unify settings and backend-selection policy (#83):

    • Extract settings.ts (schema, typed EXTERNAL_BACKENDS metadata, selection policy, pure transitions, and file persistence).
    • Extract sources.ts (self-contained document text extraction and public web scraping with SSRF protection).
    • Extract config-ui.ts (/bro config modal, setting items, and async save serialization).
    • Extract util.ts (shared leaf utility helpers).
    • Unify legacy flat and v2 settings parsing into one converged validation pipeline in settings.ts, eliminating duplicate validation branches.
    • Initialize clean version 2 settings on fresh installations in ensureSettingsFile().
    • Share pure state transitions (applyModelChange, applyEffortChange) across default and capability override rows.
    • Fix Agy variant model reselection bug where resolved effort from suffixed variants was lost.
    • Consolidate CLI version probes in /bro doctor into a single checkCliVersion helper.

Full Changelog: v0.21.0...v0.22.0

pi-bro v0.21.0

Choose a tag to compare

@github-actions github-actions released this 04 Oct 15:34
114b266

Added

  • bro-preferences.md: tell Bro about yourself and how you like answers. Bro adds it, JSON-quoted and labelled, to every explain, /bro show, and /bro btw prompt alongside its own instructions; the advisor never receives it. Preferences can change wording, tone, technical depth, and the answer language (code, commands, paths, names, and numbers stay verbatim). In Show they change only wording and language. Per-run choices (the mode, M, a Show steering query, a BTW question) win over them, and Bro's source rules, Show's hard rules, and BTW access mode always apply. Blank or missing preferences leave every prompt byte-identical to 0.20.0 (#94).
  • /bro preferences edits the file (Ctrl+S save, Ctrl+K delete, Ctrl+C copy, Esc close). Without a file it opens with unsaved starter text that restates the old built-in audience and brief wording. Saves are checked against the 4,000-character limit, and an oversize file still opens so it can be trimmed (#94).
  • The modal header shows · prefs when preferences shaped an explanation, drawing, or BTW turn; /bro open keeps the result's tag (#94).

Changed

  • Modes, M, and the source guard now always apply; nothing disables them (#94).
  • Preferences over 4,000 characters stop explain, Show, and BTW with an actionable error before any backend call instead of being truncated. /bro doctor replaces its Prompt check with a Preferences check, and /bro help shows the preferences status (#94).
  • When preferences change mid-thread, the next BTW turn starts a fresh native session reseeded with the quoted thread, on every backend, so old preferences don't linger in the backend's history (#94).

Removed

  • Breaking: bro-prompt.md is no longer read. It was a full replacement template for the explain prompt that disabled modes, M, and the source guard and did not affect Show or BTW. Bro does not migrate, rename, or delete it. Move what you want to keep into /bro preferences, and use /bro mode brief for the original ELI-simpleton instruction (#94).

Full Changelog: v0.20.0...v0.21.0

pi-bro v0.20.0

Choose a tag to compare

@github-actions github-actions released this 04 Oct 08:39
3d46b42

Added

  • Press M in an explanation modal to re-simplify the captured source in the next explain mode (brief → balanced → faithful). The switch applies to that explanation only: the saved mode is unchanged, R and /bro open keep the shown mode, and a second press while Bro is working cancels and skips ahead. The header now names the mode; M is hidden for Show, Doctor, and custom prompts.

Changed

  • /bro btw now tells the model who it is writing for: a tired reader who needs the point first, in plain words, at a length that fits the question, in the language they asked in. The guidance describes the reader and the goal rather than a fixed template. In full-permission mode, answers say which points were checked in the workspace.

Full Changelog: v0.19.5...v0.20.0

pi-bro v0.19.5

Choose a tag to compare

@github-actions github-actions released this 01 Oct 18:00
131320d

Changed

  • Remove the always-true backend-support predicate and unreachable doctor/config branches; retain backend-specific effort and permission validation (#74).
  • Move helper, modal, advisor, and Pi SDK regression checks into named Node tests with shared isolated compilation, leaving shell smoke tests focused on host RPC integration and avoiding duplicate helper execution in PiG (#74).
  • Consolidate redundant support, prompt, and BTW assertions; replace prose greps with package-documentation checks and document surviving coverage (#74).

Fixed

  • Make the advisor throttle cancellation test actually queue an emission and advance controlled time beyond its deadline; verified by removing cleanup and observing failure (#74).

Documentation

  • Explicitly archive the seven pre-conversation-only decomposition captures as historical semantic examples and record before/after test organization and timings (#74).

Full Changelog: v0.19.4...v0.19.5

pi-bro v0.19.4

Choose a tag to compare

@github-actions github-actions released this 01 Oct 17:29
5fbb486

Fixed

  • Preserve advisor timeout and cancellation status through the consultation wrapper. Host deadlines and cancellation stop after one attempt without backoff; ordinary invocation failures retain the existing three-attempt policy (#72).
  • Bound benchmark call and usage-preflight cleanup when descendants retain output pipes, reusing backend process-group termination and escalation. Ignore late output after a stop without adding benchmark retries (#72).

Documentation

  • Distinguish host deadlines from CLI-reported failures and document unverified shutdown/reload cancellation, POSIX process-group cleanup, and Windows direct-child limits (#72).

Full Changelog: v0.19.3...v0.19.4

pi-bro v0.19.3

Choose a tag to compare

@github-actions github-actions released this 30 Sep 09:57
04f77fd

Fixed

  • Send large Agy explain, Show, and BTW prompts over stdin instead of exceeding argument-size limits. Older Agy versions report an upgrade hint rather than silently falling back (#73).
  • Retain newest turns and message tails when bounding Show and BTW context, preserving JSON message framing (#73).

Full Changelog: v0.19.2...v0.19.3