onex-cli 1.16.2__tar.gz → 1.16.3__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.
- {onex_cli-1.16.2/onex_cli.egg-info → onex_cli-1.16.3}/PKG-INFO +1 -1
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/__init__.py +1 -1
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/mcp/tools/rocket_tools.py +86 -12
- {onex_cli-1.16.2 → onex_cli-1.16.3/onex_cli.egg-info}/PKG-INFO +1 -1
- {onex_cli-1.16.2 → onex_cli-1.16.3}/CHANGELOG.md +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/LICENSE +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/MANIFEST.in +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/README.md +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/__main__.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/commands/__init__.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/commands/create.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/commands/create_e2e.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/commands/debug.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/commands/deploy.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/commands/dev.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/commands/env.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/commands/es.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/commands/init.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/commands/invoke.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/commands/login.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/commands/logout.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/commands/logs.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/commands/mcp.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/commands/platform.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/commands/provision.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/commands/reload.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/commands/replay.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/commands/s3.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/commands/status.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/commands/switch.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/commands/test.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/commands/trace.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/commands/undeploy.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/commands/validate.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/commands/vpn.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/config.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/mcp/__init__.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/mcp/server.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/mcp/tools/__init__.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/runtime/__init__.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/runtime/local_runtime.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/schema/__init__.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/schema/service_descriptor.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/schema/validator.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/crud-service/README.md.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/crud-service/__init__.py.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/crud-service/service.yml.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/crud-service/src/__init__.py.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/crud-service/src/apis/__init__.py.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/crud-service/src/models/__init__.py.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/crud-service/src/models/schemas.py.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/crud-service/src/repositories/__init__.py.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/crud-service/src/services/__init__.py.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/e2e/data_service.yml.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/e2e/test_service_e2e.py.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/event-driven/README.md.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/event-driven/__init__.py.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/event-driven/service.yml.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/event-driven/src/__init__.py.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/event-driven/src/triggers/__init__.py.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/event-driven/src/triggers/events.py.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/event-driven/src/triggers/schedules.py.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/go-minimal/README.md.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/go-minimal/go.mod.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/go-minimal/main.go.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/go-minimal/service.yml.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/go-rest-api/README.md.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/go-rest-api/go.mod.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/go-rest-api/handlers/items.go.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/go-rest-api/main.go.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/go-rest-api/service.yml.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/minimal/README.md.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/minimal/__init__.py.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/minimal/service.yml.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/minimal/src/__init__.py.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/minimal/src/apis/__init__.py.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/minimal/src/apis/hello.py.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/rest-api/README.md.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/rest-api/__init__.py.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/rest-api/service.yml.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/rest-api/src/__init__.py.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/rest-api/src/apis/__init__.py.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/rest-api/src/apis/handlers.py.j2 +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/utils/__init__.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/utils/auth.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/utils/crypto.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/utils/email.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/utils/helpers.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/vpn/__init__.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/vpn/platform_detector.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/vpn/setup_vpn.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex/vpn/wireguard_manager.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex_cli.egg-info/SOURCES.txt +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex_cli.egg-info/dependency_links.txt +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex_cli.egg-info/entry_points.txt +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex_cli.egg-info/requires.txt +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/onex_cli.egg-info/top_level.txt +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/setup.cfg +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/setup.py +0 -0
- {onex_cli-1.16.2 → onex_cli-1.16.3}/tests/test_mcp_logs_e2e.py +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
# OneXEOS Services CLI
|
|
2
|
-
__version__ = "1.16.
|
|
2
|
+
__version__ = "1.16.3"
|
|
@@ -254,6 +254,75 @@ def register_rocket_tools(mcp, api_url: Optional[str] = None):
|
|
|
254
254
|
return None
|
|
255
255
|
return repo_info["graph_name"]
|
|
256
256
|
|
|
257
|
+
# GitHub org used to construct clone URLs for auto-indexing
|
|
258
|
+
GITHUB_ORG = "OneXApis"
|
|
259
|
+
|
|
260
|
+
# Map of known repo folder names to GitHub repo names
|
|
261
|
+
KNOWN_REPOS = {
|
|
262
|
+
"onexerp-platform": "onex-platform",
|
|
263
|
+
"onexerp-services": "onex-services",
|
|
264
|
+
"onexeos-graph": "onex-rocket",
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
def _ensure_repo_by_name(repo_name: str):
|
|
268
|
+
"""Auto-index a repo by name if not already in the graph.
|
|
269
|
+
|
|
270
|
+
Constructs the GitHub URL from the known org and triggers
|
|
271
|
+
async indexing on the server. Non-blocking.
|
|
272
|
+
"""
|
|
273
|
+
if not repo_name or repo_name in _indexed_repos or repo_name in _indexing_in_progress:
|
|
274
|
+
return
|
|
275
|
+
|
|
276
|
+
# Check if already in graph via index/status
|
|
277
|
+
try:
|
|
278
|
+
resp = client.get(f"/api/v1/index/status/{repo_name}", timeout=3)
|
|
279
|
+
if resp.status_code == 200:
|
|
280
|
+
status = resp.json()
|
|
281
|
+
if status.get("status") == "done":
|
|
282
|
+
_indexed_repos.add(repo_name)
|
|
283
|
+
return
|
|
284
|
+
if status.get("status") == "indexing":
|
|
285
|
+
_indexing_in_progress.add(repo_name)
|
|
286
|
+
return
|
|
287
|
+
except Exception:
|
|
288
|
+
pass
|
|
289
|
+
|
|
290
|
+
# Check graph stats as fallback
|
|
291
|
+
try:
|
|
292
|
+
resp = client.get("/api/v1/stats", timeout=3)
|
|
293
|
+
if resp.status_code == 200:
|
|
294
|
+
by_repo = resp.json().get("by_repo", {})
|
|
295
|
+
if repo_name in by_repo:
|
|
296
|
+
_indexed_repos.add(repo_name)
|
|
297
|
+
return
|
|
298
|
+
except Exception:
|
|
299
|
+
return
|
|
300
|
+
|
|
301
|
+
# Not in graph — construct URL and trigger async index
|
|
302
|
+
# Extract branch from name: "repo@branch" -> branch, "repo" -> "main"
|
|
303
|
+
if "@" in repo_name:
|
|
304
|
+
base_name = repo_name.split("@")[0]
|
|
305
|
+
branch = repo_name.split("@")[1]
|
|
306
|
+
else:
|
|
307
|
+
base_name = repo_name
|
|
308
|
+
branch = "main"
|
|
309
|
+
|
|
310
|
+
# Resolve GitHub repo name
|
|
311
|
+
github_name = KNOWN_REPOS.get(base_name, base_name)
|
|
312
|
+
url = f"https://github.com/{GITHUB_ORG}/{github_name}.git"
|
|
313
|
+
|
|
314
|
+
try:
|
|
315
|
+
resp = client.post("/api/v1/index", json={
|
|
316
|
+
"url": url,
|
|
317
|
+
"name": repo_name,
|
|
318
|
+
"branch": branch,
|
|
319
|
+
"async": True,
|
|
320
|
+
}, timeout=5)
|
|
321
|
+
if resp.status_code == 200:
|
|
322
|
+
_indexing_in_progress.add(repo_name)
|
|
323
|
+
except Exception:
|
|
324
|
+
pass
|
|
325
|
+
|
|
257
326
|
# ================================================================
|
|
258
327
|
# IMPORTANT: Graph context for AI agents
|
|
259
328
|
# The code graph indexes the MAIN branch only. Results do not reflect
|
|
@@ -294,36 +363,40 @@ def register_rocket_tools(mcp, api_url: Optional[str] = None):
|
|
|
294
363
|
def rocket_find_dead_code(repo: str = "") -> str:
|
|
295
364
|
"""Find functions/methods never called anywhere in the codebase.
|
|
296
365
|
BEST FOR: "what code can I safely delete?". Grep can't do this — only a graph can determine zero callers.
|
|
297
|
-
If repo is omitted, auto-detects from current git repo and branch.
|
|
298
|
-
|
|
366
|
+
If repo is omitted, auto-detects from current git repo and branch.
|
|
367
|
+
Auto-indexes the repo if not already in the graph."""
|
|
299
368
|
repo = repo or _get_current_graph_name() or "unknown"
|
|
369
|
+
_ensure_repo_by_name(repo)
|
|
300
370
|
return _get(f"repo/{repo}/dead-code")
|
|
301
371
|
|
|
302
372
|
@mcp.tool()
|
|
303
373
|
def rocket_find_hotspots(repo: str = "", limit: int = 20) -> str:
|
|
304
374
|
"""Find the most depended-on symbols, ranked by caller count.
|
|
305
375
|
BEST FOR: "what are the riskiest parts?", "what should we test most?".
|
|
306
|
-
If repo is omitted, auto-detects from current git repo and branch.
|
|
307
|
-
|
|
376
|
+
If repo is omitted, auto-detects from current git repo and branch.
|
|
377
|
+
Auto-indexes the repo if not already in the graph."""
|
|
308
378
|
repo = repo or _get_current_graph_name() or "unknown"
|
|
379
|
+
_ensure_repo_by_name(repo)
|
|
309
380
|
return _get(f"repo/{repo}/hotspots", {"limit": limit})
|
|
310
381
|
|
|
311
382
|
@mcp.tool()
|
|
312
383
|
def rocket_find_cycles(repo: str = "") -> str:
|
|
313
384
|
"""Find circular dependencies in the codebase.
|
|
314
385
|
BEST FOR: "are there any import cycles?", architectural analysis.
|
|
315
|
-
If repo is omitted, auto-detects from current git repo and branch.
|
|
316
|
-
|
|
386
|
+
If repo is omitted, auto-detects from current git repo and branch.
|
|
387
|
+
Auto-indexes the repo if not already in the graph."""
|
|
317
388
|
repo = repo or _get_current_graph_name() or "unknown"
|
|
389
|
+
_ensure_repo_by_name(repo)
|
|
318
390
|
return _get(f"repo/{repo}/cycles")
|
|
319
391
|
|
|
320
392
|
@mcp.tool()
|
|
321
393
|
def rocket_get_repo_map(repo: str = "") -> str:
|
|
322
394
|
"""Get a bird's-eye view of the entire repo: all files with their key symbols.
|
|
323
395
|
BEST FOR: understanding project structure, onboarding. Much faster than reading files one by one.
|
|
324
|
-
If repo is omitted, auto-detects from current git repo and branch.
|
|
325
|
-
|
|
396
|
+
If repo is omitted, auto-detects from current git repo and branch.
|
|
397
|
+
Auto-indexes the repo if not already in the graph."""
|
|
326
398
|
repo = repo or _get_current_graph_name() or "unknown"
|
|
399
|
+
_ensure_repo_by_name(repo)
|
|
327
400
|
return _get(f"repo/{repo}/map")
|
|
328
401
|
|
|
329
402
|
@mcp.tool()
|
|
@@ -396,16 +469,17 @@ def register_rocket_tools(mcp, api_url: Optional[str] = None):
|
|
|
396
469
|
@mcp.tool()
|
|
397
470
|
def rocket_get_file_churn(repo: str = "", limit: int = 20) -> str:
|
|
398
471
|
"""Get files ranked by change frequency. BEST FOR: identifying unstable/buggy code.
|
|
399
|
-
If repo is omitted, auto-detects from current git repo and branch.
|
|
400
|
-
|
|
472
|
+
If repo is omitted, auto-detects from current git repo and branch.
|
|
473
|
+
Auto-indexes the repo if not already in the graph."""
|
|
401
474
|
repo = repo or _get_current_graph_name() or "unknown"
|
|
475
|
+
_ensure_repo_by_name(repo)
|
|
402
476
|
return _get(f"repo/{repo}/churn", {"limit": limit})
|
|
403
477
|
|
|
404
478
|
@mcp.tool()
|
|
405
479
|
def rocket_stats() -> str:
|
|
406
480
|
"""Get graph statistics: total nodes/edges, breakdown by kind and repo.
|
|
407
|
-
Auto-indexes the current repo if not already in the graph (non-blocking)."""
|
|
408
|
-
_ensure_repo_indexed()
|
|
481
|
+
Auto-indexes the current git repo if not already in the graph (non-blocking)."""
|
|
482
|
+
_ensure_repo_indexed() # index cwd repo if possible
|
|
409
483
|
return _get("stats")
|
|
410
484
|
|
|
411
485
|
@mcp.tool()
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/crud-service/src/repositories/__init__.py.j2
RENAMED
|
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
|
{onex_cli-1.16.2 → onex_cli-1.16.3}/onex/templates/event-driven/src/triggers/schedules.py.j2
RENAMED
|
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
|
|
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
|
|
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
|