@framers/agentos-ext-channel-twitter 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 +98 -0
- package/dist/TwitterChannelAdapter.d.ts +50 -0
- package/dist/TwitterChannelAdapter.d.ts.map +1 -0
- package/dist/TwitterChannelAdapter.js +88 -0
- package/dist/TwitterChannelAdapter.js.map +1 -0
- package/dist/TwitterService.d.ts +77 -0
- package/dist/TwitterService.d.ts.map +1 -0
- package/dist/TwitterService.js +219 -0
- package/dist/TwitterService.js.map +1 -0
- package/dist/index.d.ts +48 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +174 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/analytics.d.ts +30 -0
- package/dist/tools/analytics.d.ts.map +1 -0
- package/dist/tools/analytics.js +33 -0
- package/dist/tools/analytics.js.map +1 -0
- package/dist/tools/dm.d.ts +47 -0
- package/dist/tools/dm.d.ts.map +1 -0
- package/dist/tools/dm.js +45 -0
- package/dist/tools/dm.js.map +1 -0
- package/dist/tools/like.d.ts +35 -0
- package/dist/tools/like.d.ts.map +1 -0
- package/dist/tools/like.js +39 -0
- package/dist/tools/like.js.map +1 -0
- package/dist/tools/post.d.ts +48 -0
- package/dist/tools/post.d.ts.map +1 -0
- package/dist/tools/post.js +46 -0
- package/dist/tools/post.js.map +1 -0
- package/dist/tools/quote.d.ts +35 -0
- package/dist/tools/quote.d.ts.map +1 -0
- package/dist/tools/quote.js +34 -0
- package/dist/tools/quote.js.map +1 -0
- package/dist/tools/reply.d.ts +35 -0
- package/dist/tools/reply.d.ts.map +1 -0
- package/dist/tools/reply.js +34 -0
- package/dist/tools/reply.js.map +1 -0
- package/dist/tools/retweet.d.ts +35 -0
- package/dist/tools/retweet.d.ts.map +1 -0
- package/dist/tools/retweet.js +39 -0
- package/dist/tools/retweet.js.map +1 -0
- package/dist/tools/schedule.d.ts +41 -0
- package/dist/tools/schedule.d.ts.map +1 -0
- package/dist/tools/schedule.js +60 -0
- package/dist/tools/schedule.js.map +1 -0
- package/dist/tools/search.d.ts +41 -0
- package/dist/tools/search.d.ts.map +1 -0
- package/dist/tools/search.js +35 -0
- package/dist/tools/search.js.map +1 -0
- package/dist/tools/thread.d.ts +34 -0
- package/dist/tools/thread.d.ts.map +1 -0
- package/dist/tools/thread.js +38 -0
- package/dist/tools/thread.js.map +1 -0
- package/dist/tools/timeline.d.ts +29 -0
- package/dist/tools/timeline.d.ts.map +1 -0
- package/dist/tools/timeline.js +32 -0
- package/dist/tools/timeline.js.map +1 -0
- package/dist/tools/trending.d.ts +30 -0
- package/dist/tools/trending.d.ts.map +1 -0
- package/dist/tools/trending.js +32 -0
- package/dist/tools/trending.js.map +1 -0
- package/manifest.json +39 -0
- package/package.json +35 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { TwitterService } from '../TwitterService.js';
|
|
2
|
+
export declare class TwitterReplyTool {
|
|
3
|
+
private service;
|
|
4
|
+
readonly id = "twitterReply";
|
|
5
|
+
readonly name = "twitterReply";
|
|
6
|
+
readonly displayName = "Reply to Tweet";
|
|
7
|
+
readonly description = "Reply to an existing tweet.";
|
|
8
|
+
readonly category = "social";
|
|
9
|
+
readonly version = "0.1.0";
|
|
10
|
+
readonly hasSideEffects = true;
|
|
11
|
+
readonly inputSchema: {
|
|
12
|
+
type: "object";
|
|
13
|
+
properties: {
|
|
14
|
+
tweetId: {
|
|
15
|
+
type: string;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
text: {
|
|
19
|
+
type: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
required: string[];
|
|
24
|
+
};
|
|
25
|
+
constructor(service: TwitterService);
|
|
26
|
+
execute(args: {
|
|
27
|
+
tweetId: string;
|
|
28
|
+
text: string;
|
|
29
|
+
}): Promise<{
|
|
30
|
+
success: boolean;
|
|
31
|
+
data?: any;
|
|
32
|
+
error?: string;
|
|
33
|
+
}>;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=reply.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reply.d.ts","sourceRoot":"","sources":["../../src/tools/reply.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,qBAAa,gBAAgB;IAkBf,OAAO,CAAC,OAAO;IAjB3B,QAAQ,CAAC,EAAE,kBAAkB;IAC7B,QAAQ,CAAC,IAAI,kBAAkB;IAC/B,QAAQ,CAAC,WAAW,oBAAoB;IACxC,QAAQ,CAAC,WAAW,iCAAiC;IACrD,QAAQ,CAAC,QAAQ,YAAY;IAC7B,QAAQ,CAAC,OAAO,WAAW;IAC3B,QAAQ,CAAC,cAAc,QAAQ;IAE/B,QAAQ,CAAC,WAAW;;;;;;;;;;;;;MAOlB;gBAEkB,OAAO,EAAE,cAAc;IAErC,OAAO,CAAC,IAAI,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAQlH"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TwitterReplyTool = void 0;
|
|
4
|
+
class TwitterReplyTool {
|
|
5
|
+
constructor(service) {
|
|
6
|
+
this.service = service;
|
|
7
|
+
this.id = 'twitterReply';
|
|
8
|
+
this.name = 'twitterReply';
|
|
9
|
+
this.displayName = 'Reply to Tweet';
|
|
10
|
+
this.description = 'Reply to an existing tweet.';
|
|
11
|
+
this.category = 'social';
|
|
12
|
+
this.version = '0.1.0';
|
|
13
|
+
this.hasSideEffects = true;
|
|
14
|
+
this.inputSchema = {
|
|
15
|
+
type: 'object',
|
|
16
|
+
properties: {
|
|
17
|
+
tweetId: { type: 'string', description: 'ID of the tweet to reply to' },
|
|
18
|
+
text: { type: 'string', description: 'Reply text' },
|
|
19
|
+
},
|
|
20
|
+
required: ['tweetId', 'text'],
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
async execute(args) {
|
|
24
|
+
try {
|
|
25
|
+
const result = await this.service.postTweet({ text: args.text, replyToId: args.tweetId });
|
|
26
|
+
return { success: true, data: result };
|
|
27
|
+
}
|
|
28
|
+
catch (err) {
|
|
29
|
+
return { success: false, error: err.message };
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.TwitterReplyTool = TwitterReplyTool;
|
|
34
|
+
//# sourceMappingURL=reply.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reply.js","sourceRoot":"","sources":["../../src/tools/reply.ts"],"names":[],"mappings":";;;AAGA,MAAa,gBAAgB;IAkB3B,YAAoB,OAAuB;QAAvB,YAAO,GAAP,OAAO,CAAgB;QAjBlC,OAAE,GAAG,cAAc,CAAC;QACpB,SAAI,GAAG,cAAc,CAAC;QACtB,gBAAW,GAAG,gBAAgB,CAAC;QAC/B,gBAAW,GAAG,6BAA6B,CAAC;QAC5C,aAAQ,GAAG,QAAQ,CAAC;QACpB,YAAO,GAAG,OAAO,CAAC;QAClB,mBAAc,GAAG,IAAI,CAAC;QAEtB,gBAAW,GAAG;YACrB,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE;gBACV,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,6BAA6B,EAAE;gBACvE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE;aACpD;YACD,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC;SAC9B,CAAC;IAE4C,CAAC;IAE/C,KAAK,CAAC,OAAO,CAAC,IAAuC;QACnD,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;YAC1F,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;QACzC,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC;QAChD,CAAC;IACH,CAAC;CACF;AA5BD,4CA4BC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { TwitterService } from '../TwitterService.js';
|
|
2
|
+
export declare class TwitterRetweetTool {
|
|
3
|
+
private service;
|
|
4
|
+
readonly id = "twitterRetweet";
|
|
5
|
+
readonly name = "twitterRetweet";
|
|
6
|
+
readonly displayName = "Retweet";
|
|
7
|
+
readonly description = "Retweet or undo a retweet.";
|
|
8
|
+
readonly category = "social";
|
|
9
|
+
readonly version = "0.1.0";
|
|
10
|
+
readonly hasSideEffects = true;
|
|
11
|
+
readonly inputSchema: {
|
|
12
|
+
type: "object";
|
|
13
|
+
properties: {
|
|
14
|
+
tweetId: {
|
|
15
|
+
type: string;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
undo: {
|
|
19
|
+
type: string;
|
|
20
|
+
description: string;
|
|
21
|
+
default: boolean;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
required: string[];
|
|
25
|
+
};
|
|
26
|
+
constructor(service: TwitterService);
|
|
27
|
+
execute(args: {
|
|
28
|
+
tweetId: string;
|
|
29
|
+
undo?: boolean;
|
|
30
|
+
}): Promise<{
|
|
31
|
+
success: boolean;
|
|
32
|
+
error?: string;
|
|
33
|
+
}>;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=retweet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retweet.d.ts","sourceRoot":"","sources":["../../src/tools/retweet.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,qBAAa,kBAAkB;IAkBjB,OAAO,CAAC,OAAO;IAjB3B,QAAQ,CAAC,EAAE,oBAAoB;IAC/B,QAAQ,CAAC,IAAI,oBAAoB;IACjC,QAAQ,CAAC,WAAW,aAAa;IACjC,QAAQ,CAAC,WAAW,gCAAgC;IACpD,QAAQ,CAAC,QAAQ,YAAY;IAC7B,QAAQ,CAAC,OAAO,WAAW;IAC3B,QAAQ,CAAC,cAAc,QAAQ;IAE/B,QAAQ,CAAC,WAAW;;;;;;;;;;;;;;MAOlB;gBAEkB,OAAO,EAAE,cAAc;IAErC,OAAO,CAAC,IAAI,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAYxG"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TwitterRetweetTool = void 0;
|
|
4
|
+
class TwitterRetweetTool {
|
|
5
|
+
constructor(service) {
|
|
6
|
+
this.service = service;
|
|
7
|
+
this.id = 'twitterRetweet';
|
|
8
|
+
this.name = 'twitterRetweet';
|
|
9
|
+
this.displayName = 'Retweet';
|
|
10
|
+
this.description = 'Retweet or undo a retweet.';
|
|
11
|
+
this.category = 'social';
|
|
12
|
+
this.version = '0.1.0';
|
|
13
|
+
this.hasSideEffects = true;
|
|
14
|
+
this.inputSchema = {
|
|
15
|
+
type: 'object',
|
|
16
|
+
properties: {
|
|
17
|
+
tweetId: { type: 'string', description: 'ID of the tweet to retweet' },
|
|
18
|
+
undo: { type: 'boolean', description: 'Set to true to unretweet', default: false },
|
|
19
|
+
},
|
|
20
|
+
required: ['tweetId'],
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
async execute(args) {
|
|
24
|
+
try {
|
|
25
|
+
if (args.undo) {
|
|
26
|
+
await this.service.unretweet(args.tweetId);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
await this.service.retweet(args.tweetId);
|
|
30
|
+
}
|
|
31
|
+
return { success: true };
|
|
32
|
+
}
|
|
33
|
+
catch (err) {
|
|
34
|
+
return { success: false, error: err.message };
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.TwitterRetweetTool = TwitterRetweetTool;
|
|
39
|
+
//# sourceMappingURL=retweet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retweet.js","sourceRoot":"","sources":["../../src/tools/retweet.ts"],"names":[],"mappings":";;;AAGA,MAAa,kBAAkB;IAkB7B,YAAoB,OAAuB;QAAvB,YAAO,GAAP,OAAO,CAAgB;QAjBlC,OAAE,GAAG,gBAAgB,CAAC;QACtB,SAAI,GAAG,gBAAgB,CAAC;QACxB,gBAAW,GAAG,SAAS,CAAC;QACxB,gBAAW,GAAG,4BAA4B,CAAC;QAC3C,aAAQ,GAAG,QAAQ,CAAC;QACpB,YAAO,GAAG,OAAO,CAAC;QAClB,mBAAc,GAAG,IAAI,CAAC;QAEtB,gBAAW,GAAG;YACrB,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE;gBACV,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,4BAA4B,EAAE;gBACtE,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,0BAA0B,EAAE,OAAO,EAAE,KAAK,EAAE;aACnF;YACD,QAAQ,EAAE,CAAC,SAAS,CAAC;SACtB,CAAC;IAE4C,CAAC;IAE/C,KAAK,CAAC,OAAO,CAAC,IAAyC;QACrD,IAAI,CAAC;YACH,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;gBACd,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC7C,CAAC;iBAAM,CAAC;gBACN,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC3C,CAAC;YACD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QAC3B,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC;QAChD,CAAC;IACH,CAAC;CACF;AAhCD,gDAgCC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { TwitterService } from '../TwitterService.js';
|
|
2
|
+
export declare class TwitterScheduleTool {
|
|
3
|
+
private service;
|
|
4
|
+
readonly id = "twitterSchedule";
|
|
5
|
+
readonly name = "twitterSchedule";
|
|
6
|
+
readonly displayName = "Schedule Tweet";
|
|
7
|
+
readonly description = "Schedule a tweet for future posting. Stores the tweet and posts it at the specified time.";
|
|
8
|
+
readonly category = "social";
|
|
9
|
+
readonly version = "0.1.0";
|
|
10
|
+
readonly hasSideEffects = true;
|
|
11
|
+
readonly inputSchema: {
|
|
12
|
+
type: "object";
|
|
13
|
+
properties: {
|
|
14
|
+
text: {
|
|
15
|
+
type: string;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
scheduledAt: {
|
|
19
|
+
type: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
mediaPath: {
|
|
23
|
+
type: string;
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
required: string[];
|
|
28
|
+
};
|
|
29
|
+
private scheduledTweets;
|
|
30
|
+
constructor(service: TwitterService);
|
|
31
|
+
execute(args: {
|
|
32
|
+
text: string;
|
|
33
|
+
scheduledAt: string;
|
|
34
|
+
mediaPath?: string;
|
|
35
|
+
}): Promise<{
|
|
36
|
+
success: boolean;
|
|
37
|
+
data?: any;
|
|
38
|
+
error?: string;
|
|
39
|
+
}>;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=schedule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schedule.d.ts","sourceRoot":"","sources":["../../src/tools/schedule.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,qBAAa,mBAAmB;IAqBlB,OAAO,CAAC,OAAO;IApB3B,QAAQ,CAAC,EAAE,qBAAqB;IAChC,QAAQ,CAAC,IAAI,qBAAqB;IAClC,QAAQ,CAAC,WAAW,oBAAoB;IACxC,QAAQ,CAAC,WAAW,+FAA+F;IACnH,QAAQ,CAAC,QAAQ,YAAY;IAC7B,QAAQ,CAAC,OAAO,WAAW;IAC3B,QAAQ,CAAC,cAAc,QAAQ;IAE/B,QAAQ,CAAC,WAAW;;;;;;;;;;;;;;;;;MAQlB;IAEF,OAAO,CAAC,eAAe,CAAwF;gBAE3F,OAAO,EAAE,cAAc;IAErC,OAAO,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAiC1I"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TwitterScheduleTool = void 0;
|
|
4
|
+
class TwitterScheduleTool {
|
|
5
|
+
constructor(service) {
|
|
6
|
+
this.service = service;
|
|
7
|
+
this.id = 'twitterSchedule';
|
|
8
|
+
this.name = 'twitterSchedule';
|
|
9
|
+
this.displayName = 'Schedule Tweet';
|
|
10
|
+
this.description = 'Schedule a tweet for future posting. Stores the tweet and posts it at the specified time.';
|
|
11
|
+
this.category = 'social';
|
|
12
|
+
this.version = '0.1.0';
|
|
13
|
+
this.hasSideEffects = true;
|
|
14
|
+
this.inputSchema = {
|
|
15
|
+
type: 'object',
|
|
16
|
+
properties: {
|
|
17
|
+
text: { type: 'string', description: 'Tweet text' },
|
|
18
|
+
scheduledAt: { type: 'string', description: 'ISO 8601 timestamp for when to post' },
|
|
19
|
+
mediaPath: { type: 'string', description: 'Optional media file path' },
|
|
20
|
+
},
|
|
21
|
+
required: ['text', 'scheduledAt'],
|
|
22
|
+
};
|
|
23
|
+
this.scheduledTweets = new Map();
|
|
24
|
+
}
|
|
25
|
+
async execute(args) {
|
|
26
|
+
try {
|
|
27
|
+
const delay = new Date(args.scheduledAt).getTime() - Date.now();
|
|
28
|
+
if (delay <= 0) {
|
|
29
|
+
// Post immediately if time has passed
|
|
30
|
+
const result = await this.service.postTweet({ text: args.text });
|
|
31
|
+
return { success: true, data: { ...result, scheduled: false } };
|
|
32
|
+
}
|
|
33
|
+
const id = `sched_${Date.now()}_${Math.random().toString(36).slice(2, 8)}`;
|
|
34
|
+
const timer = setTimeout(async () => {
|
|
35
|
+
try {
|
|
36
|
+
const mediaIds = [];
|
|
37
|
+
if (args.mediaPath) {
|
|
38
|
+
const mid = await this.service.uploadMedia(args.mediaPath);
|
|
39
|
+
mediaIds.push(mid);
|
|
40
|
+
}
|
|
41
|
+
await this.service.postTweet({
|
|
42
|
+
text: args.text,
|
|
43
|
+
mediaIds: mediaIds.length ? mediaIds : undefined,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
// Scheduled tweet failed — logged silently
|
|
48
|
+
}
|
|
49
|
+
this.scheduledTweets.delete(id);
|
|
50
|
+
}, delay);
|
|
51
|
+
this.scheduledTweets.set(id, { text: args.text, scheduledAt: args.scheduledAt, timer });
|
|
52
|
+
return { success: true, data: { scheduleId: id, scheduledAt: args.scheduledAt, scheduled: true } };
|
|
53
|
+
}
|
|
54
|
+
catch (err) {
|
|
55
|
+
return { success: false, error: err.message };
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.TwitterScheduleTool = TwitterScheduleTool;
|
|
60
|
+
//# sourceMappingURL=schedule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schedule.js","sourceRoot":"","sources":["../../src/tools/schedule.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { TwitterService } from '../TwitterService.js';
|
|
2
|
+
export declare class TwitterSearchTool {
|
|
3
|
+
private service;
|
|
4
|
+
readonly id = "twitterSearch";
|
|
5
|
+
readonly name = "twitterSearch";
|
|
6
|
+
readonly displayName = "Search Tweets";
|
|
7
|
+
readonly description = "Search Twitter for tweets matching a query. Supports filters and sorting.";
|
|
8
|
+
readonly category = "social";
|
|
9
|
+
readonly version = "0.1.0";
|
|
10
|
+
readonly hasSideEffects = false;
|
|
11
|
+
readonly inputSchema: {
|
|
12
|
+
type: "object";
|
|
13
|
+
properties: {
|
|
14
|
+
query: {
|
|
15
|
+
type: string;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
maxResults: {
|
|
19
|
+
type: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
sortOrder: {
|
|
23
|
+
type: string;
|
|
24
|
+
enum: string[];
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
required: string[];
|
|
29
|
+
};
|
|
30
|
+
constructor(service: TwitterService);
|
|
31
|
+
execute(args: {
|
|
32
|
+
query: string;
|
|
33
|
+
maxResults?: number;
|
|
34
|
+
sortOrder?: 'recency' | 'relevancy';
|
|
35
|
+
}): Promise<{
|
|
36
|
+
success: boolean;
|
|
37
|
+
data?: any;
|
|
38
|
+
error?: string;
|
|
39
|
+
}>;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/tools/search.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,qBAAa,iBAAiB;IAmBhB,OAAO,CAAC,OAAO;IAlB3B,QAAQ,CAAC,EAAE,mBAAmB;IAC9B,QAAQ,CAAC,IAAI,mBAAmB;IAChC,QAAQ,CAAC,WAAW,mBAAmB;IACvC,QAAQ,CAAC,WAAW,+EAA+E;IACnG,QAAQ,CAAC,QAAQ,YAAY;IAC7B,QAAQ,CAAC,OAAO,WAAW;IAC3B,QAAQ,CAAC,cAAc,SAAS;IAEhC,QAAQ,CAAC,WAAW;;;;;;;;;;;;;;;;;;MAQlB;gBAEkB,OAAO,EAAE,cAAc;IAErC,OAAO,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,SAAS,GAAG,WAAW,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAQ5J"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TwitterSearchTool = void 0;
|
|
4
|
+
class TwitterSearchTool {
|
|
5
|
+
constructor(service) {
|
|
6
|
+
this.service = service;
|
|
7
|
+
this.id = 'twitterSearch';
|
|
8
|
+
this.name = 'twitterSearch';
|
|
9
|
+
this.displayName = 'Search Tweets';
|
|
10
|
+
this.description = 'Search Twitter for tweets matching a query. Supports filters and sorting.';
|
|
11
|
+
this.category = 'social';
|
|
12
|
+
this.version = '0.1.0';
|
|
13
|
+
this.hasSideEffects = false;
|
|
14
|
+
this.inputSchema = {
|
|
15
|
+
type: 'object',
|
|
16
|
+
properties: {
|
|
17
|
+
query: { type: 'string', description: 'Search query (supports Twitter search operators)' },
|
|
18
|
+
maxResults: { type: 'number', description: 'Max tweets to return (default 10, max 100)' },
|
|
19
|
+
sortOrder: { type: 'string', enum: ['recency', 'relevancy'], description: 'Sort order' },
|
|
20
|
+
},
|
|
21
|
+
required: ['query'],
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
async execute(args) {
|
|
25
|
+
try {
|
|
26
|
+
const results = await this.service.search(args);
|
|
27
|
+
return { success: true, data: results };
|
|
28
|
+
}
|
|
29
|
+
catch (err) {
|
|
30
|
+
return { success: false, error: err.message };
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.TwitterSearchTool = TwitterSearchTool;
|
|
35
|
+
//# sourceMappingURL=search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../src/tools/search.ts"],"names":[],"mappings":";;;AAGA,MAAa,iBAAiB;IAmB5B,YAAoB,OAAuB;QAAvB,YAAO,GAAP,OAAO,CAAgB;QAlBlC,OAAE,GAAG,eAAe,CAAC;QACrB,SAAI,GAAG,eAAe,CAAC;QACvB,gBAAW,GAAG,eAAe,CAAC;QAC9B,gBAAW,GAAG,2EAA2E,CAAC;QAC1F,aAAQ,GAAG,QAAQ,CAAC;QACpB,YAAO,GAAG,OAAO,CAAC;QAClB,mBAAc,GAAG,KAAK,CAAC;QAEvB,gBAAW,GAAG;YACrB,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE;gBACV,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,kDAAkD,EAAE;gBAC1F,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,4CAA4C,EAAE;gBACzF,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,SAAS,EAAE,WAAW,CAAC,EAAE,WAAW,EAAE,YAAY,EAAE;aACzF;YACD,QAAQ,EAAE,CAAC,OAAO,CAAC;SACpB,CAAC;IAE4C,CAAC;IAE/C,KAAK,CAAC,OAAO,CAAC,IAAiF;QAC7F,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAChD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;QAC1C,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC;QAChD,CAAC;IACH,CAAC;CACF;AA7BD,8CA6BC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { TwitterService } from '../TwitterService.js';
|
|
2
|
+
export declare class TwitterThreadTool {
|
|
3
|
+
private service;
|
|
4
|
+
readonly id = "twitterThread";
|
|
5
|
+
readonly name = "twitterThread";
|
|
6
|
+
readonly displayName = "Post Thread";
|
|
7
|
+
readonly description = "Post a multi-tweet thread. Each item in the tweets array becomes a sequential reply.";
|
|
8
|
+
readonly category = "social";
|
|
9
|
+
readonly version = "0.1.0";
|
|
10
|
+
readonly hasSideEffects = true;
|
|
11
|
+
readonly inputSchema: {
|
|
12
|
+
type: "object";
|
|
13
|
+
properties: {
|
|
14
|
+
tweets: {
|
|
15
|
+
type: string;
|
|
16
|
+
items: {
|
|
17
|
+
type: string;
|
|
18
|
+
};
|
|
19
|
+
description: string;
|
|
20
|
+
minItems: number;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
required: string[];
|
|
24
|
+
};
|
|
25
|
+
constructor(service: TwitterService);
|
|
26
|
+
execute(args: {
|
|
27
|
+
tweets: string[];
|
|
28
|
+
}): Promise<{
|
|
29
|
+
success: boolean;
|
|
30
|
+
data?: any;
|
|
31
|
+
error?: string;
|
|
32
|
+
}>;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=thread.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thread.d.ts","sourceRoot":"","sources":["../../src/tools/thread.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,qBAAa,iBAAiB;IAsBhB,OAAO,CAAC,OAAO;IArB3B,QAAQ,CAAC,EAAE,mBAAmB;IAC9B,QAAQ,CAAC,IAAI,mBAAmB;IAChC,QAAQ,CAAC,WAAW,iBAAiB;IACrC,QAAQ,CAAC,WAAW,0FAA0F;IAC9G,QAAQ,CAAC,QAAQ,YAAY;IAC7B,QAAQ,CAAC,OAAO,WAAW;IAC3B,QAAQ,CAAC,cAAc,QAAQ;IAE/B,QAAQ,CAAC,WAAW;;;;;;;;;;;;;MAWlB;gBAEkB,OAAO,EAAE,cAAc;IAErC,OAAO,CAAC,IAAI,EAAE;QAAE,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAQrG"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TwitterThreadTool = void 0;
|
|
4
|
+
class TwitterThreadTool {
|
|
5
|
+
constructor(service) {
|
|
6
|
+
this.service = service;
|
|
7
|
+
this.id = 'twitterThread';
|
|
8
|
+
this.name = 'twitterThread';
|
|
9
|
+
this.displayName = 'Post Thread';
|
|
10
|
+
this.description = 'Post a multi-tweet thread. Each item in the tweets array becomes a sequential reply.';
|
|
11
|
+
this.category = 'social';
|
|
12
|
+
this.version = '0.1.0';
|
|
13
|
+
this.hasSideEffects = true;
|
|
14
|
+
this.inputSchema = {
|
|
15
|
+
type: 'object',
|
|
16
|
+
properties: {
|
|
17
|
+
tweets: {
|
|
18
|
+
type: 'array',
|
|
19
|
+
items: { type: 'string' },
|
|
20
|
+
description: 'Array of tweet texts (each max 280 characters). Posted as a sequential thread.',
|
|
21
|
+
minItems: 2,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
required: ['tweets'],
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
async execute(args) {
|
|
28
|
+
try {
|
|
29
|
+
const results = await this.service.postThread(args.tweets);
|
|
30
|
+
return { success: true, data: { threadLength: results.length, tweets: results } };
|
|
31
|
+
}
|
|
32
|
+
catch (err) {
|
|
33
|
+
return { success: false, error: err.message };
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.TwitterThreadTool = TwitterThreadTool;
|
|
38
|
+
//# sourceMappingURL=thread.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thread.js","sourceRoot":"","sources":["../../src/tools/thread.ts"],"names":[],"mappings":";;;AAGA,MAAa,iBAAiB;IAsB5B,YAAoB,OAAuB;QAAvB,YAAO,GAAP,OAAO,CAAgB;QArBlC,OAAE,GAAG,eAAe,CAAC;QACrB,SAAI,GAAG,eAAe,CAAC;QACvB,gBAAW,GAAG,aAAa,CAAC;QAC5B,gBAAW,GAAG,sFAAsF,CAAC;QACrG,aAAQ,GAAG,QAAQ,CAAC;QACpB,YAAO,GAAG,OAAO,CAAC;QAClB,mBAAc,GAAG,IAAI,CAAC;QAEtB,gBAAW,GAAG;YACrB,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACzB,WAAW,EAAE,gFAAgF;oBAC7F,QAAQ,EAAE,CAAC;iBACZ;aACF;YACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;SACrB,CAAC;IAE4C,CAAC;IAE/C,KAAK,CAAC,OAAO,CAAC,IAA0B;QACtC,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAC3D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,YAAY,EAAE,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,CAAC;QACpF,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC;QAChD,CAAC;IACH,CAAC;CACF;AAhCD,8CAgCC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { TwitterService } from '../TwitterService.js';
|
|
2
|
+
export declare class TwitterTimelineTool {
|
|
3
|
+
private service;
|
|
4
|
+
readonly id = "twitterTimeline";
|
|
5
|
+
readonly name = "twitterTimeline";
|
|
6
|
+
readonly displayName = "Get Timeline";
|
|
7
|
+
readonly description = "Get the authenticated user's home timeline.";
|
|
8
|
+
readonly category = "social";
|
|
9
|
+
readonly version = "0.1.0";
|
|
10
|
+
readonly hasSideEffects = false;
|
|
11
|
+
readonly inputSchema: {
|
|
12
|
+
type: "object";
|
|
13
|
+
properties: {
|
|
14
|
+
maxResults: {
|
|
15
|
+
type: string;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
constructor(service: TwitterService);
|
|
21
|
+
execute(args: {
|
|
22
|
+
maxResults?: number;
|
|
23
|
+
}): Promise<{
|
|
24
|
+
success: boolean;
|
|
25
|
+
data?: any;
|
|
26
|
+
error?: string;
|
|
27
|
+
}>;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=timeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeline.d.ts","sourceRoot":"","sources":["../../src/tools/timeline.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,qBAAa,mBAAmB;IAgBlB,OAAO,CAAC,OAAO;IAf3B,QAAQ,CAAC,EAAE,qBAAqB;IAChC,QAAQ,CAAC,IAAI,qBAAqB;IAClC,QAAQ,CAAC,WAAW,kBAAkB;IACtC,QAAQ,CAAC,WAAW,iDAAkD;IACtE,QAAQ,CAAC,QAAQ,YAAY;IAC7B,QAAQ,CAAC,OAAO,WAAW;IAC3B,QAAQ,CAAC,cAAc,SAAS;IAEhC,QAAQ,CAAC,WAAW;;;;;;;;MAKlB;gBAEkB,OAAO,EAAE,cAAc;IAErC,OAAO,CAAC,IAAI,EAAE;QAAE,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAQxG"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TwitterTimelineTool = void 0;
|
|
4
|
+
class TwitterTimelineTool {
|
|
5
|
+
constructor(service) {
|
|
6
|
+
this.service = service;
|
|
7
|
+
this.id = 'twitterTimeline';
|
|
8
|
+
this.name = 'twitterTimeline';
|
|
9
|
+
this.displayName = 'Get Timeline';
|
|
10
|
+
this.description = 'Get the authenticated user\'s home timeline.';
|
|
11
|
+
this.category = 'social';
|
|
12
|
+
this.version = '0.1.0';
|
|
13
|
+
this.hasSideEffects = false;
|
|
14
|
+
this.inputSchema = {
|
|
15
|
+
type: 'object',
|
|
16
|
+
properties: {
|
|
17
|
+
maxResults: { type: 'number', description: 'Max tweets to return (default 20, max 100)' },
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
async execute(args) {
|
|
22
|
+
try {
|
|
23
|
+
const tweets = await this.service.getTimeline(args.maxResults);
|
|
24
|
+
return { success: true, data: tweets };
|
|
25
|
+
}
|
|
26
|
+
catch (err) {
|
|
27
|
+
return { success: false, error: err.message };
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.TwitterTimelineTool = TwitterTimelineTool;
|
|
32
|
+
//# sourceMappingURL=timeline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeline.js","sourceRoot":"","sources":["../../src/tools/timeline.ts"],"names":[],"mappings":";;;AAGA,MAAa,mBAAmB;IAgB9B,YAAoB,OAAuB;QAAvB,YAAO,GAAP,OAAO,CAAgB;QAflC,OAAE,GAAG,iBAAiB,CAAC;QACvB,SAAI,GAAG,iBAAiB,CAAC;QACzB,gBAAW,GAAG,cAAc,CAAC;QAC7B,gBAAW,GAAG,8CAA8C,CAAC;QAC7D,aAAQ,GAAG,QAAQ,CAAC;QACpB,YAAO,GAAG,OAAO,CAAC;QAClB,mBAAc,GAAG,KAAK,CAAC;QAEvB,gBAAW,GAAG;YACrB,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE;gBACV,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,4CAA4C,EAAE;aAC1F;SACF,CAAC;IAE4C,CAAC;IAE/C,KAAK,CAAC,OAAO,CAAC,IAA6B;QACzC,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YAC/D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;QACzC,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC;QAChD,CAAC;IACH,CAAC;CACF;AA1BD,kDA0BC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { TwitterService } from '../TwitterService.js';
|
|
2
|
+
export declare class TwitterTrendingTool {
|
|
3
|
+
private service;
|
|
4
|
+
readonly id = "twitterTrending";
|
|
5
|
+
readonly name = "twitterTrending";
|
|
6
|
+
readonly displayName = "Get Trending Topics";
|
|
7
|
+
readonly description = "Get trending topics on Twitter for a specific location (WOEID). Default is worldwide (1).";
|
|
8
|
+
readonly category = "social";
|
|
9
|
+
readonly version = "0.1.0";
|
|
10
|
+
readonly hasSideEffects = false;
|
|
11
|
+
readonly inputSchema: {
|
|
12
|
+
type: "object";
|
|
13
|
+
properties: {
|
|
14
|
+
woeid: {
|
|
15
|
+
type: string;
|
|
16
|
+
description: string;
|
|
17
|
+
default: number;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
constructor(service: TwitterService);
|
|
22
|
+
execute(args: {
|
|
23
|
+
woeid?: number;
|
|
24
|
+
}): Promise<{
|
|
25
|
+
success: boolean;
|
|
26
|
+
data?: any;
|
|
27
|
+
error?: string;
|
|
28
|
+
}>;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=trending.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trending.d.ts","sourceRoot":"","sources":["../../src/tools/trending.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,qBAAa,mBAAmB;IAgBlB,OAAO,CAAC,OAAO;IAf3B,QAAQ,CAAC,EAAE,qBAAqB;IAChC,QAAQ,CAAC,IAAI,qBAAqB;IAClC,QAAQ,CAAC,WAAW,yBAAyB;IAC7C,QAAQ,CAAC,WAAW,+FAA+F;IACnH,QAAQ,CAAC,QAAQ,YAAY;IAC7B,QAAQ,CAAC,OAAO,WAAW;IAC3B,QAAQ,CAAC,cAAc,SAAS;IAEhC,QAAQ,CAAC,WAAW;;;;;;;;;MAKlB;gBAEkB,OAAO,EAAE,cAAc;IAErC,OAAO,CAAC,IAAI,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAQnG"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TwitterTrendingTool = void 0;
|
|
4
|
+
class TwitterTrendingTool {
|
|
5
|
+
constructor(service) {
|
|
6
|
+
this.service = service;
|
|
7
|
+
this.id = 'twitterTrending';
|
|
8
|
+
this.name = 'twitterTrending';
|
|
9
|
+
this.displayName = 'Get Trending Topics';
|
|
10
|
+
this.description = 'Get trending topics on Twitter for a specific location (WOEID). Default is worldwide (1).';
|
|
11
|
+
this.category = 'social';
|
|
12
|
+
this.version = '0.1.0';
|
|
13
|
+
this.hasSideEffects = false;
|
|
14
|
+
this.inputSchema = {
|
|
15
|
+
type: 'object',
|
|
16
|
+
properties: {
|
|
17
|
+
woeid: { type: 'number', description: 'Yahoo WOEID for location (1 = worldwide, 23424977 = US)', default: 1 },
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
async execute(args) {
|
|
22
|
+
try {
|
|
23
|
+
const trends = await this.service.getTrending(args.woeid);
|
|
24
|
+
return { success: true, data: trends };
|
|
25
|
+
}
|
|
26
|
+
catch (err) {
|
|
27
|
+
return { success: false, error: err.message };
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.TwitterTrendingTool = TwitterTrendingTool;
|
|
32
|
+
//# sourceMappingURL=trending.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trending.js","sourceRoot":"","sources":["../../src/tools/trending.ts"],"names":[],"mappings":";;;AAGA,MAAa,mBAAmB;IAgB9B,YAAoB,OAAuB;QAAvB,YAAO,GAAP,OAAO,CAAgB;QAflC,OAAE,GAAG,iBAAiB,CAAC;QACvB,SAAI,GAAG,iBAAiB,CAAC;QACzB,gBAAW,GAAG,qBAAqB,CAAC;QACpC,gBAAW,GAAG,2FAA2F,CAAC;QAC1G,aAAQ,GAAG,QAAQ,CAAC;QACpB,YAAO,GAAG,OAAO,CAAC;QAClB,mBAAc,GAAG,KAAK,CAAC;QAEvB,gBAAW,GAAG;YACrB,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE;gBACV,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,yDAAyD,EAAE,OAAO,EAAE,CAAC,EAAE;aAC9G;SACF,CAAC;IAE4C,CAAC;IAE/C,KAAK,CAAC,OAAO,CAAC,IAAwB;QACpC,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC1D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;QACzC,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC;QAChD,CAAC;IACH,CAAC;CACF;AA1BD,kDA0BC"}
|
package/manifest.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://agentos.sh/schemas/extension-manifest-v1.json",
|
|
3
|
+
"id": "com.framers.channels.twitter",
|
|
4
|
+
"name": "Twitter/X Channel Extension",
|
|
5
|
+
"version": "0.1.0",
|
|
6
|
+
"description": "Bidirectional Twitter/X integration — post tweets, reply, quote, thread, search trends, DM, and track engagement via Twitter API v2.",
|
|
7
|
+
"categories": ["channel", "social"],
|
|
8
|
+
"platforms": ["twitter"],
|
|
9
|
+
"sdk": "twitter-api-v2",
|
|
10
|
+
"extensions": [
|
|
11
|
+
{ "kind": "tool", "id": "twitterPost", "displayName": "Post Tweet" },
|
|
12
|
+
{ "kind": "tool", "id": "twitterReply", "displayName": "Reply to Tweet" },
|
|
13
|
+
{ "kind": "tool", "id": "twitterQuote", "displayName": "Quote Tweet" },
|
|
14
|
+
{ "kind": "tool", "id": "twitterLike", "displayName": "Like Tweet" },
|
|
15
|
+
{ "kind": "tool", "id": "twitterRetweet", "displayName": "Retweet" },
|
|
16
|
+
{ "kind": "tool", "id": "twitterSearch", "displayName": "Search Tweets" },
|
|
17
|
+
{ "kind": "tool", "id": "twitterTrending", "displayName": "Get Trending Topics" },
|
|
18
|
+
{ "kind": "tool", "id": "twitterTimeline", "displayName": "Get Timeline" },
|
|
19
|
+
{ "kind": "tool", "id": "twitterDm", "displayName": "Direct Messages" },
|
|
20
|
+
{ "kind": "tool", "id": "twitterAnalytics", "displayName": "Engagement Analytics" },
|
|
21
|
+
{ "kind": "tool", "id": "twitterSchedule", "displayName": "Schedule Tweet" },
|
|
22
|
+
{ "kind": "tool", "id": "twitterThread", "displayName": "Post Thread" },
|
|
23
|
+
{ "kind": "messaging-channel", "id": "twitterChannel", "displayName": "Twitter Channel Adapter" }
|
|
24
|
+
],
|
|
25
|
+
"requiredSecrets": ["twitter.bearerToken"],
|
|
26
|
+
"optionalSecrets": ["twitter.apiKey", "twitter.apiSecret", "twitter.accessToken", "twitter.accessSecret"],
|
|
27
|
+
"features": [
|
|
28
|
+
"Post tweets with text, images, video, and polls",
|
|
29
|
+
"Reply to tweets and quote tweets",
|
|
30
|
+
"Post multi-tweet threads",
|
|
31
|
+
"Like, retweet, and undo engagement",
|
|
32
|
+
"Search tweets by query with filters",
|
|
33
|
+
"Get trending topics by location",
|
|
34
|
+
"Read home timeline",
|
|
35
|
+
"Send and read direct messages",
|
|
36
|
+
"Track engagement analytics (likes, retweets, impressions)",
|
|
37
|
+
"Schedule tweets for future posting"
|
|
38
|
+
]
|
|
39
|
+
}
|