@camstack/addon-provider-dreame 0.2.52 → 0.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.
package/dist/addon.js CHANGED
@@ -58223,7 +58223,8 @@ var OpsLogReasonSchema = _enum([
58223
58223
  "quota",
58224
58224
  "manual",
58225
58225
  "operator",
58226
- "maintenance"
58226
+ "maintenance",
58227
+ "orphaned-device"
58227
58228
  ]);
58228
58229
  /** One audit row, shared verbatim by both domains. */
58229
58230
  var OpsLogEntrySchema = object({
@@ -63535,10 +63536,39 @@ var DevicePersistConfigPayloadSchema = object({
63535
63536
  deviceId: number(),
63536
63537
  data: record(string(), unknown())
63537
63538
  });
63539
+ /** What a migration actually did, per switch. `unreachable` is a first-class
63540
+ * answer: a camera that could not be asked is not a camera that was silenced. */
63541
+ var MigrateSwitchOutcomeSchema = _enum([
63542
+ "off",
63543
+ "on",
63544
+ "not-offered",
63545
+ "unreachable"
63546
+ ]);
63547
+ var MigrateSwitchReportSchema = object({
63548
+ deviceId: number(),
63549
+ switchId: CameraSwitchIdSchema,
63550
+ outcome: MigrateSwitchOutcomeSchema,
63551
+ detail: string().optional()
63552
+ });
63553
+ var MigrateDeviceResultSchema = object({
63554
+ sourceId: number(),
63555
+ targetId: number(),
63556
+ switches: array(MigrateSwitchReportSchema).readonly(),
63557
+ /** Switches that could NOT be turned off on the source. Empty is the only
63558
+ * value meaning the replaced hardware is quiet. */
63559
+ sourceStillLive: array(CameraSwitchIdSchema).readonly(),
63560
+ swapped: boolean()
63561
+ });
63538
63562
  method(object({
63539
63563
  addonId: string(),
63540
63564
  stableId: string()
63541
- }), 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({
63565
+ }), object({ id: number() }), { kind: "mutation" }), method(object({
63566
+ sourceId: number(),
63567
+ targetId: number()
63568
+ }), MigrateDeviceResultSchema, {
63569
+ kind: "mutation",
63570
+ auth: "admin"
63571
+ }), 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({
63542
63572
  deviceId: number(),
63543
63573
  name: string()
63544
63574
  }), _void(), {
@@ -64013,6 +64043,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
64013
64043
  auth: "admin"
64014
64044
  });
64015
64045
  /**
64046
+ * Transport bounds for AI capability methods.
64047
+ *
64048
+ * Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
64049
+ * each other: declaring the constant in either one hands the other `undefined`
64050
+ * at module-init time, and an undefined `timeoutMs` silently falls back to the
64051
+ * kernel's 60 s default — the exact failure this constant exists to prevent,
64052
+ * reintroduced invisibly. Found by the guard, not by review.
64053
+ */
64054
+ /**
64055
+ * Ceiling for a cap method that runs inference or loads a model.
64056
+ *
64057
+ * Deliberately far above anything the AI layer itself may wait for (a summary
64058
+ * asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
64059
+ * never be the layer that gives up first: when it does, the failure is
64060
+ * reported as a transport error for a model that was still thinking, naming
64061
+ * the wrong layer and hiding the real one.
64062
+ *
64063
+ * Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
64064
+ * more on a cold model load. With no declaration every digest failed at
64065
+ * exactly 60 s and shipped without its text.
64066
+ *
64067
+ * A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
64068
+ * the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
64069
+ * decide when to stop, because only they can say WHY.
64070
+ */
64071
+ var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
64072
+ /** A multi-gigabyte download. An hour is not generous, it is honest. */
64073
+ var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
64074
+ /**
64016
64075
  * Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
64017
64076
  * surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
64018
64077
  * caps stay wire-compatible without a circular cap→cap import.
@@ -64284,16 +64343,19 @@ method(LlmGenerateBaseInputSchema.extend({
64284
64343
  timeoutMs: number().int().positive().optional()
64285
64344
  }), LlmGenerateResultSchema, {
64286
64345
  kind: "mutation",
64287
- auth: "admin"
64346
+ auth: "admin",
64347
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
64288
64348
  }), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
64289
64349
  kind: "mutation",
64290
- auth: "admin"
64350
+ auth: "admin",
64351
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
64291
64352
  }), method(object({}), _void(), {
64292
64353
  kind: "mutation",
64293
64354
  auth: "admin"
64294
64355
  }), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
64295
64356
  kind: "mutation",
64296
- auth: "admin"
64357
+ auth: "admin",
64358
+ timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
64297
64359
  }), method(object({ file: string() }), _void(), {
64298
64360
  kind: "mutation",
64299
64361
  auth: "admin"
@@ -64461,7 +64523,13 @@ var ProfileRefInputSchema = object({
64461
64523
  addonId: string(),
64462
64524
  profileId: string()
64463
64525
  });
64464
- method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({
64526
+ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
64527
+ kind: "mutation",
64528
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
64529
+ }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
64530
+ kind: "mutation",
64531
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
64532
+ }), method(object({
64465
64533
  addonId: string().optional(),
64466
64534
  requestId: string()
64467
64535
  }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
@@ -64472,7 +64540,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
64472
64540
  auth: "admin"
64473
64541
  }), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
64474
64542
  kind: "mutation",
64475
- auth: "admin"
64543
+ auth: "admin",
64544
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
64476
64545
  }), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
64477
64546
  selector: LlmDefaultSelectorSchema,
64478
64547
  profileId: string().nullable()
@@ -84558,6 +84627,12 @@ Object.freeze({
84558
84627
  addonId: null,
84559
84628
  access: "view"
84560
84629
  },
84630
+ "deviceManager.migrateDevice": {
84631
+ capName: "device-manager",
84632
+ capScope: "system",
84633
+ addonId: null,
84634
+ access: "create"
84635
+ },
84561
84636
  "deviceManager.persistConfig": {
84562
84637
  capName: "device-manager",
84563
84638
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -58223,7 +58223,8 @@ var OpsLogReasonSchema = _enum([
58223
58223
  "quota",
58224
58224
  "manual",
58225
58225
  "operator",
58226
- "maintenance"
58226
+ "maintenance",
58227
+ "orphaned-device"
58227
58228
  ]);
58228
58229
  /** One audit row, shared verbatim by both domains. */
58229
58230
  var OpsLogEntrySchema = object({
@@ -63535,10 +63536,39 @@ var DevicePersistConfigPayloadSchema = object({
63535
63536
  deviceId: number(),
63536
63537
  data: record(string(), unknown())
63537
63538
  });
63539
+ /** What a migration actually did, per switch. `unreachable` is a first-class
63540
+ * answer: a camera that could not be asked is not a camera that was silenced. */
63541
+ var MigrateSwitchOutcomeSchema = _enum([
63542
+ "off",
63543
+ "on",
63544
+ "not-offered",
63545
+ "unreachable"
63546
+ ]);
63547
+ var MigrateSwitchReportSchema = object({
63548
+ deviceId: number(),
63549
+ switchId: CameraSwitchIdSchema,
63550
+ outcome: MigrateSwitchOutcomeSchema,
63551
+ detail: string().optional()
63552
+ });
63553
+ var MigrateDeviceResultSchema = object({
63554
+ sourceId: number(),
63555
+ targetId: number(),
63556
+ switches: array(MigrateSwitchReportSchema).readonly(),
63557
+ /** Switches that could NOT be turned off on the source. Empty is the only
63558
+ * value meaning the replaced hardware is quiet. */
63559
+ sourceStillLive: array(CameraSwitchIdSchema).readonly(),
63560
+ swapped: boolean()
63561
+ });
63538
63562
  method(object({
63539
63563
  addonId: string(),
63540
63564
  stableId: string()
63541
- }), 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({
63565
+ }), object({ id: number() }), { kind: "mutation" }), method(object({
63566
+ sourceId: number(),
63567
+ targetId: number()
63568
+ }), MigrateDeviceResultSchema, {
63569
+ kind: "mutation",
63570
+ auth: "admin"
63571
+ }), 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({
63542
63572
  deviceId: number(),
63543
63573
  name: string()
63544
63574
  }), _void(), {
@@ -64013,6 +64043,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
64013
64043
  auth: "admin"
64014
64044
  });
64015
64045
  /**
64046
+ * Transport bounds for AI capability methods.
64047
+ *
64048
+ * Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
64049
+ * each other: declaring the constant in either one hands the other `undefined`
64050
+ * at module-init time, and an undefined `timeoutMs` silently falls back to the
64051
+ * kernel's 60 s default — the exact failure this constant exists to prevent,
64052
+ * reintroduced invisibly. Found by the guard, not by review.
64053
+ */
64054
+ /**
64055
+ * Ceiling for a cap method that runs inference or loads a model.
64056
+ *
64057
+ * Deliberately far above anything the AI layer itself may wait for (a summary
64058
+ * asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
64059
+ * never be the layer that gives up first: when it does, the failure is
64060
+ * reported as a transport error for a model that was still thinking, naming
64061
+ * the wrong layer and hiding the real one.
64062
+ *
64063
+ * Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
64064
+ * more on a cold model load. With no declaration every digest failed at
64065
+ * exactly 60 s and shipped without its text.
64066
+ *
64067
+ * A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
64068
+ * the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
64069
+ * decide when to stop, because only they can say WHY.
64070
+ */
64071
+ var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
64072
+ /** A multi-gigabyte download. An hour is not generous, it is honest. */
64073
+ var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
64074
+ /**
64016
64075
  * Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
64017
64076
  * surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
64018
64077
  * caps stay wire-compatible without a circular cap→cap import.
@@ -64284,16 +64343,19 @@ method(LlmGenerateBaseInputSchema.extend({
64284
64343
  timeoutMs: number().int().positive().optional()
64285
64344
  }), LlmGenerateResultSchema, {
64286
64345
  kind: "mutation",
64287
- auth: "admin"
64346
+ auth: "admin",
64347
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
64288
64348
  }), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
64289
64349
  kind: "mutation",
64290
- auth: "admin"
64350
+ auth: "admin",
64351
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
64291
64352
  }), method(object({}), _void(), {
64292
64353
  kind: "mutation",
64293
64354
  auth: "admin"
64294
64355
  }), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
64295
64356
  kind: "mutation",
64296
- auth: "admin"
64357
+ auth: "admin",
64358
+ timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
64297
64359
  }), method(object({ file: string() }), _void(), {
64298
64360
  kind: "mutation",
64299
64361
  auth: "admin"
@@ -64461,7 +64523,13 @@ var ProfileRefInputSchema = object({
64461
64523
  addonId: string(),
64462
64524
  profileId: string()
64463
64525
  });
64464
- method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({
64526
+ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
64527
+ kind: "mutation",
64528
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
64529
+ }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
64530
+ kind: "mutation",
64531
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
64532
+ }), method(object({
64465
64533
  addonId: string().optional(),
64466
64534
  requestId: string()
64467
64535
  }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
@@ -64472,7 +64540,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
64472
64540
  auth: "admin"
64473
64541
  }), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
64474
64542
  kind: "mutation",
64475
- auth: "admin"
64543
+ auth: "admin",
64544
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
64476
64545
  }), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
64477
64546
  selector: LlmDefaultSelectorSchema,
64478
64547
  profileId: string().nullable()
@@ -84558,6 +84627,12 @@ Object.freeze({
84558
84627
  addonId: null,
84559
84628
  access: "view"
84560
84629
  },
84630
+ "deviceManager.migrateDevice": {
84631
+ capName: "device-manager",
84632
+ capScope: "system",
84633
+ addonId: null,
84634
+ access: "create"
84635
+ },
84561
84636
  "deviceManager.persistConfig": {
84562
84637
  capName: "device-manager",
84563
84638
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-dreame",
3
- "version": "0.2.52",
3
+ "version": "0.2.55",
4
4
  "description": "Dreame robot-vacuum / lawn-mower device-provider addon for CamStack — wraps the @apocaliss92/nodedreame Dreamehome cloud client",
5
5
  "keywords": [
6
6
  "camstack",