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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: obvyr-cli
3
- Version: 2.8.0
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.12+
41
+ Python 3.14+ (running through `uvx obvyr-cli` fetches it automatically)
42
42
 
43
43
  ## Licence
44
44
 
@@ -16,7 +16,7 @@ Command-line wrapper to run Obvyr agents locally or in CI.
16
16
 
17
17
  ## Python Support
18
18
 
19
- Python 3.12+
19
+ Python 3.14+ (running through `uvx obvyr-cli` fetches it automatically)
20
20
 
21
21
  ## Licence
22
22
 
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
4
4
 
5
5
  [tool.poetry]
6
6
  name = "obvyr-cli"
7
- version = "2.8.0"
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 = fetch_active_profile(settings, profile)
444
- check_token_expiry(active_profile)
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 dry_run:
458
- show_dry_run_payload(active_profile, response)
459
- elif active_profile.API_URL and active_profile.API_KEY:
460
- send_to_api(active_profile, response)
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