agentlock-browser 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.
Files changed (98) hide show
  1. agentlock_browser-0.1.0/.github/workflows/ci.yml +83 -0
  2. agentlock_browser-0.1.0/.gitignore +12 -0
  3. agentlock_browser-0.1.0/LICENSE +661 -0
  4. agentlock_browser-0.1.0/NEEDS.md +232 -0
  5. agentlock_browser-0.1.0/PKG-INFO +312 -0
  6. agentlock_browser-0.1.0/PREDICTIONS.md +215 -0
  7. agentlock_browser-0.1.0/README.md +284 -0
  8. agentlock_browser-0.1.0/agentlock_browser/__init__.py +29 -0
  9. agentlock_browser-0.1.0/agentlock_browser/__main__.py +21 -0
  10. agentlock_browser-0.1.0/agentlock_browser/browser.py +484 -0
  11. agentlock_browser-0.1.0/agentlock_browser/config.py +123 -0
  12. agentlock_browser-0.1.0/agentlock_browser/gate.py +419 -0
  13. agentlock_browser-0.1.0/agentlock_browser/log.py +60 -0
  14. agentlock_browser-0.1.0/agentlock_browser/models.py +115 -0
  15. agentlock_browser-0.1.0/agentlock_browser/provenance.py +139 -0
  16. agentlock_browser-0.1.0/agentlock_browser/server.py +149 -0
  17. agentlock_browser-0.1.0/agentlock_browser/service.py +275 -0
  18. agentlock_browser-0.1.0/package-lock.json +68 -0
  19. agentlock_browser-0.1.0/package.json +5 -0
  20. agentlock_browser-0.1.0/probe/REPORT.md +284 -0
  21. agentlock_browser-0.1.0/probe/cdp/REPORT.md +172 -0
  22. agentlock_browser-0.1.0/probe/cdp/raw.txt +170 -0
  23. agentlock_browser-0.1.0/probe/item4/REPORT.md +360 -0
  24. agentlock_browser-0.1.0/probe/item4/raw_agentlock.txt +182 -0
  25. agentlock_browser-0.1.0/probe/item4/raw_browser.txt +138 -0
  26. agentlock_browser-0.1.0/probe/list_tools.py +27 -0
  27. agentlock_browser-0.1.0/probe/origin/REPORT.md +189 -0
  28. agentlock_browser-0.1.0/probe/origin/raw_guard.txt +103 -0
  29. agentlock_browser-0.1.0/probe/origin/raw_nav.txt +211 -0
  30. agentlock_browser-0.1.0/probe/popup/REPORT.md +105 -0
  31. agentlock_browser-0.1.0/probe/popup/raw.txt +137 -0
  32. agentlock_browser-0.1.0/probe/run_control.py +35 -0
  33. agentlock_browser-0.1.0/probe/run_probe.py +73 -0
  34. agentlock_browser-0.1.0/probe/run_target_probe.py +74 -0
  35. agentlock_browser-0.1.0/probe/tools.json +993 -0
  36. agentlock_browser-0.1.0/pyproject.toml +44 -0
  37. agentlock_browser-0.1.0/tests/__init__.py +0 -0
  38. agentlock_browser-0.1.0/tests/agent_runner.py +320 -0
  39. agentlock_browser-0.1.0/tests/fixtures/article.html +6 -0
  40. agentlock_browser-0.1.0/tests/fixtures/auto_open.html +6 -0
  41. agentlock_browser-0.1.0/tests/fixtures/blank_link.html +5 -0
  42. agentlock_browser-0.1.0/tests/fixtures/blank_same.html +5 -0
  43. agentlock_browser-0.1.0/tests/fixtures/index.html +10 -0
  44. agentlock_browser-0.1.0/tests/fixtures/results.html +5 -0
  45. agentlock_browser-0.1.0/tests/fixtures/t1_source.html +12 -0
  46. agentlock_browser-0.1.0/tests/fixtures/t2_offsite.html +9 -0
  47. agentlock_browser-0.1.0/tests/fixtures/t3_form.html +16 -0
  48. agentlock_browser-0.1.0/tests/fixtures/t4_escape.html +6 -0
  49. agentlock_browser-0.1.0/tests/fixtures/window_open.html +5 -0
  50. agentlock_browser-0.1.0/tests/harness.py +127 -0
  51. agentlock_browser-0.1.0/tests/results/T5.txt +119 -0
  52. agentlock_browser-0.1.0/tests/results/model_runs/REPORT.md +302 -0
  53. agentlock_browser-0.1.0/tests/results/model_runs/REPORT_run2.md +154 -0
  54. agentlock_browser-0.1.0/tests/results/model_runs/T1_1.jsonl +17 -0
  55. agentlock_browser-0.1.0/tests/results/model_runs/T1_2.jsonl +17 -0
  56. agentlock_browser-0.1.0/tests/results/model_runs/T1_3.jsonl +17 -0
  57. agentlock_browser-0.1.0/tests/results/model_runs/T1_4.jsonl +17 -0
  58. agentlock_browser-0.1.0/tests/results/model_runs/T1_5.jsonl +17 -0
  59. agentlock_browser-0.1.0/tests/results/model_runs/T2_1.jsonl +27 -0
  60. agentlock_browser-0.1.0/tests/results/model_runs/T2_2.jsonl +27 -0
  61. agentlock_browser-0.1.0/tests/results/model_runs/T2_3.jsonl +25 -0
  62. agentlock_browser-0.1.0/tests/results/model_runs/T2_4.jsonl +20 -0
  63. agentlock_browser-0.1.0/tests/results/model_runs/T2_5.jsonl +24 -0
  64. agentlock_browser-0.1.0/tests/results/model_runs/T3_1.jsonl +17 -0
  65. agentlock_browser-0.1.0/tests/results/model_runs/T3_2.jsonl +17 -0
  66. agentlock_browser-0.1.0/tests/results/model_runs/T3_3.jsonl +21 -0
  67. agentlock_browser-0.1.0/tests/results/model_runs/T3_4.jsonl +17 -0
  68. agentlock_browser-0.1.0/tests/results/model_runs/T3_5.jsonl +17 -0
  69. agentlock_browser-0.1.0/tests/results/model_runs/T4_1.jsonl +23 -0
  70. agentlock_browser-0.1.0/tests/results/model_runs/T4_2.jsonl +23 -0
  71. agentlock_browser-0.1.0/tests/results/model_runs/T4_3.jsonl +23 -0
  72. agentlock_browser-0.1.0/tests/results/model_runs/T4_4.jsonl +23 -0
  73. agentlock_browser-0.1.0/tests/results/model_runs/T4_5.jsonl +23 -0
  74. agentlock_browser-0.1.0/tests/results/model_runs/raw_runs.json +4776 -0
  75. agentlock_browser-0.1.0/tests/results/model_runs/run2/T1_1.jsonl +30 -0
  76. agentlock_browser-0.1.0/tests/results/model_runs/run2/T1_2.jsonl +21 -0
  77. agentlock_browser-0.1.0/tests/results/model_runs/run2/T1_3.jsonl +25 -0
  78. agentlock_browser-0.1.0/tests/results/model_runs/run2/T1_4.jsonl +25 -0
  79. agentlock_browser-0.1.0/tests/results/model_runs/run2/T1_5.jsonl +21 -0
  80. agentlock_browser-0.1.0/tests/results/model_runs/run2/T2_1.jsonl +26 -0
  81. agentlock_browser-0.1.0/tests/results/model_runs/run2/T2_2.jsonl +17 -0
  82. agentlock_browser-0.1.0/tests/results/model_runs/run2/T2_3.jsonl +35 -0
  83. agentlock_browser-0.1.0/tests/results/model_runs/run2/T2_4.jsonl +27 -0
  84. agentlock_browser-0.1.0/tests/results/model_runs/run2/T2_5.jsonl +17 -0
  85. agentlock_browser-0.1.0/tests/results/model_runs/run2/T3_1.jsonl +29 -0
  86. agentlock_browser-0.1.0/tests/results/model_runs/run2/T3_2.jsonl +28 -0
  87. agentlock_browser-0.1.0/tests/results/model_runs/run2/T3_3.jsonl +25 -0
  88. agentlock_browser-0.1.0/tests/results/model_runs/run2/T3_4.jsonl +25 -0
  89. agentlock_browser-0.1.0/tests/results/model_runs/run2/T3_5.jsonl +24 -0
  90. agentlock_browser-0.1.0/tests/results/model_runs/run2/raw_runs.json +4938 -0
  91. agentlock_browser-0.1.0/tests/results/newpages_post.txt +462 -0
  92. agentlock_browser-0.1.0/tests/results/newpages_pre.txt +469 -0
  93. agentlock_browser-0.1.0/tests/results/redirects_post.txt +570 -0
  94. agentlock_browser-0.1.0/tests/results/redirects_pre.txt +461 -0
  95. agentlock_browser-0.1.0/tests/test_new_pages.py +311 -0
  96. agentlock_browser-0.1.0/tests/test_redirects.py +436 -0
  97. agentlock_browser-0.1.0/tests/test_t1_t4_pending.py +86 -0
  98. agentlock_browser-0.1.0/tests/test_t5_baseline.py +137 -0
@@ -0,0 +1,83 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ tests:
13
+ name: tests (python ${{ matrix.python-version }})
14
+ runs-on: ubuntu-latest
15
+ strategy:
16
+ fail-fast: false
17
+ matrix:
18
+ python-version: ["3.11", "3.12", "3.13"]
19
+
20
+ steps:
21
+ - uses: actions/checkout@v7
22
+
23
+ - name: Set up Python ${{ matrix.python-version }}
24
+ uses: actions/setup-python@v7
25
+ with:
26
+ python-version: ${{ matrix.python-version }}
27
+ cache: pip
28
+ cache-dependency-path: pyproject.toml
29
+
30
+ - name: Install
31
+ run: pip install -e ".[dev]"
32
+
33
+ - name: Resolve playwright version
34
+ id: pw
35
+ run: |
36
+ version=$(python -c "import importlib.metadata as m; print(m.version('playwright'))")
37
+ echo "version=$version" >> "$GITHUB_OUTPUT"
38
+
39
+ - name: Cache playwright browsers
40
+ uses: actions/cache@v6
41
+ with:
42
+ path: ~/.cache/ms-playwright
43
+ key: ${{ runner.os }}-playwright-${{ steps.pw.outputs.version }}
44
+ restore-keys: |
45
+ ${{ runner.os }}-playwright-
46
+
47
+ - name: Install chromium
48
+ run: python -m playwright install --with-deps chromium
49
+
50
+ # T5, the redirect regressions and the new-page regressions run here.
51
+ # T1 to T4 are model-driven and stay skipped: they need a model and an
52
+ # API key, and neither belongs in CI.
53
+ - name: Test
54
+ run: pytest -q
55
+
56
+ hygiene:
57
+ name: hygiene
58
+ runs-on: ubuntu-latest
59
+
60
+ steps:
61
+ - uses: actions/checkout@v7
62
+
63
+ # The dash is built with printf rather than written literally, so this
64
+ # file does not fail its own check.
65
+ - name: No em dashes
66
+ run: |
67
+ dash=$(printf '\xe2\x80\x94')
68
+ if grep -rn "$dash" . \
69
+ --exclude-dir=.git \
70
+ --exclude-dir=node_modules \
71
+ --exclude-dir=.venv; then
72
+ echo "::error::em dash found; replace with a comma, colon, period or parentheses"
73
+ exit 1
74
+ fi
75
+ echo "no em dashes"
76
+
77
+ - name: No tracked .env
78
+ run: |
79
+ if git ls-files | grep -E '(^|/)\.env$'; then
80
+ echo "::error::a .env file is tracked; it must stay untracked and gitignored"
81
+ exit 1
82
+ fi
83
+ echo "no tracked .env"
@@ -0,0 +1,12 @@
1
+ __pycache__/
2
+ *.pyc
3
+ .venv/
4
+ venv/
5
+ node_modules/
6
+ dist/
7
+ *.egg-info/
8
+ probe/results/
9
+ probe/output/
10
+ probe/output_control/
11
+ scratchpad/
12
+ .env