onex-cli 1.18.0__tar.gz → 1.18.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 (102) hide show
  1. {onex_cli-1.18.0/onex_cli.egg-info → onex_cli-1.18.2}/PKG-INFO +1 -1
  2. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/__init__.py +1 -1
  3. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/__main__.py +1 -2
  4. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/commands/platform.py +90 -0
  5. {onex_cli-1.18.0 → onex_cli-1.18.2/onex_cli.egg-info}/PKG-INFO +1 -1
  6. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex_cli.egg-info/SOURCES.txt +0 -1
  7. onex_cli-1.18.0/onex/commands/auth.py +0 -103
  8. {onex_cli-1.18.0 → onex_cli-1.18.2}/CHANGELOG.md +0 -0
  9. {onex_cli-1.18.0 → onex_cli-1.18.2}/LICENSE +0 -0
  10. {onex_cli-1.18.0 → onex_cli-1.18.2}/MANIFEST.in +0 -0
  11. {onex_cli-1.18.0 → onex_cli-1.18.2}/README.md +0 -0
  12. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/commands/__init__.py +0 -0
  13. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/commands/create.py +0 -0
  14. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/commands/create_e2e.py +0 -0
  15. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/commands/debug.py +0 -0
  16. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/commands/deploy.py +0 -0
  17. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/commands/dev.py +0 -0
  18. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/commands/env.py +0 -0
  19. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/commands/es.py +0 -0
  20. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/commands/init.py +0 -0
  21. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/commands/invoke.py +0 -0
  22. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/commands/login.py +0 -0
  23. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/commands/logout.py +0 -0
  24. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/commands/logs.py +0 -0
  25. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/commands/mcp.py +0 -0
  26. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/commands/provision.py +0 -0
  27. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/commands/reload.py +0 -0
  28. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/commands/replay.py +0 -0
  29. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/commands/s3.py +0 -0
  30. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/commands/status.py +0 -0
  31. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/commands/switch.py +0 -0
  32. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/commands/test.py +0 -0
  33. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/commands/trace.py +0 -0
  34. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/commands/undeploy.py +0 -0
  35. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/commands/validate.py +0 -0
  36. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/commands/vpn.py +0 -0
  37. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/config.py +0 -0
  38. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/mcp/__init__.py +0 -0
  39. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/mcp/server.py +0 -0
  40. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/mcp/tools/__init__.py +0 -0
  41. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/mcp/tools/rocket_tools.py +0 -0
  42. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/runtime/__init__.py +0 -0
  43. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/runtime/local_runtime.py +0 -0
  44. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/schema/__init__.py +0 -0
  45. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/schema/service_descriptor.py +0 -0
  46. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/schema/validator.py +0 -0
  47. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/crud-service/README.md.j2 +0 -0
  48. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/crud-service/__init__.py.j2 +0 -0
  49. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/crud-service/service.yml.j2 +0 -0
  50. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/crud-service/src/__init__.py.j2 +0 -0
  51. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/crud-service/src/apis/__init__.py.j2 +0 -0
  52. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/crud-service/src/models/__init__.py.j2 +0 -0
  53. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/crud-service/src/models/schemas.py.j2 +0 -0
  54. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/crud-service/src/repositories/__init__.py.j2 +0 -0
  55. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/crud-service/src/services/__init__.py.j2 +0 -0
  56. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/e2e/data_service.yml.j2 +0 -0
  57. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/e2e/test_service_e2e.py.j2 +0 -0
  58. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/event-driven/README.md.j2 +0 -0
  59. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/event-driven/__init__.py.j2 +0 -0
  60. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/event-driven/service.yml.j2 +0 -0
  61. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/event-driven/src/__init__.py.j2 +0 -0
  62. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/event-driven/src/triggers/__init__.py.j2 +0 -0
  63. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/event-driven/src/triggers/events.py.j2 +0 -0
  64. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/event-driven/src/triggers/schedules.py.j2 +0 -0
  65. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/go-minimal/README.md.j2 +0 -0
  66. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/go-minimal/go.mod.j2 +0 -0
  67. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/go-minimal/main.go.j2 +0 -0
  68. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/go-minimal/service.yml.j2 +0 -0
  69. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/go-rest-api/README.md.j2 +0 -0
  70. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/go-rest-api/go.mod.j2 +0 -0
  71. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/go-rest-api/handlers/items.go.j2 +0 -0
  72. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/go-rest-api/main.go.j2 +0 -0
  73. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/go-rest-api/service.yml.j2 +0 -0
  74. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/minimal/README.md.j2 +0 -0
  75. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/minimal/__init__.py.j2 +0 -0
  76. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/minimal/service.yml.j2 +0 -0
  77. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/minimal/src/__init__.py.j2 +0 -0
  78. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/minimal/src/apis/__init__.py.j2 +0 -0
  79. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/minimal/src/apis/hello.py.j2 +0 -0
  80. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/rest-api/README.md.j2 +0 -0
  81. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/rest-api/__init__.py.j2 +0 -0
  82. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/rest-api/service.yml.j2 +0 -0
  83. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/rest-api/src/__init__.py.j2 +0 -0
  84. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/rest-api/src/apis/__init__.py.j2 +0 -0
  85. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/templates/rest-api/src/apis/handlers.py.j2 +0 -0
  86. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/utils/__init__.py +0 -0
  87. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/utils/auth.py +0 -0
  88. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/utils/crypto.py +0 -0
  89. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/utils/email.py +0 -0
  90. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/utils/helpers.py +0 -0
  91. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/vpn/__init__.py +0 -0
  92. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/vpn/platform_detector.py +0 -0
  93. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/vpn/setup_vpn.py +0 -0
  94. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex/vpn/wireguard_manager.py +0 -0
  95. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex_cli.egg-info/dependency_links.txt +0 -0
  96. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex_cli.egg-info/entry_points.txt +0 -0
  97. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex_cli.egg-info/requires.txt +0 -0
  98. {onex_cli-1.18.0 → onex_cli-1.18.2}/onex_cli.egg-info/top_level.txt +0 -0
  99. {onex_cli-1.18.0 → onex_cli-1.18.2}/setup.cfg +0 -0
  100. {onex_cli-1.18.0 → onex_cli-1.18.2}/setup.py +0 -0
  101. {onex_cli-1.18.0 → onex_cli-1.18.2}/tests/test_mcp_logs_e2e.py +0 -0
  102. {onex_cli-1.18.0 → onex_cli-1.18.2}/tests/test_rocket_mcp.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: onex-cli
3
- Version: 1.18.0
3
+ Version: 1.18.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.18.0"
2
+ __version__ = "1.18.2"
@@ -30,7 +30,7 @@ Environments:
30
30
  """
31
31
 
32
32
  import click
33
- from onex.commands import deploy, undeploy, dev, debug, init, logs, status, provision, invoke, trace, validate, login, logout, env, platform, vpn, switch, mcp, create, replay, es, s3, test, create_e2e, reload, auth
33
+ from onex.commands import deploy, undeploy, dev, debug, init, logs, status, provision, invoke, trace, validate, login, logout, env, platform, vpn, switch, mcp, create, replay, es, s3, test, create_e2e, reload
34
34
 
35
35
 
36
36
  # Commands that don't require authentication
@@ -105,7 +105,6 @@ cli.add_command(es.es)
105
105
  cli.add_command(s3.s3)
106
106
  cli.add_command(test.test)
107
107
  cli.add_command(create_e2e.create_e2e, name='create-e2e')
108
- cli.add_command(auth.auth)
109
108
 
110
109
 
111
110
  if __name__ == '__main__':
@@ -42,6 +42,96 @@ def platform():
42
42
  pass
43
43
 
44
44
 
45
+ @platform.command('restore')
46
+ @click.option('--env', default=None, help='Environment (local/dev/staging/prod, defaults to active)')
47
+ @click.option('--platform-url', help='Override platform URL')
48
+ def restore(env, platform_url):
49
+ """Restore all Redis registration state from deployment registry.
50
+
51
+ Rebuilds routes, custom auth keys, invoke handlers, and public routes
52
+ from the MongoDB deployment registry (single source of truth).
53
+
54
+ Use this when APIs return 401/404 after a server restart or Redis data loss.
55
+
56
+ Example:
57
+ onex platform restore
58
+ onex platform restore --env dev
59
+ """
60
+ import requests
61
+ from onex.config import get_config, get_access_token
62
+ from onex.utils.auth import auto_refresh_token
63
+
64
+ if env is None:
65
+ env = get_active_environment()
66
+
67
+ config = get_config()
68
+ platform_base_url = platform_url or config.get_platform_url(env)
69
+
70
+ access_token = get_access_token(env)
71
+ headers = {}
72
+ if access_token:
73
+ headers['Authorization'] = f'Bearer {access_token}'
74
+
75
+ restore_url = f"{platform_base_url}/_internal/restore-from-registry"
76
+
77
+ click.echo("📋 Restoring platform state from deployment registry...")
78
+ click.echo()
79
+
80
+ try:
81
+ response = requests.post(restore_url, headers=headers, timeout=60)
82
+
83
+ if response.status_code == 200:
84
+ data = response.json()
85
+
86
+ if data.get('success'):
87
+ source = data.get('source', 'unknown')
88
+ print_success(f"Platform state restored (source: {source})")
89
+ click.echo()
90
+ click.echo(f" Routes: {data.get('routes', 0)}")
91
+ click.echo(f" Custom auth: {data.get('custom_auth_keys', 0)}")
92
+ click.echo(f" Invoke handlers: {data.get('invoke_handlers', 0)}")
93
+ click.echo(f" Public routes: {data.get('public_routes', 0)}")
94
+ else:
95
+ print_error("Restoration reported failure")
96
+
97
+ elif response.status_code == 401 and env != "local":
98
+ print_warning("Token expired, refreshing...")
99
+ if auto_refresh_token(env, silent=False):
100
+ access_token = get_access_token(env)
101
+ headers['Authorization'] = f'Bearer {access_token}'
102
+ response = requests.post(restore_url, headers=headers, timeout=60)
103
+ if response.status_code == 200:
104
+ data = response.json()
105
+ if data.get('success'):
106
+ print_success("Platform state restored")
107
+ click.echo(f" Routes: {data.get('routes', 0)}, Auth: {data.get('custom_auth_keys', 0)}, Invokes: {data.get('invoke_handlers', 0)}")
108
+ return
109
+ print_error("Authentication failed")
110
+ print_info(f"Please login again: onex login --env {env}")
111
+
112
+ elif response.status_code == 500:
113
+ detail = ''
114
+ try:
115
+ detail = response.json().get('detail', response.text[:300])
116
+ except Exception:
117
+ detail = response.text[:300]
118
+ print_error(f"Restoration failed: {detail}")
119
+
120
+ else:
121
+ print_error(f"Unexpected response: HTTP {response.status_code}")
122
+ print_info(response.text[:200])
123
+
124
+ except requests.exceptions.ConnectionError:
125
+ print_error(f"Cannot connect to platform at {platform_base_url}")
126
+ print_info("Make sure platform is running")
127
+
128
+ except requests.exceptions.Timeout:
129
+ print_error("Request timed out (60s)")
130
+
131
+ except Exception as e:
132
+ print_error(f"Error: {e}")
133
+
134
+
45
135
  @platform.command('check')
46
136
  @click.option('--env', help='Environment to check (defaults to active)')
47
137
  def check_infrastructure(env):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: onex-cli
3
- Version: 1.18.0
3
+ Version: 1.18.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
@@ -7,7 +7,6 @@ onex/__init__.py
7
7
  onex/__main__.py
8
8
  onex/config.py
9
9
  onex/commands/__init__.py
10
- onex/commands/auth.py
11
10
  onex/commands/create.py
12
11
  onex/commands/create_e2e.py
13
12
  onex/commands/debug.py
@@ -1,103 +0,0 @@
1
- """
2
- Auth command - Manage platform authentication configuration
3
-
4
- Subcommands:
5
- - restore: Re-register custom_auth keys from deployed service.yml files
6
- """
7
-
8
- import click
9
- import requests
10
- from onex.config import get_config, get_access_token
11
- from onex.utils import print_success, print_error, print_info, print_warning
12
- from onex.utils.auth import auto_refresh_token
13
-
14
-
15
- @click.group()
16
- def auth():
17
- """Manage platform authentication configuration."""
18
- pass
19
-
20
-
21
- @auth.command()
22
- @click.option('--env', default=None, help='Environment (local/dev/staging/prod, defaults to active)')
23
- @click.option('--platform-url', help='Override platform URL')
24
- def restore(env, platform_url):
25
- """Restore custom_auth keys from deployed service.yml files.
26
-
27
- Re-registers all custom authenticator Redis keys by scanning the
28
- service.yml files on the shared runtime. Use this when API calls
29
- return 401 "Unauthorized" after a server restart or Redis data loss.
30
-
31
- Example:
32
- onex auth restore
33
- onex auth restore --env dev
34
- """
35
- from onex.config import get_active_environment
36
-
37
- if env is None:
38
- env = get_active_environment()
39
-
40
- config = get_config()
41
- platform_base_url = platform_url or config.get_platform_url(env)
42
-
43
- access_token = get_access_token(env)
44
- headers = {}
45
- if access_token:
46
- headers['Authorization'] = f'Bearer {access_token}'
47
-
48
- restore_url = f"{platform_base_url}/_internal/restore-custom-auth"
49
-
50
- click.echo("🔐 Restoring custom auth keys from service.yml files...")
51
- click.echo()
52
-
53
- try:
54
- response = requests.post(restore_url, headers=headers, timeout=30)
55
-
56
- if response.status_code == 200:
57
- data = response.json()
58
-
59
- if data.get('success'):
60
- print_success("Custom auth keys restored successfully")
61
- click.echo()
62
- click.echo(f" Auth path keys: {data.get('total_path_keys', 0)}")
63
- click.echo(f" Service configs: {data.get('total_service_keys', 0)}")
64
- else:
65
- print_error("Restoration reported failure")
66
- click.echo(f" {data.get('message', 'Unknown error')}")
67
-
68
- elif response.status_code == 401 and env != "local":
69
- print_warning("Token expired, refreshing...")
70
- if auto_refresh_token(env, silent=False):
71
- access_token = get_access_token(env)
72
- headers['Authorization'] = f'Bearer {access_token}'
73
- response = requests.post(restore_url, headers=headers, timeout=30)
74
- if response.status_code == 200:
75
- data = response.json()
76
- if data.get('success'):
77
- print_success("Custom auth keys restored successfully")
78
- click.echo(f" Auth path keys: {data.get('total_path_keys', 0)}")
79
- return
80
- print_error("Authentication failed")
81
- print_info(f"Please login again: onex login --env {env}")
82
-
83
- elif response.status_code == 500:
84
- detail = ''
85
- try:
86
- detail = response.json().get('detail', response.text[:300])
87
- except Exception:
88
- detail = response.text[:300]
89
- print_error(f"Restoration failed: {detail}")
90
-
91
- else:
92
- print_error(f"Unexpected response: HTTP {response.status_code}")
93
- print_info(response.text[:200])
94
-
95
- except requests.exceptions.ConnectionError:
96
- print_error(f"Cannot connect to platform at {platform_base_url}")
97
- print_info("Make sure platform is running")
98
-
99
- except requests.exceptions.Timeout:
100
- print_error("Request timed out (30s)")
101
-
102
- except Exception as e:
103
- print_error(f"Error: {e}")
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