@m13v/s4l 1.6.201 → 1.6.202

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.
@@ -1,4 +1,4 @@
1
1
  {
2
- "version": "1.6.201",
3
- "installedAt": "2026-07-04T00:10:10.313Z"
2
+ "version": "1.6.202",
3
+ "installedAt": "2026-07-04T00:16:33.149Z"
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.201",
5
+ "version": "1.6.202",
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.6.201",
3
+ "version": "1.6.202",
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.6.201",
3
+ "version": "1.6.202",
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",
@@ -381,21 +381,34 @@ def _bump_drain_timeout() -> None:
381
381
  # never signalled.
382
382
  # * Best-effort throughout: never raises into the caller, never changes the
383
383
  # worker's exit code, never touches the result already written to disk.
384
+ # LOOSE ancestry probe (2026-07-04). The original tuple duplicated the reaper's
385
+ # strict cmdline signature, which Claude Desktop 1.18286.0 broke (Karol's second
386
+ # leak: 53 workers piled up while both the reaper AND this self-reap failed the
387
+ # same parse). Inside our OWN ancestry the strict fingerprint is unnecessary:
388
+ # identification is DETERMINISTIC by construction — claude_job runs as a Bash
389
+ # child of the session that invoked it, so the nearest claude-code agent-mode
390
+ # ancestor IS that session. What the loose probe cannot tell apart is a
391
+ # SCHEDULED WORKER session vs an INTERACTIVE session where someone ran
392
+ # `claude_job next` by hand — that discrimination comes from the cwd gate in
393
+ # _maybe_self_reap (worker tasks run in ~/.s4l-worker; interactive sessions
394
+ # never do), not from cmdline shape.
384
395
  _SELF_REAP_SIG = (
385
396
  "claude-code/",
386
- "/Contents/MacOS/claude ",
387
397
  "--input-format stream-json",
388
- "local-agent-mode-sessions",
389
398
  )
390
- _SELF_REAP_UUID_RE = re.compile(r"local-agent-mode-sessions/[0-9a-fA-F-]{36}")
399
+ _S4L_WORKER_CWD = os.path.join(os.path.expanduser("~"), ".s4l-worker")
391
400
 
392
401
 
393
402
  def _self_reap_enabled() -> bool:
394
- return os.environ.get("S4L_WORKER_SELF_REAP", "").strip().lower() in (
395
- "1",
396
- "true",
397
- "yes",
398
- "on",
403
+ # Default ON since 2026-07-04 (v1.6.202): the dormant flag meant the
404
+ # source-side trim never ran anywhere, leaving the (signature-fragile)
405
+ # launchd reaper as the only defense — and when Desktop changed the cmdline
406
+ # shape, boxes leaked. Opt OUT with S4L_WORKER_SELF_REAP=0.
407
+ return os.environ.get("S4L_WORKER_SELF_REAP", "").strip().lower() not in (
408
+ "0",
409
+ "false",
410
+ "no",
411
+ "off",
399
412
  )
400
413
 
401
414
 
@@ -424,8 +437,10 @@ def _ps_pid_map() -> dict:
424
437
 
425
438
 
426
439
  def _find_own_session(psmap: dict):
427
- """Walk OUR ancestry to the nearest claude agent-mode worker session that
428
- matches the reaper signature. Returns (pid, uuid_token) or None."""
440
+ """Walk OUR ancestry to the nearest claude-code agent-mode ancestor.
441
+ Returns (pid, reverify_token) or None. The token is a stable cmdline prefix
442
+ used to confirm the PID was not recycled before signalling — no UUID/path
443
+ shape assumptions, so a Desktop cmdline change cannot blind this again."""
429
444
  pid = os.getpid()
430
445
  seen: set = set()
431
446
  for _ in range(40): # bounded climb up the process tree
@@ -437,9 +452,7 @@ def _find_own_session(psmap: dict):
437
452
  break
438
453
  ppid, cmd = ent
439
454
  if all(t in cmd for t in _SELF_REAP_SIG) and "Helpers/disclaimer" not in cmd:
440
- m = _SELF_REAP_UUID_RE.search(cmd)
441
- if m:
442
- return pid, m.group(0)
455
+ return pid, cmd[:160]
443
456
  pid = ppid
444
457
  if pid <= 1:
445
458
  break
@@ -447,10 +460,19 @@ def _find_own_session(psmap: dict):
447
460
 
448
461
 
449
462
  def _maybe_self_reap(delay: float = 6.0) -> None:
450
- """Opt-in: terminate our own finished worker session. See block comment above."""
463
+ """Terminate our own finished worker session. See block comment above.
464
+
465
+ The cwd gate is the worker-vs-interactive discriminator: scheduled worker
466
+ tasks run with cwd ~/.s4l-worker (enforced at task creation + menubar cwd
467
+ rewrite), while an interactive/debug session that shells `claude_job` runs
468
+ in a project dir. Interactive sessions are therefore never signalled, no
469
+ matter what their cmdline looks like."""
451
470
  if not _self_reap_enabled():
452
471
  return
453
472
  try:
473
+ cwd = os.getcwd()
474
+ if cwd != _S4L_WORKER_CWD and not cwd.startswith(_S4L_WORKER_CWD + os.sep):
475
+ return
454
476
  found = _find_own_session(_ps_pid_map())
455
477
  if not found:
456
478
  return