feat(billing): meter platform scrapers per item; consolidate web scraping onto web.crawl
Add per-item, per-platform billing for the platform-native connectors (Reddit, Google Search, Google Maps places/reviews, YouTube videos/comments) through the capability gate/charge seam. Rates are config-driven with a shared wallet-credit module (wallet_credit) and a dedicated PlatformScrapeCreditService; agent and REST capability runs now record cost_micros. Google Maps scrape dual-meters places and attached reviews.
Remove the main-agent scrape_webpage tool now that the web.crawl capability covers single-page (maxCrawlDepth=0) and site crawling. The main agent now reaches crawling via task(web_crawler, ...). Update prompts, tool catalog, receipts, skills, proprietary docs, and tests; drop the obsolete chat-turn crawl fold path.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-05 17:08:01 -07:00
|
|
|
"""``google_maps.scrape`` capability registration (dual-metered: billed per
|
|
|
|
|
place via ``GOOGLE_MAPS_MICROS_PER_PLACE`` plus per attached review via
|
|
|
|
|
``GOOGLE_MAPS_MICROS_PER_REVIEW``)."""
|
2026-07-03 17:56:43 +02:00
|
|
|
|
|
|
|
|
from __future__ import annotations
|
|
|
|
|
|
feat(billing): meter platform scrapers per item; consolidate web scraping onto web.crawl
Add per-item, per-platform billing for the platform-native connectors (Reddit, Google Search, Google Maps places/reviews, YouTube videos/comments) through the capability gate/charge seam. Rates are config-driven with a shared wallet-credit module (wallet_credit) and a dedicated PlatformScrapeCreditService; agent and REST capability runs now record cost_micros. Google Maps scrape dual-meters places and attached reviews.
Remove the main-agent scrape_webpage tool now that the web.crawl capability covers single-page (maxCrawlDepth=0) and site crawling. The main agent now reaches crawling via task(web_crawler, ...). Update prompts, tool catalog, receipts, skills, proprietary docs, and tests; drop the obsolete chat-turn crawl fold path.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-05 17:08:01 -07:00
|
|
|
from app.capabilities.core import BillingUnit, Capability, register_capability
|
2026-07-03 17:56:43 +02:00
|
|
|
from app.capabilities.google_maps.scrape.executor import build_scrape_executor
|
|
|
|
|
from app.capabilities.google_maps.scrape.schemas import ScrapeInput, ScrapeOutput
|
|
|
|
|
|
|
|
|
|
GOOGLE_MAPS_SCRAPE = Capability(
|
|
|
|
|
name="google_maps.scrape",
|
|
|
|
|
description=(
|
2026-07-08 03:38:08 +05:30
|
|
|
"Scrape public Google Maps places, details, reviews, and photos. Use "
|
|
|
|
|
"search_queries, urls, or place IDs."
|
2026-07-03 17:56:43 +02:00
|
|
|
),
|
|
|
|
|
input_schema=ScrapeInput,
|
|
|
|
|
output_schema=ScrapeOutput,
|
|
|
|
|
executor=build_scrape_executor(),
|
feat(billing): meter platform scrapers per item; consolidate web scraping onto web.crawl
Add per-item, per-platform billing for the platform-native connectors (Reddit, Google Search, Google Maps places/reviews, YouTube videos/comments) through the capability gate/charge seam. Rates are config-driven with a shared wallet-credit module (wallet_credit) and a dedicated PlatformScrapeCreditService; agent and REST capability runs now record cost_micros. Google Maps scrape dual-meters places and attached reviews.
Remove the main-agent scrape_webpage tool now that the web.crawl capability covers single-page (maxCrawlDepth=0) and site crawling. The main agent now reaches crawling via task(web_crawler, ...). Update prompts, tool catalog, receipts, skills, proprietary docs, and tests; drop the obsolete chat-turn crawl fold path.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-05 17:08:01 -07:00
|
|
|
billing_unit=BillingUnit.GOOGLE_MAPS_PLACE,
|
2026-07-08 03:38:08 +05:30
|
|
|
docs_url="/docs/connectors/native/google-maps",
|
2026-07-03 17:56:43 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
register_capability(GOOGLE_MAPS_SCRAPE)
|