plexus-agent 0.7.2__tar.gz → 0.7.4__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.
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/PKG-INFO +1 -1
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/__init__.py +1 -1
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/cli.py +17 -51
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/pyproject.toml +1 -1
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/.github/workflows/ci.yml +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/.github/workflows/publish.yml +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/.gitignore +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/API.md +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/LICENSE +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/README.md +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/examples/can_basic.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/examples/demo_field_unit.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/examples/demo_ground_station.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/examples/gateway_ble_relay.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/examples/mavlink_basic.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/__main__.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/adapters/__init__.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/adapters/base.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/adapters/ble.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/adapters/can.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/adapters/can_detect.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/adapters/mavlink.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/adapters/mavlink_detect.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/adapters/modbus.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/adapters/mqtt.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/adapters/opcua.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/adapters/registry.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/adapters/serial_adapter.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/buffer.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/cameras/__init__.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/cameras/auto.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/cameras/base.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/cameras/picamera.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/cameras/usb.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/client.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/commands.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/config.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/connector.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/deps.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/detect.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/importers/__init__.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/importers/rosbag.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/sensors/__init__.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/sensors/ads1115.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/sensors/auto.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/sensors/base.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/sensors/bh1750.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/sensors/bme280.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/sensors/gps.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/sensors/ina219.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/sensors/magnetometer.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/sensors/mpu6050.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/sensors/sht3x.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/sensors/system.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/sensors/vl53l0x.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/streaming.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/tui.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/plexus/typed_commands.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/scripts/plexus.service +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/scripts/setup.sh +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/tests/test_basic.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/tests/test_buffer.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/tests/test_can_adapter.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/tests/test_config.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/tests/test_connector.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/tests/test_gps.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/tests/test_mavlink_adapter.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/tests/test_modbus_adapter.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/tests/test_mqtt_adapter.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/tests/test_retry.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/tests/test_sensor_hub.py +0 -0
- {plexus_agent-0.7.2 → plexus_agent-0.7.4}/tests/test_serial_adapter.py +0 -0
|
@@ -28,5 +28,5 @@ from plexus.client import Plexus
|
|
|
28
28
|
from plexus.config import load_config, save_config
|
|
29
29
|
from plexus.typed_commands import param, CommandRegistry
|
|
30
30
|
|
|
31
|
-
__version__ = "0.7.
|
|
31
|
+
__version__ = "0.7.4"
|
|
32
32
|
__all__ = ["Plexus", "param", "CommandRegistry", "load_config", "save_config"]
|
|
@@ -271,49 +271,17 @@ def _terminal_auth(endpoint: str) -> str:
|
|
|
271
271
|
except Exception as e:
|
|
272
272
|
spinner.stop(f"Connection failed: {e}", success_status=False)
|
|
273
273
|
sys.exit(1)
|
|
274
|
-
spinner.stop()
|
|
275
274
|
|
|
276
275
|
if resp.status_code == 409:
|
|
277
276
|
# Account already exists — fall through to sign-in
|
|
277
|
+
spinner.stop()
|
|
278
278
|
hint("Account exists, signing in instead...")
|
|
279
279
|
mode = "signin"
|
|
280
280
|
elif not resp.ok:
|
|
281
281
|
data = resp.json() if resp.headers.get("content-type", "").startswith("application/json") else {}
|
|
282
|
-
|
|
282
|
+
spinner.stop(data.get("message", data.get("error", "Sign-up failed")), success_status=False)
|
|
283
283
|
sys.exit(1)
|
|
284
284
|
else:
|
|
285
|
-
success("Account created")
|
|
286
|
-
data = resp.json()
|
|
287
|
-
|
|
288
|
-
# Prompt for verification code
|
|
289
|
-
click.echo()
|
|
290
|
-
code = click.prompt(
|
|
291
|
-
click.style(" Verification code", fg=Style.INFO)
|
|
292
|
-
+ click.style(" (check email)", fg=Style.DIM),
|
|
293
|
-
type=str,
|
|
294
|
-
).strip()
|
|
295
|
-
|
|
296
|
-
spinner = Spinner("Verifying...")
|
|
297
|
-
spinner.start()
|
|
298
|
-
try:
|
|
299
|
-
resp = requests.post(
|
|
300
|
-
f"{endpoint}/api/auth/cli/verify",
|
|
301
|
-
json={
|
|
302
|
-
"sign_up_id": data["sign_up_id"],
|
|
303
|
-
"client_token": data["client_token"],
|
|
304
|
-
"code": code,
|
|
305
|
-
},
|
|
306
|
-
timeout=30,
|
|
307
|
-
)
|
|
308
|
-
except Exception as e:
|
|
309
|
-
spinner.stop(f"Connection failed: {e}", success_status=False)
|
|
310
|
-
sys.exit(1)
|
|
311
|
-
|
|
312
|
-
if not resp.ok:
|
|
313
|
-
vdata = resp.json() if resp.headers.get("content-type", "").startswith("application/json") else {}
|
|
314
|
-
spinner.stop(vdata.get("message", vdata.get("error", "Verification failed")), success_status=False)
|
|
315
|
-
sys.exit(1)
|
|
316
|
-
|
|
317
285
|
result = resp.json()
|
|
318
286
|
spinner.stop("Welcome to Plexus!", success_status=True)
|
|
319
287
|
|
|
@@ -485,8 +453,6 @@ def _build_panels(source_id: str, sensors: list, cameras: list) -> list:
|
|
|
485
453
|
def _launch_auto_dashboard(api_key: str, endpoint: str, source_id: str, sensors: list, cameras: list):
|
|
486
454
|
"""Launch auto-dashboard creation in a background thread."""
|
|
487
455
|
panels = _build_panels(source_id, sensors, cameras)
|
|
488
|
-
if not panels:
|
|
489
|
-
return
|
|
490
456
|
|
|
491
457
|
def _create():
|
|
492
458
|
import requests
|
|
@@ -514,21 +480,21 @@ def _launch_auto_dashboard(api_key: str, endpoint: str, source_id: str, sensors:
|
|
|
514
480
|
if not dashboard_id:
|
|
515
481
|
return
|
|
516
482
|
|
|
517
|
-
# Update with panels
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
"
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
483
|
+
# Update with panels (if any were detected)
|
|
484
|
+
if panels:
|
|
485
|
+
resp = requests.put(
|
|
486
|
+
f"{endpoint}/api/dashboards/{dashboard_id}",
|
|
487
|
+
headers=headers,
|
|
488
|
+
json={
|
|
489
|
+
"config": {
|
|
490
|
+
"panels": panels,
|
|
491
|
+
"timeRange": {"type": "relative", "value": "5m"},
|
|
492
|
+
}
|
|
493
|
+
},
|
|
494
|
+
timeout=15,
|
|
495
|
+
)
|
|
496
|
+
if not resp.ok:
|
|
497
|
+
logger.debug("Dashboard update failed: %s", resp.text)
|
|
532
498
|
|
|
533
499
|
dashboard_url = f"{endpoint}/dashboards/{dashboard_id}"
|
|
534
500
|
click.echo()
|
|
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
|
|
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
|