@m13v/s4l 1.7.7 → 1.7.8-rc.1
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/browser_lifecycle.py +23 -9
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.
|
|
5
|
+
"version": "1.7.8-rc.1",
|
|
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.
|
|
3
|
+
"version": "1.7.8-rc.1",
|
|
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
|
@@ -97,6 +97,12 @@ def background_new_page(browser, context, url: str = "about:blank", timeout_ms:
|
|
|
97
97
|
try:
|
|
98
98
|
with context.expect_page(timeout=timeout_ms) as pg_info:
|
|
99
99
|
cdp.send("Target.createTarget", {"url": url, "background": True})
|
|
100
|
+
# Log SUCCESS too (2026-08-05): the residual focus-steal hunt hit
|
|
101
|
+
# same-second orphan blank creates that no log claimed. Success
|
|
102
|
+
# was silent by design, which made "our background create fired
|
|
103
|
+
# and coincided" indistinguishable from "an unknown foreground
|
|
104
|
+
# creator". One line per create closes that ambiguity.
|
|
105
|
+
_activity_log("bg_new_page", f"url={url[:60]}")
|
|
100
106
|
return pg_info.value
|
|
101
107
|
finally:
|
|
102
108
|
try:
|
|
@@ -113,18 +119,26 @@ def background_new_page(browser, context, url: str = "about:blank", timeout_ms:
|
|
|
113
119
|
f"({type(e).__name__}: {str(e)[:120]}); falling back to "
|
|
114
120
|
f"FOREGROUND new_page (focus steal likely)")
|
|
115
121
|
print(msg, file=sys.stderr)
|
|
116
|
-
|
|
117
|
-
_p = os.path.expanduser("~/.claude/browser-profiles/browser-activity.log")
|
|
118
|
-
with open(_p, "a") as _f:
|
|
119
|
-
import time as _t
|
|
120
|
-
_f.write(f"[{_t.strftime('%Y-%m-%d %H:%M:%S')}] pycdp "
|
|
121
|
-
f"script=browser_lifecycle.py action=fg_fallback "
|
|
122
|
-
f"pid={os.getpid()} detail={type(e).__name__}\n")
|
|
123
|
-
except Exception:
|
|
124
|
-
pass
|
|
122
|
+
_activity_log("fg_fallback", f"detail={type(e).__name__}")
|
|
125
123
|
return context.new_page()
|
|
126
124
|
|
|
127
125
|
|
|
126
|
+
def _activity_log(action: str, detail: str = "") -> None:
|
|
127
|
+
"""One line into the universal browser-activity.log (same file the
|
|
128
|
+
Python-CDP attach logging uses). Best-effort; never raises."""
|
|
129
|
+
try:
|
|
130
|
+
import time as _t
|
|
131
|
+
|
|
132
|
+
_p = os.path.expanduser("~/.claude/browser-profiles/browser-activity.log")
|
|
133
|
+
with open(_p, "a") as _f:
|
|
134
|
+
_f.write(f"[{_t.strftime('%Y-%m-%d %H:%M:%S')}] pycdp "
|
|
135
|
+
f"script=browser_lifecycle.py action={action} "
|
|
136
|
+
f"pid={os.getpid()} argv0={os.path.basename(sys.argv[0] or '?')} "
|
|
137
|
+
f"{detail}\n")
|
|
138
|
+
except Exception:
|
|
139
|
+
pass
|
|
140
|
+
|
|
141
|
+
|
|
128
142
|
def register_park_on_exit(cdp_base: str, host_markers, park_url: str, label: str) -> None:
|
|
129
143
|
"""Arm park_tabs to run at process exit, once per (endpoint, park_url).
|
|
130
144
|
Call from a platform lib's get_browser_and_page so only processes that
|