forge-lcdl

Task `pw_network_api_route_infer` v1

Given observed browser network events (bounded traces only), infer whether a quiz or ingest-relevant content appears API-backed, estimate confidence, list endpoint candidates grounded strictly in those traces, and note…

Task pw_network_api_route_infer v1

Summary

Given observed browser network events (bounded traces only), infer whether a quiz or ingest-relevant content appears API-backed, estimate confidence, list endpoint candidates grounded strictly in those traces, and note whether a browser session is likely required.

LCDL never executes HTTP requests or Playwright; it only classifies supplied traces.

Inputs

Field Type Required Notes
url string yes Page URL for context (non-empty after strip).
page_probe object yes Bounded probe JSON; may be {}.
network_events array yes Observed requests/responses (see row shape below).
operator_hints string no Short human hints; omit or "" if none.
temperature number no Default 0.05.
timeout_sec int no Default profile.timeout_sec.

network_events[] row shape

Field Type Required
method string yes
url_path string yes
status number yes
content_type string yes
request_excerpt string yes
response_shape object yes

User JSON is UTF-8 capped at 100000 bytes before the LLM call.

Output

JSON object (Ok.value):

Field Type Notes
api_backed boolean Whether traces suggest API-driven quiz/source payloads.
confidence number Coerced to [0.0, 1.0] after parse.
question_endpoint_candidates array Objects grounded in network_events (see below).
submit_endpoint_candidates array Same shape / grounding rules.
answer_endpoint_candidates array Same shape / grounding rules.
requires_browser_session boolean Likely needs cookies / same-origin session for replay.
notes string Short rationale from traces only; no secrets.

Candidate object

Each non-empty candidate entry must be an object including:

  • url_path (string): must match exactly (after strip) some row’s url_path from input network_events.
  • method (string, optional): when present, must match exactly (case-insensitive after normalization) that row’s method for the same url_path.

Additional string fields on candidates are allowed if present.

Policy

  • Do not bypass login, CAPTCHA, paywalls, anti-bot protections, or proctored exam controls.
  • Do not invent endpoints; every candidate url_path must appear in the supplied network_events.
  • Do not recommend extracting, copying, or leaking secrets, cookies, bearer tokens, or credentials.
  • When traces are insufficient, report low confidence and prefer empty candidate arrays.

Implementation

  • Uses run_json_contract_task then post-validation (types, confidence coercion, trace grounding for candidates).

Changelog

  • v1 — Initial network trace API inference task.