@recursiv/sdk 0.7.30 → 0.7.32
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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/resources/protocols.d.ts +150 -1
- package/dist/resources/protocols.js +44 -0
- package/llm.md +2 -0
- package/package.json +1 -1
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`. 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 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` |
|
|
115
115
|
|
|
116
116
|
Full reference: see [llm.md](./llm.md) (ships with this package) or the type definitions in `dist/`.
|
|
117
117
|
|
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, 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, NativeFollowSourceInput, NativeFollowPrepareInput, NativeFollowTarget, NativeFollowReceipt, NativeFollowState, NativeFollowReview, NativeLikeSourceInput, NativeLikePrepareInput, NativeLikeTarget, NativeLikeReceipt, NativeLikeState, NativeLikeReview, 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';
|
|
@@ -317,6 +317,133 @@ export interface NativeReplyPrepareInput {
|
|
|
317
317
|
deliveryIds: string[];
|
|
318
318
|
};
|
|
319
319
|
}
|
|
320
|
+
export interface NativeFollowSourceInput {
|
|
321
|
+
accountId: string;
|
|
322
|
+
protocol: SocialSourceRef['protocol'];
|
|
323
|
+
nativeId: string;
|
|
324
|
+
}
|
|
325
|
+
export interface NativeFollowPrepareInput extends NativeFollowSourceInput {
|
|
326
|
+
clientMutationId: string;
|
|
327
|
+
action: 'follow' | 'unfollow';
|
|
328
|
+
}
|
|
329
|
+
export type NativeFollowTarget = {
|
|
330
|
+
nativeId: string;
|
|
331
|
+
sourceUrl: string;
|
|
332
|
+
handle: string;
|
|
333
|
+
revision: string;
|
|
334
|
+
followAllowed: boolean;
|
|
335
|
+
} & ({
|
|
336
|
+
protocol: 'bluesky';
|
|
337
|
+
} | {
|
|
338
|
+
protocol: 'activitypub';
|
|
339
|
+
localId: string;
|
|
340
|
+
} | {
|
|
341
|
+
protocol: 'nostr';
|
|
342
|
+
});
|
|
343
|
+
export interface NativeFollowReceipt {
|
|
344
|
+
state: 'following' | 'requested' | 'unfollowed' | 'unknown' | 'rejected';
|
|
345
|
+
acknowledged: boolean;
|
|
346
|
+
reference: {
|
|
347
|
+
nativeId: string;
|
|
348
|
+
revision: string;
|
|
349
|
+
} | null;
|
|
350
|
+
}
|
|
351
|
+
export interface NativeFollowState extends NativeFollowReceipt {
|
|
352
|
+
accountId: string;
|
|
353
|
+
account: {
|
|
354
|
+
nativeId: string;
|
|
355
|
+
handle: string;
|
|
356
|
+
serverUrl: string;
|
|
357
|
+
};
|
|
358
|
+
target: NativeFollowTarget;
|
|
359
|
+
/** Resume this account's unresolved review after a browser refresh. Never start a duplicate action. */
|
|
360
|
+
pendingActionId: string | null;
|
|
361
|
+
/** An earlier connection or another target profile has an unresolved attempt. Read again to reconcile; do not prepare a new write. */
|
|
362
|
+
pendingActionBlocked: boolean;
|
|
363
|
+
}
|
|
364
|
+
export interface NativeFollowReview {
|
|
365
|
+
id: string;
|
|
366
|
+
clientMutationId: string;
|
|
367
|
+
expiresAt: string;
|
|
368
|
+
accountId: string;
|
|
369
|
+
account: NativeFollowState['account'];
|
|
370
|
+
target: NativeFollowTarget;
|
|
371
|
+
action: 'follow' | 'unfollow';
|
|
372
|
+
attemptedAt: string | null;
|
|
373
|
+
receipt: NativeFollowReceipt | null;
|
|
374
|
+
checkedAt: string | null;
|
|
375
|
+
/** Sign this exact event with the displayed account. Never send a private key. */
|
|
376
|
+
signing?: {
|
|
377
|
+
event: Omit<HostedNostrIdentityProof, 'sig'>;
|
|
378
|
+
relay: string;
|
|
379
|
+
};
|
|
380
|
+
}
|
|
381
|
+
export interface NativeLikeSourceInput {
|
|
382
|
+
accountId: string;
|
|
383
|
+
protocol: SocialSourceRef['protocol'];
|
|
384
|
+
nativeId: string;
|
|
385
|
+
}
|
|
386
|
+
export interface NativeLikePrepareInput extends NativeLikeSourceInput {
|
|
387
|
+
clientMutationId: string;
|
|
388
|
+
action: 'like' | 'unlike';
|
|
389
|
+
}
|
|
390
|
+
export type NativeLikeTarget = {
|
|
391
|
+
nativeId: string;
|
|
392
|
+
sourceUrl: string;
|
|
393
|
+
authorId: string;
|
|
394
|
+
authorHandle: string;
|
|
395
|
+
text: string;
|
|
396
|
+
revision: string;
|
|
397
|
+
} & ({
|
|
398
|
+
protocol: 'bluesky';
|
|
399
|
+
cid: string;
|
|
400
|
+
} | {
|
|
401
|
+
protocol: 'activitypub';
|
|
402
|
+
localId: string;
|
|
403
|
+
} | {
|
|
404
|
+
protocol: 'nostr';
|
|
405
|
+
relay: string;
|
|
406
|
+
});
|
|
407
|
+
export interface NativeLikeReceipt {
|
|
408
|
+
state: 'liked' | 'unliked' | 'unknown' | 'rejected';
|
|
409
|
+
acknowledged: boolean;
|
|
410
|
+
reference: {
|
|
411
|
+
nativeId: string;
|
|
412
|
+
revision: string;
|
|
413
|
+
eventIds?: string[];
|
|
414
|
+
} | null;
|
|
415
|
+
readBack: 'liked' | 'unliked' | 'unavailable';
|
|
416
|
+
}
|
|
417
|
+
export interface NativeLikeState extends NativeLikeReceipt {
|
|
418
|
+
accountId: string;
|
|
419
|
+
account: {
|
|
420
|
+
nativeId: string;
|
|
421
|
+
handle: string;
|
|
422
|
+
serverUrl: string;
|
|
423
|
+
};
|
|
424
|
+
target: NativeLikeTarget;
|
|
425
|
+
/** Resume this account's unresolved review after a browser refresh. Never start a duplicate action. */
|
|
426
|
+
pendingActionId: string | null;
|
|
427
|
+
/** An earlier connection has an unresolved attempt. Read again to reconcile; do not prepare a new write. */
|
|
428
|
+
pendingActionBlocked: boolean;
|
|
429
|
+
}
|
|
430
|
+
export interface NativeLikeReview {
|
|
431
|
+
id: string;
|
|
432
|
+
clientMutationId: string;
|
|
433
|
+
expiresAt: string;
|
|
434
|
+
accountId: string;
|
|
435
|
+
account: NativeLikeState['account'];
|
|
436
|
+
target: NativeLikeTarget;
|
|
437
|
+
action: 'like' | 'unlike';
|
|
438
|
+
attemptedAt: string | null;
|
|
439
|
+
receipt: NativeLikeReceipt | null;
|
|
440
|
+
checkedAt: string | null;
|
|
441
|
+
/** Sign this exact event with the displayed account. Never send a private key. */
|
|
442
|
+
signing?: {
|
|
443
|
+
event: Omit<HostedNostrIdentityProof, 'sig'>;
|
|
444
|
+
relay: string;
|
|
445
|
+
};
|
|
446
|
+
}
|
|
320
447
|
export interface NativeReplyReceipt {
|
|
321
448
|
state: 'published' | 'accepted' | 'unknown' | 'rejected';
|
|
322
449
|
nativeId: string | null;
|
|
@@ -483,7 +610,7 @@ export interface NativeNostrPrepared {
|
|
|
483
610
|
export interface NativeNostrAccount {
|
|
484
611
|
enabled: boolean;
|
|
485
612
|
identity: HostedProtocolIdentity | null;
|
|
486
|
-
capabilities: Array<'publish_original_text' | 'request_own_post_deletion' | 'reply_text_note' | 'publish_linked_text'>;
|
|
613
|
+
capabilities: Array<'publish_original_text' | 'request_own_post_deletion' | 'reply_text_note' | 'publish_linked_text' | 'like' | 'unlike' | 'follow' | 'unfollow'>;
|
|
487
614
|
signing?: 'client';
|
|
488
615
|
}
|
|
489
616
|
export interface NativeNostrPostState {
|
|
@@ -752,6 +879,28 @@ export declare class ProtocolsResource {
|
|
|
752
879
|
limit?: number;
|
|
753
880
|
cursor?: string;
|
|
754
881
|
}): Promise<SingleResponse<SocialPopularProfiles>>;
|
|
882
|
+
/** Read this connected account's current native following; never infer it from a public count. */
|
|
883
|
+
nativeFollowState(input: NativeFollowSourceInput): Promise<SingleResponse<NativeFollowState>>;
|
|
884
|
+
/** Prepare a follow/unfollow for explicit approval. Preserve the mutation ID after a lost response. */
|
|
885
|
+
prepareNativeFollow(input: NativeFollowPrepareInput): Promise<SingleResponse<NativeFollowReview>>;
|
|
886
|
+
/** Submit one approved action. Only Nostr supplies a public signed event. Automatic retries are disabled. */
|
|
887
|
+
submitNativeFollow(id: string, input: {
|
|
888
|
+
approve: true;
|
|
889
|
+
event?: HostedNostrIdentityProof;
|
|
890
|
+
}): Promise<SingleResponse<NativeFollowReview>>;
|
|
891
|
+
/** Reconcile the saved action without sending another native write. */
|
|
892
|
+
nativeFollowStatus(id: string): Promise<SingleResponse<NativeFollowReview>>;
|
|
893
|
+
/** Read this connected account's current native like; never infer it from a public count. */
|
|
894
|
+
nativeLikeState(input: NativeLikeSourceInput): Promise<SingleResponse<NativeLikeState>>;
|
|
895
|
+
/** Prepare a like/unlike for explicit approval. Preserve the mutation ID after a lost response. */
|
|
896
|
+
prepareNativeLike(input: NativeLikePrepareInput): Promise<SingleResponse<NativeLikeReview>>;
|
|
897
|
+
/** Submit one approved action. Only Nostr supplies a public signed event. Automatic retries are disabled. */
|
|
898
|
+
submitNativeLike(id: string, input: {
|
|
899
|
+
approve: true;
|
|
900
|
+
event?: HostedNostrIdentityProof;
|
|
901
|
+
}): Promise<SingleResponse<NativeLikeReview>>;
|
|
902
|
+
/** Reconcile the saved action without sending another native write. */
|
|
903
|
+
nativeLikeStatus(id: string): Promise<SingleResponse<NativeLikeReview>>;
|
|
755
904
|
/** Prepare one exact shared reply preview. Keep the mutation ID across uncertain responses. */
|
|
756
905
|
prepareNativeReply(input: NativeReplyPrepareInput): Promise<SingleResponse<NativeReplyBatch>>;
|
|
757
906
|
/** Send only explicitly approved delivery IDs from this preview. Repeated submissions reconcile; they do not replay a write. */
|
|
@@ -110,6 +110,50 @@ export class ProtocolsResource {
|
|
|
110
110
|
getPublicPopularProfiles(params) {
|
|
111
111
|
return this.client.get('/protocols/social/popular-profiles', { protocol: params.protocol, limit: params.limit, cursor: params.cursor });
|
|
112
112
|
}
|
|
113
|
+
/** Read this connected account's current native following; never infer it from a public count. */
|
|
114
|
+
nativeFollowState(input) {
|
|
115
|
+
return this.client.get('/protocols/social/follows/state', { accountId: input.accountId, protocol: input.protocol, nativeId: input.nativeId });
|
|
116
|
+
}
|
|
117
|
+
/** Prepare a follow/unfollow for explicit approval. Preserve the mutation ID after a lost response. */
|
|
118
|
+
prepareNativeFollow(input) {
|
|
119
|
+
return this.client.post('/protocols/social/follows/prepare', { clientMutationId: input.clientMutationId, accountId: input.accountId,
|
|
120
|
+
protocol: input.protocol, nativeId: input.nativeId, action: input.action }, { retry: false });
|
|
121
|
+
}
|
|
122
|
+
/** Submit one approved action. Only Nostr supplies a public signed event. Automatic retries are disabled. */
|
|
123
|
+
submitNativeFollow(id, input) {
|
|
124
|
+
hostedIdentityPath(id);
|
|
125
|
+
const event = input.event;
|
|
126
|
+
return this.client.post(`/protocols/social/follows/${encodeURIComponent(id)}/submit`, { approve: input.approve,
|
|
127
|
+
...(event ? { event: { id: event.id, pubkey: event.pubkey, sig: event.sig, kind: event.kind,
|
|
128
|
+
created_at: event.created_at, content: event.content, tags: event.tags } } : {}) }, { retry: false });
|
|
129
|
+
}
|
|
130
|
+
/** Reconcile the saved action without sending another native write. */
|
|
131
|
+
nativeFollowStatus(id) {
|
|
132
|
+
hostedIdentityPath(id);
|
|
133
|
+
return this.client.get(`/protocols/social/follows/${encodeURIComponent(id)}`);
|
|
134
|
+
}
|
|
135
|
+
/** Read this connected account's current native like; never infer it from a public count. */
|
|
136
|
+
nativeLikeState(input) {
|
|
137
|
+
return this.client.get('/protocols/social/likes/state', { accountId: input.accountId, protocol: input.protocol, nativeId: input.nativeId });
|
|
138
|
+
}
|
|
139
|
+
/** Prepare a like/unlike for explicit approval. Preserve the mutation ID after a lost response. */
|
|
140
|
+
prepareNativeLike(input) {
|
|
141
|
+
return this.client.post('/protocols/social/likes/prepare', { clientMutationId: input.clientMutationId, accountId: input.accountId,
|
|
142
|
+
protocol: input.protocol, nativeId: input.nativeId, action: input.action }, { retry: false });
|
|
143
|
+
}
|
|
144
|
+
/** Submit one approved action. Only Nostr supplies a public signed event. Automatic retries are disabled. */
|
|
145
|
+
submitNativeLike(id, input) {
|
|
146
|
+
hostedIdentityPath(id);
|
|
147
|
+
const event = input.event;
|
|
148
|
+
return this.client.post(`/protocols/social/likes/${encodeURIComponent(id)}/submit`, { approve: input.approve,
|
|
149
|
+
...(event ? { event: { id: event.id, pubkey: event.pubkey, sig: event.sig, kind: event.kind,
|
|
150
|
+
created_at: event.created_at, content: event.content, tags: event.tags } } : {}) }, { retry: false });
|
|
151
|
+
}
|
|
152
|
+
/** Reconcile the saved action without sending another native write. */
|
|
153
|
+
nativeLikeStatus(id) {
|
|
154
|
+
hostedIdentityPath(id);
|
|
155
|
+
return this.client.get(`/protocols/social/likes/${encodeURIComponent(id)}`);
|
|
156
|
+
}
|
|
113
157
|
/** Prepare one exact shared reply preview. Keep the mutation ID across uncertain responses. */
|
|
114
158
|
prepareNativeReply(input) {
|
|
115
159
|
return this.client.post('/protocols/social/replies/prepare', { clientMutationId: input.clientMutationId, text: input.text,
|
package/llm.md
CHANGED
|
@@ -632,6 +632,8 @@ if (subscription.active) {
|
|
|
632
632
|
- `r.admin` — Admin operations (user management, stats, network settings); content reports: `listReports({ status? })`, `resolveReport(id)`, `dismissReport(id)` (project-bound keys see only their app's reports)
|
|
633
633
|
- `r.inviteCodes` / `r.inviteCodesAdmin` — Invite code management
|
|
634
634
|
- `r.organizationSettings` / `r.organizationSecurity` — Org configuration
|
|
635
|
+
- Native follows: `nativeFollowState({ accountId, protocol, nativeId })`, `prepareNativeFollow({ clientMutationId, accountId, protocol, nativeId, action: "follow" | "unfollow" })`, `submitNativeFollow(id, { approve: true, event? })`, `nativeFollowStatus(id)`. Show the acting identity and native following/requested/unfollowed state separately from the Minds feed subscription. Nostr must sign the complete review event without dropping other contacts; stale lists require a fresh review. Keep mutation IDs and reconcile ambiguous outcomes without replay. Requires current follow scopes and API `NATIVE_SOCIAL_FOLLOW_PROJECTS` plus source controls.
|
|
636
|
+
- Native likes: `nativeLikeState({ accountId, protocol, nativeId })`, `prepareNativeLike({ clientMutationId, accountId, protocol, nativeId, action: "like" | "unlike" })`, `submitNativeLike(id, { approve: true, event? })`, and `nativeLikeStatus(id)`. Display the selected account, source and action before approval. Only Nostr supplies `event`: sign the exact public `signing.event` in the review; never transmit a private key. Preserve mutation IDs on ambiguous responses and refresh unknown results instead of resending. Read capabilities before offering actions; old reply-only connections need reconnecting for likes. Nostr results describe the connected relay, not every public relay. The app-specific `NATIVE_SOCIAL_LIKE_PROJECTS` switch and source controls must be enabled on the API.
|
|
635
637
|
- Delegated social accounts: `r.protocols.nativeSocialAccounts()`, `startNativeSocialConnection({ protocol, identifier })`, `finishNativeSocialConnection({ protocol, state, code?, iss?, error? })`, `disconnectNativeSocialAccount(id)`. Example: `const { data } = await r.protocols.startNativeSocialConnection({ protocol: "bluesky", identifier: "alice.bsky.social" })`; open `data.authorizationUrl`, then complete with the same signed-in app user. Never log callback codes, send passwords, or auto-retry OAuth callbacks. Shared replies (off until schema/API deployment and live verification): `prepareNativeReply({ clientMutationId, text, parent: { protocol, nativeId, readRef? }, accountIds, linkedPostAccountIds?, recoverFrom?: { batchId, deliveryIds } })`, `submitNativeReply(id, { approve: true, deliveryIds })`, `nativeReplyStatus(id)`, `nativeReplyHistory({ limit?, cursor? })`, `prepareNativeReplyRemoval(id, { deliveryIds })`, `removeNativeReply(id, { approve: true, removals })`. Review account, destination, `kind`, source and exact `wireText`; connection is not publication approval. `linkedPostAccountIds` explicitly selects different-network standalone posts with a source link, never matching threaded replies or a same-network denial fallback. Preserve mutation IDs, show per-destination results and reconcile uncertain attempts without reposting. To review selected unsent or definitively rejected deliveries again, use recoverFrom with a new mutation ID, the same source/accounts and freshly reviewed text; preserve that ID on uncertain preparation. Only saved recoverable destinations qualify, current gates still apply, and replacedBy disables old sends atomically. Never restart unknown, accepted or published deliveries. The new preview still needs explicit approval. Saved delegated drafts/results: `const { data: history } = await r.protocols.nativeReplyHistory({ limit: 20 })`; use its opaque cursor for the next page and `nativeReplyStatus(item.id)` for details. This is a private read, not a write or provider refresh, and includes Nostr results marked type=nostr. Use nativeNostrReplyResult(item.id) to check that recorded event on its relay without signing or resending. Discard page state on owner/app changes. See README for examples and the callback, revocation and removal contracts.
|
|
636
638
|
- `r.protocols` — Private app safety: `sourceControls` returns current `enabled` plus paged saved choices; `setSourceControl`, `onSourceControlChange` and `reportSource` share app scope. Example: `const choices = new Map(); const stop = r.protocols.onSourceControlChange(change => choices.set(JSON.stringify([change.source, change.control]), change.enabled));` then `await r.protocols.setSourceControl({ source: { protocol: "bluesky", kind: "actor", nativeId: "did:plc:aaaaaaaaaaaaaaaaaaaaaaaa" }, control: "mute", enabled: true, scope: "minds" });` and call `stop(); choices.clear()` on account change/unmount. Notifications follow an exact server confirmation, never an uncertain response. These preferences and reports apply in Minds, not on the remote network. Keyless post links: `const visitor = new Recursiv({ anonymous: true }); const { data: thread } = await visitor.protocols.getSharedConversation(projectId, { protocol: 'nostr', post: publicEventId })`; `sharedNetworks(projectId)` lists public conversation capabilities. Only configured apps; app moderation and rate limits apply, no member state or write authority. Member public reading: `publicNetworks`, `searchPublicProfiles`, `getPublicProfile`, `getPublicAuthorFeed`, `getFollowingFeed`, `getPublicConversation`, `getPublicTrends`, `getPublicTrendFeed`; private app subscriptions: `listSubscriptions`, `subscribeToProfile`, `unsubscribeFromProfile`, `onSubscriptionChange`. Example after selecting a returned source post: `const { data: thread } = await r.protocols.getPublicConversation({ protocol: post.protocol, post: post.nativeId, readRef: post.readRef })`. Render `focus`, oldest-first `ancestors` and direct `replies`; `public_provider_window` never promises every reply, and `limited` marks known omissions. Requires both `users:read` and `posts:read` on the current human app key. Protocol discovery/settings: `const { data: adapters } = await r.protocols.list()` returns bounded `{ id, name, icon, color, maturity, capabilities, limitations }` metadata; `supported` means implemented, not configured, healthy, authorized, or enabled. Methods: `list`, `status`, `listCandidates`, `getCandidate`, `search`, `getSettings`, `refresh`, `updateSettings`.
|
|
637
639
|
- Native Nostr: `const { data: preview } = await r.protocols.prepareNativeNostr(identityId, { action: "publish", content: draft })`; review and sign the exact public event, then `submitNativeNostr(identityId, { intent: preview.intent, event, approve: true })`. Preparation/submission never auto-retry. After uncertainty, use `getNativeNostrPost(identityId, preview.postId ?? preview.eventId)` before a user-selected retry of the identical intent/event: deletion checks the original note's `postId`, publication checks `eventId`. Check `nativeNostrAccount()` enablement first; keys stay with the signer. For replies, after `nativeNostrAccount()` advertises `reply_text_note`, use `prepareNativeNostr(identityId, { action: "reply", content: draft, parentId: post.nativeId })`. Review returned parent/root/participants/relay and exact event, sign with the connected client signer, then `submitNativeNostr(identityId, { intent, event, approve: true })`. Requires users:read, posts:read and posts:write. Kind1 public notes only; reply enablement and shared UI/live proof remain pending. Do not inherit arbitrary notification tags or relay hints. Signing mutations never auto-retry; check `getNativeNostrPost(identityId, eventId)` after uncertainty before a user-selected identical-event retry.
|