- Updated hashline streaming preview tests to generate snapshot-tagged section headers and use an in-memory snapshot store.
- Replaced untagged file markers in multi-section preview inputs with `formatHashlineHeader` values derived from recorded file contents.
- Changed the bash command error test to expect a returned `isError` result with exit code 1 instead of a rejected promise.
- Added `mnemosyne.scoping` setting: `global`, `per-project`, and `per-project-tagged`.
- `per-project-tagged` writes to a project-local bank while merging global memories on recall.
- Refactored `MnemosyneSessionState` to manage scoped recall/retain targets and deduplication.
- Updated hindsight tools to route recall/retain through scoped methods.
- Added `.ipynb` detection and editable-cell conversion utilities, including merge/serialize helpers in `edit/notebook`.
- Rerouted hashline, patch, and replace edit flows, plus read/write paths, through notebook-aware helpers before persistence.
- Removed the dedicated `notebook` tool, its schema flags, renderer, and built-in registration/settings checks.
- Updated notebook read behavior, docs, and tests so `.ipynb` reads return editable `# %%` cells and edits reserialize to JSON.
- Added optional `loadMode` and `summary` fields to `AgentTool` and related type declarations.
- Added `loadMode` and `summary` metadata to built-in tool classes for discoverable/essential behavior.
- Replaced `BUILTIN_TOOL_METADATA` with per-tool fields in discovery code paths.
- Updated `search_tool_bm25` and discovery indexing to use each tool's `summary` text.
- Updated discovery tests to validate tool `loadMode` and summary completeness.
Restore BUILTIN_TOOLS to Record<string, ToolFactory> so external SDK callers can
still invoke BUILTIN_TOOLS.read(session) directly, and move per-tool discovery
metadata (loadMode, summary) into a dedicated BUILTIN_TOOL_METADATA map. All
internal callers (computeEssentialBuiltinNames, getBuiltinDiscoverableEntries,
createTools, sdk.ts initial-tool filter, agent-session built-in collection) now
read metadata through the new map.
Restore the legacy MCP discovery API on AgentSession: getDiscoverableMCPTools()
returns DiscoverableMCPTool[] with description, and getDiscoverableMCPSearchIndex()
returns the legacy DiscoverableMCPSearchIndex whose documents expose
tool.description while remaining usable by searchDiscoverableTools (summary is
populated from description so the BM25 corpus still scores correctly). Generic
discovery via getDiscoverableTools / getDiscoverableToolSearchIndex is unchanged.
Centralize discovery cache invalidation in #invalidateDiscoveryCaches and call it
from #applyActiveToolsByName, refreshMCPTools, and refreshRpcHostTools so the
generic search index can no longer return tools that have already been activated
or registry entries that have been replaced.
Restrict #collectDiscoverableBuiltinTools to entries whose
BUILTIN_TOOL_METADATA[name].loadMode === "discoverable", which keeps hidden
tools (resolve, yield, exit_plan_mode, report_finding, report_tool_issue) and
unknown extension/custom registry entries out of the discovery corpus.
Tests: add coverage for callable BUILTIN_TOOLS factories, legacy MCP description
shape on getDiscoverableMCPTools / getDiscoverableMCPSearchIndex, stale-index
invalidation on setActiveToolsByName, and hidden-tool exclusion from
getDiscoverableTools({ source: "builtin" }).
Added two settings:
- tools.discoveryMode ("off" | "mcp-only" | "all", default "off")
- tools.essentialOverride (string[], default empty)
Converted BUILTIN_TOOLS from Record<string, ToolFactory> to
Record<string, BuiltinEntry> with a per-tool loadMode ("essential"
or "discoverable") and an optional summary used as the BM25 corpus
entry when discovery hides the tool.
Marked read, bash, edit as essential. Marked the remaining 24 built-in
tools as discoverable with hand-written summaries. search_tool_bm25
stays essential (always loaded when discovery is on; gated separately
by isToolAllowed).
Added DEFAULT_ESSENTIAL_TOOL_NAMES, computeEssentialBuiltinNames
(reads tools.essentialOverride with a default fallback), and
getBuiltinDiscoverableEntries (used by the search tool to build the
BM25 corpus).
mcp.discoveryMode is preserved as a back-compat alias for "mcp-only".