NewAria SDK

@revenexx/aria-sdk v0.5.0

Added

  • listThreads() lists the caller's threads, most recent activity first, as a ThreadPage of ThreadSummary items. Pass nextCursor back as cursor for the next, older page.
  • getMessages() reads a thread's history page by page as a MessagePage of HistoryMessage items, newest page first and chronological within a page. Tool calls, in the same ToolCall shape ask() returns, are included with includeToolCalls: true.
  • deleteThread() deletes a thread and its whole history.
  • A null cursor counts as no cursor, so a page's nextCursor can be passed back unchanged. A history or thread list item the SDK cannot type (an unknown role, no id) is left out instead of failing the page, and a history page for another thread is refused.
  • Arguments that can only be a bug in the calling code reject before any request, with a built-in error rather than an ApiError: a threadId that is not a non-empty string (or is . or ..) and an empty cursor with TypeError, a limit that is not a positive integer with RangeError.
  • threadRefusalOf() and the ThreadRefusal type tell a thread refusal (impersonation_forbidden or user_required) apart from any other forbidden. A thread that does not exist or belongs to someone else fails with serverCode: 'not_found'.

These calls need an Aria API that serves the thread history routes (API 1.3.0 or later).