@sellable/mcp 0.1.358 → 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, 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 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 raw-write campaign status, 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.358",
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",
@@ -200,6 +200,37 @@ If any required field is missing, report
200
200
  `blocked: missing_create_campaign_step_receipt` for that lane and do not call it
201
201
  complete.
202
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
+
203
234
  One lane may produce exactly one CampaignOffer/campaign id and one current
204
235
  workflow table id. For `intent:"create"`, the first successful
205
236
  `create_campaign` result establishes the lane's only allowed campaign/table
@@ -212,10 +243,12 @@ and do not report completion. Do not hide the earlier shell by reporting only
212
243
  the later imported campaign.
213
244
 
214
245
  Each customer-visible lane receipt must also include message proof from
215
- `watchNarration.workerDetails.messageDraftBuilder` or the worker's equivalent
216
- branch handoff record. Valid evergreen message proof names the current campaign
217
- id, workflowTableId, selected lead-list or source id, filter choice, and
218
- 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"`.
219
252
  `statusSource:"parent-thread-fallback"` is not accepted for evergreen
220
253
  customer-visible completion because it can be a parent summary rather than proof
221
254
  that the create-campaign Message Drafting branch actually ran. The proof must
@@ -296,9 +329,14 @@ Parent-thread handwritten copy or setting `currentStep` is not proof.
296
329
  - Every customer-visible lane must run Message Drafting from the current
297
330
  campaign/table basis after source rows exist. The worker must load the full
298
331
  packaged `generate-messages` prompt, every required asset, and
299
- `create-campaign-v2-validation`; the returned receipt must include at
300
- least 3 concrete reviewed sample messages, a passed validation result, and
301
- 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.
302
340
 
303
341
  - **The brief must declare the delivery format** so Generate Message writes copy suited to how it actually sends:
304
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.
@@ -329,9 +367,13 @@ Parent-thread handwritten copy or setting `currentStep` is not proof.
329
367
  `get_subskill_prompt({ subskillName:"generate-messages"` was loaded until
330
368
  `hasMore:false`, required message assets were loaded, and
331
369
  `create-campaign-v2-validation` ran through
332
- `workerDetails.messageDraftBuilder` with `statusSource:"branch"`. The generated-message
333
- cells are not prompt proof; `currentRevisionGeneratedMessages` and row
334
- 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
335
377
  `validationResult:"passed"`, a passed quality review, and at least 3
336
378
  reviewed sample messages. For Shared Cold Fallback, reject samples that
337
379
  open with a standalone name followed by "Hey there" or a similarly generic