Ingest: a crawl source for sites without a sitemap
Mantenedores costumam responder em até 1 dia
Avaliação
Esta issue ainda não foi avaliada.
Descrição
F-06 task 12. ingest() finds pages from a sitemap, a list of URLs, or a local folder (IngestSource in packages/ingest/src/types.ts:5-9). Plenty of small sites have no sitemap. For those, the cloud's onboarding (and chatcops ingest) needs to crawl from the homepage instead.
sources: [{ type: 'crawl', url: 'https://example.com', maxDepth: 3, maxPages: 200 }]
What to do
- Add
{ type: 'crawl'; url: string; maxDepth?: number; maxPages?: number }toIngestSource, with defaults of 3 levels and 500 pages. - Handle it in
discover()(packages/ingest/src/discover.ts:25). Starting fromurl, fetch each page, collect<a href>links, and follow those on the same origin breadth-first, up tomaxDepthlevels andmaxPagespages.- Normalize every link with the existing
normalizeUrl()and skip ones already seen. - Skip
mailto:,tel:, fragments-only links and non-HTML responses. - Respect
robots.txtthe way the other sources already do (robots.ts), and applyinclude/excludebefore fetching.
- Normalize every link with the existing
- Reuse the fetched HTML so a crawled page isn't downloaded twice when it's extracted. The fetch and extract steps are in
ingest.ts. - The concurrency cap (
concurrency) andtimeoutMsapply to crawl fetches too. - Add
--crawl <url>tochatcops ingestinpackages/cli/src/main.ts, or acceptcrawl:sources in the config, whichever fits the existing--sourcehandling better.
Acceptance criteria
- Tests with a local fixture site served by a test HTTP server (
packages/ingest/testsalready has one for sitemaps): follows same-origin links, stops atmaxDepthandmaxPages, ignores other origins,mailto:and fragments, honoursrobots.txtandexclude, and fetches each page once - The source in the ingest options table in
website/src/content/docs/core/knowledge-base.mdx(pnpm docs:checkpasses) - A minor changeset for
@chatcops/ingest(and@chatcops/cliif the CLI changes);pnpm test:coverage(85/80),pnpm lintandpnpm api(commit the snapshot) pass
Comment here to be assigned.
- Linguagem predominante
- TypeScript
- Estrelas
- 13
- Forks
- 7
- Merge médio
- 3h 14min
- PRs com merge (30d)
- 332
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de codercops/chatcops
-
Widget: a code block tagged `c++`, `c#` or `objective-c` shows part of the tag as codeTalvez já em andamento @prakashNalla assumiu há 4 dias. Abertabug widget
codercops/chatcops#578 · 2 comentários · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
Docs: Astro, Nuxt and SvelteKit guides for the serverTalvez já em andamento @anurag2787 assumiu há 4 dias. Abertadocumentation
codercops/chatcops#575 · 2 comentários · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
Server: chatcopsNext(), one catch-all route for Next.jsTalvez já em andamento @Saifjafri212213 assumiu há 4 dias. Abertaenhancement server
codercops/chatcops#574 · 2 comentários · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
@chatcops/react: a <ChatCops> component and useChatCops() hookTalvez já em andamento @Saifjafri212213 assumiu há 4 dias. Abertaenhancement widget
codercops/chatcops#573 · 2 comentários · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 25/100
codercops/chatcops#546 · 6 comentários ·
Mantenedores costumam responder em até 1 dia
Todas as issues de codercops/chatcops
Issues semelhantes
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Yeraze/meshmonitor#6239 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
better-auth/better-auth#12292 · 1 reação ·
Mantenedores costumam responder em até 1 dia
-
The sample email preview's ResizeObserver is never disconnected and keeps raising errors after leaving SettingsTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Abertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia
-
area:ui bug effort:S priority:P2
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia
-
Typo in WSL project description on Projects pageTalvez já em andamento @akhil9tiet assumiu hoje. Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 75/100
microsoft/opensource.microsoft.com#1066 · 1 comentário ·