@sellable/mcp 0.1.511 → 0.1.513

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.
@@ -1970,6 +1970,10 @@ export const leadToolDefinitions = [
1970
1970
  type: "string",
1971
1971
  description: "Campaign offer ID to associate search",
1972
1972
  },
1973
+ workspaceId: {
1974
+ type: "string",
1975
+ description: "Explicit request-scoped workspace id. Pass this instead of switching the shared active workspace.",
1976
+ },
1973
1977
  searchName: {
1974
1978
  type: "string",
1975
1979
  description: "Optional name for the search. Use descriptive names that encode ICP intent (e.g., 'Fintech Compliance Directors 201-1000 US').",
@@ -2077,6 +2081,10 @@ export const leadToolDefinitions = [
2077
2081
  type: "string",
2078
2082
  description: "Campaign offer ID",
2079
2083
  },
2084
+ workspaceId: {
2085
+ type: "string",
2086
+ description: "Explicit request-scoped workspace id. Pass this instead of switching the shared active workspace.",
2087
+ },
2080
2088
  provider: {
2081
2089
  type: "string",
2082
2090
  enum: ["apollo", "sales-nav", "prospeo", "signal-discovery"],
@@ -2151,6 +2159,10 @@ export const leadToolDefinitions = [
2151
2159
  type: "string",
2152
2160
  description: "Campaign offer ID. Required for audit context; not used to resolve provider or tableId.",
2153
2161
  },
2162
+ workspaceId: {
2163
+ type: "string",
2164
+ description: "Explicit request-scoped workspace id. Pass this instead of switching the shared active workspace.",
2165
+ },
2154
2166
  tableId: {
2155
2167
  type: "string",
2156
2168
  description: "Lead list (workflow table) ID to cancel. Required; callers have this from campaign context.",
@@ -2174,6 +2186,10 @@ export const leadToolDefinitions = [
2174
2186
  type: "string",
2175
2187
  description: "Campaign offer ID",
2176
2188
  },
2189
+ workspaceId: {
2190
+ type: "string",
2191
+ description: "Explicit request-scoped workspace id. Pass this instead of switching the shared active workspace.",
2192
+ },
2177
2193
  sourceLeadListId: {
2178
2194
  type: "string",
2179
2195
  description: "Lead list ID to import into campaign. If omitted, uses campaign.selectedLeadListId.",
@@ -3118,6 +3134,8 @@ export async function searchProspeo(input) {
3118
3134
  campaignOfferId: input?.campaignOfferId,
3119
3135
  });
3120
3136
  const api = getApi();
3137
+ const workspaceId = normalizeExplicitWorkspaceId(input.workspaceId);
3138
+ const requestOptions = workspaceRequestOptions(workspaceId);
3121
3139
  const rawInput = input;
3122
3140
  if ("domains" in rawInput) {
3123
3141
  throw new Error("search_prospeo does not accept raw domains. Use load_csv_domains or save_domain_filters for known domain lists. For generated company/account lookalikes, use search_prospeo_companies, then confirm_prospeo_company_accounts, then pass the returned domainFilterId.");
@@ -3128,9 +3146,11 @@ export async function searchProspeo(input) {
3128
3146
  nestedCompany?.names !== undefined) {
3129
3147
  throw new Error("search_prospeo does not accept filters.company.websites or filters.company.names. For known accounts, resolve names/domains into a domainFilterId with load_csv_domains or save_domain_filters. For company/account lookalikes, use search_prospeo_companies first, then confirm_prospeo_company_accounts.");
3130
3148
  }
3131
- const safeInput = normalizeProspeoSearchInputForMcp(input);
3149
+ const { workspaceId: _workspaceId, ...safeInput } = normalizeProspeoSearchInputForMcp(input);
3132
3150
  try {
3133
- const response = await api.post(`/api/v3/prospeo/search`, safeInput);
3151
+ const response = requestOptions
3152
+ ? await api.post(`/api/v3/prospeo/search`, safeInput, requestOptions)
3153
+ : await api.post(`/api/v3/prospeo/search`, safeInput);
3134
3154
  return compactProspeoSearchResponse(response);
3135
3155
  }
3136
3156
  catch (error) {
@@ -3138,7 +3158,9 @@ export async function searchProspeo(input) {
3138
3158
  if (!fallbackInput) {
3139
3159
  throw error;
3140
3160
  }
3141
- const fallbackResponse = await api.post(`/api/v3/prospeo/search`, fallbackInput);
3161
+ const fallbackResponse = requestOptions
3162
+ ? await api.post(`/api/v3/prospeo/search`, fallbackInput, requestOptions)
3163
+ : await api.post(`/api/v3/prospeo/search`, fallbackInput);
3142
3164
  const keyword = String(fallbackInput.filters.person_name_or_job_title ?? "title keyword");
3143
3165
  return compactProspeoSearchResponse(fallbackResponse, {
3144
3166
  warnings: [
@@ -3673,6 +3695,15 @@ export async function searchSignals(input) {
3673
3695
  }
3674
3696
  export async function importLeads(input) {
3675
3697
  const api = getApi();
3698
+ const workspaceId = normalizeExplicitWorkspaceId(input.workspaceId);
3699
+ const requestOptions = workspaceRequestOptions(workspaceId);
3700
+ const apiGet = (path) => requestOptions ? api.get(path, requestOptions) : api.get(path);
3701
+ const apiPost = (path, body) => requestOptions
3702
+ ? api.post(path, body, requestOptions)
3703
+ : api.post(path, body);
3704
+ const apiPut = (path, body) => requestOptions
3705
+ ? api.put(path, body, requestOptions)
3706
+ : api.put(path, body);
3676
3707
  const { campaignOfferId, currentStep, sourceLeadListId: inputSourceLeadListId, searchId, targetLeadCount, mode, searchName, leadListName, headlineICPCriteria, targetEngagerCount, maxPostsToScrape, allowInvalidSignalPosts, rubricGuidelines, confirmed, } = input;
3677
3708
  assertInteractionApproval({
3678
3709
  campaignId: campaignOfferId,
@@ -3685,9 +3716,12 @@ export async function importLeads(input) {
3685
3716
  let provider = input.provider;
3686
3717
  let campaignCurrentStep;
3687
3718
  let campaignSelectedLeadListId;
3688
- if (!provider || currentStep === undefined || mode === undefined) {
3719
+ if (!provider ||
3720
+ currentStep === undefined ||
3721
+ mode === undefined ||
3722
+ Boolean(inputSourceLeadListId)) {
3689
3723
  // Pull campaign once when we need provider or to determine default step behavior.
3690
- const campaign = await api.get(`/api/v2/campaign-offers/${campaignOfferId}`);
3724
+ const campaign = await apiGet(`/api/v2/campaign-offers/${campaignOfferId}`);
3691
3725
  if (!provider) {
3692
3726
  provider = normalizeImportProvider(campaign.leadSourceProvider);
3693
3727
  }
@@ -3809,7 +3843,7 @@ export async function importLeads(input) {
3809
3843
  const effectiveTargetEngagerCount = normalizePositiveInteger(targetEngagerCount) ?? null;
3810
3844
  // Get selected posts from the campaign's signal search tabs
3811
3845
  // Note: API returns flat fields (postUrl, postContent, authorName, etc.)
3812
- const tabsResponse = await api.get(`/api/v3/campaigns/${campaignOfferId}/signal-discovery/tabs`);
3846
+ const tabsResponse = await apiGet(`/api/v3/campaigns/${campaignOfferId}/signal-discovery/tabs`);
3813
3847
  // Collect all selected posts, mapping from API format to signal-leads/create format
3814
3848
  const selectedPosts = [];
3815
3849
  for (const tab of tabsResponse.tabs || []) {
@@ -3935,7 +3969,7 @@ export async function importLeads(input) {
3935
3969
  ? headlineICPCriteria
3936
3970
  : rubricGuidelines;
3937
3971
  // Start the scrape job
3938
- const result = await api.post(`/api/v3/campaigns/${campaignOfferId}/signal-leads/create`, {
3972
+ const result = await apiPost(`/api/v3/campaigns/${campaignOfferId}/signal-leads/create`, {
3939
3973
  posts: postsToScrape,
3940
3974
  targetEngagerCount: importSelection.targetEngagerCount ?? undefined,
3941
3975
  ...(effectiveHeadlineICPCriteria &&
@@ -3948,7 +3982,7 @@ export async function importLeads(input) {
3948
3982
  });
3949
3983
  // CRITICAL: Update selectedLeadListId so UI subscribes to correct table
3950
3984
  // This enables realtime updates in LeadListCanvas
3951
- await api.put(`/api/v2/campaign-offers/${campaignOfferId}`, {
3985
+ await apiPut(`/api/v2/campaign-offers/${campaignOfferId}`, {
3952
3986
  selectedLeadListId: result.tableId,
3953
3987
  ...(shouldSetCurrentStep ? { currentStep: postImportCurrentStep } : {}),
3954
3988
  ...(shouldSetCurrentStep
@@ -3992,7 +4026,7 @@ export async function importLeads(input) {
3992
4026
  const fallbackName = leadListName ||
3993
4027
  (searchName ? `${providerLabel} - ${searchName}` : undefined) ||
3994
4028
  `${providerLabel} Import ${new Date().toISOString().slice(0, 10)}`;
3995
- const createResult = await api.post(`/api/v3/lead-lists`, {
4029
+ const createResult = await apiPost(`/api/v3/lead-lists`, {
3996
4030
  name: fallbackName,
3997
4031
  templateType: "lead_list",
3998
4032
  });
@@ -4009,7 +4043,7 @@ export async function importLeads(input) {
4009
4043
  const startImport = async () => {
4010
4044
  if (provider === "sales-nav") {
4011
4045
  // Sales Nav export flow
4012
- return api.post(`/api/v3/sales-nav/export`, {
4046
+ return apiPost(`/api/v3/sales-nav/export`, {
4013
4047
  searchId,
4014
4048
  workflowTableId: leadListId,
4015
4049
  campaignOfferId,
@@ -4018,7 +4052,7 @@ export async function importLeads(input) {
4018
4052
  });
4019
4053
  }
4020
4054
  if (provider === "prospeo") {
4021
- return api.post(`/api/v3/lead-lists/${leadListId}/prospeo-import/start`, {
4055
+ return apiPost(`/api/v3/lead-lists/${leadListId}/prospeo-import/start`, {
4022
4056
  searchId,
4023
4057
  campaignOfferId,
4024
4058
  targetLeadCount: cappedTargetLeadCount ?? defaultProviderSourceListTarget,
@@ -4069,24 +4103,30 @@ export async function importLeads(input) {
4069
4103
  throw error;
4070
4104
  }
4071
4105
  }
4072
- // Update selectedLeadListId so UI subscribes to the source lead list
4073
- // This enables realtime updates while the import job runs.
4074
- await api.put(`/api/v2/campaign-offers/${campaignOfferId}`, {
4075
- selectedLeadListId: leadListId,
4076
- ...(shouldSetCurrentStep ? { currentStep: effectiveCurrentStep } : {}),
4077
- ...(shouldSetCurrentStep
4078
- ? {
4079
- watchNarration: buildSourceImportWatchNarration({
4080
- provider,
4081
- targetLeadCount: cappedTargetLeadCount ?? null,
4082
- }),
4083
- }
4084
- : {}),
4085
- });
4106
+ const selectedLeadListAlreadyCurrent = campaignSelectedLeadListId === leadListId;
4107
+ const shouldUpdateSelectedLeadList = !selectedLeadListAlreadyCurrent || shouldSetCurrentStep;
4108
+ if (shouldUpdateSelectedLeadList) {
4109
+ // Update selectedLeadListId so UI subscribes to the source lead list.
4110
+ // For refill same-source continuations with currentStep:null this is often
4111
+ // already true, so avoid a redundant campaign write.
4112
+ await apiPut(`/api/v2/campaign-offers/${campaignOfferId}`, {
4113
+ selectedLeadListId: leadListId,
4114
+ ...(shouldSetCurrentStep ? { currentStep: effectiveCurrentStep } : {}),
4115
+ ...(shouldSetCurrentStep
4116
+ ? {
4117
+ watchNarration: buildSourceImportWatchNarration({
4118
+ provider,
4119
+ targetLeadCount: cappedTargetLeadCount ?? null,
4120
+ }),
4121
+ }
4122
+ : {}),
4123
+ });
4124
+ }
4086
4125
  return {
4087
4126
  provider,
4088
4127
  leadListId,
4089
4128
  createdLeadList,
4129
+ selectedLeadListIdUpdated: shouldUpdateSelectedLeadList,
4090
4130
  jobResult,
4091
4131
  jobId,
4092
4132
  targetLeadCount: cappedTargetLeadCount ?? null,
@@ -4106,13 +4146,17 @@ export async function cancelLeadImport(input) {
4106
4146
  throw new Error(`cancel_lead_import: provider must be 'apollo', 'prospeo', or 'sales-nav' (got '${input.provider}'). Signal Discovery is not supported.`);
4107
4147
  }
4108
4148
  const api = getApi();
4149
+ const workspaceId = normalizeExplicitWorkspaceId(input.workspaceId);
4150
+ const requestOptions = workspaceRequestOptions(workspaceId);
4109
4151
  const path = input.provider === "apollo"
4110
4152
  ? `/api/v3/lead-lists/${input.tableId}/apollo-import/cancel`
4111
4153
  : input.provider === "sales-nav"
4112
4154
  ? `/api/v3/lead-lists/${input.tableId}/sales-nav-import/cancel`
4113
4155
  : `/api/v3/lead-lists/${input.tableId}/prospeo-import/cancel`;
4114
4156
  try {
4115
- const result = await api.post(path, {});
4157
+ const result = await (requestOptions
4158
+ ? api.post(path, {}, requestOptions)
4159
+ : api.post(path, {}));
4116
4160
  return {
4117
4161
  cancelled: true,
4118
4162
  provider: input.provider,
@@ -4147,7 +4191,7 @@ export async function confirmLeadList(input) {
4147
4191
  });
4148
4192
  let resolvedLeadListId = sourceLeadListId;
4149
4193
  let resolvedProvider;
4150
- if (!resolvedLeadListId || currentStep === undefined || !resolvedProvider) {
4194
+ if (!resolvedLeadListId || currentStep === undefined) {
4151
4195
  const campaign = requestOptions
4152
4196
  ? await api.get(`/api/v2/campaign-offers/${campaignOfferId}`, requestOptions)
4153
4197
  : await api.get(`/api/v2/campaign-offers/${campaignOfferId}`);
@@ -4202,6 +4246,9 @@ export async function confirmLeadList(input) {
4202
4246
  ? await api.get(`/api/v3/workflow-tables/${resolvedLeadListId}?mode=meta`, requestOptions)
4203
4247
  : await api.get(`/api/v3/workflow-tables/${resolvedLeadListId}?mode=meta`);
4204
4248
  const leadListConfig = leadListMeta.table?.config ?? null;
4249
+ if (!resolvedProvider) {
4250
+ resolvedProvider = normalizeImportProvider(leadListConfig?.importProvider);
4251
+ }
4205
4252
  const leadListRowCount = leadListMeta.rowCount ?? 0;
4206
4253
  const importProgress = leadListConfig?.importProgress ?? null;
4207
4254
  const signalSourceTargetLeadCount = resolvedProvider === "signal-discovery" &&
@@ -4431,12 +4478,16 @@ export async function confirmLeadList(input) {
4431
4478
  .filter((cellId) => typeof cellId === "string");
4432
4479
  let recordedReviewBatch = null;
4433
4480
  if (campaignTableId && reviewBatchRowIds.length > 0) {
4434
- const recordResult = await api.post("/api/v3/mcp/campaign-processing", {
4481
+ const recordBody = {
4435
4482
  action: "recordReviewBatch",
4436
4483
  tableId: campaignTableId,
4437
4484
  rowIds: reviewBatchRowIds,
4438
4485
  enrichCellIds: reviewBatchEnrichCellIds,
4439
- });
4486
+ ...(workspaceId ? { workspaceId } : {}),
4487
+ };
4488
+ const recordResult = await (requestOptions
4489
+ ? api.post("/api/v3/mcp/campaign-processing", recordBody, requestOptions)
4490
+ : api.post("/api/v3/mcp/campaign-processing", recordBody));
4440
4491
  recordedReviewBatch = recordResult.reviewBatch ?? null;
4441
4492
  }
4442
4493
  const compactReviewBatch = {
@@ -4474,7 +4525,7 @@ export async function confirmLeadList(input) {
4474
4525
  // campaign table id makes that endpoint 404 with "Lead list not found"
4475
4526
  // and silently breaks the Leads → Filter Continue button.
4476
4527
  if (shouldSetCurrentStep) {
4477
- await api.put(`/api/v2/campaign-offers/${campaignOfferId}`, {
4528
+ const updateBody = {
4478
4529
  currentStep: effectiveCurrentStep,
4479
4530
  ...(effectiveCurrentStep === "filter-choice"
4480
4531
  ? {
@@ -4485,7 +4536,11 @@ export async function confirmLeadList(input) {
4485
4536
  }),
4486
4537
  }
4487
4538
  : {}),
4488
- });
4539
+ ...(workspaceId ? { workspaceId } : {}),
4540
+ };
4541
+ await (requestOptions
4542
+ ? api.put(`/api/v2/campaign-offers/${campaignOfferId}`, updateBody, requestOptions)
4543
+ : api.put(`/api/v2/campaign-offers/${campaignOfferId}`, updateBody));
4489
4544
  }
4490
4545
  return {
4491
4546
  sourceLeadListId: resolvedLeadListId,
@@ -137,7 +137,8 @@ export interface PostFindLeadsScoutRegistryResponse {
137
137
  }
138
138
  export declare const DEFAULT_SUBSKILL_PROMPT_CHUNK_CHARS = 48000;
139
139
  export declare const MAX_SUBSKILL_PROMPT_CHUNK_CHARS = 48000;
140
- export declare const ALLOWED_SUBSKILL_PROMPT_NAMES: readonly ["building-gtm-tables", "content", "create-ab-test", "create-campaign", "create-campaign-brief", "create-campaign-v2", "create-campaign-v2-tail", "create-campaign-v2-validation", "create-evergreen-campaigns", "create-post", "create-rubric", "engage", "enrich-prospects", "fill-send-horizon", "find-leads", "foundation", "generate-messages", "interview", "load-voice", "refresh-sender-engagement", "refill-sends", "refill-sends-workflow", "research", "research-prospect", "research-sender", "weekly-campaign-summary", "workflow-sequences"];
140
+ export declare const DEPRECATED_SUBSKILL_PROMPT_REPLACEMENTS: Record<string, string>;
141
+ export declare const ALLOWED_SUBSKILL_PROMPT_NAMES: readonly ["building-gtm-tables", "content", "create-ab-test", "create-campaign", "create-campaign-brief", "create-campaign-v2", "create-campaign-v2-tail", "create-campaign-v2-validation", "create-evergreen-campaigns", "create-post", "create-rubric", "engage", "enrich-prospects", "fill-send-horizon", "find-leads", "foundation", "generate-messages", "interview", "load-voice", "refresh-sender-engagement", "refill-sends", "refill-sends-evergreen", "refill-sends-evergreen-workflow", "refill-sends-v2", "refill-sends-v2-workflow", "refill-sends-workflow", "research", "research-prospect", "research-sender", "weekly-campaign-summary", "workflow-sequences"];
141
142
  export declare const promptToolDefinitions: ({
142
143
  name: string;
143
144
  description: string;
@@ -181,7 +182,7 @@ export declare const promptToolDefinitions: ({
181
182
  properties: {
182
183
  subskillName: {
183
184
  type: string;
184
- enum: readonly ["building-gtm-tables", "content", "create-ab-test", "create-campaign", "create-campaign-brief", "create-campaign-v2", "create-campaign-v2-tail", "create-campaign-v2-validation", "create-evergreen-campaigns", "create-post", "create-rubric", "engage", "enrich-prospects", "fill-send-horizon", "find-leads", "foundation", "generate-messages", "interview", "load-voice", "refresh-sender-engagement", "refill-sends", "refill-sends-workflow", "research", "research-prospect", "research-sender", "weekly-campaign-summary", "workflow-sequences"];
185
+ enum: readonly ["building-gtm-tables", "content", "create-ab-test", "create-campaign", "create-campaign-brief", "create-campaign-v2", "create-campaign-v2-tail", "create-campaign-v2-validation", "create-evergreen-campaigns", "create-post", "create-rubric", "engage", "enrich-prospects", "fill-send-horizon", "find-leads", "foundation", "generate-messages", "interview", "load-voice", "refresh-sender-engagement", "refill-sends", "refill-sends-evergreen", "refill-sends-evergreen-workflow", "refill-sends-v2", "refill-sends-v2-workflow", "refill-sends-workflow", "research", "research-prospect", "research-sender", "weekly-campaign-summary", "workflow-sequences"];
185
186
  description: string;
186
187
  };
187
188
  offset: {
@@ -216,7 +217,7 @@ export declare const promptToolDefinitions: ({
216
217
  properties: {
217
218
  subskillName: {
218
219
  type: string;
219
- enum: readonly ["building-gtm-tables", "content", "create-ab-test", "create-campaign", "create-campaign-brief", "create-campaign-v2", "create-campaign-v2-tail", "create-campaign-v2-validation", "create-evergreen-campaigns", "create-post", "create-rubric", "engage", "enrich-prospects", "fill-send-horizon", "find-leads", "foundation", "generate-messages", "interview", "load-voice", "refresh-sender-engagement", "refill-sends", "refill-sends-workflow", "research", "research-prospect", "research-sender", "weekly-campaign-summary", "workflow-sequences"];
220
+ enum: readonly ["building-gtm-tables", "content", "create-ab-test", "create-campaign", "create-campaign-brief", "create-campaign-v2", "create-campaign-v2-tail", "create-campaign-v2-validation", "create-evergreen-campaigns", "create-post", "create-rubric", "engage", "enrich-prospects", "fill-send-horizon", "find-leads", "foundation", "generate-messages", "interview", "load-voice", "refresh-sender-engagement", "refill-sends", "refill-sends-evergreen", "refill-sends-evergreen-workflow", "refill-sends-v2", "refill-sends-v2-workflow", "refill-sends-workflow", "research", "research-prospect", "research-sender", "weekly-campaign-summary", "workflow-sequences"];
220
221
  description: string;
221
222
  };
222
223
  assetPath: {
@@ -13,8 +13,10 @@ import { markCreateCampaignPromptLoaded, markResearchPromptLoaded, markSenderRes
13
13
  // ~3s.
14
14
  export const DEFAULT_SUBSKILL_PROMPT_CHUNK_CHARS = 48_000;
15
15
  export const MAX_SUBSKILL_PROMPT_CHUNK_CHARS = 48_000;
16
- const DEPRECATED_SUBSKILL_PROMPT_REPLACEMENTS = {
16
+ export const DEPRECATED_SUBSKILL_PROMPT_REPLACEMENTS = {
17
17
  "generate-messages-compact": "generate-messages",
18
+ "refill-sends-evergreen": "refill-sends-v2",
19
+ "refill-sends-evergreen-workflow": "refill-sends-v2-workflow",
18
20
  };
19
21
  export const ALLOWED_SUBSKILL_PROMPT_NAMES = [
20
22
  "building-gtm-tables",
@@ -38,6 +40,10 @@ export const ALLOWED_SUBSKILL_PROMPT_NAMES = [
38
40
  "load-voice",
39
41
  "refresh-sender-engagement",
40
42
  "refill-sends",
43
+ "refill-sends-evergreen",
44
+ "refill-sends-evergreen-workflow",
45
+ "refill-sends-v2",
46
+ "refill-sends-v2-workflow",
41
47
  "refill-sends-workflow",
42
48
  "research",
43
49
  "research-prospect",
@@ -0,0 +1,28 @@
1
+ type RefillSendsEvergreenInput = {
2
+ workspaceId?: string;
3
+ };
4
+ export declare const refillSendsEvergreenToolDefinitions: {
5
+ name: string;
6
+ description: string;
7
+ inputSchema: {
8
+ type: string;
9
+ properties: {
10
+ workspaceId: {
11
+ type: string;
12
+ description: string;
13
+ };
14
+ };
15
+ required: string[];
16
+ additionalProperties: boolean;
17
+ };
18
+ }[];
19
+ export declare function refillSendsEvergreenCommand(input: RefillSendsEvergreenInput): {
20
+ readOnly: boolean;
21
+ workspaceId: string | null;
22
+ firstOperationalSteps: string[];
23
+ approvalContract: string;
24
+ forbiddenActions: string[];
25
+ fillWindow: string;
26
+ hostExamples: string[];
27
+ };
28
+ export {};
@@ -0,0 +1,47 @@
1
+ export const refillSendsEvergreenToolDefinitions = [
2
+ {
3
+ name: "refill_sends_evergreen",
4
+ description: "Read-only Phase 85 evergreen refill command contract. It performs no mutations and only tells the operator to call get_evergreen_refill_plan for a dry-run packet and journal.",
5
+ inputSchema: {
6
+ type: "object",
7
+ properties: {
8
+ workspaceId: {
9
+ type: "string",
10
+ description: "Explicit request-scoped workspace id.",
11
+ },
12
+ },
13
+ required: ["workspaceId"],
14
+ additionalProperties: false,
15
+ },
16
+ },
17
+ ];
18
+ export function refillSendsEvergreenCommand(input) {
19
+ return {
20
+ readOnly: true,
21
+ workspaceId: input.workspaceId ?? null,
22
+ firstOperationalSteps: [
23
+ "Call get_evergreen_refill_plan with the explicit workspaceId.",
24
+ "Read the returned packet, globalActionQueue, per-sender plans, and itinerary before taking any action.",
25
+ "Review the dry-run journal file path returned by get_evergreen_refill_plan.",
26
+ "Phase 85 is PLAN-ONLY; execution arrives in Phase 86.",
27
+ ],
28
+ approvalContract: "Nothing is approved or executable in Phase 85. The evergreen command is read-only; Phase 86 introduces execution approval.",
29
+ forbiddenActions: [
30
+ "Do not schedule sends.",
31
+ "Do not send messages.",
32
+ "Do not approve messages.",
33
+ "Do not prepare messages.",
34
+ "Do not start or launch campaigns.",
35
+ "Do not create campaigns.",
36
+ "Do not switch providers or source families.",
37
+ "Do not lower paid InMail thresholds.",
38
+ "Do not refresh paid InMail credits.",
39
+ "Do not write scheduler fields.",
40
+ ],
41
+ fillWindow: "Use only the target window and caps returned by get_evergreen_refill_plan.",
42
+ hostExamples: [
43
+ "refill_sends_evergreen({ workspaceId })",
44
+ "get_evergreen_refill_plan({ workspaceId })",
45
+ ],
46
+ };
47
+ }
@@ -0,0 +1,28 @@
1
+ type RefillSendsV2Input = {
2
+ workspaceId?: string;
3
+ };
4
+ export declare const refillSendsV2ToolDefinitions: {
5
+ name: string;
6
+ description: string;
7
+ inputSchema: {
8
+ type: string;
9
+ properties: {
10
+ workspaceId: {
11
+ type: string;
12
+ description: string;
13
+ };
14
+ };
15
+ required: string[];
16
+ additionalProperties: boolean;
17
+ };
18
+ }[];
19
+ export declare function refillSendsV2Command(input: RefillSendsV2Input): {
20
+ readOnly: boolean;
21
+ workspaceId: string | null;
22
+ firstOperationalSteps: string[];
23
+ approvalContract: string;
24
+ forbiddenActions: string[];
25
+ fillWindow: string;
26
+ hostExamples: string[];
27
+ };
28
+ export {};
@@ -0,0 +1,49 @@
1
+ export const refillSendsV2ToolDefinitions = [
2
+ {
3
+ name: "refill_sends_v2",
4
+ description: "Read-only refill sends v2 command contract. It performs no mutations and tells the operator to call get_refill_plan_v2 for a dry-run packet and journal across managed waterfall, dashboard evergreen, and active campaign lanes.",
5
+ inputSchema: {
6
+ type: "object",
7
+ properties: {
8
+ workspaceId: {
9
+ type: "string",
10
+ description: "Explicit request-scoped workspace id.",
11
+ },
12
+ },
13
+ required: ["workspaceId"],
14
+ additionalProperties: false,
15
+ },
16
+ },
17
+ ];
18
+ export function refillSendsV2Command(input) {
19
+ return {
20
+ readOnly: true,
21
+ workspaceId: input.workspaceId ?? null,
22
+ firstOperationalSteps: [
23
+ "Call get_refill_plan_v2 first with the explicit workspaceId.",
24
+ "Read the returned packet, globalActionQueue, per-sender plans, laneOrder source labels, laneChain values, and itinerary before taking any action.",
25
+ "Confirm which lane source was selected for each sender: managed_waterfall, dashboard_evergreen, or active_campaign.",
26
+ "Review the refill v2 dry-run journal file path returned by get_refill_plan_v2.",
27
+ "If the packet reports no_refillable_campaigns or workspace_access, stop and report that blocker instead of mutating.",
28
+ "This command is PLAN-ONLY; execution arrives in Phase 86.",
29
+ ],
30
+ approvalContract: "Nothing is approved or executable in Phase 87. The refill_sends_v2 command is read-only; Phase 86 introduces execution approval.",
31
+ forbiddenActions: [
32
+ "Do not schedule sends.",
33
+ "Do not send messages.",
34
+ "Do not approve messages.",
35
+ "Do not prepare messages.",
36
+ "Do not start or launch campaigns.",
37
+ "Do not create campaigns.",
38
+ "Do not switch providers or source families.",
39
+ "Do not lower paid InMail thresholds.",
40
+ "Do not refresh paid InMail credits.",
41
+ "Do not write scheduler fields.",
42
+ ],
43
+ fillWindow: "Use only the target window and caps returned by get_refill_plan_v2.",
44
+ hostExamples: [
45
+ "refill_sends_v2({ workspaceId })",
46
+ "get_refill_plan_v2({ workspaceId })",
47
+ ],
48
+ };
49
+ }