social-autoposter 1.6.49 → 1.6.51

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/mcp/dist/index.js CHANGED
@@ -309,10 +309,22 @@ function renderDraftsTable(plan) {
309
309
  const author = c.thread_author ? `@${c.thread_author}` : "(unknown thread)";
310
310
  const style = c.engagement_style ?? "?";
311
311
  const reply = c.reply_text ?? "(empty)";
312
- const link = c.link_url ? ` · link: ${c.link_url}` : "";
313
- return (`[${n}] ${author} (style: ${style})${link}\n` +
314
- ` ${reply.replace(/\n/g, "\n ")}\n` +
315
- ` thread: ${c.candidate_url ?? "?"}`);
312
+ // The literal tail URL is NOT known yet: at post time a short link is minted
313
+ // from this target (e.g. fazm.ai/cc -> s4l.ai/r/<code>) and an A/B gate may
314
+ // skip it entirely. Show the TARGET only; never pre-mint the real /r/ code.
315
+ const link = c.link_url
316
+ ? `\n + link (may be appended as a short link at post time): ${c.link_url}`
317
+ : "";
318
+ // The original tweet we're replying to — context the reviewer needs to judge
319
+ // the draft. Already in the plan; just surface it.
320
+ const threadText = c.thread_text
321
+ ? `\n in reply to: ${c.thread_text.replace(/\s+/g, " ").trim().slice(0, 280)}`
322
+ : "";
323
+ return (`[${n}] ${author} (style: ${style})` +
324
+ `${threadText}\n` +
325
+ ` draft: ${reply.replace(/\n/g, "\n ")}` +
326
+ `${link}\n` +
327
+ ` thread url: ${c.candidate_url ?? "?"}`);
316
328
  })
317
329
  .join("\n\n");
318
330
  }
@@ -582,7 +594,9 @@ server.registerTool("draft_cycle", {
582
594
  description: "Scan X and draft replies on this machine, then return ALL drafts as a numbered table " +
583
595
  "for review. This tool POSTS NOTHING. Show the table to the user and ask which numbers " +
584
596
  "to post and which to rewrite, then call `post_drafts` with their decision and the " +
585
- "returned batch_id. Flow: discover -> draft -> review in chat -> post_drafts.",
597
+ "returned batch_id. The table MUST show, per draft: the thread being replied to " +
598
+ "(thread_text), the draft reply, and the link target (link_url) when present; never " +
599
+ "drop those columns. Flow: discover -> draft -> review in chat -> post_drafts.",
586
600
  inputSchema: {
587
601
  project: z
588
602
  .string()
@@ -639,11 +653,15 @@ server.registerTool("draft_cycle", {
639
653
  const message = `Drafted ${count} ${count === 1 ? "reply" : "replies"} for "${proj}" ` +
640
654
  `(batch ${drafted.batchId}). NOTHING has been posted yet.\n\n` +
641
655
  `${table}\n\n` +
642
- `Show this list to the user and ask which to post and which to edit. They can reply ` +
643
- `however is natural, e.g. "post 1, 3 and 5", "edit 2: <new wording>", "post all", or ` +
644
- `"skip all". Editing a draft also posts it. Then call the post_drafts tool with ` +
645
- `batch_id "${drafted.batchId}" and their decision (post: [numbers], edits: [{n, text}], ` +
646
- `or post_all: true). Do not post anything the user didn't ask for.`;
656
+ `Show this list to the user and ask which to post and which to edit. When you render ` +
657
+ `the table, ALWAYS include, for every draft: the thread it replies to (in reply to / ` +
658
+ `thread_text), the draft text, and the link target (link_url) if present. Do NOT drop ` +
659
+ `the thread or link columns. Note the literal short link is appended at post time and ` +
660
+ `an A/B gate may omit it, so present link_url as the target, not a guaranteed final URL. ` +
661
+ `They can reply however is natural, e.g. "post 1, 3 and 5", "edit 2: <new wording>", ` +
662
+ `"post all", or "skip all". Editing a draft also posts it. Then call the post_drafts ` +
663
+ `tool with batch_id "${drafted.batchId}" and their decision (post: [numbers], ` +
664
+ `edits: [{n, text}], or post_all: true). Do not post anything the user didn't ask for.`;
647
665
  return {
648
666
  content: [{ type: "text", text: message }],
649
667
  structuredContent: {
@@ -659,7 +677,15 @@ server.registerTool("draft_cycle", {
659
677
  n: i + 1,
660
678
  author: c.thread_author,
661
679
  tweet_url: c.candidate_url,
680
+ // The original tweet being replied to — reviewer context. Hosts that
681
+ // surface ONLY structuredContent (Claude Desktop, Fazm Code tab) need
682
+ // this here or the relayed table loses the thread it's responding to.
683
+ thread_text: c.thread_text,
662
684
  reply_text: c.reply_text,
685
+ // Target link only. The literal /r/<code> short link is minted at post
686
+ // time and an A/B gate may omit it; do not pre-mint here.
687
+ link_url: c.link_url,
688
+ style: c.engagement_style,
663
689
  language: c.language,
664
690
  })),
665
691
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "social-autoposter",
3
- "version": "1.6.49",
3
+ "version": "1.6.51",
4
4
  "description": "Automated social posting pipeline for Reddit, X/Twitter, LinkedIn, and Moltbook. Install as a Claude Code agent skill.",
5
5
  "bin": {
6
6
  "social-autoposter": "bin/cli.js"