post-engineer-mcp 1.52.585 → 1.52.586

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.
Files changed (119) hide show
  1. package/README.md +87 -98
  2. package/dist/account-shapes.js +2 -2
  3. package/dist/account-shapes.js.map +1 -1
  4. package/dist/action-tool.d.ts +32 -0
  5. package/dist/action-tool.js +90 -0
  6. package/dist/action-tool.js.map +1 -0
  7. package/dist/analytics.d.ts +2 -0
  8. package/dist/analytics.js +10 -0
  9. package/dist/analytics.js.map +1 -1
  10. package/dist/client-types.d.ts +3 -3
  11. package/dist/client.js +1 -1
  12. package/dist/client.js.map +1 -1
  13. package/dist/cloned-voice-tools.d.ts +1 -3
  14. package/dist/cloned-voice-tools.js +4 -33
  15. package/dist/cloned-voice-tools.js.map +1 -1
  16. package/dist/connect-account.js +3 -3
  17. package/dist/connect-account.js.map +1 -1
  18. package/dist/direct-publish-form.js +1 -1
  19. package/dist/direct-publish-form.js.map +1 -1
  20. package/dist/generate-video.d.ts +254 -0
  21. package/dist/generate-video.js +195 -0
  22. package/dist/generate-video.js.map +1 -0
  23. package/dist/http-transport.js +3 -4
  24. package/dist/http-transport.js.map +1 -1
  25. package/dist/index.js +27 -151
  26. package/dist/index.js.map +1 -1
  27. package/dist/intent-accounts.d.ts +5 -0
  28. package/dist/intent-accounts.js +66 -0
  29. package/dist/intent-accounts.js.map +1 -0
  30. package/dist/intent-content.d.ts +4 -0
  31. package/dist/intent-content.js +54 -0
  32. package/dist/intent-content.js.map +1 -0
  33. package/dist/intent-library.d.ts +4 -0
  34. package/dist/intent-library.js +41 -0
  35. package/dist/intent-library.js.map +1 -0
  36. package/dist/intent-personas.d.ts +6 -0
  37. package/dist/intent-personas.js +79 -0
  38. package/dist/intent-personas.js.map +1 -0
  39. package/dist/intent-video.d.ts +5 -0
  40. package/dist/intent-video.js +28 -0
  41. package/dist/intent-video.js.map +1 -0
  42. package/dist/{publish-uploaded-tools.d.ts → intent-voices.d.ts} +1 -1
  43. package/dist/intent-voices.js +33 -0
  44. package/dist/intent-voices.js.map +1 -0
  45. package/dist/limits.d.ts +2 -2
  46. package/dist/limits.js +2 -2
  47. package/dist/persona-avatar.d.ts +2 -2
  48. package/dist/persona-avatar.js +5 -5
  49. package/dist/persona-avatar.js.map +1 -1
  50. package/dist/persona-delete.d.ts +6 -0
  51. package/dist/persona-delete.js +41 -0
  52. package/dist/persona-delete.js.map +1 -0
  53. package/dist/persona-update.js +3 -3
  54. package/dist/persona-update.js.map +1 -1
  55. package/dist/publish-direct-shape.js +3 -3
  56. package/dist/publish-direct-shape.js.map +1 -1
  57. package/dist/publish-notices.js +1 -1
  58. package/dist/publish-notices.js.map +1 -1
  59. package/dist/publish-uploaded-shape.js +6 -6
  60. package/dist/publish-uploaded-shape.js.map +1 -1
  61. package/dist/recipe-session.d.ts +7 -10
  62. package/dist/recipe-session.js +17 -25
  63. package/dist/recipe-session.js.map +1 -1
  64. package/dist/refs.d.ts +54 -0
  65. package/dist/refs.js +158 -0
  66. package/dist/refs.js.map +1 -0
  67. package/dist/remote-shapes.d.ts +2 -2
  68. package/dist/remote-shapes.js +6 -6
  69. package/dist/remote-shapes.js.map +1 -1
  70. package/dist/require-publishing-accounts.js +1 -1
  71. package/dist/require-publishing-accounts.js.map +1 -1
  72. package/dist/schedule-shapes.js +6 -6
  73. package/dist/schedule-shapes.js.map +1 -1
  74. package/dist/script-segments.js +1 -1
  75. package/dist/script-segments.js.map +1 -1
  76. package/dist/single-video-shape.d.ts +5 -5
  77. package/dist/single-video-shape.js +20 -20
  78. package/dist/single-video-shape.js.map +1 -1
  79. package/dist/tool-annotations.js.map +1 -1
  80. package/dist/tools-batch.d.ts +63 -64
  81. package/dist/tools-batch.js +7 -8
  82. package/dist/tools-batch.js.map +1 -1
  83. package/dist/tools-experiments.d.ts +48 -66
  84. package/dist/tools-experiments.js +26 -13
  85. package/dist/tools-experiments.js.map +1 -1
  86. package/dist/tools-pinterest.d.ts +0 -1
  87. package/dist/tools-pinterest.js +5 -6
  88. package/dist/tools-pinterest.js.map +1 -1
  89. package/dist/tools-posts.js +7 -7
  90. package/dist/tools-posts.js.map +1 -1
  91. package/dist/tools-prompts.d.ts +2 -2
  92. package/dist/tools-prompts.js +31 -31
  93. package/dist/tools-prompts.js.map +1 -1
  94. package/dist/tools-publish-uploaded.d.ts +0 -3
  95. package/dist/tools-publish-uploaded.js +7 -10
  96. package/dist/tools-publish-uploaded.js.map +1 -1
  97. package/dist/tools-publishing-accounts.js +3 -3
  98. package/dist/tools-publishing-accounts.js.map +1 -1
  99. package/dist/tools-single-video.d.ts +0 -2
  100. package/dist/tools-single-video.js +11 -15
  101. package/dist/tools-single-video.js.map +1 -1
  102. package/dist/tools-user-media.d.ts +0 -2
  103. package/dist/tools-user-media.js +2 -5
  104. package/dist/tools-user-media.js.map +1 -1
  105. package/dist/tools.d.ts +25 -28
  106. package/dist/tools.js +10 -85
  107. package/dist/tools.js.map +1 -1
  108. package/dist/video-task-tools.d.ts +2 -2
  109. package/dist/video-task-tools.js +14 -12
  110. package/dist/video-task-tools.js.map +1 -1
  111. package/dist/voice-filters.d.ts +1 -1
  112. package/dist/voice-filters.js +4 -4
  113. package/dist/voice-filters.js.map +1 -1
  114. package/package.json +1 -1
  115. package/dist/local-file-tools.d.ts +0 -3
  116. package/dist/local-file-tools.js +0 -15
  117. package/dist/local-file-tools.js.map +0 -1
  118. package/dist/publish-uploaded-tools.js +0 -10
  119. package/dist/publish-uploaded-tools.js.map +0 -1
@@ -39,39 +39,7 @@ export declare const GetExperimentResultsSchema: z.ZodObject<{
39
39
  }>>;
40
40
  }, z.core.$strip>;
41
41
  export declare const AddExperimentPairShape: {
42
- personaId: z.ZodOptional<z.ZodString>;
43
42
  description: z.ZodString;
44
- language: z.ZodOptional<z.ZodString>;
45
- providers: z.ZodArray<z.ZodEnum<{
46
- youtube: "youtube";
47
- instagram: "instagram";
48
- linkedin: "linkedin";
49
- bluesky: "bluesky";
50
- threads: "threads";
51
- facebook: "facebook";
52
- pinterest: "pinterest";
53
- fanvue: "fanvue";
54
- "3speak": "3speak";
55
- rumble: "rumble";
56
- }>>;
57
- youtubeAccountIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
58
- instagramAccountIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
59
- linkedinAccountIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
60
- blueskyAccountIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
61
- threadsAccountIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
62
- facebookAccountIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
63
- pinterestAccountIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
64
- pinterestBoardId: z.ZodOptional<z.ZodString>;
65
- fanvueAccountIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
66
- threespeakAccountIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
67
- rumbleAccountIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
68
- mode: z.ZodDefault<z.ZodEnum<{
69
- scheduled: "scheduled";
70
- asap: "asap";
71
- }>>;
72
- startAt: z.ZodOptional<z.ZodString>;
73
- times: z.ZodOptional<z.ZodArray<z.ZodString>>;
74
- timezone: z.ZodDefault<z.ZodString>;
75
43
  options: z.ZodOptional<z.ZodObject<{
76
44
  videoType: z.ZodEnum<{
77
45
  full_lipsync: "full_lipsync";
@@ -98,13 +66,36 @@ export declare const AddExperimentPairShape: {
98
66
  language: z.ZodOptional<z.ZodString>;
99
67
  niche: z.ZodOptional<z.ZodString>;
100
68
  }, z.core.$strip>>;
69
+ language: z.ZodOptional<z.ZodString>;
70
+ pinterestBoardId: z.ZodOptional<z.ZodString>;
71
+ timezone: z.ZodDefault<z.ZodString>;
72
+ mode: z.ZodDefault<z.ZodEnum<{
73
+ scheduled: "scheduled";
74
+ asap: "asap";
75
+ }>>;
76
+ startAt: z.ZodOptional<z.ZodString>;
77
+ times: z.ZodOptional<z.ZodArray<z.ZodString>>;
78
+ persona: z.ZodOptional<z.ZodString>;
79
+ providers: z.ZodOptional<z.ZodArray<z.ZodEnum<{
80
+ youtube: "youtube";
81
+ instagram: "instagram";
82
+ linkedin: "linkedin";
83
+ bluesky: "bluesky";
84
+ threads: "threads";
85
+ facebook: "facebook";
86
+ pinterest: "pinterest";
87
+ fanvue: "fanvue";
88
+ "3speak": "3speak";
89
+ rumble: "rumble";
90
+ }>>>;
91
+ accounts: z.ZodOptional<z.ZodArray<z.ZodString>>;
101
92
  experimentId: z.ZodString;
102
93
  pair: z.ZodNumber;
103
94
  title: z.ZodString;
104
95
  segments: z.ZodArray<z.ZodObject<{
105
96
  kind: z.ZodEnum<{
106
- hook: "hook";
107
97
  content: "content";
98
+ hook: "hook";
108
99
  }>;
109
100
  text: z.ZodString;
110
101
  media: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -133,39 +124,7 @@ export declare const AddExperimentPairShape: {
133
124
  spacingHours: z.ZodDefault<z.ZodNumber>;
134
125
  };
135
126
  export declare const AddExperimentPairSchema: z.ZodObject<{
136
- personaId: z.ZodOptional<z.ZodString>;
137
127
  description: z.ZodString;
138
- language: z.ZodOptional<z.ZodString>;
139
- providers: z.ZodArray<z.ZodEnum<{
140
- youtube: "youtube";
141
- instagram: "instagram";
142
- linkedin: "linkedin";
143
- bluesky: "bluesky";
144
- threads: "threads";
145
- facebook: "facebook";
146
- pinterest: "pinterest";
147
- fanvue: "fanvue";
148
- "3speak": "3speak";
149
- rumble: "rumble";
150
- }>>;
151
- youtubeAccountIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
152
- instagramAccountIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
153
- linkedinAccountIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
154
- blueskyAccountIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
155
- threadsAccountIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
156
- facebookAccountIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
157
- pinterestAccountIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
158
- pinterestBoardId: z.ZodOptional<z.ZodString>;
159
- fanvueAccountIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
160
- threespeakAccountIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
161
- rumbleAccountIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
162
- mode: z.ZodDefault<z.ZodEnum<{
163
- scheduled: "scheduled";
164
- asap: "asap";
165
- }>>;
166
- startAt: z.ZodOptional<z.ZodString>;
167
- times: z.ZodOptional<z.ZodArray<z.ZodString>>;
168
- timezone: z.ZodDefault<z.ZodString>;
169
128
  options: z.ZodOptional<z.ZodObject<{
170
129
  videoType: z.ZodEnum<{
171
130
  full_lipsync: "full_lipsync";
@@ -192,13 +151,36 @@ export declare const AddExperimentPairSchema: z.ZodObject<{
192
151
  language: z.ZodOptional<z.ZodString>;
193
152
  niche: z.ZodOptional<z.ZodString>;
194
153
  }, z.core.$strip>>;
154
+ language: z.ZodOptional<z.ZodString>;
155
+ pinterestBoardId: z.ZodOptional<z.ZodString>;
156
+ timezone: z.ZodDefault<z.ZodString>;
157
+ mode: z.ZodDefault<z.ZodEnum<{
158
+ scheduled: "scheduled";
159
+ asap: "asap";
160
+ }>>;
161
+ startAt: z.ZodOptional<z.ZodString>;
162
+ times: z.ZodOptional<z.ZodArray<z.ZodString>>;
163
+ persona: z.ZodOptional<z.ZodString>;
164
+ providers: z.ZodOptional<z.ZodArray<z.ZodEnum<{
165
+ youtube: "youtube";
166
+ instagram: "instagram";
167
+ linkedin: "linkedin";
168
+ bluesky: "bluesky";
169
+ threads: "threads";
170
+ facebook: "facebook";
171
+ pinterest: "pinterest";
172
+ fanvue: "fanvue";
173
+ "3speak": "3speak";
174
+ rumble: "rumble";
175
+ }>>>;
176
+ accounts: z.ZodOptional<z.ZodArray<z.ZodString>>;
195
177
  experimentId: z.ZodString;
196
178
  pair: z.ZodNumber;
197
179
  title: z.ZodString;
198
180
  segments: z.ZodArray<z.ZodObject<{
199
181
  kind: z.ZodEnum<{
200
- hook: "hook";
201
182
  content: "content";
183
+ hook: "hook";
202
184
  }>;
203
185
  text: z.ZodString;
204
186
  media: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -1,16 +1,18 @@
1
1
  import { z } from 'zod';
2
2
  import { createExperiment, getExperimentResults, listExperiments } from './client-experiments.js';
3
3
  import { EXPERIMENT_NAME_MAX_LENGTH, EXPERIMENT_TARGET_PAIRS_MAX, EXPERIMENT_TARGET_PAIRS_MIN, EXPERIMENT_VARIANT_DESCRIPTION_MAX_LENGTH, EXPERIMENT_VARIANT_ID_PATTERN, EXPERIMENT_VARIANT_NAME_MAX_LENGTH, METRICS_WINDOWS, } from './limits.js';
4
- import { GeneratePersonaVideoShape, ScriptSegmentShape } from './single-video-shape.js';
4
+ import { GenerateVideoItemSchema, prepareVideo } from './generate-video.js';
5
+ import { createRefResolvers } from './refs.js';
6
+ import { ScriptSegmentShape } from './single-video-shape.js';
5
7
  import { generatePersonaVideoOutcome } from './tools-single-video.js';
6
8
  import { handleLibraryCall } from './tools-call.js';
7
9
  //---------------
8
- // Paired A/B content experiments (issue #476): create_experiment,
9
- // list_experiments, add_experiment_pair and get_experiment_results.
10
+ // Paired A/B content experiments (issue #476): experiments (action: create),
11
+ // experiments (action: list), experiments (action: add_pair) and experiments (action: results).
10
12
  //
11
13
  // An experiment tests ONE variable (the hook) with two variants. It is a
12
14
  // set of pairs: inside a pair both videos share topic and content and only
13
- // the hook differs; across pairs the topic changes. add_experiment_pair
15
+ // the hook differs; across pairs the topic changes. experiments (action: add_pair)
14
16
  // creates both videos of one pair through generate-and-schedule (two normal
15
17
  // charged videos) and the server rejects a pair that differs in anything
16
18
  // but the hook, before charging.
@@ -54,13 +56,15 @@ export const CreateExperimentShape = {
54
56
  export const CreateExperimentSchema = z.object(CreateExperimentShape);
55
57
  export const ListExperimentsShape = {};
56
58
  export const GetExperimentResultsShape = {
57
- experimentId: z.string().uuid().describe('Experiment id from create_experiment / list_experiments.'),
59
+ experimentId: z.string().uuid().describe('Experiment id from experiments (action: create) / experiments (action: list).'),
58
60
  window: z.enum(METRICS_WINDOWS).optional().describe('Metrics window to compare: 24h, 7d (default) or 28d.'),
59
61
  };
60
62
  export const GetExperimentResultsSchema = z.object(GetExperimentResultsShape);
61
- const { segments: _segments, title: _title, idempotencyKey: _key, recipe: _recipe, experiment: _experiment, ...deliveryShape } = GeneratePersonaVideoShape;
63
+ // Both videos of a pair share everything but the hook: the delivery fields are
64
+ // the ones of a generate_video video (persona and accounts by name or id).
65
+ const { segments: _segments, title: _title, experiment: _experiment, ...deliveryShape } = GenerateVideoItemSchema.shape;
62
66
  export const AddExperimentPairShape = {
63
- experimentId: z.string().uuid().describe('Experiment id from create_experiment.'),
67
+ experimentId: z.string().uuid().describe('Experiment id from experiments (action: create).'),
64
68
  pair: z.number().int().min(1).max(EXPERIMENT_TARGET_PAIRS_MAX).describe('Pair number: 1 for the first pair, then 2, 3... up to targetPairs.'),
65
69
  title: z.string().min(1).describe('Slot label for both videos (the pair topic).'),
66
70
  segments: z
@@ -98,7 +102,7 @@ export async function handleCreateExperiment(client, args) {
98
102
  personaId: args.personaId ?? null,
99
103
  targetPairs: args.targetPairs,
100
104
  variants: args.variants,
101
- }), 'creating experiment', 'Experiment created. Next: add_experiment_pair for pair 1, 2, ... (each pair = 2 charged videos)');
105
+ }), 'creating experiment', 'Experiment created. Next: experiments (action: add_pair) for pair 1, 2, ... (each pair = 2 charged videos)');
102
106
  }
103
107
  export async function handleListExperiments(client) {
104
108
  return handleLibraryCall(() => listExperiments(client), 'listing experiments');
@@ -117,7 +121,16 @@ function textOf(response) {
117
121
  return response.content.map((part) => (part.type === 'text' ? part.text : '')).join('\n');
118
122
  }
119
123
  export async function handleAddExperimentPair(client, args) {
120
- const { experimentId, pair, title, segments, hooks, spacingHours, ...delivery } = args;
124
+ const { experimentId, pair, title, segments, hooks, spacingHours, ...deliveryRefs } = args;
125
+ // Resolve the persona and accounts once, before the first video exists.
126
+ const resolved = await prepareVideo(client, createRefResolvers(client), {
127
+ ...deliveryRefs,
128
+ title,
129
+ segments: [{ kind: 'hook', text: hooks[0].text }],
130
+ });
131
+ if (resolved.kind === 'response')
132
+ return resolved.response;
133
+ const { segments: _placeholder, title: _slotTitle, idempotencyKey: _unused, experiment: _link, recipe: _recipe, ...delivery } = resolved.prepared.video;
121
134
  // Alternate which variant goes first (A,B / B,A) so publish order never
122
135
  // favours one variant.
123
136
  const ordered = pair % 2 === 1 ? hooks : [hooks[1], hooks[0]];
@@ -137,14 +150,14 @@ export async function handleAddExperimentPair(client, args) {
137
150
  experiment: { experimentId, variantId: hook.variantId, pair },
138
151
  });
139
152
  if (response.isError === true) {
140
- const done = index === 1 ? ` The ${ordered[0].variantId} video of pair ${pair} was created; call add_experiment_pair again with the same arguments after fixing the error — it replays that video and only creates the missing one.` : '';
153
+ const done = index === 1 ? ` The ${ordered[0].variantId} video of pair ${pair} was created; call experiments (action: add_pair) again with the same arguments after fixing the error — it replays that video and only creates the missing one.` : '';
141
154
  return { content: [{ type: 'text', text: `Pair ${pair}, variant ${hook.variantId}: ${textOf(response)}${done}` }], isError: true };
142
155
  }
143
156
  if (failedSlotIds.length > 0) {
144
157
  // A 2xx can carry a failed slot: a dispatch failure (502) leaves the
145
158
  // failed slot behind and a retry on the same key replays it. The slot
146
- // is its schedule's only slot, so delete_slot answers 409 (last slot)
147
- // and cancel_schedule leaves a failed row alone, which keeps the
159
+ // is its schedule's only slot, so schedules (action: delete_slot) answers 409 (last slot)
160
+ // and schedules (action: cancel) leaves a failed row alone, which keeps the
148
161
  // (experiment, pair, variant) unique key taken: this pair number
149
162
  // cannot be redone, so the recovery is a new pair number.
150
163
  const done = index === 1 ? ` The ${ordered[0].variantId} video of pair ${pair} was created and stays; it is left without a partner and does not count toward the result.` : '';
@@ -152,7 +165,7 @@ export async function handleAddExperimentPair(client, args) {
152
165
  content: [
153
166
  {
154
167
  type: 'text',
155
- text: `Pair ${pair}, variant ${hook.variantId}: the video failed (slot ${failedSlotIds.join(', ')}, its tokens are refunded), so this pair was NOT created. The failed slot cannot be removed (delete_slot refuses a schedule's last slot and cancel_schedule leaves failed slots in place) and it keeps pair ${pair} taken, so calling add_experiment_pair again with pair ${pair} only replays the failed video. Call add_experiment_pair with the next free pair number instead (up to the experiment's targetPairs).${done}`,
168
+ text: `Pair ${pair}, variant ${hook.variantId}: the video failed (slot ${failedSlotIds.join(', ')}, its tokens are refunded), so this pair was NOT created. The failed slot cannot be removed (schedules (action: delete_slot) refuses a schedule's last slot and schedules (action: cancel) leaves failed slots in place) and it keeps pair ${pair} taken, so calling experiments (action: add_pair) again with pair ${pair} only replays the failed video. Call experiments (action: add_pair) with the next free pair number instead (up to the experiment's targetPairs).${done}`,
156
169
  },
157
170
  ],
158
171
  isError: true,
@@ -1 +1 @@
1
- {"version":3,"file":"tools-experiments.js","sourceRoot":"","sources":["../src/tools-experiments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAClG,OAAO,EACL,0BAA0B,EAC1B,2BAA2B,EAC3B,2BAA2B,EAC3B,yCAAyC,EACzC,6BAA6B,EAC7B,kCAAkC,EAClC,eAAe,GAChB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AACxF,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAwB,MAAM,iBAAiB,CAAC;AAE1E,iBAAiB;AACjB,kEAAkE;AAClE,oEAAoE;AACpE,EAAE;AACF,yEAAyE;AACzE,2EAA2E;AAC3E,wEAAwE;AACxE,4EAA4E;AAC5E,yEAAyE;AACzE,iCAAiC;AACjC,iBAAiB;AAEjB,MAAM,SAAS,GAAG,CAAC;KAChB,MAAM,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AM,EAAE,IAAI,EAAE,QAAQ,IAAI,aAAa,IAAI,CAAC,SAAS,KAAK,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QACrI,CAAC;QACD,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC7B,qEAAqE;YACrE,sEAAsE;YACtE,0FAA0F;YAC1F,4EAA4E;YAC5E,iEAAiE;YACjE,0DAA0D;YAC1D,MAAM,IAAI,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,kBAAkB,IAAI,4FAA4F,CAAC,CAAC,CAAC,EAAE,CAAC;YAC/K,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,QAAQ,IAAI,aAAa,IAAI,CAAC,SAAS,4BAA4B,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,8OAA8O,IAAI,qEAAqE,IAAI,mJAAmJ,IAAI,EAAE;qBACtjB;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,SAAS,MAAM,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,IAAI,kBAAkB,YAAY,2BAA2B,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;AAC1I,CAAC"}
@@ -7,5 +7,4 @@ export declare const ListPinterestBoardsShape: {
7
7
  export declare const ListPinterestBoardsSchema: z.ZodObject<{
8
8
  accountId: z.ZodString;
9
9
  }, z.core.$strip>;
10
- export declare const ListPinterestBoardsDescription = "List the boards of a connected Pinterest account (id + name). Use the id as pinterestBoardId on generate_persona_video when pinterest is selected, or as boardId on publish_video_direct for pinterest.";
11
10
  export declare function handleListPinterestBoards(client: PostEngineerClient, args: z.infer<typeof ListPinterestBoardsSchema>): Promise<McpToolResponse>;
@@ -2,10 +2,10 @@ import { z } from 'zod';
2
2
  import { ApiError, getErrorMessage } from './errors.js';
3
3
  import { sanitizeEngineError } from './tools.js';
4
4
  //---------------
5
- // list_pinterest_boards — the board picker for Pinterest publishing.
5
+ // accounts (action: list_boards) — the board picker for Pinterest publishing.
6
6
  //
7
- // Pinterest pins cannot exist without a board, so generate_persona_video
8
- // and publish_video_direct take the board id separately from the account
7
+ // Pinterest pins cannot exist without a board, so generate_video
8
+ // and publish_video (action: from_file) take the board id separately from the account
9
9
  // ids. The web route lists the boards of one connected Pinterest account
10
10
  // (the account id is the v5 user_account id stored at OAuth time); an
11
11
  // expired access token is refreshed server-side before listing.
@@ -14,10 +14,9 @@ export const ListPinterestBoardsShape = {
14
14
  accountId: z
15
15
  .string()
16
16
  .min(1, 'accountId is required')
17
- .describe('The Pinterest account ID (the providerAccountId field from list_social_accounts).'),
17
+ .describe('The Pinterest account ID (the providerAccountId field from accounts (action: list)).'),
18
18
  };
19
19
  export const ListPinterestBoardsSchema = z.object(ListPinterestBoardsShape);
20
- export const ListPinterestBoardsDescription = 'List the boards of a connected Pinterest account (id + name). Use the id as pinterestBoardId on generate_persona_video when pinterest is selected, or as boardId on publish_video_direct for pinterest.';
21
20
  function narrowBoards(value) {
22
21
  if (typeof value !== 'object' || value === null || !Array.isArray(value.boards)) {
23
22
  throw new Error('Malformed boards response from the API.');
@@ -34,7 +33,7 @@ function narrowBoards(value) {
34
33
  }
35
34
  export async function handleListPinterestBoards(client, args) {
36
35
  try {
37
- const result = await client.request(`/api/pinterest/boards?accountId=${encodeURIComponent(args.accountId)}`, { method: 'GET', headers: client.getHeaders() }, 'list_pinterest_boards');
36
+ const result = await client.request(`/api/pinterest/boards?accountId=${encodeURIComponent(args.accountId)}`, { method: 'GET', headers: client.getHeaders() }, 'list Pinterest boards');
38
37
  const boards = narrowBoards(result);
39
38
  return {
40
39
  content: [
@@ -1 +1 @@
1
- {"version":3,"file":"tools-pinterest.js","sourceRoot":"","sources":["../src/tools-pinterest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAGjD,iBAAiB;AACjB,qEAAqE;AACrE,EAAE;AACF,yEAAyE;AACzE,yEAAyE;AACzE,yEAAyE;AACzE,sEAAsE;AACtE,gEAAgE;AAChE,iBAAiB;AAEjB,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,EAAE,uBAAuB,CAAC;SAC/B,QAAQ,CAAC,mFAAmF,CAAC;CACjG,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC;AAE5E,MAAM,CAAC,MAAM,8BAA8B,GACzC,yMAAyM,CAAC;AAO5M,SAAS,YAAY,CAAC,KAAc;IAClC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAE,KAA8B,CAAC,MAAM,CAAC,EAAE,CAAC;QAC1G,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;IAC7D,CAAC;IACD,OAAQ,KAA+B,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QAC3D,IACE,OAAO,KAAK,KAAK,QAAQ;YACzB,KAAK,KAAK,IAAI;YACd,OAAQ,KAA0B,CAAC,EAAE,KAAK,QAAQ;YAClD,OAAQ,KAA4B,CAAC,IAAI,KAAK,QAAQ,EACtD,CAAC;YACD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AE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -4,7 +4,7 @@ import { ListPostsSchema } from './schedule-shapes.js';
4
4
  import { METRICS_FILTER_MAX_LENGTH, METRICS_NONE, METRICS_PROVIDERS, METRICS_WINDOWS, YOUTUBE_VIDEO_ID, } from './limits.js';
5
5
  import { handleLibraryCall } from './tools-call.js';
6
6
  //---------------
7
- // get_post, get_post_metrics and get_youtube_retention_curve — MCP tools.
7
+ // posts (action: get), insights (action: post_metrics) and insights (action: retention_curve) — MCP tools.
8
8
  //
9
9
  // Extracted from tools.ts so the tools module stays under the file-size
10
10
  // ratchet.
@@ -14,7 +14,7 @@ export const GetPostShape = {
14
14
  id: z
15
15
  .string()
16
16
  .min(1, 'id is required')
17
- .describe('A post id of either kind: a slot id (slotId from list_posts / generate_persona_video) or a generation id (generationId from list_video_generations). The server resolves which one it is.'),
17
+ .describe('A post id of either kind: a slot id (slotId from posts (action: list) / generate_video) or a generation id (generationId from video_tasks (action: list_generations)). The server resolves which one it is.'),
18
18
  };
19
19
  export const GetPostSchema = z.object(GetPostShape);
20
20
  const metricsFilter = z.string().min(1).max(METRICS_FILTER_MAX_LENGTH);
@@ -27,10 +27,10 @@ export const GetPostMetricsShape = {
27
27
  message: `persona must be a uuid or ${METRICS_NONE}`,
28
28
  })
29
29
  .optional()
30
- .describe(`Optional persona id filter (uuid from list_personas), or ${METRICS_NONE} for posts with no persona.`),
30
+ .describe(`Optional persona id filter (uuid from personas (action: list)), or ${METRICS_NONE} for posts with no persona.`),
31
31
  account: metricsFilter
32
32
  .optional()
33
- .describe('Optional publishing account id filter (the account ids from list_social_accounts).'),
33
+ .describe('Optional publishing account id filter (the account ids from accounts (action: list)).'),
34
34
  provider: z.enum(METRICS_PROVIDERS).optional().describe('Optional network filter.'),
35
35
  angle: metricsFilter
36
36
  .optional()
@@ -38,11 +38,11 @@ export const GetPostMetricsShape = {
38
38
  };
39
39
  export const GetPostMetricsSchema = z.object(GetPostMetricsShape);
40
40
  export const GetYouTubeRetentionCurveShape = {
41
- account: metricsFilter.describe('The YouTube account id (channel id) the video was published on: accountId from get_post_metrics rows.'),
41
+ account: metricsFilter.describe('The YouTube account id (channel id) the video was published on: accountId from insights (action: post_metrics) rows.'),
42
42
  video: z
43
43
  .string()
44
44
  .regex(YOUTUBE_VIDEO_ID, 'video must be a YouTube video id')
45
- .describe('The YouTube video id: externalId from a youtube get_post_metrics row.'),
45
+ .describe('The YouTube video id: externalId from a youtube insights (action: post_metrics) row.'),
46
46
  };
47
47
  export const GetYouTubeRetentionCurveSchema = z.object(GetYouTubeRetentionCurveShape);
48
48
  export async function handleGetPost(client, args) {
@@ -54,7 +54,7 @@ export async function handleGetPostMetrics(client, args) {
54
54
  export async function handleGetYouTubeRetentionCurve(client, args) {
55
55
  return handleLibraryCall(() => getYouTubeRetentionCurve(client, args), 'getting YouTube retention curve');
56
56
  }
57
- // list_posts — the upcoming/recent lists, or (with from + to) every post in a
57
+ // posts (action: list) — the upcoming/recent lists, or (with from + to) every post in a
58
58
  // window. The schema's from/to pairing is a .refine, which the SDK's shape
59
59
  // validation does not run, so the args are re-parsed here.
60
60
  export async function handleListPosts(client, args) {
@@ -1 +1 @@
1
- {"version":3,"file":"tools-posts.js","sourceRoot":"","sources":["../src/tools-posts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACxG,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EACL,yBAAyB,EACzB,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,gBAAgB,GACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,iBAAiB,EAAwB,MAAM,iBAAiB,CAAC;AAE1E,iBAAiB;AACjB,0EAA0E;AAC1E,EAAE;AACF,wEAAwE;AACxE,WAAW;AAC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M,CAAC,IAAI,CAAC;IACxC,IAAI,IAAI,KAAK,SAAS,IAAI,EAAE,KAAK,SAAS,EAAE,CAAC;QAC3C,OAAO,iBAAiB,CAAC,GAAG,EAAE,CAAC,gBAAgB,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,eAAe,CAAC,CAAC;IAC1F,CAAC;IACD,OAAO,iBAAiB,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,eAAe,CAAC,CAAC;AAC3E,CAAC"}
@@ -5,10 +5,10 @@ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
5
5
  import { RecipeSession, type McpTransportKind } from './recipe-session.js';
6
6
  export { withRecipeNudge, withScriptOutcome, type McpTransportKind } from './recipe-session.js';
7
7
  export declare const SERVER_INSTRUCTIONS: string;
8
- export declare const ListPromptsDescription = "List the available recipe prompts (slug, title, description). Call this BEFORE writing or generating a video script when the user's request describes a topic rather than a ready script \u2014 news of the day, a real place with its own photos, a concrete subject like a car or a product, GitHub pull requests, or first-time account setup. Then call get_prompt with the matching slug to load the full validated workflow for that recipe.";
8
+ export declare const ListPromptsDescription = "List the available recipe prompts (slug, title, description). Call this BEFORE writing or generating a video script when the user's request describes a topic rather than a ready script \u2014 news of the day, a real place with its own photos, a concrete subject like a car or a product, GitHub pull requests, or first-time account setup. Then call prompts (action: get) with the matching slug to load the full validated workflow for that recipe.";
9
9
  export declare const ListPromptsShape: {};
10
10
  export declare function handleListPrompts(client: PostEngineerClient): Promise<McpToolResponse>;
11
- export declare const GetPromptDescription = "Return the full recipe prompt for one slug from list_prompts. Load only the recipe the agent will follow, and pass its slug as recipe on generate_persona_video. Each recipe carries the complete validated workflow: script structure and word limits, media verification via check_media for photo URLs, pricing rules for the overlay badge, and the generation and publish steps. Unknown slugs fail with the list of valid slugs \u2014 call list_prompts first when unsure.";
11
+ export declare const GetPromptDescription = "Return the full recipe prompt for one slug from prompts (action: list). Load only the recipe the agent will follow, and pass its slug as recipe on generate_video. Each recipe carries the complete validated workflow: script structure and word limits, media verification via media (action: check) for photo URLs, pricing rules for the overlay badge, and the generation and publish steps. Unknown slugs fail with the list of valid slugs \u2014 call prompts (action: list) first when unsure.";
12
12
  export declare const GetPromptShape: {
13
13
  slug: z.ZodString;
14
14
  };
@@ -1,34 +1,34 @@
1
1
  import { z } from 'zod';
2
2
  import { UnknownPromptSlugError, getPrompt, listPrompts } from './client-prompts.js';
3
3
  import { getErrorMessage } from './errors.js';
4
- import { withTracking } from './analytics.js';
4
+ import { actionDescription, actionShape, byAction } from './action-tool.js';
5
5
  import { READ_ONLY } from './tool-annotations.js';
6
- import { RecipeSession, recipeRunText } from './recipe-session.js';
7
- // Re-exported so index.ts pays one import line (it sits at the file-size cap).
6
+ import { RecipeSession, isRecipeSlug, recipeRunText } from './recipe-session.js';
7
+ // Re-exported so the intent modules and index.ts import the recipe wrappers from one place.
8
8
  export { withRecipeNudge, withScriptOutcome } from './recipe-session.js';
9
9
  //---------------
10
- // Recipe self-serve tools: list_prompts and get_prompt.
10
+ // Recipe self-serve tools: prompts (action: list) and prompts (action: get).
11
11
  //
12
12
  // Slash commands are a user channel: an agent that arrives without a human
13
13
  // typing /place-spotlight only sees the tool list and tool results, so it
14
14
  // never learns the recipes exist. These two tools put the hub in that
15
- // channel: list_prompts advertises what recipes exist (slugs + titles +
16
- // descriptions, no prompt text — cheap in tokens), and get_prompt fetches
15
+ // channel: prompts (action: list) advertises what recipes exist (slugs + titles +
16
+ // descriptions, no prompt text — cheap in tokens), and prompts (action: get) fetches
17
17
  // one recipe's full text by slug. Both read the web hub over the API
18
18
  // (client-prompts.ts), the same source the slash commands use.
19
19
  //---------------
20
20
  //---------------
21
21
  // Server instructions, advertised in the MCP initialize result. An agent
22
22
  // that reads the initialize payload sees the nudge before its first call;
23
- // tools see it only in their descriptions (see generate_persona_video).
23
+ // tools see it only in their descriptions (see generate_video).
24
24
  //---------------
25
25
  export const SERVER_INSTRUCTIONS = [
26
26
  'post-engineer turns content into scheduled persona videos.',
27
27
  'Every video is generated from a complete, validated script — never improvised — and generation always costs prepaid tokens.',
28
- 'When the user asks for a video about a topic — news of the day, a real place with photos, a concrete subject like a car or a product, GitHub pull requests, or first-time setup — call list_prompts first and follow the matching recipe via get_prompt instead of assembling the script yourself.',
28
+ 'When the user asks for a video about a topic — news of the day, a real place with photos, a concrete subject like a car or a product, GitHub pull requests, or first-time setup — call prompts (action: list) first and follow the matching recipe via prompts (action: get) instead of assembling the script yourself.',
29
29
  'The recipes pre-validate scripts, media and prices before any token is spent.',
30
30
  ].join(' ');
31
- export const ListPromptsDescription = 'List the available recipe prompts (slug, title, description). Call this BEFORE writing or generating a video script when the user\'s request describes a topic rather than a ready script — news of the day, a real place with its own photos, a concrete subject like a car or a product, GitHub pull requests, or first-time account setup. Then call get_prompt with the matching slug to load the full validated workflow for that recipe.';
31
+ export const ListPromptsDescription = 'List the available recipe prompts (slug, title, description). Call this BEFORE writing or generating a video script when the user\'s request describes a topic rather than a ready script — news of the day, a real place with its own photos, a concrete subject like a car or a product, GitHub pull requests, or first-time account setup. Then call prompts (action: get) with the matching slug to load the full validated workflow for that recipe.';
32
32
  export const ListPromptsShape = {};
33
33
  export async function handleListPrompts(client) {
34
34
  try {
@@ -39,15 +39,15 @@ export async function handleListPrompts(client) {
39
39
  return errorResponse('listing prompts', getErrorMessage(error));
40
40
  }
41
41
  }
42
- export const GetPromptDescription = 'Return the full recipe prompt for one slug from list_prompts. Load only the recipe the agent will follow, and pass its slug as recipe on generate_persona_video. Each recipe carries the complete validated workflow: script structure and word limits, media verification via check_media for photo URLs, pricing rules for the overlay badge, and the generation and publish steps. Unknown slugs fail with the list of valid slugs — call list_prompts first when unsure.';
42
+ export const GetPromptDescription = 'Return the full recipe prompt for one slug from prompts (action: list). Load only the recipe the agent will follow, and pass its slug as recipe on generate_video. Each recipe carries the complete validated workflow: script structure and word limits, media verification via media (action: check) for photo URLs, pricing rules for the overlay badge, and the generation and publish steps. Unknown slugs fail with the list of valid slugs — call prompts (action: list) first when unsure.';
43
43
  export const GetPromptShape = {
44
- slug: z.string().min(1, 'slug is required').describe('Prompt slug from list_prompts.'),
44
+ slug: z.string().min(1, 'slug is required').describe('Prompt slug from prompts (action: list).'),
45
45
  };
46
46
  const GetPromptSchema = z.object(GetPromptShape);
47
47
  export async function handleGetPrompt(client, args) {
48
48
  const parsed = GetPromptSchema.safeParse(args);
49
49
  if (!parsed.success) {
50
- return errorResponse('getting prompt', 'slug is required. Call list_prompts for the valid slugs.');
50
+ return errorResponse('getting prompt', 'slug is required. Call prompts (action: list) for the valid slugs.');
51
51
  }
52
52
  try {
53
53
  const prompt = await getPrompt(client, parsed.data.slug);
@@ -63,28 +63,28 @@ function errorResponse(action, message) {
63
63
  return { content: [{ type: 'text', text: `Error ${action}: ${message}` }], isError: true };
64
64
  }
65
65
  //---------------
66
- // Registration lives here (not in index.ts, which sits at the file-size
67
- // cap). Both tools run inside the server's RecipeSession: their requests
68
- // carry the recipe-adoption headers, list_prompts marks the recipes as
69
- // known, and get_prompt records the slug once the API returned it.
70
- // Returns the session so index.ts wraps the entry and script tools with
71
- // the same one.
66
+ // Registration lives here (index.ts only wires the intent modules). The prompts tool runs inside the server's RecipeSession: its
67
+ // requests carry the recipe-adoption headers, `list` marks the recipes as
68
+ // known, and `get` records the slug once the API returned it. Returns the
69
+ // session so the other intent modules wrap the entry and script actions with the same one.
72
70
  //---------------
71
+ const PROMPTS_SPECS = { list: ListPromptsShape, get: GetPromptShape };
73
72
  export function registerPromptTools(server, client, transport) {
74
73
  const session = new RecipeSession(transport);
75
- server.tool('list_prompts', ListPromptsDescription, ListPromptsShape, READ_ONLY, withTracking('list_prompts', async () => {
76
- const response = await session.run(undefined, () => handleListPrompts(client));
77
- if (response.isError !== true)
78
- session.recordRecipesListed();
79
- return response;
80
- }));
81
- server.tool('get_prompt', GetPromptDescription, GetPromptShape, READ_ONLY, withTracking('get_prompt', async (args) => {
82
- const slug = GetPromptSchema.safeParse(args).data?.slug;
83
- const response = await session.run(slug, () => handleGetPrompt(client, args));
84
- if (response.isError !== true && slug !== undefined)
85
- session.recordRecipeFetched(slug);
86
- return response;
87
- }));
74
+ server.tool('prompts', actionDescription(`${ListPromptsDescription}\n${GetPromptDescription}`, PROMPTS_SPECS), actionShape(PROMPTS_SPECS), READ_ONLY, byAction({
75
+ list: async () => {
76
+ const response = await session.run(undefined, () => handleListPrompts(client));
77
+ if (response.isError !== true)
78
+ session.recordRecipesListed();
79
+ return response;
80
+ },
81
+ get: async (args) => {
82
+ const response = await session.run(args.slug, () => handleGetPrompt(client, args));
83
+ if (response.isError !== true && isRecipeSlug(args.slug))
84
+ session.recordRecipeFetched(args.slug);
85
+ return response;
86
+ },
87
+ }, PROMPTS_SPECS, 'prompts'));
88
88
  return session;
89
89
  }
90
90
  //# sourceMappingURL=tools-prompts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tools-prompts.js","sourceRoot":"","sources":["../src/tools-prompts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,sBAAsB,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACrF,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAG9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAyB,MAAM,qBAAqB,CAAC;AAE1F,+EAA+E;AAC/E,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAyB,MAAM,qBAAqB,CAAC;AAEhG,iBAAiB;AACjB,wDAAwD;AACxD,EAAE;AACF,2EAA2E;AAC3E,0EAA0E;AAC1E,sEAAsE;AACtE,wEAAwE;AACxE,0EAA0E;AAC1E,qEAAqE;AACrE,+DAA+D;AAC/D,iBAAiB;AAEjB,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AA2B;IAC5G,MAAM,OAAO,GAAG,IAAI,aAAa,CAAC,SAAS,CAAC,CAAC;IAC7C,MAAM,CAAC,IAAI,CACT,SAAS,EACT,iBAAiB,CAAC,GAAG,sBAAsB,KAAK,oBAAoB,EAAE,EAAE,aAAa,CAAC,EACtF,WAAW,CAAC,aAAa,CAAC,EAC1B,SAAS,EACT,QAAQ,CACN;QACE,IAAI,EAAE,KAAK,IAAI,EAAE;YACf,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC;YAC/E,IAAI,QAAQ,CAAC,OAAO,KAAK,IAAI;gBAAE,OAAO,CAAC,mBAAmB,EAAE,CAAC;YAC7D,OAAO,QAAQ,CAAC;QAClB,CAAC;QACD,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;YAClB,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;YACnF,IAAI,QAAQ,CAAC,OAAO,KAAK,IAAI,IAAI,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;gBAAE,OAAO,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACjG,OAAO,QAAQ,CAAC;QAClB,CAAC;KACF,EACD,aAAa,EACb,SAAS,CACV,CACF,CAAC;IACF,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -2,9 +2,6 @@ import type { z } from 'zod';
2
2
  import type { PostEngineerClient } from './client.js';
3
3
  import { CompleteVideoUploadSchema, CreateVideoUploadSchema, PublishUploadedVideoSchema } from './publish-uploaded-shape.js';
4
4
  import { type McpToolResponse } from './tools-call.js';
5
- export declare const CreateVideoUploadDescription = "Mint a short-lived signed upload for one video (MP4 or MOV, max 2GB): returns an uploadId plus a signedUrl to PUT the video bytes to directly (the bytes never pass through this server), bound to your account and expiring in 15 minutes. Then call complete_video_upload, then publish_uploaded_video with the uploadId.";
6
- export declare const CompleteVideoUploadDescription = "Verify a signed video upload after its bytes were PUT to the signedUrl from create_video_upload: the server checks the real video content (magic bytes) and size, and marks the upload ready to publish. Completing an already-ready upload is safe to retry.";
7
- export declare const PublishUploadedVideoDescription = "Publish a completed signed-upload video directly to social accounts by uploadId \u2014 no generation, no schedule, no local path. Single-use: one publish consumes the upload. YouTube requires title, description, tags, and privacyStatus; Rumble and Fanvue require title and description; Instagram/Bluesky/LinkedIn/Threads/Facebook/3Speak require caption; Pinterest requires boardId (plus description or caption). Create the upload first with create_video_upload and verify it with complete_video_upload.";
8
5
  export declare function handleCreateVideoUpload(client: PostEngineerClient, args: z.infer<typeof CreateVideoUploadSchema>): Promise<McpToolResponse>;
9
6
  export declare function handleCompleteVideoUpload(client: PostEngineerClient, args: z.infer<typeof CompleteVideoUploadSchema>): Promise<McpToolResponse>;
10
7
  export declare function handlePublishUploadedVideo(client: PostEngineerClient, args: z.infer<typeof PublishUploadedVideoSchema>): Promise<McpToolResponse>;
@@ -4,18 +4,15 @@ import { CompleteVideoUploadSchema, CreateVideoUploadSchema, PublishUploadedVide
4
4
  import { sanitizeEngineError } from './tools.js';
5
5
  import { handleLibraryCall } from './tools-call.js';
6
6
  //---------------
7
- // Signed-upload publish tools (issue #561): the JSON-only remote flow
8
- // that replaces publish_video_direct's local videoPath. Kept in a new
9
- // module so tools.ts stays under the file-size ratchet; registration
10
- // lives in publish-uploaded-tools.ts. sanitizeEngineError is imported
11
- // from tools.ts (the same import cycle local-file-tools.ts already has
12
- // through tools.js — handlers run after module init).
7
+ // Signed-upload publish handlers (issue #561): the JSON-only remote flow
8
+ // that replaces the local videoPath of publish_video (action: from_file).
9
+ // Kept in a new module so tools.ts stays under the file-size ratchet; the
10
+ // publish_video tool registers them in intent-content.ts. sanitizeEngineError
11
+ // is imported from tools.ts (an import cycle through tools.js that is safe:
12
+ // handlers run after module init).
13
13
  //---------------
14
- export const CreateVideoUploadDescription = 'Mint a short-lived signed upload for one video (MP4 or MOV, max 2GB): returns an uploadId plus a signedUrl to PUT the video bytes to directly (the bytes never pass through this server), bound to your account and expiring in 15 minutes. Then call complete_video_upload, then publish_uploaded_video with the uploadId.';
15
- export const CompleteVideoUploadDescription = 'Verify a signed video upload after its bytes were PUT to the signedUrl from create_video_upload: the server checks the real video content (magic bytes) and size, and marks the upload ready to publish. Completing an already-ready upload is safe to retry.';
16
- export const PublishUploadedVideoDescription = 'Publish a completed signed-upload video directly to social accounts by uploadId — no generation, no schedule, no local path. Single-use: one publish consumes the upload. YouTube requires title, description, tags, and privacyStatus; Rumble and Fanvue require title and description; Instagram/Bluesky/LinkedIn/Threads/Facebook/3Speak require caption; Pinterest requires boardId (plus description or caption). Create the upload first with create_video_upload and verify it with complete_video_upload.';
17
14
  export async function handleCreateVideoUpload(client, args) {
18
- return handleLibraryCall(async () => createVideoUpload(client, CreateVideoUploadSchema.parse(args)), 'creating video upload', 'Signed video upload created. PUT the video bytes to signedUrl before it expires, then call complete_video_upload');
15
+ return handleLibraryCall(async () => createVideoUpload(client, CreateVideoUploadSchema.parse(args)), 'creating video upload', 'Signed video upload created. PUT the video bytes to signedUrl before it expires, then call publish_video (action: complete_upload)');
19
16
  }
20
17
  export async function handleCompleteVideoUpload(client, args) {
21
18
  return handleLibraryCall(async () => completeVideoUpload(client, CompleteVideoUploadSchema.parse(args).uploadId), 'completing video upload', 'Video upload verified and ready to publish');