@camstack/addon-export-alexa 1.2.58 → 1.2.61

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.
@@ -7886,7 +7886,8 @@ var OpsLogReasonSchema = _enum([
7886
7886
  "quota",
7887
7887
  "manual",
7888
7888
  "operator",
7889
- "maintenance"
7889
+ "maintenance",
7890
+ "orphaned-device"
7890
7891
  ]);
7891
7892
  /** One audit row, shared verbatim by both domains. */
7892
7893
  var OpsLogEntrySchema = object({
@@ -13044,10 +13045,39 @@ var DevicePersistConfigPayloadSchema = object({
13044
13045
  deviceId: number(),
13045
13046
  data: record(string(), unknown())
13046
13047
  });
13048
+ /** What a migration actually did, per switch. `unreachable` is a first-class
13049
+ * answer: a camera that could not be asked is not a camera that was silenced. */
13050
+ var MigrateSwitchOutcomeSchema = _enum([
13051
+ "off",
13052
+ "on",
13053
+ "not-offered",
13054
+ "unreachable"
13055
+ ]);
13056
+ var MigrateSwitchReportSchema = object({
13057
+ deviceId: number(),
13058
+ switchId: CameraSwitchIdSchema,
13059
+ outcome: MigrateSwitchOutcomeSchema,
13060
+ detail: string().optional()
13061
+ });
13062
+ var MigrateDeviceResultSchema = object({
13063
+ sourceId: number(),
13064
+ targetId: number(),
13065
+ switches: array(MigrateSwitchReportSchema).readonly(),
13066
+ /** Switches that could NOT be turned off on the source. Empty is the only
13067
+ * value meaning the replaced hardware is quiet. */
13068
+ sourceStillLive: array(CameraSwitchIdSchema).readonly(),
13069
+ swapped: boolean()
13070
+ });
13047
13071
  method(object({
13048
13072
  addonId: string(),
13049
13073
  stableId: string()
13050
- }), 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({
13074
+ }), object({ id: number() }), { kind: "mutation" }), method(object({
13075
+ sourceId: number(),
13076
+ targetId: number()
13077
+ }), MigrateDeviceResultSchema, {
13078
+ kind: "mutation",
13079
+ auth: "admin"
13080
+ }), 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({
13051
13081
  deviceId: number(),
13052
13082
  name: string()
13053
13083
  }), _void(), {
@@ -13522,6 +13552,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
13522
13552
  auth: "admin"
13523
13553
  });
13524
13554
  /**
13555
+ * Transport bounds for AI capability methods.
13556
+ *
13557
+ * Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
13558
+ * each other: declaring the constant in either one hands the other `undefined`
13559
+ * at module-init time, and an undefined `timeoutMs` silently falls back to the
13560
+ * kernel's 60 s default — the exact failure this constant exists to prevent,
13561
+ * reintroduced invisibly. Found by the guard, not by review.
13562
+ */
13563
+ /**
13564
+ * Ceiling for a cap method that runs inference or loads a model.
13565
+ *
13566
+ * Deliberately far above anything the AI layer itself may wait for (a summary
13567
+ * asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
13568
+ * never be the layer that gives up first: when it does, the failure is
13569
+ * reported as a transport error for a model that was still thinking, naming
13570
+ * the wrong layer and hiding the real one.
13571
+ *
13572
+ * Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
13573
+ * more on a cold model load. With no declaration every digest failed at
13574
+ * exactly 60 s and shipped without its text.
13575
+ *
13576
+ * A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
13577
+ * the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
13578
+ * decide when to stop, because only they can say WHY.
13579
+ */
13580
+ var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
13581
+ /** A multi-gigabyte download. An hour is not generous, it is honest. */
13582
+ var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
13583
+ /**
13525
13584
  * Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
13526
13585
  * surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
13527
13586
  * caps stay wire-compatible without a circular cap→cap import.
@@ -13793,16 +13852,19 @@ method(LlmGenerateBaseInputSchema.extend({
13793
13852
  timeoutMs: number().int().positive().optional()
13794
13853
  }), LlmGenerateResultSchema, {
13795
13854
  kind: "mutation",
13796
- auth: "admin"
13855
+ auth: "admin",
13856
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13797
13857
  }), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
13798
13858
  kind: "mutation",
13799
- auth: "admin"
13859
+ auth: "admin",
13860
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13800
13861
  }), method(object({}), _void(), {
13801
13862
  kind: "mutation",
13802
13863
  auth: "admin"
13803
13864
  }), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
13804
13865
  kind: "mutation",
13805
- auth: "admin"
13866
+ auth: "admin",
13867
+ timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
13806
13868
  }), method(object({ file: string() }), _void(), {
13807
13869
  kind: "mutation",
13808
13870
  auth: "admin"
@@ -13970,7 +14032,13 @@ var ProfileRefInputSchema = object({
13970
14032
  addonId: string(),
13971
14033
  profileId: string()
13972
14034
  });
13973
- method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({
14035
+ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
14036
+ kind: "mutation",
14037
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14038
+ }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
14039
+ kind: "mutation",
14040
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14041
+ }), method(object({
13974
14042
  addonId: string().optional(),
13975
14043
  requestId: string()
13976
14044
  }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
@@ -13981,7 +14049,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
13981
14049
  auth: "admin"
13982
14050
  }), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
13983
14051
  kind: "mutation",
13984
- auth: "admin"
14052
+ auth: "admin",
14053
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13985
14054
  }), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
13986
14055
  selector: LlmDefaultSelectorSchema,
13987
14056
  profileId: string().nullable()
@@ -30566,6 +30635,12 @@ Object.freeze({
30566
30635
  addonId: null,
30567
30636
  access: "view"
30568
30637
  },
30638
+ "deviceManager.migrateDevice": {
30639
+ capName: "device-manager",
30640
+ capScope: "system",
30641
+ addonId: null,
30642
+ access: "create"
30643
+ },
30569
30644
  "deviceManager.persistConfig": {
30570
30645
  capName: "device-manager",
30571
30646
  capScope: "system",
@@ -7859,7 +7859,8 @@ var OpsLogReasonSchema = _enum([
7859
7859
  "quota",
7860
7860
  "manual",
7861
7861
  "operator",
7862
- "maintenance"
7862
+ "maintenance",
7863
+ "orphaned-device"
7863
7864
  ]);
7864
7865
  /** One audit row, shared verbatim by both domains. */
7865
7866
  var OpsLogEntrySchema = object({
@@ -13017,10 +13018,39 @@ var DevicePersistConfigPayloadSchema = object({
13017
13018
  deviceId: number(),
13018
13019
  data: record(string(), unknown())
13019
13020
  });
13021
+ /** What a migration actually did, per switch. `unreachable` is a first-class
13022
+ * answer: a camera that could not be asked is not a camera that was silenced. */
13023
+ var MigrateSwitchOutcomeSchema = _enum([
13024
+ "off",
13025
+ "on",
13026
+ "not-offered",
13027
+ "unreachable"
13028
+ ]);
13029
+ var MigrateSwitchReportSchema = object({
13030
+ deviceId: number(),
13031
+ switchId: CameraSwitchIdSchema,
13032
+ outcome: MigrateSwitchOutcomeSchema,
13033
+ detail: string().optional()
13034
+ });
13035
+ var MigrateDeviceResultSchema = object({
13036
+ sourceId: number(),
13037
+ targetId: number(),
13038
+ switches: array(MigrateSwitchReportSchema).readonly(),
13039
+ /** Switches that could NOT be turned off on the source. Empty is the only
13040
+ * value meaning the replaced hardware is quiet. */
13041
+ sourceStillLive: array(CameraSwitchIdSchema).readonly(),
13042
+ swapped: boolean()
13043
+ });
13020
13044
  method(object({
13021
13045
  addonId: string(),
13022
13046
  stableId: string()
13023
- }), 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({
13047
+ }), object({ id: number() }), { kind: "mutation" }), method(object({
13048
+ sourceId: number(),
13049
+ targetId: number()
13050
+ }), MigrateDeviceResultSchema, {
13051
+ kind: "mutation",
13052
+ auth: "admin"
13053
+ }), 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({
13024
13054
  deviceId: number(),
13025
13055
  name: string()
13026
13056
  }), _void(), {
@@ -13495,6 +13525,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
13495
13525
  auth: "admin"
13496
13526
  });
13497
13527
  /**
13528
+ * Transport bounds for AI capability methods.
13529
+ *
13530
+ * Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
13531
+ * each other: declaring the constant in either one hands the other `undefined`
13532
+ * at module-init time, and an undefined `timeoutMs` silently falls back to the
13533
+ * kernel's 60 s default — the exact failure this constant exists to prevent,
13534
+ * reintroduced invisibly. Found by the guard, not by review.
13535
+ */
13536
+ /**
13537
+ * Ceiling for a cap method that runs inference or loads a model.
13538
+ *
13539
+ * Deliberately far above anything the AI layer itself may wait for (a summary
13540
+ * asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
13541
+ * never be the layer that gives up first: when it does, the failure is
13542
+ * reported as a transport error for a model that was still thinking, naming
13543
+ * the wrong layer and hiding the real one.
13544
+ *
13545
+ * Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
13546
+ * more on a cold model load. With no declaration every digest failed at
13547
+ * exactly 60 s and shipped without its text.
13548
+ *
13549
+ * A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
13550
+ * the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
13551
+ * decide when to stop, because only they can say WHY.
13552
+ */
13553
+ var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
13554
+ /** A multi-gigabyte download. An hour is not generous, it is honest. */
13555
+ var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
13556
+ /**
13498
13557
  * Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
13499
13558
  * surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
13500
13559
  * caps stay wire-compatible without a circular cap→cap import.
@@ -13766,16 +13825,19 @@ method(LlmGenerateBaseInputSchema.extend({
13766
13825
  timeoutMs: number().int().positive().optional()
13767
13826
  }), LlmGenerateResultSchema, {
13768
13827
  kind: "mutation",
13769
- auth: "admin"
13828
+ auth: "admin",
13829
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13770
13830
  }), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
13771
13831
  kind: "mutation",
13772
- auth: "admin"
13832
+ auth: "admin",
13833
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13773
13834
  }), method(object({}), _void(), {
13774
13835
  kind: "mutation",
13775
13836
  auth: "admin"
13776
13837
  }), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
13777
13838
  kind: "mutation",
13778
- auth: "admin"
13839
+ auth: "admin",
13840
+ timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
13779
13841
  }), method(object({ file: string() }), _void(), {
13780
13842
  kind: "mutation",
13781
13843
  auth: "admin"
@@ -13943,7 +14005,13 @@ var ProfileRefInputSchema = object({
13943
14005
  addonId: string(),
13944
14006
  profileId: string()
13945
14007
  });
13946
- method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({
14008
+ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
14009
+ kind: "mutation",
14010
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14011
+ }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
14012
+ kind: "mutation",
14013
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14014
+ }), method(object({
13947
14015
  addonId: string().optional(),
13948
14016
  requestId: string()
13949
14017
  }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
@@ -13954,7 +14022,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
13954
14022
  auth: "admin"
13955
14023
  }), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
13956
14024
  kind: "mutation",
13957
- auth: "admin"
14025
+ auth: "admin",
14026
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13958
14027
  }), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
13959
14028
  selector: LlmDefaultSelectorSchema,
13960
14029
  profileId: string().nullable()
@@ -30539,6 +30608,12 @@ Object.freeze({
30539
30608
  addonId: null,
30540
30609
  access: "view"
30541
30610
  },
30611
+ "deviceManager.migrateDevice": {
30612
+ capName: "device-manager",
30613
+ capScope: "system",
30614
+ addonId: null,
30615
+ access: "create"
30616
+ },
30542
30617
  "deviceManager.persistConfig": {
30543
30618
  capName: "device-manager",
30544
30619
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-alexa",
3
- "version": "1.2.58",
3
+ "version": "1.2.61",
4
4
  "description": "Alexa Smart Home Skill export — hub-side OAuth provider + directive handler. The companion AWS Lambda forwards Alexa directives to this addon's /addon/export-alexa/directive endpoint.",
5
5
  "keywords": [
6
6
  "camstack",