@jclvsh/dropspace 2.13.0 → 2.17.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.
|
@@ -3,7 +3,7 @@ export function registerConnectionCommands(program, client) {
|
|
|
3
3
|
const connections = program.command("connections").alias("c").description("manage platform connections");
|
|
4
4
|
connections
|
|
5
5
|
.command("list")
|
|
6
|
-
.description("list connected social media accounts")
|
|
6
|
+
.description("list connected social media accounts (each row has an entity_id — null for your primary account on a platform, set for additional accounts; use `{platform}:{entity_id}` in --user-accounts to target one)")
|
|
7
7
|
.option("-p, --page <n>", "page number", "1")
|
|
8
8
|
.option("-s, --page-size <n>", "items per page (max 100)", "50")
|
|
9
9
|
.action(async (opts) => {
|
|
@@ -20,4 +20,20 @@ export function registerConnectionCommands(program, client) {
|
|
|
20
20
|
handleError(error);
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
|
+
connections
|
|
24
|
+
.command("disconnect <platform>")
|
|
25
|
+
.description("disconnect a platform, or a single account with --account-id")
|
|
26
|
+
.option("--account-id <id>", "disconnect only this account (its entity_id from `connections list`) instead of the whole platform")
|
|
27
|
+
.action(async (platform, opts) => {
|
|
28
|
+
try {
|
|
29
|
+
const path = opts.accountId
|
|
30
|
+
? `/connections/${platform}?account_id=${encodeURIComponent(opts.accountId)}`
|
|
31
|
+
: `/connections/${platform}`;
|
|
32
|
+
await client.delete(path);
|
|
33
|
+
formatOutput({ message: `${platform} disconnected` }, getFormat(program.opts()));
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
handleError(error);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
23
39
|
}
|
|
@@ -34,7 +34,7 @@ export function registerLaunchCommands(program, client) {
|
|
|
34
34
|
.option("--platform-contents <json>", 'per-platform content as JSON string. reddit supports metadata.subreddits (string[], max 10, no r/ prefix — one post per subreddit) and metadata.first_comment (max 1500). e.g. \'{"reddit":{"title":"...","content":"...","metadata":{"subreddits":["SideProject"],"first_comment":"..."}}}\'')
|
|
35
35
|
.option("--custom-content <text>", "single content string for all platforms")
|
|
36
36
|
.option("--reddit-title <title>", "reddit title (with custom-content)")
|
|
37
|
-
.option("--user-accounts <json>",
|
|
37
|
+
.option("--user-accounts <json>", 'platform→token_id map as JSON. simple key = primary account ("instagram"); composite key targets a specific account when you have several ("instagram:<account_id>", ids from `connections list`) — works for instagram/tiktok/youtube/twitter/reddit')
|
|
38
38
|
.option("--publish", "immediately publish after creation")
|
|
39
39
|
.option("--wait", "wait for publishing to complete (requires --publish)")
|
|
40
40
|
.action(async (opts) => {
|
|
@@ -100,7 +100,7 @@ export function registerLaunchCommands(program, client) {
|
|
|
100
100
|
.option("--persona <id>", "persona ID (empty to clear)")
|
|
101
101
|
.option("--platform-contents <json>", 'per-platform content as JSON string. reddit supports metadata.subreddits (string[], max 10, no r/ prefix — one post per subreddit) and metadata.first_comment (max 1500). e.g. \'{"reddit":{"title":"...","content":"...","metadata":{"subreddits":["SideProject"],"first_comment":"..."}}}\'')
|
|
102
102
|
.option("--dropspace-platforms <list>", "official dropspace account platforms", parseList)
|
|
103
|
-
.option("--user-accounts <json>",
|
|
103
|
+
.option("--user-accounts <json>", 'platform→token_id map as JSON. simple key = primary account ("instagram"); composite key targets a specific account when you have several ("instagram:<account_id>", ids from `connections list`) — works for instagram/tiktok/youtube/twitter/reddit')
|
|
104
104
|
.option("--media-mode <mode>", "media mode: images or video")
|
|
105
105
|
.action(async (id, opts) => {
|
|
106
106
|
try {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export function registerConnectionTools(server, client) {
|
|
3
|
-
server.tool("list_connections",
|
|
3
|
+
server.tool("list_connections", 'list your connected social media accounts. each row has a "platform" and an "entity_id" (null for your primary account on that platform, set for additional accounts). to target a specific account in create_launch when you have more than one on instagram/tiktok/youtube, pass "{platform}:{entity_id}" as a user_platform_accounts key', {
|
|
4
4
|
page: z.number().int().positive().optional().describe("page number (default: 1)"),
|
|
5
5
|
page_size: z.number().int().min(1).max(100).optional().describe("items per page (default: 50, max: 100)"),
|
|
6
6
|
}, async ({ page, page_size }) => {
|
package/dist/tools/launches.js
CHANGED
|
@@ -102,11 +102,11 @@ export function registerLaunchTools(server, client) {
|
|
|
102
102
|
user_platform_accounts: z
|
|
103
103
|
.record(z.string(), z.string())
|
|
104
104
|
.optional()
|
|
105
|
-
.describe('map of platform key to token_id (UUID).
|
|
105
|
+
.describe('map of platform key to token_id (UUID). a simple key targets your primary/only account: "twitter", "reddit", "instagram", "tiktok", "youtube". to target a SPECIFIC account when you have more than one on the same platform, use a composite key: Instagram/TikTok/YouTube/Twitter/Reddit use "instagram:<account_id>" / "tiktok:<account_id>" / "youtube:<account_id>" / "twitter:<account_id>" / "reddit:<account_id>" where <account_id> is the account entity_id from list_connections; LinkedIn uses "linkedin:personal" or "linkedin:organization:<org_id>"; Facebook uses "facebook:page:<page_id>". multiple keys allowed (e.g. post to two Instagram accounts at once). for Reddit, each targeted account runs its own subreddit fan-out'),
|
|
106
106
|
platform_contents: z
|
|
107
107
|
.record(z.string(), z.record(z.string(), z.unknown()))
|
|
108
108
|
.optional()
|
|
109
|
-
.describe('per-platform content — each value needs "content" (string). Reddit also requires "title" (max 300) and supports "metadata": { "subreddits": string[] (max 10, names without the r/ prefix — posts the launch once per subreddit, each tracked and retryable on its own; omit to post to the default community), "first_comment": string (max 1500 — posted as a comment under each reddit post once it goes live) }. each subreddit has its own rules: many restrict or ban promotional posts and posting where the account has no history gets filtered, so target a few genuinely relevant subreddits rather than blasting. Twitter supports "thread" (string[], max 6, each ≤280 or ≤25,000 for X Premium) instead of "content". TikTok supports "tiktok_settings": { "publish_mode"?: "direct"|"draft" (default "direct"; "draft" uploads to the TikTok inbox to finish and publish in-app), "privacy_level": "PUBLIC_TO_EVERYONE"|"FOLLOWER_OF_CREATOR"|"MUTUAL_FOLLOW_FRIENDS"|"SELF_ONLY" (required before publish in direct mode; not required for draft), "allow_comments"?, "allow_duet"?, "allow_stitch"?, "is_commercial"?, "is_your_brand"?, "is_branded_content"?, "auto_add_music"? (booleans, direct mode) }. YouTube requires video and supports "title" (max 100 chars). character limits: Twitter 280/tweet (25,000 for X Premium), LinkedIn 3000, Instagram 2200, Reddit 3000, Facebook 3000, TikTok 4000, YouTube 5000 (description). X Premium status is auto-detected from the connected account. mutually exclusive with custom_content'),
|
|
109
|
+
.describe('per-platform content — each value needs "content" (string). Reddit also requires "title" (max 300) and supports "metadata": { "subreddits": string[] (max 10, names without the r/ prefix — posts the launch once per subreddit, each tracked and retryable on its own; omit to post to the default community), "first_comment": string (max 1500 — posted as a comment under each reddit post once it goes live) }. for multi-account reddit, each connected account can target its own subreddits via "reddit:<account_id>" content keys (falls back to the base "reddit" block); a subreddit is posted by at most one of your accounts per launch (first wins, others skipped as SUBREDDIT_ALREADY_TARGETED). each subreddit has its own rules: many restrict or ban promotional posts and posting where the account has no history gets filtered, so target a few genuinely relevant subreddits rather than blasting. Twitter supports "thread" (string[], max 6, each ≤280 or ≤25,000 for X Premium) instead of "content". TikTok supports "tiktok_settings": { "publish_mode"?: "direct"|"draft" (default "direct"; "draft" uploads to the TikTok inbox to finish and publish in-app), "privacy_level": "PUBLIC_TO_EVERYONE"|"FOLLOWER_OF_CREATOR"|"MUTUAL_FOLLOW_FRIENDS"|"SELF_ONLY" (required before publish in direct mode; not required for draft), "allow_comments"?, "allow_duet"?, "allow_stitch"?, "is_commercial"?, "is_your_brand"?, "is_branded_content"?, "auto_add_music"? (booleans, direct mode) }. YouTube requires video and supports "title" (max 100 chars). character limits: Twitter 280/tweet (25,000 for X Premium), LinkedIn 3000, Instagram 2200, Reddit 3000, Facebook 3000, TikTok 4000, YouTube 5000 (description). X Premium status is auto-detected from the connected account. mutually exclusive with custom_content'),
|
|
110
110
|
custom_content: z
|
|
111
111
|
.union([z.string().min(1), z.array(z.string()).min(1).max(6)])
|
|
112
112
|
.optional()
|
|
@@ -225,7 +225,7 @@ export function registerLaunchTools(server, client) {
|
|
|
225
225
|
user_platform_accounts: z
|
|
226
226
|
.record(z.string(), z.string())
|
|
227
227
|
.optional()
|
|
228
|
-
.describe('map of platform key to token_id (UUID).
|
|
228
|
+
.describe('map of platform key to token_id (UUID). a simple key targets your primary/only account: "twitter", "reddit", "instagram", "tiktok", "youtube". to target a SPECIFIC account when you have more than one on the same platform, use a composite key: Instagram/TikTok/YouTube/Twitter/Reddit use "instagram:<account_id>" / "tiktok:<account_id>" / "youtube:<account_id>" / "twitter:<account_id>" / "reddit:<account_id>" where <account_id> is the account entity_id from list_connections; LinkedIn uses "linkedin:personal" or "linkedin:organization:<org_id>"; Facebook uses "facebook:page:<page_id>". multiple keys allowed (e.g. post to two Instagram accounts at once). for Reddit, each targeted account runs its own subreddit fan-out'),
|
|
229
229
|
media: z
|
|
230
230
|
.array(inlineMediaItemSchema)
|
|
231
231
|
.min(1)
|
package/dist/tools/webhooks.js
CHANGED