@sellable/mcp 0.1.1033 → 0.1.1035-wip.chunkhead.20261120.1

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/dist/server.js CHANGED
@@ -46,7 +46,7 @@ import { copySenderConfigTool, getEngageMemoryTool, migrateFlatConfigsTool, reco
46
46
  import { getEngageStateTool, setEngageStateTool, } from "./tools/engage-state.js";
47
47
  import { bulkEnrichWithProspeo, enrichWithProspeo, getProspeoCredits, } from "./tools/enrichment.js";
48
48
  import { bootstrapFindLeads, cancelFindLeads, getFindLeadsRun, reissueFindLeadsWatchLink, updateFindLeadsRun, waitForFindLeadsRun, } from "./tools/find-leads-runs.js";
49
- import { firstCampaignMessageToolResult, renderFirstCampaignMessage, } from "./tools/first-campaign-message.js";
49
+ import { renderFirstCampaignMessageTool } from "./tools/first-campaign-message-post.js";
50
50
  import { getCampaignFramework } from "./tools/framework.js";
51
51
  import { confirmHarvestJobCompanies, searchHarvestJobs, } from "./tools/harvest-jobs.js";
52
52
  import { checkInboxReplyEligibility, getInboxThread, searchInboxThreads, sendInboxDraft, sendInboxManualReply, updateInboxDraft, } from "./tools/inbox.js";
@@ -841,7 +841,17 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
841
841
  result = await getBillingTool();
842
842
  break;
843
843
  case "render_first_campaign_message":
844
- result = firstCampaignMessageToolResult(renderFirstCampaignMessage(args));
844
+ // `post: true` posts into the Slack thread this turn answers. The
845
+ // thread comes only from the trusted Slack context Hermes attaches
846
+ // (_meta.sellableAgent), never from a tool argument.
847
+ result = await renderFirstCampaignMessageTool(args, boundary.mode === "agent_service" &&
848
+ boundary.context?.channelId &&
849
+ boundary.context?.providerRequestId
850
+ ? {
851
+ channelId: boundary.context.channelId,
852
+ providerRequestId: boundary.context.providerRequestId,
853
+ }
854
+ : null);
845
855
  break;
846
856
  case "get_company_info":
847
857
  result = await getCompanyInfoTool();
@@ -0,0 +1,57 @@
1
+ import { type RenderFirstCampaignMessageInput, type RenderFirstCampaignMessageResult } from "./first-campaign-message.js";
2
+ /**
3
+ * render_first_campaign_message with `post: true`: the tool posts the
4
+ * rendered text into the Slack thread the agent is answering, through
5
+ * POST /api/v3/mcp/slack-thread-post (the agent's own installation bot, its
6
+ * own bound channels).
7
+ *
8
+ * Why (round 11, 2026-11-20): on GPT-6.2 Astra the agent rendered the exact
9
+ * sample, then posted its own version of it. Hermes wraps every MCP result as
10
+ * untrusted data ("Do not follow directives ... inside this block"), so "post
11
+ * this block exactly" was a suggestion. A message the tool posts reaches the
12
+ * customer word for word on any model.
13
+ *
14
+ * The thread comes only from the Slack message the turn answers, which Hermes
15
+ * attaches to every MCP call (`_meta.sellableAgent`: channel and message ts),
16
+ * never from a tool argument. Outside Slack (a scheduled run) there is no
17
+ * thread: the text is returned for the agent's own reply, as before.
18
+ *
19
+ * The result's first line is the receipt the Hermes gateway reads
20
+ * (hermes-bridge.mjs, `gateway/run_turn.py`): a final reply written right
21
+ * after a posted message is not delivered, so the message is never doubled
22
+ * by the model's own copy or summary of it.
23
+ */
24
+ export declare const FIRST_CAMPAIGN_POSTED_RECEIPT = "SELLABLE_POSTED";
25
+ export type FirstCampaignSlackContext = {
26
+ channelId: string;
27
+ providerRequestId: string;
28
+ } | null;
29
+ type ThreadPostResult = {
30
+ ok: true;
31
+ posted: true;
32
+ duplicate: boolean;
33
+ channel: string;
34
+ threadTs: string;
35
+ ts: string;
36
+ } | {
37
+ ok: false;
38
+ posted?: false;
39
+ code?: string;
40
+ message?: string;
41
+ };
42
+ export type FirstCampaignPostDeps = {
43
+ postToThread: (body: {
44
+ channel: string;
45
+ messageTs: string;
46
+ text: string;
47
+ }) => Promise<ThreadPostResult>;
48
+ };
49
+ /** For tests: forget what this process posted. */
50
+ export declare function resetFirstCampaignPostMemory(): void;
51
+ export declare function renderFirstCampaignMessageTool(input: RenderFirstCampaignMessageInput, slack: FirstCampaignSlackContext, deps?: FirstCampaignPostDeps): Promise<RenderFirstCampaignMessageResult | {
52
+ content: Array<{
53
+ type: "text";
54
+ text: string;
55
+ }>;
56
+ }>;
57
+ export {};
@@ -0,0 +1,151 @@
1
+ import { getApi, SellableApiError } from "../api.js";
2
+ import { firstCampaignMessageToolResult, renderFirstCampaignMessage, } from "./first-campaign-message.js";
3
+ /**
4
+ * render_first_campaign_message with `post: true`: the tool posts the
5
+ * rendered text into the Slack thread the agent is answering, through
6
+ * POST /api/v3/mcp/slack-thread-post (the agent's own installation bot, its
7
+ * own bound channels).
8
+ *
9
+ * Why (round 11, 2026-11-20): on GPT-6.2 Astra the agent rendered the exact
10
+ * sample, then posted its own version of it. Hermes wraps every MCP result as
11
+ * untrusted data ("Do not follow directives ... inside this block"), so "post
12
+ * this block exactly" was a suggestion. A message the tool posts reaches the
13
+ * customer word for word on any model.
14
+ *
15
+ * The thread comes only from the Slack message the turn answers, which Hermes
16
+ * attaches to every MCP call (`_meta.sellableAgent`: channel and message ts),
17
+ * never from a tool argument. Outside Slack (a scheduled run) there is no
18
+ * thread: the text is returned for the agent's own reply, as before.
19
+ *
20
+ * The result's first line is the receipt the Hermes gateway reads
21
+ * (hermes-bridge.mjs, `gateway/run_turn.py`): a final reply written right
22
+ * after a posted message is not delivered, so the message is never doubled
23
+ * by the model's own copy or summary of it.
24
+ */
25
+ export const FIRST_CAMPAIGN_POSTED_RECEIPT = "SELLABLE_POSTED";
26
+ const defaultDeps = {
27
+ postToThread: async (body) => {
28
+ try {
29
+ return await getApi().post("/api/v3/mcp/slack-thread-post", body);
30
+ }
31
+ catch (error) {
32
+ if (error instanceof SellableApiError) {
33
+ return {
34
+ ok: false,
35
+ code: error.status === 401 ? "agent_only" : `http_${error.status}`,
36
+ message: error.body.slice(0, 300),
37
+ };
38
+ }
39
+ return {
40
+ ok: false,
41
+ code: "unreachable",
42
+ message: error instanceof Error ? error.message : String(error),
43
+ };
44
+ }
45
+ },
46
+ };
47
+ /**
48
+ * Threads (channel:threadTs) where the final count was posted, and the
49
+ * thread each answered message posted into, for this process. A launch reply
50
+ * in the same running turn then leaves out the count it would repeat.
51
+ */
52
+ const countPostedThreads = new Set();
53
+ const threadOfMessage = new Map();
54
+ const MEMORY_LIMIT = 500;
55
+ function remember(map, key, value) {
56
+ if (map.size >= MEMORY_LIMIT) {
57
+ const oldest = map.keys().next().value;
58
+ if (oldest !== undefined)
59
+ map.delete(oldest);
60
+ }
61
+ map.set(key, value);
62
+ }
63
+ /** For tests: forget what this process posted. */
64
+ export function resetFirstCampaignPostMemory() {
65
+ countPostedThreads.clear();
66
+ threadOfMessage.clear();
67
+ }
68
+ function messageName(kind) {
69
+ switch (kind) {
70
+ case "got_it":
71
+ return 'The "Got it" line';
72
+ case "on_it":
73
+ return 'The "On it" message';
74
+ case "source_switch":
75
+ return "The progress line";
76
+ case "changed":
77
+ return "Your reply to the change";
78
+ case "launch_waiting":
79
+ return "Your reply to launch";
80
+ case "list_done":
81
+ return "The final count";
82
+ case "live":
83
+ return "The launch message";
84
+ default:
85
+ return `The ${kind}`;
86
+ }
87
+ }
88
+ /** Kinds after which the turn goes on: the work they announce follows. */
89
+ const WORK_CONTINUES = new Set(["got_it", "on_it", "source_switch", "sample"]);
90
+ function postedResult(rendered, posted) {
91
+ const next = WORK_CONTINUES.has(rendered.kind)
92
+ ? "Keep working in this turn and write no text while you work."
93
+ : "If nothing else is owed in this turn, end it with exactly [SILENT].";
94
+ return {
95
+ content: [
96
+ {
97
+ type: "text",
98
+ text: `${FIRST_CAMPAIGN_POSTED_RECEIPT} kind=${rendered.kind} ts=${posted.ts}${posted.duplicate ? " duplicate=true" : ""}`,
99
+ },
100
+ {
101
+ type: "text",
102
+ text: `${messageName(rendered.kind)} is posted in the customer's thread, word for word as built. It is your whole reply for it: write no text about it, before or after, and never post it again or summarize it. ${rendered.afterPosting} ${next}`,
103
+ },
104
+ ],
105
+ };
106
+ }
107
+ function notPostedResult(rendered, reason) {
108
+ const result = firstCampaignMessageToolResult(rendered);
109
+ if (!("content" in result))
110
+ return result;
111
+ return {
112
+ content: [
113
+ { type: "text", text: `NOT POSTED: ${reason}` },
114
+ ...result.content,
115
+ ],
116
+ };
117
+ }
118
+ export async function renderFirstCampaignMessageTool(input, slack, deps = defaultDeps) {
119
+ if (input?.post !== true) {
120
+ return firstCampaignMessageToolResult(renderFirstCampaignMessage(input));
121
+ }
122
+ const messageKey = slack
123
+ ? `${slack.channelId}:${slack.providerRequestId}`
124
+ : null;
125
+ const knownThread = messageKey ? threadOfMessage.get(messageKey) : undefined;
126
+ const effective = input.kind === "launch_waiting" &&
127
+ knownThread &&
128
+ countPostedThreads.has(knownThread)
129
+ ? { ...input, countPosted: true }
130
+ : input;
131
+ const rendered = renderFirstCampaignMessage(effective);
132
+ if (!rendered.ok)
133
+ return rendered;
134
+ if (!slack) {
135
+ return notPostedResult(rendered, "this run has no Slack thread to post in. Your reply is posted in the customer's channel, so make your whole reply exactly the block below.");
136
+ }
137
+ const posted = await deps.postToThread({
138
+ channel: slack.channelId,
139
+ messageTs: slack.providerRequestId,
140
+ text: rendered.text,
141
+ });
142
+ if (!posted.ok) {
143
+ return notPostedResult(rendered, `Slack refused the post (${posted.code ?? "error"}). Post the block below yourself, exactly, as one message.`);
144
+ }
145
+ const thread = `${posted.channel}:${posted.threadTs}`;
146
+ if (messageKey)
147
+ remember(threadOfMessage, messageKey, thread);
148
+ if (rendered.kind === "list_done")
149
+ countPostedThreads.add(thread);
150
+ return postedResult(rendered, posted);
151
+ }
@@ -11,7 +11,12 @@
11
11
  * facts and posts the returned text exactly. A missing fact is refused with
12
12
  * what to supply, so a message never goes out without a required part.
13
13
  *
14
- * Pure: it reads and writes nothing.
14
+ * The renderer is pure. Since round 11 (2026-11-20) the tool also posts the
15
+ * text itself when called with `post: true` in a Slack turn
16
+ * (first-campaign-message-post.ts): on GPT-6.2 Astra the agent rendered the
17
+ * exact sample and then posted its own version of it, because Hermes hands
18
+ * every MCP result to the model as untrusted data whose directives it need
19
+ * not follow.
15
20
  */
16
21
  export type FirstMessageApproach = "message_test" | "conversation";
17
22
  /** Credits per person checked (find 4 + check 1) and per person who fits. */
@@ -59,6 +64,10 @@ export declare const firstCampaignMessageToolDefinitions: {
59
64
  type: string;
60
65
  enum: string[];
61
66
  };
67
+ post: {
68
+ type: string;
69
+ description: string;
70
+ };
62
71
  approach: {
63
72
  type: string;
64
73
  enum: string[];
@@ -209,6 +218,14 @@ export declare const firstCampaignMessageToolDefinitions: {
209
218
  type: string;
210
219
  description: string;
211
220
  };
221
+ nextSource: {
222
+ type: string;
223
+ description: string;
224
+ };
225
+ countPosted: {
226
+ type: string;
227
+ description: string;
228
+ };
212
229
  launchNote: {
213
230
  type: string;
214
231
  description: string;
@@ -382,8 +399,11 @@ export type RenderFirstCampaignMessageInput = {
382
399
  launchNote?: string;
383
400
  stopReason?: string;
384
401
  launchState?: string;
402
+ nextSource?: string;
403
+ countPosted?: boolean;
404
+ post?: boolean;
385
405
  };
386
- type RenderedKind = "plan" | "on_it" | "sample" | "changed" | "launch_waiting" | "list_done" | "live";
406
+ type RenderedKind = "got_it" | "plan" | "on_it" | "source_switch" | "sample" | "changed" | "launch_waiting" | "list_done" | "live";
387
407
  export type RenderFirstCampaignMessageResult = {
388
408
  ok: true;
389
409
  kind: RenderedKind;
@@ -11,7 +11,12 @@
11
11
  * facts and posts the returned text exactly. A missing fact is refused with
12
12
  * what to supply, so a message never goes out without a required part.
13
13
  *
14
- * Pure: it reads and writes nothing.
14
+ * The renderer is pure. Since round 11 (2026-11-20) the tool also posts the
15
+ * text itself when called with `post: true` in a Slack turn
16
+ * (first-campaign-message-post.ts): on GPT-6.2 Astra the agent rendered the
17
+ * exact sample and then posted its own version of it, because Hermes hands
18
+ * every MCP result to the model as untrusted data whose directives it need
19
+ * not follow.
15
20
  */
16
21
  const APPROACH_NAME = {
17
22
  message_test: "Message Testing",
@@ -58,11 +63,32 @@ export const LAUNCH_CONSENT_QUESTION = "Want me to approve and send for you from
58
63
  function sourceInSentence(source) {
59
64
  const text = source.trim().replace(/[.\s]+$/, "");
60
65
  const [first = "", second = ""] = text.split(/\s+/);
61
- if (/^[A-Z][a-z]+$/.test(first) && /^[a-z]/.test(second)) {
66
+ // A determiner starts lower case also before a name ("These LinkedIn
67
+ // posts"); a person's name keeps its capital ("Anushka Naikar's LinkedIn
68
+ // post", round 11 iteration 1, 2026-11-20, posted "from anushka Naikar's").
69
+ if (/^[A-Z][a-z]*$/.test(first) &&
70
+ first !== "I" &&
71
+ (/^[a-z]/.test(second) || SENTENCE_DETERMINERS.has(first))) {
62
72
  return text.charAt(0).toLowerCase() + text.slice(1);
63
73
  }
64
74
  return text;
65
75
  }
76
+ const SENTENCE_DETERMINERS = new Set([
77
+ "The",
78
+ "These",
79
+ "This",
80
+ "Those",
81
+ "That",
82
+ "A",
83
+ "An",
84
+ "Their",
85
+ "Her",
86
+ "His",
87
+ "Its",
88
+ "Our",
89
+ "My",
90
+ "Your",
91
+ ]);
66
92
  /**
67
93
  * Names that keep their capital letter inside a sentence, besides the
68
94
  * company and product the input supplies.
@@ -147,15 +173,17 @@ function campaignNameForSlack(name) {
147
173
  export const firstCampaignMessageToolDefinitions = [
148
174
  {
149
175
  name: "render_first_campaign_message",
150
- description: 'Build the exact Slack text of a first-campaign message for a new customer. During a first campaign every text you write in a turn, a short note next to a tool call too, reaches the customer as its own Slack message. So the customer gets only: the "Got it" line, these rendered messages, at most one progress line with real news, and one reply to each request, posted when it is done. Never write a note that you saved, checked, read or will do something (wrong: "I saved your approved message. Every new first message keeps its wording...", "I\'ll shorten just the opening... in about two minutes"). Kinds: plan (approval 1, with the first-message approach question), on_it (the reply to the plan yes: up to 150 people checked, stop once 50 are ready, the credit estimate, and that the campaign is kept filled every day after launch), sample (2 or 3 people who fit with their saved messages word for word, the list count so far, the other-approach line, unless launchConsent is saved the one autopilot or check-first question, and last the campaign by name with its link; nothing in it waits, the work keeps going), changed (the one reply to a change of the first message: posted once the new message is saved and filled in for three people, with nothing before it), launch_waiting (the one reply to launch while no LinkedIn account is connected, with the final count when the list is done), list_done (the final count, once, when the list finishes after the sample and the launch reply) or live (once the campaign started and its first sends are scheduled: how many, when in the sender\'s time, that it is kept filled every day and where replies come). Pass the facts; post the returned text exactly as returned, as one message, with nothing added, removed, reordered or reworded: it already follows your rules for campaign links, status words and the launch question. A missing fact is refused with what to supply. Reads and writes nothing.',
176
+ description: 'Build and post a first-campaign message for a new customer. In a Slack turn always pass post: true: the tool posts the message itself into the thread you are answering, exactly as built, and that post is your whole reply for it. After a post write no text about it, before or after: no summary, no copy of the message, no "posted" note. When the post was your last step in the turn, end the turn with exactly [SILENT]. During a first campaign every text you write in a turn, a short note next to a tool call too, reaches the customer as its own Slack message, so write none: the customer gets only these messages. Never write a note that you saved, checked, read or will do something (wrong: "I saved your approved message. Every new first message keeps its wording...", "I\'ll shorten just the opening... in about two minutes"). Kinds: got_it (the first reply to the profile, before any other call: that you research them, and when the plan comes), plan (approval 1, with the first-message approach question), on_it (the reply to the plan yes: up to 150 people checked, stop once 50 are ready, the credit estimate, and that the campaign is kept filled every day after launch), sample (2 or 3 people who fit with their saved messages word for word, the list count so far, the other-approach line, unless launchConsent is saved the one autopilot or check-first question, and last the campaign by name with its link; nothing in it waits, the work keeps going), changed (the one reply to a change of the first message: posted once the new message is saved and filled in for three people, with nothing before it), launch_waiting (the one reply to launch while no LinkedIn account is connected, with the final count when the list is done), list_done (the final count, once, when the list finishes after the sample and the launch reply) source_switch (the one progress line while they wait: too few people from a source fit, so you check the next one), or live (once the campaign started and its first sends are scheduled: how many, when in the sender\'s time, that it is kept filled every day and where replies come). Pass the facts. The text already follows your rules for campaign links, status words and the launch question. A missing fact is refused with what to supply, and nothing is posted. Outside Slack (a scheduled run) the tool cannot post: make your reply exactly the returned text.',
151
177
  inputSchema: {
152
178
  type: "object",
153
179
  properties: {
154
180
  kind: {
155
181
  type: "string",
156
182
  enum: [
183
+ "got_it",
157
184
  "plan",
158
185
  "on_it",
186
+ "source_switch",
159
187
  "sample",
160
188
  "changed",
161
189
  "launch_waiting",
@@ -163,6 +191,10 @@ export const firstCampaignMessageToolDefinitions = [
163
191
  "live",
164
192
  ],
165
193
  },
194
+ post: {
195
+ type: "boolean",
196
+ description: "true in every Slack turn: post the message into the thread you are answering. Then write no text about it.",
197
+ },
166
198
  approach: {
167
199
  type: "string",
168
200
  enum: ["message_test", "conversation"],
@@ -276,6 +308,14 @@ export const firstCampaignMessageToolDefinitions = [
276
308
  type: "number",
277
309
  description: "changed: people already contacted, who keep the message they got (0 or omit when none).",
278
310
  },
311
+ nextSource: {
312
+ type: "string",
313
+ description: "source_switch: the next source in the plan you check now, in plain words.",
314
+ },
315
+ countPosted: {
316
+ type: "boolean",
317
+ description: "launch_waiting: true when the final count (kind list_done) was already posted.",
318
+ },
279
319
  launchNote: {
280
320
  type: "string",
281
321
  description: "launch_waiting: only when the launch reply also changed something, such as: without Corey.",
@@ -313,7 +353,7 @@ export const firstCampaignMessageToolDefinitions = [
313
353
  },
314
354
  list: {
315
355
  type: "object",
316
- description: "sample, launch_waiting and list_done: the campaign list so far.",
356
+ description: "sample, launch_waiting, list_done and source_switch: the campaign list so far (source_switch: the source that fell short).",
317
357
  properties: {
318
358
  qualified: {
319
359
  type: "number",
@@ -412,6 +452,60 @@ export function creditEstimate(input) {
412
452
  const perFit = input.perFit ?? DEFAULT_CREDITS_PER_FIT;
413
453
  return Math.round(input.peopleToCheck * perChecked + input.ready * perFit);
414
454
  }
455
+ /**
456
+ * The one acknowledgment of the whole run, right after the profile reply.
457
+ * Round 10 on GPT-6.2 Astra (2026-11-19) paraphrased the skill's line ("Got
458
+ * it. I found Christian Reyes, co-founder and CEO of Sellable. I'm
459
+ * researching your company and market."), so it is rendered too.
460
+ */
461
+ function renderGotIt() {
462
+ return {
463
+ ok: true,
464
+ kind: "got_it",
465
+ text: [
466
+ "Got it. I'm researching you, your company and your market.",
467
+ "",
468
+ `**Next:** your campaign plan, here in about ${PLAN_MINUTES} minutes. Nothing needed from you.`,
469
+ ].join("\n"),
470
+ instruction: POST_EXACTLY,
471
+ afterPosting: "Save linkedinProfileUrl and pendingOperationRef first_campaign:plan, then keep working in this turn until the plan is posted, writing no text.",
472
+ };
473
+ }
474
+ /**
475
+ * The one progress line while the customer waits: a source fell below the
476
+ * floor, so the next source in the plan is checked (round 10, 2026-11-19,
477
+ * typed it as "Only 1 of the 75 people from the LinkedIn post fit. I'll now
478
+ * check founders and sales leaders who posted in the last 30 days.").
479
+ */
480
+ function renderSourceSwitch(input) {
481
+ const missing = [];
482
+ const list = input.list;
483
+ if (!list || typeof list.qualified !== "number")
484
+ missing.push("list.qualified");
485
+ if (!list || typeof list.checked !== "number" || list.checked <= 0) {
486
+ missing.push("list.checked");
487
+ }
488
+ if (!list || !filled(list.source))
489
+ missing.push("list.source");
490
+ if (!filled(input.nextSource))
491
+ missing.push("nextSource");
492
+ if (missing.length > 0)
493
+ return refuse(missing);
494
+ const fit = Math.max(0, Math.round(list.qualified));
495
+ const checked = Math.round(list.checked);
496
+ // The skill's one line (*The floor rule*): "Only {fits} of the first
497
+ // {checked} from {this source} fit, so I moved to {the next source}."
498
+ const share = fit === 0
499
+ ? `None of the first ${fmt(checked)}`
500
+ : `Only ${fmt(fit)} of the first ${fmt(checked)}`;
501
+ return {
502
+ ok: true,
503
+ kind: "source_switch",
504
+ text: `${share} from ${sourceInSentence(list.source)} fit, so I moved to ${sourceInSentence(input.nextSource)}.`,
505
+ instruction: `${POST_EXACTLY} It is the one progress line of the run.`,
506
+ afterPosting: "Keep working in this turn until the sample is posted, writing no text.",
507
+ };
508
+ }
415
509
  function renderPlan(input) {
416
510
  const p = input.positioning ?? {};
417
511
  const q = input.qualifies ?? {};
@@ -891,11 +985,16 @@ function renderLaunchWaiting(input) {
891
985
  const note = filled(input.launchNote)
892
986
  ? `, ${midSentence(sentence(input.launchNote))}`
893
987
  : "";
988
+ // The count is said once: a final count already posted is not repeated
989
+ // here (round 10 on GPT-6.2 Astra, 2026-11-19).
990
+ const countLine = list.status === "done"
991
+ ? input.countPosted === true
992
+ ? []
993
+ : [listCountLine(list)]
994
+ : ["I'm still checking people and will post the final count here."];
894
995
  const lines = [
895
996
  `Launch is approved${note}. Nothing is sent yet, because no LinkedIn account is connected.`,
896
- list.status === "done"
897
- ? listCountLine(list)
898
- : "I'm still checking people and will post the final count here.",
997
+ ...countLine,
899
998
  "",
900
999
  "**Your move**",
901
1000
  `1. Open ${LINKEDIN_ACCOUNTS_URL} and click **Connect account**. It takes about two minutes.`,
@@ -1057,15 +1156,19 @@ export function firstCampaignMessageToolResult(result) {
1057
1156
  return result;
1058
1157
  const name = result.kind === "on_it"
1059
1158
  ? 'the "On it" message'
1060
- : result.kind === "live"
1061
- ? "the launch message"
1062
- : result.kind === "changed"
1063
- ? "the reply to the change"
1064
- : result.kind === "launch_waiting"
1065
- ? "the reply to launch"
1066
- : result.kind === "list_done"
1067
- ? "the final count"
1068
- : `the ${result.kind}`;
1159
+ : result.kind === "got_it"
1160
+ ? 'the "Got it" line'
1161
+ : result.kind === "source_switch"
1162
+ ? "the progress line"
1163
+ : result.kind === "live"
1164
+ ? "the launch message"
1165
+ : result.kind === "changed"
1166
+ ? "the reply to the change"
1167
+ : result.kind === "launch_waiting"
1168
+ ? "the reply to launch"
1169
+ : result.kind === "list_done"
1170
+ ? "the final count"
1171
+ : `the ${result.kind}`;
1069
1172
  const required = result.requiredLines && result.requiredLines.length > 0
1070
1173
  ? ` It must carry these lines word for word: ${result.requiredLines
1071
1174
  .map((line) => `"${line}"`)
@@ -1087,10 +1190,14 @@ export function firstCampaignMessageToolResult(result) {
1087
1190
  }
1088
1191
  export function renderFirstCampaignMessage(input) {
1089
1192
  switch (input?.kind) {
1193
+ case "got_it":
1194
+ return renderGotIt();
1090
1195
  case "plan":
1091
1196
  return renderPlan(input);
1092
1197
  case "on_it":
1093
1198
  return renderOnIt(input);
1199
+ case "source_switch":
1200
+ return renderSourceSwitch(input);
1094
1201
  case "sample":
1095
1202
  return renderSample(input);
1096
1203
  case "changed":
@@ -1103,7 +1210,7 @@ export function renderFirstCampaignMessage(input) {
1103
1210
  return renderLive(input);
1104
1211
  default:
1105
1212
  return refuse([
1106
- "kind (plan, on_it, sample, changed, launch_waiting, list_done or live)",
1213
+ "kind (got_it, plan, on_it, source_switch, sample, changed, launch_waiting, list_done or live)",
1107
1214
  ]);
1108
1215
  }
1109
1216
  }
@@ -3,6 +3,7 @@ import { dirname, join, resolve } from "path";
3
3
  import { getApi, SellableApiError } from "../api.js";
4
4
  import { resolveSkillsDir } from "../skills.js";
5
5
  import { resolveWorkspaceRoot } from "../utils/workspace-root.js";
6
+ import { isKnownCampaignCurrentStep } from "../workflow-step-ids.js";
6
7
  import { listDncEntries, loadCsvDncEntries, } from "./csv-dnc.js";
7
8
  import { buildCsvDomainPreview, matchesConfirmationToken, parseConfirmationToken, projectCsvCarryRows, } from "./csv-domains.js";
8
9
  import { buildCsvLinkedinPreview, matchesLinkedinConfirmationToken, parseLinkedinConfirmationToken, uploadCsvLinkedinFile, } from "./csv-linkedin.js";
@@ -4030,6 +4031,13 @@ export async function importLeads(input) {
4030
4031
  : effectiveCurrentStep;
4031
4032
  const shouldSetCurrentStep = typeof postImportCurrentStep === "string" &&
4032
4033
  postImportCurrentStep.length > 0;
4034
+ // Check the step before any export starts: the step is written after the
4035
+ // import, and a refused step there left the export running, so the retry
4036
+ // found "Export already in progress" (round 10, 2026-11-19).
4037
+ if (shouldSetCurrentStep &&
4038
+ !isKnownCampaignCurrentStep(postImportCurrentStep)) {
4039
+ throw new Error(`invalid_current_step: Unknown currentStep '${postImportCurrentStep}'. Nothing was imported. Call import_leads again without currentStep (the campaign then moves to its lead list), or with a step such as confirm-lead-list.`);
4040
+ }
4033
4041
  if (provider === "signal-discovery" &&
4034
4042
  !sourceLeadListId &&
4035
4043
  campaignSelectedLeadListId) {
@@ -1,4 +1,5 @@
1
1
  export interface SubskillPromptResponse {
2
+ loadStatus?: string;
2
3
  name: string;
3
4
  description: string;
4
5
  visibility: "public" | "internal";
@@ -13,6 +14,7 @@ export interface SubskillPromptResponse {
13
14
  chunkingInstructions?: string;
14
15
  }
15
16
  export interface SubskillAssetResponse {
17
+ loadStatus?: string;
16
18
  subskillName: string;
17
19
  assetPath: string;
18
20
  resolvedFromSubskill?: string;
@@ -521,7 +521,15 @@ function rejectDeprecatedSubskillPromptName(subskillName) {
521
521
  return;
522
522
  throw new Error(`Deprecated subskill prompt: ${subskillName}. Use ${replacement}; do not call the deprecated prompt name.`);
523
523
  }
524
- function readChunkedContent(content, offset, limit, continuation) {
524
+ function chunkLoadStatus(label, chunk) {
525
+ if (chunk.chunkCount <= 1)
526
+ return undefined;
527
+ if (chunk.hasMore && chunk.nextOffset !== null) {
528
+ return `Chunk ${chunk.chunkIndex} of ${chunk.chunkCount}. This ${label.kind} is NOT loaded yet. Call ${label.nextCall(chunk.nextOffset, chunk.limit)} now, before you write, decide or do anything else, and keep going until hasMore is false.`;
529
+ }
530
+ return `Chunk ${chunk.chunkIndex} of ${chunk.chunkCount}, the last one. This ${label.kind} is loaded only when you also read chunks 1 to ${chunk.chunkCount - 1}.`;
531
+ }
532
+ function readChunkedContent(content, offset, limit, label) {
525
533
  const requestedLimit = Number.isFinite(limit) && limit !== undefined
526
534
  ? Math.max(Math.floor(limit), 1)
527
535
  : null;
@@ -538,6 +546,7 @@ function readChunkedContent(content, offset, limit, continuation) {
538
546
  chunkIndex: 1,
539
547
  chunkCount: 1,
540
548
  chunkingInstructions: undefined,
549
+ loadStatus: undefined,
541
550
  };
542
551
  }
543
552
  const safeOffset = Math.min(Math.max(Number.isFinite(offset) ? Math.floor(offset ?? 0) : 0, 0), content.length);
@@ -547,16 +556,22 @@ function readChunkedContent(content, offset, limit, continuation) {
547
556
  const starts = chunkStarts(content, safeLimit);
548
557
  const chunkCount = starts.length;
549
558
  const chunkIndex = Math.max(starts.filter((start) => start <= safeOffset).length, 1);
550
- return {
551
- chunk: content.slice(safeOffset, nextOffset),
552
- contentLength: content.length,
553
- offset: safeOffset,
554
- limit: safeLimit,
559
+ const progress = {
555
560
  hasMore,
556
561
  nextOffset: hasMore ? nextOffset : null,
557
562
  chunkIndex,
558
563
  chunkCount,
559
- chunkingInstructions: hasMore && continuation ? continuation(nextOffset, safeLimit) : undefined,
564
+ limit: safeLimit,
565
+ };
566
+ return {
567
+ chunk: content.slice(safeOffset, nextOffset),
568
+ contentLength: content.length,
569
+ offset: safeOffset,
570
+ ...progress,
571
+ chunkingInstructions: hasMore && label
572
+ ? label.continuation(label.nextCall(nextOffset, safeLimit))
573
+ : undefined,
574
+ loadStatus: label ? chunkLoadStatus(label, progress) : undefined,
560
575
  };
561
576
  }
562
577
  function editDistance(a, b) {
@@ -599,20 +614,27 @@ export function getSubskillPrompt(subskillName, offset, limit) {
599
614
  }
600
615
  markSubskillPromptLoaded(skill.name);
601
616
  const fullPrompt = stripFrontmatter(skill.content);
602
- const chunked = readChunkedContent(fullPrompt, offset, limit, (nextOffset, safeLimit) => `Continue this same prompt load with get_subskill_prompt({ subskillName: "${skill.name}", offset: ${nextOffset}, limit: ${safeLimit} }) until hasMore is false, one chunk per step. The prompt is not loaded until then: do not act on part of it. Treat all chunks as one prompt load; do not use saved local tool-output files or machine-specific paths.`);
617
+ const chunked = readChunkedContent(fullPrompt, offset, limit, {
618
+ kind: "prompt",
619
+ nextCall: (nextOffset, safeLimit) => `get_subskill_prompt({ subskillName: "${skill.name}", offset: ${nextOffset}, limit: ${safeLimit} })`,
620
+ continuation: (nextCall) => `Continue this same prompt load with ${nextCall} until hasMore is false, one chunk per step. The prompt is not loaded until then: do not act on part of it. Treat all chunks as one prompt load; do not use saved local tool-output files or machine-specific paths.`,
621
+ });
622
+ // Load status and progress come before the text: an agent reads a long
623
+ // result from the top and acts on what it read first.
603
624
  return {
625
+ ...(chunked.loadStatus ? { loadStatus: chunked.loadStatus } : {}),
604
626
  name: skill.name,
605
627
  description: skill.description,
606
628
  visibility: skill.visibility,
607
- prompt: chunked.chunk,
608
- promptLength: chunked.contentLength,
609
- offset: chunked.offset,
610
- limit: chunked.limit,
611
629
  hasMore: chunked.hasMore,
612
630
  nextOffset: chunked.nextOffset,
613
631
  chunkIndex: chunked.chunkIndex,
614
632
  chunkCount: chunked.chunkCount,
615
633
  chunkingInstructions: chunked.chunkingInstructions,
634
+ promptLength: chunked.contentLength,
635
+ offset: chunked.offset,
636
+ limit: chunked.limit,
637
+ prompt: chunked.chunk,
616
638
  };
617
639
  }
618
640
  function resolveSubskillAssetPath(subskillName, assetPath) {
@@ -700,22 +722,27 @@ export function getSubskillAsset(requestedSubskillName, assetPath, offset, limit
700
722
  const own = resolveSubskillAssetPath(subskillName, assetPath);
701
723
  const asset = locateSubskillAsset(subskillName, own);
702
724
  const content = fs.readFileSync(asset.resolved, "utf8");
703
- const chunked = readChunkedContent(content, offset, limit, (nextOffset, safeLimit) => `Continue this same asset load with get_subskill_asset({ subskillName: "${asset.owner}", assetPath: "${asset.cleanAssetPath}", offset: ${nextOffset}, limit: ${safeLimit} }) until hasMore is false, one chunk per step. Treat all chunks as one asset load; do not use saved local tool-output files or machine-specific paths.`);
725
+ const chunked = readChunkedContent(content, offset, limit, {
726
+ kind: "asset",
727
+ nextCall: (nextOffset, safeLimit) => `get_subskill_asset({ subskillName: "${asset.owner}", assetPath: "${asset.cleanAssetPath}", offset: ${nextOffset}, limit: ${safeLimit} })`,
728
+ continuation: (nextCall) => `Continue this same asset load with ${nextCall} until hasMore is false, one chunk per step. Treat all chunks as one asset load; do not use saved local tool-output files or machine-specific paths.`,
729
+ });
704
730
  return {
731
+ ...(chunked.loadStatus ? { loadStatus: chunked.loadStatus } : {}),
705
732
  subskillName,
706
733
  assetPath: own.cleanAssetPath,
707
734
  ...(asset.owner === subskillName
708
735
  ? {}
709
736
  : { resolvedFromSubskill: asset.owner }),
710
- content: chunked.chunk,
711
- contentLength: chunked.contentLength,
712
- offset: chunked.offset,
713
- limit: chunked.limit,
714
737
  hasMore: chunked.hasMore,
715
738
  nextOffset: chunked.nextOffset,
716
739
  chunkIndex: chunked.chunkIndex,
717
740
  chunkCount: chunked.chunkCount,
718
741
  chunkingInstructions: chunked.chunkingInstructions,
742
+ contentLength: chunked.contentLength,
743
+ offset: chunked.offset,
744
+ limit: chunked.limit,
745
+ content: chunked.chunk,
719
746
  };
720
747
  }
721
748
  export function completeSenderResearch(input) {
@@ -9979,6 +9979,10 @@ export declare const allTools: ({
9979
9979
  type: string;
9980
9980
  enum: string[];
9981
9981
  };
9982
+ post: {
9983
+ type: string;
9984
+ description: string;
9985
+ };
9982
9986
  approach: {
9983
9987
  type: string;
9984
9988
  enum: string[];
@@ -10129,6 +10133,14 @@ export declare const allTools: ({
10129
10133
  type: string;
10130
10134
  description: string;
10131
10135
  };
10136
+ nextSource: {
10137
+ type: string;
10138
+ description: string;
10139
+ };
10140
+ countPosted: {
10141
+ type: string;
10142
+ description: string;
10143
+ };
10132
10144
  launchNote: {
10133
10145
  type: string;
10134
10146
  description: string;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * The campaign step ids the server accepts as `currentStep`
3
+ * (src/lib/workflow-steps.ts `isKnownCurrentStep`: the headless steps, the UI
4
+ * steps and two legacy ids). The MCP checks a step before it starts work that
5
+ * cannot be undone, such as a provider export: round 10 (2026-11-19) passed
6
+ * `currentStep: "find-leads"` to import_leads, the Sales Navigator export
7
+ * started, the step write was refused, and the retry found "Export already in
8
+ * progress". tests/mcp/workflow-step-ids.test.ts keeps this list equal to the
9
+ * server's.
10
+ */
11
+ export declare const KNOWN_CAMPAIGN_CURRENT_STEPS: ReadonlySet<string>;
12
+ export declare function isKnownCampaignCurrentStep(step: unknown): step is string;
@@ -0,0 +1,52 @@
1
+ /**
2
+ * The campaign step ids the server accepts as `currentStep`
3
+ * (src/lib/workflow-steps.ts `isKnownCurrentStep`: the headless steps, the UI
4
+ * steps and two legacy ids). The MCP checks a step before it starts work that
5
+ * cannot be undone, such as a provider export: round 10 (2026-11-19) passed
6
+ * `currentStep: "find-leads"` to import_leads, the Sales Navigator export
7
+ * started, the step write was refused, and the retry found "Export already in
8
+ * progress". tests/mcp/workflow-step-ids.test.ts keeps this list equal to the
9
+ * server's.
10
+ */
11
+ export const KNOWN_CAMPAIGN_CURRENT_STEPS = new Set([
12
+ // Headless steps, in order.
13
+ "create-offer",
14
+ "select-lead-source",
15
+ "pick-provider",
16
+ "apollo",
17
+ "apollo-select-leads",
18
+ "sales-nav",
19
+ "sales-nav-select-leads",
20
+ "prospeo",
21
+ "prospeo-select-leads",
22
+ "signal-discovery",
23
+ "signal-discovery-results",
24
+ "confirm-lead-list",
25
+ "filter-choice",
26
+ "create-icp-rubric",
27
+ "apply-icp-rubric",
28
+ "validate-sample",
29
+ "auto-execute-leads",
30
+ "messages",
31
+ "auto-execute-messaging",
32
+ "awaiting-user-greenlight",
33
+ "settings",
34
+ "sequence",
35
+ "send",
36
+ "claude-greenlight",
37
+ "running",
38
+ // UI steps.
39
+ "plan",
40
+ "choose-source",
41
+ "contact-search",
42
+ "leads",
43
+ "filter-rules",
44
+ "filter-leads",
45
+ "messaging-choice",
46
+ // Legacy ids still on older campaigns.
47
+ "configure-columns",
48
+ "review-leads",
49
+ ]);
50
+ export function isKnownCampaignCurrentStep(step) {
51
+ return typeof step === "string" && KNOWN_CAMPAIGN_CURRENT_STEPS.has(step);
52
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellable/mcp",
3
- "version": "0.1.1033",
3
+ "version": "0.1.1035-wip.chunkhead.20261120.1",
4
4
  "type": "module",
5
5
  "description": "Sellable MCP server for Claude Code, Codex, and Hermes campaign workflows",
6
6
  "main": "dist/index.js",
@@ -37,23 +37,27 @@ English at about 80%:
37
37
  - An instruction starts with its verb: "Reply to Priya.", "Connect your LinkedIn."
38
38
  - Keep small words such as "the", "a" and "to". Use a list for more than two items.
39
39
 
40
- **Rendered messages.** The plan, the "On it" reply, the sample, the reply to
41
- a change of the first message, the reply to **launch** without a LinkedIn
42
- account, the final count and the message once the campaign runs are built by
43
- `render_first_campaign_message` (`kind` `plan`, `on_it`, `sample`, `changed`,
44
- `launch_waiting`, `list_done` or `live`). Pass
45
- the facts, then post the returned text exactly, as one message. Add no status
46
- word ("Needs you", "Working"), heading, summary or link of your own before or
47
- after it. Remove, move, shorten and reword nothing, and keep every bold label.
48
- The text already follows the rules for the campaign link, status words and
49
- the launch question, so a rule is never a reason to rewrite it. When a fact is
50
- wrong, render it again with the right fact. When it refuses, supply what its
51
- `missing` names. Never write these messages yourself.
40
+ **Rendered messages.** The "Got it" line, the plan, the "On it" reply, the
41
+ progress line, the sample, the reply to a change of the first message, the
42
+ reply to **launch** without a LinkedIn account, the final count and the
43
+ message once the campaign runs are built and posted by
44
+ `render_first_campaign_message` (`kind` `got_it`, `plan`, `on_it`,
45
+ `source_switch`, `sample`, `changed`, `launch_waiting`, `list_done` or
46
+ `live`). In a Slack turn always pass `post: true`: the tool posts the message
47
+ itself into this thread, exactly as built, and its result starts with
48
+ `SELLABLE_POSTED`. That post is your whole reply for that moment. Write no
49
+ text about it, before or after: no copy, no summary, no "posted" note, no
50
+ status word and no link of your own. When it was the last thing you owed in
51
+ the turn, end the turn with exactly `[SILENT]`. When a fact is wrong, call it
52
+ again with the right fact. When it refuses, supply what its `missing` names;
53
+ nothing was posted. When the result starts with `NOT POSTED` (a scheduled
54
+ run, or Slack refused), make that message your reply, exactly as the block
55
+ shows. Never write these messages yourself.
52
56
 
53
57
  **Message budget.** One message for each moment, in this order: the hello,
54
- one "Got it" line, the plan, "On it", at most one short progress line while
55
- they wait (only with real news, such as "Found 214 people who reacted to
56
- posts about cold outreach. Checking who fits now."), the sample, one reply
58
+ one "Got it" line (`got_it`), the plan, "On it", at most one short progress
59
+ line while they wait (only with real news: a source that fell under the
60
+ floor, `source_switch`), the sample, one reply
57
61
  to each customer request (do the change first, then report it once with the
58
62
  result), one launch reply, one final count when the list is done (in the
59
63
  launch reply when it is already done), and one `live` message once the
@@ -63,8 +67,11 @@ time ("back in about 10 minutes") during the work.
63
67
 
64
68
  **Every text you write is a message.** In a Slack turn, all the text you
65
69
  write reaches the customer as its own message, also a short note next to a
66
- tool call, before or between the calls. So write text only for a message the
67
- budget allows. While you work, call the tools and write nothing else. Never
70
+ tool call, before or between the calls. The tool posts every message of the
71
+ budget, so in a first-campaign turn write no text at all, only `[SILENT]` at
72
+ the end. The one exception is a customer question that no kind answers:
73
+ answer it in one short message when the answer is ready. While you work,
74
+ call the tools and write nothing else. Never
68
75
  tell the customer that you saved, checked, read or will do something. These
69
76
  notes were posted in one run (round 9, 2026-11-19) and each one broke the
70
77
  budget:
@@ -348,11 +355,12 @@ permission to send. It needs no mention of this Agent.
348
355
 
349
356
  - **The reply contains a LinkedIn profile URL or handle.** A single word such
350
357
  as `csreyes92` or `@csreyes92` is a handle: read it as
351
- `https://www.linkedin.com/in/{handle}/`. Send one short line first so
352
- the customer is not left looking at silence:
353
- "Got it. I'm researching you, your company and your market.
354
-
355
- **Next:** your campaign plan, here in about 8 minutes. Nothing needed from you."
358
+ `https://www.linkedin.com/in/{handle}/`. Post one short line first so
359
+ the customer is not left looking at silence: your first call is
360
+ `render_first_campaign_message` `kind: "got_it"`, `post: true` ("Got it.
361
+ I'm researching you, your company and your market. **Next:** your campaign
362
+ plan, here in about 8 minutes. Nothing needed from you."). Write no text
363
+ of your own with it.
356
364
  Never ask here about approving or sending for them: that question
357
365
  comes once, in the sample message or the launch message. Send it before the Live State Check and
358
366
  before loading any other skill or reference; those reads take over a minute. Then run the Live State
@@ -1021,8 +1029,8 @@ order, your recommended approach with one reason from this customer's offer
1021
1029
  and market (never a general reason), the first message (Message Testing: the
1022
1030
  one message with each {{personalized part}} marked; Conversations: an opener
1023
1031
  for one real person who fits, from one quick search and `draft-message`,
1024
- without their name), the runner-up and `includeDoNotContactLine`. Post its
1025
- `text` exactly. The saved brief is the full brief; this message is how the
1032
+ without their name), the runner-up and `includeDoNotContactLine`, with
1033
+ `post: true`. The saved brief is the full brief; this message is how the
1026
1034
  customer approves it and the rules, so skip the flow's setup receipt, its
1027
1035
  "Does this brief look right…" question and the inline brief.
1028
1036
 
@@ -1073,9 +1081,9 @@ campaign checks up to 150 people and stops once 50 are ready), pass the
1073
1081
  credit prices from `billing.credits.prices` and `creditBalance` (leave both out
1074
1082
  and pass `managed: true` when `billing.plan` is `managed`),
1075
1083
  `approachChosenByDefault` when the yes did not answer the approach question,
1076
- `saidGo` when it also said go, and `senderConnected`.
1084
+ `saidGo` when it also said go, and `senderConnected`, with `post: true`.
1077
1085
  Post it once. Text you write between tool calls goes to the customer, so
1078
- never post a second "On it".
1086
+ never write a second "On it".
1079
1087
  Then save `pendingOperationRef: "first_campaign:sample:{campaignId}"` (see
1080
1088
  **Never stop halfway**) and set `interactionMode: "autonomous"` on the
1081
1089
  campaign with `update_campaign` and pass `confirmed: true` where a search or
@@ -1109,10 +1117,11 @@ in Conversations it writes each opener. You write none of them. Keep working in
1109
1117
  the sample is posted, or until the campaign is launched when the yes said go.
1110
1118
 
1111
1119
  - **Say what changed, not what you are doing.** Post a line only with real
1112
- news: the one progress line of the **Message budget**, or a source change
1113
- or a looser rule with its reason, such as "Few people in these posts fit,
1114
- so I'm searching by job title instead." No tool names and no time
1115
- promises.
1120
+ news: the one progress line of the **Message budget**. A source under the
1121
+ floor is posted with `render_first_campaign_message` `kind:
1122
+ "source_switch"`, `post: true`: `list` (`qualified`, `checked` and
1123
+ `source`: the source that fell short) and `nextSource`. No tool names and
1124
+ no time promises.
1116
1125
  - **The live builder.** Where the flow's required watch copy tells the
1117
1126
  customer to approve something this section removed, write instead what is
1118
1127
  happening and that nothing is needed from them yet.
@@ -1164,7 +1173,7 @@ the sample is posted, or until the campaign is launched when the yes said go.
1164
1173
  next source in the order.
1165
1174
 
1166
1175
  The one line has the real numbers and plain names for both sources, never
1167
- a tool name:
1176
+ a tool name. Post it with `kind: "source_switch"`, which builds it:
1168
1177
  "Only {fits} of the first {checked} from {this source} fit, so I moved to {the next source}."
1169
1178
  For example: "Only 5 of the first 100 from these LinkedIn posts fit, so I
1170
1179
  moved to people with the right job title who posted on LinkedIn in the
@@ -1212,7 +1221,7 @@ the sample is posted, or until the campaign is launched when the yes said go.
1212
1221
  words), `stopReason` (`ready_target` at 50 ready, `checked_cap` at 150
1213
1222
  checked, `sources_used` when every source is used), `launchState`
1214
1223
  (`not_said`, `waiting_for_account` or `live`), `campaignName` and
1215
- `campaignLink`. Post no count of your own. When the list is already done
1224
+ `campaignLink`, with `post: true`. Post no count of your own. When the list is already done
1216
1225
  when the customer says **launch**, the `launch_waiting` reply carries the
1217
1226
  count, and there is no `list_done` message. When the sample's list was
1218
1227
  already done (`status` `done`), the sample is the count. When a source fails, finds too few or is under the floor, change the
@@ -1316,8 +1325,8 @@ is attached, `senderConnected`, and the campaign's saved name and link
1316
1325
  (`campaignName`, `campaignLink`). Read each person's message from the campaign (`select_campaign_cells` with
1317
1326
  `columnRole: "generateMessage"`, those rows and
1318
1327
  `includeGeneratedMessageReview: true`) and pass it word for word; never fill
1319
- the template by hand. Post its `text` exactly, then keep importing and
1320
- checking in the same turn: the sample never waits for an answer. When the
1328
+ the template by hand. Pass `post: true`, then keep importing and checking
1329
+ in the same turn: the sample never waits for an answer. When the
1321
1330
  account is already connected, first attach it as "Get it ready" in approval 2
1322
1331
  says, so the sample can show the sender. When the direction yes already said
1323
1332
  go, render the sample with `saidGo: true`, so it asks for no launch: with a
@@ -1387,7 +1396,7 @@ each first). A reply with no answer to it saves nothing. Do not ask it again.
1387
1396
  `building` before the sample, `sample` after it, `launched` after
1388
1397
  **launch**), `firstMessage` (the one message as saved), `people` (2 or
1389
1398
  3, each with the message as saved), `alreadyContacted`, `campaignName`
1390
- and `campaignLink`. Post its text exactly. Never report a change without
1399
+ and `campaignLink`, with `post: true`. Never report a change without
1391
1400
  it.
1392
1401
 
1393
1402
  This is the one reply to the change. From the customer's request until it
@@ -1467,8 +1476,9 @@ sending account. Call `list_senders`.
1467
1476
  cannot start yet. Reply once, with `render_first_campaign_message`
1468
1477
  `kind: "launch_waiting"`: `list` (`qualified`, `checked`, the sources in
1469
1478
  plain words, `status` `done` or `checking`), `launchNote` only when the
1470
- launch reply also changed something ("without Corey"). Post its text
1471
- exactly, as your one reply to launch.
1479
+ launch reply also changed something ("without Corey"), and
1480
+ `countPosted: true` when the final count (`list_done`) is already posted,
1481
+ with `post: true`: it is your one reply to launch.
1472
1482
  When the list is done, it carries the final count. While the list is still
1473
1483
  building, it says the count comes later, and the `list_done` message
1474
1484
  brings it.
@@ -1527,7 +1537,7 @@ sending account. Call `list_senders`.
1527
1537
  `campaignLink`, `senderName`, `firstSends` (`count`, `firstAt`,
1528
1538
  `timeZone`; with nothing scheduled, `count: 0` and the start of the
1529
1539
  sender's next sending day as `firstAt`), and `askLaunchConsent: true` only
1530
- when `launchConsent` is not saved and no sample asked it. It says the campaign
1540
+ when `launchConsent` is not saved and no sample asked it, with `post: true`. It says the campaign
1531
1541
  runs, how many first sends are scheduled and when in the sender's own
1532
1542
  time, that you keep it filled every day, and that replies come here with
1533
1543
  an answer ready. Then save both references as `null`: the first campaign