@recursiv/sdk 0.7.36 → 0.7.39

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
@@ -592,4 +592,6 @@ blocks/mutes as well. All reply and account endpoints still require authenticati
592
592
 
593
593
  Standalone public text publication uses `protocols.prepareNativePost({ clientMutationId, text, accountIds })`, then explicitly approved `submitNativePost`. Keep the same mutation ID after uncertain preparation; previously attempted deliveries are reconciled without resending. `nativePostStatus` and paginated `nativePostHistory` expose private app/user-owned outcomes. Review current own posts with `prepareNativePostRemoval`, then approve exact removal IDs through `removeNativePost`. Check connected-account `publish_text` capabilities; only explicitly enabled apps may publish. Text is sent unchanged, public only, with each provider’s actual limits. These methods do not accept media, a reply parent or caller-supplied authority.
594
594
 
595
- For Bluesky accounts advertising `quote`, prepare the same publication with `quote: { protocol: 'bluesky', nativeId: sourceAtUri }`. The server resolves the exact source CID using each connected account, checks quote permission and Minds safety, and rechecks before writing. Review each delivery’s `quote` alongside the account and comment before submitting. Changed or unavailable sources cannot publish; uncertain deliveries reconcile the original record key. ActivityPub/Nostr quotes are not provided by this method. Public post reads include at most one filtered `quote` with `state: 'available'` and `post`, or `state: 'unavailable'` without source content.
595
+ For Bluesky accounts advertising `quote`, prepare the same publication with `quote: { protocol: 'bluesky', nativeId: sourceAtUri }`. The server resolves the exact source CID using each connected account, checks quote permission and Minds safety, and rechecks before writing. Review each delivery’s `quote` alongside the account and comment before submitting. Changed or unavailable sources cannot publish; uncertain deliveries reconcile the original record key. ActivityPub/Nostr quotes are not provided by this method. Public post reads include at most one filtered `quote` with `state: 'available'` and `post`, or `state: 'unavailable'` without source content. Available quotes may include `embeddedReferences`: exact standalone source-reference lines in the unchanged outer `text`. Omit them only when the quoted original is actually visible; retain them for unavailable or locally hidden quotes. Nostr references are decoded and matched by the server, without following relay hints.
596
+
597
+ Topic browsing can request `getPublicTrends({ protocol: "bluesky", includePreviews: true })`. Optional `SocialTrend.preview` is a real image-bearing post from that topic, never a generated illustration. The server samples at most eight posts for each of ten topics, with three concurrent reads and a shared 2.5-second deadline; missing images leave usable text topics. App moderation and user source controls filter previews on every request. Bluesky CDN image attachments, quote-with-media images, and unlabeled link-preview thumbnails are supported; omitted content retains the source link.
@@ -5,6 +5,11 @@ export declare class PostsResource {
5
5
  constructor(client: HttpClient);
6
6
  /** List posts with optional filters */
7
7
  list(params?: ListPostsParams): Promise<PaginatedResponse<Post>>;
8
+ /** Broad categories currently enabled for public posts in this app. */
9
+ categories(): Promise<SingleResponse<Array<{
10
+ id: string;
11
+ name: string;
12
+ }>>>;
8
13
  /** List posts the authenticated caller has upvoted. */
9
14
  liked(params?: Pick<ListPostsParams, 'limit' | 'offset' | 'cursor'>): Promise<PaginatedResponse<Post>>;
10
15
  /** Get a single post with replies */
@@ -7,6 +7,10 @@ export class PostsResource {
7
7
  list(params) {
8
8
  return this.client.get('/posts', params);
9
9
  }
10
+ /** Broad categories currently enabled for public posts in this app. */
11
+ categories() {
12
+ return this.client.get('/posts/categories');
13
+ }
10
14
  /** List posts the authenticated caller has upvoted. */
11
15
  liked(params) {
12
16
  return this.list({ ...params, liked: true });
@@ -784,6 +784,11 @@ export interface SocialNetwork {
784
784
  capabilities: Array<'profile_search' | 'profile_read' | 'original_author_posts' | 'minds_subscription' | 'following_feed' | 'conversation_read' | 'public_trends' | 'trend_feed' | 'popular_accounts' | 'post_search'>;
785
785
  profileSearchPagination: boolean;
786
786
  postSearchAccountRequired?: boolean;
787
+ /** Categories available from the current app configuration. */
788
+ categories?: Array<{
789
+ id: string;
790
+ name: string;
791
+ }>;
787
792
  conversationCoverage?: string;
788
793
  }
789
794
  /** Public source identity, independent of any local Minds user or handle. */
@@ -848,6 +853,8 @@ export interface SocialPost {
848
853
  quote?: {
849
854
  state: 'available';
850
855
  post: Omit<SocialPost, 'quote'>;
856
+ /** Exact standalone references in text; omit only while this original is visibly rendered. */
857
+ embeddedReferences?: string[];
851
858
  } | {
852
859
  state: 'unavailable';
853
860
  };
@@ -885,6 +892,12 @@ export interface SocialTrendProvenance {
885
892
  coverage: 'provider_ranked_window';
886
893
  /** Exact ranking interval is not supplied by these providers. */
887
894
  rankingWindow: null;
895
+ categoryFilter?: {
896
+ selected: string;
897
+ status: 'complete' | 'partial';
898
+ classified: number;
899
+ unclassified: number;
900
+ };
888
901
  }
889
902
  export interface SocialTrend {
890
903
  protocol: string;
@@ -894,6 +907,8 @@ export interface SocialTrend {
894
907
  sourceUrl: string;
895
908
  startedAt: string | null;
896
909
  postCount: number | null;
910
+ /** A real image-bearing post from this topic, filtered by current source controls. */
911
+ preview?: SocialPost;
897
912
  }
898
913
  export type SocialTrends = SocialTrendProvenance & ({
899
914
  kind: 'topics';
@@ -1007,6 +1022,8 @@ export declare class ProtocolsResource {
1007
1022
  protocol: string;
1008
1023
  limit?: number;
1009
1024
  cursor?: string;
1025
+ includePreviews?: boolean;
1026
+ category?: string;
1010
1027
  }): Promise<SingleResponse<SocialTrends>>;
1011
1028
  /** Open a topic currently listed by the provider. Use its nativeId as topic and preserve the opaque cursor. */
1012
1029
  getPublicTrendFeed(params: {
@@ -1014,6 +1031,7 @@ export declare class ProtocolsResource {
1014
1031
  topic: string;
1015
1032
  limit?: number;
1016
1033
  cursor?: string;
1034
+ category?: string;
1017
1035
  }): Promise<SingleResponse<SocialTrendFeed>>;
1018
1036
  /** Provider-ranked public accounts with explicit provenance; served from the app's index when a fresh snapshot exists. */
1019
1037
  getPublicPopularProfiles(params: {
@@ -109,11 +109,14 @@ export class ProtocolsResource {
109
109
  }
110
110
  /** Current provider-ranked topics or posts, with explicit source and coverage. Does not ingest content. */
111
111
  getPublicTrends(params) {
112
- return this.client.get('/protocols/social/trends', { protocol: params.protocol, limit: params.limit, cursor: params.cursor });
112
+ return this.client.get('/protocols/social/trends', { protocol: params.protocol, limit: params.limit, cursor: params.cursor,
113
+ ...(params.includePreviews !== undefined ? { includePreviews: params.includePreviews } : {}),
114
+ ...(params.category !== undefined ? { category: params.category } : {}) });
113
115
  }
114
116
  /** Open a topic currently listed by the provider. Use its nativeId as topic and preserve the opaque cursor. */
115
117
  getPublicTrendFeed(params) {
116
- return this.client.get('/protocols/social/trend-feed', { protocol: params.protocol, topic: params.topic, limit: params.limit, cursor: params.cursor });
118
+ return this.client.get('/protocols/social/trend-feed', { protocol: params.protocol, topic: params.topic, limit: params.limit, cursor: params.cursor,
119
+ ...(params.category !== undefined ? { category: params.category } : {}) });
117
120
  }
118
121
  /** Provider-ranked public accounts with explicit provenance; served from the app's index when a fresh snapshot exists. */
119
122
  getPublicPopularProfiles(params) {
package/dist/types.d.ts CHANGED
@@ -171,6 +171,8 @@ export interface UpdatePostInput {
171
171
  }
172
172
  export type ReactionType = 'like' | 'heart' | 'fire' | 'laugh' | 'sad' | 'angry' | 'upvote' | 'downvote';
173
173
  export interface ListPostsParams extends PaginationParams {
174
+ /** Public-only broad category. Requires an enabled app experiment; limit <=25. */
175
+ category?: string;
174
176
  community_id?: string;
175
177
  author_id?: string;
176
178
  organization_id?: string;
@@ -278,7 +280,18 @@ export interface LastMessage {
278
280
  created_at: string;
279
281
  }
280
282
  export type ChatRequestStatus = 'accepted' | 'pending' | 'declined';
283
+ /** Persisted sending policy; independent of enrollment/transport feature flags. */
284
+ export type ConversationEncryptionPolicy = {
285
+ mode: 'plaintext';
286
+ } | {
287
+ mode: 'legacy_v1';
288
+ state: 'enabled' | 'locked';
289
+ } | {
290
+ mode: 'mls_v2';
291
+ };
281
292
  export interface Conversation {
293
+ /** Missing on older APIs: treat as unknown, never as plaintext permission. */
294
+ encryption?: ConversationEncryptionPolicy;
282
295
  id: string;
283
296
  type: string;
284
297
  name: string | null;
@@ -290,6 +303,8 @@ export interface Conversation {
290
303
  created_at: string;
291
304
  }
292
305
  export interface ConversationDetail {
306
+ /** Missing on older APIs: treat as unknown, never as plaintext permission. */
307
+ encryption?: ConversationEncryptionPolicy;
293
308
  id: string;
294
309
  type: string;
295
310
  name: string | null;
package/llm.md CHANGED
@@ -822,6 +822,8 @@ user/app-bound result IDs and discard UI state after an account switch. The last
822
822
  read-back observation is separate from retained publication/deletion evidence.
823
823
 
824
824
  Standalone public text posts: `prepareNativePost({ clientMutationId, text, accountIds })` → review → `submitNativePost(id, { approve: true, deliveryIds })`. Use `nativePostStatus(id)` / `nativePostHistory({limit,cursor})` for private durable outcomes and `prepareNativePostRemoval(id,{deliveryIds})` → `removeNativePost(id,{approve:true,removals:[{deliveryId,removalId}]})` for reviewed own-post removal. Check `publish_text` capability; no media, reply parent or audience override. Preserve mutation IDs, never create a new send to recover uncertainty.
825
- Bluesky quote: accounts must advertise `quote`; call `prepareNativePost({clientMutationId,text,accountIds,quote:{protocol:'bluesky',nativeId:sourceAtUri}})`, review each returned quote/account/comment, then approve via the same submit method. The server binds the source CID and rechecks permissions before sending. No cross-network quote conversion. Public reads expose one filtered `post.quote` (`available` with `post`, or `unavailable` without source details).
825
+ Bluesky quote: accounts must advertise `quote`; call `prepareNativePost({clientMutationId,text,accountIds,quote:{protocol:'bluesky',nativeId:sourceAtUri}})`, review each returned quote/account/comment, then approve via the same submit method. The server binds the source CID and rechecks permissions before sending. No cross-network quote conversion. Public reads expose one filtered `post.quote` (`available` with `post`, or `unavailable` without source details). Available quotes may include `embeddedReferences`: exact standalone source-reference lines in the unchanged outer `text`. Omit them only when the quoted original is actually visible; retain them for unavailable or locally hidden quotes. Nostr references are decoded and matched by the server, without following relay hints.
826
826
 
827
827
  Public post search (API/SDK 0.7.35): `const { data: page } = await r.protocols.searchPublicPosts({ protocol: 'nostr', query: 'open social', limit: 10 })`. Bluesky/ActivityPub require a selected `accountId` from `nativeSocialAccounts()` with `post_search`; older Bluesky grants must reconnect with consent. Open their results with `getConnectedSocialConversation({ protocol, accountId: page.readerAccountId, post: item.nativeId, readRef: item.readRef })` and pass the same accountId to `reportSource` for post reports. Nostr uses `getPublicConversation`. Pages report provider/observedAt and bounded coverage; no invented exhaustive or global search. Keep cursors paired with the exact owner, query, account, limit and connection revision. No writes, credentials or new ingestion are part of search.
828
+
829
+ Topic browsing can request `getPublicTrends({ protocol: "bluesky", includePreviews: true })`. Optional `SocialTrend.preview` is a real image-bearing post from that topic, never a generated illustration. The server samples at most eight posts for each of ten topics, with three concurrent reads and a shared 2.5-second deadline; missing images leave usable text topics. App moderation and user source controls filter previews on every request. Bluesky CDN image attachments, quote-with-media images, and unlabeled link-preview thumbnails are supported; omitted content retains the source link.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@recursiv/sdk",
3
- "version": "0.7.36",
3
+ "version": "0.7.39",
4
4
  "description": "TypeScript SDK for the Recursiv API",
5
5
  "license": "FSL-1.1-ALv2",
6
6
  "type": "module",