Commit graph

2510 commits

Author SHA1 Message Date
CREDO23
f82fae3973 feat(web-crawler): add site_crawler spider + url_policy over the fetch engine 2026-07-03 10:50:41 +02:00
CREDO23
f967cebe92 docs(scraping-agent): surface youtube in description and prompt 2026-07-02 20:18:53 +02:00
CREDO23
c467a99dc6 feat(scraping-agent): wire youtube verbs into subagent tools 2026-07-02 20:18:53 +02:00
CREDO23
0b2dba7a57 feat(capabilities): expose youtube.* verbs on the REST door 2026-07-02 20:18:53 +02:00
CREDO23
6c3735db19 feat(capabilities): add youtube.scrape and youtube.comments verbs 2026-07-02 20:18:53 +02:00
CREDO23
af3e70ea56 Merge upstream/ci_mvp: add YouTube scraper actor under app/proprietary
Resolved modify/delete conflicts on the old 'revamp phases 4-7/' plan docs
by keeping our deletion (superseded by flattened plans/backend/00-*.md).
2026-07-02 20:01:11 +02:00
CREDO23
6bd0d640e6 refactor(capabilities): group framework into core/, keep verbs top-level 2026-07-02 19:54:20 +02:00
CREDO23
87df0bb629 fix(web.discover): cap results to top_k 2026-07-02 19:40:37 +02:00
CREDO23
9738392161 refactor(agents): rename intelligence_agent subagent to scraping 2026-07-02 18:59:34 +02:00
CREDO23
790507d107 feat(capabilities): meter captcha, truncate scrape, bound discover 2026-07-02 18:32:42 +02:00
CREDO23
3278f46585 fix(tasks): dispose checkpointer pool per celery task 2026-07-02 17:54:31 +02:00
CREDO23
896f38fba1 feat(chat): wire watch tools into intelligence agent 2026-07-02 17:54:31 +02:00
CREDO23
32d542f7a3 feat(chat): add stop and refresh watch tools 2026-07-02 17:54:31 +02:00
CREDO23
cf546b6821 feat(chat): add start_watch tool 2026-07-02 17:54:31 +02:00
CREDO23
c0c0b13029 feat(automations): add watch rest routes 2026-07-02 17:54:31 +02:00
CREDO23
2c9862c315 feat(automations): add chat watch service 2026-07-02 17:54:31 +02:00
CREDO23
b993bf31d9 feat(automations): add chat_message action 2026-07-02 17:54:31 +02:00
DESKTOP-RTLN3BA\$punk
cc99bc4cae Update licensing information for SurfSense software
- Added Business Source License 1.1 details to the proprietary LICENSE file.
- Clarified terms of use, including production use restrictions and transition to Apache License after four years.
- Updated README.md to reflect the new licensing structure and its implications for users.

This change ensures clear communication of licensing terms for proprietary components within the SurfSense project.
2026-07-02 03:28:42 -07:00
DESKTOP-RTLN3BA\$punk
0445c646c6 refactor(native-connector): relocate youtube scraper under app/proprietary + parallelize playlists
Move app/scrapers -> app/proprietary/scrapers/youtube to sit alongside the existing proprietary web_crawler/platforms namespace, updating all external imports (routes, tests, e2e script, README). Internal imports were relative so are unchanged.

Also parallelize playlist per-video resolution: page video ids sequentially, then resolve the heavy watch-page fetches concurrently via fan_out (~150 videos ~70s, down from a few minutes). Items stream in completion order; sort by the order field for playlist order.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-02 02:34:04 -07:00
DESKTOP-RTLN3BA\$punk
99378d7b63 feat(native-connector): added youtube scrapers 2026-07-02 01:10:31 -07:00
CREDO23
7ad83760b5 feat(chat): add intelligence_agent subagent over capability verbs 2026-07-02 00:17:22 +02:00
CREDO23
110beb4dd1 feat(chat): add web_scrape/web_discover tool emission handlers 2026-07-02 00:17:10 +02:00
CREDO23
de4b8ab6b0 feat(capabilities): generate agent tool door from registry 2026-07-02 00:17:01 +02:00
CREDO23
23802a74bb feat(capabilities): document verbs with descriptions and field docs 2026-07-02 00:16:55 +02:00
CREDO23
b1e49f21f2 feat(capabilities): mount capability REST routes 2026-07-01 17:53:42 +02:00
CREDO23
9c9ad97f8e feat(capabilities): generate REST door with per-workspace rate limit 2026-07-01 17:53:42 +02:00
CREDO23
c696829568 feat(capabilities): bound web.scrape batch and expose worst-case units 2026-07-01 17:53:42 +02:00
CREDO23
8fbfa5a6e1 feat(capabilities): add pre-flight meter-gate for billed verbs 2026-07-01 17:53:42 +02:00
CREDO23
f257e385db feat(capabilities): register web.discover verb 2026-07-01 17:08:58 +02:00
CREDO23
329bc63b6c feat(capabilities): add env-keyed searxng/linkup/baidu discover providers 2026-07-01 17:08:58 +02:00
CREDO23
adc39d1062 feat(config): add env keys for discover search providers 2026-07-01 17:08:58 +02:00
CREDO23
fa1055dd4c feat(capabilities): add web.discover schemas and provider seam 2026-07-01 17:08:58 +02:00
CREDO23
a413539f6a feat(capabilities): allow free verbs with no billing unit 2026-07-01 17:08:58 +02:00
CREDO23
6b91a7ed0c feat(capabilities): register web.scrape verb 2026-07-01 16:42:47 +02:00
CREDO23
6679fda662 feat(capabilities): wire web.scrape to proprietary crawler 2026-07-01 16:42:47 +02:00
CREDO23
bbd81bcc99 feat(capabilities): add web.scrape schemas 2026-07-01 16:42:47 +02:00
CREDO23
bfe3117302 feat(capabilities): bill workspace owner at executor 2026-07-01 16:42:47 +02:00
CREDO23
3e6007431d feat(capabilities): add in-process verb store 2026-07-01 16:42:47 +02:00
CREDO23
78f7a93a88 feat(capabilities): add registry contracts and package 2026-07-01 16:42:47 +02:00
DESKTOP-RTLN3BA\$punk
15fd0b08d6 feat: completed init mvp of phase 3 2026-06-30 03:02:40 -07:00
DESKTOP-RTLN3BA\$punk
bdacea8b6e feat(crawler): captcha solving + per-attempt billing (Phase 3d)
Wire captchatools as the StealthyFetcher-tier page_action to detect, harvest
(egressing from the crawl's own proxy IP), inject, and submit reCAPTCHA v2/v3
and hCaptcha tokens. Opt-in and off by default (zero attempts, zero cost).

Licensing split:
- Apache-2 app/utils/captcha/ holds the generic, vendor-agnostic config
  (CaptchaConfig + captcha_enabled() = flag AND key present).
- Proprietary app/proprietary/web_crawler/captcha.py holds the bypass logic
  (detect/harvest/inject) plus a process-wide solver latch that halts solving
  on unrecoverable errors (no balance / bad key).

Crawler: CrawlOutcome gains captcha_attempts/captcha_solved, surfaced via a
per-call captcha_state dict threaded crawl_url -> _crawl_with_stealthy(_sync)
and stamped onto every stealth terminal outcome. The stealth tier captures the
proxy once and reuses it for both the fetch and the solver (IP-coherence).

Billing: WebCrawlCreditService gains captcha_billing_enabled,
captcha_solves_to_micros, charge_captcha, and a generic check_balance, sharing
a single _apply_debit path. The indexer accumulates attempts (even on failed
crawls), runs a combined crawl+captcha pre-flight, and posts a per-attempt
owner charge as usage_type="web_crawl_captcha". The captcha worst-case is only
reserved when solving is actually enabled, so a solving-off deployment is never
blocked for captcha that can never run. Both chat scrape tools fold attempts
into the current turn before the success/fail branch.

Fully config-driven prices; no migration. New unit tests cover the config,
factory (detection/latch/timeout/cap), credit service, indexer wiring, and the
chat fold.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 22:58:21 -07:00
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
DESKTOP-RTLN3BA\$punk
62260125f7 feat(03b): add BYO custom proxy provider + bounded crawler rotation-retry
Add CustomProxyProvider (single endpoint or rotating pool via Scrapling ProxyRotator), registered as 'custom' alongside anonymous_proxies and selectable via PROXY_PROVIDER. Adds is_pool_backed to the ProxyProvider ABC + a zero-arg package helper. The web crawler does a bounded one-per-tier is_proxy_error rotation-retry gated on is_pool_backed() (single-endpoint providers no-op). Config/.env.example gain CUSTOM_PROXY_URL(S). Zero-arg getter contract unchanged for all consumers. Documents the proprietary boundary test (generic proxy infra stays Apache-2). Tests: provider, registry, crawler rotation (16).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 21:03:34 -07:00
DESKTOP-RTLN3BA\$punk
5c36cd3071 feat(03a): implement Scrapling-only web crawler and remove Firecrawl integration
- Standardized the web crawler to use Scrapling exclusively, removing Firecrawl entirely.
- Updated the crawler's location to `app/proprietary/web_crawler/connector.py` under a non-Apache-2 license boundary.
- Refactored the `WebCrawlerConnector` to eliminate the Firecrawl API key dependency, simplifying the interface for crawling URLs.
- Adjusted related components to accommodate the new structure and ensure successful crawl outcomes are properly handled.
- Updated documentation to reflect these changes and the new implementation status.
2026-06-29 20:37:56 -07:00
DESKTOP-RTLN3BA\$punk
2836654701 Merge commit '683a7d3bc2' into feat/rename-searchspace-to-workspace 2026-06-29 17:55:15 -07:00
Rohan Verma
32951ac141
Merge pull request #1543 from DhruvTilva/fix/codeblock-interior-line-indentation
fix: prevent spurious leading spaces in nested codeBlock interior lines
2026-06-29 17:45:21 -07:00
Rohan Verma
d22131185f
Merge pull request #1542 from DhruvTilva/fix/multilingual-embedding-truncation
fix: use token-safe truncation for document embeddings
2026-06-29 17:44:55 -07:00
Rohan Verma
2148053569
Merge pull request #1544 from AnishSarkar22/fix/login-button
feat: update authentication defaults to LOCAL
2026-06-26 11:06:22 -07:00
CREDO23
56826a63bc refactor(routes): rename to workspace + consolidate URL spellings (Phase 2 Wave E)
Hard cutover of the HTTP surface: collapse the three legacy spellings
(/searchspaces, /search-spaces, /search-space/{id}) onto canonical
/workspaces/{workspace_id}/..., rename the gateway field-setter sub-actions to
singular /workspace, rename search_spaces_routes.py -> workspaces_routes.py and the
search_spaces_router -> workspaces_router include, and flip search_space_id ->
workspace_id in bodies/params. No alias routers: the old URLs now 404 by design.
Full app constructs with zero legacy path spellings.
2026-06-26 18:35:08 +02:00
CREDO23
7fb0707933 refactor(backend): rename search_space -> workspace across app bulk (Phase 2 Wave D)
Scoped codemod over surfsense_backend/app (excluding routes/, Wave E): renames
search_space_id -> workspace_id, search_space -> workspace, SearchSpace -> Workspace
across services, utils, tasks, agents, gateway, event_bus, notifications, podcasts,
automations, observability params, and prompt .md files. Also flips the camelCase
payload key searchSpaceId -> workspaceId (no backend reader; hard cutover).

Preserved carve-outs (verbatim): Celery task names "delete_search_space_background"
and "ai_sort_search_space" (wire names), and the OTel/metric key "search_space.id"
(dashboards depend on it). Enum values 'SEARCH_SPACE' and SearchSourceConnector
untouched.
2026-06-26 18:30:47 +02:00