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