atproto-mcp 0.1.0
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/LICENSE +22 -0
- package/README.md +293 -0
- package/dist/cli.d.ts +10 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +261 -0
- package/dist/cli.js.map +1 -0
- package/dist/health-check.d.ts +7 -0
- package/dist/health-check.d.ts.map +1 -0
- package/dist/health-check.js +57 -0
- package/dist/health-check.js.map +1 -0
- package/dist/index.d.ts +122 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +612 -0
- package/dist/index.js.map +1 -0
- package/dist/prompts/index.d.ts +77 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +186 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/resources/index.d.ts +75 -0
- package/dist/resources/index.d.ts.map +1 -0
- package/dist/resources/index.js +218 -0
- package/dist/resources/index.js.map +1 -0
- package/dist/test/setup.d.ts +78 -0
- package/dist/test/setup.d.ts.map +1 -0
- package/dist/test/setup.js +138 -0
- package/dist/test/setup.js.map +1 -0
- package/dist/tools/implementations/advanced-social-tools.d.ts +250 -0
- package/dist/tools/implementations/advanced-social-tools.d.ts.map +1 -0
- package/dist/tools/implementations/advanced-social-tools.js +380 -0
- package/dist/tools/implementations/advanced-social-tools.js.map +1 -0
- package/dist/tools/implementations/base-tool.d.ts +73 -0
- package/dist/tools/implementations/base-tool.d.ts.map +1 -0
- package/dist/tools/implementations/base-tool.js +225 -0
- package/dist/tools/implementations/base-tool.js.map +1 -0
- package/dist/tools/implementations/content-management-tools.d.ts +81 -0
- package/dist/tools/implementations/content-management-tools.d.ts.map +1 -0
- package/dist/tools/implementations/content-management-tools.js +236 -0
- package/dist/tools/implementations/content-management-tools.js.map +1 -0
- package/dist/tools/implementations/create-post-tool.d.ts +131 -0
- package/dist/tools/implementations/create-post-tool.d.ts.map +1 -0
- package/dist/tools/implementations/create-post-tool.js +182 -0
- package/dist/tools/implementations/create-post-tool.js.map +1 -0
- package/dist/tools/implementations/follow-user-tool.d.ts +69 -0
- package/dist/tools/implementations/follow-user-tool.d.ts.map +1 -0
- package/dist/tools/implementations/follow-user-tool.js +200 -0
- package/dist/tools/implementations/follow-user-tool.js.map +1 -0
- package/dist/tools/implementations/get-user-profile-tool.d.ts +61 -0
- package/dist/tools/implementations/get-user-profile-tool.d.ts.map +1 -0
- package/dist/tools/implementations/get-user-profile-tool.js +139 -0
- package/dist/tools/implementations/get-user-profile-tool.js.map +1 -0
- package/dist/tools/implementations/index.d.ts +22 -0
- package/dist/tools/implementations/index.d.ts.map +1 -0
- package/dist/tools/implementations/index.js +32 -0
- package/dist/tools/implementations/index.js.map +1 -0
- package/dist/tools/implementations/like-post-tool.d.ts +68 -0
- package/dist/tools/implementations/like-post-tool.d.ts.map +1 -0
- package/dist/tools/implementations/like-post-tool.js +184 -0
- package/dist/tools/implementations/like-post-tool.js.map +1 -0
- package/dist/tools/implementations/media-tools.d.ts +360 -0
- package/dist/tools/implementations/media-tools.d.ts.map +1 -0
- package/dist/tools/implementations/media-tools.js +444 -0
- package/dist/tools/implementations/media-tools.js.map +1 -0
- package/dist/tools/implementations/moderation-tools.d.ts +189 -0
- package/dist/tools/implementations/moderation-tools.d.ts.map +1 -0
- package/dist/tools/implementations/moderation-tools.js +289 -0
- package/dist/tools/implementations/moderation-tools.js.map +1 -0
- package/dist/tools/implementations/oauth-tools.d.ts +108 -0
- package/dist/tools/implementations/oauth-tools.d.ts.map +1 -0
- package/dist/tools/implementations/oauth-tools.js +183 -0
- package/dist/tools/implementations/oauth-tools.js.map +1 -0
- package/dist/tools/implementations/reply-to-post-tool.d.ts +52 -0
- package/dist/tools/implementations/reply-to-post-tool.d.ts.map +1 -0
- package/dist/tools/implementations/reply-to-post-tool.js +167 -0
- package/dist/tools/implementations/reply-to-post-tool.js.map +1 -0
- package/dist/tools/implementations/repost-tool.d.ts +76 -0
- package/dist/tools/implementations/repost-tool.d.ts.map +1 -0
- package/dist/tools/implementations/repost-tool.js +181 -0
- package/dist/tools/implementations/repost-tool.js.map +1 -0
- package/dist/tools/implementations/search-posts-tool.d.ts +95 -0
- package/dist/tools/implementations/search-posts-tool.d.ts.map +1 -0
- package/dist/tools/implementations/search-posts-tool.js +208 -0
- package/dist/tools/implementations/search-posts-tool.js.map +1 -0
- package/dist/tools/implementations/social-graph-tools.d.ts +119 -0
- package/dist/tools/implementations/social-graph-tools.d.ts.map +1 -0
- package/dist/tools/implementations/social-graph-tools.js +262 -0
- package/dist/tools/implementations/social-graph-tools.js.map +1 -0
- package/dist/tools/implementations/streaming-tools.d.ts +130 -0
- package/dist/tools/implementations/streaming-tools.d.ts.map +1 -0
- package/dist/tools/implementations/streaming-tools.js +241 -0
- package/dist/tools/implementations/streaming-tools.js.map +1 -0
- package/dist/tools/implementations/timeline-tools.d.ts +69 -0
- package/dist/tools/implementations/timeline-tools.d.ts.map +1 -0
- package/dist/tools/implementations/timeline-tools.js +194 -0
- package/dist/tools/implementations/timeline-tools.js.map +1 -0
- package/dist/tools/index.d.ts +23 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +73 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/types/index.d.ts +242 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +73 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/atp-client.d.ts +109 -0
- package/dist/utils/atp-client.d.ts.map +1 -0
- package/dist/utils/atp-client.js +451 -0
- package/dist/utils/atp-client.js.map +1 -0
- package/dist/utils/config.d.ts +74 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/config.js +311 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/firehose-client.d.ts +96 -0
- package/dist/utils/firehose-client.d.ts.map +1 -0
- package/dist/utils/firehose-client.js +252 -0
- package/dist/utils/firehose-client.js.map +1 -0
- package/dist/utils/logger.d.ts +74 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +142 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/oauth-client.d.ts +61 -0
- package/dist/utils/oauth-client.d.ts.map +1 -0
- package/dist/utils/oauth-client.js +224 -0
- package/dist/utils/oauth-client.js.map +1 -0
- package/dist/utils/performance.d.ts +102 -0
- package/dist/utils/performance.d.ts.map +1 -0
- package/dist/utils/performance.js +302 -0
- package/dist/utils/performance.js.map +1 -0
- package/dist/utils/security.d.ts +154 -0
- package/dist/utils/security.d.ts.map +1 -0
- package/dist/utils/security.js +358 -0
- package/dist/utils/security.js.map +1 -0
- package/package.json +93 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Test setup and configuration for the AT Protocol MCP Server
|
|
3
|
+
*/
|
|
4
|
+
import { afterEach, beforeEach, vi } from 'vitest';
|
|
5
|
+
// Mock environment variables for testing
|
|
6
|
+
const originalEnv = process.env;
|
|
7
|
+
beforeEach(() => {
|
|
8
|
+
// Reset environment variables
|
|
9
|
+
process.env = { ...originalEnv };
|
|
10
|
+
// Set default test environment variables
|
|
11
|
+
process.env['NODE_ENV'] = 'test';
|
|
12
|
+
process.env['LOG_LEVEL'] = 'error'; // Reduce noise in tests
|
|
13
|
+
// Clear all mocks
|
|
14
|
+
vi.clearAllMocks();
|
|
15
|
+
});
|
|
16
|
+
afterEach(() => {
|
|
17
|
+
// Restore original environment
|
|
18
|
+
process.env = originalEnv;
|
|
19
|
+
// Reset all mocks
|
|
20
|
+
vi.resetAllMocks();
|
|
21
|
+
});
|
|
22
|
+
/**
|
|
23
|
+
* Test utilities and helpers
|
|
24
|
+
*/
|
|
25
|
+
/**
|
|
26
|
+
* Create a mock AT Protocol session
|
|
27
|
+
*/
|
|
28
|
+
export function createMockSession() {
|
|
29
|
+
return {
|
|
30
|
+
did: 'did:plc:test123',
|
|
31
|
+
handle: 'test.bsky.social',
|
|
32
|
+
accessJwt: 'mock-access-jwt',
|
|
33
|
+
refreshJwt: 'mock-refresh-jwt',
|
|
34
|
+
active: true,
|
|
35
|
+
status: 'valid',
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Create a mock AT Protocol configuration
|
|
40
|
+
*/
|
|
41
|
+
export function createMockAtpConfig() {
|
|
42
|
+
return {
|
|
43
|
+
service: 'https://bsky.social',
|
|
44
|
+
identifier: 'test.bsky.social',
|
|
45
|
+
password: 'test-password',
|
|
46
|
+
authMethod: 'app-password',
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Create a mock MCP server configuration
|
|
51
|
+
*/
|
|
52
|
+
export function createMockServerConfig() {
|
|
53
|
+
return {
|
|
54
|
+
port: 3000,
|
|
55
|
+
host: 'localhost',
|
|
56
|
+
name: 'atproto-mcp-test',
|
|
57
|
+
version: '0.1.0',
|
|
58
|
+
description: 'Test AT Protocol MCP Server',
|
|
59
|
+
atproto: createMockAtpConfig(),
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Mock console methods to reduce test noise
|
|
64
|
+
*/
|
|
65
|
+
export function mockConsole() {
|
|
66
|
+
return {
|
|
67
|
+
log: vi.spyOn(console, 'log').mockImplementation(() => { }),
|
|
68
|
+
error: vi.spyOn(console, 'error').mockImplementation(() => { }),
|
|
69
|
+
warn: vi.spyOn(console, 'warn').mockImplementation(() => { }),
|
|
70
|
+
info: vi.spyOn(console, 'info').mockImplementation(() => { }),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Create a promise that resolves after a specified delay
|
|
75
|
+
*/
|
|
76
|
+
export function delay(ms) {
|
|
77
|
+
return new Promise(resolve => setTimeout(resolve, ms));
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Create a promise that rejects after a specified delay
|
|
81
|
+
*/
|
|
82
|
+
export function rejectAfter(ms, error) {
|
|
83
|
+
return new Promise((_, reject) => setTimeout(() => reject(error), ms));
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Assert that a function throws an error with specific properties
|
|
87
|
+
*/
|
|
88
|
+
export async function expectToThrow(fn, errorClass, message) {
|
|
89
|
+
try {
|
|
90
|
+
await fn();
|
|
91
|
+
throw new Error('Expected function to throw, but it did not');
|
|
92
|
+
}
|
|
93
|
+
catch (error) {
|
|
94
|
+
if (!(error instanceof errorClass)) {
|
|
95
|
+
throw new Error(`Expected error to be instance of ${errorClass.name}, but got ${error?.constructor.name}`);
|
|
96
|
+
}
|
|
97
|
+
if (message) {
|
|
98
|
+
const errorMessage = error.message;
|
|
99
|
+
if (typeof message === 'string') {
|
|
100
|
+
if (errorMessage !== message) {
|
|
101
|
+
throw new Error(`Expected error message "${message}", but got "${errorMessage}"`);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
else if (message instanceof RegExp) {
|
|
105
|
+
if (!message.test(errorMessage)) {
|
|
106
|
+
throw new Error(`Expected error message to match ${message}, but got "${errorMessage}"`);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return error;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Mock AT Protocol API responses
|
|
115
|
+
*/
|
|
116
|
+
export class MockAtpAgent {
|
|
117
|
+
loginResponse = { success: true, data: createMockSession() };
|
|
118
|
+
refreshResponse = { success: true };
|
|
119
|
+
async login() {
|
|
120
|
+
return this.loginResponse;
|
|
121
|
+
}
|
|
122
|
+
async refreshSession() {
|
|
123
|
+
return this.refreshResponse;
|
|
124
|
+
}
|
|
125
|
+
setLoginResponse(response) {
|
|
126
|
+
this.loginResponse = response;
|
|
127
|
+
}
|
|
128
|
+
setRefreshResponse(response) {
|
|
129
|
+
this.refreshResponse = response;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Create a mock AT Protocol agent
|
|
134
|
+
*/
|
|
135
|
+
export function createMockAtpAgent() {
|
|
136
|
+
return new MockAtpAgent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aAAa,GAAG,QAAQ,CAAC;IAChC,CAAC;IAED,kBAAkB,CAAC,QAAa;QAC9B,IAAI,CAAC,eAAe,GAAG,QAAQ,CAAC;IAClC,CAAC;CACF;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB;IAChC,OAAO,IAAI,YAAY,EAAE,CAAC;AAC5B,CAAC"}
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Advanced social features for AT Protocol
|
|
3
|
+
*/
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import { BaseTool } from './base-tool.js';
|
|
6
|
+
import type { AtpClient } from '../../utils/atp-client.js';
|
|
7
|
+
export declare class CreateListTool extends BaseTool {
|
|
8
|
+
readonly schema: {
|
|
9
|
+
method: string;
|
|
10
|
+
description: string;
|
|
11
|
+
params: z.ZodObject<{
|
|
12
|
+
name: z.ZodString;
|
|
13
|
+
description: z.ZodOptional<z.ZodString>;
|
|
14
|
+
purpose: z.ZodDefault<z.ZodEnum<["modlist", "curatelist"]>>;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
name: string;
|
|
17
|
+
purpose: "modlist" | "curatelist";
|
|
18
|
+
description?: string | undefined;
|
|
19
|
+
}, {
|
|
20
|
+
name: string;
|
|
21
|
+
description?: string | undefined;
|
|
22
|
+
purpose?: "modlist" | "curatelist" | undefined;
|
|
23
|
+
}>;
|
|
24
|
+
};
|
|
25
|
+
constructor(atpClient: AtpClient);
|
|
26
|
+
protected execute(params: {
|
|
27
|
+
name: string;
|
|
28
|
+
description?: string;
|
|
29
|
+
purpose?: 'modlist' | 'curatelist';
|
|
30
|
+
}): Promise<{
|
|
31
|
+
success: boolean;
|
|
32
|
+
message: string;
|
|
33
|
+
list: {
|
|
34
|
+
uri: string;
|
|
35
|
+
cid: string;
|
|
36
|
+
name: string;
|
|
37
|
+
description?: string;
|
|
38
|
+
purpose: string;
|
|
39
|
+
createdAt: string;
|
|
40
|
+
};
|
|
41
|
+
}>;
|
|
42
|
+
}
|
|
43
|
+
export declare class AddToListTool extends BaseTool {
|
|
44
|
+
readonly schema: {
|
|
45
|
+
method: string;
|
|
46
|
+
description: string;
|
|
47
|
+
params: z.ZodObject<{
|
|
48
|
+
listUri: z.ZodString;
|
|
49
|
+
actor: z.ZodString;
|
|
50
|
+
}, "strip", z.ZodTypeAny, {
|
|
51
|
+
actor: string;
|
|
52
|
+
listUri: string;
|
|
53
|
+
}, {
|
|
54
|
+
actor: string;
|
|
55
|
+
listUri: string;
|
|
56
|
+
}>;
|
|
57
|
+
};
|
|
58
|
+
constructor(atpClient: AtpClient);
|
|
59
|
+
protected execute(params: {
|
|
60
|
+
listUri: string;
|
|
61
|
+
actor: string;
|
|
62
|
+
}): Promise<{
|
|
63
|
+
success: boolean;
|
|
64
|
+
message: string;
|
|
65
|
+
listItem: {
|
|
66
|
+
uri: string;
|
|
67
|
+
listUri: string;
|
|
68
|
+
actor: string;
|
|
69
|
+
};
|
|
70
|
+
}>;
|
|
71
|
+
}
|
|
72
|
+
export declare class RemoveFromListTool extends BaseTool {
|
|
73
|
+
readonly schema: {
|
|
74
|
+
method: string;
|
|
75
|
+
description: string;
|
|
76
|
+
params: z.ZodObject<{
|
|
77
|
+
listUri: z.ZodString;
|
|
78
|
+
actor: z.ZodString;
|
|
79
|
+
}, "strip", z.ZodTypeAny, {
|
|
80
|
+
actor: string;
|
|
81
|
+
listUri: string;
|
|
82
|
+
}, {
|
|
83
|
+
actor: string;
|
|
84
|
+
listUri: string;
|
|
85
|
+
}>;
|
|
86
|
+
};
|
|
87
|
+
constructor(atpClient: AtpClient);
|
|
88
|
+
protected execute(params: {
|
|
89
|
+
listUri: string;
|
|
90
|
+
actor: string;
|
|
91
|
+
}): Promise<{
|
|
92
|
+
success: boolean;
|
|
93
|
+
message: string;
|
|
94
|
+
removedFrom: {
|
|
95
|
+
listUri: string;
|
|
96
|
+
actor: string;
|
|
97
|
+
};
|
|
98
|
+
}>;
|
|
99
|
+
}
|
|
100
|
+
export declare class GetListTool extends BaseTool {
|
|
101
|
+
readonly schema: {
|
|
102
|
+
method: string;
|
|
103
|
+
description: string;
|
|
104
|
+
params: z.ZodObject<{
|
|
105
|
+
listUri: z.ZodString;
|
|
106
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
107
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
108
|
+
}, "strip", z.ZodTypeAny, {
|
|
109
|
+
limit: number;
|
|
110
|
+
listUri: string;
|
|
111
|
+
cursor?: string | undefined;
|
|
112
|
+
}, {
|
|
113
|
+
listUri: string;
|
|
114
|
+
limit?: number | undefined;
|
|
115
|
+
cursor?: string | undefined;
|
|
116
|
+
}>;
|
|
117
|
+
};
|
|
118
|
+
constructor(atpClient: AtpClient);
|
|
119
|
+
protected execute(params: {
|
|
120
|
+
listUri: string;
|
|
121
|
+
limit?: number;
|
|
122
|
+
cursor?: string;
|
|
123
|
+
}): Promise<{
|
|
124
|
+
success: boolean;
|
|
125
|
+
list: {
|
|
126
|
+
uri: string;
|
|
127
|
+
name: string;
|
|
128
|
+
description?: string;
|
|
129
|
+
purpose: string;
|
|
130
|
+
creator: {
|
|
131
|
+
did: string;
|
|
132
|
+
handle: string;
|
|
133
|
+
displayName?: string;
|
|
134
|
+
};
|
|
135
|
+
itemCount: number;
|
|
136
|
+
};
|
|
137
|
+
items: Array<{
|
|
138
|
+
uri: string;
|
|
139
|
+
subject: {
|
|
140
|
+
did: string;
|
|
141
|
+
handle: string;
|
|
142
|
+
displayName?: string;
|
|
143
|
+
avatar?: string;
|
|
144
|
+
};
|
|
145
|
+
}>;
|
|
146
|
+
cursor?: string;
|
|
147
|
+
}>;
|
|
148
|
+
}
|
|
149
|
+
export declare class GetThreadTool extends BaseTool {
|
|
150
|
+
readonly schema: {
|
|
151
|
+
method: string;
|
|
152
|
+
description: string;
|
|
153
|
+
params: z.ZodObject<{
|
|
154
|
+
uri: z.ZodString;
|
|
155
|
+
depth: z.ZodDefault<z.ZodNumber>;
|
|
156
|
+
parentHeight: z.ZodDefault<z.ZodNumber>;
|
|
157
|
+
}, "strip", z.ZodTypeAny, {
|
|
158
|
+
uri: string;
|
|
159
|
+
depth: number;
|
|
160
|
+
parentHeight: number;
|
|
161
|
+
}, {
|
|
162
|
+
uri: string;
|
|
163
|
+
depth?: number | undefined;
|
|
164
|
+
parentHeight?: number | undefined;
|
|
165
|
+
}>;
|
|
166
|
+
};
|
|
167
|
+
constructor(atpClient: AtpClient);
|
|
168
|
+
protected execute(params: {
|
|
169
|
+
uri: string;
|
|
170
|
+
depth?: number;
|
|
171
|
+
parentHeight?: number;
|
|
172
|
+
}): Promise<{
|
|
173
|
+
success: boolean;
|
|
174
|
+
thread: {
|
|
175
|
+
post: {
|
|
176
|
+
uri: string;
|
|
177
|
+
cid: string;
|
|
178
|
+
author: {
|
|
179
|
+
did: string;
|
|
180
|
+
handle: string;
|
|
181
|
+
displayName?: string;
|
|
182
|
+
avatar?: string;
|
|
183
|
+
};
|
|
184
|
+
text: string;
|
|
185
|
+
createdAt: string;
|
|
186
|
+
replyCount: number;
|
|
187
|
+
repostCount: number;
|
|
188
|
+
likeCount: number;
|
|
189
|
+
};
|
|
190
|
+
parent?: any;
|
|
191
|
+
replies?: any[];
|
|
192
|
+
};
|
|
193
|
+
}>;
|
|
194
|
+
}
|
|
195
|
+
export declare class GetCustomFeedTool extends BaseTool {
|
|
196
|
+
readonly schema: {
|
|
197
|
+
method: string;
|
|
198
|
+
description: string;
|
|
199
|
+
params: z.ZodObject<{
|
|
200
|
+
feedUri: z.ZodString;
|
|
201
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
202
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
203
|
+
}, "strip", z.ZodTypeAny, {
|
|
204
|
+
limit: number;
|
|
205
|
+
feedUri: string;
|
|
206
|
+
cursor?: string | undefined;
|
|
207
|
+
}, {
|
|
208
|
+
feedUri: string;
|
|
209
|
+
limit?: number | undefined;
|
|
210
|
+
cursor?: string | undefined;
|
|
211
|
+
}>;
|
|
212
|
+
};
|
|
213
|
+
constructor(atpClient: AtpClient);
|
|
214
|
+
protected execute(params: {
|
|
215
|
+
feedUri: string;
|
|
216
|
+
limit?: number;
|
|
217
|
+
cursor?: string;
|
|
218
|
+
}): Promise<{
|
|
219
|
+
success: boolean;
|
|
220
|
+
feed: {
|
|
221
|
+
uri: string;
|
|
222
|
+
displayName?: string;
|
|
223
|
+
description?: string;
|
|
224
|
+
creator: {
|
|
225
|
+
did: string;
|
|
226
|
+
handle: string;
|
|
227
|
+
displayName?: string;
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
posts: Array<{
|
|
231
|
+
uri: string;
|
|
232
|
+
cid: string;
|
|
233
|
+
author: {
|
|
234
|
+
did: string;
|
|
235
|
+
handle: string;
|
|
236
|
+
displayName?: string;
|
|
237
|
+
avatar?: string;
|
|
238
|
+
};
|
|
239
|
+
text: string;
|
|
240
|
+
createdAt: string;
|
|
241
|
+
replyCount: number;
|
|
242
|
+
repostCount: number;
|
|
243
|
+
likeCount: number;
|
|
244
|
+
isLiked: boolean;
|
|
245
|
+
isReposted: boolean;
|
|
246
|
+
}>;
|
|
247
|
+
cursor?: string;
|
|
248
|
+
}>;
|
|
249
|
+
}
|
|
250
|
+
//# sourceMappingURL=advanced-social-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"advanced-social-tools.d.ts","sourceRoot":"","sources":["../../../src/tools/implementations/advanced-social-tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAoC3D,qBAAa,cAAe,SAAQ,QAAQ;IAC1C,SAAgB,MAAM;;;;;;;;;;;;;;;;MAKpB;gBAEU,SAAS,EAAE,SAAS;cAIhB,OAAO,CAAC,MA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