@sellable/mcp 0.1.550 → 0.1.552

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.
@@ -26,8 +26,8 @@
26
26
  "ownership": "message strategy, proof inventory, token rules, skeptical-prospect review, and selected winner only",
27
27
  "codex": {
28
28
  "description": "Message Drafting worker for campaign-backed template proposals after confirm_lead_list imports a non-empty bounded review batch.",
29
- "model": "gpt-5.5",
30
- "modelReasoningEffort": "xhigh",
29
+ "model": "gpt-5.6-sol",
30
+ "modelReasoningEffort": "high",
31
31
  "sandboxMode": "read-only",
32
32
  "nicknameCandidates": [
33
33
  "Message Drafting",
package/dist/index-dev.js CHANGED
File without changes
package/dist/index.js CHANGED
File without changes
package/dist/server.js CHANGED
@@ -338,7 +338,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
338
338
  }
339
339
  break;
340
340
  case "duplicate_campaign":
341
- result = await duplicateCampaign(args?.campaignId);
341
+ result = await duplicateCampaign(args?.campaignId, args?.name);
342
342
  if (result?.campaignOfferId) {
343
343
  markCampaignContextDirty(result.campaignOfferId, "duplicate_campaign");
344
344
  }
@@ -136,6 +136,7 @@ export interface CreateCampaignInput {
136
136
  }
137
137
  export interface UpdateCampaignInput {
138
138
  flowVersion?: "v1" | "v2";
139
+ name?: string;
139
140
  offerPositioning?: unknown;
140
141
  campaignBrief?: unknown;
141
142
  leadSourceType?: string | null;
@@ -161,12 +162,55 @@ export declare const campaignToolDefinitions: ({
161
162
  type: string;
162
163
  description: string;
163
164
  };
165
+ name?: undefined;
166
+ limit?: undefined;
167
+ tableId?: undefined;
168
+ leadLimit?: undefined;
169
+ page?: undefined;
170
+ filters?: undefined;
171
+ clientProspectId?: undefined;
172
+ senderLinkedinUrl?: undefined;
173
+ offerPositioning?: undefined;
174
+ campaignBrief?: undefined;
175
+ messageGenerationMode?: undefined;
176
+ currentStep?: undefined;
177
+ watchNarration?: undefined;
178
+ leadSourceType?: undefined;
179
+ leadSourceProvider?: undefined;
180
+ selectedLeadListId?: undefined;
181
+ senderIds?: undefined;
182
+ currentStepTransition?: undefined;
183
+ clearCurrentStepIfMatches?: undefined;
184
+ interactionMode?: undefined;
185
+ enableICPFilters?: undefined;
186
+ useMessagingTemplate?: undefined;
187
+ rubric?: undefined;
188
+ flowVersion?: undefined;
189
+ workspaceId?: undefined;
190
+ };
191
+ required: string[];
192
+ additionalProperties: boolean;
193
+ };
194
+ } | {
195
+ name: string;
196
+ description: string;
197
+ inputSchema: {
198
+ type: string;
199
+ properties: {
200
+ campaignId: {
201
+ type: string;
202
+ description: string;
203
+ };
204
+ name: {
205
+ type: string;
206
+ maxLength: number;
207
+ description: string;
208
+ };
164
209
  limit?: undefined;
165
210
  tableId?: undefined;
166
211
  leadLimit?: undefined;
167
212
  page?: undefined;
168
213
  filters?: undefined;
169
- name?: undefined;
170
214
  clientProspectId?: undefined;
171
215
  senderLinkedinUrl?: undefined;
172
216
  offerPositioning?: undefined;
@@ -201,11 +245,11 @@ export declare const campaignToolDefinitions: ({
201
245
  description: string;
202
246
  };
203
247
  campaignId?: undefined;
248
+ name?: undefined;
204
249
  tableId?: undefined;
205
250
  leadLimit?: undefined;
206
251
  page?: undefined;
207
252
  filters?: undefined;
208
- name?: undefined;
209
253
  clientProspectId?: undefined;
210
254
  senderLinkedinUrl?: undefined;
211
255
  offerPositioning?: undefined;
@@ -239,12 +283,12 @@ export declare const campaignToolDefinitions: ({
239
283
  type: string;
240
284
  description: string;
241
285
  };
286
+ name?: undefined;
242
287
  limit?: undefined;
243
288
  tableId?: undefined;
244
289
  leadLimit?: undefined;
245
290
  page?: undefined;
246
291
  filters?: undefined;
247
- name?: undefined;
248
292
  clientProspectId?: undefined;
249
293
  senderLinkedinUrl?: undefined;
250
294
  offerPositioning?: undefined;
@@ -325,8 +369,8 @@ export declare const campaignToolDefinitions: ({
325
369
  additionalProperties: boolean;
326
370
  };
327
371
  };
328
- limit?: undefined;
329
372
  name?: undefined;
373
+ limit?: undefined;
330
374
  clientProspectId?: undefined;
331
375
  senderLinkedinUrl?: undefined;
332
376
  offerPositioning?: undefined;
@@ -363,6 +407,7 @@ export declare const campaignToolDefinitions: ({
363
407
  name: {
364
408
  type: string;
365
409
  description: string;
410
+ maxLength?: undefined;
366
411
  };
367
412
  clientProspectId: {
368
413
  type: string;
@@ -555,6 +600,11 @@ export declare const campaignToolDefinitions: ({
555
600
  type: string;
556
601
  description: string;
557
602
  };
603
+ name: {
604
+ type: string;
605
+ maxLength: number;
606
+ description: string;
607
+ };
558
608
  offerPositioning: {
559
609
  type: string;
560
610
  description: string;
@@ -742,7 +792,6 @@ export declare const campaignToolDefinitions: ({
742
792
  leadLimit?: undefined;
743
793
  page?: undefined;
744
794
  filters?: undefined;
745
- name?: undefined;
746
795
  clientProspectId?: undefined;
747
796
  senderLinkedinUrl?: undefined;
748
797
  messageGenerationMode?: undefined;
@@ -765,12 +814,12 @@ export declare const campaignToolDefinitions: ({
765
814
  type: string;
766
815
  description: string;
767
816
  };
817
+ name?: undefined;
768
818
  limit?: undefined;
769
819
  tableId?: undefined;
770
820
  leadLimit?: undefined;
771
821
  page?: undefined;
772
822
  filters?: undefined;
773
- name?: undefined;
774
823
  clientProspectId?: undefined;
775
824
  senderLinkedinUrl?: undefined;
776
825
  offerPositioning?: undefined;
@@ -807,12 +856,12 @@ export declare const campaignToolDefinitions: ({
807
856
  type: string;
808
857
  description: string;
809
858
  };
859
+ name?: undefined;
810
860
  limit?: undefined;
811
861
  tableId?: undefined;
812
862
  leadLimit?: undefined;
813
863
  page?: undefined;
814
864
  filters?: undefined;
815
- name?: undefined;
816
865
  clientProspectId?: undefined;
817
866
  senderLinkedinUrl?: undefined;
818
867
  offerPositioning?: undefined;
@@ -883,7 +932,7 @@ export declare function archiveCampaign(campaignId: string): Promise<{
883
932
  cellsReset?: number;
884
933
  workflowTableId?: string;
885
934
  }>;
886
- export declare function duplicateCampaign(campaignId: string): Promise<{
935
+ export declare function duplicateCampaign(campaignId: string, name?: string): Promise<{
887
936
  campaignOfferId: string;
888
937
  campaignName: string;
889
938
  workflowTableId: string | null;
@@ -206,7 +206,7 @@ export const campaignToolDefinitions = [
206
206
  },
207
207
  {
208
208
  name: "duplicate_campaign",
209
- description: "Duplicate a campaign by calling Sellable's existing duplicate endpoint. Returns campaignOfferId, campaignName, and workflowTableId for the new copy.",
209
+ description: "Duplicate a campaign by calling Sellable's existing duplicate endpoint. Optionally pass name to set the new CampaignOffer and workflow table name. Returns campaignOfferId, campaignName, and workflowTableId for the new copy.",
210
210
  inputSchema: {
211
211
  type: "object",
212
212
  properties: {
@@ -214,6 +214,11 @@ export const campaignToolDefinitions = [
214
214
  type: "string",
215
215
  description: "Source campaign ID to duplicate.",
216
216
  },
217
+ name: {
218
+ type: "string",
219
+ maxLength: 200,
220
+ description: "Optional exact name for the duplicated campaign and workflow table.",
221
+ },
217
222
  },
218
223
  required: ["campaignId"],
219
224
  additionalProperties: false,
@@ -395,6 +400,11 @@ export const campaignToolDefinitions = [
395
400
  type: "string",
396
401
  description: "Campaign ID to update",
397
402
  },
403
+ name: {
404
+ type: "string",
405
+ maxLength: 200,
406
+ description: "Optional campaign name.",
407
+ },
398
408
  offerPositioning: {
399
409
  type: "object",
400
410
  description: "Updated offer positioning JSON",
@@ -1042,9 +1052,24 @@ export async function archiveCampaign(campaignId) {
1042
1052
  const api = getApi();
1043
1053
  return api.post(`/api/v3/campaigns/${campaignId}/archive`);
1044
1054
  }
1045
- export async function duplicateCampaign(campaignId) {
1055
+ export async function duplicateCampaign(campaignId, name) {
1046
1056
  const api = getApi();
1047
- return api.post(`/api/v3/campaigns/${campaignId}/duplicate`);
1057
+ const normalizedName = name?.trim();
1058
+ const duplicated = normalizedName
1059
+ ? await api.post(`/api/v3/campaigns/${campaignId}/duplicate`, {
1060
+ name: normalizedName,
1061
+ })
1062
+ : await api.post(`/api/v3/campaigns/${campaignId}/duplicate`);
1063
+ if (normalizedName) {
1064
+ const renamed = await api.put(`/api/v2/campaign-offers/${duplicated.campaignOfferId}`, {
1065
+ name: normalizedName,
1066
+ });
1067
+ return {
1068
+ ...duplicated,
1069
+ campaignName: renamed.name ?? normalizedName,
1070
+ };
1071
+ }
1072
+ return duplicated;
1048
1073
  }
1049
1074
  export async function updateCampaignBrief(campaignId, campaignBrief) {
1050
1075
  const api = getApi();
@@ -184,6 +184,7 @@ export type ConfirmLeadListInput = {
184
184
  reviewBatchLimit?: number;
185
185
  includeRawImportResult?: boolean;
186
186
  allowPartialSourceList?: boolean;
187
+ allowDifferentSourceLeadList?: boolean;
187
188
  sourceRowIds?: string[];
188
189
  sourceRowLimit?: number;
189
190
  /**
@@ -305,6 +306,7 @@ export declare const leadToolDefinitions: ({
305
306
  sourceRowIds?: undefined;
306
307
  sourceRowLimit?: undefined;
307
308
  allowPartialSourceList?: undefined;
309
+ allowDifferentSourceLeadList?: undefined;
308
310
  includeRawImportResult?: undefined;
309
311
  selections?: undefined;
310
312
  selectionMode?: undefined;
@@ -502,6 +504,7 @@ export declare const leadToolDefinitions: ({
502
504
  sourceRowIds?: undefined;
503
505
  sourceRowLimit?: undefined;
504
506
  allowPartialSourceList?: undefined;
507
+ allowDifferentSourceLeadList?: undefined;
505
508
  includeRawImportResult?: undefined;
506
509
  selections?: undefined;
507
510
  selectionMode?: undefined;
@@ -598,6 +601,7 @@ export declare const leadToolDefinitions: ({
598
601
  sourceRowIds?: undefined;
599
602
  sourceRowLimit?: undefined;
600
603
  allowPartialSourceList?: undefined;
604
+ allowDifferentSourceLeadList?: undefined;
601
605
  includeRawImportResult?: undefined;
602
606
  selections?: undefined;
603
607
  selectionMode?: undefined;
@@ -766,6 +770,7 @@ export declare const leadToolDefinitions: ({
766
770
  sourceRowIds?: undefined;
767
771
  sourceRowLimit?: undefined;
768
772
  allowPartialSourceList?: undefined;
773
+ allowDifferentSourceLeadList?: undefined;
769
774
  includeRawImportResult?: undefined;
770
775
  selections?: undefined;
771
776
  selectionMode?: undefined;
@@ -876,6 +881,7 @@ export declare const leadToolDefinitions: ({
876
881
  sourceRowIds?: undefined;
877
882
  sourceRowLimit?: undefined;
878
883
  allowPartialSourceList?: undefined;
884
+ allowDifferentSourceLeadList?: undefined;
879
885
  includeRawImportResult?: undefined;
880
886
  selections?: undefined;
881
887
  selectionMode?: undefined;
@@ -995,6 +1001,7 @@ export declare const leadToolDefinitions: ({
995
1001
  sourceRowIds?: undefined;
996
1002
  sourceRowLimit?: undefined;
997
1003
  allowPartialSourceList?: undefined;
1004
+ allowDifferentSourceLeadList?: undefined;
998
1005
  includeRawImportResult?: undefined;
999
1006
  selections?: undefined;
1000
1007
  selectionMode?: undefined;
@@ -1103,6 +1110,7 @@ export declare const leadToolDefinitions: ({
1103
1110
  sourceRowIds?: undefined;
1104
1111
  sourceRowLimit?: undefined;
1105
1112
  allowPartialSourceList?: undefined;
1113
+ allowDifferentSourceLeadList?: undefined;
1106
1114
  includeRawImportResult?: undefined;
1107
1115
  selections?: undefined;
1108
1116
  selectionMode?: undefined;
@@ -1216,6 +1224,7 @@ export declare const leadToolDefinitions: ({
1216
1224
  sourceRowIds?: undefined;
1217
1225
  sourceRowLimit?: undefined;
1218
1226
  allowPartialSourceList?: undefined;
1227
+ allowDifferentSourceLeadList?: undefined;
1219
1228
  includeRawImportResult?: undefined;
1220
1229
  selections?: undefined;
1221
1230
  selectionMode?: undefined;
@@ -1317,6 +1326,7 @@ export declare const leadToolDefinitions: ({
1317
1326
  sourceRowIds?: undefined;
1318
1327
  sourceRowLimit?: undefined;
1319
1328
  allowPartialSourceList?: undefined;
1329
+ allowDifferentSourceLeadList?: undefined;
1320
1330
  includeRawImportResult?: undefined;
1321
1331
  selections?: undefined;
1322
1332
  selectionMode?: undefined;
@@ -2210,6 +2220,7 @@ export declare const leadToolDefinitions: ({
2210
2220
  sourceRowIds?: undefined;
2211
2221
  sourceRowLimit?: undefined;
2212
2222
  allowPartialSourceList?: undefined;
2223
+ allowDifferentSourceLeadList?: undefined;
2213
2224
  includeRawImportResult?: undefined;
2214
2225
  selections?: undefined;
2215
2226
  selectionMode?: undefined;
@@ -2320,6 +2331,7 @@ export declare const leadToolDefinitions: ({
2320
2331
  sourceRowIds?: undefined;
2321
2332
  sourceRowLimit?: undefined;
2322
2333
  allowPartialSourceList?: undefined;
2334
+ allowDifferentSourceLeadList?: undefined;
2323
2335
  includeRawImportResult?: undefined;
2324
2336
  selections?: undefined;
2325
2337
  selectionMode?: undefined;
@@ -3371,6 +3383,7 @@ export declare const leadToolDefinitions: ({
3371
3383
  sourceRowIds?: undefined;
3372
3384
  sourceRowLimit?: undefined;
3373
3385
  allowPartialSourceList?: undefined;
3386
+ allowDifferentSourceLeadList?: undefined;
3374
3387
  includeRawImportResult?: undefined;
3375
3388
  selections?: undefined;
3376
3389
  selectionMode?: undefined;
@@ -3528,6 +3541,7 @@ export declare const leadToolDefinitions: ({
3528
3541
  sourceRowIds?: undefined;
3529
3542
  sourceRowLimit?: undefined;
3530
3543
  allowPartialSourceList?: undefined;
3544
+ allowDifferentSourceLeadList?: undefined;
3531
3545
  includeRawImportResult?: undefined;
3532
3546
  selections?: undefined;
3533
3547
  selectionMode?: undefined;
@@ -3675,6 +3689,7 @@ export declare const leadToolDefinitions: ({
3675
3689
  sourceRowIds?: undefined;
3676
3690
  sourceRowLimit?: undefined;
3677
3691
  allowPartialSourceList?: undefined;
3692
+ allowDifferentSourceLeadList?: undefined;
3678
3693
  includeRawImportResult?: undefined;
3679
3694
  selections?: undefined;
3680
3695
  selectionMode?: undefined;
@@ -3777,6 +3792,7 @@ export declare const leadToolDefinitions: ({
3777
3792
  sourceRowIds?: undefined;
3778
3793
  sourceRowLimit?: undefined;
3779
3794
  allowPartialSourceList?: undefined;
3795
+ allowDifferentSourceLeadList?: undefined;
3780
3796
  includeRawImportResult?: undefined;
3781
3797
  selections?: undefined;
3782
3798
  selectionMode?: undefined;
@@ -3841,6 +3857,10 @@ export declare const leadToolDefinitions: ({
3841
3857
  type: string;
3842
3858
  description: string;
3843
3859
  };
3860
+ allowDifferentSourceLeadList: {
3861
+ type: string;
3862
+ description: string;
3863
+ };
3844
3864
  confirmed: {
3845
3865
  type: string;
3846
3866
  description: string;
@@ -4050,6 +4070,7 @@ export declare const leadToolDefinitions: ({
4050
4070
  sourceRowIds?: undefined;
4051
4071
  sourceRowLimit?: undefined;
4052
4072
  allowPartialSourceList?: undefined;
4073
+ allowDifferentSourceLeadList?: undefined;
4053
4074
  includeRawImportResult?: undefined;
4054
4075
  };
4055
4076
  required: string[];
@@ -4150,6 +4171,7 @@ export declare const leadToolDefinitions: ({
4150
4171
  sourceRowIds?: undefined;
4151
4172
  sourceRowLimit?: undefined;
4152
4173
  allowPartialSourceList?: undefined;
4174
+ allowDifferentSourceLeadList?: undefined;
4153
4175
  includeRawImportResult?: undefined;
4154
4176
  selections?: undefined;
4155
4177
  selectionMode?: undefined;
@@ -2239,6 +2239,10 @@ export const leadToolDefinitions = [
2239
2239
  type: "boolean",
2240
2240
  description: "Explicit override for user-approved early continuation. Default false. When true, confirm_lead_list may copy the currently materialized rows from a still-running source import; use only after the user explicitly asks to keep going with the partial list.",
2241
2241
  },
2242
+ allowDifferentSourceLeadList: {
2243
+ type: "boolean",
2244
+ description: "Explicit override for bounded recovery/refill copies from a source list different from the campaign.selectedLeadListId. Use only when the operator intentionally approved that exact alternate source list.",
2245
+ },
2242
2246
  confirmed: {
2243
2247
  type: "boolean",
2244
2248
  description: "Set true after user approval when interaction mode requires confirmation for confirm/import.",
@@ -4202,7 +4206,7 @@ export async function confirmLeadList(input) {
4202
4206
  const api = getApi();
4203
4207
  const workspaceId = normalizeExplicitWorkspaceId(input.workspaceId);
4204
4208
  const requestOptions = workspaceRequestOptions(workspaceId);
4205
- const { campaignOfferId, currentStep, confirmed, sourceLeadListId, campaignName, keepInSync, jobId, reviewBatchLimit, includeRawImportResult, allowPartialSourceList, targetLeadCount, sourceRowIds, sourceRowLimit, } = input;
4209
+ const { campaignOfferId, currentStep, confirmed, sourceLeadListId, campaignName, keepInSync, jobId, reviewBatchLimit, includeRawImportResult, allowPartialSourceList, allowDifferentSourceLeadList, targetLeadCount, sourceRowIds, sourceRowLimit, } = input;
4206
4210
  assertInteractionApproval({
4207
4211
  campaignId: campaignOfferId,
4208
4212
  action: "confirm-lead-list",
@@ -4414,6 +4418,7 @@ export async function confirmLeadList(input) {
4414
4418
  currentStep: null,
4415
4419
  sourceRowIds,
4416
4420
  sourceRowLimit,
4421
+ allowDifferentSourceLeadList,
4417
4422
  ...(workspaceId ? { workspaceId } : {}),
4418
4423
  };
4419
4424
  const importResult = await (requestOptions
@@ -21,28 +21,30 @@ const DEFAULT_MODEL_QUALITY_CONFIG = {
21
21
  minimumModel: "GPT 5.5",
22
22
  familyKeywords: ["gpt"],
23
23
  minimumVersion: "5.5",
24
- minimumReasoningEffort: "xhigh",
24
+ minimumReasoningEffort: "high",
25
25
  acceptedReasoningEfforts: [
26
+ "high",
26
27
  "extra high",
27
28
  "extra-high",
28
29
  "xhigh",
29
30
  "extra_high",
30
31
  ],
31
- recommendedReasoningEffort: "xhigh",
32
+ recommendedReasoningEffort: "high or better",
32
33
  },
33
34
  hermes: {
34
35
  label: "Hermes",
35
36
  minimumModel: "GPT 5.5",
36
37
  familyKeywords: ["gpt"],
37
38
  minimumVersion: "5.5",
38
- minimumReasoningEffort: "xhigh",
39
+ minimumReasoningEffort: "high",
39
40
  acceptedReasoningEfforts: [
41
+ "high",
40
42
  "extra high",
41
43
  "extra-high",
42
44
  "xhigh",
43
45
  "extra_high",
44
46
  ],
45
- recommendedReasoningEffort: "xhigh",
47
+ recommendedReasoningEffort: "high or better",
46
48
  },
47
49
  },
48
50
  warningCopy: {
@@ -261,8 +261,8 @@ export function getSourceScoutRegistry() {
261
261
  codex: {
262
262
  filename: String(agent.codex?.filename || `${agent.name}.toml`),
263
263
  description: String(agent.codex?.description || ""),
264
- model: String(agent.codex?.model || "gpt-5.5"),
265
- modelReasoningEffort: String(agent.codex?.modelReasoningEffort || "xhigh"),
264
+ model: String(agent.codex?.model || "gpt-5.6-sol"),
265
+ modelReasoningEffort: String(agent.codex?.modelReasoningEffort || "high"),
266
266
  },
267
267
  claude: {
268
268
  filename: String(agent.claude?.filename || `${agent.name}.md`),
@@ -308,8 +308,8 @@ export function getPostFindLeadsScoutRegistry() {
308
308
  codex: {
309
309
  filename: String(agent.codex?.filename || `${agent.name}.toml`),
310
310
  description: String(agent.codex?.description || ""),
311
- model: String(agent.codex?.model || "gpt-5.5"),
312
- modelReasoningEffort: String(agent.codex?.modelReasoningEffort || "xhigh"),
311
+ model: String(agent.codex?.model || "gpt-5.6-sol"),
312
+ modelReasoningEffort: String(agent.codex?.modelReasoningEffort || "high"),
313
313
  },
314
314
  claude: {
315
315
  filename: String(agent.claude?.filename || `${agent.name}.md`),
@@ -376,9 +376,9 @@ export function getPostFindLeadsScoutRegistry() {
376
376
  reusePolicy: "The first completed Message Drafting recommendation remains the default review candidate. Later Lead Fit Builder, Filter Leads, enrichment, or rubric completion may make an enriched rewrite available, but does not automatically retry or replace the initial draft unless campaign/brief/source/list/table/execution-slice identity mismatches or the initial output failed. If filters were chosen but leadScoringRubrics are not yet visible when the branch reads campaign state, Message Drafting must not wait, retry, or return blocked; missing saved rubrics are parent-owned filter setup, and the branch should return status ready with basisStatus usable_initial when campaign/list/table identity and the non-empty execution slice match. User copy feedback before approve-message is an explicit Message Drafting revision and must be routed back through the message branch with the current recommendation and basis.",
377
377
  },
378
378
  usage: {
379
- 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.',
379
+ 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.6-sol high 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.',
380
380
  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.",
381
- 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.',
381
+ 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.6-sol high 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.',
382
382
  schedulerRunReceiptRule: "For refill prompt handoffs, scheduler-run receipt interpretation is mandatory: cellsConsidered is allocation-attempt count, not total ready supply, while readyCellsFound is ready inventory found before prefilters. Inspect campaignScopeSummary before assuming the selected refill campaign/table was included. Interpret prefiltered, skipped, and deferred separately. For ready closed-InMail cells with stale paid-credit prefilter/defer reasons, route to refresh_paid_inmail_credits_then_rerun once, then rerun/status. wait_for_capacity_or_window means report loaded/capped/waiting and do not source or prep more rows. no_ready_cells_continue_refill_prep means return to the refill/prep ladder. Do not treat cellsScheduled:0 alone as failure.",
383
383
  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" }) and get_subskill_asset({ subskillName: "refill-sends-workflow", assetPath: "core/flow.v1.json" }) to hasMore:false before operational steps, 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, post the full sender/campaign/action approval packet in normal chat as Markdown first, then ask request_user_input/AskUserQuestion with exactly Accept and Decline and a compact body that refers back to the posted packet; do not duplicate the campaign table or full operator packet inside the structured question. The chat packet 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 target is the scheduler-forward 48-hour target window: sender-local send days whose configured sending windows overlap the rolling target window, 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 projected coverage (actual sent plus 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 actual sent coverage, future scheduled rows, 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 target-window saturation ledger per selected sender with selected send days, gross capacity, actual sent counts, future scheduler-owned scheduled counts, projected coverage, ready-to-schedule buffer, remaining projected gap, paid-InMail threshold feasibility, and the next MCP primitive. The structured packet lives in target.senderRefillPlans[] with target.eligibleSenderLedger, campaignRanking.options, sourcePlan, nextActions, manualAlternates, and target.globalActionQueue; preserve Need to prepare, Goal, Already sent, Scheduled, Ready and waiting to be scheduled, and Still need labels. In --yolo, execute exactly one globally ranked primitive from the post-refresh target.globalActionQueue[0], then rerun get_refill_target_plan before choosing another action. Refill action ladder: approve generated rows only when an explicit bounded approval gate exists, process all existing same-campaign unenriched/unprepared rows in bounded batches before any source work, then copy bounded net-new rows from the selected source (selectedLeadListId, provider, and source fingerprint preserved), then use provider-aligned source-more. A new source or provider switch changes the reply-rate baseline and is a manual alternate, not a --yolo side effect. The refill_sends MCP command maintains a run-local refreshedPaidInmailSenderIds set: if the first target plan contains refresh_paid_inmail_credits for stale/missing paid-InMail facts, refill_sends refreshes each selected paid-InMail sender at most once, reruns get_refill_target_plan, and returns autoPaidInmailRefresh plus the post-refresh targetPlan before the operator chooses prep/source-copy/bounded-approval/read-only wait. Freshness gate precedes scheduler wait: if any selected target.senderRefillPlans[].paidInmail.status is missing_credit_facts or stale_credit_facts, or the target plan contains refresh_paid_inmail_credits, do not enter wait_for_scheduler even when remainingReadyOrProjectedGap is 0; refresh exact sender credit facts once, reread get_refill_target_plan, then choose scheduler wait only if freshness is clean. Do not present paid-credit refresh as the next operator action after refill_sends has returned a post-refresh targetPlan. 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/source-copy/bounded-approval/read-only wait result, recompute the target-window saturation ledger, and keep going until projected coverage (sent + scheduled) fills the scheduler-forward target window or a concrete non-scheduler blocker is proven. Ready-to-schedule rows are buffer, not completion; if ready covers the projected gap but scheduled cells do not, report loaded, awaiting scheduler and run a persistent read-only scheduler wait/reread loop and keep the run open while awaiting_scheduler_after_ready_buffer is the only remaining state. Paid-InMail threshold changes and connection-campaign creation are explicit continuation options, never --yolo side effects. When no safe in-packet action remains return concrete continuation options with campaign names, exact ids, and which options require a new approval packet; do not return final completion for scheduler wait unless Christian explicitly asks for status or stops the run. 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 and paid-InMail threshold 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. Trust schedulerGate.sendable and scheduler blockers over raw unipileAccountStatus labels alone. For long-running prep use compact prep status checks, reread target plans after prep or cancel, avoid huge parallel target-plan reads when output is large, and if prepared/ready rows grow but sender-level projected coverage does not move after one bounded settle loop, pivot to compact prep status or a scheduler-proven lane instead of waiting on campaign-level ready counts. 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 contribute to projected coverage, and never call them complete unless a final re-read proves projected coverage fills the scheduler-forward target window. 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 projected coverage does not fill the horizon, keep polling when ready buffer covers the gap and report only interim prepared/approved/ready - awaiting scheduler status if Christian asks. 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.`,
384
384
  },
@@ -959,8 +959,8 @@ function sanitizeRefillTargetPlanResult(result) {
959
959
  const grossTarget = senderPlans.reduce((sum, plan) => sum + numberValue(plan.grossTarget), 0);
960
960
  const requestedTarget = senderPlans.reduce((sum, plan) => sum + numberValue(plan.requestedTarget), 0);
961
961
  const effectiveTarget = senderPlans.reduce((sum, plan) => {
962
- const target = typeof plan.schedulerCapacityTarget === "number"
963
- ? plan.schedulerCapacityTarget
962
+ const target = typeof plan.effectiveTarget === "number"
963
+ ? plan.effectiveTarget
964
964
  : numberValue(plan.grossTarget);
965
965
  return sum + target;
966
966
  }, 0);