superwise-sentinel-cli 0.2.1__tar.gz → 0.2.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 (28) hide show
  1. superwise_sentinel_cli-0.2.2/CHANGELOG.md +15 -0
  2. {superwise_sentinel_cli-0.2.1 → superwise_sentinel_cli-0.2.2}/PKG-INFO +1 -1
  3. superwise_sentinel_cli-0.2.2/build.env +1 -0
  4. {superwise_sentinel_cli-0.2.1 → superwise_sentinel_cli-0.2.2}/pyproject.toml +1 -1
  5. {superwise_sentinel_cli-0.2.1 → superwise_sentinel_cli-0.2.2}/src/superwise_sentinel_cli/cli.py +17 -0
  6. {superwise_sentinel_cli-0.2.1 → superwise_sentinel_cli-0.2.2}/src/superwise_sentinel_cli/controller.py +12 -0
  7. superwise_sentinel_cli-0.2.1/CHANGELOG.md +0 -6
  8. superwise_sentinel_cli-0.2.1/build.env +0 -1
  9. {superwise_sentinel_cli-0.2.1 → superwise_sentinel_cli-0.2.2}/.gitignore +0 -0
  10. {superwise_sentinel_cli-0.2.1 → superwise_sentinel_cli-0.2.2}/.gitlab-ci.yml +0 -0
  11. {superwise_sentinel_cli-0.2.1 → superwise_sentinel_cli-0.2.2}/.pre-commit-config.yaml +0 -0
  12. {superwise_sentinel_cli-0.2.1 → superwise_sentinel_cli-0.2.2}/.releaserc.json +0 -0
  13. {superwise_sentinel_cli-0.2.1 → superwise_sentinel_cli-0.2.2}/CLAUDE.md +0 -0
  14. {superwise_sentinel_cli-0.2.1 → superwise_sentinel_cli-0.2.2}/README.md +0 -0
  15. {superwise_sentinel_cli-0.2.1 → superwise_sentinel_cli-0.2.2}/poetry.lock +0 -0
  16. {superwise_sentinel_cli-0.2.1 → superwise_sentinel_cli-0.2.2}/poetry.toml +0 -0
  17. {superwise_sentinel_cli-0.2.1 → superwise_sentinel_cli-0.2.2}/scripts/semantic-release-cli-publish.sh +0 -0
  18. {superwise_sentinel_cli-0.2.1 → superwise_sentinel_cli-0.2.2}/src/superwise_sentinel_cli/__init__.py +0 -0
  19. {superwise_sentinel_cli-0.2.1 → superwise_sentinel_cli-0.2.2}/src/superwise_sentinel_cli/auth.py +0 -0
  20. {superwise_sentinel_cli-0.2.1 → superwise_sentinel_cli-0.2.2}/src/superwise_sentinel_cli/config.py +0 -0
  21. {superwise_sentinel_cli-0.2.1 → superwise_sentinel_cli-0.2.2}/src/superwise_sentinel_cli/docker_manager.py +0 -0
  22. {superwise_sentinel_cli-0.2.1 → superwise_sentinel_cli-0.2.2}/src/superwise_sentinel_cli/exceptions.py +0 -0
  23. {superwise_sentinel_cli-0.2.1 → superwise_sentinel_cli-0.2.2}/src/superwise_sentinel_cli/shell_profile.py +0 -0
  24. {superwise_sentinel_cli-0.2.1 → superwise_sentinel_cli-0.2.2}/tests/__init__.py +0 -0
  25. {superwise_sentinel_cli-0.2.1 → superwise_sentinel_cli-0.2.2}/tests/test_auth.py +0 -0
  26. {superwise_sentinel_cli-0.2.1 → superwise_sentinel_cli-0.2.2}/tests/test_controller.py +0 -0
  27. {superwise_sentinel_cli-0.2.1 → superwise_sentinel_cli-0.2.2}/tests/test_docker_manager.py +0 -0
  28. {superwise_sentinel_cli-0.2.1 → superwise_sentinel_cli-0.2.2}/tests/test_shell_profile.py +0 -0
@@ -0,0 +1,15 @@
1
+ ## [0.2.1](https://gitlab.com/askboss/product/superwise/platform/sentinel-cli/compare/0.2.0...0.2.1) (2026-07-26)
2
+
3
+
4
+ ### <!-- 2. -->:bug: Bug Fixes
5
+
6
+ * add non interactive config commands ([6dfef27](https://gitlab.com/askboss/product/superwise/platform/sentinel-cli/commit/6dfef27f0574595597294ec7b486b4148bd93eec))
7
+ * add update image option ([27f7695](https://gitlab.com/askboss/product/superwise/platform/sentinel-cli/commit/27f7695a22cda9e80ff924a94e8cb2d70d6f91e5))
8
+ * fix openai proxy routing ([58a0e56](https://gitlab.com/askboss/product/superwise/platform/sentinel-cli/commit/58a0e56713a3e6a343fd74b8c9035b0f5eb91582))
9
+
10
+ ## [0.1.4](https://gitlab.com/askboss/product/superwise/platform/sentinel-cli/compare/0.1.3...0.1.4) (2026-07-01)
11
+
12
+
13
+ ### <!-- 2. -->:bug: Bug Fixes
14
+
15
+ * update provider config ([b9d249a](https://gitlab.com/askboss/product/superwise/platform/sentinel-cli/commit/b9d249a28302f8fdd295fcd07d86da2ca989777e))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: superwise-sentinel-cli
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Sentinel is an LLM proxy that intercepts traffic, enabling you to monitor, secure, and optimize your AI usage. This CLI tool helps you quickly set up traffic interception on this machine
5
5
  Requires-Python: <4.0,>=3.11
6
6
  Requires-Dist: click>=8.1
@@ -0,0 +1 @@
1
+ RELEASED_VERSION=0.2.2
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "superwise-sentinel-cli"
7
- version = "0.2.1"
7
+ version = "0.2.2"
8
8
  description = "Sentinel is an LLM proxy that intercepts traffic, enabling you to monitor, secure, and optimize your AI usage. This CLI tool helps you quickly set up traffic interception on this machine"
9
9
  requires-python = ">=3.11, <4.0"
10
10
  dependencies = [
@@ -15,6 +15,7 @@ from superwise_sentinel_cli.config import VALID_PROVIDERS
15
15
  from superwise_sentinel_cli.controller import check_invalid_providers
16
16
  from superwise_sentinel_cli.controller import clear_env_vars
17
17
  from superwise_sentinel_cli.controller import get_activation_url
18
+ from superwise_sentinel_cli.controller import get_proxy_status
18
19
  from superwise_sentinel_cli.controller import get_running_gateway
19
20
  from superwise_sentinel_cli.controller import get_sentinel_url
20
21
  from superwise_sentinel_cli.controller import needs_auth
@@ -357,6 +358,22 @@ def stop_proxy() -> None:
357
358
  click.echo(f"Proxy off: {', '.join(removed)}", err=True)
358
359
 
359
360
 
361
+ @proxy.command("status")
362
+ def proxy_status() -> None:
363
+ """Show whether traffic interception is currently active."""
364
+ providers, stale = get_proxy_status()
365
+ if not providers:
366
+ click.echo("Proxy is off.")
367
+ return
368
+
369
+ click.echo(f"Proxy is on, covering: {', '.join(providers)}")
370
+
371
+ if stale:
372
+ click.echo(
373
+ "\nThis shell session was opened before the proxy was enabled. Open a new terminal to apply the change."
374
+ )
375
+
376
+
360
377
  _DEFAULT_TEST_TEXT = "Hello! My email is john.doe@example.com and my phone is 555-867-5309."
361
378
 
362
379
 
@@ -1,6 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  import json
4
+ import os
4
5
 
5
6
  import requests
6
7
  from superwise_sentinel_cli.auth import authenticate
@@ -12,6 +13,7 @@ from superwise_sentinel_cli.docker_manager import get_running_gateway_info
12
13
  from superwise_sentinel_cli.docker_manager import pull_latest_image
13
14
  from superwise_sentinel_cli.docker_manager import stop_container
14
15
  from superwise_sentinel_cli.exceptions import AuthenticationError
16
+ from superwise_sentinel_cli.shell_profile import read_env_vars
15
17
  from superwise_sentinel_cli.shell_profile import remove_env_vars
16
18
  from superwise_sentinel_cli.shell_profile import write_env_vars
17
19
 
@@ -129,6 +131,16 @@ def update_env_vars(cfg: AppConfig) -> list[tuple[str, str]]:
129
131
  return pairs
130
132
 
131
133
 
134
+ _ENV_VAR_TO_PROVIDER = {env_var: provider for provider, (env_var, _) in _PROVIDER_CONFIG.items()}
135
+
136
+
137
+ def get_proxy_status() -> tuple[list[str], bool]:
138
+ pairs = read_env_vars()
139
+ providers = [_ENV_VAR_TO_PROVIDER.get(var, var) for var, _ in pairs]
140
+ stale = any(os.environ.get(var) != url for var, url in pairs)
141
+ return providers, stale
142
+
143
+
132
144
  def get_sentinel_url(cfg: AppConfig) -> str:
133
145
  return f"{get_app_url(cfg)}/sentinels/{cfg.sentinel_id}"
134
146
 
@@ -1,6 +0,0 @@
1
- ## [0.1.4](https://gitlab.com/askboss/product/superwise/platform/sentinel-cli/compare/0.1.3...0.1.4) (2026-07-01)
2
-
3
-
4
- ### <!-- 2. -->:bug: Bug Fixes
5
-
6
- * update provider config ([b9d249a](https://gitlab.com/askboss/product/superwise/platform/sentinel-cli/commit/b9d249a28302f8fdd295fcd07d86da2ca989777e))
@@ -1 +0,0 @@
1
- RELEASED_VERSION=0.2.1