@framers/agentos-ext-channel-tiktok 0.1.2 → 0.1.4
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 +120 -0
- package/manifest.json +1 -1
- package/package.json +3 -2
package/README.md
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# TikTok channel
|
|
2
|
+
|
|
3
|
+
This pack gives an agent video publishing, content search, trends, analytics and engagement through TikTok API for Business using `axios`.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @framers/agentos-ext-channel-tiktok
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Peer dependency: `@framers/agentos` `>=0.10.40`.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { AgentOS } from '@framers/agentos';
|
|
17
|
+
|
|
18
|
+
const agentos = await AgentOS.create({
|
|
19
|
+
extensionManifest: {
|
|
20
|
+
packs: [
|
|
21
|
+
{
|
|
22
|
+
package: '@framers/agentos-ext-channel-tiktok',
|
|
23
|
+
options: { accessToken: process.env.TIKTOK_ACCESS_TOKEN },
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Configuration
|
|
31
|
+
|
|
32
|
+
| Option | Secret id | Environment variable | Required | Default |
|
|
33
|
+
| --- | --- | --- | --- | --- |
|
|
34
|
+
| `accessToken` | `tiktok.accessToken` | Variable named by `accessTokenEnv`, then `TIKTOK_ACCESS_TOKEN`, then `TIKTOK_TOKEN` | Yes | None |
|
|
35
|
+
| `accessTokenEnv` | None | None | No | `TIKTOK_ACCESS_TOKEN` |
|
|
36
|
+
| `username` | `tiktok.username` | None | No | None |
|
|
37
|
+
| `password` | `tiktok.password` | None | No | None |
|
|
38
|
+
| `priority` | None | None | No | `50` |
|
|
39
|
+
| `secrets` | `tiktok.accessToken`, `tiktok.username`, `tiktok.password` | None | No | None |
|
|
40
|
+
|
|
41
|
+
Secrets are read from `options.secrets`. Direct credentials take precedence over secrets. The first environment lookup uses `accessTokenEnv`, which defaults to `TIKTOK_ACCESS_TOKEN`.
|
|
42
|
+
|
|
43
|
+
## Tools
|
|
44
|
+
|
|
45
|
+
| Tool | What it does |
|
|
46
|
+
| --- | --- |
|
|
47
|
+
| `tiktokUpload` | Upload a video with caption, hashtags and privacy settings. |
|
|
48
|
+
| `tiktokTrending` | Get trending sounds and hashtags. |
|
|
49
|
+
| `tiktokSearch` | Search videos or creators by keyword. |
|
|
50
|
+
| `tiktokAnalytics` | Get video or creator performance metrics. |
|
|
51
|
+
| `tiktokEngage` | Like or comment on a video. |
|
|
52
|
+
| `tiktokDiscover` | Browse recommended videos from the For You page. |
|
|
53
|
+
|
|
54
|
+
### `tiktokUpload`
|
|
55
|
+
|
|
56
|
+
| Parameter | Type | Required | Description |
|
|
57
|
+
| --- | --- | --- | --- |
|
|
58
|
+
| `videoUrl` | string | Yes | URL of the video to upload |
|
|
59
|
+
| `caption` | string | Yes | Video caption |
|
|
60
|
+
| `hashtags` | string[] | No | Hashtags to append to caption |
|
|
61
|
+
| `privacyLevel` | string: `PUBLIC_TO_EVERYONE`, `MUTUAL_FOLLOW_FRIENDS`, `FOLLOWER_OF_CREATOR`, `SELF_ONLY` | No | Privacy level (default: `PUBLIC_TO_EVERYONE`) |
|
|
62
|
+
| `disableComment` | boolean | No | Disable comments on this video |
|
|
63
|
+
| `disableDuet` | boolean | No | Disable duets for this video |
|
|
64
|
+
| `disableStitch` | boolean | No | Disable stitches for this video |
|
|
65
|
+
| `coverTimestampMs` | number | No | Timestamp in ms for cover image |
|
|
66
|
+
|
|
67
|
+
### `tiktokTrending`
|
|
68
|
+
|
|
69
|
+
| Parameter | Type | Required | Description |
|
|
70
|
+
| --- | --- | --- | --- |
|
|
71
|
+
| `type` | string: `hashtags`, `sounds`, `both` | No | Type of trending content to retrieve (default: `both`) |
|
|
72
|
+
| `maxResults` | number | No | Max results per category (default: `20`, max: `100`) |
|
|
73
|
+
|
|
74
|
+
### `tiktokSearch`
|
|
75
|
+
|
|
76
|
+
| Parameter | Type | Required | Description |
|
|
77
|
+
| --- | --- | --- | --- |
|
|
78
|
+
| `query` | string | Yes | Search query |
|
|
79
|
+
| `type` | string: `video`, `user` | No | Search type: video or user (default: `video`) |
|
|
80
|
+
| `maxResults` | number | No | Max results to return (default: `10`, max: `100`) |
|
|
81
|
+
| `cursor` | number | No | Pagination cursor for next page |
|
|
82
|
+
|
|
83
|
+
### `tiktokAnalytics`
|
|
84
|
+
|
|
85
|
+
| Parameter | Type | Required | Description |
|
|
86
|
+
| --- | --- | --- | --- |
|
|
87
|
+
| `type` | string: `video`, `creator` | Yes | Whether to get analytics for a specific video or the creator account |
|
|
88
|
+
| `videoId` | string | No | Video ID (required when `type` is `video`) |
|
|
89
|
+
|
|
90
|
+
### `tiktokEngage`
|
|
91
|
+
|
|
92
|
+
| Parameter | Type | Required | Description |
|
|
93
|
+
| --- | --- | --- | --- |
|
|
94
|
+
| `action` | string: `like`, `comment` | Yes | Engagement action to perform |
|
|
95
|
+
| `videoId` | string | Yes | Video ID to engage with |
|
|
96
|
+
| `text` | string | No | Comment text (required for comment action) |
|
|
97
|
+
|
|
98
|
+
### `tiktokDiscover`
|
|
99
|
+
|
|
100
|
+
| Parameter | Type | Required | Description |
|
|
101
|
+
| --- | --- | --- | --- |
|
|
102
|
+
| `maxResults` | number | No | Max videos to retrieve (default: `20`, max: `20`) |
|
|
103
|
+
|
|
104
|
+
## Channel adapter
|
|
105
|
+
|
|
106
|
+
The adapter registers platform `tiktok`. Sending publishes a video or reel URL, using its caption or a text block as a fallback. It merges reel hashtags with `platformOptions.hashtags` and reads `platformOptions.privacyLevel`. It ignores `conversationId` and throws if no video or reel block is present.
|
|
107
|
+
|
|
108
|
+
Activation initializes the HTTP service. Connection status follows the service's running state. The adapter stores event handlers but emits no inbound events, and typing indicators do nothing.
|
|
109
|
+
|
|
110
|
+
## Notes
|
|
111
|
+
|
|
112
|
+
Creating the pack throws when no access token resolves. Uploads publish videos, and engagement calls like videos or post comments. Uploads pull video content from a URL. Privacy defaults to `PUBLIC_TO_EVERYONE`; comment, duet and stitch disabling default to `false`.
|
|
113
|
+
|
|
114
|
+
`username` and `password` are passed into the service configuration but are not used for authentication. Tool errors return `success: false` with the error message. Video analytics require `videoId`, and comments require `text`, although those fields are optional in their schemas.
|
|
115
|
+
|
|
116
|
+
HTTP requests have a `60000` ms timeout. Search and trending requests are capped at `100` results; discovery is capped at `20`.
|
|
117
|
+
|
|
118
|
+
## License
|
|
119
|
+
|
|
120
|
+
Apache-2.0
|
package/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://agentos.sh/schemas/extension-manifest-v1.json",
|
|
3
3
|
"id": "com.framers.channels.tiktok",
|
|
4
4
|
"name": "TikTok Channel Extension",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.4",
|
|
6
6
|
"description": "TikTok integration — upload videos, discover trending sounds and hashtags, search content, track analytics, and engage with the community via TikTok API for Business.",
|
|
7
7
|
"categories": ["channel", "social"],
|
|
8
8
|
"platforms": ["tiktok"],
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@framers/agentos-ext-channel-tiktok",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "TikTok channel adapter for AgentOS — upload videos, discover trends, search content, track analytics, and engage via TikTok API for Business.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
5
6
|
"main": "dist/index.js",
|
|
6
7
|
"types": "dist/index.d.ts",
|
|
7
8
|
"files": [
|
|
@@ -18,7 +19,7 @@
|
|
|
18
19
|
"@types/node": "^20.0.0",
|
|
19
20
|
"typescript": "^5.0.0",
|
|
20
21
|
"vitest": "^3.2.7",
|
|
21
|
-
"@framers/agentos": "^0.
|
|
22
|
+
"@framers/agentos": "^0.13.47"
|
|
22
23
|
},
|
|
23
24
|
"engines": {
|
|
24
25
|
"node": ">=22"
|