neuroncli 2.1.1__tar.gz → 2.2.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 (25) hide show
  1. {neuroncli-2.1.1 → neuroncli-2.2.0}/PKG-INFO +1 -1
  2. {neuroncli-2.1.1 → neuroncli-2.2.0}/neuroncli/auth.py +19 -4
  3. {neuroncli-2.1.1 → neuroncli-2.2.0}/neuroncli/config.py +1 -1
  4. {neuroncli-2.1.1 → neuroncli-2.2.0}/neuroncli.egg-info/PKG-INFO +1 -1
  5. {neuroncli-2.1.1 → neuroncli-2.2.0}/pyproject.toml +1 -1
  6. {neuroncli-2.1.1 → neuroncli-2.2.0}/README.md +0 -0
  7. {neuroncli-2.1.1 → neuroncli-2.2.0}/neuroncli/__init__.py +0 -0
  8. {neuroncli-2.1.1 → neuroncli-2.2.0}/neuroncli/__main__.py +0 -0
  9. {neuroncli-2.1.1 → neuroncli-2.2.0}/neuroncli/agent.py +0 -0
  10. {neuroncli-2.1.1 → neuroncli-2.2.0}/neuroncli/cli.py +0 -0
  11. {neuroncli-2.1.1 → neuroncli-2.2.0}/neuroncli/git_integration.py +0 -0
  12. {neuroncli-2.1.1 → neuroncli-2.2.0}/neuroncli/ollama_client.py +0 -0
  13. {neuroncli-2.1.1 → neuroncli-2.2.0}/neuroncli/openrouter_client.py +0 -0
  14. {neuroncli-2.1.1 → neuroncli-2.2.0}/neuroncli/prompts.py +0 -0
  15. {neuroncli-2.1.1 → neuroncli-2.2.0}/neuroncli/provider.py +0 -0
  16. {neuroncli-2.1.1 → neuroncli-2.2.0}/neuroncli/session.py +0 -0
  17. {neuroncli-2.1.1 → neuroncli-2.2.0}/neuroncli/tools.py +0 -0
  18. {neuroncli-2.1.1 → neuroncli-2.2.0}/neuroncli/ui.py +0 -0
  19. {neuroncli-2.1.1 → neuroncli-2.2.0}/neuroncli.egg-info/SOURCES.txt +0 -0
  20. {neuroncli-2.1.1 → neuroncli-2.2.0}/neuroncli.egg-info/dependency_links.txt +0 -0
  21. {neuroncli-2.1.1 → neuroncli-2.2.0}/neuroncli.egg-info/entry_points.txt +0 -0
  22. {neuroncli-2.1.1 → neuroncli-2.2.0}/neuroncli.egg-info/requires.txt +0 -0
  23. {neuroncli-2.1.1 → neuroncli-2.2.0}/neuroncli.egg-info/top_level.txt +0 -0
  24. {neuroncli-2.1.1 → neuroncli-2.2.0}/setup.cfg +0 -0
  25. {neuroncli-2.1.1 → neuroncli-2.2.0}/tests/test_agent.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: neuroncli
3
- Version: 2.1.1
3
+ Version: 2.2.0
4
4
  Summary: AI Coding Agent — Free Claude Code alternative powered by Kimi K2.5 + Ollama
5
5
  Author-email: Rahul S <rahultech72216@gmail.com>
6
6
  License: MIT
@@ -27,8 +27,10 @@ from pathlib import Path
27
27
 
28
28
  CONFIG_DIR = Path.home() / ".neuroncli"
29
29
  CONFIG_FILE = CONFIG_DIR / "config.json"
30
- CALLBACK_PORT = 19284 # Obscure port to avoid collisions
31
- CALLBACK_URL = f"http://localhost:{CALLBACK_PORT}"
30
+ CALLBACK_PORT = 19284 # Local server port to catch the redirect from zero-x.live
31
+ LOCAL_CALLBACK = f"http://localhost:{CALLBACK_PORT}"
32
+ # OpenRouter callback → zero-x.live → redirects to localhost with ?code=
33
+ CALLBACK_URL = "https://zero-x.live/neuroncli/callback"
32
34
 
33
35
 
34
36
  # ── PKCE helpers ──────────────────────────────────────────────────
@@ -78,10 +80,22 @@ def store_api_key(key: str) -> None:
78
80
  # ── OAuth PKCE flow ──────────────────────────────────────────────
79
81
 
80
82
  class _OAuthCallbackHandler(http.server.BaseHTTPRequestHandler):
81
- """Tiny HTTP handler that captures the OAuth redirect code."""
83
+ """Tiny HTTP handler that captures the OAuth redirect code.
84
+ Handles redirects from zero-x.live callback page."""
82
85
 
83
86
  auth_code: str | None = None
84
87
 
88
+ def _send_cors_headers(self):
89
+ """Allow cross-origin requests from zero-x.live."""
90
+ self.send_header("Access-Control-Allow-Origin", "*")
91
+ self.send_header("Access-Control-Allow-Methods", "GET, OPTIONS")
92
+
93
+ def do_OPTIONS(self):
94
+ """Handle CORS preflight."""
95
+ self.send_response(200)
96
+ self._send_cors_headers()
97
+ self.end_headers()
98
+
85
99
  def do_GET(self):
86
100
  parsed = urllib.parse.urlparse(self.path)
87
101
  params = urllib.parse.parse_qs(parsed.query)
@@ -93,6 +107,7 @@ class _OAuthCallbackHandler(http.server.BaseHTTPRequestHandler):
93
107
  # Show success page
94
108
  self.send_response(200)
95
109
  self.send_header("Content-Type", "text/html")
110
+ self._send_cors_headers()
96
111
  self.end_headers()
97
112
  self.wfile.write(b"""
98
113
  <html>
@@ -112,7 +127,7 @@ class _OAuthCallbackHandler(http.server.BaseHTTPRequestHandler):
112
127
  border-radius: 24px;
113
128
  backdrop-filter: blur(20px);
114
129
  }
115
- h1 { color: #00ff88; font-size: 2em; }
130
+ h1 { color: #f0a028; font-size: 2em; }
116
131
  p { color: #aaa; font-size: 1.1em; }
117
132
  </style>
118
133
  </head>
@@ -109,4 +109,4 @@ class AgentConfig:
109
109
  # ── App-wide constants ────────────────────────────────────────────
110
110
 
111
111
  APP_NAME = "NeuronCLI"
112
- VERSION = "2.1.1"
112
+ VERSION = "2.2.0"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: neuroncli
3
- Version: 2.1.1
3
+ Version: 2.2.0
4
4
  Summary: AI Coding Agent — Free Claude Code alternative powered by Kimi K2.5 + Ollama
5
5
  Author-email: Rahul S <rahultech72216@gmail.com>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "neuroncli"
7
- version = "2.1.1"
7
+ version = "2.2.0"
8
8
  description = "AI Coding Agent — Free Claude Code alternative powered by Kimi K2.5 + Ollama"
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes