@camstack/addon-mqtt-broker 1.2.52 → 1.2.55

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.
@@ -7747,7 +7747,8 @@ var OpsLogReasonSchema = _enum([
7747
7747
  "quota",
7748
7748
  "manual",
7749
7749
  "operator",
7750
- "maintenance"
7750
+ "maintenance",
7751
+ "orphaned-device"
7751
7752
  ]);
7752
7753
  /** One audit row, shared verbatim by both domains. */
7753
7754
  var OpsLogEntrySchema = object({
@@ -12827,10 +12828,39 @@ var DevicePersistConfigPayloadSchema = object({
12827
12828
  deviceId: number(),
12828
12829
  data: record(string(), unknown())
12829
12830
  });
12831
+ /** What a migration actually did, per switch. `unreachable` is a first-class
12832
+ * answer: a camera that could not be asked is not a camera that was silenced. */
12833
+ var MigrateSwitchOutcomeSchema = _enum([
12834
+ "off",
12835
+ "on",
12836
+ "not-offered",
12837
+ "unreachable"
12838
+ ]);
12839
+ var MigrateSwitchReportSchema = object({
12840
+ deviceId: number(),
12841
+ switchId: CameraSwitchIdSchema,
12842
+ outcome: MigrateSwitchOutcomeSchema,
12843
+ detail: string().optional()
12844
+ });
12845
+ var MigrateDeviceResultSchema = object({
12846
+ sourceId: number(),
12847
+ targetId: number(),
12848
+ switches: array(MigrateSwitchReportSchema).readonly(),
12849
+ /** Switches that could NOT be turned off on the source. Empty is the only
12850
+ * value meaning the replaced hardware is quiet. */
12851
+ sourceStillLive: array(CameraSwitchIdSchema).readonly(),
12852
+ swapped: boolean()
12853
+ });
12830
12854
  method(object({
12831
12855
  addonId: string(),
12832
12856
  stableId: string()
12833
- }), object({ id: number() }), { kind: "mutation" }), method(DeviceRegisterPayloadSchema, _void(), { kind: "mutation" }), method(DeviceRemovePayloadSchema, _void(), { kind: "mutation" }), method(DevicePersistConfigPayloadSchema, _void(), { kind: "mutation" }), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), DeviceMetaSchema.nullable()), method(object({
12857
+ }), object({ id: number() }), { kind: "mutation" }), method(object({
12858
+ sourceId: number(),
12859
+ targetId: number()
12860
+ }), MigrateDeviceResultSchema, {
12861
+ kind: "mutation",
12862
+ auth: "admin"
12863
+ }), method(DeviceRegisterPayloadSchema, _void(), { kind: "mutation" }), method(DeviceRemovePayloadSchema, _void(), { kind: "mutation" }), method(DevicePersistConfigPayloadSchema, _void(), { kind: "mutation" }), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), DeviceMetaSchema.nullable()), method(object({
12834
12864
  deviceId: number(),
12835
12865
  name: string()
12836
12866
  }), _void(), {
@@ -13305,6 +13335,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
13305
13335
  auth: "admin"
13306
13336
  });
13307
13337
  /**
13338
+ * Transport bounds for AI capability methods.
13339
+ *
13340
+ * Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
13341
+ * each other: declaring the constant in either one hands the other `undefined`
13342
+ * at module-init time, and an undefined `timeoutMs` silently falls back to the
13343
+ * kernel's 60 s default — the exact failure this constant exists to prevent,
13344
+ * reintroduced invisibly. Found by the guard, not by review.
13345
+ */
13346
+ /**
13347
+ * Ceiling for a cap method that runs inference or loads a model.
13348
+ *
13349
+ * Deliberately far above anything the AI layer itself may wait for (a summary
13350
+ * asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
13351
+ * never be the layer that gives up first: when it does, the failure is
13352
+ * reported as a transport error for a model that was still thinking, naming
13353
+ * the wrong layer and hiding the real one.
13354
+ *
13355
+ * Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
13356
+ * more on a cold model load. With no declaration every digest failed at
13357
+ * exactly 60 s and shipped without its text.
13358
+ *
13359
+ * A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
13360
+ * the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
13361
+ * decide when to stop, because only they can say WHY.
13362
+ */
13363
+ var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
13364
+ /** A multi-gigabyte download. An hour is not generous, it is honest. */
13365
+ var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
13366
+ /**
13308
13367
  * Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
13309
13368
  * surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
13310
13369
  * caps stay wire-compatible without a circular cap→cap import.
@@ -13576,16 +13635,19 @@ method(LlmGenerateBaseInputSchema.extend({
13576
13635
  timeoutMs: number().int().positive().optional()
13577
13636
  }), LlmGenerateResultSchema, {
13578
13637
  kind: "mutation",
13579
- auth: "admin"
13638
+ auth: "admin",
13639
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13580
13640
  }), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
13581
13641
  kind: "mutation",
13582
- auth: "admin"
13642
+ auth: "admin",
13643
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13583
13644
  }), method(object({}), _void(), {
13584
13645
  kind: "mutation",
13585
13646
  auth: "admin"
13586
13647
  }), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
13587
13648
  kind: "mutation",
13588
- auth: "admin"
13649
+ auth: "admin",
13650
+ timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
13589
13651
  }), method(object({ file: string() }), _void(), {
13590
13652
  kind: "mutation",
13591
13653
  auth: "admin"
@@ -13753,7 +13815,13 @@ var ProfileRefInputSchema = object({
13753
13815
  addonId: string(),
13754
13816
  profileId: string()
13755
13817
  });
13756
- method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({
13818
+ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
13819
+ kind: "mutation",
13820
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13821
+ }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
13822
+ kind: "mutation",
13823
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13824
+ }), method(object({
13757
13825
  addonId: string().optional(),
13758
13826
  requestId: string()
13759
13827
  }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
@@ -13764,7 +13832,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
13764
13832
  auth: "admin"
13765
13833
  }), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
13766
13834
  kind: "mutation",
13767
- auth: "admin"
13835
+ auth: "admin",
13836
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13768
13837
  }), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
13769
13838
  selector: LlmDefaultSelectorSchema,
13770
13839
  profileId: string().nullable()
@@ -30352,6 +30421,12 @@ Object.freeze({
30352
30421
  addonId: null,
30353
30422
  access: "view"
30354
30423
  },
30424
+ "deviceManager.migrateDevice": {
30425
+ capName: "device-manager",
30426
+ capScope: "system",
30427
+ addonId: null,
30428
+ access: "create"
30429
+ },
30355
30430
  "deviceManager.persistConfig": {
30356
30431
  capName: "device-manager",
30357
30432
  capScope: "system",
@@ -7742,7 +7742,8 @@ var OpsLogReasonSchema = _enum([
7742
7742
  "quota",
7743
7743
  "manual",
7744
7744
  "operator",
7745
- "maintenance"
7745
+ "maintenance",
7746
+ "orphaned-device"
7746
7747
  ]);
7747
7748
  /** One audit row, shared verbatim by both domains. */
7748
7749
  var OpsLogEntrySchema = object({
@@ -12822,10 +12823,39 @@ var DevicePersistConfigPayloadSchema = object({
12822
12823
  deviceId: number(),
12823
12824
  data: record(string(), unknown())
12824
12825
  });
12826
+ /** What a migration actually did, per switch. `unreachable` is a first-class
12827
+ * answer: a camera that could not be asked is not a camera that was silenced. */
12828
+ var MigrateSwitchOutcomeSchema = _enum([
12829
+ "off",
12830
+ "on",
12831
+ "not-offered",
12832
+ "unreachable"
12833
+ ]);
12834
+ var MigrateSwitchReportSchema = object({
12835
+ deviceId: number(),
12836
+ switchId: CameraSwitchIdSchema,
12837
+ outcome: MigrateSwitchOutcomeSchema,
12838
+ detail: string().optional()
12839
+ });
12840
+ var MigrateDeviceResultSchema = object({
12841
+ sourceId: number(),
12842
+ targetId: number(),
12843
+ switches: array(MigrateSwitchReportSchema).readonly(),
12844
+ /** Switches that could NOT be turned off on the source. Empty is the only
12845
+ * value meaning the replaced hardware is quiet. */
12846
+ sourceStillLive: array(CameraSwitchIdSchema).readonly(),
12847
+ swapped: boolean()
12848
+ });
12825
12849
  method(object({
12826
12850
  addonId: string(),
12827
12851
  stableId: string()
12828
- }), object({ id: number() }), { kind: "mutation" }), method(DeviceRegisterPayloadSchema, _void(), { kind: "mutation" }), method(DeviceRemovePayloadSchema, _void(), { kind: "mutation" }), method(DevicePersistConfigPayloadSchema, _void(), { kind: "mutation" }), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), DeviceMetaSchema.nullable()), method(object({
12852
+ }), object({ id: number() }), { kind: "mutation" }), method(object({
12853
+ sourceId: number(),
12854
+ targetId: number()
12855
+ }), MigrateDeviceResultSchema, {
12856
+ kind: "mutation",
12857
+ auth: "admin"
12858
+ }), method(DeviceRegisterPayloadSchema, _void(), { kind: "mutation" }), method(DeviceRemovePayloadSchema, _void(), { kind: "mutation" }), method(DevicePersistConfigPayloadSchema, _void(), { kind: "mutation" }), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), DeviceMetaSchema.nullable()), method(object({
12829
12859
  deviceId: number(),
12830
12860
  name: string()
12831
12861
  }), _void(), {
@@ -13300,6 +13330,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
13300
13330
  auth: "admin"
13301
13331
  });
13302
13332
  /**
13333
+ * Transport bounds for AI capability methods.
13334
+ *
13335
+ * Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
13336
+ * each other: declaring the constant in either one hands the other `undefined`
13337
+ * at module-init time, and an undefined `timeoutMs` silently falls back to the
13338
+ * kernel's 60 s default — the exact failure this constant exists to prevent,
13339
+ * reintroduced invisibly. Found by the guard, not by review.
13340
+ */
13341
+ /**
13342
+ * Ceiling for a cap method that runs inference or loads a model.
13343
+ *
13344
+ * Deliberately far above anything the AI layer itself may wait for (a summary
13345
+ * asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
13346
+ * never be the layer that gives up first: when it does, the failure is
13347
+ * reported as a transport error for a model that was still thinking, naming
13348
+ * the wrong layer and hiding the real one.
13349
+ *
13350
+ * Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
13351
+ * more on a cold model load. With no declaration every digest failed at
13352
+ * exactly 60 s and shipped without its text.
13353
+ *
13354
+ * A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
13355
+ * the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
13356
+ * decide when to stop, because only they can say WHY.
13357
+ */
13358
+ var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
13359
+ /** A multi-gigabyte download. An hour is not generous, it is honest. */
13360
+ var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
13361
+ /**
13303
13362
  * Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
13304
13363
  * surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
13305
13364
  * caps stay wire-compatible without a circular cap→cap import.
@@ -13571,16 +13630,19 @@ method(LlmGenerateBaseInputSchema.extend({
13571
13630
  timeoutMs: number().int().positive().optional()
13572
13631
  }), LlmGenerateResultSchema, {
13573
13632
  kind: "mutation",
13574
- auth: "admin"
13633
+ auth: "admin",
13634
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13575
13635
  }), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
13576
13636
  kind: "mutation",
13577
- auth: "admin"
13637
+ auth: "admin",
13638
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13578
13639
  }), method(object({}), _void(), {
13579
13640
  kind: "mutation",
13580
13641
  auth: "admin"
13581
13642
  }), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
13582
13643
  kind: "mutation",
13583
- auth: "admin"
13644
+ auth: "admin",
13645
+ timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
13584
13646
  }), method(object({ file: string() }), _void(), {
13585
13647
  kind: "mutation",
13586
13648
  auth: "admin"
@@ -13748,7 +13810,13 @@ var ProfileRefInputSchema = object({
13748
13810
  addonId: string(),
13749
13811
  profileId: string()
13750
13812
  });
13751
- method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({
13813
+ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
13814
+ kind: "mutation",
13815
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13816
+ }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
13817
+ kind: "mutation",
13818
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13819
+ }), method(object({
13752
13820
  addonId: string().optional(),
13753
13821
  requestId: string()
13754
13822
  }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
@@ -13759,7 +13827,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
13759
13827
  auth: "admin"
13760
13828
  }), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
13761
13829
  kind: "mutation",
13762
- auth: "admin"
13830
+ auth: "admin",
13831
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13763
13832
  }), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
13764
13833
  selector: LlmDefaultSelectorSchema,
13765
13834
  profileId: string().nullable()
@@ -30347,6 +30416,12 @@ Object.freeze({
30347
30416
  addonId: null,
30348
30417
  access: "view"
30349
30418
  },
30419
+ "deviceManager.migrateDevice": {
30420
+ capName: "device-manager",
30421
+ capScope: "system",
30422
+ addonId: null,
30423
+ access: "create"
30424
+ },
30350
30425
  "deviceManager.persistConfig": {
30351
30426
  capName: "device-manager",
30352
30427
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-mqtt-broker",
3
- "version": "1.2.52",
3
+ "version": "1.2.55",
4
4
  "description": "MQTT broker registry addon for CamStack — manages external broker entries + an optional embedded aedes broker. Consumers spin up their own `mqtt.js` clients via the `mqtt-broker` cap.",
5
5
  "keywords": [
6
6
  "camstack",