@sellable/mcp 0.1.131 → 0.1.132

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellable/mcp",
3
- "version": "0.1.131",
3
+ "version": "0.1.132",
4
4
  "type": "module",
5
5
  "description": "Sellable MCP server for Claude Code and Codex campaign workflows",
6
6
  "main": "dist/index.js",
@@ -531,12 +531,13 @@ until the filter choice is resolved and the template is ready for approval.`
531
531
  `approval-packet.md`.
532
532
  - Run the dependency chain as a DAG: `create-campaign-brief` -> `find leads` ->
533
533
  bounded import/confirm. Once the source decision, lead sample, and campaign
534
- table `workflowTableId` exist, the normal path is the `filter-choice` user
535
- gate. If the user chooses filters, `post-lead-workstreams` launches filter
536
- leads and can let the Message Draft Builder run from the same basis (live
537
- campaign brief, source decision, lead sample, and the imported review-batch
538
- rows) as separate workstreams when the host exposes the named Sellable
539
- post-find-leads agents or real background work.
534
+ table `workflowTableId` exist, immediately start the Message Draft Builder
535
+ from the live campaign brief, approved source, source list, and imported
536
+ review-batch rows before telling the user it is in progress. The normal path
537
+ then reaches the `filter-choice` user gate. If the user chooses filters,
538
+ `post-lead-workstreams` launches filter leads and reuses the in-flight Message
539
+ Draft Builder work from the same basis as separate workstreams when the host
540
+ exposes the named Sellable post-find-leads agents or real background work.
540
541
  First call `get_post_find_leads_scout_registry` and use the returned
541
542
  canonical `name` values only when those names are available in the current
542
543
  runtime. In Claude Code, use both returned Task/Agent subagents in the same
@@ -548,12 +549,14 @@ until the filter choice is resolved and the template is ready for approval.`
548
549
  `filter-rubric` and `message-generation` steps remain focused retry and
549
550
  resume targets.
550
551
  - Message generation does not need `lead-filter.md` to start, but it is only
551
- background template drafting until the user approves the template. The moment the
552
- bounded review batch is imported, `workflowTableId` is ready, and the user is
553
- on/after filter choice, the Message Draft Builder may start from the live
554
- campaign brief, source decision, lead sample, and imported campaign table
555
- sample. It can prepare proof inventory, token strategy, and candidate angles
556
- while filter-leads tightens keep/exclude rules. Template review cannot start
552
+ background template drafting until the user approves the template. The moment
553
+ the bounded review batch is imported, `workflowTableId` is ready, and
554
+ `get_rows_minimal` proves rows exist, the Message Draft Builder must start
555
+ from the live campaign brief, source decision, lead sample, and imported
556
+ campaign table sample. Do not show `Message Draft Builder: In Progress` unless
557
+ the worker or parent-thread fallback has actually started. It can prepare
558
+ proof inventory, token strategy, and candidate angles while filter-leads
559
+ tightens keep/exclude rules. Template review cannot start
557
560
  until filter choice is answered and rubrics are saved. If filters are enabled,
558
561
  the watched browser stays on Filter Leads while the template is approved in
559
562
  chat. After approval is saved to the campaign brief, queue the bounded
@@ -590,13 +593,18 @@ until the filter choice is resolved and the template is ready for approval.`
590
593
  `currentStep` before waiting on source-scout results, so relevant search tabs
591
594
  appear in real time.
592
595
  - For post-lead workstreams, first call
593
- `get_post_find_leads_scout_registry` and launch exactly the returned
594
- `filter-leads` and `message-generation` scouts when real subagents are
595
- available. This is the two Task/Agent subagents path for the
596
- `post-lead-workstreams` step. This is the same registry pattern as source scouting, but the
597
- trigger is source approval and the join gate is both `lead-filter.md` and
598
- `message-validation.md` existing from the same live campaign brief/source
599
- decision/lead-sample basis.
596
+ `get_post_find_leads_scout_registry` after the review batch import confirms
597
+ rows. Launch the returned `message-generation` scout immediately, before the
598
+ filter-choice/watch copy says message work is running. When the user chooses
599
+ filters, launch the returned `filter-leads` scout and reuse the in-flight
600
+ message branch. This is the Task/Agent subagents path for the
601
+ `post-lead-workstreams` step. This is the same registry pattern as source
602
+ scouting, but the trigger is bounded review-batch import and the join gate is
603
+ both `lead-filter.md` and `message-validation.md` existing from the same live
604
+ campaign brief/source decision/imported review-batch basis. When the host can
605
+ launch both branches together, this is still the two Task/Agent subagents
606
+ path; otherwise message-generation starts first and filter-leads joins after
607
+ the filter choice.
600
608
  - Never run a downstream stage until the active `flow.v2.json` step's required
601
609
  campaign state and required normal inputs exist. In normal customer runs, do
602
610
  not create optional debug artifacts just to satisfy a file gate.
@@ -1031,6 +1031,44 @@
1031
1031
  ],
1032
1032
  "rule": "If confirm_lead_list succeeds but get_rows_minimal returns zero imported review-batch rows, do not advance to filter-choice. Keep the user in source/import recovery and ask for retry import, import more from the approved source, or revise source."
1033
1033
  },
1034
+ {
1035
+ "tool": "get_post_find_leads_scout_registry",
1036
+ "purpose": "load_post_import_message_draft_builder_registry",
1037
+ "requiredBeforeMessageDraftLaunch": true
1038
+ },
1039
+ {
1040
+ "action": "launch_message_draft_builder_after_review_batch_import",
1041
+ "mode": "background_required_when_host_supports_subagents",
1042
+ "registryRequired": "get_post_find_leads_scout_registry",
1043
+ "branch": {
1044
+ "name": "message-generation",
1045
+ "target": "generate-messages",
1046
+ "workerName": "post-find-leads-message-scout",
1047
+ "inputs": [
1048
+ "campaignBrief",
1049
+ "selected source decision",
1050
+ "selectedLeadListId source list",
1051
+ "workflowTableId imported 15-row review batch"
1052
+ ],
1053
+ "toolCallRequiredBeforeArtifacts": [
1054
+ "get_subskill_prompt({ subskillName: \"generate-messages\" }) until hasMore=false"
1055
+ ],
1056
+ "producesArtifacts": [
1057
+ "template recommendation",
1058
+ "token fill rules",
1059
+ "rendered sample"
1060
+ ],
1061
+ "optionalProducesArtifacts": [
1062
+ "message-validation.md",
1063
+ "message-prep.md",
1064
+ "message-candidate-drafts.md"
1065
+ ],
1066
+ "ownership": "proof inventory, token strategy, angle drafting, skeptical-prospect review, and selected winner only"
1067
+ },
1068
+ "requiredBeforeFilterChoiceWatchCopy": true,
1069
+ "rule": "Immediately after get_rows_minimal proves the bounded review batch is non-empty, start the Message Draft Builder from the live campaign brief, approved source, selectedLeadListId, and imported workflowTableId rows. Do this before the watched campaign moves to filter-choice or Filter Rules so any guide copy saying Message Draft Builder is In Progress is true.",
1070
+ "fallback": "If the host cannot launch the post-find-leads-message-scout in the background, load the full generate-messages prompt in the parent thread and start the message-generation work before reporting Message Draft Builder as In Progress. If message work cannot start, do not show running copy; surface pending/blocked template-start copy instead."
1071
+ },
1034
1072
  {
1035
1073
  "tool": "update_campaign",
1036
1074
  "requiredFields": [
@@ -1041,9 +1079,10 @@
1041
1079
  "requiredValues": {
1042
1080
  "currentStep": "filter-choice",
1043
1081
  "watchNarration.stage": "fit-message",
1044
- "watchNarration.headline": "Added to Campaign"
1082
+ "watchNarration.headline": "Added to Campaign",
1083
+ "watchNarration.workerStatuses.messageDraftBuilder": "running_after_launch_message_draft_builder_after_review_batch_import_only"
1045
1084
  },
1046
- "watchNarrationRule": "After the bounded review batch is present and non-empty, update the watched guide to `Added to Campaign` and ask the user to Choose filters or skip. This is filter intent only: do not say filtering the batch before rubrics and message approval are saved. The Message Draft Builder may start in the background, but no enrichment, filtering, Generate Message cells, sequence, or sending starts until the message template is approved and saved to the campaign brief. Do not set enableICPFilters=true until save_rubrics succeeds with active criteria."
1085
+ "watchNarrationRule": "After the bounded review batch is present and non-empty, and after launch_message_draft_builder_after_review_batch_import has actually started or resumed message-generation, update the watched guide to `Added to Campaign` and ask the user to Choose filters or skip. This is filter intent only: do not say filtering the batch before rubrics and message approval are saved. The Message Draft Builder should be reported as In Progress only if the worker or parent-thread fallback has actually started. No enrichment, filtering, Generate Message cells, sequence, or sending starts until the message template is approved and saved to the campaign brief. Do not set enableICPFilters=true until save_rubrics succeeds with active criteria."
1047
1086
  }
1048
1087
  ],
1049
1088
  "allowedTools": [
@@ -1059,7 +1098,11 @@
1059
1098
  "load_csv_linkedin_leads",
1060
1099
  "load_csv_domains",
1061
1100
  "get_provider_prompt",
1062
- "get_campaign"
1101
+ "get_campaign",
1102
+ "get_post_find_leads_scout_registry",
1103
+ "get_subskill_prompt",
1104
+ "Task",
1105
+ "spawn_agent"
1063
1106
  ],
1064
1107
  "doNotAllow": [
1065
1108
  "queue_cells",
@@ -1187,7 +1230,6 @@
1187
1230
  {
1188
1231
  "name": "message-generation",
1189
1232
  "target": "generate-messages",
1190
- "mode": "DRY MODE",
1191
1233
  "inputs": [
1192
1234
  "campaignBrief",
1193
1235
  "selected source decision",
@@ -1204,15 +1246,17 @@
1204
1246
  "message-prep.md",
1205
1247
  "message-candidate-drafts.md"
1206
1248
  ],
1207
- "ownership": "proof inventory, token strategy, angle drafting, skeptical-prospect review, and selected winner only"
1249
+ "ownership": "proof inventory, token strategy, angle drafting, skeptical-prospect review, and selected winner only",
1250
+ "mode": "background_template_builder_reuse_or_launch_if_missing",
1251
+ "alreadyStartedBy": "auto-execute-leads.launch_message_draft_builder_after_review_batch_import"
1208
1252
  }
1209
1253
  ],
1210
- "earlyMessageStartRule": "After auto-execute-leads confirms the 15-row review batch, workflowTableId is ready, and the user has reached filter choice, the Message Draft Builder may start from campaignBrief, selected source state, selectedLeadListId, and imported campaign table rows, including while the user is on filter choice. This background template draft is provisional speed work only. The message worker must load the full generate-messages prompt; parent-thread fallback loads the same prompt and may use references/message-review-safety-gate.md only as a supplemental approval checklist. It may run beside filter-leads, but no enrichment, ICP scoring, filtering, or product Generate Message cells can queue until save_rubrics and update_campaign_brief both succeed.",
1254
+ "earlyMessageStartRule": "After auto-execute-leads confirms the 15-row review batch, workflowTableId is ready, and get_rows_minimal proves rows exist, the Message Draft Builder must start immediately from campaignBrief, selected source state, selectedLeadListId, and imported campaign table rows. post-lead-workstreams must reuse that in-flight message branch; if it is missing, launch it before saving rubrics or claiming message progress. This background template draft is provisional speed work only. The message worker must load the full generate-messages prompt; parent-thread fallback loads the same prompt and may use references/message-review-safety-gate.md only as a supplemental approval checklist. It may run beside filter-leads, but no enrichment, ICP scoring, filtering, or product Generate Message cells can queue until save_rubrics and update_campaign_brief both succeed.",
1211
1255
  "finalMessageReconcileRule": "The message recommendation may start before lead-filter.md exists, but before message-review it must cite only imported review-batch rows that still pass the saved rubric/filter results. If the selected winner depends on a row later excluded by saved filters, revise message-generation before message review.",
1212
1256
  "finalTemplateReviewLockRule": "template review does not require a Use Template vs AI Generated mode choice. After filters are enabled, lock template review until saved rubrics exist and the draft reconciles to the approved brief, selected source, and imported review batch. Keep the watched browser on Filter Leads while approval is pending. After approval writes the Approved Message Template into campaignBrief, queue enrichment/ICP scoring for the bounded review batch; prefer at least 2 usable passing/probably passing rows before moving the watched browser to Messages, with weak-sample escalation if only 1 passes.",
1213
- "claudeRule": "In Claude Code, launch both returned post-find-leads scouts with Task/Agent subagents in the same assistant message only when the current session lists those agent names. Do not run filter first and then message generation unless subagents/background work are unavailable.",
1214
- "codexRule": "In Codex, launch both returned post-find-leads scout names as disjoint subagents in the same assistant turn only when the host exposes those custom agents for this run. If the host cannot spawn them, run the same branches sequentially and say so.",
1215
- "fallback": "If real parallel branches are unavailable or the named agents are absent, run filter-leads and then message-generation in the parent thread with product MCP tools/assets. Do not customer-surface agent install status, and do not claim background or parallel work in that fallback."
1257
+ "claudeRule": "In Claude Code, launch the returned message-generation scout immediately after post-import rows exist, then launch/reuse the filter-leads scout when the user chooses filters. When both named agents are available and both branches are ready in the same assistant message, use Task/Agent subagents in parallel; otherwise never claim background message progress until message-generation actually started.",
1258
+ "codexRule": "In Codex, launch the returned message-generation scout immediately after post-import rows exist, then launch/reuse filter-leads when filters are chosen. Use disjoint subagents only when the host exposes those custom agents; otherwise start the same message-generation branch in the parent thread before reporting it as running.",
1259
+ "fallback": "If real parallel branches are unavailable or the named agents are absent, start message-generation in the parent thread immediately after post-import, then run filter-leads from the same imported review batch. Do not customer-surface agent install status, and do not claim background or parallel work unless that work actually started."
1216
1260
  },
1217
1261
  {
1218
1262
  "action": "wait_for_lead_filter_rules",
@@ -1307,7 +1351,7 @@
1307
1351
  ],
1308
1352
  "toolRules": [
1309
1353
  "The post-lead workstreams are disjoint: filter-leads owns lead-filter.md/rubric.json; message-generation owns message-validation.md/message-prep.md/message-candidate-drafts.md.",
1310
- "message-generation can start before saved filters, but message-review cannot start until saved filters and the message recommendation reconcile against the same imported review-batch rows.",
1354
+ "message-generation must start immediately after the post-import review batch exists, before saved filters; message-review cannot start until saved filters and the message recommendation reconcile against the same imported review-batch rows.",
1311
1355
  "Do not let filter-leads create a new message sample. Do not let message-generation fetch new prospects.",
1312
1356
  "Before writing message-validation.md or returning a template recommendation, message-generation must load the full get_subskill_prompt({ subskillName: \"generate-messages\" }) prompt and use campaignBrief, selected source state, selectedLeadListId, and imported review-batch rows as the source of truth. Optional debug markdown files are not durable state.",
1313
1357
  "Do not queue enrichment, ICP scoring, filtering, or Generate Message cells after saved rubrics alone. Wait until the approved message template is synced into campaignBrief, then queue only bounded review-batch enrichCellId values.",