@sellable/mcp 0.1.515 → 0.1.516
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.
|
@@ -29,6 +29,7 @@ type StartPrepareMessagesInput = PrepareMessagesBaseInput & {
|
|
|
29
29
|
maxBatchRows?: number;
|
|
30
30
|
approvalMode?: ApprovalMode;
|
|
31
31
|
rowSelector?: RowSelector;
|
|
32
|
+
excludeRowIds?: string[];
|
|
32
33
|
autoContinue?: boolean;
|
|
33
34
|
disableLowPassRateStop?: boolean;
|
|
34
35
|
requestHash?: string;
|
|
@@ -96,6 +97,14 @@ export declare const campaignMessagePreparationToolDefinitions: ({
|
|
|
96
97
|
required: string[];
|
|
97
98
|
additionalProperties: boolean;
|
|
98
99
|
};
|
|
100
|
+
excludeRowIds: {
|
|
101
|
+
type: string;
|
|
102
|
+
items: {
|
|
103
|
+
type: string;
|
|
104
|
+
};
|
|
105
|
+
maxItems: number;
|
|
106
|
+
description: string;
|
|
107
|
+
};
|
|
99
108
|
autoContinue: {
|
|
100
109
|
type: string;
|
|
101
110
|
};
|
|
@@ -147,6 +156,7 @@ export declare const campaignMessagePreparationToolDefinitions: ({
|
|
|
147
156
|
maxBatchRows?: undefined;
|
|
148
157
|
approvalMode?: undefined;
|
|
149
158
|
rowSelector?: undefined;
|
|
159
|
+
excludeRowIds?: undefined;
|
|
150
160
|
autoContinue?: undefined;
|
|
151
161
|
senderId?: undefined;
|
|
152
162
|
actionType?: undefined;
|
|
@@ -62,6 +62,12 @@ export const campaignMessagePreparationToolDefinitions = [
|
|
|
62
62
|
required: ["type"],
|
|
63
63
|
additionalProperties: false,
|
|
64
64
|
},
|
|
65
|
+
excludeRowIds: {
|
|
66
|
+
type: "array",
|
|
67
|
+
items: { type: "string" },
|
|
68
|
+
maxItems: 5000,
|
|
69
|
+
description: "Optional row IDs to skip when retrying after a prior bounded prep cohort failed.",
|
|
70
|
+
},
|
|
65
71
|
autoContinue: { type: "boolean" },
|
|
66
72
|
senderId: {
|
|
67
73
|
type: "string",
|
|
@@ -132,6 +138,7 @@ export function startPrepareCampaignMessages(input) {
|
|
|
132
138
|
maxBatchRows: input.maxBatchRows,
|
|
133
139
|
approvalMode: input.approvalMode,
|
|
134
140
|
rowSelector: input.rowSelector,
|
|
141
|
+
excludeRowIds: input.excludeRowIds,
|
|
135
142
|
autoContinue: input.autoContinue,
|
|
136
143
|
disableLowPassRateStop: input.disableLowPassRateStop,
|
|
137
144
|
requestHash: input.requestHash,
|
|
@@ -602,6 +602,7 @@ export async function executeRerunErroredCellsPrimitive(params) {
|
|
|
602
602
|
tableId,
|
|
603
603
|
columnRole: operation.columnRole,
|
|
604
604
|
rowSelector: operation.rowSelector,
|
|
605
|
+
forceRerun: true,
|
|
605
606
|
};
|
|
606
607
|
const result = requestOptions
|
|
607
608
|
? await api.post("/api/v3/mcp/campaign-processing", body, requestOptions)
|
|
@@ -633,6 +634,7 @@ export async function executeOneYoloPrimitive(action, workspaceId) {
|
|
|
633
634
|
const tableId = actionTableId(action) ?? undefined;
|
|
634
635
|
const toolInput = actionToolInput(action);
|
|
635
636
|
const targetPreparedMessages = numberValue(toolInput.targetPreparedMessages);
|
|
637
|
+
const excludeRowIds = uniqueStrings(stringArray(toolInput.excludeRowIds)).slice(0, 5000);
|
|
636
638
|
const rowSelector = prepareRowSelectorValue(toolInput.rowSelector);
|
|
637
639
|
const approvalMode = toolInput.approvalMode === "approve" ? "approve" : "mark_ready";
|
|
638
640
|
if (!campaignId ||
|
|
@@ -651,6 +653,7 @@ export async function executeOneYoloPrimitive(action, workspaceId) {
|
|
|
651
653
|
maxRowsToCheck: numberValue(toolInput.maxRowsToCheck) ?? 300,
|
|
652
654
|
approvalMode,
|
|
653
655
|
rowSelector,
|
|
656
|
+
...(excludeRowIds.length > 0 ? { excludeRowIds } : {}),
|
|
654
657
|
autoContinue: true,
|
|
655
658
|
disableLowPassRateStop: true,
|
|
656
659
|
senderId: actionSenderId(action) ?? undefined,
|
|
@@ -9,6 +9,7 @@ const SAFE_PACKET_ACTION_TYPES = new Set([
|
|
|
9
9
|
"prepare_messages",
|
|
10
10
|
"approve_messages",
|
|
11
11
|
"start_paused_campaign",
|
|
12
|
+
"rerun_errored_cells",
|
|
12
13
|
"wait_for_scheduler",
|
|
13
14
|
"wait_for_active_work",
|
|
14
15
|
"wait_for_source_import",
|
|
@@ -216,6 +217,33 @@ function sanitizeRowSelector(value) {
|
|
|
216
217
|
: {}),
|
|
217
218
|
};
|
|
218
219
|
}
|
|
220
|
+
function sanitizeRerunErroredCellsOperations(value) {
|
|
221
|
+
if (!Array.isArray(value))
|
|
222
|
+
return [];
|
|
223
|
+
return value.flatMap((raw) => {
|
|
224
|
+
if (!isRecord(raw))
|
|
225
|
+
return [];
|
|
226
|
+
const columnRole = stringValue(raw.columnRole);
|
|
227
|
+
if (columnRole !== "icpScore" && columnRole !== "generateMessage") {
|
|
228
|
+
return [];
|
|
229
|
+
}
|
|
230
|
+
const rowSelector = sanitizeRowSelector(raw.rowSelector);
|
|
231
|
+
if (rowSelector?.type !== "rowIds")
|
|
232
|
+
return [];
|
|
233
|
+
const rowIds = Array.isArray(rowSelector.rowIds)
|
|
234
|
+
? stringArray(rowSelector.rowIds)
|
|
235
|
+
: [];
|
|
236
|
+
if (rowIds.length === 0)
|
|
237
|
+
return [];
|
|
238
|
+
return [
|
|
239
|
+
{
|
|
240
|
+
columnRole,
|
|
241
|
+
rowSelector: { type: "rowIds", rowIds },
|
|
242
|
+
cellIds: stringArray(raw.cellIds),
|
|
243
|
+
},
|
|
244
|
+
];
|
|
245
|
+
});
|
|
246
|
+
}
|
|
219
247
|
function sanitizeToolInput(value) {
|
|
220
248
|
if (!isRecord(value))
|
|
221
249
|
return {};
|
|
@@ -256,6 +284,7 @@ function sanitizeToolInput(value) {
|
|
|
256
284
|
? value.availableCredits
|
|
257
285
|
: undefined,
|
|
258
286
|
threshold: typeof value.threshold === "number" ? value.threshold : undefined,
|
|
287
|
+
operations: sanitizeRerunErroredCellsOperations(value.operations),
|
|
259
288
|
};
|
|
260
289
|
}
|
|
261
290
|
function sanitizePacketIds(value) {
|
package/dist/tools/registry.d.ts
CHANGED