social-autoposter 1.6.22 → 1.6.23

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
@@ -242,7 +242,12 @@ async function postApproved(batchId, plan) {
242
242
  return { attempted: 0, exit_code: 0, summary: "nothing approved" };
243
243
  const approvedBatch = `${batchId}_approved`;
244
244
  writePlan(approvedBatch, { ...plan, candidates: approved });
245
- const res = await runPython("scripts/twitter_post_plan.py", ["--plan", planPath(approvedBatch)], { timeoutMs: 900_000 });
245
+ // SAPS_SKIP_CAMPAIGN_SUFFIX=1: manual/reviewed posts from this MCP draft_cycle
246
+ // never get the active-campaign suffix (e.g. " written with ai") appended.
247
+ // twitter_browser.py's reply handler reads this env (inherited through
248
+ // twitter_post_plan.py's subprocess). The cron pipeline doesn't set it, so the
249
+ // A/B disclosure experiment keeps running on autopilot/cron and on Reddit.
250
+ const res = await runPython("scripts/twitter_post_plan.py", ["--plan", planPath(approvedBatch)], { timeoutMs: 900_000, env: { SAPS_SKIP_CAMPAIGN_SUFFIX: "1" } });
246
251
  let summary = res.stdout.trim();
247
252
  try {
248
253
  const lines = res.stdout.trim().split("\n");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "social-autoposter",
3
- "version": "1.6.22",
3
+ "version": "1.6.23",
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"
@@ -2072,7 +2072,14 @@ def main():
2072
2072
  file=sys.stderr,
2073
2073
  )
2074
2074
  sys.exit(1)
2075
- result = reply_to_tweet(sys.argv[2], sys.argv[3])
2075
+ # SAPS_SKIP_CAMPAIGN_SUFFIX=1 opts this reply out of active-campaign
2076
+ # suffixes (e.g. " written with ai"). Set ONLY by the MCP draft_cycle
2077
+ # post path (mcp/src/index.ts::postApproved) so manual/reviewed posts
2078
+ # land clean; the cron pipeline never sets it, so the A/B experiment
2079
+ # keeps running there and on Reddit. Reuses the existing apply_campaigns
2080
+ # plumbing (same flag the self-reply path uses below).
2081
+ _skip_camp = os.environ.get("SAPS_SKIP_CAMPAIGN_SUFFIX", "").strip().lower() in ("1", "true", "yes")
2082
+ result = reply_to_tweet(sys.argv[2], sys.argv[3], apply_campaigns=not _skip_camp)
2076
2083
  print(json.dumps(result, indent=2))
2077
2084
 
2078
2085
  elif cmd == "like":