Added
okf-mcpbundle auto-discovery. When neither a positional root nor
OKF_BUNDLE_ROOTis given,okf-mcpnow walks up from the current working
directory looking for a marked bundle (a rootindex.mdwhose
frontmatter declaresokf_version, testing each level's directory then
itsknowledge/child). Discovery is deliberately strict — an unmarked
directory is never mistaken for a bundle, so a writable server can't
accidentally start against an arbitrary docs folder. The resolved bundle
root is announced on startup. Does not apply to Claude Desktop, which
spawns servers with an unrelated working directory — keep the positional
argument orOKF_BUNDLE_ROOTthere.OkfBundleTools.WriteToolNames, a new public property naming the
three tools that mutate a bundle (okf_write_concept,okf_append_log,
okf_regenerate_indexes) — the single source of truth for a host building
a read-only tool set, instead of hand-maintaining its own copy of the list.
Fixed
ComputationExtractor's# Computationheading match no longer
misfires inside an earlier, unrelated fenced code block. The heading
scan was blind to fence state: a heading-like line trimming to
# Computationinside a prior Markdown fence was treated as the real
heading, and that fence's own closing line was then mis-read as the
sanctioned computation's opening fence — extracting arbitrary document
text as if it were sanctioned §10 computation. The scan is now
fence-aware. Separately, an indented# Computationheading (1-3 spaces,
valid CommonMark ATX heading indentation) is now recognized, matching
this method's own documented "trimmed text" contract.- Path-containment comparisons no longer guess case-sensitivity from the OS.
ReparsePoints.IsWithinBundleRoot, the 2-argReparsePoints.HasReparsePointAncestor,
andFileMemoryStore's reparse-escape check hardcodedOrdinalIgnoreCase
(or picked it via anIsWindows()||IsMacOS()heuristic) instead of
treating case-sensitivity as the runtime property of the volume it
actually is — the same reasoning behind the earlierBundle.PathComparison
fix forBundle.TryResolveResource. All three now use
StringComparison.Ordinalunconditionally. Every current caller of these
three sites already runs its ownOrdinalcontainment check first, so no
caller-reachable escape existed here before this change; what changes is
that these helpers are now sound standing alone, independent of that
caller discipline — real hardening at a security seam, at no cost to
legitimate use, since every candidate path at these sites is built via
Path.Combinefrom the same root it's compared against, so its prefix
always keeps that root's exact casing. Separately,
MemoryServiceCollectionExtensions's memory/knowledge root overlap check
— a misconfiguration-detection check whose safe direction is inverted
from the escape-prevention sites above — now uses
StringComparison.OrdinalIgnoreCaseunconditionally instead of the same
OS heuristic. This is the one site among the four with an actual
observable behavior change: it now catches a case-variant overlap that
the old heuristic could miss on Linux.
Full Changelog: https://github.com/jchable/okf4net/blob/main/CHANGELOG.md#040---2026-07-30
Install
dotnet add package OKF4net --version 0.4.0Or as a tool: dotnet tool install -g OKF4net.Mcp (the okf-mcp MCP server) — see docs/mcp for setup.