robotframework-harness 1.0.0__py3-none-any.whl

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 (82) hide show
  1. rf_harness/__init__.py +3 -0
  2. rf_harness/_assets/.claude-plugin/plugin.json +10 -0
  3. rf_harness/_assets/bin/rfh-launch +60 -0
  4. rf_harness/_assets/bin/rfh-launch.cmd +19 -0
  5. rf_harness/_assets/bin/rfh_launch.py +719 -0
  6. rf_harness/_assets/hooks/hooks.json +84 -0
  7. rf_harness/_assets/skills/rf-harness/SKILL.md +78 -0
  8. rf_harness/_assets/skills/rf-harness/references/browser.md +157 -0
  9. rf_harness/_assets/skills/rf-harness/references/debug.md +39 -0
  10. rf_harness/_assets/skills/rf-harness/references/explore.md +52 -0
  11. rf_harness/_assets/skills/rf-harness/references/requests.md +37 -0
  12. rf_harness/_assets/skills/rf-harness/references/results.md +34 -0
  13. rf_harness/_assets/skills/rf-harness/references/selenium.md +40 -0
  14. rf_harness/_assets/skills/rf-harness/references/waits.md +28 -0
  15. rf_harness/_assets/variants/codex/hooks.json +72 -0
  16. rf_harness/_assets/variants/copilot/hooks.json +53 -0
  17. rf_harness/_assets/variants/opencode/plugins/rf-harness.js +130 -0
  18. rf_harness/config.py +255 -0
  19. rf_harness/installer/__init__.py +1 -0
  20. rf_harness/installer/_assets.py +73 -0
  21. rf_harness/installer/adapters/__init__.py +37 -0
  22. rf_harness/installer/adapters/_base.py +189 -0
  23. rf_harness/installer/adapters/claude_code.py +88 -0
  24. rf_harness/installer/adapters/codex.py +108 -0
  25. rf_harness/installer/adapters/copilot_cli.py +89 -0
  26. rf_harness/installer/adapters/opencode.py +62 -0
  27. rf_harness/installer/adapters/vscode.py +56 -0
  28. rf_harness/installer/cli.py +490 -0
  29. rf_harness/installer/codex_trust.py +190 -0
  30. rf_harness/installer/coexist.py +211 -0
  31. rf_harness/installer/demo_site/index.html +28 -0
  32. rf_harness/installer/doctor.py +343 -0
  33. rf_harness/installer/envfind.py +354 -0
  34. rf_harness/installer/executor.py +288 -0
  35. rf_harness/installer/homes.py +102 -0
  36. rf_harness/installer/manifest.py +204 -0
  37. rf_harness/installer/prompt.py +58 -0
  38. rf_harness/installer/transforms.py +483 -0
  39. rf_harness/runtime/__init__.py +1 -0
  40. rf_harness/runtime/analyzer.py +132 -0
  41. rf_harness/runtime/data/failure_rules.json +77 -0
  42. rf_harness/runtime/data/kwnames_cache.json +1 -0
  43. rf_harness/runtime/data/repl_format_rules.json +455 -0
  44. rf_harness/runtime/data/robocop-agent.toml +58 -0
  45. rf_harness/runtime/desktop/__init__.py +87 -0
  46. rf_harness/runtime/desktop/_env.py +134 -0
  47. rf_harness/runtime/desktop/decision.py +616 -0
  48. rf_harness/runtime/desktop/focus.py +1094 -0
  49. rf_harness/runtime/desktop/guidance.py +91 -0
  50. rf_harness/runtime/desktop/launch_env.py +562 -0
  51. rf_harness/runtime/desktop/safety.py +509 -0
  52. rf_harness/runtime/desktop/signals.py +321 -0
  53. rf_harness/runtime/docs.py +190 -0
  54. rf_harness/runtime/docsgen.py +174 -0
  55. rf_harness/runtime/engine.py +1000 -0
  56. rf_harness/runtime/execd.py +1131 -0
  57. rf_harness/runtime/guards.py +294 -0
  58. rf_harness/runtime/hints.py +1523 -0
  59. rf_harness/runtime/hook.py +1897 -0
  60. rf_harness/runtime/hookcore.py +832 -0
  61. rf_harness/runtime/kwdoc.py +285 -0
  62. rf_harness/runtime/kwdocs.py +286 -0
  63. rf_harness/runtime/leanfmt.py +451 -0
  64. rf_harness/runtime/lintd.py +423 -0
  65. rf_harness/runtime/livetmo.py +385 -0
  66. rf_harness/runtime/pagestate.py +489 -0
  67. rf_harness/runtime/portable.py +191 -0
  68. rf_harness/runtime/procs.py +106 -0
  69. rf_harness/runtime/profiles.py +144 -0
  70. rf_harness/runtime/proto.py +120 -0
  71. rf_harness/runtime/pwlog.py +89 -0
  72. rf_harness/runtime/replfmt.py +556 -0
  73. rf_harness/runtime/rfh_repl_listener.py +244 -0
  74. rf_harness/runtime/richfmt.py +301 -0
  75. rf_harness/runtime/robotcode_adapter.py +157 -0
  76. rf_harness/runtime/rthooks.py +623 -0
  77. rf_harness/runtime/smoke.py +113 -0
  78. robotframework_harness-1.0.0.dist-info/METADATA +85 -0
  79. robotframework_harness-1.0.0.dist-info/RECORD +82 -0
  80. robotframework_harness-1.0.0.dist-info/WHEEL +4 -0
  81. robotframework_harness-1.0.0.dist-info/entry_points.txt +3 -0
  82. robotframework_harness-1.0.0.dist-info/licenses/LICENSE +201 -0
rf_harness/__init__.py ADDED
@@ -0,0 +1,3 @@
1
+ """robotframework-harness: an agent harness for Robot Framework (Agent Skill + hooks + local robotcode live session)."""
2
+
3
+ __version__ = "1.0.0"
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "rf-harness",
3
+ "version": "1.0.0",
4
+ "description": "Robot Framework agent harness: an Agent Skill plus hooks that execute your test lines live after every edit (robotcode-based local session), classify failures, capture page state and keyword docs, and require a green plain robot run before finishing.",
5
+ "author": { "name": "manykarim" },
6
+ "homepage": "https://github.com/manykarim/robotframework-harness",
7
+ "repository": "https://github.com/manykarim/robotframework-harness",
8
+ "license": "Apache-2.0",
9
+ "keywords": ["robotframework", "testing", "browser", "playwright", "robotcode", "hooks", "agent-harness"]
10
+ }
@@ -0,0 +1,60 @@
1
+ #!/usr/bin/env python3
2
+ """rf-harness hook launcher entry point; the logic lives in rfh_launch.py next to this file.
3
+
4
+ python3 -S <dir>/bin/rfh-launch <Event> --agent <agent|auto> (hook payload on stdin)
5
+
6
+ The compiled module is cached in the user cache dir (never next to this file, so install dirs stay exactly as the
7
+ installer recorded them); any problem falls back to a plain import, and any failure exits 0.
8
+ """
9
+ import os
10
+ import sys
11
+
12
+ sys.dont_write_bytecode = True
13
+
14
+
15
+ def _load(here):
16
+ import marshal
17
+
18
+ source = os.path.join(here, "rfh_launch.py")
19
+ home = os.path.expanduser("~")
20
+ if os.environ.get("RF_HARNESS_CACHE_DIR"):
21
+ cache = os.environ["RF_HARNESS_CACHE_DIR"]
22
+ elif os.name == "nt":
23
+ cache = os.path.join(os.environ.get("LOCALAPPDATA") or os.path.join(home, "AppData", "Local"), "rf-harness")
24
+ else:
25
+ cache = os.path.join(os.environ.get("XDG_CACHE_HOME") or os.path.join(home, ".cache"), "rf-harness")
26
+ st = os.stat(source)
27
+ cached = os.path.join(cache, "code", "rfh_launch-{}-{}-{}.marshal".format(
28
+ st.st_mtime_ns, st.st_size, sys.implementation.cache_tag))
29
+ try:
30
+ with open(cached, "rb") as fh:
31
+ code = marshal.loads(fh.read())
32
+ except (OSError, ValueError, EOFError, TypeError):
33
+ with open(source, "rb") as fh:
34
+ code = compile(fh.read(), source, "exec")
35
+ try:
36
+ os.makedirs(os.path.dirname(cached), exist_ok=True)
37
+ tmp = "{}.{}.tmp".format(cached, os.getpid())
38
+ with open(tmp, "wb") as fh:
39
+ fh.write(marshal.dumps(code))
40
+ os.replace(tmp, cached)
41
+ except OSError:
42
+ pass
43
+ module = type(sys)("rfh_launch")
44
+ module.__file__ = source
45
+ sys.modules["rfh_launch"] = module
46
+ exec(code, module.__dict__)
47
+ return module
48
+
49
+
50
+ try:
51
+ _here = os.path.dirname(os.path.abspath(__file__))
52
+ try:
53
+ rfh_launch = _load(_here)
54
+ except Exception:
55
+ sys.modules.pop("rfh_launch", None)
56
+ sys.path.insert(0, _here)
57
+ import rfh_launch
58
+ except BaseException:
59
+ os._exit(0)
60
+ rfh_launch.main()
@@ -0,0 +1,19 @@
1
+ @echo off
2
+ rem rf-harness hook launcher for Windows shells: runs bin\rfh-launch with the first Python it finds.
3
+ rem Usage: rfh-launch.cmd ^<Event^> --agent ^<agent^> (hook payload on stdin). Always exits 0 or 2.
4
+ setlocal
5
+ set "_RFHL=%~dp0rfh-launch"
6
+ where py >nul 2>nul
7
+ if not errorlevel 1 (
8
+ py -3 -S "%_RFHL%" %*
9
+ goto :done
10
+ )
11
+ where python >nul 2>nul
12
+ if not errorlevel 1 (
13
+ python -S "%_RFHL%" %*
14
+ goto :done
15
+ )
16
+ exit /b 0
17
+ :done
18
+ if "%ERRORLEVEL%"=="2" exit /b 2
19
+ exit /b 0