The HTML session export bound "toggle thinking" and "toggle tools"
to `Ctrl+T` and `Ctrl+O`. Both are reserved by every major browser
(new tab and open file), so the chord never reached the page and the
advertised toggles were unreachable.
Switch to bare `T` / `O`, ignore the keystroke while focus is in an
`<input>`/`<textarea>`/`[contenteditable]` (so the sidebar search
still accepts those letters), and let any chord with Ctrl/Meta/Alt
pass through to the browser. Help bar updated to match.
Fixes#3670
- Added `rewrite-changelog.ts` and `fix-changelogs.ts` utilities to automate the consolidation of release notes using LLM-assisted processing.
- Updated multiple internal changelog files by consolidating redundant entries and improving phrasing for readability.
- Implemented `previewLine` utility in `coding-agent` to prevent visual spillover in status rows by managing text truncation and whitespace.
- Updated `package.json` with new workflow scripts for managing package-level change histories and documentation indexes.
- Renamed the `find` and `search` tools to `glob` and `grep` respectively across the codebase to improve command clarity.
- Implemented full-stack support for the renamed tools, including CLI arguments, system prompts, SDK exports, and tool registration.
- Added automated migration logic in `settings` to transform legacy `find` and `search` configuration keys to their new equivalents.
- Updated the `collab-web` renderer registry to ensure backwards compatibility with legacy tool outputs.
- Added a `share.store` configuration option (`blob` | `gist`) that allows users to choose between the default share server or a GitHub gist for storing exported session data.
- Changed the default upload target from secret GitHub gists to the share server to avoid GitHub API rate limits for shared sessions.
- Enabled fallback to the share server when a gist upload fails or the GitHub CLI is unavailable.
- Refined obfuscation logic to use granular, typed transformations instead of generic object traversal.
- Enforced an 8-character minimum for secret patterns and restricted redaction to user-authored content to prevent false positives.
- Preserved system prompts, tool schemas, and opaque remote replay data to maintain provider context and data integrity.
- Integrated protected snapshot exports with targeted redaction to safeguard sensitive information in shared sessions.
- Introduced `web-palette.ts` to implement the collab-web pink/purple brand identity for HTML exports.
- Updated `generateThemeVars` to support a `palette` option, allowing users to choose between the brand-web aesthetic and a specific TUI theme.
- Configured public exports and the share-viewer script to default to the brand-web palette rather than inheriting the user's terminal theme.
- Refactored `AgentSession.exportToHtml` to align with the new branding defaults while allowing for per-export theme overrides.
- Adjusted `dark.json` background values to ensure better visual consistency across internal surfaces.
- Added a `suppressBreadcrumb` option to `SessionManager.open()` so headless opens skip writing the per-TTY `--continue` breadcrumb, and passed it from the subagent opens in `task/executor.ts` and the HTML export open in `export/html/index.ts`, which run in the parent's terminal and were clobbering the breadcrumb with their own artifact-dir session file.
- Added `resolveBreadcrumbToInteractiveRoot()` and applied it in `continueRecent()` so already-poisoned breadcrumbs pointing inside a parent's artifacts dir (`<parent>/<agentId>.jsonl`) resolve back up to the top-level interactive session.
- Added `subagent-breadcrumb.test.ts` covering both that a subagent open keeps `--continue` on the parent and that a stale subagent-pointing breadcrumb is recovered.
- Canonicalized assistant and thinking messages by trimming and collapsing dot text.
- Skipped rendering assistant and thinking blocks when canonicalized content was empty.
- Filtered ACP thinking notifications and session outputs to ignore placeholder content.
- Added canonicalizeMessage tests for undefined, blank, whitespace, and dot-only inputs.
- Added session-domain modules and exports for session-entries, context, listing, loader, and migrations.
- Changed persistence to async append writes plus writeTextAtomic, removing sync line APIs.
- Added compaction-aware session context rebuild with dangling tool-call cleanup.
- Added resumable session resolution with status inference, id/stem/suffix matching, and backup recovery.
- Filtered dot-only or blank thinking blocks so they no longer render as assistant thought.
- Adjusted assistant-message and streaming-reveal logic to use visible-thinking helpers for consistency.
- Added `src/export/share.ts`: `/share` now snapshots the session JSON, gzips and seals it with a fresh AES-256-GCM key, and pushes the blob to a secret gist or the share server (1 MB cap with image/string/entry truncation via `sealToFit`); links are `<serverUrl>/<id>#<key>` with the key only in the fragment.
- Added `share-loader.js` and `scripts/generate-share-viewer.ts` building the static viewer the relay serves at `GET /s/<id>`: it fetches the sealed blob, decrypts in-browser, and hands the JSON to the export template via `window.__OMP_SESSION_DATA__`.
- Reworked the `/share` command in `command-controller.ts`/`builtin-registry.ts` off the plaintext-gist HTML upload, exported `LoadedCustomShare`, and exposed the session `SecretObfuscator` getter on `AgentSession` for redaction.
- Added `share.serverUrl` and `share.redactSecrets` settings backed by `DEFAULT_SHARE_URL` from pi-wire.
- HTML exports now embed subagent transcripts: `collectSubSessions` walks `<session>/<AgentId>.jsonl` recursively into `SessionData.subSessions`, with `includeSubSessions` opt-out and the exported `buildSessionData` reused by share snapshots.
- Added `share.test.ts` (snapshot/seal/server-url contracts) and `export-subsessions.test.ts`.
- Replaced the committed `template.generated.ts` with Bun text imports (`with { type: "text" }`) of `template.html/css/js` plus the gitignored `tool-views.generated.js`, composed in a memoized `getTemplate()` in `src/export/html/index.ts`.
- Deleted `scripts/generate-template.ts` and the unused `template.macro.ts`; removed the stale package-level `.gitignore` and the `biome.json` exclusion for the generated file.
- Wired root `prepare` to `generate-docs-index` + new `build-tool-views` script and coding-agent `prepack` to rebuild tool views before `bundle-dist`, so source runs and publishes never need a manual generate step.
- Added narrow ambient text-module declarations (`*.css`, `*/template.js`, `*.generated.js`) to `bun-imports.d.ts`; `*.html` stays untyped because bun-types claims it as `HTMLBundle`, so the import casts at the use site.
- Updated `DEVELOPMENT.md` and `docs/porting-from-pi-mono.md` references; the rewritten import block transiently carries `loadEntriesFromFile`, consumed by the next commit's sub-session loader.
- Added `packages/collab-web/src/tool-render/`: a per-tool React renderer suite (one view per built-in tool) with common `ToolView` chrome, a `tv-` CSS design system, a registry, and an `<omp-tool-view>` web-component wrapper (`element.tsx`, `standalone.tsx`).
- Switched collab-web transcript `ToolCard` to the per-tool renderers instead of the generic args/result JSON dump, and threaded a `ToolRenderHost` through `Transcript`/`AgentDrawer`/`app.tsx` so task-card agent chips drill into the matching subagent drawer.
- Added `scripts/build-tool-views.ts` plus the `build:tool-views` script bundling the renderers (React included, `</script` escaped) into the gitignored `coding-agent/src/export/html/tool-views.generated.js`.
- Modernized the coding-agent HTML export chrome in `template.html/css/js` to the tool-card design language and added the `<template-tool-views/>` injection point.
- Showed the standard done checkmark for completed rows in the `job` tool renderer; its changelog line shares a changed run with the restyle entries.
- The session-operations doc gained two adjacent lines; the subagent-transcript one belongs to the upcoming /share commit but is inseparable from the tool-view line.
- Ensured flattened chain rows under a `└─` branch are anchored by a vertical line one level right of the suppressed gutter (below the branch head's content), never in the `└─` corner column itself, resolving visual issues #2298 and #2325.
Fixes#2325.
Only chain rows should force their nearest connector gutter back to vertical.
Inherited gutters from older last-sibling ancestors must stay suppressed so
linear continuations under nested branched grandchildren do not draw floating
vertical lines below unrelated branch connectors.
Updated the TUI renderer, mirrored the HTML export renderer, regenerated the
HTML template, and extended the #2298 regression to cover nested branched
grandchildren with linear continuations.
Fixes#2298
The /tree selector and HTML session export rendered chain rows (flattened
user/assistant turns) with bare spaces when their nearest branched ancestor
was the last sibling, breaking the visual connection back to the branch
parent.
Cause: tree-selector.ts and export/html/template.js propagated
`show: !isLast` to descendant gutters, so any chain row under a `└─`
ancestor rendered the gutter as space instead of `│`. Branched
grandchildren correctly need that space to keep standard tree drawing, but
chain-flattened conversation rows lost their anchor.
Fix: at render time, when the row has no connector of its own (chain row),
force the gutter to `│` regardless of the ancestor's `show` flag. Rows
with their own connector still respect the `show` flag so a `│` never
floats below an unrelated `└─` for branched descendants.
Applied identically in tree-selector.ts (TUI) and export/html/template.js
(HTML export, regenerated into template.generated.ts).
Fixes#2298
Reflects the task tool's resume path (single-agent badge or resume=<id>) and the new irc op/receipt shapes (no awaitReply, op falls back to result.details.op) in the static html exporter.
- Separated non-contiguous diff regions with a single blank gap row, normalized after block-context insertion.
- Rendered gap rows as one dim ellipsis in the TUI and HTML export.
- Applied the same blank-separator dedupe and edge-trimming to hashline's compact diff preview.
- Added `getRules()` to `TtsrManager` to expose registered TTSR rules in registration order.
- Updated `createAgentSession` to append `ttsrManager.getRules()` to active rules so TTSR rules can be resolved through `rule://`.
- Rewrote the rulebook matching docs to reflect that `rule://` now includes registered TTSR rules and why.
- Added astCondition to rule frontmatter parsing and rule metadata, with AST-grep normalization.
- Updated TTSR bucketing so astCondition-only rules are treated as interruptible matches.
- Added ts-redundant-clear-guard as a built-in JS/TS tool rule for guarded clear* calls.
- Added AST snapshot matching in agent sessions with per-stream cache throttling and cleanup.
`TtsrManager` previously ignored the `ttsr.enabled: false` toggle:
- `addRule()` still registered rules, so `bucketRules` demoted them
to the TTSR bucket and dropped the rulebook/alwaysApply fallback
- `hasRules()` still returned true, so `AgentSession` entered the
TTSR matching path on every message_update
- `checkDelta` / `checkSnapshot` (via `#matchBuffer`) still matched
patterns and could abort the stream and inject system reminders
Gate all three public-ish entry points on `#settings.enabled` so
disabling TTSR short-circuits the whole path. Condition rules fall
through to the rulebook bucket in `bucketRules` instead of being
silently swallowed.
Closes#1767
- Renamed `TodoWriteTool` to `TodoTool` and its source/prompt files.
- Updated tool registration, schema, renderers, and gating to `todo`.
- Adjusted cursor provider native tool names and tests to match.
- Renamed strike-animation constants and `todo-error-reminder` type.
- Added optional `AgentTool.matcherDigest(args)` hook so tools can expose plain source text instead of wire-encoded arguments to TTSR rule matchers.
- Implemented `matcherDigest` on edit (all modes: hashline, patch, apply_patch, replace) and write tools, stripping patch prefixes and JSON escaping.
- Added `TtsrManager.checkSnapshot()` to replace the scoped buffer with a tool digest rather than appending raw deltas.
- Fixed TTSR conditions never matching streamed edit/write calls whose wire format obscured real content.
- Added 14 bundled TTSR rules (TypeScript and Rust conventions) embedded into the binary via the lowest-priority `builtin-defaults` provider.
- Extracted rule bucketing into `bucketRules` with support for `disabledRules` and `builtinRules` settings.
- Added `ttsr.builtinRules` and `ttsr.disabledRules` settings to control which rules are active per session.
- Removed ExitPlanModeTool and deleted exit-plan-mode docs/tests, dropping the old approval contract outputs.
- Replaced plan-mode approval flow from exit_plan_mode to resolve across session, SDK, controllers, and discovery.
- Added standing resolve handler accessors and updated resolve routing for queued or standing approval handlers.
- Added PlanApprovalDetails and enforced normalized, validated approval titles with readable plan-file requirements.
- Extended resolve schema and invocation signatures with optional extra metadata and reason trimming behavior updates.
- Updated plan and resolve prompts and changelog guidance to require resolve action, reason, and extra.title for apply/discard.
- Switched template CSS/JS inlining replacements to callback form in generation scripts to avoid `$` replacement expansion semantics.
- Updated HTML export generation to use callback-based replacements for theme variables and session data injection to prevent accidental `$` substitution parsing.
- Added regression tests for the inlined script ensuring literal `$'` regex tokens remain intact, no closing HTML tags are injected, and the script parses via `new Function`.
- Introduced canonical `*** Cell` headers with `t:` and `rst` attributes in eval prompts, schema, and docs.
- Updated parser and grammar to parse `*** Cell` blocks, stop on `*** End`/next header/EOF, and handle invalid `rst` with errors.
- Added quote-aware attribute tokenizers and split HTML eval parsing into `Cell` and legacy `Begin` handlers with `py` defaults.
- Expanded parsing behavior and tests for `rst` booleans, title aliases, abort boundaries, and stray-line skips between cells.
The HTML export feed, sidebar tree, and TUI session tree did not handle
the developer role, so plan content injected after /plan approval (and
any other developer messages) was hidden from /export and shown as a
bare [developer] label in /tree.
Renders developer messages in the main feed with a dimmed
.developer-message style, labels them in the sidebar tree, counts them
in header stats, and shows their content in the TUI tree selector so
search matches the body.
Closes#753.
Co-Authored-By: omp <noreply@oh-my-pi.dev>
- Replaced `===== ... =====` eval cell headers with `*** Begin ` / `*** End ` markers; legacy format remains renderable in HTML exports.
- Replaced hashline patch grammar with `*** Begin Patch` / `*** End Patch` envelope; old inputs without the envelope are still accepted.
- Extracted `sniffEvalLanguage` into a shared `sniff.ts` module reused by the parser and tool.
- Added `docs/ERRATA-GPT5-HARMONY.md` and `scripts/session-stats/harmony_backtest.py` documenting and backtesting the GPT-5 Harmony-header leak defect.
- Added a collapsible tools header with chips and intent metadata styles in HTML exports.
- Added eval tool support with cell-level parsing and inferred language syntax highlighting.
- Added dedicated renderers for search, recipe, and irc tool calls and separated `_i` intent from tool args.
- Enhanced edit, ast_edit, find, search, and gh renderers with richer headers, fields, and option badges.
- Changed power-assertion state so assertions were prompt-scoped and no longer blocked after aborts.
- Converted systemPrompt APIs and state types to ordered `string[]` across agent, AI, and coding-agent surfaces.
- Added `normalizeSystemPrompts` and applied it to context normalization before building provider request payloads.
- Updated AI providers to emit separate normalized prompt blocks/messages instead of a single merged system prompt.
- Removed dedicated `projectPrompt` state and remapped that context into system-context buckets in session, dump, and token accounting.
- Aligned tests and changelogs to pass and assert `systemPrompt` as arrays with ordered prompt semantics.
- Switched search/ast_grep/ast_edit/find inputs from scalar path fields to required `paths` arrays.
- Reworked path resolution to normalize and expand each `paths` entry via explicit helpers in `src/tools/path-utils.ts`.
- Updated search and find tool-call rendering to display explicit `paths` values in mode overlays and export views.
- Updated tool prompt docs and examples to document `paths` array inputs for search, grep, find, and AST tools.
- Raised the default search match limit from 20 to 500 and updated limit-reached messaging.
- Added a unified eval framework with parser grammar, backend interfaces, and JS/Python execution result types.
- Added eval tool docs and updated prompts for fenced cells, `eval.py`/`eval.js`, and fallback behavior.
- Replaced the built-in `python` tool with `eval` across registry, rendering, interactive modes, and tool settings.
- Migrated Python execution runtime from `src/ipy` to `src/eval/py`, renamed state fields, and removed legacy introspection.
- Refactored browser tooling from in-process VM helpers to worker-managed tab supervisors and protocol transport.
- Added eval parser fallback and JS tool-bridge tests, updated imports, and removed obsolete python-mode suites.
- Removed legacy actions and reworked tool schema to open/run/close with required open-before-run async-JS flow.
- Added named tab reuse with browser-kind checks and close options all/kill with ref-counted disposal.
- Implemented launch/CDP hardening by finding free ports, reusing live targets, waiting for readiness, and killing process trees.
- Added readable result extraction, selector and action visibility checks, and screenshot/observation support in run execution.
- Removed `id` fields from todo models/fixtures and switched session clones to content-based task identity.
- Replaced `/todo_write` `replace` with `init`, updated setup schemas to `list`/`phase`, and append content-only items.
- Updated `/todo` command flows to match phases and tasks by names/content (exact/prefix/substr, case-insensitive), with no ID targeting.
- Updated rendering/output labels to `# Todos`, `formatPhaseDisplayName`, and Roman-numeral phase headings across todo views.
- Aligned prompts, changelog, and todo tests/fixtures with the new init and content-based todo-write contract.
- Added a unified `job` prompt and removed `poll` and `cancel-job` prompts, documenting merged async actions.
- Renamed `PollTool` to `JobTool` and replaced `poll`/`cancel_job` tool exports with a unified `job` tool.
- Expanded `JobTool` schema to accept `poll` and `cancel` IDs, adding cancel-first execution for cancel-only requests.
- Consolidated poll/cancel rendering in `renderJob`, mapping `await`, `poll`, and `cancel_job` keys to the unified job renderer with action badges.
- Updated bash/task prompts and tests to use `job` for polling and cancellation flows, including JobTool auto-background checks.
- Consolidated all former gh_* tools into a single GithubTool that routes execution by a required op field.
- Replaced gh_* tool registrations and render dispatch with `github`, including renderer key and header updates.
- Removed deprecated gh-* tool prompt files and added a unified github.md prompt covering per-op inputs and outputs.
- Updated settings-schema and ci-green prompt guidance to reference the unified github tool and `run_watch` operation.
- Updated tests and tool imports to use `GithubTool`/`githubToolRenderer` with op-based payloads and assertions.
- Renamed subagent completion flow from `submit_result` to `yield` across SDK tools, prompts, and docs.
- Updated executor/task handling to require and parse `yield` calls, replacing legacy submit-result extraction and state flags.
- Added `subagent-yield-reminder` and updated system prompts to require `yield` with `result.data` or `result.error`.
- Renamed hidden-tool and registration plumbing to `yield`, including discovery helpers and renderer/test surface.
- Canonicalized file and CLI defaults from `read` to `open` across tool registration and prompts.
- Added `resolveToolAlias()` and applied alias-normalized tool selection so legacy `read` maps to `open`.
- Updated runtime, UI, and export layers to treat `open` as first-class while preserving `read` compatibility.
- Renamed read prompt docs to `open.md`/`open-chunk.md` and refreshed system guidance to recommend `open`.
- Updated tool-related tests and expectations from `read` to `open` (including test fixtures and aliases).
- Fixed `G`/`gg` motions to distinguish "no count" (go to last/first line) from explicit count.
- Added parsing for literal `\x1b`/`\r` bytes and backslash escape sequences (`\r`, `\e`, `\n`, `\t`).
- Updated `#readCount` to return `hasCount` flag propagated through operator and motion resolution.
- Synced vim buffer fingerprint from disk on reuse to handle LSP writethrough reformats.
- Added richer session-export HTML rendering for tool calls, metadata badges, and todo trees.
- Added a persistent JavaScript execution tool backed by node:vm with cross-session KV/pubsub support.
- Replaced pythonExecution paths with jsExecution handling across tool labels and message rendering.
- Refactored tool-call rendering into dedicated renderers with shared helpers and fallback error handling.
- Added RedactedThinkingContent type to support secure encrypted reasoning blocks in Anthropic messages.
- Updated message transformation logic to preserve signed thinking blocks and redacted thinking for latest assistant messages in Anthropic conversations.
- Added handling for redacted_thinking events in Anthropic stream processing with type, data, and index fields.
- Added comprehensive tests validating redacted thinking block preservation and Anthropic thinking immutability during message transformation.
- Consolidated @oh-my-pi/pi-utils subpath imports into single package root import across 100+ files.
- Moved tryParseJson utility from local web scrapers module to @oh-my-pi/pi-utils package for centralized JSON parsing.
- Renamed loadSkillsFromDir to scanSkillsFromDir and refactored skill discovery to use fs.promises.readdir instead of glob-based approach.
- Replaced custom parseJSON with tryParseJson across discovery modules for consistent error handling.
- Removed emitCustomToolSessionEvent method and cleanupSshResources function, consolidating shutdown logic into dispose method.
- Updated glob pattern construction to use GlobBuilder with literal_separator(true) for improved path handling.
- Added TTSR injection tracking with per-turn recording and deduplication to prevent repeated rule injections within the same turn.
- Changed TTSR message format to use custom message type with metadata fields for improved injection tracking and session persistence.
- Fixed TTSR repeat-after-gap mode to correctly restore injected rules from previous sessions and recalculate gap thresholds.
- Added test suite with 6 test cases covering TTSR repeat modes (once, after-gap, restored) and injection deduplication behavior.
- Added scoped TTSR rule matching with condition and scope fields supporting file globs and tool-specific filtering.
- Added ttsr.interruptMode setting to control when TTSR rules interrupt agent responses (never/prose-only/tool-only/always).
- Added support for loading rules, prompts, and commands from ~/.agent/ directory with fallback to ~/.agents/.
- Refactored rule discovery across all providers to use unified buildRuleFromMarkdown helper and per-stream-key buffering.
- Enhanced TTSR pattern matching to respect tool-specific scope filters and normalize file paths in glob matching.