buildai-cli 0.3.76__tar.gz → 0.3.77__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 (37) hide show
  1. {buildai_cli-0.3.76 → buildai_cli-0.3.77}/PKG-INFO +1 -1
  2. buildai_cli-0.3.77/cli/commands/egoexo.py +85 -0
  3. {buildai_cli-0.3.76 → buildai_cli-0.3.77}/cli/main.py +2 -0
  4. {buildai_cli-0.3.76 → buildai_cli-0.3.77}/pyproject.toml +1 -1
  5. {buildai_cli-0.3.76 → buildai_cli-0.3.77}/.gitignore +0 -0
  6. {buildai_cli-0.3.76 → buildai_cli-0.3.77}/AGENTS.md +0 -0
  7. {buildai_cli-0.3.76 → buildai_cli-0.3.77}/CLAUDE.md +0 -0
  8. {buildai_cli-0.3.76 → buildai_cli-0.3.77}/buildai_bootstrap.py +0 -0
  9. {buildai_cli-0.3.76 → buildai_cli-0.3.77}/cli/__init__.py +0 -0
  10. {buildai_cli-0.3.76 → buildai_cli-0.3.77}/cli/_has_core.py +0 -0
  11. {buildai_cli-0.3.76 → buildai_cli-0.3.77}/cli/auth_local.py +0 -0
  12. {buildai_cli-0.3.76 → buildai_cli-0.3.77}/cli/commands/__init__.py +0 -0
  13. {buildai_cli-0.3.76 → buildai_cli-0.3.77}/cli/commands/api_proxy.py +0 -0
  14. {buildai_cli-0.3.76 → buildai_cli-0.3.77}/cli/commands/auth.py +0 -0
  15. {buildai_cli-0.3.76 → buildai_cli-0.3.77}/cli/commands/db/__init__.py +0 -0
  16. {buildai_cli-0.3.76 → buildai_cli-0.3.77}/cli/commands/db/broker.py +0 -0
  17. {buildai_cli-0.3.76 → buildai_cli-0.3.77}/cli/commands/db/common.py +0 -0
  18. {buildai_cli-0.3.76 → buildai_cli-0.3.77}/cli/commands/db/migrate.py +0 -0
  19. {buildai_cli-0.3.76 → buildai_cli-0.3.77}/cli/commands/db/query.py +0 -0
  20. {buildai_cli-0.3.76 → buildai_cli-0.3.77}/cli/commands/db/schema.py +0 -0
  21. {buildai_cli-0.3.76 → buildai_cli-0.3.77}/cli/commands/db/status.py +0 -0
  22. {buildai_cli-0.3.76 → buildai_cli-0.3.77}/cli/commands/db/tunnel.py +0 -0
  23. {buildai_cli-0.3.76 → buildai_cli-0.3.77}/cli/commands/dev.py +0 -0
  24. {buildai_cli-0.3.76 → buildai_cli-0.3.77}/cli/commands/doctor.py +0 -0
  25. {buildai_cli-0.3.76 → buildai_cli-0.3.77}/cli/commands/gigcamera.py +0 -0
  26. {buildai_cli-0.3.76 → buildai_cli-0.3.77}/cli/commands/processing.py +0 -0
  27. {buildai_cli-0.3.76 → buildai_cli-0.3.77}/cli/config.py +0 -0
  28. {buildai_cli-0.3.76 → buildai_cli-0.3.77}/cli/console.py +0 -0
  29. {buildai_cli-0.3.76 → buildai_cli-0.3.77}/cli/context.py +0 -0
  30. {buildai_cli-0.3.76 → buildai_cli-0.3.77}/cli/db_broker.py +0 -0
  31. {buildai_cli-0.3.76 → buildai_cli-0.3.77}/cli/guard.py +0 -0
  32. {buildai_cli-0.3.76 → buildai_cli-0.3.77}/cli/internal_api.py +0 -0
  33. {buildai_cli-0.3.76 → buildai_cli-0.3.77}/cli/nl_query/__init__.py +0 -0
  34. {buildai_cli-0.3.76 → buildai_cli-0.3.77}/cli/nl_query/dataset_tools.py +0 -0
  35. {buildai_cli-0.3.76 → buildai_cli-0.3.77}/cli/ops_init.py +0 -0
  36. {buildai_cli-0.3.76 → buildai_cli-0.3.77}/cli/output.py +0 -0
  37. {buildai_cli-0.3.76 → buildai_cli-0.3.77}/cli/pagination.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: buildai-cli
3
- Version: 0.3.76
3
+ Version: 0.3.77
4
4
  Summary: Build AI CLI (Typer)
5
5
  Requires-Python: >=3.11
6
6
  Requires-Dist: httpx>=0.27.0
@@ -0,0 +1,85 @@
1
+ """Operator commands for EgoExo verdict-plane reads."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import json
6
+ import sys
7
+ from typing import Any
8
+
9
+ import httpx
10
+ import typer
11
+
12
+ from cli.commands.api_proxy import _build_url
13
+ from cli.config import resolve_api_url, resolve_credential
14
+ from cli.console import error
15
+
16
+ app = typer.Typer(help="Inspect EgoExo verdict-plane outcomes.", no_args_is_help=True)
17
+
18
+
19
+ def _request(path: str, *, query_params: list[str] | None = None) -> None:
20
+ """Call the Build AI API with stored CLI credentials and print JSON."""
21
+ try:
22
+ token = resolve_credential()
23
+ except RuntimeError as exc:
24
+ error(str(exc))
25
+ raise typer.Exit(1) from exc
26
+
27
+ url = _build_url(resolve_api_url(), path, query_params)
28
+ headers = {
29
+ "Authorization": f"Bearer {token}",
30
+ "Accept": "application/json",
31
+ }
32
+
33
+ try:
34
+ with httpx.Client(timeout=60.0) as client:
35
+ response = client.get(url, headers=headers)
36
+ except httpx.ConnectError:
37
+ error("Could not connect to the Build AI API. Check your network or BUILDAI_API_URL.")
38
+ raise typer.Exit(1)
39
+ except httpx.TimeoutException:
40
+ error("Request timed out. Try again with a narrower EgoExo identifier.")
41
+ raise typer.Exit(1)
42
+
43
+ try:
44
+ payload: Any = response.json()
45
+ except ValueError:
46
+ payload = {"status_code": response.status_code, "text": response.text}
47
+ sys.stdout.write(json.dumps(payload, indent=2, default=str) + "\n")
48
+ if response.status_code >= 400:
49
+ raise typer.Exit(1)
50
+
51
+
52
+ @app.command("recording-disposition")
53
+ def recording_disposition(
54
+ recording_id: str = typer.Argument(..., help="media.recordings id."),
55
+ ) -> None:
56
+ """Show why a recording did or did not land in an EgoExo episode."""
57
+ _request(f"/v1/dashboard/egoexo/recordings/{recording_id}/disposition")
58
+
59
+
60
+ @app.command("overview")
61
+ def overview() -> None:
62
+ """Show verdict-plane row counts and current coverage gaps."""
63
+ _request("/v1/dashboard/egoexo/verdict/overview")
64
+
65
+
66
+ @app.command("recording-history")
67
+ def recording_history(
68
+ recording_id: str = typer.Argument(..., help="media.recordings id."),
69
+ ) -> None:
70
+ """Show disposition plus recording-grain verdict outcomes for one recording."""
71
+ _request(f"/v1/dashboard/egoexo/recordings/{recording_id}/history")
72
+
73
+
74
+ @app.command("failure-chain")
75
+ def failure_chain(
76
+ outcome_id: str = typer.Argument(..., help="EgoExo outcome row id."),
77
+ table_name: str = typer.Option(
78
+ ...,
79
+ "--table",
80
+ help="Outcome table name for the root id.",
81
+ ),
82
+ ) -> None:
83
+ """Trace upstream caused-by verdict links for one outcome row."""
84
+ query_params = [f"table_name={table_name}"]
85
+ _request(f"/v1/dashboard/egoexo/verdict/failure-chain/{outcome_id}", query_params=query_params)
@@ -18,6 +18,7 @@ from cli.commands.api_proxy import api
18
18
  from cli.commands.auth import app as auth_app
19
19
  from cli.commands.dev import app as dev_app
20
20
  from cli.commands.doctor import app as doctor_app
21
+ from cli.commands.egoexo import app as egoexo_app
21
22
  from cli.commands.processing import app as processing_app
22
23
  from cli.console import error, info, set_verbose, success, warning
23
24
 
@@ -270,6 +271,7 @@ app.command("api")(api)
270
271
  app.add_typer(auth_app, name="auth")
271
272
  app.add_typer(dev_app, name="dev")
272
273
  app.add_typer(doctor_app, name="doctor")
274
+ app.add_typer(egoexo_app, name="egoexo")
273
275
  app.add_typer(processing_app, name="processing")
274
276
 
275
277
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "buildai-cli"
7
- version = "0.3.76"
7
+ version = "0.3.77"
8
8
  description = "Build AI CLI (Typer)"
9
9
  requires-python = ">=3.11"
10
10
  dependencies = [
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes