@fugood/bricks-cli 2.26.0-beta.2 → 2.26.0-beta.21

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.
package/README.md CHANGED
@@ -206,8 +206,8 @@ bricks app resolve <query> [-l limit] [-j|--json]
206
206
  # Get application details
207
207
  bricks app get <app-id> [-c|--composed] [-j|--json]
208
208
 
209
- # Update application
210
- bricks app update <app-id> [-n name] [-d description] [-c config-json] [-f config-file] [--validate]
209
+ # Update application (`-t ''` clears the tags; a locked application refuses all changes until --unlock)
210
+ bricks app update <app-id> [-n name] [-d description] [-t tags] [--lock|--unlock] [-c config-json] [-f config-file] [--validate]
211
211
 
212
212
  # Short edit application (requires valid shortIds from app config)
213
213
  bricks app short-edit <app-id> -l '[{"shortId":"<subspace-short-id>","path":"property.name","content":"value"}]'
@@ -215,16 +215,34 @@ bricks app short-edit <app-id> -l '[{"shortId":"<subspace-short-id>","path":"pro
215
215
  # Bind/unbind devices
216
216
  bricks app bind <app-id> [-b device-ids] [-u device-ids]
217
217
  bricks app bind <app-id> [-b device-ids] [-u device-ids] [--dry-run] [-j|--json]
218
+ # Set the viewport of new or bound devices (JSON or a JSON file keyed by device ID).
219
+ # Fields: x, y, width, height, rotate, type (rotate|scroll), rotateType (crop|fit|physical-rotate),
220
+ # scrollType (crop|fit), maintainAspectRatio, forceDeviceRatio, mirrorHorizontal, mirrorVertical, content.
221
+ # Fields not given keep the current viewport, else the root layout (full size at 0,0).
222
+ # A bound device keeps its other settings (automation, cron tests, control toggles, env).
223
+ bricks app bind <app-id> --viewport '{"<device-id>":{"x":0,"y":0,"width":960,"height":540,"rotate":90}}' [--dry-run] [-j|--json]
218
224
 
219
225
  # Trigger automation
220
- bricks app trigger <app-id> <test-id> [--play|--stop] [--setup-at-launch]
226
+ bricks app trigger <app-id> <test-id> [--play|--stop] [--setup-at-launch] [-g match-group]
227
+
228
+ # Application Control pages (Runtime Editor, Canvas Control, Device Control):
229
+ # issue a page token and print the URL of each page (needs an OAuth login: `bricks auth login`);
230
+ # --no-token prints the sign-in URLs only and works with any login
231
+ bricks app control-page <app-id> -t <short-edit,canvas-control,device-control,device-control-create-only> [--token-name name] [--expires-in days] [-e KEY=VALUE] [--no-token] [--dry-run] [-j|--json]
232
+ # The printed URL is <controller>/<page>.html?workspace_secret=…&application_id=…; set BRICKS_CONTROLLER_URL to override the controller origin.
221
233
 
222
234
  # Preview a release without publishing
223
235
  bricks app release <app-id> -c <config-path-or-json> [-n name] [--version version] [--changelogs text] [--dry-run] [-j|--json]
224
236
 
237
+ # List release versions, then switch the platform config to one (ID or name).
238
+ # The local CTOR project is not changed. Unreleased changes are dropped: confirm, or pass -y.
239
+ bricks app versions <app-id> [-j|--json]
240
+ bricks app switch-version <app-id> <version-id-or-name> [-y|--yes] [--dry-run] [-j|--json]
241
+
225
242
  # Diagnose a config: schema validation + semantic lint rules
226
243
  # (data-update-race, redundant-rect-overlay, off-grid-frame, out-of-bounds-frame,
227
- # wait-async-no-op, missing-result-param, unused-data-node, z-order-cover)
244
+ # wait-async-no-op, missing-result-param, unused-data-node, z-order-cover,
245
+ # expression-global-variable, mapping-outside-items)
228
246
  # Accepts a local file path or a remote application id.
229
247
  bricks app doctor <app-id-or-path> [-c|--composed] [--strict] [--only codes] [--ignore codes] [-j|--json]
230
248
  ```
@@ -278,6 +296,32 @@ bricks group refresh <group-id> [--dry-run] [-j|--json]
278
296
  bricks group monitor <group-id> [-i interval-seconds]
279
297
  ```
280
298
 
299
+ ### Blueprints
300
+
301
+ A Blueprint is a workspace-level map of a site: its applications, modules, devices, Data Bank
302
+ properties and Media Flow boxes as nodes, with role cards and the edges between them. The CLI
303
+ reads Blueprints; edit them in CTOR. These commands need the `query_blueprint` token permission.
304
+
305
+ ```bash
306
+ # List blueprints (name, node count, revision, Orchestrator run state)
307
+ bricks blueprint list [-k keyword] [-j|--json]
308
+
309
+ # Resolve a blueprint name or ID
310
+ bricks blueprint resolve <query> [-l limit] [-j|--json]
311
+
312
+ # Get blueprint details (overview, counts, run state, referenced entities with no node)
313
+ bricks blueprint get <blueprint-id> [-j|--json]
314
+
315
+ # Nodes with authored edges and edges derived from the workspace (bindings, used modules, ...)
316
+ bricks blueprint graph <blueprint-id> [-j|--json]
317
+
318
+ # Nodes grouped by kind; removed or moved entities are flagged as missing
319
+ bricks blueprint members <blueprint-id> [-j|--json]
320
+
321
+ # Print the projection text that the Blueprint Orchestrator gets as its context
322
+ bricks blueprint projection <blueprint-id>
323
+ ```
324
+
281
325
  ### Media Flow
282
326
 
283
327
  Media Flow commands require:
@@ -345,6 +389,9 @@ Notes:
345
389
  - When no `-v/--value-file` is given, `set` keeps the current value (useful to change only tags or the definition).
346
390
  - `-v` parses the input as JSON and falls back to a plain string (`-v '{"a":1}'` → object, `-v hello` → string).
347
391
  - Revoking the auto-provisioned `manager` / `used-by-device` keys rotates them instead of deleting them.
392
+ - Space key values come back masked (last 4 characters) unless the login may read them: the
393
+ workspace owner, a role with `update-workspace`, or a token with the `manage_devtools` scope.
394
+ A key the login creates is always returned in full, and a masked key revokes by its full value.
348
395
  - The Data Bank endpoint is derived from the configured BRICKS endpoint
349
396
  (prod → `bank.bricks.tools`, beta → `bank-beta.bricks.tools`, dev → `localhost:8080`).
350
397
  - Environment overrides for CI / custom setups: `BRICKS_BANK_SPACENAME` + `BRICKS_BANK_SPACEKEY`
@@ -353,6 +400,16 @@ Notes:
353
400
  it in the buttress `state.json`, so that server's local functions can use `context.bank`
354
401
  (`--revoke` removes it; re-running rotates the key).
355
402
 
403
+ ### Buttress binding and device authentication
404
+
405
+ `bricks buttress bind` pairs the server with the current workspace **and automatically
406
+ provisions a workspace-scoped DevTools token** in its permission-restricted `state.json`.
407
+ After restarting Buttress, agents with `local_devices = true` use it for matching-workspace
408
+ devices without passing credentials through model arguments. Normal bind/status output
409
+ hides the token; `--print` emits the complete secret state for remote provisioning.
410
+ Rebind and restart to renew an expired token (default lifetime: 30 days). Rebinding does
411
+ not revoke older tokens. Automatic device authentication assumes a trusted LAN.
412
+
356
413
  ### Interactive Mode
357
414
 
358
415
  ```bash