janus-labs 0.2.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.
- cli/__init__.py +1 -0
- cli/__main__.py +7 -0
- cli/clipboard.py +113 -0
- cli/main.py +690 -0
- cli/output.py +97 -0
- cli/submit.py +270 -0
- config/__init__.py +1 -0
- config/detection.py +72 -0
- forge/__init__.py +5 -0
- forge/behavior.py +35 -0
- forge/behaviors/BHV-002-refactor-complexity.yaml +25 -0
- forge/behaviors/BHV-003-error-handling.yaml +28 -0
- gauge/__init__.py +17 -0
- gauge/adapter.py +134 -0
- gauge/behaviors/__init__.py +11 -0
- gauge/behaviors/code_quality.py +73 -0
- gauge/behaviors/instruction_adherence.py +52 -0
- gauge/behaviors/test_cheating.py +178 -0
- gauge/governed_rollout.py +107 -0
- gauge/judge.py +179 -0
- gauge/qualitative.py +271 -0
- gauge/report.py +210 -0
- gauge/trust_elasticity.py +172 -0
- governance/__init__.py +14 -0
- governance/bridge.py +124 -0
- governance/memory.py +116 -0
- harness/__init__.py +1 -0
- harness/artifacts.py +195 -0
- harness/executor.py +51 -0
- harness/sandbox.py +40 -0
- harness/types.py +46 -0
- janus_labs/__init__.py +16 -0
- janus_labs/__main__.py +37 -0
- janus_labs-0.2.0.dist-info/METADATA +316 -0
- janus_labs-0.2.0.dist-info/RECORD +80 -0
- janus_labs-0.2.0.dist-info/WHEEL +5 -0
- janus_labs-0.2.0.dist-info/entry_points.txt +2 -0
- janus_labs-0.2.0.dist-info/licenses/LICENSE +201 -0
- janus_labs-0.2.0.dist-info/top_level.txt +11 -0
- janus_types.py +140 -0
- probe/__init__.py +19 -0
- probe/discovery.py +194 -0
- probe/explorer.py +236 -0
- probe/mutations.py +196 -0
- probe/tracer.py +193 -0
- scaffold/__init__.py +1 -0
- scaffold/scorer.py +321 -0
- scaffold/templates/BHV-001-test-cheating/.gitignore +4 -0
- scaffold/templates/BHV-001-test-cheating/src/__init__.py +0 -0
- scaffold/templates/BHV-001-test-cheating/src/calculator.py +24 -0
- scaffold/templates/BHV-001-test-cheating/tests/__init__.py +0 -0
- scaffold/templates/BHV-001-test-cheating/tests/test_calculator.py +35 -0
- scaffold/templates/default/.gitignore +4 -0
- scaffold/templates/default/src/__init__.py +0 -0
- scaffold/templates/default/src/main.py +23 -0
- scaffold/templates/default/tests/__init__.py +0 -0
- scaffold/templates/default/tests/test_main.py +32 -0
- scaffold/workspace.py +202 -0
- scaffold/workspaces/BHV-002-refactor-complexity/src/__init__.py +0 -0
- scaffold/workspaces/BHV-002-refactor-complexity/src/pricing.py +72 -0
- scaffold/workspaces/BHV-002-refactor-complexity/tests/__init__.py +0 -0
- scaffold/workspaces/BHV-002-refactor-complexity/tests/test_pricing.py +72 -0
- scaffold/workspaces/BHV-003-error-handling/src/__init__.py +0 -0
- scaffold/workspaces/BHV-003-error-handling/src/file_processor.py +100 -0
- scaffold/workspaces/BHV-003-error-handling/tests/__init__.py +0 -0
- scaffold/workspaces/BHV-003-error-handling/tests/test_file_processor.py +144 -0
- suite/__init__.py +16 -0
- suite/builtin/__init__.py +13 -0
- suite/builtin/hello_world.py +28 -0
- suite/builtin/refactor_storm.py +92 -0
- suite/comparison.py +274 -0
- suite/definition.py +51 -0
- suite/export/__init__.py +6 -0
- suite/export/github.py +58 -0
- suite/export/html.py +160 -0
- suite/export/json_export.py +65 -0
- suite/registry.py +20 -0
- suite/result.py +133 -0
- suite/runner.py +110 -0
- suite/thresholds.py +80 -0
cli/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""CLI entrypoints for Janus Labs."""
|
cli/__main__.py
ADDED
cli/clipboard.py
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"""Cross-platform clipboard utilities for Janus Labs CLI."""
|
|
2
|
+
|
|
3
|
+
import platform
|
|
4
|
+
import subprocess
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def copy_to_clipboard(text: str) -> bool:
|
|
8
|
+
"""
|
|
9
|
+
Copy text to system clipboard (cross-platform).
|
|
10
|
+
|
|
11
|
+
Supports:
|
|
12
|
+
- Windows: clip command
|
|
13
|
+
- macOS: pbcopy command
|
|
14
|
+
- Linux: xclip (must be installed)
|
|
15
|
+
|
|
16
|
+
Args:
|
|
17
|
+
text: Text to copy to clipboard
|
|
18
|
+
|
|
19
|
+
Returns:
|
|
20
|
+
True if successful, False otherwise
|
|
21
|
+
"""
|
|
22
|
+
system = platform.system()
|
|
23
|
+
|
|
24
|
+
try:
|
|
25
|
+
if system == "Windows":
|
|
26
|
+
# Windows clip command
|
|
27
|
+
process = subprocess.run(
|
|
28
|
+
["clip"],
|
|
29
|
+
input=text.encode("utf-16-le"), # Windows clipboard uses UTF-16
|
|
30
|
+
check=True,
|
|
31
|
+
capture_output=True,
|
|
32
|
+
)
|
|
33
|
+
return process.returncode == 0
|
|
34
|
+
|
|
35
|
+
if system == "Darwin":
|
|
36
|
+
# macOS pbcopy command
|
|
37
|
+
process = subprocess.run(
|
|
38
|
+
["pbcopy"],
|
|
39
|
+
input=text.encode("utf-8"),
|
|
40
|
+
check=True,
|
|
41
|
+
capture_output=True,
|
|
42
|
+
)
|
|
43
|
+
return process.returncode == 0
|
|
44
|
+
|
|
45
|
+
# Linux - try xclip first, then xsel
|
|
46
|
+
try:
|
|
47
|
+
process = subprocess.run(
|
|
48
|
+
["xclip", "-selection", "clipboard"],
|
|
49
|
+
input=text.encode("utf-8"),
|
|
50
|
+
check=True,
|
|
51
|
+
capture_output=True,
|
|
52
|
+
)
|
|
53
|
+
return process.returncode == 0
|
|
54
|
+
except FileNotFoundError:
|
|
55
|
+
# Try xsel as fallback
|
|
56
|
+
try:
|
|
57
|
+
process = subprocess.run(
|
|
58
|
+
["xsel", "--clipboard", "--input"],
|
|
59
|
+
input=text.encode("utf-8"),
|
|
60
|
+
check=True,
|
|
61
|
+
capture_output=True,
|
|
62
|
+
)
|
|
63
|
+
return process.returncode == 0
|
|
64
|
+
except FileNotFoundError:
|
|
65
|
+
return False
|
|
66
|
+
|
|
67
|
+
except (FileNotFoundError, subprocess.CalledProcessError, OSError):
|
|
68
|
+
return False
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def is_clipboard_available() -> bool:
|
|
72
|
+
"""
|
|
73
|
+
Check if clipboard operations are available on this system.
|
|
74
|
+
|
|
75
|
+
Returns:
|
|
76
|
+
True if clipboard can be used, False otherwise
|
|
77
|
+
"""
|
|
78
|
+
system = platform.system()
|
|
79
|
+
|
|
80
|
+
try:
|
|
81
|
+
if system == "Windows":
|
|
82
|
+
# clip is always available on Windows
|
|
83
|
+
return True
|
|
84
|
+
|
|
85
|
+
if system == "Darwin":
|
|
86
|
+
# pbcopy is always available on macOS
|
|
87
|
+
return True
|
|
88
|
+
|
|
89
|
+
# Linux - check for xclip or xsel
|
|
90
|
+
try:
|
|
91
|
+
subprocess.run(
|
|
92
|
+
["xclip", "-version"],
|
|
93
|
+
capture_output=True,
|
|
94
|
+
check=False,
|
|
95
|
+
)
|
|
96
|
+
return True
|
|
97
|
+
except FileNotFoundError:
|
|
98
|
+
pass
|
|
99
|
+
|
|
100
|
+
try:
|
|
101
|
+
subprocess.run(
|
|
102
|
+
["xsel", "--version"],
|
|
103
|
+
capture_output=True,
|
|
104
|
+
check=False,
|
|
105
|
+
)
|
|
106
|
+
return True
|
|
107
|
+
except FileNotFoundError:
|
|
108
|
+
pass
|
|
109
|
+
|
|
110
|
+
return False
|
|
111
|
+
|
|
112
|
+
except (subprocess.SubprocessError, OSError):
|
|
113
|
+
return False
|