@recursiv/sdk 0.7.36 → 0.7.37

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.
@@ -848,6 +848,8 @@ export interface SocialPost {
848
848
  quote?: {
849
849
  state: 'available';
850
850
  post: Omit<SocialPost, 'quote'>;
851
+ /** Exact standalone references in text; omit only while this original is visibly rendered. */
852
+ embeddedReferences?: string[];
851
853
  } | {
852
854
  state: 'unavailable';
853
855
  };
@@ -894,6 +896,8 @@ export interface SocialTrend {
894
896
  sourceUrl: string;
895
897
  startedAt: string | null;
896
898
  postCount: number | null;
899
+ /** A real image-bearing post from this topic, filtered by current source controls. */
900
+ preview?: SocialPost;
897
901
  }
898
902
  export type SocialTrends = SocialTrendProvenance & ({
899
903
  kind: 'topics';
@@ -1007,6 +1011,7 @@ export declare class ProtocolsResource {
1007
1011
  protocol: string;
1008
1012
  limit?: number;
1009
1013
  cursor?: string;
1014
+ includePreviews?: boolean;
1010
1015
  }): Promise<SingleResponse<SocialTrends>>;
1011
1016
  /** Open a topic currently listed by the provider. Use its nativeId as topic and preserve the opaque cursor. */
1012
1017
  getPublicTrendFeed(params: {
@@ -109,7 +109,8 @@ 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 } : {}) });
113
114
  }
114
115
  /** Open a topic currently listed by the provider. Use its nativeId as topic and preserve the opaque cursor. */
115
116
  getPublicTrendFeed(params) {
package/dist/types.d.ts CHANGED
@@ -278,7 +278,18 @@ export interface LastMessage {
278
278
  created_at: string;
279
279
  }
280
280
  export type ChatRequestStatus = 'accepted' | 'pending' | 'declined';
281
+ /** Persisted sending policy; independent of enrollment/transport feature flags. */
282
+ export type ConversationEncryptionPolicy = {
283
+ mode: 'plaintext';
284
+ } | {
285
+ mode: 'legacy_v1';
286
+ state: 'enabled' | 'locked';
287
+ } | {
288
+ mode: 'mls_v2';
289
+ };
281
290
  export interface Conversation {
291
+ /** Missing on older APIs: treat as unknown, never as plaintext permission. */
292
+ encryption?: ConversationEncryptionPolicy;
282
293
  id: string;
283
294
  type: string;
284
295
  name: string | null;
@@ -290,6 +301,8 @@ export interface Conversation {
290
301
  created_at: string;
291
302
  }
292
303
  export interface ConversationDetail {
304
+ /** Missing on older APIs: treat as unknown, never as plaintext permission. */
305
+ encryption?: ConversationEncryptionPolicy;
293
306
  id: string;
294
307
  type: string;
295
308
  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.37",
4
4
  "description": "TypeScript SDK for the Recursiv API",
5
5
  "license": "FSL-1.1-ALv2",
6
6
  "type": "module",