11 Commits

Author SHA1 Message Date
b5f3646ea5 Update CLAUDE.md: reflect docker-server deployment
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 17:16:54 -07:00
dacc7604cc Migrate to Docker: containerize for docker-server deployment
- Add Dockerfile + cron.js (daily 4pm UTC loop replacing EC2 cron)
- Add infra/docker-compose.yml and deploy-stack.sh for Portainer
- Support DATA_DIR env var in bot.js for persistent history volume
- Support PROMPTS_JSON env var in cron.js (no SSH needed for config)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 17:15:18 -07:00
Matt Jackson
ab32ef4cc2 Fix login flow: adaptive page reading, keyboard.type, session cleanup
- Adaptive login loop reads page state each step and responds accordingly
- Switched from fill() to keyboard.type() for anti-detection
- Navigate to /compose/post for posting instead of sidebar button
- Clean up stale browser sessions before creating new ones
- Fixed +1 country code for phone verification

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 23:39:13 +00:00
Matt Jackson
4de71c5cd4 Add README and MIT license
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 23:19:59 +00:00
Matt Jackson
28c5020294 Prepare for public repo: gitignore prompts.json, add examples
- prompts.json now gitignored (contains account-specific config)
- Added prompts.example.json showing config structure
- Added .env.example with credential template

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 23:15:14 +00:00
Matt Jackson
32649b0025 Multi-account support: credentials keyed by account name
- prompts.json now has account field per prompt
- bot.js looks up env vars by account prefix (e.g. THEJUNIPERSKY_USER)
- .env restructured with account-prefixed credentials
- Adding a new Twitter account = new env vars + new prompt blocks

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 23:13:37 +00:00
Matt Jackson
d2ca2d23ba Consolidate schedule config, support multi-post per day
- Schedule config moved to nested schedule object in prompts.json
- Scheduler picks 1-3 random times for personality with 4hr min gap
- shouldRun reads from schedule object

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 23:12:29 +00:00
Matt Jackson
417f943239 Generic link placeholders, code cleanup
- Links now use <placeholder> syntax in prompts, replaced after AI generation
- Removed dead existsSync import
- Moved generation instructions into prompts.json (out of buildPrompt)
- Fixed variable shadowing (url -> linkUrl, page -> pageState)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 23:07:36 +00:00
Matt Jackson
1067ec2f78 Change tease to random frequency with 2-day minimum spacing
Replaces 2x_week cap with random posting: enforces minDays gap
then 50% chance each eligible day for natural randomness.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 23:05:31 +00:00
Matt Jackson
aba0415fe5 Add personality prompt and clean up tease prompt
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 23:04:21 +00:00
Matt Jackson
05baa8c573 Initial commit: config-driven Twitter bot with multi-prompt support
- Kernel.sh stealth browser for X login and posting
- Claude Sonnet 4.6 for tweet generation
- prompts.json for configurable prompts with frequency/scheduling
- Per-prompt history tracking to avoid repetition
- Scheduler with random time window support

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 23:03:21 +00:00