Skip to content

feat: add cursor-paged listTasksPage and TaskPage type - #7

Merged
pikann merged 1 commit into
masterfrom
feature/enhance-member-pagination
Oct 19, 2026
Merged

pikann merged 1 commit into
masterfrom
feature/enhance-member-pagination

Conversation

@pikann

@pikann pikann commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds cursor-paged task listing to PluginApiClient, matching the host's listTasksPage() from Paca-AI/paca#598. listTasks() previously stopped silently at the first 200 tasks; there was no way to read the rest.

Changes

  • listTasksPage(filters?) (new) returns one page, { items, page_size, next_cursor, total_count? }. Pass next_cursor as filters.cursor to get the next page. page_size defaults to 200.
  • listTasks(filters?) now calls listTasksPage() and returns its items. It still returns a plain array, so existing callers keep working, but it is the first page only. The docs and JSDoc now say so.
  • Types: new exported TaskPage; TaskFilters gains cursor.
  • TaskFilters.page is marked @deprecated. The tasks endpoint pages by cursor and ignores it, so the client no longer sends it.
  • README updated for the new method and the first-page behavior of listTasks().

Usage

let cursor: string | undefined;
const all = [];
do {
  const page = await api.listTasksPage({ cursor, page_size: 100 });
  all.push(...page.items);
  cursor = page.next_cursor ?? undefined;
} while (cursor);

Compatibility

Backwards compatible for callers of listTasks(): same return type. Callers that passed page get the first page instead of page N, which the API already did. Code that needs more than 200 tasks should move to listTasksPage().

Notes

  • Pairs with the host change in feat: enhance paginations paca#598 (apps/web plugin client gains the same listTasksPage()).
  • Needs a release before plugins can use listTasksPage().

@pikann pikann changed the title feat: enhance task listing with pagination support and add TaskPage i… feat: add cursor-paged listTasksPage and TaskPage type Oct 19, 2026
@pikann
pikann merged commit 02456f7 into master Oct 19, 2026
1 check passed
@pikann
pikann deleted the feature/enhance-member-pagination branch October 19, 2026 08:56
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.

1 participant