@recursiv/sdk 0.7.33 → 0.7.34

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
@@ -589,3 +589,5 @@ per-IP/app budgets. They return no subscriptions, personal safety preferences, a
589
589
  connections or signing authority. Missing configuration or unavailable safety checks fail
590
590
  closed. Signed-in members continue using `getPublicConversation` to apply personal
591
591
  blocks/mutes as well. All reply and account endpoints still require authentication.
592
+
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.
package/dist/index.d.ts CHANGED
@@ -194,7 +194,7 @@ export type { UploadMediaInput, UploadUrlInput, UploadUrlResult } from './resour
194
194
  export { WalletResource } from './resources/wallet.js';
195
195
  export { ProtocolsResource } from './resources/protocols.js';
196
196
  export { PROTOCOL_ADAPTER_MATURITIES, PROTOCOL_CAPABILITY_OPERATIONS, PROTOCOL_CAPABILITY_STATUSES, } from './resources/protocols.js';
197
- export type { SocialProfile, SocialSubscription, SocialSubscriptionChange, SocialProfilePage, SocialNetwork, SocialPost, SocialConversation, SocialTrend, SocialTrendProvenance, SocialTrends, SocialTrendFeed, SocialPopularProfiles, SocialAuthorFeed, SocialFollowingFeed, SocialFollowingSource, SearchPublicProfilesParams, HostedProtocolConnections, HostedProtocol, HostedProtocolIdentity, HostedNostrChallenge, HostedNostrIdentityProof, NativeNostrPrepareInput, NativeNostrPrepared, NativeNostrAccount, NativeNostrPostState, NativeNostrReceipt, NativeSocialProtocol, FederationIdentity, FederationIdentityView, NativeSocialAccount, NativeSocialCallbackInput, NativeReplyPrepareInput, NativeFollowSourceInput, NativeFollowPrepareInput, NativeFollowTarget, NativeFollowReceipt, NativeFollowState, NativeFollowReview, NativeLikeSourceInput, NativeRepostSourceInput, NativeLikePrepareInput, NativeRepostPrepareInput, NativeLikeTarget, NativeRepostTarget, NativeLikeReceipt, NativeRepostReceipt, NativeLikeState, NativeRepostState, NativeLikeReview, NativeRepostReview, NativeReplyReceipt, NativeReplyBatch, NativeReplyHistory, NativeDelegatedReplyHistoryItem, NativeNostrReplyResult, NativeNostrReplyHistoryItem, NativeReplyRemovalReceipt, NativeReplyRemovalPreview, SocialSourceRef, SocialSourceControl, SocialSourceControlChange, HostedPostPreview, ConnectHostedIdentityInput, PreviewHostedPostInput, PublishHostedPostInput, ListProtocolCandidatesParams, ProtocolAdapterMaturity, ProtocolAdapterMetadata, ProtocolCandidateListResponse, ProtocolCandidatePageMeta, ProtocolCapabilityOperation, ProtocolCapabilityStatus, ProtocolCollectionStatus, ProtocolIngestionReplayResult, ProtocolIngestionStatus, ProtocolQuarantinedCandidate, ProtocolRefreshResult, ProtocolSettings, ProtocolSettingsUpdateResult, ReplayProtocolIngestionJobInput, UpdateSettingsInput as UpdateProtocolSettingsInput, } from './resources/protocols.js';
197
+ export type { SocialProfile, SocialSubscription, SocialSubscriptionChange, SocialProfilePage, SocialNetwork, SocialPost, SocialConversation, SocialTrend, SocialTrendProvenance, SocialTrends, SocialTrendFeed, SocialPopularProfiles, SocialAuthorFeed, SocialFollowingFeed, SocialFollowingSource, SearchPublicProfilesParams, HostedProtocolConnections, HostedProtocol, HostedProtocolIdentity, HostedNostrChallenge, HostedNostrIdentityProof, NativeNostrPrepareInput, NativeNostrPrepared, NativeNostrAccount, NativeNostrPostState, NativeNostrReceipt, NativeSocialProtocol, FederationIdentity, FederationIdentityView, NativeSocialAccount, NativeSocialCallbackInput, NativeReplyPrepareInput, NativePostPrepareInput, NativePostBatch, NativePostHistory, NativeFollowSourceInput, NativeFollowPrepareInput, NativeFollowTarget, NativeFollowReceipt, NativeFollowState, NativeFollowReview, NativeLikeSourceInput, NativeRepostSourceInput, NativeLikePrepareInput, NativeRepostPrepareInput, NativeLikeTarget, NativeRepostTarget, NativeLikeReceipt, NativeRepostReceipt, NativeLikeState, NativeRepostState, NativeLikeReview, NativeRepostReview, NativeReplyReceipt, NativeReplyBatch, NativeReplyHistory, NativeDelegatedReplyHistoryItem, NativeNostrReplyResult, NativeNostrReplyHistoryItem, NativeReplyRemovalReceipt, NativeReplyRemovalPreview, SocialSourceRef, SocialSourceControl, SocialSourceControlChange, HostedPostPreview, ConnectHostedIdentityInput, PreviewHostedPostInput, PublishHostedPostInput, ListProtocolCandidatesParams, ProtocolAdapterMaturity, ProtocolAdapterMetadata, ProtocolCandidateListResponse, ProtocolCandidatePageMeta, ProtocolCapabilityOperation, ProtocolCapabilityStatus, ProtocolCollectionStatus, ProtocolIngestionReplayResult, ProtocolIngestionStatus, ProtocolQuarantinedCandidate, ProtocolRefreshResult, ProtocolSettings, ProtocolSettingsUpdateResult, ReplayProtocolIngestionJobInput, UpdateSettingsInput as UpdateProtocolSettingsInput, } from './resources/protocols.js';
198
198
  export { InboxResource } from './resources/inbox.js';
199
199
  export { NetworkResource } from './resources/network.js';
200
200
  export { SimulatorResource } from './resources/simulator.js';
@@ -589,6 +589,31 @@ export interface NativeReplyBatch {
589
589
  } | null;
590
590
  }>;
591
591
  }
592
+ /** Public text only; accounts are selected explicitly in the shared editor. */
593
+ export interface NativePostPrepareInput {
594
+ clientMutationId: string;
595
+ text: string;
596
+ accountIds: string[];
597
+ }
598
+ export interface NativePostBatch {
599
+ id: string;
600
+ clientMutationId: string;
601
+ expiresAt: string;
602
+ deliveries: Array<Omit<NativeReplyBatch['deliveries'][number], 'kind' | 'parent' | 'recoverable' | 'replacedBy'> & {
603
+ audience: 'public';
604
+ maxCharacters: number;
605
+ }>;
606
+ }
607
+ export interface NativePostHistory {
608
+ items: Array<{
609
+ id: string;
610
+ createdAt: string;
611
+ text: string;
612
+ textTruncated: boolean;
613
+ deliveries: Array<Omit<NativePostBatch['deliveries'][number], 'text' | 'wireText' | 'maxCharacters'>>;
614
+ }>;
615
+ cursor: string | null;
616
+ }
592
617
  export interface NativeSocialCallbackInput {
593
618
  protocol: NativeSocialProtocol;
594
619
  state: string;
@@ -979,6 +1004,42 @@ export declare class ProtocolsResource {
979
1004
  }): Promise<SingleResponse<NativeRepostReview>>;
980
1005
  /** Reconcile the saved action without sending another native write. */
981
1006
  nativeRepostStatus(id: string): Promise<SingleResponse<NativeRepostReview>>;
1007
+ /** Prepare exact public text for selected connected Bluesky/ActivityPub accounts. */
1008
+ prepareNativePost(input: NativePostPrepareInput): Promise<SingleResponse<NativePostBatch>>;
1009
+ /** Explicitly approve selected deliveries; never auto-retry an uncertain write. */
1010
+ submitNativePost(id: string, input: {
1011
+ approve: true;
1012
+ deliveryIds: string[];
1013
+ }): Promise<SingleResponse<NativePostBatch & {
1014
+ errors: Record<string, {
1015
+ code: string;
1016
+ message: string;
1017
+ }>;
1018
+ }>>;
1019
+ /** Read the signed-in owner's saved publication review and durable receipts. */
1020
+ nativePostStatus(id: string): Promise<SingleResponse<NativePostBatch>>;
1021
+ /** Page the current app user's standalone publication history. This never sends. */
1022
+ nativePostHistory(params?: {
1023
+ limit?: number;
1024
+ cursor?: string;
1025
+ }): Promise<SingleResponse<NativePostHistory>>;
1026
+ /** Review the current own posts before approving removal. */
1027
+ prepareNativePostRemoval(id: string, input: {
1028
+ deliveryIds: string[];
1029
+ }): Promise<SingleResponse<NativeReplyRemovalPreview>>;
1030
+ /** Remove only the explicitly reviewed own publications. */
1031
+ removeNativePost(id: string, input: {
1032
+ approve: true;
1033
+ removals: Array<{
1034
+ deliveryId: string;
1035
+ removalId: string;
1036
+ }>;
1037
+ }): Promise<SingleResponse<NativePostBatch & {
1038
+ errors: Record<string, {
1039
+ code: string;
1040
+ message: string;
1041
+ }>;
1042
+ }>>;
982
1043
  /** Prepare one exact shared reply preview. Keep the mutation ID across uncertain responses. */
983
1044
  prepareNativeReply(input: NativeReplyPrepareInput): Promise<SingleResponse<NativeReplyBatch>>;
984
1045
  /** Send only explicitly approved delivery IDs from this preview. Repeated submissions reconcile; they do not replay a write. */
@@ -176,6 +176,35 @@ export class ProtocolsResource {
176
176
  hostedIdentityPath(id);
177
177
  return this.client.get(`/protocols/social/reposts/${encodeURIComponent(id)}`);
178
178
  }
179
+ /** Prepare exact public text for selected connected Bluesky/ActivityPub accounts. */
180
+ prepareNativePost(input) {
181
+ return this.client.post('/protocols/social/posts/prepare', { clientMutationId: input.clientMutationId,
182
+ text: input.text, accountIds: input.accountIds }, { retry: false });
183
+ }
184
+ /** Explicitly approve selected deliveries; never auto-retry an uncertain write. */
185
+ submitNativePost(id, input) {
186
+ hostedIdentityPath(id);
187
+ return this.client.post(`/protocols/social/posts/${encodeURIComponent(id)}/submit`, { approve: input.approve, deliveryIds: input.deliveryIds }, { retry: false });
188
+ }
189
+ /** Read the signed-in owner's saved publication review and durable receipts. */
190
+ nativePostStatus(id) {
191
+ hostedIdentityPath(id);
192
+ return this.client.get(`/protocols/social/posts/${encodeURIComponent(id)}`);
193
+ }
194
+ /** Page the current app user's standalone publication history. This never sends. */
195
+ nativePostHistory(params = {}) {
196
+ return this.client.get('/protocols/social/posts', { limit: params.limit, cursor: params.cursor });
197
+ }
198
+ /** Review the current own posts before approving removal. */
199
+ prepareNativePostRemoval(id, input) {
200
+ hostedIdentityPath(id);
201
+ return this.client.post(`/protocols/social/posts/${encodeURIComponent(id)}/removals/prepare`, { deliveryIds: input.deliveryIds }, { retry: false });
202
+ }
203
+ /** Remove only the explicitly reviewed own publications. */
204
+ removeNativePost(id, input) {
205
+ hostedIdentityPath(id);
206
+ return this.client.post(`/protocols/social/posts/${encodeURIComponent(id)}/removals/submit`, { approve: input.approve, removals: input.removals.map(item => ({ deliveryId: item.deliveryId, removalId: item.removalId })) }, { retry: false });
207
+ }
179
208
  /** Prepare one exact shared reply preview. Keep the mutation ID across uncertain responses. */
180
209
  prepareNativeReply(input) {
181
210
  return this.client.post('/protocols/social/replies/prepare', { clientMutationId: input.clientMutationId, text: input.text,
package/llm.md CHANGED
@@ -820,3 +820,5 @@ its author's deletion requests on the recorded relay. Other history items use
820
820
  publication; history stores no signature, signing key or intent. Keep the acting
821
821
  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
+
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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@recursiv/sdk",
3
- "version": "0.7.33",
3
+ "version": "0.7.34",
4
4
  "description": "TypeScript SDK for the Recursiv API",
5
5
  "license": "FSL-1.1-ALv2",
6
6
  "type": "module",