Skip to content

OKF4net 0.4.0

Latest

Choose a tag to compare

@github-actions github-actions released this 30 Jul 16:04

Added

  • okf-mcp bundle auto-discovery. When neither a positional root nor
    OKF_BUNDLE_ROOT is given, okf-mcp now walks up from the current working
    directory looking for a marked bundle (a root index.md whose
    frontmatter declares okf_version, testing each level's directory then
    its knowledge/ 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 or OKF_BUNDLE_ROOT there.
  • 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 # Computation heading 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
    # Computation inside 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 # Computation heading (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-arg ReparsePoints.HasReparsePointAncestor,
    and FileMemoryStore's reparse-escape check hardcoded OrdinalIgnoreCase
    (or picked it via an IsWindows()||IsMacOS() heuristic) instead of
    treating case-sensitivity as the runtime property of the volume it
    actually is — the same reasoning behind the earlier Bundle.PathComparison
    fix for Bundle.TryResolveResource. All three now use
    StringComparison.Ordinal unconditionally. Every current caller of these
    three sites already runs its own Ordinal containment 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.Combine from 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.OrdinalIgnoreCase unconditionally 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.0

Or as a tool: dotnet tool install -g OKF4net.Mcp (the okf-mcp MCP server) — see docs/mcp for setup.