pi-bro 0.21.0 → 0.22.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,91 @@
2
2
 
3
3
  All notable changes to pi-bro are documented here.
4
4
 
5
+ ## [Unreleased]
6
+
7
+ ### Added
8
+
9
+ - 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).
10
+
11
+ - Reader benchmark for Explain modes, BTW answers, preferences and repeated samples (#110):
12
+ - Fingerprinted live runs, narrow Jev binary checks, and per-check candidate comparisons.
13
+ - Report-only reader-visible counts and source deltas, separate from preservation and formatting checks.
14
+ - Committed synthetic baseline evidence with offline recomputation in CI.
15
+ - Optional generation through existing Claude, Codex and Muse adapters alongside Agy.
16
+ - Synthetic coverage and experimental judgments are decision support, not proof of full fidelity or comprehension; production prompts are unchanged.
17
+
18
+ ### Changed
19
+
20
+ - 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).
21
+ - Added `SECURITY.md`, `CONTRIBUTING.md`, issue forms and `docs/PUBLIC-PRESENTATION.md`, the presentation standard for pi-* repos (#116).
22
+ - 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).
23
+
24
+ ## [0.22.1] - 2026-10-12
25
+
26
+ ### Security
27
+
28
+ - Public-web transport safety boundaries and offline qualification (#86):
29
+ - 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.
30
+ - Disable HTTP socket connection pooling (`agent: false`) on web requests so keep-alive socket reuse cannot bypass address pinning (`lookup`).
31
+ - 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.
32
+
33
+ ### Fixed
34
+
35
+ - Interrupt stalled DNS lookups immediately when an abort or timeout signal fires during web ingestion (#86).
36
+
37
+ ## [0.22.0] - 2026-10-11
38
+
39
+ ### Fixed
40
+
41
+ - Persist settings with atomic replacement and mode 0o600 (#84):
42
+ - Replace direct `writeFile` with atomic sibling write (`.tmp`) and `rename` to prevent settings corruption on failure, crash, or disk full (`ENOSPC`).
43
+ - Flush writes before replacement (`flush: true`) and clean up temporary files on failure.
44
+ - Enforce `mode: 0o600` on replaced settings files so permissions are never loosened.
45
+ - Resolve symlinks via lstat and realpath before replacement to preserve dotfile-managed configuration symlinks, and reject if an existing symlink target cannot be resolved.
46
+ - Align on-disk state with modal rollback behavior in `/bro config`.
47
+
48
+ ### Added
49
+
50
+ - 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.
51
+ - 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.
52
+ - 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.
53
+ - 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.
54
+
55
+ - Durable advisor steering across sessions in `~/.pi/agent/bro-advisor.md` (#97):
56
+ - Ingest standing priorities from `bro-advisor.md` alongside session steering (`/bro advisor-steer`).
57
+ - Labeled prompt composition in `buildAdvisorPrompt`: standing priorities appear under `### Standing priorities (durable across sessions)` and session priorities under `### Session priorities (this session only)`.
58
+ - Session-specific priorities take precedence over standing defaults where they conflict.
59
+ - Fail-closed validation rejects files > 64 KB and > 4,000 characters before spawning any backend process.
60
+ - Doctor reports both `Advisor steering (session)` and `Advisor steering (durable)`.
61
+ - Tool result context line and details track `steeringSources: { durable, session }` while preserving backwards-compatible `steeringIncluded` boolean.
62
+ - Retries use a frozen prompt snapshot built prior to `runAdvisorWithRetries`.
63
+ - Clearing session steering leaves durable steering intact.
64
+
65
+ ### Changed
66
+
67
+ - Doctor treats an unsupported optional review backend as an informational override hint, not a broken installation; healthy Agy/Grok/Codex defaults still report ready.
68
+ - 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.
69
+ - 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.
70
+ - Removed prototype record migrations after one-time backup/normalization of development records; split validation and formatted review modules/tests to the repository tab style.
71
+
72
+ - 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.
73
+ - Remove dead declarations and stale backend naming (#90):
74
+ - Enable native TypeScript unused checks (`noUnusedLocals`, `noUnusedParameters`) in `tsconfig.json`.
75
+ - Remove verified unused declarations across `bro.ts`, `backend.test.ts`, `benchmark/run.ts`, `codex.test.ts`, and `release.test.ts`.
76
+ - Drop pass-through re-exports from `bro.ts` (`agyFailureMessage`, `agySelection`, `advisorFlagErrorHint`, `parseBtwAgyLine`); tests and consumers import them directly from `backend.ts`.
77
+ - Rename multi-backend facilities with obsolete Agy prefixes: `runAgyText` -> `runBackendText` in `bro.ts` and `killAgyGroup` -> `killProcessGroup` in `backend.ts`.
78
+ - Modernize outdated single-backend and pre-extraction comments.
79
+ - Separate Bro responsibilities and unify settings and backend-selection policy (#83):
80
+ - Extract `settings.ts` (schema, typed `EXTERNAL_BACKENDS` metadata, selection policy, pure transitions, and file persistence).
81
+ - Extract `sources.ts` (self-contained document text extraction and public web scraping with SSRF protection).
82
+ - Extract `config-ui.ts` (`/bro config` modal, setting items, and async save serialization).
83
+ - Extract `util.ts` (shared leaf utility helpers).
84
+ - Unify legacy flat and v2 settings parsing into one converged validation pipeline in `settings.ts`, eliminating duplicate validation branches.
85
+ - Initialize clean version 2 settings on fresh installations in `ensureSettingsFile()`.
86
+ - Share pure state transitions (`applyModelChange`, `applyEffortChange`) across default and capability override rows.
87
+ - Fix Agy variant model reselection bug where resolved effort from suffixed variants was lost.
88
+ - Consolidate CLI version probes in `/bro doctor` into a single `checkCliVersion` helper.
89
+
5
90
  ## [0.21.0] - 2026-10-04
6
91
 
7
92
  ### Added