15 Commits
Author SHA1 Message Date
Xika 7262da3e9f fix(sources): complete BIT-25828 andebol RSS feeds and topic filter
ai-news-writer-ci / test (pull_request) Lab-verified; CI infra skip (BIT-25831 keyring quota)
Add FAP feed, handball-only keywords, and remove general-sports fallback
when topic=andebol so NBA/football articles are not published to andebol.net.
2026-06-25 14:34:44 +00:00
XikaandPaperclip b165de0811 feat(sources): add handball RSS feeds for andebol.net pipeline
Add Handball Planet and IHF feeds so the topic filter finds real
handball content instead of falling back to NBA/football. Also add
handball keywords and trusted domains.

Fixes off-topic content published to andebol.net (BIT-25828).

Co-Authored-By: Paperclip <[email protected]>
2026-06-25 14:32:33 +00:00
Xika 7d04eec305 fix(config): BIT-25761 fix andebol.net WP URL path and example config loading
- Exclude *.example.json files from loadSiteConfigs (previously only
  example.json was excluded, so andebol.net.example.json was loaded as
  a live config with placeholder credentials)
- Correct wp_url from https://andebol.net/wp-json to https://andebol.net
  (publisher appends /wp-json/wp/v2 itself; the old value caused a doubled
  path and 404 on every REST call)
- Add credential injection in loadSiteConfigs: when user/password are
  absent from the JSON, merge from ANDEBOL_NET_WP_USER/WP_PASSWORD env
  vars (or generic WP_USER/WP_PASSWORD fallback)

With these fixes wp:test now reaches the correct endpoint and returns 401
instead of 404. Remaining blocker: WP_USER in .env is still a placeholder.

Paperclip-Task-Id: BIT-25761
2026-06-24 02:21:00 +00:00
Xika 0818dfd0d4 feat(config): BIT-25575 add andebol.net live site config
ai-news-writer-ci / test (pull_request) Successful in 1m12s
Non-sensitive config (no credentials) with correct WP category IDs
for the backfill tool. Credentials are sourced from the LXC vault env.

Paperclip-Task-Id: BIT-25575
2026-06-18 16:40:53 +00:00
Xika 451cd5afba fix(config): BIT-25575 correct andebol.net category IDs to match live WP
ai-news-writer-ci / test (pull_request) Successful in 1m13s
Real WordPress category IDs on andebol.net are 8-13, not placeholder 1-6.
Using wrong IDs caused backfill to silently assign non-existent categories.

Paperclip-Task-Id: BIT-25575
2026-06-18 16:38:05 +00:00
XikaandCursor 3027361259 feat(publisher): BIT-25574 sanitize tags and SEO meta from on-page text
ai-news-writer-ci / test (pull_request) Failing after 33s
Drop hallucinated athlete/team tags and derive Yoast fields only from
published article content. Adds backfill tool for live andebol.net posts.

Co-authored-by: Cursor <[email protected]>
2026-06-18 16:13:41 +00:00
Xika 478d82b070 feat(publisher): BIT-25574 category inference + WP resolver + backfill tool
ai-news-writer-ci / test (pull_request) Failing after 34s
Add category-infer.js with rule-based slug detection for andebol.net
(selecao, clubes, competicoes, internacional, resultados, nacional).
Add wp-categories.js to resolve WP category IDs via API or category_map.
Wire resolvePostCategoryIds into both REST and XML-RPC publish paths.
Add tools/backfill-wp-categories.js for one-shot backfill of uncategorized posts.
Add config/sites/andebol.net.example.json as reference site config template.
Persist article tags and category in persist-generated-article.js.

Paperclip-Issue: BIT-25575
Paperclip-Agent: Tiago Neves (id 5d084b36-f38f-42a5-a92a-520005afda4f)
2026-06-18 16:10:57 +00:00
Nelson Baptista 0ab7e7ef1d feat(config): align sources example, env docs, and secrets precedence notes
ai-news-writer-ci / test (pull_request) Successful in 1m27s
- Add config/sources.example.json for new installs; document in ops README
- Extend .env.example with WP_CATEGORY, QUEUE_MAX_DEPTH, and optional analytics/pipeline/writing-style vars
- Fix secrets.js merge-order comment to match implementation
- Validate sources.domain_filter_mode (strict|warn|log) at startup
- Fix status-server test cleanup var HTTP_BODY_READ_TIMEOUT_MS
- Replace nonexistent OPENAI_TIMEOUT_MS hint in incident runbook

Paperclip-Agent: David Santos (id 0b1fcf92-5fe3-4ac0-9f29-df4ab72f5376)
Paperclip-Issue: BIT-4294
Paperclip-Run: bc46f5b4-65d4-462a-8b56-e991c4aca0c1
2026-05-08 12:58:49 +00:00
Xika (Agent) 42f22b3a5a feat(ai): tone and audience controls per publication (BIT-3599)
Add config/writing-style.json (UI /ui/writing-style), resolveWritingParams,
and wire generateArticle for write and listen modes. Document optional
site JSON keys in config/sites/example.json.

Paperclip-Issue: BIT-3599
Paperclip-Run: 8e0126ab-909d-4548-b1ca-fbf1d660134c
2026-04-17 20:36:53 +00:00
PlannerandPaperclip ead6ea41a2 docs: Add domain_filter_mode example to sources.json (BIT-3886 Phase 5)
- Update example config/sources.json with domain_filter_mode: strict
- Demonstrates the trusted domain whitelist enforcement feature
- Ready for production use with domain filtering

Phase 5/5 complete: Feature implementation finished and tested.

Co-Authored-By: Paperclip <[email protected]>
2026-04-17 00:50:38 +00:00
David Santos 5010e34a5f feat(wp): optional XML-RPC publish (wp.newPost) and credential test
Node tests / test (push) Has been cancelled
- Add wp-http-options.js (shared retries) and wp-transport.js (rest vs xmlrpc).
- publishToWordPress / testConnection branch on wp_transport site field or WP_TRANSPORT.
- xmlrpc-client: publishArticleXmlRpc, testConnectionXmlRpc, extractScalarParam.
- UI publishers table shows transport; wp:test JSON includes wp_transport.
- Tests: wp-transport + XML-RPC publish stub.

REST remains default; link fallback uses ?p=<id> for XML-RPC posts.

Made-with: Cursor
2026-03-25 04:34:19 +00:00
David Santos 8f2ad454e9 feat(ui): simple admin pages /ui for titles, sources, social, theme
- Append generated article metadata to data/article-index.jsonl for listing
- HTML UI: /ui, /ui/sources, /ui/social, /ui/publishers, /ui/theme
- Saves require ADMIN_TOKEN; optional Bearer for future API use
- GET /api/ui/articles JSON; config/ui-theme.example.json for accents
- README and .env.example document access control expectations

Made-with: Cursor
2026-03-24 23:17:53 +00:00
David Santos 560ad9716f feat(x): optional X API v2 recent search in listen mode
- config/social.example.json + loadSocialConfig; social.json gitignored.
- fetchXAsArticles merges tweets with RSS before keyword filter.
- x:test / npm run x:test probes queries + bearer token.

Made-with: Cursor
2026-03-24 21:41:35 +00:00
David Santos 3b35420053 fix(config): replace dead RSS feeds in default sources
Reuters (deprecated host), A Bola 404, and malformed UEFA XML broke
rss:test and reduced crawler yield. Use Guardian + RTP Notícias feeds
verified with rss-parser; refresh trusted_domains.

Made-with: Cursor
2026-03-24 21:02:35 +00:00
David SantosandPaperclip d48dc3b87c feat: initial AI News Writer system (BIT-353)
Standalone autonomous news writing system — RSS crawler, journalist AI,
WordPress export, social listening, and LXC provisioning script.

- src/crawler/rss.js: fetch + normalize RSS feeds; keyword filter
- src/crawler/scraper.js: cheerio-based full article scraper
- src/writer/ai.js: OpenAI journalist AI (article generation + topic detection)
- src/publisher/wordpress.js: WP REST API export (tags auto-created)
- src/listener/rss-listener.js: cron-based live RSS monitoring
- src/config/loader.js: sources + site config loader
- src/index.js: manual write + auto listener entry points
- config/sources.json: RSS feeds (Record, A Bola, BBC, ESPN, Reuters...)
- config/sites/example.json: WP site config template
- tools/proxmox/create_ai_news_writer_lxc.sh: LXC provisioning (CT 223, Ubuntu 24, 2C/4GB/20GB)
- .env.example, README.md, package.json

RSS crawler validated: 158 articles from 9 feeds, 18 keyword-matched (live test 2026-03-23).

Paperclip-Issue: BIT-353
Paperclip-Run: 0c1d51c2-8394-475c-bced-e0ae237f4314
Co-Authored-By: Paperclip <[email protected]>
Made-with: Cursor
2026-03-23 15:52:38 +00:00