crawldex-report 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,57 @@
1
+ Metadata-Version: 2.4
2
+ Name: crawldex-report
3
+ Version: 0.1.0
4
+ Summary: Python reporter SDK for CrawlDex preflight and outcome reports.
5
+ Home-page: https://crawldex.com
6
+ Author: CrawlDex
7
+ License: MIT
8
+ Project-URL: Homepage, https://crawldex.com
9
+ Keywords: crawldex,browser-agents,reporting,preflight
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3 :: Only
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Requires-Python: >=3.9
21
+ Description-Content-Type: text/markdown
22
+
23
+ # crawldex-report
24
+
25
+ Python SDK for CrawlDex preflight checks and score-neutral outcome reporting.
26
+
27
+ ```py
28
+ from crawldex_report import CrawlDexReporter
29
+
30
+ reporter = CrawlDexReporter(
31
+ report_url="https://crawldex.com/api/v1/runs",
32
+ agent_key="aa_agent_...",
33
+ dry_run=True,
34
+ )
35
+
36
+ verdict = reporter.preflight("demo-shop.crawldex.com", "commerce.checkout")
37
+
38
+ receipt = reporter.report({
39
+ "site": "demo-shop.crawldex.com",
40
+ "task": "commerce.checkout",
41
+ "outcome": "success_with_handoff",
42
+ "friction": ["login_required"],
43
+ "evidence": {
44
+ "artifact": {
45
+ "signals": ["checkout_loaded", "login_required"],
46
+ "removed_fields": ["screenshots", "cookies", "form_values"],
47
+ },
48
+ "artifact_types": ["action_summary"],
49
+ "redaction_status": "hash_only",
50
+ },
51
+ })
52
+ ```
53
+
54
+ Runtime code uses only the Python standard library. Build metadata is included
55
+ for local wheel/sdist creation; do not publish without CrawlDex release
56
+ credentials and review.
57
+
@@ -0,0 +1,35 @@
1
+ # crawldex-report
2
+
3
+ Python SDK for CrawlDex preflight checks and score-neutral outcome reporting.
4
+
5
+ ```py
6
+ from crawldex_report import CrawlDexReporter
7
+
8
+ reporter = CrawlDexReporter(
9
+ report_url="https://crawldex.com/api/v1/runs",
10
+ agent_key="aa_agent_...",
11
+ dry_run=True,
12
+ )
13
+
14
+ verdict = reporter.preflight("demo-shop.crawldex.com", "commerce.checkout")
15
+
16
+ receipt = reporter.report({
17
+ "site": "demo-shop.crawldex.com",
18
+ "task": "commerce.checkout",
19
+ "outcome": "success_with_handoff",
20
+ "friction": ["login_required"],
21
+ "evidence": {
22
+ "artifact": {
23
+ "signals": ["checkout_loaded", "login_required"],
24
+ "removed_fields": ["screenshots", "cookies", "form_values"],
25
+ },
26
+ "artifact_types": ["action_summary"],
27
+ "redaction_status": "hash_only",
28
+ },
29
+ })
30
+ ```
31
+
32
+ Runtime code uses only the Python standard library. Build metadata is included
33
+ for local wheel/sdist creation; do not publish without CrawlDex release
34
+ credentials and review.
35
+
@@ -0,0 +1,34 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "crawldex-report"
7
+ version = "0.1.0"
8
+ description = "Python reporter SDK for CrawlDex preflight and outcome reports."
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = { text = "MIT" }
12
+ authors = [
13
+ { name = "CrawlDex" }
14
+ ]
15
+ keywords = ["crawldex", "browser-agents", "reporting", "preflight"]
16
+ classifiers = [
17
+ "Development Status :: 3 - Alpha",
18
+ "Intended Audience :: Developers",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Programming Language :: Python :: 3",
21
+ "Programming Language :: Python :: 3 :: Only",
22
+ "Programming Language :: Python :: 3.9",
23
+ "Programming Language :: Python :: 3.10",
24
+ "Programming Language :: Python :: 3.11",
25
+ "Programming Language :: Python :: 3.12",
26
+ "Programming Language :: Python :: 3.13",
27
+ ]
28
+
29
+ [project.urls]
30
+ Homepage = "https://crawldex.com"
31
+
32
+ [tool.setuptools.packages.find]
33
+ where = ["src"]
34
+
@@ -0,0 +1,36 @@
1
+ [metadata]
2
+ name = crawldex-report
3
+ version = 0.1.0
4
+ description = Python reporter SDK for CrawlDex preflight and outcome reports.
5
+ long_description = file: README.md
6
+ long_description_content_type = text/markdown
7
+ author = CrawlDex
8
+ license = MIT
9
+ url = https://crawldex.com
10
+ keywords = crawldex, browser-agents, reporting, preflight
11
+ classifiers =
12
+ Development Status :: 3 - Alpha
13
+ Intended Audience :: Developers
14
+ License :: OSI Approved :: MIT License
15
+ Programming Language :: Python :: 3
16
+ Programming Language :: Python :: 3 :: Only
17
+ Programming Language :: Python :: 3.9
18
+ Programming Language :: Python :: 3.10
19
+ Programming Language :: Python :: 3.11
20
+ Programming Language :: Python :: 3.12
21
+ Programming Language :: Python :: 3.13
22
+
23
+ [options]
24
+ package_dir =
25
+ = src
26
+ packages = find:
27
+ python_requires = >=3.9
28
+ include_package_data = True
29
+
30
+ [options.packages.find]
31
+ where = src
32
+
33
+ [egg_info]
34
+ tag_build =
35
+ tag_date = 0
36
+
@@ -0,0 +1,22 @@
1
+ """CrawlDex Python reporter SDK."""
2
+
3
+ from .core import (
4
+ CrawlDexReporter,
5
+ PreflightVerdict,
6
+ SubmissionReceipt,
7
+ canonical_json,
8
+ hash_evidence_artifact,
9
+ map_to_run_report,
10
+ redact_evidence_artifact,
11
+ )
12
+
13
+ __all__ = [
14
+ "CrawlDexReporter",
15
+ "PreflightVerdict",
16
+ "SubmissionReceipt",
17
+ "canonical_json",
18
+ "hash_evidence_artifact",
19
+ "map_to_run_report",
20
+ "redact_evidence_artifact",
21
+ ]
22
+
@@ -0,0 +1,65 @@
1
+ """browser-use adapter helpers for CrawlDex reporting."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import asyncio
6
+ import time
7
+ from typing import Any, Mapping, Optional, Sequence
8
+
9
+ from .core import CrawlDexReporter, SubmissionReceipt
10
+
11
+
12
+ async def report_browser_use_result(
13
+ *,
14
+ reporter: CrawlDexReporter,
15
+ result: Any,
16
+ site: str,
17
+ task: str,
18
+ agent_profile: Optional[Mapping[str, Any]] = None,
19
+ outcome: str,
20
+ friction: Optional[Sequence[str]] = None,
21
+ evidence_signals: Optional[Sequence[str]] = None,
22
+ source_tier: Optional[str] = None,
23
+ occurred_at: Optional[str] = None,
24
+ ) -> SubmissionReceipt:
25
+ """Submit a redacted browser-use run summary.
26
+
27
+ `result` is accepted for adapter parity but is not introspected by default,
28
+ because browser-use histories can contain raw browser state or prompts.
29
+ """
30
+
31
+ started_at = time.monotonic()
32
+ signals = list(evidence_signals or [])
33
+ payload = {
34
+ "site": site,
35
+ "task": task,
36
+ "agent_profile": {"stack": "browser-use", **dict(agent_profile or {})},
37
+ "outcome": outcome,
38
+ "friction": list(friction or []),
39
+ "duration_sec": max(0, round(time.monotonic() - started_at)),
40
+ "evidence": {
41
+ "artifact": {
42
+ "schema": "crawldex.evidence.redacted.v1",
43
+ "redaction_status": "hash_only",
44
+ "signals": signals,
45
+ "removed_fields": [
46
+ "screenshots",
47
+ "cookies",
48
+ "storage_state",
49
+ "network_bodies",
50
+ "form_values",
51
+ "agent_history",
52
+ "prompts",
53
+ ],
54
+ },
55
+ "artifact_types": ["action_summary"],
56
+ "redaction_status": "hash_only",
57
+ },
58
+ }
59
+ if source_tier is not None:
60
+ payload["source_tier"] = source_tier
61
+ if occurred_at is not None:
62
+ payload["occurred_at"] = occurred_at
63
+
64
+ return await asyncio.to_thread(reporter.report, payload)
65
+