@sellable/mcp 0.1.506 → 0.1.508

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.
@@ -1,22 +1,15 @@
1
1
  type ApprovalMode = "mark_ready" | "approve";
2
2
  type RowSelector = {
3
- type: "reviewBatch";
4
- basisHash?: string;
5
- limit?: number;
6
- } | {
7
- type: "rowIds";
8
- rowIds: string[];
9
- } | {
10
3
  type: "needsEnrichment";
11
4
  limit?: number;
12
5
  } | {
13
6
  type: "needsApproval";
14
7
  limit?: number;
15
8
  } | {
16
- type: "passedRows";
9
+ type: "needsGeneratedMessage";
17
10
  limit?: number;
18
11
  } | {
19
- type: "needsGeneratedMessage";
12
+ type: "reviewBatch";
20
13
  limit?: number;
21
14
  } | {
22
15
  type: "staleGeneratedMessages";
@@ -35,9 +28,13 @@ type StartPrepareMessagesInput = PrepareMessagesBaseInput & {
35
28
  batchSize?: number;
36
29
  maxBatchRows?: number;
37
30
  approvalMode?: ApprovalMode;
31
+ rowSelector?: RowSelector;
38
32
  autoContinue?: boolean;
39
33
  disableLowPassRateStop?: boolean;
40
- rowSelector?: RowSelector;
34
+ requestHash?: string;
35
+ requestSource?: string;
36
+ senderId?: string;
37
+ actionType?: string;
41
38
  };
42
39
  type StatusPrepareMessagesInput = PrepareMessagesBaseInput;
43
40
  type CancelPrepareMessagesInput = PrepareMessagesBaseInput;
@@ -82,13 +79,6 @@ export declare const campaignMessagePreparationToolDefinitions: ({
82
79
  enum: string[];
83
80
  description: string;
84
81
  };
85
- autoContinue: {
86
- type: string;
87
- };
88
- disableLowPassRateStop: {
89
- type: string;
90
- description: string;
91
- };
92
82
  rowSelector: {
93
83
  type: string;
94
84
  description: string;
@@ -97,15 +87,6 @@ export declare const campaignMessagePreparationToolDefinitions: ({
97
87
  type: string;
98
88
  enum: string[];
99
89
  };
100
- basisHash: {
101
- type: string;
102
- };
103
- rowIds: {
104
- type: string;
105
- items: {
106
- type: string;
107
- };
108
- };
109
90
  limit: {
110
91
  type: string;
111
92
  minimum: number;
@@ -115,6 +96,22 @@ export declare const campaignMessagePreparationToolDefinitions: ({
115
96
  required: string[];
116
97
  additionalProperties: boolean;
117
98
  };
99
+ autoContinue: {
100
+ type: string;
101
+ };
102
+ senderId: {
103
+ type: string;
104
+ description: string;
105
+ };
106
+ actionType: {
107
+ type: string;
108
+ enum: string[];
109
+ description: string;
110
+ };
111
+ disableLowPassRateStop: {
112
+ type: string;
113
+ description: string;
114
+ };
118
115
  workspaceId: {
119
116
  type: string;
120
117
  description: string;
@@ -149,9 +146,11 @@ export declare const campaignMessagePreparationToolDefinitions: ({
149
146
  batchSize?: undefined;
150
147
  maxBatchRows?: undefined;
151
148
  approvalMode?: undefined;
149
+ rowSelector?: undefined;
152
150
  autoContinue?: undefined;
151
+ senderId?: undefined;
152
+ actionType?: undefined;
153
153
  disableLowPassRateStop?: undefined;
154
- rowSelector?: undefined;
155
154
  };
156
155
  additionalProperties: boolean;
157
156
  required?: undefined;
@@ -43,34 +43,45 @@ export const campaignMessagePreparationToolDefinitions = [
43
43
  enum: ["mark_ready", "approve"],
44
44
  description: "Defaults to mark_ready. Use approve only when the user explicitly asks to flip Approved cells. Approval is not scheduling; it only makes the bounded cohort eligible for downstream scheduler ownership.",
45
45
  },
46
- autoContinue: { type: "boolean" },
47
- disableLowPassRateStop: {
48
- type: "boolean",
49
- description: "Operator override for explicit fill/exhaust requests. When true, keep processing eligible rows even if the enriched sample pass rate is low. Still bounded by targetPreparedMessages and maxRowsToCheck.",
50
- },
51
46
  rowSelector: {
52
47
  type: "object",
53
- description: 'Optional row selector for scoped refill frontiers. Use {"type":"needsEnrichment","limit":N} to prepare the next unenriched/refill rows selected by get_refill_target_plan.',
48
+ description: 'Optional semantic row selector for refill frontiers. For regular refill preparation, use {type:"needsEnrichment"} so the backend starts at the actual unenriched table frontier instead of a generic prefix scan.',
54
49
  properties: {
55
50
  type: {
56
51
  type: "string",
57
52
  enum: [
58
- "reviewBatch",
59
- "rowIds",
60
53
  "needsEnrichment",
61
54
  "needsApproval",
62
- "passedRows",
63
55
  "needsGeneratedMessage",
56
+ "reviewBatch",
64
57
  "staleGeneratedMessages",
65
58
  ],
66
59
  },
67
- basisHash: { type: "string" },
68
- rowIds: { type: "array", items: { type: "string" } },
69
60
  limit: { type: "number", minimum: 1, maximum: 500 },
70
61
  },
71
62
  required: ["type"],
72
63
  additionalProperties: false,
73
64
  },
65
+ autoContinue: { type: "boolean" },
66
+ senderId: {
67
+ type: "string",
68
+ description: "Optional refill-scope sender id. Used with actionType by refill_sends so preparation skips rows already attempted by other send actions.",
69
+ },
70
+ actionType: {
71
+ type: "string",
72
+ enum: [
73
+ "send_invite",
74
+ "send_dm",
75
+ "send_inmail_open",
76
+ "send_inmail_closed",
77
+ "react_and_comment",
78
+ ],
79
+ description: "Optional refill-scope send action. InMail scopes treat open and paid InMail as one contact-reuse family.",
80
+ },
81
+ disableLowPassRateStop: {
82
+ type: "boolean",
83
+ description: "Operator override for explicit fill/exhaust requests. When true, keep processing eligible rows even if the enriched sample pass rate is low. Still bounded by targetPreparedMessages and maxRowsToCheck.",
84
+ },
74
85
  workspaceId: {
75
86
  type: "string",
76
87
  description: "Explicit request-scoped workspace id for scheduled/yolo refill automation.",
@@ -120,9 +131,13 @@ export function startPrepareCampaignMessages(input) {
120
131
  batchSize: input.batchSize,
121
132
  maxBatchRows: input.maxBatchRows,
122
133
  approvalMode: input.approvalMode,
134
+ rowSelector: input.rowSelector,
123
135
  autoContinue: input.autoContinue,
124
136
  disableLowPassRateStop: input.disableLowPassRateStop,
125
- rowSelector: input.rowSelector,
137
+ requestHash: input.requestHash,
138
+ requestSource: input.requestSource,
139
+ senderId: input.senderId,
140
+ actionType: input.actionType,
126
141
  ...(workspaceId ? { workspaceId } : {}),
127
142
  }, workspaceId ?? undefined);
128
143
  }
@@ -181,6 +181,8 @@ export type ConfirmLeadListInput = {
181
181
  reviewBatchLimit?: number;
182
182
  includeRawImportResult?: boolean;
183
183
  allowPartialSourceList?: boolean;
184
+ sourceRowIds?: string[];
185
+ sourceRowLimit?: number;
184
186
  /**
185
187
  * Deprecated alias for reviewBatchLimit. Confirming a lead list now copies the
186
188
  * confirmed source into the campaign table; this value no longer caps clone
@@ -295,6 +297,8 @@ export declare const leadToolDefinitions: ({
295
297
  keepInSync?: undefined;
296
298
  jobId?: undefined;
297
299
  reviewBatchLimit?: undefined;
300
+ sourceRowIds?: undefined;
301
+ sourceRowLimit?: undefined;
298
302
  allowPartialSourceList?: undefined;
299
303
  includeRawImportResult?: undefined;
300
304
  selections?: undefined;
@@ -489,6 +493,8 @@ export declare const leadToolDefinitions: ({
489
493
  keepInSync?: undefined;
490
494
  jobId?: undefined;
491
495
  reviewBatchLimit?: undefined;
496
+ sourceRowIds?: undefined;
497
+ sourceRowLimit?: undefined;
492
498
  allowPartialSourceList?: undefined;
493
499
  includeRawImportResult?: undefined;
494
500
  selections?: undefined;
@@ -582,6 +588,8 @@ export declare const leadToolDefinitions: ({
582
588
  keepInSync?: undefined;
583
589
  jobId?: undefined;
584
590
  reviewBatchLimit?: undefined;
591
+ sourceRowIds?: undefined;
592
+ sourceRowLimit?: undefined;
585
593
  allowPartialSourceList?: undefined;
586
594
  includeRawImportResult?: undefined;
587
595
  selections?: undefined;
@@ -747,6 +755,8 @@ export declare const leadToolDefinitions: ({
747
755
  keepInSync?: undefined;
748
756
  jobId?: undefined;
749
757
  reviewBatchLimit?: undefined;
758
+ sourceRowIds?: undefined;
759
+ sourceRowLimit?: undefined;
750
760
  allowPartialSourceList?: undefined;
751
761
  includeRawImportResult?: undefined;
752
762
  selections?: undefined;
@@ -854,6 +864,8 @@ export declare const leadToolDefinitions: ({
854
864
  keepInSync?: undefined;
855
865
  jobId?: undefined;
856
866
  reviewBatchLimit?: undefined;
867
+ sourceRowIds?: undefined;
868
+ sourceRowLimit?: undefined;
857
869
  allowPartialSourceList?: undefined;
858
870
  includeRawImportResult?: undefined;
859
871
  selections?: undefined;
@@ -970,6 +982,8 @@ export declare const leadToolDefinitions: ({
970
982
  keepInSync?: undefined;
971
983
  jobId?: undefined;
972
984
  reviewBatchLimit?: undefined;
985
+ sourceRowIds?: undefined;
986
+ sourceRowLimit?: undefined;
973
987
  allowPartialSourceList?: undefined;
974
988
  includeRawImportResult?: undefined;
975
989
  selections?: undefined;
@@ -1075,6 +1089,8 @@ export declare const leadToolDefinitions: ({
1075
1089
  keepInSync?: undefined;
1076
1090
  jobId?: undefined;
1077
1091
  reviewBatchLimit?: undefined;
1092
+ sourceRowIds?: undefined;
1093
+ sourceRowLimit?: undefined;
1078
1094
  allowPartialSourceList?: undefined;
1079
1095
  includeRawImportResult?: undefined;
1080
1096
  selections?: undefined;
@@ -1185,6 +1201,8 @@ export declare const leadToolDefinitions: ({
1185
1201
  keepInSync?: undefined;
1186
1202
  jobId?: undefined;
1187
1203
  reviewBatchLimit?: undefined;
1204
+ sourceRowIds?: undefined;
1205
+ sourceRowLimit?: undefined;
1188
1206
  allowPartialSourceList?: undefined;
1189
1207
  includeRawImportResult?: undefined;
1190
1208
  selections?: undefined;
@@ -1283,6 +1301,8 @@ export declare const leadToolDefinitions: ({
1283
1301
  keepInSync?: undefined;
1284
1302
  jobId?: undefined;
1285
1303
  reviewBatchLimit?: undefined;
1304
+ sourceRowIds?: undefined;
1305
+ sourceRowLimit?: undefined;
1286
1306
  allowPartialSourceList?: undefined;
1287
1307
  includeRawImportResult?: undefined;
1288
1308
  selections?: undefined;
@@ -2173,6 +2193,8 @@ export declare const leadToolDefinitions: ({
2173
2193
  keepInSync?: undefined;
2174
2194
  jobId?: undefined;
2175
2195
  reviewBatchLimit?: undefined;
2196
+ sourceRowIds?: undefined;
2197
+ sourceRowLimit?: undefined;
2176
2198
  allowPartialSourceList?: undefined;
2177
2199
  includeRawImportResult?: undefined;
2178
2200
  selections?: undefined;
@@ -2280,6 +2302,8 @@ export declare const leadToolDefinitions: ({
2280
2302
  keepInSync?: undefined;
2281
2303
  jobId?: undefined;
2282
2304
  reviewBatchLimit?: undefined;
2305
+ sourceRowIds?: undefined;
2306
+ sourceRowLimit?: undefined;
2283
2307
  allowPartialSourceList?: undefined;
2284
2308
  includeRawImportResult?: undefined;
2285
2309
  selections?: undefined;
@@ -3325,6 +3349,8 @@ export declare const leadToolDefinitions: ({
3325
3349
  keepInSync?: undefined;
3326
3350
  jobId?: undefined;
3327
3351
  reviewBatchLimit?: undefined;
3352
+ sourceRowIds?: undefined;
3353
+ sourceRowLimit?: undefined;
3328
3354
  allowPartialSourceList?: undefined;
3329
3355
  includeRawImportResult?: undefined;
3330
3356
  selections?: undefined;
@@ -3479,6 +3505,8 @@ export declare const leadToolDefinitions: ({
3479
3505
  keepInSync?: undefined;
3480
3506
  jobId?: undefined;
3481
3507
  reviewBatchLimit?: undefined;
3508
+ sourceRowIds?: undefined;
3509
+ sourceRowLimit?: undefined;
3482
3510
  allowPartialSourceList?: undefined;
3483
3511
  includeRawImportResult?: undefined;
3484
3512
  selections?: undefined;
@@ -3620,6 +3648,8 @@ export declare const leadToolDefinitions: ({
3620
3648
  keepInSync?: undefined;
3621
3649
  jobId?: undefined;
3622
3650
  reviewBatchLimit?: undefined;
3651
+ sourceRowIds?: undefined;
3652
+ sourceRowLimit?: undefined;
3623
3653
  allowPartialSourceList?: undefined;
3624
3654
  includeRawImportResult?: undefined;
3625
3655
  selections?: undefined;
@@ -3716,6 +3746,8 @@ export declare const leadToolDefinitions: ({
3716
3746
  keepInSync?: undefined;
3717
3747
  jobId?: undefined;
3718
3748
  reviewBatchLimit?: undefined;
3749
+ sourceRowIds?: undefined;
3750
+ sourceRowLimit?: undefined;
3719
3751
  allowPartialSourceList?: undefined;
3720
3752
  includeRawImportResult?: undefined;
3721
3753
  selections?: undefined;
@@ -3762,6 +3794,17 @@ export declare const leadToolDefinitions: ({
3762
3794
  type: string;
3763
3795
  description: string;
3764
3796
  };
3797
+ sourceRowIds: {
3798
+ type: string;
3799
+ items: {
3800
+ type: string;
3801
+ };
3802
+ description: string;
3803
+ };
3804
+ sourceRowLimit: {
3805
+ type: string;
3806
+ description: string;
3807
+ };
3765
3808
  allowPartialSourceList: {
3766
3809
  type: string;
3767
3810
  description: string;
@@ -3971,6 +4014,8 @@ export declare const leadToolDefinitions: ({
3971
4014
  keepInSync?: undefined;
3972
4015
  jobId?: undefined;
3973
4016
  reviewBatchLimit?: undefined;
4017
+ sourceRowIds?: undefined;
4018
+ sourceRowLimit?: undefined;
3974
4019
  allowPartialSourceList?: undefined;
3975
4020
  includeRawImportResult?: undefined;
3976
4021
  };
@@ -4068,6 +4113,8 @@ export declare const leadToolDefinitions: ({
4068
4113
  keepInSync?: undefined;
4069
4114
  jobId?: undefined;
4070
4115
  reviewBatchLimit?: undefined;
4116
+ sourceRowIds?: undefined;
4117
+ sourceRowLimit?: undefined;
4071
4118
  allowPartialSourceList?: undefined;
4072
4119
  includeRawImportResult?: undefined;
4073
4120
  selections?: undefined;
@@ -2202,6 +2202,15 @@ export const leadToolDefinitions = [
2202
2202
  type: "number",
2203
2203
  description: "Number of campaign rows to use as the initial review/process sample. Defaults to 15.",
2204
2204
  },
2205
+ sourceRowIds: {
2206
+ type: "array",
2207
+ items: { type: "string" },
2208
+ description: "Optional exact source WorkflowTableRow ids to copy from the selected source lead list. Use only for bounded refill same-source copy packets.",
2209
+ },
2210
+ sourceRowLimit: {
2211
+ type: "number",
2212
+ description: "Optional cap for copying the first N source rows. Prefer sourceRowIds when a refill packet provides exact ids.",
2213
+ },
2205
2214
  allowPartialSourceList: {
2206
2215
  type: "boolean",
2207
2216
  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.",
@@ -3633,11 +3642,11 @@ export async function searchSignals(input) {
3633
3642
  const effectiveHeadlineICPCriteria = headlineICPCriteria && headlineICPCriteria.length > 0
3634
3643
  ? headlineICPCriteria
3635
3644
  : rubricGuidelines;
3636
- if (campaignOfferId) {
3645
+ if (campaignOfferId && searchCurrentStep) {
3637
3646
  await api.put(`/api/v2/campaign-offers/${campaignOfferId}`, {
3638
3647
  leadSourceType: "new",
3639
3648
  leadSourceProvider: "signal-discovery",
3640
- ...(searchCurrentStep ? { currentStep: searchCurrentStep } : {}),
3649
+ currentStep: searchCurrentStep,
3641
3650
  ...(currentStepTransition ? { currentStepTransition } : {}),
3642
3651
  watchNarration: buildSignalDiscoverySearchWatchNarration(),
3643
3652
  });
@@ -3653,9 +3662,9 @@ export async function searchSignals(input) {
3653
3662
  }
3654
3663
  const response = await api.post(`/api/v1/signal-discovery/search-signals`, searchRequest);
3655
3664
  const summary = summarizeSignalSearchResponse(response);
3656
- if (campaignOfferId) {
3665
+ if (campaignOfferId && searchCurrentStep) {
3657
3666
  await api.put(`/api/v2/campaign-offers/${campaignOfferId}`, {
3658
- ...(searchCurrentStep ? { currentStep: searchCurrentStep } : {}),
3667
+ currentStep: searchCurrentStep,
3659
3668
  ...(currentStepTransition ? { currentStepTransition } : {}),
3660
3669
  watchNarration: buildSignalDiscoveryResultsWatchNarration(summary.postsReturned),
3661
3670
  });
@@ -4130,7 +4139,7 @@ export async function confirmLeadList(input) {
4130
4139
  const api = getApi();
4131
4140
  const workspaceId = normalizeExplicitWorkspaceId(input.workspaceId);
4132
4141
  const requestOptions = workspaceRequestOptions(workspaceId);
4133
- const { campaignOfferId, currentStep, confirmed, sourceLeadListId, campaignName, keepInSync, jobId, reviewBatchLimit, includeRawImportResult, allowPartialSourceList, targetLeadCount, } = input;
4142
+ const { campaignOfferId, currentStep, confirmed, sourceLeadListId, campaignName, keepInSync, jobId, reviewBatchLimit, includeRawImportResult, allowPartialSourceList, targetLeadCount, sourceRowIds, sourceRowLimit, } = input;
4134
4143
  assertInteractionApproval({
4135
4144
  campaignId: campaignOfferId,
4136
4145
  action: "confirm-lead-list",
@@ -4336,6 +4345,8 @@ export async function confirmLeadList(input) {
4336
4345
  campaignName,
4337
4346
  keepInSync,
4338
4347
  currentStep: null,
4348
+ sourceRowIds,
4349
+ sourceRowLimit,
4339
4350
  ...(workspaceId ? { workspaceId } : {}),
4340
4351
  };
4341
4352
  const importResult = await (requestOptions
@@ -4571,7 +4582,7 @@ export function getProviderPrompt(input) {
4571
4582
  }
4572
4583
  export async function selectPromisingPosts(input) {
4573
4584
  const api = getApi();
4574
- const { campaignOfferId, selections, headlineICPCriteria, selectionMode, mode, scrapePlanMode, targetEngagerCount, maxPostsToScrape, } = input;
4585
+ const { campaignOfferId, selections, headlineICPCriteria, currentStep, selectionMode, mode, scrapePlanMode, targetEngagerCount, maxPostsToScrape, } = input;
4575
4586
  const effectiveMode = selectionMode ?? mode ?? "replace";
4576
4587
  const effectiveScrapePlanMode = scrapePlanMode ??
4577
4588
  (targetEngagerCount || maxPostsToScrape
@@ -4671,10 +4682,13 @@ Approval card should say:
4671
4682
 
4672
4683
  **Approve scraping ${selectionResult.selectedCount} recommended LinkedIn post${selectionResult.selectedCount === 1 ? "" : "s"}?**`;
4673
4684
  }
4674
- await api.put(`/api/v2/campaign-offers/${campaignOfferId}`, {
4675
- currentStep: "signal-discovery",
4676
- watchNarration: buildSelectedPostApprovalWatchNarration(selectionResult.selectedCount, recommendedPostCount, recommendationTargetEngagerCount),
4677
- });
4685
+ const selectionCurrentStep = currentStep === null ? undefined : (currentStep ?? "signal-discovery");
4686
+ if (selectionCurrentStep) {
4687
+ await api.put(`/api/v2/campaign-offers/${campaignOfferId}`, {
4688
+ currentStep: selectionCurrentStep,
4689
+ watchNarration: buildSelectedPostApprovalWatchNarration(selectionResult.selectedCount, recommendedPostCount, recommendationTargetEngagerCount),
4690
+ });
4691
+ }
4678
4692
  return {
4679
4693
  success: true,
4680
4694
  selectedCount: selectionResult.selectedCount,
@@ -373,7 +373,7 @@ export function getPostFindLeadsScoutRegistry() {
373
373
  codex: 'After confirm_lead_list copies source rows and the initial campaign-table execution slice exists, ask the filter-choice question immediately. Do not spawn anything before that question. After the answer, launch only Message Drafting. The filter-choice answer is the post-import user gate for this single worker; do not ask another question about starting it in step-wise or YOLO mode. The registry lookup is not a launch: after get_post_find_leads_scout_registry, immediately invoke Task/spawn_agent or the host background-agent mechanism before loading filter-leads.md, before saving rubrics, and before treating skip-filters as ready for message review. Both choices route through this kickoff; do not let filters_skipped jump straight from filter-choice to message-generation. If filters are chosen, the parent stays on Filter Rules and drafts/saves rubrics with MCP tools while Message Drafting runs in the background. If filters are skipped, move to Messages/message review only after Message Drafting has started or is ready; update_campaign(currentStep=messages) is not proof of launch. If the named Message Drafting custom agent is unavailable, spawn a generic gpt-5.5 xhigh Message Drafting background agent with the same lean campaign/table basis. When the background worker starts, persist workerDetails.messageDraftBuilder with statusSource "branch", status "branch-running", runId, startedAt, updatedAt, basisToken when known, and basis containing campaignId, selectedLeadListId, workflowTableId, filterChoice, and reviewBatchRowHash or reviewBatchRowIds; workerStatuses.messageDraftBuilder may be "running" as a simple badge only. Never put rich proof under workerStatuses and never use workerStatuses.messageDrafting. If no background-agent tool is callable, start the same full message branch inline before filter drafting or before skip-filter message review, record workerDetails.messageDraftBuilder with statusSource "parent-thread-fallback" and status "fallback-active", and require the same live context, prompt, assets, and validation gate before message review; do not wait until filters are saved and then call the registry.',
374
374
  claude: "After confirm_lead_list copies source rows and the initial campaign-table execution slice exists, ask the filter-choice question immediately. Do not invoke any Task/Agent before that question. After the answer, invoke only Message Drafting. If filters are chosen, parent drafts/saves rubrics with MCP tools while Message Drafting runs, asks filter approval, then joins Message Drafting. If filters are skipped, invoke only Message Drafting and move to Messages/message review.",
375
375
  parentThreadRule: 'Named agents are optional acceleration, but message drafting is not optional. The only normal background worker is Message Drafting. The filter-choice answer is the campaign-scoped go-ahead for this single post-import worker; do not ask another question to start it in step-wise or YOLO mode. If a named agent is unavailable, use a generic gpt-5.5 xhigh Message Drafting background agent. source work and filter work stay in the parent thread with MCP tools. If post-find-leads-message-scout is available, run it as the background Message Draft Builder after the filter-choice answer. The registry lookup is not a launch: get_post_find_leads_scout_registry only identifies the worker, and Message Drafting counts as started only after Task/spawn_agent or the host background-agent tool is invoked, or after the parent begins the same full message branch inline because no background-agent tool is callable. This launch must happen before loading filter-leads.md, save_rubrics, filter approval, or skip-filter message review; currentStep=messages is not proof of launch. If post-find-leads-message-scout is absent, do not customer-surface install status. Do not silently treat message drafting as started; the main thread must either launch the background worker or execute the same message branch from CampaignOffer state, selected source state, workflowTableId, and initial campaign-table execution slice rows. For a spawned worker, record workerDetails.messageDraftBuilder with statusSource branch / status branch-running, runId, startedAt, updatedAt, and basis containing campaignId, selectedLeadListId, workflowTableId, filterChoice, and reviewBatchRowHash or reviewBatchRowIds. workerStatuses.messageDraftBuilder is optional simple badge text only ("running", "ready", "blocked", "idle"); never put runId/statusSource/basis under workerStatuses and never use workerStatuses.messageDrafting. If no background-agent tool is callable, start that same full message branch inline before filter drafting or before skip-filter message review, record workerDetails.messageDraftBuilder with statusSource parent-thread-fallback / status fallback-active then ready, and require the same live context, prompt, assets, and validation gate before message review; do not report that as a background worker failure. If neither branch nor inline fallback can run, return blocked/retry-needed; do not wait until filters are saved and then call the registry. The Message Drafting handoff must be lean. Do not paste copied row counts, brief hashes, review-batch hashes, full reviewBatchRowIds, broad row data, or local debug artifacts into the spawn prompt. Local markdown/json files are not normal-path inputs. The filter-choice question is the first post-import user gate; do not load post-lead registries or filter references before it. Message drafting starts after the filter-choice answer, must load get_subskill_prompt({ subskillName: "generate-messages" }), and must load every required message asset named by generate-messages Mode 0 through get_subskill_asset before drafting. Reference Asset Loading means loading the required pre-draft reference pack before drafting; return blocked/retry-needed if required assets cannot be loaded; load ai-tells.md because it is never optional. The branch or parent-thread fallback loads the full generate-messages prompt and every referenced asset through get_subskill_asset. After generating/revising the candidate and before returning ready, must load get_subskill_prompt({ subskillName: "create-campaign-v2-validation" }) as the final internal validation gate, must read live campaign table state through scoped MCP/product tools, and must reject mismatched selectedLeadListId/workflowTableId/campaign/workspace input. Do not block when filters were chosen but leadScoringRubrics are not yet visible in the branch read; the parent owns save_rubrics and filter approval in parallel, so Message Drafting should return status ready with basisStatus usable_initial when campaign/list/table identity and the non-empty execution slice match. Do not use any alternate, local-artifact, or examples-only message prompt. User copy feedback, message QA, or rewrite requests before approve-message must be routed back to Message Drafting with the current recommendation, lean campaign/table basis, and latest user text; the parent must not rewrite or QA the template from memory and must not call update_campaign_brief before approve-message. The worker validates internally and returns only templateRecommendation, tokenFillRules, renderedGoodSample, status, approveOrReviseRecommendation, validationStatus, outputAt, outputHash, and blocked/retry detail. Do not render renderedFallbackSample, risk notes, or a qaReceipt on the normal happy path. On the filter path, save_rubrics keeps the browser on Filter Rules after save_rubrics so the user can approve the saved criteria; after saved-filter approval, move to Filter Leads with currentStep=apply-icp-rubric whether Message Drafting is ready or still running. Wait there for message approval. Enrichment, filtering, Generate Message cells, sender setup, sequence attach, and launch wait for template approval on the Use Template path. On the skip path, move to Messages/message review after Message Drafting has started or is ready and wait for message approval before enrichment or Settings. Do not render message review from checklist or shortcut instructions; message review requires a messageDraftRecommendation whose basis proves the generate-messages prompt, required message assets, and validation gate ran for the current campaign/table execution slice. Do not automatically rerun Message Drafting after filters/enrichment finish; show the initial draft by default and offer an enriched rewrite only with explicit user opt-in. Handoff and recommendation output are Markdown with labeled fields, not raw JSON.',
376
- prepareMessagesRule: `Default create-campaign stays on the existing reviewBatchLimit:15 first campaign-table execution slice. For plain post-mint fill/load/refill requests, load get_subskill_prompt({ subskillName: "refill-sends-workflow" }), then call resolve_campaign_fill_route({ intent:"plain" }), list_senders, and get_campaign_refill_state for enough candidate campaigns to identify the campaign that most recently had scheduler-owned sends for the relevant sender set before any mutation. Route outcomes are route:"evergreen_horizon", route:"active_campaigns", and route:"ask_create"; if a plain managed-waterfall route has archived/completed skipped slots or does not cover the named sender set, immediately refetch with resolve_campaign_fill_route({ intent:"active" }) and inspect current dashboard-active ACTIVE/PAUSED campaign-backed sequence campaigns before declaring a sender blocked; stay in the same campaignOfferId/campaignId context after minting. Plain fill is not an alias for fill_campaign_horizon or campaign creation. fill_campaign_horizon is evergreen-only and is not the generic regular-campaign fill path. Campaign creation is allowed only after route:"ask_create" and explicit user selection; it is never the default response to plain fill. Treat "fill up/load sends" as capacity-fill preparation, and treat "refill senders", "fill senders", "max out senders", and "load everyone up" as sender-scoped capacity-fill preparation. For sender-scoped requests with no named senders, --yolo means all eligible healthy senders enrolled in active campaign-backed sequence campaigns in the active workspace; without --yolo, ask which eligible enrolled senders to refill before choosing campaigns or mutating. In non-yolo interactive Codex or Claude Code sessions, 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. 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 to obtain the post-refresh targetPlan, then may apply the first supported yolo-eligible global primitive and return autoPaidInmailRefresh, yoloExecution, and final targetPlan evidence. Do not present paid-credit refresh as the next operator action after refill_sends has returned autoPaidInmailRefresh; inspect yoloExecution and continue from the final targetPlan when it applied an action. Do not stop after filling only one sender when the request was sender-scoped. In --yolo, continue through every safe selected sender/campaign action covered by the rendered packet, reread after each terminal apply/prep/start result, recompute the 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.`,
376
+ prepareMessagesRule: `Default create-campaign stays on the existing reviewBatchLimit:15 first campaign-table execution slice. For plain post-mint fill/load/refill requests, load get_subskill_prompt({ subskillName: "refill-sends-workflow" }), then call resolve_campaign_fill_route({ intent:"plain" }), list_senders, and get_campaign_refill_state for enough candidate campaigns to identify the campaign that most recently had scheduler-owned sends for the relevant sender set before any mutation. Route outcomes are route:"evergreen_horizon", route:"active_campaigns", and route:"ask_create"; if a plain managed-waterfall route has archived/completed skipped slots or does not cover the named sender set, immediately refetch with resolve_campaign_fill_route({ intent:"active" }) and inspect current dashboard-active ACTIVE/PAUSED campaign-backed sequence campaigns before declaring a sender blocked; stay in the same campaignOfferId/campaignId context after minting. Plain fill is not an alias for fill_campaign_horizon or campaign creation. fill_campaign_horizon is evergreen-only and is not the generic regular-campaign fill path. Campaign creation is allowed only after route:"ask_create" and explicit user selection; it is never the default response to plain fill. Treat "fill up/load sends" as capacity-fill preparation, and treat "refill senders", "fill senders", "max out senders", and "load everyone up" as sender-scoped capacity-fill preparation. For sender-scoped requests with no named senders, --yolo means all eligible healthy senders enrolled in active campaign-backed sequence campaigns in the active workspace; without --yolo, ask which eligible enrolled senders to refill before choosing campaigns or mutating. In non-yolo interactive Codex or Claude Code sessions, 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. 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.`,
377
377
  },
378
378
  };
379
379
  }
@@ -1,29 +1,6 @@
1
1
  type RefillSendsIntent = "plain" | "active" | "evergreen";
2
2
  type RefillSendsApprovalMode = "approve" | "mark_ready";
3
3
  type RefillSendsExecutionMode = "manual" | "scheduled" | "yolo";
4
- type RefillSendsRowSelector = {
5
- type: "reviewBatch";
6
- basisHash?: string;
7
- limit?: number;
8
- } | {
9
- type: "rowIds";
10
- rowIds: string[];
11
- } | {
12
- type: "needsEnrichment";
13
- limit?: number;
14
- } | {
15
- type: "needsApproval";
16
- limit?: number;
17
- } | {
18
- type: "passedRows";
19
- limit?: number;
20
- } | {
21
- type: "needsGeneratedMessage";
22
- limit?: number;
23
- } | {
24
- type: "staleGeneratedMessages";
25
- limit?: number;
26
- };
27
4
  type RefillSendsCommandInput = {
28
5
  yolo?: boolean;
29
6
  executionMode?: RefillSendsExecutionMode;
@@ -205,6 +182,15 @@ export declare function executeRefillSendsCommand(input?: RefillSendsCommandInpu
205
182
  workspaceId?: undefined;
206
183
  workspaceResolution?: undefined;
207
184
  };
185
+ yoloExecution: {
186
+ enabled: false;
187
+ status: "not_run_without_yolo";
188
+ selectedAction: null;
189
+ targetPlanReread: false;
190
+ result?: undefined;
191
+ refusalReason?: undefined;
192
+ postActionFirstAction?: undefined;
193
+ };
208
194
  command: string;
209
195
  tool: string;
210
196
  promptName: string;
@@ -274,19 +260,23 @@ export declare function executeRefillSendsCommand(input?: RefillSendsCommandInpu
274
260
  };
275
261
  } | {
276
262
  targetPlan: unknown;
277
- targetPlanBeforeYoloAction: unknown;
278
263
  targetPlanBeforePaidRefresh: unknown;
264
+ targetPlanBeforeYoloPrimitive: unknown;
279
265
  autoPaidInmailRefresh: {
280
266
  enabled: boolean;
281
267
  status: string;
282
268
  refreshedPaidInmailSenderIds: string[];
283
269
  failedPaidInmailRefreshes: {
284
270
  senderId: string;
271
+ attempts?: number;
285
272
  error: string;
273
+ errors?: string[];
286
274
  }[];
287
275
  refreshReceipts: {
288
276
  senderId: string;
289
277
  actionKey: string | null;
278
+ attempts: number;
279
+ retryErrors: string[];
290
280
  receipt: import("./senders.js").RefreshPaidInmailCreditsResponse;
291
281
  }[];
292
282
  attemptedSenderIds: string[];
@@ -296,61 +286,21 @@ export declare function executeRefillSendsCommand(input?: RefillSendsCommandInpu
296
286
  note: string;
297
287
  };
298
288
  yoloExecution: {
299
- status: string;
300
- applied: boolean;
301
- note: string;
302
- action?: undefined;
303
- toolName?: undefined;
304
- input?: undefined;
305
- startedAt?: undefined;
306
- endedAt?: undefined;
307
- startReceipt?: undefined;
308
- waitReceipt?: undefined;
309
- enabled: boolean;
310
- workspaceId: string | null;
311
- workspaceResolution: string;
312
- targetPlanRereadAfterAction: boolean;
289
+ enabled: true;
290
+ status: "skipped_after_paid_refresh";
291
+ selectedAction: null;
292
+ targetPlanReread: true;
293
+ result?: undefined;
294
+ refusalReason?: undefined;
295
+ postActionFirstAction?: undefined;
313
296
  } | {
314
- status: string;
315
- applied: boolean;
316
- action: Record<string, unknown>;
317
- note: string;
318
- toolName?: undefined;
319
- input?: undefined;
320
- startedAt?: undefined;
321
- endedAt?: undefined;
322
- startReceipt?: undefined;
323
- waitReceipt?: undefined;
324
- enabled: boolean;
325
- workspaceId: string | null;
326
- workspaceResolution: string;
327
- targetPlanRereadAfterAction: boolean;
328
- } | {
329
- status: string;
330
- applied: boolean;
331
- action: Record<string, unknown>;
332
- toolName: string;
333
- input: {
334
- workspaceId?: string | undefined;
335
- rowSelector?: RefillSendsRowSelector | undefined;
336
- approvalMode?: RefillSendsApprovalMode | undefined;
337
- targetPreparedMessages?: number | undefined;
338
- tableId?: string | undefined;
339
- campaignId: string;
340
- };
341
- startedAt: string;
342
- endedAt: string;
343
- startReceipt: unknown;
344
- waitReceipt: {
345
- waited: boolean;
346
- timedOut: boolean;
347
- receipt: unknown;
348
- };
349
- note?: undefined;
350
- enabled: boolean;
351
- workspaceId: string | null;
352
- workspaceResolution: string;
353
- targetPlanRereadAfterAction: boolean;
297
+ enabled: true;
298
+ status: "no_action" | "read_only_reread" | "executed_and_reread" | "refused";
299
+ selectedAction: Record<string, unknown> | null;
300
+ result: unknown;
301
+ targetPlanReread: boolean;
302
+ refusalReason: string | undefined;
303
+ postActionFirstAction: Record<string, unknown> | null;
354
304
  };
355
305
  command: string;
356
306
  tool: string;