@sellable/mcp 0.1.191 → 0.1.192

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/README.md CHANGED
@@ -435,7 +435,7 @@ Sellable writing workflows.
435
435
 
436
436
  ### "Sellable not configured" Error
437
437
 
438
- Create `~/.sellable/config.json` with your token. Get one at https://app.sellable.dev/settings?tab=integrations.
438
+ Create `~/.sellable/config.json` with your token. Get one at https://app.sellable.dev/settings/integrations.
439
439
 
440
440
  ### Token Not Working
441
441
 
@@ -37,13 +37,14 @@ the branch input.
37
37
 
38
38
  ## Required First Steps
39
39
 
40
- 1. Load the full long-form generate-messages prompt:
40
+ 1. Load the compact normal-path message prompt:
41
41
 
42
- `get_subskill_prompt({ subskillName: "generate-messages", offset, limit })`
43
- until `hasMore` is false.
42
+ `get_subskill_prompt({ subskillName: "generate-messages-compact" })`
44
43
 
45
- 2. Use that prompt as the drafting contract. Do not use create-campaign
46
- safety/checklist instructions as a substitute for the full prompt.
44
+ 2. Use that prompt as the drafting contract. Load
45
+ `generate-messages-compact/references/examples-critique-revision.md` only for
46
+ critique, revision, or close-call examples. Do not use create-campaign
47
+ safety/checklist instructions as a substitute for the message prompt.
47
48
  3. Draft only from the campaign brief, selected source context, and initial
48
49
  campaign-table execution slice rows supplied by the parent.
49
50
  4. Keep the work provisional until the user chooses `Use Template` in Messages.
@@ -56,7 +57,7 @@ Return the following to the parent thread:
56
57
  - token fill rules and fallbacks
57
58
  - one rendered good-fill sample for a plausible passing campaign-table row
58
59
  - one omit/fallback sample when the row signal is not safe
59
- - pass/fail notes against the generate-messages quality gates
60
+ - pass/fail notes against the generate-messages-compact quality gates
60
61
  - compact runtime status: `ready`, `blocked`, `retry-needed`, or `stale`
61
62
  - basis token containing campaign revision/updatedAt, brief hash,
62
63
  `selectedLeadListId`, `workflowTableId`, execution-slice row ids/hash, filter
@@ -136,7 +137,7 @@ enablement`, or omit it.
136
137
 
137
138
  Return a concise status with:
138
139
 
139
- - prompt basis loaded: `generate-messages`
140
+ - prompt basis loaded: `generate-messages-compact`
140
141
  - live campaign basis used
141
142
  - proposed template
142
143
  - token fill rules/fallbacks
@@ -197,7 +197,7 @@
197
197
  "kind": "post-find-leads-scout",
198
198
  "promptFile": "post-find-leads-message-scout.md",
199
199
  "displayName": "Message Draft Builder",
200
- "target": "generate-messages",
200
+ "target": "generate-messages-compact",
201
201
  "inputs": [
202
202
  "campaignId",
203
203
  "campaignBrief",
@@ -225,7 +225,7 @@
225
225
  ]
226
226
  },
227
227
  "claude": {
228
- "description": "Use proactively as Message Draft Builder after confirm_lead_list imports a non-empty bounded review batch; load the full generate-messages prompt and draft only from scoped campaign/tool state.",
228
+ "description": "Use proactively as Message Draft Builder after confirm_lead_list imports a non-empty bounded review batch; load generate-messages-compact and draft only from scoped campaign/tool state.",
229
229
  "model": "inherit",
230
230
  "background": true,
231
231
  "maxTurns": 10,
package/dist/auth.js CHANGED
@@ -72,7 +72,7 @@ export function getConfig() {
72
72
  "}\n\n" +
73
73
  "Config path resolution order:\n" +
74
74
  `${renderConfigPathOrder(configPathCandidates)}\n\n` +
75
- "Get your token at: https://app.sellable.dev/settings?tab=integrations\n" +
75
+ "Get your token at: https://app.sellable.dev/settings/integrations\n" +
76
76
  "Then run list_workspaces + set_active_workspace to select a workspace.");
77
77
  }
78
78
  try {
package/dist/index-dev.js CHANGED
File without changes
package/dist/index.js CHANGED
File without changes
package/dist/server.js CHANGED
@@ -6,6 +6,7 @@ import { getAuthStatus } from "./tools/auth.js";
6
6
  import { handleAddColumn, handleCommitBlueprint, } from "./tools/blueprint-commit.js";
7
7
  import { bootstrapCreateCampaign } from "./tools/bootstrap.js";
8
8
  import { createCampaign, getCampaign, getCampaignMessagesPreview, getCampaigns, pauseCampaign, startCampaign, updateCampaign, updateCampaignBrief, } from "./tools/campaigns.js";
9
+ import { getCampaignTableSchema, queueCampaignCells, reviseMessageTemplateAndRerun, selectCampaignCells, waitForCampaignProcessing, } from "./tools/campaign-processing.js";
9
10
  import { queueCells, updateCell } from "./tools/cells.js";
10
11
  import { handleStartCliLogin, handleWaitForCliLogin, } from "./tools/cli-login.js";
11
12
  import { getCampaignContext, hydrateCampaignContextFromCampaign, markCampaignContextDirty, } from "./tools/context.js";
@@ -160,6 +161,27 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
160
161
  case "get_campaign_messages_preview":
161
162
  result = await getCampaignMessagesPreview(args);
162
163
  break;
164
+ case "get_campaign_table_schema":
165
+ result = await getCampaignTableSchema(args);
166
+ break;
167
+ case "select_campaign_cells":
168
+ result = await selectCampaignCells(args);
169
+ break;
170
+ case "queue_campaign_cells":
171
+ result = await queueCampaignCells(args);
172
+ if (args?.campaignId) {
173
+ markCampaignContextDirty(args.campaignId, "queue_campaign_cells");
174
+ }
175
+ break;
176
+ case "wait_for_campaign_processing":
177
+ result = await waitForCampaignProcessing(args);
178
+ break;
179
+ case "revise_message_template_and_rerun":
180
+ result = await reviseMessageTemplateAndRerun(args);
181
+ if (args?.campaignId) {
182
+ markCampaignContextDirty(args.campaignId, "revise_message_template_and_rerun");
183
+ }
184
+ break;
163
185
  case "create_campaign":
164
186
  result = await createCampaign(args);
165
187
  if (result?.id)
@@ -0,0 +1,383 @@
1
+ type ColumnRole = "enrich" | "passesRubric" | "icpScore" | "generateMessage" | "approved";
2
+ type RowSelector = {
3
+ type: "reviewBatch";
4
+ basisHash?: string;
5
+ } | {
6
+ type: "rowIds";
7
+ rowIds: string[];
8
+ } | {
9
+ type: "passedRows";
10
+ limit?: number;
11
+ } | {
12
+ type: "needsGeneratedMessage";
13
+ limit?: number;
14
+ } | {
15
+ type: "staleGeneratedMessages";
16
+ limit?: number;
17
+ };
18
+ type SchemaInput = {
19
+ campaignId?: string;
20
+ tableId?: string;
21
+ };
22
+ type SelectInput = SchemaInput & {
23
+ columnRole: ColumnRole;
24
+ rowSelector: RowSelector;
25
+ limit?: number;
26
+ };
27
+ type QueueInput = SelectInput & {
28
+ forceRerun?: boolean;
29
+ reason?: string;
30
+ };
31
+ type WaitInput = SchemaInput & {
32
+ minPassedCount?: number;
33
+ minGeneratedMessages?: number;
34
+ templateRevision?: "current" | string;
35
+ timeoutMs?: number;
36
+ intervalMs?: number;
37
+ };
38
+ type ReviseTemplateInput = SchemaInput & {
39
+ campaignId: string;
40
+ templateMarkdown?: string;
41
+ approvedMessageTemplate?: string;
42
+ rowSelector?: RowSelector;
43
+ limit?: number;
44
+ };
45
+ type CampaignProcessingSchemaResponse = {
46
+ campaignId: string | null;
47
+ tableId: string;
48
+ rowCount: number;
49
+ currentApprovedBriefHash: string | null;
50
+ reviewBatch?: {
51
+ rowIds?: string[];
52
+ rowCount?: number;
53
+ basisHash?: string;
54
+ };
55
+ warnings?: string[];
56
+ };
57
+ type WorkflowTableStats = {
58
+ tableId: string;
59
+ totalRows: number;
60
+ messagesCount?: number;
61
+ generatedMessagesCount?: number;
62
+ currentRevisionGeneratedMessagesCount?: number;
63
+ staleGeneratedMessagesCount?: number;
64
+ generatedWithoutPassCount?: number;
65
+ currentTemplateRevisionHash?: string | null;
66
+ processingCount?: number;
67
+ queuedCount?: number;
68
+ cancellableCount?: number;
69
+ failedCount?: number;
70
+ needsApprovalCount?: number;
71
+ passRate?: {
72
+ completed: number;
73
+ passed: number;
74
+ pending?: number;
75
+ };
76
+ };
77
+ export declare const campaignProcessingToolDefinitions: ({
78
+ name: string;
79
+ description: string;
80
+ inputSchema: {
81
+ type: string;
82
+ properties: {
83
+ campaignId: {
84
+ type: string;
85
+ };
86
+ tableId: {
87
+ type: string;
88
+ };
89
+ columnRole?: undefined;
90
+ rowSelector?: undefined;
91
+ limit?: undefined;
92
+ forceRerun?: undefined;
93
+ reason?: undefined;
94
+ minPassedCount?: undefined;
95
+ minGeneratedMessages?: undefined;
96
+ templateRevision?: undefined;
97
+ timeoutMs?: undefined;
98
+ intervalMs?: undefined;
99
+ templateMarkdown?: undefined;
100
+ approvedMessageTemplate?: undefined;
101
+ };
102
+ additionalProperties: boolean;
103
+ required?: undefined;
104
+ };
105
+ } | {
106
+ name: string;
107
+ description: string;
108
+ inputSchema: {
109
+ type: string;
110
+ properties: {
111
+ campaignId: {
112
+ type: string;
113
+ };
114
+ tableId: {
115
+ type: string;
116
+ };
117
+ columnRole: {
118
+ type: string;
119
+ enum: string[];
120
+ };
121
+ rowSelector: {
122
+ type: string;
123
+ properties: {
124
+ type: {
125
+ type: string;
126
+ enum: string[];
127
+ };
128
+ basisHash: {
129
+ type: string;
130
+ };
131
+ rowIds: {
132
+ type: string;
133
+ items: {
134
+ type: string;
135
+ };
136
+ };
137
+ limit: {
138
+ type: string;
139
+ };
140
+ };
141
+ required: string[];
142
+ additionalProperties: boolean;
143
+ };
144
+ limit: {
145
+ type: string;
146
+ };
147
+ forceRerun?: undefined;
148
+ reason?: undefined;
149
+ minPassedCount?: undefined;
150
+ minGeneratedMessages?: undefined;
151
+ templateRevision?: undefined;
152
+ timeoutMs?: undefined;
153
+ intervalMs?: undefined;
154
+ templateMarkdown?: undefined;
155
+ approvedMessageTemplate?: undefined;
156
+ };
157
+ required: string[];
158
+ additionalProperties: boolean;
159
+ };
160
+ } | {
161
+ name: string;
162
+ description: string;
163
+ inputSchema: {
164
+ type: string;
165
+ properties: {
166
+ campaignId: {
167
+ type: string;
168
+ };
169
+ tableId: {
170
+ type: string;
171
+ };
172
+ columnRole: {
173
+ type: string;
174
+ enum: string[];
175
+ };
176
+ rowSelector: {
177
+ type: string;
178
+ properties: {
179
+ type: {
180
+ type: string;
181
+ enum: string[];
182
+ };
183
+ basisHash: {
184
+ type: string;
185
+ };
186
+ rowIds: {
187
+ type: string;
188
+ items: {
189
+ type: string;
190
+ };
191
+ };
192
+ limit: {
193
+ type: string;
194
+ };
195
+ };
196
+ required: string[];
197
+ additionalProperties: boolean;
198
+ };
199
+ forceRerun: {
200
+ type: string;
201
+ };
202
+ limit: {
203
+ type: string;
204
+ };
205
+ reason: {
206
+ type: string;
207
+ };
208
+ minPassedCount?: undefined;
209
+ minGeneratedMessages?: undefined;
210
+ templateRevision?: undefined;
211
+ timeoutMs?: undefined;
212
+ intervalMs?: undefined;
213
+ templateMarkdown?: undefined;
214
+ approvedMessageTemplate?: undefined;
215
+ };
216
+ required: string[];
217
+ additionalProperties: boolean;
218
+ };
219
+ } | {
220
+ name: string;
221
+ description: string;
222
+ inputSchema: {
223
+ type: string;
224
+ properties: {
225
+ campaignId: {
226
+ type: string;
227
+ };
228
+ tableId: {
229
+ type: string;
230
+ };
231
+ minPassedCount: {
232
+ type: string;
233
+ };
234
+ minGeneratedMessages: {
235
+ type: string;
236
+ };
237
+ templateRevision: {
238
+ type: string;
239
+ description: string;
240
+ };
241
+ timeoutMs: {
242
+ type: string;
243
+ };
244
+ intervalMs: {
245
+ type: string;
246
+ };
247
+ columnRole?: undefined;
248
+ rowSelector?: undefined;
249
+ limit?: undefined;
250
+ forceRerun?: undefined;
251
+ reason?: undefined;
252
+ templateMarkdown?: undefined;
253
+ approvedMessageTemplate?: undefined;
254
+ };
255
+ additionalProperties: boolean;
256
+ required?: undefined;
257
+ };
258
+ } | {
259
+ name: string;
260
+ description: string;
261
+ inputSchema: {
262
+ type: string;
263
+ properties: {
264
+ campaignId: {
265
+ type: string;
266
+ };
267
+ tableId: {
268
+ type: string;
269
+ };
270
+ templateMarkdown: {
271
+ type: string;
272
+ };
273
+ approvedMessageTemplate: {
274
+ type: string;
275
+ };
276
+ rowSelector: {
277
+ type: string;
278
+ properties: {
279
+ type: {
280
+ type: string;
281
+ enum: string[];
282
+ };
283
+ rowIds: {
284
+ type: string;
285
+ items: {
286
+ type: string;
287
+ };
288
+ };
289
+ limit: {
290
+ type: string;
291
+ };
292
+ basisHash?: undefined;
293
+ };
294
+ required: string[];
295
+ additionalProperties: boolean;
296
+ };
297
+ limit: {
298
+ type: string;
299
+ };
300
+ columnRole?: undefined;
301
+ forceRerun?: undefined;
302
+ reason?: undefined;
303
+ minPassedCount?: undefined;
304
+ minGeneratedMessages?: undefined;
305
+ templateRevision?: undefined;
306
+ timeoutMs?: undefined;
307
+ intervalMs?: undefined;
308
+ };
309
+ required: string[];
310
+ additionalProperties: boolean;
311
+ };
312
+ })[];
313
+ export declare function getCampaignTableSchema(input: SchemaInput): Promise<CampaignProcessingSchemaResponse>;
314
+ export declare function selectCampaignCells(input: SelectInput): Promise<unknown>;
315
+ export declare function queueCampaignCells(input: QueueInput): Promise<unknown>;
316
+ export declare function reviseMessageTemplateAndRerun(input: ReviseTemplateInput): Promise<unknown>;
317
+ export declare function waitForCampaignProcessing(input: WaitInput): Promise<{
318
+ ready: boolean;
319
+ reason: string;
320
+ attempts: number;
321
+ elapsedMs: number;
322
+ tableId: string;
323
+ pollKey: string;
324
+ requestedTemplateRevision: string;
325
+ currentTemplateRevisionHash: string;
326
+ guidance: string;
327
+ stats: WorkflowTableStats;
328
+ floors?: undefined;
329
+ result?: undefined;
330
+ warning?: undefined;
331
+ partialResult?: undefined;
332
+ } | {
333
+ ready: boolean;
334
+ attempts: number;
335
+ elapsedMs: number;
336
+ tableId: string;
337
+ pollKey: string;
338
+ floors: {
339
+ minPassedCount: number | null;
340
+ minGeneratedMessages: number | null;
341
+ templateRevision: string | null;
342
+ };
343
+ result: {
344
+ passedCount: number;
345
+ generatedMessagesCount: number;
346
+ currentRevisionGeneratedMessagesCount: number;
347
+ staleGeneratedMessagesCount: number;
348
+ generatedWithoutPassCount: number;
349
+ currentTemplateRevisionHash: string | null;
350
+ };
351
+ stats: WorkflowTableStats;
352
+ reason?: undefined;
353
+ requestedTemplateRevision?: undefined;
354
+ currentTemplateRevisionHash?: undefined;
355
+ guidance?: undefined;
356
+ warning?: undefined;
357
+ partialResult?: undefined;
358
+ } | {
359
+ ready: boolean;
360
+ reason: string;
361
+ attempts: number;
362
+ elapsedMs: number;
363
+ tableId: string;
364
+ pollKey: string;
365
+ warning: string | undefined;
366
+ partialResult: {
367
+ passedCount: number;
368
+ generatedMessagesCount: number;
369
+ currentRevisionGeneratedMessagesCount: number;
370
+ staleGeneratedMessagesCount: number;
371
+ generatedWithoutPassCount: number;
372
+ currentTemplateRevisionHash: string | null;
373
+ passFloorMet: boolean;
374
+ generatedFloorMet: boolean;
375
+ };
376
+ guidance: string;
377
+ stats: WorkflowTableStats | null;
378
+ requestedTemplateRevision?: undefined;
379
+ currentTemplateRevisionHash?: undefined;
380
+ floors?: undefined;
381
+ result?: undefined;
382
+ }>;
383
+ export {};