@recursiv/sdk 0.7.34 → 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 CHANGED
@@ -111,7 +111,7 @@ for await (const chunk of r.agents.chatStream(agent.id, { message: 'Hello!' }))
111
111
  | `r.admin` | User management, stats, content reports (`listReports`, `resolveReport`, `dismissReport`) |
112
112
  | `r.dispatcher` | Task queue, claims, signals, outcomes, webhooks |
113
113
  | `r.goals` | Org goals with task rollups (group dispatcher tasks) |
114
- | `r.protocols` | Private Minds safety: `sourceControls` (current enablement and saved choices), `setSourceControl`, `onSourceControlChange`, `reportSource`. Delegated accounts: `nativeSocialAccounts`, `startNativeSocialConnection`, `finishNativeSocialConnection`, `disconnectNativeSocialAccount`. Native follows: `nativeFollowState`, `prepareNativeFollow`, `submitNativeFollow`, `nativeFollowStatus` (native following or pending approval, distinct from a Minds feed subscription; preserve the complete signed Nostr list). Native reposts and undo: `nativeRepostState`, `prepareNativeRepost`, `submitNativeRepost`, `nativeRepostStatus` (public posts, explicit approval, connected account, no uncertain retries). Native likes and unlikes: `nativeLikeState`, `prepareNativeLike`, `submitNativeLike`, `nativeLikeStatus` (connected authority, app enablement and explicit approval; resume pending actions instead of duplicating them). Reviewed replies and optional linked posts: `prepareNativeReply`, `submitNativeReply`, `nativeReplyStatus`, `nativeReplyHistory`, `prepareNativeReplyRemoval`, `removeNativeReply` (require deployed API support and app enablement). Keyless shared post links: `sharedNetworks(projectId)`, `getSharedConversation(projectId, { protocol, post, readRef? })`. Member public reading: `publicNetworks`, `searchPublicProfiles`, `getPublicProfile`, `getPublicAuthorFeed`, `getFollowingFeed`, `getPublicConversation`, `getPublicTrends`, `getPublicTrendFeed`; private app subscriptions: `listSubscriptions`, `subscribeToProfile`, `unsubscribeFromProfile`, `onSubscriptionChange`. `list` returns bounded adapter `maturity`, `limitations`, and exhaustive `supported`/`planned`/`unsupported` implementation capabilities (not provider health or enablement); settings, candidate refresh/status, search, and read-only quarantined candidate review via `listCandidates` / `getCandidate` |
114
+ | `r.protocols` | Private Minds safety: `sourceControls` (current enablement and saved choices), `setSourceControl`, `onSourceControlChange`, `reportSource`. Delegated accounts: `nativeSocialAccounts`, `startNativeSocialConnection`, `finishNativeSocialConnection`, `disconnectNativeSocialAccount`. Native follows: `nativeFollowState`, `prepareNativeFollow`, `submitNativeFollow`, `nativeFollowStatus` (native following or pending approval, distinct from a Minds feed subscription; preserve the complete signed Nostr list). Native reposts and undo: `nativeRepostState`, `prepareNativeRepost`, `submitNativeRepost`, `nativeRepostStatus` (public posts, explicit approval, connected account, no uncertain retries). Native likes and unlikes: `nativeLikeState`, `prepareNativeLike`, `submitNativeLike`, `nativeLikeStatus` (connected authority, app enablement and explicit approval; resume pending actions instead of duplicating them). Reviewed replies and optional linked posts: `prepareNativeReply`, `submitNativeReply`, `nativeReplyStatus`, `nativeReplyHistory`, `prepareNativeReplyRemoval`, `removeNativeReply` (require deployed API support and app enablement). Keyless shared post links: `sharedNetworks(projectId)`, `getSharedConversation(projectId, { protocol, post, readRef? })`. Member public reading: `searchPublicPosts` (selected account required for Bluesky/ActivityPub; public Nostr search), `getConnectedSocialConversation` (preserve result readerAccountId/readRef), `publicNetworks`, `searchPublicProfiles`, `getPublicProfile`, `getPublicAuthorFeed`, `getFollowingFeed`, `getPublicConversation`, `getPublicTrends`, `getPublicTrendFeed`; private app subscriptions: `listSubscriptions`, `subscribeToProfile`, `unsubscribeFromProfile`, `onSubscriptionChange`. `list` returns bounded adapter `maturity`, `limitations`, and exhaustive `supported`/`planned`/`unsupported` implementation capabilities (not provider health or enablement); settings, candidate refresh/status, search, and read-only quarantined candidate review via `listCandidates` / `getCandidate` |
115
115
 
116
116
  Full reference: see [llm.md](./llm.md) (ships with this package) or the type definitions in `dist/`.
117
117
 
@@ -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.
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, 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';
197
+ export type { SocialProfile, SocialSubscription, SocialSubscriptionChange, SocialProfilePage, SocialNetwork, SocialPost, SocialConversation, SocialTrend, SocialTrendProvenance, SocialTrends, SocialTrendFeed, SocialPopularProfiles, SocialAuthorFeed, SocialFollowingFeed, SocialFollowingSource, SearchPublicProfilesParams, SearchPublicPostsParams, SocialPostSearch, 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';
@@ -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 {
@@ -767,8 +781,9 @@ export interface SocialNetwork {
767
781
  url: string;
768
782
  };
769
783
  coverage: string;
770
- capabilities: Array<'profile_search' | 'profile_read' | 'original_author_posts' | 'minds_subscription' | 'following_feed' | 'conversation_read' | 'public_trends' | 'trend_feed' | 'popular_accounts'>;
784
+ capabilities: Array<'profile_search' | 'profile_read' | 'original_author_posts' | 'minds_subscription' | 'following_feed' | 'conversation_read' | 'public_trends' | 'trend_feed' | 'popular_accounts' | 'post_search'>;
771
785
  profileSearchPagination: boolean;
786
+ postSearchAccountRequired?: boolean;
772
787
  conversationCoverage?: string;
773
788
  }
774
789
  /** Public source identity, independent of any local Minds user or handle. */
@@ -829,6 +844,32 @@ export interface SocialPost {
829
844
  alt: string;
830
845
  }>;
831
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
+ };
854
+ }
855
+ export interface SocialPostSearch {
856
+ items: SocialPost[];
857
+ cursor: string | null;
858
+ query: string;
859
+ provider: {
860
+ name: string;
861
+ url: string;
862
+ };
863
+ observedAt: string;
864
+ coverage: 'provider_search_window';
865
+ readerAccountId: string | null;
866
+ }
867
+ export interface SearchPublicPostsParams {
868
+ protocol: 'bluesky' | 'activitypub' | 'nostr';
869
+ query: string;
870
+ accountId?: string;
871
+ limit?: number;
872
+ cursor?: string;
832
873
  }
833
874
  export interface SocialAuthorFeed {
834
875
  items: SocialPost[];
@@ -932,6 +973,15 @@ export declare class ProtocolsResource {
932
973
  }): Promise<SingleResponse<SocialConversation>>;
933
974
  publicNetworks(): Promise<SingleResponse<SocialNetwork[]>>;
934
975
  /** Query the live public network. It does not import users or posts. */
976
+ searchPublicPosts(params: SearchPublicPostsParams): Promise<SingleResponse<SocialPostSearch>>;
977
+ /** Read public-only conversation content through the current owner's selected account. */
978
+ getConnectedSocialConversation(params: {
979
+ protocol: 'bluesky' | 'activitypub';
980
+ accountId: string;
981
+ post: string;
982
+ readRef?: string;
983
+ }): Promise<SingleResponse<SocialConversation>>;
984
+ /** Search public profiles from a network's configured provider. */
935
985
  searchPublicProfiles(params: SearchPublicProfilesParams): Promise<SingleResponse<SocialProfilePage>>;
936
986
  getPublicProfile(protocol: string, actor: string): Promise<SingleResponse<SocialProfile>>;
937
987
  getPublicAuthorFeed(params: {
@@ -1101,6 +1151,7 @@ export declare class ProtocolsResource {
1101
1151
  reportSource(input: {
1102
1152
  source: SocialSourceRef;
1103
1153
  readRef?: string;
1154
+ accountId?: string;
1104
1155
  reason: string;
1105
1156
  details?: string;
1106
1157
  scope: 'minds';
@@ -74,6 +74,15 @@ export class ProtocolsResource {
74
74
  return this.client.get('/protocols/social/networks');
75
75
  }
76
76
  /** Query the live public network. It does not import users or posts. */
77
+ searchPublicPosts(params) {
78
+ return this.client.get('/protocols/social/post-search', { protocol: params.protocol, query: params.query,
79
+ accountId: params.accountId, limit: params.limit, cursor: params.cursor });
80
+ }
81
+ /** Read public-only conversation content through the current owner's selected account. */
82
+ getConnectedSocialConversation(params) {
83
+ return this.client.get('/protocols/social/connected-conversation', { protocol: params.protocol, accountId: params.accountId, post: params.post, readRef: params.readRef });
84
+ }
85
+ /** Search public profiles from a network's configured provider. */
77
86
  searchPublicProfiles(params) {
78
87
  return this.client.get('/protocols/social/profiles', {
79
88
  protocol: params.protocol, query: params.query, limit: params.limit, cursor: params.cursor,
@@ -179,7 +188,8 @@ export class ProtocolsResource {
179
188
  /** Prepare exact public text for selected connected Bluesky/ActivityPub accounts. */
180
189
  prepareNativePost(input) {
181
190
  return this.client.post('/protocols/social/posts/prepare', { clientMutationId: input.clientMutationId,
182
- text: input.text, accountIds: input.accountIds }, { retry: false });
191
+ text: input.text, accountIds: input.accountIds,
192
+ ...(input.quote ? { quote: { protocol: input.quote.protocol, nativeId: input.quote.nativeId } } : {}) }, { retry: false });
183
193
  }
184
194
  /** Explicitly approve selected deliveries; never auto-retry an uncertain write. */
185
195
  submitNativePost(id, input) {
@@ -268,7 +278,7 @@ export class ProtocolsResource {
268
278
  /** File a report in the app's existing moderation queue, using server-read public source evidence. */
269
279
  reportSource(input) {
270
280
  return this.client.post('/protocols/social/reports', { source: { protocol: input.source.protocol, kind: input.source.kind, nativeId: input.source.nativeId },
271
- readRef: input.readRef, reason: input.reason, details: input.details, scope: input.scope }, { retry: false });
281
+ readRef: input.readRef, ...(input.accountId ? { accountId: input.accountId } : {}), reason: input.reason, details: input.details, scope: input.scope }, { retry: false });
272
282
  }
273
283
  /** Open the returned authorization URL in the user's browser; never submit passwords or tokens. */
274
284
  startNativeSocialConnection(input) {
package/llm.md CHANGED
@@ -822,3 +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).
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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@recursiv/sdk",
3
- "version": "0.7.34",
3
+ "version": "0.7.36",
4
4
  "description": "TypeScript SDK for the Recursiv API",
5
5
  "license": "FSL-1.1-ALv2",
6
6
  "type": "module",