@camstack/addon-matter-broker 0.2.25 → 0.2.26

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 (3) hide show
  1. package/dist/addon.js +248 -16
  2. package/dist/addon.mjs +248 -16
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -8034,6 +8034,15 @@ var LabelDefinitionSchema = object({
8034
8034
  description: string$2().optional(),
8035
8035
  icon: string$2().optional()
8036
8036
  });
8037
+ var ClassMapDefinitionSchema = object({
8038
+ mapping: record(string$2(), _enum([
8039
+ "person",
8040
+ "vehicle",
8041
+ "animal",
8042
+ "package"
8043
+ ])),
8044
+ preserveOriginal: boolean()
8045
+ });
8037
8046
  var MODEL_FORMATS = [
8038
8047
  "onnx",
8039
8048
  "coreml",
@@ -8212,7 +8221,13 @@ var ModelCatalogEntrySchema = object({
8212
8221
  * `id` stays the source of truth for resolution/download/persistence; grouping
8213
8222
  * is a presentation overlay resolved back to an `id`.
8214
8223
  */
8215
- group: ModelVariantGroupSchema.optional()
8224
+ group: ModelVariantGroupSchema.optional(),
8225
+ /**
8226
+ * Per-MODEL class map override. Absent ⇒ the step's `StepDefinition.classMap`
8227
+ * applies (Frigate / COCO public catalog). Set on a custom model whose raw
8228
+ * labels already ARE the CamStack macros (Scrypted identity map).
8229
+ */
8230
+ classMap: ClassMapDefinitionSchema.optional()
8216
8231
  });
8217
8232
  var ConvertTargetSchema = discriminatedUnion("format", [object({
8218
8233
  format: literal("openvino"),
@@ -8241,7 +8256,8 @@ var ModelConvertMetadataSchema = object({
8241
8256
  "ocr",
8242
8257
  "segmentation"
8243
8258
  ]),
8244
- faceAlignment: boolean().optional()
8259
+ faceAlignment: boolean().optional(),
8260
+ classMap: ClassMapDefinitionSchema.optional()
8245
8261
  });
8246
8262
  var ConvertResultSchema = object({
8247
8263
  entry: ModelCatalogEntrySchema,
@@ -17600,6 +17616,33 @@ var NativeCropRefSchema = object({
17600
17616
  h: number()
17601
17617
  })
17602
17618
  });
17619
+ object({
17620
+ crop: object({
17621
+ left: number(),
17622
+ top: number(),
17623
+ width: number().positive(),
17624
+ height: number().positive()
17625
+ }).optional(),
17626
+ content: object({
17627
+ width: number().int().positive(),
17628
+ height: number().int().positive()
17629
+ }),
17630
+ fit: _enum(["stretch", "contain"]),
17631
+ format: _enum([
17632
+ "rgb",
17633
+ "gray",
17634
+ "jpeg"
17635
+ ])
17636
+ });
17637
+ var FrameRefSchema = object({
17638
+ registryId: string$2().min(1),
17639
+ id: string$2().min(1),
17640
+ width: number().int().positive(),
17641
+ height: number().int().positive(),
17642
+ format: _enum(["rgb", "gray"]),
17643
+ timestamp: number(),
17644
+ capturedAt: number().optional()
17645
+ });
17603
17646
  var ModelFormatSchema$1 = _enum([
17604
17647
  "onnx",
17605
17648
  "coreml",
@@ -17844,6 +17887,12 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
17844
17887
  steps: array(PipelineStepInputSchema).min(1),
17845
17888
  frame: FrameInputSchema.optional(),
17846
17889
  /**
17890
+ * Process-local lazy frame. Valid only when caller and provider resolve
17891
+ * in the same execution-group process; split/cross-node callers use
17892
+ * `frame`/`image` inline compatibility instead.
17893
+ */
17894
+ frameRef: FrameRefSchema.optional(),
17895
+ /**
17847
17896
  * CB5 shm passthrough — a `FrameHandle` naming the same ring slot
17848
17897
  * the decoded pixels live in. One more member of the one-of
17849
17898
  * frame/frameHandle/image/imageBase64/referenceImage group.
@@ -18139,7 +18188,10 @@ var NativeCropResultSchema = object({
18139
18188
  * Which source served this crop, so a quality-sensitive consumer (the native
18140
18189
  * `keyFrame`) can reject a degraded fallback:
18141
18190
  * - `native` — cut from the decode worker's retained NATIVE surface (the
18142
- * quality path).
18191
+ * quality path). A subject-tile serve is also native-resolution and stays
18192
+ * `native` here: the public enum cannot name `tile` without a breaking cap
18193
+ * change. Runner telemetry distinguishes lease vs tile via `source` on the
18194
+ * internal crop result (`nativeHits` vs `tileHits`).
18143
18195
  * - `ram-fullframe` — the native surface MISSED but the request was full-frame,
18144
18196
  * so the ≤640 RAM `RetainedFrameStore` served it (honest lower-res; legit for
18145
18197
  * the blank-frame guard / 640-snapshot resolve, NOT for the clean keyFrame).
@@ -18630,12 +18682,41 @@ var RunnerLocalLoadSchema = object({
18630
18682
  * legacy `OrchestratorMetricsSchema` shape so existing dashboards keep
18631
18683
  * working unchanged when they switch to reading from the runner cap.
18632
18684
  */
18685
+ var FrameLazyCountersSchema = object({
18686
+ framesDecoded: number(),
18687
+ framesAdmitted: number(),
18688
+ framesDroppedPixelFree: number(),
18689
+ viewsMaterialized: number(),
18690
+ viewsSkipped: number(),
18691
+ workerToRunnerBytes: number(),
18692
+ runnerToPoolRawBytes: number(),
18693
+ runnerToPoolJpegBytes: number(),
18694
+ onDemandFullFrameRequests: number(),
18695
+ onDemandCropRequests: number(),
18696
+ nativeHits: number(),
18697
+ nativeMisses: number(),
18698
+ tileHits: number(),
18699
+ tileMisses: number(),
18700
+ fallbackHits: number(),
18701
+ fallbackMisses: number(),
18702
+ retainedWritesAvoided: number(),
18703
+ residentRefs: number(),
18704
+ residentBytes: number(),
18705
+ releases: number(),
18706
+ evictions: number(),
18707
+ staleMisses: number()
18708
+ });
18709
+ var FrameLazyMetricsSchema = object({
18710
+ node: FrameLazyCountersSchema,
18711
+ cameras: array(FrameLazyCountersSchema.extend({ deviceId: number() }))
18712
+ });
18633
18713
  var RunnerLocalMetricsSchema = object({
18634
18714
  nodeId: string$2(),
18635
18715
  activeCameras: number(),
18636
18716
  throttledCameras: number(),
18637
18717
  avgInferenceTimeMs: number(),
18638
- queueDepth: number()
18718
+ queueDepth: number(),
18719
+ frameLazy: FrameLazyMetricsSchema.optional()
18639
18720
  });
18640
18721
  method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mutation" }), method(object({ deviceId: number() }), object({ success: literal(true) }), { kind: "mutation" }), method(ReportMotionInputSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), RunnerLocalLoadSchema), method(_void(), RunnerLocalMetricsSchema), method(object({ deviceId: number() }), CameraMetricsSchema.nullable()), method(_void(), array(CameraMetricsWithDeviceIdSchema).readonly()), method(_void(), array(number()).readonly()), method(object({
18641
18722
  handle: FrameHandleSchema,
@@ -19935,6 +20016,9 @@ method(_void(), ProviderInfoSchema), method(object({ config: record(string$2(),
19935
20016
  location: StorageLocationSchema,
19936
20017
  relativePath: string$2()
19937
20018
  }), _void(), { kind: "mutation" }), method(object({ location: StorageLocationSchema }), number().nullable()), method(BeginUploadInputSchema, BeginUploadResultSchema, { kind: "mutation" }), method(WriteChunkInputSchema, _void(), { kind: "mutation" }), method(FinalizeUploadInputSchema, _void(), { kind: "mutation" }), method(AbortUploadInputSchema, _void(), { kind: "mutation" }), method(BeginDownloadInputSchema, BeginDownloadResultSchema, { kind: "mutation" }), method(ReadChunkInputSchema, _instanceof(Uint8Array)), method(EndDownloadInputSchema, _void(), { kind: "mutation" });
20019
+ /** Profile-exported FormBuilder schema. Shape is ConfigUISchema at the UI. */
20020
+ var ProfileSettingsSchemaBridge = unknown().nullable();
20021
+ var ProfileSettingsBagSchema = record(string$2(), unknown());
19938
20022
  /**
19939
20023
  * A live terminal session hosted by the provider addon. Output and input do
19940
20024
  * NOT flow through the capability — they use the addon data plane
@@ -19964,7 +20048,14 @@ var TerminalSessionInfoSchema = object({
19964
20048
  var TerminalProfileInfoSchema = object({
19965
20049
  profileId: string$2(),
19966
20050
  label: string$2(),
19967
- description: string$2().optional()
20051
+ description: string$2().optional(),
20052
+ /** Spawn defaults the instance form copies on create. */
20053
+ executable: string$2().optional(),
20054
+ args: array(string$2()).readonly().optional(),
20055
+ cwd: string$2().optional(),
20056
+ environment: array(string$2()).readonly().optional(),
20057
+ /** ConfigUISchema for instance knobs, or null when the profile has none. */
20058
+ settingsSchema: ProfileSettingsSchemaBridge.optional()
19968
20059
  });
19969
20060
  /**
19970
20061
  * A durable operator-created Terminal instance. Profiles are templates; only
@@ -19977,7 +20068,12 @@ var TerminalInstanceInfoSchema = object({
19977
20068
  profileId: string$2(),
19978
20069
  profileLabel: string$2(),
19979
20070
  name: string$2(),
19980
- enabled: boolean()
20071
+ enabled: boolean(),
20072
+ executable: string$2(),
20073
+ args: array(string$2()).readonly(),
20074
+ cwd: string$2(),
20075
+ environment: array(string$2()).readonly(),
20076
+ profileSettings: ProfileSettingsBagSchema
19981
20077
  });
19982
20078
  var TerminalLegacyCameraSchema = object({
19983
20079
  stableId: string$2(),
@@ -20007,7 +20103,23 @@ var TerminalOutputBatchSchema = object({
20007
20103
  method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalInstanceInfoSchema).readonly(), { auth: "admin" }), method(object({
20008
20104
  targetNodeId: string$2().min(1),
20009
20105
  profileId: string$2().min(1),
20010
- name: string$2().trim().min(1).max(160).optional()
20106
+ name: string$2().trim().min(1).max(160).optional(),
20107
+ executable: string$2().max(1024).optional(),
20108
+ args: array(string$2().max(2048)).max(64).optional(),
20109
+ cwd: string$2().max(1024).optional(),
20110
+ environment: array(string$2().max(4096)).max(64).optional(),
20111
+ profileSettings: ProfileSettingsBagSchema.optional()
20112
+ }), TerminalInstanceInfoSchema, {
20113
+ kind: "mutation",
20114
+ auth: "admin"
20115
+ }), method(object({
20116
+ instanceId: string$2().min(1),
20117
+ name: string$2().trim().min(1).max(160).optional(),
20118
+ executable: string$2().max(1024).optional(),
20119
+ args: array(string$2().max(2048)).max(64).optional(),
20120
+ cwd: string$2().max(1024).optional(),
20121
+ environment: array(string$2().max(4096)).max(64).optional(),
20122
+ profileSettings: ProfileSettingsBagSchema.optional()
20011
20123
  }), TerminalInstanceInfoSchema, {
20012
20124
  kind: "mutation",
20013
20125
  auth: "admin"
@@ -20029,7 +20141,11 @@ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
20029
20141
  }), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(object({
20030
20142
  profileId: string$2(),
20031
20143
  cols: number().int().positive(),
20032
- rows: number().int().positive()
20144
+ rows: number().int().positive(),
20145
+ executable: string$2().max(1024).optional(),
20146
+ args: array(string$2().max(2048)).max(64).optional(),
20147
+ cwd: string$2().max(1024).optional(),
20148
+ environment: array(string$2().max(4096)).max(64).optional()
20033
20149
  }), TerminalSessionInfoSchema, {
20034
20150
  kind: "mutation",
20035
20151
  auth: "admin"
@@ -23921,10 +24037,10 @@ var lawnMowerControlCapability = {
23921
24037
  *
23922
24038
  * • The SDK (mobile / web client) consumes `getConnectionEndpoints()`
23923
24039
  * to receive an ordered list of candidate base URLs it should race
23924
- * on connect — LAN IPv4 first (lowest latency when on same network),
23925
- * then public hostname (if a tunnel is up), then IPv6. The SDK can
23926
- * race them with short timeouts and stick with the winner for the
23927
- * session.
24040
+ * on connect — LAN IPv4 and stable LAN IPv6 first (lowest latency
24041
+ * when on the same network), then public hostname (if a tunnel is
24042
+ * up). The SDK can race them with short timeouts and stick with the
24043
+ * winner for the session.
23928
24044
  *
23929
24045
  * Why hub-only: agents are not directly addressable by the operator's
23930
24046
  * clients — they reverse-connect to the hub. Exposing their interfaces
@@ -24079,6 +24195,17 @@ var NotificationEndpointSchema = object({
24079
24195
  /** What the ranking currently resolves to (null when nothing is reachable). */
24080
24196
  resolved: string$2().nullable()
24081
24197
  });
24198
+ /**
24199
+ * The URLs the SDK / viewer should race for API access. `baseUrls` empty =
24200
+ * AUTO (every LAN IPv4 + the public tunnel). `resolved` is what that choice
24201
+ * currently expands to, so the UI can show the effective set either way.
24202
+ */
24203
+ var ViewerEndpointsSchema = object({
24204
+ /** The operator's explicit race set, or empty for AUTO. */
24205
+ baseUrls: array(string$2()).readonly(),
24206
+ /** What the ranking currently resolves to (may be empty if nothing is up). */
24207
+ resolved: array(string$2()).readonly()
24208
+ });
24082
24209
  var AllowedAddressesSchema = object({
24083
24210
  /**
24084
24211
  * Allowlist of interface addresses operators have explicitly opted
@@ -24087,6 +24214,20 @@ var AllowedAddressesSchema = object({
24087
24214
  * Network Addresses admin page and persisted by the addon.
24088
24215
  */
24089
24216
  addresses: array(string$2()).readonly() });
24217
+ var TlsStatusSchema = object({
24218
+ mode: _enum([
24219
+ "generated",
24220
+ "uploaded",
24221
+ "disabled"
24222
+ ]),
24223
+ leafFingerprintSha256: string$2().nullable(),
24224
+ caFingerprintSha256: string$2().nullable(),
24225
+ validTo: string$2().nullable(),
24226
+ sans: array(string$2()),
24227
+ caCertPem: string$2().nullable(),
24228
+ reissueError: string$2().nullable(),
24229
+ restartRequired: boolean()
24230
+ });
24090
24231
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
24091
24232
  /**
24092
24233
  * LEGACY HINT — do not send from new code. Kept optional so clients
@@ -24096,17 +24237,31 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
24096
24237
  */
24097
24238
  port: number().int().min(1).max(65535).optional(),
24098
24239
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
24099
- * candidate. Default `true`. */
24240
+ * candidate. Default `false` — loopback is not a client route. */
24100
24241
  includeLoopback: boolean().optional(),
24101
- /** Skip IPv6 entries. Some legacy clients can't parse them.
24102
- * Default `false`. */
24242
+ /** Skip IPv6 entries. Default `false` — the palette includes stable
24243
+ * LAN IPv6 (ICE/WebRTC uses dual-stack regardless). Pass `true` to
24244
+ * hide them. The viewer HTTP/WS race is `getViewerEndpoints`. */
24103
24245
  ipv4Only: boolean().optional(),
24104
24246
  /** Scheme to emit for LAN/loopback URLs. Default `'http'`.
24105
24247
  * Pass `'https'` when the caller is itself loaded over HTTPS
24106
24248
  * to avoid mixed-content blocks in the browser. The public
24107
24249
  * tunnel always emits `https://` regardless. */
24108
24250
  scheme: _enum(["http", "https"]).optional()
24109
- }), GetConnectionEndpointsResultSchema), method(_void(), NotificationEndpointSchema), method(object({ baseUrl: string$2().nullable() }), NotificationEndpointSchema, { kind: "mutation" }), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" });
24251
+ }), GetConnectionEndpointsResultSchema), method(_void(), NotificationEndpointSchema), method(object({ baseUrl: string$2().nullable() }), NotificationEndpointSchema, { kind: "mutation" }), method(_void(), ViewerEndpointsSchema), method(object({ baseUrls: array(string$2()).readonly() }), ViewerEndpointsSchema, { kind: "mutation" }), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" }), method(_void(), TlsStatusSchema), method(object({ reason: string$2().optional() }), TlsStatusSchema, {
24252
+ kind: "mutation",
24253
+ auth: "admin"
24254
+ }), method(object({
24255
+ certPem: string$2().min(1),
24256
+ keyPem: string$2().min(1),
24257
+ caPem: string$2().optional()
24258
+ }), TlsStatusSchema, {
24259
+ kind: "mutation",
24260
+ auth: "admin"
24261
+ }), method(_void(), object({ pem: string$2() })), method(_void(), TlsStatusSchema, {
24262
+ kind: "mutation",
24263
+ auth: "admin"
24264
+ });
24110
24265
  var LockControlStatusSchema = object({
24111
24266
  /** Lifecycle state of the lock. `jammed` means the motor reported
24112
24267
  * failure to reach the target — operator intervention required. */
@@ -32133,6 +32288,12 @@ Object.freeze({
32133
32288
  addonId: null,
32134
32289
  access: "create"
32135
32290
  },
32291
+ "localNetwork.downloadCa": {
32292
+ capName: "local-network",
32293
+ capScope: "system",
32294
+ addonId: null,
32295
+ access: "view"
32296
+ },
32136
32297
  "localNetwork.getAllowedAddresses": {
32137
32298
  capName: "local-network",
32138
32299
  capScope: "system",
@@ -32157,18 +32318,42 @@ Object.freeze({
32157
32318
  addonId: null,
32158
32319
  access: "view"
32159
32320
  },
32321
+ "localNetwork.getTlsStatus": {
32322
+ capName: "local-network",
32323
+ capScope: "system",
32324
+ addonId: null,
32325
+ access: "view"
32326
+ },
32327
+ "localNetwork.getViewerEndpoints": {
32328
+ capName: "local-network",
32329
+ capScope: "system",
32330
+ addonId: null,
32331
+ access: "view"
32332
+ },
32160
32333
  "localNetwork.list": {
32161
32334
  capName: "local-network",
32162
32335
  capScope: "system",
32163
32336
  addonId: null,
32164
32337
  access: "view"
32165
32338
  },
32339
+ "localNetwork.regenerateCertificate": {
32340
+ capName: "local-network",
32341
+ capScope: "system",
32342
+ addonId: null,
32343
+ access: "create"
32344
+ },
32166
32345
  "localNetwork.resetAllowlistToBestMatch": {
32167
32346
  capName: "local-network",
32168
32347
  capScope: "system",
32169
32348
  addonId: null,
32170
32349
  access: "delete"
32171
32350
  },
32351
+ "localNetwork.revertToGeneratedCertificate": {
32352
+ capName: "local-network",
32353
+ capScope: "system",
32354
+ addonId: null,
32355
+ access: "create"
32356
+ },
32172
32357
  "localNetwork.setAllowedAddresses": {
32173
32358
  capName: "local-network",
32174
32359
  capScope: "system",
@@ -32181,6 +32366,18 @@ Object.freeze({
32181
32366
  addonId: null,
32182
32367
  access: "create"
32183
32368
  },
32369
+ "localNetwork.setViewerEndpoints": {
32370
+ capName: "local-network",
32371
+ capScope: "system",
32372
+ addonId: null,
32373
+ access: "create"
32374
+ },
32375
+ "localNetwork.uploadCertificate": {
32376
+ capName: "local-network",
32377
+ capScope: "system",
32378
+ addonId: null,
32379
+ access: "create"
32380
+ },
32184
32381
  "lockControl.lock": {
32185
32382
  capName: "lock-control",
32186
32383
  capScope: "device",
@@ -35061,6 +35258,12 @@ Object.freeze({
35061
35258
  addonId: null,
35062
35259
  access: "create"
35063
35260
  },
35261
+ "terminalSession.updateInstance": {
35262
+ capName: "terminal-session",
35263
+ capScope: "system",
35264
+ addonId: null,
35265
+ access: "create"
35266
+ },
35064
35267
  "terminalSession.writeInput": {
35065
35268
  capName: "terminal-session",
35066
35269
  capScope: "system",
@@ -37548,6 +37751,35 @@ Object.freeze(Object.fromEntries([{
37548
37751
  }]
37549
37752
  }].map((s) => [s.stepId, s.defaultModelId])));
37550
37753
  string$2().min(1);
37754
+ var CLUSTER_STEP_SETTING_FIELDS = [{
37755
+ stepId: "face-embedding",
37756
+ key: "minLandmarkFaceSize",
37757
+ label: "Min face size for recognition (detection px)",
37758
+ description: "Refuse to embed a face smaller than this IN THE DETECTION FRAME. Applies to every node — the enrolled gallery is one index, and two admission floors would fill it from two policies. 0 disables the gate.",
37759
+ type: "slider",
37760
+ min: 0,
37761
+ max: 64,
37762
+ step: 2,
37763
+ default: 24
37764
+ }];
37765
+ function clusterStepSettingKey(stepId, fieldKey) {
37766
+ return `clusterStepSetting:${stepId}:${fieldKey}`;
37767
+ }
37768
+ var ClusterSettingNumberSchema = number().finite();
37769
+ function readClusterStepSettings(config) {
37770
+ const out = {};
37771
+ for (const field of CLUSTER_STEP_SETTING_FIELDS) {
37772
+ const parsed = ClusterSettingNumberSchema.safeParse(config[clusterStepSettingKey(field.stepId, field.key)]);
37773
+ const value = parsed.success ? parsed.data : field.default;
37774
+ const existing = out[field.stepId] ?? {};
37775
+ out[field.stepId] = {
37776
+ ...existing,
37777
+ [field.key]: value
37778
+ };
37779
+ }
37780
+ return out;
37781
+ }
37782
+ readClusterStepSettings({});
37551
37783
  object({
37552
37784
  /**
37553
37785
  * Fraction of the box's own size added on EACH side before cutting.
package/dist/addon.mjs CHANGED
@@ -8032,6 +8032,15 @@ var LabelDefinitionSchema = object({
8032
8032
  description: string$2().optional(),
8033
8033
  icon: string$2().optional()
8034
8034
  });
8035
+ var ClassMapDefinitionSchema = object({
8036
+ mapping: record(string$2(), _enum([
8037
+ "person",
8038
+ "vehicle",
8039
+ "animal",
8040
+ "package"
8041
+ ])),
8042
+ preserveOriginal: boolean()
8043
+ });
8035
8044
  var MODEL_FORMATS = [
8036
8045
  "onnx",
8037
8046
  "coreml",
@@ -8210,7 +8219,13 @@ var ModelCatalogEntrySchema = object({
8210
8219
  * `id` stays the source of truth for resolution/download/persistence; grouping
8211
8220
  * is a presentation overlay resolved back to an `id`.
8212
8221
  */
8213
- group: ModelVariantGroupSchema.optional()
8222
+ group: ModelVariantGroupSchema.optional(),
8223
+ /**
8224
+ * Per-MODEL class map override. Absent ⇒ the step's `StepDefinition.classMap`
8225
+ * applies (Frigate / COCO public catalog). Set on a custom model whose raw
8226
+ * labels already ARE the CamStack macros (Scrypted identity map).
8227
+ */
8228
+ classMap: ClassMapDefinitionSchema.optional()
8214
8229
  });
8215
8230
  var ConvertTargetSchema = discriminatedUnion("format", [object({
8216
8231
  format: literal("openvino"),
@@ -8239,7 +8254,8 @@ var ModelConvertMetadataSchema = object({
8239
8254
  "ocr",
8240
8255
  "segmentation"
8241
8256
  ]),
8242
- faceAlignment: boolean().optional()
8257
+ faceAlignment: boolean().optional(),
8258
+ classMap: ClassMapDefinitionSchema.optional()
8243
8259
  });
8244
8260
  var ConvertResultSchema = object({
8245
8261
  entry: ModelCatalogEntrySchema,
@@ -17598,6 +17614,33 @@ var NativeCropRefSchema = object({
17598
17614
  h: number()
17599
17615
  })
17600
17616
  });
17617
+ object({
17618
+ crop: object({
17619
+ left: number(),
17620
+ top: number(),
17621
+ width: number().positive(),
17622
+ height: number().positive()
17623
+ }).optional(),
17624
+ content: object({
17625
+ width: number().int().positive(),
17626
+ height: number().int().positive()
17627
+ }),
17628
+ fit: _enum(["stretch", "contain"]),
17629
+ format: _enum([
17630
+ "rgb",
17631
+ "gray",
17632
+ "jpeg"
17633
+ ])
17634
+ });
17635
+ var FrameRefSchema = object({
17636
+ registryId: string$2().min(1),
17637
+ id: string$2().min(1),
17638
+ width: number().int().positive(),
17639
+ height: number().int().positive(),
17640
+ format: _enum(["rgb", "gray"]),
17641
+ timestamp: number(),
17642
+ capturedAt: number().optional()
17643
+ });
17601
17644
  var ModelFormatSchema$1 = _enum([
17602
17645
  "onnx",
17603
17646
  "coreml",
@@ -17842,6 +17885,12 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
17842
17885
  steps: array(PipelineStepInputSchema).min(1),
17843
17886
  frame: FrameInputSchema.optional(),
17844
17887
  /**
17888
+ * Process-local lazy frame. Valid only when caller and provider resolve
17889
+ * in the same execution-group process; split/cross-node callers use
17890
+ * `frame`/`image` inline compatibility instead.
17891
+ */
17892
+ frameRef: FrameRefSchema.optional(),
17893
+ /**
17845
17894
  * CB5 shm passthrough — a `FrameHandle` naming the same ring slot
17846
17895
  * the decoded pixels live in. One more member of the one-of
17847
17896
  * frame/frameHandle/image/imageBase64/referenceImage group.
@@ -18137,7 +18186,10 @@ var NativeCropResultSchema = object({
18137
18186
  * Which source served this crop, so a quality-sensitive consumer (the native
18138
18187
  * `keyFrame`) can reject a degraded fallback:
18139
18188
  * - `native` — cut from the decode worker's retained NATIVE surface (the
18140
- * quality path).
18189
+ * quality path). A subject-tile serve is also native-resolution and stays
18190
+ * `native` here: the public enum cannot name `tile` without a breaking cap
18191
+ * change. Runner telemetry distinguishes lease vs tile via `source` on the
18192
+ * internal crop result (`nativeHits` vs `tileHits`).
18141
18193
  * - `ram-fullframe` — the native surface MISSED but the request was full-frame,
18142
18194
  * so the ≤640 RAM `RetainedFrameStore` served it (honest lower-res; legit for
18143
18195
  * the blank-frame guard / 640-snapshot resolve, NOT for the clean keyFrame).
@@ -18628,12 +18680,41 @@ var RunnerLocalLoadSchema = object({
18628
18680
  * legacy `OrchestratorMetricsSchema` shape so existing dashboards keep
18629
18681
  * working unchanged when they switch to reading from the runner cap.
18630
18682
  */
18683
+ var FrameLazyCountersSchema = object({
18684
+ framesDecoded: number(),
18685
+ framesAdmitted: number(),
18686
+ framesDroppedPixelFree: number(),
18687
+ viewsMaterialized: number(),
18688
+ viewsSkipped: number(),
18689
+ workerToRunnerBytes: number(),
18690
+ runnerToPoolRawBytes: number(),
18691
+ runnerToPoolJpegBytes: number(),
18692
+ onDemandFullFrameRequests: number(),
18693
+ onDemandCropRequests: number(),
18694
+ nativeHits: number(),
18695
+ nativeMisses: number(),
18696
+ tileHits: number(),
18697
+ tileMisses: number(),
18698
+ fallbackHits: number(),
18699
+ fallbackMisses: number(),
18700
+ retainedWritesAvoided: number(),
18701
+ residentRefs: number(),
18702
+ residentBytes: number(),
18703
+ releases: number(),
18704
+ evictions: number(),
18705
+ staleMisses: number()
18706
+ });
18707
+ var FrameLazyMetricsSchema = object({
18708
+ node: FrameLazyCountersSchema,
18709
+ cameras: array(FrameLazyCountersSchema.extend({ deviceId: number() }))
18710
+ });
18631
18711
  var RunnerLocalMetricsSchema = object({
18632
18712
  nodeId: string$2(),
18633
18713
  activeCameras: number(),
18634
18714
  throttledCameras: number(),
18635
18715
  avgInferenceTimeMs: number(),
18636
- queueDepth: number()
18716
+ queueDepth: number(),
18717
+ frameLazy: FrameLazyMetricsSchema.optional()
18637
18718
  });
18638
18719
  method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mutation" }), method(object({ deviceId: number() }), object({ success: literal(true) }), { kind: "mutation" }), method(ReportMotionInputSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), RunnerLocalLoadSchema), method(_void(), RunnerLocalMetricsSchema), method(object({ deviceId: number() }), CameraMetricsSchema.nullable()), method(_void(), array(CameraMetricsWithDeviceIdSchema).readonly()), method(_void(), array(number()).readonly()), method(object({
18639
18720
  handle: FrameHandleSchema,
@@ -19933,6 +20014,9 @@ method(_void(), ProviderInfoSchema), method(object({ config: record(string$2(),
19933
20014
  location: StorageLocationSchema,
19934
20015
  relativePath: string$2()
19935
20016
  }), _void(), { kind: "mutation" }), method(object({ location: StorageLocationSchema }), number().nullable()), method(BeginUploadInputSchema, BeginUploadResultSchema, { kind: "mutation" }), method(WriteChunkInputSchema, _void(), { kind: "mutation" }), method(FinalizeUploadInputSchema, _void(), { kind: "mutation" }), method(AbortUploadInputSchema, _void(), { kind: "mutation" }), method(BeginDownloadInputSchema, BeginDownloadResultSchema, { kind: "mutation" }), method(ReadChunkInputSchema, _instanceof(Uint8Array)), method(EndDownloadInputSchema, _void(), { kind: "mutation" });
20017
+ /** Profile-exported FormBuilder schema. Shape is ConfigUISchema at the UI. */
20018
+ var ProfileSettingsSchemaBridge = unknown().nullable();
20019
+ var ProfileSettingsBagSchema = record(string$2(), unknown());
19936
20020
  /**
19937
20021
  * A live terminal session hosted by the provider addon. Output and input do
19938
20022
  * NOT flow through the capability — they use the addon data plane
@@ -19962,7 +20046,14 @@ var TerminalSessionInfoSchema = object({
19962
20046
  var TerminalProfileInfoSchema = object({
19963
20047
  profileId: string$2(),
19964
20048
  label: string$2(),
19965
- description: string$2().optional()
20049
+ description: string$2().optional(),
20050
+ /** Spawn defaults the instance form copies on create. */
20051
+ executable: string$2().optional(),
20052
+ args: array(string$2()).readonly().optional(),
20053
+ cwd: string$2().optional(),
20054
+ environment: array(string$2()).readonly().optional(),
20055
+ /** ConfigUISchema for instance knobs, or null when the profile has none. */
20056
+ settingsSchema: ProfileSettingsSchemaBridge.optional()
19966
20057
  });
19967
20058
  /**
19968
20059
  * A durable operator-created Terminal instance. Profiles are templates; only
@@ -19975,7 +20066,12 @@ var TerminalInstanceInfoSchema = object({
19975
20066
  profileId: string$2(),
19976
20067
  profileLabel: string$2(),
19977
20068
  name: string$2(),
19978
- enabled: boolean()
20069
+ enabled: boolean(),
20070
+ executable: string$2(),
20071
+ args: array(string$2()).readonly(),
20072
+ cwd: string$2(),
20073
+ environment: array(string$2()).readonly(),
20074
+ profileSettings: ProfileSettingsBagSchema
19979
20075
  });
19980
20076
  var TerminalLegacyCameraSchema = object({
19981
20077
  stableId: string$2(),
@@ -20005,7 +20101,23 @@ var TerminalOutputBatchSchema = object({
20005
20101
  method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalInstanceInfoSchema).readonly(), { auth: "admin" }), method(object({
20006
20102
  targetNodeId: string$2().min(1),
20007
20103
  profileId: string$2().min(1),
20008
- name: string$2().trim().min(1).max(160).optional()
20104
+ name: string$2().trim().min(1).max(160).optional(),
20105
+ executable: string$2().max(1024).optional(),
20106
+ args: array(string$2().max(2048)).max(64).optional(),
20107
+ cwd: string$2().max(1024).optional(),
20108
+ environment: array(string$2().max(4096)).max(64).optional(),
20109
+ profileSettings: ProfileSettingsBagSchema.optional()
20110
+ }), TerminalInstanceInfoSchema, {
20111
+ kind: "mutation",
20112
+ auth: "admin"
20113
+ }), method(object({
20114
+ instanceId: string$2().min(1),
20115
+ name: string$2().trim().min(1).max(160).optional(),
20116
+ executable: string$2().max(1024).optional(),
20117
+ args: array(string$2().max(2048)).max(64).optional(),
20118
+ cwd: string$2().max(1024).optional(),
20119
+ environment: array(string$2().max(4096)).max(64).optional(),
20120
+ profileSettings: ProfileSettingsBagSchema.optional()
20009
20121
  }), TerminalInstanceInfoSchema, {
20010
20122
  kind: "mutation",
20011
20123
  auth: "admin"
@@ -20027,7 +20139,11 @@ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
20027
20139
  }), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(object({
20028
20140
  profileId: string$2(),
20029
20141
  cols: number().int().positive(),
20030
- rows: number().int().positive()
20142
+ rows: number().int().positive(),
20143
+ executable: string$2().max(1024).optional(),
20144
+ args: array(string$2().max(2048)).max(64).optional(),
20145
+ cwd: string$2().max(1024).optional(),
20146
+ environment: array(string$2().max(4096)).max(64).optional()
20031
20147
  }), TerminalSessionInfoSchema, {
20032
20148
  kind: "mutation",
20033
20149
  auth: "admin"
@@ -23919,10 +24035,10 @@ var lawnMowerControlCapability = {
23919
24035
  *
23920
24036
  * • The SDK (mobile / web client) consumes `getConnectionEndpoints()`
23921
24037
  * to receive an ordered list of candidate base URLs it should race
23922
- * on connect — LAN IPv4 first (lowest latency when on same network),
23923
- * then public hostname (if a tunnel is up), then IPv6. The SDK can
23924
- * race them with short timeouts and stick with the winner for the
23925
- * session.
24038
+ * on connect — LAN IPv4 and stable LAN IPv6 first (lowest latency
24039
+ * when on the same network), then public hostname (if a tunnel is
24040
+ * up). The SDK can race them with short timeouts and stick with the
24041
+ * winner for the session.
23926
24042
  *
23927
24043
  * Why hub-only: agents are not directly addressable by the operator's
23928
24044
  * clients — they reverse-connect to the hub. Exposing their interfaces
@@ -24077,6 +24193,17 @@ var NotificationEndpointSchema = object({
24077
24193
  /** What the ranking currently resolves to (null when nothing is reachable). */
24078
24194
  resolved: string$2().nullable()
24079
24195
  });
24196
+ /**
24197
+ * The URLs the SDK / viewer should race for API access. `baseUrls` empty =
24198
+ * AUTO (every LAN IPv4 + the public tunnel). `resolved` is what that choice
24199
+ * currently expands to, so the UI can show the effective set either way.
24200
+ */
24201
+ var ViewerEndpointsSchema = object({
24202
+ /** The operator's explicit race set, or empty for AUTO. */
24203
+ baseUrls: array(string$2()).readonly(),
24204
+ /** What the ranking currently resolves to (may be empty if nothing is up). */
24205
+ resolved: array(string$2()).readonly()
24206
+ });
24080
24207
  var AllowedAddressesSchema = object({
24081
24208
  /**
24082
24209
  * Allowlist of interface addresses operators have explicitly opted
@@ -24085,6 +24212,20 @@ var AllowedAddressesSchema = object({
24085
24212
  * Network Addresses admin page and persisted by the addon.
24086
24213
  */
24087
24214
  addresses: array(string$2()).readonly() });
24215
+ var TlsStatusSchema = object({
24216
+ mode: _enum([
24217
+ "generated",
24218
+ "uploaded",
24219
+ "disabled"
24220
+ ]),
24221
+ leafFingerprintSha256: string$2().nullable(),
24222
+ caFingerprintSha256: string$2().nullable(),
24223
+ validTo: string$2().nullable(),
24224
+ sans: array(string$2()),
24225
+ caCertPem: string$2().nullable(),
24226
+ reissueError: string$2().nullable(),
24227
+ restartRequired: boolean()
24228
+ });
24088
24229
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
24089
24230
  /**
24090
24231
  * LEGACY HINT — do not send from new code. Kept optional so clients
@@ -24094,17 +24235,31 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
24094
24235
  */
24095
24236
  port: number().int().min(1).max(65535).optional(),
24096
24237
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
24097
- * candidate. Default `true`. */
24238
+ * candidate. Default `false` — loopback is not a client route. */
24098
24239
  includeLoopback: boolean().optional(),
24099
- /** Skip IPv6 entries. Some legacy clients can't parse them.
24100
- * Default `false`. */
24240
+ /** Skip IPv6 entries. Default `false` — the palette includes stable
24241
+ * LAN IPv6 (ICE/WebRTC uses dual-stack regardless). Pass `true` to
24242
+ * hide them. The viewer HTTP/WS race is `getViewerEndpoints`. */
24101
24243
  ipv4Only: boolean().optional(),
24102
24244
  /** Scheme to emit for LAN/loopback URLs. Default `'http'`.
24103
24245
  * Pass `'https'` when the caller is itself loaded over HTTPS
24104
24246
  * to avoid mixed-content blocks in the browser. The public
24105
24247
  * tunnel always emits `https://` regardless. */
24106
24248
  scheme: _enum(["http", "https"]).optional()
24107
- }), GetConnectionEndpointsResultSchema), method(_void(), NotificationEndpointSchema), method(object({ baseUrl: string$2().nullable() }), NotificationEndpointSchema, { kind: "mutation" }), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" });
24249
+ }), GetConnectionEndpointsResultSchema), method(_void(), NotificationEndpointSchema), method(object({ baseUrl: string$2().nullable() }), NotificationEndpointSchema, { kind: "mutation" }), method(_void(), ViewerEndpointsSchema), method(object({ baseUrls: array(string$2()).readonly() }), ViewerEndpointsSchema, { kind: "mutation" }), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" }), method(_void(), TlsStatusSchema), method(object({ reason: string$2().optional() }), TlsStatusSchema, {
24250
+ kind: "mutation",
24251
+ auth: "admin"
24252
+ }), method(object({
24253
+ certPem: string$2().min(1),
24254
+ keyPem: string$2().min(1),
24255
+ caPem: string$2().optional()
24256
+ }), TlsStatusSchema, {
24257
+ kind: "mutation",
24258
+ auth: "admin"
24259
+ }), method(_void(), object({ pem: string$2() })), method(_void(), TlsStatusSchema, {
24260
+ kind: "mutation",
24261
+ auth: "admin"
24262
+ });
24108
24263
  var LockControlStatusSchema = object({
24109
24264
  /** Lifecycle state of the lock. `jammed` means the motor reported
24110
24265
  * failure to reach the target — operator intervention required. */
@@ -32131,6 +32286,12 @@ Object.freeze({
32131
32286
  addonId: null,
32132
32287
  access: "create"
32133
32288
  },
32289
+ "localNetwork.downloadCa": {
32290
+ capName: "local-network",
32291
+ capScope: "system",
32292
+ addonId: null,
32293
+ access: "view"
32294
+ },
32134
32295
  "localNetwork.getAllowedAddresses": {
32135
32296
  capName: "local-network",
32136
32297
  capScope: "system",
@@ -32155,18 +32316,42 @@ Object.freeze({
32155
32316
  addonId: null,
32156
32317
  access: "view"
32157
32318
  },
32319
+ "localNetwork.getTlsStatus": {
32320
+ capName: "local-network",
32321
+ capScope: "system",
32322
+ addonId: null,
32323
+ access: "view"
32324
+ },
32325
+ "localNetwork.getViewerEndpoints": {
32326
+ capName: "local-network",
32327
+ capScope: "system",
32328
+ addonId: null,
32329
+ access: "view"
32330
+ },
32158
32331
  "localNetwork.list": {
32159
32332
  capName: "local-network",
32160
32333
  capScope: "system",
32161
32334
  addonId: null,
32162
32335
  access: "view"
32163
32336
  },
32337
+ "localNetwork.regenerateCertificate": {
32338
+ capName: "local-network",
32339
+ capScope: "system",
32340
+ addonId: null,
32341
+ access: "create"
32342
+ },
32164
32343
  "localNetwork.resetAllowlistToBestMatch": {
32165
32344
  capName: "local-network",
32166
32345
  capScope: "system",
32167
32346
  addonId: null,
32168
32347
  access: "delete"
32169
32348
  },
32349
+ "localNetwork.revertToGeneratedCertificate": {
32350
+ capName: "local-network",
32351
+ capScope: "system",
32352
+ addonId: null,
32353
+ access: "create"
32354
+ },
32170
32355
  "localNetwork.setAllowedAddresses": {
32171
32356
  capName: "local-network",
32172
32357
  capScope: "system",
@@ -32179,6 +32364,18 @@ Object.freeze({
32179
32364
  addonId: null,
32180
32365
  access: "create"
32181
32366
  },
32367
+ "localNetwork.setViewerEndpoints": {
32368
+ capName: "local-network",
32369
+ capScope: "system",
32370
+ addonId: null,
32371
+ access: "create"
32372
+ },
32373
+ "localNetwork.uploadCertificate": {
32374
+ capName: "local-network",
32375
+ capScope: "system",
32376
+ addonId: null,
32377
+ access: "create"
32378
+ },
32182
32379
  "lockControl.lock": {
32183
32380
  capName: "lock-control",
32184
32381
  capScope: "device",
@@ -35059,6 +35256,12 @@ Object.freeze({
35059
35256
  addonId: null,
35060
35257
  access: "create"
35061
35258
  },
35259
+ "terminalSession.updateInstance": {
35260
+ capName: "terminal-session",
35261
+ capScope: "system",
35262
+ addonId: null,
35263
+ access: "create"
35264
+ },
35062
35265
  "terminalSession.writeInput": {
35063
35266
  capName: "terminal-session",
35064
35267
  capScope: "system",
@@ -37546,6 +37749,35 @@ Object.freeze(Object.fromEntries([{
37546
37749
  }]
37547
37750
  }].map((s) => [s.stepId, s.defaultModelId])));
37548
37751
  string$2().min(1);
37752
+ var CLUSTER_STEP_SETTING_FIELDS = [{
37753
+ stepId: "face-embedding",
37754
+ key: "minLandmarkFaceSize",
37755
+ label: "Min face size for recognition (detection px)",
37756
+ description: "Refuse to embed a face smaller than this IN THE DETECTION FRAME. Applies to every node — the enrolled gallery is one index, and two admission floors would fill it from two policies. 0 disables the gate.",
37757
+ type: "slider",
37758
+ min: 0,
37759
+ max: 64,
37760
+ step: 2,
37761
+ default: 24
37762
+ }];
37763
+ function clusterStepSettingKey(stepId, fieldKey) {
37764
+ return `clusterStepSetting:${stepId}:${fieldKey}`;
37765
+ }
37766
+ var ClusterSettingNumberSchema = number().finite();
37767
+ function readClusterStepSettings(config) {
37768
+ const out = {};
37769
+ for (const field of CLUSTER_STEP_SETTING_FIELDS) {
37770
+ const parsed = ClusterSettingNumberSchema.safeParse(config[clusterStepSettingKey(field.stepId, field.key)]);
37771
+ const value = parsed.success ? parsed.data : field.default;
37772
+ const existing = out[field.stepId] ?? {};
37773
+ out[field.stepId] = {
37774
+ ...existing,
37775
+ [field.key]: value
37776
+ };
37777
+ }
37778
+ return out;
37779
+ }
37780
+ readClusterStepSettings({});
37549
37781
  object({
37550
37782
  /**
37551
37783
  * Fraction of the box's own size added on EACH side before cutting.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-matter-broker",
3
- "version": "0.2.25",
3
+ "version": "0.2.26",
4
4
  "description": "Matter broker addon for CamStack — owns a Matter fabric (commissioning + the long-lived controller) via the matter.js controller and brokers commissioned Matter nodes into CamStack",
5
5
  "keywords": [
6
6
  "camstack",