Repository navigation
Description
Problem
No code in src fetches the text of a page for a model. firecrawl_search in src/devops_cli/ai/common_tools.py returns titles, URLs and descriptions. Once the Crawl4AI service runs, the project needs one client for it. A model chooses the page URL, so the client is an SSRF and prompt-injection boundary (SECURITY.md rules 2 and 11).
Expected
Setting crawl4ai.url with no default, and credential crawl4ai.api_token (from the token issue). A function that sends POST {crawl4ai.url}/md with the JSON body {"url": <page>, "f": "fit"} and the bearer token, through http_client(level=EgressLevel.PRIVATE). It checks the page URL first (scheme http or https; refuse hosts that is_non_public_ip and is_cloud_metadata_name of devops_cli.core.validation refuse). It caps the text in size and returns a typed result with the source URL, the fetch date and a truncated flag. It counts devops_cli_crawl4ai_fetches_total{result} (ok, the HTTP status, or error) and logs a failure without the token or the page query. With crawl4ai.url empty, it raises an error that names the setting. k8s/devops/configmap.example.yaml and the settings docs name the cluster value http://crawl4ai.devops.svc.cluster.local:11235.
Acceptance criteria
- Tests with the HTTP fake (
tests/support/fakes/http.py) fail on the base: a good call sends the bearer header and the body; a page URL with a private IP literal, a metadata name or afile:scheme is refused before any request; the text is cut at the cap withtruncatedtrue; HTTP 401, 403, 429 and 504 each give the counter label and a typed error; an empty setting raises an error that namescrawl4ai.url. - The response shape of
/mdis read fromdeploy/docker/server.pyat v0.9.5 and fixed in a test fixture. The issue's PR cites the line. - The generated settings and metrics docs (
README.md) list the new setting and the counter. - No hand-written IP or regex check: the test names the existing predicates it relies on.
Existing tool considered
The project's http_client and its egress levels; the existing predicates of devops_cli.core.validation; Crawl4AI's /md endpoint. Rejected: the Crawl4AI Python package in-process (it brings Playwright and Chromium into the Service image); pydantic-ai web_fetch_tool (the project removed its own copy; it fetches without a browser, so JavaScript pages fail).
Related
Depends on the token issue for the credential name. Feeds the fetch_page tool issue and the devops ai fetch-page issue. Related: #3877, #3243.
Activity
dan-petty commentedon Nov 7, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
featprefix of the title gives the type.(ai)scope of the title gives the scope.Needed for the AI fetch-page workflow but blocked on the service deployment and token issue.Enables the model to read full page text, a core capability for the AI tools.One client function with validation, metrics, settings, and a test suite; no new service or schema.Both concern Crawl4AI page fetching; #3884 delivers the k8s service, the candidate delivers the Python client that calls it.chore(main): release 0.79.0 (#3962)
devops-cli-service commentedon Nov 7, 2026
Released in v0.79.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.79.0
devops-cli-service commentedon Nov 7, 2026
Live since 2026-11-07 12:23 UTC
feat(roadmap): add a fetch_page tool to refine and alternatives (#3974)