@camstack/addon-export-google 0.1.16 → 0.1.19

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.
@@ -7911,7 +7911,8 @@ var OpsLogReasonSchema = _enum([
7911
7911
  "quota",
7912
7912
  "manual",
7913
7913
  "operator",
7914
- "maintenance"
7914
+ "maintenance",
7915
+ "orphaned-device"
7915
7916
  ]);
7916
7917
  /** One audit row, shared verbatim by both domains. */
7917
7918
  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()
@@ -30556,6 +30625,12 @@ Object.freeze({
30556
30625
  addonId: null,
30557
30626
  access: "view"
30558
30627
  },
30628
+ "deviceManager.migrateDevice": {
30629
+ capName: "device-manager",
30630
+ capScope: "system",
30631
+ addonId: null,
30632
+ access: "create"
30633
+ },
30559
30634
  "deviceManager.persistConfig": {
30560
30635
  capName: "device-manager",
30561
30636
  capScope: "system",
@@ -7907,7 +7907,8 @@ var OpsLogReasonSchema = _enum([
7907
7907
  "quota",
7908
7908
  "manual",
7909
7909
  "operator",
7910
- "maintenance"
7910
+ "maintenance",
7911
+ "orphaned-device"
7911
7912
  ]);
7912
7913
  /** One audit row, shared verbatim by both domains. */
7913
7914
  var OpsLogEntrySchema = object({
@@ -13011,10 +13012,39 @@ var DevicePersistConfigPayloadSchema = object({
13011
13012
  deviceId: number(),
13012
13013
  data: record(string(), unknown())
13013
13014
  });
13015
+ /** What a migration actually did, per switch. `unreachable` is a first-class
13016
+ * answer: a camera that could not be asked is not a camera that was silenced. */
13017
+ var MigrateSwitchOutcomeSchema = _enum([
13018
+ "off",
13019
+ "on",
13020
+ "not-offered",
13021
+ "unreachable"
13022
+ ]);
13023
+ var MigrateSwitchReportSchema = object({
13024
+ deviceId: number(),
13025
+ switchId: CameraSwitchIdSchema,
13026
+ outcome: MigrateSwitchOutcomeSchema,
13027
+ detail: string().optional()
13028
+ });
13029
+ var MigrateDeviceResultSchema = object({
13030
+ sourceId: number(),
13031
+ targetId: number(),
13032
+ switches: array(MigrateSwitchReportSchema).readonly(),
13033
+ /** Switches that could NOT be turned off on the source. Empty is the only
13034
+ * value meaning the replaced hardware is quiet. */
13035
+ sourceStillLive: array(CameraSwitchIdSchema).readonly(),
13036
+ swapped: boolean()
13037
+ });
13014
13038
  method(object({
13015
13039
  addonId: string(),
13016
13040
  stableId: string()
13017
- }), 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({
13041
+ }), object({ id: number() }), { kind: "mutation" }), method(object({
13042
+ sourceId: number(),
13043
+ targetId: number()
13044
+ }), MigrateDeviceResultSchema, {
13045
+ kind: "mutation",
13046
+ auth: "admin"
13047
+ }), 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({
13018
13048
  deviceId: number(),
13019
13049
  name: string()
13020
13050
  }), _void(), {
@@ -13489,6 +13519,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
13489
13519
  auth: "admin"
13490
13520
  });
13491
13521
  /**
13522
+ * Transport bounds for AI capability methods.
13523
+ *
13524
+ * Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
13525
+ * each other: declaring the constant in either one hands the other `undefined`
13526
+ * at module-init time, and an undefined `timeoutMs` silently falls back to the
13527
+ * kernel's 60 s default — the exact failure this constant exists to prevent,
13528
+ * reintroduced invisibly. Found by the guard, not by review.
13529
+ */
13530
+ /**
13531
+ * Ceiling for a cap method that runs inference or loads a model.
13532
+ *
13533
+ * Deliberately far above anything the AI layer itself may wait for (a summary
13534
+ * asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
13535
+ * never be the layer that gives up first: when it does, the failure is
13536
+ * reported as a transport error for a model that was still thinking, naming
13537
+ * the wrong layer and hiding the real one.
13538
+ *
13539
+ * Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
13540
+ * more on a cold model load. With no declaration every digest failed at
13541
+ * exactly 60 s and shipped without its text.
13542
+ *
13543
+ * A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
13544
+ * the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
13545
+ * decide when to stop, because only they can say WHY.
13546
+ */
13547
+ var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
13548
+ /** A multi-gigabyte download. An hour is not generous, it is honest. */
13549
+ var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
13550
+ /**
13492
13551
  * Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
13493
13552
  * surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
13494
13553
  * caps stay wire-compatible without a circular cap→cap import.
@@ -13760,16 +13819,19 @@ method(LlmGenerateBaseInputSchema.extend({
13760
13819
  timeoutMs: number().int().positive().optional()
13761
13820
  }), LlmGenerateResultSchema, {
13762
13821
  kind: "mutation",
13763
- auth: "admin"
13822
+ auth: "admin",
13823
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13764
13824
  }), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
13765
13825
  kind: "mutation",
13766
- auth: "admin"
13826
+ auth: "admin",
13827
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13767
13828
  }), method(object({}), _void(), {
13768
13829
  kind: "mutation",
13769
13830
  auth: "admin"
13770
13831
  }), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
13771
13832
  kind: "mutation",
13772
- auth: "admin"
13833
+ auth: "admin",
13834
+ timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
13773
13835
  }), method(object({ file: string() }), _void(), {
13774
13836
  kind: "mutation",
13775
13837
  auth: "admin"
@@ -13937,7 +13999,13 @@ var ProfileRefInputSchema = object({
13937
13999
  addonId: string(),
13938
14000
  profileId: string()
13939
14001
  });
13940
- method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({
14002
+ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
14003
+ kind: "mutation",
14004
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14005
+ }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
14006
+ kind: "mutation",
14007
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14008
+ }), method(object({
13941
14009
  addonId: string().optional(),
13942
14010
  requestId: string()
13943
14011
  }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
@@ -13948,7 +14016,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
13948
14016
  auth: "admin"
13949
14017
  }), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
13950
14018
  kind: "mutation",
13951
- auth: "admin"
14019
+ auth: "admin",
14020
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13952
14021
  }), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
13953
14022
  selector: LlmDefaultSelectorSchema,
13954
14023
  profileId: string().nullable()
@@ -30552,6 +30621,12 @@ Object.freeze({
30552
30621
  addonId: null,
30553
30622
  access: "view"
30554
30623
  },
30624
+ "deviceManager.migrateDevice": {
30625
+ capName: "device-manager",
30626
+ capScope: "system",
30627
+ addonId: null,
30628
+ access: "create"
30629
+ },
30555
30630
  "deviceManager.persistConfig": {
30556
30631
  capName: "device-manager",
30557
30632
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-google",
3
- "version": "0.1.16",
3
+ "version": "0.1.19",
4
4
  "description": "Google Home export — hub-side smart-home fulfillment (SYNC / QUERY / EXECUTE / DISCONNECT) for the non-camera fleet, served over the hub's own OAuth account link. No Google credential is stored, sent or required.",
5
5
  "keywords": [
6
6
  "camstack",