@sellable/mcp 0.1.444 → 0.1.446

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 postPrepareMessages(body) {
6
6
  export const campaignMessagePreparationToolDefinitions = [
7
7
  {
8
8
  name: "start_campaign_message_preparation",
9
- description: 'Start a bounded message-preparation job for a specific existing CampaignOffer campaignId/tableId. This is the active_campaigns existing-row path after resolve_campaign_fill_route, exact target re-read, and active prep-job check; it is not campaign creation and not evergreen horizon fill. It never launches the campaign, sends messages, or directly writes scheduledFor. The job queues pending Enrich Prospect cells first, lets ICP/rubric and Generate Message cascade, then marks ready or approves only the bounded cohort. Prepared/approved/ready rows are intermediate only; scheduled completion requires a later re-read proving scheduler-owned scheduled cells with non-null scheduledFor. Surface active preparation jobs, exhausted source rows, disconnected Sales Nav/deleted sender accounts, missing sequence state, and other sender-health blockers separately from prepared/approved/scheduled counts. Omit maxRowsToCheck and batchSize for the adaptive default: calibrate on at least 100 actually-enriched rows, estimate the row budget from observed rubric/pass yield, cap rows at 300, and process at most 100 newly checked rows at a time. The worker will not pull another row batch while the current checked batch still has queueable or active cells. Do not interpret checkedRows as enriched rows; use progress.enrichedRows, needsEnrichRows, activeCellCount, preparedMessages, approvedMessages, and stopReason.',
9
+ description: 'Start a bounded message-preparation job for a specific existing CampaignOffer campaignId/tableId. This is the active_campaigns existing-row path after resolve_campaign_fill_route, exact target re-read, and active prep-job check; it is not campaign creation and not evergreen horizon fill. It never launches the campaign, sends messages, or directly writes scheduledFor. The job processes rows top-down by WorkflowTableRow.position, queues pending Enrich Prospect cells first, lets ICP/rubric and Generate Message cascade, then marks ready or approves only the bounded cohort. Use this or rowSelector:{type:"needsEnrichment"} for regular refill frontiers; needsGeneratedMessage is only for already-passed generated-message repair and can skip earlier unenriched rows. Prepared/approved/ready rows are intermediate only; scheduled completion requires a later re-read proving scheduler-owned scheduled cells with non-null scheduledFor. Surface active preparation jobs, exhausted source rows, disconnected Sales Nav/deleted sender accounts, missing sequence state, and other sender-health blockers separately from prepared/approved/scheduled counts. Omit maxRowsToCheck and batchSize for the adaptive default: calibrate on at least 100 actually-enriched rows, estimate the row budget from observed rubric/pass yield, cap rows at 300, and process at most 100 newly checked rows at a time. The worker will not pull another row batch while the current checked batch still has queueable or active cells. Do not interpret checkedRows as enriched rows; use progress.enrichedRows, needsEnrichRows, activeCellCount, preparedMessages, approvedMessages, and stopReason.',
10
10
  inputSchema: {
11
11
  type: "object",
12
12
  properties: {
@@ -5,6 +5,12 @@ type RowSelector = {
5
5
  } | {
6
6
  type: "rowIds";
7
7
  rowIds: string[];
8
+ } | {
9
+ type: "needsEnrichment";
10
+ limit?: number;
11
+ } | {
12
+ type: "needsApproval";
13
+ limit?: number;
8
14
  } | {
9
15
  type: "passedRows";
10
16
  limit?: number;
@@ -40,7 +40,7 @@ export const campaignProcessingToolDefinitions = [
40
40
  },
41
41
  {
42
42
  name: "select_campaign_cells",
43
- description: "Dry-run semantic campaign-cell selection. Returns compact counts and a tiny sample, never bulky row data. Use before queue_campaign_cells only when debugging or explaining a recovery action.",
43
+ description: "Dry-run semantic campaign-cell selection. Returns compact counts and a tiny sample, never bulky row data. For regular refill diagnostics, use rowSelector:{type:\"needsEnrichment\"} to find the earliest unenriched rows by table position, then rowSelector:{type:\"needsApproval\"} to inspect current generated messages that are not approved. needsGeneratedMessage only sees rows that already passed rubric and can skip earlier unenriched rows; use it for generated-message repair, not top-down refill.",
44
44
  inputSchema: {
45
45
  type: "object",
46
46
  properties: {
@@ -64,6 +64,8 @@ export const campaignProcessingToolDefinitions = [
64
64
  enum: [
65
65
  "reviewBatch",
66
66
  "rowIds",
67
+ "needsEnrichment",
68
+ "needsApproval",
67
69
  "passedRows",
68
70
  "needsGeneratedMessage",
69
71
  "staleGeneratedMessages",
@@ -84,7 +86,7 @@ export const campaignProcessingToolDefinitions = [
84
86
  },
85
87
  {
86
88
  name: "queue_campaign_cells",
87
- description: "Resolve and queue campaign cells by semantic role and row selector. Normal create-campaign tail should use this instead of fetching rows only to discover cell IDs. Use forceRerun:true for message-template revisions.",
89
+ description: "Resolve and queue campaign cells by semantic role and row selector. Normal create-campaign tail should use this instead of fetching rows only to discover cell IDs. For regular refill enrichment, queue columnRole:\"enrich\" with rowSelector:{type:\"needsEnrichment\"} or use start_campaign_message_preparation for the full top-down prep loop. For approval, rowSelector:{type:\"needsApproval\"} selects current generated rows missing Approved=true, but mutating Approved cells still requires explicit bounded approval. Do not use needsGeneratedMessage as a refill cursor because it only selects already-passed rows. Use forceRerun:true for message-template revisions.",
88
90
  inputSchema: {
89
91
  type: "object",
90
92
  properties: {
@@ -102,6 +104,8 @@ export const campaignProcessingToolDefinitions = [
102
104
  enum: [
103
105
  "reviewBatch",
104
106
  "rowIds",
107
+ "needsEnrichment",
108
+ "needsApproval",
105
109
  "passedRows",
106
110
  "needsGeneratedMessage",
107
111
  "staleGeneratedMessages",
@@ -6,7 +6,7 @@ async function postCampaignRefillState(body) {
6
6
  export const campaignRefillStateToolDefinitions = [
7
7
  {
8
8
  name: "get_campaign_refill_state",
9
- description: "read-only refill research primitive to call after resolve_campaign_fill_route and before any source import, message preparation, approval, scheduling, or horizon fill decision. It returns current campaign/table/source/sender/funnel/scheduler diagnostics plus freshness state for one exact campaignId or tableId only. This tool does not create rows, does not import leads, does not prepare messages, does not approve messages, does not schedule sends, does not launch campaigns, and does not expose direct campaign types as refillable targets. Exact targeting uses campaignId or tableId only; never pass campaign names or table names.",
9
+ description: "read-only refill research primitive to call after resolve_campaign_fill_route and before any source import, message preparation, approval, scheduling, or horizon fill decision. It returns current campaign/table/source/sender/funnel/scheduler diagnostics, preparationFrontier for earliest unenriched rows and later prepared islands, plus freshness state for one exact campaignId or tableId only. This tool does not create rows, does not import leads, does not prepare messages, does not approve messages, does not schedule sends, does not launch campaigns, and does not expose direct campaign types as refillable targets. Exact targeting uses campaignId or tableId only; never pass campaign names or table names.",
10
10
  inputSchema: {
11
11
  type: "object",
12
12
  properties: {
@@ -373,7 +373,7 @@ export function getPostFindLeadsScoutRegistry() {
373
373
  codex: 'After confirm_lead_list copies source rows and the initial campaign-table execution slice exists, ask the filter-choice question immediately. Do not spawn anything before that question. After the answer, launch only Message Drafting. The filter-choice answer is the post-import user gate for this single worker; do not ask another question about starting it in step-wise or YOLO mode. The registry lookup is not a launch: after get_post_find_leads_scout_registry, immediately invoke Task/spawn_agent or the host background-agent mechanism before loading filter-leads.md, before saving rubrics, and before treating skip-filters as ready for message review. Both choices route through this kickoff; do not let filters_skipped jump straight from filter-choice to message-generation. If filters are chosen, the parent stays on Filter Rules and drafts/saves rubrics with MCP tools while Message Drafting runs in the background. If filters are skipped, move to Messages/message review only after Message Drafting has started or is ready; update_campaign(currentStep=messages) is not proof of launch. If the named Message Drafting custom agent is unavailable, spawn a generic gpt-5.5 xhigh Message Drafting background agent with the same lean campaign/table basis. When the background worker starts, persist workerDetails.messageDraftBuilder with statusSource "branch", status "branch-running", runId, startedAt, updatedAt, basisToken when known, and basis containing campaignId, selectedLeadListId, workflowTableId, filterChoice, and reviewBatchRowHash or reviewBatchRowIds; workerStatuses.messageDraftBuilder may be "running" as a simple badge only. Never put rich proof under workerStatuses and never use workerStatuses.messageDrafting. If no background-agent tool is callable, start the same full message branch inline before filter drafting or before skip-filter message review, record workerDetails.messageDraftBuilder with statusSource "parent-thread-fallback" and status "fallback-active", and require the same live context, prompt, assets, and validation gate before message review; do not wait until filters are saved and then call the registry.',
374
374
  claude: "After confirm_lead_list copies source rows and the initial campaign-table execution slice exists, ask the filter-choice question immediately. Do not invoke any Task/Agent before that question. After the answer, invoke only Message Drafting. If filters are chosen, parent drafts/saves rubrics with MCP tools while Message Drafting runs, asks filter approval, then joins Message Drafting. If filters are skipped, invoke only Message Drafting and move to Messages/message review.",
375
375
  parentThreadRule: 'Named agents are optional acceleration, but message drafting is not optional. The only normal background worker is Message Drafting. The filter-choice answer is the campaign-scoped go-ahead for this single post-import worker; do not ask another question to start it in step-wise or YOLO mode. If a named agent is unavailable, use a generic gpt-5.5 xhigh Message Drafting background agent. source work and filter work stay in the parent thread with MCP tools. If post-find-leads-message-scout is available, run it as the background Message Draft Builder after the filter-choice answer. The registry lookup is not a launch: get_post_find_leads_scout_registry only identifies the worker, and Message Drafting counts as started only after Task/spawn_agent or the host background-agent tool is invoked, or after the parent begins the same full message branch inline because no background-agent tool is callable. This launch must happen before loading filter-leads.md, save_rubrics, filter approval, or skip-filter message review; currentStep=messages is not proof of launch. If post-find-leads-message-scout is absent, do not customer-surface install status. Do not silently treat message drafting as started; the main thread must either launch the background worker or execute the same message branch from CampaignOffer state, selected source state, workflowTableId, and initial campaign-table execution slice rows. For a spawned worker, record workerDetails.messageDraftBuilder with statusSource branch / status branch-running, runId, startedAt, updatedAt, and basis containing campaignId, selectedLeadListId, workflowTableId, filterChoice, and reviewBatchRowHash or reviewBatchRowIds. workerStatuses.messageDraftBuilder is optional simple badge text only ("running", "ready", "blocked", "idle"); never put runId/statusSource/basis under workerStatuses and never use workerStatuses.messageDrafting. If no background-agent tool is callable, start that same full message branch inline before filter drafting or before skip-filter message review, record workerDetails.messageDraftBuilder with statusSource parent-thread-fallback / status fallback-active then ready, and require the same live context, prompt, assets, and validation gate before message review; do not report that as a background worker failure. If neither branch nor inline fallback can run, return blocked/retry-needed; do not wait until filters are saved and then call the registry. The Message Drafting handoff must be lean. Do not paste copied row counts, brief hashes, review-batch hashes, full reviewBatchRowIds, broad row data, or local debug artifacts into the spawn prompt. Local markdown/json files are not normal-path inputs. The filter-choice question is the first post-import user gate; do not load post-lead registries or filter references before it. Message drafting starts after the filter-choice answer, must load get_subskill_prompt({ subskillName: "generate-messages" }), and must load every required message asset named by generate-messages Mode 0 through get_subskill_asset before drafting. Reference Asset Loading means loading the required pre-draft reference pack before drafting; return blocked/retry-needed if required assets cannot be loaded; load ai-tells.md because it is never optional. The branch or parent-thread fallback loads the full generate-messages prompt and every referenced asset through get_subskill_asset. After generating/revising the candidate and before returning ready, must load get_subskill_prompt({ subskillName: "create-campaign-v2-validation" }) as the final internal validation gate, must read live campaign table state through scoped MCP/product tools, and must reject mismatched selectedLeadListId/workflowTableId/campaign/workspace input. Do not block when filters were chosen but leadScoringRubrics are not yet visible in the branch read; the parent owns save_rubrics and filter approval in parallel, so Message Drafting should return status ready with basisStatus usable_initial when campaign/list/table identity and the non-empty execution slice match. Do not use any alternate, local-artifact, or examples-only message prompt. User copy feedback, message QA, or rewrite requests before approve-message must be routed back to Message Drafting with the current recommendation, lean campaign/table basis, and latest user text; the parent must not rewrite or QA the template from memory and must not call update_campaign_brief before approve-message. The worker validates internally and returns only templateRecommendation, tokenFillRules, renderedGoodSample, status, approveOrReviseRecommendation, validationStatus, outputAt, outputHash, and blocked/retry detail. Do not render renderedFallbackSample, risk notes, or a qaReceipt on the normal happy path. On the filter path, save_rubrics keeps the browser on Filter Rules after save_rubrics so the user can approve the saved criteria; after saved-filter approval, move to Filter Leads with currentStep=apply-icp-rubric whether Message Drafting is ready or still running. Wait there for message approval. Enrichment, filtering, Generate Message cells, sender setup, sequence attach, and launch wait for template approval on the Use Template path. On the skip path, move to Messages/message review after Message Drafting has started or is ready and wait for message approval before enrichment or Settings. Do not render message review from checklist or shortcut instructions; message review requires a messageDraftRecommendation whose basis proves the generate-messages prompt, required message assets, and validation gate ran for the current campaign/table execution slice. Do not automatically rerun Message Drafting after filters/enrichment finish; show the initial draft by default and offer an enriched rewrite only with explicit user opt-in. Handoff and recommendation output are Markdown with labeled fields, not raw JSON.',
376
- prepareMessagesRule: `Default create-campaign stays on the existing reviewBatchLimit:15 first campaign-table execution slice. For plain post-mint fill/load/refill requests, load get_subskill_prompt({ subskillName: "refill-sends-workflow" }), then call resolve_campaign_fill_route({ intent:"plain" }), list_senders, and get_campaign_refill_state for enough candidate campaigns to identify the campaign that most recently had scheduler-owned sends for the relevant sender set before any mutation. Route outcomes are route:"evergreen_horizon", route:"active_campaigns", and route:"ask_create"; if a plain managed-waterfall route has archived/completed skipped slots or does not cover the named sender set, immediately refetch with resolve_campaign_fill_route({ intent:"active" }) and inspect current dashboard-active ACTIVE/PAUSED campaign-backed sequence campaigns before declaring a sender blocked; stay in the same campaignOfferId/campaignId context after minting. Plain fill is not an alias for fill_campaign_horizon or campaign creation. fill_campaign_horizon is evergreen-only and is not the generic regular-campaign fill path. Campaign creation is allowed only after route:"ask_create" and explicit user selection; it is never the default response to plain fill. Treat "fill up/load sends" as capacity-fill preparation, and treat "refill senders", "fill senders", "max out senders", and "load everyone up" as sender-scoped capacity-fill preparation. For sender-scoped requests with no named senders, --yolo means all eligible healthy senders enrolled in active campaign-backed sequence campaigns in the active workspace; without --yolo, ask which eligible enrolled senders to refill before choosing campaigns or mutating. In non-yolo interactive Codex or Claude Code sessions, the sender/campaign/action approval packet must be asked through request_user_input/AskUserQuestion with exactly Accept and Decline; do not use plain chat approval. The approval question body must show workspace, sender scope, a campaign-by-campaign table, exact ids/caps/dates, side effects, forbidden actions, and stop condition before mutation. Default --yolo horizon is a two-send-day horizon: two sender-local send days, skipping no-send-hour days. For campaign-scoped fill/refill, select the best recent-send campaign and calculate the bounded gap from healthy sender daily capacity minus future scheduler-owned scheduled sends and ready-to-schedule rows, then prepare only that gap. For sender-scoped fill/refill, calculate the bounded gap per eligible sender across active enrolled campaigns, counting future scheduled and ready-to-schedule rows across those campaigns, then choose the best same-sender campaign to fill each sender gap: prefer recent/future scheduler-owned sends for that sender, then strongest recent result evidence, then source health. Maintain a horizon saturation ledger per selected sender with selected send days, gross capacity, future scheduler-owned scheduled counts, ready-to-schedule buffer, remaining scheduled gap, remaining ready-or-scheduled gap, and the next MCP primitive. Do not stop after filling only one sender when the request was sender-scoped. In --yolo, continue through every safe selected sender/campaign action covered by the rendered packet, reread after each terminal apply/prep/start result, recompute the horizon saturation ledger, and keep going until scheduler-owned scheduledFor cells fill the requested horizon or a concrete blocker/timeout is proven. Ready-to-schedule rows are buffer, not completion; if ready covers the gap but scheduled cells do not, run a bounded scheduler-settle loop and report awaiting_scheduler_after_ready_buffer as not complete when timeout is reached. When no safe in-packet action remains return concrete continuation options with campaign names, exact ids, and which options require a new approval packet. Use the refill workflow to decide whether to enrich/prep more rows in that same recent-send/best-result campaign, add/import more rows to that same campaign/source path, use a different existing campaign only when the selected same-sender lane is blocked/exhausted/already loaded while the sender still has a gap, or ask what to create. Do not create warm-post-engager side campaigns. Surface sender-health blockers separately from prepared/approved/scheduled counts. User-facing refill decisions must be campaign-name-first and sender-name-first, with ids as proof/execution targets only. For already-running regular campaigns that need Signal Discovery source replenishment, use the guarded currentStep clear with clearCurrentStepIfMatches:"running", campaign-scoped provider prompt/search/select, and import_leads with the existing sourceLeadListId when a newly approved selected-post scrape would otherwise return reusedExistingSourceList. After confirm_lead_list copies rows into an existing table, avoid fixed maxRowsToCheck:100; if confirm_lead_list returns USER_ADDED_ROWS_LIMIT_EXCEEDED, create a bounded same-source split from selectedLeadListId with get_rows_minimal/load_csv_linkedin_leads, confirm that smaller source list into the same campaign, and operate on the reviewBatch first; inspect reviewBatch/table selectors or use adaptive/wider bounded prep so appended rows are included. Do not interpret checkedRows as enriched rows; it is only the table cursor. Prepared, approved, and ready_to_schedule rows are intermediate states; never call them scheduled unless a re-read proves scheduler-owned scheduled cells with non-null scheduledFor fill the requested horizon, and never call them complete unless a final re-read proves the same. Before source import, prep, approval, or selected paused campaign start, require exact visible approval or --yolo packet auto-accept and a fresh get_campaign_refill_state reread; stop if freshness.stateHash or exact ids changed. For "approve X messages", use approvalMode:approve only when explicitly requested. For "schedule X sends" or "fill sender sends", approve only when explicitly requested, then re-read campaign/table scheduled counts; if scheduler-owned scheduledFor cells are not present, report prepared/approved/ready - awaiting scheduler instead of success. Do not call start_campaign as part of fill/schedule horizon. start_campaign is allowed in refill only for exact selected PAUSED, dashboard-active, campaign-backed sequence targets named in the bounded packet, and the packet must state that starting can let the product scheduler schedule/send approved eligible sequence actions. Never start unrelated, archived, completed, draft, direct, or non-selected campaigns, never broad approve-all, and never use direct scheduler writes. campaignId is CampaignOffer.id. If the user asks to stop preparation, the target is wrong, or status shows the wrong campaign/table, use cancel_campaign_message_preparation only for the exact active job. Low-level selectors are diagnostics and recovery only for this lane.`,
376
+ prepareMessagesRule: `Default create-campaign stays on the existing reviewBatchLimit:15 first campaign-table execution slice. For plain post-mint fill/load/refill requests, load get_subskill_prompt({ subskillName: "refill-sends-workflow" }), then call resolve_campaign_fill_route({ intent:"plain" }), list_senders, and get_campaign_refill_state for enough candidate campaigns to identify the campaign that most recently had scheduler-owned sends for the relevant sender set before any mutation. Route outcomes are route:"evergreen_horizon", route:"active_campaigns", and route:"ask_create"; if a plain managed-waterfall route has archived/completed skipped slots or does not cover the named sender set, immediately refetch with resolve_campaign_fill_route({ intent:"active" }) and inspect current dashboard-active ACTIVE/PAUSED campaign-backed sequence campaigns before declaring a sender blocked; stay in the same campaignOfferId/campaignId context after minting. Plain fill is not an alias for fill_campaign_horizon or campaign creation. fill_campaign_horizon is evergreen-only and is not the generic regular-campaign fill path. Campaign creation is allowed only after route:"ask_create" and explicit user selection; it is never the default response to plain fill. Treat "fill up/load sends" as capacity-fill preparation, and treat "refill senders", "fill senders", "max out senders", and "load everyone up" as sender-scoped capacity-fill preparation. For sender-scoped requests with no named senders, --yolo means all eligible healthy senders enrolled in active campaign-backed sequence campaigns in the active workspace; without --yolo, ask which eligible enrolled senders to refill before choosing campaigns or mutating. In non-yolo interactive Codex or Claude Code sessions, the sender/campaign/action approval packet must be asked through request_user_input/AskUserQuestion with exactly Accept and Decline; do not use plain chat approval. The approval question body must show workspace, sender scope, a campaign-by-campaign table, exact ids/caps/dates, side effects, forbidden actions, and stop condition before mutation. Default --yolo horizon is a two-send-day horizon: two sender-local send days, skipping no-send-hour days. For campaign-scoped fill/refill, select the best recent-send campaign and calculate the bounded gap from healthy sender daily capacity minus future scheduler-owned scheduled sends and ready-to-schedule rows, then prepare only that gap. For sender-scoped fill/refill, calculate the bounded gap per eligible sender across active enrolled campaigns, counting future scheduled and ready-to-schedule rows across those campaigns, then choose the best same-sender campaign to fill each sender gap: prefer recent/future scheduler-owned sends for that sender, then strongest recent result evidence, then source health. Maintain a horizon saturation ledger per selected sender with selected send days, gross capacity, future scheduler-owned scheduled counts, ready-to-schedule buffer, remaining scheduled gap, remaining ready-or-scheduled gap, and the next MCP primitive. Do not stop after filling only one sender when the request was sender-scoped. In --yolo, continue through every safe selected sender/campaign action covered by the rendered packet, reread after each terminal apply/prep/start result, recompute the horizon saturation ledger, and keep going until scheduler-owned scheduledFor cells fill the requested horizon or a concrete blocker/timeout is proven. Ready-to-schedule rows are buffer, not completion; if ready covers the gap but scheduled cells do not, run a bounded scheduler-settle loop and report awaiting_scheduler_after_ready_buffer as not complete when timeout is reached. When no safe in-packet action remains return concrete continuation options with campaign names, exact ids, and which options require a new approval packet. Use the refill workflow to decide whether to enrich/prep more rows in that same recent-send/best-result campaign, add/import more rows to that same campaign/source path, use a different existing campaign only when the selected same-sender lane is blocked/exhausted/already loaded while the sender still has a gap, or ask what to create. Do not create warm-post-engager side campaigns. Surface sender-health blockers separately from prepared/approved/scheduled counts. User-facing refill decisions must be campaign-name-first and sender-name-first, with ids as proof/execution targets only. For already-running regular campaigns that need Signal Discovery source replenishment, use the guarded currentStep clear with clearCurrentStepIfMatches:"running", campaign-scoped provider prompt/search/select, and import_leads with the existing sourceLeadListId when a newly approved selected-post scrape would otherwise return reusedExistingSourceList. Before prep, inspect get_campaign_refill_state.preparationFrontier. If hasLaterPreparedIsland:true or earliestUnpreparedRow exists before later successful enrichment, use rowSelector:{type:"needsEnrichment"} with columnRole:"enrich" in table-position order or start_campaign_message_preparation adaptive defaults; do not use the UI Jump anchor or needsGeneratedMessage as the refill cursor. After confirm_lead_list copies rows into an existing table, avoid fixed maxRowsToCheck:100; if confirm_lead_list returns USER_ADDED_ROWS_LIMIT_EXCEEDED, create a bounded same-source split from selectedLeadListId with get_rows_minimal/load_csv_linkedin_leads, confirm that smaller source list into the same campaign, and inspect reviewBatch only as diagnostics unless the approved packet explicitly prioritizes the just-copied split and earlier needsEnrichment rows are exhausted, dependency-blocked, or excluded. For approval diagnostics use rowSelector:{type:"needsApproval"} after current generated messages exist; mutating Approved cells still requires approvalMode:approve and exact bounded approval. Do not interpret checkedRows as enriched rows; it is only the table cursor. Prepared, approved, and ready_to_schedule rows are intermediate states; never call them scheduled unless a re-read proves scheduler-owned scheduled cells with non-null scheduledFor fill the requested horizon, and never call them complete unless a final re-read proves the same. Before source import, prep, approval, or selected paused campaign start, require exact visible approval or --yolo packet auto-accept and a fresh get_campaign_refill_state reread; stop if freshness.stateHash or exact ids changed. For "approve X messages", use approvalMode:approve only when explicitly requested. For "schedule X sends" or "fill sender sends", approve only when explicitly requested, then re-read campaign/table scheduled counts; if scheduler-owned scheduledFor cells are not present, report prepared/approved/ready - awaiting scheduler instead of success. Do not call start_campaign as part of fill/schedule horizon. start_campaign is allowed in refill only for exact selected PAUSED, dashboard-active, campaign-backed sequence targets named in the bounded packet, and the packet must state that starting can let the product scheduler schedule/send approved eligible sequence actions. Never start unrelated, archived, completed, draft, direct, or non-selected campaigns, never broad approve-all, and never use direct scheduler writes. campaignId is CampaignOffer.id. If the user asks to stop preparation, the target is wrong, or status shows the wrong campaign/table, use cancel_campaign_message_preparation only for the exact active job. Low-level selectors are diagnostics and recovery only for this lane.`,
377
377
  },
378
378
  };
379
379
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellable/mcp",
3
- "version": "0.1.444",
3
+ "version": "0.1.446",
4
4
  "type": "module",
5
5
  "description": "Sellable MCP server for Claude Code and Codex campaign workflows",
6
6
  "main": "dist/index.js",
@@ -1358,9 +1358,11 @@ Message, and verify current-revision sample messages before final completion.
1358
1358
  senders, the copy must be safe for every attached sender to send. Do not
1359
1359
  use founder-only first person such as "I'm building", "my company", "my
1360
1360
  team", or "I have a framework" unless every attached sender can credibly
1361
- say it. Prefer sender-agnostic company/team language such as "we're
1362
- helping CX teams..." or "at cxconnect.ai, we help..." and one clear
1363
- problem question.
1361
+ say it. Prefer sender-agnostic company/team language grounded in the
1362
+ current workspace's verified company, offer, buyer, and proof, plus one
1363
+ clear problem question. Do not reuse unrelated fixture/example customer
1364
+ names, domains, verticals, product categories, use cases, or proof points
1365
+ unless the current workspace/company research independently supports them.
1364
1366
  Before Message Drafting runs, the campaign brief must already include
1365
1367
  these shared-lane hard avoids and source-use rules. Do not rely on a
1366
1368
  failed first generation batch to discover that self-intros, generic
@@ -1370,7 +1372,10 @@ Message, and verify current-revision sample messages before final completion.
1370
1372
  Shared Signal Discovery samples may use a supported topic bridge such as
1371
1373
  "saw you around conversations about [high-level topic], so hope this is
1372
1374
  relevant" when the topic is grounded in source evidence and not
1373
- activity-log phrasing. Translate source/tool terms into prospect-facing
1375
+ activity-log phrasing. Signal Discovery is only a lead-source provider;
1376
+ do not infer a product category, buyer pain, offer, asset, CTA, or
1377
+ provider-themed message direction from the lane/provider name.
1378
+ Translate source/tool terms into prospect-facing
1374
1379
  business language; do not put internal workflow vocabulary such as
1375
1380
  "Codex-style workflow", "MCP", "agent workflows",
1376
1381
  "Claude Code", or "Claude-style agent workflows" in customer-facing
@@ -1535,7 +1540,10 @@ Message, and verify current-revision sample messages before final completion.
1535
1540
  `issues`.
1536
1541
  Shared Signal Discovery samples may use `"saw you around conversations
1537
1542
  about [high-level topic], so hope this is relevant"` when the topic is
1538
- supported by source evidence and not activity-log phrasing. Shared Cold
1543
+ supported by source evidence and not activity-log phrasing. Signal
1544
+ Discovery is only a lead-source provider; reject provider-themed campaign
1545
+ copy unless that language is independently supported by the current
1546
+ workspace/company research. Shared Cold
1539
1547
  Fallback samples must still reject source/conversation hedges such as
1540
1548
  `"hope this is relevant"`, `"might be interested"`, or `"saw you in a few
1541
1549
  conversations"`.
@@ -447,26 +447,39 @@ Short form: all eligible enrolled senders are covered by sender-scoped `--yolo`;
447
447
  Short form: direct scheduler writes are not covered by `--yolo`.
448
448
  Short form: stop and re-plan instead of auto-accepting the changed action.
449
449
 
450
+ Before choosing a refill prep primitive, inspect the table frontier from
451
+ `get_campaign_refill_state.preparationFrontier`. If
452
+ `hasLaterPreparedIsland:true` or `earliestUnpreparedRow` exists before later
453
+ successful enrichment, treat that as a top-down gap: use
454
+ `select_campaign_cells`/`queue_campaign_cells` with
455
+ `rowSelector:{ type:"needsEnrichment" }` and `columnRole:"enrich"` in bounded
456
+ row-position order, or use `start_campaign_message_preparation` with the
457
+ adaptive defaults for the full enrich -> rubric -> Generate Message loop. Do not
458
+ use the UI Jump anchor as the automation cursor; Jump is a navigation affordance
459
+ and can be fooled by a later enriched island.
460
+
450
461
  After same-campaign source copy, inspect the actual campaign-table position of
451
- the copied rows before starting prep. Newly copied rows often land after the first 100 table rows. Use `get_campaign_table_schema` to read the `reviewBatch`,
452
- then use `select_campaign_cells` diagnostics against
453
- `rowSelector:{ type:"reviewBatch" }` for `enrich`, `generateMessage`, and
454
- `approved` roles when needed.
455
-
456
- For bounded split refills, operate on the review batch first. Queue
457
- `queue_campaign_cells` for `columnRole:"enrich"` on
458
- `rowSelector:{ type:"reviewBatch" }`, wait for campaign processing, then queue
459
- `columnRole:"generateMessage"` for the same review batch or
460
- `needsGeneratedMessage` rows. If the bounded packet explicitly uses
461
- `approvalMode:"approve"` because the user asked to fill/schedule sends or
462
- provided `--yolo` for a two-day send fill, approve only the bounded review-batch
463
- cohort after current generated messages exist. Do not broad approve existing
464
- table rows.
465
-
466
- If review-batch enrich cells are pending or Generate Message cells are
467
- dependency-blocked, omit `maxRowsToCheck` so the adaptive prep job can cover the
468
- bounded table scan, or set a bounded cap high enough to include appended rows
469
- when row count evidence requires it. Do not run a fixed `maxRowsToCheck:100` prep pass after appending rows to a larger existing campaign table; it can spend
462
+ the copied rows before starting prep. Newly copied rows often land after the
463
+ first 100 table rows. Use `get_campaign_table_schema` to read the `reviewBatch`
464
+ and `select_campaign_cells` diagnostics against
465
+ `rowSelector:{ type:"reviewBatch" }` only to understand the copied row set. Do
466
+ not operate on `reviewBatch` before earlier `needsEnrichment` rows unless the
467
+ approved packet explicitly says to prioritize the just-copied bounded split and
468
+ the earlier rows are exhausted, dependency-blocked, or intentionally excluded.
469
+
470
+ For bounded split refills, prefer top-down `needsEnrichment` or adaptive
471
+ `start_campaign_message_preparation` first. If the bounded packet explicitly
472
+ uses `approvalMode:"approve"` because the user asked to fill/schedule sends or
473
+ provided `--yolo` for a two-day send fill, inspect approval candidates with
474
+ `rowSelector:{ type:"needsApproval" }` after current generated messages exist,
475
+ then approve only the bounded cohort covered by the packet. Do not broad approve
476
+ existing table rows.
477
+
478
+ If enrich cells are pending or Generate Message cells are dependency-blocked,
479
+ omit `maxRowsToCheck` so the adaptive prep job can cover the bounded table scan,
480
+ or set a bounded cap high enough to include the necessary row-position frontier
481
+ when row count evidence requires it. Do not run a fixed `maxRowsToCheck:100`
482
+ prep pass after appending rows to a larger existing campaign table; it can spend
470
483
  the whole budget on older rows and miss the refill batch.
471
484
 
472
485
  Bound `targetPreparedMessages` to the actual ready-to-schedule gap for the