@sellable/mcp 0.1.507 → 0.1.509

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.
package/dist/server.js CHANGED
@@ -305,7 +305,10 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
305
305
  }
306
306
  break;
307
307
  case "start_campaign":
308
- result = await startCampaign(args?.campaignId);
308
+ result = await startCampaign({
309
+ campaignId: args?.campaignId,
310
+ workspaceId: args?.workspaceId,
311
+ });
309
312
  if (args?.campaignId && result?.success) {
310
313
  markCampaignContextDirty(args.campaignId, "start_campaign");
311
314
  }
@@ -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
  }
@@ -185,6 +185,7 @@ export declare const campaignToolDefinitions: ({
185
185
  useMessagingTemplate?: undefined;
186
186
  rubric?: undefined;
187
187
  flowVersion?: undefined;
188
+ workspaceId?: undefined;
188
189
  };
189
190
  required: string[];
190
191
  additionalProperties: boolean;
@@ -223,6 +224,7 @@ export declare const campaignToolDefinitions: ({
223
224
  useMessagingTemplate?: undefined;
224
225
  rubric?: undefined;
225
226
  flowVersion?: undefined;
227
+ workspaceId?: undefined;
226
228
  };
227
229
  required: never[];
228
230
  additionalProperties?: undefined;
@@ -261,6 +263,7 @@ export declare const campaignToolDefinitions: ({
261
263
  useMessagingTemplate?: undefined;
262
264
  rubric?: undefined;
263
265
  flowVersion?: undefined;
266
+ workspaceId?: undefined;
264
267
  };
265
268
  required: string[];
266
269
  additionalProperties?: undefined;
@@ -342,6 +345,7 @@ export declare const campaignToolDefinitions: ({
342
345
  useMessagingTemplate?: undefined;
343
346
  rubric?: undefined;
344
347
  flowVersion?: undefined;
348
+ workspaceId?: undefined;
345
349
  };
346
350
  required: string[];
347
351
  additionalProperties: boolean;
@@ -536,6 +540,7 @@ export declare const campaignToolDefinitions: ({
536
540
  useMessagingTemplate?: undefined;
537
541
  rubric?: undefined;
538
542
  flowVersion?: undefined;
543
+ workspaceId?: undefined;
539
544
  };
540
545
  required: never[];
541
546
  additionalProperties?: undefined;
@@ -741,6 +746,49 @@ export declare const campaignToolDefinitions: ({
741
746
  clientProspectId?: undefined;
742
747
  senderLinkedinUrl?: undefined;
743
748
  messageGenerationMode?: undefined;
749
+ workspaceId?: undefined;
750
+ };
751
+ required: string[];
752
+ additionalProperties?: undefined;
753
+ };
754
+ } | {
755
+ name: string;
756
+ description: string;
757
+ inputSchema: {
758
+ type: string;
759
+ properties: {
760
+ campaignId: {
761
+ type: string;
762
+ description: string;
763
+ };
764
+ workspaceId: {
765
+ type: string;
766
+ description: string;
767
+ };
768
+ limit?: undefined;
769
+ tableId?: undefined;
770
+ leadLimit?: undefined;
771
+ page?: undefined;
772
+ filters?: undefined;
773
+ name?: undefined;
774
+ clientProspectId?: undefined;
775
+ senderLinkedinUrl?: undefined;
776
+ offerPositioning?: undefined;
777
+ campaignBrief?: undefined;
778
+ messageGenerationMode?: undefined;
779
+ currentStep?: undefined;
780
+ watchNarration?: undefined;
781
+ leadSourceType?: undefined;
782
+ leadSourceProvider?: undefined;
783
+ selectedLeadListId?: undefined;
784
+ senderIds?: undefined;
785
+ currentStepTransition?: undefined;
786
+ clearCurrentStepIfMatches?: undefined;
787
+ interactionMode?: undefined;
788
+ enableICPFilters?: undefined;
789
+ useMessagingTemplate?: undefined;
790
+ rubric?: undefined;
791
+ flowVersion?: undefined;
744
792
  };
745
793
  required: string[];
746
794
  additionalProperties?: undefined;
@@ -782,6 +830,7 @@ export declare const campaignToolDefinitions: ({
782
830
  useMessagingTemplate?: undefined;
783
831
  rubric?: undefined;
784
832
  flowVersion?: undefined;
833
+ workspaceId?: undefined;
785
834
  };
786
835
  required: string[];
787
836
  additionalProperties?: undefined;
@@ -821,7 +870,11 @@ export interface UpdateCampaignResult {
821
870
  _campaign?: CampaignOfferNavigation;
822
871
  }
823
872
  export declare function updateCampaign(campaignId: string, input: UpdateCampaignInput): Promise<UpdateCampaignResult>;
824
- export declare function startCampaign(campaignId: string): Promise<{
873
+ type StartCampaignInput = string | {
874
+ campaignId?: string | null;
875
+ workspaceId?: string | null;
876
+ };
877
+ export declare function startCampaign(input: StartCampaignInput): Promise<{
825
878
  success: boolean;
826
879
  }>;
827
880
  export declare function pauseCampaign(campaignId: string): Promise<{
@@ -4,6 +4,7 @@ import { assertCreateCampaignPromptLoaded, assertNetNewCreateCampaignResearchRea
4
4
  import { setCampaignInteractionMode, } from "./interaction-mode.js";
5
5
  import { isLinkedInProfileInput, normalizeLinkedInProfileInput, } from "./linkedin-url.js";
6
6
  import { fetchCampaignRubrics } from "./processing.js";
7
+ import { normalizeExplicitWorkspaceId, workspaceRequestOptions, } from "./workspace-context.js";
7
8
  const LEAD_SOURCE_PROVIDERS = {
8
9
  APOLLO: "apollo-ai",
9
10
  SALES_NAV: "sales-nav",
@@ -456,7 +457,7 @@ export const campaignToolDefinitions = [
456
457
  },
457
458
  {
458
459
  name: "start_campaign",
459
- description: "Start a paused campaign, enabling the sweeper to send messages. This is an explicit human launch/start action and must not be used as part of fill-send-horizon, message preparation, or scheduling-proof flows.",
460
+ description: "Start a paused campaign, enabling the sweeper to send messages. This is an explicit human launch/start action. It is also allowed as the exact selected start_paused_campaign primitive from a bounded refill_sends target packet, using request-scoped workspaceId.",
460
461
  inputSchema: {
461
462
  type: "object",
462
463
  properties: {
@@ -464,6 +465,10 @@ export const campaignToolDefinitions = [
464
465
  type: "string",
465
466
  description: "Campaign ID to start",
466
467
  },
468
+ workspaceId: {
469
+ type: "string",
470
+ description: "Explicit request-scoped workspace id for scheduled/yolo refill automation.",
471
+ },
467
472
  },
468
473
  required: ["campaignId"],
469
474
  },
@@ -1014,9 +1019,19 @@ export async function updateCampaign(campaignId, input) {
1014
1019
  _campaign: result,
1015
1020
  };
1016
1021
  }
1017
- export async function startCampaign(campaignId) {
1022
+ export async function startCampaign(input) {
1023
+ const campaignId = typeof input === "string" ? input : input.campaignId?.trim();
1024
+ if (!campaignId) {
1025
+ throw new Error("start_campaign requires campaignId");
1026
+ }
1027
+ const workspaceId = typeof input === "string"
1028
+ ? null
1029
+ : normalizeExplicitWorkspaceId(input.workspaceId);
1030
+ const requestOptions = workspaceRequestOptions(workspaceId);
1018
1031
  const api = getApi();
1019
- return api.post(`/api/v3/campaigns/${campaignId}/start`);
1032
+ return requestOptions
1033
+ ? api.post(`/api/v3/campaigns/${campaignId}/start`, { workspaceId }, requestOptions)
1034
+ : api.post(`/api/v3/campaigns/${campaignId}/start`);
1020
1035
  }
1021
1036
  export async function pauseCampaign(campaignId) {
1022
1037
  const api = getApi();
@@ -127,6 +127,7 @@ export type LookupSalesNavFilterInput = {
127
127
  };
128
128
  export type SignalSearchInput = {
129
129
  type?: "keywords" | "profile" | "post" | "company";
130
+ workspaceId?: string;
130
131
  keywords?: Array<{
131
132
  keyword: string;
132
133
  id?: string;
@@ -181,6 +182,8 @@ export type ConfirmLeadListInput = {
181
182
  reviewBatchLimit?: number;
182
183
  includeRawImportResult?: boolean;
183
184
  allowPartialSourceList?: boolean;
185
+ sourceRowIds?: string[];
186
+ sourceRowLimit?: number;
184
187
  /**
185
188
  * Deprecated alias for reviewBatchLimit. Confirming a lead list now copies the
186
189
  * confirmed source into the campaign table; this value no longer caps clone
@@ -190,6 +193,7 @@ export type ConfirmLeadListInput = {
190
193
  };
191
194
  export type SelectPromisingPostsInput = {
192
195
  campaignOfferId: string;
196
+ workspaceId?: string;
193
197
  selections: Array<{
194
198
  postId: string;
195
199
  reason: string;
@@ -295,6 +299,8 @@ export declare const leadToolDefinitions: ({
295
299
  keepInSync?: undefined;
296
300
  jobId?: undefined;
297
301
  reviewBatchLimit?: undefined;
302
+ sourceRowIds?: undefined;
303
+ sourceRowLimit?: undefined;
298
304
  allowPartialSourceList?: undefined;
299
305
  includeRawImportResult?: undefined;
300
306
  selections?: undefined;
@@ -489,6 +495,8 @@ export declare const leadToolDefinitions: ({
489
495
  keepInSync?: undefined;
490
496
  jobId?: undefined;
491
497
  reviewBatchLimit?: undefined;
498
+ sourceRowIds?: undefined;
499
+ sourceRowLimit?: undefined;
492
500
  allowPartialSourceList?: undefined;
493
501
  includeRawImportResult?: undefined;
494
502
  selections?: undefined;
@@ -582,6 +590,8 @@ export declare const leadToolDefinitions: ({
582
590
  keepInSync?: undefined;
583
591
  jobId?: undefined;
584
592
  reviewBatchLimit?: undefined;
593
+ sourceRowIds?: undefined;
594
+ sourceRowLimit?: undefined;
585
595
  allowPartialSourceList?: undefined;
586
596
  includeRawImportResult?: undefined;
587
597
  selections?: undefined;
@@ -747,6 +757,8 @@ export declare const leadToolDefinitions: ({
747
757
  keepInSync?: undefined;
748
758
  jobId?: undefined;
749
759
  reviewBatchLimit?: undefined;
760
+ sourceRowIds?: undefined;
761
+ sourceRowLimit?: undefined;
750
762
  allowPartialSourceList?: undefined;
751
763
  includeRawImportResult?: undefined;
752
764
  selections?: undefined;
@@ -854,6 +866,8 @@ export declare const leadToolDefinitions: ({
854
866
  keepInSync?: undefined;
855
867
  jobId?: undefined;
856
868
  reviewBatchLimit?: undefined;
869
+ sourceRowIds?: undefined;
870
+ sourceRowLimit?: undefined;
857
871
  allowPartialSourceList?: undefined;
858
872
  includeRawImportResult?: undefined;
859
873
  selections?: undefined;
@@ -970,6 +984,8 @@ export declare const leadToolDefinitions: ({
970
984
  keepInSync?: undefined;
971
985
  jobId?: undefined;
972
986
  reviewBatchLimit?: undefined;
987
+ sourceRowIds?: undefined;
988
+ sourceRowLimit?: undefined;
973
989
  allowPartialSourceList?: undefined;
974
990
  includeRawImportResult?: undefined;
975
991
  selections?: undefined;
@@ -1075,6 +1091,8 @@ export declare const leadToolDefinitions: ({
1075
1091
  keepInSync?: undefined;
1076
1092
  jobId?: undefined;
1077
1093
  reviewBatchLimit?: undefined;
1094
+ sourceRowIds?: undefined;
1095
+ sourceRowLimit?: undefined;
1078
1096
  allowPartialSourceList?: undefined;
1079
1097
  includeRawImportResult?: undefined;
1080
1098
  selections?: undefined;
@@ -1185,6 +1203,8 @@ export declare const leadToolDefinitions: ({
1185
1203
  keepInSync?: undefined;
1186
1204
  jobId?: undefined;
1187
1205
  reviewBatchLimit?: undefined;
1206
+ sourceRowIds?: undefined;
1207
+ sourceRowLimit?: undefined;
1188
1208
  allowPartialSourceList?: undefined;
1189
1209
  includeRawImportResult?: undefined;
1190
1210
  selections?: undefined;
@@ -1283,6 +1303,8 @@ export declare const leadToolDefinitions: ({
1283
1303
  keepInSync?: undefined;
1284
1304
  jobId?: undefined;
1285
1305
  reviewBatchLimit?: undefined;
1306
+ sourceRowIds?: undefined;
1307
+ sourceRowLimit?: undefined;
1286
1308
  allowPartialSourceList?: undefined;
1287
1309
  includeRawImportResult?: undefined;
1288
1310
  selections?: undefined;
@@ -2173,6 +2195,8 @@ export declare const leadToolDefinitions: ({
2173
2195
  keepInSync?: undefined;
2174
2196
  jobId?: undefined;
2175
2197
  reviewBatchLimit?: undefined;
2198
+ sourceRowIds?: undefined;
2199
+ sourceRowLimit?: undefined;
2176
2200
  allowPartialSourceList?: undefined;
2177
2201
  includeRawImportResult?: undefined;
2178
2202
  selections?: undefined;
@@ -2280,6 +2304,8 @@ export declare const leadToolDefinitions: ({
2280
2304
  keepInSync?: undefined;
2281
2305
  jobId?: undefined;
2282
2306
  reviewBatchLimit?: undefined;
2307
+ sourceRowIds?: undefined;
2308
+ sourceRowLimit?: undefined;
2283
2309
  allowPartialSourceList?: undefined;
2284
2310
  includeRawImportResult?: undefined;
2285
2311
  selections?: undefined;
@@ -3325,6 +3351,8 @@ export declare const leadToolDefinitions: ({
3325
3351
  keepInSync?: undefined;
3326
3352
  jobId?: undefined;
3327
3353
  reviewBatchLimit?: undefined;
3354
+ sourceRowIds?: undefined;
3355
+ sourceRowLimit?: undefined;
3328
3356
  allowPartialSourceList?: undefined;
3329
3357
  includeRawImportResult?: undefined;
3330
3358
  selections?: undefined;
@@ -3479,6 +3507,8 @@ export declare const leadToolDefinitions: ({
3479
3507
  keepInSync?: undefined;
3480
3508
  jobId?: undefined;
3481
3509
  reviewBatchLimit?: undefined;
3510
+ sourceRowIds?: undefined;
3511
+ sourceRowLimit?: undefined;
3482
3512
  allowPartialSourceList?: undefined;
3483
3513
  includeRawImportResult?: undefined;
3484
3514
  selections?: undefined;
@@ -3620,6 +3650,8 @@ export declare const leadToolDefinitions: ({
3620
3650
  keepInSync?: undefined;
3621
3651
  jobId?: undefined;
3622
3652
  reviewBatchLimit?: undefined;
3653
+ sourceRowIds?: undefined;
3654
+ sourceRowLimit?: undefined;
3623
3655
  allowPartialSourceList?: undefined;
3624
3656
  includeRawImportResult?: undefined;
3625
3657
  selections?: undefined;
@@ -3716,6 +3748,8 @@ export declare const leadToolDefinitions: ({
3716
3748
  keepInSync?: undefined;
3717
3749
  jobId?: undefined;
3718
3750
  reviewBatchLimit?: undefined;
3751
+ sourceRowIds?: undefined;
3752
+ sourceRowLimit?: undefined;
3719
3753
  allowPartialSourceList?: undefined;
3720
3754
  includeRawImportResult?: undefined;
3721
3755
  selections?: undefined;
@@ -3762,6 +3796,17 @@ export declare const leadToolDefinitions: ({
3762
3796
  type: string;
3763
3797
  description: string;
3764
3798
  };
3799
+ sourceRowIds: {
3800
+ type: string;
3801
+ items: {
3802
+ type: string;
3803
+ };
3804
+ description: string;
3805
+ };
3806
+ sourceRowLimit: {
3807
+ type: string;
3808
+ description: string;
3809
+ };
3765
3810
  allowPartialSourceList: {
3766
3811
  type: string;
3767
3812
  description: string;
@@ -3971,6 +4016,8 @@ export declare const leadToolDefinitions: ({
3971
4016
  keepInSync?: undefined;
3972
4017
  jobId?: undefined;
3973
4018
  reviewBatchLimit?: undefined;
4019
+ sourceRowIds?: undefined;
4020
+ sourceRowLimit?: undefined;
3974
4021
  allowPartialSourceList?: undefined;
3975
4022
  includeRawImportResult?: undefined;
3976
4023
  };
@@ -4068,6 +4115,8 @@ export declare const leadToolDefinitions: ({
4068
4115
  keepInSync?: undefined;
4069
4116
  jobId?: undefined;
4070
4117
  reviewBatchLimit?: undefined;
4118
+ sourceRowIds?: undefined;
4119
+ sourceRowLimit?: undefined;
4071
4120
  allowPartialSourceList?: undefined;
4072
4121
  includeRawImportResult?: undefined;
4073
4122
  selections?: undefined;