Skip to content

v0.1.3

Choose a tag to compare

@github-actions github-actions released this 06 May 02:54
· 49 commits to main since this release

v0.1.3

Internal refactor for code reuse, code quality, and efficiency, plus
a new triage_inbox prompt and a small set of efficiency wins. No
breaking changes — all existing tools accept the same arguments and
return the same response shapes as v0.1.2.

New

  • triage_inbox prompt: an MCP prompt that walks an LLM agent
    through reviewing the Paperless inbox, proposing
    correspondent / document type / tag metadata that prefers existing
    items, and gating execution on explicit user confirmation before
    any writes.

Changed

  • Heavy deduplication across tool files: shared zod field schemas
    (pagination, name filters, matching algorithm, permissions),
    shared helpers for confirmation guards / "deleted" responses /
    Content-Disposition parsing, and a registerBulkEditTool factory
    that collapses three near-identical bulk-edit registrations.
  • list_documents, search_autocomplete, and list_tasks now
    build query strings via the shared helper instead of hand-rolling
    URLSearchParams.
  • PaperlessAPI.request<T> defaults to unknown instead of any;
    bulkEditObjects gained proper type annotations; postDocument
    metadata is typed; unreachable axios status checks removed.
  • documentEnhancer.ts deduplicated against the shared
    CustomFieldInstance type, dead null-input branch removed,
    two-pass map collapsed to one.
  • post_document switched from synchronous fs.readFileSync to
    fs.promises.readFile and tightened base64 validation.
  • Section-divider and dead inline comments removed across the
    codebase; ~50 dead if (!api) throw guards deleted from tool
    handlers.

Performance

  • fetchAllPages parallelizes pages 2..N when the result set
    exceeds one page (Math.ceil(count / 100) pages issued via
    Promise.all). Sequential fallback preserved for small or
    count-less responses.
  • convertDocsWithNames now skips fetching correspondents /
    document types / tags / custom fields when no document in the
    response references that entity type. A get_document on a
    thin record can drop from 4 metadata calls to 0.

Internal

  • New shared helpers in src/tools/utils: schemas.ts,
    responses.ts, bulkEdit.ts, listFilter.ts.
  • Net diff vs v0.1.2: ~800 lines removed, ~350 added.