- Replaced time-based sleeps and polling loops with event-driven promise resolvers and fake timers across agent and tool tests.
- Migrated test suites to share in-memory auth storage and fixtures using lifecycle hooks.
- Updated catalog model definitions, metadata, and configurations.
- Add comprehensive Nix flake definitions, derivations, modules, and CI workflows.
- Update tests and executables to resolve binaries from PATH rather than absolute paths.
- Ensure byte reproducibility and zeroed timestamps in embedded dashboard archives.
- Add handling for Nix-managed installations in CLI update checks.
exports resolve to TypeScript source, where the build-time PI_DOCS_EMBED
placeholder is empty and the dev-tree fallback resolved docs to an
unreachable node_modules/docs, so OmpProtocolHandler.complete()/.resolve()
threw ENOENT for every npm/SDK consumer.
- bundle-dist.ts writes the docs corpus to dist/docs-index.generated.txt
(shipped via package.json files), reusing the same payload it inlines
into dist/cli.js.
- docs-index.ts reads the shipped embed when the env embed is empty and
the on-disk docs/ directory is absent, and degrades to an empty index
(with a warning) instead of propagating ENOENT.
- Added a generator-to-runtime payload round-trip test.
Fixes#8134
The vault=<name> argument was appended after the subcommand
(obsidian bases vault=Work), but the Obsidian CLI only honors it as a
top-level option before the subcommand. Placed after, the subcommand
consumed/ignored it and the command bound to whichever vault had window
focus, so vault://<name>?op=... silently queried the wrong vault.
Prepend the vault arg in #runCli and #vaultInfo so it precedes the
subcommand (obsidian vault=Work bases), matching the CLI's documented
top-level-option semantics.
Fixes#7771
The shared `recall` tool description instructs a follow-up `read memory://<id>`,
but the memory:// handler resolves only `root` and mnemopi ids. Under
memory.backend=hindsight, following the tool's own docs hit the generic
"Unknown memory namespace" error that only mentions mnemopi, causing repeated
failed reads and derailment.
Make the handler backend-aware: when a memory://<id> read arrives while a
Hindsight session is active and no mnemopi state can serve it, throw a
corrective error pointing at `recall`/`reflect` so a stray read self-corrects
in one turn.
Fixes#7587
formatAvailableResources only listed concrete resources, so the
assistant-facing summary shown on a failed mcp:// read understated the
server's contract even though template routing and /mcp resources
already handle them. Now templates are listed alongside concrete
resources.
Fixes#6911
(cherry picked from commit 254f35bb04cda8a615bbe1291d73b13cac0eabaa)
- Native (non-mcp://) resource URIs now pass through byte-for-byte via
rawHref; slash elision applies only to the legacy mcp:// wrapper, so
catalog://root/ style URIs match exact-equality server lookups.
- resources/templates/list failure no longer discards a successful
resources/list (Promise.allSettled; templates retried later).
- Opaque RFC 3986 URIs (urn:doc, custom:item) are recognized by both
the router and read-cli discovery gates, with drive-path and
read-selector false positives guarded.
- Review follow-up for PR #6790.
history:// resolve/complete/index queried the in-memory AgentRegistry
exclusively, so transcripts of unregistered one-shot helpers
(keepAlive: false), released agents, or any subagent after a session
resume threw "Unknown agent" despite their .jsonl session file
persisting on disk — unlike agent://, which reads .md outputs off disk.
Added sessionFilesFromDisk() to registry-helpers: a recursive scan of
the artifacts dirs keyed by agent id, excluding advisor transcripts
(__advisor*.jsonl) and EPERM-rewrite backups (.bak). HistoryProtocolHandler
now falls back to it on a registry miss (resolve and the else branch),
merges on-disk agents into the index, and unions them into completions.
Documented history:// in the system prompt's Internal URLs section.
Fixes#5261
Resolved file-backed memory://root URLs from the calling session cwd before falling back to the global registry.
Passed the caller cwd through bash internal-URL expansion so redirected memory paths cannot pick another live agent root.
Fixes#5079
Blocked write tool filesystem fallback for read-only internal URL schemes so memory:// targets cannot be materialized as project-relative paths.
Added a regression test covering memory://root/memory_summary.md writes and the leaked memory:/root path.
Fixes#5075
recall (includeFacts) surfaces facts.fact_id as a result id, but
store.get only searched working_memory + episodic_memory, so every
surfaced fact id was a dead end for 'read memory://<id>' and
memory_edit ('not found in any scoped bank').
- store.get now falls back to the facts table (visibility mirrors
factRecall: same-session or scope='global'), returning a read-only
row with memory_store 'fact' and the full triple as content.
- coding-agent labels the store honestly ('fact') in memory:// reads
and reports not_editable (instead of not_found) for memory_edit ops
on fact ids; the facts table stays immutable.
Fixes#4725
Skipped the workflow notice on raw selectors so bounded raw reads stay byte-for-byte, and taught resolveToolSearchScope to request pathOnly resolution so ast_grep/ast_edit scope-only calls no longer trip the inline-content cap on large artifacts.
Fixes#4482
Bash URL expansion and search/grep only need sourcePath; they now request pathOnly resolution so large artifacts stay usable for search/copy workflows while unbounded content materialization stays blocked.
Fixes#4482
Recall silently clipped every result to 500 chars mid-word with no marker,
and memory_edit update replaces content wholesale by id. There was no way
for an agent to inspect the full row before overwriting it: Mnemopi.get
existed but nothing surfaced it, and the advertised URI only served the
file-backed memory summary. The natural recall/inspect/update loop had no
inspect step.
Three fixes across mnemopi and coding-agent:
- recall now appends an ellipsis marker when it clips content and reports
truncated=true plus full_length. The cap is exposed as
RecallOptions.contentPreviewChars (default 500, 0 disables). The factLine
200-char clip used by the enhanced-context sandwich gets the same marker.
- Under the mnemopi backend the read-tool URI scheme now routes an id host
to Mnemopi.get() across every session's scoped banks, returning the row
as text/markdown with a YAML-frontmatter header (bank, store, source,
timestamp, importance, veracity). The root namespace remains for the
file-backed summary. Miss errors now name the backend explicitly.
- Updated the recall and memory_edit tool prompts to document the
truncation marker and require reading the full memory before any
wholesale content update.
Fixes#4443
Added a contributor-facing native crate map (docs/native-crates.md) covering pi-natives, pi-shell, pi-ast, pi-iso, pi-walker, pi_uu_grep, pi-uutils-ctx, and vendored brush crates, and linked it from natives-architecture.md and user-facing-packages.md.
Added a docs-index tool coverage test asserting every BUILTIN_TOOL_NAMES entry and injected custom tool (generate_image, tts) has a docs/tools/<name>.md page served by omp://.
Inlined tiny fail/buildPayloadText/checkDocsIndexFreshness helpers in generate-docs-index.ts per the project rule against single-expression named functions.
Fixes#3934
Added root omp docs for memory_edit, learn, manage_skill, generate_image, and tts, plus package-level coverage for user-facing README-only CLIs.
Added a docs-index freshness check to package check and made gen:bundle generate and reset the docs embed itself.
Fixes#3934
Migrate 203 test files (356 call sites) from fs.rm/fs.rmSync to
removeWithRetries/removeSyncWithRetries to reduce EBUSY test failures
on Windows. removeWithRetries is now exported from @oh-my-pi/pi-utils.
The migration uses a regex-based approach that:
- Replaces fs.rm(path, { recursive, force }) → removeWithRetries(path)
- Replaces fs.rmSync(path, { recursive, force }) → removeSyncWithRetries(path)
- Replaces fs.rm(path) → removeWithRetries(path) (no options)
- Skips fs.rm/fs.rmSync inside template literals (bun --eval scripts)
- Adds imports to existing @oh-my-pi/pi-utils import or creates new one
- Removes unused fs imports where fs.rm was the only fs usage (4 files)
Allow file-backed internal URL handlers to return existing directories as resources so read can list them and search/find can walk their source paths.
Fixes#3116
- Implemented `AdvisorTranscriptRecorder` to persist advisor sessions to append-only `__advisor.jsonl` files.
- Integrated transcript recording into agent sessions with managed flushing, atomic file switching, and synthetic turn attribution.
- Restricted advisor-kind agents by excluding them from rosters, history protocols, messaging, and interactive agent commands.
- Reserved the `__advisor` filename stem across the output manager and task registry to prevent task ID collisions.
- Replaced raw TypeScript documentation map with a lazily-inflated gzip blob.
- Reduced bundled binary/npm package size by approximately 0.9MB.
- Encapsulated index logic into `docs-index.ts` to separate header metadata from content.
- Added `postpack` and robust `try/finally` patterns in build scripts to ensure clean artifacts.
- Implemented disk-based fallback during development to maintain existing developer experience.
Refresh soft-expired issue and PR view cache rows synchronously before returning content, while keeping PR diff rows on stale-first refresh semantics.
Add stale fallback warnings when a live refresh fails and cover the cache/protocol behavior in tests.
Fixes#2684
- Derived the short Windows '/data/workspaces/can1357__oh-my-pi__2551/.omp-session/2026-06-14T07-09-37-753Z_019ec4f6-ee59-7000-8226-e1b7ed0680e9/local' root from the stable session id instead of the artifact path, so SessionManager.moveTo() keeps reading the pre-move local files.
- Locked the move stability with a dedicated regression test alongside the long-path coverage.
Refs #2551
- Added cycle and depth guards for nested task progress rendering so async fan-out snapshots cannot recurse until the TUI crashes.
- Shortened long Windows '/data/workspaces/can1357__oh-my-pi__2551/.omp-session/2026-06-14T07-09-37-753Z_019ec4f6-ee59-7000-8226-e1b7ed0680e9/local' roots into temp-backed session roots before plan/handoff writes hit MAX_PATH.
Fixes#2551