hollerpost-mcp 0.6.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,51 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.7.1 (2026-11-13)
4
+
5
+ - Edits to a published page through the API now wait as a draft unless the
6
+ person approved publishing: the public page keeps its approved version.
7
+ `page_link_add`, `page_link_update`, `page_link_remove` and
8
+ `page_links_reorder` take `confirm_publish: true` (after approval) like
9
+ `page_update` and the event tools. Responses say `saved_as_draft: true`
10
+ when a change is waiting.
11
+
12
+ ## 0.7.0 (2026-11-13)
13
+
14
+ Launchpad through the existing Your page API and scopes, plus the new page looks.
15
+
16
+ - `page_update` theme: `linkStyle` (`button` default, `outline`, `pill`,
17
+ `todo`, `checklist`, `microchip`, `clouds`, `ticket`), `accentColor`,
18
+ `backgroundStyle` (`solid`, `gradient`, `glow`, `dots`, `grid`, `lined`,
19
+ `stripes`, `checker`, `sunburst`), `headingFont`, `layout` (`centered`,
20
+ `left`, `card`) and the larger body font list. The theme replaces the saved
21
+ one, so send every field to keep; the API checks contrast.
22
+
23
+ - `campaign_draft` and `campaign_update` accept an exclusive
24
+ `{ "signup_form_id": "<UUID>" }` audience, discovered in `segments_list`
25
+ `audiences`. It selects confirmed, active, unsuppressed subscribers at
26
+ queue time; drafts never snapshot contact IDs.
27
+ - `launchpad_get` names `confirmed_signups`, `emailable_subscribers` and
28
+ `awaiting_confirmation` in its human-readable output.
29
+ - Waitlist audience requires the L-25 worker and
30
+ `20261111170000_signup_form_campaign_audience.sql`.
31
+ - `launchpad_get` (`read`): the Launchpad card, including confirmed, this
32
+ week, pending, queued, confirmation allowance, list size versus plan emails,
33
+ share URL and mode. Uses the new `GET /api/v1/launchpad` adapter.
34
+ - `launchpad_update` (`draft`): save waitlist copy, count visibility, launch
35
+ note, primary link and waitlist/standard mode. Uses `PATCH /api/v1/page`
36
+ with `X-Hollerpost-Save: draft`; preserves the previous public snapshot
37
+ without publishing changes or taking the page down.
38
+ - `launchpad_go_live` (`draft`): after the person approves the launch note
39
+ and primary link, requires literal `confirm: true` and sends the publish
40
+ confirmation header. Reports `pending_review`, `moderation_status` and
41
+ `owner_reason` plainly, including when an older page remains public.
42
+ - `page_update` also accepts the existing waitlist fields. The API requires
43
+ publish confirmation for `mode: live` as well as `published: true`.
44
+ - Read/write/publication annotations are included in tool listings; server
45
+ instructions retain the person's approval for anything public and explain
46
+ automatic checks/review holds. Field validation errors name the field and
47
+ message; rate limits tell the agent to wait; review holds are not retried.
48
+
3
49
  ## 0.6.0 (2026-11-11)
4
50
 
5
51
  Texting setup with an agent, not just status.
package/README.md CHANGED
@@ -146,7 +146,10 @@ If a tool needs a scope the key lacks, the tool answers `insufficient_scope`, na
146
146
  | `survey_update` | draft | Edit a survey, or open or close it |
147
147
  | `billing_portal_link` | account | A short-lived Stripe portal link for the person to open |
148
148
  | `page_get` | read | Read Your page, links, calendar events and plan settings |
149
- | `page_update` | draft | Save page fields via `updates`; publishing changes the public page immediately and needs `confirm_publish: true` after the person approves |
149
+ | `page_update` | draft | Save page fields via `updates`, including waitlist fields; publication needs `confirm_publish: true` after the person approves and may be held for review |
150
+ | `launchpad_get` | read | Read confirmed/this-week/pending/queued counts, confirmation allowance, list size vs plan emails, share URL and mode |
151
+ | `launchpad_update` | draft | Save waitlist headline/pitch, count visibility, launch note, primary link and waitlist/standard mode as a draft; does not publish |
152
+ | `launchpad_go_live` | draft | Request live mode and publication after the person approves the launch note and primary link (`confirm: true`); reports review holds plainly |
150
153
  | `page_link_add` | draft | Add a HTTPS link via `link` (max 30) |
151
154
  | `page_link_update` | draft | Update a link by `id` and `updates` |
152
155
  | `page_link_remove` | draft | Permanently remove a link (`confirm: true`) |
@@ -165,6 +168,49 @@ when no page exists. Claim a handle in the dashboard before publishing.
165
168
  Arrays in page updates replace the existing arrays. The two removal/cancel
166
169
  tools have `destructiveHint: true`; page/event reads have `readOnlyHint: true`.
167
170
 
171
+ Launchpad is a mode of Your page at the same handle, using the same signup
172
+ pipeline. `launchpad_get` uses `GET /api/v1/launchpad`, with the same response
173
+ as the dashboard card, and the existing tenant-key, `read` scope and
174
+ `mcp_enabled` rollout gates. The card has its own 60 reads/minute per workspace
175
+ per Worker isolate limit in addition to the API-key rate limit; a 429 preserves
176
+ `Retry-After` and tells the agent to wait.
177
+
178
+ Waitlist fields already use `PATCH /api/v1/page` (`draft` scope):
179
+ `waitlist_headline` (120 characters), `waitlist_pitch` (2,000), `show_count`
180
+ (boolean), `launch_note` (500), `primary_link_id` (workspace link UUID or null),
181
+ and `mode` (`standard`, `waitlist`, `live`). API validation trims text and checks
182
+ the merged saved page; live mode needs an enabled, safe HTTPS primary link.
183
+ `page_update` accepts these fields in `updates`.
184
+
185
+ `page_update` also accepts `theme.linkStyle`, the look of the page's links:
186
+ `button` (default, solid buttons), `outline`, `pill`, `todo` (to-do list rows
187
+ with an empty box), `checklist` (rows with a ticked box), `microchip`
188
+ (cyberpunk chips), `clouds` or `ticket`. Every style uses the theme colors, and
189
+ the main link and signup button stay solid. Social links show as icons.
190
+
191
+ `launchpad_update` sends `X-Hollerpost-Save: draft` and cannot set live mode.
192
+ That opt-in draft-save header skips publication checks and preserves any
193
+ previous approved public snapshot; it also refuses a `published` field. A
194
+ normal PATCH without that header retains the existing behavior of checking
195
+ and publishing edits to an already-public page. Draft saves do not take it down.
196
+ To publish a waitlist draft after approval, use `page_update` with
197
+ `updates: {published: true}` and `confirm_publish: true`.
198
+
199
+ Before `launchpad_go_live`, use `page_get`, show the person the saved launch
200
+ note and selected primary link's label and URL, and wait for a clear yes.
201
+ The tool then sends `{mode: "live", published: true}` with
202
+ `X-Hollerpost-Confirm: publish`. The API requires that header for
203
+ `published: true` or `mode: "live"`; `page_update` uses `confirm_publish: true`.
204
+ HTTP 200 means saved, not necessarily live: a held response includes
205
+ `pending_review`, `moderation_status` and `owner_reason`. Tell the person the
206
+ changes are held and why; an older approved page can remain public. Never
207
+ retry or bypass a review hold. A 422 names the offending field and message.
208
+
209
+ Launchpad annotations (`readOnlyHint`, `destructiveHint`, `idempotentHint`,
210
+ `openWorldHint`, in that order) are `true/false/true/false` for `launchpad_get`,
211
+ `false/false/true/false` for `launchpad_update`, and `false/true/false/true` for
212
+ `launchpad_go_live`.
213
+
168
214
  Resources (context a client can attach without a tool call): `hollerpost://brand`, `hollerpost://templates`, `hollerpost://quota`, `hollerpost://domains`.
169
215
 
170
216
  Prompts: `setup_workspace`, `write_campaign`, `weekly_report`, `fix_domain`, `clean_list`.
@@ -177,6 +223,7 @@ These are built into the server and the API, not left to the agent:
177
223
  - **Audience count check.** `campaign_schedule` must pass the count you were shown. If the live audience differs by more than 5% the API refuses (`audience_changed`) and the agent has to ask again.
178
224
  - **Literal confirmations.** `confirm` on `campaign_schedule` and `domain_remove`, and `consent` on `contacts_add`, must be the literal value `true`; the call cannot be formed without them.
179
225
  - **First campaign review.** A new workspace's first campaign is held for a one-time human review by the Hollerpost team. `campaign_schedule` then reports `review_pending`, says plainly that nothing was sent, and tells the agent not to retry.
226
+ - **Launchpad approval and checks.** Going live requires the person's approval and literal `confirm: true`. Automatic checks can hold publication for review; the tool reports the held state and owner reason without claiming the launch is live.
180
227
  - **Consent.** Contacts can only be added with `consent: true`, and addresses that unsubscribed, bounced or complained can never be re-added.
181
228
  - **No money moves.** No tool changes a plan, buys a send pack or touches a card. `billing_portal_link` hands back a URL for you to open in your browser. This is a permanent rule.
182
229
  - **Almost nothing destructive.** There is no contact delete, campaign delete or webhook delete. `domain_remove`, `page_link_remove` and `event_cancel` require `confirm: true`; domain removal is refused while a campaign is scheduled on the domain. `campaign_cancel` is the undo for a scheduled send.
package/dist/format.js CHANGED
@@ -86,6 +86,9 @@ export function smsCheckProblems(checks) {
86
86
  export function describeApiError(err) {
87
87
  const b = err.body;
88
88
  const head = `Hollerpost API error "${err.code}"${err.status ? ` (HTTP ${err.status})` : ''}.`;
89
+ if (err.status === 422 && typeof b.field === 'string') {
90
+ return `${head} ${b.field}: ${typeof b.message === 'string' ? b.message : err.code}`;
91
+ }
89
92
  switch (err.code) {
90
93
  case 'missing_api_key':
91
94
  if (!err.local) {
@@ -103,13 +106,17 @@ export function describeApiError(err) {
103
106
  }
104
107
  case 'rate_limited': {
105
108
  const secs = typeof b.retry_after_seconds === 'number' ? ` Try again in about ${b.retry_after_seconds} seconds.` : '';
106
- return `${head} The key hit its request rate limit and one automatic retry did not clear it.${secs}`;
109
+ return `${head} The request rate limit was reached. Wait before trying again.${secs}`;
107
110
  }
108
111
  case 'image_limit_reached': {
109
112
  const msg = typeof b.message === 'string' ? ` ${b.message}` : '';
110
113
  return `${head}${msg} Nothing was stored. Do not retry now. Reuse the url of an image you already uploaded, or tell the person the limit was reached.`;
111
114
  }
115
+ case 'pending_review':
112
116
  case 'review_pending': {
117
+ if (typeof b.owner_reason === 'string' || typeof b.moderation_status === 'string') {
118
+ return `${head} The page changes are held for review; this launch is not live.${typeof b.owner_reason === 'string' ? ` ${b.owner_reason}` : ''} Do not retry or bypass the hold.`;
119
+ }
113
120
  const id = typeof b.campaign_id === 'string' ? ` Campaign ${b.campaign_id}` : ' The campaign';
114
121
  return `${head}${id} was NOT sent. A workspace's first campaign is held for a one-time human review by the Hollerpost team (status "held_for_review"). It goes out after it is approved, and later campaigns schedule normally. Tell the person it is waiting for review. Do not retry, and do not create a duplicate campaign to get around the review.`;
115
122
  }
package/dist/server.js CHANGED
@@ -12,6 +12,7 @@ export const SERVER_INSTRUCTIONS = [
12
12
  'Start with workspace_info to learn the plan, the key scopes and the brand voice.',
13
13
  'Campaigns are created as drafts. Before campaign_schedule always run campaign_preview, tell the person the audience count and quota use, and wait for a yes.',
14
14
  'A workspace first campaign is held for a one-time human review (review_pending): it is not sent yet, do not retry.',
15
+ 'Launchpad pages publish after automatic checks and may be held for review; show the person the launch note and primary link and wait for their approval before going live. Anything that goes public needs the person\'s approval.',
15
16
  'Pictures: store each one with email_image_upload (from a public URL or the file itself), then use the URL as image_url, a section image or an image line in body_md. Several products or stories go in blocks.sections, one per item.',
16
17
  'Surveys: survey_create makes a draft survey; campaign_draft can ask one of its rating, nps or single-choice questions in the email; open the survey with survey_update before testing or scheduling; read answers with survey_results.',
17
18
  'Only add contacts who agreed to receive email. No tool can change billing; billing_portal_link gives the person a link.',
package/dist/tools.js CHANGED
@@ -84,18 +84,19 @@ const blocksSchema = z
84
84
  .describe('Content blocks for the template. Check templates_list for the blocks_schema of the template you pick. Never send raw HTML: Hollerpost renders the blocks with the brand header, footer, unsubscribe link and address. The plain template takes no images.');
85
85
  const audienceSchema = z
86
86
  .union([
87
+ z.object({ signup_form_id: z.string().uuid().describe('Form UUID from segments_list audiences or page_get. Only confirmed, active, unsuppressed email subscribers from this form, resolved when sending.') }).strict(),
87
88
  z.object({
88
89
  // The API's preview count and schedule both use an overlap match for
89
90
  // API/MCP callers (worker/routes/api-v1.js apiAudienceCount and the
90
91
  // tagsAny option of queueCampaignHandler): a contact with any one of the
91
92
  // listed tags is included. The dashboard keeps its ALL-of match.
92
93
  tags: z.array(z.string().min(1)).min(1).describe('Send to subscribed contacts that have ANY of these tags (one tag is the usual case). Get tags from segments_list.'),
93
- }),
94
+ }).strict(),
94
95
  z.object({
95
96
  all: z.literal(true).describe('Send to every subscribed contact in the workspace.'),
96
- }),
97
+ }).strict(),
97
98
  ])
98
- .describe('Who gets it: {"tags": ["vip"]} for tagged contacts, or {"all": true} for every subscribed contact.');
99
+ .describe('Who gets it: {"tags": ["vip"]} for tagged contacts, or {"all": true} for every subscribed contact, or {"signup_form_id": "<UUID>"} for a waitlist.');
99
100
  const campaignStatus = z.enum(['draft', 'scheduled', 'sending', 'sent', 'held_for_review', 'canceled']);
100
101
  const surveyId = z.string().uuid().describe('Survey id (a UUID), as returned by survey_create or surveys_list.');
101
102
  const surveyRef = z
@@ -209,7 +210,14 @@ function verifyLines(domain) {
209
210
  .join('\n');
210
211
  }
211
212
  // ---------------------------------------------------------------------------
212
- // The 29 tools
213
+ // Tool schemas and definitions
214
+ const launchpadFields = {
215
+ waitlist_headline: z.string().max(120).optional(),
216
+ waitlist_pitch: z.string().max(2000).optional(),
217
+ show_count: z.boolean().optional(),
218
+ launch_note: z.string().max(500).optional(),
219
+ primary_link_id: z.string().uuid().nullable().optional().describe('An enabled, safe HTTPS page link in this workspace. Required for live mode; null clears it.'),
220
+ };
213
221
  const pageLinkSchema = z.object({
214
222
  label: z.string().min(1).max(80), url: z.string().max(2048),
215
223
  thumbnail_url: z.union([z.string().max(2048), z.null()]).optional(), starts_at: z.union([z.string().max(2048), z.null()]).optional(),
@@ -222,33 +230,82 @@ const pageEventSchema = z.object({
222
230
  online_url: z.union([z.string().max(2048), z.null()]).optional(), ticket_url: z.union([z.string().max(2048), z.null()]).optional(), image_url: z.union([z.string().max(2048), z.null()]).optional(),
223
231
  status: z.enum(['draft', 'published', 'canceled']).optional(), show_on_page: z.boolean().optional(),
224
232
  });
233
+ // Your page fonts (L-43). Must match PAGE_FONTS and HEADING_FONTS in the API's
234
+ // src/lib/page/validation.js (worker/page-themes.test.mjs checks).
235
+ const PAGE_BODY_FONTS = ['Nunito Sans', 'Nunito', 'sans-serif', 'serif', 'monospace', 'Arial', 'Georgia', 'Lora', 'Outfit', 'Manrope', 'Bricolage Grotesque', 'Space Mono'];
236
+ const PAGE_HEADING_FONTS = ['body', 'Fraunces', 'Instrument Serif', 'Lora', 'Outfit', 'Manrope', 'Bricolage Grotesque', 'Nunito', 'Nunito Sans', 'Unbounded', 'Caveat', 'Pacifico', 'Space Mono'];
225
237
  const pageUpdateSchema = z.object({
238
+ ...launchpadFields, mode: z.enum(['standard', 'waitlist', 'live']).optional(),
226
239
  title: z.string().max(120).optional(), tagline: z.string().max(240).optional(), avatar_url: z.union([z.string().max(2048), z.null()]).optional(),
227
- theme: z.object({ brandColor: z.string().optional(), backgroundColor: z.string().optional(), textColor: z.string().optional(), buttonTextColor: z.string().optional(), fontFamily: z.string().optional(), buttonRadius: z.number().int().min(0).max(40).optional() }).optional(),
240
+ theme: z.object({ brandColor: z.string().optional(), backgroundColor: z.string().optional(), textColor: z.string().optional(), buttonTextColor: z.string().optional(), fontFamily: z.enum(PAGE_BODY_FONTS).optional().describe('Body text font.'), buttonRadius: z.number().int().min(0).max(40).optional(), linkStyle: z.enum(['button', 'outline', 'pill', 'todo', 'checklist', 'microchip', 'clouds', 'ticket']).optional().describe('How the page links look. button: solid buttons (default). outline: outlined buttons. pill: round pills with an arrow. todo: to-do list rows with an empty box. checklist: rows with a ticked box. microchip: cyberpunk chips with notched corners. clouds: puffy cloud shapes. ticket: admission tickets with notched sides. Colors come from the theme; the main link and signup button stay solid.'), accentColor: z.string().regex(/^#[0-9a-fA-F]{6}$/).optional().describe('Six-digit hex accent for background patterns and details.'), backgroundStyle: z.enum(['solid', 'gradient', 'glow', 'dots', 'grid', 'lined', 'stripes', 'checker', 'sunburst']).optional().describe('Background behind the page. Text keeps 4.5:1 contrast against the pattern too (the API checks).'), headingFont: z.enum(PAGE_HEADING_FONTS).optional().describe('Headline font. body means the same as fontFamily.'), layout: z.enum(['centered', 'left', 'card']).optional().describe('centered, left aligned, or the page on a card over the background.') }).describe('The whole look. Send every field you want to keep: the theme replaces the saved one. A theme without accentColor, backgroundStyle, headingFont and layout keeps the classic look.').optional(),
228
241
  show_badge: z.boolean().optional(), signup_form_id: z.string().uuid().nullable().optional(),
229
242
  socials: z.array(z.object({ network: z.enum(['instagram', 'tiktok', 'facebook', 'youtube', 'x', 'threads', 'bluesky', 'linkedin', 'pinterest', 'snapchat', 'twitch', 'discord', 'whatsapp', 'spotify', 'website']), url: z.string() })).max(15).optional(),
230
243
  info: z.object({ website: z.union([z.string().max(2048), z.null()]).optional(), phone: z.string().optional(), email: z.string().optional(), address_mode: z.enum(['none', 'city', 'full']).optional(), hours: z.string().optional() }).optional(),
231
244
  show_events: z.boolean().optional(), published: z.boolean().optional(),
232
245
  });
233
246
  const PAGE_DESTRUCTIVE = { ...WRITE_IDEMPOTENT, destructiveHint: true };
247
+ function launchpadPublicationLead(data) {
248
+ const status = get(data, 'moderation_status');
249
+ if (get(data, 'pending_review') === true || status === 'pending_review' || status === 'review_pending' || status === 'rejected' || status === 'unpublished') {
250
+ const reason = get(data, 'owner_reason') || get(data, 'moderation_reason');
251
+ return `Launchpad changes are saved and held${status === 'rejected' ? ' after review' : ' for review'}; this launch is not live.${reason ? ` ${reason}` : ''} An older approved page may still be public. Do not retry or bypass the hold.`;
252
+ }
253
+ return get(data, 'published') === true && status === 'published'
254
+ ? 'Launchpad is live: the automatic publication checks passed.'
255
+ : 'Launchpad changes saved; publication is not confirmed. Check page_get before saying the launch is live.';
256
+ }
234
257
  export const TOOLS = [
258
+ defineTool({
259
+ name: 'launchpad_get', title: 'Get Launchpad', scope: 'read',
260
+ description: 'Read the Launchpad card: confirmed_signups, emailable_subscribers, awaiting_confirmation, confirmed this week and queued confirmations, confirmation allowance, list size versus plan emails, share URL and page mode. Launchpad is a mode of Your page.',
261
+ input: {}, annotations: READ, untrusted: true,
262
+ run: async (api) => {
263
+ const data = await api.request('GET', '/launchpad');
264
+ return { lead: `Launchpad: confirmed_signups=${get(data, 'confirmed_signups') ?? 'unavailable'}, emailable_subscribers=${get(data, 'emailable_subscribers') ?? 'unavailable'}, awaiting_confirmation=${get(data, 'awaiting_confirmation') ?? 'unavailable'}.`, data };
265
+ },
266
+ }),
267
+ defineTool({
268
+ name: 'launchpad_update', title: 'Update Launchpad draft', scope: 'draft',
269
+ description: 'Save Launchpad headline, pitch, count visibility, launch note, primary link or mode (waitlist or standard). Omitted fields stay unchanged. Saves a draft only, including when an older approved page is public. Does not publish. Use page_get to read the saved launch note and primary link before asking the person to go live.',
270
+ input: { ...launchpadFields, mode: z.enum(['waitlist', 'standard']).optional() },
271
+ annotations: WRITE_IDEMPOTENT, untrusted: true,
272
+ run: async (api, args) => {
273
+ const body = Object.fromEntries(Object.entries(args).filter(([, v]) => v !== undefined));
274
+ if (!Object.keys(body).length)
275
+ throw new InputError('Nothing to update: pass at least one Launchpad field.');
276
+ const data = await api.request('PATCH', '/page', { body, headers: { 'X-Hollerpost-Save': 'draft' } });
277
+ return { lead: 'Launchpad draft saved. These changes have not been published.', data };
278
+ },
279
+ }),
280
+ defineTool({
281
+ name: 'launchpad_go_live', title: 'Launchpad go live', scope: 'draft',
282
+ description: 'Switch Your page to live mode and request publication after automatic checks. First use page_get, show the person the saved launch note and primary link (label and URL), and wait for a clear yes. Requires confirm: true after that approval and a claimed handle with an enabled safe HTTPS primary link. A pending_review or review_pending hold is not live: explain owner_reason, do not retry or bypass review. Sends no campaign.',
283
+ input: { confirm: z.literal(true).describe('true only after the person saw the launch note and primary link and approved going live.') },
284
+ annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true }, untrusted: true,
285
+ run: async (api, { confirm }) => {
286
+ if (confirm !== true)
287
+ throw new InputError('Going live requires confirm: true after the person approves the launch note and primary link.');
288
+ const data = await api.request('PATCH', '/page', { body: { mode: 'live', published: true }, headers: { 'X-Hollerpost-Confirm': 'publish' } });
289
+ return { lead: launchpadPublicationLead(data), data };
290
+ },
291
+ }),
235
292
  defineTool({ name: 'page_get', title: 'Get Your page', scope: 'read', description: 'Read Your page, links, events, handle and plan settings. An unsaved draft from the brand kit is returned if no page exists.', input: {}, annotations: READ, untrusted: true,
236
293
  run: async (api) => ({ lead: 'Your page and workspace settings.', data: await api.request('GET', '/page') }) }),
237
- defineTool({ name: 'page_update', title: 'Update Your page', scope: 'draft', description: 'Update Your page fields. Arrays replace existing values. Publishing (published: true) changes the public page immediately: ask the person first and pass confirm_publish: true. Requires a claimed handle; Free must show the badge. HTTPS destinations and contrast are enforced by the API.', input: { updates: pageUpdateSchema, confirm_publish: z.literal(true).optional().describe('true only after the person explicitly approved publishing; required whenever this call publishes.') }, annotations: WRITE_IDEMPOTENT, untrusted: true,
294
+ defineTool({ name: 'page_update', title: 'Update Your page', scope: 'draft', description: 'Update Your page fields, including Launchpad waitlist fields. Arrays replace existing values. Publishing (published: true or mode: live) needs the person\'s approval and confirm_publish: true. Without it, edits to a page that is already published are saved as a draft and the public page keeps its approved version. Automatic checks may hold changes for review; inspect pending_review, moderation_status and owner_reason before claiming publication. Requires a claimed handle; Free must show the badge. HTTPS destinations and contrast are enforced by the API.', input: { updates: pageUpdateSchema, confirm_publish: z.literal(true).optional().describe('true only after the person explicitly approved publishing; required whenever this call publishes.') }, annotations: WRITE_IDEMPOTENT, untrusted: true,
238
295
  run: async (api, { updates, confirm_publish }) => ({ lead: 'Your page updated.', data: await api.request('PATCH', '/page', { body: updates, ...(confirm_publish ? { headers: { 'X-Hollerpost-Confirm': 'publish' } } : {}) }) }) }),
239
- defineTool({ name: 'page_link_add', title: 'Add page link', scope: 'draft', description: 'Add a HTTPS link to Your page (maximum 30). Known URL shorteners are refused. Visible immediately on published pages unless disabled or scheduled.', input: { link: pageLinkSchema }, annotations: WRITE_SAFE, untrusted: true,
240
- run: async (api, { link }) => ({ lead: 'Page link added.', data: await api.request('POST', '/page/links', { body: link }) }) }),
241
- defineTool({ name: 'page_link_update', title: 'Update page link', scope: 'draft', description: 'Update a workspace page link by ID. Omitted fields stay unchanged.', input: { id: z.string().uuid(), updates: pageLinkSchema.partial() }, annotations: WRITE_IDEMPOTENT, untrusted: true,
242
- run: async (api, { id, updates }) => ({ lead: 'Page link updated.', data: await api.request('PATCH', `/page/links/${seg(id)}`, { body: updates }) }) }),
243
- defineTool({ name: 'page_link_remove', title: 'Remove page link', scope: 'draft', description: 'Permanently remove a page link. Ask for confirmation before calling; requires confirm: true.', input: { id: z.string().uuid(), confirm: z.literal(true) }, annotations: PAGE_DESTRUCTIVE,
244
- run: async (api, { id }) => ({ lead: 'Page link removed.', data: await api.request('DELETE', `/page/links/${seg(id)}`) }) }),
245
- defineTool({ name: 'page_links_reorder', title: 'Reorder page links', scope: 'draft', description: 'Replace link ordering. Include every workspace link ID exactly once.', input: { ids: z.array(z.string().uuid()).max(30) }, annotations: WRITE_IDEMPOTENT,
246
- run: async (api, { ids }) => ({ lead: 'Page links reordered.', data: await api.request('PUT', '/page/links/order', { body: { ids } }) }) }),
296
+ defineTool({ name: 'page_link_add', title: 'Add page link', scope: 'draft', description: 'Add a HTTPS link to Your page (maximum 30). Known URL shorteners are refused. On a published page the change is saved as a draft and the public page keeps its approved version until the person approves publishing; then pass confirm_publish: true.', input: { link: pageLinkSchema, confirm_publish: z.literal(true).optional().describe('true only after the person explicitly approved publishing; without it, changes to a published page wait as a draft.') }, annotations: WRITE_SAFE, untrusted: true,
297
+ run: async (api, { link, confirm_publish }) => ({ lead: 'Page link added.', data: await api.request('POST', '/page/links', { body: link, ...(confirm_publish ? { headers: { 'X-Hollerpost-Confirm': 'publish' } } : {}) }) }) }),
298
+ defineTool({ name: 'page_link_update', title: 'Update page link', scope: 'draft', description: 'Update a workspace page link by ID. Omitted fields stay unchanged. On a published page the change is saved as a draft and the public page keeps its approved version until the person approves publishing; then pass confirm_publish: true.', input: { id: z.string().uuid(), updates: pageLinkSchema.partial(), confirm_publish: z.literal(true).optional().describe('true only after the person explicitly approved publishing; without it, changes to a published page wait as a draft.') }, annotations: WRITE_IDEMPOTENT, untrusted: true,
299
+ run: async (api, { id, updates, confirm_publish }) => ({ lead: 'Page link updated.', data: await api.request('PATCH', `/page/links/${seg(id)}`, { body: updates, ...(confirm_publish ? { headers: { 'X-Hollerpost-Confirm': 'publish' } } : {}) }) }) }),
300
+ defineTool({ name: 'page_link_remove', title: 'Remove page link', scope: 'draft', description: 'Permanently remove a page link. Ask for confirmation before calling; requires confirm: true. On a published page the change is saved as a draft and the public page keeps its approved version until the person approves publishing; then pass confirm_publish: true.', input: { id: z.string().uuid(), confirm: z.literal(true), confirm_publish: z.literal(true).optional().describe('true only after the person explicitly approved publishing; without it, changes to a published page wait as a draft.') }, annotations: PAGE_DESTRUCTIVE,
301
+ run: async (api, { id, confirm_publish }) => ({ lead: 'Page link removed.', data: await api.request('DELETE', `/page/links/${seg(id)}`, { ...(confirm_publish ? { headers: { 'X-Hollerpost-Confirm': 'publish' } } : {}) }) }) }),
302
+ defineTool({ name: 'page_links_reorder', title: 'Reorder page links', scope: 'draft', description: 'Replace link ordering. Include every workspace link ID exactly once. On a published page the change is saved as a draft and the public page keeps its approved version until the person approves publishing; then pass confirm_publish: true.', input: { ids: z.array(z.string().uuid()).max(30), confirm_publish: z.literal(true).optional().describe('true only after the person explicitly approved publishing; without it, changes to a published page wait as a draft.') }, annotations: WRITE_IDEMPOTENT,
303
+ run: async (api, { ids, confirm_publish }) => ({ lead: 'Page links reordered.', data: await api.request('PUT', '/page/links/order', { body: { ids }, ...(confirm_publish ? { headers: { 'X-Hollerpost-Confirm': 'publish' } } : {}) }) }) }),
247
304
  defineTool({ name: 'event_list', title: 'List calendar events', scope: 'read', description: 'List workspace calendar events, including upcoming and the past 90 days. These are calendar events, not email delivery events.', input: {}, annotations: READ, untrusted: true,
248
305
  run: async (api) => ({ lead: 'Workspace calendar events.', data: await api.request('GET', '/page/events') }) }),
249
306
  defineTool({ name: 'event_create', title: 'Create calendar event', scope: 'draft', description: 'Create a calendar event. Defaults to draft. Status published shows it on Your page right away: ask the person first and pass confirm_publish: true. Use an IANA timezone and ISO dates with offsets.', input: { event: pageEventSchema, confirm_publish: z.literal(true).optional().describe('true only after the person explicitly approved publishing; required whenever this call publishes.') }, annotations: WRITE_SAFE, untrusted: true,
250
307
  run: async (api, { event, confirm_publish }) => ({ lead: 'Calendar event created.', data: await api.request('POST', '/page/events', { body: event, ...(confirm_publish ? { headers: { 'X-Hollerpost-Confirm': 'publish' } } : {}) }) }) }),
251
- defineTool({ name: 'event_update', title: 'Update calendar event', scope: 'draft', description: 'Update a calendar event by ID. Fields omitted are unchanged. Changes to a published event affect Your page. Setting status published needs the person\'s approval and confirm_publish: true.', input: { id: z.string().uuid(), updates: pageEventSchema.omit({ status: true }).extend({ status: z.enum(['draft', 'published']).optional() }).partial(), confirm_publish: z.literal(true).optional().describe('true only after the person explicitly approved publishing; required whenever this call publishes.') }, annotations: WRITE_IDEMPOTENT, untrusted: true,
308
+ defineTool({ name: 'event_update', title: 'Update calendar event', scope: 'draft', description: 'Update a calendar event by ID. Fields omitted are unchanged. Changes to a published event wait as a draft until the person approves publishing (confirm_publish: true). Setting status published needs the person\'s approval and confirm_publish: true.', input: { id: z.string().uuid(), updates: pageEventSchema.omit({ status: true }).extend({ status: z.enum(['draft', 'published']).optional() }).partial(), confirm_publish: z.literal(true).optional().describe('true only after the person explicitly approved publishing; required whenever this call publishes.') }, annotations: WRITE_IDEMPOTENT, untrusted: true,
252
309
  run: async (api, { id, updates, confirm_publish }) => ({ lead: 'Calendar event updated.', data: await api.request('PATCH', `/page/events/${seg(id)}`, { body: updates, ...(confirm_publish ? { headers: { 'X-Hollerpost-Confirm': 'publish' } } : {}) }) }) }),
253
310
  defineTool({ name: 'event_cancel', title: 'Cancel calendar event', scope: 'draft', description: 'Cancel an event and remove it from the public page, retaining its record. Ask for confirmation before calling; requires confirm: true.', input: { id: z.string().uuid(), confirm: z.literal(true) }, annotations: PAGE_DESTRUCTIVE, untrusted: true,
254
311
  run: async (api, { id }) => ({ lead: 'Calendar event canceled.', data: await api.request('PATCH', `/page/events/${seg(id)}`, { body: { status: 'canceled' } }) }) }),
@@ -377,7 +434,7 @@ export const TOOLS = [
377
434
  name: 'segments_list',
378
435
  title: 'List segments',
379
436
  scope: 'read',
380
- description: 'Lists contact tags with the number of subscribed contacts on each. Free and read only. Use it to choose a campaign audience by tag and to tell the person roughly how many people a send reaches.',
437
+ description: 'Lists contact tags and built-in waitlist audiences (signup_form_id) with subscribed counts. Free and read only. Use it to choose a campaign audience by tag or signup_form_id and to tell the person roughly how many people a send reaches.',
381
438
  input: {},
382
439
  annotations: READ,
383
440
  run: async (api) => {
@@ -1227,6 +1284,7 @@ export const TOOLS = [
1227
1284
  }),
1228
1285
  ];
1229
1286
  export const CORE_TOOL_NAMES = [
1287
+ 'launchpad_get', 'launchpad_update', 'launchpad_go_live',
1230
1288
  'page_get', 'page_update', 'page_link_add', 'page_link_update', 'page_link_remove', 'page_links_reorder', 'event_list', 'event_create', 'event_update', 'event_cancel',
1231
1289
  'workspace_info',
1232
1290
  'brand_get',
@@ -1275,6 +1333,13 @@ export async function runTool(def, api, args) {
1275
1333
  return okResult(outcome.lead, outcome.data, api.secrets, { untrusted: def.untrusted === true });
1276
1334
  }
1277
1335
  catch (err) {
1336
+ if (def.name === 'launchpad_go_live' && err instanceof ApiError && ['review_pending', 'pending_review'].includes(err.code)) {
1337
+ return errorResult(new ApiError(err.status, err.code, {
1338
+ ...err.body,
1339
+ moderation_status: 'pending_review',
1340
+ owner_reason: err.body.owner_reason ?? err.body.message ?? 'The page is waiting for review.',
1341
+ }), api.secrets);
1342
+ }
1278
1343
  return errorResult(err, api.secrets);
1279
1344
  }
1280
1345
  }
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "0.6.0";
1
+ export declare const VERSION = "0.7.1";
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // Kept in sync with package.json "version" (a test checks it).
2
- export const VERSION = '0.6.0';
2
+ export const VERSION = '0.7.1';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hollerpost-mcp",
3
- "version": "0.6.0",
3
+ "version": "0.7.1",
4
4
  "description": "MCP server for Hollerpost: let your own AI agent draft, preview, schedule and report on email campaigns in your Hollerpost workspace.",
5
5
  "license": "MIT",
6
6
  "type": "module",