@camstack/addon-provider-hikvision 1.2.60 → 1.2.63
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 +82 -7
- package/dist/addon.mjs +82 -7
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -7713,7 +7713,8 @@ var OpsLogReasonSchema = _enum([
|
|
|
7713
7713
|
"quota",
|
|
7714
7714
|
"manual",
|
|
7715
7715
|
"operator",
|
|
7716
|
-
"maintenance"
|
|
7716
|
+
"maintenance",
|
|
7717
|
+
"orphaned-device"
|
|
7717
7718
|
]);
|
|
7718
7719
|
/** One audit row, shared verbatim by both domains. */
|
|
7719
7720
|
var OpsLogEntrySchema = object({
|
|
@@ -13301,10 +13302,39 @@ var DevicePersistConfigPayloadSchema = object({
|
|
|
13301
13302
|
deviceId: number(),
|
|
13302
13303
|
data: record(string(), unknown())
|
|
13303
13304
|
});
|
|
13305
|
+
/** What a migration actually did, per switch. `unreachable` is a first-class
|
|
13306
|
+
* answer: a camera that could not be asked is not a camera that was silenced. */
|
|
13307
|
+
var MigrateSwitchOutcomeSchema = _enum([
|
|
13308
|
+
"off",
|
|
13309
|
+
"on",
|
|
13310
|
+
"not-offered",
|
|
13311
|
+
"unreachable"
|
|
13312
|
+
]);
|
|
13313
|
+
var MigrateSwitchReportSchema = object({
|
|
13314
|
+
deviceId: number(),
|
|
13315
|
+
switchId: CameraSwitchIdSchema,
|
|
13316
|
+
outcome: MigrateSwitchOutcomeSchema,
|
|
13317
|
+
detail: string().optional()
|
|
13318
|
+
});
|
|
13319
|
+
var MigrateDeviceResultSchema = object({
|
|
13320
|
+
sourceId: number(),
|
|
13321
|
+
targetId: number(),
|
|
13322
|
+
switches: array(MigrateSwitchReportSchema).readonly(),
|
|
13323
|
+
/** Switches that could NOT be turned off on the source. Empty is the only
|
|
13324
|
+
* value meaning the replaced hardware is quiet. */
|
|
13325
|
+
sourceStillLive: array(CameraSwitchIdSchema).readonly(),
|
|
13326
|
+
swapped: boolean()
|
|
13327
|
+
});
|
|
13304
13328
|
method(object({
|
|
13305
13329
|
addonId: string(),
|
|
13306
13330
|
stableId: string()
|
|
13307
|
-
}), object({ id: number() }), { kind: "mutation" }), method(
|
|
13331
|
+
}), object({ id: number() }), { kind: "mutation" }), method(object({
|
|
13332
|
+
sourceId: number(),
|
|
13333
|
+
targetId: number()
|
|
13334
|
+
}), MigrateDeviceResultSchema, {
|
|
13335
|
+
kind: "mutation",
|
|
13336
|
+
auth: "admin"
|
|
13337
|
+
}), 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({
|
|
13308
13338
|
deviceId: number(),
|
|
13309
13339
|
name: string()
|
|
13310
13340
|
}), _void(), {
|
|
@@ -13798,6 +13828,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
|
|
|
13798
13828
|
auth: "admin"
|
|
13799
13829
|
});
|
|
13800
13830
|
/**
|
|
13831
|
+
* Transport bounds for AI capability methods.
|
|
13832
|
+
*
|
|
13833
|
+
* Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
|
|
13834
|
+
* each other: declaring the constant in either one hands the other `undefined`
|
|
13835
|
+
* at module-init time, and an undefined `timeoutMs` silently falls back to the
|
|
13836
|
+
* kernel's 60 s default — the exact failure this constant exists to prevent,
|
|
13837
|
+
* reintroduced invisibly. Found by the guard, not by review.
|
|
13838
|
+
*/
|
|
13839
|
+
/**
|
|
13840
|
+
* Ceiling for a cap method that runs inference or loads a model.
|
|
13841
|
+
*
|
|
13842
|
+
* Deliberately far above anything the AI layer itself may wait for (a summary
|
|
13843
|
+
* asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
|
|
13844
|
+
* never be the layer that gives up first: when it does, the failure is
|
|
13845
|
+
* reported as a transport error for a model that was still thinking, naming
|
|
13846
|
+
* the wrong layer and hiding the real one.
|
|
13847
|
+
*
|
|
13848
|
+
* Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
|
|
13849
|
+
* more on a cold model load. With no declaration every digest failed at
|
|
13850
|
+
* exactly 60 s and shipped without its text.
|
|
13851
|
+
*
|
|
13852
|
+
* A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
|
|
13853
|
+
* the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
|
|
13854
|
+
* decide when to stop, because only they can say WHY.
|
|
13855
|
+
*/
|
|
13856
|
+
var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
|
|
13857
|
+
/** A multi-gigabyte download. An hour is not generous, it is honest. */
|
|
13858
|
+
var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
|
|
13859
|
+
/**
|
|
13801
13860
|
* Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
|
|
13802
13861
|
* surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
|
|
13803
13862
|
* caps stay wire-compatible without a circular cap→cap import.
|
|
@@ -14069,16 +14128,19 @@ method(LlmGenerateBaseInputSchema.extend({
|
|
|
14069
14128
|
timeoutMs: number().int().positive().optional()
|
|
14070
14129
|
}), LlmGenerateResultSchema, {
|
|
14071
14130
|
kind: "mutation",
|
|
14072
|
-
auth: "admin"
|
|
14131
|
+
auth: "admin",
|
|
14132
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14073
14133
|
}), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
|
|
14074
14134
|
kind: "mutation",
|
|
14075
|
-
auth: "admin"
|
|
14135
|
+
auth: "admin",
|
|
14136
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14076
14137
|
}), method(object({}), _void(), {
|
|
14077
14138
|
kind: "mutation",
|
|
14078
14139
|
auth: "admin"
|
|
14079
14140
|
}), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
|
|
14080
14141
|
kind: "mutation",
|
|
14081
|
-
auth: "admin"
|
|
14142
|
+
auth: "admin",
|
|
14143
|
+
timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
|
|
14082
14144
|
}), method(object({ file: string() }), _void(), {
|
|
14083
14145
|
kind: "mutation",
|
|
14084
14146
|
auth: "admin"
|
|
@@ -14246,7 +14308,13 @@ var ProfileRefInputSchema = object({
|
|
|
14246
14308
|
addonId: string(),
|
|
14247
14309
|
profileId: string()
|
|
14248
14310
|
});
|
|
14249
|
-
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
14311
|
+
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
14312
|
+
kind: "mutation",
|
|
14313
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14314
|
+
}), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
|
|
14315
|
+
kind: "mutation",
|
|
14316
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14317
|
+
}), method(object({
|
|
14250
14318
|
addonId: string().optional(),
|
|
14251
14319
|
requestId: string()
|
|
14252
14320
|
}), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
|
|
@@ -14257,7 +14325,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
14257
14325
|
auth: "admin"
|
|
14258
14326
|
}), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
|
|
14259
14327
|
kind: "mutation",
|
|
14260
|
-
auth: "admin"
|
|
14328
|
+
auth: "admin",
|
|
14329
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14261
14330
|
}), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
|
|
14262
14331
|
selector: LlmDefaultSelectorSchema,
|
|
14263
14332
|
profileId: string().nullable()
|
|
@@ -34986,6 +35055,12 @@ Object.freeze({
|
|
|
34986
35055
|
addonId: null,
|
|
34987
35056
|
access: "view"
|
|
34988
35057
|
},
|
|
35058
|
+
"deviceManager.migrateDevice": {
|
|
35059
|
+
capName: "device-manager",
|
|
35060
|
+
capScope: "system",
|
|
35061
|
+
addonId: null,
|
|
35062
|
+
access: "create"
|
|
35063
|
+
},
|
|
34989
35064
|
"deviceManager.persistConfig": {
|
|
34990
35065
|
capName: "device-manager",
|
|
34991
35066
|
capScope: "system",
|
package/dist/addon.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({
|
|
@@ -13302,10 +13303,39 @@ var DevicePersistConfigPayloadSchema = object({
|
|
|
13302
13303
|
deviceId: number(),
|
|
13303
13304
|
data: record(string(), unknown())
|
|
13304
13305
|
});
|
|
13306
|
+
/** What a migration actually did, per switch. `unreachable` is a first-class
|
|
13307
|
+
* answer: a camera that could not be asked is not a camera that was silenced. */
|
|
13308
|
+
var MigrateSwitchOutcomeSchema = _enum([
|
|
13309
|
+
"off",
|
|
13310
|
+
"on",
|
|
13311
|
+
"not-offered",
|
|
13312
|
+
"unreachable"
|
|
13313
|
+
]);
|
|
13314
|
+
var MigrateSwitchReportSchema = object({
|
|
13315
|
+
deviceId: number(),
|
|
13316
|
+
switchId: CameraSwitchIdSchema,
|
|
13317
|
+
outcome: MigrateSwitchOutcomeSchema,
|
|
13318
|
+
detail: string().optional()
|
|
13319
|
+
});
|
|
13320
|
+
var MigrateDeviceResultSchema = object({
|
|
13321
|
+
sourceId: number(),
|
|
13322
|
+
targetId: number(),
|
|
13323
|
+
switches: array(MigrateSwitchReportSchema).readonly(),
|
|
13324
|
+
/** Switches that could NOT be turned off on the source. Empty is the only
|
|
13325
|
+
* value meaning the replaced hardware is quiet. */
|
|
13326
|
+
sourceStillLive: array(CameraSwitchIdSchema).readonly(),
|
|
13327
|
+
swapped: boolean()
|
|
13328
|
+
});
|
|
13305
13329
|
method(object({
|
|
13306
13330
|
addonId: string(),
|
|
13307
13331
|
stableId: string()
|
|
13308
|
-
}), object({ id: number() }), { kind: "mutation" }), method(
|
|
13332
|
+
}), object({ id: number() }), { kind: "mutation" }), method(object({
|
|
13333
|
+
sourceId: number(),
|
|
13334
|
+
targetId: number()
|
|
13335
|
+
}), MigrateDeviceResultSchema, {
|
|
13336
|
+
kind: "mutation",
|
|
13337
|
+
auth: "admin"
|
|
13338
|
+
}), 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({
|
|
13309
13339
|
deviceId: number(),
|
|
13310
13340
|
name: string()
|
|
13311
13341
|
}), _void(), {
|
|
@@ -13799,6 +13829,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
|
|
|
13799
13829
|
auth: "admin"
|
|
13800
13830
|
});
|
|
13801
13831
|
/**
|
|
13832
|
+
* Transport bounds for AI capability methods.
|
|
13833
|
+
*
|
|
13834
|
+
* Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
|
|
13835
|
+
* each other: declaring the constant in either one hands the other `undefined`
|
|
13836
|
+
* at module-init time, and an undefined `timeoutMs` silently falls back to the
|
|
13837
|
+
* kernel's 60 s default — the exact failure this constant exists to prevent,
|
|
13838
|
+
* reintroduced invisibly. Found by the guard, not by review.
|
|
13839
|
+
*/
|
|
13840
|
+
/**
|
|
13841
|
+
* Ceiling for a cap method that runs inference or loads a model.
|
|
13842
|
+
*
|
|
13843
|
+
* Deliberately far above anything the AI layer itself may wait for (a summary
|
|
13844
|
+
* asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
|
|
13845
|
+
* never be the layer that gives up first: when it does, the failure is
|
|
13846
|
+
* reported as a transport error for a model that was still thinking, naming
|
|
13847
|
+
* the wrong layer and hiding the real one.
|
|
13848
|
+
*
|
|
13849
|
+
* Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
|
|
13850
|
+
* more on a cold model load. With no declaration every digest failed at
|
|
13851
|
+
* exactly 60 s and shipped without its text.
|
|
13852
|
+
*
|
|
13853
|
+
* A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
|
|
13854
|
+
* the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
|
|
13855
|
+
* decide when to stop, because only they can say WHY.
|
|
13856
|
+
*/
|
|
13857
|
+
var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
|
|
13858
|
+
/** A multi-gigabyte download. An hour is not generous, it is honest. */
|
|
13859
|
+
var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
|
|
13860
|
+
/**
|
|
13802
13861
|
* Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
|
|
13803
13862
|
* surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
|
|
13804
13863
|
* caps stay wire-compatible without a circular cap→cap import.
|
|
@@ -14070,16 +14129,19 @@ method(LlmGenerateBaseInputSchema.extend({
|
|
|
14070
14129
|
timeoutMs: number().int().positive().optional()
|
|
14071
14130
|
}), LlmGenerateResultSchema, {
|
|
14072
14131
|
kind: "mutation",
|
|
14073
|
-
auth: "admin"
|
|
14132
|
+
auth: "admin",
|
|
14133
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14074
14134
|
}), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
|
|
14075
14135
|
kind: "mutation",
|
|
14076
|
-
auth: "admin"
|
|
14136
|
+
auth: "admin",
|
|
14137
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14077
14138
|
}), method(object({}), _void(), {
|
|
14078
14139
|
kind: "mutation",
|
|
14079
14140
|
auth: "admin"
|
|
14080
14141
|
}), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
|
|
14081
14142
|
kind: "mutation",
|
|
14082
|
-
auth: "admin"
|
|
14143
|
+
auth: "admin",
|
|
14144
|
+
timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
|
|
14083
14145
|
}), method(object({ file: string() }), _void(), {
|
|
14084
14146
|
kind: "mutation",
|
|
14085
14147
|
auth: "admin"
|
|
@@ -14247,7 +14309,13 @@ var ProfileRefInputSchema = object({
|
|
|
14247
14309
|
addonId: string(),
|
|
14248
14310
|
profileId: string()
|
|
14249
14311
|
});
|
|
14250
|
-
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
14312
|
+
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
14313
|
+
kind: "mutation",
|
|
14314
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14315
|
+
}), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
|
|
14316
|
+
kind: "mutation",
|
|
14317
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14318
|
+
}), method(object({
|
|
14251
14319
|
addonId: string().optional(),
|
|
14252
14320
|
requestId: string()
|
|
14253
14321
|
}), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
|
|
@@ -14258,7 +14326,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
14258
14326
|
auth: "admin"
|
|
14259
14327
|
}), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
|
|
14260
14328
|
kind: "mutation",
|
|
14261
|
-
auth: "admin"
|
|
14329
|
+
auth: "admin",
|
|
14330
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14262
14331
|
}), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
|
|
14263
14332
|
selector: LlmDefaultSelectorSchema,
|
|
14264
14333
|
profileId: string().nullable()
|
|
@@ -34987,6 +35056,12 @@ Object.freeze({
|
|
|
34987
35056
|
addonId: null,
|
|
34988
35057
|
access: "view"
|
|
34989
35058
|
},
|
|
35059
|
+
"deviceManager.migrateDevice": {
|
|
35060
|
+
capName: "device-manager",
|
|
35061
|
+
capScope: "system",
|
|
35062
|
+
addonId: null,
|
|
35063
|
+
access: "create"
|
|
35064
|
+
},
|
|
34990
35065
|
"deviceManager.persistConfig": {
|
|
34991
35066
|
capName: "device-manager",
|
|
34992
35067
|
capScope: "system",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-hikvision",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.63",
|
|
4
4
|
"description": "Hikvision camera device provider addon for CamStack — ISAPI over HTTP(S) with digest auth (snapshot, alarm stream, RTSP discovery)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|