@camstack/addon-ai 0.4.110 → 0.4.112

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/dist/addon.js CHANGED
@@ -13444,6 +13444,107 @@ var ExposeInputSchema = object({
13444
13444
  });
13445
13445
  var UnexposeInputSchema = object({ deviceId: string() });
13446
13446
  method(_void(), DeviceExportStatusSchema), method(_void(), array(DeviceKindSchema)), method(_void(), array(ExposedDeviceSchema)), method(ExposeInputSchema, _void(), { kind: "mutation" }), method(UnexposeInputSchema, _void(), { kind: "mutation" });
13447
+ /** Wire/storage schema for one icon id. */
13448
+ var LocationIconIdSchema = _enum([
13449
+ "map-pin",
13450
+ "house",
13451
+ "door-open",
13452
+ "sofa",
13453
+ "utensils",
13454
+ "bed-double",
13455
+ "bath",
13456
+ "briefcase",
13457
+ "car",
13458
+ "circle-parking",
13459
+ "route",
13460
+ "trees",
13461
+ "umbrella",
13462
+ "waves-ladder",
13463
+ "fence",
13464
+ "package",
13465
+ "warehouse",
13466
+ "store",
13467
+ "sun",
13468
+ "radar"
13469
+ ]);
13470
+ /**
13471
+ * One (location, icon) assignment as it travels.
13472
+ *
13473
+ * `locationKey` is ALWAYS {@link locationIconKey} of the label — never the
13474
+ * operator's casing. The registry matches labels trimmed + case-insensitively
13475
+ * everywhere (`addLocation`, `removeLocation`, `renameLocation`), and a
13476
+ * case-only rename (`cucina` → `Cucina`) is a real edit this repo supports; a
13477
+ * map keyed on the displayed casing would orphan its entry on exactly that
13478
+ * edit. Consumers join by keying their own label through `locationIconKey`.
13479
+ */
13480
+ var LocationIconAssignmentSchema = object({
13481
+ locationKey: string(),
13482
+ icon: LocationIconIdSchema
13483
+ });
13484
+ /**
13485
+ * One (location, description) assignment as it travels.
13486
+ *
13487
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13488
+ * reason: this lived for a while in the post-analysis addon's own settings,
13489
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13490
+ * the Locations page carried the icon and silently orphaned the description —
13491
+ * two authorities for one thing, joined by two different rules. Now both hang
13492
+ * off the location itself, on `locationIconKey`.
13493
+ */
13494
+ var LocationDescriptionAssignmentSchema = object({
13495
+ locationKey: string(),
13496
+ description: string()
13497
+ });
13498
+ /**
13499
+ * A SITE ZONE — a named part of the property that several locations belong to.
13500
+ *
13501
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13502
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13503
+ * one zone, so a camera's zone is derived and never stored on the device: the
13504
+ * whole point of this entity is that grouping rooms touches no device row.
13505
+ *
13506
+ * ## Why not `zone`
13507
+ *
13508
+ * Because `zone` is already the most loaded word in this product: 612 source
13509
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13510
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13511
+ * set of rooms — and a reader who confuses them will look for a camera's
13512
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13513
+ * word by calling the drawn one what it actually is: a detection zone.
13514
+ *
13515
+ * ## The key
13516
+ *
13517
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13518
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13519
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13520
+ * silently-dropped location description.
13521
+ *
13522
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13523
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13524
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13525
+ */
13526
+ /**
13527
+ * One zone as it travels: its key, the label the operator typed, its icon and
13528
+ * the locations inside it.
13529
+ *
13530
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13531
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13532
+ * here, rather than left to a second call, because every consumer wants both
13533
+ * at once and a viewer that asked twice could render a zone whose membership
13534
+ * it has not fetched yet.
13535
+ *
13536
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13537
+ * of those two is a choice, and a picker has to draw them differently.
13538
+ */
13539
+ var SiteZoneSchema = object({
13540
+ zoneKey: string(),
13541
+ label: string(),
13542
+ icon: LocationIconIdSchema.nullable(),
13543
+ /** Folded location keys, sorted. A location listed here need not be
13544
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13545
+ * the ones that most want grouping. */
13546
+ locationKeys: array(string())
13547
+ });
13447
13548
  var ProviderStatusSchema = object({
13448
13549
  connected: boolean(),
13449
13550
  deviceCount: number$1(),
@@ -13955,6 +14056,39 @@ method(object({
13955
14056
  }), object({ moved: number$1() }), {
13956
14057
  kind: "mutation",
13957
14058
  auth: "admin"
14059
+ }), method(_void(), array(LocationIconAssignmentSchema)), method(object({
14060
+ location: string(),
14061
+ icon: LocationIconIdSchema.nullable()
14062
+ }), _void(), {
14063
+ kind: "mutation",
14064
+ auth: "admin"
14065
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14066
+ location: string(),
14067
+ description: string().max(400).nullable()
14068
+ }), _void(), {
14069
+ kind: "mutation",
14070
+ auth: "admin"
14071
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14072
+ name: string(),
14073
+ icon: LocationIconIdSchema.nullable().optional()
14074
+ }), _void(), {
14075
+ kind: "mutation",
14076
+ auth: "admin"
14077
+ }), method(object({ name: string() }), _void(), {
14078
+ kind: "mutation",
14079
+ auth: "admin"
14080
+ }), method(object({
14081
+ from: string(),
14082
+ to: string()
14083
+ }), _void(), {
14084
+ kind: "mutation",
14085
+ auth: "admin"
14086
+ }), method(object({
14087
+ location: string(),
14088
+ zone: string().nullable()
14089
+ }), _void(), {
14090
+ kind: "mutation",
14091
+ auth: "admin"
13958
14092
  }), method(object({
13959
14093
  deviceId: number$1(),
13960
14094
  disabled: boolean()
@@ -32872,6 +33006,18 @@ Object.freeze({
32872
33006
  addonId: null,
32873
33007
  access: "view"
32874
33008
  },
33009
+ "deviceManager.listLocationDescriptions": {
33010
+ capName: "device-manager",
33011
+ capScope: "system",
33012
+ addonId: null,
33013
+ access: "view"
33014
+ },
33015
+ "deviceManager.listLocationIcons": {
33016
+ capName: "device-manager",
33017
+ capScope: "system",
33018
+ addonId: null,
33019
+ access: "view"
33020
+ },
32875
33021
  "deviceManager.listLocations": {
32876
33022
  capName: "device-manager",
32877
33023
  capScope: "system",
@@ -32884,6 +33030,12 @@ Object.freeze({
32884
33030
  addonId: null,
32885
33031
  access: "view"
32886
33032
  },
33033
+ "deviceManager.listSiteZones": {
33034
+ capName: "device-manager",
33035
+ capScope: "system",
33036
+ addonId: null,
33037
+ access: "view"
33038
+ },
32887
33039
  "deviceManager.listWrappersForCap": {
32888
33040
  capName: "device-manager",
32889
33041
  capScope: "system",
@@ -32968,12 +33120,24 @@ Object.freeze({
32968
33120
  addonId: null,
32969
33121
  access: "delete"
32970
33122
  },
33123
+ "deviceManager.removeSiteZone": {
33124
+ capName: "device-manager",
33125
+ capScope: "system",
33126
+ addonId: null,
33127
+ access: "delete"
33128
+ },
32971
33129
  "deviceManager.renameLocation": {
32972
33130
  capName: "device-manager",
32973
33131
  capScope: "system",
32974
33132
  addonId: null,
32975
33133
  access: "create"
32976
33134
  },
33135
+ "deviceManager.renameSiteZone": {
33136
+ capName: "device-manager",
33137
+ capScope: "system",
33138
+ addonId: null,
33139
+ access: "create"
33140
+ },
32977
33141
  "deviceManager.runDeviceAction": {
32978
33142
  capName: "device-manager",
32979
33143
  capScope: "system",
@@ -33016,6 +33180,24 @@ Object.freeze({
33016
33180
  addonId: null,
33017
33181
  access: "create"
33018
33182
  },
33183
+ "deviceManager.setLocationDescription": {
33184
+ capName: "device-manager",
33185
+ capScope: "system",
33186
+ addonId: null,
33187
+ access: "create"
33188
+ },
33189
+ "deviceManager.setLocationIcon": {
33190
+ capName: "device-manager",
33191
+ capScope: "system",
33192
+ addonId: null,
33193
+ access: "create"
33194
+ },
33195
+ "deviceManager.setLocationZone": {
33196
+ capName: "device-manager",
33197
+ capScope: "system",
33198
+ addonId: null,
33199
+ access: "create"
33200
+ },
33019
33201
  "deviceManager.setMetadata": {
33020
33202
  capName: "device-manager",
33021
33203
  capScope: "system",
@@ -33046,6 +33228,12 @@ Object.freeze({
33046
33228
  addonId: null,
33047
33229
  access: "create"
33048
33230
  },
33231
+ "deviceManager.setSiteZone": {
33232
+ capName: "device-manager",
33233
+ capScope: "system",
33234
+ addonId: null,
33235
+ access: "create"
33236
+ },
33049
33237
  "deviceManager.setStreamProfileMap": {
33050
33238
  capName: "device-manager",
33051
33239
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -13471,6 +13471,107 @@ var ExposeInputSchema = object({
13471
13471
  });
13472
13472
  var UnexposeInputSchema = object({ deviceId: string() });
13473
13473
  method(_void(), DeviceExportStatusSchema), method(_void(), array(DeviceKindSchema)), method(_void(), array(ExposedDeviceSchema)), method(ExposeInputSchema, _void(), { kind: "mutation" }), method(UnexposeInputSchema, _void(), { kind: "mutation" });
13474
+ /** Wire/storage schema for one icon id. */
13475
+ var LocationIconIdSchema = _enum([
13476
+ "map-pin",
13477
+ "house",
13478
+ "door-open",
13479
+ "sofa",
13480
+ "utensils",
13481
+ "bed-double",
13482
+ "bath",
13483
+ "briefcase",
13484
+ "car",
13485
+ "circle-parking",
13486
+ "route",
13487
+ "trees",
13488
+ "umbrella",
13489
+ "waves-ladder",
13490
+ "fence",
13491
+ "package",
13492
+ "warehouse",
13493
+ "store",
13494
+ "sun",
13495
+ "radar"
13496
+ ]);
13497
+ /**
13498
+ * One (location, icon) assignment as it travels.
13499
+ *
13500
+ * `locationKey` is ALWAYS {@link locationIconKey} of the label — never the
13501
+ * operator's casing. The registry matches labels trimmed + case-insensitively
13502
+ * everywhere (`addLocation`, `removeLocation`, `renameLocation`), and a
13503
+ * case-only rename (`cucina` → `Cucina`) is a real edit this repo supports; a
13504
+ * map keyed on the displayed casing would orphan its entry on exactly that
13505
+ * edit. Consumers join by keying their own label through `locationIconKey`.
13506
+ */
13507
+ var LocationIconAssignmentSchema = object({
13508
+ locationKey: string(),
13509
+ icon: LocationIconIdSchema
13510
+ });
13511
+ /**
13512
+ * One (location, description) assignment as it travels.
13513
+ *
13514
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13515
+ * reason: this lived for a while in the post-analysis addon's own settings,
13516
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13517
+ * the Locations page carried the icon and silently orphaned the description —
13518
+ * two authorities for one thing, joined by two different rules. Now both hang
13519
+ * off the location itself, on `locationIconKey`.
13520
+ */
13521
+ var LocationDescriptionAssignmentSchema = object({
13522
+ locationKey: string(),
13523
+ description: string()
13524
+ });
13525
+ /**
13526
+ * A SITE ZONE — a named part of the property that several locations belong to.
13527
+ *
13528
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13529
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13530
+ * one zone, so a camera's zone is derived and never stored on the device: the
13531
+ * whole point of this entity is that grouping rooms touches no device row.
13532
+ *
13533
+ * ## Why not `zone`
13534
+ *
13535
+ * Because `zone` is already the most loaded word in this product: 612 source
13536
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13537
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13538
+ * set of rooms — and a reader who confuses them will look for a camera's
13539
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13540
+ * word by calling the drawn one what it actually is: a detection zone.
13541
+ *
13542
+ * ## The key
13543
+ *
13544
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13545
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13546
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13547
+ * silently-dropped location description.
13548
+ *
13549
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13550
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13551
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13552
+ */
13553
+ /**
13554
+ * One zone as it travels: its key, the label the operator typed, its icon and
13555
+ * the locations inside it.
13556
+ *
13557
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13558
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13559
+ * here, rather than left to a second call, because every consumer wants both
13560
+ * at once and a viewer that asked twice could render a zone whose membership
13561
+ * it has not fetched yet.
13562
+ *
13563
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13564
+ * of those two is a choice, and a picker has to draw them differently.
13565
+ */
13566
+ var SiteZoneSchema = object({
13567
+ zoneKey: string(),
13568
+ label: string(),
13569
+ icon: LocationIconIdSchema.nullable(),
13570
+ /** Folded location keys, sorted. A location listed here need not be
13571
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13572
+ * the ones that most want grouping. */
13573
+ locationKeys: array(string())
13574
+ });
13474
13575
  var ProviderStatusSchema = object({
13475
13576
  connected: boolean(),
13476
13577
  deviceCount: number$1(),
@@ -13982,6 +14083,39 @@ method(object({
13982
14083
  }), object({ moved: number$1() }), {
13983
14084
  kind: "mutation",
13984
14085
  auth: "admin"
14086
+ }), method(_void(), array(LocationIconAssignmentSchema)), method(object({
14087
+ location: string(),
14088
+ icon: LocationIconIdSchema.nullable()
14089
+ }), _void(), {
14090
+ kind: "mutation",
14091
+ auth: "admin"
14092
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14093
+ location: string(),
14094
+ description: string().max(400).nullable()
14095
+ }), _void(), {
14096
+ kind: "mutation",
14097
+ auth: "admin"
14098
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14099
+ name: string(),
14100
+ icon: LocationIconIdSchema.nullable().optional()
14101
+ }), _void(), {
14102
+ kind: "mutation",
14103
+ auth: "admin"
14104
+ }), method(object({ name: string() }), _void(), {
14105
+ kind: "mutation",
14106
+ auth: "admin"
14107
+ }), method(object({
14108
+ from: string(),
14109
+ to: string()
14110
+ }), _void(), {
14111
+ kind: "mutation",
14112
+ auth: "admin"
14113
+ }), method(object({
14114
+ location: string(),
14115
+ zone: string().nullable()
14116
+ }), _void(), {
14117
+ kind: "mutation",
14118
+ auth: "admin"
13985
14119
  }), method(object({
13986
14120
  deviceId: number$1(),
13987
14121
  disabled: boolean()
@@ -32899,6 +33033,18 @@ Object.freeze({
32899
33033
  addonId: null,
32900
33034
  access: "view"
32901
33035
  },
33036
+ "deviceManager.listLocationDescriptions": {
33037
+ capName: "device-manager",
33038
+ capScope: "system",
33039
+ addonId: null,
33040
+ access: "view"
33041
+ },
33042
+ "deviceManager.listLocationIcons": {
33043
+ capName: "device-manager",
33044
+ capScope: "system",
33045
+ addonId: null,
33046
+ access: "view"
33047
+ },
32902
33048
  "deviceManager.listLocations": {
32903
33049
  capName: "device-manager",
32904
33050
  capScope: "system",
@@ -32911,6 +33057,12 @@ Object.freeze({
32911
33057
  addonId: null,
32912
33058
  access: "view"
32913
33059
  },
33060
+ "deviceManager.listSiteZones": {
33061
+ capName: "device-manager",
33062
+ capScope: "system",
33063
+ addonId: null,
33064
+ access: "view"
33065
+ },
32914
33066
  "deviceManager.listWrappersForCap": {
32915
33067
  capName: "device-manager",
32916
33068
  capScope: "system",
@@ -32995,12 +33147,24 @@ Object.freeze({
32995
33147
  addonId: null,
32996
33148
  access: "delete"
32997
33149
  },
33150
+ "deviceManager.removeSiteZone": {
33151
+ capName: "device-manager",
33152
+ capScope: "system",
33153
+ addonId: null,
33154
+ access: "delete"
33155
+ },
32998
33156
  "deviceManager.renameLocation": {
32999
33157
  capName: "device-manager",
33000
33158
  capScope: "system",
33001
33159
  addonId: null,
33002
33160
  access: "create"
33003
33161
  },
33162
+ "deviceManager.renameSiteZone": {
33163
+ capName: "device-manager",
33164
+ capScope: "system",
33165
+ addonId: null,
33166
+ access: "create"
33167
+ },
33004
33168
  "deviceManager.runDeviceAction": {
33005
33169
  capName: "device-manager",
33006
33170
  capScope: "system",
@@ -33043,6 +33207,24 @@ Object.freeze({
33043
33207
  addonId: null,
33044
33208
  access: "create"
33045
33209
  },
33210
+ "deviceManager.setLocationDescription": {
33211
+ capName: "device-manager",
33212
+ capScope: "system",
33213
+ addonId: null,
33214
+ access: "create"
33215
+ },
33216
+ "deviceManager.setLocationIcon": {
33217
+ capName: "device-manager",
33218
+ capScope: "system",
33219
+ addonId: null,
33220
+ access: "create"
33221
+ },
33222
+ "deviceManager.setLocationZone": {
33223
+ capName: "device-manager",
33224
+ capScope: "system",
33225
+ addonId: null,
33226
+ access: "create"
33227
+ },
33046
33228
  "deviceManager.setMetadata": {
33047
33229
  capName: "device-manager",
33048
33230
  capScope: "system",
@@ -33073,6 +33255,12 @@ Object.freeze({
33073
33255
  addonId: null,
33074
33256
  access: "create"
33075
33257
  },
33258
+ "deviceManager.setSiteZone": {
33259
+ capName: "device-manager",
33260
+ capScope: "system",
33261
+ addonId: null,
33262
+ access: "create"
33263
+ },
33076
33264
  "deviceManager.setStreamProfileMap": {
33077
33265
  capName: "device-manager",
33078
33266
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-ai",
3
- "version": "0.4.110",
3
+ "version": "0.4.112",
4
4
  "description": "AI addon for CamStack — the `llm` collection provider (cloud, LAN, and camstack-managed local llama.cpp profiles) plus the per-node `llm-runtime` managed executor.",
5
5
  "keywords": [
6
6
  "camstack",