@m13v/s4l 1.7.2-rc.6 → 1.7.2-rc.7
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
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.2-rc.
|
|
5
|
+
"version": "1.7.2-rc.7",
|
|
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.2-rc.
|
|
3
|
+
"version": "1.7.2-rc.7",
|
|
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
|
@@ -18,10 +18,14 @@ Safe by construction:
|
|
|
18
18
|
- Best-effort: any single failure is logged and skipped; never raises.
|
|
19
19
|
|
|
20
20
|
Degradation vs a normal cycle: salvaged candidates skip the cycle's post-provider
|
|
21
|
-
top-N selection (so MORE cards, which is fine)
|
|
22
|
-
arm stamp that run-twitter-cycle.sh's plan writer adds after the provider returns
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
top-N selection (so MORE cards, which is fine), lack the tail-link / experiments
|
|
22
|
+
arm stamp that run-twitter-cycle.sh's plan writer adds after the provider returns,
|
|
23
|
+
and (two-draft schema only) lack assigned_style/assigned_mode, which live in the
|
|
24
|
+
cycle's shell variables, not the model output. The reply text itself IS complete
|
|
25
|
+
end-to-end (_mirror_two_draft_fields backfills reply_text/drafts from
|
|
26
|
+
draft_a_text/draft_b_text for the post-2026-07-07/08 two-draft schema, since the
|
|
27
|
+
model output alone has no reply_text field to check for completeness). A salvaged
|
|
28
|
+
card is strictly better than a lost draft.
|
|
25
29
|
|
|
26
30
|
Usage:
|
|
27
31
|
python3 scripts/salvage_orphaned_prep_results.py # automated (safe age gate)
|
|
@@ -59,6 +63,52 @@ except Exception: # standalone fallbacks
|
|
|
59
63
|
pass
|
|
60
64
|
|
|
61
65
|
|
|
66
|
+
def _mirror_two_draft_fields(candidates):
|
|
67
|
+
"""Backfill reply_text/drafts for two-draft-schema candidates (2026-07-07/08
|
|
68
|
+
redesign) that reach salvage. The normal cycle path (run-twitter-cycle.sh)
|
|
69
|
+
mirrors draft_a_text onto reply_text/engagement_style/drafts right after the
|
|
70
|
+
model returns, but salvage bypasses that shell-side step entirely, so an
|
|
71
|
+
orphaned post-redesign result reached review cards with NEITHER field set.
|
|
72
|
+
The menubar card (s4l_card.py) reads d.get("drafts") first, then falls back
|
|
73
|
+
to d.get("reply_text") or "", so those cards rendered the thread with a
|
|
74
|
+
completely empty editable reply box despite draft_a_text/draft_b_text
|
|
75
|
+
holding real, already-drafted content (root-caused 2026-07-09 via
|
|
76
|
+
candidate 374925 and 4 siblings, all missing 'experiments' too, confirming
|
|
77
|
+
they came through this salvage path rather than a normal cycle write).
|
|
78
|
+
|
|
79
|
+
assigned_style/assigned_mode are deliberately left OUT (not set to None,
|
|
80
|
+
just absent): the picker's per-cycle style assignment lives only in
|
|
81
|
+
run-twitter-cycle.sh's shell variables, not in the model's JSON output, so
|
|
82
|
+
it can't be recovered here. twitter_post_plan.py already has a documented
|
|
83
|
+
fallback for that ("assigned_mode key absent" -> use the plan-level
|
|
84
|
+
assignment, itself None for a salvaged plan), so leaving the keys out is
|
|
85
|
+
the safe, already-supported degradation, same class as the existing
|
|
86
|
+
no-experiments-stamp degradation.
|
|
87
|
+
"""
|
|
88
|
+
for c in candidates:
|
|
89
|
+
if not isinstance(c, dict) or "draft_a_text" not in c or "reply_text" in c:
|
|
90
|
+
continue
|
|
91
|
+
c["reply_text"] = c.get("draft_a_text") or ""
|
|
92
|
+
c["engagement_style"] = c.get("draft_a_style") or ""
|
|
93
|
+
c["new_style"] = c.get("draft_a_new_style")
|
|
94
|
+
if c.get("draft_a_text_en"):
|
|
95
|
+
c["reply_text_en"] = c["draft_a_text_en"]
|
|
96
|
+
draft_b_text = c.get("draft_b_text")
|
|
97
|
+
if not c.get("is_reused_draft") and draft_b_text:
|
|
98
|
+
c["drafts"] = [
|
|
99
|
+
{
|
|
100
|
+
"variant": "a", "text": c.get("draft_a_text") or "",
|
|
101
|
+
"style": c.get("draft_a_style") or "",
|
|
102
|
+
"text_en": c.get("draft_a_text_en"),
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"variant": "b", "text": draft_b_text,
|
|
106
|
+
"style": c.get("draft_b_style") or "",
|
|
107
|
+
"text_en": c.get("draft_b_text_en"),
|
|
108
|
+
},
|
|
109
|
+
]
|
|
110
|
+
|
|
111
|
+
|
|
62
112
|
def _is_prep_result(obj):
|
|
63
113
|
"""True iff obj looks like a twitter-prep result (drafted candidates).
|
|
64
114
|
|
|
@@ -142,6 +192,7 @@ def main():
|
|
|
142
192
|
pass
|
|
143
193
|
continue
|
|
144
194
|
|
|
195
|
+
_mirror_two_draft_fields(obj["candidates"])
|
|
145
196
|
n = len(obj["candidates"])
|
|
146
197
|
age_min = (now - st.st_mtime) / 60.0
|
|
147
198
|
_plog(f"[salvage] ORPHAN prep result job {job_id}: producer never consumed it "
|