@camstack/addon-provider-reolink 1.2.75 → 1.2.78

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
@@ -8008,7 +8008,8 @@ var OpsLogReasonSchema = _enum([
8008
8008
  "quota",
8009
8009
  "manual",
8010
8010
  "operator",
8011
- "maintenance"
8011
+ "maintenance",
8012
+ "orphaned-device"
8012
8013
  ]);
8013
8014
  /** One audit row, shared verbatim by both domains. */
8014
8015
  var OpsLogEntrySchema = object({
@@ -13596,10 +13597,39 @@ var DevicePersistConfigPayloadSchema = object({
13596
13597
  deviceId: number(),
13597
13598
  data: record(string(), unknown())
13598
13599
  });
13600
+ /** What a migration actually did, per switch. `unreachable` is a first-class
13601
+ * answer: a camera that could not be asked is not a camera that was silenced. */
13602
+ var MigrateSwitchOutcomeSchema = _enum([
13603
+ "off",
13604
+ "on",
13605
+ "not-offered",
13606
+ "unreachable"
13607
+ ]);
13608
+ var MigrateSwitchReportSchema = object({
13609
+ deviceId: number(),
13610
+ switchId: CameraSwitchIdSchema,
13611
+ outcome: MigrateSwitchOutcomeSchema,
13612
+ detail: string().optional()
13613
+ });
13614
+ var MigrateDeviceResultSchema = object({
13615
+ sourceId: number(),
13616
+ targetId: number(),
13617
+ switches: array(MigrateSwitchReportSchema).readonly(),
13618
+ /** Switches that could NOT be turned off on the source. Empty is the only
13619
+ * value meaning the replaced hardware is quiet. */
13620
+ sourceStillLive: array(CameraSwitchIdSchema).readonly(),
13621
+ swapped: boolean()
13622
+ });
13599
13623
  method(object({
13600
13624
  addonId: string(),
13601
13625
  stableId: string()
13602
- }), 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({
13626
+ }), object({ id: number() }), { kind: "mutation" }), method(object({
13627
+ sourceId: number(),
13628
+ targetId: number()
13629
+ }), MigrateDeviceResultSchema, {
13630
+ kind: "mutation",
13631
+ auth: "admin"
13632
+ }), 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({
13603
13633
  deviceId: number(),
13604
13634
  name: string()
13605
13635
  }), _void(), {
@@ -14093,6 +14123,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
14093
14123
  auth: "admin"
14094
14124
  });
14095
14125
  /**
14126
+ * Transport bounds for AI capability methods.
14127
+ *
14128
+ * Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
14129
+ * each other: declaring the constant in either one hands the other `undefined`
14130
+ * at module-init time, and an undefined `timeoutMs` silently falls back to the
14131
+ * kernel's 60 s default — the exact failure this constant exists to prevent,
14132
+ * reintroduced invisibly. Found by the guard, not by review.
14133
+ */
14134
+ /**
14135
+ * Ceiling for a cap method that runs inference or loads a model.
14136
+ *
14137
+ * Deliberately far above anything the AI layer itself may wait for (a summary
14138
+ * asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
14139
+ * never be the layer that gives up first: when it does, the failure is
14140
+ * reported as a transport error for a model that was still thinking, naming
14141
+ * the wrong layer and hiding the real one.
14142
+ *
14143
+ * Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
14144
+ * more on a cold model load. With no declaration every digest failed at
14145
+ * exactly 60 s and shipped without its text.
14146
+ *
14147
+ * A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
14148
+ * the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
14149
+ * decide when to stop, because only they can say WHY.
14150
+ */
14151
+ var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
14152
+ /** A multi-gigabyte download. An hour is not generous, it is honest. */
14153
+ var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
14154
+ /**
14096
14155
  * Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
14097
14156
  * surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
14098
14157
  * caps stay wire-compatible without a circular cap→cap import.
@@ -14364,16 +14423,19 @@ method(LlmGenerateBaseInputSchema.extend({
14364
14423
  timeoutMs: number().int().positive().optional()
14365
14424
  }), LlmGenerateResultSchema, {
14366
14425
  kind: "mutation",
14367
- auth: "admin"
14426
+ auth: "admin",
14427
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14368
14428
  }), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
14369
14429
  kind: "mutation",
14370
- auth: "admin"
14430
+ auth: "admin",
14431
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14371
14432
  }), method(object({}), _void(), {
14372
14433
  kind: "mutation",
14373
14434
  auth: "admin"
14374
14435
  }), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
14375
14436
  kind: "mutation",
14376
- auth: "admin"
14437
+ auth: "admin",
14438
+ timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
14377
14439
  }), method(object({ file: string() }), _void(), {
14378
14440
  kind: "mutation",
14379
14441
  auth: "admin"
@@ -14541,7 +14603,13 @@ var ProfileRefInputSchema = object({
14541
14603
  addonId: string(),
14542
14604
  profileId: string()
14543
14605
  });
14544
- method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({
14606
+ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
14607
+ kind: "mutation",
14608
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14609
+ }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
14610
+ kind: "mutation",
14611
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14612
+ }), method(object({
14545
14613
  addonId: string().optional(),
14546
14614
  requestId: string()
14547
14615
  }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
@@ -14552,7 +14620,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
14552
14620
  auth: "admin"
14553
14621
  }), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
14554
14622
  kind: "mutation",
14555
- auth: "admin"
14623
+ auth: "admin",
14624
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14556
14625
  }), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
14557
14626
  selector: LlmDefaultSelectorSchema,
14558
14627
  profileId: string().nullable()
@@ -35190,6 +35259,12 @@ Object.freeze({
35190
35259
  addonId: null,
35191
35260
  access: "view"
35192
35261
  },
35262
+ "deviceManager.migrateDevice": {
35263
+ capName: "device-manager",
35264
+ capScope: "system",
35265
+ addonId: null,
35266
+ access: "create"
35267
+ },
35193
35268
  "deviceManager.persistConfig": {
35194
35269
  capName: "device-manager",
35195
35270
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -8003,7 +8003,8 @@ var OpsLogReasonSchema = _enum([
8003
8003
  "quota",
8004
8004
  "manual",
8005
8005
  "operator",
8006
- "maintenance"
8006
+ "maintenance",
8007
+ "orphaned-device"
8007
8008
  ]);
8008
8009
  /** One audit row, shared verbatim by both domains. */
8009
8010
  var OpsLogEntrySchema = object({
@@ -13591,10 +13592,39 @@ var DevicePersistConfigPayloadSchema = object({
13591
13592
  deviceId: number(),
13592
13593
  data: record(string(), unknown())
13593
13594
  });
13595
+ /** What a migration actually did, per switch. `unreachable` is a first-class
13596
+ * answer: a camera that could not be asked is not a camera that was silenced. */
13597
+ var MigrateSwitchOutcomeSchema = _enum([
13598
+ "off",
13599
+ "on",
13600
+ "not-offered",
13601
+ "unreachable"
13602
+ ]);
13603
+ var MigrateSwitchReportSchema = object({
13604
+ deviceId: number(),
13605
+ switchId: CameraSwitchIdSchema,
13606
+ outcome: MigrateSwitchOutcomeSchema,
13607
+ detail: string().optional()
13608
+ });
13609
+ var MigrateDeviceResultSchema = object({
13610
+ sourceId: number(),
13611
+ targetId: number(),
13612
+ switches: array(MigrateSwitchReportSchema).readonly(),
13613
+ /** Switches that could NOT be turned off on the source. Empty is the only
13614
+ * value meaning the replaced hardware is quiet. */
13615
+ sourceStillLive: array(CameraSwitchIdSchema).readonly(),
13616
+ swapped: boolean()
13617
+ });
13594
13618
  method(object({
13595
13619
  addonId: string(),
13596
13620
  stableId: string()
13597
- }), 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({
13621
+ }), object({ id: number() }), { kind: "mutation" }), method(object({
13622
+ sourceId: number(),
13623
+ targetId: number()
13624
+ }), MigrateDeviceResultSchema, {
13625
+ kind: "mutation",
13626
+ auth: "admin"
13627
+ }), 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({
13598
13628
  deviceId: number(),
13599
13629
  name: string()
13600
13630
  }), _void(), {
@@ -14088,6 +14118,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
14088
14118
  auth: "admin"
14089
14119
  });
14090
14120
  /**
14121
+ * Transport bounds for AI capability methods.
14122
+ *
14123
+ * Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
14124
+ * each other: declaring the constant in either one hands the other `undefined`
14125
+ * at module-init time, and an undefined `timeoutMs` silently falls back to the
14126
+ * kernel's 60 s default — the exact failure this constant exists to prevent,
14127
+ * reintroduced invisibly. Found by the guard, not by review.
14128
+ */
14129
+ /**
14130
+ * Ceiling for a cap method that runs inference or loads a model.
14131
+ *
14132
+ * Deliberately far above anything the AI layer itself may wait for (a summary
14133
+ * asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
14134
+ * never be the layer that gives up first: when it does, the failure is
14135
+ * reported as a transport error for a model that was still thinking, naming
14136
+ * the wrong layer and hiding the real one.
14137
+ *
14138
+ * Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
14139
+ * more on a cold model load. With no declaration every digest failed at
14140
+ * exactly 60 s and shipped without its text.
14141
+ *
14142
+ * A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
14143
+ * the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
14144
+ * decide when to stop, because only they can say WHY.
14145
+ */
14146
+ var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
14147
+ /** A multi-gigabyte download. An hour is not generous, it is honest. */
14148
+ var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
14149
+ /**
14091
14150
  * Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
14092
14151
  * surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
14093
14152
  * caps stay wire-compatible without a circular cap→cap import.
@@ -14359,16 +14418,19 @@ method(LlmGenerateBaseInputSchema.extend({
14359
14418
  timeoutMs: number().int().positive().optional()
14360
14419
  }), LlmGenerateResultSchema, {
14361
14420
  kind: "mutation",
14362
- auth: "admin"
14421
+ auth: "admin",
14422
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14363
14423
  }), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
14364
14424
  kind: "mutation",
14365
- auth: "admin"
14425
+ auth: "admin",
14426
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14366
14427
  }), method(object({}), _void(), {
14367
14428
  kind: "mutation",
14368
14429
  auth: "admin"
14369
14430
  }), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
14370
14431
  kind: "mutation",
14371
- auth: "admin"
14432
+ auth: "admin",
14433
+ timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
14372
14434
  }), method(object({ file: string() }), _void(), {
14373
14435
  kind: "mutation",
14374
14436
  auth: "admin"
@@ -14536,7 +14598,13 @@ var ProfileRefInputSchema = object({
14536
14598
  addonId: string(),
14537
14599
  profileId: string()
14538
14600
  });
14539
- method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({
14601
+ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
14602
+ kind: "mutation",
14603
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14604
+ }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
14605
+ kind: "mutation",
14606
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14607
+ }), method(object({
14540
14608
  addonId: string().optional(),
14541
14609
  requestId: string()
14542
14610
  }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
@@ -14547,7 +14615,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
14547
14615
  auth: "admin"
14548
14616
  }), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
14549
14617
  kind: "mutation",
14550
- auth: "admin"
14618
+ auth: "admin",
14619
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14551
14620
  }), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
14552
14621
  selector: LlmDefaultSelectorSchema,
14553
14622
  profileId: string().nullable()
@@ -35185,6 +35254,12 @@ Object.freeze({
35185
35254
  addonId: null,
35186
35255
  access: "view"
35187
35256
  },
35257
+ "deviceManager.migrateDevice": {
35258
+ capName: "device-manager",
35259
+ capScope: "system",
35260
+ addonId: null,
35261
+ access: "create"
35262
+ },
35188
35263
  "deviceManager.persistConfig": {
35189
35264
  capName: "device-manager",
35190
35265
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-reolink",
3
- "version": "1.2.75",
3
+ "version": "1.2.78",
4
4
  "description": "Reolink camera device provider addon for CamStack — native Baichuan protocol",
5
5
  "keywords": [
6
6
  "camstack",