@recursiv/sdk 0.7.28 → 0.7.29
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/dist/index.d.ts +1 -1
- package/dist/resources/protocols.d.ts +96 -1
- package/dist/resources/protocols.js +28 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -189,7 +189,7 @@ export type { UploadMediaInput, UploadUrlInput, UploadUrlResult } from './resour
|
|
|
189
189
|
export { WalletResource } from './resources/wallet.js';
|
|
190
190
|
export { ProtocolsResource } from './resources/protocols.js';
|
|
191
191
|
export { PROTOCOL_ADAPTER_MATURITIES, PROTOCOL_CAPABILITY_OPERATIONS, PROTOCOL_CAPABILITY_STATUSES, } from './resources/protocols.js';
|
|
192
|
-
export type { SocialProfile, SocialSubscription, SocialSubscriptionChange, SocialProfilePage, SocialNetwork, SocialPost, SocialConversation, SocialTrend, SocialTrendProvenance, SocialTrends, SocialTrendFeed, 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, ProtocolQuarantinedCandidate, ProtocolRefreshResult, ProtocolSettings, ProtocolSettingsUpdateResult, UpdateSettingsInput as UpdateProtocolSettingsInput, } from './resources/protocols.js';
|
|
192
|
+
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';
|
|
193
193
|
export { InboxResource } from './resources/inbox.js';
|
|
194
194
|
export { NetworkResource } from './resources/network.js';
|
|
195
195
|
export { SimulatorResource } from './resources/simulator.js';
|
|
@@ -130,6 +130,57 @@ export interface ProtocolCandidateDecisionResult {
|
|
|
130
130
|
candidate: ProtocolQuarantinedCandidate;
|
|
131
131
|
decision_id: string;
|
|
132
132
|
}
|
|
133
|
+
/** Operator view of the durable ingestion runtime for the authenticated app (goal ed3759f0 row 7). */
|
|
134
|
+
export interface ProtocolIngestionStatus {
|
|
135
|
+
/** Exactly one ingestion writer per process: the legacy collector or the runtime. */
|
|
136
|
+
mode: 'collector' | 'runtime';
|
|
137
|
+
enabled: boolean;
|
|
138
|
+
simulation: boolean;
|
|
139
|
+
/** Process-wide PROTOCOL_INGESTION_KILL_SWITCH. */
|
|
140
|
+
global_kill_switch: boolean;
|
|
141
|
+
controls_valid: boolean;
|
|
142
|
+
/** Whether this app's tuple is on the PROTOCOL_INGESTION_PROJECTS allow-list. */
|
|
143
|
+
project_allowed: boolean;
|
|
144
|
+
/** This app's operator kill switch (protocol_collection_setting.kill_switch). */
|
|
145
|
+
kill_switch: boolean;
|
|
146
|
+
jobs: {
|
|
147
|
+
queued: number;
|
|
148
|
+
leased: number;
|
|
149
|
+
done: number;
|
|
150
|
+
dead: number;
|
|
151
|
+
};
|
|
152
|
+
quotas: Array<{
|
|
153
|
+
provider_id: string;
|
|
154
|
+
window: 'run' | 'hour' | 'day';
|
|
155
|
+
killed: boolean;
|
|
156
|
+
circuit_open_until: string | null;
|
|
157
|
+
circuit_failures: number;
|
|
158
|
+
consumed: {
|
|
159
|
+
calls: number;
|
|
160
|
+
items: number;
|
|
161
|
+
bytes: number;
|
|
162
|
+
};
|
|
163
|
+
ceilings: {
|
|
164
|
+
calls: number | null;
|
|
165
|
+
items: number | null;
|
|
166
|
+
bytes: number | null;
|
|
167
|
+
};
|
|
168
|
+
}>;
|
|
169
|
+
lanes: Array<{
|
|
170
|
+
provider_id: string;
|
|
171
|
+
source_key: string;
|
|
172
|
+
source_subscription_key: string;
|
|
173
|
+
active: boolean;
|
|
174
|
+
}>;
|
|
175
|
+
}
|
|
176
|
+
export interface ReplayProtocolIngestionJobInput {
|
|
177
|
+
/** Operator note recorded on the audit row; 8 to 1024 characters. */
|
|
178
|
+
reason: string;
|
|
179
|
+
}
|
|
180
|
+
export interface ProtocolIngestionReplayResult {
|
|
181
|
+
job_id: string;
|
|
182
|
+
status: 'replayed';
|
|
183
|
+
}
|
|
133
184
|
/** App/network scope comes only from the authenticated project-bound key. */
|
|
134
185
|
export interface ListProtocolCandidatesParams {
|
|
135
186
|
protocol?: string;
|
|
@@ -497,7 +548,7 @@ export interface SocialNetwork {
|
|
|
497
548
|
url: string;
|
|
498
549
|
};
|
|
499
550
|
coverage: string;
|
|
500
|
-
capabilities: Array<'profile_search' | 'profile_read' | 'original_author_posts' | 'minds_subscription' | 'following_feed' | 'conversation_read' | 'public_trends' | 'trend_feed'>;
|
|
551
|
+
capabilities: Array<'profile_search' | 'profile_read' | 'original_author_posts' | 'minds_subscription' | 'following_feed' | 'conversation_read' | 'public_trends' | 'trend_feed' | 'popular_accounts'>;
|
|
501
552
|
profileSearchPagination: boolean;
|
|
502
553
|
conversationCoverage?: string;
|
|
503
554
|
}
|
|
@@ -598,6 +649,24 @@ export interface SocialTrendFeed extends SocialTrendProvenance {
|
|
|
598
649
|
items: SocialPost[];
|
|
599
650
|
cursor: string | null;
|
|
600
651
|
}
|
|
652
|
+
/** Provider-ranked accounts. `source` says whether this page is the app's hourly index snapshot or a live read. */
|
|
653
|
+
export interface SocialPopularProfiles {
|
|
654
|
+
items: SocialProfile[];
|
|
655
|
+
cursor: string | null;
|
|
656
|
+
provenance: {
|
|
657
|
+
provider: {
|
|
658
|
+
name: string;
|
|
659
|
+
url: string;
|
|
660
|
+
};
|
|
661
|
+
/** The provider's own ranking label, never a Minds popularity score. */
|
|
662
|
+
ranking: string;
|
|
663
|
+
fetchedAt: string;
|
|
664
|
+
coverage: 'provider_ranked_window';
|
|
665
|
+
source: 'index' | 'live';
|
|
666
|
+
/** Provider read time of the served snapshot; null for live reads. */
|
|
667
|
+
snapshotAt: string | null;
|
|
668
|
+
};
|
|
669
|
+
}
|
|
601
670
|
export interface SocialConversation {
|
|
602
671
|
focus: SocialPost;
|
|
603
672
|
/** Oldest available ancestor first, ending with the immediate parent. */
|
|
@@ -669,6 +738,12 @@ export declare class ProtocolsResource {
|
|
|
669
738
|
limit?: number;
|
|
670
739
|
cursor?: string;
|
|
671
740
|
}): Promise<SingleResponse<SocialTrendFeed>>;
|
|
741
|
+
/** Provider-ranked public accounts with explicit provenance; served from the app's index when a fresh snapshot exists. */
|
|
742
|
+
getPublicPopularProfiles(params: {
|
|
743
|
+
protocol: string;
|
|
744
|
+
limit?: number;
|
|
745
|
+
cursor?: string;
|
|
746
|
+
}): Promise<SingleResponse<SocialPopularProfiles>>;
|
|
672
747
|
/** Prepare one exact shared reply preview. Keep the mutation ID across uncertain responses. */
|
|
673
748
|
prepareNativeReply(input: NativeReplyPrepareInput): Promise<SingleResponse<NativeReplyBatch>>;
|
|
674
749
|
/** Send only explicitly approved delivery IDs from this preview. Repeated submissions reconcile; they do not replay a write. */
|
|
@@ -832,6 +907,26 @@ export declare class ProtocolsResource {
|
|
|
832
907
|
* an agent key may only reject or escalate; escalation needs a reason.
|
|
833
908
|
*/
|
|
834
909
|
decideCandidate(id: string, input: DecideProtocolCandidateInput): Promise<SingleResponse<ProtocolCandidateDecisionResult>>;
|
|
910
|
+
/**
|
|
911
|
+
* Read the ingestion runtime status for the key's app: mode, switches, job
|
|
912
|
+
* counts, quota ledger and lanes. Read-only. Requires the app's
|
|
913
|
+
* content_intelligence_admin binding (404 otherwise) and the same
|
|
914
|
+
* project-admin authorization as listCandidates.
|
|
915
|
+
*/
|
|
916
|
+
ingestionStatus(): Promise<SingleResponse<ProtocolIngestionStatus>>;
|
|
917
|
+
/** Turn the app's ingestion kill switch on: no reservation, screening or approval proceeds. */
|
|
918
|
+
killIngestion(): Promise<SingleResponse<{
|
|
919
|
+
kill_switch: true;
|
|
920
|
+
}>>;
|
|
921
|
+
/** Turn the app's ingestion kill switch off. Does not enable the runtime by itself. */
|
|
922
|
+
resumeIngestion(): Promise<SingleResponse<{
|
|
923
|
+
kill_switch: false;
|
|
924
|
+
}>>;
|
|
925
|
+
/**
|
|
926
|
+
* Requeue one dead ingestion job. Refused (409) while the runtime is
|
|
927
|
+
* disabled, simulating or killed; 404 when no dead job matches in this app.
|
|
928
|
+
*/
|
|
929
|
+
replayIngestionJob(jobId: string, input: ReplayProtocolIngestionJobInput): Promise<SingleResponse<ProtocolIngestionReplayResult>>;
|
|
835
930
|
/**
|
|
836
931
|
* Read one quarantined candidate under the same authorization as listCandidates.
|
|
837
932
|
* Empty and URL dot-segment IDs reject with ValidationError before any request;
|
|
@@ -96,6 +96,10 @@ export class ProtocolsResource {
|
|
|
96
96
|
getPublicTrendFeed(params) {
|
|
97
97
|
return this.client.get('/protocols/social/trend-feed', { protocol: params.protocol, topic: params.topic, limit: params.limit, cursor: params.cursor });
|
|
98
98
|
}
|
|
99
|
+
/** Provider-ranked public accounts with explicit provenance; served from the app's index when a fresh snapshot exists. */
|
|
100
|
+
getPublicPopularProfiles(params) {
|
|
101
|
+
return this.client.get('/protocols/social/popular-profiles', { protocol: params.protocol, limit: params.limit, cursor: params.cursor });
|
|
102
|
+
}
|
|
99
103
|
/** Prepare one exact shared reply preview. Keep the mutation ID across uncertain responses. */
|
|
100
104
|
prepareNativeReply(input) {
|
|
101
105
|
return this.client.post('/protocols/social/replies/prepare', { clientMutationId: input.clientMutationId, text: input.text,
|
|
@@ -308,6 +312,30 @@ export class ProtocolsResource {
|
|
|
308
312
|
async decideCandidate(id, input) {
|
|
309
313
|
return this.client.post(`/protocols/candidates/${encodeURIComponent(assertCandidateId(id))}/decision`, input);
|
|
310
314
|
}
|
|
315
|
+
/**
|
|
316
|
+
* Read the ingestion runtime status for the key's app: mode, switches, job
|
|
317
|
+
* counts, quota ledger and lanes. Read-only. Requires the app's
|
|
318
|
+
* content_intelligence_admin binding (404 otherwise) and the same
|
|
319
|
+
* project-admin authorization as listCandidates.
|
|
320
|
+
*/
|
|
321
|
+
ingestionStatus() {
|
|
322
|
+
return this.client.get('/protocols/ingestion/status');
|
|
323
|
+
}
|
|
324
|
+
/** Turn the app's ingestion kill switch on: no reservation, screening or approval proceeds. */
|
|
325
|
+
killIngestion() {
|
|
326
|
+
return this.client.post('/protocols/ingestion/kill', {});
|
|
327
|
+
}
|
|
328
|
+
/** Turn the app's ingestion kill switch off. Does not enable the runtime by itself. */
|
|
329
|
+
resumeIngestion() {
|
|
330
|
+
return this.client.post('/protocols/ingestion/resume', {});
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Requeue one dead ingestion job. Refused (409) while the runtime is
|
|
334
|
+
* disabled, simulating or killed; 404 when no dead job matches in this app.
|
|
335
|
+
*/
|
|
336
|
+
async replayIngestionJob(jobId, input) {
|
|
337
|
+
return this.client.post(`/protocols/ingestion/replay/${encodeURIComponent(assertCandidateId(jobId))}`, input);
|
|
338
|
+
}
|
|
311
339
|
/**
|
|
312
340
|
* Read one quarantined candidate under the same authorization as listCandidates.
|
|
313
341
|
* Empty and URL dot-segment IDs reject with ValidationError before any request;
|