NewAria SDK
@revenexx/aria-sdk v0.5.0
Added
listThreads()lists the caller's threads, most recent activity first, as aThreadPageofThreadSummaryitems. PassnextCursorback ascursorfor the next, older page.getMessages()reads a thread's history page by page as aMessagePageofHistoryMessageitems, newest page first and chronological within a page. Tool calls, in the sameToolCallshapeask()returns, are included withincludeToolCalls: true.deleteThread()deletes a thread and its whole history.- A
nullcursor counts as no cursor, so a page'snextCursorcan 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: athreadIdthat is not a non-empty string (or is.or..) and an emptycursorwithTypeError, alimitthat is not a positive integer withRangeError. threadRefusalOf()and theThreadRefusaltype tell a thread refusal (impersonation_forbiddenoruser_required) apart from any otherforbidden. A thread that does not exist or belongs to someone else fails withserverCode: 'not_found'.
These calls need an Aria API that serves the thread history routes (API 1.3.0 or later).