@camstack/addon-provider-gree 0.2.51 → 0.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
@@ -7721,7 +7721,8 @@ var OpsLogReasonSchema = _enum([
7721
7721
  "quota",
7722
7722
  "manual",
7723
7723
  "operator",
7724
- "maintenance"
7724
+ "maintenance",
7725
+ "orphaned-device"
7725
7726
  ]);
7726
7727
  /** One audit row, shared verbatim by both domains. */
7727
7728
  var OpsLogEntrySchema = object({
@@ -13016,10 +13017,39 @@ var DevicePersistConfigPayloadSchema = object({
13016
13017
  deviceId: number(),
13017
13018
  data: record(string(), unknown())
13018
13019
  });
13020
+ /** What a migration actually did, per switch. `unreachable` is a first-class
13021
+ * answer: a camera that could not be asked is not a camera that was silenced. */
13022
+ var MigrateSwitchOutcomeSchema = _enum([
13023
+ "off",
13024
+ "on",
13025
+ "not-offered",
13026
+ "unreachable"
13027
+ ]);
13028
+ var MigrateSwitchReportSchema = object({
13029
+ deviceId: number(),
13030
+ switchId: CameraSwitchIdSchema,
13031
+ outcome: MigrateSwitchOutcomeSchema,
13032
+ detail: string().optional()
13033
+ });
13034
+ var MigrateDeviceResultSchema = object({
13035
+ sourceId: number(),
13036
+ targetId: number(),
13037
+ switches: array(MigrateSwitchReportSchema).readonly(),
13038
+ /** Switches that could NOT be turned off on the source. Empty is the only
13039
+ * value meaning the replaced hardware is quiet. */
13040
+ sourceStillLive: array(CameraSwitchIdSchema).readonly(),
13041
+ swapped: boolean()
13042
+ });
13019
13043
  method(object({
13020
13044
  addonId: string(),
13021
13045
  stableId: string()
13022
- }), 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({
13046
+ }), object({ id: number() }), { kind: "mutation" }), method(object({
13047
+ sourceId: number(),
13048
+ targetId: number()
13049
+ }), MigrateDeviceResultSchema, {
13050
+ kind: "mutation",
13051
+ auth: "admin"
13052
+ }), 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({
13023
13053
  deviceId: number(),
13024
13054
  name: string()
13025
13055
  }), _void(), {
@@ -13494,6 +13524,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
13494
13524
  auth: "admin"
13495
13525
  });
13496
13526
  /**
13527
+ * Transport bounds for AI capability methods.
13528
+ *
13529
+ * Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
13530
+ * each other: declaring the constant in either one hands the other `undefined`
13531
+ * at module-init time, and an undefined `timeoutMs` silently falls back to the
13532
+ * kernel's 60 s default — the exact failure this constant exists to prevent,
13533
+ * reintroduced invisibly. Found by the guard, not by review.
13534
+ */
13535
+ /**
13536
+ * Ceiling for a cap method that runs inference or loads a model.
13537
+ *
13538
+ * Deliberately far above anything the AI layer itself may wait for (a summary
13539
+ * asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
13540
+ * never be the layer that gives up first: when it does, the failure is
13541
+ * reported as a transport error for a model that was still thinking, naming
13542
+ * the wrong layer and hiding the real one.
13543
+ *
13544
+ * Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
13545
+ * more on a cold model load. With no declaration every digest failed at
13546
+ * exactly 60 s and shipped without its text.
13547
+ *
13548
+ * A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
13549
+ * the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
13550
+ * decide when to stop, because only they can say WHY.
13551
+ */
13552
+ var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
13553
+ /** A multi-gigabyte download. An hour is not generous, it is honest. */
13554
+ var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
13555
+ /**
13497
13556
  * Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
13498
13557
  * surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
13499
13558
  * caps stay wire-compatible without a circular cap→cap import.
@@ -13765,16 +13824,19 @@ method(LlmGenerateBaseInputSchema.extend({
13765
13824
  timeoutMs: number().int().positive().optional()
13766
13825
  }), LlmGenerateResultSchema, {
13767
13826
  kind: "mutation",
13768
- auth: "admin"
13827
+ auth: "admin",
13828
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13769
13829
  }), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
13770
13830
  kind: "mutation",
13771
- auth: "admin"
13831
+ auth: "admin",
13832
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13772
13833
  }), method(object({}), _void(), {
13773
13834
  kind: "mutation",
13774
13835
  auth: "admin"
13775
13836
  }), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
13776
13837
  kind: "mutation",
13777
- auth: "admin"
13838
+ auth: "admin",
13839
+ timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
13778
13840
  }), method(object({ file: string() }), _void(), {
13779
13841
  kind: "mutation",
13780
13842
  auth: "admin"
@@ -13942,7 +14004,13 @@ var ProfileRefInputSchema = object({
13942
14004
  addonId: string(),
13943
14005
  profileId: string()
13944
14006
  });
13945
- method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({
14007
+ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
14008
+ kind: "mutation",
14009
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14010
+ }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
14011
+ kind: "mutation",
14012
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14013
+ }), method(object({
13946
14014
  addonId: string().optional(),
13947
14015
  requestId: string()
13948
14016
  }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
@@ -13953,7 +14021,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
13953
14021
  auth: "admin"
13954
14022
  }), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
13955
14023
  kind: "mutation",
13956
- auth: "admin"
14024
+ auth: "admin",
14025
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13957
14026
  }), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
13958
14027
  selector: LlmDefaultSelectorSchema,
13959
14028
  profileId: string().nullable()
@@ -34014,6 +34083,12 @@ Object.freeze({
34014
34083
  addonId: null,
34015
34084
  access: "view"
34016
34085
  },
34086
+ "deviceManager.migrateDevice": {
34087
+ capName: "device-manager",
34088
+ capScope: "system",
34089
+ addonId: null,
34090
+ access: "create"
34091
+ },
34017
34092
  "deviceManager.persistConfig": {
34018
34093
  capName: "device-manager",
34019
34094
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -7720,7 +7720,8 @@ var OpsLogReasonSchema = _enum([
7720
7720
  "quota",
7721
7721
  "manual",
7722
7722
  "operator",
7723
- "maintenance"
7723
+ "maintenance",
7724
+ "orphaned-device"
7724
7725
  ]);
7725
7726
  /** One audit row, shared verbatim by both domains. */
7726
7727
  var OpsLogEntrySchema = object({
@@ -13015,10 +13016,39 @@ var DevicePersistConfigPayloadSchema = object({
13015
13016
  deviceId: number(),
13016
13017
  data: record(string(), unknown())
13017
13018
  });
13019
+ /** What a migration actually did, per switch. `unreachable` is a first-class
13020
+ * answer: a camera that could not be asked is not a camera that was silenced. */
13021
+ var MigrateSwitchOutcomeSchema = _enum([
13022
+ "off",
13023
+ "on",
13024
+ "not-offered",
13025
+ "unreachable"
13026
+ ]);
13027
+ var MigrateSwitchReportSchema = object({
13028
+ deviceId: number(),
13029
+ switchId: CameraSwitchIdSchema,
13030
+ outcome: MigrateSwitchOutcomeSchema,
13031
+ detail: string().optional()
13032
+ });
13033
+ var MigrateDeviceResultSchema = object({
13034
+ sourceId: number(),
13035
+ targetId: number(),
13036
+ switches: array(MigrateSwitchReportSchema).readonly(),
13037
+ /** Switches that could NOT be turned off on the source. Empty is the only
13038
+ * value meaning the replaced hardware is quiet. */
13039
+ sourceStillLive: array(CameraSwitchIdSchema).readonly(),
13040
+ swapped: boolean()
13041
+ });
13018
13042
  method(object({
13019
13043
  addonId: string(),
13020
13044
  stableId: string()
13021
- }), 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({
13045
+ }), object({ id: number() }), { kind: "mutation" }), method(object({
13046
+ sourceId: number(),
13047
+ targetId: number()
13048
+ }), MigrateDeviceResultSchema, {
13049
+ kind: "mutation",
13050
+ auth: "admin"
13051
+ }), 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({
13022
13052
  deviceId: number(),
13023
13053
  name: string()
13024
13054
  }), _void(), {
@@ -13493,6 +13523,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
13493
13523
  auth: "admin"
13494
13524
  });
13495
13525
  /**
13526
+ * Transport bounds for AI capability methods.
13527
+ *
13528
+ * Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
13529
+ * each other: declaring the constant in either one hands the other `undefined`
13530
+ * at module-init time, and an undefined `timeoutMs` silently falls back to the
13531
+ * kernel's 60 s default — the exact failure this constant exists to prevent,
13532
+ * reintroduced invisibly. Found by the guard, not by review.
13533
+ */
13534
+ /**
13535
+ * Ceiling for a cap method that runs inference or loads a model.
13536
+ *
13537
+ * Deliberately far above anything the AI layer itself may wait for (a summary
13538
+ * asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
13539
+ * never be the layer that gives up first: when it does, the failure is
13540
+ * reported as a transport error for a model that was still thinking, naming
13541
+ * the wrong layer and hiding the real one.
13542
+ *
13543
+ * Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
13544
+ * more on a cold model load. With no declaration every digest failed at
13545
+ * exactly 60 s and shipped without its text.
13546
+ *
13547
+ * A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
13548
+ * the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
13549
+ * decide when to stop, because only they can say WHY.
13550
+ */
13551
+ var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
13552
+ /** A multi-gigabyte download. An hour is not generous, it is honest. */
13553
+ var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
13554
+ /**
13496
13555
  * Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
13497
13556
  * surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
13498
13557
  * caps stay wire-compatible without a circular cap→cap import.
@@ -13764,16 +13823,19 @@ method(LlmGenerateBaseInputSchema.extend({
13764
13823
  timeoutMs: number().int().positive().optional()
13765
13824
  }), LlmGenerateResultSchema, {
13766
13825
  kind: "mutation",
13767
- auth: "admin"
13826
+ auth: "admin",
13827
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13768
13828
  }), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
13769
13829
  kind: "mutation",
13770
- auth: "admin"
13830
+ auth: "admin",
13831
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13771
13832
  }), method(object({}), _void(), {
13772
13833
  kind: "mutation",
13773
13834
  auth: "admin"
13774
13835
  }), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
13775
13836
  kind: "mutation",
13776
- auth: "admin"
13837
+ auth: "admin",
13838
+ timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
13777
13839
  }), method(object({ file: string() }), _void(), {
13778
13840
  kind: "mutation",
13779
13841
  auth: "admin"
@@ -13941,7 +14003,13 @@ var ProfileRefInputSchema = object({
13941
14003
  addonId: string(),
13942
14004
  profileId: string()
13943
14005
  });
13944
- method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({
14006
+ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
14007
+ kind: "mutation",
14008
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14009
+ }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
14010
+ kind: "mutation",
14011
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14012
+ }), method(object({
13945
14013
  addonId: string().optional(),
13946
14014
  requestId: string()
13947
14015
  }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
@@ -13952,7 +14020,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
13952
14020
  auth: "admin"
13953
14021
  }), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
13954
14022
  kind: "mutation",
13955
- auth: "admin"
14023
+ auth: "admin",
14024
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13956
14025
  }), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
13957
14026
  selector: LlmDefaultSelectorSchema,
13958
14027
  profileId: string().nullable()
@@ -34013,6 +34082,12 @@ Object.freeze({
34013
34082
  addonId: null,
34014
34083
  access: "view"
34015
34084
  },
34085
+ "deviceManager.migrateDevice": {
34086
+ capName: "device-manager",
34087
+ capScope: "system",
34088
+ addonId: null,
34089
+ access: "create"
34090
+ },
34016
34091
  "deviceManager.persistConfig": {
34017
34092
  capName: "device-manager",
34018
34093
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-gree",
3
- "version": "0.2.51",
3
+ "version": "0.2.54",
4
4
  "description": "Gree air-conditioner device-provider addon for CamStack — wraps the @apocaliss92/nodegree local-UDP client (LAN discovery + AES control), exposing climate-control and fan-control",
5
5
  "keywords": [
6
6
  "camstack",