rea-agents
    Preparing search index...

    Function analyzeCapturedWebBundle

    • Analyze captured, explicitly approved JavaScript source without execution.

      Parameters

      • inspection: {
            accessibility: {
                nodes: {
                    description: string | null;
                    ignored: boolean;
                    name: string | null;
                    node_id: string;
                    parent_id: string | null;
                    role: string | null;
                }[];
                text_capture: {
                    excluded_fields: number;
                    retained_bytes: number;
                    status: "truncated"
                    | "unavailable"
                    | "not_approved"
                    | "included";
                    truncated_fields: number;
                };
                total_nodes: number;
            };
            browser: {
                js_version: string;
                product: string;
                protocol_version: string;
                revision: string;
                user_agent: string;
            };
            capture_window: {
                ended_at: string;
                observation_ms: number;
                started_at: string;
            };
            completeness: {
                attach_limited_sections: (
                    | "frames"
                    | "websocket_connections"
                    | "metadata"
                    | "resources"
                    | "storage"
                    | "dom"
                    | "accessibility"
                    | "scripts"
                    | "script_sources"
                    | "network_requests"
                    | "network_initiators"
                    | "console_events"
                    | "console_text"
                    | "websocket_frames"
                    | "websocket_shapes"
                    | "json_body_shapes"
                    | "workers"
                    | "storage_keys"
                    | "webmcp_tools"
                    | "screenshot"
                    | "source_maps"
                    | "timeline"
                )[];
                conditions: (
                    | "truncated"
                    | "complete_within_window"
                    | "policy_filtered"
                    | "attach_limited"
                )[];
                dropped_events: {
                    console_events: number;
                    network_requests: number;
                    scripts: number;
                    timeline_events: number;
                    total: number;
                    webmcp_tools: number;
                    websocket_connections: number;
                    websocket_frames: number;
                };
                excluded: {
                    count: number
                    | null;
                    reason:
                        | "provider_unavailable"
                        | "disallowed_origin"
                        | "unsupported_url"
                        | "unattributed_origin"
                        | "not_approved"
                        | "out_of_target_scope"
                        | "invalid_protocol_value";
                    section: | "frames"
                    | "websocket_connections"
                    | "metadata"
                    | "resources"
                    | "storage"
                    | "dom"
                    | "accessibility"
                    | "scripts"
                    | "script_sources"
                    | "network_requests"
                    | "network_initiators"
                    | "console_events"
                    | "console_text"
                    | "websocket_frames"
                    | "websocket_shapes"
                    | "json_body_shapes"
                    | "workers"
                    | "storage_keys"
                    | "webmcp_tools"
                    | "screenshot"
                    | "source_maps"
                    | "timeline";
                }[];
                policy_filtered_sections: (
                    | "frames"
                    | "websocket_connections"
                    | "metadata"
                    | "resources"
                    | "storage"
                    | "dom"
                    | "accessibility"
                    | "scripts"
                    | "script_sources"
                    | "network_requests"
                    | "network_initiators"
                    | "console_events"
                    | "console_text"
                    | "websocket_frames"
                    | "websocket_shapes"
                    | "json_body_shapes"
                    | "workers"
                    | "storage_keys"
                    | "webmcp_tools"
                    | "screenshot"
                    | "source_maps"
                    | "timeline"
                )[];
                status: | "truncated"
                | "complete_within_window"
                | "policy_filtered"
                | "attach_limited";
                truncated_sections: (
                    | "frames"
                    | "websocket_connections"
                    | "metadata"
                    | "resources"
                    | "storage"
                    | "dom"
                    | "accessibility"
                    | "scripts"
                    | "script_sources"
                    | "network_requests"
                    | "network_initiators"
                    | "console_events"
                    | "console_text"
                    | "websocket_frames"
                    | "websocket_shapes"
                    | "json_body_shapes"
                    | "workers"
                    | "storage_keys"
                    | "webmcp_tools"
                    | "screenshot"
                    | "source_maps"
                    | "timeline"
                )[];
                unavailable_sections: (
                    | "frames"
                    | "websocket_connections"
                    | "metadata"
                    | "resources"
                    | "storage"
                    | "dom"
                    | "accessibility"
                    | "scripts"
                    | "script_sources"
                    | "network_requests"
                    | "network_initiators"
                    | "console_events"
                    | "console_text"
                    | "websocket_frames"
                    | "websocket_shapes"
                    | "json_body_shapes"
                    | "workers"
                    | "storage_keys"
                    | "webmcp_tools"
                    | "screenshot"
                    | "source_maps"
                    | "timeline"
                )[];
            };
            console: {
                coverage_started_at: string;
                events: {
                    argument_types: string[];
                    column: number
                    | null;
                    line: number | null;
                    text_capture: {
                        retained_bytes: number;
                        status: "truncated" | "not_approved" | "included";
                        truncated_values: number;
                        values: { argument_index: number; text: string; type: string }[];
                    };
                    timestamp: number;
                    type: string;
                    url: string
                    | null;
                }[];
                prior_activity_available: false;
            };
            dom: {
                nodes: {
                    attribute_names: string[];
                    index: number;
                    node_name: string;
                    node_type: number;
                    node_value_length: number;
                    parent_index: number;
                }[];
                total_nodes: number;
            };
            frames: {
                frame_id: string;
                origin: string
                | null;
                parent_frame_id: string | null;
                url: string;
            }[];
            limitations: string[];
            metadata: {
                agent_hints: {
                    declaration: string;
                    mechanism: | "link_rel"
                    | "dom_link_rel"
                    | "well_known_resource"
                    | "response_header";
                    trust: "page-declared-untrusted";
                    url: string
                    | null;
                }[];
                dom_urls: {
                    attribute: "action"
                    | "href"
                    | "src"
                    | "formaction"
                    | "poster";
                    destination_scope: "approved" | "unsupported" | "outside_policy";
                    node_index: number;
                    url: string | null;
                }[];
                excluded_dom_urls: number;
                headers_allowlisted: true;
                responses: {
                    content_encoding: string
                    | null;
                    content_length: number | null;
                    csp: {
                        directives: {
                            name: string;
                            sources: {
                                kind:
                                    | "other"
                                    | "keyword"
                                    | "scheme"
                                    | "approved_origin"
                                    | "external_origin";
                                value: string
                                | null;
                            }[];
                        }[];
                        hash_count: number;
                        nonce_count: number;
                    };
                    links: {
                        as: string
                        | null;
                        crossorigin: string | null;
                        destination_scope: "approved" | "unsupported" | "outside_policy";
                        href: string | null;
                        rel: string[];
                        type: string | null;
                    }[];
                    mime_type: string
                    | null;
                    policies: {
                        coep: string | null;
                        coop: string | null;
                        corp: string | null;
                        permissions_policy_features: string[];
                        referrer_policy: string | null;
                        x_content_type_options: string | null;
                    };
                    request_id: string;
                    url: string;
                }[];
            };
            network: {
                coverage_started_at: string;
                prior_activity_available: false;
                requests: {
                    body_shapes: {
                        request: | {
                            max_depth_observed: number;
                            node_count: number;
                            properties: {
                                observations: number;
                                path: string;
                                types: ((...) | (...) | (...) | (...) | (...) | (...))[];
                            }[];
                            root_type: | "string"
                            | "number"
                            | "boolean"
                            | "object"
                            | "null"
                            | "array";
                            truncated: boolean;
                        }
                        | null;
                        response: | {
                            max_depth_observed: number;
                            node_count: number;
                            properties: {
                                observations: number;
                                path: string;
                                types: ((...) | (...) | (...) | (...) | (...) | (...))[];
                            }[];
                            root_type: | "string"
                            | "number"
                            | "boolean"
                            | "object"
                            | "null"
                            | "array";
                            truncated: boolean;
                        }
                        | null;
                        status: | "truncated"
                        | "unavailable"
                        | "partial"
                        | "not_approved"
                        | "included";
                    };
                    encoded_data_length: number
                    | null;
                    initiator: {
                        column: number | null;
                        line: number | null;
                        type: string;
                        url: string | null;
                    };
                    method: string;
                    mime_type: string
                    | null;
                    origin: string | null;
                    request_id: string;
                    resource_type: string | null;
                    status: number | null;
                    url: string;
                }[];
                websocket_events: {
                    direction: "received"
                    | "sent";
                    opcode: number;
                    payload_bytes: number;
                    payload_shape:
                        | {
                            format: "binary"
                            | "text"
                            | "json";
                            json_shape:
                                | {
                                    max_depth_observed: number;
                                    node_count: number;
                                    properties: { observations: number; path: string; types: (...)[] }[];
                                    root_type:
                                        | "string"
                                        | "number"
                                        | "boolean"
                                        | "object"
                                        | "null"
                                        | "array";
                                    truncated: boolean;
                                }
                                | null;
                            truncated: boolean;
                        }
                        | null;
                    request_id: string;
                }[];
            };
            resources: {
                content_size: number
                | null;
                mime_type: string;
                origin: string | null;
                resource_key: string;
                type: string;
                url: string;
            }[];
            schema_version: 2;
            scripts: {
                items: {
                    cdp_hash: string;
                    frame_id: string
                    | null;
                    is_module: boolean;
                    language: string | null;
                    length: number;
                    origin: string | null;
                    resource_reconciliation:
                        | { resource_key: string; status: "exact" }
                        | { candidate_resource_keys: string[]; status: "ambiguous" }
                        | { reason: "no_exact_sanitized_url"; status: "unmatched" };
                    script_key: string;
                    source:
                        | { included: false; reason: string }
                        | {
                            artifact: {
                                bytes: number;
                                charset: "utf-8";
                                media_type: string;
                                sha256: string;
                                text: string;
                                uri: string;
                            };
                            included: true;
                        };
                    source_map_url: string
                    | null;
                    url: string;
                }[];
                total: number;
            };
            storage: {
                cache_names: string[];
                indexed_db_names: string[];
                local_storage_keys: string[];
                origin: string;
                quota_bytes: number
                | null;
                session_storage_keys: string[];
                usage_bytes: number | null;
                values_redacted: true;
            };
            target: {
                attached: boolean;
                origin: string;
                target_id: string;
                title: string;
                type: string;
                url: string;
            };
            workers: {
                attached: boolean;
                opener_target_id: string
                | null;
                origin: string | null;
                parent_frame_id: string | null;
                target_id: string;
                type: string;
                url: string;
            }[];
        }
      • input: {
            allowed_origins: string[];
            analysis_limits: {
                max_ast_nodes: number;
                max_findings: number;
                max_original_sources: number;
                max_source_map_bytes: number;
                max_source_map_mappings: number;
                max_source_maps: number;
                max_total_source_map_bytes: number;
            };
            approved: true;
            cdp_endpoint: string;
            console_text_approved: boolean;
            fetch_source_maps: boolean;
            include_accessibility_text: boolean;
            include_console_text: boolean;
            include_json_body_shapes: boolean;
            include_script_sources: true;
            include_storage_keys: boolean;
            include_websocket_shapes: boolean;
            json_body_schema_approved: boolean;
            limits: {
                max_ax_nodes: number;
                max_ax_text_field_bytes: number;
                max_console_events: number;
                max_console_text_field_bytes: number;
                max_dom_nodes: number;
                max_frames: number;
                max_json_body_bytes: number;
                max_json_shape_depth: number;
                max_json_shape_nodes: number;
                max_network_events: number;
                max_resources: number;
                max_script_source_bytes: number;
                max_scripts: number;
                max_storage_keys: number;
                max_total_ax_text_bytes: number;
                max_total_console_text_bytes: number;
                max_total_json_body_bytes: number;
                max_total_script_source_bytes: number;
                max_total_websocket_shape_bytes: number;
                max_websocket_events: number;
                max_websocket_shape_bytes: number;
                max_workers: number;
            };
            observation_ms: number;
            source_capture_approved: true;
            source_map_fetch_approved: boolean;
            target_id: string;
            websocket_shape_approved: boolean;
        }
      • sourceMaps: {
            dropped: number;
            dropped_script_keys: string[];
            items: {
                artifact:
                    | {
                        bytes: number;
                        charset: "utf-8";
                        media_type: string;
                        sha256: string;
                        text: string;
                        uri: string;
                    }
                    | null;
                declared_url: string;
                limitation: string
                | null;
                mappings: {
                    generated_column: number;
                    generated_line: number;
                    name: string | null;
                    original_column: number;
                    original_line: number;
                    source: string;
                }[];
                original_module_edges: {
                    from_source: string;
                    kind: "static_import"
                    | "dynamic_import"
                    | "require";
                    resolved_source: string | null;
                    specifier: string;
                }[];
                original_sources: {
                    artifact: | {
                        bytes: number;
                        charset: "utf-8";
                        media_type: string;
                        sha256: string;
                        text: string;
                        uri: string;
                    }
                    | null;
                    source: string;
                }[];
                script_key: string;
                status: | "truncated"
                | "invalid"
                | "policy_filtered"
                | "included"
                | "fetch_failed";
            }[];
            processed: number;
            requested: number;
            status: | "truncated"
            | "unavailable"
            | "partial"
            | "included"
            | "not_requested";
        } = ...

      Returns {
          capture: {
              scripts_analyzed: number;
              scripts_observed: number;
              source_artifacts: {
                  bytes: number;
                  charset: "utf-8";
                  media_type: string;
                  sha256: string;
                  text_available: true;
                  uri: string;
              }[];
              target_url: string;
          };
          completeness: {
              dropped_findings: number;
              parse_failures: number;
              parsed_scripts: number;
              status: "truncated"
              | "partial"
              | "complete_within_limits";
              visited_ast_nodes: number;
          };
          inferences: {
              basis: {
                  artifact_sha256: string;
                  column: number
                  | null;
                  detector: string;
                  line: number | null;
                  script_key: string;
              }[];
              confidence: "low"
              | "medium"
              | "high";
              kind: "vendor_fingerprint" | "route_framework" | "bundle_runtime";
              value: string;
          }[];
          limitations: string[];
          observations: {
              chunks: {
                  edges: {
                      from_script_key: string;
                      kind: "static_import"
                      | "dynamic_import"
                      | "require"
                      | "worker_import";
                      location: {
                          column: number | null;
                          line: number | null;
                          script_key: string;
                      };
                      resolved_url: string
                      | null;
                      specifier: string;
                  }[];
                  nodes: {
                      artifact_sha256: string;
                      bytes: number;
                      script_key: string;
                      url: string;
                  }[];
              };
              endpoints: {
                  location: {
                      column: number
                      | null;
                      line: number | null;
                      script_key: string;
                  };
                  mechanism: string;
                  value: string;
              }[];
              routes: {
                  location: {
                      column: number
                      | null;
                      line: number | null;
                      script_key: string;
                  };
                  mechanism: string;
                  value: string;
              }[];
              source_maps: {
                  dropped: number;
                  dropped_script_keys: string[];
                  items: {
                      artifact: | {
                          bytes: number;
                          charset: "utf-8";
                          media_type: string;
                          sha256: string;
                          text: string;
                          uri: string;
                      }
                      | null;
                      declared_url: string;
                      limitation: string
                      | null;
                      mappings: {
                          generated_column: number;
                          generated_line: number;
                          name: string | null;
                          original_column: number;
                          original_line: number;
                          source: string;
                      }[];
                      original_module_edges: {
                          from_source: string;
                          kind: "static_import"
                          | "dynamic_import"
                          | "require";
                          resolved_source: string | null;
                          specifier: string;
                      }[];
                      original_sources: {
                          artifact: | {
                              bytes: number;
                              charset: "utf-8";
                              media_type: string;
                              sha256: string;
                              text: string;
                              uri: string;
                          }
                          | null;
                          source: string;
                      }[];
                      script_key: string;
                      status: | "truncated"
                      | "invalid"
                      | "policy_filtered"
                      | "included"
                      | "fetch_failed";
                  }[];
                  processed: number;
                  requested: number;
                  status: | "truncated"
                  | "unavailable"
                  | "partial"
                  | "included"
                  | "not_requested";
              };
              webmcp_declarations: {
                  description: string
                  | null;
                  location: {
                      column: number | null;
                      line: number | null;
                      script_key: string;
                  };
                  name: string
                  | null;
                  schema_property_names: string[];
                  trust: "page-declared-untrusted";
              }[];
          };
          schema_version: 1;
          unknowns: {
              affected_script_keys: string[];
              dimension: string;
              reason: string;
          }[];
      }