@sellable/mcp 0.1.358 → 0.1.360

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.360",
4
4
  "type": "module",
5
5
  "description": "Sellable MCP server for Claude Code and Codex campaign workflows",
6
6
  "main": "dist/index.js",
@@ -73,6 +73,16 @@ Plan shape:
73
73
  creating duplicates.
74
74
  - If a user supplies canonical ids, reuse/verify them instead of creating duplicates.
75
75
 
76
+ The command-backed unbound plan is authoritative. If
77
+ `setup_evergreen_campaigns({ mode:"plan", ... })` returns a lane packet with
78
+ `intent:"create"`, execute that create packet exactly. Do not convert it into an
79
+ explicit binding because `list_tables`, `get_campaigns`, a waterfall, or old
80
+ inventory shows an `ARCHIVED` campaign/table with a matching name. Archived
81
+ campaigns are not reusable evergreen targets. Only pass an archived
82
+ campaign/table as an explicit binding when the user supplied those exact ids and
83
+ explicitly allowed dashboard visibility repair; otherwise ignore archived
84
+ matches for execution and let the create packet proceed.
85
+
76
86
  Use `selectedSenderIds` only as a legacy shorthand when the same senders should
77
87
  get sender-owned Post Engagers lanes and attach to shared lanes. When the scopes
78
88
  differ, pass both explicit arrays:
@@ -200,6 +210,37 @@ If any required field is missing, report
200
210
  `blocked: missing_create_campaign_step_receipt` for that lane and do not call it
201
211
  complete.
202
212
 
213
+ Message Drafting runtime rule: the preferred proof source is the normal
214
+ create-campaign branch handoff (`watchNarration.workerDetails.messageDraftBuilder`
215
+ or equivalent) with `statusSource:"branch"`. If that internal branch handoff is
216
+ not callable or not exposed in the packaged MCP runtime, do **not** stop after
217
+ creating/importing rows. The lane worker must run the packaged message-drafting
218
+ path itself in the worker thread:
219
+
220
+ 1. Load `get_subskill_prompt({ subskillName:"generate-messages" })` until
221
+ `hasMore:false`.
222
+ 2. Load the required message assets and `create-campaign-v2-validation`.
223
+ 3. Call `start_campaign_message_preparation({ campaignId, tableId,
224
+ targetPreparedMessages, maxRowsToCheck, approvalMode:"mark_ready",
225
+ autoContinue:true })` inside the same lane worker, with bounded caps from the
226
+ lane packet.
227
+ 4. Poll `get_campaign_message_preparation_status` until no queued/active cells
228
+ remain or a bounded stop reason is returned.
229
+ 5. Use `get_campaign_messages_preview` or `select_campaign_cells` to inspect
230
+ generated rows, quality-review at least 3 samples, approve exactly one
231
+ quality-valid route-proof row when none is already approved, and prove no
232
+ broad approve-all happened.
233
+ 6. Continue to `attach_recommended_sequence({ campaignId, currentStep:"send" })`
234
+ and, if the campaign is still `DRAFT`, `pause_campaign({ campaignId })`.
235
+ Reread the campaign/table before claiming completion.
236
+
237
+ That packaged worker path must return `messageDraftingReceipt.statusSource:
238
+ "packaged-generate-messages-worker"`. It is accepted only when the receipt
239
+ includes the same prompt/assets/validation proof, current campaign/table/source
240
+ basis, generated review rows, sample messages, quality review, route-proof
241
+ approval evidence, sequence proof, and final paused-send proof required of the
242
+ branch handoff. `statusSource:"parent-thread-fallback"` is still invalid.
243
+
203
244
  One lane may produce exactly one CampaignOffer/campaign id and one current
204
245
  workflow table id. For `intent:"create"`, the first successful
205
246
  `create_campaign` result establishes the lane's only allowed campaign/table
@@ -212,10 +253,12 @@ and do not report completion. Do not hide the earlier shell by reporting only
212
253
  the later imported campaign.
213
254
 
214
255
  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"`.
256
+ `watchNarration.workerDetails.messageDraftBuilder`, the worker's equivalent
257
+ branch handoff record, or the packaged message-prep worker path above. Valid
258
+ evergreen message proof names the current campaign id, workflowTableId,
259
+ selected lead-list or source id, filter choice, and review-batch row ids/hash,
260
+ and it must use `statusSource:"branch"` or
261
+ `statusSource:"packaged-generate-messages-worker"`.
219
262
  `statusSource:"parent-thread-fallback"` is not accepted for evergreen
220
263
  customer-visible completion because it can be a parent summary rather than proof
221
264
  that the create-campaign Message Drafting branch actually ran. The proof must
@@ -296,9 +339,14 @@ Parent-thread handwritten copy or setting `currentStep` is not proof.
296
339
  - Every customer-visible lane must run Message Drafting from the current
297
340
  campaign/table basis after source rows exist. The worker must load the full
298
341
  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.
342
+ `create-campaign-v2-validation`; if the internal branch handoff is not
343
+ callable in the packaged runtime, the worker must call
344
+ `start_campaign_message_preparation` and poll
345
+ `get_campaign_message_preparation_status` from the lane worker. The
346
+ returned receipt must include `statusSource:"branch"` or
347
+ `statusSource:"packaged-generate-messages-worker"`, at least 3 concrete
348
+ reviewed sample messages, a passed validation result, and a passed quality
349
+ review. Row/message counts alone are not enough.
302
350
 
303
351
  - **The brief must declare the delivery format** so Generate Message writes copy suited to how it actually sends:
304
352
  - 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 +377,13 @@ Parent-thread handwritten copy or setting `currentStep` is not proof.
329
377
  `get_subskill_prompt({ subskillName:"generate-messages"` was loaded until
330
378
  `hasMore:false`, required message assets were loaded, and
331
379
  `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
380
+ `workerDetails.messageDraftBuilder` with `statusSource:"branch"` or
381
+ through the lane worker's packaged message-prep path with
382
+ `statusSource:"packaged-generate-messages-worker"`,
383
+ `start_campaign_message_preparation`, and
384
+ `get_campaign_message_preparation_status`. The generated-message cells are
385
+ not prompt proof; `currentRevisionGeneratedMessages` and row previews are
386
+ only downstream cell evidence. The proof must include
335
387
  `validationResult:"passed"`, a passed quality review, and at least 3
336
388
  reviewed sample messages. For Shared Cold Fallback, reject samples that
337
389
  open with a standalone name followed by "Hey there" or a similarly generic