obvyr-cli 2.8.0__tar.gz → 2.9.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.
- {obvyr_cli-2.8.0 → obvyr_cli-2.9.0}/PKG-INFO +2 -2
- {obvyr_cli-2.8.0 → obvyr_cli-2.9.0}/README_PYPI.md +1 -1
- {obvyr_cli-2.8.0 → obvyr_cli-2.9.0}/pyproject.toml +1 -1
- {obvyr_cli-2.8.0 → obvyr_cli-2.9.0}/src/obvyr_cli/cli.py +32 -6
- {obvyr_cli-2.8.0 → obvyr_cli-2.9.0}/src/obvyr_cli/__init__.py +0 -0
- {obvyr_cli-2.8.0 → obvyr_cli-2.9.0}/src/obvyr_cli/api_client.py +0 -0
- {obvyr_cli-2.8.0 → obvyr_cli-2.9.0}/src/obvyr_cli/archive_builder.py +0 -0
- {obvyr_cli-2.8.0 → obvyr_cli-2.9.0}/src/obvyr_cli/command_wrapper.py +0 -0
- {obvyr_cli-2.8.0 → obvyr_cli-2.9.0}/src/obvyr_cli/config.py +0 -0
- {obvyr_cli-2.8.0 → obvyr_cli-2.9.0}/src/obvyr_cli/error_handling.py +0 -0
- {obvyr_cli-2.8.0 → obvyr_cli-2.9.0}/src/obvyr_cli/jwt_utils.py +0 -0
- {obvyr_cli-2.8.0 → obvyr_cli-2.9.0}/src/obvyr_cli/logging_config.py +0 -0
- {obvyr_cli-2.8.0 → obvyr_cli-2.9.0}/src/obvyr_cli/redaction.py +0 -0
- {obvyr_cli-2.8.0 → obvyr_cli-2.9.0}/src/obvyr_cli/schemas.py +0 -0
- {obvyr_cli-2.8.0 → obvyr_cli-2.9.0}/src/obvyr_cli/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: obvyr-cli
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.9.0
|
|
4
4
|
Summary: Command-line wrapper to allow Obvyr to capture evidence from any machine.
|
|
5
5
|
License: Proprietary
|
|
6
6
|
Author: Wyrd Technology Ltd
|
|
@@ -38,7 +38,7 @@ Command-line wrapper to run Obvyr agents locally or in CI.
|
|
|
38
38
|
|
|
39
39
|
## Python Support
|
|
40
40
|
|
|
41
|
-
Python 3.
|
|
41
|
+
Python 3.14+ (running through `uvx obvyr-cli` fetches it automatically)
|
|
42
42
|
|
|
43
43
|
## Licence
|
|
44
44
|
|
|
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
|
|
|
4
4
|
|
|
5
5
|
[tool.poetry]
|
|
6
6
|
name = "obvyr-cli"
|
|
7
|
-
version = "2.
|
|
7
|
+
version = "2.9.0"
|
|
8
8
|
description = "Command-line wrapper to allow Obvyr to capture evidence from any machine."
|
|
9
9
|
authors = ["Wyrd Technology Ltd"]
|
|
10
10
|
license = "Proprietary"
|
|
@@ -187,6 +187,29 @@ def fetch_active_profile(
|
|
|
187
187
|
return active_profile
|
|
188
188
|
|
|
189
189
|
|
|
190
|
+
def resolve_active_profile(
|
|
191
|
+
settings: Settings, profile_name: str | None = None
|
|
192
|
+
) -> ProfileSettings | None:
|
|
193
|
+
"""
|
|
194
|
+
Retrieve the active profile, or warn and return None when it is missing.
|
|
195
|
+
|
|
196
|
+
A missing profile must never stop the wrapped command from running, so the
|
|
197
|
+
caller carries on without reporting to Obvyr.
|
|
198
|
+
"""
|
|
199
|
+
try:
|
|
200
|
+
return fetch_active_profile(settings, profile_name)
|
|
201
|
+
except ValueError as e:
|
|
202
|
+
display_name = (profile_name or "DEFAULT").strip().upper()
|
|
203
|
+
log_customer_friendly_error(
|
|
204
|
+
str(e),
|
|
205
|
+
f"Profile '{display_name}' not found, so nothing is being "
|
|
206
|
+
"reported to Obvyr. Your command will run unchanged. Set "
|
|
207
|
+
f"OBVYR_PROFILES__{display_name}__API_KEY to enable reporting.",
|
|
208
|
+
level=logging.WARNING,
|
|
209
|
+
)
|
|
210
|
+
return None
|
|
211
|
+
|
|
212
|
+
|
|
190
213
|
def check_token_expiry(active_profile: ProfileSettings) -> None:
|
|
191
214
|
"""Warn when the active profile's API token is near or past expiry."""
|
|
192
215
|
expiry = get_jwt_expiry(active_profile.API_KEY)
|
|
@@ -440,8 +463,10 @@ def cli_run_process(
|
|
|
440
463
|
):
|
|
441
464
|
return
|
|
442
465
|
|
|
443
|
-
active_profile =
|
|
444
|
-
|
|
466
|
+
active_profile = resolve_active_profile(settings, profile)
|
|
467
|
+
|
|
468
|
+
if active_profile:
|
|
469
|
+
check_token_expiry(active_profile)
|
|
445
470
|
|
|
446
471
|
# Create streaming callback for real-time output display
|
|
447
472
|
def stream_output(line: str) -> None:
|
|
@@ -454,10 +479,11 @@ def cli_run_process(
|
|
|
454
479
|
config=execution_config,
|
|
455
480
|
)
|
|
456
481
|
|
|
457
|
-
if
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
482
|
+
if active_profile:
|
|
483
|
+
if dry_run:
|
|
484
|
+
show_dry_run_payload(active_profile, response)
|
|
485
|
+
elif active_profile.API_URL and active_profile.API_KEY:
|
|
486
|
+
send_to_api(active_profile, response)
|
|
461
487
|
|
|
462
488
|
display_execution_summary(response)
|
|
463
489
|
|
|
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
|