@m13v/s4l 1.7.12-rc.11 → 1.7.12-rc.12
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/version.json +2 -2
- package/mcp/manifest.json +1 -1
- package/mcp/package.json +1 -1
- package/package.json +1 -1
- package/scripts/context_mining.py +42 -12
- package/scripts/twitter_cycle_helper.py +19 -1
- package/skill/run-twitter-cycle.sh +22 -1
package/mcp/dist/version.json
CHANGED
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.7.12-rc.
|
|
5
|
+
"version": "1.7.12-rc.12",
|
|
6
6
|
"description": "Draft, review, approve, and autopilot X/Twitter posts.",
|
|
7
7
|
"long_description": "## **⚠️ The disclaimer above is generic Claude boilerplate.** Anthropic shows the same warning on every plugin regardless of what it does; any plugin has the same level of access as any app you download from the internet.\n\nS4L 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 plugin end to end**\n\n2\\. Quit with CMD+Q, reopen Claude, paste into a new chat.\n\nWhat happens next:\n\n* About every 5 minutes S4L scans X for posts that match your topics and drafts replies in your voice.\n* Drafts show up as review cards, usually the first within a few minutes. Nothing is posted automatically; you approve each one.\n* Posting autopilot stays off until you explicitly turn it on.",
|
|
8
8
|
"author": {
|
package/mcp/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m13v/s4l-mcp",
|
|
3
|
-
"version": "1.7.12-rc.
|
|
3
|
+
"version": "1.7.12-rc.12",
|
|
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": "@m13v/s4l",
|
|
3
|
-
"version": "1.7.12-rc.
|
|
3
|
+
"version": "1.7.12-rc.12",
|
|
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",
|
|
@@ -756,7 +756,11 @@ NEVER include (drop the item, or describe it generically):
|
|
|
756
756
|
- what: 1-2 sentences, plain first person, what they did and why.
|
|
757
757
|
- specifics: the concrete details a reply can cite truthfully (numbers, tools, the exact failure, the outcome). Only facts stated in the transcripts.
|
|
758
758
|
- angle: one sentence on the opinion or lesson they could credibly share in a public thread about this.
|
|
759
|
-
- queries:
|
|
759
|
+
- queries: 2-3 X search queries that find recent public posts by OTHER people discussing this problem space (not this founder's products by name). These run against only the last ~6 hours of X, so they must be BROAD:
|
|
760
|
+
- Each query combines at most TWO concepts. Never AND three groups together; "(a OR b) (c OR d) (e OR f)" returns nothing.
|
|
761
|
+
- When the work involved a specific named thing people tweet about (a benchmark, model, tool, library, company, launch), make one query just that name, e.g. "AutomationBench lang:en". Named things find the best threads.
|
|
762
|
+
- Use quotes for multi-word phrases and OR for variants. End each with lang:en. No since:, no min_faves:, no from:.
|
|
763
|
+
Good: "\\"agent memory\\" benchmark lang:en", "\\"claude code\\" subagents lang:en", "SWE-bench lang:en". Bad: "\\"CLAUDE.md\\" (memory OR context) (eval OR benchmark) lang:en" (three concepts, zero results).
|
|
760
764
|
|
|
761
765
|
# Transcripts ({len(sessions)} sessions, most recent first)
|
|
762
766
|
|
|
@@ -892,28 +896,54 @@ def recent_work_queries(projects: list) -> list[dict]:
|
|
|
892
896
|
names = {(p or {}).get("name") for p in projects if isinstance(p, dict)}
|
|
893
897
|
if not persona or persona not in names:
|
|
894
898
|
return []
|
|
895
|
-
|
|
896
|
-
#
|
|
899
|
+
# Interleave items (round-robin) into one deduped list, then serve a
|
|
900
|
+
# rotating window of MAX_RECENT_WORK_QUERIES per cycle so EVERY digest
|
|
901
|
+
# query runs, not just the first 8 (2026-11-17: 8 of 16 never ran).
|
|
897
902
|
item_queries = [
|
|
898
903
|
[(it["title"], q) for q in (it.get("queries") or []) if isinstance(q, str) and q.strip()]
|
|
899
904
|
for it in digest.get("items") or []
|
|
900
905
|
]
|
|
901
|
-
|
|
906
|
+
flat, seen = [], set()
|
|
907
|
+
while any(item_queries):
|
|
902
908
|
for qs in item_queries:
|
|
903
|
-
if not qs
|
|
909
|
+
if not qs:
|
|
904
910
|
continue
|
|
905
911
|
title, q = qs.pop(0)
|
|
906
912
|
key = " ".join(q.lower().split())
|
|
907
913
|
if key in seen:
|
|
908
914
|
continue
|
|
909
915
|
seen.add(key)
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
916
|
+
flat.append((title, q.strip()))
|
|
917
|
+
if not flat:
|
|
918
|
+
return []
|
|
919
|
+
window = _rotate_window(len(flat), digest.get("generated_at", ""))
|
|
920
|
+
return [
|
|
921
|
+
{
|
|
922
|
+
"project": persona,
|
|
923
|
+
"query": flat[i][1],
|
|
924
|
+
"search_topic": (RECENT_WORK_TOPIC_PREFIX + flat[i][0])[:120],
|
|
925
|
+
"likes": 0, "clicks": 0, "posts": 0,
|
|
926
|
+
}
|
|
927
|
+
for i in window
|
|
928
|
+
]
|
|
929
|
+
|
|
930
|
+
|
|
931
|
+
def _rotate_window(n: int, digest_id: str) -> list[int]:
|
|
932
|
+
"""Indices for this cycle's window and advance the cursor. The cursor
|
|
933
|
+
resets whenever a new digest is generated."""
|
|
934
|
+
path = state_dir() / "recent_work.cursor.json"
|
|
935
|
+
try:
|
|
936
|
+
cur = json.loads(path.read_text())
|
|
937
|
+
start = int(cur.get("next", 0)) if cur.get("digest") == digest_id else 0
|
|
938
|
+
except Exception:
|
|
939
|
+
start = 0
|
|
940
|
+
k = min(MAX_RECENT_WORK_QUERIES, n)
|
|
941
|
+
idx = [(start + j) % n for j in range(k)]
|
|
942
|
+
try:
|
|
943
|
+
path.write_text(json.dumps({"digest": digest_id, "next": (start + k) % n}))
|
|
944
|
+
except OSError:
|
|
945
|
+
pass
|
|
946
|
+
return idx
|
|
917
947
|
|
|
918
948
|
|
|
919
949
|
def recent_work_block() -> str:
|
|
@@ -228,7 +228,25 @@ def cmd_candidates(batch_id: str) -> int:
|
|
|
228
228
|
return -1.0
|
|
229
229
|
|
|
230
230
|
rows.sort(key=composite, reverse=True)
|
|
231
|
-
|
|
231
|
+
# Recent-work candidates (2026-11-17, personal_brand + recent_work_context
|
|
232
|
+
# flag; see scripts/context_mining.py) are found by relevance to what the
|
|
233
|
+
# user just did, so they are low-virality by nature and would never make
|
|
234
|
+
# the top 25. Carry up to RECENT_WORK_EXTRA of them past the cap, subject
|
|
235
|
+
# to a small reach floor (>=1 like OR author >=1k followers). The cycle's
|
|
236
|
+
# virality prefilter and plan-parse bar exempt the same topic prefix.
|
|
237
|
+
def _rw_floor(r):
|
|
238
|
+
return (int(r.get("likes") or 0) >= 1
|
|
239
|
+
or int(r.get("author_followers") or 0) >= 1000)
|
|
240
|
+
|
|
241
|
+
top = rows[:25]
|
|
242
|
+
top_ids = {r.get("id") for r in top}
|
|
243
|
+
extra = [
|
|
244
|
+
r for r in rows
|
|
245
|
+
if r.get("id") not in top_ids
|
|
246
|
+
and str(r.get("search_topic") or "").startswith("recent work: ")
|
|
247
|
+
and _rw_floor(r)
|
|
248
|
+
][:5]
|
|
249
|
+
rows = top + extra
|
|
232
250
|
|
|
233
251
|
for r in rows:
|
|
234
252
|
cols = [
|
|
@@ -1775,7 +1775,12 @@ else
|
|
|
1775
1775
|
fi
|
|
1776
1776
|
if [ -n "$VIRALITY_THRESHOLD" ] && [ -n "$CANDIDATES" ]; then
|
|
1777
1777
|
_VF_TOTAL=$(printf '%s\n' "$CANDIDATES" | grep -c '^[0-9]' || true)
|
|
1778
|
-
|
|
1778
|
+
# Recent-work exemption (2026-11-17): rows whose search_topic (col 8)
|
|
1779
|
+
# starts with "recent work: " came from the user's own recent sessions
|
|
1780
|
+
# (personal_brand lane, recent_work_context flag) and are gated on
|
|
1781
|
+
# relevance, not virality; twitter_cycle_helper.py already applied their
|
|
1782
|
+
# reach floor. Everything else still has to clear the bar.
|
|
1783
|
+
CANDIDATES=$(printf '%s\n' "$CANDIDATES" | awk -F'|' -v b="$VIRALITY_THRESHOLD" '$1 ~ /^[0-9]+$/ && NF>=5 && ($5+0 >= b+0 || (NF>=8 && index($8, "recent work: ") == 1))')
|
|
1779
1784
|
_VF_KEPT=$(printf '%s\n' "$CANDIDATES" | grep -c '^[0-9]' || true)
|
|
1780
1785
|
log "[virality_prefilter] kept ${_VF_KEPT:-0} of ${_VF_TOTAL:-0} candidate(s) at/above bar=$VIRALITY_THRESHOLD; below-bar rows stay pending and are never sent to the drafter"
|
|
1781
1786
|
fi
|
|
@@ -2412,11 +2417,23 @@ rejected = so.get('rejected', []) if isinstance(so, dict) else []
|
|
|
2412
2417
|
# (pipe cols: id|url|author|text|virality|delta|...). Shared by the top-N cap
|
|
2413
2418
|
# and the rolling virality bar below.
|
|
2414
2419
|
_vir = {}
|
|
2420
|
+
_rw_ids = set()
|
|
2415
2421
|
for _ln in (os.environ.get('S4L_CAND_VIR', '') or '').splitlines():
|
|
2416
2422
|
_p = _ln.split('|')
|
|
2417
2423
|
if len(_p) >= 5 and _p[0].isdigit():
|
|
2418
2424
|
try: _vir[int(_p[0])] = float(_p[4] or 0)
|
|
2419
2425
|
except Exception: pass
|
|
2426
|
+
if len(_p) >= 8 and _p[7].startswith('recent work: '):
|
|
2427
|
+
_rw_ids.add(int(_p[0]))
|
|
2428
|
+
# RECENT-WORK LANE (2026-11-17): picks found via the user's own recent-work
|
|
2429
|
+
# queries (search_topic 'recent work: ...', personal_brand + recent_work_context
|
|
2430
|
+
# flag) are set aside BEFORE the top-N cap and the virality bar, then the best
|
|
2431
|
+
# ONE is added back after both. They are gated on relevance (the drafter
|
|
2432
|
+
# already chose them), not virality, and never compete with or displace the
|
|
2433
|
+
# regular top-N pick. Extra recent-work picks stay 'pending' like deferrals.
|
|
2434
|
+
_rw_picks = [c for c in candidates if c.get('candidate_id') in _rw_ids]
|
|
2435
|
+
candidates = [c for c in candidates if c.get('candidate_id') not in _rw_ids]
|
|
2436
|
+
_rw_picks.sort(key=lambda c: _vir.get(c.get('candidate_id'), 0.0), reverse=True)
|
|
2420
2437
|
# TOP-N POST CAP (2026-06-29): keep only the highest-Virality on-brand pick(s).
|
|
2421
2438
|
# S4L_POST_TOP_N=0 disables the cap (env opt-out only; the cap applies to both
|
|
2422
2439
|
# autopilot and DRAFT_ONLY lanes as of 2026-06-30). Truncated picks are dropped
|
|
@@ -2442,6 +2459,10 @@ if _bar and candidates:
|
|
|
2442
2459
|
candidates = _kept
|
|
2443
2460
|
except Exception:
|
|
2444
2461
|
pass
|
|
2462
|
+
if _rw_picks:
|
|
2463
|
+
candidates = candidates + _rw_picks[:1]
|
|
2464
|
+
_deferred += len(_rw_picks) - 1
|
|
2465
|
+
print(f'prep: recent-work lane kept 1 of {len(_rw_picks)} pick(s) outside the top-N cap and virality bar', file=sys.stderr)
|
|
2445
2466
|
# The picker assignment travels through the plan envelope so
|
|
2446
2467
|
# twitter_post_plan.py can call validate_or_register(...) with the
|
|
2447
2468
|
# original (assigned_style, assigned_mode) and coerce USE-mode drift
|