social-autoposter 1.6.16 → 1.6.18
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/bin/cli.js +63 -0
- package/bin/server.js +3421 -1266
- package/browser-agent-configs/all-agents-mcp.json +21 -2
- package/browser-agent-configs/linkedin-harness-mcp.json +21 -0
- package/mcp/dist/index.js +676 -0
- package/mcp/dist/repo.js +92 -0
- package/mcp/dist/setup.js +239 -0
- package/mcp/dist/twitterAuth.js +70 -0
- package/mcp/dist/version.js +81 -0
- package/mcp/install.mjs +160 -0
- package/mcp/manifest.json +65 -0
- package/mcp/package.json +25 -0
- package/package.json +6 -2
- package/scripts/_li_discover_pending.py +47 -48
- package/scripts/_phaseA_build_envelope.py +135 -0
- package/scripts/_phaseA_select_5AI7GO.py +191 -0
- package/scripts/_redditlink_finalize.py +50 -0
- package/scripts/_seo_lane_roi.py +2 -2
- package/scripts/audit_helper.py +120 -0
- package/scripts/backfill_aggregate_stats.py +1 -1
- package/scripts/backfill_crossroute_attribution.py +136 -0
- package/scripts/backfill_twitter_attempts_topic.py +118 -0
- package/scripts/browser_watch.py +145 -0
- package/scripts/campaign_bump.py +3 -29
- package/scripts/check_unread_web_chats.py +9 -89
- package/scripts/claim_web_chat.py +16 -36
- package/scripts/cleanup_harness_tabs.py +6 -1
- package/scripts/counterparty_history.py +104 -2
- package/scripts/db.py +1 -1
- package/scripts/delete_twitter_posts.py +272 -0
- package/scripts/discover_linkedin_candidates.py +169 -113
- package/scripts/dm_conversation.py +387 -1294
- package/scripts/dm_engage_helper.py +161 -0
- package/scripts/dm_short_links.py +257 -408
- package/scripts/dump_web_chat_history.py +11 -50
- package/scripts/engage_github.py +60 -2
- package/scripts/engage_reddit.py +33 -1
- package/scripts/engage_twitter_helper.py +23 -4
- package/scripts/engagement_styles.py +482 -303
- package/scripts/fetch_prospect_profile.py +125 -39
- package/scripts/finalize_post_101.py +170 -0
- package/scripts/find_threads.py +4 -3
- package/scripts/fix_style_lengths_20260601.py +93 -0
- package/scripts/generate_daily_human_style.py +281 -95
- package/scripts/get_run_cost.py +9 -44
- package/scripts/github_engage_helper.py +93 -0
- package/scripts/http_api.py +4 -3
- package/scripts/human_dm_replies_helper.py +169 -0
- package/scripts/ig_post_type_picker.py +39 -100
- package/scripts/ingest_human_dm_replies.py +27 -41
- package/scripts/ingest_web_chat_replies.py +17 -30
- package/scripts/insert_li_notifs.py +69 -0
- package/scripts/insert_post_072.py +128 -0
- package/scripts/insert_post_074.py +121 -0
- package/scripts/insert_post_082.py +82 -0
- package/scripts/install_lane_digest.py +23 -12
- package/scripts/invent_mcp_server.py +350 -0
- package/scripts/invent_topics.py +1462 -0
- package/scripts/li_discover_insert.py +41 -31
- package/scripts/li_discovery.py +161 -0
- package/scripts/li_notif_scan_process.py +204 -0
- package/scripts/li_process_notifications.py +40 -44
- package/scripts/li_process_notifs.py +69 -0
- package/scripts/link_edit_helper.py +142 -0
- package/scripts/link_tail.py +100 -6
- package/scripts/linkedin_browser.py +170 -135
- package/scripts/linkedin_killswitch.py +305 -0
- package/scripts/linkedin_search_topic_schema.py +49 -0
- package/scripts/linkedin_unipile.py +614 -0
- package/scripts/linkedin_url.py +33 -58
- package/scripts/log_claude_session.py +2 -9
- package/scripts/log_linkedin_search_attempts.py +30 -21
- package/scripts/log_post.py +141 -0
- package/scripts/log_run.py +115 -4
- package/scripts/log_twitter_search_attempts.py +22 -6
- package/scripts/lookup_post.py +20 -30
- package/scripts/mark_web_chat_processed.py +8 -21
- package/scripts/migrate_mentions_out_of_posts.py +1 -1
- package/scripts/moltbook_tools.py +1 -1
- package/scripts/pending_threads.py +39 -128
- package/scripts/pick_project.py +4 -2
- package/scripts/pick_search_topic.py +771 -0
- package/scripts/post_github.py +2 -1
- package/scripts/post_reddit.py +203 -56
- package/scripts/precompute_dashboard_stats.py +44 -12
- package/scripts/process_li_notifs.py +140 -0
- package/scripts/project_excludes.py +13 -19
- package/scripts/project_stats_json.py +132 -21
- package/scripts/project_topics.py +96 -0
- package/scripts/qualified_query_bank.py +295 -0
- package/scripts/reddit_browser.py +129 -27
- package/scripts/reddit_browser_fetch.py +141 -0
- package/scripts/reddit_browser_lock.py +24 -2
- package/scripts/reddit_query_bank.py +200 -0
- package/scripts/reddit_threads_helper.py +151 -0
- package/scripts/reddit_tools.py +63 -8
- package/scripts/reply_db.py +171 -0
- package/scripts/run_moltbook_cycle.py +7 -2
- package/scripts/scan_dm_candidates.py +131 -4
- package/scripts/scan_twitter_mentions_browser.py +5 -3
- package/scripts/scan_twitter_thread_followups.py +30 -19
- package/scripts/score_linkedin_candidates.py +73 -110
- package/scripts/score_twitter_candidates.py +257 -6
- package/scripts/scrape_linkedin_comment_stats.py +1276 -29
- package/scripts/seed_search_topics.py +127 -0
- package/scripts/send_web_chat_reply.py +41 -92
- package/scripts/setup_twitter_auth.py +448 -0
- package/scripts/{update_stats.py → stats.py} +382 -42
- package/scripts/stats_helper.py +52 -0
- package/scripts/strike_alert.py +4 -4
- package/scripts/style_length_report.py +287 -0
- package/scripts/sync_ig_to_posts.py +34 -0
- package/scripts/tmp_fix32992.py +17 -0
- package/scripts/tmp_recover.py +17 -0
- package/scripts/top_dud_linkedin_queries.py +19 -38
- package/scripts/top_dud_twitter_topics.py +102 -0
- package/scripts/top_linkedin_queries.py +19 -32
- package/scripts/top_search_topics.py +44 -153
- package/scripts/top_twitter_queries.py +106 -21
- package/scripts/twitter_browser.py +137 -2
- package/scripts/twitter_cycle_helper.py +42 -16
- package/scripts/twitter_gen_links.py +1 -1
- package/scripts/twitter_post_plan.py +151 -13
- package/scripts/twitter_scan.py +302 -0
- package/scripts/unclaim_web_chat.py +4 -15
- package/scripts/update_linkedin_stats_from_feed.py +98 -125
- package/scripts/watchdog_hung_runs.py +16 -4
- package/skill/audit-dm-staleness.sh +10 -23
- package/skill/audit-linkedin.sh +10 -0
- package/skill/audit-reddit-resurrect.sh +14 -12
- package/skill/audit.sh +91 -32
- package/skill/backfill-twitter-attempts-topic.sh +19 -0
- package/skill/backfill-twitter-ghost-posts.sh +24 -0
- package/skill/check-web-chats.sh +5 -8
- package/skill/dm-outreach-linkedin.sh +62 -49
- package/skill/dm-outreach-reddit.sh +15 -17
- package/skill/engage-dm-replies.sh +132 -237
- package/skill/engage-linkedin.sh +236 -130
- package/skill/engage-reddit.sh +10 -2
- package/skill/engage-twitter.sh +105 -14
- package/skill/github-engage.sh +15 -11
- package/skill/ingest-web-chat-replies.sh +2 -4
- package/skill/invent-supply-test.sh +95 -0
- package/skill/invent-topics.sh +50 -0
- package/skill/lib/linkedin-backend.sh +307 -0
- package/skill/lib/reddit-backend.sh +218 -0
- package/skill/lib/twitter-backend.sh +11 -7
- package/skill/link-edit-github.sh +14 -24
- package/skill/link-edit-moltbook.sh +11 -22
- package/skill/link-edit-reddit.sh +30 -34
- package/skill/lock.sh +65 -6
- package/skill/run-cycle-update-guard.sh +44 -0
- package/skill/run-generate-daily-style.sh +12 -7
- package/skill/run-instagram-render.sh +98 -135
- package/skill/run-linkedin-launchd.sh +11 -0
- package/skill/run-linkedin-unipile.sh +130 -0
- package/skill/run-linkedin.sh +901 -201
- package/skill/run-reddit-search.sh +42 -34
- package/skill/run-reddit-threads.sh +133 -83
- package/skill/run-twitter-cycle-singleton.sh +38 -67
- package/skill/run-twitter-cycle.sh +827 -348
- package/skill/run-twitter-threads.sh +47 -52
- package/skill/social-autoposter-update.sh +66 -0
- package/skill/stats-linkedin.sh +102 -20
- package/skill/stats.sh +17 -19
- package/skill/styles.sh +7 -1
- package/skill/topics.sh +51 -0
- package/scripts/reconcile_twitter_search_topic.py +0 -125
- package/skill/engage.sh +0 -292
- package/skill/link-edit-linkedin.sh +0 -147
- package/skill/octolens-linkedin.sh +0 -4
- package/skill/octolens-reddit.sh +0 -4
- package/skill/octolens-twitter.sh +0 -4
- package/skill/octolens.sh +0 -163
package/bin/cli.js
CHANGED
|
@@ -24,6 +24,7 @@ const COPY_TARGETS = [
|
|
|
24
24
|
'setup',
|
|
25
25
|
'browser-agent-configs',
|
|
26
26
|
'mcp-servers',
|
|
27
|
+
'mcp',
|
|
27
28
|
];
|
|
28
29
|
|
|
29
30
|
const ENV_TEMPLATE = `# social-autoposter environment variables
|
|
@@ -53,6 +54,7 @@ const BROWSER_AGENT_CONFIGS = [
|
|
|
53
54
|
'linkedin-agent-mcp.json',
|
|
54
55
|
'linkedin-agent.json',
|
|
55
56
|
'twitter-harness-mcp.json',
|
|
57
|
+
'linkedin-harness-mcp.json',
|
|
56
58
|
'all-agents-mcp.json',
|
|
57
59
|
];
|
|
58
60
|
|
|
@@ -553,6 +555,18 @@ function generatePlists() {
|
|
|
553
555
|
stdoutLog: `${DEST}/skill/logs/launchd-stats-stdout.log`,
|
|
554
556
|
stderrLog: `${DEST}/skill/logs/launchd-stats-stderr.log`,
|
|
555
557
|
},
|
|
558
|
+
{
|
|
559
|
+
// Daily self-updater. Pulls + installs the latest published release so a
|
|
560
|
+
// hands-free / headless install never drifts stale. The script refuses to
|
|
561
|
+
// touch a .git dev checkout, so it is a safe no-op on a source box.
|
|
562
|
+
file: 'com.m13v.social-autoposter-update.plist',
|
|
563
|
+
label: 'com.m13v.social-autoposter-update',
|
|
564
|
+
script: `${DEST}/skill/social-autoposter-update.sh`,
|
|
565
|
+
interval: 86400,
|
|
566
|
+
runAtLoad: true,
|
|
567
|
+
stdoutLog: `${DEST}/skill/logs/launchd-self-update-stdout.log`,
|
|
568
|
+
stderrLog: `${DEST}/skill/logs/launchd-self-update-stderr.log`,
|
|
569
|
+
},
|
|
556
570
|
];
|
|
557
571
|
|
|
558
572
|
const driver = scheduler.driverFor();
|
|
@@ -701,6 +715,7 @@ function init() {
|
|
|
701
715
|
|
|
702
716
|
installPythonDeps();
|
|
703
717
|
removeLegacyEngagementStylesSidecar();
|
|
718
|
+
installMcp();
|
|
704
719
|
|
|
705
720
|
// Remove stale skill/SKILL.md if it exists (SKILL.md lives at repo root only)
|
|
706
721
|
const skillMd = path.join(DEST, 'skill', 'SKILL.md');
|
|
@@ -771,6 +786,7 @@ function update() {
|
|
|
771
786
|
// and the candidate-style sidecar gets merged (preserves VM-side candidates).
|
|
772
787
|
installPythonDeps();
|
|
773
788
|
removeLegacyEngagementStylesSidecar();
|
|
789
|
+
installMcp();
|
|
774
790
|
|
|
775
791
|
// Remove stale skill/SKILL.md if it exists (SKILL.md lives at repo root only)
|
|
776
792
|
const skillMd = path.join(DEST, 'skill', 'SKILL.md');
|
|
@@ -824,6 +840,53 @@ function installPythonDeps() {
|
|
|
824
840
|
}
|
|
825
841
|
}
|
|
826
842
|
|
|
843
|
+
// Set up the social-autoposter MCP server (the X/Twitter draft/autopilot/stats
|
|
844
|
+
// surface for Claude Desktop + Claude Code). The package ships a prebuilt
|
|
845
|
+
// mcp/dist/, so we only install the runtime deps (@modelcontextprotocol/sdk +
|
|
846
|
+
// zod) and register the server into both clients. REPO_DIR auto-resolves to
|
|
847
|
+
// ~/social-autoposter (mcp/../..) so no env wiring is needed beyond what
|
|
848
|
+
// install.mjs pins. Idempotent; safe on both init and update.
|
|
849
|
+
function installMcp() {
|
|
850
|
+
const mcpDest = path.join(DEST, 'mcp');
|
|
851
|
+
if (!fs.existsSync(path.join(mcpDest, 'package.json'))) {
|
|
852
|
+
console.warn(' WARNING: mcp/ missing from install — skipping MCP setup');
|
|
853
|
+
return;
|
|
854
|
+
}
|
|
855
|
+
// Stamp the REAL shipped version (this npm package's version) into the MCP so
|
|
856
|
+
// it can report itself accurately at runtime. The top-level package.json is
|
|
857
|
+
// NOT copied into the install, so without this the MCP can't see its true
|
|
858
|
+
// version. mcp/src/version.ts reads dist/version.json first. Refreshed on
|
|
859
|
+
// every init/update.
|
|
860
|
+
try {
|
|
861
|
+
const pkgVersion = require('../package.json').version;
|
|
862
|
+
const distDir = path.join(mcpDest, 'dist');
|
|
863
|
+
fs.mkdirSync(distDir, { recursive: true });
|
|
864
|
+
fs.writeFileSync(
|
|
865
|
+
path.join(distDir, 'version.json'),
|
|
866
|
+
JSON.stringify({ version: pkgVersion, installedAt: new Date().toISOString() }, null, 2)
|
|
867
|
+
);
|
|
868
|
+
console.log(' stamped MCP version', pkgVersion);
|
|
869
|
+
} catch (e) {
|
|
870
|
+
console.warn(' WARNING: could not stamp MCP version:', e && e.message);
|
|
871
|
+
}
|
|
872
|
+
console.log(' installing MCP runtime deps (npm install --omit=dev in mcp/)');
|
|
873
|
+
const npmRes = spawnSync('npm', ['install', '--omit=dev', '--no-audit', '--no-fund'], {
|
|
874
|
+
cwd: mcpDest,
|
|
875
|
+
stdio: 'inherit',
|
|
876
|
+
});
|
|
877
|
+
if (npmRes.status !== 0) {
|
|
878
|
+
console.warn(' WARNING: npm install in mcp/ failed — run manually:');
|
|
879
|
+
console.warn(' (cd ~/social-autoposter/mcp && npm install --omit=dev)');
|
|
880
|
+
return;
|
|
881
|
+
}
|
|
882
|
+
console.log(' registering social-autoposter MCP with Claude Desktop + Claude Code');
|
|
883
|
+
const reg = spawnSync('node', ['install.mjs'], { cwd: mcpDest, stdio: 'inherit' });
|
|
884
|
+
if (reg.status !== 0) {
|
|
885
|
+
console.warn(' WARNING: MCP client registration failed — run manually:');
|
|
886
|
+
console.warn(' (cd ~/social-autoposter/mcp && node install.mjs)');
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
|
|
827
890
|
// Sweep the legacy candidate-style sidecar JSON + lock file off every install.
|
|
828
891
|
// The taxonomy lives in Postgres `engagement_styles_registry` now (single
|
|
829
892
|
// source of truth for all installs, no per-machine JSON drift); see
|