Repository navigation
feat(capturekit): add CaptureKit integration - #9834
josselinlbe wants to merge 2 commits into
Conversation
Add a CaptureKit block for web page capture and content: - Take a screenshot of a page as PNG, JPEG, WebP or PDF, full page or by CSS selector, on 17+ emulated devices, stored as a file - Extract a page's metadata, internal, external and social links, and its Markdown - Fetch a page's raw HTML without a browser - Get an AI summary of what a website offers, its audience and contacts Outputs follow the documented OpenAPI schemas and were checked against live responses. Credentials are a CaptureKit API key sent in the x-api-key header.
|
Someone is attempting to deploy a commit to the Sim Team on Vercel. A member of the Team first needs to authorize it. |
[Medium impact] The changes affect workflows that choose to use the new CaptureKit integration. No blocking behavior defect was established, but the two explicit repository requirements must be satisfied before merging. FindingsSummaryAdds CaptureKit with four API-key-backed operations:
Two repository requirements remain: keep single-consumer helpers beside their caller and document the new exported icon functions. Reviews (1) · Last reviewed commit: "feat(capturekit): add CaptureKit integra..." · Reviewed by Greptile |
| /** Reads a `CaptureKitPageMetadata` from an untyped CaptureKit API payload. */ | ||
| export function mapCaptureKitPageMetadata(value: unknown): CaptureKitPageMetadata | null { |
There was a problem hiding this comment.
Helpers live apart from caller
Both exported helpers in utils.ts are used only by extract_content.ts. The repository requires helpers with one consumer to stay inline. Move both functions into extract_content.ts and remove this extra module before merging.
Context Used: CLAUDE.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| ) | ||
| } | ||
|
|
||
| export function CaptureKitIcon(props: SVGProps<SVGSVGElement>) { |
There was a problem hiding this comment.
Public icons lack required docs
The new CaptureKitIcon exports here and in apps/docs/components/icons.tsx lack TSDoc. The repository requires TSDoc on exported APIs. Add a short declaration comment above both functions before merging.
Context Used: CLAUDE.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
- Keep the two response mappers in extract_content.ts, their only caller - Document the CaptureKitIcon export - Read the operation from the mapper context so agent tools coerce the screenshot's numeric inputs too
Summary
Adds a CaptureKit integration: tools, block, icon and generated docs page. I work on CaptureKit, so this PR comes from the CaptureKit team.
Capture any web page as a PNG, JPEG, WebP image or a PDF, by viewport, full page or CSS selector on 17+ emulated devices; extract a page's metadata, links and Markdown; fetch raw HTML; and get an AI summary of what a website offers.
Operations:
capturekit_screenshot): Capture a public web page as a PNG, JPEG, WebP image or a PDF, by viewport, full page or CSS selector, and store it as a file.capturekit_extract_content): Render a web page and get its title, description, favicon, Open Graph image, internal, external and social links, and optionally its Markdown.capturekit_fetch_html): Fetch the raw HTML of a public page over plain HTTP, without a browser.capturekit_analyze_website): Read a website and get an AI summary of its value proposition, business type, key features, categories, use cases, audience and contact details.Credentials are a CaptureKit API key on the block (
AuthMode.ApiKey), sent as thex-api-keyheader. Every tool is an externalToolConfig.requestagainst the CaptureKit API.Product update (if relevant)
Marketing, compliance and research teams can archive pages, track competitor pages, and turn websites into clean input for agents. The block appears in the integrations catalog with 7 templates and grounded skills; the docs page is
apps/docs/content/docs/integrations/capturekit.mdx.Type of Change
Testing
requestandtransformResponseto confirm the mapped outputs; fields that the API documents as nullable are optional outputs.bun run lint,bun run type-check,bun run check:audits(all 62 audits),bun run apps/sim/scripts/check-block-registry.ts origin/staging,bun run apps/sim/scripts/check-canvas-sentences.ts --block=capturekit, and the existingblocksandtools/request-transportVitest suites all pass.Checklist
Screenshots/Videos