@sellable/mcp 0.1.336 → 0.1.338

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.
@@ -137,7 +137,7 @@ export interface PostFindLeadsScoutRegistryResponse {
137
137
  }
138
138
  export declare const DEFAULT_SUBSKILL_PROMPT_CHUNK_CHARS = 48000;
139
139
  export declare const MAX_SUBSKILL_PROMPT_CHUNK_CHARS = 48000;
140
- export declare const ALLOWED_SUBSKILL_PROMPT_NAMES: readonly ["building-gtm-tables", "content", "create-ab-test", "create-campaign", "create-campaign-brief", "create-campaign-v2", "create-campaign-v2-tail", "create-campaign-v2-validation", "create-evergreen-campaigns", "create-post", "create-rubric", "engage", "enrich-prospects", "fill-send-horizon", "find-leads", "foundation", "generate-messages", "interview", "load-voice", "refresh-sender-engagement", "research", "research-prospect", "research-sender", "weekly-campaign-summary", "workflow-sequences"];
140
+ export declare const ALLOWED_SUBSKILL_PROMPT_NAMES: readonly ["building-gtm-tables", "content", "create-ab-test", "create-campaign", "create-campaign-brief", "create-campaign-v2", "create-campaign-v2-tail", "create-campaign-v2-validation", "create-evergreen-campaigns", "create-post", "create-rubric", "engage", "enrich-prospects", "fill-send-horizon", "find-leads", "foundation", "generate-messages", "interview", "load-voice", "refresh-sender-engagement", "refill-sends-workflow", "research", "research-prospect", "research-sender", "weekly-campaign-summary", "workflow-sequences"];
141
141
  export declare const promptToolDefinitions: ({
142
142
  name: string;
143
143
  description: string;
@@ -181,7 +181,7 @@ export declare const promptToolDefinitions: ({
181
181
  properties: {
182
182
  subskillName: {
183
183
  type: string;
184
- enum: readonly ["building-gtm-tables", "content", "create-ab-test", "create-campaign", "create-campaign-brief", "create-campaign-v2", "create-campaign-v2-tail", "create-campaign-v2-validation", "create-evergreen-campaigns", "create-post", "create-rubric", "engage", "enrich-prospects", "fill-send-horizon", "find-leads", "foundation", "generate-messages", "interview", "load-voice", "refresh-sender-engagement", "research", "research-prospect", "research-sender", "weekly-campaign-summary", "workflow-sequences"];
184
+ enum: readonly ["building-gtm-tables", "content", "create-ab-test", "create-campaign", "create-campaign-brief", "create-campaign-v2", "create-campaign-v2-tail", "create-campaign-v2-validation", "create-evergreen-campaigns", "create-post", "create-rubric", "engage", "enrich-prospects", "fill-send-horizon", "find-leads", "foundation", "generate-messages", "interview", "load-voice", "refresh-sender-engagement", "refill-sends-workflow", "research", "research-prospect", "research-sender", "weekly-campaign-summary", "workflow-sequences"];
185
185
  description: string;
186
186
  };
187
187
  offset: {
@@ -216,7 +216,7 @@ export declare const promptToolDefinitions: ({
216
216
  properties: {
217
217
  subskillName: {
218
218
  type: string;
219
- enum: readonly ["building-gtm-tables", "content", "create-ab-test", "create-campaign", "create-campaign-brief", "create-campaign-v2", "create-campaign-v2-tail", "create-campaign-v2-validation", "create-evergreen-campaigns", "create-post", "create-rubric", "engage", "enrich-prospects", "fill-send-horizon", "find-leads", "foundation", "generate-messages", "interview", "load-voice", "refresh-sender-engagement", "research", "research-prospect", "research-sender", "weekly-campaign-summary", "workflow-sequences"];
219
+ enum: readonly ["building-gtm-tables", "content", "create-ab-test", "create-campaign", "create-campaign-brief", "create-campaign-v2", "create-campaign-v2-tail", "create-campaign-v2-validation", "create-evergreen-campaigns", "create-post", "create-rubric", "engage", "enrich-prospects", "fill-send-horizon", "find-leads", "foundation", "generate-messages", "interview", "load-voice", "refresh-sender-engagement", "refill-sends-workflow", "research", "research-prospect", "research-sender", "weekly-campaign-summary", "workflow-sequences"];
220
220
  description: string;
221
221
  };
222
222
  assetPath: {
@@ -37,6 +37,7 @@ export const ALLOWED_SUBSKILL_PROMPT_NAMES = [
37
37
  "interview",
38
38
  "load-voice",
39
39
  "refresh-sender-engagement",
40
+ "refill-sends-workflow",
40
41
  "research",
41
42
  "research-prospect",
42
43
  "research-sender",
@@ -371,7 +372,7 @@ export function getPostFindLeadsScoutRegistry() {
371
372
  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.',
372
373
  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.",
373
374
  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.',
374
- prepareMessagesRule: 'Default create-campaign stays on the existing reviewBatchLimit:15 first campaign-table execution slice. Only call start_campaign_message_preparation when the user explicitly asks for more prepared messages, a send count, or to fill up/load sends for senders. Treat "fill up/load sends" as capacity-fill preparation: calculate the bounded target from sender capacity when needed, then let the job queue pending Enrich Prospect cells first, wait for ICP/rubric and Generate Message to cascade, and mark ready or approve only the target cohort. Do not interpret checkedRows as enriched rows; it is only the table cursor. Poll get_campaign_message_preparation_status and summarize enrichedRows, needsEnrichRows, activeCellCount, passed/prepared/approved count, target, estimated row budget remaining, and stopReason. For "prepare/generate X messages", set targetPreparedMessages:X, omit maxRowsToCheck so the backend calibrates on at least 100 actually-enriched rows, estimates the row budget from observed rubric/pass yield, caps maxRowsToCheck at 2500, and use approvalMode:mark_ready. After the calibration sample settles, the backend adapts later batches up to 250 rows while recalculating yield. For "approve X messages", use approvalMode:approve but still do not launch. For "schedule X sends" or "fill sender sends", use approvalMode:approve to approve exactly the bounded X-message cohort during preparation, then continue through sender, sequence, and final launch greenlight; final launch must verify that bounded cohort and must not broad approve-all. campaignId is CampaignOffer.id. If the user asks to stop preparation, the target is wrong, or status shows the wrong campaign/table, call cancel_campaign_message_preparation; otherwise do not cancel a healthy prepare run. cancel_campaign_message_preparation cancels the same pending workflow-table cells as the UI Cancel Pending Cells action. Low-level selectors are diagnostics and recovery only for this lane. start_campaign remains forbidden until final launch greenlight.',
375
+ 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 and get_campaign_refill_state before any mutation. 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. Treat "fill up/load sends" as capacity-fill preparation: calculate the bounded target from sender capacity when needed, then use the refill workflow to decide same-campaign source replenishment, enrichment/prep, approval/ready state, scheduler reread, and blockers. 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. Before source import, prep, or approval, require exact visible approval 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, but still do not launch. 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 refill sends. Launch/start is a separate explicit human action after the operator intentionally wants sends to go out, and it must still verify that the bounded cohort is the only approved cohort and must not broad approve-all. 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. start_campaign remains forbidden until explicit launch/start approval outside refill sends.`,
375
376
  },
376
377
  };
377
378
  }
@@ -0,0 +1,92 @@
1
+ type RefillCampaignSendsInput = {
2
+ mode?: "plan" | "apply";
3
+ intent?: "plain" | "evergreen" | "active";
4
+ campaignIds?: string[];
5
+ tableIds?: string[];
6
+ sendWindowDays?: number;
7
+ targetDates?: string[];
8
+ targetScheduledSends?: number;
9
+ approvalMode?: "mark_ready" | "approve";
10
+ yolo?: boolean;
11
+ planRevision?: string;
12
+ actionIds?: string[];
13
+ };
14
+ export declare const refillCampaignSendsToolDefinitions: {
15
+ name: string;
16
+ description: string;
17
+ inputSchema: {
18
+ type: string;
19
+ properties: {
20
+ mode: {
21
+ type: string;
22
+ enum: string[];
23
+ default: string;
24
+ description: string;
25
+ };
26
+ intent: {
27
+ type: string;
28
+ enum: string[];
29
+ description: string;
30
+ };
31
+ campaignIds: {
32
+ type: string;
33
+ items: {
34
+ type: string;
35
+ };
36
+ maxItems: number;
37
+ description: string;
38
+ };
39
+ tableIds: {
40
+ type: string;
41
+ items: {
42
+ type: string;
43
+ };
44
+ maxItems: number;
45
+ description: string;
46
+ };
47
+ sendWindowDays: {
48
+ type: string;
49
+ minimum: number;
50
+ maximum: number;
51
+ description: string;
52
+ };
53
+ targetDates: {
54
+ type: string;
55
+ items: {
56
+ type: string;
57
+ };
58
+ maxItems: number;
59
+ description: string;
60
+ };
61
+ targetScheduledSends: {
62
+ type: string;
63
+ minimum: number;
64
+ maximum: number;
65
+ description: string;
66
+ };
67
+ approvalMode: {
68
+ type: string;
69
+ enum: string[];
70
+ description: string;
71
+ };
72
+ yolo: {
73
+ type: string;
74
+ description: string;
75
+ };
76
+ planRevision: {
77
+ type: string;
78
+ description: string;
79
+ };
80
+ actionIds: {
81
+ type: string;
82
+ items: {
83
+ type: string;
84
+ };
85
+ description: string;
86
+ };
87
+ };
88
+ additionalProperties: boolean;
89
+ };
90
+ }[];
91
+ export declare function refillCampaignSends(input: RefillCampaignSendsInput): Promise<unknown>;
92
+ export {};
@@ -0,0 +1,91 @@
1
+ import { getApi } from "../api.js";
2
+ async function postRefillCampaignSends(body) {
3
+ const api = getApi();
4
+ return api.post("/api/v3/mcp/refill-campaign-sends", body);
5
+ }
6
+ export const refillCampaignSendsToolDefinitions = [
7
+ {
8
+ name: "refill_campaign_sends",
9
+ description: "Default mode is plan and read-only. Use this as the canonical tool for plain fill, refill sends, max out sends, load everyone up, and fill send window requests. It returns a campaign send refill plan for regular campaigns and evergreen campaigns, including campaign/table ids, senders, source state, current evergreen source audit evidence, funnel counts, blockers, stable planRevision, and immutable actionIds. It does not create campaigns, create side campaigns, use unsupported_campaign_type internal targets, does not launch or start campaigns, spend paid InMail opt-in, and does not raw-write scheduler fields. mode apply requires yolo: true, the fresh planRevision from the immediately preceding plan, and selected actionIds only; apply rejects changed caps, source ids, target dates, approval mode, or selectors. Evergreen source fallback is evidence-gated: audit the current evergreen source first and recommend the next source-ladder option only after current-source exhaustion or insufficient good-prospect yield is proven. Scheduled completion is not claimed until scheduler-owned cells are reread with non-null scheduledFor.",
10
+ inputSchema: {
11
+ type: "object",
12
+ properties: {
13
+ mode: {
14
+ type: "string",
15
+ enum: ["plan", "apply"],
16
+ default: "plan",
17
+ description: 'Defaults to "plan"; plan mode is read-only and returns the plan of attack.',
18
+ },
19
+ intent: {
20
+ type: "string",
21
+ enum: ["plain", "evergreen", "active"],
22
+ description: 'Use "plain" for generic fill/refill sends, "evergreen" for explicit evergreen, and "active" for exact active campaign refill.',
23
+ },
24
+ campaignIds: {
25
+ type: "array",
26
+ items: { type: "string" },
27
+ maxItems: 25,
28
+ description: "Optional exact CampaignOffer ids. Do not pass names.",
29
+ },
30
+ tableIds: {
31
+ type: "array",
32
+ items: { type: "string" },
33
+ maxItems: 25,
34
+ description: "Optional exact WorkflowTable ids. Do not pass names.",
35
+ },
36
+ sendWindowDays: {
37
+ type: "number",
38
+ minimum: 1,
39
+ maximum: 30,
40
+ description: "Optional send window size in days.",
41
+ },
42
+ targetDates: {
43
+ type: "array",
44
+ items: { type: "string" },
45
+ maxItems: 30,
46
+ description: "Optional ISO date keys for the send window.",
47
+ },
48
+ targetScheduledSends: {
49
+ type: "number",
50
+ minimum: 1,
51
+ maximum: 500,
52
+ description: "Optional bounded send target. This is not a launch request.",
53
+ },
54
+ approvalMode: {
55
+ type: "string",
56
+ enum: ["mark_ready", "approve"],
57
+ description: "Planning preference. Use approve only when the user explicitly asked for approval; launch remains separate.",
58
+ },
59
+ yolo: {
60
+ type: "boolean",
61
+ description: "Required true for apply. Never use in production without explicit operator approval of exact workspace, campaign/table ids, action ids, caps/dates, and expected side effects.",
62
+ },
63
+ planRevision: {
64
+ type: "string",
65
+ description: "Required for apply. Copy from the fresh read-only plan response.",
66
+ },
67
+ actionIds: {
68
+ type: "array",
69
+ items: { type: "string" },
70
+ description: "Required for apply. Select immutable actionIds from the fresh plan only.",
71
+ },
72
+ },
73
+ additionalProperties: false,
74
+ },
75
+ },
76
+ ];
77
+ export function refillCampaignSends(input) {
78
+ return postRefillCampaignSends({
79
+ mode: input.mode ?? "plan",
80
+ intent: input.intent,
81
+ campaignIds: input.campaignIds,
82
+ tableIds: input.tableIds,
83
+ sendWindowDays: input.sendWindowDays,
84
+ targetScheduledSends: input.targetScheduledSends,
85
+ targetDates: input.targetDates,
86
+ approvalMode: input.approvalMode,
87
+ yolo: input.yolo,
88
+ planRevision: input.planRevision,
89
+ actionIds: input.actionIds,
90
+ });
91
+ }
@@ -236,7 +236,7 @@ export declare const allTools: ({
236
236
  properties: {
237
237
  subskillName: {
238
238
  type: string;
239
- enum: readonly ["building-gtm-tables", "content", "create-ab-test", "create-campaign", "create-campaign-brief", "create-campaign-v2", "create-campaign-v2-tail", "create-campaign-v2-validation", "create-evergreen-campaigns", "create-post", "create-rubric", "engage", "enrich-prospects", "fill-send-horizon", "find-leads", "foundation", "generate-messages", "interview", "load-voice", "refresh-sender-engagement", "research", "research-prospect", "research-sender", "weekly-campaign-summary", "workflow-sequences"];
239
+ enum: readonly ["building-gtm-tables", "content", "create-ab-test", "create-campaign", "create-campaign-brief", "create-campaign-v2", "create-campaign-v2-tail", "create-campaign-v2-validation", "create-evergreen-campaigns", "create-post", "create-rubric", "engage", "enrich-prospects", "fill-send-horizon", "find-leads", "foundation", "generate-messages", "interview", "load-voice", "refresh-sender-engagement", "refill-sends-workflow", "research", "research-prospect", "research-sender", "weekly-campaign-summary", "workflow-sequences"];
240
240
  description: string;
241
241
  };
242
242
  offset: {
@@ -271,7 +271,7 @@ export declare const allTools: ({
271
271
  properties: {
272
272
  subskillName: {
273
273
  type: string;
274
- enum: readonly ["building-gtm-tables", "content", "create-ab-test", "create-campaign", "create-campaign-brief", "create-campaign-v2", "create-campaign-v2-tail", "create-campaign-v2-validation", "create-evergreen-campaigns", "create-post", "create-rubric", "engage", "enrich-prospects", "fill-send-horizon", "find-leads", "foundation", "generate-messages", "interview", "load-voice", "refresh-sender-engagement", "research", "research-prospect", "research-sender", "weekly-campaign-summary", "workflow-sequences"];
274
+ enum: readonly ["building-gtm-tables", "content", "create-ab-test", "create-campaign", "create-campaign-brief", "create-campaign-v2", "create-campaign-v2-tail", "create-campaign-v2-validation", "create-evergreen-campaigns", "create-post", "create-rubric", "engage", "enrich-prospects", "fill-send-horizon", "find-leads", "foundation", "generate-messages", "interview", "load-voice", "refresh-sender-engagement", "refill-sends-workflow", "research", "research-prospect", "research-sender", "weekly-campaign-summary", "workflow-sequences"];
275
275
  description: string;
276
276
  };
277
277
  assetPath: {
@@ -474,6 +474,112 @@ export declare const allTools: ({
474
474
  required: string[];
475
475
  additionalProperties: boolean;
476
476
  };
477
+ } | {
478
+ name: string;
479
+ description: string;
480
+ inputSchema: {
481
+ type: string;
482
+ properties: {
483
+ intent: {
484
+ type: string;
485
+ enum: string[];
486
+ description: string;
487
+ };
488
+ campaignId: {
489
+ type: string;
490
+ description: string;
491
+ };
492
+ tableId: {
493
+ type: string;
494
+ description: string;
495
+ };
496
+ limit: {
497
+ type: string;
498
+ minimum: number;
499
+ maximum: number;
500
+ description: string;
501
+ };
502
+ };
503
+ required: string[];
504
+ additionalProperties: boolean;
505
+ };
506
+ } | {
507
+ name: string;
508
+ description: string;
509
+ inputSchema: {
510
+ type: string;
511
+ properties: {
512
+ action: {
513
+ type: string;
514
+ enum: string[];
515
+ description: string;
516
+ };
517
+ campaignId: {
518
+ type: string;
519
+ description: string;
520
+ };
521
+ tableId: {
522
+ type: string;
523
+ description: string;
524
+ };
525
+ stateRevision: {
526
+ type: string;
527
+ description: string;
528
+ };
529
+ excludedPostIds: {
530
+ type: string;
531
+ items: {
532
+ type: string;
533
+ };
534
+ maxItems: number;
535
+ description: string;
536
+ };
537
+ excludedPostUrls: {
538
+ type: string;
539
+ items: {
540
+ type: string;
541
+ };
542
+ maxItems: number;
543
+ description: string;
544
+ };
545
+ excludedAuthorProfileUrls: {
546
+ type: string;
547
+ items: {
548
+ type: string;
549
+ };
550
+ maxItems: number;
551
+ description: string;
552
+ };
553
+ excludedAuthorNames: {
554
+ type: string;
555
+ items: {
556
+ type: string;
557
+ };
558
+ maxItems: number;
559
+ description: string;
560
+ };
561
+ targetPreparedMessages: {
562
+ type: string;
563
+ minimum: number;
564
+ maximum: number;
565
+ description: string;
566
+ };
567
+ maxRowsToCheck: {
568
+ type: string;
569
+ minimum: number;
570
+ maximum: number;
571
+ description: string;
572
+ };
573
+ batchSize: {
574
+ type: string;
575
+ minimum: number;
576
+ maximum: number;
577
+ description: string;
578
+ };
579
+ };
580
+ required: string[];
581
+ additionalProperties: boolean;
582
+ };
477
583
  } | {
478
584
  name: string;
479
585
  description: string;
@@ -504,6 +610,12 @@ export declare const allTools: ({
504
610
  maximum: number;
505
611
  description: string;
506
612
  };
613
+ maxBatchRows: {
614
+ type: string;
615
+ minimum: number;
616
+ maximum: number;
617
+ description: string;
618
+ };
507
619
  approvalMode: {
508
620
  type: string;
509
621
  enum: string[];
@@ -540,6 +652,7 @@ export declare const allTools: ({
540
652
  targetPreparedMessages?: undefined;
541
653
  maxRowsToCheck?: undefined;
542
654
  batchSize?: undefined;
655
+ maxBatchRows?: undefined;
543
656
  approvalMode?: undefined;
544
657
  autoContinue?: undefined;
545
658
  disableLowPassRateStop?: undefined;
@@ -2,7 +2,10 @@ import { authToolDefinitions } from "./auth.js";
2
2
  import { blueprintCommitToolDefinitions } from "./blueprint-commit.js";
3
3
  import { bootstrapToolDefinitions } from "./bootstrap.js";
4
4
  import { campaignAbTestToolDefinitions } from "./campaign-ab-test.js";
5
+ import { campaignFillRoutingToolDefinitions } from "./campaign-fill-routing.js";
6
+ import { campaignHorizonFillToolDefinitions } from "./campaign-horizon-fill.js";
5
7
  import { campaignMessagePreparationToolDefinitions } from "./campaign-message-preparation.js";
8
+ import { campaignRefillStateToolDefinitions } from "./campaign-refill-state.js";
6
9
  import { campaignProcessingToolDefinitions } from "./campaign-processing.js";
7
10
  import { campaignToolDefinitions } from "./campaigns.js";
8
11
  import { cellToolDefinitions } from "./cells.js";
@@ -42,6 +45,9 @@ import { workspaceToolDefinitions } from "./workspaces.js";
42
45
  export const allTools = [
43
46
  ...campaignToolDefinitions,
44
47
  ...campaignAbTestToolDefinitions,
48
+ ...campaignFillRoutingToolDefinitions,
49
+ ...campaignRefillStateToolDefinitions,
50
+ ...campaignHorizonFillToolDefinitions,
45
51
  ...campaignMessagePreparationToolDefinitions,
46
52
  ...campaignProcessingToolDefinitions,
47
53
  ...authToolDefinitions,
@@ -1,6 +1,10 @@
1
1
  export interface WorkflowTableListItem {
2
2
  id: string;
3
3
  name: string;
4
+ workspaceId: string | null;
5
+ status: string | null;
6
+ campaignStatus: string | null;
7
+ dashboardBucket: "active" | "archived";
4
8
  type: string | null;
5
9
  campaignOfferId: string | null;
6
10
  campaignBacked: boolean;
@@ -6,7 +6,7 @@ import { getApi } from "../api.js";
6
6
  export const tableToolDefinitions = [
7
7
  {
8
8
  name: "list_tables",
9
- description: "List all workflow tables in the active workspace. Returns metadata including whether each table is campaign-backed and whether it has a sequence attached.\n\n" +
9
+ description: "List all workflow tables in the active workspace. Returns metadata including workspaceId, workflow status, campaignStatus, dashboardBucket, whether each table is campaign-backed, and whether it has a sequence attached.\n\n" +
10
10
  "Unlike get_campaigns, this lists every WorkflowTable regardless of how it was created, including create_workflow_table, create_on_demand_table, and UI-created tables.",
11
11
  inputSchema: {
12
12
  type: "object",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellable/mcp",
3
- "version": "0.1.336",
3
+ "version": "0.1.338",
4
4
  "type": "module",
5
5
  "description": "Sellable MCP server for Claude Code and Codex campaign workflows",
6
6
  "main": "dist/index.js",
@@ -47,6 +47,9 @@ allowed-tools:
47
47
  - mcp__sellable__record_campaign_review_batch
48
48
  - mcp__sellable__queue_campaign_cells
49
49
  - mcp__sellable__wait_for_campaign_processing
50
+ - mcp__sellable__resolve_campaign_fill_route
51
+ - mcp__sellable__get_campaign_refill_state
52
+ - mcp__sellable__fill_campaign_horizon
50
53
  - mcp__sellable__start_campaign_message_preparation
51
54
  - mcp__sellable__get_campaign_message_preparation_status
52
55
  - mcp__sellable__cancel_campaign_message_preparation
@@ -113,27 +116,37 @@ source only when safe relaxation and same-source sampling would still fail or
113
116
  would pass bad-fit rows.
114
117
  The default path stays the existing first campaign-table execution slice:
115
118
  review the normal `reviewBatchLimit:15`, approve reviewed draft rows, then move
116
- to Settings/sequence/final greenlight. Only call
117
- `start_campaign_message_preparation` when the user explicitly asks for more
118
- prepared messages, a send count, or language like "fill up/load sends for these
119
- senders." Treat those requests as capacity-fill preparation: calculate the
120
- bounded target from sender capacity when needed, then let the preparation job
121
- queue pending `Enrich Prospect` cells, wait for ICP/rubric and Generate Message
122
- cells to cascade, and mark ready or approve only the target cohort. Do not
123
- count `checkedRows` as enriched rows; it is only the table cursor. Use
124
- `progress.enrichedRows`, `progress.needsEnrichRows`, `activeCellCount`,
125
- `preparedMessages`, `approvedRows`, target, estimated row budget remaining, and
126
- `stopReason` to explain progress. If the user says "prepare/generate X
127
- messages", set `targetPreparedMessages:X`, omit `maxRowsToCheck`, and keep
128
- `approvalMode:"mark_ready"`. The backend calibrates on at least 100 actually
129
- enriched rows, estimates the row budget from observed rubric/pass yield, caps
130
- `maxRowsToCheck` at 2500, then adapts later batches up to 250 rows while
131
- recalculating yield. If the user says "approve X messages", use
132
- `approvalMode:"approve"` but still do not launch. If the user says "schedule X
133
- sends" or asks to fill sender sends, use `approvalMode:"approve"` to approve
134
- exactly the bounded X-message cohort during preparation, then continue through
135
- sender, sequence, and final launch greenlight; the launch path must verify that
136
- bounded cohort and must not broad approve-all.
119
+ to Settings/sequence/final greenlight. For any plain post-mint fill request
120
+ such as "fill campaigns", "fill up", "refill sends", "max out sends", or
121
+ "load sends", hand off to the skill-led refill workflow:
122
+
123
+ ```text
124
+ get_subskill_prompt({ subskillName: "refill-sends-workflow" })
125
+ resolve_campaign_fill_route
126
+ get_campaign_refill_state
127
+ ```
128
+
129
+ Plain fill is not an alias for `fill_campaign_horizon` or campaign creation.
130
+ `fill_campaign_horizon` is evergreen-only and must not be used for regular
131
+ campaign refill. If route resolution returns `route:"ask_create"`, ask whether
132
+ to create a normal campaign or evergreen campaigns; campaign creation is never
133
+ the default response to plain fill. When more leads are needed, the refill
134
+ workflow must recommend same-campaign source-ladder replenishment; do not
135
+ create warm-post-engager side campaigns, on-demand campaigns, or unrelated
136
+ campaigns.
137
+
138
+ Treat active fills as capacity-fill preparation: calculate the bounded target
139
+ from sender capacity when needed, then use the refill workflow to decide source
140
+ replenishment, enrichment/prep, approval policy, and scheduler proof. Mutation
141
+ requires exact visible approval and a fresh `get_campaign_refill_state` reread.
142
+ If the user says "prepare/generate X messages", use message-prep primitives with
143
+ `targetPreparedMessages:X` and default `approvalMode:"mark_ready"`. If the user
144
+ says "approve X messages", use `approvalMode:"approve"` only for the bounded
145
+ cohort and still do not launch. If the user says "schedule X sends", approve
146
+ only when explicitly requested, then reread scheduled counts; if
147
+ scheduler-owned cells are not present, report prepared/approved/ready awaiting
148
+ scheduler instead of success. Final launch remains a separate explicit user
149
+ greenlight and must not broad approve-all.
137
150
  When approving reviewed draft rows in the campaign table, resolve the actual
138
151
  visible `Approved` cells with `select_campaign_cells({ columnRole: "approved",
139
152
  rowSelector: { type: "rowIds", rowIds } })` and `update_cell` those returned
@@ -891,7 +904,11 @@ updates.
891
904
 
892
905
  1. Call `mcp__sellable__get_auth_status({})`.
893
906
  2. If auth is not OK with `error.type === "config"` or `error.type === "auth"`,
894
- the user has not signed in yet. Run the FTUX magic-link handoff:
907
+ the user has not signed in yet. Run first-run login through the FTUX
908
+ magic-link handoff. If a browser page or tool guidance gives the user a
909
+ manual fallback, it must be
910
+ `sellable auth set <token> --workspace-id <workspace_id>`. Do not instruct
911
+ the user to hand-edit JSON auth config.
895
912
 
896
913
  a. Say to the user verbatim:
897
914