@sellable/mcp 0.1.501 → 0.1.503

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.
Files changed (34) hide show
  1. package/dist/api.d.ts +5 -5
  2. package/dist/api.js +10 -10
  3. package/dist/index-dev.js +0 -0
  4. package/dist/index.js +0 -0
  5. package/dist/server.js +2 -2
  6. package/dist/tools/campaign-fill-routing.d.ts +5 -0
  7. package/dist/tools/campaign-fill-routing.js +13 -3
  8. package/dist/tools/campaign-message-preparation.d.ts +7 -13
  9. package/dist/tools/campaign-message-preparation.js +21 -24
  10. package/dist/tools/campaign-processing.d.ts +19 -0
  11. package/dist/tools/campaign-processing.js +31 -8
  12. package/dist/tools/campaign-refill-state.d.ts +5 -0
  13. package/dist/tools/campaign-refill-state.js +13 -3
  14. package/dist/tools/leads.d.ts +6 -47
  15. package/dist/tools/leads.js +26 -30
  16. package/dist/tools/prompts.js +1 -1
  17. package/dist/tools/readiness.d.ts +6 -0
  18. package/dist/tools/readiness.js +12 -5
  19. package/dist/tools/refill-sends.d.ts +34 -32
  20. package/dist/tools/refill-sends.js +67 -586
  21. package/dist/tools/refill-target-plan.d.ts +5 -0
  22. package/dist/tools/refill-target-plan.js +24 -50
  23. package/dist/tools/registry.d.ts +205 -47
  24. package/dist/tools/scheduler-fill-capacity.d.ts +5 -0
  25. package/dist/tools/scheduler-fill-capacity.js +13 -3
  26. package/dist/tools/sender-routing.d.ts +8 -1
  27. package/dist/tools/sender-routing.js +12 -3
  28. package/dist/tools/senders.d.ts +14 -1
  29. package/dist/tools/senders.js +31 -5
  30. package/dist/tools/workspace-context.d.ts +36 -0
  31. package/dist/tools/workspace-context.js +39 -0
  32. package/package.json +1 -1
  33. package/skills/refill-sends/SKILL.md +49 -28
  34. package/skills/refill-sends-workflow/SKILL.md +15 -10
@@ -12,6 +12,7 @@ type GetRefillTargetPlanInput = {
12
12
  senders?: string[];
13
13
  actionTypes?: string[];
14
14
  approvalMode?: RefillTargetPlanApprovalMode;
15
+ workspaceId?: string;
15
16
  };
16
17
  export declare const refillTargetPlanToolDefinitions: {
17
18
  name: string;
@@ -82,6 +83,10 @@ export declare const refillTargetPlanToolDefinitions: {
82
83
  enum: string[];
83
84
  description: string;
84
85
  };
86
+ workspaceId: {
87
+ type: string;
88
+ description: string;
89
+ };
85
90
  };
86
91
  required: never[];
87
92
  additionalProperties: boolean;
@@ -1,4 +1,5 @@
1
1
  import { getApi } from "../api.js";
2
+ import { normalizeExplicitWorkspaceId, workspaceRequestOptions, } from "./workspace-context.js";
2
3
  const REFILL_TARGET_ACTION_TYPES = [
3
4
  "send_invite",
4
5
  "send_inmail_closed",
@@ -9,13 +10,6 @@ const SAFE_PACKET_ACTION_TYPES = new Set([
9
10
  "approve_messages",
10
11
  "start_paused_campaign",
11
12
  "wait_for_scheduler",
12
- "wait_for_active_work",
13
- "wait_for_source_import",
14
- "copy_selected_source_rows",
15
- "continue_signal_discovery_source",
16
- "continue_sales_nav_source",
17
- "continue_prospeo_source",
18
- "manual_source_replenishment",
19
13
  "refresh_paid_inmail_credits",
20
14
  "lower_paid_inmail_threshold",
21
15
  "switch_to_connection_lane",
@@ -25,9 +19,6 @@ const MANUAL_ONLY_PACKET_ACTION_TYPES = new Set([
25
19
  "lower_paid_inmail_threshold",
26
20
  "switch_to_connection_lane",
27
21
  "create_connection_campaign",
28
- "continue_sales_nav_source",
29
- "continue_prospeo_source",
30
- "manual_source_replenishment",
31
22
  ]);
32
23
  const SOURCE_PLAN_STATES = new Set([
33
24
  "not_needed",
@@ -36,16 +27,17 @@ const SOURCE_PLAN_STATES = new Set([
36
27
  "needs_signal_import",
37
28
  "waiting_for_import",
38
29
  "needs_confirm",
39
- "needs_same_source_copy",
40
- "needs_provider_continuation",
41
30
  "source_shortfall",
42
31
  "provider_exhausted",
43
32
  "provider_missing",
44
33
  "blocked",
45
34
  ]);
46
- async function postRefillTargetPlan(body) {
35
+ async function postRefillTargetPlan(body, workspaceId) {
47
36
  const api = getApi();
48
- return api.post("/api/v3/mcp/refill-target-plan", body);
37
+ const requestOptions = workspaceRequestOptions(workspaceId);
38
+ return requestOptions
39
+ ? api.post("/api/v3/mcp/refill-target-plan", body, requestOptions)
40
+ : api.post("/api/v3/mcp/refill-target-plan", body);
49
41
  }
50
42
  function isRecord(value) {
51
43
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
@@ -164,16 +156,6 @@ function sanitizeActionCandidate(candidate) {
164
156
  tableId: stringValue(candidate.tableId),
165
157
  tableName: stringValue(candidate.tableName) ?? null,
166
158
  columnId: stringValue(candidate.columnId) ?? null,
167
- sourceLeadListId: stringValue(candidate.sourceLeadListId) ?? null,
168
- leadSourceProvider: stringValue(candidate.leadSourceProvider) ?? null,
169
- sourceFingerprint: stringValue(candidate.sourceFingerprint) ?? null,
170
- sourceInventoryStatus: stringValue(candidate.sourceInventoryStatus) ?? null,
171
- sourceRowIds: stringArray(candidate.sourceRowIds),
172
- sourceRowLimit: typeof candidate.sourceRowLimit === "number"
173
- ? candidate.sourceRowLimit
174
- : undefined,
175
- activeJobId: stringValue(candidate.activeJobId) ?? null,
176
- activeImportStatus: stringValue(candidate.activeImportStatus) ?? null,
177
159
  targetRows: typeof candidate.targetRows === "number" ? candidate.targetRows : undefined,
178
160
  columnRole: stringValue(candidate.columnRole),
179
161
  rowSelector: sanitizeRowSelector(candidate.rowSelector),
@@ -208,25 +190,9 @@ function sanitizeToolInput(value) {
208
190
  return {};
209
191
  return {
210
192
  senderId: stringValue(value.senderId),
211
- actionType: allowedActionType(value.actionType),
212
193
  campaignId: stringValue(value.campaignId),
213
194
  tableId: stringValue(value.tableId),
214
195
  columnId: stringValue(value.columnId) ?? null,
215
- sourceLeadListId: stringValue(value.sourceLeadListId) ?? null,
216
- leadSourceProvider: stringValue(value.leadSourceProvider) ?? null,
217
- sourceFingerprint: stringValue(value.sourceFingerprint) ?? null,
218
- activeJobId: stringValue(value.activeJobId) ?? null,
219
- activeImportStatus: stringValue(value.activeImportStatus) ?? null,
220
- sourceInventoryStatus: stringValue(value.sourceInventoryStatus) ?? null,
221
- sourceRowIds: stringArray(value.sourceRowIds),
222
- sourceRowLimit: typeof value.sourceRowLimit === "number"
223
- ? value.sourceRowLimit
224
- : undefined,
225
- campaignOfferId: stringValue(value.campaignOfferId),
226
- provider: stringValue(value.provider),
227
- allowDifferentSourceLeadList: typeof value.allowDifferentSourceLeadList === "boolean"
228
- ? value.allowDifferentSourceLeadList
229
- : undefined,
230
196
  targetPreparedMessages: typeof value.targetPreparedMessages === "number"
231
197
  ? value.targetPreparedMessages
232
198
  : undefined,
@@ -253,10 +219,6 @@ function sanitizePacketIds(value) {
253
219
  campaignId: stringValue(value.campaignId),
254
220
  tableId: stringValue(value.tableId),
255
221
  columnId: stringValue(value.columnId) ?? null,
256
- sourceLeadListId: stringValue(value.sourceLeadListId) ?? null,
257
- leadSourceProvider: stringValue(value.leadSourceProvider) ?? null,
258
- sourceFingerprint: stringValue(value.sourceFingerprint) ?? null,
259
- activeJobId: stringValue(value.activeJobId) ?? null,
260
222
  };
261
223
  }
262
224
  function sanitizeStructuredAction(action, selectedBySender, mode, rank) {
@@ -279,7 +241,6 @@ function sanitizeStructuredAction(action, selectedBySender, mode, rank) {
279
241
  return {
280
242
  rank,
281
243
  type: action.type,
282
- actionType: allowedActionType(action.actionType),
283
244
  toolName: stringValue(action.toolName) ?? null,
284
245
  sideEffectClass: stringValue(action.sideEffectClass),
285
246
  ids,
@@ -377,9 +338,6 @@ function sanitizeSourcePlan(value) {
377
338
  reason: stringValue(value.reason),
378
339
  campaignId: stringValue(value.campaignId),
379
340
  tableId: stringValue(value.tableId),
380
- sourceLeadListId: stringValue(value.sourceLeadListId) ?? null,
381
- leadSourceProvider: stringValue(value.leadSourceProvider) ?? null,
382
- sourceFingerprint: stringValue(value.sourceFingerprint) ?? null,
383
341
  remainingRowsNeeded: typeof value.remainingRowsNeeded === "number"
384
342
  ? value.remainingRowsNeeded
385
343
  : undefined,
@@ -738,6 +696,10 @@ export const refillTargetPlanToolDefinitions = [
738
696
  enum: ["approve", "mark_ready"],
739
697
  description: 'Requested downstream approval mode. Use "approve" only for explicit fill/schedule requests.',
740
698
  },
699
+ workspaceId: {
700
+ type: "string",
701
+ description: "Explicit request-scoped workspace id for scheduled/yolo refill automation. Pass this instead of switching the shared active workspace.",
702
+ },
741
703
  },
742
704
  required: [],
743
705
  additionalProperties: false,
@@ -745,6 +707,7 @@ export const refillTargetPlanToolDefinitions = [
745
707
  },
746
708
  ];
747
709
  export async function getRefillTargetPlan(input = {}) {
710
+ const workspaceId = normalizeExplicitWorkspaceId(input.workspaceId);
748
711
  const result = await postRefillTargetPlan({
749
712
  intent: input.intent,
750
713
  horizonSendDays: input.horizonSendDays,
@@ -757,6 +720,17 @@ export async function getRefillTargetPlan(input = {}) {
757
720
  senders: input.senders,
758
721
  actionTypes: input.actionTypes,
759
722
  approvalMode: input.approvalMode,
760
- });
761
- return sanitizeRefillTargetPlanResult(result);
723
+ ...(workspaceId ? { workspaceId } : {}),
724
+ }, workspaceId ?? undefined);
725
+ const sanitized = sanitizeRefillTargetPlanResult(result);
726
+ if (!workspaceId || !isRecord(sanitized))
727
+ return sanitized;
728
+ return {
729
+ ...sanitized,
730
+ request: isRecord(sanitized.request)
731
+ ? { ...sanitized.request, workspaceId }
732
+ : { workspaceId },
733
+ workspaceId,
734
+ workspaceResolution: "explicit",
735
+ };
762
736
  }
@@ -499,6 +499,10 @@ export declare const allTools: ({
499
499
  maximum: number;
500
500
  description: string;
501
501
  };
502
+ workspaceId: {
503
+ type: string;
504
+ description: string;
505
+ };
502
506
  };
503
507
  required: string[];
504
508
  additionalProperties: boolean;
@@ -580,6 +584,63 @@ export declare const allTools: ({
580
584
  required: string[];
581
585
  additionalProperties: boolean;
582
586
  };
587
+ } | {
588
+ name: string;
589
+ description: string;
590
+ inputSchema: {
591
+ type: string;
592
+ properties: {
593
+ campaignId: {
594
+ type: string;
595
+ description: string;
596
+ };
597
+ tableId: {
598
+ type: string;
599
+ };
600
+ targetPreparedMessages: {
601
+ type: string;
602
+ minimum: number;
603
+ maximum: number;
604
+ };
605
+ maxRowsToCheck: {
606
+ type: string;
607
+ minimum: number;
608
+ maximum: number;
609
+ description: string;
610
+ };
611
+ batchSize: {
612
+ type: string;
613
+ minimum: number;
614
+ maximum: number;
615
+ description: string;
616
+ };
617
+ maxBatchRows: {
618
+ type: string;
619
+ minimum: number;
620
+ maximum: number;
621
+ description: string;
622
+ };
623
+ approvalMode: {
624
+ type: string;
625
+ enum: string[];
626
+ description: string;
627
+ };
628
+ autoContinue: {
629
+ type: string;
630
+ };
631
+ disableLowPassRateStop: {
632
+ type: string;
633
+ description: string;
634
+ };
635
+ workspaceId: {
636
+ type: string;
637
+ description: string;
638
+ };
639
+ jobId?: undefined;
640
+ };
641
+ required: string[];
642
+ additionalProperties: boolean;
643
+ };
583
644
  } | {
584
645
  name: string;
585
646
  description: string;
@@ -596,14 +657,16 @@ export declare const allTools: ({
596
657
  tableId: {
597
658
  type: string;
598
659
  };
660
+ workspaceId: {
661
+ type: string;
662
+ description?: undefined;
663
+ };
599
664
  targetPreparedMessages?: undefined;
600
665
  maxRowsToCheck?: undefined;
601
666
  batchSize?: undefined;
602
667
  maxBatchRows?: undefined;
603
668
  approvalMode?: undefined;
604
669
  autoContinue?: undefined;
605
- senderId?: undefined;
606
- actionType?: undefined;
607
670
  disableLowPassRateStop?: undefined;
608
671
  };
609
672
  additionalProperties: boolean;
@@ -654,6 +717,10 @@ export declare const allTools: ({
654
717
  enum: string[];
655
718
  description: string;
656
719
  };
720
+ workspaceId: {
721
+ type: string;
722
+ description: string;
723
+ };
657
724
  };
658
725
  required: string[];
659
726
  additionalProperties: boolean;
@@ -687,6 +754,7 @@ export declare const allTools: ({
687
754
  };
688
755
  leadListId?: undefined;
689
756
  campaignOfferId?: undefined;
757
+ workspaceId?: undefined;
690
758
  provider?: undefined;
691
759
  jobId?: undefined;
692
760
  targetLeadCount?: undefined;
@@ -707,6 +775,9 @@ export declare const allTools: ({
707
775
  tableId: {
708
776
  type: string;
709
777
  };
778
+ workspaceId: {
779
+ type: string;
780
+ };
710
781
  columnRole?: undefined;
711
782
  rowSelector?: undefined;
712
783
  limit?: undefined;
@@ -737,6 +808,9 @@ export declare const allTools: ({
737
808
  tableId: {
738
809
  type: string;
739
810
  };
811
+ workspaceId: {
812
+ type: string;
813
+ };
740
814
  columnRole: {
741
815
  type: string;
742
816
  enum: string[];
@@ -794,6 +868,9 @@ export declare const allTools: ({
794
868
  tableId: {
795
869
  type: string;
796
870
  };
871
+ workspaceId: {
872
+ type: string;
873
+ };
797
874
  columnRole: {
798
875
  type: string;
799
876
  enum: string[];
@@ -855,6 +932,9 @@ export declare const allTools: ({
855
932
  tableId: {
856
933
  type: string;
857
934
  };
935
+ workspaceId: {
936
+ type: string;
937
+ };
858
938
  minPassedCount: {
859
939
  type: string;
860
940
  };
@@ -893,6 +973,9 @@ export declare const allTools: ({
893
973
  tableId: {
894
974
  type: string;
895
975
  };
976
+ workspaceId: {
977
+ type: string;
978
+ };
896
979
  rowIds: {
897
980
  type: string;
898
981
  items: {
@@ -934,6 +1017,9 @@ export declare const allTools: ({
934
1017
  tableId: {
935
1018
  type: string;
936
1019
  };
1020
+ workspaceId: {
1021
+ type: string;
1022
+ };
937
1023
  templateMarkdown: {
938
1024
  type: string;
939
1025
  };
@@ -2359,6 +2445,10 @@ export declare const allTools: ({
2359
2445
  type: string;
2360
2446
  description: string;
2361
2447
  };
2448
+ workspaceId: {
2449
+ type: string;
2450
+ description: string;
2451
+ };
2362
2452
  };
2363
2453
  required: string[];
2364
2454
  additionalProperties: boolean;
@@ -2411,6 +2501,96 @@ export declare const allTools: ({
2411
2501
  required: string[];
2412
2502
  additionalProperties: boolean;
2413
2503
  };
2504
+ } | {
2505
+ name: string;
2506
+ description: string;
2507
+ inputSchema: {
2508
+ type: string;
2509
+ properties: {
2510
+ markdown: {
2511
+ type: string;
2512
+ description: string;
2513
+ };
2514
+ senderId: {
2515
+ type: string;
2516
+ description: string;
2517
+ };
2518
+ keyword?: undefined;
2519
+ totalReturned?: undefined;
2520
+ postsYielded?: undefined;
2521
+ name?: undefined;
2522
+ linkedinUrl?: undefined;
2523
+ reason?: undefined;
2524
+ fromSenderId?: undefined;
2525
+ toSenderId?: undefined;
2526
+ };
2527
+ required: string[];
2528
+ additionalProperties: boolean;
2529
+ };
2530
+ } | {
2531
+ name: string;
2532
+ description: string;
2533
+ inputSchema: {
2534
+ type: string;
2535
+ properties: {
2536
+ keyword: {
2537
+ type: string;
2538
+ description: string;
2539
+ };
2540
+ totalReturned: {
2541
+ type: string;
2542
+ description: string;
2543
+ };
2544
+ postsYielded: {
2545
+ type: string;
2546
+ description: string;
2547
+ };
2548
+ senderId: {
2549
+ type: string;
2550
+ description: string;
2551
+ };
2552
+ markdown?: undefined;
2553
+ name?: undefined;
2554
+ linkedinUrl?: undefined;
2555
+ reason?: undefined;
2556
+ fromSenderId?: undefined;
2557
+ toSenderId?: undefined;
2558
+ };
2559
+ required: string[];
2560
+ additionalProperties: boolean;
2561
+ };
2562
+ } | {
2563
+ name: string;
2564
+ description: string;
2565
+ inputSchema: {
2566
+ type: string;
2567
+ properties: {
2568
+ name: {
2569
+ type: string;
2570
+ description: string;
2571
+ };
2572
+ linkedinUrl: {
2573
+ type: string;
2574
+ description: string;
2575
+ };
2576
+ reason: {
2577
+ type: string;
2578
+ description: string;
2579
+ };
2580
+ senderId: {
2581
+ type: string;
2582
+ description: string;
2583
+ };
2584
+ markdown?: undefined;
2585
+ keyword?: undefined;
2586
+ totalReturned?: undefined;
2587
+ postsYielded?: undefined;
2588
+ fromSenderId?: undefined;
2589
+ toSenderId?: undefined;
2590
+ };
2591
+ required: string[];
2592
+ additionalProperties: boolean;
2593
+ };
2414
2594
  } | {
2415
2595
  name: string;
2416
2596
  description: string;
@@ -2437,6 +2617,29 @@ export declare const allTools: ({
2437
2617
  required: string[];
2438
2618
  additionalProperties: boolean;
2439
2619
  };
2620
+ } | {
2621
+ name: string;
2622
+ description: string;
2623
+ inputSchema: {
2624
+ type: string;
2625
+ properties: {
2626
+ senderId: {
2627
+ type: string;
2628
+ description: string;
2629
+ };
2630
+ markdown?: undefined;
2631
+ keyword?: undefined;
2632
+ totalReturned?: undefined;
2633
+ postsYielded?: undefined;
2634
+ name?: undefined;
2635
+ linkedinUrl?: undefined;
2636
+ reason?: undefined;
2637
+ fromSenderId?: undefined;
2638
+ toSenderId?: undefined;
2639
+ };
2640
+ required: string[];
2641
+ additionalProperties: boolean;
2642
+ };
2440
2643
  } | {
2441
2644
  name: string;
2442
2645
  description: string;
@@ -2901,8 +3104,6 @@ export declare const allTools: ({
2901
3104
  keepInSync?: undefined;
2902
3105
  jobId?: undefined;
2903
3106
  reviewBatchLimit?: undefined;
2904
- sourceRowIds?: undefined;
2905
- sourceRowLimit?: undefined;
2906
3107
  allowPartialSourceList?: undefined;
2907
3108
  includeRawImportResult?: undefined;
2908
3109
  selections?: undefined;
@@ -3097,8 +3298,6 @@ export declare const allTools: ({
3097
3298
  keepInSync?: undefined;
3098
3299
  jobId?: undefined;
3099
3300
  reviewBatchLimit?: undefined;
3100
- sourceRowIds?: undefined;
3101
- sourceRowLimit?: undefined;
3102
3301
  allowPartialSourceList?: undefined;
3103
3302
  includeRawImportResult?: undefined;
3104
3303
  selections?: undefined;
@@ -3192,8 +3391,6 @@ export declare const allTools: ({
3192
3391
  keepInSync?: undefined;
3193
3392
  jobId?: undefined;
3194
3393
  reviewBatchLimit?: undefined;
3195
- sourceRowIds?: undefined;
3196
- sourceRowLimit?: undefined;
3197
3394
  allowPartialSourceList?: undefined;
3198
3395
  includeRawImportResult?: undefined;
3199
3396
  selections?: undefined;
@@ -3359,8 +3556,6 @@ export declare const allTools: ({
3359
3556
  keepInSync?: undefined;
3360
3557
  jobId?: undefined;
3361
3558
  reviewBatchLimit?: undefined;
3362
- sourceRowIds?: undefined;
3363
- sourceRowLimit?: undefined;
3364
3559
  allowPartialSourceList?: undefined;
3365
3560
  includeRawImportResult?: undefined;
3366
3561
  selections?: undefined;
@@ -3468,8 +3663,6 @@ export declare const allTools: ({
3468
3663
  keepInSync?: undefined;
3469
3664
  jobId?: undefined;
3470
3665
  reviewBatchLimit?: undefined;
3471
- sourceRowIds?: undefined;
3472
- sourceRowLimit?: undefined;
3473
3666
  allowPartialSourceList?: undefined;
3474
3667
  includeRawImportResult?: undefined;
3475
3668
  selections?: undefined;
@@ -3586,8 +3779,6 @@ export declare const allTools: ({
3586
3779
  keepInSync?: undefined;
3587
3780
  jobId?: undefined;
3588
3781
  reviewBatchLimit?: undefined;
3589
- sourceRowIds?: undefined;
3590
- sourceRowLimit?: undefined;
3591
3782
  allowPartialSourceList?: undefined;
3592
3783
  includeRawImportResult?: undefined;
3593
3784
  selections?: undefined;
@@ -3693,8 +3884,6 @@ export declare const allTools: ({
3693
3884
  keepInSync?: undefined;
3694
3885
  jobId?: undefined;
3695
3886
  reviewBatchLimit?: undefined;
3696
- sourceRowIds?: undefined;
3697
- sourceRowLimit?: undefined;
3698
3887
  allowPartialSourceList?: undefined;
3699
3888
  includeRawImportResult?: undefined;
3700
3889
  selections?: undefined;
@@ -3805,8 +3994,6 @@ export declare const allTools: ({
3805
3994
  keepInSync?: undefined;
3806
3995
  jobId?: undefined;
3807
3996
  reviewBatchLimit?: undefined;
3808
- sourceRowIds?: undefined;
3809
- sourceRowLimit?: undefined;
3810
3997
  allowPartialSourceList?: undefined;
3811
3998
  includeRawImportResult?: undefined;
3812
3999
  selections?: undefined;
@@ -3905,8 +4092,6 @@ export declare const allTools: ({
3905
4092
  keepInSync?: undefined;
3906
4093
  jobId?: undefined;
3907
4094
  reviewBatchLimit?: undefined;
3908
- sourceRowIds?: undefined;
3909
- sourceRowLimit?: undefined;
3910
4095
  allowPartialSourceList?: undefined;
3911
4096
  includeRawImportResult?: undefined;
3912
4097
  selections?: undefined;
@@ -4797,8 +4982,6 @@ export declare const allTools: ({
4797
4982
  keepInSync?: undefined;
4798
4983
  jobId?: undefined;
4799
4984
  reviewBatchLimit?: undefined;
4800
- sourceRowIds?: undefined;
4801
- sourceRowLimit?: undefined;
4802
4985
  allowPartialSourceList?: undefined;
4803
4986
  includeRawImportResult?: undefined;
4804
4987
  selections?: undefined;
@@ -4906,8 +5089,6 @@ export declare const allTools: ({
4906
5089
  keepInSync?: undefined;
4907
5090
  jobId?: undefined;
4908
5091
  reviewBatchLimit?: undefined;
4909
- sourceRowIds?: undefined;
4910
- sourceRowLimit?: undefined;
4911
5092
  allowPartialSourceList?: undefined;
4912
5093
  includeRawImportResult?: undefined;
4913
5094
  selections?: undefined;
@@ -5953,8 +6134,6 @@ export declare const allTools: ({
5953
6134
  keepInSync?: undefined;
5954
6135
  jobId?: undefined;
5955
6136
  reviewBatchLimit?: undefined;
5956
- sourceRowIds?: undefined;
5957
- sourceRowLimit?: undefined;
5958
6137
  allowPartialSourceList?: undefined;
5959
6138
  includeRawImportResult?: undefined;
5960
6139
  selections?: undefined;
@@ -6109,8 +6288,6 @@ export declare const allTools: ({
6109
6288
  keepInSync?: undefined;
6110
6289
  jobId?: undefined;
6111
6290
  reviewBatchLimit?: undefined;
6112
- sourceRowIds?: undefined;
6113
- sourceRowLimit?: undefined;
6114
6291
  allowPartialSourceList?: undefined;
6115
6292
  includeRawImportResult?: undefined;
6116
6293
  selections?: undefined;
@@ -6252,8 +6429,6 @@ export declare const allTools: ({
6252
6429
  keepInSync?: undefined;
6253
6430
  jobId?: undefined;
6254
6431
  reviewBatchLimit?: undefined;
6255
- sourceRowIds?: undefined;
6256
- sourceRowLimit?: undefined;
6257
6432
  allowPartialSourceList?: undefined;
6258
6433
  includeRawImportResult?: undefined;
6259
6434
  selections?: undefined;
@@ -6350,8 +6525,6 @@ export declare const allTools: ({
6350
6525
  keepInSync?: undefined;
6351
6526
  jobId?: undefined;
6352
6527
  reviewBatchLimit?: undefined;
6353
- sourceRowIds?: undefined;
6354
- sourceRowLimit?: undefined;
6355
6528
  allowPartialSourceList?: undefined;
6356
6529
  includeRawImportResult?: undefined;
6357
6530
  selections?: undefined;
@@ -6398,17 +6571,6 @@ export declare const allTools: ({
6398
6571
  type: string;
6399
6572
  description: string;
6400
6573
  };
6401
- sourceRowIds: {
6402
- type: string;
6403
- items: {
6404
- type: string;
6405
- };
6406
- description: string;
6407
- };
6408
- sourceRowLimit: {
6409
- type: string;
6410
- description: string;
6411
- };
6412
6574
  allowPartialSourceList: {
6413
6575
  type: string;
6414
6576
  description: string;
@@ -6618,8 +6780,6 @@ export declare const allTools: ({
6618
6780
  keepInSync?: undefined;
6619
6781
  jobId?: undefined;
6620
6782
  reviewBatchLimit?: undefined;
6621
- sourceRowIds?: undefined;
6622
- sourceRowLimit?: undefined;
6623
6783
  allowPartialSourceList?: undefined;
6624
6784
  includeRawImportResult?: undefined;
6625
6785
  };
@@ -6717,8 +6877,6 @@ export declare const allTools: ({
6717
6877
  keepInSync?: undefined;
6718
6878
  jobId?: undefined;
6719
6879
  reviewBatchLimit?: undefined;
6720
- sourceRowIds?: undefined;
6721
- sourceRowLimit?: undefined;
6722
6880
  allowPartialSourceList?: undefined;
6723
6881
  includeRawImportResult?: undefined;
6724
6882
  selections?: undefined;
@@ -10,6 +10,7 @@ type GetSchedulerFillCapacityInput = {
10
10
  capacityRequests: SchedulerFillCapacityRequest[];
11
11
  targetDate?: string;
12
12
  mode?: SchedulerFillCapacityMode;
13
+ workspaceId?: string;
13
14
  };
14
15
  export declare const schedulerFillCapacityToolDefinitions: {
15
16
  name: string;
@@ -56,6 +57,10 @@ export declare const schedulerFillCapacityToolDefinitions: {
56
57
  enum: string[];
57
58
  description: string;
58
59
  };
60
+ workspaceId: {
61
+ type: string;
62
+ description: string;
63
+ };
59
64
  };
60
65
  required: string[];
61
66
  additionalProperties: boolean;
@@ -1,7 +1,11 @@
1
1
  import { getApi } from "../api.js";
2
- async function postSchedulerFillCapacity(body) {
2
+ import { normalizeExplicitWorkspaceId, workspaceRequestOptions, } from "./workspace-context.js";
3
+ async function postSchedulerFillCapacity(body, workspaceId) {
3
4
  const api = getApi();
4
- return api.post("/api/v3/mcp/scheduler-fill-capacity", body);
5
+ const requestOptions = workspaceRequestOptions(workspaceId);
6
+ return requestOptions
7
+ ? api.post("/api/v3/mcp/scheduler-fill-capacity", body, requestOptions)
8
+ : api.post("/api/v3/mcp/scheduler-fill-capacity", body);
5
9
  }
6
10
  export const schedulerFillCapacityToolDefinitions = [
7
11
  {
@@ -55,6 +59,10 @@ export const schedulerFillCapacityToolDefinitions = [
55
59
  enum: ["default_horizon", "target_date"],
56
60
  description: "Optional mode hint. Omit for default_horizon; target_date requires targetDate.",
57
61
  },
62
+ workspaceId: {
63
+ type: "string",
64
+ description: "Explicit request-scoped workspace id for scheduled/yolo refill automation. Pass this instead of switching the shared active workspace.",
65
+ },
58
66
  },
59
67
  required: ["capacityRequests"],
60
68
  additionalProperties: false,
@@ -62,9 +70,11 @@ export const schedulerFillCapacityToolDefinitions = [
62
70
  },
63
71
  ];
64
72
  export function getSchedulerFillCapacity(input) {
73
+ const workspaceId = normalizeExplicitWorkspaceId(input.workspaceId);
65
74
  return postSchedulerFillCapacity({
66
75
  capacityRequests: input.capacityRequests,
67
76
  targetDate: input.targetDate,
68
77
  mode: input.mode,
69
- });
78
+ ...(workspaceId ? { workspaceId } : {}),
79
+ }, workspaceId ?? undefined);
70
80
  }