@camstack/addon-decoder-ffmpeg 1.2.52 → 1.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/index.js CHANGED
@@ -7719,7 +7719,8 @@ var OpsLogReasonSchema = _enum([
7719
7719
  "quota",
7720
7720
  "manual",
7721
7721
  "operator",
7722
- "maintenance"
7722
+ "maintenance",
7723
+ "orphaned-device"
7723
7724
  ]);
7724
7725
  /** One audit row, shared verbatim by both domains. */
7725
7726
  var OpsLogEntrySchema = object({
@@ -12880,10 +12881,39 @@ var DevicePersistConfigPayloadSchema = object({
12880
12881
  deviceId: number(),
12881
12882
  data: record(string(), unknown())
12882
12883
  });
12884
+ /** What a migration actually did, per switch. `unreachable` is a first-class
12885
+ * answer: a camera that could not be asked is not a camera that was silenced. */
12886
+ var MigrateSwitchOutcomeSchema = _enum([
12887
+ "off",
12888
+ "on",
12889
+ "not-offered",
12890
+ "unreachable"
12891
+ ]);
12892
+ var MigrateSwitchReportSchema = object({
12893
+ deviceId: number(),
12894
+ switchId: CameraSwitchIdSchema,
12895
+ outcome: MigrateSwitchOutcomeSchema,
12896
+ detail: string().optional()
12897
+ });
12898
+ var MigrateDeviceResultSchema = object({
12899
+ sourceId: number(),
12900
+ targetId: number(),
12901
+ switches: array(MigrateSwitchReportSchema).readonly(),
12902
+ /** Switches that could NOT be turned off on the source. Empty is the only
12903
+ * value meaning the replaced hardware is quiet. */
12904
+ sourceStillLive: array(CameraSwitchIdSchema).readonly(),
12905
+ swapped: boolean()
12906
+ });
12883
12907
  method(object({
12884
12908
  addonId: string(),
12885
12909
  stableId: string()
12886
- }), 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({
12910
+ }), object({ id: number() }), { kind: "mutation" }), method(object({
12911
+ sourceId: number(),
12912
+ targetId: number()
12913
+ }), MigrateDeviceResultSchema, {
12914
+ kind: "mutation",
12915
+ auth: "admin"
12916
+ }), 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({
12887
12917
  deviceId: number(),
12888
12918
  name: string()
12889
12919
  }), _void(), {
@@ -13358,6 +13388,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
13358
13388
  auth: "admin"
13359
13389
  });
13360
13390
  /**
13391
+ * Transport bounds for AI capability methods.
13392
+ *
13393
+ * Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
13394
+ * each other: declaring the constant in either one hands the other `undefined`
13395
+ * at module-init time, and an undefined `timeoutMs` silently falls back to the
13396
+ * kernel's 60 s default — the exact failure this constant exists to prevent,
13397
+ * reintroduced invisibly. Found by the guard, not by review.
13398
+ */
13399
+ /**
13400
+ * Ceiling for a cap method that runs inference or loads a model.
13401
+ *
13402
+ * Deliberately far above anything the AI layer itself may wait for (a summary
13403
+ * asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
13404
+ * never be the layer that gives up first: when it does, the failure is
13405
+ * reported as a transport error for a model that was still thinking, naming
13406
+ * the wrong layer and hiding the real one.
13407
+ *
13408
+ * Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
13409
+ * more on a cold model load. With no declaration every digest failed at
13410
+ * exactly 60 s and shipped without its text.
13411
+ *
13412
+ * A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
13413
+ * the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
13414
+ * decide when to stop, because only they can say WHY.
13415
+ */
13416
+ var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
13417
+ /** A multi-gigabyte download. An hour is not generous, it is honest. */
13418
+ var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
13419
+ /**
13361
13420
  * Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
13362
13421
  * surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
13363
13422
  * caps stay wire-compatible without a circular cap→cap import.
@@ -13629,16 +13688,19 @@ method(LlmGenerateBaseInputSchema.extend({
13629
13688
  timeoutMs: number().int().positive().optional()
13630
13689
  }), LlmGenerateResultSchema, {
13631
13690
  kind: "mutation",
13632
- auth: "admin"
13691
+ auth: "admin",
13692
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13633
13693
  }), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
13634
13694
  kind: "mutation",
13635
- auth: "admin"
13695
+ auth: "admin",
13696
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13636
13697
  }), method(object({}), _void(), {
13637
13698
  kind: "mutation",
13638
13699
  auth: "admin"
13639
13700
  }), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
13640
13701
  kind: "mutation",
13641
- auth: "admin"
13702
+ auth: "admin",
13703
+ timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
13642
13704
  }), method(object({ file: string() }), _void(), {
13643
13705
  kind: "mutation",
13644
13706
  auth: "admin"
@@ -13806,7 +13868,13 @@ var ProfileRefInputSchema = object({
13806
13868
  addonId: string(),
13807
13869
  profileId: string()
13808
13870
  });
13809
- method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({
13871
+ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
13872
+ kind: "mutation",
13873
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13874
+ }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
13875
+ kind: "mutation",
13876
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13877
+ }), method(object({
13810
13878
  addonId: string().optional(),
13811
13879
  requestId: string()
13812
13880
  }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
@@ -13817,7 +13885,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
13817
13885
  auth: "admin"
13818
13886
  }), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
13819
13887
  kind: "mutation",
13820
- auth: "admin"
13888
+ auth: "admin",
13889
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13821
13890
  }), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
13822
13891
  selector: LlmDefaultSelectorSchema,
13823
13892
  profileId: string().nullable()
@@ -30386,6 +30455,12 @@ Object.freeze({
30386
30455
  addonId: null,
30387
30456
  access: "view"
30388
30457
  },
30458
+ "deviceManager.migrateDevice": {
30459
+ capName: "device-manager",
30460
+ capScope: "system",
30461
+ addonId: null,
30462
+ access: "create"
30463
+ },
30389
30464
  "deviceManager.persistConfig": {
30390
30465
  capName: "device-manager",
30391
30466
  capScope: "system",
package/dist/index.mjs CHANGED
@@ -7715,7 +7715,8 @@ var OpsLogReasonSchema = _enum([
7715
7715
  "quota",
7716
7716
  "manual",
7717
7717
  "operator",
7718
- "maintenance"
7718
+ "maintenance",
7719
+ "orphaned-device"
7719
7720
  ]);
7720
7721
  /** One audit row, shared verbatim by both domains. */
7721
7722
  var OpsLogEntrySchema = object({
@@ -12876,10 +12877,39 @@ var DevicePersistConfigPayloadSchema = object({
12876
12877
  deviceId: number(),
12877
12878
  data: record(string(), unknown())
12878
12879
  });
12880
+ /** What a migration actually did, per switch. `unreachable` is a first-class
12881
+ * answer: a camera that could not be asked is not a camera that was silenced. */
12882
+ var MigrateSwitchOutcomeSchema = _enum([
12883
+ "off",
12884
+ "on",
12885
+ "not-offered",
12886
+ "unreachable"
12887
+ ]);
12888
+ var MigrateSwitchReportSchema = object({
12889
+ deviceId: number(),
12890
+ switchId: CameraSwitchIdSchema,
12891
+ outcome: MigrateSwitchOutcomeSchema,
12892
+ detail: string().optional()
12893
+ });
12894
+ var MigrateDeviceResultSchema = object({
12895
+ sourceId: number(),
12896
+ targetId: number(),
12897
+ switches: array(MigrateSwitchReportSchema).readonly(),
12898
+ /** Switches that could NOT be turned off on the source. Empty is the only
12899
+ * value meaning the replaced hardware is quiet. */
12900
+ sourceStillLive: array(CameraSwitchIdSchema).readonly(),
12901
+ swapped: boolean()
12902
+ });
12879
12903
  method(object({
12880
12904
  addonId: string(),
12881
12905
  stableId: string()
12882
- }), 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({
12906
+ }), object({ id: number() }), { kind: "mutation" }), method(object({
12907
+ sourceId: number(),
12908
+ targetId: number()
12909
+ }), MigrateDeviceResultSchema, {
12910
+ kind: "mutation",
12911
+ auth: "admin"
12912
+ }), 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({
12883
12913
  deviceId: number(),
12884
12914
  name: string()
12885
12915
  }), _void(), {
@@ -13354,6 +13384,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
13354
13384
  auth: "admin"
13355
13385
  });
13356
13386
  /**
13387
+ * Transport bounds for AI capability methods.
13388
+ *
13389
+ * Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
13390
+ * each other: declaring the constant in either one hands the other `undefined`
13391
+ * at module-init time, and an undefined `timeoutMs` silently falls back to the
13392
+ * kernel's 60 s default — the exact failure this constant exists to prevent,
13393
+ * reintroduced invisibly. Found by the guard, not by review.
13394
+ */
13395
+ /**
13396
+ * Ceiling for a cap method that runs inference or loads a model.
13397
+ *
13398
+ * Deliberately far above anything the AI layer itself may wait for (a summary
13399
+ * asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
13400
+ * never be the layer that gives up first: when it does, the failure is
13401
+ * reported as a transport error for a model that was still thinking, naming
13402
+ * the wrong layer and hiding the real one.
13403
+ *
13404
+ * Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
13405
+ * more on a cold model load. With no declaration every digest failed at
13406
+ * exactly 60 s and shipped without its text.
13407
+ *
13408
+ * A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
13409
+ * the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
13410
+ * decide when to stop, because only they can say WHY.
13411
+ */
13412
+ var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
13413
+ /** A multi-gigabyte download. An hour is not generous, it is honest. */
13414
+ var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
13415
+ /**
13357
13416
  * Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
13358
13417
  * surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
13359
13418
  * caps stay wire-compatible without a circular cap→cap import.
@@ -13625,16 +13684,19 @@ method(LlmGenerateBaseInputSchema.extend({
13625
13684
  timeoutMs: number().int().positive().optional()
13626
13685
  }), LlmGenerateResultSchema, {
13627
13686
  kind: "mutation",
13628
- auth: "admin"
13687
+ auth: "admin",
13688
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13629
13689
  }), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
13630
13690
  kind: "mutation",
13631
- auth: "admin"
13691
+ auth: "admin",
13692
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13632
13693
  }), method(object({}), _void(), {
13633
13694
  kind: "mutation",
13634
13695
  auth: "admin"
13635
13696
  }), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
13636
13697
  kind: "mutation",
13637
- auth: "admin"
13698
+ auth: "admin",
13699
+ timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
13638
13700
  }), method(object({ file: string() }), _void(), {
13639
13701
  kind: "mutation",
13640
13702
  auth: "admin"
@@ -13802,7 +13864,13 @@ var ProfileRefInputSchema = object({
13802
13864
  addonId: string(),
13803
13865
  profileId: string()
13804
13866
  });
13805
- method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({
13867
+ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
13868
+ kind: "mutation",
13869
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13870
+ }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
13871
+ kind: "mutation",
13872
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13873
+ }), method(object({
13806
13874
  addonId: string().optional(),
13807
13875
  requestId: string()
13808
13876
  }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
@@ -13813,7 +13881,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
13813
13881
  auth: "admin"
13814
13882
  }), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
13815
13883
  kind: "mutation",
13816
- auth: "admin"
13884
+ auth: "admin",
13885
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13817
13886
  }), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
13818
13887
  selector: LlmDefaultSelectorSchema,
13819
13888
  profileId: string().nullable()
@@ -30382,6 +30451,12 @@ Object.freeze({
30382
30451
  addonId: null,
30383
30452
  access: "view"
30384
30453
  },
30454
+ "deviceManager.migrateDevice": {
30455
+ capName: "device-manager",
30456
+ capScope: "system",
30457
+ addonId: null,
30458
+ access: "create"
30459
+ },
30385
30460
  "deviceManager.persistConfig": {
30386
30461
  capName: "device-manager",
30387
30462
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-decoder-ffmpeg",
3
- "version": "1.2.52",
3
+ "version": "1.2.55",
4
4
  "description": "Standalone ffmpeg-subprocess decoder fallback addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",