posterly-mcp-server 0.47.0 → 0.48.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.
@@ -28,6 +28,31 @@ export const instagramSettingsSchema = z.object({
28
28
  reel_thumb_offset: z.number().nonnegative().optional(),
29
29
  is_ai_generated: z.boolean().optional().describe('Label the parent Instagram media container as AI-generated. For carousels, set on the parent only.'),
30
30
  audio_id: z.string().optional().describe('Licensed Instagram audio ID for Reels. Meta-linked Facebook Login accounts only.'),
31
+ caption_addon: z.union([
32
+ z.object({
33
+ type: z.enum(['none', 'poll', 'comment_prompt']).optional(),
34
+ kind: z.enum(['none', 'poll', 'comment_prompt']).optional(),
35
+ options: z.array(z.string()).max(4).optional(),
36
+ extended_duration: z.boolean().optional(),
37
+ poll_attachment: z.object({
38
+ option_a: z.string().optional(),
39
+ option_b: z.string().optional(),
40
+ option_c: z.string().optional(),
41
+ option_d: z.string().optional(),
42
+ options: z.array(z.string()).max(4).optional(),
43
+ }).optional(),
44
+ }),
45
+ z.null(),
46
+ ]).optional().describe('Optional Instagram caption add-on. type is none, poll, or comment_prompt. A poll needs 2 to 4 options of 1 to 25 characters (an emoji counts as one) and the caption is the question. A comment prompt uses the caption as the prompt. Facebook Login only. Not available on Stories. At most one add-on per post. Pass null or type none to clear it.'),
47
+ poll_attachment: z.object({
48
+ option_a: z.string().optional(),
49
+ option_b: z.string().optional(),
50
+ option_c: z.string().optional(),
51
+ option_d: z.string().optional(),
52
+ options: z.array(z.string()).max(4).optional(),
53
+ }).optional().describe('Instagram poll choices. option_a and option_b are required, option_c and option_d are optional, and option_d requires option_c. Mutually exclusive with a comment prompt. The caption is the question. Serialised JSON must be 200 characters or fewer.'),
54
+ is_comment_prompt_used: z.boolean().optional().describe('Set true to attach an Instagram comment prompt. The caption is the prompt. Mutually exclusive with a poll. Facebook Login only. Not available on Stories.'),
55
+ is_poll_duration_extended: z.boolean().optional().describe('Set true only together with a poll, to request the longer Instagram poll duration.'),
31
56
  });
32
57
  export const platformSettingsSchema = z.object({
33
58
  __type: z.string().optional(),
@@ -120,6 +145,17 @@ export const platformSettingsSchema = z.object({
120
145
  paid_partnership: z.boolean().optional(), // X paid partnership
121
146
  is_ai_generated: z.boolean().optional(),
122
147
  audio_id: z.string().optional(),
148
+ caption_addon: z.union([
149
+ z.object({
150
+ type: z.enum(['none', 'poll', 'comment_prompt']).optional(),
151
+ options: z.array(z.string()).max(4).optional(),
152
+ extended_duration: z.boolean().optional(),
153
+ }),
154
+ z.null(),
155
+ ]).optional(),
156
+ poll_attachment: z.record(z.string(), z.unknown()).optional(),
157
+ is_comment_prompt_used: z.boolean().optional(),
158
+ is_poll_duration_extended: z.boolean().optional(),
123
159
  // tags (z.array of strings) also serve as Bluesky hidden discovery tags
124
160
  // AI-content disclosure (TikTok is_aigc, X made_with_ai, YouTube containsSyntheticMedia, Pinterest ai_disclosures)
125
161
  ai_generated: z.boolean().optional(),
@@ -286,7 +322,7 @@ export const createPostTool = {
286
322
  'Provide either account_id OR username+platform to identify the account. If scheduled_at is omitted, the post publishes immediately. If workspace_id is omitted, the server resolves one from the social account, falling back to the caller\'s default (personal) workspace - pass workspace_id explicitly if the user has more than one workspace.\n\n' +
287
323
  'MEDIA URLS: Posterly storage URLs are used as-is. Third-party HTTP(S) media URLs are copied into posterly storage before the post is saved, so API-created posts do not later fail on expired signed URLs. Short-lived signed URLs must still be live when this tool runs. You can also call `upload_media` with `url` first if you want to upload once and reuse the returned posterly URL across posts.\n\n' +
288
324
  'THREADS: Pass `thread_posts` (an array of 2+ strings) to schedule a multi-post thread on X (Twitter) or Threads (Meta). The first entry is the lead post; the rest are published as replies in the same chain. X entries are capped at 280 characters each (4000 for verified, 25000 for organization accounts); Threads entries are capped at 500 characters each. When `thread_posts` is set, `caption` is ignored.\n\n' +
289
- 'PLATFORM SETTINGS: Pass `platform_settings` for composer-equivalent controls: Facebook story/reel/backgrounds, YouTube title/privacy/thumbnail/brandPartner, LinkedIn document titles/mentions/polls/content_call_to_action_label (including BUY_NOW and SHOP_NOW), TikTok direct-post privacy/toggles/commercial disclosure, Pinterest board/title/link/product_tags, GBP event/offer/CTA/recurrence, X reply settings/polls/paid_partnership, Threads reply controls/text attachments/ghost posts/spoilers/reply approvals/GIPHY, Telegram polls/buttons/video cover/live photo, Slack markdown/blocks, Mastodon visibility/quote/poll (media+poll allowed), and Instagram feed/story/reel/carousel/native media tags/collaborators/first comments/trial Reels/is_ai_generated/audio_id. For Instagram, @username in caption is only a caption mention; `user_tags` creates native media tags and `collaborators` sends co-author invitations only when the selected Meta-linked account reports those capabilities. Call `list_platforms` with `view: "schema"` and the account ID first. `instagram_settings` remains as a backwards-compatible alias.\n\n' +
325
+ 'PLATFORM SETTINGS: Pass `platform_settings` for composer-equivalent controls: Facebook story/reel/backgrounds, YouTube title/privacy/thumbnail/brandPartner, LinkedIn document titles/mentions/polls/content_call_to_action_label (including BUY_NOW and SHOP_NOW), TikTok direct-post privacy/toggles/commercial disclosure, Pinterest board/title/link/product_tags, GBP event/offer/CTA/recurrence, X reply settings/polls/paid_partnership, Threads reply controls/text attachments/ghost posts/spoilers/reply approvals/GIPHY, Telegram polls/buttons/video cover/live photo, Slack markdown/blocks, Mastodon visibility/quote/poll (media+poll allowed), and Instagram feed/story/reel/carousel/native media tags/collaborators/first comments/trial Reels/is_ai_generated/audio_id/caption add-ons. Instagram caption add-ons (`caption_addon`, or `poll_attachment` / `is_comment_prompt_used`) need a Facebook Login account, a non-empty caption, and a feed photo, Reel, or carousel parent. Stories are rejected. A poll and a comment prompt cannot be combined. For Instagram, @username in caption is only a caption mention; `user_tags` creates native media tags and `collaborators` sends co-author invitations only when the selected Meta-linked account reports those capabilities. Call `list_platforms` with `view: "schema"` and the account ID first. `instagram_settings` remains as a backwards-compatible alias.\n\n' +
290
326
  'TIKTOK MEDIA: TikTok supports a single video or a photo slideshow of 1 to 35 images, never multiple videos. Image media auto-detects as a slideshow, so you usually do not set post_type or media_type for photos and every image is posted. Pass `platform_settings.media_type: "PHOTO"` to force a slideshow explicitly.',
291
327
  inputSchema: createPostInputSchema,
292
328
  async execute(client, input) {
@@ -328,6 +364,18 @@ export const createPostTool = {
328
364
  if (instagram_settings?.first_comment) {
329
365
  lines.push('• Instagram first comment: yes');
330
366
  }
367
+ const captionAddonType = instagram_settings?.caption_addon && typeof instagram_settings.caption_addon === 'object'
368
+ ? instagram_settings.caption_addon.type || instagram_settings.caption_addon.kind
369
+ : null;
370
+ if (captionAddonType && captionAddonType !== 'none') {
371
+ lines.push(`• Instagram caption add-on: ${captionAddonType}`);
372
+ }
373
+ else if (instagram_settings?.is_comment_prompt_used) {
374
+ lines.push('• Instagram caption add-on: comment_prompt');
375
+ }
376
+ else if (instagram_settings?.poll_attachment) {
377
+ lines.push('• Instagram caption add-on: poll');
378
+ }
331
379
  if (platform_settings) {
332
380
  lines.push('• Platform settings: yes');
333
381
  }
@@ -68,6 +68,76 @@ export declare const createPostsBatchTool: {
68
68
  reel_thumb_offset: z.ZodOptional<z.ZodNumber>;
69
69
  is_ai_generated: z.ZodOptional<z.ZodBoolean>;
70
70
  audio_id: z.ZodOptional<z.ZodString>;
71
+ caption_addon: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
72
+ type: z.ZodOptional<z.ZodEnum<["none", "poll", "comment_prompt"]>>;
73
+ kind: z.ZodOptional<z.ZodEnum<["none", "poll", "comment_prompt"]>>;
74
+ options: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
75
+ extended_duration: z.ZodOptional<z.ZodBoolean>;
76
+ poll_attachment: z.ZodOptional<z.ZodObject<{
77
+ option_a: z.ZodOptional<z.ZodString>;
78
+ option_b: z.ZodOptional<z.ZodString>;
79
+ option_c: z.ZodOptional<z.ZodString>;
80
+ option_d: z.ZodOptional<z.ZodString>;
81
+ options: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
82
+ }, "strip", z.ZodTypeAny, {
83
+ options?: string[] | undefined;
84
+ option_a?: string | undefined;
85
+ option_b?: string | undefined;
86
+ option_c?: string | undefined;
87
+ option_d?: string | undefined;
88
+ }, {
89
+ options?: string[] | undefined;
90
+ option_a?: string | undefined;
91
+ option_b?: string | undefined;
92
+ option_c?: string | undefined;
93
+ option_d?: string | undefined;
94
+ }>>;
95
+ }, "strip", z.ZodTypeAny, {
96
+ type?: "none" | "poll" | "comment_prompt" | undefined;
97
+ options?: string[] | undefined;
98
+ kind?: "none" | "poll" | "comment_prompt" | undefined;
99
+ extended_duration?: boolean | undefined;
100
+ poll_attachment?: {
101
+ options?: string[] | undefined;
102
+ option_a?: string | undefined;
103
+ option_b?: string | undefined;
104
+ option_c?: string | undefined;
105
+ option_d?: string | undefined;
106
+ } | undefined;
107
+ }, {
108
+ type?: "none" | "poll" | "comment_prompt" | undefined;
109
+ options?: string[] | undefined;
110
+ kind?: "none" | "poll" | "comment_prompt" | undefined;
111
+ extended_duration?: boolean | undefined;
112
+ poll_attachment?: {
113
+ options?: string[] | undefined;
114
+ option_a?: string | undefined;
115
+ option_b?: string | undefined;
116
+ option_c?: string | undefined;
117
+ option_d?: string | undefined;
118
+ } | undefined;
119
+ }>, z.ZodNull]>>;
120
+ poll_attachment: z.ZodOptional<z.ZodObject<{
121
+ option_a: z.ZodOptional<z.ZodString>;
122
+ option_b: z.ZodOptional<z.ZodString>;
123
+ option_c: z.ZodOptional<z.ZodString>;
124
+ option_d: z.ZodOptional<z.ZodString>;
125
+ options: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
126
+ }, "strip", z.ZodTypeAny, {
127
+ options?: string[] | undefined;
128
+ option_a?: string | undefined;
129
+ option_b?: string | undefined;
130
+ option_c?: string | undefined;
131
+ option_d?: string | undefined;
132
+ }, {
133
+ options?: string[] | undefined;
134
+ option_a?: string | undefined;
135
+ option_b?: string | undefined;
136
+ option_c?: string | undefined;
137
+ option_d?: string | undefined;
138
+ }>>;
139
+ is_comment_prompt_used: z.ZodOptional<z.ZodBoolean>;
140
+ is_poll_duration_extended: z.ZodOptional<z.ZodBoolean>;
71
141
  }, "strip", z.ZodTypeAny, {
72
142
  post_type?: "post" | "feed" | "story" | "reel" | "carousel" | undefined;
73
143
  reel_cover_url?: string | undefined;
@@ -95,6 +165,28 @@ export declare const createPostsBatchTool: {
95
165
  }[] | undefined;
96
166
  is_ai_generated?: boolean | undefined;
97
167
  audio_id?: string | undefined;
168
+ poll_attachment?: {
169
+ options?: string[] | undefined;
170
+ option_a?: string | undefined;
171
+ option_b?: string | undefined;
172
+ option_c?: string | undefined;
173
+ option_d?: string | undefined;
174
+ } | undefined;
175
+ caption_addon?: {
176
+ type?: "none" | "poll" | "comment_prompt" | undefined;
177
+ options?: string[] | undefined;
178
+ kind?: "none" | "poll" | "comment_prompt" | undefined;
179
+ extended_duration?: boolean | undefined;
180
+ poll_attachment?: {
181
+ options?: string[] | undefined;
182
+ option_a?: string | undefined;
183
+ option_b?: string | undefined;
184
+ option_c?: string | undefined;
185
+ option_d?: string | undefined;
186
+ } | undefined;
187
+ } | null | undefined;
188
+ is_comment_prompt_used?: boolean | undefined;
189
+ is_poll_duration_extended?: boolean | undefined;
98
190
  }, {
99
191
  post_type?: "post" | "feed" | "story" | "reel" | "carousel" | undefined;
100
192
  reel_cover_url?: string | undefined;
@@ -122,6 +214,28 @@ export declare const createPostsBatchTool: {
122
214
  }[] | undefined;
123
215
  is_ai_generated?: boolean | undefined;
124
216
  audio_id?: string | undefined;
217
+ poll_attachment?: {
218
+ options?: string[] | undefined;
219
+ option_a?: string | undefined;
220
+ option_b?: string | undefined;
221
+ option_c?: string | undefined;
222
+ option_d?: string | undefined;
223
+ } | undefined;
224
+ caption_addon?: {
225
+ type?: "none" | "poll" | "comment_prompt" | undefined;
226
+ options?: string[] | undefined;
227
+ kind?: "none" | "poll" | "comment_prompt" | undefined;
228
+ extended_duration?: boolean | undefined;
229
+ poll_attachment?: {
230
+ options?: string[] | undefined;
231
+ option_a?: string | undefined;
232
+ option_b?: string | undefined;
233
+ option_c?: string | undefined;
234
+ option_d?: string | undefined;
235
+ } | undefined;
236
+ } | null | undefined;
237
+ is_comment_prompt_used?: boolean | undefined;
238
+ is_poll_duration_extended?: boolean | undefined;
125
239
  }>>;
126
240
  platform_settings: z.ZodOptional<z.ZodObject<{
127
241
  __type: z.ZodOptional<z.ZodString>;
@@ -245,6 +359,22 @@ export declare const createPostsBatchTool: {
245
359
  paid_partnership: z.ZodOptional<z.ZodBoolean>;
246
360
  is_ai_generated: z.ZodOptional<z.ZodBoolean>;
247
361
  audio_id: z.ZodOptional<z.ZodString>;
362
+ caption_addon: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
363
+ type: z.ZodOptional<z.ZodEnum<["none", "poll", "comment_prompt"]>>;
364
+ options: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
365
+ extended_duration: z.ZodOptional<z.ZodBoolean>;
366
+ }, "strip", z.ZodTypeAny, {
367
+ type?: "none" | "poll" | "comment_prompt" | undefined;
368
+ options?: string[] | undefined;
369
+ extended_duration?: boolean | undefined;
370
+ }, {
371
+ type?: "none" | "poll" | "comment_prompt" | undefined;
372
+ options?: string[] | undefined;
373
+ extended_duration?: boolean | undefined;
374
+ }>, z.ZodNull]>>;
375
+ poll_attachment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
376
+ is_comment_prompt_used: z.ZodOptional<z.ZodBoolean>;
377
+ is_poll_duration_extended: z.ZodOptional<z.ZodBoolean>;
248
378
  ai_generated: z.ZodOptional<z.ZodBoolean>;
249
379
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
250
380
  __type: z.ZodOptional<z.ZodString>;
@@ -368,6 +498,22 @@ export declare const createPostsBatchTool: {
368
498
  paid_partnership: z.ZodOptional<z.ZodBoolean>;
369
499
  is_ai_generated: z.ZodOptional<z.ZodBoolean>;
370
500
  audio_id: z.ZodOptional<z.ZodString>;
501
+ caption_addon: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
502
+ type: z.ZodOptional<z.ZodEnum<["none", "poll", "comment_prompt"]>>;
503
+ options: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
504
+ extended_duration: z.ZodOptional<z.ZodBoolean>;
505
+ }, "strip", z.ZodTypeAny, {
506
+ type?: "none" | "poll" | "comment_prompt" | undefined;
507
+ options?: string[] | undefined;
508
+ extended_duration?: boolean | undefined;
509
+ }, {
510
+ type?: "none" | "poll" | "comment_prompt" | undefined;
511
+ options?: string[] | undefined;
512
+ extended_duration?: boolean | undefined;
513
+ }>, z.ZodNull]>>;
514
+ poll_attachment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
515
+ is_comment_prompt_used: z.ZodOptional<z.ZodBoolean>;
516
+ is_poll_duration_extended: z.ZodOptional<z.ZodBoolean>;
371
517
  ai_generated: z.ZodOptional<z.ZodBoolean>;
372
518
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
373
519
  __type: z.ZodOptional<z.ZodString>;
@@ -491,6 +637,22 @@ export declare const createPostsBatchTool: {
491
637
  paid_partnership: z.ZodOptional<z.ZodBoolean>;
492
638
  is_ai_generated: z.ZodOptional<z.ZodBoolean>;
493
639
  audio_id: z.ZodOptional<z.ZodString>;
640
+ caption_addon: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
641
+ type: z.ZodOptional<z.ZodEnum<["none", "poll", "comment_prompt"]>>;
642
+ options: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
643
+ extended_duration: z.ZodOptional<z.ZodBoolean>;
644
+ }, "strip", z.ZodTypeAny, {
645
+ type?: "none" | "poll" | "comment_prompt" | undefined;
646
+ options?: string[] | undefined;
647
+ extended_duration?: boolean | undefined;
648
+ }, {
649
+ type?: "none" | "poll" | "comment_prompt" | undefined;
650
+ options?: string[] | undefined;
651
+ extended_duration?: boolean | undefined;
652
+ }>, z.ZodNull]>>;
653
+ poll_attachment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
654
+ is_comment_prompt_used: z.ZodOptional<z.ZodBoolean>;
655
+ is_poll_duration_extended: z.ZodOptional<z.ZodBoolean>;
494
656
  ai_generated: z.ZodOptional<z.ZodBoolean>;
495
657
  }, z.ZodTypeAny, "passthrough">>>;
496
658
  workspace_id: z.ZodOptional<z.ZodString>;
@@ -532,6 +694,28 @@ export declare const createPostsBatchTool: {
532
694
  }[] | undefined;
533
695
  is_ai_generated?: boolean | undefined;
534
696
  audio_id?: string | undefined;
697
+ poll_attachment?: {
698
+ options?: string[] | undefined;
699
+ option_a?: string | undefined;
700
+ option_b?: string | undefined;
701
+ option_c?: string | undefined;
702
+ option_d?: string | undefined;
703
+ } | undefined;
704
+ caption_addon?: {
705
+ type?: "none" | "poll" | "comment_prompt" | undefined;
706
+ options?: string[] | undefined;
707
+ kind?: "none" | "poll" | "comment_prompt" | undefined;
708
+ extended_duration?: boolean | undefined;
709
+ poll_attachment?: {
710
+ options?: string[] | undefined;
711
+ option_a?: string | undefined;
712
+ option_b?: string | undefined;
713
+ option_c?: string | undefined;
714
+ option_d?: string | undefined;
715
+ } | undefined;
716
+ } | null | undefined;
717
+ is_comment_prompt_used?: boolean | undefined;
718
+ is_poll_duration_extended?: boolean | undefined;
535
719
  } | undefined;
536
720
  platform_settings?: z.objectOutputType<{
537
721
  __type: z.ZodOptional<z.ZodString>;
@@ -655,6 +839,22 @@ export declare const createPostsBatchTool: {
655
839
  paid_partnership: z.ZodOptional<z.ZodBoolean>;
656
840
  is_ai_generated: z.ZodOptional<z.ZodBoolean>;
657
841
  audio_id: z.ZodOptional<z.ZodString>;
842
+ caption_addon: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
843
+ type: z.ZodOptional<z.ZodEnum<["none", "poll", "comment_prompt"]>>;
844
+ options: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
845
+ extended_duration: z.ZodOptional<z.ZodBoolean>;
846
+ }, "strip", z.ZodTypeAny, {
847
+ type?: "none" | "poll" | "comment_prompt" | undefined;
848
+ options?: string[] | undefined;
849
+ extended_duration?: boolean | undefined;
850
+ }, {
851
+ type?: "none" | "poll" | "comment_prompt" | undefined;
852
+ options?: string[] | undefined;
853
+ extended_duration?: boolean | undefined;
854
+ }>, z.ZodNull]>>;
855
+ poll_attachment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
856
+ is_comment_prompt_used: z.ZodOptional<z.ZodBoolean>;
857
+ is_poll_duration_extended: z.ZodOptional<z.ZodBoolean>;
658
858
  ai_generated: z.ZodOptional<z.ZodBoolean>;
659
859
  }, z.ZodTypeAny, "passthrough"> | undefined;
660
860
  }, {
@@ -695,6 +895,28 @@ export declare const createPostsBatchTool: {
695
895
  }[] | undefined;
696
896
  is_ai_generated?: boolean | undefined;
697
897
  audio_id?: string | undefined;
898
+ poll_attachment?: {
899
+ options?: string[] | undefined;
900
+ option_a?: string | undefined;
901
+ option_b?: string | undefined;
902
+ option_c?: string | undefined;
903
+ option_d?: string | undefined;
904
+ } | undefined;
905
+ caption_addon?: {
906
+ type?: "none" | "poll" | "comment_prompt" | undefined;
907
+ options?: string[] | undefined;
908
+ kind?: "none" | "poll" | "comment_prompt" | undefined;
909
+ extended_duration?: boolean | undefined;
910
+ poll_attachment?: {
911
+ options?: string[] | undefined;
912
+ option_a?: string | undefined;
913
+ option_b?: string | undefined;
914
+ option_c?: string | undefined;
915
+ option_d?: string | undefined;
916
+ } | undefined;
917
+ } | null | undefined;
918
+ is_comment_prompt_used?: boolean | undefined;
919
+ is_poll_duration_extended?: boolean | undefined;
698
920
  } | undefined;
699
921
  platform_settings?: z.objectInputType<{
700
922
  __type: z.ZodOptional<z.ZodString>;
@@ -818,6 +1040,22 @@ export declare const createPostsBatchTool: {
818
1040
  paid_partnership: z.ZodOptional<z.ZodBoolean>;
819
1041
  is_ai_generated: z.ZodOptional<z.ZodBoolean>;
820
1042
  audio_id: z.ZodOptional<z.ZodString>;
1043
+ caption_addon: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
1044
+ type: z.ZodOptional<z.ZodEnum<["none", "poll", "comment_prompt"]>>;
1045
+ options: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1046
+ extended_duration: z.ZodOptional<z.ZodBoolean>;
1047
+ }, "strip", z.ZodTypeAny, {
1048
+ type?: "none" | "poll" | "comment_prompt" | undefined;
1049
+ options?: string[] | undefined;
1050
+ extended_duration?: boolean | undefined;
1051
+ }, {
1052
+ type?: "none" | "poll" | "comment_prompt" | undefined;
1053
+ options?: string[] | undefined;
1054
+ extended_duration?: boolean | undefined;
1055
+ }>, z.ZodNull]>>;
1056
+ poll_attachment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1057
+ is_comment_prompt_used: z.ZodOptional<z.ZodBoolean>;
1058
+ is_poll_duration_extended: z.ZodOptional<z.ZodBoolean>;
821
1059
  ai_generated: z.ZodOptional<z.ZodBoolean>;
822
1060
  }, z.ZodTypeAny, "passthrough"> | undefined;
823
1061
  }>, "many">;
@@ -862,6 +1100,28 @@ export declare const createPostsBatchTool: {
862
1100
  }[] | undefined;
863
1101
  is_ai_generated?: boolean | undefined;
864
1102
  audio_id?: string | undefined;
1103
+ poll_attachment?: {
1104
+ options?: string[] | undefined;
1105
+ option_a?: string | undefined;
1106
+ option_b?: string | undefined;
1107
+ option_c?: string | undefined;
1108
+ option_d?: string | undefined;
1109
+ } | undefined;
1110
+ caption_addon?: {
1111
+ type?: "none" | "poll" | "comment_prompt" | undefined;
1112
+ options?: string[] | undefined;
1113
+ kind?: "none" | "poll" | "comment_prompt" | undefined;
1114
+ extended_duration?: boolean | undefined;
1115
+ poll_attachment?: {
1116
+ options?: string[] | undefined;
1117
+ option_a?: string | undefined;
1118
+ option_b?: string | undefined;
1119
+ option_c?: string | undefined;
1120
+ option_d?: string | undefined;
1121
+ } | undefined;
1122
+ } | null | undefined;
1123
+ is_comment_prompt_used?: boolean | undefined;
1124
+ is_poll_duration_extended?: boolean | undefined;
865
1125
  } | undefined;
866
1126
  platform_settings?: z.objectOutputType<{
867
1127
  __type: z.ZodOptional<z.ZodString>;
@@ -985,6 +1245,22 @@ export declare const createPostsBatchTool: {
985
1245
  paid_partnership: z.ZodOptional<z.ZodBoolean>;
986
1246
  is_ai_generated: z.ZodOptional<z.ZodBoolean>;
987
1247
  audio_id: z.ZodOptional<z.ZodString>;
1248
+ caption_addon: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
1249
+ type: z.ZodOptional<z.ZodEnum<["none", "poll", "comment_prompt"]>>;
1250
+ options: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1251
+ extended_duration: z.ZodOptional<z.ZodBoolean>;
1252
+ }, "strip", z.ZodTypeAny, {
1253
+ type?: "none" | "poll" | "comment_prompt" | undefined;
1254
+ options?: string[] | undefined;
1255
+ extended_duration?: boolean | undefined;
1256
+ }, {
1257
+ type?: "none" | "poll" | "comment_prompt" | undefined;
1258
+ options?: string[] | undefined;
1259
+ extended_duration?: boolean | undefined;
1260
+ }>, z.ZodNull]>>;
1261
+ poll_attachment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1262
+ is_comment_prompt_used: z.ZodOptional<z.ZodBoolean>;
1263
+ is_poll_duration_extended: z.ZodOptional<z.ZodBoolean>;
988
1264
  ai_generated: z.ZodOptional<z.ZodBoolean>;
989
1265
  }, z.ZodTypeAny, "passthrough"> | undefined;
990
1266
  }[];
@@ -1028,6 +1304,28 @@ export declare const createPostsBatchTool: {
1028
1304
  }[] | undefined;
1029
1305
  is_ai_generated?: boolean | undefined;
1030
1306
  audio_id?: string | undefined;
1307
+ poll_attachment?: {
1308
+ options?: string[] | undefined;
1309
+ option_a?: string | undefined;
1310
+ option_b?: string | undefined;
1311
+ option_c?: string | undefined;
1312
+ option_d?: string | undefined;
1313
+ } | undefined;
1314
+ caption_addon?: {
1315
+ type?: "none" | "poll" | "comment_prompt" | undefined;
1316
+ options?: string[] | undefined;
1317
+ kind?: "none" | "poll" | "comment_prompt" | undefined;
1318
+ extended_duration?: boolean | undefined;
1319
+ poll_attachment?: {
1320
+ options?: string[] | undefined;
1321
+ option_a?: string | undefined;
1322
+ option_b?: string | undefined;
1323
+ option_c?: string | undefined;
1324
+ option_d?: string | undefined;
1325
+ } | undefined;
1326
+ } | null | undefined;
1327
+ is_comment_prompt_used?: boolean | undefined;
1328
+ is_poll_duration_extended?: boolean | undefined;
1031
1329
  } | undefined;
1032
1330
  platform_settings?: z.objectInputType<{
1033
1331
  __type: z.ZodOptional<z.ZodString>;
@@ -1151,6 +1449,22 @@ export declare const createPostsBatchTool: {
1151
1449
  paid_partnership: z.ZodOptional<z.ZodBoolean>;
1152
1450
  is_ai_generated: z.ZodOptional<z.ZodBoolean>;
1153
1451
  audio_id: z.ZodOptional<z.ZodString>;
1452
+ caption_addon: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
1453
+ type: z.ZodOptional<z.ZodEnum<["none", "poll", "comment_prompt"]>>;
1454
+ options: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1455
+ extended_duration: z.ZodOptional<z.ZodBoolean>;
1456
+ }, "strip", z.ZodTypeAny, {
1457
+ type?: "none" | "poll" | "comment_prompt" | undefined;
1458
+ options?: string[] | undefined;
1459
+ extended_duration?: boolean | undefined;
1460
+ }, {
1461
+ type?: "none" | "poll" | "comment_prompt" | undefined;
1462
+ options?: string[] | undefined;
1463
+ extended_duration?: boolean | undefined;
1464
+ }>, z.ZodNull]>>;
1465
+ poll_attachment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1466
+ is_comment_prompt_used: z.ZodOptional<z.ZodBoolean>;
1467
+ is_poll_duration_extended: z.ZodOptional<z.ZodBoolean>;
1154
1468
  ai_generated: z.ZodOptional<z.ZodBoolean>;
1155
1469
  }, z.ZodTypeAny, "passthrough"> | undefined;
1156
1470
  }[];
@@ -4,6 +4,7 @@ import { type ToolContext } from '../lib/tool-runtime.js';
4
4
  type DeletePostInput = {
5
5
  post_id?: number;
6
6
  group_id?: string;
7
+ delete_mode?: 'posterly' | 'platform';
7
8
  confirm_published?: boolean;
8
9
  confirm?: boolean;
9
10
  preview_id?: string;
@@ -14,6 +15,7 @@ export declare const deletePostTool: {
14
15
  inputSchema: z.ZodObject<{
15
16
  post_id: z.ZodOptional<z.ZodNumber>;
16
17
  group_id: z.ZodOptional<z.ZodString>;
18
+ delete_mode: z.ZodOptional<z.ZodEnum<["posterly", "platform"]>>;
17
19
  confirm_published: z.ZodOptional<z.ZodBoolean>;
18
20
  confirm: z.ZodOptional<z.ZodBoolean>;
19
21
  preview_id: z.ZodOptional<z.ZodString>;
@@ -21,14 +23,16 @@ export declare const deletePostTool: {
21
23
  confirm?: boolean | undefined;
22
24
  preview_id?: string | undefined;
23
25
  post_id?: number | undefined;
24
- group_id?: string | undefined;
25
26
  confirm_published?: boolean | undefined;
27
+ delete_mode?: "platform" | "posterly" | undefined;
28
+ group_id?: string | undefined;
26
29
  }, {
27
30
  confirm?: boolean | undefined;
28
31
  preview_id?: string | undefined;
29
32
  post_id?: number | undefined;
30
- group_id?: string | undefined;
31
33
  confirm_published?: boolean | undefined;
34
+ delete_mode?: "platform" | "posterly" | undefined;
35
+ group_id?: string | undefined;
32
36
  }>;
33
37
  /** The old tools' exact input schemas, for alias calls (see alias-transport.ts). */
34
38
  legacySchemas: {
@@ -3,14 +3,15 @@ import { code, dashboardUrlForPosts } from '../lib/format.js';
3
3
  import { previewThenConfirm, validateArgs } from '../lib/tool-runtime.js';
4
4
  export const deletePostTool = {
5
5
  name: 'delete_post',
6
- description: 'Delete posts. DESTRUCTIVE and IRREVERSIBLE: deleted posts and captions cannot be recovered. post_id: delete one post; fetch it with `get_post` first, show the user what will be deleted (caption, account, scheduled time), and pass confirm=true only after explicit confirmation ("yes delete it", "remove it"). A post that is currently publishing is never deleted. A published post is taken down only when the user also explicitly confirms the live removal and you pass confirm_published=true. Instagram and Facebook are attempted when the stored id and token allow it. Every other platform, or a live URL with no id, returns platform_delete_unsupported and the posterly row is kept. A published post with no live URL and no platform id is removed from posterly only. group_id: delete every draft, scheduled, failed, or paused post matching a caller-defined group_id, post_group_id, api_group_id, or release_id. A group delete never removes published posts. Preview then confirm: call without confirm to get a preview and preview_id, show it, then call again with confirm=true and that preview_id. Never delete several posts one by one without listing each and confirming the full list.',
6
+ description: 'Delete posts. DESTRUCTIVE and IRREVERSIBLE: deleted posts and captions cannot be recovered. post_id: delete one post; fetch it with `get_post` first, show the user what will be deleted (caption, account, scheduled time), and pass confirm=true only after explicit confirmation ("yes delete it", "remove it"). A post that is currently publishing is never deleted. A published post is taken down only when the user also explicitly confirms the live removal and you pass confirm_published=true. Choose delete_mode=posterly to remove only the posterly record and leave the live post up, or delete_mode=platform with confirm_published=true to take down the live post too. Live deletion supports eligible connected platforms with saved post IDs and deletion permissions; refusals keep the record. Threads requires threads_delete. YouTube requires youtube.force-ssl or equivalent, upload alone is insufficient. A published post with no live URL and no platform id is removed from posterly only. group_id: delete every draft, scheduled, failed, or paused post matching a caller-defined group_id, post_group_id, api_group_id, or release_id. A group delete never removes published posts. Preview then confirm: call without confirm to get a preview and preview_id, show it, then call again with confirm=true and that preview_id. Never delete several posts one by one without listing each and confirming the full list.',
7
7
  inputSchema: z.object({
8
8
  post_id: z.number().optional().describe('Delete this one post.'),
9
9
  group_id: z.string().min(1).max(160).optional().describe('Delete every unpublished post in this group or release instead. Never deletes published posts.'),
10
+ delete_mode: z.enum(['posterly', 'platform']).optional().describe('posterly removes only the record; platform also takes down live content and requires confirm_published=true.'),
10
11
  confirm_published: z
11
12
  .boolean()
12
13
  .optional()
13
- .describe('With post_id only. True only after the user explicitly confirms taking a live Instagram or Facebook post down. Without it, a published post is refused and kept.'),
14
+ .describe('With post_id only. True only after the user explicitly confirms taking a live post down. Required with delete_mode=platform. Use delete_mode=posterly to leave the live post up.'),
14
15
  confirm: z
15
16
  .boolean()
16
17
  .optional()
@@ -53,13 +54,16 @@ async function deleteOne(client, input) {
53
54
  if (input.confirm !== true) {
54
55
  throw new Error('Refusing to delete post without confirm=true after explicit user confirmation.');
55
56
  }
56
- const result = await client.deletePost(input.post_id, { confirmPublished: input.confirm_published === true });
57
- const platformDelete = result.platform_delete ? ` Platform delete: ${result.platform_delete}.` : '';
57
+ const result = await client.deletePost(input.post_id, { confirmPublished: input.confirm_published === true, deleteMode: input.delete_mode });
58
+ const platformDelete = result.platform_delete === 'deleted' ? ' The platform confirmed removal of the live content.'
59
+ : result.platform_delete === 'not_requested' ? ' Only the posterly record was removed; no platform deletion was requested.'
60
+ : result.platform_delete === 'no_live_target' ? ' Only the posterly record was removed because no live target was saved.'
61
+ : '';
58
62
  return [
59
63
  `Post #${result.id} deleted successfully.${platformDelete}`,
60
64
  'It has been removed from the posterly queue.',
61
65
  `View queue in posterly: ${dashboardUrlForPosts()}`,
62
66
  '',
63
- 'Next step for the AI agent: tell the user the post is gone and offer to create, reschedule, or review the next post.',
67
+ 'Tell the user whether the live post was deleted or kept on the platform.',
64
68
  ].join('\n');
65
69
  }