@camstack/addon-provider-onvif 1.2.51 → 1.2.54

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
@@ -7717,7 +7717,8 @@ var OpsLogReasonSchema = _enum([
7717
7717
  "quota",
7718
7718
  "manual",
7719
7719
  "operator",
7720
- "maintenance"
7720
+ "maintenance",
7721
+ "orphaned-device"
7721
7722
  ]);
7722
7723
  /** One audit row, shared verbatim by both domains. */
7723
7724
  var OpsLogEntrySchema = object({
@@ -12803,10 +12804,39 @@ var DevicePersistConfigPayloadSchema = object({
12803
12804
  deviceId: number(),
12804
12805
  data: record(string(), unknown())
12805
12806
  });
12807
+ /** What a migration actually did, per switch. `unreachable` is a first-class
12808
+ * answer: a camera that could not be asked is not a camera that was silenced. */
12809
+ var MigrateSwitchOutcomeSchema = _enum([
12810
+ "off",
12811
+ "on",
12812
+ "not-offered",
12813
+ "unreachable"
12814
+ ]);
12815
+ var MigrateSwitchReportSchema = object({
12816
+ deviceId: number(),
12817
+ switchId: CameraSwitchIdSchema,
12818
+ outcome: MigrateSwitchOutcomeSchema,
12819
+ detail: string().optional()
12820
+ });
12821
+ var MigrateDeviceResultSchema = object({
12822
+ sourceId: number(),
12823
+ targetId: number(),
12824
+ switches: array(MigrateSwitchReportSchema).readonly(),
12825
+ /** Switches that could NOT be turned off on the source. Empty is the only
12826
+ * value meaning the replaced hardware is quiet. */
12827
+ sourceStillLive: array(CameraSwitchIdSchema).readonly(),
12828
+ swapped: boolean()
12829
+ });
12806
12830
  method(object({
12807
12831
  addonId: string(),
12808
12832
  stableId: string()
12809
- }), 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({
12833
+ }), object({ id: number() }), { kind: "mutation" }), method(object({
12834
+ sourceId: number(),
12835
+ targetId: number()
12836
+ }), MigrateDeviceResultSchema, {
12837
+ kind: "mutation",
12838
+ auth: "admin"
12839
+ }), 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({
12810
12840
  deviceId: number(),
12811
12841
  name: string()
12812
12842
  }), _void(), {
@@ -13281,6 +13311,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
13281
13311
  auth: "admin"
13282
13312
  });
13283
13313
  /**
13314
+ * Transport bounds for AI capability methods.
13315
+ *
13316
+ * Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
13317
+ * each other: declaring the constant in either one hands the other `undefined`
13318
+ * at module-init time, and an undefined `timeoutMs` silently falls back to the
13319
+ * kernel's 60 s default — the exact failure this constant exists to prevent,
13320
+ * reintroduced invisibly. Found by the guard, not by review.
13321
+ */
13322
+ /**
13323
+ * Ceiling for a cap method that runs inference or loads a model.
13324
+ *
13325
+ * Deliberately far above anything the AI layer itself may wait for (a summary
13326
+ * asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
13327
+ * never be the layer that gives up first: when it does, the failure is
13328
+ * reported as a transport error for a model that was still thinking, naming
13329
+ * the wrong layer and hiding the real one.
13330
+ *
13331
+ * Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
13332
+ * more on a cold model load. With no declaration every digest failed at
13333
+ * exactly 60 s and shipped without its text.
13334
+ *
13335
+ * A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
13336
+ * the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
13337
+ * decide when to stop, because only they can say WHY.
13338
+ */
13339
+ var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
13340
+ /** A multi-gigabyte download. An hour is not generous, it is honest. */
13341
+ var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
13342
+ /**
13284
13343
  * Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
13285
13344
  * surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
13286
13345
  * caps stay wire-compatible without a circular cap→cap import.
@@ -13552,16 +13611,19 @@ method(LlmGenerateBaseInputSchema.extend({
13552
13611
  timeoutMs: number().int().positive().optional()
13553
13612
  }), LlmGenerateResultSchema, {
13554
13613
  kind: "mutation",
13555
- auth: "admin"
13614
+ auth: "admin",
13615
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13556
13616
  }), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
13557
13617
  kind: "mutation",
13558
- auth: "admin"
13618
+ auth: "admin",
13619
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13559
13620
  }), method(object({}), _void(), {
13560
13621
  kind: "mutation",
13561
13622
  auth: "admin"
13562
13623
  }), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
13563
13624
  kind: "mutation",
13564
- auth: "admin"
13625
+ auth: "admin",
13626
+ timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
13565
13627
  }), method(object({ file: string() }), _void(), {
13566
13628
  kind: "mutation",
13567
13629
  auth: "admin"
@@ -13729,7 +13791,13 @@ var ProfileRefInputSchema = object({
13729
13791
  addonId: string(),
13730
13792
  profileId: string()
13731
13793
  });
13732
- method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({
13794
+ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
13795
+ kind: "mutation",
13796
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13797
+ }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
13798
+ kind: "mutation",
13799
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13800
+ }), method(object({
13733
13801
  addonId: string().optional(),
13734
13802
  requestId: string()
13735
13803
  }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
@@ -13740,7 +13808,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
13740
13808
  auth: "admin"
13741
13809
  }), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
13742
13810
  kind: "mutation",
13743
- auth: "admin"
13811
+ auth: "admin",
13812
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13744
13813
  }), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
13745
13814
  selector: LlmDefaultSelectorSchema,
13746
13815
  profileId: string().nullable()
@@ -30865,6 +30934,12 @@ Object.freeze({
30865
30934
  addonId: null,
30866
30935
  access: "view"
30867
30936
  },
30937
+ "deviceManager.migrateDevice": {
30938
+ capName: "device-manager",
30939
+ capScope: "system",
30940
+ addonId: null,
30941
+ access: "create"
30942
+ },
30868
30943
  "deviceManager.persistConfig": {
30869
30944
  capName: "device-manager",
30870
30945
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -7718,7 +7718,8 @@ var OpsLogReasonSchema = _enum([
7718
7718
  "quota",
7719
7719
  "manual",
7720
7720
  "operator",
7721
- "maintenance"
7721
+ "maintenance",
7722
+ "orphaned-device"
7722
7723
  ]);
7723
7724
  /** One audit row, shared verbatim by both domains. */
7724
7725
  var OpsLogEntrySchema = object({
@@ -12804,10 +12805,39 @@ var DevicePersistConfigPayloadSchema = object({
12804
12805
  deviceId: number(),
12805
12806
  data: record(string(), unknown())
12806
12807
  });
12808
+ /** What a migration actually did, per switch. `unreachable` is a first-class
12809
+ * answer: a camera that could not be asked is not a camera that was silenced. */
12810
+ var MigrateSwitchOutcomeSchema = _enum([
12811
+ "off",
12812
+ "on",
12813
+ "not-offered",
12814
+ "unreachable"
12815
+ ]);
12816
+ var MigrateSwitchReportSchema = object({
12817
+ deviceId: number(),
12818
+ switchId: CameraSwitchIdSchema,
12819
+ outcome: MigrateSwitchOutcomeSchema,
12820
+ detail: string().optional()
12821
+ });
12822
+ var MigrateDeviceResultSchema = object({
12823
+ sourceId: number(),
12824
+ targetId: number(),
12825
+ switches: array(MigrateSwitchReportSchema).readonly(),
12826
+ /** Switches that could NOT be turned off on the source. Empty is the only
12827
+ * value meaning the replaced hardware is quiet. */
12828
+ sourceStillLive: array(CameraSwitchIdSchema).readonly(),
12829
+ swapped: boolean()
12830
+ });
12807
12831
  method(object({
12808
12832
  addonId: string(),
12809
12833
  stableId: string()
12810
- }), 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({
12834
+ }), object({ id: number() }), { kind: "mutation" }), method(object({
12835
+ sourceId: number(),
12836
+ targetId: number()
12837
+ }), MigrateDeviceResultSchema, {
12838
+ kind: "mutation",
12839
+ auth: "admin"
12840
+ }), 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({
12811
12841
  deviceId: number(),
12812
12842
  name: string()
12813
12843
  }), _void(), {
@@ -13282,6 +13312,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
13282
13312
  auth: "admin"
13283
13313
  });
13284
13314
  /**
13315
+ * Transport bounds for AI capability methods.
13316
+ *
13317
+ * Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
13318
+ * each other: declaring the constant in either one hands the other `undefined`
13319
+ * at module-init time, and an undefined `timeoutMs` silently falls back to the
13320
+ * kernel's 60 s default — the exact failure this constant exists to prevent,
13321
+ * reintroduced invisibly. Found by the guard, not by review.
13322
+ */
13323
+ /**
13324
+ * Ceiling for a cap method that runs inference or loads a model.
13325
+ *
13326
+ * Deliberately far above anything the AI layer itself may wait for (a summary
13327
+ * asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
13328
+ * never be the layer that gives up first: when it does, the failure is
13329
+ * reported as a transport error for a model that was still thinking, naming
13330
+ * the wrong layer and hiding the real one.
13331
+ *
13332
+ * Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
13333
+ * more on a cold model load. With no declaration every digest failed at
13334
+ * exactly 60 s and shipped without its text.
13335
+ *
13336
+ * A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
13337
+ * the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
13338
+ * decide when to stop, because only they can say WHY.
13339
+ */
13340
+ var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
13341
+ /** A multi-gigabyte download. An hour is not generous, it is honest. */
13342
+ var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
13343
+ /**
13285
13344
  * Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
13286
13345
  * surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
13287
13346
  * caps stay wire-compatible without a circular cap→cap import.
@@ -13553,16 +13612,19 @@ method(LlmGenerateBaseInputSchema.extend({
13553
13612
  timeoutMs: number().int().positive().optional()
13554
13613
  }), LlmGenerateResultSchema, {
13555
13614
  kind: "mutation",
13556
- auth: "admin"
13615
+ auth: "admin",
13616
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13557
13617
  }), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
13558
13618
  kind: "mutation",
13559
- auth: "admin"
13619
+ auth: "admin",
13620
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13560
13621
  }), method(object({}), _void(), {
13561
13622
  kind: "mutation",
13562
13623
  auth: "admin"
13563
13624
  }), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
13564
13625
  kind: "mutation",
13565
- auth: "admin"
13626
+ auth: "admin",
13627
+ timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
13566
13628
  }), method(object({ file: string() }), _void(), {
13567
13629
  kind: "mutation",
13568
13630
  auth: "admin"
@@ -13730,7 +13792,13 @@ var ProfileRefInputSchema = object({
13730
13792
  addonId: string(),
13731
13793
  profileId: string()
13732
13794
  });
13733
- method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({
13795
+ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
13796
+ kind: "mutation",
13797
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13798
+ }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
13799
+ kind: "mutation",
13800
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13801
+ }), method(object({
13734
13802
  addonId: string().optional(),
13735
13803
  requestId: string()
13736
13804
  }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
@@ -13741,7 +13809,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
13741
13809
  auth: "admin"
13742
13810
  }), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
13743
13811
  kind: "mutation",
13744
- auth: "admin"
13812
+ auth: "admin",
13813
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13745
13814
  }), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
13746
13815
  selector: LlmDefaultSelectorSchema,
13747
13816
  profileId: string().nullable()
@@ -30866,6 +30935,12 @@ Object.freeze({
30866
30935
  addonId: null,
30867
30936
  access: "view"
30868
30937
  },
30938
+ "deviceManager.migrateDevice": {
30939
+ capName: "device-manager",
30940
+ capScope: "system",
30941
+ addonId: null,
30942
+ access: "create"
30943
+ },
30869
30944
  "deviceManager.persistConfig": {
30870
30945
  capName: "device-manager",
30871
30946
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-onvif",
3
- "version": "1.2.51",
3
+ "version": "1.2.54",
4
4
  "description": "ONVIF camera device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",