@sellable/mcp 0.1.516 → 0.1.517

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.
@@ -146,6 +146,7 @@ export type SignalSearchInput = {
146
146
  headlineICPCriteria?: string[];
147
147
  rubricGuidelines?: string[];
148
148
  confirmed?: boolean;
149
+ workspaceId?: string;
149
150
  };
150
151
  export type ImportLeadsInput = {
151
152
  campaignOfferId: string;
@@ -3655,6 +3655,17 @@ export async function searchSignals(input) {
3655
3655
  campaignOfferId: input?.campaignOfferId,
3656
3656
  });
3657
3657
  const api = getApi();
3658
+ const workspaceId = normalizeExplicitWorkspaceId(input.workspaceId);
3659
+ const requestOptions = workspaceRequestOptions(workspaceId);
3660
+ const apiPut = (path, body) => requestOptions
3661
+ ? api.put(path, body, requestOptions)
3662
+ : api.put(path, body);
3663
+ const apiPatch = (path, body) => requestOptions
3664
+ ? api.patch(path, body, requestOptions)
3665
+ : api.patch(path, body);
3666
+ const apiPost = (path, body) => requestOptions
3667
+ ? api.post(path, body, requestOptions)
3668
+ : api.post(path, body);
3658
3669
  const { campaignOfferId, headlineICPCriteria, rubricGuidelines, currentStepTransition, } = input;
3659
3670
  const searchRequest = { ...input };
3660
3671
  delete searchRequest.currentStepTransition;
@@ -3665,7 +3676,7 @@ export async function searchSignals(input) {
3665
3676
  ? headlineICPCriteria
3666
3677
  : rubricGuidelines;
3667
3678
  if (campaignOfferId && searchCurrentStep) {
3668
- await api.put(`/api/v2/campaign-offers/${campaignOfferId}`, {
3679
+ await apiPut(`/api/v2/campaign-offers/${campaignOfferId}`, {
3669
3680
  leadSourceType: "new",
3670
3681
  leadSourceProvider: "signal-discovery",
3671
3682
  currentStep: searchCurrentStep,
@@ -3675,17 +3686,17 @@ export async function searchSignals(input) {
3675
3686
  }
3676
3687
  // Persist criteria early so user take-over has filters ready.
3677
3688
  if (campaignOfferId && effectiveHeadlineICPCriteria?.length) {
3678
- await api.patch(`/api/v3/campaigns/${campaignOfferId}/signal-discovery/posts`, {
3689
+ await apiPatch(`/api/v3/campaigns/${campaignOfferId}/signal-discovery/posts`, {
3679
3690
  selectedIds: [],
3680
3691
  unselectedIds: [],
3681
3692
  headlineICPCriteria: effectiveHeadlineICPCriteria,
3682
3693
  rubricGuidelines: effectiveHeadlineICPCriteria,
3683
3694
  });
3684
3695
  }
3685
- const response = await api.post(`/api/v1/signal-discovery/search-signals`, searchRequest);
3696
+ const response = await apiPost(`/api/v1/signal-discovery/search-signals`, searchRequest);
3686
3697
  const summary = summarizeSignalSearchResponse(response);
3687
3698
  if (campaignOfferId && searchCurrentStep) {
3688
- await api.put(`/api/v2/campaign-offers/${campaignOfferId}`, {
3699
+ await apiPut(`/api/v2/campaign-offers/${campaignOfferId}`, {
3689
3700
  currentStep: searchCurrentStep,
3690
3701
  ...(currentStepTransition ? { currentStepTransition } : {}),
3691
3702
  watchNarration: buildSignalDiscoveryResultsWatchNarration(summary.postsReturned),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellable/mcp",
3
- "version": "0.1.516",
3
+ "version": "0.1.517",
4
4
  "type": "module",
5
5
  "description": "Sellable MCP server for Claude Code and Codex campaign workflows",
6
6
  "main": "dist/index.js",