buildai-cli 0.3.28__tar.gz → 0.3.30__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 (45) hide show
  1. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/.gitignore +7 -0
  2. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/PKG-INFO +1 -1
  3. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/jobs.py +16 -11
  4. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/medoid.py +13 -6
  5. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/query.py +3 -1
  6. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/pyproject.toml +1 -1
  7. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/AGENTS.md +0 -0
  8. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/CLAUDE.md +0 -0
  9. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/__init__.py +0 -0
  10. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/_has_core.py +0 -0
  11. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/__init__.py +0 -0
  12. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/api_proxy.py +0 -0
  13. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/assets_cli.py +0 -0
  14. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/auth_lite.py +0 -0
  15. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/clips.py +0 -0
  16. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/database.py +0 -0
  17. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/dev.py +0 -0
  18. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/embed.py +0 -0
  19. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/external.py +0 -0
  20. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/inference.py +0 -0
  21. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/keys.py +0 -0
  22. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/operations.py +0 -0
  23. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/partners.py +0 -0
  24. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/permissions.py +0 -0
  25. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/projection.py +0 -0
  26. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/query_api.py +0 -0
  27. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/reports.py +0 -0
  28. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/schema.py +0 -0
  29. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/search.py +0 -0
  30. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/stats.py +0 -0
  31. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/sync/ddl.py +0 -0
  32. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/sync/models.py +0 -0
  33. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/sync/queries.py +0 -0
  34. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/config.py +0 -0
  35. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/console.py +0 -0
  36. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/context.py +0 -0
  37. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/dev_context.py +0 -0
  38. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/guard.py +0 -0
  39. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/main.py +0 -0
  40. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/nl_query/__init__.py +0 -0
  41. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/nl_query/dataset_tools.py +0 -0
  42. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/ops_init.py +0 -0
  43. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/output.py +0 -0
  44. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/pagination.py +0 -0
  45. {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/sdk_client.py +0 -0
@@ -19,8 +19,10 @@ dist/
19
19
  build/
20
20
  .pytest_cache/
21
21
  .mypy_cache/
22
+ .ruff_cache/
22
23
  tmp/
23
24
  test-results/
25
+ .certificates/
24
26
 
25
27
  # Node
26
28
  node_modules/
@@ -50,10 +52,13 @@ Thumbs.db
50
52
  # Local tool state
51
53
  .entire/
52
54
  .codex/config.toml
55
+ .codex-bin/
53
56
  .mcp.json
54
57
  .hypothesis/
55
58
  .dmux/
56
59
  .ralph-status
60
+ buildai-workspace/
61
+ apps/buildai-sd-card-reader-android/
57
62
 
58
63
  # Generated artifacts
59
64
  outputs/
@@ -72,6 +77,8 @@ scripts/dead_assets.ids.txt
72
77
 
73
78
  # Large binaries
74
79
  *.npy
80
+ *.apk
81
+ .tmp-*.yml
75
82
 
76
83
  # TLS certs
77
84
  *.ts.net.crt
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: buildai-cli
3
- Version: 0.3.28
3
+ Version: 0.3.30
4
4
  Summary: Build AI CLI (Typer)
5
5
  Requires-Python: >=3.11
6
6
  Requires-Dist: buildai-data
@@ -126,7 +126,9 @@ def _watch_job(client: Any, job_id: str, *, interval: float) -> None:
126
126
  if failures.data:
127
127
  for failure in failures.data:
128
128
  warning(
129
- f"{failure.entity_id} | {failure.error_code or 'error'} | {failure.error_message or ''}"
129
+ f"{failure.entity_id} | "
130
+ f"{failure.error_code or 'error'} | "
131
+ f"{failure.error_message or ''}"
130
132
  )
131
133
  return
132
134
  time.sleep(interval)
@@ -192,7 +194,8 @@ def jobs_submit(
192
194
  memory=memory,
193
195
  )
194
196
  success(
195
- f"Submitted {job_id} on {result.platform} as {result.batch_job_name} with {result.task_count} tasks"
197
+ f"Submitted {job_id} on {result.platform} "
198
+ f"as {result.batch_job_name} with {result.task_count} tasks"
196
199
  )
197
200
  if watch:
198
201
  _watch_job(client, job_id, interval=interval)
@@ -210,23 +213,23 @@ def jobs_watch(
210
213
 
211
214
  @app.command("backlog")
212
215
  def jobs_backlog(
213
- job_type: str = typer.Argument(..., help="extract-iframes"),
216
+ job_type: str = typer.Argument(..., help="extract-frames"),
214
217
  factory: str | None = typer.Option(None, "--factory"),
215
218
  collection: str | None = typer.Option(None, "--collection", "-c"),
216
219
  format: Format | None = format_option(),
217
220
  ) -> None:
218
221
  """Inspect extractor backlog."""
219
222
  client = get_sdk_client()
220
- if job_type == "extract-iframes":
221
- backlog = client.jobs.extract_iframes_backlog(factory_id=factory, collection_id=collection)
223
+ if job_type == "extract-frames":
224
+ backlog = client.jobs.extract_frames_backlog(factory_id=factory, collection_id=collection)
222
225
  else:
223
226
  error(f"Unknown backlog type: {job_type}")
224
227
  raise typer.Exit(1)
225
228
  output(backlog, format=format)
226
229
 
227
230
 
228
- @app.command("extract-iframes")
229
- def jobs_extract_iframes(
231
+ @app.command("extract-frames")
232
+ def jobs_extract_frames(
230
233
  ctx: typer.Context,
231
234
  factory: str | None = typer.Option(None, "--factory"),
232
235
  collection: str | None = typer.Option(None, "--collection", "-c"),
@@ -261,13 +264,14 @@ def jobs_extract_iframes(
261
264
  """Queue canonical frame extraction, optionally launch immediately."""
262
265
  del ctx # API enforces permissions via token scope
263
266
  client = get_sdk_client()
264
- backlog = client.jobs.extract_iframes_backlog(factory_id=factory, collection_id=collection)
267
+ backlog = client.jobs.extract_frames_backlog(factory_id=factory, collection_id=collection)
265
268
  info(
266
- f"Extractor backlog clips={backlog.total_clips} active_manifest={backlog.active_manifest_id}"
269
+ f"Extractor backlog clips={backlog.total_clips} "
270
+ f"active_manifest={backlog.active_manifest_id}"
267
271
  )
268
272
  # Build exists filters from CLI format
269
273
  exists_filters = [_parse_exists_filter(e) for e in exists] if exists else None
270
- job = client.jobs.submit_extract_iframes(
274
+ job = client.jobs.submit_extract_frames(
271
275
  factory_id=factory,
272
276
  collection_id=collection,
273
277
  worker_ids=worker_ids,
@@ -299,7 +303,8 @@ def jobs_extract_iframes(
299
303
  memory=memory,
300
304
  )
301
305
  success(
302
- f"Submitted extractor {job.job_id} on {result.platform} as {result.batch_job_name} with {result.task_count} tasks"
306
+ f"Submitted extractor {job.job_id} on {result.platform} "
307
+ f"as {result.batch_job_name} with {result.task_count} tasks"
303
308
  )
304
309
  if watch:
305
310
  _watch_job(client, job.job_id, interval=interval)
@@ -131,11 +131,13 @@ async def _status(ctx: typer.Context, space_id: int | None) -> None:
131
131
  console.print("[yellow]No medoids found[/yellow]")
132
132
  if space_id:
133
133
  console.print(
134
- f"[dim]Run: buildai admin medoid compute --space-id {space_id} --group-type worker[/dim]"
134
+ f"[dim]Run: buildai admin medoid compute "
135
+ f"--space-id {space_id} --group-type worker[/dim]"
135
136
  )
136
137
  else:
137
138
  console.print(
138
- "[dim]Run: buildai admin medoid compute --space-id <id> --group-type worker[/dim]"
139
+ "[dim]Run: buildai admin medoid compute "
140
+ "--space-id <id> --group-type worker[/dim]"
139
141
  )
140
142
  return
141
143
 
@@ -236,7 +238,8 @@ async def _compute(
236
238
  dry_run: bool,
237
239
  ) -> None:
238
240
  from dal.processing import jobs
239
- from infra.batch_configs import get_compute_medoids_config
241
+
242
+ from services.load_config import load_service_config, resolve_profile
240
243
 
241
244
  settings = ctx.obj["settings"]
242
245
 
@@ -297,7 +300,11 @@ async def _compute(
297
300
  raise typer.Exit(1)
298
301
 
299
302
  # Get GPU config based on data size for display
300
- batch_config = get_compute_medoids_config(entity_count, space.dimensions)
303
+ embedding_config = load_service_config("media_embedding")
304
+ batch_config = resolve_profile(
305
+ embedding_config,
306
+ job_type="compute_medoids",
307
+ )
301
308
  data_size_gb = (entity_count * space.dimensions * 4) / (1024**3)
302
309
 
303
310
  # Display plan
@@ -312,8 +319,8 @@ async def _compute(
312
319
  f"Groups ({group_type}s): [green]{group_count:,}[/green]\n"
313
320
  f"Entities ({entity_type}s): [cyan]{entity_count:,}[/cyan]\n"
314
321
  f"Data Size: {data_size_gb:.1f}GB\n\n"
315
- f"GPU: [green]{batch_config.machine_type}[/green] ({batch_config.gpu_type})\n"
316
- f"Memory: {batch_config.memory_mib // 1024}GB RAM\n\n"
322
+ f"GPU: [green]{batch_config['machine_type']}[/green] ({batch_config.get('gpu')})\n"
323
+ f"Memory: {batch_config.get('memory_mib', 0) // 1024}GB RAM\n\n"
317
324
  f"Output: [green]{group_count:,}[/green] medoids → observations.medoids",
318
325
  title="Plan",
319
326
  )
@@ -204,7 +204,9 @@ def query(
204
204
  show_sql(sql)
205
205
 
206
206
  admin_config = resolve_admin_connection_config(settings)
207
- use_admin_connection = _is_select_query(sql) and admin_config is not None
207
+ use_admin_connection = admin_config is not None and (
208
+ _is_select_query(sql) or (is_write and cli_profile == "internal_admin")
209
+ )
208
210
  if use_admin_connection and admin_config is not None:
209
211
  dim(f"Using admin DB principal: {admin_config.user}")
210
212
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "buildai-cli"
7
- version = "0.3.28"
7
+ version = "0.3.30"
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