@sellable/mcp 0.1.357 → 0.1.359

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.
@@ -6,7 +6,7 @@ async function postSetupEvergreenCampaigns(body) {
6
6
  export const setupEvergreenCampaignsToolDefinitions = [
7
7
  {
8
8
  name: "setup_evergreen_campaigns",
9
- description: "Evergreen campaign setup plan/verify command. Use plan mode first to inspect exact workspace/sender/campaign/table/source state and receive immutable lane packets. `selectedSenderIds` is a legacy shorthand for both scopes; prefer `postEngagerSenderIds` for the Post Engagers sender scope and `sharedSenderIds` for the shared lane sender scope when they differ. The command plans one Post Engagers lane per post-engager sender plus shared Signal Discovery and Shared Cold Fallback lanes for the shared sender set. yolo is only a parent-skill auto-execution hint for safe lane packets; this backend command remains read-only in plan mode and verifies receipts in verify mode. When safe-yolo needs normal setup work, the parent skill may ask for bounded delegated approval: one approval over the current planRevision, selected action ids, caps, allowed side-effect classes, and stop conditions lets lane workers execute without per-substep approval while staying inside that packet. Lane workers must execute creation, source import, create-campaign workflow steps, generate-messages, sequence attachment, and review readiness through existing create-campaign workflow/subskills, then return receipts here for verification. Customer-visible verify receipts must include createCampaignStepReceipt with setupPlanCall, campaignBriefReceipt, sourceDecisionReceipt, filterDecisionReceipt, messageDraftingReceipt, reviewBatchReceipt, sequenceReceipt, and verifyCall. messageDraftingReceipt must include validationResult:'passed', a passed qualityReview, and at least 3 concrete sampleMessages with row ids, generated message text, pass verdicts, and no issues; Shared Cold Fallback samples with a standalone name followed by 'Hey there' are rejected. This command does not launch campaigns, does not schedule sends, does not assign scheduler-owned send fields, does not archive/delete cleanup targets, and does not spend paid credits.",
9
+ description: "Evergreen campaign setup plan/verify command. Use plan mode first to inspect exact workspace/sender/campaign/table/source state and receive immutable lane packets. `selectedSenderIds` is a legacy shorthand for both scopes; prefer `postEngagerSenderIds` for the Post Engagers sender scope and `sharedSenderIds` for the shared lane sender scope when they differ. The command plans one Post Engagers lane per post-engager sender plus shared Signal Discovery and Shared Cold Fallback lanes for the shared sender set. yolo is only a parent-skill auto-execution hint for safe lane packets; this backend command remains read-only in plan mode and verifies receipts in verify mode. When safe-yolo needs normal setup work, the parent skill may ask for bounded delegated approval: one approval over the current planRevision, selected action ids, caps, allowed side-effect classes, and stop conditions lets lane workers execute without per-substep approval while staying inside that packet. Lane workers must execute creation, source import, create-campaign workflow steps, generate-messages, sequence attachment, pause_campaign review-state transition when the current table is still DRAFT, and review readiness through existing create-campaign workflow/subskills, then return receipts here for verification. Customer-visible verify receipts must include createCampaignStepReceipt with setupPlanCall, campaignBriefReceipt, sourceDecisionReceipt, filterDecisionReceipt, messageDraftingReceipt, reviewBatchReceipt, sequenceReceipt, and verifyCall. messageDraftingReceipt must use statusSource:'branch' or statusSource:'packaged-generate-messages-worker' and include proof that generate-messages was loaded, start_campaign_message_preparation/get_campaign_message_preparation_status ran when the packaged worker path is used, validationResult:'passed', a passed qualityReview, and at least 3 concrete sampleMessages with row ids, generated message text, pass verdicts, and no issues; Shared Cold Fallback samples with a standalone name followed by 'Hey there' are rejected. This command does not launch campaigns, does not schedule sends, does not assign scheduler-owned send fields, does not raw-write campaign status, does not archive/delete cleanup targets, and does not spend paid credits.",
10
10
  inputSchema: {
11
11
  type: "object",
12
12
  properties: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellable/mcp",
3
- "version": "0.1.357",
3
+ "version": "0.1.359",
4
4
  "type": "module",
5
5
  "description": "Sellable MCP server for Claude Code and Codex campaign workflows",
6
6
  "main": "dist/index.js",
@@ -186,6 +186,12 @@ not a parent-thread summary. The receipt must include:
186
186
  - `sequenceReceipt`: exact current workflowTableId, recommended non-paid
187
187
  sequence attach/precheck result, and readback showing `hasSequence:true` when
188
188
  completion is claimed.
189
+ - final paused-send proof: if the current campaign table is `DRAFT` after the
190
+ sequence is attached, call the product `pause_campaign({ campaignId })`
191
+ endpoint/tool to put the unlaunched campaign into `PAUSED` review state, then
192
+ reread the campaign/table. Do not raw-write `campaignStatus`, do not start or
193
+ launch, and do not schedule/send. Completion requires reread proof of
194
+ `currentStep:"send"` and `campaignStatus:"PAUSED"`.
189
195
  - `verifyCall`: the exact `setup_evergreen_campaigns({ mode:"verify",
190
196
  planRevision, selectedActionIds, receipts })` call/result used before the
191
197
  parent reports completion.
@@ -194,6 +200,37 @@ If any required field is missing, report
194
200
  `blocked: missing_create_campaign_step_receipt` for that lane and do not call it
195
201
  complete.
196
202
 
203
+ Message Drafting runtime rule: the preferred proof source is the normal
204
+ create-campaign branch handoff (`watchNarration.workerDetails.messageDraftBuilder`
205
+ or equivalent) with `statusSource:"branch"`. If that internal branch handoff is
206
+ not callable or not exposed in the packaged MCP runtime, do **not** stop after
207
+ creating/importing rows. The lane worker must run the packaged message-drafting
208
+ path itself in the worker thread:
209
+
210
+ 1. Load `get_subskill_prompt({ subskillName:"generate-messages" })` until
211
+ `hasMore:false`.
212
+ 2. Load the required message assets and `create-campaign-v2-validation`.
213
+ 3. Call `start_campaign_message_preparation({ campaignId, tableId,
214
+ targetPreparedMessages, maxRowsToCheck, approvalMode:"mark_ready",
215
+ autoContinue:true })` inside the same lane worker, with bounded caps from the
216
+ lane packet.
217
+ 4. Poll `get_campaign_message_preparation_status` until no queued/active cells
218
+ remain or a bounded stop reason is returned.
219
+ 5. Use `get_campaign_messages_preview` or `select_campaign_cells` to inspect
220
+ generated rows, quality-review at least 3 samples, approve exactly one
221
+ quality-valid route-proof row when none is already approved, and prove no
222
+ broad approve-all happened.
223
+ 6. Continue to `attach_recommended_sequence({ campaignId, currentStep:"send" })`
224
+ and, if the campaign is still `DRAFT`, `pause_campaign({ campaignId })`.
225
+ Reread the campaign/table before claiming completion.
226
+
227
+ That packaged worker path must return `messageDraftingReceipt.statusSource:
228
+ "packaged-generate-messages-worker"`. It is accepted only when the receipt
229
+ includes the same prompt/assets/validation proof, current campaign/table/source
230
+ basis, generated review rows, sample messages, quality review, route-proof
231
+ approval evidence, sequence proof, and final paused-send proof required of the
232
+ branch handoff. `statusSource:"parent-thread-fallback"` is still invalid.
233
+
197
234
  One lane may produce exactly one CampaignOffer/campaign id and one current
198
235
  workflow table id. For `intent:"create"`, the first successful
199
236
  `create_campaign` result establishes the lane's only allowed campaign/table
@@ -206,10 +243,12 @@ and do not report completion. Do not hide the earlier shell by reporting only
206
243
  the later imported campaign.
207
244
 
208
245
  Each customer-visible lane receipt must also include message proof from
209
- `watchNarration.workerDetails.messageDraftBuilder` or the worker's equivalent
210
- branch handoff record. Valid evergreen message proof names the current campaign
211
- id, workflowTableId, selected lead-list or source id, filter choice, and
212
- review-batch row ids/hash, and it must use `statusSource:"branch"`.
246
+ `watchNarration.workerDetails.messageDraftBuilder`, the worker's equivalent
247
+ branch handoff record, or the packaged message-prep worker path above. Valid
248
+ evergreen message proof names the current campaign id, workflowTableId,
249
+ selected lead-list or source id, filter choice, and review-batch row ids/hash,
250
+ and it must use `statusSource:"branch"` or
251
+ `statusSource:"packaged-generate-messages-worker"`.
213
252
  `statusSource:"parent-thread-fallback"` is not accepted for evergreen
214
253
  customer-visible completion because it can be a parent summary rather than proof
215
254
  that the create-campaign Message Drafting branch actually ran. The proof must
@@ -290,9 +329,14 @@ Parent-thread handwritten copy or setting `currentStep` is not proof.
290
329
  - Every customer-visible lane must run Message Drafting from the current
291
330
  campaign/table basis after source rows exist. The worker must load the full
292
331
  packaged `generate-messages` prompt, every required asset, and
293
- `create-campaign-v2-validation`; the returned receipt must include at
294
- least 3 concrete reviewed sample messages, a passed validation result, and
295
- a passed quality review. Row/message counts alone are not enough.
332
+ `create-campaign-v2-validation`; if the internal branch handoff is not
333
+ callable in the packaged runtime, the worker must call
334
+ `start_campaign_message_preparation` and poll
335
+ `get_campaign_message_preparation_status` from the lane worker. The
336
+ returned receipt must include `statusSource:"branch"` or
337
+ `statusSource:"packaged-generate-messages-worker"`, at least 3 concrete
338
+ reviewed sample messages, a passed validation result, and a passed quality
339
+ review. Row/message counts alone are not enough.
296
340
 
297
341
  - **The brief must declare the delivery format** so Generate Message writes copy suited to how it actually sends:
298
342
  - DM lanes: add a `Delivery format:` line — either `multiline (each paragraph sends as its own DM message)` or `single message`. When multiline, the template's blank-line paragraphs ARE the message boundaries — write each one as a standalone typed message.
@@ -323,9 +367,13 @@ Parent-thread handwritten copy or setting `currentStep` is not proof.
323
367
  `get_subskill_prompt({ subskillName:"generate-messages"` was loaded until
324
368
  `hasMore:false`, required message assets were loaded, and
325
369
  `create-campaign-v2-validation` ran through
326
- `workerDetails.messageDraftBuilder` with `statusSource:"branch"`. The generated-message
327
- cells are not prompt proof; `currentRevisionGeneratedMessages` and row
328
- previews are only downstream cell evidence. The proof must include
370
+ `workerDetails.messageDraftBuilder` with `statusSource:"branch"` or
371
+ through the lane worker's packaged message-prep path with
372
+ `statusSource:"packaged-generate-messages-worker"`,
373
+ `start_campaign_message_preparation`, and
374
+ `get_campaign_message_preparation_status`. The generated-message cells are
375
+ not prompt proof; `currentRevisionGeneratedMessages` and row previews are
376
+ only downstream cell evidence. The proof must include
329
377
  `validationResult:"passed"`, a passed quality review, and at least 3
330
378
  reviewed sample messages. For Shared Cold Fallback, reject samples that
331
379
  open with a standalone name followed by "Hey there" or a similarly generic
@@ -342,10 +390,10 @@ Parent-thread handwritten copy or setting `currentStep` is not proof.
342
390
  completion, approve exactly one quality-valid generated row. If one or more
343
391
  rows are already approved, do not add more approvals during evergreen
344
392
  completion. Never broad approve all rows.
345
- - The recommended non-paid sequence is attached to the current campaign
346
- table, and the watched campaign is on Send. Use
347
- `attach_recommended_sequence({ campaignId, currentStep:"send" })` when a
348
- safe attach is needed. After `confirm_lead_list` or any source-list copy,
393
+ - The recommended non-paid sequence is attached to the current campaign
394
+ table, and the watched campaign is on Send. Use
395
+ `attach_recommended_sequence({ campaignId, currentStep:"send" })` when a
396
+ safe attach is needed. After `confirm_lead_list` or any source-list copy,
349
397
  immediately reread `get_campaign({ campaignId })`; the returned
350
398
  `workflowTableId` is the current campaign table. Cross-check that exact
351
399
  current workflowTableId with `list_tables` and require `hasSequence:true`
@@ -353,11 +401,15 @@ Parent-thread handwritten copy or setting `currentStep` is not proof.
353
401
  the current campaign table does not, `SEQUENCE_EXISTS` is not enough:
354
402
  record the stale shell table id, then repair the current workflowTableId
355
403
  with `attach_sequence` using the same non-paid product template
356
- `attach_recommended_sequence` would have selected. Never use a paid-InMail
357
- template and never attach/replace sequence outside the current table unless
358
- the current lane packet explicitly allowed sequence repair.
359
- - No scheduled, queued outbound, sent outbound, campaign launch, or paid
360
- InMail spend is created by this skill.
404
+ `attach_recommended_sequence` would have selected. Never use a paid-InMail
405
+ template and never attach/replace sequence outside the current table unless
406
+ the current lane packet explicitly allowed sequence repair.
407
+ - If the current campaign table is still `DRAFT` after sequence/readiness
408
+ proof, call `pause_campaign({ campaignId })` and reread. `pause_campaign`
409
+ is the product-native review-state transition; it is not a launch and does
410
+ not schedule or send. Never raw-write campaign status.
411
+ - No scheduled, queued outbound, sent outbound, campaign launch, or paid
412
+ InMail spend is created by this skill.
361
413
  4. **Verify each slot** after create/reuse/repair:
362
414
  - `get_campaign` shows the campaign exists, remains unlaunched, and has the expected workflow table.
363
415
  - Builder truth must match dashboard truth. `currentStep:"running"` is valid only when the linked table has `campaignStatus:"ACTIVE"`. For a `PAUSED` or `ARCHIVED` campaign/table, repair or flag stale `currentStep:"running"` back to launch review (`send` / review-ready) before reporting the slot done. Never call `start_campaign` just to make a stale `running` step true.