Skip to content

v0.20.0

Choose a tag to compare

@aylusltd aylusltd released this 17 Aug 23:02
· 35 commits to main since this release

Agents can find the context they need

Completes the cluster started in v0.19.0. An agent handed one page can now see
what that page points at, be told to go read it, and fetch several linked pages
in one call.

  • get_page asks you to follow the links. The tool docstring and the server
    instructions now name the moment — before you write about, quote, or edit
    something a page links to, read the linked page first
    — and each response
    carries a one-line hint when the page has links. Only when it has links: a
    hint on every page is one agents learn to skip.
  • read_pages(slugs) fetches up to 10 pages in one call, so following five
    links costs one round-trip instead of five. Missing slugs come back in
    missing rather than failing the batch, and slugs past the cap are reported
    in dropped rather than silently truncated. It shares one code path with
    get_page, so a page reads identically whichever tool you used.

Worth noting from the implementation: fetching the live-edit overlay
concurrently made the batch slower (421ms vs 82ms) because each call built and
discarded its own HTTP client. One shared client for the batch was the real fix
(82ms → 11ms); bounded concurrency on top only pays once the server is actually
slow (354ms → 90ms at 30ms/request). Ten pages now cost 82ms where ten
get_page calls cost 498ms.

Templates can declare their metadata's shape (#28)

A template can now say what the frontmatter of pages made from it should look
like — hp: int, role: player | npc, born: date, blade*: int for required
— compiled to pydantic checks. It warns, never blocks, for humans and agents
alike: an invalid value is reported with what was expected and left verbatim on
disk, never coerced and never rejected. Rejecting a write while a human types
into the same document would make validation a source of lost work.

Existing wikis are unaffected: the migration adds an empty column, and a page is
only checked if it carries a template: property, which is only stamped when
the template actually declares a schema.

Also

pydantic>=2.7 is now an explicit dependency (it was only transitively present
via FastAPI).