@recursiv/sdk 0.7.32 → 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 +3 -1
- package/dist/index.d.ts +1 -1
- package/dist/resources/protocols.d.ts +140 -1
- package/dist/resources/protocols.js +51 -0
- package/llm.md +3 -1
- 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`. 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` |
|
|
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` |
|
|
115
115
|
|
|
116
116
|
Full reference: see [llm.md](./llm.md) (ships with this package) or the type definitions in `dist/`.
|
|
117
117
|
|
|
@@ -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, 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';
|
|
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';
|
|
@@ -444,6 +444,73 @@ export interface NativeLikeReview {
|
|
|
444
444
|
relay: string;
|
|
445
445
|
};
|
|
446
446
|
}
|
|
447
|
+
export interface NativeRepostSourceInput {
|
|
448
|
+
accountId: string;
|
|
449
|
+
protocol: SocialSourceRef['protocol'];
|
|
450
|
+
nativeId: string;
|
|
451
|
+
}
|
|
452
|
+
export interface NativeRepostPrepareInput extends NativeRepostSourceInput {
|
|
453
|
+
clientMutationId: string;
|
|
454
|
+
action: 'repost' | 'unrepost';
|
|
455
|
+
}
|
|
456
|
+
export type NativeRepostTarget = {
|
|
457
|
+
nativeId: string;
|
|
458
|
+
sourceUrl: string;
|
|
459
|
+
authorId: string;
|
|
460
|
+
authorHandle: string;
|
|
461
|
+
text: string;
|
|
462
|
+
revision: string;
|
|
463
|
+
} & ({
|
|
464
|
+
protocol: 'bluesky';
|
|
465
|
+
cid: string;
|
|
466
|
+
} | {
|
|
467
|
+
protocol: 'activitypub';
|
|
468
|
+
localId: string;
|
|
469
|
+
} | {
|
|
470
|
+
protocol: 'nostr';
|
|
471
|
+
relay: string;
|
|
472
|
+
sourceEvent: HostedNostrIdentityProof;
|
|
473
|
+
});
|
|
474
|
+
export interface NativeRepostReceipt {
|
|
475
|
+
state: 'reposted' | 'unreposted' | 'unknown' | 'rejected';
|
|
476
|
+
acknowledged: boolean;
|
|
477
|
+
reference: {
|
|
478
|
+
nativeId: string;
|
|
479
|
+
revision: string;
|
|
480
|
+
eventIds?: string[];
|
|
481
|
+
} | null;
|
|
482
|
+
readBack: 'reposted' | 'unreposted' | 'unavailable';
|
|
483
|
+
}
|
|
484
|
+
export interface NativeRepostState extends NativeRepostReceipt {
|
|
485
|
+
accountId: string;
|
|
486
|
+
account: {
|
|
487
|
+
nativeId: string;
|
|
488
|
+
handle: string;
|
|
489
|
+
serverUrl: string;
|
|
490
|
+
};
|
|
491
|
+
target: NativeRepostTarget;
|
|
492
|
+
/** Resume this account's unresolved review after a browser refresh. Never start a duplicate action. */
|
|
493
|
+
pendingActionId: string | null;
|
|
494
|
+
/** An earlier connection has an unresolved attempt. Read again to reconcile; do not prepare a new write. */
|
|
495
|
+
pendingActionBlocked: boolean;
|
|
496
|
+
}
|
|
497
|
+
export interface NativeRepostReview {
|
|
498
|
+
id: string;
|
|
499
|
+
clientMutationId: string;
|
|
500
|
+
expiresAt: string;
|
|
501
|
+
accountId: string;
|
|
502
|
+
account: NativeRepostState['account'];
|
|
503
|
+
target: NativeRepostTarget;
|
|
504
|
+
action: 'repost' | 'unrepost';
|
|
505
|
+
attemptedAt: string | null;
|
|
506
|
+
receipt: NativeRepostReceipt | null;
|
|
507
|
+
checkedAt: string | null;
|
|
508
|
+
/** Sign this exact event with the displayed account. Never send a private key. */
|
|
509
|
+
signing?: {
|
|
510
|
+
event: Omit<HostedNostrIdentityProof, 'sig'>;
|
|
511
|
+
relay: string;
|
|
512
|
+
};
|
|
513
|
+
}
|
|
447
514
|
export interface NativeReplyReceipt {
|
|
448
515
|
state: 'published' | 'accepted' | 'unknown' | 'rejected';
|
|
449
516
|
nativeId: string | null;
|
|
@@ -522,6 +589,31 @@ export interface NativeReplyBatch {
|
|
|
522
589
|
} | null;
|
|
523
590
|
}>;
|
|
524
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
|
+
}
|
|
525
617
|
export interface NativeSocialCallbackInput {
|
|
526
618
|
protocol: NativeSocialProtocol;
|
|
527
619
|
state: string;
|
|
@@ -610,7 +702,7 @@ export interface NativeNostrPrepared {
|
|
|
610
702
|
export interface NativeNostrAccount {
|
|
611
703
|
enabled: boolean;
|
|
612
704
|
identity: HostedProtocolIdentity | null;
|
|
613
|
-
capabilities: Array<'publish_original_text' | 'request_own_post_deletion' | 'reply_text_note' | 'publish_linked_text' | 'like' | 'unlike' | 'follow' | 'unfollow'>;
|
|
705
|
+
capabilities: Array<'publish_original_text' | 'request_own_post_deletion' | 'reply_text_note' | 'publish_linked_text' | 'like' | 'unlike' | 'repost' | 'unrepost' | 'follow' | 'unfollow'>;
|
|
614
706
|
signing?: 'client';
|
|
615
707
|
}
|
|
616
708
|
export interface NativeNostrPostState {
|
|
@@ -901,6 +993,53 @@ export declare class ProtocolsResource {
|
|
|
901
993
|
}): Promise<SingleResponse<NativeLikeReview>>;
|
|
902
994
|
/** Reconcile the saved action without sending another native write. */
|
|
903
995
|
nativeLikeStatus(id: string): Promise<SingleResponse<NativeLikeReview>>;
|
|
996
|
+
/** Read this connected account's current native repost; never infer it from a public count. */
|
|
997
|
+
nativeRepostState(input: NativeRepostSourceInput): Promise<SingleResponse<NativeRepostState>>;
|
|
998
|
+
/** Prepare a repost/unrepost for explicit approval. Preserve the mutation ID after a lost response. */
|
|
999
|
+
prepareNativeRepost(input: NativeRepostPrepareInput): Promise<SingleResponse<NativeRepostReview>>;
|
|
1000
|
+
/** Submit one approved action. Only Nostr supplies a public signed event. Automatic retries are disabled. */
|
|
1001
|
+
submitNativeRepost(id: string, input: {
|
|
1002
|
+
approve: true;
|
|
1003
|
+
event?: HostedNostrIdentityProof;
|
|
1004
|
+
}): Promise<SingleResponse<NativeRepostReview>>;
|
|
1005
|
+
/** Reconcile the saved action without sending another native write. */
|
|
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
|
+
}>>;
|
|
904
1043
|
/** Prepare one exact shared reply preview. Keep the mutation ID across uncertain responses. */
|
|
905
1044
|
prepareNativeReply(input: NativeReplyPrepareInput): Promise<SingleResponse<NativeReplyBatch>>;
|
|
906
1045
|
/** Send only explicitly approved delivery IDs from this preview. Repeated submissions reconcile; they do not replay a write. */
|
|
@@ -154,6 +154,57 @@ export class ProtocolsResource {
|
|
|
154
154
|
hostedIdentityPath(id);
|
|
155
155
|
return this.client.get(`/protocols/social/likes/${encodeURIComponent(id)}`);
|
|
156
156
|
}
|
|
157
|
+
/** Read this connected account's current native repost; never infer it from a public count. */
|
|
158
|
+
nativeRepostState(input) {
|
|
159
|
+
return this.client.get('/protocols/social/reposts/state', { accountId: input.accountId, protocol: input.protocol, nativeId: input.nativeId });
|
|
160
|
+
}
|
|
161
|
+
/** Prepare a repost/unrepost for explicit approval. Preserve the mutation ID after a lost response. */
|
|
162
|
+
prepareNativeRepost(input) {
|
|
163
|
+
return this.client.post('/protocols/social/reposts/prepare', { clientMutationId: input.clientMutationId, accountId: input.accountId,
|
|
164
|
+
protocol: input.protocol, nativeId: input.nativeId, action: input.action }, { retry: false });
|
|
165
|
+
}
|
|
166
|
+
/** Submit one approved action. Only Nostr supplies a public signed event. Automatic retries are disabled. */
|
|
167
|
+
submitNativeRepost(id, input) {
|
|
168
|
+
hostedIdentityPath(id);
|
|
169
|
+
const event = input.event;
|
|
170
|
+
return this.client.post(`/protocols/social/reposts/${encodeURIComponent(id)}/submit`, { approve: input.approve,
|
|
171
|
+
...(event ? { event: { id: event.id, pubkey: event.pubkey, sig: event.sig, kind: event.kind,
|
|
172
|
+
created_at: event.created_at, content: event.content, tags: event.tags } } : {}) }, { retry: false });
|
|
173
|
+
}
|
|
174
|
+
/** Reconcile the saved action without sending another native write. */
|
|
175
|
+
nativeRepostStatus(id) {
|
|
176
|
+
hostedIdentityPath(id);
|
|
177
|
+
return this.client.get(`/protocols/social/reposts/${encodeURIComponent(id)}`);
|
|
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
|
+
}
|
|
157
208
|
/** Prepare one exact shared reply preview. Keep the mutation ID across uncertain responses. */
|
|
158
209
|
prepareNativeReply(input) {
|
|
159
210
|
return this.client.post('/protocols/social/replies/prepare', { clientMutationId: input.clientMutationId, text: input.text,
|
package/llm.md
CHANGED
|
@@ -633,7 +633,7 @@ if (subscription.active) {
|
|
|
633
633
|
- `r.inviteCodes` / `r.inviteCodesAdmin` — Invite code management
|
|
634
634
|
- `r.organizationSettings` / `r.organizationSecurity` — Org configuration
|
|
635
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.
|
|
636
|
+
- Native reposts: `nativeRepostState({ accountId, protocol, nativeId })`, `prepareNativeRepost({ clientMutationId, accountId, protocol, nativeId, action: "repost" | "unrepost" })`, `submitNativeRepost(id, { approve: true, event? })`, `nativeRepostStatus(id)`. Requires `NATIVE_SOCIAL_REPOST_PROJECTS`, account capability and explicit approval; Nostr signs the exact review (kind 6 or own kind 5). Unknown attempts only reconcile. Bluesky connections need the new repost scope; ActivityPub uses write:statuses. 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.
|
|
637
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.
|
|
638
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`.
|
|
639
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.
|
|
@@ -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.
|