onex-cli 1.16.0__tar.gz → 1.16.2__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 (100) hide show
  1. {onex_cli-1.16.0/onex_cli.egg-info → onex_cli-1.16.2}/PKG-INFO +1 -1
  2. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/__init__.py +1 -1
  3. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/mcp/tools/rocket_tools.py +98 -18
  4. {onex_cli-1.16.0 → onex_cli-1.16.2/onex_cli.egg-info}/PKG-INFO +1 -1
  5. {onex_cli-1.16.0 → onex_cli-1.16.2}/CHANGELOG.md +0 -0
  6. {onex_cli-1.16.0 → onex_cli-1.16.2}/LICENSE +0 -0
  7. {onex_cli-1.16.0 → onex_cli-1.16.2}/MANIFEST.in +0 -0
  8. {onex_cli-1.16.0 → onex_cli-1.16.2}/README.md +0 -0
  9. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/__main__.py +0 -0
  10. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/commands/__init__.py +0 -0
  11. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/commands/create.py +0 -0
  12. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/commands/create_e2e.py +0 -0
  13. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/commands/debug.py +0 -0
  14. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/commands/deploy.py +0 -0
  15. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/commands/dev.py +0 -0
  16. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/commands/env.py +0 -0
  17. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/commands/es.py +0 -0
  18. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/commands/init.py +0 -0
  19. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/commands/invoke.py +0 -0
  20. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/commands/login.py +0 -0
  21. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/commands/logout.py +0 -0
  22. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/commands/logs.py +0 -0
  23. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/commands/mcp.py +0 -0
  24. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/commands/platform.py +0 -0
  25. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/commands/provision.py +0 -0
  26. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/commands/reload.py +0 -0
  27. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/commands/replay.py +0 -0
  28. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/commands/s3.py +0 -0
  29. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/commands/status.py +0 -0
  30. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/commands/switch.py +0 -0
  31. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/commands/test.py +0 -0
  32. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/commands/trace.py +0 -0
  33. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/commands/undeploy.py +0 -0
  34. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/commands/validate.py +0 -0
  35. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/commands/vpn.py +0 -0
  36. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/config.py +0 -0
  37. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/mcp/__init__.py +0 -0
  38. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/mcp/server.py +0 -0
  39. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/mcp/tools/__init__.py +0 -0
  40. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/runtime/__init__.py +0 -0
  41. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/runtime/local_runtime.py +0 -0
  42. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/schema/__init__.py +0 -0
  43. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/schema/service_descriptor.py +0 -0
  44. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/schema/validator.py +0 -0
  45. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/crud-service/README.md.j2 +0 -0
  46. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/crud-service/__init__.py.j2 +0 -0
  47. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/crud-service/service.yml.j2 +0 -0
  48. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/crud-service/src/__init__.py.j2 +0 -0
  49. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/crud-service/src/apis/__init__.py.j2 +0 -0
  50. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/crud-service/src/models/__init__.py.j2 +0 -0
  51. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/crud-service/src/models/schemas.py.j2 +0 -0
  52. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/crud-service/src/repositories/__init__.py.j2 +0 -0
  53. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/crud-service/src/services/__init__.py.j2 +0 -0
  54. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/e2e/data_service.yml.j2 +0 -0
  55. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/e2e/test_service_e2e.py.j2 +0 -0
  56. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/event-driven/README.md.j2 +0 -0
  57. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/event-driven/__init__.py.j2 +0 -0
  58. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/event-driven/service.yml.j2 +0 -0
  59. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/event-driven/src/__init__.py.j2 +0 -0
  60. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/event-driven/src/triggers/__init__.py.j2 +0 -0
  61. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/event-driven/src/triggers/events.py.j2 +0 -0
  62. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/event-driven/src/triggers/schedules.py.j2 +0 -0
  63. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/go-minimal/README.md.j2 +0 -0
  64. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/go-minimal/go.mod.j2 +0 -0
  65. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/go-minimal/main.go.j2 +0 -0
  66. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/go-minimal/service.yml.j2 +0 -0
  67. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/go-rest-api/README.md.j2 +0 -0
  68. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/go-rest-api/go.mod.j2 +0 -0
  69. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/go-rest-api/handlers/items.go.j2 +0 -0
  70. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/go-rest-api/main.go.j2 +0 -0
  71. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/go-rest-api/service.yml.j2 +0 -0
  72. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/minimal/README.md.j2 +0 -0
  73. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/minimal/__init__.py.j2 +0 -0
  74. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/minimal/service.yml.j2 +0 -0
  75. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/minimal/src/__init__.py.j2 +0 -0
  76. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/minimal/src/apis/__init__.py.j2 +0 -0
  77. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/minimal/src/apis/hello.py.j2 +0 -0
  78. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/rest-api/README.md.j2 +0 -0
  79. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/rest-api/__init__.py.j2 +0 -0
  80. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/rest-api/service.yml.j2 +0 -0
  81. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/rest-api/src/__init__.py.j2 +0 -0
  82. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/rest-api/src/apis/__init__.py.j2 +0 -0
  83. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/templates/rest-api/src/apis/handlers.py.j2 +0 -0
  84. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/utils/__init__.py +0 -0
  85. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/utils/auth.py +0 -0
  86. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/utils/crypto.py +0 -0
  87. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/utils/email.py +0 -0
  88. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/utils/helpers.py +0 -0
  89. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/vpn/__init__.py +0 -0
  90. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/vpn/platform_detector.py +0 -0
  91. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/vpn/setup_vpn.py +0 -0
  92. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex/vpn/wireguard_manager.py +0 -0
  93. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex_cli.egg-info/SOURCES.txt +0 -0
  94. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex_cli.egg-info/dependency_links.txt +0 -0
  95. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex_cli.egg-info/entry_points.txt +0 -0
  96. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex_cli.egg-info/requires.txt +0 -0
  97. {onex_cli-1.16.0 → onex_cli-1.16.2}/onex_cli.egg-info/top_level.txt +0 -0
  98. {onex_cli-1.16.0 → onex_cli-1.16.2}/setup.cfg +0 -0
  99. {onex_cli-1.16.0 → onex_cli-1.16.2}/setup.py +0 -0
  100. {onex_cli-1.16.0 → onex_cli-1.16.2}/tests/test_mcp_logs_e2e.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: onex-cli
3
- Version: 1.16.0
3
+ Version: 1.16.2
4
4
  Summary: Official CLI for deploying and managing services on OneXEOS Platform (Windows, macOS, Linux)
5
5
  Home-page: https://github.com/onexeos/onex-cli
6
6
  Author: OneXEOS Platform Team
@@ -1,2 +1,2 @@
1
1
  # OneXEOS Services CLI
2
- __version__ = "1.16.0"
2
+ __version__ = "1.16.2"
@@ -130,17 +130,51 @@ def _detect_git_repo() -> Optional[dict]:
130
130
 
131
131
  def register_rocket_tools(mcp, api_url: Optional[str] = None):
132
132
  """Register all onex-rocket tools on an existing FastMCP server."""
133
-
134
133
  base_url = _resolve_rocket_url(api_url)
135
- client = httpx.Client(base_url=base_url, timeout=30.0)
134
+ client = httpx.Client(base_url=base_url, timeout=10.0)
136
135
  _indexed_repos: set = set() # track repos already indexed this session
136
+ _indexing_in_progress: set = set() # repos currently being indexed
137
+
138
+ def _check_index_status() -> Optional[dict]:
139
+ """Check server-side indexing status for repos in progress.
140
+ Returns status dict if indexing, None if all done."""
141
+ if not _indexing_in_progress:
142
+ return None
143
+ try:
144
+ resp = client.get("/api/v1/index/status", timeout=3)
145
+ if resp.status_code == 200:
146
+ statuses = resp.json()
147
+ active = {}
148
+ for name, status in statuses.items():
149
+ if name in _indexing_in_progress:
150
+ if status.get("status") == "done":
151
+ _indexed_repos.add(name)
152
+ _indexing_in_progress.discard(name)
153
+ elif status.get("status") == "error":
154
+ _indexing_in_progress.discard(name)
155
+ else:
156
+ active[name] = status
157
+ if active:
158
+ return active
159
+ except Exception:
160
+ pass
161
+ return None
137
162
 
138
163
  def _get(path: str, params: dict = None) -> str:
139
- """Make GET request to rocket API, return JSON string."""
164
+ """Make GET request to rocket API, return JSON string.
165
+ If result is empty and indexing is in progress, returns status info."""
140
166
  try:
141
167
  resp = client.get(f"/api/v1/{path}", params=params or {})
142
168
  resp.raise_for_status()
143
- return resp.text
169
+ result = resp.text
170
+ if result in ("null", "[]", "{}"):
171
+ active = _check_index_status()
172
+ if active:
173
+ return json.dumps({
174
+ "_indexing": active,
175
+ "_note": "Repo is being indexed. Results will be available when indexing completes. Check status with rocket_index_status tool or retry shortly."
176
+ })
177
+ return result
144
178
  except httpx.HTTPError as e:
145
179
  return f'{{"error": "{str(e)}"}}'
146
180
 
@@ -160,38 +194,54 @@ def register_rocket_tools(mcp, api_url: Optional[str] = None):
160
194
  main/dev/preview -> "repo-name" (shared graph, auto-reindexed)
161
195
  feature/hotfix -> "repo-name@branch" (on-demand, indexed once)
162
196
 
163
- Only checks once per graph_name per session.
197
+ Only checks once per graph_name per session. Non-blocking:
198
+ triggers async index on the server and returns immediately.
164
199
  """
165
200
  repo_info = _detect_git_repo()
166
201
  if not repo_info:
167
202
  return
168
203
 
169
204
  graph_name = repo_info["graph_name"]
170
- if graph_name in _indexed_repos:
205
+ if graph_name in _indexed_repos or graph_name in _indexing_in_progress:
171
206
  return
172
207
 
173
- # Check if already in graph
208
+ # Check index/status first (lightweight, doesn't hit the graph)
209
+ try:
210
+ resp = client.get(f"/api/v1/index/status/{graph_name}", timeout=3)
211
+ if resp.status_code == 200:
212
+ status = resp.json()
213
+ if status.get("status") == "done":
214
+ _indexed_repos.add(graph_name)
215
+ return
216
+ if status.get("status") == "indexing":
217
+ _indexing_in_progress.add(graph_name)
218
+ return
219
+ except Exception:
220
+ pass
221
+
222
+ # Not tracked — check graph stats as fallback
174
223
  try:
175
- resp = client.get("/api/v1/stats", timeout=5)
224
+ resp = client.get("/api/v1/stats", timeout=3)
176
225
  if resp.status_code == 200:
177
- stats = resp.json()
178
- by_repo = stats.get("by_repo", {})
226
+ by_repo = resp.json().get("by_repo", {})
179
227
  if graph_name in by_repo:
180
228
  _indexed_repos.add(graph_name)
181
229
  return
182
230
  except Exception:
183
231
  return
184
232
 
185
- # Not in graph — trigger index
233
+ # Not in graph — trigger async index (returns immediately)
186
234
  try:
187
- client.post("/api/v1/index", json={
235
+ resp = client.post("/api/v1/index", json={
188
236
  "url": repo_info["url"],
189
237
  "name": graph_name,
190
238
  "branch": repo_info["branch"],
191
- }, timeout=120)
192
- _indexed_repos.add(graph_name)
239
+ "async": True,
240
+ }, timeout=5)
241
+ if resp.status_code == 200:
242
+ _indexing_in_progress.add(graph_name)
193
243
  except Exception:
194
- pass # best-effort, don't block the tool call
244
+ pass
195
245
 
196
246
  def _get_current_graph_name() -> Optional[str]:
197
247
  """Get the graph name for the current repo+branch.
@@ -354,8 +404,7 @@ def register_rocket_tools(mcp, api_url: Optional[str] = None):
354
404
  @mcp.tool()
355
405
  def rocket_stats() -> str:
356
406
  """Get graph statistics: total nodes/edges, breakdown by kind and repo.
357
- NOTE: The graph indexes the MAIN branch only. Results do not reflect feature branches or uncommitted changes.
358
- Auto-indexes the current repo if not already in the graph."""
407
+ Auto-indexes the current repo if not already in the graph (non-blocking)."""
359
408
  _ensure_repo_indexed()
360
409
  return _get("stats")
361
410
 
@@ -370,7 +419,29 @@ def register_rocket_tools(mcp, api_url: Optional[str] = None):
370
419
 
371
420
  @mcp.tool()
372
421
  def rocket_index(path: str = "", url: str = "", name: str = "", branch: str = "main") -> str:
373
- """Index a repository into the code graph. Use path for local repos, url for git repos."""
422
+ """Index a repository into the code graph. Use path for local repos, url for git repos.
423
+ If indexing is already in progress for this repo, returns the current status instead of starting a new one."""
424
+ # Check if already indexing
425
+ check_name = name
426
+ if not check_name and url:
427
+ check_name = url.rstrip('/').rsplit('/', 1)[-1]
428
+ if check_name.endswith('.git'):
429
+ check_name = check_name[:-4]
430
+ if check_name:
431
+ try:
432
+ resp = client.get(f"/api/v1/index/status/{check_name}", timeout=3)
433
+ if resp.status_code == 200:
434
+ status = resp.json()
435
+ if status.get("status") == "indexing":
436
+ return json.dumps({
437
+ "status": "already_indexing",
438
+ "repo": check_name,
439
+ "started_at": status.get("started_at"),
440
+ "message": f"Indexing already in progress for '{check_name}'. Use rocket_index_status to check progress."
441
+ })
442
+ except Exception:
443
+ pass
444
+
374
445
  data = {"branch": branch}
375
446
  if path:
376
447
  data["path"] = path
@@ -379,3 +450,12 @@ def register_rocket_tools(mcp, api_url: Optional[str] = None):
379
450
  if name:
380
451
  data["name"] = name
381
452
  return _post("index", data)
453
+
454
+ @mcp.tool()
455
+ def rocket_index_status(repo: str = "") -> str:
456
+ """Check indexing status for a repo or all repos.
457
+ Returns: status (indexing/done/error), duration, symbols/edges count.
458
+ If repo is omitted, returns status for all repos."""
459
+ if repo:
460
+ return _get(f"index/status/{repo}")
461
+ return _get("index/status")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: onex-cli
3
- Version: 1.16.0
3
+ Version: 1.16.2
4
4
  Summary: Official CLI for deploying and managing services on OneXEOS Platform (Windows, macOS, Linux)
5
5
  Home-page: https://github.com/onexeos/onex-cli
6
6
  Author: OneXEOS Platform Team
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes