SurfSense/surfsense_backend/scripts
DESKTOP-RTLN3BA\$punk 17bdb06825 feat(03c): bill credits per successful web crawl
Add a config-driven crawl meter (1 USD / 1000 successes by default, retunable
via WEB_CRAWL_MICROS_PER_SUCCESS) mirroring EtlCreditService:

- WebCrawlCreditService (gate -> pre-check -> post-charge) on the unified wallet
- webcrawler indexer: pre-flight credit block + post-charge of the workspace
  owner per success, with a web_crawl TokenUsage audit row
- chat scrape_webpage (main + research): fold each successful scrape into the
  active turn's token accumulator so it settles with the chat turn
- WEB_CRAWL_CREDIT_BILLING_ENABLED / WEB_CRAWL_MICROS_PER_SUCCESS config + env
- unit tests (service) + integration tests (indexer wiring)
- scripts/e2e_phase3_crawl_billing.py: manual functional e2e (3a/3b/3c)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 21:40:53 -07:00
..
docker feat(docker): add ZERO_AUTO_RESET configuration for improved replication safety 2026-06-06 14:21:14 +05:30
whatsapp-bridge feat(gateway): enhance WhatsApp bridge with pairing timeout and health check integration 2026-05-29 13:37:45 +05:30
create_sandbox_snapshot.py feat: added ai file sorting 2026-04-14 01:43:30 -07:00
e2e_phase3_crawl_billing.py feat(03c): bill credits per successful web crawl 2026-06-29 21:40:53 -07:00
register_webhook.py chore: linting 2026-06-09 00:42:26 -07:00
revoke_refresh_tokens_cutover.py fix(auth):enforce session auth cutover 2026-06-24 03:55:39 +05:30
verify_chat_image_capability.py refactor(provider-configuration): standardize provider parameter naming across various modules and improve quota error handling in tests 2026-06-13 14:23:32 +05:30