Skip to content

docs: document content search, time range, and sort params for host apps (#73) - #77

Open
sun-970 wants to merge 5 commits into
bytefolk:mainfrom
sun-970:docs/host-app-search-integration
Open

sun-970 wants to merge 5 commits into
bytefolk:mainfrom
sun-970:docs/host-app-search-integration

Conversation

@sun-970

@sun-970 sun-970 commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #73.

Companion to #68 / #69. PR #69 implements the API-side changes (content search, time range filters, sort options). This PR documents the new capabilities and provides a host-app integration guide so embedders (RoleWeave Memory & Collaboration, other embeddings) know how to consume them.

Changes

  • docs/API.md: Updated GET /api/v1/documents section to document:

    • query now searches both title AND content (OR semantics)
    • after / before time range filters (ISO 8601, filter on updatedAt)
    • sort param (updated_desc, updated_asc, created_desc, created_asc)
    • Cursor pagination compatibility note (created_* sorts don't support cursor)
    • Example requests
  • docs/host-app-integration.md (new): Integration guide for host apps covering:

    • Search across title and content
    • Time range filtering
    • Sort options and pagination caveats
    • Combined parameter examples
    • Error handling reference
  • docs/CAPABILITIES.md: Updated Document API v1 row to mention content search, time range filters, and sort options.

Scope note

The host-app UI layer (search box, filter controls, matchField rendering) lives in the host application repos (e.g. bytefolk/roleweave). This PR covers only the doc-side documentation that host apps consume.

…pps (bytefolk#73)

- Update API.md with new query params (after, before, sort) and document
  that query now searches both title and content
- Add host-app-integration.md guide for embedders consuming the search API
- Update CAPABILITIES.md to reflect the expanded Document API v1 surface
user added 3 commits September 18, 2026 11:27
The after/before params filter on updatedAt, not createdAt, per the
buildDateWhere implementation in doc-query.ts.
Shows host apps how to verify after/before behavior and handle the
400 invalid_query error for malformed dates.

@waterbro-8 waterbro-8 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI test is red on Prettier. I cannot push sun-970/doc.

Please run:

npx prettier --write docs/API.md docs/CAPABILITIES.md docs/host-app-integration.md

then push. After format is green this docs PR looks mergeable (describes current list-API search/time/sort; correctly notes that matchField is not in the response yet).

@waterbro-8 waterbro-8 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review: Prettier on docs/API.md, docs/CAPABILITIES.md, and docs/host-app-integration.md is in c37ebc3, and CI test/docker-build are green.

This documents current list-API search / time / sort for host apps and correctly notes that matchField is not in the response yet. I cannot satisfy CODEOWNERS myself.

@Bindy-lbb Bindy-lbb left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed current head c37ebc3. Documentation accurately matches the implemented API behavior; CI is green and the Prettier follow-up is present.

Non-blocking docs nit: the September example uses before=2026-09-30, but before is strict, so it excludes all of September 30. Consider using before=2026-10-01 for a complete calendar-month example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: host apps should consume content search, time range, and sort params

3 participants