Briyah SDK - v2.0.6
    Preparing search index...

    Interface ToolPackDocuments

    Read access to the documents a pack ships in its artifacts/ directory.

    Lets a pack's tools enumerate and read their own reference material instead of an operator having to attach each document to the right agent by hand. The files are the source of truth, so adding one is a file drop with nothing else to edit — which is what the 5e pack's twelve class-*.md documents rely on.

    Read-only, and synchronous for the same reason ToolRoomAccess is: a tool that reads a document and writes it into an artifact must not yield between the two.

    interface ToolPackDocuments {
        list(pack: string, prefix?: string): string[];
        read(pack: string, fileName: string): string;
    }
    Index
    • Parameters

      • pack: string

        The pack whose documents to list, e.g. dnd5e

      • Optionalprefix: string

        Keep only file names starting with this, case-insensitively

      Returns string[]

      Bare .md file names, sorted; empty when the pack ships none

    • Parameters

      • pack: string

        The pack the document belongs to

      • fileName: string

        A bare file name, as list returns

      Returns string

      The document's text, or null when there is no such document