Commit graph

2601 commits

Author SHA1 Message Date
CREDO23
c679f2a3ef fix(tiktok): fetch profile video lists headful + dismiss login modal
The profile feed (/api/post/item_list) returns an empty 200 to headless
sessions but serves data headful on the same proxy IP. Run fetch_item_list
headful and dismiss the login modal that blocks mid-scroll.
2026-07-10 16:45:45 +02:00
CREDO23
867e940911 Merge upstream/dev into feature/tiktok-scraper
Sync with the advanced dev tip so the PR compares against current dev
(drops already-merged commits from the diff). No history rewritten.
2026-07-09 20:15:20 +02:00
CREDO23
6b15d610d9 feat(tiktok): surface comments, user_search, trending across all product surfaces
Brings the three newer verbs to parity with tiktok.scrape everywhere it was
wired: MCP tools (+ selfcheck manifest), the chat subagent prompt/description,
the playground catalog, the native docs page, and the SEO marketing page. Also
adds live e2e stages for comments, user search, and trending. Docs/FAQ now
state the real contract: profile metadata is reliable while its video list can
be withheld, and keyword video search is walled (use user search for accounts).
2026-07-09 19:09:00 +02:00
CREDO23
67b5472b9f feat(tiktok): add tiktok.trending verb for the Explore feed
The Explore feed (/api/explore/item_list) is a global trending-video feed
served to anonymous sessions, and it returns the same itemStruct shape as the
other listings — so the verb reuses parse_video, the listing flow, the
TikTokVideoItem output, and the per-video billing meter wholesale. Adds a
browser-capture marker + fetch_trending, a synthetic-target orchestrator entry,
and the tiktok.trending capability, surfaced on the chat subagent.
2026-07-09 18:52:56 +02:00
CREDO23
7723b5b8b6 feat(tiktok): add tiktok.comments verb for public comment scraping
Comments load over a signed /api/comment/list XHR that TikTok serves to
anonymous sessions once the comments panel is opened (unlike profile-video and
general-search feeds), so this is a reliable verb. Given video URLs it returns
CommentItems (text, author, likes, reply counts; replies carry repliesToId),
deduped per video, capped, and degraded to an ErrorItem for empty/withheld
videos or a bad_url ErrorItem for non-video inputs.

Generalizes the browser capture over a pluggable interaction step so the
comments flow (open panel, scroll the panel to paginate) reuses the same
warm+capture scaffolding as listing/user-search. Billed per comment on a new
TIKTOK_COMMENT meter (TIKTOK_MICROS_PER_COMMENT, matching the per-comment
market), surfaced on the chat subagent alongside tiktok.scrape/user_search.
2026-07-09 18:35:26 +02:00
CREDO23
192b6dc31a feat(tiktok): add tiktok.user_search verb for account discovery
Video/general search is login-walled for anonymous sessions, but the Users
tab (/api/search/user) returns public account records without a redirect, so
this exposes the one reliably-unblocked search path. A keyword yields
TikTokProfileItems (name, followers, bio, verification), deduped per query,
capped, and degraded to an ErrorItem when a query is empty/withheld.

Reuses the browser capture (generalized over XHR markers + extractor) and the
shared profile item shape. Billed per account on a new TIKTOK_USER meter
(TIKTOK_MICROS_PER_USER), surfaced on the chat subagent alongside tiktok.scrape.
2026-07-09 18:00:40 +02:00
CREDO23
6652efd035 feat(tiktok): return profile metadata even when video listing is gated
A profile's account data (name, followers, bio, verification) lives in the
page's rehydration blob and loads over plain HTTP without a signed request,
so emit it first and always. The video listing needs a signed item_list XHR
that TikTok withholds from anonymous sessions, so it stays best-effort and
degrades to an ErrorItem. A blocked profile now yields its metadata instead
of only an ErrorItem.
2026-07-09 17:48:19 +02:00
Rohan Verma
3eb485ff31
Merge pull request #1575 from SyntaxSawdust/feature/1354-embedding-base-url
Support separate embedding base URL configuration
2026-07-08 17:11:42 -07:00
Rohan Verma
d2ed0bb382
Merge pull request #1570 from pelazas/fix/scheduler-task-map-bookstack
fix: dispatch periodic BookStack indexing from the scheduler task_map
2026-07-08 15:07:38 -07:00
DESKTOP-RTLN3BA\$punk
b8155c6c0e Merge commit '1ae927a7db' into dev 2026-07-08 15:05:11 -07:00
CREDO23
ba375ea3ee feat(tiktok): emit graceful ErrorItem for blocked/empty listings
Profile and search feeds are trust-gated: an anonymous headless session
gets an empty item_list (profile) or no results XHR (search), while
hashtag feeds load. A zero-item listing now yields one honest ErrorItem
(errorCode="no_items") instead of vanishing silently, and ErrorItems are
excluded from billing so a blocked target is surfaced but never charged.
2026-07-08 23:14:50 +02:00
CREDO23
5f9472b122 feat(tiktok): advertise tiktok across agent prompts, MCP instructions, docs 2026-07-08 20:30:38 +02:00
CREDO23
ed1c3a1f3d feat(tiktok): expose tiktok.scrape on MCP, chat subagent, playground 2026-07-08 20:20:20 +02:00
CREDO23
2943d8b23c feat(tiktok): tiktok.scrape capability + billing wire-up 2026-07-08 18:21:44 +02:00
CREDO23
9dd39faa50 test(tiktok): pin live fixtures, trim listing debug scaffolding 2026-07-08 17:53:29 +02:00
CREDO23
5a326f3818 fix(tiktok): warm browser listing + drop ctx-var-in-generator 2026-07-08 17:14:13 +02:00
CREDO23
ad8b73477a feat(tiktok): browser-driven signed listings 2026-07-08 16:37:36 +02:00
CREDO23
daa0856c44 feat(tiktok): blob-first orchestrator + video flow 2026-07-08 16:07:07 +02:00
CREDO23
44b3e640d3 feat(tiktok): rotate-on-block fetch session 2026-07-08 15:51:17 +02:00
CREDO23
5688ab0678 feat(tiktok): scrape input schema 2026-07-08 15:51:17 +02:00
CREDO23
ef66063bfc feat(tiktok): video normalizer and parser tests 2026-07-08 15:40:50 +02:00
CREDO23
0bbcf99852 feat(tiktok): author normalizer 2026-07-08 15:40:38 +02:00
CREDO23
8840fd2c53 feat(tiktok): rehydration blob extractor 2026-07-08 15:40:21 +02:00
CREDO23
b2d387f994 feat(tiktok): URL target resolver 2026-07-08 15:40:07 +02:00
CREDO23
ef3f9f2e25 feat(tiktok): item output schemas 2026-07-08 15:39:58 +02:00
CREDO23
3c027b9f49 Merge remote-tracking branch 'upstream/main' into dev
# Conflicts:
#	surfsense_mcp/mcp_server/core/auth/__init__.py
#	surfsense_mcp/mcp_server/core/auth/headers.py
#	surfsense_mcp/mcp_server/core/auth/identity.py
#	surfsense_mcp/mcp_server/core/auth/middleware.py
#	surfsense_mcp/mcp_server/core/transport/__init__.py
#	surfsense_mcp/mcp_server/core/transport/http.py
#	surfsense_mcp/mcp_server/core/workspace_matching.py
#	surfsense_mcp/mcp_server/features/knowledge_base/annotations.py
#	surfsense_mcp/mcp_server/features/knowledge_base/document_tools.py
#	surfsense_mcp/mcp_server/features/knowledge_base/search_tools.py
#	surfsense_mcp/mcp_server/features/scrapers/annotations.py
#	surfsense_mcp/mcp_server/features/scrapers/platforms/__init__.py
#	surfsense_mcp/mcp_server/features/scrapers/platforms/google_maps.py
#	surfsense_mcp/mcp_server/features/scrapers/platforms/google_search.py
#	surfsense_mcp/mcp_server/features/scrapers/platforms/reddit.py
#	surfsense_mcp/mcp_server/features/scrapers/platforms/web.py
#	surfsense_mcp/mcp_server/features/scrapers/platforms/youtube.py
#	surfsense_mcp/mcp_server/features/scrapers/run_history.py
#	surfsense_mcp/src/surfsense_mcp/__main__.py
#	surfsense_mcp/src/surfsense_mcp/features/knowledge_base/__init__.py
#	surfsense_mcp/src/surfsense_mcp/features/scrapers/__init__.py
#	surfsense_mcp/tests/test_auth_headers.py
#	surfsense_mcp/tests/test_request_auth.py
#	surfsense_mcp/tests/test_workspace_context.py
#	surfsense_web/content/docs/how-to/mcp-server.mdx
#	surfsense_web/lib/mcp/clients.ts
2026-07-08 14:52:55 +02:00
Anish Sarkar
7ba77c6b86 feat(capabilities): add documentation URLs to Google Maps, YouTube, and web crawl capabilities
- Introduced a `docs_url` field to the Google Maps reviews, scrape, YouTube comments, YouTube scrape, and web crawl capabilities for improved documentation access.
- Simplified descriptions for each capability to enhance clarity and user understanding.
2026-07-08 03:38:08 +05:30
Anish Sarkar
3b9c806c90 feat(capabilities): add documentation URL to capabilities and enhance Reddit scrape capability
- Introduced a `docs_url` field to the `Capability` and `CapabilitySummary` classes for better documentation access.
- Updated the `REDDIT_SCRAPE` capability to include a specific documentation link.
- Enhanced the PlaygroundRunner component to display the documentation link when available, improving user guidance.
2026-07-08 03:35:32 +05:30
Dustin Persek
41edac7641 Merge remote-tracking branch 'upstream/dev' into feature/1354-embedding-base-url
# Conflicts:
#	surfsense_web/content/docs/docker-installation/docker-compose.mdx
#	surfsense_web/content/docs/manual-installation.mdx
2026-07-07 14:19:40 -04:00
DESKTOP-RTLN3BA\$punk
b477d33cba Merge commit 'fa7075fde6' into dev 2026-07-07 00:39:58 -07:00
DESKTOP-RTLN3BA\$punk
9a9a78e7ef refactor: improve session management and concurrency in Google Search fetcher
- Introduced a semaphore to limit concurrent page renders, enhancing resource management.
- Updated session handling to defer browser closure until all in-flight renders are complete.
- Improved comments for clarity on the behavior of concurrent fetches and session lifecycle.
- Cleaned up imports in alembic environment and migration flow scripts for consistency.
2026-07-06 22:33:40 -07:00
DESKTOP-RTLN3BA\$punk
1c9ab207ef chore: bumped version to 0.0.31 2026-07-06 21:43:15 -07:00
DESKTOP-RTLN3BA\$punk
1fd58752a3 feat: update environment variables and enhance scraping capabilities
- Adjusted Google Maps and YouTube micro pricing in the .env.example file for better cost management.
- Introduced new environment variables for captcha solving and stealth browser hardening to improve scraping resilience.
- Removed outdated smoke test for scraper API endpoints to streamline testing.
- Enhanced anonymous chat agent's system prompt to clarify capabilities and suggest account creation for advanced features.
- Updated Reddit fetch logic to prioritize new session handling and improve resilience against IP-related issues.
- Added compacting functionality for scraper results to optimize data handling and presentation.
- Improved workspace and document management tools with clearer descriptions and enhanced functionality.
- Introduced new UI components for agent setup guidance in the web application.
2026-07-06 20:27:36 -07:00
DESKTOP-RTLN3BA\$punk
271a21aee6 feat: docs and ui tweaks 2026-07-06 19:26:35 -07:00
DESKTOP-RTLN3BA\$punk
50f2d095aa feat: api playground, other tweaks 2026-07-06 16:45:04 -07:00
Anish Sarkar
a8c1fb660d feat(rename): complete searchSpace to workspace transition across frontend and backend
- Introduced a comprehensive specification for renaming `searchSpace` to `workspace` in `surfsense_web` and `surfsense_desktop`, ensuring all TypeScript identifiers, React props, and local data structures are updated.
- Implemented migration shims for persisted local state to prevent data loss during the transition.
- Updated observability metrics and IPC channels to reflect the new naming convention.
- Removed legacy `active-search-space` module and replaced it with `active-workspace` to maintain consistency.
- Ensured no behavioral changes or data loss for users during the renaming process.
2026-07-06 15:12:40 +05:30
Anish Sarkar
fd8d1273cd Merge remote-tracking branch 'upstream/ci_mvp' into feat/ci-ui-changes 2026-07-06 13:25:51 +05:30
DESKTOP-RTLN3BA\$punk
035e777287 chore: remove proprietary README file
- Deleted the `README.md` from the `app/proprietary` directory, which outlined licensing and usage rules for proprietary components. This removal reflects a shift in project documentation strategy and simplifies the codebase.
2026-07-05 23:44:31 -07:00
DESKTOP-RTLN3BA\$punk
a64c8205fe feat: implement ensure_publication for zero_publication management
- Added the ensure_publication function to create and verify the zero_publication if it is missing, ensuring idempotency during database initialization.
- Integrated ensure_publication into the create_db_and_tables function to prevent zero-cache crash loops on startup.
- Introduced a self-check script to validate the ensure_publication functionality on a create_all-bootstrapped database.
- Updated various components to reflect the transition from search space to workspace, including adjustments in imports and routing paths.
2026-07-05 23:17:13 -07:00
Anish Sarkar
cda232101f feat(workspace): remove AI file sorting feature and related components 2026-07-06 10:50:20 +05:30
Rohan Verma
dec4cd9a0d
Merge pull request #1574 from CREDO23/feature-mcp-server
[Feat] MCP: Add SurfSense MCP server for scrapers, KB, and workspaces
2026-07-05 20:48:15 -07:00
Dustin Persek
6fafedca6a Support separate embedding base URL 2026-07-05 22:33:09 -04:00
CREDO23
cb22cc4bfc fix(backend): read page_content on extension document ingestion 2026-07-06 03:17:25 +02:00
CREDO23
800c0e55fd feat(backend): expose semantic document search endpoint 2026-07-06 02:29:19 +02:00
DESKTOP-RTLN3BA\$punk
80927a2872 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
DESKTOP-RTLN3BA\$punk
fd45e76f70 feat(agents): sharpen lead-list quality and Maps/Search routing boundary
Learned from lead-generation e2e runs (medical EMR, AI study app):

- routing.md: requested-N lists must be distinct entities that fit the
  asked segment - branches/locations of one parent count once, parent
  website domain is an ownership signal, fill shortfalls by widening
  discovery instead of padding; place-shaped discovery routes to the
  Maps specialist, open-web/enrichment to Search.
- google_maps prompt: exclusion criteria are strict (a satellite of an
  excluded chain is still that chain); shared parent domains mean one
  organization judged against the parent.
- google_search prompt: pure place-discovery tasks return blocked with
  a next_step pointing to the Maps specialist.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-05 04:37:24 -07:00
DESKTOP-RTLN3BA\$punk
c600a2920b feat(crawler): harden web crawler and agent tooling for real-world research tasks
Crawler engine: escalate thin JS-shell pages past static fetch, repair
currency-lossy extractions, emit categorized link records with anchor
provenance, and decode percent-encoded mailto:/tel: contacts; site crawls
reuse the connector ladder via Scrapling's spider engine with URL pattern
filters. Agent layer: read_run gains char_offset paging, search_run gains
match excerpts, new export_run turns stored runs into CSV workspace docs;
reddit search fair-shares the item budget across queries and dedupes
cross-query hits. Subagent prompts and routing teach crawl-after-search,
full-run coverage before summarizing, and executing own-tool next steps
instead of returning partial.
2026-07-05 03:51:16 -07:00
DESKTOP-RTLN3BA\$punk
b6e378b070 feat(runs): introduce Run and ToolOutputSpill models for logging scraper invocations
- Added `Run` model to track scraper invocations, including metadata such as status, input, and output.
- Implemented `ToolOutputSpill` model to store context-editing spills separately from user-facing logs.
- Updated middleware to handle spill placeholders and integrate with the new models.
- Enhanced REST API to record runs and expose run history through new endpoints.
- Adjusted tests to validate the new run logging functionality and ensure proper integration with existing capabilities.
2026-07-04 22:55:55 -07:00
DESKTOP-RTLN3BA\$punk
ab747e7a49 feat(agents): consolidate connectors under mcp_discovery; route web search through google_search
MCP consolidation:
- Route all MCP-capable connectors (Slack, Jira, Linear, ClickUp, Airtable,
  Notion, Confluence, interim Gmail/Calendar, custom MCP) through a single
  `mcp_discovery` subagent. Drive/OneDrive/Dropbox stay native to enrich the KB.
- Deprecate Discord/Teams/Luma: no viable official MCP server.

Google-only web search:
- Remove the main-agent `web_search` tool and the SearXNG platform service;
  all public web search now flows through the `google_search` subagent via task().
- Deprecate the Tavily/SearXNG/Linkup/Baidu search connectors (HTTP 410 on
  create, "Deprecated" badge); guide heavy users to the custom MCP connector.
- Remove web search from anonymous chat (pure Q&A).
- Tear SearXNG out of docker compose + install scripts; drop tavily-python
  and linkup-sdk deps and their config/env vars.

Fix:
- metrics._package_version() now swallows any metadata lookup failure. A
  malformed editable-install distribution with no `Version` field raised
  KeyError deep in importlib.metadata, and since it runs on every
  record_subagent_invoke_duration call it was crashing every task()
  delegation. Verified end-to-end against live GPT-5.4.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-04 21:06:04 -07:00
DESKTOP-RTLN3BA\$punk
ff2e5f390f feat(reddit): implement Reddit scraping subagent and associated capabilities
- Added a new `reddit` subagent to scrape structured data from Reddit posts, comments, and users.
- Introduced `reddit.scrape` capability for fetching data using URLs and search queries.
- Implemented tools for scraping and parsing Reddit data, including handling pagination and rate limits.
- Created input/output models for the Reddit scraper to define request and response structures.
- Added documentation for the new Reddit scraping functionality and its usage.
- Integrated the Reddit subagent into the existing multi-agent chat framework.
2026-07-04 17:31:11 -07:00