@sellable/mcp 0.1.298 → 0.1.299

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.
@@ -0,0 +1,72 @@
1
+ const normalize = (value) => String(value ?? "")
2
+ .trim()
3
+ .toLowerCase();
4
+ const normalizeHost = (host) => {
5
+ const normalized = normalize(host);
6
+ if (normalized.includes("claude") || normalized.includes("clod")) {
7
+ return "claude";
8
+ }
9
+ if (normalized.includes("codex") ||
10
+ normalized.includes("gpt") ||
11
+ normalized.includes("openai")) {
12
+ return "codex";
13
+ }
14
+ return "unknown";
15
+ };
16
+ const isHighClaudeReasoning = (reasoning) => {
17
+ const normalized = normalize(reasoning).replace(/[_\s-]+/g, "");
18
+ return ["high", "xhigh", "extrahigh"].includes(normalized);
19
+ };
20
+ const isExtraHighCodexReasoning = (reasoning) => {
21
+ const normalized = normalize(reasoning).replace(/[_\s-]+/g, "");
22
+ return ["xhigh", "extrahigh"].includes(normalized);
23
+ };
24
+ export function evaluateCampaignModelQuality(input = {}) {
25
+ const host = normalizeHost(input.host);
26
+ const model = input.model?.trim() || null;
27
+ const reasoningEffort = input.reasoningEffort?.trim() || null;
28
+ const recommendedModel = host === "claude" ? "Opus 4.8" : "GPT 5.5";
29
+ const recommendedReasoningEffort = host === "claude" ? "high or extra high" : "extra high";
30
+ if (!model && !reasoningEffort) {
31
+ return {
32
+ status: "unknown",
33
+ host,
34
+ model,
35
+ reasoningEffort,
36
+ recommendedModel,
37
+ recommendedReasoningEffort,
38
+ confirmationRequired: true,
39
+ message: "Model settings were not provided by the host. Before campaign-critical generation, confirm the user is using Claude Opus 4.8 at high/extra high or Codex GPT 5.5 at extra high.",
40
+ };
41
+ }
42
+ const normalizedModel = normalize(model);
43
+ const ok = host === "claude"
44
+ ? normalizedModel.includes("opus") &&
45
+ normalizedModel.includes("4.8") &&
46
+ isHighClaudeReasoning(reasoningEffort)
47
+ : normalizedModel.includes("gpt") &&
48
+ normalizedModel.includes("5.5") &&
49
+ isExtraHighCodexReasoning(reasoningEffort);
50
+ if (ok) {
51
+ return {
52
+ status: "ok",
53
+ host,
54
+ model,
55
+ reasoningEffort,
56
+ recommendedModel,
57
+ recommendedReasoningEffort,
58
+ confirmationRequired: false,
59
+ message: "Recommended campaign-quality model settings are active.",
60
+ };
61
+ }
62
+ return {
63
+ status: "warn",
64
+ host,
65
+ model,
66
+ reasoningEffort,
67
+ recommendedModel,
68
+ recommendedReasoningEffort,
69
+ confirmationRequired: true,
70
+ message: `For best campaign quality, switch to ${recommendedModel} with ${recommendedReasoningEffort} reasoning before lead filtering, message generation, or launch review.`,
71
+ };
72
+ }
@@ -250,7 +250,7 @@ export function getSourceScoutRegistry() {
250
250
  filename: String(agent.codex?.filename || `${agent.name}.toml`),
251
251
  description: String(agent.codex?.description || ""),
252
252
  model: String(agent.codex?.model || "gpt-5.5"),
253
- modelReasoningEffort: String(agent.codex?.modelReasoningEffort || "high"),
253
+ modelReasoningEffort: String(agent.codex?.modelReasoningEffort || "xhigh"),
254
254
  },
255
255
  claude: {
256
256
  filename: String(agent.claude?.filename || `${agent.name}.md`),
@@ -365,7 +365,7 @@ export function getPostFindLeadsScoutRegistry() {
365
365
  usage: {
366
366
  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 whenever Codex agent-launch policy is satisfied. 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. Treat YOLO/autonomous mode as campaign-scoped permission for this single post-import worker; do not ask for another permission click in YOLO. If the user has not enabled YOLO and has not explicitly asked for background agents/subagents/parallel agents/delegation/message bg agent in this campaign, ask once before loading the long message prompt in the parent. If permission is granted and 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. If no background-agent tool is callable, start the same full message branch inline before filter drafting or before skip-filter message review, record it as statusSource parent-thread-fallback, 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.",
367
367
  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.",
368
- parentThreadRule: 'Named agents are optional acceleration, but message drafting is not optional. The only normal background worker is Message Drafting. YOLO/autonomous mode counts as campaign-scoped permission for this single post-import worker; do not ask for another permission click in YOLO. If a named agent is unavailable after permission, 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 fall back to parent-thread message drafting; the main thread must execute the same message branch from CampaignOffer state, selected source state, workflowTableId, and initial campaign-table execution slice rows. If no background-agent tool is callable, start that same full message branch inline before filter drafting or before skip-filter message review, record 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 the campaign/list/table and 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; only then move to Filter Leads, show `Filters saved + waiting for message approval`, and 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.',
368
+ parentThreadRule: 'Named agents are optional acceleration, but message drafting is not optional. The only normal background worker is Message Drafting. YOLO/autonomous mode counts as campaign-scoped permission for this single post-import worker; do not ask for another permission click in YOLO. If a named agent is unavailable after permission, 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 fall back to parent-thread message drafting; the main thread must execute the same message branch from CampaignOffer state, selected source state, workflowTableId, and initial campaign-table execution slice rows. If no background-agent tool is callable, start that same full message branch inline before filter drafting or before skip-filter message review, record 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 the campaign/list/table and 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; only after saved-filter approval and a ready message recommendation, move to Messages with currentStep=messages and template-approval waiting copy. 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.',
369
369
  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 or a send count. For "prepare/generate X messages", set targetPreparedMessages:X, omit maxRowsToCheck so the backend calibrates on at least 100 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. Poll get_campaign_message_preparation_status and summarize preparation-job status: checked rows, passed/prepared/approved count, target, estimated row budget remaining, and stop reason. For "approve X messages", use approvalMode:approve but still do not launch. For "schedule X 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.',
370
370
  },
371
371
  };
@@ -186,10 +186,10 @@ export async function waitForLeadListReady(input) {
186
186
  if (input.campaignOfferId && (!leadListId || !provider)) {
187
187
  const campaign = await api.get(`/api/v2/campaign-offers/${input.campaignOfferId}`);
188
188
  if (!leadListId) {
189
- leadListId = campaign.selectedLeadListId ?? undefined;
189
+ leadListId = campaign?.selectedLeadListId ?? undefined;
190
190
  }
191
191
  if (!provider) {
192
- provider = normalizeLeadSourceProvider(campaign.leadSourceProvider);
192
+ provider = normalizeLeadSourceProvider(campaign?.leadSourceProvider);
193
193
  }
194
194
  }
195
195
  if (!leadListId) {
@@ -395,6 +395,18 @@ export declare const allTools: ({
395
395
  type: string;
396
396
  description: string;
397
397
  };
398
+ host: {
399
+ type: string;
400
+ description: string;
401
+ };
402
+ model: {
403
+ type: string;
404
+ description: string;
405
+ };
406
+ reasoningEffort: {
407
+ type: string;
408
+ description: string;
409
+ };
398
410
  };
399
411
  additionalProperties: boolean;
400
412
  };
@@ -860,6 +872,8 @@ export declare const allTools: ({
860
872
  leadSourceProvider?: undefined;
861
873
  selectedLeadListId?: undefined;
862
874
  senderIds?: undefined;
875
+ currentStepTransition?: undefined;
876
+ clearCurrentStepIfMatches?: undefined;
863
877
  interactionMode?: undefined;
864
878
  enableICPFilters?: undefined;
865
879
  useMessagingTemplate?: undefined;
@@ -896,6 +910,8 @@ export declare const allTools: ({
896
910
  leadSourceProvider?: undefined;
897
911
  selectedLeadListId?: undefined;
898
912
  senderIds?: undefined;
913
+ currentStepTransition?: undefined;
914
+ clearCurrentStepIfMatches?: undefined;
899
915
  interactionMode?: undefined;
900
916
  enableICPFilters?: undefined;
901
917
  useMessagingTemplate?: undefined;
@@ -932,6 +948,8 @@ export declare const allTools: ({
932
948
  leadSourceProvider?: undefined;
933
949
  selectedLeadListId?: undefined;
934
950
  senderIds?: undefined;
951
+ currentStepTransition?: undefined;
952
+ clearCurrentStepIfMatches?: undefined;
935
953
  interactionMode?: undefined;
936
954
  enableICPFilters?: undefined;
937
955
  useMessagingTemplate?: undefined;
@@ -1011,6 +1029,8 @@ export declare const allTools: ({
1011
1029
  leadSourceProvider?: undefined;
1012
1030
  selectedLeadListId?: undefined;
1013
1031
  senderIds?: undefined;
1032
+ currentStepTransition?: undefined;
1033
+ clearCurrentStepIfMatches?: undefined;
1014
1034
  interactionMode?: undefined;
1015
1035
  enableICPFilters?: undefined;
1016
1036
  useMessagingTemplate?: undefined;
@@ -1119,6 +1139,8 @@ export declare const allTools: ({
1119
1139
  leadLimit?: undefined;
1120
1140
  page?: undefined;
1121
1141
  filters?: undefined;
1142
+ currentStepTransition?: undefined;
1143
+ clearCurrentStepIfMatches?: undefined;
1122
1144
  interactionMode?: undefined;
1123
1145
  enableICPFilters?: undefined;
1124
1146
  useMessagingTemplate?: undefined;
@@ -1163,6 +1185,15 @@ export declare const allTools: ({
1163
1185
  type: string[];
1164
1186
  description: string;
1165
1187
  };
1188
+ currentStepTransition: {
1189
+ type: string;
1190
+ enum: string[];
1191
+ description: string;
1192
+ };
1193
+ clearCurrentStepIfMatches: {
1194
+ type: string;
1195
+ description: string;
1196
+ };
1166
1197
  watchNarration: {
1167
1198
  type: string;
1168
1199
  description: string;
@@ -1270,6 +1301,8 @@ export declare const allTools: ({
1270
1301
  leadSourceProvider?: undefined;
1271
1302
  selectedLeadListId?: undefined;
1272
1303
  senderIds?: undefined;
1304
+ currentStepTransition?: undefined;
1305
+ clearCurrentStepIfMatches?: undefined;
1273
1306
  interactionMode?: undefined;
1274
1307
  enableICPFilters?: undefined;
1275
1308
  useMessagingTemplate?: undefined;
@@ -2290,6 +2323,7 @@ export declare const allTools: ({
2290
2323
  profileUrl?: undefined;
2291
2324
  postUrl?: undefined;
2292
2325
  companyUrl?: undefined;
2326
+ currentStepTransition?: undefined;
2293
2327
  headlineICPCriteria?: undefined;
2294
2328
  rubricGuidelines?: undefined;
2295
2329
  sourceLeadListId?: undefined;
@@ -2483,6 +2517,7 @@ export declare const allTools: ({
2483
2517
  profileUrl?: undefined;
2484
2518
  postUrl?: undefined;
2485
2519
  companyUrl?: undefined;
2520
+ currentStepTransition?: undefined;
2486
2521
  headlineICPCriteria?: undefined;
2487
2522
  rubricGuidelines?: undefined;
2488
2523
  sourceLeadListId?: undefined;
@@ -2575,6 +2610,7 @@ export declare const allTools: ({
2575
2610
  profileUrl?: undefined;
2576
2611
  postUrl?: undefined;
2577
2612
  companyUrl?: undefined;
2613
+ currentStepTransition?: undefined;
2578
2614
  headlineICPCriteria?: undefined;
2579
2615
  rubricGuidelines?: undefined;
2580
2616
  sourceLeadListId?: undefined;
@@ -2739,6 +2775,7 @@ export declare const allTools: ({
2739
2775
  profileUrl?: undefined;
2740
2776
  postUrl?: undefined;
2741
2777
  companyUrl?: undefined;
2778
+ currentStepTransition?: undefined;
2742
2779
  headlineICPCriteria?: undefined;
2743
2780
  rubricGuidelines?: undefined;
2744
2781
  sourceLeadListId?: undefined;
@@ -2845,6 +2882,7 @@ export declare const allTools: ({
2845
2882
  profileUrl?: undefined;
2846
2883
  postUrl?: undefined;
2847
2884
  companyUrl?: undefined;
2885
+ currentStepTransition?: undefined;
2848
2886
  headlineICPCriteria?: undefined;
2849
2887
  rubricGuidelines?: undefined;
2850
2888
  sourceLeadListId?: undefined;
@@ -2960,6 +2998,7 @@ export declare const allTools: ({
2960
2998
  profileUrl?: undefined;
2961
2999
  postUrl?: undefined;
2962
3000
  companyUrl?: undefined;
3001
+ currentStepTransition?: undefined;
2963
3002
  headlineICPCriteria?: undefined;
2964
3003
  rubricGuidelines?: undefined;
2965
3004
  sourceLeadListId?: undefined;
@@ -3064,6 +3103,7 @@ export declare const allTools: ({
3064
3103
  profileUrl?: undefined;
3065
3104
  postUrl?: undefined;
3066
3105
  companyUrl?: undefined;
3106
+ currentStepTransition?: undefined;
3067
3107
  headlineICPCriteria?: undefined;
3068
3108
  rubricGuidelines?: undefined;
3069
3109
  sourceLeadListId?: undefined;
@@ -3173,6 +3213,7 @@ export declare const allTools: ({
3173
3213
  profileUrl?: undefined;
3174
3214
  postUrl?: undefined;
3175
3215
  companyUrl?: undefined;
3216
+ currentStepTransition?: undefined;
3176
3217
  headlineICPCriteria?: undefined;
3177
3218
  rubricGuidelines?: undefined;
3178
3219
  sourceLeadListId?: undefined;
@@ -3270,6 +3311,7 @@ export declare const allTools: ({
3270
3311
  profileUrl?: undefined;
3271
3312
  postUrl?: undefined;
3272
3313
  companyUrl?: undefined;
3314
+ currentStepTransition?: undefined;
3273
3315
  headlineICPCriteria?: undefined;
3274
3316
  rubricGuidelines?: undefined;
3275
3317
  sourceLeadListId?: undefined;
@@ -4159,6 +4201,7 @@ export declare const allTools: ({
4159
4201
  profileUrl?: undefined;
4160
4202
  postUrl?: undefined;
4161
4203
  companyUrl?: undefined;
4204
+ currentStepTransition?: undefined;
4162
4205
  headlineICPCriteria?: undefined;
4163
4206
  rubricGuidelines?: undefined;
4164
4207
  sourceLeadListId?: undefined;
@@ -4265,6 +4308,7 @@ export declare const allTools: ({
4265
4308
  profileUrl?: undefined;
4266
4309
  postUrl?: undefined;
4267
4310
  companyUrl?: undefined;
4311
+ currentStepTransition?: undefined;
4268
4312
  headlineICPCriteria?: undefined;
4269
4313
  rubricGuidelines?: undefined;
4270
4314
  sourceLeadListId?: undefined;
@@ -5309,6 +5353,7 @@ export declare const allTools: ({
5309
5353
  profileUrl?: undefined;
5310
5354
  postUrl?: undefined;
5311
5355
  companyUrl?: undefined;
5356
+ currentStepTransition?: undefined;
5312
5357
  headlineICPCriteria?: undefined;
5313
5358
  rubricGuidelines?: undefined;
5314
5359
  sourceLeadListId?: undefined;
@@ -5384,6 +5429,11 @@ export declare const allTools: ({
5384
5429
  type: string[];
5385
5430
  description: string;
5386
5431
  };
5432
+ currentStepTransition: {
5433
+ type: string;
5434
+ enum: string[];
5435
+ description: string;
5436
+ };
5387
5437
  page: {
5388
5438
  type: string;
5389
5439
  description: string;
@@ -5606,6 +5656,7 @@ export declare const allTools: ({
5606
5656
  profileUrl?: undefined;
5607
5657
  postUrl?: undefined;
5608
5658
  companyUrl?: undefined;
5659
+ currentStepTransition?: undefined;
5609
5660
  tableId?: undefined;
5610
5661
  campaignName?: undefined;
5611
5662
  keepInSync?: undefined;
@@ -5694,6 +5745,7 @@ export declare const allTools: ({
5694
5745
  profileUrl?: undefined;
5695
5746
  postUrl?: undefined;
5696
5747
  companyUrl?: undefined;
5748
+ currentStepTransition?: undefined;
5697
5749
  headlineICPCriteria?: undefined;
5698
5750
  rubricGuidelines?: undefined;
5699
5751
  sourceLeadListId?: undefined;
@@ -5819,6 +5871,7 @@ export declare const allTools: ({
5819
5871
  profileUrl?: undefined;
5820
5872
  postUrl?: undefined;
5821
5873
  companyUrl?: undefined;
5874
+ currentStepTransition?: undefined;
5822
5875
  headlineICPCriteria?: undefined;
5823
5876
  rubricGuidelines?: undefined;
5824
5877
  mode?: undefined;
@@ -5949,6 +6002,7 @@ export declare const allTools: ({
5949
6002
  profileUrl?: undefined;
5950
6003
  postUrl?: undefined;
5951
6004
  companyUrl?: undefined;
6005
+ currentStepTransition?: undefined;
5952
6006
  rubricGuidelines?: undefined;
5953
6007
  sourceLeadListId?: undefined;
5954
6008
  targetLeadCount?: undefined;
@@ -6043,6 +6097,7 @@ export declare const allTools: ({
6043
6097
  profileUrl?: undefined;
6044
6098
  postUrl?: undefined;
6045
6099
  companyUrl?: undefined;
6100
+ currentStepTransition?: undefined;
6046
6101
  rubricGuidelines?: undefined;
6047
6102
  sourceLeadListId?: undefined;
6048
6103
  targetLeadCount?: undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellable/mcp",
3
- "version": "0.1.298",
3
+ "version": "0.1.299",
4
4
  "type": "module",
5
5
  "description": "Sellable MCP server for Claude Code and Codex campaign workflows",
6
6
  "main": "dist/index.js",
@@ -204,11 +204,14 @@ production behavior.
204
204
  - `sellable:add_column`: add one column to an already-committed table when the
205
205
  user explicitly asks for a narrow column edit outside this full-table skill.
206
206
  - `sellable:list_column_types`: discover visible createable column options, with
207
- optional hidden/deprecated rows for existing-table safety.
207
+ optional hidden/deprecated rows for existing-table safety. The only arguments
208
+ are `includeHidden` and `includeDeprecated`.
208
209
  - `sellable:get_column_schema`: inspect one column option, including default
209
- config, create/edit fields, run behavior, and safety verdict.
210
+ config, editor contract, mutation capabilities, editable fields, full
211
+ replacement config mode, run behavior, and safety verdict.
210
212
  - `sellable:update_column`: update an existing column's name or full replacement
211
- config; use `runCells:true` when the edit should reprocess eligible cells.
213
+ config after checking `sellable:get_column_schema`; use `runCells:true` when
214
+ the schema says edit reprocessing is supported.
212
215
  - `sellable:delete_column`: delete a column through backend cleanup and inspect
213
216
  affected dependencies, cancelled cells, and cleanup warnings.
214
217
  - `sellable:reorder_columns`: submit the exact full column ID order for a table.
@@ -4,8 +4,9 @@ Display names in this catalog are sourced from
4
4
  `getColumnTypeConfig(type).displayName`. Do not paraphrase them.
5
5
 
6
6
  MCP create targets are the visible options returned by
7
- `sellable:list_column_types()` with `createable:true`. Hidden active/system rows
8
- and deprecated/load-only aliases may appear when requested for existing-table
7
+ `sellable:list_column_types()`. The tool only accepts `includeHidden` and
8
+ `includeDeprecated` arguments. Hidden active/system rows and
9
+ deprecated/load-only aliases may appear when requested for existing-table
9
10
  read/edit/delete safety, but they are not valid `add_column` or
10
11
  `commit_blueprint` create targets.
11
12
 
@@ -93,8 +93,9 @@ message-template approval before enrichment/filtering or Generate Message cells.
93
93
  Filter work stays in the parent thread and must inspect visible campaign rows
94
94
  with `get_rows_minimal` / `get_rows` before drafting and saving rubrics; use at
95
95
  most one direct `enrich_with_prospeo` sample when row evidence is too thin.
96
- After filter approval, Filter Leads should show `Filters saved + waiting for
97
- message approval` until the template is approved.
96
+ After filter approval and once the message review candidate exists, the browser
97
+ should move to Messages with `currentStep: "messages"` and show template
98
+ approval waiting copy until the template is approved.
98
99
  The default path stays the existing first campaign-table execution slice:
99
100
  review the normal `reviewBatchLimit:15`, approve reviewed draft rows, then move
100
101
  to Settings/sequence/final greenlight. Only call
@@ -430,14 +431,14 @@ vs skip filters immediately. Once the user answers, launch only Message Drafting
430
431
  from the same campaign/table basis. This kickoff is required for both answers:
431
432
  `Use filters` and `Skip filters`. If the user chooses filters, the parent
432
433
  thread moves to Filter Rules, loads the filter reference, saves rubrics, then
433
- asks for filter approval while Message Drafting runs. After approval, move to
434
- Filter Leads and show `Filters saved + waiting for message approval` while the
435
- message recommendation is reviewed. If the user skips filters, start Message
436
- Drafting first, then move to Messages/message review after it has started or
437
- returned a ready recommendation. `update_campaign({ currentStep: "messages" })`
438
- is not proof of kickoff. Enrichment/filtering and Generate Message cells wait
439
- for message approval. AI Generated is an explicit opt-out from the template
440
- path.
434
+ asks for filter approval while Message Drafting runs. After approval and once
435
+ the message recommendation is ready, move to Messages with
436
+ `currentStep: "messages"` and template-approval waiting copy while the message
437
+ recommendation is reviewed. If the user skips filters, start Message Drafting
438
+ first, then move to Messages/message review after it has started or returned a
439
+ ready recommendation. `update_campaign({ currentStep: "messages" })` is not
440
+ proof of kickoff. Enrichment/filtering and Generate Message cells wait for
441
+ message approval. AI Generated is an explicit opt-out from the template path.
441
442
 
442
443
  The Message Drafting handoff must stay lean. Include only `campaignId`,
443
444
  `workflowTableId`, a concise brief summary, concise source summary/source-use
@@ -969,9 +970,10 @@ updates.
969
970
  call `mcp__sellable__update_campaign({ campaignId, enableICPFilters: true, currentStep: "create-icp-rubric", watchNarration })`
970
971
  so the watched app moves to Filter Rules while the parent drafts/saves
971
972
  rubrics and Message Drafting runs.
972
- After rubrics save, keep Filter Rules visible for approval; after approval,
973
- move to Filter Leads and show `Filters saved + waiting for message approval`
974
- until the template is approved.
973
+ After rubrics save, keep Filter Rules visible for approval; after approval
974
+ and once Message Drafting has a review candidate, move to Messages with
975
+ `currentStep: "messages"` and template-approval waiting copy until the
976
+ template is approved.
975
977
  If filters are skipped, launch Message Drafting before moving to
976
978
  Messages/message review; updating `currentStep` to `messages` is not proof
977
979
  that the background worker started. Queue the bounded campaign-table
@@ -986,8 +988,8 @@ updates.
986
988
  the brief, `pick-provider` or the selected provider step while sourcing,
987
989
  `filter-choice` after source rows are copied into the campaign table, `create-icp-rubric` as soon
988
990
  as filters are chosen and while saved filters await approval,
989
- `apply-icp-rubric` after filter approval while message approval is pending,
990
- and after message approval while bounded enrichment/filter scoring runs, `validate-sample` only as a recovery/legacy
991
+ `messages` after filter approval while message approval is pending,
992
+ `apply-icp-rubric` after message approval while bounded enrichment/filter scoring runs, `validate-sample` only as a recovery/legacy
991
993
  observation state,
992
994
  `auto-execute-messaging` after at least one row passes and initial campaign-row
993
995
  messages are being generated or reviewed, `awaiting-user-greenlight` only
@@ -41,7 +41,7 @@ active flow. Legacy packet/mint artifacts stay in
41
41
  6. Approve the Find Buyers Plan, then approve Start Import.
42
42
  7. Materialize the source list and confirm 15 campaign-table rows for setup.
43
43
  8. Ask whether to use filters or skip them.
44
- 9. Persist rubrics, approve saved criteria, then move to Filter Leads.
44
+ 9. Persist rubrics, approve saved criteria, then move to Messages.
45
45
  10. Review and approve/revise the message template.
46
46
  11. Sync the approved template into the brief, then queue bounded filtering.
47
47
  12. After one generated pass, review it, then hand off to Settings and launch.
@@ -293,11 +293,11 @@ customer-facing source-choice labels.
293
293
 
294
294
  ## Prospect Setup Workstreams
295
295
 
296
- After `confirm_lead_list` copies source rows and records the review batch, ask the filter-choice question immediately. Do not call `get_post_find_leads_scout_registry`, load filter/message prompts, or spawn Message Drafting before that question. Before the question: short setup summary plus add filters, skip filters, or revise source; no extra watch link.
296
+ After `confirm_lead_list` copies source rows and records the review batch, ask the filter-choice question immediately. Do not call `get_post_find_leads_scout_registry`, load filter/message prompts, or spawn Message Drafting before that question. Before it: short setup summary plus add filters, skip filters, or revise source; no extra watch link.
297
297
 
298
298
  After filter choice, the only normal background worker is Message Drafting (`post-find-leads-message-scout`). The registry lookup is not a launch. Both choices must run this kickoff: call the registry, then start Message Drafting via `Task`/`spawn_agent` before filter refs, `save_rubrics`, or skip review. YOLO: do not ask for another permission click. If no background tool is callable, run the same full branch inline as `parent-thread-fallback`; otherwise return `blocked` / `retry-needed`. `update_campaign({ currentStep: "messages" })` is not proof of kickoff.
299
299
 
300
- The parent thread is the orchestrator and the filter writer. On the filters path, start Message Drafting, load `references/filter-leads.md`, save rubrics, and ask users to approve saved criteria. Keep `currentStep` on Filter Rules and show `Filters saved + waiting for message approval`; do not queue cells until message approval. Tell the user Message Drafting is preparing the template in the background.
300
+ Parent thread writes filters. On the filters path, start Message Drafting, load `references/filter-leads.md`, save rubrics, and ask users to approve saved criteria. Keep Filter Rules until criteria are approved. Then, once Message Drafting has a review candidate, move to `currentStep: "messages"` with template approval copy; do not queue cells until message approval. Say Message Drafting is preparing the template.
301
301
 
302
302
  Message Drafting must not wait for `save_rubrics` or require visible
303
303
  `leadScoringRubrics` before returning a reusable template. The parent waits for
@@ -308,11 +308,12 @@ tools, and asks for filter approval while Message Drafting runs.
308
308
 
309
309
  The parent thread is the orchestrator and the filter writer. On the filters path
310
310
  it must verify `save_rubrics`, keep the browser on Filter Rules, and ask for
311
- filter approval. Only after saved filters are approved should it move the
312
- browser to Filter Leads and join/wait for Message Drafting. The join gate is
313
- saved-filter approval or a resolved skip-filter choice, plus a message
314
- recommendation grounded in the same campaign/table basis. Enrichment, filtering,
315
- and Generate Message cells wait for template approval on the Use Template path.
311
+ filter approval. Only after saved filters are approved and a message review
312
+ candidate exists should it move the browser to Messages with durable
313
+ `currentStep: "messages"`. The join gate is saved-filter approval or a resolved
314
+ skip-filter choice, plus a message recommendation grounded in the same
315
+ campaign/table basis. Enrichment, filtering, and Generate Message cells wait for
316
+ template approval on the Use Template path.
316
317
  Message Drafting does not wait for `save_rubrics`: if filters were chosen but
317
318
  saved `leadScoringRubrics` are not visible yet, it should still return the
318
319
  initial reusable template from the campaign-table execution slice with