@recursiv/sdk 0.7.21 → 0.7.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -110,7 +110,7 @@ for await (const chunk of r.agents.chatStream(agent.id, { message: 'Hello!' }))
110
110
  | `r.admin` | User management, stats, content reports (`listReports`, `resolveReport`, `dismissReport`) |
111
111
  | `r.dispatcher` | Task queue, claims, signals, outcomes, webhooks |
112
112
  | `r.goals` | Org goals with task rollups (group dispatcher tasks) |
113
- | `r.protocols` | `list` returns bounded adapter `maturity`, `limitations`, and exhaustive `supported`/`planned`/`unsupported` implementation capabilities (not provider health or enablement); settings, candidate refresh/status, search, and read-only quarantined candidate review via `listCandidates` / `getCandidate` |
113
+ | `r.protocols` | Public reading: `publicNetworks`, `searchPublicProfiles`, `getPublicProfile`, `getPublicAuthorFeed`, `getFollowingFeed`, `getPublicConversation`; private app subscriptions: `listSubscriptions`, `subscribeToProfile`, `unsubscribeFromProfile`, `onSubscriptionChange`. `list` returns bounded adapter `maturity`, `limitations`, and exhaustive `supported`/`planned`/`unsupported` implementation capabilities (not provider health or enablement); settings, candidate refresh/status, search, and read-only quarantined candidate review via `listCandidates` / `getCandidate` |
114
114
 
115
115
  Full reference: see [llm.md](./llm.md) (ships with this package) or the type definitions in `dist/`.
116
116
 
package/dist/index.d.ts CHANGED
@@ -189,7 +189,7 @@ export type { UploadMediaInput, UploadUrlInput, UploadUrlResult } from './resour
189
189
  export { WalletResource } from './resources/wallet.js';
190
190
  export { ProtocolsResource } from './resources/protocols.js';
191
191
  export { PROTOCOL_ADAPTER_MATURITIES, PROTOCOL_CAPABILITY_OPERATIONS, PROTOCOL_CAPABILITY_STATUSES, } from './resources/protocols.js';
192
- export type { SocialProfile, SocialSubscription, SocialSubscriptionChange, SocialProfilePage, SocialNetwork, SocialPost, SocialAuthorFeed, SearchPublicProfilesParams, HostedProtocolConnections, HostedProtocol, HostedProtocolIdentity, HostedNostrChallenge, HostedNostrIdentityProof, HostedPostPreview, ConnectHostedIdentityInput, PreviewHostedPostInput, PublishHostedPostInput, ListProtocolCandidatesParams, ProtocolAdapterMaturity, ProtocolAdapterMetadata, ProtocolCandidateListResponse, ProtocolCandidatePageMeta, ProtocolCapabilityOperation, ProtocolCapabilityStatus, ProtocolCollectionStatus, ProtocolQuarantinedCandidate, ProtocolRefreshResult, ProtocolSettings, ProtocolSettingsUpdateResult, UpdateSettingsInput as UpdateProtocolSettingsInput, } from './resources/protocols.js';
192
+ export type { SocialProfile, SocialSubscription, SocialSubscriptionChange, SocialProfilePage, SocialNetwork, SocialPost, SocialConversation, SocialAuthorFeed, SocialFollowingFeed, SocialFollowingSource, SearchPublicProfilesParams, HostedProtocolConnections, HostedProtocol, HostedProtocolIdentity, HostedNostrChallenge, HostedNostrIdentityProof, HostedPostPreview, ConnectHostedIdentityInput, PreviewHostedPostInput, PublishHostedPostInput, ListProtocolCandidatesParams, ProtocolAdapterMaturity, ProtocolAdapterMetadata, ProtocolCandidateListResponse, ProtocolCandidatePageMeta, ProtocolCapabilityOperation, ProtocolCapabilityStatus, ProtocolCollectionStatus, ProtocolQuarantinedCandidate, ProtocolRefreshResult, ProtocolSettings, ProtocolSettingsUpdateResult, UpdateSettingsInput as UpdateProtocolSettingsInput, } from './resources/protocols.js';
193
193
  export { InboxResource } from './resources/inbox.js';
194
194
  export { NetworkResource } from './resources/network.js';
195
195
  export { SimulatorResource } from './resources/simulator.js';
@@ -201,8 +201,9 @@ export interface SocialNetwork {
201
201
  url: string;
202
202
  };
203
203
  coverage: string;
204
- capabilities: Array<'profile_search' | 'profile_read' | 'original_author_posts' | 'minds_subscription'>;
204
+ capabilities: Array<'profile_search' | 'profile_read' | 'original_author_posts' | 'minds_subscription' | 'following_feed' | 'conversation_read'>;
205
205
  profileSearchPagination: boolean;
206
+ conversationCoverage?: string;
206
207
  }
207
208
  /** Public source identity, independent of any local Minds user or handle. */
208
209
  export interface SocialProfile {
@@ -248,6 +249,8 @@ export interface SocialPost {
248
249
  protocol: string;
249
250
  nativeId: string;
250
251
  sourceUrl: string;
252
+ /** Opaque provider-local reference returned by public reads. */
253
+ readRef?: string;
251
254
  author: Omit<SocialProfile, 'subscription'>;
252
255
  text: string;
253
256
  createdAt: string;
@@ -266,6 +269,32 @@ export interface SocialAuthorFeed {
266
269
  cursor: string | null;
267
270
  coverage: 'original_posts';
268
271
  }
272
+ export interface SocialConversation {
273
+ focus: SocialPost;
274
+ /** Oldest available ancestor first, ending with the immediate parent. */
275
+ ancestors: SocialPost[];
276
+ /** Available direct replies to focus, not all descendants. */
277
+ replies: SocialPost[];
278
+ coverage: 'public_provider_window';
279
+ limited: boolean;
280
+ }
281
+ export interface SocialFollowingSource {
282
+ subscriptionId: string;
283
+ protocol: string;
284
+ nativeId: string;
285
+ status: 'ok' | 'unavailable' | 'rate_limited' | 'unsupported_protocol';
286
+ moreAvailable: boolean | null;
287
+ }
288
+ /** A bounded batch of recent author windows. Continue the cursor to read more followed accounts. */
289
+ export interface SocialFollowingFeed {
290
+ items: SocialPost[];
291
+ cursor: string | null;
292
+ sources: SocialFollowingSource[];
293
+ accountsRead: number;
294
+ totalAccounts: number;
295
+ postsPerAccount: number;
296
+ coverage: 'recent_original_posts';
297
+ }
269
298
  export declare class ProtocolsResource {
270
299
  private client;
271
300
  private subscriptionListeners;
@@ -284,6 +313,17 @@ export declare class ProtocolsResource {
284
313
  cursor?: string;
285
314
  }): Promise<SingleResponse<SocialAuthorFeed>>;
286
315
  listSubscriptions(): Promise<SingleResponse<SocialSubscription[]>>;
316
+ /** Recent originals from the current app user's followed accounts, with explicit source failures. */
317
+ getFollowingFeed(params?: {
318
+ protocol?: string;
319
+ cursor?: string;
320
+ }): Promise<SingleResponse<SocialFollowingFeed>>;
321
+ /** Read the selected source post and its bounded public conversation; never publishes or imports it. */
322
+ getPublicConversation(params: {
323
+ protocol: string;
324
+ post: string;
325
+ readRef?: string;
326
+ }): Promise<SingleResponse<SocialConversation>>;
287
327
  /** Save a private reading subscription after resolving the immutable native ID. */
288
328
  subscribeToProfile(input: {
289
329
  protocol: string;
@@ -74,6 +74,14 @@ export class ProtocolsResource {
74
74
  listSubscriptions() {
75
75
  return this.client.get('/protocols/social/subscriptions');
76
76
  }
77
+ /** Recent originals from the current app user's followed accounts, with explicit source failures. */
78
+ getFollowingFeed(params = {}) {
79
+ return this.client.get('/protocols/social/following-feed', { protocol: params.protocol, cursor: params.cursor });
80
+ }
81
+ /** Read the selected source post and its bounded public conversation; never publishes or imports it. */
82
+ getPublicConversation(params) {
83
+ return this.client.get('/protocols/social/conversation', { protocol: params.protocol, post: params.post, readRef: params.readRef });
84
+ }
77
85
  /** Save a private reading subscription after resolving the immutable native ID. */
78
86
  subscribeToProfile(input) {
79
87
  return this.client.post('/protocols/social/subscriptions', input).then(result => {
package/llm.md CHANGED
@@ -619,7 +619,7 @@ if (subscription.active) {
619
619
  - `r.admin` — Admin operations (user management, stats, network settings); content reports: `listReports({ status? })`, `resolveReport(id)`, `dismissReport(id)` (project-bound keys see only their app's reports)
620
620
  - `r.inviteCodes` / `r.inviteCodesAdmin` — Invite code management
621
621
  - `r.organizationSettings` / `r.organizationSecurity` — Org configuration
622
- - `r.protocols` — Protocol discovery/settings: `const { data: adapters } = await r.protocols.list()` returns bounded `{ id, name, icon, color, maturity, capabilities, limitations }` metadata; `supported` means implemented, not configured, healthy, authorized, or enabled. Methods: `list`, `status`, `listCandidates`, `getCandidate`, `search`, `getSettings`, `refresh`, `updateSettings`.
622
+ - `r.protocols` — Public reading: `publicNetworks`, `searchPublicProfiles`, `getPublicProfile`, `getPublicAuthorFeed`, `getFollowingFeed`, `getPublicConversation`; private app subscriptions: `listSubscriptions`, `subscribeToProfile`, `unsubscribeFromProfile`, `onSubscriptionChange`. Example after selecting a returned source post: `const { data: thread } = await r.protocols.getPublicConversation({ protocol: post.protocol, post: post.nativeId, readRef: post.readRef })`. Render `focus`, oldest-first `ancestors` and direct `replies`; `public_provider_window` never promises every reply, and `limited` marks known omissions. Requires both `users:read` and `posts:read` on the current human app key. Protocol discovery/settings: `const { data: adapters } = await r.protocols.list()` returns bounded `{ id, name, icon, color, maturity, capabilities, limitations }` metadata; `supported` means implemented, not configured, healthy, authorized, or enabled. Methods: `list`, `status`, `listCandidates`, `getCandidate`, `search`, `getSettings`, `refresh`, `updateSettings`.
623
623
  - `listCandidates({ protocol?, limit?, cursor? })` and `getCandidate(id)` are read-only quarantine review, not published-post search. Both require `admin` scope, a project-bound key, a live admin role, and existing project-admin access. The key supplies app/network scope; neither method accepts another project or network. They never invoke refresh, change settings, or publish.
624
624
  - Lists return `{ data: ProtocolQuarantinedCandidate[], meta: { limit, has_more, next_cursor } }`; use the opaque `next_cursor`, not offset pagination. The API defaults `limit` to 20 and permits at most 50. Details return `{ data: ProtocolQuarantinedCandidate }`. Every candidate has `state: 'quarantined'` and `content_format: 'plain'`; render its bounded `content` as text, respect `content_truncated`, and distinguish upstream `published_at` from local `observed_at` / `created_at`.
625
625
  - Safe source IDs are preserved byte-exact. `external_id: null` means unsafe or malformed provenance was withheld, not an invented ID; `author.native_id` may likewise be absent or withheld. Preserve nulls in both list and detail views, and use the candidate's own `id` for `getCandidate`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@recursiv/sdk",
3
- "version": "0.7.21",
3
+ "version": "0.7.23",
4
4
  "description": "TypeScript SDK for the Recursiv API",
5
5
  "license": "FSL-1.1-ALv2",
6
6
  "type": "module",