social-autoposter 1.6.148 → 1.6.149

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
@@ -464,6 +464,14 @@ async function produceDrafts(project, onProgress) {
464
464
  await ensureOverlayWatch();
465
465
  let step = 0;
466
466
  let lastMsg = "";
467
+ // Granular scan progress for the menu-bar label. Phase 1 logs one
468
+ // `executing N queries` line (the total), then one `ok/err project=… kept=K`
469
+ // line per query. We count those to paint `scanning X · N/M · kept K` instead
470
+ // of a static "scanning X". Best-effort: missing total falls back to a plain
471
+ // count, and any parse miss just leaves the prior label up.
472
+ let scanTotal = 0;
473
+ let scanDone = 0;
474
+ let scanKept = 0;
467
475
  // ONE predictable, host-independent place to watch a draft_cycle run, so any
468
476
  // agent (or human) debugging "the cycle looks stuck" has an obvious path:
469
477
  // ~/social-autoposter/skill/logs/draft_cycle-mcp.log
@@ -505,6 +513,21 @@ async function produceDrafts(project, onProgress) {
505
513
  appendLog(`${t}\n`);
506
514
  console.error(`[draft_cycle] ${t}`);
507
515
  }
516
+ // Per-query scan progress -> granular menu-bar label. These lines only
517
+ // appear during Phase 1 (before 2b-prep), so they never fight the
518
+ // "drafting" label below.
519
+ let sm;
520
+ if ((sm = /executing (\d+) quer/.exec(t))) {
521
+ scanTotal = parseInt(sm[1], 10) || 0;
522
+ }
523
+ else if ((sm = /^\s*(?:ok|err)\s+project=/.exec(t))) {
524
+ scanDone += 1;
525
+ const km = /kept=(\d+)/.exec(t);
526
+ if (km)
527
+ scanKept += parseInt(km[1], 10) || 0;
528
+ const prog = scanTotal ? `${scanDone}/${scanTotal}` : `${scanDone}`;
529
+ writeActivity("scanning", `scanning X · ${prog} · kept ${scanKept}`);
530
+ }
508
531
  if (/Phase 2b-prep/.test(t))
509
532
  writeActivity("drafting", "drafting replies");
510
533
  if (!onProgress)
@@ -1,4 +1,4 @@
1
1
  {
2
- "version": "1.6.148",
3
- "installedAt": "2026-06-29T21:47:12.029Z"
2
+ "version": "1.6.149",
3
+ "installedAt": "2026-06-29T22:07:06.183Z"
4
4
  }
package/mcp/manifest.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "dxt_version": "0.1",
3
3
  "name": "social-autoposter",
4
4
  "display_name": "S4L",
5
- "version": "1.6.148",
5
+ "version": "1.6.149",
6
6
  "description": "Draft, review, approve, and autopilot X/Twitter posts.",
7
7
  "long_description": "The disclaimer above is generic Claude boilerplate. S4L is an open source product developed by Mediar.ai Incorporated, a VC-backed San Francisco-based startup.\n\nTo get started:\n\n1\\. Copy this prompt: **Set me up on S4L end to end**\n\n2\\. Quit fully with CMD+Q, restart Claude, and paste the prompt into a new chat.",
8
8
  "author": {
@@ -501,19 +501,29 @@ class S4LMenuBar(rumps.App):
501
501
  except Exception:
502
502
  continue
503
503
  low = txt.lower()
504
- # (a) Human "usage limit reached" prose (the older shape).
505
- if "weekly limit" in low or "usage limit" in low or "hit your limit" in low:
504
+ # CRITICAL: only treat this as a limit when it is an actual API
505
+ # ERROR in this run NEVER loose prose anywhere in the transcript.
506
+ # The drafting prompt embeds candidate threads + the feedback report,
507
+ # which frequently contain phrases like "weekly limit" / "rate limit"
508
+ # as CONTENT (an AI-product timeline is full of them — a 'claude-meter'
509
+ # example post "reached your weekly limit by tuesday" false-tripped the
510
+ # old prose match on 2026-06-29). The api-error markers below are set
511
+ # by the SDK only on real errors, so they can't appear in content.
512
+ #
513
+ # (a) HTTP-429 rate_limit — the definitive routines-lane shape:
514
+ # {"error":"rate_limit",...,"isApiErrorMessage":true,"apiErrorStatus":429}
515
+ if '"apierrorstatus":429' in low or '"error":"rate_limit"' in low:
516
+ limit_msg = "Claude rate limit reached (429)"
517
+ break
518
+ # (b) Weekly/usage-limit prose, but ONLY when carried inside a real
519
+ # API-error message (gated on the marker so content can't trip it).
520
+ if '"isapierrormessage":true' in low and (
521
+ "weekly limit" in low or "usage limit" in low or "hit your limit" in low
522
+ ):
506
523
  import re
507
524
  m = re.search(r"resets [^\"\\]{0,40}", txt)
508
525
  limit_msg = m.group(0).strip().rstrip(".") if m else "Claude usage limit reached"
509
526
  break
510
- # (b) HTTP-429 rate_limit api_error — the shape the Claude Desktop
511
- # routines lane ACTUALLY returns when the account is over its limit.
512
- # The prose strings above never appear in this case; the routine
513
- # transcript carries {"error":"rate_limit",...,"apiErrorStatus":429}.
514
- if '"apierrorstatus":429' in low or '"error":"rate_limit"' in low:
515
- limit_msg = "Claude rate limit reached (429)"
516
- break
517
527
  except Exception:
518
528
  pass
519
529
  return ran, limit_msg
package/mcp/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m13v/social-autoposter-mcp",
3
- "version": "1.6.148",
3
+ "version": "1.6.149",
4
4
  "private": true,
5
5
  "description": "Desktop MCP client for social-autoposter (X/Twitter rail): manual draft/review/approve loop, autopilot control, and stats. Thin wrapper over the existing pipeline scripts.",
6
6
  "license": "MIT",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "social-autoposter",
3
- "version": "1.6.148",
3
+ "version": "1.6.149",
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"