@recursiv/sdk 0.7.35 → 0.7.36
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 +2 -0
- package/dist/resources/protocols.d.ts +21 -0
- package/dist/resources/protocols.js +2 -1
- package/llm.md +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -591,3 +591,5 @@ 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.
|
|
@@ -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,13 @@ 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
|
+
} | {
|
|
852
|
+
state: 'unavailable';
|
|
853
|
+
};
|
|
833
854
|
}
|
|
834
855
|
export interface SocialPostSearch {
|
|
835
856
|
items: SocialPost[];
|
|
@@ -188,7 +188,8 @@ export class ProtocolsResource {
|
|
|
188
188
|
/** Prepare exact public text for selected connected Bluesky/ActivityPub accounts. */
|
|
189
189
|
prepareNativePost(input) {
|
|
190
190
|
return this.client.post('/protocols/social/posts/prepare', { clientMutationId: input.clientMutationId,
|
|
191
|
-
text: input.text, accountIds: input.accountIds
|
|
191
|
+
text: input.text, accountIds: input.accountIds,
|
|
192
|
+
...(input.quote ? { quote: { protocol: input.quote.protocol, nativeId: input.quote.nativeId } } : {}) }, { retry: false });
|
|
192
193
|
}
|
|
193
194
|
/** Explicitly approve selected deliveries; never auto-retry an uncertain write. */
|
|
194
195
|
submitNativePost(id, input) {
|
package/llm.md
CHANGED
|
@@ -822,5 +822,6 @@ 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
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.
|