Skip to content

feat(connectors): add a website connector that syncs pages from a site's sitemaps - #10536

Merged
waleedlatif1 merged 9 commits into
stagingfrom
feat/website-connector
Dec 1, 2026
Merged

waleedlatif1 merged 9 commits into
stagingfrom
feat/website-connector

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • New website knowledge connector: syncs the pages a site lists in its sitemaps (declared in robots.txt, or sitemap.xml under the configured path and at the host root, or a configured sitemap URL). Sitemaps are read with a streaming XML parser (CDATA, entities, namespace prefixes). Sitemap indexes and gzipped sitemaps are followed, bounded at 20 documents and 50,000 pages; a missing or invalid configured, declared or child sitemap fails the sync rather than shrinking the listing. Requests carry a 30s attempt timeout and a 120s deadline
  • Scope: same host (apex and www are one site), under the configured path, optional include/exclude path patterns with *, robots.txt honored (RFC 9309 longest match, SimBot group or *), non-page files skipped
  • Fetches go through secureFetchWithRetry (configuredEndpoint, DNS-pinned, org egress route). A redirect is refused before it is followed unless it stays on the host and, for a page, inside the configured scope
  • Optional request header for sites behind a gateway that takes a service credential: one Name: value line; cookies, Host, proxy, hop-by-hop and User-Agent headers and control characters are refused. An HTTPS site never sends it over plain HTTP
  • Extraction: one cheerio parse per page under the shared HTML size/markup limits, <main>/<article> preferred, page chrome dropped, listed pages that are gone, not HTML, noindex or empty are withdrawn (skipped, replacing indexed content), pages over 2 MB recorded as skipped. robots.txt rules and path patterns match in one canonical URL encoding. html-parser.ts exports loadedHtmlToStructuredText so a caller that already loaded the document does not parse it again
  • Change detection: a sitemap <lastmod> is the listing hash, so unchanged pages are not fetched; undated pages are fetched and their content hash decides whether anything is rewritten. A listing cut by maxPages sets listingCapped
  • Scope and robots.txt are read once per sync and shared by page reads; validation stops at the first page found
  • Not included: crawling by links (sites without a sitemap, e.g. Google Sites), linked PDFs, conditional requests (ETag / If-Modified-Since), Crawl-delay

Type of Change

  • New feature

Testing

  • connectors/website/website.integration.ts (9 tests) against real HTTP servers through the guarded fetch: sitemap index + gzipped child, host and robots filtering, header requirement, off-host and out-of-scope redirects (no request reaches the other host), lastmod hash parity, content-hash change detection, chrome stripping, noindex / 404, oversize skip, cap and exact-cap listingCapped, robots and missing-sitemap failures
  • robots.test.ts, site.test.ts (14 tests): robots precedence and group selection, wildcard/anchor matching, header refusals, path-prefix boundary, URL refusal
  • Every guard shown red by reverting it
  • bun run --cwd apps/sim test connectors lib/sim-search/connectors.test.ts lib/knowledge/connectors lib/file-parsers pass
  • bun run lint, bun run generate (docs icon copy updated), check:comment-hygiene, check:test-patterns, check:utils, check:explicit-any, check:bare-icons, check:icon-paths, check:icon-path-precision, check:organization-egress, check:client-boundary, check:file-names; full type-check and audits left to CI

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Dec 1, 2026 6:39am UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 15 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/connectors/website/sitemap.ts Resolved
Comment thread apps/sim/connectors/website/site.ts Resolved
Comment thread apps/sim/connectors/website/meta.ts Resolved
Comment thread apps/sim/connectors/website/website.ts Resolved
Comment thread apps/sim/connectors/website/website.ts Resolved
Comment thread apps/sim/connectors/website/robots.ts Resolved
Comment thread apps/sim/connectors/website/site.ts Resolved
@greptile-apps

greptile-apps Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge; no actionable issues remain.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues remain.

Summary

Adds a website connector that discovers pages through sitemaps and reads their HTML within the configured scope.

  • Website sources turn sitemap-listed pages into searchable knowledge documents.
  • Sitemaps and site rules keep website discovery within the chosen scope.
  • HTML text extraction can reuse a page the caller already loaded.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Discover sitemap pages] --> B[Sort URLs]
  B --> C{Rebuilt with a cursor?}
  C -->|No| D[Return page normally]
  C -->|Yes| E[Return reconciliationSafe false]
  E --> F[Save checkpoint.unsafe]
  F --> G[Keep unlisted documents]
Loading

Reviews (9) · Last reviewed commit: "fix(connectors): order website listings ..." · Reviewed by Greptile

Comment thread apps/sim/connectors/website/site.ts Resolved
Comment thread apps/sim/connectors/website/sitemap.ts Resolved
Comment thread apps/sim/connectors/website/sitemap.ts Resolved
Comment thread apps/sim/connectors/website/website.ts Resolved
Comment thread apps/sim/connectors/website/meta.ts Resolved
Comment thread apps/sim/connectors/website/robots.ts Resolved
Comment thread apps/sim/connectors/website/website.ts Resolved
…scheme, withdraw excluded pages, one request header
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

Comment thread apps/sim/connectors/website/sitemap.ts Resolved
Comment thread apps/sim/connectors/website/site.ts Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 15 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/connectors/website/site.ts Resolved
Comment thread apps/sim/connectors/website/robots.ts Resolved
Comment thread apps/sim/connectors/website/sitemap.ts Resolved
Comment thread apps/sim/connectors/website/sitemap.ts Resolved
Comment thread apps/sim/connectors/website/sitemap.ts Resolved
Comment thread apps/sim/connectors/website/sitemap.ts Resolved
…lformed sitemaps, match robots in linear time, pin the port
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 16 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/connectors/website/robots.ts Resolved
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 16 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/connectors/website/robots.ts Resolved
Comment thread apps/sim/connectors/website/robots.ts Resolved
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

Comment thread apps/sim/connectors/website/sitemap.ts Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 16 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 16 files

You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/connectors/website/page.ts Resolved
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

Comment thread apps/sim/connectors/website/website.ts Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 16 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 16 files

You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/connectors/website/website.ts Resolved
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 16 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 428f30e into staging Dec 1, 2026
87 checks passed
@waleedlatif1
waleedlatif1 deleted the feat/website-connector branch December 1, 2026 07:17

This branch was previously deployed

1 inactive deployment
Preview — 994c7d23 Deployed Dec 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant