@sellable/mcp 0.1.134 → 0.1.136

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.
@@ -195,24 +195,26 @@ After review batch import:
195
195
  ```json
196
196
  {
197
197
  "stage": "fit-message",
198
- "headline": "Do you want filters?",
199
- "visibleState": "The first review batch is in the campaign. The list is ready to decide whether extra filtering is worth it.",
200
- "agentIntent": "Codex is asking whether you want to further filter these leads before message review. The Message Draft Builder may prepare a template in the background, but review waits until the filter path is settled.",
198
+ "headline": "I recommend adding filters",
199
+ "visibleState": "The first review batch is in the campaign. The visible sample looks mixed enough that filters should be added before message review.",
200
+ "agentIntent": "Codex is asking whether you want to further filter these leads before message review. Skip filters only if the visible rows already look clean.",
201
201
  "nextAction": "Choose filters or skip",
202
202
  "safety": "Nothing enriches, validates, or sends until the message is ready and approved.",
203
203
  "workerStatuses": {
204
- "leadFitBuilder": "running",
205
- "messageDraftBuilder": "running"
204
+ "leadFitBuilder": "idle",
205
+ "messageDraftBuilder": "idle"
206
206
  }
207
207
  }
208
208
  ```
209
209
 
210
210
  Use this after the selected review rows are present and before filters are
211
- saved. This is add-filters intent, not active filtering. Tell the user to
212
- Choose filters or skip, and do not say filtering the batch before rubrics and
213
- message approval are saved. When the user chooses filters, immediately persist
214
- `enableICPFilters: true` and move to `create-icp-rubric` so the watched app
215
- shows Filter Rules while Codex defines the rules in chat.
211
+ saved. This is add-filters intent, not active filtering. Recommend adding
212
+ filters when the sample is mixed/noisy, tell the user to Choose filters or skip,
213
+ and do not say filtering the batch before rubrics and message approval are
214
+ saved. Only show worker statuses as running if those branches actually started.
215
+ When the user chooses filters, immediately persist `enableICPFilters: true` and
216
+ move to `create-icp-rubric` so the watched app shows Filter Rules while Codex
217
+ defines the rules in chat.
216
218
 
217
219
  Fit + message:
218
220
 
@@ -47,7 +47,9 @@ real-time updates from your signed-in session.
47
47
  Command-Enter or click that link to watch it in Sellable.
48
48
 
49
49
  Now ask the brief approval question. Do not show the approve/revise question
50
- panel until this `Watch link:` line has appeared in normal chat text.
50
+ panel until the full brief content and this `Watch link:` line have appeared in
51
+ normal chat text. A summary such as "the brief is visible there" is not enough
52
+ for approval.
51
53
 
52
54
  Cool, let's find leads.
53
55
  ```
@@ -147,6 +147,9 @@ Execution flow:
147
147
  - `campaignOfferId`
148
148
  - `currentStep`
149
149
  - `sourceLeadListId` OR `searchId`
150
+ - On success, `import_leads` owns the watched move to `confirm-lead-list`
151
+ after a lead list/job exists. Do not call `update_campaign` to fix the
152
+ import step.
150
153
  6. Call `wait_for_lead_list_ready` only for provider-imported lead lists (pass jobId/targetLeadCount from `import_leads` if available).
151
154
  7. Ask the user to review and confirm the list looks good.
152
155
  8. When the user confirms, call `confirm_lead_list` with:
@@ -154,8 +157,8 @@ Execution flow:
154
157
  - `sourceLeadListId` (or omit to use `selectedLeadListId`)
155
158
  - `jobId` (from `import_leads` when available; omit for direct CSV lead lists)
156
159
  - `targetLeadCount` (from `import_leads` when available)
157
- 9. For campaign-builder flows, run post-confirm routing in this order:
158
- - `update_campaign({ campaignId, currentStep: "filter-choice" })`
160
+ 9. For campaign-builder flows, `confirm_lead_list` owns the watched move to
161
+ `filter-choice` after the bounded review batch exists. Then run:
159
162
  - `wait_for_campaign_table_ready({ campaignId })`
160
163
  - `get_campaign_context({ campaignId, refresh: true })`
161
164
  - `get_rows_minimal({ tableId: workflowTableId, limit: 10, page: 1 })`
@@ -25,6 +25,31 @@ You craft messages in one of two modes:
25
25
 
26
26
  ## Execution Modes
27
27
 
28
+ ### Mode 0: Message Draft Builder Branch
29
+
30
+ Use this mode when create-campaign-v2 starts the background Message Draft
31
+ Builder after `confirm_lead_list` imports a non-empty bounded review batch.
32
+ This is not the row-cell generation path.
33
+
34
+ Inputs must come from the parent thread or scoped MCP/product tools for the
35
+ current workspace/campaign:
36
+
37
+ - campaign id plus campaign revision or `updatedAt`
38
+ - current campaign brief and a brief hash
39
+ - selected source state and `selectedLeadListId`
40
+ - `workflowTableId`
41
+ - imported review-batch contacts, row ids, and review-batch row hash
42
+ - filter choice at branch start, plus filter/rubric basis when present
43
+
44
+ Reject the branch as blocked if the campaign id, selected lead list, workflow
45
+ table, or review-batch row ids/hash do not match. Do not reconstruct state from
46
+ stale local markdown artifacts or direct database reads.
47
+
48
+ Return compact output only: template recommendation, token fill rules, rendered
49
+ sample, concerns, status, basis token, output timestamp/hash, and error or
50
+ retry detail. Do not write message cells, enrich rows, update the campaign
51
+ brief, attach sequence, or imply send readiness from this branch.
52
+
28
53
  ### Mode 1: Live Campaign Mode
29
54
 
30
55
  Use this mode when the caller provides a real `campaignId` or asks to save
@@ -63,10 +63,11 @@ search_prospeo({
63
63
  - Use `import_leads` with `provider: \"prospeo\"` and the `searchId` to create a lead list and start import.
64
64
  - **IMPORTANT:** If `import_leads` returns `needsModeSelection: true`, use `AskUserQuestion` to ask "add to existing leads or replace?" Do NOT assume.
65
65
  - After the list finishes and the user confirms it looks good, call `confirm_lead_list` with the `jobId` and `targetLeadCount` from `import_leads` to import into the campaign table.
66
- - Post-confirm routing order is required:
67
- 1. `update_campaign({ currentStep: "filter-choice" })`
68
- 2. `wait_for_campaign_table_ready({ campaignId })`
69
- 3. `get_campaign_context({ campaignId, refresh: true })` then `get_rows_minimal(...)` for recommendation
66
+ - `import_leads` owns the watched move to `confirm-lead-list` after a lead list/job exists.
67
+ - `confirm_lead_list` owns the watched move to `filter-choice` after the bounded review batch exists.
68
+ - Post-confirm readback order is required:
69
+ 1. `wait_for_campaign_table_ready({ campaignId })`
70
+ 2. `get_campaign_context({ campaignId, refresh: true })` then `get_rows_minimal(...)` for recommendation
70
71
 
71
72
  **Required:** Always include `campaignOfferId` on new `search_prospeo` calls so searches persist in watch mode.
72
73
 
@@ -352,7 +352,6 @@ User: "Save it"
352
352
  → import_leads({campaignOfferId: "cmp_xxx", searchId: "search_xxx", targetLeadCount: 100})
353
353
  → (wait for lead list to finish, ask user to confirm)
354
354
  → confirm_lead_list({campaignOfferId: "cmp_xxx", jobId: "<jobId from import_leads>", targetLeadCount: 100})
355
- → update_campaign({campaignId: "cmp_xxx", currentStep: "filter-choice"})
356
355
  → wait_for_campaign_table_ready({campaignId: "cmp_xxx"})
357
356
  → get_campaign_context({campaignId: "cmp_xxx", refresh: true}) + get_rows_minimal(...)
358
357
  </iteration_example>
@@ -377,7 +376,7 @@ User: "Save it"
377
376
  - `confirm_lead_list` - Import confirmed lead list into campaign table
378
377
  Parameters: campaignOfferId, sourceLeadListId (optional), currentStep (optional)
379
378
  Only call after user confirms the list looks good
380
- Post-confirm order: update_campaign(filter-choice) -> wait_for_campaign_table_ready -> get_campaign_context + get_rows_minimal
379
+ Owns the filter-choice beat after bounded review rows exist; then call wait_for_campaign_table_ready -> get_campaign_context + get_rows_minimal
381
380
  </mcp_tools>
382
381
 
383
382
  <limits>
@@ -480,7 +480,7 @@ confirm_lead_list({
480
480
 
481
481
  Then run post-confirm routing in this order:
482
482
 
483
- 1. `update_campaign({ campaignId: "cmp_xxx", currentStep: "filter-choice" })`
483
+ 1. `confirm_lead_list` owns the watched move to `filter-choice` after the bounded review batch exists; do not call `update_campaign` to fix that step.
484
484
  2. `wait_for_campaign_table_ready({ campaignId: "cmp_xxx" })`
485
485
  3. `get_campaign_context({ campaignId: "cmp_xxx", refresh: true })` then `get_rows_minimal(...)`
486
486