@camstack/addon-admin-ui 1.2.495 → 1.2.496
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/CHANGELOG.md +6 -0
- package/dist/assets/{AddonAssetIcon-CFX3RwXW.js → AddonAssetIcon-DIGI0J-I.js} +1 -1
- package/dist/assets/{Addons-DpVH9nAf.js → Addons-BXBVaw0C.js} +1 -1
- package/dist/assets/{AdminPage-BJaaesfk.js → AdminPage-rM4C_UeK.js} +1 -1
- package/dist/assets/{AdminSectionedPage-CNjLEAGW.js → AdminSectionedPage-hs_sRKSH.js} +1 -1
- package/dist/assets/{AiProfiles-BJRJ5zJK.js → AiProfiles-FyDOlZrB.js} +1 -1
- package/dist/assets/BrokerEditorDialog-CpjjEowc.js +1 -0
- package/dist/assets/{Build-3M_d0_rj.js → Build-BHWi77ox.js} +1 -1
- package/dist/assets/{Calendars-DxftJ_an.js → Calendars-DpfM0tWi.js} +1 -1
- package/dist/assets/{Cluster-HHqJRHI1.js → Cluster-CGbK_RcF.js} +1 -1
- package/dist/assets/{CompositionBlockEditor-DXfPsKQ0.js → CompositionBlockEditor-C-oGyTOT.js} +1 -1
- package/dist/assets/{CompositionEditorPage-D9VfeM5q.js → CompositionEditorPage--pC-fQTK.js} +1 -1
- package/dist/assets/{Data-4tIzvoZk.js → Data-5YjPSX0u.js} +1 -1
- package/dist/assets/{DeviceDetail-DSCDR1Cp.js → DeviceDetail-MgYrZi-H.js} +1 -1
- package/dist/assets/{DeviceDoActionFields-B8m61VBx.js → DeviceDoActionFields-C8dC5weu.js} +1 -1
- package/dist/assets/{Devices-DMgEOarQ.js → Devices-BDxPWKee.js} +1 -1
- package/dist/assets/{EmbedPlayerPage-kdaZaPUi.js → EmbedPlayerPage-CXfoZEoy.js} +1 -1
- package/dist/assets/{HelperWizard-CrfZ5Vv0.js → HelperWizard-DPb6SH1D.js} +1 -1
- package/dist/assets/{History-BOBC6XKv.js → History-CgY-ADwx.js} +1 -1
- package/dist/assets/{Identity-CKhLFZy8.js → Identity-CngM910j.js} +1 -1
- package/dist/assets/{IntegrationDetail-CwztjSvz.js → IntegrationDetail-tLO3mmbA.js} +1 -1
- package/dist/assets/{IntegrationHub-BnLIS74H.js → IntegrationHub-M6BlF8kI.js} +1 -1
- package/dist/assets/{Integrations-BjjqLgHB.js → Integrations-CEbaKS2K.js} +1 -1
- package/dist/assets/{Integrations-D9JKfDPr.js → Integrations-lFHvSwS1.js} +1 -1
- package/dist/assets/{Library-CIoEX1yM.js → Library-owv8dCJn.js} +1 -1
- package/dist/assets/{Locations-CeULSBbP.js → Locations-CIbPLu6Y.js} +1 -1
- package/dist/assets/{Logs-DqMDFyDI.js → Logs-BkVwtIoJ.js} +1 -1
- package/dist/assets/{MaskShapeCanvas-5TYDYckS.js → MaskShapeCanvas-BdJHOhru.js} +1 -1
- package/dist/assets/{MotionZonesSettings-BnEAkRqe.js → MotionZonesSettings-eigY1-yb.js} +1 -1
- package/dist/assets/{MyAccess-C9ZlQjl7.js → MyAccess-kMqHvFdO.js} +1 -1
- package/dist/assets/{Network-DWsy6sps.js → Network-DNgds3SY.js} +1 -1
- package/dist/assets/{NodeAddonsSettingsPanel-BWoo8ZpJ.js → NodeAddonsSettingsPanel-BTLr6xzq.js} +1 -1
- package/dist/assets/{Notifications-D45pUZf1.js → Notifications-3HA167No.js} +1 -1
- package/dist/assets/{Pipeline-DtXlNNOZ.js → Pipeline-Duxnzw0u.js} +1 -1
- package/dist/assets/{PrivacyMaskSettings-CozNRgQC.js → PrivacyMaskSettings-DQxuAo8I.js} +1 -1
- package/dist/assets/{Recordings-C7QC3Pxj.js → Recordings-DNM6KFbT.js} +1 -1
- package/dist/assets/{ScanNetworkModal-Bq6Sr4qL.js → ScanNetworkModal-DGxeTl6N.js} +1 -1
- package/dist/assets/{SceneMonitorEditor-DtTzOArV.js → SceneMonitorEditor-D7lPRwkb.js} +1 -1
- package/dist/assets/{SessionsList-BHjPSf3H.js → SessionsList-v1GWS7lS.js} +1 -1
- package/dist/assets/{Showroom-33b_lNAT.js → Showroom-BQjG5SEZ.js} +1 -1
- package/dist/assets/{System-8xlWQY0F.js → System-1vAVXVvO.js} +1 -1
- package/dist/assets/{Terminal-DxLUTA7D.js → Terminal-CAeZSUkp.js} +1 -1
- package/dist/assets/{Viewer-BeUf0fdC.js → Viewer-CoaaY2ah.js} +1 -1
- package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-BopscExo.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-Dt6nbTOI.js} +1 -1
- package/dist/assets/{addon-icons-context-DGXC9vor.js → addon-icons-context-B-CR3D5Y.js} +1 -1
- package/dist/assets/{archive-CvXjfAJ5.js → archive-Caq0fiUd.js} +1 -1
- package/dist/assets/{assignment-candidates-YyTJV_56.js → assignment-candidates-oUf0MmfV.js} +1 -1
- package/dist/assets/{authed-media-LqwyDFYD.js → authed-media-rsowuJD_.js} +1 -1
- package/dist/assets/{bell-off-DQjR_xqX.js → bell-off-7NO0NCk5.js} +1 -1
- package/dist/assets/{board-model-DHqTtLge.js → board-model-CXoBU-My.js} +1 -1
- package/dist/assets/{boxes-g1SWI3TC.js → boxes-CfX2DaXN.js} +1 -1
- package/dist/assets/circle-slash-CNw3qaX5.js +1 -0
- package/dist/assets/client-UkFHArbd.js +648 -0
- package/dist/assets/{cloud-upload-BsaCZZve.js → cloud-upload-Bha3MQZ0.js} +1 -1
- package/dist/assets/crop-KD442bNz.js +1 -0
- package/dist/assets/{device-integration-icon-B4EhX_LL.js → device-integration-icon-Ca6J7BrE.js} +1 -1
- package/dist/assets/device-picker-model-C0bjqXeS.js +1 -0
- package/dist/assets/{dist-C-xa27xq.js → dist-Bm86l9VH.js} +1 -1
- package/dist/assets/dist-Db-bCS6Y.js +648 -0
- package/dist/assets/{eraser-Cayo_0zK.js → eraser-DcRrD8r0.js} +1 -1
- package/dist/assets/{format-BA7Kq5Xz.js → format-B-Mz_Gp5.js} +1 -1
- package/dist/assets/{hard-drive-download-DDQriCJk.js → hard-drive-download-Ds3LLqZ_.js} +1 -1
- package/dist/assets/{hostInit-CzNFxC77.js → hostInit-CLJxS8C0.js} +1 -1
- package/dist/assets/i18n-Dodsa0QQ.js +1 -0
- package/dist/assets/{icons-BPbbdJnj.js → icons-CxLU2kUU.js} +1 -1
- package/dist/assets/{index-5eo6U8kw.js → index-DAYRmkvA.js} +3 -3
- package/dist/assets/{key-BSu0zrWB.js → key-CPCN1bXO.js} +1 -1
- package/dist/assets/{key-round-DvMZJgfp.js → key-round-DSSlw3bb.js} +1 -1
- package/dist/assets/{layers-DF_k6hWC.js → layers-Au38YP9x.js} +1 -1
- package/dist/assets/{linked-devices-model-C-5bW2__.js → linked-devices-model-CAcKgihZ.js} +1 -1
- package/dist/assets/{list-ordered-BY9cDz4x.js → list-ordered-BcEAxRcq.js} +1 -1
- package/dist/assets/{location-owned-usage-FBzPOvfn.js → location-owned-usage-DC8YfZHt.js} +1 -1
- package/dist/assets/{log-in-S_8y8Jt7.js → log-in-BIF-VHyB.js} +1 -1
- package/dist/assets/{memory-stick-N7YG8WDr.js → memory-stick-dd2TtD8X.js} +1 -1
- package/dist/assets/{message-square-plus-B6OMDBFd.js → message-square-plus--EqwnnsY.js} +1 -1
- package/dist/assets/{mf-entry-bootstrap-0-05b5b10f.js → mf-entry-bootstrap-0-d8302735.js} +2 -2
- package/dist/assets/{mic-off-wSLIBpcb.js → mic-off-C4AEP_LS.js} +1 -1
- package/dist/assets/{monitor-off-BPkjr8Kb.js → monitor-off-BMFLRGf9.js} +1 -1
- package/dist/assets/{monitor-smartphone-BaKbWsBX.js → monitor-smartphone-BKJ1_LnF.js} +1 -1
- package/dist/assets/mount-C0bjqXeS.js +1 -0
- package/dist/assets/{player-overlays-BpkVlGCk.js → player-overlays-DVETFMIk.js} +1 -1
- package/dist/assets/{recycle-BpmmXPs6.js → recycle-BayFw4ej.js} +1 -1
- package/dist/assets/remoteEntry-BkQqqD-X.js +1 -0
- package/dist/assets/{scan-eye-Cu1C2mB8.js → scan-eye-BrzMkZIm.js} +1 -1
- package/dist/assets/{scissors-CfgqlM1P.js → scissors-Cdea5FpP.js} +1 -1
- package/dist/assets/{search-x-D03g42iG.js → search-x-D5U75yFR.js} +1 -1
- package/dist/assets/{send-Ct8Iyrnk.js → send-DdLpBXJo.js} +1 -1
- package/dist/assets/{settings-2-DcFFzE15.js → settings-2-E7MRkJ8L.js} +1 -1
- package/dist/assets/{sigma-BBZ6UUbV.js → sigma-DQ448qdQ.js} +1 -1
- package/dist/assets/{speaker-B0avnbSb.js → speaker-8vDFm1aL.js} +1 -1
- package/dist/assets/src-CJMN3ac7.js +67 -0
- package/dist/assets/{step-inspector-model-DSf88Gyc.js → step-inspector-model-DrrErQ-Z.js} +1 -1
- package/dist/assets/{table-2-DMA3aZl4.js → table-2-BWAe4fOI.js} +1 -1
- package/dist/assets/{timer-reset-Bbx4AGN0.js → timer-reset-BlrgM8RC.js} +1 -1
- package/dist/assets/{ungroup-BQn6cqqW.js → ungroup-D9nsaCkT.js} +1 -1
- package/dist/assets/{unlink-4NHoJGD6.js → unlink-BZggCuRp.js} +1 -1
- package/dist/assets/{usb-7LyYlbOn.js → usb-CnowURs8.js} +1 -1
- package/dist/assets/{use-scenes-feed-BMxBsO4L.js → use-scenes-feed-CKTWN5k9.js} +1 -1
- package/dist/assets/{use-stationary-objects-vMMZk1OF.js → use-stationary-objects-CFZh0JGL.js} +1 -1
- package/dist/assets/useEventInvalidation-C0bjqXeS.js +1 -0
- package/dist/assets/{useNodeUrlSelection-D50tuj4_.js → useNodeUrlSelection-CPhmr6x9.js} +1 -1
- package/dist/assets/user-round-DX7v4O3o.js +1 -0
- package/dist/assets/{user-x-BjoN1Vho.js → user-x-S0MRC6zp.js} +1 -1
- package/dist/assets/{video-1DOXNRH4.js → video-oLlCkBIP.js} +1 -1
- package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-DBgm9Tfr.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-Ddnry646.js} +2 -2
- package/dist/index.html +9 -9
- package/dist/server/addon.js +649 -71
- package/package.json +1 -1
- package/dist/assets/BrokerEditorDialog-DfJWCNWC.js +0 -1
- package/dist/assets/circle-slash-Be75TgNF.js +0 -1
- package/dist/assets/client-Boy4MYN9.js +0 -358
- package/dist/assets/crop-ChAbNHDL.js +0 -1
- package/dist/assets/device-picker-model-DgqPui1o.js +0 -1
- package/dist/assets/dist-CoizE_WQ.js +0 -358
- package/dist/assets/i18n-BKbDJexS.js +0 -1
- package/dist/assets/mount-DgqPui1o.js +0 -1
- package/dist/assets/remoteEntry-TI8zrKEx.js +0 -1
- package/dist/assets/src-B1DsO1Ze.js +0 -67
- package/dist/assets/useEventInvalidation-DgqPui1o.js +0 -1
- package/dist/assets/user-round-Dk_iTJlv.js +0 -1
package/dist/server/addon.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
|
-
//#region ../types/dist/event-category-
|
|
3
|
+
//#region ../types/dist/event-category-hdMR7CTW.mjs
|
|
4
4
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
5
5
|
EventCategory["SystemBoot"] = "system.boot";
|
|
6
6
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -765,6 +765,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
765
765
|
*/
|
|
766
766
|
EventCategory["AccessoriesChanged"] = "accessories.onAccessoriesChanged";
|
|
767
767
|
/**
|
|
768
|
+
* An action run started or ended. Emitted by the `actions` surface.
|
|
769
|
+
* Payload: `ActionRunChanged` (`{ actionId, runId, isRunning, outcome?, lastRunAt, lastError }`).
|
|
770
|
+
*/
|
|
771
|
+
EventCategory["ActionsRunChanged"] = "actions.onRunChanged";
|
|
772
|
+
/**
|
|
768
773
|
* Progress update from a running model conversion job.
|
|
769
774
|
* Payload: `{ kind: 'model-convert', phase, sessionId?, pct?, detail? }`.
|
|
770
775
|
* Emitted by `addon-model-studio` on the converting node.
|
|
@@ -5443,7 +5448,7 @@ var ZodIssueCode = {
|
|
|
5443
5448
|
var ZodFirstPartyTypeKind;
|
|
5444
5449
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5445
5450
|
//#endregion
|
|
5446
|
-
//#region ../types/dist/sleep-
|
|
5451
|
+
//#region ../types/dist/sleep-BHjNez61.mjs
|
|
5447
5452
|
/**
|
|
5448
5453
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5449
5454
|
* window to float samples (D455).
|
|
@@ -8510,6 +8515,8 @@ Object.freeze({ "doorbell": "lastPressedAt" });
|
|
|
8510
8515
|
/** Every capability name, so addon code can check a name without the schema graph. */
|
|
8511
8516
|
var CAP_NAMES = Object.freeze([
|
|
8512
8517
|
"accessories",
|
|
8518
|
+
"action-source",
|
|
8519
|
+
"actions",
|
|
8513
8520
|
"addon-pages",
|
|
8514
8521
|
"addon-pages-source",
|
|
8515
8522
|
"addon-routes",
|
|
@@ -15370,7 +15377,23 @@ var AutomationTriggerSchema = discriminatedUnion("kind", [
|
|
|
15370
15377
|
kind: literal("schedule"),
|
|
15371
15378
|
cron: string().min(1).max(120)
|
|
15372
15379
|
}),
|
|
15373
|
-
object({ kind: literal("manual") })
|
|
15380
|
+
object({ kind: literal("manual") }),
|
|
15381
|
+
object({
|
|
15382
|
+
kind: literal("detection"),
|
|
15383
|
+
/** Class names. A macro class (`animal`, `vehicle`, `person`, `package`)
|
|
15384
|
+
* matches every raw class that maps to it; any other name matches
|
|
15385
|
+
* exactly. */
|
|
15386
|
+
classes: array(string().min(1)).min(1),
|
|
15387
|
+
deviceIds: array(number().int().nonnegative()).min(1),
|
|
15388
|
+
/** The track must have visited at least one of these zones. */
|
|
15389
|
+
zones: array(string().min(1)).min(1).optional(),
|
|
15390
|
+
/** Best-so-far confidence the track must reach. */
|
|
15391
|
+
minScore: number().min(0).max(1).optional()
|
|
15392
|
+
}),
|
|
15393
|
+
object({
|
|
15394
|
+
kind: literal("interval"),
|
|
15395
|
+
minutes: number().int().min(1).max(1440)
|
|
15396
|
+
})
|
|
15374
15397
|
]);
|
|
15375
15398
|
/**
|
|
15376
15399
|
* One action step.
|
|
@@ -15390,28 +15413,47 @@ var AutomationTriggerSchema = discriminatedUnion("kind", [
|
|
|
15390
15413
|
* is called. The runner still receives a number and is untouched; the
|
|
15391
15414
|
* resolution is the recipe's job, not the runner's.
|
|
15392
15415
|
*/
|
|
15416
|
+
var AutomationWaitStepSchema = object({
|
|
15417
|
+
kind: literal("wait"),
|
|
15418
|
+
seconds: number().min(0).max(300)
|
|
15419
|
+
});
|
|
15420
|
+
var AutomationCapStepSchema = object({
|
|
15421
|
+
kind: literal("cap"),
|
|
15422
|
+
/**
|
|
15423
|
+
* One device, several same-family devices (locks / climate family / …),
|
|
15424
|
+
* or `{ $var }` for the device that triggered the run. An array is
|
|
15425
|
+
* fan-out at codegen — each id gets the same cap.method call.
|
|
15426
|
+
*/
|
|
15427
|
+
deviceId: union([
|
|
15428
|
+
number().int(),
|
|
15429
|
+
array(number().int()).min(1),
|
|
15430
|
+
object({ $var: string().min(1) })
|
|
15431
|
+
]),
|
|
15432
|
+
cap: string().min(1),
|
|
15433
|
+
method: string().min(1),
|
|
15434
|
+
/** Values may carry `{{vars.x}}` slots, or be exactly `{ $var: 'name' }`, which
|
|
15435
|
+
* SUBSTITUTE and do not evaluate (§3.2.3). Anything beyond substitution is
|
|
15436
|
+
* the expression leaf. */
|
|
15437
|
+
args: record(string(), unknown()).optional()
|
|
15438
|
+
});
|
|
15439
|
+
/**
|
|
15440
|
+
* The steps an internal Action may contain: cap and wait, and nothing that can
|
|
15441
|
+
* call back into an Action — so an Action can never reach itself (no cycles).
|
|
15442
|
+
*/
|
|
15443
|
+
var ActionStepSchema = discriminatedUnion("kind", [AutomationWaitStepSchema, AutomationCapStepSchema]);
|
|
15393
15444
|
var AutomationActionSchema = discriminatedUnion("kind", [
|
|
15445
|
+
AutomationWaitStepSchema,
|
|
15446
|
+
AutomationCapStepSchema,
|
|
15394
15447
|
object({
|
|
15395
|
-
kind: literal("
|
|
15396
|
-
|
|
15397
|
-
|
|
15398
|
-
|
|
15399
|
-
|
|
15400
|
-
|
|
15401
|
-
|
|
15402
|
-
|
|
15403
|
-
|
|
15404
|
-
*/
|
|
15405
|
-
deviceId: union([
|
|
15406
|
-
number().int(),
|
|
15407
|
-
array(number().int()).min(1),
|
|
15408
|
-
object({ $var: string().min(1) })
|
|
15409
|
-
]),
|
|
15410
|
-
cap: string().min(1),
|
|
15411
|
-
method: string().min(1),
|
|
15412
|
-
/** Values may carry `{{vars.x}}` slots, which SUBSTITUTE and do not
|
|
15413
|
-
* evaluate (§3.2.3). Anything beyond substitution is the expression leaf. */
|
|
15414
|
-
args: record(string(), unknown()).optional()
|
|
15448
|
+
kind: literal("action"),
|
|
15449
|
+
/** An entry of the `actions` surface (`internal:<uuid>` or `<addonId>:<localId>`). */
|
|
15450
|
+
actionId: string().min(1),
|
|
15451
|
+
/** Values for the action's declared variables; the others take their default. */
|
|
15452
|
+
variables: record(string(), union([
|
|
15453
|
+
string(),
|
|
15454
|
+
number(),
|
|
15455
|
+
boolean()
|
|
15456
|
+
])).optional()
|
|
15415
15457
|
}),
|
|
15416
15458
|
object({
|
|
15417
15459
|
kind: literal("code"),
|
|
@@ -15420,10 +15462,356 @@ var AutomationActionSchema = discriminatedUnion("kind", [
|
|
|
15420
15462
|
code: string().min(1).max(2e4)
|
|
15421
15463
|
})
|
|
15422
15464
|
]);
|
|
15465
|
+
/**
|
|
15466
|
+
* How a trigger that arrives while the automation is busy (or cooling down) is
|
|
15467
|
+
* handled. One of the automation's execution modes, never a property of its
|
|
15468
|
+
* actions. Absent means `single`.
|
|
15469
|
+
*
|
|
15470
|
+
* - `single` — drop the trigger while a run is in progress (traced + logged).
|
|
15471
|
+
* - `restart` — abort the run in progress (at its next step boundary), start fresh.
|
|
15472
|
+
* - `queued` — queue up to `max` triggers, drop the rest (traced).
|
|
15473
|
+
* - `parallel` — up to `max` runs at once, drop the rest (traced).
|
|
15474
|
+
* - `cooldown` — `single`, and no new run until `minutes` after the last run
|
|
15475
|
+
* STARTED; persisted across a restart. A manual trigger bypasses only this
|
|
15476
|
+
* wait, never the single/queued limits.
|
|
15477
|
+
*/
|
|
15478
|
+
var AutomationRunModeSchema = discriminatedUnion("mode", [
|
|
15479
|
+
object({ mode: literal("single") }),
|
|
15480
|
+
object({ mode: literal("restart") }),
|
|
15481
|
+
object({
|
|
15482
|
+
mode: literal("queued"),
|
|
15483
|
+
max: number().int().min(1).max(10)
|
|
15484
|
+
}),
|
|
15485
|
+
object({
|
|
15486
|
+
mode: literal("parallel"),
|
|
15487
|
+
max: number().int().min(1).max(10)
|
|
15488
|
+
}),
|
|
15489
|
+
object({
|
|
15490
|
+
mode: literal("cooldown"),
|
|
15491
|
+
minutes: number().int().min(1).max(1440)
|
|
15492
|
+
})
|
|
15493
|
+
]);
|
|
15423
15494
|
var AutomationRecipeSchema = object({
|
|
15424
15495
|
triggers: array(AutomationTriggerSchema),
|
|
15425
15496
|
conditions: AutomationConditionSchema.optional(),
|
|
15426
|
-
actions: array(AutomationActionSchema)
|
|
15497
|
+
actions: array(AutomationActionSchema),
|
|
15498
|
+
runMode: AutomationRunModeSchema.optional(),
|
|
15499
|
+
/** How many run traces the automation keeps (default {@link DEFAULT_TRACE_KEEP}). */
|
|
15500
|
+
keepTraces: number().int().min(1).max(100).optional()
|
|
15501
|
+
});
|
|
15502
|
+
new Set([
|
|
15503
|
+
{
|
|
15504
|
+
id: "person",
|
|
15505
|
+
name: "Person"
|
|
15506
|
+
},
|
|
15507
|
+
{
|
|
15508
|
+
id: "vehicle",
|
|
15509
|
+
name: "Vehicle"
|
|
15510
|
+
},
|
|
15511
|
+
{
|
|
15512
|
+
id: "animal",
|
|
15513
|
+
name: "Animal"
|
|
15514
|
+
},
|
|
15515
|
+
{
|
|
15516
|
+
id: "package",
|
|
15517
|
+
name: "Package"
|
|
15518
|
+
}
|
|
15519
|
+
].map((l) => l.id));
|
|
15520
|
+
var COCO_TO_MACRO = {
|
|
15521
|
+
mapping: {
|
|
15522
|
+
person: "person",
|
|
15523
|
+
bicycle: "vehicle",
|
|
15524
|
+
car: "vehicle",
|
|
15525
|
+
motorcycle: "vehicle",
|
|
15526
|
+
airplane: "vehicle",
|
|
15527
|
+
bus: "vehicle",
|
|
15528
|
+
train: "vehicle",
|
|
15529
|
+
truck: "vehicle",
|
|
15530
|
+
boat: "vehicle",
|
|
15531
|
+
bird: "animal",
|
|
15532
|
+
cat: "animal",
|
|
15533
|
+
dog: "animal",
|
|
15534
|
+
horse: "animal",
|
|
15535
|
+
sheep: "animal",
|
|
15536
|
+
cow: "animal",
|
|
15537
|
+
elephant: "animal",
|
|
15538
|
+
bear: "animal",
|
|
15539
|
+
zebra: "animal",
|
|
15540
|
+
giraffe: "animal",
|
|
15541
|
+
suitcase: "package",
|
|
15542
|
+
backpack: "package",
|
|
15543
|
+
handbag: "package"
|
|
15544
|
+
},
|
|
15545
|
+
preserveOriginal: false
|
|
15546
|
+
};
|
|
15547
|
+
new Set(Object.values(COCO_TO_MACRO.mapping));
|
|
15548
|
+
/**
|
|
15549
|
+
* Run traces — what an automation (or, later, an Action run) DID, node by node,
|
|
15550
|
+
* so the editor can paint every block green or red with its reason.
|
|
15551
|
+
*
|
|
15552
|
+
* A trace is data, not a log: it covers the WHOLE tree — the trigger stage,
|
|
15553
|
+
* every condition node (containers and leaves, including the ones a
|
|
15554
|
+
* short-circuit never reached), the run-mode verdict and every action step —
|
|
15555
|
+
* each addressed by a stable path (`conditions.0.1`, `actions.2`, or `steps.N`
|
|
15556
|
+
* for an Action run). Skipped
|
|
15557
|
+
* evaluations are traced too, and identical consecutive skips collapse into a
|
|
15558
|
+
* repeat count so a trigger that fails every 5 minutes cannot flush real runs.
|
|
15559
|
+
*
|
|
15560
|
+
* {@link AutomationStepTraceSchema} is deliberately free of automation
|
|
15561
|
+
* vocabulary so an Action run records the same step shape.
|
|
15562
|
+
*/
|
|
15563
|
+
/** A value a trace may show: JSON primitives and short lists, nothing deeper. */
|
|
15564
|
+
var TraceValueSchema = union([
|
|
15565
|
+
string(),
|
|
15566
|
+
number(),
|
|
15567
|
+
boolean(),
|
|
15568
|
+
_null(),
|
|
15569
|
+
array(union([string(), number()]))
|
|
15570
|
+
]);
|
|
15571
|
+
var AutomationRunOutcomeSchema = _enum([
|
|
15572
|
+
"ran",
|
|
15573
|
+
"skipped-trigger",
|
|
15574
|
+
"skipped-conditions",
|
|
15575
|
+
"skipped-cooldown",
|
|
15576
|
+
"skipped-overlap",
|
|
15577
|
+
"failed",
|
|
15578
|
+
"aborted"
|
|
15579
|
+
]);
|
|
15580
|
+
/** `not-evaluated` = a short-circuit never reached the node. */
|
|
15581
|
+
var TraceNodeOutcomeSchema = _enum([
|
|
15582
|
+
"pass",
|
|
15583
|
+
"fail",
|
|
15584
|
+
"not-evaluated"
|
|
15585
|
+
]);
|
|
15586
|
+
var AutomationTriggerTraceSchema = object({
|
|
15587
|
+
kind: string().min(1),
|
|
15588
|
+
outcome: _enum(["pass", "fail"]),
|
|
15589
|
+
/** Why an event was rejected ("class person not in [dog]") or what fired. */
|
|
15590
|
+
reason: string(),
|
|
15591
|
+
/** deviceId, className, trackId, score … — only what the trigger exposes. */
|
|
15592
|
+
vars: record(string(), TraceValueSchema)
|
|
15593
|
+
});
|
|
15594
|
+
var AutomationConditionTraceNodeSchema = object({
|
|
15595
|
+
/** `conditions` for the root, `conditions.<i>` for its i-th child, … */
|
|
15596
|
+
path: string().min(1),
|
|
15597
|
+
kind: _enum([
|
|
15598
|
+
"all",
|
|
15599
|
+
"any",
|
|
15600
|
+
"not",
|
|
15601
|
+
"condition",
|
|
15602
|
+
"expression"
|
|
15603
|
+
]),
|
|
15604
|
+
outcome: TraceNodeOutcomeSchema,
|
|
15605
|
+
reason: string(),
|
|
15606
|
+
deviceId: number().int().optional(),
|
|
15607
|
+
cap: string().optional(),
|
|
15608
|
+
fieldPath: string().optional(),
|
|
15609
|
+
operator: string().optional(),
|
|
15610
|
+
expected: TraceValueSchema.optional(),
|
|
15611
|
+
/** What the mirror held; `null` when it held nothing (unknown). */
|
|
15612
|
+
observed: TraceValueSchema.optional()
|
|
15613
|
+
});
|
|
15614
|
+
var AutomationRunVerdictSchema = object({
|
|
15615
|
+
mode: AutomationRunModeSchema,
|
|
15616
|
+
decision: _enum([
|
|
15617
|
+
"run",
|
|
15618
|
+
"queued",
|
|
15619
|
+
"restart",
|
|
15620
|
+
"drop",
|
|
15621
|
+
"cooldown",
|
|
15622
|
+
"bypass"
|
|
15623
|
+
]),
|
|
15624
|
+
reason: string()
|
|
15625
|
+
});
|
|
15626
|
+
/** One executed (or not-run) step — shared by automations and Action runs. */
|
|
15627
|
+
var AutomationStepTraceSchema = object({
|
|
15628
|
+
/** `actions.<i>` */
|
|
15629
|
+
path: string().min(1),
|
|
15630
|
+
kind: string().min(1),
|
|
15631
|
+
cap: string().optional(),
|
|
15632
|
+
method: string().optional(),
|
|
15633
|
+
deviceId: number().int().optional(),
|
|
15634
|
+
startedAt: number().optional(),
|
|
15635
|
+
endedAt: number().optional(),
|
|
15636
|
+
outcome: _enum([
|
|
15637
|
+
"ok",
|
|
15638
|
+
"error",
|
|
15639
|
+
"not-run"
|
|
15640
|
+
]),
|
|
15641
|
+
message: string().optional()
|
|
15642
|
+
});
|
|
15643
|
+
var AutomationRunTraceSchema = object({
|
|
15644
|
+
runId: string().min(1),
|
|
15645
|
+
startedAt: number(),
|
|
15646
|
+
endedAt: number(),
|
|
15647
|
+
trigger: AutomationTriggerTraceSchema,
|
|
15648
|
+
conditions: array(AutomationConditionTraceNodeSchema),
|
|
15649
|
+
verdict: AutomationRunVerdictSchema.optional(),
|
|
15650
|
+
steps: array(AutomationStepTraceSchema),
|
|
15651
|
+
outcome: AutomationRunOutcomeSchema,
|
|
15652
|
+
/** How many identical consecutive skips this trace stands for (>= 1). */
|
|
15653
|
+
repeat: number().int().min(1),
|
|
15654
|
+
/** When the latest of those repeats happened. */
|
|
15655
|
+
lastAt: number()
|
|
15656
|
+
});
|
|
15657
|
+
/**
|
|
15658
|
+
* What the hub's `runs` ledger holds for one owner (`automation:<blockId>` or
|
|
15659
|
+
* `action:<actionId>`): the cooldown stamp and the trace ring.
|
|
15660
|
+
*/
|
|
15661
|
+
var AutomationStateDocSchema = object({
|
|
15662
|
+
version: literal(1),
|
|
15663
|
+
lastRunStartedAt: number().nullable(),
|
|
15664
|
+
traces: array(AutomationRunTraceSchema)
|
|
15665
|
+
});
|
|
15666
|
+
/**
|
|
15667
|
+
* Actions — named, runnable things an operator (or an automation) can start,
|
|
15668
|
+
* declared as LIST ENTRIES, never as devices.
|
|
15669
|
+
*
|
|
15670
|
+
* An entry is either **internal** (a short list of cap/wait steps kept in the
|
|
15671
|
+
* hub's `actions` record kind) or declared by an addon through the
|
|
15672
|
+
* `action-source` collection (a Home Assistant script, a scene …). The one
|
|
15673
|
+
* surface the UI and automations talk to is the `actions` cap; it keeps no
|
|
15674
|
+
* catalog of its own (D3) — every `list` asks the providers live.
|
|
15675
|
+
*
|
|
15676
|
+
* This file is the data half: the entry schema, the variables an entry may
|
|
15677
|
+
* declare, and the pure resolution of the values a run was given. It holds no
|
|
15678
|
+
* runtime.
|
|
15679
|
+
*/
|
|
15680
|
+
/** What a variable's value is. `select` takes one of `options`. */
|
|
15681
|
+
var ActionVariableTypeSchema = _enum([
|
|
15682
|
+
"string",
|
|
15683
|
+
"number",
|
|
15684
|
+
"boolean",
|
|
15685
|
+
"select"
|
|
15686
|
+
]);
|
|
15687
|
+
var ACTION_VARIABLE_NAME_RE = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
15688
|
+
var ActionVariableValueSchema = union([
|
|
15689
|
+
string(),
|
|
15690
|
+
number(),
|
|
15691
|
+
boolean()
|
|
15692
|
+
]);
|
|
15693
|
+
/**
|
|
15694
|
+
* One declared variable. Steps reference it as `{ $var: 'name' }` (the whole
|
|
15695
|
+
* value) or `{{vars.name}}` (inside a string) in their args.
|
|
15696
|
+
*/
|
|
15697
|
+
var ActionVariableSchema = object({
|
|
15698
|
+
name: string().regex(ACTION_VARIABLE_NAME_RE),
|
|
15699
|
+
label: string().min(1).max(120).optional(),
|
|
15700
|
+
type: ActionVariableTypeSchema,
|
|
15701
|
+
required: boolean().optional(),
|
|
15702
|
+
default: ActionVariableValueSchema.optional(),
|
|
15703
|
+
/** The allowed values of a `select`. */
|
|
15704
|
+
options: array(string().min(1)).min(1).optional()
|
|
15705
|
+
}).superRefine((v, ctx) => {
|
|
15706
|
+
if (v.type === "select" && v.options === void 0) ctx.addIssue({
|
|
15707
|
+
code: "custom",
|
|
15708
|
+
message: "a select variable needs options",
|
|
15709
|
+
path: ["options"]
|
|
15710
|
+
});
|
|
15711
|
+
if (v.default !== void 0 && variableValueError(v, v.default) !== null) ctx.addIssue({
|
|
15712
|
+
code: "custom",
|
|
15713
|
+
message: variableValueError(v, v.default) ?? "invalid default",
|
|
15714
|
+
path: ["default"]
|
|
15715
|
+
});
|
|
15716
|
+
});
|
|
15717
|
+
/** Why `value` is not a legal value for the variable, or null when it is. */
|
|
15718
|
+
function variableValueError(variable, value) {
|
|
15719
|
+
switch (variable.type) {
|
|
15720
|
+
case "string": return typeof value === "string" ? null : `variable "${variable.name}" must be a string`;
|
|
15721
|
+
case "number": return typeof value === "number" && Number.isFinite(value) ? null : `variable "${variable.name}" must be a number`;
|
|
15722
|
+
case "boolean": return typeof value === "boolean" ? null : `variable "${variable.name}" must be true or false`;
|
|
15723
|
+
case "select": return typeof value === "string" && (variable.options ?? []).includes(value) ? null : `variable "${variable.name}" must be one of ${(variable.options ?? []).join(", ")}`;
|
|
15724
|
+
}
|
|
15725
|
+
}
|
|
15726
|
+
var ActionSourceKindSchema = _enum(["internal", "addon"]);
|
|
15727
|
+
function isInternalActionId(actionId) {
|
|
15728
|
+
return actionId.startsWith("internal:") && actionId.length > 9;
|
|
15729
|
+
}
|
|
15730
|
+
/** The addon behind a `<addonId>:<localId>` id, or null for anything else (internal included). */
|
|
15731
|
+
function addonIdOfActionId(actionId) {
|
|
15732
|
+
if (isInternalActionId(actionId)) return null;
|
|
15733
|
+
const at = actionId.indexOf(":");
|
|
15734
|
+
return at > 0 && at < actionId.length - 1 ? actionId.slice(0, at) : null;
|
|
15735
|
+
}
|
|
15736
|
+
var ActionStatusSchema = object({
|
|
15737
|
+
isRunning: boolean(),
|
|
15738
|
+
/** Ms epoch the latest run STARTED; null when it never ran. */
|
|
15739
|
+
lastRunAt: number().nullable(),
|
|
15740
|
+
/** The latest run's failure; null on success or when it never ran. */
|
|
15741
|
+
lastError: string().nullable()
|
|
15742
|
+
});
|
|
15743
|
+
var ActionEntrySchema = object({
|
|
15744
|
+
/** `internal:<uuid>` or `<addonId>:<localId>`. */
|
|
15745
|
+
id: string().min(3),
|
|
15746
|
+
name: string().min(1).max(120),
|
|
15747
|
+
/** The addon that declared it; `core-blocks` for an internal one. */
|
|
15748
|
+
addonId: string().min(1),
|
|
15749
|
+
source: ActionSourceKindSchema,
|
|
15750
|
+
/** An addon-declared entry is edited where it was declared. */
|
|
15751
|
+
readOnly: boolean(),
|
|
15752
|
+
/** Internal only: cap and wait steps. No action-in-action, so no cycles. */
|
|
15753
|
+
steps: array(ActionStepSchema).min(1).max(50).optional(),
|
|
15754
|
+
variables: array(ActionVariableSchema).max(20).optional(),
|
|
15755
|
+
status: ActionStatusSchema
|
|
15756
|
+
}).superRefine((entry, ctx) => {
|
|
15757
|
+
if (entry.source === "internal") {
|
|
15758
|
+
if (!isInternalActionId(entry.id)) ctx.addIssue({
|
|
15759
|
+
code: "custom",
|
|
15760
|
+
message: "an internal action id is internal:<uuid>",
|
|
15761
|
+
path: ["id"]
|
|
15762
|
+
});
|
|
15763
|
+
return;
|
|
15764
|
+
}
|
|
15765
|
+
if (entry.steps !== void 0) ctx.addIssue({
|
|
15766
|
+
code: "custom",
|
|
15767
|
+
message: "only an internal action carries steps",
|
|
15768
|
+
path: ["steps"]
|
|
15769
|
+
});
|
|
15770
|
+
if (!entry.readOnly) ctx.addIssue({
|
|
15771
|
+
code: "custom",
|
|
15772
|
+
message: "an addon action is read-only here",
|
|
15773
|
+
path: ["readOnly"]
|
|
15774
|
+
});
|
|
15775
|
+
if (addonIdOfActionId(entry.id) === null) ctx.addIssue({
|
|
15776
|
+
code: "custom",
|
|
15777
|
+
message: "an addon action id is <addonId>:<localId>",
|
|
15778
|
+
path: ["id"]
|
|
15779
|
+
});
|
|
15780
|
+
});
|
|
15781
|
+
/** What an operator writes for an internal action. */
|
|
15782
|
+
var ActionInputSchema = object({
|
|
15783
|
+
name: string().min(1).max(120),
|
|
15784
|
+
steps: array(ActionStepSchema).min(1).max(50),
|
|
15785
|
+
variables: array(ActionVariableSchema).max(20).optional()
|
|
15786
|
+
});
|
|
15787
|
+
/** Who started a run. Absent = the operator pressed it. */
|
|
15788
|
+
var ActionRunOriginSchema = object({
|
|
15789
|
+
/** The automation block whose step started it. */
|
|
15790
|
+
blockId: string().min(1).optional() });
|
|
15791
|
+
/** `started` = the caller did not ask to wait. */
|
|
15792
|
+
var ActionRunOutcomeSchema = union([AutomationRunOutcomeSchema, literal("started")]);
|
|
15793
|
+
var ActionRunResultSchema = object({
|
|
15794
|
+
runId: string().min(1),
|
|
15795
|
+
outcome: ActionRunOutcomeSchema,
|
|
15796
|
+
/** Why it did not run, or what failed. */
|
|
15797
|
+
message: string().optional()
|
|
15798
|
+
});
|
|
15799
|
+
_enum([
|
|
15800
|
+
"not-found",
|
|
15801
|
+
"read-only",
|
|
15802
|
+
"invalid-variables",
|
|
15803
|
+
"invalid-steps",
|
|
15804
|
+
"not-linked",
|
|
15805
|
+
"busy"
|
|
15806
|
+
]);
|
|
15807
|
+
object({
|
|
15808
|
+
actionId: string(),
|
|
15809
|
+
runId: string(),
|
|
15810
|
+
isRunning: boolean(),
|
|
15811
|
+
/** Set when the run ended. */
|
|
15812
|
+
outcome: AutomationRunOutcomeSchema.optional(),
|
|
15813
|
+
lastRunAt: number().nullable(),
|
|
15814
|
+
lastError: string().nullable()
|
|
15427
15815
|
});
|
|
15428
15816
|
/**
|
|
15429
15817
|
* `addon-pages` — system-scoped singleton aggregator cap. Public-facing
|
|
@@ -18967,7 +19355,18 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
|
|
|
18967
19355
|
kind: "mutation",
|
|
18968
19356
|
auth: "admin",
|
|
18969
19357
|
access: "view"
|
|
18970
|
-
})
|
|
19358
|
+
}), method(object({
|
|
19359
|
+
blockId: string().min(1),
|
|
19360
|
+
trace: AutomationRunTraceSchema.optional(),
|
|
19361
|
+
runStartedAt: number().optional(),
|
|
19362
|
+
keepTraces: number().int().min(1).max(100).optional()
|
|
19363
|
+
}), _void(), {
|
|
19364
|
+
kind: "mutation",
|
|
19365
|
+
auth: "admin"
|
|
19366
|
+
}), method(object({ blockId: string().min(1) }), AutomationStateDocSchema, { auth: "admin" }), method(object({ blockId: string().min(1) }), object({
|
|
19367
|
+
traces: array(AutomationRunTraceSchema),
|
|
19368
|
+
lastError: string().nullable()
|
|
19369
|
+
}), { auth: "admin" });
|
|
18971
19370
|
/**
|
|
18972
19371
|
* `custom-model-registry` — collection cap exposing operator-registered
|
|
18973
19372
|
* custom detection models. Each provider (today: `addon-model-studio`)
|
|
@@ -44060,51 +44459,6 @@ method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSche
|
|
|
44060
44459
|
kind: "mutation",
|
|
44061
44460
|
auth: "admin"
|
|
44062
44461
|
});
|
|
44063
|
-
new Set([
|
|
44064
|
-
{
|
|
44065
|
-
id: "person",
|
|
44066
|
-
name: "Person"
|
|
44067
|
-
},
|
|
44068
|
-
{
|
|
44069
|
-
id: "vehicle",
|
|
44070
|
-
name: "Vehicle"
|
|
44071
|
-
},
|
|
44072
|
-
{
|
|
44073
|
-
id: "animal",
|
|
44074
|
-
name: "Animal"
|
|
44075
|
-
},
|
|
44076
|
-
{
|
|
44077
|
-
id: "package",
|
|
44078
|
-
name: "Package"
|
|
44079
|
-
}
|
|
44080
|
-
].map((l) => l.id));
|
|
44081
|
-
var COCO_TO_MACRO = {
|
|
44082
|
-
mapping: {
|
|
44083
|
-
person: "person",
|
|
44084
|
-
bicycle: "vehicle",
|
|
44085
|
-
car: "vehicle",
|
|
44086
|
-
motorcycle: "vehicle",
|
|
44087
|
-
airplane: "vehicle",
|
|
44088
|
-
bus: "vehicle",
|
|
44089
|
-
train: "vehicle",
|
|
44090
|
-
truck: "vehicle",
|
|
44091
|
-
boat: "vehicle",
|
|
44092
|
-
bird: "animal",
|
|
44093
|
-
cat: "animal",
|
|
44094
|
-
dog: "animal",
|
|
44095
|
-
horse: "animal",
|
|
44096
|
-
sheep: "animal",
|
|
44097
|
-
cow: "animal",
|
|
44098
|
-
elephant: "animal",
|
|
44099
|
-
bear: "animal",
|
|
44100
|
-
zebra: "animal",
|
|
44101
|
-
giraffe: "animal",
|
|
44102
|
-
suitcase: "package",
|
|
44103
|
-
backpack: "package",
|
|
44104
|
-
handbag: "package"
|
|
44105
|
-
},
|
|
44106
|
-
preserveOriginal: false
|
|
44107
|
-
};
|
|
44108
44462
|
var AUDIO_MACRO_LABELS = [
|
|
44109
44463
|
{
|
|
44110
44464
|
id: "speech",
|
|
@@ -56653,6 +57007,84 @@ DeviceType.Camera, method(object({ deviceId: number() }), AudioMetricsSnapshotSc
|
|
|
56653
57007
|
* would produce more than `maxPoints` samples. */
|
|
56654
57008
|
sampleEveryMs: number().int().positive().optional()
|
|
56655
57009
|
}), AudioMetricsHistorySchema);
|
|
57010
|
+
method(object({}), array(ActionEntrySchema), { auth: "admin" }), method(object({
|
|
57011
|
+
actionId: string().min(1),
|
|
57012
|
+
variables: record(string(), ActionVariableValueSchema).optional()
|
|
57013
|
+
}), _void(), {
|
|
57014
|
+
kind: "mutation",
|
|
57015
|
+
auth: "admin"
|
|
57016
|
+
}), method(object({ actionId: string().min(1) }), _void(), {
|
|
57017
|
+
kind: "mutation",
|
|
57018
|
+
auth: "admin"
|
|
57019
|
+
});
|
|
57020
|
+
/**
|
|
57021
|
+
* actions — the ONE surface for runnable actions, for the UI and for
|
|
57022
|
+
* automations. Provided by the core-blocks builtin on the hub.
|
|
57023
|
+
*
|
|
57024
|
+
* An action is a LIST ENTRY, not a device (D883): either internal (cap and wait
|
|
57025
|
+
* steps, kept in the hub's `actions` record kind) or declared by an addon over
|
|
57026
|
+
* `action-source`. `list` asks every `action-source` provider LIVE and overlays
|
|
57027
|
+
* the run status from the hub's `runs` ledger; there is no catalog here to
|
|
57028
|
+
* drift (D3).
|
|
57029
|
+
*
|
|
57030
|
+
* **Permissions follow the camera, as linked devices do.** An action is linked
|
|
57031
|
+
* to cameras by the operator (`setLinks`, D356: nothing links itself). A
|
|
57032
|
+
* non-admin may `get` / `run` an action only through a camera they may see that
|
|
57033
|
+
* links it: they name the camera (`deviceId`, a top-level field so the scope
|
|
57034
|
+
* gate sees it) and the provider refuses an action that camera does not link.
|
|
57035
|
+
* An admin, and an in-process caller (an automation block), may run any action.
|
|
57036
|
+
* Every refusal is typed (`[not-linked] …`) and logged.
|
|
57037
|
+
*
|
|
57038
|
+
* A second `run` of an action that is already running is REFUSED — traced and
|
|
57039
|
+
* logged — never queued.
|
|
57040
|
+
*/
|
|
57041
|
+
var ActionIdInput = object({ actionId: string().min(1) });
|
|
57042
|
+
var ActionLinksSchema = object({
|
|
57043
|
+
deviceId: number().int().nonnegative(),
|
|
57044
|
+
actionIds: array(string().min(1)).max(100)
|
|
57045
|
+
});
|
|
57046
|
+
method(object({}), array(ActionEntrySchema), { auth: "admin" }), method(object({
|
|
57047
|
+
actionId: string().min(1),
|
|
57048
|
+
deviceId: number().int().nonnegative().optional()
|
|
57049
|
+
}), object({ action: ActionEntrySchema.nullable() }), {
|
|
57050
|
+
role: "viewer",
|
|
57051
|
+
auth: "protected",
|
|
57052
|
+
kind: "query",
|
|
57053
|
+
caller: "required"
|
|
57054
|
+
}), method(object({
|
|
57055
|
+
actionId: string().min(1),
|
|
57056
|
+
variables: record(string(), ActionVariableValueSchema).optional(),
|
|
57057
|
+
wait: boolean().optional(),
|
|
57058
|
+
origin: ActionRunOriginSchema.optional(),
|
|
57059
|
+
deviceId: number().int().nonnegative().optional()
|
|
57060
|
+
}), ActionRunResultSchema, {
|
|
57061
|
+
role: "viewer",
|
|
57062
|
+
auth: "protected",
|
|
57063
|
+
kind: "mutation",
|
|
57064
|
+
caller: "required"
|
|
57065
|
+
}), method(ActionIdInput, _void(), {
|
|
57066
|
+
kind: "mutation",
|
|
57067
|
+
auth: "admin"
|
|
57068
|
+
}), method(ActionIdInput, object({ traces: array(AutomationRunTraceSchema) }), { auth: "admin" }), method(object({ action: ActionInputSchema }), object({ action: ActionEntrySchema }), {
|
|
57069
|
+
kind: "mutation",
|
|
57070
|
+
auth: "admin"
|
|
57071
|
+
}), method(object({
|
|
57072
|
+
actionId: string().min(1),
|
|
57073
|
+
action: ActionInputSchema.partial()
|
|
57074
|
+
}), object({ action: ActionEntrySchema }), {
|
|
57075
|
+
kind: "mutation",
|
|
57076
|
+
auth: "admin"
|
|
57077
|
+
}), method(ActionIdInput, _void(), {
|
|
57078
|
+
kind: "mutation",
|
|
57079
|
+
auth: "admin"
|
|
57080
|
+
}), method(object({ deviceId: number().int().nonnegative() }), array(ActionEntrySchema), {
|
|
57081
|
+
role: "viewer",
|
|
57082
|
+
auth: "protected",
|
|
57083
|
+
kind: "query"
|
|
57084
|
+
}), method(object({ deviceId: number().int().nonnegative() }), ActionLinksSchema, { auth: "admin" }), method(ActionLinksSchema, ActionLinksSchema, {
|
|
57085
|
+
kind: "mutation",
|
|
57086
|
+
auth: "admin"
|
|
57087
|
+
});
|
|
56656
57088
|
object({
|
|
56657
57089
|
/** Whether the automation is currently enabled. Disabled automations
|
|
56658
57090
|
* ignore their trigger block — manual `trigger` still works. */
|
|
@@ -65668,6 +66100,104 @@ Object.freeze({
|
|
|
65668
66100
|
access: "create",
|
|
65669
66101
|
role: "admin"
|
|
65670
66102
|
},
|
|
66103
|
+
"actions.create": {
|
|
66104
|
+
capName: "actions",
|
|
66105
|
+
capScope: "system",
|
|
66106
|
+
addonId: null,
|
|
66107
|
+
access: "create",
|
|
66108
|
+
role: "admin"
|
|
66109
|
+
},
|
|
66110
|
+
"actions.delete": {
|
|
66111
|
+
capName: "actions",
|
|
66112
|
+
capScope: "system",
|
|
66113
|
+
addonId: null,
|
|
66114
|
+
access: "delete",
|
|
66115
|
+
role: "admin"
|
|
66116
|
+
},
|
|
66117
|
+
"actions.get": {
|
|
66118
|
+
capName: "actions",
|
|
66119
|
+
capScope: "system",
|
|
66120
|
+
addonId: null,
|
|
66121
|
+
access: "view",
|
|
66122
|
+
role: "viewer"
|
|
66123
|
+
},
|
|
66124
|
+
"actions.getLinks": {
|
|
66125
|
+
capName: "actions",
|
|
66126
|
+
capScope: "system",
|
|
66127
|
+
addonId: null,
|
|
66128
|
+
access: "view",
|
|
66129
|
+
role: "admin"
|
|
66130
|
+
},
|
|
66131
|
+
"actions.getTraces": {
|
|
66132
|
+
capName: "actions",
|
|
66133
|
+
capScope: "system",
|
|
66134
|
+
addonId: null,
|
|
66135
|
+
access: "view",
|
|
66136
|
+
role: "admin"
|
|
66137
|
+
},
|
|
66138
|
+
"actions.list": {
|
|
66139
|
+
capName: "actions",
|
|
66140
|
+
capScope: "system",
|
|
66141
|
+
addonId: null,
|
|
66142
|
+
access: "view",
|
|
66143
|
+
role: "admin"
|
|
66144
|
+
},
|
|
66145
|
+
"actions.listForCamera": {
|
|
66146
|
+
capName: "actions",
|
|
66147
|
+
capScope: "system",
|
|
66148
|
+
addonId: null,
|
|
66149
|
+
access: "view",
|
|
66150
|
+
role: "viewer"
|
|
66151
|
+
},
|
|
66152
|
+
"actions.run": {
|
|
66153
|
+
capName: "actions",
|
|
66154
|
+
capScope: "system",
|
|
66155
|
+
addonId: null,
|
|
66156
|
+
access: "create",
|
|
66157
|
+
role: "viewer"
|
|
66158
|
+
},
|
|
66159
|
+
"actions.setLinks": {
|
|
66160
|
+
capName: "actions",
|
|
66161
|
+
capScope: "system",
|
|
66162
|
+
addonId: null,
|
|
66163
|
+
access: "create",
|
|
66164
|
+
role: "admin"
|
|
66165
|
+
},
|
|
66166
|
+
"actions.stop": {
|
|
66167
|
+
capName: "actions",
|
|
66168
|
+
capScope: "system",
|
|
66169
|
+
addonId: null,
|
|
66170
|
+
access: "create",
|
|
66171
|
+
role: "admin"
|
|
66172
|
+
},
|
|
66173
|
+
"actions.update": {
|
|
66174
|
+
capName: "actions",
|
|
66175
|
+
capScope: "system",
|
|
66176
|
+
addonId: null,
|
|
66177
|
+
access: "create",
|
|
66178
|
+
role: "admin"
|
|
66179
|
+
},
|
|
66180
|
+
"actionSource.listActions": {
|
|
66181
|
+
capName: "action-source",
|
|
66182
|
+
capScope: "system",
|
|
66183
|
+
addonId: null,
|
|
66184
|
+
access: "view",
|
|
66185
|
+
role: "admin"
|
|
66186
|
+
},
|
|
66187
|
+
"actionSource.runAction": {
|
|
66188
|
+
capName: "action-source",
|
|
66189
|
+
capScope: "system",
|
|
66190
|
+
addonId: null,
|
|
66191
|
+
access: "create",
|
|
66192
|
+
role: "admin"
|
|
66193
|
+
},
|
|
66194
|
+
"actionSource.stopAction": {
|
|
66195
|
+
capName: "action-source",
|
|
66196
|
+
capScope: "system",
|
|
66197
|
+
addonId: null,
|
|
66198
|
+
access: "create",
|
|
66199
|
+
role: "admin"
|
|
66200
|
+
},
|
|
65671
66201
|
"addonPages.listPages": {
|
|
65672
66202
|
capName: "addon-pages",
|
|
65673
66203
|
capScope: "system",
|
|
@@ -66949,6 +67479,13 @@ Object.freeze({
|
|
|
66949
67479
|
access: "view",
|
|
66950
67480
|
role: "admin"
|
|
66951
67481
|
},
|
|
67482
|
+
"coreBlocks.getAutomationRunState": {
|
|
67483
|
+
capName: "core-blocks",
|
|
67484
|
+
capScope: "system",
|
|
67485
|
+
addonId: null,
|
|
67486
|
+
access: "view",
|
|
67487
|
+
role: "admin"
|
|
67488
|
+
},
|
|
66952
67489
|
"coreBlocks.getBlockSettings": {
|
|
66953
67490
|
capName: "core-blocks",
|
|
66954
67491
|
capScope: "system",
|
|
@@ -66970,6 +67507,13 @@ Object.freeze({
|
|
|
66970
67507
|
access: "view",
|
|
66971
67508
|
role: "admin"
|
|
66972
67509
|
},
|
|
67510
|
+
"coreBlocks.getTraces": {
|
|
67511
|
+
capName: "core-blocks",
|
|
67512
|
+
capScope: "system",
|
|
67513
|
+
addonId: null,
|
|
67514
|
+
access: "view",
|
|
67515
|
+
role: "admin"
|
|
67516
|
+
},
|
|
66973
67517
|
"coreBlocks.getTypeDefs": {
|
|
66974
67518
|
capName: "core-blocks",
|
|
66975
67519
|
capScope: "system",
|
|
@@ -67005,6 +67549,13 @@ Object.freeze({
|
|
|
67005
67549
|
access: "create",
|
|
67006
67550
|
role: "admin"
|
|
67007
67551
|
},
|
|
67552
|
+
"coreBlocks.reportAutomationRun": {
|
|
67553
|
+
capName: "core-blocks",
|
|
67554
|
+
capScope: "system",
|
|
67555
|
+
addonId: null,
|
|
67556
|
+
access: "create",
|
|
67557
|
+
role: "admin"
|
|
67558
|
+
},
|
|
67008
67559
|
"coreBlocks.restart": {
|
|
67009
67560
|
capName: "core-blocks",
|
|
67010
67561
|
capScope: "system",
|
|
@@ -79159,6 +79710,8 @@ var ML = "model and training machinery — no device action";
|
|
|
79159
79710
|
var INTERNAL = "internal plumbing between addons — never operator-facing";
|
|
79160
79711
|
/** Every system-scoped cap, with why it is not a device's vocabulary. */
|
|
79161
79712
|
var SYSTEM_CAP_VOCABULARY = {
|
|
79713
|
+
"action-source": system(INTERNAL),
|
|
79714
|
+
actions: system("declared actions — run from the Actions page and from the cameras that link them"),
|
|
79162
79715
|
"addon-pages": system(UI_PLUMBING),
|
|
79163
79716
|
"addon-pages-source": system(UI_PLUMBING),
|
|
79164
79717
|
"addon-routes": system(UI_PLUMBING),
|
|
@@ -79355,6 +79908,31 @@ Object.freeze({
|
|
|
79355
79908
|
form: "single",
|
|
79356
79909
|
optional: false
|
|
79357
79910
|
}],
|
|
79911
|
+
"actions.get": [{
|
|
79912
|
+
name: "deviceId",
|
|
79913
|
+
form: "single",
|
|
79914
|
+
optional: true
|
|
79915
|
+
}],
|
|
79916
|
+
"actions.getLinks": [{
|
|
79917
|
+
name: "deviceId",
|
|
79918
|
+
form: "single",
|
|
79919
|
+
optional: false
|
|
79920
|
+
}],
|
|
79921
|
+
"actions.listForCamera": [{
|
|
79922
|
+
name: "deviceId",
|
|
79923
|
+
form: "single",
|
|
79924
|
+
optional: false
|
|
79925
|
+
}],
|
|
79926
|
+
"actions.run": [{
|
|
79927
|
+
name: "deviceId",
|
|
79928
|
+
form: "single",
|
|
79929
|
+
optional: true
|
|
79930
|
+
}],
|
|
79931
|
+
"actions.setLinks": [{
|
|
79932
|
+
name: "deviceId",
|
|
79933
|
+
form: "single",
|
|
79934
|
+
optional: false
|
|
79935
|
+
}],
|
|
79358
79936
|
"addonSettings.getDeviceSettings": [{
|
|
79359
79937
|
name: "deviceId",
|
|
79360
79938
|
form: "single",
|
|
@@ -83457,7 +84035,7 @@ var AdminUIAddon = class extends BaseAddon {
|
|
|
83457
84035
|
capability: adminUiCapability,
|
|
83458
84036
|
provider: {
|
|
83459
84037
|
getStaticDir: async () => ({ staticDir: resolveAdminUiDistDir() }),
|
|
83460
|
-
getVersion: async () => ({ version: "1.2.
|
|
84038
|
+
getVersion: async () => ({ version: "1.2.496" })
|
|
83461
84039
|
}
|
|
83462
84040
|
}];
|
|
83463
84041
|
}
|