@recursiv/sdk 0.7.35 → 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 +4 -0
- package/dist/resources/protocols.d.ts +26 -0
- package/dist/resources/protocols.js +4 -2
- package/dist/types.d.ts +13 -0
- package/llm.md +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -591,3 +591,7 @@ closed. Signed-in members continue using `getPublicConversation` to apply person
|
|
|
591
591
|
blocks/mutes as well. All reply and account endpoints still require authentication.
|
|
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
|
+
|
|
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.
|
|
@@ -594,6 +594,11 @@ export interface NativePostPrepareInput {
|
|
|
594
594
|
clientMutationId: string;
|
|
595
595
|
text: string;
|
|
596
596
|
accountIds: string[];
|
|
597
|
+
/** Native quote on Bluesky only. The server reads the source and permissions using each selected account. */
|
|
598
|
+
quote?: {
|
|
599
|
+
protocol: 'bluesky';
|
|
600
|
+
nativeId: string;
|
|
601
|
+
};
|
|
597
602
|
}
|
|
598
603
|
export interface NativePostBatch {
|
|
599
604
|
id: string;
|
|
@@ -602,6 +607,15 @@ export interface NativePostBatch {
|
|
|
602
607
|
deliveries: Array<Omit<NativeReplyBatch['deliveries'][number], 'kind' | 'parent' | 'recoverable' | 'replacedBy'> & {
|
|
603
608
|
audience: 'public';
|
|
604
609
|
maxCharacters: number;
|
|
610
|
+
quote?: {
|
|
611
|
+
protocol: 'bluesky';
|
|
612
|
+
nativeId: string;
|
|
613
|
+
cid: string;
|
|
614
|
+
authorId: string;
|
|
615
|
+
authorHandle: string;
|
|
616
|
+
sourceUrl: string;
|
|
617
|
+
text: string;
|
|
618
|
+
};
|
|
605
619
|
}>;
|
|
606
620
|
}
|
|
607
621
|
export interface NativePostHistory {
|
|
@@ -830,6 +844,15 @@ export interface SocialPost {
|
|
|
830
844
|
alt: string;
|
|
831
845
|
}>;
|
|
832
846
|
hasAdditionalContent: boolean;
|
|
847
|
+
/** At most one independently filtered quoted post. */
|
|
848
|
+
quote?: {
|
|
849
|
+
state: 'available';
|
|
850
|
+
post: Omit<SocialPost, 'quote'>;
|
|
851
|
+
/** Exact standalone references in text; omit only while this original is visibly rendered. */
|
|
852
|
+
embeddedReferences?: string[];
|
|
853
|
+
} | {
|
|
854
|
+
state: 'unavailable';
|
|
855
|
+
};
|
|
833
856
|
}
|
|
834
857
|
export interface SocialPostSearch {
|
|
835
858
|
items: SocialPost[];
|
|
@@ -873,6 +896,8 @@ export interface SocialTrend {
|
|
|
873
896
|
sourceUrl: string;
|
|
874
897
|
startedAt: string | null;
|
|
875
898
|
postCount: number | null;
|
|
899
|
+
/** A real image-bearing post from this topic, filtered by current source controls. */
|
|
900
|
+
preview?: SocialPost;
|
|
876
901
|
}
|
|
877
902
|
export type SocialTrends = SocialTrendProvenance & ({
|
|
878
903
|
kind: 'topics';
|
|
@@ -986,6 +1011,7 @@ export declare class ProtocolsResource {
|
|
|
986
1011
|
protocol: string;
|
|
987
1012
|
limit?: number;
|
|
988
1013
|
cursor?: string;
|
|
1014
|
+
includePreviews?: boolean;
|
|
989
1015
|
}): Promise<SingleResponse<SocialTrends>>;
|
|
990
1016
|
/** Open a topic currently listed by the provider. Use its nativeId as topic and preserve the opaque cursor. */
|
|
991
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) {
|
|
@@ -188,7 +189,8 @@ export class ProtocolsResource {
|
|
|
188
189
|
/** Prepare exact public text for selected connected Bluesky/ActivityPub accounts. */
|
|
189
190
|
prepareNativePost(input) {
|
|
190
191
|
return this.client.post('/protocols/social/posts/prepare', { clientMutationId: input.clientMutationId,
|
|
191
|
-
text: input.text, accountIds: input.accountIds
|
|
192
|
+
text: input.text, accountIds: input.accountIds,
|
|
193
|
+
...(input.quote ? { quote: { protocol: input.quote.protocol, nativeId: input.quote.nativeId } } : {}) }, { retry: false });
|
|
192
194
|
}
|
|
193
195
|
/** Explicitly approve selected deliveries; never auto-retry an uncertain write. */
|
|
194
196
|
submitNativePost(id, input) {
|
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,5 +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). 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.
|
|
825
826
|
|
|
826
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.
|