@m13v/s4l 1.7.6-rc.8 → 1.7.6

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.
Files changed (85) hide show
  1. package/README.md +1 -1
  2. package/bin/cli.js +33 -9
  3. package/mcp/dist/index.js +290 -177
  4. package/mcp/dist/panel.html +31 -17
  5. package/mcp/dist/setup.js +27 -7
  6. package/mcp/dist/telemetry.js +15 -6
  7. package/mcp/dist/version.json +2 -2
  8. package/mcp/manifest.json +10 -2
  9. package/mcp/menubar/s4l_browser_foreground.py +7 -1
  10. package/mcp/menubar/s4l_card.py +63 -4
  11. package/mcp/menubar/s4l_card_canvas.py +62 -11
  12. package/mcp/menubar/s4l_menubar.py +380 -95
  13. package/mcp/menubar/s4l_state.py +119 -41
  14. package/mcp/package.json +1 -1
  15. package/package.json +1 -1
  16. package/scripts/account_resolver.py +58 -14
  17. package/scripts/amplitude_24h_signups.py +7 -4
  18. package/scripts/amplitude_signups.py +7 -4
  19. package/scripts/autopilot_stall_watch.py +8 -1
  20. package/scripts/browser_lifecycle.py +90 -0
  21. package/scripts/cdp_ready_check.py +81 -50
  22. package/scripts/claude_job.py +70 -10
  23. package/scripts/dm_conversation.py +15 -12
  24. package/scripts/draft_prompt_core.py +132 -64
  25. package/scripts/engage_github.py +11 -5
  26. package/scripts/engage_reddit.py +12 -5
  27. package/scripts/engagement_signal_feedback.py +1 -4
  28. package/scripts/engagement_styles.py +144 -105
  29. package/scripts/feedback_digest.py +54 -11
  30. package/scripts/find_threads.py +9 -7
  31. package/scripts/github_tools.py +23 -10
  32. package/scripts/learned_preferences.py +112 -78
  33. package/scripts/li_discovery.py +4 -1
  34. package/scripts/link_tail.py +1 -1
  35. package/scripts/live_status.py +151 -0
  36. package/scripts/merge_review_queue.py +15 -2
  37. package/scripts/patches/browser-harness-focus-and-observability.patch +130 -0
  38. package/scripts/pick_project.py +7 -4
  39. package/scripts/pick_thread_target.py +64 -13
  40. package/scripts/pick_twitter_thread_target.py +7 -4
  41. package/scripts/platform_strike_events.py +139 -7
  42. package/scripts/post_github.py +376 -35
  43. package/scripts/post_reddit.py +202 -192
  44. package/scripts/preflight.sh +23 -3
  45. package/scripts/preview_reddit_card.py +38 -0
  46. package/scripts/project_stats.py +7 -4
  47. package/scripts/reddit_ban_check.py +324 -0
  48. package/scripts/reddit_browser.py +56 -19
  49. package/scripts/reddit_chat_sync.py +10 -11
  50. package/scripts/reddit_tools.py +20 -4
  51. package/scripts/release-mcpb.sh +47 -7
  52. package/scripts/run_moltbook_cycle.py +9 -5
  53. package/scripts/s4l_ctl.sh +2 -2
  54. package/scripts/s4l_posting_mode.py +67 -6
  55. package/scripts/scan_dm_candidates.py +15 -9
  56. package/scripts/scan_github_replies.py +9 -7
  57. package/scripts/scan_moltbook_replies.py +7 -6
  58. package/scripts/scan_reddit_replies.py +11 -7
  59. package/scripts/scan_twitter_mentions_browser.py +7 -6
  60. package/scripts/scan_twitter_thread_followups.py +7 -6
  61. package/scripts/schedule_state.py +8 -4
  62. package/scripts/score_twitter_candidates.py +8 -3
  63. package/scripts/setup_twitter_auth.py +20 -96
  64. package/scripts/snapshot.py +19 -0
  65. package/scripts/stats.py +12 -10
  66. package/scripts/strike_alert.py +165 -12
  67. package/scripts/sub_moderation_history.py +129 -0
  68. package/scripts/subreddit_bans_client.py +157 -0
  69. package/scripts/test_cross_language_parity.py +185 -0
  70. package/scripts/test_no_silent_fallbacks.py +84 -0
  71. package/scripts/test_percard_posting.py +3 -3
  72. package/scripts/test_stall_watch_batch_progression.py +99 -0
  73. package/scripts/top_performers.py +24 -0
  74. package/scripts/twitter_browser.py +22 -52
  75. package/scripts/twitter_gen_links.py +3 -3
  76. package/scripts/twitter_post_plan.py +4 -4
  77. package/scripts/virality.py +151 -0
  78. package/setup/SKILL.md +1 -1
  79. package/skill/engage-dm-replies.sh +11 -0
  80. package/skill/lib/reddit-backend.sh +1 -0
  81. package/skill/run-draft-and-publish.sh +16 -0
  82. package/skill/run-reddit-search-launchd.sh +1 -0
  83. package/skill/run-reddit-search.sh +10 -1
  84. package/skill/run-reddit-threads.sh +12 -0
  85. package/skill/run-twitter-cycle.sh +104 -88
package/README.md CHANGED
@@ -157,7 +157,7 @@ The plugin exposes MCP tools for the user-facing workflow:
157
157
  - `project_config` configures projects, products, voice, topics, and X auth.
158
158
  - `engagement_mode` chooses personal-brand and product-promotion lanes.
159
159
  - `dashboard` opens the review dashboard.
160
- - `post_drafts` posts only the drafts the user selected.
160
+ - `approve_drafts` posts only the drafts the user selected.
161
161
  - `get_stats` reads X/Twitter stats.
162
162
  - `pause_s4l` pauses or resumes scheduled S4L jobs.
163
163
  - `runtime` installs, updates, and diagnoses the local runtime.
package/bin/cli.js CHANGED
@@ -434,19 +434,43 @@ function installBrowserHarness() {
434
434
  // we don't control the upstream repo. If it stops applying, upstream has
435
435
  // either merged the fix (detected; fine) or refactored (warn); never fail
436
436
  // the install over it.
437
- const harnessPatch = path.join(PKG_ROOT, 'scripts', 'patches', 'browser-harness-loopback-cdp-proxy.patch');
438
- if (fs.existsSync(harnessPatch)) {
439
- const chk = spawnSync('git', ['-C', harnessDir, 'apply', '--check', harnessPatch], { stdio: 'pipe' });
437
+ // Vendored fixes applied on top of the pin (we don't control upstream).
438
+ // Each: patch file + a sentinel (file, substring) that means "already
439
+ // present" (upstream merged it, or we applied it) so a non-applying patch
440
+ // only warns when the fix is genuinely absent. NEVER fail the install.
441
+ const vendoredPatches = [
442
+ {
443
+ file: 'browser-harness-loopback-cdp-proxy.patch',
444
+ sentinelFile: path.join('src', 'browser_harness', 'admin.py'),
445
+ sentinelStr: 'cdp_urlopen',
446
+ label: 'loopback-proxy',
447
+ absentWarn: 'CDP probes may 403 behind a system proxy',
448
+ },
449
+ {
450
+ // Suppress OS-focus-stealing Target.activateTarget on offscreen
451
+ // automation harnesses (twitter/reddit/linkedin) — the shared fix for
452
+ // the 2026-07 Chrome focus-pops. See helpers.py _is_offscreen_harness.
453
+ file: 'browser-harness-focus-and-observability.patch',
454
+ sentinelFile: path.join('src', 'browser_harness', 'helpers.py'),
455
+ sentinelStr: '_is_offscreen_harness',
456
+ label: 'focus-suppression + tab-event observability',
457
+ absentWarn: 'harness Chrome may steal OS focus on every tab switch',
458
+ },
459
+ ];
460
+ for (const p of vendoredPatches) {
461
+ const patchPath = path.join(PKG_ROOT, 'scripts', 'patches', p.file);
462
+ if (!fs.existsSync(patchPath)) continue;
463
+ const chk = spawnSync('git', ['-C', harnessDir, 'apply', '--check', patchPath], { stdio: 'pipe' });
440
464
  if (chk.status === 0) {
441
- spawnSync('git', ['-C', harnessDir, 'apply', harnessPatch], { stdio: 'inherit' });
442
- console.log(' applied loopback-proxy patch to browser-harness');
465
+ spawnSync('git', ['-C', harnessDir, 'apply', patchPath], { stdio: 'inherit' });
466
+ console.log(` applied ${p.label} patch to browser-harness`);
443
467
  } else {
444
- let fixedUpstream = false;
468
+ let present = false;
445
469
  try {
446
- fixedUpstream = fs.readFileSync(path.join(harnessDir, 'src', 'browser_harness', 'admin.py'), 'utf-8').includes('cdp_urlopen');
470
+ present = fs.readFileSync(path.join(harnessDir, p.sentinelFile), 'utf-8').includes(p.sentinelStr);
447
471
  } catch { /* file moved — fall through to the warning */ }
448
- if (!fixedUpstream) {
449
- console.warn(' WARNING: browser-harness loopback-proxy patch no longer applies and the fix is absent upstream; CDP probes may 403 behind a system proxy.');
472
+ if (!present) {
473
+ console.warn(` WARNING: browser-harness ${p.label} patch no longer applies and the fix is absent upstream; ${p.absentWarn}.`);
450
474
  }
451
475
  }
452
476
  }