@camstack/addon-provider-amcrest 0.2.53 → 0.2.56
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
|
@@ -7711,7 +7711,8 @@ var OpsLogReasonSchema = _enum([
|
|
|
7711
7711
|
"quota",
|
|
7712
7712
|
"manual",
|
|
7713
7713
|
"operator",
|
|
7714
|
-
"maintenance"
|
|
7714
|
+
"maintenance",
|
|
7715
|
+
"orphaned-device"
|
|
7715
7716
|
]);
|
|
7716
7717
|
/** One audit row, shared verbatim by both domains. */
|
|
7717
7718
|
var OpsLogEntrySchema = object({
|
|
@@ -13006,10 +13007,39 @@ var DevicePersistConfigPayloadSchema = object({
|
|
|
13006
13007
|
deviceId: number(),
|
|
13007
13008
|
data: record(string(), unknown())
|
|
13008
13009
|
});
|
|
13010
|
+
/** What a migration actually did, per switch. `unreachable` is a first-class
|
|
13011
|
+
* answer: a camera that could not be asked is not a camera that was silenced. */
|
|
13012
|
+
var MigrateSwitchOutcomeSchema = _enum([
|
|
13013
|
+
"off",
|
|
13014
|
+
"on",
|
|
13015
|
+
"not-offered",
|
|
13016
|
+
"unreachable"
|
|
13017
|
+
]);
|
|
13018
|
+
var MigrateSwitchReportSchema = object({
|
|
13019
|
+
deviceId: number(),
|
|
13020
|
+
switchId: CameraSwitchIdSchema,
|
|
13021
|
+
outcome: MigrateSwitchOutcomeSchema,
|
|
13022
|
+
detail: string().optional()
|
|
13023
|
+
});
|
|
13024
|
+
var MigrateDeviceResultSchema = object({
|
|
13025
|
+
sourceId: number(),
|
|
13026
|
+
targetId: number(),
|
|
13027
|
+
switches: array(MigrateSwitchReportSchema).readonly(),
|
|
13028
|
+
/** Switches that could NOT be turned off on the source. Empty is the only
|
|
13029
|
+
* value meaning the replaced hardware is quiet. */
|
|
13030
|
+
sourceStillLive: array(CameraSwitchIdSchema).readonly(),
|
|
13031
|
+
swapped: boolean()
|
|
13032
|
+
});
|
|
13009
13033
|
method(object({
|
|
13010
13034
|
addonId: string(),
|
|
13011
13035
|
stableId: string()
|
|
13012
|
-
}), object({ id: number() }), { kind: "mutation" }), method(
|
|
13036
|
+
}), object({ id: number() }), { kind: "mutation" }), method(object({
|
|
13037
|
+
sourceId: number(),
|
|
13038
|
+
targetId: number()
|
|
13039
|
+
}), MigrateDeviceResultSchema, {
|
|
13040
|
+
kind: "mutation",
|
|
13041
|
+
auth: "admin"
|
|
13042
|
+
}), 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({
|
|
13013
13043
|
deviceId: number(),
|
|
13014
13044
|
name: string()
|
|
13015
13045
|
}), _void(), {
|
|
@@ -13484,6 +13514,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
|
|
|
13484
13514
|
auth: "admin"
|
|
13485
13515
|
});
|
|
13486
13516
|
/**
|
|
13517
|
+
* Transport bounds for AI capability methods.
|
|
13518
|
+
*
|
|
13519
|
+
* Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
|
|
13520
|
+
* each other: declaring the constant in either one hands the other `undefined`
|
|
13521
|
+
* at module-init time, and an undefined `timeoutMs` silently falls back to the
|
|
13522
|
+
* kernel's 60 s default — the exact failure this constant exists to prevent,
|
|
13523
|
+
* reintroduced invisibly. Found by the guard, not by review.
|
|
13524
|
+
*/
|
|
13525
|
+
/**
|
|
13526
|
+
* Ceiling for a cap method that runs inference or loads a model.
|
|
13527
|
+
*
|
|
13528
|
+
* Deliberately far above anything the AI layer itself may wait for (a summary
|
|
13529
|
+
* asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
|
|
13530
|
+
* never be the layer that gives up first: when it does, the failure is
|
|
13531
|
+
* reported as a transport error for a model that was still thinking, naming
|
|
13532
|
+
* the wrong layer and hiding the real one.
|
|
13533
|
+
*
|
|
13534
|
+
* Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
|
|
13535
|
+
* more on a cold model load. With no declaration every digest failed at
|
|
13536
|
+
* exactly 60 s and shipped without its text.
|
|
13537
|
+
*
|
|
13538
|
+
* A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
|
|
13539
|
+
* the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
|
|
13540
|
+
* decide when to stop, because only they can say WHY.
|
|
13541
|
+
*/
|
|
13542
|
+
var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
|
|
13543
|
+
/** A multi-gigabyte download. An hour is not generous, it is honest. */
|
|
13544
|
+
var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
|
|
13545
|
+
/**
|
|
13487
13546
|
* Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
|
|
13488
13547
|
* surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
|
|
13489
13548
|
* caps stay wire-compatible without a circular cap→cap import.
|
|
@@ -13755,16 +13814,19 @@ method(LlmGenerateBaseInputSchema.extend({
|
|
|
13755
13814
|
timeoutMs: number().int().positive().optional()
|
|
13756
13815
|
}), LlmGenerateResultSchema, {
|
|
13757
13816
|
kind: "mutation",
|
|
13758
|
-
auth: "admin"
|
|
13817
|
+
auth: "admin",
|
|
13818
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
13759
13819
|
}), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
|
|
13760
13820
|
kind: "mutation",
|
|
13761
|
-
auth: "admin"
|
|
13821
|
+
auth: "admin",
|
|
13822
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
13762
13823
|
}), method(object({}), _void(), {
|
|
13763
13824
|
kind: "mutation",
|
|
13764
13825
|
auth: "admin"
|
|
13765
13826
|
}), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
|
|
13766
13827
|
kind: "mutation",
|
|
13767
|
-
auth: "admin"
|
|
13828
|
+
auth: "admin",
|
|
13829
|
+
timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
|
|
13768
13830
|
}), method(object({ file: string() }), _void(), {
|
|
13769
13831
|
kind: "mutation",
|
|
13770
13832
|
auth: "admin"
|
|
@@ -13932,7 +13994,13 @@ var ProfileRefInputSchema = object({
|
|
|
13932
13994
|
addonId: string(),
|
|
13933
13995
|
profileId: string()
|
|
13934
13996
|
});
|
|
13935
|
-
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
13997
|
+
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
13998
|
+
kind: "mutation",
|
|
13999
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14000
|
+
}), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
|
|
14001
|
+
kind: "mutation",
|
|
14002
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14003
|
+
}), method(object({
|
|
13936
14004
|
addonId: string().optional(),
|
|
13937
14005
|
requestId: string()
|
|
13938
14006
|
}), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
|
|
@@ -13943,7 +14011,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
13943
14011
|
auth: "admin"
|
|
13944
14012
|
}), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
|
|
13945
14013
|
kind: "mutation",
|
|
13946
|
-
auth: "admin"
|
|
14014
|
+
auth: "admin",
|
|
14015
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
13947
14016
|
}), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
|
|
13948
14017
|
selector: LlmDefaultSelectorSchema,
|
|
13949
14018
|
profileId: string().nullable()
|
|
@@ -34600,6 +34669,12 @@ Object.freeze({
|
|
|
34600
34669
|
addonId: null,
|
|
34601
34670
|
access: "view"
|
|
34602
34671
|
},
|
|
34672
|
+
"deviceManager.migrateDevice": {
|
|
34673
|
+
capName: "device-manager",
|
|
34674
|
+
capScope: "system",
|
|
34675
|
+
addonId: null,
|
|
34676
|
+
access: "create"
|
|
34677
|
+
},
|
|
34603
34678
|
"deviceManager.persistConfig": {
|
|
34604
34679
|
capName: "device-manager",
|
|
34605
34680
|
capScope: "system",
|
package/dist/addon.mjs
CHANGED
|
@@ -7712,7 +7712,8 @@ var OpsLogReasonSchema = _enum([
|
|
|
7712
7712
|
"quota",
|
|
7713
7713
|
"manual",
|
|
7714
7714
|
"operator",
|
|
7715
|
-
"maintenance"
|
|
7715
|
+
"maintenance",
|
|
7716
|
+
"orphaned-device"
|
|
7716
7717
|
]);
|
|
7717
7718
|
/** One audit row, shared verbatim by both domains. */
|
|
7718
7719
|
var OpsLogEntrySchema = object({
|
|
@@ -13007,10 +13008,39 @@ var DevicePersistConfigPayloadSchema = object({
|
|
|
13007
13008
|
deviceId: number(),
|
|
13008
13009
|
data: record(string(), unknown())
|
|
13009
13010
|
});
|
|
13011
|
+
/** What a migration actually did, per switch. `unreachable` is a first-class
|
|
13012
|
+
* answer: a camera that could not be asked is not a camera that was silenced. */
|
|
13013
|
+
var MigrateSwitchOutcomeSchema = _enum([
|
|
13014
|
+
"off",
|
|
13015
|
+
"on",
|
|
13016
|
+
"not-offered",
|
|
13017
|
+
"unreachable"
|
|
13018
|
+
]);
|
|
13019
|
+
var MigrateSwitchReportSchema = object({
|
|
13020
|
+
deviceId: number(),
|
|
13021
|
+
switchId: CameraSwitchIdSchema,
|
|
13022
|
+
outcome: MigrateSwitchOutcomeSchema,
|
|
13023
|
+
detail: string().optional()
|
|
13024
|
+
});
|
|
13025
|
+
var MigrateDeviceResultSchema = object({
|
|
13026
|
+
sourceId: number(),
|
|
13027
|
+
targetId: number(),
|
|
13028
|
+
switches: array(MigrateSwitchReportSchema).readonly(),
|
|
13029
|
+
/** Switches that could NOT be turned off on the source. Empty is the only
|
|
13030
|
+
* value meaning the replaced hardware is quiet. */
|
|
13031
|
+
sourceStillLive: array(CameraSwitchIdSchema).readonly(),
|
|
13032
|
+
swapped: boolean()
|
|
13033
|
+
});
|
|
13010
13034
|
method(object({
|
|
13011
13035
|
addonId: string(),
|
|
13012
13036
|
stableId: string()
|
|
13013
|
-
}), object({ id: number() }), { kind: "mutation" }), method(
|
|
13037
|
+
}), object({ id: number() }), { kind: "mutation" }), method(object({
|
|
13038
|
+
sourceId: number(),
|
|
13039
|
+
targetId: number()
|
|
13040
|
+
}), MigrateDeviceResultSchema, {
|
|
13041
|
+
kind: "mutation",
|
|
13042
|
+
auth: "admin"
|
|
13043
|
+
}), 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({
|
|
13014
13044
|
deviceId: number(),
|
|
13015
13045
|
name: string()
|
|
13016
13046
|
}), _void(), {
|
|
@@ -13485,6 +13515,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
|
|
|
13485
13515
|
auth: "admin"
|
|
13486
13516
|
});
|
|
13487
13517
|
/**
|
|
13518
|
+
* Transport bounds for AI capability methods.
|
|
13519
|
+
*
|
|
13520
|
+
* Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
|
|
13521
|
+
* each other: declaring the constant in either one hands the other `undefined`
|
|
13522
|
+
* at module-init time, and an undefined `timeoutMs` silently falls back to the
|
|
13523
|
+
* kernel's 60 s default — the exact failure this constant exists to prevent,
|
|
13524
|
+
* reintroduced invisibly. Found by the guard, not by review.
|
|
13525
|
+
*/
|
|
13526
|
+
/**
|
|
13527
|
+
* Ceiling for a cap method that runs inference or loads a model.
|
|
13528
|
+
*
|
|
13529
|
+
* Deliberately far above anything the AI layer itself may wait for (a summary
|
|
13530
|
+
* asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
|
|
13531
|
+
* never be the layer that gives up first: when it does, the failure is
|
|
13532
|
+
* reported as a transport error for a model that was still thinking, naming
|
|
13533
|
+
* the wrong layer and hiding the real one.
|
|
13534
|
+
*
|
|
13535
|
+
* Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
|
|
13536
|
+
* more on a cold model load. With no declaration every digest failed at
|
|
13537
|
+
* exactly 60 s and shipped without its text.
|
|
13538
|
+
*
|
|
13539
|
+
* A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
|
|
13540
|
+
* the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
|
|
13541
|
+
* decide when to stop, because only they can say WHY.
|
|
13542
|
+
*/
|
|
13543
|
+
var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
|
|
13544
|
+
/** A multi-gigabyte download. An hour is not generous, it is honest. */
|
|
13545
|
+
var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
|
|
13546
|
+
/**
|
|
13488
13547
|
* Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
|
|
13489
13548
|
* surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
|
|
13490
13549
|
* caps stay wire-compatible without a circular cap→cap import.
|
|
@@ -13756,16 +13815,19 @@ method(LlmGenerateBaseInputSchema.extend({
|
|
|
13756
13815
|
timeoutMs: number().int().positive().optional()
|
|
13757
13816
|
}), LlmGenerateResultSchema, {
|
|
13758
13817
|
kind: "mutation",
|
|
13759
|
-
auth: "admin"
|
|
13818
|
+
auth: "admin",
|
|
13819
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
13760
13820
|
}), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
|
|
13761
13821
|
kind: "mutation",
|
|
13762
|
-
auth: "admin"
|
|
13822
|
+
auth: "admin",
|
|
13823
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
13763
13824
|
}), method(object({}), _void(), {
|
|
13764
13825
|
kind: "mutation",
|
|
13765
13826
|
auth: "admin"
|
|
13766
13827
|
}), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
|
|
13767
13828
|
kind: "mutation",
|
|
13768
|
-
auth: "admin"
|
|
13829
|
+
auth: "admin",
|
|
13830
|
+
timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
|
|
13769
13831
|
}), method(object({ file: string() }), _void(), {
|
|
13770
13832
|
kind: "mutation",
|
|
13771
13833
|
auth: "admin"
|
|
@@ -13933,7 +13995,13 @@ var ProfileRefInputSchema = object({
|
|
|
13933
13995
|
addonId: string(),
|
|
13934
13996
|
profileId: string()
|
|
13935
13997
|
});
|
|
13936
|
-
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
13998
|
+
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
13999
|
+
kind: "mutation",
|
|
14000
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14001
|
+
}), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
|
|
14002
|
+
kind: "mutation",
|
|
14003
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14004
|
+
}), method(object({
|
|
13937
14005
|
addonId: string().optional(),
|
|
13938
14006
|
requestId: string()
|
|
13939
14007
|
}), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
|
|
@@ -13944,7 +14012,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
13944
14012
|
auth: "admin"
|
|
13945
14013
|
}), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
|
|
13946
14014
|
kind: "mutation",
|
|
13947
|
-
auth: "admin"
|
|
14015
|
+
auth: "admin",
|
|
14016
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
13948
14017
|
}), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
|
|
13949
14018
|
selector: LlmDefaultSelectorSchema,
|
|
13950
14019
|
profileId: string().nullable()
|
|
@@ -34601,6 +34670,12 @@ Object.freeze({
|
|
|
34601
34670
|
addonId: null,
|
|
34602
34671
|
access: "view"
|
|
34603
34672
|
},
|
|
34673
|
+
"deviceManager.migrateDevice": {
|
|
34674
|
+
capName: "device-manager",
|
|
34675
|
+
capScope: "system",
|
|
34676
|
+
addonId: null,
|
|
34677
|
+
access: "create"
|
|
34678
|
+
},
|
|
34604
34679
|
"deviceManager.persistConfig": {
|
|
34605
34680
|
capName: "device-manager",
|
|
34606
34681
|
capScope: "system",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-amcrest",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.56",
|
|
4
4
|
"description": "Amcrest/Dahua camera device provider addon for CamStack — Dahua CGI over HTTP(S) with digest auth (snapshot, RTSP catalog, PTZ, image/day-night config)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|